b9e50363 | 12-Jul-2025 |
Thomas Weißschuh <linux@weissschuh.net> |
selftests/nolibc: add x32 test configuration
Nolibc supports the x32 ABI on x86. Add a testcase to make sure the support stays functional.
QEMU user does not have support for x32, so skip the test
selftests/nolibc: add x32 test configuration
Nolibc supports the x32 ABI on x86. Add a testcase to make sure the support stays functional.
QEMU user does not have support for x32, so skip the test there.
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Acked-by: Willy Tarreau <w@1wt.eu> Link: https://lore.kernel.org/r/20250712-nolibc-x32-v1-2-6d81cb798710@weissschuh.net
show more ...
|
750aef51 | 09-Jul-2025 |
Benjamin Berg <benjamin.berg@intel.com> |
selftests/nolibc: show failed run if test process crashes
The logic would not catch if the test process crashes and would incorrectly report a "success" state. Fix this by looking for the final "Tot
selftests/nolibc: show failed run if test process crashes
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.
Signed-off-by: Benjamin Berg <benjamin.berg@intel.com> Link: https://lore.kernel.org/r/20250709155512.971080-2-benjamin@sipsolutions.net [Thomas: fix patch prefix] Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
show more ...
|
f6f6be0c | 20-Jun-2025 |
Thomas Weißschuh <thomas.weissschuh@linutronix.de> |
tools/nolibc: drop s390 clang target override
tools/scripts/Makefile.include now has the same override, removing the need for the one in the nolibc Makefile.
Drop the superfluous custom override.
tools/nolibc: drop s390 clang target override
tools/scripts/Makefile.include now has the same override, removing the need for the one in the nolibc Makefile.
Drop the superfluous custom override.
Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de> Link: https://lore.kernel.org/r/20250620-tools-cross-s390-v2-2-ecda886e00e5@linutronix.de Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
show more ...
|
4a401290 | 04-Jul-2025 |
Thomas Weißschuh <thomas.weissschuh@linutronix.de> |
selftests/nolibc: correctly report errors from printf() and friends
When an error is encountered by printf() it needs to be reported. errno() is already set by the callback.
sprintf() is different,
selftests/nolibc: correctly report errors from printf() and friends
When an error is encountered by printf() it needs to be reported. errno() is already set by the callback.
sprintf() is different, but that keeps working and is already tested.
Also add a new test.
Fixes: 7e4346f4a3a6 ("tools/nolibc/stdio: add a minimal [vf]printf() implementation") Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de> Acked-by: Willy Tarreau <w@1wt.eu> Link: https://lore.kernel.org/r/20250704-nolibc-printf-error-v1-2-74b7a092433b@linutronix.de Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
show more ...
|
2b1ed5f7 | 04-Jul-2025 |
Thomas Weißschuh <thomas.weissschuh@linutronix.de> |
selftests/nolibc: create /dev/full when running as PID 1
An upcoming testcase will use /dev/full.
Make sure it is always present.
Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
selftests/nolibc: create /dev/full when running as PID 1
An upcoming testcase will use /dev/full.
Make sure it is always present.
Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de> Acked-by: Willy Tarreau <w@1wt.eu> Link: https://lore.kernel.org/r/20250704-nolibc-printf-error-v1-1-74b7a092433b@linutronix.de Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
show more ...
|
7c02bc40 | 04-Jul-2025 |
Thomas Weißschuh <thomas.weissschuh@linutronix.de> |
tools/nolibc: add support for clock_nanosleep() and nanosleep()
Also add some tests.
Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de> Acked-by: Willy Tarreau <w@1wt.eu> Link: https
tools/nolibc: add support for clock_nanosleep() and nanosleep()
Also add some tests.
Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de> Acked-by: Willy Tarreau <w@1wt.eu> Link: https://lore.kernel.org/r/20250704-nolibc-nanosleep-v1-1-d79c19701952@linutronix.de Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
show more ...
|
696bf157 | 03-Jul-2025 |
Mark Brown <broonie@kernel.org> |
selftests/nolibc: Add coverage of vfork()
Generalise the existing fork() test to also cover the newly added vfork() implementation.
Signed-off-by: Mark Brown <broonie@kernel.org> Link: https://lore
selftests/nolibc: Add coverage of vfork()
Generalise the existing fork() test to also cover the newly added vfork() implementation.
Signed-off-by: Mark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/20250703-arm64-gcs-vfork-exit-v3-4-1e9a9d2ddbbe@kernel.org Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
show more ...
|
02217ad4 | 23-Jun-2025 |
Thomas Weißschuh <linux@weissschuh.net> |
tools/nolibc: add support for SuperH
Add support for SuperH/"sh" to nolibc. Only sh4 is tested for now.
The startup code is special:
__nolibc_entrypoint_epilogue() calls __builtin_unreachable() wh
tools/nolibc: add support for SuperH
Add support for SuperH/"sh" to nolibc. Only sh4 is tested for now.
The startup code is special:
__nolibc_entrypoint_epilogue() calls __builtin_unreachable() which emits a call to abort(). To make this work a function prologue is generated to set up a GOT pointer which corrupts "sp". __builtin_unreachable() is necessary for __attribute__((noreturn)). Also depending on compiler flags (for example -fPIC) even more prologue is generated.
Work around this by defining a nested function in asm.
Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70216 Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Acked-by: Willy Tarreau <w@1wt.eu> Acked-by: Rob Landley <rob@landley.net> Acked-by: D. Jeff Dionne <jeff@coresemi.io> Tested-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de> Link: https://lore.kernel.org/r/20250623-nolibc-sh-v2-3-0f5b4b303025@weissschuh.net
show more ...
|
358b2511 | 23-Jun-2025 |
Thomas Weißschuh <linux@weissschuh.net> |
selftests/nolibc: use file driver for QEMU serial
For the test implementation of the SuperH architecture a second serial serial port needs to be used. Unfortunately the currently used 'stdio' driver
selftests/nolibc: use file driver for QEMU serial
For the test implementation of the SuperH architecture a second serial serial port needs to be used. Unfortunately the currently used 'stdio' driver does not support multiple serial ports at the same time.
Switch to the 'file' driver which does support multiple ports and is sufficient for the nolibc-test usecase.
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Acked-by: Willy Tarreau <w@1wt.eu> Tested-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de> Link: https://lore.kernel.org/r/20250623-nolibc-sh-v2-2-0f5b4b303025@weissschuh.net
show more ...
|
439fa875 | 23-Jun-2025 |
Thomas Weißschuh <linux@weissschuh.net> |
selftests/nolibc: fix EXTRACONFIG variables ordering
The variable block got disordered at some point.
Use the correct ordering.
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Acked-by: Wil
selftests/nolibc: fix EXTRACONFIG variables ordering
The variable block got disordered at some point.
Use the correct ordering.
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Acked-by: Willy Tarreau <w@1wt.eu> Tested-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de> Link: https://lore.kernel.org/r/20250623-nolibc-sh-v2-1-0f5b4b303025@weissschuh.net
show more ...
|
a6a2a8a4 | 23-Jun-2025 |
Thomas Weißschuh <linux@weissschuh.net> |
tools/nolibc: MIPS: add support for N64 and N32 ABIs
Add support for the MIPS 64bit N64 and ILP32 N32 ABIs.
In addition to different byte orders and ABIs there are also different releases of the MI
tools/nolibc: MIPS: add support for N64 and N32 ABIs
Add support for the MIPS 64bit N64 and ILP32 N32 ABIs.
In addition to different byte orders and ABIs there are also different releases of the MIPS architecture. To avoid blowing up the test matrix, only add a subset of all possible test combinations.
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Tested-by: Sebastian Andrzej Siewior <sebastian@breakpoint.cc> Link: https://lore.kernel.org/r/20250623-nolibc-mips-n32-v3-4-6ae2d89f4259@weissschuh.net
show more ...
|
fb1cacdb | 23-Jun-2025 |
Thomas Weißschuh <linux@weissschuh.net> |
selftests/nolibc: avoid GCC 15 -Wunterminated-string-initialization
On GCC 15 the following warnings is emitted:
nolibc-test.c: In function ‘run_stdlib’: nolibc-test.c:1416:32: warning: initializer
selftests/nolibc: avoid GCC 15 -Wunterminated-string-initialization
On GCC 15 the following warnings is emitted:
nolibc-test.c: In function ‘run_stdlib’: nolibc-test.c:1416:32: warning: initializer-string for array of ‘char’ truncates NUL terminator but destination lacks ‘nonstring’ attribute (11 chars into 10 available) [-Wunterminated-string-initialization] 1416 | char buf[10] = "test123456"; | ^~~~~~~~~~~~
Increase the size of buf to avoid the warning.
It would also be possible to use __attribute__((nonstring)) but that would require some ifdeffery to work with older compilers.
Fixes: 1063649cf531 ("selftests/nolibc: Add tests for strlcat() and strlcpy()") Acked-by: Willy Tarreau <w@1wt.eu> Link: https://lore.kernel.org/r/20250623-nolibc-nonstring-v1-1-11282204766a@weissschuh.net Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
show more ...
|
eb135311 | 20-Jun-2025 |
Thomas Weißschuh <linux@weissschuh.net> |
selftests/nolibc: integrate with kselftests
Hook up nolibc-test with the kselftests framework. This enables CI systems and developers to easily execute the tests.
While nolibc-test does not emit KT
selftests/nolibc: integrate with kselftests
Hook up nolibc-test with the kselftests framework. This enables CI systems and developers to easily execute the tests.
While nolibc-test does not emit KTAP output itself that is not a problem, as the kselftest executor will wrap the output in KTAP.
Acked-by: Willy Tarreau <w@1wt.eu> Link: https://lore.kernel.org/r/20250620-nolibc-selftests-v1-4-f6b2ce7c5071@weissschuh.net Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
show more ...
|
3adf4f90 | 20-Jun-2025 |
Thomas Weißschuh <linux@weissschuh.net> |
selftests/nolibc: rename Makefile
The nolibc tests are not real kselftests, they work differently and provide a different interface. Users trying to use them like real selftests may be confused and
selftests/nolibc: rename Makefile
The nolibc tests are not real kselftests, they work differently and provide a different interface. Users trying to use them like real selftests may be confused and the tests are not executed by CI systems.
To make space for an integration with the kselftest framework, move the custom tests out of the way. The custom tests are still useful to keep as they provide functionality not provided by kselftests.
Acked-by: Willy Tarreau <w@1wt.eu> Link: https://lore.kernel.org/r/20250620-nolibc-selftests-v1-3-f6b2ce7c5071@weissschuh.net Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
show more ...
|
a09db6af | 20-Jun-2025 |
Thomas Weißschuh <linux@weissschuh.net> |
selftests/nolibc: split out CFLAGS logic
Some upcoming changes will reuse the CFLAGS.
Split the computation into a reusable Makefile.
Acked-by: Willy Tarreau <w@1wt.eu> Link: https://lore.kernel.o
selftests/nolibc: split out CFLAGS logic
Some upcoming changes will reuse the CFLAGS.
Split the computation into a reusable Makefile.
Acked-by: Willy Tarreau <w@1wt.eu> Link: https://lore.kernel.org/r/20250620-nolibc-selftests-v1-2-f6b2ce7c5071@weissschuh.net Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
show more ...
|
54c18a8f | 20-Jun-2025 |
Thomas Weißschuh <linux@weissschuh.net> |
selftests/nolibc: drop implicit defconfig executions
Commit d7d271ec30dd ("selftests/nolibc: execute defconfig before other targets") accidentally introduced implicit executions of the defconfig tar
selftests/nolibc: drop implicit defconfig executions
Commit d7d271ec30dd ("selftests/nolibc: execute defconfig before other targets") accidentally introduced implicit executions of the defconfig target. These executions were unintentional and come from a misunderstanding of ordering dependencies.
Drop the dependencies again.
Reported-by: Mark Brown <broonie@kernel.org> Closes: https://lore.kernel.org/all/3d5128b9-b4b6-4a8e-94ce-ea5ff4ea655b@sirena.org.uk/ Acked-by: Willy Tarreau <w@1wt.eu> Link: https://lore.kernel.org/r/20250620-nolibc-selftests-v1-1-f6b2ce7c5071@weissschuh.net Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
show more ...
|
a009a0c6 | 28-Apr-2025 |
Thomas Weißschuh <thomas.weissschuh@linutronix.de> |
tools/nolibc: add fopen()
This is used in various selftests and will be handy when integrating those with nolibc.
Only the standard POSIX modes are supported. No extensions nor the (noop) "b" from
tools/nolibc: add fopen()
This is used in various selftests and will be handy when integrating those with nolibc.
Only the standard POSIX modes are supported. No extensions nor the (noop) "b" from ISO C are accepted.
Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de> Acked-by: Willy Tarreau <w@1wt.eu> Link: https://lore.kernel.org/r/20250428-nolibc-misc-v2-13-3c043eeab06c@linutronix.de Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
show more ...
|
256dc733 | 28-Apr-2025 |
Thomas Weißschuh <thomas.weissschuh@linutronix.de> |
tools/nolibc: add namespace functionality
This is used in various selftests and will be handy when integrating those with nolibc.
Not all configurations support namespaces, so skip the tests where
tools/nolibc: add namespace functionality
This is used in various selftests and will be handy when integrating those with nolibc.
Not all configurations support namespaces, so skip the tests where necessary. Also if the tests are running without privileges. Enable the namespace configuration for those architectures where it is not enabled by default.
Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de> Acked-by: Willy Tarreau <w@1wt.eu> Link: https://lore.kernel.org/r/20250428-nolibc-misc-v2-12-3c043eeab06c@linutronix.de Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
show more ...
|
7ff3c71a | 28-Apr-2025 |
Thomas Weißschuh <thomas.weissschuh@linutronix.de> |
tools/nolibc: add difftime()
This is used in various selftests and will be handy when integrating those with nolibc.
Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de> Acked-by: Will
tools/nolibc: add difftime()
This is used in various selftests and will be handy when integrating those with nolibc.
Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de> Acked-by: Willy Tarreau <w@1wt.eu> Link: https://lore.kernel.org/r/20250428-nolibc-misc-v2-11-3c043eeab06c@linutronix.de Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
show more ...
|
fa7bf844 | 28-Apr-2025 |
Thomas Weißschuh <thomas.weissschuh@linutronix.de> |
tools/nolibc: add timer functions
This is used in various selftests and will be handy when integrating those with nolibc.
Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de> Acked-by:
tools/nolibc: add timer functions
This is used in various selftests and will be handy when integrating those with nolibc.
Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de> Acked-by: Willy Tarreau <w@1wt.eu> Link: https://lore.kernel.org/r/20250428-nolibc-misc-v2-9-3c043eeab06c@linutronix.de Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
show more ...
|
50647213 | 28-Apr-2025 |
Thomas Weißschuh <thomas.weissschuh@linutronix.de> |
tools/nolibc: add clock_getres(), clock_gettime() and clock_settime()
This is used in various selftests and will be handy when integrating those with nolibc.
Signed-off-by: Thomas Weißschuh <thomas
tools/nolibc: add clock_getres(), clock_gettime() and clock_settime()
This is used in various selftests and will be handy when integrating those with nolibc.
Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de> Acked-by: Willy Tarreau <w@1wt.eu> Link: https://lore.kernel.org/r/20250428-nolibc-misc-v2-8-3c043eeab06c@linutronix.de Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
show more ...
|
1e10b853 | 28-Apr-2025 |
Thomas Weißschuh <thomas.weissschuh@linutronix.de> |
tools/nolibc: add support for access() and faccessat()
This is used in various selftests and will be handy when integrating those with nolibc.
Signed-off-by: Thomas Weißschuh <thomas.weissschuh@lin
tools/nolibc: add support for access() and faccessat()
This is used in various selftests and will be handy when integrating those with nolibc.
Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de> Acked-by: Willy Tarreau <w@1wt.eu> Link: https://lore.kernel.org/r/20250428-nolibc-misc-v2-7-3c043eeab06c@linutronix.de Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
show more ...
|