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-13 12:53:08 +0100 |
commit | 0c1c6c971de40ec3c9094a3963e5b6cc063b0e64 (patch) | |
tree | 57d56f90d6de13cafaea2b4f12f45a3441ee75b5 /meta/lib/oeqa/utils/qemurunner.py | |
parent | 8ea47abf69db6b0321415d4d04edc10d67a55acd (diff) | |
download | poky-0c1c6c971de40ec3c9094a3963e5b6cc063b0e64.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: 55c186ff410c99570242478b99ac24ebc40aa6bd)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa/utils/qemurunner.py')
-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 | ||