Skip to content

tests: dd: ignore SIGXFSZ in the child instead of the test process - #15131

Merged
sylvestre merged 1 commit into
uutils:mainfrom
abendrothj:ucommand-ignore-sigxfsz
Oct 6, 2026
Merged

sylvestre merged 1 commit into
uutils:mainfrom
abendrothj:ucommand-ignore-sigxfsz

Conversation

@abendrothj

Copy link
Copy Markdown
Contributor

test_dd's two Fsize tests ignored SIGXFSZ with a guard that changed it for the whole test process and restored it on drop. cargo test runs them in parallel in one binary, so one test restoring the default could get the other test's dd killed before it printed its stats.

This adds UCommand::ignore_sigxfsz(), which ignores SIGXFSZ in the child's pre_exec, next to limit and umask, and the dd tests use it. With --test-threads=2 on those two tests, main failed 26 of 1000 runs and this branch 0 of 1000.

Split out of #15086, which also needs it.

Closes #15118

Add UCommand::ignore_sigxfsz, which ignores SIGXFSZ in the child's
pre_exec, so a test can push a utility past an Fsize limit and see the
failed write.

test_dd's two Fsize tests did this with a guard that changed SIGXFSZ for
the whole test process. Under cargo test they run in parallel in one
binary, and one test restoring the default could get the other's dd
killed before it printed its stats. Use the new method instead.
Copilot AI balanced review requested due to automatic review settings October 6, 2026 07:28

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Comment thread tests/uutests/src/lib/util.rs Resolved
@sylvestre
sylvestre merged commit d027897 into uutils:main Oct 6, 2026
88 checks passed
@sylvestre

Copy link
Copy Markdown
Contributor

Thanks for your PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

tests: test_dd's SIGXFSZ guard affects the whole test process

4 participants