All of lore.kernel.org
 help / color / mirror / Atom feed
* [LTP] [PATCH] mem/thp: skip thp02/thp03 if system not support hugepage
@ 2015-08-13  2:18 Li Wang
  2015-08-13  2:41 ` Li Wang
  2015-08-13 12:48 ` Cyril Hrubis
  0 siblings, 2 replies; 3+ messages in thread
From: Li Wang @ 2015-08-13  2:18 UTC (permalink / raw)
  To: ltp-list

Sometimes we get fails on system which not support hugepage:

thp02       1  TBROK  :  mem.c:1035: cannot find "Hugepagesize:" in /proc/meminfo
thp02       2  TBROK  :  mem.c:1035: Remaining cases broken

thp03       1  TBROK  :  mem.c:1035: cannot find "Hugepagesize:" in /proc/meminfo
thp03       2  TBROK  :  mem.c:1035: Remaining cases broken

Maybe skip the cases are better than TBROK them.

Signed-off-by: Li Wang <liwang@redhat.com>
---
 testcases/kernel/mem/thp/thp02.c | 3 +++
 testcases/kernel/mem/thp/thp03.c | 3 +++
 2 files changed, 6 insertions(+)

diff --git a/testcases/kernel/mem/thp/thp02.c b/testcases/kernel/mem/thp/thp02.c
index 1470ae6..41d9192 100644
--- a/testcases/kernel/mem/thp/thp02.c
+++ b/testcases/kernel/mem/thp/thp02.c
@@ -121,6 +121,9 @@ static void do_mremap(void)
 
 void setup(void)
 {
+	if (access(PATH_THP, F_OK) == -1)
+		tst_brkm(TCONF, NULL, "THP is not enabled");
+
 	tst_sig(FORK, DEF_HANDLER, cleanup);
 	TEST_PAUSE;
 
diff --git a/testcases/kernel/mem/thp/thp03.c b/testcases/kernel/mem/thp/thp03.c
index 8f62d0c..42f9025 100644
--- a/testcases/kernel/mem/thp/thp03.c
+++ b/testcases/kernel/mem/thp/thp03.c
@@ -113,6 +113,9 @@ static void thp_test(void)
 
 void setup(void)
 {
+	if (access(PATH_THP, F_OK) == -1)
+		tst_brkm(TCONF, NULL, "THP is not enabled");
+
 	hugepage_size = read_meminfo("Hugepagesize:") * KB;
 	unaligned_size = hugepage_size * 4 - 1;
 	page_size = SAFE_SYSCONF(NULL, _SC_PAGESIZE);
-- 
1.8.3.1


------------------------------------------------------------------------------
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

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

* Re: [LTP] [PATCH] mem/thp: skip thp02/thp03 if system not support hugepage
  2015-08-13  2:18 [LTP] [PATCH] mem/thp: skip thp02/thp03 if system not support hugepage Li Wang
@ 2015-08-13  2:41 ` Li Wang
  2015-08-13 12:48 ` Cyril Hrubis
  1 sibling, 0 replies; 3+ messages in thread
From: Li Wang @ 2015-08-13  2:41 UTC (permalink / raw)
  To: ltp-list


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

Hi,

On Thu, Aug 13, 2015 at 10:18 AM, Li Wang <liwang@redhat.com> wrote:

> Sometimes we get fails on system which not support hugepage:
>
> thp02       1  TBROK  :  mem.c:1035: cannot find "Hugepagesize:" in
> /proc/meminfo
> thp02       2  TBROK  :  mem.c:1035: Remaining cases broken
>
> thp03       1  TBROK  :  mem.c:1035: cannot find "Hugepagesize:" in
> /proc/meminfo
> thp03       2  TBROK  :  mem.c:1035: Remaining cases broken
>
> Maybe skip the cases are better than TBROK them.
>


After thinking over this patch, I feel the subject is not good to explain,
to be precisely,

"mem/thp: skip the case thp02/thp03 if THP is disable" is better than
previous.

Since this regression case should rely on the THP enable but hupepage.



>
> Signed-off-by: Li Wang <liwang@redhat.com>
> ---
>  testcases/kernel/mem/thp/thp02.c | 3 +++
>  testcases/kernel/mem/thp/thp03.c | 3 +++
>  2 files changed, 6 insertions(+)
>
> diff --git a/testcases/kernel/mem/thp/thp02.c
> b/testcases/kernel/mem/thp/thp02.c
> index 1470ae6..41d9192 100644
> --- a/testcases/kernel/mem/thp/thp02.c
> +++ b/testcases/kernel/mem/thp/thp02.c
> @@ -121,6 +121,9 @@ static void do_mremap(void)
>
>  void setup(void)
>  {
> +       if (access(PATH_THP, F_OK) == -1)
> +               tst_brkm(TCONF, NULL, "THP is not enabled");
> +
>         tst_sig(FORK, DEF_HANDLER, cleanup);
>         TEST_PAUSE;
>
> diff --git a/testcases/kernel/mem/thp/thp03.c
> b/testcases/kernel/mem/thp/thp03.c
> index 8f62d0c..42f9025 100644
> --- a/testcases/kernel/mem/thp/thp03.c
> +++ b/testcases/kernel/mem/thp/thp03.c
> @@ -113,6 +113,9 @@ static void thp_test(void)
>
>  void setup(void)
>  {
> +       if (access(PATH_THP, F_OK) == -1)
> +               tst_brkm(TCONF, NULL, "THP is not enabled");
> +
>         hugepage_size = read_meminfo("Hugepagesize:") * KB;
>         unaligned_size = hugepage_size * 4 - 1;
>         page_size = SAFE_SYSCONF(NULL, _SC_PAGESIZE);
> --
> 1.8.3.1
>
>
>
> ------------------------------------------------------------------------------
> _______________________________________________
> Ltp-list mailing list
> Ltp-list@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/ltp-list
>



-- 
Regards,
Li Wang
Email: liwang@redhat.com

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

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

------------------------------------------------------------------------------

[-- Attachment #3: Type: text/plain, Size: 155 bytes --]

_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

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

* Re: [LTP] [PATCH] mem/thp: skip thp02/thp03 if system not support hugepage
  2015-08-13  2:18 [LTP] [PATCH] mem/thp: skip thp02/thp03 if system not support hugepage Li Wang
  2015-08-13  2:41 ` Li Wang
@ 2015-08-13 12:48 ` Cyril Hrubis
  1 sibling, 0 replies; 3+ messages in thread
From: Cyril Hrubis @ 2015-08-13 12:48 UTC (permalink / raw)
  To: Li Wang; +Cc: ltp-list

Hi!
I've reworded the commit message and the TCONF message a bit and pushed,
thanks.

-- 
Cyril Hrubis
chrubis@suse.cz

------------------------------------------------------------------------------
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

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

end of thread, other threads:[~2015-08-13 12:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-13  2:18 [LTP] [PATCH] mem/thp: skip thp02/thp03 if system not support hugepage Li Wang
2015-08-13  2:41 ` Li Wang
2015-08-13 12:48 ` Cyril Hrubis

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.