From 7a816abf826ccd30d57459feb4529d515468fdc9 Mon Sep 17 00:00:00 2001 From: Milan Broz Date: Wed, 3 Jul 2024 18:45:06 +0200 Subject: [PATCH] TCRYPT: fix system encryption test if kernel does not support EFI partition If kernel is mising CONFIG_EFI_PARTITION, the required partitons are missing too. Just skip the test if loop block device is not available. --- tests/tcrypt-compat-test | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tests/tcrypt-compat-test b/tests/tcrypt-compat-test index d0c497dc3..0520be4ca 100755 --- a/tests/tcrypt-compat-test +++ b/tests/tcrypt-compat-test @@ -224,11 +224,17 @@ for file in $(ls $TST_DIR/sys_[tv]c_*) ; do echo " [N/A]" continue fi - if [ -b "$LOOP_SYS"p3 ]; then + if [[ $file =~ _gpt_ ]]; then LOOP_PART="$LOOP_SYS"p3 else LOOP_PART="$LOOP_SYS"p1 fi + if [ ! -b "$LOOP_PART" ]; then + echo " [N/A]" + losetup -d $LOOP_SYS + LOOP_SYS="" + continue + fi get_HASH_CIPHER $file # map through partition name echo -n " [PART]"