]> code.ossystems Code Review - openembedded-core.git/commitdiff
oeqa: Test failure/cleanup improvements
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 4 Sep 2015 15:59:38 +0000 (16:59 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 12 Sep 2015 21:47:08 +0000 (22:47 +0100)
Currently, if qemu segfaults, the tests merrily continue trying to execute
which takes time for them to timeout and is a bit silly. Worse, no logs about
the segfault are shown to the user, its silent!

This patch tries to unravel the tangled web of issues and ensures that we:

* install a SIGCHLD handler which tells the user qemu exited
* check if qemu is running, if it isn't fail the test outright
* don't leave processes behind in sshcontrol which would hold
  bitbake.lock and block shutdown

(From OE-Core rev: 77e9363feba53b72429154be5713c46b007ae0a4)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/lib/oeqa/utils/qemurunner.py

index 78acb41276e1c0f95510127dac4a9144eca1fa41..d32c9db46d1be3c0a6f52ad1af18584548085eaa 100644 (file)
@@ -280,6 +280,7 @@ class QemuRunner:
             self.server_socket = None
         self.qemupid = None
         self.ip = None
+        signal.signal(signal.SIGCHLD, self.origchldhandler)
 
     def stop_thread(self):
         if self.thread and self.thread.is_alive():