Linux Documentation
 help / color / mirror / Atom feed
* [PATCH 0/9] kunit: Add KUNIT_CASE_PARAM_UNIQUE() and KUNIT_CASE_PARAM_WITH_INIT_UNIQUE()
@ 2026-10-12 23:10 Mark
  2026-10-12 23:10 ` [PATCH 1/9] firmware: cs_dsp: Run the wmfw payload error tests with invalid block types Mark
                   ` (8 more replies)
  0 siblings, 9 replies; 17+ messages in thread
From: Mark @ 2026-10-12 23:10 UTC (permalink / raw)
  To: Simon Trimmer, Charles Keepax, Richard Fitzgerald,
	Brendan Higgins, David Gow, Rae Moar, Jonathan Corbet, Shuah Khan,
	Randy Dunlap, Theodore Ts'o, Andreas Dilger, Baokun Li,
	Jan Kara, Ojaswin Mujoo, Ritesh Harjani (IBM), Zhang Yi,
	David Rhodes, Liam Girdwood, Jaroslav Kysela, Takashi Iwai
  Cc: patches, linux-kernel, linux-kselftest, kunit-dev, linux-doc,
	linux-ext4, linux-sound, Mark Brown

KUNIT_CASE_PARAM() and KUNIT_CASE_PARAM_WITH_INIT() name the test case
after the test function. Several suites reuse one test function with
more than one parameter generator or param_init() function, listing it
once per set of parameters, which leads to multiple tests being created
with the same name. Same-named cases cannot be told apart in the results
and cannot be selected individually with kunit.filter_glob=, so kunit.py
--run_isolated=test boots a kernel for every entry and each kernel runs
all of the same-named cases.

We could fix this by having the KUNIT_CASE_PARAM() macros always include
the parameter name but this would not only rename all existing users but
also result in some awkwardly named tests. Instead introduce some new
macros for use in cases where we need to disambiguate.

Add KUNIT_CASE_PARAM_UNIQUE() and KUNIT_CASE_PARAM_WITH_INIT_UNIQUE()
which behave identically to the existing macros but include the name of
the parameter generator or the param_init() function in the name of
the case, giving names such as sha1_test-sha1_gen_params. The
param_init() function is used for the WITH_INIT variant since currently
all the tests which register parameter arrays from param_init() all
share the generic kunit_array_gen_params() generator.

The series also includes a fix for what looks like a cut'n'paste
issue in the cs_dsp code that overlaps with the main set of changes.
Most of the affected tests are in ASoC, though there are some ext4 tests
too.

Signed-off-by: Mark Brown <broonie@kernel.org>
---
Mark (8):
      firmware: cs_dsp: Run the wmfw payload error tests with invalid block types
      kunit: Add KUNIT_CASE_PARAM_UNIQUE() and KUNIT_CASE_PARAM_WITH_INIT_UNIQUE()
      ext4: Give the extents KUnit cases distinct names
      firmware: cs_dsp: Give the control read/write KUnit cases distinct names
      firmware: cs_dsp: Give the control cache KUnit cases distinct names
      firmware: cs_dsp: Give the wmfw block error KUnit cases distinct names
      firmware: cs_dsp: Give the bin file KUnit cases distinct names
      ASoC: wm_adsp: Give the firmware search order KUnit cases distinct names

Mark Brown (1):
      ASoC: cs35l56: Give the speaker ID pad config KUnit cases distinct names

 Documentation/dev-tools/kunit/usage.rst            |   9 +
 drivers/firmware/cirrus/test/cs_dsp_test_bin.c     | 222 ++++++++++-----------
 .../cirrus/test/cs_dsp_test_control_cache.c        | 143 ++++++-------
 .../firmware/cirrus/test/cs_dsp_test_control_rw.c  |  50 ++---
 .../firmware/cirrus/test/cs_dsp_test_wmfw_error.c  |  72 ++++---
 fs/ext4/extents-test.c                             |  12 +-
 include/kunit/test.h                               |  41 ++++
 sound/soc/codecs/cs35l56-shared-test.c             |   8 +-
 sound/soc/codecs/wm_adsp_fw_find_test.c            |  24 +--
 9 files changed, 329 insertions(+), 252 deletions(-)
---
base-commit: 24a19b953e2a3d0ea5a8c4951a0ab8f32720c907
base-tree: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
change-id: 20261012-kunit-param-names-d6cb1450c3ce

Best regards,
--  
Mark Brown <broonie@kernel.org>


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [PATCH 1/9] firmware: cs_dsp: Run the wmfw payload error tests with invalid block types
  2026-10-12 23:10 [PATCH 0/9] kunit: Add KUNIT_CASE_PARAM_UNIQUE() and KUNIT_CASE_PARAM_WITH_INIT_UNIQUE() Mark
@ 2026-10-12 23:10 ` Mark
  2026-10-13  9:17   ` Richard Fitzgerald
  2026-10-12 23:10 ` [PATCH 2/9] kunit: Add KUNIT_CASE_PARAM_UNIQUE() and KUNIT_CASE_PARAM_WITH_INIT_UNIQUE() Mark
                   ` (7 subsequent siblings)
  8 siblings, 1 reply; 17+ messages in thread
From: Mark @ 2026-10-12 23:10 UTC (permalink / raw)
  To: Simon Trimmer, Charles Keepax, Richard Fitzgerald,
	Brendan Higgins, David Gow, Rae Moar, Jonathan Corbet, Shuah Khan,
	Randy Dunlap, Theodore Ts'o, Andreas Dilger, Baokun Li,
	Jan Kara, Ojaswin Mujoo, Ritesh Harjani (IBM), Zhang Yi,
	David Rhodes, Liam Girdwood, Jaroslav Kysela, Takashi Iwai
  Cc: patches, linux-kernel, linux-kselftest, kunit-dev, linux-doc,
	linux-ext4, linux-sound, Mark Brown

Each of the wmfw error suites lists the truncated block header, truncated
block payload and garbage payload length tests twice, once with valid
block types and once with invalid block types. For the payload and
garbage length tests the second entry names wmfw_too_short_for_block_header
rather than the test on the preceding line, so the block header test is
run four times with invalid block types while the other two are only ever
run with valid ones.

Point the second entries at the intended tests so that
wmfw_too_short_for_block_payload() and wmfw_block_payload_len_garbage()
are also run with invalid block types, as the header test already is.

Fixes: feb5fb0615f3 ("firmware: cs_dsp: Add KUnit testing of wmfw error cases")
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 drivers/firmware/cirrus/test/cs_dsp_test_wmfw_error.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/firmware/cirrus/test/cs_dsp_test_wmfw_error.c b/drivers/firmware/cirrus/test/cs_dsp_test_wmfw_error.c
index e7bf5dc474f5..b07978d90fa9 100644
--- a/drivers/firmware/cirrus/test/cs_dsp_test_wmfw_error.c
+++ b/drivers/firmware/cirrus/test/cs_dsp_test_wmfw_error.c
@@ -1222,9 +1222,9 @@ static struct kunit_case cs_dsp_wmfw_err_test_cases_v0[] = {
 	KUNIT_CASE_PARAM(wmfw_too_short_for_block_header, wmfw_valid_block_types_adsp2_gen_params),
 	KUNIT_CASE_PARAM(wmfw_too_short_for_block_header, wmfw_invalid_block_types_gen_params),
 	KUNIT_CASE_PARAM(wmfw_too_short_for_block_payload, wmfw_valid_block_types_adsp2_gen_params),
-	KUNIT_CASE_PARAM(wmfw_too_short_for_block_header, wmfw_invalid_block_types_gen_params),
+	KUNIT_CASE_PARAM(wmfw_too_short_for_block_payload, wmfw_invalid_block_types_gen_params),
 	KUNIT_CASE_PARAM(wmfw_block_payload_len_garbage, wmfw_valid_block_types_adsp2_gen_params),
-	KUNIT_CASE_PARAM(wmfw_too_short_for_block_header, wmfw_invalid_block_types_gen_params),
+	KUNIT_CASE_PARAM(wmfw_block_payload_len_garbage, wmfw_invalid_block_types_gen_params),
 
 	{ } /* terminator */
 };
@@ -1239,9 +1239,9 @@ static struct kunit_case cs_dsp_wmfw_err_test_cases_v1[] = {
 	KUNIT_CASE_PARAM(wmfw_too_short_for_block_header, wmfw_valid_block_types_adsp2_gen_params),
 	KUNIT_CASE_PARAM(wmfw_too_short_for_block_header, wmfw_invalid_block_types_gen_params),
 	KUNIT_CASE_PARAM(wmfw_too_short_for_block_payload, wmfw_valid_block_types_adsp2_gen_params),
-	KUNIT_CASE_PARAM(wmfw_too_short_for_block_header, wmfw_invalid_block_types_gen_params),
+	KUNIT_CASE_PARAM(wmfw_too_short_for_block_payload, wmfw_invalid_block_types_gen_params),
 	KUNIT_CASE_PARAM(wmfw_block_payload_len_garbage, wmfw_valid_block_types_adsp2_gen_params),
-	KUNIT_CASE_PARAM(wmfw_too_short_for_block_header, wmfw_invalid_block_types_gen_params),
+	KUNIT_CASE_PARAM(wmfw_block_payload_len_garbage, wmfw_invalid_block_types_gen_params),
 
 	KUNIT_CASE(wmfw_too_short_for_alg_header),
 	KUNIT_CASE(wmfw_v1_alg_name_unterminated),
@@ -1261,9 +1261,9 @@ static struct kunit_case cs_dsp_wmfw_err_test_cases_v2[] = {
 	KUNIT_CASE_PARAM(wmfw_too_short_for_block_header, wmfw_valid_block_types_adsp2_gen_params),
 	KUNIT_CASE_PARAM(wmfw_too_short_for_block_header, wmfw_invalid_block_types_gen_params),
 	KUNIT_CASE_PARAM(wmfw_too_short_for_block_payload, wmfw_valid_block_types_adsp2_gen_params),
-	KUNIT_CASE_PARAM(wmfw_too_short_for_block_header, wmfw_invalid_block_types_gen_params),
+	KUNIT_CASE_PARAM(wmfw_too_short_for_block_payload, wmfw_invalid_block_types_gen_params),
 	KUNIT_CASE_PARAM(wmfw_block_payload_len_garbage, wmfw_valid_block_types_adsp2_gen_params),
-	KUNIT_CASE_PARAM(wmfw_too_short_for_block_header, wmfw_invalid_block_types_gen_params),
+	KUNIT_CASE_PARAM(wmfw_block_payload_len_garbage, wmfw_invalid_block_types_gen_params),
 
 	KUNIT_CASE(wmfw_too_short_for_alg_header),
 	KUNIT_CASE(wmfw_v2_alg_name_exceeds_block),
@@ -1287,9 +1287,9 @@ static struct kunit_case cs_dsp_wmfw_err_test_cases_v3[] = {
 	KUNIT_CASE_PARAM(wmfw_too_short_for_block_header, wmfw_valid_block_types_halo_gen_params),
 	KUNIT_CASE_PARAM(wmfw_too_short_for_block_header, wmfw_invalid_block_types_gen_params),
 	KUNIT_CASE_PARAM(wmfw_too_short_for_block_payload, wmfw_valid_block_types_halo_gen_params),
-	KUNIT_CASE_PARAM(wmfw_too_short_for_block_header, wmfw_invalid_block_types_gen_params),
+	KUNIT_CASE_PARAM(wmfw_too_short_for_block_payload, wmfw_invalid_block_types_gen_params),
 	KUNIT_CASE_PARAM(wmfw_block_payload_len_garbage, wmfw_valid_block_types_halo_gen_params),
-	KUNIT_CASE_PARAM(wmfw_too_short_for_block_header, wmfw_invalid_block_types_gen_params),
+	KUNIT_CASE_PARAM(wmfw_block_payload_len_garbage, wmfw_invalid_block_types_gen_params),
 
 	KUNIT_CASE(wmfw_too_short_for_alg_header),
 	KUNIT_CASE(wmfw_v2_alg_name_exceeds_block),

-- 
2.47.3


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH 2/9] kunit: Add KUNIT_CASE_PARAM_UNIQUE() and KUNIT_CASE_PARAM_WITH_INIT_UNIQUE()
  2026-10-12 23:10 [PATCH 0/9] kunit: Add KUNIT_CASE_PARAM_UNIQUE() and KUNIT_CASE_PARAM_WITH_INIT_UNIQUE() Mark
  2026-10-12 23:10 ` [PATCH 1/9] firmware: cs_dsp: Run the wmfw payload error tests with invalid block types Mark
@ 2026-10-12 23:10 ` Mark
  2026-10-12 23:10 ` [PATCH 3/9] ext4: Give the extents KUnit cases distinct names Mark
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 17+ messages in thread
From: Mark @ 2026-10-12 23:10 UTC (permalink / raw)
  To: Simon Trimmer, Charles Keepax, Richard Fitzgerald,
	Brendan Higgins, David Gow, Rae Moar, Jonathan Corbet, Shuah Khan,
	Randy Dunlap, Theodore Ts'o, Andreas Dilger, Baokun Li,
	Jan Kara, Ojaswin Mujoo, Ritesh Harjani (IBM), Zhang Yi,
	David Rhodes, Liam Girdwood, Jaroslav Kysela, Takashi Iwai
  Cc: patches, linux-kernel, linux-kselftest, kunit-dev, linux-doc,
	linux-ext4, linux-sound, Mark Brown

KUNIT_CASE_PARAM() and KUNIT_CASE_PARAM_WITH_INIT() name the test case
after the test function. Several suites reuse one test function with
more than one parameter generator or param_init() function, listing it
once per set of parameters, which leads to multiple tests being created
with the same name. Same-named cases cannot be told apart in the results
and cannot be selected individually with kunit.filter_glob=, so kunit.py
--run_isolated=test boots a kernel for every entry and each kernel runs
all of the same-named cases.

We could fix this by having the KUNIT_CASE_PARAM() macros always include
the parameter name but this would not only rename all existing users but
also result in some awkwardly named tests. Instead introduce some new
macros for use in cases where we need to disambiguate.

Add KUNIT_CASE_PARAM_UNIQUE() and KUNIT_CASE_PARAM_WITH_INIT_UNIQUE()
which behave identically to the existing macros but include the name of
the parameter generator or the param_init() function in the name of
the case, giving names such as sha1_test-sha1_gen_params. The
param_init() function is used for the WITH_INIT variant since currently
all the tests which register parameter arrays from param_init() all
share the generic kunit_array_gen_params() generator.

Signed-off-by: Mark Brown <broonie@kernel.org>
---
 Documentation/dev-tools/kunit/usage.rst |  9 ++++++++
 include/kunit/test.h                    | 41 +++++++++++++++++++++++++++++++++
 2 files changed, 50 insertions(+)

diff --git a/Documentation/dev-tools/kunit/usage.rst b/Documentation/dev-tools/kunit/usage.rst
index 1c78dfff94e8..193233fd2925 100644
--- a/Documentation/dev-tools/kunit/usage.rst
+++ b/Documentation/dev-tools/kunit/usage.rst
@@ -662,6 +662,15 @@ Custom Parameter Generator Function:
    You can pass the generator function to the ``KUNIT_CASE_PARAM``
    or ``KUNIT_CASE_PARAM_WITH_INIT`` macros.
 
+   These macros name the test case after the test function. If the same test
+   function is listed in a suite with more than one generator (or, for
+   ``KUNIT_CASE_PARAM_WITH_INIT``, more than one ``param_init()`` function)
+   use ``KUNIT_CASE_PARAM_UNIQUE`` or ``KUNIT_CASE_PARAM_WITH_INIT_UNIQUE``
+   instead. These also include the name of the generator or ``param_init()``
+   function in the test case name, for example ``sha1_test-sha1_gen_params``,
+   so that each case has a distinct name which can be selected with
+   ``kunit.filter_glob=``.
+
    The function receives the previously generated parameter as the ``prev`` argument
    (which is ``NULL`` on the first call) and can also access the parameterized
    test context passed as the ``test`` argument. KUnit calls this function
diff --git a/include/kunit/test.h b/include/kunit/test.h
index da5312e0dfa5..e43f5e007f20 100644
--- a/include/kunit/test.h
+++ b/include/kunit/test.h
@@ -209,6 +209,24 @@ static inline char *kunit_status_to_ok_not_ok(enum kunit_status status)
 		{ .run_case = test_name, .name = #test_name,	\
 		  .generate_params = gen_params, .module_name = KBUILD_MODNAME}
 
+/**
+ * KUNIT_CASE_PARAM_UNIQUE - A helper for creating a parameterized &struct
+ * kunit_case named after both the test and its parameter generator
+ *
+ * @test_name: a reference to a test case function.
+ * @gen_params: a reference to a parameter generator function.
+ *
+ * Identical to KUNIT_CASE_PARAM() except that the case is named
+ * "test_name-gen_params" rather than "test_name". Use this when the same
+ * test function is listed in a suite with more than one parameter generator,
+ * where KUNIT_CASE_PARAM() would give every instance the same name. Test
+ * names must be unique within a suite for the results to be unambiguous and
+ * for filters such as kunit.filter_glob= to be able to select a single case.
+ */
+#define KUNIT_CASE_PARAM_UNIQUE(test_name, gen_params)				\
+		{ .run_case = test_name, .name = #test_name "-" #gen_params,	\
+		  .generate_params = gen_params, .module_name = KBUILD_MODNAME}
+
 /**
  * KUNIT_CASE_PARAM_ATTR - A helper for creating a parameterized &struct
  * kunit_case with attributes
@@ -248,6 +266,29 @@ static inline char *kunit_status_to_ok_not_ok(enum kunit_status status)
 		  .param_init = init, .param_exit = exit,			\
 		  .module_name = KBUILD_MODNAME}
 
+/**
+ * KUNIT_CASE_PARAM_WITH_INIT_UNIQUE - Define a parameterized KUnit test case
+ * with custom param_init() and param_exit() functions, named after both the
+ * test and its param_init() function.
+ * @test_name: The function implementing the test case.
+ * @gen_params: The function to generate parameters for the test case.
+ * @init: A reference to the param_init() function to run before a parameterized test.
+ * @exit: A reference to the param_exit() function to run after a parameterized test.
+ *
+ * Identical to KUNIT_CASE_PARAM_WITH_INIT() except that the case is named
+ * "test_name-init" rather than "test_name". Use this when the same test
+ * function is listed in a suite with more than one param_init() function,
+ * where KUNIT_CASE_PARAM_WITH_INIT() would give every instance the same
+ * name. The param_init() function is used rather than the generator since
+ * tests registering parameter arrays in param_init() all share the generic
+ * kunit_array_gen_params() generator.
+ */
+#define KUNIT_CASE_PARAM_WITH_INIT_UNIQUE(test_name, gen_params, init, exit)	\
+		{ .run_case = test_name, .name = #test_name "-" #init,		\
+		  .generate_params = gen_params,				\
+		  .param_init = init, .param_exit = exit,			\
+		  .module_name = KBUILD_MODNAME}
+
 /**
  * struct kunit_suite - describes a related collection of &struct kunit_case
  *

-- 
2.47.3


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH 3/9] ext4: Give the extents KUnit cases distinct names
  2026-10-12 23:10 [PATCH 0/9] kunit: Add KUNIT_CASE_PARAM_UNIQUE() and KUNIT_CASE_PARAM_WITH_INIT_UNIQUE() Mark
  2026-10-12 23:10 ` [PATCH 1/9] firmware: cs_dsp: Run the wmfw payload error tests with invalid block types Mark
  2026-10-12 23:10 ` [PATCH 2/9] kunit: Add KUNIT_CASE_PARAM_UNIQUE() and KUNIT_CASE_PARAM_WITH_INIT_UNIQUE() Mark
@ 2026-10-12 23:10 ` Mark
  2026-10-12 23:10 ` [PATCH 4/9] firmware: cs_dsp: Give the control read/write " Mark
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 17+ messages in thread
From: Mark @ 2026-10-12 23:10 UTC (permalink / raw)
  To: Simon Trimmer, Charles Keepax, Richard Fitzgerald,
	Brendan Higgins, David Gow, Rae Moar, Jonathan Corbet, Shuah Khan,
	Randy Dunlap, Theodore Ts'o, Andreas Dilger, Baokun Li,
	Jan Kara, Ojaswin Mujoo, Ritesh Harjani (IBM), Zhang Yi,
	David Rhodes, Liam Girdwood, Jaroslav Kysela, Takashi Iwai
  Cc: patches, linux-kernel, linux-kselftest, kunit-dev, linux-doc,
	linux-ext4, linux-sound, Mark Brown

The ext4_extents_test suite runs test_split_convert() against three
different parameter arrays by listing it three times with
KUNIT_CASE_PARAM_WITH_INIT(), which names each case after the function.
All three cases are therefore called test_split_convert, so they cannot
be told apart in the results.

Use KUNIT_CASE_PARAM_WITH_INIT_UNIQUE() for these entries so that each
case is also named for the param_init() function which registers its
parameter array, for example
test_split_convert-test_convert_initialized_param_init.

Signed-off-by: Mark Brown <broonie@kernel.org>
---
 fs/ext4/extents-test.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/fs/ext4/extents-test.c b/fs/ext4/extents-test.c
index c3836ecb89f9..5e70542b718b 100644
--- a/fs/ext4/extents-test.c
+++ b/fs/ext4/extents-test.c
@@ -1043,12 +1043,12 @@ static int test_handle_unwritten_init(struct kunit *test)
  * https://lore.kernel.org/linux-kselftest/aULJpTvJDw9ctUDe@li-dc0c254c-257c-11b2-a85c-98b6c1322444.ibm.com/
  */
 static struct kunit_case extents_test_cases[] = {
-	KUNIT_CASE_PARAM_WITH_INIT(test_split_convert, kunit_array_gen_params,
-				   test_split_convert_param_init, NULL),
-	KUNIT_CASE_PARAM_WITH_INIT(test_split_convert, kunit_array_gen_params,
-				   test_convert_initialized_param_init, NULL),
-	KUNIT_CASE_PARAM_WITH_INIT(test_split_convert, kunit_array_gen_params,
-				   test_handle_unwritten_init, NULL),
+	KUNIT_CASE_PARAM_WITH_INIT_UNIQUE(test_split_convert, kunit_array_gen_params,
+					  test_split_convert_param_init, NULL),
+	KUNIT_CASE_PARAM_WITH_INIT_UNIQUE(test_split_convert, kunit_array_gen_params,
+					  test_convert_initialized_param_init, NULL),
+	KUNIT_CASE_PARAM_WITH_INIT_UNIQUE(test_split_convert, kunit_array_gen_params,
+					  test_handle_unwritten_init, NULL),
 	{}
 };
 

-- 
2.47.3


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH 4/9] firmware: cs_dsp: Give the control read/write KUnit cases distinct names
  2026-10-12 23:10 [PATCH 0/9] kunit: Add KUNIT_CASE_PARAM_UNIQUE() and KUNIT_CASE_PARAM_WITH_INIT_UNIQUE() Mark
                   ` (2 preceding siblings ...)
  2026-10-12 23:10 ` [PATCH 3/9] ext4: Give the extents KUnit cases distinct names Mark
@ 2026-10-12 23:10 ` Mark
  2026-10-13  9:49   ` Richard Fitzgerald
  2026-10-12 23:10 ` [PATCH 5/9] firmware: cs_dsp: Give the control cache " Mark
                   ` (4 subsequent siblings)
  8 siblings, 1 reply; 17+ messages in thread
From: Mark @ 2026-10-12 23:10 UTC (permalink / raw)
  To: Simon Trimmer, Charles Keepax, Richard Fitzgerald,
	Brendan Higgins, David Gow, Rae Moar, Jonathan Corbet, Shuah Khan,
	Randy Dunlap, Theodore Ts'o, Andreas Dilger, Baokun Li,
	Jan Kara, Ojaswin Mujoo, Ritesh Harjani (IBM), Zhang Yi,
	David Rhodes, Liam Girdwood, Jaroslav Kysela, Takashi Iwai
  Cc: patches, linux-kernel, linux-kselftest, kunit-dev, linux-doc,
	linux-ext4, linux-sound, Mark Brown

The cs_dsp_ctl_rw suites run cs_dsp_ctl_write_running() and
cs_dsp_ctl_read_volatile_running() against several sets of parameters
by listing each function several times with KUNIT_CASE_PARAM(), which
names the case after the function. The resulting cases all share a
name, so they cannot be told apart in the results.

Use KUNIT_CASE_PARAM_UNIQUE() for these entries so that each case is
also named for the parameter generator it is run with, for example
cs_dsp_ctl_write_running-all_pop_varying_len_gen_params.

Signed-off-by: Mark Brown <broonie@kernel.org>
---
 .../firmware/cirrus/test/cs_dsp_test_control_rw.c  | 50 +++++++++++-----------
 1 file changed, 26 insertions(+), 24 deletions(-)

diff --git a/drivers/firmware/cirrus/test/cs_dsp_test_control_rw.c b/drivers/firmware/cirrus/test/cs_dsp_test_control_rw.c
index d800f163b099..085a1cb92912 100644
--- a/drivers/firmware/cirrus/test/cs_dsp_test_control_rw.c
+++ b/drivers/firmware/cirrus/test/cs_dsp_test_control_rw.c
@@ -2483,19 +2483,20 @@ KUNIT_ARRAY_PARAM(all_pop_volatile_writeable_flags,
 		  cs_dsp_ctl_all_param_desc);
 
 static struct kunit_case cs_dsp_ctl_rw_test_cases_adsp[] = {
-	KUNIT_CASE_PARAM(cs_dsp_ctl_write_running, all_pop_varying_len_gen_params),
-	KUNIT_CASE_PARAM(cs_dsp_ctl_write_running, all_pop_varying_offset_gen_params),
-	KUNIT_CASE_PARAM(cs_dsp_ctl_write_running, all_pop_varying_xy_gen_params),
-	KUNIT_CASE_PARAM(cs_dsp_ctl_write_running, all_pop_z_gen_params),
-	KUNIT_CASE_PARAM(cs_dsp_ctl_write_running, all_pop_varying_alg_gen_params),
-	KUNIT_CASE_PARAM(cs_dsp_ctl_write_running, all_pop_writeable_flags_gen_params),
-
-	KUNIT_CASE_PARAM(cs_dsp_ctl_read_volatile_running, all_pop_varying_len_gen_params),
-	KUNIT_CASE_PARAM(cs_dsp_ctl_read_volatile_running, all_pop_varying_offset_gen_params),
-	KUNIT_CASE_PARAM(cs_dsp_ctl_read_volatile_running, all_pop_varying_xy_gen_params),
-	KUNIT_CASE_PARAM(cs_dsp_ctl_read_volatile_running, all_pop_z_gen_params),
-	KUNIT_CASE_PARAM(cs_dsp_ctl_read_volatile_running,
-			 all_pop_volatile_readable_flags_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(cs_dsp_ctl_write_running, all_pop_varying_len_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(cs_dsp_ctl_write_running, all_pop_varying_offset_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(cs_dsp_ctl_write_running, all_pop_varying_xy_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(cs_dsp_ctl_write_running, all_pop_z_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(cs_dsp_ctl_write_running, all_pop_varying_alg_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(cs_dsp_ctl_write_running, all_pop_writeable_flags_gen_params),
+
+	KUNIT_CASE_PARAM_UNIQUE(cs_dsp_ctl_read_volatile_running, all_pop_varying_len_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(cs_dsp_ctl_read_volatile_running,
+				all_pop_varying_offset_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(cs_dsp_ctl_read_volatile_running, all_pop_varying_xy_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(cs_dsp_ctl_read_volatile_running, all_pop_z_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(cs_dsp_ctl_read_volatile_running,
+				all_pop_volatile_readable_flags_gen_params),
 
 	KUNIT_CASE_PARAM(cs_dsp_ctl_read_volatile_not_started,
 			 all_pop_volatile_readable_flags_gen_params),
@@ -2559,17 +2560,18 @@ static struct kunit_case cs_dsp_ctl_rw_test_cases_adsp[] = {
 };
 
 static struct kunit_case cs_dsp_ctl_rw_test_cases_halo[] = {
-	KUNIT_CASE_PARAM(cs_dsp_ctl_write_running, all_pop_varying_len_gen_params),
-	KUNIT_CASE_PARAM(cs_dsp_ctl_write_running, all_pop_varying_offset_gen_params),
-	KUNIT_CASE_PARAM(cs_dsp_ctl_write_running, all_pop_varying_xy_gen_params),
-	KUNIT_CASE_PARAM(cs_dsp_ctl_write_running, all_pop_varying_alg_gen_params),
-	KUNIT_CASE_PARAM(cs_dsp_ctl_write_running, all_pop_writeable_flags_gen_params),
-
-	KUNIT_CASE_PARAM(cs_dsp_ctl_read_volatile_running, all_pop_varying_len_gen_params),
-	KUNIT_CASE_PARAM(cs_dsp_ctl_read_volatile_running, all_pop_varying_offset_gen_params),
-	KUNIT_CASE_PARAM(cs_dsp_ctl_read_volatile_running, all_pop_varying_xy_gen_params),
-	KUNIT_CASE_PARAM(cs_dsp_ctl_read_volatile_running,
-			 all_pop_volatile_readable_flags_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(cs_dsp_ctl_write_running, all_pop_varying_len_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(cs_dsp_ctl_write_running, all_pop_varying_offset_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(cs_dsp_ctl_write_running, all_pop_varying_xy_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(cs_dsp_ctl_write_running, all_pop_varying_alg_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(cs_dsp_ctl_write_running, all_pop_writeable_flags_gen_params),
+
+	KUNIT_CASE_PARAM_UNIQUE(cs_dsp_ctl_read_volatile_running, all_pop_varying_len_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(cs_dsp_ctl_read_volatile_running,
+				all_pop_varying_offset_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(cs_dsp_ctl_read_volatile_running, all_pop_varying_xy_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(cs_dsp_ctl_read_volatile_running,
+				all_pop_volatile_readable_flags_gen_params),
 
 	KUNIT_CASE_PARAM(cs_dsp_ctl_read_volatile_not_started,
 			 all_pop_volatile_readable_flags_gen_params),

-- 
2.47.3


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH 5/9] firmware: cs_dsp: Give the control cache KUnit cases distinct names
  2026-10-12 23:10 [PATCH 0/9] kunit: Add KUNIT_CASE_PARAM_UNIQUE() and KUNIT_CASE_PARAM_WITH_INIT_UNIQUE() Mark
                   ` (3 preceding siblings ...)
  2026-10-12 23:10 ` [PATCH 4/9] firmware: cs_dsp: Give the control read/write " Mark
@ 2026-10-12 23:10 ` Mark
  2026-10-13  9:55   ` Richard Fitzgerald
  2026-10-12 23:10 ` [PATCH 6/9] firmware: cs_dsp: Give the wmfw block error " Mark
                   ` (3 subsequent siblings)
  8 siblings, 1 reply; 17+ messages in thread
From: Mark @ 2026-10-12 23:10 UTC (permalink / raw)
  To: Simon Trimmer, Charles Keepax, Richard Fitzgerald,
	Brendan Higgins, David Gow, Rae Moar, Jonathan Corbet, Shuah Khan,
	Randy Dunlap, Theodore Ts'o, Andreas Dilger, Baokun Li,
	Jan Kara, Ojaswin Mujoo, Ritesh Harjani (IBM), Zhang Yi,
	David Rhodes, Liam Girdwood, Jaroslav Kysela, Takashi Iwai
  Cc: patches, linux-kernel, linux-kselftest, kunit-dev, linux-doc,
	linux-ext4, linux-sound, Mark Brown

The cs_dsp_ctl_cache suites run cs_dsp_ctl_cache_init(),
cs_dsp_ctl_cache_writethrough() and
cs_dsp_ctl_cache_writethrough_unchanged() against several sets of
parameters by listing each function several times with
KUNIT_CASE_PARAM(), which names the case after the function. The
resulting cases all share a name, so they cannot be told apart in the
results.

Use KUNIT_CASE_PARAM_UNIQUE() for these entries so that each case is
also named for the parameter generator it is run with, for example
cs_dsp_ctl_cache_init-all_pop_varying_len_gen_params.

Signed-off-by: Mark Brown <broonie@kernel.org>
---
 .../cirrus/test/cs_dsp_test_control_cache.c        | 143 +++++++++++----------
 1 file changed, 72 insertions(+), 71 deletions(-)

diff --git a/drivers/firmware/cirrus/test/cs_dsp_test_control_cache.c b/drivers/firmware/cirrus/test/cs_dsp_test_control_cache.c
index b03cd7c37f6e..0a072063dfa7 100644
--- a/drivers/firmware/cirrus/test/cs_dsp_test_control_cache.c
+++ b/drivers/firmware/cirrus/test/cs_dsp_test_control_cache.c
@@ -2987,12 +2987,12 @@ KUNIT_ARRAY_PARAM(all_pop_nonvol_write_only_length,
 		  cs_dsp_ctl_all_param_desc);
 
 static struct kunit_case cs_dsp_ctl_cache_test_cases_v1[] = {
-	KUNIT_CASE_PARAM(cs_dsp_ctl_cache_init, all_pop_varying_len_gen_params),
-	KUNIT_CASE_PARAM(cs_dsp_ctl_cache_init, all_pop_varying_offset_gen_params),
-	KUNIT_CASE_PARAM(cs_dsp_ctl_cache_init, all_pop_varying_xy_gen_params),
-	KUNIT_CASE_PARAM(cs_dsp_ctl_cache_init, all_pop_z_gen_params),
-	KUNIT_CASE_PARAM(cs_dsp_ctl_cache_init, all_pop_varying_alg_gen_params),
-	KUNIT_CASE_PARAM(cs_dsp_ctl_cache_init, all_pop_nonvol_readable_flags_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(cs_dsp_ctl_cache_init, all_pop_varying_len_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(cs_dsp_ctl_cache_init, all_pop_varying_offset_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(cs_dsp_ctl_cache_init, all_pop_varying_xy_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(cs_dsp_ctl_cache_init, all_pop_z_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(cs_dsp_ctl_cache_init, all_pop_varying_alg_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(cs_dsp_ctl_cache_init, all_pop_nonvol_readable_flags_gen_params),
 
 	KUNIT_CASE_PARAM(cs_dsp_ctl_cache_init_write_only,
 			 all_pop_nonvol_write_only_length_gen_params),
@@ -3019,25 +3019,25 @@ static struct kunit_case cs_dsp_ctl_cache_test_cases_v1[] = {
 	KUNIT_CASE_PARAM(cs_dsp_ctl_cache_read_running_zero_flags,
 			 all_pop_varying_len_gen_params),
 
-	KUNIT_CASE_PARAM(cs_dsp_ctl_cache_writethrough, all_pop_varying_len_gen_params),
-	KUNIT_CASE_PARAM(cs_dsp_ctl_cache_writethrough, all_pop_varying_offset_gen_params),
-	KUNIT_CASE_PARAM(cs_dsp_ctl_cache_writethrough, all_pop_varying_xy_gen_params),
-	KUNIT_CASE_PARAM(cs_dsp_ctl_cache_writethrough, all_pop_z_gen_params),
-	KUNIT_CASE_PARAM(cs_dsp_ctl_cache_writethrough, all_pop_varying_alg_gen_params),
-	KUNIT_CASE_PARAM(cs_dsp_ctl_cache_writethrough, all_pop_nonvol_writeable_flags_gen_params),
-
-	KUNIT_CASE_PARAM(cs_dsp_ctl_cache_writethrough_unchanged,
-			 all_pop_varying_len_gen_params),
-	KUNIT_CASE_PARAM(cs_dsp_ctl_cache_writethrough_unchanged,
-			 all_pop_varying_offset_gen_params),
-	KUNIT_CASE_PARAM(cs_dsp_ctl_cache_writethrough_unchanged,
-			 all_pop_varying_xy_gen_params),
-	KUNIT_CASE_PARAM(cs_dsp_ctl_cache_writethrough_unchanged,
-			 all_pop_z_gen_params),
-	KUNIT_CASE_PARAM(cs_dsp_ctl_cache_writethrough_unchanged,
-			 all_pop_varying_alg_gen_params),
-	KUNIT_CASE_PARAM(cs_dsp_ctl_cache_writethrough_unchanged,
-			 all_pop_nonvol_writeable_flags_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(cs_dsp_ctl_cache_writethrough, all_pop_varying_len_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(cs_dsp_ctl_cache_writethrough, all_pop_varying_offset_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(cs_dsp_ctl_cache_writethrough, all_pop_varying_xy_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(cs_dsp_ctl_cache_writethrough, all_pop_z_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(cs_dsp_ctl_cache_writethrough, all_pop_varying_alg_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(cs_dsp_ctl_cache_writethrough,
+				all_pop_nonvol_writeable_flags_gen_params),
+
+	KUNIT_CASE_PARAM_UNIQUE(cs_dsp_ctl_cache_writethrough_unchanged,
+				all_pop_varying_len_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(cs_dsp_ctl_cache_writethrough_unchanged,
+				all_pop_varying_offset_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(cs_dsp_ctl_cache_writethrough_unchanged,
+				all_pop_varying_xy_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(cs_dsp_ctl_cache_writethrough_unchanged, all_pop_z_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(cs_dsp_ctl_cache_writethrough_unchanged,
+				all_pop_varying_alg_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(cs_dsp_ctl_cache_writethrough_unchanged,
+				all_pop_nonvol_writeable_flags_gen_params),
 
 	KUNIT_CASE_PARAM(cs_dsp_ctl_cache_write_unchanged_not_started,
 			 all_pop_nonvol_writeable_flags_gen_params),
@@ -3075,12 +3075,12 @@ static struct kunit_case cs_dsp_ctl_cache_test_cases_v1[] = {
 static struct kunit_case cs_dsp_ctl_cache_test_cases_v2[] = {
 	KUNIT_CASE(cs_dsp_ctl_v2_cache_alloc),
 
-	KUNIT_CASE_PARAM(cs_dsp_ctl_cache_init, all_pop_varying_len_gen_params),
-	KUNIT_CASE_PARAM(cs_dsp_ctl_cache_init, all_pop_varying_offset_gen_params),
-	KUNIT_CASE_PARAM(cs_dsp_ctl_cache_init, all_pop_varying_xy_gen_params),
-	KUNIT_CASE_PARAM(cs_dsp_ctl_cache_init, all_pop_z_gen_params),
-	KUNIT_CASE_PARAM(cs_dsp_ctl_cache_init, all_pop_varying_alg_gen_params),
-	KUNIT_CASE_PARAM(cs_dsp_ctl_cache_init, all_pop_nonvol_readable_flags_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(cs_dsp_ctl_cache_init, all_pop_varying_len_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(cs_dsp_ctl_cache_init, all_pop_varying_offset_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(cs_dsp_ctl_cache_init, all_pop_varying_xy_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(cs_dsp_ctl_cache_init, all_pop_z_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(cs_dsp_ctl_cache_init, all_pop_varying_alg_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(cs_dsp_ctl_cache_init, all_pop_nonvol_readable_flags_gen_params),
 
 	KUNIT_CASE_PARAM(cs_dsp_ctl_cache_init_write_only,
 			 all_pop_nonvol_write_only_length_gen_params),
@@ -3108,25 +3108,25 @@ static struct kunit_case cs_dsp_ctl_cache_test_cases_v2[] = {
 	KUNIT_CASE_PARAM(cs_dsp_ctl_cache_read_running_zero_flags,
 			 all_pop_varying_len_gen_params),
 
-	KUNIT_CASE_PARAM(cs_dsp_ctl_cache_writethrough, all_pop_varying_len_gen_params),
-	KUNIT_CASE_PARAM(cs_dsp_ctl_cache_writethrough, all_pop_varying_offset_gen_params),
-	KUNIT_CASE_PARAM(cs_dsp_ctl_cache_writethrough, all_pop_varying_xy_gen_params),
-	KUNIT_CASE_PARAM(cs_dsp_ctl_cache_writethrough, all_pop_z_gen_params),
-	KUNIT_CASE_PARAM(cs_dsp_ctl_cache_writethrough, all_pop_varying_alg_gen_params),
-	KUNIT_CASE_PARAM(cs_dsp_ctl_cache_writethrough, all_pop_nonvol_writeable_flags_gen_params),
-
-	KUNIT_CASE_PARAM(cs_dsp_ctl_cache_writethrough_unchanged,
-			 all_pop_varying_len_gen_params),
-	KUNIT_CASE_PARAM(cs_dsp_ctl_cache_writethrough_unchanged,
-			 all_pop_varying_offset_gen_params),
-	KUNIT_CASE_PARAM(cs_dsp_ctl_cache_writethrough_unchanged,
-			 all_pop_varying_xy_gen_params),
-	KUNIT_CASE_PARAM(cs_dsp_ctl_cache_writethrough_unchanged,
-			 all_pop_z_gen_params),
-	KUNIT_CASE_PARAM(cs_dsp_ctl_cache_writethrough_unchanged,
-			 all_pop_varying_alg_gen_params),
-	KUNIT_CASE_PARAM(cs_dsp_ctl_cache_writethrough_unchanged,
-			 all_pop_nonvol_writeable_flags_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(cs_dsp_ctl_cache_writethrough, all_pop_varying_len_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(cs_dsp_ctl_cache_writethrough, all_pop_varying_offset_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(cs_dsp_ctl_cache_writethrough, all_pop_varying_xy_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(cs_dsp_ctl_cache_writethrough, all_pop_z_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(cs_dsp_ctl_cache_writethrough, all_pop_varying_alg_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(cs_dsp_ctl_cache_writethrough,
+				all_pop_nonvol_writeable_flags_gen_params),
+
+	KUNIT_CASE_PARAM_UNIQUE(cs_dsp_ctl_cache_writethrough_unchanged,
+				all_pop_varying_len_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(cs_dsp_ctl_cache_writethrough_unchanged,
+				all_pop_varying_offset_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(cs_dsp_ctl_cache_writethrough_unchanged,
+				all_pop_varying_xy_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(cs_dsp_ctl_cache_writethrough_unchanged, all_pop_z_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(cs_dsp_ctl_cache_writethrough_unchanged,
+				all_pop_varying_alg_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(cs_dsp_ctl_cache_writethrough_unchanged,
+				all_pop_nonvol_writeable_flags_gen_params),
 
 	KUNIT_CASE_PARAM(cs_dsp_ctl_cache_write_unchanged_not_started,
 			 all_pop_nonvol_writeable_flags_gen_params),
@@ -3164,11 +3164,11 @@ static struct kunit_case cs_dsp_ctl_cache_test_cases_v2[] = {
 static struct kunit_case cs_dsp_ctl_cache_test_cases_v3[] = {
 	KUNIT_CASE(cs_dsp_ctl_v2_cache_alloc),
 
-	KUNIT_CASE_PARAM(cs_dsp_ctl_cache_init, all_pop_varying_len_gen_params),
-	KUNIT_CASE_PARAM(cs_dsp_ctl_cache_init, all_pop_varying_offset_gen_params),
-	KUNIT_CASE_PARAM(cs_dsp_ctl_cache_init, all_pop_varying_xy_gen_params),
-	KUNIT_CASE_PARAM(cs_dsp_ctl_cache_init, all_pop_varying_alg_gen_params),
-	KUNIT_CASE_PARAM(cs_dsp_ctl_cache_init, all_pop_nonvol_readable_flags_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(cs_dsp_ctl_cache_init, all_pop_varying_len_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(cs_dsp_ctl_cache_init, all_pop_varying_offset_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(cs_dsp_ctl_cache_init, all_pop_varying_xy_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(cs_dsp_ctl_cache_init, all_pop_varying_alg_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(cs_dsp_ctl_cache_init, all_pop_nonvol_readable_flags_gen_params),
 
 	KUNIT_CASE_PARAM(cs_dsp_ctl_cache_init_write_only,
 			 all_pop_nonvol_write_only_length_gen_params),
@@ -3194,22 +3194,23 @@ static struct kunit_case cs_dsp_ctl_cache_test_cases_v3[] = {
 	KUNIT_CASE_PARAM(cs_dsp_ctl_cache_read_running,
 			 all_pop_nonvol_readable_nonzero_flags_gen_params),
 
-	KUNIT_CASE_PARAM(cs_dsp_ctl_cache_writethrough, all_pop_varying_len_gen_params),
-	KUNIT_CASE_PARAM(cs_dsp_ctl_cache_writethrough, all_pop_varying_offset_gen_params),
-	KUNIT_CASE_PARAM(cs_dsp_ctl_cache_writethrough, all_pop_varying_xy_gen_params),
-	KUNIT_CASE_PARAM(cs_dsp_ctl_cache_writethrough, all_pop_varying_alg_gen_params),
-	KUNIT_CASE_PARAM(cs_dsp_ctl_cache_writethrough, all_pop_nonvol_writeable_flags_gen_params),
-
-	KUNIT_CASE_PARAM(cs_dsp_ctl_cache_writethrough_unchanged,
-			 all_pop_varying_len_gen_params),
-	KUNIT_CASE_PARAM(cs_dsp_ctl_cache_writethrough_unchanged,
-			 all_pop_varying_offset_gen_params),
-	KUNIT_CASE_PARAM(cs_dsp_ctl_cache_writethrough_unchanged,
-			 all_pop_varying_xy_gen_params),
-	KUNIT_CASE_PARAM(cs_dsp_ctl_cache_writethrough_unchanged,
-			 all_pop_varying_alg_gen_params),
-	KUNIT_CASE_PARAM(cs_dsp_ctl_cache_writethrough_unchanged,
-			 all_pop_nonvol_writeable_flags_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(cs_dsp_ctl_cache_writethrough, all_pop_varying_len_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(cs_dsp_ctl_cache_writethrough, all_pop_varying_offset_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(cs_dsp_ctl_cache_writethrough, all_pop_varying_xy_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(cs_dsp_ctl_cache_writethrough, all_pop_varying_alg_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(cs_dsp_ctl_cache_writethrough,
+				all_pop_nonvol_writeable_flags_gen_params),
+
+	KUNIT_CASE_PARAM_UNIQUE(cs_dsp_ctl_cache_writethrough_unchanged,
+				all_pop_varying_len_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(cs_dsp_ctl_cache_writethrough_unchanged,
+				all_pop_varying_offset_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(cs_dsp_ctl_cache_writethrough_unchanged,
+				all_pop_varying_xy_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(cs_dsp_ctl_cache_writethrough_unchanged,
+				all_pop_varying_alg_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(cs_dsp_ctl_cache_writethrough_unchanged,
+				all_pop_nonvol_writeable_flags_gen_params),
 
 	KUNIT_CASE_PARAM(cs_dsp_ctl_cache_write_unchanged_not_started,
 			 all_pop_nonvol_writeable_flags_gen_params),

-- 
2.47.3


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH 6/9] firmware: cs_dsp: Give the wmfw block error KUnit cases distinct names
  2026-10-12 23:10 [PATCH 0/9] kunit: Add KUNIT_CASE_PARAM_UNIQUE() and KUNIT_CASE_PARAM_WITH_INIT_UNIQUE() Mark
                   ` (4 preceding siblings ...)
  2026-10-12 23:10 ` [PATCH 5/9] firmware: cs_dsp: Give the control cache " Mark
@ 2026-10-12 23:10 ` Mark
  2026-10-13  9:58   ` Richard Fitzgerald
  2026-10-12 23:10 ` [PATCH 7/9] firmware: cs_dsp: Give the bin file " Mark
                   ` (2 subsequent siblings)
  8 siblings, 1 reply; 17+ messages in thread
From: Mark @ 2026-10-12 23:10 UTC (permalink / raw)
  To: Simon Trimmer, Charles Keepax, Richard Fitzgerald,
	Brendan Higgins, David Gow, Rae Moar, Jonathan Corbet, Shuah Khan,
	Randy Dunlap, Theodore Ts'o, Andreas Dilger, Baokun Li,
	Jan Kara, Ojaswin Mujoo, Ritesh Harjani (IBM), Zhang Yi,
	David Rhodes, Liam Girdwood, Jaroslav Kysela, Takashi Iwai
  Cc: patches, linux-kernel, linux-kselftest, kunit-dev, linux-doc,
	linux-ext4, linux-sound, Mark Brown

The wmfw error suites run wmfw_too_short_for_block_header(),
wmfw_too_short_for_block_payload() and wmfw_block_payload_len_garbage()
both with valid and with invalid block types by listing each twice with
KUNIT_CASE_PARAM(), which names the case after the function. The two
cases for each function share a name, so they cannot be told apart in
the results.

Use KUNIT_CASE_PARAM_UNIQUE() for these entries so that each case is
also named for the parameter generator it is run with, for example
wmfw_too_short_for_block_header-wmfw_invalid_block_types_gen_params.

Signed-off-by: Mark Brown <broonie@kernel.org>
---
 .../firmware/cirrus/test/cs_dsp_test_wmfw_error.c  | 72 ++++++++++++++--------
 1 file changed, 48 insertions(+), 24 deletions(-)

diff --git a/drivers/firmware/cirrus/test/cs_dsp_test_wmfw_error.c b/drivers/firmware/cirrus/test/cs_dsp_test_wmfw_error.c
index b07978d90fa9..44f9c8d71326 100644
--- a/drivers/firmware/cirrus/test/cs_dsp_test_wmfw_error.c
+++ b/drivers/firmware/cirrus/test/cs_dsp_test_wmfw_error.c
@@ -1219,12 +1219,18 @@ static struct kunit_case cs_dsp_wmfw_err_test_cases_v0[] = {
 	KUNIT_CASE(wmfw_err_bad_header_length),
 	KUNIT_CASE(wmfw_err_bad_core_type),
 
-	KUNIT_CASE_PARAM(wmfw_too_short_for_block_header, wmfw_valid_block_types_adsp2_gen_params),
-	KUNIT_CASE_PARAM(wmfw_too_short_for_block_header, wmfw_invalid_block_types_gen_params),
-	KUNIT_CASE_PARAM(wmfw_too_short_for_block_payload, wmfw_valid_block_types_adsp2_gen_params),
-	KUNIT_CASE_PARAM(wmfw_too_short_for_block_payload, wmfw_invalid_block_types_gen_params),
-	KUNIT_CASE_PARAM(wmfw_block_payload_len_garbage, wmfw_valid_block_types_adsp2_gen_params),
-	KUNIT_CASE_PARAM(wmfw_block_payload_len_garbage, wmfw_invalid_block_types_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(wmfw_too_short_for_block_header,
+				wmfw_valid_block_types_adsp2_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(wmfw_too_short_for_block_header,
+				wmfw_invalid_block_types_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(wmfw_too_short_for_block_payload,
+				wmfw_valid_block_types_adsp2_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(wmfw_too_short_for_block_payload,
+				wmfw_invalid_block_types_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(wmfw_block_payload_len_garbage,
+				wmfw_valid_block_types_adsp2_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(wmfw_block_payload_len_garbage,
+				wmfw_invalid_block_types_gen_params),
 
 	{ } /* terminator */
 };
@@ -1236,12 +1242,18 @@ static struct kunit_case cs_dsp_wmfw_err_test_cases_v1[] = {
 	KUNIT_CASE(wmfw_err_bad_header_length),
 	KUNIT_CASE(wmfw_err_bad_core_type),
 
-	KUNIT_CASE_PARAM(wmfw_too_short_for_block_header, wmfw_valid_block_types_adsp2_gen_params),
-	KUNIT_CASE_PARAM(wmfw_too_short_for_block_header, wmfw_invalid_block_types_gen_params),
-	KUNIT_CASE_PARAM(wmfw_too_short_for_block_payload, wmfw_valid_block_types_adsp2_gen_params),
-	KUNIT_CASE_PARAM(wmfw_too_short_for_block_payload, wmfw_invalid_block_types_gen_params),
-	KUNIT_CASE_PARAM(wmfw_block_payload_len_garbage, wmfw_valid_block_types_adsp2_gen_params),
-	KUNIT_CASE_PARAM(wmfw_block_payload_len_garbage, wmfw_invalid_block_types_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(wmfw_too_short_for_block_header,
+				wmfw_valid_block_types_adsp2_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(wmfw_too_short_for_block_header,
+				wmfw_invalid_block_types_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(wmfw_too_short_for_block_payload,
+				wmfw_valid_block_types_adsp2_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(wmfw_too_short_for_block_payload,
+				wmfw_invalid_block_types_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(wmfw_block_payload_len_garbage,
+				wmfw_valid_block_types_adsp2_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(wmfw_block_payload_len_garbage,
+				wmfw_invalid_block_types_gen_params),
 
 	KUNIT_CASE(wmfw_too_short_for_alg_header),
 	KUNIT_CASE(wmfw_v1_alg_name_unterminated),
@@ -1258,12 +1270,18 @@ static struct kunit_case cs_dsp_wmfw_err_test_cases_v2[] = {
 	KUNIT_CASE(wmfw_err_bad_header_length),
 	KUNIT_CASE(wmfw_err_bad_core_type),
 
-	KUNIT_CASE_PARAM(wmfw_too_short_for_block_header, wmfw_valid_block_types_adsp2_gen_params),
-	KUNIT_CASE_PARAM(wmfw_too_short_for_block_header, wmfw_invalid_block_types_gen_params),
-	KUNIT_CASE_PARAM(wmfw_too_short_for_block_payload, wmfw_valid_block_types_adsp2_gen_params),
-	KUNIT_CASE_PARAM(wmfw_too_short_for_block_payload, wmfw_invalid_block_types_gen_params),
-	KUNIT_CASE_PARAM(wmfw_block_payload_len_garbage, wmfw_valid_block_types_adsp2_gen_params),
-	KUNIT_CASE_PARAM(wmfw_block_payload_len_garbage, wmfw_invalid_block_types_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(wmfw_too_short_for_block_header,
+				wmfw_valid_block_types_adsp2_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(wmfw_too_short_for_block_header,
+				wmfw_invalid_block_types_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(wmfw_too_short_for_block_payload,
+				wmfw_valid_block_types_adsp2_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(wmfw_too_short_for_block_payload,
+				wmfw_invalid_block_types_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(wmfw_block_payload_len_garbage,
+				wmfw_valid_block_types_adsp2_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(wmfw_block_payload_len_garbage,
+				wmfw_invalid_block_types_gen_params),
 
 	KUNIT_CASE(wmfw_too_short_for_alg_header),
 	KUNIT_CASE(wmfw_v2_alg_name_exceeds_block),
@@ -1284,12 +1302,18 @@ static struct kunit_case cs_dsp_wmfw_err_test_cases_v3[] = {
 	KUNIT_CASE(wmfw_err_bad_header_length),
 	KUNIT_CASE(wmfw_err_bad_core_type),
 
-	KUNIT_CASE_PARAM(wmfw_too_short_for_block_header, wmfw_valid_block_types_halo_gen_params),
-	KUNIT_CASE_PARAM(wmfw_too_short_for_block_header, wmfw_invalid_block_types_gen_params),
-	KUNIT_CASE_PARAM(wmfw_too_short_for_block_payload, wmfw_valid_block_types_halo_gen_params),
-	KUNIT_CASE_PARAM(wmfw_too_short_for_block_payload, wmfw_invalid_block_types_gen_params),
-	KUNIT_CASE_PARAM(wmfw_block_payload_len_garbage, wmfw_valid_block_types_halo_gen_params),
-	KUNIT_CASE_PARAM(wmfw_block_payload_len_garbage, wmfw_invalid_block_types_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(wmfw_too_short_for_block_header,
+				wmfw_valid_block_types_halo_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(wmfw_too_short_for_block_header,
+				wmfw_invalid_block_types_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(wmfw_too_short_for_block_payload,
+				wmfw_valid_block_types_halo_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(wmfw_too_short_for_block_payload,
+				wmfw_invalid_block_types_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(wmfw_block_payload_len_garbage,
+				wmfw_valid_block_types_halo_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(wmfw_block_payload_len_garbage,
+				wmfw_invalid_block_types_gen_params),
 
 	KUNIT_CASE(wmfw_too_short_for_alg_header),
 	KUNIT_CASE(wmfw_v2_alg_name_exceeds_block),

-- 
2.47.3


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH 7/9] firmware: cs_dsp: Give the bin file KUnit cases distinct names
  2026-10-12 23:10 [PATCH 0/9] kunit: Add KUNIT_CASE_PARAM_UNIQUE() and KUNIT_CASE_PARAM_WITH_INIT_UNIQUE() Mark
                   ` (5 preceding siblings ...)
  2026-10-12 23:10 ` [PATCH 6/9] firmware: cs_dsp: Give the wmfw block error " Mark
@ 2026-10-12 23:10 ` Mark
  2026-10-13 10:10   ` Richard Fitzgerald
  2026-10-12 23:10 ` [PATCH 8/9] ASoC: cs35l56: Give the speaker ID pad config " Mark Brown
  2026-10-12 23:10 ` [PATCH 9/9] ASoC: wm_adsp: Give the firmware search order " Mark
  8 siblings, 1 reply; 17+ messages in thread
From: Mark @ 2026-10-12 23:10 UTC (permalink / raw)
  To: Simon Trimmer, Charles Keepax, Richard Fitzgerald,
	Brendan Higgins, David Gow, Rae Moar, Jonathan Corbet, Shuah Khan,
	Randy Dunlap, Theodore Ts'o, Andreas Dilger, Baokun Li,
	Jan Kara, Ojaswin Mujoo, Ritesh Harjani (IBM), Zhang Yi,
	David Rhodes, Liam Girdwood, Jaroslav Kysela, Takashi Iwai
  Cc: patches, linux-kernel, linux-kselftest, kunit-dev, linux-doc,
	linux-ext4, linux-sound, Mark Brown

The cs_dsp_bin suites run many of their test functions against more
than one set of parameters, listing the function once per set with
KUNIT_CASE_PARAM(), which names the case after the function:

 - the ADSP2 suites run the XM/YM tests again for ZM,
 - the WMDR v3 suite runs the whole set again with long offset blocks,
 - the multiple memory tests are run varying the offset and the
   algorithm.

The resulting cases share a name, so they cannot be told apart in the
results.

Use KUNIT_CASE_PARAM_UNIQUE() for these entries so that each case is
also named for the parameter generator it is run with, for example
bin_patch_one_word-x_or_y_and_offset_gen_params and
bin_patch_one_word-z_and_offset_gen_params.

Signed-off-by: Mark Brown <broonie@kernel.org>
---
 drivers/firmware/cirrus/test/cs_dsp_test_bin.c | 222 ++++++++++++-------------
 1 file changed, 111 insertions(+), 111 deletions(-)

diff --git a/drivers/firmware/cirrus/test/cs_dsp_test_bin.c b/drivers/firmware/cirrus/test/cs_dsp_test_bin.c
index 63416838f865..40a827120d6c 100644
--- a/drivers/firmware/cirrus/test/cs_dsp_test_bin.c
+++ b/drivers/firmware/cirrus/test/cs_dsp_test_bin.c
@@ -2654,8 +2654,8 @@ static struct kunit_case cs_dsp_bin_test_cases_halo[] = {
 	KUNIT_CASE_PARAM(bin_patch_one_multiword, x_or_y_and_offset_gen_params),
 	KUNIT_CASE_PARAM(bin_patch_multi_oneword, x_or_y_and_offset_gen_params),
 	KUNIT_CASE_PARAM(bin_patch_multi_oneword_unordered, x_or_y_and_offset_gen_params),
-	KUNIT_CASE_PARAM(bin_patch_one_word_multiple_mems, offset_gen_params),
-	KUNIT_CASE_PARAM(bin_patch_one_word_multiple_mems, alg_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(bin_patch_one_word_multiple_mems, offset_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(bin_patch_one_word_multiple_mems, alg_gen_params),
 	KUNIT_CASE_PARAM(bin_patch_multi_oneword_sparse_unordered, x_or_y_and_alg_gen_params),
 	KUNIT_CASE_PARAM(bin_patch_one_word_multiple_algs, x_or_y_and_offset_gen_params),
 	KUNIT_CASE_PARAM(bin_patch_one_word_multiple_algs_unordered, x_or_y_and_offset_gen_params),
@@ -2687,8 +2687,8 @@ static struct kunit_case cs_dsp_bin_test_cases_halo[] = {
 			 packed_x_or_y_and_offset_gen_params),
 	KUNIT_CASE_PARAM(bin_patch_multi_onepacked_unordered,
 			 packed_x_or_y_and_offset_gen_params),
-	KUNIT_CASE_PARAM(bin_patch_1_packed_multiple_mems, offset_gen_params),
-	KUNIT_CASE_PARAM(bin_patch_1_packed_multiple_mems, alg_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(bin_patch_1_packed_multiple_mems, offset_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(bin_patch_1_packed_multiple_mems, alg_gen_params),
 	KUNIT_CASE_PARAM(bin_patch_multi_onepacked_sparse_unordered,
 			 packed_x_or_y_and_alg_gen_params),
 	KUNIT_CASE_PARAM(bin_patch_1_packed_multiple_algs,
@@ -2705,103 +2705,100 @@ static struct kunit_case cs_dsp_bin_test_cases_halo[] = {
 
 static struct kunit_case cs_dsp_bin_test_cases_halo_wmdr3[] = {
 	/* Unpacked memory */
-	KUNIT_CASE_PARAM(bin_patch_one_word, x_or_y_and_offset_gen_params),
-	KUNIT_CASE_PARAM(bin_patch_one_multiword, x_or_y_and_offset_gen_params),
-	KUNIT_CASE_PARAM(bin_patch_multi_oneword, x_or_y_and_offset_gen_params),
-	KUNIT_CASE_PARAM(bin_patch_multi_oneword_unordered, x_or_y_and_offset_gen_params),
-	KUNIT_CASE_PARAM(bin_patch_one_word_multiple_mems, offset_gen_params),
-	KUNIT_CASE_PARAM(bin_patch_one_word_multiple_mems, alg_gen_params),
-	KUNIT_CASE_PARAM(bin_patch_multi_oneword_sparse_unordered, x_or_y_and_alg_gen_params),
-	KUNIT_CASE_PARAM(bin_patch_one_word_multiple_algs, x_or_y_and_offset_gen_params),
-	KUNIT_CASE_PARAM(bin_patch_one_word_multiple_algs_unordered, x_or_y_and_offset_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(bin_patch_one_word, x_or_y_and_offset_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(bin_patch_one_multiword, x_or_y_and_offset_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(bin_patch_multi_oneword, x_or_y_and_offset_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(bin_patch_multi_oneword_unordered, x_or_y_and_offset_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(bin_patch_one_word_multiple_mems, offset_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(bin_patch_one_word_multiple_mems, alg_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(bin_patch_multi_oneword_sparse_unordered,
+				x_or_y_and_alg_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(bin_patch_one_word_multiple_algs, x_or_y_and_offset_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(bin_patch_one_word_multiple_algs_unordered,
+				x_or_y_and_offset_gen_params),
 
 	/* Packed memory tests */
-	KUNIT_CASE_PARAM(bin_patch_1_packed,
-			 packed_x_or_y_and_offset_gen_params),
-	KUNIT_CASE_PARAM(bin_patch_1_packed_1_single_trailing,
-			 packed_x_or_y_and_offset_gen_params),
-	KUNIT_CASE_PARAM(bin_patch_1_packed_2_single_trailing,
-			 packed_x_or_y_and_offset_gen_params),
-	KUNIT_CASE_PARAM(bin_patch_1_packed_3_single_trailing,
-			 packed_x_or_y_and_offset_gen_params),
-	KUNIT_CASE_PARAM(bin_patch_1_packed_2_trailing,
-			 packed_x_or_y_and_offset_gen_params),
-	KUNIT_CASE_PARAM(bin_patch_1_packed_3_trailing,
-			 packed_x_or_y_and_offset_gen_params),
-	KUNIT_CASE_PARAM(bin_patch_1_single_leading_1_packed,
-			 packed_x_or_y_and_offset_gen_params),
-	KUNIT_CASE_PARAM(bin_patch_2_single_leading_1_packed,
-			 packed_x_or_y_and_offset_gen_params),
-	KUNIT_CASE_PARAM(bin_patch_2_leading_1_packed,
-			 packed_x_or_y_and_offset_gen_params),
-	KUNIT_CASE_PARAM(bin_patch_3_single_leading_1_packed,
-			 packed_x_or_y_and_offset_gen_params),
-	KUNIT_CASE_PARAM(bin_patch_3_leading_1_packed,
-			 packed_x_or_y_and_offset_gen_params),
-	KUNIT_CASE_PARAM(bin_patch_multi_onepacked,
-			 packed_x_or_y_and_offset_gen_params),
-	KUNIT_CASE_PARAM(bin_patch_multi_onepacked_unordered,
-			 packed_x_or_y_and_offset_gen_params),
-	KUNIT_CASE_PARAM(bin_patch_1_packed_multiple_mems, offset_gen_params),
-	KUNIT_CASE_PARAM(bin_patch_1_packed_multiple_mems, alg_gen_params),
-	KUNIT_CASE_PARAM(bin_patch_multi_onepacked_sparse_unordered,
-			 packed_x_or_y_and_alg_gen_params),
-	KUNIT_CASE_PARAM(bin_patch_1_packed_multiple_algs,
-			 packed_x_or_y_and_offset_gen_params),
-	KUNIT_CASE_PARAM(bin_patch_1_packed_multiple_algs_unordered,
-			 packed_x_or_y_and_offset_gen_params),
-	KUNIT_CASE_PARAM(bin_patch_mixed_packed_unpacked_random,
-			 packed_x_or_y_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(bin_patch_1_packed, packed_x_or_y_and_offset_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(bin_patch_1_packed_1_single_trailing,
+				packed_x_or_y_and_offset_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(bin_patch_1_packed_2_single_trailing,
+				packed_x_or_y_and_offset_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(bin_patch_1_packed_3_single_trailing,
+				packed_x_or_y_and_offset_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(bin_patch_1_packed_2_trailing, packed_x_or_y_and_offset_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(bin_patch_1_packed_3_trailing, packed_x_or_y_and_offset_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(bin_patch_1_single_leading_1_packed,
+				packed_x_or_y_and_offset_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(bin_patch_2_single_leading_1_packed,
+				packed_x_or_y_and_offset_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(bin_patch_2_leading_1_packed, packed_x_or_y_and_offset_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(bin_patch_3_single_leading_1_packed,
+				packed_x_or_y_and_offset_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(bin_patch_3_leading_1_packed, packed_x_or_y_and_offset_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(bin_patch_multi_onepacked, packed_x_or_y_and_offset_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(bin_patch_multi_onepacked_unordered,
+				packed_x_or_y_and_offset_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(bin_patch_1_packed_multiple_mems, offset_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(bin_patch_1_packed_multiple_mems, alg_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(bin_patch_multi_onepacked_sparse_unordered,
+				packed_x_or_y_and_alg_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(bin_patch_1_packed_multiple_algs,
+				packed_x_or_y_and_offset_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(bin_patch_1_packed_multiple_algs_unordered,
+				packed_x_or_y_and_offset_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(bin_patch_mixed_packed_unpacked_random, packed_x_or_y_gen_params),
 
 	/* Unpacked memory with long-offset blocks */
-	KUNIT_CASE_PARAM(bin_patch_one_word, x_or_y_and_long_offset_gen_params),
-	KUNIT_CASE_PARAM(bin_patch_one_multiword, x_or_y_and_long_offset_gen_params),
-	KUNIT_CASE_PARAM(bin_patch_multi_oneword, x_or_y_and_long_offset_gen_params),
-	KUNIT_CASE_PARAM(bin_patch_multi_oneword_unordered, x_or_y_and_long_offset_gen_params),
-	KUNIT_CASE_PARAM(bin_patch_one_word_multiple_mems, long_offset_gen_params),
-	KUNIT_CASE_PARAM(bin_patch_one_word_multiple_mems, alg_long_gen_params),
-	KUNIT_CASE_PARAM(bin_patch_multi_oneword_sparse_unordered, x_or_y_and_alg_long_gen_params),
-	KUNIT_CASE_PARAM(bin_patch_one_word_multiple_algs, x_or_y_and_long_offset_gen_params),
-	KUNIT_CASE_PARAM(bin_patch_one_word_multiple_algs_unordered,
-			   x_or_y_and_long_offset_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(bin_patch_one_word, x_or_y_and_long_offset_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(bin_patch_one_multiword, x_or_y_and_long_offset_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(bin_patch_multi_oneword, x_or_y_and_long_offset_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(bin_patch_multi_oneword_unordered,
+				x_or_y_and_long_offset_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(bin_patch_one_word_multiple_mems, long_offset_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(bin_patch_one_word_multiple_mems, alg_long_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(bin_patch_multi_oneword_sparse_unordered,
+				x_or_y_and_alg_long_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(bin_patch_one_word_multiple_algs,
+				x_or_y_and_long_offset_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(bin_patch_one_word_multiple_algs_unordered,
+				x_or_y_and_long_offset_gen_params),
 
 	/* Packed memory tests with long offset blocks */
-	KUNIT_CASE_PARAM(bin_patch_1_packed,
-			 packed_x_or_y_and_long_offset_gen_params),
-	KUNIT_CASE_PARAM(bin_patch_1_packed_1_single_trailing,
-			 packed_x_or_y_and_long_offset_gen_params),
-	KUNIT_CASE_PARAM(bin_patch_1_packed_2_single_trailing,
-			 packed_x_or_y_and_long_offset_gen_params),
-	KUNIT_CASE_PARAM(bin_patch_1_packed_3_single_trailing,
-			 packed_x_or_y_and_long_offset_gen_params),
-	KUNIT_CASE_PARAM(bin_patch_1_packed_2_trailing,
-			 packed_x_or_y_and_long_offset_gen_params),
-	KUNIT_CASE_PARAM(bin_patch_1_packed_3_trailing,
-			 packed_x_or_y_and_long_offset_gen_params),
-	KUNIT_CASE_PARAM(bin_patch_1_single_leading_1_packed,
-			 packed_x_or_y_and_long_offset_gen_params),
-	KUNIT_CASE_PARAM(bin_patch_2_single_leading_1_packed,
-			 packed_x_or_y_and_long_offset_gen_params),
-	KUNIT_CASE_PARAM(bin_patch_2_leading_1_packed,
-			 packed_x_or_y_and_long_offset_gen_params),
-	KUNIT_CASE_PARAM(bin_patch_3_single_leading_1_packed,
-			 packed_x_or_y_and_long_offset_gen_params),
-	KUNIT_CASE_PARAM(bin_patch_3_leading_1_packed,
-			 packed_x_or_y_and_long_offset_gen_params),
-	KUNIT_CASE_PARAM(bin_patch_multi_onepacked,
-			 packed_x_or_y_and_long_offset_gen_params),
-	KUNIT_CASE_PARAM(bin_patch_multi_onepacked_unordered,
-			 packed_x_or_y_and_long_offset_gen_params),
-	KUNIT_CASE_PARAM(bin_patch_1_packed_multiple_mems, long_offset_gen_params),
-	KUNIT_CASE_PARAM(bin_patch_1_packed_multiple_mems, alg_long_gen_params),
-	KUNIT_CASE_PARAM(bin_patch_multi_onepacked_sparse_unordered,
-			 packed_x_or_y_and_alg_long_gen_params),
-	KUNIT_CASE_PARAM(bin_patch_1_packed_multiple_algs,
-			 packed_x_or_y_and_long_offset_gen_params),
-	KUNIT_CASE_PARAM(bin_patch_1_packed_multiple_algs_unordered,
-			 packed_x_or_y_and_long_offset_gen_params),
-	KUNIT_CASE_PARAM(bin_patch_mixed_packed_unpacked_random,
-			 packed_x_or_y_long_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(bin_patch_1_packed, packed_x_or_y_and_long_offset_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(bin_patch_1_packed_1_single_trailing,
+				packed_x_or_y_and_long_offset_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(bin_patch_1_packed_2_single_trailing,
+				packed_x_or_y_and_long_offset_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(bin_patch_1_packed_3_single_trailing,
+				packed_x_or_y_and_long_offset_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(bin_patch_1_packed_2_trailing,
+				packed_x_or_y_and_long_offset_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(bin_patch_1_packed_3_trailing,
+				packed_x_or_y_and_long_offset_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(bin_patch_1_single_leading_1_packed,
+				packed_x_or_y_and_long_offset_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(bin_patch_2_single_leading_1_packed,
+				packed_x_or_y_and_long_offset_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(bin_patch_2_leading_1_packed,
+				packed_x_or_y_and_long_offset_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(bin_patch_3_single_leading_1_packed,
+				packed_x_or_y_and_long_offset_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(bin_patch_3_leading_1_packed,
+				packed_x_or_y_and_long_offset_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(bin_patch_multi_onepacked,
+				packed_x_or_y_and_long_offset_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(bin_patch_multi_onepacked_unordered,
+				packed_x_or_y_and_long_offset_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(bin_patch_1_packed_multiple_mems, long_offset_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(bin_patch_1_packed_multiple_mems, alg_long_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(bin_patch_multi_onepacked_sparse_unordered,
+				packed_x_or_y_and_alg_long_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(bin_patch_1_packed_multiple_algs,
+				packed_x_or_y_and_long_offset_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(bin_patch_1_packed_multiple_algs_unordered,
+				packed_x_or_y_and_long_offset_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(bin_patch_mixed_packed_unpacked_random,
+				packed_x_or_y_long_gen_params),
 
 	KUNIT_CASE(bin_patch_name_and_info),
 
@@ -2810,26 +2807,29 @@ static struct kunit_case cs_dsp_bin_test_cases_halo_wmdr3[] = {
 
 static struct kunit_case cs_dsp_bin_test_cases_adsp2[] = {
 	/* XM and YM */
-	KUNIT_CASE_PARAM(bin_patch_one_word, x_or_y_and_offset_gen_params),
-	KUNIT_CASE_PARAM(bin_patch_one_multiword, x_or_y_and_offset_gen_params),
-	KUNIT_CASE_PARAM(bin_patch_multi_oneword, x_or_y_and_offset_gen_params),
-	KUNIT_CASE_PARAM(bin_patch_multi_oneword_unordered, x_or_y_and_offset_gen_params),
-	KUNIT_CASE_PARAM(bin_patch_multi_oneword_sparse_unordered, x_or_y_and_alg_gen_params),
-	KUNIT_CASE_PARAM(bin_patch_one_word_multiple_algs, x_or_y_and_offset_gen_params),
-	KUNIT_CASE_PARAM(bin_patch_one_word_multiple_algs_unordered, x_or_y_and_offset_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(bin_patch_one_word, x_or_y_and_offset_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(bin_patch_one_multiword, x_or_y_and_offset_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(bin_patch_multi_oneword, x_or_y_and_offset_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(bin_patch_multi_oneword_unordered, x_or_y_and_offset_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(bin_patch_multi_oneword_sparse_unordered,
+				x_or_y_and_alg_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(bin_patch_one_word_multiple_algs, x_or_y_and_offset_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(bin_patch_one_word_multiple_algs_unordered,
+				x_or_y_and_offset_gen_params),
 
 	/* ZM */
-	KUNIT_CASE_PARAM(bin_patch_one_word, z_and_offset_gen_params),
-	KUNIT_CASE_PARAM(bin_patch_one_multiword, z_and_offset_gen_params),
-	KUNIT_CASE_PARAM(bin_patch_multi_oneword, z_and_offset_gen_params),
-	KUNIT_CASE_PARAM(bin_patch_multi_oneword_unordered, z_and_offset_gen_params),
-	KUNIT_CASE_PARAM(bin_patch_multi_oneword_sparse_unordered, z_and_alg_gen_params),
-	KUNIT_CASE_PARAM(bin_patch_one_word_multiple_algs, z_and_offset_gen_params),
-	KUNIT_CASE_PARAM(bin_patch_one_word_multiple_algs_unordered, z_and_offset_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(bin_patch_one_word, z_and_offset_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(bin_patch_one_multiword, z_and_offset_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(bin_patch_multi_oneword, z_and_offset_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(bin_patch_multi_oneword_unordered, z_and_offset_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(bin_patch_multi_oneword_sparse_unordered, z_and_alg_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(bin_patch_one_word_multiple_algs, z_and_offset_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(bin_patch_one_word_multiple_algs_unordered,
+				z_and_offset_gen_params),
 
 	/* Other */
-	KUNIT_CASE_PARAM(bin_patch_one_word_multiple_mems, offset_gen_params),
-	KUNIT_CASE_PARAM(bin_patch_one_word_multiple_mems, alg_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(bin_patch_one_word_multiple_mems, offset_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(bin_patch_one_word_multiple_mems, alg_gen_params),
 
 	KUNIT_CASE(bin_patch_name_and_info),
 

-- 
2.47.3


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH 8/9] ASoC: cs35l56: Give the speaker ID pad config KUnit cases distinct names
  2026-10-12 23:10 [PATCH 0/9] kunit: Add KUNIT_CASE_PARAM_UNIQUE() and KUNIT_CASE_PARAM_WITH_INIT_UNIQUE() Mark
                   ` (6 preceding siblings ...)
  2026-10-12 23:10 ` [PATCH 7/9] firmware: cs_dsp: Give the bin file " Mark
@ 2026-10-12 23:10 ` Mark Brown
  2026-10-13  9:51   ` Richard Fitzgerald
  2026-10-12 23:10 ` [PATCH 9/9] ASoC: wm_adsp: Give the firmware search order " Mark
  8 siblings, 1 reply; 17+ messages in thread
From: Mark Brown @ 2026-10-12 23:10 UTC (permalink / raw)
  To: Simon Trimmer, Charles Keepax, Richard Fitzgerald,
	Brendan Higgins, David Gow, Rae Moar, Jonathan Corbet, Shuah Khan,
	Randy Dunlap, Theodore Ts'o, Andreas Dilger, Baokun Li,
	Jan Kara, Ojaswin Mujoo, Ritesh Harjani (IBM), Zhang Yi,
	David Rhodes, Liam Girdwood, Jaroslav Kysela, Takashi Iwai
  Cc: patches, linux-kernel, linux-kselftest, kunit-dev, linux-doc,
	linux-ext4, linux-sound, Mark Brown

The cs35l56 shared test suites run
cs35l56_shared_test_onchip_speaker_id_pad_config() both with and
without pulls configured on the speaker ID pins by listing it twice
with KUNIT_CASE_PARAM(), which names the case after the function. Both
cases share a name, so they cannot be told apart in the results.

Use KUNIT_CASE_PARAM_UNIQUE() for these entries so that each case is
also named for the parameter generator it is run with, giving
cs35l56_shared_test_onchip_speaker_id_pad_config-cs35l56_shared_test_onchip_spkid_gen_params
and
cs35l56_shared_test_onchip_speaker_id_pad_config-cs35l56_shared_test_onchip_spkid_pull_gen_params.

Signed-off-by: Mark Brown <broonie@kernel.org>
---
 sound/soc/codecs/cs35l56-shared-test.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/sound/soc/codecs/cs35l56-shared-test.c b/sound/soc/codecs/cs35l56-shared-test.c
index 4f52c8a192e5..c2aa524efbf6 100644
--- a/sound/soc/codecs/cs35l56-shared-test.c
+++ b/sound/soc/codecs/cs35l56-shared-test.c
@@ -847,10 +847,10 @@ static struct kunit_case cs35l56_shared_test_cases[] = {
 			 cs35l56_shared_test_gpios_selftest_gen_params),
 	KUNIT_CASE_PARAM(cs35l56_shared_test_get_onchip_speaker_id,
 			 cs35l56_shared_test_onchip_spkid_gen_params),
-	KUNIT_CASE_PARAM(cs35l56_shared_test_onchip_speaker_id_pad_config,
-			 cs35l56_shared_test_onchip_spkid_gen_params),
-	KUNIT_CASE_PARAM(cs35l56_shared_test_onchip_speaker_id_pad_config,
-			 cs35l56_shared_test_onchip_spkid_pull_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(cs35l56_shared_test_onchip_speaker_id_pad_config,
+				cs35l56_shared_test_onchip_spkid_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(cs35l56_shared_test_onchip_speaker_id_pad_config,
+				cs35l56_shared_test_onchip_spkid_pull_gen_params),
 	KUNIT_CASE_PARAM(cs35l56_shared_test_stash_onchip_spkid_pins,
 			 cs35l56_shared_test_onchip_spkid_pull_gen_params),
 	KUNIT_CASE(cs35l56_shared_test_stash_onchip_spkid_pins_reject_invalid),

-- 
2.47.3


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH 9/9] ASoC: wm_adsp: Give the firmware search order KUnit cases distinct names
  2026-10-12 23:10 [PATCH 0/9] kunit: Add KUNIT_CASE_PARAM_UNIQUE() and KUNIT_CASE_PARAM_WITH_INIT_UNIQUE() Mark
                   ` (7 preceding siblings ...)
  2026-10-12 23:10 ` [PATCH 8/9] ASoC: cs35l56: Give the speaker ID pad config " Mark Brown
@ 2026-10-12 23:10 ` Mark
  2026-10-13  9:19   ` Richard Fitzgerald
  8 siblings, 1 reply; 17+ messages in thread
From: Mark @ 2026-10-12 23:10 UTC (permalink / raw)
  To: Simon Trimmer, Charles Keepax, Richard Fitzgerald,
	Brendan Higgins, David Gow, Rae Moar, Jonathan Corbet, Shuah Khan,
	Randy Dunlap, Theodore Ts'o, Andreas Dilger, Baokun Li,
	Jan Kara, Ojaswin Mujoo, Ritesh Harjani (IBM), Zhang Yi,
	David Rhodes, Liam Girdwood, Jaroslav Kysela, Takashi Iwai
  Cc: patches, linux-kernel, linux-kselftest, kunit-dev, linux-doc,
	linux-ext4, linux-sound, Mark Brown

The wm-adsp-fw-find suite runs wm_adsp_fw_find_test_search_order()
against six different sets of parameters by listing it six times with
KUNIT_CASE_PARAM(), which names each case after the function. All six
cases are therefore called wm_adsp_fw_find_test_search_order, which
makes the results ambiguous.

Use KUNIT_CASE_PARAM_UNIQUE() for these entries so that each case is
also named for the parameter generator it is run with, for example
wm_adsp_fw_find_test_search_order-wm_adsp_fw_find_full_search_gen_params.

Signed-off-by: Mark Brown <broonie@kernel.org>
---
 sound/soc/codecs/wm_adsp_fw_find_test.c | 24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/sound/soc/codecs/wm_adsp_fw_find_test.c b/sound/soc/codecs/wm_adsp_fw_find_test.c
index ae686dc4fa94..0b2b7db3f9f9 100644
--- a/sound/soc/codecs/wm_adsp_fw_find_test.c
+++ b/sound/soc/codecs/wm_adsp_fw_find_test.c
@@ -1219,23 +1219,23 @@ KUNIT_ARRAY_PARAM(wm_adsp_fw_find_pick,
 		  wm_adsp_fw_find_test_param_desc);
 
 static struct kunit_case wm_adsp_fw_find_test_cases[] = {
-	KUNIT_CASE_PARAM(wm_adsp_fw_find_test_search_order,
-			 wm_adsp_fw_find_full_search_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(wm_adsp_fw_find_test_search_order,
+				wm_adsp_fw_find_full_search_gen_params),
 
-	KUNIT_CASE_PARAM(wm_adsp_fw_find_test_search_order,
-			 wm_adsp_fw_find_system_alsaname_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(wm_adsp_fw_find_test_search_order,
+				wm_adsp_fw_find_system_alsaname_gen_params),
 
-	KUNIT_CASE_PARAM(wm_adsp_fw_find_test_search_order,
-			 wm_adsp_fw_find_system_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(wm_adsp_fw_find_test_search_order,
+				wm_adsp_fw_find_system_gen_params),
 
-	KUNIT_CASE_PARAM(wm_adsp_fw_find_test_search_order,
-			 wm_adsp_fw_find_alsaname_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(wm_adsp_fw_find_test_search_order,
+				wm_adsp_fw_find_alsaname_gen_params),
 
-	KUNIT_CASE_PARAM(wm_adsp_fw_find_test_search_order,
-			 wm_adsp_fw_find_noqual_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(wm_adsp_fw_find_test_search_order,
+				wm_adsp_fw_find_noqual_gen_params),
 
-	KUNIT_CASE_PARAM(wm_adsp_fw_find_test_search_order,
-			 wm_adsp_fw_find_normalization_gen_params),
+	KUNIT_CASE_PARAM_UNIQUE(wm_adsp_fw_find_test_search_order,
+				wm_adsp_fw_find_normalization_gen_params),
 
 	KUNIT_CASE_PARAM(wm_adsp_fw_find_test_pick_file,
 			 wm_adsp_fw_find_pick_gen_params),

-- 
2.47.3


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* Re: [PATCH 1/9] firmware: cs_dsp: Run the wmfw payload error tests with invalid block types
  2026-10-12 23:10 ` [PATCH 1/9] firmware: cs_dsp: Run the wmfw payload error tests with invalid block types Mark
@ 2026-10-13  9:17   ` Richard Fitzgerald
  0 siblings, 0 replies; 17+ messages in thread
From: Richard Fitzgerald @ 2026-10-13  9:17 UTC (permalink / raw)
  To: Mark, Simon Trimmer, Charles Keepax, Brendan Higgins, David Gow,
	Rae Moar, Jonathan Corbet, Shuah Khan, Randy Dunlap,
	Theodore Ts'o, Andreas Dilger, Baokun Li, Jan Kara,
	Ojaswin Mujoo, Ritesh Harjani (IBM), Zhang Yi, David Rhodes,
	Liam Girdwood, Jaroslav Kysela, Takashi Iwai
  Cc: patches, linux-kernel, linux-kselftest, kunit-dev, linux-doc,
	linux-ext4, linux-sound

On 13/10/2026 12:10 am, Mark wrote:
> Each of the wmfw error suites lists the truncated block header, truncated
> block payload and garbage payload length tests twice, once with valid
> block types and once with invalid block types. For the payload and
> garbage length tests the second entry names wmfw_too_short_for_block_header
> rather than the test on the preceding line, so the block header test is
> run four times with invalid block types while the other two are only ever
> run with valid ones.
> 
> Point the second entries at the intended tests so that
> wmfw_too_short_for_block_payload() and wmfw_block_payload_len_garbage()
> are also run with invalid block types, as the header test already is.

Reviewed-by: Richard Fitzgerald <rf@opensource.cirrus.com>


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH 9/9] ASoC: wm_adsp: Give the firmware search order KUnit cases distinct names
  2026-10-12 23:10 ` [PATCH 9/9] ASoC: wm_adsp: Give the firmware search order " Mark
@ 2026-10-13  9:19   ` Richard Fitzgerald
  0 siblings, 0 replies; 17+ messages in thread
From: Richard Fitzgerald @ 2026-10-13  9:19 UTC (permalink / raw)
  To: Mark, Simon Trimmer, Charles Keepax, Brendan Higgins, David Gow,
	Rae Moar, Jonathan Corbet, Shuah Khan, Randy Dunlap,
	Theodore Ts'o, Andreas Dilger, Baokun Li, Jan Kara,
	Ojaswin Mujoo, Ritesh Harjani (IBM), Zhang Yi, David Rhodes,
	Liam Girdwood, Jaroslav Kysela, Takashi Iwai
  Cc: patches, linux-kernel, linux-kselftest, kunit-dev, linux-doc,
	linux-ext4, linux-sound

On 13/10/2026 12:10 am, Mark wrote:
> The wm-adsp-fw-find suite runs wm_adsp_fw_find_test_search_order()
> against six different sets of parameters by listing it six times with
> KUNIT_CASE_PARAM(), which names each case after the function. All six
> cases are therefore called wm_adsp_fw_find_test_search_order, which
> makes the results ambiguous.
> 
> Use KUNIT_CASE_PARAM_UNIQUE() for these entries so that each case is
> also named for the parameter generator it is run with, for example
> wm_adsp_fw_find_test_search_order-wm_adsp_fw_find_full_search_gen_params.

Reviewed-by: Richard Fitzgerald <rf@opensource.cirrus.com>


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH 4/9] firmware: cs_dsp: Give the control read/write KUnit cases distinct names
  2026-10-12 23:10 ` [PATCH 4/9] firmware: cs_dsp: Give the control read/write " Mark
@ 2026-10-13  9:49   ` Richard Fitzgerald
  0 siblings, 0 replies; 17+ messages in thread
From: Richard Fitzgerald @ 2026-10-13  9:49 UTC (permalink / raw)
  To: Mark, Simon Trimmer, Charles Keepax, Brendan Higgins, David Gow,
	Rae Moar, Jonathan Corbet, Shuah Khan, Randy Dunlap,
	Theodore Ts'o, Andreas Dilger, Baokun Li, Jan Kara,
	Ojaswin Mujoo, Ritesh Harjani (IBM), Zhang Yi, David Rhodes,
	Liam Girdwood, Jaroslav Kysela, Takashi Iwai
  Cc: patches, linux-kernel, linux-kselftest, kunit-dev, linux-doc,
	linux-ext4, linux-sound

On 13/10/2026 12:10 am, Mark wrote:
> The cs_dsp_ctl_rw suites run cs_dsp_ctl_write_running() and
> cs_dsp_ctl_read_volatile_running() against several sets of parameters
> by listing each function several times with KUNIT_CASE_PARAM(), which
> names the case after the function. The resulting cases all share a
> name, so they cannot be told apart in the results.
> 
> Use KUNIT_CASE_PARAM_UNIQUE() for these entries so that each case is
> also named for the parameter generator it is run with, for example
> cs_dsp_ctl_write_running-all_pop_varying_len_gen_params.

Reviewed-by: Richard Fitzgerald <rf@opensource.cirrus.com>


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH 8/9] ASoC: cs35l56: Give the speaker ID pad config KUnit cases distinct names
  2026-10-12 23:10 ` [PATCH 8/9] ASoC: cs35l56: Give the speaker ID pad config " Mark Brown
@ 2026-10-13  9:51   ` Richard Fitzgerald
  0 siblings, 0 replies; 17+ messages in thread
From: Richard Fitzgerald @ 2026-10-13  9:51 UTC (permalink / raw)
  To: Mark Brown, Simon Trimmer, Charles Keepax, Brendan Higgins,
	David Gow, Rae Moar, Jonathan Corbet, Shuah Khan, Randy Dunlap,
	Theodore Ts'o, Andreas Dilger, Baokun Li, Jan Kara,
	Ojaswin Mujoo, Ritesh Harjani (IBM), Zhang Yi, David Rhodes,
	Liam Girdwood, Jaroslav Kysela, Takashi Iwai
  Cc: patches, linux-kernel, linux-kselftest, kunit-dev, linux-doc,
	linux-ext4, linux-sound

On 13/10/2026 12:10 am, Mark Brown wrote:
> The cs35l56 shared test suites run
> cs35l56_shared_test_onchip_speaker_id_pad_config() both with and
> without pulls configured on the speaker ID pins by listing it twice
> with KUNIT_CASE_PARAM(), which names the case after the function. Both
> cases share a name, so they cannot be told apart in the results.
> 
> Use KUNIT_CASE_PARAM_UNIQUE() for these entries so that each case is
> also named for the parameter generator it is run with, giving
> cs35l56_shared_test_onchip_speaker_id_pad_config-cs35l56_shared_test_onchip_spkid_gen_params
> and
> cs35l56_shared_test_onchip_speaker_id_pad_config-cs35l56_shared_test_onchip_spkid_pull_gen_params.

Reviewed-by: Richard Fitzgerald <rf@opensource.cirrus.com>


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH 5/9] firmware: cs_dsp: Give the control cache KUnit cases distinct names
  2026-10-12 23:10 ` [PATCH 5/9] firmware: cs_dsp: Give the control cache " Mark
@ 2026-10-13  9:55   ` Richard Fitzgerald
  0 siblings, 0 replies; 17+ messages in thread
From: Richard Fitzgerald @ 2026-10-13  9:55 UTC (permalink / raw)
  To: Mark, Simon Trimmer, Charles Keepax, Brendan Higgins, David Gow,
	Rae Moar, Jonathan Corbet, Shuah Khan, Randy Dunlap,
	Theodore Ts'o, Andreas Dilger, Baokun Li, Jan Kara,
	Ojaswin Mujoo, Ritesh Harjani (IBM), Zhang Yi, David Rhodes,
	Liam Girdwood, Jaroslav Kysela, Takashi Iwai
  Cc: patches, linux-kernel, linux-kselftest, kunit-dev, linux-doc,
	linux-ext4, linux-sound

On 13/10/2026 12:10 am, Mark wrote:
> The cs_dsp_ctl_cache suites run cs_dsp_ctl_cache_init(),
> cs_dsp_ctl_cache_writethrough() and
> cs_dsp_ctl_cache_writethrough_unchanged() against several sets of
> parameters by listing each function several times with
> KUNIT_CASE_PARAM(), which names the case after the function. The
> resulting cases all share a name, so they cannot be told apart in the
> results.
> 
> Use KUNIT_CASE_PARAM_UNIQUE() for these entries so that each case is
> also named for the parameter generator it is run with, for example
> cs_dsp_ctl_cache_init-all_pop_varying_len_gen_params.

Reviewed-by: Richard Fitzgerald <rf@opensource.cirrus.com>


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH 6/9] firmware: cs_dsp: Give the wmfw block error KUnit cases distinct names
  2026-10-12 23:10 ` [PATCH 6/9] firmware: cs_dsp: Give the wmfw block error " Mark
@ 2026-10-13  9:58   ` Richard Fitzgerald
  0 siblings, 0 replies; 17+ messages in thread
From: Richard Fitzgerald @ 2026-10-13  9:58 UTC (permalink / raw)
  To: Mark, Simon Trimmer, Charles Keepax, Brendan Higgins, David Gow,
	Rae Moar, Jonathan Corbet, Shuah Khan, Randy Dunlap,
	Theodore Ts'o, Andreas Dilger, Baokun Li, Jan Kara,
	Ojaswin Mujoo, Ritesh Harjani (IBM), Zhang Yi, David Rhodes,
	Liam Girdwood, Jaroslav Kysela, Takashi Iwai
  Cc: patches, linux-kernel, linux-kselftest, kunit-dev, linux-doc,
	linux-ext4, linux-sound

On 13/10/2026 12:10 am, Mark wrote:
> The wmfw error suites run wmfw_too_short_for_block_header(),
> wmfw_too_short_for_block_payload() and wmfw_block_payload_len_garbage()
> both with valid and with invalid block types by listing each twice with
> KUNIT_CASE_PARAM(), which names the case after the function. The two
> cases for each function share a name, so they cannot be told apart in
> the results.
> 
> Use KUNIT_CASE_PARAM_UNIQUE() for these entries so that each case is
> also named for the parameter generator it is run with, for example
> wmfw_too_short_for_block_header-wmfw_invalid_block_types_gen_params.

Reviewed-by: Richard Fitzgerald <rf@opensource.cirrus.com>


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH 7/9] firmware: cs_dsp: Give the bin file KUnit cases distinct names
  2026-10-12 23:10 ` [PATCH 7/9] firmware: cs_dsp: Give the bin file " Mark
@ 2026-10-13 10:10   ` Richard Fitzgerald
  0 siblings, 0 replies; 17+ messages in thread
From: Richard Fitzgerald @ 2026-10-13 10:10 UTC (permalink / raw)
  To: Mark, Simon Trimmer, Charles Keepax, Brendan Higgins, David Gow,
	Rae Moar, Jonathan Corbet, Shuah Khan, Randy Dunlap,
	Theodore Ts'o, Andreas Dilger, Baokun Li, Jan Kara,
	Ojaswin Mujoo, Ritesh Harjani (IBM), Zhang Yi, David Rhodes,
	Liam Girdwood, Jaroslav Kysela, Takashi Iwai
  Cc: patches, linux-kernel, linux-kselftest, kunit-dev, linux-doc,
	linux-ext4, linux-sound

On 13/10/2026 12:10 am, Mark wrote:
> The cs_dsp_bin suites run many of their test functions against more
> than one set of parameters, listing the function once per set with
> KUNIT_CASE_PARAM(), which names the case after the function:
> 
>   - the ADSP2 suites run the XM/YM tests again for ZM,
>   - the WMDR v3 suite runs the whole set again with long offset blocks,
>   - the multiple memory tests are run varying the offset and the
>     algorithm.
> 
> The resulting cases share a name, so they cannot be told apart in the
> results.

Reviewed-by: Richard Fitzgerald <rf@opensource.cirrus.com>


^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2026-10-13 10:11 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-12 23:10 [PATCH 0/9] kunit: Add KUNIT_CASE_PARAM_UNIQUE() and KUNIT_CASE_PARAM_WITH_INIT_UNIQUE() Mark
2026-10-12 23:10 ` [PATCH 1/9] firmware: cs_dsp: Run the wmfw payload error tests with invalid block types Mark
2026-10-13  9:17   ` Richard Fitzgerald
2026-10-12 23:10 ` [PATCH 2/9] kunit: Add KUNIT_CASE_PARAM_UNIQUE() and KUNIT_CASE_PARAM_WITH_INIT_UNIQUE() Mark
2026-10-12 23:10 ` [PATCH 3/9] ext4: Give the extents KUnit cases distinct names Mark
2026-10-12 23:10 ` [PATCH 4/9] firmware: cs_dsp: Give the control read/write " Mark
2026-10-13  9:49   ` Richard Fitzgerald
2026-10-12 23:10 ` [PATCH 5/9] firmware: cs_dsp: Give the control cache " Mark
2026-10-13  9:55   ` Richard Fitzgerald
2026-10-12 23:10 ` [PATCH 6/9] firmware: cs_dsp: Give the wmfw block error " Mark
2026-10-13  9:58   ` Richard Fitzgerald
2026-10-12 23:10 ` [PATCH 7/9] firmware: cs_dsp: Give the bin file " Mark
2026-10-13 10:10   ` Richard Fitzgerald
2026-10-12 23:10 ` [PATCH 8/9] ASoC: cs35l56: Give the speaker ID pad config " Mark Brown
2026-10-13  9:51   ` Richard Fitzgerald
2026-10-12 23:10 ` [PATCH 9/9] ASoC: wm_adsp: Give the firmware search order " Mark
2026-10-13  9:19   ` Richard Fitzgerald

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox