[PATCH v2] fw_load0[12]: Skip on Lockdown and Secure Boot

Avinesh Kumar via ltp <[email protected]>
Newsgroups gmane.linux.ltp
Message-ID <[email protected]>
these checks were lost in the recent commit converting
these tests to new API.

tst_module.c:139: TINFO: module signature enforcement: off
insmod: ERROR: could not insert module ltp_fw_load.ko: Key was rejected by service
tst_cmd.c:112: TBROK: 'insmod' exited with a non-zero code 1 at tst_cmd.c:112

with checks added:

tst_security.c:104: TINFO: Kernel lockdown: on
tst_test.c:1467: TCONF: Kernel is locked down, skipping test

Fixes: fd2c4d2c25d3 ("fw_load: rewrite test using new LTP API")
Signed-off-by: Avinesh Kumar <avinesh.kumar-IBi9RG/[email protected]>
---
Changes in v2:
Use .skip_in_lockdown and .skip_in_secureboot fields in struct tst_test
instead of tst_lockdown_enabled()/tst_secureboot_enabled()
---
 testcases/kernel/firmware/fw_load/fw_load01.c | 2 ++
 testcases/kernel/firmware/fw_load/fw_load02.c | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/testcases/kernel/firmware/fw_load/fw_load01.c b/testcases/kernel/firmware/fw_load/fw_load01.c
index 4b30a3b40..cdf0d387b 100644
--- a/testcases/kernel/firmware/fw_load/fw_load01.c
+++ b/testcases/kernel/firmware/fw_load/fw_load01.c
@@ -108,4 +108,6 @@ static struct tst_test test = {
 		"CONFIG_FW_LOADER=y|CONFIG_FW_LOADER=m",
 		NULL,
 	},
+	.skip_in_lockdown = 1,
+	.skip_in_secureboot = 1,
 };
diff --git a/testcases/kernel/firmware/fw_load/fw_load02.c b/testcases/kernel/firmware/fw_load/fw_load02.c
index 8d2063772..fbcfd3faf 100644
--- a/testcases/kernel/firmware/fw_load/fw_load02.c
+++ b/testcases/kernel/firmware/fw_load/fw_load02.c
@@ -90,4 +90,6 @@ static struct tst_test test = {
 		{FW_PATH, NULL, TST_SR_TCONF},
 		{},
 	},
+	.skip_in_lockdown = 1,
+	.skip_in_secureboot = 1,
 };
-- 
2.54.0


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.