id: Don't treat unresolved IDs as error by default#12252
Conversation
|
could you please add a test to make sure we don't regress? thanks |
Any idea how I can test the behavior in the context of a non-existing UID/GID? Are there existing tests that test similar scenarios? edit: I think I have a solution, will update the PR |
|
GNU testsuite comparison: |
ffdfbfe to
54ecbc0
Compare
| .code_is(exp_result.code()); | ||
| } | ||
|
|
||
| // requiring root permissions. |
There was a problem hiding this comment.
I'll fix this in the follow-up PR to address GID deduplication.
|
You cannot use |
|
Then the test should just short-circuit in CI. That way at least we have a way to test the desired behavior locally. |
|
@sylvestre WDYT? One of the CI Checks failed for unrelated reasons (timeout) |
|
Would you add to one of the *.yml to catch regression? |
54ecbc0 to
3d429e9
Compare
|
@oech3 thanks, didn't realize this was an option on GitHub CI.
|
This brings the behavior of `id` in line with GNU coreutils, which only treats unresolved IDs as errors when providing any of the `-u`, `-g` or `-G` flags in combination with `-n`. Fixes: uutils#12246 Signed-off-by: Manuel Hutter <manuel@hutter.io>
Signed-off-by: Manuel Hutter <manuel@hutter.io>
3d429e9 to
6416599
Compare
This brings the behavior of
idin line with GNU coreutils, which only treats unresolved IDs as errors when providing any of the-u,-gor-Gflags in combination with-n.Fixes: #12246