Hi, On Thu, Aug 13, 2015 at 10:18 AM, Li Wang <liw...@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 <liw...@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: liw...@redhat.com
------------------------------------------------------------------------------
_______________________________________________ Ltp-list mailing list Ltp-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ltp-list