public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Li Wang <liwang@redhat.com>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH RFC] lib: invoke do_cleanup if failed to kill test processes
Date: Fri, 15 Mar 2019 14:17:33 +0800	[thread overview]
Message-ID: <20190315061733.24938-1-liwang@redhat.com> (raw)

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


             reply	other threads:[~2019-03-15  6:17 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-15  6:17 Li Wang [this message]
2019-03-18 12:28 ` [LTP] [PATCH RFC] lib: invoke do_cleanup if failed to kill test processes Cyril Hrubis
2019-03-19 12:11   ` Li Wang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190315061733.24938-1-liwang@redhat.com \
    --to=liwang@redhat.com \
    --cc=ltp@lists.linux.it \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox