[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 4/7] test-keyval: Tighten test of trailing crap after size
From: |
Laurent Vivier |
Subject: |
[PULL 4/7] test-keyval: Tighten test of trailing crap after size |
Date: |
Wed, 18 Dec 2019 14:01:02 +0100 |
From: Markus Armbruster <address@hidden>
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 <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Laurent Vivier <address@hidden>
---
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
- [PULL 0/7] Trivial branch patches, Laurent Vivier, 2019/12/18
- [PULL 2/7] monitor: Remove unused define, Laurent Vivier, 2019/12/18
- [PULL 5/7] target/sparc: Remove old TODO file, Laurent Vivier, 2019/12/18
- [PULL 3/7] util/cutils: Turn FIXME comment into QEMU_BUILD_BUG_ON(), Laurent Vivier, 2019/12/18
- [PULL 7/7] qemu-doc: Remove the unused "Guest Agent" node, Laurent Vivier, 2019/12/18
- [PULL 4/7] test-keyval: Tighten test of trailing crap after size,
Laurent Vivier <=
- [PULL 1/7] MAINTAINERS: Add hw/sd/ssi-sd.c in the SD section, Laurent Vivier, 2019/12/18
- [PULL 6/7] Revert "qemu-options.hx: Update for reboot-timeout parameter", Laurent Vivier, 2019/12/18
- Re: [PULL 0/7] Trivial branch patches, Peter Maydell, 2019/12/20