forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit4b9013d
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 parent36eeb37 commit4b9013d
2 files changed
+60
-5
lines changedLines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
471 | 471 |
| |
472 | 472 |
| |
473 | 473 |
| |
| 474 | + | |
474 | 475 |
| |
475 | 476 |
| |
476 | 477 |
| |
|
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 |
| |
| |||
1210 | 1227 |
| |
1211 | 1228 |
| |
1212 | 1229 |
| |
1213 |
| - | |
1214 |
| - | |
| 1230 | + | |
| 1231 | + | |
1215 | 1232 |
| |
1216 | 1233 |
| |
1217 | 1234 |
| |
| |||
1260 | 1277 |
| |
1261 | 1278 |
| |
1262 | 1279 |
| |
| 1280 | + | |
1263 | 1281 |
| |
1264 | 1282 |
| |
1265 | 1283 |
| |
| |||
1290 | 1308 |
| |
1291 | 1309 |
| |
1292 | 1310 |
| |
| 1311 | + | |
| 1312 | + | |
| 1313 | + | |
| 1314 | + | |
| 1315 | + | |
| 1316 | + | |
| 1317 | + | |
| 1318 | + | |
| 1319 | + | |
| 1320 | + | |
| 1321 | + | |
| 1322 | + | |
| 1323 | + | |
| 1324 | + | |
| 1325 | + | |
| 1326 | + | |
| 1327 | + | |
| 1328 | + | |
| 1329 | + | |
| 1330 | + | |
| 1331 | + | |
| 1332 | + | |
| 1333 | + | |
| 1334 | + | |
| 1335 | + | |
| 1336 | + | |
| 1337 | + | |
| 1338 | + | |
| 1339 | + | |
| 1340 | + | |
| 1341 | + | |
| 1342 | + | |
| 1343 | + | |
| 1344 | + | |
1293 | 1345 |
| |
1294 | 1346 |
| |
1295 | 1347 |
| |
| |||
1311 | 1363 |
| |
1312 | 1364 |
| |
1313 | 1365 |
| |
| 1366 | + | |
| 1367 | + | |
1314 | 1368 |
| |
1315 | 1369 |
| |
1316 | 1370 |
| |
|
0 commit comments
Comments
(0)