All of lore.kernel.org
 help / color / mirror / Atom feed
From: Willy Tarreau <w@1wt.eu>
To: Zhangjin Wu <falcon@tinylab.org>
Cc: thomas@t-8ch.de, arnd@arndb.de, linux-kernel@vger.kernel.org,
	linux-kselftest@vger.kernel.org
Subject: Re: [PATCH v2 07/14] selftests/nolibc: defconfig: remove mrproper target
Date: Sat, 22 Jul 2023 14:46:03 +0200	[thread overview]
Message-ID: <20230722124603.GI17311@1wt.eu> (raw)
In-Reply-To: <ba8ce60152aa03c73f9b33960d3be8af0e377a49.1689759351.git.falcon@tinylab.org>

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

  reply	other threads:[~2023-07-22 12:46 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-19 13:16 [PATCH v2 00/14] selftests/nolibc: add minimal kernel config support - part1 Zhangjin Wu
2023-07-19 13:17 ` [PATCH v2 01/14] selftests/nolibc: allow report with existing test log Zhangjin Wu
2023-07-19 13:19 ` [PATCH v2 02/14] selftests/nolibc: add macros to enhance maintainability Zhangjin Wu
2023-07-22 12:20   ` Willy Tarreau
2023-07-25 12:37     ` Zhangjin Wu
2023-07-19 13:20 ` [PATCH v2 03/14] selftests/nolibc: print running log to screen Zhangjin Wu
2023-07-22 12:29   ` Willy Tarreau
2023-07-25 12:46     ` Zhangjin Wu
2023-07-19 13:21 ` [PATCH v2 04/14] selftests/nolibc: fix up O= option support Zhangjin Wu
2023-07-19 13:22 ` [PATCH v2 05/14] selftests/nolibc: add menuconfig for development Zhangjin Wu
2023-07-22 12:35   ` Willy Tarreau
2023-07-25 13:51     ` Zhangjin Wu
2023-07-27 13:24       ` Zhangjin Wu
2023-07-29  8:22         ` Willy Tarreau
2023-07-29 13:54           ` Zhangjin Wu
2023-07-19 13:23 ` [PATCH v2 06/14] selftests/nolibc: add mrproper " Zhangjin Wu
2023-07-22 12:36   ` Willy Tarreau
2023-07-19 13:24 ` [PATCH v2 07/14] selftests/nolibc: defconfig: remove mrproper target Zhangjin Wu
2023-07-22 12:46   ` Willy Tarreau [this message]
2023-07-25 14:04     ` Zhangjin Wu
2023-07-19 13:26 ` [PATCH v2 08/14] selftests/nolibc: string the core targets Zhangjin Wu
2023-07-22 12:57   ` Willy Tarreau
2023-07-25 14:20     ` Zhangjin Wu
2023-07-29  7:53       ` Willy Tarreau
2023-07-29  9:54         ` Zhangjin Wu
2023-07-29 17:15           ` Willy Tarreau
2023-07-29 17:44             ` Zhangjin Wu
2023-07-19 13:27 ` [PATCH v2 09/14] selftests/nolibc: allow quit qemu-system when poweroff fails Zhangjin Wu
2023-07-22 13:02   ` Willy Tarreau
2023-07-25 14:59     ` Zhangjin Wu
2023-07-29  8:04       ` Willy Tarreau
2023-07-19 13:28 ` [PATCH v2 10/14] selftests/nolibc: allow customize CROSS_COMPILE by architecture Zhangjin Wu
2023-07-19 13:29 ` [PATCH v2 11/14] selftests/nolibc: customize CROSS_COMPILE for 32/64-bit powerpc Zhangjin Wu
2023-07-19 13:30 ` [PATCH v2 12/14] selftests/nolibc: add tinyconfig target Zhangjin Wu
2023-07-22 13:07   ` Willy Tarreau
2023-07-25 15:13     ` Zhangjin Wu
2023-07-19 13:31 ` [PATCH v2 13/14] selftests/nolibc: tinyconfig: add extra common options Zhangjin Wu
2023-07-19 13:32 ` [PATCH v2 14/14] selftests/nolibc: tinyconfig: add support for 32/64-bit powerpc Zhangjin Wu
2023-07-22 13:17   ` Willy Tarreau
2023-07-25 16:04     ` Zhangjin Wu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230722124603.GI17311@1wt.eu \
    --to=w@1wt.eu \
    --cc=arnd@arndb.de \
    --cc=falcon@tinylab.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=thomas@t-8ch.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.