From: Vitaly Kuznetsov Date: Tue, 13 Jan 2026 16:43:22 +0000 (+0100) Subject: TEST-58-REPART: Add a test for fixate_folume_key X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=398acccb2ac97c99a8bef6b542b4516e158266a8;p=thirdparty%2Fsystemd.git TEST-58-REPART: Add a test for fixate_folume_key The test checks that the expected hash is correctly recorded to the generated crypttab and also checks that systemd-cryptsetup handles the option correctly. --- diff --git a/test/units/TEST-58-REPART.sh b/test/units/TEST-58-REPART.sh index 23548d9cea6..9802f145bcb 100755 --- a/test/units/TEST-58-REPART.sh +++ b/test/units/TEST-58-REPART.sh @@ -1942,6 +1942,61 @@ EOF cmp "$imgs/test1.img" "$imgs/test2.img" } +testcase_luks2_keyhash() { + local defs imgs output root + + defs="$(mktemp --directory "/tmp/test-repart.defs.XXXXXXXXXX")" + imgs="$(mktemp --directory "/var/tmp/test-repart.imgs.XXXXXXXXXX")" + root="$(mktemp --directory "/var/test-repart.root.XXXXXXXXXX")" + # shellcheck disable=SC2064 + trap "rm -rf '$defs' '$imgs' '$root'" RETURN + chmod 0755 "$defs" + + echo "*** testcase for fixate-volume-key ***" + + volume="test-repart-lukskeyhash-$RANDOM" + + tee "$defs/root.conf" <