unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: Leo Famulari <leo@famulari.name>
To: 21280@debbugs.gnu.org
Subject: bug#21280: test failures: nar, syscalls, containers
Date: Sun, 16 Aug 2015 23:43:27 -0400	[thread overview]
Message-ID: <1439783007.1743108.357849649.18351DEC@webmail.messagingengine.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 359 bytes --]

Running `make check` on HEAD ( commit 4e014373 ), I got failures for
tests/nar.scm, tests/syscalls.scm, and tests/containers.scm.

The same tests also failed when I checked out tag v0.8.3 but I don't
have those
logs anymore. Let me know if you want them.

I've attached test-suite.log and the logs for the failed modules.

Let me know if you need more tests.

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: test-suite.log --]
[-- Type: text/x-log; name="test-suite.log", Size: 8870 bytes --]

======================================
   GNU Guix 0.8.3: ./test-suite.log
======================================

# TOTAL: 46
# PASS:  43
# SKIP:  0
# XFAIL: 0
# FAIL:  3
# XPASS: 0
# ERROR: 0

.. contents:: :depth: 2

FAIL: tests/nar
===============

accepted connection from pid 19913, user leo
random seed for tests: 1439766922
;;; note: source file ./srfi/srfi-64.scm
;;;       newer than compiled /gnu/store/4xqmz0zzkv1n09fqqckql2p8xv30hn1k-guile-2.0.11/lib/guile/2.0/ccache/srfi/srfi-64.go
exporting path `/home/leo/work/guix/test-tmp/store/209x2npzj4fizbhmv70ff73m476saxy1-text'
exporting path `/home/leo/work/guix/test-tmp/store/hwsp9345rgqpwc6w33c2vx3ay7a6xdxl-text'
exporting path `/home/leo/work/guix/test-tmp/store/ln1rcmm6z9k7fllkq77nds6a6bdxrm5i-text'
exporting path `/home/leo/work/guix/test-tmp/store/0s31k4lkvkivzhn7wgkhgqx9anxwd2dy-text'
exporting path `/home/leo/work/guix/test-tmp/store/d8zmq43j7125a0iya87vbxs6q6inpljh-text'
exporting path `/home/leo/work/guix/test-tmp/store/accnr7hyqj2bb10qgmv8chjv3ld2ya7r-text'
exporting path `/home/leo/work/guix/test-tmp/store/3bi306gssidzrf9hcpl61an7i259cpfg-text'
exporting path `/home/leo/work/guix/test-tmp/store/qads794q9pwykjmzvmz1lbx7kmwr97ng-text'
exporting path `/home/leo/work/guix/test-tmp/store/sd24h1s2g3lh2jz2zf6mcjwham9xfyxs-text'
exporting path `/home/leo/work/guix/test-tmp/store/mr1srnw6q5yranlrp8sr3d1cjnzai2cp-text'
finding garbage collector roots...
;;; note: auto-compilation is enabled, set GUILE_AUTO_COMPILE=0
;;;       or pass the --no-auto-compile argument to disable.
;;; compiling /home/leo/work/guix/nix/scripts/list-runtime-roots
;;; compiled /home/leo/work/guix/test-tmp/var/19903/cache-19903/guile/ccache/2.0-LE-8-2.0/home/leo/work/guix/nix/scripts/list-runtime-roots.go
removing stale temporary roots file `/home/leo/work/guix/test-tmp/var/19903/temproots/20025'
deleting `/home/leo/work/guix/test-tmp/store/0s31k4lkvkivzhn7wgkhgqx9anxwd2dy-text'
deleting `/home/leo/work/guix/test-tmp/store/209x2npzj4fizbhmv70ff73m476saxy1-text'
deleting `/home/leo/work/guix/test-tmp/store/3bi306gssidzrf9hcpl61an7i259cpfg-text'
deleting `/home/leo/work/guix/test-tmp/store/accnr7hyqj2bb10qgmv8chjv3ld2ya7r-text'
deleting `/home/leo/work/guix/test-tmp/store/d8zmq43j7125a0iya87vbxs6q6inpljh-text'
deleting `/home/leo/work/guix/test-tmp/store/hwsp9345rgqpwc6w33c2vx3ay7a6xdxl-text'
deleting `/home/leo/work/guix/test-tmp/store/ln1rcmm6z9k7fllkq77nds6a6bdxrm5i-text'
deleting `/home/leo/work/guix/test-tmp/store/mr1srnw6q5yranlrp8sr3d1cjnzai2cp-text'
deleting `/home/leo/work/guix/test-tmp/store/qads794q9pwykjmzvmz1lbx7kmwr97ng-text'
deleting `/home/leo/work/guix/test-tmp/store/sd24h1s2g3lh2jz2zf6mcjwham9xfyxs-text'
deleting `/home/leo/work/guix/test-tmp/store/trash'
deleting unused links...
note: currently hard linking saves 19.83 MiB
accepted connection from pid 19913, user leo
accepted connection from pid 19913, user leo
accepted connection from pid 19913, user leo
accepted connection from pid 19913, user leo
accepted connection from pid 19913, user leo
accepted connection from pid 19913, user leo
accepted connection from pid 19913, user leo
accepted connection from pid 19913, user leo
accepted connection from pid 19913, user leo
accepted connection from pid 19913, user leo
accepted connection from pid 19913, user leo
accepted connection from pid 19913, user leo
accepted connection from pid 19913, user leo
accepted connection from pid 19913, user leo
accepted connection from pid 19913, user leo
accepted connection from pid 19913, user leo
accepted connection from pid 19913, user leo
accepted connection from pid 19913, user leo
accepted connection from pid 19913, user leo
accepted connection from pid 19913, user leo
accepted connection from pid 19913, user leo
importing file or directory '/home/leo/work/guix/test-tmp/store/209x2npzj4fizbhmv70ff73m476saxy1-text'...
found valid signature for '/home/leo/work/guix/test-tmp/store/209x2npzj4fizbhmv70ff73m476saxy1-text'
importing file or directory '/home/leo/work/guix/test-tmp/store/hwsp9345rgqpwc6w33c2vx3ay7a6xdxl-text'...
found valid signature for '/home/leo/work/guix/test-tmp/store/hwsp9345rgqpwc6w33c2vx3ay7a6xdxl-text'
importing file or directory '/home/leo/work/guix/test-tmp/store/ln1rcmm6z9k7fllkq77nds6a6bdxrm5i-text'...
found valid signature for '/home/leo/work/guix/test-tmp/store/ln1rcmm6z9k7fllkq77nds6a6bdxrm5i-text'
importing file or directory '/home/leo/work/guix/test-tmp/store/0s31k4lkvkivzhn7wgkhgqx9anxwd2dy-text'...
found valid signature for '/home/leo/work/guix/test-tmp/store/0s31k4lkvkivzhn7wgkhgqx9anxwd2dy-text'
importing file or directory '/home/leo/work/guix/test-tmp/store/d8zmq43j7125a0iya87vbxs6q6inpljh-text'...
found valid signature for '/home/leo/work/guix/test-tmp/store/d8zmq43j7125a0iya87vbxs6q6inpljh-text'
importing file or directory '/home/leo/work/guix/test-tmp/store/accnr7hyqj2bb10qgmv8chjv3ld2ya7r-text'...
found valid signature for '/home/leo/work/guix/test-tmp/store/accnr7hyqj2bb10qgmv8chjv3ld2ya7r-text'
importing file or directory '/home/leo/work/guix/test-tmp/store/3bi306gssidzrf9hcpl61an7i259cpfg-text'...
found valid signature for '/home/leo/work/guix/test-tmp/store/3bi306gssidzrf9hcpl61an7i259cpfg-text'
importing file or directory '/home/leo/work/guix/test-tmp/store/qads794q9pwykjmzvmz1lbx7kmwr97ng-text'...
found valid signature for '/home/leo/work/guix/test-tmp/store/qads794q9pwykjmzvmz1lbx7kmwr97ng-text'
importing file or directory '/home/leo/work/guix/test-tmp/store/sd24h1s2g3lh2jz2zf6mcjwham9xfyxs-text'...
found valid signature for '/home/leo/work/guix/test-tmp/store/sd24h1s2g3lh2jz2zf6mcjwham9xfyxs-text'
importing file or directory '/home/leo/work/guix/test-tmp/store/mr1srnw6q5yranlrp8sr3d1cjnzai2cp-text'...
found valid signature for '/home/leo/work/guix/test-tmp/store/mr1srnw6q5yranlrp8sr3d1cjnzai2cp-text'
exporting path `/home/leo/work/guix/test-tmp/store/79wyycf4d0j2f4amibcw011dm60cairg-foo'
finding garbage collector roots...
removing stale temporary roots file `/home/leo/work/guix/test-tmp/var/19903/temproots/21820'
deleting `/home/leo/work/guix/test-tmp/store/79wyycf4d0j2f4amibcw011dm60cairg-foo'
deleting `/home/leo/work/guix/test-tmp/store/trash'
deleting unused links...
note: currently hard linking saves 19.83 MiB
accepted connection from pid 19913, user leo
accepted connection from pid 19913, user leo
importing file or directory '/home/leo/work/guix/test-tmp/store/79wyycf4d0j2f4amibcw011dm60cairg-foo'...
exporting path `/home/leo/work/guix/test-tmp/store/kshkm989av9nqk38arx79b9lg333yl8z-foo'
finding garbage collector roots...
removing stale temporary roots file `/home/leo/work/guix/test-tmp/var/19903/temproots/21883'
deleting `/home/leo/work/guix/test-tmp/store/kshkm989av9nqk38arx79b9lg333yl8z-foo'
deleting `/home/leo/work/guix/test-tmp/store/trash'
deleting unused links...
note: currently hard linking saves 19.83 MiB
accepted connection from pid 19913, user leo
%%%% Starting test nar  (Writing full log to "nar.log")
tests/nar.scm:202: FAIL write-file + restore-file
tests/nar.scm:219: FAIL write-file + restore-file with symlinks
# of expected passes      6
# of unexpected failures  2
importing file or directory '/home/leo/work/guix/test-tmp/store/kshkm989av9nqk38arx79b9lg333yl8z-foo'...
FAIL tests/nar.scm (exit status: 1)

