If the user tries to run deadline_test with threads less than 1 (zero for example), then exit with an error message. Signed-off-by: John Kacur <jkacur@xxxxxxxxxx> --- src/sched_deadline/deadline_test.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/sched_deadline/deadline_test.c b/src/sched_deadline/deadline_test.c index 1763c71486a9..53abd4d2ca6b 100644 --- a/src/sched_deadline/deadline_test.c +++ b/src/sched_deadline/deadline_test.c @@ -1817,6 +1817,11 @@ int main(int argc, char **argv) exit(-1); } + if (nr_threads < 1) { + fprintf(stderr, "The number of threads must be at least 1\n"); + exit(-1); + } + if (setcpu) { nr_cpus = calc_nr_cpus(setcpu, &setcpu_buf); if (nr_cpus < 0) { -- 2.31.1