GNU bug report logs - #57039
`make check' yields two failed tests.

Previous Next

Package: guix;

Reported by: Pierre-Henry Fröhring <contact <at> phfrohring.com>

Date: Sun, 7 Aug 2022 14:14:01 UTC

Severity: normal

To reply to this bug, email your comments to 57039 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-guix <at> gnu.org:
bug#57039; Package guix. (Sun, 07 Aug 2022 14:14:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Pierre-Henry Fröhring <contact <at> phfrohring.com>:
New bug report received and forwarded. Copy sent to bug-guix <at> gnu.org. (Sun, 07 Aug 2022 14:14:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Pierre-Henry Fröhring <contact <at> phfrohring.com>
To: bug-guix <bug-guix <at> gnu.org>
Subject: `make check' yields two failed tests.
Date: Sun, 07 Aug 2022 16:13:33 +0200
[Message part 1 (text/plain, inline)]
Hello Guix,

I've just ran these commands for submitting packages : 

#+begin_src bash
  cd ~/src/guix
  git checkout master
  git pull
  guix shell -D guix --pure
  ./bootstrap
  ./configure --localstatedir=/var
  make
  make check
#+end_src


which gave me this result:

#+begin_src result
 
=======================================================================
=====
  Testsuite summary for GNU Guix 1.3.0.22877-c0e713
 
=======================================================================
=====
  # TOTAL: 2243
  # PASS:  2230
  # SKIP:  8
  # XFAIL: 3
  # FAIL:  2
  # XPASS: 0
  # ERROR: 0
 
=======================================================================
=====
  See ./test-suite.log
  Please report to bug-guix <at> gnu.org
 
=======================================================================
=====
#+end_src


So, I've attached the logs to this email.

Thanks,
PHF
[test-suite.log (text/x-log, attachment)]

Information forwarded to bug-guix <at> gnu.org:
bug#57039; Package guix. (Tue, 09 Aug 2022 13:52:01 GMT) Full text and rfc822 format available.

Message #8 received at 57039 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Pierre-Henry Fröhring <contact <at> phfrohring.com>
Cc: 57039 <at> debbugs.gnu.org
Subject: Re: bug#57039: `make check' yields two failed tests.
Date: Tue, 09 Aug 2022 15:50:58 +0200
Hi,

Pierre-Henry Fröhring <contact <at> phfrohring.com> skribis:

