Skip to content

Commit df809fe

Browse files
committed
tests: catch unlikely failures in reencrypt-reformat-device helper.
1 parent 8f112fa commit df809fe

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

tests/luks2-reencryption-test

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -893,10 +893,10 @@ reformat_reencrypt_device() {
893893
echo -e "$PWD1\n$PWD6" | $CRYPTSETUP -q luksAddKey -S10 $FAST_PBKDF_ARGON $DEV || fail
894894
echo -e "$PWD1\n$PWD7" | $CRYPTSETUP -q luksAddKey -S12 $FAST_PBKDF_ARGON $DEV || fail
895895

896-
$CRYPTSETUP token add $DEV --token-id 1 --key-description $KEY_NAME3 -S6
897-
$CRYPTSETUP token add $DEV --token-id 2 --key-description $KEY_NAME4 -S8
898-
$CRYPTSETUP token add $DEV --token-id 3 --key-description $KEY_NAME5 -S10
899-
echo -e "{\"type\":\"luks2-keyring\",\"keyslots\":[\"4\", \"12\"],\"key_description\":\"$KEY_NAME6\"}" | $CRYPTSETUP token import $DEV --token-id 4 --json-file -
896+
$CRYPTSETUP token add $DEV --token-id 1 --key-description $KEY_NAME3 -S6 || fail
897+
$CRYPTSETUP token add $DEV --token-id 2 --key-description $KEY_NAME4 -S8 || fail
898+
$CRYPTSETUP token add $DEV --token-id 3 --key-description $KEY_NAME5 -S10 || fail
899+
echo -e "{\"type\":\"luks2-keyring\",\"keyslots\":[\"4\", \"12\"],\"key_description\":\"$KEY_NAME6\"}" | $CRYPTSETUP token import $DEV --token-id 4 --json-file - || fail
900900

901901
$CRYPTSETUP -q luksHeaderBackup --header-backup-file $BACKUP_FILE $DEV || fail
902902
else

0 commit comments

Comments
 (0)