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:
> - Rebase
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:
>
> 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 /
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
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
thew 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 the others have been applied already.
- Reba
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 ptrdiff_t.
>
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-off-by: David Gow
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
---
drivers/gpu/drm/xe/tests/xe_migrate.c | 8
1 file changed, 4 insert
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 drm_mm selftest to KUnit")
Signed-off-b
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
---
drivers/rtc/lib_
'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/time/time_test.c | 2
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_TEST")
Signed-off-by: David Gow
of 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
index d4
ering 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_test.c
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 filter
, 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 with having
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 having
/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 tests to use it. This version is intended
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) |
> +-+
> | ...
; 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 M
> 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
> drivers/g
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_power_of_2
(). This 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
, 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/drivers/gpu/drm/tests/dr
ipard
> 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-devel@lists.freedesk
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
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
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
.*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
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.
> > -
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,
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
34 matches
Mail list logo