diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-07-10 09:53:39 +0100 |
---|---|---|
committer | Steve Sakoman <steve@sakoman.com> | 2020-07-16 08:25:49 -1000 |
commit | a03c85fe0704a457bd2d92dd58cbbb4d37453f2a (patch) | |
tree | c9de566b9cf4cd70ed9c55cae456304912a3154b /meta/lib | |
parent | 5dd3d61c5c739f31cb87a3c0c924c617b432e8a9 (diff) | |
download | openembedded-core-contrib-a03c85fe0704a457bd2d92dd58cbbb4d37453f2a.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.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 55c186ff410c99570242478b99ac24ebc40aa6bd)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
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))) class QemuRunner: def __init__(self, machine, rootfs, display, tmpdir, deploy_dir_image, logfile, boottime, dump_dir, dump_host_cmds, - use_kvm, logger, use_slirp=False, serial_ports=2, boot_patterns = defaultdict(str), use_ovmf=False): + use_kvm, logger, use_slirp=False, serial_ports=2, boot_patterns = defaultdict(str), use_ovmf=False, workdir=None): # Popen object for runqemu self.runqemu = None @@ -63,7 +63,9 @@ class QemuRunner: self.boot_patterns = boot_patterns self.runqemutime = 120 - self.qemu_pidfile = 'pidfile_'+str(os.getpid()) + if not workdir: + workdir = os.getcwd() + self.qemu_pidfile = workdir + '/pidfile_' + str(os.getpid()) self.host_dumper = HostDumper(dump_host_cmds, dump_dir) self.monitorpipe = None |