test/system: Test that group and user IDs work#1355
Merged
debarshiray merged 1 commit intocontainers:mainfrom Aug 22, 2023
Merged
test/system: Test that group and user IDs work#1355debarshiray merged 1 commit intocontainers:mainfrom
debarshiray merged 1 commit intocontainers:mainfrom
Conversation
These tests assume that the group and user information on the host operating system can be provided by different plugins for the GNU Name Service Switch (or NSS) functionality of the GNU C Library. eg., on enterprise FreeIPA set-ups. However, it's expected that everything inside the Toolbx container will be provided by /etc/group, /etc/passwd, /etc/shadow, etc.. While /etc/group and /etc/passwd can be read by any user, /etc/shadow can only be read by root. However, it's awkward to use sudo(8) in the test cases involving /etc/shadow, because they ensure that root and $USER don't need passwords to authenticate inside the container, and sudo(8) itself depends on that. If sudo(8) is used, the test suite can behave unexpectedly if Toolbx didn't set up the container correctly. eg., it can get blocked waiting for a password. Hence, 'podman unshare' is used instead to enter the container's initial user namespace, where $USER from the host appears as root. This is sufficient because the test cases only need to read /etc/shadow inside the Toolbx container. containers#1355
bb31e5b to
58134f8
Compare
|
Build failed. ❌ unit-test RETRY_LIMIT in 35s |
Member
Author
|
The tests run on Fedora Rawhide nodes are failing because of the same reasons as in #1344 and #1331 , and the root cause appears to be rsync: https://bugzilla.redhat.com/show_bug.cgi?id=2229654 So, I am going to temporarily ignore these test failures on Fedora Rawhide. |
debarshiray
commented
Nov 30, 2023
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
These tests assume that the group and user information on the host operating system can be provided by different plugins for the GNU Name Service Switch (or NSS) functionality of the GNU C Library. eg., on enterprise FreeIPA set-ups. However, it's expected that everything inside the Toolbx container will be provided by
/etc/group,/etc/passwd,/etc/shadow, etc..While
/etc/groupand/etc/passwdcan be read by any user,/etc/shadowcan only be read by root. However, it's awkward to usesudo(8)in the test cases involving/etc/shadow, because they ensure thatrootand$USERdon't need passwords to authenticate inside the container, andsudo(8)itself depends on that. Ifsudo(8)is used, the test suite can behave unexpectedly if Toolbx didn't set up the container correctly. eg., it can get blocked waiting for a password.Hence,
podman unshareis used instead to enter the container's initial user namespace, where$USERfrom the host appears asroot. This is sufficient because the test cases only need to read/etc/shadowinside the Toolbx container.