Re: [PATCH RESEND] kunit: qemu_configs: SH: Respect kunit cmdline

2025-04-12 Thread David Gow
uh, that's odd. Anyway, this makes sense as a fix: even if sh eventually decides to do the sane thing and make this default. Reviewed-by: David Gow Cheers, -- David smime.p7s Description: S/MIME Cryptographic Signature

Re: [PATCH 0/3] Fix up building KUnit tests for Cirrus Logic modules

2025-04-11 Thread David Gow
hat > cs_dsp and cs-amp-lib will be included in the test build. > > Patch 2 and 3 fixup the KConfig entries for cs_dsp and cs-amp-lib. This looks great to me. The series is: Reviewed-by: David Gow Do you want us to take this (either the whole thing, or just the first patch) vi

Re: [PATCH] kunit: qemu_configs: Add riscv32 config

2025-04-11 Thread David Gow
On Mon, 7 Apr 2025 at 16:17, Thomas Weißschuh wrote: > > Add a basic config to run kunit tests on riscv32. > > Signed-off-by: Thomas Weißschuh > --- Thanks very much: this is working well here (even if qemu for riscv32 is _slow_ on my machine)! Reviewed-by: David Gow C

Re: [PATCH] kunit: configs: Enable CONFIG_INIT_STACK_ALL_PATTERN in all_tests

2025-04-11 Thread David Gow
itzgerald > --- Hmm... for KASAN, we had a separate config fragment for picking these sorts of things up. Then again, given we've already got stackinit tests, we probably want this anyway, and it's clearly useful to have it as a default. Reviewed-by: David Gow Cheers, -- Davi

Re: [PATCH v4 00/14] Add support for suppressing warning backtraces

2025-04-05 Thread David Gow
gt; Sorry: I also thought this had already landed. I'm definitely in favour of us taking this, though agree that we definitely can't afford to break the s390x build. I've (re-)reviewed the early patches as well, and am generally acking the series (though some of the architectu

Re: Exclude cirrus FW tests from KUNIT_ALL_TESTS

2025-04-04 Thread David Gow
On Fri, 4 Apr 2025 at 01:48, Mark Brown wrote: > > On Thu, Apr 03, 2025 at 05:57:51PM +0100, Richard Fitzgerald wrote: > > On 3/4/25 14:26, Mark Brown wrote: > > > > I've not heard anyone mention hitting the timeouts, though now I run > > > interactively I do see that the Cirrus stuff is a good pr

Re: Exclude cirrus FW tests from KUNIT_ALL_TESTS

2025-04-02 Thread David Gow
On Thu, 3 Apr 2025 at 01:55, 'Mark Brown' via KUnit Development wrote: > > On Wed, Apr 02, 2025 at 10:36:55AM -0700, Jakub Kicinski wrote: > > > The Cirrus tests keep failing for me when run on x86 > > > ./tools/testing/kunit/kunit.py run --alltests --json --arch=x86_64 > > > https://netdev-3.bot

Re: [PATCH] kunit: fixes backtrace suppression test module description

2025-03-29 Thread David Gow
actually lands -- I picked d03d078df162 from the current mm-nonmm-unstable branch.) Nevertheless, I like the content of this, so it should be either accepted or rolled into a new version of the backtrace suppression test. Acked-by: David Gow Cheers, -- David > lib/kunit/backtrace-suppress

Re: [PATCH] kunit: fixes Compilation error on s390

2025-03-29 Thread David Gow
Alessandro Carminati > --- Makes sense and seems to work here. Thanks! Acked-by: David Gow Cheers, -- David > lib/kunit/Kconfig | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/lib/kunit/Kconfig b/lib/kunit/Kconfig > index 201402f0ab49..6c937144dcea 100644 >

Re: [PATCH v4 02/14] kunit: bug: Count suppressed warning backtraces

2025-03-29 Thread David Gow
count resulted in build errors on some > architectures due to include file recursion, so use a plain integer > for now. > > Acked-by: Dan Carpenter > Reviewed-by: Kees Cook > Tested-by: Linux Kernel Functional Testing > Signed-off-by: Guenter Roeck > Reviewed-by:

Re: [PATCH v4 02/14] kunit: bug: Count suppressed warning backtraces

2025-03-29 Thread David Gow
count resulted in build errors on some > architectures due to include file recursion, so use a plain integer > for now. > > Acked-by: Dan Carpenter > Reviewed-by: Kees Cook > Tested-by: Linux Kernel Functional Testing > Signed-off-by: Guenter Roeck > Reviewed-by:

Re: [PATCH v4 06/14] x86: Add support for suppressing warning backtraces

2025-03-29 Thread David Gow
oeck > Signed-off-by: Alessandro Carminati > --- Reviewed-by: David Gow Cheers, -- David > arch/x86/include/asm/bug.h | 21 - > 1 file changed, 16 insertions(+), 5 deletions(-) > > diff --git a/arch/x86/include/asm/bug.h b/arch/x86/include/asm/bug.

Re: [PATCH v4 01/14] bug/kunit: Core support for suppressing warning backtraces

