<div dir="ltr"><div dir="ltr"><div class="gmail_default" style="font-size:small">Cyril Hrubis <<a href="mailto:chrubis@suse.cz" target="_blank">chrubis@suse.cz</a>> wrote:<br></div></div><div class="gmail_quote"><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
--- a/doc/user-guide.txt<br>
+++ b/doc/user-guide.txt<br>
@@ -25,6 +25,10 @@ For running LTP network tests see `testcases/network/README.md`.<br>
 | 'LTP_TIMEOUT_MUL'     | Multiply timeout, must be number >= 1 (> 1 is useful for<br>
                           slow machines to avoid unexpected timeout).<br>
                           Variable is also used in shell tests, but ceiled to int.<br>
+| <span class="gmail_default" style="font-size:small"></span>'LTP_RUNTIME_MUL'     | Multiplies maximal test iteration runtime. Tests<br></blockquote><div><br></div><div><div class="gmail_default" style="font-size:small">Seems <span class="gmail_default"></span>'LTP_RUNTIME_MUL'  does not take effect, maybe there is a bug</div><div class="gmail_default" style="font-size:small">in saving multiply runtime to results->max_iteration_runtime?</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">--- a/lib/tst_test.c<br>+++ b/lib/tst_test.c<br>@@ -1634,7 +1634,7 @@ void tst_run_tcases(int argc, char *argv[], struct tst_test *self)<br>        SAFE_SIGNAL(SIGUSR1, heartbeat_handler);<br> <br>        if (tst_test->max_iteration_runtime)<br>-               results->max_iteration_runtime = tst_test->max_iteration_runtime;<br>+               results->max_iteration_runtime = multiply_runtime();<br> <br>        set_timeout();<br></div><div class="gmail_default" style="font-size:small"><br></div><br></div><div><div class="gmail_default" style="font-size:small">$ LTP_RUNTIME_MUL=2 ./test_runtime01</div>tst_test.c:1522: TINFO: Timeout per run is 0h 00m 35s<br>test_runtime01.c:16: TINFO: Remaining runtime 5<br>test_runtime01.c:16: TINFO: Remaining runtime 4<br>test_runtime01.c:16: TINFO: Remaining runtime 3<br>test_runtime01.c:16: TINFO: Remaining runtime 2<br>test_runtime01.c:16: TINFO: Remaining runtime 1<br>test_runtime01.c:16: TINFO: Remaining runtime 0<br>test_runtime01.c:20: TPASS: Finished loop!<br><br>Summary:<br>passed   1<br>failed   0<br>broken   0<br>skipped  0<br>warnings 0<br><div class="gmail_default" style="font-size:small"></div></div><div><br></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
+++ b/lib/newlib_tests/test_runtime02.c<br>
@@ -0,0 +1,31 @@<br>
+// SPDX-License-Identifier: GPL-2.0-or-later<br>
+/*<br>
+ * Copyright (c) 2021, Linux Test Project<br>
+ */<br>
+/*<br>
+ * This test is set up so that the timeout is not long enough to guarantee<br>
+ * enough runtime for two iterations, i.e. the timeout without offset and after<br>
+ * scaling is too small and the tests ends up with TBROK.<br>
+ *<br>
+ * You can fix this by exporting LTP_MAX_TEST_RUNTIME=10 before executing the<br></blockquote><div><br></div><div><div class="gmail_default" style="font-size:small">I didn't find where to achieve this LTP_MAX_TEST_RUNTIME function in the patchset.</div></div><div><br></div></div><div><br></div>-- <br><div dir="ltr"><div dir="ltr"><div>Regards,<br></div><div>Li Wang<br></div></div></div></div>