<div dir="ltr"><div dir="ltr"><div class="gmail_default" style="font-size:small"><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Sep 12, 2019 at 12:52 AM Clemens Famulla-Conrad <<a href="mailto:cfamullaconrad@suse.de">cfamullaconrad@suse.de</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Because of timeout problems when using TST_RETRY_FN() we do now use<br>
LTP_TIMEOUT_MUL to adopt the timeout value.<br>
<br>
Introduced tst_adjut_timeout function to have a generic place to<br>
adopt timeout values.<br></blockquote><div><br></div><div><div class="gmail_default" style="font-size:small">What about using tst_multipy_timeout as the function name? Since it only raises the timeout value with a multiplier.</div></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
Signed-off-by: Clemens Famulla-Conrad <<a href="mailto:cfamullaconrad@suse.de" target="_blank">cfamullaconrad@suse.de</a>><br>
---<br>
testcases/lib/tst_test.sh | 12 ++++++++----<br>
1 file changed, 8 insertions(+), 4 deletions(-)<br>
<br>
diff --git a/testcases/lib/tst_test.sh b/testcases/lib/tst_test.sh<br>
index e0b24c6b9..03692e503 100644<br>
--- a/testcases/lib/tst_test.sh<br>
+++ b/testcases/lib/tst_test.sh<br>
@@ -164,7 +164,7 @@ TST_RETRY_FN_EXP_BACKOFF()<br>
{<br>
local tst_fun="$1"<br>
local tst_exp=$2<br>
- local tst_sec=$(expr $3 \* 1000000)<br>
+ local tst_sec=$(tst_adjust_timeout $(expr $3 \* 1000000))<br>
local tst_delay=1<br>
<br>
if [ $# -ne 3 ]; then<br>
@@ -371,12 +371,16 @@ _tst_rescmp()<br>
fi<br>
}<br>
<br>
-<br>
-_tst_setup_timer()<br>
+tst_adjust_timeout()<br>
{<br>
LTP_TIMEOUT_MUL=${LTP_TIMEOUT_MUL:-1}<br>
+ local timeout=$1<br>
+ echo $(( timeout * LTP_TIMEOUT_MUL))<br></blockquote><div><br></div><div><div class="gmail_default" style="font-size:small">Shouldn't we check the LTP_TIMEOUT_MUL > 1 before using it?</div></div></div><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div>Regards,<br></div><div>Li Wang<br></div></div></div></div>