mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-29 18:27:29 +02:00
Fix a very frequent stuck scenario with the openssl.test script
This commit is contained in:
@ -32,9 +32,19 @@ echo "WOLFSSL_OPENSSL_TEST set, running test..."
|
||||
|
||||
# need a unique port since may run the same time as testsuite
|
||||
generate_port() {
|
||||
port=$(($(od -An -N2 /dev/random) % (65535-49512) + 49512))
|
||||
}
|
||||
#-------------------------------------------------------------------------#
|
||||
# Generate a random port number
|
||||
#-------------------------------------------------------------------------#
|
||||
|
||||
if [[ "$OSTYPE" == "linux-gnu"* ]]; then
|
||||
port=$(($(od -An -N2 /dev/urandom) % (65535-49512) + 49512))
|
||||
elif [[ "$OSTYPE" == "darwin"* ]]; then
|
||||
port=$(($(od -An -N2 /dev/random) % (65535-49512) + 49512))
|
||||
else
|
||||
echo "Unknown OS TYPE"
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
no_pid=-1
|
||||
servers=""
|
||||
|
Reference in New Issue
Block a user