]> git.ipfire.org Git - thirdparty/systemd.git/commit
TEST-67-INTEGRITY: pre-load crypto modules and skip unsupported algorithms
authorLuca Boccassi <bluca@debian.org>
Mon, 11 May 2026 11:58:13 +0000 (12:58 +0100)
committerLuca Boccassi <luca.boccassi@gmail.com>
Mon, 11 May 2026 13:37:08 +0000 (14:37 +0100)
commitf68fa99a0748383eb10339f22ad0be0ed825722a
tree7a86cd21c6c04576a89ac1e3a58a27400e863491
parent263335518b29d90cc3745414c02c3a9de20b2070
TEST-67-INTEGRITY: pre-load crypto modules and skip unsupported algorithms

The test occasionally fails on GHA CI when formatting with xxhash64
because dm-integrity's crypto_alloc_shash() -> request_module() path
flakily fails to load the algorithm:

[   29.172664] TEST-67-INTEGRITY.sh[447]: + for a in crc32c crc32 xxhash64 sha1 sha256
[   29.172664] TEST-67-INTEGRITY.sh[447]: + [[ xxhash64 == crc32 ]]
[   29.172664] TEST-67-INTEGRITY.sh[447]: + test_one xxhash64 0
[   29.172664] TEST-67-INTEGRITY.sh[447]: + integritysetup format /dev/loop0 --batch-mode -I xxhash64 ''
[   29.223383] TEST-67-INTEGRITY.sh[1220]: device-mapper: reload ioctl on temporary-cryptsetup-fa8bebe3-1d87-4796-91e8-abc02c487bb5 (254:0) failed: No such file or directory
[   29.226916] kernel: device-mapper: table: 254:0: integrity: Invalid internal hash (-ENOENT)
[   29.227415] kernel: device-mapper: ioctl: error adding target to table
[   29.231586] TEST-67-INTEGRITY.sh[1220]: Cannot format integrity for device /dev/loop0.

Preload each algorithm's crypto module before use, and skip algorithms
that are not registered in /proc/crypto.

Co-developed-by: Claude Opus 4.7 <noreply@anthropic.com>
test/units/TEST-67-INTEGRITY.sh