[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] check-qjson: More thorough testing of UTF-8 in
From: |
Markus Armbruster |
Subject: |
Re: [Qemu-devel] [PATCH] check-qjson: More thorough testing of UTF-8 in strings |
Date: |
Tue, 05 Feb 2013 08:39:50 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.1 (gnu/linux) |
Blue Swirl <address@hidden> writes:
> On Mon, Feb 4, 2013 at 5:19 PM, Markus Armbruster <address@hidden> wrote:
>> Test cases are scraped from Markus Kuhn's UTF-8 decoder capability and
>> stress test at
>> http://www.cl.cam.ac.uk/~mgk25/ucs/examples/UTF-8-test.txt
>
> There's no license. Can we use that?
It's been used widely, but I cc'ed the page's author anyway.
>> Unfortunately, both JSON parser and formatter misbehave right now.
>> This test expects current, incorrect results. They're all clearly
>> marked, and are to be replaced by correct ones as the bugs get fixed.
>> See comments in new utf8_string() for details.
>
> This clearly calls for another fuzz test.
>
>>
>> Signed-off-by: Markus Armbruster <address@hidden>
>> ---
>> tests/check-qjson.c | 625
> ++++++++++++++++++++++++++++++++++++++++++++++++++++
>> 1 file changed, 625 insertions(+)
>>
>> diff --git a/tests/check-qjson.c b/tests/check-qjson.c
>> index 32ffb43..4590b3a 100644
>> --- a/tests/check-qjson.c
>> +++ b/tests/check-qjson.c
[...
>> + /* 3.1.9 Sequence of all 64 possible continuation bytes */
>> + {
>> +
> "\"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\xA1\xA2\xA3\xA4\xA5\xA6\xA7\xA8\xA9\xAA\xAB\xAC\xAD\xAE\xAF\xB0\xB1\xB2\xB3\xB4\xB5\xB6\xB7\xB8\xB9\xBA\xBB\xBC\xBD\xBE\xBF\"",
>
> Please wrap the long lines here and below.
Okay.
[...]