FAIL: tests/syscalls
====================

;;; note: source file ./srfi/srfi-64.scm
;;;       newer than compiled /gnu/store/4xqmz0zzkv1n09fqqckql2p8xv30hn1k-guile-2.0.11/lib/guile/2.0/ccache/srfi/srfi-64.go
ERROR: In procedure primitive-load:
ERROR: In procedure scm_i_lreadparen: tests/syscalls.scm:128:14: end of file
%%%% Starting test syscalls  (Writing full log to "syscalls.log")
tests/syscalls.scm:85: FAIL clone
tests/syscalls.scm:98: FAIL setns
%%%% Starting test syscalls  (Writing full log to "syscalls.log")
tests/syscalls.scm:85: FAIL clone
tests/syscalls.scm:98: FAIL setns
tests/syscalls.scm:127: FAIL pivot-root
# of expected passes      15
# of unexpected failures  3
;;; note: source file ./srfi/srfi-64.scm
;;;       newer than compiled /gnu/store/4xqmz0zzkv1n09fqqckql2p8xv30hn1k-guile-2.0.11/lib/guile/2.0/ccache/srfi/srfi-64.go

FAIL: tests/containers
======================

%%%% Starting test containers  (Writing full log to "containers.log")
tests/containers.scm:37: FAIL call-with-container, user namespace
tests/containers.scm:45: FAIL call-with-container, uts namespace
tests/containers.scm:55: FAIL call-with-container, pid namespace
tests/containers.scm:70: FAIL call-with-container, mnt namespace
tests/containers.scm:77: FAIL call-with-container, all namespaces
tests/containers.scm:83: FAIL container-excursion
# of unexpected failures  6
;;; note: source file ./srfi/srfi-64.scm
;;;       newer than compiled /gnu/store/4xqmz0zzkv1n09fqqckql2p8xv30hn1k-guile-2.0.11/lib/guile/2.0/ccache/srfi/srfi-64.go
FAIL tests/containers.scm (exit status: 1)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #3: nar.log --]
[-- Type: text/x-log; name="nar.log", Size: 5809 bytes --]

