From 784f41c90d959bfc8ef1185d47ee0d2c4070021f Mon Sep 17 00:00:00 2001 From: Gilles Peskine Date: Mon, 8 Jan 2018 12:38:15 +0100 Subject: [PATCH] wait_server_start: warn if lsof is not available If lsof is not available, wait_server_start uses a fixed timeout, which can trigger a race condition if the timeout turns out to be too short. Emit a warning so that we know this is going on from the test logs. --- tests/compat.sh | 1 + tests/ssl-opt.sh | 1 + 2 files changed, 2 insertions(+) diff --git a/tests/compat.sh b/tests/compat.sh index 1121e58ba..27d712b4d 100755 --- a/tests/compat.sh +++ b/tests/compat.sh @@ -878,6 +878,7 @@ if type lsof >/dev/null 2>/dev/null; then done } else + echo "Warning: lsof not available, wait_server_start = sleep" wait_server_start() { sleep 2 } diff --git a/tests/ssl-opt.sh b/tests/ssl-opt.sh index 226084863..0c4639c24 100755 --- a/tests/ssl-opt.sh +++ b/tests/ssl-opt.sh @@ -254,6 +254,7 @@ if type lsof >/dev/null 2>/dev/null; then done } else + echo "Warning: lsof not available, wait_server_start = sleep $START_DELAY" wait_server_start() { sleep "$START_DELAY" }