22edf1f8 | 09-Feb-2025 |
Thomas Weißschuh <linux@weissschuh.net> |
tools/nolibc: add support for [v]sscanf()
These functions are used often, also in selftests. sscanf() itself is also used by kselftest.h itself.
The implementation is limited and only supports nume
tools/nolibc: add support for [v]sscanf()
These functions are used often, also in selftests. sscanf() itself is also used by kselftest.h itself.
The implementation is limited and only supports numeric arguments.
Acked-by: Willy Tarreau <w@1wt.eu> Link: https://lore.kernel.org/r/20250209-nolibc-scanf-v2-1-c29dea32f1cd@weissschuh.net Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
show more ...
|
9c812b01 | 06-Feb-2025 |
Thomas Weißschuh <linux@weissschuh.net> |
tools/nolibc: add support for 32-bit s390
32-bit s390 is very close to the existing 64-bit implementation.
Some special handling is necessary as there is neither LLVM nor QEMU support. Also the ker
tools/nolibc: add support for 32-bit s390
32-bit s390 is very close to the existing 64-bit implementation.
Some special handling is necessary as there is neither LLVM nor QEMU support. Also the kernel itself can not build natively for 32-bit s390, so instead the test program is executed with a 64-bit kernel.
Acked-by: Willy Tarreau <w@1wt.eu> Link: https://lore.kernel.org/r/20250206-nolibc-s390-v2-2-991ad97e3d58@weissschuh.net Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
show more ...
|
3d1e67c6 | 06-Feb-2025 |
Thomas Weißschuh <linux@weissschuh.net> |
selftests/nolibc: rename s390 to s390x
Support for 32-bit s390 is about to be added. As "s39032" would look horrible, use the another naming scheme. 32-bit s390 is "s390" and 64-bit s390 is "s390x",
selftests/nolibc: rename s390 to s390x
Support for 32-bit s390 is about to be added. As "s39032" would look horrible, use the another naming scheme. 32-bit s390 is "s390" and 64-bit s390 is "s390x", similar to how it is handled in various toolchain components.
Acked-by: Willy Tarreau <w@1wt.eu> Link: https://lore.kernel.org/r/20250206-nolibc-s390-v2-1-991ad97e3d58@weissschuh.net Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
show more ...
|
00ddf4cc | 12-Feb-2025 |
Thomas Weißschuh <linux@weissschuh.net> |
selftests/nolibc: only run constructor tests on nolibc
The nolibc testsuite can be run against other libcs to test for interoperability. Some aspects of the constructor execution are not standardize
selftests/nolibc: only run constructor tests on nolibc
The nolibc testsuite can be run against other libcs to test for interoperability. Some aspects of the constructor execution are not standardized and musl does not provide all tested feature, for one it does not provide arguments to the constructors, anymore?
Skip the constructor tests on non-nolibc configurations.
Acked-by: Willy Tarreau <w@1wt.eu> Link: https://lore.kernel.org/r/20250212-nolibc-test-constructor-v1-1-c963875b3da4@weissschuh.net Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
show more ...
|
16681bea | 11-Feb-2025 |
Thomas Weißschuh <linux@weissschuh.net> |
selftests/nolibc: split up architecture list in run-tests.sh
The list is getting overly long and any modifications introduce a lot of noise and are prone to conflicts. Split the string into a bash a
selftests/nolibc: split up architecture list in run-tests.sh
The list is getting overly long and any modifications introduce a lot of noise and are prone to conflicts. Split the string into a bash array and break that into multiple lines.
Link: https://lore.kernel.org/r/20250211-nolibc-test-archs-v1-1-8e55aa3369cf@weissschuh.net Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
show more ...
|
665fa8de | 09-Feb-2025 |
Thomas Weißschuh <thomas.weissschuh@linutronix.de> |
tools/nolibc: add support for directory access
Add an implementation for directory access operations. To keep nolibc itself allocation-free, a "DIR *" does not point to any data, but directly encode
tools/nolibc: add support for directory access
Add an implementation for directory access operations. To keep nolibc itself allocation-free, a "DIR *" does not point to any data, but directly encodes a filedescriptor number, equivalent to "FILE *". Without any per-directory storage it is not possible to implement readdir() POSIX confirming. Instead only readdir_r() is provided. While readdir_r() is deprecated in glibc, the reasons for that are not applicable to nolibc.
Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de> Link: https://lore.kernel.org/r/20250209-nolibc-dir-v2-2-57cc1da8558b@weissschuh.net Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
show more ...
|
c1f4a7a8 | 23-Jan-2025 |
Thomas Weißschuh <linux@weissschuh.net> |
selftests/nolibc: always keep test kernel configuration up to date
Avoid using a stale test kernel configuration by always synchronizing it to the current source tree. kbuild is smart enough to avoi
selftests/nolibc: always keep test kernel configuration up to date
Avoid using a stale test kernel configuration by always synchronizing it to the current source tree. kbuild is smart enough to avoid spurious rebuilds.
Shuffle the code around a bit to keep all the commands with side-effects together.
Acked-by: Willy Tarreau <w@1wt.eu> Link: https://lore.kernel.org/r/20250123-nolibc-config-v2-5-5701c35995d6@weissschuh.net Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
show more ...
|
d7d271ec | 23-Jan-2025 |
Thomas Weißschuh <linux@weissschuh.net> |
selftests/nolibc: execute defconfig before other targets
Some targets use the test kernel configuration. Executing defconfig in the same make invocation as those targets results in errors as the con
selftests/nolibc: execute defconfig before other targets
Some targets use the test kernel configuration. Executing defconfig in the same make invocation as those targets results in errors as the configuration may be in an inconsistent state during reconfiguration. Avoid this by introducing ordering dependencies between the defconfig and some other targets.
Acked-by: Willy Tarreau <w@1wt.eu> Link: https://lore.kernel.org/r/20250123-nolibc-config-v2-4-5701c35995d6@weissschuh.net Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
show more ...
|
25d5ef9e | 23-Jan-2025 |
Thomas Weißschuh <linux@weissschuh.net> |
selftests/nolibc: drop call to mrproper target
"mrproper" unnecessarily cleans a lot of files. kbuild is smart enough to handle changed configurations, so the cleanup is not necessary and only leads
selftests/nolibc: drop call to mrproper target
"mrproper" unnecessarily cleans a lot of files. kbuild is smart enough to handle changed configurations, so the cleanup is not necessary and only leads to excessive rebuilds.
Acked-by: Willy Tarreau <w@1wt.eu> Link: https://lore.kernel.org/r/20250123-nolibc-config-v2-3-5701c35995d6@weissschuh.net Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
show more ...
|
a75b763b | 23-Jan-2025 |
Thomas Weißschuh <linux@weissschuh.net> |
selftests/nolibc: drop call to prepare target
The "prepare" target does not need to be run manually. kbuild knows when to use it on its own and the target is not even documented.
Acked-by: Willy Ta
selftests/nolibc: drop call to prepare target
The "prepare" target does not need to be run manually. kbuild knows when to use it on its own and the target is not even documented.
Acked-by: Willy Tarreau <w@1wt.eu> Link: https://lore.kernel.org/r/20250123-nolibc-config-v2-2-5701c35995d6@weissschuh.net Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
show more ...
|
e16214dc | 23-Jan-2025 |
Thomas Weißschuh <linux@weissschuh.net> |
selftests/nolibc: drop mips32be EXTRACONFIG
kbuild already contains logic to merge predefines snippets into a defconfig file. For MIPS a snippet for big-endian is already provided.
Link: https://lo
selftests/nolibc: drop mips32be EXTRACONFIG
kbuild already contains logic to merge predefines snippets into a defconfig file. For MIPS a snippet for big-endian is already provided.
Link: https://lore.kernel.org/r/20250123-nolibc-config-v2-1-5701c35995d6@weissschuh.net Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
show more ...
|
4da4e35e | 23-Jan-2025 |
Thomas Weißschuh <linux@weissschuh.net> |
selftests/nolibc: enable -Wmissing-prototypes
User code may want to use this compiler flag. Make sure it is supported by nolibc.
Acked-by: Willy Tarreau <w@1wt.eu> Link: https://lore.kernel.org/r/2
selftests/nolibc: enable -Wmissing-prototypes
User code may want to use this compiler flag. Make sure it is supported by nolibc.
Acked-by: Willy Tarreau <w@1wt.eu> Link: https://lore.kernel.org/r/20250123-nolibc-prototype-v1-3-e1afc5c1999a@weissschuh.net Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
show more ...
|
60fe1823 | 21-Dec-2024 |
Thomas Weißschuh <linux@weissschuh.net> |
selftests/nolibc: add configurations for riscv32
nolibc already supports riscv32. Wire it up in the testsuite.
Link: https://lore.kernel.org/r/20241221-nolibc-rv32-v1-6-d9ef6dab7c63@weissschuh.net
selftests/nolibc: add configurations for riscv32
nolibc already supports riscv32. Wire it up in the testsuite.
Link: https://lore.kernel.org/r/20241221-nolibc-rv32-v1-6-d9ef6dab7c63@weissschuh.net Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
show more ...
|
a47b4b9f | 21-Dec-2024 |
Thomas Weißschuh <linux@weissschuh.net> |
selftests/nolibc: rename riscv to riscv64
riscv32 support is about the be added. To keep the naming clear and consistent with other architectures rename riscv to riscv64, as that is what it actually
selftests/nolibc: rename riscv to riscv64
riscv32 support is about the be added. To keep the naming clear and consistent with other architectures rename riscv to riscv64, as that is what it actually represents.
Link: https://lore.kernel.org/r/20241221-nolibc-rv32-v1-5-d9ef6dab7c63@weissschuh.net Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
show more ...
|
349afc8a | 21-Dec-2024 |
Thomas Weißschuh <linux@weissschuh.net> |
selftests/nolibc: skip tests for unimplemented syscalls
The riscv32 architecture is missing many of the older syscalls. Instead of providing wrappers for everything at once, introducing a lot of com
selftests/nolibc: skip tests for unimplemented syscalls
The riscv32 architecture is missing many of the older syscalls. Instead of providing wrappers for everything at once, introducing a lot of complexity, skip the tests for those syscalls for now.
Link: https://lore.kernel.org/r/20241221-nolibc-rv32-v1-4-d9ef6dab7c63@weissschuh.net Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
show more ...
|
4c7f09ab | 21-Dec-2024 |
Thomas Weißschuh <linux@weissschuh.net> |
selftests/nolibc: use a pipe to in vfprintf tests
Not all architectures implement lseek(), for example riscv32 only implements llseek() which is not equivalent to normal lseek(). Remove the need for
selftests/nolibc: use a pipe to in vfprintf tests
Not all architectures implement lseek(), for example riscv32 only implements llseek() which is not equivalent to normal lseek(). Remove the need for lseek() by using a pipe instead.
Link: https://lore.kernel.org/r/20241221-nolibc-rv32-v1-3-d9ef6dab7c63@weissschuh.net Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
show more ...
|
a0bc8947 | 21-Dec-2024 |
Thomas Weißschuh <linux@weissschuh.net> |
selftests/nolibc: use waitid() over waitpid()
Newer archs like riscv32 don't provide waitpid() anymore. Switch to waitid() which is available everywhere.
Link: https://lore.kernel.org/r/20241221-no
selftests/nolibc: use waitid() over waitpid()
Newer archs like riscv32 don't provide waitpid() anymore. Switch to waitid() which is available everywhere.
Link: https://lore.kernel.org/r/20241221-nolibc-rv32-v1-2-d9ef6dab7c63@weissschuh.net Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
show more ...
|
22ba81c5 | 07-Aug-2024 |
Thomas Weißschuh <linux@weissschuh.net> |
selftests/nolibc: run-tests.sh: allow building through LLVM
The nolibc tests can now be properly built with LLVM. Expose this through run-tests.sh.
Reviewed-by: Shuah Khan <skhan@linuxfoundation.or
selftests/nolibc: run-tests.sh: allow building through LLVM
The nolibc tests can now be properly built with LLVM. Expose this through run-tests.sh.
Reviewed-by: Shuah Khan <skhan@linuxfoundation.org> Acked-by: Willy Tarreau <w@1wt.eu> Link: https://lore.kernel.org/r/20240807-nolibc-llvm-v2-15-c20f2f5fc7c2@weissschuh.net Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
show more ...
|
8404af7e | 07-Aug-2024 |
Thomas Weißschuh <linux@weissschuh.net> |
selftests/nolibc: use correct clang target for s390/systemz
The target names between GCC and clang differ for s390. While GCC uses "s390", clang uses "systemz". This mapping is not handled by tools/
selftests/nolibc: use correct clang target for s390/systemz
The target names between GCC and clang differ for s390. While GCC uses "s390", clang uses "systemz". This mapping is not handled by tools/scripts/Makefile.include, so do it in the nolibc-test Makefile.
Acked-by: Willy Tarreau <w@1wt.eu> Reviewed-by: Shuah Khan <skhan@linuxfoundation.org> Link: https://lore.kernel.org/r/20240807-nolibc-llvm-v2-14-c20f2f5fc7c2@weissschuh.net Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
show more ...
|
801cf69c | 07-Aug-2024 |
Thomas Weißschuh <linux@weissschuh.net> |
selftests/nolibc: don't use libgcc when building with clang
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 dis
selftests/nolibc: don't use libgcc when building with clang
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.
Acked-by: Willy Tarreau <w@1wt.eu> Reviewed-by: Shuah Khan <skhan@linuxfoundation.org> Link: https://lore.kernel.org/r/20240807-nolibc-llvm-v2-13-c20f2f5fc7c2@weissschuh.net Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
show more ...
|
27e458bb | 07-Aug-2024 |
Thomas Weißschuh <linux@weissschuh.net> |
selftests/nolibc: run-tests.sh: avoid overwriting CFLAGS_EXTRA
If the user specified their own CFLAGS_EXTRA these should not be overwritten by `-e`.
Reviewed-by: Shuah Khan <skhan@linuxfoundation.o
selftests/nolibc: run-tests.sh: avoid overwriting CFLAGS_EXTRA
If the user specified their own CFLAGS_EXTRA these should not be overwritten by `-e`.
Reviewed-by: Shuah Khan <skhan@linuxfoundation.org> Acked-by: Willy Tarreau <w@1wt.eu> Link: https://lore.kernel.org/r/20240807-nolibc-llvm-v2-12-c20f2f5fc7c2@weissschuh.net Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
show more ...
|
1bd75aeb | 07-Aug-2024 |
Thomas Weißschuh <linux@weissschuh.net> |
selftests/nolibc: add cc-option compatible with clang cross builds
The cc-option macro from Build.include is not compatible with clang cross builds, as it does not respect the "--target" and similar
selftests/nolibc: add cc-option compatible with clang cross builds
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.
Reviewed-by: Shuah Khan <skhan@linuxfoundation.org> Acked-by: Willy Tarreau <w@1wt.eu> Link: https://lore.kernel.org/r/20240807-nolibc-llvm-v2-11-c20f2f5fc7c2@weissschuh.net Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
show more ...
|