All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexander Kriegisch <Alexander@Kriegisch.name>
To: linux kbuild list <linux-kbuild@vger.kernel.org>
Cc: Freetz Developers <developers-freetz-org@freetz.org>
Subject: Re: randconfig broken on choice
Date: Thu, 20 Oct 2011 11:25:37 +0200	[thread overview]
Message-ID: <4E9FE911.9050909@Kriegisch.name> (raw)

Matthieu, Arnaud,

I wrote a shell script [1] which creates thousands or random configs in 
order to find and eliminate warnings in our configuration (missing 
dependencies etc.). We use this as a way of fuzzing, i.e. to perform 
heuristic tests because it is impossible to cover all combinations.

We use kconfig 3.1-rc9 in our project. First we had the problem Matthieu 
described for rc4, because the randconfigs only covered a small subset 
of possibilities due to its buggy handling of "choice" entries.

The good news is that Mattheiu's patch [2] effectively eliminated the 
problems, and we could successfully remove all inconsistencies in our 
configuration.

So I would like to push this patch. We would be happy to see it 
integrated upstream. Thanks! :-)

[1] http://freetz.org/browser/trunk/tools/developer/create-kconfig-warnings
[2] 
http://freetz.org/browser/trunk/tools/make/patches/340-fix_randconfig_choice.kconfig.patch
-- 
Alexander Kriegisch
http://freetz.org


> I am using v3.1-rc4 and make randconfig look broken for choice.
> The choice config is always the same or choice entry can have more than one entry.
>
> After some debugging, it seems in randomize_choice_values, we don't clean
> SYMBOL_VALID for choice entry.
> And we don't take "sym->def[S_DEF_USER].tri" but the "default sym->cur.tri".
>
> The following patch seems to fix the problem.
>
> Matthieu
>
>
> diff --git a/scripts/kconfig/confdata.c b/scripts/kconfig/confdata.c
> index 59b667c..08331f8 100644
> --- a/scripts/kconfig/confdata.c
> +++ b/scripts/kconfig/confdata.c
> @@ -1045,6 +1045,10 @@ static void randomize_choice_values(struct symbol *csym)
>  		else {
>  			sym->def[S_DEF_USER].tri = no;
>  		}
> +		sym->flags |= SYMBOL_DEF_USER;
> +		/* clear VALID to get value calculated */
> +		sym->flags &= ~(SYMBOL_VALID);
> +
>  	}
>  	csym->flags |= SYMBOL_DEF_USER;
>  	/* clear VALID to get value calculated */

             reply	other threads:[~2011-10-20  9:25 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-20  9:25 Alexander Kriegisch [this message]
  -- strict thread matches above, loose matches on Subject: below --
2011-09-06  8:52 randconfig broken on choice Matthieu CASTET
2011-09-06  8:52 ` Matthieu CASTET
2011-09-06 15:04 ` Arnaud Lacombe
2011-09-06 15:13   ` Matthieu CASTET
2011-09-06 15:32     ` Arnaud Lacombe
2011-09-06 18:55       ` Arnaud Lacombe
2011-09-09  9:04         ` Matthieu CASTET

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=4E9FE911.9050909@Kriegisch.name \
    --to=alexander@kriegisch.name \
    --cc=developers-freetz-org@freetz.org \
    --cc=linux-kbuild@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.