Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@martinkunkel2
Copy link
Contributor

@martinkunkel2 martinkunkel2 commented Dec 6, 2025

Parsing in uucore::mode did not support multiple mode chunks separated by commas, e.g. "ug+rw,o+r"
The function uucore::mode::parse_mode was only used in mknod causing #9551.

With this pull request, the tests and the parsing function from install are moved to uucore::mode.
install, mkdir, mkfifo, mknod are all calling the same method now.

This fixes #9551

@github-actions
Copy link

github-actions bot commented Dec 6, 2025

GNU testsuite comparison:

Congrats! The gnu test tests/du/files0-from is no longer failing!

@martinkunkel2 martinkunkel2 force-pushed the mknod-multiple-modes branch 2 times, most recently from 68bc4f6 to 25beb72 Compare December 6, 2025 11:25
@sylvestre
Copy link
Contributor

https://github.com/uutils/coreutils/pull/9298/files I implemented it here for install. Maybe adjust the code

@github-actions
Copy link

github-actions bot commented Dec 6, 2025

GNU testsuite comparison:

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

Parsing in uucore::mode did not support multiple mode chunks separated
by commas, e.g. "ug+rw,o+r"
@github-actions
Copy link

github-actions bot commented Dec 6, 2025

GNU testsuite comparison:

Congrats! The gnu test tests/du/files0-from is no longer failing!

@martinkunkel2
Copy link
Contributor Author

https://github.com/uutils/coreutils/pull/9298/files I implemented it here for install. Maybe adjust the code

Excellent. Especially the extensive unit testing. I think we should be able to move your method including the unit tests to uucore::mode and then call it from all the other tools which needs mode parsing.

I am not sure if this should be done with this Pull Request or on a follow-up change.
@sylvestre What do you think?

@sylvestre
Copy link
Contributor

In this pr, so that we can see we aren't regressing

@sylvestre
Copy link
Contributor

for each programs, please add tests in tests/by-util/
thanks

@github-actions
Copy link

github-actions bot commented Dec 6, 2025

GNU testsuite comparison:

Skip an intermittent issue tests/tail/overlay-headers (fails in this run but passes in the 'main' branch)
Congrats! The gnu test tests/tty/tty-eof is no longer failing!

@martinkunkel2
Copy link
Contributor Author

Added tests for mknod and mkfifo. For install and mkdir there were already tests available for comma-separated mode strings.

@github-actions
Copy link

github-actions bot commented Dec 6, 2025

GNU testsuite comparison:

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

@sylvestre sylvestre merged commit 7c62885 into uutils:main Dec 6, 2025
127 checks passed
@sylvestre
Copy link
Contributor

thanks!

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.

mknod: --mode='ug+rw,o+r' f4 p fails

2 participants