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 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 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

[PATCH 0/2] drm/i915: Fix ttm small BAR placement handling

2024-08-04 Thread David Gow
From: David Gow As described in [1], there have been a couple of regressions in the TTM placement handling for i915, which adversely affect DG2 systems with small BAR. In particular, performance become very poor when eviction from the mappable BAR memory is required, as suboptimal placements

[PATCH 1/2] drm/i915: Allow evicting to use the requested placement

2024-08-04 Thread David Gow
Thanks to Justin Brewer for bisecting the issue. Fixes: a78a8da51b36 ("drm/ttm: replace busy placement with flags v6") Fixes: 4a0e7b3c3753 ("drm/i915: fix applying placement flag") Link: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/11255 Signed-off-by: David Gow

[PATCH 2/2] drm/i915: Attempt to get pages without eviction first

2024-08-04 Thread David Gow
tm_palcement, as the individual placements are marked 'const', so hot-patching the flags is even more dodgy than before. Thanks to Justin Brewer for bisecting this. Fixes: a78a8da51b36 ("drm/ttm: replace busy placement with flags v6") Link: https://gitlab.freedesktop.org/drm/i915/ke

[PATCH] drm/i915: Allow evicting to use the requested placement

2024-07-24 Thread David Gow
tin Brewer for bisecting the issue. Fixes: a78a8da51b36 ("drm/ttm: replace busy placement with flags v6") Fixes: 4a0e7b3c3753 ("drm/i915: fix applying placement flag") Link: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/11255 Signed-off-by: David Gow --- I'm no

Re: [PATCH v3 04/15] kunit: Add documentation for warning backtrace suppression API

2024-04-09 Thread David Gow
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: > -

Re: [PATCH v3 02/15] kunit: bug: Count suppressed warning backtraces

2024-04-09 Thread David Gow
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

Re: [PATCH v3 03/15] kunit: Add test cases for backtrace warning suppression

2024-04-09 Thread David Gow
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

Re: [PATCH v3 01/15] bug/kunit: Core support for suppressing warning backtraces

2024-04-09 Thread David Gow
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

Re: linux-next: build failure after merge of the kunit-next tree

2024-02-29 Thread David Gow
On Thu, 29 Feb 2024 at 23:07, Shuah Khan wrote: > > Hi Stephen, > > On 2/28/24 21:26, Stephen Rothwell wrote: > > Hi all, > > > > After merging the kunit-next tree, today's linux-next build (x86_64 > > allmodconfig) failed like this: > > > > In file included from drivers/gpu/drm/tests/drm_buddy_te

[PATCH v2] drm: tests: Fix invalid printf format specifiers in KUnit tests

2024-02-27 Thread David Gow
_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

Re: [PATCH 2/9] lib/cmdline: Fix an invalid format specifier in an assertion msg

2024-02-21 Thread David Gow
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

[PATCH 9/9] kunit: Annotate _MSG assertion variants with gnu printf specifiers

2024-02-21 Thread David Gow
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

[PATCH 8/9] drm/xe/tests: Fix printf format specifiers in xe_migrate test

2024-02-21 Thread David Gow
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

[PATCH 7/9] drm: tests: Fix invalid printf format specifiers in KUnit tests

2024-02-21 Thread David Gow
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

[PATCH 6/9] net: test: Fix printf format specifier in skb_segment kunit test

2024-02-21 Thread David Gow
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

[PATCH 5/9] rtc: test: Fix invalid format specifier.

2024-02-21 Thread 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: 1d1bb12a8b18 ("rtc: Improve performance of rtc_time64_to_tm(). Add tests.") Signed-off-by: David Gow -

[PATCH 4/9] time: test: Fix incorrect format specifier

2024-02-21 Thread 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

[PATCH 3/9] lib: memcpy_kunit: Fix an invalid format specifier in an assertion msg

2024-02-21 Thread David Gow
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

[PATCH 2/9] lib/cmdline: Fix an invalid format specifier in an assertion msg

2024-02-21 Thread David Gow
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

[PATCH 1/9] kunit: test: Log the correct filter string in executor_test

2024-02-21 Thread David Gow
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

[PATCH 0/9] kunit: Fix printf format specifier issues in KUnit assertions

2024-02-21 Thread David Gow
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

[PATCH 3/3] drm/vc4: tests: Use KUNIT_DEFINE_ACTION_WRAPPER

2023-11-10 Thread David Gow
, so replace the manual implementation. Signed-off-by: David Gow --- This patch should be a no-op, just moving to use a standard macro to implement these wrappers rather than hand-coding them. Let me know if you'd prefer to take these in separately via the drm trees, or if you're okay w

[PATCH 2/3] drm/tests: Use KUNIT_DEFINE_ACTION_WRAPPER()

2023-11-10 Thread David Gow
reduces the boilerplate needed. Signed-off-by: David Gow --- This patch should be a no-op, just moving to use a standard macro to implement these wrappers rather than hand-coding them. Let me know if you'd prefer to take these in separately via the drm trees, or if you're okay with h

[PATCH 1/3] kunit: Add a macro to wrap a deferred action function

2023-11-10 Thread David Gow
https://github.com/ClangBuiltLinux/linux/issues/1750 Signed-off-by: David Gow --- This is a follow-up to the RFC here: https://lore.kernel.org/linux-kselftest/20230915050125.3609689-1-david...@google.com/ There's no difference in the macro implementation, just an update to the KUnit test

Re: [PATCH 2/3] kunit: Add kunit_move_action_to_top_or_reset() to reorder actions

2023-09-22 Thread David Gow
On Wed, 20 Sept 2023 at 14:12, Arthur Grillo wrote: > > On Kunit, if we allocate a resource A and B on this order, with its > deferred actions to free them. The resource stack would be something > like this: > > +-+ > | free(B) | > +-+ > | ...

Re: [PATCH v5 9/9] drm: selftest: convert drm_mm selftest to KUnit

2023-07-25 Thread David Gow
; Considering the current adoption of the KUnit framework, convert the > > > DRM mm selftest to the KUnit API. > > > > > > Signed-off-by: Arthur Grillo > > > Tested-by: David Gow > > > Acked-by: Daniel Latypov > > > Reviewed-by: Javier Martin

Re: [PATCH] kunit: drm: make DRM buddy test compatible with other pages sizes

