Skip to content

Move UmaskGuard in uucore and use it for mkdir, mkfifo & mknod#10310

Open
sylvestre wants to merge 5 commits into
uutils:mainfrom
sylvestre:followup-10036
Open

Move UmaskGuard in uucore and use it for mkdir, mkfifo & mknod#10310
sylvestre wants to merge 5 commits into
uutils:mainfrom
sylvestre:followup-10036

Conversation

@sylvestre

Copy link
Copy Markdown
Contributor

followup of #10036

@codspeed-hq

codspeed-hq Bot commented Jan 18, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 323 untouched benchmarks
⏩ 46 skipped benchmarks1


Comparing sylvestre:followup-10036 (df0eecc) with main (80cc829)2

Open in CodSpeed

Footnotes

  1. 46 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

  2. No successful run was found on main (47d7c76) during the generation of this report, so 80cc829 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

@github-actions

Copy link
Copy Markdown

GNU testsuite comparison:

Skipping an intermittent issue tests/tty/tty-eof (passes in this run but fails in the 'main' branch)

@github-actions

Copy link
Copy Markdown

GNU testsuite comparison:

Skipping an intermittent issue tests/shuf/shuf-reservoir (passes in this run but fails in the 'main' branch)
Skipping an intermittent issue tests/sort/sort-stale-thread-mem (passes in this run but fails in the 'main' branch)
Congrats! The gnu test tests/ptx/ptx-overrun is no longer failing!

}

#[test]
#[cfg(unix)]

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This test is failing because the coverage tests use -Cpanic=abort so they don't have catch_unwind

You can add:

#[cfg(panic = "unwind")]

@ChrisDryden

Copy link
Copy Markdown
Collaborator

I think we have to be careful adding umask integration tests when its running multi-threaded because the UMaskGuard affects the process, when stress testing it the tests were flaky. Maybe adding a Mutex in the unit tests?

Might be good to add a comment in the helper function:

  /// Note: umask is process-wide, so this guard is not thread-safe.
  /// Concurrent use from multiple threads will cause race conditions.

@github-actions

Copy link
Copy Markdown

GNU testsuite comparison:

Skipping an intermittent issue tests/shuf/shuf-reservoir (passes in this run but fails in the 'main' branch)
Skipping an intermittent issue tests/sort/sort-stale-thread-mem (passes in this run but fails in the 'main' branch)

sylvestre added a commit to sylvestre/coreutils that referenced this pull request Feb 14, 2026
Address review feedback from PR uutils#10310:
- Add thread-safety warning to UmaskGuard documentation
- Add mutex to serialize umask tests to prevent flaky behavior
- Fix missing libc import in mkfifo
@ChrisDryden

Copy link
Copy Markdown
Collaborator

Lgtm just has conflicts

@github-actions

github-actions Bot commented Jun 8, 2026

Copy link
Copy Markdown

GNU testsuite comparison:

Skip an intermittent issue tests/date/date-locale-hour (fails in this run but passes in the 'main' branch)
Skip an intermittent issue tests/misc/tty-eof (fails in this run but passes in the 'main' branch)
Skipping an intermittent issue tests/tail/tail-n0f (passes in this run but fails in the 'main' branch)
Congrats! The gnu test tests/seq/seq-epipe is now passing!

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.

2 participants