[PATCH 00/15] tools/nolibc: various new functions

Thomas Weißschuh posted 15 patches 7 months, 4 weeks ago
There is a newer version of this series
tools/include/nolibc/Makefile                |   4 +
tools/include/nolibc/math.h                  |  31 ++++
tools/include/nolibc/nolibc.h                |   4 +
tools/include/nolibc/sched.h                 |  50 ++++++
tools/include/nolibc/stdio.h                 |  34 ++++
tools/include/nolibc/stdlib.h                |  18 ++
tools/include/nolibc/string.h                |  20 +++
tools/include/nolibc/sys/mman.h              |  19 ++
tools/include/nolibc/sys/random.h            |  32 ++++
tools/include/nolibc/sys/stat.h              |  25 ++-
tools/include/nolibc/sys/time.h              |  15 +-
tools/include/nolibc/sys/timerfd.h           |  87 +++++++++
tools/include/nolibc/sys/wait.h              |  12 +-
tools/include/nolibc/time.h                  | 185 +++++++++++++++++++
tools/include/nolibc/types.h                 |   3 +
tools/include/nolibc/unistd.h                |  28 +++
tools/testing/selftests/nolibc/Makefile      |   2 +
tools/testing/selftests/nolibc/nolibc-test.c | 254 ++++++++++++++++++++++++++-
18 files changed, 811 insertions(+), 12 deletions(-)
[PATCH 00/15] tools/nolibc: various new functions
Posted by Thomas Weißschuh 7 months, 4 weeks ago
A few functions used by different selftests.
Adding them now avoids later conflicts between different selftest serieses.

Also add full support for nolibc-test.c on riscv32.
All unsupported syscalls have been replaced.

Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
---
Thomas Weißschuh (15):
      tools/nolibc: add strstr()
      tools/nolibc: add %m printf format
      tools/nolibc: add more stat() variants
      tools/nolibc: add mremap()
      tools/nolibc: add getrandom()
      tools/nolibc: add abs() and friends
      tools/nolibc: add support for access() and faccessat()
      tools/nolibc: add clock_getres(), clock_gettime() and clock_settime()
      tools/nolibc: add timer functions
      tools/nolibc: add timerfd functionality
      tools/nolibc: add difftime()
      tools/nolibc: add namespace functionality
      tools/nolibc: add fopen()
      tools/nolibc: implement fall back to sys_clock_gettime() in gettimeofday()
      tools/nolibc: implement wait() in terms of waitpid()

 tools/include/nolibc/Makefile                |   4 +
 tools/include/nolibc/math.h                  |  31 ++++
 tools/include/nolibc/nolibc.h                |   4 +
 tools/include/nolibc/sched.h                 |  50 ++++++
 tools/include/nolibc/stdio.h                 |  34 ++++
 tools/include/nolibc/stdlib.h                |  18 ++
 tools/include/nolibc/string.h                |  20 +++
 tools/include/nolibc/sys/mman.h              |  19 ++
 tools/include/nolibc/sys/random.h            |  32 ++++
 tools/include/nolibc/sys/stat.h              |  25 ++-
 tools/include/nolibc/sys/time.h              |  15 +-
 tools/include/nolibc/sys/timerfd.h           |  87 +++++++++
 tools/include/nolibc/sys/wait.h              |  12 +-
 tools/include/nolibc/time.h                  | 185 +++++++++++++++++++
 tools/include/nolibc/types.h                 |   3 +
 tools/include/nolibc/unistd.h                |  28 +++
 tools/testing/selftests/nolibc/Makefile      |   2 +
 tools/testing/selftests/nolibc/nolibc-test.c | 254 ++++++++++++++++++++++++++-
 18 files changed, 811 insertions(+), 12 deletions(-)
---
base-commit: e90ce42e81381665dbcedc5fa12e74759ee89639
change-id: 20250415-nolibc-misc-f2548ccc5ce1

Best regards,
-- 
Thomas Weißschuh <thomas.weissschuh@linutronix.de>

Re: [PATCH 00/15] tools/nolibc: various new functions
Posted by Willy Tarreau 7 months, 3 weeks ago
Hi Thomas,

On Wed, Apr 23, 2025 at 05:01:30PM +0200, Thomas Weißschuh wrote:
> A few functions used by different selftests.
> Adding them now avoids later conflicts between different selftest serieses.
> 
> Also add full support for nolibc-test.c on riscv32.
> All unsupported syscalls have been replaced.

As usual, the series looks overall good to me (and I expect it to be
quite useful). I sent a few reminders about not forgetting to include
"nolibc.h" from the other series into the newly added files, though I
guess you have these in mind anyway.

Regardless of the small comments, you can take my ack for the whole
series: Acked-by: Willy Tarreau <w@1wt.eu>

Thanks!
Willy