Skip to content

Commit

Permalink
cve-2015-3290: Allow early test exit
Browse files Browse the repository at this point in the history
Link: https://lore.kernel.org/ltp/[email protected]/
Reviewed-by: Petr Vorel <[email protected]>
Signed-off-by: Martin Doucha <[email protected]>
  • Loading branch information
mdoucha authored and pevik committed Oct 15, 2024
1 parent 7398a5f commit 9fed4bf
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion testcases/cve/cve-2015-3290.c
Original file line number Diff line number Diff line change
Expand Up @@ -424,6 +424,7 @@ static void *child_thread(void *arg)

if (fail_count >= MAX_FAILS) {
tst_res(TINFO, "Too many failures, exiting");
running = 0;
break;
}
}
Expand Down Expand Up @@ -455,7 +456,9 @@ static void do_child(void)
&orig_ss[i]);
}

sleep(tst_remaining_runtime());
while (running && tst_remaining_runtime())
sleep(1);

running = 0;

for (i = 0; i < ncpus; i++) {
Expand Down

0 comments on commit 9fed4bf

Please sign in to comment.