Skip to content

chgrp: fix error message for --from nonexisting_group GROUP#13490

Open
cakebaker wants to merge 3 commits into
uutils:mainfrom
cakebaker:chgrp_fix_test
Open

chgrp: fix error message for --from nonexisting_group GROUP#13490
cakebaker wants to merge 3 commits into
uutils:mainfrom
cakebaker:chgrp_fix_test

Conversation

@cakebaker

@cakebaker cakebaker commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

I noticed that test_from_with_invalid_group fails on my machine with Arch Linux whereas it works in the CI. The reason was that the test assumed a "staff" group exists, which is not the case on Arch Linux, and so the code didn't return the expected error message.

This PR applies three changes:

  • in the test, it uses "nobody" as group that is assumed to exist
  • it ensures the error message is the same for --from nonexisting_group GROUP, independent of whether GROUP exists
  • in the test, it removes unreachable code on Android

because "staff" doesn't exist on Arch Linux and so
test_from_with_invalid_group fails there
and show the same msg for "--from nonexisting GROUP", independent of whether GROUP exists
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.

1 participant