2025-03-29 Thread David Gow
Tested-by: Linux Kernel Functional Testing > Acked-by: Dan Carpenter > Reviewed-by: Kees Cook > Signed-off-by: Guenter Roeck > Signed-off-by: Alessandro Carminati > --- Thanks Guenter & Alessandro: I'm very happy with this. Reviewed-by: David Gow -- David smime.p7s Description: S/MIME Cryptographic Signature

Re: [PATCH v4 06/14] x86: Add support for suppressing warning backtraces

2025-03-29 Thread David Gow
oeck > Signed-off-by: Alessandro Carminati > --- Reviewed-by: David Gow Cheers, -- David > arch/x86/include/asm/bug.h | 21 - > 1 file changed, 16 insertions(+), 5 deletions(-) > > diff --git a/arch/x86/include/asm/bug.h b/arch/x86/include/asm/bug.

Re: [PATCH v4 01/14] bug/kunit: Core support for suppressing warning backtraces

2025-03-29 Thread David Gow
Tested-by: Linux Kernel Functional Testing > Acked-by: Dan Carpenter > Reviewed-by: Kees Cook > Signed-off-by: Guenter Roeck > Signed-off-by: Alessandro Carminati > --- Thanks Guenter & Alessandro: I'm very happy with this. Reviewed-by: David Gow -- David smime.p7s Description: S/MIME Cryptographic Signature

Re: [PATCH v4 03/14] kunit: Add test cases for backtrace warning suppression

2025-03-29 Thread David Gow
actually help to get > the affected architectures / platforms fixed. > > Tested-by: Linux Kernel Functional Testing > Acked-by: Dan Carpenter > Reviewed-by: Kees Cook > Signed-off-by: Guenter Roeck > Signed-off-by: Alessandro Carminati > --- Always nice to have tests. :

Re: [PATCH v4 03/14] kunit: Add test cases for backtrace warning suppression

2025-03-29 Thread David Gow
actually help to get > the affected architectures / platforms fixed. > > Tested-by: Linux Kernel Functional Testing > Acked-by: Dan Carpenter > Reviewed-by: Kees Cook > Signed-off-by: Guenter Roeck > Signed-off-by: Alessandro Carminati > --- Always nice to have tests. :

Re: [PATCH v4 00/14] Add support for suppressing warning backtraces

2025-03-29 Thread David Gow
gt; Sorry: I also thought this had already landed. I'm definitely in favour of us taking this, though agree that we definitely can't afford to break the s390x build. I've (re-)reviewed the early patches as well, and am generally acking the series (though some of the architectu

Re: [PATCH/RFC] kunit/rtc: Add real support for very slow tests

2025-03-28 Thread David Gow
Hi Geert, Thanks for sending this out: I think this raises some good questions about exactly how to handle long running tests (particularly on older/slower hardware). I've put a few notes below, but, tl;dr: I think these are all good changes, even if there's more we can do to better scale to slow

Re: [PATCH] kunit: Spelling s/slowm/slow/

2025-03-27 Thread David Gow
On Thu, 27 Mar 2025 at 23:33, Geert Uytterhoeven wrote: > > Fix a misspelling of "slow". > > Signed-off-by: Geert Uytterhoeven > --- Reviewed-by: David Gow Cheers, -- David > include/kunit/test.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >

Re: [PATCH v4 08/16] rust: kunit: refactor to use `&raw [const|mut]`

2025-03-27 Thread David Gow
On Fri, 21 Mar 2025 at 07:16, Miguel Ojeda wrote: > > On Tue, Mar 18, 2025 at 9:02 AM David Gow wrote: > > > > In general, I think changes such as those in this series are going to > > get progressively more prone to conflicts as Rust is adopted by other > > subsys

Re: [PATCH v8 0/3] rust: kunit: Support KUnit tests with a user-space like syntax

