mem/thp: skip thp02/thp03 if system not support hugepage
PATCH 1/1 mem/thp: skip thp02/thp03 if system not support hugepage
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.
--- testcases/kernel/mem/thp/thp02.c | 3 +++ testcases/kernel/mem/thp/thp03.c | 3 +++ 2 files changed, 6 insertions(+)
testcases/kernel/mem/thp/thp02.c +3 -0
@@ -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 ;
testcases/kernel/mem/thp/thp03.c +3 -0
@@ -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);
Signature · 8 lines
1.8.3.1 ------------------------------------------------------------------------------ _______________________________________________ Ltp-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ltp-list
Hi,
Quoted 6 lines · Li Wang
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
Quoted 6 lines
thp03 1 TBROK : mem.c:1035: cannot find "Hugepagesize:" in
/proc/meminfo
thp03 2 TBROK : mem.c:1035: Remaining cases brokenMaybe 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.
Quoted 48 lines
Signed-off-by Li Wang <[email protected]>--- testcases/kernel/mem/thp/thp02.c | 3 +++ testcases/kernel/mem/thp/thp03.c | 3 +++ 2 files changed, 6 insertions(+)testcases/kernel/mem/thp/thp02.c +3
-0@@ -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 ;testcases/kernel/mem/thp/thp03.c +3
-1@@ -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
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
Signature · 3 lines
Regards, Li Wang Email: [email protected]
------------------------------------------------------------------------------
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
Hi!
I've reworded the commit message and the TCONF message a bit and pushed, thanks.
Signature · 8 lines
Cyril Hrubis [email protected] ------------------------------------------------------------------------------ _______________________________________________ Ltp-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ltp-list