mirror of
https://git.kernel.org/pub/scm/utils/kernel/kmod/kmod.git
synced 2024-11-15 06:53:44 +08:00
testsuite: add builtin test for modinfo
The modinfo command can show information about builtin modules. Make sure that it functions correctly. Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com> Link: https://github.com/kmod-project/kmod/pull/136 Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>
This commit is contained in:
parent
a49a96bdf0
commit
fb2205805d
Binary file not shown.
Binary file not shown.
@ -0,0 +1,6 @@
|
||||
name: intel_uncore
|
||||
filename: (builtin)
|
||||
license: GPL
|
||||
file: arch/x86/events/intel/intel-uncore
|
||||
description: Support for Intel uncore performance events
|
||||
parm: uncore_no_discover:Don't enable the Intel uncore PerfMon discovery mechanism (default: enable the discovery mechanism). (bool)
|
@ -109,4 +109,26 @@ DEFINE_TEST(test_modinfo_external,
|
||||
.out = TESTSUITE_ROOTFS "test-modinfo/correct-external.txt",
|
||||
})
|
||||
|
||||
static noreturn int test_modinfo_builtin(const struct test *t)
|
||||
{
|
||||
const char *const args[] = {
|
||||
// clang-format off
|
||||
progname,
|
||||
"intel_uncore",
|
||||
NULL,
|
||||
// clang-format on
|
||||
};
|
||||
test_spawn_prog(progname, args);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
DEFINE_TEST(test_modinfo_builtin,
|
||||
.description = "check if modinfo finds builtin module",
|
||||
.config = {
|
||||
[TC_ROOTFS] = TESTSUITE_ROOTFS "test-modinfo/builtin",
|
||||
[TC_UNAME_R] = "6.11.0",
|
||||
},
|
||||
.output = {
|
||||
.out = TESTSUITE_ROOTFS "test-modinfo/correct-builtin.txt",
|
||||
})
|
||||
|
||||
TESTSUITE_MAIN();
|
||||
|
Loading…
Reference in New Issue
Block a user