linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Zhangjin Wu <falcon@tinylab.org>
To: thomas@t-8ch.de, w@1wt.eu
Cc: falcon@tinylab.org, arnd@arndb.de, linux-kernel@vger.kernel.org,
	linux-kselftest@vger.kernel.org
Subject: [PATCH v1 00/22] selftests/nolibc: add minimal kernel config support
Date: Mon, 26 Jun 2023 00:10:46 +0800	[thread overview]
Message-ID: <cover.1687706332.git.falcon@tinylab.org> (raw)

Willy, Thomas

We just sent the 'selftests/nolibc: allow run with minimal kernel
config' series [1], Here is the 'minimal' kernel config support, with
both of them, it is possible to run nolibc-test for all architectures
with oneline command and in less than ~30 minutes - 1 hour (not fullly
measured yet):

    // run with tiny config + qemu-system
    // Note: rv32 and loongarch require to download the bios at first
    $ time make run-tiny-all QUIET_RUN=1

    // run with default config + qemu-system
    $ time make run-default-all QUIET_RUN=1

    // run with qemu-user
    $ time make run-user-all QUIET_RUN=1

Besides the 'tinyconfig' suggestion from Thomas, this patch also merge
the generic part of my local powerpc porting (the extconfig to add
additional console support).

This is applied after the test report patchset [2] and the rv32 compile
patchset [3], because all of them touched the same Makefile.

Even without the 'selftests/nolibc: allow run with minimal kernel
config' series [1], all of the tests can pass except the /proc/self/net
related ones (We haven't enable CONFIG_NET in this patchset), the
chmod_net one will be removed by Thomas from this patchset [4] for the
wrong chmodable attribute issue of /proc/self/net, the link_cross one
can be simply fixed up by using another /proc/self interface (like
/proc/self/cmdline), which will be covered in our revision of the [1]
series.

Beside the core 'minimal' config support, some generic patch are added
together to avoid patch conflicts.

* selftests/nolibc: add test for -include /path/to/nolibc.h

  Add a test switch to allow run nolibc-test with nolibc.h

* selftests/nolibc: print result to the screen too

  Let the run targets print results by default, allow disable by
  QUIET_RUN=1

* selftests/nolibc: allow use x86_64 toolchain for i386

  Allow use x86_64 toolchains for i386

* selftests/nolibc: add menuconfig target for manual config

  a new 'menuconfig' target added for development and debugging

* selftests/nolibc: add tinyconfig target

  a new 'tinyconfig' compare to 'defconfig', smaller and faster, but not
  enough for boot and print, require following 'extconfig' target

* selftests/nolibc: allow customize extra kernel config options

  a new 'extconfig' allows to add extra config options for 'defconfig'
  and 'tinyconfig'

* selftests/nolibc: add common extra config options
  selftests/nolibc: add power reset control support
  selftests/nolibc: add procfs, shmem and tmpfs

  Add common extra configs, the 3rd one (procfs, shmem and tmpfs) can be
  completely reverted after [1] series, but as discuss with Thomas,
  procfs may be still a hard requirement.

* selftests/nolibc: add extra configs for i386
  selftests/nolibc: add extra configs for x86_64
  selftests/nolibc: add extra configs for arm64
  selftests/nolibc: add extra configs for arm
  selftests/nolibc: add extra configs for mips
  selftests/nolibc: add extra configs for riscv32
  selftests/nolibc: add extra configs for riscv64
  selftests/nolibc: add extra configs for s390x
  selftests/nolibc: add extra configs for loongarch

  Add architecture specific extra configs to let kernel boot and
  nolibc-test print. The rv32 added here is only for test, it should not
  be merged before the missing 64bit syscalls are added (still wait for
  the merging of the __sysret and -ENOSYS patches).

* selftests/nolibc: config default CROSS_COMPILE
  selftests/nolibc: add run-tiny and run-default

  both run-tiny and run-default are added to do config and run together,
  this easier test a log.

* selftests/nolibc: allow run tests on all targets
  selftests/nolibc: detect bios existing to avoid hang

  Further allow do run-user, run-tiny and run-default for all
  architectures at once, the -all suffix is added to do so.

Since some generic patches are still in review, before sending the left
rv32 patches, I'm will send more generic patches later, the coming one
is arch-xxx.h cleanup, and then, the 32bit powerpc porting support.

For the compile speedup, the next step may be add architecture specific
'O' support, which may allow us rerun across architectures without
mrproper, for a single architecture development, this 'minimal' config
should be enough ;-)

Thanks.

Best regards,
Zhangjin
---
[1]: https://lore.kernel.org/lkml/cover.1687344643.git.falcon@tinylab.org/
[2]: https://lore.kernel.org/lkml/cover.1687156559.git.falcon@tinylab.org/
[3]: https://lore.kernel.org/linux-riscv/cover.1687176996.git.falcon@tinylab.org/
[4]: https://lore.kernel.org/lkml/20230624-proc-net-setattr-v1-0-73176812adee@weissschuh.net/

Zhangjin Wu (22):
  selftests/nolibc: add test for -include /path/to/nolibc.h
  selftests/nolibc: print result to the screen too
  selftests/nolibc: allow use x86_64 toolchain for i386
  selftests/nolibc: add menuconfig target for manual config
  selftests/nolibc: add tinyconfig target
  selftests/nolibc: allow customize extra kernel config options
  selftests/nolibc: add common extra config options
  selftests/nolibc: add power reset control support
  selftests/nolibc: add procfs, shmem and tmpfs
  selftests/nolibc: add extra configs for i386
  selftests/nolibc: add extra configs for x86_64
  selftests/nolibc: add extra configs for arm64
  selftests/nolibc: add extra configs for arm
  selftests/nolibc: add extra configs for mips
  selftests/nolibc: add extra configs for riscv32
  selftests/nolibc: add extra configs for riscv64
  selftests/nolibc: add extra configs for s390x
  selftests/nolibc: add extra configs for loongarch
  selftests/nolibc: config default CROSS_COMPILE
  selftests/nolibc: add run-tiny and run-default
  selftests/nolibc: allow run tests on all targets
  selftests/nolibc: detect bios existing to avoid hang

 tools/testing/selftests/nolibc/Makefile | 125 ++++++++++++++++++++++--
 1 file changed, 119 insertions(+), 6 deletions(-)

-- 
2.25.1


             reply	other threads:[~2023-06-25 16:11 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-25 16:10 Zhangjin Wu [this message]
2023-06-25 16:12 ` [PATCH v1 01/22] selftests/nolibc: add test for -include /path/to/nolibc.h Zhangjin Wu
2023-06-25 16:13 ` [PATCH v1 02/22] selftests/nolibc: print result to the screen too Zhangjin Wu
2023-06-25 16:14 ` [PATCH v1 03/22] selftests/nolibc: allow use x86_64 toolchain for i386 Zhangjin Wu
2023-06-25 16:15 ` [PATCH v1 04/22] selftests/nolibc: add menuconfig target for manual config Zhangjin Wu
2023-06-25 16:19 ` [PATCH v1 05/22] selftests/nolibc: add tinyconfig target Zhangjin Wu
2023-06-25 16:21 ` [PATCH v1 06/22] selftests/nolibc: allow customize extra kernel config options Zhangjin Wu
2023-06-25 16:22 ` [PATCH v1 07/22] selftests/nolibc: add common extra " Zhangjin Wu
2023-06-25 16:23 ` [PATCH v1 08/22] selftests/nolibc: add power reset control support Zhangjin Wu
2023-06-25 16:25 ` [PATCH v1 09/22] selftests/nolibc: add procfs, shmem and tmpfs Zhangjin Wu
2023-06-25 16:26 ` [PATCH v1 10/22] selftests/nolibc: add extra configs for i386 Zhangjin Wu
2023-06-25 16:28 ` [PATCH v1 11/22] selftests/nolibc: add extra configs for x86_64 Zhangjin Wu
2023-06-25 16:30 ` [PATCH v1 12/22] selftests/nolibc: add extra configs for arm64 Zhangjin Wu
2023-06-25 16:31 ` [PATCH v1 13/22] selftests/nolibc: add extra configs for arm Zhangjin Wu
2023-06-25 16:32 ` [PATCH v1 14/22] selftests/nolibc: add extra configs for mips Zhangjin Wu
2023-06-25 16:34 ` [PATCH v1 15/22] selftests/nolibc: add extra configs for riscv32 Zhangjin Wu
2023-06-25 16:35 ` [PATCH v1 16/22] selftests/nolibc: add extra configs for riscv64 Zhangjin Wu
2023-06-25 16:36 ` [PATCH v1 17/22] selftests/nolibc: add extra configs for s390x Zhangjin Wu
2023-06-25 16:38 ` [PATCH v1 18/22] selftests/nolibc: add extra configs for loongarch Zhangjin Wu
2023-06-25 16:39 ` [PATCH v1 19/22] selftests/nolibc: config default CROSS_COMPILE Zhangjin Wu
2023-06-25 16:41 ` [PATCH v1 20/22] selftests/nolibc: add run-tiny and run-default Zhangjin Wu
2023-06-25 16:43 ` [PATCH v1 21/22] selftests/nolibc: allow run tests on all targets Zhangjin Wu
2023-06-25 16:45 ` [PATCH v1 22/22] selftests/nolibc: detect bios existing to avoid hang Zhangjin Wu
2023-07-11  3:55 ` [PATCH v1 00/22] selftests/nolibc: add minimal kernel config support Zhangjin Wu
2023-07-11  7:08   ` Willy Tarreau
2023-07-11 17:18     ` Zhangjin Wu
2023-07-11 19:36       ` Willy Tarreau
2023-07-18 13:43         ` Zhangjin Wu
2023-07-18 15:19           ` Thomas Weißschuh
2023-07-18 15:59             ` Willy Tarreau
2023-07-18 17:01             ` 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=cover.1687706332.git.falcon@tinylab.org \
    --to=falcon@tinylab.org \
    --cc=arnd@arndb.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=thomas@t-8ch.de \
    --cc=w@1wt.eu \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).