guix_mirror_bot pushed a commit to branch master
in repository guix.

commit 8813f8ba34cac2160abaec5f64f5fcf8c7889e5b
Author: Łukasz Stelmach <[email protected]>
AuthorDate: Thu Jan 29 21:21:55 2026 +0100

    tests: Fix (getcwd) failing without chroot.
    
    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 <[email protected]>
    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:

Reply via email to