Do not abort t_client run if OpenVPN instance does not start.
PATCH 1/1 Do not abort t_client run if OpenVPN instance does not start.
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.
--- tests/t_client.sh.in | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-)
tests/t_client.sh.in +7 -3
@@ -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?
Signature · 1 line
2.9.0
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Quoted 21 lines · Gert Doering
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 <[email protected]...> ---tests/t_client.sh.in | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-)
tests/t_client.sh.in index renamed from tests/t_client.sh.in +0
-09a0af93..62d6730 100755 --- a/tests/t_client.sh.in +++ b/tests/t_client.sh.in @@ -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" >&2tests/t_client.sh.in index renamed from tests/t_client.sh.in +1
-0+ tail -5 $LOGDIR/$SUF:openvpn.log >&2 + echo -e "\nFAIL. skip restof sub-tests for test run $SUF.\n" >&2 trap - 0 1 2 3 15 - exit 10
tests/t_client.sh.in index renamed from tests/t_client.sh.in +1
-0+ SUMMARY_FAIL="$SUMMARY_FAIL $SUF" + exit_code=30 + continue fi
Quoted 2 lines
# compare whether anything changed in ifconfig/route setup?
ACK. This looks reasonable and if I know Gert well enough, this is also tested.
- --
kind regards,
David Sommerseth
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (GNU/Linux)
iQIcBAEBAgAGBQJX2/1uAAoJEIbPlEyWcf3yBigP+wRnqdDlL8TmYZlK4pJspQKk nHfFrm1mWCJhZYlkeAlTtFrXF2K4/l/kPImdb/w5vLLdY2jT3+AxKulTcm5FVa1s NKPhOAD/SqAzjLACWhFBK2buwFPfHzobuey821rHTNlmaNXcrMTlEntsu+hPVGyJ jlx5Zx5Dez1JF8RbON8X1Q8bshd7cAqYMcxeUQA1xHE6EpdUDm8yLPc5tdhoMpFe a1To6BX2X7dkZb+NE8ZhHGylOgRUBseTH+EVwKkC/AftglrmVOWKVn5hIpn5HCeS 2D/gWVeSE7F8YzOktEJEwTnE2yx3YSdoqqeFCK02HIetuBs9sH2n2lLFx0VJ9Fe9 4sLdqysJ1fZaNU6Se5/LuidUycqgDeZ8zI+GBINFPjK8VGWxZ7kSK1q9zKPneEBM dinvB8y2etlTxsvJXiA6tH/CgfzZYwuxoWcjxcqK2LsfnKxzv8QRDQq3shALrKMe QG7CI0ioWWONYe8j7UGQytnw5nVLH5Z2Wla+JBU1D9YN8K6HWPGw0ko6TjBwRlvJ 2eyQmO54Fq4EnwBvoDjqJYmNdeiP5/zhYalCryvp8Kdrbv6NXUzDXmVYaNcm+0+p egJ7gh+cYvCOsbVpJ3ziZoe9aAw/+hh1BR1tGkmPPTHMFfcxTRyQhWrXodip1mK9 T7CeH9CJsFISXpjkiETU
=efGi
-----END PGP SIGNATURE-----
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Your patch has been applied to the following branches
commit a7b02f7f660707f765881f35867b4d23d89b390f (master) commit 0043ddbbe6768ac560996e9879f47381e043a116 (release/2.3)
Author: Gert Doering Date: Tue Sep 13 22:04:58 2016 +0200
Do not abort t_client run if OpenVPN instance does not start.
Signed-off-by: Gert Doering <[email protected]...>
Acked-by: David Sommerseth <[email protected]...>
Message-Id: [email protected]...
URL: http://www.mail-archive.com/search?l=mid&[email protected]...
Signed-off-by: David Sommerseth <[email protected]...>- --
kind regards,
David Sommerseth
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (GNU/Linux)
iQIcBAEBAgAGBQJX3AqtAAoJEIbPlEyWcf3ytDsP/RBryXPeFUEVUuVRsrCCJwDk 1ethZl/105WyfimybQRP6YlFDJ0kQVLyb4lee6yxgDTq315XpDkvRqImATH6kF3e hC3GHPirAPYiwynZp1cr5pyBWkWT0nrb/MrD1zszyX4jh1wjHZ6OQ53bP6sTjRM3 Zub+OEYd4z+Rg+HA2MLM9FwqgFQqMaNcgAIxRh7v7uV4r54xpVgkLe/o3X2aXZWp K/rpc1fWnfU+cfOgmr00fLOkhEu1jmTH1NkukfNeh1nwrN75MpqiW3JZMvMks0Vb rBy4LfOC5vWTuA/YAC3NMRkURICatQR8h5V7NAKQ2gyYn0JvtefdZSpu8VZS30XA T4myiQK4D3AUG8L9c5/yrruz3+svWCaoiBsQqXCCZ6WL2KNWmKOW41Bgi3PIxNJz qCt8iCy62/Vb0bGTDPstpHk/a89iUUy17W6jCxTGnTVRBZtWMCoSx0sf30c2VXcX n9Mqh0XT5e47alqXVAb+Uxzi2gjnS1EkReIWolC8bDDMSpPztd6JfLvDSHr7ltGn SSi9yybIlC5n0mCtnpncicrei+K5WajC9kfvOpPkpmoUZhAP5zSubnYUJ+hfBySo DGoBgVxxZSkznmDLQNytRj9aGOsqRapTl6GI+dRguFLSiKjDI6teNNHfzzqDv+kx xlD0dom5Dwk0LBC3Sj1e
=nA9Z
-----END PGP SIGNATURE-----