* [PATCH 1/3] kunit: configs: Add some Cirrus Logic modules to all_tests
2025-04-11 12:36 [PATCH 0/3] Fix up building KUnit tests for Cirrus Logic modules Richard Fitzgerald
@ 2025-04-11 12:36 ` Richard Fitzgerald
2025-04-11 12:36 ` [PATCH 2/3] ASoC: cs-amp-lib-test: Don't select SND_SOC_CS_AMP_LIB Richard Fitzgerald
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Richard Fitzgerald @ 2025-04-11 12:36 UTC (permalink / raw)
To: broonie, brendan.higgins, davidgow, rmoar, npache
Cc: linux-kselftest, kunit-dev, linux-kernel, patches
Add CONFIG_I2C and CONFIG_SND_SOC_CS35L56_I2C to all_tests.config
so that Cirrus Logic modules with KUnit tests will be built.
The CS35L56 driver doesn't currently have any KUnit tests itself,
but it enables two other libraries that have KUnit tests:
cs_dsp and cs-amp-lib.
Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
---
tools/testing/kunit/configs/all_tests.config | 2 ++
1 file changed, 2 insertions(+)
diff --git a/tools/testing/kunit/configs/all_tests.config b/tools/testing/kunit/configs/all_tests.config
index 4a60bb71fe72..4ce38c4f697f 100644
--- a/tools/testing/kunit/configs/all_tests.config
+++ b/tools/testing/kunit/configs/all_tests.config
@@ -21,6 +21,7 @@ CONFIG_VFAT_FS=y
CONFIG_PCI=y
CONFIG_USB4=y
+CONFIG_I2C=y
CONFIG_NET=y
CONFIG_MCTP=y
@@ -52,3 +53,4 @@ CONFIG_SOUND=y
CONFIG_SND=y
CONFIG_SND_SOC=y
CONFIG_SND_SOC_TOPOLOGY_BUILD=y
+CONFIG_SND_SOC_CS35L56_I2C=y
--
2.39.5
^ permalink raw reply related [flat|nested] 6+ messages in thread* [PATCH 2/3] ASoC: cs-amp-lib-test: Don't select SND_SOC_CS_AMP_LIB
2025-04-11 12:36 [PATCH 0/3] Fix up building KUnit tests for Cirrus Logic modules Richard Fitzgerald
2025-04-11 12:36 ` [PATCH 1/3] kunit: configs: Add some Cirrus Logic modules to all_tests Richard Fitzgerald
@ 2025-04-11 12:36 ` Richard Fitzgerald
2025-04-11 12:36 ` [PATCH 3/3] firmware: cs_dsp: tests: Depend on FW_CS_DSP rather then enabling it Richard Fitzgerald
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Richard Fitzgerald @ 2025-04-11 12:36 UTC (permalink / raw)
To: broonie, brendan.higgins, davidgow, rmoar, npache
Cc: linux-kselftest, kunit-dev, linux-kernel, patches
Depend on SND_SOC_CS_AMP_LIB instead of selecting it.
KUNIT_ALL_TESTS should only build tests for components that are
already being built, it should not cause other stuff to be added
to the build.
Fixes: 177862317a98 ("ASoC: cs-amp-lib: Add KUnit test for calibration helpers")
Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
---
sound/soc/codecs/Kconfig | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/sound/soc/codecs/Kconfig b/sound/soc/codecs/Kconfig
index 870eb90116f1..c388676ce380 100644
--- a/sound/soc/codecs/Kconfig
+++ b/sound/soc/codecs/Kconfig
@@ -776,10 +776,9 @@ config SND_SOC_CS_AMP_LIB
tristate
config SND_SOC_CS_AMP_LIB_TEST
- tristate "KUnit test for Cirrus Logic cs-amp-lib"
- depends on KUNIT
+ tristate "KUnit test for Cirrus Logic cs-amp-lib" if !KUNIT_ALL_TESTS
+ depends on SND_SOC_CS_AMP_LIB && KUNIT
default KUNIT_ALL_TESTS
- select SND_SOC_CS_AMP_LIB
help
This builds KUnit tests for the Cirrus Logic common
amplifier library.
--
2.39.5
^ permalink raw reply related [flat|nested] 6+ messages in thread* [PATCH 3/3] firmware: cs_dsp: tests: Depend on FW_CS_DSP rather then enabling it
2025-04-11 12:36 [PATCH 0/3] Fix up building KUnit tests for Cirrus Logic modules Richard Fitzgerald
2025-04-11 12:36 ` [PATCH 1/3] kunit: configs: Add some Cirrus Logic modules to all_tests Richard Fitzgerald
2025-04-11 12:36 ` [PATCH 2/3] ASoC: cs-amp-lib-test: Don't select SND_SOC_CS_AMP_LIB Richard Fitzgerald
@ 2025-04-11 12:36 ` Richard Fitzgerald
2025-04-12 6:33 ` [PATCH 0/3] Fix up building KUnit tests for Cirrus Logic modules David Gow
2025-04-14 13:56 ` Mark Brown
4 siblings, 0 replies; 6+ messages in thread
From: Richard Fitzgerald @ 2025-04-11 12:36 UTC (permalink / raw)
To: broonie, brendan.higgins, davidgow, rmoar, npache
Cc: linux-kselftest, kunit-dev, linux-kernel, patches
From: Nico Pache <npache@redhat.com>
FW_CS_DSP gets enabled if KUNIT is enabled. The test should rather
depend on if the feature is enabled. Fix this by moving FW_CS_DSP to the
depends on clause.
Fixes: dd0b6b1f29b9 ("firmware: cs_dsp: Add KUnit testing of bin file download")
Signed-off-by: Nico Pache <npache@redhat.com>
Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
---
drivers/firmware/cirrus/Kconfig | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/firmware/cirrus/Kconfig b/drivers/firmware/cirrus/Kconfig
index 0a883091259a..e3c2e38b746d 100644
--- a/drivers/firmware/cirrus/Kconfig
+++ b/drivers/firmware/cirrus/Kconfig
@@ -6,14 +6,11 @@ config FW_CS_DSP
config FW_CS_DSP_KUNIT_TEST_UTILS
tristate
- depends on KUNIT && REGMAP
- select FW_CS_DSP
config FW_CS_DSP_KUNIT_TEST
tristate "KUnit tests for Cirrus Logic cs_dsp" if !KUNIT_ALL_TESTS
- depends on KUNIT && REGMAP
+ depends on KUNIT && REGMAP && FW_CS_DSP
default KUNIT_ALL_TESTS
- select FW_CS_DSP
select FW_CS_DSP_KUNIT_TEST_UTILS
help
This builds KUnit tests for cs_dsp.
--
2.39.5
^ permalink raw reply related [flat|nested] 6+ messages in thread* Re: [PATCH 0/3] Fix up building KUnit tests for Cirrus Logic modules
2025-04-11 12:36 [PATCH 0/3] Fix up building KUnit tests for Cirrus Logic modules Richard Fitzgerald
` (2 preceding siblings ...)
2025-04-11 12:36 ` [PATCH 3/3] firmware: cs_dsp: tests: Depend on FW_CS_DSP rather then enabling it Richard Fitzgerald
@ 2025-04-12 6:33 ` David Gow
2025-04-14 13:56 ` Mark Brown
4 siblings, 0 replies; 6+ messages in thread
From: David Gow @ 2025-04-12 6:33 UTC (permalink / raw)
To: Richard Fitzgerald
Cc: broonie, brendan.higgins, rmoar, npache, linux-kselftest,
kunit-dev, linux-kernel, patches
[-- Attachment #1: Type: text/plain, Size: 1190 bytes --]
On Fri, 11 Apr 2025 at 20:36, Richard Fitzgerald
<rf@opensource.cirrus.com> wrote:
>
> This series fixes the KConfig for cs_dsp and cs-amp-lib tests so that
> CONFIG_KUNIT_ALL_TESTS doesn't cause them to add modules to the build.
>
> Patch 1 adds the ASoC CS35L56 driver to KUnit all_tests.config so that
> cs_dsp and cs-amp-lib will be included in the test build.
>
> Patch 2 and 3 fixup the KConfig entries for cs_dsp and cs-amp-lib.
This looks great to me.
The series is:
Reviewed-by: David Gow <davidgow@google.com>
Do you want us to take this (either the whole thing, or just the first
patch) via the KUnit tree, or will you take it yourself? Either should
work here.
Cheers,
-- David
>
> Nico Pache (1):
> firmware: cs_dsp: tests: Depend on FW_CS_DSP rather then enabling it
>
> Richard Fitzgerald (2):
> kunit: configs: Add some Cirrus Logic modules to all_tests
> ASoC: cs-amp-lib-test: Don't select SND_SOC_CS_AMP_LIB
>
> drivers/firmware/cirrus/Kconfig | 5 +----
> sound/soc/codecs/Kconfig | 5 ++---
> tools/testing/kunit/configs/all_tests.config | 2 ++
> 3 files changed, 5 insertions(+), 7 deletions(-)
>
> --
> 2.39.5
>
[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 5281 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH 0/3] Fix up building KUnit tests for Cirrus Logic modules
2025-04-11 12:36 [PATCH 0/3] Fix up building KUnit tests for Cirrus Logic modules Richard Fitzgerald
` (3 preceding siblings ...)
2025-04-12 6:33 ` [PATCH 0/3] Fix up building KUnit tests for Cirrus Logic modules David Gow
@ 2025-04-14 13:56 ` Mark Brown
4 siblings, 0 replies; 6+ messages in thread
From: Mark Brown @ 2025-04-14 13:56 UTC (permalink / raw)
To: brendan.higgins, davidgow, rmoar, npache, Richard Fitzgerald
Cc: linux-kselftest, kunit-dev, linux-kernel, patches
On Fri, 11 Apr 2025 13:36:05 +0100, Richard Fitzgerald wrote:
> This series fixes the KConfig for cs_dsp and cs-amp-lib tests so that
> CONFIG_KUNIT_ALL_TESTS doesn't cause them to add modules to the build.
>
> Patch 1 adds the ASoC CS35L56 driver to KUnit all_tests.config so that
> cs_dsp and cs-amp-lib will be included in the test build.
>
> Patch 2 and 3 fixup the KConfig entries for cs_dsp and cs-amp-lib.
>
> [...]
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
Thanks!
[1/3] kunit: configs: Add some Cirrus Logic modules to all_tests
commit: 1aa495a6572f8641da4ec4cd32210deca61bed64
[2/3] ASoC: cs-amp-lib-test: Don't select SND_SOC_CS_AMP_LIB
commit: 96014d91cffb335d3b396771524ff2aba3549865
[3/3] firmware: cs_dsp: tests: Depend on FW_CS_DSP rather then enabling it
commit: a0b887f6eb9a0d1be3c57d00b0f3ba8408d3018a
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
^ permalink raw reply [flat|nested] 6+ messages in thread