forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit3f66e1c
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 parent28fa048 commit3f66e1c
1 file changed
+109
-0
lines changedLines changed: 109 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
31 | 31 |
| |
32 | 32 |
| |
33 | 33 |
| |
| 34 | + | |
34 | 35 |
| |
35 | 36 |
| |
36 | 37 |
| |
| |||
1036 | 1037 |
| |
1037 | 1038 |
| |
1038 | 1039 |
| |
| 1040 | + | |
| 1041 | + | |
| 1042 | + | |
| 1043 | + | |
| 1044 | + | |
| 1045 | + | |
| 1046 | + | |
| 1047 | + | |
| 1048 | + | |
| 1049 | + | |
| 1050 | + | |
| 1051 | + | |
| 1052 | + | |
| 1053 | + | |
| 1054 | + | |
| 1055 | + | |
| 1056 | + | |
| 1057 | + | |
| 1058 | + | |
| 1059 | + | |
| 1060 | + | |
| 1061 | + | |
| 1062 | + | |
| 1063 | + | |
| 1064 | + | |
| 1065 | + | |
| 1066 | + | |
| 1067 | + | |
| 1068 | + | |
| 1069 | + | |
| 1070 | + | |
| 1071 | + | |
| 1072 | + | |
| 1073 | + | |
| 1074 | + | |
| 1075 | + | |
| 1076 | + | |
| 1077 | + | |
| 1078 | + | |
| 1079 | + | |
| 1080 | + | |
| 1081 | + | |
| 1082 | + | |
| 1083 | + | |
| 1084 | + | |
| 1085 | + | |
| 1086 | + | |
| 1087 | + | |
| 1088 | + | |
| 1089 | + | |
| 1090 | + | |
| 1091 | + | |
| 1092 | + | |
| 1093 | + | |
| 1094 | + | |
| 1095 | + | |
| 1096 | + | |
| 1097 | + | |
| 1098 | + | |
| 1099 | + | |
| 1100 | + | |
| 1101 | + | |
| 1102 | + | |
| 1103 | + | |
| 1104 | + | |
| 1105 | + | |
| 1106 | + | |
| 1107 | + | |
| 1108 | + | |
| 1109 | + | |
| 1110 | + | |
| 1111 | + | |
| 1112 | + | |
| 1113 | + | |
| 1114 | + | |
| 1115 | + | |
| 1116 | + | |
| 1117 | + | |
| 1118 | + | |
| 1119 | + | |
| 1120 | + | |
| 1121 | + | |
| 1122 | + | |
| 1123 | + | |
| 1124 | + | |
| 1125 | + | |
| 1126 | + | |
| 1127 | + | |
| 1128 | + | |
| 1129 | + | |
| 1130 | + | |
| 1131 | + | |
| 1132 | + | |
| 1133 | + | |
| 1134 | + | |
| 1135 | + | |
| 1136 | + | |
| 1137 | + | |
| 1138 | + | |
| 1139 | + | |
| 1140 | + | |
| 1141 | + | |
1039 | 1142 |
| |
1040 | 1143 |
| |
1041 | 1144 |
| |
| |||
1047 | 1150 |
| |
1048 | 1151 |
| |
1049 | 1152 |
| |
| 1153 | + | |
| 1154 | + | |
| 1155 | + | |
| 1156 | + | |
| 1157 | + | |
| 1158 | + | |
1050 | 1159 |
| |
1051 | 1160 |
|
0 commit comments
Comments
(0)