Jan Engelhardt
237161f1b6
- testsuite: Check the list of loaded modules after a test - testsuite: Add test for modprobe --force - testsuite: Do not provide finit_module(2) on older kernels - Add some tests for kernels without finit_module(2) - libkmod-module: Simplify kmod_module_insert_module() - libkmod: Implement filtering of unsupported modules (fate#316971) - modprobe: Implement --allow-unsupported-modules (fate#316971) - make the %check section fatal OBS-URL: https://build.opensuse.org/request/show/224726 OBS-URL: https://build.opensuse.org/package/show/Base:System/kmod?expand=0&rev=65
80 lines
2.0 KiB
Diff
80 lines
2.0 KiB
Diff
From 9a23dec3269fad1c4f03f6b9b4ceccedc136d4e2 Mon Sep 17 00:00:00 2001
|
|
From: Michal Marek <mmarek@suse.cz>
|
|
Date: Thu, 27 Feb 2014 23:33:38 +0100
|
|
Subject: [PATCH 07/10] Add some tests for kernels without finit_module(2)
|
|
|
|
Patch-mainline: v17
|
|
Git-commit: be29c40e25b71d35708b9fad5772ebcd8e4685b3
|
|
[mmarek: Dropped binary files from the patch]
|
|
---
|
|
testsuite/test-modprobe.c | 46 ++++++++++++++++++++++++++++++++++++++++++++++
|
|
1 file changed, 46 insertions(+)
|
|
|
|
diff --git a/testsuite/test-modprobe.c b/testsuite/test-modprobe.c
|
|
index 92348b0..b675f48 100644
|
|
--- a/testsuite/test-modprobe.c
|
|
+++ b/testsuite/test-modprobe.c
|
|
@@ -209,6 +209,50 @@ static DEFINE_TEST(modprobe_force,
|
|
.modules_loaded = "psmouse",
|
|
);
|
|
|
|
+static noreturn int modprobe_oldkernel(const struct test *t)
|
|
+{
|
|
+ const char *progname = ABS_TOP_BUILDDIR "/tools/modprobe";
|
|
+ const char *const args[] = {
|
|
+ progname,
|
|
+ "psmouse",
|
|
+ NULL,
|
|
+ };
|
|
+
|
|
+ test_spawn_prog(progname, args);
|
|
+ exit(EXIT_FAILURE);
|
|
+}
|
|
+static DEFINE_TEST(modprobe_oldkernel,
|
|
+ .description = "check modprobe --force",
|
|
+ .config = {
|
|
+ [TC_UNAME_R] = "3.3.3",
|
|
+ [TC_ROOTFS] = TESTSUITE_ROOTFS "test-modprobe/oldkernel",
|
|
+ [TC_INIT_MODULE_RETCODES] = "",
|
|
+ },
|
|
+ .modules_loaded = "psmouse",
|
|
+ );
|
|
+
|
|
+static noreturn int modprobe_oldkernel_force(const struct test *t)
|
|
+{
|
|
+ const char *progname = ABS_TOP_BUILDDIR "/tools/modprobe";
|
|
+ const char *const args[] = {
|
|
+ progname,
|
|
+ "--force", "psmouse",
|
|
+ NULL,
|
|
+ };
|
|
+
|
|
+ test_spawn_prog(progname, args);
|
|
+ exit(EXIT_FAILURE);
|
|
+}
|
|
+static DEFINE_TEST(modprobe_oldkernel_force,
|
|
+ .description = "check modprobe --force",
|
|
+ .config = {
|
|
+ [TC_UNAME_R] = "3.3.3",
|
|
+ [TC_ROOTFS] = TESTSUITE_ROOTFS "test-modprobe/oldkernel-force",
|
|
+ [TC_INIT_MODULE_RETCODES] = "",
|
|
+ },
|
|
+ .modules_loaded = "psmouse",
|
|
+ );
|
|
+
|
|
|
|
static const struct test *tests[] = {
|
|
&smodprobe_show_depends,
|
|
@@ -219,6 +263,8 @@ static const struct test *tests[] = {
|
|
&smodprobe_install_cmd_loop,
|
|
&smodprobe_param_kcmdline,
|
|
&smodprobe_force,
|
|
+ &smodprobe_oldkernel,
|
|
+ &smodprobe_oldkernel_force,
|
|
NULL,
|
|
};
|
|
|
|
--
|
|
1.8.4.5
|
|
|