From: Luiz Capitulino <lcapitulino@redhat.com>
To: Michael Roth <mdroth@linux.vnet.ibm.com>
Cc: Jan Kiszka <jan.kiszka@siemens.com>,
Anthony Liguori <aliguori@us.ibm.com>,
qemu-devel <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH] Fix qjson test of solidus encoding
Date: Mon, 29 Aug 2011 13:58:21 -0300 [thread overview]
Message-ID: <20110829135821.2380343e@doriath> (raw)
In-Reply-To: <4E5B9FF2.4060908@linux.vnet.ibm.com>
On Mon, 29 Aug 2011 09:19:30 -0500
Michael Roth <mdroth@linux.vnet.ibm.com> wrote:
> On 08/26/2011 12:52 PM, Jan Kiszka wrote:
> > On 2011-08-26 19:43, Luiz Capitulino wrote:
> >> On Fri, 26 Aug 2011 18:48:52 +0200
> >> Jan Kiszka<jan.kiszka@siemens.com> wrote:
> >>
> >>> Hi all,
> >>>
> >>> current master has some qregressions:
> >>>
> >>> # ./check-qdict
> >>> Running suite(s): QDict test-suite
> >>> 93%: Checks: 16, Failures: 1, Errors: 0
> >>> check-qdict.c:289:F:Stress Test:qdict_stress_test:0: Assertion 'test_file != NULL' failed
> >>
> >> I guess you build qemu from a different directory, right? This test only
> >> works from the source dir. I'll fix it (actually I thought I had already fixed it!).
> >
> > Yes, found that reason already. Works fine when fed with the test data
> > as expected.
> >
> >>
> >>> # ./check-qjson
> >>> Running suite(s): QJSON test-suite
> >>> 95%: Checks: 21, Failures: 1, Errors: 0
> >>> check-qjson.c:59:F:String Literals:escaped_string:0: / != \/
> >>
> >> I found this problem while reading the parser code and added the test
> >> so that we don't forget fixing it. However, at the time I looked at the
> >> issue, I didn't know how to fix it.
> >>
> >> Michael, would you mind to take a look at it?
> >
> > After reading the spec I tend to think it's a test bug:
> >
> > -------8<-------
> >
> > "\/" is supposed to be decoded as "/", but there is no need to encode
> > "/" via escape. Fix the existing test and add a second one expressing
> > this.
> >
> > Signed-off-by: Jan Kiszka<jan.kiszka@siemens.com>
> > ---
> > check-qjson.c | 3 ++-
> > 1 files changed, 2 insertions(+), 1 deletions(-)
> >
> > diff --git a/check-qjson.c b/check-qjson.c
> > index 64fcdcb..36d4ac2 100644
> > --- a/check-qjson.c
> > +++ b/check-qjson.c
> > @@ -33,7 +33,8 @@ START_TEST(escaped_string)
> > { "\"\\n\"", "\n" },
> > { "\"\\r\"", "\r" },
> > { "\"\\t\"", "\t" },
> > - { "\"\\/\"", "\\/" },
> > + { "\"/\"", "/" },
> > + { "\"\\/\"", "/", .skip = 1 },
> > { "\"\\\\\"", "\\" },
> > { "\"\\\"\"", "\"" },
> > { "\"hello world \\\"embedded string\\\"\"",
>
> Acked-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Applied to the qmp branch, thanks.
prev parent reply other threads:[~2011-08-29 16:58 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-26 16:48 [Qemu-devel] check-qdict and check-qjson fail Jan Kiszka
2011-08-26 17:43 ` Luiz Capitulino
2011-08-26 17:52 ` [Qemu-devel] [PATCH] Fix qjson test of solidus encoding Jan Kiszka
2011-08-26 17:58 ` Luiz Capitulino
2011-08-26 17:58 ` Luiz Capitulino
2011-08-29 14:19 ` Michael Roth
2011-08-29 16:58 ` Luiz Capitulino [this message]
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=20110829135821.2380343e@doriath \
--to=lcapitulino@redhat.com \
--cc=aliguori@us.ibm.com \
--cc=jan.kiszka@siemens.com \
--cc=mdroth@linux.vnet.ibm.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).