[PATCH 7/9] firmware: cs_dsp: Give the bin file KUnit cases distinct names
From: Mark
Date: Mon Oct 12 2026 - 19:15:00 EST
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@xxxxxxxxxx>
---
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