Netdev List
 help / color / mirror / Atom feed
* [PATCH net 0/2] selftests: net: use KHDR_INCLUDES in CFLAGS
@ 2026-09-04 16:13 Matthieu Baerts (NGI0)
  2026-09-04 16:13 ` [PATCH net 1/2] selftests: netfilter: " Matthieu Baerts (NGI0)
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Matthieu Baerts (NGI0) @ 2026-09-04 16:13 UTC (permalink / raw)
  To: Pablo Neira Ayuso, Florian Westphal, Phil Sutter, David S. Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni, Simon Horman,
	Shuah Khan, David Ahern, Ido Schimmel
  Cc: Ilya Maximets, netfilter-devel, coreteam, netdev, linux-kselftest,
	linux-kernel, Matthieu Baerts (NGI0)

KHDR_INCLUDES is typically used to include headers from the kernel
source directory instead of only relying on the ones from the host: they
can be missing or outdated. See the issue reported in [1] where users
have to set USERCFLAGS instead, which shouldn't be needed.

The kselftest doc [2] recommends assigning KHDR_INCLUDES to CFLAGS in a
target Makefile. lib.mk will set KHDR_INCLUDES to "-isystem
$(top_srcdir)/usr/include" if the user didn't set it, e.g. if the kernel
was built in a different build directory.

Other net targets have KHDR_INCLUDES added to their CFLAGS.

Link: https://lore.kernel.org/275ba183-49fd-45b1-881d-0f362b4c74c0@ovn.org [1]
Link: https://docs.kernel.org/dev-tools/kselftest.html#contributing-new-tests-details [2]
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
---
Note: this series is targeting net to help CI and devs validating Linus
tree or the stable ones. These are not critical fixes for the kernel,
but still useful for the tests. If preferred, the series can be applied
on net-next.

---
Matthieu Baerts (NGI0) (2):
      selftests: netfilter: use KHDR_INCLUDES in CFLAGS
      selftests: forwarding: use KHDR_INCLUDES in CFLAGS

 tools/testing/selftests/net/forwarding/Makefile | 2 ++
 tools/testing/selftests/net/netfilter/Makefile  | 2 ++
 2 files changed, 4 insertions(+)
---
base-commit: 641d03105cc0d2437e32fdeec164f91a4ccef6c4
change-id: 20260904-net-sft-nf-khdr_includes-07aa6b61143d

Best regards,
--  
Matthieu Baerts (NGI0) <matttbe@kernel.org>


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2026-09-04 18:51 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-04 16:13 [PATCH net 0/2] selftests: net: use KHDR_INCLUDES in CFLAGS Matthieu Baerts (NGI0)
2026-09-04 16:13 ` [PATCH net 1/2] selftests: netfilter: " Matthieu Baerts (NGI0)
2026-09-04 16:41   ` Ilya Maximets
2026-09-04 16:55     ` Matthieu Baerts
2026-09-04 16:13 ` [PATCH net 2/2] selftests: forwarding: " Matthieu Baerts (NGI0)
2026-09-04 16:44   ` Ilya Maximets
2026-09-04 18:20 ` [PATCH net 0/2] selftests: net: " Matthieu Baerts
2026-09-04 18:51   ` Jakub Kicinski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox