[oe-commits] [openembedded-core] 03/08: oeqa: qemu: ensure that host dump commands can be run properly

git at git.openembedded.org git at git.openembedded.org
Mon Dec 9 12:07:36 UTC 2019


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch master-next
in repository openembedded-core.

commit 7fc0b835da7389e45dcfdf3f40266d503d4d5bfa
Author: Paul Eggleton <paul.eggleton at linux.intel.com>
AuthorDate: Mon Dec 9 23:59:05 2019 +1300

    oeqa: qemu: ensure that host dump commands can be run properly
    
    If runqemu fails, there is some logic to run a set of commands to dump
    various bits of information that might help debug the issue
    (particularly in a busy situation such as on the autobuilder). However,
    when we try to run these we are inside the normal build environment
    which restricts commands to be run on the host to those specified in
    HOSTTOOLS. Since this isn't a place where host contamination is going to
    be a problem, override PATH to a reasonable default so that we run the
    actual host tools directly to avoid the issue. (Logically we would want
    to use the original PATH value here, but it is not easily accessible.)
    
    Signed-off-by: Paul Eggleton <paul.eggleton at linux.intel.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 meta/lib/oeqa/utils/dump.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/meta/lib/oeqa/utils/dump.py b/meta/lib/oeqa/utils/dump.py
index d34e05e..6594e28 100644
--- a/meta/lib/oeqa/utils/dump.py
+++ b/meta/lib/oeqa/utils/dump.py
@@ -71,8 +71,10 @@ class HostDumper(BaseDumper):
     def dump_host(self, dump_dir=""):
         if dump_dir:
             self.dump_dir = dump_dir
+        env = os.environ.copy()
+        env['PATH'] = '/usr/sbin:/sbin:/usr/bin:/bin'
         for cmd in self.cmds:
-            result = runCmd(cmd, ignore_status=True)
+            result = runCmd(cmd, ignore_status=True, env=env)
             self._write_dump(cmd.split()[0], result.output)
 
 class TargetDumper(BaseDumper):

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list