kconfig: tests: check visibility of tristate choice values in y choice
authorMasahiro Yamada <yamada.masahiro@socionext.com>
Tue, 13 Mar 2018 09:12:08 +0000 (18:12 +0900)
committerMasahiro Yamada <yamada.masahiro@socionext.com>
Sun, 25 Mar 2018 17:04:03 +0000 (02:04 +0900)
commitee236610653ede74c91f4c35f731047f5b76d667
treeeffba19f5c7d8b29ab468c591faaba8538155900
parent930c429a656fdba0c7f76b9a36ec2698f946e8e3
kconfig: tests: check visibility of tristate choice values in y choice

If tristate choice values depend on symbols set to 'm', they should be
hidden when the choice containing them is changed from 'm' to 'y'
(i.e. exclusive choice).

This issue was fixed by commit fa64e5f6a35e ("kconfig/symbol.c: handle
choice_values that depend on 'm' symbols").

Add a test case to avoid regression.

For the input in this unit test, there is a room for argument if
"# CONFIG_CHOICE1 is not set" should be written to the .config file.

After commit fa64e5f6a35e, this line was written to the .config file.

With commit cb67ab2cd2b8 ("kconfig: do not write choice values when
their dependency becomes n"), it is not written now.

In this test, "# CONFIG_CHOICE1 is not set" is don't care.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Ulf Magnusson <ulfalizer@gmail.com>
scripts/kconfig/tests/choice_value_with_m_dep/Kconfig [new file with mode: 0644]
scripts/kconfig/tests/choice_value_with_m_dep/__init__.py [new file with mode: 0644]
scripts/kconfig/tests/choice_value_with_m_dep/config [new file with mode: 0644]
scripts/kconfig/tests/choice_value_with_m_dep/expected_config [new file with mode: 0644]
scripts/kconfig/tests/choice_value_with_m_dep/expected_stdout [new file with mode: 0644]