Paste number 158362: | tests/containers.scm failure |
Pasted by: | civodul |
When: | 6 years, 9 months ago |
Share: | Tweet this! | http://paste.lisp.org/+3E6Y |
Channel: | None |
Paste contents: |
%%%% Starting test containers Group begin: containers Test begin: test-name: "call-with-container, exit with 0 when there is no error" source-file: "tests/containers.scm" source-line: 37 source-form: (test-assert "call-with-container, exit with 0 when there is no error" (zero? (call-with-container (quote ()) (const #t) #:namespaces (quote (user))))) %%%% Starting test containers Group begin: containers Test begin: test-name: "call-with-container, exit with 0 when there is no error" source-file: "tests/containers.scm" source-line: 37 source-form: (test-assert "call-with-container, exit with 0 when there is no error" (zero? (call-with-container (quote ()) (const #t) #:namespaces (quote (user))))) Test end: result-kind: pass actual-value: #t Test begin: test-name: "call-with-container, user namespace" source-file: "tests/containers.scm" source-line: 41 source-form: (test-assert "call-with-container, user namespace" (zero? (call-with-container (quote ()) (lambda () (assert-exit (and (zero? (getuid)) (zero? (getgid))))) #:namespaces (quote (user))))) %%%% Starting test containers Group begin: containers Test begin: test-name: "call-with-container, exit with 0 when there is no error" source-file: "tests/containers.scm" source-line: 37 source-form: (test-assert "call-with-container, exit with 0 when there is no error" (zero? (call-with-container (quote ()) (const #t) #:namespaces (quote (user))))) Test end: result-kind: pass actual-value: #t Test begin: test-name: "call-with-container, user namespace" source-file: "tests/containers.scm" source-line: 41 source-form: (test-assert "call-with-container, user namespace" (zero? (call-with-container (quote ()) (lambda () (assert-exit (and (zero? (getuid)) (zero? (getgid))))) #:namespaces (quote (user))))) Test end: result-kind: pass actual-value: #t Test begin: test-name: "call-with-container, uts namespace" source-file: "tests/containers.scm" source-line: 49 source-form: (test-assert "call-with-container, uts namespace" (zero? (call-with-container (quote ()) (lambda () (sethostname "test-container") (primitive-exit 0)) #:namespaces (quote (user uts))))) %%%% Starting test containers Group begin: containers Test begin: test-name: "call-with-container, exit with 0 when there is no error" source-file: "tests/containers.scm" source-line: 37 source-form: (test-assert "call-with-container, exit with 0 when there is no error" (zero? (call-with-container (quote ()) (const #t) #:namespaces (quote (user))))) Test end: result-kind: pass actual-value: #t Test begin: test-name: "call-with-container, user namespace" source-file: "tests/containers.scm" source-line: 41 source-form: (test-assert "call-with-container, user namespace" (zero? (call-with-container (quote ()) (lambda () (assert-exit (and (zero? (getuid)) (zero? (getgid))))) #:namespaces (quote (user))))) Test end: result-kind: pass actual-value: #t Test begin: test-name: "call-with-container, uts namespace" source-file: "tests/containers.scm" source-line: 49 source-form: (test-assert "call-with-container, uts namespace" (zero? (call-with-container (quote ()) (lambda () (sethostname "test-container") (primitive-exit 0)) #:namespaces (quote (user uts))))) Test end: result-kind: pass actual-value: #t Test begin: test-name: "call-with-container, pid namespace" source-file: "tests/containers.scm" source-line: 59 source-form: (test-assert "call-with-container, pid namespace" (zero? (call-with-container (quote ()) (lambda () (match (primitive-fork) (0 (assert-exit (= 2 (getpid)))) (pid (primitive-exit (match (waitpid pid) ((_ . status) (status:exit-val status))))))) #:namespaces (quote (user pid))))) %%%% Starting test containers Group begin: containers Test begin: test-name: "call-with-container, exit with 0 when there is no error" source-file: "tests/containers.scm" source-line: 37 source-form: (test-assert "call-with-container, exit with 0 when there is no error" (zero? (call-with-container (quote ()) (const #t) #:namespaces (quote (user))))) Test end: result-kind: pass actual-value: #t Test begin: test-name: "call-with-container, user namespace" source-file: "tests/containers.scm" source-line: 41 source-form: (test-assert "call-with-container, user namespace" (zero? (call-with-container (quote ()) (lambda () (assert-exit (and (zero? (getuid)) (zero? (getgid))))) #:namespaces (quote (user))))) Test end: result-kind: pass actual-value: #t Test begin: test-name: "call-with-container, uts namespace" source-file: "tests/containers.scm" source-line: 49 source-form: (test-assert "call-with-container, uts namespace" (zero? (call-with-container (quote ()) (lambda () (sethostname "test-container") (primitive-exit 0)) #:namespaces (quote (user uts))))) Test end: result-kind: pass actual-value: #t Test begin: test-name: "call-with-container, pid namespace" source-file: "tests/containers.scm" source-line: 59 source-form: (test-assert "call-with-container, pid namespace" (zero? (call-with-container (quote ()) (lambda () (match (primitive-fork) (0 (assert-exit (= 2 (getpid)))) (pid (primitive-exit (match (waitpid pid) ((_ . status) (status:exit-val status))))))) #:namespaces (quote (user pid))))) %%%% Starting test containers Group begin: containers Test begin: test-name: "call-with-container, exit with 0 when there is no error" source-file: "tests/containers.scm" source-line: 37 source-form: (test-assert "call-with-container, exit with 0 when there is no error" (zero? (call-with-container (quote ()) (const #t) #:namespaces (quote (user))))) Test end: result-kind: pass actual-value: #t Test begin: test-name: "call-with-container, user namespace" source-file: "tests/containers.scm" source-line: 41 source-form: (test-assert "call-with-container, user namespace" (zero? (call-with-container (quote ()) (lambda () (assert-exit (and (zero? (getuid)) (zero? (getgid))))) #:namespaces (quote (user))))) Test end: result-kind: pass actual-value: #t Test begin: test-name: "call-with-container, uts namespace" source-file: "tests/containers.scm" source-line: 49 source-form: (test-assert "call-with-container, uts namespace" (zero? (call-with-container (quote ()) (lambda () (sethostname "test-container") (primitive-exit 0)) #:namespaces (quote (user uts))))) Test end: result-kind: pass actual-value: #t Test begin: test-name: "call-with-container, pid namespace" source-file: "tests/containers.scm" source-line: 59 source-form: (test-assert "call-with-container, pid namespace" (zero? (call-with-container (quote ()) (lambda () (match (primitive-fork) (0 (assert-exit (= 2 (getpid)))) (pid (primitive-exit (match (waitpid pid) ((_ . status) (status:exit-val status))))))) #:namespaces (quote (user pid))))) Test end: result-kind: pass actual-value: #t Test begin: test-name: "call-with-container, mnt namespace" source-file: "tests/containers.scm" source-line: 74 source-form: (test-assert "call-with-container, mnt namespace" (zero? (call-with-container (quote (("none" device "/testing" "tmpfs" () #f #f))) (lambda () (assert-exit (file-exists? "/testing"))) #:namespaces (quote (user mnt))))) %%%% Starting test containers Group begin: containers Test begin: test-name: "call-with-container, exit with 0 when there is no error" source-file: "tests/containers.scm" source-line: 37 source-form: (test-assert "call-with-container, exit with 0 when there is no error" (zero? (call-with-container (quote ()) (const #t) #:namespaces (quote (user))))) Test end: result-kind: pass actual-value: #t Test begin: test-name: "call-with-container, user namespace" source-file: "tests/containers.scm" source-line: 41 source-form: (test-assert "call-with-container, user namespace" (zero? (call-with-container (quote ()) (lambda () (assert-exit (and (zero? (getuid)) (zero? (getgid))))) #:namespaces (quote (user))))) Test end: result-kind: pass actual-value: #t Test begin: test-name: "call-with-container, uts namespace" source-file: "tests/containers.scm" source-line: 49 source-form: (test-assert "call-with-container, uts namespace" (zero? (call-with-container (quote ()) (lambda () (sethostname "test-container") (primitive-exit 0)) #:namespaces (quote (user uts))))) Test end: result-kind: pass actual-value: #t Test begin: test-name: "call-with-container, pid namespace" source-file: "tests/containers.scm" source-line: 59 source-form: (test-assert "call-with-container, pid namespace" (zero? (call-with-container (quote ()) (lambda () (match (primitive-fork) (0 (assert-exit (= 2 (getpid)))) (pid (primitive-exit (match (waitpid pid) ((_ . status) (status:exit-val status))))))) #:namespaces (quote (user pid))))) Test end: result-kind: pass actual-value: #t Test begin: test-name: "call-with-container, mnt namespace" source-file: "tests/containers.scm" source-line: 74 source-form: (test-assert "call-with-container, mnt namespace" (zero? (call-with-container (quote (("none" device "/testing" "tmpfs" () #f #f))) (lambda () (assert-exit (file-exists? "/testing"))) #:namespaces (quote (user mnt))))) Test end: result-kind: pass actual-value: #t Test begin: test-name: "call-with-container, all namespaces" source-file: "tests/containers.scm" source-line: 81 source-form: (test-assert "call-with-container, all namespaces" (zero? (call-with-container (quote ()) (lambda () (primitive-exit 0))))) %%%% Starting test containers Group begin: containers Test begin: test-name: "call-with-container, exit with 0 when there is no error" source-file: "tests/containers.scm" source-line: 37 source-form: (test-assert "call-with-container, exit with 0 when there is no error" (zero? (call-with-container (quote ()) (const #t) #:namespaces (quote (user))))) Test end: result-kind: pass actual-value: #t Test begin: test-name: "call-with-container, user namespace" source-file: "tests/containers.scm" source-line: 41 source-form: (test-assert "call-with-container, user namespace" (zero? (call-with-container (quote ()) (lambda () (assert-exit (and (zero? (getuid)) (zero? (getgid))))) #:namespaces (quote (user))))) Test end: result-kind: pass actual-value: #t Test begin: test-name: "call-with-container, uts namespace" source-file: "tests/containers.scm" source-line: 49 source-form: (test-assert "call-with-container, uts namespace" (zero? (call-with-container (quote ()) (lambda () (sethostname "test-container") (primitive-exit 0)) #:namespaces (quote (user uts))))) Test end: result-kind: pass actual-value: #t Test begin: test-name: "call-with-container, pid namespace" source-file: "tests/containers.scm" source-line: 59 source-form: (test-assert "call-with-container, pid namespace" (zero? (call-with-container (quote ()) (lambda () (match (primitive-fork) (0 (assert-exit (= 2 (getpid)))) (pid (primitive-exit (match (waitpid pid) ((_ . status) (status:exit-val status))))))) #:namespaces (quote (user pid))))) Test end: result-kind: pass actual-value: #t Test begin: test-name: "call-with-container, mnt namespace" source-file: "tests/containers.scm" source-line: 74 source-form: (test-assert "call-with-container, mnt namespace" (zero? (call-with-container (quote (("none" device "/testing" "tmpfs" () #f #f))) (lambda () (assert-exit (file-exists? "/testing"))) #:namespaces (quote (user mnt))))) Test end: result-kind: pass actual-value: #t Test begin: test-name: "call-with-container, all namespaces" source-file: "tests/containers.scm" source-line: 81 source-form: (test-assert "call-with-container, all namespaces" (zero? (call-with-container (quote ()) (lambda () (primitive-exit 0))))) Test end: result-kind: fail actual-value: #f Test begin: test-name: "container-excursion" source-file: "tests/containers.scm" source-line: 87 source-form: (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 (quote 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))) (quote ("user" "ipc" "uts" "net" "pid" "mnt"))))) (let* ((pid (run-container root (quote ()) %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 (quote done) end-out) (close end-out) (waitpid pid) (zero? result))))))) %%%% Starting test containers Group begin: containers Test begin: test-name: "call-with-container, exit with 0 when there is no error" source-file: "tests/containers.scm" source-line: 37 source-form: (test-assert "call-with-container, exit with 0 when there is no error" (zero? (call-with-container (quote ()) (const #t) #:namespaces (quote (user))))) Test end: result-kind: pass actual-value: #t Test begin: test-name: "call-with-container, user namespace" source-file: "tests/containers.scm" source-line: 41 source-form: (test-assert "call-with-container, user namespace" (zero? (call-with-container (quote ()) (lambda () (assert-exit (and (zero? (getuid)) (zero? (getgid))))) #:namespaces (quote (user))))) Test end: result-kind: pass actual-value: #t Test begin: test-name: "call-with-container, uts namespace" source-file: "tests/containers.scm" source-line: 49 source-form: (test-assert "call-with-container, uts namespace" (zero? (call-with-container (quote ()) (lambda () (sethostname "test-container") (primitive-exit 0)) #:namespaces (quote (user uts))))) Test end: result-kind: pass actual-value: #t Test begin: test-name: "call-with-container, pid namespace" source-file: "tests/containers.scm" source-line: 59 source-form: (test-assert "call-with-container, pid namespace" (zero? (call-with-container (quote ()) (lambda () (match (primitive-fork) (0 (assert-exit (= 2 (getpid)))) (pid (primitive-exit (match (waitpid pid) ((_ . status) (status:exit-val status))))))) #:namespaces (quote (user pid))))) Test end: result-kind: pass actual-value: #t Test begin: test-name: "call-with-container, mnt namespace" source-file: "tests/containers.scm" source-line: 74 source-form: (test-assert "call-with-container, mnt namespace" (zero? (call-with-container (quote (("none" device "/testing" "tmpfs" () #f #f))) (lambda () (assert-exit (file-exists? "/testing"))) #:namespaces (quote (user mnt))))) Test end: result-kind: pass actual-value: #t Test begin: test-name: "call-with-container, all namespaces" source-file: "tests/containers.scm" source-line: 81 source-form: (test-assert "call-with-container, all namespaces" (zero? (call-with-container (quote ()) (lambda () (primitive-exit 0))))) Test end: result-kind: fail actual-value: #f Test begin: test-name: "container-excursion" source-file: "tests/containers.scm" source-line: 87 source-form: (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 (quote 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))) (quote ("user" "ipc" "uts" "net" "pid" "mnt"))))) (let* ((pid (run-container root (quote ()) %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 (quote done) end-out) (close end-out) (waitpid pid) (zero? result)))))))
This paste has no annotations.