From: Willy Tarreau <w@1wt.eu>
To: "Paul E. McKenney" <paulmck@kernel.org>
Cc: linux@weissschuh.net, linux-kernel@vger.kernel.org,
Willy Tarreau <w@1wt.eu>
Subject: [PATCH 0/4] tools/nolibc: add testcases for vfprintf
Date: Sun, 2 Apr 2023 20:48:02 +0200 [thread overview]
Message-ID: <20230402184806.12440-1-w@1wt.eu> (raw)
Hello Paul,
Thomas added new tests for vfprintf(), which is a good idea because it
was a new implementation, we use it a lot in the tests so we'd rather
make sure it works! This required to implement support for memfd_create()
that is used to collect the output into a buffer, as well as to complete
a little bit the minimalistic FILE emulation with fileno(), fdopen(),
fflush() and fclose(). The result is neat and works equally on glibc and
nolibc. We just had to cheat on the pointer test because for NULL nolibc
prints "0x0" while glibc prints "(nil)" so we check 0x1 instead to avoid
this special case.
Finally Thomas added a new target to the makefile to ease building the
test against the default libc. This should help detect incompatibilities
when new features are added.
I've tested it locally with my libc and against all supported architectures
(userland tests only), and all tests passed.
This can be added to your dev tree for 6.5 on top of the previous series.
Thanks!
Willy
Thomas Weißschuh (4):
tools/nolibc: add libc-test binary
tools/nolibc: add wrapper for memfd_create
tools/nolibc: implement fd-based FILE streams
tools/nolibc: add testcases for vfprintf
tools/include/nolibc/stdio.h | 95 ++++++++++++++------
tools/include/nolibc/sys.h | 23 +++++
tools/testing/selftests/nolibc/.gitignore | 1 +
tools/testing/selftests/nolibc/Makefile | 6 ++
tools/testing/selftests/nolibc/nolibc-test.c | 86 ++++++++++++++++++
5 files changed, 184 insertions(+), 27 deletions(-)
--
2.17.5
next reply other threads:[~2023-04-02 18:48 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-02 18:48 Willy Tarreau [this message]
2023-04-02 18:48 ` [PATCH 1/4] tools/nolibc: add libc-test binary Willy Tarreau
2023-04-02 18:48 ` [PATCH 2/4] tools/nolibc: add wrapper for memfd_create Willy Tarreau
2023-04-02 18:48 ` [PATCH 3/4] tools/nolibc: implement fd-based FILE streams Willy Tarreau
2023-04-02 18:48 ` [PATCH 4/4] tools/nolibc: add testcases for vfprintf Willy Tarreau
2023-04-02 21:24 ` [PATCH 0/4] " Paul E. McKenney
2023-04-04 20:40 ` Paul E. McKenney
2023-04-04 20:46 ` Willy Tarreau
2023-04-04 20:48 ` Paul E. McKenney
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=20230402184806.12440-1-w@1wt.eu \
--to=w@1wt.eu \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@weissschuh.net \
--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