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

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