randconfig broken on choice
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
Signature · 2 lines
Alexander Kriegisch http://freetz.org
Quoted 27 lines
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 cleanSYMBOL_VALIDfor choice entry.
And we don't take "sym->def[S_DEF_USER].tri" but the "defaultsym->cur.tri".The following patch seems to fix the problem.
Matthieu
scripts/kconfig/confdata.c +4
-0@@ -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 */