summaryrefslogtreecommitdiff
path: root/meta/lib/oeqa
diff options
context:
space:
mode:
authorMariano Lopez <mariano.lopez@linux.intel.com>2015-11-05 09:08:58 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-11-16 11:34:35 +0000
commitd1a97475b4e6c7066a3161cb9cec1d4b27644518 (patch)
tree112b241f5ddae5c8b27af7f0fdacaed92332fc46 /meta/lib/oeqa
parent0f89bbab6588a1171259801fa879516740030acb (diff)
downloadopenembedded-core-d1a97475b4e6c7066a3161cb9cec1d4b27644518.tar.gz
openembedded-core-d1a97475b4e6c7066a3161cb9cec1d4b27644518.tar.bz2
openembedded-core-d1a97475b4e6c7066a3161cb9cec1d4b27644518.zip
qemurunner: Remove the timeout in run_serial
Sometmes when there is high load in the server the commands executed in the target take a lot of time to complete and this lead to incorrect dump files or empty files. This is caused because run_serial has a timeout of five seconds when running the commands in the target. This change removes the timeout and just keep reading the socket until it finds the prompt from the target or when the socket is not ready to be read. [YOCTO #8510] Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
Diffstat (limited to 'meta/lib/oeqa')
-rw-r--r--meta/lib/oeqa/utils/qemurunner.py18
1 files changed, 10 insertions, 8 deletions
diff --git a/meta/lib/oeqa/utils/qemurunner.py b/meta/lib/oeqa/utils/qemurunner.py
index abbafd51e4..e1c8ea1085 100644
--- a/meta/lib/oeqa/utils/qemurunner.py
+++ b/meta/lib/oeqa/utils/qemurunner.py
@@ -366,23 +366,25 @@ class QemuRunner:
# We assume target system have echo to get command status
if not raw:
command = "%s; echo $?\n" % command
- self.server_socket.sendall(command)
+
data = ''
status = 0
- stopread = False
- endtime = time.time()+5
- while time.time()<endtime and not stopread:
+ self.server_socket.sendall(command)
+ keepreading = True
+ while keepreading:
sread, _, _ = select.select([self.server_socket],[],[],5)
- for sock in sread:
- answer = sock.recv(1024)
+ if sread:
+ answer = self.server_socket.recv(1024)
if answer:
data += answer
# Search the prompt to stop
if re.search("[a-zA-Z0-9]+@[a-zA-Z0-9\-]+:~#", data):
- stopread = True
- break
+ keepreading = False
else:
raise Exception("No data on serial console socket")
+ else:
+ keepreading = False
+
if data:
if raw:
status = 1