diff mbox series

[1/1] doc: Update timeout related doc

Message ID 20241113151258.182353-1-pvorel@suse.cz
State New
Headers show
Series [1/1] doc: Update timeout related doc | expand

Commit Message

Petr Vorel Nov. 13, 2024, 3:12 p.m. UTC
.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(-)

Comments

Andrea Cervesato Jan. 14, 2025, 2:42 p.m. UTC | #1
Hi!

Feel free to merge.

Acked-by: Andrea Cervesato <andrea.cervesato@suse.com>

Kind regards,
Andrea

On 11/13/24 16:12, Petr Vorel wrote:
> .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
diff mbox series

Patch

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