qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: David Hildenbrand <david@redhat.com>
To: Eric Blake <eblake@redhat.com>, qemu-devel@nongnu.org
Cc: Paolo Bonzini <pbonzini@redhat.com>,
	Markus Armbruster <armbru@redhat.com>,
	Michael Roth <mdroth@linux.vnet.ibm.com>
Subject: Re: [Qemu-devel] [PATCH v2 5/9] test-string-input-visitor: Add more tests
Date: Wed, 21 Nov 2018 11:49:30 +0100	[thread overview]
Message-ID: <9a7bc7ca-774c-5419-65a3-a4ebf621996b@redhat.com> (raw)
In-Reply-To: <0a72b07b-3620-7728-4248-8cd7c0112489@redhat.com>

On 20.11.18 18:26, Eric Blake wrote:
> On 11/20/18 11:20 AM, Eric Blake wrote:
>> On 11/20/18 11:06 AM, Eric Blake wrote:
>>> On 11/20/18 3:25 AM, David Hildenbrand wrote:
>>>> Test that very big/small values are not accepted and that ranges with
>>>> only one element work. Also test that ranges are ascending and cannot
>>>> have more than 65536 elements.
>>>>
>>>> Rename expect4 to expect5, as we will be moving that to a separate ulist
>>>> test after the rework.
>>>>
>>>> Signed-off-by: David Hildenbrand <david@redhat.com>
>>>> ---
>>>>   tests/test-string-input-visitor.c | 41 +++++++++++++++++++++++++++++--
>>>>   1 file changed, 39 insertions(+), 2 deletions(-)
>>>>
>>>
>>> Reviewed-by: Eric Blake <eblake@redhat.com>
>>
>> Do we also want to test garbage strings like:
>>
>> "1-" (incomplete range)
>> "1X-2" (garbage suffix on first element)
>> "1-2X" (garbage suffix on second element)
>>
>> and/or
>>
>> "-2--1" (valid range of signed integers)
>> "-1--2" (questionable whether this is valid for the two largest unsigned 
>> integers)
> 
> Or even " 1- 2" (we permit leading whitespace for plain integers - do we 
> also permit it in both sides of a range)?  Also, if we permit whitespace 
> after the range '-', should we permit it beforehand?
> 
> These sorts of questions may be fine in followup patches.
> 

As always, you can never cover all cases during tests :)

While these things surely make sense, I will not add them right now. As
you said, we can do that later.


Taking about spaces:

I think spaces before the "-" are not supported before/after the rewrite
(I remember that strto.* does not skip over them). Spaces after the
space should be covered by strto* automatically (strto.* skips over
leading spaces).

Thanks!

-- 

Thanks,

David / dhildenb

  parent reply	other threads:[~2018-11-21 10:49 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-20  9:25 [Qemu-devel] [PATCH v2 0/9] qapi: rewrite string-input-visitor David Hildenbrand
2018-11-20  9:25 ` [Qemu-devel] [PATCH v2 1/9] cutils: Add qemu_strtod() and qemu_strtod_finite() David Hildenbrand
2018-11-20 16:13   ` Eric Blake
2018-11-20 20:07     ` Markus Armbruster
2018-11-21 10:35       ` David Hildenbrand
2018-11-21 14:00         ` Markus Armbruster
2018-11-21 17:16         ` Eric Blake
2018-11-20  9:25 ` [Qemu-devel] [PATCH v2 2/9] cutils: Fix qemu_strtosz() & friends to reject non-finite sizes David Hildenbrand
2018-11-20 16:29   ` Eric Blake
2018-11-20 20:31     ` Markus Armbruster
2018-11-20 20:41       ` Eric Blake
2018-11-21 10:44         ` David Hildenbrand
2018-11-21 14:16           ` Markus Armbruster
2018-11-21 17:25           ` Eric Blake
2018-11-20  9:25 ` [Qemu-devel] [PATCH v2 3/9] qapi: Fix string-input-visitor to reject NaN and infinities David Hildenbrand
2018-11-20 20:34   ` Markus Armbruster
2018-11-20  9:25 ` [Qemu-devel] [PATCH v2 4/9] qapi: Use qemu_strtod_finite() in qobject-input-visitor David Hildenbrand
2018-11-20  9:25 ` [Qemu-devel] [PATCH v2 5/9] test-string-input-visitor: Add more tests David Hildenbrand
2018-11-20 17:06   ` Eric Blake
2018-11-20 17:20     ` Eric Blake
2018-11-20 17:26       ` Eric Blake
2018-11-20 20:46         ` Markus Armbruster
2018-11-21 10:49         ` David Hildenbrand [this message]
2018-11-21 14:09           ` Markus Armbruster
2018-11-20  9:25 ` [Qemu-devel] [PATCH v2 6/9] qapi: Rewrite string-input-visitor David Hildenbrand
2018-11-20 17:40   ` Eric Blake
2018-11-20 20:58     ` Markus Armbruster
2018-11-21 10:53       ` David Hildenbrand
2018-11-21 14:12         ` Markus Armbruster
2018-11-20  9:25 ` [Qemu-devel] [PATCH v2 7/9] test-string-input-visitor: Use virtual walk David Hildenbrand
2018-11-20 17:41   ` Eric Blake
2018-11-20  9:25 ` [Qemu-devel] [PATCH v2 8/9] test-string-input-visitor: Split off uint64 list tests David Hildenbrand
2018-11-20  9:25 ` [Qemu-devel] [PATCH v2 9/9] test-string-input-visitor: Add range overflow tests David Hildenbrand

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=9a7bc7ca-774c-5419-65a3-a4ebf621996b@redhat.com \
    --to=david@redhat.com \
    --cc=armbru@redhat.com \
    --cc=eblake@redhat.com \
    --cc=mdroth@linux.vnet.ibm.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).