all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#21280: test failures: nar, syscalls, containers
@ 2015-08-17  3:43 Leo Famulari
  2015-08-17 15:42 ` Thompson, David
  2015-08-18 21:54 ` Ludovic Courtès
  0 siblings, 2 replies; 11+ messages in thread
From: Leo Famulari @ 2015-08-17  3:43 UTC (permalink / raw)
  To: 21280

[-- 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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* bug#21280: test failures: nar, syscalls, containers
  2015-08-17  3:43 bug#21280: test failures: nar, syscalls, containers Leo Famulari
@ 2015-08-17 15:42 ` Thompson, David
  2015-08-18  3:00   ` Leo Famulari
  2015-08-18 21:54 ` Ludovic Courtès
  1 sibling, 1 reply; 11+ messages in thread
From: Thompson, David @ 2015-08-17 15:42 UTC (permalink / raw)
  To: Leo Famulari; +Cc: 21280

On Sun, Aug 16, 2015 at 11:43 PM, Leo Famulari <leo@famulari.name> wrote:
> 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.

Thanks for the report.  I'm going to look into the issues with the
container and syscall tests.  Which version of Linux[-libre] are you
using?  It looks like you're using a kernel that doesn't properly
support containers, which we should detect and skip tests accordingly.

- Dave

^ permalink raw reply	[flat|nested] 11+ messages in thread

* bug#21280: test failures: nar, syscalls, containers
  2015-08-17 15:42 ` Thompson, David
@ 2015-08-18  3:00   ` Leo Famulari
  0 siblings, 0 replies; 11+ messages in thread
From: Leo Famulari @ 2015-08-18  3:00 UTC (permalink / raw)
  To: Thompson, David; +Cc: 21280

$ uname -a
Linux hostname 4.1.0-1-amd64 #1 SMP Debian 4.1.3-1 (2015-08-03) x86_64
GNU/Linux

This is Debian testing so things may be broken. Sorry, I didn't think of
that before submitting the report.

On Mon, Aug 17, 2015, at 11:42, Thompson, David wrote:
> On Sun, Aug 16, 2015 at 11:43 PM, Leo Famulari <leo@famulari.name> wrote:
> > 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.
> 
> Thanks for the report.  I'm going to look into the issues with the
> container and syscall tests.  Which version of Linux[-libre] are you
> using?  It looks like you're using a kernel that doesn't properly
> support containers, which we should detect and skip tests accordingly.
> 
> - Dave

^ permalink raw reply	[flat|nested] 11+ messages in thread

* bug#21280: test failures: nar, syscalls, containers
  2015-08-17  3:43 bug#21280: test failures: nar, syscalls, containers Leo Famulari
  2015-08-17 15:42 ` Thompson, David
@ 2015-08-18 21:54 ` Ludovic Courtès
  2015-08-19  1:55   ` Leo Famulari
  1 sibling, 1 reply; 11+ messages in thread
From: Ludovic Courtès @ 2015-08-18 21:54 UTC (permalink / raw)
  To: Leo Famulari; +Cc: 21280

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

Leo Famulari <leo@famulari.name> skribis:

> %%%% 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

What is the file system of /home/leo/work/guix (see the output of the
‘mount’ command)?

Could you apply this patch (copy it to a file and run
“patch -p1 < the-patch” from the top-level source directory):


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 635 bytes --]

diff --git a/tests/nar.scm b/tests/nar.scm
index b8e50c7..a47d522 100644
--- a/tests/nar.scm
+++ b/tests/nar.scm
@@ -211,6 +211,11 @@
           (cut write-file input <>))
         (call-with-input-file nar
           (cut restore-file <> output))
