From 89342fa38bbaade51584f255eee5cd43621f4e10 Mon Sep 17 00:00:00 2001 From: Richard Fitzgerald Date: Tue, 5 Apr 2022 14:54:17 +0100 Subject: ASoC: soc-utils: Add kunit test for snd_soc_tdm_params_to_bclk() Create a new kunit test for soc-utils and use it to test snd_soc_tdm_params_to_bclk(). The test uses a table of values to avoid the possibility that an on-the-fly generator contains the same algorithmic error as the function-under-test and so fails to detect a bug. There is no need to test every possible combination of values. Enough test cases are included to give confidence that the function is producing the correct results. Signed-off-by: Richard Fitzgerald Link: https://lore.kernel.org/r/20220405135419.1230088-4-rf@opensource.cirrus.com Signed-off-by: Mark Brown --- sound/soc/Makefile | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'sound/soc/Makefile') diff --git a/sound/soc/Makefile b/sound/soc/Makefile index a7b37c06dc43..d4528962ac34 100644 --- a/sound/soc/Makefile +++ b/sound/soc/Makefile @@ -12,6 +12,11 @@ ifneq ($(CONFIG_SND_SOC_TOPOLOGY_KUNIT_TEST),) obj-$(CONFIG_SND_SOC_TOPOLOGY_KUNIT_TEST) := soc-topology-test.o endif +ifneq ($(CONFIG_SND_SOC_UTILS_KUNIT_TEST),) +# snd-soc-test-objs := soc-utils-test.o +obj-$(CONFIG_SND_SOC_UTILS_KUNIT_TEST) := soc-utils-test.o +endif + ifneq ($(CONFIG_SND_SOC_GENERIC_DMAENGINE_PCM),) snd-soc-core-objs += soc-generic-dmaengine-pcm.o endif -- cgit v1.2.3