summaryrefslogtreecommitdiffstats
path: root/meta/lib
diff options
context:
space:
mode:
authorTrevor Gamblin <trevor.gamblin@windriver.com>2020-02-07 08:46:52 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-02-08 13:20:02 +0000
commit9afefb02b0f46e54fd102383e8cd344dc54d2771 (patch)
tree1334df98ed49b6a5ca4c5081d7e6af9c55e4dce9 /meta/lib
parent504b206e377b7e34ad5703079cd047bd2df96895 (diff)
downloadpoky-9afefb02b0f46e54fd102383e8cd344dc54d2771.tar.gz
qemurunner.py: add try/except for pid handling race
In some instances, attempts to remove the qemu pidfile within the stop() method fail despite the os.path.exists() call immediately before implying that the file is present. Add a try/except block to log a warning if this occurs, rather than failing outright, since the process simply appears to be exiting at an inconvenient time. [YOCTO #13675] (From OE-Core rev: eadb899e23b18eb9eaff145c3bf5b20fb417c3e8) Signed-off-by: Trevor Gamblin <trevor.gamblin@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib')
-rw-r--r--meta/lib/oeqa/utils/qemurunner.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/meta/lib/oeqa/utils/qemurunner.py b/meta/lib/oeqa/utils/qemurunner.py
index 2cada35d48..4704422211 100644
--- a/meta/lib/oeqa/utils/qemurunner.py
+++ b/meta/lib/oeqa/utils/qemurunner.py
@@ -406,7 +406,10 @@ class QemuRunner:
406 self.qemupid = None 406 self.qemupid = None
407 self.ip = None 407 self.ip = None
408 if os.path.exists(self.qemu_pidfile): 408 if os.path.exists(self.qemu_pidfile):
409 os.remove(self.qemu_pidfile) 409 try:
410 os.remove(self.qemu_pidfile)
411 except FileNotFoundError as e:
412 self.logger.warning('qemu pidfile is no longer present')
410 if self.monitorpipe: 413 if self.monitorpipe:
411 self.monitorpipe.close() 414 self.monitorpipe.close()
412 415