public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Cyril Hrubis <chrubis@suse.cz>
To: Petr Vorel <pvorel@suse.cz>
Cc: Ivan Delalande <colona@arista.com>, Jan Kara <jack@suse.cz>,
	ltp@lists.linux.it
Subject: Re: [LTP] [PATCH] syscalls/inotify: New test for IN_DELETE regression
Date: Mon, 7 Feb 2022 15:46:51 +0100	[thread overview]
Message-ID: <YgEw2/ev3gQ05B2Q@yuki> (raw)
In-Reply-To: <YgDsIaf5z2rg5tCH@pevik>

Hi!
> > +	/* Kill the child creating / deleting files and wait for it */
> > +	SAFE_KILL(pid, SIGKILL);
> > +	pid = 0;
> > +	SAFE_WAIT(NULL);
> Interesting. I didn't figure out why kill and wait cannot be done just in
> cleanup.

I guess that we want to stop the child in the case that we happened to
open the deleted file and did abort the testing.

Technically we send a signal to a zombie process in the case that the
bug was not reproduced (as the child exits the verify_inotify() with
return it will just do exit(0) once it reaches test library code). But
that should be harmless.

On the other hand I guess that it may make the code a bit more readable
if we moved the SAFE_KILL() just after opened = 1 in the inner loop.

-- 
Cyril Hrubis
chrubis@suse.cz

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

  parent reply	other threads:[~2022-02-07 14:44 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-03  6:12 [LTP] [PATCH] syscalls/inotify: New test for IN_DELETE regression Amir Goldstein
2022-02-03  7:59 ` Petr Vorel
2022-02-07  9:53 ` Petr Vorel
2022-02-07 13:25   ` Amir Goldstein
2022-02-07 13:35     ` Petr Vorel
2022-02-07 14:46   ` Cyril Hrubis [this message]
2022-02-07 21:18     ` Petr Vorel

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=YgEw2/ev3gQ05B2Q@yuki \
    --to=chrubis@suse.cz \
    --cc=colona@arista.com \
    --cc=jack@suse.cz \
    --cc=ltp@lists.linux.it \
    --cc=pvorel@suse.cz \
    /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