[LTP] [PATCH 3/3] ima_setup.sh: Use $TST_REBOOT
Petr Vorel
pvorel@suse.cz
Wed Feb 26 15:31:13 CET 2025
Replace test specific $IMA_POLICY_LOADED with shell API specific
$TST_REBOOT.
Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
.../kernel/security/integrity/ima/tests/ima_setup.sh | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/testcases/kernel/security/integrity/ima/tests/ima_setup.sh b/testcases/kernel/security/integrity/ima/tests/ima_setup.sh
index 1f1c267c4b..79435eb185 100644
--- a/testcases/kernel/security/integrity/ima/tests/ima_setup.sh
+++ b/testcases/kernel/security/integrity/ima/tests/ima_setup.sh
@@ -236,9 +236,9 @@ load_ima_policy()
tst_brk TCONF "loading unsigned policy failed"
fi
- IMA_POLICY_LOADED=1
+ TST_REBOOT=1
- tst_res TINFO "example policy successfully loaded"
+ tst_res TINFO "WARNING: example policy successfully loaded due LTP_IMA_LOAD_POLICY=1, reboot recommended"
IMA_FAIL="TFAIL"
IMA_BROK="TBROK"
}
@@ -281,10 +281,6 @@ ima_cleanup()
for dir in $UMOUNT; do
umount $dir
done
-
- if [ "$IMA_POLICY_LOADED" = 1 ]; then
- tst_res TINFO "WARNING: policy loaded via LTP_IMA_LOAD_POLICY=1, reboot recommended"
- fi
}
set_digest_index()
--
2.47.2
More information about the ltp
mailing list