GNU bug report logs - #47239
Test failure in tests/publish.scm with commit 1955ef93b76e51cab5bed4c90f7eb9df7035355a

Previous Next

Package: guix;

Reported by: Konrad Hinsen <konrad.hinsen <at> fastmail.net>

Date: Thu, 18 Mar 2021 15:06:02 UTC

Severity: normal

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 47239 in the body.
You can then email your comments to 47239 AT debbugs.gnu.org in the normal way.

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#47239; Package guix. (Thu, 18 Mar 2021 15:06:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Konrad Hinsen <konrad.hinsen <at> fastmail.net>:
New bug report received and forwarded. Copy sent to bug-guix <at> gnu.org. (Thu, 18 Mar 2021 15:06:02 GMT) Full text and rfc822 format available.

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

From: Konrad Hinsen <konrad.hinsen <at> fastmail.net>
To: bug-guix <at> gnu.org
Subject: Test failure in tests/publish.scm with commit
 1955ef93b76e51cab5bed4c90f7eb9df7035355a
Date: Thu, 18 Mar 2021 16:05:33 +0100
[Message part 1 (text/plain, inline)]
Dear Guix Gurus,

I am trying to compile Guix (commit
1955ef93b76e51cab5bed4c90f7eb9df7035355a) from source, on a computer
running Ubuntu 20.04 with Guix added via a binary installation.  I get
one test failure, whose test-suite.log is attached.

Cheers,
  Konrad.
[test-suite.log (text/plain, attachment)]

Information forwarded to bug-guix <at> gnu.org:
bug#47239; Package guix. (Sat, 20 Mar 2021 20:42:01 GMT) Full text and rfc822 format available.

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

From: Ludovic Courtès <ludo <at> gnu.org>
To: Konrad Hinsen <konrad.hinsen <at> fastmail.net>
Cc: 47239 <at> debbugs.gnu.org
Subject: Re: bug#47239: Test failure in tests/publish.scm with commit
 1955ef93b76e51cab5bed4c90f7eb9df7035355a
Date: Sat, 20 Mar 2021 21:41:08 +0100
Hi Konrad,

Konrad Hinsen <konrad.hinsen <at> fastmail.net> skribis:

