[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[SCM] GNU Inetutils branch, master, updated. inetutils-1_9_2-7-g85ce575
From: |
Mats Erik Andersson |
Subject: |
[SCM] GNU Inetutils branch, master, updated. inetutils-1_9_2-7-g85ce575 |
Date: |
Sat, 15 Feb 2014 11:30:23 +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 85ce575d0b5a444462efa60c3202848a7446b00d (commit)
from 0fcf5db471f8d3ce4c20a19b9baab0d9d735bc31 (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=85ce575d0b5a444462efa60c3202848a7446b00d
commit 85ce575d0b5a444462efa60c3202848a7446b00d
Author: Mats Erik Andersson <address@hidden>
Date: Sat Feb 15 10:08:43 2014 +0100
Corner test case for ifconfig.
GNU/Linux displays problems while bringing up the
interface after an address change.
diff --git a/ChangeLog b/ChangeLog
index 38ede45..e0deed3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2014-02-15 Mats Erik Andersson <address@hidden>
+
+ * tests/ifconfig_modes.sh: Add test case to explain
+ failures to automatically bring the interface up at
+ an address change. GNU/Linux is affected by this.
+
2014-02-14 Mats Erik Andersson <address@hidden>
* ifconfig/flags.c (if_list_flags): Increment counter
diff --git a/tests/ifconfig_modes.sh b/tests/ifconfig_modes.sh
index baa903f..bbd32a7 100644
--- a/tests/ifconfig_modes.sh
+++ b/tests/ifconfig_modes.sh
@@ -152,6 +152,23 @@ check_output () {
}
#
+# For consistency and repeatability, first bring the interface down.
+#
+$silence cat <<-HERE
+ ** Bring interface down with a lone switch:
+ ** ifconfig -i $IFACE --down
+ HERE
+
+$IFCONFIG -i $IFACE --down >/dev/null
+OUTPUT=`get_gnu_output`
+
+echo "$OUTPUT" | grep flags |
+ grep -v "flags UP" >/dev/null ||
+ { echo >&2 'Failed to bring interface down with switch.'
+ increase_status
+ }
+
+#
# Check setting of address, netmask, and broadcast
# address using switches.
#
@@ -174,7 +191,46 @@ check_output "netmask $NETMASK_PATTERN" \
'Failed to set netmask with "--netmask".'
check_output "flags UP" \
- 'Failed to bring interface up while setting address.'
+ 'Failed to bring interface up with address/netmask/broadcast.'
+
+#
+# Diagnose a failure to implicitly bring the interface up.
+#
+echo "$OUTPUT" |
+ grep "flags UP" >/dev/null 2>&1 ||
+ {
+ $silence cat <<-HERE
+ ** Set only address and explicit 'up' switches:
+ ** --interface=$IFACE --address=$ADDRESS --up
+ HERE
+
+ $IFCONFIG --interface=$IFACE --address=$ADDRESS --up >/dev/null
+ OUTPUT=`get_gnu_output`
+
+ check_output "flags UP" \
+ 'Failed to bring interface up with only address.'
+
+ # As a last resort, try a single imperative 'up'.
+ echo "$OUTPUT" |
+ grep "flags UP" >/dev/null 2>&1 ||
+ {
+ $silence cat <<-HERE
+ ** Apply a single switch:
+ ** --interface=$IFACE --up
+ HERE
+
+ $IFCONFIG --interface=$IFACE --up >/dev/null
+ OUTPUT=`get_gnu_output`
+
+ if echo "$OUTPUT" | grep "flags UP" >/dev/null 2>&1
+ then
+ echo >&2 '!!! This platform needs "--up" in splendid isolation.'
+ else
+ echo >&2 'Failed to bring interface up with a single "--up".'
+ STATUS=`expr $STATUS + 1`
+ fi
+ }
+ }
#
# Assign metric and MTU using switches.
@@ -268,6 +324,45 @@ check_output "flags UP" \
'Failed to bring interface up implicitly.'
#
+# Diagnose this last failure.
+#
+echo "$OUTPUT" |
+ grep "flags UP" >/dev/null 2>&1 ||
+ {
+ $silence cat <<-HERE
+ ** Set only address and explicit 'up' switches:
+ ** ifconfig $IFACE $ADDRESS up
+ HERE
+
+ $IFCONFIG $IFACE $ADDRESS up >/dev/null
+ OUTPUT=`get_gnu_output`
+
+ check_output "flags UP" \
+ 'Failed to bring interface up with only address.'
+
+ # As a last resort, try a single imperative 'up'.
+ echo "$OUTPUT" |
+ grep "flags UP" >/dev/null 2>&1 ||
+ {
+ $silence cat <<-HERE
+ ** Apply a single switch:
+ ** ifconfig $IFACE up
+ HERE
+
+ $IFCONFIG $IFACE up >/dev/null
+ OUTPUT=`get_gnu_output`
+
+ if echo "$OUTPUT" | grep "flags UP" >/dev/null 2>&1
+ then
+ echo >&2 '!!! This platform needs specific "ifconfig '$IFACE'
up".'
+ else
+ echo >&2 'Failed to bring interface up with a "ifconfig '$IFACE'
up".'
+ STATUS=`expr $STATUS + 1`
+ fi
+ }
+ }
+
+#
# Assign metric and MTU on command line.
#
$silence cat <<-HERE
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 6 +++
tests/ifconfig_modes.sh | 97 ++++++++++++++++++++++++++++++++++++++++++++++-
2 files changed, 102 insertions(+), 1 deletions(-)
hooks/post-receive
--
GNU Inetutils
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [SCM] GNU Inetutils branch, master, updated. inetutils-1_9_2-7-g85ce575,
Mats Erik Andersson <=