linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Matthieu Baerts <matthieu.baerts@tessares.net>
To: "Muhammad Usama Anjum" <usama.anjum@collabora.com>,
	"Shuah Khan" <shuah@kernel.org>,
	"Thomas Gleixner" <tglx@linutronix.de>,
	"Ingo Molnar" <mingo@redhat.com>,
	"Peter Zijlstra" <peterz@infradead.org>,
	"Darren Hart" <dvhart@infradead.org>,
	"Davidlohr Bueso" <dave@stgolabs.net>,
	"André Almeida" <andrealmeid@collabora.com>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Mickaël Salaün" <mic@digikod.net>,
	"David S. Miller" <davem@davemloft.net>,
	"Jakub Kicinski" <kuba@kernel.org>,
	"Mat Martineau" <mathew.j.martineau@linux.intel.com>,
	"Andrew Morton" <akpm@linux-foundation.org>,
	chiminghao <chi.minghao@zte.com.cn>,
	"open list:KERNEL SELFTEST FRAMEWORK"
	<linux-kselftest@vger.kernel.org>,
	"open list" <linux-kernel@vger.kernel.org>,
	"open list:KERNEL VIRTUAL MACHINE (KVM)" <kvm@vger.kernel.org>,
	"open list:LANDLOCK SECURITY MODULE"
	<linux-security-module@vger.kernel.org>,
	"open list:NETWORKING [GENERAL]" <netdev@vger.kernel.org>,
	"open list:NETWORKING [MPTCP]" <mptcp@lists.linux.dev>,
	"open list:MEMORY MANAGEMENT" <linux-mm@kvack.org>
Cc: kernel@collabora.com
Subject: Re: [PATCH 08/10] selftests: mptcp: Add the uapi headers include variable
Date: Tue, 18 Jan 2022 22:47:27 +0100	[thread overview]
Message-ID: <4d60a170-53d7-3f9f-fa48-34d6c4020346@tessares.net> (raw)
In-Reply-To: <20220118112909.1885705-9-usama.anjum@collabora.com>

Hi Muhammad,

On 18/01/2022 12:29, Muhammad Usama Anjum wrote:
> Out of tree build of this test fails if relative path of the output
> directory is specified. Remove the un-needed include paths and use
> KHDR_INCLUDES to correctly reach the headers.

Thank you for looking at that!

> Signed-off-by: Muhammad Usama Anjum <usama.anjum@collabora.com>
> ---
>  tools/testing/selftests/net/mptcp/Makefile | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/tools/testing/selftests/net/mptcp/Makefile b/tools/testing/selftests/net/mptcp/Makefile
> index 0356c4501c99..fed6866d3b73 100644
> --- a/tools/testing/selftests/net/mptcp/Makefile
> +++ b/tools/testing/selftests/net/mptcp/Makefile
> @@ -1,9 +1,8 @@
>  # SPDX-License-Identifier: GPL-2.0
>  
> -top_srcdir = ../../../../..

Removing this line breaks our CI validating MPTCP selftests. That's
because this "top_srcdir" variable is needed in the "lib.mk" file which
is included at the end of this Makefile.

But that's maybe a misuse from our side. Indeed to avoid compiling
binaries and more from the VM, our CI does that as a preparation job
before starting the VM and run MPTCP selftests:

  $ make O=(...) INSTALL_HDR_PATH=(...)/kselftest/usr headers_install
  $ make O=(...) -C tools/testing/selftests/net/mptcp

From the VM, we re-use the same source directory and we can start
individual tests without having to compile anything else:

  $ cd tools/testing/selftests/net/mptcp
  $ ./mptcp_connect.sh

We want to do that because some scripts are launched multiple times with
different parameters.

With your modifications, we can drop the headers_install instruction but
we need to pass new parameters to the last 'make' command:

  $ make O=(...) top_srcdir=../../../../.. \
                 KHDR_INCLUDES=-I(...)/usr/include \
         -C tools/testing/selftests/net/mptcp

Or is there a better way to do that?
Can we leave the definition of "top_srcdir" like it was or did we miss
something else?

>  KSFT_KHDR_INSTALL := 1
>  
> -CFLAGS =  -Wall -Wl,--no-as-needed -O2 -g  -I$(top_srcdir)/usr/include
> +CFLAGS =  -Wall -Wl,--no-as-needed -O2 -g $(KHDR_INCLUDES)
>  
>  TEST_PROGS := mptcp_connect.sh pm_netlink.sh mptcp_join.sh diag.sh \
>  	      simult_flows.sh mptcp_sockopt.sh

Note: I see there is a very long recipients list. If my issue is not
directly due to your modifications, we can probably continue the
discussion with a restricted audience.

Cheers,
Matt
-- 
Tessares | Belgium | Hybrid Access Solutions
www.tessares.net


  reply	other threads:[~2022-01-18 21:47 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-18 11:28 [PATCH 00/10] selftests: Fix separate output directory builds Muhammad Usama Anjum
2022-01-18 11:29 ` [PATCH 01/10] selftests: set the BUILD variable to absolute path Muhammad Usama Anjum
2022-01-18 11:29 ` [PATCH 02/10] selftests: Add and export a kernel uapi headers path Muhammad Usama Anjum
2022-01-18 11:29 ` [PATCH 03/10] selftests: Correct the headers install path Muhammad Usama Anjum
2022-01-18 11:29 ` [PATCH 04/10] selftests: futex: Add the uapi headers include variable Muhammad Usama Anjum
2022-01-18 11:29 ` [PATCH 05/10] selftests: kvm: " Muhammad Usama Anjum
2022-01-18 11:29 ` [PATCH 06/10] selftests: landlock: " Muhammad Usama Anjum
2022-01-18 12:35   ` Mickaël Salaün
2022-01-18 13:18     ` Muhammad Usama Anjum
2022-01-18 11:29 ` [PATCH 07/10] selftests: net: " Muhammad Usama Anjum
2022-01-18 11:29 ` [PATCH 08/10] selftests: mptcp: " Muhammad Usama Anjum
2022-01-18 21:47   ` Matthieu Baerts [this message]
2022-01-19  8:22     ` Muhammad Usama Anjum
2022-01-18 11:29 ` [PATCH 09/10] selftests: vm: " Muhammad Usama Anjum
2022-01-18 11:32   ` Paolo Bonzini
2022-01-18 11:29 ` [PATCH 10/10] selftests: vm: remove dependecy from internal kernel macros Muhammad Usama Anjum

Reply instructions:

You may reply publicly 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=4d60a170-53d7-3f9f-fa48-34d6c4020346@tessares.net \
    --to=matthieu.baerts@tessares.net \
    --cc=akpm@linux-foundation.org \
    --cc=andrealmeid@collabora.com \
    --cc=chi.minghao@zte.com.cn \
    --cc=dave@stgolabs.net \
    --cc=davem@davemloft.net \
    --cc=dvhart@infradead.org \
    --cc=kernel@collabora.com \
    --cc=kuba@kernel.org \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=mathew.j.martineau@linux.intel.com \
    --cc=mic@digikod.net \
    --cc=mingo@redhat.com \
    --cc=mptcp@lists.linux.dev \
    --cc=netdev@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=peterz@infradead.org \
    --cc=shuah@kernel.org \
    --cc=tglx@linutronix.de \
    --cc=usama.anjum@collabora.com \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox