public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* [LTP] [PATCH 1/2] lib: multiply the timeout if detect slow kconfigs
@ 2024-12-22  7:22 Li Wang
  2024-12-22  7:22 ` [LTP] [PATCH 2/2] starvation: skip test on slow kernel Li Wang
                   ` (2 more replies)
  0 siblings, 3 replies; 40+ messages in thread
From: Li Wang @ 2024-12-22  7:22 UTC (permalink / raw)
  To: ltp

This refines the handling of timeouts for tests running on
systems with slow kernel configurations (kconfigs).

Previously, the max_runtime was multiplied globally when
slow kconfigs were detected, which inadvertently prolonged
the runtime of all tests using max_runtime for control.

This patch corrects that behavior by applying the multiplication
specifically to timeouts, ensuring it only affects the intended
operations without impacting other tests.

Fixes: 2da30df24 ("lib: multiply the max_runtime if detect slow kconfigs")
Signed-off-by: Li Wang <liwang@redhat.com>
---
 lib/tst_test.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/lib/tst_test.c b/lib/tst_test.c
index 205fc8326..feffc9f86 100644
--- a/lib/tst_test.c
+++ b/lib/tst_test.c
@@ -555,9 +555,6 @@ static int multiply_runtime(int max_runtime)
 
 	parse_mul(&runtime_mul, "LTP_RUNTIME_MUL", 0.0099, 100);
 
-	if (tst_has_slow_kconfig())
-		max_runtime *= 4;
-
 	return max_runtime * runtime_mul;
 }
 
@@ -1706,6 +1703,9 @@ unsigned int tst_multiply_timeout(unsigned int timeout)
 	if (timeout < 1)
 		tst_brk(TBROK, "timeout must to be >= 1! (%d)", timeout);
 
+	if (tst_has_slow_kconfig())
+		timeout *= 4;
+
 	return timeout * timeout_mul;
 }
 
-- 
2.47.1


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply related	[flat|nested] 40+ messages in thread

end of thread, other threads:[~2025-01-20 13:03 UTC | newest]

Thread overview: 40+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-22  7:22 [LTP] [PATCH 1/2] lib: multiply the timeout if detect slow kconfigs Li Wang
2024-12-22  7:22 ` [LTP] [PATCH 2/2] starvation: skip test on slow kernel Li Wang
2025-01-02 12:56   ` Petr Vorel
2025-01-02 14:31     ` Petr Vorel
2025-01-03  7:53       ` Li Wang
2025-01-02 12:43 ` [LTP] [PATCH 1/2] lib: multiply the timeout if detect slow kconfigs Petr Vorel
2025-01-03  5:00   ` Li Wang
2025-01-03  7:06     ` Petr Vorel
2025-01-03  7:33       ` Petr Vorel
2025-01-03  7:58         ` Li Wang
2025-01-03 15:48     ` [LTP] [PATCH 1/2] lib: multiply the timeout if detect slow kconfigsD Cyril Hrubis
2025-01-04  3:38       ` Li Wang
2025-01-06  9:35         ` Petr Vorel
2025-01-06 12:10         ` Cyril Hrubis
2025-01-06 12:52           ` Petr Vorel
2025-01-06 13:39             ` Cyril Hrubis
2025-01-06 15:36               ` Petr Vorel
2025-01-06 16:19                 ` Cyril Hrubis
2025-01-07  5:37                   ` Li Wang
2025-01-07  6:28                     ` Li Wang
2025-01-07 12:42                       ` Cyril Hrubis
2025-01-07 16:49                         ` Petr Vorel
2025-01-08  1:47                           ` Li Wang
2025-01-08  2:51                             ` Li Wang
2025-01-06 16:03           ` Martin Doucha
2025-01-06 16:21             ` Cyril Hrubis
2025-01-06 16:49               ` Martin Doucha
2025-01-15 22:41 ` [LTP] [REGRESSION] Broken tests using tst_net.sh by 893ca0abe7 (was: [PATCH 1/2] lib: multiply the timeout if detect slow kconfigs) Petr Vorel
2025-01-16  6:54   ` Li Wang
2025-01-16  8:35     ` Petr Vorel
2025-01-16  8:38     ` Petr Vorel
2025-01-16 12:10       ` Li Wang
2025-01-16 12:13         ` Li Wang
2025-01-16 13:13         ` Petr Vorel
2025-01-16 12:56     ` Petr Vorel
2025-01-20  9:07     ` [LTP] [REGRESSION] pidns05 timeout " Petr Vorel
2025-01-20  9:11       ` Petr Vorel
2025-01-20 10:18         ` Li Wang
2025-01-20 12:29           ` Cyril Hrubis
2025-01-20 13:03             ` Petr Vorel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox