]> code.ossystems Code Review - openembedded-core.git/commitdiff
qemuimage-testlib-pythonhelper: Make the process detection more strict
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 25 Apr 2013 10:15:26 +0000 (11:15 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 29 Apr 2013 13:43:50 +0000 (14:43 +0100)
Old versions of ldd (2.11) as run on some of the autobuilders end up running
commands like "LD_xxxx qemu-system-xxx" which this process detection code
would pick up and result in the wrong PID for qemu.

This changes the code to check for "192.168" in the command so we know
we're getting the correct one. This is less than ideal however we're
running out of options and resolves false negatives we see on the
autobuilder.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
scripts/qemuimage-testlib-pythonhelper

index 4e6432b0fecd6acd51686f061ad81080cb277b48..6435dd8f1856b405b13ac7b500c8673d7ad13f64 100755 (executable)
@@ -54,9 +54,10 @@ if options.findqemu:
     #print "Children matching %s:" % str(parents)
     for p in parents:
         # Need to be careful here since runqemu-internal runs "ldd qemu-system-xxxx"
+        # Also, old versions of ldd (2.11) run "LD_XXXX qemu-system-xxxx"
         basecmd = commands[p].split()[0]
         basecmd = os.path.basename(basecmd)
-        if "qemu-system" in basecmd:
+        if "qemu-system" in basecmd and "192.168" in commands[p]:
             print p
             sys.exit(0)
     sys.exit(1)