Gert Doering has uploaded a new patch set (#3) to the change originally created 
by Răzvan Cojocaru. ( https://gerrit.openvpn.net/c/openvpn/+/2372?usp=email )

The following approvals got outdated and were removed:
Code-Review+2 by Gert Doering


Change subject: t_client: don't abort the script on a stuck tentative state
......................................................................

t_client: don't abort the script on a stuck tentative state

Fail only the affected test run instead of exiting the script. Before
openvpn starts, skip the run and clean up. While it runs, record the
failure and carry on. Drop the post-openvpn check: anything left over
from openvpn already fails the pre/post comparison.

Github: closes OpenVPN/openvpn#1161
Change-Id: Ie62221eb8256a6691e4fccaef2e1eb0e8f49c835
Signed-off-by: Razvan Cojocaru <[email protected]>
Acked-by: Gert Doering <[email protected]>
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/2372
Message-Id: <[email protected]>
URL: 
https://lore.kernel.org/openvpn-devel/[email protected]
Signed-off-by: Gert Doering <[email protected]>
---
M tests/t_client.sh.in
1 file changed, 10 insertions(+), 10 deletions(-)


  git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/72/2372/3

diff --git a/tests/t_client.sh.in b/tests/t_client.sh.in
index d81cef0..4037d5a 100755
--- a/tests/t_client.sh.in
+++ b/tests/t_client.sh.in
@@ -265,7 +265,7 @@

 # ----------------------------------------------------------
 # check ifconfig output on whether some address is in "tentative" state
-# repeats calling get_ifconfig_route until it does not
+# repeats calling get_ifconfig_route until it does not, fails after 30s
 #  arg1: log file
 check_tentative_state()
 {
@@ -414,8 +414,15 @@
     output "save pre-openvpn ifconfig + route"
     get_ifconfig_route >$LOGDIR/$SUF:ifconfig_route_pre.txt
     if ! check_tentative_state $LOGDIR/$SUF:ifconfig_route_pre.txt; then
+        output "skip rest of sub-tests for test run $SUF."
+        SUMMARY_FAIL="$SUMMARY_FAIL $SUF"
+        exit_code=30
         printf "$outbuf"
-        exit 1
+        if [ -n "$test_cleanup" ]; then
+            echo "cleaning up: '$test_cleanup'"
+            eval $test_cleanup
+        fi
+        continue
     fi

     output "\nrun pre-openvpn ping tests - targets must not be reachable..."
@@ -523,10 +530,7 @@
     # compare whether anything changed in ifconfig/route setup?
     output "save ifconfig+route"
     get_ifconfig_route >$LOGDIR/$SUF:ifconfig_route.txt
-    if ! check_tentative_state $LOGDIR/$SUF:ifconfig_route.txt; then
-        printf "$outbuf"
-        exit 1
-    fi
+    check_tentative_state $LOGDIR/$SUF:ifconfig_route.txt

     if [ "$expect_ifconfig4" = "-" ]; then
         output "skip ifconfig+route check"
@@ -564,10 +568,6 @@

     output "\nsave post-openvpn ifconfig + route..."
     get_ifconfig_route >$LOGDIR/$SUF:ifconfig_route_post.txt
-    if ! check_tentative_state $LOGDIR/$SUF:ifconfig_route_post.txt; then
-        printf "$outbuf"
-        exit 1
-    fi

     output -n "compare pre- and post-openvpn ifconfig + route..."
     if diff $LOGDIR/$SUF:ifconfig_route_pre.txt \

--
To view, visit https://gerrit.openvpn.net/c/openvpn/+/2372?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.openvpn.net/settings?usp=email

Gerrit-MessageType: newpatchset
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Ie62221eb8256a6691e4fccaef2e1eb0e8f49c835
Gerrit-Change-Number: 2372
Gerrit-PatchSet: 3
Gerrit-Owner: Răzvan Cojocaru <[email protected]>
Gerrit-Reviewer: Arne Schwabe <[email protected]>
Gerrit-Reviewer: Gert Doering <[email protected]>
Gerrit-CC: openvpn-devel <[email protected]>
_______________________________________________
Openvpn-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel

Reply via email to