Commit Graph
2 Commits
Author SHA1 Message Date
Eric Biggers 842ec21357 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/[email protected]
Signed-off-by: Eric Biggers <[email protected]>
2025-08-11 11:28:00 -07:00
Eric Biggers 89a5159140 lib/crc: Move files into lib/crc/
Move all CRC files in lib/ into a subdirectory lib/crc/ to keep them
from cluttering up the main lib/ directory.

Reviewed-by: "Martin K. Petersen" <[email protected]>
Acked-by: Ingo Molnar <[email protected]>
Acked-by: "Jason A. Donenfeld" <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Eric Biggers <[email protected]>
2025-06-30 09:31:57 -07:00