From: Emil Velikov Date: Thu, 22 Aug 2024 16:04:20 +0000 (+0100) Subject: testsuite: remove cached modules and --disable-test-modules X-Git-Tag: v34~490 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=fdcb656eff9abb8b022a3ba3f5dc9efeff568ac4;p=thirdparty%2Fkmod.git 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: https://salsa.debian.org/md/kmod/-/commit/8d6fc9e90b12fe88476c6c8f53ae25f9a0d5d634 Arch reference: https://gitlab.archlinux.org/archlinux/packaging/packages/kmod/-/commit/b2d37d2bcc0ca2ef6187ce115ef8da105019d49f The autopkgtest's copy of lsmod, ideally should use SPDX license identifiers like we did in kmod v33. Autopkgtest lsmod: https://salsa.debian.org/md/kmod/-/commit/11793a49f6b65af8c442397a845e8b65008d0630 Cc: Marco d'Itri Signed-off-by: Emil Velikov Reviewed-by: Lucas De Marchi Link: https://github.com/kmod-project/kmod/pull/86 [ Fixup flag being passed in CI ] Signed-off-by: Lucas De Marchi --- diff --git a/.github/actions/setup-debian/action.yml b/.github/actions/setup-debian/action.yml index 7fd333c9..a0c45803 100644 --- a/.github/actions/setup-debian/action.yml +++ b/.github/actions/setup-debian/action.yml @@ -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 diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 11f693d9..0a07ef94 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -29,7 +29,6 @@ jobs: test: 'no' - container: 'debian:unstable' test: 'yes' - configure: '--disable-test-modules' container: image: ${{ matrix.container }} diff --git a/Makefile.am b/Makefile.am index c76b90d6..51e9724b 100644 --- a/Makefile.am +++ b/Makefile.am @@ -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 \ diff --git a/configure.ac b/configure.ac index ec99cf4f..844350a8 100644 --- a/configure.ac +++ b/configure.ac @@ -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} ]) diff --git a/testsuite/module-playground/.gitignore b/testsuite/module-playground/.gitignore index 6d9c7b13..98d47843 100644 --- a/testsuite/module-playground/.gitignore +++ b/testsuite/module-playground/.gitignore @@ -1,6 +1,5 @@ *.ko !mod-simple-*.ko -!cache/*.ko .cache.mk *.mod.c .tmp_versions diff --git a/testsuite/module-playground/Makefile b/testsuite/module-playground/Makefile index 42c750b3..0b0b5f31 100644 --- a/testsuite/module-playground/Makefile +++ b/testsuite/module-playground/Makefile @@ -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) diff --git a/testsuite/module-playground/cache/mod-fake-cciss.ko b/testsuite/module-playground/cache/mod-fake-cciss.ko deleted file mode 100644 index f61409ac..00000000 Binary files a/testsuite/module-playground/cache/mod-fake-cciss.ko and /dev/null differ diff --git a/testsuite/module-playground/cache/mod-fake-hpsa.ko b/testsuite/module-playground/cache/mod-fake-hpsa.ko deleted file mode 100644 index 3d33ba76..00000000 Binary files a/testsuite/module-playground/cache/mod-fake-hpsa.ko and /dev/null differ diff --git a/testsuite/module-playground/cache/mod-fake-scsi-mod.ko b/testsuite/module-playground/cache/mod-fake-scsi-mod.ko deleted file mode 100644 index c0eb9741..00000000 Binary files a/testsuite/module-playground/cache/mod-fake-scsi-mod.ko and /dev/null differ diff --git a/testsuite/module-playground/cache/mod-foo-a.ko b/testsuite/module-playground/cache/mod-foo-a.ko deleted file mode 100644 index f2d406e1..00000000 Binary files a/testsuite/module-playground/cache/mod-foo-a.ko and /dev/null differ diff --git a/testsuite/module-playground/cache/mod-foo-b.ko b/testsuite/module-playground/cache/mod-foo-b.ko deleted file mode 100644 index 53bf3a91..00000000 Binary files a/testsuite/module-playground/cache/mod-foo-b.ko and /dev/null differ diff --git a/testsuite/module-playground/cache/mod-foo-c.ko b/testsuite/module-playground/cache/mod-foo-c.ko deleted file mode 100644 index 083e801a..00000000 Binary files a/testsuite/module-playground/cache/mod-foo-c.ko and /dev/null differ diff --git a/testsuite/module-playground/cache/mod-foo.ko b/testsuite/module-playground/cache/mod-foo.ko deleted file mode 100644 index 09614782..00000000 Binary files a/testsuite/module-playground/cache/mod-foo.ko and /dev/null differ diff --git a/testsuite/module-playground/cache/mod-loop-a.ko b/testsuite/module-playground/cache/mod-loop-a.ko deleted file mode 100644 index 51533d83..00000000 Binary files a/testsuite/module-playground/cache/mod-loop-a.ko and /dev/null differ diff --git a/testsuite/module-playground/cache/mod-loop-b.ko b/testsuite/module-playground/cache/mod-loop-b.ko deleted file mode 100644 index 5e203489..00000000 Binary files a/testsuite/module-playground/cache/mod-loop-b.ko and /dev/null differ diff --git a/testsuite/module-playground/cache/mod-loop-c.ko b/testsuite/module-playground/cache/mod-loop-c.ko deleted file mode 100644 index 6a02b04f..00000000 Binary files a/testsuite/module-playground/cache/mod-loop-c.ko and /dev/null differ diff --git a/testsuite/module-playground/cache/mod-loop-d.ko b/testsuite/module-playground/cache/mod-loop-d.ko deleted file mode 100644 index 3ab33480..00000000 Binary files a/testsuite/module-playground/cache/mod-loop-d.ko and /dev/null differ diff --git a/testsuite/module-playground/cache/mod-loop-e.ko b/testsuite/module-playground/cache/mod-loop-e.ko deleted file mode 100644 index efe93ff0..00000000 Binary files a/testsuite/module-playground/cache/mod-loop-e.ko and /dev/null differ diff --git a/testsuite/module-playground/cache/mod-loop-f.ko b/testsuite/module-playground/cache/mod-loop-f.ko deleted file mode 100644 index c0e15cbe..00000000 Binary files a/testsuite/module-playground/cache/mod-loop-f.ko and /dev/null differ diff --git a/testsuite/module-playground/cache/mod-loop-g.ko b/testsuite/module-playground/cache/mod-loop-g.ko deleted file mode 100644 index 46f3c433..00000000 Binary files a/testsuite/module-playground/cache/mod-loop-g.ko and /dev/null differ diff --git a/testsuite/module-playground/cache/mod-loop-h.ko b/testsuite/module-playground/cache/mod-loop-h.ko deleted file mode 100644 index cbd81e59..00000000 Binary files a/testsuite/module-playground/cache/mod-loop-h.ko and /dev/null differ diff --git a/testsuite/module-playground/cache/mod-loop-i.ko b/testsuite/module-playground/cache/mod-loop-i.ko deleted file mode 100644 index 045bc4f5..00000000 Binary files a/testsuite/module-playground/cache/mod-loop-i.ko and /dev/null differ diff --git a/testsuite/module-playground/cache/mod-loop-j.ko b/testsuite/module-playground/cache/mod-loop-j.ko deleted file mode 100644 index 067aa4b9..00000000 Binary files a/testsuite/module-playground/cache/mod-loop-j.ko and /dev/null differ diff --git a/testsuite/module-playground/cache/mod-loop-k.ko b/testsuite/module-playground/cache/mod-loop-k.ko deleted file mode 100644 index 2cc16d1f..00000000 Binary files a/testsuite/module-playground/cache/mod-loop-k.ko and /dev/null differ diff --git a/testsuite/module-playground/cache/mod-simple.ko b/testsuite/module-playground/cache/mod-simple.ko deleted file mode 100644 index 2c5ffcfa..00000000 Binary files a/testsuite/module-playground/cache/mod-simple.ko and /dev/null differ diff --git a/testsuite/module-playground/cache/mod-weakdep.ko b/testsuite/module-playground/cache/mod-weakdep.ko deleted file mode 100644 index 9ced8dc0..00000000 Binary files a/testsuite/module-playground/cache/mod-weakdep.ko and /dev/null differ