Commit b7546111 authored by Masahiro Yamada's avatar Masahiro Yamada

kconfig: tests: remove randconfig test for choice in choice

Nesting choice statements does not make any sense.

Commit df8df5e4 ("usb: get rid of 'choice' for legacy gadget
drivers") got rid of the only usecase.

I will turn it into a syntax error. Remove the test in advance.
Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
parent 644a4b6c
# SPDX-License-Identifier: GPL-2.0
choice
prompt "choice"
config A
bool "A"
config B
bool "B"
if B
choice
prompt "sub choice"
config C
bool "C"
config D
bool "D"
if D
choice
prompt "subsub choice"
config E
bool "E"
endchoice
endif # D
endchoice
endif # B
endchoice
# SPDX-License-Identifier: GPL-2.0
"""
Set random values recursively in nested choices.
Kconfig can create a choice-in-choice structure by using 'if' statement.
randconfig should correctly set random choice values.
Related Linux commit: 3b9a19e08960e5cdad5253998637653e592a3c29
"""
def test(conf):
for i in range(20):
assert conf.randconfig() == 0
assert (conf.config_contains('expected_stdout0') or
conf.config_contains('expected_stdout1') or
conf.config_contains('expected_stdout2'))
# CONFIG_A is not set
CONFIG_B=y
CONFIG_C=y
# CONFIG_D is not set
# CONFIG_A is not set
CONFIG_B=y
# CONFIG_C is not set
CONFIG_D=y
CONFIG_E=y
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment