public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* [LTP] [PATCH RFC] lib: invoke do_cleanup if failed to kill test processes
@ 2019-03-15  6:17 Li Wang
  2019-03-18 12:28 ` Cyril Hrubis
  0 siblings, 1 reply; 3+ messages in thread
From: Li Wang @ 2019-03-15  6:17 UTC (permalink / raw)
  To: ltp

LTP liabary should invoke do_cleanup function promptly when killing
test process doesn't work, especially useful to testcase do mount or
format devices in their setup phase. Otherwise, that abnormal broken
will effect the testcase which LTP is preparing to execute in next.

Signed-off-by: Li Wang <liwang@redhat.com>
---
 lib/tst_test.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/tst_test.c b/lib/tst_test.c
index 7dd890b8d..ce7b37f70 100644
--- a/lib/tst_test.c
+++ b/lib/tst_test.c
@@ -1035,6 +1035,7 @@ static void alarm_handler(int sig LTP_ATTRIBUTE_UNUSED)
 	alarm(5);
 
 	if (++sigkill_retries > 10) {
+		do_cleanup();
 		WRITE_MSG("Cannot kill test processes!\n");
 		WRITE_MSG("Congratulation, likely test hit a kernel bug.\n");
 		WRITE_MSG("Exitting uncleanly...\n");
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-03-19 12:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-03-15  6:17 [LTP] [PATCH RFC] lib: invoke do_cleanup if failed to kill test processes Li Wang
2019-03-18 12:28 ` Cyril Hrubis
2019-03-19 12:11   ` Li Wang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox