All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
To: Matthieu Baerts <matthieu.baerts@tessares.net>,
	Shuah Khan <shuah@kernel.org>,
	linux-kselftest@vger.kernel.org, Ingo Molnar <mingo@redhat.com>
Cc: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Subject: Re: [PATCH 17/34] selftests: net: Fix incorrect kernel headers search path
Date: Fri, 27 Jan 2023 17:42:53 +0100	[thread overview]
Message-ID: <19a5036f-a7f4-846d-57ac-eee69d6a0ff0@efficios.com> (raw)
In-Reply-To: <9174ce77-f891-8428-6c36-6b8b4a21cd26@tessares.net>

On 2023-01-27 11:21, Matthieu Baerts wrote:
> Hi Mathieu,
> 
> On 27/01/2023 14:57, Mathieu Desnoyers wrote:
>> Use $(KHDR_INCLUDES) as lookup path for kernel headers. This prevents
>> building against kernel headers from the build environment in scenarios
>> where kernel headers are installed into a specific output directory
>> (O=...).
> 
> Thank you for the patch!

You're welcome :)

> 
>> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
>> Cc: Shuah Khan <shuah@kernel.org>
>> Cc: linux-kselftest@vger.kernel.org
>> Cc: Ingo Molnar <mingo@redhat.com>
>> Cc: <stable@vger.kernel.org>    [5.18+]
> 
> (It might be useful to add a "Fixes" tag as well to clearly indicate the
> dependence with a specific commit and better understand the fix.)

Just a bit of context: I found this problematic pattern in my own 
selftests (rseq and membarrier), and figured that it was an issue all 
across the board. I did an initial single-patch fix, and then split it 
up in 34 patches based on feedback from Shuah Khan.

I know it should have a Fixed ... tag, but I simply don't have time to 
do the historical investigation work for all the 34 patches form this 
patchset. Perhaps someone else is up to the task ?

> 
> (and add all the individual maintainers of the files you modify -- feel
> free to use 'b4' to help you for this task ;-) )

If this can be automated, then perhaps Shuah can use it to append the 
relevant information ?

