Skip to content

Commit cdf22ae

Browse files
author
Eric Biggers
committed
lib/crc: tests: Add CRC_ENABLE_ALL_FOR_KUNIT
Now that crc_kunit uses the standard "depends on" pattern, enabling the full set of CRC tests is a bit difficult, mainly due to CRC7 being rarely used. Add a kconfig option to make it easier. It is visible only when KUNIT, so hopefully the extra prompt won't be too annoying. Link: https://lore.kernel.org/r/20260306033557.250499-3-ebiggers@kernel.org Signed-off-by: Eric Biggers <ebiggers@kernel.org>
1 parent 85c9f3a commit cdf22ae

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

lib/crc/Kconfig

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,20 @@ config CRC_KUNIT_TEST
107107
This is intended to help people writing architecture-specific
108108
optimized versions. If unsure, say N.
109109

110+
config CRC_ENABLE_ALL_FOR_KUNIT
111+
tristate "Enable all CRC functions for KUnit test"
112+
depends on KUNIT
113+
select CRC7
114+
select CRC16
115+
select CRC_T10DIF
116+
select CRC32
117+
select CRC64
118+
help
119+
Enable all CRC functions that have test code in CRC_KUNIT_TEST.
120+
121+
Enable this only if you'd like the CRC KUnit test suite to test all
122+
the CRC variants, even ones that wouldn't otherwise need to be built.
123+
110124
config CRC_BENCHMARK
111125
bool "Benchmark for the CRC functions"
112126
depends on CRC_KUNIT_TEST

0 commit comments

Comments
 (0)