test_hash.c: refactor into kunit
[linux-2.6-microblaze.git] / lib / Kconfig.debug
index f27de20..a789da4 100644 (file)
@@ -2207,15 +2207,6 @@ config TEST_RHASHTABLE
 
          If unsure, say N.
 
-config TEST_HASH
-       tristate "Perform selftest on hash functions"
-       help
-         Enable this option to test the kernel's integer (<linux/hash.h>), and
-         string (<linux/stringhash.h>) hash functions on boot (or module load).
-
-         This is intended to help people writing architecture-specific
-         optimized versions.  If unsure, say N.
-
 config TEST_SIPHASH
        tristate "Perform selftest on siphash functions"
        help
@@ -2364,6 +2355,25 @@ config BITFIELD_KUNIT
 
          If unsure, say N.
 
+config HASH_KUNIT_TEST
+       tristate "KUnit Test for integer hash functions" if !KUNIT_ALL_TESTS
+       depends on KUNIT
+       default KUNIT_ALL_TESTS
+       help
+         Enable this option to test the kernel's string (<linux/stringhash.h>), and
+         integer (<linux/hash.h>) hash functions on boot.
+
+         KUnit tests run during boot and output the results to the debug log
+         in TAP format (https://testanything.org/). Only useful for kernel devs
+         running the KUnit test harness, and not intended for inclusion into a
+         production build.
+
+         For more information on KUnit and unit tests in general please refer
+         to the KUnit documentation in Documentation/dev-tools/kunit/.
+
+         This is intended to help people writing architecture-specific
+         optimized versions. If unsure, say N.
+
 config RESOURCE_KUNIT_TEST
        tristate "KUnit test for resource API"
        depends on KUNIT