linux-kselftest.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] selftests: vm: Build fixes for powerpc64
@ 2020-01-30  7:01 Sandipan Das
  2020-01-30  7:01 ` [PATCH 1/2] selftests: vm: Do not override definition of ARCH Sandipan Das
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Sandipan Das @ 2020-01-30  7:01 UTC (permalink / raw)
  To: shuah, skhan, linux-kselftest
  Cc: linux-mm, linuxppc-dev, mhiramat, aneesh.kumar, mpe, kamalesh

The second patch was already posted independently but because
of the changes in the first patch, the second one now depends
on it. Hence posting it now as a part of this series.

The last version (v2) of the second patch can be found at:
https://patchwork.ozlabs.org/patch/1225969/

Sandipan Das (2):
  selftests: vm: Do not override definition of ARCH
  selftests: vm: Fix 64-bit test builds for powerpc64le

 tools/testing/selftests/vm/Makefile    | 4 ++--
 tools/testing/selftests/vm/run_vmtests | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

-- 
2.17.1


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

* [PATCH 1/2] selftests: vm: Do not override definition of ARCH
  2020-01-30  7:01 [PATCH 0/2] selftests: vm: Build fixes for powerpc64 Sandipan Das
@ 2020-01-30  7:01 ` Sandipan Das
  2020-02-11  2:49   ` Michael Ellerman
  2020-01-30  7:01 ` [PATCH 2/2] selftests: vm: Fix 64-bit test builds for powerpc64le Sandipan Das
  2020-03-31 14:37 ` [PATCH 0/2] selftests: vm: Build fixes for powerpc64 Shuah Khan
  2 siblings, 1 reply; 8+ messages in thread
From: Sandipan Das @ 2020-01-30  7:01 UTC (permalink / raw)
  To: shuah, skhan, linux-kselftest
  Cc: linux-mm, linuxppc-dev, mhiramat, aneesh.kumar, mpe, kamalesh

Independent builds of the vm selftests is currently broken
because commit 7549b3364201 overrides the value of ARCH with
the machine name from uname. This does not always match the
architecture names used for tasks like header installation.

E.g. for building tests on powerpc64, we need ARCH=powerpc
and not ARCH=ppc64 or ARCH=ppc64le. Otherwise, the build
fails as shown below.

  $ uname -m
  ppc64le

  $ make -C tools/testing/selftests/vm
  make: Entering directory '/home/sandipan/linux/tools/testing/selftests/vm'
  make --no-builtin-rules ARCH=ppc64le -C ../../../.. headers_install
  make[1]: Entering directory '/home/sandipan/linux'
  Makefile:653: arch/ppc64le/Makefile: No such file or directory
  make[1]: *** No rule to make target 'arch/ppc64le/Makefile'.  Stop.
  make[1]: Leaving directory '/home/sandipan/linux'
  ../lib.mk:50: recipe for target 'khdr' failed
  make: *** [khdr] Error 2
  make: Leaving directory '/home/sandipan/linux/tools/testing/selftests/vm'

Fixes: 7549b3364201 ("selftests: vm: Build/Run 64bit tests only on 64bit arch")
Signed-off-by: Sandipan Das <sandipan@linux.ibm.com>
---
 tools/testing/selftests/vm/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/testing/selftests/vm/Makefile b/tools/testing/selftests/vm/Makefile
index 7f9a8a8c31da..3f2e2f0ccbc9 100644
--- a/tools/testing/selftests/vm/Makefile
+++ b/tools/testing/selftests/vm/Makefile
@@ -1,7 +1,7 @@
 # SPDX-License-Identifier: GPL-2.0
 # Makefile for vm selftests
 uname_M := $(shell uname -m 2>/dev/null || echo not)
-ARCH ?= $(shell echo $(uname_M) | sed -e 's/aarch64.*/arm64/')
+MACHINE ?= $(shell echo $(uname_M) | sed -e 's/aarch64.*/arm64/')
 
 CFLAGS = -Wall -I ../../../../usr/include $(EXTRA_CFLAGS)
 LDLIBS = -lrt
@@ -19,7 +19,7 @@ TEST_GEN_FILES += thuge-gen
 TEST_GEN_FILES += transhuge-stress
 TEST_GEN_FILES += userfaultfd
 
-ifneq (,$(filter $(ARCH),arm64 ia64 mips64 parisc64 ppc64 riscv64 s390x sh64 sparc64 x86_64))
+ifneq (,$(filter $(MACHINE),arm64 ia64 mips64 parisc64 ppc64 riscv64 s390x sh64 sparc64 x86_64))
 TEST_GEN_FILES += va_128TBswitch
 TEST_GEN_FILES += virtual_address_range
 endif
-- 
2.17.1


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

* [PATCH 2/2] selftests: vm: Fix 64-bit test builds for powerpc64le
  2020-01-30  7:01 [PATCH 0/2] selftests: vm: Build fixes for powerpc64 Sandipan Das
  2020-01-30  7:01 ` [PATCH 1/2] selftests: vm: Do not override definition of ARCH Sandipan Das
