Finalize the renaming MAX_WAITSOCK --> ROBOT_TIMEOUT (3.2)

The commit 6753a95c939359f9e06fb9f3dd199a0 changed some variables however for consistency
MAX_WAITSOCK should have been completely changed to ROBOT_TIMEOUT .

This PR suggests that. Moreover it changes the local variable robottimeout to robot_timeout.

This fixes #2983 for 3.2 .
This commit is contained in:
Dirk
2026-01-22 18:32:44 +01:00
parent 40c1edbd13
commit 03b0f483dc

View File

@@ -20401,7 +20401,7 @@ run_robot() {
local -i i subret len iteration testnum pubkeybytes local -i i subret len iteration testnum pubkeybytes
local pubkeybits local pubkeybits
local vulnerable=false send_ccs_finished=true local vulnerable=false send_ccs_finished=true
local -i start_time end_time robottimeout=$ROBOT_TIMEOUT local -i start_time end_time robot_timeout=$ROBOT_TIMEOUT
local cve="CVE-2017-17382 CVE-2017-17427 CVE-2017-17428 CVE-2017-13098 CVE-2017-1000385 CVE-2017-13099 CVE-2016-6883 CVE-2012-5081 CVE-2017-6168" local cve="CVE-2017-17382 CVE-2017-17427 CVE-2017-17428 CVE-2017-13098 CVE-2017-1000385 CVE-2017-13099 CVE-2016-6883 CVE-2012-5081 CVE-2017-6168"
local cwe="CWE-203" local cwe="CWE-203"
local jsonID="ROBOT" local jsonID="ROBOT"
@@ -20566,7 +20566,7 @@ run_robot() {
fi fi
debugme echo "reading server error response..." debugme echo "reading server error response..."
start_time=$(LC_ALL=C date "+%s") start_time=$(LC_ALL=C date "+%s")
sockread 32768 $robottimeout sockread 32768 $robot_timeout
subret=$? subret=$?
if [[ $subret -eq 0 ]]; then if [[ $subret -eq 0 ]]; then
end_time=$(LC_ALL=C date "+%s") end_time=$(LC_ALL=C date "+%s")
@@ -20581,9 +20581,9 @@ run_robot() {
# exchange message, measure the amount of time it took to # exchange message, measure the amount of time it took to
# receive a response and set the timeout value for future # receive a response and set the timeout value for future
# tests to 2 seconds longer than it took to receive a response. # tests to 2 seconds longer than it took to receive a response.
[[ $iteration -ne 2 ]] && [[ $robottimeout -eq $MAX_WAITSOCK ]] && \ [[ $iteration -ne 2 ]] && [[ $robot_timeout -eq $ROBOT_TIMEOUT ]] && \
[[ $((end_time-start_time)) -lt $((MAX_WAITSOCK-2)) ]] && \ [[ $((end_time-start_time)) -lt $((ROBOT_TIMEOUT-2)) ]] && \
robottimeout=$((end_time-start_time+2)) robot_timeout=$((end_time-start_time+2))
else else
response[testnum]="Timeout waiting for alert" response[testnum]="Timeout waiting for alert"
fi fi
@@ -20622,14 +20622,15 @@ run_robot() {
# If the test was run with a short timeout and was found to be # If the test was run with a short timeout and was found to be
# potentially vulnerable due to some tests timing out, then # potentially vulnerable due to some tests timing out, then
# verify the results by rerunning with a longer timeout. # verify the results by rerunning with a longer timeout.
if [[ $robottimeout -eq $MAX_WAITSOCK ]]; then if [[ $robot_timeout -eq $ROBOT_TIMEOUT ]]; then
break break
elif [[ "${response[0]}" == "Timeout waiting for alert" ]] || \ elif [[ "${response[0]}" == "Timeout waiting for alert" ]] || \
[[ "${response[1]}" == "Timeout waiting for alert" ]] || \ [[ "${response[1]}" == "Timeout waiting for alert" ]] || \
[[ "${response[2]}" == "Timeout waiting for alert" ]] || \ [[ "${response[2]}" == "Timeout waiting for alert" ]] || \
[[ "${response[3]}" == "Timeout waiting for alert" ]] || \ [[ "${response[3]}" == "Timeout waiting for alert" ]] || \
[[ "${response[4]}" == "Timeout waiting for alert" ]]; then [[ "${response[4]}" == "Timeout waiting for alert" ]]; then
robottimeout=10 [[ "$DEBUG" -ge 3 ]] && echo "5x Timeout waiting for alert, $robot_timeout increasing to 10"
robot_timeout=10
else else
break break
fi fi
@@ -21486,6 +21487,7 @@ HEADER_MAXSLEEP: $HEADER_MAXSLEEP
MAX_WAITSOCK: $MAX_WAITSOCK MAX_WAITSOCK: $MAX_WAITSOCK
HEARTBLEED_MAX_WAITSOCK: $HEARTBLEED_MAX_WAITSOCK HEARTBLEED_MAX_WAITSOCK: $HEARTBLEED_MAX_WAITSOCK
CCS_MAX_WAITSOCK: $CCS_MAX_WAITSOCK CCS_MAX_WAITSOCK: $CCS_MAX_WAITSOCK
ROBOT_TIMEOUT: $ROBOT_TIMEOUT
USLEEP_SND $USLEEP_SND USLEEP_SND $USLEEP_SND
USLEEP_REC $USLEEP_REC USLEEP_REC $USLEEP_REC