mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-09-18 22:14:16 +00:00

Enabling a (modular) test should not silently enable additional kernel
functionality, as that may increase the attack vector of a product.
Fix this by making FW_CS_DSP_KUNIT_TEST (and FW_CS_DSP_KUNIT_TEST_UTILS)
depend on REGMAP instead of selecting it.
After this, one can safely enable CONFIG_KUNIT_ALL_TESTS=m to build
modules for all appropriate tests for ones system, without pulling in
extra unwanted functionality, while still allowing a tester to manually
enable REGMAP_BUILD and this test suite on a system where REGMAP is not
enabled by default.
Fixes: dd0b6b1f29
("firmware: cs_dsp: Add KUnit testing of bin file download")
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Link: https://patch.msgid.link/73c81ac85e21f1c5a75b7628d90cbb0e1b4ed0fa.1737833376.git.geert@linux-m68k.org
Signed-off-by: Mark Brown <broonie@kernel.org>
23 lines
584 B
Text
23 lines
584 B
Text
# SPDX-License-Identifier: GPL-2.0-only
|
|
|
|
config FW_CS_DSP
|
|
tristate
|
|
default n
|
|
|
|
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
|
|
default KUNIT_ALL_TESTS
|
|
select FW_CS_DSP
|
|
select FW_CS_DSP_KUNIT_TEST_UTILS
|
|
help
|
|
This builds KUnit tests for cs_dsp.
|
|
For more information on KUnit and unit tests in general,
|
|
please refer to the KUnit documentation in
|
|
Documentation/dev-tools/kunit/.
|
|
If in doubt, say "N".
|