All of lore.kernel.org
 help / color / mirror / Atom feed
From: John Snow <jsnow@redhat.com>
To: Eric Blake <eblake@redhat.com>, qemu-devel@nongnu.org
Cc: pbonzini@redhat.com, afaerber@suse.de
Subject: Re: [Qemu-devel] [PATCH v3 1/5] qtest: allow arbitrarily long sends
Date: Tue, 05 May 2015 19:35:44 -0400	[thread overview]
Message-ID: <554953D0.6090701@redhat.com> (raw)
In-Reply-To: <554950A9.7050205@redhat.com>



On 05/05/2015 07:22 PM, Eric Blake wrote:
> On 05/05/2015 04:22 PM, John Snow wrote:
>> qtest currently has a static buffer of size 1024 that if we 
>> overflow, ignores the additional data silently which leads to
>> hangs or stream failures.
>> 
>> Use glib's string facilities to allow arbitrarily long data, but
>> split this off into a new function, qtest_sendf.
>> 
>> Static data can still be sent using qtest_send, which avoids the
>> malloc/copy overflow.
> 
> Did you mean 'overhead' instead of 'overflow'?
> 

Sigh, yes. The fingers run on autopilot without input from the brain.
Will nab it if I spin again.

>> 
>> Signed-off-by: John Snow <jsnow@redhat.com> --- qtest.c | 46
>> ++++++++++++++++++++++++++++------------------ 1 file changed, 28
>> insertions(+), 18 deletions(-)
>> 
> 
>> qtest_send_prefix(chr); -        qtest_send(chr, "FAIL Unknown
>> command `%s'\n", words[0]); +        qtest_sendf(chr, "FAIL
>> Unknown command `%s'\n", words[0]); }
> 
> Unrelated - these days, I don't see `this' quoting much any more
> (except in m4); most people have moved to 'this' quoting.  We could
> clean it while touching this line, but it really doesn't affect
> correctness either way.
> 

If I spin again I'll get it.

> Reviewed-by: Eric Blake <eblake@redhat.com>
> 

  reply	other threads:[~2015-05-05 23:35 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-05 22:22 [Qemu-devel] [PATCH v3 0/5] qtest: base64 r/w and faster memset John Snow
2015-05-05 22:22 ` [Qemu-devel] [PATCH v3 1/5] qtest: allow arbitrarily long sends John Snow
2015-05-05 23:22   ` Eric Blake
2015-05-05 23:35     ` John Snow [this message]
2015-05-05 22:22 ` [Qemu-devel] [PATCH v3 2/5] qtest: Add base64 encoded read/write John Snow
2015-05-05 22:22 ` [Qemu-devel] [PATCH v3 3/5] qtest: add memset to qtest protocol John Snow
2015-05-05 22:22 ` [Qemu-devel] [PATCH v3 4/5] qtest: precompute hex nibs John Snow
2015-05-06  6:25   ` Markus Armbruster
2015-05-06 14:12     ` John Snow
2015-05-06 15:19       ` Markus Armbruster
2015-05-06 16:18         ` John Snow
2015-05-07  6:13           ` Markus Armbruster
2015-05-07 17:52             ` John Snow
2015-05-07 20:27           ` Eric Blake
2015-05-08  6:25             ` Markus Armbruster
2015-05-08 16:22               ` John Snow
2015-05-08 19:47                 ` Eric Blake
2015-05-05 22:22 ` [Qemu-devel] [PATCH v3 5/5] libqos/ahci: Swap memread/write with bufread/write John Snow
2015-05-06 14:56 ` [Qemu-devel] [PATCH v3 0/5] qtest: base64 r/w and faster memset Paolo Bonzini

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=554953D0.6090701@redhat.com \
    --to=jsnow@redhat.com \
    --cc=afaerber@suse.de \
    --cc=eblake@redhat.com \
    --cc=pbonzini@redhat.com \
    --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.