All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tyler Hicks <code@tyhicks.com>
To: stable@vger.kernel.org
Cc: Shuah Khan <skhan@linuxfoundation.org>,
	Muhammad Usama Anjum <usama.anjum@collabora.com>,
	Tyler Hicks <code@tyhicks.com>
Subject: [PATCH 5.4 1/2] selftests: Fix kselftest O=objdir build from cluttering top level objdir
Date: Fri,  6 Jan 2023 16:08:43 -0600	[thread overview]
Message-ID: <20230106220844.763870-2-code@tyhicks.com> (raw)
In-Reply-To: <20230106220844.763870-1-code@tyhicks.com>

From: Shuah Khan <skhan@linuxfoundation.org>

commit 29e911ef7b706215caf02a82b0d3076611d6abe8 upstream.

make kselftest-all O=objdir builds create generated objects in objdir.
This clutters the top level directory with kselftest objects. Fix it
to create sub-directory under objdir for kselftest objects.

Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Signed-off-by: Tyler Hicks (Microsoft) <code@tyhicks.com>
---
 tools/testing/selftests/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/testing/selftests/Makefile b/tools/testing/selftests/Makefile
index 612f6757015d..0eb5567bb94a 100644
--- a/tools/testing/selftests/Makefile
+++ b/tools/testing/selftests/Makefile
@@ -78,7 +78,7 @@ override LDFLAGS =
 override MAKEFLAGS =
 endif
 
-# Append kselftest to KBUILD_OUTPUT to avoid cluttering
+# Append kselftest to KBUILD_OUTPUT and O to avoid cluttering
 # KBUILD_OUTPUT with selftest objects and headers installed
 # by selftests Makefile or lib.mk.
 ifdef building_out_of_srctree
@@ -86,7 +86,7 @@ override LDFLAGS =
 endif
 
 ifneq ($(O),)
-	BUILD := $(O)
+	BUILD := $(O)/kselftest
 else
 	ifneq ($(KBUILD_OUTPUT),)
 		BUILD := $(KBUILD_OUTPUT)/kselftest
-- 
2.34.1


  reply	other threads:[~2023-01-06 22:09 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-06 22:08 [PATCH 5.4 0/2] Fix kselftest builds when specifying an output dir Tyler Hicks
2023-01-06 22:08 ` Tyler Hicks [this message]
2023-01-06 22:08 ` [PATCH 5.4 2/2] selftests: set the BUILD variable to absolute path Tyler Hicks
2023-01-12 12:49 ` [PATCH 5.4 0/2] Fix kselftest builds when specifying an output dir Greg KH

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=20230106220844.763870-2-code@tyhicks.com \
    --to=code@tyhicks.com \
    --cc=skhan@linuxfoundation.org \
    --cc=stable@vger.kernel.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.