diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2022-12-16 10:50:05 +0100 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2023-01-06 00:51:02 +0100 |
commit | 8b902e3d2309595567e4957b96e971c4f3ca455e (patch) | |
tree | 3188d5b1d18572bb502718c1ac066929c601d402 /tests/unit/test-cutils.c | |
parent | eaaaf8abdc9a9f3493f2cb6a751660dff3f9db57 (diff) |
util: remove support for hex numbers with a scaling suffix
This was deprecated in 6.0 and can now be removed.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'tests/unit/test-cutils.c')
-rw-r--r-- | tests/unit/test-cutils.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/unit/test-cutils.c b/tests/unit/test-cutils.c index 86caddcf64..2126b46391 100644 --- a/tests/unit/test-cutils.c +++ b/tests/unit/test-cutils.c @@ -2315,6 +2315,14 @@ static void test_qemu_strtosz_invalid(void) g_assert_cmpint(res, ==, 0xbaadf00d); g_assert(endptr == str); + /* No suffixes */ + str = "0x18M"; + endptr = NULL; + err = qemu_strtosz(str, &endptr, &res); + g_assert_cmpint(err, ==, -EINVAL); + g_assert_cmpint(res, ==, 0xbaadf00d); + g_assert(endptr == str); + /* No negative values */ str = "-0"; endptr = NULL; |