forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit3b37a6d
committed
Add basic spinlock tests to regression tests.
As s_lock_test, the already existing test for spinlocks, isn't run inan automated fashion (and doesn't test a normal backend environment),adding tests that are run as part of a normal regression run is a goodidea. Particularly in light of several recent and upcoming spinlockrelated fixes.Currently the new tests are run as part of the pre-existingtest_atomic_ops() test. That perhaps can be quibbled about, but fornow seems ok.The only operations that s_lock_test tests but the new tests don't arethe detection of a stuck spinlock and S_LOCK_FREE (which is otherwiseunused, not implemented on all platforms, and will be removed).This currently contains a test for more than INT_MAX spinlocks (onlyrun with --disable-spinlocks), to ensure the recent commit fixing abug with more than INT_MAX spinlock initializations is correct. Thattest is somewhat slow, so we might want to disable it after a fewdays.It might be worth retiring s_lock_test after this. The added coverageof a stuck spinlock probably isn't worth the added complexity?Author: Andres FreundDiscussion:https://postgr.es/m/20200606023103.avzrctgv7476xj7i@alap3.anarazel.de1 parenta3235a5 commit3b37a6d
1 file changed
+109
-0
lines changedLines changed: 109 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
34 | 34 |
| |
35 | 35 |
| |
36 | 36 |
| |
| 37 | + | |
37 | 38 |
| |
38 | 39 |
| |
39 | 40 |
| |
| |||
794 | 795 |
| |
795 | 796 |
| |
796 | 797 |
| |
| 798 | + | |
| 799 | + | |
| 800 | + | |
| 801 | + | |
| 802 | + | |
| 803 | + | |
| 804 | + | |
| 805 | + | |
| 806 | + | |
| 807 | + | |
| 808 | + | |
| 809 | + | |
| 810 | + | |
| 811 | + | |
| 812 | + | |
| 813 | + | |
| 814 | + | |
| 815 | + | |
| 816 | + | |
| 817 | + | |
| 818 | + | |
| 819 | + | |
| 820 | + | |
| 821 | + | |
| 822 | + | |
| 823 | + | |
| 824 | + | |
| 825 | + | |
| 826 | + | |
| 827 | + | |
| 828 | + | |
| 829 | + | |
| 830 | + | |
| 831 | + | |
| 832 | + | |
| 833 | + | |
| 834 | + | |
| 835 | + | |
| 836 | + | |
| 837 | + | |
| 838 | + | |
| 839 | + | |
| 840 | + | |
| 841 | + | |
| 842 | + | |
| 843 | + | |
| 844 | + | |
| 845 | + | |
| 846 | + | |
| 847 | + | |
| 848 | + | |
| 849 | + | |
| 850 | + | |
| 851 | + | |
| 852 | + | |
| 853 | + | |
| 854 | + | |
| 855 | + | |
| 856 | + | |
| 857 | + | |
| 858 | + | |
| 859 | + | |
| 860 | + | |
| 861 | + | |
| 862 | + | |
| 863 | + | |
| 864 | + | |
| 865 | + | |
| 866 | + | |
| 867 | + | |
| 868 | + | |
| 869 | + | |
| 870 | + | |
| 871 | + | |
| 872 | + | |
| 873 | + | |
| 874 | + | |
| 875 | + | |
| 876 | + | |
| 877 | + | |
| 878 | + | |
| 879 | + | |
| 880 | + | |
| 881 | + | |
| 882 | + | |
| 883 | + | |
| 884 | + | |
| 885 | + | |
| 886 | + | |
| 887 | + | |
| 888 | + | |
| 889 | + | |
| 890 | + | |
| 891 | + | |
| 892 | + | |
| 893 | + | |
| 894 | + | |
| 895 | + | |
| 896 | + | |
| 897 | + | |
| 898 | + | |
| 899 | + | |
797 | 900 |
| |
798 | 901 |
| |
799 | 902 |
| |
| |||
805 | 908 |
| |
806 | 909 |
| |
807 | 910 |
| |
| 911 | + | |
| 912 | + | |
| 913 | + | |
| 914 | + | |
| 915 | + | |
| 916 | + | |
808 | 917 |
| |
809 | 918 |
| |
810 | 919 |
| |
|
0 commit comments
Comments
(0)