aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOndrej Kozina <okozina@redhat.com>2024-03-06 13:25:39 +0100
committerOndrej Kozina <okozina@redhat.com>2024-03-06 14:23:02 +0100
commit88191942817bf654e9f3b34d4e9f481db079db5f (patch)
treea2548968926094de15ca2dfca8fbc205b325d124
parent5d6fbf7b535104f999d2de1e939bd0e20d7a7cce (diff)
downloadcryptsetup-88191942817bf654e9f3b34d4e9f481db079db5f.tar.gz
tests: fix compat-test-opal bug for empty LUKS2 passphrase.
The bug was hidden due to previously contradicting condition.
-rwxr-xr-xtests/compat-test-opal4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/compat-test-opal b/tests/compat-test-opal
index 4cce664a..09384d9a 100755
--- a/tests/compat-test-opal
+++ b/tests/compat-test-opal
@@ -538,7 +538,7 @@ fi
# skip tests using empty passphrases
if ! fips_mode; then
# empty passphrase (OPAL admin pin cannot be empty)
-echo -e "\n$OPAL2_ADMIN_PIN" | $CRYPTSETUP -q luksFormat $FAST_PBKDF_OPT --type luks2 --hw-opal $OPAL2_DEV || fail
+echo -e "\n$OPAL2_ADMIN_PIN" | $CRYPTSETUP -q luksFormat $FAST_PBKDF_OPT --type luks2 --hw-opal $OPAL2_DEV --force-password || fail
$CRYPTSETUP luksOpen -d $KEYE $OPAL2_DEV $DEV_NAME || fail
$CRYPTSETUP -q luksClose $DEV_NAME || fail
fi
@@ -557,7 +557,7 @@ fi
# skip tests using empty passphrases
if ! fips_mode; then
# empty passphrase (OPAL admin pin cannot be empty)
-echo -e "\n$OPAL2_ADMIN_PIN" | $CRYPTSETUP -q luksFormat $FAST_PBKDF_OPT --type luks2 --hw-opal-only $OPAL2_DEV || fail
+echo -e "\n$OPAL2_ADMIN_PIN" | $CRYPTSETUP -q luksFormat $FAST_PBKDF_OPT --type luks2 --hw-opal-only $OPAL2_DEV --force-password || fail
$CRYPTSETUP luksOpen -d $KEYE $OPAL2_DEV $DEV_NAME || fail
$CRYPTSETUP -q luksClose $DEV_NAME || fail
fi