Skip to contentSkip to conversation

ALSA: core: fix unit test dependencies

PATCH In review Arnd Bergmann 2 participants 2 messages Feb 4, 2024 – Feb 5, 2024 Sound

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ALSA: core: fix unit test dependencies

From: Arnd Bergmann <[email protected]>

The Kunit tests fail to link when PCM support is disabled:

aarch64-linux-ld: sound/core/sound_kunit.o: in function `test_pcm_format_name':
sound_kunit.c:(.text+0x4c): undefined reference to `snd_pcm_format_name'
aarch64-linux-ld: sound_kunit.c:(.text+0x12c): undefined reference to `snd_pcm_format_name'
aarch64-linux-ld: sound/core/sound_kunit.o: in function `_test_fill_silence':
sound_kunit.c:(.text+0x284): undefined reference to `snd_pcm_format_set_silence'
aarch64-linux-ld: sound/core/sound_kunit.o: in function `test_format_signed':
sound_kunit.c:(.text+0x400): undefined reference to `snd_pcm_format_signed'
aarch64-linux-ld: sound_kunit.c:(.text+0x470): undefined reference to `snd_pcm_format_unsigned'
aarch64-linux-ld: sound/core/sound_kunit.o: in function `test_format_width':
sound_kunit.c:(.text+0x64c): undefined reference to `snd_pcm_format_width'
aarch64-linux-ld: sound_kunit.c:(.text+0x71c): undefined reference to `snd_pcm_format_width'

Add the appropriate dependencies.

Fixes 3e39acf56ede ("ALSA: core: Add sound core KUnit test")
---
 sound/core/Kconfig | 1 +
 1 file changed, 1 insertion(+)
sound/core/Kconfig +1 -0
index 664c6ee2b5a1..9a44f259ccca 100644
@@ -42,6 +42,7 @@ config SND_UMP_LEGACY_RAWMIDI
 config SND_CORE_TEST
 	tristate "Sound core KUnit test"
 	depends on KUNIT
+	depends on SND_PCM
 	default KUNIT_ALL_TESTS
 	help
 	  This options enables the sound core functions KUnit test.
Signature · 1 line
2.39.2
#1 lore raw
Quoted 17 lines · Arnd Bergmann

From: Arnd Bergmann <[email protected]>

The Kunit tests fail to link when PCM support is disabled:

aarch64-linux-ld: sound/core/sound_kunit.o: in function `test_pcm_format_name':
sound_kunit.c:(.text+0x4c): undefined reference to `snd_pcm_format_name'
aarch64-linux-ld: sound_kunit.c:(.text+0x12c): undefined reference to `snd_pcm_format_name'
aarch64-linux-ld: sound/core/sound_kunit.o: in function `_test_fill_silence':
sound_kunit.c:(.text+0x284): undefined reference to `snd_pcm_format_set_silence'
aarch64-linux-ld: sound/core/sound_kunit.o: in function `test_format_signed':
sound_kunit.c:(.text+0x400): undefined reference to `snd_pcm_format_signed'
aarch64-linux-ld: sound_kunit.c:(.text+0x470): undefined reference to `snd_pcm_format_unsigned'
aarch64-linux-ld: sound/core/sound_kunit.o: in function `test_format_width':
sound_kunit.c:(.text+0x64c): undefined reference to `snd_pcm_format_width'
aarch64-linux-ld: sound_kunit.c:(.text+0x71c): undefined reference to `snd_pcm_format_width'

Quoted 4 lines

Add the appropriate dependencies.

Fixes 3e39acf56ede ("ALSA: core: Add sound core KUnit test")

Thanks, but this was already fixed on for-next branch.

Takashi