public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Cyril Hrubis <chrubis@suse.cz>
To: Andrea Cervesato <andrea.cervesato@suse.com>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH v4] Refactor pidns30 test using new LTP API
Date: Tue, 14 Feb 2023 13:07:10 +0100	[thread overview]
Message-ID: <Y+t5bm5dn/BzKnYj@yuki> (raw)
In-Reply-To: <5be1311a-6057-5362-93f6-ee623279e79e@suse.com>

Hi!
> >> +static void run(void)
> >>   {
> >> -	int status;
> >> -	char buf[5];
> >> -	pid_t cpid;
> >> +	const struct tst_clone_args args = { CLONE_NEWPID, SIGCHLD };
> >>   
> >> -	setup();
> >> +	remove_mqueue(mqd);
> >> +	received = 0;
> > I wonder if we really need to clear the flag here, as far as I can see
> > we only modify that variable in the child process and that shouldn't
> > propagate to parent, unless we pass CLONE_VM of course.
> Flag reset has been added to be 100% sure we are receiving the signal on 
> -i > 1.

My point was that the variable is only changed in the child process,
that means that this change will never make it back to the parent since
the whole VM is copy-on-write...

-- 
Cyril Hrubis
chrubis@suse.cz

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

  parent reply	other threads:[~2023-02-14 12:06 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-08  9:11 [LTP] [PATCH v4] Refactor pidns30 test using new LTP API Andrea Cervesato via ltp
2023-02-10 13:16 ` Cyril Hrubis
2023-02-10 14:18   ` Andrea Cervesato via ltp
2023-02-14  9:47     ` Richard Palethorpe
2023-02-14 12:17       ` Andrea Cervesato via ltp
2023-02-14 12:07     ` Cyril Hrubis [this message]
2023-02-14 12:27       ` Richard Palethorpe

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=Y+t5bm5dn/BzKnYj@yuki \
    --to=chrubis@suse.cz \
    --cc=andrea.cervesato@suse.com \
    --cc=ltp@lists.linux.it \
    /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