]> code.ossystems Code Review - openembedded-core.git/commitdiff
qemurunner: Tweak qemu pid starting timeout code
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 29 Aug 2017 15:51:27 +0000 (16:51 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 3 Mar 2018 08:32:12 +0000 (08:32 +0000)
We're seeing timeouts in the autobuilder testing code. Increase these
timeouts to 120, print the length of time we're having to wait, change
the error messages to really be errors and don't print empty logs, its
not helpful, print a message about the empty log instead.

(From OE-Core rev: b87a33d9c86cc1d2ea196259020e1d3dc712ccef)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
meta/lib/oeqa/utils/qemurunner.py

index ba44b96f532353dc67261bfdfca2e49b21ac9925..1b8cbce4772f8ad78cb49e76f0d1e7ddf07a1a81 100644 (file)
@@ -55,7 +55,7 @@ class QemuRunner:
         self.thread = None
         self.use_kvm = use_kvm
 
-        self.runqemutime = 60
+        self.runqemutime = 120
         self.host_dumper = HostDumper(dump_host_cmds, dump_dir)
 
     def create_socket(self):
@@ -203,7 +203,7 @@ class QemuRunner:
         out = self.getOutput(output)
         netconf = False # network configuration is not required by default
         if self.is_alive():
-            logger.info("qemu started - qemu procces pid is %s" % self.qemupid)
+            logger.info("qemu started in %s seconds - qemu procces pid is %s" % (time.time() - (endtime - self.runqemutime), self.qemupid))
             if get_ip:
                 cmdline = ''
                 with open('/proc/%s/cmdline' % self.qemupid) as p:
@@ -316,10 +316,14 @@ class QemuRunner:
                 logger.info("Serial console failed while trying to login")
 
         else:
-            logger.info("Qemu pid didn't appeared in %s seconds" % self.runqemutime)
+            logger.error("Qemu pid didn't appear in %s seconds" % self.runqemutime)
             self._dump_host()
             self.stop()
-            logger.info("Output from runqemu:\n%s" % self.getOutput(output))
+            op = self.getOutput(output)
+            if op:
+                logger.error("Output from runqemu:\n%s" % op)
+            else:
+                logger.error("No output from runqemu.\n")
             return False
 
         return self.is_alive()