From: "Yann E. MORIN" <yann.morin.1998@free.fr>
To: linux-kbuild@vger.kernel.org
Cc: Michal Marek <mmarek@suse.cz>, Sam Ravnborg <sam@ravnborg.org>,
Arnaud Lacombe <lacombar@gmail.com>,
Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Subject: Re: [PATCH] kconfig: do randomise choice entries in presence of KCONFIG_ALLCONFIG
Date: Tue, 9 Apr 2013 14:02:54 +0200 [thread overview]
Message-ID: <20130409120254.GA6418@free.fr> (raw)
In-Reply-To: <20130408115235.GA7741@free.fr>
On Mon, Apr 08, 2013 at 01:52:35PM +0200, Yann E. MORIN wrote:
> On Sun, Mar 10, 2013 at 05:01:53PM +0100, Yann E. MORIN wrote:
> > Currently, randconfig does randomise choice entries, unless KCONFIG_ALLCONFIG
> > is specified.
[--SNIP--]
> Although this patch does fix the suggested test-case, there are more
> complex situations where this patch is not enough. (I need to shrink down
> the currently failing Kconfig file to the smallest possible test-case).
Here is a newer, worse test-case (with my patch applied ontop Michal's
kbuild/kconfig tree):
---8<--- config.in
config A
bool "A"
if A
choice
bool "B/C"
config B
bool "B"
config C
bool "C"
endchoice
endif # A
if B
choice
bool "D/E"
config D
bool "D"
config E
bool "E"
endchoice
endif # B
---8<---
With an empty './defconfig' file:
KCONFIG_ALLCONFIG=defconfig conf --randconfig config.in
will sometime emit a .config with *both* B=y and C=y although they are
mutually exclusive, being in a choice block.
However, if the two choices are inverted:
---8<--- config.in
config A
bool "A"
if B
choice
bool "D/E"
config D
bool "D"
config E
bool "E"
endchoice
endif # B
if A
choice
bool "B/C"
config B
bool "B"
config C
bool "C"
endchoice
endif # A
---8<---
Then --randconfig will properly randomise *both* choices!
Note: if my patch is not applied, then only B will ever be selected, and
C will never be.
Regards,
Yann E. MORIN.
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
next prev parent reply other threads:[~2013-04-09 12:03 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-27 20:41 randconfig bug when used with KCONFIG_ALLCONFIG Thomas Petazzoni
2013-03-03 20:01 ` Thomas Petazzoni
2013-03-10 16:01 ` [PATCH] kconfig: do randomise choice entries in presence of KCONFIG_ALLCONFIG Yann E. MORIN
2013-03-11 21:40 ` Thomas Petazzoni
2013-03-13 18:27 ` Yann E. MORIN
2013-04-08 11:52 ` Yann E. MORIN
2013-04-09 12:02 ` Yann E. MORIN [this message]
2013-04-10 21:20 ` Yann E. MORIN
2013-04-11 9:44 ` Michal Marek
2013-04-11 9:58 ` Yann E. MORIN
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130409120254.GA6418@free.fr \
--to=yann.morin.1998@free.fr \
--cc=lacombar@gmail.com \
--cc=linux-kbuild@vger.kernel.org \
--cc=mmarek@suse.cz \
--cc=sam@ravnborg.org \
--cc=thomas.petazzoni@free-electrons.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox