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

DoneSubmitted by Konrad Hinsen.
Details
4 participants
  • Cees de Groot
  • Konrad Hinsen
  • Ludovic Courtès
  • zimoun
Owner
unassigned
Severity
normal
K
K
Konrad Hinsen wrote on 18 Mar 16:05 +0100
(address . bug-guix@gnu.org)
m1sg4smria.fsf@ordinateur-de-catherine--konrad.home
Dear Guix Gurus,
I am trying to compile Guix (commit1955ef93b76e51cab5bed4c90f7eb9df7035355a) from source, on a computerrunning Ubuntu 20.04 with Guix added via a binary installation. I getone test failure, whose test-suite.log is attached.
Cheers, Konrad.
======================================== GNU Guix UNKNOWN: ./test-suite.log========================================
# TOTAL: 28# PASS: 27# SKIP: 0# XFAIL: 0# FAIL: 1# XPASS: 0# ERROR: 0
.. contents:: :depth: 2
FAIL: tests/publish===================

;;; (wait-for-file "/tmp/guix-directory.nlpLZB/gzip/892j9b0gqgbj4a7sv40jif3yyv25sm90-item.narinfo")test-name: with cachelocation: /home/hinsen/src/guix/tests/publish.scm:417source:+ (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: #fresult: FAIL

;;; (wait-for-file "/tmp/guix-directory.8sKoZA/gzip/892j9b0gqgbj4a7sv40jif3yyv25sm90-item.narinfo")
;;; (narinfo/gzip+lzip (("StorePath" . "/home/hinsen/src/guix/test-tmp/store/892j9b0gqgbj4a7sv40jif3yyv25sm90-item") ("URL" . "nar/gzip/892j9b0gqgbj4a7sv40jif3yyv25sm90-item") ("Compression" . "gzip") ("FileSize" . "86") ("URL" . "nar/lzip/892j9b0gqgbj4a7sv40jif3yyv25sm90-item") ("Compression" . "lzip") ("FileSize" . "99") ("NarHash" . "sha256:1xngcmsdkdvaycaqjfzvq4gr3gib56p2l8illglnsqzhpss47pxz") ("NarSize" . "120") ("References" . "yfwmjazc6d4grdr7gd05a088s5zi46fr-ref") ("Signature" . "1;ubuntu;KHNpZ25hdHVyZSAKIChkYXRhIAogIChmbGFncyBwa2NzMSkKICAoaGFzaCBzaGEyNTYgIzc4QzQxRUY4RDFEQ0JDMjdFNzBFMTI3NDExMzY4QzQ3MDQ1RjBDNEREMjBCMzdDMTBGQzA3MUYwM0VCMjg1NEYjKQogICkKIChzaWctdmFsIAogIChyc2EgCiAgIChzICMyODk3NjI1MjE2OUM5RjhCQjQwNzUxN0NGOUNGMTQ2N0E2NjYxRDg5MzYwNjU0N0Y0ODE2MDZGRTkwN0VBRDA4NzBDOUE3NkFCMjBBQUU1NzA1RkVBQjMyMTU3OTJBQzU0OEFBMjYzOEU1OUY1QTU4NzZDQTgyNzM3Mzk4MDFGMUMwNEU1NEZBNkU5RTI5MDhFQzk3MzYyM0NFNjAyOEIwNURFNDM5MTQ2QTVCRDU1NTQ2RTlBNTBGN0I0MzIzODk1NjhDQTlGNkEwNjUyRThEMjJEQjVEMDk5ODAxQTgxQTBDRjRCMTBCQjZFMUM3OTc0MTQxNUJGMTFENjcyQzY0IykKICAgKQogICkKIChwdWJsaWMta2V5IAogIChyc2EgCiAgIChuICMwMEMxRjc2NDA2OUY1NEZGRTkzQTEyNkIwMjMyODkwM0U5ODRFNEFFM0FGNkRGNDAyQjVCNkIzOTA3OTExQjg4QzM4NUYxQkE3NkEwMDJFQzlERUExMDlBNTIyOEVGMEU2MkVFMzFBMDZEMUE1ODYxQ0FCNDc0RjZDODU3QUM2NkVCNjVBMTkwNUYyNUJCQTE4Njk1NzlFNzNBM0I3RkVEMTNBRjVBMTY2NzMyNkY4OENERkMyRkYyNEIwM0MxNEZEMTM4NEFBN0U3M0NBODk1NzI4ODBCNjA2RTNBOTc0RTE1MzQ3OTYzRkM3QjYzNzg1NzQ5MzZBNDc1ODBEQkNCNDUjKQogICAoZSAjMDEwMDAxIykKICAgKQogICkKICkK")))
;;; (wait-for-file "/tmp/guix-directory.EwWvnB/none/cg2pd24cvpc6v4jh7ckki2n13q1zchni-fake-compressed-thing.tar.gz.narinfo")
;;; (wait-for-file "/tmp/guix-directory.3LxNtz/gzip/ram48mn56vgmfnr8km850kzs5syjfhbs-random.narinfo")publishing /home/hinsen/src/guix/test-tmp/store on 0.0.0.0, port 6789using 'none' compression method, level 0publishing /home/hinsen/src/guix/test-tmp/store on 0.0.0.0, port 6799using 'gzip' compression method, level 5publishing /home/hinsen/src/guix/test-tmp/store on 0.0.0.0, port 6790using 'lzip' compression method, level 3publishing /home/hinsen/src/guix/test-tmp/store on 0.0.0.0, port 6793using 'gzip' compression method, level 2using 'lzip' compression method, level 2publishing /home/hinsen/src/guix/test-tmp/store on 0.0.0.0, port 6798using 'none' compression method, level 0publishing /home/hinsen/src/guix/test-tmp/store on 0.0.0.0, port 6797using 'gzip' compression method, level 2publishing /home/hinsen/src/guix/test-tmp/store on 0.0.0.0, port 6794using 'gzip' compression method, level 2using 'lzip' compression method, level 2random seed for tests: 1616093970publishing /home/hinsen/src/guix/test-tmp/store on 0.0.0.0, port 6796using 'gzip' compression method, level 2publishing /home/hinsen/src/guix/test-tmp/store on 0.0.0.0, port 6795using 'gzip' compression method, level 3finding garbage collector roots...removing stale temporary roots file `/home/hinsen/src/guix/test-tmp/var/49285/temproots/49300'deleting unused links...
;;; (response #<<response> version: (1 . 1) code: 200 reason-phrase: "OK" headers: ((content-length . 1270) (content-type application/x-nix-narinfo (charset . "utf-8"))) port: #<closed: file 7f987e9bbbd0>>)
;;; (r1 #<<response> version: (1 . 1) code: 200 reason-phrase: "OK" headers: ((content-type application/x-nix-archive (charset . "ISO-8859-1"))) port: #<closed: file 7f987e9bb700>>)
;;; (wait-for-file "/tmp/guix-directory.KRX0xy/gzip/7m9anpjflf65fiaq98vr1q0c98kyx9kg-random.narinfo")
;;; (r2 #<<response> version: (1 . 1) code: 200 reason-phrase: "OK" headers: ((content-length . 139) (content-type application/octet-stream (charset . "ISO-8859-1"))) port: #<closed: file 7f987e9bb5b0>>)
;;; (wait-for-file "/tmp/guix-directory.EHMH8z/gzip/93lnhc9mm7z8qznqav2qwyjandd9gb7l-random.narinfo")publishing /home/hinsen/src/guix/test-tmp/store on 0.0.0.0, port 6788using 'gzip' compression method, level 3publishing /home/hinsen/src/guix/test-tmp/store on 0.0.0.0, port 6787using 'gzip' compression method, level 3@ build-started /home/hinsen/src/guix/test-tmp/store/38q9b6wajlggmm6dnd60465w14chh8ri-with-log.drv - x86_64-linux /home/hinsen/src/guix/test-tmp/var/log/guix/drvs/38//q9b6wajlggmm6dnd60465w14chh8ri-with-log.drv.bz2 49360Hello, build log!@ build-succeeded /home/hinsen/src/guix/test-tmp/store/38q9b6wajlggmm6dnd60465w14chh8ri-with-log.drv -GET /892j9b0gqgbj4a7sv40jif3yyv25sm90.narinfoGET /ram48mn56vgmfnr8km850kzs5syjfhbs.narinfoGET /ram48mn56vgmfnr8km850kzs5syjfhbs.narinfoGET /892j9b0gqgbj4a7sv40jif3yyv25sm90.narinfoGET /nix-cache-infoGET /892j9b0gqgbj4a7sv40jif3yyv25sm90.narinfoGET /fs7qgchq8d0bzih48q8k1nmfz526bqxl.narinfoGET /nar/892j9b0gqgbj4a7sv40jif3yyv25sm90-itemGET /nar/gzip/892j9b0gqgbj4a7sv40jif3yyv25sm90-itemGET /nar/gzip/892j9b0gqgbj4a7sv40jif3yyv25sm90-itemGET /nar/lzip/892j9b0gqgbj4a7sv40jif3yyv25sm90-itemGET /nar/zstd/892j9b0gqgbj4a7sv40jif3yyv25sm90-itemGET /nar/fs7qgchq8d0bzih48q8k1nmfz526bqxl-fake-gtk%2BGET /nar/invalidGET /file/the-file.txt/sha256/0halvvmzqz6wvp0g8sa9hda5g04j4hpnc5gd314npgarmbc2iw5fGET /file/the-file.txt/sha256/not-a-nix-base32-stringGET /file/the-file.txt/sha256/0mdqa9w1p6cmli6976v4wi0sw9r4p5prkj7lzfd1877wk11c9c73GET /log/kafh91vyhfg6r7p1i41g9qkd251i0x7k-with-logGET /log/does-not-existGET /signing-key.pubGET /892j9b0gqgbj4a7sv40jif3yyv25sm90.narinfoPOST /892j9b0gqgbj4a7sv40jif3yyv25sm90.narinfoGET /nar/gzip/7m9anpjflf65fiaq98vr1q0c98kyx9kg-randomGET /7m9anpjflf65fiaq98vr1q0c98kyx9kg.narinfoGET /nar/gzip/7m9anpjflf65fiaq98vr1q0c98kyx9kg-randomGET /cg2pd24cvpc6v4jh7ckki2n13q1zchni.narinfoGET /cg2pd24cvpc6v4jh7ckki2n13q1zchni.narinfoGET /cg2pd24cvpc6v4jh7ckki2n13q1zchni.narinfoGET /nar/gzip/cg2pd24cvpc6v4jh7ckki2n13q1zchni-fake-compressed-thing.tar.gzGET /nar/cg2pd24cvpc6v4jh7ckki2n13q1zchni-fake-compressed-thing.tar.gzGET /892j9b0gqgbj4a7sv40jif3yyv25sm90.narinfoGET /nar/gzip/892j9b0gqgbj4a7sv40jif3yyv25sm90-itemGET /nar/lzip/892j9b0gqgbj4a7sv40jif3yyv25sm90-itemGET /892j9b0gqgbj4a7sv40jif3yyv25sm90.narinfoGET /foo/bar/chbouib/892j9b0gqgbj4a7sv40jif3yyv25sm90-itemGET /nar/892j9b0gqgbj4a7sv40jif3yyv25sm90-itemGET /nar/gzip/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-does-not-existGET /nar/gzip/93lnhc9mm7z8qznqav2qwyjandd9gb7l-randomGET /93lnhc9mm7z8qznqav2qwyjandd9gb7l.narinfoGET /nar/gzip/93lnhc9mm7z8qznqav2qwyjandd9gb7l-randomGET /892j9b0gqgbj4a7sv40jif3yyv25sm90.narinfoGET /892j9b0gqgbj4a7sv40jif3yyv25sm90.narinfoGET /nar/gzip/892j9b0gqgbj4a7sv40jif3yyv25sm90-itemGET /nar/lzip/892j9b0gqgbj4a7sv40jif3yyv25sm90-itemGET /nar/892j9b0gqgbj4a7sv40jif3yyv25sm90-itemGET /892j9b0gqgbj4a7sv40jif3yyv25sm90.narinfoGET /l8w8g6wfpn2f8c1cxj24gnj80115j2vb.narinfo
L
L
Ludovic Courtès wrote on 20 Mar 21:41 +0100
(name . Konrad Hinsen)(address . konrad.hinsen@fastmail.net)(address . 47239@debbugs.gnu.org)
87zgyx4kyj.fsf@gnu.org
Hi Konrad,
Konrad Hinsen <konrad.hinsen@fastmail.net> skribis:
Toggle quote (77 lines)> 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 thesub-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’.
K
K
Konrad Hinsen wrote on 21 Mar 11:26 +0100
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 47239@debbugs.gnu.org)
m1eeg8n6pr.fsf@ordinateur-de-catherine--konrad.home
Hi Ludo,
Toggle quote (2 lines)> Is it reproducible? (You can run “make check TESTS=tests/publish.scm”.)
Yes.
Toggle quote (3 lines)> 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.
Z
Z
zimoun wrote on 21 Mar 15:25 +0100
(address . 47239@debbugs.gnu.org)
865z1kvb29.fsf@gmail.com
Hi,
On Sun, 21 Mar 2021 at 11:26, Konrad Hinsen <konrad.hinsen@fastmail.net> wrote:
Toggle quote (4 lines)>> 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
K
K
Konrad Hinsen wrote on 22 Mar 08:54 +0100
(address . 47239@debbugs.gnu.org)
m11rc7mxmd.fsf@ordinateur-de-catherine--konrad.home
zimoun <zimon.toutoune@gmail.com> writes:
Toggle quote (2 lines)> 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 underUbuntu 20.04.
Cheers, Konrad.
C
C
Cees de Groot wrote on 22 Mar 17:04 +0100
Test failure in tests/publish.scm with commit 1955ef93b76e51cab5bed4c90f7eb9df7035355a
(name . 47239@debbugs.gnu.org)(address . 47239@debbugs.gnu.org)
dYL00NhLq9MmRs8ZO1NFa2YCS7H1L-U_bclkIYKd7cTsDdnBIrZ2dTRckvTGd-3eCIXnnB243CPLds9_b1zV838mJNdIUCP51wh4XW2WOxE=@evrl.com
FWIW, I can reproduce it on Ubuntu 20.10 as well.
Attachment: file
C
C
Cees de Groot wrote on 24 Mar 03:32 +0100
(name . 47239@debbugs.gnu.org)(address . 47239@debbugs.gnu.org)
47SHfOqtf5hQVCuz4_qa5-l6KHlNdy4vCqvta2XchFJuC6e8U1QngEpPQLsMD2HeZVVSCqEpCnvu3YE8jItMMWHuRdzN7mKEUiW4307toxk=@evrl.com
I think this is a simple umask issue. Making the test check for just the bits worked for me:
Toggle diff (15 lines)diff --git a/tests/publish.scm b/tests/publish.scmindex 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))
Attachment: file
Z
Z
zimoun wrote on 24 Mar 04:05 +0100
control message for bug #47297
(address . control@debbugs.gnu.org)
86ft0li743.fsf@gmail.com
block 47297 by 47239quit
L
L
Ludovic Courtès wrote on 31 Mar 16:02 +0200
Re: bug#47239: Test failure in tests/publish.scm with commit 1955ef93b76e51cab5bed4c90f7eb9df7035355a
(name . Cees de Groot)(address . cg@evrl.com)(name . 47239@debbugs.gnu.org)(address . 47239-done@debbugs.gnu.org)
8735wba0bc.fsf@gnu.org
Hi,
Cees de Groot <cg@evrl.com> skribis:
Toggle quote (15 lines)> 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 yourbehalf.
Thanks!
Ludo’.
Closed
?