Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH] qemuimage-testlib-pythonhelper: Make the process detection more strict
@ 2013-04-25 10:15 Richard Purdie
  0 siblings, 0 replies; only message in thread
From: Richard Purdie @ 2013-04-25 10:15 UTC (permalink / raw)
  To: openembedded-core

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>
---
diff --git a/scripts/qemuimage-testlib-pythonhelper b/scripts/qemuimage-testlib-pythonhelper
index 4e6432b..6435dd8 100755
--- a/scripts/qemuimage-testlib-pythonhelper
+++ b/scripts/qemuimage-testlib-pythonhelper
@@ -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)





^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2013-04-25 10:33 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-25 10:15 [PATCH] qemuimage-testlib-pythonhelper: Make the process detection more strict Richard Purdie

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox