Re: [PATCH 1/6] lib: math: Move kunit tests into tests/ subdir
On Thu, 7 Nov 2024 at 15:34, Geert Uytterhoeven wrote: > > Hi Andrew, > > On Wed, Nov 6, 2024 at 10:17 PM Andrew Morton > wrote: > > On Wed, 6 Nov 2024 09:33:55 +0100 Geert Uytterhoeven > > wrote: > > > > This conflicts with "[PATCH] m68k: defconfig: Update defconfigs for > > > > v6.12-rc1"[1]. Of course the proper way forward would be to add > > > > "default KUNIT_ALL_TESTS" to all tests that still lack it, so I can > > > > just never queue that patch ;-) > > > > > > What's the status of this series? I am asking because I am wondering if > > > I should queue [1] for v6.13, or just drop it, and send a patch to add > > > "default KUNIT_ALL_TESTS" instead. > > > > > > I saw the email from Andrew stating he applied it to his tree[2], > > > but that seems to have been dropped silently, and never made it into > > > linux-next? > > > > Yes, sorry. Believe it or not, I do try to avoid spraying out too many > > emails. David will recall better than I, but things got messy. > > https://lkml.kernel.org/r/[email protected] was > > perhaps the cause. > > Fair enough. > > > I'm sure David can being us up to date. > > Probably the best solution is to respin after v6.13-rc1, to be included > in v6.13-rc2. > Sorry about the delay, for some reason these were getting caught in my spam filter... Yeah, I think that's probably best. I'll go through and do a new version post rc1. In general, my preferred option is to use the 'default KUNIT_ALL_TESTS' where possible. I'm sure there'll be some tests where it makes sense to _not_ enable them by default, but we should where we can. Ultimately, it's up to the test maintainer, though. -- David -- David smime.p7s Description: S/MIME Cryptographic Signature
Re: [PATCH 1/6] lib: math: Move kunit tests into tests/ subdir
Hi Andrew, On Wed, Nov 6, 2024 at 10:17 PM Andrew Morton wrote: > On Wed, 6 Nov 2024 09:33:55 +0100 Geert Uytterhoeven > wrote: > > > This conflicts with "[PATCH] m68k: defconfig: Update defconfigs for > > > v6.12-rc1"[1]. Of course the proper way forward would be to add > > > "default KUNIT_ALL_TESTS" to all tests that still lack it, so I can > > > just never queue that patch ;-) > > > > What's the status of this series? I am asking because I am wondering if > > I should queue [1] for v6.13, or just drop it, and send a patch to add > > "default KUNIT_ALL_TESTS" instead. > > > > I saw the email from Andrew stating he applied it to his tree[2], > > but that seems to have been dropped silently, and never made it into > > linux-next? > > Yes, sorry. Believe it or not, I do try to avoid spraying out too many > emails. David will recall better than I, but things got messy. > https://lkml.kernel.org/r/[email protected] was > perhaps the cause. Fair enough. > I'm sure David can being us up to date. Probably the best solution is to respin after v6.13-rc1, to be included in v6.13-rc2. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected] 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
Re: [PATCH 1/6] lib: math: Move kunit tests into tests/ subdir
On Wed, 6 Nov 2024 09:33:55 +0100 Geert Uytterhoeven wrote: > Hi all, > > This conflicts with "[PATCH] m68k: defconfig: Update defconfigs for > > v6.12-rc1"[1]. Of course the proper way forward would be to add > > "default KUNIT_ALL_TESTS" to all tests that still lack it, so I can > > just never queue that patch ;-) > > What's the status of this series? I am asking because I am wondering if > I should queue [1] for v6.13, or just drop it, and send a patch to add > "default KUNIT_ALL_TESTS" instead. > > I saw the email from Andrew stating he applied it to his tree[2], > but that seems to have been dropped silently, and never made it into > linux-next? Yes, sorry. Believe it or not, I do try to avoid spraying out too many emails. David will recall better than I, but things got messy. https://lkml.kernel.org/r/[email protected] was perhaps the cause. I'm sure David can being us up to date.
Re: [PATCH 1/6] lib: math: Move kunit tests into tests/ subdir
Hi all, On Fri, Oct 11, 2024 at 10:59 AM Geert Uytterhoeven wrote: > On Fri, Oct 11, 2024 at 9:31 AM David Gow wrote: > > From: Luis Felipe Hernandez > > > > This patch is a follow-up task from a discussion stemming from point 3 > > in a recent patch introducing the int_pow kunit test [1] and > > documentation regarding kunit test style and nomenclature [2]. > > > > Colocate all kunit test suites in lib/math/tests/ and > > follow recommended naming convention for files _kunit.c > > and kconfig entries CONFIG__KUNIT_TEST. > > > > Link: > > https://lore.kernel.org/all/CABVgOS=-vh5TqHFCq_jo=ffq8v_nggr6jspnozag3e6+19y...@mail.gmail.com/ > > [1] > > Link: https://docs.kernel.org/dev-tools/kunit/style.html [2] > > > > Signed-off-by: Luis Felipe Hernandez > > Acked-by: Nicolas Pitre > > [Rebased on top of mm-nonmm-unstable.] > > Signed-off-by: David Gow > > --- a/lib/Kconfig.debug > > +++ b/lib/Kconfig.debug > > @@ -2296,7 +2296,7 @@ config TEST_SORT > > > > If unsure, say N. > > > > -config TEST_DIV64 > > +config DIV64_KUNIT_TEST > > tristate "64bit/32bit division and modulo test" > > depends on DEBUG_KERNEL || m > > help > > @@ -2306,7 +2306,7 @@ config TEST_DIV64 > > > > If unsure, say N. > > > > -config TEST_MULDIV64 > > +config MULDIV64_KUNIT_TEST > > tristate "mul_u64_u64_div_u64() test" > > depends on DEBUG_KERNEL || m > > help > > This conflicts with "[PATCH] m68k: defconfig: Update defconfigs for > v6.12-rc1"[1]. Of course the proper way forward would be to add > "default KUNIT_ALL_TESTS" to all tests that still lack it, so I can > just never queue that patch ;-) What's the status of this series? I am asking because I am wondering if I should queue [1] for v6.13, or just drop it, and send a patch to add "default KUNIT_ALL_TESTS" instead. I saw the email from Andrew stating he applied it to his tree[2], but that seems to have been dropped silently, and never made it into linux-next? Thanks! > > @@ -2993,7 +2993,7 @@ config TEST_OBJPOOL > > > > If unsure, say N. > > > > -config INT_POW_TEST > > +config INT_POW_KUNIT_TEST > > tristate "Integer exponentiation (int_pow) test" if !KUNIT_ALL_TESTS > > depends on KUNIT > > default KUNIT_ALL_TESTS > > [1] > https://lore.kernel.org/all/4092672cb64b86ec3f300b4cf0ea0c2db2b52e2e.1727699197.git.ge...@linux-m68k.org/ [2] https://lore.kernel.org/all/[email protected]/ Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected] 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
Re: [PATCH 1/6] lib: math: Move kunit tests into tests/ subdir
Hi David,
On Fri, Oct 11, 2024 at 9:31 AM David Gow wrote:
> From: Luis Felipe Hernandez
>
> This patch is a follow-up task from a discussion stemming from point 3
> in a recent patch introducing the int_pow kunit test [1] and
> documentation regarding kunit test style and nomenclature [2].
>
> Colocate all kunit test suites in lib/math/tests/ and
> follow recommended naming convention for files _kunit.c
> and kconfig entries CONFIG__KUNIT_TEST.
>
> Link:
> https://lore.kernel.org/all/CABVgOS=-vh5TqHFCq_jo=ffq8v_nggr6jspnozag3e6+19y...@mail.gmail.com/
> [1]
> Link: https://docs.kernel.org/dev-tools/kunit/style.html [2]
>
> Signed-off-by: Luis Felipe Hernandez
> Acked-by: Nicolas Pitre
> [Rebased on top of mm-nonmm-unstable.]
> Signed-off-by: David Gow
Thanks for your patch!
> --- a/arch/m68k/configs/amiga_defconfig
> +++ b/arch/m68k/configs/amiga_defconfig
> @@ -619,7 +619,7 @@ CONFIG_KUNIT=m
> CONFIG_KUNIT_ALL_TESTS=m
> CONFIG_TEST_DHRY=m
> CONFIG_TEST_MIN_HEAP=m
> -CONFIG_TEST_DIV64=m
> +CONFIG_DIV64_KUNIT_TEST=m
> CONFIG_REED_SOLOMON_TEST=m
> CONFIG_ATOMIC64_SELFTEST=m
> CONFIG_ASYNC_RAID6_TEST=m
[...]
> --- a/lib/Kconfig.debug
> +++ b/lib/Kconfig.debug
> @@ -2296,7 +2296,7 @@ config TEST_SORT
>
> If unsure, say N.
>
> -config TEST_DIV64
> +config DIV64_KUNIT_TEST
> tristate "64bit/32bit division and modulo test"
> depends on DEBUG_KERNEL || m
> help
> @@ -2306,7 +2306,7 @@ config TEST_DIV64
>
> If unsure, say N.
>
> -config TEST_MULDIV64
> +config MULDIV64_KUNIT_TEST
> tristate "mul_u64_u64_div_u64() test"
> depends on DEBUG_KERNEL || m
> help
This conflicts with "[PATCH] m68k: defconfig: Update defconfigs for
v6.12-rc1"[1]. Of course the proper way forward would be to add
"default KUNIT_ALL_TESTS" to all tests that still lack it, so I can
just never queue that patch ;-)
> @@ -2993,7 +2993,7 @@ config TEST_OBJPOOL
>
> If unsure, say N.
>
> -config INT_POW_TEST
> +config INT_POW_KUNIT_TEST
> tristate "Integer exponentiation (int_pow) test" if !KUNIT_ALL_TESTS
> depends on KUNIT
> default KUNIT_ALL_TESTS
[1]
https://lore.kernel.org/all/4092672cb64b86ec3f300b4cf0ea0c2db2b52e2e.1727699197.git.ge...@linux-m68k.org/
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
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

