]> git.ipfire.org Git - thirdparty/openvpn.git/commitdiff
Do not abort t_client run if OpenVPN instance does not start.
authorGert Doering <gert@greenie.muc.de>
Tue, 13 Sep 2016 20:04:58 +0000 (22:04 +0200)
committerDavid Sommerseth <davids@openvpn.net>
Fri, 16 Sep 2016 15:04:33 +0000 (17:04 +0200)
Basically, an oversight - if one test instance does not start at all
(due to "tap driver not loaded") the whole script would exit, instead
of logging the failing instance and proceeding to the next test run.

Signed-off-by: Gert Doering <gert@greenie.muc.de>
Acked-by: David Sommerseth <davids@openvpn.net>
Message-Id: 20160913200458.9906-1-gert@greenie.muc.de
URL: http://www.mail-archive.com/search?l=mid&q=20160913200458.9906-1-gert@greenie.muc.de
Signed-off-by: David Sommerseth <davids@openvpn.net>
tests/t_client.sh.in

index 9a0af93a0d1734fb38765822583c1b2489664ee2..62d6730710735c717b0f35d3752aab528b7c5467 100755 (executable)
@@ -279,10 +279,14 @@ do
     if $RUN_SUDO kill -0 $opid
     then :
     else
-       echo -e "OpenVPN process has failed to start up, check log ($LOGDIR/$SUF:openvpn.log).  FAIL.\ntail of logfile follows:\n..." >&2
-       tail $LOGDIR/$SUF:openvpn.log >&2
+       fail "OpenVPN process has failed to start up, check log ($LOGDIR/$SUF:openvpn.log)."
+       echo "tail -5 $SUF:openvpn.log" >&2
+       tail -5 $LOGDIR/$SUF:openvpn.log >&2
+       echo -e "\nFAIL. skip rest of sub-tests for test run $SUF.\n" >&2
        trap - 0 1 2 3 15
-       exit 10
+       SUMMARY_FAIL="$SUMMARY_FAIL $SUF"
+       exit_code=30
+       continue
     fi
 
     # compare whether anything changed in ifconfig/route setup?