From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.free-electrons.com ([94.23.35.102]:45914 "EHLO mail.free-electrons.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753313Ab3CKVko (ORCPT ); Mon, 11 Mar 2013 17:40:44 -0400 Date: Mon, 11 Mar 2013 22:40:39 +0100 From: Thomas Petazzoni Subject: Re: [PATCH] kconfig: do randomise choice entries in presence of KCONFIG_ALLCONFIG Message-ID: <20130311224039.51af7d53@skate> In-Reply-To: <1362931313-31829-1-git-send-email-yann.morin.1998@free.fr> References: <20130227214102.6d63544d@skate> <1362931313-31829-1-git-send-email-yann.morin.1998@free.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kbuild-owner@vger.kernel.org List-ID: To: "Yann E. MORIN" Cc: linux-kbuild@vger.kernel.org, Michal Marek , Sam Ravnborg , Arnaud Lacombe Dear Yann E. MORIN, On Sun, 10 Mar 2013 17:01:53 +0100, Yann E. MORIN wrote: > Currently, randconfig does randomise choice entries, unless KCONFIG_ALLCONFIG > is specified. > > For example, given those two files (Thomas' test-case): > > ---8<--- Config.test.in > config OPTIONA > bool "Option A" > > choice > prompt "This is a choice" > > config CHOICE_OPTIONA > bool "Choice Option A" > > config CHOICE_OPTIONB > bool "Choice Option B" > > endchoice > > config OPTIONB > bool "Option B" > ---8<--- > > ---8<--- config.defaults > CONFIG_OPTIONA=y > ---8<--- > > And running: > ./scripts/kconfig/conf --randconfig Config.test.in > > does properly randomise the two choice symbols (and the two booleans). > > However, running: > KCONFIG_ALLCONFIG=config.defaults \ > ./scripts/kconfig/conf --randconfig Config.test.in > > does *not* reandomise the two choice entries, and only CHOICE_OPTIONA > will ever be selected. (OPTIONA will always be set (expected), and > OPTIONB will be be properly randomised (expected).) > > This patch defers setting that a choice has a value until a symbol for > that choice is indeed set, so that choices are properly randomised when > KCONFIG_ALLCONFIG is set, but not if a symbol for that choice is set. > > Reported-by: Thomas Petazzoni > Signed-off-by: "Yann E. MORIN" > Cc: Michal Marek > Cc: Sam Ravnborg > Cc: Arnaud Lacombe I confirm that the patch fixes the issue for me, but I am not able to judge the absence of side-effects. Thanks Yann for the investigation! Tested-by: Thomas Petazzoni -- Thomas Petazzoni, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com