From c536f0b217714917988d2f412999d978c2f2f495 Mon Sep 17 00:00:00 2001
From: Cees de Groot <cg@evrl.com>
Date: Tue, 30 Mar 2021 17:11:48 +0200
Subject: [PATCH] tests: Make 'publish' test umask-insensitive.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Fixes <https://bugs.gnu.org/47239>.
Reported by Konrad Hinsen <konrad.hinsen@fastmail.net>.

* tests/publish.scm ("with cache"): Pass the result of 'stat:perms' to
'logand' to be umask-insensitive.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
---
 tests/publish.scm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/publish.scm b/tests/publish.scm
index 52101876b56..3e67c435acf 100644
--- a/tests/publish.scm
+++ b/tests/publish.scm
@@ -452,8 +452,8 @@ (define %gzip-magic-bytes
               (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))
-- 
GitLab