| 070cf03f | 07-Jul-2026 |
Thomas Weißschuh <linux@weissschuh.net> |
selftests/nolibc: add debug information
When working on nolibc, debug information is very valuable. I find myself adding this flag in many patchsets.
Enable debug information unconditionally, as th
selftests/nolibc: add debug information
When working on nolibc, debug information is very valuable. I find myself adding this flag in many patchsets.
Enable debug information unconditionally, as there is no downside to it.
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Acked-by: Willy Tarreau <w@1wt.eu> Link: https://patch.msgid.link/20260707-nolibc-debug-v1-1-31619ec94bbd@weissschuh.net
show more ...
|
| 3850c292 | 25-May-2026 |
Thomas Weißschuh <linux@weissschuh.net> |
selftests/nolibc: test against -Wwrite-strings
Users may use this warning when building their own applications. Make sure that nolibc does not trigger any such warnings.
Signed-off-by: Thomas Weißs
selftests/nolibc: test against -Wwrite-strings
Users may use this warning when building their own applications. Make sure that nolibc does not trigger any such warnings.
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Acked-by: Willy Tarreau <w@1wt.eu> Link: https://patch.msgid.link/20260525-nolibc-write-strings-v2-3-ab5cc16c7b23@weissschuh.net
show more ...
|
| bfa093f1 | 25-May-2026 |
Thomas Weißschuh <linux@weissschuh.net> |
selftests/nolibc: use mutable buffer for execve() argv string
The existing code would trigger a warning under -Wwrite-strings which is about to be enabled. Use a mutable buffer instead. While in thi
selftests/nolibc: use mutable buffer for execve() argv string
The existing code would trigger a warning under -Wwrite-strings which is about to be enabled. Use a mutable buffer instead. While in this specific case, casting away the 'const' would be fine, let's avoid casts which are not really necessary.
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Acked-by: Willy Tarreau <w@1wt.eu> Link: https://patch.msgid.link/20260525-nolibc-write-strings-v2-2-ab5cc16c7b23@weissschuh.net
show more ...
|
| 835fa43a | 21-May-2026 |
Thomas Weißschuh <linux@weissschuh.net> |
tools/nolibc: add ftruncate()
On architectures with 32-bit longs, call the compat syscall __NR_ftruncate64. As off_t is 64-bit it must be split into 2 registers. Unlike llseek() which passes the hig
tools/nolibc: add ftruncate()
On architectures with 32-bit longs, call the compat syscall __NR_ftruncate64. As off_t is 64-bit it must be split into 2 registers. Unlike llseek() which passes the high and low parts in explicitly named arguments, the order here is endian independent.
Some architectures (arm, mips, ppc) require this pair of registers to be aligned to an even register, so add custom _sys_ftruncate64() wrappers for those.
A test case for ftruncate is added which validates negative length or invalid fd return the appropriate error, and checks the length is correct on success.
Co-developed-by: Jordan Richards <jordanrichards@google.com> Signed-off-by: Jordan Richards <jordanrichards@google.com> Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Acked-by: Willy Tarreau <w@1wt.eu> Reviewed-by: Daniel Palmer <daniel@thingy.jp> Link: https://patch.msgid.link/20260521-nolibc-ftruncate-v1-3-5384a83b2402@weissschuh.net
show more ...
|
| f66d6bc3 | 21-May-2026 |
Thomas Weißschuh <linux@weissschuh.net> |
selftests/nolibc: enable CONFIG_TMPFS for sparc32
An upcoming selftest will use memfd_create() which require tmpfs.
Enable that.
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Acked-by: Wi
selftests/nolibc: enable CONFIG_TMPFS for sparc32
An upcoming selftest will use memfd_create() which require tmpfs.
Enable that.
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Acked-by: Willy Tarreau <w@1wt.eu> Reviewed-by: Daniel Palmer <daniel@thingy.jp> Link: https://patch.msgid.link/20260521-nolibc-ftruncate-v1-1-5384a83b2402@weissschuh.net
show more ...
|
| d4534e08 | 07-Apr-2026 |
Thomas Weißschuh <linux@weissschuh.net> |
selftests/nolibc: avoid function pointer comparisons
The upcoming parisc support would require libgcc to implement function pointer comparisons. As we try to avoid the libgcc dependency rework the l
selftests/nolibc: avoid function pointer comparisons
The upcoming parisc support would require libgcc to implement function pointer comparisons. As we try to avoid the libgcc dependency rework the logic to work without such comparisons.
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Acked-by: Willy Tarreau <w@1wt.eu> Link: https://patch.msgid.link/20260428-nolibc-hppa-v5-1-d843d573111a@weissschuh.net
show more ...
|
| 92f1d334 | 29-Apr-2026 |
Thomas Weißschuh <linux@weissschuh.net> |
selftests/nolibc: use vmlinux for MIPS tests
QEMU for MIPS can also load 'vmlinux'. Slim down the table by using that from the fallback.
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Acked
selftests/nolibc: use vmlinux for MIPS tests
QEMU for MIPS can also load 'vmlinux'. Slim down the table by using that from the fallback.
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Acked-by: Willy Tarreau <w@1wt.eu> Link: https://patch.msgid.link/20260429-nolibc-qemu-arch-v1-7-a2ca07eab297@weissschuh.net
show more ...
|
| bdcdb8ff | 29-Apr-2026 |
Thomas Weißschuh <linux@weissschuh.net> |
selftests/nolibc: trim IMAGE mappings
For many configurations QEMU_ARCH is simply 'vmlinux'. Slim down the table by automatically falling back to 'vmlinux'.
Signed-off-by: Thomas Weißschuh <linux@w
selftests/nolibc: trim IMAGE mappings
For many configurations QEMU_ARCH is simply 'vmlinux'. Slim down the table by automatically falling back to 'vmlinux'.
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Acked-by: Willy Tarreau <w@1wt.eu> Link: https://patch.msgid.link/20260429-nolibc-qemu-arch-v1-6-a2ca07eab297@weissschuh.net
show more ...
|
| 69940c74 | 29-Apr-2026 |
Thomas Weißschuh <linux@weissschuh.net> |
selftests/nolibc: trim DEFCONFIG mappings
For many configurations DEFCONFIG is simply 'defconfig'. Slim down the table by automatically falling back to 'defconfig'.
Signed-off-by: Thomas Weißschuh
selftests/nolibc: trim DEFCONFIG mappings
For many configurations DEFCONFIG is simply 'defconfig'. Slim down the table by automatically falling back to 'defconfig'.
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Acked-by: Willy Tarreau <w@1wt.eu> Link: https://patch.msgid.link/20260429-nolibc-qemu-arch-v1-5-a2ca07eab297@weissschuh.net
show more ...
|
| e00e6cf2 | 29-Apr-2026 |
Thomas Weißschuh <linux@weissschuh.net> |
selftests/nolibc: trim QEMU_ARCH mappings
For many configurations QEMU_ARCH is the same as XARCH. Slim down the table by automatically falling back to XARCH.
Signed-off-by: Thomas Weißschuh <linux@
selftests/nolibc: trim QEMU_ARCH mappings
For many configurations QEMU_ARCH is the same as XARCH. Slim down the table by automatically falling back to XARCH.
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Acked-by: Willy Tarreau <w@1wt.eu> Link: https://patch.msgid.link/20260429-nolibc-qemu-arch-v1-4-a2ca07eab297@weissschuh.net
show more ...
|
| c9063419 | 29-Apr-2026 |
Thomas Weißschuh <linux@weissschuh.net> |
selftests/nolibc: use QEMU_ARCH for QEMU_ARCH_USER
The current logic forces the XARCH to QEMU_ARCH mapping to contain entries for all architectures. This will change. To avoid duplication of that lo
selftests/nolibc: use QEMU_ARCH for QEMU_ARCH_USER
The current logic forces the XARCH to QEMU_ARCH mapping to contain entries for all architectures. This will change. To avoid duplication of that logic, reuse the already computed QEMU_ARCH variable.
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Acked-by: Willy Tarreau <w@1wt.eu> Link: https://patch.msgid.link/20260429-nolibc-qemu-arch-v1-3-a2ca07eab297@weissschuh.net
show more ...
|
| 3c1ee4a3 | 29-Apr-2026 |
Thomas Weißschuh <linux@weissschuh.net> |
selftests/nolibc: drop riscv configuration
The riscv configuration is just a duplication of the riscv64 one.
Remove it. Passing ARCH=riscv will be rerouted to riscv64 anyways.
Signed-off-by: Thoma
selftests/nolibc: drop riscv configuration
The riscv configuration is just a duplication of the riscv64 one.
Remove it. Passing ARCH=riscv will be rerouted to riscv64 anyways.
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Acked-by: Willy Tarreau <w@1wt.eu> Link: https://patch.msgid.link/20260429-nolibc-qemu-arch-v1-2-a2ca07eab297@weissschuh.net
show more ...
|
| 89b0d638 | 29-Apr-2026 |
Thomas Weißschuh <linux@weissschuh.net> |
selftests/nolibc: align QEMU_ARCH_mips32be
The variable is slightly misaligned. Fix that.
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Acked-by: Willy Tarreau <w@1wt.eu> Link: https://pat
selftests/nolibc: align QEMU_ARCH_mips32be
The variable is slightly misaligned. Fix that.
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Acked-by: Willy Tarreau <w@1wt.eu> Link: https://patch.msgid.link/20260429-nolibc-qemu-arch-v1-1-a2ca07eab297@weissschuh.net
show more ...
|
| e635b045 | 04-Apr-2026 |
Thomas Weißschuh <linux@weissschuh.net> |
tools/nolibc: make __nolibc_enosys() a compile time error
Functions which are known at compile-time to result in ENOSYS can be surprising to the user. For example using old UAPI headers might mean t
tools/nolibc: make __nolibc_enosys() a compile time error
Functions which are known at compile-time to result in ENOSYS can be surprising to the user. For example using old UAPI headers might mean that stat() will always fail although the kernel would have the system call available at runtime. Nowadays __nolibc_enosys() should never be called for normal applications.
Switch the silent ENOSYS return into a compile-time error, so the user is aware about the issue. Prefer the 'error' attribute as it provides the best diagnostics. If the users defines NOLIBC_COMPILE_TIME_ENOSYS the old, silent fallback is kept.
Also add a test which validates that the error can be optimized away.
Reported-by: Willy Tarreau <w@1wt.eu> Closes: https://lore.kernel.org/lkml/acizRIq2xrFUNHNS@1wt.eu/ Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Acked-by: Willy Tarreau <w@1wt.eu> Link: https://patch.msgid.link/20260404-nolibc-enosys-v1-1-e0aba47bdee4@weissschuh.net
show more ...
|
| 598b670a | 04-Jan-2026 |
Thomas Weißschuh <linux@weissschuh.net> |
selftests/nolibc: don't skip tests for unimplemented syscalls anymore
The automatic skipping of tests on ENOSYS returns was introduced in commit 349afc8a52f8 ("selftests/nolibc: skip tests for unimp
selftests/nolibc: don't skip tests for unimplemented syscalls anymore
The automatic skipping of tests on ENOSYS returns was introduced in commit 349afc8a52f8 ("selftests/nolibc: skip tests for unimplemented syscalls"). It handled the fact that nolibc would return ENOSYS for many syscall wrappers on riscv32.
Nowadays nolibc handles all these correctly, so this logic is not used anymore. To make missing nolibc functionality more obvious fail the tests again if something is not implemented.
Revert the mentioned commit again.
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Acked-by: Willy Tarreau <w@1wt.eu> Link: https://patch.msgid.link/20260406-nolibc-no-skip-enosys-v1-2-c046b1ac7d73@weissschuh.net/
show more ...
|
| 9a5206f2 | 04-Jan-2026 |
Thomas Weißschuh <linux@weissschuh.net> |
selftests/nolibc: explicitly handle ENOSYS from ptrace()
The automatic ENOSYS handling in EXPECT_SYSER() is about to be removed. ptrace() will return legitimately return ENOSYS on qemu-user, so hand
selftests/nolibc: explicitly handle ENOSYS from ptrace()
The automatic ENOSYS handling in EXPECT_SYSER() is about to be removed. ptrace() will return legitimately return ENOSYS on qemu-user, so handle it explicitly.
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Acked-by: Willy Tarreau <w@1wt.eu> Link: https://patch.msgid.link/20260406-nolibc-no-skip-enosys-v1-1-c046b1ac7d73@weissschuh.net/
show more ...
|