Linux-kselftest Archive on lore.kernel.org
 help / color / Atom feed
From: Dave Martin <Dave.Martin@arm.com>
To: Cristian Marussi <cristian.marussi@arm.com>
Cc: amit.kachhap@arm.com, andreyknvl@google.com, shuah@kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-kselftest@vger.kernel.org
Subject: Re: [PATCH v5 01/11] kselftest: arm64: add skeleton Makefile
Date: Thu, 5 Sep 2019 15:18:34 +0100
Message-ID: <20190905141834.GE27757@arm.com> (raw)
In-Reply-To: <4e7f583f-df36-1d7b-7a41-160abc60a296@arm.com>

On Thu, Sep 05, 2019 at 02:45:39PM +0100, Cristian Marussi wrote:
> On 04/09/2019 12:47, Dave Martin wrote:
> > On Mon, Sep 02, 2019 at 12:29:22pm +0100, Cristian Marussi wrote:
> >> Add a new arm64-specific empty subsystem amongst TARGETS of KSFT build
> >> framework; keep these new arm64 KSFT testcases separated into distinct
> > 
> > Nit: this isn't true any more, since the tags tests already added the
> > arm64 subsystem here.
> 
> Ok
> > 
> >> subdirs inside tools/testing/selftests/arm64/ depending on the specific
> >> subsystem targeted.
> >>
> >> Add into toplevel arm64 KSFT Makefile a mechanism to guess the effective
> >> location of Kernel headers as installed by KSFT framework.
> > 
> > This:
> > 
> >> Merge with
> >>
> >> commit 9ce1263033cd ("selftests, arm64: add a selftest for passing
> >> 		     tagged pointers to kernel")
> >>
> >> while moving such KSFT tags tests inside their own subdirectory
> >> (arm64/tags).
> > 
> > ...could be put under the tearoff, but it doesn't really belong in the
> > commit message IMHO.
> > 
> > I suggest rewriting the commit message to reflect the current
> > situation (but it can be kept brief).
> > 
> > Basically, what this patch now seems to do is to prepare for adding
> > more arm64 tests, by moving the tags tests into their own subdirectory
> > and extending the existing skeleton Makefile as appropriate.
> > 
> 
> Ok
> >> Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
> >> ---
> >> v4 --> v5
> >> - rebased on arm64/for-next/core
> >> - merged this patch with KSFT arm64 tags patch, while moving the latter
> >>   into its own subdir
> >> - moved kernel header includes search mechanism from KSFT arm64
> >>   SIGNAL Makefile
> >> - export proper top_srcdir ENV for lib.mk
> >> v3 --> v4
> >> - comment reword
> >> - simplified documentation in README
> >> - dropped README about standalone
> >> ---
> > 
> > [...]
> > 
> >> diff --git a/tools/testing/selftests/arm64/Makefile b/tools/testing/selftests/arm64/Makefile
> >> index a61b2e743e99..5dbb0ffdfc9a 100644
> >> --- a/tools/testing/selftests/arm64/Makefile
> >> +++ b/tools/testing/selftests/arm64/Makefile
> >> @@ -1,11 +1,69 @@
> >>  # SPDX-License-Identifier: GPL-2.0
> >> +# Copyright (C) 2019 ARM Limited
> > 
> > Change of copyright?  This isn't pure Arm IP upstream IIUC.
> > 
> > Maybe just drop it: Makefiles don't usually contain significant IP, so
> > many have no copyright message anyway.
> > 
> Right. I'll drop.
> >> -# ARCH can be overridden by the user for cross compiling
> >> -ARCH ?= $(shell uname -m 2>/dev/null || echo not)
> >> +# When ARCH not overridden for crosscompiling, lookup machine
> >> +ARCH ?= $(shell uname -m)
> >> +ARCH := $(shell echo $(ARCH) | sed -e s/aarch64/arm64/)
> >>  
> >> -ifneq (,$(filter $(ARCH),aarch64 arm64))
> >> -TEST_GEN_PROGS := tags_test
> >> -TEST_PROGS := run_tags_test.sh
> >> +ifeq ("x$(ARCH)", "xarm64")
> >> +SUBDIRS := tags
> >> +else
> >> +SUBDIRS :=
> >>  endif
> >>  
> >> -include ../lib.mk
> >> +CFLAGS := -Wall -O2 -g
> >> +
> >> +# A proper top_srcdir is needed by KSFT(lib.mk)
> >> +top_srcdir = ../../../../..
> >> +
> >> +# Additional include paths needed by kselftest.h and local headers
> >> +CFLAGS += -I$(top_srcdir)/tools/testing/selftests/
> >> +
> >> +# Guessing where the Kernel headers could have been installed
> >> +# depending on ENV config
> >> +ifeq ($(KBUILD_OUTPUT),)
> >> +khdr_dir = $(top_srcdir)/usr/include
> >> +else
> >> +# the KSFT preferred location when KBUILD_OUTPUT is set
> >> +khdr_dir = $(KBUILD_OUTPUT)/kselftest/usr/include
> >> +endif
> > 
> > Looking at this, can we just pass the directory in from the toplevel
> > "all" rule instead of guessing?
> > 
> Do you mean toplevel in KSFT ?
> I think it's how should be done at the end, but I was trying to keep this series on
> arm64/ lands only. (also maybe I'm missing something obvious in KSFT handling of this
> situation....even though many other KSFT use built CFLAGS like: -I../../../usr/include
> or similar)
> 
> > Maybe don't churn this for now though.  It's something that could be
> > looked at later.
> > 
> 
> Ok. I'll leave here and fix it to avoid relative paths...which could be problematic
> when exported to lower level Makefiles.
> 
> Cheers
> 
> Cristian

Sounds reasonable

Cheers
---Dave

  reply index

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-02 11:29 [PATCH v5 00/11] Add arm64/signal initial kselftest support Cristian Marussi
2019-09-02 11:29 ` [PATCH v5 01/11] kselftest: arm64: add skeleton Makefile Cristian Marussi
2019-09-03  9:26   ` Amit Kachhap
2019-09-03  9:45     ` Cristian Marussi
2019-09-05 17:57     ` Cristian Marussi
2019-09-09 12:42       ` Amit Kachhap
2019-09-16 11:41         ` Dave Martin
2019-09-04 11:47   ` Dave Martin
2019-09-05 13:45     ` Cristian Marussi
2019-09-05 14:18       ` Dave Martin [this message]
2019-09-02 11:29 ` [PATCH v5 02/11] kselftest: arm64: add common utils and one testcase Cristian Marussi
2019-09-04 11:47   ` Dave Martin
2019-09-06 10:26     ` Cristian Marussi
2019-09-16 11:40       ` Dave Martin
2019-09-02 11:29 ` [PATCH v5 03/11] kselftest: arm64: mangle_pstate_invalid_daif_bits Cristian Marussi
2019-09-04 11:48   ` Dave Martin
2019-09-02 11:29 ` [PATCH v5 04/11] kselftest: arm64: mangle_pstate_invalid_mode_el[123][ht] Cristian Marussi
2019-09-04 11:48   ` Dave Martin
2019-09-02 11:29 ` [PATCH v5 05/11] kselftest: arm64: mangle_pstate_ssbs_regs Cristian Marussi
2019-09-04 11:48   ` Dave Martin
2019-09-09 15:51     ` Cristian Marussi
2019-09-02 11:29 ` [PATCH v5 06/11] kselftest: arm64: fake_sigreturn_bad_magic Cristian Marussi
2019-09-04 11:48   ` Dave Martin
2019-09-09 17:31     ` Cristian Marussi
2019-09-02 11:29 ` [PATCH v5 07/11] kselftest: arm64: fake_sigreturn_bad_size_for_magic0 Cristian Marussi
2019-09-04 11:49   ` Dave Martin
2019-09-09 17:47     ` Cristian Marussi
2019-09-02 11:29 ` [PATCH v5 08/11] kselftest: arm64: fake_sigreturn_missing_fpsimd Cristian Marussi
2019-09-04 11:49   ` Dave Martin
2019-09-09 17:51     ` Cristian Marussi
2019-09-02 11:29 ` [PATCH v5 09/11] kselftest: arm64: fake_sigreturn_duplicated_fpsimd Cristian Marussi
2019-09-04 11:49   ` Dave Martin
2019-09-05 12:15     ` Cristian Marussi
2019-09-05 12:39       ` Dave Martin
2019-09-05 13:32         ` Cristian Marussi
2019-09-05 14:20           ` Dave Martin
2019-09-09 18:03     ` Cristian Marussi
2019-09-02 11:29 ` [PATCH v5 10/11] kselftest: arm64: fake_sigreturn_bad_size Cristian Marussi
2019-09-04 11:49   ` Dave Martin
2019-09-09 18:11     ` Cristian Marussi
2019-09-02 11:29 ` [PATCH v5 11/11] kselftest: arm64: fake_sigreturn_misaligned_sp Cristian Marussi
2019-09-04 11:49   ` Dave Martin
2019-09-09 18:32     ` Cristian Marussi
2019-09-04 11:47 ` [PATCH v5 00/11] Add arm64/signal initial kselftest support Dave Martin
2019-09-10 12:25   ` Cristian Marussi
2019-09-16 12:14     ` Dave Martin

Reply instructions:

You may reply publically to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190905141834.GE27757@arm.com \
    --to=dave.martin@arm.com \
    --cc=amit.kachhap@arm.com \
    --cc=andreyknvl@google.com \
    --cc=cristian.marussi@arm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=shuah@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Linux-kselftest Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-kselftest/0 linux-kselftest/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-kselftest linux-kselftest/ https://lore.kernel.org/linux-kselftest \
		linux-kselftest@vger.kernel.org linux-kselftest@archiver.kernel.org
	public-inbox-index linux-kselftest

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-kselftest


AGPL code for this site: git clone https://public-inbox.org/ public-inbox