testsuite: remove cached modules and --disable-test-modules

The option was added for distributions/maintainers lacking the linux
headers, while running the test-suite. It also aimed to resolve
licensing and "source-not-included" issues around the cached modules.

At a glance, it seems like only Debian is using the option these days,
Arch is using "any" linux headers available, while Fedora and Gentoo do
not run `make check` all together.

Debian's linter is complaining about "source-is-missing" and
"source-contains-prebuilt-binary", where the maintainer had to disable
those.

Removing the cache will make ^^ obsolete, while also simplifying the
check target. A nice side effect is making the (compressed) release
tarball 20% smaller.

Distributions are welcome to do something like Arch or not run the
target all together.

We are already running it in CI for Arch, Debian, Fedora and Ubuntu,
where more can be added as needed.

Effectively this reverts commit 23603f1f837caeff45c6960722c2cad690db801d

Lintian overrides:
8d6fc9e90b

Arch reference:
b2d37d2bcc

The autopkgtest's copy of lsmod, ideally should use SPDX license
identifiers like we did in kmod v33.

Autopkgtest lsmod:
11793a49f6

Cc: Marco d'Itri <md@linux.it>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Lucas De Marchi <lucas.de.marchi@gmail.com>
Link: https://github.com/kmod-project/kmod/pull/86
[ Fixup flag being passed in CI ]
Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>
This commit is contained in:
Emil Velikov 2024-08-22 17:04:20 +01:00 committed by Lucas De Marchi
parent 7a3947d8d3
commit fdcb656eff
26 changed files with 2 additions and 27 deletions

View File

@ -17,9 +17,7 @@ runs:
libssl-dev \
libtool \
libzstd-dev \
linux-headers-generic \
scdoc \
zlib1g-dev \
zstd
# not used by default in Debian since it builds with --disable-test-modules
# developers should have it though
# apt-get install linux-headers-generic

View File

@ -29,7 +29,6 @@ jobs:
test: 'no'
- container: 'debian:unstable'
test: 'yes'
configure: '--disable-test-modules'
container:
image: ${{ matrix.container }}

View File

@ -168,14 +168,9 @@ build-module-playground:
$(AM_V_GEN)if test "$(top_srcdir)" != "$(top_builddir)"; then \
$(RM) -rf testsuite/module-playground && \
mkdir -p testsuite/ && \
cp -r $(top_srcdir)/$(MODULE_PLAYGROUND) $(top_builddir)/$(MODULE_PLAYGROUND) && \
find $(top_builddir)/$(MODULE_PLAYGROUND) -type d -exec chmod +w {} \; ; \
cp -r $(top_srcdir)/$(MODULE_PLAYGROUND) $(top_builddir)/$(MODULE_PLAYGROUND); \
fi
if BUILD_MODULES
$(MAKE) -C $(MODULE_PLAYGROUND)
else
$(MAKE) -C $(MODULE_PLAYGROUND) FAKE_BUILD=1
endif
rootfs: build-module-playground
@ -197,7 +192,6 @@ check-am: rootfs
EXTRA_DIST += \
testsuite/module-playground/cache \
testsuite/module-playground/dummy.pkcs7 \
testsuite/module-playground/dummy.sha1 \
testsuite/module-playground/dummy.sha256 \

View File

@ -189,11 +189,6 @@ AS_IF([test "x$enable_manpages" = "xyes"], [
])])
AM_CONDITIONAL([BUILD_MANPAGES], [test "x$enable_manpages" = "xyes"])
AC_ARG_ENABLE([test-modules],
AS_HELP_STRING([--disable-test-modules], [disable building test modules during make check: cached modules will be used @<:@default=enabled@:>@]),
[], enable_test_modules=yes)
AM_CONDITIONAL([BUILD_MODULES], [test "x$enable_test_modules" = "xyes"])
AC_ARG_ENABLE([logging],
AS_HELP_STRING([--disable-logging], [disable system logging @<:@default=enabled@:>@]),
[], enable_logging=yes)
@ -340,7 +335,6 @@ AC_MSG_RESULT([
coverage: ${enable_coverage}
doc: ${enable_gtk_doc}
man: ${enable_manpages}
test-modules: ${enable_test_modules}
features: ${with_features}
])

View File

@ -1,6 +1,5 @@
*.ko
!mod-simple-*.ko
!cache/*.ko
.cache.mk
*.mod.c
.tmp_versions

View File

@ -51,9 +51,6 @@ else
# normal makefile
KDIR ?= $(module_prefix)/lib/modules/`uname -r`/build
KVER ?= `uname -r`
ifeq ($(FAKE_BUILD),)
FAKE_BUILD=0
endif
ARCH_SPECIFIC_MODULES := mod-simple-x86_64.ko mod-simple-i386.ko mod-simple-sparc64.ko
MY_MODULES := $(filter-out $(ARCH_SPECIFIC_MODULES),$(wildcard *.ko))
@ -64,14 +61,8 @@ mod-simple-%.ko: mod-simple-%.c Makefile.arch
$(eval arch=$(patsubst mod-simple-%.ko,%,$@))
$(MAKE) KDIR=$(KDIR_$(arch)) ARCH=$(arch) CROSS_COMPILE=$(CROSS_COMPILE_$(arch)) -f Makefile.arch
ifeq ($(FAKE_BUILD),0)
modules:
$(MAKE) -C $(KDIR) M=$$PWD
else
modules:
@echo " CP cache/*.ko"
@cp cache/*.ko .
endif
arch-modules: $(ARCH_SPECIFIC_MODULES)

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.