Hello chris and other guys,

I got an headache on one question.
When I execute a test case like virsh.version.with_libvirtd_stop, after the
execution, test passed, but at this time , I checked the environment, found
there are still 2 pid running:

[root@localhost virttest]# ps -ef | grep autotest | grep -v grep
root 6668 1 0 14:18 pts/0 00:00:00 /usr/bin/python -u ../../../autotest control --verbose root 6669 1 0 14:18 pts/0 00:00:00 /usr/bin/python -u ../../../autotest control --verbose

I read the code again, at the end of fork_start() in "autotest/client/parallel.py", os._exit(0) will end the test process. And before os._exit(0), process like this:

[root@localhost virttest]# ps -ef | grep autotest | grep -v grep
root 6660 4706 1 14:18 pts/0 00:00:05 /usr/bin/python -u ../../../autotest control --verbose root 6668 6660 0 14:18 pts/0 00:00:00 /usr/bin/python -u ../../../autotest control --verbose root 6669 6660 0 14:18 pts/0 00:00:00 /usr/bin/python -u ../../../autotest control --verbose root 6741 6660 0 14:19 pts/0 00:00:00 /usr/bin/python -u ../../../autotest control --verbose

So seems after os._exit(0), parent pid was exited, child pids still running. But in other test cases, this didn't happen, like
virsh.version.no_option. In this case, after os._exit(0), no child pid left.

[root@localhost virttest]# ps -ef | grep autotest | grep -v grep
[root@localhost virttest]#

I also checked other test cases, seems only virsh.**.with_libvirtd_stop will get this problem.
I didn't find out why this happened, so can you give me some help ?

--
Regards,
--------------------------------------------------
Li Yang
TEL:+86+25-86630566-8529
EMail:[email protected]
--------------------------------------------------




_______________________________________________
Virt-test-devel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/virt-test-devel

Reply via email to