nolibc next update for Linux 6.14-rc1
Subsystems (2)
Shuah Khan
maintainerHi Linus,
Please pull the following nolibc next update for Linux 6.14-rc1.
- adds support for waitid()
- uses waitid() over waitpid()
- uses a pipe to in vfprintf tests
- skips tests for unimplemented syscalls
- renames riscv to riscv64
- adds configurations for riscv32
- adds detecting missing toolchain to run-tests.sh
diff is attached.
thanks,
-- Shuah
----------------------------------------------------------------
The following changes since commit 40384c840ea1944d7c5a392e8975ed088ecf0b37:
Linux 6.13-rc1 (2024-12-01 14:28:56 -0800)
are available in the Git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest tags/linux_kselftest-nolibc-6.14-rc1
for you to fetch changes up to 24728b70b036ab63557c4524640010816b4ab155:
Merge tag 'nolibc-20250113-for-6.14-1' of https://git.kernel.org/pub/scm/linux/kernel/git/nolibc/linux-nolibc into nolibc (2025-01-13 16:19:12 -0700)
----------------------------------------------------------------
linux_kselftest-nolibc-6.14-rc1
- adds support for waitid()
- uses waitid() over waitpid()
- uses a pipe to in vfprintf tests
- skips tests for unimplemented syscalls
- renames riscv to riscv64
- adds configurations for riscv32
- adds detecting missing toolchain to run-tests.sh
----------------------------------------------------------------
Shuah Khan (1):
Merge tag 'nolibc-20250113-for-6.14-1' of https://git.kernel.org/pub/scm/linux/kernel/git/nolibc/linux-nolibc into nolibc
Thomas Weißschuh (6):
tools/nolibc: add support for waitid() selftests/nolibc: use waitid() over waitpid() selftests/nolibc: use a pipe to in vfprintf tests selftests/nolibc: skip tests for unimplemented syscalls selftests/nolibc: rename riscv to riscv64 selftests/nolibc: add configurations for riscv32
Willy Tarreau (1):
selftests/nolibc: run-tests.sh: detect missing toolchain
tools/include/nolibc/sys.h | 18 ++++++++++++ tools/testing/selftests/nolibc/Makefile | 11 +++++++ tools/testing/selftests/nolibc/nolibc-test.c | 44 ++++++++++++++++------------ tools/testing/selftests/nolibc/run-tests.sh | 9 +++++- 4 files changed, 63 insertions(+), 19 deletions(-)
----------------------------------------------------------------
tools/include/nolibc/sys.h +18 -0
@@ -23,6 +23,7 @@#include <linux/prctl.h> #include <linux/resource.h> #include <linux/utsname.h> +#include <linux/signal.h> #include "arch.h" #include "errno.h"
@@ -1225,6 +1226,23 @@ pid_t waitpid(pid_t pid, int *status, int options) } +/* +* int waitid(idtype_t idtype, id_t id, siginfo_t *infop, int options); +*/ + +static __attribute__((unused)) +int sys_waitid (int which,pid_t pid,siginfo_t *infop,int options,struct rusage *rusage) +{ +return my_syscall5 (__NR_waitid, which, pid, infop, options, rusage); +} + +static __attribute__((unused)) +int waitid (int which,pid_t pid,siginfo_t *infop,int options) +{ +return __sysret (sys_waitid (which, pid, infop, options,NULL )); +} + +/* * ssize_t write(int fd, const void *buf, size_t count); */
tools/testing/selftests/nolibc/Makefile +11 -0
@@ -43,6 +43,7 @@ cc-option = $(call __cc-option, $(CC),$(CLANG_CROSS_FLAGS),$(1),$(2)) # configure default variants for target kernel supported architectures XARCH_powerpc = ppc XARCH_mips = mips32le +XARCH_riscv = riscv64 XARCH = $(or $(XARCH_$(ARCH)),$(ARCH)) # map from user input variants to their kernel supported architectures
@@ -51,6 +52,8 @@ ARCH_ppc64 = powerpc ARCH_ppc64le = powerpc ARCH_mips32le = mips ARCH_mips32be = mips +ARCH_riscv32 = riscv +ARCH_riscv64 = riscv ARCH := $(or $(ARCH_$(XARCH)),$(XARCH)) # kernel image names by architecture
@@ -65,6 +68,8 @@ IMAGE_ppc = vmlinux IMAGE_ppc64 = vmlinux IMAGE_ppc64le = arch/powerpc/boot/zImage IMAGE_riscv = arch/riscv/boot/Image +IMAGE_riscv32 = arch/riscv/boot/Image +IMAGE_riscv64 = arch/riscv/boot/Image IMAGE_s390 = arch/s390/boot/bzImage IMAGE_loongarch = arch/loongarch/boot/vmlinuz.efi IMAGE = $(objtree)/$(IMAGE_$(XARCH))
@@ -82,6 +87,8 @@ DEFCONFIG_ppc = pmac32_defconfig DEFCONFIG_ppc64 = powernv_be_defconfig DEFCONFIG_ppc64le = powernv_defconfig DEFCONFIG_riscv = defconfig +DEFCONFIG_riscv32 = rv32_defconfig +DEFCONFIG_riscv64 = defconfig DEFCONFIG_s390 = defconfig DEFCONFIG_loongarch = defconfig DEFCONFIG = $(DEFCONFIG_$(XARCH))
@@ -104,6 +111,8 @@ QEMU_ARCH_ppc = ppc QEMU_ARCH_ppc64 = ppc64 QEMU_ARCH_ppc64le = ppc64 QEMU_ARCH_riscv = riscv64 +QEMU_ARCH_riscv32 = riscv32 +QEMU_ARCH_riscv64 = riscv64 QEMU_ARCH_s390 = s390x QEMU_ARCH_loongarch = loongarch64 QEMU_ARCH = $(QEMU_ARCH_$(XARCH))
@@ -130,6 +139,8 @@ QEMU_ARGS_ppc = -M g3beige -append "console=ttyS0 panic=-1 $(TEST:%=NOLIB QEMU_ARGS_ppc64 = -M powernv -append "console=hvc0 panic=-1 $(TEST:%=NOLIBC_TEST=%)" QEMU_ARGS_ppc64le = -M powernv -append "console=hvc0 panic=-1 $(TEST:%=NOLIBC_TEST=%)" QEMU_ARGS_riscv = -M virt -append "console=ttyS0 panic=-1 $(TEST:%=NOLIBC_TEST=%)" +QEMU_ARGS_riscv32 = -M virt -append "console=ttyS0 panic=-1 $(TEST:%=NOLIBC_TEST=%)" +QEMU_ARGS_riscv64 = -M virt -append "console=ttyS0 panic=-1 $(TEST:%=NOLIBC_TEST=%)" QEMU_ARGS_s390 = -M s390-ccw-virtio -append "console=ttyS0 panic=-1 $(TEST:%=NOLIBC_TEST=%)" QEMU_ARGS_loongarch = -M virt -append "console=ttyS0,115200 panic=-1 $(TEST:%=NOLIBC_TEST=%)" QEMU_ARGS = -m 1G $(QEMU_ARGS_$(XARCH)) $(QEMU_ARGS_BIOS) $(QEMU_ARGS_EXTRA)
tools/testing/selftests/nolibc/nolibc-test.c +26 -18
96 lines not on this page · raw message
tools/testing/selftests/nolibc/run-tests.sh +8 -1
@@ -17,7 +17,7 @@ perform_download=0 test_mode=system werror=1 llvm= -archs="i386 x86_64 arm64 arm mips32le mips32be ppc ppc64 ppc64le riscv s390 loongarch" +archs="i386 x86_64 arm64 arm mips32le mips32be ppc ppc64 ppc64le riscv32 riscv64 s390 loongarch" TEMP=$(getopt -o 'j:d:c:b:a:m:pelh' -n "$0" -- "$@")
@@ -143,6 +143,13 @@ test_arch() { arch=$1 ct_arch=$(crosstool_arch "$arch") ct_abi=$(crosstool_abi "$1") + + if [ ! -d "${download_location}gcc-${crosstool_version}-nolibc/${ct_arch}-${ct_abi}/bin/." ]; then + echo "No toolchain found in ${download_location}gcc-${crosstool_version}-nolibc/${ct_arch}-${ct_abi}." + echo "Did you install the toolchains or set the correct arch ? Rerun with -h for help." + return 1 + fi + cross_compile=$(realpath "${download_location}gcc-${crosstool_version}-nolibc/${ct_arch}-${ct_abi}/bin/${ct_arch}-${ct_abi}-") build_dir="${build_location}/${arch}" if [ "$werror" -ne 0 ]; then
The pull request you sent on Tue, 21 Jan 2025 15:04:30 -0700:
The pull request you sent on Tue, 21 Jan 2025 15:04:30 -0700:
Quoted 1 line
git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftesttags/linux_kselftest-nolibc-6.14-rc1
has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/7004a2e46d1693848370809aa3d9c340a209edbb
Thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/prtracker.html