make check fails in clean chroot
Using mkinitcpio-git:
==> Starting check()...
LC_ALL=C bats --jobs 32 test/cases/
1..42
ok 1 _detect_kver
ok 2 check for syntax errors
ok 3 detect_compression bzip2
ok 4 detect_compression cat
ok 5 detect_compression gzip
ok 6 detect_compression lz4
ok 7 detect_compression lz4 (legacy)
ok 8 detect_compression lzma
ok 9 detect_compression lzop
ok 10 detect_compression xz
ok 11 detect_compression zstd
ok 12 detect_compression zimg
ok 13 detect_compression with offset
ok 14 kver_x86
ok 15 kver_zimage gzip
ok 16 kver_zimage lz4
ok 17 kver_zimage lzma
ok 18 kver_zimage lzo
ok 19 kver_zimage xz
ok 20 kver_zimage zstd
ok 21 initialize_buildroot success
ok 22 initialize_buildroot unwriteable parent directory
ok 23 initialize_buildroot unwriteable working directory
ok 24 add_file parent directory is a symlink
ok 25 add_binary script
ok 26 add_full_dir
ok 27 add_full_dir glob
ok 28 find_module_from_symbol # skip No kernel modules available
ok 29 test reproducible builds for initramfs # skip No kernel modules available
ok 30 test reproducible builds for uki # skip No kernel modules available
ok 31 test creating UKI with no cmdline # skip No kernel modules available
ok 32 test early cpio creation # skip No kernel modules available
not ok 33 image creation zstd
# (from function `__gen_test_initcpio' in file test/cases/../helpers/common.bash, line 118,
# in test file test/cases/mkinitcpio.bats, line 101)
# `__gen_test_initcpio zstd' failed
# ==> ERROR: '/lib/modules/6.7.3-arch1-2' is not a valid kernel module directory
not ok 34 image creation gzip
# (from function `__gen_test_initcpio' in file test/cases/../helpers/common.bash, line 118,
# in test file test/cases/mkinitcpio.bats, line 105)
# `__gen_test_initcpio gzip' failed
# ==> ERROR: '/lib/modules/6.7.3-arch1-2' is not a valid kernel module directory
not ok 35 image creation bzip2
# (from function `__gen_test_initcpio' in file test/cases/../helpers/common.bash, line 118,
# in test file test/cases/mkinitcpio.bats, line 109)
# `__gen_test_initcpio bzip2' failed
# ==> ERROR: '/lib/modules/6.7.3-arch1-2' is not a valid kernel module directory
not ok 36 image creation lzma
# (from function `__gen_test_initcpio' in file test/cases/../helpers/common.bash, line 118,
# in test file test/cases/mkinitcpio.bats, line 113)
# `__gen_test_initcpio lzma' failed
# ==> ERROR: '/lib/modules/6.7.3-arch1-2' is not a valid kernel module directory
not ok 37 image creation xz
# (from function `__gen_test_initcpio' in file test/cases/../helpers/common.bash, line 118,
# in test file test/cases/mkinitcpio.bats, line 117)
# `__gen_test_initcpio xz' failed
# ==> ERROR: '/lib/modules/6.7.3-arch1-2' is not a valid kernel module directory
not ok 38 image creation lzop
# (from function `__gen_test_initcpio' in file test/cases/../helpers/common.bash, line 118,
# in test file test/cases/mkinitcpio.bats, line 121)
# `__gen_test_initcpio lzop' failed
# ==> ERROR: '/lib/modules/6.7.3-arch1-2' is not a valid kernel module directory
not ok 39 image creation lz4
# (from function `__gen_test_initcpio' in file test/cases/../helpers/common.bash, line 118,
# in test file test/cases/mkinitcpio.bats, line 125)
# `__gen_test_initcpio lz4' failed
# ==> ERROR: '/lib/modules/6.7.3-arch1-2' is not a valid kernel module directory
not ok 40 image creation uncompressed
# (from function `__gen_test_initcpio' in file test/cases/../helpers/common.bash, line 118,
# in test file test/cases/mkinitcpio.bats, line 129)
# `__gen_test_initcpio cat' failed
# ==> ERROR: '/lib/modules/6.7.3-arch1-2' is not a valid kernel module directory
ok 41 parse_cmdline
ok 42 _detect_kver
make: *** [Makefile:96: check] Error 1
==> ERROR: A failure occurred in check().
Aborting...
image creation*
tests are tried even if the kernel module directory is missing. They should instead be skipped using:
if [[ ! -d "/lib/modules/$(uname -r)/" ]]; then
skip "No kernel modules available"
fi