aboutsummaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/utils/qemutinyrunner.py
diff options
context:
space:
mode:
authorPatrick Ohly <patrick.ohly@intel.com>2017-03-27 15:03:22 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-03-28 08:41:08 +0100
commit44fe106baf5fd5aebe26c5f28004e2b18d839b7c (patch)
tree76539b40285550eec86b20b1d0502a93f0fd0a65 /meta/lib/oeqa/utils/qemutinyrunner.py
parentbedcdc4cf921b70a8cfb16c6684668d0ac9e1942 (diff)
downloadopenembedded-core-contrib-44fe106baf5fd5aebe26c5f28004e2b18d839b7c.tar.gz
oeqa: tolerate interrupted select() while waiting for qemu
Sometimes, the OEQA utility code aborts with: ... File ".../meta/lib/oeqa/utils/qemurunner.py", line 131, in start return self.launch(launch_cmd, qemuparams=qemuparams, get_ip=get_ip, extra_bootparams=extra_bootparams) File ".../meta/lib/oeqa/utils/qemurunner.py", line 259, in launch sread, swrite, serror = select.select(socklist, [], [], 5) InterruptedError: [Errno 4] Interrupted system call strace shows that this is because of a SIGWINCH: Connection from 127.0.0.1:52668 select(21, [20], [], [], {5, 0}) = ? ERESTARTNOHAND (To be restarted if no handler) --- SIGWINCH {si_signo=SIGWINCH, si_code=SI_KERNEL} --- This is related to some special conditions: * whether qemu opens a graphical console window (enabled in Poky by default) * where that window gets opened * whether the window manager changes the size of the shell window (mine is a tiling window manager and reorders and resizes windows automatically) Ignoring the interrupted system calls avoids the problem. Code elsewhere (for example, run() in ssh.py) already does the same thing. Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa/utils/qemutinyrunner.py')
-rw-r--r--meta/lib/oeqa/utils/qemutinyrunner.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/meta/lib/oeqa/utils/qemutinyrunner.py b/meta/lib/oeqa/utils/qemutinyrunner.py
index b1009a0a37..df5f9ddb82 100644
--- a/meta/lib/oeqa/utils/qemutinyrunner.py
+++ b/meta/lib/oeqa/utils/qemutinyrunner.py
@@ -114,7 +114,10 @@ class QemuTinyRunner(QemuRunner):
stopread = False
endtime = time.time()+timeout
while time.time()<endtime and not stopread:
- sread, _, _ = select.select([self.server_socket],[],[],1)
+ try:
+ sread, _, _ = select.select([self.server_socket],[],[],1)
+ except InterruptedError:
+ continue
for sock in sread:
answer = sock.recv(1024)
if answer: