From MAILER-DAEMON Fri Feb 27 18:10:19 2015
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1YRU31-00039D-2j
	for mharc-commit-inetutils@gnu.org; Fri, 27 Feb 2015 18:10:19 -0500
Received: from eggs.gnu.org ([2001:4830:134:3::10]:39157)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1YRU2y-000346-5f
	for commit-inetutils@gnu.org; Fri, 27 Feb 2015 18:10:18 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1YRU2v-0005JK-Sz
	for commit-inetutils@gnu.org; Fri, 27 Feb 2015 18:10:16 -0500
Received: from vcs.savannah.gnu.org ([140.186.70.72]:33773)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1YRU2v-0005JA-P9
	for commit-inetutils@gnu.org; Fri, 27 Feb 2015 18:10:13 -0500
Received: from meand by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <gnu@gisladisker.se>) id 1YRU2u-0002ym-H4
	for commit-inetutils@gnu.org; Fri, 27 Feb 2015 23:10:12 +0000
Date: Fri, 27 Feb 2015 23:10:12 +0000
Message-Id: <E1YRU2u-0002ym-H4@vcs.savannah.gnu.org>
To: commit-inetutils@gnu.org
Subject: [SCM] GNU Inetutils  branch, master,
	updated. inetutils-1_9_2-48-g02b3e80
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 654247a94d2934405f74c5576b1068e1a28314bd
X-Git-Newrev: 02b3e800627bd880b7611afeb55aa98bb50f6710
From: Mats Erik Andersson <gnu@gisladisker.se>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 140.186.70.72
X-BeenThere: commit-inetutils@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: CVS commit notices for the GNU Internet utilities
	<commit-inetutils.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/commit-inetutils>,
	<mailto:commit-inetutils-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/commit-inetutils>
List-Post: <mailto:commit-inetutils@gnu.org>
List-Help: <mailto:commit-inetutils-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/commit-inetutils>,
	<mailto:commit-inetutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Fri, 27 Feb 2015 23:10:18 -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  02b3e800627bd880b7611afeb55aa98bb50f6710 (commit)
      from  654247a94d2934405f74c5576b1068e1a28314bd (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=02b3e800627bd880b7611afeb55aa98bb50f6710


commit 02b3e800627bd880b7611afeb55aa98bb50f6710
Author: Mats Erik Andersson <gnu@gisladisker.se>
Date:   Fri Feb 27 23:39:54 2015 +0100

    Allow testing without IPv6.
    
    Pass a semaphor to the test scripts to indicate
    whether to disable IPv6 tests or not.

diff --git a/ChangeLog b/ChangeLog
index b4a91a7..0ca044a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,24 @@
+2015-02-27  Mats Erik Andersson  <gnu@gisladisker.se>
+
+	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.
+	* tests/Makefile.am (tools_subst): Add substitution of TEST_IPV6.
+	* tests/tools.sh.in (TEST_IPV6): New variable.
+
+	* tests/ftp-localhost.sh: Check `$TEST_IPV6 != no' before adding
+	any test cases with IPv6 addressing.
+	* tests/syslogd.sh: Likewise.
+	* tests/telnet-localhost.sh: Likewise.
+	(TARGET46): New variable, defaulting to `::ffff:$TARGET'.
+
+	* tests/tftp.sh (TARGET, TARGET6): New variables.
+	<$ADDRESSES = sense>: Compute this case before building a default
+	address list.  Add switch `-a' when executing $IFCONFIG.
+	(ADDRESSES): Start with TARGET, add TARGET6 if `$TEST_IPV6 != no'.
+
 2015-01-31  Mats Erik Andersson  <gnu@gisladisker.se>
 
 	telnet: Printing of uninitialized characters.
diff --git a/configure.ac b/configure.ac
index 908111e..ab0691d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -420,6 +420,7 @@ AC_ARG_ENABLE([ipv6],
   esac],
   [ipv6=auto]
 )
+AC_SUBST(TEST_IPV6, [$ipv6])
 
 working_ipv6=yes
 if test ! "$ipv6" = "no" && test "$working_ipv6" = "yes"; then
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 6f95e8f..7c99faf 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -101,7 +101,8 @@ tools_subst = sed -e 's,[@]GREP[@],$(GREP),g' \
 	      -e 's,[@]SED[@],$(SED),g' \
 	      -e 's,[@]DD[@],$(DD),g' \
 	      -e 's,[@]MKTEMP[@],$(MKTEMP),g' \
