On 10/8/24 09:35, Björn Töpel wrote:
From: Björn Töpel <bjorn@xxxxxxxxxxxx>
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 install
or:
make ARCH=arm64 LLVM=1 TARGETS=sched_ext SKIP_TARGETS="" \
O=/output/foo -C tools/testing/selftests install
The 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.
Thank you for adding this to change log.
Maybe we need to add this to kselftest.rst at some point.
Signed-off-by: Björn Töpel <bjorn@xxxxxxxxxxxx>
---
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)
Thank you.
Reviewed-by: Shuah Khan <skhan@xxxxxxxxxxxxxxxxxxx>
thanks,
-- Shuah