2025-03-24 Thread David Gow
On Thu, 20 Mar 2025 at 19:24, Miguel Ojeda wrote: > > On Fri, Mar 7, 2025 at 10:01 AM David Gow wrote: > > > > This is v8 of the Rust/KUnit integration patch. I think all of the > > suggestions have at least been responded to (even if there are a few I'm > > l

Re: [PATCH] kunit: tool: fix count of tests if late test plan

2025-03-20 Thread David Gow
2 tests > > Change this to be 1 passed, 1 error: total count of 1 test > > Signed-off-by: Rae Moar > --- Thanks! Reviewed-by: David Gow Cheers, -- David > tools/testing/kunit/kunit_parser.py| 4 > tools/testing/kunit/kunit_tool_test.py | 4 ++-- > 2 files cha

Re: [PATCH v8 0/3] rust: kunit: Support KUnit tests with a user-space like syntax

2025-03-18 Thread David Gow
On Fri, 7 Mar 2025 at 17:01, David Gow wrote: > > Hi all, > > This is v8 of the Rust/KUnit integration patch. I think all of the > suggestions have at least been responded to (even if there are a few I'm > leaving as either future projects or matters of taste). Hopefully t

Re: [PATCH v4 08/16] rust: kunit: refactor to use `&raw [const|mut]`

2025-03-18 Thread David Gow
on of having to learn yet another new syntax, I have no objections to this patch in particular. Reviewed-by: David Gow Thanks (and sorry for the grumpiness: don't take it personally), -- David [1]: https://lore.kernel.org/rust-for-linux/20250307090103.918788-1-david...@google.com/ smime.p7s Description: S/MIME Cryptographic Signature

Re: [PATCH 1/2] rust: pass correct target to bindgen on Usermode Linux

2025-03-18 Thread David Gow
On Sat, 8 Feb 2025 at 21:32, Thomas Weißschuh wrote: > > Usermode Linux uses "um" as primary architecture name and the underlying > physical architecture is provided in "SUBARCH". > Resolve the target architecture flags through that underlying architecture. > This is the same pattern as used by sc

Re: [PATCH v3 2/2] kunit: tool: add test to check parsing late test plan

2025-03-13 Thread David Gow
On Fri, 14 Mar 2025 at 03:27, Rae Moar wrote: > > Add test to check for the infinite loop caused by the inability > to parse a late test plan. > > The test parses the following output: > TAP version 13 > ok 4 test4 > 1..4 > > Signed-off-by: Rae Moar > ---

Re: [PATCH v9] Kunit to check the longest symbol length

2025-03-13 Thread David Gow
ez Reboredo > Reviewed-by: Shuah Khan > Reviewed-by: Rae Moar > Signed-off-by: Sergio González Collado > Link: https://github.com/Rust-for-Linux/linux/issues/504 > --- Acked-by: David Gow I suspect that this might end up finding issues with some tools, so I'd not be surprise

Re: [PATCH v3 1/2] kunit: tool: Fix bug in parsing test plan

2025-03-13 Thread David Gow
> > Fix this bug by parsing test plan line to avoid the infinite loop. > > Signed-off-by: Rae Moar > --- Reviewed-by: David Gow Cheers, smime.p7s Description: S/MIME Cryptographic Signature

Re: Error during --arch x86_64 kunit test run

2025-03-12 Thread David Gow
On Thu, 13 Mar 2025 at 07:51, Shuah Khan wrote: > > On 3/12/25 16:52, David Gow wrote: > > Hi Shuah, > > > > On Thu, 13 Mar 2025 at 05:14, Shuah Khan wrote: > >> > >> David, Brendan, Rae, > >> > >> I am seeing the following error wh

Re: Error during --arch x86_64 kunit test run

2025-03-12 Thread David Gow
Hi Shuah, On Thu, 13 Mar 2025 at 05:14, Shuah Khan wrote: > > David, Brendan, Rae, > > I am seeing the following error when I run > > ./tools/testing/kunit/kunit.py run --arch x86_64 > > ERROR:root:ld:arch/x86/realmode/rm/realmode.lds:236: undefined symbol > `sev_es_trampoline_start' referenced

Re: [PATCH v2] kunit: tool: Fix bug in parsing test plan

2025-03-08 Thread David Gow
t; > Fix this bug to correctly parse test plan line. > > Signed-off-by: Rae Moar > --- Looks good. I agree with Brendan that this probably should have a test, but I'm happy to take that as a follow-up if you prefer. Reviewed-by: David Gow Cheers, -- David > Changes sin

[PATCH v8 3/3] rust: kunit: allow to know if we are in a test

2025-03-07 Thread David Gow
loped-by: David Gow Signed-off-by: David Gow --- Changes since v7: https://lore.kernel.org/rust-for-linux/20250214074051.1619256-4-david...@google.com/ - Remove the second example, which shadowed a function in order to mock it, as it was (a) unclear that it is only useful for code in the same

[PATCH v8 2/3] rust: macros: add macro to easily run KUnit tests

2025-03-07 Thread David Gow
only difference with user-space tests is that instead of using `#[cfg(test)]`, `#[kunit_tests(kunit_test_suit_name)]` is used. Note that `#[cfg(CONFIG_KUNIT)]` is added so the test module is not compiled when `CONFIG_KUNIT` is set to `n`. Reviewed-by: David Gow Signed-off-by: José Expósito Co

[PATCH v8 1/3] rust: kunit: add KUnit case and suite macros

2025-03-07 Thread David Gow
on their own, a future patch will introduce another macro to create KUnit tests using a user-space like syntax. Signed-off-by: José Expósito Co-developed-by: Matt Gilbride Signed-off-by: Matt Gilbride Co-developed-by: Miguel Ojeda Signed-off-by: Miguel Ojeda Co-developed-by: David Gow Signed

[PATCH v8 0/3] rust: kunit: Support KUnit tests with a user-space like syntax

2025-03-07 Thread David Gow
Hi all, This is v8 of the Rust/KUnit integration patch. I think all of the suggestions have at least been responded to (even if there are a few I'm leaving as either future projects or matters of taste). Hopefully this is good-to-go for 6.15, so we can start using it concurrently with making any a

Re: [brauner-github:vfs.all 205/231] WARNING: modpost: vmlinux: section mismatch in reference: initramfs_test_cases+0x0 (section: .data) -> initramfs_test_extract (section: .init.text)

2025-03-06 Thread David Gow
On Wed, 5 Mar 2025 at 20:56, David Disseldorp wrote: > > On Wed, 5 Mar 2025 11:47:01 +1100, David Disseldorp wrote: > > > [cc'ing linux-kselftest and kunit-dev] > > > > Hi, > > > > On Wed, 5 Mar 2025 01:47:55 +0800, kernel test robot wrote: > > > > > tree: https://github.com/brauner/linux.git vf

Re: [PATCH v2] kbuild: clang: Support building UM with SUBARCH=i386

2025-03-06 Thread David Gow
ly not be required, as I think UML doesn't use any of the strange -mregparm calling convention stuff which appears to be what breaks FORTIFY_SOURCE here.) Regardless, Tested-by: David Gow Cheers, -- David > Cc: Nathan Chancellor > Cc: Thomas Weißschuh > Cc: Bill Wendling > Cc: Jus

Re: [PATCH] kunit: tool: Fix bug in parsing test plan

2025-03-06 Thread David Gow
On Thu, 6 Mar 2025 at 08:29, Rae Moar wrote: > > A bug was identified where the KTAP below caused an infinite loop: > > TAP version 13 > ok 4 test_case > 1..4 > > The infinite loop was caused by the parser not parsing a test plan > if following a test result line. > > Fix bug to correctly parse

Re: [PATCH v6 1/3] rust: kunit: add KUnit case and suite macros

2025-02-18 Thread David Gow
On Sat, 15 Feb 2025 at 21:01, Tamir Duberstein wrote: > > On Sat, Feb 15, 2025 at 4:03 AM David Gow wrote: > > > > On Fri, 14 Feb 2025 at 22:41, Tamir Duberstein wrote: > > > > > > Very excited to see this progress. > > > > >

Re: [PATCH v6 3/3] rust: kunit: allow to know if we are in a test

2025-02-18 Thread David Gow
On Sat, 15 Feb 2025 at 21:04, Tamir Duberstein wrote: > > On Sat, Feb 15, 2025 at 4:03 AM David Gow wrote: > > > > On Fri, 14 Feb 2025 at 22:41, Tamir Duberstein wrote: > > > > > > On Fri, Feb 14, 2025 at 2:42 AM David Gow wrote: > > > > >

Re: [PATCH 00/12] kunit: Introduce UAPI testing framework

2025-02-18 Thread David Gow
On Mon, 17 Feb 2025 at 19:00, Thomas Weißschuh wrote: > > Currently testing of userspace and in-kernel API use two different > frameworks. kselftests for the userspace ones and Kunit for the > in-kernel ones. Besides their different scopes, both have different > strengths and limitations: > > Kuni

Re: [PATCH] kunit: Clarify kunit_skip() argument name

2025-02-17 Thread David Gow
rodsky > --- > Cc: Brendan Higgins > Cc: David Gow > Cc: Rae Moar > Cc: linux-kselft...@vger.kernel.org > --- Thanks. We probably should support skipping (the rest of) a suite, but let's not pretend we do when we don't! Reviewed-by: David Gow Cheers, -- David

Re: [PATCH] kunit: tool: Build GDB scripts

2025-02-17 Thread David Gow
.kunitconfig files definitely won't.) Regardless, this is a distinct improvement for now, so: Reviewed-by: David Gow Cheers, -- David > tools/testing/kunit/kunit_kernel.py | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/tools/testing/kun

Re: [PATCH v6 0/3] rust: kunit: Support KUnit tests with a user-space like syntax

2025-02-15 Thread David Gow
On Sat, 15 Feb 2025 at 04:49, Miguel Ojeda wrote: > > On Fri, Feb 14, 2025 at 8:41 AM David Gow wrote: > > > > After much delay, v6 of the KUnit/Rust integration patchset is here. > > This change incorporates most of Miguels suggestions from v5 (save for > > s

[PATCH v7 3/3] rust: kunit: allow to know if we are in a test

2025-02-15 Thread David Gow
loped-by: David Gow Signed-off-by: David Gow --- Changes since v6: https://lore.kernel.org/rust-for-linux/20250214074051.1619256-4-david...@google.com/ - Doc comments now have a useful link. (Thanks, Tamir!) - A small tidy-up to limit unsafe usage. (Thanks, Tamir!) Changes since v5: https://lore.ke

[PATCH v7 2/3] rust: macros: add macro to easily run KUnit tests

2025-02-15 Thread David Gow
only difference with user-space tests is that instead of using `#[cfg(test)]`, `#[kunit_tests(kunit_test_suit_name)]` is used. Note that `#[cfg(CONFIG_KUNIT)]` is added so the test module is not compiled when `CONFIG_KUNIT` is set to `n`. Reviewed-by: David Gow Signed-off-by: José Expósito Co

[PATCH v7 1/3] rust: kunit: add KUnit case and suite macros

2025-02-15 Thread David Gow
on their own, a future patch will introduce another macro to create KUnit tests using a user-space like syntax. Signed-off-by: José Expósito Co-developed-by: Matt Gilbride Signed-off-by: Matt Gilbride Co-developed-by: Miguel Ojeda Signed-off-by: Miguel Ojeda Co-developed-by: David Gow Signed

[PATCH v7 0/3] rust: kunit: Support KUnit tests with a user-space like syntax

2025-02-15 Thread David Gow
Hi all, This is v7 of the Rust/KUnit integration patch. I think all of the suggestions have at least been responded to (even if there are a few I'm leaving as either future projects or matters of taste). Hopefully this is good-to-go for 6.15, so we can start using it concurrently with making any a

Re: [PATCH v6 3/3] rust: kunit: allow to know if we are in a test

2025-02-15 Thread David Gow
On Fri, 14 Feb 2025 at 22:41, Tamir Duberstein wrote: > > On Fri, Feb 14, 2025 at 2:42 AM David Gow wrote: > > > > From: José Expósito > > > > In some cases, we need to call test-only code from outside the test > > case, for example, to mock a function or

Re: [PATCH v6 1/3] rust: kunit: add KUnit case and suite macros

2025-02-15 Thread David Gow
On Fri, 14 Feb 2025 at 22:41, Tamir Duberstein wrote: > > Very excited to see this progress. > > On Fri, Feb 14, 2025 at 2:41 AM David Gow wrote: > > > > From: José Expósito > > > > Add a couple of Rust const functions and macros to allow to develop > >

Re: [PATCH] kunit: qemu_configs: sparc: use Zilog console

2025-02-14 Thread David Gow
, is the one documented > by the QEMU manual and also saves a bit of codesize: > Before=4051011, After=4023326, chg -0.68% > > Observed on QEMU 9.2.0. > > Fixes: 87c9c1631788 ("kunit: tool: add support for QEMU") > Signed-off-by: Thomas Weißschuh > --- Thanks v

[PATCH v6 3/3] rust: kunit: allow to know if we are in a test

2025-02-13 Thread David Gow
and then the current thread's running KUnit test. Add a safe wrapper function around this to know whether or not we are in a KUnit test and examples showing how to mock a function and a module. Signed-off-by: José Expósito Co-developed-by: David Gow Signed-off-by: David Gow Co-developed-by

[PATCH v6 2/3] rust: macros: add macro to easily run KUnit tests

2025-02-13 Thread David Gow
only difference with user-space tests is that instead of using `#[cfg(test)]`, `#[kunit_tests(kunit_test_suit_name)]` is used. Note that `#[cfg(CONFIG_KUNIT)]` is added so the test module is not compiled when `CONFIG_KUNIT` is set to `n`. Reviewed-by: David Gow Signed-off-by: José Expósito Co

[PATCH v6 1/3] rust: kunit: add KUnit case and suite macros

2025-02-13 Thread David Gow
on their own, a future patch will introduce another macro to create KUnit tests using a user-space like syntax. Signed-off-by: José Expósito Co-developed-by: Matt Gilbride Signed-off-by: Matt Gilbride Co-developed-by: Miguel Ojeda Signed-off-by: Miguel Ojeda Co-developed-by: David Gow Signed

[PATCH v6 0/3] rust: kunit: Support KUnit tests with a user-space like syntax

2025-02-13 Thread David Gow
Hi all, After much delay, v6 of the KUnit/Rust integration patchset is here. This change incorporates most of Miguels suggestions from v5 (save for some of the copyright headers I wasn't comfortable unilaterally changing). This means the documentation is much improved, and it should work more clea

Re: [PATCH] ww_mutex: convert self-test to KUnit

2025-02-12 Thread David Gow
gt; Convert this unit test to a KUnit test. > > > > > > > I would like to know the pros and cons between kunit tests and > > kselftests, maybe someone Cced can answer that? It'll be good to put > > these in the commit log as well. > > David Gow gave a pretty detailed a

Re: [PATCH v2 2/2] unicode: kunit: change tests filename and path

2025-02-12 Thread David Gow
On Wed, 12 Feb 2025 at 14:45, Thorsten Leemhuis wrote: > > On 04.10.24 21:00, Gabriel Krisman Bertazi wrote: > > Pedro Orlando writes: > >> From: Gabriela Bittencourt > >> > >> Change utf8 kunit test filename and path to follow the style > >> convention on Documentation/dev-tools/kunit/style.rst

Re: [PATCH 0/2] printf: convert self-test to KUnit

2025-02-12 Thread David Gow
On Tue, 11 Feb 2025 at 16:40, Rasmus Villemoes wrote: > > On Tue, Feb 11 2025, David Gow wrote: > > > On Mon, 10 Feb 2025 at 19:57, Rasmus Villemoes > > wrote: > >> > >> On Fri, Feb 07 2025, Tamir Duberstein wrote: > >> > >> > O

Re: distro support for CONFIG_KUNIT: [PATCH 0/3] bitmap: convert self-test to KUnit

2025-02-10 Thread David Gow
On Tue, 11 Feb 2025 at 04:20, Yury Norov wrote: > > On Mon, Feb 10, 2025 at 11:35:48AM -0800, John Hubbard wrote: > > On 2/9/25 11:54 PM, Geert Uytterhoeven wrote: > > > On Sat, 8 Feb 2025 at 18:53, Yury Norov wrote: > > > > On Fri, Feb 07, 2025 at 03:14:01PM -0500, Tamir Duberstein wrote: > > >

Re: distro support for CONFIG_KUNIT: [PATCH 0/3] bitmap: convert self-test to KUnit

2025-02-10 Thread David Gow
On Tue, 11 Feb 2025 at 04:20, Yury Norov wrote: > > On Mon, Feb 10, 2025 at 11:35:48AM -0800, John Hubbard wrote: > > On 2/9/25 11:54 PM, Geert Uytterhoeven wrote: > > > On Sat, 8 Feb 2025 at 18:53, Yury Norov wrote: > > > > On Fri, Feb 07, 2025 at 03:14:01PM -0500, Tamir Duberstein wrote: > > >

Re: [PATCH v2 0/6] KUnit test moves / renames

2025-02-10 Thread David Gow
On Tue, 11 Feb 2025 at 08:31, Kees Cook wrote: > > Hi, > > This is rebased to v6.14-rc2. I'll carry it and folks can send me new > tests, etc, as needed to minimize future collisions. > > v1: > https://lore.kernel.org/lkml/20241011072509.3068328-2-david...@google.com/ > > Thanks! > > -Kees Than

Re: [PATCH 0/2] printf: convert self-test to KUnit

2025-02-10 Thread David Gow
On Mon, 10 Feb 2025 at 19:57, Rasmus Villemoes wrote: > > On Fri, Feb 07 2025, Tamir Duberstein wrote: > > > On Fri, Feb 7, 2025 at 5:01 AM Rasmus Villemoes > > wrote: > >> > >> On Thu, Feb 06 2025, Tamir Duberstein wrote: > >> > >> > >> I'll have to see the actual code, of course. In general,

Re: [PATCH 1/2] rust: pass correct target to bindgen on Usermode Linux

2025-02-10 Thread David Gow
t a patch[1] to fix it. (Though note that 32-bit UML/Rust still hits issues with atomics in the block driver, so you'll need to disable that for now.) Regardless, this is a significant improvement, thanks! Reviewed-by: David Gow Thanks, -- David [1]: https://lore.kernel.org/rust-for-linu

[PATCH] arch: um: Pass the correct Rust target and options with gcc

2025-02-10 Thread David Gow
t x86. Move the target definition outside the conditional block, and update the condition to take into account the gcc version. Fixes: a3046a618a28 ("um: Only disable SSE on clang to work around old GCC bugs") Signed-off-by: David Gow --- When combined with Thomas' patch [1]

Re: [PATCH 1/3] bitmap: remove _check_eq_u32_array

2025-02-08 Thread David Gow
--- Makes sense. Reviewed-by: David Gow Cheers, -- David > lib/test_bitmap.c | 28 > 1 file changed, 28 deletions(-) > > diff --git a/lib/test_bitmap.c b/lib/test_bitmap.c > index 65a75d58ed9e..c83829ef557f 100644 > --- a/lib/test_bitma

Re: [PATCH 2/3] bitmap: convert self-test to KUnit

2025-02-08 Thread David Gow
t; Signed-off-by: Tamir Duberstein > --- Thanks very much for picking this up. Personally, I'm very much in favour of this, particularly once the refactor in the next patch lands. Reviewed-by: David Gow Cheers, -- David > MAINTAINERS | 2 +- > arch/

Re: [PATCH 3/3] bitmap: break kunit into test cases

2025-02-08 Thread David Gow
up: the static global 'kunittest' was annoying me. I think there's an argument to get rid of tc_err() entirely, and just use KUNIT_FAIL directly, but I'm happy either way: it is a lot of churn. Reviewed-by: David Gow Thank

Re: [PATCH 3/3] bitmap: break kunit into test cases

2025-02-08 Thread David Gow
up: the static global 'kunittest' was annoying me. I think there's an argument to get rid of tc_err() entirely, and just use KUNIT_FAIL directly, but I'm happy either way: it is a lot of churn. Reviewed-by: David Gow Thank

Re: [PATCH 2/3] bitmap: convert self-test to KUnit

2025-02-08 Thread David Gow
t; Signed-off-by: Tamir Duberstein > --- Thanks very much for picking this up. Personally, I'm very much in favour of this, particularly once the refactor in the next patch lands. Reviewed-by: David Gow Cheers, -- David > MAINTAINERS | 2 +- > arch/

Re: [PATCH 1/3] bitmap: remove _check_eq_u32_array

2025-02-08 Thread David Gow
--- Makes sense. Reviewed-by: David Gow Cheers, -- David > lib/test_bitmap.c | 28 > 1 file changed, 28 deletions(-) > > diff --git a/lib/test_bitmap.c b/lib/test_bitmap.c > index 65a75d58ed9e..c83829ef557f 100644 > --- a/lib/test_bitma

Re: [PATCH 0/3] bitmap: convert self-test to KUnit

2025-02-08 Thread David Gow
nt to check a subsystem on a running kernel", but I find > no evidence that bitmap in particular is actually testing the running > kernel; it is a unit test of the bitmap functions, which is also stated > in the config help text. Again, I think the only issue here is the CONFIG_

Re: [PATCH 0/3] bitmap: convert self-test to KUnit

2025-02-08 Thread David Gow
nt to check a subsystem on a running kernel", but I find > no evidence that bitmap in particular is actually testing the running > kernel; it is a unit test of the bitmap functions, which is also stated > in the config help text. Again, I think the only issue here is the CONFIG_

Re: [PATCH 2/2] lib/prime_numbers: convert self-test to KUnit

2025-02-08 Thread David Gow
On Sat, 8 Feb 2025 at 06:33, Tamir Duberstein wrote: > > Extract a private header and convert the prime_numbers self-test to a > KUnit test. I considered parameterizing the test using > `KUNIT_CASE_PARAM` but didn't see how it was possible since the test > logic is entangled with the test paramete

Re: [PATCH 1/2] lib/math: Hook up tests/Makefile

2025-02-08 Thread David Gow
; up tests/Makefile and remove the duplication. > > Fixes: 7fcc9b53216c ("lib/math: Add int_pow test suite") > Signed-off-by: Tamir Duberstein > --- Thanks for fixing this. Reviewed-by: David Gow -- David > lib/math/Makefile | 4 ++-- > 1 file changed, 2 insertions(+

Re: [PATCH 0/2] printf: convert self-test to KUnit

2025-02-06 Thread David Gow
On Thu, 6 Feb 2025 at 23:42, Tamir Duberstein wrote: > > On Thu, Feb 6, 2025 at 4:27 AM Rasmus Villemoes > wrote: > > > > On Tue, 4 Feb 2025 at 20:36, Tamir Duberstein wrote: > > > > > > This is one of just 3 remaining "Test Module" kselftests (the others > > > being bitmap and scanf), the rest

Re: [PATCH v3 0/2] scanf: convert self-test to KUnit

2025-02-06 Thread David Gow
nation isn't perfect), so I'd doubt it's a problem. I'm assuming that, as mentioned in v2, these will go in via printk, not ksefltest/kunit. Either would work for me (but, as mentioned above, I think this and the printf tests should go in via the same tree). This series is: Revi

Re: [PATCH] kunit: tool: Use qboot on QEMU x86_64

2025-01-31 Thread David Gow
x27;ll give myself a TODO to experiment with those. This'll go in post-rc1, but nevertheless, it's: Reviewed-by: David Gow Cheers, -- David > tools/testing/kunit/qemu_configs/x86_64.py | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/tools/test

[kdeconnect] [Bug 493178] SSHFS client hangs when attempting to browse mounted directory containing hundreds of files

2025-01-20 Thread David Gow
https://bugs.kde.org/show_bug.cgi?id=493178 David Gow changed: What|Removed |Added CC||da...@ingeniumdigital.com -- You are receiving

Re: [PATCH v2] kunit: Introduce autorun option

2025-01-14 Thread David Gow
eature we've wanted for a long time. Acked-by: David Gow Cheers, -- David > include/kunit/test.h |4 +++- > lib/kunit/Kconfig| 12 > lib/kunit/debugfs.c |2 +- > lib/kunit/executor.c | 21 +++-- > lib/kunit/test.c

Re: [PATCH v3 3/3] drivers: base: test: Add ...find_device_by...(... NULL) tests

2024-12-18 Thread David Gow
ression-testing coverage for the sorts of bugs that > underly commit 5c8418cf4025 ("PCI/pwrctrl: Unregister platform device > only if one actually exists"). > > Reviewed-by: Maxime Ripard > Signed-off-by: Brian Norris > --- > Thanks. This looks good to me. Re

Re: [PATCH v3 2/3] drivers: base: test: Enable device model tests with KUNIT_ALL_TESTS

2024-12-18 Thread David Gow
ch > as with: > ./tools/testing/kunit/kunit.py run > > Signed-off-by: Brian Norris > --- Excellent! Reviewed-by: David Gow Cheers, -- David > > (no changes since v1) > > drivers/base/test/Kconfig | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/

Re: [PATCH v3 1/3] drivers: base: Don't match devices with NULL of_node/fwnode/etc

2024-12-18 Thread David Gow
gment these to return 0 > (false). > > Reviewed-by: Rob Herring (Arm) > Acked-by: Rafael J. Wysocki > Signed-off-by: Brian Norris > --- Seems sensible enough to me. Acked-by: David Gow I assume this series (including the KUnit test changes) will go in via Greg. Cheers,

Re: [PATCH] kunit: platform: Resolve 'struct completion' warning

2024-12-18 Thread David Gow
pletion' forward declaration to resolve this. > > Signed-off-by: Brian Norris > --- > I'm not bothering with a Fixes tag, since this only shows up with new > tests I'm writing. > Nice catch, thanks! Reviewed-by: David Gow Cheers, -- David smime.p7s Description: S/MIME Cryptographic Signature

[PATCH v5 3/3] rust: kunit: allow to know if we are in a test

2024-12-13 Thread David Gow
and then the current thread's running KUnit test. Add a safe wrapper function around this to know whether or not we are in a KUnit test and examples showing how to mock a function and a module. Signed-off-by: José Expósito Co-developed-by: David Gow Signed-off-by: David Gow --- Changes

[PATCH v5 2/3] rust: macros: add macro to easily run KUnit tests

2024-12-13 Thread David Gow
only difference with user-space tests is that instead of using `#[cfg(test)]`, `#[kunit_tests(kunit_test_suit_name)]` is used. Note that `#[cfg(CONFIG_KUNIT)]` is added so the test module is not compiled when `CONFIG_KUNIT` is set to `n`. Reviewed-by: David Gow Signed-off-by: José Expósito Co

[PATCH v5 1/3] rust: kunit: add KUnit case and suite macros

2024-12-13 Thread David Gow
on their own, a future patch will introduce another macro to create KUnit tests using a user-space like syntax. Signed-off-by: José Expósito Co-developed-by: Matt Gilbride Signed-off-by: Matt Gilbride Co-developed-by: David Gow Signed-off-by: David Gow --- Changes since v4: https

[PATCH v5 0/3] rust: kunit: Support KUnit tests with a user-space like syntax

2024-12-13 Thread David Gow
Hi all, v5 here is a small set of fixes and a rebase of the previous versions. If there are no major issues, I'd like to land this soon so it can be used and tested ready for 6.14. This series was originally written by José Expósito, and has been modified and updated by Matt Gilbride and myself.

[PATCH v2 6/6] unicode: kunit: change tests filename and path

2024-12-01 Thread David Gow
Bittencourt Reviewed-by: David Gow Acked-by: Gabriel Krisman Bertazi [Rebased, fixed module build (Gabriel Krisman Bertazi)] Signed-off-by: David Gow --- fs/unicode/Makefile| 2 +- fs/unicode/{ => tests}/.kunitconfig| 0 fs/unicode/{utf8-selftes

[PATCH v2 5/6] unicode: kunit: refactor selftest to kunit tests

2024-12-01 Thread David Gow
Danilo Pereira Signed-off-by: Danilo Pereira Signed-off-by: Gabriela Bittencourt Reviewed-by: David Gow Acked-by: Gabriel Krisman Bertazi [rebased on top of 6.13-rc1] Signed-off-by: David Gow --- fs/unicode/.kunitconfig| 3 + fs/unicode/Kconfig | 5 +- fs/unicode/Makefile

[PATCH v2 4/6] lib/tests/kfifo_kunit.c: add tests for the kfifo structure

2024-12-01 Thread David Gow
Reviewed-by: David Gow Signed-off-by: David Gow --- lib/Kconfig.debug | 14 +++ lib/tests/Makefile | 1 + lib/tests/kfifo_kunit.c | 224 3 files changed, 239 insertions(+) create mode 100644 lib/tests/kfifo_kunit.c diff --git a/lib

[PATCH v2 3/6] lib: Move KUnit tests into tests/ subdirectory

2024-12-01 Thread David Gow
ski Acked-by: "Masami Hiramatsu (Google)" Reviewed-by: David Gow Acked-by: Vlastimil Babka #slab [Rebased onto v6.13-rc1, moved crc16,usercopy,util-macros tests] Signed-off-by: David Gow --- MAINTAINERS| 19 ++-- lib/Makefile

[PATCH v2 2/6] lib/math: Add int_log test suite

2024-12-01 Thread David Gow
Sobreira França Reviewed-by: David Gow [Rebased on top of v6.13-rc1] Signed-off-by: David Gow --- lib/Kconfig.debug | 11 + lib/math/tests/Makefile| 1 + lib/math/tests/int_log_kunit.c | 75 ++ 3 files changed, 87 insertions(+) create

[PATCH v2 1/6] lib: math: Move kunit tests into tests/ subdir

2024-12-01 Thread David Gow
: Nicolas Pitre [Rebased on top of v6.13-rc1, removed non-kunit tests] Signed-off-by: David Gow --- lib/Kconfig.debug| 2 +- lib/math/Makefile| 4 ++-- lib/math/tests/Makefile | 3 ++- lib/math

[PATCH v2 0/6] [PATCH 0/6] KUnit test moves / renames

2024-12-01 Thread 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 on top of v6.13-rc1, to be applied minimising

Re: [RFC PATCH v2 00/13] nommu UML

2024-11-22 Thread David Gow
On Mon, 11 Nov 2024 at 14:27, Hajime Tazaki wrote: > > This is a series of patches of nommu arch addition to UML. It would > be nice to ask comments/opinions on this. > > There are still several limitations/issues which we already found; > here is the list of those issues. > > - prompt configured

Re: [PATCH printk v1] printk: ringbuffer: Add KUnit test

2024-11-21 Thread David Gow
On Thu, 21 Nov 2024 at 22:50, John Ogness wrote: > > From: Thomas Weißschuh > > The KUnit test validates the correct operation of the ringbuffer. > A separate dedicated ringbuffer is used so that the global printk > ringbuffer is not touched. > > Co-developed-by: John Ogness > Signed-off-by: Joh

Re: [RFC] Test catalog template

2024-11-20 Thread David Gow
ests that should be run > on patches or code by humans and CI systems. > > Examples: > > Find test info for a subsystem > > ./get_tests.py -s 'KUNIT TEST' --info > > Subsystem:KUNIT TEST > Maintainer: > David Gow > Mailing List: None > Version

Re: [PATCH v2] kunit: string-stream: Fix a UAF bug in kunit_init_suite()

2024-11-18 Thread David Gow
exception > > Cc: sta...@vger.kernel.org > Fixes: a3fdf784780c ("kunit: string-stream: Decouple string_stream from > kunit") > Suggested-by: Kuan-Wei Chiu > Signed-off-by: Jinjie Ruan > --- > v2: > - Correct the fix way. > - Add Suggested-by. > --- Sor

Re: [PATCH] kunit: debugfs: Use IS_ERR() for alloc_string_stream() error check

2024-11-15 Thread David Gow
-- Makes sense to me, thanks. Reviewed-by: David Gow Cheers, -- David > lib/kunit/debugfs.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/lib/kunit/debugfs.c b/lib/kunit/debugfs.c > index d548750a325a..6273fa9652df 100644 > --- a/lib/kunit/debug

  1   2   3   4   5   6   7   8   >