[LTP] [PATCH] syscalls/inotify: New test for IN_DELETE regression

Petr Vorel pvorel@suse.cz
Mon Feb 7 22:18:25 CET 2022


Hi Cyril,

> 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.

Yes, it'd be probably more readable if the code was in after opened = 1.
But I'm sorry I already merged the original version.

Kind regards,
Petr


More information about the ltp mailing list