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-185-gbfee55f


From: Alfred M. Szmidt
Subject: [SCM] GNU Inetutils branch, master, updated. inetutils-1_8-185-gbfee55f
Date: Tue, 29 Nov 2011 16:16:05 +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  bfee55f68b31152a62d68fef07cec9461fd905a9 (commit)
       via  9e80485a4a209dab94e960ce733f968600285a7f (commit)
       via  d4953310453c7e721e0888df4f1dca6c881649f4 (commit)
      from  ac6d2887d46588e58bbd018c968ddee19e9704f3 (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=bfee55f68b31152a62d68fef07cec9461fd905a9


commit bfee55f68b31152a62d68fef07cec9461fd905a9
Author: Alfred M. Szmidt <address@hidden>
Date:   Tue Nov 29 17:13:47 2011 +0100

    Basic test case for `hostname'.

diff --git a/ChangeLog b/ChangeLog
index 5ff5cec..ad2d939 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
 2011-11-29  Alfred M. Szmidt  <address@hidden>
 
+       Basic test case for `hostname'.
+
+       * tests/Makefile.am (dist_check_SCRIPTS) [ENABLE_hostname]: Added 
hostname.sh.
+       * tests/hostname.sh: New file.
+
+2011-11-29  Alfred M. Szmidt  <address@hidden>
+
        * tests/syslogd.sh: Output verbose output if VERBOSE is true.
 
 2011-11-29  Alfred M. Szmidt  <address@hidden>
diff --git a/tests/Makefile.am b/tests/Makefile.am
index e952218..16b901a 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -54,6 +54,10 @@ endif
 endif
 endif
 
+if ENABLE_hostname
+dist_check_SCRIPTS += hostname.sh
+endif
+
 TESTS = $(check_PROGRAMS) $(dist_check_SCRIPTS)
 
 TESTS_ENVIRONMENT = EXEEXT=$(EXEEXT)
diff --git a/tests/hostname.sh b/tests/hostname.sh
new file mode 100755
index 0000000..cddddf5
--- /dev/null
+++ b/tests/hostname.sh
@@ -0,0 +1,48 @@
+#!/bin/sh
+
+# Copyright (C) 2011 Free Software Foundation, Inc.
+#
+# This file is part of GNU Inetutils.
+#
+# GNU Inetutils is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or (at
+# your option) any later version.
+#
+# GNU Inetutils is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see `http://www.gnu.org/licenses/'.
+
+hostname=${hostname:-../src/hostname$EXEEXT}
+
+if [ $VERBOSE ]; then
+    set -x
+    $hostname --version
+fi
+
+errno=0
+
+$hostname || errno=$?
+test $errno -eq 0 || echo "Failed to get hostname." >&2
+test $errno -eq 0 || exit $errno
+
+test `$hostname` = `uname -n` || errno=$?
+test $errno -eq 0 || echo "Failed to get hostname." >&2
+test $errno -eq 0 || exit $errno
+
+if [ `id -u` != 0 ]; then
+    echo "hostname: skipping tests to set host name"
+else
+    # Only run this if hostname succeeded...
+    if [ $errno -eq 0 ]; then
+       $hostname `$hostname` || errno=$?
+       test $errno -eq 0 || echo "Failed to set hostname." >&2
+       test $errno -eq 0 || exit $errno
+    fi
+fi
+
+exit $errno

http://git.savannah.gnu.org/cgit/inetutils.git/commit/?id=9e80485a4a209dab94e960ce733f968600285a7f


commit 9e80485a4a209dab94e960ce733f968600285a7f
Author: Alfred M. Szmidt <address@hidden>
Date:   Tue Nov 29 17:10:44 2011 +0100

    tests/syslogd.sh: Output verbose output if VERBOSE is true.

diff --git a/ChangeLog b/ChangeLog
index 29d0ac7..5ff5cec 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2011-11-29  Alfred M. Szmidt  <address@hidden>
 
+       * tests/syslogd.sh: Output verbose output if VERBOSE is true.
+
+2011-11-29  Alfred M. Szmidt  <address@hidden>
+
        Be more robust in checking for IPV6_HOPLIMIT, and
        IPV6_RECVHOPLIMIT.
 
diff --git a/tests/syslogd.sh b/tests/syslogd.sh
index 2a504d7..16daae4 100755
--- a/tests/syslogd.sh
+++ b/tests/syslogd.sh
@@ -110,6 +110,12 @@ TAG="syslogd-test"
 IU_SYSLOGD=./src/syslogd$EXEEXT
 IU_LOGGER=./src/logger$EXEEXT
 
+if [ $VERBOSE ]; then
+    set -x
+    $IU_SYSLOGD --version
+    $IU_LOGGER --version
+fi
+
 # Step out of `tests/', should the invokation
 # have been made there.
 #

http://git.savannah.gnu.org/cgit/inetutils.git/commit/?id=d4953310453c7e721e0888df4f1dca6c881649f4


commit d4953310453c7e721e0888df4f1dca6c881649f4
Author: Alfred M. Szmidt <address@hidden>
Date:   Tue Nov 29 16:44:08 2011 +0100

    Be more robust in checking for IPV6_HOPLIMIT, and IPV6_RECVHOPLIMIT.

diff --git a/ChangeLog b/ChangeLog
index d8366ff..29d0ac7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2011-11-29  Alfred M. Szmidt  <address@hidden>
+
+       Be more robust in checking for IPV6_HOPLIMIT, and
+       IPV6_RECVHOPLIMIT.
+
+       * configure.ac: Rewrite check for IPV6_HOPLIMIT,
+       IPV6_RECVHOPLIMIT, and IPV6_2292HOPLIMIT.  Don't add X prefix to
+       checks related to working_icmp6, have_beyondscope and ipv6.
+
 2011-11-29  Giuseppe Scrivano  <address@hidden>
 
        * tests/syslogd.sh: Use 127.0.0.1 and [::1] instead of localhost as
diff --git a/configure.ac b/configure.ac
index 5ebe9fe..b0e1e49 100644
--- a/configure.ac
+++ b/configure.ac
@@ -309,44 +309,44 @@ AC_ARG_ENABLE([ipv6],
 )
 
 working_ipv6=yes
-if test ! "X$ipv6" = "Xno" && test "X$working_ipv6" = "Xyes"; then
+if test ! "$ipv6" = "no" && test "$working_ipv6" = "yes"; then
   IU_CHECK_MACRO(AF_INET6, [#include <sys/socket.h>], , , working_ipv6=no)
 fi
 
-if test ! "X$ipv6" = "Xno" && test "X$working_ipv6" = "Xyes"; then
+if test ! "$ipv6" = "no" && test "$working_ipv6" = "yes"; then
   IU_CHECK_MACRO(IPV6_V6ONLY, [#include <netinet/in.h>], , , working_ipv6=no)
 fi
 
-if test ! "X$ipv6" = "Xno" && test "X$working_ipv6" = "Xyes"; then
+if test ! "$ipv6" = "no" && test "$working_ipv6" = "yes"; then
   AC_CHECK_TYPE(struct sockaddr_storage, , working_ipv6=no, [#include 
<sys/socket.h>])
 fi
 
-if test ! "X$ipv6" = "Xno" && test "X$working_ipv6" = "Xyes"; then
+if test ! "$ipv6" = "no" && test "$working_ipv6" = "yes"; then
   AC_CHECK_TYPE(struct sockaddr_in6, , working_ipv6=no, [#include <sys/types.h>
 #include <netinet/in.h>])
 fi
 
-if test ! "X$ipv6" = "Xno" && test "X$working_ipv6" = "Xyes"; then
+if test ! "$ipv6" = "no" && test "$working_ipv6" = "yes"; then
   AC_CHECK_TYPE(struct addrinfo, , working_ipv6=no, [#include <netdb.h>])
 fi
 
-if test ! "X$ipv6" = "Xno" && test "X$working_ipv6" = "Xyes"; then
+if test ! "$ipv6" = "no" && test "$working_ipv6" = "yes"; then
   AC_CHECK_FUNC(getnameinfo, ,working_ipv6=no, [#include <netdb.h>])
 fi
 
-if test ! "X$ipv6" = "Xno" && test "X$working_ipv6" = "Xyes"; then
+if test ! "$ipv6" = "no" && test "$working_ipv6" = "yes"; then
   AC_DEFINE([IPV6], 1, [Define to one if you want IPv6.])
 else
-  if test "X$ipv6" = "Xyes"; then
+  if test "$ipv6" = "yes"; then
     AC_MSG_FAILURE([IPv6 support not available])
   else
-    if test "X$ipv6" = "Xauto"; then
+    if test "$ipv6" = "auto"; then
       AC_MSG_WARN([IPv6 support not available, disabling IPv6])
     fi
   fi
 fi
 
-if test "X$ipv6" = "Xno" || test "X$working_ipv6" = "Xno";then
+if test "$ipv6" = "no" || test "$working_ipv6" = "no";then
   ping6_BUILD=''
 else
   working_icmp6=yes
@@ -357,7 +357,7 @@ else
                   #include <sys/socket.h>
                   #include <netinet/in.h>])])
 
-  if test "X$working_icmp6" = "Xyes"; then
+  if test "$working_icmp6" = "yes"; then
     AC_CHECK_HEADER(netinet/ip6.h, , working_icmp6=no,
       [IU_FLUSHLEFT([#ifdef HAVE_SYS_TYPES_H
                     # include <sys/types.h>
@@ -367,7 +367,7 @@ else
 
   fi
 
-  if test "X$working_icmp6" = "Xyes"; then
+  if test "$working_icmp6" = "yes"; then
     AC_CHECK_TYPE(struct icmp6_filter, , working_icmp6=no,
       [IU_FLUSHLEFT([#ifdef HAVE_SYS_TYPES_H
                     # include <sys/types.h>
@@ -377,7 +377,7 @@ else
                     #include <netinet/icmp6.h>])])
   fi
 
-  if test "X$working_icmp6" = "Xyes"; then
+  if test "$working_icmp6" = "yes"; then
     AC_CHECK_TYPE(struct icmp6_hdr, , working_icmp6=no,
       [IU_FLUSHLEFT([#ifdef HAVE_SYS_TYPES_H
                     # include <sys/types.h>
@@ -387,22 +387,47 @@ else
                     #include <netinet/icmp6.h>])])
   fi
 
-  if test "X$working_icmp6" = "Xyes"; then
+  if test "$working_icmp6" = "yes"; then
+    IU_CHECK_MACRO(IPV6_HOPLIMIT, [#include <netinet/in.h>], ,
+                  [have_hoplimit=yes], [have_hoplimit=no])
+    IU_CHECK_MACRO(IPV6_2292HOPLIMIT, [#include <netinet/in.h>], ,
+                  [have_2292hoplimit=yes], [have_2292hoplimit=no])
     IU_CHECK_MACRO(IPV6_RECVHOPLIMIT, [#include <netinet/in.h>], ,
-                  [have_recvhoplimt=yes], [have_recvhoplimt=no])
-    IU_CHECK_MACRO(IPV6_2292HOPLIMIT, [#include <netinet/in.h>], , [
+                  [have_recvhoplimit=yes], [have_recvhoplimit=no])
+
+    # Reset, ping6 can't compile without HOPLIMIT/RECVHOPLIMIT (or
+    # similar).
+    working_icmp6=no
+
+    if test $have_recvhoplimit = yes && test $have_hoplimit = yes; then
+      # ping6 uses HOPLIMIT and RECVLIMIT, if those exist, happy happy
+      # joy joy.
+      working_icmp6=yes
+    fi
+
+    if test $have_2292hoplimit = yes && test $have_hoplimit = no; then
+      # Some systems (BSDs) define these macros prefixed with "2292",
+      # violating RFC 2292; work around it.
       AC_DEFINE([IPV6_HOPLIMIT], IPV6_2292HOPLIMIT,
+                [Define to IPV6_2292HOPLIMIT if not available])
+      have_hoplimit=yes
+      working_icmp6=yes
+    fi
+
+    if test $have_recvhoplimit = no && test $have_hoplimit = yes; then
+      # There exist strange systems (FIXME: which ones?) where
+      # RECVHOPLIMIT might not be defined, but HOPLIMIT is.  So define
+      # that.
+      AC_DEFINE([IPV6_RECVHOPLIMIT], IPV6_HOPLIMIT,
                 [Define to IPV6_HOPLIMIT if not available])
-    ], [working_icmp6=no])
-    if test "X$have_recvhoplimt" = "Xno"; then
-      IU_CHECK_MACRO(IPV6_HOPLIMIT, [#include <netinet/in.h>], , [
-        AC_DEFINE([IPV6_RECVHOPLIMIT], IPV6_HOPLIMIT,
-                  [Define to IPV6_HOPLIMIT if not available])
-      ], [working_icmp6=no])
+      working_icmp6=yes
     fi
+
+    # If we got this far then we are SOL, and the reset above takes
+    # care of the rest.
   fi
 
-  if test "X$working_icmp6" = "Xyes"; then
+  if test "$working_icmp6" = "yes"; then
     IU_CHECK_MACRO(ICMP6_DST_UNREACH_BEYONDSCOPE,
                    [#ifdef HAVE_SYS_TYPES_H
                    # include <sys/types.h>
@@ -411,7 +436,7 @@ else
                    #include <netinet/in.h>
                    #include <netinet/icmp6.h>], ,
                   [have_beyondscope=yes], [have_beyondscope=no])
-    if test "X$have_beyondscope" = "Xno"; then
+    if test "$have_beyondscope" = "no"; then
       IU_CHECK_MACRO(ICMP6_DST_UNREACH_NOTNEIGHBOR, [#include 
<netinet/icmp6.h>], , [
         AC_DEFINE([ICMP6_DST_UNREACH_BEYONDSCOPE], 
ICMP6_DST_UNREACH_NOTNEIGHBOR,
                   [Define to ICMP6_DST_UNREACH_NOTNEIGHBOR if not available])
@@ -419,7 +444,7 @@ else
     fi
   fi
 
-  if test "X$working_icmp6" = "Xno"; then
+  if test "$working_icmp6" = "no"; then
     AC_MSG_WARN([ICMPv6 support not available, disabling ping6])
     ping6_BUILD=''
   fi

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

Summary of changes:
 ChangeLog                                |   20 ++++++++
 configure.ac                             |   75 ++++++++++++++++++++----------
 tests/Makefile.am                        |    4 ++
 tests/{ping-localhost.sh => hostname.sh} |   40 ++++++++--------
 tests/syslogd.sh                         |    6 ++
 5 files changed, 100 insertions(+), 45 deletions(-)
 copy tests/{ping-localhost.sh => hostname.sh} (56%)


hooks/post-receive
-- 
GNU Inetutils 



reply via email to

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