]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
tests: Switch password quality check off for luks2 test
authorGary Lin <glin@suse.com>
Fri, 29 Dec 2023 09:08:20 +0000 (17:08 +0800)
committerDaniel Kiper <daniel.kiper@oracle.com>
Thu, 25 Jan 2024 17:07:49 +0000 (18:07 +0100)
When adding/changing the password for the luks2 partition, cryptsetup
may reject the command due to the weak password. Since this is only for
testing, add "--force-password" to switch password quality check off to
avoid the unexpected failure.

Signed-off-by: Gary Lin <glin@suse.com>
Reviewed-by: Glenn Washburn <development@efficientek.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
tests/grub_cmd_cryptomount.in

index 4578ab7093c3aa238344de19611e78cf2bfebca2..f4d8f35473d088160565036a85b90a603d6a185a 100644 (file)
@@ -173,7 +173,7 @@ eval testcase_fail "'LUKS2 test with argon2 pbkdf:'" \
 # Add good password to second slot and change first slot to unchecked password
 csscript=`mktemp "${TMPDIR:-/tmp}/tmp.XXXXXXXXXX"` || exit 99
 cat >$csscript <<'EOF'
-    CSOPTS="--pbkdf-force-iterations 1000 --pbkdf=pbkdf2"
+    CSOPTS="--pbkdf-force-iterations 1000 --pbkdf=pbkdf2 --force-password"
     cryptsetup $CSOPTS --key-file $lukskeyfile luksAddKey $luksdiskfile $lukskeyfile
     echo "newpass" | cryptsetup $CSOPTS --key-file $lukskeyfile --key-slot 0 luksChangeKey $luksdiskfile
 EOF