aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/scripts/kconfig/tests/choice_randomize/expected_config2
diff options
context:
space:
mode:
authorMasahiro Yamada <masahiroy@kernel.org>2024-03-21 01:52:10 +0900
committerMasahiro Yamada <masahiroy@kernel.org>2024-03-21 02:39:55 +0900
commit47ad16894c4a25e6cb342666f0fa203701a88476 (patch)
treeec2a692eec4a0f4022be43c551571b37df65766e /scripts/kconfig/tests/choice_randomize/expected_config2
parentkconfig: tests: support KCONFIG_SEED for the randconfig runner (diff)
downloadwireguard-linux-47ad16894c4a25e6cb342666f0fa203701a88476.tar.xz
wireguard-linux-47ad16894c4a25e6cb342666f0fa203701a88476.zip
kconfig: tests: add a test for randconfig with dependent choices
Since commit 3b9a19e08960 ("kconfig: loop as long as we changed some symbols in randconfig"), conf_set_all_new_symbols() is repeated until there is no more choice left to be shuffled. The motivation was to shuffle a choice nested in another choice. Although commit 09d5873e4d1f ("kconfig: allow only 'config', 'comment', and 'if' inside 'choice'") disallowed the nested choice structure, we must still keep 3b9a19e08960 because there are still cases where conf_set_all_new_symbols() must iterate. scripts/kconfig/tests/choice_randomize/Kconfig is the test case. The second choice depends on 'B', which is the member of the first choice. With 3b9a19e08960 reverted, we would never get the pattern specified by scripts/kconfig/tests/choice_randomize/expected_config2. A real example can be found in lib/Kconfig.debug. Without 3b9a19e08960, the randconfig would not shuffle the "Compressed Debug information" choice, which depends on DEBUG_INFO, which is derived from another choice "Debug information". My goal is to refactor Kconfig so that randconfig will work more simply, without using the loop. For now, let's add a test case to ensure all dependent choices are shuffled, as it is a somewhat tricky case for the current Kconfig. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Diffstat (limited to '')
-rw-r--r--scripts/kconfig/tests/choice_randomize/expected_config28
1 files changed, 8 insertions, 0 deletions
diff --git a/scripts/kconfig/tests/choice_randomize/expected_config2 b/scripts/kconfig/tests/choice_randomize/expected_config2
new file mode 100644
index 000000000000..38f93a8f37bd
--- /dev/null
+++ b/scripts/kconfig/tests/choice_randomize/expected_config2
@@ -0,0 +1,8 @@
+#
+# Automatically generated file; DO NOT EDIT.
+# Main menu
+#
+# CONFIG_A is not set
+CONFIG_B=y
+# CONFIG_X is not set
+CONFIG_Y=y