selftests/sched_ext: Abort test loop on signal

The runner sets exit_req on SIGINT/SIGTERM but ignores it during the
main loop. This prevents users from cleanly interrupting a test run.

Check exit_req each iteration to safely break out on exit signals.

Signed-off-by: Cheng-Yang Chou <yphbchou0911@gmail.com>
Acked-by: Andrea Righi <arighi@nvidia.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
This commit is contained in:
Cheng-Yang Chou 2026-02-21 23:40:42 +08:00 committed by Tejun Heo
parent 640c9dc72f
commit 9d851afa48

View file

@ -166,6 +166,9 @@ int main(int argc, char **argv)
enum scx_test_status status;
struct scx_test *test = &__scx_tests[i];
if (exit_req)
break;
if (list) {
printf("%s\n", test->name);
if (i == (__scx_num_tests - 1))