summaryrefslogtreecommitdiff
path: root/lib/Kconfig.debug
diff options
context:
space:
mode:
authorVinicius Peixoto <vpeixoto@lkcamp.dev>2024-10-12 04:43:49 -0300
committerAndrew Morton <akpm@linux-foundation.org>2024-11-05 17:12:31 -0800
commit5d042707089f0d0c49473d05250e4f319a71e1df (patch)
tree6dd6f2eec802c9f6a1ef8118bbe36e528efa1853 /lib/Kconfig.debug
parenta9d38bcd7337f051912174ebfc500e1cef73982e (diff)
downloadlwn-5d042707089f0d0c49473d05250e4f319a71e1df.tar.gz
lwn-5d042707089f0d0c49473d05250e4f319a71e1df.zip
lib/crc16_kunit.c: add KUnit tests for crc16
Add Kunit tests for the kernel's implementation of the standard CRC-16 algorithm (<linux/crc16.h>). The test data consists of 100 randomly-generated test cases, validated against a naive CRC-16 implementation. This test follows roughly the same logic as lib/crc32test.c, but without the performance measurements. Link: https://lkml.kernel.org/r/20241012-crc16-kunit-v3-1-0ca75cb58ca9@lkcamp.dev Signed-off-by: Vinicius Peixoto <vpeixoto@lkcamp.dev> Co-developed-by: Enzo Bertoloti <ebertoloti@lkcamp.dev> Signed-off-by: Enzo Bertoloti <ebertoloti@lkcamp.dev> Co-developed-by: Fabricio Gasperin <fgasperin@lkcamp.dev> Signed-off-by: Fabricio Gasperin <fgasperin@lkcamp.dev> Suggested-by: David Laight <David.Laight@ACULAB.COM> Cc: Brendan Higgins <brendan.higgins@linux.dev> Cc: David Gow <davidgow@google.com> Cc: Rae Moar <rmoar@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'lib/Kconfig.debug')
-rw-r--r--lib/Kconfig.debug9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
index 409dd193c09b..eda319e9d569 100644
--- a/lib/Kconfig.debug
+++ b/lib/Kconfig.debug
@@ -2850,6 +2850,15 @@ config USERCOPY_KUNIT_TEST
on the copy_to/from_user infrastructure, making sure basic
user/kernel boundary testing is working.
+config CRC16_KUNIT_TEST
+ tristate "KUnit tests for CRC16"
+ depends on KUNIT
+ default KUNIT_ALL_TESTS
+ select CRC16
+ help
+ Enable this option to run unit tests for the kernel's CRC16
+ implementation (<linux/crc16.h>).
+
config TEST_UDELAY
tristate "udelay test driver"
help