Skip to content

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

Closed

Description

@abendrothj

test_stats_are_reported_when_a_write_fails and test_block_stats_are_reported_when_a_write_fails in test_dd.rs ignore SIGXFSZ with a guard that changes the disposition for the whole test binary and puts the default back on drop. Under cargo test they run in parallel, so when one restores the default, the other test's dd can be killed by SIGXFSZ before it prints its stats.

Running the test binary with --test-threads=2 on those two tests in a loop, 26 of 1000 runs failed with '' does not contain '1+1 records out'.

Activity

  1. oech3 commented on Oct 6, 2026

    @oech3
    Contributor

    If we adopted #15119 (comment) , the limit is naturally sandboxed for the process. Right?

  2. abendrothj commented on Oct 6, 2026

    @abendrothj
    ContributorAuthor

    Not quite: the limit is already set only in the child (UCommand::limit calls setrlimit in pre_exec). What leaks is the SIGXFSZ disposition, which these tests change in the test process itself. prlimit only sets limits, so dd would still be killed by SIGXFSZ. #15131 ignores the signal in the child's pre_exec instead.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions