All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lukas Czerner <lczerner@redhat.com>
To: io-uring@vger.kernel.org
Subject: [PATCH 5/5] test: handle the case when timeout is forced to KILL
Date: Fri, 18 Sep 2020 12:47:46 +0200	[thread overview]
Message-ID: <20200918104746.146747-5-lczerner@redhat.com> (raw)
In-Reply-To: <20200918104746.146747-1-lczerner@redhat.com>

Timeout is used to INTerrupt the test if it is still running after
pre-defined time. If the process does not terminate KILL signal is sent
after a pre-defined time, but the return status is different in that
case (128+9).
Catch it and treat is as test failure with the message that the
process was killed.

Signed-off-by: Lukas Czerner <lczerner@redhat.com>
---
 test/runtests.sh | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/test/runtests.sh b/test/runtests.sh
index ed28ec8..b210013 100755
--- a/test/runtests.sh
+++ b/test/runtests.sh
@@ -161,6 +161,8 @@ run_test()
 	# Check test status
 	if [ "$status" -eq 124 ]; then
 		test_result timeout "${logfile}" "${test_string}"
+	elif [ "$status" -eq 137 ]; then
+		test_failed "${logfile}" "${test_string}" "process Killed"
 	elif [ "$status" -ne 0 ] && [ "$status" -ne 255 ]; then
 		test_result fail "${logfile}" "${test_string}" "status = $status"
 	elif ! _check_dmesg "$dmesg_marker" "$test_name" "$dev"; then
-- 
2.26.2


      parent reply	other threads:[~2020-09-18 10:54 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-18 10:47 [PATCH 1/5] test: save dmesg output for each test and test file Lukas Czerner
2020-09-18 10:47 ` [PATCH 2/5] test: make a distinction between successful and skipped test Lukas Czerner
2020-09-18 10:47 ` [PATCH 3/5] test: store test output to a log file Lukas Czerner
2020-09-18 10:47 ` [PATCH 4/5] test: make test output more readable Lukas Czerner
2020-09-18 10:47 ` Lukas Czerner [this message]

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=20200918104746.146747-5-lczerner@redhat.com \
    --to=lczerner@redhat.com \
    --cc=io-uring@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.