@ 2020-01-30  7:01 ` Sandipan Das
  2020-02-11  2:50   ` Michael Ellerman
  2020-03-31 14:37 ` [PATCH 0/2] selftests: vm: Build fixes for powerpc64 Shuah Khan
  2 siblings, 1 reply; 8+ messages in thread
From: Sandipan Das @ 2020-01-30  7:01 UTC (permalink / raw)
  To: shuah, skhan, linux-kselftest
  Cc: linux-mm, linuxppc-dev, mhiramat, aneesh.kumar, mpe, kamalesh

Some tests are built only for 64-bit systems. This makes
sure that these tests are built for both big and little
endian variants of powerpc64.

Fixes: 7549b3364201 ("selftests: vm: Build/Run 64bit tests only on 64bit arch")
Reviewed-by: Kamalesh Babulal <kamalesh@linux.vnet.ibm.com>
Signed-off-by: Sandipan Das <sandipan@linux.ibm.com>
---
 tools/testing/selftests/vm/Makefile    | 2 +-
 tools/testing/selftests/vm/run_vmtests | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/testing/selftests/vm/Makefile b/tools/testing/selftests/vm/Makefile
index 3f2e2f0ccbc9..8074340c6b3a 100644
--- a/tools/testing/selftests/vm/Makefile
+++ b/tools/testing/selftests/vm/Makefile
@@ -19,7 +19,7 @@ TEST_GEN_FILES += thuge-gen
 TEST_GEN_FILES += transhuge-stress
 TEST_GEN_FILES += userfaultfd
 
-ifneq (,$(filter $(MACHINE),arm64 ia64 mips64 parisc64 ppc64 riscv64 s390x sh64 sparc64 x86_64))
+ifneq (,$(filter $(MACHINE),arm64 ia64 mips64 parisc64 ppc64 ppc64le riscv64 s390x sh64 sparc64 x86_64))
 TEST_GEN_FILES += va_128TBswitch
 TEST_GEN_FILES += virtual_address_range
 endif
diff --git a/tools/testing/selftests/vm/run_vmtests b/tools/testing/selftests/vm/run_vmtests
index a692ea828317..db8e0d1c7b39 100755
--- a/tools/testing/selftests/vm/run_vmtests
+++ b/tools/testing/selftests/vm/run_vmtests
@@ -59,7 +59,7 @@ else
 fi
 
 #filter 64bit architectures
-ARCH64STR="arm64 ia64 mips64 parisc64 ppc64 riscv64 s390x sh64 sparc64 x86_64"
+ARCH64STR="arm64 ia64 mips64 parisc64 ppc64 ppc64le riscv64 s390x sh64 sparc64 x86_64"
 if [ -z $ARCH ]; then
   ARCH=`uname -m 2>/dev/null | sed -e 's/aarch64.*/arm64/'`
 fi
-- 
2.17.1


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

* Re: [PATCH 1/2] selftests: vm: Do not override definition of ARCH
  2020-01-30  7:01 ` [PATCH 1/2] selftests: vm: Do not override definition of ARCH Sandipan Das
@ 2020-02-11  2:49   ` Michael Ellerman
  2020-04-10 15:57     ` Shuah Khan
  0 siblings, 1 reply; 8+ messages in thread
From: Michael Ellerman @ 2020-02-11  2:49 UTC (permalink / raw)
  To: Sandipan Das, shuah, skhan, linux-kselftest
  Cc: linux-mm, linuxppc-dev, mhiramat, aneesh.kumar, kamalesh

Sandipan Das <sandipan@linux.ibm.com> writes:
> Independent builds of the vm selftests is currently broken
> because commit 7549b3364201 overrides the value of ARCH with
> the machine name from uname. This does not always match the
> architecture names used for tasks like header installation.
>
> E.g. for building tests on powerpc64, we need ARCH=powerpc
> and not ARCH=ppc64 or ARCH=ppc64le. Otherwise, the build
> fails as shown below.
>
>   $ uname -m
>   ppc64le
>
>   $ make -C tools/testing/selftests/vm
>   make: Entering directory '/home/sandipan/linux/tools/testing/selftests/vm'
>   make --no-builtin-rules ARCH=ppc64le -C ../../../.. headers_install
>   make[1]: Entering directory '/home/sandipan/linux'
>   Makefile:653: arch/ppc64le/Makefile: No such file or directory
>   make[1]: *** No rule to make target 'arch/ppc64le/Makefile'.  Stop.
>   make[1]: Leaving directory '/home/sandipan/linux'
>   ../lib.mk:50: recipe for target 'khdr' failed
>   make: *** [khdr] Error 2
>   make: Leaving directory '/home/sandipan/linux/tools/testing/selftests/vm'
>
> Fixes: 7549b3364201 ("selftests: vm: Build/Run 64bit tests only on 64bit arch")
> Signed-off-by: Sandipan Das <sandipan@linux.ibm.com>
> ---
>  tools/testing/selftests/vm/Makefile | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Tested-by: Michael Ellerman <mpe@ellerman.id.au>

cheers

> diff --git a/tools/testing/selftests/vm/Makefile b/tools/testing/selftests/vm/Makefile
> index 7f9a8a8c31da..3f2e2f0ccbc9 100644
> --- a/tools/testing/selftests/vm/Makefile
> +++ b/tools/testing/selftests/vm/Makefile
> @@ -1,7 +1,7 @@
>  # SPDX-License-Identifier: GPL-2.0
>  # Makefile for vm selftests
>  uname_M := $(shell uname -m 2>/dev/null || echo not)
> -ARCH ?= $(shell echo $(uname_M) | sed -e 's/aarch64.*/arm64/')
> +MACHINE ?= $(shell echo $(uname_M) | sed -e 's/aarch64.*/arm64/')
>  
>  CFLAGS = -Wall -I ../../../../usr/include $(EXTRA_CFLAGS)
>  LDLIBS = -lrt
> @@ -19,7 +19,7 @@ TEST_GEN_FILES += thuge-gen
>  TEST_GEN_FILES += transhuge-stress
>  TEST_GEN_FILES += userfaultfd
>  
> -ifneq (,$(filter $(ARCH),arm64 ia64 mips64 parisc64 ppc64 riscv64 s390x sh64 sparc64 x86_64))
> +ifneq (,$(filter $(MACHINE),arm64 ia64 mips64 parisc64 ppc64 riscv64 s390x sh64 sparc64 x86_64))
>  TEST_GEN_FILES += va_128TBswitch
>  TEST_GEN_FILES += virtual_address_range
>  endif
> -- 
> 2.17.1

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

* Re: [PATCH 2/2] selftests: vm: Fix 64-bit test builds for powerpc64le
  2020-01-30  7:01 ` [PATCH 2/2] selftests: vm: Fix 64-bit test builds for powerpc64le Sandipan Das
@ 2020-02-11  2:50   ` Michael Ellerman
  0 siblings, 0 replies; 8+ messages in thread
From: Michael Ellerman @ 2020-02-11  2:50 UTC (permalink / raw)
  To: Sandipan Das, shuah, skhan, linux-kselftest
  Cc: linux-mm, linuxppc-dev, mhiramat, aneesh.kumar, kamalesh

