lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250829014358.qk3zme4qlaojun53@master>
Date: Fri, 29 Aug 2025 01:43:58 +0000
From: Wei Yang <richard.weiyang@...il.com>
To: Bala-Vignesh-Reddy <reddybalavignesh9979@...il.com>
Cc: richard.weiyang@...il.com, Liam.Howlett@...cle.com,
	akpm@...ux-foundation.org, davem@...emloft.net, david@...hat.com,
	edumazet@...gle.com, gnoack@...gle.com, horms@...nel.org,
	kuba@...nel.org, linux-kernel@...r.kernel.org,
	linux-kselftest@...r.kernel.org, linux-mm@...ck.org,
	linux-security-module@...r.kernel.org, lorenzo.stoakes@...cle.com,
	mhocko@...e.com, mic@...ikod.net, ming.lei@...hat.com,
	pabeni@...hat.com, rppt@...nel.org, shuah@...nel.org,
	skhan@...uxfoundation.org, surenb@...gle.com, vbabka@...e.cz
Subject: Re: [PATCH 2/2] selftests: Replace relative includes with
 non-relative for kselftest.h and kselftest_harness.h

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