aboutsummaryrefslogtreecommitdiffstats
path: root/lib/test_bits.c
Commit message (Collapse)AuthorAgeFilesLines
* lib: Move KUnit tests into tests/ subdirectoryKees Cook2025-02-111-110/+0
| | | | | | | | | | | | | | | Following from the recent KUnit file naming discussion[1], move all KUnit tests in lib/ into lib/tests/. Link: https://lore.kernel.org/lkml/[email protected]/ [1] Acked-by: Steven Rostedt (Google) <[email protected]> Acked-by: Jakub Kicinski <[email protected]> Acked-by: Masami Hiramatsu (Google) <[email protected]> Reviewed-by: David Gow <[email protected]> Acked-by: Vlastimil Babka <[email protected]> Reviewed-by: Rae Moar <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Kees Cook <[email protected]>
* lib/test_bits.c: Add tests for GENMASK_U128()Anshuman Khandual2024-08-281-0/+34
| | | | | | | | | | | This adds GENMASK_U128() tests although currently only 64 bit wide masks are being tested. Cc: Andrew Morton <[email protected]> Cc: [email protected] Reviewed-by: Arnd Bergmann <[email protected]> Signed-off-by: Anshuman Khandual <[email protected]> Signed-off-by: Yury Norov <[email protected]>
* KUnit: add missing MODULE_DESCRIPTION() macros for lib/test_*.koJeff Johnson2024-06-251-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | make allmodconfig && make W=1 C=1 reports for lib/test_*.ko: WARNING: modpost: missing MODULE_DESCRIPTION() in lib/test_hexdump.o WARNING: modpost: missing MODULE_DESCRIPTION() in lib/test_dhry.o WARNING: modpost: missing MODULE_DESCRIPTION() in lib/test_firmware.o WARNING: modpost: missing MODULE_DESCRIPTION() in lib/test_sysctl.o WARNING: modpost: missing MODULE_DESCRIPTION() in lib/test_hash.o WARNING: modpost: missing MODULE_DESCRIPTION() in lib/test_ida.o WARNING: modpost: missing MODULE_DESCRIPTION() in lib/test_list_sort.o WARNING: modpost: missing MODULE_DESCRIPTION() in lib/test_min_heap.o WARNING: modpost: missing MODULE_DESCRIPTION() in lib/test_module.o WARNING: modpost: missing MODULE_DESCRIPTION() in lib/test_sort.o WARNING: modpost: missing MODULE_DESCRIPTION() in lib/test_static_keys.o WARNING: modpost: missing MODULE_DESCRIPTION() in lib/test_static_key_base.o WARNING: modpost: missing MODULE_DESCRIPTION() in lib/test_memcat_p.o WARNING: modpost: missing MODULE_DESCRIPTION() in lib/test_blackhole_dev.o WARNING: modpost: missing MODULE_DESCRIPTION() in lib/test_meminit.o WARNING: modpost: missing MODULE_DESCRIPTION() in lib/test_free_pages.o WARNING: modpost: missing MODULE_DESCRIPTION() in lib/test_kprobes.o WARNING: modpost: missing MODULE_DESCRIPTION() in lib/test_ref_tracker.o WARNING: modpost: missing MODULE_DESCRIPTION() in lib/test_bits.o Add the missing invocations of the MODULE_DESCRIPTION() macro. Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Jeff Johnson <[email protected]> Reviewed-by: Kees Cook <[email protected]> Reviewed-by: Masami Hiramatsu (Google) <[email protected]> Cc: Anil S Keshavamurthy <[email protected]> Cc: "David S. Miller" <[email protected]> Cc: Masami Hiramatsu (Google) <[email protected]> Cc: "Naveen N. Rao" <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
* lib/test_bits.c: add tests of GENMASKRikard Falkeborn2020-08-121-0/+75
Add tests of GENMASK and GENMASK_ULL. A few test cases that should fail compilation are provided under #ifdef TEST_GENMASK_FAILURES [[email protected]: add MODULE_LICENSE()] Link: http://lkml.kernel.org/r/[email protected] [[email protected]: make some functions static] Link: http://lkml.kernel.org/r/[email protected] Suggested-by: Andy Shevchenko <[email protected]> Signed-off-by: Rikard Falkeborn <[email protected]> Signed-off-by: Randy Dunlap <[email protected]> Signed-off-by: Wei Yongjun <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Acked-by: William Breathitt Gray <[email protected]> Cc: Emil Velikov <[email protected]> Cc: Syed Nayyar Waris <[email protected]> Cc: Andy Shevchenko <[email protected]> Cc: Arnd Bergmann <[email protected]> Cc: Geert Uytterhoeven <[email protected]> Cc: Kees Cook <[email protected]> Cc: Linus Walleij <[email protected]> Cc: Masahiro Yamada <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Linus Torvalds <[email protected]>