test-keyval: Tighten test of trailing crap after size
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>
This commit is contained in:
parent
369276ebf3
commit
877e2cfb4c
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user