lkml.org 
[lkml]   [2019]   [Nov]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v11 2/2] selftests: add tests for clone3() with *set_tid
On Fri, Nov 15, 2019 at 02:20:18PM -0800, Andrei Vagin wrote:
> On Fri, Nov 15, 2019 at 01:36:21PM +0100, Adrian Reber wrote:
> > This tests clone3() with *set_tid to see if all desired PIDs are working
> > as expected. The tests are trying multiple invalid input parameters as
> > well as creating processes while specifying a certain PID in multiple
> > PID namespaces at the same time.
> >
> > Additionally this moves common clone3() test code into clone3_selftests.h.
> >
> > Signed-off-by: Adrian Reber <areber@redhat.com>
> > ---
> > v9:
> > - applied all changes from Christian's review (except using the
> > NSpid: parsing code from selftests/pidfd/pidfd_fdinfo_test.c)
> >
> > v10:
> > - added even more '\n' and include file fixes (Christian)
> >
> > v11:
> > - added more return code checking at multiple places (Andrei)
> > - also add set_tid/set_tid_size to internal struct (Andrei)
>
> I think we can add a test case to trigger the issue what I found in the
> previous version of the kernel patch. You can find my version of this
> test case in the attached patch.
>
> nit: we need to flush stdout and stderr buffers before calling the raw
> clone3 syscall and _exit(). Otherwise, some log messages can be lost and
> some of them can be printed twice.
>
> To trigger this issue, you can run the test and redirect its output to
> file or pipe:
>
> $ ./clone3_set_tid | cat
>
> I have attached the patch to address both these problems. It is a draft
> version and may require some work.
>
> Adrian and Christian, it is up to you to decide whether we want to
> update the current patch or to fix this on top by a separate patch.

If you give me a proper commit with a commit message I'll put it on top
as another patch. :)

Christian

\
 
 \ /
  Last update: 2019-11-15 23:54    [W:0.076 / U:0.492 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site