Skip to content

Commit 660cfd5

Browse files
committed
ltp_acpi: Skip on Lockdown/Secure Boot
Similarly to other kernel modules tests (block_dev.c, delete_module0[13].c, finit_module02.c and init_module02.c) also ltp_acpi.c cannot load modules due Lockdown/Secure Boot. This fixes failure: ltp_acpi 0 TINFO : module signature enforcement: off insmod: ERROR: could not insert module ltp_acpi_cmds.ko: Key was rejected by service Follow-up: ca9460d ("fw_load: Skip on Lockdown/Secure Boot") Signed-off-by: Petr Vorel <pvorel@suse.cz>
1 parent c3cbbd3 commit 660cfd5

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

testcases/kernel/device-drivers/acpi/ltp_acpi.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
#include "test.h"
2525
#include "tso_module.h"
2626
#include "tso_safe_macros.h"
27+
#include "tst_security.h"
2728

2829
#include "ltp_acpi.h"
2930

@@ -134,6 +135,10 @@ int main(int argc, char *argv[])
134135
tst_sig(FORK, DEF_HANDLER, cleanup);
135136

136137
tst_requires_module_signature_disabled();
138+
139+
if (tst_lockdown_enabled() > 0 || tst_secureboot_enabled() > 0)
140+
tst_brkm(TCONF, NULL, "Cannot load unsigned modules in Lockdown/Secure Boot");
141+
137142
tst_module_load(NULL, module_name, NULL);
138143
module_loaded = 1;
139144

0 commit comments

Comments
 (0)