qemu-e2k/tests
Eric Blake 29a6731afb tests: Avoid qobject_from_jsonf("%"PRId64)
The qobject_from_jsonf() function implements a pseudo-printf
language for creating a QObject; however, it is hard-coded to
only parse a subset of formats understood by -Wformat, and is
not a straight synonym to bare printf().  In particular, any
use of an int64_t integer works only if the system's
definition of PRId64 matches what the parser expects; which
works on glibc (%lld or %ld depending on 32- vs. 64-bit) and
mingw (%I64d), but not on Mac OS (%qd).  Rather than enhance
the parser, it is just as easy to force the use of int (where
the value is small enough) or long long instead of int64_t,
which we know always works.

This should cover all remaining testsuite uses of
qobject_from_json[fv]() that were trying to rely on PRId64,
although my proof for that was done by adding in asserts and
checking that 'make check' still passed, where such asserts
are inappropriate during hard freeze.  A later series in 2.9
may remove all dynamic JSON parsing, but that's a bigger task.

Reported by: G 3 <programmingkidx@gmail.com>
Signed-off-by: Eric Blake <eblake@redhat.com>
Message-Id: <1479922617-4400-4-git-send-email-eblake@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
[Rename value64 to value_ll]
Signed-off-by: Markus Armbruster <armbru@redhat.com>
2016-12-05 17:09:34 +01:00
..
acpi-test-data tests: acpi tables expected blobs update 2016-10-10 01:16:58 +03:00
data
docker tests/docker/Makefile.include: add a generic docker-run target 2016-10-17 10:05:48 +08:00
guest-debug
image-fuzzer
libqos libqos/ahci: Add get_sense and test_ready 2016-11-14 11:15:55 -05:00
migration
multiboot
qapi-schema
qemu-iotests qemu-iotests: avoid spurious failure on test 109 2016-11-14 22:47:34 -05:00
rocker
tcg test-i386: fix bitrot for 64-bit 2016-10-24 15:27:19 +02:00
vmstate-static-checker-data
.gitignore aio: convert from RFifoLock to QemuRecMutex 2016-10-28 21:50:18 +08:00
ac97-test.c
ahci-test.c ahci-test: add QMP tray test for ATAPI 2016-11-14 11:15:55 -05:00
atomic_add-bench.c tests: add atomic_add-bench 2016-10-26 08:29:01 -07:00
bios-tables-test.c tests/boot-sector: Use mkstemp() to create a unique file name 2016-10-14 10:06:47 +11:00
boot-order-test.c
boot-sector.c tests/boot-sector: Increase time-out to 90 seconds 2016-10-14 10:06:47 +11:00
boot-sector.h tests/boot-sector: Use mkstemp() to create a unique file name 2016-10-14 10:06:47 +11:00
boot-serial-test.c boot-serial-test: Add a test for the powernv machine 2016-11-15 11:45:01 +11:00
check-block.sh tests: allow to specify list of formats to test for check-block.sh 2016-09-23 13:36:09 +02:00
check-qdict.c qdict: implement a qdict_crumple method for un-flattening a dict 2016-10-25 17:56:14 +02:00
check-qfloat.c
check-qint.c
check-qjson.c tests: Avoid qobject_from_jsonf("%"PRId64) 2016-12-05 17:09:34 +01:00
check-qlist.c
check-qnull.c qapi: rename QmpOutputVisitor to QObjectOutputVisitor 2016-10-25 16:25:54 +02:00
check-qom-interface.c tests: fix check-qom-interface leaks 2016-09-08 17:57:32 +04:00
check-qom-proplist.c tests: fix check-qom-proplist leaks 2016-09-08 17:57:32 +04:00
check-qstring.c
crypto-tls-x509-helpers.c
crypto-tls-x509-helpers.h clean-up: removed duplicate #includes 2016-10-28 18:17:24 +03:00
device-introspect-test.c
display-vga-test.c
drive_del-test.c
ds1338-test.c
e1000-test.c
e1000e-test.c libqos: Change PCI accessors to take opaque BAR handle 2016-10-28 09:38:27 +11:00
eepro100-test.c
endianness-test.c spapr: Improved placement of PCI host bridges in guest memory map 2016-10-16 12:04:15 +11:00
es1370-test.c
fdc-test.c
fw_cfg-test.c
hd-geo-test.c tests/hd-geo-test: Don't pass NULL to unlink() 2016-09-08 10:43:58 +01:00
i440fx-test.c libqos: add PCI management in qtest_vboot()/qtest_shutdown() 2016-10-06 16:15:53 +11:00
i82801b11-test.c
ide-test.c tests: Remove unneeded "-vnc none" option 2016-10-31 15:09:59 -02:00
intel-hda-test.c
io-channel-helpers.c
io-channel-helpers.h
ioh3420-test.c
ipmi-bt-test.c virtio, pc: fixes and features 2016-11-03 14:41:53 +00:00
ipmi-kcs-test.c tests: Remove unneeded "-vnc none" option 2016-10-31 15:09:59 -02:00
ipoctal232-test.c
ivshmem-test.c libqos: Change PCI accessors to take opaque BAR handle 2016-10-28 09:38:27 +11:00
libqtest.c libqtest: add qmp_eventwait_ref 2016-11-14 11:15:54 -05:00
libqtest.h libqtest: add qmp_eventwait_ref 2016-11-14 11:15:54 -05:00
m25p80-test.c tests: add a m25p80 test 2016-10-17 19:22:17 +01:00
m48t59-test.c
Makefile.include tests: add XSCOM tests for the PowerNV machine 2016-11-15 11:38:18 +11:00
ne2000-test.c
nvme-test.c
pc-cpu-test.c tests: pc-cpu-test leaks fixes 2016-09-08 18:05:22 +04:00
pcnet-test.c
pkix_asn1_tab.c qtest: fix make check complaint in crypto module 2016-10-19 10:09:24 +01:00
pnv-xscom-test.c tests: add XSCOM tests for the PowerNV machine 2016-11-15 11:38:18 +11:00
postcopy-test.c tests/postcopy: Use KVM on ppc64 only if it is KVM-HV 2016-11-23 12:00:48 +11:00
prom-env-test.c tests: Add pseries machine to the prom-env-test, too 2016-10-28 11:17:31 +11:00
ptimer-test-stubs.c tests: ptimer: Change the copyright comment 2016-10-24 16:26:53 +01:00
ptimer-test.c tests: ptimer: Replace 10000 with 1 2016-10-24 16:26:53 +01:00
ptimer-test.h tests: ptimer: Change the copyright comment 2016-10-24 16:26:53 +01:00
pvpanic-test.c
pxe-test.c tests/boot-sector: Use mkstemp() to create a unique file name 2016-10-14 10:06:47 +11:00
q35-test.c libqos: add PCI management in qtest_vboot()/qtest_shutdown() 2016-10-06 16:15:53 +11:00
qemu-iotests-quick.sh
qht-bench.c qht-bench: relax test_start/stop atomic accesses 2016-10-24 15:27:19 +02:00
qom-test.c tests: fix qom-test leaks 2016-09-08 18:05:21 +04:00
rcutorture.c
rtas-test.c tests: don't check if qtest_spapr_boot() returns NULL 2016-10-28 09:36:58 +11:00
rtc-test.c
rtl8139-test.c libqos: Change PCI accessors to take opaque BAR handle 2016-10-28 09:38:27 +11:00
spapr-phb-test.c spapr: Improved placement of PCI host bridges in guest memory map 2016-10-16 12:04:15 +11:00
tco-test.c libqos: Change PCI accessors to take opaque BAR handle 2016-10-28 09:38:27 +11:00
test-aio.c iothread: release AioContext around aio_poll 2016-10-28 21:50:18 +08:00
test-arm-mptimer.c tests: Add tests for the ARM MPTimer 2016-10-24 16:26:54 +01:00
test-base64.c
test-bitops.c
test-blockjob-txn.c blockjob: add block_job_start 2016-11-14 22:47:34 -05:00
test-blockjob.c blockjobs: split interface into public/private, Part 1 2016-11-01 08:04:56 -04:00
test-bufferiszero.c cutils: Add test for buffer_is_zero 2016-09-13 19:13:32 +02:00
test-char.c char: remove explicit_fe_open, use a set_handlers argument 2016-10-24 15:46:10 +02:00
test-clone-visitor.c
test-coroutine.c test-coroutine: test qemu_coroutine_entered() 2016-09-28 17:11:23 +01:00
test-crypto-afsplit.c
test-crypto-block.c tests: No longer dependent on CONFIG_UUID 2016-09-23 11:42:52 +08:00
test-crypto-cipher.c crypto: add CTR mode support 2016-10-19 10:09:24 +01:00
test-crypto-hash.c crypto: fix initialization of crypto in tests 2016-10-19 10:23:55 +01:00
test-crypto-ivgen.c
test-crypto-pbkdf.c crypto: support more hash algorithms for pbkdf 2016-09-19 16:30:45 +01:00
test-crypto-secret.c
test-crypto-tlscredsx509.c
test-crypto-tlssession.c
test-crypto-xts.c
test-cutils.c tests: fix test-cutils leaks 2016-09-08 17:57:32 +04:00
test-filter-mirror.c
test-filter-redirector.c
test-hbitmap.c tests: Add test code for hbitmap serialization 2016-10-24 17:56:07 +02:00
test-int128.c int128: Use __int128 if available 2016-10-26 08:29:00 -07:00
test-io-channel-buffer.c
test-io-channel-command.c
test-io-channel-file.c
test-io-channel-socket.c io: Add a QIOChannelSocket cleanup test 2016-10-27 09:13:10 +02:00
test-io-channel-tls.c crypto: fix initialization of crypto in tests 2016-10-19 10:23:55 +01:00
test-io-task.c
test-iov.c tests: fix test-iov leaks 2016-09-08 17:57:32 +04:00
test-logging.c
test-mul64.c
test-netfilter.c
test-opts-visitor.c
test-qdev-global-props.c
test-qdist.c
test-qemu-opts.c
test-qga.c test-qga: Avoid qobject_from_jsonv("%"PRId64) 2016-12-05 17:09:34 +01:00
test-qht-par.c
test-qht.c test-qht: perform lookups under rcu_read_lock 2016-10-06 18:04:13 +02:00
test-qmp-commands.c qapi: rename QmpInputVisitor to QObjectInputVisitor 2016-10-25 16:25:54 +02:00
test-qmp-event.c
test-qobject-input-strict.c qapi: rename QmpInputVisitor to QObjectInputVisitor 2016-10-25 16:25:54 +02:00
test-qobject-input-visitor.c tests: Avoid qobject_from_jsonf("%"PRId64) 2016-12-05 17:09:34 +01:00
test-qobject-output-visitor.c qapi: rename QmpOutputVisitor to QObjectOutputVisitor 2016-10-25 16:25:54 +02:00
test-rcu-list.c
test-replication.c test-replication: fix leaks 2016-11-15 15:41:00 +00:00
test-string-input-visitor.c qapi: rename *qmp-*-visitor* to *qobject-*-visitor* 2016-10-25 16:25:48 +02:00
test-string-output-visitor.c qapi: rename *qmp-*-visitor* to *qobject-*-visitor* 2016-10-25 16:25:48 +02:00
test-thread-pool.c
test-throttle.c
test-timed-average.c
test-uuid.c test-uuid: fix leak 2016-11-11 20:53:23 +08:00
test-visitor-serialization.c qapi: rename QmpOutputVisitor to QObjectOutputVisitor 2016-10-25 16:25:54 +02:00
test-vmstate.c tests/test-vmstate.c: add array of pointer to struct 2016-11-14 14:50:56 +01:00
test-write-threshold.c
test-x86-cpuid-compat.c target-i386: Print warning when mixing [+-]foo and foo=(on|off) 2016-10-31 16:20:59 -02:00
test-x86-cpuid.c
test-xbzrle.c
tmp105-test.c
tpci200-test.c
usb-hcd-ehci-test.c libqos: Change PCI accessors to take opaque BAR handle 2016-10-28 09:38:27 +11:00
usb-hcd-ohci-test.c
usb-hcd-uhci-test.c tests: minor cleanups in usb-hcd-uhci-test 2016-10-14 10:06:47 +11:00
usb-hcd-xhci-test.c
vhost-user-bridge.c
vhost-user-test.c trivial patches for 2016-10-28 2016-10-31 11:58:30 +00:00
virtio-9p-test.c libqos: Give qvirtio_config_read*() consistent semantics 2016-10-28 09:38:27 +11:00
virtio-balloon-test.c
virtio-blk-test.c libqos: Give qvirtio_config_read*() consistent semantics 2016-10-28 09:38:27 +11:00
virtio-console-test.c
virtio-net-test.c tests: enable virtio tests on SPAPR 2016-10-28 09:36:58 +11:00
virtio-rng-test.c tests: enable virtio tests on SPAPR 2016-10-28 09:36:58 +11:00
virtio-scsi-test.c libqos: Give qvirtio_config_read*() consistent semantics 2016-10-28 09:38:27 +11:00
virtio-serial-test.c
vmxnet3-test.c
wdt_ib700-test.c