+        (setvbuf (current-output-port) _IONBF)
+        (system (string-append "find " input "|xargs stat -c '%n %s'|sort"))
+        (display "\n-----------\n")
+        (system (string-append "find " output "|xargs stat -c '%n %s'|sort"))
+        (display "\n+++++++++++\n")
         (file-tree-equal? input output))
       (lambda ()
         (false-if-exception (delete-file nar))

[-- Attachment #3: Type: text/plain, Size: 197 bytes --]


and then run “make check TESTS=tests/nar.scm” from the top-level build
directory, and post both the top-level ‘nar.log’ file and
‘tests/nar.log’?

Thanks in advance!

Ludo’.

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* bug#21280: test failures: nar, syscalls, containers
  2015-08-18 21:54 ` Ludovic Courtès
@ 2015-08-19  1:55   ` Leo Famulari
  2015-08-19 23:14     ` Ludovic Courtès
  0 siblings, 1 reply; 11+ messages in thread
From: Leo Famulari @ 2015-08-19  1:55 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 21280

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

On Tue, Aug 18, 2015, at 17:54, Ludovic Courtès wrote:
> What is the file system of /home/leo/work/guix (see the output of the
> ‘mount’ command)?

$ mount
[...]
/dev/mapper/hostname--vg-home on /home type btrfs (rw,relatime,space_cache)
[...]

> and then run “make check TESTS=tests/nar.scm” from the top-level build
> directory, and post both the top-level ‘nar.log’ file and
> ‘tests/nar.log’?

The logs are attached. I renamed tests/nar.log to tests-nar.log.

Let me know if you need more!

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: nar.log --]
[-- Type: text/x-log; name="nar.log", Size: 6041 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-4424/foo"
  expected-value: "./test-nar-4424/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)) (setvbuf (current-output-port) _IONBF) (system (string-append "find " input "|xargs stat -c '%n %s'|sort")) (display "\n-----------\n") (system (string-append "find " output "|xargs stat -c '%n %s'|sort")) (display "\n+++++++++++\n") (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: 224
  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: 256
  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: 280
  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: 300
  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 #3: tests-nar.log --]
[-- Type: text/x-log; name="tests-nar.log", Size: 21345 bytes --]

%%%% Starting test nar  (Writing full log to "nar.log")
./guix 1582
./guix/base32.go 22704
./guix/base32.scm 13079
./guix/base64.go 14948
./guix/base64.scm 10685
./guix/build 1368
./guix/build/cmake-build-system.go 3968
./guix/build/cmake-build-system.scm 3442
./guix/build/cvs.go 3728
./guix/build/cvs.scm 2532
./guix/build/download.go 24124
./guix/build/download.scm 19396
./guix/build/emacs-build-system.go 13989
./guix/build/emacs-build-system.scm 8036
./guix/build/emacs-utils.go 7223
./guix/build/emacs-utils.scm 4581
./guix/build/git.go 2344
./guix/build/git.scm 2447
./guix/build/glib-or-gtk-build-system.go 12968
./guix/build/glib-or-gtk-build-system.scm 11268
./guix/build/gnu-build-system.go 32311
./guix/build/gnu-build-system.scm 25221
./guix/build/gnu-dist.go 4626
./guix/build/gnu-dist.scm 3695
./guix/build/graft.go 5410
./guix/build/graft.scm 5402
./guix/build/gremlin.go 38048
./guix/build/gremlin.scm 11043
./guix/build/haskell-build-system.go 12215
./guix/build/haskell-build-system.scm 8491
./guix/build/perl-build-system.go 6001
./guix/build/perl-build-system.scm 3285
./guix/build/profiles.go 7557
./guix/build/profiles.scm 6018
./guix/build/pull.go 9593
./guix/build/pull.scm 6599
./guix/build/python-build-system.go 8997
./guix/build/python-build-system.scm 6262
./guix/build/rpath.go 2112
./guix/build/rpath.scm 1989
./guix/build/ruby-build-system.go 4875
./guix/build/ruby-build-system.scm 3375
./guix/build/store-copy.go 2375
./guix/build/store-copy.scm 2494
./guix/build/svn.go 1768
./guix/build/svn.scm 2109
./guix/build/syscalls.go 79988
./guix/build/syscalls.scm 31228
./guix/build-system 360
./guix/build-system/cmake.go 6765
./guix/build-system/cmake.scm 6232
./guix/build-system/emacs.go 5629
./guix/build-system/emacs.scm 5512
./guix/build-system/glib-or-gtk.go 9106
./guix/build-system/glib-or-gtk.scm 9206
./guix/build-system/gnu.go 29453
./guix/build-system/gnu.scm 22060
./guix/build-system.go 71687
./guix/build-system/haskell.go 5911
./guix/build-system/haskell.scm 5530
./guix/build-system/perl.go 5900
./guix/build-system/perl.scm 5559
./guix/build-system/python.go 9919
./guix/build-system/python.scm 7866
./guix/build-system/ruby.go 5623
./guix/build-system/ruby.scm 5039
./guix/build-system.scm 3910
./guix/build-system/trivial.go 4955
./guix/build-system/trivial.scm 3597
./guix/build-system/waf.go 5360
./guix/build-system/waf.scm 5147
./guix/build/union.go 6546
./guix/build/union.scm 5354
./guix/build/utils.go 57652
./guix/build/utils.scm 38004
./guix/build/waf-build-system.go 4480
./guix/build/waf-build-system.scm 2889
./guix/config.go 2219
./guix/config.scm 2541
./guix/config.scm.in 2351
./guix/cpio.go 69040
./guix/cpio.scm 8787
./guix/cvs-download.go 33037
./guix/cvs-download.scm 3285
./guix/derivations.go 167998
./guix/derivations.scm 57495
./guix/download.go 14365
./guix/download.scm 12767
./guix/elf.go 219845
./guix/elf.scm 43079
./guix/ftp-client.go 29710
./guix/ftp-client.scm 9892
./guix/gcrypt.go 1447
./guix/gcrypt.scm 1776
./guix/gexp.go 139318
./guix/gexp.scm 37717
./guix/git-download.go 33501
./guix/git-download.scm 3918
./guix/gnu-maintenance.go 108532
./guix/gnu-maintenance.scm 22047
./guix/gnupg.go 6845
./guix/gnupg.scm 7302
./guix/hash.go 7179
./guix/hash.scm 5005
./guix/http-client.go 10138
./guix/http-client.scm 9060
./guix/import 286
./guix/import/cabal.go 198744
./guix/import/cabal.scm 34375
./guix/import/cpan.go 11940
./guix/import/cpan.scm 7759
./guix/import/elpa.go 51292
./guix/import/elpa.scm 9035
./guix/import/gnu.go 6177
./guix/import/gnu.scm 4294
./guix/import/hackage.go 12206
./guix/import/hackage.scm 8474
./guix/import/json.go 1178
./guix/import/json.scm 1277
./guix/import/pypi.go 12917
./guix/import/pypi.scm 9027
./guix/import/snix.go 27952
./guix/import/snix.scm 17876
./guix/import/utils.go 4931
./guix/import/utils.scm 3484
./guix/licenses.go 32685
./guix/licenses.scm 12334
./guix/monad-repl.go 8457
./guix/monad-repl.scm 3588
./guix/monads.go 55342
./guix/monads.scm 12517
./guix/nar.go 13467
./guix/nar.scm 10694
./guix/packages.go 200056
./guix/packages.scm 42179
./guix/pk-crypto.go 39297
./guix/pk-crypto.scm 16494
./guix/pki.go 12968
./guix/pki.scm 8195
./guix/profiles.go 128990
./guix/profiles.scm 31626
./guix/records.go 29320
./guix/records.scm 15364
./guix/scripts 724
./guix/scripts/archive.go 19513
./guix/scripts/archive.scm 12977
./guix/scripts/authenticate.go 7794
./guix/scripts/authenticate.scm 5354
./guix/scripts/build.go 30700
./guix/scripts/build.scm 21215
./guix/scripts/download.go 6102
./guix/scripts/download.scm 4245
./guix/scripts/edit.go 4718
./guix/scripts/edit.scm 3036
./guix/scripts/environment.go 19733
./guix/scripts/environment.scm 12107
./guix/scripts/gc.go 13903
./guix/scripts/gc.scm 7969
./guix/scripts/hash.go 6468
./guix/scripts/hash.scm 4584
./guix/scripts/import 184
./guix/scripts/import/cpan.go 4142
./guix/scripts/import/cpan.scm 2899
./guix/scripts/import/elpa.go 4768
./guix/scripts/import/elpa.scm 3252
./guix/scripts/import/gnu.go 5056
./guix/scripts/import/gnu.scm 3589
./guix/scripts/import.go 5327
./guix/scripts/import/hackage.go 6935
./guix/scripts/import/hackage.scm 5366
./guix/scripts/import/nix.go 4221
./guix/scripts/import/nix.scm 2904
./guix/scripts/import/pypi.go 4142
./guix/scripts/import/pypi.scm 2894
./guix/scripts/import.scm 3557
./guix/scripts/lint.go 63235
./guix/scripts/lint.scm 25131
./guix/scripts/offload.go 106017
./guix/scripts/offload.scm 29483
./guix/scripts/package.go 56094
./guix/scripts/package.scm 41084
./guix/scripts/publish.go 22461
./guix/scripts/publish.scm 13817
./guix/scripts/pull.go 18752
./guix/scripts/pull.scm 9404
./guix/scripts/refresh.go 15303
./guix/scripts/refresh.scm 11725
./guix/scripts/size.go 41107
./guix/scripts/size.scm 11684
./guix/scripts/substitute.go 124242
./guix/scripts/substitute.scm 35674
./guix/scripts/system.go 38815
./guix/scripts/system.scm 21401
./guix/search-paths.go 44450
./guix/search-paths.scm 7924
./guix/serialization.go 19402
./guix/serialization.scm 13018
./guix/sets.go 28517
./guix/sets.scm 3610
./guix/store.go 146725
./guix/store.scm 41092
./guix/svn-download.go 29581
./guix/svn-download.scm 3042
./guix/tests.go 20208
./guix/tests.scm 9484
./guix/ui.go 70752
./guix/ui.scm 41191
./guix/utils.go 64387
./guix/utils.scm 28238

-----------
./test-nar-4424 1582
./test-nar-4424/base32.go 22704
./test-nar-4424/base32.scm 13079
./test-nar-4424/base64.go 14948
./test-nar-4424/base64.scm 10685
./test-nar-4424/build 1368
./test-nar-4424/build/cmake-build-system.go 3968
./test-nar-4424/build/cmake-build-system.scm 3442
./test-nar-4424/build/cvs.go 3728
./test-nar-4424/build/cvs.scm 2532
./test-nar-4424/build/download.go 24124
./test-nar-4424/build/download.scm 19396
./test-nar-4424/build/emacs-build-system.go 13989
./test-nar-4424/build/emacs-build-system.scm 8036
./test-nar-4424/build/emacs-utils.go 7223
./test-nar-4424/build/emacs-utils.scm 4581
./test-nar-4424/build/git.go 2344
./test-nar-4424/build/git.scm 2447
./test-nar-4424/build/glib-or-gtk-build-system.go 12968
./test-nar-4424/build/glib-or-gtk-build-system.scm 11268
./test-nar-4424/build/gnu-build-system.go 32311
./test-nar-4424/build/gnu-build-system.scm 25221
./test-nar-4424/build/gnu-dist.go 4626
./test-nar-4424/build/gnu-dist.scm 3695
./test-nar-4424/build/graft.go 5410
./test-nar-4424/build/graft.scm 5402
./test-nar-4424/build/gremlin.go 38048
./test-nar-4424/build/gremlin.scm 11043
./test-nar-4424/build/haskell-build-system.go 12215
./test-nar-4424/build/haskell-build-system.scm 8491
./test-nar-4424/build/perl-build-system.go 6001
./test-nar-4424/build/perl-build-system.scm 3285
./test-nar-4424/build/profiles.go 7557
./test-nar-4424/build/profiles.scm 6018
./test-nar-4424/build/pull.go 9593
./test-nar-4424/build/pull.scm 6599
./test-nar-4424/build/python-build-system.go 8997
./test-nar-4424/build/python-build-system.scm 6262
./test-nar-4424/build/rpath.go 2112
./test-nar-4424/build/rpath.scm 1989
./test-nar-4424/build/ruby-build-system.go 4875
./test-nar-4424/build/ruby-build-system.scm 3375
./test-nar-4424/build/store-copy.go 2375
./test-nar-4424/build/store-copy.scm 2494
./test-nar-4424/build/svn.go 1768
./test-nar-4424/build/svn.scm 2109
./test-nar-4424/build/syscalls.go 79988
./test-nar-4424/build/syscalls.scm 31228
./test-nar-4424/build-system 360
./test-nar-4424/build-system/cmake.go 6765
./test-nar-4424/build-system/cmake.scm 6232
./test-nar-4424/build-system/emacs.go 5629
./test-nar-4424/build-system/emacs.scm 5512
./test-nar-4424/build-system/glib-or-gtk.go 9106
./test-nar-4424/build-system/glib-or-gtk.scm 9206
./test-nar-4424/build-system/gnu.go 29453
./test-nar-4424/build-system/gnu.scm 22060
./test-nar-4424/build-system.go 71687
./test-nar-4424/build-system/haskell.go 5911
./test-nar-4424/build-system/haskell.scm 5530
./test-nar-4424/build-system/perl.go 5900
./test-nar-4424/build-system/perl.scm 5559
./test-nar-4424/build-system/python.go 9919
./test-nar-4424/build-system/python.scm 7866
./test-nar-4424/build-system/ruby.go 5623
./test-nar-4424/build-system/ruby.scm 5039
./test-nar-4424/build-system.scm 3910
./test-nar-4424/build-system/trivial.go 4955
./test-nar-4424/build-system/trivial.scm 3597
./test-nar-4424/build-system/waf.go 5360
./test-nar-4424/build-system/waf.scm 5147
./test-nar-4424/build/union.go 6546
./test-nar-4424/build/union.scm 5354
./test-nar-4424/build/utils.go 57652
./test-nar-4424/build/utils.scm 38004
./test-nar-4424/build/waf-build-system.go 4480
./test-nar-4424/build/waf-build-system.scm 2889
./test-nar-4424/config.go 2219
./test-nar-4424/config.scm 2541
./test-nar-4424/config.scm.in 2351
./test-nar-4424/cpio.go 69040
./test-nar-4424/cpio.scm 8787
./test-nar-4424/cvs-download.go 33037
./test-nar-4424/cvs-download.scm 3285
./test-nar-4424/derivations.go 167998
./test-nar-4424/derivations.scm 57495
./test-nar-4424/download.go 14365
./test-nar-4424/download.scm 12767
./test-nar-4424/elf.go 219845
./test-nar-4424/elf.scm 43079
./test-nar-4424/ftp-client.go 29710
./test-nar-4424/ftp-client.scm 9892
./test-nar-4424/gcrypt.go 1447
./test-nar-4424/gcrypt.scm 1776
./test-nar-4424/gexp.go 139318
./test-nar-4424/gexp.scm 37717
./test-nar-4424/git-download.go 33501
./test-nar-4424/git-download.scm 3918
./test-nar-4424/gnu-maintenance.go 108532
./test-nar-4424/gnu-maintenance.scm 22047
./test-nar-4424/gnupg.go 6845
./test-nar-4424/gnupg.scm 7302
./test-nar-4424/hash.go 7179
./test-nar-4424/hash.scm 5005
./test-nar-4424/http-client.go 10138
./test-nar-4424/http-client.scm 9060
./test-nar-4424/import 286
./test-nar-4424/import/cabal.go 198744
./test-nar-4424/import/cabal.scm 34375
./test-nar-4424/import/cpan.go 11940
./test-nar-4424/import/cpan.scm 7759
./test-nar-4424/import/elpa.go 51292
./test-nar-4424/import/elpa.scm 9035
./test-nar-4424/import/gnu.go 6177
./test-nar-4424/import/gnu.scm 4294
./test-nar-4424/import/hackage.go 12206
./test-nar-4424/import/hackage.scm 8474
./test-nar-4424/import/json.go 1178
./test-nar-4424/import/json.scm 1277
./test-nar-4424/import/pypi.go 12917
./test-nar-4424/import/pypi.scm 9027
./test-nar-4424/import/snix.go 27952
./test-nar-4424/import/snix.scm 17876
./test-nar-4424/import/utils.go 4931
./test-nar-4424/import/utils.scm 3484
./test-nar-4424/licenses.go 32685
./test-nar-4424/licenses.scm 12334
./test-nar-4424/monad-repl.go 8457
./test-nar-4424/monad-repl.scm 3588
./test-nar-4424/monads.go 55342
./test-nar-4424/monads.scm 12517
./test-nar-4424/nar.go 13467
./test-nar-4424/nar.scm 10694
./test-nar-4424/packages.go 200056
./test-nar-4424/packages.scm 42179
./test-nar-4424/pk-crypto.go 39297
./test-nar-4424/pk-crypto.scm 16494
./test-nar-4424/pki.go 12968
./test-nar-4424/pki.scm 8195
./test-nar-4424/profiles.go 128990
./test-nar-4424/profiles.scm 31626
./test-nar-4424/records.go 29320
./test-nar-4424/records.scm 15364
./test-nar-4424/scripts 724
./test-nar-4424/scripts/archive.go 19513
./test-nar-4424/scripts/archive.scm 12977
./test-nar-4424/scripts/authenticate.go 7794
./test-nar-4424/scripts/authenticate.scm 5354
./test-nar-4424/scripts/build.go 30700
./test-nar-4424/scripts/build.scm 21215
./test-nar-4424/scripts/download.go 6102
./test-nar-4424/scripts/download.scm 4245
./test-nar-4424/scripts/edit.go 4718
./test-nar-4424/scripts/edit.scm 3036
./test-nar-4424/scripts/environment.go 19733
./test-nar-4424/scripts/environment.scm 12107
./test-nar-4424/scripts/gc.go 13903
./test-nar-4424/scripts/gc.scm 7969
./test-nar-4424/scripts/hash.go 6468
./test-nar-4424/scripts/hash.scm 4584
./test-nar-4424/scripts/import 184
./test-nar-4424/scripts/import/cpan.go 4142
./test-nar-4424/scripts/import/cpan.scm 2899
./test-nar-4424/scripts/import/elpa.go 4768
./test-nar-4424/scripts/import/elpa.scm 3252
./test-nar-4424/scripts/import/gnu.go 5056
./test-nar-4424/scripts/import/gnu.scm 3589
./test-nar-4424/scripts/import.go 5327
./test-nar-4424/scripts/import/hackage.go 6935
./test-nar-4424/scripts/import/hackage.scm 5366
./test-nar-4424/scripts/import/nix.go 4221
./test-nar-4424/scripts/import/nix.scm 2904
./test-nar-4424/scripts/import/pypi.go 4142
./test-nar-4424/scripts/import/pypi.scm 2894
./test-nar-4424/scripts/import.scm 3557
./test-nar-4424/scripts/lint.go 63235
./test-nar-4424/scripts/lint.scm 25131
./test-nar-4424/scripts/offload.go 106017
./test-nar-4424/scripts/offload.scm 29483
./test-nar-4424/scripts/package.go 56094
./test-nar-4424/scripts/package.scm 41084
./test-nar-4424/scripts/publish.go 22461
./test-nar-4424/scripts/publish.scm 13817
./test-nar-4424/scripts/pull.go 18752
./test-nar-4424/scripts/pull.scm 9404
./test-nar-4424/scripts/refresh.go 15303
./test-nar-4424/scripts/refresh.scm 11725
./test-nar-4424/scripts/size.go 41107
./test-nar-4424/scripts/size.scm 11684
./test-nar-4424/scripts/substitute.go 124242
./test-nar-4424/scripts/substitute.scm 35674
./test-nar-4424/scripts/system.go 38815
./test-nar-4424/scripts/system.scm 21401
./test-nar-4424/search-paths.go 44450
./test-nar-4424/search-paths.scm 7924
./test-nar-4424/serialization.go 19402
./test-nar-4424/serialization.scm 13018
./test-nar-4424/sets.go 28517
./test-nar-4424/sets.scm 3610
./test-nar-4424/store.go 146725
./test-nar-4424/store.scm 41092
./test-nar-4424/svn-download.go 29581
./test-nar-4424/svn-download.scm 3042
./test-nar-4424/tests.go 20208
./test-nar-4424/tests.scm 9484
./test-nar-4424/ui.go 70752
./test-nar-4424/ui.scm 41191
./test-nar-4424/utils.go 64387
./test-nar-4424/utils.scm 28238

+++++++++++
tests/nar.scm:202: FAIL write-file + restore-file
tests/nar.scm:224: FAIL write-file + restore-file with symlinks
accepted connection from pid 4424, user leo
random seed for tests: 1439953317
;;; 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/hf5zb1hcjfmwvvbvmc6b1mfyg1k5nnkk-text'
exporting path `/home/leo/work/guix/test-tmp/store/6h2hvz1kzd63hmsfxr8gdvv6nhash36m-text'
exporting path `/home/leo/work/guix/test-tmp/store/ysz274a78dk20ixg1x6n16mc58vj72pl-text'
exporting path `/home/leo/work/guix/test-tmp/store/psq9fk66mk8145rfxv8524scpgazy31c-text'
exporting path `/home/leo/work/guix/test-tmp/store/p96iyfndz0rcn1jxa90slw91d2b8fsg6-text'
exporting path `/home/leo/work/guix/test-tmp/store/v50ba0h8jign8cmfcshalq455qw762yr-text'
exporting path `/home/leo/work/guix/test-tmp/store/8d4jgz062xm61xqs0jjhp7wqh91gsyld-text'
exporting path `/home/leo/work/guix/test-tmp/store/lc3rm5gk5z1pcb6ris4a7r617jcdy362-text'
exporting path `/home/leo/work/guix/test-tmp/store/ikaiwkipci4krqwjj51ibj93mwfyzryx-text'
exporting path `/home/leo/work/guix/test-tmp/store/5v3banpgmz8nrfw4ad2l6grcp9zfml5c-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/4415/cache-4415/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/4415/temproots/4442'
deleting `/home/leo/work/guix/test-tmp/store/5v3banpgmz8nrfw4ad2l6grcp9zfml5c-text'
deleting `/home/leo/work/guix/test-tmp/store/6h2hvz1kzd63hmsfxr8gdvv6nhash36m-text'
deleting `/home/leo/work/guix/test-tmp/store/8d4jgz062xm61xqs0jjhp7wqh91gsyld-text'
deleting `/home/leo/work/guix/test-tmp/store/hf5zb1hcjfmwvvbvmc6b1mfyg1k5nnkk-text'
deleting `/home/leo/work/guix/test-tmp/store/ikaiwkipci4krqwjj51ibj93mwfyzryx-text'
deleting `/home/leo/work/guix/test-tmp/store/lc3rm5gk5z1pcb6ris4a7r617jcdy362-text'
deleting `/home/leo/work/guix/test-tmp/store/p96iyfndz0rcn1jxa90slw91d2b8fsg6-text'
deleting `/home/leo/work/guix/test-tmp/store/psq9fk66mk8145rfxv8524scpgazy31c-text'
deleting `/home/leo/work/guix/test-tmp/store/v50ba0h8jign8cmfcshalq455qw762yr-text'
deleting `/home/leo/work/guix/test-tmp/store/ysz274a78dk20ixg1x6n16mc58vj72pl-text'
deleting `/home/leo/work/guix/test-tmp/store/trash'
deleting unused links...
note: currently hard linking saves 19.85 MiB
accepted connection from pid 4424, user leo
accepted connection from pid 4424, user leo
accepted connection from pid 4424, user leo
accepted connection from pid 4424, user leo
accepted connection from pid 4424, user leo
accepted connection from pid 4424, user leo
accepted connection from pid 4424, user leo
accepted connection from pid 4424, user leo
accepted connection from pid 4424, user leo
accepted connection from pid 4424, user leo
accepted connection from pid 4424, user leo
accepted connection from pid 4424, user leo
accepted connection from pid 4424, user leo
accepted connection from pid 4424, user leo
accepted connection from pid 4424, user leo
accepted connection from pid 4424, user leo
accepted connection from pid 4424, user leo
accepted connection from pid 4424, user leo
accepted connection from pid 4424, user leo
accepted connection from pid 4424, user leo
accepted connection from pid 4424, user leo
importing file or directory '/home/leo/work/guix/test-tmp/store/hf5zb1hcjfmwvvbvmc6b1mfyg1k5nnkk-text'...
found valid signature for '/home/leo/work/guix/test-tmp/store/hf5zb1hcjfmwvvbvmc6b1mfyg1k5nnkk-text'
importing file or directory '/home/leo/work/guix/test-tmp/store/6h2hvz1kzd63hmsfxr8gdvv6nhash36m-text'...
found valid signature for '/home/leo/work/guix/test-tmp/store/6h2hvz1kzd63hmsfxr8gdvv6nhash36m-text'
importing file or directory '/home/leo/work/guix/test-tmp/store/ysz274a78dk20ixg1x6n16mc58vj72pl-text'...
found valid signature for '/home/leo/work/guix/test-tmp/store/ysz274a78dk20ixg1x6n16mc58vj72pl-text'
importing file or directory '/home/leo/work/guix/test-tmp/store/psq9fk66mk8145rfxv8524scpgazy31c-text'...
found valid signature for '/home/leo/work/guix/test-tmp/store/psq9fk66mk8145rfxv8524scpgazy31c-text'
importing file or directory '/home/leo/work/guix/test-tmp/store/p96iyfndz0rcn1jxa90slw91d2b8fsg6-text'...
found valid signature for '/home/leo/work/guix/test-tmp/store/p96iyfndz0rcn1jxa90slw91d2b8fsg6-text'
importing file or directory '/home/leo/work/guix/test-tmp/store/v50ba0h8jign8cmfcshalq455qw762yr-text'...
found valid signature for '/home/leo/work/guix/test-tmp/store/v50ba0h8jign8cmfcshalq455qw762yr-text'
importing file or directory '/home/leo/work/guix/test-tmp/store/8d4jgz062xm61xqs0jjhp7wqh91gsyld-text'...
found valid signature for '/home/leo/work/guix/test-tmp/store/8d4jgz062xm61xqs0jjhp7wqh91gsyld-text'
importing file or directory '/home/leo/work/guix/test-tmp/store/lc3rm5gk5z1pcb6ris4a7r617jcdy362-text'...
found valid signature for '/home/leo/work/guix/test-tmp/store/lc3rm5gk5z1pcb6ris4a7r617jcdy362-text'
importing file or directory '/home/leo/work/guix/test-tmp/store/ikaiwkipci4krqwjj51ibj93mwfyzryx-text'...
found valid signature for '/home/leo/work/guix/test-tmp/store/ikaiwkipci4krqwjj51ibj93mwfyzryx-text'
importing file or directory '/home/leo/work/guix/test-tmp/store/5v3banpgmz8nrfw4ad2l6grcp9zfml5c-text'...
found valid signature for '/home/leo/work/guix/test-tmp/store/5v3banpgmz8nrfw4ad2l6grcp9zfml5c-text'
exporting path `/home/leo/work/guix/test-tmp/store/mv0nqlc35c8xzmrw3pnlpm7cwxixpfx0-foo'
finding garbage collector roots...
removing stale temporary roots file `/home/leo/work/guix/test-tmp/var/4415/temproots/4530'
deleting `/home/leo/work/guix/test-tmp/store/mv0nqlc35c8xzmrw3pnlpm7cwxixpfx0-foo'
deleting `/home/leo/work/guix/test-tmp/store/trash'
deleting unused links...
note: currently hard linking saves 19.85 MiB
accepted connection from pid 4424, user leo
accepted connection from pid 4424, user leo
importing file or directory '/home/leo/work/guix/test-tmp/store/mv0nqlc35c8xzmrw3pnlpm7cwxixpfx0-foo'...
exporting path `/home/leo/work/guix/test-tmp/store/krb00m0hbygrk40xpnamdj6g38i4z0vw-foo'
finding garbage collector roots...
removing stale temporary roots file `/home/leo/work/guix/test-tmp/var/4415/temproots/4541'
deleting `/home/leo/work/guix/test-tmp/store/krb00m0hbygrk40xpnamdj6g38i4z0vw-foo'
deleting `/home/leo/work/guix/test-tmp/store/trash'
deleting unused links...
note: currently hard linking saves 19.85 MiB
accepted connection from pid 4424, user leo
# of expected passes      6
# of unexpected failures  2
importing file or directory '/home/leo/work/guix/test-tmp/store/krb00m0hbygrk40xpnamdj6g38i4z0vw-foo'...
FAIL tests/nar.scm (exit status: 1)

^ permalink raw reply	[flat|nested] 11+ messages in thread

* bug#21280: test failures: nar, syscalls, containers
  2015-08-19  1:55   ` Leo Famulari
@ 2015-08-19 23:14     ` Ludovic Courtès
  2015-08-20  4:14       ` Leo Famulari
  0 siblings, 1 reply; 11+ messages in thread
From: Ludovic Courtès @ 2015-08-19 23:14 UTC (permalink / raw)
  To: Leo Famulari; +Cc: 21280

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

Leo Famulari <leo@famulari.name> skribis:

> On Tue, Aug 18, 2015, at 17:54, Ludovic Courtès wrote:
>> What is the file system of /home/leo/work/guix (see the output of the
>> ‘mount’ command)?
>
> $ mount
> [...]
> /dev/mapper/hostname--vg-home on /home type btrfs (rw,relatime,space_cache)
> [...]

OK.

>> and then run “make check TESTS=tests/nar.scm” from the top-level build
>> directory, and post both the top-level ‘nar.log’ file and
>> ‘tests/nar.log’?
>
> The logs are attached. I renamed tests/nar.log to tests-nar.log.

Hmm the output of ‘find’ in tests/nar.log suggests that the files are
indeed identical, so maybe it’s ‘file-tree-equal?’ that’s not working as
expected.

Could you try this patch and send tests/nar.log again?


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 1052 bytes --]

diff --git a/tests/nar.scm b/tests/nar.scm
index b8e50c7..37a357b 100644
--- a/tests/nar.scm
+++ b/tests/nar.scm
@@ -112,7 +112,8 @@
   (file-system-fold (const #t)
                     (lambda (name stat result)    ; leaf
                       (and result
-                           (file=? name (sibling name))))
+                           (pk 'file=? name (sibling name)
+                               (file=? name (sibling name)))))
                     (lambda (name stat result)    ; down
                       result)
                     (lambda (name stat result)    ; up

diff --git a/guix/tests.scm b/guix/tests.scm
index cd8eda2..efa1a6f 100644
--- a/guix/tests.scm
+++ b/guix/tests.scm
@@ -101,7 +101,8 @@
 
 (define (file=? a b)
   "Return true if files A and B have the same type and same content."
-  (and (eq? (stat:type (lstat a)) (stat:type (lstat b)))
+  (and (eq? (pk 'stat a  (stat:type (lstat a)))
+            (pk 'stat2 b (stat:type (lstat b))))
        (case (stat:type (lstat a))
          ((regular)
           (equal?

[-- Attachment #3: Type: text/plain, Size: 32 bytes --]


Thanks in advance,
Ludo’.

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* bug#21280: test failures: nar, syscalls, containers
  2015-08-19 23:14     ` Ludovic Courtès
@ 2015-08-20  4:14       ` Leo Famulari
  2015-08-20 10:02         ` Ludovic Courtès
  0 siblings, 1 reply; 11+ messages in thread
From: Leo Famulari @ 2015-08-20  4:14 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 21280

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

I applied the patch on a clean checkout of
8a0263f17b9c754f6de7ee0b869249e87bfb7e3f (gnu: tk: Build with Xft
support.). No luck.

On Wed, Aug 19, 2015, at 19:14, Ludovic Courtès wrote:
> Leo Famulari <leo@famulari.name> skribis:
> 
> > On Tue, Aug 18, 2015, at 17:54, Ludovic Courtès wrote:
> >> What is the file system of /home/leo/work/guix (see the output of the
> >> ‘mount’ command)?
> >
> > $ mount
> > [...]
> > /dev/mapper/hostname--vg-home on /home type btrfs (rw,relatime,space_cache)
> > [...]
> 
> OK.
> 
> >> and then run “make check TESTS=tests/nar.scm” from the top-level build
> >> directory, and post both the top-level ‘nar.log’ file and
> >> ‘tests/nar.log’?
> >
> > The logs are attached. I renamed tests/nar.log to tests-nar.log.
> 
> Hmm the output of ‘find’ in tests/nar.log suggests that the files are
> indeed identical, so maybe it’s ‘file-tree-equal?’ that’s not working as
> expected.
> 
> Could you try this patch and send tests/nar.log again?
> 
> 
> Thanks in advance,
> Ludo’.
> Email had 1 attachment:
> + Attachment2
>   1k (text/x-patch)

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: nar.log --]
[-- Type: text/x-log; name="nar.log", Size: 5807 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: 166
  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: 173
  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: 194
  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-9241/foo"
  expected-value: "./test-nar-9241/foo"
Test begin:
  test-name: "write-file + restore-file"
  source-file: "tests/nar.scm"
  source-line: 203
  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: 220
  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: 252
  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: 276
  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: 296
  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 #3: tests-nar.log --]
[-- Type: text/x-log; name="tests-nar.log", Size: 7017 bytes --]

accepted connection from pid 9241, user leo
random seed for tests: 1440052338
;;; 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/w01rkdiflkhgmdypxjrhfhsl6a5zfbrg-text'
exporting path `/home/leo/work/guix/test-tmp/store/1ayns837ggrnhhkiak5h56bjvmyifnix-text'
exporting path `/home/leo/work/guix/test-tmp/store/bacw6kb6yjk419w0bylzm708hb3jg2nl-text'
exporting path `/home/leo/work/guix/test-tmp/store/5bxmx8amvvraf6nbdpc7gd74sb2w2qpv-text'
exporting path `/home/leo/work/guix/test-tmp/store/93zpbafmccdw1p7kv365k3a39ss79yw0-text'
exporting path `/home/leo/work/guix/test-tmp/store/zmk176hzqyrlsy8vis38w0f51f5pxbn1-text'
exporting path `/home/leo/work/guix/test-tmp/store/i10l3ng7d2rb702l0ccmb5wfka1kc6nf-text'
exporting path `/home/leo/work/guix/test-tmp/store/phi07kjvhlpqhgch8g1xqjfqh71mvggc-text'
exporting path `/home/leo/work/guix/test-tmp/store/2l2kkrghb0iwi8c35hyl1ziikvnmgr8g-text'
exporting path `/home/leo/work/guix/test-tmp/store/hf8ghc3qj5whndiy2w307lylgp4wi5lp-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/9232/cache-9232/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/9232/temproots/9249'
deleting `/home/leo/work/guix/test-tmp/store/1ayns837ggrnhhkiak5h56bjvmyifnix-text'
deleting `/home/leo/work/guix/test-tmp/store/2l2kkrghb0iwi8c35hyl1ziikvnmgr8g-text'
deleting `/home/leo/work/guix/test-tmp/store/5bxmx8amvvraf6nbdpc7gd74sb2w2qpv-text'
deleting `/home/leo/work/guix/test-tmp/store/93zpbafmccdw1p7kv365k3a39ss79yw0-text'
deleting `/home/leo/work/guix/test-tmp/store/bacw6kb6yjk419w0bylzm708hb3jg2nl-text'
deleting `/home/leo/work/guix/test-tmp/store/hf8ghc3qj5whndiy2w307lylgp4wi5lp-text'
deleting `/home/leo/work/guix/test-tmp/store/i10l3ng7d2rb702l0ccmb5wfka1kc6nf-text'
deleting `/home/leo/work/guix/test-tmp/store/phi07kjvhlpqhgch8g1xqjfqh71mvggc-text'
deleting `/home/leo/work/guix/test-tmp/store/w01rkdiflkhgmdypxjrhfhsl6a5zfbrg-text'
deleting `/home/leo/work/guix/test-tmp/store/zmk176hzqyrlsy8vis38w0f51f5pxbn1-text'
deleting `/home/leo/work/guix/test-tmp/store/trash'
deleting unused links...
note: currently hard linking saves 20.39 MiB
accepted connection from pid 9241, user leo
accepted connection from pid 9241, user leo
accepted connection from pid 9241, user leo
spurious SIGPOLL
accepted connection from pid 9241, user leo
accepted connection from pid 9241, user leo
accepted connection from pid 9241, user leo
accepted connection from pid 9241, user leo
accepted connection from pid 9241, user leo
accepted connection from pid 9241, user leo
accepted connection from pid 9241, user leo
accepted connection from pid 9241, user leo
accepted connection from pid 9241, user leo
accepted connection from pid 9241, user leo
accepted connection from pid 9241, user leo
accepted connection from pid 9241, user leo
accepted connection from pid 9241, user leo
accepted connection from pid 9241, user leo
accepted connection from pid 9241, user leo
accepted connection from pid 9241, user leo
accepted connection from pid 9241, user leo
accepted connection from pid 9241, user leo
importing file or directory '/home/leo/work/guix/test-tmp/store/w01rkdiflkhgmdypxjrhfhsl6a5zfbrg-text'...
found valid signature for '/home/leo/work/guix/test-tmp/store/w01rkdiflkhgmdypxjrhfhsl6a5zfbrg-text'
importing file or directory '/home/leo/work/guix/test-tmp/store/1ayns837ggrnhhkiak5h56bjvmyifnix-text'...
found valid signature for '/home/leo/work/guix/test-tmp/store/1ayns837ggrnhhkiak5h56bjvmyifnix-text'
importing file or directory '/home/leo/work/guix/test-tmp/store/bacw6kb6yjk419w0bylzm708hb3jg2nl-text'...
found valid signature for '/home/leo/work/guix/test-tmp/store/bacw6kb6yjk419w0bylzm708hb3jg2nl-text'
importing file or directory '/home/leo/work/guix/test-tmp/store/5bxmx8amvvraf6nbdpc7gd74sb2w2qpv-text'...
found valid signature for '/home/leo/work/guix/test-tmp/store/5bxmx8amvvraf6nbdpc7gd74sb2w2qpv-text'
importing file or directory '/home/leo/work/guix/test-tmp/store/93zpbafmccdw1p7kv365k3a39ss79yw0-text'...
found valid signature for '/home/leo/work/guix/test-tmp/store/93zpbafmccdw1p7kv365k3a39ss79yw0-text'
importing file or directory '/home/leo/work/guix/test-tmp/store/zmk176hzqyrlsy8vis38w0f51f5pxbn1-text'...
found valid signature for '/home/leo/work/guix/test-tmp/store/zmk176hzqyrlsy8vis38w0f51f5pxbn1-text'
importing file or directory '/home/leo/work/guix/test-tmp/store/i10l3ng7d2rb702l0ccmb5wfka1kc6nf-text'...
found valid signature for '/home/leo/work/guix/test-tmp/store/i10l3ng7d2rb702l0ccmb5wfka1kc6nf-text'
importing file or directory '/home/leo/work/guix/test-tmp/store/phi07kjvhlpqhgch8g1xqjfqh71mvggc-text'...
found valid signature for '/home/leo/work/guix/test-tmp/store/phi07kjvhlpqhgch8g1xqjfqh71mvggc-text'
importing file or directory '/home/leo/work/guix/test-tmp/store/2l2kkrghb0iwi8c35hyl1ziikvnmgr8g-text'...
found valid signature for '/home/leo/work/guix/test-tmp/store/2l2kkrghb0iwi8c35hyl1ziikvnmgr8g-text'
importing file or directory '/home/leo/work/guix/test-tmp/store/hf8ghc3qj5whndiy2w307lylgp4wi5lp-text'...
found valid signature for '/home/leo/work/guix/test-tmp/store/hf8ghc3qj5whndiy2w307lylgp4wi5lp-text'
exporting path `/home/leo/work/guix/test-tmp/store/2m7svhs0d8jnmqkfnibm5b6f8d3f4sk4-foo'
finding garbage collector roots...
removing stale temporary roots file `/home/leo/work/guix/test-tmp/var/9232/temproots/9343'
deleting `/home/leo/work/guix/test-tmp/store/2m7svhs0d8jnmqkfnibm5b6f8d3f4sk4-foo'
deleting `/home/leo/work/guix/test-tmp/store/trash'
deleting unused links...
note: currently hard linking saves 20.39 MiB
accepted connection from pid 9241, user leo
accepted connection from pid 9241, user leo
importing file or directory '/home/leo/work/guix/test-tmp/store/2m7svhs0d8jnmqkfnibm5b6f8d3f4sk4-foo'...
exporting path `/home/leo/work/guix/test-tmp/store/mpfh5a0zjsjn6fyz94isvn113jx3rrjg-foo'
finding garbage collector roots...
removing stale temporary roots file `/home/leo/work/guix/test-tmp/var/9232/temproots/9351'
deleting `/home/leo/work/guix/test-tmp/store/mpfh5a0zjsjn6fyz94isvn113jx3rrjg-foo'
deleting `/home/leo/work/guix/test-tmp/store/trash'
deleting unused links...
note: currently hard linking saves 20.39 MiB
accepted connection from pid 9241, user leo
%%%% Starting test nar  (Writing full log to "nar.log")
tests/nar.scm:203: FAIL write-file + restore-file
tests/nar.scm:220: 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/mpfh5a0zjsjn6fyz94isvn113jx3rrjg-foo'...
FAIL tests/nar.scm (exit status: 1)

^ permalink raw reply	[flat|nested] 11+ messages in thread

* bug#21280: test failures: nar, syscalls, containers
  2015-08-20  4:14       ` Leo Famulari
@ 2015-08-20 10:02         ` Ludovic Courtès
       [not found]           ` <1440109544.937009.361720705.14632458@webmail.messagingengine.com>
  0 siblings, 1 reply; 11+ messages in thread
From: Ludovic Courtès @ 2015-08-20 10:02 UTC (permalink / raw)
  To: Leo Famulari; +Cc: 21280

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

One last ‘pk’.  Could you apply it and resend tests/nar.log?


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 484 bytes --]

diff --git a/tests/nar.scm b/tests/nar.scm
index b8e50c7..9b39913 100644
--- a/tests/nar.scm
+++ b/tests/nar.scm
@@ -121,7 +122,8 @@
                     (lambda (name stat errno result)
                       (pk 'error name stat errno)
                       #f)
-                    (> (stat:nlink (stat output)) 2)
+                    (> (pk 'stat-output output
+                           (stat:nlink (stat output))) 2)
                     input
                     lstat))
 

[-- Attachment #3: Type: text/plain, Size: 123 bytes --]


I suspect the ‘nlink’ count on directories work differently on btrfs, or
something like that.

Thanks,
Ludo’.

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* bug#21280: test failures: nar, syscalls, containers
       [not found]           ` <1440109544.937009.361720705.14632458@webmail.messagingengine.com>
@ 2015-08-24 22:07             ` Ludovic Courtès
  2015-08-25 17:38               ` Leo Famulari
  0 siblings, 1 reply; 11+ messages in thread
From: Ludovic Courtès @ 2015-08-24 22:07 UTC (permalink / raw)
  To: Leo Famulari; +Cc: 21280

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

Leo Famulari <leo@famulari.name> skribis:

> On Thu, Aug 20, 2015, at 06:02, Ludovic Courtès wrote:

[...]

>> I suspect the ‘nlink’ count on directories work differently on btrfs, or
>> something like that.

[...]

> %%%% Starting test nar  (Writing full log to "nar.log")
>
> ;;; (stat-output "./test-nar-7151" 1)
> tests/nar.scm:203: FAIL write-file + restore-file
>
> ;;; (stat-output "./test-nar-7151" 1)
> tests/nar.scm:220: FAIL write-file + restore-file with symlinks

Indeed, that confirms what I thought.

This looks like buggy or at least borderline behavior from Btrfs.
However, it seems that this ‘nlink’ test can be sidestepped altogether.

Could you apply this last patch and run:

  make check TESTS=tests/nar.scm

again?

If it works for you, I’ll just apply it.

Thanks!

Ludo’.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 401 bytes --]

diff --git a/tests/nar.scm b/tests/nar.scm
index b8e50c7..58adb95 100644
--- a/tests/nar.scm
+++ b/tests/nar.scm
@@ -121,7 +121,7 @@
                     (lambda (name stat errno result)
                       (pk 'error name stat errno)
                       #f)
-                    (> (stat:nlink (stat output)) 2)
+                    #t
                     input
                     lstat))
 

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* bug#21280: test failures: nar, syscalls, containers
  2015-08-24 22:07             ` Ludovic Courtès
@ 2015-08-25 17:38               ` Leo Famulari
  2015-08-25 22:44                 ` Ludovic Courtès
  0 siblings, 1 reply; 11+ messages in thread
From: Leo Famulari @ 2015-08-25 17:38 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 21280

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

Success!

# TOTAL: 1
# PASS:  1
# SKIP:  0
# XFAIL: 0
# FAIL:  0
# XPASS: 0
# ERROR: 0

I've attached the logs again, just in case.

Thanks for looking into this!

On Mon, Aug 24, 2015, at 18:07, Ludovic Courtès wrote:
> Leo Famulari <leo@famulari.name> skribis:
> 
> > On Thu, Aug 20, 2015, at 06:02, Ludovic Courtès wrote:
> 
> [...]
> 
> >> I suspect the ‘nlink’ count on directories work differently on btrfs, or
> >> something like that.
> 
> [...]
> 
> > %%%% Starting test nar  (Writing full log to "nar.log")
> >
> > ;;; (stat-output "./test-nar-7151" 1)
> > tests/nar.scm:203: FAIL write-file + restore-file
> >
> > ;;; (stat-output "./test-nar-7151" 1)
> > tests/nar.scm:220: FAIL write-file + restore-file with symlinks
> 
> Indeed, that confirms what I thought.
> 
> This looks like buggy or at least borderline behavior from Btrfs.
> However, it seems that this ‘nlink’ test can be sidestepped altogether.
> 
> Could you apply this last patch and run:
> 
>   make check TESTS=tests/nar.scm
> 
> again?
> 
> If it works for you, I’ll just apply it.
> 
> Thanks!
> 
> Ludo’.
> 
> Email had 1 attachment:
> + Attachment2
>   1k (text/x-patch)

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: nar.log --]
[-- Type: text/x-log; name="nar.log", Size: 5781 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-27645/foo"
  expected-value: "./test-nar-27645/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: pass
  actual-value: #t
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: pass
  actual-value: #t
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      8

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

accepted connection from pid 27645, user leo
random seed for tests: 1440533627
;;; 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/jax64vzybc0fihd1ial8c3pxfzpajjgb-text'
exporting path `/home/leo/work/guix/test-tmp/store/xmp9h8gch8h99bdkk84jc3yaj3zyarg1-text'
exporting path `/home/leo/work/guix/test-tmp/store/zqggfm0h42n27pgl2dbag4qak3925382-text'
exporting path `/home/leo/work/guix/test-tmp/store/9ffbad3x4q7ahfywqi43zacsznckbi2c-text'
exporting path `/home/leo/work/guix/test-tmp/store/w40l6fbgyx64rrpprp8h39s1sdrimr13-text'
exporting path `/home/leo/work/guix/test-tmp/store/xamxgi30kn7w31imjxsczrp4943jp12f-text'
exporting path `/home/leo/work/guix/test-tmp/store/ra03idj61qiihncdvhl7l0fsl0y46akh-text'
exporting path `/home/leo/work/guix/test-tmp/store/wp6gjy73173v3w0qn8wajbphwlgr9qs1-text'
exporting path `/home/leo/work/guix/test-tmp/store/bx5f5zwmhkxg0xp0i0kccmb4dg5j37ak-text'
exporting path `/home/leo/work/guix/test-tmp/store/fyinvicz4lh94gl78byygf65afxyl1i6-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/27636/cache-27636/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/27636/temproots/27653'
deleting `/home/leo/work/guix/test-tmp/store/9ffbad3x4q7ahfywqi43zacsznckbi2c-text'
deleting `/home/leo/work/guix/test-tmp/store/bx5f5zwmhkxg0xp0i0kccmb4dg5j37ak-text'
deleting `/home/leo/work/guix/test-tmp/store/fyinvicz4lh94gl78byygf65afxyl1i6-text'
deleting `/home/leo/work/guix/test-tmp/store/jax64vzybc0fihd1ial8c3pxfzpajjgb-text'
deleting `/home/leo/work/guix/test-tmp/store/ra03idj61qiihncdvhl7l0fsl0y46akh-text'
deleting `/home/leo/work/guix/test-tmp/store/w40l6fbgyx64rrpprp8h39s1sdrimr13-text'
deleting `/home/leo/work/guix/test-tmp/store/wp6gjy73173v3w0qn8wajbphwlgr9qs1-text'
deleting `/home/leo/work/guix/test-tmp/store/xamxgi30kn7w31imjxsczrp4943jp12f-text'
deleting `/home/leo/work/guix/test-tmp/store/xmp9h8gch8h99bdkk84jc3yaj3zyarg1-text'
deleting `/home/leo/work/guix/test-tmp/store/zqggfm0h42n27pgl2dbag4qak3925382-text'
deleting `/home/leo/work/guix/test-tmp/store/trash'
deleting unused links...
note: currently hard linking saves 20.39 MiB
accepted connection from pid 27645, user leo
accepted connection from pid 27645, user leo
accepted connection from pid 27645, user leo
accepted connection from pid 27645, user leo
accepted connection from pid 27645, user leo
accepted connection from pid 27645, user leo
accepted connection from pid 27645, user leo
accepted connection from pid 27645, user leo
accepted connection from pid 27645, user leo
accepted connection from pid 27645, user leo
accepted connection from pid 27645, user leo
accepted connection from pid 27645, user leo
accepted connection from pid 27645, user leo
accepted connection from pid 27645, user leo
accepted connection from pid 27645, user leo
accepted connection from pid 27645, user leo
accepted connection from pid 27645, user leo
accepted connection from pid 27645, user leo
accepted connection from pid 27645, user leo
accepted connection from pid 27645, user leo
accepted connection from pid 27645, user leo
importing file or directory '/home/leo/work/guix/test-tmp/store/jax64vzybc0fihd1ial8c3pxfzpajjgb-text'...
found valid signature for '/home/leo/work/guix/test-tmp/store/jax64vzybc0fihd1ial8c3pxfzpajjgb-text'
importing file or directory '/home/leo/work/guix/test-tmp/store/xmp9h8gch8h99bdkk84jc3yaj3zyarg1-text'...
found valid signature for '/home/leo/work/guix/test-tmp/store/xmp9h8gch8h99bdkk84jc3yaj3zyarg1-text'
importing file or directory '/home/leo/work/guix/test-tmp/store/zqggfm0h42n27pgl2dbag4qak3925382-text'...
found valid signature for '/home/leo/work/guix/test-tmp/store/zqggfm0h42n27pgl2dbag4qak3925382-text'
importing file or directory '/home/leo/work/guix/test-tmp/store/9ffbad3x4q7ahfywqi43zacsznckbi2c-text'...
found valid signature for '/home/leo/work/guix/test-tmp/store/9ffbad3x4q7ahfywqi43zacsznckbi2c-text'
importing file or directory '/home/leo/work/guix/test-tmp/store/w40l6fbgyx64rrpprp8h39s1sdrimr13-text'...
found valid signature for '/home/leo/work/guix/test-tmp/store/w40l6fbgyx64rrpprp8h39s1sdrimr13-text'
importing file or directory '/home/leo/work/guix/test-tmp/store/xamxgi30kn7w31imjxsczrp4943jp12f-text'...
found valid signature for '/home/leo/work/guix/test-tmp/store/xamxgi30kn7w31imjxsczrp4943jp12f-text'
importing file or directory '/home/leo/work/guix/test-tmp/store/ra03idj61qiihncdvhl7l0fsl0y46akh-text'...
found valid signature for '/home/leo/work/guix/test-tmp/store/ra03idj61qiihncdvhl7l0fsl0y46akh-text'
importing file or directory '/home/leo/work/guix/test-tmp/store/wp6gjy73173v3w0qn8wajbphwlgr9qs1-text'...
found valid signature for '/home/leo/work/guix/test-tmp/store/wp6gjy73173v3w0qn8wajbphwlgr9qs1-text'
importing file or directory '/home/leo/work/guix/test-tmp/store/bx5f5zwmhkxg0xp0i0kccmb4dg5j37ak-text'...
found valid signature for '/home/leo/work/guix/test-tmp/store/bx5f5zwmhkxg0xp0i0kccmb4dg5j37ak-text'
importing file or directory '/home/leo/work/guix/test-tmp/store/fyinvicz4lh94gl78byygf65afxyl1i6-text'...
found valid signature for '/home/leo/work/guix/test-tmp/store/fyinvicz4lh94gl78byygf65afxyl1i6-text'
exporting path `/home/leo/work/guix/test-tmp/store/dm89mw9kdywkmc620wglby4ch4wjmjj1-foo'
finding garbage collector roots...
removing stale temporary roots file `/home/leo/work/guix/test-tmp/var/27636/temproots/27743'
deleting `/home/leo/work/guix/test-tmp/store/dm89mw9kdywkmc620wglby4ch4wjmjj1-foo'
deleting `/home/leo/work/guix/test-tmp/store/trash'
deleting unused links...
note: currently hard linking saves 20.39 MiB
accepted connection from pid 27645, user leo
accepted connection from pid 27645, user leo
importing file or directory '/home/leo/work/guix/test-tmp/store/dm89mw9kdywkmc620wglby4ch4wjmjj1-foo'...
exporting path `/home/leo/work/guix/test-tmp/store/2ybiyij226pfb1rgb60dxn3pznnypcz5-foo'
finding garbage collector roots...
removing stale temporary roots file `/home/leo/work/guix/test-tmp/var/27636/temproots/27751'
deleting `/home/leo/work/guix/test-tmp/store/2ybiyij226pfb1rgb60dxn3pznnypcz5-foo'
deleting `/home/leo/work/guix/test-tmp/store/trash'
deleting unused links...
note: currently hard linking saves 20.39 MiB
accepted connection from pid 27645, user leo
importing file or directory '/home/leo/work/guix/test-tmp/store/2ybiyij226pfb1rgb60dxn3pznnypcz5-foo'...
%%%% Starting test nar  (Writing full log to "nar.log")
# of expected passes      8
PASS tests/nar.scm (exit status: 0)

^ permalink raw reply	[flat|nested] 11+ messages in thread

* bug#21280: test failures: nar, syscalls, containers
  2015-08-25 17:38               ` Leo Famulari
@ 2015-08-25 22:44                 ` Ludovic Courtès
  0 siblings, 0 replies; 11+ messages in thread
From: Ludovic Courtès @ 2015-08-25 22:44 UTC (permalink / raw)
  To: Leo Famulari; +Cc: 21280-done

Pushed in fe32241, thanks for your patience!

Ludo’.

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2015-08-25 22:45 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-17  3:43 bug#21280: test failures: nar, syscalls, containers Leo Famulari
2015-08-17 15:42 ` 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

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.