[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[SCM] GNU Inetutils branch, master, updated. inetutils-1_9_1-333-g6a47f
From: |
Mats Erik Andersson |
Subject: |
[SCM] GNU Inetutils branch, master, updated. inetutils-1_9_1-333-g6a47f40 |
Date: |
Sat, 31 Aug 2013 13:00:39 +0000 |
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Inetutils ".
The branch, master has been updated
via 6a47f400cae44ba53f5a4cbcfa43ea95b2e3cadc (commit)
from 06123506eaa0923fe999d96020bbe4597ed81534 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit/inetutils.git/commit/?id=6a47f400cae44ba53f5a4cbcfa43ea95b2e3cadc
commit 6a47f400cae44ba53f5a4cbcfa43ea95b2e3cadc
Author: Mats Erik Andersson <address@hidden>
Date: Sat Aug 31 14:38:44 2013 +0200
Diagnostics in syslogd test.
diff --git a/ChangeLog b/ChangeLog
index f32ee25..9bda5cb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
2013-08-31 Mats Erik Andersson <address@hidden>
+ * tests/syslogd.sh: Lengthen sleeping periods.
+ Add better diagnostics when some test case fails.
+
+2013-08-31 Mats Erik Andersson <address@hidden>
+
* ftpd/ftpd.c (statcmd): Report session timeout.
2013-08-31 Mats Erik Andersson <address@hidden>
diff --git a/tests/syslogd.sh b/tests/syslogd.sh
index 85a8fb2..3fa0f87 100755
--- a/tests/syslogd.sh
+++ b/tests/syslogd.sh
@@ -453,10 +453,11 @@ TAG2="syslogd-reload-test"
# Load the new configuration
kill -HUP `cat "$PID"`
-sleep 1
+sleep 2
if $do_unix_socket; then
- # Two messages, but absence is also awarded credit.
+ # Two messages of weight 2, ensuring that missing
+ # and misplaced messages are not yielding negatives.
TESTCASES=`expr $TESTCASES + 4`
$LOGGER -h "$SOCKET" -p user.info -t "$TAG2" \
"user.info as BSD message. (pid $$)"
@@ -465,10 +466,11 @@ if $do_unix_socket; then
fi
if $do_inet_socket; then
- # Two messages, but absence is also awarded credit.
+ # Two messages of weight 2, ensuring that missing
+ # and misplaced messages are not yielding negatives.
TESTCASES=`expr $TESTCASES + 4`
$LOGGER -4 -h "$TARGET:$PORT" -p user.info -t "$TAG2" \
- "user.info IPv4 message. (pid $$)"
+ "user.info as IPv4 message. (pid $$)"
$LOGGER -4 -h "$TARGET:$PORT" -p user.debug -t "$TAG2" \
"user.debug as IPv4 message. (pid $$)"
fi
@@ -496,6 +498,7 @@ if $do_standard_port; then
# Only INET socket, no UNIX socket.
$SYSLOGD --rcfile="$CONF" --pidfile="$PID" --socket='' \
--inet --ipany $OPTIONS
+ sleep 1
$LOGGER -4 -h "$TARGET" -p user.info -t "$TAG" \
"IPv4 to standard port. (pid $$)"
$LOGGER -6 -h "$TARGET6" -p user.info -t "$TAG" \
@@ -503,16 +506,25 @@ if $do_standard_port; then
fi
# Delay detection due to observed race condition.
-sleep 1
+sleep 3
# Detection of registered messages.
#
+# Initial message logging.
COUNT=`$GREP -c "$TAG" "$OUT"`
+
+# Second set-up after SIGHUP.
COUNT2=`$GREP -c "$TAG2" "$OUT_USER"`
-COUNT2_debug=`$GREP -c "$TAG2.*user.debug" "$OUT_USER"`
COUNT3=`$GREP -c "$TAG2" "$OUT_DEBUG"`
+
+# No debug message should enter with selector 'user.info'.
+COUNT2_debug=`$GREP -c "$TAG2.*user.debug" "$OUT_USER"`
+
+# No info message should enter with selector '*.=debug'.
COUNT3_info=`$GREP -c "$TAG2.*user.info" "$OUT_DEBUG"`
-SUCCESSES=`expr $SUCCESSES + $COUNT + 2 \* $COUNT2 - $COUNT2_debug \
+
+SUCCESSES=`expr $SUCCESSES + $COUNT \
+ + 2 \* $COUNT2 - $COUNT2_debug \
+ 2 \* $COUNT3 - $COUNT3_info`
if [ -n "${VERBOSE+yes}" ]; then
@@ -543,7 +555,45 @@ if [ "$SUCCESSES" -eq "$TESTCASES" ]; then
$silence echo "Successful testing."
EXITCODE=0
else
- $silence echo "Failing some tests."
+ echo "Failing some tests."
+ # Tell about the symptoms.
+
+ # local socket transport
+ if $do_unix_socket; then
+ if grep "$TAG2.*info.*BSD" "$OUT_USER" >/dev/null 2>&1; then
+ :
+ else
+ echo >&2 '** UDP socket did not convey info msg after HUP.'
+ fi
+ if grep "$TAG2.*debug.*BSD" "$OUT_DEBUG" >/dev/null 2>&1; then
+ :
+ else
+ echo >&2 '** UDP socket did not convey debug msg after HUP.'
+ fi
+ fi # do_unix_socket
+
+ # UDP transport
+ if $do_inet_socket; then
+ if grep "$TAG2.*info.*IPv" "$OUT_USER" >/dev/null 2>&1; then
+ :
+ else
+ echo >&2 '** IP socket did not convey info msg after HUP.'
+ fi
+ if grep "$TAG2.*debug.*IPv" "$OUT_DEBUG" >/dev/null 2>&1; then
+ :
+ else
+ echo >&2 '** IP socket did not convey debug msg after HUP.'
+ fi
+ fi # do_inet_socket
+
+ # Automated build robots fail regularly at registering
+ # any messages in the debug file.
+ if test ! -s "$OUT_USER"; then
+ echo >&2 '**** The file "user.log" was empty. Investigate! ****'
+ fi
+ if test ! -s "$OUT_DEBUG"; then
+ echo >&2 '**** The file "debug.log" was empty. Investigate! ****'
+ fi
fi
# Remove the daemon process.
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 5 ++++
tests/syslogd.sh | 66 +++++++++++++++++++++++++++++++++++++++++++++++------
2 files changed, 63 insertions(+), 8 deletions(-)
hooks/post-receive
--
GNU Inetutils
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [SCM] GNU Inetutils branch, master, updated. inetutils-1_9_1-333-g6a47f40,
Mats Erik Andersson <=