[LTP] [PATCH v3] swapoff01/swapon01: Define max_runtime 1 mins

Li Wang liwang@redhat.com
Mon Sep 9 04:52:43 CEST 2024


From: Petr Vorel <pvorel@suse.cz>

Test run mostly below 1 sec per filesystem, only NTFS is very slow
~ 10-15 sec depending on architecture.

Also this is the only tests in syscalls which fails on due timeout on
emulated risc-v with LTP_TIMEOUT_MUL=2,LTP_RUNTIME_MUL=2 (with the
default 30s runtime => 1 min due LTP_RUNTIME_MUL=2).

Based on the test consumed time on RPi0 and RPi4, we set runtime to 60s,
that should be enough even for slow risc-v and not that high for other archs.

Signed-off-by: Petr Vorel <pvorel@suse.cz>
Signed-off-by: Li Wang <liwang@redhat.com>
---
 testcases/kernel/syscalls/swapoff/swapoff01.c | 1 +
 testcases/kernel/syscalls/swapon/swapon01.c   | 1 +
 2 files changed, 2 insertions(+)

diff --git a/testcases/kernel/syscalls/swapoff/swapoff01.c b/testcases/kernel/syscalls/swapoff/swapoff01.c
index 314630267..965d17cc8 100644
--- a/testcases/kernel/syscalls/swapoff/swapoff01.c
+++ b/testcases/kernel/syscalls/swapoff/swapoff01.c
@@ -53,5 +53,6 @@ static struct tst_test test = {
 	.all_filesystems = 1,
 	.needs_root = 1,
 	.test_all = verify_swapoff,
+	.max_runtime = 60,
 	.setup = setup
 };
diff --git a/testcases/kernel/syscalls/swapon/swapon01.c b/testcases/kernel/syscalls/swapon/swapon01.c
index 49915c32d..eddcd5788 100644
--- a/testcases/kernel/syscalls/swapon/swapon01.c
+++ b/testcases/kernel/syscalls/swapon/swapon01.c
@@ -51,5 +51,6 @@ static struct tst_test test = {
 	.all_filesystems = 1,
 	.needs_cgroup_ctrls = (const char *const []){ "memory", NULL },
 	.test_all = verify_swapon,
+	.max_runtime = 60,
 	.setup = setup
 };
-- 
2.46.0



More information about the ltp mailing list