aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2020-08-21 12:42:49 +0100
committerPeter Maydell <peter.maydell@linaro.org>2020-08-21 12:42:49 +0100
commit7fd51e68c34fcefdb4d6fd646ed3346f780f89f4 (patch)
treeb4c90dc51c2babb9850d29d0e3349891b2988172 /tests
parent1d806cef0e38b5db8347a8e12f214d543204a314 (diff)
parenta14f0bf1657adef0328a3a756637b93f53ec0220 (diff)
downloadqemu-7fd51e68c34fcefdb4d6fd646ed3346f780f89f4.zip
qemu-7fd51e68c34fcefdb4d6fd646ed3346f780f89f4.tar.gz
qemu-7fd51e68c34fcefdb4d6fd646ed3346f780f89f4.tar.bz2
Merge remote-tracking branch 'remotes/bonzini-gitlab/tags/for-upstream' into staging
New build system, with "fake in-tree builds" support. Missing: * converting configure tests * converting unit tests * converting some remaining parts of the installation # gpg: Signature made Fri 21 Aug 2020 11:33:35 BST # gpg: using RSA key F13338574B662389866C7682BFFBD25F78C7AE83 # gpg: issuer "pbonzini@redhat.com" # gpg: Good signature from "Paolo Bonzini <bonzini@gnu.org>" [full] # gpg: aka "Paolo Bonzini <pbonzini@redhat.com>" [full] # Primary key fingerprint: 46F5 9FBD 57D6 12E7 BFD4 E2F7 7E15 100C CD36 69B1 # Subkey fingerprint: F133 3857 4B66 2389 866C 7682 BFFB D25F 78C7 AE83 * remotes/bonzini-gitlab/tags/for-upstream: (152 commits) docs: convert build system documentation to rST meson: update build-system documentation meson: avoid unstable module warning with Meson 0.56.0 or newer meson: convert po/ meson: convert VNC and dependent libraries to meson meson: move SDL and SDL-image detection to meson meson: convert sample plugins meson: replace create-config with meson configure_file rules.mak: drop unneeded macros meson: convert check-block meson: build texi doc docs: automatically track manual dependencies meson: sphinx-build remove Makefile.target rules.mak: remove version.o meson: convert systemtap files configure: place compatibility symlinks in target directories meson: link emulators without Makefile.target meson: plugins meson: cpu-emu ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'tests')
-rw-r--r--tests/Makefile.include471
-rw-r--r--tests/acceptance/avocado_qemu/__init__.py3
-rwxr-xr-xtests/data/acpi/rebuild-expected-aml.sh2
-rwxr-xr-xtests/docker/test-static24
-rw-r--r--tests/fp/Makefile600
-rw-r--r--tests/fp/fp-test.c2
-rw-r--r--tests/fp/meson.build636
-rw-r--r--tests/fp/wrap.c.inc (renamed from tests/fp/wrap.inc.c)0
-rw-r--r--tests/meson.build18
-rwxr-xr-xtests/multiboot/run_test.sh2
-rw-r--r--tests/plugin/Makefile46
-rw-r--r--tests/plugin/meson.build7
-rw-r--r--tests/qapi-schema/meson.build225
-rwxr-xr-xtests/qemu-iotests/check6
-rw-r--r--tests/qemu-iotests/meson.build10
-rw-r--r--tests/qtest/Makefile.include332
-rw-r--r--tests/qtest/ac97-test.c2
-rw-r--r--tests/qtest/acpi-utils.h2
-rw-r--r--tests/qtest/ahci-test.c2
-rw-r--r--tests/qtest/arm-cpu-features.c2
-rw-r--r--tests/qtest/bios-tables-test.c2
-rw-r--r--tests/qtest/boot-order-test.c2
-rw-r--r--tests/qtest/boot-sector.c2
-rw-r--r--tests/qtest/boot-sector.h2
-rw-r--r--tests/qtest/boot-serial-test.c2
-rw-r--r--tests/qtest/cdrom-test.c2
-rw-r--r--tests/qtest/dbus-vmstate-test.c2
-rw-r--r--tests/qtest/device-introspect-test.c2
-rw-r--r--tests/qtest/device-plug-test.c2
-rw-r--r--tests/qtest/drive_del-test.c2
-rw-r--r--tests/qtest/ds1338-test.c2
-rw-r--r--tests/qtest/e1000-test.c2
-rw-r--r--tests/qtest/eepro100-test.c2
-rw-r--r--tests/qtest/endianness-test.c2
-rw-r--r--tests/qtest/es1370-test.c2
-rw-r--r--tests/qtest/fuzz/Makefile.include39
-rw-r--r--tests/qtest/fuzz/fuzz.c2
-rw-r--r--tests/qtest/fuzz/fuzz.h2
-rw-r--r--tests/qtest/fuzz/i440fx_fuzz.c6
-rw-r--r--tests/qtest/fuzz/meson.build35
-rw-r--r--tests/qtest/fuzz/qos_fuzz.c2
-rw-r--r--tests/qtest/fuzz/qtest_wrappers.c2
-rw-r--r--tests/qtest/fuzz/virtio_net_fuzz.c5
-rw-r--r--tests/qtest/fuzz/virtio_scsi_fuzz.c8
-rw-r--r--tests/qtest/fw_cfg-test.c2
-rw-r--r--tests/qtest/hd-geo-test.c2
-rw-r--r--tests/qtest/hexloader-test.c2
-rw-r--r--tests/qtest/ide-test.c2
-rw-r--r--tests/qtest/ipoctal232-test.c2
-rw-r--r--tests/qtest/ivshmem-test.c2
-rw-r--r--tests/qtest/libqos/aarch64-xlnx-zcu102-machine.c4
-rw-r--r--tests/qtest/libqos/ahci.c6
-rw-r--r--tests/qtest/libqos/ahci.h6
-rw-r--r--tests/qtest/libqos/arm-imx25-pdk-machine.c6
-rw-r--r--tests/qtest/libqos/arm-n800-machine.c6
-rw-r--r--tests/qtest/libqos/arm-raspi2-machine.c4
-rw-r--r--tests/qtest/libqos/arm-sabrelite-machine.c4
-rw-r--r--tests/qtest/libqos/arm-smdkc210-machine.c4
-rw-r--r--tests/qtest/libqos/arm-virt-machine.c6
-rw-r--r--tests/qtest/libqos/arm-xilinx-zynq-a9-machine.c4
-rw-r--r--tests/qtest/libqos/e1000e.c6
-rw-r--r--tests/qtest/libqos/e1000e.h2
-rw-r--r--tests/qtest/libqos/fw_cfg.c2
-rw-r--r--tests/qtest/libqos/i2c-imx.c2
-rw-r--r--tests/qtest/libqos/i2c-omap.c2
-rw-r--r--tests/qtest/libqos/i2c.c2
-rw-r--r--tests/qtest/libqos/i2c.h2
-rw-r--r--tests/qtest/libqos/libqos-pc.c6
-rw-r--r--tests/qtest/libqos/libqos-pc.h2
-rw-r--r--tests/qtest/libqos/libqos-spapr.c6
-rw-r--r--tests/qtest/libqos/libqos-spapr.h2
-rw-r--r--tests/qtest/libqos/libqos.c4
-rw-r--r--tests/qtest/libqos/libqos.h4
-rw-r--r--tests/qtest/libqos/libqtest.h (renamed from tests/qtest/libqtest.h)0
-rw-r--r--tests/qtest/libqos/malloc-pc.c4
-rw-r--r--tests/qtest/libqos/malloc-pc.h2
-rw-r--r--tests/qtest/libqos/malloc-spapr.c2
-rw-r--r--tests/qtest/libqos/malloc-spapr.h2
-rw-r--r--tests/qtest/libqos/malloc.c2
-rw-r--r--tests/qtest/libqos/meson.build57
-rw-r--r--tests/qtest/libqos/pci-pc.c2
-rw-r--r--tests/qtest/libqos/pci-pc.h6
-rw-r--r--tests/qtest/libqos/pci-spapr.c6
-rw-r--r--tests/qtest/libqos/pci-spapr.h6
-rw-r--r--tests/qtest/libqos/pci.c4
-rw-r--r--tests/qtest/libqos/pci.h2
-rw-r--r--tests/qtest/libqos/ppc64_pseries-machine.c4
-rw-r--r--tests/qtest/libqos/qgraph.c4
-rw-r--r--tests/qtest/libqos/qgraph.h8
-rw-r--r--tests/qtest/libqos/qgraph_internal.h4
-rw-r--r--tests/qtest/libqos/qos_external.c8
-rw-r--r--tests/qtest/libqos/qos_external.h4
-rw-r--r--tests/qtest/libqos/rtas.c2
-rw-r--r--tests/qtest/libqos/rtas.h2
-rw-r--r--tests/qtest/libqos/sdhci.c2
-rw-r--r--tests/qtest/libqos/sdhci.h2
-rw-r--r--tests/qtest/libqos/tpci200.c4
-rw-r--r--tests/qtest/libqos/usb.c2
-rw-r--r--tests/qtest/libqos/usb.h2
-rw-r--r--tests/qtest/libqos/virtio-9p.c4
-rw-r--r--tests/qtest/libqos/virtio-9p.h6
-rw-r--r--tests/qtest/libqos/virtio-balloon.c4
-rw-r--r--tests/qtest/libqos/virtio-balloon.h6
-rw-r--r--tests/qtest/libqos/virtio-blk.c4
-rw-r--r--tests/qtest/libqos/virtio-blk.h6
-rw-r--r--tests/qtest/libqos/virtio-mmio.c8
-rw-r--r--tests/qtest/libqos/virtio-mmio.h4
-rw-r--r--tests/qtest/libqos/virtio-net.c4
-rw-r--r--tests/qtest/libqos/virtio-net.h6
-rw-r--r--tests/qtest/libqos/virtio-pci.c14
-rw-r--r--tests/qtest/libqos/virtio-pci.h6
-rw-r--r--tests/qtest/libqos/virtio-rng.c4
-rw-r--r--tests/qtest/libqos/virtio-rng.h6
-rw-r--r--tests/qtest/libqos/virtio-scsi.c4
-rw-r--r--tests/qtest/libqos/virtio-scsi.h6
-rw-r--r--tests/qtest/libqos/virtio-serial.c4
-rw-r--r--tests/qtest/libqos/virtio-serial.h6
-rw-r--r--tests/qtest/libqos/virtio.c2
-rw-r--r--tests/qtest/libqos/virtio.h2
-rw-r--r--tests/qtest/libqos/x86_64_pc-machine.c2
-rw-r--r--tests/qtest/libqtest-single.h2
-rw-r--r--tests/qtest/libqtest.c2
-rw-r--r--tests/qtest/m48t59-test.c2
-rw-r--r--tests/qtest/machine-none-test.c2
-rw-r--r--tests/qtest/megasas-test.c2
-rw-r--r--tests/qtest/meson.build257
-rw-r--r--tests/qtest/microbit-test.c2
-rw-r--r--tests/qtest/migration-helpers.h2
-rw-r--r--tests/qtest/migration-test.c4
-rw-r--r--tests/qtest/modules-test.c2
-rw-r--r--tests/qtest/ne2000-test.c2
-rw-r--r--tests/qtest/numa-test.c2
-rw-r--r--tests/qtest/nvme-test.c2
-rw-r--r--tests/qtest/pca9552-test.c2
-rw-r--r--tests/qtest/pci-test.c2
-rw-r--r--tests/qtest/pcnet-test.c2
-rw-r--r--tests/qtest/pflash-cfi02-test.c2
-rw-r--r--tests/qtest/pnv-xscom-test.c2
-rw-r--r--tests/qtest/prom-env-test.c2
-rw-r--r--tests/qtest/pvpanic-test.c2
-rw-r--r--tests/qtest/pxe-test.c2
-rw-r--r--tests/qtest/q35-test.c2
-rw-r--r--tests/qtest/qmp-cmd-test.c2
-rw-r--r--tests/qtest/qmp-test.c2
-rw-r--r--tests/qtest/qom-test.c2
-rw-r--r--tests/qtest/rtas-test.c4
-rw-r--r--tests/qtest/sdhci-test.c2
-rw-r--r--tests/qtest/spapr-phb-test.c2
-rw-r--r--tests/qtest/tco-test.c2
-rw-r--r--tests/qtest/test-filter-mirror.c2
-rw-r--r--tests/qtest/test-filter-redirector.c2
-rw-r--r--tests/qtest/test-hmp.c2
-rw-r--r--tests/qtest/tpm-crb-swtpm-test.c2
-rw-r--r--tests/qtest/tpm-tis-device-swtpm-test.c2
-rw-r--r--tests/qtest/tpm-tis-swtpm-test.c2
-rw-r--r--tests/qtest/tpm-util.c2
-rw-r--r--tests/qtest/tulip-test.c2
-rw-r--r--tests/qtest/virtio-rng-test.c2
-rw-r--r--tests/qtest/virtio-test.c2
-rw-r--r--tests/qtest/vmgenid-test.c2
-rw-r--r--tests/qtest/vmxnet3-test.c2
-rw-r--r--tests/qtest/wdt_ib700-test.c2
-rwxr-xr-xtests/tcg/configure.sh4
-rw-r--r--tests/test-qga.c10
-rw-r--r--tests/test-qgraph.c5
-rw-r--r--tests/vm/Makefile.include8
-rwxr-xr-xtests/vm/freebsd2
-rwxr-xr-xtests/vm/netbsd2
-rwxr-xr-xtests/vm/openbsd2
169 files changed, 1538 insertions, 1716 deletions
diff --git a/tests/Makefile.include b/tests/Makefile.include
index c7e4646..9ac8f5b 100644
--- a/tests/Makefile.include
+++ b/tests/Makefile.include
@@ -109,6 +109,7 @@ check-unit-y += tests/test-qht$(EXESUF)
check-unit-y += tests/test-qht-par$(EXESUF)
check-unit-y += tests/test-bitops$(EXESUF)
check-unit-y += tests/test-bitcnt$(EXESUF)
+check-unit-y += tests/test-qgraph$(EXESUF)
check-unit-y += tests/check-qom-interface$(EXESUF)
check-unit-y += tests/check-qom-proplist$(EXESUF)
check-unit-y += tests/test-qemu-opts$(EXESUF)
@@ -129,7 +130,7 @@ ifndef CONFIG_TSAN
# https://github.com/google/sanitizers/issues/1116
check-unit-$(CONFIG_SOFTMMU) += tests/test-char$(EXESUF)
check-unit-$(CONFIG_SOFTMMU) += tests/test-qdev-global-props$(EXESUF)
-ifneq (,$(findstring qemu-ga,$(TOOLS)))
+ifeq ($(CONFIG_GUEST_AGENT),y)
check-unit-$(call land,$(CONFIG_LINUX),$(CONFIG_VIRTIO_SERIAL)) += tests/test-qga$(EXESUF)
endif
endif
@@ -159,203 +160,6 @@ check-unit-y += tests/test-uuid$(EXESUF)
check-unit-y += tests/ptimer-test$(EXESUF)
check-unit-y += tests/test-qapi-util$(EXESUF)
-check-block-$(call land,$(CONFIG_POSIX),$(CONFIG_SOFTMMU)) += tests/check-block.sh
-
-qapi-schema += alternate-any.json
-qapi-schema += alternate-array.json
-qapi-schema += alternate-base.json
-qapi-schema += alternate-branch-if-invalid.json
-qapi-schema += alternate-clash.json
-qapi-schema += alternate-conflict-dict.json
-qapi-schema += alternate-conflict-enum-bool.json
-qapi-schema += alternate-conflict-enum-int.json
-qapi-schema += alternate-conflict-string.json
-qapi-schema += alternate-conflict-bool-string.json
-qapi-schema += alternate-conflict-num-string.json
-qapi-schema += alternate-empty.json
-qapi-schema += alternate-invalid-dict.json
-qapi-schema += alternate-nested.json
-qapi-schema += alternate-unknown.json
-qapi-schema += args-alternate.json
-qapi-schema += args-any.json
-qapi-schema += args-array-empty.json
-qapi-schema += args-array-unknown.json
-qapi-schema += args-bad-boxed.json
-qapi-schema += args-boxed-anon.json
-qapi-schema += args-boxed-string.json
-qapi-schema += args-int.json
-qapi-schema += args-invalid.json
-qapi-schema += args-member-array-bad.json
-qapi-schema += args-member-case.json
-qapi-schema += args-member-unknown.json
-qapi-schema += args-name-clash.json
-qapi-schema += args-union.json
-qapi-schema += args-unknown.json
-qapi-schema += bad-base.json
-qapi-schema += bad-data.json
-qapi-schema += bad-ident.json
-qapi-schema += bad-if.json
-qapi-schema += bad-if-empty.json
-qapi-schema += bad-if-empty-list.json
-qapi-schema += bad-if-list.json
-qapi-schema += bad-type-bool.json
-qapi-schema += bad-type-dict.json
-qapi-schema += bad-type-int.json
-qapi-schema += base-cycle-direct.json
-qapi-schema += base-cycle-indirect.json
-qapi-schema += command-int.json
-qapi-schema += comments.json
-qapi-schema += doc-bad-alternate-member.json
-qapi-schema += doc-bad-boxed-command-arg.json
-qapi-schema += doc-bad-command-arg.json
-qapi-schema += doc-bad-enum-member.json
-qapi-schema += doc-bad-event-arg.json
-qapi-schema += doc-bad-feature.json
-qapi-schema += doc-bad-section.json
-qapi-schema += doc-bad-symbol.json
-qapi-schema += doc-bad-union-member.json
-qapi-schema += doc-before-include.json
-qapi-schema += doc-before-pragma.json
-qapi-schema += doc-duplicated-arg.json
-qapi-schema += doc-duplicated-return.json
-qapi-schema += doc-duplicated-since.json
-qapi-schema += doc-empty-arg.json
-qapi-schema += doc-empty-section.json
-qapi-schema += doc-empty-symbol.json
-qapi-schema += doc-good.json
-qapi-schema += doc-interleaved-section.json
-qapi-schema += doc-invalid-end.json
-qapi-schema += doc-invalid-end2.json
-qapi-schema += doc-invalid-return.json
-qapi-schema += doc-invalid-section.json
-qapi-schema += doc-invalid-start.json
-qapi-schema += doc-missing-colon.json
-qapi-schema += doc-missing-expr.json
-qapi-schema += doc-missing-space.json
-qapi-schema += doc-missing.json
-qapi-schema += doc-no-symbol.json
-qapi-schema += doc-undoc-feature.json
-qapi-schema += double-type.json
-qapi-schema += duplicate-key.json
-qapi-schema += empty.json
-qapi-schema += enum-bad-member.json
-qapi-schema += enum-bad-name.json
-qapi-schema += enum-bad-prefix.json
-qapi-schema += enum-clash-member.json
-qapi-schema += enum-dict-member-unknown.json
-qapi-schema += enum-if-invalid.json
-qapi-schema += enum-int-member.json
-qapi-schema += enum-member-case.json
-qapi-schema += enum-missing-data.json
-qapi-schema += enum-wrong-data.json
-qapi-schema += event-boxed-empty.json
-qapi-schema += event-case.json
-qapi-schema += event-member-invalid-dict.json
-qapi-schema += event-nest-struct.json
-qapi-schema += features-bad-type.json
-qapi-schema += features-deprecated-type.json
-qapi-schema += features-duplicate-name.json
-qapi-schema += features-if-invalid.json
-qapi-schema += features-missing-name.json
-qapi-schema += features-name-bad-type.json
-qapi-schema += features-no-list.json
-qapi-schema += features-unknown-key.json
-qapi-schema += flat-union-array-branch.json
-qapi-schema += flat-union-bad-base.json
-qapi-schema += flat-union-bad-discriminator.json
-qapi-schema += flat-union-base-any.json
-qapi-schema += flat-union-base-union.json
-qapi-schema += flat-union-clash-member.json
-qapi-schema += flat-union-discriminator-bad-name.json
-qapi-schema += flat-union-empty.json
-qapi-schema += flat-union-inline.json
-qapi-schema += flat-union-inline-invalid-dict.json
-qapi-schema += flat-union-int-branch.json
-qapi-schema += flat-union-invalid-branch-key.json
-qapi-schema += flat-union-invalid-discriminator.json
-qapi-schema += flat-union-invalid-if-discriminator.json
-qapi-schema += flat-union-no-base.json
-qapi-schema += flat-union-optional-discriminator.json
-qapi-schema += flat-union-string-discriminator.json
-qapi-schema += funny-char.json
-qapi-schema += funny-word.json
-qapi-schema += ident-with-escape.json
-qapi-schema += include-before-err.json
-qapi-schema += include-cycle.json
-qapi-schema += include-extra-junk.json
-qapi-schema += include-nested-err.json
-qapi-schema += include-no-file.json
-qapi-schema += include-non-file.json
-qapi-schema += include-repetition.json
-qapi-schema += include-self-cycle.json
-qapi-schema += include-simple.json
-qapi-schema += indented-expr.json
-qapi-schema += leading-comma-list.json
-qapi-schema += leading-comma-object.json
-qapi-schema += missing-colon.json
-qapi-schema += missing-comma-list.json
-qapi-schema += missing-comma-object.json
-qapi-schema += missing-type.json
-qapi-schema += nested-struct-data.json
-qapi-schema += nested-struct-data-invalid-dict.json
-qapi-schema += non-objects.json
-qapi-schema += oob-test.json
-qapi-schema += allow-preconfig-test.json
-qapi-schema += pragma-doc-required-crap.json
-qapi-schema += pragma-extra-junk.json
-qapi-schema += pragma-name-case-whitelist-crap.json
-qapi-schema += pragma-non-dict.json
-qapi-schema += pragma-unknown.json
-qapi-schema += pragma-returns-whitelist-crap.json
-qapi-schema += qapi-schema-test.json
-qapi-schema += quoted-structural-chars.json
-qapi-schema += redefined-builtin.json
-qapi-schema += redefined-command.json
-qapi-schema += redefined-event.json
-qapi-schema += redefined-type.json
-qapi-schema += reserved-command-q.json
-qapi-schema += reserved-enum-q.json
-qapi-schema += reserved-member-has.json
-qapi-schema += reserved-member-q.json
-qapi-schema += reserved-member-u.json
-qapi-schema += reserved-member-underscore.json
-qapi-schema += reserved-type-kind.json
-qapi-schema += reserved-type-list.json
-qapi-schema += returns-alternate.json
-qapi-schema += returns-array-bad.json
-qapi-schema += returns-dict.json
-qapi-schema += returns-unknown.json
-qapi-schema += returns-whitelist.json
-qapi-schema += string-code-point-31.json
-qapi-schema += string-code-point-127.json
-qapi-schema += struct-base-clash-deep.json
-qapi-schema += struct-base-clash.json
-qapi-schema += struct-data-invalid.json
-qapi-schema += struct-member-if-invalid.json
-qapi-schema += struct-member-invalid-dict.json
-qapi-schema += struct-member-invalid.json
-qapi-schema += trailing-comma-list.json
-qapi-schema += trailing-comma-object.json
-qapi-schema += type-bypass-bad-gen.json
-qapi-schema += unclosed-list.json
-qapi-schema += unclosed-object.json
-qapi-schema += unclosed-string.json
-qapi-schema += union-base-empty.json
-qapi-schema += union-base-no-discriminator.json
-qapi-schema += union-branch-case.json
-qapi-schema += union-branch-if-invalid.json
-qapi-schema += union-branch-invalid-dict.json
-qapi-schema += union-clash-branches.json
-qapi-schema += union-empty.json
-qapi-schema += union-invalid-base.json
-qapi-schema += union-optional-branch.json
-qapi-schema += union-unknown.json
-qapi-schema += unknown-escape.json
-qapi-schema += unknown-expr-key.json
-
-
-check-qapi-schema-y := $(addprefix tests/qapi-schema/, $(qapi-schema))
-
generated-files-y += tests/test-qapi-types.h
generated-files-y += tests/include/test-qapi-types-sub-module.h
generated-files-y += tests/test-qapi-types-sub-sub-module.h
@@ -421,7 +225,8 @@ tests/test-iov$(EXESUF): tests/test-iov.o $(test-util-obj-y)
tests/test-hbitmap$(EXESUF): tests/test-hbitmap.o $(test-util-obj-y) $(test-crypto-obj-y)
tests/test-bitmap$(EXESUF): tests/test-bitmap.o $(test-util-obj-y)
tests/test-x86-cpuid$(EXESUF): tests/test-x86-cpuid.o
-tests/test-xbzrle$(EXESUF): tests/test-xbzrle.o migration/xbzrle.o migration/page_cache.o $(test-util-obj-y)
+tests/test-xbzrle$(EXESUF): tests/test-xbzrle.o migration/libmigration.fa $(test-util-obj-y) \
+ $(test-io-obj-y)
tests/test-cutils$(EXESUF): tests/test-cutils.o util/cutils.o $(test-util-obj-y)
tests/test-int128$(EXESUF): tests/test-int128.o
tests/rcutorture$(EXESUF): tests/rcutorture.o $(test-util-obj-y)
@@ -437,22 +242,9 @@ tests/test-bufferiszero$(EXESUF): tests/test-bufferiszero.o $(test-util-obj-y)
tests/atomic_add-bench$(EXESUF): tests/atomic_add-bench.o $(test-util-obj-y)
tests/atomic64-bench$(EXESUF): tests/atomic64-bench.o $(test-util-obj-y)
-tests/fp/%:
- $(MAKE) -C $(dir $@) $(notdir $@)
-
-tests/test-qdev-global-props$(EXESUF): tests/test-qdev-global-props.o \
- hw/core/qdev.o hw/core/qdev-properties.o hw/core/hotplug.o\
- hw/core/bus.o \
- hw/core/resettable.o \
- hw/core/irq.o \
- hw/core/fw-path-provider.o \
- hw/core/reset.o \
- hw/core/vmstate-if.o \
- hw/core/clock.o hw/core/qdev-clock.o \
+tests/test-qdev-global-props$(EXESUF): tests/test-qdev-global-props.o hw/core/libhwcore.fa \
$(test-qapi-obj-y)
-tests/test-vmstate$(EXESUF): tests/test-vmstate.o \
- migration/vmstate.o migration/vmstate-types.o migration/qemu-file.o \
- migration/qemu-file-channel.o migration/qjson.o \
+tests/test-vmstate$(EXESUF): tests/test-vmstate.o migration/libmigration.fa \
$(test-io-obj-y)
tests/test-timed-average$(EXESUF): tests/test-timed-average.o $(test-util-obj-y)
tests/test-base64$(EXESUF): tests/test-base64.o $(test-util-obj-y)
@@ -504,26 +296,6 @@ tests/test-qapi-gen-timestamp: \
@rm -f tests/test-qapi-doc.texi
@>$@
-tests/qapi-schema/doc-good.test.texi: $(SRC_PATH)/tests/qapi-schema/doc-good.json $(qapi-py)
- $(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-gen.py \
- -o tests/qapi-schema -p "doc-good-" $<, \
- "GEN","$@")
- @mv tests/qapi-schema/doc-good-qapi-doc.texi $@
- @rm -f tests/qapi-schema/doc-good-qapi-*.[ch] tests/qapi-schema/doc-good-qmp-*.[ch]
-
-tests/qtest/dbus-vmstate1.h tests/qtest/dbus-vmstate1.c: tests/qtest/dbus-vmstate1-gen-timestamp ;
-tests/qtest/dbus-vmstate1-gen-timestamp: $(SRC_PATH)/tests/qtest/dbus-vmstate1.xml
- $(call quiet-command,$(GDBUS_CODEGEN) $< \
- --interface-prefix org.qemu --generate-c-code tests/qtest/dbus-vmstate1, \
- "GEN","$(@:%-timestamp=%)")
- @>$@
-
-tests/qtest/dbus-vmstate-test.o-cflags := -DSRCDIR="$(SRC_PATH)"
-tests/qtest/dbus-vmstate1.o-cflags := $(GIO_CFLAGS)
-tests/qtest/dbus-vmstate1.o-libs := $(GIO_LIBS)
-
-tests/qtest/dbus-vmstate-test.o: tests/qtest/dbus-vmstate1.h
-
tests/test-string-output-visitor$(EXESUF): tests/test-string-output-visitor.o $(test-qapi-obj-y)
tests/test-string-input-visitor$(EXESUF): tests/test-string-input-visitor.o $(test-qapi-obj-y)
tests/test-qmp-event$(EXESUF): tests/test-qmp-event.o $(test-qapi-obj-y) tests/test-qapi-emit-events.o tests/test-qapi-events.o
@@ -538,6 +310,7 @@ tests/test-shift128$(EXESUF): tests/test-shift128.o $(test-util-obj-y)
tests/test-mul64$(EXESUF): tests/test-mul64.o $(test-util-obj-y)
tests/test-bitops$(EXESUF): tests/test-bitops.o $(test-util-obj-y)
tests/test-bitcnt$(EXESUF): tests/test-bitcnt.o $(test-util-obj-y)
+tests/test-qgraph$(EXESUF): tests/test-qgraph.o tests/qtest/libqos/qgraph.o $(test-util-obj-y)
tests/test-crypto-hash$(EXESUF): tests/test-crypto-hash.o $(test-crypto-obj-y)
tests/benchmark-crypto-hash$(EXESUF): tests/benchmark-crypto-hash.o $(test-crypto-obj-y)
tests/test-crypto-hmac$(EXESUF): tests/test-crypto-hmac.o $(test-crypto-obj-y)
@@ -601,10 +374,8 @@ tests/migration/initrd-stress.img: tests/migration/stress$(EXESUF)
rm $(INITRD_WORK_DIR)/init
rmdir $(INITRD_WORK_DIR)
-include $(SRC_PATH)/tests/qtest/Makefile.include
-
-tests/test-qga$(EXESUF): qemu-ga$(EXESUF)
-tests/test-qga$(EXESUF): tests/test-qga.o $(qtest-obj-y)
+tests/test-qga$(EXESUF): qga/qemu-ga$(EXESUF)
+tests/test-qga$(EXESUF): tests/test-qga.o tests/qtest/libqtest.o $(test-util-obj-y)
tests/vhost-user-bridge$(EXESUF): tests/vhost-user-bridge.o $(test-util-obj-y) libvhost-user.a
tests/qemu-iotests/socket_scm_helper$(EXESUF): tests/qemu-iotests/socket_scm_helper.o
@@ -645,14 +416,6 @@ define do_test_tap
"TAP","$@")
endef
-.PHONY: $(patsubst %, check-qtest-%, $(QTEST_TARGETS))
-$(patsubst %, check-qtest-%, $(QTEST_TARGETS)): check-qtest-%: %-softmmu/all $(check-qtest-y)
- $(call do_test_human,$(check-qtest-$*-y:%=tests/qtest/%$(EXESUF)) $(check-qtest-generic-y:%=tests/qtest/%$(EXESUF)), \
- QTEST_QEMU_BINARY=$*-softmmu/qemu-system-$* \
- QTEST_QEMU_IMG=qemu-img$(EXESUF))
-
-build-qtest: $(patsubst %, %-softmmu/all, $(QTEST_TARGETS)) $(check-qtest-y)
-
build-unit: $(check-unit-y)
check-unit: $(check-unit-y)
@@ -663,179 +426,9 @@ check-speed: $(check-speed-y)
# gtester tests with TAP output
-$(patsubst %, check-report-qtest-%.tap, $(QTEST_TARGETS)): check-report-qtest-%.tap: %-softmmu/all $(check-qtest-y)
- $(call do_test_tap, $(check-qtest-$*-y:%=tests/qtest/%$(EXESUF)) $(check-qtest-generic-y:%=tests/qtest/%$(EXESUF)), \
- QTEST_QEMU_BINARY=$*-softmmu/qemu-system-$* \
- QTEST_QEMU_IMG=qemu-img$(EXESUF))
-
check-report-unit.tap: $(check-unit-y)
$(call do_test_tap,$^)
-# Reports and overall runs
-
-check-report.tap: $(patsubst %,check-report-qtest-%.tap, $(QTEST_TARGETS)) check-report-unit.tap
- $(call quiet-command, cat $^ | scripts/tap-merge.pl >$@,"GEN","$@")
-
-# FPU Emulation tests (aka softfloat)
-#
-# As we still have some places that need fixing the rules are a little
-# more complex than they need to be and have to override some of the
-# generic Makefile expansions. Once we are cleanly passing all
-# the tests we can simplify the make syntax.
-
-FP_TEST_BIN=$(BUILD_DIR)/tests/fp/fp-test
-
-# the build dir is created by configure
-$(FP_TEST_BIN): config-host.h $(test-util-obj-y)
- $(call quiet-command, \
- $(MAKE) $(SUBDIR_MAKEFLAGS) -C $(dir $@) V="$(V)" $(notdir $@), \
- "BUILD", "$(notdir $@)")
-
-# The full test suite can take a bit of time, default to a quick run
-# "-l 2 -r all" can take more than a day for some operations and is best
-# run manually
-FP_TL=-l 1 -r all
-
-# $1 = tests, $2 = description, $3 = test flags
-test-softfloat = $(call quiet-command, \
- cd $(BUILD_DIR)/tests/fp && \
- ./fp-test -s $(if $3,$3,$(FP_TL)) $1 > $2.out 2>&1 || \
- (cat $2.out && exit 1;), \
- "FLOAT TEST", $2)
-
-# Conversion Routines: Float to Float
-# FIXME: f32_to_f128 (broken), f64_to_f128 (broken)
-# FIXME: f128_to_f32(broken), f128_to_f64 (broken)
-# FIXME: f128_to_extF80 (broken)
-check-softfloat-conv-f2f: $(FP_TEST_BIN)
- $(call test-softfloat, \
- f16_to_f32 f16_to_f64 \
- f16_to_extF80 f16_to_f128 \
- f32_to_f16 f32_to_f64 \
- f32_to_extF80 \
- f64_to_f16 f64_to_f32 \
- extF80_to_f16 extF80_to_f32 \
- extF80_to_f64 extF80_to_f128 \
- f128_to_f16, \
- float-to-float)
-
-# Conversion Routines: Int and Uint to Float
-# FIXME: i32_to_extF80 (broken), i64_to_extF80 (broken)
-# ui32_to_f128 (not implemented)
-check-softfloat-conv-to-float: $(FP_TEST_BIN)
- $(call test-softfloat, \
- i32_to_f16 i64_to_f16 \
- i32_to_f32 i64_to_f32 \
- i32_to_f64 i64_to_f64 \
- i32_to_f128 i64_to_f128, int-to-float)
- $(call test-softfloat, \
- ui32_to_f16 ui64_to_f16 \
- ui32_to_f32 ui64_to_f32 \
- ui32_to_f64 ui64_to_f64 \
- ui32_to_extF80 ui64_to_extF80 \
- ui64_to_f128, uint-to-float)
-
-# Conversion Routines: Float to integers
-# FIXME: extF80_roundToInt (broken)
-check-softfloat-conv-to-int: $(FP_TEST_BIN)
- $(call test-softfloat, \
- f16_to_i32 f16_to_i32_r_minMag \
- f32_to_i32 f32_to_i32_r_minMag \
- f64_to_i32 f64_to_i32_r_minMag \
- extF80_to_i32 extF80_to_i32_r_minMag \
- f128_to_i32 f128_to_i32_r_minMag \
- f16_to_i64 f16_to_i64_r_minMag \
- f32_to_i64 f32_to_i64_r_minMag \
- f64_to_i64 f64_to_i64_r_minMag \
- extF80_to_i64 extF80_to_i64_r_minMag \
- f128_to_i64 f128_to_i64_r_minMag, \
- float-to-int)
- $(call test-softfloat, \
- f16_to_ui32 f16_to_ui32_r_minMag \
- f32_to_ui32 f32_to_ui32_r_minMag \
- f64_to_ui32 f64_to_ui32_r_minMag \
- extF80_to_ui32 extF80_to_ui32_r_minMag \
- f128_to_ui32 f128_to_ui32_r_minMag \
- f16_to_ui64 f16_to_ui64_r_minMag \
- f32_to_ui64 f32_to_ui64_r_minMag \
- f64_to_ui64 f64_to_ui64_r_minMag \
- extF80_to_ui64 extF80_to_ui64_r_minMag \
- f128_to_ui64 f128_to_ui64_r_minMag, \
- float-to-uint)
- $(call test-softfloat, \
- f16_roundToInt f32_roundToInt \
- f64_roundToInt f128_roundToInt, \
- round-to-integer)
-
-.PHONY: check-softfloat-conv
-check-softfloat-conv: check-softfloat-conv-f2f
-check-softfloat-conv: check-softfloat-conv-to-float
-check-softfloat-conv: check-softfloat-conv-to-int
-
-# Generic rule for all float operations
-#
-# Some patterns are overridden due to broken or missing tests.
-# Hopefully these can be removed over time.
-
-check-softfloat-%: $(FP_TEST_BIN)
- $(call test-softfloat, f16_$* f32_$* f64_$* extF80_$* f128_$*, $*)
-
-# Float Compare routines
-SF_COMPARE_OPS=eq eq_signaling le le_quiet lt_quiet
-SF_COMPARE_RULES=$(patsubst %,check-softfloat-%, $(SF_COMPARE_OPS))
-
-# FIXME: extF80_lt_quiet (broken)
-check-softfloat-lt_quiet: $(FP_TEST_BIN)
- $(call test-softfloat, \
- f16_lt_quiet f32_lt_quiet f64_lt_quiet \
- f128_lt_quiet, \
- lt_quiet)
-
-.PHONY: check-softfloat-compare
-check-softfloat-compare: $(SF_COMPARE_RULES)
-
-# Math Operations
-
-# FIXME: extF80_mulAdd (missing)
-check-softfloat-mulAdd: $(FP_TEST_BIN)
- $(call test-softfloat, \
- f16_mulAdd f32_mulAdd f64_mulAdd f128_mulAdd, \
- mulAdd,-l 1)
-
-# FIXME: extF80_rem (broken)
-check-softfloat-rem: $(FP_TEST_BIN)
- $(call test-softfloat, \
- f16_rem f32_rem f64_rem f128_rem, \
- rem)
-
-SF_MATH_OPS=add sub mul mulAdd div rem sqrt
-SF_MATH_RULES=$(patsubst %,check-softfloat-%, $(SF_MATH_OPS))
-
-.PHONY: check-softfloat-ops
-check-softfloat-ops: $(SF_MATH_RULES)
-
-# Finally a generic rule to test all of softfoat. If TCG isnt't
-# enabled we define a null operation which skips the tests.
-
-.PHONY: check-softfloat
-ifeq ($(CONFIG_TCG),y)
-build-softfloat: $(FP_TEST_BIN)
-check-softfloat: build-softfloat check-softfloat-conv check-softfloat-compare check-softfloat-ops
-else
-build-softfloat check-softfloat:
- $(call quiet-command, /bin/true, "FLOAT TEST", \
- "SKIPPED for non-TCG builds")
-endif
-
-# Plugins
-ifeq ($(CONFIG_PLUGIN),y)
-.PHONY: plugins
-plugins:
- $(call quiet-command,\
- $(MAKE) $(SUBDIR_MAKEFLAGS) -C tests/plugin V="$(V)", \
- "BUILD", "plugins")
-endif
-
# Per guest TCG tests
BUILD_TCG_TARGET_RULES=$(patsubst %,build-tcg-tests-%, $(TARGET_DIRS))
@@ -853,7 +446,7 @@ build-tcg-tests-%: $(if $(CONFIG_PLUGIN),plugins)
V="$(V)" TARGET="$*" guest-tests, \
"BUILD", "TCG tests for $*")
-run-tcg-tests-%: build-tcg-tests-% %/all
+run-tcg-tests-%: build-tcg-tests-% all
$(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) \
-f $(SRC_PATH)/tests/tcg/Makefile.qemu \
SRC_PATH=$(SRC_PATH) SPEED="$(SPEED)" \
@@ -875,32 +468,6 @@ check-tcg: $(RUN_TCG_TARGET_RULES)
.PHONY: clean-tcg
clean-tcg: $(CLEAN_TCG_TARGET_RULES)
-# Other tests
-
-QEMU_IOTESTS_HELPERS-$(call land,$(CONFIG_SOFTMMU),$(CONFIG_LINUX)) = tests/qemu-iotests/socket_scm_helper$(EXESUF)
-
-.PHONY: check-tests/check-block.sh
-check-tests/check-block.sh: tests/check-block.sh qemu-img$(EXESUF) \
- qemu-io$(EXESUF) qemu-nbd$(EXESUF) $(QEMU_IOTESTS_HELPERS-y) \
- $(patsubst %,%/all,$(filter %-softmmu,$(TARGET_DIRS)))
- @$<
-
-.PHONY: check-tests/qapi-schema/frontend
-check-tests/qapi-schema/frontend: $(addprefix $(SRC_PATH)/, $(check-qapi-schema-y))
- $(call quiet-command, PYTHONPATH=$(SRC_PATH)/scripts \
- PYTHONIOENCODING=utf-8 $(PYTHON) $(SRC_PATH)/tests/qapi-schema/test-qapi.py $^, \
- TEST, check-qapi-schema)
-
-.PHONY: check-tests/qapi-schema/doc-good.texi
-check-tests/qapi-schema/doc-good.texi: tests/qapi-schema/doc-good.test.texi
- @diff -u $(SRC_PATH)/tests/qapi-schema/doc-good.texi $<
-
-.PHONY: check-decodetree
-check-decodetree:
- $(call quiet-command, \
- cd $(SRC_PATH)/tests/decode && \
- ./check.sh "$(PYTHON)" "$(SRC_PATH)/scripts/decodetree.py", \
- TEST, decodetree.py)
# Python venv for running tests
@@ -955,31 +522,21 @@ check-acceptance: check-venv $(TESTS_RESULTS_DIR) get-vm-images
# Consolidated targets
-.PHONY: check-block check-qapi-schema check-qtest check-unit check check-clean get-vm-images
-check-qapi-schema: check-tests/qapi-schema/frontend check-tests/qapi-schema/doc-good.texi
-check-qtest: $(patsubst %,check-qtest-%, $(QTEST_TARGETS))
-ifeq ($(CONFIG_TOOLS),y)
-check-block: $(patsubst %,check-%, $(check-block-y))
-endif
-check-build: build-unit build-softfloat build-qtest
+.PHONY: check-block check-unit check check-clean get-vm-images
+check-block:
+check-build: build-unit
check-clean:
rm -rf $(check-unit-y) tests/*.o tests/*/*.o $(QEMU_IOTESTS_HELPERS-y)
- rm -rf $(sort $(foreach target,$(SYSEMU_TARGET_LIST), $(check-qtest-$(target)-y:%=tests/qtest/%$(EXESUF))) $(check-qtest-generic-y:%=tests/qtest/%$(EXESUF)))
rm -f tests/test-qapi-gen-timestamp
- rm -f tests/qtest/dbus-vmstate1-gen-timestamp
rm -rf $(TESTS_VENV_DIR) $(TESTS_RESULTS_DIR)
-check: check-block check-qapi-schema check-unit check-softfloat check-qtest check-decodetree
+check: check-unit
clean: check-clean
# Build the help program automatically
-all: $(QEMU_IOTESTS_HELPERS-y)
-
-include $(wildcard tests/*.d)
--include $(wildcard tests/qtest/*.d)
--include $(wildcard tests/qtest/libqos/*.d)
endif
diff --git a/tests/acceptance/avocado_qemu/__init__.py b/tests/acceptance/avocado_qemu/__init__.py
index 77d1c1d..db9c0f5 100644
--- a/tests/acceptance/avocado_qemu/__init__.py
+++ b/tests/acceptance/avocado_qemu/__init__.py
@@ -57,8 +57,7 @@ def pick_default_qemu_bin(arch=None):
# qemu binary path does not match arch for powerpc, handle it
if 'ppc64le' in arch:
arch = 'ppc64'
- qemu_bin_relative_path = os.path.join("%s-softmmu" % arch,
- "qemu-system-%s" % arch)
+ qemu_bin_relative_path = "./qemu-system-%s" % arch
if is_readable_executable_file(qemu_bin_relative_path):
return qemu_bin_relative_path
diff --git a/tests/data/acpi/rebuild-expected-aml.sh b/tests/data/acpi/rebuild-expected-aml.sh
index 76cd797..fc78770 100755
--- a/tests/data/acpi/rebuild-expected-aml.sh
+++ b/tests/data/acpi/rebuild-expected-aml.sh
@@ -12,7 +12,7 @@
# This work is licensed under the terms of the GNU GPLv2.
# See the COPYING.LIB file in the top-level directory.
-qemu_bins="x86_64-softmmu/qemu-system-x86_64 aarch64-softmmu/qemu-system-aarch64"
+qemu_bins="./qemu-system-x86_64 ./qemu-system-aarch64"
if [ ! -e "tests/qtest/bios-tables-test" ]; then
echo "Test: bios-tables-test is required! Run make check before this script."
diff --git a/tests/docker/test-static b/tests/docker/test-static
new file mode 100755
index 0000000..372ef6f
--- /dev/null
+++ b/tests/docker/test-static
@@ -0,0 +1,24 @@
+#!/bin/bash -e
+#
+# Compile QEMU user mode emulators as static binaries on Linux.
+#
+# Copyright (c) 2020 Red Hat Inc.
+#
+# Authors:
+# Paolo Bonzini <pbonzini@redhat.com>
+#
+# This work is licensed under the terms of the GNU GPL, version 2
+# or (at your option) any later version. See the COPYING file in
+# the top-level directory.
+
+. common.rc
+
+cd "$BUILD_DIR"
+
+build_qemu \
+ --disable-system \
+ --disable-tools \
+ --disable-guest-agent \
+ --disable-docs \
+ --static
+install_qemu
diff --git a/tests/fp/Makefile b/tests/fp/Makefile
deleted file mode 100644
index 56768ec..0000000
--- a/tests/fp/Makefile
+++ /dev/null
@@ -1,600 +0,0 @@
-BUILD_DIR := $(CURDIR)/../..
-
-include $(BUILD_DIR)/config-host.mak
-include $(SRC_PATH)/rules.mak
-
-SOFTFLOAT_DIR := $(SRC_PATH)/tests/fp/berkeley-softfloat-3
-TESTFLOAT_DIR := $(SRC_PATH)/tests/fp/berkeley-testfloat-3
-
-SF_SOURCE_DIR := $(SOFTFLOAT_DIR)/source
-SF_INCLUDE_DIR := $(SOFTFLOAT_DIR)/source/include
-# we could use any specialize here, it doesn't matter
-SF_SPECIALIZE := 8086-SSE
-SF_SPECIALIZE_DIR := $(SF_SOURCE_DIR)/$(SF_SPECIALIZE)
-
-TF_SOURCE_DIR := $(TESTFLOAT_DIR)/source
-
-$(call set-vpath, $(SRC_PATH)/fpu $(SRC_PATH)/tests/fp)
-
-LIBQEMUUTIL := $(BUILD_DIR)/libqemuutil.a
-
-# Use this variable to be clear when we pull in our own implementation
-# We build the object with a default rule thanks to the vpath above
-QEMU_SOFTFLOAT_OBJ := softfloat.o
-
-QEMU_INCLUDES += -I$(SRC_PATH)/tests/fp
-QEMU_INCLUDES += -I$(SF_INCLUDE_DIR)
-QEMU_INCLUDES += -I$(SF_SPECIALIZE_DIR)
-QEMU_INCLUDES += -I$(TF_SOURCE_DIR)
-
-# work around TARGET_* poisoning
-QEMU_CFLAGS += -DHW_POISON_H
-# define a target to match testfloat's implementation-defined choices, such as
-# whether to raise the invalid flag when dealing with NaNs in muladd.
-QEMU_CFLAGS += -DTARGET_ARM
-
-# capstone has a platform.h file that clashes with softfloat's
-QEMU_CFLAGS := $(filter-out %capstone, $(QEMU_CFLAGS))
-
-# softfloat defines
-SF_OPTS :=
-SF_OPTS += -DSOFTFLOAT_ROUND_ODD
-SF_OPTS += -DINLINE_LEVEL=5
-SF_OPTS += -DSOFTFLOAT_FAST_DIV32TO16
-SF_OPTS += -DSOFTFLOAT_FAST_DIV64TO32
-SF_OPTS += -DSOFTFLOAT_FAST_INT64
-QEMU_CFLAGS += $(SF_OPTS)
-
-# silence the build of softfloat objects
-SF_CFLAGS += -Wno-missing-prototypes
-SF_CFLAGS += -Wno-redundant-decls
-SF_CFLAGS += -Wno-return-type
-SF_CFLAGS += -Wno-error
-
-# testfloat defines
-TF_OPTS :=
-TF_OPTS += -DFLOAT16
-TF_OPTS += -DFLOAT64
-TF_OPTS += -DEXTFLOAT80
-TF_OPTS += -DFLOAT128
-TF_OPTS += -DFLOAT_ROUND_ODD
-TF_OPTS += -DLONG_DOUBLE_IS_EXTFLOAT80
-QEMU_CFLAGS += $(TF_OPTS)
-
-# silence the build of testfloat objects
-TF_CFLAGS :=
-TF_CFLAGS += -Wno-strict-prototypes
-TF_CFLAGS += -Wno-unknown-pragmas
-TF_CFLAGS += -Wno-uninitialized
-TF_CFLAGS += -Wno-missing-prototypes
-TF_CFLAGS += -Wno-return-type
-TF_CFLAGS += -Wno-unused-function
-TF_CFLAGS += -Wno-error
-
-# softfloat objects
-SF_OBJS_PRIMITIVES :=
-SF_OBJS_PRIMITIVES += s_eq128.o
-SF_OBJS_PRIMITIVES += s_le128.o
-SF_OBJS_PRIMITIVES += s_lt128.o
-SF_OBJS_PRIMITIVES += s_shortShiftLeft128.o
-SF_OBJS_PRIMITIVES += s_shortShiftRight128.o
-SF_OBJS_PRIMITIVES += s_shortShiftRightJam64.o
-SF_OBJS_PRIMITIVES += s_shortShiftRightJam64Extra.o
-SF_OBJS_PRIMITIVES += s_shortShiftRightJam128.o
-SF_OBJS_PRIMITIVES += s_shortShiftRightJam128Extra.o
-SF_OBJS_PRIMITIVES += s_shiftRightJam32.o
-SF_OBJS_PRIMITIVES += s_shiftRightJam64.o
-SF_OBJS_PRIMITIVES += s_shiftRightJam64Extra.o
-SF_OBJS_PRIMITIVES += s_shiftRightJam128.o
-SF_OBJS_PRIMITIVES += s_shiftRightJam128Extra.o
-SF_OBJS_PRIMITIVES += s_shiftRightJam256M.o
-SF_OBJS_PRIMITIVES += s_countLeadingZeros8.o
-SF_OBJS_PRIMITIVES += s_countLeadingZeros16.o
-SF_OBJS_PRIMITIVES += s_countLeadingZeros32.o
-SF_OBJS_PRIMITIVES += s_countLeadingZeros64.o
-SF_OBJS_PRIMITIVES += s_add128.o
-SF_OBJS_PRIMITIVES += s_add256M.o
-SF_OBJS_PRIMITIVES += s_sub128.o
-SF_OBJS_PRIMITIVES += s_sub256M.o
-SF_OBJS_PRIMITIVES += s_mul64ByShifted32To128.o
-SF_OBJS_PRIMITIVES += s_mul64To128.o
-SF_OBJS_PRIMITIVES += s_mul128By32.o
-SF_OBJS_PRIMITIVES += s_mul128To256M.o
-SF_OBJS_PRIMITIVES += s_approxRecip_1Ks.o
-SF_OBJS_PRIMITIVES += s_approxRecip32_1.o
-SF_OBJS_PRIMITIVES += s_approxRecipSqrt_1Ks.o
-SF_OBJS_PRIMITIVES += s_approxRecipSqrt32_1.o
-
-SF_OBJS_SPECIALIZE :=
-SF_OBJS_SPECIALIZE += softfloat_raiseFlags.o
-SF_OBJS_SPECIALIZE += s_f16UIToCommonNaN.o
-SF_OBJS_SPECIALIZE += s_commonNaNToF16UI.o
-SF_OBJS_SPECIALIZE += s_propagateNaNF16UI.o
-SF_OBJS_SPECIALIZE += s_f32UIToCommonNaN.o
-SF_OBJS_SPECIALIZE += s_commonNaNToF32UI.o
-SF_OBJS_SPECIALIZE += s_propagateNaNF32UI.o
-SF_OBJS_SPECIALIZE += s_f64UIToCommonNaN.o
-SF_OBJS_SPECIALIZE += s_commonNaNToF64UI.o
-SF_OBJS_SPECIALIZE += s_propagateNaNF64UI.o
-SF_OBJS_SPECIALIZE += extF80M_isSignalingNaN.o
-SF_OBJS_SPECIALIZE += s_extF80UIToCommonNaN.o
-SF_OBJS_SPECIALIZE += s_commonNaNToExtF80UI.o
-SF_OBJS_SPECIALIZE += s_propagateNaNExtF80UI.o
-SF_OBJS_SPECIALIZE += f128M_isSignalingNaN.o
-SF_OBJS_SPECIALIZE += s_f128UIToCommonNaN.o
-SF_OBJS_SPECIALIZE += s_commonNaNToF128UI.o
-SF_OBJS_SPECIALIZE += s_propagateNaNF128UI.o
-
-SF_OBJS_OTHERS :=
-SF_OBJS_OTHERS += s_roundToUI32.o
-SF_OBJS_OTHERS += s_roundToUI64.o
-SF_OBJS_OTHERS += s_roundToI32.o
-SF_OBJS_OTHERS += s_roundToI64.o
-SF_OBJS_OTHERS += s_normSubnormalF16Sig.o
-SF_OBJS_OTHERS += s_roundPackToF16.o
-SF_OBJS_OTHERS += s_normRoundPackToF16.o
-SF_OBJS_OTHERS += s_addMagsF16.o
-SF_OBJS_OTHERS += s_subMagsF16.o
-SF_OBJS_OTHERS += s_mulAddF16.o
-SF_OBJS_OTHERS += s_normSubnormalF32Sig.o
-SF_OBJS_OTHERS += s_roundPackToF32.o
-SF_OBJS_OTHERS += s_normRoundPackToF32.o
-SF_OBJS_OTHERS += s_addMagsF32.o
-SF_OBJS_OTHERS += s_subMagsF32.o
-SF_OBJS_OTHERS += s_mulAddF32.o
-SF_OBJS_OTHERS += s_normSubnormalF64Sig.o
-SF_OBJS_OTHERS += s_roundPackToF64.o
-SF_OBJS_OTHERS += s_normRoundPackToF64.o
-SF_OBJS_OTHERS += s_addMagsF64.o
-SF_OBJS_OTHERS += s_subMagsF64.o
-SF_OBJS_OTHERS += s_mulAddF64.o
-SF_OBJS_OTHERS += s_normSubnormalExtF80Sig.o
-SF_OBJS_OTHERS += s_roundPackToExtF80.o
-SF_OBJS_OTHERS += s_normRoundPackToExtF80.o
-SF_OBJS_OTHERS += s_addMagsExtF80.o
-SF_OBJS_OTHERS += s_subMagsExtF80.o
-SF_OBJS_OTHERS += s_normSubnormalF128Sig.o
-SF_OBJS_OTHERS += s_roundPackToF128.o
-SF_OBJS_OTHERS += s_normRoundPackToF128.o
-SF_OBJS_OTHERS += s_addMagsF128.o
-SF_OBJS_OTHERS += s_subMagsF128.o
-SF_OBJS_OTHERS += s_mulAddF128.o
-SF_OBJS_OTHERS += softfloat_state.o
-SF_OBJS_OTHERS += ui32_to_f16.o
-SF_OBJS_OTHERS += ui32_to_f32.o
-SF_OBJS_OTHERS += ui32_to_f64.o
-SF_OBJS_OTHERS += ui32_to_extF80.o
-SF_OBJS_OTHERS += ui32_to_extF80M.o
-SF_OBJS_OTHERS += ui32_to_f128.o
-SF_OBJS_OTHERS += ui32_to_f128M.o
-SF_OBJS_OTHERS += ui64_to_f16.o
-SF_OBJS_OTHERS += ui64_to_f32.o
-SF_OBJS_OTHERS += ui64_to_f64.o
-SF_OBJS_OTHERS += ui64_to_extF80.o
-SF_OBJS_OTHERS += ui64_to_extF80M.o
-SF_OBJS_OTHERS += ui64_to_f128.o
-SF_OBJS_OTHERS += ui64_to_f128M.o
-SF_OBJS_OTHERS += i32_to_f16.o
-SF_OBJS_OTHERS += i32_to_f32.o
-SF_OBJS_OTHERS += i32_to_f64.o
-SF_OBJS_OTHERS += i32_to_extF80.o
-SF_OBJS_OTHERS += i32_to_extF80M.o
-SF_OBJS_OTHERS += i32_to_f128.o
-SF_OBJS_OTHERS += i32_to_f128M.o
-SF_OBJS_OTHERS += i64_to_f16.o
-SF_OBJS_OTHERS += i64_to_f32.o
-SF_OBJS_OTHERS += i64_to_f64.o
-SF_OBJS_OTHERS += i64_to_extF80.o
-SF_OBJS_OTHERS += i64_to_extF80M.o
-SF_OBJS_OTHERS += i64_to_f128.o
-SF_OBJS_OTHERS += i64_to_f128M.o
-SF_OBJS_OTHERS += f16_to_ui32.o
-SF_OBJS_OTHERS += f16_to_ui64.o
-SF_OBJS_OTHERS += f16_to_i32.o
-SF_OBJS_OTHERS += f16_to_i64.o
-SF_OBJS_OTHERS += f16_to_ui32_r_minMag.o
-SF_OBJS_OTHERS += f16_to_ui64_r_minMag.o
-SF_OBJS_OTHERS += f16_to_i32_r_minMag.o
-SF_OBJS_OTHERS += f16_to_i64_r_minMag.o
-SF_OBJS_OTHERS += f16_to_f32.o
-SF_OBJS_OTHERS += f16_to_f64.o
-SF_OBJS_OTHERS += f16_to_extF80.o
-SF_OBJS_OTHERS += f16_to_extF80M.o
-SF_OBJS_OTHERS += f16_to_f128.o
-SF_OBJS_OTHERS += f16_to_f128M.o
-SF_OBJS_OTHERS += f16_roundToInt.o
-SF_OBJS_OTHERS += f16_add.o
-SF_OBJS_OTHERS += f16_sub.o
-SF_OBJS_OTHERS += f16_mul.o
-SF_OBJS_OTHERS += f16_mulAdd.o
-SF_OBJS_OTHERS += f16_div.o
-SF_OBJS_OTHERS += f16_rem.o
-SF_OBJS_OTHERS += f16_sqrt.o
-SF_OBJS_OTHERS += f16_eq.o
-SF_OBJS_OTHERS += f16_le.o
-SF_OBJS_OTHERS += f16_lt.o
-SF_OBJS_OTHERS += f16_eq_signaling.o
-SF_OBJS_OTHERS += f16_le_quiet.o
-SF_OBJS_OTHERS += f16_lt_quiet.o
-SF_OBJS_OTHERS += f16_isSignalingNaN.o
-SF_OBJS_OTHERS += f32_to_ui32.o
-SF_OBJS_OTHERS += f32_to_ui64.o
-SF_OBJS_OTHERS += f32_to_i32.o
-SF_OBJS_OTHERS += f32_to_i64.o
-SF_OBJS_OTHERS += f32_to_ui32_r_minMag.o
-SF_OBJS_OTHERS += f32_to_ui64_r_minMag.o
-SF_OBJS_OTHERS += f32_to_i32_r_minMag.o
-SF_OBJS_OTHERS += f32_to_i64_r_minMag.o
-SF_OBJS_OTHERS += f32_to_f16.o
-SF_OBJS_OTHERS += f32_to_f64.o
-SF_OBJS_OTHERS += f32_to_extF80.o
-SF_OBJS_OTHERS += f32_to_extF80M.o
-SF_OBJS_OTHERS += f32_to_f128.o
-SF_OBJS_OTHERS += f32_to_f128M.o
-SF_OBJS_OTHERS += f32_roundToInt.o
-SF_OBJS_OTHERS += f32_add.o
-SF_OBJS_OTHERS += f32_sub.o
-SF_OBJS_OTHERS += f32_mul.o
-SF_OBJS_OTHERS += f32_mulAdd.o
-SF_OBJS_OTHERS += f32_div.o
-SF_OBJS_OTHERS += f32_rem.o
-SF_OBJS_OTHERS += f32_sqrt.o
-SF_OBJS_OTHERS += f32_eq.o
-SF_OBJS_OTHERS += f32_le.o
-SF_OBJS_OTHERS += f32_lt.o
-SF_OBJS_OTHERS += f32_eq_signaling.o
-SF_OBJS_OTHERS += f32_le_quiet.o
-SF_OBJS_OTHERS += f32_lt_quiet.o
-SF_OBJS_OTHERS += f32_isSignalingNaN.o
-SF_OBJS_OTHERS += f64_to_ui32.o
-SF_OBJS_OTHERS += f64_to_ui64.o
-SF_OBJS_OTHERS += f64_to_i32.o
-SF_OBJS_OTHERS += f64_to_i64.o
-SF_OBJS_OTHERS += f64_to_ui32_r_minMag.o
-SF_OBJS_OTHERS += f64_to_ui64_r_minMag.o
-SF_OBJS_OTHERS += f64_to_i32_r_minMag.o
-SF_OBJS_OTHERS += f64_to_i64_r_minMag.o
-SF_OBJS_OTHERS += f64_to_f16.o
-SF_OBJS_OTHERS += f64_to_f32.o
-SF_OBJS_OTHERS += f64_to_extF80.o
-SF_OBJS_OTHERS += f64_to_extF80M.o
-SF_OBJS_OTHERS += f64_to_f128.o
-SF_OBJS_OTHERS += f64_to_f128M.o
-SF_OBJS_OTHERS += f64_roundToInt.o
-SF_OBJS_OTHERS += f64_add.o
-SF_OBJS_OTHERS += f64_sub.o
-SF_OBJS_OTHERS += f64_mul.o
-SF_OBJS_OTHERS += f64_mulAdd.o
-SF_OBJS_OTHERS += f64_div.o
-SF_OBJS_OTHERS += f64_rem.o
-SF_OBJS_OTHERS += f64_sqrt.o
-SF_OBJS_OTHERS += f64_eq.o
-SF_OBJS_OTHERS += f64_le.o
-SF_OBJS_OTHERS += f64_lt.o
-SF_OBJS_OTHERS += f64_eq_signaling.o
-SF_OBJS_OTHERS += f64_le_quiet.o
-SF_OBJS_OTHERS += f64_lt_quiet.o
-SF_OBJS_OTHERS += f64_isSignalingNaN.o
-SF_OBJS_OTHERS += extF80_to_ui32.o
-SF_OBJS_OTHERS += extF80_to_ui64.o
-SF_OBJS_OTHERS += extF80_to_i32.o
-SF_OBJS_OTHERS += extF80_to_i64.o
-SF_OBJS_OTHERS += extF80_to_ui32_r_minMag.o
-SF_OBJS_OTHERS += extF80_to_ui64_r_minMag.o
-SF_OBJS_OTHERS += extF80_to_i32_r_minMag.o
-SF_OBJS_OTHERS += extF80_to_i64_r_minMag.o
-SF_OBJS_OTHERS += extF80_to_f16.o
-SF_OBJS_OTHERS += extF80_to_f32.o
-SF_OBJS_OTHERS += extF80_to_f64.o
-SF_OBJS_OTHERS += extF80_to_f128.o
-SF_OBJS_OTHERS += extF80_roundToInt.o
-SF_OBJS_OTHERS += extF80_add.o
-SF_OBJS_OTHERS += extF80_sub.o
-SF_OBJS_OTHERS += extF80_mul.o
-SF_OBJS_OTHERS += extF80_div.o
-SF_OBJS_OTHERS += extF80_rem.o
-SF_OBJS_OTHERS += extF80_sqrt.o
-SF_OBJS_OTHERS += extF80_eq.o
-SF_OBJS_OTHERS += extF80_le.o
-SF_OBJS_OTHERS += extF80_lt.o
-SF_OBJS_OTHERS += extF80_eq_signaling.o
-SF_OBJS_OTHERS += extF80_le_quiet.o
-SF_OBJS_OTHERS += extF80_lt_quiet.o
-SF_OBJS_OTHERS += extF80_isSignalingNaN.o
-SF_OBJS_OTHERS += extF80M_to_ui32.o
-SF_OBJS_OTHERS += extF80M_to_ui64.o
-SF_OBJS_OTHERS += extF80M_to_i32.o
-SF_OBJS_OTHERS += extF80M_to_i64.o
-SF_OBJS_OTHERS += extF80M_to_ui32_r_minMag.o
-SF_OBJS_OTHERS += extF80M_to_ui64_r_minMag.o
-SF_OBJS_OTHERS += extF80M_to_i32_r_minMag.o
-SF_OBJS_OTHERS += extF80M_to_i64_r_minMag.o
-SF_OBJS_OTHERS += extF80M_to_f16.o
-SF_OBJS_OTHERS += extF80M_to_f32.o
-SF_OBJS_OTHERS += extF80M_to_f64.o
-SF_OBJS_OTHERS += extF80M_to_f128M.o
-SF_OBJS_OTHERS += extF80M_roundToInt.o
-SF_OBJS_OTHERS += extF80M_add.o
-SF_OBJS_OTHERS += extF80M_sub.o
-SF_OBJS_OTHERS += extF80M_mul.o
-SF_OBJS_OTHERS += extF80M_div.o
-SF_OBJS_OTHERS += extF80M_rem.o
-SF_OBJS_OTHERS += extF80M_sqrt.o
-SF_OBJS_OTHERS += extF80M_eq.o
-SF_OBJS_OTHERS += extF80M_le.o
-SF_OBJS_OTHERS += extF80M_lt.o
-SF_OBJS_OTHERS += extF80M_eq_signaling.o
-SF_OBJS_OTHERS += extF80M_le_quiet.o
-SF_OBJS_OTHERS += extF80M_lt_quiet.o
-SF_OBJS_OTHERS += f128_to_ui32.o
-SF_OBJS_OTHERS += f128_to_ui64.o
-SF_OBJS_OTHERS += f128_to_i32.o
-SF_OBJS_OTHERS += f128_to_i64.o
-SF_OBJS_OTHERS += f128_to_ui32_r_minMag.o
-SF_OBJS_OTHERS += f128_to_ui64_r_minMag.o
-SF_OBJS_OTHERS += f128_to_i32_r_minMag.o
-SF_OBJS_OTHERS += f128_to_i64_r_minMag.o
-SF_OBJS_OTHERS += f128_to_f16.o
-SF_OBJS_OTHERS += f128_to_f32.o
-SF_OBJS_OTHERS += f128_to_extF80.o
-SF_OBJS_OTHERS += f128_to_f64.o
-SF_OBJS_OTHERS += f128_roundToInt.o
-SF_OBJS_OTHERS += f128_add.o
-SF_OBJS_OTHERS += f128_sub.o
-SF_OBJS_OTHERS += f128_mul.o
-SF_OBJS_OTHERS += f128_mulAdd.o
-SF_OBJS_OTHERS += f128_div.o
-SF_OBJS_OTHERS += f128_rem.o
-SF_OBJS_OTHERS += f128_sqrt.o
-SF_OBJS_OTHERS += f128_eq.o
-SF_OBJS_OTHERS += f128_le.o
-SF_OBJS_OTHERS += f128_lt.o
-SF_OBJS_OTHERS += f128_eq_signaling.o
-SF_OBJS_OTHERS += f128_le_quiet.o
-SF_OBJS_OTHERS += f128_lt_quiet.o
-SF_OBJS_OTHERS += f128_isSignalingNaN.o
-SF_OBJS_OTHERS += f128M_to_ui32.o
-SF_OBJS_OTHERS += f128M_to_ui64.o
-SF_OBJS_OTHERS += f128M_to_i32.o
-SF_OBJS_OTHERS += f128M_to_i64.o
-SF_OBJS_OTHERS += f128M_to_ui32_r_minMag.o
-SF_OBJS_OTHERS += f128M_to_ui64_r_minMag.o
-SF_OBJS_OTHERS += f128M_to_i32_r_minMag.o
-SF_OBJS_OTHERS += f128M_to_i64_r_minMag.o
-SF_OBJS_OTHERS += f128M_to_f16.o
-SF_OBJS_OTHERS += f128M_to_f32.o
-SF_OBJS_OTHERS += f128M_to_extF80M.o
-SF_OBJS_OTHERS += f128M_to_f64.o
-SF_OBJS_OTHERS += f128M_roundToInt.o
-SF_OBJS_OTHERS += f128M_add.o
-SF_OBJS_OTHERS += f128M_sub.o
-SF_OBJS_OTHERS += f128M_mul.o
-SF_OBJS_OTHERS += f128M_mulAdd.o
-SF_OBJS_OTHERS += f128M_div.o
-SF_OBJS_OTHERS += f128M_rem.o
-SF_OBJS_OTHERS += f128M_sqrt.o
-SF_OBJS_OTHERS += f128M_eq.o
-SF_OBJS_OTHERS += f128M_le.o
-SF_OBJS_OTHERS += f128M_lt.o
-SF_OBJS_OTHERS += f128M_eq_signaling.o
-SF_OBJS_OTHERS += f128M_le_quiet.o
-SF_OBJS_OTHERS += f128M_lt_quiet.o
-
-SF_OBJS_ALL_NOSPEC :=
-SF_OBJS_ALL_NOSPEC += $(SF_OBJS_PRIMITIVES)
-SF_OBJS_ALL_NOSPEC += $(SF_OBJS_OTHERS)
-
-SF_OBJS_ALL :=
-SF_OBJS_ALL += $(SF_OBJS_ALL_NOSPEC)
-SF_OBJS_ALL += $(SF_OBJS_SPECIALIZE)
-
-# testfloat objects
-TF_OBJS_GENCASES :=
-TF_OBJS_GENCASES += genCases_ui32.o
-TF_OBJS_GENCASES += genCases_ui64.o
-TF_OBJS_GENCASES += genCases_i32.o
-TF_OBJS_GENCASES += genCases_i64.o
-TF_OBJS_GENCASES += genCases_f16.o
-TF_OBJS_GENCASES += genCases_f32.o
-TF_OBJS_GENCASES += genCases_f64.o
-TF_OBJS_GENCASES += genCases_extF80.o
-TF_OBJS_GENCASES += genCases_f128.o
-
-TF_OBJS_WRITECASE :=
-TF_OBJS_WRITECASE += writeCase_a_ui32.o
-TF_OBJS_WRITECASE += writeCase_a_ui64.o
-TF_OBJS_WRITECASE += writeCase_a_f16.o
-TF_OBJS_WRITECASE += writeCase_ab_f16.o
-TF_OBJS_WRITECASE += writeCase_abc_f16.o
-TF_OBJS_WRITECASE += writeCase_a_f32.o
-TF_OBJS_WRITECASE += writeCase_ab_f32.o
-TF_OBJS_WRITECASE += writeCase_abc_f32.o
-TF_OBJS_WRITECASE += writeCase_a_f64.o
-TF_OBJS_WRITECASE += writeCase_ab_f64.o
-TF_OBJS_WRITECASE += writeCase_abc_f64.o
-TF_OBJS_WRITECASE += writeCase_a_extF80M.o
-TF_OBJS_WRITECASE += writeCase_ab_extF80M.o
-TF_OBJS_WRITECASE += writeCase_a_f128M.o
-TF_OBJS_WRITECASE += writeCase_ab_f128M.o
-TF_OBJS_WRITECASE += writeCase_abc_f128M.o
-TF_OBJS_WRITECASE += writeCase_z_bool.o
-TF_OBJS_WRITECASE += writeCase_z_ui32.o
-TF_OBJS_WRITECASE += writeCase_z_ui64.o
-TF_OBJS_WRITECASE += writeCase_z_f16.o
-TF_OBJS_WRITECASE += writeCase_z_f32.o
-TF_OBJS_WRITECASE += writeCase_z_f64.o
-TF_OBJS_WRITECASE += writeCase_z_extF80M.o
-TF_OBJS_WRITECASE += writeCase_z_f128M.o
-
-TF_OBJS_TEST :=
-TF_OBJS_TEST += test_a_ui32_z_f16.o
-TF_OBJS_TEST += test_a_ui32_z_f32.o
-TF_OBJS_TEST += test_a_ui32_z_f64.o
-TF_OBJS_TEST += test_a_ui32_z_extF80.o
-TF_OBJS_TEST += test_a_ui32_z_f128.o
-TF_OBJS_TEST += test_a_ui64_z_f16.o
-TF_OBJS_TEST += test_a_ui64_z_f32.o
-TF_OBJS_TEST += test_a_ui64_z_f64.o
-TF_OBJS_TEST += test_a_ui64_z_extF80.o
-TF_OBJS_TEST += test_a_ui64_z_f128.o
-TF_OBJS_TEST += test_a_i32_z_f16.o
-TF_OBJS_TEST += test_a_i32_z_f32.o
-TF_OBJS_TEST += test_a_i32_z_f64.o
-TF_OBJS_TEST += test_a_i32_z_extF80.o
-TF_OBJS_TEST += test_a_i32_z_f128.o
-TF_OBJS_TEST += test_a_i64_z_f16.o
-TF_OBJS_TEST += test_a_i64_z_f32.o
-TF_OBJS_TEST += test_a_i64_z_f64.o
-TF_OBJS_TEST += test_a_i64_z_extF80.o
-TF_OBJS_TEST += test_a_i64_z_f128.o
-TF_OBJS_TEST += test_a_f16_z_ui32_rx.o
-TF_OBJS_TEST += test_a_f16_z_ui64_rx.o
-TF_OBJS_TEST += test_a_f16_z_i32_rx.o
-TF_OBJS_TEST += test_a_f16_z_i64_rx.o
-TF_OBJS_TEST += test_a_f16_z_ui32_x.o
-TF_OBJS_TEST += test_a_f16_z_ui64_x.o
-TF_OBJS_TEST += test_a_f16_z_i32_x.o
-TF_OBJS_TEST += test_a_f16_z_i64_x.o
-TF_OBJS_TEST += test_a_f16_z_f32.o
-TF_OBJS_TEST += test_a_f16_z_f64.o
-TF_OBJS_TEST += test_a_f16_z_extF80.o
-TF_OBJS_TEST += test_a_f16_z_f128.o
-TF_OBJS_TEST += test_az_f16.o
-TF_OBJS_TEST += test_az_f16_rx.o
-TF_OBJS_TEST += test_abz_f16.o
-TF_OBJS_TEST += test_abcz_f16.o
-TF_OBJS_TEST += test_ab_f16_z_bool.o
-TF_OBJS_TEST += test_a_f32_z_ui32_rx.o
-TF_OBJS_TEST += test_a_f32_z_ui64_rx.o
-TF_OBJS_TEST += test_a_f32_z_i32_rx.o
-TF_OBJS_TEST += test_a_f32_z_i64_rx.o
-TF_OBJS_TEST += test_a_f32_z_ui32_x.o
-TF_OBJS_TEST += test_a_f32_z_ui64_x.o
-TF_OBJS_TEST += test_a_f32_z_i32_x.o
-TF_OBJS_TEST += test_a_f32_z_i64_x.o
-TF_OBJS_TEST += test_a_f32_z_f16.o
-TF_OBJS_TEST += test_a_f32_z_f64.o
-TF_OBJS_TEST += test_a_f32_z_extF80.o
-TF_OBJS_TEST += test_a_f32_z_f128.o
-TF_OBJS_TEST += test_az_f32.o
-TF_OBJS_TEST += test_az_f32_rx.o
-TF_OBJS_TEST += test_abz_f32.o
-TF_OBJS_TEST += test_abcz_f32.o
-TF_OBJS_TEST += test_ab_f32_z_bool.o
-TF_OBJS_TEST += test_a_f64_z_ui32_rx.o
-TF_OBJS_TEST += test_a_f64_z_ui64_rx.o
-TF_OBJS_TEST += test_a_f64_z_i32_rx.o
-TF_OBJS_TEST += test_a_f64_z_i64_rx.o
-TF_OBJS_TEST += test_a_f64_z_ui32_x.o
-TF_OBJS_TEST += test_a_f64_z_ui64_x.o
-TF_OBJS_TEST += test_a_f64_z_i32_x.o
-TF_OBJS_TEST += test_a_f64_z_i64_x.o
-TF_OBJS_TEST += test_a_f64_z_f16.o
-TF_OBJS_TEST += test_a_f64_z_f32.o
-TF_OBJS_TEST += test_a_f64_z_extF80.o
-TF_OBJS_TEST += test_a_f64_z_f128.o
-TF_OBJS_TEST += test_az_f64.o
-TF_OBJS_TEST += test_az_f64_rx.o
-TF_OBJS_TEST += test_abz_f64.o
-TF_OBJS_TEST += test_abcz_f64.o
-TF_OBJS_TEST += test_ab_f64_z_bool.o
-TF_OBJS_TEST += test_a_extF80_z_ui32_rx.o
-TF_OBJS_TEST += test_a_extF80_z_ui64_rx.o
-TF_OBJS_TEST += test_a_extF80_z_i32_rx.o
-TF_OBJS_TEST += test_a_extF80_z_i64_rx.o
-TF_OBJS_TEST += test_a_extF80_z_ui32_x.o
-TF_OBJS_TEST += test_a_extF80_z_ui64_x.o
-TF_OBJS_TEST += test_a_extF80_z_i32_x.o
-TF_OBJS_TEST += test_a_extF80_z_i64_x.o
-TF_OBJS_TEST += test_a_extF80_z_f16.o
-TF_OBJS_TEST += test_a_extF80_z_f32.o
-TF_OBJS_TEST += test_a_extF80_z_f64.o
-TF_OBJS_TEST += test_a_extF80_z_f128.o
-TF_OBJS_TEST += test_az_extF80.o
-TF_OBJS_TEST += test_az_extF80_rx.o
-TF_OBJS_TEST += test_abz_extF80.o
-TF_OBJS_TEST += test_ab_extF80_z_bool.o
-TF_OBJS_TEST += test_a_f128_z_ui32_rx.o
-TF_OBJS_TEST += test_a_f128_z_ui64_rx.o
-TF_OBJS_TEST += test_a_f128_z_i32_rx.o
-TF_OBJS_TEST += test_a_f128_z_i64_rx.o
-TF_OBJS_TEST += test_a_f128_z_ui32_x.o
-TF_OBJS_TEST += test_a_f128_z_ui64_x.o
-TF_OBJS_TEST += test_a_f128_z_i32_x.o
-TF_OBJS_TEST += test_a_f128_z_i64_x.o
-TF_OBJS_TEST += test_a_f128_z_f16.o
-TF_OBJS_TEST += test_a_f128_z_f32.o
-TF_OBJS_TEST += test_a_f128_z_f64.o
-TF_OBJS_TEST += test_a_f128_z_extF80.o
-TF_OBJS_TEST += test_az_f128.o
-TF_OBJS_TEST += test_az_f128_rx.o
-TF_OBJS_TEST += test_abz_f128.o
-TF_OBJS_TEST += test_abcz_f128.o
-TF_OBJS_TEST += test_ab_f128_z_bool.o
-
-TF_OBJS_LIB :=
-TF_OBJS_LIB += uint128_inline.o
-TF_OBJS_LIB += uint128.o
-TF_OBJS_LIB += fail.o
-TF_OBJS_LIB += functions_common.o
-TF_OBJS_LIB += functionInfos.o
-TF_OBJS_LIB += standardFunctionInfos.o
-TF_OBJS_LIB += random.o
-TF_OBJS_LIB += genCases_common.o
-TF_OBJS_LIB += $(TF_OBJS_GENCASES)
-TF_OBJS_LIB += genCases_writeTestsTotal.o
-TF_OBJS_LIB += verCases_inline.o
-TF_OBJS_LIB += verCases_common.o
-TF_OBJS_LIB += verCases_writeFunctionName.o
-TF_OBJS_LIB += readHex.o
-TF_OBJS_LIB += writeHex.o
-TF_OBJS_LIB += $(TF_OBJS_WRITECASE)
-TF_OBJS_LIB += testLoops_common.o
-TF_OBJS_LIB += $(TF_OBJS_TEST)
-
-BINARIES := fp-test$(EXESUF) fp-bench$(EXESUF)
-
-# We require artefacts from the main build including config-host.h
-# because platform.h includes it. Rather than re-invoking the main
-# build we just error out if things aren't there.
-$(LIBQEMUUTIL) $(BUILD_DIR)/config-host.h:
- $(error $@ missing, re-run parent build)
-
-all: $(BUILD_DIR)/config-host.h $(BINARIES)
-
-# libtestfloat.a depends on libsoftfloat.a, so specify it first
-FP_TEST_LIBS := libtestfloat.a libsoftfloat.a $(LIBQEMUUTIL)
-
-fp-test$(EXESUF): fp-test.o slowfloat.o $(QEMU_SOFTFLOAT_OBJ) $(FP_TEST_LIBS)
-
-# Custom rule to build with SF_CFLAGS
-SF_BUILD = $(call quiet-command,$(CC) $(QEMU_LOCAL_INCLUDES) $(QEMU_INCLUDES) \
- $(QEMU_CFLAGS) $(SF_CFLAGS) $(QEMU_DGFLAGS) $(CFLAGS) \
- $($@-cflags) -c -o $@ $<,"CC","$(TARGET_DIR)$@")
-
-$(SF_OBJS_ALL_NOSPEC): %.o: $(SF_SOURCE_DIR)/%.c
- $(SF_BUILD)
-$(SF_OBJS_SPECIALIZE): %.o: $(SF_SPECIALIZE_DIR)/%.c
- $(SF_BUILD)
-
-libsoftfloat.a: $(SF_OBJS_ALL)
-
-# Custom rule to build with TF_CFLAGS
-$(TF_OBJS_LIB) slowfloat.o: %.o: $(TF_SOURCE_DIR)/%.c
- $(call quiet-command,$(CC) $(QEMU_LOCAL_INCLUDES) $(QEMU_INCLUDES) \
- $(QEMU_CFLAGS) $(TF_CFLAGS) $(QEMU_DGFLAGS) $(CFLAGS) \
- $($@-cflags) -c -o $@ $<,"CC","$(TARGET_DIR)$@")
-
-libtestfloat.a: $(TF_OBJS_LIB)
-
-fp-bench$(EXESUF): fp-bench.o $(QEMU_SOFTFLOAT_OBJ) $(LIBQEMUUTIL)
-
-clean:
- rm -f *.o *.d $(BINARIES)
- rm -f *.gcno *.gcda *.gcov
- rm -f fp-test$(EXESUF)
- rm -f fp-bench$(EXESUF)
- rm -f libsoftfloat.a
- rm -f libtestfloat.a
-
--include $(wildcard *.d)
diff --git a/tests/fp/fp-test.c b/tests/fp/fp-test.c
index 43ef962..06ffebd 100644
--- a/tests/fp/fp-test.c
+++ b/tests/fp/fp-test.c
@@ -116,7 +116,7 @@ static void usage_complete(int argc, char *argv[])
}
/* keep wrappers separate but do not bother defining headers for all of them */
-#include "wrap.inc.c"
+#include "wrap.c.inc"
static void not_implemented(void)
{
diff --git a/tests/fp/meson.build b/tests/fp/meson.build
new file mode 100644
index 0000000..8779a17
--- /dev/null
+++ b/tests/fp/meson.build
@@ -0,0 +1,636 @@
+# There are namespace pollution issues on Windows, due to osdep.h
+# bringing in Windows headers that define a FLOAT128 type.
+if targetos == 'windows'
+ subdir_done()
+endif
+
+fpcflags = [
+ # softfloat defines
+ '-DSOFTFLOAT_ROUND_ODD',
+ '-DINLINE_LEVEL=5',
+ '-DSOFTFLOAT_FAST_DIV32TO16',
+ '-DSOFTFLOAT_FAST_DIV64TO32',
+ '-DSOFTFLOAT_FAST_INT64',
+ # testfloat defines
+ '-DFLOAT16',
+ '-DFLOAT64',
+ '-DEXTFLOAT80',
+ '-DFLOAT128',
+ '-DFLOAT_ROUND_ODD',
+ '-DLONG_DOUBLE_IS_EXTFLOAT80',
+]
+
+sfdir = 'berkeley-softfloat-3/source'
+sfspedir = sfdir / '8086-SSE'
+tfdir = 'berkeley-testfloat-3/source'
+
+sfinc = include_directories(sfdir / 'include', sfspedir)
+
+tfcflags = [
+ '-Wno-strict-prototypes',
+ '-Wno-unknown-pragmas',
+ '-Wno-uninitialized',
+ '-Wno-missing-prototypes',
+ '-Wno-return-type',
+ '-Wno-unused-function',
+ '-Wno-error',
+]
+
+tfgencases = [
+ tfdir / 'genCases_ui32.c',
+ tfdir / 'genCases_ui64.c',
+ tfdir / 'genCases_i32.c',
+ tfdir / 'genCases_i64.c',
+ tfdir / 'genCases_f16.c',
+ tfdir / 'genCases_f32.c',
+ tfdir / 'genCases_f64.c',
+ tfdir / 'genCases_extF80.c',
+ tfdir / 'genCases_f128.c',
+]
+
+tfwritecase = [
+ tfdir / 'writeCase_a_ui32.c',
+ tfdir / 'writeCase_a_ui64.c',
+ tfdir / 'writeCase_a_f16.c',
+ tfdir / 'writeCase_ab_f16.c',
+ tfdir / 'writeCase_abc_f16.c',
+ tfdir / 'writeCase_a_f32.c',
+ tfdir / 'writeCase_ab_f32.c',
+ tfdir / 'writeCase_abc_f32.c',
+ tfdir / 'writeCase_a_f64.c',
+ tfdir / 'writeCase_ab_f64.c',
+ tfdir / 'writeCase_abc_f64.c',
+ tfdir / 'writeCase_a_extF80M.c',
+ tfdir / 'writeCase_ab_extF80M.c',
+ tfdir / 'writeCase_a_f128M.c',
+ tfdir / 'writeCase_ab_f128M.c',
+ tfdir / 'writeCase_abc_f128M.c',
+ tfdir / 'writeCase_z_bool.c',
+ tfdir / 'writeCase_z_ui32.c',
+ tfdir / 'writeCase_z_ui64.c',
+ tfdir / 'writeCase_z_f16.c',
+ tfdir / 'writeCase_z_f32.c',
+ tfdir / 'writeCase_z_f64.c',
+ tfdir / 'writeCase_z_extF80M.c',
+ tfdir / 'writeCase_z_f128M.c',
+]
+
+tftest = [
+ tfdir / 'test_a_ui32_z_f16.c',
+ tfdir / 'test_a_ui32_z_f32.c',
+ tfdir / 'test_a_ui32_z_f64.c',
+ tfdir / 'test_a_ui32_z_extF80.c',
+ tfdir / 'test_a_ui32_z_f128.c',
+ tfdir / 'test_a_ui64_z_f16.c',
+ tfdir / 'test_a_ui64_z_f32.c',
+ tfdir / 'test_a_ui64_z_f64.c',
+ tfdir / 'test_a_ui64_z_extF80.c',
+ tfdir / 'test_a_ui64_z_f128.c',
+ tfdir / 'test_a_i32_z_f16.c',
+ tfdir / 'test_a_i32_z_f32.c',
+ tfdir / 'test_a_i32_z_f64.c',
+ tfdir / 'test_a_i32_z_extF80.c',
+ tfdir / 'test_a_i32_z_f128.c',
+ tfdir / 'test_a_i64_z_f16.c',
+ tfdir / 'test_a_i64_z_f32.c',
+ tfdir / 'test_a_i64_z_f64.c',
+ tfdir / 'test_a_i64_z_extF80.c',
+ tfdir / 'test_a_i64_z_f128.c',
+ tfdir / 'test_a_f16_z_ui32_rx.c',
+ tfdir / 'test_a_f16_z_ui64_rx.c',
+ tfdir / 'test_a_f16_z_i32_rx.c',
+ tfdir / 'test_a_f16_z_i64_rx.c',
+ tfdir / 'test_a_f16_z_ui32_x.c',
+ tfdir / 'test_a_f16_z_ui64_x.c',
+ tfdir / 'test_a_f16_z_i32_x.c',
+ tfdir / 'test_a_f16_z_i64_x.c',
+ tfdir / 'test_a_f16_z_f32.c',
+ tfdir / 'test_a_f16_z_f64.c',
+ tfdir / 'test_a_f16_z_extF80.c',
+ tfdir / 'test_a_f16_z_f128.c',
+ tfdir / 'test_az_f16.c',
+ tfdir / 'test_az_f16_rx.c',
+ tfdir / 'test_abz_f16.c',
+ tfdir / 'test_abcz_f16.c',
+ tfdir / 'test_ab_f16_z_bool.c',
+ tfdir / 'test_a_f32_z_ui32_rx.c',
+ tfdir / 'test_a_f32_z_ui64_rx.c',
+ tfdir / 'test_a_f32_z_i32_rx.c',
+ tfdir / 'test_a_f32_z_i64_rx.c',
+ tfdir / 'test_a_f32_z_ui32_x.c',
+ tfdir / 'test_a_f32_z_ui64_x.c',
+ tfdir / 'test_a_f32_z_i32_x.c',
+ tfdir / 'test_a_f32_z_i64_x.c',
+ tfdir / 'test_a_f32_z_f16.c',
+ tfdir / 'test_a_f32_z_f64.c',
+ tfdir / 'test_a_f32_z_extF80.c',
+ tfdir / 'test_a_f32_z_f128.c',
+ tfdir / 'test_az_f32.c',
+ tfdir / 'test_az_f32_rx.c',
+ tfdir / 'test_abz_f32.c',
+ tfdir / 'test_abcz_f32.c',
+ tfdir / 'test_ab_f32_z_bool.c',
+ tfdir / 'test_a_f64_z_ui32_rx.c',
+ tfdir / 'test_a_f64_z_ui64_rx.c',
+ tfdir / 'test_a_f64_z_i32_rx.c',
+ tfdir / 'test_a_f64_z_i64_rx.c',
+ tfdir / 'test_a_f64_z_ui32_x.c',
+ tfdir / 'test_a_f64_z_ui64_x.c',
+ tfdir / 'test_a_f64_z_i32_x.c',
+ tfdir / 'test_a_f64_z_i64_x.c',
+ tfdir / 'test_a_f64_z_f16.c',
+ tfdir / 'test_a_f64_z_f32.c',
+ tfdir / 'test_a_f64_z_extF80.c',
+ tfdir / 'test_a_f64_z_f128.c',
+ tfdir / 'test_az_f64.c',
+ tfdir / 'test_az_f64_rx.c',
+ tfdir / 'test_abz_f64.c',
+ tfdir / 'test_abcz_f64.c',
+ tfdir / 'test_ab_f64_z_bool.c',
+ tfdir / 'test_a_extF80_z_ui32_rx.c',
+ tfdir / 'test_a_extF80_z_ui64_rx.c',
+ tfdir / 'test_a_extF80_z_i32_rx.c',
+ tfdir / 'test_a_extF80_z_i64_rx.c',
+ tfdir / 'test_a_extF80_z_ui32_x.c',
+ tfdir / 'test_a_extF80_z_ui64_x.c',
+ tfdir / 'test_a_extF80_z_i32_x.c',
+ tfdir / 'test_a_extF80_z_i64_x.c',
+ tfdir / 'test_a_extF80_z_f16.c',
+ tfdir / 'test_a_extF80_z_f32.c',
+ tfdir / 'test_a_extF80_z_f64.c',
+ tfdir / 'test_a_extF80_z_f128.c',
+ tfdir / 'test_az_extF80.c',
+ tfdir / 'test_az_extF80_rx.c',
+ tfdir / 'test_abz_extF80.c',
+ tfdir / 'test_ab_extF80_z_bool.c',
+ tfdir / 'test_a_f128_z_ui32_rx.c',
+ tfdir / 'test_a_f128_z_ui64_rx.c',
+ tfdir / 'test_a_f128_z_i32_rx.c',
+ tfdir / 'test_a_f128_z_i64_rx.c',
+ tfdir / 'test_a_f128_z_ui32_x.c',
+ tfdir / 'test_a_f128_z_ui64_x.c',
+ tfdir / 'test_a_f128_z_i32_x.c',
+ tfdir / 'test_a_f128_z_i64_x.c',
+ tfdir / 'test_a_f128_z_f16.c',
+ tfdir / 'test_a_f128_z_f32.c',
+ tfdir / 'test_a_f128_z_f64.c',
+ tfdir / 'test_a_f128_z_extF80.c',
+ tfdir / 'test_az_f128.c',
+ tfdir / 'test_az_f128_rx.c',
+ tfdir / 'test_abz_f128.c',
+ tfdir / 'test_abcz_f128.c',
+ tfdir / 'test_ab_f128_z_bool.c',
+]
+
+libtestfloat = static_library(
+ 'testfloat',
+ files(
+ tfdir / 'uint128_inline.c',
+ tfdir / 'uint128.c',
+ tfdir / 'fail.c',
+ tfdir / 'functions_common.c',
+ tfdir / 'functionInfos.c',
+ tfdir / 'standardFunctionInfos.c',
+ tfdir / 'random.c',
+ tfdir / 'genCases_common.c',
+ tfgencases,
+ tfdir / 'genCases_writeTestsTotal.c',
+ tfdir / 'verCases_inline.c',
+ tfdir / 'verCases_common.c',
+ tfdir / 'verCases_writeFunctionName.c',
+ tfdir / 'readHex.c',
+ tfdir / 'writeHex.c',
+ tfwritecase,
+ tfdir / 'testLoops_common.c',
+ tftest,
+ ),
+ include_directories: sfinc,
+ c_args: tfcflags + fpcflags,
+)
+
+sfcflags = [
+ '-Wno-missing-prototypes',
+ '-Wno-redundant-decls',
+ '-Wno-return-type',
+ '-Wno-error',
+]
+
+libsoftfloat = static_library(
+ 'softfloat',
+ files(
+ # primitives
+ sfdir / 's_eq128.c',
+ sfdir / 's_le128.c',
+ sfdir / 's_lt128.c',
+ sfdir / 's_shortShiftLeft128.c',
+ sfdir / 's_shortShiftRight128.c',
+ sfdir / 's_shortShiftRightJam64.c',
+ sfdir / 's_shortShiftRightJam64Extra.c',
+ sfdir / 's_shortShiftRightJam128.c',
+ sfdir / 's_shortShiftRightJam128Extra.c',
+ sfdir / 's_shiftRightJam32.c',
+ sfdir / 's_shiftRightJam64.c',
+ sfdir / 's_shiftRightJam64Extra.c',
+ sfdir / 's_shiftRightJam128.c',
+ sfdir / 's_shiftRightJam128Extra.c',
+ sfdir / 's_shiftRightJam256M.c',
+ sfdir / 's_countLeadingZeros8.c',
+ sfdir / 's_countLeadingZeros16.c',
+ sfdir / 's_countLeadingZeros32.c',
+ sfdir / 's_countLeadingZeros64.c',
+ sfdir / 's_add128.c',
+ sfdir / 's_add256M.c',
+ sfdir / 's_sub128.c',
+ sfdir / 's_sub256M.c',
+ sfdir / 's_mul64ByShifted32To128.c',
+ sfdir / 's_mul64To128.c',
+ sfdir / 's_mul128By32.c',
+ sfdir / 's_mul128To256M.c',
+ sfdir / 's_approxRecip_1Ks.c',
+ sfdir / 's_approxRecip32_1.c',
+ sfdir / 's_approxRecipSqrt_1Ks.c',
+ sfdir / 's_approxRecipSqrt32_1.c',
+ # others
+ sfdir / 's_roundToUI32.c',
+ sfdir / 's_roundToUI64.c',
+ sfdir / 's_roundToI32.c',
+ sfdir / 's_roundToI64.c',
+ sfdir / 's_normSubnormalF16Sig.c',
+ sfdir / 's_roundPackToF16.c',
+ sfdir / 's_normRoundPackToF16.c',
+ sfdir / 's_addMagsF16.c',
+ sfdir / 's_subMagsF16.c',
+ sfdir / 's_mulAddF16.c',
+ sfdir / 's_normSubnormalF32Sig.c',
+ sfdir / 's_roundPackToF32.c',
+ sfdir / 's_normRoundPackToF32.c',
+ sfdir / 's_addMagsF32.c',
+ sfdir / 's_subMagsF32.c',
+ sfdir / 's_mulAddF32.c',
+ sfdir / 's_normSubnormalF64Sig.c',
+ sfdir / 's_roundPackToF64.c',
+ sfdir / 's_normRoundPackToF64.c',
+ sfdir / 's_addMagsF64.c',
+ sfdir / 's_subMagsF64.c',
+ sfdir / 's_mulAddF64.c',
+ sfdir / 's_normSubnormalExtF80Sig.c',
+ sfdir / 's_roundPackToExtF80.c',
+ sfdir / 's_normRoundPackToExtF80.c',
+ sfdir / 's_addMagsExtF80.c',
+ sfdir / 's_subMagsExtF80.c',
+ sfdir / 's_normSubnormalF128Sig.c',
+ sfdir / 's_roundPackToF128.c',
+ sfdir / 's_normRoundPackToF128.c',
+ sfdir / 's_addMagsF128.c',
+ sfdir / 's_subMagsF128.c',
+ sfdir / 's_mulAddF128.c',
+ sfdir / 'softfloat_state.c',
+ sfdir / 'ui32_to_f16.c',
+ sfdir / 'ui32_to_f32.c',
+ sfdir / 'ui32_to_f64.c',
+ sfdir / 'ui32_to_extF80.c',
+ sfdir / 'ui32_to_extF80M.c',
+ sfdir / 'ui32_to_f128.c',
+ sfdir / 'ui32_to_f128M.c',
+ sfdir / 'ui64_to_f16.c',
+ sfdir / 'ui64_to_f32.c',
+ sfdir / 'ui64_to_f64.c',
+ sfdir / 'ui64_to_extF80.c',
+ sfdir / 'ui64_to_extF80M.c',
+ sfdir / 'ui64_to_f128.c',
+ sfdir / 'ui64_to_f128M.c',
+ sfdir / 'i32_to_f16.c',
+ sfdir / 'i32_to_f32.c',
+ sfdir / 'i32_to_f64.c',
+ sfdir / 'i32_to_extF80.c',
+ sfdir / 'i32_to_extF80M.c',
+ sfdir / 'i32_to_f128.c',
+ sfdir / 'i32_to_f128M.c',
+ sfdir / 'i64_to_f16.c',
+ sfdir / 'i64_to_f32.c',
+ sfdir / 'i64_to_f64.c',
+ sfdir / 'i64_to_extF80.c',
+ sfdir / 'i64_to_extF80M.c',
+ sfdir / 'i64_to_f128.c',
+ sfdir / 'i64_to_f128M.c',
+ sfdir / 'f16_to_ui32.c',
+ sfdir / 'f16_to_ui64.c',
+ sfdir / 'f16_to_i32.c',
+ sfdir / 'f16_to_i64.c',
+ sfdir / 'f16_to_ui32_r_minMag.c',
+ sfdir / 'f16_to_ui64_r_minMag.c',
+ sfdir / 'f16_to_i32_r_minMag.c',
+ sfdir / 'f16_to_i64_r_minMag.c',
+ sfdir / 'f16_to_f32.c',
+ sfdir / 'f16_to_f64.c',
+ sfdir / 'f16_to_extF80.c',
+ sfdir / 'f16_to_extF80M.c',
+ sfdir / 'f16_to_f128.c',
+ sfdir / 'f16_to_f128M.c',
+ sfdir / 'f16_roundToInt.c',
+ sfdir / 'f16_add.c',
+ sfdir / 'f16_sub.c',
+ sfdir / 'f16_mul.c',
+ sfdir / 'f16_mulAdd.c',
+ sfdir / 'f16_div.c',
+ sfdir / 'f16_rem.c',
+ sfdir / 'f16_sqrt.c',
+ sfdir / 'f16_eq.c',
+ sfdir / 'f16_le.c',
+ sfdir / 'f16_lt.c',
+ sfdir / 'f16_eq_signaling.c',
+ sfdir / 'f16_le_quiet.c',
+ sfdir / 'f16_lt_quiet.c',
+ sfdir / 'f16_isSignalingNaN.c',
+ sfdir / 'f32_to_ui32.c',
+ sfdir / 'f32_to_ui64.c',
+ sfdir / 'f32_to_i32.c',
+ sfdir / 'f32_to_i64.c',
+ sfdir / 'f32_to_ui32_r_minMag.c',
+ sfdir / 'f32_to_ui64_r_minMag.c',
+ sfdir / 'f32_to_i32_r_minMag.c',
+ sfdir / 'f32_to_i64_r_minMag.c',
+ sfdir / 'f32_to_f16.c',
+ sfdir / 'f32_to_f64.c',
+ sfdir / 'f32_to_extF80.c',
+ sfdir / 'f32_to_extF80M.c',
+ sfdir / 'f32_to_f128.c',
+ sfdir / 'f32_to_f128M.c',
+ sfdir / 'f32_roundToInt.c',
+ sfdir / 'f32_add.c',
+ sfdir / 'f32_sub.c',
+ sfdir / 'f32_mul.c',
+ sfdir / 'f32_mulAdd.c',
+ sfdir / 'f32_div.c',
+ sfdir / 'f32_rem.c',
+ sfdir / 'f32_sqrt.c',
+ sfdir / 'f32_eq.c',
+ sfdir / 'f32_le.c',
+ sfdir / 'f32_lt.c',
+ sfdir / 'f32_eq_signaling.c',
+ sfdir / 'f32_le_quiet.c',
+ sfdir / 'f32_lt_quiet.c',
+ sfdir / 'f32_isSignalingNaN.c',
+ sfdir / 'f64_to_ui32.c',
+ sfdir / 'f64_to_ui64.c',
+ sfdir / 'f64_to_i32.c',
+ sfdir / 'f64_to_i64.c',
+ sfdir / 'f64_to_ui32_r_minMag.c',
+ sfdir / 'f64_to_ui64_r_minMag.c',
+ sfdir / 'f64_to_i32_r_minMag.c',
+ sfdir / 'f64_to_i64_r_minMag.c',
+ sfdir / 'f64_to_f16.c',
+ sfdir / 'f64_to_f32.c',
+ sfdir / 'f64_to_extF80.c',
+ sfdir / 'f64_to_extF80M.c',
+ sfdir / 'f64_to_f128.c',
+ sfdir / 'f64_to_f128M.c',
+ sfdir / 'f64_roundToInt.c',
+ sfdir / 'f64_add.c',
+ sfdir / 'f64_sub.c',
+ sfdir / 'f64_mul.c',
+ sfdir / 'f64_mulAdd.c',
+ sfdir / 'f64_div.c',
+ sfdir / 'f64_rem.c',
+ sfdir / 'f64_sqrt.c',
+ sfdir / 'f64_eq.c',
+ sfdir / 'f64_le.c',
+ sfdir / 'f64_lt.c',
+ sfdir / 'f64_eq_signaling.c',
+ sfdir / 'f64_le_quiet.c',
+ sfdir / 'f64_lt_quiet.c',
+ sfdir / 'f64_isSignalingNaN.c',
+ sfdir / 'extF80_to_ui32.c',
+ sfdir / 'extF80_to_ui64.c',
+ sfdir / 'extF80_to_i32.c',
+ sfdir / 'extF80_to_i64.c',
+ sfdir / 'extF80_to_ui32_r_minMag.c',
+ sfdir / 'extF80_to_ui64_r_minMag.c',
+ sfdir / 'extF80_to_i32_r_minMag.c',
+ sfdir / 'extF80_to_i64_r_minMag.c',
+ sfdir / 'extF80_to_f16.c',
+ sfdir / 'extF80_to_f32.c',
+ sfdir / 'extF80_to_f64.c',
+ sfdir / 'extF80_to_f128.c',
+ sfdir / 'extF80_roundToInt.c',
+ sfdir / 'extF80_add.c',
+ sfdir / 'extF80_sub.c',
+ sfdir / 'extF80_mul.c',
+ sfdir / 'extF80_div.c',
+ sfdir / 'extF80_rem.c',
+ sfdir / 'extF80_sqrt.c',
+ sfdir / 'extF80_eq.c',
+ sfdir / 'extF80_le.c',
+ sfdir / 'extF80_lt.c',
+ sfdir / 'extF80_eq_signaling.c',
+ sfdir / 'extF80_le_quiet.c',
+ sfdir / 'extF80_lt_quiet.c',
+ sfdir / 'extF80_isSignalingNaN.c',
+ sfdir / 'extF80M_to_ui32.c',
+ sfdir / 'extF80M_to_ui64.c',
+ sfdir / 'extF80M_to_i32.c',
+ sfdir / 'extF80M_to_i64.c',
+ sfdir / 'extF80M_to_ui32_r_minMag.c',
+ sfdir / 'extF80M_to_ui64_r_minMag.c',
+ sfdir / 'extF80M_to_i32_r_minMag.c',
+ sfdir / 'extF80M_to_i64_r_minMag.c',
+ sfdir / 'extF80M_to_f16.c',
+ sfdir / 'extF80M_to_f32.c',
+ sfdir / 'extF80M_to_f64.c',
+ sfdir / 'extF80M_to_f128M.c',
+ sfdir / 'extF80M_roundToInt.c',
+ sfdir / 'extF80M_add.c',
+ sfdir / 'extF80M_sub.c',
+ sfdir / 'extF80M_mul.c',
+ sfdir / 'extF80M_div.c',
+ sfdir / 'extF80M_rem.c',
+ sfdir / 'extF80M_sqrt.c',
+ sfdir / 'extF80M_eq.c',
+ sfdir / 'extF80M_le.c',
+ sfdir / 'extF80M_lt.c',
+ sfdir / 'extF80M_eq_signaling.c',
+ sfdir / 'extF80M_le_quiet.c',
+ sfdir / 'extF80M_lt_quiet.c',
+ sfdir / 'f128_to_ui32.c',
+ sfdir / 'f128_to_ui64.c',
+ sfdir / 'f128_to_i32.c',
+ sfdir / 'f128_to_i64.c',
+ sfdir / 'f128_to_ui32_r_minMag.c',
+ sfdir / 'f128_to_ui64_r_minMag.c',
+ sfdir / 'f128_to_i32_r_minMag.c',
+ sfdir / 'f128_to_i64_r_minMag.c',
+ sfdir / 'f128_to_f16.c',
+ sfdir / 'f128_to_f32.c',
+ sfdir / 'f128_to_extF80.c',
+ sfdir / 'f128_to_f64.c',
+ sfdir / 'f128_roundToInt.c',
+ sfdir / 'f128_add.c',
+ sfdir / 'f128_sub.c',
+ sfdir / 'f128_mul.c',
+ sfdir / 'f128_mulAdd.c',
+ sfdir / 'f128_div.c',
+ sfdir / 'f128_rem.c',
+ sfdir / 'f128_sqrt.c',
+ sfdir / 'f128_eq.c',
+ sfdir / 'f128_le.c',
+ sfdir / 'f128_lt.c',
+ sfdir / 'f128_eq_signaling.c',
+ sfdir / 'f128_le_quiet.c',
+ sfdir / 'f128_lt_quiet.c',
+ sfdir / 'f128_isSignalingNaN.c',
+ sfdir / 'f128M_to_ui32.c',
+ sfdir / 'f128M_to_ui64.c',
+ sfdir / 'f128M_to_i32.c',
+ sfdir / 'f128M_to_i64.c',
+ sfdir / 'f128M_to_ui32_r_minMag.c',
+ sfdir / 'f128M_to_ui64_r_minMag.c',
+ sfdir / 'f128M_to_i32_r_minMag.c',
+ sfdir / 'f128M_to_i64_r_minMag.c',
+ sfdir / 'f128M_to_f16.c',
+ sfdir / 'f128M_to_f32.c',
+ sfdir / 'f128M_to_extF80M.c',
+ sfdir / 'f128M_to_f64.c',
+ sfdir / 'f128M_roundToInt.c',
+ sfdir / 'f128M_add.c',
+ sfdir / 'f128M_sub.c',
+ sfdir / 'f128M_mul.c',
+ sfdir / 'f128M_mulAdd.c',
+ sfdir / 'f128M_div.c',
+ sfdir / 'f128M_rem.c',
+ sfdir / 'f128M_sqrt.c',
+ sfdir / 'f128M_eq.c',
+ sfdir / 'f128M_le.c',
+ sfdir / 'f128M_lt.c',
+ sfdir / 'f128M_eq_signaling.c',
+ sfdir / 'f128M_le_quiet.c',
+ sfdir / 'f128M_lt_quiet.c',
+ # spe
+ sfspedir / 'softfloat_raiseFlags.c',
+ sfspedir / 's_f16UIToCommonNaN.c',
+ sfspedir / 's_commonNaNToF16UI.c',
+ sfspedir / 's_propagateNaNF16UI.c',
+ sfspedir / 's_f32UIToCommonNaN.c',
+ sfspedir / 's_commonNaNToF32UI.c',
+ sfspedir / 's_propagateNaNF32UI.c',
+ sfspedir / 's_f64UIToCommonNaN.c',
+ sfspedir / 's_commonNaNToF64UI.c',
+ sfspedir / 's_propagateNaNF64UI.c',
+ sfspedir / 'extF80M_isSignalingNaN.c',
+ sfspedir / 's_extF80UIToCommonNaN.c',
+ sfspedir / 's_commonNaNToExtF80UI.c',
+ sfspedir / 's_propagateNaNExtF80UI.c',
+ sfspedir / 'f128M_isSignalingNaN.c',
+ sfspedir / 's_f128UIToCommonNaN.c',
+ sfspedir / 's_commonNaNToF128UI.c',
+ sfspedir / 's_propagateNaNF128UI.c',
+ ),
+ include_directories: sfinc,
+ c_args: sfcflags + fpcflags,
+)
+
+fpcflags += [
+ # work around TARGET_* poisoning
+ '-DHW_POISON_H',
+ # define a target to match testfloat's implementation-defined choices, such as
+ # whether to raise the invalid flag when dealing with NaNs in muladd.
+ '-DTARGET_ARM',
+ # FIXME: uiZ may be used uninitialized in this function
+ '-Wno-uninitialized',
+]
+
+fptest = executable(
+ 'fp-test',
+ ['fp-test.c', tfdir / 'slowfloat.c', '../../fpu/softfloat.c'],
+ build_by_default: false,
+ link_with: [libtestfloat, libsoftfloat],
+ dependencies: [qemuutil],
+ include_directories: [sfinc, include_directories(tfdir)],
+ c_args: fpcflags,
+)
+softfloat_conv_tests = {
+ 'float-to-float': 'f16_to_f32 f16_to_f64 f16_to_extF80 f16_to_f128 ' +
+ 'f32_to_f16 f32_to_f64 f32_to_extF80 ' +
+ 'f64_to_f16 f64_to_f32 ' +
+ 'extF80_to_f16 extF80_to_f32 ' +
+ 'extF80_to_f64 extF80_to_f128 ' +
+ 'f128_to_f16',
+ 'int-to-float': 'i32_to_f16 i64_to_f16 i32_to_f32 i64_to_f32 ' +
+ 'i32_to_f64 i64_to_f64 i32_to_f128 i64_to_f128',
+ 'uint-to-float': 'ui32_to_f16 ui64_to_f16 ui32_to_f32 ui64_to_f32 ' +
+ 'ui32_to_f64 ui64_to_f64 ui64_to_f128 ' +
+ 'ui32_to_extF80 ui64_to_extF80',
+ 'float-to-int': 'f16_to_i32 f16_to_i32_r_minMag ' +
+ 'f32_to_i32 f32_to_i32_r_minMag ' +
+ 'f64_to_i32 f64_to_i32_r_minMag ' +
+ 'extF80_to_i32 extF80_to_i32_r_minMag ' +
+ 'f128_to_i32 f128_to_i32_r_minMag ' +
+ 'f16_to_i64 f16_to_i64_r_minMag ' +
+ 'f32_to_i64 f32_to_i64_r_minMag ' +
+ 'f64_to_i64 f64_to_i64_r_minMag ' +
+ 'extF80_to_i64 extF80_to_i64_r_minMag ' +
+ 'f128_to_i64 f128_to_i64_r_minMag',
+ 'float-to-uint': 'f16_to_ui32 f16_to_ui32_r_minMag ' +
+ 'f32_to_ui32 f32_to_ui32_r_minMag ' +
+ 'f64_to_ui32 f64_to_ui32_r_minMag ' +
+ 'extF80_to_ui32 extF80_to_ui32_r_minMag ' +
+ 'f128_to_ui32 f128_to_ui32_r_minMag ' +
+ 'f16_to_ui64 f16_to_ui64_r_minMag ' +
+ 'f32_to_ui64 f32_to_ui64_r_minMag ' +
+ 'f64_to_ui64 f64_to_ui64_r_minMag ' +
+ 'extF80_to_ui64 extF80_to_ui64_r_minMag ' +
+ 'f128_to_ui64 f128_to_ui64_r_minMag',
+ 'round-to-integer': 'f16_roundToInt f32_roundToInt ' +
+ 'f64_roundToInt f128_roundToInt'
+}
+softfloat_tests = {
+ 'eq_signaling' : 'compare',
+ 'le' : 'compare',
+ 'le_quiet' : 'compare',
+ 'lt_quiet' : 'compare',
+ 'add': 'ops',
+ 'sub': 'ops',
+ 'mul': 'ops',
+ 'div': 'ops',
+ 'rem': 'ops',
+ 'sqrt': 'ops'
+}
+# The full test suite can take a bit of time, default to a quick run
+# "-l 2 -r all" can take more than a day for some operations and is best
+# run manually
+fptest_args = ['-s', '-l', '1']
+fptest_rounding_args = ['-r', 'all']
+
+# Conversion Routines:
+# FIXME: i32_to_extF80 (broken), i64_to_extF80 (broken)
+# extF80_roundToInt (broken)
+foreach k, v : softfloat_conv_tests
+ test('fp-test:' + k, fptest,
+ args: fptest_args + fptest_rounding_args + v.split(),
+ suite: ['softfloat', 'softfloat-conv'])
+endforeach
+
+# FIXME: extF80_{lt_quiet, rem} (broken),
+# extF80_{mulAdd} (missing)
+foreach k, v : softfloat_tests
+ extF80_broken = ['lt_quiet', 'rem'].contains(k)
+ test('fp-test:' + k, fptest,
+ args: fptest_args + fptest_rounding_args +
+ ['f16_' + k, 'f32_' + k, 'f64_' + k, 'f128_' + k] +
+ (extF80_broken ? [] : ['extF80_' + k]),
+ suite: ['softfloat', 'softfloat-' + v])
+endforeach
+test('fp-test:mulAdd', fptest,
+ # no fptest_rounding_args
+ args: fptest_args +
+ ['f16_mulAdd', 'f32_mulAdd', 'f64_mulAdd', 'f128_mulAdd'],
+ suite: ['softfloat-slow', 'softfloat-ops-slow'], timeout: 60)
+
+fpbench = executable(
+ 'fp-bench',
+ ['fp-bench.c', '../../fpu/softfloat.c'],
+ build_by_default: false,
+ link_with: [libtestfloat, libsoftfloat],
+ dependencies: [qemuutil],
+ include_directories: [sfinc, include_directories(tfdir)],
+ c_args: fpcflags,
+)
diff --git a/tests/fp/wrap.inc.c b/tests/fp/wrap.c.inc
index 0cbd200..0cbd200 100644
--- a/tests/fp/wrap.inc.c
+++ b/tests/fp/wrap.c.inc
diff --git a/tests/meson.build b/tests/meson.build
new file mode 100644
index 0000000..fe2c6d8
--- /dev/null
+++ b/tests/meson.build
@@ -0,0 +1,18 @@
+if have_system and 'CONFIG_POSIX' in config_host
+ subdir('qemu-iotests')
+endif
+
+test('decodetree', sh,
+ args: [ files('decode/check.sh'), config_host['PYTHON'], files('../scripts/decodetree.py') ],
+ workdir: meson.current_source_dir() / 'decode',
+ suite: 'decodetree')
+
+if 'CONFIG_TCG' in config_host
+ subdir('fp')
+ if 'CONFIG_PLUGIN' in config_host
+ subdir('plugin')
+ endif
+endif
+
+subdir('qapi-schema')
+subdir('qtest')
diff --git a/tests/multiboot/run_test.sh b/tests/multiboot/run_test.sh
index 98df91e..f968bf7 100755
--- a/tests/multiboot/run_test.sh
+++ b/tests/multiboot/run_test.sh
@@ -20,7 +20,7 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
-QEMU=${QEMU:-"../../x86_64-softmmu/qemu-system-x86_64"}
+QEMU=${QEMU:-"../../qemu-system-x86_64"}
run_qemu() {
local kernel=$1
diff --git a/tests/plugin/Makefile b/tests/plugin/Makefile
deleted file mode 100644
index e9348fd..0000000
--- a/tests/plugin/Makefile
+++ /dev/null
@@ -1,46 +0,0 @@
-# -*- Mode: makefile -*-
-#
-# This Makefile example is fairly independent from the main makefile
-# so users can take and adapt it for their build. We only really
-# include config-host.mak so we don't have to repeat probing for
-# cflags that the main configure has already done for us.
-#
-
-BUILD_DIR := $(CURDIR)/../..
-
-include $(BUILD_DIR)/config-host.mak
-
-VPATH += $(SRC_PATH)/tests/plugin
-
-NAMES :=
-NAMES += bb
-NAMES += empty
-NAMES += insn
-NAMES += mem
-NAMES += hotblocks
-NAMES += howvec
-NAMES += hotpages
-NAMES += lockstep
-
-SONAMES := $(addsuffix .so,$(addprefix lib,$(NAMES)))
-
-# The main QEMU uses Glib extensively so it's perfectly fine to use it
-# in plugins (which many example do).
-CFLAGS = $(GLIB_CFLAGS)
-CFLAGS += -fPIC
-CFLAGS += $(if $(findstring no-psabi,$(QEMU_CFLAGS)),-Wpsabi)
-CFLAGS += -I$(SRC_PATH)/include/qemu
-
-all: $(SONAMES)
-
-%.o: %.c
- $(CC) $(CFLAGS) -c -o $@ $<
-
-lib%.so: %.o
- $(CC) -shared -Wl,-soname,$@ -o $@ $^ $(LDLIBS)
-
-clean:
- rm -f *.o *.so *.d
- rm -Rf .libs
-
-.PHONY: all clean
diff --git a/tests/plugin/meson.build b/tests/plugin/meson.build
new file mode 100644
index 0000000..dbbdcba
--- /dev/null
+++ b/tests/plugin/meson.build
@@ -0,0 +1,7 @@
+t = []
+foreach i : ['bb', 'empty', 'insn', 'mem', 'hotblocks', 'howvec', 'hotpages', 'lockstep']
+ t += shared_module(i, files(i + '.c'),
+ include_directories: '../../include/qemu',
+ dependencies: glib)
+endforeach
+alias_target('plugins', t)
diff --git a/tests/qapi-schema/meson.build b/tests/qapi-schema/meson.build
new file mode 100644
index 0000000..c87d141
--- /dev/null
+++ b/tests/qapi-schema/meson.build
@@ -0,0 +1,225 @@
+test_env = environment()
+test_env.set('PYTHONPATH', meson.source_root() / 'scripts')
+test_env.set('PYTHONIOENCODING', 'utf-8')
+
+schemas = [
+ 'alternate-any.json',
+ 'alternate-array.json',
+ 'alternate-base.json',
+ 'alternate-branch-if-invalid.json',
+ 'alternate-clash.json',
+ 'alternate-conflict-dict.json',
+ 'alternate-conflict-enum-bool.json',
+ 'alternate-conflict-enum-int.json',
+ 'alternate-conflict-string.json',
+ 'alternate-conflict-bool-string.json',
+ 'alternate-conflict-num-string.json',
+ 'alternate-empty.json',
+ 'alternate-invalid-dict.json',
+ 'alternate-nested.json',
+ 'alternate-unknown.json',
+ 'args-alternate.json',
+ 'args-any.json',
+ 'args-array-empty.json',
+ 'args-array-unknown.json',
+ 'args-bad-boxed.json',
+ 'args-boxed-anon.json',
+ 'args-boxed-string.json',
+ 'args-int.json',
+ 'args-invalid.json',
+ 'args-member-array-bad.json',
+ 'args-member-case.json',
+ 'args-member-unknown.json',
+ 'args-name-clash.json',
+ 'args-union.json',
+ 'args-unknown.json',
+ 'bad-base.json',
+ 'bad-data.json',
+ 'bad-ident.json',
+ 'bad-if.json',
+ 'bad-if-empty.json',
+ 'bad-if-empty-list.json',
+ 'bad-if-list.json',
+ 'bad-type-bool.json',
+ 'bad-type-dict.json',
+ 'bad-type-int.json',
+ 'base-cycle-direct.json',
+ 'base-cycle-indirect.json',
+ 'command-int.json',
+ 'comments.json',
+ 'doc-bad-alternate-member.json',
+ 'doc-bad-boxed-command-arg.json',
+ 'doc-bad-command-arg.json',
+ 'doc-bad-enum-member.json',
+ 'doc-bad-event-arg.json',
+ 'doc-bad-feature.json',
+ 'doc-bad-section.json',
+ 'doc-bad-symbol.json',
+ 'doc-bad-union-member.json',
+ 'doc-before-include.json',
+ 'doc-before-pragma.json',
+ 'doc-duplicated-arg.json',
+ 'doc-duplicated-return.json',
+ 'doc-duplicated-since.json',
+ 'doc-empty-arg.json',
+ 'doc-empty-section.json',
+ 'doc-empty-symbol.json',
+ 'doc-good.json',
+ 'doc-interleaved-section.json',
+ 'doc-invalid-end.json',
+ 'doc-invalid-end2.json',
+ 'doc-invalid-return.json',
+ 'doc-invalid-section.json',
+ 'doc-invalid-start.json',
+ 'doc-missing-colon.json',
+ 'doc-missing-expr.json',
+ 'doc-missing-space.json',
+ 'doc-missing.json',
+ 'doc-no-symbol.json',
+ 'doc-undoc-feature.json',
+ 'double-type.json',
+ 'duplicate-key.json',
+ 'empty.json',
+ 'enum-bad-member.json',
+ 'enum-bad-name.json',
+ 'enum-bad-prefix.json',
+ 'enum-clash-member.json',
+ 'enum-dict-member-unknown.json',
+ 'enum-if-invalid.json',
+ 'enum-int-member.json',
+ 'enum-member-case.json',
+ 'enum-missing-data.json',
+ 'enum-wrong-data.json',
+ 'event-boxed-empty.json',
+ 'event-case.json',
+ 'event-member-invalid-dict.json',
+ 'event-nest-struct.json',
+ 'features-bad-type.json',
+ 'features-deprecated-type.json',
+ 'features-duplicate-name.json',
+ 'features-if-invalid.json',
+ 'features-missing-name.json',
+ 'features-name-bad-type.json',
+ 'features-no-list.json',
+ 'features-unknown-key.json',
+ 'flat-union-array-branch.json',
+ 'flat-union-bad-base.json',
+ 'flat-union-bad-discriminator.json',
+ 'flat-union-base-any.json',
+ 'flat-union-base-union.json',
+ 'flat-union-clash-member.json',
+ 'flat-union-discriminator-bad-name.json',
+ 'flat-union-empty.json',
+ 'flat-union-inline.json',
+ 'flat-union-inline-invalid-dict.json',
+ 'flat-union-int-branch.json',
+ 'flat-union-invalid-branch-key.json',
+ 'flat-union-invalid-discriminator.json',
+ 'flat-union-invalid-if-discriminator.json',
+ 'flat-union-no-base.json',
+ 'flat-union-optional-discriminator.json',
+ 'flat-union-string-discriminator.json',
+ 'funny-char.json',
+ 'funny-word.json',
+ 'ident-with-escape.json',
+ 'include-before-err.json',
+ 'include-cycle.json',
+ 'include-extra-junk.json',
+ 'include-nested-err.json',
+ 'include-no-file.json',
+ 'include-non-file.json',
+ 'include-repetition.json',
+ 'include-self-cycle.json',
+ 'include-simple.json',
+ 'indented-expr.json',
+ 'leading-comma-list.json',
+ 'leading-comma-object.json',
+ 'missing-colon.json',
+ 'missing-comma-list.json',
+ 'missing-comma-object.json',
+ 'missing-type.json',
+ 'nested-struct-data.json',
+ 'nested-struct-data-invalid-dict.json',
+ 'non-objects.json',
+ 'oob-test.json',
+ 'allow-preconfig-test.json',
+ 'pragma-doc-required-crap.json',
+ 'pragma-extra-junk.json',
+ 'pragma-name-case-whitelist-crap.json',
+ 'pragma-non-dict.json',
+ 'pragma-unknown.json',
+ 'pragma-returns-whitelist-crap.json',
+ 'qapi-schema-test.json',
+ 'quoted-structural-chars.json',
+ 'redefined-builtin.json',
+ 'redefined-command.json',
+ 'redefined-event.json',
+ 'redefined-type.json',
+ 'reserved-command-q.json',
+ 'reserved-enum-q.json',
+ 'reserved-member-has.json',
+ 'reserved-member-q.json',
+ 'reserved-member-u.json',
+ 'reserved-member-underscore.json',
+ 'reserved-type-kind.json',
+ 'reserved-type-list.json',
+ 'returns-alternate.json',
+ 'returns-array-bad.json',
+ 'returns-dict.json',
+ 'returns-unknown.json',
+ 'returns-whitelist.json',
+ 'string-code-point-31.json',
+ 'string-code-point-127.json',
+ 'struct-base-clash-deep.json',
+ 'struct-base-clash.json',
+ 'struct-data-invalid.json',
+ 'struct-member-if-invalid.json',
+ 'struct-member-invalid-dict.json',
+ 'struct-member-invalid.json',
+ 'trailing-comma-list.json',
+ 'trailing-comma-object.json',
+ 'type-bypass-bad-gen.json',
+ 'unclosed-list.json',
+ 'unclosed-object.json',
+ 'unclosed-string.json',
+ 'union-base-empty.json',
+ 'union-base-no-discriminator.json',
+ 'union-branch-case.json',
+ 'union-branch-if-invalid.json',
+ 'union-branch-invalid-dict.json',
+ 'union-clash-branches.json',
+ 'union-empty.json',
+ 'union-invalid-base.json',
+ 'union-optional-branch.json',
+ 'union-unknown.json',
+ 'unknown-escape.json',
+ 'unknown-expr-key.json',
+]
+
+# Because people may want to use test-qapi.py from the command line, we
+# are not using the "#! /usr/bin/env python3" trick here. See
+# docs/devel/build-system.txt
+test('QAPI schema regression tests', python, args: files('test-qapi.py', schemas),
+ env: test_env, suite: ['qapi-schema', 'qapi-frontend'])
+
+diff = find_program('diff')
+
+qapi_doc = custom_target('QAPI doc',
+ output: ['doc-good-qapi-doc.texi',
+ 'doc-good-qapi-commands.c', 'doc-good-qapi-commands.h',
+ 'doc-good-qapi-emit-events.c', 'doc-good-qapi-emit-events.h',
+ 'doc-good-qapi-events.c', 'doc-good-qapi-events.h',
+ 'doc-good-qapi-init-commands.c', 'doc-good-qapi-init-commands.h',
+ 'doc-good-qapi-introspect.c', 'doc-good-qapi-introspect.h',
+ 'doc-good-qapi-types.c', 'doc-good-qapi-types.h',
+ 'doc-good-qapi-visit.c', 'doc-good-qapi-visit.h' ],
+ input: files('doc-good.json'),
+ command: [ qapi_gen, '-o', meson.current_build_dir(),
+ '-p', 'doc-good-', '@INPUT0@' ],
+ depend_files: qapi_gen_depends)
+
+# "full_path()" needed here to work around
+# https://github.com/mesonbuild/meson/issues/7585
+test('QAPI doc', diff, args: ['-u', files('doc-good.texi'), qapi_doc[0].full_path()],
+ depends: qapi_doc,
+ suite: ['qapi-schema', 'qapi-doc'])
diff --git a/tests/qemu-iotests/check b/tests/qemu-iotests/check
index 0657f72..3ab859a 100755
--- a/tests/qemu-iotests/check
+++ b/tests/qemu-iotests/check
@@ -577,11 +577,11 @@ if [ -z "$QEMU_PROG" ]
then
if [ -x "$build_iotests/qemu" ]; then
export QEMU_PROG="$build_iotests/qemu"
- elif [ -x "$build_root/${qemu_arch}-softmmu/qemu-system-${qemu_arch}" ]; then
- export QEMU_PROG="$build_root/${qemu_arch}-softmmu/qemu-system-${qemu_arch}"
+ elif [ -x "$build_root/qemu-system-${qemu_arch}" ]; then
+ export QEMU_PROG="$build_root/qemu-system-${qemu_arch}"
else
pushd "$build_root" > /dev/null
- for binary in *-softmmu/qemu-system-*
+ for binary in qemu-system-*
do
if [ -x "$binary" ]
then
diff --git a/tests/qemu-iotests/meson.build b/tests/qemu-iotests/meson.build
new file mode 100644
index 0000000..3de09fb
--- /dev/null
+++ b/tests/qemu-iotests/meson.build
@@ -0,0 +1,10 @@
+if 'CONFIG_LINUX' in config_host
+ socket_scm_helper = executable('socket_scm_helper', 'socket_scm_helper.c',
+ build_by_default: false)
+else
+ socket_scm_helper = []
+endif
+test('qemu-iotests', sh, args: [files('../check-block.sh')],
+ depends: [qemu_block_tools, emulators, socket_scm_helper],
+ suite: 'block', timeout: 10000)
+
diff --git a/tests/qtest/Makefile.include b/tests/qtest/Makefile.include
deleted file mode 100644
index b0204e4..0000000
--- a/tests/qtest/Makefile.include
+++ /dev/null
@@ -1,332 +0,0 @@
-# All QTests for now are POSIX-only, but the dependencies are
-# really in libqtest, not in the testcases themselves.
-
-check-qtest-generic-y += cdrom-test
-check-qtest-generic-y += device-introspect-test
-check-qtest-generic-y += machine-none-test
-check-qtest-generic-y += qmp-test
-check-qtest-generic-y += qmp-cmd-test
-check-qtest-generic-y += qom-test
-check-qtest-generic-$(CONFIG_MODULES) += modules-test
-check-qtest-generic-y += test-hmp
-
-check-qtest-pci-$(CONFIG_RTL8139_PCI) += rtl8139-test
-check-qtest-pci-$(CONFIG_VGA) += display-vga-test
-check-qtest-pci-$(CONFIG_HDA) += intel-hda-test
-check-qtest-pci-$(CONFIG_IVSHMEM_DEVICE) += ivshmem-test
-
-DBUS_DAEMON := $(shell which dbus-daemon 2>/dev/null)
-ifneq ($(GDBUS_CODEGEN),)
-ifneq ($(DBUS_DAEMON),)
-# Temporarily disabled due to Patchew failures:
-#check-qtest-pci-$(CONFIG_GIO) += dbus-vmstate-test
-endif
-endif
-
-check-qtest-i386-$(CONFIG_ISA_TESTDEV) = endianness-test
-check-qtest-i386-y += fdc-test
-check-qtest-i386-y += ide-test
-check-qtest-i386-$(CONFIG_TOOLS) += ahci-test
-check-qtest-i386-y += hd-geo-test
-check-qtest-i386-y += boot-order-test
-check-qtest-i386-y += bios-tables-test
-check-qtest-i386-$(CONFIG_SGA) += boot-serial-test
-check-qtest-i386-$(CONFIG_SLIRP) += pxe-test
-check-qtest-i386-y += rtc-test
-check-qtest-i386-$(CONFIG_ISA_IPMI_KCS) += ipmi-kcs-test
-ifdef CONFIG_LINUX
-check-qtest-i386-$(CONFIG_ISA_IPMI_BT) += ipmi-bt-test
-endif
-check-qtest-i386-y += i440fx-test
-check-qtest-i386-y += fw_cfg-test
-check-qtest-i386-y += device-plug-test
-check-qtest-i386-y += drive_del-test
-check-qtest-i386-$(CONFIG_WDT_IB700) += wdt_ib700-test
-check-qtest-i386-y += tco-test
-check-qtest-i386-y += $(check-qtest-pci-y)
-check-qtest-i386-$(CONFIG_PVPANIC) += pvpanic-test
-check-qtest-i386-$(CONFIG_I82801B11) += i82801b11-test
-check-qtest-i386-$(CONFIG_IOH3420) += ioh3420-test
-check-qtest-i386-$(CONFIG_USB_UHCI) += usb-hcd-uhci-test
-check-qtest-i386-$(call land,$(CONFIG_USB_EHCI),$(CONFIG_USB_UHCI)) += usb-hcd-ehci-test
-check-qtest-i386-$(CONFIG_USB_XHCI_NEC) += usb-hcd-xhci-test
-check-qtest-i386-y += cpu-plug-test
-check-qtest-i386-y += q35-test
-check-qtest-i386-y += vmgenid-test
-check-qtest-i386-$(CONFIG_TPM_CRB) += tpm-crb-swtpm-test
-check-qtest-i386-$(CONFIG_TPM_CRB) += tpm-crb-test
-check-qtest-i386-$(CONFIG_TPM_TIS_ISA) += tpm-tis-swtpm-test
-check-qtest-i386-$(CONFIG_TPM_TIS_ISA) += tpm-tis-test
-check-qtest-i386-$(CONFIG_SLIRP) += test-netfilter
-check-qtest-i386-$(CONFIG_POSIX) += test-filter-mirror
-check-qtest-i386-$(CONFIG_RTL8139_PCI) += test-filter-redirector
-check-qtest-i386-y += migration-test
-check-qtest-i386-y += test-x86-cpuid-compat
-check-qtest-i386-y += numa-test
-
-check-qtest-x86_64-y += $(check-qtest-i386-y)
-
-check-qtest-avr-y += boot-serial-test
-
-check-qtest-alpha-y += boot-serial-test
-check-qtest-alpha-$(CONFIG_VGA) += display-vga-test
-
-check-qtest-hppa-y += boot-serial-test
-check-qtest-hppa-$(CONFIG_VGA) += display-vga-test
-
-check-qtest-m68k-y = boot-serial-test
-
-check-qtest-microblaze-y += boot-serial-test
-
-check-qtest-mips-$(CONFIG_ISA_TESTDEV) = endianness-test
-check-qtest-mips-$(CONFIG_VGA) += display-vga-test
-
-check-qtest-mips64-$(CONFIG_ISA_TESTDEV) = endianness-test
-check-qtest-mips64-$(CONFIG_VGA) += display-vga-test
-
-check-qtest-mips64el-$(CONFIG_ISA_TESTDEV) = endianness-test
-check-qtest-mips64el-$(CONFIG_VGA) += display-vga-test
-
-check-qtest-moxie-y += boot-serial-test
-
-check-qtest-ppc-$(CONFIG_ISA_TESTDEV) = endianness-test
-check-qtest-ppc-y += boot-order-test
-check-qtest-ppc-y += prom-env-test
-check-qtest-ppc-y += drive_del-test
-check-qtest-ppc-y += boot-serial-test
-check-qtest-ppc-$(CONFIG_M48T59) += m48t59-test
-
-check-qtest-ppc64-y += $(check-qtest-ppc-y)
-check-qtest-ppc64-$(CONFIG_PSERIES) += device-plug-test
-check-qtest-ppc64-$(CONFIG_POWERNV) += pnv-xscom-test
-check-qtest-ppc64-y += migration-test
-check-qtest-ppc64-$(CONFIG_PSERIES) += rtas-test
-check-qtest-ppc64-$(CONFIG_SLIRP) += pxe-test
-check-qtest-ppc64-$(CONFIG_USB_UHCI) += usb-hcd-uhci-test
-check-qtest-ppc64-$(CONFIG_USB_XHCI_NEC) += usb-hcd-xhci-test
-check-qtest-ppc64-$(CONFIG_SLIRP) += test-netfilter
-check-qtest-ppc64-$(CONFIG_POSIX) += test-filter-mirror
-check-qtest-ppc64-$(CONFIG_RTL8139_PCI) += test-filter-redirector
-check-qtest-ppc64-$(CONFIG_VGA) += display-vga-test
-check-qtest-ppc64-y += numa-test
-check-qtest-ppc64-$(CONFIG_IVSHMEM_DEVICE) += ivshmem-test
-check-qtest-ppc64-y += cpu-plug-test
-
-check-qtest-sh4-$(CONFIG_ISA_TESTDEV) = endianness-test
-
-check-qtest-sh4eb-$(CONFIG_ISA_TESTDEV) = endianness-test
-
-check-qtest-sparc-y += prom-env-test
-check-qtest-sparc-y += m48t59-test
-check-qtest-sparc-y += boot-serial-test
-
-check-qtest-sparc64-$(CONFIG_ISA_TESTDEV) = endianness-test
-check-qtest-sparc64-y += prom-env-test
-check-qtest-sparc64-y += boot-serial-test
-
-check-qtest-arm-y += arm-cpu-features
-check-qtest-arm-y += microbit-test
-check-qtest-arm-y += m25p80-test
-check-qtest-arm-y += test-arm-mptimer
-check-qtest-arm-y += boot-serial-test
-check-qtest-arm-y += hexloader-test
-check-qtest-arm-$(CONFIG_PFLASH_CFI02) += pflash-cfi02-test
-
-check-qtest-aarch64-y += arm-cpu-features
-check-qtest-aarch64-$(CONFIG_TPM_TIS_SYSBUS) += tpm-tis-device-test
-check-qtest-aarch64-$(CONFIG_TPM_TIS_SYSBUS) += tpm-tis-device-swtpm-test
-check-qtest-aarch64-y += numa-test
-check-qtest-aarch64-y += boot-serial-test
-check-qtest-aarch64-y += migration-test
-
-# TODO: once aarch64 TCG is fixed on ARM 32 bit host, make test unconditional
-ifneq ($(ARCH),arm)
-check-qtest-aarch64-y += bios-tables-test
-endif
-
-check-qtest-microblazeel-y += $(check-qtest-microblaze-y)
-
-check-qtest-xtensaeb-y += $(check-qtest-xtensa-y)
-
-check-qtest-s390x-y = boot-serial-test
-check-qtest-s390x-$(CONFIG_SLIRP) += pxe-test
-check-qtest-s390x-$(CONFIG_SLIRP) += test-netfilter
-check-qtest-s390x-$(CONFIG_POSIX) += test-filter-mirror
-check-qtest-s390x-$(CONFIG_POSIX) += test-filter-redirector
-check-qtest-s390x-y += drive_del-test
-check-qtest-s390x-y += device-plug-test
-check-qtest-s390x-y += virtio-ccw-test
-check-qtest-s390x-y += cpu-plug-test
-check-qtest-s390x-y += migration-test
-
-# libqos / qgraph :
-libqgraph-obj-y = tests/qtest/libqos/qgraph.o
-
-libqos-core-obj-y = $(libqgraph-obj-y) tests/qtest/libqos/pci.o tests/qtest/libqos/fw_cfg.o
-libqos-core-obj-y += tests/qtest/libqos/malloc.o
-libqos-core-obj-y += tests/qtest/libqos/libqos.o
-libqos-spapr-obj-y = $(libqos-core-obj-y) tests/qtest/libqos/malloc-spapr.o
-libqos-spapr-obj-y += tests/qtest/libqos/libqos-spapr.o
-libqos-spapr-obj-y += tests/qtest/libqos/rtas.o
-libqos-spapr-obj-y += tests/qtest/libqos/pci-spapr.o
-libqos-pc-obj-y = $(libqos-core-obj-y) tests/qtest/libqos/pci-pc.o
-libqos-pc-obj-y += tests/qtest/libqos/malloc-pc.o tests/qtest/libqos/libqos-pc.o
-libqos-pc-obj-y += tests/qtest/libqos/ahci.o
-libqos-usb-obj-y = $(libqos-spapr-obj-y) $(libqos-pc-obj-y) tests/qtest/libqos/usb.o
-
-# qos devices:
-libqos-obj-y = $(libqgraph-obj-y)
-libqos-obj-y += $(libqos-pc-obj-y) $(libqos-spapr-obj-y)
-libqos-obj-y += tests/qtest/libqos/qos_external.o
-libqos-obj-y += tests/qtest/libqos/e1000e.o
-libqos-obj-y += tests/qtest/libqos/i2c.o
-libqos-obj-y += tests/qtest/libqos/i2c-imx.o
-libqos-obj-y += tests/qtest/libqos/i2c-omap.o
-libqos-obj-y += tests/qtest/libqos/sdhci.o
-libqos-obj-y += tests/qtest/libqos/tpci200.o
-libqos-obj-y += tests/qtest/libqos/virtio.o
-libqos-obj-$(CONFIG_VIRTFS) += tests/qtest/libqos/virtio-9p.o
-libqos-obj-y += tests/qtest/libqos/virtio-balloon.o
-libqos-obj-y += tests/qtest/libqos/virtio-blk.o
-libqos-obj-y += tests/qtest/libqos/virtio-mmio.o
-libqos-obj-y += tests/qtest/libqos/virtio-net.o
-libqos-obj-y += tests/qtest/libqos/virtio-pci.o
-libqos-obj-y += tests/qtest/libqos/virtio-pci-modern.o
-libqos-obj-y += tests/qtest/libqos/virtio-rng.o
-libqos-obj-y += tests/qtest/libqos/virtio-scsi.o
-libqos-obj-y += tests/qtest/libqos/virtio-serial.o
-
-# qos machines:
-libqos-obj-y += tests/qtest/libqos/aarch64-xlnx-zcu102-machine.o
-libqos-obj-y += tests/qtest/libqos/arm-imx25-pdk-machine.o
-libqos-obj-y += tests/qtest/libqos/arm-n800-machine.o
-libqos-obj-y += tests/qtest/libqos/arm-raspi2-machine.o
-libqos-obj-y += tests/qtest/libqos/arm-sabrelite-machine.o
-libqos-obj-y += tests/qtest/libqos/arm-smdkc210-machine.o
-libqos-obj-y += tests/qtest/libqos/arm-virt-machine.o
-libqos-obj-y += tests/qtest/libqos/arm-xilinx-zynq-a9-machine.o
-libqos-obj-y += tests/qtest/libqos/ppc64_pseries-machine.o
-libqos-obj-y += tests/qtest/libqos/x86_64_pc-machine.o
-
-# qos tests:
-qos-test-obj-y += tests/qtest/qos-test.o
-qos-test-obj-y += tests/qtest/ac97-test.o
-qos-test-obj-y += tests/qtest/ds1338-test.o
-qos-test-obj-y += tests/qtest/e1000-test.o
-qos-test-obj-y += tests/qtest/e1000e-test.o
-qos-test-obj-y += tests/qtest/eepro100-test.o
-qos-test-obj-y += tests/qtest/es1370-test.o
-qos-test-obj-y += tests/qtest/ipoctal232-test.o
-qos-test-obj-y += tests/qtest/megasas-test.o
-qos-test-obj-y += tests/qtest/ne2000-test.o
-qos-test-obj-y += tests/qtest/tulip-test.o
-qos-test-obj-y += tests/qtest/nvme-test.o
-qos-test-obj-y += tests/qtest/pca9552-test.o
-qos-test-obj-y += tests/qtest/pci-test.o
-qos-test-obj-y += tests/qtest/pcnet-test.o
-qos-test-obj-y += tests/qtest/sdhci-test.o
-qos-test-obj-y += tests/qtest/spapr-phb-test.o
-qos-test-obj-y += tests/qtest/tmp105-test.o
-qos-test-obj-y += tests/qtest/usb-hcd-ohci-test.o $(libqos-usb-obj-y)
-qos-test-obj-$(CONFIG_VHOST_NET_USER) += tests/qtest/vhost-user-test.o $(chardev-obj-y) $(test-io-obj-y)
-qos-test-obj-y += tests/qtest/virtio-test.o
-qos-test-obj-$(CONFIG_VIRTFS) += tests/qtest/virtio-9p-test.o
-qos-test-obj-y += tests/qtest/virtio-blk-test.o
-qos-test-obj-y += tests/qtest/virtio-net-test.o
-qos-test-obj-y += tests/qtest/virtio-rng-test.o
-qos-test-obj-y += tests/qtest/virtio-scsi-test.o
-qos-test-obj-y += tests/qtest/virtio-serial-test.o
-qos-test-obj-y += tests/qtest/vmxnet3-test.o
-
-check-unit-y += tests/test-qgraph$(EXESUF)
-tests/test-qgraph$(EXESUF): tests/test-qgraph.o $(libqgraph-obj-y)
-
-check-qtest-generic-y += qos-test
-tests/qtest/qos-test$(EXESUF): $(qos-test-obj-y) $(libqos-obj-y)
-
-# QTest dependencies:
-tests/qtest/qmp-test$(EXESUF): tests/qtest/qmp-test.o
-tests/qtest/qmp-cmd-test$(EXESUF): tests/qtest/qmp-cmd-test.o
-tests/qtest/device-introspect-test$(EXESUF): tests/qtest/device-introspect-test.o
-tests/qtest/rtc-test$(EXESUF): tests/qtest/rtc-test.o
-tests/qtest/m48t59-test$(EXESUF): tests/qtest/m48t59-test.o
-tests/qtest/hexloader-test$(EXESUF): tests/qtest/hexloader-test.o
-tests/qtest/pflash-cfi02$(EXESUF): tests/qtest/pflash-cfi02-test.o
-tests/qtest/endianness-test$(EXESUF): tests/qtest/endianness-test.o
-tests/qtest/prom-env-test$(EXESUF): tests/qtest/prom-env-test.o $(libqos-obj-y)
-tests/qtest/rtas-test$(EXESUF): tests/qtest/rtas-test.o $(libqos-spapr-obj-y)
-tests/qtest/fdc-test$(EXESUF): tests/qtest/fdc-test.o
-tests/qtest/ide-test$(EXESUF): tests/qtest/ide-test.o $(libqos-pc-obj-y)
-tests/qtest/ahci-test$(EXESUF): tests/qtest/ahci-test.o $(libqos-pc-obj-y) qemu-img$(EXESUF)
-tests/qtest/ipmi-kcs-test$(EXESUF): tests/qtest/ipmi-kcs-test.o
-tests/qtest/ipmi-bt-test$(EXESUF): tests/qtest/ipmi-bt-test.o
-tests/qtest/hd-geo-test$(EXESUF): tests/qtest/hd-geo-test.o $(libqos-obj-y)
-tests/qtest/boot-order-test$(EXESUF): tests/qtest/boot-order-test.o $(libqos-obj-y)
-tests/qtest/boot-serial-test$(EXESUF): tests/qtest/boot-serial-test.o $(libqos-obj-y)
-tests/qtest/bios-tables-test$(EXESUF): tests/qtest/bios-tables-test.o \
- tests/qtest/tpm-emu.o $(test-io-obj-y) \
- tests/qtest/boot-sector.o tests/qtest/acpi-utils.o $(libqos-obj-y)
-tests/qtest/pxe-test$(EXESUF): tests/qtest/pxe-test.o tests/qtest/boot-sector.o $(libqos-obj-y)
-tests/qtest/microbit-test$(EXESUF): tests/qtest/microbit-test.o
-tests/qtest/m25p80-test$(EXESUF): tests/qtest/m25p80-test.o
-tests/qtest/i440fx-test$(EXESUF): tests/qtest/i440fx-test.o $(libqos-pc-obj-y)
-tests/qtest/q35-test$(EXESUF): tests/qtest/q35-test.o $(libqos-pc-obj-y)
-tests/qtest/fw_cfg-test$(EXESUF): tests/qtest/fw_cfg-test.o $(libqos-pc-obj-y)
-tests/qtest/rtl8139-test$(EXESUF): tests/qtest/rtl8139-test.o $(libqos-pc-obj-y)
-tests/qtest/pnv-xscom-test$(EXESUF): tests/qtest/pnv-xscom-test.o
-tests/qtest/wdt_ib700-test$(EXESUF): tests/qtest/wdt_ib700-test.o
-tests/qtest/tco-test$(EXESUF): tests/qtest/tco-test.o $(libqos-pc-obj-y)
-tests/qtest/virtio-ccw-test$(EXESUF): tests/qtest/virtio-ccw-test.o
-tests/qtest/display-vga-test$(EXESUF): tests/qtest/display-vga-test.o
-tests/qtest/qom-test$(EXESUF): tests/qtest/qom-test.o
-tests/qtest/modules-test$(EXESUF): tests/qtest/modules-test.o
-tests/qtest/test-hmp$(EXESUF): tests/qtest/test-hmp.o
-tests/qtest/machine-none-test$(EXESUF): tests/qtest/machine-none-test.o
-tests/qtest/device-plug-test$(EXESUF): tests/qtest/device-plug-test.o
-tests/qtest/drive_del-test$(EXESUF): tests/qtest/drive_del-test.o
-tests/qtest/pvpanic-test$(EXESUF): tests/qtest/pvpanic-test.o
-tests/qtest/i82801b11-test$(EXESUF): tests/qtest/i82801b11-test.o
-tests/qtest/intel-hda-test$(EXESUF): tests/qtest/intel-hda-test.o
-tests/qtest/ioh3420-test$(EXESUF): tests/qtest/ioh3420-test.o
-tests/qtest/usb-hcd-uhci-test$(EXESUF): tests/qtest/usb-hcd-uhci-test.o $(libqos-usb-obj-y)
-tests/qtest/usb-hcd-ehci-test$(EXESUF): tests/qtest/usb-hcd-ehci-test.o $(libqos-usb-obj-y)
-tests/qtest/usb-hcd-xhci-test$(EXESUF): tests/qtest/usb-hcd-xhci-test.o $(libqos-usb-obj-y)
-tests/qtest/cpu-plug-test$(EXESUF): tests/qtest/cpu-plug-test.o
-tests/qtest/migration-test$(EXESUF): tests/qtest/migration-test.o tests/qtest/migration-helpers.o
-tests/qtest/test-netfilter$(EXESUF): tests/qtest/test-netfilter.o $(qtest-obj-y)
-tests/qtest/test-filter-mirror$(EXESUF): tests/qtest/test-filter-mirror.o $(qtest-obj-y)
-tests/qtest/test-filter-redirector$(EXESUF): tests/qtest/test-filter-redirector.o $(qtest-obj-y)
-tests/qtest/test-x86-cpuid-compat$(EXESUF): tests/qtest/test-x86-cpuid-compat.o $(qtest-obj-y)
-tests/qtest/ivshmem-test$(EXESUF): tests/qtest/ivshmem-test.o contrib/ivshmem-server/ivshmem-server.o $(libqos-pc-obj-y) $(libqos-spapr-obj-y)
-tests/qtest/dbus-vmstate-test$(EXESUF): tests/qtest/dbus-vmstate-test.o tests/qtest/migration-helpers.o tests/qtest/dbus-vmstate1.o $(libqos-pc-obj-y) $(libqos-spapr-obj-y)
-tests/qtest/test-arm-mptimer$(EXESUF): tests/qtest/test-arm-mptimer.o
-tests/qtest/numa-test$(EXESUF): tests/qtest/numa-test.o
-tests/qtest/vmgenid-test$(EXESUF): tests/qtest/vmgenid-test.o tests/qtest/boot-sector.o tests/qtest/acpi-utils.o
-tests/qtest/cdrom-test$(EXESUF): tests/qtest/cdrom-test.o tests/qtest/boot-sector.o $(libqos-obj-y)
-tests/qtest/arm-cpu-features$(EXESUF): tests/qtest/arm-cpu-features.o
-tests/qtest/tpm-crb-swtpm-test$(EXESUF): tests/qtest/tpm-crb-swtpm-test.o tests/qtest/tpm-emu.o \
- tests/qtest/tpm-util.o tests/qtest/tpm-tests.o $(test-io-obj-y)
-tests/qtest/tpm-crb-test$(EXESUF): tests/qtest/tpm-crb-test.o tests/qtest/tpm-emu.o $(test-io-obj-y)
-tests/qtest/tpm-tis-swtpm-test$(EXESUF): tests/qtest/tpm-tis-swtpm-test.o tests/qtest/tpm-emu.o \
- tests/qtest/tpm-util.o tests/qtest/tpm-tests.o $(test-io-obj-y)
-tests/qtest/tpm-tis-device-swtpm-test$(EXESUF): tests/qtest/tpm-tis-device-swtpm-test.o tests/qtest/tpm-emu.o \
- tests/qtest/tpm-util.o tests/qtest/tpm-tests.o $(test-io-obj-y)
-tests/qtest/tpm-tis-test$(EXESUF): tests/qtest/tpm-tis-test.o tests/qtest/tpm-tis-util.o tests/qtest/tpm-emu.o $(test-io-obj-y)
-tests/qtest/tpm-tis-device-test$(EXESUF): tests/qtest/tpm-tis-device-test.o tests/qtest/tpm-tis-util.o tests/qtest/tpm-emu.o $(test-io-obj-y)
-
-# QTest rules
-
-TARGETS=$(patsubst %-softmmu,%, $(filter %-softmmu,$(TARGET_DIRS)))
-QTEST_TARGETS =
-# The qtests are not runnable (yet) under TSan due to a known issue.
-# https://github.com/google/sanitizers/issues/1116
-ifndef CONFIG_TSAN
-ifeq ($(CONFIG_POSIX),y)
-QTEST_TARGETS = $(TARGETS)
-check-qtest-y=$(foreach TARGET,$(TARGETS), $(check-qtest-$(TARGET)-y:%=tests/qtest/%$(EXESUF)))
-check-qtest-y += $(check-qtest-generic-y:%=tests/qtest/%$(EXESUF))
-endif
-endif
-
-qtest-obj-y = tests/qtest/libqtest.o $(test-util-obj-y)
-$(check-qtest-y): $(qtest-obj-y)
diff --git a/tests/qtest/ac97-test.c b/tests/qtest/ac97-test.c
index b084e31..e09f249 100644
--- a/tests/qtest/ac97-test.c
+++ b/tests/qtest/ac97-test.c
@@ -8,7 +8,7 @@
*/
#include "qemu/osdep.h"
-#include "libqtest.h"
+#include "libqos/libqtest.h"
#include "qemu/module.h"
#include "libqos/qgraph.h"
#include "libqos/pci.h"
diff --git a/tests/qtest/acpi-utils.h b/tests/qtest/acpi-utils.h
index 0c86780..261784d 100644
--- a/tests/qtest/acpi-utils.h
+++ b/tests/qtest/acpi-utils.h
@@ -13,7 +13,7 @@
#ifndef TEST_ACPI_UTILS_H
#define TEST_ACPI_UTILS_H
-#include "libqtest.h"
+#include "libqos/libqtest.h"
/* DSDT and SSDTs format */
typedef struct {
diff --git a/tests/qtest/ahci-test.c b/tests/qtest/ahci-test.c
index c8d42ce..ca4294f 100644
--- a/tests/qtest/ahci-test.c
+++ b/tests/qtest/ahci-test.c
@@ -25,7 +25,7 @@
#include "qemu/osdep.h"
#include <getopt.h>
-#include "libqtest.h"
+#include "libqos/libqtest.h"
#include "libqos/libqos-pc.h"
#include "libqos/ahci.h"
#include "libqos/pci-pc.h"
diff --git a/tests/qtest/arm-cpu-features.c b/tests/qtest/arm-cpu-features.c
index f7e062c..77b5e30 100644
--- a/tests/qtest/arm-cpu-features.c
+++ b/tests/qtest/arm-cpu-features.c
@@ -10,7 +10,7 @@
*/
#include "qemu/osdep.h"
#include "qemu/bitops.h"
-#include "libqtest.h"
+#include "libqos/libqtest.h"
#include "qapi/qmp/qdict.h"
#include "qapi/qmp/qjson.h"
diff --git a/tests/qtest/bios-tables-test.c b/tests/qtest/bios-tables-test.c
index d49b398..d25ff35 100644
--- a/tests/qtest/bios-tables-test.c
+++ b/tests/qtest/bios-tables-test.c
@@ -88,7 +88,7 @@ typedef struct {
static char disk[] = "tests/acpi-test-disk-XXXXXX";
static const char *data_dir = "tests/data/acpi";
#ifdef CONFIG_IASL
-static const char *iasl = stringify(CONFIG_IASL);
+static const char *iasl = CONFIG_IASL;
#else
static const char *iasl;
#endif
diff --git a/tests/qtest/boot-order-test.c b/tests/qtest/boot-order-test.c
index 2f1c072..fac580d 100644
--- a/tests/qtest/boot-order-test.c
+++ b/tests/qtest/boot-order-test.c
@@ -12,7 +12,7 @@
#include "qemu/osdep.h"
#include "libqos/fw_cfg.h"
-#include "libqtest.h"
+#include "libqos/libqtest.h"
#include "qapi/qmp/qdict.h"
#include "standard-headers/linux/qemu_fw_cfg.h"
diff --git a/tests/qtest/boot-sector.c b/tests/qtest/boot-sector.c
index 9e66c6d..24df5c4 100644
--- a/tests/qtest/boot-sector.c
+++ b/tests/qtest/boot-sector.c
@@ -13,7 +13,7 @@
#include "qemu/osdep.h"
#include "boot-sector.h"
#include "qemu-common.h"
-#include "libqtest.h"
+#include "libqos/libqtest.h"
#define LOW(x) ((x) & 0xff)
#define HIGH(x) ((x) >> 8)
diff --git a/tests/qtest/boot-sector.h b/tests/qtest/boot-sector.h
index 6ee6bb4..b339fde 100644
--- a/tests/qtest/boot-sector.h
+++ b/tests/qtest/boot-sector.h
@@ -14,7 +14,7 @@
#ifndef TEST_BOOT_SECTOR_H
#define TEST_BOOT_SECTOR_H
-#include "libqtest.h"
+#include "libqos/libqtest.h"
/* Create boot disk file. fname must be a suitable string for mkstemp() */
int boot_sector_init(char *fname);
diff --git a/tests/qtest/boot-serial-test.c b/tests/qtest/boot-serial-test.c
index bfe7624..b6b1c23 100644
--- a/tests/qtest/boot-serial-test.c
+++ b/tests/qtest/boot-serial-test.c
@@ -14,7 +14,7 @@
*/
#include "qemu/osdep.h"
-#include "libqtest.h"
+#include "libqos/libqtest.h"
#include "libqos/libqos-spapr.h"
static const uint8_t bios_avr[] = {
diff --git a/tests/qtest/cdrom-test.c b/tests/qtest/cdrom-test.c
index 833a050..e9afab6 100644
--- a/tests/qtest/cdrom-test.c
+++ b/tests/qtest/cdrom-test.c
@@ -11,7 +11,7 @@
*/
#include "qemu/osdep.h"
-#include "libqtest.h"
+#include "libqos/libqtest.h"
#include "boot-sector.h"
#include "qapi/qmp/qdict.h"
diff --git a/tests/qtest/dbus-vmstate-test.c b/tests/qtest/dbus-vmstate-test.c
index 2e5e47d..aca9b98 100644
--- a/tests/qtest/dbus-vmstate-test.c
+++ b/tests/qtest/dbus-vmstate-test.c
@@ -1,7 +1,7 @@
#include "qemu/osdep.h"
#include <glib/gstdio.h>
#include <gio/gio.h>
-#include "libqtest.h"
+#include "libqos/libqtest.h"
#include "qemu-common.h"
#include "dbus-vmstate1.h"
#include "migration-helpers.h"
diff --git a/tests/qtest/device-introspect-test.c b/tests/qtest/device-introspect-test.c
index d68b785..9f22340 100644
--- a/tests/qtest/device-introspect-test.c
+++ b/tests/qtest/device-introspect-test.c
@@ -22,7 +22,7 @@
#include "qapi/qmp/qstring.h"
#include "qapi/qmp/qdict.h"
#include "qapi/qmp/qlist.h"
-#include "libqtest.h"
+#include "libqos/libqtest.h"
const char common_args[] = "-nodefaults -machine none";
diff --git a/tests/qtest/device-plug-test.c b/tests/qtest/device-plug-test.c
index 318e422..9214892 100644
--- a/tests/qtest/device-plug-test.c
+++ b/tests/qtest/device-plug-test.c
@@ -11,7 +11,7 @@
*/
#include "qemu/osdep.h"
-#include "libqtest.h"
+#include "libqos/libqtest.h"
#include "qapi/qmp/qdict.h"
#include "qapi/qmp/qstring.h"
diff --git a/tests/qtest/drive_del-test.c b/tests/qtest/drive_del-test.c
index 5f8839b..2ab11ad 100644
--- a/tests/qtest/drive_del-test.c
+++ b/tests/qtest/drive_del-test.c
@@ -11,7 +11,7 @@
*/
#include "qemu/osdep.h"
-#include "libqtest.h"
+#include "libqos/libqtest.h"
#include "libqos/virtio.h"
#include "qapi/qmp/qdict.h"
diff --git a/tests/qtest/ds1338-test.c b/tests/qtest/ds1338-test.c
index f6ade9a..c5d46bc 100644
--- a/tests/qtest/ds1338-test.c
+++ b/tests/qtest/ds1338-test.c
@@ -18,7 +18,7 @@
*/
#include "qemu/osdep.h"
-#include "libqtest.h"
+#include "libqos/libqtest.h"
#include "libqos/i2c.h"
#define DS1338_ADDR 0x68
diff --git a/tests/qtest/e1000-test.c b/tests/qtest/e1000-test.c
index c387984..ea286d1 100644
--- a/tests/qtest/e1000-test.c
+++ b/tests/qtest/e1000-test.c
@@ -8,7 +8,7 @@
*/
#include "qemu/osdep.h"
-#include "libqtest.h"
+#include "libqos/libqtest.h"
#include "qemu/module.h"
#include "libqos/qgraph.h"
#include "libqos/pci.h"
diff --git a/tests/qtest/eepro100-test.c b/tests/qtest/eepro100-test.c
index 8dbffff..d72ad09 100644
--- a/tests/qtest/eepro100-test.c
+++ b/tests/qtest/eepro100-test.c
@@ -8,7 +8,7 @@
*/
#include "qemu/osdep.h"
-#include "libqtest.h"
+#include "libqos/libqtest.h"
#include "qemu/module.h"
#include "libqos/qgraph.h"
#include "libqos/pci.h"
diff --git a/tests/qtest/endianness-test.c b/tests/qtest/endianness-test.c
index cc088ac..4e79e22 100644
--- a/tests/qtest/endianness-test.c
+++ b/tests/qtest/endianness-test.c
@@ -13,7 +13,7 @@
#include "qemu/osdep.h"
-#include "libqtest.h"
+#include "libqos/libqtest.h"
#include "qemu/bswap.h"
typedef struct TestCase TestCase;
diff --git a/tests/qtest/es1370-test.c b/tests/qtest/es1370-test.c
index adccdac..2fd7fd2 100644
--- a/tests/qtest/es1370-test.c
+++ b/tests/qtest/es1370-test.c
@@ -8,7 +8,7 @@
*/
#include "qemu/osdep.h"
-#include "libqtest.h"
+#include "libqos/libqtest.h"
#include "qemu/module.h"
#include "libqos/qgraph.h"
#include "libqos/pci.h"
diff --git a/tests/qtest/fuzz/Makefile.include b/tests/qtest/fuzz/Makefile.include
deleted file mode 100644
index 5bde793..0000000
--- a/tests/qtest/fuzz/Makefile.include
+++ /dev/null
@@ -1,39 +0,0 @@
-QEMU_PROG_FUZZ=qemu-fuzz-$(TARGET_NAME)$(EXESUF)
-
-fuzz-obj-y += tests/qtest/libqtest.o
-fuzz-obj-y += $(libqos-obj-y)
-fuzz-obj-y += tests/qtest/fuzz/fuzz.o # Fuzzer skeleton
-fuzz-obj-y += tests/qtest/fuzz/fork_fuzz.o
-fuzz-obj-y += tests/qtest/fuzz/qos_fuzz.o
-fuzz-obj-y += tests/qtest/fuzz/qtest_wrappers.o
-
-# Targets
-fuzz-obj-$(CONFIG_PCI_I440FX) += tests/qtest/fuzz/i440fx_fuzz.o
-fuzz-obj-$(CONFIG_VIRTIO_NET) += tests/qtest/fuzz/virtio_net_fuzz.o
-fuzz-obj-$(CONFIG_SCSI) += tests/qtest/fuzz/virtio_scsi_fuzz.o
-
-FUZZ_CFLAGS += -I$(SRC_PATH)/tests -I$(SRC_PATH)/tests/qtest
-
-# Linker Script to force coverage-counters into known regions which we can mark
-# shared
-FUZZ_LDFLAGS += -Xlinker -T$(SRC_PATH)/tests/qtest/fuzz/fork_fuzz.ld
-
-FUZZ_LDFLAGS += -Wl,-wrap,qtest_inb
-FUZZ_LDFLAGS += -Wl,-wrap,qtest_inw
-FUZZ_LDFLAGS += -Wl,-wrap,qtest_inl
-FUZZ_LDFLAGS += -Wl,-wrap,qtest_outb
-FUZZ_LDFLAGS += -Wl,-wrap,qtest_outw
-FUZZ_LDFLAGS += -Wl,-wrap,qtest_outl
-FUZZ_LDFLAGS += -Wl,-wrap,qtest_readb
-FUZZ_LDFLAGS += -Wl,-wrap,qtest_readw
-FUZZ_LDFLAGS += -Wl,-wrap,qtest_readl
-FUZZ_LDFLAGS += -Wl,-wrap,qtest_readq
-FUZZ_LDFLAGS += -Wl,-wrap,qtest_writeb
-FUZZ_LDFLAGS += -Wl,-wrap,qtest_writew
-FUZZ_LDFLAGS += -Wl,-wrap,qtest_writel
-FUZZ_LDFLAGS += -Wl,-wrap,qtest_writeq
-FUZZ_LDFLAGS += -Wl,-wrap,qtest_memread
-FUZZ_LDFLAGS += -Wl,-wrap,qtest_bufread
-FUZZ_LDFLAGS += -Wl,-wrap,qtest_memwrite
-FUZZ_LDFLAGS += -Wl,-wrap,qtest_bufwrite
-FUZZ_LDFLAGS += -Wl,-wrap,qtest_memset
diff --git a/tests/qtest/fuzz/fuzz.c b/tests/qtest/fuzz/fuzz.c
index 031594a..1ceea84 100644
--- a/tests/qtest/fuzz/fuzz.c
+++ b/tests/qtest/fuzz/fuzz.c
@@ -20,7 +20,7 @@
#include "sysemu/sysemu.h"
#include "qemu/main-loop.h"
#include "qemu/rcu.h"
-#include "tests/qtest/libqtest.h"
+#include "tests/qtest/libqos/libqtest.h"
#include "tests/qtest/libqos/qgraph.h"
#include "fuzz.h"
diff --git a/tests/qtest/fuzz/fuzz.h b/tests/qtest/fuzz/fuzz.h
index 9ca3d10..8eb765e 100644
--- a/tests/qtest/fuzz/fuzz.h
+++ b/tests/qtest/fuzz/fuzz.h
@@ -18,7 +18,7 @@
#include "qemu/units.h"
#include "qapi/error.h"
-#include "tests/qtest/libqtest.h"
+#include "tests/qtest/libqos/libqtest.h"
/**
* A libfuzzer fuzzing target
diff --git a/tests/qtest/fuzz/i440fx_fuzz.c b/tests/qtest/fuzz/i440fx_fuzz.c
index bf966d4..86796bf 100644
--- a/tests/qtest/fuzz/i440fx_fuzz.c
+++ b/tests/qtest/fuzz/i440fx_fuzz.c
@@ -13,12 +13,12 @@
#include "qemu/osdep.h"
#include "qemu/main-loop.h"
-#include "tests/qtest/libqtest.h"
+#include "tests/qtest/libqos/libqtest.h"
#include "tests/qtest/libqos/pci.h"
#include "tests/qtest/libqos/pci-pc.h"
#include "fuzz.h"
-#include "fuzz/qos_fuzz.h"
-#include "fuzz/fork_fuzz.h"
+#include "qos_fuzz.h"
+#include "fork_fuzz.h"
#define I440FX_PCI_HOST_BRIDGE_CFG 0xcf8
diff --git a/tests/qtest/fuzz/meson.build b/tests/qtest/fuzz/meson.build
new file mode 100644
index 0000000..bb0a3f2
--- /dev/null
+++ b/tests/qtest/fuzz/meson.build
@@ -0,0 +1,35 @@
+specific_fuzz_ss.add(files('fuzz.c', 'fork_fuzz.c', 'qos_fuzz.c',
+ 'qtest_wrappers.c'), qos)
+
+# Targets
+specific_fuzz_ss.add(when: 'CONFIG_I440FX', if_true: files('i440fx_fuzz.c'))
+specific_fuzz_ss.add(when: 'CONFIG_VIRTIO_NET', if_true: files('virtio_net_fuzz.c'))
+specific_fuzz_ss.add(when: 'CONFIG_VIRTIO_SCSI', if_true: files('virtio_scsi_fuzz.c'))
+
+# unfortunately declare_dependency does not support link_depends, so
+# this will be duplicated in meson.build
+fork_fuzz = declare_dependency(
+ link_args: ['-fsanitize=fuzzer',
+ '-Wl,-T,' + (meson.current_source_dir() / 'fork_fuzz.ld'),
+ '-Wl,-wrap,qtest_inb',
+ '-Wl,-wrap,qtest_inw',
+ '-Wl,-wrap,qtest_inl',
+ '-Wl,-wrap,qtest_outb',
+ '-Wl,-wrap,qtest_outw',
+ '-Wl,-wrap,qtest_outl',
+ '-Wl,-wrap,qtest_readb',
+ '-Wl,-wrap,qtest_readw',
+ '-Wl,-wrap,qtest_readl',
+ '-Wl,-wrap,qtest_readq',
+ '-Wl,-wrap,qtest_writeb',
+ '-Wl,-wrap,qtest_writew',
+ '-Wl,-wrap,qtest_writel',
+ '-Wl,-wrap,qtest_writeq',
+ '-Wl,-wrap,qtest_memread',
+ '-Wl,-wrap,qtest_bufread',
+ '-Wl,-wrap,qtest_memwrite',
+ '-Wl,-wrap,qtest_bufwrite',
+ '-Wl,-wrap,qtest_memset']
+)
+
+specific_fuzz_ss.add(fork_fuzz)
diff --git a/tests/qtest/fuzz/qos_fuzz.c b/tests/qtest/fuzz/qos_fuzz.c
index d52f3eb..b943577 100644
--- a/tests/qtest/fuzz/qos_fuzz.c
+++ b/tests/qtest/fuzz/qos_fuzz.c
@@ -25,7 +25,7 @@
#include "sysemu/sysemu.h"
#include "qemu/main-loop.h"
-#include "tests/qtest/libqtest.h"
+#include "tests/qtest/libqos/libqtest.h"
#include "tests/qtest/libqos/malloc.h"
#include "tests/qtest/libqos/qgraph.h"
#include "tests/qtest/libqos/qgraph_internal.h"
diff --git a/tests/qtest/fuzz/qtest_wrappers.c b/tests/qtest/fuzz/qtest_wrappers.c
index 713c830..0580f8d 100644
--- a/tests/qtest/fuzz/qtest_wrappers.c
+++ b/tests/qtest/fuzz/qtest_wrappers.c
@@ -12,7 +12,7 @@
*/
#include "qemu/osdep.h"
-#include "cpu.h"
+#include "hw/core/cpu.h"
#include "exec/ioport.h"
#include "fuzz.h"
diff --git a/tests/qtest/fuzz/virtio_net_fuzz.c b/tests/qtest/fuzz/virtio_net_fuzz.c
index a33bd73..0e873ab 100644
--- a/tests/qtest/fuzz/virtio_net_fuzz.c
+++ b/tests/qtest/fuzz/virtio_net_fuzz.c
@@ -13,7 +13,7 @@
#include "qemu/osdep.h"
#include "standard-headers/linux/virtio_config.h"
-#include "tests/qtest/libqtest.h"
+#include "tests/qtest/libqos/libqtest.h"
#include "tests/qtest/libqos/virtio-net.h"
#include "fuzz.h"
#include "fork_fuzz.h"
@@ -61,7 +61,8 @@ static void virtio_net_fuzz_multi(QTestState *s,
* backend. Otherwise, always place the input on a virtqueue.
*/
if (vqa.rx && sockfds_initialized) {
- write(sockfds[0], Data, vqa.length);
+ int ignored = write(sockfds[0], Data, vqa.length);
+ (void) ignored;
} else {
vqa.rx = 0;
uint64_t req_addr = guest_alloc(t_alloc, vqa.length);
diff --git a/tests/qtest/fuzz/virtio_scsi_fuzz.c b/tests/qtest/fuzz/virtio_scsi_fuzz.c
index 3a9ea13..6ff6fab 100644
--- a/tests/qtest/fuzz/virtio_scsi_fuzz.c
+++ b/tests/qtest/fuzz/virtio_scsi_fuzz.c
@@ -12,10 +12,10 @@
#include "qemu/osdep.h"
-#include "tests/qtest/libqtest.h"
-#include "libqos/virtio-scsi.h"
-#include "libqos/virtio.h"
-#include "libqos/virtio-pci.h"
+#include "tests/qtest/libqos/libqtest.h"
+#include "tests/qtest/libqos/virtio-scsi.h"
+#include "tests/qtest/libqos/virtio.h"
+#include "tests/qtest/libqos/virtio-pci.h"
#include "standard-headers/linux/virtio_ids.h"
#include "standard-headers/linux/virtio_pci.h"
#include "standard-headers/linux/virtio_scsi.h"
diff --git a/tests/qtest/fw_cfg-test.c b/tests/qtest/fw_cfg-test.c
index 5dc807b..95b3907 100644
--- a/tests/qtest/fw_cfg-test.c
+++ b/tests/qtest/fw_cfg-test.c
@@ -12,7 +12,7 @@
#include "qemu/osdep.h"
-#include "libqtest.h"
+#include "libqos/libqtest.h"
#include "standard-headers/linux/qemu_fw_cfg.h"
#include "libqos/fw_cfg.h"
#include "qemu/bswap.h"
diff --git a/tests/qtest/hd-geo-test.c b/tests/qtest/hd-geo-test.c
index 48e8e02..f7b7cfb 100644
--- a/tests/qtest/hd-geo-test.c
+++ b/tests/qtest/hd-geo-test.c
@@ -19,7 +19,7 @@
#include "qemu-common.h"
#include "qemu/bswap.h"
#include "qapi/qmp/qlist.h"
-#include "libqtest.h"
+#include "libqos/libqtest.h"
#include "libqos/fw_cfg.h"
#include "libqos/libqos.h"
#include "standard-headers/linux/qemu_fw_cfg.h"
diff --git a/tests/qtest/hexloader-test.c b/tests/qtest/hexloader-test.c
index 8b7aa2d..5615020 100644
--- a/tests/qtest/hexloader-test.c
+++ b/tests/qtest/hexloader-test.c
@@ -10,7 +10,7 @@
*/
#include "qemu/osdep.h"
-#include "libqtest.h"
+#include "libqos/libqtest.h"
/* Load 'test.hex' and verify that the in-memory contents are as expected.
* 'test.hex' is a memory test pattern stored in Hexadecimal Object
diff --git a/tests/qtest/ide-test.c b/tests/qtest/ide-test.c
index 5cfd97f..3f8081e 100644
--- a/tests/qtest/ide-test.c
+++ b/tests/qtest/ide-test.c
@@ -25,7 +25,7 @@
#include "qemu/osdep.h"
-#include "libqtest.h"
+#include "libqos/libqtest.h"
#include "libqos/libqos.h"
#include "libqos/pci-pc.h"
#include "libqos/malloc-pc.h"
diff --git a/tests/qtest/ipoctal232-test.c b/tests/qtest/ipoctal232-test.c
index 53a8c9b..65ce10b 100644
--- a/tests/qtest/ipoctal232-test.c
+++ b/tests/qtest/ipoctal232-test.c
@@ -8,7 +8,7 @@
*/
#include "qemu/osdep.h"
-#include "libqtest.h"
+#include "libqos/libqtest.h"
#include "qemu/module.h"
#include "libqos/qgraph.h"
diff --git a/tests/qtest/ivshmem-test.c b/tests/qtest/ivshmem-test.c
index ecda256..d5c8b9f 100644
--- a/tests/qtest/ivshmem-test.c
+++ b/tests/qtest/ivshmem-test.c
@@ -13,7 +13,7 @@
#include "contrib/ivshmem-server/ivshmem-server.h"
#include "libqos/libqos-pc.h"
#include "libqos/libqos-spapr.h"
-#include "libqtest.h"
+#include "libqos/libqtest.h"
#include "qemu-common.h"
#define TMPSHMSIZE (1 << 20)
diff --git a/tests/qtest/libqos/aarch64-xlnx-zcu102-machine.c b/tests/qtest/libqos/aarch64-xlnx-zcu102-machine.c
index 8f827ae..79631cc 100644
--- a/tests/qtest/libqos/aarch64-xlnx-zcu102-machine.c
+++ b/tests/qtest/libqos/aarch64-xlnx-zcu102-machine.c
@@ -19,8 +19,8 @@
#include "qemu/osdep.h"
#include "libqtest.h"
#include "qemu/module.h"
-#include "libqos/malloc.h"
-#include "libqos/qgraph.h"
+#include "malloc.h"
+#include "qgraph.h"
#include "sdhci.h"
typedef struct QXlnxZCU102Machine QXlnxZCU102Machine;
diff --git a/tests/qtest/libqos/ahci.c b/tests/qtest/libqos/ahci.c
index cc1b08e..2946abc 100644
--- a/tests/qtest/libqos/ahci.c
+++ b/tests/qtest/libqos/ahci.c
@@ -25,8 +25,8 @@
#include "qemu/osdep.h"
#include "libqtest.h"
-#include "libqos/ahci.h"
-#include "libqos/pci-pc.h"
+#include "ahci.h"
+#include "pci-pc.h"
#include "qemu-common.h"
#include "qemu/host-utils.h"
@@ -579,7 +579,7 @@ void ahci_write_fis(AHCIQState *ahci, AHCICommand *cmd)
/* NCQ commands use exclusively 8 bit fields and needs no adjustment.
* Only the count field needs to be adjusted for non-NCQ commands.
* The auxiliary FIS fields are defined per-command and are not currently
- * implemented in libqos/ahci.o, but may or may not need to be flipped. */
+ * implemented in ahci.o, but may or may not need to be flipped. */
if (!cmd->props->ncq) {
tmp.count = cpu_to_le16(tmp.count);
}
diff --git a/tests/qtest/libqos/ahci.h b/tests/qtest/libqos/ahci.h
index 44ab110..88835b6 100644
--- a/tests/qtest/libqos/ahci.h
+++ b/tests/qtest/libqos/ahci.h
@@ -25,9 +25,9 @@
* THE SOFTWARE.
*/
-#include "libqos/libqos.h"
-#include "libqos/pci.h"
-#include "libqos/malloc-pc.h"
+#include "libqos.h"
+#include "pci.h"
+#include "malloc-pc.h"
/*** Supplementary PCI Config Space IDs & Masks ***/
#define PCI_DEVICE_ID_INTEL_Q35_AHCI (0x2922)
diff --git a/tests/qtest/libqos/arm-imx25-pdk-machine.c b/tests/qtest/libqos/arm-imx25-pdk-machine.c
index 0da3f19..6692adf 100644
--- a/tests/qtest/libqos/arm-imx25-pdk-machine.c
+++ b/tests/qtest/libqos/arm-imx25-pdk-machine.c
@@ -20,9 +20,9 @@
#include "qemu/osdep.h"
#include "libqtest.h"
-#include "libqos/malloc.h"
-#include "libqos/qgraph.h"
-#include "libqos/i2c.h"
+#include "malloc.h"
+#include "qgraph.h"
+#include "i2c.h"
#define ARM_PAGE_SIZE 4096
#define IMX25_PDK_RAM_START 0x80000000
diff --git a/tests/qtest/libqos/arm-n800-machine.c b/tests/qtest/libqos/arm-n800-machine.c
index 35f8207..ff2049c 100644
--- a/tests/qtest/libqos/arm-n800-machine.c
+++ b/tests/qtest/libqos/arm-n800-machine.c
@@ -20,9 +20,9 @@
#include "qemu/osdep.h"
#include "libqtest.h"
-#include "libqos/malloc.h"
-#include "libqos/qgraph.h"
-#include "libqos/i2c.h"
+#include "malloc.h"
+#include "qgraph.h"
+#include "i2c.h"
#define ARM_PAGE_SIZE 4096
#define N800_RAM_START 0x80000000
diff --git a/tests/qtest/libqos/arm-raspi2-machine.c b/tests/qtest/libqos/arm-raspi2-machine.c
index 8480d80..35bb470 100644
--- a/tests/qtest/libqos/arm-raspi2-machine.c
+++ b/tests/qtest/libqos/arm-raspi2-machine.c
@@ -19,8 +19,8 @@
#include "qemu/osdep.h"
#include "libqtest.h"
#include "qemu/module.h"
-#include "libqos/malloc.h"
-#include "libqos/qgraph.h"
+#include "malloc.h"
+#include "qgraph.h"
#include "sdhci.h"
#define ARM_PAGE_SIZE 4096
diff --git a/tests/qtest/libqos/arm-sabrelite-machine.c b/tests/qtest/libqos/arm-sabrelite-machine.c
index f6e403b..72425f0 100644
--- a/tests/qtest/libqos/arm-sabrelite-machine.c
+++ b/tests/qtest/libqos/arm-sabrelite-machine.c
@@ -19,8 +19,8 @@
#include "qemu/osdep.h"
#include "libqtest.h"
#include "qemu/module.h"
-#include "libqos/malloc.h"
-#include "libqos/qgraph.h"
+#include "malloc.h"
+#include "qgraph.h"
#include "sdhci.h"
#define ARM_PAGE_SIZE 4096
diff --git a/tests/qtest/libqos/arm-smdkc210-machine.c b/tests/qtest/libqos/arm-smdkc210-machine.c
index eebac7f..321b882 100644
--- a/tests/qtest/libqos/arm-smdkc210-machine.c
+++ b/tests/qtest/libqos/arm-smdkc210-machine.c
@@ -19,8 +19,8 @@
#include "qemu/osdep.h"
#include "libqtest.h"
#include "qemu/module.h"
-#include "libqos/malloc.h"
-#include "libqos/qgraph.h"
+#include "malloc.h"
+#include "qgraph.h"
#include "sdhci.h"
#define ARM_PAGE_SIZE 4096
diff --git a/tests/qtest/libqos/arm-virt-machine.c b/tests/qtest/libqos/arm-virt-machine.c
index 9316598..e0f5932 100644
--- a/tests/qtest/libqos/arm-virt-machine.c
+++ b/tests/qtest/libqos/arm-virt-machine.c
@@ -19,9 +19,9 @@
#include "qemu/osdep.h"
#include "libqtest.h"
#include "qemu/module.h"
-#include "libqos/malloc.h"
-#include "libqos/qgraph.h"
-#include "libqos/virtio-mmio.h"
+#include "malloc.h"
+#include "qgraph.h"
+#include "virtio-mmio.h"
#define ARM_PAGE_SIZE 4096
#define VIRTIO_MMIO_BASE_ADDR 0x0A003E00
diff --git a/tests/qtest/libqos/arm-xilinx-zynq-a9-machine.c b/tests/qtest/libqos/arm-xilinx-zynq-a9-machine.c
index 473acce..56e53c7 100644
--- a/tests/qtest/libqos/arm-xilinx-zynq-a9-machine.c
+++ b/tests/qtest/libqos/arm-xilinx-zynq-a9-machine.c
@@ -19,8 +19,8 @@
#include "qemu/osdep.h"
#include "libqtest.h"
#include "qemu/module.h"
-#include "libqos/malloc.h"
-#include "libqos/qgraph.h"
+#include "malloc.h"
+#include "qgraph.h"
#include "sdhci.h"
typedef struct QXilinxZynqA9Machine QXilinxZynqA9Machine;
diff --git a/tests/qtest/libqos/e1000e.c b/tests/qtest/libqos/e1000e.c
index e2927ed..a451f61 100644
--- a/tests/qtest/libqos/e1000e.c
+++ b/tests/qtest/libqos/e1000e.c
@@ -18,13 +18,13 @@
#include "qemu/osdep.h"
#include "libqtest.h"
-#include "libqos/pci-pc.h"
+#include "pci-pc.h"
#include "qemu/sockets.h"
#include "qemu/iov.h"
#include "qemu/module.h"
#include "qemu/bitops.h"
-#include "libqos/malloc.h"
-#include "libqos/qgraph.h"
+#include "malloc.h"
+#include "qgraph.h"
#include "e1000e.h"
#define E1000E_IMS (0x00d0)
diff --git a/tests/qtest/libqos/e1000e.h b/tests/qtest/libqos/e1000e.h
index 35183b2..a22f5fd 100644
--- a/tests/qtest/libqos/e1000e.h
+++ b/tests/qtest/libqos/e1000e.h
@@ -19,7 +19,7 @@
#ifndef QGRAPH_E1000E_H
#define QGRAPH_E1000E_H
-#include "libqos/qgraph.h"
+#include "qgraph.h"
#include "pci.h"
#define E1000E_RX0_MSG_ID (0)
diff --git a/tests/qtest/libqos/fw_cfg.c b/tests/qtest/libqos/fw_cfg.c
index 1f46258..6b8e1ba 100644
--- a/tests/qtest/libqos/fw_cfg.c
+++ b/tests/qtest/libqos/fw_cfg.c
@@ -13,7 +13,7 @@
*/
#include "qemu/osdep.h"
-#include "libqos/fw_cfg.h"
+#include "fw_cfg.h"
#include "libqtest.h"
#include "qemu/bswap.h"
#include "hw/nvram/fw_cfg.h"
diff --git a/tests/qtest/libqos/i2c-imx.c b/tests/qtest/libqos/i2c-imx.c
index f33ece5..8f9a7e3 100644
--- a/tests/qtest/libqos/i2c-imx.c
+++ b/tests/qtest/libqos/i2c-imx.c
@@ -18,7 +18,7 @@
*/
#include "qemu/osdep.h"
-#include "libqos/i2c.h"
+#include "i2c.h"
#include "libqtest.h"
diff --git a/tests/qtest/libqos/i2c-omap.c b/tests/qtest/libqos/i2c-omap.c
index 9ae8214..eb4e453 100644
--- a/tests/qtest/libqos/i2c-omap.c
+++ b/tests/qtest/libqos/i2c-omap.c
@@ -7,7 +7,7 @@
* See the COPYING file in the top-level directory.
*/
#include "qemu/osdep.h"
-#include "libqos/i2c.h"
+#include "i2c.h"
#include "qemu/bswap.h"
diff --git a/tests/qtest/libqos/i2c.c b/tests/qtest/libqos/i2c.c
index 38f800d..ade1bdb 100644
--- a/tests/qtest/libqos/i2c.c
+++ b/tests/qtest/libqos/i2c.c
@@ -7,7 +7,7 @@
* See the COPYING file in the top-level directory.
*/
#include "qemu/osdep.h"
-#include "libqos/i2c.h"
+#include "i2c.h"
#include "libqtest.h"
void qi2c_send(QI2CDevice *i2cdev, const uint8_t *buf, uint16_t len)
diff --git a/tests/qtest/libqos/i2c.h b/tests/qtest/libqos/i2c.h
index c65f087..1341bac 100644
--- a/tests/qtest/libqos/i2c.h
+++ b/tests/qtest/libqos/i2c.h
@@ -10,7 +10,7 @@
#define LIBQOS_I2C_H
#include "libqtest.h"
-#include "libqos/qgraph.h"
+#include "qgraph.h"
typedef struct I2CAdapter I2CAdapter;
struct I2CAdapter {
diff --git a/tests/qtest/libqos/libqos-pc.c b/tests/qtest/libqos/libqos-pc.c
index d04abc5..db420a5 100644
--- a/tests/qtest/libqos/libqos-pc.c
+++ b/tests/qtest/libqos/libqos-pc.c
@@ -1,7 +1,7 @@
#include "qemu/osdep.h"
-#include "libqos/libqos-pc.h"
-#include "libqos/malloc-pc.h"
-#include "libqos/pci-pc.h"
+#include "libqos-pc.h"
+#include "malloc-pc.h"
+#include "pci-pc.h"
static QOSOps qos_ops = {
.alloc_init = pc_alloc_init,
diff --git a/tests/qtest/libqos/libqos-pc.h b/tests/qtest/libqos/libqos-pc.h
index a0e4c45..1a9923e 100644
--- a/tests/qtest/libqos/libqos-pc.h
+++ b/tests/qtest/libqos/libqos-pc.h
@@ -1,7 +1,7 @@
#ifndef LIBQOS_PC_H
#define LIBQOS_PC_H
-#include "libqos/libqos.h"
+#include "libqos.h"
QOSState *qtest_pc_vboot(const char *cmdline_fmt, va_list ap);
QOSState *qtest_pc_boot(const char *cmdline_fmt, ...);
diff --git a/tests/qtest/libqos/libqos-spapr.c b/tests/qtest/libqos/libqos-spapr.c
index 8766d54..db0e87b 100644
--- a/tests/qtest/libqos/libqos-spapr.c
+++ b/tests/qtest/libqos/libqos-spapr.c
@@ -1,7 +1,7 @@
#include "qemu/osdep.h"
-#include "libqos/libqos-spapr.h"
-#include "libqos/malloc-spapr.h"
-#include "libqos/pci-spapr.h"
+#include "libqos-spapr.h"
+#include "malloc-spapr.h"
+#include "pci-spapr.h"
static QOSOps qos_ops = {
.alloc_init = spapr_alloc_init,
diff --git a/tests/qtest/libqos/libqos-spapr.h b/tests/qtest/libqos/libqos-spapr.h
index 49bd72d..c613389 100644
--- a/tests/qtest/libqos/libqos-spapr.h
+++ b/tests/qtest/libqos/libqos-spapr.h
@@ -1,7 +1,7 @@
#ifndef LIBQOS_SPAPR_H
#define LIBQOS_SPAPR_H
-#include "libqos/libqos.h"
+#include "libqos.h"
QOSState *qtest_spapr_vboot(const char *cmdline_fmt, va_list ap);
QOSState *qtest_spapr_boot(const char *cmdline_fmt, ...);
diff --git a/tests/qtest/libqos/libqos.c b/tests/qtest/libqos/libqos.c
index f229eb2..2251e86 100644
--- a/tests/qtest/libqos/libqos.c
+++ b/tests/qtest/libqos/libqos.c
@@ -2,8 +2,8 @@
#include <sys/wait.h>
#include "libqtest.h"
-#include "libqos/libqos.h"
-#include "libqos/pci.h"
+#include "libqos.h"
+#include "pci.h"
#include "qapi/qmp/qdict.h"
/*** Test Setup & Teardown ***/
diff --git a/tests/qtest/libqos/libqos.h b/tests/qtest/libqos/libqos.h
index 8e971c2..e0b2bfe 100644
--- a/tests/qtest/libqos/libqos.h
+++ b/tests/qtest/libqos/libqos.h
@@ -2,8 +2,8 @@
#define LIBQOS_H
#include "libqtest.h"
-#include "libqos/pci.h"
-#include "libqos/malloc.h"
+#include "pci.h"
+#include "malloc.h"
typedef struct QOSState QOSState;
diff --git a/tests/qtest/libqtest.h b/tests/qtest/libqos/libqtest.h
index f5cf93c..f5cf93c 100644
--- a/tests/qtest/libqtest.h
+++ b/tests/qtest/libqos/libqtest.h
diff --git a/tests/qtest/libqos/malloc-pc.c b/tests/qtest/libqos/malloc-pc.c
index 6f92ce4..16ff960 100644
--- a/tests/qtest/libqos/malloc-pc.c
+++ b/tests/qtest/libqos/malloc-pc.c
@@ -11,8 +11,8 @@
*/
#include "qemu/osdep.h"
-#include "libqos/malloc-pc.h"
-#include "libqos/fw_cfg.h"
+#include "malloc-pc.h"
+#include "fw_cfg.h"
#include "standard-headers/linux/qemu_fw_cfg.h"
diff --git a/tests/qtest/libqos/malloc-pc.h b/tests/qtest/libqos/malloc-pc.h
index 21e75ae..d8d7985 100644
--- a/tests/qtest/libqos/malloc-pc.h
+++ b/tests/qtest/libqos/malloc-pc.h
@@ -13,7 +13,7 @@
#ifndef LIBQOS_MALLOC_PC_H
#define LIBQOS_MALLOC_PC_H
-#include "libqos/malloc.h"
+#include "malloc.h"
void pc_alloc_init(QGuestAllocator *s, QTestState *qts, QAllocOpts flags);
diff --git a/tests/qtest/libqos/malloc-spapr.c b/tests/qtest/libqos/malloc-spapr.c
index 2a6b7e3..84862e4 100644
--- a/tests/qtest/libqos/malloc-spapr.c
+++ b/tests/qtest/libqos/malloc-spapr.c
@@ -6,7 +6,7 @@
*/
#include "qemu/osdep.h"
-#include "libqos/malloc-spapr.h"
+#include "malloc-spapr.h"
#include "qemu-common.h"
diff --git a/tests/qtest/libqos/malloc-spapr.h b/tests/qtest/libqos/malloc-spapr.h
index e5fe9bf..f99572f 100644
--- a/tests/qtest/libqos/malloc-spapr.h
+++ b/tests/qtest/libqos/malloc-spapr.h
@@ -8,7 +8,7 @@
#ifndef LIBQOS_MALLOC_SPAPR_H
#define LIBQOS_MALLOC_SPAPR_H
-#include "libqos/malloc.h"
+#include "malloc.h"
void spapr_alloc_init(QGuestAllocator *s, QTestState *qts, QAllocOpts flags);
diff --git a/tests/qtest/libqos/malloc.c b/tests/qtest/libqos/malloc.c
index 615422a..f708b01 100644
--- a/tests/qtest/libqos/malloc.c
+++ b/tests/qtest/libqos/malloc.c
@@ -11,7 +11,7 @@
*/
#include "qemu/osdep.h"
-#include "libqos/malloc.h"
+#include "malloc.h"
#include "qemu-common.h"
#include "qemu/host-utils.h"
diff --git a/tests/qtest/libqos/meson.build b/tests/qtest/libqos/meson.build
new file mode 100644
index 0000000..19931b9
--- /dev/null
+++ b/tests/qtest/libqos/meson.build
@@ -0,0 +1,57 @@
+libqos = static_library('qos',
+ files('../libqtest.c',
+ 'qgraph.c',
+ 'qos_external.c',
+ 'pci.c',
+ 'fw_cfg.c',
+ 'malloc.c',
+ 'libqos.c',
+
+ # spapr
+ 'malloc-spapr.c',
+ 'libqos-spapr.c',
+ 'rtas.c',
+ 'pci-spapr.c',
+
+ # pc
+ 'pci-pc.c',
+ 'malloc-pc.c',
+ 'libqos-pc.c',
+ 'ahci.c',
+
+ # usb
+ 'usb.c',
+
+ # qgraph devices:
+ 'e1000e.c',
+ 'i2c.c',
+ 'i2c-imx.c',
+ 'i2c-omap.c',
+ 'sdhci.c',
+ 'tpci200.c',
+ 'virtio.c',
+ 'virtio-9p.c',
+ 'virtio-balloon.c',
+ 'virtio-blk.c',
+ 'virtio-mmio.c',
+ 'virtio-net.c',
+ 'virtio-pci.c',
+ 'virtio-pci-modern.c',
+ 'virtio-rng.c',
+ 'virtio-scsi.c',
+ 'virtio-serial.c',
+
+ # qgraph machines:
+ 'aarch64-xlnx-zcu102-machine.c',
+ 'arm-imx25-pdk-machine.c',
+ 'arm-n800-machine.c',
+ 'arm-raspi2-machine.c',
+ 'arm-sabrelite-machine.c',
+ 'arm-smdkc210-machine.c',
+ 'arm-virt-machine.c',
+ 'arm-xilinx-zynq-a9-machine.c',
+ 'ppc64_pseries-machine.c',
+ 'x86_64_pc-machine.c',
+), build_by_default: false)
+
+qos = declare_dependency(link_whole: libqos)
diff --git a/tests/qtest/libqos/pci-pc.c b/tests/qtest/libqos/pci-pc.c
index 3bb2eb3..f978442 100644
--- a/tests/qtest/libqos/pci-pc.c
+++ b/tests/qtest/libqos/pci-pc.c
@@ -12,7 +12,7 @@
#include "qemu/osdep.h"
#include "libqtest.h"
-#include "libqos/pci-pc.h"
+#include "pci-pc.h"
#include "qapi/qmp/qdict.h"
#include "hw/pci/pci_regs.h"
diff --git a/tests/qtest/libqos/pci-pc.h b/tests/qtest/libqos/pci-pc.h
index 4690005..49ec950 100644
--- a/tests/qtest/libqos/pci-pc.h
+++ b/tests/qtest/libqos/pci-pc.h
@@ -13,9 +13,9 @@
#ifndef LIBQOS_PCI_PC_H
#define LIBQOS_PCI_PC_H
-#include "libqos/pci.h"
-#include "libqos/malloc.h"
-#include "libqos/qgraph.h"
+#include "pci.h"
+#include "malloc.h"
+#include "qgraph.h"
typedef struct QPCIBusPC {
QOSGraphObject obj;
diff --git a/tests/qtest/libqos/pci-spapr.c b/tests/qtest/libqos/pci-spapr.c
index d6f8c01..2622269 100644
--- a/tests/qtest/libqos/pci-spapr.c
+++ b/tests/qtest/libqos/pci-spapr.c
@@ -7,9 +7,9 @@
#include "qemu/osdep.h"
#include "libqtest.h"
-#include "libqos/pci-spapr.h"
-#include "libqos/rtas.h"
-#include "libqos/qgraph.h"
+#include "pci-spapr.h"
+#include "rtas.h"
+#include "qgraph.h"
#include "hw/pci/pci_regs.h"
diff --git a/tests/qtest/libqos/pci-spapr.h b/tests/qtest/libqos/pci-spapr.h
index d9e2563..20a4371 100644
--- a/tests/qtest/libqos/pci-spapr.h
+++ b/tests/qtest/libqos/pci-spapr.h
@@ -8,9 +8,9 @@
#ifndef LIBQOS_PCI_SPAPR_H
#define LIBQOS_PCI_SPAPR_H
-#include "libqos/malloc.h"
-#include "libqos/pci.h"
-#include "libqos/qgraph.h"
+#include "malloc.h"
+#include "pci.h"
+#include "qgraph.h"
/* From include/hw/pci-host/spapr.h */
diff --git a/tests/qtest/libqos/pci.c b/tests/qtest/libqos/pci.c
index 2309a72..e1e9618 100644
--- a/tests/qtest/libqos/pci.c
+++ b/tests/qtest/libqos/pci.c
@@ -11,11 +11,11 @@
*/
#include "qemu/osdep.h"
-#include "libqos/pci.h"
+#include "pci.h"
#include "hw/pci/pci_regs.h"
#include "qemu/host-utils.h"
-#include "libqos/qgraph.h"
+#include "qgraph.h"
void qpci_device_foreach(QPCIBus *bus, int vendor_id, int device_id,
void (*func)(QPCIDevice *dev, int devfn, void *data),
diff --git a/tests/qtest/libqos/pci.h b/tests/qtest/libqos/pci.h
index 590c175..ee64fde 100644
--- a/tests/qtest/libqos/pci.h
+++ b/tests/qtest/libqos/pci.h
@@ -14,7 +14,7 @@
#define LIBQOS_PCI_H
#include "libqtest.h"
-#include "libqos/qgraph.h"
+#include "qgraph.h"
#define QPCI_PIO_LIMIT 0x10000
diff --git a/tests/qtest/libqos/ppc64_pseries-machine.c b/tests/qtest/libqos/ppc64_pseries-machine.c
index 5d7bd88..24ca179 100644
--- a/tests/qtest/libqos/ppc64_pseries-machine.c
+++ b/tests/qtest/libqos/ppc64_pseries-machine.c
@@ -18,10 +18,10 @@
#include "qemu/osdep.h"
#include "libqtest.h"
-#include "libqos/qgraph.h"
+#include "qgraph.h"
#include "pci-spapr.h"
#include "qemu/module.h"
-#include "libqos/malloc-spapr.h"
+#include "malloc-spapr.h"
typedef struct QSPAPR_pci_host QSPAPR_pci_host;
typedef struct Qppc64_pseriesMachine Qppc64_pseriesMachine;
diff --git a/tests/qtest/libqos/qgraph.c b/tests/qtest/libqos/qgraph.c
index eb0af8a..fc49cfa 100644
--- a/tests/qtest/libqos/qgraph.c
+++ b/tests/qtest/libqos/qgraph.c
@@ -19,8 +19,8 @@
#include "qemu/osdep.h"
#include "libqtest.h"
#include "qemu/queue.h"
-#include "libqos/qgraph_internal.h"
-#include "libqos/qgraph.h"
+#include "qgraph_internal.h"
+#include "qgraph.h"
#define QGRAPH_PRINT_DEBUG 0
#define QOS_ROOT ""
diff --git a/tests/qtest/libqos/qgraph.h b/tests/qtest/libqos/qgraph.h
index db1244e..5f63d35 100644
--- a/tests/qtest/libqos/qgraph.h
+++ b/tests/qtest/libqos/qgraph.h
@@ -106,7 +106,7 @@ typedef void *(*QOSBeforeTest) (GString *cmd_line, void *arg);
* <example>
* <title>Creating new driver an its interface</title>
* <programlisting>
- #include "libqos/qgraph.h"
+ #include "qgraph.h"
struct My_driver {
QOSGraphObject obj;
@@ -190,7 +190,7 @@ typedef void *(*QOSBeforeTest) (GString *cmd_line, void *arg);
* <example>
* <title>Creating new test</title>
* <programlisting>
- * #include "libqos/qgraph.h"
+ * #include "qgraph.h"
*
* static void my_test_function(void *obj, void *data)
* {
@@ -226,11 +226,11 @@ typedef void *(*QOSBeforeTest) (GString *cmd_line, void *arg);
* my_test <--consumed_by-- my_interface <--produces--+
*
* Assuming there the binary is
- * QTEST_QEMU_BINARY=x86_64-softmmu/qemu-system-x86_64
+ * QTEST_QEMU_BINARY=./qemu-system-x86_64
* a valid test path will be:
* "/x86_64/pc/other_node/my_driver/my_interface/my_test".
*
- * Additional examples are also in libqos/test-qgraph.c
+ * Additional examples are also in test-qgraph.c
*
* Command line:
* Command line is built by using node names and optional arguments
diff --git a/tests/qtest/libqos/qgraph_internal.h b/tests/qtest/libqos/qgraph_internal.h
index aa3123f..968fa69 100644
--- a/tests/qtest/libqos/qgraph_internal.h
+++ b/tests/qtest/libqos/qgraph_internal.h
@@ -20,11 +20,11 @@
#define QGRAPH_INTERNAL_H
/* This header is declaring additional helper functions defined in
- * libqos/qgraph.c
+ * qgraph.c
* It should not be included in tests
*/
-#include "libqos/qgraph.h"
+#include "qgraph.h"
typedef struct QOSGraphMachine QOSGraphMachine;
typedef enum QOSEdgeType QOSEdgeType;
diff --git a/tests/qtest/libqos/qos_external.c b/tests/qtest/libqos/qos_external.c
index 0dfc05c..10ee0f7 100644
--- a/tests/qtest/libqos/qos_external.c
+++ b/tests/qtest/libqos/qos_external.c
@@ -24,10 +24,10 @@
#include "qapi/qmp/qstring.h"
#include "qemu/module.h"
#include "qapi/qmp/qlist.h"
-#include "libqos/malloc.h"
-#include "libqos/qgraph.h"
-#include "libqos/qgraph_internal.h"
-#include "libqos/qos_external.h"
+#include "malloc.h"
+#include "qgraph.h"
+#include "qgraph_internal.h"
+#include "qos_external.h"
static void machine_apply_to_node(const char *name)
{
diff --git a/tests/qtest/libqos/qos_external.h b/tests/qtest/libqos/qos_external.h
index 56a2f37..8446e3d 100644
--- a/tests/qtest/libqos/qos_external.h
+++ b/tests/qtest/libqos/qos_external.h
@@ -19,7 +19,9 @@
#ifndef QOS_EXTERNAL_H
#define QOS_EXTERNAL_H
-#include "libqos/malloc.h"
+#include "qgraph.h"
+
+#include "malloc.h"
#include "qapi/qapi-types-machine.h"
#include "qapi/qapi-types-qom.h"
diff --git a/tests/qtest/libqos/rtas.c b/tests/qtest/libqos/rtas.c
index d81ff42..db29d55 100644
--- a/tests/qtest/libqos/rtas.c
+++ b/tests/qtest/libqos/rtas.c
@@ -5,7 +5,7 @@
#include "qemu/osdep.h"
#include "libqtest.h"
-#include "libqos/rtas.h"
+#include "rtas.h"
static void qrtas_copy_args(QTestState *qts, uint64_t target_args,
uint32_t nargs, uint32_t *args)
diff --git a/tests/qtest/libqos/rtas.h b/tests/qtest/libqos/rtas.h
index 459e23a..f38f99d 100644
--- a/tests/qtest/libqos/rtas.h
+++ b/tests/qtest/libqos/rtas.h
@@ -5,7 +5,7 @@
#ifndef LIBQOS_RTAS_H
#define LIBQOS_RTAS_H
-#include "libqos/malloc.h"
+#include "malloc.h"
int qrtas_get_time_of_day(QTestState *qts, QGuestAllocator *alloc,
struct tm *tm, uint32_t *ns);
diff --git a/tests/qtest/libqos/sdhci.c b/tests/qtest/libqos/sdhci.c
index fbf2e36..65f0d07 100644
--- a/tests/qtest/libqos/sdhci.c
+++ b/tests/qtest/libqos/sdhci.c
@@ -18,7 +18,7 @@
#include "qemu/osdep.h"
#include "libqtest.h"
-#include "libqos/qgraph.h"
+#include "qgraph.h"
#include "pci.h"
#include "qemu/module.h"
#include "sdhci.h"
diff --git a/tests/qtest/libqos/sdhci.h b/tests/qtest/libqos/sdhci.h
index 1acd309..22d647b 100644
--- a/tests/qtest/libqos/sdhci.h
+++ b/tests/qtest/libqos/sdhci.h
@@ -19,7 +19,7 @@
#ifndef QGRAPH_QSDHCI_H
#define QGRAPH_QSDHCI_H
-#include "libqos/qgraph.h"
+#include "qgraph.h"
#include "pci.h"
typedef struct QSDHCI QSDHCI;
diff --git a/tests/qtest/libqos/tpci200.c b/tests/qtest/libqos/tpci200.c
index ae590a4..1787b1f 100644
--- a/tests/qtest/libqos/tpci200.c
+++ b/tests/qtest/libqos/tpci200.c
@@ -10,8 +10,8 @@
#include "qemu/osdep.h"
#include "libqtest.h"
#include "qemu/module.h"
-#include "libqos/qgraph.h"
-#include "libqos/pci.h"
+#include "qgraph.h"
+#include "pci.h"
typedef struct QTpci200 QTpci200;
typedef struct QIpack QIpack;
diff --git a/tests/qtest/libqos/usb.c b/tests/qtest/libqos/usb.c
index d7a9cb3..8b45b02 100644
--- a/tests/qtest/libqos/usb.c
+++ b/tests/qtest/libqos/usb.c
@@ -14,7 +14,7 @@
#include "qemu/osdep.h"
#include "libqtest.h"
#include "hw/usb/uhci-regs.h"
-#include "libqos/usb.h"
+#include "usb.h"
void qusb_pci_init_one(QPCIBus *pcibus, struct qhc *hc, uint32_t devfn, int bar)
{
diff --git a/tests/qtest/libqos/usb.h b/tests/qtest/libqos/usb.h
index eeced39..50030d7 100644
--- a/tests/qtest/libqos/usb.h
+++ b/tests/qtest/libqos/usb.h
@@ -1,7 +1,7 @@
#ifndef LIBQOS_USB_H
#define LIBQOS_USB_H
-#include "libqos/pci-pc.h"
+#include "pci-pc.h"
struct qhc {
QPCIDevice *dev;
diff --git a/tests/qtest/libqos/virtio-9p.c b/tests/qtest/libqos/virtio-9p.c
index c87b561..2e30006 100644
--- a/tests/qtest/libqos/virtio-9p.c
+++ b/tests/qtest/libqos/virtio-9p.c
@@ -20,8 +20,8 @@
#include "libqtest.h"
#include "qemu/module.h"
#include "standard-headers/linux/virtio_ids.h"
-#include "libqos/virtio-9p.h"
-#include "libqos/qgraph.h"
+#include "virtio-9p.h"
+#include "qgraph.h"
static QGuestAllocator *alloc;
diff --git a/tests/qtest/libqos/virtio-9p.h b/tests/qtest/libqos/virtio-9p.h
index be9621a..b1e6bad 100644
--- a/tests/qtest/libqos/virtio-9p.h
+++ b/tests/qtest/libqos/virtio-9p.h
@@ -19,9 +19,9 @@
#ifndef TESTS_LIBQOS_VIRTIO_9P_H
#define TESTS_LIBQOS_VIRTIO_9P_H
-#include "libqos/qgraph.h"
-#include "libqos/virtio.h"
-#include "libqos/virtio-pci.h"
+#include "qgraph.h"
+#include "virtio.h"
+#include "virtio-pci.h"
typedef struct QVirtio9P QVirtio9P;
typedef struct QVirtio9PPCI QVirtio9PPCI;
diff --git a/tests/qtest/libqos/virtio-balloon.c b/tests/qtest/libqos/virtio-balloon.c
index 9745f4a..a3da5c2 100644
--- a/tests/qtest/libqos/virtio-balloon.c
+++ b/tests/qtest/libqos/virtio-balloon.c
@@ -19,8 +19,8 @@
#include "qemu/osdep.h"
#include "libqtest.h"
#include "qemu/module.h"
-#include "libqos/qgraph.h"
-#include "libqos/virtio-balloon.h"
+#include "qgraph.h"
+#include "virtio-balloon.h"
/* virtio-balloon-device */
static void *qvirtio_balloon_get_driver(QVirtioBalloon *v_balloon,
diff --git a/tests/qtest/libqos/virtio-balloon.h b/tests/qtest/libqos/virtio-balloon.h
index 5b91930..309894c 100644
--- a/tests/qtest/libqos/virtio-balloon.h
+++ b/tests/qtest/libqos/virtio-balloon.h
@@ -19,9 +19,9 @@
#ifndef TESTS_LIBQOS_VIRTIO_BALLOON_H
#define TESTS_LIBQOS_VIRTIO_BALLOON_H
-#include "libqos/qgraph.h"
-#include "libqos/virtio.h"
-#include "libqos/virtio-pci.h"
+#include "qgraph.h"
+#include "virtio.h"
+#include "virtio-pci.h"
typedef struct QVirtioBalloon QVirtioBalloon;
typedef struct QVirtioBalloonPCI QVirtioBalloonPCI;
diff --git a/tests/qtest/libqos/virtio-blk.c b/tests/qtest/libqos/virtio-blk.c
index 5fc6940..5da0259 100644
--- a/tests/qtest/libqos/virtio-blk.c
+++ b/tests/qtest/libqos/virtio-blk.c
@@ -20,8 +20,8 @@
#include "libqtest.h"
#include "qemu/module.h"
#include "standard-headers/linux/virtio_blk.h"
-#include "libqos/qgraph.h"
-#include "libqos/virtio-blk.h"
+#include "qgraph.h"
+#include "virtio-blk.h"
#define PCI_SLOT 0x04
#define PCI_FN 0x00
diff --git a/tests/qtest/libqos/virtio-blk.h b/tests/qtest/libqos/virtio-blk.h
index 5170f13..dcef388 100644
--- a/tests/qtest/libqos/virtio-blk.h
+++ b/tests/qtest/libqos/virtio-blk.h
@@ -19,9 +19,9 @@
#ifndef TESTS_LIBQOS_VIRTIO_BLK_H
#define TESTS_LIBQOS_VIRTIO_BLK_H
-#include "libqos/qgraph.h"
-#include "libqos/virtio.h"
-#include "libqos/virtio-pci.h"
+#include "qgraph.h"
+#include "virtio.h"
+#include "virtio-pci.h"
typedef struct QVirtioBlk QVirtioBlk;
typedef struct QVirtioBlkPCI QVirtioBlkPCI;
diff --git a/tests/qtest/libqos/virtio-mmio.c b/tests/qtest/libqos/virtio-mmio.c
index e0a2bd7..75efda3 100644
--- a/tests/qtest/libqos/virtio-mmio.c
+++ b/tests/qtest/libqos/virtio-mmio.c
@@ -10,10 +10,10 @@
#include "qemu/osdep.h"
#include "libqtest.h"
#include "qemu/module.h"
-#include "libqos/virtio.h"
-#include "libqos/virtio-mmio.h"
-#include "libqos/malloc.h"
-#include "libqos/qgraph.h"
+#include "virtio.h"
+#include "virtio-mmio.h"
+#include "malloc.h"
+#include "qgraph.h"
#include "standard-headers/linux/virtio_ring.h"
static uint8_t qvirtio_mmio_config_readb(QVirtioDevice *d, uint64_t off)
diff --git a/tests/qtest/libqos/virtio-mmio.h b/tests/qtest/libqos/virtio-mmio.h
index 0e45778..30803bc 100644
--- a/tests/qtest/libqos/virtio-mmio.h
+++ b/tests/qtest/libqos/virtio-mmio.h
@@ -10,8 +10,8 @@
#ifndef LIBQOS_VIRTIO_MMIO_H
#define LIBQOS_VIRTIO_MMIO_H
-#include "libqos/virtio.h"
-#include "libqos/qgraph.h"
+#include "virtio.h"
+#include "qgraph.h"
#define QVIRTIO_MMIO_MAGIC_VALUE 0x000
#define QVIRTIO_MMIO_VERSION 0x004
diff --git a/tests/qtest/libqos/virtio-net.c b/tests/qtest/libqos/virtio-net.c
index a9e253a..1cae07f 100644
--- a/tests/qtest/libqos/virtio-net.c
+++ b/tests/qtest/libqos/virtio-net.c
@@ -19,8 +19,8 @@
#include "qemu/osdep.h"
#include "libqtest.h"
#include "qemu/module.h"
-#include "libqos/qgraph.h"
-#include "libqos/virtio-net.h"
+#include "qgraph.h"
+#include "virtio-net.h"
#include "hw/virtio/virtio-net.h"
diff --git a/tests/qtest/libqos/virtio-net.h b/tests/qtest/libqos/virtio-net.h
index b8cbec0..5ba2161 100644
--- a/tests/qtest/libqos/virtio-net.h
+++ b/tests/qtest/libqos/virtio-net.h
@@ -19,9 +19,9 @@
#ifndef TESTS_LIBQOS_VIRTIO_NET_H
#define TESTS_LIBQOS_VIRTIO_NET_H
-#include "libqos/qgraph.h"
-#include "libqos/virtio.h"
-#include "libqos/virtio-pci.h"
+#include "qgraph.h"
+#include "virtio.h"
+#include "virtio-pci.h"
typedef struct QVirtioNet QVirtioNet;
typedef struct QVirtioNetPCI QVirtioNetPCI;
diff --git a/tests/qtest/libqos/virtio-pci.c b/tests/qtest/libqos/virtio-pci.c
index 62851c2..cd3c0f5 100644
--- a/tests/qtest/libqos/virtio-pci.c
+++ b/tests/qtest/libqos/virtio-pci.c
@@ -9,13 +9,13 @@
#include "qemu/osdep.h"
#include "libqtest.h"
-#include "libqos/virtio.h"
-#include "libqos/virtio-pci.h"
-#include "libqos/pci.h"
-#include "libqos/pci-pc.h"
-#include "libqos/malloc.h"
-#include "libqos/malloc-pc.h"
-#include "libqos/qgraph.h"
+#include "virtio.h"
+#include "virtio-pci.h"
+#include "pci.h"
+#include "pci-pc.h"
+#include "malloc.h"
+#include "malloc-pc.h"
+#include "qgraph.h"
#include "standard-headers/linux/virtio_ring.h"
#include "standard-headers/linux/virtio_pci.h"
diff --git a/tests/qtest/libqos/virtio-pci.h b/tests/qtest/libqos/virtio-pci.h
index 294d556..f5115ca 100644
--- a/tests/qtest/libqos/virtio-pci.h
+++ b/tests/qtest/libqos/virtio-pci.h
@@ -10,9 +10,9 @@
#ifndef LIBQOS_VIRTIO_PCI_H
#define LIBQOS_VIRTIO_PCI_H
-#include "libqos/virtio.h"
-#include "libqos/pci.h"
-#include "libqos/qgraph.h"
+#include "virtio.h"
+#include "pci.h"
+#include "qgraph.h"
typedef struct QVirtioPCIMSIXOps QVirtioPCIMSIXOps;
diff --git a/tests/qtest/libqos/virtio-rng.c b/tests/qtest/libqos/virtio-rng.c
index 46f8d95..2e09dd7 100644
--- a/tests/qtest/libqos/virtio-rng.c
+++ b/tests/qtest/libqos/virtio-rng.c
@@ -19,8 +19,8 @@
#include "qemu/osdep.h"
#include "libqtest.h"
#include "qemu/module.h"
-#include "libqos/qgraph.h"
-#include "libqos/virtio-rng.h"
+#include "qgraph.h"
+#include "virtio-rng.h"
/* virtio-rng-device */
static void *qvirtio_rng_get_driver(QVirtioRng *v_rng,
diff --git a/tests/qtest/libqos/virtio-rng.h b/tests/qtest/libqos/virtio-rng.h
index 9342372..9ca102b 100644
--- a/tests/qtest/libqos/virtio-rng.h
+++ b/tests/qtest/libqos/virtio-rng.h
@@ -19,9 +19,9 @@
#ifndef TESTS_LIBQOS_VIRTIO_RNG_H
#define TESTS_LIBQOS_VIRTIO_RNG_H
-#include "libqos/qgraph.h"
-#include "libqos/virtio.h"
-#include "libqos/virtio-pci.h"
+#include "qgraph.h"
+#include "virtio.h"
+#include "virtio-pci.h"
typedef struct QVirtioRng QVirtioRng;
typedef struct QVirtioRngPCI QVirtioRngPCI;
diff --git a/tests/qtest/libqos/virtio-scsi.c b/tests/qtest/libqos/virtio-scsi.c
index c8c3598..5644e32 100644
--- a/tests/qtest/libqos/virtio-scsi.c
+++ b/tests/qtest/libqos/virtio-scsi.c
@@ -20,8 +20,8 @@
#include "libqtest.h"
#include "qemu/module.h"
#include "standard-headers/linux/virtio_ids.h"
-#include "libqos/qgraph.h"
-#include "libqos/virtio-scsi.h"
+#include "qgraph.h"
+#include "virtio-scsi.h"
/* virtio-scsi-device */
static void *qvirtio_scsi_get_driver(QVirtioSCSI *v_scsi,
diff --git a/tests/qtest/libqos/virtio-scsi.h b/tests/qtest/libqos/virtio-scsi.h
index 9e3774d..531315e 100644
--- a/tests/qtest/libqos/virtio-scsi.h
+++ b/tests/qtest/libqos/virtio-scsi.h
@@ -19,9 +19,9 @@
#ifndef TESTS_LIBQOS_VIRTIO_SCSI_H
#define TESTS_LIBQOS_VIRTIO_SCSI_H
-#include "libqos/qgraph.h"
-#include "libqos/virtio.h"
-#include "libqos/virtio-pci.h"
+#include "qgraph.h"
+#include "virtio.h"
+#include "virtio-pci.h"
typedef struct QVirtioSCSI QVirtioSCSI;
typedef struct QVirtioSCSIPCI QVirtioSCSIPCI;
diff --git a/tests/qtest/libqos/virtio-serial.c b/tests/qtest/libqos/virtio-serial.c
index b956540..ee34afd 100644
--- a/tests/qtest/libqos/virtio-serial.c
+++ b/tests/qtest/libqos/virtio-serial.c
@@ -19,8 +19,8 @@
#include "qemu/osdep.h"
#include "libqtest.h"
#include "qemu/module.h"
-#include "libqos/qgraph.h"
-#include "libqos/virtio-serial.h"
+#include "qgraph.h"
+#include "virtio-serial.h"
static void *qvirtio_serial_get_driver(QVirtioSerial *v_serial,
const char *interface)
diff --git a/tests/qtest/libqos/virtio-serial.h b/tests/qtest/libqos/virtio-serial.h
index 3328c6c..3db43b2 100644
--- a/tests/qtest/libqos/virtio-serial.h
+++ b/tests/qtest/libqos/virtio-serial.h
@@ -19,9 +19,9 @@
#ifndef TESTS_LIBQOS_VIRTIO_SERIAL_H
#define TESTS_LIBQOS_VIRTIO_SERIAL_H
-#include "libqos/qgraph.h"
-#include "libqos/virtio.h"
-#include "libqos/virtio-pci.h"
+#include "qgraph.h"
+#include "virtio.h"
+#include "virtio-pci.h"
typedef struct QVirtioSerial QVirtioSerial;
typedef struct QVirtioSerialPCI QVirtioSerialPCI;
diff --git a/tests/qtest/libqos/virtio.c b/tests/qtest/libqos/virtio.c
index 9aa3606..6fe7bf9 100644
--- a/tests/qtest/libqos/virtio.c
+++ b/tests/qtest/libqos/virtio.c
@@ -10,7 +10,7 @@
#include "qemu/osdep.h"
#include "qemu/bswap.h"
#include "libqtest.h"
-#include "libqos/virtio.h"
+#include "virtio.h"
#include "standard-headers/linux/virtio_config.h"
#include "standard-headers/linux/virtio_ring.h"
diff --git a/tests/qtest/libqos/virtio.h b/tests/qtest/libqos/virtio.h
index 529ef75..b8bd06e 100644
--- a/tests/qtest/libqos/virtio.h
+++ b/tests/qtest/libqos/virtio.h
@@ -10,7 +10,7 @@
#ifndef LIBQOS_VIRTIO_H
#define LIBQOS_VIRTIO_H
-#include "libqos/malloc.h"
+#include "malloc.h"
#include "standard-headers/linux/virtio_ring.h"
#define QVIRTIO_F_BAD_FEATURE 0x40000000ull
diff --git a/tests/qtest/libqos/x86_64_pc-machine.c b/tests/qtest/libqos/x86_64_pc-machine.c
index 0edb1c9..ad96742 100644
--- a/tests/qtest/libqos/x86_64_pc-machine.c
+++ b/tests/qtest/libqos/x86_64_pc-machine.c
@@ -18,7 +18,7 @@
#include "qemu/osdep.h"
#include "libqtest.h"
-#include "libqos/qgraph.h"
+#include "qgraph.h"
#include "pci-pc.h"
#include "qemu/module.h"
#include "malloc-pc.h"
diff --git a/tests/qtest/libqtest-single.h b/tests/qtest/libqtest-single.h
index 6f1bb13..176979a 100644
--- a/tests/qtest/libqtest-single.h
+++ b/tests/qtest/libqtest-single.h
@@ -11,7 +11,7 @@
#ifndef LIBQTEST_SINGLE_H
#define LIBQTEST_SINGLE_H
-#include "libqtest.h"
+#include "libqos/libqtest.h"
QTestState *global_qtest __attribute__((common, weak));
diff --git a/tests/qtest/libqtest.c b/tests/qtest/libqtest.c
index fd46805..26f1223 100644
--- a/tests/qtest/libqtest.c
+++ b/tests/qtest/libqtest.c
@@ -20,7 +20,7 @@
#include <sys/wait.h>
#include <sys/un.h>
-#include "libqtest.h"
+#include "libqos/libqtest.h"
#include "qemu-common.h"
#include "qemu/ctype.h"
#include "qemu/cutils.h"
diff --git a/tests/qtest/m48t59-test.c b/tests/qtest/m48t59-test.c
index b94a123..6db3234 100644
--- a/tests/qtest/m48t59-test.c
+++ b/tests/qtest/m48t59-test.c
@@ -14,7 +14,7 @@
#include "qemu/osdep.h"
-#include "libqtest.h"
+#include "libqos/libqtest.h"
#define RTC_SECONDS 0x9
#define RTC_MINUTES 0xa
diff --git a/tests/qtest/machine-none-test.c b/tests/qtest/machine-none-test.c
index 57107f1..aab06b9 100644
--- a/tests/qtest/machine-none-test.c
+++ b/tests/qtest/machine-none-test.c
@@ -14,7 +14,7 @@
#include "qemu-common.h"
#include "qemu/cutils.h"
-#include "libqtest.h"
+#include "libqos/libqtest.h"
#include "qapi/qmp/qdict.h"
diff --git a/tests/qtest/megasas-test.c b/tests/qtest/megasas-test.c
index d6796b9..eae70ff 100644
--- a/tests/qtest/megasas-test.c
+++ b/tests/qtest/megasas-test.c
@@ -8,7 +8,7 @@
*/
#include "qemu/osdep.h"
-#include "libqtest.h"
+#include "libqos/libqtest.h"
#include "qemu/bswap.h"
#include "qemu/module.h"
#include "libqos/qgraph.h"
diff --git a/tests/qtest/meson.build b/tests/qtest/meson.build
new file mode 100644
index 0000000..8f8fdb1
--- /dev/null
+++ b/tests/qtest/meson.build
@@ -0,0 +1,257 @@
+# All QTests for now are POSIX-only, but the dependencies are
+# really in libqtest, not in the testcases themselves.
+if not config_host.has_key('CONFIG_POSIX')
+ subdir_done()
+endif
+
+qtests_generic = [
+ 'cdrom-test',
+ 'device-introspect-test',
+ 'machine-none-test',
+ 'qmp-test',
+ 'qmp-cmd-test',
+ 'qom-test',
+ 'test-hmp',
+ 'qos-test',
+]
+if config_host.has_key('CONFIG_MODULES')
+ qtests_generic += [ 'modules-test' ]
+endif
+
+qtests_pci = \
+ (config_all_devices.has_key('CONFIG_VGA') ? ['display-vga-test'] : []) + \
+ (config_all_devices.has_key('CONFIG_IVSHMEM_DEVICE') ? ['ivshmem-test'] : [])
+
+qtests_i386 = \
+ (config_host.has_key('CONFIG_SLIRP') ? ['pxe-test', 'test-netfilter'] : []) + \
+ (config_host.has_key('CONFIG_POSIX') ? ['test-filter-mirror'] : []) + \
+ (have_tools ? ['ahci-test'] : []) + \
+ (config_all_devices.has_key('CONFIG_ISA_TESTDEV') ? ['endianness-test'] : []) + \
+ (config_all_devices.has_key('CONFIG_SGA') ? ['boot-serial-test'] : []) + \
+ (config_all_devices.has_key('CONFIG_RTL8139_PCI') ? ['test-filter-redirector'] : []) + \
+ (config_all_devices.has_key('CONFIG_ISA_IPMI_KCS') ? ['ipmi-kcs-test'] : []) + \
+ (config_host.has_key('CONFIG_LINUX') and \
+ config_all_devices.has_key('CONFIG_ISA_IPMI_BT') ? ['ipmi-bt-test'] : []) + \
+ (config_all_devices.has_key('CONFIG_WDT_IB700') ? ['wdt_ib700-test'] : []) + \
+ (config_all_devices.has_key('CONFIG_PVPANIC') ? ['pvpanic-test'] : []) + \
+ (config_all_devices.has_key('CONFIG_HDA') ? ['intel-hda-test'] : []) + \
+ (config_all_devices.has_key('CONFIG_I82801B11') ? ['i82801b11-test'] : []) + \
+ (config_all_devices.has_key('CONFIG_IOH3420') ? ['ioh3420-test'] : []) + \
+ (config_all_devices.has_key('CONFIG_USB_UHCI') ? ['usb-hcd-uhci-test'] : []) + \
+ (config_all_devices.has_key('CONFIG_USB_UHCI') and \
+ config_all_devices.has_key('CONFIG_USB_EHCI') ? ['usb-hcd-ehci-test'] : []) + \
+ (config_all_devices.has_key('CONFIG_USB_XHCI_NEC') ? ['usb-hcd-xhci-test'] : []) + \
+ (config_all_devices.has_key('CONFIG_TPM_CRB') ? ['tpm-crb-test'] : []) + \
+ (config_all_devices.has_key('CONFIG_TPM_CRB') ? ['tpm-crb-swtpm-test'] : []) + \
+ (config_all_devices.has_key('CONFIG_TPM_TIS_ISA') ? ['tpm-tis-test'] : []) + \
+ (config_all_devices.has_key('CONFIG_TPM_TIS_ISA') ? ['tpm-tis-swtpm-test'] : []) + \
+ (config_all_devices.has_key('CONFIG_RTL8139_PCI') ? ['rtl8139-test'] : []) + \
+ qtests_pci + \
+ ['fdc-test',
+ 'ide-test',
+ 'ahci-test',
+ 'hd-geo-test',
+ 'boot-order-test',
+ 'bios-tables-test',
+ 'rtc-test',
+ 'i440fx-test',
+ 'fw_cfg-test',
+ 'device-plug-test',
+ 'drive_del-test',
+ 'tco-test',
+ 'cpu-plug-test',
+ 'q35-test',
+ 'vmgenid-test',
+ 'migration-test',
+ 'test-x86-cpuid-compat',
+ 'numa-test']
+
+dbus_daemon = find_program('dbus-daemon', required: false)
+if dbus_daemon.found() and config_host.has_key('GDBUS_CODEGEN')
+ # Temporarily disabled due to Patchew failures:
+ #qtests_i386 += ['dbus-vmstate-test']
+ dbus_vmstate1 = custom_target('dbus-vmstate description',
+ output: ['dbus-vmstate1.h', 'dbus-vmstate1.c'],
+ input: files('dbus-vmstate1.xml'),
+ command: [config_host['GDBUS_CODEGEN'],
+ '@INPUT@',
+ '--interface-prefix', 'org.qemu',
+ '--generate-c-code', '@BASENAME@']).to_list()
+else
+ dbus_vmstate1 = []
+endif
+
+qtests_x86_64 = qtests_i386
+
+qtests_alpha = [ 'boot-serial-test' ] + \
+ (config_all_devices.has_key('CONFIG_VGA') ? ['display-vga-test'] : [])
+
+qtests_avr = [ 'boot-serial-test' ]
+
+qtests_hppa = [ 'boot-serial-test' ] + \
+ (config_all_devices.has_key('CONFIG_VGA') ? ['display-vga-test'] : [])
+
+qtests_m68k = [ 'boot-serial-test' ]
+qtests_microblaze = [ 'boot-serial-test' ]
+qtests_microblazeel = qtests_microblaze
+
+qtests_mips = \
+ (config_all_devices.has_key('CONFIG_ISA_TESTDEV') ? ['endianness-test'] : []) + \
+ (config_all_devices.has_key('CONFIG_VGA') ? ['display-vga-test'] : [])
+
+qtests_mips64 = \
+ (config_all_devices.has_key('CONFIG_ISA_TESTDEV') ? ['endianness-test'] : []) + \
+ (config_all_devices.has_key('CONFIG_VGA') ? ['display-vga-test'] : [])
+
+qtests_mips64el = \
+ (config_all_devices.has_key('CONFIG_ISA_TESTDEV') ? ['endianness-test'] : []) + \
+ (config_all_devices.has_key('CONFIG_VGA') ? ['display-vga-test'] : [])
+
+qtests_moxie = [ 'boot-serial-test' ]
+
+qtests_ppc = \
+ (config_all_devices.has_key('CONFIG_ISA_TESTDEV') ? ['endianness-test'] : []) + \
+ (config_all_devices.has_key('CONFIG_M48T59') ? ['m48t59-test'] : []) + \
+ ['boot-order-test', 'prom-env-test', 'drive_del-test', 'boot-serial-test'] \
+
+qtests_ppc64 = \
+ (config_all_devices.has_key('CONFIG_PSERIES') ? ['device-plug-test'] : []) + \
+ (config_all_devices.has_key('CONFIG_POWERNV') ? ['pnv-xscom-test'] : []) + \
+ (config_all_devices.has_key('CONFIG_PSERIES') ? ['rtas-test'] : []) + \
+ (config_host.has_key('CONFIG_SLIRP') ? ['pxe-test', 'test-netfilter'] : []) + \
+ (config_all_devices.has_key('CONFIG_USB_UHCI') ? ['usb-hcd-uhci-test'] : []) + \
+ (config_all_devices.has_key('CONFIG_USB_XHCI_NEC') ? ['usb-hcd-xhci-test'] : []) + \
+ (config_host.has_key('CONFIG_POSIX') ? ['test-filter-mirror'] : []) + \
+ qtests_pci + ['migration-test', 'numa-test', 'cpu-plug-test']
+
+qtests_sh4 = (config_all_devices.has_key('CONFIG_ISA_TESTDEV') ? ['endianness-test'] : [])
+qtests_sh4eb = (config_all_devices.has_key('CONFIG_ISA_TESTDEV') ? ['endianness-test'] : [])
+
+qtests_sparc = ['prom-env-test', 'm48t59-test', 'boot-serial-test']
+
+qtests_sparc64 = \
+ (config_all_devices.has_key('CONFIG_ISA_TESTDEV') ? ['endianness-test'] : []) + \
+ ['prom-env-test', 'boot-serial-test']
+
+qtests_arm = \
+ (config_all_devices.has_key('CONFIG_PFLASH_CFI02') ? ['pflash-cfi02-test'] : []) + \
+ ['arm-cpu-features',
+ 'microbit-test',
+ 'm25p80-test',
+ 'test-arm-mptimer',
+ 'boot-serial-test',
+ 'hexloader-test']
+
+# TODO: once aarch64 TCG is fixed on ARM 32 bit host, make bios-tables-test unconditional
+qtests_aarch64 = \
+ (cpu != 'arm' ? ['bios-tables-test'] : []) + \
+ (config_all_devices.has_key('CONFIG_TPM_TIS_SYSBUS') ? ['tpm-tis-device-test'] : []) + \
+ (config_all_devices.has_key('CONFIG_TPM_TIS_SYSBUS') ? ['tpm-tis-device-swtpm-test'] : []) + \
+ ['numa-test',
+ 'boot-serial-test',
+ 'migration-test']
+
+qtests_s390x = \
+ (config_host.has_key('CONFIG_SLIRP') ? ['pxe-test', 'test-netfilter'] : []) + \
+ (config_host.has_key('CONFIG_POSIX') ? ['test-filter-mirror'] : []) + \
+ (config_host.has_key('CONFIG_POSIX') ? ['test-filter-redirector'] : []) + \
+ ['boot-serial-test',
+ 'drive_del-test',
+ 'device-plug-test',
+ 'virtio-ccw-test',
+ 'cpu-plug-test',
+ 'migration-test']
+
+qos_test_ss = ss.source_set()
+qos_test_ss.add(
+ 'ac97-test.c',
+ 'ds1338-test.c',
+ 'e1000-test.c',
+ 'e1000e-test.c',
+ 'eepro100-test.c',
+ 'es1370-test.c',
+ 'ipoctal232-test.c',
+ 'megasas-test.c',
+ 'ne2000-test.c',
+ 'tulip-test.c',
+ 'nvme-test.c',
+ 'pca9552-test.c',
+ 'pci-test.c',
+ 'pcnet-test.c',
+ 'sdhci-test.c',
+ 'spapr-phb-test.c',
+ 'tmp105-test.c',
+ 'usb-hcd-ohci-test.c',
+ 'virtio-test.c',
+ 'virtio-blk-test.c',
+ 'virtio-net-test.c',
+ 'virtio-rng-test.c',
+ 'virtio-scsi-test.c',
+ 'virtio-serial-test.c',
+ 'vmxnet3-test.c',
+)
+qos_test_ss.add(when: 'CONFIG_VIRTFS', if_true: files('virtio-9p-test.c'))
+qos_test_ss.add(when: 'CONFIG_VHOST_USER', if_true: files('vhost-user-test.c'))
+
+extra_qtest_deps = {
+ 'bios-tables-test': [io],
+ 'ivshmem-test': [rt],
+ 'qos-test': [chardev, io],
+ 'tpm-crb-swtpm-test': [io],
+ 'tpm-crb-test': [io],
+ 'tpm-tis-swtpm-test': [io],
+ 'tpm-tis-test': [io],
+ 'tpm-tis-device-swtpm-test': [io],
+ 'tpm-tis-device-test': [io],
+}
+extra_qtest_srcs = {
+ 'bios-tables-test': files('boot-sector.c', 'acpi-utils.c', 'tpm-emu.c'),
+ 'pxe-test': files('boot-sector.c'),
+ 'cdrom-test': files('boot-sector.c'),
+ 'migration-test': files('migration-helpers.c'),
+ 'ivshmem-test': files('../../contrib/ivshmem-server/ivshmem-server.c'),
+ 'dbus-vmstate-test': files('migration-helpers.c') + dbus_vmstate1,
+ 'vmgenid-test': files('boot-sector.c', 'acpi-utils.c'),
+ 'tpm-crb-swtpm-test': files('tpm-emu.c', 'tpm-util.c', 'tpm-tests.c'),
+ 'tpm-crb-test': files('tpm-emu.c', 'tpm-util.c', 'tpm-tests.c'),
+ 'tpm-tis-device-swtpm-test': files('tpm-emu.c', 'tpm-util.c', 'tpm-tis-util.c', 'tpm-tests.c'),
+ 'tpm-tis-device-test': files('tpm-emu.c', 'tpm-util.c', 'tpm-tis-util.c', 'tpm-tests.c'),
+ 'tpm-tis-swtpm-test': files('tpm-emu.c', 'tpm-util.c', 'tpm-tis-util.c', 'tpm-tests.c'),
+ 'tpm-tis-test': files('tpm-emu.c', 'tpm-util.c', 'tpm-tis-util.c', 'tpm-tests.c'),
+ 'qos-test': qos_test_ss.apply(config_host, strict: false).sources()
+}
+
+
+qtest_executables = {}
+foreach dir : target_dirs
+ if not dir.endswith('-softmmu')
+ continue
+ endif
+
+ target_base = dir.split('-')[0]
+ qtests = get_variable('qtests_' + target_base, []) + qtests_generic
+
+ qtest_env = environment()
+ qtest_env.set('QTEST_QEMU_IMG', './qemu-img')
+ qtest_env.set('G_TEST_DBUS_DAEMON', meson.source_root() / 'tests/dbus-vmstate-daemon.sh')
+ qtest_env.set('QTEST_QEMU_BINARY', './qemu-system-' + target_base)
+
+ foreach test : qtests
+ # Executables are shared across targets, declare them only the first time we
+ # encounter them
+ if not qtest_executables.has_key(test)
+ qtest_executables += {
+ test: executable(test,
+ files(test + '.c') + extra_qtest_srcs.get(test, []),
+ dependencies: [qemuutil, qos] + extra_qtest_deps.get(test, []))
+ }
+ endif
+ # FIXME: missing dependency on the emulator binary and qemu-img
+ test('qtest-@0@: @1@'.format(target_base, test),
+ qtest_executables[test],
+ env: qtest_env,
+ args: ['--tap', '-k'],
+ protocol: 'tap',
+ suite: ['qtest', 'qtest-' + target_base])
+ endforeach
+endforeach
diff --git a/tests/qtest/microbit-test.c b/tests/qtest/microbit-test.c
index 04e199e..2b25557 100644
--- a/tests/qtest/microbit-test.c
+++ b/tests/qtest/microbit-test.c
@@ -16,7 +16,7 @@
#include "qemu/osdep.h"
#include "exec/hwaddr.h"
-#include "libqtest.h"
+#include "libqos/libqtest.h"
#include "hw/arm/nrf51.h"
#include "hw/char/nrf51_uart.h"
diff --git a/tests/qtest/migration-helpers.h b/tests/qtest/migration-helpers.h
index a11808b..d63bba9 100644
--- a/tests/qtest/migration-helpers.h
+++ b/tests/qtest/migration-helpers.h
@@ -12,7 +12,7 @@
#ifndef MIGRATION_HELPERS_H_
#define MIGRATION_HELPERS_H_
-#include "libqtest.h"
+#include "libqos/libqtest.h"
extern bool got_stop;
diff --git a/tests/qtest/migration-test.c b/tests/qtest/migration-test.c
index 21ea5ba..00a233c 100644
--- a/tests/qtest/migration-test.c
+++ b/tests/qtest/migration-test.c
@@ -12,7 +12,7 @@
#include "qemu/osdep.h"
-#include "libqtest.h"
+#include "libqos/libqtest.h"
#include "qapi/error.h"
#include "qapi/qmp/qdict.h"
#include "qemu/module.h"
@@ -25,7 +25,7 @@
#include "qapi/qobject-output-visitor.h"
#include "migration-helpers.h"
-#include "migration/migration-test.h"
+#include "tests/migration/migration-test.h"
/* TODO actually test the results and get rid of this */
#define qtest_qmp_discard_response(...) qobject_unref(qtest_qmp(__VA_ARGS__))
diff --git a/tests/qtest/modules-test.c b/tests/qtest/modules-test.c
index 8821768..c238b3f 100644
--- a/tests/qtest/modules-test.c
+++ b/tests/qtest/modules-test.c
@@ -1,5 +1,5 @@
#include "qemu/osdep.h"
-#include "libqtest.h"
+#include "libqos/libqtest.h"
const char common_args[] = "-nodefaults -machine none";
diff --git a/tests/qtest/ne2000-test.c b/tests/qtest/ne2000-test.c
index 3fc0e55..43cfc45 100644
--- a/tests/qtest/ne2000-test.c
+++ b/tests/qtest/ne2000-test.c
@@ -8,7 +8,7 @@
*/
#include "qemu/osdep.h"
-#include "libqtest.h"
+#include "libqos/libqtest.h"
#include "qemu/module.h"
#include "libqos/qgraph.h"
#include "libqos/pci.h"
diff --git a/tests/qtest/numa-test.c b/tests/qtest/numa-test.c
index e1ed6d4..b25ebf9 100644
--- a/tests/qtest/numa-test.c
+++ b/tests/qtest/numa-test.c
@@ -10,7 +10,7 @@
*/
#include "qemu/osdep.h"
-#include "libqtest.h"
+#include "libqos/libqtest.h"
#include "qapi/qmp/qdict.h"
#include "qapi/qmp/qlist.h"
diff --git a/tests/qtest/nvme-test.c b/tests/qtest/nvme-test.c
index ff04421..d32c953 100644
--- a/tests/qtest/nvme-test.c
+++ b/tests/qtest/nvme-test.c
@@ -10,7 +10,7 @@
#include "qemu/osdep.h"
#include "qemu/module.h"
#include "qemu/units.h"
-#include "libqtest.h"
+#include "libqos/libqtest.h"
#include "libqos/qgraph.h"
#include "libqos/pci.h"
diff --git a/tests/qtest/pca9552-test.c b/tests/qtest/pca9552-test.c
index d80ed93..42a1312 100644
--- a/tests/qtest/pca9552-test.c
+++ b/tests/qtest/pca9552-test.c
@@ -9,7 +9,7 @@
#include "qemu/osdep.h"
-#include "libqtest.h"
+#include "libqos/libqtest.h"
#include "libqos/qgraph.h"
#include "libqos/i2c.h"
#include "hw/misc/pca9552_regs.h"
diff --git a/tests/qtest/pci-test.c b/tests/qtest/pci-test.c
index 4b2092b..e15d4d9 100644
--- a/tests/qtest/pci-test.c
+++ b/tests/qtest/pci-test.c
@@ -8,7 +8,7 @@
*/
#include "qemu/osdep.h"
-#include "libqtest.h"
+#include "libqos/libqtest.h"
#include "qemu/module.h"
#include "libqos/qgraph.h"
#include "libqos/pci.h"
diff --git a/tests/qtest/pcnet-test.c b/tests/qtest/pcnet-test.c
index 900944f..7583aeb 100644
--- a/tests/qtest/pcnet-test.c
+++ b/tests/qtest/pcnet-test.c
@@ -8,7 +8,7 @@
*/
#include "qemu/osdep.h"
-#include "libqtest.h"
+#include "libqos/libqtest.h"
#include "qemu/module.h"
#include "libqos/qgraph.h"
#include "libqos/pci.h"
diff --git a/tests/qtest/pflash-cfi02-test.c b/tests/qtest/pflash-cfi02-test.c
index 17aa669..afb702b 100644
--- a/tests/qtest/pflash-cfi02-test.c
+++ b/tests/qtest/pflash-cfi02-test.c
@@ -8,7 +8,7 @@
*/
#include "qemu/osdep.h"
-#include "libqtest.h"
+#include "libqos/libqtest.h"
/*
* To test the pflash_cfi02 device, we run QEMU with the musicpal machine with
diff --git a/tests/qtest/pnv-xscom-test.c b/tests/qtest/pnv-xscom-test.c
index 2c46d5c..c8d4043 100644
--- a/tests/qtest/pnv-xscom-test.c
+++ b/tests/qtest/pnv-xscom-test.c
@@ -8,7 +8,7 @@
*/
#include "qemu/osdep.h"
-#include "libqtest.h"
+#include "libqos/libqtest.h"
typedef enum PnvChipType {
PNV_CHIP_POWER8E, /* AKA Murano (default) */
diff --git a/tests/qtest/prom-env-test.c b/tests/qtest/prom-env-test.c
index 60e6ec3..f41d801 100644
--- a/tests/qtest/prom-env-test.c
+++ b/tests/qtest/prom-env-test.c
@@ -20,7 +20,7 @@
*/
#include "qemu/osdep.h"
-#include "libqtest.h"
+#include "libqos/libqtest.h"
#include "libqos/libqos-spapr.h"
#define MAGIC 0xcafec0de
diff --git a/tests/qtest/pvpanic-test.c b/tests/qtest/pvpanic-test.c
index ff9176a..e576394 100644
--- a/tests/qtest/pvpanic-test.c
+++ b/tests/qtest/pvpanic-test.c
@@ -8,7 +8,7 @@
*/
#include "qemu/osdep.h"
-#include "libqtest.h"
+#include "libqos/libqtest.h"
#include "qapi/qmp/qdict.h"
static void test_panic(void)
diff --git a/tests/qtest/pxe-test.c b/tests/qtest/pxe-test.c
index 1161a77..32bbae3 100644
--- a/tests/qtest/pxe-test.c
+++ b/tests/qtest/pxe-test.c
@@ -15,7 +15,7 @@
#include "qemu/osdep.h"
#include <glib/gstdio.h>
#include "qemu-common.h"
-#include "libqtest.h"
+#include "libqos/libqtest.h"
#include "boot-sector.h"
#include "libqos/libqos-spapr.h"
diff --git a/tests/qtest/q35-test.c b/tests/qtest/q35-test.c
index c922d81..b7cf144 100644
--- a/tests/qtest/q35-test.c
+++ b/tests/qtest/q35-test.c
@@ -10,7 +10,7 @@
*/
#include "qemu/osdep.h"
-#include "libqtest.h"
+#include "libqos/libqtest.h"
#include "libqos/pci.h"
#include "libqos/pci-pc.h"
#include "hw/pci-host/q35.h"
diff --git a/tests/qtest/qmp-cmd-test.c b/tests/qtest/qmp-cmd-test.c
index f7b1aa7..f34e688 100644
--- a/tests/qtest/qmp-cmd-test.c
+++ b/tests/qtest/qmp-cmd-test.c
@@ -11,7 +11,7 @@
*/
#include "qemu/osdep.h"
-#include "libqtest.h"
+#include "libqos/libqtest.h"
#include "qapi/error.h"
#include "qapi/qapi-visit-introspect.h"
#include "qapi/qmp/qdict.h"
diff --git a/tests/qtest/qmp-test.c b/tests/qtest/qmp-test.c
index 1a8876b..5950c3e 100644
--- a/tests/qtest/qmp-test.c
+++ b/tests/qtest/qmp-test.c
@@ -11,7 +11,7 @@
*/
#include "qemu/osdep.h"
-#include "libqtest.h"
+#include "libqos/libqtest.h"
#include "qapi/error.h"
#include "qapi/qapi-visit-control.h"
#include "qapi/qmp/qdict.h"
diff --git a/tests/qtest/qom-test.c b/tests/qtest/qom-test.c
index 1acf0d7..eb34af8 100644
--- a/tests/qtest/qom-test.c
+++ b/tests/qtest/qom-test.c
@@ -13,7 +13,7 @@
#include "qapi/qmp/qdict.h"
#include "qapi/qmp/qlist.h"
#include "qemu/cutils.h"
-#include "libqtest.h"
+#include "libqos/libqtest.h"
static void test_properties(QTestState *qts, const char *path, bool recurse)
{
diff --git a/tests/qtest/rtas-test.c b/tests/qtest/rtas-test.c
index 167b42d..16751db 100644
--- a/tests/qtest/rtas-test.c
+++ b/tests/qtest/rtas-test.c
@@ -1,6 +1,6 @@
#include "qemu/osdep.h"
#include "qemu/cutils.h"
-#include "libqtest.h"
+#include "libqos/libqtest.h"
#include "libqos/libqos-spapr.h"
#include "libqos/rtas.h"
@@ -31,7 +31,7 @@ int main(int argc, char *argv[])
g_test_init(&argc, &argv, NULL);
if (strcmp(arch, "ppc64")) {
- g_printerr("RTAS requires ppc64-softmmu/qemu-system-ppc64\n");
+ g_printerr("RTAS requires qemu-system-ppc64\n");
exit(EXIT_FAILURE);
}
qtest_add_func("rtas/get-time-of-day", test_rtas_get_time_of_day);
diff --git a/tests/qtest/sdhci-test.c b/tests/qtest/sdhci-test.c
index 6275e76..a110cfe 100644
--- a/tests/qtest/sdhci-test.c
+++ b/tests/qtest/sdhci-test.c
@@ -10,7 +10,7 @@
#include "qemu/osdep.h"
#include "hw/registerfields.h"
-#include "libqtest.h"
+#include "libqos/libqtest.h"
#include "qemu/module.h"
#include "libqos/pci-pc.h"
#include "hw/pci/pci.h"
diff --git a/tests/qtest/spapr-phb-test.c b/tests/qtest/spapr-phb-test.c
index 093dc22..ea8d596 100644
--- a/tests/qtest/spapr-phb-test.c
+++ b/tests/qtest/spapr-phb-test.c
@@ -9,7 +9,7 @@
*/
#include "qemu/osdep.h"
-#include "libqtest.h"
+#include "libqos/libqtest.h"
#include "qemu/module.h"
#include "libqos/qgraph.h"
diff --git a/tests/qtest/tco-test.c b/tests/qtest/tco-test.c
index 254f735..47bc7ad 100644
--- a/tests/qtest/tco-test.c
+++ b/tests/qtest/tco-test.c
@@ -9,7 +9,7 @@
#include "qemu/osdep.h"
-#include "libqtest.h"
+#include "libqos/libqtest.h"
#include "libqos/pci.h"
#include "libqos/pci-pc.h"
#include "qapi/qmp/qdict.h"
diff --git a/tests/qtest/test-filter-mirror.c b/tests/qtest/test-filter-mirror.c
index 1e3ced8..bc0dee6 100644
--- a/tests/qtest/test-filter-mirror.c
+++ b/tests/qtest/test-filter-mirror.c
@@ -10,7 +10,7 @@
#include "qemu/osdep.h"
#include "qemu-common.h"
-#include "libqtest.h"
+#include "libqos/libqtest.h"
#include "qapi/qmp/qdict.h"
#include "qemu/iov.h"
#include "qemu/sockets.h"
diff --git a/tests/qtest/test-filter-redirector.c b/tests/qtest/test-filter-redirector.c
index e4d5322..829db8c 100644
--- a/tests/qtest/test-filter-redirector.c
+++ b/tests/qtest/test-filter-redirector.c
@@ -52,7 +52,7 @@
#include "qemu/osdep.h"
#include "qemu-common.h"
-#include "libqtest.h"
+#include "libqos/libqtest.h"
#include "qapi/qmp/qdict.h"
#include "qemu/iov.h"
#include "qemu/sockets.h"
diff --git a/tests/qtest/test-hmp.c b/tests/qtest/test-hmp.c
index d5e7ebd..aea1384 100644
--- a/tests/qtest/test-hmp.c
+++ b/tests/qtest/test-hmp.c
@@ -15,7 +15,7 @@
*/
#include "qemu/osdep.h"
-#include "libqtest.h"
+#include "libqos/libqtest.h"
static int verbose;
diff --git a/tests/qtest/tpm-crb-swtpm-test.c b/tests/qtest/tpm-crb-swtpm-test.c
index 55fdb56..1d82a48 100644
--- a/tests/qtest/tpm-crb-swtpm-test.c
+++ b/tests/qtest/tpm-crb-swtpm-test.c
@@ -15,7 +15,7 @@
#include "qemu/osdep.h"
#include <glib/gstdio.h>
-#include "libqtest.h"
+#include "libqos/libqtest.h"
#include "qemu/module.h"
#include "tpm-tests.h"
#include "hw/acpi/tpm.h"
diff --git a/tests/qtest/tpm-tis-device-swtpm-test.c b/tests/qtest/tpm-tis-device-swtpm-test.c
index 7b20035..f7126ef 100644
--- a/tests/qtest/tpm-tis-device-swtpm-test.c
+++ b/tests/qtest/tpm-tis-device-swtpm-test.c
@@ -16,7 +16,7 @@
#include "qemu/osdep.h"
#include <glib/gstdio.h>
-#include "libqtest.h"
+#include "libqos/libqtest.h"
#include "qemu/module.h"
#include "tpm-tests.h"
#include "hw/acpi/tpm.h"
diff --git a/tests/qtest/tpm-tis-swtpm-test.c b/tests/qtest/tpm-tis-swtpm-test.c
index 90131cb..fa590e6 100644
--- a/tests/qtest/tpm-tis-swtpm-test.c
+++ b/tests/qtest/tpm-tis-swtpm-test.c
@@ -15,7 +15,7 @@
#include "qemu/osdep.h"
#include <glib/gstdio.h>
-#include "libqtest.h"
+#include "libqos/libqtest.h"
#include "qemu/module.h"
#include "tpm-tests.h"
#include "hw/acpi/tpm.h"
diff --git a/tests/qtest/tpm-util.c b/tests/qtest/tpm-util.c
index 58a9593..e2b29ef 100644
--- a/tests/qtest/tpm-util.c
+++ b/tests/qtest/tpm-util.c
@@ -15,7 +15,7 @@
#include "qemu/osdep.h"
#include "hw/acpi/tpm.h"
-#include "libqtest.h"
+#include "libqos/libqtest.h"
#include "tpm-util.h"
#include "qapi/qmp/qdict.h"
diff --git a/tests/qtest/tulip-test.c b/tests/qtest/tulip-test.c
index 2fb6c4d..da16cbf 100644
--- a/tests/qtest/tulip-test.c
+++ b/tests/qtest/tulip-test.c
@@ -8,7 +8,7 @@
*/
#include "qemu/osdep.h"
-#include "libqtest.h"
+#include "libqos/libqtest.h"
#include "qemu/module.h"
#include "libqos/qgraph.h"
#include "libqos/pci.h"
diff --git a/tests/qtest/virtio-rng-test.c b/tests/qtest/virtio-rng-test.c
index 092ba13..e6b8cd8 100644
--- a/tests/qtest/virtio-rng-test.c
+++ b/tests/qtest/virtio-rng-test.c
@@ -8,7 +8,7 @@
*/
#include "qemu/osdep.h"
-#include "libqtest.h"
+#include "libqos/libqtest.h"
#include "qemu/module.h"
#include "libqos/qgraph.h"
#include "libqos/virtio-rng.h"
diff --git a/tests/qtest/virtio-test.c b/tests/qtest/virtio-test.c
index f7c6afd..6313417 100644
--- a/tests/qtest/virtio-test.c
+++ b/tests/qtest/virtio-test.c
@@ -8,7 +8,7 @@
*/
#include "qemu/osdep.h"
-#include "libqtest.h"
+#include "libqos/libqtest.h"
#include "qemu/module.h"
#include "libqos/qgraph.h"
#include "libqos/pci.h"
diff --git a/tests/qtest/vmgenid-test.c b/tests/qtest/vmgenid-test.c
index efba76e..6781a51 100644
--- a/tests/qtest/vmgenid-test.c
+++ b/tests/qtest/vmgenid-test.c
@@ -14,7 +14,7 @@
#include "hw/acpi/acpi-defs.h"
#include "boot-sector.h"
#include "acpi-utils.h"
-#include "libqtest.h"
+#include "libqos/libqtest.h"
#include "qapi/qmp/qdict.h"
#define VGID_GUID "324e6eaf-d1d1-4bf6-bf41-b9bb6c91fb87"
diff --git a/tests/qtest/vmxnet3-test.c b/tests/qtest/vmxnet3-test.c
index a810252..97c23fd 100644
--- a/tests/qtest/vmxnet3-test.c
+++ b/tests/qtest/vmxnet3-test.c
@@ -8,7 +8,7 @@
*/
#include "qemu/osdep.h"
-#include "libqtest.h"
+#include "libqos/libqtest.h"
#include "qemu/module.h"
#include "libqos/qgraph.h"
#include "libqos/pci.h"
diff --git a/tests/qtest/wdt_ib700-test.c b/tests/qtest/wdt_ib700-test.c
index 797288d..6c36e43 100644
--- a/tests/qtest/wdt_ib700-test.c
+++ b/tests/qtest/wdt_ib700-test.c
@@ -8,7 +8,7 @@
*/
#include "qemu/osdep.h"
-#include "libqtest.h"
+#include "libqos/libqtest.h"
#include "qapi/qmp/qdict.h"
#include "qemu/timer.h"
diff --git a/tests/tcg/configure.sh b/tests/tcg/configure.sh
index 102578c..7d714f9 100755
--- a/tests/tcg/configure.sh
+++ b/tests/tcg/configure.sh
@@ -193,11 +193,11 @@ for target in $target_list; do
case $target in
*-linux-user | *-bsd-user)
echo "CONFIG_USER_ONLY=y" >> $config_target_mak
- echo "QEMU=\$(BUILD_DIR)/$target/qemu-$arch" >> $config_target_mak
+ echo "QEMU=\$(BUILD_DIR)/qemu-$arch" >> $config_target_mak
;;
*-softmmu)
echo "CONFIG_SOFTMMU=y" >> $config_target_mak
- echo "QEMU=\$(BUILD_DIR)/$target/qemu-system-$arch" >> $config_target_mak
+ echo "QEMU=\$(BUILD_DIR)/qemu-system-$arch" >> $config_target_mak
;;
esac
diff --git a/tests/test-qga.c b/tests/test-qga.c
index d2b2435..4ac4c22 100644
--- a/tests/test-qga.c
+++ b/tests/test-qga.c
@@ -4,7 +4,7 @@
#include <sys/socket.h>
#include <sys/un.h>
-#include "libqtest.h"
+#include "libqos/libqtest.h"
#include "qapi/qmp/qdict.h"
#include "qapi/qmp/qlist.h"
@@ -61,8 +61,8 @@ fixture_setup(TestFixture *fixture, gconstpointer data, gchar **envp)
path = g_build_filename(fixture->test_dir, "sock", NULL);
cwd = g_get_current_dir();
- cmd = g_strdup_printf("%s%cqemu-ga -m unix-listen -t %s -p %s %s %s",
- cwd, G_DIR_SEPARATOR,
+ cmd = g_strdup_printf("%s%cqga%cqemu-ga -m unix-listen -t %s -p %s %s %s",
+ cwd, G_DIR_SEPARATOR, G_DIR_SEPARATOR,
fixture->test_dir, path,
getenv("QTEST_LOG") ? "-v" : "",
extra_arg ?: "");
@@ -699,8 +699,8 @@ static void test_qga_config(gconstpointer data)
GKeyFile *kf;
cwd = g_get_current_dir();
- cmd = g_strdup_printf("%s%cqemu-ga -D",
- cwd, G_DIR_SEPARATOR);
+ cmd = g_strdup_printf("%s%cqga%cqemu-ga -D",
+ cwd, G_DIR_SEPARATOR, G_DIR_SEPARATOR);
g_free(cwd);
g_shell_parse_argv(cmd, NULL, &argv, &error);
g_free(cmd);
diff --git a/tests/test-qgraph.c b/tests/test-qgraph.c
index 5c7e457..267291c 100644
--- a/tests/test-qgraph.c
+++ b/tests/test-qgraph.c
@@ -17,9 +17,8 @@
*/
#include "qemu/osdep.h"
-#include "libqtest.h"
-#include "libqos/qgraph.h"
-#include "libqos/qgraph_internal.h"
+#include "qtest/libqos/qgraph.h"
+#include "qtest/libqos/qgraph_internal.h"
#define MACHINE_PC "x86_64/pc"
#define MACHINE_RASPI2 "arm/raspi2"
diff --git a/tests/vm/Makefile.include b/tests/vm/Makefile.include
index f21948c..61f893f 100644
--- a/tests/vm/Makefile.include
+++ b/tests/vm/Makefile.include
@@ -2,6 +2,8 @@
.PHONY: vm-build-all vm-clean-all
+EFI_AARCH64 = $(wildcard $(BUILD_DIR)/pc-bios/edk2-aarch64-code.fd)
+
IMAGES := freebsd netbsd openbsd centos fedora
ifneq ($(GENISOIMAGE),)
IMAGES += ubuntu.i386 centos
@@ -15,6 +17,10 @@ IMAGE_FILES := $(patsubst %, $(IMAGES_DIR)/%.img, $(IMAGES))
.PRECIOUS: $(IMAGE_FILES)
+ifneq ($(PYTHON),)
+HAVE_PYTHON_YAML = $(shell $(PYTHON) -c "import yaml" 2> /dev/null && echo yes)
+endif
+
# 'vm-help' target was historically named 'vm-test'
vm-help vm-test:
@echo "vm-help: Test QEMU in preconfigured virtual machines"
@@ -54,7 +60,7 @@ endif
@echo " QEMU_LOCAL=1 - Use QEMU binary local to this build."
@echo " QEMU=/path/to/qemu - Change path to QEMU binary"
@echo " QEMU_IMG=/path/to/qemu-img - Change path to qemu-img tool"
-ifeq ($(PYTHON_YAML),yes)
+ifeq ($(HAVE_PYTHON_YAML),yes)
@echo " QEMU_CONFIG=/path/conf.yml - Change path to VM configuration .yml file."
else
@echo " (install python3-yaml to enable support for yaml file to configure a VM.)"
diff --git a/tests/vm/freebsd b/tests/vm/freebsd
index 29252fa..5f866e0 100755
--- a/tests/vm/freebsd
+++ b/tests/vm/freebsd
@@ -33,11 +33,13 @@ class FreeBSDVM(basevm.BaseVM):
"pkgconf",
"bzip2",
"python37",
+ "py37-setuptools",
# gnu tools
"bash",
"gmake",
"gsed",
+ "gettext",
# libs: crypto
"gnutls",
diff --git a/tests/vm/netbsd b/tests/vm/netbsd
index 2e87199..ffb65a8 100755
--- a/tests/vm/netbsd
+++ b/tests/vm/netbsd
@@ -31,11 +31,13 @@ class NetBSDVM(basevm.BaseVM):
"pkgconf",
"xz",
"python37",
+ "py37-setuptools",
# gnu tools
"bash",
"gmake",
"gsed",
+ "gettext",
# libs: crypto
"gnutls",
diff --git a/tests/vm/openbsd b/tests/vm/openbsd
index dfe633e..8356646 100755
--- a/tests/vm/openbsd
+++ b/tests/vm/openbsd
@@ -30,11 +30,13 @@ class OpenBSDVM(basevm.BaseVM):
"git",
"pkgconf",
"bzip2", "xz",
+ "py3-setuptools",
# gnu tools
"bash",
"gmake",
"gsed",
+ "gettext",
# libs: usb
"libusb1",