> 
> (...)
> 
>> diff --git a/tools/testing/selftests/net/mptcp/Makefile b/tools/testing/selftests/net/mptcp/Makefile
>> index 43a723626126..06bba013bcef 100644
>> --- a/tools/testing/selftests/net/mptcp/Makefile
>> +++ b/tools/testing/selftests/net/mptcp/Makefile
>> @@ -2,7 +2,7 @@
>>   
>>   top_srcdir = ../../../../..
>>   
>> -CFLAGS =  -Wall -Wl,--no-as-needed -O2 -g -I$(top_srcdir)/usr/include $(KHDR_INCLUDES)
>> +CFLAGS =  -Wall -Wl,--no-as-needed -O2 -g $(KHDR_INCLUDES)
> 
> I only looked at the modification here with MPTCP selftests and it looks
> good to me. It makes sense because if KHDR_INCLUDES is not set, it will
> be set later by lib.mk I suppose.
> 
> Just one small thing: I guess you can also remove "top_srcdir" variable
> that is no longer used, right? I see that "lib.mk" uses a variable with
> the same name but it overrides its value anyway. But it is likely I
> missed something there :)
> 
> If indeed it is no longer needed, I guess a few Makefile can be adapted
> according to:
> 
>    git grep top_srcdir -- tools/testing/selftests/*/
> 

Yes, this should perhaps come as additional fixes on top of my series. I 
don't have time to do it myself though.

Anyone willing to contribute it ?

> I guess most of these Makefile are very similar, no? For MPTCP, we
> simply looked at what was done elsewhere :)

Yes, I did likewise.

Thanks for the feedback,

Mathieu

> 
> Cheers,
> Matt

-- 
Mathieu Desnoyers
EfficiOS Inc.
https://www.efficios.com


  reply	other threads:[~2023-01-27 16:43 UTC|newest]

Thread overview: 74+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-27 13:57 [PATCH 00/34] selftests: Fix incorrect kernel headers search path Mathieu Desnoyers
2023-01-27 13:57 ` [PATCH 01/34] selftests: arm64: " Mathieu Desnoyers
2023-01-30 16:09   ` Shuah Khan
2023-01-30 16:09     ` Shuah Khan
2023-01-30 17:14     ` Catalin Marinas
2023-01-30 17:14       ` Catalin Marinas
2023-01-30 17:20       ` Shuah Khan
2023-01-30 17:20         ` Shuah Khan
2023-01-27 13:57 ` [PATCH 02/34] selftests: bpf: " Mathieu Desnoyers
2023-01-30 16:12   ` Shuah Khan
2023-01-30 16:26     ` Alexei Starovoitov
2023-01-30 17:00       ` Mathieu Desnoyers
2023-01-30 17:09         ` Shuah Khan
2023-01-27 13:57 ` [PATCH 03/34] selftests: clone3: " Mathieu Desnoyers
2023-01-30 16:15   ` Shuah Khan
2023-01-30 16:26     ` Christian Brauner
2023-01-27 13:57 ` [PATCH 04/34] selftests: core: " Mathieu Desnoyers
2023-01-27 13:57 ` [PATCH 05/34] selftests: dma: " Mathieu Desnoyers
2023-01-27 13:57 ` [PATCH 06/34] selftests: dmabuf-heaps: " Mathieu Desnoyers
2023-01-27 13:57 ` [PATCH 07/34] selftests: drivers: " Mathieu Desnoyers
2023-01-27 13:57 ` [PATCH 08/34] selftests: filesystems: " Mathieu Desnoyers
2023-01-27 13:57 ` [PATCH 09/34] selftests: futex: " Mathieu Desnoyers
2023-01-27 13:57 ` [PATCH 10/34] selftests: gpio: " Mathieu Desnoyers
2023-01-27 13:57 ` [PATCH 11/34] selftests: ipc: " Mathieu Desnoyers
2023-01-27 13:57 ` [PATCH 12/34] selftests: kcmp: " Mathieu Desnoyers
2023-01-27 13:57 ` [PATCH 13/34] selftests: media_tests: " Mathieu Desnoyers
2023-01-27 13:57 ` [PATCH 14/34] selftests: membarrier: " Mathieu Desnoyers
2023-01-27 13:57 ` [PATCH 15/34] selftests: mount_setattr: " Mathieu Desnoyers
2023-01-27 13:57 ` [PATCH 16/34] selftests: move_mount_set_group: " Mathieu Desnoyers
2023-01-27 13:57 ` [PATCH 17/34] selftests: net: " Mathieu Desnoyers
2023-01-27 16:21   ` Matthieu Baerts
2023-01-27 16:42     ` Mathieu Desnoyers [this message]
2023-01-30 16:24   ` Shuah Khan
2023-01-27 13:57 ` [PATCH 18/34] selftests: perf_events: " Mathieu Desnoyers
2023-01-27 13:57 ` [PATCH 19/34] selftests: pid_namespace: " Mathieu Desnoyers
2023-01-27 13:57 ` [PATCH 20/34] selftests: pidfd: " Mathieu Desnoyers
2023-01-27 13:57 ` [PATCH 21/34] selftests: powerpc: " Mathieu Desnoyers
2023-01-30 16:32   ` Shuah Khan
2023-01-30 16:32     ` Shuah Khan
2023-01-27 13:57 ` [PATCH 22/34] selftests: ptp: " Mathieu Desnoyers
2023-01-27 13:57 ` [PATCH 23/34] selftests: rseq: " Mathieu Desnoyers
2023-01-27 13:57 ` [PATCH 24/34] selftests: sched: " Mathieu Desnoyers
2023-01-27 13:57 ` [PATCH 25/34] selftests: seccomp: " Mathieu Desnoyers
2023-01-30 16:52   ` Shuah Khan
2023-01-27 13:57 ` [PATCH 26/34] selftests: sync: " Mathieu Desnoyers
2023-01-30 16:44   ` Shuah Khan
2023-01-30 16:51     ` Shuah Khan
2023-01-27 13:57 ` [PATCH 27/34] selftests: user_events: " Mathieu Desnoyers
2023-01-27 13:57 ` [PATCH 28/34] selftests: vm: " Mathieu Desnoyers
2023-01-30 16:55   ` Shuah Khan
2023-01-27 13:57 ` [PATCH 29/34] selftests: x86: " Mathieu Desnoyers
2023-01-27 13:57 ` [PATCH 30/34] selftests: bpf docs: Use installed " Mathieu Desnoyers
2023-01-30 16:57   ` Shuah Khan
2023-01-27 13:57 ` [PATCH 31/34] selftests: iommu: " Mathieu Desnoyers
2023-01-30 17:01   ` Shuah Khan
2023-01-30 17:05     ` Jason Gunthorpe
2023-01-27 13:57 ` [PATCH 32/34] selftests: memfd: " Mathieu Desnoyers
2023-01-27 13:57 ` [PATCH 33/34] selftests: ptrace: " Mathieu Desnoyers
2023-01-27 13:57 ` [PATCH 34/34] selftests: tdx: " Mathieu Desnoyers
2023-01-30 22:29 ` [PATCH 00/34] selftests: Fix incorrect " Shuah Khan
2023-01-30 22:29   ` Shuah Khan
2023-01-30 23:45   ` Alexei Starovoitov
2023-01-30 23:45     ` Alexei Starovoitov
2023-01-30 23:48     ` Shuah Khan
2023-01-30 23:48       ` Shuah Khan
2023-01-30 23:49       ` Alexei Starovoitov
2023-01-30 23:49         ` Alexei Starovoitov
2023-02-02  2:07   ` Shuah Khan
2023-02-02  2:07     ` Shuah Khan
2023-02-04  1:06     ` Shuah Khan
2023-02-04  1:06       ` Shuah Khan
2023-02-11  0:15       ` Shuah Khan
2023-02-11  0:15         ` Shuah Khan
2023-02-20  3:49 ` (subset) " Michael Ellerman

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=19a5036f-a7f4-846d-57ac-eee69d6a0ff0@efficios.com \
    --to=mathieu.desnoyers@efficios.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=matthieu.baerts@tessares.net \
    --cc=mingo@redhat.com \
    --cc=shuah@kernel.org \
    --cc=stable@vger.kernel.org \
    /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.