PTL’s expect() and log_match() functions have "max_attempts” parameter through which test writers can specify the number of attempts to,
- perform an operation before an attribute matches the given value. (or)
- find a matching entry , respectively
Test writers are free to specify any desired max_attempts value. However it is often observed that if very small ‘max_attempts’ value are specified in these functions, tests fail intermittently when run on some slower test machines.
Hence the proposal is to have a low default value of 20 for ‘max_attempts’ and ignore any user specified ‘max_attempts’ value that is less than 20. For example, if test writer sets max_attempts to 5, these functions will internally set ‘max_attempts’ to 20. Any value greater than 20 will not be modified. This applies to both positive and negative cases of expect() and log_match(). tracejob_match() and accounting_match() also use log_match() internally. Hence the docstrings for all the 4 functions expect(), log_match(), tracejob_match() and accounting_match() will be updated to reflect this change.
Please let me know your comments on this