A run's temp root is made where only martha's runs look (martha#199) #213
Loading…
Reference in a new issue
No description provided.
Delete branch "vesta/199-tmp-leftovers"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Purpose (defect): a run of martha's tests leaves nothing under the host's shared temp directory that another tool can read as its own leftovers — every tree it makes is under a root only martha's runs look at, and is gone when the run ends, however it ends.
Refs #199
What changed:
$XDG_CACHE_HOME, else$HOME/.cache, thenmartha/test-runs, 0700) when the TMPDIR a run would reach for itself is the system's shared temporary directory, and that place is swept by the same start-up sweep;Tests, red first:
/tmpas TMPDIR put its root at/tmp/m724-wmoRmgbefore the fix;makeARoot(tmpdir());Local runs (all inside
unshare --user --map-root-user --pid --fork --mount-proc): stage 3 is 18 red on this branch against 17 on unmodified main, and the extra one isthe_bash_answers_biteseeing this worktree's uncommitted diff; the shared 17 are the process-mode/reap family (known/#207), which the installer stage shows the same way (12 reds on main too, control log kept with the crew). CI covers both.Attributing roots after the run had ended read owner files the wrapper had already removed with its roots, so every root of the run was dropped and a wrapper that put one in the shared temp directory again would have passed. The child reads each m724- entry's owner while both runs are in flight now and answers { name, pid }; the check filters that on the wrapper pid it was given as the child's parent.bc8c2c25into the shared-temp fold (martha#199) 0b8b681125965e3df8into the shared-temp fold (martha#199) eec12e2457Another hit of the #195 SIGTERM race that this PR fixes (Mars's ruling): martha run 5238 (PR 211,
f5f6b8cc), job gate coverage, task 17474 on build00-martha-bwrap, in step 15 (the long-TMPDIR pass).a_stuck_file_ends_when_its_run_is_signalled.node-test.ts:141, SIGTERM case:AssertionError: the run ended by SIGTERM exits with its base plus the signal's number,null !== 143. The SIGINT and SIGHUP siblings passed, and the same test passed in the job's first pass. Seen on the slower rented build00 box.a10a6e98into the shared-temp fold (martha#199)Attempt 1 of
the clean-install proof removes its container, recorded before its rerun, so the rerun cannot hide it.ci.yml) onacc38f08, job 22435, 05:19:42Z–05:44:07Z, exitcode 1.the self-test: the run never reached both-members-started within the windowthe self-test: a run stopped with both members up did not say which signal ended itthe self-test: interrupted-with-both-members-up opened no terminal for reviewerThe first is the cause and the other two are its consequences:
prove_a_clean_install_in_a_throwaway_container.sh:1832signals the script's own run at the stepboth-members-started, and the helper waits for that step in a fixed window (INTERRUPT_STEP_POLLS=250× 0.2 s = 50 s) before it gives up. Everything else in run 5329 is green,gate coverageincluded.Mars ruled it the clean-install self-test stall family, not this diff: the script's self-test drives it against stand-ins and never reaches the temp-root wrapper this branch changes.
Refs #226.