Subject: `make check-system` test suite failed

From: mikadoZero <[email-masked]>
Date: Thu, 21 Mar 2019 15:18:10 -0400

I get two failing test and an error when running `make check-system`.

`guix describe`
guix 6e42cef
    repository URL: https://git.savannah.gnu.org/git/guix.git
    branch: master
    commit: 6e42cef0abdce00629294794ba06fe75e161ffb4

In the guix repository `git describe` outputs:
v0.16.0-3757-gf1aa44ada

This is what I have done to get the error message.

Clone the Guix repository
`cd guix`
`guix environment guix`
`./bootstrap`
`./configure --localstatedir=/var`
`make -j3`
`make check-system -j3`

Below is the end of the output for `make check-system`.  I would include
"test-suite.log" but it was not successfully created.

============================================================================
Testsuite summary for GNU Guix 0.16.0-10.2637cfd
============================================================================
# TOTAL: 880
# PASS:  835
# SKIP:  43
# XFAIL: 0
# FAIL:  2
# XPASS: 0
# ERROR: 0
============================================================================
See ./test-suite.log
Please report to [email-masked]
============================================================================
make[4]: *** [Makefile:4626: test-suite.log] Error 1
make[4]: Leaving directory '/tmp/guix-build-guix-0.16.0-10.2637cfd+.drv-0/source'
make[3]: *** [Makefile:4734: check-TESTS] Error 2
make[3]: Leaving directory '/tmp/guix-build-guix-0.16.0-10.2637cfd+.drv-0/source'
make[2]: *** [Makefile:4977: check-am] Error 2
make[2]: Leaving directory '/tmp/guix-build-guix-0.16.0-10.2637cfd+.drv-0/source'
make[1]: *** [Makefile:4511: check-recursive] Error 1
make[1]: Leaving directory '/tmp/guix-build-guix-0.16.0-10.2637cfd+.drv-0/source'
make: *** [Makefile:4979: check] Error 2

Test suite failed, dumping logs.

--- ./test-suite.log --------------------------------------------------------

==================================================
   GNU Guix 0.16.0-10.2637cfd: ./test-suite.log
==================================================

# TOTAL: 880
# PASS:  835
# SKIP:  43
# XFAIL: 0
# FAIL:  2
# XPASS: 0
# ERROR: 0

.. contents:: :depth: 2

SKIP: tests/base32
==================

sh: nix-hash: command not found
test-name: bytevector->base32-string
location: /tmp/guix-build-guix-0.16.0-10.2637cfd+.drv-0/source/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: /tmp/guix-build-guix-0.16.0-10.2637cfd+.drv-0/source/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: /tmp/guix-build-guix-0.16.0-10.2637cfd+.drv-0/source/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: /tmp/guix-build-guix-0.16.0-10.2637cfd+.drv-0/source/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: /tmp/guix-build-guix-0.16.0-10.2637cfd+.drv-0/source/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/cpio
================

random seed for tests: 1553196973
test-name: file->cpio-header + write-cpio-header + read-cpio-header
location: /tmp/guix-build-guix-0.16.0-10.2637cfd+.drv-0/source/tests/cpio.scm:37
source:
+ (test-assert
+   "file->cpio-header + write-cpio-header + read-cpio-header"
+   (let* ((file (search-path %load-path "guix.scm"))
+          (header (file->cpio-header file)))
+     (call-with-values
+       (lambda () (open-bytevector-output-port))
+       (lambda (port get-bv)
+         (write-cpio-header header port)
+         (let ((port (open-bytevector-input-port (get-bv))))
+           (equal? header (read-cpio-header port)))))))
actual-value: #t
result: PASS

test-name: bit-identical to GNU cpio's output
location: /tmp/guix-build-guix-0.16.0-10.2637cfd+.drv-0/source/tests/cpio.scm:49
source:
+ (test-assert
+   "bit-identical to GNU cpio's output"
+   (call-with-temporary-output-file
+     (lambda (link _)
+       (delete-file link)
+       (symlink "chbouib" link)
+       (let ((files (cons* "/"
+                           (canonicalize-path
+                             (dirname (search-path %load-path "guix.scm")))
+                           link
+                           (map (compose
+                                  canonicalize-path
+                                  (cut search-path %load-path <>))
+                                '("guix.scm"
+                                  "guix/build/syscalls.scm"
+                                  "guix/packages.scm")))))
+         (call-with-temporary-output-file
+           (lambda (ref-file _)
+             (let ((pipe (open-pipe*
+                           OPEN_WRITE
+                           %cpio-program
+                           "-o"
+                           "-O"
+                           ref-file
+                           "-H"
+                           "newc"
+                           "--null")))
+               (for-each
+                 (lambda (file) (format pipe "~a\x00" file))
+                 files)
+               (and (zero? (close-pipe pipe))
+                    (call-with-temporary-output-file
+                      (lambda (file port)
+                        (write-cpio-archive files port)
+                        (close-port port)
+                        (or (file=? ref-file file)
+                            (throw 'cpio-archives-differ
+                                   files
+                                   ref-file
+                                   file
+                                   (stat:size (stat ref-file))
+                                   (stat:size (stat file))))))))))))))
result: SKIP

SKIP: tests/builders
====================

random seed for tests: 1553197232
test-name: url-fetch
location: /tmp/guix-build-guix-0.16.0-10.2637cfd+.drv-0/source/tests/builders.scm:66
source:
+ (test-assert
+   "url-fetch"
+   (let* ((url '("http://ftp.gnu.org/gnu/hello/hello-2.8.tar.gz"
+                 "ftp://ftp.gnu.org/gnu/hello/hello-2.8.tar.gz"))
+          (hash (nix-base32-string->bytevector
+                  "0wqd8sjmxfskrflaxywc7gqw7sfawrfvdxd9skxawzfgyy0pzdz6"))
+          (drv (url-fetch*
+                 %store
+                 url
+                 'sha256
+                 hash
+                 #:guile
+                 %bootstrap-guile))
+          (out-path (derivation->output-path drv)))
+     (and (build-derivations %store (list drv))
+          (file-exists? out-path)
+          (valid-path? %store out-path))))
result: SKIP

test-name: url-fetch, file
location: /tmp/guix-build-guix-0.16.0-10.2637cfd+.drv-0/source/tests/builders.scm:78
source:
+ (test-assert
+   "url-fetch, file"
+   (let* ((file (search-path %load-path "guix.scm"))
+          (hash (call-with-input-file file port-sha256))
+          (out (url-fetch* %store file 'sha256 hash)))
+     (and (file-exists? out) (valid-path? %store out))))
actual-value: #t
result: PASS

test-name: url-fetch, file URI
location: /tmp/guix-build-guix-0.16.0-10.2637cfd+.drv-0/source/tests/builders.scm:85
source:
+ (test-assert
+   "url-fetch, file URI"
+   (let* ((file (search-path %load-path "guix.scm"))
+          (hash (call-with-input-file file port-sha256))
+          (out (url-fetch*
+                 %store
+                 (string-append
+                   "file://"
+                   (canonicalize-path file))
+                 'sha256
+                 hash)))
+     (and (file-exists? out) (valid-path? %store out))))
actual-value: #t
result: PASS

test-name: gnu-build-system
location: /tmp/guix-build-guix-0.16.0-10.2637cfd+.drv-0/source/tests/builders.scm:94
source:
+ (test-assert
+   "gnu-build-system"
+   (build-system? gnu-build-system))
actual-value: #t
result: PASS

test-name: gnu-build
location: /tmp/guix-build-guix-0.16.0-10.2637cfd+.drv-0/source/tests/builders.scm:99
source:
+ (test-assert
+   "gnu-build"
+   (let* ((url "http://ftp.gnu.org/gnu/hello/hello-2.8.tar.gz")
+          (hash (nix-base32-string->bytevector
+                  "0wqd8sjmxfskrflaxywc7gqw7sfawrfvdxd9skxawzfgyy0pzdz6"))
+          (tarball
+            (url-fetch*
+              %store
+              url
+              'sha256
+              hash
+              #:guile
+              %bootstrap-guile))
+          (build (gnu-build
+                   %store
+                   "hello-2.8"
+                   `(("source" ,tarball) ,@%bootstrap-inputs)
+                   #:guile
+                   %bootstrap-guile
+                   #:search-paths
+                   %bootstrap-search-paths))
+          (out (derivation->output-path build)))
+     (and (build-derivations
+            %store
+            (list (pk 'hello-drv build)))
+          (valid-path? %store out)
+          (file-exists? (string-append out "/bin/hello")))))
result: SKIP

SKIP: tests/derivations
=======================

random seed for tests: 1553197142
Backtrace:
          18 (apply-smob/1 #<catch-closure dffa20>)
In ice-9/boot-9.scm:
    705:2 17 (call-with-prompt _ _ #<procedure default-prompt-handler (k proc)>)
In ice-9/eval.scm:
    619:8 16 (_ #(#(#<directory (guile-user) e7d140>)))
In ice-9/boot-9.scm:
    142:2 15 (dynamic-wind _ _ #<procedure 3294720 at ice-9/eval.scm:330:13 ()>)
    152:2 14 (with-fluid* _ _ _)
In guix/status.scm:
    810:4 13 (call-with-status-report _ _)
In guix/store.scm:
  1737:24 12 (run-with-store _ _ #:guile-for-build _ #:system _ #:target _)
In unknown file:
          11 (_ #<procedure 99f6880 at ice-9/eval.scm:330:13 ()> #<procedure 99…> …)
In ice-9/boot-9.scm:
    829:9 10 (catch srfi-34 #<procedure 99f6600 at ice-9/eval.scm:330:13 ()> #<…> …)
In ice-9/eval.scm:
    159:9  9 (_ #(#(#<directory (run-system-tests) ea0aa0> #<store-connectio…> …)))
In guix/store.scm:
  1151:15  8 (_ #<store-connection 256.99 84a2d20> _ _)
   704:13  7 (process-stderr _ _)
In unknown file:
           6 (display "       'sha256\n+              hash\n+              #:gu…" …)
In guix/status.scm:
   733:16  5 (write! _ _ _)
    647:6  4 (_ (build-started "/tmp/guix-tests/store/vcj9833sk577wd7qxzvmgq…" …) …)
   511:24  3 (print-build-event _ _ _ _ #:colorize? _ #:print-log? _)
In guix/derivations.scm:
   495:17  2 (read-derivation-from-file "/tmp/guix-tests/store/vcj9833sk577wd7qx…")
In ice-9/ports.scm:
   439:11  1 (call-with-input-file "/tmp/guix-tests/store/vcj9833sk577wd7qxzvmg…" …)
In unknown file:
           0 (open-file "/tmp/guix-tests/store/vcj9833sk577wd7qxzvmgqcfbf9b4sjz…" …)

ERROR: In procedure open-file:
In procedure open-file: No such file or directory: "/tmp/guix-tests/store/vcj9833sk5
77wd7qxzvmgqcfbf9b4sjz-foo.drv"                                                    
make: *** [Makefile:5417: check-system] Error 1