From: Emil Velikov Date: Mon, 2 Sep 2024 17:58:35 +0000 (+0100) Subject: testsuite: temporary drop cross compilation test, remove binaries X-Git-Tag: v34~475 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b558d4279f3c4ebbf1d6efb99c1cd250c0bd439d;p=thirdparty%2Fkmod.git testsuite: temporary drop cross compilation test, remove binaries The idea behind the test is that modinfo should work with foreign modules - be that CPU architecture, endianess, bit width or otherwise. On the other hand, having binary modules baked into the repo isn't great since they can may be outdated wrt their in-tree source code, may trigger warnings by various tools (the Debian linter flags them as "source-not-available") and in general it's better if they're actually generated via the in-tree Makefile.arch file. Remove the binaries and temporarily drop the tests. We'll add proper cross-compilation and re-enable them at a later stage. Signed-off-by: Emil Velikov Link: https://github.com/kmod-project/kmod/pull/86 Signed-off-by: Lucas De Marchi --- diff --git a/Makefile.am b/Makefile.am index 5cd2f7fd..0508f6ea 100644 --- a/Makefile.am +++ b/Makefile.am @@ -223,9 +223,6 @@ EXTRA_DIST += \ testsuite/module-playground/mod-loop-k.c \ testsuite/module-playground/mod-loop.h \ testsuite/module-playground/mod-simple.c \ - testsuite/module-playground/mod-simple-i386.ko \ - testsuite/module-playground/mod-simple-sparc64.ko \ - testsuite/module-playground/mod-simple-x86_64.ko \ testsuite/module-playground/mod-weakdep.c \ testsuite/module-playground/README diff --git a/testsuite/module-playground/.gitignore b/testsuite/module-playground/.gitignore index 98d47843..e4d99cf7 100644 --- a/testsuite/module-playground/.gitignore +++ b/testsuite/module-playground/.gitignore @@ -1,5 +1,4 @@ *.ko -!mod-simple-*.ko .cache.mk *.mod.c .tmp_versions @@ -10,6 +9,3 @@ modules.order Module.symvers -mod-simple-x86_64.c -mod-simple-i386.c -mod-simple-sparc64.c diff --git a/testsuite/module-playground/Makefile b/testsuite/module-playground/Makefile index c0454fd2..160307cb 100644 --- a/testsuite/module-playground/Makefile +++ b/testsuite/module-playground/Makefile @@ -54,7 +54,7 @@ KDIR ?= $(module_prefix)/lib/modules/`uname -r`/build 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)) -default: modules arch-modules +default: modules mod-simple-%.ko: mod-simple-%.c Makefile.arch $(eval arch=$(patsubst mod-simple-%.ko,%,$@)) diff --git a/testsuite/module-playground/mod-simple-i386.ko b/testsuite/module-playground/mod-simple-i386.ko deleted file mode 100644 index 9bce6e0a..00000000 Binary files a/testsuite/module-playground/mod-simple-i386.ko and /dev/null differ diff --git a/testsuite/module-playground/mod-simple-sparc64.ko b/testsuite/module-playground/mod-simple-sparc64.ko deleted file mode 100644 index 17242c83..00000000 Binary files a/testsuite/module-playground/mod-simple-sparc64.ko and /dev/null differ diff --git a/testsuite/module-playground/mod-simple-x86_64.ko b/testsuite/module-playground/mod-simple-x86_64.ko deleted file mode 100644 index 0159b99b..00000000 Binary files a/testsuite/module-playground/mod-simple-x86_64.ko and /dev/null differ diff --git a/testsuite/rootfs-pristine/test-modinfo/correct-author.txt b/testsuite/rootfs-pristine/test-modinfo/correct-author.txt index b74c9bf5..24f14143 100644 --- a/testsuite/rootfs-pristine/test-modinfo/correct-author.txt +++ b/testsuite/rootfs-pristine/test-modinfo/correct-author.txt @@ -1,3 +1 @@ Lucas De Marchi -Lucas De Marchi -Lucas De Marchi diff --git a/testsuite/rootfs-pristine/test-modinfo/correct-depends.txt b/testsuite/rootfs-pristine/test-modinfo/correct-depends.txt index b28b04f6..8b137891 100644 --- a/testsuite/rootfs-pristine/test-modinfo/correct-depends.txt +++ b/testsuite/rootfs-pristine/test-modinfo/correct-depends.txt @@ -1,3 +1 @@ - - diff --git a/testsuite/rootfs-pristine/test-modinfo/correct-filename.txt b/testsuite/rootfs-pristine/test-modinfo/correct-filename.txt index bcd47c04..fe68a0cc 100644 --- a/testsuite/rootfs-pristine/test-modinfo/correct-filename.txt +++ b/testsuite/rootfs-pristine/test-modinfo/correct-filename.txt @@ -1,3 +1 @@ -/mod-simple-i386.ko -/mod-simple-x86_64.ko -/mod-simple-sparc64.ko +/mod-simple.ko diff --git a/testsuite/rootfs-pristine/test-modinfo/correct-license.txt b/testsuite/rootfs-pristine/test-modinfo/correct-license.txt index f79931d6..3faea228 100644 --- a/testsuite/rootfs-pristine/test-modinfo/correct-license.txt +++ b/testsuite/rootfs-pristine/test-modinfo/correct-license.txt @@ -1,4 +1,2 @@ -LGPL -LGPL -LGPL +GPL diff --git a/testsuite/setup-rootfs.sh b/testsuite/setup-rootfs.sh index f9c2bbe7..bd36d9ca 100755 --- a/testsuite/setup-rootfs.sh +++ b/testsuite/setup-rootfs.sh @@ -102,9 +102,8 @@ map=( ["test-depmod/modules-outdir$MODULE_DIRECTORY/4.4.4/kernel/drivers/block/cciss.ko"]="mod-fake-cciss.ko" ["test-depmod/modules-outdir$MODULE_DIRECTORY/4.4.4/kernel/drivers/scsi/hpsa.ko"]="mod-fake-hpsa.ko" ["test-depmod/modules-outdir$MODULE_DIRECTORY/4.4.4/kernel/drivers/scsi/scsi_mod.ko"]="mod-fake-scsi-mod.ko" - ["test-modinfo/mod-simple-i386.ko"]="mod-simple-i386.ko" - ["test-modinfo/mod-simple-x86_64.ko"]="mod-simple-x86_64.ko" - ["test-modinfo/mod-simple-sparc64.ko"]="mod-simple-sparc64.ko" + # TODO: add cross-compiled modules to the test + ["test-modinfo/mod-simple.ko"]="mod-simple.ko" ["test-modinfo/mod-simple-sha1.ko"]="mod-simple.ko" ["test-modinfo/mod-simple-sha256.ko"]="mod-simple.ko" ["test-modinfo/mod-simple-pkcs7.ko"]="mod-simple.ko" diff --git a/testsuite/test-modinfo.c b/testsuite/test-modinfo.c index ab161ec4..8b7c050e 100644 --- a/testsuite/test-modinfo.c +++ b/testsuite/test-modinfo.c @@ -35,11 +35,10 @@ DEFINE_TEST(test_modinfo_##_field, \ .out = TESTSUITE_ROOTFS "test-modinfo/correct-" #_field #_flavor ".txt", \ }) +/* TODO: add cross-compiled modules to the test */ #define DEFINE_MODINFO_GENERIC_TEST(_field) \ DEFINE_MODINFO_TEST(_field, , \ - "/mod-simple-i386.ko", \ - "/mod-simple-x86_64.ko", \ - "/mod-simple-sparc64.ko") + "/mod-simple.ko") #ifdef ENABLE_OPENSSL #define DEFINE_MODINFO_SIGN_TEST(_field) \