Repository navigation
fix: master CI red (macOS kill tests, trap-signal-matrix golden) - #1711
Merged
Merged
Conversation
Two of the three red jobs on master, both verified locally:
1. Rust tests (macOS): posix_sigspec_tests hardcoded the Linux
SIGUSR1 number (10) in mixed_case_prefixed_names_translate and
mixed_case_prefixed_specs_decode. The SIGNALS table itself is
cfg-gated per platform (USR1 is 10 on Linux/Android, 30 on
macOS/FreeBSD), so the implementation was right and the tests
were wrong. Both expectations now follow libc::SIGUSR1.
2. GNU regression goldens (trap-signal-matrix): a compound
background body ({ trap ... INT; sleep 2; } &) could no longer
trap INT/QUIT. The #1035 async-child entry ignore (SIG_IGN at
spawn, mimicking GNU setup_async_signals) was folded by
seed_startup_traps into ORIG_IGN, making set_trap a silent
no-op (SIG_HARD_IGNORE) — defeating the spawn site's own design
("compound bodies stay trappable; only the kernel ignore, which
a later trap overrides"). GNU's forked async child lists
`trap -- '' SIGINT` yet still lets a later trap override it
(trap.c ASYNCSIG special-case). Fix: apply_async_child_entry_ignores
records an async-child marker; the entry fold skips INT/QUIT
for async children (exec-like bodies still arrive hard via the
ORIG_IGN transport, so background_script_cannot_trap_entry_ignored_int
still passes); seed_startup_traps then seeds plain empty entries
for async INT/QUIT after the ORIG_IGN-promoting loop, so
`trap -p` keeps listing them without making them hard.
Verification: golden_trap_signal_matrix passes; the whole
issue1035_1036 file passes (9/9, incl. the exec-body refusal);
cargo test --lib is 771 passed + the 1 pre-existing baseline
failure (ownership_unary_operators_check_existing_file, fails on
clean master too).
The two posix_sigspec_tests used libc::SIGUSR1 to follow the platform USR1 number (10 on Linux/Android, 30 on macOS/FreeBSD). The test module also compiles on Windows, where libc is a unix-only dependency, so the goldens job (which runs cargo test --lib first) failed to compile on windows-latest with E0433 before any golden ran. Replace both uses with cfg-selected literals: macOS/FreeBSD 30, everything else 10 (the not(unix) SIGNALS table speaks Linux numbering by design and carries USR1 as 10).
Member
|
Verification complete on two master baselines (7fafd23 and fafdd35 + this PR):
One blocking nit, in code this PR itself adds: |
Fixup on top of the PR's own hunk only; the two remaining rustfmt diffs in this file are pre-existing master drift.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes two of the three red jobs on master (38062f5), each with a distinct root cause.
1. Rust tests (macOS): kill sigspec tests hardcoded Linux SIGUSR1
posix_sigspec_tests::mixed_case_prefixed_names_translateandmixed_case_prefixed_specs_decodeexpectedsigusr1 -> 10. The SIGNALS table itself is cfg-gated per platform (USR1 is 10 on Linux/Android, 30 on macOS/FreeBSD), so the implementation was right and the tests were wrong. Both expectations now followlibc::SIGUSR1.2. GNU goldens: trap-signal-matrix (async-child trap regression)
A compound background body (
{ trap ... INT; sleep 2; } &) could no longer trap INT/QUIT. The #1035 async-child entry ignore (SIG_IGN at spawn, mimicking GNUsetup_async_signals) was folded byseed_startup_trapsinto ORIG_IGN, makingset_trapa silent no-op (SIG_HARD_IGNORE) — defeating the spawn site's own design ("compound bodies stay trappable; only the kernel ignore, which a later trap overrides"). GNU's forked async child liststrap -- '' SIGINTyet still lets a later trap override it (trap.c ASYNCSIG special-case).Fix:
apply_async_child_entry_ignoresrecords an async-child marker; the entry fold skips INT/QUIT for async children (exec-like bodies still arrive hard via the ORIG_IGN transport, sobackground_script_cannot_trap_entry_ignored_intstill passes);seed_startup_trapsthen seeds plain empty entries for async INT/QUIT after the ORIG_IGN-promoting loop, sotrap -pkeeps listing them without making them hard.Verification (local, Linux)
golden_trap_signal_matrix: pass;issue1035_1036file: 9/9 (incl. the exec-body refusal).cargo test --lib: 771 passed + 1 pre-existing baseline failure (ownership_unary_operators_check_existing_file, fails on clean master too).Not in this PR
fix-ci-master-redand cannot be pushed with the currentghtoken, which lacks theworkflowscope — pushing any ref that touches.github/workflows/ci.ymlis rejected. It will follow once the token is refreshed with that scope.Follow-up fix (8aad5fe): Windows compile break in the kill tests
The first version used
libc::SIGUSR1in the two posix_sigspec tests. The test module also compiles on Windows, where libc is a unix-only dependency, so the goldens job (which runscargo test --libfirst) failed with E0433 before any golden ran. Replaced with cfg-selected literals: 30 on macOS/FreeBSD, 10 elsewhere (thenot(unix)SIGNALS table speaks Linux numbering and carries USR1 as 10).