Skip to content

[bpf-ci-bot] sched_ext CI tests fail deterministically due to argument passing mismatch #478

@kernel-patches-review-bot

Description

@kernel-patches-review-bot

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

Root Cause Analysis

The CI dispatch chain works as follows:

  1. run.sh sets TEST_RUNNERS=$(echo ${KERNEL_TEST} | tr -s ',' ' ') which yields sched_ext
  2. The vmtest command runs: ${VMTEST_SCRIPT} ${TEST_RUNNERS}run-scx-selftests.sh sched_ext
  3. run-scx-selftests.sh line 13 executes: ./runner "$@"./runner sched_ext
  4. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions