From: Laurent Vivier <laurent@vivier.eu>
To: qemu-devel@nongnu.org
Cc: qemu-trivial@nongnu.org, Markus Armbruster <armbru@redhat.com>,
Michael Tokarev <mjt@tls.msk.ru>,
Laurent Vivier <laurent@vivier.eu>,
"Dr. David Alan Gilbert" <dgilbert@redhat.com>
Subject: [PULL 4/7] test-keyval: Tighten test of trailing crap after size
Date: Wed, 18 Dec 2019 14:01:02 +0100 [thread overview]
Message-ID: <20191218130105.125981-5-laurent@vivier.eu> (raw)
In-Reply-To: <20191218130105.125981-1-laurent@vivier.eu>
From: Markus Armbruster <armbru@redhat.com>
test_keyval_visit_size() should test for trailing crap after size with
and without suffix. It does test the latter: "sz2=16Gi" has size
"16G" followed by crap "i". It fails to test the former "sz1=16E" is
a syntactically valid size that overflows uint64_t. Replace by
"sz1=0Z".
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-Id: <20191125133846.27790-3-armbru@redhat.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
tests/test-keyval.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/test-keyval.c b/tests/test-keyval.c
index 09b0ae3c68fb..e331a84149d3 100644
--- a/tests/test-keyval.c
+++ b/tests/test-keyval.c
@@ -478,7 +478,7 @@ static void test_keyval_visit_size(void)
visit_free(v);
/* Trailing crap */
- qdict = keyval_parse("sz1=16E,sz2=16Gi", NULL, &error_abort);
+ qdict = keyval_parse("sz1=0Z,sz2=16Gi", NULL, &error_abort);
v = qobject_input_visitor_new_keyval(QOBJECT(qdict));
qobject_unref(qdict);
visit_start_struct(v, NULL, NULL, 0, &error_abort);
--
2.24.1
next prev parent reply other threads:[~2019-12-18 13:25 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-18 13:00 [PULL 0/7] Trivial branch patches Laurent Vivier
2019-12-18 13:00 ` [PULL 1/7] MAINTAINERS: Add hw/sd/ssi-sd.c in the SD section Laurent Vivier
2019-12-18 13:01 ` [PULL 2/7] monitor: Remove unused define Laurent Vivier
2019-12-18 13:01 ` [PULL 3/7] util/cutils: Turn FIXME comment into QEMU_BUILD_BUG_ON() Laurent Vivier
2019-12-18 13:01 ` Laurent Vivier [this message]
2019-12-18 13:01 ` [PULL 5/7] target/sparc: Remove old TODO file Laurent Vivier
2019-12-18 13:01 ` [PULL 6/7] Revert "qemu-options.hx: Update for reboot-timeout parameter" Laurent Vivier
2019-12-18 13:01 ` [PULL 7/7] qemu-doc: Remove the unused "Guest Agent" node Laurent Vivier
2019-12-20 14:00 ` [PULL 0/7] Trivial branch patches Peter Maydell
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=20191218130105.125981-5-laurent@vivier.eu \
--to=laurent@vivier.eu \
--cc=armbru@redhat.com \
--cc=dgilbert@redhat.com \
--cc=mjt@tls.msk.ru \
--cc=qemu-devel@nongnu.org \
--cc=qemu-trivial@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).