summaryrefslogtreecommitdiff
path: root/tools/testing
diff options
context:
space:
mode:
authorCheng-Yang Chou <yphbchou0911@gmail.com>2026-02-21 18:40:42 +0300
committerTejun Heo <tj@kernel.org>2026-02-23 20:19:13 +0300
commit9d851afa482680bdd7c158cc8720284dc9ecb5fe (patch)
tree512e2408cc73175ea3b5d656278fd20098c53db1 /tools/testing
parent640c9dc72f21f325700a4b0f839ad568ff21c697 (diff)
downloadlinux-9d851afa482680bdd7c158cc8720284dc9ecb5fe.tar.xz
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>
Diffstat (limited to 'tools/testing')
-rw-r--r--tools/testing/selftests/sched_ext/runner.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/testing/selftests/sched_ext/runner.c b/tools/testing/selftests/sched_ext/runner.c
index 5748d2c69903..761c21f96404 100644
--- a/tools/testing/selftests/sched_ext/runner.c
+++ b/tools/testing/selftests/sched_ext/runner.c
@@ -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))