Skip to content

Commit d0e1ac5

Browse files
authored
Merge pull request DeusData#1285 from DeusData/feat/local-remote-parity
Local-ladder green: BSD mktemp soak fix (CI-mac-gating) + 0h port-poll tolerance + Alpine curl
2 parents 9ad96ea + 6655b85 commit d0e1ac5

3 files changed

Lines changed: 18 additions & 3 deletions

File tree

‎scripts/soak-legs.sh‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,10 @@ ROOT="$(cd "$(dirname "$0")/.." && pwd)"
7777
run_leg() {
7878
local leg="$1"
7979
local log
80-
log="$(mktemp "${TMPDIR:-/tmp}/cbm-soak-leg-XXXXXX.log")"
80+
# No suffix after the X run: BSD mktemp substitutes only TRAILING X's, so
81+
# a template like ...XXXXXX.log creates a near-literal file on macOS and
82+
# every second run collides with the first run's leftover ("File exists").
83+
log="$(mktemp "${TMPDIR:-/tmp}/cbm-soak-leg-XXXXXX")"
8184
echo "=== soak-legs: leg=${leg} binary=${BINARY} duration=${DURATION}m ==="
8285
local rc=0
8386
case "$leg" in

‎test-infrastructure/Dockerfile.alpine‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ RUN apk add --no-cache \
1414
zlib-dev \
1515
zlib-static \
1616
bash \
17+
curl \
1718
git \
1819
python3 \
1920
nodejs \

‎tests/test_smoke_fixture_contract.sh‎

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,13 @@ if helper.is_file():
381381
deadline = time.monotonic() + 30
382382
while time.monotonic() < deadline:
383383
if port_file.is_file():
384-
text = port_file.read_text(encoding="ascii").strip()
384+
try:
385+
text = port_file.read_text(encoding="ascii").strip()
386+
except OSError:
387+
# Windows: the atomic replace publishing the port
388+
# (or a first-touch AV scan of the fresh file)
389+
# briefly denies the read — not ready yet.
390+
text = ""
385391
if text:
386392
port = int(text)
387393
break
@@ -474,7 +480,12 @@ if helper.is_file():
474480
dns_deadline = time.monotonic() + 20
475481
while time.monotonic() < dns_deadline:
476482
if dns_port_file.is_file():
477-
dns_text = dns_port_file.read_text(encoding="ascii").strip()
483+
try:
484+
dns_text = dns_port_file.read_text(encoding="ascii").strip()
485+
except OSError:
486+
# Windows: replace-in-flight / first-touch AV scan —
487+
# not ready yet (see the port poll above).
488+
dns_text = ""
478489
if dns_text:
479490
dns_port = int(dns_text)
480491
break

0 commit comments

Comments
 (0)