From: Wei Yang <richard.weiyang@gmail.com>
To: Bala-Vignesh-Reddy <reddybalavignesh9979@gmail.com>
Cc: richard.weiyang@gmail.com, Liam.Howlett@oracle.com,
akpm@linux-foundation.org, davem@davemloft.net, david@redhat.com,
edumazet@google.com, gnoack@google.com, horms@kernel.org,
kuba@kernel.org, linux-kernel@vger.kernel.org,
linux-kselftest@vger.kernel.org, linux-mm@kvack.org,
linux-security-module@vger.kernel.org,
lorenzo.stoakes@oracle.com, mhocko@suse.com, mic@digikod.net,
ming.lei@redhat.com, pabeni@redhat.com, rppt@kernel.org,
shuah@kernel.org, skhan@linuxfoundation.org, surenb@google.com,
vbabka@suse.cz
Subject: Re: [PATCH 2/2] selftests: Replace relative includes with non-relative for kselftest.h and kselftest_harness.h
Date: Fri, 29 Aug 2025 01:43:58 +0000 [thread overview]
Message-ID: <20250829014358.qk3zme4qlaojun53@master> (raw)
In-Reply-To: <20250828094016.18063-1-reddybalavignesh9979@gmail.com>
On Thu, Aug 28, 2025 at 03:10:16PM +0530, Bala-Vignesh-Reddy wrote:
>Hi Wei,
>
>Thanks for testing and for your feedback.
>
>Yeah, if you try to build inside a subdirectory, the top level
>export may not apply, so CFLAGS don't get updated, and even if
>they did, the path could be pointing to wrong location.
>
>As the docs recommend, building selftest using TARGETS,
>either from kernel source or "tools/testing/selftests/"
>works fine and doesn't fail.
>
But this breaks current behavior. There might be users for this form.
>If you really want to build from selftests/mm/ directory then
>defining KSFT_INCLUDES with a fallback in the Makefile will
>resolve it, but there is no need of it if we stick with "TARGETS=mm".
>
How about add this in local Makefile ?
For example:
diff --git a/tools/testing/selftests/mm/Makefile b/tools/testing/selftests/mm/Makefile
index 810bd615b8c3..52f023071619 100644
--- a/tools/testing/selftests/mm/Makefile
+++ b/tools/testing/selftests/mm/Makefile
@@ -158,6 +158,10 @@ TEST_FILES += test_page_frag.sh
# required by charge_reserved_hugetlb.sh
TEST_FILES += write_hugetlb_memory.sh
+ifeq ($(KSFT_INCLUDES),)
+KSFT_INCLUDES := -I../
+endif
+
include ../lib.mk
$(TEST_GEN_PROGS): vm_util.c thp_settings.c
>Thanks
>Bala Vignesh
--
Wei Yang
Help you, Help me
next prev parent reply other threads:[~2025-08-29 1:44 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-27 14:47 [PATCH 0/2] selftests: Centralize kselftest headers to avoid relative includes Bala-Vignesh-Reddy
2025-08-27 14:47 ` [PATCH 1/2] selftests: Centralize include path for kselftest.h and kselftest_harness.h Bala-Vignesh-Reddy
2025-08-27 14:47 ` [PATCH 2/2] selftests: Replace relative includes with non-relative " Bala-Vignesh-Reddy
2025-08-28 8:10 ` Wei Yang
2025-08-28 9:40 ` Bala-Vignesh-Reddy
2025-08-29 1:43 ` Wei Yang [this message]
2025-08-29 10:53 ` Bala-Vignesh-Reddy
2025-08-30 0:55 ` Wei Yang
2025-08-27 22:56 ` [PATCH 0/2] selftests: Centralize kselftest headers to avoid relative includes Andrew Morton
2025-08-30 16:39 ` [PATCH v2 " Bala-Vignesh-Reddy
2025-08-30 16:39 ` [PATCH v2 1/2] selftests: Centralize include path for kselftest.h and kselftest_harness.h Bala-Vignesh-Reddy
2025-08-30 22:30 ` Wei Yang
2025-08-30 16:39 ` [PATCH v2 2/2] selftests: Replace relative includes with non-relative " Bala-Vignesh-Reddy
2025-08-30 22:31 ` Wei Yang
2025-08-31 20:03 ` Andrew Morton
2025-09-01 2:58 ` Bala-Vignesh-Reddy
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=20250829014358.qk3zme4qlaojun53@master \
--to=richard.weiyang@gmail.com \
--cc=Liam.Howlett@oracle.com \
--cc=akpm@linux-foundation.org \
--cc=davem@davemloft.net \
--cc=david@redhat.com \
--cc=edumazet@google.com \
--cc=gnoack@google.com \
--cc=horms@kernel.org \
--cc=kuba@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=lorenzo.stoakes@oracle.com \
--cc=mhocko@suse.com \
--cc=mic@digikod.net \
--cc=ming.lei@redhat.com \
--cc=pabeni@redhat.com \
--cc=reddybalavignesh9979@gmail.com \
--cc=rppt@kernel.org \
--cc=shuah@kernel.org \
--cc=skhan@linuxfoundation.org \
--cc=surenb@google.com \
--cc=vbabka@suse.cz \
/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).