From 8813f8ba34cac2160abaec5f64f5fcf8c7889e5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Stelmach?= Date: Thu, 29 Jan 2026 21:21:55 +0100 Subject: [PATCH] tests: Fix (getcwd) failing without chroot. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In case chroot and unshare are not available, $test_directory remains the current directory. When the directory gets removed (line 119), ‘guix pack’ on line 121 fails due to (getcwd) failing with ENOENT. The bug was already present in 272c07096251ea3dae237fd016fc5d66fe25e147. * tests/guix-pack.sh: Always do “cd -”. Change-Id: Ib02bf3714f0c6706b5e759dbb28cf86edf0f1317 Signed-off-by: Ludovic Courtès Merges: #6013 --- tests/guix-pack.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/guix-pack.sh b/tests/guix-pack.sh index 3204e821cf..37788950d3 100644 --- a/tests/guix-pack.sh +++ b/tests/guix-pack.sh @@ -85,10 +85,10 @@ is_available () { if is_available chroot && is_available unshare && unshare -r true; then # Verify we can use what we built. unshare -r chroot . /opt/gnu/bin/guile --version - cd - else echo "warning: skipped some verification because chroot or unshare is unavailable" >&2 fi +cd - # For the tests that build Docker images below, we currently have to use # --dry-run because if we don't, there are only two possible cases: