selftests: sched_ext: Add sched_ext as proper selftest target
Subsystems (4)
PATCH v3 1/1 selftests: sched_ext: Add sched_ext as proper selftest target
From: Björn Töpel <[email protected]>
The sched_ext selftests is missing proper cross-compilation support, a proper target entry, and out-of-tree build support.
When building the kselftest suite, e.g.:
make ARCH=riscv CROSS_COMPILE=riscv64-linux-gnu- \
TARGETS=sched_ext SKIP_TARGETS="" O=/output/foo \
-C tools/testing/selftests installor:
make ARCH=arm64 LLVM=1 TARGETS=sched_ext SKIP_TARGETS="" \
O=/output/foo -C tools/testing/selftests installThe expectation is that the sched_ext is included, cross-built, the correct toolchain is picked up, and placed into /output/foo.
In contrast to the BPF selftests, the sched_ext suite does not use bpftool at test run-time, so it is sufficient to build bpftool for the build host only.
Add ARCH, CROSS_COMPILE, OUTPUT, and TARGETS support to the sched_ext selftest. Also, remove some variables that were unused by the Makefile.
---
v3: * Always build a build host version of bpftool (Mark)
* Make sure LLVM style "ARCH only" cross-build works (Mark)
v2: * Removed the duplicated LLVM prefix parsing (David)
* Made sure make clean didn't do a complete mess (David)
* Added sched_ext to default skip (Shuah)
--- tools/testing/selftests/Makefile | 9 +-- tools/testing/selftests/sched_ext/Makefile | 73 ++++++++++------------ 2 files changed, 38 insertions(+), 44 deletions(-)
tools/testing/selftests/Makefile +5 -4
@@ -88,6 +88,7 @@ TARGETS += rlimits TARGETS += rseq TARGETS += rtc TARGETS += rust +TARGETS += sched_ext TARGETS += seccomp TARGETS += sgx TARGETS += sigaltstack
@@ -129,10 +130,10 @@ ifeq ($(filter net/lib,$(TARGETS)),) endif endif -# User can optionally provide a TARGETS skiplist. By default we skip -# BPF since it has cutting edge build time dependencies which require -# more effort to install. -SKIP_TARGETS ?= bpf +# User can optionally provide a TARGETS skiplist. By default we skip +# targets using BPF since it has cutting edge build time dependencies +# which require more effort to install. +SKIP_TARGETS ?= bpf sched_ext ifneq ($(SKIP_TARGETS),) TMP := $(filter-out $(SKIP_TARGETS), $(TARGETS)) override TARGETS := $(TMP)
tools/testing/selftests/sched_ext/Makefile +33 -40
147 lines not on this page · raw message
base-commit: 87d6aab2389e5ce0197d8257d5f8ee965a67c4cd
Signature · 1 line
2.43.0
Quoted 19 lines · Björn Töpel
From: Björn Töpel <[email protected]>
The
sched_extselftests is missing proper cross-compilation support, a proper target entry, and out-of-tree build support.When building the kselftest suite, e.g.:
make ARCH=riscv CROSS_COMPILE=riscv64-linux-gnu- \ TARGETS=sched_ext SKIP_TARGETS="" O=/output/foo \ -C tools/testing/selftests installor:
make ARCH=arm64 LLVM=1 TARGETS=sched_ext SKIP_TARGETS="" \ O=/output/foo -C tools/testing/selftests installThe expectation is that the
sched_extis included, cross-built, the correct toolchain is picked up, and placed into /output/foo.
Quoted 7 lines
In contrast to the BPF selftests, the
sched_extsuite does not use bpftool at test run-time, so it is sufficient to build bpftool for the build host only.Add ARCH,
CROSS_COMPILE, OUTPUT, and TARGETS support to thesched_extselftest. Also, remove some variables that were unused by theMakefile.
Thank you for adding this to change log.
Maybe we need to add this to kselftest.rst at some point.
Quoted 9 lines
Signed-off-by Björn Töpel <[email protected]>---
v3: * Always build a build host version of bpftool (Mark)
* Make sure LLVM style "ARCH only" cross-build works (Mark)v2: * Removed the duplicated LLVM prefix parsing (David)
* Made sure make clean didn't do a complete mess (David)
* Addedsched_extto default skip (Shuah)
Thank you.
thanks,
-- Shuah
Quoted 23 lines · Björn Töpel
From: Björn Töpel <[email protected]>
The
sched_extselftests is missing proper cross-compilation support, a proper target entry, and out-of-tree build support.When building the kselftest suite, e.g.:
make ARCH=riscv CROSS_COMPILE=riscv64-linux-gnu- \ TARGETS=sched_ext SKIP_TARGETS="" O=/output/foo \ -C tools/testing/selftests installor:
make ARCH=arm64 LLVM=1 TARGETS=sched_ext SKIP_TARGETS="" \ O=/output/foo -C tools/testing/selftests installThe expectation is that the
sched_extis included, cross-built, the correct toolchain is picked up, and placed into /output/foo.In contrast to the BPF selftests, the
sched_extsuite does not use bpftool at test run-time, so it is sufficient to build bpftool for the build host only.
Quoted 5 lines
Add ARCH,
CROSS_COMPILE, OUTPUT, and TARGETS support to thesched_extselftest. Also, remove some variables that were unused by theMakefile.Signed-off-by Björn Töpel <[email protected]>
Thanks for the improvements!
Quoted 2 lines · Björn Töpel
The
sched_extselftests is missing proper cross-compilation support, a proper target entry, and out-of-tree build support.
There's still the thing with picking up the host kernel if there's not a binary built, but that's a generic thing with all the BPF based stuff that should be addressed separately.
Quoted 23 lines · Björn Töpel
From: Björn Töpel <[email protected]>
The
sched_extselftests is missing proper cross-compilation support, a proper target entry, and out-of-tree build support.When building the kselftest suite, e.g.:
make ARCH=riscv CROSS_COMPILE=riscv64-linux-gnu- \ TARGETS=sched_ext SKIP_TARGETS="" O=/output/foo \ -C tools/testing/selftests installor:
make ARCH=arm64 LLVM=1 TARGETS=sched_ext SKIP_TARGETS="" \ O=/output/foo -C tools/testing/selftests installThe expectation is that the
sched_extis included, cross-built, the correct toolchain is picked up, and placed into /output/foo.In contrast to the BPF selftests, the
sched_extsuite does not use bpftool at test run-time, so it is sufficient to build bpftool for the build host only.
Quoted 5 lines
Add ARCH,
CROSS_COMPILE, OUTPUT, and TARGETS support to thesched_extselftest. Also, remove some variables that were unused by theMakefile.Signed-off-by Björn Töpel <[email protected]>
Applied to sched_ext/for-6.12-fixes.
Thanks.
Signature · 1 line
tejun