From: Wenchao Xia <xiawenc@linux.vnet.ibm.com>
To: Anthony Liguori <aliguori@us.ibm.com>
Cc: Peter Maydell <peter.maydell@linaro.org>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 2/2] qtest: use synchronous I/O for char device
Date: Wed, 27 Mar 2013 15:22:00 +0800 [thread overview]
Message-ID: <51529E18.90807@linux.vnet.ibm.com> (raw)
In-Reply-To: <1364310706-10851-2-git-send-email-aliguori@us.ibm.com>
Reviewed-by: Wenchao Xia <xiawenc@linux.vnet.ibm.com>
> Peter reported that rtc-test would periodically hang. It turns out
> this was due to an EAGAIN occurring on qemu_chr_fe_write.
>
> Instead of heavily refactoring qtest, just use a synchronous version
> of the write operation for qemu_chr_fe_write to address this problem.
>
> Reported-by: Peter Maydell <peter.maydell@linaro.org>
> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
> ---
> qtest.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/qtest.c b/qtest.c
> index 5e0e9ec..b03b68a 100644
> --- a/qtest.c
> +++ b/qtest.c
> @@ -191,7 +191,7 @@ static void GCC_FMT_ATTR(2, 3) qtest_send(CharDriverState *chr,
> len = vsnprintf(buffer, sizeof(buffer), fmt, ap);
> va_end(ap);
>
> - qemu_chr_fe_write(chr, (uint8_t *)buffer, len);
> + qemu_chr_fe_write_all(chr, (uint8_t *)buffer, len);
> if (qtest_log_fp && qtest_opened) {
> fprintf(qtest_log_fp, "%s", buffer);
> }
>
--
Best Regards
Wenchao Xia
next prev parent reply other threads:[~2013-03-27 7:22 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-26 15:11 [Qemu-devel] [PATCH 1/2] char: introduce a blocking version of qemu_chr_fe_write Anthony Liguori
2013-03-26 15:11 ` [Qemu-devel] [PATCH 2/2] qtest: use synchronous I/O for char device Anthony Liguori
2013-03-27 7:22 ` Wenchao Xia [this message]
2013-03-26 15:21 ` [Qemu-devel] [PATCH 1/2] char: introduce a blocking version of qemu_chr_fe_write Peter Maydell
2013-03-27 7:21 ` Wenchao Xia
2013-03-27 21:15 ` Anthony Liguori
2013-03-27 22:05 ` Peter Maydell
2013-03-27 23:01 ` Anthony Liguori
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=51529E18.90807@linux.vnet.ibm.com \
--to=xiawenc@linux.vnet.ibm.com \
--cc=aliguori@us.ibm.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.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.