linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christian Brauner <christian.brauner@ubuntu.com>
To: Andrei Vagin <avagin@gmail.com>
Cc: Adrian Reber <areber@redhat.com>,
	Eric Biederman <ebiederm@xmission.com>,
	Pavel Emelyanov <ovzxemul@gmail.com>,
	Jann Horn <jannh@google.com>, Oleg Nesterov <oleg@redhat.com>,
	Dmitry Safonov <0x7f454c46@gmail.com>,
	Rasmus Villemoes <linux@rasmusvillemoes.dk>,
	linux-kernel@vger.kernel.org, Mike Rapoport <rppt@linux.ibm.com>,
	Radostin Stoyanov <rstoyanov1@gmail.com>
Subject: Re: [PATCH v11 2/2] selftests: add tests for clone3() with *set_tid
Date: Fri, 15 Nov 2019 23:53:44 +0100	[thread overview]
Message-ID: <20191115225343.v6x6vltvxgv54ewl@wittgenstein> (raw)
In-Reply-To: <20191115222018.GB353836@gmail.com>

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

  reply	other threads:[~2019-11-15 22:53 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-15 12:36 [PATCH v11 1/2] fork: extend clone3() to support setting a PID Adrian Reber
2019-11-15 12:36 ` [PATCH v11 2/2] selftests: add tests for clone3() with *set_tid Adrian Reber
2019-11-15 22:20   ` Andrei Vagin
2019-11-15 22:53     ` Christian Brauner [this message]
2019-11-18  1:46   ` Andrei Vagin
2019-11-18  7:42     ` Christian Brauner
2019-11-15 16:33 ` [PATCH v11 1/2] fork: extend clone3() to support setting a PID Oleg Nesterov
2019-11-15 16:54 ` Dmitry Safonov
2019-11-15 17:02   ` Dmitry Safonov
2019-11-15 22:51   ` Christian Brauner
2019-11-15 21:54 ` Andrei Vagin

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=20191115225343.v6x6vltvxgv54ewl@wittgenstein \
    --to=christian.brauner@ubuntu.com \
    --cc=0x7f454c46@gmail.com \
    --cc=areber@redhat.com \
    --cc=avagin@gmail.com \
    --cc=ebiederm@xmission.com \
    --cc=jannh@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@rasmusvillemoes.dk \
    --cc=oleg@redhat.com \
    --cc=ovzxemul@gmail.com \
    --cc=rppt@linux.ibm.com \
    --cc=rstoyanov1@gmail.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).