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

Cyril Hrubis chrubis@suse.cz
Thu Nov 3 10:55:26 CET 2022


Hi!
> diff --git a/testcases/kernel/mem/hugetlb/hugemmap/Makefile b/testcases/kernel/mem/hugetlb/hugemmap/Makefile
> index 2d651b4aa..0199f8446 100644
> --- a/testcases/kernel/mem/hugetlb/hugemmap/Makefile
> +++ b/testcases/kernel/mem/hugetlb/hugemmap/Makefile
> @@ -9,3 +9,9 @@ include $(abs_srcdir)/../Makefile.inc
>  include $(top_srcdir)/include/mk/generic_leaf_target.mk
>  
>  hugemmap06: CFLAGS+=-pthread
> +
> +ARCH ?= $(shell uname -m | sed -e s/i.86/i386/)

This will break cross-compilation. We cannot assume anything during
compilation based on the system we compile LTP on.

What are we trying to detect here?

Looking at:

https://github.com/libhugetlbfs/libhugetlbfs/commit/cc0717ca0deee9dc0bb84acc8c80fd468b180f6f

it seems that we are looking for native 32bit PPC, that means that we
have to check on runtime, because we don't know if we are going to run
in 32bit compat mode or on native 32bit machine when we are compiling.

We do have tst_kernel_bits() function exactly for this purpose.

-- 
Cyril Hrubis
chrubis@suse.cz


More information about the ltp mailing list