| 84ec093f | 02-Dec-2024 |
Bruno Sobreira França <[email protected]> |
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 i
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 <[email protected]> Reviewed-by: David Gow <[email protected]> Reviewed-by: Rae Moar <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Kees Cook <[email protected]>
show more ...
|
| 1635e62e | 07-Jul-2024 |
Nicolas Pitre <[email protected]> |
mul_u64_u64_div_u64: basic sanity test
Verify that edge cases produce proper results, and some more.
[[email protected]: avoid undefined shift value] Link: https://lkml.kernel.org/r/7rrs9pn1-n2
mul_u64_u64_div_u64: basic sanity test
Verify that edge cases produce proper results, and some more.
[[email protected]: avoid undefined shift value] Link: https://lkml.kernel.org/r/[email protected] Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Nicolas Pitre <[email protected]> Reviewed-by: Uwe Kleine-König <[email protected]> Cc: Biju Das <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
show more ...
|
| b6c75c4a | 01-Jul-2021 |
Trent Piepho <[email protected]> |
lib/math/rational: add Kunit test cases
Adds a number of test cases that cover a range of possible code paths.
[[email protected]: remove non-ascii characters, fix whitespace] [colin.king@c
lib/math/rational: add Kunit test cases
Adds a number of test cases that cover a range of possible code paths.
[[email protected]: remove non-ascii characters, fix whitespace] [[email protected]: fix spelling mistake "demominator" -> "denominator"] Link: https://lkml.kernel.org/r/[email protected]
Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Trent Piepho <[email protected]> Signed-off-by: Colin Ian King <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Cc: Daniel Latypov <[email protected]> Cc: Oskar Schirmer <[email protected]> Cc: Yiyuan Guo <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
show more ...
|
| 182dd5ba | 21-Apr-2021 |
Maciej W. Rozycki <[email protected]> |
lib/math/test_div64: Fix error message formatting
Align the expected result with one actually produced for easier visual comparison; this has to take into account what the format specifiers will act
lib/math/test_div64: Fix error message formatting
Align the expected result with one actually produced for easier visual comparison; this has to take into account what the format specifiers will actually produce rather than the characters they consist of. E.g.:
test_div64: ERROR: 10000000ab275080 / 00000009 => 01c71c71da20d00e,00000002 test_div64: ERROR: expected value => 0000000013045e47,00000001
(with a failure induced by setting bit #60 of the divident).
Signed-off-by: Maciej W. Rozycki <[email protected]> Signed-off-by: Thomas Bogendoerfer <[email protected]>
show more ...
|