-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Skip tests on systems with restricted usernamespaces #12051
Conversation
|
7613dd4
to
6642863
Compare
00e32c1
to
3b69081
Compare
🎉 All dependencies have been resolved ! |
…r namespaces Update tests/functional/common/functions.sh Co-authored-by: Robert Hensing <[email protected]>
@@ -345,4 +345,15 @@ count() { | |||
|
|||
trap onError ERR | |||
|
|||
requiresUnprivilegedUserNamespaces() { | |||
if [[ -f /proc/sys/kernel/apparmor_restrict_unprivileged_userns ]] && [[ $(< /proc/sys/kernel/apparmor_restrict_unprivileged_userns) -eq 1 ]]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test should also be added to userNamespacesSupported()
in src/libutil/linux/namespaces.cc
. In fact, if we check for it in Nix itself, then maybe the tests will succeed even if unprivileged user namespaces are restricted.
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/2024-12-16-nix-team-meeting-minutes-203/57483/1 |
Depends on #12050
This makes ci pass: https://github.com/NixOS/nix/actions/runs/12329995455/job/34414955507?pr=12051
even on systems that have restricted usernamespaces: 6642863