diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-07-10 09:53:39 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-07-22 22:46:37 +0100 |
commit | 676d10c470b57fbace9018ed10d7c9e0011d961c (patch) | |
tree | 6f7fdb8774314a910f9191920c294aa066bedcec /meta/lib | |
parent | acdccda9efaee11de18d38cc847f2b8101ac30c6 (diff) | |
download | poky-676d10c470b57fbace9018ed10d7c9e0011d961c.tar.gz |
qemurunner: Ensure pid location is deterministic
The pid location could vary due to changes in cwd as only a filename
is specified, not a full path. This in theory could be resulting in
some of our autobuilder failures. Whilst its difficult to know if this
is causing a problem, Using a full path removes any question of such an
issue.
(From OE-Core rev: a03c85fe0704a457bd2d92dd58cbbb4d37453f2a)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 55c186ff410c99570242478b99ac24ebc40aa6bd)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib')
-rw-r--r-- | meta/lib/oeqa/utils/qemurunner.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/meta/lib/oeqa/utils/qemurunner.py b/meta/lib/oeqa/utils/qemurunner.py index 992fff9370..486d2bb893 100644 --- a/meta/lib/oeqa/utils/qemurunner.py +++ b/meta/lib/oeqa/utils/qemurunner.py | |||
@@ -32,7 +32,7 @@ re_control_char = re.compile('[%s]' % re.escape("".join(control_chars))) | |||
32 | class QemuRunner: | 32 | class QemuRunner: |
33 | 33 | ||
34 | def __init__(self, machine, rootfs, display, tmpdir, deploy_dir_image, logfile, boottime, dump_dir, dump_host_cmds, | 34 | def __init__(self, machine, rootfs, display, tmpdir, deploy_dir_image, logfile, boottime, dump_dir, dump_host_cmds, |
35 | use_kvm, logger, use_slirp=False, serial_ports=2, boot_patterns = defaultdict(str), use_ovmf=False): | 35 | use_kvm, logger, use_slirp=False, serial_ports=2, boot_patterns = defaultdict(str), use_ovmf=False, workdir=None): |
36 | 36 | ||
37 | # Popen object for runqemu | 37 | # Popen object for runqemu |
38 | self.runqemu = None | 38 | self.runqemu = None |
@@ -63,7 +63,9 @@ class QemuRunner: | |||
63 | self.boot_patterns = boot_patterns | 63 | self.boot_patterns = boot_patterns |
64 | 64 | ||
65 | self.runqemutime = 120 | 65 | self.runqemutime = 120 |
66 | self.qemu_pidfile = 'pidfile_'+str(os.getpid()) | 66 | if not workdir: |
67 | workdir = os.getcwd() | ||
68 | self.qemu_pidfile = workdir + '/pidfile_' + str(os.getpid()) | ||
67 | self.host_dumper = HostDumper(dump_host_cmds, dump_dir) | 69 | self.host_dumper = HostDumper(dump_host_cmds, dump_dir) |
68 | self.monitorpipe = None | 70 | self.monitorpipe = None |
69 | 71 | ||