From c8801514d63aaa6ad78ee62930ca5160fb52f74a Mon Sep 17 00:00:00 2001 From: Ulf Magnusson Date: Thu, 14 Jun 2018 16:47:21 +0200 Subject: Fix incorrectly ordered properties for some nested multi.def. symbols _propagate_deps() visits menu nodes roughly breadth-first, meaning properties on symbols and choices defined in multiple locations could end up in the wrong order when copied from the menu node for some unlucky if/menu nestings. Fix it by moving the menu-node-to-symbol/choice property copying in _finalize_tree() so that it's guaranteed to happen in definition order. This bug was introduced by commit 63a4418 ("Record which MenuNode has each property"). --- tests/Kdepcopy | 125 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 125 insertions(+) create mode 100644 tests/Kdepcopy (limited to 'tests') diff --git a/tests/Kdepcopy b/tests/Kdepcopy new file mode 100644 index 0000000..689bcc3 --- /dev/null +++ b/tests/Kdepcopy @@ -0,0 +1,125 @@ +# We verify that the properties below end up in definition order + +config MULTIDEF + bool + default A + default B + select AA + imply AA + +if FOO + +config MULTIDEF + default C + default D + select BB + imply BB + +if BAR + +config MULTIDEF + default E + default F + select CC + imply CC + +menu "menu" + +config MULTIDEF + default G + default H + select DD + imply DD + +config MULTIDEF + default I + default J + select EE + imply EE + +endmenu + +config MULTIDEF + default K + default L + select FF + imply FF + +config MULTIDEF + default M + default N + select GG + imply GG + +endif + +config MULTIDEF + default O + default P + select HH + select II + imply HH + imply II + +endif + +config MULTIDEF + default Q + default R + select JJ + imply JJ + + +# Same test with choices involved + +config MULTIDEF_CHOICE + bool + select A + +choice + bool "choice" + +config MULTIDEF_CHOICE + bool "multidef choice" + select B + +endchoice + +config MULTIDEF_CHOICE + bool + select C + + +# Same test with ranges involved + +config MULTIDEF_RANGE + int + range A _ + +menu "menu" + +config MULTIDEF_RANGE + int + range B _ + +if FOO + +config MULTIDEF_RANGE + int + range C _ + +endif + +config MULTIDEF_RANGE + int + range D _ + +endmenu + +config MULTIDEF_RANGE + int + range E _ + +config MULTIDEF_RANGE + int + range F _ -- cgit v1.2.3