Subject: bug#43859: Test Suite Failures

From: Ludovic Courtès <[email-masked]>
Date: Mon, 12 Oct 2020 14:20:22 +0200

Hi,

Raphael Gosselin <[email-masked]> skribis:

> Guix: 1.1.0
> Guile: 3.0.4
> Guile-Gcrypt: 0.3.0
> GnuTLS: 3.6.12
> Guile-SQLite3: 0.1.3
> Guile-Git: 0.3.0
> Guile-JSON: 4.3.2
> zlib: 1.2.11
> Make: 4.3
> Guile-SSH: 0.13.1
> libgcrypt: 1.8.5
> sqlite3: 3.31.1
> g++: 9.3.0

Was it on a “foreign distro”?  Are Guile-Gcrypt, Guile-JSON, etc. coming
from packages of the host distro?

Or are you running “make checking” within “guix environment guix”, or
perhaps with the ‘--container’ option?

> location: /home/raph/guix-1.1.0/tests/builders.scm:50
> 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))))
> actual-value: #f
> actual-error:
> + (wrong-type-arg
> +   "struct-vtable"
> +   "Wrong type argument in position 1 (expecting struct): ~S"
> +   (#f)
> +   (#f))
> result: FAIL

It looks as if guix-daemon was not running, although “make check”
automatically starts an instance.

> test-name: crate->guix-package
> location: /home/raph/guix-1.1.0/tests/crate.scm:246
> source:
> + (test-assert
> +   "crate->guix-package"
> +   (mock ((guix http-client)
> +          http-fetch
> +          (lambda (url . rest)
> +            (match url
> +                   ("https://crates.io/api/v1/crates/foo"
> +                    (open-input-string test-foo-crate))
> +                   ("https://crates.io/api/v1/crates/foo/1.0.0/download"
> +                    (set! test-source-hash
> +                      (bytevector->nix-base32-string
> +                        (sha256
> +                          (string->bytevector "empty file\n" "utf-8"))))
> +                    (open-input-string "empty file\n"))
> +                   ("https://crates.io/api/v1/crates/foo/1.0.0/dependencies"
> +                    (open-input-string test-foo-dependencies))
> +                   (_ (error "Unexpected URL: " url)))))
> +         (match (crate->guix-package "foo")
> +                (('package
> +                  ('name "rust-foo")
> +                  ('version "1.0.0")
> +                  ('source
> +                   ('origin
> +                    ('method 'url-fetch)
> +                    ('uri ('crate-uri "foo" 'version))
> +                    ('file-name
> +                     ('string-append 'name "-" 'version ".tar.gz"))
> +                    ('sha256 ('base32 (? string? hash)))))
> +                  ('build-system 'cargo-build-system)
> +                  ('arguments
> +                   ('quasiquote
> +                    ('#:cargo-inputs
> +                     (("rust-bar" ('unquote rust-bar))))))
> +                  ('home-page "http://example.com")
> +                  ('synopsis "summary")
> +                  ('description "summary")
> +                  ('license ('list 'license:expat 'license:asl2.0)))
> +                 (string=? test-source-hash hash))
> +                (x (pk 'fail x #f)))))
> actual-value: #f
> actual-error:
> + (json-invalid #<input: string 7f70dcf8a8c0>)
> result: FAIL

Guix 1.1.0 requires Guile-JSON 3.x:

  https://guix.gnu.org/manual/en/html_node/Requirements.html

At the time Guile-JSON 4.x was not released yet, and as it turns out 4.x
introduced incompatible changes.

Could you try again with Guile-JSON 3.x?

> test-name: channel-news, one entry
> location: /home/raph/guix-1.1.0/tests/channels.scm:266
> source:
> + (test-assert
> +   "channel-news, one entry"

[...]

> Initialized empty Git repository in /tmp/guix-directory.mTNwTv/.git/
> [master (root-commit) 24901ba] first commit
>  1 file changed, 1 insertion(+)
>  create mode 100644 .guix-channel
> [master 47ae9bd] second commit
>  1 file changed, 1 insertion(+)
>  create mode 100644 src/a.txt
> [master 17750b4] third commit
>  1 file changed, 1 insertion(+)
>  create mode 100644 news.scm
> [master 938b414] fourth commit
>  1 file changed, 1 insertion(+)
>  create mode 100644 src/b.txt
> [master ad7e153] fifth commit
>  1 file changed, 1 insertion(+), 1 deletion(-)
> actual-value: #f
> result: FAIL

I suspect this is because your ~/.gitconfig is being used, which was
fixed in commit 3c91f003416c9fb79af2dc8766a7f449aa03f839 (see
<https://issues.guix.gnu.org/37679>).

> @ build-started /home/raph/guix-1.1.0/test-tmp/store/z2hbf42p0rilqacllrlwr8n7p6nd8k1k-guile-bootstrap-2.0.drv - x86_64-linux /home/raph/guix-1.1.0/test-tmp/var/log/guix/drvs/z2//hbf42p0rilqacllrlwr8n7p6nd8k1k-guile-bootstrap-2.0.drv.bz2 10429
> while setting up the build environment: executing `/home/raph/guix-1.1.0/test-tmp/store/yd91vyb838z41y7pp56ndfc5vv417656-bash': Exec format error
> builder for `/home/raph/guix-1.1.0/test-tmp/store/z2hbf42p0rilqacllrlwr8n7p6nd8k1k-guile-bootstrap-2.0.drv' failed with exit code 1
> @ build-failed /home/raph/guix-1.1.0/test-tmp/store/z2hbf42p0rilqacllrlwr8n7p6nd8k1k-guile-bootstrap-2.0.drv - 1 builder for `/home/raph/guix-1.1.0/test-tmp/store/z2hbf42p0rilqacllrlwr8n7p6nd8k1k-guile-bootstrap-2.0.drv' failed with exit code 1
> cannot build derivation `/home/raph/guix-1.1.0/test-tmp/store/8abwvl1mpdn99sancxacb9rh94cm5qnh-something.drv': 1 dependencies couldn't be built
> actual-value: #f
> actual-error:
> + (%exception
> +   #<&store-protocol-error message: "build of `/home/raph/guix-1.1.0/test-tmp/store/8abwvl1mpdn99sancxacb9rh94cm5qnh-something.drv' failed" status: 100>)

This (“Exec format error”) is fishy.  What does this command print:

  file -L /home/raph/guix-1.1.0/test-tmp/store/yd91vyb838z41y7pp56ndfc5vv417656-bash

?

Many failures are due to this.

Next time, please send ‘test-suite.log’, which contains the
concatenation of all the individual logs.

Thanks for your report!

Ludo’.