> test-name: channel-news, one entry
> location: /home/phf/src/guix/tests/channels.scm:323
> source:
> + (test-assert
> +   "channel-news, one entry"

[...]

> +                      (entry (tag "tag-for-first-news-entry")
> +                             (title (en "Old news.") (eo "Malnova?oj."))

The question mark here suggests you’re not running the tests with a
UTF-8 locale.

Could you add, say, ‘glibc-locales’ to your environment, ensure
GUIX_LOCPATH points to it, and set LC_ALL=en_US.UTF-8 (or similar)?

> ;;; (fail (package (name "python-foo") (version "1.0.0") (source (origin (method url-fetch) (uri (pypi-uri "foo" version)) (sha256 (base32 "03ygiww1c9fdgs998x4rqhxa73gq0r30rp0vq50q022wp1d6w0cz")))) (build-system python-build-system) (propagated-inputs (list python-wrong)) (home-page "http://example.com") (synopsis "summary") (description "summary") (license license:lgpl2.0)) #f)
> test-name: pypi->guix-package, wheels
> location: /home/phf/src/guix/tests/pypi.scm:276
> source:
> + (test-assert
> +   "pypi->guix-package, wheels"
> +   (mock ((guix import utils)
> +          url-fetch
> +          (lambda (url file-name)
> +            (match url
> +                   ("https://example.com/foo-1.0.0.tar.gz"
> +                    (begin
> +                      (mkdir-p "foo-1.0.0/foo.egg-info/")
> +                      (with-output-to-file
> +                        "foo-1.0.0/foo.egg-info/requires.txt"
> +                        (lambda ()
> +                          (display
> +                            "wrong data to make sure we're testing wheels ")))
> +                      (parameterize
> +                        ((current-output-port (%make-void-port "rw+")))
> +                        (system* "tar" "czvf" file-name "foo-1.0.0/"))
> +                      (delete-file-recursively "foo-1.0.0")
> +                      (set! test-source-hash
> +                        (call-with-input-file file-name port-sha256))))
> +                   ("https://example.com/foo-1.0.0-py2.py3-none-any.whl"
> +                    (begin
> +                      (mkdir "foo-1.0.0.dist-info")
> +                      (with-output-to-file
> +                        "foo-1.0.0.dist-info/METADATA"
> +                        (lambda () (display test-metadata)))
> +                      (let ((zip-file (string-append file-name ".zip")))
> +                        (system*
> +                          "zip"
> +                          "-q"
> +                          zip-file
> +                          "foo-1.0.0.dist-info/METADATA")
> +                        (rename-file zip-file file-name))
> +                      (delete-file-recursively "foo-1.0.0.dist-info")))
> +                   (_ (error "Unexpected URL: " url)))))
> +         (mock ((guix http-client)
> +                http-fetch
> +                (lambda (url . rest)
> +                  (match url
> +                         ("https://pypi.org/pypi/foo/json"
> +                          (values
> +                            (open-input-string test-json-1)
> +                            (string-length test-json-1)))
> +                         ("https://example.com/foo-1.0.0-py2.py3-none-any.whl"
> +                          #f)
> +                         (_ (error "Unexpected URL: " url)))))
> +               (invalidate-memoization! pypi->guix-package)
> +               (match (pypi->guix-package "foo")
> +                      (('package
> +                        ('name "python-foo")
> +                        ('version "1.0.0")
> +                        ('source
> +                         ('origin
> +                          ('method 'url-fetch)
> +                          ('uri ('pypi-uri "foo" 'version))
> +                          ('sha256 ('base32 (? string? hash)))))
> +                        ('build-system 'python-build-system)
> +                        ('propagated-inputs
> +                         ('list 'python-bar 'python-baz))
> +                        ('native-inputs ('list 'python-pytest))
> +                        ('home-page "http://example.com")
> +                        ('synopsis "summary")
> +                        ('description "summary")
> +                        ('license 'license:lgpl2.0))
> +                       (string=?
> +                         (bytevector->nix-base32-string test-source-hash)
> +                         hash))
> +                      (x (pk 'fail x #f))))))
> actual-value: #f
> result: FAIL

Not sure about that one.  Does it still occur on current ‘master’?

See
<https://guix.gnu.org/manual/devel/en/html_node/Running-the-Test-Suite.html>
on how to run only tests from ‘tests/pypi.scm’.

Thanks,
Ludo’.




Information forwarded to bug-guix <at> gnu.org:
bug#57039; Package guix. (Tue, 09 Aug 2022 14:45:02 GMT) Full text and rfc822 format available.

Message #11 received at 57039 <at> debbugs.gnu.org (full text, mbox):

From: Maxime Devos <maximedevos <at> telenet.be>
To: Ludovic Courtès <ludo <at> gnu.org>,
 Pierre-Henry Fröhring <contact <at> phfrohring.com>
Cc: 57039 <at> debbugs.gnu.org
Subject: Re: bug#57039: `make check' yields two failed tests.
Date: Tue, 9 Aug 2022 16:44:26 +0200
[Message part 1 (text/plain, inline)]
On 09-08-2022 15:50, Ludovic Courtès wrote:
>> +                      (entry (tag "tag-for-first-news-entry")
>> +                             (title (en "Old news.") (eo "Malnova?oj."))
> The question mark here suggests you’re not running the tests with a
> UTF-8 locale.
>
> Could you add, say, ‘glibc-locales’ to your environment, ensure
> GUIX_LOCPATH points to it, and set LC_ALL=en_US.UTF-8 (or similar)?
>
Two comments:

If tests require an UTF-8 locale, I think the tests (maybe in 
build-aux/test-driver.scm?) should check that an UTF-8 that an UTF-8 
locale is actually in use and otherwise bail out properly.

It's not a file-name but rather the contents of the news file, so I 
would think we are just forgetting to pass some arguments like 
#:encoding "UTF-8" -- making the interpretation of the news file depend 
on the current locale doesn't seem good to me (it's encoding on stdout 
with "guix pull --news" is another matter).

Greetings,
Maxime.

[Message part 2 (text/html, inline)]
[OpenPGP_0x49E3EE22191725EE.asc (application/pgp-keys, attachment)]
[OpenPGP_signature (application/pgp-signature, attachment)]

Information forwarded to bug-guix <at> gnu.org:
bug#57039; Package guix. (Tue, 09 Aug 2022 14:51:02 GMT) Full text and rfc822 format available.

Message #14 received at 57039 <at> debbugs.gnu.org (full text, mbox):

From: Maxime Devos <maximedevos <at> telenet.be>
To: Ludovic Courtès <ludo <at> gnu.org>,
 Pierre-Henry Fröhring <contact <at> phfrohring.com>
Cc: 57039 <at> debbugs.gnu.org
Subject: Re: bug#57039: `make check' yields two failed tests.
Date: Tue, 9 Aug 2022 16:50:07 +0200
[Message part 1 (text/plain, inline)]
On 09-08-2022 15:50, Ludovic Courtès wrote:

> ;;; (fail (package (name "python-foo") (version "1.0.0") (source (origin (method url-fetch) (uri (pypi-uri "foo" version)) (sha256 (base32 "03ygiww1c9fdgs998x4rqhxa73gq0r30rp0vq50q022wp1d6w0cz")))) (build-system python-build-system) (propagated-inputs (list python-wrong)) (home-page"http://example.com") (synopsis "summary") (description "summary") (license license:lgpl2.0)) #f)
> test-name: pypi->guix-package, wheels
> location: /home/phf/src/guix/tests/pypi.scm:276
> source:
> + (test-assert

I think I've seen this one fail before in the past, but 
non-deterministically, IIRC

> Not sure about that one.  Does it still occur on current ‘master’?

It's a recent bug number and the submitter wrote they did "git checkout 
..." and "git pull", so it looks like this happened on a current 
master.  Looking at git.savannah.gnu.org there haven't been changes in 
this area, so I would think it's still effectively current master.

Greetings,
Maxime.

[OpenPGP_0x49E3EE22191725EE.asc (application/pgp-keys, attachment)]
[OpenPGP_signature (application/pgp-signature, attachment)]

Information forwarded to bug-guix <at> gnu.org:
bug#57039; Package guix. (Tue, 09 Aug 2022 16:03:02 GMT) Full text and rfc822 format available.

Message #17 received at 57039 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Maxime Devos <maximedevos <at> telenet.be>
Cc: Pierre-Henry Fröhring <contact <at> phfrohring.com>,
 57039 <at> debbugs.gnu.org
Subject: Re: bug#57039: `make check' yields two failed tests.
Date: Tue, 09 Aug 2022 18:01:52 +0200
Maxime Devos <maximedevos <at> telenet.be> skribis:

> On 09-08-2022 15:50, Ludovic Courtès wrote:
>>> +                      (entry (tag "tag-for-first-news-entry")
>>> +                             (title (en "Old news.") (eo "Malnova?oj."))
>> The question mark here suggests you’re not running the tests with a
>> UTF-8 locale.
>>
>> Could you add, say, ‘glibc-locales’ to your environment, ensure
>> GUIX_LOCPATH points to it, and set LC_ALL=en_US.UTF-8 (or similar)?
>>
> Two comments:
>
> If tests require an UTF-8 locale, I think the tests (maybe in
> build-aux/test-driver.scm?) should check that an UTF-8 that an UTF-8
> locale is actually in use and otherwise bail out properly.
>
> It's not a file-name but rather the contents of the news file, so I
> would think we are just forgetting to pass some arguments like
> #:encoding "UTF-8" -- making the interpretation of the news file
> depend on the current locale doesn't seem good to me (it's encoding on
> stdout with "guix pull --news" is another matter).

Agreed, I came to the same conclusion:

  60e0aae89c channels: Consider news files as UTF-8-encoded by default.
  e1b8bace8c tests: git: Write files as UTF-8.

Should have done that long ago!

Ludo’.




This bug report was last modified 3 years and 42 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.