]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
lib/crc: crc_kunit: Test CRC computation in interrupt contexts
authorEric Biggers <ebiggers@kernel.org>
Mon, 11 Aug 2025 18:26:30 +0000 (11:26 -0700)
committerEric Biggers <ebiggers@kernel.org>
Mon, 11 Aug 2025 18:28:00 +0000 (11:28 -0700)
commit842ec21357f15ff722695dd87daf99823f297185
treee0af8c6d11c7425c42378067bca2ff481064ee68
parentb41dc83f0790fd3488a45b31de0b0c3af7d441fe
lib/crc: crc_kunit: Test CRC computation in interrupt contexts

Test that if CRCs are computed in task, softirq, and hardirq context
concurrently, then all results are as expected.  Implement this using
kunit_run_irq_test() which is also used by the lib/crypto/ tests.

As with the corresponding lib/crypto/ tests, the purpose of this is to
test fallback code paths and to exercise edge cases in the
architecture's support for in-kernel FPU/SIMD/vector.

Remove the code from crc_test() that sometimes disabled interrupts, as
that was just an incomplete attempt to achieve similar test coverage.

Link: https://lore.kernel.org/r/20250811182631.376302-3-ebiggers@kernel.org
Signed-off-by: Eric Biggers <ebiggers@kernel.org>
lib/crc/tests/crc_kunit.c