s "yes", but we may want to update
kunit.py at some point to support automatically adding tests/ to the
search path for a .kunitconfig if this becomes a common enough
pattern.
Regardless, let's take this as-is.
Reviewed-by: David Gow
Cheers,
-- David
> fs/unicode/Makefil
ts, even if fstests
has some unicode tests itself and the code is pretty battle-hardened,
as these are a good, quick way to sanity-check any changes during
development, and to catch regressions early.
Reviewed-by: David Gow
Cheers,
-- David
> fs/unicode/.kunitconfig|
s.kernel.org/dev-tools/kunit/style.html [2]
>
> Signed-off-by: Luis Felipe Hernandez
> ---
> Changes in v2: Fix cc recipient list inclusion in cover letter
> ---
Thanks very much for taking care of this. It looks great to me.
Reviewed-by: David Gow
Cheers,
-- David
> arch/m
case
> - Add test case with non-power of two exponent
> - Fix module license
> ---
Looks good to me, thanks!
Reviewed-by: David Gow
Cheers,
-- David
smime.p7s
Description: S/MIME Cryptographic Signature
ble value to in large_result test case
> - Add test case with non-power of two exponent
> - Fix module license
> ---
This looks pretty good to me, thanks!
A few very minor nitpicks below, but nothing serious.
With those fixed, this is:
Reviewed-by: David Gow
Cheers,
-- David
> lib
this header and fix the tool, there will be:
>
> ../include/kunit/visibility.h:61: warning: Function parameter or
> struct member 'symbol' not described in 'EXPORT_SYMBOL_IF_KUNIT'
>
> Signed-off-by: Michal Wajdeczko
> ---
> Cc: Rae Moar
> Cc: David Gow
[ ] Expected 0 == kstrtobool("dunno", &flag), but
> [ ] kstrtobool("dunno", &flag) == -22 (-EINVAL)
>
> Signed-off-by: Michal Wajdeczko
> ---
> Cc: David Gow
> Cc: Rae Moar
> ---
I wasn't sure about this at first, but looking at it, I thin
(void *)0), but
> [ ] ptr1 is -ENOMEM
> [ ] ((void *)0) is NULL
>
> Signed-off-by: Michal Wajdeczko
> ---
> Cc: David Gow
> Cc: Rae Moar
> ---
I have some mixed feelings about this one. Personally, I'd rather this
continue to use '==' rather than '
get:
>
> [ ] Expected myptr is not error, but is: -12
>
> but we can improve it by using more friendly error pointer format:
>
> [ ] Expected myptr is not error, but is -ENOMEM
>
> Signed-off-by: Michal Wajdeczko
> ---
> Cc: David Gow
> Cc: Rae Moar
> ---
res.
>
> Signed-off-by: Michal Wajdeczko
> ---
> Cc: David Gow
> Cc: Daniel Latypov
> Cc: Lucas De Marchi
> ---
This looks good to me, thanks!
Reviewed-by: David Gow
Thanks,
-- David
> lib/kunit/kunit-example-test.c | 63 ++
>
r threads, outside of the KUnit test, like from the workqueue.
>
> Add another set of macros to allow redirection to the replacement
> functions, which, unlike the KUNIT_STATIC_STUB_REDIRECT, will
> affect all calls done during the test execution.
>
> Signed-off-by: Michal Wajdeczko
o
> ---
> Cc: Rae Moar
> Cc: David Gow
> Cc: Lucas De Marchi
> ---
I like this, thanks!
Reviewed-by: David Gow
> include/kunit/visibility.h | 8
> 1 file changed, 8 insertions(+)
>
> diff --git a/include/kunit/visibility.h b/include/kunit/visibility.h
>
ned-off-by: Michal Wajdeczko
> ---
> Cc: Daniel Latypov
> Cc: David Gow
> Cc: Lucas De Marchi
> ---
This is a big improvement, thanks!
Reviewed-by: David Gow
Cheers,
-- David
> include/kunit/test-bug.h | 12 ++--
> 1 file changed, 10 insertions(+), 2 deletions(-)
&g
On Thu, 15 Aug 2024 at 10:07, Luis Felipe Hernandez
wrote:
>
> Adds test suite for integer based power function.
>
> Signed-off-by: Luis Felipe Hernandez
> ---
Hi Luis,
Thanks for your patch. Personally, I'm all in favour of adding it, but
there are a few issues which would need to be resolved
axime Ripard
Reviewed-by: Rae Moar
Signed-off-by: David Gow
---
This is a combination of the previous version of this patch with the
follow-up fix "kunit: Fix kunit_kstrdup_const() with modules".
kunit_kstrdup_const() now falls back to kstrdup() if KUnit is built as a
module, and i
On Tue, 6 Aug 2024 at 08:23, Nico Pache wrote:
>
> On Wed, Jul 31, 2024 at 1:02 AM David Gow wrote:
> >
> > kunit_driver_create() accepts a name for the driver, but does not copy
> > it, so if that name is either on the stack, or otherwise freed, we end
> > up
appers should also manage driver name")
Signed-off-by: David Gow
---
include/kunit/test.h | 16 +++-
lib/kunit/test.c | 19 +++
2 files changed, 22 insertions(+), 13 deletions(-)
diff --git a/include/kunit/test.h b/include/kunit/test.h
index da9e84de14c0..5ac
ucture KUnit tests
in-memory and handle debugfs, alongside the other feature requests
we've had for parameterised tests. (Like having explicit context
associated with them, or supporting more arbitrary nesting.)
Regardless, this is
Reviewed-by: David Gow
Cheers,
-- David
> Chang
le.
Fixes: d03c720e03bd ("kunit: Add APIs for managing devices")
Reported-by: Nico Pache
Closes: https://groups.google.com/g/kunit-dev/c/81V9b9QYON0
Signed-off-by: David Gow
Reviewed-by: Kees Cook
---
There's some more serious changes since the RFC I sent, so please take a
closer look.
On Tue, 30 Jul 2024 at 23:49, Shuah Khan wrote:
>
> On 7/29/24 02:29, Muhammad Usama Anjum wrote:
> > On 7/27/24 12:26 AM, Shuah Khan wrote:
> >> On 7/26/24 05:06, Muhammad Usama Anjum wrote:
> >>> In this series, test_bitmap is being converted to kunit test. Multiple
> >>> patches will make the r
On Tue, 30 Jul 2024 at 23:39, Shuah Khan wrote:
>
> On 7/29/24 02:15, Muhammad Usama Anjum wrote:
> > On 7/27/24 11:10 PM, Yury Norov wrote:
> >> On Fri, Jul 26, 2024 at 01:26:48PM -0600, Shuah Khan wrote:
> >>> On 7/26/24 05:06, Muhammad Usama Anjum wrote:
> In this series, test_bitmap is be
On Mon, 29 Jul 2024 at 22:09, Randy Dunlap wrote:
>
>
>
> On 7/29/24 1:07 AM, Muhammad Usama Anjum wrote:
> > On 7/27/24 10:35 PM, Yury Norov wrote:
> >> On Fri, Jul 26, 2024 at 04:06:57PM +0500, Muhammad Usama Anjum wrote:
> >>> Rename module to bitmap_kunit and rename the configuration option
>
On Sat, 27 Jul 2024 at 03:35, Shuah Khan wrote:
>
> On 7/15/24 04:09, Muhammad Usama Anjum wrote:
> > Hi Kees and All,
> >
> > There are several tests in kselftest subsystem which load modules to tests
> > the internals of the kernel. Most of these test modules are just loaded by
> > the kselftest
hat's fine
by me.
Reviewed-by: David Gow
Thanks,
-- David
smime.p7s
Description: S/MIME Cryptographic Signature
PCI DEVICES
> @@ -12347,7 +12347,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
>
&
[1]
> Signed-off-by: Kees Cook
> ---
> Cc: David Gow
> Cc: Brendan Higgins
> Cc: Rae Moar
> Cc: John Hubbard
> Cc: Jonathan Corbet
> Cc: Linus Torvalds
> Cc: linux-kselftest@vger.kernel.org
> Cc: kunit-...@googlegroups.com
> Cc: linux-...@vger.kernel.org
On Mon, 22 Jul 2024 at 17:56, Marco Elver wrote:
>
> On Sat, Jul 20, 2024 at 09:54AM -0700, Kees Cook wrote:
> > Based on feedback from Linus[1] and follow-up discussions, change the
> > suggested file naming for KUnit tests.
> >
> > Link:
> > https://lore.kernel.org/lkml/CAHk-=wgim6pNiGTBMhP8Kd3
nputs
ok 3 test_csum_no_carry_inputs
I also tested it on a real 486DX2, with the same results.
Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Signed-off-by: David Gow
---
Re-sending this from [1]. While there's an argument that the whole
32-bit checksum code could do with rewrit
On Thu, 18 Jul 2024 at 00:49, Kees Cook wrote:
>
> On Wed, Jul 17, 2024 at 02:28:15PM +0800, David Gow wrote:
> > On Wed, 17 Jul 2024 at 11:53, Kees Cook wrote:
> > >
> > > On Tue, Jul 16, 2024 at 01:10:41PM -0700, Linus Torvalds wrote:
> > > > On M
y: Kees Cook
> ---
> Cc: David Gow
> Cc: Brendan Higgins
> Cc: Rae Moar
> Cc: Jonathan Corbet
> Cc: Linus Torvalds
> Cc: linux-kselftest@vger.kernel.org
> Cc: kunit-...@googlegroups.com
> Cc: linux-...@vger.kernel.org
> ---
Looks good to me. Maybe we could make it cl
; > > Link:
> > > https://lore.kernel.org/lkml/CAHk-=wgim6pNiGTBMhP8Kd3tsB7_JTAuvNJ=XYd3wPvvk=o...@mail.gmail.com/
> > > [1]
> > > Signed-off-by: Kees Cook
> > > ---
> > > Cc: David Gow
> > > Cc: Brendan Higgins
> > > Cc: Ra
On Wed, 17 Jul 2024 at 11:53, Kees Cook wrote:
>
> On Tue, Jul 16, 2024 at 01:10:41PM -0700, Linus Torvalds wrote:
> > On Mon, 15 Jul 2024 at 09:21, Kees Cook wrote:
> > >
> > > fs/exec.c | 49 --
> > > fs/exec_test.c | 141
On Mon, 15 Jul 2024 at 18:09, Muhammad Usama Anjum
wrote:
>
> Hi Kees and All,
>
> There are several tests in kselftest subsystem which load modules to tests
> the internals of the kernel. Most of these test modules are just loaded by
> the kselftest, their status isn't read and reported to the us
macros ensures that assertions
> can also be used for memory comparisons, enhancing the consistency and
> completeness of the kunit framework.
>
> Signed-off-by: Eric Chan
> ---
Reviewed-by: David Gow
Cheers,
-- David
> include/kunit/test.h | 54 +
igned-off-by: Eric Chan
> ---
I like this much better, thanks.
Reviewed-by: David Gow
Cheers,
-- David
> drivers/input/tests/input_test.c | 2 +-
> include/kunit/assert.h | 2 +-
> include/kunit/test.h | 13 -
> 3 files changed, 14 insert
On Fri, 12 Jul 2024 at 03:39, Eric Chan wrote:
>
> The current comment for KUNIT_ASSERT_STRNEQ incorrectly describes it as
> an expectation. Since KUNIT_ASSERT_STRNEQ is an assertion, updates the
> comment to correctly refer to it as such.
>
> Signed-off-by: Eric Chan
> --
;
> Link: https://github.com/KSPP/linux/issues/90 [1]
> Signed-off-by: Kees Cook
> ---
> Cc: Brendan Higgins
> Cc: David Gow
> Cc: Rae Moar
> Cc: linux-kselftest@vger.kernel.org
> Cc: kunit-...@googlegroups.com
> ---
Looks good apart from the strscpy() change, which i
macros ensures that assertions
> can also be used for memory comparisons, enhancing the consistency and
> completeness of the kunit framework.
>
> Signed-off-by: Eric Chan
> ---
Nice catch, thanks!
Reviewed-by: David Gow
Cheers,
-- David
On Thu, 11 Jul 2024 at 01:06, Eric Chan wrote:
>
> Both KUNIT_FAIL and KUNIT_ASSERT_FAILURE defined to KUNIT_FAIL_ASSERTION
> with different tpye of kunit_assert_type. The current naming of
> KUNIT_ASSERT_FAILURE and KUNIT_FAIL_ASSERTION is confusing due to their
> similarities. To improve readabi
-
Nice catch -- copy-and-paste strikes again!
Reviewed-by: David Gow
Cheers,
-- David
> include/kunit/test.h | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/include/kunit/test.h b/include/kunit/test.h
> index 61637ef32302..87a232421089 100644
> ---
s automatically be unregistered when the test is done.
>
> This makes test setup code simpler when a platform driver or platform
> device is needed. Add a few test cases at the same time to make sure the
> APIs work as intended.
>
> Cc: Brendan Higgins
> Reviewed-by: David Gow
Johnson
> Signed-off-by: Kees Cook
> ---
> At Jeff's reminder, I've split this out of:
> https://lore.kernel.org/all/20240601-md-lib-test-v1-1-a728620e3...@quicinc.com/
> since the file got renamed.
> ---
> Cc: Shuah Khan
> Cc: Jeff Johnson
> Cc: Brendan Hig
Signed-off-by: Kees Cook
> ---
> Resending as v2 with Shuah in To:
> ---
> Cc: Shuah Khan
> Cc: Brendan Higgins
> Cc: David Gow
> Cc: Rae Moar
> Cc: "Gustavo A. R. Silva"
> Cc: Andrew Morton
> Cc: linux-kselftest@vger.kernel.org
> Cc: kunit-...
On Tue, 4 Jun 2024 at 06:38, Stephen Boyd wrote:
>
> Test that clks registered with 'struct clk_parent_data' work as
> intended and can find their parents.
>
> Cc: Christian Marangi
> Cc: Brendan Higgins
> Cc: David Gow
> Cc: Rae Moar
> Signed-off-by: St
s automatically be unregistered when the test is done.
>
> This makes test setup code simpler when a platform driver or platform
> device is needed. Add a few test cases at the same time to make sure the
> APIs work as intended.
>
> Cc: Brendan Higgins
> Cc: David Gow
>
h fake platform devices and device nodes via overlays compiled into
> the kernel image.
>
> Cc: Rob Herring
> Cc: Saravana Kannan
> Cc: Daniel Latypov
> Cc: Brendan Higgins
> Cc: David Gow
> Cc: Rae Moar
> Reviewed-by: Rob Herring (Arm)
> Signed-off-by: Stephen Bo
is more clear, too.
So, no actual problems. (Assuming you don't want to put the
documentation under the devicetree rather than under KUnit -- it can
go either way.)
Reviewed-by: David Gow
Thanks,
-- David
> Documentation/dev-tools/kunit/api/index.rst | 11 ++
> Document
On Thu, 13 Jun 2024 at 03:59, Kees Cook wrote:
>
> Hi,
>
> This builds on the proposal[1] from Mark and lets me convert the
> existing usercopy selftest to KUnit. Besides adding this basic test to
> the KUnit collection, it also opens the door for execve testing (which
> depends on having a functi
er.
One other (set of) notes below about using KUNIT_EXPECT_MEMEQ_MSG(),
otherwise (assuming the m68k stuff isn't actually a regression, which
I haven't tested but I imagine is unlikely),
Reviewed-by: David Gow
Thanks,
-- David
> MAINTAINERS| 1 +
> lib/
ood to me, at least on the KUnit side of things.
Reviewed-by: David Gow
Cheers,
-- David
> include/kunit/test.h | 17 +++
> lib/kunit/Makefile | 1 +
> lib/kunit/user_alloc.c | 111 +
> 3 files changed, 129 insertions(+)
> crea
On Tue, 4 Jun 2024 at 20:32, Ivan Orlov wrote:
>
> Since assert_test covers the part of the KUnit core (the assertion
> formatting functions), I believe it would be better to have it merged
> into kunit-test (as it is done for other tests for the KUnit core).
>
> Signed-off-by: Ivan Orlov
> ---
On Tue, 4 Jun 2024 at 20:32, Ivan Orlov wrote:
>
> Export non-static functions from the assert.c file into the KUnit
> namespace in order to be able to access them from the tests if
> they are compiled as modules.
>
> Signed-off-by: Ivan Orlov
> ---
I think this could be merged with patch 5, as
rsonally can't think if what else to sensibly
add.
Reviewed-by: David Gow
Cheers,
-- David
> lib/kunit/Kconfig | 8
> lib/kunit/Makefile | 2 +-
> lib/kunit/string-stream-test.c | 2 ++
> 3 files changed, 11 insertions(+), 1 deletion(-)
>
mport the KUnit namespace in the test.
>
> Signed-off-by: Ivan Orlov
> ---
Nice to see these finally work for modules!
Reviewed-by: David Gow
Cheers,
-- David
> lib/kunit/kunit-test.c | 18 +-
> 1 file changed, 1 insertion(+), 17 deletions(-)
>
> diff
ks good to me, thanks.
It's very slightly hilarious to use EXPORT_SYMBOL_IF_KUNIT() here,
because _of course_ KUnit is enabled, but I think it's the right idea
nevertheless.
Reviewed-by: David Gow
Cheers,
-- David
> lib/kunit/string-stream.c | 12 +++-
> 1 file
small questions below, but nothing essential.
There are a couple of test failures/hangs for the usercopy test (on
i386 and m68k), which may have origins here: I've mentioned them
there.
Reviewed-by: David Gow
Cheers,
-- David
> include/kunit/test.h | 17 ++
> lib/kunit/test.c
ore detailed progress is nice).
With those architecture-specific hangs either fixed, or documented (if
they're actual problems, not issues with the test), this is:
Reviewed-by: David Gow
Cheers,
-- David
> MAINTAINERS| 1 +
> lib/Kconfig.d
RNING: modpost: missing MODULE_DESCRIPTION() in
> lib/kunit/kunit-example-test.o
>
> Add the missing invocations of the MODULE_DESCRIPTION() macro.
>
> Signed-off-by: Jeff Johnson
> ---
Reviewed-by: David Gow
Cheers,
-- David
smime.p7s
Description: S/MIME Cryptographic Signature
on
> ---
Nice catch, thanks.
Reviewed-by: David Gow
Cheers,
-- David
smime.p7s
Description: S/MIME Cryptographic Signature
id Alan Gilbert
> ---
Nice catch, thanks! That's what I get for copy-patste, I guess! :-)
(I agree that this is better without the Fixes tag, too.)
Reviewed-by: David Gow
Cheers,
-- David
> lib/list-test.c | 6 --
> 1 file changed, 6 deletions(-)
>
> diff --git a/lib/li
RNING: Using vsprintf specifier '%px' potentially exposes the kernel
memory layout, if you don't really need the address please consider
using '%p'.
#427: FILE: lib/kunit/assert_test.c:251:
+ snprintf(addr_var_b, TEST_PTR_EXPECTED_BUF_SIZE, "%px", var_b);
T
On Mon, 20 May 2024 at 23:09, Artur A C de Barros wrote:
>
> Hi all,
>
> We are students from the State University of Campinas with an interest in
> contributing to the kernel. We are part of LKCAMP, a student group that
> focuses on researching and contributing to open source software. Our grou
or the delay.
Reviewed-by: David Gow
Cheers,
-- David
smime.p7s
Description: S/MIME Cryptographic Signature
On Fri, 3 May 2024 at 09:04, Stephen Boyd wrote:
>
> Quoting David Gow (2024-05-01 00:55:46)
> > On Tue, 23 Apr 2024 at 07:24, Stephen Boyd wrote:
> > > diff --git a/Documentation/dev-tools/kunit/api/platformdevice.rst
> > > b/Documentation/dev-tools/kunit/api/pla
On Fri, 3 May 2024 at 08:36, Stephen Boyd wrote:
>
> Quoting David Gow (2024-05-01 00:55:10)
> > On Tue, 23 Apr 2024 at 07:24, Stephen Boyd wrote:
> > > diff --git a/Documentation/dev-tools/kunit/api/index.rst
> > > b/Documentation/dev-tools/kunit/api/inde
On Tue, 30 Apr 2024 at 21:58, Scott Mayhew wrote:
>
> On Sat, 23 Mar 2024, David Gow wrote:
>
> > On Thu, 21 Mar 2024 at 22:32, Scott Mayhew wrote:
> > >
> > > Commit c72a870926c2 added a mutex to prevent kunit tests from running
> > > concurrently. U
On Tue, 23 Apr 2024 at 07:24, Stephen Boyd wrote:
>
> This patch series adds unit tests for the clk fixed rate basic type and
> the clk registration functions that use struct clk_parent_data. To get
> there, we add support for loading device tree overlays onto the live DTB
> along with probing pla
drivers/devices automatically be unregistered when the test is done.
>
> This makes test setup code simpler when a platform driver or platform
> device is needed. Add a few test cases at the same time to make sure the
> APIs work as intended.
>
> Cc: Brendan Higgins
> Cc: David Gow
>
On Tue, 23 Apr 2024 at 07:24, Stephen Boyd wrote:
>
> Describe a binding for an empty device node used by KUnit tests to
> confirm overlays load properly.
>
> Reviewed-by: Rob Herring
> Cc: Krzysztof Kozlowski
> Cc: Conor Dooley
> Cc: Brendan Higgins
> Cc: David Go
viewed-by: Rob Herring
> Cc: Krzysztof Kozlowski
> Cc: Conor Dooley
> Signed-off-by: Stephen Boyd
> ---
Reviewed-by: David Gow
Cheers,
-- David
> Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/Documen
n
> Signed-off-by: Stephen Boyd
> ---
This looks good to me. I'm not an expert on Device Tree Overlays, so
can't guarantee it's perfect and/or the most ergonomic solution for
any given use-case, but I definitely like the look of it from a KUnit
point of view.
A few minor nam
On Wed, 24 Apr 2024 at 02:27, Ivan Orlov wrote:
>
> Use KUNIT_DEFINE_ACTION_WRAPPER macro to define the 'kfree' and
> 'string_stream_destroy' wrappers for kunit_add_action.
>
> Signed-off-by: Ivan Orlov
> ---
Acked-by: David Gow
Thanks,
-- David
smime
rg/all/928249cc-e027-4f7f-b43f-502f99a1e...@roeck-us.net/
Fixes: 82b0beff3497 ("kunit: Add tests for fault")
Signed-off-by: David Gow
---
lib/kunit/Kconfig | 11 +++
lib/kunit/kunit-test.c | 8
2 files changed, 15 insertions(+), 4 deletions(-)
diff --git a/lib/ku
On Fri, 19 Apr 2024 at 22:11, Wander Lairson Costa wrote:
>
> On Fri, Apr 19, 2024 at 11:03 AM Greg Kroah-Hartman
> wrote:
> >
> > On Fri, Apr 19, 2024 at 10:25:02AM -0300, Wander Lairson Costa wrote:
> > > If the device register fails, free the allocated memory before
> > > returning.
> > >
> >
On Fri, 19 Apr 2024 at 05:02, Wander Lairson Costa wrote:
>
> If the device register fails, free the allocated memory before
> returning.
>
> Signed-off-by: Wander Lairson Costa
> Fixes: d03c720e03bd ("kunit: Add APIs for managing devices")
> ---
Thanks.
I'm not sure this is correct, though...
> Fixes: d03c720e03bd ("kunit: Add APIs for managing devices")
> ---
Nice catch!
Reviewed-by: David Gow
Cheers,
-- David
> lib/kunit/device.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/lib/kunit/device.c b/lib/kunit/device.c
> index
ctional Testing
Acked-by: Mickaël Salaün
Signed-off-by: David Gow
---
lib/kunit/try-catch.c | 10 +++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/lib/kunit/try-catch.c b/lib/kunit/try-catch.c
index fa687278ccc9..6bbe0025b079 100644
--- a/lib/kunit/try-catch.c
+++ b/lib/ku
hat might overcomplicate it a bit.
It also might be nice to document the individual macros with kerneldoc
comments. (Though, that could equally fit in patch #1).
Still, this is the most important bit, so I'm happy to have it as-is.
Reviewed-by: David Gow
Cheers,
-- David
> v2:
> -
On Wed, 3 Apr 2024 at 21:19, Guenter Roeck wrote:
>
> Add unit tests to verify that warning backtrace suppression works.
>
> If backtrace suppression does _not_ work, the unit tests will likely
> trigger unsuppressed backtraces, which should actually help to get
> the affected architectures / plat
gt; 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
> ---
Looks good to me, thanks.
Reviewed-by: David Gow
Ch
On Wed, 3 Apr 2024 at 21:19, Guenter Roeck wrote:
>
> Some unit tests intentionally trigger warning backtraces by passing
> bad parameters to API functions. Such unit tests typically check the
> return value from those calls, not the existence of the warning backtrace.
>
> Such intentionally gener
On Tue, 26 Mar 2024 at 15:55, Johannes Berg wrote:
>
> On Tue, 2024-03-26 at 01:52 +, Jakub Kicinski wrote:
> >
> > I'm late to the party, but FWIW I had to toss this into netdev testing
> > tree as a local patch:
> >
> > CONFIG_NETDEVICES=y
> > CONFIG_WLAN=y
>
> I'll send this in the next wir
This is required, as CONFIG_DAMON_DEBUGFS is enabled, and --alltests UML
builds will fail due to the missing config option otherwise.
Fixes: f4cba4bf6777 ("mm/damon: rename CONFIG_DAMON_DBGFS to
DAMON_DBGFS_DEPRECATED")
Signed-off-by: David Gow
---
This is breaking all UML alltests
run tests after boot using
> debugfs")
> Reported-by: Nico Pache
> Signed-off-by: Scott Mayhew
> ---
Thanks, this works well here, and is a good idea anyway.
Reviewed-by: David Gow
Cheers,
-- David
> lib/kunit/test.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> di
On Wed, 20 Mar 2024 at 16:18, Kemeng Shi wrote:
>
> There is no KUNIT_VERY_SLOW, I guess we mean KUNIT_SPEED_VERY_SLOW.
>
> Signed-off-by: Kemeng Shi
> ---
Nice catch, thanks!
Reviewed-by: David Gow
Cheers,
-- David
> Documentation/dev-tools/kunit/running_tips.rst
On Thu, 29 Feb 2024 at 03:45, Guenter Roeck wrote:
>
> Hi,
>
> when running the dev_addr_lists unit test with lock debugging enabled,
> I always get the following lockdep warning.
>
> [7.031327]
> [7.031393] WARNING: kunit_try_catch/1886 still has locks
On Wed, 28 Feb 2024 at 23:40, Guenter Roeck wrote:
>
> On 2/28/24 02:15, Geert Uytterhoeven wrote:
> > CC testing
> >
> > On Wed, Feb 28, 2024 at 8:59 AM Guenter Roeck wrote:
> >> On 2/27/24 23:25, Christophe Leroy wrote:
> >> [ ... ]
>
> This test case is supposed to be as true to the
_mm selftest to KUnit")
Reviewed-by: Matthew Auld
Acked-by: Christian König
Tested-by: Guenter Roeck
Reviewed-by: Justin Stitt
Signed-off-by: David Gow
---
Changes since v1:
https://lore.kernel.org/linux-kselftest/20240221092728.1281499-8-david...@google.com/
- Split this patch out, as
m/ttm/tests/
While I suspect there's probably a discussion to have around what
things KUnit devices should set up (and how much flexibility users
should have there), I think this is definitely a fix worth having in
the meantime.
Reviewed-by: David Gow
Cheers,
-- David
> lib/kunit/device.c
On Thu, 22 Feb 2024 at 04:10, 'Justin Stitt' via KUnit Development
wrote:
>
> Hi,
>
> On Wed, Feb 21, 2024 at 05:27:15PM +0800, David Gow wrote:
> > The correct format specifier for p - n (both p and n are pointers) is
> > %td, as the type should be ptrdi
d not have the __printf attribute, so gcc couldn't warn
on incorrect agruments.
It turns out there were quite a few tests with such incorrect arguments.
Add the __printf() specifier now that we've fixed these errors, to
prevent them from recurring.
Suggested-by: Linus Torvalds
Signed-of
an
error pointer, just use '%pe', instead of extracting the error code
manually with PTR_ERR(). (This also results in a nicer output when the
error code is known.)
Fixes: dd08ebf6c352 ("drm/xe: Introduce a new DRM driver for Intel GPUs")
Signed-off-by: David Gow
---
driver
hese some more detailed error messages, which should be more
useful anyway.
Fixes: a64056bb5a32 ("drm/tests/drm_buddy: add alloc_contiguous test")
Fixes: fca7526b7d89 ("drm/tests/drm_buddy: fix build failure on 32-bit targets")
Fixes: fc8d29e298cf ("drm: selftest: convert
rather than a number if
available, which should make the output more readable, too).
Fixes: b3098d32ed6e ("net: add skb_segment kunit test")
Signed-off-by: David Gow
---
net/core/gso_test.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/core/gso_test.c
'days' is a s64 (from div_s64), and so should use a %lld specifier.
This was found by extending KUnit's assertion macros to use gcc's
__printf attribute.
Fixes: 1d1bb12a8b18 ("rtc: Improve performance of rtc_time64_to_tm(). Add
tests.")
Signed-off-by: David Gow
-
'days' is a s64 (from div_s64), and so should use a %lld specifier.
This was found by extending KUnit's assertion macros to use gcc's
__printf attribute.
Fixes: 276010551664 ("time: Improve performance of time64_to_tm()")
Signed-off-by: David Gow
---
kernel/t
The 'i' passed as an assertion message is a size_t, so should use '%zu',
not '%d'.
This was found by annotating the _MSG() variants of KUnit's assertions
to let gcc validate the format strings.
Fixes: bb95ebbe89a7 ("lib: Introduce CONFIG_MEMCPY_KUNIT_T
f the architecture being
built).
Fixes: 0ea09083116d ("lib/cmdline: Allow get_options() to take 0 to validate
the input")
Signed-off-by: David Gow
---
lib/cmdline_kunit.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/cmdline_kunit.c b/lib/cmdline_kunit.c
ind
filtering attributes")
Signed-off-by: David Gow
---
lib/kunit/executor_test.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/kunit/executor_test.c b/lib/kunit/executor_test.c
index 22d4ee86dbed..3f7f967e3688 100644
--- a/lib/kunit/executor_test.c
+++ b/lib/kunit/executor_t
o get these (or equivalent) in for 6.9 if possible, so please
do take a look if possible.
Thanks,
-- David
Reported-by: Linus Torvalds
Closes:
https://lore.kernel.org/linux-kselftest/CAHk-=wgjmoqudo5f8shh1f4rzzwzapnvcw643m5-yj+bfsf...@mail.gmail.com/
David Gow (9):
kunit: test: Log the correct f
1 - 100 of 190 matches
Mail list logo