`make check' yields two failed tests.

  • Open
  • quality assurance status badge
Details
3 participants
  • Pierre-Henry Fröhring
  • Ludovic Courtès
  • Maxime Devos
Owner
unassigned
Submitted by
Pierre-Henry Fröhring
Severity
normal
P
P
Pierre-Henry Fröhring wrote on 7 Aug 2022 16:13
(name . bug-guix)(address . bug-guix@gnu.org)
7489b352818b7c33071c23f385f9017cb89c78c1.camel@phfrohring.com
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@gnu.org
=======================================================================
=====
#+end_src


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

Thanks,
PHF
Attachment: test-suite.log
L
L
Ludovic Courtès wrote on 9 Aug 2022 15:50
(name . Pierre-Henry Fröhring)(address . contact@phfrohring.com)(address . 57039@debbugs.gnu.org)
87a68d7cfx.fsf@gnu.org
Hi,

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

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

[...]

Toggle quote (3 lines)
> + (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)?

Toggle quote (75 lines)
> ;;; (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
on how to run only tests from ‘tests/pypi.scm’.

Thanks,
Ludo’.
M
M
Maxime Devos wrote on 9 Aug 2022 16:44
(address . 57039@debbugs.gnu.org)
fb49feda-0f8d-f50c-e30b-8d36e89f722d@telenet.be
On 09-08-2022 15:50, Ludovic Courtès wrote:
Toggle quote (8 lines)
>> + (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.
Attachment: file
Attachment: OpenPGP_signature
M
M
Maxime Devos wrote on 9 Aug 2022 16:50
(address . 57039@debbugs.gnu.org)
f984141e-a32e-1431-de17-59610bbfe4e6@telenet.be
On 09-08-2022 15:50, Ludovic Courtès wrote:
Toggle quote (5 lines)
> ;;; (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
Toggle quote (1 lines)
> 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.
Attachment: OpenPGP_signature
L
L
Ludovic Courtès wrote on 9 Aug 2022 18:01
(name . Maxime Devos)(address . maximedevos@telenet.be)
8735e55rtb.fsf@gnu.org
Maxime Devos <maximedevos@telenet.be> skribis:

Toggle quote (21 lines)
> 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’.
?
Your comment

Commenting via the web interface is currently disabled.

To comment on this conversation send an email to 57039@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 57039
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch