Skip to content

Commit 1d822c8

Browse files
committed
fix(soak): BSD-safe mktemp template for the per-leg log
BSD mktemp substitutes only TRAILING X's, so the template cbm-soak-leg-XXXXXX.log creates a near-literal file on macOS and the second leg of the same job collides with the first leg's leftover ('File exists'). First runs mask it — which is why the quick leg passed and query-leak failed locally, and why CI's macos soak jobs (BSD mktemp, two legs per job) would fail the same way. Drop the suffix; the path is only a log handle. Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
1 parent c1425d2 commit 1d822c8

1 file changed

Lines changed: 4 additions & 1 deletion

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

0 commit comments

Comments
 (0)