summaryrefslogtreecommitdiff
path: root/lib/math/tests/prime_numbers_kunit.c
AgeCommit message (Collapse)Author
2026-04-09lib/prime_numbers: drop temporary buffer in dump_primes()Yury Norov
The function uses temporary buffer to convert primes bitmap into human readable format. Switch to using kunit_info("%*pbl")", and drop the buffer. Signed-off-by: Yury Norov <ynorov@nvidia.com>
2025-02-12lib/prime_numbers: convert self-test to KUnitTamir Duberstein
Extract a private header and convert the prime_numbers self-test to a KUnit test. I considered parameterizing the test using `KUNIT_CASE_PARAM` but didn't see how it was possible since the test logic is entangled with the test parameter generation logic. Signed-off-by: Tamir Duberstein <tamird@gmail.com> Link: https://lore.kernel.org/r/20250208-prime_numbers-kunit-convert-v5-2-b0cb82ae7c7d@gmail.com Signed-off-by: Kees Cook <kees@kernel.org>