diff options
| author | Ryota Sakamoto <sakamo.ryota@gmail.com> | 2026-01-23 00:40:41 +0900 |
|---|---|---|
| committer | Yury Norov <ynorov@nvidia.com> | 2026-02-08 18:47:29 -0500 |
| commit | 6711069dd72fcbafe010fb16be504364e5ced190 (patch) | |
| tree | 1155f3b32f1e0352e9b1c784f14721eaa8636f74 /lib/Kconfig.debug | |
| parent | 9d6f6764939f9594d2de24ab3b2701d6ee592c0a (diff) | |
lib/tests: extend KUnit test for bitops with more cases
Extend a KUnit test suite for the bitops API to cover more APIs from
include/asm-generic/bitops/instrumented-atomic.h.
- change_bit()
- test_and_set_bit()
- test_and_clear_bit()
- test_and_change_bit()
Verified on x86_64, i386, and arm64 architectures.
Sample KUnit output:
KTAP version 1
# Subtest: test_change_bit
ok 1 BITOPS_4
ok 2 BITOPS_7
ok 3 BITOPS_11
ok 4 BITOPS_31
ok 5 BITOPS_88
# test_change_bit: pass:5 fail:0 skip:0 total:5
ok 2 test_change_bit
KTAP version 1
# Subtest: test_test_and_set_bit_test_and_clear_bit
ok 1 BITOPS_4
ok 2 BITOPS_7
ok 3 BITOPS_11
ok 4 BITOPS_31
ok 5 BITOPS_88
# test_test_and_set_bit_test_and_clear_bit: pass:5 fail:0 skip:0 total:5
ok 3 test_test_and_set_bit_test_and_clear_bit
KTAP version 1
# Subtest: test_test_and_change_bit
ok 1 BITOPS_4
ok 2 BITOPS_7
ok 3 BITOPS_11
ok 4 BITOPS_31
ok 5 BITOPS_88
# test_test_and_change_bit: pass:5 fail:0 skip:0 total:5
ok 4 test_test_and_change_bit
Signed-off-by: Ryota Sakamoto <sakamo.ryota@gmail.com>
Signed-off-by: Yury Norov <ynorov@nvidia.com>
Diffstat (limited to 'lib/Kconfig.debug')
| -rw-r--r-- | lib/Kconfig.debug | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index e4f8ba2f9f32..c59b12cf633a 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug @@ -2660,8 +2660,8 @@ config BITOPS_KUNIT This option enables the KUnit test for the bitops library which provides functions for bit operations. - Note that this is a partial copy of the original test_bitops module. - For the full coverage, enable TEST_BITOPS. + Note that this is derived from the original test_bitops module. + For micro-benchmarks and compiler warning checks, enable TEST_BITOPS. If unsure, say N. |
