[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <eb9cb563-d480-4000-8feb-b63b856235c3@smile.fr>
Date: Thu, 9 Nov 2023 23:56:48 +0100
From: Yoann Congal <yoann.congal@...le.fr>
To: Masahiro Yamada <masahiroy@...nel.org>,
Nathan Chancellor <nathan@...nel.org>
Cc: linux-kbuild@...r.kernel.org, linux-kernel@...r.kernel.org,
Randy Dunlap <rdunlap@...radead.org>,
Brandon Maier <brandon.maier@...lins.com>,
Nick Desaulniers <ndesaulniers@...gle.com>,
llvm@...ts.linux.dev
Subject: Re: [PATCH v5] kconfig: avoid an infinite loop in
oldconfig/syncconfig
Hi,
Le 09/11/2023 à 05:26, Masahiro Yamada a écrit :
> On Tue, Nov 7, 2023 at 11:00 PM Nathan Chancellor <nathan@...nel.org> wrote:
>> For what it's worth, this change breaks our continuous integration [1>> because tuxmake explicitly uses /dev/null as stdin to make for
>> non-interactive commands (I think it does this as basically the
>> equivalent of "yes '' | make" in Python), so the error will always
>> occur.
>>
>> Before:
>>
>> [...]
>>
>> After:
>>
>> $ curl -LSso .config https://gitlab.archlinux.org/archlinux/packaging/packages/linux/-/raw/main/config
Calling 'make olddefconfig' at this point should avoid opening the prompt on /dev/null in the next make.
I got tuxmake to that with a hack:
$ .../tuxmake/run --kconfig /dev/null --kconfig-add https://gitlab.archlinux.org/archlinux/packaging/packages/linux/-/raw/main/config
# --kconfig /dev/null => Start from a blank config
# --kconfig-add https//... => ... add to it a partial config
=> tuxmake will "merge" the empty config and the URL one and then run 'make olddefconfig' and finally 'make < /dev/null' which does run
>> $ python3 -c "import subprocess; subprocess.run(['make', '-j128'], stdin=subprocess.DEVNULL)"
>> SYNC include/config/auto.conf
>> HOSTCC scripts/basic/fixdep
>> HOSTCC scripts/kconfig/conf.o
>> HOSTCC scripts/kconfig/confdata.o
>> HOSTCC scripts/kconfig/expr.o
>> LEX scripts/kconfig/lexer.lex.c
>> YACC scripts/kconfig/parser.tab.[ch]
>> HOSTCC scripts/kconfig/menu.o
>> HOSTCC scripts/kconfig/preprocess.o
>> HOSTCC scripts/kconfig/symbol.o
>> HOSTCC scripts/kconfig/util.o
>> HOSTCC scripts/kconfig/lexer.lex.o
>> HOSTCC scripts/kconfig/parser.tab.o
>> HOSTLD scripts/kconfig/conf
>> *
>> * Restart config...
>> *
>> ...
>> Error in reading or end of file.
>> make[3]: *** [scripts/kconfig/Makefile:77: syncconfig] Error 1
>> ...
>>
>> We have been doing this for some time and never run across an infinite
>> loop in syncconfig. Can this be improved?
>
> In Linux, most int/hex entries have a default,
> hence there is no practical issue.
I agree. I never met such case in Linux but only on downstream kbuild user (u-boot in this case).
> I will drop this for now.
Okay!
> I will send an alternative solution.
Please tell me how I can help!
For what it's worth the v2 of this patch[0] tried to exit *only* where the infinite loop would start.
I've just tested it, it allows tuxmake to run smoothly and avoids the infinite loop in case of a hex config without a valid default value.
[0]:https://lore.kernel.org/lkml/20230805095709.6717-1-yoann.congal@smile.fr/
Regards,
--
Yoann Congal
Smile ECS
Powered by blists - more mailing lists