-	      -e 's,[@]NETSTAT[@],$(NETSTAT),g'
+	      -e 's,[@]NETSTAT[@],$(NETSTAT),g'\
+	      -e 's,[@]TEST_IPV6[@],$(TEST_IPV6),g'
 
 tools.sh: tools.sh.in Makefile
 	$(tools_subst) < $(srcdir)/tools.sh.in > $@
diff --git a/tests/ftp-localhost.sh b/tests/ftp-localhost.sh
index 96db3cd..32ff34f 100755
--- a/tests/ftp-localhost.sh
+++ b/tests/ftp-localhost.sh
@@ -260,8 +260,6 @@ fi
 
 cat <<EOT > "$TMPDIR/.netrc"
 machine $TARGET login $FTPUSER password foobar
-machine $TARGET6 login $FTPUSER password foobar
-machine $TARGET46 login $FTPUSER password foobar
 EOT
 
 if test $? -ne 0; then
@@ -269,6 +267,13 @@ if test $? -ne 0; then
     exit 77
 fi
 
+if test "$TEST_IPV6" != "no"; then
+    cat <<-EOT >> "$TMPDIR/.netrc"
+	machine $TARGET6 login $FTPUSER password foobar
+	machine $TARGET46 login $FTPUSER password foobar
+	EOT
+fi
+
 chmod 600 "$TMPDIR/.netrc"
 
 # Some simple, but variable content.
@@ -466,35 +471,36 @@ $FTP "$TARGET" $PORT -N"$TMPDIR/.netrc" -4 -v -t >$TMPDIR/ftp.stdout 2>&1
 
 test_report $? "$TMPDIR/ftp.stdout" "EPRT/$TARGET"
 
-# Test a passive connection: EPSV and IPv6.
-#
-echo "EPSV to $TARGET6 (IPv6) using inetd."
-cat <<STOP |
-rstatus
-dir
-STOP
-HOME=$TMPDIR $FTP "$TARGET6" $PORT -6 -v -p -t >$TMPDIR/ftp.stdout 2>&1
+if test "$TEST_IPV6" != "no" && test -n "$TARGET6"; then
+    # Test a passive connection: EPSV and IPv6.
+    #
+    echo "EPSV to $TARGET6 (IPv6) using inetd."
+    cat <<-STOP |
+	rstatus
+	dir
+	STOP
+    HOME=$TMPDIR $FTP "$TARGET6" $PORT -6 -v -p -t >$TMPDIR/ftp.stdout 2>&1
 
-test_report $? "$TMPDIR/ftp.stdout" "EPSV/$TARGET6"
+    test_report $? "$TMPDIR/ftp.stdout" "EPSV/$TARGET6"
 
-# Test an active connection: EPRT and IPv6.
-#
-echo "EPRT to $TARGET6 (IPv6) using inetd."
-cat <<STOP |
-rstatus
-dir
-`$do_transfer && test -n "$DLDIR" && echo "\
+    # Test an active connection: EPRT and IPv6.
+    #
+    echo "EPRT to $TARGET6 (IPv6) using inetd."
+    cat <<-STOP |
+	rstatus
+	dir
+	`$do_transfer && test -n "$DLDIR" && echo "\
 cd $DLDIR"`
-`$do_transfer && echo "\
+	`$do_transfer && echo "\
 lcd $TMPDIR
 image
 put $GETME $PUTME"`
-STOP
-HOME=$TMPDIR $FTP "$TARGET6" $PORT -6 -v -t >$TMPDIR/ftp.stdout 2>&1
+	STOP
+    HOME=$TMPDIR $FTP "$TARGET6" $PORT -6 -v -t >$TMPDIR/ftp.stdout 2>&1
 
-test_report $? "$TMPDIR/ftp.stdout" "EPRT/$TARGET6"
+    test_report $? "$TMPDIR/ftp.stdout" "EPRT/$TARGET6"
 
-$do_transfer && \
+    $do_transfer && \
     if cmp -s "$TMPDIR/$GETME" "$FTPHOME$DLDIR/$PUTME"; then
 	test "${VERBOSE+yes}" && echo >&2 'Binary transfer succeeded.'
 	date "+%s" >> "$TMPDIR/$GETME"
@@ -502,6 +508,7 @@ $do_transfer && \
 	echo >&2 'Binary transfer failed.'
 	exit 1
     fi
+fi # TEST_IPV6
 
 # Availability of IPv4-mapped IPv6 addresses.
 #
@@ -556,7 +563,8 @@ fi
 
 # Test functionality of IPv4-mapped IPv6 addresses.
 #
-if $have_address_mapping && test -n "$TARGET46" ; then
+if $have_address_mapping && test -n "$TARGET46" &&
+   test "$TEST_IPV6" != "no"; then
     # Test a passive connection: EPSV and IPv4-mapped-IPv6.
     #
     echo "EPSV to $TARGET46 (IPv4-as-IPv6) using inetd."
@@ -610,7 +618,7 @@ put $GETME $PUTME"`
 else
     # The IPv4-as-IPv6 tests were not performed.
     echo 'Skipping two tests of IPv4 mapped as IPv6.'
-fi
+fi # have_address_mapping && TEST_IPV6
 
 # Test name mapping with PASV and IPv4.
 # Needs a writable destination!
diff --git a/tests/syslogd.sh b/tests/syslogd.sh
index 6acfeb4..2091c27 100755
--- a/tests/syslogd.sh
+++ b/tests/syslogd.sh
@@ -429,11 +429,14 @@ if $do_socket_length; then
 fi
 
 if $do_inet_socket; then
-    TESTCASES=`expr $TESTCASES + 2`
+    TESTCASES=`expr $TESTCASES + 1`
     $LOGGER -4 -h "$TARGET:$PORT" -p user.info -t "$TAG" \
 	"Sending IPv4 message. (pid $$)"
-    $LOGGER -6 -h "$TARGET6:$PORT" -p user.info -t "$TAG" \
-	"Sending IPv6 message. (pid $$)"
+    if test "$TEST_IPV6" != "no"; then
+	TESTCASES=`expr $TESTCASES + 1`
+	$LOGGER -6 -h "$TARGET6:$PORT" -p user.info -t "$TAG" \
+	    "Sending IPv6 message. (pid $$)"
+    fi
 fi
 
 # Generate a more elaborate message routing, aimed at confirming
@@ -537,7 +540,6 @@ locate_port $PROTO 514 && do_standard_port=false
 
 if $do_standard_port; then
     echo 'Checking also standard port 514/udp.' >&2
-    TESTCASES=`expr $TESTCASES + 2`
 
     # New configuration, but continuing old message file.
     rm -f "$PID"
@@ -549,10 +551,16 @@ if $do_standard_port; then
     $SYSLOGD --rcfile="$CONF" --pidfile="$PID" --socket='' \
 	--inet --ipany $OPTIONS
     sleep 1
+
+    TESTCASES=`expr $TESTCASES + 1`
     $LOGGER -4 -h "$TARGET" -p user.info -t "$TAG" \
 	"IPv4 to standard port. (pid $$)"
-    $LOGGER -6 -h "$TARGET6" -p user.info -t "$TAG" \
-	"IPv6 to standard port. (pid $$)"
+
+    if test "$TEST_IPV6" != "no"; then
+	TESTCASES=`expr $TESTCASES + 1`
+	$LOGGER -6 -h "$TARGET6" -p user.info -t "$TAG" \
+	    "IPv6 to standard port. (pid $$)"
+    fi
 fi
 
 # Delay detection due to observed race condition.
diff --git a/tests/telnet-localhost.sh b/tests/telnet-localhost.sh
index 155a54a..929ce2e 100755
--- a/tests/telnet-localhost.sh
+++ b/tests/telnet-localhost.sh
@@ -43,6 +43,7 @@ The following environment variables are used:
 VERBOSE		Be verbose, if set.
 TARGET		Receiving IPv4 address.
 TARGET6		Receiving IPv6 address.
+TARGET46	Receiving IPv4-mapped-IPV6 address.
 
 HERE
     exit 0
