All of lore.kernel.org
 help / color / mirror / Atom feed
* [LTP] [PATCH] syscalls/migrate_pages03: restore runtime to 5m
@ 2022-06-21  7:05 Jan Stancek
  2022-06-21  8:27 ` Cyril Hrubis
  2022-06-21  8:37 ` [LTP] [PATCH v2] " Jan Stancek
  0 siblings, 2 replies; 5+ messages in thread
From: Jan Stancek @ 2022-06-21  7:05 UTC (permalink / raw)
  To: ltp

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

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

diff --git a/testcases/kernel/syscalls/migrate_pages/migrate_pages03.c b/testcases/kernel/syscalls/migrate_pages/migrate_pages03.c
index c6afb4cce05d..ce1aa5be421d 100644
--- a/testcases/kernel/syscalls/migrate_pages/migrate_pages03.c
+++ b/testcases/kernel/syscalls/migrate_pages/migrate_pages03.c
@@ -134,6 +134,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


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [LTP] [PATCH] syscalls/migrate_pages03: restore runtime to 5m
  2022-06-21  7:05 [LTP] [PATCH] syscalls/migrate_pages03: restore runtime to 5m Jan Stancek
@ 2022-06-21  8:27 ` Cyril Hrubis
  2022-06-21  8:37 ` [LTP] [PATCH v2] " Jan Stancek
  1 sibling, 0 replies; 5+ messages in thread
From: Cyril Hrubis @ 2022-06-21  8:27 UTC (permalink / raw)
  To: Jan Stancek; +Cc: ltp

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

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [LTP] [PATCH v2] syscalls/migrate_pages03: restore runtime to 5m
  2022-06-21  7:05 [LTP] [PATCH] syscalls/migrate_pages03: restore runtime to 5m Jan Stancek
  2022-06-21  8:27 ` Cyril Hrubis
@ 2022-06-21  8:37 ` Jan Stancek
  2022-06-21  9:49   ` Cyril Hrubis
  1 sibling, 1 reply; 5+ messages in thread
From: Jan Stancek @ 2022-06-21  8:37 UTC (permalink / raw)
  To: ltp

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


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [LTP] [PATCH v2] syscalls/migrate_pages03: restore runtime to 5m
  2022-06-21  8:37 ` [LTP] [PATCH v2] " Jan Stancek
@ 2022-06-21  9:49   ` Cyril Hrubis
  2022-06-23  8:26     ` Li Wang
  0 siblings, 1 reply; 5+ messages in thread
From: Cyril Hrubis @ 2022-06-21  9:49 UTC (permalink / raw)
  To: Jan Stancek; +Cc: ltp

Hi!
> 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...");
                                                            ^
							    Just one
							    't' here

Sorry I tend to make this typo quite often.

With that fixed:

Reviewed-by: Cyril Hrubis <chrubis@suse.cz>

-- 
Cyril Hrubis
chrubis@suse.cz

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [LTP] [PATCH v2] syscalls/migrate_pages03: restore runtime to 5m
  2022-06-21  9:49   ` Cyril Hrubis
@ 2022-06-23  8:26     ` Li Wang
  0 siblings, 0 replies; 5+ messages in thread
From: Li Wang @ 2022-06-23  8:26 UTC (permalink / raw)
  To: Cyril Hrubis; +Cc: LTP List


[-- Attachment #1.1: Type: text/plain, Size: 805 bytes --]

Cyril Hrubis <chrubis@suse.cz> wrote:


> > --- 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...");
>                                                             ^
>                                                             Just one
>                                                             't' here
>
> Sorry I tend to make this typo quite often.
>

I fixed that and pushed. Thanks!


-- 
Regards,
Li Wang

[-- Attachment #1.2: Type: text/html, Size: 1570 bytes --]

[-- Attachment #2: Type: text/plain, Size: 60 bytes --]


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-06-23  8:26 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-21  7:05 [LTP] [PATCH] syscalls/migrate_pages03: restore runtime to 5m Jan Stancek
2022-06-21  8:27 ` Cyril Hrubis
2022-06-21  8:37 ` [LTP] [PATCH v2] " Jan Stancek
2022-06-21  9:49   ` Cyril Hrubis
2022-06-23  8:26     ` Li Wang

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.