From: Willy Tarreau <w@1wt.eu>
To: paulmck@kernel.org
Cc: chenhuacai@loongson.cn, chenfeiyang@loongson.cn,
linux-kernel@vger.kernel.org, Willy Tarreau <w@1wt.eu>
Subject: [PATCH 0/5] tools/nolibc: cleanups, statx(), getuid()
Date: Sat, 4 Mar 2023 15:28:39 +0100 [thread overview]
Message-ID: <20230304142844.6522-1-w@1wt.eu> (raw)
Hello Paul,
this is the second series of updates for nolibc. The work was
started by Feiyang Chen who got rid of some local definitions in
favor of inclusion of linux/fcntl.h. Consecutive to this I noticed
new issues related to redefinitions of S_IFDIR and friends and
figured that it can happen with some compilers that /usr/include is
inconditionally checked and causes annoyance around these flags that
are defined both in glibc and the kernel. The UAPI includes already
have a specific check for this, so the issue was fixed by always
including linux/stat.h in types.h and conditionally defining our own
flags like UAPI does.
Feiyang also added statx() because loongarch needs it for stat().
Finally I added getuid() and geteuid() so that we can finally skip
the two tests that require privileges in "run-user" native tests. Now
they appear as "SKIPPED" in the output, and the test is reported as
successful since there's no error anymore. I was finding it really
annoying to always have to carefully check errors that were expected
on success, now that's just bad old memories.
This series applies on top of Vincent's stdint series that was rebased
on top of your dev.2023.02.22a branch. Likewise, if it could make it
for 2.4 that would be great, especially since the next loongarch series
depends on it.
Thanks!
Willy
Feiyang Chen (2):
tools/nolibc: Include linux/fcntl.h and remove duplicate code
tools/nolibc: Add statx() and make stat() rely on statx() if necessary
Willy Tarreau (3):
tools/nolibc: add getuid() and geteuid()
selftests/nolibc: skip the chroot_root and link_dir tests when not
privileged
tools/nolibc: check for S_I* macros before defining them
tools/include/nolibc/sys.h | 100 ++++++++++++++++++-
tools/include/nolibc/types.h | 28 ++++--
tools/testing/selftests/nolibc/nolibc-test.c | 8 +-
3 files changed, 127 insertions(+), 9 deletions(-)
--
2.17.5
next reply other threads:[~2023-03-04 14:29 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-04 14:28 Willy Tarreau [this message]
2023-03-04 14:28 ` [PATCH 1/5] tools/nolibc: add getuid() and geteuid() Willy Tarreau
2023-03-04 14:28 ` [PATCH 2/5] selftests/nolibc: skip the chroot_root and link_dir tests when not privileged Willy Tarreau
2023-03-04 14:28 ` [PATCH 3/5] tools/nolibc: check for S_I* macros before defining them Willy Tarreau
2023-03-04 14:28 ` [PATCH 4/5] tools/nolibc: Include linux/fcntl.h and remove duplicate code Willy Tarreau
2023-03-04 14:28 ` [PATCH 5/5] tools/nolibc: Add statx() and make stat() rely on statx() if necessary Willy Tarreau
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=20230304142844.6522-1-w@1wt.eu \
--to=w@1wt.eu \
--cc=chenfeiyang@loongson.cn \
--cc=chenhuacai@loongson.cn \
--cc=linux-kernel@vger.kernel.org \
--cc=paulmck@kernel.org \
/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
all inboxes | Powered by JetHome®