aboutsummaryrefslogtreecommitdiff
path: root/tests/guix-system.sh
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2018-09-07 09:50:26 +0200
committerLudovic Courtès <ludo@gnu.org>2018-09-07 11:40:05 +0200
commit1540075c790dfaeff52c93392f2fc63b9e23b77e (patch)
treedc9c011af6bd8a6cdde92f84e0eb5ed9da957c6e /tests/guix-system.sh
parent0012e0dd5642fbbb8ee40a68f65afc184952fc98 (diff)
downloadgnu-guix-1540075c790dfaeff52c93392f2fc63b9e23b77e.tar
gnu-guix-1540075c790dfaeff52c93392f2fc63b9e23b77e.tar.gz
vm: Make UUID computation really deterministic.
Fixes <https://bugs.gnu.org/32652>. * gnu/system/vm.scm (operating-system-uuid)[service-name, file-system-digest]: New procedures. Map these over services and file systems and hash the result. * tests/guix-system.sh: Add test.
Diffstat (limited to 'tests/guix-system.sh')
-rw-r--r--tests/guix-system.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/guix-system.sh b/tests/guix-system.sh
index 36ba5fbd5f..a129efdfcb 100644
--- a/tests/guix-system.sh
+++ b/tests/guix-system.sh
@@ -232,6 +232,14 @@ guix system build "$tmpfile" -d | grep '\.drv$'
guix system vm "$tmpfile" -d # succeeds
guix system vm "$tmpfile" -d | grep '\.drv$'
+# Make sure the behavior is deterministic (<https://bugs.gnu.org/32652>).
+drv1="`guix system vm "$tmpfile" -d`"
+drv2="`guix system vm "$tmpfile" -d`"
+test "$drv1" = "$drv2"
+drv1="`guix system disk-image --file-system-type=iso9660 "$tmpfile" -d`"
+drv2="`guix system disk-image --file-system-type=iso9660 "$tmpfile" -d`"
+test "$drv1" = "$drv2"
+
make_user_config "group-that-does-not-exist" "users"
if guix system build "$tmpfile" -n 2> "$errorfile"
then false