diff --git a/tests/t_server_null_default.rc b/tests/t_server_null_default.rc index 365b5a8b..41ec591c 100755 --- a/tests/t_server_null_default.rc +++ b/tests/t_server_null_default.rc @@ -38,7 +38,7 @@ SERVER_KILL_FAIL_FILE=".t_server_null_server.kill_failed" MAX_CLIENTS="10" CLIENT_MATCH="Test-Client" SERVER_EXEC="${top_builddir}/src/openvpn/openvpn" -SERVER_BASE_OPTS="--daemon --local 127.0.0.1 --dev tun --topology subnet --max-clients $MAX_CLIENTS --persist-tun --verb 3 --duplicate-cn" +SERVER_BASE_OPTS="--local 127.0.0.1 --dev tun --topology subnet --max-clients $MAX_CLIENTS --persist-tun --verb 3 --duplicate-cn" SERVER_CIPHER_OPTS="" SERVER_CERT_OPTS="--ca ${CA} --cert ${SERVER_CERT} --key ${SERVER_KEY} --tls-auth ${TA} 0" SERVER_CONF_BASE="${SERVER_BASE_OPTS} ${SERVER_CIPHER_OPTS} ${SERVER_CERT_OPTS}" diff --git a/tests/t_server_null_server.sh b/tests/t_server_null_server.sh index acf8479e..65b7d56a 100755 --- a/tests/t_server_null_server.sh +++ b/tests/t_server_null_server.sh @@ -11,20 +11,18 @@ launch_server() { # Allow reading this file even umask values are strict touch "$log" - if [ -z "${RUN_SUDO}" ]; then - "${server_exec}" \ - $server_conf \ - --status "${status}" 1 \ - --log "${log}" \ - --writepid "${pid}" \ - --explicit-exit-notify 3 - else - $RUN_SUDO "${server_exec}" \ - $server_conf \ - --status "${status}" 1 \ - --log "${log}" \ - --writepid "${pid}" \ - --explicit-exit-notify 3 + # Try to launch the server + $RUN_SUDO "${server_exec}" \ + $server_conf \ + --status "${status}" 1 \ + --writepid "${pid}" \ + --explicit-exit-notify 3 > "$log" 2>&1 & + + sleep 1 + + if ! [ -r "$pid" ] || [ -z "$pid" ]; then + echo "ERROR: failed to start server $server_name" + tail -n 20 "$log" fi }