diff mbox series

madvise06: set max_runtime to 60

Message ID 20240321025951.3263265-1-liwang@redhat.com
State Accepted
Headers show
Series madvise06: set max_runtime to 60 | expand

Commit Message

Li Wang March 21, 2024, 2:59 a.m. UTC
The madvise06 test includes two loops, each potentially waiting up
to 10 seconds. In scenarios with slow I/O, these loops can lead to
the test exceeding the default maximum runtime of 30 seconds.

To prevent the test from failing under these conditions, this patch
increases the `max_runtime` parameter from 30 seconds to 60 seconds,
providing ample time for completion even on systems with slow I/O.

   7  tst_test.c:1709: TINFO: LTP version: 20240129
   8  tst_test.c:1593: TINFO: Timeout per run is 0h 00m 30s
      ....
  43  madvise06.c:77: TINFO: memory.swap.current: 289664 Kb
  44  madvise06.c:201: TINFO: less than 102400 Kb were moved to the swap cache
  45  Test timeouted, sending SIGKILL!
  46  tst_test.c:1647: TINFO: If you are running on slow machine, try exporting LTP_TIMEOUT_MUL > 1
  47  tst_test.c:1649: TBROK: Test killed! (timeout?)

Reported-by: Fendy Tjahjadi <ftjahjad@redhat.com>
Signed-off-by: Li Wang <liwang@redhat.com>
---
 testcases/kernel/syscalls/madvise/madvise06.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Petr Vorel March 21, 2024, 7:46 a.m. UTC | #1
Hi Li, Fendy,

> The madvise06 test includes two loops, each potentially waiting up
> to 10 seconds. In scenarios with slow I/O, these loops can lead to
> the test exceeding the default maximum runtime of 30 seconds.

> To prevent the test from failing under these conditions, this patch
> increases the `max_runtime` parameter from 30 seconds to 60 seconds,
> providing ample time for completion even on systems with slow I/O.

Although we have LTP_TIMEOUT_MUL, let's be more flexible.

Acked-by: Petr Vorel <pvorel@suse.cz>

Kind regards,
Petr
Li Wang March 21, 2024, 10:24 a.m. UTC | #2
On Thu, Mar 21, 2024 at 3:46 PM Petr Vorel <pvorel@suse.cz> wrote:

> Hi Li, Fendy,
>
> > The madvise06 test includes two loops, each potentially waiting up
> > to 10 seconds. In scenarios with slow I/O, these loops can lead to
> > the test exceeding the default maximum runtime of 30 seconds.
>
> > To prevent the test from failing under these conditions, this patch
> > increases the `max_runtime` parameter from 30 seconds to 60 seconds,
> > providing ample time for completion even on systems with slow I/O.
>
> Although we have LTP_TIMEOUT_MUL, let's be more flexible.
>
> Acked-by: Petr Vorel <pvorel@suse.cz>
>

Patch merged, thanks!
diff mbox series

Patch

diff --git a/testcases/kernel/syscalls/madvise/madvise06.c b/testcases/kernel/syscalls/madvise/madvise06.c
index be22318ea..b227840df 100644
--- a/testcases/kernel/syscalls/madvise/madvise06.c
+++ b/testcases/kernel/syscalls/madvise/madvise06.c
@@ -242,6 +242,7 @@  static struct tst_test test = {
 	.setup = setup,
 	.needs_tmpdir = 1,
 	.needs_root = 1,
+	.max_runtime = 60,
 	.taint_check = TST_TAINT_W | TST_TAINT_D,
 	.save_restore = (const struct tst_path_val[]) {
 		{"/proc/sys/vm/swappiness", NULL,