[LTP] [PATCH 3/3] cve-2015-3290: Allow early test exit

Martin Doucha mdoucha@suse.cz
Mon Oct 14 18:02:14 CEST 2024


Signed-off-by: Martin Doucha <mdoucha@suse.cz>
---
 testcases/cve/cve-2015-3290.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/testcases/cve/cve-2015-3290.c b/testcases/cve/cve-2015-3290.c
index 3bdc0f8f0..231069bbb 100644
--- a/testcases/cve/cve-2015-3290.c
+++ b/testcases/cve/cve-2015-3290.c
@@ -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;
 		}
 	}
@@ -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++) {
-- 
2.46.0



More information about the ltp mailing list