[LTP] [PATCH] tpci.c: Skip on Lockdown/Secure Boot
Po-Hsu Lin
po-hsu.lin@canonical.com
Fri Jan 9 08:34:19 CET 2026
Following the commit ca9460deef ("fw_load: Skip on Lockdown/Secure Boot")
to take care of:
test_pci 0 TINFO : module signature enforcement: off
insmod: ERROR: could not insert module ltp_tpci.ko: Key was rejected by service
Signed-off-by: Po-Hsu Lin <po-hsu.lin@canonical.com>
---
testcases/kernel/device-drivers/pci/tpci_user/tpci.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/testcases/kernel/device-drivers/pci/tpci_user/tpci.c b/testcases/kernel/device-drivers/pci/tpci_user/tpci.c
index 5d241fb42..a2ca62fb7 100644
--- a/testcases/kernel/device-drivers/pci/tpci_user/tpci.c
+++ b/testcases/kernel/device-drivers/pci/tpci_user/tpci.c
@@ -29,6 +29,7 @@
#include "test.h"
#include "safe_macros.h"
#include "old_module.h"
+#include "tst_security.h"
#include "../tpci_kernel/tpci.h"
@@ -52,6 +53,8 @@ void setup(void)
tst_require_root();
tst_sig(FORK, DEF_HANDLER, cleanup);
tst_requires_module_signature_disabled();
+ if (tst_lockdown_enabled() > 0 || tst_secureboot_enabled() > 0)
+ tst_brkm(TCONF, NULL, "Cannot load unsigned modules in Lockdown/Secure Boot");
}
static void run_pci_testcases(int bus, int slot)
--
2.43.0
More information about the ltp
mailing list