Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion scripts/soak-legs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,10 @@ ROOT="$(cd "$(dirname "$0")/.." && pwd)"
run_leg() {
local leg="$1"
local log
log="$(mktemp "${TMPDIR:-/tmp}/cbm-soak-leg-XXXXXX.log")"
# No suffix after the X run: BSD mktemp substitutes only TRAILING X's, so
# a template like ...XXXXXX.log creates a near-literal file on macOS and
# every second run collides with the first run's leftover ("File exists").
log="$(mktemp "${TMPDIR:-/tmp}/cbm-soak-leg-XXXXXX")"
echo "=== soak-legs: leg=${leg} binary=${BINARY} duration=${DURATION}m ==="
local rc=0
case "$leg" in
Expand Down
1 change: 1 addition & 0 deletions test-infrastructure/Dockerfile.alpine
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ RUN apk add --no-cache \
zlib-dev \
zlib-static \
bash \
curl \
git \
python3 \
nodejs \
Expand Down
15 changes: 13 additions & 2 deletions tests/test_smoke_fixture_contract.sh
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,13 @@ if helper.is_file():
deadline = time.monotonic() + 30
while time.monotonic() < deadline:
if port_file.is_file():
text = port_file.read_text(encoding="ascii").strip()
try:
text = port_file.read_text(encoding="ascii").strip()
except OSError:
# Windows: the atomic replace publishing the port
# (or a first-touch AV scan of the fresh file)
# briefly denies the read — not ready yet.
text = ""
if text:
port = int(text)
break
Expand Down Expand Up @@ -474,7 +480,12 @@ if helper.is_file():
dns_deadline = time.monotonic() + 20
while time.monotonic() < dns_deadline:
if dns_port_file.is_file():
dns_text = dns_port_file.read_text(encoding="ascii").strip()
try:
dns_text = dns_port_file.read_text(encoding="ascii").strip()
except OSError:
# Windows: replace-in-flight / first-touch AV scan —
# not ready yet (see the port poll above).
dns_text = ""
if dns_text:
dns_port = int(dns_text)
break
Expand Down
Loading