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

Jan Stancek jstancek@redhat.com
Tue Jun 21 10:37:17 CEST 2022


Arches with large pages have trouble completing all loops in 30s,
restore runtime to 5m. Also check for remaining runtime and
exit if we run out.

Signed-off-by: Jan Stancek <jstancek@redhat.com>
---
 testcases/kernel/syscalls/migrate_pages/migrate_pages03.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/testcases/kernel/syscalls/migrate_pages/migrate_pages03.c b/testcases/kernel/syscalls/migrate_pages/migrate_pages03.c
index c6afb4cce05d..2866c96e6b8d 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,
-- 
2.27.0



More information about the ltp mailing list