Skip to content

Conversation

@Vesal-J
Copy link
Contributor

@Vesal-J Vesal-J commented Nov 15, 2025

Fixes #9250

…e` function. Add tests for comma-separated mode handling in file and directory creation.

/// Takes a user-supplied string and tries to parse to u16 mode bitmask.
/// Supports comma-separated mode strings like "ug+rwX,o+rX" (same as chmod).
pub fn parse(mode_string: &str, considering_dir: bool, umask: u32) -> Result<u32, String> {
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe write a unit test for this function :)

…g numeric, symbolic, and mixed modes, as well as handling of invalid inputs and umask considerations.
@Vesal-J
Copy link
Contributor Author

Vesal-J commented Nov 15, 2025

is this error relevant to my changes?

@oech3
Copy link
Contributor

oech3 commented Nov 16, 2025

is this error relevant to my changes?

No space left on device?

@codspeed-hq
Copy link

codspeed-hq bot commented Nov 16, 2025

CodSpeed Performance Report

Merging #9298 will improve performances by 8.57%

Comparing Vesal-J:vesal/fix-multiple-modes-install (c4c78ba) with main (58ebeaf)

Summary

⚡ 1 improvement
✅ 123 untouched
⏩ 5 skipped1

Benchmarks breakdown

Benchmark BASE HEAD Change
factor_table 201.4 ms 185.5 ms +8.57%

Footnotes

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

@github-actions
Copy link

GNU testsuite comparison:

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

@sylvestre
Copy link
Contributor

thanks!

It seems that mknod, mkfifo, and mkdir also supports this. I am not sure we support that if you want to have a look :)

@sylvestre sylvestre merged commit 7478749 into uutils:main Nov 17, 2025
126 checks passed
@Vesal-J
Copy link
Contributor Author

Vesal-J commented Nov 17, 2025

Sure

hubot pushed a commit to coreutils/coreutils that referenced this pull request Nov 18, 2025
Identified here:
<uutils/coreutils#9298>

* tests/install/basic-1.sh: Add the check.
naoNao89 pushed a commit to naoNao89/coreutils that referenced this pull request Nov 24, 2025
…ll command (uutils#9298)

* Enhance mode parsing to support comma-separated mode strings in `parse` function. Add tests for comma-separated mode handling in file and directory creation.

* Add comprehensive tests for mode parsing in `parse` function, covering numeric, symbolic, and mixed modes, as well as handling of invalid inputs and umask considerations.

---------

Co-authored-by: Sylvestre Ledru <[email protected]>
romanstingler pushed a commit to romanstingler/coreutils that referenced this pull request Dec 14, 2025
…ll command (uutils#9298)

* Enhance mode parsing to support comma-separated mode strings in `parse` function. Add tests for comma-separated mode handling in file and directory creation.

* Add comprehensive tests for mode parsing in `parse` function, covering numeric, symbolic, and mixed modes, as well as handling of invalid inputs and umask considerations.

---------

Co-authored-by: Sylvestre Ledru <[email protected]>
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.

install accepts only singular mode, not comma separated as for chmod

3 participants