mirror of
https://github.com/AuxXxilium/kmod.git
synced 2025-02-21 17:07:18 +07:00
testsuite: Automatically skip tests that fail when sysconfdir != /etc.
This commit is contained in:
parent
b5683f45d9
commit
847247a4a8
12
Makefile.am
12
Makefile.am
@ -280,13 +280,7 @@ TESTSUITE_OVERRIDE_LIBS = \
|
|||||||
TESTSUITE_OVERRIDE_LIBS_LDFLAGS = \
|
TESTSUITE_OVERRIDE_LIBS_LDFLAGS = \
|
||||||
avoid-version -module -shared -export-dynamic -rpath /nowhere -ldl
|
avoid-version -module -shared -export-dynamic -rpath /nowhere -ldl
|
||||||
|
|
||||||
check-sysconfdir:
|
check-am: rootfs
|
||||||
$(AM_V_at)if test "$(sysconfdir)" != "/etc" -a "$(sysconfdir)" != "/etc/"; then \
|
|
||||||
echo "warning: Some tests will fail without --sysconfdir=/etc" >&2; \
|
|
||||||
fi
|
|
||||||
.PHONY: check-sysconfdir
|
|
||||||
|
|
||||||
check-am: rootfs check-sysconfdir
|
|
||||||
|
|
||||||
|
|
||||||
EXTRA_DIST += \
|
EXTRA_DIST += \
|
||||||
@ -341,6 +335,10 @@ TESTSUITE_LDADD = \
|
|||||||
testsuite/libtestsuite.la libkmod/libkmod-internal.la \
|
testsuite/libtestsuite.la libkmod/libkmod-internal.la \
|
||||||
shared/libshared.la
|
shared/libshared.la
|
||||||
|
|
||||||
|
if KMOD_SYSCONFDIR_NOT_ETC
|
||||||
|
TESTSUITE_CPPFLAGS += -DKMOD_SYSCONFDIR_NOT_ETC
|
||||||
|
endif
|
||||||
|
|
||||||
check_LTLIBRARIES += testsuite/libtestsuite.la
|
check_LTLIBRARIES += testsuite/libtestsuite.la
|
||||||
testsuite_libtestsuite_la_SOURCES = \
|
testsuite_libtestsuite_la_SOURCES = \
|
||||||
testsuite/testsuite.c testsuite/testsuite.h
|
testsuite/testsuite.c testsuite/testsuite.h
|
||||||
|
@ -224,6 +224,8 @@ GTK_DOC_CHECK([1.14],[--flavour no-tmpl-flat])
|
|||||||
], [
|
], [
|
||||||
AM_CONDITIONAL([ENABLE_GTK_DOC], false)])
|
AM_CONDITIONAL([ENABLE_GTK_DOC], false)])
|
||||||
|
|
||||||
|
# Some tests are skipped when sysconfdir != /etc.
|
||||||
|
AM_CONDITIONAL([KMOD_SYSCONFDIR_NOT_ETC], [test "x$sysconfdir" != "x/etc"])
|
||||||
|
|
||||||
#####################################################################
|
#####################################################################
|
||||||
# Default CFLAGS and LDFLAGS
|
# Default CFLAGS and LDFLAGS
|
||||||
|
@ -95,6 +95,9 @@ fail_lookup:
|
|||||||
}
|
}
|
||||||
|
|
||||||
DEFINE_TEST(blacklist_1,
|
DEFINE_TEST(blacklist_1,
|
||||||
|
#if defined(KMOD_SYSCONFDIR_NOT_ETC)
|
||||||
|
.skip = true,
|
||||||
|
#endif
|
||||||
.description = "check if modules are correctly blacklisted",
|
.description = "check if modules are correctly blacklisted",
|
||||||
.config = {
|
.config = {
|
||||||
[TC_ROOTFS] = TESTSUITE_ROOTFS "test-blacklist/",
|
[TC_ROOTFS] = TESTSUITE_ROOTFS "test-blacklist/",
|
||||||
|
@ -42,6 +42,9 @@ static noreturn int depmod_modules_order_for_compressed(const struct test *t)
|
|||||||
}
|
}
|
||||||
|
|
||||||
DEFINE_TEST(depmod_modules_order_for_compressed,
|
DEFINE_TEST(depmod_modules_order_for_compressed,
|
||||||
|
#if defined(KMOD_SYSCONFDIR_NOT_ETC)
|
||||||
|
.skip = true,
|
||||||
|
#endif
|
||||||
.description = "check if depmod let aliases in right order when using compressed modules",
|
.description = "check if depmod let aliases in right order when using compressed modules",
|
||||||
.config = {
|
.config = {
|
||||||
[TC_UNAME_R] = MODULES_ORDER_UNAME,
|
[TC_UNAME_R] = MODULES_ORDER_UNAME,
|
||||||
@ -121,6 +124,9 @@ static noreturn int depmod_detect_loop(const struct test *t)
|
|||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
DEFINE_TEST(depmod_detect_loop,
|
DEFINE_TEST(depmod_detect_loop,
|
||||||
|
#if defined(KMOD_SYSCONFDIR_NOT_ETC)
|
||||||
|
.skip = true,
|
||||||
|
#endif
|
||||||
.description = "check if depmod detects module loops correctly",
|
.description = "check if depmod detects module loops correctly",
|
||||||
.config = {
|
.config = {
|
||||||
[TC_UNAME_R] = "4.4.4",
|
[TC_UNAME_R] = "4.4.4",
|
||||||
@ -144,6 +150,9 @@ static noreturn int depmod_search_order_external_first(const struct test *t)
|
|||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
DEFINE_TEST(depmod_search_order_external_first,
|
DEFINE_TEST(depmod_search_order_external_first,
|
||||||
|
#if defined(KMOD_SYSCONFDIR_NOT_ETC)
|
||||||
|
.skip = true,
|
||||||
|
#endif
|
||||||
.description = "check if depmod honor external keyword with higher priority",
|
.description = "check if depmod honor external keyword with higher priority",
|
||||||
.config = {
|
.config = {
|
||||||
[TC_UNAME_R] = "4.4.4",
|
[TC_UNAME_R] = "4.4.4",
|
||||||
@ -196,6 +205,9 @@ static noreturn int depmod_search_order_override(const struct test *t)
|
|||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
DEFINE_TEST(depmod_search_order_override,
|
DEFINE_TEST(depmod_search_order_override,
|
||||||
|
#if defined(KMOD_SYSCONFDIR_NOT_ETC)
|
||||||
|
.skip = true,
|
||||||
|
#endif
|
||||||
.description = "check if depmod honor override keyword",
|
.description = "check if depmod honor override keyword",
|
||||||
.config = {
|
.config = {
|
||||||
[TC_UNAME_R] = "4.4.4",
|
[TC_UNAME_R] = "4.4.4",
|
||||||
|
@ -83,6 +83,9 @@ static noreturn int modprobe_show_alias_to_none(const struct test *t)
|
|||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
DEFINE_TEST(modprobe_show_alias_to_none,
|
DEFINE_TEST(modprobe_show_alias_to_none,
|
||||||
|
#if defined(KMOD_SYSCONFDIR_NOT_ETC)
|
||||||
|
.skip = true,
|
||||||
|
#endif
|
||||||
.description = "check if modprobe --show-depends doesn't explode with an alias to nothing",
|
.description = "check if modprobe --show-depends doesn't explode with an alias to nothing",
|
||||||
.config = {
|
.config = {
|
||||||
[TC_UNAME_R] = "4.4.4",
|
[TC_UNAME_R] = "4.4.4",
|
||||||
@ -172,6 +175,9 @@ static noreturn int modprobe_softdep_loop(const struct test *t)
|
|||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
DEFINE_TEST(modprobe_softdep_loop,
|
DEFINE_TEST(modprobe_softdep_loop,
|
||||||
|
#if defined(KMOD_SYSCONFDIR_NOT_ETC)
|
||||||
|
.skip = true,
|
||||||
|
#endif
|
||||||
.description = "check if modprobe breaks softdep loop",
|
.description = "check if modprobe breaks softdep loop",
|
||||||
.config = {
|
.config = {
|
||||||
[TC_UNAME_R] = "4.4.4",
|
[TC_UNAME_R] = "4.4.4",
|
||||||
|
Loading…
Reference in New Issue
Block a user