commit-inetutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[SCM] GNU Inetutils branch, master, updated. inetutils-1_8-179-g4088071


From: Mats Erik Andersson
Subject: [SCM] GNU Inetutils branch, master, updated. inetutils-1_8-179-g4088071
Date: Sat, 26 Nov 2011 20:59:11 +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  4088071c2f55192e81dc77e64c28672d7313bbba (commit)
      from  a4638103d3091c4c95e2d13bcc2b7c2fa08cf994 (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=4088071c2f55192e81dc77e64c28672d7313bbba


commit 4088071c2f55192e81dc77e64c28672d7313bbba
Author: Mats Erik Andersson <address@hidden>
Date:   Sat Nov 26 21:57:48 2011 +0100

    Allow tests to return skip code instead of failure.

diff --git a/ChangeLog b/ChangeLog
index 11926d4..5449692 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2011-11-26  Mats Erik Andersson <address@hidden>
 
+       * tests/tftp.sh: Return skip code if INET port is already in use.
+       * tests/syslogd.sh: Likewise. Implement the corresponding test.
+       (PORT, PROTO): New variables.
+
+2011-11-26  Mats Erik Andersson <address@hidden>
+
        * tests/tftp.sh (INETD_PID): New variable; allows better robustness.
        Improve patterns to fit also BSD.
 
diff --git a/tests/syslogd.sh b/tests/syslogd.sh
index 4d52773..c9ee342 100755
--- a/tests/syslogd.sh
+++ b/tests/syslogd.sh
@@ -68,6 +68,11 @@ PID=$IU_TESTDIR/syslogd.pid
 OUT=$IU_TESTDIR/messages
 : ${SOCKET:=$IU_TESTDIR/log}
 
+# Test at this port.
+# Standard is syslog at 514/udp.
+PROTO=udp
+PORT=514
+
 # For testing of critical lengths for UNIX socket names,
 # we need a well defined base directory; choose "/tmp/".
 IU_TEN=0123456789
@@ -113,13 +118,13 @@ IU_LOGGER=./src/logger$EXEEXT
 if [ ! -x $IU_SYSLOGD ]; then
        echo "Missing executable 'syslogd'. Failing."
        clean_testdir
-       exit 1;
+       exit 77
 fi
 
 if [ ! -x $IU_LOGGER ]; then
        echo "Missing executable 'logger'. Failing."
        clean_testdir
-       exit 1
+       exit 77
 fi
 
 # Remove old messages.
@@ -132,6 +137,15 @@ if [ "$USER" != "root" ]; then
        Disabling INET server tests since you seem
        to be underprivileged.
        EOT
+else
+       # Is the INET port already in use? If so,
+       # skip the test in its entirety.
+       netstat -na | grep -q -E "^$PROTO(4|6|46)? .*$PORT "
+       if [ $? -eq 0 ]; then
+               echo "The INET port $PORT/$PROTO is already in use."
+               echo "No reliable test is possible."
+               exit 77
+       fi
 fi
 
 # A minimal, catch-all configuration.
diff --git a/tests/tftp.sh b/tests/tftp.sh
index 023b0d7..b880581 100755
--- a/tests/tftp.sh
+++ b/tests/tftp.sh
@@ -54,7 +54,7 @@ fi
 netstat -na | grep -q -E "^$PROTO(4|6|46)? .*$PORT "
 if test $? -eq 0; then
     echo "Desired port $PORT/$PROTO is already in use."
-    exit 1
+    exit 77
 fi
 
 # Create `inetd.conf'.  Note: We want $TFTPD to be an absolute file

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog        |    6 ++++++
 tests/syslogd.sh |   18 ++++++++++++++++--
 tests/tftp.sh    |    2 +-
 3 files changed, 23 insertions(+), 3 deletions(-)


hooks/post-receive
-- 
GNU Inetutils 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]