2023-04-19 Thread David Gow
> Fixes: 92937f170d3f ("drm/selftests: add drm buddy alloc range testcase") > Signed-off-by: Nico Pache > --- Nice catch! This makes sense to me (and doesn't regress anything on my various 4k-page machines, at least). Reviewed-by: David Gow Cheers, -- David > driv

[PATCH 2/2] drm: test: Fix 32-bit issue in drm_buddy_test

2023-03-28 Thread David Gow
This only reproduces randomly, as the parameters passed to the buddy allocator in this test are random. The seed 0xb2e06022 reproduced it fine here. For now, just hardcode an is_power_of_2() implementation using x & (x - 1). Signed-off-by: David Gow --- There are actually a couple of is_

[PATCH 1/2] drm: buddy_allocator: Fix buddy allocator init on 32-bit systems

2023-03-28 Thread David Gow
version instead recalculates the size based on the order. Reported-by: Luís Mendes Link: https://lore.kernel.org/lkml/CAEzXK1oghXAB_KpKpm=-cvidqbnah0qfgytssjzgvvyj4u7...@mail.gmail.com/T/ Signed-off-by: David Gow --- drivers/gpu/drm/drm_buddy.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions

Re: [PATCH] drm/format-helper: Use KUNIT_EXPECT_MEMEQ macro

2023-01-31 Thread David Gow
f the DRM trees, not the KUnit one (it doesn't apply to the kselftest/kunit tree as-is). Reviewed-by: David Gow Cheers, -- David > drivers/gpu/drm/tests/drm_format_helper_test.c | 10 +- > 1 file changed, 5 insertions(+), 5 deletions(-) > > diff --git a/driv

Re: [PATCH 00/24] drm: Introduce Kunit Tests to VC4

2022-11-24 Thread David Gow
t > To: Maxime Ripard > To: Thomas Zimmermann > Cc: Dave Stevenson > Cc: Javier Martinez Canillas > Cc: Greg Kroah-Hartman > Cc: Maíra Canal > Cc: Brendan Higgins > Cc: David Gow > Cc: linux-kselft...@vger.kernel.org > Cc: kunit-...@googlegroups.com > Cc: dri-

Re: KUnit issues - Was: [igt-dev] [PATCH RFC v2 8/8] drm/i915: check if current->mm is not NULL

2022-11-07 Thread David Gow
On Thu, Nov 3, 2022 at 11:23 PM Mauro Carvalho Chehab wrote: > > Hi, > > I'm facing a couple of issues when testing KUnit with the i915 driver. > > The DRM subsystem and the i915 driver has, for a long time, his own > way to do unit tests, which seems to be added before KUnit. > > I'm now checking

Re: [PATCH] drm: tests: Fix a buffer overflow in format_helper_test

2022-10-21 Thread David Gow
On Wed, Oct 19, 2022 at 7:36 PM Maíra Canal wrote: > > [cc Javier] > > Hi David, > > On 10/19/22 04:32, David Gow wrote: > > The xrgb2101010 format conversion test (unlike for other formats) does > > an endianness conversion on the results. However, it always con

Re: [PATCH] drm: tests: Fix a buffer overflow in format_helper_test

2022-10-21 Thread David Gow
On Thu, Oct 20, 2022 at 4:03 PM Javier Martinez Canillas wrote: > > On 10/19/22 19:29, José Expósito wrote: > > [...] > > >> drivers/gpu/drm/tests/drm_format_helper_test.c | 2 +- > >> 1 file changed, 1 insertion(+), 1 deletion(-) > >> > >> diff --git a/drivers/gpu/drm/tests/drm_format_helper_tes

[PATCH] drm: tests: Fix a buffer overflow in format_helper_test

2022-10-19 Thread David Gow
.*xrgb2101010 Reported-by: Linux Kernel Functional Testing Fixes: 453114319699 ("drm/format-helper: Add KUnit tests for drm_fb_xrgb_to_xrgb2101010()") Signed-off-by: David Gow --- This is a fix for the issue reported here: https://lore.kernel.org/dri-devel/CA+G9fYs

Re: not ok 1 - single_pixel_source_buffer: The buggy address belongs to the physical page

2022-10-18 Thread David Gow
On Tue, Oct 18, 2022 at 3:54 PM Javier Martinez Canillas wrote: > > [adding a few folks to Cc list that might help with this issue] > > Hello Naresh, > > Thanks a lot for your report. > > On 10/18/22 08:40, Naresh Kamboju wrote: > > Following kunit tests started failing on Linux mainline. > > - d

Re: [PATCH v2 2/2] drm/tests: Split drm_test_dp_mst_sideband_msg_req_decode into parameterized tests

2022-09-29 Thread David Gow
On Fri, Sep 30, 2022 at 6:33 AM Michał Winiarski wrote: > > On Tue, Sep 27, 2022 at 07:12:06PM -0300, Maíra Canal wrote: > > The drm_test_dp_mst_sideband_msg_req_decode repeats the same test > > structure with different parameters. This could be better represented > > by parameterized tests, provi

Re: [PATCH] drm/ttm: provide default page protection for UML

2021-09-03 Thread David Gow
On Thu, Sep 2, 2021 at 10:46 PM Daniel Vetter wrote: > > On Thu, Sep 02, 2021 at 07:19:01AM +0100, Anton Ivanov wrote: > > On 02/09/2021 06:52, Randy Dunlap wrote: > > > On 9/1/21 10:48 PM, Anton Ivanov wrote: > > > > On 02/09/2021 03:01, Randy Dunlap wrote: > > > > > boot_cpu_data [struct cpuinfo