mirror of
https://github.com/kmod-project/kmod.git
synced 2026-01-26 15:39:08 +00:00
testsuite: Rename test-user
First version of the patches implementing weakdep called them "user dep", hence the name of the test. That doesn't make sense anymore after the rename. Rename the test accordingly. Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com> Link: https://github.com/kmod-project/kmod/pull/75 Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>
This commit is contained in:
parent
0c2bd66e6b
commit
633c9ff6c7
@ -276,7 +276,7 @@ TESTSUITE = \
|
||||
testsuite/test-modinfo testsuite/test-util testsuite/test-new-module \
|
||||
testsuite/test-modprobe testsuite/test-blacklist \
|
||||
testsuite/test-dependencies testsuite/test-depmod \
|
||||
testsuite/test-list testsuite/test-user
|
||||
testsuite/test-list testsuite/test-weakdep
|
||||
|
||||
check_PROGRAMS = $(TESTSUITE)
|
||||
TESTS = $(TESTSUITE)
|
||||
@ -319,8 +319,8 @@ testsuite_test_depmod_LDADD = $(TESTSUITE_LDADD)
|
||||
testsuite_test_depmod_CPPFLAGS = $(TESTSUITE_CPPFLAGS)
|
||||
testsuite_test_list_LDADD = $(TESTSUITE_LDADD)
|
||||
testsuite_test_list_CPPFLAGS = $(TESTSUITE_CPPFLAGS)
|
||||
testsuite_test_user_LDADD = $(TESTSUITE_LDADD)
|
||||
testsuite_test_user_CPPFLAGS = $(TESTSUITE_CPPFLAGS)
|
||||
testsuite_test_weakdep_LDADD = $(TESTSUITE_LDADD)
|
||||
testsuite_test_weakdep_CPPFLAGS = $(TESTSUITE_CPPFLAGS)
|
||||
|
||||
testsuite-distclean:
|
||||
$(RM) -r $(ROOTFS)
|
||||
|
||||
6
testsuite/.gitignore
vendored
6
testsuite/.gitignore
vendored
@ -18,7 +18,7 @@
|
||||
/test-modprobe
|
||||
/test-hash
|
||||
/test-list
|
||||
/test-user
|
||||
/test-weakdep
|
||||
/rootfs
|
||||
/stamp-rootfs
|
||||
/test-scratchbuf.log
|
||||
@ -53,5 +53,5 @@
|
||||
/test-testsuite.trs
|
||||
/test-list.log
|
||||
/test-list.trs
|
||||
/test-user.log
|
||||
/test-user.trs
|
||||
/test-weakdep.log
|
||||
/test-weakdep.trs
|
||||
|
||||
@ -108,10 +108,10 @@ map=(
|
||||
["test-modinfo/mod-simple-sha256.ko"]="mod-simple.ko"
|
||||
["test-modinfo/mod-simple-pkcs7.ko"]="mod-simple.ko"
|
||||
["test-modinfo/external/lib/modules/external/mod-simple.ko"]="mod-simple.ko"
|
||||
["test-user$MODULE_DIRECTORY/4.4.4/kernel/mod-loop-a.ko"]="mod-loop-a.ko"
|
||||
["test-user$MODULE_DIRECTORY/4.4.4/kernel/mod-loop-b.ko"]="mod-loop-b.ko"
|
||||
["test-user$MODULE_DIRECTORY/4.4.4/kernel/mod-simple.ko"]="mod-simple.ko"
|
||||
["test-user$MODULE_DIRECTORY/4.4.4/kernel/mod-weakdep.ko"]="mod-weakdep.ko"
|
||||
["test-weakdep$MODULE_DIRECTORY/4.4.4/kernel/mod-loop-a.ko"]="mod-loop-a.ko"
|
||||
["test-weakdep$MODULE_DIRECTORY/4.4.4/kernel/mod-loop-b.ko"]="mod-loop-b.ko"
|
||||
["test-weakdep$MODULE_DIRECTORY/4.4.4/kernel/mod-simple.ko"]="mod-simple.ko"
|
||||
["test-weakdep$MODULE_DIRECTORY/4.4.4/kernel/mod-weakdep.ko"]="mod-weakdep.ko"
|
||||
)
|
||||
|
||||
gzip_array=(
|
||||
|
||||
@ -15,11 +15,11 @@
|
||||
|
||||
#include "testsuite.h"
|
||||
|
||||
#define TEST_USER_ROOTFS TESTSUITE_ROOTFS "test-user/"
|
||||
#define TEST_USER_KERNEL_DIR TEST_USER_ROOTFS MODULE_DIRECTORY "/4.4.4/"
|
||||
#define TEST_WEAKDEP_ROOTFS TESTSUITE_ROOTFS "test-weakdep/"
|
||||
#define TEST_WEAKDEP_KERNEL_DIR TEST_WEAKDEP_ROOTFS MODULE_DIRECTORY "/4.4.4/"
|
||||
|
||||
static const char *const test_user_config_paths[] = {
|
||||
TEST_USER_ROOTFS "etc/modprobe.d",
|
||||
static const char *const test_weakdep_config_paths[] = {
|
||||
TEST_WEAKDEP_ROOTFS "etc/modprobe.d",
|
||||
NULL
|
||||
};
|
||||
|
||||
@ -29,13 +29,13 @@ static const char *const mod_name[] = {
|
||||
NULL
|
||||
};
|
||||
|
||||
static int test_user_weakdep(const struct test *t)
|
||||
static int test_weakdep(const struct test *t)
|
||||
{
|
||||
struct kmod_ctx *ctx;
|
||||
int mod_name_index = 0;
|
||||
int err;
|
||||
|
||||
ctx = kmod_new(TEST_USER_KERNEL_DIR, test_user_config_paths);
|
||||
ctx = kmod_new(TEST_WEAKDEP_KERNEL_DIR, test_weakdep_config_paths);
|
||||
if (ctx == NULL)
|
||||
exit(EXIT_FAILURE);
|
||||
|
||||
@ -83,16 +83,16 @@ static int test_user_weakdep(const struct test *t)
|
||||
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
DEFINE_TEST(test_user_weakdep,
|
||||
.description = "check if modprobe breaks weakdep2",
|
||||
DEFINE_TEST(test_weakdep,
|
||||
.description = "check if modprobe breaks weakdep",
|
||||
.config = {
|
||||
[TC_UNAME_R] = "4.4.4",
|
||||
[TC_ROOTFS] = TESTSUITE_ROOTFS "test-user",
|
||||
[TC_ROOTFS] = TESTSUITE_ROOTFS "test-weakdep",
|
||||
[TC_INIT_MODULE_RETCODES] = "",
|
||||
},
|
||||
.need_spawn = true,
|
||||
.output = {
|
||||
.out = TESTSUITE_ROOTFS "test-user/correct-weakdep.txt",
|
||||
.out = TESTSUITE_ROOTFS "test-weakdep/correct-weakdep.txt",
|
||||
});
|
||||
|
||||
TESTSUITE_MAIN();
|
||||
Loading…
x
Reference in New Issue
Block a user