]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test: slightly extend systemd-tpm2-setup's coverage 29710/head
authorFrantisek Sumsal <frantisek@sumsal.cz>
Wed, 25 Oct 2023 15:57:08 +0000 (17:57 +0200)
committerFrantisek Sumsal <frantisek@sumsal.cz>
Wed, 25 Oct 2023 16:18:48 +0000 (18:18 +0200)
test/units/testsuite-70.tpm2-setup.sh

index 40dce3bf2d3689e9124b3720bf007ec3b90a278b..faf6fe7847cee6030946ee39b0202c0677915fb0 100755 (executable)
@@ -11,8 +11,17 @@ if [[ ! -x "${SD_TPM2SETUP:?}" ]]; then
     exit 0
 fi
 
-# Run this, just to get sanitizer coverage. The tools should be idempotent, hence run the multiple times.
+"$SD_TPM2SETUP" --help
+"$SD_TPM2SETUP" --version
+"$SD_TPM2SETUP" --tpm2-device=list
+"$SD_TPM2SETUP" --tpm2-device=auto
+"$SD_TPM2SETUP" --tpm2-device=/dev/tpm0
 "$SD_TPM2SETUP" --early=yes
 "$SD_TPM2SETUP" --early=yes
 "$SD_TPM2SETUP" --early=no
 "$SD_TPM2SETUP" --early=no
+
+(! "$SD_TPM2SETUP" "")
+(! "$SD_TPM2SETUP" --tpm2-device=)
+(! "$SD_TPM2SETUP" --tpm2-device=/dev/null)
+(! "$SD_TPM2SETUP" --foo=bar)