GNU bug report logs

#47239 Test failure in tests/publish.scm with commit 1955ef93b76e51cab5bed4c90f7eb9df7035355a

PackageSource(s)Maintainer(s)
guix PTS Buildd Popcon
Reply or subscribe to this bug. View this bug as an mbox, status mbox, or maintainer mbox

Report forwarded to bug-guix@gnu.org:
bug#47239; Package guix. (Thu, 18 Mar 2021 15:06:02 GMT) (full text, mbox, link).


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


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

From: Konrad Hinsen <konrad.hinsen@fastmail.net>
To: bug-guix@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@gnu.org:
bug#47239; Package guix. (Sat, 20 Mar 2021 20:42:01 GMT) (full text, mbox, link).


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

From: Ludovic Courtès <ludo@gnu.org>
To: Konrad Hinsen <konrad.hinsen@fastmail.net>
Cc: 47239@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@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@gnu.org:
bug#47239; Package guix. (Sun, 21 Mar 2021 10:27:02 GMT) (full text, mbox, link).


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

From: Konrad Hinsen <konrad.hinsen@fastmail.net>
To: Ludovic Courtès <ludo@gnu.org>
Cc: 47239@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@gnu.org:
bug#47239; Package guix. (Sun, 21 Mar 2021 14:28:02 GMT) (full text, mbox, link).


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

From: zimoun <zimon.toutoune@gmail.com>
To: Konrad Hinsen <konrad.hinsen@fastmail.net>, Ludovic Courtès <ludo@gnu.org>
Cc: 47239@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@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@gnu.org:
bug#47239; Package guix. (Mon, 22 Mar 2021 07:55:02 GMT) (full text, mbox, link).


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

From: Konrad Hinsen <konrad.hinsen@fastmail.net>
To: zimoun <zimon.toutoune@gmail.com>, Ludovic Courtès <ludo@gnu.org>
Cc: 47239@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@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@gnu.org:
bug#47239; Package guix. (Mon, 22 Mar 2021 16:34:02 GMT) (full text, mbox, link).


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

From: Cees de Groot <cg@evrl.com>
To: "47239@debbugs.gnu.org" <47239@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@gnu.org:
bug#47239; Package guix. (Wed, 24 Mar 2021 02:35:02 GMT) (full text, mbox, link).


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

From: Cees de Groot <cg@evrl.com>
To: "47239@debbugs.gnu.org" <47239@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@gmail.com> to control@debbugs.gnu.org. (Wed, 24 Mar 2021 03:15:02 GMT) (full text, mbox, link).


Reply sent to Ludovic Courtès <ludo@gnu.org>:
You have taken responsibility. (Wed, 31 Mar 2021 14:03:02 GMT) (full text, mbox, link).


Notification sent to Konrad Hinsen <konrad.hinsen@fastmail.net>:
bug acknowledged by developer. (Wed, 31 Mar 2021 14:03:02 GMT) (full text, mbox, link).


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

From: Ludovic Courtès <ludo@gnu.org>
To: Cees de Groot <cg@evrl.com>
Cc: "47239@debbugs.gnu.org" <47239-done@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@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@gnu.org> to internal_control@debbugs.gnu.org. (Thu, 29 Apr 2021 11:24:06 GMT) (full text, mbox, link).


Send a report that this bug log contains spam.


debbugs.gnu.org maintainers <help-debbugs@gnu.org>. Last modified: Sun Dec 22 03:32:23 2024; Machine Name: wallace-server

GNU bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.