From: Sami Kerola <kerolasa@iki.fi>
To: util-linux@vger.kernel.org
Cc: kerolasa@iki.fi
Subject: [PATCH] tests: make kill to go-around when /proc is not available
Date: Wed, 7 May 2014 18:01:08 +0100 [thread overview]
Message-ID: <1399482068-6460-1-git-send-email-kerolasa@iki.fi> (raw)
And change messaging to be easier to debug, if the outcome of the
opportunistic sleep is unsuccessful test. In such case one could assume
the test_sigreceive was not successful when setting handler. Maybe
because of load on test server, or some other reason.
Reference: https://travis-ci.org/rudimeier/util-linux/jobs/24561058
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
---
tests/ts/kill/kill_functions.sh | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/tests/ts/kill/kill_functions.sh b/tests/ts/kill/kill_functions.sh
index 043b4cb..56ad98b 100644
--- a/tests/ts/kill/kill_functions.sh
+++ b/tests/ts/kill/kill_functions.sh
@@ -5,6 +5,16 @@ function check_test_sigreceive {
local pid=$1
for i in 0.01 0.1 1 1 1 1; do
+ if [ ! -f /proc/$pid/status ]; then
+ # This message is visible in tests/run.sh output.
+ # Do not direct to $TS_OUTPUT it would make test
+ # fail, while with a bit of luck this might be
+ # recoverable (after a sleep).
+ echo "kill_functions.sh: /proc/$pid/status: No such file or directory" &&
+ rc=1 &&
+ sleep 2 &&
+ break
+ fi
awk 'BEGIN { retval=1 }
/^SigCgt/ {
lbyte = strtonum("0x" substr($2, 16, 16))
--
1.9.2
next reply other threads:[~2014-05-07 17:01 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-07 17:01 Sami Kerola [this message]
2014-05-07 20:12 ` [PATCH] tests: make kill to go-around when /proc is not available Ruediger Meier
2014-05-08 9:10 ` Sami Kerola
2014-05-08 20:29 ` Ruediger Meier
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=1399482068-6460-1-git-send-email-kerolasa@iki.fi \
--to=kerolasa@iki.fi \
--cc=util-linux@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox