mirror of
https://git.savannah.gnu.org/git/guix.git
synced 2026-04-06 13:10:33 +02:00
syscalls: Add ‘unshare’.
* guix/build/syscalls.scm (unshare): New procedure. Change-Id: I344273b8bdeaa9366334e6e20ee7efc37eb6c8f7
This commit is contained in:
@@ -149,6 +149,15 @@
|
||||
((_ . status)
|
||||
(= 42 (status:exit-val status))))))))
|
||||
|
||||
(test-equal "unshare"
|
||||
EPERM
|
||||
;; Unless running as root, (unshare CLONE_NEWNS) returns EPERM.
|
||||
(catch 'system-error
|
||||
(lambda ()
|
||||
(unshare CLONE_NEWNS))
|
||||
(lambda args
|
||||
(system-error-errno args))))
|
||||
|
||||
(unless perform-container-tests?
|
||||
(test-skip 1))
|
||||
(test-assert "setns"
|
||||
|
||||
Reference in New Issue
Block a user