[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 2/2] test-keyval: Tighten test of trailing crap after size
From: |
Laurent Vivier |
Subject: |
Re: [PATCH 2/2] test-keyval: Tighten test of trailing crap after size |
Date: |
Wed, 18 Dec 2019 12:29:02 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.2 |
Le 25/11/2019 à 14:38, Markus Armbruster a écrit :
> 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>
> ---
> 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 09b0ae3c68..e331a84149 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);
>
Applied to my trivial-patches branch.
Thanks,
Laurent
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [PATCH 2/2] test-keyval: Tighten test of trailing crap after size,
Laurent Vivier <=