]> git.ipfire.org Git - thirdparty/kmod.git/commitdiff
testsuite: remove cached modules and --disable-test-modules
authorEmil Velikov <emil.l.velikov@gmail.com>
Thu, 22 Aug 2024 16:04:20 +0000 (17:04 +0100)
committerLucas De Marchi <lucas.de.marchi@gmail.com>
Fri, 23 Aug 2024 18:51:19 +0000 (13:51 -0500)
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 <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>
26 files changed:
.github/actions/setup-debian/action.yml
.github/workflows/main.yml
Makefile.am
configure.ac
testsuite/module-playground/.gitignore
testsuite/module-playground/Makefile
testsuite/module-playground/cache/mod-fake-cciss.ko [deleted file]
testsuite/module-playground/cache/mod-fake-hpsa.ko [deleted file]
testsuite/module-playground/cache/mod-fake-scsi-mod.ko [deleted file]
testsuite/module-playground/cache/mod-foo-a.ko [deleted file]
testsuite/module-playground/cache/mod-foo-b.ko [deleted file]
testsuite/module-playground/cache/mod-foo-c.ko [deleted file]
testsuite/module-playground/cache/mod-foo.ko [deleted file]
testsuite/module-playground/cache/mod-loop-a.ko [deleted file]
testsuite/module-playground/cache/mod-loop-b.ko [deleted file]
testsuite/module-playground/cache/mod-loop-c.ko [deleted file]
testsuite/module-playground/cache/mod-loop-d.ko [deleted file]
testsuite/module-playground/cache/mod-loop-e.ko [deleted file]
testsuite/module-playground/cache/mod-loop-f.ko [deleted file]
testsuite/module-playground/cache/mod-loop-g.ko [deleted file]
testsuite/module-playground/cache/mod-loop-h.ko [deleted file]
testsuite/module-playground/cache/mod-loop-i.ko [deleted file]
testsuite/module-playground/cache/mod-loop-j.ko [deleted file]
testsuite/module-playground/cache/mod-loop-k.ko [deleted file]
testsuite/module-playground/cache/mod-simple.ko [deleted file]
testsuite/module-playground/cache/mod-weakdep.ko [deleted file]

index 7fd333c93203ed576575b083aa063e6b225e37dd..a0c45803e20d5b31ac41f883eb10a2f963e750bd 100644 (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
index 11f693d9a03c3e69370919f7524895ce633b40c6..0a07ef94064488206f43194324ce4745f88eb1b4 100644 (file)
@@ -29,7 +29,6 @@ jobs:
             test: 'no'
           - container: 'debian:unstable'
             test: 'yes'
-            configure: '--disable-test-modules'
 
     container:
       image: ${{ matrix.container }}
index c76b90d67cb7a6fa9a92953e51d0b7bfa081fa66..51e9724b15309ab5ce6acbc368ce691b0069552d 100644 (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 \
index ec99cf4f7878eea4be1b7ea2370b6f67d05990dc..844350a8af012f6aefe35b786bc55e7dba78b5f6 100644 (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}
 ])
index 6d9c7b13d1f318da1ff1c232b7ba707a9f953776..98d47843cc9de63d60d4aefa4737785fb4c2d065 100644 (file)
@@ -1,6 +1,5 @@
 *.ko
 !mod-simple-*.ko
-!cache/*.ko
 .cache.mk
 *.mod.c
 .tmp_versions
index 42c750b30bd83dfb9f81bdec86a70fae3532202a..0b0b5f31ed4849df9d85a294b80429ce7d5370cd 100644 (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)
 
diff --git a/testsuite/module-playground/cache/mod-fake-cciss.ko b/testsuite/module-playground/cache/mod-fake-cciss.ko
deleted file mode 100644 (file)
index f61409a..0000000
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 (file)
index 3d33ba7..0000000
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 (file)
index c0eb974..0000000
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 (file)
index f2d406e..0000000
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 (file)
index 53bf3a9..0000000
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 (file)
index 083e801..0000000
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 (file)
index 0961478..0000000
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 (file)
index 51533d8..0000000
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 (file)
index 5e20348..0000000
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 (file)
index 6a02b04..0000000
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 (file)
index 3ab3348..0000000
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 (file)
index efe93ff..0000000
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 (file)
index c0e15cb..0000000
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 (file)
index 46f3c43..0000000
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 (file)
index cbd81e5..0000000
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 (file)
index 045bc4f..0000000
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 (file)
index 067aa4b..0000000
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 (file)
index 2cc16d1..0000000
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 (file)
index 2c5ffcf..0000000
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 (file)
index 9ced8dc..0000000
Binary files a/testsuite/module-playground/cache/mod-weakdep.ko and /dev/null differ