| a5f00be9 | 05-Jan-2026 |
Daniel Palmer <daniel@thingy.jp> |
tools/nolibc: Add a simple test for writing to a FILE and reading it back
Add a test that exercises create->write->seek->read to check that using the stream functions (fwrite() etc) is not totally b
tools/nolibc: Add a simple test for writing to a FILE and reading it back
Add a test that exercises create->write->seek->read to check that using the stream functions (fwrite() etc) is not totally broken.
The only edge cases this is testing for are: - Reading the file after writing but without rewinding reads nothing. - Trying to read more items than the file contains returns the count of fully read items.
Signed-off-by: Daniel Palmer <daniel@thingy.jp> Link: https://patch.msgid.link/20260105023629.1502801-4-daniel@thingy.jp Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
show more ...
|
| 6fe8360b | 06-Jan-2026 |
Thomas Weißschuh <linux@weissschuh.net> |
selftests/nolibc: also test libc-test through regular selftest framework
Hook up libc-test to the regular selftest build to make sure nolibc-test.c stays compatible with a normal libc.
As the patte
selftests/nolibc: also test libc-test through regular selftest framework
Hook up libc-test to the regular selftest build to make sure nolibc-test.c stays compatible with a normal libc.
As the pattern rule from lib.mk does not handle compiling a target from a differently named source file, add an explicit rule definition.
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Acked-by: Willy Tarreau <w@1wt.eu> Link: https://patch.msgid.link/20260106-nolibc-selftests-v1-3-f82101c2c505@weissschuh.net
show more ...
|
| 20c72de1 | 06-Jan-2026 |
Thomas Weißschuh <linux@weissschuh.net> |
selftests/nolibc: scope custom flags to the nolibc-test target
A new target for 'libc-test' is going to be added which should not be affected by these options.
Signed-off-by: Thomas Weißschuh <linu
selftests/nolibc: scope custom flags to the nolibc-test target
A new target for 'libc-test' is going to be added which should not be affected by these options.
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Acked-by: Willy Tarreau <w@1wt.eu> Link: https://patch.msgid.link/20260106-nolibc-selftests-v1-2-f82101c2c505@weissschuh.net
show more ...
|
| 4203c6fb | 06-Jan-2026 |
Thomas Weißschuh <linux@weissschuh.net> |
selftests/nolibc: try to read from stdin in readv_zero test
When stdout is redirected to a file this test fails. This happens when running through the kselftest runner since commit d9e6269e3303 ("se
selftests/nolibc: try to read from stdin in readv_zero test
When stdout is redirected to a file this test fails. This happens when running through the kselftest runner since commit d9e6269e3303 ("selftests/run_kselftest.sh: exit with error if tests fail").
For consistency with other tests that read from a file descriptor, switch to stdin over stdout. The tests are still brittle against a redirected stdin, but at least they are now consistently so.
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Acked-by: Willy Tarreau <w@1wt.eu> Link: https://patch.msgid.link/20260106-nolibc-selftests-v1-1-f82101c2c505@weissschuh.net
show more ...
|
| 6b6dbf3e | 06-Jan-2026 |
Thomas Weißschuh <linux@weissschuh.net> |
selftests/nolibc: always build sparc32 tests with -mcpu=v8
Since LLVM commit 39e30508a7f6 ("[Driver][Sparc] Default to -mcpu=v9 for 32-bit Linux/sparc64 (#109278)"), clang defaults to -mcpu=v9 for 3
selftests/nolibc: always build sparc32 tests with -mcpu=v8
Since LLVM commit 39e30508a7f6 ("[Driver][Sparc] Default to -mcpu=v9 for 32-bit Linux/sparc64 (#109278)"), clang defaults to -mcpu=v9 for 32-bit SPARC builds. -mcpu=v9 generates instructions which are not recognized by qemu-sparc and qemu-system-sparc.
Explicitly enforce -mcpu=v8 to generate compatible code.
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Acked-by: Willy Tarreau <w@1wt.eu> Link: https://patch.msgid.link/20260106-nolibc-sparc32-fix-v2-1-7c5cd6b175c2@weissschuh.net
show more ...
|
| 03139924 | 04-Jan-2026 |
Thomas Weißschuh <linux@weissschuh.net> |
selftests/nolibc: drop NOLIBC_SYSROOT=0 logic
This logic was added in commit 850fad7de827 ("selftests/nolibc: allow test -include /path/to/nolibc.h") to allow the testing of -include /path/to/nolibc
selftests/nolibc: drop NOLIBC_SYSROOT=0 logic
This logic was added in commit 850fad7de827 ("selftests/nolibc: allow test -include /path/to/nolibc.h") to allow the testing of -include /path/to/nolibc.h. As it requires as special variable to activate, this code is nearly never used. Furthermore it complicates the logic a bit.
Since commit a6a054c8ad32 ("tools/nolibc: add target to check header usability") and commit 443c6467fcd6 ("selftests/nolibc: always run nolibc header check") the usability of -include /path/to/nolibc.h is always checked anyways, making NOLIBC_SYSROOT=0 pointless.
Drop the special logic.
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Acked-by: Willy Tarreau <w@1wt.eu> Link: https://patch.msgid.link/20260104-nolibc-nolibc_sysroot-v1-1-98025ad99add@weissschuh.net
show more ...
|
| 1d573464 | 22-Nov-2025 |
Thomas Weißschuh <linux@weissschuh.net> |
selftests/nolibc: error out on linker warnings
If the linker emits warnings these should abort the build. Otherwise they will be swallowed by run-tests.sh and not shown.
Signed-off-by: Thomas Weißs
selftests/nolibc: error out on linker warnings
If the linker emits warnings these should abort the build. Otherwise they will be swallowed by run-tests.sh and not shown.
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Acked-by: Willy Tarreau <w@1wt.eu>
show more ...
|
| 682bf675 | 22-Nov-2025 |
Thomas Weißschuh <linux@weissschuh.net> |
selftests/nolibc: use lld to link loongarch binaries
LLVM 21 switched to -mcmodel=medium for LoongArch64 compilations. This code model uses R_LARCH_ECALL36 relocations which might not be supported b
selftests/nolibc: use lld to link loongarch binaries
LLVM 21 switched to -mcmodel=medium for LoongArch64 compilations. This code model uses R_LARCH_ECALL36 relocations which might not be supported by GNU ld which to nolibc testsuite uses by default. ld will not resolve the relocation and all function calls will end up as busy loops.
Use lld instead.
We can not switch to lld for all LLVM builds, as it does not support all necessary architectures.
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Acked-by: Willy Tarreau <w@1wt.eu>
show more ...
|
| ca38943e | 31-Jul-2025 |
Benjamin Berg <benjamin.berg@intel.com> |
selftests/nolibc: remove outdated comment about construct order
The constructor order is not (and should not) be tested. Remove the comment.
Fixes: a782d45c867c ("selftests/nolibc: stop testing con
selftests/nolibc: remove outdated comment about construct order
The constructor order is not (and should not) be tested. Remove the comment.
Fixes: a782d45c867c ("selftests/nolibc: stop testing constructor order") Signed-off-by: Benjamin Berg <benjamin.berg@intel.com> Link: https://lore.kernel.org/r/20250731201225.323254-3-benjamin@sipsolutions.net Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
show more ...
|
| 850047b1 | 19-Jul-2025 |
Thomas Weißschuh <linux@weissschuh.net> |
selftests/nolibc: always compile the kernel with GCC
LLVM/clang can not build the kernel for all architectures supported by nolibc. The current setup uses the same compiler to build the kernel as is
selftests/nolibc: always compile the kernel with GCC
LLVM/clang can not build the kernel for all architectures supported by nolibc. The current setup uses the same compiler to build the kernel as is used for nolibc-test. This prevents using the full qemu-system tests for LLVM builds.
Instead always build the kernel with GCC. For the nolibc testsuite the kernel does not need to be built with LLVM.
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Acked-by: Willy Tarreau <w@1wt.eu> Link: https://lore.kernel.org/r/20250719-nolibc-llvm-system-v1-3-1730216ce171@weissschuh.net
show more ...
|
| 1a5b4031 | 19-Jul-2025 |
Thomas Weißschuh <linux@weissschuh.net> |
selftests/nolibc: don't pass CC to toplevel Makefile
The toplevel Makefile is capable of calculating CC from CROSS_COMPILE and/or ARCH.
Stop passing the unnecessary variable.
Signed-off-by: Thomas
selftests/nolibc: don't pass CC to toplevel Makefile
The toplevel Makefile is capable of calculating CC from CROSS_COMPILE and/or ARCH.
Stop passing the unnecessary variable.
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Acked-by: Willy Tarreau <w@1wt.eu> Link: https://lore.kernel.org/r/20250719-nolibc-llvm-system-v1-2-1730216ce171@weissschuh.net
show more ...
|
| 32042f63 | 19-Jul-2025 |
Thomas Weißschuh <linux@weissschuh.net> |
selftests/nolibc: deduplicate invocations of toplevel Makefile
Various targets of the testsuite call back into the toplevel kernel Makefile. These calls use various parameters and are quite long.
I
selftests/nolibc: deduplicate invocations of toplevel Makefile
Various targets of the testsuite call back into the toplevel kernel Makefile. These calls use various parameters and are quite long.
Introduce a common variable to make future changes smaller and the lines shorter.
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Acked-by: Willy Tarreau <w@1wt.eu> Link: https://lore.kernel.org/r/20250719-nolibc-llvm-system-v1-1-1730216ce171@weissschuh.net
show more ...
|
| 2be3fd90 | 18-Aug-2025 |
Thomas Weißschuh <linux@weissschuh.net> |
selftests/nolibc: be more specific about variables affecting nolibc-test
Only one of these variables is used. $CC is preferred over $CROSS_COMPILE.
Make this clear in the help message.
Suggested-b
selftests/nolibc: be more specific about variables affecting nolibc-test
Only one of these variables is used. $CC is preferred over $CROSS_COMPILE.
Make this clear in the help message.
Suggested-by: Willy Tarreau <w@1wt.eu> Link: https://lore.kernel.org/lkml/20250817093905.GA14213@1wt.eu/ Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
show more ...
|
| 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 ...
|