Summary
The sched_ext CI test job fails with Unexpected argument 'sched_ext'. Use -t to filter tests. on every PR where sched_ext testing is enabled. Commit ff1befcb1683 added strict argument validation to the sched_ext runner binary, but the CI script run-scx-selftests.sh still passes positional arguments via $@ which the runner now rejects.
Failure Details
- Test / Component: sched_ext runner invocation in CI (
run-scx-selftests.sh)
- Frequency: Every run where sched_ext tests are enabled (currently on aarch64 and x86_64 for PRs targeting branches where sched_ext is uncommented in matrix.py)
- Failure mode: Immediate exit with error code 1 — no tests are executed
- Affected architectures: aarch64, x86_64 (wherever sched_ext job is triggered)
- CI runs observed:
Root Cause Analysis
The CI dispatch chain works as follows:
run.sh sets TEST_RUNNERS=$(echo ${KERNEL_TEST} | tr -s ',' ' ') which yields sched_ext
- The vmtest command runs:
${VMTEST_SCRIPT} ${TEST_RUNNERS} → run-scx-selftests.sh sched_ext
run-scx-selftests.sh line 13 executes: ./runner "$@" → ./runner sched_ext
runner.c:167-171 (added by commit ff1befcb1683) rejects positional arguments:
if (optind < argc) {
fprintf(stderr, "Unexpected argument '%s'. Use -t to filter tests.\n",
argv[optind]);
return 1;
}
Before commit ff1befcb1683 (2026-04-08, "selftests/sched_ext: Improve runner error reporting for invalid arguments"), the runner binary silently ignored the extra argument and ran all tests. After the commit, it rejects any positional argument and exits immediately.
The run-bpf-selftests.sh script uses its positional arguments ($@) to select which test binary to run (e.g., test_progs, test_maps). In contrast, run-scx-selftests.sh only has one runner binary, so the argument is meaningless — it should not be forwarded.
Key files:
github/libbpf/ci/run-vmtest/run-scx-selftests.sh:13 — passes $@ to runner
tools/testing/selftests/sched_ext/runner.c:167-171 — rejects positional args
github/libbpf/ci/run-vmtest/run.sh — constructs ${VMTEST_SCRIPT} ${TEST_RUNNERS}
Proposed Fix
Remove "$@" from the ./runner invocation in run-scx-selftests.sh. The test runner name argument is only relevant for run-bpf-selftests.sh which uses it to select between multiple test binaries; sched_ext has only one runner.
See: 0001-ci-run-vmtest-Do-not-pass-arguments-to-sched_ext-run.patch
Impact
When this issue triggers, the entire sched_ext CI job fails without running any tests, producing a red X on the PR. This is the sole failure in many runs (8+ PRs confirmed), causing patch submitters and reviewers to investigate a false negative. Currently mitigated by the fact that most base branches have sched_ext commented out in matrix.py, but any PR that merges with a branch where it's enabled will hit this.
References
Summary
The sched_ext CI test job fails with
Unexpected argument 'sched_ext'. Use -t to filter tests.on every PR where sched_ext testing is enabled. Commitff1befcb1683added strict argument validation to the sched_extrunnerbinary, but the CI scriptrun-scx-selftests.shstill passes positional arguments via$@which the runner now rejects.Failure Details
run-scx-selftests.sh)Root Cause Analysis
The CI dispatch chain works as follows:
run.shsetsTEST_RUNNERS=$(echo ${KERNEL_TEST} | tr -s ',' ' ')which yieldssched_ext${VMTEST_SCRIPT} ${TEST_RUNNERS}→run-scx-selftests.sh sched_extrun-scx-selftests.shline 13 executes:./runner "$@"→./runner sched_extrunner.c:167-171(added by commitff1befcb1683) rejects positional arguments:Before commit
ff1befcb1683(2026-04-08, "selftests/sched_ext: Improve runner error reporting for invalid arguments"), therunnerbinary silently ignored the extra argument and ran all tests. After the commit, it rejects any positional argument and exits immediately.The
run-bpf-selftests.shscript uses its positional arguments ($@) to select which test binary to run (e.g.,test_progs,test_maps). In contrast,run-scx-selftests.shonly has one runner binary, so the argument is meaningless — it should not be forwarded.Key files:
github/libbpf/ci/run-vmtest/run-scx-selftests.sh:13— passes$@to runnertools/testing/selftests/sched_ext/runner.c:167-171— rejects positional argsgithub/libbpf/ci/run-vmtest/run.sh— constructs${VMTEST_SCRIPT} ${TEST_RUNNERS}Proposed Fix
Remove
"$@"from the./runnerinvocation inrun-scx-selftests.sh. The test runner name argument is only relevant forrun-bpf-selftests.shwhich uses it to select between multiple test binaries; sched_ext has only one runner.See:
0001-ci-run-vmtest-Do-not-pass-arguments-to-sched_ext-run.patchImpact
When this issue triggers, the entire sched_ext CI job fails without running any tests, producing a red X on the PR. This is the sole failure in many runs (8+ PRs confirmed), causing patch submitters and reviewers to investigate a false negative. Currently mitigated by the fact that most base branches have sched_ext commented out in matrix.py, but any PR that merges with a branch where it's enabled will hit this.
References
ff1befcb1683("selftests/sched_ext: Improve runner error reporting for invalid arguments")