* Re: [PATCH 3/6] lib: Move KUnit tests into tests/ subdirectory
@ 2024-10-15 5:04 kernel test robot
0 siblings, 0 replies; 11+ messages in thread
From: kernel test robot @ 2024-10-15 5:04 UTC (permalink / raw)
To: oe-kbuild; +Cc: lkp, Dan Carpenter
BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
In-Reply-To: <20241011072509.3068328-5-davidgow@google.com>
References: <20241011072509.3068328-5-davidgow@google.com>
TO: David Gow <davidgow@google.com>
Hi David,
kernel test robot noticed the following build warnings:
[auto build test WARNING on akpm-mm/mm-nonmm-unstable]
[cannot apply to geert-m68k/for-next geert-m68k/for-linus brauner-vfs/vfs.all linus/master v6.12-rc3 next-20241014]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/David-Gow/lib-math-Move-kunit-tests-into-tests-subdir/20241011-153344
base: https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-nonmm-unstable
patch link: https://lore.kernel.org/r/20241011072509.3068328-5-davidgow%40google.com
patch subject: [PATCH 3/6] lib: Move KUnit tests into tests/ subdirectory
:::::: branch date: 4 days ago
:::::: commit date: 4 days ago
config: nios2-randconfig-r072-20241015 (https://download.01.org/0day-ci/archive/20241015/202410151246.ymPWVzSF-lkp@intel.com/config)
compiler: nios2-linux-gcc (GCC) 14.1.0
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Reported-by: Dan Carpenter <error27@gmail.com>
| Closes: https://lore.kernel.org/r/202410151246.ymPWVzSF-lkp@intel.com/
New smatch warnings:
lib/tests/memcpy_kunit.c:320 init_large() warn: calling memset(x, y, ARRAY_SIZE());
lib/tests/fortify_kunit.c:479 fortify_test_strcpy() error: strcpy() 'src' too large for 'pad.buf' (33 vs 32)
lib/tests/slub_kunit.c:99 test_first_word() error: dereferencing freed memory 'p'
lib/tests/overflow_kunit.c:480 shift_overflow_test() warn: '(_a_full << _to_shift)' 32768 can't fit into 32767 '*_d'
lib/tests/overflow_kunit.c:528 shift_truncate_test() warn: '(_a_full << _to_shift)' 65536 can't fit into 65535 '*_d'
lib/tests/overflow_kunit.c:566 shift_nonsense_test() warn: '(_a_full << _to_shift)' 18446744073709551611 can't fit into 32767 '*_d'
lib/tests/overflow_kunit.c:567 shift_nonsense_test() warn: assigning 18446744073709551611 to unsigned variable '*_d'
lib/tests/overflow_kunit.c:827 overflows_type_test() warn: assigning (-128) to unsigned variable 'v'
lib/tests/overflow_kunit.c:827 overflows_type_test() warn: assigning (-128) to unsigned variable 'v'
lib/tests/overflow_kunit.c:848 overflows_type_test() warn: 't1 + v' 65535 can't fit into 127 'v'
lib/tests/overflow_kunit.c:848 overflows_type_test() warn: 't1 + v' 65535 can't fit into 127 'v'
lib/tests/overflow_kunit.c:857 overflows_type_test() warn: assigning s16min to unsigned variable 'v'
lib/tests/overflow_kunit.c:857 overflows_type_test() warn: assigning s16min to unsigned variable 'v'
lib/tests/overflow_kunit.c:872 overflows_type_test() warn: value (-129) can't fit into (-128) 'v'
lib/tests/overflow_kunit.c:872 overflows_type_test() warn: value (-129) can't fit into (-128) 'v'
lib/tests/overflow_kunit.c:874 overflows_type_test() warn: value s16min can't fit into (-128) 'v'
lib/tests/overflow_kunit.c:874 overflows_type_test() warn: value s16min can't fit into (-128) 'v'
lib/tests/overflow_kunit.c:903 overflows_type_test() warn: assigning s32min to unsigned variable 'v'
lib/tests/overflow_kunit.c:903 overflows_type_test() warn: assigning s32min to unsigned variable 'v'
lib/tests/overflow_kunit.c:1155 castable_to_type_test() warn: unsigned '(((1 << (8 * 1 - 1 - (((-1)) < 1))) - 1) + (1 << (8 * 1 - 1 - (((-1)) < 1))))' is never less than zero.
lib/tests/overflow_kunit.c:1155 castable_to_type_test() warn: unsigned '(((1 << (8 * 1 - 1 - (((-1)) < 1))) - 1) + (1 << (8 * 1 - 1 - (((-1)) < 1))))' is never less than zero.
Old smatch warnings:
arch/nios2/include/asm/thread_info.h:62 current_thread_info() error: uninitialized symbol 'sp'.
lib/tests/fortify_kunit.c:490 fortify_test_strcpy() error: strcpy() 'src' too large for 'pad.buf' (33 vs 32)
lib/tests/fortify_kunit.c:503 fortify_test_strcpy() error: strcpy() 'src' too large for 'pad.buf' (33 vs 32)
arch/nios2/include/asm/thread_info.h:62 current_thread_info() error: uninitialized symbol 'sp'.
lib/tests/overflow_kunit.c:489 shift_overflow_test() warn: '(_a_full << _to_shift)' 69932 can't fit into 65535 '*_d'
lib/tests/overflow_kunit.c:500 shift_overflow_test() warn: '(_a_full << _to_shift)' 34966 can't fit into 32767 '*_d'
lib/tests/overflow_kunit.c:509 shift_overflow_test() warn: '(_a_full << _to_shift)' 300 can't fit into 127 '*_d'
lib/tests/overflow_kunit.c:511 shift_overflow_test() warn: '(_a_full << _to_shift)' 69932 can't fit into 32767 '*_d'
lib/tests/overflow_kunit.c:529 shift_truncate_test() warn: '(_a_full << _to_shift)' 65535 can't fit into 32767 '*_d'
lib/tests/overflow_kunit.c:567 shift_nonsense_test() warn: '(_a_full << _to_shift)' 18446744073709551611 can't fit into 65535 '*_d'
lib/tests/overflow_kunit.c:830 overflows_type_test() warn: assigning (-128) to unsigned variable 'v'
lib/tests/overflow_kunit.c:830 overflows_type_test() warn: assigning (-128) to unsigned variable 'v'
lib/tests/overflow_kunit.c:850 overflows_type_test() warn: 't1 + v' 32768 can't fit into 32767 'v'
lib/tests/overflow_kunit.c:850 overflows_type_test() warn: 't1 + v' 32768 can't fit into 32767 'v'
lib/tests/overflow_kunit.c:851 overflows_type_test() warn: 't1 + v' 65535 can't fit into 32767 'v'
lib/tests/overflow_kunit.c:851 overflows_type_test() warn: 't1 + v' 65535 can't fit into 32767 'v'
lib/tests/overflow_kunit.c:860 overflows_type_test() warn: assigning s16min to unsigned variable 'v'
lib/tests/overflow_kunit.c:860 overflows_type_test() warn: assigning s16min to unsigned variable 'v'
lib/tests/overflow_kunit.c:873 overflows_type_test() warn: 't1 + v' 32767 can't fit into 127 'v'
lib/tests/overflow_kunit.c:873 overflows_type_test() warn: 't1 + v' 32767 can't fit into 127 'v'
lib/tests/overflow_kunit.c:884 overflows_type_test() warn: 't1 + v' 4294967295 can't fit into 127 'v'
lib/tests/overflow_kunit.c:884 overflows_type_test() warn: 't1 + v' 4294967295 can't fit into 127 'v'
lib/tests/overflow_kunit.c:886 overflows_type_test() warn: 't1 + v' 65536 can't fit into 65535 'v'
lib/tests/overflow_kunit.c:886 overflows_type_test() warn: 't1 + v' 65536 can't fit into 65535 'v'
lib/tests/overflow_kunit.c:887 overflows_type_test() warn: 't1 + v' 4294967295 can't fit into 65535 'v'
lib/tests/overflow_kunit.c:887 overflows_type_test() warn: 't1 + v' 4294967295 can't fit into 65535 'v'
lib/tests/overflow_kunit.c:889 overflows_type_test() warn: 't1 + v' 32768 can't fit into 32767 'v'
lib/tests/overflow_kunit.c:889 overflows_type_test() warn: 't1 + v' 32768 can't fit into 32767 'v'
lib/tests/overflow_kunit.c:890 overflows_type_test() warn: 't1 + v' 4294967295 can't fit into 32767 'v'
lib/tests/overflow_kunit.c:890 overflows_type_test() warn: 't1 + v' 4294967295 can't fit into 32767 'v'
lib/tests/overflow_kunit.c:901 overflows_type_test() warn: 't1 + v' 2147483647 can't fit into 65535 'v'
lib/tests/overflow_kunit.c:901 overflows_type_test() warn: 't1 + v' 2147483647 can't fit into 65535 'v'
lib/tests/overflow_kunit.c:905 overflows_type_test() warn: 't1 + v' 65536 can't fit into 65535 'v'
lib/tests/overflow_kunit.c:905 overflows_type_test() warn: 't1 + v' 65536 can't fit into 65535 'v'
lib/tests/overflow_kunit.c:906 overflows_type_test() warn: 't1 + v' 2147483647 can't fit into 65535 'v'
lib/tests/overflow_kunit.c:906 overflows_type_test() warn: 't1 + v' 2147483647 can't fit into 65535 'v'
lib/tests/overflow_kunit.c:908 overflows_type_test() warn: assigning s32min to unsigned variable 'v'
lib/tests/overflow_kunit.c:908 overflows_type_test() warn: assigning s32min to unsigned variable 'v'
lib/tests/overflow_kunit.c:920 overflows_type_test() warn: value (-129) can't fit into (-128) 'v'
lib/tests/overflow_kunit.c:920 overflows_type_test() warn: value (-129) can't fit into (-128) 'v'
lib/tests/overflow_kunit.c:921 overflows_type_test() warn: 't1 + v' 2147483647 can't fit into 127 'v'
lib/tests/overflow_kunit.c:921 overflows_type_test() warn: 't1 + v' 2147483647 can't fit into 127 'v'
lib/tests/overflow_kunit.c:922 overflows_type_test() warn: value s32min can't fit into (-128) 'v'
lib/tests/overflow_kunit.c:922 overflows_type_test() warn: value s32min can't fit into (-128) 'v'
lib/tests/overflow_kunit.c:925 overflows_type_test() warn: 't1 + v' 32768 can't fit into 32767 'v'
lib/tests/overflow_kunit.c:925 overflows_type_test() warn: 't1 + v' 32768 can't fit into 32767 'v'
lib/tests/overflow_kunit.c:926 overflows_type_test() warn: value (-32769) can't fit into s16min 'v'
lib/tests/overflow_kunit.c:926 overflows_type_test() warn: value (-32769) can't fit into s16min 'v'
lib/tests/overflow_kunit.c:927 overflows_type_test() warn: 't1 + v' 2147483647 can't fit into 32767 'v'
lib/tests/overflow_kunit.c:927 overflows_type_test() warn: 't1 + v' 2147483647 can't fit into 32767 'v'
lib/tests/overflow_kunit.c:928 overflows_type_test() warn: value s32min can't fit into s16min 'v'
lib/tests/overflow_kunit.c:928 overflows_type_test() warn: value s32min can't fit into s16min 'v'
lib/tests/overflow_kunit.c:1156 castable_to_type_test() warn: unsigned '(((1 << (8 * 2 - 1 - (((-1)) < 1))) - 1) + (1 << (8 * 2 - 1 - (((-1)) < 1))))' is never less than zero.
lib/tests/overflow_kunit.c:1156 castable_to_type_test() warn: unsigned '(((1 << (8 * 2 - 1 - (((-1)) < 1))) - 1) + (1 << (8 * 2 - 1 - (((-1)) < 1))))' is never less than zero.
lib/tests/overflow_kunit.c:1157 castable_to_type_test() warn: unsigned '(((1 << (8 * 4 - 1 - (((-1)) < 1))) - 1) + (1 << (8 * 4 - 1 - (((-1)) < 1))))' is never less than zero.
lib/tests/overflow_kunit.c:1157 castable_to_type_test() warn: unsigned '(((1 << (8 * 4 - 1 - (((-1)) < 1))) - 1) + (1 << (8 * 4 - 1 - (((-1)) < 1))))' is never less than zero.
lib/tests/overflow_kunit.c:1157 castable_to_type_test() warn: unsigned '(((1 << (8 * 4 - 1 - (((-1)) < 1))) - 1) + (1 << (8 * 4 - 1 - (((-1)) < 1))))' is never less than zero.
vim +320 lib/tests/memcpy_kunit.c
96fce387d58fa8 lib/memcpy_kunit.c Kees Cook 2022-09-28 309
96fce387d58fa8 lib/memcpy_kunit.c Kees Cook 2022-09-28 310 static void init_large(struct kunit *test)
96fce387d58fa8 lib/memcpy_kunit.c Kees Cook 2022-09-28 311 {
96fce387d58fa8 lib/memcpy_kunit.c Kees Cook 2022-09-28 312 /* Get many bit patterns. */
96fce387d58fa8 lib/memcpy_kunit.c Kees Cook 2022-09-28 313 get_random_bytes(large_src, ARRAY_SIZE(large_src));
96fce387d58fa8 lib/memcpy_kunit.c Kees Cook 2022-09-28 314
96fce387d58fa8 lib/memcpy_kunit.c Kees Cook 2022-09-28 315 /* Make sure we have non-zero edges. */
96fce387d58fa8 lib/memcpy_kunit.c Kees Cook 2022-09-28 316 set_random_nonzero(test, &large_src[0]);
96fce387d58fa8 lib/memcpy_kunit.c Kees Cook 2022-09-28 317 set_random_nonzero(test, &large_src[ARRAY_SIZE(large_src) - 1]);
96fce387d58fa8 lib/memcpy_kunit.c Kees Cook 2022-09-28 318
96fce387d58fa8 lib/memcpy_kunit.c Kees Cook 2022-09-28 319 /* Explicitly zero the entire destination. */
96fce387d58fa8 lib/memcpy_kunit.c Kees Cook 2022-09-28 @320 memset(large_dst, 0, ARRAY_SIZE(large_dst));
96fce387d58fa8 lib/memcpy_kunit.c Kees Cook 2022-09-28 321 }
96fce387d58fa8 lib/memcpy_kunit.c Kees Cook 2022-09-28 322
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 11+ messages in thread* [PATCH 0/6] KUnit test moves / renames
@ 2024-10-11 7:25 David Gow
2024-10-11 7:25 ` [PATCH 3/6] lib: Move KUnit tests into tests/ subdirectory David Gow
0 siblings, 1 reply; 11+ messages in thread
From: David Gow @ 2024-10-11 7:25 UTC (permalink / raw)
To: Andrew Morton, Shuah Khan, Brendan Higgins, Rae Moar, Kees Cook
Cc: linux-kselftest, kunit-dev, linux-kernel, Stephen Rothwell,
David Gow
As discussed in [1], the KUnit test naming scheme has changed to avoid
name conflicts (and tab-completion woes) with the files being tested.
These renames and moves have caused a nasty set of merge conflicts, so
this series collates and rebases them all to be applied via
mm-nonmm-unstable alongside any lib/ changes[2].
Thanks to everyone whose patches appear here, and everyone who reviewed
on the original series. I hope I didn't break them too much during the
rebase!
Link: https://lore.kernel.org/lkml/20240720165441.it.320-kees@kernel.org/ [1]
Link: https://lore.kernel.org/lkml/CABVgOSmbSzcGUi=E4piSojh3A4_0GjE0fAYbqKjtYGbE9beYRQ@mail.gmail.com/ [2]
---
Bruno Sobreira França (1):
lib/math: Add int_log test suite
Diego Vieira (1):
lib/tests/kfifo_kunit.c: add tests for the kfifo structure
Gabriela Bittencourt (2):
unicode: kunit: refactor selftest to kunit tests
unicode: kunit: change tests filename and path
Kees Cook (1):
lib: Move KUnit tests into tests/ subdirectory
Luis Felipe Hernandez (1):
lib: math: Move kunit tests into tests/ subdir
MAINTAINERS | 19 +-
arch/m68k/configs/amiga_defconfig | 2 +-
arch/m68k/configs/apollo_defconfig | 2 +-
arch/m68k/configs/atari_defconfig | 2 +-
arch/m68k/configs/bvme6000_defconfig | 2 +-
arch/m68k/configs/hp300_defconfig | 2 +-
arch/m68k/configs/mac_defconfig | 2 +-
arch/m68k/configs/multi_defconfig | 2 +-
arch/m68k/configs/mvme147_defconfig | 2 +-
arch/m68k/configs/mvme16x_defconfig | 2 +-
arch/m68k/configs/q40_defconfig | 2 +-
arch/m68k/configs/sun3_defconfig | 2 +-
arch/m68k/configs/sun3x_defconfig | 2 +-
arch/powerpc/configs/ppc64_defconfig | 2 +-
fs/unicode/Kconfig | 5 +-
fs/unicode/Makefile | 2 +-
fs/unicode/tests/.kunitconfig | 3 +
.../{utf8-selftest.c => tests/utf8_kunit.c} | 149 ++++++------
fs/unicode/utf8-norm.c | 2 +-
lib/Kconfig.debug | 31 ++-
lib/Makefile | 36 +--
lib/math/Makefile | 5 +-
lib/math/tests/Makefile | 6 +-
.../{test_div64.c => tests/div64_kunit.c} | 0
lib/math/tests/int_log_kunit.c | 75 ++++++
.../mul_u64_u64_div_u64_kunit.c} | 2 +-
.../rational_kunit.c} | 0
lib/tests/Makefile | 39 +++
lib/{ => tests}/bitfield_kunit.c | 0
lib/{ => tests}/checksum_kunit.c | 0
lib/{ => tests}/cmdline_kunit.c | 0
lib/{ => tests}/cpumask_kunit.c | 0
lib/{ => tests}/fortify_kunit.c | 0
lib/{ => tests}/hashtable_test.c | 0
lib/{ => tests}/is_signed_type_kunit.c | 0
lib/tests/kfifo_kunit.c | 224 ++++++++++++++++++
lib/{ => tests}/kunit_iov_iter.c | 0
lib/{ => tests}/list-test.c | 0
lib/{ => tests}/memcpy_kunit.c | 0
lib/{ => tests}/overflow_kunit.c | 0
lib/{ => tests}/siphash_kunit.c | 0
lib/{ => tests}/slub_kunit.c | 0
lib/{ => tests}/stackinit_kunit.c | 0
lib/{ => tests}/string_helpers_kunit.c | 0
lib/{ => tests}/string_kunit.c | 0
lib/{ => tests}/test_bits.c | 0
lib/{ => tests}/test_fprobe.c | 0
lib/{ => tests}/test_hash.c | 0
lib/{ => tests}/test_kprobes.c | 0
lib/{ => tests}/test_linear_ranges.c | 0
lib/{ => tests}/test_list_sort.c | 0
lib/{ => tests}/test_sort.c | 0
lib/{ => tests}/usercopy_kunit.c | 0
53 files changed, 474 insertions(+), 150 deletions(-)
create mode 100644 fs/unicode/tests/.kunitconfig
rename fs/unicode/{utf8-selftest.c => tests/utf8_kunit.c} (64%)
rename lib/math/{test_div64.c => tests/div64_kunit.c} (100%)
create mode 100644 lib/math/tests/int_log_kunit.c
rename lib/math/{test_mul_u64_u64_div_u64.c => tests/mul_u64_u64_div_u64_kunit.c} (98%)
rename lib/math/{rational-test.c => tests/rational_kunit.c} (100%)
create mode 100644 lib/tests/Makefile
rename lib/{ => tests}/bitfield_kunit.c (100%)
rename lib/{ => tests}/checksum_kunit.c (100%)
rename lib/{ => tests}/cmdline_kunit.c (100%)
rename lib/{ => tests}/cpumask_kunit.c (100%)
rename lib/{ => tests}/fortify_kunit.c (100%)
rename lib/{ => tests}/hashtable_test.c (100%)
rename lib/{ => tests}/is_signed_type_kunit.c (100%)
create mode 100644 lib/tests/kfifo_kunit.c
rename lib/{ => tests}/kunit_iov_iter.c (100%)
rename lib/{ => tests}/list-test.c (100%)
rename lib/{ => tests}/memcpy_kunit.c (100%)
rename lib/{ => tests}/overflow_kunit.c (100%)
rename lib/{ => tests}/siphash_kunit.c (100%)
rename lib/{ => tests}/slub_kunit.c (100%)
rename lib/{ => tests}/stackinit_kunit.c (100%)
rename lib/{ => tests}/string_helpers_kunit.c (100%)
rename lib/{ => tests}/string_kunit.c (100%)
rename lib/{ => tests}/test_bits.c (100%)
rename lib/{ => tests}/test_fprobe.c (100%)
rename lib/{ => tests}/test_hash.c (100%)
rename lib/{ => tests}/test_kprobes.c (100%)
rename lib/{ => tests}/test_linear_ranges.c (100%)
rename lib/{ => tests}/test_list_sort.c (100%)
rename lib/{ => tests}/test_sort.c (100%)
rename lib/{ => tests}/usercopy_kunit.c (100%)
--
2.47.0.rc1.288.g06298d1525-goog
^ permalink raw reply [flat|nested] 11+ messages in thread* [PATCH 3/6] lib: Move KUnit tests into tests/ subdirectory 2024-10-11 7:25 [PATCH 0/6] KUnit test moves / renames David Gow @ 2024-10-11 7:25 ` David Gow 2024-10-11 9:17 ` Vlastimil Babka ` (2 more replies) 0 siblings, 3 replies; 11+ messages in thread From: David Gow @ 2024-10-11 7:25 UTC (permalink / raw) To: Andrew Morton, Shuah Khan, Brendan Higgins, Rae Moar, Kees Cook Cc: linux-kselftest, kunit-dev, linux-kernel, Stephen Rothwell, Yury Norov, Rasmus Villemoes, Jason A . Donenfeld, Andy Shevchenko, Naveen N . Rao, Anil S Keshavamurthy, David S . Miller, Masami Hiramatsu, Mark Brown, linux-hardening, linux-trace-kernel, Palmer Dabbelt, Christophe Leroy, Charlie Jenkins, Simon Horman, Jakub Kicinski, Arnd Bergmann, Daniel Latypov, Guenter Roeck, David Howells, Mickaël Salaün, Marco Elver, Mark Rutland, Gustavo A. R. Silva, Vlastimil Babka, Geert Uytterhoeven, Nathan Chancellor, Fangrui Song, Steven Rostedt (Google), David Gow From: Kees Cook <kees@kernel.org> Following from the recent KUnit file naming discussion[1], move all KUnit tests in lib/ into lib/tests/. Link: https://lore.kernel.org/lkml/20240720165441.it.320-kees@kernel.org/ [1] Signed-off-by: Kees Cook <kees@kernel.org> Acked-by: "Steven Rostedt (Google)" <rostedt@goodmis.org> Acked-by: Jakub Kicinski <kuba@kernel.org> Acked-by: "Masami Hiramatsu (Google)" <mhiramat@kernel.org> Reviewed-by: David Gow <davidgow@google.com> [Rebased onto mm-nonmm-unstable, moved usercopy_kunit] Signed-off-by: David Gow <davidgow@google.com> --- MAINTAINERS | 19 +++++++------ lib/Makefile | 36 +----------------------- lib/tests/Makefile | 38 ++++++++++++++++++++++++++ lib/{ => tests}/bitfield_kunit.c | 0 lib/{ => tests}/checksum_kunit.c | 0 lib/{ => tests}/cmdline_kunit.c | 0 lib/{ => tests}/cpumask_kunit.c | 0 lib/{ => tests}/fortify_kunit.c | 0 lib/{ => tests}/hashtable_test.c | 0 lib/{ => tests}/is_signed_type_kunit.c | 0 lib/{ => tests}/kunit_iov_iter.c | 0 lib/{ => tests}/list-test.c | 0 lib/{ => tests}/memcpy_kunit.c | 0 lib/{ => tests}/overflow_kunit.c | 0 lib/{ => tests}/siphash_kunit.c | 0 lib/{ => tests}/slub_kunit.c | 0 lib/{ => tests}/stackinit_kunit.c | 0 lib/{ => tests}/string_helpers_kunit.c | 0 lib/{ => tests}/string_kunit.c | 0 lib/{ => tests}/test_bits.c | 0 lib/{ => tests}/test_fprobe.c | 0 lib/{ => tests}/test_hash.c | 0 lib/{ => tests}/test_kprobes.c | 0 lib/{ => tests}/test_linear_ranges.c | 0 lib/{ => tests}/test_list_sort.c | 0 lib/{ => tests}/test_sort.c | 0 lib/{ => tests}/usercopy_kunit.c | 0 27 files changed, 49 insertions(+), 44 deletions(-) create mode 100644 lib/tests/Makefile rename lib/{ => tests}/bitfield_kunit.c (100%) rename lib/{ => tests}/checksum_kunit.c (100%) rename lib/{ => tests}/cmdline_kunit.c (100%) rename lib/{ => tests}/cpumask_kunit.c (100%) rename lib/{ => tests}/fortify_kunit.c (100%) rename lib/{ => tests}/hashtable_test.c (100%) rename lib/{ => tests}/is_signed_type_kunit.c (100%) rename lib/{ => tests}/kunit_iov_iter.c (100%) rename lib/{ => tests}/list-test.c (100%) rename lib/{ => tests}/memcpy_kunit.c (100%) rename lib/{ => tests}/overflow_kunit.c (100%) rename lib/{ => tests}/siphash_kunit.c (100%) rename lib/{ => tests}/slub_kunit.c (100%) rename lib/{ => tests}/stackinit_kunit.c (100%) rename lib/{ => tests}/string_helpers_kunit.c (100%) rename lib/{ => tests}/string_kunit.c (100%) rename lib/{ => tests}/test_bits.c (100%) rename lib/{ => tests}/test_fprobe.c (100%) rename lib/{ => tests}/test_hash.c (100%) rename lib/{ => tests}/test_kprobes.c (100%) rename lib/{ => tests}/test_linear_ranges.c (100%) rename lib/{ => tests}/test_list_sort.c (100%) rename lib/{ => tests}/test_sort.c (100%) rename lib/{ => tests}/usercopy_kunit.c (100%) diff --git a/MAINTAINERS b/MAINTAINERS index f1e1cd652699..bbba5c760533 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -3929,10 +3929,10 @@ F: include/vdso/bits.h F: lib/bitmap-str.c F: lib/bitmap.c F: lib/cpumask.c -F: lib/cpumask_kunit.c F: lib/find_bit.c F: lib/find_bit_benchmark.c F: lib/test_bitmap.c +F: lib/tests/cpumask_kunit.c F: tools/include/linux/bitfield.h F: tools/include/linux/bitmap.h F: tools/include/linux/bits.h @@ -8911,9 +8911,10 @@ L: linux-hardening@vger.kernel.org S: Supported T: git git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git for-next/hardening F: include/linux/fortify-string.h -F: lib/fortify_kunit.c -F: lib/memcpy_kunit.c F: lib/test_fortify/* +F: lib/tests/fortify_kunit.c +F: lib/tests/memcpy_kunit.c +F: scripts/test_fortify.sh K: \bunsafe_memcpy\b K: \b__NO_FORTIFY\b @@ -9578,9 +9579,9 @@ F: include/linux/string.h F: include/linux/string_choices.h F: include/linux/string_helpers.h F: lib/string.c -F: lib/string_kunit.c F: lib/string_helpers.c -F: lib/string_helpers_kunit.c +F: lib/tests/string_helpers_kunit.c +F: lib/tests/string_kunit.c F: scripts/coccinelle/api/string_choices.cocci GENERIC UIO DRIVER FOR PCI DEVICES @@ -12741,7 +12742,7 @@ F: Documentation/trace/kprobes.rst F: include/asm-generic/kprobes.h F: include/linux/kprobes.h F: kernel/kprobes.c -F: lib/test_kprobes.c +F: lib/tests/test_kprobes.c F: samples/kprobes KS0108 LCD CONTROLLER DRIVER @@ -13091,7 +13092,7 @@ M: Mark Brown <broonie@kernel.org> R: Matti Vaittinen <mazziesaccount@gmail.com> F: include/linux/linear_range.h F: lib/linear_ranges.c -F: lib/test_linear_ranges.c +F: lib/tests/test_linear_ranges.c LINUX FOR POWER MACINTOSH L: linuxppc-dev@lists.ozlabs.org @@ -13219,7 +13220,7 @@ M: David Gow <davidgow@google.com> L: linux-kselftest@vger.kernel.org L: kunit-dev@googlegroups.com S: Maintained -F: lib/list-test.c +F: lib/tests/list-test.c LITEX PLATFORM M: Karol Gugala <kgugala@antmicro.com> @@ -21199,7 +21200,7 @@ M: Jason A. Donenfeld <Jason@zx2c4.com> S: Maintained F: include/linux/siphash.h F: lib/siphash.c -F: lib/siphash_kunit.c +F: lib/tests/siphash_kunit.c SIS 190 ETHERNET DRIVER M: Francois Romieu <romieu@fr.zoreil.com> diff --git a/lib/Makefile b/lib/Makefile index 53f82de7cbe2..7f2ddbf03fe9 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -51,9 +51,7 @@ obj-y += bcd.o sort.o parser.o debug_locks.o random32.o \ percpu-refcount.o rhashtable.o base64.o \ once.o refcount.o rcuref.o usercopy.o errseq.o bucket_locks.o \ generic-radix-tree.o bitmap-str.o -obj-$(CONFIG_STRING_KUNIT_TEST) += string_kunit.o obj-y += string_helpers.o -obj-$(CONFIG_STRING_HELPERS_KUNIT_TEST) += string_helpers_kunit.o obj-y += hexdump.o obj-$(CONFIG_TEST_HEXDUMP) += test_hexdump.o obj-y += kstrtox.o @@ -64,22 +62,17 @@ obj-$(CONFIG_TEST_DHRY) += test_dhry.o obj-$(CONFIG_TEST_FIRMWARE) += test_firmware.o obj-$(CONFIG_TEST_BITOPS) += test_bitops.o CFLAGS_test_bitops.o += -Werror -obj-$(CONFIG_CPUMASK_KUNIT_TEST) += cpumask_kunit.o obj-$(CONFIG_TEST_SYSCTL) += test_sysctl.o -obj-$(CONFIG_TEST_IOV_ITER) += kunit_iov_iter.o -obj-$(CONFIG_HASH_KUNIT_TEST) += test_hash.o obj-$(CONFIG_TEST_IDA) += test_ida.o obj-$(CONFIG_TEST_UBSAN) += test_ubsan.o CFLAGS_test_ubsan.o += $(call cc-disable-warning, vla) CFLAGS_test_ubsan.o += $(call cc-disable-warning, unused-but-set-variable) UBSAN_SANITIZE_test_ubsan.o := y obj-$(CONFIG_TEST_KSTRTOX) += test-kstrtox.o -obj-$(CONFIG_TEST_LIST_SORT) += test_list_sort.o obj-$(CONFIG_TEST_MIN_HEAP) += test_min_heap.o obj-$(CONFIG_TEST_LKM) += test_module.o obj-$(CONFIG_TEST_VMALLOC) += test_vmalloc.o obj-$(CONFIG_TEST_RHASHTABLE) += test_rhashtable.o -obj-$(CONFIG_TEST_SORT) += test_sort.o obj-$(CONFIG_TEST_STATIC_KEYS) += test_static_keys.o obj-$(CONFIG_TEST_STATIC_KEYS) += test_static_key_base.o obj-$(CONFIG_TEST_DYNAMIC_DEBUG) += test_dynamic_debug.o @@ -105,10 +98,7 @@ obj-$(CONFIG_TEST_MEMINIT) += test_meminit.o obj-$(CONFIG_TEST_LOCKUP) += test_lockup.o obj-$(CONFIG_TEST_HMM) += test_hmm.o obj-$(CONFIG_TEST_FREE_PAGES) += test_free_pages.o -obj-$(CONFIG_KPROBES_SANITY_TEST) += test_kprobes.o obj-$(CONFIG_TEST_REF_TRACKER) += test_ref_tracker.o -CFLAGS_test_fprobe.o += $(CC_FLAGS_FTRACE) -obj-$(CONFIG_FPROBE_SANITY_TEST) += test_fprobe.o obj-$(CONFIG_TEST_OBJPOOL) += test_objpool.o obj-$(CONFIG_TEST_FPU) += test_fpu.o @@ -130,7 +120,7 @@ endif obj-$(CONFIG_DEBUG_INFO_REDUCED) += debug_info.o CFLAGS_debug_info.o += $(call cc-option, -femit-struct-debug-detailed=any) -obj-y += math/ crypto/ +obj-y += math/ crypto/ tests/ obj-$(CONFIG_GENERIC_IOMAP) += iomap.o obj-$(CONFIG_HAS_IOMEM) += iomap_copy.o devres.o @@ -367,30 +357,6 @@ obj-$(CONFIG_OBJAGG) += objagg.o # pldmfw library obj-$(CONFIG_PLDMFW) += pldmfw/ -# KUnit tests -CFLAGS_bitfield_kunit.o := $(DISABLE_STRUCTLEAK_PLUGIN) -obj-$(CONFIG_BITFIELD_KUNIT) += bitfield_kunit.o -obj-$(CONFIG_CHECKSUM_KUNIT) += checksum_kunit.o -obj-$(CONFIG_LIST_KUNIT_TEST) += list-test.o -obj-$(CONFIG_HASHTABLE_KUNIT_TEST) += hashtable_test.o -obj-$(CONFIG_LINEAR_RANGES_TEST) += test_linear_ranges.o -obj-$(CONFIG_BITS_TEST) += test_bits.o -obj-$(CONFIG_CMDLINE_KUNIT_TEST) += cmdline_kunit.o -obj-$(CONFIG_SLUB_KUNIT_TEST) += slub_kunit.o -obj-$(CONFIG_MEMCPY_KUNIT_TEST) += memcpy_kunit.o -obj-$(CONFIG_IS_SIGNED_TYPE_KUNIT_TEST) += is_signed_type_kunit.o -CFLAGS_overflow_kunit.o = $(call cc-disable-warning, tautological-constant-out-of-range-compare) -obj-$(CONFIG_OVERFLOW_KUNIT_TEST) += overflow_kunit.o -CFLAGS_stackinit_kunit.o += $(call cc-disable-warning, switch-unreachable) -obj-$(CONFIG_STACKINIT_KUNIT_TEST) += stackinit_kunit.o -CFLAGS_fortify_kunit.o += $(call cc-disable-warning, unsequenced) -CFLAGS_fortify_kunit.o += $(call cc-disable-warning, stringop-overread) -CFLAGS_fortify_kunit.o += $(call cc-disable-warning, stringop-truncation) -CFLAGS_fortify_kunit.o += $(DISABLE_STRUCTLEAK_PLUGIN) -obj-$(CONFIG_FORTIFY_KUNIT_TEST) += fortify_kunit.o -obj-$(CONFIG_SIPHASH_KUNIT_TEST) += siphash_kunit.o -obj-$(CONFIG_USERCOPY_KUNIT_TEST) += usercopy_kunit.o - obj-$(CONFIG_GENERIC_LIB_DEVMEM_IS_ALLOWED) += devmem_is_allowed.o obj-$(CONFIG_FIRMWARE_TABLE) += fw_table.o diff --git a/lib/tests/Makefile b/lib/tests/Makefile new file mode 100644 index 000000000000..41689f0b7c97 --- /dev/null +++ b/lib/tests/Makefile @@ -0,0 +1,38 @@ +# SPDX-License-Identifier: GPL-2.0 +# +# Makefile for tests of kernel library functions. + +# KUnit tests +CFLAGS_bitfield_kunit.o := $(DISABLE_STRUCTLEAK_PLUGIN) +obj-$(CONFIG_BITFIELD_KUNIT) += bitfield_kunit.o +obj-$(CONFIG_BITS_TEST) += test_bits.o +obj-$(CONFIG_CHECKSUM_KUNIT) += checksum_kunit.o +obj-$(CONFIG_CMDLINE_KUNIT_TEST) += cmdline_kunit.o +obj-$(CONFIG_CPUMASK_KUNIT_TEST) += cpumask_kunit.o +CFLAGS_fortify_kunit.o += $(call cc-disable-warning, unsequenced) +CFLAGS_fortify_kunit.o += $(call cc-disable-warning, stringop-overread) +CFLAGS_fortify_kunit.o += $(call cc-disable-warning, stringop-truncation) +CFLAGS_fortify_kunit.o += $(DISABLE_STRUCTLEAK_PLUGIN) +obj-$(CONFIG_FORTIFY_KUNIT_TEST) += fortify_kunit.o +CFLAGS_test_fprobe.o += $(CC_FLAGS_FTRACE) +obj-$(CONFIG_FPROBE_SANITY_TEST) += test_fprobe.o +obj-$(CONFIG_HASHTABLE_KUNIT_TEST) += hashtable_test.o +obj-$(CONFIG_HASH_KUNIT_TEST) += test_hash.o +obj-$(CONFIG_TEST_IOV_ITER) += kunit_iov_iter.o +obj-$(CONFIG_IS_SIGNED_TYPE_KUNIT_TEST) += is_signed_type_kunit.o +obj-$(CONFIG_KPROBES_SANITY_TEST) += test_kprobes.o +obj-$(CONFIG_LIST_KUNIT_TEST) += list-test.o +obj-$(CONFIG_TEST_LIST_SORT) += test_list_sort.o +obj-$(CONFIG_LINEAR_RANGES_TEST) += test_linear_ranges.o +obj-$(CONFIG_MEMCPY_KUNIT_TEST) += memcpy_kunit.o +CFLAGS_overflow_kunit.o = $(call cc-disable-warning, tautological-constant-out-of-range-compare) +obj-$(CONFIG_OVERFLOW_KUNIT_TEST) += overflow_kunit.o +obj-$(CONFIG_SIPHASH_KUNIT_TEST) += siphash_kunit.o +obj-$(CONFIG_SLUB_KUNIT_TEST) += slub_kunit.o +obj-$(CONFIG_TEST_SORT) += test_sort.o +CFLAGS_stackinit_kunit.o += $(call cc-disable-warning, switch-unreachable) +obj-$(CONFIG_STACKINIT_KUNIT_TEST) += stackinit_kunit.o +obj-$(CONFIG_STRING_KUNIT_TEST) += string_kunit.o +obj-$(CONFIG_STRING_HELPERS_KUNIT_TEST) += string_helpers_kunit.o +obj-$(CONFIG_USERCOPY_KUNIT_TEST) += usercopy_kunit.o + diff --git a/lib/bitfield_kunit.c b/lib/tests/bitfield_kunit.c similarity index 100% rename from lib/bitfield_kunit.c rename to lib/tests/bitfield_kunit.c diff --git a/lib/checksum_kunit.c b/lib/tests/checksum_kunit.c similarity index 100% rename from lib/checksum_kunit.c rename to lib/tests/checksum_kunit.c diff --git a/lib/cmdline_kunit.c b/lib/tests/cmdline_kunit.c similarity index 100% rename from lib/cmdline_kunit.c rename to lib/tests/cmdline_kunit.c diff --git a/lib/cpumask_kunit.c b/lib/tests/cpumask_kunit.c similarity index 100% rename from lib/cpumask_kunit.c rename to lib/tests/cpumask_kunit.c diff --git a/lib/fortify_kunit.c b/lib/tests/fortify_kunit.c similarity index 100% rename from lib/fortify_kunit.c rename to lib/tests/fortify_kunit.c diff --git a/lib/hashtable_test.c b/lib/tests/hashtable_test.c similarity index 100% rename from lib/hashtable_test.c rename to lib/tests/hashtable_test.c diff --git a/lib/is_signed_type_kunit.c b/lib/tests/is_signed_type_kunit.c similarity index 100% rename from lib/is_signed_type_kunit.c rename to lib/tests/is_signed_type_kunit.c diff --git a/lib/kunit_iov_iter.c b/lib/tests/kunit_iov_iter.c similarity index 100% rename from lib/kunit_iov_iter.c rename to lib/tests/kunit_iov_iter.c diff --git a/lib/list-test.c b/lib/tests/list-test.c similarity index 100% rename from lib/list-test.c rename to lib/tests/list-test.c diff --git a/lib/memcpy_kunit.c b/lib/tests/memcpy_kunit.c similarity index 100% rename from lib/memcpy_kunit.c rename to lib/tests/memcpy_kunit.c diff --git a/lib/overflow_kunit.c b/lib/tests/overflow_kunit.c similarity index 100% rename from lib/overflow_kunit.c rename to lib/tests/overflow_kunit.c diff --git a/lib/siphash_kunit.c b/lib/tests/siphash_kunit.c similarity index 100% rename from lib/siphash_kunit.c rename to lib/tests/siphash_kunit.c diff --git a/lib/slub_kunit.c b/lib/tests/slub_kunit.c similarity index 100% rename from lib/slub_kunit.c rename to lib/tests/slub_kunit.c diff --git a/lib/stackinit_kunit.c b/lib/tests/stackinit_kunit.c similarity index 100% rename from lib/stackinit_kunit.c rename to lib/tests/stackinit_kunit.c diff --git a/lib/string_helpers_kunit.c b/lib/tests/string_helpers_kunit.c similarity index 100% rename from lib/string_helpers_kunit.c rename to lib/tests/string_helpers_kunit.c diff --git a/lib/string_kunit.c b/lib/tests/string_kunit.c similarity index 100% rename from lib/string_kunit.c rename to lib/tests/string_kunit.c diff --git a/lib/test_bits.c b/lib/tests/test_bits.c similarity index 100% rename from lib/test_bits.c rename to lib/tests/test_bits.c diff --git a/lib/test_fprobe.c b/lib/tests/test_fprobe.c similarity index 100% rename from lib/test_fprobe.c rename to lib/tests/test_fprobe.c diff --git a/lib/test_hash.c b/lib/tests/test_hash.c similarity index 100% rename from lib/test_hash.c rename to lib/tests/test_hash.c diff --git a/lib/test_kprobes.c b/lib/tests/test_kprobes.c similarity index 100% rename from lib/test_kprobes.c rename to lib/tests/test_kprobes.c diff --git a/lib/test_linear_ranges.c b/lib/tests/test_linear_ranges.c similarity index 100% rename from lib/test_linear_ranges.c rename to lib/tests/test_linear_ranges.c diff --git a/lib/test_list_sort.c b/lib/tests/test_list_sort.c similarity index 100% rename from lib/test_list_sort.c rename to lib/tests/test_list_sort.c diff --git a/lib/test_sort.c b/lib/tests/test_sort.c similarity index 100% rename from lib/test_sort.c rename to lib/tests/test_sort.c diff --git a/lib/usercopy_kunit.c b/lib/tests/usercopy_kunit.c similarity index 100% rename from lib/usercopy_kunit.c rename to lib/tests/usercopy_kunit.c -- 2.47.0.rc1.288.g06298d1525-goog ^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH 3/6] lib: Move KUnit tests into tests/ subdirectory 2024-10-11 7:25 ` [PATCH 3/6] lib: Move KUnit tests into tests/ subdirectory David Gow @ 2024-10-11 9:17 ` Vlastimil Babka 2024-10-11 10:44 ` Andy Shevchenko 2024-10-11 17:20 ` Kees Cook 2 siblings, 0 replies; 11+ messages in thread From: Vlastimil Babka @ 2024-10-11 9:17 UTC (permalink / raw) To: David Gow, Andrew Morton, Shuah Khan, Brendan Higgins, Rae Moar, Kees Cook Cc: linux-kselftest, kunit-dev, linux-kernel, Stephen Rothwell, Yury Norov, Rasmus Villemoes, Jason A . Donenfeld, Andy Shevchenko, Naveen N . Rao, Anil S Keshavamurthy, David S . Miller, Masami Hiramatsu, Mark Brown, linux-hardening, linux-trace-kernel, Palmer Dabbelt, Christophe Leroy, Charlie Jenkins, Simon Horman, Jakub Kicinski, Arnd Bergmann, Daniel Latypov, Guenter Roeck, David Howells, Mickaël Salaün, Marco Elver, Mark Rutland, Gustavo A. R. Silva, Geert Uytterhoeven, Nathan Chancellor, Fangrui Song, Steven Rostedt (Google) On 10/11/24 9:25 AM, David Gow wrote: > From: Kees Cook <kees@kernel.org> > > Following from the recent KUnit file naming discussion[1], move all > KUnit tests in lib/ into lib/tests/. > > Link: https://lore.kernel.org/lkml/20240720165441.it.320-kees@kernel.org/ [1] > Signed-off-by: Kees Cook <kees@kernel.org> > Acked-by: "Steven Rostedt (Google)" <rostedt@goodmis.org> > Acked-by: Jakub Kicinski <kuba@kernel.org> > Acked-by: "Masami Hiramatsu (Google)" <mhiramat@kernel.org> Acked-by: Vlastimil Babka <vbabka@suse.cz> #slab > Reviewed-by: David Gow <davidgow@google.com> > [Rebased onto mm-nonmm-unstable, moved usercopy_kunit] > Signed-off-by: David Gow <davidgow@google.com> ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 3/6] lib: Move KUnit tests into tests/ subdirectory 2024-10-11 7:25 ` [PATCH 3/6] lib: Move KUnit tests into tests/ subdirectory David Gow 2024-10-11 9:17 ` Vlastimil Babka @ 2024-10-11 10:44 ` Andy Shevchenko 2024-10-11 13:38 ` Geert Uytterhoeven 2024-10-11 17:20 ` Kees Cook 2 siblings, 1 reply; 11+ messages in thread From: Andy Shevchenko @ 2024-10-11 10:44 UTC (permalink / raw) To: David Gow Cc: Andrew Morton, Shuah Khan, Brendan Higgins, Rae Moar, Kees Cook, linux-kselftest, kunit-dev, linux-kernel, Stephen Rothwell, Yury Norov, Rasmus Villemoes, Jason A . Donenfeld, Naveen N . Rao, Anil S Keshavamurthy, David S . Miller, Masami Hiramatsu, Mark Brown, linux-hardening, linux-trace-kernel, Palmer Dabbelt, Christophe Leroy, Charlie Jenkins, Simon Horman, Jakub Kicinski, Arnd Bergmann, Daniel Latypov, Guenter Roeck, David Howells, Mickaël Salaün, Marco Elver, Mark Rutland, Gustavo A. R. Silva, Vlastimil Babka, Geert Uytterhoeven, Nathan Chancellor, Fangrui Song, Steven Rostedt (Google) On Fri, Oct 11, 2024 at 03:25:07PM +0800, David Gow wrote: > From: Kees Cook <kees@kernel.org> > > Following from the recent KUnit file naming discussion[1], move all > KUnit tests in lib/ into lib/tests/. > > Link: https://lore.kernel.org/lkml/20240720165441.it.320-kees@kernel.org/ [1] > Signed-off-by: Kees Cook <kees@kernel.org> > Acked-by: "Steven Rostedt (Google)" <rostedt@goodmis.org> > Acked-by: Jakub Kicinski <kuba@kernel.org> > Acked-by: "Masami Hiramatsu (Google)" <mhiramat@kernel.org> > Reviewed-by: David Gow <davidgow@google.com> > [Rebased onto mm-nonmm-unstable, moved usercopy_kunit] > Signed-off-by: David Gow <davidgow@google.com> > rename lib/{ => tests}/bitfield_kunit.c (100%) > rename lib/{ => tests}/checksum_kunit.c (100%) > rename lib/{ => tests}/cmdline_kunit.c (100%) > rename lib/{ => tests}/cpumask_kunit.c (100%) > rename lib/{ => tests}/fortify_kunit.c (100%) > rename lib/{ => tests}/hashtable_test.c (100%) > rename lib/{ => tests}/is_signed_type_kunit.c (100%) > rename lib/{ => tests}/kunit_iov_iter.c (100%) > rename lib/{ => tests}/list-test.c (100%) > rename lib/{ => tests}/memcpy_kunit.c (100%) > rename lib/{ => tests}/overflow_kunit.c (100%) > rename lib/{ => tests}/siphash_kunit.c (100%) > rename lib/{ => tests}/slub_kunit.c (100%) > rename lib/{ => tests}/stackinit_kunit.c (100%) > rename lib/{ => tests}/string_helpers_kunit.c (100%) > rename lib/{ => tests}/string_kunit.c (100%) > rename lib/{ => tests}/test_bits.c (100%) > rename lib/{ => tests}/test_fprobe.c (100%) > rename lib/{ => tests}/test_hash.c (100%) > rename lib/{ => tests}/test_kprobes.c (100%) > rename lib/{ => tests}/test_linear_ranges.c (100%) > rename lib/{ => tests}/test_list_sort.c (100%) > rename lib/{ => tests}/test_sort.c (100%) > rename lib/{ => tests}/usercopy_kunit.c (100%) While I support the idea, I think this adds an additional churn in creating a duplicate 'test' in the filenames. Why they all can't be cut while removing? (at least this question is not answered in the commit message) -- With Best Regards, Andy Shevchenko ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 3/6] lib: Move KUnit tests into tests/ subdirectory 2024-10-11 10:44 ` Andy Shevchenko @ 2024-10-11 13:38 ` Geert Uytterhoeven 2024-10-11 13:57 ` Andy Shevchenko 0 siblings, 1 reply; 11+ messages in thread From: Geert Uytterhoeven @ 2024-10-11 13:38 UTC (permalink / raw) To: Andy Shevchenko Cc: David Gow, Andrew Morton, Shuah Khan, Brendan Higgins, Rae Moar, Kees Cook, linux-kselftest, kunit-dev, linux-kernel, Stephen Rothwell, Yury Norov, Rasmus Villemoes, Jason A . Donenfeld, Naveen N . Rao, Anil S Keshavamurthy, David S . Miller, Masami Hiramatsu, Mark Brown, linux-hardening, linux-trace-kernel, Palmer Dabbelt, Christophe Leroy, Charlie Jenkins, Simon Horman, Jakub Kicinski, Arnd Bergmann, Daniel Latypov, Guenter Roeck, David Howells, Mickaël Salaün, Marco Elver, Mark Rutland, Gustavo A. R. Silva, Vlastimil Babka, Nathan Chancellor, Fangrui Song, Steven Rostedt (Google) Hi Andy, On Fri, Oct 11, 2024 at 12:44 PM Andy Shevchenko <andy@kernel.org> wrote: > On Fri, Oct 11, 2024 at 03:25:07PM +0800, David Gow wrote: > > From: Kees Cook <kees@kernel.org> > > > > Following from the recent KUnit file naming discussion[1], move all > > KUnit tests in lib/ into lib/tests/. > > > > Link: https://lore.kernel.org/lkml/20240720165441.it.320-kees@kernel.org/ [1] > > Signed-off-by: Kees Cook <kees@kernel.org> > > Acked-by: "Steven Rostedt (Google)" <rostedt@goodmis.org> > > Acked-by: Jakub Kicinski <kuba@kernel.org> > > Acked-by: "Masami Hiramatsu (Google)" <mhiramat@kernel.org> > > Reviewed-by: David Gow <davidgow@google.com> > > [Rebased onto mm-nonmm-unstable, moved usercopy_kunit] > > Signed-off-by: David Gow <davidgow@google.com> > > > rename lib/{ => tests}/bitfield_kunit.c (100%) > > rename lib/{ => tests}/checksum_kunit.c (100%) > > rename lib/{ => tests}/cmdline_kunit.c (100%) > > rename lib/{ => tests}/cpumask_kunit.c (100%) > > rename lib/{ => tests}/fortify_kunit.c (100%) > > rename lib/{ => tests}/hashtable_test.c (100%) > > rename lib/{ => tests}/is_signed_type_kunit.c (100%) > > rename lib/{ => tests}/kunit_iov_iter.c (100%) > > rename lib/{ => tests}/list-test.c (100%) > > rename lib/{ => tests}/memcpy_kunit.c (100%) > > rename lib/{ => tests}/overflow_kunit.c (100%) > > rename lib/{ => tests}/siphash_kunit.c (100%) > > rename lib/{ => tests}/slub_kunit.c (100%) > > rename lib/{ => tests}/stackinit_kunit.c (100%) > > rename lib/{ => tests}/string_helpers_kunit.c (100%) > > rename lib/{ => tests}/string_kunit.c (100%) > > rename lib/{ => tests}/test_bits.c (100%) > > rename lib/{ => tests}/test_fprobe.c (100%) > > rename lib/{ => tests}/test_hash.c (100%) > > rename lib/{ => tests}/test_kprobes.c (100%) > > rename lib/{ => tests}/test_linear_ranges.c (100%) > > rename lib/{ => tests}/test_list_sort.c (100%) > > rename lib/{ => tests}/test_sort.c (100%) > > rename lib/{ => tests}/usercopy_kunit.c (100%) > > While I support the idea, I think this adds an additional churn in creating a > duplicate 'test' in the filenames. Why they all can't be cut while removing? > (at least this question is not answered in the commit message) To avoid duplicate *.ko file names? Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 3/6] lib: Move KUnit tests into tests/ subdirectory 2024-10-11 13:38 ` Geert Uytterhoeven @ 2024-10-11 13:57 ` Andy Shevchenko 2024-10-11 14:14 ` Geert Uytterhoeven 0 siblings, 1 reply; 11+ messages in thread From: Andy Shevchenko @ 2024-10-11 13:57 UTC (permalink / raw) To: Geert Uytterhoeven Cc: David Gow, Andrew Morton, Shuah Khan, Brendan Higgins, Rae Moar, Kees Cook, linux-kselftest, kunit-dev, linux-kernel, Stephen Rothwell, Yury Norov, Rasmus Villemoes, Jason A . Donenfeld, Naveen N . Rao, Anil S Keshavamurthy, David S . Miller, Masami Hiramatsu, Mark Brown, linux-hardening, linux-trace-kernel, Palmer Dabbelt, Christophe Leroy, Charlie Jenkins, Simon Horman, Jakub Kicinski, Arnd Bergmann, Daniel Latypov, Guenter Roeck, David Howells, Mickaël Salaün, Marco Elver, Mark Rutland, Gustavo A. R. Silva, Vlastimil Babka, Nathan Chancellor, Fangrui Song, Steven Rostedt (Google) On Fri, Oct 11, 2024 at 03:38:00PM +0200, Geert Uytterhoeven wrote: > Hi Andy, > > On Fri, Oct 11, 2024 at 12:44 PM Andy Shevchenko <andy@kernel.org> wrote: > > On Fri, Oct 11, 2024 at 03:25:07PM +0800, David Gow wrote: > > > From: Kees Cook <kees@kernel.org> > > > > > > Following from the recent KUnit file naming discussion[1], move all > > > KUnit tests in lib/ into lib/tests/. > > > > > > Link: https://lore.kernel.org/lkml/20240720165441.it.320-kees@kernel.org/ [1] > > > Signed-off-by: Kees Cook <kees@kernel.org> > > > Acked-by: "Steven Rostedt (Google)" <rostedt@goodmis.org> > > > Acked-by: Jakub Kicinski <kuba@kernel.org> > > > Acked-by: "Masami Hiramatsu (Google)" <mhiramat@kernel.org> > > > Reviewed-by: David Gow <davidgow@google.com> > > > [Rebased onto mm-nonmm-unstable, moved usercopy_kunit] > > > Signed-off-by: David Gow <davidgow@google.com> > > > > > rename lib/{ => tests}/bitfield_kunit.c (100%) > > > rename lib/{ => tests}/checksum_kunit.c (100%) > > > rename lib/{ => tests}/cmdline_kunit.c (100%) > > > rename lib/{ => tests}/cpumask_kunit.c (100%) > > > rename lib/{ => tests}/fortify_kunit.c (100%) > > > rename lib/{ => tests}/hashtable_test.c (100%) > > > rename lib/{ => tests}/is_signed_type_kunit.c (100%) > > > rename lib/{ => tests}/kunit_iov_iter.c (100%) > > > rename lib/{ => tests}/list-test.c (100%) > > > rename lib/{ => tests}/memcpy_kunit.c (100%) > > > rename lib/{ => tests}/overflow_kunit.c (100%) > > > rename lib/{ => tests}/siphash_kunit.c (100%) > > > rename lib/{ => tests}/slub_kunit.c (100%) > > > rename lib/{ => tests}/stackinit_kunit.c (100%) > > > rename lib/{ => tests}/string_helpers_kunit.c (100%) > > > rename lib/{ => tests}/string_kunit.c (100%) > > > rename lib/{ => tests}/test_bits.c (100%) > > > rename lib/{ => tests}/test_fprobe.c (100%) > > > rename lib/{ => tests}/test_hash.c (100%) > > > rename lib/{ => tests}/test_kprobes.c (100%) > > > rename lib/{ => tests}/test_linear_ranges.c (100%) > > > rename lib/{ => tests}/test_list_sort.c (100%) > > > rename lib/{ => tests}/test_sort.c (100%) > > > rename lib/{ => tests}/usercopy_kunit.c (100%) > > > > While I support the idea, I think this adds an additional churn in creating a > > duplicate 'test' in the filenames. Why they all can't be cut while removing? > > (at least this question is not answered in the commit message) > > To avoid duplicate *.ko file names? With what? Sorry, but I don't see how it's a problem. These are test cases. Do they use kernel command line parameters? If so, shouldn't KUnit take care about it in a more proper way? -- With Best Regards, Andy Shevchenko ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 3/6] lib: Move KUnit tests into tests/ subdirectory 2024-10-11 13:57 ` Andy Shevchenko @ 2024-10-11 14:14 ` Geert Uytterhoeven 2024-10-11 15:21 ` Andy Shevchenko 0 siblings, 1 reply; 11+ messages in thread From: Geert Uytterhoeven @ 2024-10-11 14:14 UTC (permalink / raw) To: Andy Shevchenko Cc: David Gow, Andrew Morton, Shuah Khan, Brendan Higgins, Rae Moar, Kees Cook, linux-kselftest, kunit-dev, linux-kernel, Stephen Rothwell, Yury Norov, Rasmus Villemoes, Jason A . Donenfeld, Naveen N . Rao, Anil S Keshavamurthy, David S . Miller, Masami Hiramatsu, Mark Brown, linux-hardening, linux-trace-kernel, Palmer Dabbelt, Christophe Leroy, Charlie Jenkins, Simon Horman, Jakub Kicinski, Arnd Bergmann, Daniel Latypov, Guenter Roeck, David Howells, Mickaël Salaün, Marco Elver, Mark Rutland, Gustavo A. R. Silva, Vlastimil Babka, Nathan Chancellor, Fangrui Song, Steven Rostedt (Google) Hi Andy, On Fri, Oct 11, 2024 at 3:57 PM Andy Shevchenko <andy@kernel.org> wrote: > On Fri, Oct 11, 2024 at 03:38:00PM +0200, Geert Uytterhoeven wrote: > > On Fri, Oct 11, 2024 at 12:44 PM Andy Shevchenko <andy@kernel.org> wrote: > > > On Fri, Oct 11, 2024 at 03:25:07PM +0800, David Gow wrote: > > > > From: Kees Cook <kees@kernel.org> > > > > > > > > Following from the recent KUnit file naming discussion[1], move all > > > > KUnit tests in lib/ into lib/tests/. > > > > > > > > Link: https://lore.kernel.org/lkml/20240720165441.it.320-kees@kernel.org/ [1] > > > > Signed-off-by: Kees Cook <kees@kernel.org> > > > > Acked-by: "Steven Rostedt (Google)" <rostedt@goodmis.org> > > > > Acked-by: Jakub Kicinski <kuba@kernel.org> > > > > Acked-by: "Masami Hiramatsu (Google)" <mhiramat@kernel.org> > > > > Reviewed-by: David Gow <davidgow@google.com> > > > > [Rebased onto mm-nonmm-unstable, moved usercopy_kunit] > > > > Signed-off-by: David Gow <davidgow@google.com> > > > > > > > rename lib/{ => tests}/bitfield_kunit.c (100%) > > > > rename lib/{ => tests}/checksum_kunit.c (100%) > > > > rename lib/{ => tests}/cmdline_kunit.c (100%) > > > > rename lib/{ => tests}/cpumask_kunit.c (100%) > > > > rename lib/{ => tests}/fortify_kunit.c (100%) > > > > rename lib/{ => tests}/hashtable_test.c (100%) > > > > rename lib/{ => tests}/is_signed_type_kunit.c (100%) > > > > rename lib/{ => tests}/kunit_iov_iter.c (100%) > > > > rename lib/{ => tests}/list-test.c (100%) > > > > rename lib/{ => tests}/memcpy_kunit.c (100%) > > > > rename lib/{ => tests}/overflow_kunit.c (100%) > > > > rename lib/{ => tests}/siphash_kunit.c (100%) > > > > rename lib/{ => tests}/slub_kunit.c (100%) > > > > rename lib/{ => tests}/stackinit_kunit.c (100%) > > > > rename lib/{ => tests}/string_helpers_kunit.c (100%) > > > > rename lib/{ => tests}/string_kunit.c (100%) > > > > rename lib/{ => tests}/test_bits.c (100%) > > > > rename lib/{ => tests}/test_fprobe.c (100%) > > > > rename lib/{ => tests}/test_hash.c (100%) > > > > rename lib/{ => tests}/test_kprobes.c (100%) > > > > rename lib/{ => tests}/test_linear_ranges.c (100%) > > > > rename lib/{ => tests}/test_list_sort.c (100%) > > > > rename lib/{ => tests}/test_sort.c (100%) > > > > rename lib/{ => tests}/usercopy_kunit.c (100%) > > > > > > While I support the idea, I think this adds an additional churn in creating a > > > duplicate 'test' in the filenames. Why they all can't be cut while removing? > > > (at least this question is not answered in the commit message) > > > > To avoid duplicate *.ko file names? > > With what? Sorry, but I don't see how it's a problem. These are test cases. > Do they use kernel command line parameters? If so, shouldn't KUnit take care > about it in a more proper way? If .e.g. lib/list_sort.o could be modular, its module would be called "list_sort.ko", conflicting with the "list_sort.ko" test module. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 3/6] lib: Move KUnit tests into tests/ subdirectory 2024-10-11 14:14 ` Geert Uytterhoeven @ 2024-10-11 15:21 ` Andy Shevchenko 2024-10-11 16:29 ` Christophe Leroy 0 siblings, 1 reply; 11+ messages in thread From: Andy Shevchenko @ 2024-10-11 15:21 UTC (permalink / raw) To: Geert Uytterhoeven Cc: Andy Shevchenko, David Gow, Andrew Morton, Shuah Khan, Brendan Higgins, Rae Moar, Kees Cook, linux-kselftest, kunit-dev, linux-kernel, Stephen Rothwell, Yury Norov, Rasmus Villemoes, Jason A . Donenfeld, Naveen N . Rao, Anil S Keshavamurthy, David S . Miller, Masami Hiramatsu, Mark Brown, linux-hardening, linux-trace-kernel, Palmer Dabbelt, Christophe Leroy, Charlie Jenkins, Simon Horman, Jakub Kicinski, Arnd Bergmann, Daniel Latypov, Guenter Roeck, David Howells, Mickaël Salaün, Marco Elver, Mark Rutland, Gustavo A. R. Silva, Vlastimil Babka, Nathan Chancellor, Fangrui Song, Steven Rostedt (Google) On Fri, Oct 11, 2024 at 5:20 PM Geert Uytterhoeven <geert@linux-m68k.org> wrote: > On Fri, Oct 11, 2024 at 3:57 PM Andy Shevchenko <andy@kernel.org> wrote: > > On Fri, Oct 11, 2024 at 03:38:00PM +0200, Geert Uytterhoeven wrote: > > > On Fri, Oct 11, 2024 at 12:44 PM Andy Shevchenko <andy@kernel.org> wrote: > > > > On Fri, Oct 11, 2024 at 03:25:07PM +0800, David Gow wrote: ... > > > > > rename lib/{ => tests}/bitfield_kunit.c (100%) > > > > > rename lib/{ => tests}/checksum_kunit.c (100%) > > > > > rename lib/{ => tests}/cmdline_kunit.c (100%) > > > > > rename lib/{ => tests}/cpumask_kunit.c (100%) > > > > > rename lib/{ => tests}/fortify_kunit.c (100%) > > > > > rename lib/{ => tests}/hashtable_test.c (100%) > > > > > rename lib/{ => tests}/is_signed_type_kunit.c (100%) > > > > > rename lib/{ => tests}/kunit_iov_iter.c (100%) > > > > > rename lib/{ => tests}/list-test.c (100%) > > > > > rename lib/{ => tests}/memcpy_kunit.c (100%) > > > > > rename lib/{ => tests}/overflow_kunit.c (100%) > > > > > rename lib/{ => tests}/siphash_kunit.c (100%) > > > > > rename lib/{ => tests}/slub_kunit.c (100%) > > > > > rename lib/{ => tests}/stackinit_kunit.c (100%) > > > > > rename lib/{ => tests}/string_helpers_kunit.c (100%) > > > > > rename lib/{ => tests}/string_kunit.c (100%) > > > > > rename lib/{ => tests}/test_bits.c (100%) > > > > > rename lib/{ => tests}/test_fprobe.c (100%) > > > > > rename lib/{ => tests}/test_hash.c (100%) > > > > > rename lib/{ => tests}/test_kprobes.c (100%) > > > > > rename lib/{ => tests}/test_linear_ranges.c (100%) > > > > > rename lib/{ => tests}/test_list_sort.c (100%) > > > > > rename lib/{ => tests}/test_sort.c (100%) > > > > > rename lib/{ => tests}/usercopy_kunit.c (100%) > > > > > > > > While I support the idea, I think this adds an additional churn in creating a > > > > duplicate 'test' in the filenames. Why they all can't be cut while removing? > > > > (at least this question is not answered in the commit message) > > > > > > To avoid duplicate *.ko file names? > > > > With what? Sorry, but I don't see how it's a problem. These are test cases. > > Do they use kernel command line parameters? If so, shouldn't KUnit take care > > about it in a more proper way? > > If .e.g. lib/list_sort.o could be modular, its module would be called > "list_sort.ko", conflicting with the "list_sort.ko" test module. Can't this be solved by automatically adding a prefix in Makefile for kunit tests, for example? -- With Best Regards, Andy Shevchenko ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 3/6] lib: Move KUnit tests into tests/ subdirectory 2024-10-11 15:21 ` Andy Shevchenko @ 2024-10-11 16:29 ` Christophe Leroy 2024-10-11 17:22 ` Andy Shevchenko 0 siblings, 1 reply; 11+ messages in thread From: Christophe Leroy @ 2024-10-11 16:29 UTC (permalink / raw) To: Andy Shevchenko, Geert Uytterhoeven Cc: Andy Shevchenko, David Gow, Andrew Morton, Shuah Khan, Brendan Higgins, Rae Moar, Kees Cook, linux-kselftest, kunit-dev, linux-kernel, Stephen Rothwell, Yury Norov, Rasmus Villemoes, Jason A . Donenfeld, Naveen N . Rao, Anil S Keshavamurthy, David S . Miller, Masami Hiramatsu, Mark Brown, linux-hardening, linux-trace-kernel, Palmer Dabbelt, Charlie Jenkins, Simon Horman, Jakub Kicinski, Arnd Bergmann, Daniel Latypov, Guenter Roeck, David Howells, Mickaël Salaün, Marco Elver, Mark Rutland, Gustavo A. R. Silva, Vlastimil Babka, Nathan Chancellor, Fangrui Song, Steven Rostedt (Google) Le 11/10/2024 à 17:21, Andy Shevchenko a écrit : > [Vous ne recevez pas souvent de courriers de andy.shevchenko@gmail.com. Découvrez pourquoi ceci est important à https://aka.ms/LearnAboutSenderIdentification ] > > On Fri, Oct 11, 2024 at 5:20 PM Geert Uytterhoeven <geert@linux-m68k.org> wrote: >> On Fri, Oct 11, 2024 at 3:57 PM Andy Shevchenko <andy@kernel.org> wrote: >>> On Fri, Oct 11, 2024 at 03:38:00PM +0200, Geert Uytterhoeven wrote: >>>> On Fri, Oct 11, 2024 at 12:44 PM Andy Shevchenko <andy@kernel.org> wrote: >>>>> On Fri, Oct 11, 2024 at 03:25:07PM +0800, David Gow wrote: > > ... > >>>>>> rename lib/{ => tests}/bitfield_kunit.c (100%) >>>>>> rename lib/{ => tests}/checksum_kunit.c (100%) >>>>>> rename lib/{ => tests}/cmdline_kunit.c (100%) >>>>>> rename lib/{ => tests}/cpumask_kunit.c (100%) >>>>>> rename lib/{ => tests}/fortify_kunit.c (100%) >>>>>> rename lib/{ => tests}/hashtable_test.c (100%) >>>>>> rename lib/{ => tests}/is_signed_type_kunit.c (100%) >>>>>> rename lib/{ => tests}/kunit_iov_iter.c (100%) >>>>>> rename lib/{ => tests}/list-test.c (100%) >>>>>> rename lib/{ => tests}/memcpy_kunit.c (100%) >>>>>> rename lib/{ => tests}/overflow_kunit.c (100%) >>>>>> rename lib/{ => tests}/siphash_kunit.c (100%) >>>>>> rename lib/{ => tests}/slub_kunit.c (100%) >>>>>> rename lib/{ => tests}/stackinit_kunit.c (100%) >>>>>> rename lib/{ => tests}/string_helpers_kunit.c (100%) >>>>>> rename lib/{ => tests}/string_kunit.c (100%) >>>>>> rename lib/{ => tests}/test_bits.c (100%) >>>>>> rename lib/{ => tests}/test_fprobe.c (100%) >>>>>> rename lib/{ => tests}/test_hash.c (100%) >>>>>> rename lib/{ => tests}/test_kprobes.c (100%) >>>>>> rename lib/{ => tests}/test_linear_ranges.c (100%) >>>>>> rename lib/{ => tests}/test_list_sort.c (100%) >>>>>> rename lib/{ => tests}/test_sort.c (100%) >>>>>> rename lib/{ => tests}/usercopy_kunit.c (100%) >>>>> >>>>> While I support the idea, I think this adds an additional churn in creating a >>>>> duplicate 'test' in the filenames. Why they all can't be cut while removing? >>>>> (at least this question is not answered in the commit message) >>>> >>>> To avoid duplicate *.ko file names? >>> >>> With what? Sorry, but I don't see how it's a problem. These are test cases. >>> Do they use kernel command line parameters? If so, shouldn't KUnit take care >>> about it in a more proper way? >> >> If .e.g. lib/list_sort.o could be modular, its module would be called >> "list_sort.ko", conflicting with the "list_sort.ko" test module. But as it is now in lib/tests/, the module will also be installed in tests/ subdir, so it shouldn't clash anymore ? You'd have: /lib/modules/lib/list_sort.ko and /lib/modules/lib/tests/list_sort.ko Or did I miss something ? > > Can't this be solved by automatically adding a prefix in Makefile for > kunit tests, for example? > > -- > With Best Regards, > Andy Shevchenko ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 3/6] lib: Move KUnit tests into tests/ subdirectory 2024-10-11 16:29 ` Christophe Leroy @ 2024-10-11 17:22 ` Andy Shevchenko 0 siblings, 0 replies; 11+ messages in thread From: Andy Shevchenko @ 2024-10-11 17:22 UTC (permalink / raw) To: Christophe Leroy Cc: Geert Uytterhoeven, David Gow, Andrew Morton, Shuah Khan, Brendan Higgins, Rae Moar, Kees Cook, linux-kselftest, kunit-dev, linux-kernel, Stephen Rothwell, Yury Norov, Rasmus Villemoes, Jason A . Donenfeld, Naveen N . Rao, Anil S Keshavamurthy, David S . Miller, Masami Hiramatsu, Mark Brown, linux-hardening, linux-trace-kernel, Palmer Dabbelt, Charlie Jenkins, Simon Horman, Jakub Kicinski, Arnd Bergmann, Daniel Latypov, Guenter Roeck, David Howells, Mickaël Salaün, Marco Elver, Mark Rutland, Gustavo A. R. Silva, Vlastimil Babka, Nathan Chancellor, Fangrui Song, Steven Rostedt (Google) On Fri, Oct 11, 2024 at 06:29:49PM +0200, Christophe Leroy wrote: > Le 11/10/2024 à 17:21, Andy Shevchenko a écrit : > > [Vous ne recevez pas souvent de courriers de andy.shevchenko@gmail.com. Découvrez pourquoi ceci est important à https://aka.ms/LearnAboutSenderIdentification ] > > > > On Fri, Oct 11, 2024 at 5:20 PM Geert Uytterhoeven <geert@linux-m68k.org> wrote: > > > On Fri, Oct 11, 2024 at 3:57 PM Andy Shevchenko <andy@kernel.org> wrote: > > > > On Fri, Oct 11, 2024 at 03:38:00PM +0200, Geert Uytterhoeven wrote: > > > > > On Fri, Oct 11, 2024 at 12:44 PM Andy Shevchenko <andy@kernel.org> wrote: > > > > > > On Fri, Oct 11, 2024 at 03:25:07PM +0800, David Gow wrote: ... > > > > > > > rename lib/{ => tests}/bitfield_kunit.c (100%) > > > > > > > rename lib/{ => tests}/checksum_kunit.c (100%) > > > > > > > rename lib/{ => tests}/cmdline_kunit.c (100%) > > > > > > > rename lib/{ => tests}/cpumask_kunit.c (100%) > > > > > > > rename lib/{ => tests}/fortify_kunit.c (100%) > > > > > > > rename lib/{ => tests}/hashtable_test.c (100%) > > > > > > > rename lib/{ => tests}/is_signed_type_kunit.c (100%) > > > > > > > rename lib/{ => tests}/kunit_iov_iter.c (100%) > > > > > > > rename lib/{ => tests}/list-test.c (100%) > > > > > > > rename lib/{ => tests}/memcpy_kunit.c (100%) > > > > > > > rename lib/{ => tests}/overflow_kunit.c (100%) > > > > > > > rename lib/{ => tests}/siphash_kunit.c (100%) > > > > > > > rename lib/{ => tests}/slub_kunit.c (100%) > > > > > > > rename lib/{ => tests}/stackinit_kunit.c (100%) > > > > > > > rename lib/{ => tests}/string_helpers_kunit.c (100%) > > > > > > > rename lib/{ => tests}/string_kunit.c (100%) > > > > > > > rename lib/{ => tests}/test_bits.c (100%) > > > > > > > rename lib/{ => tests}/test_fprobe.c (100%) > > > > > > > rename lib/{ => tests}/test_hash.c (100%) > > > > > > > rename lib/{ => tests}/test_kprobes.c (100%) > > > > > > > rename lib/{ => tests}/test_linear_ranges.c (100%) > > > > > > > rename lib/{ => tests}/test_list_sort.c (100%) > > > > > > > rename lib/{ => tests}/test_sort.c (100%) > > > > > > > rename lib/{ => tests}/usercopy_kunit.c (100%) > > > > > > > > > > > > While I support the idea, I think this adds an additional churn in creating a > > > > > > duplicate 'test' in the filenames. Why they all can't be cut while removing? > > > > > > (at least this question is not answered in the commit message) > > > > > > > > > > To avoid duplicate *.ko file names? > > > > > > > > With what? Sorry, but I don't see how it's a problem. These are test cases. > > > > Do they use kernel command line parameters? If so, shouldn't KUnit take care > > > > about it in a more proper way? > > > > > > If .e.g. lib/list_sort.o could be modular, its module would be called > > > "list_sort.ko", conflicting with the "list_sort.ko" test module. > > But as it is now in lib/tests/, the module will also be installed in tests/ > subdir, so it shouldn't clash anymore ? > > You'd have: > > /lib/modules/lib/list_sort.ko and > /lib/modules/lib/tests/list_sort.ko > > Or did I miss something ? I believe Geert is talking about `modprobe list-sort` in the userspace. Which one will be loaded? > > Can't this be solved by automatically adding a prefix in Makefile for > > kunit tests, for example? -- With Best Regards, Andy Shevchenko ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 3/6] lib: Move KUnit tests into tests/ subdirectory 2024-10-11 7:25 ` [PATCH 3/6] lib: Move KUnit tests into tests/ subdirectory David Gow 2024-10-11 9:17 ` Vlastimil Babka 2024-10-11 10:44 ` Andy Shevchenko @ 2024-10-11 17:20 ` Kees Cook 2 siblings, 0 replies; 11+ messages in thread From: Kees Cook @ 2024-10-11 17:20 UTC (permalink / raw) To: David Gow Cc: Andrew Morton, Shuah Khan, Brendan Higgins, Rae Moar, linux-kselftest, kunit-dev, linux-kernel, Stephen Rothwell, Yury Norov, Rasmus Villemoes, Jason A . Donenfeld, Andy Shevchenko, Naveen N . Rao, Anil S Keshavamurthy, David S . Miller, Masami Hiramatsu, Mark Brown, linux-hardening, linux-trace-kernel, Palmer Dabbelt, Christophe Leroy, Charlie Jenkins, Simon Horman, Jakub Kicinski, Arnd Bergmann, Daniel Latypov, Guenter Roeck, David Howells, Mickaël Salaün, Marco Elver, Mark Rutland, Gustavo A. R. Silva, Vlastimil Babka, Geert Uytterhoeven, Nathan Chancellor, Fangrui Song, Steven Rostedt (Google) On Fri, Oct 11, 2024 at 03:25:07PM +0800, David Gow wrote: > From: Kees Cook <kees@kernel.org> > > Following from the recent KUnit file naming discussion[1], move all > KUnit tests in lib/ into lib/tests/. Thanks for picking this up! I hadn't had time to resend it. :) -- Kees Cook ^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2024-10-15 5:05 UTC | newest] Thread overview: 11+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2024-10-15 5:04 [PATCH 3/6] lib: Move KUnit tests into tests/ subdirectory kernel test robot -- strict thread matches above, loose matches on Subject: below -- 2024-10-11 7:25 [PATCH 0/6] KUnit test moves / renames David Gow 2024-10-11 7:25 ` [PATCH 3/6] lib: Move KUnit tests into tests/ subdirectory David Gow 2024-10-11 9:17 ` Vlastimil Babka 2024-10-11 10:44 ` Andy Shevchenko 2024-10-11 13:38 ` Geert Uytterhoeven 2024-10-11 13:57 ` Andy Shevchenko 2024-10-11 14:14 ` Geert Uytterhoeven 2024-10-11 15:21 ` Andy Shevchenko 2024-10-11 16:29 ` Christophe Leroy 2024-10-11 17:22 ` Andy Shevchenko 2024-10-11 17:20 ` Kees Cook
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.