GNU logs - #46413, boring messages


Message sent to bug-guix@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#46413: tests/publish.scm fails on berlin
Resent-From: Leo Famulari <leo@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-guix@HIDDEN
Resent-Date: Tue, 09 Feb 2021 23:21:02 +0000
Resent-Message-ID: <handler.46413.B.161291284216805 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: report 46413
X-GNU-PR-Package: guix
X-GNU-PR-Keywords: 
To: 46413 <at> debbugs.gnu.org
X-Debbugs-Original-To: bug-guix@HIDDEN
Received: via spool by submit <at> debbugs.gnu.org id=B.161291284216805
          (code B ref -1); Tue, 09 Feb 2021 23:21:02 +0000
Received: (at submit) by debbugs.gnu.org; 9 Feb 2021 23:20:42 +0000
Received: from localhost ([127.0.0.1]:55037 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1l9cJE-0004Mx-Ui
	for submit <at> debbugs.gnu.org; Tue, 09 Feb 2021 18:20:42 -0500
Received: from lists.gnu.org ([209.51.188.17]:59930)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <leo@HIDDEN>) id 1l9cJC-0004Mp-3t
 for submit <at> debbugs.gnu.org; Tue, 09 Feb 2021 18:20:39 -0500
Received: from eggs.gnu.org ([2001:470:142:3::10]:38494)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <leo@HIDDEN>) id 1l9cJB-0002yn-Nz
 for bug-guix@HIDDEN; Tue, 09 Feb 2021 18:20:37 -0500
Received: from out5-smtp.messagingengine.com ([66.111.4.29]:59309)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <leo@HIDDEN>) id 1l9cJ6-00070y-FA
 for bug-guix@HIDDEN; Tue, 09 Feb 2021 18:20:37 -0500
Received: from compute2.internal (compute2.nyi.internal [10.202.2.42])
 by mailout.nyi.internal (Postfix) with ESMTP id EDA085C018D;
 Tue,  9 Feb 2021 18:20:30 -0500 (EST)
Received: from mailfrontend1 ([10.202.2.162])
 by compute2.internal (MEProxy); Tue, 09 Feb 2021 18:20:30 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=famulari.name;
 h=date:from:to:subject:message-id:mime-version:content-type; s=
 mesmtp; bh=cPyK/hGThWQkYo0RihIQo9ACdZ3C3lO2qlJEivxvQ3o=; b=rYdle
 FgEHh4btoEcMll3PWWpA/2zzabp3nPo0Og1NhyksIf8Q6xDzrvrdS49DR8DnuOrB
 eLsWuMO/gwaHbwcVeiXo0twwdgM8cSA8FxH8JNQCqg6uf2Hyy8yPQ+1qHzpZc8G0
 +lgw7vvlPRMnAtuo6GIF0Tm90ko0B2q0PvQhLA=
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=content-type:date:from:message-id
 :mime-version:subject:to:x-me-proxy:x-me-proxy:x-me-sender
 :x-me-sender:x-sasl-enc; s=fm2; bh=cPyK/hGThWQkYo0RihIQo9ACdZ3C3
 lO2qlJEivxvQ3o=; b=a8pjJ1lNxkThXre/MWOefyf2CSr565dcRelLxjId3wfyL
 vzp14bM76Xmp1KHbKIsuUYakOHRK+iyHqSuYVbjKWYvmfNjmacxHwqNS8A+yt17a
 THf1Fl6rmPgFhf74CCvsnAfPK9w463ZV6mx8xoitdMMGa2lVjv2+lORg1SOvECwE
 72pSCsLfQ7Q6ZToTUrY9vIJB8pUGDRBlkiMABrOpGdfqkLiNFP0UsLUJIwacmru/
 QkJC1SdhcAm5oty5Te1l2M2uoDW7iuQ1T1w2ZHb3al0cZpRebUnPQzNziZZwNS0Z
 YBwuELuSTxZjCVabFhsUVev3sj7cJDAuvM95u2Dzg==
X-ME-Sender: <xms:vhgjYC93s0Z8lRCiYK3js6EfNa21u6f0JGQgIfZT41LnXNzzQMkKaQ>
 <xme:vhgjYCp6R2E-70XdmvgO9KGT0DZQZ2-YWZ1ft0Sefnh-VmLNAse38R3__zOGP9uKl
 r8OPYnVSr_oGLVdbw>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrheeigddutdcutefuodetggdotefrodftvf
 curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu
 uegrihhlohhuthemuceftddtnecunecujfgurhepfffhvffukfggtggusehmtderredttd
 dvnecuhfhrohhmpefnvghoucfhrghmuhhlrghrihcuoehlvghosehfrghmuhhlrghrihdr
 nhgrmhgvqeenucggtffrrghtthgvrhhnpeefgfehhfeuffdvheekheevgeevffetveekve
 dtffejteduleefveffudefudekvdenucffohhmrghinhepghhnuhdrohhrghenucfkphep
 uddttddruddurdduieelrdduudeknecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrg
 hmpehmrghilhhfrhhomheplhgvohesfhgrmhhulhgrrhhirdhnrghmvg
X-ME-Proxy: <xmx:vhgjYE61DU_qHE-dVC2YZq59_JTe2X-sq4H5cSMS0MSKyKPkaXPJ8g>
 <xmx:vhgjYCMzTYN1zcB7prhwqQRO7ZIUe8U4IutLiKcN6OQ-OY7hwEW18Q>
 <xmx:vhgjYGNBE9FAFE4YH1g-PNRvG7M5W3e2_uRVKpYO4aRGUVeNl44_-A>
 <xmx:vhgjYBCF1U5oAevRlYK-5a90Jz5tvrdo3iCkaxIeqNFUoMQ9zo_XAQ>
Received: from localhost (pool-100-11-169-118.phlapa.fios.verizon.net
 [100.11.169.118])
 by mail.messagingengine.com (Postfix) with ESMTPA id 5C81724005B
 for <bug-guix@HIDDEN>; Tue,  9 Feb 2021 18:20:30 -0500 (EST)
Date: Tue, 9 Feb 2021 18:20:28 -0500
From: Leo Famulari <leo@HIDDEN>
Message-ID: <YCMYvJLYdcR7K3mE@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="yP/jyzw7I1r8v5jl"
Content-Disposition: inline
Received-SPF: pass client-ip=66.111.4.29; envelope-from=leo@HIDDEN;
 helo=out5-smtp.messagingengine.com
X-Spam_score_int: -27
X-Spam_score: -2.8
X-Spam_bar: --
X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,
 RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001,
 SPF_HELO_PASS=-0.001, SPF_PASS=-0.001,
 T_FILL_THIS_FORM_SHORT=0.01 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.4 (-)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.4 (--)


--yP/jyzw7I1r8v5jl
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

I notice that tests/publish.scm crashes consistently when run "by hand"
with `make check` on ci.guix.gnu.org:

------
$ make check -j1
[...]
PASS: tests/profiles.scm
make[4]: *** [Makefile:5520: tests/publish.log] Error 134
make[4]: Leaving directory '/home/lfam/guix'
make[3]: *** [Makefile:5502: check-TESTS] Error 2
make[3]: Leaving directory '/home/lfam/guix'
make[2]: *** [Makefile:5751: check-am] Error 2
make[2]: Leaving directory '/home/lfam/guix'
make[1]: *** [Makefile:5279: check-recursive] Error 1
make[1]: Leaving directory '/home/lfam/guix'
make: *** [Makefile:5753: check] Error 2 
------

Since it crashes, the remainder of the tests are not run.

I've attached the log, but I'm not sure what the problem is.

--yP/jyzw7I1r8v5jl
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="publish.log"
Content-Transfer-Encoding: quoted-printable

test-name: /nix-cache-info
location: /home/lfam/guix/tests/publish.scm:135
source:
+ (test-equal
+   "/nix-cache-info"
+   (format
+     #f
+     "StoreDir: ~a\nWantMassQuery: 0\nPriority: 100\n"
+     %store-directory)
+   (http-get-body (publish-uri "/nix-cache-info")))
expected-value: "StoreDir: /home/lfam/guix/test-tmp/store\nWantMassQuery: 0=
\nPriority: 100\n"
actual-value: "StoreDir: /home/lfam/guix/test-tmp/store\nWantMassQuery: 0\n=
Priority: 100\n"
result: PASS

test-name: /*.narinfo
location: /home/lfam/guix/tests/publish.scm:140
source:
+ (test-equal
+   "/*.narinfo"
+   (let* ((info (query-path-info %store %item))
+          (unsigned-info
+            (format
+              #f
+              "StorePath: ~a\nURL: nar/~a\nCompression: none\nFileSize: ~a=
\nNarHash: sha256:~a\nNarSize: ~d\nReferences: ~a~%"
+              %item
+              (basename %item)
+              (path-info-nar-size info)
+              (bytevector->nix-base32-string
+                (path-info-hash info))
+              (path-info-nar-size info)
+              (basename (first (path-info-references info)))))
+          (signature
+            (base64-encode
+              (string->utf8
+                (canonical-sexp->string
+                  (signed-string unsigned-info))))))
+     (format
+       #f
+       "~aSignature: 1;~a;~a~%"
+       unsigned-info
+       (gethostname)
+       signature))
+   (utf8->string
+     (http-get-body
+       (publish-uri
+         (string-append
+           "/"
+           (store-path-hash-part %item)
+           ".narinfo")))))
expected-value: "StorePath: /home/lfam/guix/test-tmp/store/s3i2h3aw4gk9fs3d=
80j43sj1g9v50idf-item\nURL: nar/s3i2h3aw4gk9fs3d80j43sj1g9v50idf-item\nComp=
ression: none\nFileSize: 120\nNarHash: sha256:1xngcmsdkdvaycaqjfzvq4gr3gib5=
6p2l8illglnsqzhpss47pxz\nNarSize: 120\nReferences: 7va9x8gzhcwxv1srdiw9jx6i=
a9c20s0j-ref\nSignature: 1;berlin.guix.gnu.org;KHNpZ25hdHVyZSAKIChkYXRhIAog=
IChmbGFncyBwa2NzMSkKICAoaGFzaCBzaGEyNTYgIzdCODIxNDAyQjZCQTI3NzQ3OTI0QTdFNDU=
wMDdFMzYyOUM2OTUwOTFFNjlCQTI2OTc2MUIwRDRDMkRGMUJCQ0IjKQogICkKIChzaWctdmFsIA=
ogIChyc2EgCiAgIChzICNCREVCOEY4Mjk4QzY1MkQ4NkNCRTgwQjJEMEIzMUY0MUFBODI3ODU1R=
kRBNDUyNjU1REQwMUQ5Mzg2RTk2OUQ2RTlFNzdFRTNDNzI2NjEwNzY4NjlFNEFGMUQ0MEM0M0Y4=
RjQ5MjE2Nzc2QzVFQ0Q2NDc0QkY2MjFGNDVFOTRGOTJFOTk2Nzg5Mzg2NDI2MThFNjdGQzA5RDU=
1MzcyNkQ5MzM5MjZFNkQ2MkQ3QzVFQTM4Mjc4NkUyQkFDRTIxQUVFNUVCMUVDMDFGNUUxQjc1M0=
I2NzdDMDE1RTlBMEExNjk1MkRCQjgzQUM1MjMxQURBMzBDMTFDMjMzOTA4ODdEIykKICAgKQogI=
CkKIChwdWJsaWMta2V5IAogIChyc2EgCiAgIChuICMwMEMxRjc2NDA2OUY1NEZGRTkzQTEyNkIw=
MjMyODkwM0U5ODRFNEFFM0FGNkRGNDAyQjVCNkIzOTA3OTExQjg4QzM4NUYxQkE3NkEwMDJFQzl=
ERUExMDlBNTIyOEVGMEU2MkVFMzFBMDZEMUE1ODYxQ0FCNDc0RjZDODU3QUM2NkVCNjVBMTkwNU=
YyNUJCQTE4Njk1NzlFNzNBM0I3RkVEMTNBRjVBMTY2NzMyNkY4OENERkMyRkYyNEIwM0MxNEZEM=
TM4NEFBN0U3M0NBODk1NzI4ODBCNjA2RTNBOTc0RTE1MzQ3OTYzRkM3QjYzNzg1NzQ5MzZBNDc1=
ODBEQkNCNDUjKQogICAoZSAjMDEwMDAxIykKICAgKQogICkKICkK\n"
actual-value: "StorePath: /home/lfam/guix/test-tmp/store/s3i2h3aw4gk9fs3d80=
j43sj1g9v50idf-item\nURL: nar/s3i2h3aw4gk9fs3d80j43sj1g9v50idf-item\nCompre=
ssion: none\nFileSize: 120\nNarHash: sha256:1xngcmsdkdvaycaqjfzvq4gr3gib56p=
2l8illglnsqzhpss47pxz\nNarSize: 120\nReferences: 7va9x8gzhcwxv1srdiw9jx6ia9=
c20s0j-ref\nSignature: 1;berlin.guix.gnu.org;KHNpZ25hdHVyZSAKIChkYXRhIAogIC=
hmbGFncyBwa2NzMSkKICAoaGFzaCBzaGEyNTYgIzdCODIxNDAyQjZCQTI3NzQ3OTI0QTdFNDUwM=
DdFMzYyOUM2OTUwOTFFNjlCQTI2OTc2MUIwRDRDMkRGMUJCQ0IjKQogICkKIChzaWctdmFsIAog=
IChyc2EgCiAgIChzICNCREVCOEY4Mjk4QzY1MkQ4NkNCRTgwQjJEMEIzMUY0MUFBODI3ODU1RkR=
BNDUyNjU1REQwMUQ5Mzg2RTk2OUQ2RTlFNzdFRTNDNzI2NjEwNzY4NjlFNEFGMUQ0MEM0M0Y4Rj=
Q5MjE2Nzc2QzVFQ0Q2NDc0QkY2MjFGNDVFOTRGOTJFOTk2Nzg5Mzg2NDI2MThFNjdGQzA5RDU1M=
zcyNkQ5MzM5MjZFNkQ2MkQ3QzVFQTM4Mjc4NkUyQkFDRTIxQUVFNUVCMUVDMDFGNUUxQjc1M0I2=
NzdDMDE1RTlBMEExNjk1MkRCQjgzQUM1MjMxQURBMzBDMTFDMjMzOTA4ODdEIykKICAgKQogICk=
KIChwdWJsaWMta2V5IAogIChyc2EgCiAgIChuICMwMEMxRjc2NDA2OUY1NEZGRTkzQTEyNkIwMj=
MyODkwM0U5ODRFNEFFM0FGNkRGNDAyQjVCNkIzOTA3OTExQjg4QzM4NUYxQkE3NkEwMDJFQzlER=
UExMDlBNTIyOEVGMEU2MkVFMzFBMDZEMUE1ODYxQ0FCNDc0RjZDODU3QUM2NkVCNjVBMTkwNUYy=
NUJCQTE4Njk1NzlFNzNBM0I3RkVEMTNBRjVBMTY2NzMyNkY4OENERkMyRkYyNEIwM0MxNEZEMTM=
4NEFBN0U3M0NBODk1NzI4ODBCNjA2RTNBOTc0RTE1MzQ3OTYzRkM3QjYzNzg1NzQ5MzZBNDc1OD=
BEQkNCNDUjKQogICAoZSAjMDEwMDAxIykKICAgKQogICkKICkK\n"
result: PASS

test-name: /*.narinfo with properly encoded '+' sign
location: /home/lfam/guix/tests/publish.scm:169
source:
+ (test-equal
+   "/*.narinfo with properly encoded '+' sign"
+   (let* ((item (add-text-to-store
+                  %store
+                  "fake-gtk+"
+                  "Congrats!"))
+          (info (query-path-info %store item))
+          (unsigned-info
+            (format
+              #f
+              "StorePath: ~a\nURL: nar/~a\nCompression: none\nFileSize: ~a=
\nNarHash: sha256:~a\nNarSize: ~d\nReferences: ~%"
+              item
+              (uri-encode (basename item))
+              (path-info-nar-size info)
+              (bytevector->nix-base32-string
+                (path-info-hash info))
+              (path-info-nar-size info)))
+          (signature
+            (base64-encode
+              (string->utf8
+                (canonical-sexp->string
+                  (signed-string unsigned-info))))))
+     (format
+       #f
+       "~aSignature: 1;~a;~a~%"
+       unsigned-info
+       (gethostname)
+       signature))
+   (let ((item (add-text-to-store
+                 %store
+                 "fake-gtk+"
+                 "Congrats!")))
+     (utf8->string
+       (http-get-body
+         (publish-uri
+           (string-append
+             "/"
+             (store-path-hash-part item)
+             ".narinfo"))))))
expected-value: "StorePath: /home/lfam/guix/test-tmp/store/r3j7lcw6x9lsmqcl=
y3m8509ynzxk9668-fake-gtk+\nURL: nar/r3j7lcw6x9lsmqcly3m8509ynzxk9668-fake-=
gtk%2B\nCompression: none\nFileSize: 128\nNarHash: sha256:1ysbwi8icaw2g5qmw=
jf9k0qd4d9gazd91kf1djycpk5ahwh4kmlp\nNarSize: 128\nReferences: \nSignature:=
 1;berlin.guix.gnu.org;KHNpZ25hdHVyZSAKIChkYXRhIAogIChmbGFncyBwa2NzMSkKICAo=
aGFzaCBzaGEyNTYgIzZENEMwM0RFNDM1MjcyMzdGMzRBODZFQjY0NzFFQUMwRjcwRkNGNDRFNzI=
yRDk5QURDRUJFNkRCNzE0MDZGOEMjKQogICkKIChzaWctdmFsIAogIChyc2EgCiAgIChzICMwNk=
JDQjk2QzE0RUI5RkI2QTgzQUM2NkIzMEUyNTI0N0I2MEE5Rjc5RDJCNkRBQUEyMDMxRjRCRDEwN=
jAzMjlBMTBENkNGNjU2MUMyMEFEQTg5NENGMzM4OTAwQTA3RTREREVCQjdBNDkzQTBBNDc1RThD=
NTc2MTMxMzA3RkI1NzJGQTc4NTRDRTRGNDM5NTlCREFDNzA0RjYzODQ5MTAwMzM1MkYzQjAxMDZ=
ENjFCRTNEMjZDMDk0QjJDNDJFQzY3NjFGOTY1ODdDMDkzODVERTgyMzQ1Qjk1QkUyNkE0MDI3QT=
I1OUIxMUQ4RkYxOENGRTQyMTE5RUMyODM4RDhFIykKICAgKQogICkKIChwdWJsaWMta2V5IAogI=
Chyc2EgCiAgIChuICMwMEMxRjc2NDA2OUY1NEZGRTkzQTEyNkIwMjMyODkwM0U5ODRFNEFFM0FG=
NkRGNDAyQjVCNkIzOTA3OTExQjg4QzM4NUYxQkE3NkEwMDJFQzlERUExMDlBNTIyOEVGMEU2MkV=
FMzFBMDZEMUE1ODYxQ0FCNDc0RjZDODU3QUM2NkVCNjVBMTkwNUYyNUJCQTE4Njk1NzlFNzNBM0=
I3RkVEMTNBRjVBMTY2NzMyNkY4OENERkMyRkYyNEIwM0MxNEZEMTM4NEFBN0U3M0NBODk1NzI4O=
DBCNjA2RTNBOTc0RTE1MzQ3OTYzRkM3QjYzNzg1NzQ5MzZBNDc1ODBEQkNCNDUjKQogICAoZSAj=
MDEwMDAxIykKICAgKQogICkKICkK\n"
actual-value: "StorePath: /home/lfam/guix/test-tmp/store/r3j7lcw6x9lsmqcly3=
m8509ynzxk9668-fake-gtk+\nURL: nar/r3j7lcw6x9lsmqcly3m8509ynzxk9668-fake-gt=
k%2B\nCompression: none\nFileSize: 128\nNarHash: sha256:1ysbwi8icaw2g5qmwjf=
9k0qd4d9gazd91kf1djycpk5ahwh4kmlp\nNarSize: 128\nReferences: \nSignature: 1=
;berlin.guix.gnu.org;KHNpZ25hdHVyZSAKIChkYXRhIAogIChmbGFncyBwa2NzMSkKICAoaG=
FzaCBzaGEyNTYgIzZENEMwM0RFNDM1MjcyMzdGMzRBODZFQjY0NzFFQUMwRjcwRkNGNDRFNzIyR=
Dk5QURDRUJFNkRCNzE0MDZGOEMjKQogICkKIChzaWctdmFsIAogIChyc2EgCiAgIChzICMwNkJD=
Qjk2QzE0RUI5RkI2QTgzQUM2NkIzMEUyNTI0N0I2MEE5Rjc5RDJCNkRBQUEyMDMxRjRCRDEwNjA=
zMjlBMTBENkNGNjU2MUMyMEFEQTg5NENGMzM4OTAwQTA3RTREREVCQjdBNDkzQTBBNDc1RThDNT=
c2MTMxMzA3RkI1NzJGQTc4NTRDRTRGNDM5NTlCREFDNzA0RjYzODQ5MTAwMzM1MkYzQjAxMDZEN=
jFCRTNEMjZDMDk0QjJDNDJFQzY3NjFGOTY1ODdDMDkzODVERTgyMzQ1Qjk1QkUyNkE0MDI3QTI1=
OUIxMUQ4RkYxOENGRTQyMTE5RUMyODM4RDhFIykKICAgKQogICkKIChwdWJsaWMta2V5IAogICh=
yc2EgCiAgIChuICMwMEMxRjc2NDA2OUY1NEZGRTkzQTEyNkIwMjMyODkwM0U5ODRFNEFFM0FGNk=
RGNDAyQjVCNkIzOTA3OTExQjg4QzM4NUYxQkE3NkEwMDJFQzlERUExMDlBNTIyOEVGMEU2MkVFM=
zFBMDZEMUE1ODYxQ0FCNDc0RjZDODU3QUM2NkVCNjVBMTkwNUYyNUJCQTE4Njk1NzlFNzNBM0I3=
RkVEMTNBRjVBMTY2NzMyNkY4OENERkMyRkYyNEIwM0MxNEZEMTM4NEFBN0U3M0NBODk1NzI4ODB=
CNjA2RTNBOTc0RTE1MzQ3OTYzRkM3QjYzNzg1NzQ5MzZBNDc1ODBEQkNCNDUjKQogICAoZSAjMD=
EwMDAxIykKICAgKQogICkKICkK\n"
result: PASS

test-name: /nar/*
location: /home/lfam/guix/tests/publish.scm:201
source:
+ (test-equal
+   "/nar/*"
+   "bar"
+   (call-with-temporary-output-file
+     (lambda (temp port)
+       (let ((nar (utf8->string
+                    (http-get-body
+                      (publish-uri
+                        (string-append "/nar/" (basename %item)))))))
+         (call-with-input-string
+           nar
+           (cut restore-file <> temp)))
+       (call-with-input-file temp read-string))))
expected-value: "bar"
actual-value: "bar"
result: PASS

test-name: /nar/gzip/*
location: /home/lfam/guix/tests/publish.scm:212
source:
+ (test-equal
+   "/nar/gzip/*"
+   "bar"
+   (call-with-temporary-output-file
+     (lambda (temp port)
+       (let ((nar (http-get-port
+                    (publish-uri
+                      (string-append "/nar/gzip/" (basename %item))))))
+         (call-with-gzip-input-port
+           nar
+           (cut restore-file <> temp)))
+       (call-with-input-file temp read-string))))
expected-value: "bar"
actual-value: "bar"
result: PASS

test-name: /nar/gzip/* is really gzip
location: /home/lfam/guix/tests/publish.scm:223
source:
+ (test-equal
+   "/nar/gzip/* is really gzip"
+   %gzip-magic-bytes
+   (let ((nar (http-get-port
+                (publish-uri
+                  (string-append "/nar/gzip/" (basename %item))))))
+     (get-bytevector-n
+       nar
+       (bytevector-length %gzip-magic-bytes))))
expected-value: #vu8(31 139)
actual-value: #vu8(31 139)
result: PASS

test-name: /nar/lzip/*
location: /home/lfam/guix/tests/publish.scm:233
source:
+ (test-equal
+   "/nar/lzip/*"
+   "bar"
+   (call-with-temporary-output-file
+     (lambda (temp port)
+       (let ((nar (http-get-port
+                    (publish-uri
+                      (string-append "/nar/lzip/" (basename %item))))))
+         (call-with-lzip-input-port
+           nar
+           (cut restore-file <> temp)))
+       (call-with-input-file temp read-string))))
expected-value: "bar"
actual-value: "bar"
result: PASS

test-name: /nar/zstd/*
location: /home/lfam/guix/tests/publish.scm:245
source:
+ (test-equal
+   "/nar/zstd/*"
+   "bar"
+   (call-with-temporary-output-file
+     (lambda (temp port)
+       (let ((nar (http-get-port
+                    (publish-uri
+                      (string-append "/nar/zstd/" (basename %item))))))
+         (call-with-zstd-input-port
+           nar
+           (cut restore-file <> temp)))
+       (call-with-input-file temp read-string))))
expected-value: "bar"
actual-value: "bar"
result: PASS

test-name: /*.narinfo with compression
location: /home/lfam/guix/tests/publish.scm:256
source:
+ (test-equal
+   "/*.narinfo with compression"
+   `(("StorePath" unquote %item)
+     ("URL"
+      unquote
+      (string-append "nar/gzip/" (basename %item)))
+     ("Compression" . "gzip"))
+   (let ((thread
+           (with-separate-output-ports
+             (call-with-new-thread
+               (lambda () (guix-publish "--port=3D6799" "-C5"))))))
+     (wait-until-ready 6799)
+     (let* ((url (string-append
+                   "http://localhost:6799/"
+                   (store-path-hash-part %item)
+                   ".narinfo"))
+            (body (http-get-port url)))
+       (filter
+         (lambda (item)
+           (match item
+                  (("Compression" . _) #t)
+                  (("StorePath" . _) #t)
+                  (("URL" . _) #t)
+                  (_ #f)))
+         (recutils->alist body)))))
expected-value: (("StorePath" . "/home/lfam/guix/test-tmp/store/s3i2h3aw4gk=
9fs3d80j43sj1g9v50idf-item") ("URL" . "nar/gzip/s3i2h3aw4gk9fs3d80j43sj1g9v=
50idf-item") ("Compression" . "gzip"))
actual-value: (("StorePath" . "/home/lfam/guix/test-tmp/store/s3i2h3aw4gk9f=
s3d80j43sj1g9v50idf-item") ("URL" . "nar/gzip/s3i2h3aw4gk9fs3d80j43sj1g9v50=
idf-item") ("Compression" . "gzip"))
result: PASS

test-name: /*.narinfo with lzip compression
location: /home/lfam/guix/tests/publish.scm:276
source:
+ (test-equal
+   "/*.narinfo with lzip compression"
+   `(("StorePath" unquote %item)
+     ("URL"
+      unquote
+      (string-append "nar/lzip/" (basename %item)))
+     ("Compression" . "lzip"))
+   (let ((thread
+           (with-separate-output-ports
+             (call-with-new-thread
+               (lambda () (guix-publish "--port=3D6790" "-Clzip"))))))
+     (wait-until-ready 6790)
+     (let* ((url (string-append
+                   "http://localhost:6790/"
+                   (store-path-hash-part %item)
+                   ".narinfo"))
+            (body (http-get-port url)))
+       (filter
+         (lambda (item)
+           (match item
+                  (("Compression" . _) #t)
+                  (("StorePath" . _) #t)
+                  (("URL" . _) #t)
+                  (_ #f)))
+         (recutils->alist body)))))
expected-value: (("StorePath" . "/home/lfam/guix/test-tmp/store/s3i2h3aw4gk=
9fs3d80j43sj1g9v50idf-item") ("URL" . "nar/lzip/s3i2h3aw4gk9fs3d80j43sj1g9v=
50idf-item") ("Compression" . "lzip"))
actual-value: (("StorePath" . "/home/lfam/guix/test-tmp/store/s3i2h3aw4gk9f=
s3d80j43sj1g9v50idf-item") ("URL" . "nar/lzip/s3i2h3aw4gk9fs3d80j43sj1g9v50=
idf-item") ("Compression" . "lzip"))
result: PASS

test-name: /*.narinfo for a compressed file
location: /home/lfam/guix/tests/publish.scm:296
source:
+ (test-equal
+   "/*.narinfo for a compressed file"
+   '("none" "nar")
+   (let* ((item (add-text-to-store
+                  %store
+                  "fake.tar.gz"
+                  "This is a fake compressed file."))
+          (url (string-append
+                 "http://localhost:6799/"
+                 (store-path-hash-part item)
+                 ".narinfo"))
+          (body (http-get-port url))
+          (info (recutils->alist body)))
+     (list (assoc-ref info "Compression")
+           (dirname (assoc-ref info "URL")))))
expected-value: ("none" "nar")
actual-value: ("none" "nar")
result: PASS

test-name: /*.narinfo with lzip + gzip
location: /home/lfam/guix/tests/publish.scm:308
source:
+ (test-equal
+   "/*.narinfo with lzip + gzip"
+   `((("StorePath" unquote %item)
+      ("URL"
+       unquote
+       (string-append "nar/gzip/" (basename %item)))
+      ("Compression" . "gzip")
+      ("URL"
+       unquote
+       (string-append "nar/lzip/" (basename %item)))
+      ("Compression" . "lzip"))
+     200
+     200)
+   (call-with-temporary-directory
+     (lambda (cache)
+       (let ((thread
+               (with-separate-output-ports
+                 (call-with-new-thread
+                   (lambda ()
+                     (guix-publish
+                       "--port=3D6793"
+                       "-Cgzip:2"
+                       "-Clzip:2"))))))
+         (wait-until-ready 6793)
+         (let* ((base "http://localhost:6793/")
+                (part (store-path-hash-part %item))
+                (url (string-append base part ".narinfo"))
+                (body (http-get-port url)))
+           (list (take (recutils->alist body) 5)
+                 (response-code
+                   (http-get
+                     (string-append base "nar/gzip/" (basename %item))))
+                 (response-code
+                   (http-get
+                     (string-append base "nar/lzip/" (basename %item))))))=
))))
expected-value: ((("StorePath" . "/home/lfam/guix/test-tmp/store/s3i2h3aw4g=
k9fs3d80j43sj1g9v50idf-item") ("URL" . "nar/gzip/s3i2h3aw4gk9fs3d80j43sj1g9=
v50idf-item") ("Compression" . "gzip") ("URL" . "nar/lzip/s3i2h3aw4gk9fs3d8=
0j43sj1g9v50idf-item") ("Compression" . "lzip")) 200 200)
actual-value: ((("StorePath" . "/home/lfam/guix/test-tmp/store/s3i2h3aw4gk9=
fs3d80j43sj1g9v50idf-item") ("URL" . "nar/gzip/s3i2h3aw4gk9fs3d80j43sj1g9v5=
0idf-item") ("Compression" . "gzip") ("URL" . "nar/lzip/s3i2h3aw4gk9fs3d80j=
43sj1g9v50idf-item") ("Compression" . "lzip")) 200 200)
result: PASS

test-name: custom nar path
location: /home/lfam/guix/tests/publish.scm:335
source:
+ (test-equal
+   "custom nar path"
+   (list `(("StorePath" unquote %item)
+           ("URL"
+            unquote
+            (string-append
+              "foo/bar/chbouib/"
+              (basename %item)))
+           ("Compression" . "none"))
+         200
+         404)
+   (let ((thread
+           (with-separate-output-ports
+             (call-with-new-thread
+               (lambda ()
+                 (guix-publish
+                   "--port=3D6798"
+                   "-C0"
+                   "--nar-path=3D///foo/bar//chbouib/"))))))
+     (wait-until-ready 6798)
+     (let* ((base "http://localhost:6798/")
+            (part (store-path-hash-part %item))
+            (url (string-append base part ".narinfo"))
+            (nar-url
+              (string-append
+                base
+                "foo/bar/chbouib/"
+                (basename %item)))
+            (body (http-get-port url)))
+       (list (filter
+               (lambda (item)
+                 (match item
+                        (("Compression" . _) #t)
+                        (("StorePath" . _) #t)
+                        (("URL" . _) #t)
+                        (_ #f)))
+               (recutils->alist body))
+             (response-code (http-get nar-url))
+             (response-code
+               (http-get
+                 (string-append base "nar/" (basename %item))))))))
expected-value: ((("StorePath" . "/home/lfam/guix/test-tmp/store/s3i2h3aw4g=
k9fs3d80j43sj1g9v50idf-item") ("URL" . "foo/bar/chbouib/s3i2h3aw4gk9fs3d80j=
43sj1g9v50idf-item") ("Compression" . "none")) 200 404)
actual-value: ((("StorePath" . "/home/lfam/guix/test-tmp/store/s3i2h3aw4gk9=
fs3d80j43sj1g9v50idf-item") ("URL" . "foo/bar/chbouib/s3i2h3aw4gk9fs3d80j43=
sj1g9v50idf-item") ("Compression" . "none")) 200 404)
result: PASS

test-name: /nar/ with properly encoded '+' sign
location: /home/lfam/guix/tests/publish.scm:365
source:
+ (test-equal
+   "/nar/ with properly encoded '+' sign"
+   "Congrats!"
+   (let ((item (add-text-to-store
+                 %store
+                 "fake-gtk+"
+                 "Congrats!")))
+     (call-with-temporary-output-file
+       (lambda (temp port)
+         (let ((nar (utf8->string
+                      (http-get-body
+                        (publish-uri
+                          (string-append
+                            "/nar/"
+                            (uri-encode (basename item))))))))
+           (call-with-input-string
+             nar
+             (cut restore-file <> temp)))
+         (call-with-input-file temp read-string)))))
expected-value: "Congrats!"
actual-value: "Congrats!"
result: PASS

test-name: /nar/invalid
location: /home/lfam/guix/tests/publish.scm:377
source:
+ (test-equal
+   "/nar/invalid"
+   404
+   (begin
+     (call-with-output-file
+       (string-append (%store-prefix) "/invalid")
+       (lambda (port)
+         (display
+           "This file is not a valid store item."
+           port)))
+     (response-code
+       (http-get
+         (publish-uri (string-append "/nar/invalid"))))))
expected-value: 404
actual-value: 404
result: PASS

publishing /home/lfam/guix/test-tmp/store on 0.0.0.0, port 6789
using 'none' compression method, level 0
publishing /home/lfam/guix/test-tmp/store on 0.0.0.0, port 6799
using 'gzip' compression method, level 5
publishing /home/lfam/guix/test-tmp/store on 0.0.0.0, port 6790
using 'lzip' compression method, level 3
publishing /home/lfam/guix/test-tmp/store on 0.0.0.0, port 6793
using 'gzip' compression method, level 2
using 'lzip' compression method, level 2
publishing /home/lfam/guix/test-tmp/store on 0.0.0.0, port 6798
using 'none' compression method, level 0
@ build-started /home/lfam/guix/test-tmp/store/lcjfvb26q7jlmbnb2zdni2sghlj9=
93bp-the-file.txt.drv - x86_64-linux /home/lfam/guix/test-tmp/var/log/guix/=
drvs/lc//jfvb26q7jlmbnb2zdni2sghlj993bp-the-file.txt.drv.bz2 123820
@ build-succeeded /home/lfam/guix/test-tmp/store/lcjfvb26q7jlmbnb2zdni2sghl=
j993bp-the-file.txt.drv -
test-name: /file/NAME/sha256/HASH
location: /home/lfam/guix/tests/publish.scm:385
source:
+ (test-equal
+   "/file/NAME/sha256/HASH"
+   "Hello, Guix world!"
+   (let* ((data "Hello, Guix world!")
+          (hash (call-with-input-string data port-sha256))
+          (drv (run-with-store
+                 %store
+                 (gexp->derivation
+                   "the-file.txt"
+                   (gexp (call-with-output-file
+                           (ungexp output)
+                           (lambda (port) (display (ungexp data) port))))
+                   #:hash-algo
+                   'sha256
+                   #:hash
+                   hash)))
+          (out (build-derivations %store (list drv))))
+     (utf8->string
+       (http-get-body
+         (publish-uri
+           (string-append
+             "/file/the-file.txt/sha256/"
+             (bytevector->nix-base32-string hash)))))))
expected-value: "Hello, Guix world!"
actual-value: "Hello, Guix world!"
result: PASS

test-name: /file/NAME/sha256/INVALID-NIX-BASE32-STRING
location: /home/lfam/guix/tests/publish.scm:403
source:
+ (test-equal
+   "/file/NAME/sha256/INVALID-NIX-BASE32-STRING"
+   404
+   (let ((uri (publish-uri
+                "/file/the-file.txt/sha256/not-a-nix-base32-string")))
+     (response-code (http-get uri))))
expected-value: 404
actual-value: 404
result: PASS

test-name: /file/NAME/sha256/INVALID-HASH
location: /home/lfam/guix/tests/publish.scm:409
source:
+ (test-equal
+   "/file/NAME/sha256/INVALID-HASH"
+   404
+   (let ((uri (publish-uri
+                (string-append
+                  "/file/the-file.txt/sha256/"
+                  (bytevector->nix-base32-string
+                    (call-with-input-string "" port-sha256))))))
+     (response-code (http-get uri))))
expected-value: 404
actual-value: 404
result: PASS


;;; (wait-for-file "/tmp/guix-directory.9rJG3j/gzip/s3i2h3aw4gk9fs3d80j43sj=
1g9v50idf-item.narinfo")
test-name: with cache
location: /home/lfam/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=3D6797"
+                       "-C2"
+                       (string-append "--cache=3D" cache)
+                       "--cache-bypass-threshold=3D0"))))))
+         (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 (=3D 404 (response-code response))
+                (match (assq-ref
+                         (response-headers response)
+                         'cache-control)
+                       ((((quote max-age) . ttl)) (< ttl 3600)))
+                (wait-for-file cached)
+                (=3D 420 (stat:perms (lstat cached)))
+                (=3D 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)
+                        (=3D (response-content-length compressed)
+                           (stat:size (stat nar)))
+                        (=3D (string->number (assoc-ref narinfo "FileSize"=
))
+                           (stat:size (stat nar)))
+                        (response-code uncompressed)))))))))
expected-value: (#t (("StorePath" . "/home/lfam/guix/test-tmp/store/s3i2h3a=
w4gk9fs3d80j43sj1g9v50idf-item") ("URL" . "nar/gzip/s3i2h3aw4gk9fs3d80j43sj=
1g9v50idf-item") ("Compression" . "gzip")) 200 #t #t 404)
actual-value: (#t (("StorePath" . "/home/lfam/guix/test-tmp/store/s3i2h3aw4=
gk9fs3d80j43sj1g9v50idf-item") ("URL" . "nar/gzip/s3i2h3aw4gk9fs3d80j43sj1g=
9v50idf-item") ("Compression" . "gzip")) 200 #t #t 404)
result: PASS


;;; (wait-for-file "/tmp/guix-directory.m96XNk/gzip/s3i2h3aw4gk9fs3d80j43sj=
1g9v50idf-item.narinfo")

;;; (narinfo/gzip+lzip (("StorePath" . "/home/lfam/guix/test-tmp/store/s3i2=
h3aw4gk9fs3d80j43sj1g9v50idf-item") ("URL" . "nar/gzip/s3i2h3aw4gk9fs3d80j4=
3sj1g9v50idf-item") ("Compression" . "gzip") ("FileSize" . "86") ("URL" . "=
nar/lzip/s3i2h3aw4gk9fs3d80j43sj1g9v50idf-item") ("Compression" . "lzip") (=
"FileSize" . "99") ("NarHash" . "sha256:1xngcmsdkdvaycaqjfzvq4gr3gib56p2l8i=
llglnsqzhpss47pxz") ("NarSize" . "120") ("References" . "7va9x8gzhcwxv1srdi=
w9jx6ia9c20s0j-ref") ("Signature" . "1;berlin.guix.gnu.org;KHNpZ25hdHVyZSAK=
IChkYXRhIAogIChmbGFncyBwa2NzMSkKICAoaGFzaCBzaGEyNTYgI0VENDRDQjY2QjZFRUY0MzM=
yNjI4M0I5QkEwQjc4QTRCQjEyQjI0REFEODBDNUM2RjlCRjZCMzVDNzY5MDNCMEEjKQogICkKIC=
hzaWctdmFsIAogIChyc2EgCiAgIChzICMyMUJFNTJCNUY3RjM0MTlBQjNENkJGMjM1RkM2NDUzR=
jVFMTFGNDQ2RjMzRjU3OTNBQjE5MEMwREE1MkU3QkJFMkQzMDZFMzFCNzJFNTRFREM3OEFDRDZC=
QzczOTJBNTI3MEFDMTIzQzU1NkI4Q0VCMUY3N0FGM0YwN0VFMzY2NzQ5QURENTE5QTU1MDk1NjR=
FMzFGRjkyOEJEREY1MURGM0YxOEM5Qzc1OUMzQzczQzg1RkJCNUIxMUNBRDJCQkNGNTJFRjEyMD=
U0MTQxQkI3NjE0QUJCMTRCOERGRUY0MjY1NzdDQzU5RDEwN0Y3QjIxN0I3M0QzNkJGNDcwMjdFI=
ykKICAgKQogICkKIChwdWJsaWMta2V5IAogIChyc2EgCiAgIChuICMwMEMxRjc2NDA2OUY1NEZG=
RTkzQTEyNkIwMjMyODkwM0U5ODRFNEFFM0FGNkRGNDAyQjVCNkIzOTA3OTExQjg4QzM4NUYxQkE=
3NkEwMDJFQzlERUExMDlBNTIyOEVGMEU2MkVFMzFBMDZEMUE1ODYxQ0FCNDc0RjZDODU3QUM2Nk=
VCNjVBMTkwNUYyNUJCQTE4Njk1NzlFNzNBM0I3RkVEMTNBRjVBMTY2NzMyNkY4OENERkMyRkYyN=
EIwM0MxNEZEMTM4NEFBN0U3M0NBODk1NzI4ODBCNjA2RTNBOTc0RTE1MzQ3OTYzRkM3QjYzNzg1=
NzQ5MzZBNDc1ODBEQkNCNDUjKQogICAoZSAjMDEwMDAxIykKICAgKQogICkKICkK")))
test-name: with cache, lzip + gzip
location: /home/lfam/guix/tests/publish.scm:479
source:
+ (test-equal
+   "with cache, lzip + gzip"
+   '(200 200 404)
+   (call-with-temporary-directory
+     (lambda (cache)
+       (let ((thread
+               (with-separate-output-ports
+                 (call-with-new-thread
+                   (lambda ()
+                     (guix-publish
+                       "--port=3D6794"
+                       "-Cgzip:2"
+                       "-Clzip:2"
+                       (string-append "--cache=3D" cache)
+                       "--cache-bypass-threshold=3D0"))))))
+         (wait-until-ready 6794)
+         (let* ((base "http://localhost:6794/")
+                (part (store-path-hash-part %item))
+                (url (string-append base part ".narinfo"))
+                (nar-url
+                  (cute string-append
+                        "nar/"
+                        <>
+                        "/"
+                        (basename %item)))
+                (cached
+                  (cute string-append
+                        cache
+                        "/"
+                        <>
+                        "/"
+                        (basename %item)
+                        ".narinfo"))
+                (nar (cute string-append
+                           cache
+                           "/"
+                           <>
+                           "/"
+                           (basename %item)
+                           ".nar"))
+                (response (http-get url)))
+           (wait-for-file (cached "gzip"))
+           (let* ((body (http-get-port url))
+                  (narinfo (recutils->alist body))
+                  (uncompressed
+                    (string-append base "nar/" (basename %item))))
+             (and (file-exists? (nar "gzip"))
+                  (file-exists? (nar "lzip"))
+                  (equal?
+                    (take (pk 'narinfo/gzip+lzip narinfo) 7)
+                    `(("StorePath" unquote %item)
+                      ("URL" unquote (nar-url "gzip"))
+                      ("Compression" . "gzip")
+                      ("FileSize"
+                       unquote
+                       (number->string (stat:size (stat (nar "gzip")))))
+                      ("URL" unquote (nar-url "lzip"))
+                      ("Compression" . "lzip")
+                      ("FileSize"
+                       unquote
+                       (number->string (stat:size (stat (nar "lzip")))))))
+                  (list (response-code
+                          (http-get (string-append base (nar-url "gzip"))))
+                        (response-code
+                          (http-get (string-append base (nar-url "lzip"))))
+                        (response-code (http-get uncompressed))))))))))
expected-value: (200 200 404)
actual-value: (200 200 404)
result: PASS


;;; (wait-for-file "/tmp/guix-directory.5CRlhm/none/drlf4d7hrx8spvy4klkf79k=
1cbzb72v8-fake-compressed-thing.tar.gz.narinfo")
test-name: with cache, uncompressed
location: /home/lfam/guix/tests/publish.scm:526
source:
+ (test-equal
+   "with cache, uncompressed"
+   (list #t
+         (* 42 3600)
+         `(("StorePath" unquote item)
+           ("URL"
+            unquote
+            (string-append "nar/" (basename item)))
+           ("Compression" . "none"))
+         200
+         (* 42 3600)
+         (path-info-nar-size
+           (query-path-info %store item))
+         404)
+   (call-with-temporary-directory
+     (lambda (cache)
+       (let ((thread
+               (with-separate-output-ports
+                 (call-with-new-thread
+                   (lambda ()
+                     (guix-publish
+                       "--port=3D6796"
+                       "-C2"
+                       "--ttl=3D42h"
+                       (string-append "--cache=3D" cache)
+                       "--cache-bypass-threshold=3D0"))))))
+         (wait-until-ready 6796)
+         (let* ((base "http://localhost:6796/")
+                (part (store-path-hash-part item))
+                (url (string-append base part ".narinfo"))
+                (cached
+                  (string-append
+                    cache
+                    "/none/"
+                    (basename item)
+                    ".narinfo"))
+                (nar (string-append
+                       cache
+                       "/none/"
+                       (basename item)
+                       ".nar"))
+                (response (http-get url)))
+           (and (=3D 404 (response-code response))
+                (wait-for-file cached)
+                (let* ((response (http-get url))
+                       (body (http-get-port url))
+                       (compressed
+                         (http-get
+                           (string-append base "nar/gzip/" (basename item)=
)))
+                       (uncompressed
+                         (http-get
+                           (string-append base "nar/" (basename item))))
+                       (narinfo (recutils->alist body)))
+                  (list (file-exists? nar)
+                        (match (assq-ref
+                                 (response-headers response)
+                                 'cache-control)
+                               ((((quote max-age) . ttl)) ttl)
+                               (_ #f))
+                        (filter
+                          (lambda (item)
+                            (match item
+                                   (("Compression" . _) #t)
+                                   (("StorePath" . _) #t)
+                                   (("URL" . _) #t)
+                                   (_ #f)))
+                          narinfo)
+                        (response-code uncompressed)
+                        (match (assq-ref
+                                 (response-headers uncompressed)
+                                 'cache-control)
+                               ((((quote max-age) . ttl)) ttl)
+                               (_ #f))
+                        (string->number (assoc-ref narinfo "FileSize"))
+                        (response-code compressed)))))))))
expected-value: (#t 151200 (("StorePath" . "/home/lfam/guix/test-tmp/store/=
drlf4d7hrx8spvy4klkf79k1cbzb72v8-fake-compressed-thing.tar.gz") ("URL" . "n=
ar/drlf4d7hrx8spvy4klkf79k1cbzb72v8-fake-compressed-thing.tar.gz") ("Compre=
ssion" . "none")) 200 151200 176 404)
actual-value: (#t 151200 (("StorePath" . "/home/lfam/guix/test-tmp/store/dr=
lf4d7hrx8spvy4klkf79k1cbzb72v8-fake-compressed-thing.tar.gz") ("URL" . "nar=
/drlf4d7hrx8spvy4klkf79k1cbzb72v8-fake-compressed-thing.tar.gz") ("Compress=
ion" . "none")) 200 151200 176 404)
result: PASS


;;; (wait-for-file "/tmp/guix-directory.lQ5Iyj/gzip/8g66gfkxls4pxvz2l1b47zn=
6sgryd23r-random.narinfo")
publishing /home/lfam/guix/test-tmp/store on 0.0.0.0, port 6797
using 'gzip' compression method, level 2
publishing /home/lfam/guix/test-tmp/store on 0.0.0.0, port 6794
using 'gzip' compression method, level 2
using 'lzip' compression method, level 2
random seed for tests: 1612901421
publishing /home/lfam/guix/test-tmp/store on 0.0.0.0, port 6796
using 'gzip' compression method, level 2
publishing /home/lfam/guix/test-tmp/store on 0.0.0.0, port 6795
using 'gzip' compression method, level 3
finding garbage collector roots...
removing stale temporary roots file `/home/lfam/guix/test-tmp/var/123751/te=
mproots/123781'
deleting unused links...

;;; (response #<<response> version: (1 . 1) code: 200 reason-phrase: "OK" h=
eaders: ((content-length . 1277) (content-type application/x-nix-narinfo (c=
harset . "utf-8"))) port: #<closed: file 7f1e03ea1690>>)
test-name: with cache, vanishing item
location: /home/lfam/guix/tests/publish.scm:587
source:
+ (test-equal
+   "with cache, vanishing item"
+   200
+   (call-with-temporary-directory
+     (lambda (cache)
+       (let ((thread
+               (with-separate-output-ports
+                 (call-with-new-thread
+                   (lambda ()
+                     (guix-publish
+                       "--port=3D6795"
+                       (string-append "--cache=3D" cache)))))))
+         (wait-until-ready 6795)
+         (let* ((base "http://localhost:6795/")
+                (item (add-text-to-store %store "random" (random-text)))
+                (part (store-path-hash-part item))
+                (url (string-append base part ".narinfo"))
+                (cached
+                  (string-append
+                    cache
+                    "/gzip/"
+                    (basename item)
+                    ".narinfo"))
+                (response (http-get url)))
+           (and (=3D 200 (response-code response))
+                (wait-for-file cached)
+                (begin
+                  (delete-paths %store (list item))
+                  (response-code (pk 'response (http-get url))))))))))
expected-value: 200
actual-value: 200
result: PASS


--yP/jyzw7I1r8v5jl--




Message sent:


Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-Mailer: MIME-tools 5.505 (Entity 5.505)
Content-Type: text/plain; charset=utf-8
X-Loop: help-debbugs@HIDDEN
From: help-debbugs@HIDDEN (GNU bug Tracking System)
To: Leo Famulari <leo@HIDDEN>
Subject: bug#46413: Acknowledgement (tests/publish.scm fails on berlin)
Message-ID: <handler.46413.B.161291284216805.ack <at> debbugs.gnu.org>
References: <YCMYvJLYdcR7K3mE@HIDDEN>
X-Gnu-PR-Message: ack 46413
X-Gnu-PR-Package: guix
Reply-To: 46413 <at> debbugs.gnu.org
Date: Tue, 09 Feb 2021 23:21:02 +0000

Thank you for filing a new bug report with debbugs.gnu.org.

This is an automatically generated reply to let you know your message
has been received.

Your message is being forwarded to the package maintainers and other
interested parties for their attention; they will reply in due course.

Your message has been sent to the package maintainer(s):
 bug-guix@HIDDEN

If you wish to submit further information on this problem, please
send it to 46413 <at> debbugs.gnu.org.

Please do not send mail to help-debbugs@HIDDEN unless you wish
to report a problem with the Bug-tracking system.

--=20
46413: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D46413
GNU Bug Tracking System
Contact help-debbugs@HIDDEN with problems


Message sent to bug-guix@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#46413: tests/publish.scm fails on berlin
Resent-From: zimoun <zimon.toutoune@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-guix@HIDDEN
Resent-Date: Tue, 09 Feb 2021 23:42:02 +0000
Resent-Message-ID: <handler.46413.B46413.161291410226810 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 46413
X-GNU-PR-Package: guix
X-GNU-PR-Keywords: 
To: Leo Famulari <leo@HIDDEN>
Cc: 46413 <at> debbugs.gnu.org
Received: via spool by 46413-submit <at> debbugs.gnu.org id=B46413.161291410226810
          (code B ref 46413); Tue, 09 Feb 2021 23:42:02 +0000
Received: (at 46413) by debbugs.gnu.org; 9 Feb 2021 23:41:42 +0000
Received: from localhost ([127.0.0.1]:55064 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1l9cdZ-0006yM-QK
	for submit <at> debbugs.gnu.org; Tue, 09 Feb 2021 18:41:42 -0500
Received: from mail-qk1-f169.google.com ([209.85.222.169]:37268)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <zimon.toutoune@HIDDEN>) id 1l9cdY-0006yA-Aq
 for 46413 <at> debbugs.gnu.org; Tue, 09 Feb 2021 18:41:40 -0500
Received: by mail-qk1-f169.google.com with SMTP id s77so19973521qke.4
 for <46413 <at> debbugs.gnu.org>; Tue, 09 Feb 2021 15:41:40 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=mime-version:references:in-reply-to:from:date:message-id:subject:to
 :cc; bh=09Dlol7sErlRoyAfWdwvCFXsGq/ztnrXbE99wLh968M=;
 b=orQ93we0C9+RwfUPU4ajw+GQ8irBmGQ+wiT+nbxYT2jhyRd8IMbzsPko2khPdyRcZa
 FUIRSGTnc71mV4xSKSvtlNo1GwnJLWo5RlNZ170onq9FfIlzmzTsh5JGb1NSi5jwMdQR
 AAzqfpAx4NhLOyUceH7BGeyEFeiaVzeAlluIYI/6u9NirSwQEr9X9+YcsrCRMOoC2VKG
 yCTYSHpo9BiGMAxps9pST8YJNIp/Iynf0rXToEESUBV8ThtK8aILOnoHaK5gaWwayUbK
 l82xNo6OqUJ7vAKkB1tN0DV7ODb3on/5MlpN2wnbLEz8/Rk8mJRplEgSNdDxDhOsyrGp
 m0zA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:references:in-reply-to:from:date
 :message-id:subject:to:cc;
 bh=09Dlol7sErlRoyAfWdwvCFXsGq/ztnrXbE99wLh968M=;
 b=Tbzdy6FTk27rI6pLqsI5tzPvaAqzUhBNYsHTXdHfhjRsyx1X+hZ4ObTM8jy6vUjTKp
 66rFowqJkt+DmB292ar39o6uQ3FejoV8pagdRStiN+fz9e+iqpdEipXVTndeeuAPjaxf
 ewBZe45HXeL4xlzMpuKR54gkZoJhWtwu1QYN29d1Na3TzjEFmq1oJM968bVNoF9S/kAD
 wyputag6bkA3+vZ1IGl3FfKOEGDd/bA1i1SKqNgJtUxgKKXj2yvyWDIpFtLoCQjeMcwg
 FE1y8A7LGRag1sal6QuW+xi0Do6OrFoWClXPorPSjMFWE9ceVhUAnBJI3Omlg7ah86UO
 80MA==
X-Gm-Message-State: AOAM5323i1gM+GUuQCRa4TFnzXJkRqykyD9DxVrpho2KmeksRwcm02UM
 JXhEZVNOG2fTbWshN3FtJBcaFHmCeaHKT+F1CoAaQv2d
X-Google-Smtp-Source: ABdhPJznqdd8vgAnm7PPXTyplAgJSsgqsQuZvJie/132IMQqHptU5axlagX3VK7SEEn4lSi1fcAmXP6LDIfsXCe46lA=
X-Received: by 2002:a37:4fd2:: with SMTP id d201mr753470qkb.232.1612914094624; 
 Tue, 09 Feb 2021 15:41:34 -0800 (PST)
MIME-Version: 1.0
References: <YCMYvJLYdcR7K3mE@HIDDEN>
In-Reply-To: <YCMYvJLYdcR7K3mE@HIDDEN>
From: zimoun <zimon.toutoune@HIDDEN>
Date: Wed, 10 Feb 2021 00:41:23 +0100
Message-ID: <CAJ3okZ2PP1MWFNDcp8k6AgKgLLt-DYyjarSyq8a4=9FvmHOk8Q@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
X-Spam-Score: 0.0 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Hi Leo,

On Wed, 10 Feb 2021 at 00:21, Leo Famulari <leo@HIDDEN> wrote:
>
> I notice that tests/publish.scm crashes consistently when run "by hand"
> with `make check` on ci.guix.gnu.org:

It also crashes on one of my machine running Guix on the top of
Ubuntu.  I have not investigated more yet.


Cheers,
simon





Last modified: Tue, 9 Feb 2021 23:45:02 UTC

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