1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-12-24 17:41:01 +03:00

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.
This commit is contained in:
Gilles Peskine
2018-01-08 12:38:15 +01:00
committed by Manuel Pégourié-Gonnard
parent 0d225daf7d
commit 3c9e2b5004
2 changed files with 2 additions and 0 deletions

View File

@@ -887,6 +887,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
}

View File

@@ -308,6 +308,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"
}