forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit9b4eafc
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 meson or 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 FreundThis will be backpatched in due course after some testing.Discussion:https://postgr.es/m/20221002164931.d57hlutrcz4d2zi7@awork3.anarazel.de1 parentfb32748 commit9b4eafc
2 files changed
+61
-6
lines changedLines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
482 | 482 |
| |
483 | 483 |
| |
484 | 484 |
| |
485 |
| - | |
| 485 | + | |
486 | 486 |
| |
487 | 487 |
| |
488 | 488 |
| |
|
Lines changed: 60 additions & 5 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
101 | 101 |
| |
102 | 102 |
| |
103 | 103 |
| |
104 |
| - | |
| 104 | + | |
105 | 105 |
| |
106 |
| - | |
| 106 | + | |
107 | 107 |
| |
108 | 108 |
| |
109 | 109 |
| |
| |||
117 | 117 |
| |
118 | 118 |
| |
119 | 119 |
| |
120 |
| - | |
| 120 | + | |
121 | 121 |
| |
122 | 122 |
| |
123 | 123 |
| |
124 | 124 |
| |
125 | 125 |
| |
| 126 | + | |
| 127 | + | |
| 128 | + | |
126 | 129 |
| |
127 | 130 |
| |
128 | 131 |
| |
| |||
148 | 151 |
| |
149 | 152 |
| |
150 | 153 |
| |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
151 | 169 |
| |
152 | 170 |
| |
153 | 171 |
| |
| |||
1479 | 1497 |
| |
1480 | 1498 |
| |
1481 | 1499 |
| |
1482 |
| - | |
1483 |
| - | |
| 1500 | + | |
| 1501 | + | |
1484 | 1502 |
| |
1485 | 1503 |
| |
1486 | 1504 |
| |
| |||
1532 | 1550 |
| |
1533 | 1551 |
| |
1534 | 1552 |
| |
| 1553 | + | |
1535 | 1554 |
| |
1536 | 1555 |
| |
1537 | 1556 |
| |
| |||
1562 | 1581 |
| |
1563 | 1582 |
| |
1564 | 1583 |
| |
| 1584 | + | |
| 1585 | + | |
| 1586 | + | |
| 1587 | + | |
| 1588 | + | |
| 1589 | + | |
| 1590 | + | |
| 1591 | + | |
| 1592 | + | |
| 1593 | + | |
| 1594 | + | |
| 1595 | + | |
| 1596 | + | |
| 1597 | + | |
| 1598 | + | |
| 1599 | + | |
| 1600 | + | |
| 1601 | + | |
| 1602 | + | |
| 1603 | + | |
| 1604 | + | |
| 1605 | + | |
| 1606 | + | |
| 1607 | + | |
| 1608 | + | |
| 1609 | + | |
| 1610 | + | |
| 1611 | + | |
| 1612 | + | |
| 1613 | + | |
| 1614 | + | |
| 1615 | + | |
| 1616 | + | |
| 1617 | + | |
1565 | 1618 |
| |
1566 | 1619 |
| |
1567 | 1620 |
| |
| |||
1589 | 1642 |
| |
1590 | 1643 |
| |
1591 | 1644 |
| |
| 1645 | + | |
| 1646 | + | |
1592 | 1647 |
| |
1593 | 1648 |
| |
1594 | 1649 |
| |
|
0 commit comments
Comments
(0)