1
0
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:
Ludovic Courtès
2025-03-25 16:51:59 +01:00
parent 78f493dcf8
commit c990405607
2 changed files with 27 additions and 0 deletions

View File

@@ -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"