Skip to content

fix(test): run the run_custom SIGTERM test in its own process - #4417

Merged
max-sixty merged 1 commit into
mainfrom
fix/issue-4416
Oct 11, 2026
Merged

max-sixty merged 1 commit into
mainfrom
fix/issue-4416

Conversation

@worktrunk-bot

Copy link
Copy Markdown
Collaborator

run_custom_propagates_signal_exit_code runs a child that dies of SIGTERM, and wait_foreground_child then calls cancel_foreground(SIGTERM), which marks every live foreground scope in the process as interrupted. When run_custom_spawn_failure_resolves_trace (or any other test in the wt binary that installs ForegroundSignals, such as the output::concurrent tests) had installed its scope but not yet spawned, its spawn error came back as WorktrunkError::Interrupted ("Terminated"). The signal test now re-execs the test binary filtered to itself, the same isolation signal_forwarder's operation-lifetime test uses, so its process-wide cancellation can't reach a sibling test. Production code is unchanged.

Looping the commands::custom tests 200 times failed 16 times before this change and 0 times after it.

Closes #4416 — automated triage

A child killed by SIGTERM publishes cancellation to every live foreground
scope in the process, so a concurrently running test between
ForegroundSignals::install() and spawn saw its spawn error as an
interruption. Re-exec the signal test alone, as signal_forwarder's
operation-lifetime test already does.

Closes #4416
@worktrunk-bot worktrunk-bot added the automated-fix Automated CI fix label Oct 11, 2026
@max-sixty
max-sixty merged commit d4c147e into main Oct 11, 2026
37 of 47 checks passed
@max-sixty
max-sixty deleted the fix/issue-4416 branch October 11, 2026 04:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

automated-fix Automated CI fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

run_custom_spawn_failure_resolves_trace flakes: sibling test's SIGTERM leaks through global signal state

2 participants