@@ -61,7 +62,7 @@ ADDRPEEK=${ADDRPEEK:-./addrpeek$EXEEXT}
 # Selected targets.
 TARGET=${TARGET:-127.0.0.1}
 TARGET6=${TARGET6:-::1}
-TARGET46="::ffff:$TARGET"
+TARGET46=${TARGET46:-::ffff:$TARGET}
 
 # Step into `tests/', should the invokation
 # have been made outside of it.
@@ -133,13 +134,18 @@ PORT=`expr 4973 + ${RANDOM:-$$} % 973`
 
 cat > "$INETD_CONF" <<-EOF ||
 	$TARGET:$PORT stream tcp4 nowait $USER $ADDRPEEK addrpeek addr
-	$TARGET6:$PORT stream tcp6 nowait $USER $ADDRPEEK addrpeek addr
 EOF
     {
 	echo 'Could not create configuration file for Inetd.  Aborting.' >&2
 	exit 1
     }
 
+if test "$TEST_IPV6" != "no"; then
+    cat >> "$INETD_CONF" <<-EOF
+	$TARGET6:$PORT stream tcp6 nowait $USER $ADDRPEEK addrpeek addr
+EOF
+fi
+
 # Must use '-d' consistently to prevent daemonizing, but we
 # would like to suppress the verbose output.
 #
@@ -183,7 +189,7 @@ if test -n "$TARGET"; then
     fi
 fi
 
-if test -n "$TARGET6"; then
+if test "$TEST_IPV6" != "no" && test -n "$TARGET6"; then
     output=`$TELNET $telnet_opts $TARGET6 $PORT 2>/dev/null`
     echo "$output" | eval "$GREP 'Your address is $TARGET6.' $display"
     if test $? -ne 0; then
@@ -192,7 +198,7 @@ if test -n "$TARGET6"; then
     fi
 fi
 
-if test -n "$TARGET46"; then
+if test "$TEST_IPV6" != "no" && test -n "$TARGET46"; then
     output=`$TELNET $telnet_opts $TARGET46 $PORT 2>/dev/null`
     echo "$output" | eval "$GREP 'Your address is .*$TARGET.' $display"
     if test $? -ne 0; then
diff --git a/tests/tftp.sh b/tests/tftp.sh
index 797035b..fac2e44 100755
--- a/tests/tftp.sh
+++ b/tests/tftp.sh
@@ -44,6 +44,12 @@
 #  * (root only) Reload configuration for chrooted mode.
 #    Read one binary file with a relative name, and one ascii
 #    file with absolute location.
+#
+# The values of TARGET and TARGET6 replace the loopback addresses
+# 127.0.0.1 and ::1, whenever the variables are set.  However,
+# Setting the variable ADDRESSES to a list of addresses takes
+# precedence over all other choices.  The particular value "sense"
+# tries to find all local addresses, then go ahead with these.
 
 . ./tools.sh
 
@@ -139,17 +145,21 @@ posttesting () {
 
 trap posttesting EXIT HUP INT QUIT TERM
 
-# Use only "127.0.0.1 ::1" as default address list.
+# Use only "127.0.0.1 ::1" as default address list,
+# but take account of TARGET and TARGET6.
 # Other configured addresses might be set under
 # strict filter policies, thus might block.
 #
 # Allow a setting "ADDRESSES=sense" to compute the
 # available addresses and then to test them all.
-ADDRESSES="${ADDRESSES:-127.0.0.1 ::1}"
+if test "$ADDRESSES" = "sense"; then
+    ADDRESSES=`$IFCONFIG -a | $SED -e "/$AF /!d" \
+	-e "s/^.*$AF \([:.0-9]\{1,\}\) .*$/\1/g"`
+fi
 
-if [ "$ADDRESSES" = "sense" ]; then
-    ADDRESSES="`$IFCONFIG | $SED -e "/$AF /!d" \
-	-e "s/^.*$AF \([:.0-9]\{1,\}\) .*$/\1/g"`"
+if test -z "$ADDRESSES"; then
+    ADDRESSES="${TARGET:-127.0.0.1}"
+    test "$TEST_IPV6" = "no" || ADDRESSES="$ADDRESSES ${TARGET6:-::1}"
 fi
 
 # Work around the peculiar output of netstat(1m,solaris).
diff --git a/tests/tools.sh.in b/tests/tools.sh.in
index ad4fee7..de8b387 100644
--- a/tests/tools.sh.in
+++ b/tests/tools.sh.in
@@ -22,6 +22,7 @@ SED=${SED:-@SED@}
 DD=${DD:-@DD@}
 MKTEMP=${MKTEMP:-@MKTEMP@}
 NETSTAT=${NETSTAT:-@NETSTAT@}
+TEST_IPV6=${TEST_IPV6:-@TEST_IPV6@}
 
 # Variables for signalling presence of a utility:
 #

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

Summary of changes:
 ChangeLog                 |   21 ++++++++++++++++
 configure.ac              |    1 +
 tests/Makefile.am         |    3 +-
 tests/ftp-localhost.sh    |   58 +++++++++++++++++++++++++-------------------
 tests/syslogd.sh          |   20 +++++++++++----
 tests/telnet-localhost.sh |   14 +++++++---
 tests/tftp.sh             |   20 +++++++++++----
 tests/tools.sh.in         |    1 +
 8 files changed, 97 insertions(+), 41 deletions(-)


hooks/post-receive
-- 
GNU Inetutils 


From MAILER-DAEMON Sat Feb 28 17:22:16 2015
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1YRpm4-0000iY-13
	for mharc-commit-inetutils@gnu.org; Sat, 28 Feb 2015 17:22:16 -0500
Received: from eggs.gnu.org ([2001:4830:134:3::10]:34598)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1YRpm1-0000hi-55
	for commit-inetutils@gnu.org; Sat, 28 Feb 2015 17:22:14 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1YRplz-0000kD-4Z
	for commit-inetutils@gnu.org; Sat, 28 Feb 2015 17:22:12 -0500
Received: from vcs.savannah.gnu.org ([140.186.70.72]:45653)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <gnu@gisladisker.se>) id 1YRplz-0000k7-1i
	for commit-inetutils@gnu.org; Sat, 28 Feb 2015 17:22:11 -0500
Received: from meand by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <gnu@gisladisker.se>) id 1YRply-0000oV-9P
	for commit-inetutils@gnu.org; Sat, 28 Feb 2015 22:22:10 +0000
Date: Sat, 28 Feb 2015 22:22:10 +0000
Message-Id: <E1YRply-0000oV-9P@vcs.savannah.gnu.org>
To: commit-inetutils@gnu.org
Subject: [SCM] GNU Inetutils  branch, master,
	updated. inetutils-1_9_2-49-gc590657
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 02b3e800627bd880b7611afeb55aa98bb50f6710
X-Git-Newrev: c590657f6ab2f2df30c0e2087a90ac2afead2af9
From: Mats Erik Andersson <gnu@gisladisker.se>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 140.186.70.72
X-BeenThere: commit-inetutils@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: CVS commit notices for the GNU Internet utilities
	<commit-inetutils.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/commit-inetutils>,
	<mailto:commit-inetutils-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/commit-inetutils>
List-Post: <mailto:commit-inetutils@gnu.org>
List-Help: <mailto:commit-inetutils-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/commit-inetutils>,
	<mailto:commit-inetutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Sat, 28 Feb 2015 22:22:14 -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 <gnu@gisladisker.se>
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  <gnu@gisladisker.se>
+
+	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  <gnu@gisladisker.se>
 
 	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,[@]GREP[@],$(GREP),g' \
 	      -e 's,[@]DD[@],$(DD),g' \
 	      -e 's,[@]MKTEMP[@],$(MKTEMP),g' \
 	      -e 's,[@]NETSTAT[@],$(NETSTAT),g'\
+	      -e 's,[@]TARGET[@],$(TARGET),g'\
+	      -e 's,[@]TARGET6[@],$(TARGET6),g'\
 	      -e 's,[@]TEST_IPV6[@],$(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:-@SED@}
 DD=${DD:-@DD@}
 MKTEMP=${MKTEMP:-@MKTEMP@}
 NETSTAT=${NETSTAT:-@NETSTAT@}
+TARGET=${TARGET:-@TARGET@}
+TARGET6=${TARGET6:-@TARGET6@}
 TEST_IPV6=${TEST_IPV6:-@TEST_IPV6@}
 
 # 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 


