diff mbox series

[1/2] kunit: Enable ASoC in all_tests.config

Message ID 20230712-asoc-topology-kunit-enable-v1-1-b9f2da9dca23@kernel.org (mailing list archive)
State Superseded
Headers show
Series ASoC: Improve coverage in default KUnit runs | expand

Commit Message

Mark Brown July 12, 2023, 3:40 p.m. UTC
There are KUnit tests for some of the ASoC utility functions which are
not enabled in the KUnit all_tests.config, do so.

Signed-off-by: Mark Brown <broonie@kernel.org>
---
 tools/testing/kunit/configs/all_tests.config | 4 ++++
 1 file changed, 4 insertions(+)

Comments

David Gow July 13, 2023, 4:19 a.m. UTC | #1
On Wed, 12 Jul 2023 at 23:40, Mark Brown <broonie@kernel.org> wrote:
>
> There are KUnit tests for some of the ASoC utility functions which are
> not enabled in the KUnit all_tests.config, do so.
>
> Signed-off-by: Mark Brown <broonie@kernel.org>
> ---

While I love the idea of this, it breaks the default UML --alltests
build, as all of ALSA is behind an "if !UML".

I think that's a dealbreaker for this change as-is, which leaves us
with a few options:
1. Don't include this in --alltests, but provide a separate
kunitconfig to run it. Not ideal, but simplest.
2. Make ALSA build with UML. Just removing the "if !UML" makes this
work, but I imagine would uncover a lot of other issues.
3. Change the way --alltests works to allow for UML-only / non-UML /
architecture-specific options.

I suspect the ultimately ideal option would be a bit of all three, but
I'd be happy with any of them in the meantime.

ALSA folks, how horrifying a prospect is removing the "if !UML"
everywhere? If it's not trivial, how do we feel about adding
"sound/soc/.kunitconfig" containing these tests?

On the KUnit side, we can look into adding 'all_tests_nonuml.config"
or something as a workaround.

Cheers,
-- David


>  tools/testing/kunit/configs/all_tests.config | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/tools/testing/kunit/configs/all_tests.config b/tools/testing/kunit/configs/all_tests.config
> index 0393940c706a..13d15bc693fb 100644
> --- a/tools/testing/kunit/configs/all_tests.config
> +++ b/tools/testing/kunit/configs/all_tests.config
> @@ -35,3 +35,7 @@ CONFIG_DAMON_DBGFS=y
>
>  CONFIG_SECURITY=y
>  CONFIG_SECURITY_APPARMOR=y
> +
> +CONFIG_SOUND=y
> +CONFIG_SND=y
> +CONFIG_SND_SOC=y
>
> --
> 2.39.2
>
Mark Brown July 13, 2023, 10:27 a.m. UTC | #2
On Thu, Jul 13, 2023 at 12:19:13PM +0800, David Gow wrote:

> While I love the idea of this, it breaks the default UML --alltests
> build, as all of ALSA is behind an "if !UML".

Oh, UML finally works again - that's good.

> ALSA folks, how horrifying a prospect is removing the "if !UML"
> everywhere? If it's not trivial, how do we feel about adding
> "sound/soc/.kunitconfig" containing these tests?

I suspect this is due to UML not providing some key APIs like DMA, if
it's building now I guess those dependencies might have been fixed.  Do
all the drivers build properly if you enable UML, otherwise all the
randconfig people will get upset, it could've been to save all the
drivers from having to deal with UML features issues?

Another option would be for the KUnit runner to just ignore kconfig
options getting disabled.
diff mbox series

Patch

diff --git a/tools/testing/kunit/configs/all_tests.config b/tools/testing/kunit/configs/all_tests.config
index 0393940c706a..13d15bc693fb 100644
--- a/tools/testing/kunit/configs/all_tests.config
+++ b/tools/testing/kunit/configs/all_tests.config
@@ -35,3 +35,7 @@  CONFIG_DAMON_DBGFS=y
 
 CONFIG_SECURITY=y
 CONFIG_SECURITY_APPARMOR=y
+
+CONFIG_SOUND=y
+CONFIG_SND=y
+CONFIG_SND_SOC=y