* [PATCH v2 0/4] Small tweaks for testimage
@ 2013-07-30 9:28 Stefan Stanacar
2013-07-30 9:28 ` [PATCH v2 1/4] oeqa/utils/sshcontrol: increase and log timeout in output Stefan Stanacar
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: Stefan Stanacar @ 2013-07-30 9:28 UTC (permalink / raw)
To: openembedded-core
Changed in v2:
- 4/4 had an extra change that wasn't meant to be.
The following changes since commit bd1c441a210cae03fb6006c996227211cc29056b:
bitbake: bitbake: runqueue: add warning if invalidating invalid task (2013-07-29 15:25:09 +0100)
are available in the git repository at:
git://git.yoctoproject.org/poky-contrib stefans/testimage-fix1
for you to fetch changes up to 42a3f746ec638bfb4802ccc4c10f0cbd09de958e:
oeqa/runtime/xorg: use the right ps command for xorg test (2013-07-30 11:59:30 +0300)
----------------------------------------------------------------
Stefan Stanacar (4):
oeqa/utils/sshcontrol: increase and log timeout in output
oeqa/utils/qemurunner: add comment and header
oeqa/utils/qemurunner: tweak console bootparam and ip command
oeqa/runtime/xorg: use the right ps command for xorg test
meta/lib/oeqa/runtime/xorg.py | 4 ++--
meta/lib/oeqa/utils/qemurunner.py | 11 +++++++++--
meta/lib/oeqa/utils/sshcontrol.py | 10 ++++++----
3 files changed, 17 insertions(+), 8 deletions(-)
Stefan Stanacar (4):
oeqa/utils/sshcontrol: increase and log timeout in output
oeqa/utils/qemurunner: add comment and header
oeqa/utils/qemurunner: tweak console bootparam and ip command
oeqa/runtime/xorg: use the right ps command for xorg test
meta/lib/oeqa/runtime/xorg.py | 4 ++--
meta/lib/oeqa/utils/qemurunner.py | 11 +++++++++--
meta/lib/oeqa/utils/sshcontrol.py | 10 ++++++----
3 files changed, 17 insertions(+), 8 deletions(-)
--
1.8.3.1
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH v2 1/4] oeqa/utils/sshcontrol: increase and log timeout in output
2013-07-30 9:28 [PATCH v2 0/4] Small tweaks for testimage Stefan Stanacar
@ 2013-07-30 9:28 ` Stefan Stanacar
2013-07-30 9:28 ` [PATCH v2 2/4] oeqa/utils/qemurunner: add comment and header Stefan Stanacar
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Stefan Stanacar @ 2013-07-30 9:28 UTC (permalink / raw)
To: openembedded-core
Increase a bit the timeout for ssh commands and also
write in the output that the command timed out (it's
easier to see that in a test fail than checking the ssh log)
Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com>
---
meta/lib/oeqa/utils/sshcontrol.py | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/meta/lib/oeqa/utils/sshcontrol.py b/meta/lib/oeqa/utils/sshcontrol.py
index 8f98c45..7de7c3e 100644
--- a/meta/lib/oeqa/utils/sshcontrol.py
+++ b/meta/lib/oeqa/utils/sshcontrol.py
@@ -13,7 +13,7 @@ import os
class SSHControl(object):
- def __init__(self, host=None, timeout=200, logfile=None):
+ def __init__(self, host=None, timeout=300, logfile=None):
self.host = host
self.timeout = timeout
self._out = ''
@@ -52,9 +52,10 @@ class SSHControl(object):
self._ret = sshconn.poll()
else:
if timeout is None:
- endtime = time.time() + self.timeout
+ tdelta = self.timeout
else:
- endtime = time.time() + timeout
+ tdelta = timeout
+ endtime = time.time() + tdelta
while sshconn.poll() is None and time.time() < endtime:
time.sleep(1)
# process hasn't returned yet
@@ -64,7 +65,8 @@ class SSHControl(object):
sshconn.kill()
self._out = sshconn.stdout.read()
sshconn.stdout.close()
- self.log("[!!! process killed]")
+ self._out += "\n[!!! SSH command timed out after %d seconds and it was killed]" % tdelta
+ self.log("[!!! SSH command timed out after %d seconds and it was killed]" % tdelta)
else:
self._out = sshconn.stdout.read()
self._ret = sshconn.poll()
--
1.8.3.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH v2 2/4] oeqa/utils/qemurunner: add comment and header
2013-07-30 9:28 [PATCH v2 0/4] Small tweaks for testimage Stefan Stanacar
2013-07-30 9:28 ` [PATCH v2 1/4] oeqa/utils/sshcontrol: increase and log timeout in output Stefan Stanacar
@ 2013-07-30 9:28 ` Stefan Stanacar
2013-07-30 9:28 ` [PATCH v2 3/4] oeqa/utils/qemurunner: tweak console bootparam and ip command Stefan Stanacar
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Stefan Stanacar @ 2013-07-30 9:28 UTC (permalink / raw)
To: openembedded-core
One of the files was missing comment/header, unlike the others.
Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com>
---
meta/lib/oeqa/utils/qemurunner.py | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/meta/lib/oeqa/utils/qemurunner.py b/meta/lib/oeqa/utils/qemurunner.py
index 1051b2b..02e0a4a 100644
--- a/meta/lib/oeqa/utils/qemurunner.py
+++ b/meta/lib/oeqa/utils/qemurunner.py
@@ -1,3 +1,10 @@
+# Copyright (C) 2013 Intel Corporation
+#
+# Released under the MIT license (see COPYING.MIT)
+
+# This module provides a class for starting qemu images using runqemu.
+# It's used by testimage.bbclass.
+
import subprocess
import optparse
import sys
--
1.8.3.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH v2 3/4] oeqa/utils/qemurunner: tweak console bootparam and ip command
2013-07-30 9:28 [PATCH v2 0/4] Small tweaks for testimage Stefan Stanacar
2013-07-30 9:28 ` [PATCH v2 1/4] oeqa/utils/sshcontrol: increase and log timeout in output Stefan Stanacar
2013-07-30 9:28 ` [PATCH v2 2/4] oeqa/utils/qemurunner: add comment and header Stefan Stanacar
@ 2013-07-30 9:28 ` Stefan Stanacar
2013-07-30 9:28 ` [PATCH v2 4/4] oeqa/runtime/xorg: use the right ps command for xorg test Stefan Stanacar
2013-07-31 15:22 ` [PATCH v2 0/4] Small tweaks for testimage Paul Eggleton
4 siblings, 0 replies; 6+ messages in thread
From: Stefan Stanacar @ 2013-07-30 9:28 UTC (permalink / raw)
To: openembedded-core
Sync serial baud rate with default inittab which should
help with apparent boot fails. Also keep a console on tty1.
Also we shouldn't assume eth0 it the right interface.
(systemd images can rename interfaces to something else).
Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com>
---
meta/lib/oeqa/utils/qemurunner.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/meta/lib/oeqa/utils/qemurunner.py b/meta/lib/oeqa/utils/qemurunner.py
index 02e0a4a..45b3ccb 100644
--- a/meta/lib/oeqa/utils/qemurunner.py
+++ b/meta/lib/oeqa/utils/qemurunner.py
@@ -25,7 +25,7 @@ class QemuRunner:
self.rootfs = rootfs
self.streampath = '/tmp/qemuconnection.%s' % os.getpid()
- self.qemuparams = 'bootparams="console=ttyS0" qemuparams="-serial unix:%s,server,nowait"' % self.streampath
+ self.qemuparams = 'bootparams="console=tty1 console=ttyS0,115200n8" qemuparams="-serial unix:%s,server,nowait"' % self.streampath
self.qemupid = None
self.ip = None
@@ -76,7 +76,7 @@ class QemuRunner:
if not match:
bb.note("Couldn't get prompt, all I got was:\n%s" % match.group(0))
return False
- console.write("ip addr show eth0 | sed -n '3p' | awk '{ print $2 }' | cut -f 1 -d \"/\"\n")
+ console.write("ip addr show `ip route list | sed -n '1p' | awk '{print $5}'` | sed -n '3p' | awk '{ print $2 }' | cut -f 1 -d \"/\"\n")
(index, match, text) = console.expect([r"((?:[0-9]{1,3}\.){3}[0-9]{1,3})"],10)
console.close()
if match:
--
1.8.3.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH v2 4/4] oeqa/runtime/xorg: use the right ps command for xorg test
2013-07-30 9:28 [PATCH v2 0/4] Small tweaks for testimage Stefan Stanacar
` (2 preceding siblings ...)
2013-07-30 9:28 ` [PATCH v2 3/4] oeqa/utils/qemurunner: tweak console bootparam and ip command Stefan Stanacar
@ 2013-07-30 9:28 ` Stefan Stanacar
2013-07-31 15:22 ` [PATCH v2 0/4] Small tweaks for testimage Paul Eggleton
4 siblings, 0 replies; 6+ messages in thread
From: Stefan Stanacar @ 2013-07-30 9:28 UTC (permalink / raw)
To: openembedded-core
Use our determined ps command, otherwise test fails for images with procps.
Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com>
---
meta/lib/oeqa/runtime/xorg.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/meta/lib/oeqa/runtime/xorg.py b/meta/lib/oeqa/runtime/xorg.py
index 96cc20a..12dccd8 100644
--- a/meta/lib/oeqa/runtime/xorg.py
+++ b/meta/lib/oeqa/runtime/xorg.py
@@ -11,8 +11,8 @@ class XorgTest(oeRuntimeTest):
@skipUnlessPassed('test_ssh')
def test_xorg_running(self):
- (status, output) = self.target.run('ps | grep -v xinit | grep [X]org')
- self.assertEqual(status, 0, msg="Xorg does not appear to be running %s" % self.target.run('ps')[1])
+ (status, output) = self.target.run(oeRuntimeTest.pscmd + ' | grep -v xinit | grep [X]org')
+ self.assertEqual(status, 0, msg="Xorg does not appear to be running %s" % self.target.run(oeRuntimeTest.pscmd)[1])
@skipUnlessPassed('test_ssh')
def test_xorg_error(self):
--
1.8.3.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH v2 0/4] Small tweaks for testimage
2013-07-30 9:28 [PATCH v2 0/4] Small tweaks for testimage Stefan Stanacar
` (3 preceding siblings ...)
2013-07-30 9:28 ` [PATCH v2 4/4] oeqa/runtime/xorg: use the right ps command for xorg test Stefan Stanacar
@ 2013-07-31 15:22 ` Paul Eggleton
4 siblings, 0 replies; 6+ messages in thread
From: Paul Eggleton @ 2013-07-31 15:22 UTC (permalink / raw)
To: openembedded-core
On Tuesday 30 July 2013 12:28:16 Stefan Stanacar wrote:
> Changed in v2:
> - 4/4 had an extra change that wasn't meant to be.
>
> The following changes since commit bd1c441a210cae03fb6006c996227211cc29056b:
>
> bitbake: bitbake: runqueue: add warning if invalidating invalid task
> (2013-07-29 15:25:09 +0100)
>
> are available in the git repository at:
>
> git://git.yoctoproject.org/poky-contrib stefans/testimage-fix1
>
> for you to fetch changes up to 42a3f746ec638bfb4802ccc4c10f0cbd09de958e:
>
> oeqa/runtime/xorg: use the right ps command for xorg test (2013-07-30
> 11:59:30 +0300)
>
> ----------------------------------------------------------------
> Stefan Stanacar (4):
> oeqa/utils/sshcontrol: increase and log timeout in output
> oeqa/utils/qemurunner: add comment and header
> oeqa/utils/qemurunner: tweak console bootparam and ip command
> oeqa/runtime/xorg: use the right ps command for xorg test
Acked-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Cheers,
Paul
--
Paul Eggleton
Intel Open Source Technology Centre
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2013-07-31 15:22 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-30 9:28 [PATCH v2 0/4] Small tweaks for testimage Stefan Stanacar
2013-07-30 9:28 ` [PATCH v2 1/4] oeqa/utils/sshcontrol: increase and log timeout in output Stefan Stanacar
2013-07-30 9:28 ` [PATCH v2 2/4] oeqa/utils/qemurunner: add comment and header Stefan Stanacar
2013-07-30 9:28 ` [PATCH v2 3/4] oeqa/utils/qemurunner: tweak console bootparam and ip command Stefan Stanacar
2013-07-30 9:28 ` [PATCH v2 4/4] oeqa/runtime/xorg: use the right ps command for xorg test Stefan Stanacar
2013-07-31 15:22 ` [PATCH v2 0/4] Small tweaks for testimage Paul Eggleton
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox