[LTP] [PATCH v2 8/8] [RFC] ima_kexec.sh: Relax result on unreadable policy to TCONF

Petr Vorel pvorel@suse.cz
Fri Dec 13 23:20:14 CET 2024


Although d1e29adca6, which set minimal version fixed some false
positives, it might be better to be optimistic and exit with TCONF
when result is unknown due policy not being readable than "fail" with
TBROK and TWARN.

Fixes: 731aae8121 ("IMA: Add test for kexec cmdline measurement")
Reported-by: Martin Doucha <mdoucha@suse.cz>
Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
 testcases/kernel/security/integrity/ima/tests/ima_kexec.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/testcases/kernel/security/integrity/ima/tests/ima_kexec.sh b/testcases/kernel/security/integrity/ima/tests/ima_kexec.sh
index df8658655d..c52d767fe7 100755
--- a/testcases/kernel/security/integrity/ima/tests/ima_kexec.sh
+++ b/testcases/kernel/security/integrity/ima/tests/ima_kexec.sh
@@ -95,7 +95,7 @@ kexec_test()
 	ROD kexec -su
 	if ! measure "$cmdline"; then
 		if ! check_policy_readable; then
-			res=TBROK
+			res=TCONF
 		fi
 		tst_brk $res "unable to find a correct measurement"
 	fi
-- 
2.47.1



More information about the ltp mailing list