Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More cmdline test #254

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
blacklist foo
blacklist bar
blacklist foo2
blacklist bar2
blacklist foobar

# End of configuration files. Dumping indexes now:

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
modprobe.blacklist=foo,bar modprobe.blacklist=foo2 quiet modprobe.blacklist=bar2 rw modprobe.blacklist=foobar
Original file line number Diff line number Diff line change
@@ -1,2 +0,0 @@
btusb 11911 0 - Live 0xffffffffa00ec000
bluetooth 173424 1 btusb, Live 0xffffffffa0040000

This file was deleted.

This file was deleted.

44 changes: 24 additions & 20 deletions testsuite/test-modprobe.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,14 @@ DEFINE_TEST(modprobe_show_depends2,
.output = {
.out = TESTSUITE_ROOTFS "test-modprobe/show-depends/correct-mod-simple.txt",
});
DEFINE_TEST_WITH_FUNC(modprobe_show_depends_no_load, modprobe_show_depends2,
lucasdemarchi marked this conversation as resolved.
Show resolved Hide resolved
.description = "check that --show-depends doesn't load any module",
.config = {
[TC_UNAME_R] = "4.4.4",
[TC_ROOTFS] = TESTSUITE_ROOTFS "test-modprobe/show-depends",
},
.modules_loaded = "",
);

static noreturn int modprobe_show_alias_to_none(const struct test *t)
{
Expand Down Expand Up @@ -169,9 +177,7 @@ DEFINE_TEST(modprobe_param_kcmdline_show_deps,
},
.output = {
.out = TESTSUITE_ROOTFS "test-modprobe/module-param-kcmdline/correct.txt",
},
.modules_loaded = "",
);
});
lucasdemarchi marked this conversation as resolved.
Show resolved Hide resolved

static noreturn int modprobe_param_kcmdline(const struct test *t)
{
Expand All @@ -186,9 +192,7 @@ DEFINE_TEST_WITH_FUNC(modprobe_param_kcmdline2, modprobe_param_kcmdline,
},
.output = {
.out = TESTSUITE_ROOTFS "test-modprobe/module-param-kcmdline2/correct.txt",
},
.modules_loaded = "",
);
});

DEFINE_TEST_WITH_FUNC(modprobe_param_kcmdline3, modprobe_param_kcmdline,
.description = "check if unrelated strings in kcmdline are correctly ignored",
Expand All @@ -198,9 +202,7 @@ DEFINE_TEST_WITH_FUNC(modprobe_param_kcmdline3, modprobe_param_kcmdline,
},
.output = {
.out = TESTSUITE_ROOTFS "test-modprobe/module-param-kcmdline3/correct.txt",
},
.modules_loaded = "",
);
});

DEFINE_TEST_WITH_FUNC(modprobe_param_kcmdline4, modprobe_param_kcmdline,
.description = "check if unrelated strings in kcmdline are correctly ignored",
Expand All @@ -210,9 +212,7 @@ DEFINE_TEST_WITH_FUNC(modprobe_param_kcmdline4, modprobe_param_kcmdline,
},
.output = {
.out = TESTSUITE_ROOTFS "test-modprobe/module-param-kcmdline4/correct.txt",
},
.modules_loaded = "",
);
});

DEFINE_TEST_WITH_FUNC(modprobe_param_kcmdline5, modprobe_param_kcmdline,
.description = "check if params with spaces are parsed correctly from kcmdline",
Expand All @@ -234,9 +234,7 @@ DEFINE_TEST_WITH_FUNC(modprobe_param_kcmdline6, modprobe_param_kcmdline,
},
.output = {
.out = TESTSUITE_ROOTFS "test-modprobe/module-param-kcmdline6/correct.txt",
},
.modules_loaded = "",
);
});

DEFINE_TEST_WITH_FUNC(modprobe_param_kcmdline7, modprobe_param_kcmdline,
.description = "check if dots on other parts of kcmdline don't confuse our parser",
Expand All @@ -246,9 +244,7 @@ DEFINE_TEST_WITH_FUNC(modprobe_param_kcmdline7, modprobe_param_kcmdline,
},
.output = {
.out = TESTSUITE_ROOTFS "test-modprobe/module-param-kcmdline7/correct.txt",
},
.modules_loaded = "",
);
});

DEFINE_TEST_WITH_FUNC(modprobe_param_kcmdline8, modprobe_param_kcmdline,
.description = "check if dots on other parts of kcmdline don't confuse our parser",
Expand All @@ -258,9 +254,17 @@ DEFINE_TEST_WITH_FUNC(modprobe_param_kcmdline8, modprobe_param_kcmdline,
},
.output = {
.out = TESTSUITE_ROOTFS "test-modprobe/module-param-kcmdline8/correct.txt",
});

DEFINE_TEST_WITH_FUNC(modprobe_param_kcmdline9, modprobe_param_kcmdline,
.description = "check if multiple blacklists are parsed correctly",
.config = {
[TC_UNAME_R] = "4.4.4",
[TC_ROOTFS] = TESTSUITE_ROOTFS "test-modprobe/module-param-kcmdline9",
},
.modules_loaded = "",
);
.output = {
.out = TESTSUITE_ROOTFS "test-modprobe/module-param-kcmdline9/correct.txt",
});

static noreturn int modprobe_force(const struct test *t)
{
Expand Down