> test-name: with cache
> location: /home/hinsen/src/guix/tests/publish.scm:417
> source:
> + (test-equal
> +   "with cache"
> +   (list #t
> +         `(("StorePath" unquote %item)
> +           ("URL"
> +            unquote
> +            (string-append "nar/gzip/" (basename %item)))
> +           ("Compression" . "gzip"))
> +         200
> +         #t
> +         #t
> +         404)
> +   (call-with-temporary-directory
> +     (lambda (cache)
> +       (let ((thread
> +               (with-separate-output-ports
> +                 (call-with-new-thread
> +                   (lambda ()
> +                     (guix-publish
> +                       "--port=6797"
> +                       "-C2"
> +                       (string-append "--cache=" cache)
> +                       "--cache-bypass-threshold=0"))))))
> +         (wait-until-ready 6797)
> +         (let* ((base "http://localhost:6797/")
> +                (part (store-path-hash-part %item))
> +                (url (string-append base part ".narinfo"))
> +                (nar-url
> +                  (string-append base "nar/gzip/" (basename %item)))
> +                (cached
> +                  (string-append
> +                    cache
> +                    "/gzip/"
> +                    (basename %item)
> +                    ".narinfo"))
> +                (nar (string-append
> +                       cache
> +                       "/gzip/"
> +                       (basename %item)
> +                       ".nar"))
> +                (response (http-get url)))
> +           (and (= 404 (response-code response))
> +                (match (assq-ref
> +                         (response-headers response)
> +                         'cache-control)
> +                       ((((quote max-age) . ttl)) (< ttl 3600)))
> +                (wait-for-file cached)
> +                (= 420 (stat:perms (lstat cached)))
> +                (= 420 (stat:perms (lstat nar)))
> +                (let* ((body (http-get-port url))
> +                       (compressed (http-get nar-url))
> +                       (uncompressed
> +                         (http-get
> +                           (string-append base "nar/" (basename %item))))
> +                       (narinfo (recutils->alist body)))
> +                  (list (file-exists? nar)
> +                        (filter
> +                          (lambda (item)
> +                            (match item
> +                                   (("Compression" . _) #t)
> +                                   (("StorePath" . _) #t)
> +                                   (("URL" . _) #t)
> +                                   (_ #f)))
> +                          narinfo)
> +                        (response-code compressed)
> +                        (= (response-content-length compressed)
> +                           (stat:size (stat nar)))
> +                        (= (string->number (assoc-ref narinfo "FileSize"))
> +                           (stat:size (stat nar)))
> +                        (response-code uncompressed)))))))))
> expected-value: (#t (("StorePath" . "/home/hinsen/src/guix/test-tmp/store/892j9b0gqgbj4a7sv40jif3yyv25sm90-item") ("URL" . "nar/gzip/892j9b0gqgbj4a7sv40jif3yyv25sm90-item") ("Compression" . "gzip")) 200 #t #t 404)
> actual-value: #f
> result: FAIL

Is it reproducible?  (You can run “make check TESTS=tests/publish.scm”.)

If it is, could you add ‘pk’ calls here and there to see which of the
sub-expressions in (and …) returns false?

For example, replace:

  (= 404 (response-code response)

by:

  (pk 'four-oh-four (= 404 (response-code response)))

That’ll print a line in the test log with the value of that (= …)
expression.

TIA,
Ludo’.




Information forwarded to bug-guix <at> gnu.org:
bug#47239; Package guix. (Sun, 21 Mar 2021 10:27:02 GMT) Full text and rfc822 format available.

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

From: Konrad Hinsen <konrad.hinsen <at> fastmail.net>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: 47239 <at> debbugs.gnu.org
Subject: Re: bug#47239: Test failure in tests/publish.scm with commit
 1955ef93b76e51cab5bed4c90f7eb9df7035355a
Date: Sun, 21 Mar 2021 11:26:08 +0100
Hi Ludo,

> Is it reproducible?  (You can run “make check TESTS=tests/publish.scm”.)

Yes.

> If it is, could you add ‘pk’ calls here and there to see which of the
> sub-expressions in (and …) returns false?

'pk' shows nothing, but I rolled my own version using plain old
"display" and found that 

   (stat:perms (lstat nar))

is #o664 rather than the expected #o644.

Cheers,
  Konrad.




Information forwarded to bug-guix <at> gnu.org:
bug#47239; Package guix. (Sun, 21 Mar 2021 14:28:02 GMT) Full text and rfc822 format available.

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

From: zimoun <zimon.toutoune <at> gmail.com>
To: Konrad Hinsen <konrad.hinsen <at> fastmail.net>, Ludovic Courtès <ludo <at> gnu.org>
Cc: 47239 <at> debbugs.gnu.org
Subject: Re: bug#47239: Test failure in tests/publish.scm with commit
 1955ef93b76e51cab5bed4c90f7eb9df7035355a
Date: Sun, 21 Mar 2021 15:25:02 +0100
Hi,

On Sun, 21 Mar 2021 at 11:26, Konrad Hinsen <konrad.hinsen <at> fastmail.net> wrote:

>> Is it reproducible?  (You can run “make check TESTS=tests/publish.scm”.)
>
> Yes.

For the record, ’tests/publish.scm’ pass on Debian but not on Ubuntu.


Cheers,
simon




Information forwarded to bug-guix <at> gnu.org:
bug#47239; Package guix. (Mon, 22 Mar 2021 07:55:02 GMT) Full text and rfc822 format available.

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

From: Konrad Hinsen <konrad.hinsen <at> fastmail.net>
To: zimoun <zimon.toutoune <at> gmail.com>, Ludovic Courtès
 <ludo <at> gnu.org>
Cc: 47239 <at> debbugs.gnu.org
Subject: Re: bug#47239: Test failure in tests/publish.scm with commit
 1955ef93b76e51cab5bed4c90f7eb9df7035355a
Date: Mon, 22 Mar 2021 08:54:50 +0100
zimoun <zimon.toutoune <at> gmail.com> writes:

> For the record, ’tests/publish.scm’ pass on Debian but not on Ubuntu.

One more data point: the tests pass under Ubuntu 18.04, but fail under
Ubuntu 20.04.

Cheers,
  Konrad.




Information forwarded to bug-guix <at> gnu.org:
bug#47239; Package guix. (Mon, 22 Mar 2021 16:34:02 GMT) Full text and rfc822 format available.

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

From: Cees de Groot <cg <at> evrl.com>
To: "47239 <at> debbugs.gnu.org" <47239 <at> debbugs.gnu.org>
Subject: Test failure in tests/publish.scm with commit
 1955ef93b76e51cab5bed4c90f7eb9df7035355a
Date: Mon, 22 Mar 2021 16:04:35 +0000
[Message part 1 (text/plain, inline)]
FWIW, I can reproduce it on Ubuntu 20.10 as well.
[Message part 2 (text/html, inline)]

Information forwarded to bug-guix <at> gnu.org:
bug#47239; Package guix. (Wed, 24 Mar 2021 02:35:02 GMT) Full text and rfc822 format available.

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

From: Cees de Groot <cg <at> evrl.com>
To: "47239 <at> debbugs.gnu.org" <47239 <at> debbugs.gnu.org>
Subject: Test failure in tests/publish.scm with commit
 1955ef93b76e51cab5bed4c90f7eb9df7035355a
Date: Wed, 24 Mar 2021 02:32:35 +0000
[Message part 1 (text/plain, inline)]
I think this is a simple umask issue. Making the test check for just the bits worked for me:

diff --git a/tests/publish.scm b/tests/publish.scm
index 52101876b5..3e67c435ac 100644
--- a/tests/publish.scm
+++ b/tests/publish.scm
@@ -452,8 +452,8 @@ References: ~%"
(wait-for-file cached)

;; Both the narinfo and nar should be world-readable.
- (= #o644 (stat:perms (lstat cached)))
- (= #o644 (stat:perms (lstat nar)))
+ (= #o444 (logand #o444 (stat:perms (lstat cached))))
+ (= #o444 (logand #o444 (stat:perms (lstat nar))))

(let* ((body (http-get-port url))
(compressed (http-get nar-url))
[Message part 2 (text/html, inline)]

Added indication that bug 47239 blocks47297 Request was from zimoun <zimon.toutoune <at> gmail.com> to control <at> debbugs.gnu.org. (Wed, 24 Mar 2021 03:15:02 GMT) Full text and rfc822 format available.

Reply sent to Ludovic Courtès <ludo <at> gnu.org>:
You have taken responsibility. (Wed, 31 Mar 2021 14:03:02 GMT) Full text and rfc822 format available.

Notification sent to Konrad Hinsen <konrad.hinsen <at> fastmail.net>:
bug acknowledged by developer. (Wed, 31 Mar 2021 14:03:02 GMT) Full text and rfc822 format available.

Message #30 received at 47239-done <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Cees de Groot <cg <at> evrl.com>
Cc: "47239 <at> debbugs.gnu.org" <47239-done <at> debbugs.gnu.org>
Subject: Re: bug#47239: Test failure in tests/publish.scm with commit
 1955ef93b76e51cab5bed4c90f7eb9df7035355a
Date: Wed, 31 Mar 2021 16:02:15 +0200
Hi,

Cees de Groot <cg <at> evrl.com> skribis:

> I think this is a simple umask issue. Making the test check for just the bits worked for me:
>
> diff --git a/tests/publish.scm b/tests/publish.scm
> index 52101876b5..3e67c435ac 100644
> --- a/tests/publish.scm
> +++ b/tests/publish.scm
> @@ -452,8 +452,8 @@ References: ~%"
> (wait-for-file cached)
>
> ;; Both the narinfo and nar should be world-readable.
> - (= #o644 (stat:perms (lstat cached)))
> - (= #o644 (stat:perms (lstat nar)))
> + (= #o444 (logand #o444 (stat:perms (lstat cached))))
> + (= #o444 (logand #o444 (stat:perms (lstat nar))))

Indeed.  Pushed as c536f0b217714917988d2f412999d978c2f2f495 on your
behalf.

Thanks!

Ludo’.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 29 Apr 2021 11:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 356 days ago.

Previous Next


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