diff options
| author | Scott Gasch <[email protected]> | 2026-09-18 18:26:28 -0700 |
|---|---|---|
| committer | Scott Gasch <[email protected]> | 2026-09-18 18:26:28 -0700 |
| commit | 187e321c450740dc0fba2c1d29917851d45a822f (patch) | |
| tree | 1701894913bb8ed09dfd4c578c50221eaa22650b | |
| parent | 284113f878444ded9cd36b4a70900efd036651de (diff) | |
fuzz_test.sh: copy the binary to a private path before looping
A concurrent gmake clean (update_head_reference.sh, precommit_check.sh)
unlinks ./_typhoon out from under a fuzz loop mid-run, breaking every
subsequent iteration with "not found/executable". Observed live running
this alongside update_head_reference.sh today. Copy once up front instead
of exec'ing $BIN in place, so later rebuilds in the working tree can't
touch what the loop is actually running.
Co-Authored-By: Claude Sonnet 5 <[email protected]>
| -rwxr-xr-x | src/fuzz_test.sh | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/fuzz_test.sh b/src/fuzz_test.sh index 5e3d5f7..131b6a0 100755 --- a/src/fuzz_test.sh +++ b/src/fuzz_test.sh @@ -27,6 +27,19 @@ if [ ! -f "$SUITE" ]; then exit 1 fi +# Copy the binary out to a stable, private path rather than exec'ing $BIN +# in place. A concurrent "gmake clean" (e.g. update_head_reference.sh, +# precommit_check.sh) unlinks ./_typhoon/./typhoon out from under a loop +# that's mid-run, silently breaking every subsequent iteration with +# "not found/executable" -- observed live running this alongside +# update_head_reference.sh. Copying once up front means later rebuilds in +# the working tree can't touch what this loop is actually running. +FUZZ_BIN="$LOGDIR/fuzz_bin_$$" +cp "$BIN" "$FUZZ_BIN" +chmod +x "$FUZZ_BIN" +trap 'rm -f "$FUZZ_BIN"' EXIT +BIN="$FUZZ_BIN" + TOTAL_RECORDS=$(grep -c '^go' "$SUITE") ITER=0 |
