* bug#24736: `make check` fails in tests/scripts-build.scm
@ 2016-10-19 0:04 Mekeor Melire
2016-10-19 3:30 ` Leo Famulari
0 siblings, 1 reply; 4+ messages in thread
From: Mekeor Melire @ 2016-10-19 0:04 UTC (permalink / raw)
To: 24736
`make check` failed for me, using the latest HEAD in the master branch.
See the logs: http://lpaste.net/3131976193323040768
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#24736: `make check` fails in tests/scripts-build.scm
2016-10-19 0:04 bug#24736: `make check` fails in tests/scripts-build.scm Mekeor Melire
@ 2016-10-19 3:30 ` Leo Famulari
2016-10-19 11:04 ` Mekeor Melire
2016-10-19 15:52 ` Ludovic Courtès
0 siblings, 2 replies; 4+ messages in thread
From: Leo Famulari @ 2016-10-19 3:30 UTC (permalink / raw)
To: Mekeor Melire; +Cc: 24736
On Wed, Oct 19, 2016 at 02:04:48AM +0200, Mekeor Melire wrote:
> `make check` failed for me, using the latest HEAD in the master branch.
> See the logs: http://lpaste.net/3131976193323040768
Hi, thanks for the report!
------
FAIL: tests/scripts-build.scm
[...]
============================================================================
Testsuite summary for GNU Guix 0.11.0
============================================================================
# TOTAL: 635
# PASS: 619
# SKIP: 15
# XFAIL: 0
# FAIL: 1
# XPASS: 0
# ERROR: 0
============================================================================
See ./test-suite.log
[...]
------
Can you send 'test-suite.log'?
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#24736: `make check` fails in tests/scripts-build.scm
2016-10-19 3:30 ` Leo Famulari
@ 2016-10-19 11:04 ` Mekeor Melire
2016-10-19 15:52 ` Ludovic Courtès
1 sibling, 0 replies; 4+ messages in thread
From: Mekeor Melire @ 2016-10-19 11:04 UTC (permalink / raw)
To: Leo Famulari; +Cc: 24736
[-- Attachment #1: Type: text/plain, Size: 772 bytes --]
Am 19.10.2016 um 05:30 schrieb Leo Famulari:
> On Wed, Oct 19, 2016 at 02:04:48AM +0200, Mekeor Melire wrote:
>> `make check` failed for me, using the latest HEAD in the master branch.
>> See the logs: http://lpaste.net/3131976193323040768
> Hi, thanks for the report!
>
> ------
> FAIL: tests/scripts-build.scm
>
> [...]
>
> ============================================================================
> Testsuite summary for GNU Guix 0.11.0
> ============================================================================
> # TOTAL: 635
> # PASS: 619
> # SKIP: 15
> # XFAIL: 0
> # FAIL: 1
> # XPASS: 0
> # ERROR: 0
> ============================================================================
> See ./test-suite.log
> [...]
> ------
>
> Can you send 'test-suite.log'?
[-- Attachment #2: test-suite.log --]
[-- Type: text/x-log, Size: 32789 bytes --]
=======================================
GNU Guix 0.11.0: ./test-suite.log
=======================================
# TOTAL: 635
# PASS: 619
# SKIP: 15
# XFAIL: 0
# FAIL: 1
# XPASS: 0
# ERROR: 0
.. contents:: :depth: 2
SKIP: tests/base32
==================
sh: 1: nix-hash: not found
test-name: bytevector->base32-string
location: /home/mekeor/cod/em/guix/tests/base32.scm:48
source:
+ (test-assert
+ "bytevector->base32-string"
+ (fold (lambda (bv expected result)
+ (and result
+ (string=?
+ (bytevector->base32-string bv)
+ expected)))
+ #t
+ (map string->utf8
+ '("" "f" "fo" "foo" "foob" "fooba" "foobar"))
+ '(""
+ "my"
+ "mzxq"
+ "mzxw6"
+ "mzxw6yq"
+ "mzxw6ytb"
+ "mzxw6ytboi")))
actual-value: #t
result: PASS
test-name: base32-string->bytevector
location: /home/mekeor/cod/em/guix/tests/base32.scm:65
source:
+ (test-assert
+ "base32-string->bytevector"
+ (every (lambda (bv)
+ (equal?
+ (base32-string->bytevector
+ (bytevector->base32-string bv))
+ bv))
+ (map string->utf8
+ '("" "f" "fo" "foo" "foob" "fooba" "foobar"))))
actual-value: #t
result: PASS
test-name: nix-base32-string->bytevector
location: /home/mekeor/cod/em/guix/tests/base32.scm:73
source:
+ (test-assert
+ "nix-base32-string->bytevector"
+ (every (lambda (bv)
+ (equal?
+ (nix-base32-string->bytevector
+ (bytevector->nix-base32-string bv))
+ bv))
+ (map string->utf8
+ '("" "f" "fo" "foo" "foob" "fooba" "foobar"))))
actual-value: #t
result: PASS
test-name: &invalid-base32-character
location: /home/mekeor/cod/em/guix/tests/base32.scm:81
source:
+ (test-equal
+ "&invalid-base32-character"
+ #\e
+ (guard (c ((invalid-base32-character? c)
+ (invalid-base32-character-value c)))
+ (nix-base32-string->bytevector
+ (string-append (make-string 51 #\a) "e"))))
expected-value: e
actual-value: e
result: PASS
test-name: sha256 & bytevector->nix-base32-string
location: /home/mekeor/cod/em/guix/tests/base32.scm:92
source:
+ (test-assert
+ "sha256 & bytevector->nix-base32-string"
+ (let ((file (search-path %load-path "tests/test.drv")))
+ (equal?
+ (bytevector->nix-base32-string
+ (sha256
+ (call-with-input-file file get-bytevector-all)))
+ (let* ((c (format
+ #f
+ "~a --type sha256 --base32 --flat \"~a\""
+ %nix-hash
+ file))
+ (p (open-input-pipe c))
+ (l (read-line p)))
+ (close-pipe p)
+ l))))
result: SKIP
SKIP: tests/snix
================
test-name: factorize-uri
location: /home/mekeor/cod/em/guix/tests/snix.scm:36
source:
+ (test-assert
+ "factorize-uri"
+ (every?
+ (match-lambda
+ ((uri version '-> expected)
+ (equal? (factorize-uri uri version) expected)))
+ '(("http://example.com/foo.tgz"
+ "1.0"
+ ->
+ "http://example.com/foo.tgz")
+ ("http://example.com/foo-2.8.tgz"
+ "2.8"
+ ->
+ ("http://example.com/foo-" version ".tgz"))
+ ("http://example.com/2.8/foo-2.8.tgz"
+ "2.8"
+ ->
+ ("http://example.com/"
+ version
+ "/foo-"
+ version
+ ".tgz")))))
actual-value: #t
result: PASS
test-name: nixpkgs->guix-package
location: /home/mekeor/cod/em/guix/tests/snix.scm:54
source:
+ (test-assert
+ "nixpkgs->guix-package"
+ (match (nixpkgs->guix-package
+ %nixpkgs-directory
+ "guile")
+ (('package
+ ('name "guile")
+ ('version (? string?))
+ ('source ('origin _ ...))
+ ('build-system _)
+ ('inputs ('quasiquote (inputs ...)))
+ ('propagated-inputs ('quasiquote (pinputs ...)))
+ ('home-page (? string?))
+ ('synopsis (? string?))
+ ('description (? string?))
+ ('license (? symbol?)))
+ (and (member '("libffi" ,libffi) inputs)
+ (member '("gmp" ,gmp) pinputs)
+ #t))
+ (x (pk 'fail x #f))))
result: SKIP
SKIP: tests/syscalls
====================
test-name: mount, ENOENT
location: /home/mekeor/cod/em/guix/tests/syscalls.scm:38
source:
+ (test-equal
+ "mount, ENOENT"
+ ENOENT
+ (catch 'system-error
+ (lambda ()
+ (mount "/dev/null" "/does-not-exist" "ext2")
+ #f)
+ (compose system-error-errno list)))
expected-value: 2
actual-value: 2
result: PASS
test-name: umount, ENOENT/EPERM
location: /home/mekeor/cod/em/guix/tests/syscalls.scm:46
source:
+ (test-assert
+ "umount, ENOENT/EPERM"
+ (catch 'system-error
+ (lambda () (umount "/does-not-exist") #f)
+ (lambda args
+ (memv (system-error-errno args)
+ (list EPERM ENOENT)))))
actual-value: (1 2)
result: PASS
test-name: mount-points
location: /home/mekeor/cod/em/guix/tests/syscalls.scm:55
source:
+ (test-assert
+ "mount-points"
+ (any (cute member <> (mount-points))
+ '("/" "/proc" "/sys" "/dev")))
actual-value: (/ /sys/kernel/security /dev/shm /run/lock /sys/fs/cgroup /sys/fs/cgroup/systemd /sys/fs/pstore /sys/fs/cgroup/net_cls,net_prio /sys/fs/cgroup/blkio /sys/fs/cgroup/perf_event /sys/fs/cgroup/freezer /sys/fs/cgroup/cpu,cpuacct /sys/fs/cgroup/cpuset /sys/fs/cgroup/devices /sys/fs/cgroup/memory /sys/fs/cgroup/pids /proc/sys/fs/binfmt_misc /dev/mqueue /sys/kernel/debug /dev/hugepages /boot /run/user/1000 /run/user/1000/gvfs)
result: PASS
test-name: swapon, ENOENT/EPERM
location: /home/mekeor/cod/em/guix/tests/syscalls.scm:61
source:
+ (test-assert
+ "swapon, ENOENT/EPERM"
+ (catch 'system-error
+ (lambda () (swapon "/does-not-exist") #f)
+ (lambda args
+ (memv (system-error-errno args)
+ (list EPERM ENOENT)))))
actual-value: (1 2)
result: PASS
test-name: swapoff, ENOENT/EINVAL/EPERM
location: /home/mekeor/cod/em/guix/tests/syscalls.scm:69
source:
+ (test-assert
+ "swapoff, ENOENT/EINVAL/EPERM"
+ (catch 'system-error
+ (lambda () (swapoff "/does-not-exist") #f)
+ (lambda args
+ (memv (system-error-errno args)
+ (list EPERM EINVAL ENOENT)))))
actual-value: (1 22 2)
result: PASS
test-name: mkdtemp!
location: /home/mekeor/cod/em/guix/tests/syscalls.scm:77
source:
+ (test-assert
+ "mkdtemp!"
+ (let* ((tmp (or (getenv "TMPDIR") "/tmp"))
+ (dir (mkdtemp!
+ (string-append tmp "/guix-test-XXXXXX"))))
+ (and (file-exists? dir) (begin (rmdir dir) #t))))
actual-value: #t
result: PASS
test-name: statfs, ENOENT
location: /home/mekeor/cod/em/guix/tests/syscalls.scm:85
source:
+ (test-equal
+ "statfs, ENOENT"
+ ENOENT
+ (catch 'system-error
+ (lambda () (statfs "/does-not-exist"))
+ (compose system-error-errno list)))
expected-value: 2
actual-value: 2
result: PASS
test-name: statfs
location: /home/mekeor/cod/em/guix/tests/syscalls.scm:92
source:
+ (test-assert
+ "statfs"
+ (let ((fs (statfs "/")))
+ (and (file-system? fs)
+ (> (file-system-block-size fs) 0)
+ (>= (file-system-blocks-available fs) 0)
+ (>= (file-system-blocks-free fs)
+ (file-system-blocks-available fs)))))
actual-value: #t
result: PASS
test-name: clone
location: /home/mekeor/cod/em/guix/tests/syscalls.scm:109
source:
+ (test-assert
+ "clone"
+ (match (clone (logior CLONE_NEWUSER SIGCHLD))
+ (0 (primitive-exit 42))
+ (pid (and (not (equal?
+ (readlink (user-namespace pid))
+ (readlink (user-namespace (getpid)))))
+ (match (waitpid pid)
+ ((_ . status) (= 42 (status:exit-val status))))))))
result: SKIP
test-name: setns
location: /home/mekeor/cod/em/guix/tests/syscalls.scm:122
source:
+ (test-assert
+ "setns"
+ (match (clone (logior CLONE_NEWUSER SIGCHLD))
+ (0 (primitive-exit 0))
+ (clone-pid
+ (match (pipe)
+ ((in . out)
+ (match (primitive-fork)
+ (0
+ (close in)
+ (call-with-input-file
+ (user-namespace clone-pid)
+ (lambda (port) (setns (port->fdes port) 0)))
+ (write 'done out)
+ (close out)
+ (primitive-exit 0))
+ (fork-pid
+ (close out)
+ (read in)
+ (let ((result
+ (and (equal?
+ (readlink
+ (user-namespace clone-pid))
+ (readlink
+ (user-namespace fork-pid))))))
+ (waitpid clone-pid)
+ (waitpid fork-pid)
+ result))))))))
result: SKIP
test-name: pivot-root
location: /home/mekeor/cod/em/guix/tests/syscalls.scm:151
source:
+ (test-assert
+ "pivot-root"
+ (match (pipe)
+ ((in . out)
+ (match (clone (logior CLONE_NEWUSER CLONE_NEWNS SIGCHLD))
+ (0
+ (close in)
+ (call-with-temporary-directory
+ (lambda (root)
+ (let ((put-old (string-append root "/real-root")))
+ (mount "none" root "tmpfs")
+ (mkdir put-old)
+ (call-with-output-file
+ (string-append root "/test")
+ (lambda (port) (display "testing\n" port)))
+ (pivot-root root put-old)
+ (write (file-exists? "/test") out)
+ (close out))))
+ (primitive-exit 0))
+ (pid (close out)
+ (let ((result (read in)))
+ (close in)
+ (and (zero? (match (waitpid pid)
+ ((_ . status)
+ (status:exit-val status))))
+ (eq? #t result))))))))
result: SKIP
test-name: fcntl-flock wait
location: /home/mekeor/cod/em/guix/tests/syscalls.scm:180
source:
+ (test-equal
+ "fcntl-flock wait"
+ 42
+ (let ((file (open-file temp-file "w0b")))
+ (fcntl-flock file 'write-lock)
+ (match (primitive-fork)
+ (0
+ (dynamic-wind
+ (const #t)
+ (lambda ()
+ (let ((file (open-file temp-file "r0b")))
+ (fcntl-flock file 'read-lock)
+ (primitive-exit (read file)))
+ (primitive-exit 1))
+ (lambda () (primitive-exit 2))))
+ (pid (display "hello, world!" file)
+ (force-output file)
+ (sleep 1)
+ (seek file 0 SEEK_SET)
+ (truncate-file file 0)
+ (write 42 file)
+ (force-output file)
+ (fcntl-flock file 'unlock)
+ (match (waitpid pid)
+ ((_ . status)
+ (let ((result (status:exit-val status)))
+ (close-port file)
+ result)))))))
expected-value: 42
actual-value: 42
result: PASS
test-name: fcntl-flock non-blocking
location: /home/mekeor/cod/em/guix/tests/syscalls.scm:219
source:
+ (test-equal
+ "fcntl-flock non-blocking"
+ EAGAIN
+ (match (pipe)
+ ((input . output)
+ (match (primitive-fork)
+ (0
+ (dynamic-wind
+ (const #t)
+ (lambda ()
+ (close-port output)
+ (read-char input)
+ (let ((file (open-file temp-file "w0")))
+ (catch 'flock-error
+ (lambda ()
+ (fcntl-flock file 'write-lock #:wait? #f))
+ (lambda (key errno)
+ (primitive-exit (pk 'errno errno)))))
+ (primitive-exit -1))
+ (lambda () (primitive-exit -2))))
+ (pid (close-port input)
+ (let ((file (open-file temp-file "w0")))
+ (fcntl-flock file 'write-lock)
+ (write 'green-light output)
+ (force-output output)
+ (match (waitpid pid)
+ ((_ . status)
+ (let ((result (status:exit-val status)))
+ (fcntl-flock file 'unlock)
+ (close-port file)
+ result)))))))))
;;; (errno 11)
expected-value: 11
actual-value: 11
result: PASS
test-name: all-network-interface-names
location: /home/mekeor/cod/em/guix/tests/syscalls.scm:261
source:
+ (test-assert
+ "all-network-interface-names"
+ (match (all-network-interface-names)
+ (((? string? names) ..1) (member "lo" names))))
actual-value: (lo)
result: PASS
test-name: network-interface-names
location: /home/mekeor/cod/em/guix/tests/syscalls.scm:266
source:
+ (test-assert
+ "network-interface-names"
+ (match (network-interface-names)
+ (((? string? names) ..1)
+ (lset<=
+ string=?
+ names
+ (all-network-interface-names)))))
actual-value: #t
result: PASS
test-name: network-interface-flags
location: /home/mekeor/cod/em/guix/tests/syscalls.scm:271
source:
+ (test-assert
+ "network-interface-flags"
+ (let* ((sock (socket AF_INET SOCK_STREAM 0))
+ (flags (network-interface-flags sock "lo")))
+ (close-port sock)
+ (and (not (zero? (logand flags IFF_LOOPBACK)))
+ (not (zero? (logand flags IFF_UP))))))
actual-value: #t
result: PASS
test-name: loopback-network-interface?
location: /home/mekeor/cod/em/guix/tests/syscalls.scm:278
source:
+ (test-equal
+ "loopback-network-interface?"
+ ENODEV
+ (and (loopback-network-interface? "lo")
+ (catch 'system-error
+ (lambda ()
+ (loopback-network-interface? "nonexistent")
+ #f)
+ (lambda args (system-error-errno args)))))
expected-value: 19
actual-value: 19
result: PASS
test-name: set-network-interface-flags
location: /home/mekeor/cod/em/guix/tests/syscalls.scm:289
source:
+ (test-assert
+ "set-network-interface-flags"
+ (let ((sock (socket AF_INET SOCK_STREAM 0)))
+ (catch 'system-error
+ (lambda ()
+ (set-network-interface-flags sock "lo" IFF_UP))
+ (lambda args
+ (close-port sock)
+ (memv (system-error-errno args)
+ (list EPERM EACCES))))))
actual-value: (1 13)
result: PASS
test-name: network-interface-address lo
location: /home/mekeor/cod/em/guix/tests/syscalls.scm:299
source:
+ (test-equal
+ "network-interface-address lo"
+ (make-socket-address
+ AF_INET
+ (inet-pton AF_INET "127.0.0.1")
+ 0)
+ (let* ((sock (socket AF_INET SOCK_STREAM 0))
+ (addr (network-interface-address sock "lo")))
+ (close-port sock)
+ addr))
expected-value: #(2 2130706433 0)
actual-value: #(2 2130706433 0)
result: PASS
test-name: set-network-interface-address
location: /home/mekeor/cod/em/guix/tests/syscalls.scm:307
source:
+ (test-assert
+ "set-network-interface-address"
+ (let ((sock (socket AF_INET SOCK_STREAM 0)))
+ (catch 'system-error
+ (lambda ()
+ (set-network-interface-address
+ sock
+ "nonexistent"
+ (make-socket-address
+ AF_INET
+ (inet-pton AF_INET "127.12.14.15")
+ 0)))
+ (lambda args
+ (close-port sock)
+ (memv (system-error-errno args)
+ (list EPERM EACCES))))))
actual-value: (1 13)
result: PASS
test-name: network-interfaces returns one or more interfaces
location: /home/mekeor/cod/em/guix/tests/syscalls.scm:321
source:
+ (test-equal
+ "network-interfaces returns one or more interfaces"
+ '(#t #t #t)
+ (match (network-interfaces)
+ ((interfaces ..1)
+ (list (every interface? interfaces)
+ (every string? (map interface-name interfaces))
+ (every (lambda (sockaddr)
+ (or (vector? sockaddr) (not sockaddr)))
+ (map interface-address interfaces))))))
expected-value: (#t #t #t)
actual-value: (#t #t #t)
result: PASS
test-name: network-interfaces returns "lo"
location: /home/mekeor/cod/em/guix/tests/syscalls.scm:333
source:
+ (test-equal
+ "network-interfaces returns \"lo\""
+ (list #t
+ (make-socket-address
+ AF_INET
+ (inet-pton AF_INET "127.0.0.1")
+ 0))
+ (match (filter
+ (lambda (interface)
+ (string=? "lo" (interface-name interface)))
+ (network-interfaces))
+ ((loopbacks ..1)
+ (list (every (lambda (lo)
+ (not (zero? (logand
+ IFF_LOOPBACK
+ (interface-flags lo)))))
+ loopbacks)
+ (match (find (lambda (lo)
+ (= AF_INET
+ (sockaddr:fam (interface-address lo))))
+ loopbacks)
+ (#f #f)
+ (lo (interface-address lo)))))))
expected-value: (#t #(2 2130706433 0))
actual-value: (#t #(2 2130706433 0))
result: PASS
test-name: tcgetattr ENOTTY
location: /home/mekeor/cod/em/guix/tests/syscalls.scm:348
source:
+ (test-equal
+ "tcgetattr ENOTTY"
+ ENOTTY
+ (catch 'system-error
+ (lambda ()
+ (call-with-input-file
+ "/dev/null"
+ (lambda (port) (tcgetattr (fileno port)))))
+ (compose system-error-errno list)))
expected-value: 25
actual-value: 25
result: PASS
test-name: tcgetattr
location: /home/mekeor/cod/em/guix/tests/syscalls.scm:362
source:
+ (test-assert
+ "tcgetattr"
+ (let ((termios (tcgetattr 0)))
+ (and (termios? termios)
+ (> (termios-input-speed termios) 0)
+ (> (termios-output-speed termios) 0))))
actual-value: #t
result: PASS
test-name: tcsetattr
location: /home/mekeor/cod/em/guix/tests/syscalls.scm:368
source:
+ (test-assert
+ "tcsetattr"
+ (let ((first (tcgetattr 0)))
+ (tcsetattr 0 (tcsetattr-action TCSANOW) first)
+ (equal? first (tcgetattr 0))))
actual-value: #t
result: PASS
test-name: terminal-window-size ENOTTY
location: /home/mekeor/cod/em/guix/tests/syscalls.scm:373
source:
+ (test-assert
+ "terminal-window-size ENOTTY"
+ (call-with-input-file
+ "/dev/null"
+ (lambda (port)
+ (catch 'system-error
+ (lambda () (terminal-window-size port))
+ (lambda args
+ (memv (system-error-errno args)
+ (list ENOTTY EINVAL)))))))
actual-value: (25 22)
result: PASS
test-name: terminal-columns
location: /home/mekeor/cod/em/guix/tests/syscalls.scm:384
source:
+ (test-assert
+ "terminal-columns"
+ (> (terminal-columns) 0))
actual-value: #t
result: PASS
test-name: terminal-columns non-file port
location: /home/mekeor/cod/em/guix/tests/syscalls.scm:387
source:
+ (test-assert
+ "terminal-columns non-file port"
+ (> (terminal-columns
+ (open-input-string
+ "Join us now, share the software!"))
+ 0))
actual-value: #t
result: PASS
SKIP: tests/gremlin
===================
test-name: elf-dynamic-info-needed, executable
location: /home/mekeor/cod/em/guix/tests/gremlin.scm:44
source:
+ (test-assert
+ "elf-dynamic-info-needed, executable"
+ (let* ((elf (call-with-input-file %guile-executable read-elf))
+ (dyninfo (elf-dynamic-info elf)))
+ (or (not dyninfo)
+ (lset<=
+ string=?
+ (list (string-append "libguile-" (effective-version))
+ "libgc"
+ "libunistring"
+ "libffi")
+ (map (lambda (lib)
+ (string-take lib (string-contains lib ".so")))
+ (elf-dynamic-info-needed dyninfo))))))
result: SKIP
test-name: expand-origin
location: /home/mekeor/cod/em/guix/tests/gremlin.scm:55
source:
+ (test-equal
+ "expand-origin"
+ '("OOO/../lib"
+ "OOO"
+ "../OOO/bar/OOO/baz"
+ "ORIGIN/foo")
+ (map (cut expand-origin <> "OOO")
+ '("$ORIGIN/../lib"
+ "${ORIGIN}"
+ "../${ORIGIN}/bar/$ORIGIN/baz"
+ "ORIGIN/foo")))
expected-value: (OOO/../lib OOO ../OOO/bar/OOO/baz ORIGIN/foo)
actual-value: (OOO/../lib OOO ../OOO/bar/OOO/baz ORIGIN/foo)
result: PASS
FAIL: tests/scripts-build
=========================
test-name: options->transformation, no transformations
location: /home/mekeor/cod/em/guix/tests/scripts-build.scm:34
source:
+ (test-assert
+ "options->transformation, no transformations"
+ (let ((p (dummy-package "foo"))
+ (t (options->transformation '())))
+ (with-store store (eq? (t store p) p))))
actual-value: #t
result: PASS
test-name: options->transformation, with-source
location: /home/mekeor/cod/em/guix/tests/scripts-build.scm:40
source:
+ (test-assert
+ "options->transformation, with-source"
+ (let* ((p (dummy-package "guix.scm"))
+ (s (search-path %load-path "guix.scm"))
+ (t (options->transformation
+ `((with-source unquote s)))))
+ (with-store
+ store
+ (let ((new (t store p)))
+ (and (not (eq? new p))
+ (string=?
+ (package-source new)
+ (add-to-store store "guix.scm" #t "sha256" s)))))))
actual-value: #t
result: PASS
test-name: options->transformation, with-source, with version
location: /home/mekeor/cod/em/guix/tests/scripts-build.scm:53
source:
+ (test-assert
+ "options->transformation, with-source, with version"
+ (let ((p (dummy-package "foo"))
+ (s (search-path %load-path "guix.scm")))
+ (call-with-temporary-directory
+ (lambda (directory)
+ (let* ((f (string-append directory "/foo-42.0.tar.gz"))
+ (t (options->transformation
+ `((with-source unquote f)))))
+ (copy-file s f)
+ (with-store
+ store
+ (let ((new (t store p)))
+ (and (not (eq? new p))
+ (string=? (package-name new) (package-name p))
+ (string=? (package-version new) "42.0")
+ (string=?
+ (package-source new)
+ (add-to-store store (basename f) #t "sha256" f))))))))))
actual-value: #t
result: PASS
test-name: options->transformation, with-source, no matches
location: /home/mekeor/cod/em/guix/tests/scripts-build.scm:72
source:
+ (test-assert
+ "options->transformation, with-source, no matches"
+ (let* ((p (dummy-package "foobar"))
+ (s (search-path %load-path "guix.scm"))
+ (t (options->transformation
+ `((with-source unquote s)))))
+ (with-store
+ store
+ (let* ((port (open-output-string))
+ (new (parameterize
+ ((guix-warning-port port))
+ (t store p))))
+ (and (eq? new p)
+ (string-contains
+ (get-output-string port)
+ "had no effect"))))))
actual-value: 38
result: PASS
test-name: options->transformation, with-input
location: /home/mekeor/cod/em/guix/tests/scripts-build.scm:85
source:
+ (test-assert
+ "options->transformation, with-input"
+ (let* ((p (dummy-package
+ "guix.scm"
+ (inputs
+ `(("foo" ,coreutils)
+ ("bar" ,grep)
+ ("baz"
+ ,(dummy-package
+ "chbouib"
+ (native-inputs `(("x" ,grep)))))))))
+ (t (options->transformation
+ '((with-input . "coreutils=busybox")
+ (with-input . "grep=findutils")))))
+ (with-store
+ store
+ (let ((new (t store p)))
+ (and (not (eq? new p))
+ (match (package-inputs new)
+ ((("foo" dep1) ("bar" dep2) ("baz" dep3))
+ (and (eq? dep1 busybox)
+ (eq? dep2 findutils)
+ (string=? (package-name dep3) "chbouib")
+ (match (package-native-inputs dep3)
+ ((("x" dep)) (eq? dep findutils)))))))))))
actual-value: #t
result: PASS
test-name: options->transformation, with-graft
location: /home/mekeor/cod/em/guix/tests/scripts-build.scm:105
source:
+ (test-assert
+ "options->transformation, with-graft"
+ (let* ((p (dummy-package
+ "guix.scm"
+ (inputs
+ `(("foo" ,grep)
+ ("bar"
+ ,(dummy-package
+ "chbouib"
+ (native-inputs `(("x" ,grep)))))))))
+ (t (options->transformation
+ '((with-input . "grep=findutils")))))
+ (with-store
+ store
+ (let ((new (t store p)))
+ (and (not (eq? new p))
+ (match (package-inputs new)
+ ((("foo" dep1) ("bar" dep2))
+ (and (string=?
+ (package-full-name dep1)
+ (package-full-name grep))
+ (eq? (package-replacement dep1) findutils)
+ (string=? (package-name dep2) "chbouib")
+ (match (package-native-inputs dep2)
+ ((("x" dep))
+ (eq? (package-replacement dep)
+ findutils)))))))))))
actual-value: #f
result: FAIL
random seed for tests: 1476827227
SKIP: tests/containers
======================
test-name: call-with-container, exit with 0 when there is no error
location: /home/mekeor/cod/em/guix/tests/containers.scm:40
source:
+ (test-assert
+ "call-with-container, exit with 0 when there is no error"
+ (zero? (call-with-container
+ '()
+ (const #t)
+ #:namespaces
+ '(user))))
result: SKIP
test-name: call-with-container, user namespace
location: /home/mekeor/cod/em/guix/tests/containers.scm:45
source:
+ (test-assert
+ "call-with-container, user namespace"
+ (zero? (call-with-container
+ '()
+ (lambda ()
+ (assert-exit
+ (and (zero? (getuid)) (zero? (getgid)))))
+ #:namespaces
+ '(user))))
result: SKIP
test-name: call-with-container, uts namespace
location: /home/mekeor/cod/em/guix/tests/containers.scm:54
source:
+ (test-assert
+ "call-with-container, uts namespace"
+ (zero? (call-with-container
+ '()
+ (lambda ()
+ (sethostname "test-container")
+ (primitive-exit 0))
+ #:namespaces
+ '(user uts))))
result: SKIP
test-name: call-with-container, pid namespace
location: /home/mekeor/cod/em/guix/tests/containers.scm:65
source:
+ (test-assert
+ "call-with-container, pid namespace"
+ (zero? (call-with-container
+ '()
+ (lambda ()
+ (match (primitive-fork)
+ (0 (assert-exit (= 2 (getpid))))
+ (pid (primitive-exit
+ (match (waitpid pid)
+ ((_ . status)
+ (status:exit-val status)))))))
+ #:namespaces
+ '(user pid))))
result: SKIP
test-name: call-with-container, mnt namespace
location: /home/mekeor/cod/em/guix/tests/containers.scm:81
source:
+ (test-assert
+ "call-with-container, mnt namespace"
+ (zero? (call-with-container
+ '(("none" device "/testing" "tmpfs" () #f #f))
+ (lambda ()
+ (assert-exit (file-exists? "/testing")))
+ #:namespaces
+ '(user mnt))))
result: SKIP
test-name: call-with-container, mnt namespace, wrong bind mount
location: /home/mekeor/cod/em/guix/tests/containers.scm:89
source:
+ (test-equal
+ "call-with-container, mnt namespace, wrong bind mount"
+ `(system-error ,ENOENT)
+ (catch 'system-error
+ (lambda ()
+ (call-with-container
+ '(("/does-not-exist"
+ device
+ "/foo"
+ "none"
+ (bind-mount)
+ #f
+ #f))
+ (const #t)
+ #:namespaces
+ '(user mnt)))
+ (lambda args
+ (list 'system-error (system-error-errno args)))))
result: SKIP
test-name: call-with-container, all namespaces
location: /home/mekeor/cod/em/guix/tests/containers.scm:102
source:
+ (test-assert
+ "call-with-container, all namespaces"
+ (zero? (call-with-container
+ '()
+ (lambda () (primitive-exit 0)))))
result: SKIP
test-name: container-excursion
location: /home/mekeor/cod/em/guix/tests/containers.scm:109
source:
+ (test-assert
+ "container-excursion"
+ (call-with-temporary-directory
+ (lambda (root)
+ (match (list (pipe) (pipe))
+ (((start-in . start-out) (end-in . end-out))
+ (define (container)
+ (close end-out)
+ (close start-in)
+ (write 'ready start-out)
+ (close start-out)
+ (read end-in)
+ (close end-in))
+ (define (namespaces pid)
+ (let ((pid (number->string pid)))
+ (map (lambda (ns)
+ (readlink (string-append "/proc/" pid "/ns/" ns)))
+ '("user" "ipc" "uts" "net" "pid" "mnt"))))
+ (let* ((pid (run-container root '() %namespaces 1 container))
+ (container-namespaces (namespaces pid))
+ (result
+ (begin
+ (close start-out)
+ (read start-in)
+ (close start-in)
+ (container-excursion
+ pid
+ (lambda ()
+ (match (primitive-fork)
+ (0
+ (assert-exit
+ (equal?
+ container-namespaces
+ (namespaces (getpid)))))
+ (fork-pid
+ (match (waitpid fork-pid)
+ ((_ . status)
+ (primitive-exit
+ (status:exit-val
+ status)))))))))))
+ (close end-in)
+ (write 'done end-out)
+ (close end-out)
+ (waitpid pid)
+ (zero? result)))))))
result: SKIP
SKIP: tests/guix-environment-container
======================================
+ set -e
+ guix environment --version
guix environment (GNU Guix) 0.11.0
Copyright (C) 2016 the Guix authors
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
+ guile -c '((@@ (guix scripts environment) assert-container-features))'
error: cannot create container: unprivileged user cannot create user namespaces
error: please set /proc/sys/kernel/unprivileged_userns_clone to "1"
+ exit 77
SKIP tests/guix-environment-container.sh (exit status: 77)
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#24736: `make check` fails in tests/scripts-build.scm
2016-10-19 3:30 ` Leo Famulari
2016-10-19 11:04 ` Mekeor Melire
@ 2016-10-19 15:52 ` Ludovic Courtès
1 sibling, 0 replies; 4+ messages in thread
From: Ludovic Courtès @ 2016-10-19 15:52 UTC (permalink / raw)
To: Leo Famulari; +Cc: Mekeor Melire, 24736-done
Leo Famulari <leo@famulari.name> skribis:
> On Wed, Oct 19, 2016 at 02:04:48AM +0200, Mekeor Melire wrote:
>> `make check` failed for me, using the latest HEAD in the master branch.
>> See the logs: http://lpaste.net/3131976193323040768
>
> Hi, thanks for the report!
>
> ------
> FAIL: tests/scripts-build.scm
I just noticed it and fixed it in
0d7034ca4fa287f792a934dd3ac17905db683f4f.
Thanks!
Ludo’.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-10-19 15:53 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-19 0:04 bug#24736: `make check` fails in tests/scripts-build.scm Mekeor Melire
2016-10-19 3:30 ` Leo Famulari
2016-10-19 11:04 ` Mekeor Melire
2016-10-19 15:52 ` Ludovic Courtès
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).