]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test-70: check if LUKS2 plugins are actually installed, not just supported 23213/head
authorLuca Boccassi <bluca@debian.org>
Sun, 2 Oct 2022 19:12:02 +0000 (20:12 +0100)
committerLuca Boccassi <bluca@debian.org>
Mon, 3 Oct 2022 09:26:31 +0000 (10:26 +0100)
We don't build them in Debian/Ubuntu yet, even though cryptsetup supports them

test/units/testsuite-70.sh

index 97536c812cc98bbdde767072ce44695edaa11d84..b1cf7e83c4b5b5d37fcd3428ff3a1bac49e4a2dc 100755 (executable)
@@ -33,7 +33,8 @@ env PIN=123456 /usr/lib/systemd/systemd-cryptsetup attach test-volume $img - tpm
 env PIN=123457 /usr/lib/systemd/systemd-cryptsetup attach test-volume $img - tpm2-device=auto,headless=1 && { echo 'unexpected success'; exit 1; }
 
 # Check LUKS2 token plugin unlock (i.e. without specifying tpm2-device=auto)
-if cryptsetup --help | grep -q 'LUKS2 external token plugin support is compiled-in'; then
+if cryptsetup --help | grep -q 'LUKS2 external token plugin support is compiled-in' && \
+         [ -f "$(cryptsetup --help | sed -n -r 's/.*LUKS2 external token plugin path: (.*)\./\1/p')/libcryptsetup-token-systemd-tpm2.so" ]; then
     env PIN=123456 /usr/lib/systemd/systemd-cryptsetup attach test-volume $img - headless=1
     /usr/lib/systemd/systemd-cryptsetup detach test-volume