mirror of
https://github.com/torvalds/linux.git
synced 2026-04-26 10:32:25 -04:00
lib/math: Add int_log test suite
This commit introduces KUnit tests for the intlog2 and intlog10 functions, which compute logarithms in base 2 and base 10, respectively. The tests cover a range of inputs to ensure the correctness of these functions across common and edge cases. Signed-off-by: Bruno Sobreira França <brunofrancadevsec@gmail.com> Reviewed-by: David Gow <davidgow@google.com> Reviewed-by: Rae Moar <rmoar@google.com> Link: https://lore.kernel.org/r/20241202075545.3648096-3-davidgow@google.com Signed-off-by: Kees Cook <kees@kernel.org>
This commit is contained in:
committed by
Kees Cook
parent
3e50ba8fc8
commit
84ec093f55
@@ -1,5 +1,6 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
obj-$(CONFIG_INT_LOG_KUNIT_TEST) += int_log_kunit.o
|
||||
obj-$(CONFIG_INT_POW_KUNIT_TEST) += int_pow_kunit.o
|
||||
obj-$(CONFIG_INT_SQRT_KUNIT_TEST) += int_sqrt_kunit.o
|
||||
obj-$(CONFIG_RATIONAL_KUNIT_TEST) += rational_kunit.o
|
||||
|
||||
Reference in New Issue
Block a user