mirror of
https://git.proxmox.com/git/mirror_ubuntu-kernels.git
synced 2025-12-07 22:33:49 +00:00
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<--- Config.test.in
---8<--- config.defaults
CONFIG_OPTIONA=y
---8<--- config.defaults
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 <thomas.petazzoni@free-electrons.com>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Michal Marek <mmarek@suse.cz>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Sedat Dilek <sedat.dilek@gmail.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
---
Changes v3 -> v4
- fix previous issue where some choices would not be set, which would
cause silentoldconfig to ask for them and was then breaking this
workflow (as reported by Arnd and Sedat):
KCONFIG_ALLCONFIG=foo.defconfig make randconfig
make silentoldconfig </dev/nullo
which I have tested (3h28min!) with:
touch defconfig
for(( i=0; i<10000; i++ )); do
KCONFIG_ALLCONFIG=$(pwd)/defconfig make randconfig >/dev/null 2>&1
make silentoldconfig </dev/null >/dev/null 2>&1 || break
done
which did not break at all.
- change done in v3 (below) is already fixed by a previous patch
Changes v2 -> v3
- ensure only one symbol is set in a choice
Changes v1 -> v2:
- further postpone setting that a choice has a value until
one is indeed set
- do not print symbols that are part of an invisible choice
|
||
|---|---|---|
| .. | ||
| basic | ||
| coccinelle | ||
| dtc | ||
| genksyms | ||
| kconfig | ||
| ksymoops | ||
| mod | ||
| package | ||
| rt-tester | ||
| selinux | ||
| tracing | ||
| .gitignore | ||
| asn1_compiler.c | ||
| bin2c.c | ||
| bloat-o-meter | ||
| bootgraph.pl | ||
| checkincludes.pl | ||
| checkkconfigsymbols.sh | ||
| checkpatch.pl | ||
| checkstack.pl | ||
| checksyscalls.sh | ||
| checkversion.pl | ||
| cleanfile | ||
| cleanpatch | ||
| coccicheck | ||
| config | ||
| conmakehash.c | ||
| decodecode | ||
| depmod.sh | ||
| diffconfig | ||
| docproc.c | ||
| export_report.pl | ||
| extract-ikconfig | ||
| extract-vmlinux | ||
| gcc-goto.sh | ||
| gcc-version.sh | ||
| gcc-x86_32-has-stack-protector.sh | ||
| gcc-x86_64-has-stack-protector.sh | ||
| gen_initramfs_list.sh | ||
| get_maintainer.pl | ||
| gfp-translate | ||
| headerdep.pl | ||
| headers_check.pl | ||
| headers_install.sh | ||
| headers.sh | ||
| kallsyms.c | ||
| Kbuild.include | ||
| kernel-doc | ||
| Lindent | ||
| link-vmlinux.sh | ||
| Makefile | ||
| Makefile.asm-generic | ||
| Makefile.build | ||
| Makefile.clean | ||
| Makefile.fwinst | ||
| Makefile.headersinst | ||
| Makefile.help | ||
| Makefile.host | ||
| Makefile.lib | ||
| Makefile.modbuiltin | ||
| Makefile.modinst | ||
| Makefile.modpost | ||
| Makefile.modsign | ||
| makelst | ||
| markup_oops.pl | ||
| mkcompile_h | ||
| mkmakefile | ||
| mksysmap | ||
| mkuboot.sh | ||
| mkversion | ||
| module-common.lds | ||
| namespace.pl | ||
| patch-kernel | ||
| pnmtologo.c | ||
| profile2linkerlist.pl | ||
| recordmcount.c | ||
| recordmcount.h | ||
| recordmcount.pl | ||
| setlocalversion | ||
| show_delta | ||
| sign-file | ||
| sortextable.c | ||
| sortextable.h | ||
| tags.sh | ||
| unifdef.c | ||
| ver_linux | ||
| xz_wrap.sh | ||