]> code.ossystems Code Review - openembedded-core.git/commitdiff
scripts/runqemu: provide better error message on runqemu ifup fail
authorStephano Cetola <stephano.cetola@linux.intel.com>
Fri, 23 Sep 2016 01:25:08 +0000 (18:25 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 23 Sep 2016 17:06:10 +0000 (18:06 +0100)
If runqemu-ifup fails hen running testimage, a rather cryptic error
regarding "no tty present" is displayed. If this step fails, we
should at least point the user at runqemu-gen-tapdevs. A quick search
of this term in the manual will lead them to "Enabling Runtime Tests
on QEMU" which should give them all the info they need.

Signed-off-by: Stephano Cetola <stephano.cetola@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
scripts/runqemu

index 5095e67817b7b76f26be235fbbfb2af557c01466..45bcad7a8061c30ea8f781489401da376b7c8848 100755 (executable)
@@ -786,6 +786,9 @@ class BaseConfig(object):
             self.cleantap = True
             logger.info('Created tap: %s' % tap)
 
+        if not tap:
+            logger.error("Failed to setup tap device. Run runqemu-gen-tapdevs to manually create.")
+            return 1
         self.tap = tap
         n0 = tap[3:]
         n1 = int(n0) * 2 + 1