forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit153e215
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 parent1118a8d commit153e215
2 files changed
+60
-5
lines changedLines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
476 | 476 |
| |
477 | 477 |
| |
478 | 478 |
| |
| 479 | + | |
479 | 480 |
| |
480 | 481 |
| |
481 | 482 |
| |
|
Lines changed: 59 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 | + | |
151 | 168 |
| |
152 | 169 |
| |
153 | 170 |
| |
| |||
1479 | 1496 |
| |
1480 | 1497 |
| |
1481 | 1498 |
| |
1482 |
| - | |
1483 |
| - | |
| 1499 | + | |
| 1500 | + | |
1484 | 1501 |
| |
1485 | 1502 |
| |
1486 | 1503 |
| |
| |||
1532 | 1549 |
| |
1533 | 1550 |
| |
1534 | 1551 |
| |
| 1552 | + | |
1535 | 1553 |
| |
1536 | 1554 |
| |
1537 | 1555 |
| |
| |||
1562 | 1580 |
| |
1563 | 1581 |
| |
1564 | 1582 |
| |
| 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 | + | |
1565 | 1617 |
| |
1566 | 1618 |
| |
1567 | 1619 |
| |
| |||
1582 | 1634 |
| |
1583 | 1635 |
| |
1584 | 1636 |
| |
| 1637 | + | |
| 1638 | + | |
1585 | 1639 |
| |
1586 | 1640 |
| |
1587 | 1641 |
| |
|
0 commit comments
Comments
(0)