From b558d4279f3c4ebbf1d6efb99c1cd250c0bd439d Mon Sep 17 00:00:00 2001 From: Emil Velikov Date: Mon, 2 Sep 2024 18:58:35 +0100 Subject: [PATCH] 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 --- Makefile.am | 3 --- testsuite/module-playground/.gitignore | 4 ---- testsuite/module-playground/Makefile | 2 +- testsuite/module-playground/mod-simple-i386.ko | Bin 1988 -> 0 bytes .../module-playground/mod-simple-sparc64.ko | Bin 2927 -> 0 bytes testsuite/module-playground/mod-simple-x86_64.ko | Bin 2768 -> 0 bytes .../test-modinfo/correct-author.txt | 2 -- .../test-modinfo/correct-depends.txt | 2 -- .../test-modinfo/correct-filename.txt | 4 +--- .../test-modinfo/correct-license.txt | 4 +--- testsuite/setup-rootfs.sh | 5 ++--- testsuite/test-modinfo.c | 5 ++--- 12 files changed, 7 insertions(+), 24 deletions(-) delete mode 100644 testsuite/module-playground/mod-simple-i386.ko delete mode 100644 testsuite/module-playground/mod-simple-sparc64.ko delete mode 100644 testsuite/module-playground/mod-simple-x86_64.ko 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 9bce6e0aa4e2a76feb9bd244c1dfc6f1af018a26..0000000000000000000000000000000000000000 GIT binary patch literal 0 Hc-jL100001 literal 1988 zc-rk$J8u&~5FR@*5Fn5j70neXlESOA^N@ouM9LdEQ6gfYD8S`%x7e%P!}9H+goXl9 zP(y)~mWGZJQAL6uL5-9jK#v5oce}}XaZr?+k@jZ3y>DlBc4z11LTxdZ%Yl*{^uQ?s z@CvD(Oul1q6RtxqS|d1ma4fCWVQb?@?cMQWbujm7YrFL8FyHtxrPkNq96$M5FC7Wx zF^2{bt=5*-YhcH`8Mdpn*s&vHo*Jum+i5c6t|umlOZ^1TvVc>MIH7+JT-u_68&%;s zZTohEIn@bLnjxm~aCP1AL)VG}FSK1_x-xCRMMU_BnBVfK#U?7#@Lw({OLKE~j4>>Y zabuFqkg`!WOH*dqoHWK-ZQ7Sr5+3R!oZ<~H(6vMDfTFk-6#T4cs>od zjDtHZM%;Gx{+)j33lcc5;T{e5YPg``OB%kc;XVyt)$p~B9reP`-^0=tp7O{TmAH`L zJg5iUpY((RJdk!-;-{KFj`}{1KKcJO>SY|G5+6$LCT?U9qkhc98^U;>Gy545=Y!W! zOdn%WJVxRGrxBO8V~IQNn4tSOVOjOHm5us>wK8wXW>e~zOq-7Rmvh7zz*5d+r|DR# znvRLH**bBsNQ1bgpxBtQk3{ab0BV?XZsh#W=l03Hoc7+)j`L1sA~{<)sg50ao=OI! zCK``Q|EE1al^KoaY5P*VWohR#Jg*CHL)xm^zn|f6TjL3^nJL&=sUOMuQuuKp&9PtR zBhKXtj#z5tZ!_OL?h9#~8Q!|a6XR88jgSv#_#4dTAbD@Q@Umwoq=JifaPkJ)!!nNn OnQPYHd;IaOi@!e|_Th~H diff --git a/testsuite/module-playground/mod-simple-sparc64.ko b/testsuite/module-playground/mod-simple-sparc64.ko deleted file mode 100644 index 17242c83728dc6ab5e9d7ef61d937d798d584925..0000000000000000000000000000000000000000 GIT binary patch literal 0 Hc-jL100001 literal 2927 zc-rk&Piqu06wmC`-EFmMi&Q~`5i3^ehN-))t+=vwyH;VhR7yecFidA+cj)|CXEIuQ zQBS=VKY`-KqxcmB@#aOuqu>V+Z{9T7&9v!kGWOs}47^F+FZt!=y?Ocbq|v;Y%PC;D zC}6Vt6_$Y_`Q$*YtJJ_TaD;+HP7qNSmsY{{!p`T3?dID_G`93{?)=uhFE7u6jPmT= z*CI8hw?STEhIyg=JI6KPIu`OHRBbLUH-Q=Bb`VyZv1LZu0@7M$Xtf>fno9v_Bd@F1 z93LYWT7h>RfGD&cqA+p-zdBo~PnXLx4PDpk(>E&hso5)y>G?`;JvQnf-;Sz)jP}fR z$Eud$)Ev~cmDaN61-23UZeZH9$>xi+EdMAaa=ea-DSJ1lbA~ zwF)GOBSK*G*u&-;sd3n=+eyn0FoNrT4A)}EwM&i-pyN9jVzh|?B-!Nn_XA)UN%8?` zo7e;}M6TK8xsJaP_!fe=?L-D4#4ZAGEg~byPVkVAnGv#}QiM%w<8OI>nn;1QbE&=> ztH;v^3fC@k=T1H~?kTI&dyUs&2LA=Ciy8LkIDUHluT%2?!F=;_zH&L> zfc=sFb@%aiGWd!hZ<6@^WbyBi&ru>{g7^)}?GLq?i9&{bs!p)EQu{=q_D>4-kJwvD z994;bs$|`&B%cU=NP_1jctL^>O7I~Gepr+P1K`&W0X~-N_ly3o3%UL{P<&SD_m}RK z7KabB`Z5tyVt0!hpPZZLh&<z>t4fdd{o87S)x*s7sTT%oC z@shLN{R{jLJSZagXLzxmJ$ewG-ORX~?GB0HO&`2{^M1^m_c3qYK3l8bQ8F1ICiPP<-LiW?cVqJIgMKH%fknyajV)-qrsg}AtD6w~IR(}pvD+5bx;GZJ#Rc%6{z>lZ!$?cec2K#$E6tUIzDRp#4-!S z1c*3te>eW;_|I59Fb} zVSFwn&bJ|cG_PO)7WxCQ&>w)v02F(ax0Dui<^X`Z4A8X3=K6MHO~T4MTc|;3Vm+IQ?sYo;KT{%n>MxFq3ykw&PYhCp z%S#D7`6A|dOv%n~C+_Wc9tj;u?Dv!R8|(KtElKR3O7czG*Eps~>{~g%aAcrIR ze;~0J8=;bZFM{s#J4xc7c|p|Jd(Ow|ITNe%Sc-p`9WDMR98)FsTM~OAU! 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) \ -- 2.47.3