[PATCH v3 7/7] Documentation: kunit: Document new parameterized test features

2025-08-15 Thread Marie Zhussupova
terminology. Reviewed-by: Rae Moar Reviewed-by: David Gow Signed-off-by: Marie Zhussupova --- Changes in v3: v2: https://lore.kernel.org/all/20250811221739.2694336-8-marie...@google.com/ - Parameterized test terminology was made more concise. - Introduction now includes more background information

[PATCH v3 6/7] kunit: Add example parameterized test with direct dynamic parameter array setup

2025-08-15 Thread Marie Zhussupova
of a parameterized test, and their registration to the test case with KUNIT_CASE_PARAM_WITH_INIT(). Reviewed-by: Rae Moar Reviewed-by: David Gow Signed-off-by: Marie Zhussupova --- Changes in v3: v2: https://lore.kernel.org/all/20250811221739.2694336-7-marie...@google.com/ - No changes. Changes

[PATCH v3 5/7] kunit: Add example parameterized test with shared resource management using the Resource API

2025-08-15 Thread Marie Zhussupova
to directly pass a parameter array to the parameterized test context via kunit_register_params_array() and leveraging the Resource API for shared resource management. Reviewed-by: Rae Moar Reviewed-by: David Gow Signed-off-by: Marie Zhussupova --- Changes in v3: v2: https://lore.kernel.org/all

[PATCH v3 4/7] kunit: Enable direct registration of parameter arrays to a KUnit test

2025-08-15 Thread Marie Zhussupova
: David Gow Signed-off-by: Marie Zhussupova --- Changes in v3: v2: https://lore.kernel.org/all/20250811221739.2694336-5-marie...@google.com/ - Commit message formatting. Changes in v2: v1: https://lore.kernel.org/all/20250729193647.3410634-7-marie...@google.com/ - If the parameter count is available

[PATCH v3 3/7] kunit: Pass parameterized test context to generate_params()

2025-08-15 Thread Marie Zhussupova
igo Vivi Signed-off-by: Marie Zhussupova --- Changes in v3: v2: https://lore.kernel.org/all/20250811221739.2694336-4-marie...@google.com/ - Commit message formatting. Changes in v2: v1: https://lore.kernel.org/all/20250729193647.3410634-4-marie...@google.com/ https://lore.kernel.org/all/2025

[PATCH v3 2/7] kunit: Introduce param_init/exit for parameterized test context management

2025-08-15 Thread Marie Zhussupova
`struct kunit` that holds the parameterized test context; facilitating init and exit for shared state. This patch also sets param_init/exit to None in rust/kernel/kunit.rs. Reviewed-by: Rae Moar Signed-off-by: Marie Zhussupova --- Changes in v3: v2: https://lore.kernel.org/all

[PATCH v3 1/7] kunit: Add parent kunit for parameterized test context

2025-08-15 Thread Marie Zhussupova
set to the `struct kunit` that holds the parameterized test context. Reviewed-by: David Gow Reviewed-by: Rae Moar Signed-off-by: Marie Zhussupova --- Changes in v3: v2: https://lore.kernel.org/all/20250811221739.2694336-2-marie...@google.com/ - Commit message formatting. Changes in v2: v1: https

[PATCH v3 0/7] kunit: Refactor and extend KUnit's parameterized testing framework

2025-08-15 Thread Marie Zhussupova
parameterized test context, as well. - Output the KTAP test plan for a parameterized test when the parameter count is available. - Cover letter was made more concise. - Edits to the example tests. - Fix bug of parameterized test init/exit logic being done outside of the parameterized test check.

[PATCH v2 7/7] Documentation: kunit: Document new parameterized test features

2025-08-11 Thread Marie Zhussupova
terminology. Signed-off-by: Marie Zhussupova --- Changes in v2: - The documentation was updated to establish the parameterized testing terminology and reflect all the patch series changes. - The references to other parts of the KUnit Documentation were not changed from being "Documentatio

[PATCH v2 6/7] kunit: Add example parameterized test with direct dynamic parameter array setup

2025-08-11 Thread Marie Zhussupova
of a parameterized test, and their registration to the test case with KUNIT_CASE_PARAM_WITH_INIT(). Signed-off-by: Marie Zhussupova --- Changes in v2: - kunit_array_gen_params() is now explicitly passed to KUNIT_CASE_PARAM_WITH_INIT() to be consistent with the parameterized test being

[PATCH v2 5/7] kunit: Add example parameterized test with shared resource management using the Resource API

2025-08-11 Thread Marie Zhussupova
to directly pass a parameter array to the parameterized test context via kunit_register_params_array() and leveraging the Resource API for shared resource management. Signed-off-by: Marie Zhussupova --- Changes in v2: - kunit_array_gen_params() is now explicitly passed to

[PATCH v2 4/7] kunit: Enable direct registration of parameter arrays to a KUnit test

2025-08-11 Thread Marie Zhussupova
: Marie Zhussupova --- Changes in v2: - If the parameter count is available for a parameterized test, the kunit_run_tests() function will now output the KTAP test plan for it. - The name of the struct kunit_params field in struct kunit was changed from params_data to params_array. This

[PATCH v2 2/7] kunit: Introduce param_init/exit for parameterized test context management

2025-08-11 Thread Marie Zhussupova
`struct kunit` that holds the parameterized test context; facilitating init and exit for shared state. This patch also sets param_init/exit to None in rust/kernel/kunit.rs. Signed-off-by: Marie Zhussupova --- Changes in v2: - param init/exit were set to None in rust/kernel/kunit.rs to fix the

[PATCH v2 3/7] kunit: Pass parameterized test context to generate_params()

2025-08-11 Thread Marie Zhussupova
; or "self" reference found in object-oriented programming languages. This patch also modifies xe_pci_live_device_gen_param() in xe_pci.c and nthreads_gen_params() in kcsan_test.c to reflect this signature change. Signed-off-by: Marie Zhussupova --- Changes in v2: - generate_params signature c

[PATCH v2 1/7] kunit: Add parent kunit for parameterized test context

2025-08-11 Thread Marie Zhussupova
set to the `struct kunit` that holds the parameterized test context. Signed-off-by: Marie Zhussupova --- Changes in v2: - Descriptions of the parent pointer in `struct kunit` were changed to be more general, as it could be used to share resources not only between parameter runs but also

[PATCH v2 0/7] kunit: Refactor and extend KUnit's parameterized testing framework

2025-08-11 Thread Marie Zhussupova
context, as well. - Output the KTAP test plan for a parameterized test when the parameter count is available. - Cover letter was made more concise. - Edits to the example tests. - Fix bug of parameterized test init/exit logic being done outside of the parameterized test check. - Fix bugs identi

Re: [PATCH 9/9] Documentation: kunit: Document new parameterized test features

2025-08-08 Thread Marie Zhussupova
On Tue, Aug 5, 2025 at 11:19 AM Rae Moar wrote: > > On Tue, Jul 29, 2025 at 3:37 PM Marie Zhussupova wrote: > > > > -Update the KUnit documentation to explain the concept > > of a parent parameterized test. > > -Add examples demonstrating different ways of passing &

Re: [PATCH 9/9] Documentation: kunit: Document new parameterized test features

2025-08-08 Thread Marie Zhussupova
On Sat, Aug 2, 2025 at 5:45 AM David Gow wrote: > > On Wed, 30 Jul 2025 at 03:37, Marie Zhussupova wrote: > > > > -Update the KUnit documentation to explain the concept > > of a parent parameterized test. > > -Add examples demonstrating different ways of passing &

Re: [PATCH 2/9] kunit: Introduce param_init/exit for parameterized test shared context management

2025-08-08 Thread Marie Zhussupova
On Tue, Aug 5, 2025 at 11:18 AM Rae Moar wrote: > > On Tue, Jul 29, 2025 at 3:37 PM Marie Zhussupova wrote: > > > > Add `param_init` and `param_exit` function pointers to > > `struct kunit_case`. Users will be able to set them > > via the new `KUNIT_CASE_PAR

Re: [PATCH 1/9] kunit: Add parent kunit for parameterized test context

2025-08-08 Thread Marie Zhussupova
On Tue, Aug 5, 2025 at 11:17 AM Rae Moar wrote: > > On Tue, Jul 29, 2025 at 3:37 PM Marie Zhussupova wrote: > > > > Currently, KUnit parameterized tests lack a mechanism > > to share resources across individual test invocations > > because the same `struct kunit` i

Re: [PATCH 6/9] kunit: Enable direct registration of parameter arrays to a KUnit test

2025-08-07 Thread Marie Zhussupova
On Tue, Aug 5, 2025 at 11:18 AM Rae Moar wrote: > > On Tue, Jul 29, 2025 at 3:37 PM Marie Zhussupova wrote: > > > > KUnit parameterized tests currently support two > > primary methods for getting parameters: > > 1. Defining custom logic within a `generate_params` &

Re: [PATCH 7/9] kunit: Add example parameterized test with shared resources and direct static parameter array setup

2025-08-06 Thread Marie Zhussupova
On Sat, Aug 2, 2025 at 5:45 AM David Gow wrote: > > On Wed, 30 Jul 2025 at 03:37, Marie Zhussupova wrote: > > > > Add `example_params_test_with_init` to illustrate how to manage > > shared resources across parameterized KUnit tests. This example > > showcases

Re: [PATCH 6/9] kunit: Enable direct registration of parameter arrays to a KUnit test

2025-07-31 Thread Marie Zhussupova
On Thu, Jul 31, 2025 at 11:58 AM Dan Carpenter wrote: > > Hi Marie, > > kernel test robot noticed the following build warnings: > > https://git-scm.com/docs/git-format-patch#_base_tree_information] > > url: > https://github.com/intel-lab-lkp/linux/commits/Marie-

Re: [PATCH 6/9] kunit: Enable direct registration of parameter arrays to a KUnit test

2025-07-31 Thread Marie Zhussupova
On Thu, Jul 31, 2025 at 11:58 AM Dan Carpenter wrote: > Hi Marie, > > kernel test robot noticed the following build warnings: > > https://git-scm.com/docs/git-format-patch#_base_tree_information] > > url: > https://github.com/intel-lab-lkp/linux/commits/Marie-Zhussupov

[PATCH 7/9] kunit: Add example parameterized test with shared resources and direct static parameter array setup

2025-07-29 Thread Marie Zhussupova
: - How to directly assign a static parameter array to a test via `kunit_register_params_array`. - Leveraging the Resource API for test resource management. Signed-off-by: Marie Zhussupova --- lib/kunit/kunit-example-test.c | 112 + 1 file changed, 112 insertions

[PATCH 8/9] kunit: Add example parameterized test with direct dynamic parameter array setup

2025-07-29 Thread Marie Zhussupova
to the test with `KUNIT_CASE_PARAM_WITH_INIT`. Signed-off-by: Marie Zhussupova --- lib/kunit/kunit-example-test.c | 95 ++ 1 file changed, 95 insertions(+) diff --git a/lib/kunit/kunit-example-test.c b/lib/kunit/kunit-example-test.c index 5bf559e243f6..3ab121d81bf6

[PATCH 9/9] Documentation: kunit: Document new parameterized test features

2025-07-29 Thread Marie Zhussupova
-Update the KUnit documentation to explain the concept of a parent parameterized test. -Add examples demonstrating different ways of passing parameters to parameterized tests and how to manage shared resources between them. Signed-off-by: Marie Zhussupova --- Documentation/dev-tools/kunit

[PATCH 6/9] kunit: Enable direct registration of parameter arrays to a KUnit test

2025-07-29 Thread Marie Zhussupova
, allowing testers to easily register and utilize both dynamic and static parameter arrays. Signed-off-by: Marie Zhussupova --- include/kunit/test.h | 54 lib/kunit/test.c | 26 - 2 files changed, 75 insertions(+), 5 deletions(-) diff

[PATCH 4/9] kcsan: test: Update parameter generator to new signature

2025-07-29 Thread Marie Zhussupova
This patch modifies `nthreads_gen_params` in kcsan_test.c to accept an additional `struct kunit *test` argument. Signed-off-by: Marie Zhussupova --- kernel/kcsan/kcsan_test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/kcsan/kcsan_test.c b/kernel/kcsan

[PATCH 5/9] drm/xe: Update parameter generator to new signature

2025-07-29 Thread Marie Zhussupova
This patch modifies `xe_pci_live_device_gen_param` in xe_pci.c to accept an additional `struct kunit *test` argument. Signed-off-by: Marie Zhussupova --- drivers/gpu/drm/xe/tests/xe_pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/xe/tests/xe_pci.c b

[PATCH 3/9] kunit: Pass additional context to generate_params for parameterized testing

2025-07-29 Thread Marie Zhussupova
t;this" or "self" reference found in object-oriented programming languages. Signed-off-by: Marie Zhussupova --- include/kunit/test.h | 9 ++--- lib/kunit/test.c | 5 +++-- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/include/kunit/test.h b/include/kunit/

[PATCH 2/9] kunit: Introduce param_init/exit for parameterized test shared context management

2025-07-29 Thread Marie Zhussupova
receive the parent kunit test instance, allowing users to register and manage shared resources. Resources added to this parent kunit test will be accessible to all individual parameterized tests, facilitating init and exit for shared state. Signed-off-by: Marie Zhussupova --- include/kunit/test.h

[PATCH 1/9] kunit: Add parent kunit for parameterized test context

2025-07-29 Thread Marie Zhussupova
parent pointer is added to `struct kunit`, allowing individual parameterized tests to reference a shared parent kunit instance. Resources added to this parent will then be accessible to all individual parameter test executions. Signed-off-by: Marie Zhussupova --- include/kunit/test.h | 12

[PATCH 0/9] kunit: Refactor and extend KUnit's

2025-07-29 Thread Marie Zhussupova
`. This will allow the parent instance of a test to have direct storage of the parameter array, enabling features like using dynamic parameter arrays or using context beyond just the previous parameter. Thank you! -Marie Marie Zhussupova (9): kunit: Add parent kunit for parameterized