Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp2215822rwb; Sat, 29 Jul 2023 02:13:18 -0700 (PDT) X-Google-Smtp-Source: APBJJlElNe+TJ14YmC6ONQXQrwaarCL1kIMvxsusLHP83aGy2eNY/dMuJCsHlA+uFsKTQt7XD4BT X-Received: by 2002:a17:90a:aa95:b0:267:909f:3719 with SMTP id l21-20020a17090aaa9500b00267909f3719mr4124023pjq.19.1690621997926; Sat, 29 Jul 2023 02:13:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690621997; cv=none; d=google.com; s=arc-20160816; b=oWumfZIotxtNGtCogMTjzmIW/wEPI/sD3X0U6P8rpLPs6Qdunb96HPD+COPBlgW6N6 uYI3YY6pClFzd/2E/xWUNeO4u9xFObNTRvmMHjr8+u8QRmWxwFWgWI2aJ5lYbGpArSBI Q3oNUvDDIHuRADVAqk/E7jr9MuDVgz+GHlwPcm/u7UWsNUY+0A42T9m70yqg3N3LowkN 24r1mVFI2UZxvgNaz2oC3BAIavJg653K6ldUOZunHoV/lObkfQfFjha7AQQGsaHgto9e wHiWWixW3DrpWwP2r7CLCTE62bfh9+dzselMGsy88po9CrBYYdMb/GbTKhHPXa/WZ0Cp 3Eog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=PN12au0+fj4I87h7V1W9PYQ0KZOrHQx/ZH+hHjhSWPU=; fh=tcl19X2u8PtEELiqC9wF/fi8DNcGozPCtYGeW6FgzSg=; b=YaW5fPXKWiNvlzxKIJuWoSpLToP/1D6qMCVXeeRqP0oueeK/JsHasmSfjq4+rWcVuD T+hNAGHUSQH6Q1K+HQiDRCl7GM6L1wE1tshxQIsOFhGkc+JrCz+vt3ThXUBbW1Pqh9kC bJCDt25K2Mw01QLSNqhDe70WsZ1FOvb7L2RtZMR3Nd0C92fmW4QJg0atdIptObSrThez P2YyrrnLJhaaXHCYeuh7f//qZQTucGQ2foGcw3mURo8v+8QFNx13uJ+/1pESn0f37ZrC ESmQNzusxETgqt5GpKmZl9irU7eGFhQocUjTwoCnvWbiYk2oz5eKoU+bGjZ9yI6dLCkd NkDw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id pi14-20020a17090b1e4e00b0026845738569si4541478pjb.169.2023.07.29.02.13.01; Sat, 29 Jul 2023 02:13:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230331AbjG2Hyo (ORCPT + 99 others); Sat, 29 Jul 2023 03:54:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52040 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230180AbjG2Hym (ORCPT ); Sat, 29 Jul 2023 03:54:42 -0400 Received: from 1wt.eu (ded1.1wt.eu [163.172.96.212]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 3464149E3; Sat, 29 Jul 2023 00:54:06 -0700 (PDT) Received: (from willy@localhost) by pcw.home.local (8.15.2/8.15.2/Submit) id 36T7roZS004303; Sat, 29 Jul 2023 09:53:50 +0200 Date: Sat, 29 Jul 2023 09:53:50 +0200 From: Willy Tarreau To: Zhangjin Wu Cc: arnd@arndb.de, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, thomas@t-8ch.de Subject: Re: [PATCH v2 08/14] selftests/nolibc: string the core targets Message-ID: <20230729075350.GI956@1wt.eu> References: <20230722125758.GJ17311@1wt.eu> <20230725142017.37103-1-falcon@tinylab.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230725142017.37103-1-falcon@tinylab.org> User-Agent: Mutt/1.10.1 (2018-07-13) X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_SCC_BODY_TEXT_LINE, T_SPF_HELO_TEMPERROR,T_SPF_TEMPERROR autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jul 25, 2023 at 10:20:17PM +0800, Zhangjin Wu wrote: > > On Wed, Jul 19, 2023 at 09:26:01PM +0800, Zhangjin Wu wrote: > > > To avoid run targets one by one manually and boringly, let's string them > > > with IMAGE and .config, the MAKE command will trigger the dependencies > > > for us. > > > > > > Note, to allow do menuconfig before extconfig manually, only trigger > > > defconfig while the .config is not there, it means only trigger > > > defconfig for the first run or after a mrproper. > > > > > > Signed-off-by: Zhangjin Wu > > > --- > > > tools/testing/selftests/nolibc/Makefile | 18 +++++++++++++----- > > > 1 file changed, 13 insertions(+), 5 deletions(-) > > > > > > diff --git a/tools/testing/selftests/nolibc/Makefile b/tools/testing/selftests/nolibc/Makefile > > > index 83cb4b017bef..541f3565e584 100644 > > > --- a/tools/testing/selftests/nolibc/Makefile > > > +++ b/tools/testing/selftests/nolibc/Makefile > > (...) > > > -extconfig: > > > +extconfig: $(KERNEL_CONFIG) > > > $(Q)$(srctree)/scripts/kconfig/merge_config.sh -O "$(objtree)" -m "$(KERNEL_CONFIG)" $(foreach c,$(EXTCONFIG),$(wildcard $(CURDIR)/configs/$c)) > > > $(Q)$(MAKE_KERNEL) KCONFIG_ALLCONFIG="$(KERNEL_CONFIG)" allnoconfig > > > > > > -kernel: initramfs > > > +kernel: extconfig > > > + $(Q)$(MAKE) --no-print-directory initramfs > > > > There seems to be something wrong here. From what I'm seeing, now if I > > run "make kernel" it will run extconfig and possibly change the config > > I just edited. > > > > Yeah, extconfig will run for every 'make kernel', it is ok for us to > let kernel depends on $(KERNEL_CONFIG), but this requires users to run > extconfig explictly, the solution may be: > > - move extconfig operations to defconfig target and future tinyconfig target (it looks cleaner ...) > > - but it is not convenient to trigger additional changes introduced by > extconfig, not necessary, but really helpful, something like 'menuconfig' > > - let users run extconfig manually after a defconfig or tinyconfig (it is a little complex) > > - this make users hard to learn what to do, should give up this method > > - run extconfig for every 'make kernel' as it currently do > > - this may change something after a menuconfig, but it only trigger minimal > required options, the 'hurt' should be minimal, but of course, it may confuse sometimes ;-( > > As a summary, let's remove 'extconfig' and move its operations to the defconfig > and the future tinyconfig targets? 'extconfig' should be a 'default' config > action, let users apply additional ones manually from the top-level 'make > menuconfig', what's your idea? Well, it's important to apply the principle of least surprise for the user. You're a developer who spent time working on your config, you believe it's OK and you just remind that you've heard about that nolibc test thing recently and you think "why not give it a try in case it spots something I forgot in my config". Then you just run the test there and once done your config was secretly modified. This is exactly an example of what *not* to do. We should never modify user's config nor files in general without an explicit request from the user. If the user types "make defconfig", they're implicitly requesting to replace the config, so we can do what we want with it. If they type "make kernel", they expect to make a kernel based on this config, not to mollest this precious config file and then make a kernel out of it. So I'm fine with the idea of adding config snippets on top of defconfig and tinyconfig to allow the user to generate a working config for a given architecture, but not for modifying their config without their consent. Willy