linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "André Almeida" <andrealmeid@collabora.com>
To: Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Darren Hart <dvhart@infradead.org>,
	linux-kernel@vger.kernel.org
Cc: kernel@collabora.com, linux-kselftest@vger.kernel.org,
	shuah@kernel.org, "André Almeida" <andrealmeid@collabora.com>
Subject: [PATCH 1/2] selftests: futex: Correctly include headers dirs
Date: Tue, 27 Apr 2021 10:53:27 -0300	[thread overview]
Message-ID: <20210427135328.11013-2-andrealmeid@collabora.com> (raw)
In-Reply-To: <20210427135328.11013-1-andrealmeid@collabora.com>

When building selftests, the build system will install uapi linux
headers at usr/include in kernel source's root directory. When building
with a different output folder, the headers will be installed at
kselftests/usr/include. Add both paths so we can build the tests using
up-to-date headers. Currently, this is uncommon to happen since it's
rare to find a build system with an outdated futex header, but it
happens when testing new futex operations.

Signed-off-by: André Almeida <andrealmeid@collabora.com>
---
 tools/testing/selftests/futex/functional/Makefile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tools/testing/selftests/futex/functional/Makefile b/tools/testing/selftests/futex/functional/Makefile
index 23207829ec75..1d2b3b2a5b86 100644
--- a/tools/testing/selftests/futex/functional/Makefile
+++ b/tools/testing/selftests/futex/functional/Makefile
@@ -1,5 +1,6 @@
 # SPDX-License-Identifier: GPL-2.0
-INCLUDES := -I../include -I../../
+INCLUDES := -I../include -I../../ -I../../../../../usr/include/ \
+	-I$(KBUILD_OUTPUT)/kselftest/usr/include
 CFLAGS := $(CFLAGS) -g -O2 -Wall -D_GNU_SOURCE -pthread $(INCLUDES)
 LDLIBS := -lpthread -lrt
 
-- 
2.31.1


  reply	other threads:[~2021-04-27 13:53 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-27 13:53 [PATCH 0/2] selftests: futex: Improve timeout testing André Almeida
2021-04-27 13:53 ` André Almeida [this message]
2021-05-12 18:50   ` [tip: locking/core] selftests: futex: Correctly include headers dirs tip-bot2 for André Almeida
2021-04-27 13:53 ` [PATCH 2/2] selftests: futex: Expand timeout test André Almeida
2021-05-12 18:50   ` [tip: locking/core] " tip-bot2 for André Almeida

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=20210427135328.11013-2-andrealmeid@collabora.com \
    --to=andrealmeid@collabora.com \
    --cc=dvhart@infradead.org \
    --cc=kernel@collabora.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=shuah@kernel.org \
    --cc=tglx@linutronix.de \
    /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;
as well as URLs for NNTP newsgroup(s).