mbox series

[v2,0/6] Update clone3 self-tests

Message ID cover.1568138393.git.esyr@redhat.com (mailing list archive)
Headers show
Series Update clone3 self-tests | expand

Message

Eugene Syromiatnikov Sept. 10, 2019, 6:01 p.m. UTC
Hello.

This patch set updates clone3 selftest in several aspects:
 - adding checks for exit_signal invalid values handling;
 - adding clone3 to selftests targets;
 - enabling clone3 tests on all architectures;
 - minor cleanups of the clone3 test.

Applied on top of brauer/linux.git/for-next.

Changes since v1[1]:
 - exit_signal check extended to cover more cases of invalid
   exit_signal value.

[1] https://lkml.org/lkml/2019/9/10/416

Eugene Syromiatnikov (6):
  selftests/clone3: convert test modes into an enum
  selftests/clone3: add a check for invalid exit_signal
  selftests/clone3: use uint64_t for flags parameter
  selftests/clone3: fix up format strings
  selftests/clone3: enable clone3 self-tests on all architectures
  selftests: add clone3 to TARGETS

 tools/testing/selftests/Makefile        |  1 +
 tools/testing/selftests/clone3/Makefile |  4 +--
 tools/testing/selftests/clone3/clone3.c | 64 ++++++++++++++++++++++++++++-----
 3 files changed, 57 insertions(+), 12 deletions(-)

Comments

Christian Brauner Sept. 16, 2019, 7:49 a.m. UTC | #1
On Tue, Sep 10, 2019 at 07:01:30PM +0100, Eugene Syromiatnikov wrote:
> Hello.
> 
> This patch set updates clone3 selftest in several aspects:
>  - adding checks for exit_signal invalid values handling;
>  - adding clone3 to selftests targets;
>  - enabling clone3 tests on all architectures;
>  - minor cleanups of the clone3 test.
> 
> Applied on top of brauer/linux.git/for-next.

So I like this series a lot! Testing is very important.
And thanks for catching the clone3() exit_signal problem. This way we
got to release a non-broken kernel. :)

Some notes: I dropped the set_tid extension from the core process
updates for 5.4 because we ended up in a discussion that made it clear
we potentially need the ability to restore pids in multiple pid
namespaces. This means we need some more discussion and the patchset is
delayed for at least one release.
Unfortunately, this also means the test that you have based yours upon
does not exist anymore. However, the tests should not be blocked on
this. I'd encourage you to talk to Adrian (who is Cced here anyway) and
come up with a clone3() test suite I can merge. You can very likely do a
Co-Developed-by so no-ones work gets dropped. :)

Ideally I'd like to see:
- verifying passing different struct sizes works correctly
- verify that flag combinations work correctly
- verify that struct members have correct values etc. pp.

We definitely want the exit_signal test as a regression test so it
doesn't bite us again!

(Oh, please also add tool/test/selftests/clone3/ to the pidfd/core
 process MAINTAINERS entry.)

Thanks!
Christian
Adrian Reber Sept. 16, 2019, 8:12 a.m. UTC | #2
On Mon, Sep 16, 2019 at 09:49:34AM +0200, Christian Brauner wrote:
> On Tue, Sep 10, 2019 at 07:01:30PM +0100, Eugene Syromiatnikov wrote:
> > Hello.
> > 
> > This patch set updates clone3 selftest in several aspects:
> >  - adding checks for exit_signal invalid values handling;
> >  - adding clone3 to selftests targets;
> >  - enabling clone3 tests on all architectures;
> >  - minor cleanups of the clone3 test.
> > 
> > Applied on top of brauer/linux.git/for-next.
> 
> So I like this series a lot! Testing is very important.
> And thanks for catching the clone3() exit_signal problem. This way we
> got to release a non-broken kernel. :)
> 
> Some notes: I dropped the set_tid extension from the core process
> updates for 5.4 because we ended up in a discussion that made it clear
> we potentially need the ability to restore pids in multiple pid
> namespaces. This means we need some more discussion and the patchset is
> delayed for at least one release.
> Unfortunately, this also means the test that you have based yours upon
> does not exist anymore. However, the tests should not be blocked on
> this. I'd encourage you to talk to Adrian (who is Cced here anyway) and
> come up with a clone3() test suite I can merge. You can very likely do a
> Co-Developed-by so no-ones work gets dropped. :)
> 
> Ideally I'd like to see:
> - verifying passing different struct sizes works correctly
> - verify that flag combinations work correctly
> - verify that struct members have correct values etc. pp.
> 
> We definitely want the exit_signal test as a regression test so it
> doesn't bite us again!
> 
> (Oh, please also add tool/test/selftests/clone3/ to the pidfd/core
>  process MAINTAINERS entry.)

Eugene and I have already discussed this. We will resubmit the clone3()
selftests in the next few days with all our changes combined.

		Adrian
Christian Brauner Sept. 16, 2019, 8:14 a.m. UTC | #3
On Mon, Sep 16, 2019 at 10:12:47AM +0200, Adrian Reber wrote:
> On Mon, Sep 16, 2019 at 09:49:34AM +0200, Christian Brauner wrote:
> > On Tue, Sep 10, 2019 at 07:01:30PM +0100, Eugene Syromiatnikov wrote:
> > > Hello.
> > > 
> > > This patch set updates clone3 selftest in several aspects:
> > >  - adding checks for exit_signal invalid values handling;
> > >  - adding clone3 to selftests targets;
> > >  - enabling clone3 tests on all architectures;
> > >  - minor cleanups of the clone3 test.
> > > 
> > > Applied on top of brauer/linux.git/for-next.
> > 
> > So I like this series a lot! Testing is very important.
> > And thanks for catching the clone3() exit_signal problem. This way we
> > got to release a non-broken kernel. :)
> > 
> > Some notes: I dropped the set_tid extension from the core process
> > updates for 5.4 because we ended up in a discussion that made it clear
> > we potentially need the ability to restore pids in multiple pid
> > namespaces. This means we need some more discussion and the patchset is
> > delayed for at least one release.
> > Unfortunately, this also means the test that you have based yours upon
> > does not exist anymore. However, the tests should not be blocked on
> > this. I'd encourage you to talk to Adrian (who is Cced here anyway) and
> > come up with a clone3() test suite I can merge. You can very likely do a
> > Co-Developed-by so no-ones work gets dropped. :)
> > 
> > Ideally I'd like to see:
> > - verifying passing different struct sizes works correctly
> > - verify that flag combinations work correctly
> > - verify that struct members have correct values etc. pp.
> > 
> > We definitely want the exit_signal test as a regression test so it
> > doesn't bite us again!
> > 
> > (Oh, please also add tool/test/selftests/clone3/ to the pidfd/core
> >  process MAINTAINERS entry.)
> 
> Eugene and I have already discussed this. We will resubmit the clone3()
> selftests in the next few days with all our changes combined.

Excellent! Very happy to hear this! :)
Christian