[S] Change in openvpn[master]: t_client.sh.in: Check whether addresses are in "tentative" state
"flichtenheld \(Code Review\) via Openvpn-devel" <[email protected]>
| Newsgroups | gmane.network.openvpn.devel |
|---|---|
| Message-ID | <[email protected]> |
Attention is currently required from: plaisthos.
Hello plaisthos,
I'd like you to do a code review.
Please visit
http://gerrit.openvpn.net/c/openvpn/+/1882?usp=email
to review the following change.
Change subject: t_client.sh.in: Check whether addresses are in "tentative" state
......................................................................
t_client.sh.in: Check whether addresses are in "tentative" state
We see this sometimes with IPv6 addresses (especially
in t_server context). Make sure we wait until the
tentative state is removed. Otherwise we might get
spurious failures on comparing state.
Change-Id: I07b373851175d865abdb1513f90655b3fa31d5fa
Signed-off-by: Frank Lichtenheld <[email protected]>
---
M tests/t_client.sh.in
1 file changed, 17 insertions(+), 0 deletions(-)
git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/82/1882/1
diff --git a/tests/t_client.sh.in b/tests/t_client.sh.in
index 0568007..017668b 100755
--- a/tests/t_client.sh.in
+++ b/tests/t_client.sh.in
@@ -264,6 +264,20 @@
}
# ----------------------------------------------------------
+# check ifconfig output on whether some address is in "tentative" state
+# repeats calling get_ifconfig_route until it does not
+# arg1: log file
+check_tentative_state()
+{
+ logfile="$1"
+ while grep -q tentative $logfile; do
+ output "waiting for tentative state to end"
+ sleep 1
+ get_ifconfig_route >$logfile
+ done
+}
+
+# ----------------------------------------------------------
# check ifconfig
# arg1: "4" or "6" -> for message
# arg2: IPv4/IPv6 address that must show up in out of "get_ifconfig_route"
@@ -392,6 +406,7 @@
output "save pre-openvpn ifconfig + route"
get_ifconfig_route >$LOGDIR/$SUF:ifconfig_route_pre.txt
+ check_tentative_state $LOGDIR/$SUF:ifconfig_route_pre.txt
output "\nrun pre-openvpn ping tests - targets must not be reachable..."
run_ping_tests 4 want_fail "$ping4_hosts"
@@ -498,6 +513,7 @@
# compare whether anything changed in ifconfig/route setup?
output "save ifconfig+route"
get_ifconfig_route >$LOGDIR/$SUF:ifconfig_route.txt
+ check_tentative_state $LOGDIR/$SUF:ifconfig_route.txt
if [ "$expect_ifconfig4" = "-" ]; then
output "skip ifconfig+route check"
@@ -535,6 +551,7 @@
output "\nsave post-openvpn ifconfig + route..."
get_ifconfig_route >$LOGDIR/$SUF:ifconfig_route_post.txt
+ check_tentative_state $LOGDIR/$SUF:ifconfig_route_post.txt
output -n "compare pre- and post-openvpn ifconfig + route..."
if diff $LOGDIR/$SUF:ifconfig_route_pre.txt \
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1882?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I07b373851175d865abdb1513f90655b3fa31d5fa
Gerrit-Change-Number: 1882
Gerrit-PatchSet: 1
Gerrit-Owner: flichtenheld <[email protected]>
Gerrit-Reviewer: plaisthos <[email protected]>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]>
_______________________________________________
Openvpn-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel