forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitbaa78ff
committed
Prevent port collisions between concurrent TAP tests
Currently there is a race condition where if concurrent TAP tests bothtest that they can open a port they will assume that it is free and useit, causing one of them to fail. To prevent this we record a reservationusing an exclusive lock, and any TAP test that discovers a reservationchecks to see if the reserving process is still alive, and looks foranother free port if it is.Ports are reserved in a directory set by the environment settingPG_TEST_PORT_DIR, or if that doesn't exist a subdirectory of the topbuild directory as set by Makefile.global, or its owntmp_check directory.The prove_check recipe in Makefile.global.in is extended to exporttop_builddir to the TAP tests. This was already exported by theprove_installcheck recipes.Per complaint from Andres FreundBackpatched from9b4eafc to all live branchesDiscussion:https://postgr.es/m/20221002164931.d57hlutrcz4d2zi7@awork3.anarazel.de1 parente9c8907 commitbaa78ff
2 files changed
+60
-5
lines changedLines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
455 | 455 |
| |
456 | 456 |
| |
457 | 457 |
| |
| 458 | + | |
458 | 459 |
| |
459 | 460 |
| |
460 | 461 |
| |
|
Lines changed: 59 additions & 5 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
90 | 90 |
| |
91 | 91 |
| |
92 | 92 |
| |
93 |
| - | |
| 93 | + | |
94 | 94 |
| |
95 |
| - | |
| 95 | + | |
96 | 96 |
| |
97 | 97 |
| |
98 | 98 |
| |
| |||
110 | 110 |
| |
111 | 111 |
| |
112 | 112 |
| |
113 |
| - | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
114 | 117 |
| |
115 | 118 |
| |
116 | 119 |
| |
| |||
126 | 129 |
| |
127 | 130 |
| |
128 | 131 |
| |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
129 | 146 |
| |
130 | 147 |
| |
131 | 148 |
| |
| |||
1182 | 1199 |
| |
1183 | 1200 |
| |
1184 | 1201 |
| |
1185 |
| - | |
1186 |
| - | |
| 1202 | + | |
| 1203 | + | |
1187 | 1204 |
| |
1188 | 1205 |
| |
1189 | 1206 |
| |
| |||
1232 | 1249 |
| |
1233 | 1250 |
| |
1234 | 1251 |
| |
| 1252 | + | |
1235 | 1253 |
| |
1236 | 1254 |
| |
1237 | 1255 |
| |
| |||
1262 | 1280 |
| |
1263 | 1281 |
| |
1264 | 1282 |
| |
| 1283 | + | |
| 1284 | + | |
| 1285 | + | |
| 1286 | + | |
| 1287 | + | |
| 1288 | + | |
| 1289 | + | |
| 1290 | + | |
| 1291 | + | |
| 1292 | + | |
| 1293 | + | |
| 1294 | + | |
| 1295 | + | |
| 1296 | + | |
| 1297 | + | |
| 1298 | + | |
| 1299 | + | |
| 1300 | + | |
| 1301 | + | |
| 1302 | + | |
| 1303 | + | |
| 1304 | + | |
| 1305 | + | |
| 1306 | + | |
| 1307 | + | |
| 1308 | + | |
| 1309 | + | |
| 1310 | + | |
| 1311 | + | |
| 1312 | + | |
| 1313 | + | |
| 1314 | + | |
| 1315 | + | |
| 1316 | + | |
1265 | 1317 |
| |
1266 | 1318 |
| |
1267 | 1319 |
| |
| |||
1283 | 1335 |
| |
1284 | 1336 |
| |
1285 | 1337 |
| |
| 1338 | + | |
| 1339 | + | |
1286 | 1340 |
| |
1287 | 1341 |
| |
1288 | 1342 |
| |
|
0 commit comments
Comments
(0)