qemu-e2k/tests
Markus Armbruster 0b2c1beea4 keyval: Support lists
Additionally permit non-negative integers as key components.  A
dictionary's keys must either be all integers or none.  If all keys
are integers, convert the dictionary to a list.  The set of keys must
be [0,N].

Examples:

* list.1=goner,list.0=null,list.1=eins,list.2=zwei
  is equivalent to JSON [ "null", "eins", "zwei" ]

* a.b.c=1,a.b.0=2
  is inconsistent: a.b.c clashes with a.b.0

* list.0=null,list.2=eins,list.2=zwei
  has a hole: list.1 is missing

Similar design flaw as for objects: there is no way to denote an empty
list.  While interpreting "key absent" as empty list seems natural
(removing a list member from the input string works when there are
multiple ones, so why not when there's just one), it doesn't work:
"key absent" already means "optional list absent", which isn't the
same as "empty list present".

Update the keyval object visitor to use this a.0 syntax in error
messages rather than the usual a[0].

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <1488317230-26248-25-git-send-email-armbru@redhat.com>
[Off-by-one fix squashed in, as per Kevin's review]
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
2017-03-07 16:07:48 +01:00
..
acpi-test-data tests/acpi: update DSDT after last patch 2017-03-02 07:31:26 +02:00
data tests: use static qga config file 2016-07-25 13:23:18 -05:00
docker new: dockerfiles/debian-s390-cross 2017-02-28 20:31:01 +08:00
guest-debug
image-fuzzer
libqos tests: fix virtio-blk-test leaks 2017-03-01 11:58:57 +04:00
migration tests: introduce a framework for testing migration performance 2016-07-22 13:23:39 +05:30
multiboot
qapi-schema qapi: add qapi2texi script 2017-01-16 10:10:35 +01:00
qemu-iotests block: Add Error parameter to bdrv_append() 2017-02-28 20:47:51 +01:00
rocker
tcg target/openrisc: Rename the cpu from or32 to or1k 2017-02-14 08:14:58 +11:00
vmstate-static-checker-data
.gitignore test-qapi-util: New, covering qapi/qapi-util.c 2017-03-07 16:07:47 +01:00
ac97-test.c
acpi-utils.c tests: Move reusable ACPI code into a utility file 2017-03-02 07:14:27 +02:00
acpi-utils.h tests: Move reusable ACPI code into a utility file 2017-03-02 07:14:27 +02:00
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 virtio, pc: fixes, features 2017-03-03 10:09:03 +00: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 powernv: Don't test POWER9 CPU yet 2017-03-03 11:30:59 +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 Don't check qobject_type() before qobject_to_qdict() 2017-02-22 19:52:01 +01:00
check-qfloat.c
check-qint.c
check-qjson.c check-qjson: Test errors from qobject_from_json() 2017-03-07 16:07:47 +01:00
check-qlist.c
check-qnull.c qapi: Drop unused non-strict qobject input visitor 2017-03-05 09:14:19 +01: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 qom: Make all interface types abstract 2017-01-16 17:52:34 +01:00
display-vga-test.c qtest: add display-vga-test to ppc64 2017-01-31 10:10:13 +11:00
drive_del-test.c tests: add drive_del-test to ppc/ppc64 2016-07-29 14:14:15 +10:00
ds1338-test.c
e1000-test.c tests: fix e1000-test leak 2017-03-01 11:51:28 +04:00
e1000e-test.c tests: fix e1000e leaks 2017-03-01 11:51:28 +04:00
eepro100-test.c tests: fix eepro100-test leak 2017-03-01 11:51:05 +04:00
endianness-test.c tests: fix endianness-test leaks 2017-03-01 00:09:28 +04:00
es1370-test.c
fdc-test.c
fw_cfg-test.c
hd-geo-test.c tests: fix hd-geo-test leaks 2017-03-01 11:51:04 +04:00
i440fx-test.c tests: fix i440fx-test leaks 2017-03-01 11:51:28 +04:00
i82801b11-test.c
ide-test.c tests: fix ide-test leaks 2017-03-01 11:51:04 +04:00
intel-hda-test.c coccinelle: Remove unnecessary variables for function return value 2016-06-20 16:38:13 +02:00
io-channel-helpers.c
io-channel-helpers.h
ioh3420-test.c
iothread.c aio: introduce aio_co_schedule and aio_co_wake 2017-02-21 11:14:07 +00:00
iothread.h aio: introduce aio_co_schedule and aio_co_wake 2017-02-21 11:14:07 +00:00
ipmi-bt-test.c tests: fix ipmi-bt-test leak 2017-03-01 11:51:05 +04:00
ipmi-kcs-test.c tests: fix ipmi-kcs-test leak 2017-03-01 11:51:05 +04:00
ipoctal232-test.c
ivshmem-test.c qtest: add ivshmem-test for ppc64 2017-01-31 10:10:13 +11:00
libqtest.c libqtest: Fix qmp() & friends to abort on JSON parse errors 2017-03-07 16:07:47 +01:00
libqtest.h qmp-test: New, covering basic QMP protocol 2017-03-05 09:02:10 +01:00
m25p80-test.c aspeed/smc: extend tests for Command mode 2017-01-20 11:15:08 +00:00
m48t59-test.c
Makefile.include test-qapi-util: New, covering qapi/qapi-util.c 2017-03-07 16:07:47 +01: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 powernv: Don't test POWER9 CPU yet 2017-03-03 11:30:59 +11:00
postcopy-test.c tests: fix qmp response leak 2017-03-01 00:09:28 +04:00
prom-env-test.c tests/prom-env: Enable the test for the sun4u machine, too 2017-02-28 09:03:39 +03:00
ptimer-test-stubs.c tests: fix ptimer leaks 2017-03-01 00:09:28 +04:00
ptimer-test.c tests: fix ptimer leaks 2017-03-01 00:09:28 +04:00
ptimer-test.h tests: ptimer: Change the copyright comment 2016-10-24 16:26:53 +01:00
pvpanic-test.c tests: fix qmp response leak 2017-03-01 00:09:28 +04:00
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 tests: fix q35-test leaks 2017-03-01 11:50:33 +04:00
qemu-iotests-quick.sh
qht-bench.c qht-bench: relax test_start/stop atomic accesses 2016-10-24 15:27:19 +02:00
qmp-test.c qapi: Drop unused non-strict qobject input visitor 2017-03-05 09:14:19 +01: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 tests: fix tco-test leaks 2017-03-01 11:51:25 +04:00
test-aio-multithread.c tests-aio-multithread: use atomic_read properly 2017-02-27 12:54:08 +00:00
test-aio.c aio: add AioPollFn and io_poll() interface 2017-01-03 16:38:48 +00:00
test-arm-mptimer.c tests: Add tests for the ARM MPTimer 2016-10-24 16:26:54 +01:00
test-base64.c
test-bitcnt.c tests: New test-bitcnt 2017-01-10 08:49:59 -08:00
test-bitops.c bitops.h: Implement half-shuffle and half-unshuffle ops 2016-06-17 15:23:51 +01:00
test-blockjob-txn.c blockjob: Add permissions to block_job_create() 2017-02-28 20:40:37 +01:00
test-blockjob.c tests: Remove FIXME comments 2017-02-28 20:47:50 +01:00
test-bufferiszero.c cutils: Add test for buffer_is_zero 2016-09-13 19:13:32 +02:00
test-char.c char: rename CharDriverState Chardev 2017-01-27 18:07:59 +01:00
test-clone-visitor.c qapi: Add new clone visitor 2016-07-06 10:52:04 +02:00
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 3des-ede support when using libgcrypt/nettle 2016-12-21 14:26:26 +00:00
test-crypto-hash.c crypto: fix initialization of crypto in tests 2016-10-19 10:23:55 +01:00
test-crypto-hmac.c crypto: add HMAC algorithms testcases 2016-12-22 09:24:59 +00: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 crypto: rename OUT to out in xts test to avoid clash on MinGW 2016-07-04 10:46:59 +01:00
test-cutils.c util/cutils: Change qemu_strtosz*() from int64_t to uint64_t 2017-02-23 20:35:36 +01:00
test-filter-mirror.c tests: fix qmp response leak 2017-03-01 00:09:28 +04:00
test-filter-redirector.c tests: fix qmp response leak 2017-03-01 00:09:28 +04:00
test-hbitmap.c test-hbitmap: Add hbitmap_is_serializable() calls 2017-01-26 10:25:01 +08: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 tests: fix leaks in test-io-channel-command 2017-03-01 00:09:28 +04:00
test-io-channel-file.c
test-io-channel-socket.c io: change the QIOTask callback signature 2017-01-23 15:32:18 +00:00
test-io-channel-tls.c io: change the QIOTask callback signature 2017-01-23 15:32:18 +00:00
test-io-task.c io: fix possible double free of task error object 2017-01-26 10:26:18 +00:00
test-iov.c tests: fix test-iov leaks 2016-09-08 17:57:32 +04:00
test-keyval.c keyval: Support lists 2017-03-07 16:07:48 +01:00
test-logging.c test-logging: don't hard-code paths in /tmp 2016-08-19 12:44:11 +01:00
test-mul64.c
test-netfilter.c
test-opts-visitor.c tests: Cover input visit beyond end of list 2017-03-05 09:14:20 +01:00
test-qapi-util.c qapi: New parse_qapi_name() 2017-03-07 16:07:47 +01:00
test-qdev-global-props.c
test-qdist.c qdist: return "(empty)" instead of NULL when printing an empty dist 2016-08-03 18:44:56 +02:00
test-qemu-opts.c test-qemu-opts: Cover qemu_opts_parse() of "no" 2017-03-07 16:07:46 +01:00
test-qga.c qemu-ga patch queue for 2.9 2017-03-07 07:32:28 +00: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: Drop unused non-strict qobject input visitor 2017-03-05 09:14:19 +01:00
test-qmp-event.c test-qmp-event: Simplify and tighten event_test_emit() 2017-02-22 19:51:59 +01:00
test-qobject-input-visitor.c test-qobject-input-visitor: Abort earlier on bad test input 2017-03-07 16:07:47 +01:00
test-qobject-output-visitor.c tests: Don't check qobject_type() before qobject_to_qbool() 2017-02-22 19:52:14 +01:00
test-rcu-list.c
test-replication.c test-replication: fix leaks 2016-11-15 15:41:00 +00:00
test-shift128.c host-utils: Implement unsigned quadword left/right shift and unit tests 2017-01-31 10:10:14 +11:00
test-string-input-visitor.c tests: Cover input visit beyond end of list 2017-03-05 09:14:20 +01: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-thread-pool: use generic AioContext infrastructure 2017-02-21 11:14:07 +00:00
test-throttle.c tests: Remove FIXME comments 2017-02-28 20:47:50 +01:00
test-timed-average.c
test-uuid.c test-uuid: fix leak 2016-11-11 20:53:23 +08:00
test-visitor-serialization.c test-visitor-serialization: Pass &error_abort to qobject_from_json() 2017-03-07 16:07:47 +01:00
test-vmstate.c tests/test-vmstate.c: test array of ptr to primitive 2017-02-28 11:30:22 +00: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 tests: fix usb-test leaks 2017-03-01 11:51:29 +04:00
usb-hcd-ohci-test.c
usb-hcd-uhci-test.c tests: fix usb-test leaks 2017-03-01 11:51:29 +04:00
usb-hcd-xhci-test.c
vhost-user-bridge.c tests/vhost-user-bridge: use contrib/libvhost-user 2016-12-16 01:14:38 +02:00
vhost-user-test.c tests: fix vhost-user-test leaks 2017-03-01 11:51:00 +04:00
virtio-9p-test.c tests: fix virtio-9p-test leaks 2017-03-01 11:51:28 +04:00
virtio-balloon-test.c
virtio-blk-test.c tests: fix virtio-blk-test leaks 2017-03-01 11:58:57 +04:00
virtio-console-test.c coccinelle: Remove unnecessary variables for function return value 2016-06-20 16:38:13 +02:00
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 tests: fix virtio-scsi-test leak 2017-03-01 11:51:28 +04:00
virtio-serial-test.c
vmxnet3-test.c
wdt_ib700-test.c coccinelle: Remove unnecessary variables for function return value 2016-06-20 16:38:13 +02:00