%%%% Starting test nar
Group begin: nar
Test begin:
  test-name: "write-file supports non-file output ports"
  source-file: "tests/nar.scm"
  source-line: 165
  source-form: (test-assert "write-file supports non-file output ports" (let ((input (string-append (dirname (search-path %load-path "guix.scm")) "/guix")) (output (%make-void-port "w"))) (write-file input output) #t))
Test end:
  result-kind: pass
  actual-value: #t
Test begin:
  test-name: "write-file puts file in C locale collation order"
  source-file: "tests/nar.scm"
  source-line: 172
  source-form: (test-equal "write-file puts file in C locale collation order" (base32 "0sfn5r63k88w9ls4hivnvscg82bqg8a0w7955l6xlk4g96jnb2z3") (let ((input (string-append %test-dir ".input"))) (dynamic-wind (lambda () (define (touch file) (call-with-output-file (string-append input "/" file) (const #t))) (mkdir input) (touch "B") (touch "Z") (touch "a") (symlink "B" (string-append input "/z"))) (lambda () (let-values (((port get-hash) (open-sha256-port))) (write-file input port) (get-hash))) (lambda () (rm-rf input)))))
Test end:
  result-kind: pass
  actual-value: #vu8(227 139 101 165 73 143 76 218 13 45 37 29 14 20 122 120 9 244 152 222 118 71 72 52 77 28 161 57 76 46 214 105)
  expected-value: #vu8(227 139 101 165 73 143 76 218 13 45 37 29 14 20 122 120 9 244 152 222 118 71 72 52 77 28 161 57 76 46 214 105)
Test begin:
  test-name: "restore-file with incomplete input"
  source-file: "tests/nar.scm"
  source-line: 193
  source-form: (test-equal "restore-file with incomplete input" (string-append %test-dir "/foo") (let ((port (open-bytevector-input-port #vu8(1 2 3)))) (guard (c ((nar-error? c) (and (eq? port (nar-error-port c)) (nar-error-file c)))) (restore-file port (string-append %test-dir "/foo")) #f)))
Test end:
  result-kind: pass
  actual-value: "./test-nar-19913/foo"
  expected-value: "./test-nar-19913/foo"
Test begin:
  test-name: "write-file + restore-file"
  source-file: "tests/nar.scm"
  source-line: 202
  source-form: (test-assert "write-file + restore-file" (let* ((input (string-append (dirname (search-path %load-path "guix.scm")) "/guix")) (output %test-dir) (nar (string-append output ".nar"))) (dynamic-wind (lambda () #t) (lambda () (call-with-output-file nar (cut write-file input <>)) (call-with-input-file nar (cut restore-file <> output)) (file-tree-equal? input output)) (lambda () (false-if-exception (delete-file nar)) (false-if-exception (rm-rf output))))))
Test end:
  result-kind: fail
  actual-value: #f
Test begin:
  test-name: "write-file + restore-file with symlinks"
  source-file: "tests/nar.scm"
  source-line: 219
  source-form: (test-assert "write-file + restore-file with symlinks" (let ((input (string-append %test-dir ".input"))) (mkdir input) (dynamic-wind (const #t) (lambda () (with-file-tree input (directory "root" (("reg") ("exe" 511) ("sym" -> "reg"))) (let* ((output %test-dir) (nar (string-append output ".nar"))) (dynamic-wind (lambda () #t) (lambda () (call-with-output-file nar (cut write-file input <>)) (call-with-input-file nar (cut restore-file <> output)) (file-tree-equal? input output)) (lambda () (false-if-exception (delete-file nar)) (false-if-exception (rm-rf output))))))) (lambda () (rmdir input)))))
Test end:
  result-kind: fail
  actual-value: #f
Test begin:
  test-name: "restore-file-set (signed, valid)"
  source-file: "tests/nar.scm"
  source-line: 251
  source-form: (test-assert "restore-file-set (signed, valid)" (with-store store (let* ((texts (unfold (cut >= <> 10) (lambda _ (random-text)) #{1+}# 0)) (files (map (cut add-text-to-store store "text" <>) texts)) (dump (call-with-bytevector-output-port (cut export-paths store files <>)))) (delete-paths store files) (and (every (negate file-exists?) files) (let* ((source (open-bytevector-input-port dump)) (imported (restore-file-set source))) (and (equal? imported files) (every (lambda (file) (and (file-exists? file) (valid-path? store file))) files) (equal? texts (map (lambda (file) (call-with-input-file file get-string-all)) files))))))))
Test end:
  result-kind: pass
  actual-value: #t
Test begin:
  test-name: "restore-file-set (missing signature)"
  source-file: "tests/nar.scm"
  source-line: 275
  source-form: (test-assert "restore-file-set (missing signature)" (let/ec return (with-store store (let* ((file (add-text-to-store store "foo" (random-text))) (dump (call-with-bytevector-output-port (cute export-paths store (list file) <> #:sign? #f)))) (delete-paths store (list file)) (and (not (file-exists? file)) (let ((source (open-bytevector-input-port dump))) (guard (c ((nar-signature-error? c) (let ((message (condition-message c)) (port (nar-error-port c))) (return (and (string-match "lacks.*signature" message) (string=? file (nar-error-file c)) (eq? source port)))))) (restore-file-set source)) #f))))))
Test end:
  result-kind: pass
  actual-value: #t
Test begin:
  test-name: "restore-file-set (corrupt)"
  source-file: "tests/nar.scm"
  source-line: 295
  source-form: (test-assert "restore-file-set (corrupt)" (let/ec return (with-store store (let* ((file (add-text-to-store store "foo" (random-text))) (dump (call-with-bytevector-output-port (cute export-paths store (list file) <>)))) (delete-paths store (list file)) (let* ((index 120) (byte (bytevector-u8-ref dump index))) (bytevector-u8-set! dump index (logxor 255 byte))) (and (not (file-exists? file)) (let ((source (open-bytevector-input-port dump))) (guard (c ((nar-invalid-hash-error? c) (let ((message (condition-message c)) (port (nar-error-port c))) (return (and (string-contains message "hash") (string=? file (nar-error-file c)) (eq? source port)))))) (restore-file-set source)) #f))))))
Test end:
  result-kind: pass
  actual-value: #t
Group end: nar
# of expected passes      6
# of unexpected failures  2

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #4: containers.log --]
[-- Type: text/x-log; name="containers.log", Size: 3786 bytes --]

%%%% Starting test containers
Group begin: containers
Test begin:
  test-name: "call-with-container, user namespace"
  source-file: "tests/containers.scm"
  source-line: 37
  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: fail
  actual-value: #f
  actual-error: (system-error "open-file" "~A: ~S" ("No such file or directory" "/proc/-1/setgroups") (2))
Test begin:
  test-name: "call-with-container, uts namespace"
  source-file: "tests/containers.scm"
  source-line: 45
  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: fail
  actual-value: #f
  actual-error: (system-error "open-file" "~A: ~S" ("No such file or directory" "/proc/-1/setgroups") (2))
Test begin:
  test-name: "call-with-container, pid namespace"
  source-file: "tests/containers.scm"
  source-line: 55
  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: fail
  actual-value: #f
  actual-error: (system-error "open-file" "~A: ~S" ("No such file or directory" "/proc/-1/setgroups") (2))
Test begin:
  test-name: "call-with-container, mnt namespace"
  source-file: "tests/containers.scm"
  source-line: 70
  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: fail
  actual-value: #f
  actual-error: (system-error "open-file" "~A: ~S" ("No such file or directory" "/proc/-1/setgroups") (2))
Test begin:
  test-name: "call-with-container, all namespaces"
  source-file: "tests/containers.scm"
  source-line: 77
  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
  actual-error: (system-error "open-file" "~A: ~S" ("No such file or directory" "/proc/-1/setgroups") (2))
Test begin:
  test-name: "container-excursion"
  source-file: "tests/containers.scm"
  source-line: 83
  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)))))))
Test end:
  result-kind: fail
  actual-value: #f
  actual-error: (system-error "open-file" "~A: ~S" ("No such file or directory" "/proc/-1/setgroups") (2))
Group end: containers
# of unexpected failures  6

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #5: syscalls.log --]
[-- Type: text/x-log; name="syscalls.log", Size: 12428 bytes --]

%%%% Starting test syscalls
Group begin: syscalls
Test begin:
  test-name: "mount, ENOENT"
  source-file: "tests/syscalls.scm"
  source-line: 33
  source-form: (test-equal "mount, ENOENT" ENOENT (catch (quote system-error) (lambda () (mount "/dev/null" "/does-not-exist" "ext2") #f) (compose system-error-errno list)))
Test end:
  result-kind: pass
  actual-value: 2
  expected-value: 2
Test begin:
  test-name: "umount, ENOENT/EPERM"
  source-file: "tests/syscalls.scm"
  source-line: 41
  source-form: (test-assert "umount, ENOENT/EPERM" (catch (quote system-error) (lambda () (umount "/does-not-exist") #f) (lambda args (memv (system-error-errno args) (list EPERM ENOENT)))))
Test end:
  result-kind: pass
  actual-value: (1 2)
Test begin:
  test-name: "mount-points"
  source-file: "tests/syscalls.scm"
  source-line: 50
  source-form: (test-assert "mount-points" (any (cute member <> (mount-points)) (quote ("/" "/proc" "/sys" "/dev"))))
Test end:
  result-kind: pass
  actual-value: ("/" "/sys/kernel/security" "/dev/shm" "/run/lock" "/sys/fs/cgroup" "/sys/fs/cgroup/systemd" "/sys/fs/pstore" "/sys/fs/cgroup/blkio" "/sys/fs/cgroup/cpuset" "/sys/fs/cgroup/freezer" "/sys/fs/cgroup/cpu,cpuacct" "/sys/fs/cgroup/devices" "/sys/fs/cgroup/net_cls,net_prio" "/sys/fs/cgroup/perf_event" "/proc/sys/fs/binfmt_misc" "/dev/mqueue" "/sys/kernel/debug" "/dev/hugepages" "/boot" "/var" "/tmp" "/home" "/proc/sys/fs/binfmt_misc" "/run/user/1000")
Test begin:
  test-name: "swapon, ENOENT/EPERM"
  source-file: "tests/syscalls.scm"
  source-line: 56
  source-form: (test-assert "swapon, ENOENT/EPERM" (catch (quote system-error) (lambda () (swapon "/does-not-exist") #f) (lambda args (memv (system-error-errno args) (list EPERM ENOENT)))))
Test end:
  result-kind: pass
  actual-value: (1 2)
Test begin:
  test-name: "swapoff, ENOENT/EINVAL/EPERM"
  source-file: "tests/syscalls.scm"
  source-line: 64
  source-form: (test-assert "swapoff, ENOENT/EINVAL/EPERM" (catch (quote system-error) (lambda () (swapoff "/does-not-exist") #f) (lambda args (memv (system-error-errno args) (list EPERM EINVAL ENOENT)))))
Test end:
  result-kind: pass
  actual-value: (1 22 2)
Test begin:
  test-name: "mkdtemp!"
  source-file: "tests/syscalls.scm"
  source-line: 72
  source-form: (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))))
Test end:
  result-kind: pass
  actual-value: #t
Test begin:
  test-name: "clone"
  source-file: "tests/syscalls.scm"
  source-line: 85
  source-form: (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))))))))
Test end:
  result-kind: fail
  actual-value: #f
  actual-error: (system-error "readlink" "~A" ("No such file or directory") (2))
Test begin:
  test-name: "setns"
  source-file: "tests/syscalls.scm"
  source-line: 98
  source-form: (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 (quote 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))))))))
Test end:
  result-kind: fail
  actual-value: #f
  actual-error: (system-error "open-file" "~A: ~S" ("No such file or directory" "/proc/-1/ns/user") (2))
Test begin:
  test-name: "pivot-root"
  source-file: "tests/syscalls.scm"
  source-line: 127
  source-form: (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") (%%%% Starting test syscalls
Group begin: syscalls
Test begin:
  test-name: "mount, ENOENT"
  source-file: "tests/syscalls.scm"
  source-line: 33
  source-form: (test-equal "mount, ENOENT" ENOENT (catch (quote system-error) (lambda () (mount "/dev/null" "/does-not-exist" "ext2") #f) (compose system-error-errno list)))
Test end:
  result-kind: pass
  actual-value: 2
  expected-value: 2
Test begin:
  test-name: "umount, ENOENT/EPERM"
  source-file: "tests/syscalls.scm"
  source-line: 41
  source-form: (test-assert "umount, ENOENT/EPERM" (catch (quote system-error) (lambda () (umount "/does-not-exist") #f) (lambda args (memv (system-error-errno args) (list EPERM ENOENT)))))
Test end:
  result-kind: pass
  actual-value: (1 2)
Test begin:
  test-name: "mount-points"
  source-file: "tests/syscalls.scm"
  source-line: 50
  source-form: (test-assert "mount-points" (any (cute member <> (mount-points)) (quote ("/" "/proc" "/sys" "/dev"))))
Test end:
  result-kind: pass
  actual-value: ("/" "/sys/kernel/security" "/dev/shm" "/run/lock" "/sys/fs/cgroup" "/sys/fs/cgroup/systemd" "/sys/fs/pstore" "/sys/fs/cgroup/blkio" "/sys/fs/cgroup/cpuset" "/sys/fs/cgroup/freezer" "/sys/fs/cgroup/cpu,cpuacct" "/sys/fs/cgroup/devices" "/sys/fs/cgroup/net_cls,net_prio" "/sys/fs/cgroup/perf_event" "/proc/sys/fs/binfmt_misc" "/dev/mqueue" "/sys/kernel/debug" "/dev/hugepages" "/boot" "/var" "/tmp" "/home" "/proc/sys/fs/binfmt_misc" "/run/user/1000")
Test begin:
  test-name: "swapon, ENOENT/EPERM"
  source-file: "tests/syscalls.scm"
  source-line: 56
  source-form: (test-assert "swapon, ENOENT/EPERM" (catch (quote system-error) (lambda () (swapon "/does-not-exist") #f) (lambda args (memv (system-error-errno args) (list EPERM ENOENT)))))
Test end:
  result-kind: pass
  actual-value: (1 2)
Test begin:
  test-name: "swapoff, ENOENT/EINVAL/EPERM"
  source-file: "tests/syscalls.scm"
  source-line: 64
  source-form: (test-assert "swapoff, ENOENT/EINVAL/EPERM" (catch (quote system-error) (lambda () (swapoff "/does-not-exist") #f) (lambda args (memv (system-error-errno args) (list EPERM EINVAL ENOENT)))))
Test end:
  result-kind: pass
  actual-value: (1 22 2)
Test begin:
  test-name: "mkdtemp!"
  source-file: "tests/syscalls.scm"
  source-line: 72
  source-form: (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))))
Test end:
  result-kind: pass
  actual-value: #t
Test begin:
  test-name: "clone"
  source-file: "tests/syscalls.scm"
  source-line: 85
  source-form: (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))))))))
Test end:
  result-kind: fail
  actual-value: #f
  actual-error: (system-error "readlink" "~A" ("No such file or directory") (2))
Test begin:
  test-name: "setns"
  source-file: "tests/syscalls.scm"
  source-line: 98
  source-form: (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 (quote 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))))))))
Test end:
  result-kind: fail
  actual-value: #f
  actual-error: (system-error "readlink" "~A" ("No such file or directory") (2))
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))))))))
Test end:
  result-kind: fail
  actual-value: #f
  actual-error: (system-error "waitpid" "~A" ("No child processes") (10))
Test begin:
  test-name: "all-network-interface-names"
  source-file: "tests/syscalls.scm"
  source-line: 155
  source-form: (test-assert "all-network-interface-names" (match (all-network-interface-names) (((? string? names) ..1) (member "lo" names))))
Test end:
  result-kind: pass
  actual-value: ("lo")
Test begin:
  test-name: "network-interface-names"
  source-file: "tests/syscalls.scm"
  source-line: 160
  source-form: (test-assert "network-interface-names" (match (network-interface-names) (((? string? names) ..1) (lset<= string=? names (all-network-interface-names)))))
Test end:
  result-kind: pass
  actual-value: #t
Test begin:
  test-name: "network-interface-flags"
  source-file: "tests/syscalls.scm"
  source-line: 165
  source-form: (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))))))
Test end:
  result-kind: pass
  actual-value: #t
Test begin:
  test-name: "loopback-network-interface?"
  source-file: "tests/syscalls.scm"
  source-line: 172
  source-form: (test-equal "loopback-network-interface?" ENODEV (and (loopback-network-interface? "lo") (catch (quote system-error) (lambda () (loopback-network-interface? "nonexistent") #f) (lambda args (system-error-errno args)))))
Test end:
  result-kind: pass
  actual-value: 19
  expected-value: 19
Test begin:
  test-name: "set-network-interface-flags"
  source-file: "tests/syscalls.scm"
  source-line: 183
  source-form: (test-assert "set-network-interface-flags" (let ((sock (socket AF_INET SOCK_STREAM 0))) (catch (quote system-error) (lambda () (set-network-interface-flags sock "lo" IFF_UP)) (lambda args (close-port sock) (memv (system-error-errno args) (list EPERM EACCES))))))
Test end:
  result-kind: pass
  actual-value: (1 13)
Test begin:
  test-name: "network-interface-address lo"
  source-file: "tests/syscalls.scm"
  source-line: 193
  source-form: (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))
Test end:
  result-kind: pass
  actual-value: #(2 2130706433 0)
  expected-value: #(2 2130706433 0)
Test begin:
  test-name: "set-network-interface-address"
  source-file: "tests/syscalls.scm"
  source-line: 200
  source-form: (test-assert "set-network-interface-address" (let ((sock (socket AF_INET SOCK_STREAM 0))) (catch (quote 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))))))
Test end:
  result-kind: pass
  actual-value: (1 13)
Test begin:
  test-name: "network-interfaces returns one or more interfaces"
  source-file: "tests/syscalls.scm"
  source-line: 214
  source-form: (test-equal "network-interfaces returns one or more interfaces" (quote (#t #t #t)) (match (network-interfaces) ((interfaces ..1) (list (every interface? interfaces) (every string? (map interface-name interfaces)) (every vector? (map interface-address interfaces))))))
Test end:
  result-kind: pass
  actual-value: (#t #t #t)
  expected-value: (#t #t #t)
Test begin:
  test-name: "network-interfaces returns \"lo\""
  source-file: "tests/syscalls.scm"
  source-line: 222
  source-form: (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)))))))
Test end:
  result-kind: pass
  actual-value: (#t #(2 2130706433 0))
  expected-value: (#t #(2 2130706433 0))
Group end: syscalls
# of expected passes      15
# of unexpected failures  3

             reply	other threads:[~2015-08-17  6:27 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-17  3:43 Leo Famulari [this message]
2015-08-17 15:42 ` bug#21280: test failures: nar, syscalls, containers Thompson, David
2015-08-18  3:00   ` Leo Famulari
2015-08-18 21:54 ` Ludovic Courtès
2015-08-19  1:55   ` Leo Famulari
2015-08-19 23:14     ` Ludovic Courtès
2015-08-20  4:14       ` Leo Famulari
2015-08-20 10:02         ` Ludovic Courtès
     [not found]           ` <1440109544.937009.361720705.14632458@webmail.messagingengine.com>
2015-08-24 22:07             ` Ludovic Courtès
2015-08-25 17:38               ` Leo Famulari
2015-08-25 22:44                 ` Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1439783007.1743108.357849649.18351DEC@webmail.messagingengine.com \
    --to=leo@famulari.name \
    --cc=21280@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).