Note: Please also Cc the patches to LKML in the future.
On 2025-08-02 10:26:34+, Berg, Benjamin wrote:
> On Fri, 2025-08-01 at 17:09 +0200, Thomas Weißschuh wrote:
> > On 2025-07-31 22:12:25+0200, Benjamin Berg wrote:
> > > From: Benjamin Berg
> > >
> > &g
Hi Benjamin,
On 2025-07-31 22:12:25+0200, Benjamin Berg wrote:
> From: Benjamin Berg
>
> Add support for sigaction() using the rt_sigaction syscall and implement
> the normal sa_mask helpers.
>
> For the uapi definitions, everything is copied into nolibc. This avoids
> issues with kernel archit
On 2025-07-14 14:52:23+0200, Benjamin Berg wrote:
> On Sun, 2025-07-13 at 17:50 +0200, Willy Tarreau wrote:
> > On Sun, Jul 13, 2025 at 05:02:27PM +0200, Thomas Weißschuh wrote:
> > > On 2025-07-11 09:25:26+0200, Benjamin Berg wrote:
> > > > On Fri, 2025-07-11 at
On 2025-07-11 09:25:26+0200, Benjamin Berg wrote:
> On Fri, 2025-07-11 at 07:40 +0200, Thomas Weißschuh wrote:
> > On 2025-07-10 12:39:50+0200, Benjamin Berg wrote:
> > > From: Benjamin Berg
> > >
> > > Add support for sigaction() and implement the normal s
On 2025-07-10 12:39:50+0200, Benjamin Berg wrote:
> From: Benjamin Berg
>
> Add support for sigaction() and implement the normal sa_mask helpers.
>
> On many architectures, linux/signal.h pulls in compatibility definitions
> for the old sigaction syscall instead of rt_sigaction. However, the
> k
On 2025-07-09 20:44:43+0200, Willy Tarreau wrote:
> Hi Thomas,
>
> On Wed, Jul 09, 2025 at 08:36:49PM +0200, Thomas Weißschuh wrote:
> > > +#define FD_CLR(fd, set) BITSET_CLR(fd, (set)->fds)
> > > +#define FD_SET(fd, set) BITSET_SET(fd, (set)->fds)
> > >
On 2025-07-10 12:39:48+0200, Benjamin Berg wrote:
> From: Benjamin Berg
>
> Add new helpers to track multiple steps as bits in an integer. Store
> each step in a bit and use the lowest bit to store whether all steps
> occurred in the correct order and only once.
>
> Use this for the constructor
On 2025-07-10 12:39:47+0200, Benjamin Berg wrote:
> From: Benjamin Berg
>
> The expect non-zero macro was incorrect and never used. Fix its
> definition.
Missing sign-off.
A Fixes would also be nice.
(...)
On 2025-07-09 17:55:12+0200, Benjamin Berg wrote:
(...)
> --- a/tools/testing/selftests/nolibc/nolibc-test.c
> +++ b/tools/testing/selftests/nolibc/nolibc-test.c
> @@ -1270,6 +1270,72 @@ int test_namespace(void)
> return ret;
> }
>
> +sig_atomic_t signal_check;
static?
> +
> +static voi
On 2025-07-09 17:55:11+0200, Benjamin Berg wrote:
> From: Benjamin Berg
>
> The FD_* macros are assuming a specific type for the bitset. Add new
> macros that introspect the type of the passed variable in order to know
> the size of the bitset. This way the same macros can be used for other
> pur
On 2025-07-09 17:55:10+0200, Benjamin Berg wrote:
> From: Benjamin Berg
>
> The logic would not catch if the test process crashes and would
> incorrectly report a "success" state. Fix this by looking for the final
> "Total number of errors:" message and printing "failure" if it was not
> seen.
N
On 2025-07-04 15:33:09+0200, Willy Tarreau wrote:
> On Fri, Jul 04, 2025 at 12:50:32PM +0200, Thomas Weißschuh wrote:
> > On 2025-07-02 17:33:24+0200, Benjamin Berg wrote:
> > > On Wed, 2025-07-02 at 00:04 +0200, Thomas Weißschuh wrote:
> > > > [SNIP]
> > > &
On 2025-07-02 17:33:24+0200, Benjamin Berg wrote:
> On Wed, 2025-07-02 at 00:04 +0200, Thomas Weißschuh wrote:
> > [SNIP]
> > > --- a/tools/include/nolibc/arch-i386.h
> > > +++ b/tools/include/nolibc/arch-i386.h
> > > @@ -10,6 +10,19 @@
> > >
Hi Benjamin,
Thanks for your patch!
On 2025-07-01 14:29:10+0200, Benjamin Berg wrote:
> From: Benjamin Berg
Please send the next revisions to the nolibc maintainers from the
MAINTAINERS file. Willy and my @weissschuh.net address.
> In preparation to add tests that use it.
Here "tests" is not
On Fri, Jun 20, 2025 at 03:28:15AM +, Wei Yang wrote:
> Each fixture could support variant. Add fixture with variant to verify
> the behavior, so we can validate for further change.
>
> Signed-off-by: Wei Yang
> Cc: Muhammad Usama Anjum
Reviewed-by: Thomas Weißsch
On Tue, Jun 17, 2025 at 11:57:48PM +, Wei Yang wrote:
> On Tue, Jun 17, 2025 at 09:35:12AM +0200, Thomas Weißschuh wrote:
> >> +FIXTURE_SETUP(fixture_variant) {
> >> + TH_LOG("setup %d", variant->value);
> >> + self->testpid = g
Good idea.
On Mon, Jun 16, 2025 at 12:23:38PM +, Wei Yang wrote:
> Each fixture could support variant. Add fixture with variant to verify
> the behavior, so we can validate for further change.
>
> Signed-off-by: Wei Yang
> ---
> .../kselftest_harness/harness-selftest.c | 34 +++
f-by: Wei Yang
With the above comments addressed:
Reviewed-by: Thomas Weißschuh
> ---
> tools/testing/selftests/kselftest_harness.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/testing/selftests/kselftest_harness.h
> b/tools/testing/selftes
On 2025-06-10 18:21:27+0100, Mark Brown wrote:
> On Tue, Jun 10, 2025 at 07:05:59PM +0200, Thomas Weißschuh wrote:
> > On 2025-06-09 17:42:47+0100, Mark Brown wrote:
>
> > > KUnit deals with this by doing it's kernel build in a .kunit directory,
> > > it'd
Hi Mark,
On 2025-06-09 17:42:47+0100, Mark Brown wrote:
> While running the nolibc tests I discovered that they build a kernel in
> the current directory, including overwriting the existing .config. This
> is rather suprising for the selftests build system - it usually wouldn't
> do a kernel buil
Add basic support to run various MIPS variants via kunit_tool using the
virtualized malta platform.
Signed-off-by: Thomas Weißschuh
---
tools/testing/kunit/qemu_configs/mips.py | 18 ++
tools/testing/kunit/qemu_configs/mips64.py | 19 +++
tools/testing
Add more of the printf() functions.
Signed-off-by: Thomas Weißschuh
---
tools/include/nolibc/stdio.h | 55
1 file changed, 55 insertions(+)
diff --git a/tools/include/nolibc/stdio.h b/tools/include/nolibc/stdio.h
index
The target names between GCC and clang differ for s390.
While GCC uses "s390", clang uses "powerz".
This mapping is not handled by tools/scripts/Makefile.include,
so do it in the nolibc-test Makefile.
Signed-off-by: Thomas Weißschuh
---
tools/testing/selftests/nolibc/Make
As mentioned in the comment, the workaround for
__attribute__((no_stack_protector)) is only necessary on GCC.
Avoid applying the workaround on clang, as clang does not recognize
__attribute__((__optimize__)) and would fail.
Signed-off-by: Thomas Weißschuh
---
tools/include/nolibc/arch-powerpc.h
The cc-option macro from Build.include is not compatible with clang
cross builds, as it does not respect the "--target" and similar flags,
set up by Mekfile.include.
Provide a custom variant which works correctly.
Signed-off-by: Thomas Weißschuh
Reviewed-by: Shuah Khan
---
too
set up.
To avoid this incompatibility, switch the O= handling to custom logic.
Signed-off-by: Thomas Weißschuh
Reviewed-by: Shuah Khan
---
tools/testing/selftests/nolibc/Makefile | 9 ++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/tools/testing/selftests/nolibc
C for all targets,
so only use it where available.
This also provides compatibility with clang, which recognizes the
"naked" attribute but not the previously used attribute "optimized".
Signed-off-by: Thomas Weißschuh
---
tools/include/nolibc/compiler.h | 9 +++--
1 f
When nolibc-test is so broken, it doesn't even start,
don't report success.
Signed-off-by: Thomas Weißschuh
Reviewed-by: Shuah Khan
---
tools/testing/selftests/nolibc/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/nolibc/Makefil
If the user specified their own CFLAGS_EXTRA these should not be
overwritten by `-e`.
Signed-off-by: Thomas Weißschuh
Reviewed-by: Shuah Khan
---
tools/testing/selftests/nolibc/run-tests.sh | 7 +--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/tools/testing/selftests
The logic in clang to find the libgcc.a from a GCC toolchain for a
specific ABI does not work reliably and can lead to errors.
Instead disable libgcc when building with clang, as it's not needed
anyways.
Signed-off-by: Thomas Weißschuh
---
tools/testing/selftests/nolibc/Makefile
consistent, perform the setup
$(srctree) as early as possible and use it for all inclusions.
Signed-off-by: Thomas Weißschuh
Reviewed-by: Shuah Khan
---
tools/testing/selftests/nolibc/Makefile | 16
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/tools/testing/selfte
The nolibc tests can now be properly built with LLVM.
Expose this through run-tests.sh.
Signed-off-by: Thomas Weißschuh
Reviewed-by: Shuah Khan
---
tools/testing/selftests/nolibc/run-tests.sh | 9 +++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/tools/testing/selftests
laceholder.
Signed-off-by: Thomas Weißschuh
Reviewed-by: Shuah Khan
---
tools/testing/selftests/nolibc/nolibc-test.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/testing/selftests/nolibc/nolibc-test.c
b/tools/testing/selftests/nolibc/nolibc-test.c
index 09
.
For clang compatibility, the epilogue will also need to be adapted, so
move that one, too.
Signed-off-by: Thomas Weißschuh
---
tools/include/nolibc/arch-aarch64.h | 4 ++--
tools/include/nolibc/arch-arm.h | 4 ++--
tools/include/nolibc/arch-i386.h | 4 ++--
tools/include/nolibc/arch
-off-by: Thomas Weißschuh
---
tools/include/nolibc/arch-mips.h | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/tools/include/nolibc/arch-mips.h b/tools/include/nolibc/arch-mips.h
index 62cc50ef3288..a2ee77ed2fbb 100644
--- a/tools/include/nolibc/arch-mips.h
+++ b/tools
s.sh
This series extends this support.
Signed-off-by: Thomas Weißschuh
---
Changes in v2:
- Add support for all architectures
- powerpc: "selftests/nolibc: don't use libgcc when building with clang"
- mips: "tools/nolibc: mips: load current function to $t9"
- s390: &
nnull))
# endif
#endif
Introduce a new helper which makes the usage of __has_attribute() nicer
and migrate the current user to it.
Signed-off-by: Thomas Weißschuh
---
tools/include/nolibc/compiler.h | 16 +---
1 file changed, 9 insertions(+), 7 deletions(-)
diff --git a/tools/in
The clang assembler rejects the current syntax.
Switch to a syntax accepted by both GCC and clang.
Signed-off-by: Thomas Weißschuh
---
tools/include/nolibc/arch-arm.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/include/nolibc/arch-arm.h b/tools/include/nolibc
On 2024-08-03 11:45:30+, Willy Tarreau wrote:
> On Sun, Jul 28, 2024 at 12:10:03PM +0200, Thomas Weißschuh wrote:
> > Makefile.include can modify CC and CFLAGS for usage with clang.
> > Make use of it.
> >
> > Signed-off-by: Thomas Weißschuh
> > ---
&g
On 2024-08-03 11:40:24+, Willy Tarreau wrote:
> On Sun, Jul 28, 2024 at 12:10:01PM +0200, Thomas Weißschuh wrote:
> > Avoid needing relative includes.
>
> I'm not opposed, but what's the benefit ? IMHO relative paths are
> generally more flexible and robust. yo
Aug 3, 2024 20:33:11 Willy Tarreau :
> On Sat, Aug 03, 2024 at 08:28:08PM +0200, Thomas Weißschuh wrote:
>>> I think that it can resolve to roughly this:
>>>
>>> #if defined(__has_attribute) && __has_attribute(naked)
>>> # define __
Aug 3, 2024 11:34:03 Willy Tarreau :
> On Sun, Jul 28, 2024 at 12:10:00PM +0200, Thomas Weißschuh wrote:
>> Clang on higher optimization levels detects that NULL is passed to
>> printf("%s") and warns about it.
>> Avoid the warning.
>
> I don't see why
Aug 3, 2024 11:26:07 Willy Tarreau :
> On Sun, Jul 28, 2024 at 12:09:58PM +0200, Thomas Weißschuh wrote:
>> The current entrypoint attributes optimize("Os", "omit-frame-pointer")
>> are intended to avoid all compiler generated code, like function
>> por
Aug 3, 2024 11:22:23 Willy Tarreau :
> Hi Thomas,
>
> On Sun, Jul 28, 2024 at 12:09:57PM +0200, Thomas Weißschuh wrote:
>> The specific attributes for the _start entrypoint are duplicated for
>> each architecture.
>> Deduplicate it into a dedicated #define into compil
Aug 3, 2024 12:03:27 Willy Tarreau :
> On Sun, Jul 28, 2024 at 10:34:11PM +0200, Thomas Weißschuh wrote:
>> Mirror glibc behavior for compatibility.
>
> Generally speaking I think you should make a bit longer sentences in
> your commit messages, Thomas. One first reason is to
On 2024-07-31 17:01:09+, Shuah Khan wrote:
> On 7/31/24 12:32, Thomas Weißschuh wrote:
> > The implementation is limited and only supports numeric arguments.
>
> I would like to see more information in here. Why is this needed
> etc. etc.
Ack.
> >
> > S
The implementation is limited and only supports numeric arguments.
Signed-off-by: Thomas Weißschuh
---
tools/include/nolibc/stdio.h | 93
tools/testing/selftests/nolibc/nolibc-test.c | 59 ++
2 files changed, 152 insertions(+)
diff
This reverts commit 16767502aa990cca2cb7d1372b31d328c4c85b40.
Nolibc gained support for uname(2) and sscanf(3) which are the
dependencies of ksft_min_kernel_version().
So re-enable support for ksft_min_kernel_version() under nolibc.
Signed-off-by: Thomas Weißschuh
---
tools/testing/selftests
The implementation is limited and only supports numeric arguments.
Signed-off-by: Thomas Weißschuh
---
Thomas Weißschuh (2):
tools/nolibc: add support for [v]sscanf()
Revert "selftests: kselftest: Fix build failure with NOLIBC"
tools/include/nolibc/stdio.h
Mirror glibc behavior for compatibility.
Signed-off-by: Thomas Weißschuh
---
tools/include/nolibc/crt.h | 23 ---
tools/testing/selftests/nolibc/nolibc-test.c | 5 +++--
2 files changed, 15 insertions(+), 13 deletions(-)
diff --git a/tools/include/nolibc
Avoid needing relative includes.
Signed-off-by: Thomas Weißschuh
---
tools/testing/selftests/nolibc/Makefile | 16
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/tools/testing/selftests/nolibc/Makefile
b/tools/testing/selftests/nolibc/Makefile
index 46dfbb50fae5
Makefile.include can modify CC and CFLAGS for usage with clang.
Make use of it.
Signed-off-by: Thomas Weißschuh
---
tools/testing/selftests/nolibc/Makefile | 3 +++
1 file changed, 3 insertions(+)
diff --git a/tools/testing/selftests/nolibc/Makefile
b/tools/testing/selftests/nolibc/Makefile
The nolibc tests can now be properly built with LLVM.
Expose this through run-tests.sh.
Not all architectures are compatible, add a list for those.
Signed-off-by: Thomas Weißschuh
---
tools/testing/selftests/nolibc/run-tests.sh | 13 +++--
1 file changed, 11 insertions(+), 2 deletions
The cc-option macro from Build.include is not compatible with clang
cross builds, as it does not respect the "--target" and similar flags,
set up by Mekfile.include.
Provide a custom variant which works correctly.
Signed-off-by: Thomas Weißschuh
---
tools/testing/selftests/nolibc/Ma
When nolibc-test is so broken, it doesn't even start,
don't report success.
Signed-off-by: Thomas Weißschuh
---
tools/testing/selftests/nolibc/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/nolibc/Makefile
b/tools/testing/selfte
If the user specified their own CFLAGS_EXTRA these should not be
overwritten by `-e`.
Signed-off-by: Thomas Weißschuh
---
tools/testing/selftests/nolibc/run-tests.sh | 7 +--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/tools/testing/selftests/nolibc/run-tests.sh
b/tools
Clang on higher optimization levels detects that NULL is passed to
printf("%s") and warns about it.
Avoid the warning.
Signed-off-by: Thomas Weißschuh
---
tools/testing/selftests/nolibc/nolibc-test.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/testing
Makefile.
As we want to use its llvm handling in the future, reimplement its
objtree := $(O).
While at it, also move "$(objtree) ?= $(srctree)" for consistency.
Signed-off-by: Thomas Weißschuh
---
tools/testing/selftests/nolibc/Makefile | 6 +++---
1 file changed, 3 insertions(+), 3 de
The clang assembler rejects the current syntax.
Switch to a syntax accepted by both GCC and clang.
Signed-off-by: Thomas Weißschuh
---
tools/include/nolibc/arch-arm.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/include/nolibc/arch-arm.h b/tools/include/nolibc
s.sh
This series extends this support.
Signed-off-by: Thomas Weißschuh
---
Thomas Weißschuh (12):
tools/nolibc: use clang-compatible asm syntax in arch-arm.h
tools/nolibc: limit powerpc stack-protector workaround to GCC
tools/nolibc: move entrypoint specifics to compiler.h
to
C for all targets,
so only use it where available.
This also provides compatibility with clang, which recognizes the
"naked" attribute but not the previously used attribute "optimized".
Signed-off-by: Thomas Weißschuh
---
tools/include/nolibc/compiler.h | 9 +
1
, so
move that one, too.
Signed-off-by: Thomas Weißschuh
---
tools/include/nolibc/arch-aarch64.h | 4 ++--
tools/include/nolibc/arch-arm.h | 4 ++--
tools/include/nolibc/arch-i386.h | 4 ++--
tools/include/nolibc/arch-loongarch.h | 4 ++--
tools/include/nolibc/arch-mips.h | 4
As mentioned in the comment, the workaround for
__attribute__((no_stack_protector)) is only necessary on GCC.
Avoid applying the workaround on clang, as clang does not recognize
__attribute__((__optimize__)) and would fail.
Signed-off-by: Thomas Weißschuh
---
tools/include/nolibc/arch-powerpc.h
Hi Shuah,
Could you Ack the patch below to kselftest.h?
Thanks,
Thomas
On 2024-04-26 13:08:58+, Thomas Weißschuh wrote:
> nolibc gained an implementation of strerror() recently.
> Use it and drop the ifdeffery.
>
> Signed-off-by: Thomas Weißschuh
> ---
> tools
Hi Edward,
On 2024-05-10 00:06:54+, Edward Liaw wrote:
> _GNU_SOURCE is provided by lib.mk, so it should be dropped to prevent
> redefinition warnings.
The nolibc tests do not use lib.mk.
This change breaks "make libc-test", please drop it.
> Signed-off-by: Edward Liaw
> ---
> tools/testi
Hi Shuah,
On 2024-04-26 13:08:55+, Thomas Weißschuh wrote:
> Adds a simple implementation of strerror() and makes use of it in
> kselftests.
>
> Shuah, could you Ack patch 3?
Friendly ping for an Ack of patch 3 of this series.
After that I'd like to submit an updated nolib
strerror() is commonly used.
For example in kselftest which currently needs to do an #ifdef NOLIBC to
handle the lack of strerror().
Keep it simple and reuse the output format of perror() for strerror().
Signed-off-by: Thomas Weißschuh
---
tools/include/nolibc/stdio.h | 10
Adds a simple implementation of strerror() and makes use of it in
kselftests.
Shuah, could you Ack patch 3?
Willy, this should work *without* your Ack.
Signed-off-by: Thomas Weißschuh
---
Thomas Weißschuh (3):
selftests/nolibc: introduce condition to run tests only on nolibc
tools
Some tests only make sense on nolibc. To avoid gaps in the test numbers
do to inline "#ifdef NOLIBC", add a condition to formally skip these
tests.
Signed-off-by: Thomas Weißschuh
---
tools/testing/selftests/nolibc/nolibc-test.c | 32 +---
1 file changed, 19
nolibc gained an implementation of strerror() recently.
Use it and drop the ifdeffery.
Signed-off-by: Thomas Weißschuh
---
tools/testing/selftests/kselftest.h | 8
1 file changed, 8 deletions(-)
diff --git a/tools/testing/selftests/kselftest.h
b/tools/testing/selftests/kselftest.h
On 2024-04-25 18:30:39+, Willy Tarreau wrote:
> Hi again Thomas,
>
> On Thu, Apr 25, 2024 at 06:09:25PM +0200, Thomas Weißschuh wrote:
> > I wanted to implement sscanf() for ksft_min_kernel_version() and this is
> > a prerequisite for it.
> >
> > It's
They are useful for users and necessary for strtol() and friends.
Signed-off-by: Thomas Weißschuh
---
tools/include/nolibc/stdint.h | 19 +++
1 file changed, 19 insertions(+)
diff --git a/tools/include/nolibc/stdint.h b/tools/include/nolibc/stdint.h
index 6665e272e213
The implementation always works on uintmax_t values.
This is inefficient when only 32bit are needed.
However for all functions this only happens for strtol() on 32bit
platforms.
Signed-off-by: Thomas Weißschuh
---
tools/include/nolibc/stdlib.h| 109
I wanted to implement sscanf() for ksft_min_kernel_version() and this is
a prerequisite for it.
It's also useful on its own so it gets its own submission.
Signed-off-by: Thomas Weißschuh
---
Thomas Weißschuh (2):
tools/nolibc: add limits for {u,}intmax_t, ulong and {u,}llong
On musl calls to brk() and sbrk() always fail with ENOMEM.
Detect this and skip the tests on musl.
Tested on glibc 2.39 and musl 1.2.5 in addition to nolibc.
Signed-off-by: Thomas Weißschuh
---
tools/testing/selftests/nolibc/nolibc-test.c | 10 +++---
1 file changed, 7 insertions(+), 3
run-tests.sh hides the output from the compiler unless the compilation
fails. To recognize newly introduced warnings use -Werror by default.
Also add a switch to disable -Werror in case the warnings are expected.
Signed-off-by: Thomas Weißschuh
---
tools/testing/selftests/nolibc/Makefile
Hi Willy!
On 2024-04-14 12:56:46+0200, Willy Tarreau wrote:
> On Sun, Apr 14, 2024 at 09:56:23AM +0200, Thomas Weißschuh wrote:
> > All supported kernels are assumed to use struct new_utsname.
> > This is validated in test_uname().
> >
> > uname(2)
All supported kernels are assumed to use struct new_utsname.
This is validated in test_uname().
uname(2) can for example be used in ksft_min_kernel_version() from the
kernels selftest framework.
Link: https://lore.kernel.org/lkml/20240412123536.ga32...@redhat.com/
Signed-off-by: Thomas Weißschuh
On 2023-11-26 10:28:28+0100, Willy Tarreau wrote:
> Hi Thomas,
>
> > +int test_rlimit(void)
> > +{
> > + struct rlimit rlim = {
> > + .rlim_cur = 1 << 20,
> > + .rlim_max = 1 << 20,
> > + };
> > + int ret;
> > +
> > + ret = setrlimit(RLIMIT_CORE, &rlim);
> > + if (ret
The series adds support for setrlimit/getrlimit.
Mainly to avoid spurious coredumps when running the tests under
qemu-user.
Signed-off-by: Thomas Weißschuh
---
Thomas Weißschuh (3):
tools/nolibc: drop custom definition of struct rusage
tools/nolibc: add support for getrlimit
A future commit will include linux/resource.h, which will conflict with
the private definition of struct rusage in nolibc.
Avoid the conflict by dropping the private definition and use the one
from the UAPI headers.
Signed-off-by: Thomas Weißschuh
---
tools/include/nolibc/types.h | 21
The implementation uses the prlimit64 systemcall as that is available on
all architectures.
Signed-off-by: Thomas Weißschuh
---
tools/include/nolibc/sys.h | 38
tools/testing/selftests/nolibc/nolibc-test.c | 29 +
2 files
.
Link:
https://lore.kernel.org/qemu-devel/20231115-qemu-user-dumpable-v1-2-edbe7f0fb...@t-8ch.de/
Signed-off-by: Thomas Weißschuh
---
tools/testing/selftests/nolibc/nolibc-test.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/tools/testing/selftests/nolibc/nolibc-test.c
b/tools/testing
On 2023-11-16 08:48:02+0100, Willy Tarreau wrote:
> On Wed, Nov 15, 2023 at 10:08:21PM +0100, Thomas Weißschuh wrote:
> > Migrate part of nolibc-test.c to the new test harness.
> >
> > Signed-off-by: Thomas Weißschuh
> > ---
> > tools/testing/se
On 2023-11-16 08:33:27+0100, Willy Tarreau wrote:
> On Wed, Nov 15, 2023 at 10:08:20PM +0100, Thomas Weißschuh wrote:
> > Migrate part of nolibc-test.c to the new test harness.
> >
> > Signed-off-by: Thomas Weißschuh
>
> A few points, mostly questions and food for th
On 2023-11-16 08:16:22+0100, Willy Tarreau wrote:
> Hi Thomas,
>
> On Wed, Nov 15, 2023 at 10:08:19PM +0100, Thomas Weißschuh wrote:
> > The harness provides a framework to write unit tests for nolibc itself
> > and kernel selftests using nolibc.
> >
> > Ad
in its support for test suites,
the same as google test.
Signed-off-by: Thomas Weißschuh
---
tools/testing/selftests/nolibc/nolibc-harness.h | 269
1 file changed, 269 insertions(+)
diff --git a/tools/testing/selftests/nolibc/nolibc-harness.h
b/tools/testing
Migrate part of nolibc-test.c to the new test harness.
Signed-off-by: Thomas Weißschuh
---
tools/testing/selftests/nolibc/nolibc-test.c | 106 ++-
1 file changed, 56 insertions(+), 50 deletions(-)
diff --git a/tools/testing/selftests/nolibc/nolibc-test.c
b/tools
the test "mmap_munmap_good" fails.
This is a bug in qemu-user and already fixed there on master.
Signed-off-by: Thomas Weißschuh
---
Thomas Weißschuh (3):
selftests/nolibc: add custom test harness
selftests/nolibc: migrate startup tests to new harness
selftests/nolib
Migrate part of nolibc-test.c to the new test harness.
Signed-off-by: Thomas Weißschuh
---
tools/testing/selftests/nolibc/nolibc-test.c | 74 +++-
1 file changed, 28 insertions(+), 46 deletions(-)
diff --git a/tools/testing/selftests/nolibc/nolibc-test.c
b/tools
Nov 9, 2023 17:28:45 Konstantin Ryabitsev :
> On Wed, Sep 15, 2077 at 02:13:51AM +0200, Thomas Weißschuh wrote:
>
>
> I'm curious how this happened, especially since this was sent with b4.
My system time was messed up.
I blame systemd-timesyncd.
ation.
Signed-off-by: Thomas Weißschuh
---
Changes in v2:
- Preserver 8-byte alignment of stack pointer
- Link to v1:
https://lore.kernel.org/r/20231108-nolibc-pic-v1-1-9b7a429d5...@weissschuh.net
---
tools/include/nolibc/arch-mips.h| 7 ++-
tools/testing/selftests/nolibc/Makefile | 2
ation.
Signed-off-by: Thomas Weißschuh
---
tools/include/nolibc/arch-mips.h| 7 ++-
tools/testing/selftests/nolibc/Makefile | 2 +-
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/tools/include/nolibc/arch-mips.h b/tools/include/nolibc/arch-mips.h
index 3a2c76716b83..e9a0184
On 2023-11-05 15:27:00+0100, Willy Tarreau wrote:
> On Sun, Nov 05, 2023 at 03:22:30PM +0100, Thomas Weißschuh wrote:
> > Center-align all possible status reports.
> > Before OK and FAIL were center-aligned in relation to each other but
> > SKIPPED and FAILED would be left-ali
[OK]
Signed-off-by: Thomas Weißschuh
---
tools/testing/selftests/nolibc/nolibc-test.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/testing/selftests/nolibc/nolibc-test.c
b/tools/testing/selftests/nolibc/nolibc-test.c
index 2f10541e6f38..e17
Allow testing MIPS O32 big endian.
Signed-off-by: Thomas Weißschuh
Acked-by: Willy Tarreau
---
tools/testing/selftests/nolibc/Makefile | 7 +++
tools/testing/selftests/nolibc/run-tests.sh | 2 +-
2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/tools/testing/selftests
MIPS has many different configurations prepare the support of additional
ones by moving the build of MIPS to the generic XARCH infrastructure.
Signed-off-by: Thomas Weißschuh
Acked-by: Willy Tarreau
---
tools/testing/selftests/nolibc/Makefile | 12 +++-
tools/testing/selftests
When an architecture is unsupported arch.h would silently continue.
This leads to a lot of followup errors because my_syscallX() is not
defined and the startup code is missing.
Avoid these confusing errors and fail the build early with a clear
error message and location.
Signed-off-by: Thomas
Two bugfixes and some minor refactorings of the MIPS support.
Signed-off-by: Thomas Weißschuh
---
Changes in v2:
- Use olddefconfig instead of oldconfig
- mipso32{le,be} -> mips32{le,be}
- Link to v1:
https://lore.kernel.org/r/20231105-nolibc-mips-be-v1-0-6c2ad3e50...@weissschuh.net
---
Tho
More ABIs exist, for better clarity specify it explicitly everywhere.
Signed-off-by: Thomas Weißschuh
Acked-by: Willy Tarreau
---
tools/testing/selftests/nolibc/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/nolibc/Makefile
b/tools/testing
1 - 100 of 154 matches
Mail list logo