Skip to contentSkip to conversation

lib/find_bit: Add test-module,find_last_zero_bit

PATCH In review Levi Yun 1 participant 1 message Dec 6, 2020

Subsystems (3)
lore
Share & tools
lore

Levi Yun

author
#0 lore raw

PATCH v2 6/8 lib/find_bit: Add test-module,find_last_zero_bit

Add test module to test find_last_zero_bit and
find_each_*_bit_revserse.

---
 lib/Kconfig.debug        |   8 ++
 lib/Makefile             |   1 +
 lib/test_find_last_bit.c | 235 +++++++++++++++++++++++++++++++++++++++
 3 files changed, 244 insertions(+)
 create mode 100644 lib/test_find_last_bit.c
lib/Kconfig.debug +8 -0
index c789b39ed527..481e366d0e82 100644
@@ -2188,6 +2188,14 @@ config FIND_BIT_BENCHMARK
 
 	  If unsure, say N.
 
+config TEST_FIND_LAST_BIT
+	tristate "Test find_last_*_bit functions"
+	help
+	  This builds the "test_find_last_bit" module that measure find_last_*_bit()
+	  functions performance.
+
+	  If unsure, say N.
+
 config TEST_FIRMWARE
 	tristate "Test firmware loading via userspace interface"
 	depends on FW_LOADER
lib/Makefile +1 -0
index ce45af50983a..310719df6207 100644
@@ -58,6 +58,7 @@ obj-y += hexdump.o
 obj-$(CONFIG_TEST_HEXDUMP) += test_hexdump.o
 obj-y += kstrtox.o
 obj-$(CONFIG_FIND_BIT_BENCHMARK) += find_bit_benchmark.o
+obj-$(CONFIG_TEST_FIND_LAST_BIT) += test_find_last_bit.o
 obj-$(CONFIG_TEST_BPF) += test_bpf.o
 obj-$(CONFIG_TEST_FIRMWARE) += test_firmware.o
 obj-$(CONFIG_TEST_BITOPS) += test_bitops.o
lib/test_find_last_bit.c new file +235 -0

235 lines not on this page · raw message

Signature · 1 line
2.27.0