(I'm so sorry!) Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git

selftests/sched_ext: Fail interrupted test runs

SIGINT and SIGTERM set exit_req, causing the runner to stop before executing the remaining tests. However, the exit status only reflects the number of failed tests, so an interrupted run returns success when none of the completed tests failed. Include exit_req in the failure condition so callers can distinguish an interrupted run from a successful run. Keep the result counts limited to the tests that actually ran. Tested the actual runner under GDB, delivering each signal before the first test and after the example test passed. The original runner returns 0 in all four cases; the fixed runner returns 1. Normal -h, -l and -t example invocations still return 0. Fixes: 9d851afa4826 ("selftests/sched_ext: Abort test loop on signal") Assisted-by: LLM Signed-off-by: Tianyi Chen <hi@tychen.cc> Signed-off-by: Tejun Heo <tj@kernel.org>


Author Tianyi Chen Committer Tejun Heo Date Commit Parent 97c50e21
+1 -1
1 changed file
+1 -1
1 changed file