Skip to content

Commit 1e18c50

Browse files
committed
#define MAX_ALLOWED_TIMEOUT_RETRIES
1 parent 7060747 commit 1e18c50

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

bin/rl/rl.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -387,6 +387,7 @@ static const char *FullLogName = nullptr;
387387
static const char *ResultsLogName = nullptr;
388388
static const char *TestTimeout = nullptr; // Stores timeout in seconds for all tests
389389
static const char *TestTimeoutRetries = nullptr; // Number of timeout retries for all tests
390+
#define MAX_ALLOWED_TIMEOUT_RETRIES 100 // Arbitrary max to avoid accidentally specifying too many retries
390391

391392
// NOTE: this might be unused now
392393
static char TempPath[MAX_PATH] = ""; // Path for temporary files
@@ -3566,7 +3567,7 @@ IsTimeoutRetriesStringValid(const char *strTimeoutRetries)
35663567
// (especially with the default timeout being multiple minutes long),
35673568
// so limit the number of retries to some arbitrary max.
35683569

3569-
if (numRetries > 100)
3570+
if (numRetries > MAX_ALLOWED_TIMEOUT_RETRIES)
35703571
{
35713572
return FALSE;
35723573
}
@@ -3655,7 +3656,7 @@ GetTestInfoFromNode
36553656
if (!IsTimeoutRetriesStringValid(testInfo->data[i]))
36563657
{
36573658
CFG_ERROR_EX(fileName, node->LineNumber,
3658-
"Invalid number of timeout retries specified. Value must be numeric and <= 100.\n", nullptr);
3659+
"Invalid number of timeout retries specified. Value must be numeric and <= %d.\n", MAX_ALLOWED_TIMEOUT_RETRIES);
36593660
childNode->Dump();
36603661
return FALSE;
36613662
}

0 commit comments

Comments
 (0)