mirror of
https://github.com/torvalds/linux.git
synced 2026-03-08 04:04:43 +01:00
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:
parent
640c9dc72f
commit
9d851afa48
1 changed files with 3 additions and 0 deletions
|
|
@ -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))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue