Linux EXT4 FS development
 help / color / mirror / Atom feed
From: Mark <broonie@kernel.org>
To: Simon Trimmer <simont@opensource.cirrus.com>,
	 Charles Keepax <ckeepax@opensource.cirrus.com>,
	 Richard Fitzgerald <rf@opensource.cirrus.com>,
	 Brendan Higgins <brendan.higgins@linux.dev>,
	David Gow <david@davidgow.net>,  Rae Moar <raemoar63@gmail.com>,
	Jonathan Corbet <corbet@lwn.net>,
	 Shuah Khan <skhan@linuxfoundation.org>,
	 Randy Dunlap <rdunlap@infradead.org>,
	Theodore Ts'o <tytso@mit.edu>,
	 Andreas Dilger <adilger.kernel@dilger.ca>,
	 Baokun Li <libaokun@linux.alibaba.com>, Jan Kara <jack@suse.cz>,
	 Ojaswin Mujoo <ojaswin@linux.ibm.com>,
	 "Ritesh Harjani (IBM)" <ritesh.list@gmail.com>,
	 Zhang Yi <yi.zhang@huawei.com>,
	David Rhodes <david.rhodes@cirrus.com>,
	 Liam Girdwood <lgirdwood@gmail.com>,
	Jaroslav Kysela <perex@perex.cz>,  Takashi Iwai <tiwai@suse.com>
Cc: patches@opensource.cirrus.com, linux-kernel@vger.kernel.org,
	 linux-kselftest@vger.kernel.org, kunit-dev@googlegroups.com,
	 linux-doc@vger.kernel.org, linux-ext4@vger.kernel.org,
	 linux-sound@vger.kernel.org, Mark Brown <broonie@kernel.org>
Subject: [PATCH 6/9] firmware: cs_dsp: Give the wmfw block error KUnit cases distinct names
Date: Tue, 13 Oct 2026 00:10:16 +0100	[thread overview]
Message-ID: <20261013-kunit-param-names-v1-6-4b22ec5b85b9@kernel.org> (raw)
In-Reply-To: <20261013-kunit-param-names-v1-0-4b22ec5b85b9@kernel.org>

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


  parent reply	other threads:[~2026-10-12 23:12 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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:15   ` sashiko-bot
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:16   ` sashiko-bot
2026-10-12 23:10 ` [PATCH 3/9] ext4: Give the extents KUnit cases distinct names Mark
2026-10-12 23:16   ` sashiko-bot
2026-10-12 23:10 ` [PATCH 4/9] firmware: cs_dsp: Give the control read/write " Mark
2026-10-12 23:15   ` sashiko-bot
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-12 23:15   ` sashiko-bot
2026-10-13  9:55   ` Richard Fitzgerald
2026-10-12 23:10 ` Mark [this message]
2026-10-12 23:19   ` [PATCH 6/9] firmware: cs_dsp: Give the wmfw block error " sashiko-bot
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-12 23:16   ` sashiko-bot
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:15   ` sashiko-bot
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-12 23:16   ` sashiko-bot
2026-10-13  9:19   ` Richard Fitzgerald

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261013-kunit-param-names-v1-6-4b22ec5b85b9@kernel.org \
    --to=broonie@kernel.org \
    --cc=adilger.kernel@dilger.ca \
    --cc=brendan.higgins@linux.dev \
    --cc=ckeepax@opensource.cirrus.com \
    --cc=corbet@lwn.net \
    --cc=david.rhodes@cirrus.com \
    --cc=david@davidgow.net \
    --cc=jack@suse.cz \
    --cc=kunit-dev@googlegroups.com \
    --cc=lgirdwood@gmail.com \
    --cc=libaokun@linux.alibaba.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=ojaswin@linux.ibm.com \
    --cc=patches@opensource.cirrus.com \
    --cc=perex@perex.cz \
    --cc=raemoar63@gmail.com \
    --cc=rdunlap@infradead.org \
    --cc=rf@opensource.cirrus.com \
    --cc=ritesh.list@gmail.com \
    --cc=simont@opensource.cirrus.com \
    --cc=skhan@linuxfoundation.org \
    --cc=tiwai@suse.com \
    --cc=tytso@mit.edu \
    --cc=yi.zhang@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox