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 v2 00/15] allow run with minimal kernel config
Date: Fri, 30 Jun 2023 07:22:39 +0800	[thread overview]
Message-ID: <cover.1688078604.git.falcon@tinylab.org> (raw)

Willy, Thomas

This is v2 to allow run with minimal kernel config, see v1 [1].

It mainly applied the suggestions from Thomas. It is based on our
previous v5 sysret helper series [2] and Thomas' chmod_net removal
patchset [3].

Now, a test report on arm/vexpress-a9 without procfs, shmem, tmpfs, net
and memfd_create looks like:

    LOG: testing report for arm/vexpress-a9:

    14 chmod_net                                                    [SKIPPED]
    15 chmod_self                                                   [SKIPPED]
    17 chown_self                                                   [SKIPPED]
    41 link_cross                                                   [SKIPPED]
    0 -fstackprotector not supported                                [SKIPPED]

    139 test(s) passed, 5 skipped, 0 failed.
    See all results in /labs/linux-lab/logging/nolibc/arm-vexpress-a9-nolibc-test.log

    LOG: testing summary:

         arch/board | result
        ------------|------------
    arm/vexpress-a9 | 139 test(s) passed, 5 skipped, 0 failed. See all results in /labs/linux-lab/logging/nolibc/arm-vexpress-a9-nolibc-test.log

Changes from v1 --> v2:

* selftests/nolibc: stat_fault: silence NULL argument warning with glibc
  selftests/nolibc: gettid: restore for glibc and musl
  selftests/nolibc: add _LARGEFILE64_SOURCE for musl
  selftests/nolibc: add a new rmdir() test case
  selftests/nolibc: fix up failures when CONFIG_PROC_FS=n

    The same as v1, only a few of commit message changes.

* selftests/nolibc: fix up int_fast16/32_t test cases for musl

    Applied the method suggested by Thomas, two new macros are added to
    get SINT_MAX_OF_TYPE(type) and SINT_MIN_OF_TYPE(type).

* selftests/nolibc: fix up kernel parameters support

    After discuss with Thomas and with more tests, both of argv[1] and
    NOLIBC_TEST environment variable should be verified to support
    such kernel parameters:

      NOLIBC_TEST=syscall
      noapic NOLIBC_TEST=syscall
      noapic

* selftests/nolibc: stat_timestamps: remove procfs dependency

    Add '/init' and '/' for !procfs, don't skip it.

* selftests/nolibc: link_cross: use /proc/self/cmdline

    Use /proc/self/cmdline instead of /proc/self/net, the ramfs based
    /tmp/file doesn't work as expected (not really crossdev).

* tools/nolibc: add rmdir() support

    Now, rebased on __sysret() from sysret helper patchset [2].

* selftests/nolibc: prepare /tmp for tmpfs or ramfs

    Removed the hugetlbfs prepare part, not really required.

    Don't remove /tmp and reserve it to use ramfs as tmpfs.

* selftests/nolibc: add common get_tmpfile()
  selftests/nolibc: rename chroot_exe to chroot_tmpfile

    Some cleanups.

* selftests/nolibc: add chmod_tmpfile test

    To avoid conflict with Thomas' chmod_net removal patch [3], a new
    chmod_tmpfile is added (in v1, there is a rename patch from
    chmod_net to chmod_good)

    Still to avoid conflict, these two are removed in this series:

    - selftests/nolibc: rename proc variable to has_proc
    - selftests/nolibc: rename euid0 variable to is_root

* selftests/nolibc: vfprintf: remove MEMFD_CREATE dependency

    Many checks are removed, only reserve the direct tmpfs access
    version.

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

Zhangjin Wu (15):
  selftests/nolibc: stat_fault: silence NULL argument warning with glibc
  selftests/nolibc: gettid: restore for glibc and musl
  selftests/nolibc: add _LARGEFILE64_SOURCE for musl
  selftests/nolibc: fix up int_fast16/32_t test cases for musl
  selftests/nolibc: fix up kernel parameters support
  selftests/nolibc: stat_timestamps: remove procfs dependency
  selftests/nolibc: link_cross: use /proc/self/cmdline
  tools/nolibc: add rmdir() support
  selftests/nolibc: add a new rmdir() test case
  selftests/nolibc: fix up failures when CONFIG_PROC_FS=n
  selftests/nolibc: prepare /tmp for tmpfs or ramfs
  selftests/nolibc: add common get_tmpfile()
  selftests/nolibc: rename chroot_exe to chroot_tmpfile
  selftests/nolibc: add chmod_tmpfile test
  selftests/nolibc: vfprintf: remove MEMFD_CREATE dependency

 tools/include/nolibc/sys.h                   |  22 ++++
 tools/testing/selftests/nolibc/nolibc-test.c | 102 +++++++++++++++----
 2 files changed, 106 insertions(+), 18 deletions(-)

-- 
2.25.1


             reply	other threads:[~2023-06-29 23:23 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-29 23:22 Zhangjin Wu [this message]
2023-06-29 23:23 ` [PATCH v2 01/15] selftests/nolibc: stat_fault: silence NULL argument warning with glibc Zhangjin Wu
2023-06-29 23:25 ` [PATCH v2 02/15] selftests/nolibc: gettid: restore for glibc and musl Zhangjin Wu
2023-06-29 23:26 ` [PATCH v2 03/15] selftests/nolibc: add _LARGEFILE64_SOURCE for musl Zhangjin Wu
2023-06-29 23:28 ` [PATCH v2 04/15] selftests/nolibc: fix up int_fast16/32_t test cases " Zhangjin Wu
2023-06-29 23:29 ` [PATCH v2 05/15] selftests/nolibc: fix up kernel parameters support Zhangjin Wu
2023-06-29 23:31 ` [PATCH v2 06/15] selftests/nolibc: stat_timestamps: remove procfs dependency Zhangjin Wu
2023-06-29 23:37 ` [PATCH v2 07/15] selftests/nolibc: link_cross: use /proc/self/cmdline Zhangjin Wu
2023-06-29 23:45 ` [PATCH v2 08/15] tools/nolibc: add rmdir() support Zhangjin Wu
2023-06-29 23:48 ` [PATCH v2 09/15] selftests/nolibc: add a new rmdir() test case Zhangjin Wu
2023-06-29 23:49 ` [PATCH v2 10/15] selftests/nolibc: fix up failures when CONFIG_PROC_FS=n Zhangjin Wu
2023-06-29 23:52 ` [PATCH v2 11/15] selftests/nolibc: prepare /tmp for tmpfs or ramfs Zhangjin Wu
2023-06-30  8:32   ` Thomas Weißschuh
2023-06-30 10:18     ` Zhangjin Wu
2023-06-29 23:54 ` [PATCH v2 12/15] selftests/nolibc: add common get_tmpfile() Zhangjin Wu
2023-06-30  0:00 ` [PATCH v2 13/15] selftests/nolibc: rename chroot_exe to chroot_tmpfile Zhangjin Wu
2023-06-30  8:45   ` Thomas Weißschuh
2023-06-30 11:14     ` Zhangjin Wu
2023-06-30  0:01 ` [PATCH v2 14/15] selftests/nolibc: add chmod_tmpfile test Zhangjin Wu
2023-06-30  0:03 ` [PATCH v2 15/15] selftests/nolibc: vfprintf: remove MEMFD_CREATE dependency Zhangjin Wu
2023-06-30  8:50 ` [PATCH v2 00/15] allow run with minimal kernel config Thomas Weißschuh
2023-06-30 12: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=cover.1688078604.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).