Skip to content

Commit 8819194

Browse files
committed
tests: fix compat-test-opal bug for empty LUKS2 passphrase.
The bug was hidden due to previously contradicting condition.
1 parent 5d6fbf7 commit 8819194

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/compat-test-opal

+2-2
Original file line numberDiff line numberDiff line change
@@ -538,7 +538,7 @@ fi
538538
# skip tests using empty passphrases
539539
if ! fips_mode; then
540540
# empty passphrase (OPAL admin pin cannot be empty)
541-
echo -e "\n$OPAL2_ADMIN_PIN" | $CRYPTSETUP -q luksFormat $FAST_PBKDF_OPT --type luks2 --hw-opal $OPAL2_DEV || fail
541+
echo -e "\n$OPAL2_ADMIN_PIN" | $CRYPTSETUP -q luksFormat $FAST_PBKDF_OPT --type luks2 --hw-opal $OPAL2_DEV --force-password || fail
542542
$CRYPTSETUP luksOpen -d $KEYE $OPAL2_DEV $DEV_NAME || fail
543543
$CRYPTSETUP -q luksClose $DEV_NAME || fail
544544
fi
@@ -557,7 +557,7 @@ fi
557557
# skip tests using empty passphrases
558558
if ! fips_mode; then
559559
# empty passphrase (OPAL admin pin cannot be empty)
560-
echo -e "\n$OPAL2_ADMIN_PIN" | $CRYPTSETUP -q luksFormat $FAST_PBKDF_OPT --type luks2 --hw-opal-only $OPAL2_DEV || fail
560+
echo -e "\n$OPAL2_ADMIN_PIN" | $CRYPTSETUP -q luksFormat $FAST_PBKDF_OPT --type luks2 --hw-opal-only $OPAL2_DEV --force-password || fail
561561
$CRYPTSETUP luksOpen -d $KEYE $OPAL2_DEV $DEV_NAME || fail
562562
$CRYPTSETUP -q luksClose $DEV_NAME || fail
563563
fi

0 commit comments

Comments
 (0)