diff options
| author | Yu-Chun Lin <eleanor15x@gmail.com> | 2025-02-03 15:54:00 +0800 |
|---|---|---|
| committer | Kees Cook <kees@kernel.org> | 2025-02-12 14:00:11 -0800 |
| commit | 9ab61886ac683e8ff1b261a1738d5e68cd645604 (patch) | |
| tree | 8a10ca240b50714983c1e8f563fbb57d5450fb96 /lib/Kconfig.debug | |
| parent | unicode: kunit: change tests filename and path (diff) | |
| download | linux-9ab61886ac683e8ff1b261a1738d5e68cd645604.tar.gz linux-9ab61886ac683e8ff1b261a1738d5e68cd645604.zip | |
lib/math: Add Kunit test suite for gcd()
Add a KUnit test suite for the gcd() function.
This test suite verifies the correctness of gcd() across various
scenarios, including edge cases.
Signed-off-by: Yu-Chun Lin <eleanor15x@gmail.com>
Reviewed-by: Kuan-Wei Chiu <visitorckw@gmail.com>
Link: https://lore.kernel.org/r/20250203075400.3431330-1-eleanor15x@gmail.com
Signed-off-by: Kees Cook <kees@kernel.org>
Diffstat (limited to 'lib/Kconfig.debug')
| -rw-r--r-- | lib/Kconfig.debug | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index 86ddf568cbca..ad1725465870 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug @@ -3222,6 +3222,19 @@ config INT_LOG_KUNIT_TEST If unsure, say N +config GCD_KUNIT_TEST + tristate "Greatest common divisor test" if !KUNIT_ALL_TESTS + depends on KUNIT + default KUNIT_ALL_TESTS + help + This option enables the KUnit test suite for the gcd() function, + which computes the greatest common divisor of two numbers. + + This test suite verifies the correctness of gcd() across various + scenarios, including edge cases. + + If unsure, say N + endif # RUNTIME_TESTING_MENU config ARCH_USE_MEMTEST |
