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:
Lucas De Marchi 2024-08-15 23:17:11 -05:00
parent 0c2bd66e6b
commit 633c9ff6c7
17 changed files with 20 additions and 20 deletions

View File

@ -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)

View File

@ -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

View File

@ -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=(

View File

@ -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();