[LTP] [PATCH] Terminate leftover subprocesses when main test process crashes
Martin Doucha
mdoucha@suse.cz
Fri Feb 11 12:35:12 CET 2022
On 11. 02. 22 12:01, Li Wang wrote:
> I give 5 seconds sleep before sending SIGKILL in lib-process
> and modified the test_children_cleanup.c to print ppid each 1sec
> to verify this:
>
> # ./test_children_cleanup
> tst_test.c:1452: TINFO: Timeout per run is 0h 00m 10s
> test_children_cleanup.c:20: TINFO: Main process 173236 starting
> test_children_cleanup.c:39: TINFO: Forked child 173238
> test_children_cleanup.c:33: TINFO: ppid is 173236
> test_children_cleanup.c:33: TINFO: ppid is 1
> test_children_cleanup.c:33: TINFO: ppid is 1
> test_children_cleanup.c:33: TINFO: ppid is 1
> test_children_cleanup.c:33: TINFO: ppid is 1
> tst_test.c:1502: TINFO: If you are running on slow machine, try
> exporting LTP_TIMEOUT_MUL > 1
> tst_test.c:1504: TBROK: Test killed! (timeout?)
>
> Summary:
> passed 0
> failed 0
> broken 1
> skipped 0
> warnings 0
> =======
Hmm, that's weird, when I tried that approach yesterday, it kept leaving
the child behind. Now it seems to be working. I guess I messed up
somehow and the test program didn't get relinked against new libltp.a...
OK, sending v2 soon since I also need to fix a bug in the libtest shell
script.
--
Martin Doucha mdoucha@suse.cz
QA Engineer for Software Maintenance
SUSE LINUX, s.r.o.
CORSO IIa
Krizikova 148/34
186 00 Prague 8
Czech Republic
More information about the ltp
mailing list