[LTP] [PATCH] syscalls/migrate_pages03: restore runtime to 5m

Cyril Hrubis chrubis@suse.cz
Tue Jun 21 10:27:36 CEST 2022


Hi!
> Arches with large pages have trouble completing all loops in 30s,
> restore runtime to 5m.

Can we please also exit the test when it's out of runtime?

The whole point of runtime is that test inner loop actively checks for
remaining runtime so that the runtime is capped.

Should be as easy as:

diff --git a/testcases/kernel/syscalls/migrate_pages/migrate_pages03.c b/testcases/kernel/syscalls/migrate_pages/migrate_pages03.c
index c6afb4cce..2866c96e6 100644
--- a/testcases/kernel/syscalls/migrate_pages/migrate_pages03.c
+++ b/testcases/kernel/syscalls/migrate_pages/migrate_pages03.c
@@ -127,6 +127,11 @@ static void migrate_test(void)
                        tst_res(TFAIL | TERRNO, "migrate_pages() failed");
                        return;
                }
+
+               if (!tst_remaining_runtime()) {
+                       tst_res(TINFO, "Out of runtime, exitting...");
+                       break;
+               }
        }
        SAFE_SETEUID(0);

@@ -134,6 +139,7 @@ static void migrate_test(void)
 }

 static struct tst_test test = {
+       .max_runtime = 300,
        .min_kver = "2.6.32",
        .needs_root = 1,
        .setup = setup,

-- 
Cyril Hrubis
chrubis@suse.cz


More information about the ltp mailing list