[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <e0b9d4ad-0d47-499a-9ec8-7307b67cae5c@linuxfoundation.org>
Date: Thu, 17 Oct 2024 10:33:38 -0600
From: Shuah Khan <skhan@...uxfoundation.org>
To: John Hubbard <jhubbard@...dia.com>,
Lorenzo Stoakes <lorenzo.stoakes@...cle.com>,
Christian Brauner <christian@...uner.io>,
Peter Zijlstra <peterz@...radead.org>
Cc: Shuah Khan <shuah@...nel.org>, "Liam R . Howlett"
<Liam.Howlett@...cle.com>, Suren Baghdasaryan <surenb@...gle.com>,
Vlastimil Babka <vbabka@...e.cz>, pedro.falcato@...il.com,
linux-kselftest@...r.kernel.org, linux-mm@...ck.org,
linux-fsdevel@...r.kernel.org, linux-api@...r.kernel.org,
linux-kernel@...r.kernel.org, Oliver Sang <oliver.sang@...el.com>,
Shuah Khan <skhan@...uxfoundation.org>
Subject: Re: The "make headers" requirement, revisited: [PATCH v3 3/3]
selftests: pidfd: add tests for PIDFD_SELF_*
On 10/16/24 20:01, John Hubbard wrote:
> On 10/16/24 1:00 PM, Shuah Khan wrote:
>> On 10/16/24 04:20, Lorenzo Stoakes wrote:
> ...
>>> diff --git a/tools/testing/selftests/pidfd/pidfd.h b/tools/testing/selftests/pidfd/pidfd.h
>>> index 88d6830ee004..1640b711889b 100644
>>> --- a/tools/testing/selftests/pidfd/pidfd.h
>>> +++ b/tools/testing/selftests/pidfd/pidfd.h
>>> @@ -50,6 +50,14 @@
>>> #define PIDFD_NONBLOCK O_NONBLOCK
>>> #endif
>>> +/* System header file may not have this available. */
>>> +#ifndef PIDFD_SELF_THREAD
>>> +#define PIDFD_SELF_THREAD -100
>>> +#endif
>>> +#ifndef PIDFD_SELF_THREAD_GROUP
>>> +#define PIDFD_SELF_THREAD_GROUP -200
>>> +#endif
>>> +
>>
>> As mentioned in my response to v1 patch:
>>
>> kselftest has dependency on "make headers" and tests include
>> headers from linux/ directory
>
> Wait, what?! Noooo!
>
> Hi, Shuah! :)
>
> We have had this conversation before. And there were fireworks coming from
> various core kernel developers who found that requirement to be unacceptable.
>
> And in response, I made at selftests/mm tests buildable *without* requiring
> a "make headers" first, in [1].
>
> I haven't followed up with other subsystems, but...maybe I should. Because
> otherwise we're just going to keep having this discussion.
>
> The requirement to do "make headers" is not a keeper. Really.
The reason we added the requirement to avoid duplicate defines
such as this one added to kselftest source files. These are
error prone and hard to resolve.
In some cases, these don't become uapi and don't make it into
system headers. selftests are in a category of depending on
kernel headers to be able to test some features.
Getting rid of this dependency mean, tests will be full of local
defines such as this one which will become unmanageable overtime.
The discussion should be: "How do we get rid of the dependency without
introducing local defines?" not just "Let's get rid of the dependency"
thanks,
-- Shuah
Powered by blists - more mailing lists