kit

kit
git clone https://git.ryansepassi.com/git/kit.git
Log | Files | Refs | README

commit d153bd1b92682fae6eb8430662304e079f183e34
parent 57702d75602029d08a87ffa1dd1fe5334e905e41
Author: Ryan Sepassi <rsepassi@gmail.com>
Date:   Mon,  1 Jun 2026 17:14:26 -0700

test: scope CF_WORK per target tuple to fix parallel-dispatch races

The corpus matrix is case x opt x tuple, but the workdir path omitted the
tuple, so two tuples of the same (case, opt) shared a dir. Under parallel
dispatch one worker rm -rf/rebuild raced another worker exec, surfacing as
spurious SIGILLs. Fold $CF_TUPLE into the path; CF_NAME stays the human label.

Diffstat:
Mtest/lib/cf_corpus.sh | 10++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/test/lib/cf_corpus.sh b/test/lib/cf_corpus.sh @@ -105,10 +105,16 @@ cf_corpus_item() { CF_OPT="${item%%|*}"; CF_TUPLE="${item#*|}" CF_ARCH="${CF_TUPLE%-*}"; CF_OBJ="${CF_TUPLE#*-}" + # CF_WORK must be unique per work item. The matrix is case x opt x tuple + # (see cf_corpus_run), so the tuple is folded into the path — otherwise two + # tuples of the same (case, opt) share a dir and, under parallel dispatch, + # stomp each other's artifacts (one worker's `rm -rf $CF_WORK` / rebuilt exe + # races another's exec, surfacing as spurious SIGILLs). CF_NAME stays the + # human label; lanes that sweep multiple tuples prefix it with the arch. if [ "$CF_OPT" = "-" ]; then - CF_NAME="$CF_BASE"; CF_WORK="$CF_BUILD_DIR/$CF_BASE" + CF_NAME="$CF_BASE"; CF_WORK="$CF_BUILD_DIR/$CF_BASE/$CF_TUPLE" else - CF_NAME="$CF_BASE/O$CF_OPT"; CF_WORK="$CF_BUILD_DIR/$CF_BASE/O$CF_OPT" + CF_NAME="$CF_BASE/O$CF_OPT"; CF_WORK="$CF_BUILD_DIR/$CF_BASE/O$CF_OPT/$CF_TUPLE" fi rm -rf "$CF_WORK"; mkdir -p "$CF_WORK"