* [PATCH 0/2] Enable logs for ping test fail
@ 2015-10-22 13:39 mariano.lopez
2015-10-22 13:39 ` [PATCH 1/2] qemurunner: Show the output of runqemu script mariano.lopez
2015-10-22 13:39 ` [PATCH 2/2] runqemu-ifup: Check if the tap interface is set up correctly mariano.lopez
0 siblings, 2 replies; 3+ messages in thread
From: mariano.lopez @ 2015-10-22 13:39 UTC (permalink / raw)
To: openembedded-core
From: Mariano Lopez <mariano.lopez@linux.intel.com>
These two patches add some logging and checking on the interfaces
when qemu is started.
The following changes since commit 8578bc17b54da97d42b257b3c8f398ac52b91a9f:
libc-package: Fix localedef multilib dependency issues (2015-10-20 10:12:01 +0100)
are available in the git repository at:
git://git.yoctoproject.org/poky-contrib mariano/bug8550
http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=mariano/bug8550
Mariano Lopez (2):
qemurunner: Show the output of runqemu script
runqemu-ifup: Check if the tap interface is set up correctly
meta/lib/oeqa/utils/qemurunner.py | 1 +
scripts/runqemu-ifup | 15 +++++++++++++++
2 files changed, 16 insertions(+)
--
1.8.4.5
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 1/2] qemurunner: Show the output of runqemu script
2015-10-22 13:39 [PATCH 0/2] Enable logs for ping test fail mariano.lopez
@ 2015-10-22 13:39 ` mariano.lopez
2015-10-22 13:39 ` [PATCH 2/2] runqemu-ifup: Check if the tap interface is set up correctly mariano.lopez
1 sibling, 0 replies; 3+ messages in thread
From: mariano.lopez @ 2015-10-22 13:39 UTC (permalink / raw)
To: openembedded-core
From: Mariano Lopez <mariano.lopez@linux.intel.com>
This change will show runqemu output in the logs
when running the runtime tests. This is helpful
for debugging testimage errors.
[YOCTO #8550]
Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
---
meta/lib/oeqa/utils/qemurunner.py | 1 +
1 file changed, 1 insertion(+)
diff --git a/meta/lib/oeqa/utils/qemurunner.py b/meta/lib/oeqa/utils/qemurunner.py
index 6fe75b8..bdc6e0a 100644
--- a/meta/lib/oeqa/utils/qemurunner.py
+++ b/meta/lib/oeqa/utils/qemurunner.py
@@ -210,6 +210,7 @@ class QemuRunner:
self.stop_thread()
return False
+ logger.info("Output from runqemu:\n%s", self.getOutput(output))
logger.info("Waiting at most %d seconds for login banner" % self.boottime)
endtime = time.time() + self.boottime
socklist = [self.server_socket]
--
1.8.4.5
^ permalink raw reply related [flat|nested] 3+ messages in thread* [PATCH 2/2] runqemu-ifup: Check if the tap interface is set up correctly
2015-10-22 13:39 [PATCH 0/2] Enable logs for ping test fail mariano.lopez
2015-10-22 13:39 ` [PATCH 1/2] qemurunner: Show the output of runqemu script mariano.lopez
@ 2015-10-22 13:39 ` mariano.lopez
1 sibling, 0 replies; 3+ messages in thread
From: mariano.lopez @ 2015-10-22 13:39 UTC (permalink / raw)
To: openembedded-core
From: Mariano Lopez <mariano.lopez@linux.intel.com>
The process to set up a tap interface is as follows:
- tap interface is created
- An IP address is assigned to the tap interface
- The interface is bring up
- A route is added to the target using the tap
interface
Of all the previous steps, only the first one is
check if it was sucessful. The status of the others
are ignored and all of them are required to have
basic connectivity in the target.
This patch adds the checks for the rest of the stpes
needed to set up the tap interface.
[YOCTO #8550]
Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
---
scripts/runqemu-ifup | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/scripts/runqemu-ifup b/scripts/runqemu-ifup
index b5a3db9..d9bd894 100755
--- a/scripts/runqemu-ifup
+++ b/scripts/runqemu-ifup
@@ -91,10 +91,25 @@ fi
n=$[ (`echo $TAP | sed 's/tap//'` * 2) + 1 ]
$IFCONFIG addr add 192.168.7.$n/32 broadcast 192.168.7.255 dev $TAP
+STATUS=$?
+if [ $STATUS -ne 0 ]; then
+ echo "Failed to set up IP addressing on $TAP"
+ exit 1
+fi
$IFCONFIG link set dev $TAP up
+STATUS=$?
+if [ $STATUS -ne 0 ]; then
+ echo "Failed to bring up $TAP"
+ exit 1
+fi
dest=$[ (`echo $TAP | sed 's/tap//'` * 2) + 2 ]
$IFCONFIG route add to 192.168.7.$dest dev $TAP
+STATUS=$?
+if [ $STATUS -ne 0 ]; then
+ echo "Failed to add route to 192.168.7.$dest using $TAP"
+ exit 1
+fi
# setup NAT for tap0 interface to have internet access in QEMU
$IPTABLES -A POSTROUTING -t nat -j MASQUERADE -s 192.168.7.$n/32
--
1.8.4.5
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-10-22 21:50 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-22 13:39 [PATCH 0/2] Enable logs for ping test fail mariano.lopez
2015-10-22 13:39 ` [PATCH 1/2] qemurunner: Show the output of runqemu script mariano.lopez
2015-10-22 13:39 ` [PATCH 2/2] runqemu-ifup: Check if the tap interface is set up correctly mariano.lopez
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox