[LTP] [PATCH v2 2/2] shell: Prevent orphan timeout sleep processes

Li Wang liwang@redhat.com
Fri May 7 16:31:56 CEST 2021


> > ================
> > (This below is not related to your patches)
>
> > But there is another issue I found that the timeout03 can NOT
> > be killed after timed out in calling cleanup(), the reason is
> > tst_brk stop the _tst_kill_test running in the background so that
> > it does not output as what we expected:
> Good catch, I'll try to have a look as well.

The simplest way I can think of is to let _tst_kill_test ignores
the TERM and INT signals. If you agree to this, we can fix it in
a separate patch:).

--- a/testcases/lib/tst_test.sh
+++ b/testcases/lib/tst_test.sh
@@ -439,6 +439,8 @@ _tst_kill_test()
 {
        local i=10

+       trap " " TERM INT
+
        tst_res TBROK "Test timeouted, sending SIGINT! If you are
running on slow machine, try exporting LTP_TIMEOUT_MUL > 1"
        kill -INT -$pid
        tst_sleep 100ms


-- 
Regards,
Li Wang



More information about the ltp mailing list