Sandipan Das <sandipan@linux.ibm.com> writes:
> Some tests are built only for 64-bit systems. This makes
> sure that these tests are built for both big and little
> endian variants of powerpc64.
>
> Fixes: 7549b3364201 ("selftests: vm: Build/Run 64bit tests only on 64bit arch")
> Reviewed-by: Kamalesh Babulal <kamalesh@linux.vnet.ibm.com>
> Signed-off-by: Sandipan Das <sandipan@linux.ibm.com>
> ---
>  tools/testing/selftests/vm/Makefile    | 2 +-
>  tools/testing/selftests/vm/run_vmtests | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)

Tested-by: Michael Ellerman <mpe@ellerman.id.au>

cheers

> diff --git a/tools/testing/selftests/vm/Makefile b/tools/testing/selftests/vm/Makefile
> index 3f2e2f0ccbc9..8074340c6b3a 100644
> --- a/tools/testing/selftests/vm/Makefile
> +++ b/tools/testing/selftests/vm/Makefile
> @@ -19,7 +19,7 @@ TEST_GEN_FILES += thuge-gen
>  TEST_GEN_FILES += transhuge-stress
>  TEST_GEN_FILES += userfaultfd
>  
> -ifneq (,$(filter $(MACHINE),arm64 ia64 mips64 parisc64 ppc64 riscv64 s390x sh64 sparc64 x86_64))
> +ifneq (,$(filter $(MACHINE),arm64 ia64 mips64 parisc64 ppc64 ppc64le riscv64 s390x sh64 sparc64 x86_64))
>  TEST_GEN_FILES += va_128TBswitch
>  TEST_GEN_FILES += virtual_address_range
>  endif
> diff --git a/tools/testing/selftests/vm/run_vmtests b/tools/testing/selftests/vm/run_vmtests
> index a692ea828317..db8e0d1c7b39 100755
> --- a/tools/testing/selftests/vm/run_vmtests
> +++ b/tools/testing/selftests/vm/run_vmtests
> @@ -59,7 +59,7 @@ else
>  fi
>  
>  #filter 64bit architectures
> -ARCH64STR="arm64 ia64 mips64 parisc64 ppc64 riscv64 s390x sh64 sparc64 x86_64"
> +ARCH64STR="arm64 ia64 mips64 parisc64 ppc64 ppc64le riscv64 s390x sh64 sparc64 x86_64"
>  if [ -z $ARCH ]; then
>    ARCH=`uname -m 2>/dev/null | sed -e 's/aarch64.*/arm64/'`
>  fi
> -- 
> 2.17.1

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

* Re: [PATCH 0/2] selftests: vm: Build fixes for powerpc64
  2020-01-30  7:01 [PATCH 0/2] selftests: vm: Build fixes for powerpc64 Sandipan Das
  2020-01-30  7:01 ` [PATCH 1/2] selftests: vm: Do not override definition of ARCH Sandipan Das
  2020-01-30  7:01 ` [PATCH 2/2] selftests: vm: Fix 64-bit test builds for powerpc64le Sandipan Das
@ 2020-03-31 14:37 ` Shuah Khan
  2020-04-01  3:37   ` Michael Ellerman
  2 siblings, 1 reply; 8+ messages in thread
From: Shuah Khan @ 2020-03-31 14:37 UTC (permalink / raw)
  To: Sandipan Das, shuah, linux-kselftest
  Cc: linux-mm, linuxppc-dev, mhiramat, aneesh.kumar, mpe, kamalesh,
	Shuah Khan

On 1/30/20 12:01 AM, Sandipan Das wrote:
> The second patch was already posted independently but because
> of the changes in the first patch, the second one now depends
> on it. Hence posting it now as a part of this series.
> 
> The last version (v2) of the second patch can be found at:
> https://patchwork.ozlabs.org/patch/1225969/
> 
> Sandipan Das (2):
>    selftests: vm: Do not override definition of ARCH
>    selftests: vm: Fix 64-bit test builds for powerpc64le
> 
>   tools/testing/selftests/vm/Makefile    | 4 ++--
>   tools/testing/selftests/vm/run_vmtests | 2 +-
>   2 files changed, 3 insertions(+), 3 deletions(-)
> 

Michael,

I see your tested-by on these two patches. I will take these
through kselftest fixes.

