From 8b902e3d2309595567e4957b96e971c4f3ca455e Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Fri, 16 Dec 2022 10:50:05 +0100 Subject: 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 --- tests/unit/test-cutils.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'tests') diff --git a/tests/unit/test-cutils.c b/tests/unit/test-cutils.c index 86caddc..2126b46 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; -- cgit v1.1