Message ID | 20230718-asoc-topology-kunit-enable-v2-0-0ee11e662b92@kernel.org (mailing list archive) |
---|---|
Headers | show |
Series | ASoC: Improve coverage in default KUnit runs | expand |
On Tue, 18 Jul 2023 02:28:41 +0200, Mark Brown wrote: > > We have some KUnit tests for ASoC but they're not being run as much as > they should be since ASoC isn't enabled in the configs used by default > with KUnit and in the case of the topology tests there is no way to > enable them without enabling drivers that use them. This series > provides a Kconfig option which KUnit can use directly rather than worry > about drivers. > > Further, since KUnit is typically run in UML but ALSA prevents build > with UML we need to remove that Kconfig conflict. As far as I can tell > the motiviation for this is that many ALSA drivers use iomem APIs which > are not available under UML and it's more trouble than it's worth to go > through and add per driver dependencies. In order to avoid these issues > we also provide stubs for these APIs so there are no build time issues > if a driver relies on iomem but does not depend on it. With these stubs > I am able to build all the sound drivers available in a UML defconfig > (UML allmodconfig appears to have substantial other issues in a quick > test). > > With this series I am able to run the topology KUnit tests as part of a > kunit --alltests run. > > Signed-off-by: Mark Brown <broonie@kernel.org> > --- > Changes in v2: > - Add support for building ALSA with UML. > - Link to v1: https://lore.kernel.org/r/20230712-asoc-topology-kunit-enable-v1-0-b9f2da9dca23@kernel.org > > --- > Mark Brown (5): > driver core: Provide stubs for !IOMEM builds > platform: Provide stubs for !HAS_IOMEM builds > ALSA: Enable build with UML > kunit: Enable ASoC in all_tests.config > ASoC: topology: Add explicit build option Those look like sensible changes. Reviewed-by: Takashi Iwai <tiwai@suse.de> thanks, Takashi
On Tue, 18 Jul 2023 01:28:41 +0100, Mark Brown wrote: > We have some KUnit tests for ASoC but they're not being run as much as > they should be since ASoC isn't enabled in the configs used by default > with KUnit and in the case of the topology tests there is no way to > enable them without enabling drivers that use them. This series > provides a Kconfig option which KUnit can use directly rather than worry > about drivers. > > [...] Applied to https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next Thanks! [1/5] driver core: Provide stubs for !IOMEM builds commit: da7c07b1083809888c82522e74370f962fb7685e [2/5] platform: Provide stubs for !HAS_IOMEM builds commit: a0c74f6c9ea9cebd7a8f38142bf87e7c12c2905d [3/5] ALSA: Enable build with UML commit: 512d092d78823f9813f4af38090b33c454137a4c [4/5] kunit: Enable ASoC in all_tests.config commit: 5aaa4024e14f8b878a348338a74b4c97bc2478b1 [5/5] ASoC: topology: Add explicit build option commit: b7dc237ef8b0897f5750a738d2c57469909a6a15 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
We have some KUnit tests for ASoC but they're not being run as much as they should be since ASoC isn't enabled in the configs used by default with KUnit and in the case of the topology tests there is no way to enable them without enabling drivers that use them. This series provides a Kconfig option which KUnit can use directly rather than worry about drivers. Further, since KUnit is typically run in UML but ALSA prevents build with UML we need to remove that Kconfig conflict. As far as I can tell the motiviation for this is that many ALSA drivers use iomem APIs which are not available under UML and it's more trouble than it's worth to go through and add per driver dependencies. In order to avoid these issues we also provide stubs for these APIs so there are no build time issues if a driver relies on iomem but does not depend on it. With these stubs I am able to build all the sound drivers available in a UML defconfig (UML allmodconfig appears to have substantial other issues in a quick test). With this series I am able to run the topology KUnit tests as part of a kunit --alltests run. Signed-off-by: Mark Brown <broonie@kernel.org> --- Changes in v2: - Add support for building ALSA with UML. - Link to v1: https://lore.kernel.org/r/20230712-asoc-topology-kunit-enable-v1-0-b9f2da9dca23@kernel.org --- Mark Brown (5): driver core: Provide stubs for !IOMEM builds platform: Provide stubs for !HAS_IOMEM builds ALSA: Enable build with UML kunit: Enable ASoC in all_tests.config ASoC: topology: Add explicit build option include/linux/device.h | 26 ++++++++++++++++++++++++++ include/linux/platform_device.h | 28 ++++++++++++++++++++++++++++ sound/Kconfig | 4 ---- sound/soc/Kconfig | 11 +++++++++++ tools/testing/kunit/configs/all_tests.config | 5 +++++ 5 files changed, 70 insertions(+), 4 deletions(-) --- base-commit: 06c2afb862f9da8dc5efa4b6076a0e48c3fbaaa5 change-id: 20230701-asoc-topology-kunit-enable-5e8dd50d0ed7 Best regards,