[LTP] [PATCH 03/10] ksm: Add max_runtime to tests
Cyril Hrubis
chrubis@suse.cz
Tue Aug 30 16:49:06 CEST 2022
Hi!
> ksm02, ksm04 and ksm05 take 10+ seconds to finish. Set max_runtime to avoid
> random timeout issues.
I wonder if we can do better.
I guess that the actual runtime does depends on the size of the RAM
because we wait for at least two finished full scans for ksmd. I guess
that for large enough machines we would end up with minutes of runtime.
So I guess that it would make more sense to treat the max_runtime as a
upper bound and set it to large enough number as we do for AIO testcases
(30 minutes) and then make the wait_ksmd_full_scan() runtime avare so
that it exits when the runtime is exhausted. With that we would get a
clear message that we timed-out in the loop that waited for the ksmd
scan.
> Signed-off-by: Martin Doucha <mdoucha@suse.cz>
> ---
> testcases/kernel/mem/ksm/ksm02.c | 1 +
> testcases/kernel/mem/ksm/ksm04.c | 1 +
> testcases/kernel/mem/ksm/ksm05.c | 1 +
> 3 files changed, 3 insertions(+)
>
> diff --git a/testcases/kernel/mem/ksm/ksm02.c b/testcases/kernel/mem/ksm/ksm02.c
> index 1cb7d8e73..1f5677425 100644
> --- a/testcases/kernel/mem/ksm/ksm02.c
> +++ b/testcases/kernel/mem/ksm/ksm02.c
> @@ -110,6 +110,7 @@ static struct tst_test test = {
> },
> .test_all = verify_ksm,
> .min_kver = "2.6.32",
> + .max_runtime = 20,
> .needs_cgroup_ctrls = (const char *const []){ "cpuset", NULL },
> };
>
> diff --git a/testcases/kernel/mem/ksm/ksm04.c b/testcases/kernel/mem/ksm/ksm04.c
> index 39c741876..f7dc5befc 100644
> --- a/testcases/kernel/mem/ksm/ksm04.c
> +++ b/testcases/kernel/mem/ksm/ksm04.c
> @@ -112,6 +112,7 @@ static struct tst_test test = {
> },
> .test_all = verify_ksm,
> .min_kver = "2.6.32",
> + .max_runtime = 20,
> .needs_cgroup_ctrls = (const char *const []){
> "memory", "cpuset", NULL
> },
> diff --git a/testcases/kernel/mem/ksm/ksm05.c b/testcases/kernel/mem/ksm/ksm05.c
> index 146a9a3b7..6f94c4a9c 100644
> --- a/testcases/kernel/mem/ksm/ksm05.c
> +++ b/testcases/kernel/mem/ksm/ksm05.c
> @@ -88,6 +88,7 @@ static struct tst_test test = {
> .forks_child = 1,
> .test_all = test_ksm,
> .min_kver = "2.6.32",
> + .max_runtime = 10,
> .save_restore = (const struct tst_path_val[]) {
> {"!/sys/kernel/mm/ksm/run", "1"},
> {}
> --
> 2.37.2
>
>
> --
> Mailing list info: https://lists.linux.it/listinfo/ltp
--
Cyril Hrubis
chrubis@suse.cz
More information about the ltp
mailing list