Re: [PATCH v3 3/3] selftests: pidfd: add tests for PIDFD_SELF_*

2024-10-17 Thread Lorenzo Stoakes
On Thu, Oct 17, 2024 at 01:37:06PM -0600, Shuah Khan wrote: > On 10/17/24 11:38, Lorenzo Stoakes wrote: > > On Thu, Oct 17, 2024 at 10:37:00AM -0700, John Hubbard wrote: > > > On 10/17/24 10:28 AM, Lorenzo Stoakes wrote: > > > > On Thu, Oct 17, 2024 at 10:17:54AM -0700, John Hubbard wrote: > > > >

Re: [PATCH v3 3/3] selftests: pidfd: add tests for PIDFD_SELF_*

2024-10-17 Thread Shuah Khan
On 10/17/24 11:38, Lorenzo Stoakes wrote: On Thu, Oct 17, 2024 at 10:37:00AM -0700, John Hubbard wrote: On 10/17/24 10:28 AM, Lorenzo Stoakes wrote: On Thu, Oct 17, 2024 at 10:17:54AM -0700, John Hubbard wrote: On 10/17/24 5:06 AM, Lorenzo Stoakes wrote: ... #ifndef __TOOLS_LINUX_PID

Re: [PATCH v3 3/3] selftests: pidfd: add tests for PIDFD_SELF_*

2024-10-17 Thread Lorenzo Stoakes
On Thu, Oct 17, 2024 at 10:37:00AM -0700, John Hubbard wrote: > On 10/17/24 10:28 AM, Lorenzo Stoakes wrote: > > On Thu, Oct 17, 2024 at 10:17:54AM -0700, John Hubbard wrote: > > > On 10/17/24 5:06 AM, Lorenzo Stoakes wrote: > ... > > > > #ifndef __TOOLS_LINUX_PIDFD_H > > > > #defin

Re: [PATCH v3 3/3] selftests: pidfd: add tests for PIDFD_SELF_*

2024-10-17 Thread John Hubbard
On 10/17/24 10:28 AM, Lorenzo Stoakes wrote: On Thu, Oct 17, 2024 at 10:17:54AM -0700, John Hubbard wrote: On 10/17/24 5:06 AM, Lorenzo Stoakes wrote: ... #ifndef __TOOLS_LINUX_PIDFD_H #define __TOOLS_LINUX_PIDFD_H /* * Some systems have issues with the linux/

Re: [PATCH v3 3/3] selftests: pidfd: add tests for PIDFD_SELF_*

2024-10-17 Thread Lorenzo Stoakes
On Thu, Oct 17, 2024 at 10:17:54AM -0700, John Hubbard wrote: > On 10/17/24 5:06 AM, Lorenzo Stoakes wrote: > > +cc John, sorry I forgot to cc you on other replies!! > > > > On Thu, Oct 17, 2024 at 09:08:19AM +0100, Lorenzo Stoakes wrote: > > [snip] > > > > > > In any case I think copying the heade

Re: [PATCH v3 3/3] selftests: pidfd: add tests for PIDFD_SELF_*

