[LTP] [PATCH v5 2/4] Hugetlb: Migrating libhugetlbfs brk_near_huge

Tarun Sahu tsahu@linux.ibm.com
Thu Nov 3 04:18:59 CET 2022


Hi,

On Nov 02 2022, Cyril Hrubis wrote:
> Hi!
> > --- a/testcases/kernel/mem/hugetlb/hugemmap/Makefile
> > +++ b/testcases/kernel/mem/hugetlb/hugemmap/Makefile
> > @@ -9,3 +9,8 @@ include $(abs_srcdir)/../Makefile.inc
> >  include $(top_srcdir)/include/mk/generic_leaf_target.mk
> >  
> >  hugemmap06: CFLAGS+=-pthread
> > +
> > +hugemmap07:
> > +ifeq ($(ARCH),ppc)
> > +	CPPFLAGS += -DPPC_NO_SEGMENTS
> > +endif
> 
> I do not think that ARCH is defined in LTP build system. Where does it
> come from in the original test?
> 
yeah, right. I will amend the code to check for the ARCH.
In original code, it explicitly check for ARCH.
> > diff --git a/testcases/kernel/mem/hugetlb/hugemmap/hugemmap07.c b/testcases/kernel/mem/hugetlb/hugemmap/hugemmap07.c
> > new file mode 100644
> > index 000000000..73ed4b0d6
> > --- /dev/null
> > +++ b/testcases/kernel/mem/hugetlb/hugemmap/hugemmap07.c
> > @@ -0,0 +1,138 @@
> > +// SPDX-License-Identifier: LGPL-2.1-or-later
> > +/*
> > + * Copyright (C) 2005-2006 David Gibson & Adam Litke, IBM Corporation.
> > + * Author: David Gibson & Adam Litke
> > + */
> > +
> > +/*\
> > + *
> > + * [Description]
> > + *
> > + * brk() near hugepage:
>            ^
> 	   I would just remove this, it does not render nicely in the
> 	   asciidoc and it's not useful either.
> 
Ok.

--skip
> >  
> > +#define ALIGN(x, a)	(((x) + (a) - 1) & ~((a) - 1))
> 
> We do have a LTP_ALIGN() please make use of that one instead.
Ok.
> 
> > +#define PALIGN(p, a) ((void *)ALIGN((unsigned long)(p), (a)))
> > +
> >  #define SHM_RD	0400
> >  #define SHM_WR	0200
> >  #define SHM_RW	(SHM_RD|SHM_WR)
> 
> Have you run 'make check-hugemmap07' in the respecive directory, did it
> report any problems?
> 
Yes, It didn't report any error/warnings.
> -- 
> Cyril Hrubis
> chrubis@suse.cz
> 
> -- 
> Mailing list info: https://lists.linux.it/listinfo/ltp


More information about the ltp mailing list