Skip to content

tests/mkfifo: added a test to check mkfifo permission denied error for code coverage#9586

Merged
cakebaker merged 2 commits into
uutils:mainfrom
asder8215:test/mkfifo-cov
Dec 7, 2025
Merged

tests/mkfifo: added a test to check mkfifo permission denied error for code coverage#9586
cakebaker merged 2 commits into
uutils:mainfrom
asder8215:test/mkfifo-cov

Conversation

@asder8215

Copy link
Copy Markdown
Contributor

This PR introduces a test case that provides code coverage for the following lines in uu/mkfifo/src/mkfifo.rs:

        // Explicitly set the permissions to ignore umask
        if let Err(e) = fs::set_permissions(&f, fs::Permissions::from_mode(mode)) {
            return Err(USimpleError::new(
                1,
                translate!("mkfifo-error-cannot-set-permissions", "path" => f.quote(), "error" => e),
            ));
        }

With this, it should complete #9059 and we should have 100% code coverage for mkfifo.rs.

@github-actions

github-actions Bot commented Dec 7, 2025

Copy link
Copy Markdown

GNU testsuite comparison:

Skipping an intermittent issue tests/tail/overlay-headers (passes in this run but fails in the 'main' branch)

@codspeed-hq

codspeed-hq Bot commented Dec 7, 2025

Copy link
Copy Markdown

CodSpeed Performance Report

Merging #9586 will improve performances by 2.13%

Comparing asder8215:test/mkfifo-cov (09f7c5d) with main (7c62885)

Summary

⚡ 1 improvement
✅ 126 untouched
⏩ 6 skipped1

Benchmarks breakdown

Benchmark BASE HEAD Change
tsort_input_parsing_heavy[5000] 83.8 ms 82.1 ms +2.13%

Footnotes

  1. 6 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.

@cakebaker cakebaker merged commit 345f2cc into uutils:main Dec 7, 2025
127 checks passed
@cakebaker

Copy link
Copy Markdown
Contributor

Thanks!

@sylvestre

Copy link
Copy Markdown
Contributor

kudos!

@asder8215 asder8215 deleted the test/mkfifo-cov branch December 7, 2025 18:06
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.

3 participants