From: Jens Neuhalfen Date: Sun, 8 May 2016 16:17:48 +0000 (+0200) Subject: Prevent integration test timeout bc. of sudo X-Git-Tag: v2.4_alpha1~96 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f40f10ea9607934faeb2b8cd84aefff0e0790189;p=thirdparty%2Fopenvpn.git Prevent integration test timeout bc. of sudo Integration tests run by t_client.sh use sudo to run openvpn as root. If the t_client.sh script is configured to use sudo then the user must enter the password quickly because t_client assumes a startup failure if openvpn does not start quick enough. If the user is not quick enough, then the tests fails. This change will refresh the sudo timestamp at the start of the script. Tested on MacOS X & Ubuntu Precise Signed-off-by: Jens Neuhalfen Acked-by: Gert Doering Message-Id: <280154CA-9468-429B-BCAC-DB632C0AFB32@neuhalfen.name> URL: http://article.gmane.org/gmane.network.openvpn.devel/11622 Signed-off-by: Gert Doering --- diff --git a/tests/t_client.sh.in b/tests/t_client.sh.in index d4f7c4ab3..9a0af93a0 100755 --- a/tests/t_client.sh.in +++ b/tests/t_client.sh.in @@ -69,6 +69,11 @@ else echo "$0: this test must run be as root, or RUN_SUDO=... " >&2 echo " must be set correctly in 't_client.rc'. SKIP." >&2 exit 77 + else + # We have to use sudo. Make sure that we (hopefully) do not have + # to ask the users password during the test. This is done to + # prevent timing issues, e.g. when the waits for openvpn to start + $RUN_SUDO \true fi fi