selftests/sched_ext: Return non-zero exit code on test failure

runner.c always returned 0 regardless of test results.  The kselftest
framework (tools/testing/selftests/kselftest/runner.sh) invokes the runner
binary and treats a non-zero exit code as a test failure; with the old
code, failed sched_ext tests were silently hidden from the parent harness
even though individual "not ok" TAP lines were emitted.

Return 1 when at least one test failed, 0 when all tests passed or were
skipped.

Signed-off-by: zhidao su <suzhidao@xiaomi.com>
Acked-by: Andrea Righi <arighi@nvidia.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
This commit is contained in:
zhidao su 2026-03-19 13:30:26 +08:00 committed by Tejun Heo
parent 7e226f036a
commit 818dbedd04

View File

@ -217,7 +217,7 @@ int main(int argc, char **argv)
printf(" - %s\n", failed_tests[i]);
}
return 0;
return failed > 0 ? 1 : 0;
}
void scx_test_register(struct scx_test *test)