From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: Paul Eggleton <paul.eggleton@linux.intel.com>,
Robert Yang <liezhi.yang@windriver.com>
Cc: openembedded-core@lists.openembedded.org
Subject: Re: [PATCH V2 6/9] core/target/ssh.py: replace decode errors
Date: Wed, 23 Aug 2017 14:17:04 +0100 [thread overview]
Message-ID: <1503494224.32591.156.camel@linuxfoundation.org> (raw)
In-Reply-To: <2904894.l3jg57PGWo@peggleto-mobl.ger.corp.intel.com>
On Tue, 2017-08-22 at 22:55 +1200, Paul Eggleton wrote:
> On Tuesday, 22 August 2017 1:23:10 PM NZST Robert Yang wrote:
> >
> > There might be wild strings when read from target (especially when
> > reading ptest results), replace the errors to avoid breaking the
> > test.
> >
> > Fixed: (Not always happen)
> > $ bitbake core-image-sato -ctestimage
> > [snip]
> > status, output = self.target.run('ptest-runner', 0)
> > File "/buildarea/lyang1/poky/meta/lib/oeqa/core/target/ssh.py",
> > line 84, in run
> > status, output = self._run(sshCmd, processTimeout, True)
> > File "/buildarea/lyang1/poky/meta/lib/oeqa/core/target/ssh.py",
> > line 55, in _run
> > status, output = SSHCall(command, self.logger, timeout)
> > File "/buildarea/lyang1/poky/meta/lib/oeqa/core/target/ssh.py",
> > line 258, in SSHCall
> > run()
> > File "/buildarea/lyang1/poky/meta/lib/oeqa/core/target/ssh.py",
> > line 236, in run
> > output = process.communicate()[0].decode("utf-8")
> > UnicodeDecodeError: 'utf-8' codec can't decode byte 0xc3 in
> > position 4906: invalid continuation byte
> >
> > [YOCTO #11547]
> >
> > Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
> > ---
> > meta/lib/oeqa/core/target/ssh.py | 4 ++--
> > 1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/meta/lib/oeqa/core/target/ssh.py
> > b/meta/lib/oeqa/core/target/ssh.py
> > index b80939c..a2eafcd 100644
> > --- a/meta/lib/oeqa/core/target/ssh.py
> > +++ b/meta/lib/oeqa/core/target/ssh.py
> > @@ -211,7 +211,7 @@ def SSHCall(command, logger, timeout=None,
> > **opts):
> > process.stdout.close()
> > eof = True
> > else:
> > - data = data.decode("utf-8")
> > + data = data.decode("utf-8",
> > errors='replace')
> > output += data
> > logger.debug('Partial data from SSH
> > call: %s' % data)
> Since we're dealing with partial data here, shouldn't we be using a
> reader object? e.g.:
>
> http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=bfd8c35c3
> f917e3806c8dfe36c98c70fbccbb3c9
I've decided to merge this series as it improves the ptest support
substantially however I am expecting a follow up with the tweaks Paul
suggests here please.
Cheers,
Richard
next prev parent reply other threads:[~2017-08-23 13:17 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-22 1:23 [PATCH V2 0/9] Revive ptest and add result to buildhistory Robert Yang
2017-08-22 1:23 ` [PATCH V2 1/9] runtime/cases/_ptest.py: revive it Robert Yang
2017-08-22 1:23 ` [PATCH V2 2/9] oeqa/utils/logparser.py: add skip status Robert Yang
2017-08-22 1:23 ` [PATCH V2 3/9] runtime/cases/_ptest.py: " Robert Yang
2017-08-22 1:23 ` [PATCH V2 4/9] runtime/cases/_ptest.py: rename it to ptest.py Robert Yang
2017-08-22 1:23 ` [PATCH V2 5/9] utils/logparser.py: fix section check Robert Yang
2017-08-22 1:23 ` [PATCH V2 6/9] core/target/ssh.py: replace decode errors Robert Yang
2017-08-22 10:55 ` Paul Eggleton
2017-08-23 13:17 ` Richard Purdie [this message]
2017-08-24 6:19 ` Robert Yang
2017-08-22 1:23 ` [PATCH V2 7/9] buildhistory.bbclass: print message when no commit Robert Yang
2017-08-22 1:23 ` [PATCH V2 8/9] testimage.bbclass: update comments Robert Yang
2017-08-22 1:23 ` [PATCH V2 9/9] buildhistory.bbclass: add ptest Robert Yang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1503494224.32591.156.camel@linuxfoundation.org \
--to=richard.purdie@linuxfoundation.org \
--cc=liezhi.yang@windriver.com \
--cc=openembedded-core@lists.openembedded.org \
--cc=paul.eggleton@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox