]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test: attempt to install only kernel modules for each subsystem
authorFrantisek Sumsal <frantisek@sumsal.cz>
Sun, 8 Aug 2021 11:18:18 +0000 (13:18 +0200)
committerLuca Boccassi <luca.boccassi@gmail.com>
Sun, 8 Aug 2021 15:06:41 +0000 (16:06 +0100)
When `linux-headers` is installed on Arch Linux, it stores the module
source tree in the kernel module directory, which is then picked up by
`find` and we get a lot of harmless but annoying errors:

```
...
modprobe: FATAL: Module Kconfig.iosched not found in directory /lib/modules/5.13.7-arch1-1
modprobe: FATAL: Module Kconfig not found in directory /lib/modules/5.13.7-arch1-1
modprobe: FATAL: Module Kconfig not found in directory /lib/modules/5.13.7-arch1-1
modprobe: FATAL: Module dm-mpath.h not found in directory /lib/modules/5.13.7-arch1-1
modprobe: FATAL: Module dm-bio-prison-v2.h not found in directory /lib/modules/5.13.7-arch1-1
modprobe: FATAL: Module raid0.h not found in directory /lib/modules/5.13.7-arch1-1
...
```

Let's fix this by trying to install only kernel modules (*.ko files with
an optional compression).

test/test-functions

index 410b1699bf610e830d476e90210362b740890288..c049d4b64a558ffdb507f031712f4163c3a0a1bf 100644 (file)
@@ -2343,7 +2343,7 @@ instmods() {
                 else
                     (
                         [[ "$mpargs" ]] && echo "$mpargs"
-                        find "$mod_dir" -path "*/${mod#=}/*" -type f -printf '%f\n'
+                        find "$mod_dir" -path "*/${mod#=}/*" -name "*.ko*" -type f -printf '%f\n'
                     ) | instmods
                 fi
                 ;;