Skip to contentSkip to conversation

scripts/runqemu: provide better error message on runqemu ifup fail

PATCH New Stephano Cetola 1 participant 1 message Sep 23, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 scripts/runqemu: provide better error message on runqemu ifup fail

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.

---
 scripts/runqemu | 3 +++
 1 file changed, 3 insertions(+)
scripts/runqemu +3 -0
index 658f7c8..06bd5f3 100755
@@ -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
Signature · 1 line
2.9.3