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

Cyril Hrubis chrubis@suse.cz
Mon Feb 7 15:46:51 CET 2022


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


More information about the ltp mailing list