Sorry for the delay. I assumed these will go through ppc64 or
vm.

thanks,
-- Shuah

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

* Re: [PATCH 0/2] selftests: vm: Build fixes for powerpc64
  2020-03-31 14:37 ` [PATCH 0/2] selftests: vm: Build fixes for powerpc64 Shuah Khan
@ 2020-04-01  3:37   ` Michael Ellerman
  0 siblings, 0 replies; 8+ messages in thread
From: Michael Ellerman @ 2020-04-01  3:37 UTC (permalink / raw)
  To: Shuah Khan, Sandipan Das, shuah, linux-kselftest
  Cc: linux-mm, linuxppc-dev, mhiramat, aneesh.kumar, kamalesh, Shuah Khan

Shuah Khan <skhan@linuxfoundation.org> writes:
> On 1/30/20 12:01 AM, Sandipan Das wrote:
>> The second patch was already posted independently but because
>> of the changes in the first patch, the second one now depends
>> on it. Hence posting it now as a part of this series.
>> 
>> The last version (v2) of the second patch can be found at:
>> https://patchwork.ozlabs.org/patch/1225969/
>> 
>> Sandipan Das (2):
>>    selftests: vm: Do not override definition of ARCH
>>    selftests: vm: Fix 64-bit test builds for powerpc64le
>> 
>>   tools/testing/selftests/vm/Makefile    | 4 ++--
>>   tools/testing/selftests/vm/run_vmtests | 2 +-
>>   2 files changed, 3 insertions(+), 3 deletions(-)
>> 
>
> Michael,
>
> I see your tested-by on these two patches. I will take these
> through kselftest fixes.

Thanks.

cheers

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

* Re: [PATCH 1/2] selftests: vm: Do not override definition of ARCH
  2020-02-11  2:49   ` Michael Ellerman
@ 2020-04-10 15:57     ` Shuah Khan
  0 siblings, 0 replies; 8+ messages in thread
From: Shuah Khan @ 2020-04-10 15:57 UTC (permalink / raw)
  To: Michael Ellerman, Sandipan Das, shuah, linux-kselftest
  Cc: linux-mm, linuxppc-dev, mhiramat, aneesh.kumar, kamalesh, Shuah Khan

On 2/10/20 7:49 PM, Michael Ellerman wrote:
> Sandipan Das <sandipan@linux.ibm.com> writes:
>> Independent builds of the vm selftests is currently broken
>> because commit 7549b3364201 overrides the value of ARCH with
>> the machine name from uname. This does not always match the
>> architecture names used for tasks like header installation.
>>

In the interest not adding more delays to this patch, I fixed up
the commit log for the following error and applied it. I hope to
send this up for next rc.

ERROR: Please use git commit description style 'commit <12+ chars of 
sha1> ("<title line>")' - ie: 'commit 7549b3364201 ("selftests: vm: 
Build/Run 64bit tests only on 64bit arch")'
#93:
because commit 7549b3364201 overrides the value of ARCH with


The fixed up now looks as follows:

Independent builds of the vm selftests is currently broken because
commit 7549b3364201 ("selftests: vm: Build/Run 64bit tests only on
64bit arch") overrides the value of ARCH with the machine name from
uname. This does not always match the architecture names used for
tasks like header installation.

Please make sure to run checkpatch with --strict to catch these
kinds of errors in the future.

thanks,
-- Shuah

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

end of thread, other threads:[~2020-04-10 15:57 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-30  7:01 [PATCH 0/2] selftests: vm: Build fixes for powerpc64 Sandipan Das
2020-01-30  7:01 ` [PATCH 1/2] selftests: vm: Do not override definition of ARCH Sandipan Das
2020-02-11  2:49   ` Michael Ellerman
2020-04-10 15:57     ` Shuah Khan
2020-01-30  7:01 ` [PATCH 2/2] selftests: vm: Fix 64-bit test builds for powerpc64le Sandipan Das
2020-02-11  2:50   ` Michael Ellerman
2020-03-31 14:37 ` [PATCH 0/2] selftests: vm: Build fixes for powerpc64 Shuah Khan
2020-04-01  3:37   ` Michael Ellerman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).