Linux EXT4 FS development
 help / color / mirror / Atom feed
* [PATCH v2 0/9] kunit: Add KUNIT_CASE_PARAM_UNIQUE() and KUNIT_CASE_PARAM_WITH_INIT_UNIQUE()
@ 2026-11-05 16:00 Mark Brown
  2026-11-05 16:00 ` [PATCH v2 1/9] firmware: cs_dsp: Run the wmfw payload error tests with invalid block types Mark Brown
                   ` (8 more replies)
  0 siblings, 9 replies; 19+ messages in thread
From: Mark Brown @ 2026-11-05 16:00 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>
---
Changes in v2:
- Rebase onto v7.4-rc1.
- Link to v1: https://patch.msgid.link/20261013-kunit-param-names-v1-0-4b22ec5b85b9@kernel.org

---
Mark Brown (9):
      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: cs35l56: Give the speaker ID pad config KUnit cases distinct names
      ASoC: wm_adsp: Give the firmware search order 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: 6628e7d4c6b25c8d18f1345e3a20d21829aae7e4
base-tree: git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm master
change-id: 20261012-kunit-param-names-d6cb1450c3ce

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


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

end of thread, other threads:[~2026-11-06  5:42 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-05 16:00 [PATCH v2 0/9] kunit: Add KUNIT_CASE_PARAM_UNIQUE() and KUNIT_CASE_PARAM_WITH_INIT_UNIQUE() Mark Brown
2026-11-05 16:00 ` [PATCH v2 1/9] firmware: cs_dsp: Run the wmfw payload error tests with invalid block types Mark Brown
2026-11-06  5:27   ` sashiko-bot
2026-11-05 16:00 ` [PATCH v2 2/9] kunit: Add KUNIT_CASE_PARAM_UNIQUE() and KUNIT_CASE_PARAM_WITH_INIT_UNIQUE() Mark Brown
2026-11-06  5:30   ` sashiko-bot
2026-11-05 16:00 ` [PATCH v2 3/9] ext4: Give the extents KUnit cases distinct names Mark Brown
2026-11-06  5:32   ` sashiko-bot
2026-11-05 16:00 ` [PATCH v2 4/9] firmware: cs_dsp: Give the control read/write " Mark Brown
2026-11-06  5:33   ` sashiko-bot
2026-11-05 16:00 ` [PATCH v2 5/9] firmware: cs_dsp: Give the control cache " Mark Brown
2026-11-06  5:37   ` sashiko-bot
2026-11-05 16:00 ` [PATCH v2 6/9] firmware: cs_dsp: Give the wmfw block error " Mark Brown
2026-11-06  5:38   ` sashiko-bot
2026-11-05 16:00 ` [PATCH v2 7/9] firmware: cs_dsp: Give the bin file " Mark Brown
2026-11-06  5:39   ` sashiko-bot
2026-11-05 16:00 ` [PATCH v2 8/9] ASoC: cs35l56: Give the speaker ID pad config " Mark Brown
2026-11-06  5:41   ` sashiko-bot
2026-11-05 16:00 ` [PATCH v2 9/9] ASoC: wm_adsp: Give the firmware search order " Mark Brown
2026-11-06  5:42   ` sashiko-bot

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