[LTP] [PATCH 1/1] doc: Update timeout related doc

Petr Vorel pvorel@suse.cz
Wed Nov 13 16:12:58 CET 2024


.timeout was removed in bf9678782, replaced by .max_runtime
in 0f72d519a which
* added extra 30 sec safety margin (DEFAULT_TIMEOUT) scalable by $LTP_TIMEOUT_MUL
* .max_runtime is scalable by and $LTP_RUNTIME_MUL

Mention this in API comparison and in the user setup.

Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
 doc/developers/writing_tests.rst | 7 +++----
 doc/users/setup_tests.rst        | 4 +++-
 2 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/doc/developers/writing_tests.rst b/doc/developers/writing_tests.rst
index 2293800a17..90619aebe4 100644
--- a/doc/developers/writing_tests.rst
+++ b/doc/developers/writing_tests.rst
@@ -396,7 +396,9 @@ LTP C And Shell Test API Comparison
       - TST_FORMAT_DEVICE
 
     * - .max_runtime
-      - \-
+      - TST_TIMEOUT (not exactly the same, a real timeout based on old .timeout
+        concept. .max_runtime has also an extra 30 sec safety margin for
+        teardown of the test.)
 
     * - .min_cpus
       - not applicable
@@ -506,9 +508,6 @@ LTP C And Shell Test API Comparison
     * - .test_variants
       - \-
 
-    * - .timeout
-      - TST_TIMEOUT
-
     * - .tst_hugepage
       - not applicable
 
diff --git a/doc/users/setup_tests.rst b/doc/users/setup_tests.rst
index c5f82e6277..24b1f6384d 100644
--- a/doc/users/setup_tests.rst
+++ b/doc/users/setup_tests.rst
@@ -51,7 +51,9 @@ users.
 
    * - LTP_TIMEOUT_MUL
      - Multiplies timeout, must be number >= 0.1 (> 1 is useful for slow
-       machines to avoid unexpected timeout).
+       machines to avoid unexpected timeout). It's mainly for shell API, which
+       does not have LTP_RUNTIME_MUL. In C API it scales the default 30 sec
+       safety margin, probably LTP_RUNTIME_MUL should be used instead.
 
    * - LTP_RUNTIME_MUL
      - Multiplies maximal test iteration runtime. Tests that run for more than a
-- 
2.47.0



More information about the ltp mailing list