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
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
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
: 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
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
`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
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
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.
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
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
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
: 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
`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
; 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
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
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
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
&
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
&
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
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
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`
&
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
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-
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
:
- 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
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
-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
, 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
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
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
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/
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
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
`.
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
34 matches
Mail list logo