2024-10-17 Thread John Hubbard
On 10/17/24 5:06 AM, Lorenzo Stoakes wrote: +cc John, sorry I forgot to cc you on other replies!! On Thu, Oct 17, 2024 at 09:08:19AM +0100, Lorenzo Stoakes wrote: [snip] In any case I think copying the header to the tools/ directory with this linux/fcntl.h in some way stubbed out (we could eve

Re: The "make headers" requirement, revisited: [PATCH v3 3/3] selftests: pidfd: add tests for PIDFD_SELF_*

2024-10-17 Thread John Hubbard
On 10/17/24 9:33 AM, Shuah Khan wrote: 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: ... The requirement to do "make headers" is not a keeper. Really. The reason we added the requirement to avoid duplicate defines suc

Re: The "make headers" requirement, revisited: [PATCH v3 3/3] selftests: pidfd: add tests for PIDFD_SELF_*

2024-10-17 Thread Shuah Khan
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/pi

Re: [PATCH v3 3/3] selftests: pidfd: add tests for PIDFD_SELF_*

2024-10-17 Thread Lorenzo Stoakes
+cc John, sorry I forgot to cc you on other replies!! On Thu, Oct 17, 2024 at 09:08:19AM +0100, Lorenzo Stoakes wrote: [snip] > > In any case I think copying the header to the tools/ directory with this > linux/fcntl.h in some way stubbed out (we could even stub out fcntl.h > there?) is the sensib

Re: [PATCH v3 3/3] selftests: pidfd: add tests for PIDFD_SELF_*

2024-10-17 Thread Lorenzo Stoakes
On Wed, Oct 16, 2024 at 04:38:50PM -0600, Shuah Khan wrote: > On 10/16/24 16:06, Lorenzo Stoakes wrote: > > On Wed, Oct 16, 2024 at 02:00:27PM -0600, Shuah Khan wrote: > > > On 10/16/24 04:20, Lorenzo Stoakes wrote: > > > > Add tests to assert that PIDFD_SELF_* correctly refers to the current > > >

Re: [PATCH v3 3/3] selftests: pidfd: add tests for PIDFD_SELF_*

2024-10-17 Thread Lorenzo Stoakes
On Wed, Oct 16, 2024 at 07:14:34PM -0700, John Hubbard wrote: > On 10/16/24 3:06 PM, Lorenzo Stoakes wrote: > > On Wed, Oct 16, 2024 at 02:00:27PM -0600, Shuah Khan wrote: > > > On 10/16/24 04:20, Lorenzo Stoakes wrote: > ... > > > > diff --git a/tools/testing/selftests/pidfd/pidfd.h > > > > b/too

Re: [PATCH v3 3/3] selftests: pidfd: add tests for PIDFD_SELF_*

2024-10-16 Thread John Hubbard
On 10/16/24 3:06 PM, Lorenzo Stoakes wrote: On Wed, Oct 16, 2024 at 02:00:27PM -0600, 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/

The "make headers" requirement, revisited: [PATCH v3 3/3] selftests: pidfd: add tests for PIDFD_SELF_*

2024-10-16 Thread John Hubbard
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/pidf

Re: [PATCH v3 3/3] selftests: pidfd: add tests for PIDFD_SELF_*

2024-10-16 Thread Shuah Khan
On 10/16/24 16:06, Lorenzo Stoakes wrote: On Wed, Oct 16, 2024 at 02:00:27PM -0600, Shuah Khan wrote: On 10/16/24 04:20, Lorenzo Stoakes wrote: Add tests to assert that PIDFD_SELF_* correctly refers to the current thread and process. This is only practically meaningful to pidfd_send_signal() a

Re: [PATCH v3 3/3] selftests: pidfd: add tests for PIDFD_SELF_*

2024-10-16 Thread Lorenzo Stoakes
On Wed, Oct 16, 2024 at 11:06:34PM +0100, Lorenzo Stoakes wrote: [sniip] > > > > The import will be fine and you can control that with -I flag in > > the makefile. Remove these and try to get including linux/pidfd.h > > working. > > I just tried this and it's not fine :) it immediately broke the bu

Re: [PATCH v3 3/3] selftests: pidfd: add tests for PIDFD_SELF_*

2024-10-16 Thread Lorenzo Stoakes
On Wed, Oct 16, 2024 at 02:00:27PM -0600, Shuah Khan wrote: > On 10/16/24 04:20, Lorenzo Stoakes wrote: > > Add tests to assert that PIDFD_SELF_* correctly refers to the current > > thread and process. > > > > This is only practically meaningful to pidfd_send_signal() and > > pidfd_getfd(), but als

Re: [PATCH v3 3/3] selftests: pidfd: add tests for PIDFD_SELF_*

2024-10-16 Thread Shuah Khan
On 10/16/24 04:20, Lorenzo Stoakes wrote: Add tests to assert that PIDFD_SELF_* correctly refers to the current thread and process. This is only practically meaningful to pidfd_send_signal() and pidfd_getfd(), but also explicitly test that we disallow this feature for setns() where it would make

[PATCH v3 3/3] selftests: pidfd: add tests for PIDFD_SELF_*

2024-10-16 Thread Lorenzo Stoakes
Add tests to assert that PIDFD_SELF_* correctly refers to the current thread and process. This is only practically meaningful to pidfd_send_signal() and pidfd_getfd(), but also explicitly test that we disallow this feature for setns() where it would make no sense. We cannot reasonably wait on our