[LTP] [PATCH 1/2 v2] tst_test: Fail the test subprocess cannot be killed
Cyril Hrubis
chrubis@suse.cz
Thu Jun 28 12:23:27 CEST 2018
Hi!
> > I'm a little worried about here, image that, if a process_A(test_pid)
> > exist to make function kill(-test_pid, 0) return 0 at first time, then
> > we go into this while loop, but during the sleeping time process_A
> > exit and system reuse the test_pid to another process_B, we will still
> > keep looping and very probably make mistake to report TFAIL(with stack
> > of process_B dump to ltp user in PATCH 2/2).
>
> Maybe we could verify the content of '/proc/test_pid/cmdline' in this loop
> to make sure test_pid is still using by the process we wanted?
That unfortunatelly does not work, half of the /proc/$pid/* files block
on reading when this happens as there is a deadlock in the kernel and
the processes that try to read these files end up deadlocked too.
--
Cyril Hrubis
chrubis@suse.cz
More information about the ltp
mailing list