qemu/tests
Eric Blake c25b168344 cutils: Improve qemu_strtod* error paths
Previous patches changed all integral qemu_strto*() error paths to
guarantee that *value is never left uninitialized.  Do likewise for
qemu_strtod.  Also, tighten qemu_strtod_finite() to never return a
non-finite value (prior to this patch, we were rejecting "inf" with
-EINVAL and unspecified result 0.0, but failing "9e999" with -ERANGE
and HUGE_VAL - which is infinite on IEEE machines - despite our
function claiming to recognize only finite values).

Auditing callers, we have no external callers of qemu_strtod, and
among the callers of qemu_strtod_finite:

- qapi/qobject-input-visitor.c:qobject_input_type_number_keyval() and
  qapi/string-input-visitor.c:parse_type_number() which reject all
  errors (does not matter what we store)

- utils/cutils.c:do_strtosz() incorrectly assumes that *endptr points
  to '.' on all failures (that is, it is not distinguishing between
  EINVAL and ERANGE; and therefore still does the WRONG THING for
  "9.9e999".  The change here does not entirely fix that (a later
  patch will tackle this more systematically), but at least it fixes
  the read-out-of-bounds first diagnosed in
  https://gitlab.com/qemu-project/qemu/-/issues/1629

- our testsuite, which we can update to match what we document

Signed-off-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Hanna Czenczek <hreitz@redhat.com>
CC: qemu-stable@nongnu.org
Message-Id: <20230522190441.64278-19-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 tests/plugins: add instruction matching to libinsn.so 2022-02-09 12:08:42 +00:00
qapi-schema qapi: Improve error message for description following section 2023-05-22 10:03:26 +02:00
qemu-iotests cutils: Use parse_uint in qemu_strtosz for negative rejection 2023-06-02 12:29:27 -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 cutils: Improve qemu_strtod* error paths 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