From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id 9v/gJTBeVmAPeAAA0tVLHw (envelope-from ) for ; Sat, 20 Mar 2021 20:42:24 +0000 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id WDWDITBeVmAsPQAAbx9fmQ (envelope-from ) for ; Sat, 20 Mar 2021 20:42:24 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id B92D41ED2F for ; Sat, 20 Mar 2021 21:42:23 +0100 (CET) Received: from localhost ([::1]:55918 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lNiQQ-0008Rr-OQ for larch@yhetil.org; Sat, 20 Mar 2021 16:42:22 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58700) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lNiQ6-0008R0-Gq for bug-guix@gnu.org; Sat, 20 Mar 2021 16:42:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:41639) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lNiQ5-0006Nv-NV for bug-guix@gnu.org; Sat, 20 Mar 2021 16:42:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lNiQ5-0001Xo-Kn for bug-guix@gnu.org; Sat, 20 Mar 2021 16:42:01 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#47239: Test failure in tests/publish.scm with commit 1955ef93b76e51cab5bed4c90f7eb9df7035355a Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Sat, 20 Mar 2021 20:42:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 47239 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Konrad Hinsen Received: via spool by 47239-submit@debbugs.gnu.org id=B47239.16162728815887 (code B ref 47239); Sat, 20 Mar 2021 20:42:01 +0000 Received: (at 47239) by debbugs.gnu.org; 20 Mar 2021 20:41:21 +0000 Received: from localhost ([127.0.0.1]:53185 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lNiPQ-0001Wt-Ka for submit@debbugs.gnu.org; Sat, 20 Mar 2021 16:41:20 -0400 Received: from eggs.gnu.org ([209.51.188.92]:37340) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lNiPM-0001WZ-TC for 47239@debbugs.gnu.org; Sat, 20 Mar 2021 16:41:19 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:59154) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lNiPH-0005wL-LX; Sat, 20 Mar 2021 16:41:11 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=34626 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1lNiPG-0008Un-4f; Sat, 20 Mar 2021 16:41:10 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 30 =?UTF-8?Q?Vent=C3=B4se?= an 229 de la =?UTF-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Sat, 20 Mar 2021 21:41:08 +0100 In-Reply-To: (Konrad Hinsen's message of "Thu, 18 Mar 2021 16:05:33 +0100") Message-ID: <87zgyx4kyj.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: 47239@debbugs.gnu.org Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1616272943; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post; bh=HqaKnOtVkqqOwUWPCAhvJ6W1Jhh3gMW6WBLJ0hRwDzo=; b=YRdrftRGVvwE0DTk8Fcih3aQHjaOKTrb1ptw7oehIPveT/CvMyXiv976JtzONZEG4jKsEf IGigryVVeZvEnV9htc7me+BJ+KS13sjMNwg3e3odtzd/N+5UqqCLxZSwmsAU23BYvciYGU knOnUJlY/jz5k0xnYv5Dth+W80tTW+07QHckkxtT23RA3iFuYmboEmudHQo+9f0JqPaL65 HdEXe1/JkH6HBBPw1NF+ZXFO0ODE5Qby9pNXd4+9sd44RrdJxYGy0CG21p5ZPa9kFoJ95E Epa61PtCOSCAjt3CSSADv9+MiNsEpssQmL0YoZanvQB7UW8fKjQ5rFw+Y1JD6g== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1616272943; a=rsa-sha256; cv=none; b=qUMypvt+nEljH+d106QNPFlo1yCN2RZvv3nr49ClxgULNeQHcbftTYavCSZ1InVQaekxxf qhbJIGicjpvtXsqFjMkJdE5m4BuCqL1Tis2sxlGor1sIHPeFuima1xpkCdy5UlYlygFM5E h/qFbfmXEZcQbkXgbgObHfSbBSEziShSaKRSpfcGmEQihiPxl4zPnQdHEMWyIJHrggO58w MkU3nZ672hrzPqfR/W9ncnTBKUkiXUxTyfsWX+mRIByIDG8+GUK/GG8LZo3/X3dcqNi4FT PnHhnPIiX64tgvdh+7pS5L5n/BHvcw0puWLZKSBbQx3w2FkuuxnqmxvlQjJhjA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Migadu-Spam-Score: -2.91 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Migadu-Queue-Id: B92D41ED2F X-Spam-Score: -2.91 X-Migadu-Scanner: scn0.migadu.com X-TUID: gmrtFieUccOZ Hi Konrad, Konrad Hinsen 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=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 "FileSiz= e")) > + (stat:size (stat nar))) > + (response-code uncompressed))))))))) > expected-value: (#t (("StorePath" . "/home/hinsen/src/guix/test-tmp/store= /892j9b0gqgbj4a7sv40jif3yyv25sm90-item") ("URL" . "nar/gzip/892j9b0gqgbj4a7= sv40jif3yyv25sm90-item") ("Compression" . "gzip")) 200 #t #t 404) > actual-value: #f > result: FAIL Is it reproducible? (You can run =E2=80=9Cmake check TESTS=3Dtests/publish= .scm=E2=80=9D.) If it is, could you add =E2=80=98pk=E2=80=99 calls here and there to see wh= ich of the sub-expressions in (and =E2=80=A6) returns false? For example, replace: (=3D 404 (response-code response) by: (pk 'four-oh-four (=3D 404 (response-code response))) That=E2=80=99ll print a line in the test log with the value of that (=3D = =E2=80=A6) expression. TIA, Ludo=E2=80=99.