From 1ef9ac40455d1bad7995adb0a7fc1eb4d8aef6c3 Mon Sep 17 00:00:00 2001 From: David Vernet Date: Tue, 30 Apr 2024 10:53:19 -0500 Subject: [PATCH] scx: Run selftests in scx CI We have a fairly comprehensive set of selftests in tools/selftests/sched_ext. Let's run them in CI. Signed-off-by: David Vernet --- .github/workflows/run-schedulers | 11 +++++++++++ .github/workflows/test-kernel.yml | 5 ++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/.github/workflows/run-schedulers b/.github/workflows/run-schedulers index 5cb6cc2303b2b..ef353157d3a04 100755 --- a/.github/workflows/run-schedulers +++ b/.github/workflows/run-schedulers @@ -59,3 +59,14 @@ for sched in $(find tools/sched_ext/build/bin -type f -executable); do echo "OK: ${sched}" fi done + +# Run the selftests suite +runtest "tools/testing/selftests/sched_ext/runner" +sed -n -e '/not ok/q1' /tmp/output +res=$? +if [ ${res} -ne 0 ]; then + echo "FAIL: selftests" + echo "output: $(cat /tmp/output)" +else + echo "OK: selftests" +fi diff --git a/.github/workflows/test-kernel.yml b/.github/workflows/test-kernel.yml index ba1905c5a6107..6e9d059a461a1 100644 --- a/.github/workflows/test-kernel.yml +++ b/.github/workflows/test-kernel.yml @@ -40,8 +40,11 @@ jobs: # Build a minimal kernel (with sched-ext enabled) using virtme-ng - run: vng -v --build --config .github/workflows/sched-ext.config + # Build the selftests suite + - run: make -j $(nproc) -C tools/testing/selftests/sched_ext + # Build the in-kernel schedulers - - run: cd tools/sched_ext && make + - run: make -j $(nproc) -C tools/sched_ext # Test the schedulers inside the recompile kernel - run: .github/workflows/run-schedulers