qemu/tests
Eric Blake 759573d05b test-cutils: Add coverage of qemu_strtod
It's hard to tweak code for consistency if I can't prove what will or
won't break from those tweaks.  Time to add unit tests for
qemu_strtod() and qemu_strtod_finite().

Among other things, I wrote a check whether we have C99 semantics for
strtod("0x1") (which MUST parse hex numbers) rather than C89 (which
must stop parsing at 'x').  These days, I suspect that is okay; but if
it fails CI checks, knowing the difference will help us decide what we
want to do about it.  Note that C2x, while not final at the time of
this patch, has been considering whether to make strtol("0b1") parse
as 1 with no slop instead of the C17 parse of 0 with slop "b1"; that
decision may also bleed over to strtod().  But for now, I didn't think
it worth adding unit tests on that front (to strtol or strtod) as
things may still change.

Likewise, there are plenty more corner cases of strtod proper that I
don't explicitly test here, but there are enough unit tests added here
that it covers all the branches reached in our wrappers.  In
particular, it demonstrates the difference on when *value is left
uninitialized, which an upcoming patch will normalize.

Signed-off-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Hanna Czenczek <hreitz@redhat.com>
Message-Id: <20230522190441.64278-10-eblake@redhat.com>
2023-06-02 12:29:27 -05:00
..
avocado tests/avocado/virtio-gpu: Cancel test if drm rendering is not available 2023-05-30 13:24:51 -07:00
bench migration/xbzrle: Use i386 host/cpuinfo.h 2023-05-23 16:51:18 -07:00
data ACPI: bios-tables-test.c step 5 (update expected table binaries) 2023-05-19 01:36:09 -04:00
decode decodetree: Add --output-null for meson testing 2023-05-31 19:56:42 -07:00
docker tests/docker: simplify HOST_ARCH definition 2023-05-26 10:17:32 +02:00
fp tests: make fp-test less chatty when running from test suite 2023-03-01 10:31:28 +00:00
guest-debug gdbstub: add test for untimely stop-reply packets 2023-05-18 12:40:52 -07:00
image-fuzzer
include
keys
lcitool tests/lcitool: Add mtools and xorriso and remove genisoimage as dependencies 2023-05-16 09:14:18 +02:00
migration meson: Add static glib dependency for initrd-stress.img 2023-05-26 12:34:17 +02:00
multiboot
perf/block/qcow2
plugin
qapi-schema qapi: Improve error message for description following section 2023-05-22 10:03:26 +02:00
qemu-iotests iotests: Fix test 104 under NBD 2023-06-02 11:24:18 -05:00
qtest tests/qtest: Run arm-specific tests only if the required machine is available 2023-05-30 15:50:17 +01:00
rocker
tcg Hexagon (target/hexagon) Fix assignment to tmp registers 2023-05-26 07:03:41 -07:00
tsan
uefi-test-tools
unit test-cutils: Add coverage of qemu_strtod 2023-06-02 12:29:27 -05:00
vm Makefile: remove $(TESTS_PYTHON) 2023-05-26 10:17:32 +02:00
vmstate-static-checker-data
dbus-vmstate-daemon.sh
Makefile.include Makefile: remove $(TESTS_PYTHON) 2023-05-26 10:17:32 +02:00
meson.build tests/decode: Convert tests to meson 2023-05-30 10:55:39 -07:00
requirements.txt tests: Use configure-provided pyvenv for tests 2023-05-18 08:53:51 +02:00
test-qht-par.c
vhost-user-bridge.c error handling: Use RETRY_ON_EINTR() macro where applicable 2023-01-09 13:50:47 +01:00