======================================= GNU Guix 0.10.0: ./test-suite.log ======================================= # TOTAL: 582 # PASS: 558 # SKIP: 15 # XFAIL: 0 # FAIL: 9 # XPASS: 0 # ERROR: 0 .. contents:: :depth: 2 SKIP: tests/base32 ================== sh: nix-hash: command not found test-name: bytevector->base32-string location: /home/alexvong1995/scm/guix/tests/base32.scm:48 source: + (test-assert + "bytevector->base32-string" + (fold (lambda (bv expected result) + (and result + (string=? + (bytevector->base32-string bv) + expected))) + #t + (map string->utf8 + '("" "f" "fo" "foo" "foob" "fooba" "foobar")) + '("" + "my" + "mzxq" + "mzxw6" + "mzxw6yq" + "mzxw6ytb" + "mzxw6ytboi"))) actual-value: #t result: PASS test-name: base32-string->bytevector location: /home/alexvong1995/scm/guix/tests/base32.scm:65 source: + (test-assert + "base32-string->bytevector" + (every (lambda (bv) + (equal? + (base32-string->bytevector + (bytevector->base32-string bv)) + bv)) + (map string->utf8 + '("" "f" "fo" "foo" "foob" "fooba" "foobar")))) actual-value: #t result: PASS test-name: nix-base32-string->bytevector location: /home/alexvong1995/scm/guix/tests/base32.scm:73 source: + (test-assert + "nix-base32-string->bytevector" + (every (lambda (bv) + (equal? + (nix-base32-string->bytevector + (bytevector->nix-base32-string bv)) + bv)) + (map string->utf8 + '("" "f" "fo" "foo" "foob" "fooba" "foobar")))) actual-value: #t result: PASS test-name: &invalid-base32-character location: /home/alexvong1995/scm/guix/tests/base32.scm:81 source: + (test-equal + "&invalid-base32-character" + #\e + (guard (c ((invalid-base32-character? c) + (invalid-base32-character-value c))) + (nix-base32-string->bytevector + (string-append (make-string 51 #\a) "e")))) expected-value: e actual-value: e result: PASS test-name: sha256 & bytevector->nix-base32-string location: /home/alexvong1995/scm/guix/tests/base32.scm:92 source: + (test-assert + "sha256 & bytevector->nix-base32-string" + (let ((file (search-path %load-path "tests/test.drv"))) + (equal? + (bytevector->nix-base32-string + (sha256 + (call-with-input-file file get-bytevector-all))) + (let* ((c (format + #f + "~a --type sha256 --base32 --flat \"~a\"" + %nix-hash + file)) + (p (open-input-pipe c)) + (l (read-line p))) + (close-pipe p) + l)))) result: SKIP FAIL: tests/substitute ====================== test-name: not a number location: /home/alexvong1995/scm/guix/tests/substitute.scm:100 source: + (test-equal + "not a number" + '(1 #t) + (let ((error-output (open-output-string))) + (parameterize + ((guix-warning-port error-output)) + (catch 'quit + (lambda () + (narinfo-signature->canonical-sexp + (signature-field "foo" #:version "not a number")) + #f) + (lambda (key value) + (list value + (let ((message (get-output-string error-output))) + (->bool + (string-match "signature version" message))))))))) expected-value: (1 #t) actual-value: (1 #t) result: PASS test-name: wrong version number location: /home/alexvong1995/scm/guix/tests/substitute.scm:105 source: + (test-equal + "wrong version number" + '(1 #t) + (let ((error-output (open-output-string))) + (parameterize + ((guix-warning-port error-output)) + (catch 'quit + (lambda () + (narinfo-signature->canonical-sexp + (signature-field "foo" #:version "2")) + #f) + (lambda (key value) + (list value + (let ((message (get-output-string error-output))) + (->bool + (string-match + "unsupported.*version" + message))))))))) expected-value: (1 #t) actual-value: (1 #t) result: PASS test-name: valid narinfo-signature->canonical-sexp location: /home/alexvong1995/scm/guix/tests/substitute.scm:110 source: + (test-assert + "valid narinfo-signature->canonical-sexp" + (canonical-sexp? + (narinfo-signature->canonical-sexp + (signature-field "foo")))) actual-value: #t result: PASS test-name: query narinfo without signature location: /home/alexvong1995/scm/guix/tests/substitute.scm:173 source: + (test-equal + "query narinfo without signature" + "" + (with-narinfo + %narinfo + (string-trim-both + (with-output-to-string + (lambda () + (with-input-from-string + (string-append + "have " + (%store-prefix) + "/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa-foo") + (lambda () (guix-substitute "--query")))))))) expected-value: actual-value: #f actual-error: + (system-error + "lstat" + "~A: ~S" + ("No such file or directory" + "/home/alexvong1995/scm/guix/test-tmp/var/17702/cache-17702/guix/substitute/") + (2)) result: FAIL test-name: query narinfo with invalid hash location: /home/alexvong1995/scm/guix/tests/substitute.scm:185 source: + (test-equal + "query narinfo with invalid hash" + "" + (with-narinfo + (string-append + %narinfo + "Signature: " + (signature-field "different body") + "\n") + (string-trim-both + (with-output-to-string + (lambda () + (with-input-from-string + (string-append + "have " + (%store-prefix) + "/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa-foo") + (lambda () (guix-substitute "--query")))))))) expected-value: actual-value: #f actual-error: + (system-error + "lstat" + "~A: ~S" + ("No such file or directory" + "/home/alexvong1995/scm/guix/test-tmp/var/17702/cache-17702/guix/substitute/") + (2)) result: FAIL test-name: query narinfo signed with authorized key location: /home/alexvong1995/scm/guix/tests/substitute.scm:200 source: + (test-equal + "query narinfo signed with authorized key" + (string-append + (%store-prefix) + "/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa-foo") + (with-narinfo + (string-append + %narinfo + "Signature: " + (signature-field %narinfo) + "\n") + (string-trim-both + (with-output-to-string + (lambda () + (with-input-from-string + (string-append + "have " + (%store-prefix) + "/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa-foo") + (lambda () (guix-substitute "--query")))))))) expected-value: /home/alexvong1995/scm/guix/test-tmp/store/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa-foo actual-value: #f actual-error: + (system-error + "lstat" + "~A: ~S" + ("No such file or directory" + "/home/alexvong1995/scm/guix/test-tmp/var/17702/cache-17702/guix/substitute/") + (2)) result: FAIL test-name: query narinfo signed with unauthorized key location: /home/alexvong1995/scm/guix/tests/substitute.scm:214 source: + (test-equal + "query narinfo signed with unauthorized key" + "" + (with-narinfo + (string-append + %narinfo + "Signature: " + (signature-field + %narinfo + #:public-key + %wrong-public-key) + "\n") + (string-trim-both + (with-output-to-string + (lambda () + (with-input-from-string + (string-append + "have " + (%store-prefix) + "/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa-foo") + (lambda () (guix-substitute "--query")))))))) expected-value: actual-value: #f actual-error: + (system-error + "lstat" + "~A: ~S" + ("No such file or directory" + "/home/alexvong1995/scm/guix/test-tmp/var/17702/cache-17702/guix/substitute/") + (2)) result: FAIL test-name: substitute, no signature location: /home/alexvong1995/scm/guix/tests/substitute.scm:230 source: + (test-equal + "substitute, no signature" + '(1 #t) + (let ((error-output (open-output-string))) + (parameterize + ((guix-warning-port error-output)) + (catch 'quit + (lambda () + (with-narinfo + %narinfo + (guix-substitute + "--substitute" + (string-append + (%store-prefix) + "/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa-foo") + "foo")) + #f) + (lambda (key value) + (list value + (let ((message (get-output-string error-output))) + (->bool + (string-match "lacks a signature" message))))))))) expected-value: (1 #t) actual-value: #f actual-error: + (system-error + "lstat" + "~A: ~S" + ("No such file or directory" + "/home/alexvong1995/scm/guix/test-tmp/var/17702/cache-17702/guix/substitute/") + (2)) result: FAIL test-name: substitute, invalid hash location: /home/alexvong1995/scm/guix/tests/substitute.scm:238 source: + (test-equal + "substitute, invalid hash" + '(1 #t) + (let ((error-output (open-output-string))) + (parameterize + ((guix-warning-port error-output)) + (catch 'quit + (lambda () + (with-narinfo + (string-append + %narinfo + "Signature: " + (signature-field "different body") + "\n") + (guix-substitute + "--substitute" + (string-append + (%store-prefix) + "/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa-foo") + "foo")) + #f) + (lambda (key value) + (list value + (let ((message (get-output-string error-output))) + (->bool (string-match "hash" message))))))))) expected-value: (1 #t) actual-value: #f actual-error: + (system-error + "lstat" + "~A: ~S" + ("No such file or directory" + "/home/alexvong1995/scm/guix/test-tmp/var/17702/cache-17702/guix/substitute/") + (2)) result: FAIL test-name: substitute, unauthorized key location: /home/alexvong1995/scm/guix/tests/substitute.scm:249 source: + (test-equal + "substitute, unauthorized key" + '(1 #t) + (let ((error-output (open-output-string))) + (parameterize + ((guix-warning-port error-output)) + (catch 'quit + (lambda () + (with-narinfo + (string-append + %narinfo + "Signature: " + (signature-field + %narinfo + #:public-key + %wrong-public-key) + "\n") + (guix-substitute + "--substitute" + (string-append + (%store-prefix) + "/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa-foo") + "foo")) + #f) + (lambda (key value) + (list value + (let ((message (get-output-string error-output))) + (->bool (string-match "unauthorized" message))))))))) expected-value: (1 #t) actual-value: #f actual-error: + (system-error + "lstat" + "~A: ~S" + ("No such file or directory" + "/home/alexvong1995/scm/guix/test-tmp/var/17702/cache-17702/guix/substitute/") + (2)) result: FAIL test-name: substitute, authorized key location: /home/alexvong1995/scm/guix/tests/substitute.scm:261 source: + (test-equal + "substitute, authorized key" + "Substitutable data." + (with-narinfo + (string-append + %narinfo + "Signature: " + (signature-field %narinfo)) + (dynamic-wind + (const #t) + (lambda () + (guix-substitute + "--substitute" + (string-append + (%store-prefix) + "/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa-foo") + "substitute-retrieved") + (call-with-input-file + "substitute-retrieved" + get-string-all)) + (lambda () + (false-if-exception + (delete-file "substitute-retrieved")))))) sha256:1cbw33db7fhwill1klnjx1h439lpnf2ppdk5kpciwfy5pb5ah9si warning: authentication and authorization of substitutes disabled! warning: ACL for archive imports seems to be uninitialized, substitutes may be unavailable warning: ACL for archive imports seems to be uninitialized, substitutes may be unavailable warning: ACL for archive imports seems to be uninitialized, substitutes may be unavailable warning: ACL for archive imports seems to be uninitialized, substitutes may be unavailable warning: ACL for archive imports seems to be uninitialized, substitutes may be unavailable Found valid signature for /home/alexvong1995/scm/guix/test-tmp/store/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa-foo From file:/home/alexvong1995/scm/guix/test-tmp/var/17702/substituter-data/example.nar Downloading /home/alexvong1995/scm/guix/test-tmp/store/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa-foo (42B installed)...  example.nar 136B 0B/s 00:00 [####################] 100.0%expected-value: Substitutable data. actual-value: #f actual-error: + (system-error + "lstat" + "~A: ~S" + ("No such file or directory" + "/home/alexvong1995/scm/guix/test-tmp/var/17702/cache-17702/guix/substitute/") + (2)) result: FAIL SKIP: tests/snix ================ test-name: factorize-uri location: /home/alexvong1995/scm/guix/tests/snix.scm:36 source: + (test-assert + "factorize-uri" + (every? + (match-lambda + ((uri version '-> expected) + (equal? (factorize-uri uri version) expected))) + '(("http://example.com/foo.tgz" + "1.0" + -> + "http://example.com/foo.tgz") + ("http://example.com/foo-2.8.tgz" + "2.8" + -> + ("http://example.com/foo-" version ".tgz")) + ("http://example.com/2.8/foo-2.8.tgz" + "2.8" + -> + ("http://example.com/" + version + "/foo-" + version + ".tgz"))))) actual-value: #t result: PASS test-name: nixpkgs->guix-package location: /home/alexvong1995/scm/guix/tests/snix.scm:54 source: + (test-assert + "nixpkgs->guix-package" + (match (nixpkgs->guix-package + %nixpkgs-directory + "guile") + (('package + ('name "guile") + ('version (? string?)) + ('source ('origin _ ...)) + ('build-system _) + ('inputs ('quasiquote (inputs ...))) + ('propagated-inputs ('quasiquote (pinputs ...))) + ('home-page (? string?)) + ('synopsis (? string?)) + ('description (? string?)) + ('license (? symbol?))) + (and (member '("libffi" ,libffi) inputs) + (member '("gmp" ,gmp) pinputs) + #t)) + (x (pk 'fail x #f)))) result: SKIP SKIP: tests/syscalls ==================== test-name: mount, ENOENT location: /home/alexvong1995/scm/guix/tests/syscalls.scm:38 source: + (test-equal + "mount, ENOENT" + ENOENT + (catch 'system-error + (lambda () + (mount "/dev/null" "/does-not-exist" "ext2") + #f) + (compose system-error-errno list))) expected-value: 2 actual-value: 2 result: PASS test-name: umount, ENOENT/EPERM location: /home/alexvong1995/scm/guix/tests/syscalls.scm:46 source: + (test-assert + "umount, ENOENT/EPERM" + (catch 'system-error + (lambda () (umount "/does-not-exist") #f) + (lambda args + (memv (system-error-errno args) + (list EPERM ENOENT))))) actual-value: (1 2) result: PASS test-name: mount-points location: /home/alexvong1995/scm/guix/tests/syscalls.scm:55 source: + (test-assert + "mount-points" + (any (cute member <> (mount-points)) + '("/" "/proc" "/sys" "/dev"))) actual-value: (/ /sys/kernel/security /dev/shm /run/lock /sys/fs/cgroup /sys/fs/cgroup/systemd /sys/fs/pstore /sys/firmware/efi/efivars /sys/fs/cgroup/net_cls,net_prio /sys/fs/cgroup/cpu,cpuacct /sys/fs/cgroup/freezer /sys/fs/cgroup/perf_event /sys/fs/cgroup/devices /sys/fs/cgroup/blkio /sys/fs/cgroup/pids /sys/fs/cgroup/cpuset /proc/sys/fs/binfmt_misc /dev/mqueue /sys/kernel/debug /dev/hugepages /boot/efi /run/user/115 /run/user/1000 /sys/fs/fuse/connections /run/user/1000/gvfs) result: PASS test-name: swapon, ENOENT/EPERM location: /home/alexvong1995/scm/guix/tests/syscalls.scm:61 source: + (test-assert + "swapon, ENOENT/EPERM" + (catch 'system-error + (lambda () (swapon "/does-not-exist") #f) + (lambda args + (memv (system-error-errno args) + (list EPERM ENOENT))))) actual-value: (1 2) result: PASS test-name: swapoff, ENOENT/EINVAL/EPERM location: /home/alexvong1995/scm/guix/tests/syscalls.scm:69 source: + (test-assert + "swapoff, ENOENT/EINVAL/EPERM" + (catch 'system-error + (lambda () (swapoff "/does-not-exist") #f) + (lambda args + (memv (system-error-errno args) + (list EPERM EINVAL ENOENT))))) actual-value: (1 22 2) result: PASS test-name: mkdtemp! location: /home/alexvong1995/scm/guix/tests/syscalls.scm:77 source: + (test-assert + "mkdtemp!" + (let* ((tmp (or (getenv "TMPDIR") "/tmp")) + (dir (mkdtemp! + (string-append tmp "/guix-test-XXXXXX")))) + (and (file-exists? dir) (begin (rmdir dir) #t)))) actual-value: #t result: PASS test-name: statfs, ENOENT location: /home/alexvong1995/scm/guix/tests/syscalls.scm:85 source: + (test-equal + "statfs, ENOENT" + ENOENT + (catch 'system-error + (lambda () (statfs "/does-not-exist")) + (compose system-error-errno list))) expected-value: 2 actual-value: 2 result: PASS test-name: statfs location: /home/alexvong1995/scm/guix/tests/syscalls.scm:92 source: + (test-assert + "statfs" + (let ((fs (statfs "/"))) + (and (file-system? fs) + (> (file-system-block-size fs) 0) + (>= (file-system-blocks-available fs) 0) + (>= (file-system-blocks-free fs) + (file-system-blocks-available fs))))) actual-value: #t result: PASS test-name: clone location: /home/alexvong1995/scm/guix/tests/syscalls.scm:109 source: + (test-assert + "clone" + (match (clone (logior CLONE_NEWUSER SIGCHLD)) + (0 (primitive-exit 42)) + (pid (and (not (equal? + (readlink (user-namespace pid)) + (readlink (user-namespace (getpid))))) + (match (waitpid pid) + ((_ . status) (= 42 (status:exit-val status)))))))) result: SKIP test-name: setns location: /home/alexvong1995/scm/guix/tests/syscalls.scm:122 source: + (test-assert + "setns" + (match (clone (logior CLONE_NEWUSER SIGCHLD)) + (0 (primitive-exit 0)) + (clone-pid + (match (pipe) + ((in . out) + (match (primitive-fork) + (0 + (close in) + (call-with-input-file + (user-namespace clone-pid) + (lambda (port) (setns (port->fdes port) 0))) + (write 'done out) + (close out) + (primitive-exit 0)) + (fork-pid + (close out) + (read in) + (let ((result + (and (equal? + (readlink + (user-namespace clone-pid)) + (readlink + (user-namespace fork-pid)))))) + (waitpid clone-pid) + (waitpid fork-pid) + result)))))))) result: SKIP test-name: pivot-root location: /home/alexvong1995/scm/guix/tests/syscalls.scm:151 source: + (test-assert + "pivot-root" + (match (pipe) + ((in . out) + (match (clone (logior CLONE_NEWUSER CLONE_NEWNS SIGCHLD)) + (0 + (close in) + (call-with-temporary-directory + (lambda (root) + (let ((put-old (string-append root "/real-root"))) + (mount "none" root "tmpfs") + (mkdir put-old) + (call-with-output-file + (string-append root "/test") + (lambda (port) (display "testing\n" port))) + (pivot-root root put-old) + (write (file-exists? "/test") out) + (close out)))) + (primitive-exit 0)) + (pid (close out) + (let ((result (read in))) + (close in) + (and (zero? (match (waitpid pid) + ((_ . status) + (status:exit-val status)))) + (eq? #t result)))))))) result: SKIP test-name: fcntl-flock wait location: /home/alexvong1995/scm/guix/tests/syscalls.scm:180 source: + (test-equal + "fcntl-flock wait" + 42 + (let ((file (open-file temp-file "w0b"))) + (fcntl-flock file 'write-lock) + (match (primitive-fork) + (0 + (dynamic-wind + (const #t) + (lambda () + (let ((file (open-file temp-file "r0b"))) + (fcntl-flock file 'read-lock) + (primitive-exit (read file))) + (primitive-exit 1)) + (lambda () (primitive-exit 2)))) + (pid (display "hello, world!" file) + (force-output file) + (sleep 1) + (seek file 0 SEEK_SET) + (truncate-file file 0) + (write 42 file) + (force-output file) + (fcntl-flock file 'unlock) + (match (waitpid pid) + ((_ . status) + (let ((result (status:exit-val status))) + (close-port file) + result))))))) expected-value: 42 actual-value: 42 result: PASS test-name: fcntl-flock non-blocking location: /home/alexvong1995/scm/guix/tests/syscalls.scm:219 source: + (test-equal + "fcntl-flock non-blocking" + EAGAIN + (match (pipe) + ((input . output) + (match (primitive-fork) + (0 + (dynamic-wind + (const #t) + (lambda () + (close-port output) + (read-char input) + (let ((file (open-file temp-file "w0"))) + (catch 'flock-error + (lambda () + (fcntl-flock file 'write-lock #:wait? #f)) + (lambda (key errno) + (primitive-exit (pk 'errno errno))))) + (primitive-exit -1)) + (lambda () (primitive-exit -2)))) + (pid (close-port input) + (let ((file (open-file temp-file "w0"))) + (fcntl-flock file 'write-lock) + (write 'green-light output) + (force-output output) + (match (waitpid pid) + ((_ . status) + (let ((result (status:exit-val status))) + (fcntl-flock file 'unlock) + (close-port file) + result))))))))) ;;; (errno 11) expected-value: 11 actual-value: 11 result: PASS test-name: all-network-interface-names location: /home/alexvong1995/scm/guix/tests/syscalls.scm:261 source: + (test-assert + "all-network-interface-names" + (match (all-network-interface-names) + (((? string? names) ..1) (member "lo" names)))) actual-value: (lo wlp5s0 enp3s0) result: PASS test-name: network-interface-names location: /home/alexvong1995/scm/guix/tests/syscalls.scm:266 source: + (test-assert + "network-interface-names" + (match (network-interface-names) + (((? string? names) ..1) + (lset<= + string=? + names + (all-network-interface-names))))) actual-value: #t result: PASS test-name: network-interface-flags location: /home/alexvong1995/scm/guix/tests/syscalls.scm:271 source: + (test-assert + "network-interface-flags" + (let* ((sock (socket AF_INET SOCK_STREAM 0)) + (flags (network-interface-flags sock "lo"))) + (close-port sock) + (and (not (zero? (logand flags IFF_LOOPBACK))) + (not (zero? (logand flags IFF_UP)))))) actual-value: #t result: PASS test-name: loopback-network-interface? location: /home/alexvong1995/scm/guix/tests/syscalls.scm:278 source: + (test-equal + "loopback-network-interface?" + ENODEV + (and (loopback-network-interface? "lo") + (catch 'system-error + (lambda () + (loopback-network-interface? "nonexistent") + #f) + (lambda args (system-error-errno args))))) expected-value: 19 actual-value: 19 result: PASS test-name: set-network-interface-flags location: /home/alexvong1995/scm/guix/tests/syscalls.scm:289 source: + (test-assert + "set-network-interface-flags" + (let ((sock (socket AF_INET SOCK_STREAM 0))) + (catch 'system-error + (lambda () + (set-network-interface-flags sock "lo" IFF_UP)) + (lambda args + (close-port sock) + (memv (system-error-errno args) + (list EPERM EACCES)))))) actual-value: (1 13) result: PASS test-name: network-interface-address lo location: /home/alexvong1995/scm/guix/tests/syscalls.scm:299 source: + (test-equal + "network-interface-address lo" + (make-socket-address + AF_INET + (inet-pton AF_INET "127.0.0.1") + 0) + (let* ((sock (socket AF_INET SOCK_STREAM 0)) + (addr (network-interface-address sock "lo"))) + (close-port sock) + addr)) expected-value: #(2 2130706433 0) actual-value: #(2 2130706433 0) result: PASS test-name: set-network-interface-address location: /home/alexvong1995/scm/guix/tests/syscalls.scm:307 source: + (test-assert + "set-network-interface-address" + (let ((sock (socket AF_INET SOCK_STREAM 0))) + (catch 'system-error + (lambda () + (set-network-interface-address + sock + "nonexistent" + (make-socket-address + AF_INET + (inet-pton AF_INET "127.12.14.15") + 0))) + (lambda args + (close-port sock) + (memv (system-error-errno args) + (list EPERM EACCES)))))) actual-value: (1 13) result: PASS test-name: network-interfaces returns one or more interfaces location: /home/alexvong1995/scm/guix/tests/syscalls.scm:321 source: + (test-equal + "network-interfaces returns one or more interfaces" + '(#t #t #t) + (match (network-interfaces) + ((interfaces ..1) + (list (every interface? interfaces) + (every string? (map interface-name interfaces)) + (every (lambda (sockaddr) + (or (vector? sockaddr) (not sockaddr))) + (map interface-address interfaces)))))) expected-value: (#t #t #t) actual-value: (#t #t #t) result: PASS test-name: network-interfaces returns "lo" location: /home/alexvong1995/scm/guix/tests/syscalls.scm:333 source: + (test-equal + "network-interfaces returns \"lo\"" + (list #t + (make-socket-address + AF_INET + (inet-pton AF_INET "127.0.0.1") + 0)) + (match (filter + (lambda (interface) + (string=? "lo" (interface-name interface))) + (network-interfaces)) + ((loopbacks ..1) + (list (every (lambda (lo) + (not (zero? (logand + IFF_LOOPBACK + (interface-flags lo))))) + loopbacks) + (match (find (lambda (lo) + (= AF_INET + (sockaddr:fam (interface-address lo)))) + loopbacks) + (#f #f) + (lo (interface-address lo))))))) expected-value: (#t #(2 2130706433 0)) actual-value: (#t #(2 2130706433 0)) result: PASS test-name: tcgetattr ENOTTY location: /home/alexvong1995/scm/guix/tests/syscalls.scm:348 source: + (test-equal + "tcgetattr ENOTTY" + ENOTTY + (catch 'system-error + (lambda () + (call-with-input-file + "/dev/null" + (lambda (port) (tcgetattr (fileno port))))) + (compose system-error-errno list))) expected-value: 25 actual-value: 25 result: PASS test-name: tcgetattr location: /home/alexvong1995/scm/guix/tests/syscalls.scm:362 source: + (test-assert + "tcgetattr" + (let ((termios (tcgetattr 0))) + (and (termios? termios) + (> (termios-input-speed termios) 0) + (> (termios-output-speed termios) 0)))) actual-value: #t result: PASS test-name: tcsetattr location: /home/alexvong1995/scm/guix/tests/syscalls.scm:368 source: + (test-assert + "tcsetattr" + (let ((first (tcgetattr 0))) + (tcsetattr 0 (tcsetattr-action TCSANOW) first) + (equal? first (tcgetattr 0)))) actual-value: #t result: PASS test-name: terminal-window-size ENOTTY location: /home/alexvong1995/scm/guix/tests/syscalls.scm:373 source: + (test-assert + "terminal-window-size ENOTTY" + (call-with-input-file + "/dev/null" + (lambda (port) + (catch 'system-error + (lambda () (terminal-window-size port)) + (lambda args + (memv (system-error-errno args) + (list ENOTTY EINVAL))))))) actual-value: (25 22) result: PASS test-name: terminal-columns location: /home/alexvong1995/scm/guix/tests/syscalls.scm:384 source: + (test-assert + "terminal-columns" + (> (terminal-columns) 0)) actual-value: #t result: PASS test-name: terminal-columns non-file port location: /home/alexvong1995/scm/guix/tests/syscalls.scm:387 source: + (test-assert + "terminal-columns non-file port" + (> (terminal-columns + (open-input-string + "Join us now, share the software!")) + 0)) actual-value: #t result: PASS SKIP: tests/gremlin =================== test-name: elf-dynamic-info-needed, executable location: /home/alexvong1995/scm/guix/tests/gremlin.scm:44 source: + (test-assert + "elf-dynamic-info-needed, executable" + (let* ((elf (call-with-input-file %guile-executable read-elf)) + (dyninfo (elf-dynamic-info elf))) + (or (not dyninfo) + (lset<= + string=? + (list (string-append "libguile-" (effective-version)) + "libgc" + "libunistring" + "libffi") + (map (lambda (lib) + (string-take lib (string-contains lib ".so"))) + (elf-dynamic-info-needed dyninfo)))))) result: SKIP test-name: expand-origin location: /home/alexvong1995/scm/guix/tests/gremlin.scm:55 source: + (test-equal + "expand-origin" + '("OOO/../lib" + "OOO" + "../OOO/bar/OOO/baz" + "ORIGIN/foo") + (map (cut expand-origin <> "OOO") + '("$ORIGIN/../lib" + "${ORIGIN}" + "../${ORIGIN}/bar/$ORIGIN/baz" + "ORIGIN/foo"))) expected-value: (OOO/../lib OOO ../OOO/bar/OOO/baz ORIGIN/foo) actual-value: (OOO/../lib OOO ../OOO/bar/OOO/baz ORIGIN/foo) result: PASS FAIL: tests/containers ====================== 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 SKIP: tests/pypi ================ test-name: pypi->guix-package location: /home/alexvong1995/scm/guix/tests/pypi.scm:76 source: + (test-assert + "pypi->guix-package" + (mock ((guix import utils) + url-fetch + (lambda (url file-name) + (match url + ("https://pypi.python.org/pypi/foo/json" + (with-output-to-file + file-name + (lambda () (display test-json)))) + ("https://example.com/foo-1.0.0.tar.gz" + (begin + (mkdir "foo-1.0.0") + (with-output-to-file + "foo-1.0.0/requirements.txt" + (lambda () (display test-requirements))) + (system* "tar" "czvf" file-name "foo-1.0.0/") + (delete-file-recursively "foo-1.0.0") + (set! test-source-hash + (call-with-input-file file-name port-sha256)))) + ("https://example.com/foo-1.0.0-py2.py3-none-any.whl" + #f) + (_ (error "Unexpected URL: " url))))) + (match (pypi->guix-package "foo") + (('package + ('name "python-foo") + ('version "1.0.0") + ('source + ('origin + ('method 'url-fetch) + ('uri + (string-append + "https://example.com/foo-" + version + ".tar.gz")) + ('sha256 ('base32 (? string? hash))))) + ('build-system 'python-build-system) + ('inputs + ('quasiquote + (("python-bar" ('unquote 'python-bar)) + ("python-baz" ('unquote 'python-baz)) + ("python-setuptools" + ('unquote 'python-setuptools))))) + ('home-page "http://example.com") + ('synopsis "summary") + ('description "summary") + ('license 'lgpl2.0)) + (string=? + (bytevector->nix-base32-string test-source-hash) + hash)) + (x (pk 'fail x #f))))) foo-1.0.0/ foo-1.0.0/requirements.txt actual-value: #t result: PASS test-name: pypi->guix-package, wheels location: /home/alexvong1995/scm/guix/tests/pypi.scm:125 source: + (test-assert + "pypi->guix-package, wheels" + (mock ((guix import utils) + url-fetch + (lambda (url file-name) + (match url + ("https://pypi.python.org/pypi/foo/json" + (with-output-to-file + file-name + (lambda () (display test-json)))) + ("https://example.com/foo-1.0.0.tar.gz" + (begin + (mkdir "foo-1.0.0") + (with-output-to-file + "foo-1.0.0/requirements.txt" + (lambda () (display test-requirements))) + (system* "tar" "czvf" file-name "foo-1.0.0/") + (delete-file-recursively "foo-1.0.0") + (set! test-source-hash + (call-with-input-file file-name port-sha256)))) + ("https://example.com/foo-1.0.0-py2.py3-none-any.whl" + (begin + (mkdir "foo-1.0.0.dist-info") + (with-output-to-file + "foo-1.0.0.dist-info/metadata.json" + (lambda () (display test-metadata))) + (let ((zip-file (string-append file-name ".zip"))) + (system* + "zip" + zip-file + "foo-1.0.0.dist-info/metadata.json") + (rename-file zip-file file-name)) + (delete-file-recursively "foo-1.0.0.dist-info"))) + (_ (error "Unexpected URL: " url))))) + (match (pypi->guix-package "foo") + (('package + ('name "python-foo") + ('version "1.0.0") + ('source + ('origin + ('method 'url-fetch) + ('uri + (string-append + "https://example.com/foo-" + version + ".tar.gz")) + ('sha256 ('base32 (? string? hash))))) + ('build-system 'python-build-system) + ('inputs + ('quasiquote + (("python-bar" ('unquote 'python-bar)) + ("python-baz" ('unquote 'python-baz)) + ("python-setuptools" + ('unquote 'python-setuptools))))) + ('home-page "http://example.com") + ('synopsis "summary") + ('description "summary") + ('license 'lgpl2.0)) + (string=? + (bytevector->nix-base32-string test-source-hash) + hash)) + (x (pk 'fail x #f))))) result: SKIP random seed for tests: 1466674307 SKIP: tests/guix-environment-container ====================================== + set -e + guix environment --version guix environment (GNU Guix) 0.10.0 Copyright (C) 2016 the Guix authors License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. + guile -c '((@@ (guix scripts environment) assert-container-features))' error: cannot create container: unprivileged user cannot create user namespaces error: please set /proc/sys/kernel/unprivileged_userns_clone to "1" + exit 77 SKIP tests/guix-environment-container.sh (exit status: 77)