From: Mikko Rapeli <mikko.rapeli@linaro.org>
To: Alexander Kanavin <alex.kanavin@gmail.com>
Cc: Richard Purdie <richard.purdie@linuxfoundation.org>,
openembedded-core@lists.openembedded.org
Subject: Re: [OE-core] [PATCH v2 2/8] oeqa ssh.py: fix hangs in run()
Date: Thu, 9 Feb 2023 13:12:24 +0200 [thread overview]
Message-ID: <Y+TVGJ+OOfSL+pBX@nuoska> (raw)
In-Reply-To: <CANNYZj9Hr2AZSuXutfF8kktatFt-AmsYT2bp9oauOLLFonQ5wQ@mail.gmail.com>
Hi,
On Thu, Feb 09, 2023 at 11:53:00AM +0100, Alexander Kanavin wrote:
> On Thu, 9 Feb 2023 at 10:36, Mikko Rapeli <mikko.rapeli@linaro.org> wrote:
> > I think sleep() is ok in this case to reduce busy looping over serial
> > console and read() more data than what select() initially saw. Reading
> > single character at a time is a bit silly and just wastes CPU time when
> > we don't need ms level accuracy.
>
> Something doesn't compute here. The writer should be sending data in
> chunks, and there are buffers all the way to the reader, so where does
> the splitting into single characters happen?
Sorry I mixed with the serial console patch, but the output was similar
over ssh.
select() returns with any data, even single character. Fancy readers
will read larger chunks but will read more data than is available and thus
block for ever. Plain read() will read the data which is available from
select() and thus really small amounts like single characters if that's
available over the socket. This is visible in the partial read output of
do_testimage() task output log which becomes quite unreadable without change.
Cheers,
-Mikko
next prev parent reply other threads:[~2023-02-09 11:12 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-09 8:09 [PATCH v2 0/8] fix oeqa runtime test framework when qemu hangs Mikko Rapeli
2023-02-09 8:09 ` [PATCH v2 1/8] oeqa ssh.py: move output prints to new line Mikko Rapeli
2023-02-09 8:09 ` [PATCH v2 2/8] oeqa ssh.py: fix hangs in run() Mikko Rapeli
2023-02-09 9:15 ` [OE-core] " Richard Purdie
2023-02-09 9:36 ` Mikko Rapeli
2023-02-09 10:53 ` Alexander Kanavin
2023-02-09 10:56 ` Richard Purdie
2023-02-09 11:12 ` Mikko Rapeli [this message]
2023-02-09 11:42 ` Alexander Kanavin
2023-02-09 12:23 ` Mikko Rapeli
2023-02-09 10:20 ` Richard Purdie
2023-02-09 10:35 ` Mikko Rapeli
2023-02-09 10:52 ` Richard Purdie
2023-02-09 8:09 ` [PATCH v2 3/8] oeqa ssh.py: add connection keep alive options to ssh client Mikko Rapeli
2023-02-09 8:09 ` [PATCH v2 4/8] oeqa dump.py: add error counter and stop after 5 failures Mikko Rapeli
2023-02-09 8:09 ` [PATCH v2 5/8] oeqa qemurunner: read more data at a time from serial Mikko Rapeli
2023-02-09 8:09 ` [PATCH v2 6/8] oeqa qemurunner.py: add timeout to QMP calls Mikko Rapeli
2023-02-09 8:09 ` [PATCH v2 7/8] oeqa qemurunner.py: kill qemu if it hangs Mikko Rapeli
2023-02-09 9:45 ` [OE-core] " Alexander Kanavin
2023-02-09 9:56 ` Mikko Rapeli
2023-02-09 10:01 ` Alexander Kanavin
2023-02-09 8:09 ` [PATCH v2 8/8] oeqa qemurunner.py: try to avoid reading one character at a time Mikko Rapeli
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=Y+TVGJ+OOfSL+pBX@nuoska \
--to=mikko.rapeli@linaro.org \
--cc=alex.kanavin@gmail.com \
--cc=openembedded-core@lists.openembedded.org \
--cc=richard.purdie@linuxfoundation.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.