test-name: call-with-container, exit with 0 when there is no error location: /home/alexvong1995/scm/guix/tests/containers.scm:38 source: + (test-assert + "call-with-container, exit with 0 when there is no error" + (zero? (call-with-container + '() + (const #t) + #:namespaces + '(user)))) result: SKIP test-name: call-with-container, user namespace location: /home/alexvong1995/scm/guix/tests/containers.scm:42 source: + (test-assert + "call-with-container, user namespace" + (zero? (call-with-container + '() + (lambda () + (assert-exit + (and (zero? (getuid)) (zero? (getgid))))) + #:namespaces + '(user)))) result: SKIP test-name: call-with-container, uts namespace location: /home/alexvong1995/scm/guix/tests/containers.scm:50 source: + (test-assert + "call-with-container, uts namespace" + (zero? (call-with-container + '() + (lambda () + (sethostname "test-container") + (primitive-exit 0)) + #:namespaces + '(user uts)))) result: SKIP test-name: call-with-container, pid namespace location: /home/alexvong1995/scm/guix/tests/containers.scm:60 source: + (test-assert + "call-with-container, pid namespace" + (zero? (call-with-container + '() + (lambda () + (match (primitive-fork) + (0 (assert-exit (= 2 (getpid)))) + (pid (primitive-exit + (match (waitpid pid) + ((_ . status) + (status:exit-val status))))))) + #:namespaces + '(user pid)))) result: SKIP test-name: call-with-container, mnt namespace location: /home/alexvong1995/scm/guix/tests/containers.scm:75 source: + (test-assert + "call-with-container, mnt namespace" + (zero? (call-with-container + '(("none" device "/testing" "tmpfs" () #f #f)) + (lambda () + (assert-exit (file-exists? "/testing"))) + #:namespaces + '(user mnt)))) result: SKIP test-name: call-with-container, mnt namespace, wrong bind mount location: /home/alexvong1995/scm/guix/tests/containers.scm:82 source: + (test-equal + "call-with-container, mnt namespace, wrong bind mount" + `(system-error ,ENOENT) + (catch 'system-error + (lambda () + (call-with-container + '(("/does-not-exist" + device + "/foo" + "none" + (bind-mount) + #f + #f)) + (const #t) + #:namespaces + '(user mnt))) + (lambda args + (list 'system-error (system-error-errno args))))) result: SKIP test-name: call-with-container, all namespaces location: /home/alexvong1995/scm/guix/tests/containers.scm:94 source: + (test-assert + "call-with-container, all namespaces" + (zero? (call-with-container + '() + (lambda () (primitive-exit 0))))) result: SKIP test-name: container-excursion location: /home/alexvong1995/scm/guix/tests/containers.scm:100 source: + (test-assert + "container-excursion" + (call-with-temporary-directory + (lambda (root) + (match (list (pipe) (pipe)) + (((start-in . start-out) (end-in . end-out)) + (define (container) + (close end-out) + (close start-in) + (write 'ready start-out) + (close start-out) + (read end-in) + (close end-in)) + (define (namespaces pid) + (let ((pid (number->string pid))) + (map (lambda (ns) + (readlink (string-append "/proc/" pid "/ns/" ns))) + '("user" "ipc" "uts" "net" "pid" "mnt")))) + (let* ((pid (run-container root '() %namespaces 1 container)) + (container-namespaces (namespaces pid)) + (result + (begin + (close start-out) + (read start-in) + (close start-in) + (container-excursion + pid + (lambda () + (match (primitive-fork) + (0 + (assert-exit + (equal? + container-namespaces + (namespaces (getpid))))) + (fork-pid + (match (waitpid fork-pid) + ((_ . status) + (primitive-exit + (status:exit-val + status))))))))))) + (close end-in) + (write 'done end-out) + (close end-out) + (waitpid pid) + (zero? result))))))) actual-value: #f actual-error: + (system-error + "clone" + "~d: ~A" + (2080505873 "Operation not permitted") + (1)) result: FAIL