Hide Forgot
Description of problem: It would be fine, if beakerlib provides some function to kill all child processes. Remembering all PIDs and then killing them is not very elegant. Even pkill utility is not very good solution, sometimes it may be a bit drastic. Version-Release number of selected component (if applicable): How reproducible: Steps to Reproduce: 1. 2. 3. Actual results: Expected results: Additional info:
I used to do something like this using pgrep -P and recursive go through the tree of children and then sending signal to all the processes. This might be an option. I do not know it if is sufficiently powerful, though. Anyway it is questionable if such function should be in core beakerlib. Now wait for other maintainers to express themselves.
is this aimed at preventing the task from getting stuck at the very end and then getting killed by watchdog? If yes then ack+
I am not sure how running processes left on the machine would cause watchdog come to play. Anyway I can imagine I would like to kill everything I executed on background but I never touched that as I kill exactly what I have executed using library(distribution/Cleanup). Can you provide us with some real/life examples?
I was looking into some issue with python test. Test was passing on clean machine but failing if you run it for second, third... time. That was nice use-case for test-inspector, but TI only detected few created/changed files that didn't cause this behavior (backuping them and restoring in cleanup phase didn'ŧ solve this problem). Problem was in running processes (openssl running in background), that TI cannot catch. jprokes helped me find out what caused this problem in 1MT, because it was passing there after using retest option, but failing after repeated manual runs (1MT probably reset ssh session if you do retest by 1MT option). Problem was solved by using "pkill openssl" in cleanup phase, but pkill should be sometimes a little bit drastic, because it is killing all processes with matched name ... so something like "kill all my child" feature would help to solve this issue in more elegantly way. http://pkgs.devel.redhat.com/cgit/tests/python/diff/Regression/bz1219108-python-backport-PEP-476-with-global-toggle-to/runtest.sh?id=ee0a7de55d08949f201fc05600f4d7f865b12136