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_9_2-49-gc59065


From: Mats Erik Andersson
Subject: [SCM] GNU Inetutils branch, master, updated. inetutils-1_9_2-49-gc590657
Date: Sat, 28 Feb 2015 22:22:10 +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  c590657f6ab2f2df30c0e2087a90ac2afead2af9 (commit)
      from  02b3e800627bd880b7611afeb55aa98bb50f6710 (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=c590657f6ab2f2df30c0e2087a90ac2afead2af9


commit c590657f6ab2f2df30c0e2087a90ac2afead2af9
Author: Mats Erik Andersson <address@hidden>
Date:   Sat Feb 28 22:52:40 2015 +0100

    Fully configure testing without IPv6.
    
    Set non-standard testing addresses at configuration time.

diff --git a/ChangeLog b/ChangeLog
index 0ca044a..e4da2bd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,10 +1,28 @@
+2015-02-28  Mats Erik Andersson  <address@hidden>
+
+       Fully configure testing without IPv6.
+       Pick up testing addresses for IP and IPv6 at configuration time.
+       Now a BSD jail can successfully test all network services.
+
+       * configure.ac (TARGET, TARGET6): New precious variables.  Set their
+       default values.
+       * tests/Makefile.am (tools_subst): Add TARGET and TARGET to substi-
+       tution rules.
+       * tests/tools.sh.in (TARGET, TARGET6): New variables.
+
+       * tests/ifconfig.sh (TARGET, target): New variables.
+       (find_lo_addr): Replace hardcoded `127.0.0.1' with `$target'.
+       * tests/ping-localhost.sh <ping6>: Add a test `$TEST_IPV6 != no'.
+       * tests/syslogd.sh (TARGET6): Remove surrounding brackets.
+       <$TEST_IPV6 != no>: Enclose `$TARGET6' in brackets for `$LOGGER'.
+
 2015-02-27  Mats Erik Andersson  <address@hidden>
 
        Allow testing without IPv6.
        Configuration with `--disable-ipv6' as well as individual
        tests with `TEST_IPV6=no' need to avoid mandatory IPv6.
 
-       * configure.ac (TEST_IPV6): New exported variable.
+       * configure.ac (TEST_IPV6): New precious variable.
        * tests/Makefile.am (tools_subst): Add substitution of TEST_IPV6.
        * tests/tools.sh.in (TEST_IPV6): New variable.
 
diff --git a/configure.ac b/configure.ac
index ab0691d..3579817 100644
--- a/configure.ac
+++ b/configure.ac
@@ -149,6 +149,8 @@ AC_ARG_VAR(SED, [Location of preferred 'sed' utility.])
 AC_ARG_VAR(DD, [Location of 'dd'.])
 AC_ARG_VAR(MKTEMP, [Location of 'mktemp'.])
 AC_ARG_VAR(NETSTAT, [Location of 'netstat'.])
+AC_ARG_VAR(TARGET, [IP address used while testing. @<:@127.0.0.1@:>@])
+AC_ARG_VAR(TARGET6, [IPv6 address used while testing. @<:@::1@:>@])
 
 gl_INIT
 
@@ -1015,6 +1017,10 @@ case "$host" in
   ;;
 esac
 
+# Typically the loopback addresses, but can be set otherwise.
+TARGET=${TARGET:-127.0.0.1}
+TARGET6=${TARGET6:-::1}
+
 AC_CONFIG_FILES([
 Makefile
 summary.sh
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 7c99faf..fbcf49e 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -102,6 +102,8 @@ tools_subst = sed -e 's,address@hidden@],$(GREP),g' \
              -e 's,address@hidden@],$(DD),g' \
              -e 's,address@hidden@],$(MKTEMP),g' \
              -e 's,address@hidden@],$(NETSTAT),g'\
+             -e 's,address@hidden@],$(TARGET),g'\
+             -e 's,address@hidden@],$(TARGET6),g'\
              -e 's,address@hidden@],$(TEST_IPV6),g'
 
 tools.sh: tools.sh.in Makefile
diff --git a/tests/ifconfig.sh b/tests/ifconfig.sh
index 449411a..f22498d 100755
--- a/tests/ifconfig.sh
+++ b/tests/ifconfig.sh
@@ -36,6 +36,7 @@ The following environment variables are used:
 VERBOSE                Be verbose, if set.
 FORMAT         Test only these output formats.  A list of
                formats is excepted.
+TARGET         Loopback address; defaults to 127.0.0.1.
 
 HERE
     exit 0
@@ -48,6 +49,8 @@ fi
 
 . ./tools.sh
 
+TARGET=${TARGET:-127.0.0.1}
+
 # Executable under test.
 #
 IFCONFIG=${IFCONFIG:-../ifconfig/ifconfig$EXEEXT}
@@ -84,15 +87,17 @@ if test -z "$LO"; then
     exit 1
 fi
 
+target=`echo $TARGET | $SED -e 's,\.,\\\\&,g'`
+
 find_lo_addr () {
    $IFCONFIG ${1+--format=$1} -i $LO | \
-   eval $GREP '"inet .*127\.0\.0\.1"' $bucket 2>/dev/null
+   eval $GREP "'inet .*$target'" $bucket 2>/dev/null
 }
 
 errno=0
 
 # Check for loopback address in all formats displaying the
-# standard address 127.0.0.1.
+# standard address $TARGET, commonly 127.0.0.1.
 #
 for fmt in ${FORMAT:-gnu gnu-one-entry net-tools osf unix}; do
     $silence echo "Checking format $fmt."
diff --git a/tests/ping-localhost.sh b/tests/ping-localhost.sh
index ef1592a..f876c80 100755
--- a/tests/ping-localhost.sh
+++ b/tests/ping-localhost.sh
@@ -54,7 +54,8 @@ $PING -n -c 1 $TARGET || errno=$?
 test $errno -eq 0 || echo "Failed at pinging $TARGET." >&2
 
 # Host might not have been built with IPv6 support.
-test -x $PING6 && { $PING6 -n -c 1 $TARGET6 || errno2=$?; }
+test "$TEST_IPV6" != "no" && test -x $PING6 &&
+    { $PING6 -n -c 1 $TARGET6 || errno2=$?; }
 
 test $errno2 -eq 0 || echo "Failed at pinging $TARGET6." >&2
 
diff --git a/tests/syslogd.sh b/tests/syslogd.sh
index 2091c27..a0c2e9d 100755
--- a/tests/syslogd.sh
+++ b/tests/syslogd.sh
@@ -206,7 +206,7 @@ locate_port () {
 
 # Receivers for INET sockets.
 : ${TARGET:=127.0.0.1}
-: ${TARGET6:=[::1]}
+: ${TARGET6:=::1}
 
 # For testing of critical lengths for UNIX socket names,
 # we need a well defined base directory; choose $TMPDIR.
@@ -434,7 +434,7 @@ if $do_inet_socket; then
        "Sending IPv4 message. (pid $$)"
     if test "$TEST_IPV6" != "no"; then
        TESTCASES=`expr $TESTCASES + 1`
-       $LOGGER -6 -h "$TARGET6:$PORT" -p user.info -t "$TAG" \
+       $LOGGER -6 -h "[$TARGET6]:$PORT" -p user.info -t "$TAG" \
            "Sending IPv6 message. (pid $$)"
     fi
 fi
@@ -558,7 +558,7 @@ if $do_standard_port; then
 
     if test "$TEST_IPV6" != "no"; then
        TESTCASES=`expr $TESTCASES + 1`
-       $LOGGER -6 -h "$TARGET6" -p user.info -t "$TAG" \
+       $LOGGER -6 -h "[$TARGET6]" -p user.info -t "$TAG" \
            "IPv6 to standard port. (pid $$)"
     fi
 fi
diff --git a/tests/tools.sh.in b/tests/tools.sh.in
index de8b387..882d986 100644
--- a/tests/tools.sh.in
+++ b/tests/tools.sh.in
@@ -22,6 +22,8 @@ SED=${SED:address@hidden@}
 DD=${DD:address@hidden@}
 MKTEMP=${MKTEMP:address@hidden@}
 NETSTAT=${NETSTAT:address@hidden@}
+TARGET=${TARGET:address@hidden@}
+TARGET6=${TARGET6:address@hidden@}
 TEST_IPV6=${TEST_IPV6:address@hidden@}
 
 # Variables for signalling presence of a utility:

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

Summary of changes:
 ChangeLog               |   20 +++++++++++++++++++-
 configure.ac            |    6 ++++++
 tests/Makefile.am       |    2 ++
 tests/ifconfig.sh       |    9 +++++++--
 tests/ping-localhost.sh |    3 ++-
 tests/syslogd.sh        |    6 +++---
 tests/tools.sh.in       |    2 ++
 7 files changed, 41 insertions(+), 7 deletions(-)


hooks/post-receive
-- 
GNU Inetutils 



reply via email to

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