Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753381AbdCOP5Q (ORCPT ); Wed, 15 Mar 2017 11:57:16 -0400 Received: from resqmta-po-05v.sys.comcast.net ([96.114.154.164]:52616 "EHLO resqmta-po-05v.sys.comcast.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752809AbdCOP4T (ORCPT ); Wed, 15 Mar 2017 11:56:19 -0400 Reply-To: shuah@kernel.org Subject: Re: [PATCH 1/2] selftests: keep consistency for uname -m usage References: <20170315131535.11438-1-fathi.boudra@linaro.org> To: Fathi Boudra , linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org From: Shuah Khan Message-ID: Date: Wed, 15 Mar 2017 09:56:16 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: <20170315131535.11438-1-fathi.boudra@linaro.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit X-CMAE-Envelope: MS4wfPbGXb1aZDdqvFozRMdaLR6PWpjcp5mKjIfDbqTxh6YuucGb0XU2SNZ/PvLIb2XuhMY+vlpgUSn1kq/qEhDQ+vabUAP+PbVGGEL9mo6VgBwFNzUfxXxY a7mT66Qs3ADNs8QzkfSJSWrA2tp8YkEJqyKpudbd/irjiUOTli4b3MAZybkp9UF2s8W0K/V0yXnyTX3J8YtbcLAKp1nYnP2sIf0mXmMuksmevvXn5m8cnTz8 HSMxQWbPrQ6BPe/bI6Zu7xoDuTEcit5Kb02H9IPd7A4= Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3194 Lines: 82 Hi Fathi, On 03/15/2017 07:15 AM, Fathi Boudra wrote: > powerpc selftests allow to override ARCH for cross-compilation by making > the first ARCH assignment weak. > Use the same approach in breakpoints, ipc and prctl tests to: > - keep uname usage consistent across selftests > - make it easier to cross-compile How does it make it easier to cross-compile? Could you please elaborate on what this patch is fixing? Also I would like to see 3 separate patches one for each of the tests? thanks, -- Shuah > > Signed-off-by: Fathi Boudra > --- > tools/testing/selftests/breakpoints/Makefile | 4 ++-- > tools/testing/selftests/ipc/Makefile | 4 ++-- > tools/testing/selftests/powerpc/Makefile | 2 +- > tools/testing/selftests/prctl/Makefile | 4 ++-- > 4 files changed, 7 insertions(+), 7 deletions(-) > > diff --git a/tools/testing/selftests/breakpoints/Makefile b/tools/testing/selftests/breakpoints/Makefile > index 72aa103e4141..9d5a1af4b5c9 100644 > --- a/tools/testing/selftests/breakpoints/Makefile > +++ b/tools/testing/selftests/breakpoints/Makefile > @@ -1,6 +1,6 @@ > # Taken from perf makefile > -uname_M := $(shell uname -m 2>/dev/null || echo not) > -ARCH ?= $(shell echo $(uname_M) | sed -e s/i.86/x86/ -e s/x86_64/x86/) > +ARCH ?= $(shell uname -m 2>/dev/null || echo not) > +ARCH := $(shell echo $(ARCH) | sed -e s/i.86/x86/ -e s/x86_64/x86/) > > ifeq ($(ARCH),x86) > TEST_GEN_PROGS := breakpoint_test > diff --git a/tools/testing/selftests/ipc/Makefile b/tools/testing/selftests/ipc/Makefile > index 30ef4c7f53ea..7e5a459842bb 100644 > --- a/tools/testing/selftests/ipc/Makefile > +++ b/tools/testing/selftests/ipc/Makefile > @@ -1,5 +1,5 @@ > -uname_M := $(shell uname -m 2>/dev/null || echo not) > -ARCH ?= $(shell echo $(uname_M) | sed -e s/i.86/i386/) > +ARCH ?= $(shell uname -m 2>/dev/null || echo not) > +ARCH := $(shell echo $(ARCH) | sed -e s/i.86/i386/) > ifeq ($(ARCH),i386) > ARCH := x86 > CFLAGS := -DCONFIG_X86_32 -D__i386__ > diff --git a/tools/testing/selftests/powerpc/Makefile b/tools/testing/selftests/powerpc/Makefile > index 1c5d0575802e..731e015d170d 100644 > --- a/tools/testing/selftests/powerpc/Makefile > +++ b/tools/testing/selftests/powerpc/Makefile > @@ -1,7 +1,7 @@ > # Makefile for powerpc selftests > > # ARCH can be overridden by the user for cross compiling > -ARCH ?= $(shell uname -m) > +ARCH ?= $(shell uname -m 2>/dev/null || echo not) > ARCH := $(shell echo $(ARCH) | sed -e s/ppc.*/powerpc/) > > ifeq ($(ARCH),powerpc) > diff --git a/tools/testing/selftests/prctl/Makefile b/tools/testing/selftests/prctl/Makefile > index 35aa1c8f2df2..08aeb8721ce6 100644 > --- a/tools/testing/selftests/prctl/Makefile > +++ b/tools/testing/selftests/prctl/Makefile > @@ -1,6 +1,6 @@ > ifndef CROSS_COMPILE > -uname_M := $(shell uname -m 2>/dev/null || echo not) > -ARCH ?= $(shell echo $(uname_M) | sed -e s/i.86/x86/ -e s/x86_64/x86/) > +ARCH ?= $(shell uname -m 2>/dev/null || echo not) > +ARCH := $(shell echo $(ARCH) | sed -e s/i.86/x86/ -e s/x86_64/x86/) > > ifeq ($(ARCH),x86) > TEST_PROGS := disable-tsc-ctxt-sw-stress-test disable-tsc-on-off-stress-test \ >