summaryrefslogtreecommitdiffstats
path: root/meta/lib
diff options
context:
space:
mode:
authorChen Qi <Qi.Chen@windriver.com>2018-06-01 13:03:11 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-07-02 11:41:25 +0100
commit956eb9241db638c3996291743b4784ba3da91bbe (patch)
tree42241a27928fbe156879cfe2d1feb888a3672a56 /meta/lib
parent2ab2828c71d8c767433a7b9bcc6e403b1376442a (diff)
downloadpoky-956eb9241db638c3996291743b4784ba3da91bbe.tar.gz
oeqa/core/target/ssh.py: increase maximum read bytes from 1024 to 4096
When running testimage task for core-image-sato-sdk, the following error appeared. UnicodeDecodeError: 'utf-8' codec can't decode byte 0x82 at position 0: invalid start byte Checking the codes, I found it's caused by setting a 1024 limit for the read method of the StreamReader object. Comments from the manual: """ The chars argument indicates the number of decoded code points or bytes to return. The read() method will never return more data than requested, but it might return less, if there is not enough available. """ When running `systemctl status --full' on target, this error occurs. This patch increase the bytes limit to 4096 to fix the error. (From OE-Core rev: f1fad60ae3be4450aca6058d5665fb10a9148b44) (From OE-Core rev: bc64cf4fce0631b689c9818ac24e6a2a9d8effec) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib')
-rw-r--r--meta/lib/oeqa/core/target/ssh.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/meta/lib/oeqa/core/target/ssh.py b/meta/lib/oeqa/core/target/ssh.py
index 151b99a77f..8ff1f6c677 100644
--- a/meta/lib/oeqa/core/target/ssh.py
+++ b/meta/lib/oeqa/core/target/ssh.py
@@ -208,7 +208,7 @@ def SSHCall(command, logger, timeout=None, **opts):
208 try: 208 try:
209 if select.select([process.stdout], [], [], 5)[0] != []: 209 if select.select([process.stdout], [], [], 5)[0] != []:
210 reader = codecs.getreader('utf-8')(process.stdout) 210 reader = codecs.getreader('utf-8')(process.stdout)
211 data = reader.read(1024, 1024) 211 data = reader.read(1024, 4096)
212 if not data: 212 if not data:
213 process.stdout.close() 213 process.stdout.close()
214 eof = True 214 eof = True