-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
uucore: mode parsing: support comma-separated modes #9578
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
GNU testsuite comparison: |
68bc4f6 to
25beb72
Compare
|
https://github.com/uutils/coreutils/pull/9298/files I implemented it here for install. Maybe adjust the code |
25beb72 to
3d49bb8
Compare
|
GNU testsuite comparison: |
Parsing in uucore::mode did not support multiple mode chunks separated by commas, e.g. "ug+rw,o+r"
3d49bb8 to
11e77c7
Compare
|
GNU testsuite comparison: |
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. |
|
In this pr, so that we can see we aren't regressing |
|
for each programs, please add tests in tests/by-util/ |
|
GNU testsuite comparison: |
|
Added tests for mknod and mkfifo. For install and mkdir there were already tests available for comma-separated mode strings. |
|
GNU testsuite comparison: |
|
thanks! |
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