[LTP] Test library API changes
Cyril Hrubis
chrubis@suse.cz
Tue Mar 15 10:22:26 CET 2016
Hi!
> That it will only cause signal to be delivered to that thread,
> but handler will still kill entire process.
Ah, right. I tend to forget that part.
> We could use different signal and define a signal handler,
> that would just loop, but that still doesn't guarantee
> when pending signal is delivered. Also threads could mask
> the signal.
We can call a pause() in a loop from the signal handler and check that
the thread is sleeping in the kernel from the main thread. But this is
getting too complicated.
> Then I was thinking about blocking threads using affinity,
> but if test changed priority we could lock ourselves out.
>
> We do say in style guide, that cleanup can be called at any
> time. Should we leave it up to test author? We had the same
> problem with oldlib, right?
Yes, and technically we have the same problem with the forked processes
as well. When the main process calls tst_brk() the child processes may
still be running. But killing/waiting children in tst_brk() could be
done quite easily.
--
Cyril Hrubis
chrubis@suse.cz
More information about the ltp
mailing list