summary refs log tree commit diff
path: root/tests/guix-pack.sh
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2019-05-09 17:13:00 +0200
committerLudovic Courtès <ludo@gnu.org>2019-05-09 17:42:31 +0200
commit8deb65c37850bfca36429f3fe5239bd9236f969c (patch)
tree700a253b1398623c6c8ec976f4056b95d22273f3 /tests/guix-pack.sh
parent18160c3408a6481f70e7f15afe5009edd2a731ae (diff)
downloadguix-8deb65c37850bfca36429f3fe5239bd9236f969c.tar.gz
tests: Ensure 'unshare' works before relying on it.
Fixes <https://bugs.gnu.org/35642>.
Reported by Josh Holland <josh@inv.alid.pw>.

* tests/guix-pack-relocatable.sh: Before invoking 'unshare' at the
bottom, add "if unshare -r true" condition.
* tests/guix-pack.sh: Likewise.
Diffstat (limited to 'tests/guix-pack.sh')
-rw-r--r--tests/guix-pack.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/guix-pack.sh b/tests/guix-pack.sh
index a43f4d128f..3cd0404748 100644
--- a/tests/guix-pack.sh
+++ b/tests/guix-pack.sh
@@ -1,6 +1,6 @@
 # GNU Guix --- Functional package management for GNU
 # Copyright © 2018 Chris Marusich <cmmarusich@gmail.com>
-# Copyright © 2018 Ludovic Courtès <ludo@gnu.org>
+# Copyright © 2018, 2019 Ludovic Courtès <ludo@gnu.org>
 #
 # This file is part of GNU Guix.
 #
@@ -59,7 +59,7 @@ is_available () {
     type "$1" > /dev/null
 }
 
-if is_available chroot && is_available unshare; then
+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 -