summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorLuca Boccassi <bluca@debian.org>2022-10-02 21:12:02 +0200
committerLuca Boccassi <bluca@debian.org>2022-10-03 11:26:31 +0200
commit8e3b2ec5a5d0c6ae9ad9e11c941899dd3bce86d2 (patch)
tree7fa315902527966ce41b685e126c09e88822621c /test
parentrepart: workaround spurious maybe-uninitialized warning (diff)
downloadsystemd-8e3b2ec5a5d0c6ae9ad9e11c941899dd3bce86d2.tar.xz
systemd-8e3b2ec5a5d0c6ae9ad9e11c941899dd3bce86d2.zip
test-70: check if LUKS2 plugins are actually installed, not just supported
We don't build them in Debian/Ubuntu yet, even though cryptsetup supports them
Diffstat (limited to 'test')
-rwxr-xr-xtest/units/testsuite-70.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/test/units/testsuite-70.sh b/test/units/testsuite-70.sh
index 97536c812c..b1cf7e83c4 100755
--- a/test/units/testsuite-70.sh
+++ b/test/units/testsuite-70.sh
@@ -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