]> code.ossystems Code Review - openembedded-core.git/commit
oeqa/core/target/ssh.py: increase maximum read bytes from 1024 to 4096
authorChen Qi <Qi.Chen@windriver.com>
Fri, 1 Jun 2018 05:03:11 +0000 (13:03 +0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 2 Jul 2018 09:40:35 +0000 (10:40 +0100)
commitbc64cf4fce0631b689c9818ac24e6a2a9d8effec
tree23e0ca89c6908d7d7b80f8b9f0cdc530ae7fe3d8
parentd55013db85db28bb061b40976cdda7022fa1eb22
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)

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>
meta/lib/oeqa/core/target/ssh.py