Re: [PATCH v2 1/1] lib/llist_kunit.c: add KUnit tests for llist

2024-09-05 Thread Rae Moar
On Tue, Sep 3, 2024 at 5:40 PM Artur Alves wrote: > > Add KUnit tests for the llist data structure. They test the vast > majority of methods and macros defined in include/linux/llist.h. > > These are inspired by the existing tests for the 'list' doubly > linked in lib/list-test.c [1]. Each test ca

Re: [PATCH v3 1/1] lib/llist_kunit.c: add KUnit tests for llist

2024-10-02 Thread Rae Moar
dd the lib/tests directory hasn't landed in the kselftest/kunit branch so this patch doesn't apply cleanly. Since we are planning on taking this patch through that branch, could you switch the files to be lib/Makefile and lib/llist_kunit.c for now. And we can move them in the great migrat

Re: [PATCH] kunit: Introduce autorun option

2024-10-22 Thread Rae Moar
On Thu, Oct 17, 2024 at 5:34 PM Stanislav Kinsburskii wrote: > > The new option controls tests run on boot or module load. With the new > debugfs "run" dentry allowing to run tests on demand, an ability to disable > automatic tests run becomes a useful option in case of intrusive tests. > > The op

[PATCH 1/2] kunit: tool: Only print the summary

2024-10-28 Thread Rae Moar
From: David Gow Allow only printing the summary at the end of a test run, rather than all individual test results. This summary will list a few failing tests if there are any. To use: ./tools/testing/kunit/kunit.py run --summary Signed-off-by: Rae Moar Signed-off-by: David Gow --- tools

[PATCH 2/2] kunit: tool: print failed tests only

2024-10-28 Thread Rae Moar
converting to/from KTAP to this pretty-print output. Signed-off-by: Rae Moar --- tools/testing/kunit/kunit.py | 14 -- tools/testing/kunit/kunit_parser.py| 25 + tools/testing/kunit/kunit_tool_test.py | 6 +++--- 3 files changed, 40 insertions(+), 5

Re: [PATCH v2] kunit: Introduce autorun option

2024-10-29 Thread Rae Moar
trusive tests. > > The option is set to true by default to preserve the existent behavior. It > can be overridden by either the corresponding module option or by the > corresponding config build option. > > Signed-off-by: Stanislav Kinsburskii Hello, This looks good to m

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

2024-10-01 Thread Rae Moar
On Tue, Sep 3, 2024 at 5:38 PM Diego Vieira wrote: > > Add KUnit tests for the kfifo data structure. > They test the vast majority of macros defined in the kfifo > header (include/linux/kfifo.h). > > These are inspired by the existing tests for the doubly > linked list in lib/tests/list-test.c (pr

[PATCH] kunit: tool: add ability to parse test metadata

2024-11-20 Thread Rae Moar
test_suite Signed-off-by: Rae Moar --- lib/kunit/attributes.c| 23 -- lib/kunit/debugfs.c | 2 +- lib/kunit/test.c | 9 +-- tools/testing/kunit/kunit_parser.py | 79 +-- tools/testing/kunit

[PATCH v2 1/2] kunit: tool: Only print the summary

2024-11-13 Thread Rae Moar
From: David Gow Allow only printing the summary at the end of a test run, rather than all individual test results. This summary will list a few failing tests if there are any. To use: ./tools/testing/kunit/kunit.py run --summary Signed-off-by: Rae Moar Signed-off-by: David Gow --- Changes

[PATCH v2 2/2] kunit: tool: print failed tests only

2024-11-13 Thread Rae Moar
converting to/from KTAP to this pretty-print output. Signed-off-by: Rae Moar --- tools/testing/kunit/kunit.py | 14 -- tools/testing/kunit/kunit_parser.py| 25 + tools/testing/kunit/kunit_tool_test.py | 6 +++--- 3 files changed, 40 insertions(+), 5

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

2024-12-02 Thread Rae Moar
! This series looks good to me. Tests are passed both built-in and as modules. One comment: The second patch in the series "[PATCH v2 2/6] lib/math: Add int_log test suite" applies with a warning of an extra EOF blank line. Other than that small nit, Reviewed-by: Rae Moar Tha

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

2025-03-06 Thread Rae Moar
On Thu, Mar 6, 2025 at 7:26 AM Brendan Jackman wrote: > > On Thu, 6 Mar 2025 at 10:00, David Gow wrote: > > > > On Thu, 6 Mar 2025 at 08:29, Rae Moar wrote: > > > > > > A bug was identified where the KTAP below caused an infinite loop: > > > > &g

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

2025-03-06 Thread Rae Moar
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 this bug to correctly parse test plan line. Signed-off-by: Rae Moar --- Changes

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

2025-03-11 Thread Rae Moar
On Thu, Mar 6, 2025 at 4:00 AM David Gow wrote: > > 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 inf

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

2025-03-13 Thread Rae Moar
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 this bug by parsing test plan line to avoid the infinite loop. Signed-off-by: Rae

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

2025-03-05 Thread Rae Moar
: Rae Moar --- tools/testing/kunit/kunit_parser.py| 12 +++- tools/testing/kunit/kunit_tool_test.py | 5 ++--- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/tools/testing/kunit/kunit_parser.py b/tools/testing/kunit/kunit_parser.py index 29fc27e8949b..5dcbc670e1dc

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

2025-03-15 Thread Rae Moar
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 --- Changes since v2: - Adds this patch to add a test for this behavior tools/testing/kunit

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

2025-03-19 Thread Rae Moar
On Mon, Mar 17, 2025 at 12:13 PM Brendan Jackman wrote: > > On Fri, 14 Mar 2025 at 06:37, David Gow wrote: > > > > On Fri, 14 Mar 2025 at 03:27, Rae Moar wrote: > > > > > > A bug was identified where the KTAP below caused an infinite loop: > > >

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

2025-03-19 Thread Rae Moar
Fix test count with late test plan. For example, TAP version 13 ok 1 test1 1..4 Returns a count of 1 passed, 1 crashed (because it expects tests after the test plan): returning the total count of 2 tests Change this to be 1 passed, 1 error: total count of 1 test Signed-off-by: Rae Moar