]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test: make sure TEST-50-DISSECT.mountfsd.sh can run standalone 39168/head
authorLennart Poettering <lennart@poettering.net>
Mon, 29 Sep 2025 08:45:14 +0000 (10:45 +0200)
committerLennart Poettering <lennart@poettering.net>
Mon, 13 Oct 2025 20:26:34 +0000 (22:26 +0200)
test/units/TEST-50-DISSECT.mountfsd.sh

index 067ed238e8c181a426194fb30ba3818a3331b388..d2ce67714adbaee66bf9fcd254114c7e77a75096 100755 (executable)
@@ -60,14 +60,21 @@ if (SYSTEMD_LOG_TARGET=console varlinkctl call \
     exit 0
 fi
 
+# This should work without the key
+systemd-dissect --image-policy='root=verity:=absent+unused' --mtree /var/tmp/unpriv.raw >/dev/null
+systemd-dissect --image-policy='root=verity+signed:=absent+unused' --mtree /var/tmp/unpriv.raw >/dev/null
+
 # This should fail before we install the key
 (! systemd-dissect --image-policy='root=signed:=absent+unused' --mtree /var/tmp/unpriv.raw >/dev/null)
 
 # Install key in keychain
-cp /tmp/test-50-unpriv-cert.crt /run/verity.d
+mkdir -p /run/verity.d
+cp /tmp/test-50-unpriv-cert.crt /run/verity.d/
 
 # This should work now
 systemd-dissect --image-policy='root=signed:=absent+unused' --mtree /var/tmp/unpriv.raw >/dev/null
+
+# This should still work
 systemd-dissect --image-policy='root=verity:=absent+unused' --mtree /var/tmp/unpriv.raw >/dev/null
 systemd-dissect --image-policy='root=verity+signed:=absent+unused' --mtree /var/tmp/unpriv.raw >/dev/null