Message ID | ba8ce60152aa03c73f9b33960d3be8af0e377a49.1689759351.git.falcon@tinylab.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:c923:0:b0:3e4:2afc:c1 with SMTP id j3csp2456492vqt; Wed, 19 Jul 2023 06:57:41 -0700 (PDT) X-Google-Smtp-Source: APBJJlE8pWb0LnORaGJ0RqKWhNbK1aEiW3CtqlsxSQRcE70lf88LYc5+TgUT6jTNeU3bHcK9MVa1 X-Received: by 2002:a05:6a21:3286:b0:11d:4c79:90ee with SMTP id yt6-20020a056a21328600b0011d4c7990eemr22820431pzb.25.1689775060698; Wed, 19 Jul 2023 06:57:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689775060; cv=none; d=google.com; s=arc-20160816; b=pcLuLKh9CBXJ2sUwWJSbd9ms+T41F4hUreO6gDlT2bzl4HguYu6sUrVompVY8n8nac vZOa5kTS2JmE4sbgaIFER1APavoLnkozN4IonnmFJMlZEYHWroExG1TWBFLhs3aZ7Tvj WxjgNVqwmI1SIZdW+4WIpiCdI0vBMzq2y9s1SR+64Eq6GnfKuDnvjfx/JLvnqnTGrSc7 K5GEIfn5/yoNJWZHQnrNXdos7w2Iq2FLgkB5iB5N5tY1DOVynQGyUrz3JKvzla1DbMq6 Ye3PEjojDPs8N3FaXmyiVBpdPtT76BwZrX6NQHj+MYeC86HJPmInm0InuklrBZ2liD6H tFLw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:feedback-id:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from; bh=tNZg5cCNoToxfjvKVgyyVQOmqIrRasLY1Gi2JlzljzA=; fh=LUnDCxFG3oyWlcYTkiNww5x4+0V5pkm51/GfDl61ZDU=; b=recx5s5t2UjnuJDKQ4wMpmpr/y41ZXMOD86XepV8E9Nz2szTmDWmCRpu1pTDD+00cN vEDYu/89IY2RL8AVDEEO6eHnJ6t8GglRsAcmRg7RHZvB7XOlzQAR/wXQRxARoTnQfTzX gbqDySTSgikFNcS3KsppyLbNz1aaqD3SK//5f6GJihWDWcvsgMtPu2Jsg4zjNH6iOvav /U9C+XFt6pZK1MAZbWAnbgZqwBcDdD/E/u6OFNVel7bez7t8ILcwB6IdFO+TflduBOTP 8IRx14R5lJu766FKNgfSn2nLtuEl6OBzbyUUSGYIDuhSi9laCtFEF8qwLjHAcECXmTAG G0ng== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b8-20020a63d808000000b0054fd947f66dsi3481736pgh.210.2023.07.19.06.57.27; Wed, 19 Jul 2023 06:57:40 -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 S231215AbjGSNZI (ORCPT <rfc822;assdfgzxcv4@gmail.com> + 99 others); Wed, 19 Jul 2023 09:25:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48968 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229637AbjGSNZH (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 19 Jul 2023 09:25:07 -0400 Received: from bg4.exmail.qq.com (bg4.exmail.qq.com [43.155.65.254]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CD83BFD; Wed, 19 Jul 2023 06:25:05 -0700 (PDT) X-QQ-mid: bizesmtp80t1689773096tvcme5mq Received: from linux-lab-host.localdomain ( [119.123.130.39]) by bizesmtp.qq.com (ESMTP) with id ; Wed, 19 Jul 2023 21:24:55 +0800 (CST) X-QQ-SSF: 01200000000000D0X000000A0000000 X-QQ-FEAT: HzdOSj0Bmys3/fOoqbEWdmxqkRROHEaQlEr+veWl6qr7J4qAL4t6mLHXQg1Ae oJ1k9dIndDeyN6LIRorFFpXBgVRAoP/Ui+ew0uZZJnIffORC7NlmPt5jJTyXQThDo2gDs0E o046oUM4s5eX2dJRXtSBVY62qAJYmoHZ5T9ySwt+qTYQHFyk7X4lJE6wwdvosb/orSpuTip tBGneNnha00pwUhzibN40qIlMYGfOcwSO5THfqdn9dRkZaYUVIg2MqmfDJjH45RNFbNL1n4 5q3a4pg/WmGF8aqkdlpJNgBa0iTMEpcVgRmXsXCR2jIeIT8sGHS1o2glMnR9M20tQDwi8HY n8vlR7Z1rYuxE97wp8KcHmo6Y2GEqegrELfozgtqD2YjCldim0= X-QQ-GoodBg: 0 X-BIZMAIL-ID: 7211787249313186061 From: Zhangjin Wu <falcon@tinylab.org> To: w@1wt.eu Cc: thomas@t-8ch.de, arnd@arndb.de, falcon@tinylab.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org Subject: [PATCH v2 07/14] selftests/nolibc: defconfig: remove mrproper target Date: Wed, 19 Jul 2023 21:24:54 +0800 Message-Id: <ba8ce60152aa03c73f9b33960d3be8af0e377a49.1689759351.git.falcon@tinylab.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <cover.1689759351.git.falcon@tinylab.org> References: <cover.1689759351.git.falcon@tinylab.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtp:tinylab.org:qybglogicsvrgz:qybglogicsvrgz5a-1 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1771857574128513542 X-GMAIL-MSGID: 1771857574128513542 |
Series |
selftests/nolibc: add minimal kernel config support - part1
|
|
Commit Message
Zhangjin Wu
July 19, 2023, 1:24 p.m. UTC
The O=/path/to/kernel-<ARCH> option allows to build kernel for different
architectures in different output directories, in this scene, it doesn't
need the mrproper operation for defconfig anymore.
If really require to clean up the source code tree, let users run the
standalone mrproper target on demand.
Signed-off-by: Zhangjin Wu <falcon@tinylab.org>
---
tools/testing/selftests/nolibc/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Comments
On Wed, Jul 19, 2023 at 09:24:54PM +0800, Zhangjin Wu wrote: > The O=/path/to/kernel-<ARCH> option allows to build kernel for different > architectures in different output directories, in this scene, it doesn't > need the mrproper operation for defconfig anymore. > > If really require to clean up the source code tree, let users run the > standalone mrproper target on demand. But that's precisely what's going to make it more and more annoying to run simple tests. The mrproper was there precisely because one config at a time was being used, so without it we'll restart to see plenty of failures as it used to be before mrproper was added. I understand what you're trying to do with the O=, but then if you're already passing "O=", why not also pass "defconfig" ? I mean, let's make sure this makefile is only used to manipulate the tests. It must not become a huge wrapper for the kernel makefile otherwise it will become extremely complicated to use to run just a simple test. And with this one and the last few ones, I'm starting to sense that I'll have to read a README to figure how to reliably run a test. In my opinion, there are mainly two use cases : - user, manually: commands should be short, forgiving to user mistakes, and easy to remember. I.e. they're compatible with upper-arrow, then enter. - scripts: these are the ones already running in loops with tons of variables, setting object directories with O=$arch/... and taking care of their own cleanups. These ones will already be user-specific and can very well accomodate one or two extra lines for a make mrproper or make defconfig if needed. The second ones deserve thinking and control anyway. The first ones should mostly not fail for a user mistake and in the worst case waste a bit of their time by rebuilding something that could have been avoided. But I do want to prioritize the user here. And that's also why I want the makefile to be easy to read with as few macros as possible, because once it works for you, it's easy to figure what is being done, and how to exploit it from your scripts. The opposite is not true. Nobody reads a makefile full of macros to try to figure how to run their first test or why a test that worked once now fails. Thanks, Willy
> On Wed, Jul 19, 2023 at 09:24:54PM +0800, Zhangjin Wu wrote: > > The O=/path/to/kernel-<ARCH> option allows to build kernel for different > > architectures in different output directories, in this scene, it doesn't > > need the mrproper operation for defconfig anymore. > > > > If really require to clean up the source code tree, let users run the > > standalone mrproper target on demand. > > But that's precisely what's going to make it more and more annoying > to run simple tests. The mrproper was there precisely because one > config at a time was being used, so without it we'll restart to see > plenty of failures as it used to be before mrproper was added. I > understand what you're trying to do with the O=, but then if you're > already passing "O=", why not also pass "defconfig" ? > > I mean, let's make sure this makefile is only used to manipulate > the tests. It must not become a huge wrapper for the kernel makefile > otherwise it will become extremely complicated to use to run just a > simple test. And with this one and the last few ones, I'm starting > to sense that I'll have to read a README to figure how to reliably > run a test. > > In my opinion, there are mainly two use cases : > - user, manually: commands should be short, forgiving to user > mistakes, and easy to remember. I.e. they're compatible with > upper-arrow, then enter. > > - scripts: these are the ones already running in loops with tons > of variables, setting object directories with O=$arch/... and > taking care of their own cleanups. These ones will already be > user-specific and can very well accomodate one or two extra > lines for a make mrproper or make defconfig if needed. > > The second ones deserve thinking and control anyway. The first ones > should mostly not fail for a user mistake and in the worst case waste > a bit of their time by rebuilding something that could have been > avoided. But I do want to prioritize the user here. And that's also > why I want the makefile to be easy to read with as few macros as > possible, because once it works for you, it's easy to figure what is > being done, and how to exploit it from your scripts. The opposite is > not true. Nobody reads a makefile full of macros to try to figure how > to run their first test or why a test that worked once now fails. > Ok, let's reserve mrproper for defconfig and also for tinyconfig if we add standalone target for it. let's drop patch and the previous one. Thanks, Zhangjin > Thanks, > Willy
diff --git a/tools/testing/selftests/nolibc/Makefile b/tools/testing/selftests/nolibc/Makefile index 9d9902b54e5e..83cb4b017bef 100644 --- a/tools/testing/selftests/nolibc/Makefile +++ b/tools/testing/selftests/nolibc/Makefile @@ -203,7 +203,7 @@ mrproper: $(Q)$(MAKE_KERNEL) mrproper defconfig: - $(Q)$(MAKE_KERNEL) mrproper $(DEFCONFIG) prepare + $(Q)$(MAKE_KERNEL) $(DEFCONFIG) prepare menuconfig: $(Q)$(MAKE_KERNEL) menuconfig