aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--MAINTAINERS68
-rw-r--r--tests/meson.build182
-rw-r--r--tests/unit/check-block-qdict.c (renamed from tests/check-block-qdict.c)0
-rw-r--r--tests/unit/check-qdict.c (renamed from tests/check-qdict.c)0
-rw-r--r--tests/unit/check-qjson.c (renamed from tests/check-qjson.c)0
-rw-r--r--tests/unit/check-qlist.c (renamed from tests/check-qlist.c)0
-rw-r--r--tests/unit/check-qlit.c (renamed from tests/check-qlit.c)0
-rw-r--r--tests/unit/check-qnull.c (renamed from tests/check-qnull.c)0
-rw-r--r--tests/unit/check-qnum.c (renamed from tests/check-qnum.c)0
-rw-r--r--tests/unit/check-qobject.c (renamed from tests/check-qobject.c)0
-rw-r--r--tests/unit/check-qom-interface.c (renamed from tests/check-qom-interface.c)0
-rw-r--r--tests/unit/check-qom-proplist.c (renamed from tests/check-qom-proplist.c)0
-rw-r--r--tests/unit/check-qstring.c (renamed from tests/check-qstring.c)0
-rw-r--r--tests/unit/crypto-tls-psk-helpers.c (renamed from tests/crypto-tls-psk-helpers.c)0
-rw-r--r--tests/unit/crypto-tls-psk-helpers.h (renamed from tests/crypto-tls-psk-helpers.h)0
-rw-r--r--tests/unit/crypto-tls-x509-helpers.c (renamed from tests/crypto-tls-x509-helpers.c)0
-rw-r--r--tests/unit/crypto-tls-x509-helpers.h (renamed from tests/crypto-tls-x509-helpers.h)0
-rw-r--r--tests/unit/io-channel-helpers.c (renamed from tests/io-channel-helpers.c)0
-rw-r--r--tests/unit/io-channel-helpers.h (renamed from tests/io-channel-helpers.h)0
-rw-r--r--tests/unit/iothread.c (renamed from tests/iothread.c)0
-rw-r--r--tests/unit/iothread.h (renamed from tests/iothread.h)0
-rw-r--r--tests/unit/meson.build184
-rw-r--r--tests/unit/pkix_asn1_tab.c (renamed from tests/pkix_asn1_tab.c)2
-rw-r--r--tests/unit/ptimer-test-stubs.c (renamed from tests/ptimer-test-stubs.c)0
-rw-r--r--tests/unit/ptimer-test.c (renamed from tests/ptimer-test.c)0
-rw-r--r--tests/unit/ptimer-test.h (renamed from tests/ptimer-test.h)0
-rw-r--r--tests/unit/rcutorture.c (renamed from tests/rcutorture.c)0
-rw-r--r--tests/unit/socket-helpers.c (renamed from tests/socket-helpers.c)0
-rw-r--r--tests/unit/socket-helpers.h (renamed from tests/socket-helpers.h)0
-rw-r--r--tests/unit/test-aio-multithread.c (renamed from tests/test-aio-multithread.c)0
-rw-r--r--tests/unit/test-aio.c (renamed from tests/test-aio.c)0
-rw-r--r--tests/unit/test-authz-list.c (renamed from tests/test-authz-list.c)0
-rw-r--r--tests/unit/test-authz-listfile.c (renamed from tests/test-authz-listfile.c)0
-rw-r--r--tests/unit/test-authz-pam.c (renamed from tests/test-authz-pam.c)0
-rw-r--r--tests/unit/test-authz-simple.c (renamed from tests/test-authz-simple.c)0
-rw-r--r--tests/unit/test-base64.c (renamed from tests/test-base64.c)0
-rw-r--r--tests/unit/test-bdrv-drain.c (renamed from tests/test-bdrv-drain.c)0
-rw-r--r--tests/unit/test-bdrv-graph-mod.c (renamed from tests/test-bdrv-graph-mod.c)0
-rw-r--r--tests/unit/test-bitcnt.c (renamed from tests/test-bitcnt.c)0
-rw-r--r--tests/unit/test-bitmap.c (renamed from tests/test-bitmap.c)0
-rw-r--r--tests/unit/test-bitops.c (renamed from tests/test-bitops.c)0
-rw-r--r--tests/unit/test-block-backend.c (renamed from tests/test-block-backend.c)0
-rw-r--r--tests/unit/test-block-iothread.c (renamed from tests/test-block-iothread.c)0
-rw-r--r--tests/unit/test-blockjob-txn.c (renamed from tests/test-blockjob-txn.c)0
-rw-r--r--tests/unit/test-blockjob.c (renamed from tests/test-blockjob.c)0
-rw-r--r--tests/unit/test-bufferiszero.c (renamed from tests/test-bufferiszero.c)0
-rw-r--r--tests/unit/test-char.c (renamed from tests/test-char.c)0
-rw-r--r--tests/unit/test-clone-visitor.c (renamed from tests/test-clone-visitor.c)0
-rw-r--r--tests/unit/test-coroutine.c (renamed from tests/test-coroutine.c)0
-rw-r--r--tests/unit/test-crypto-afsplit.c (renamed from tests/test-crypto-afsplit.c)0
-rw-r--r--tests/unit/test-crypto-block.c (renamed from tests/test-crypto-block.c)0
-rw-r--r--tests/unit/test-crypto-cipher.c (renamed from tests/test-crypto-cipher.c)0
-rw-r--r--tests/unit/test-crypto-hash.c (renamed from tests/test-crypto-hash.c)0
-rw-r--r--tests/unit/test-crypto-hmac.c (renamed from tests/test-crypto-hmac.c)0
-rw-r--r--tests/unit/test-crypto-ivgen.c (renamed from tests/test-crypto-ivgen.c)0
-rw-r--r--tests/unit/test-crypto-pbkdf.c (renamed from tests/test-crypto-pbkdf.c)0
-rw-r--r--tests/unit/test-crypto-secret.c (renamed from tests/test-crypto-secret.c)0
-rw-r--r--tests/unit/test-crypto-tlscredsx509.c (renamed from tests/test-crypto-tlscredsx509.c)0
-rw-r--r--tests/unit/test-crypto-tlssession.c (renamed from tests/test-crypto-tlssession.c)0
-rw-r--r--tests/unit/test-crypto-xts.c (renamed from tests/test-crypto-xts.c)0
-rw-r--r--tests/unit/test-cutils.c (renamed from tests/test-cutils.c)0
-rw-r--r--tests/unit/test-fdmon-epoll.c (renamed from tests/test-fdmon-epoll.c)0
-rw-r--r--tests/unit/test-hbitmap.c (renamed from tests/test-hbitmap.c)0
-rw-r--r--tests/unit/test-image-locking.c (renamed from tests/test-image-locking.c)0
-rw-r--r--tests/unit/test-int128.c (renamed from tests/test-int128.c)0
-rw-r--r--tests/unit/test-io-channel-buffer.c (renamed from tests/test-io-channel-buffer.c)0
-rw-r--r--tests/unit/test-io-channel-command.c (renamed from tests/test-io-channel-command.c)0
-rw-r--r--tests/unit/test-io-channel-file.c (renamed from tests/test-io-channel-file.c)0
-rw-r--r--tests/unit/test-io-channel-socket.c (renamed from tests/test-io-channel-socket.c)0
-rw-r--r--tests/unit/test-io-channel-tls.c (renamed from tests/test-io-channel-tls.c)0
-rw-r--r--tests/unit/test-io-task.c (renamed from tests/test-io-task.c)0
-rw-r--r--tests/unit/test-iov.c (renamed from tests/test-iov.c)0
-rw-r--r--tests/unit/test-keyval.c (renamed from tests/test-keyval.c)0
-rw-r--r--tests/unit/test-logging.c (renamed from tests/test-logging.c)0
-rw-r--r--tests/unit/test-mul64.c (renamed from tests/test-mul64.c)0
-rw-r--r--tests/unit/test-opts-visitor.c (renamed from tests/test-opts-visitor.c)0
-rw-r--r--tests/unit/test-qapi-util.c (renamed from tests/test-qapi-util.c)0
-rw-r--r--tests/unit/test-qdev-global-props.c (renamed from tests/test-qdev-global-props.c)0
-rw-r--r--tests/unit/test-qdist.c (renamed from tests/test-qdist.c)0
-rw-r--r--tests/unit/test-qemu-opts.c (renamed from tests/test-qemu-opts.c)0
-rw-r--r--tests/unit/test-qga.c (renamed from tests/test-qga.c)2
-rw-r--r--tests/unit/test-qgraph.c (renamed from tests/test-qgraph.c)4
-rw-r--r--tests/unit/test-qht.c (renamed from tests/test-qht.c)0
-rw-r--r--tests/unit/test-qmp-cmds.c (renamed from tests/test-qmp-cmds.c)0
-rw-r--r--tests/unit/test-qmp-event.c (renamed from tests/test-qmp-event.c)0
-rw-r--r--tests/unit/test-qobject-input-visitor.c (renamed from tests/test-qobject-input-visitor.c)0
-rw-r--r--tests/unit/test-qobject-output-visitor.c (renamed from tests/test-qobject-output-visitor.c)0
-rw-r--r--tests/unit/test-rcu-list.c (renamed from tests/test-rcu-list.c)0
-rw-r--r--tests/unit/test-rcu-simpleq.c (renamed from tests/test-rcu-simpleq.c)0
-rw-r--r--tests/unit/test-rcu-slist.c (renamed from tests/test-rcu-slist.c)0
-rw-r--r--tests/unit/test-rcu-tailq.c (renamed from tests/test-rcu-tailq.c)0
-rw-r--r--tests/unit/test-replication.c (renamed from tests/test-replication.c)0
-rw-r--r--tests/unit/test-shift128.c (renamed from tests/test-shift128.c)0
-rw-r--r--tests/unit/test-string-input-visitor.c (renamed from tests/test-string-input-visitor.c)0
-rw-r--r--tests/unit/test-string-output-visitor.c (renamed from tests/test-string-output-visitor.c)0
-rw-r--r--tests/unit/test-thread-pool.c (renamed from tests/test-thread-pool.c)0
-rw-r--r--tests/unit/test-throttle.c (renamed from tests/test-throttle.c)0
-rw-r--r--tests/unit/test-timed-average.c (renamed from tests/test-timed-average.c)0
-rw-r--r--tests/unit/test-util-filemonitor.c (renamed from tests/test-util-filemonitor.c)0
-rw-r--r--tests/unit/test-util-sockets.c (renamed from tests/test-util-sockets.c)0
-rw-r--r--tests/unit/test-uuid.c (renamed from tests/test-uuid.c)0
-rw-r--r--tests/unit/test-visitor-serialization.c (renamed from tests/test-visitor-serialization.c)0
-rw-r--r--tests/unit/test-vmstate.c (renamed from tests/test-vmstate.c)0
-rw-r--r--tests/unit/test-write-threshold.c (renamed from tests/test-write-threshold.c)0
-rw-r--r--tests/unit/test-x86-cpuid.c (renamed from tests/test-x86-cpuid.c)0
-rw-r--r--tests/unit/test-xbzrle.c (renamed from tests/test-xbzrle.c)0
106 files changed, 223 insertions, 219 deletions
diff --git a/MAINTAINERS b/MAINTAINERS
index e04ae21..e6c43c6 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -1537,7 +1537,7 @@ F: include/hw/southbridge/piix.h
F: hw/misc/sga.c
F: hw/isa/apm.c
F: include/hw/isa/apm.h
-F: tests/test-x86-cpuid.c
+F: tests/unit/test-x86-cpuid.c
F: tests/qtest/test-x86-cpuid-compat.c
PC Chipset
@@ -2212,7 +2212,7 @@ F: qemu-io*
F: tests/qemu-iotests/
F: util/qemu-progress.c
F: qobject/block-qdict.c
-F: tests/check-block-qdict.c
+F: tests/unit/check-block-qdict.c
T: git https://repo.or.cz/qemu/kevin.git block
Storage daemon
@@ -2238,7 +2238,7 @@ F: migration/block*
F: include/block/aio.h
F: include/block/aio-wait.h
F: scripts/qemugdb/aio.py
-F: tests/test-fdmon-epoll.c
+F: tests/unit/test-fdmon-epoll.c
T: git https://github.com/stefanha/qemu.git block
Block SCSI subsystem
@@ -2298,7 +2298,7 @@ F: block/dirty-bitmap.c
F: block/qcow2-bitmap.c
F: migration/block-dirty-bitmap.c
F: util/hbitmap.c
-F: tests/test-hbitmap.c
+F: tests/unit/test-hbitmap.c
F: docs/interop/bitmaps.rst
T: git https://repo.or.cz/qemu/ericb.git bitmaps
@@ -2319,8 +2319,8 @@ Command line option argument parsing
M: Markus Armbruster <armbru@redhat.com>
S: Supported
F: include/qemu/option.h
-F: tests/test-keyval.c
-F: tests/test-qemu-opts.c
+F: tests/unit/test-keyval.c
+F: tests/unit/test-qemu-opts.c
F: util/keyval.c
F: util/qemu-option.c
@@ -2438,8 +2438,8 @@ Read, Copy, Update (RCU)
M: Paolo Bonzini <pbonzini@redhat.com>
S: Maintained
F: include/qemu/rcu*.h
-F: tests/rcutorture.c
-F: tests/test-rcu-*.c
+F: tests/unit/rcutorture.c
+F: tests/unit/test-rcu-*.c
F: util/rcu.c
Human Monitor (HMP)
@@ -2517,10 +2517,10 @@ F: include/qapi/
X: include/qapi/qmp/
F: include/qapi/qmp/dispatch.h
F: tests/qapi-schema/
-F: tests/test-*-visitor.c
-F: tests/test-qapi-*.c
-F: tests/test-qmp-*.c
-F: tests/test-visitor-serialization.c
+F: tests/unit/test-*-visitor.c
+F: tests/unit/test-qapi-*.c
+F: tests/unit/test-qmp-*.c
+F: tests/unit/test-visitor-serialization.c
F: scripts/qapi-gen.py
F: scripts/qapi/*
F: docs/sphinx/qapidoc.py
@@ -2541,14 +2541,14 @@ F: qobject/
F: include/qapi/qmp/
X: include/qapi/qmp/dispatch.h
F: scripts/coccinelle/qobject.cocci
-F: tests/check-qdict.c
-F: tests/check-qjson.c
-F: tests/check-qlist.c
-F: tests/check-qlit.c
-F: tests/check-qnull.c
-F: tests/check-qnum.c
-F: tests/check-qobject.c
-F: tests/check-qstring.c
+F: tests/unit/check-qdict.c
+F: tests/unit/check-qjson.c
+F: tests/unit/check-qlist.c
+F: tests/unit/check-qlit.c
+F: tests/unit/check-qnull.c
+F: tests/unit/check-qnum.c
+F: tests/unit/check-qobject.c
+F: tests/unit/check-qstring.c
F: tests/data/qobject/qdict.txt
T: git https://repo.or.cz/qemu/armbru.git qapi-next
@@ -2559,7 +2559,7 @@ F: qga/
F: docs/interop/qemu-ga.rst
F: docs/interop/qemu-ga-ref.rst
F: scripts/qemu-guest-agent/
-F: tests/test-qga.c
+F: tests/unit/test-qga.c
T: git https://github.com/mdroth/qemu.git qga
QOM
@@ -2580,9 +2580,9 @@ F: scripts/coccinelle/qom-parent-type.cocci
F: softmmu/qdev-monitor.c
F: stubs/qdev.c
F: qom/
-F: tests/check-qom-interface.c
-F: tests/check-qom-proplist.c
-F: tests/test-qdev-global-props.c
+F: tests/unit/check-qom-interface.c
+F: tests/unit/check-qom-proplist.c
+F: tests/unit/test-qdev-global-props.c
QOM boilerplate conversion script
M: Eduardo Habkost <ehabkost@redhat.com>
@@ -2721,10 +2721,10 @@ S: Maintained
F: crypto/
F: include/crypto/
F: qapi/crypto.json
-F: tests/test-crypto-*
+F: tests/unit/test-crypto-*
F: tests/benchmark-crypto-*
-F: tests/crypto-tls-*
-F: tests/pkix_asn1_tab.c
+F: tests/unit/crypto-tls-*
+F: tests/unit/pkix_asn1_tab.c
F: qemu.sasl
Coroutines
@@ -2733,7 +2733,7 @@ M: Kevin Wolf <kwolf@redhat.com>
S: Maintained
F: util/*coroutine*
F: include/qemu/coroutine*
-F: tests/test-coroutine.c
+F: tests/unit/test-coroutine.c
Buffers
M: Daniel P. Berrange <berrange@redhat.com>
@@ -2746,7 +2746,7 @@ M: Daniel P. Berrange <berrange@redhat.com>
S: Maintained
F: io/
F: include/io/
-F: tests/test-io-*
+F: tests/unit/test-io-*
User authorization
M: Daniel P. Berrange <berrange@redhat.com>
@@ -2754,7 +2754,7 @@ S: Maintained
F: authz/
F: qapi/authz.json
F: include/authz/
-F: tests/test-authz-*
+F: tests/unit/test-authz-*
Sockets
M: Daniel P. Berrange <berrange@redhat.com>
@@ -2769,7 +2769,7 @@ M: Daniel P. Berrange <berrange@redhat.com>
S: Odd Fixes
F: util/filemonitor*.c
F: include/qemu/filemonitor.h
-F: tests/test-util-filemonitor.c
+F: tests/unit/test-util-filemonitor.c
Throttling infrastructure
M: Alberto Garcia <berto@igalia.com>
@@ -2779,7 +2779,7 @@ F: include/block/throttle-groups.h
F: include/qemu/throttle*.h
F: util/throttle.c
F: docs/throttle.txt
-F: tests/test-throttle.c
+F: tests/unit/test-throttle.c
L: qemu-block@nongnu.org
UUID
@@ -2787,7 +2787,7 @@ M: Fam Zheng <fam@euphon.net>
S: Supported
F: util/uuid.c
F: include/qemu/uuid.h
-F: tests/test-uuid.c
+F: tests/unit/test-uuid.c
Yank feature
M: Lukas Straub <lukasstraub2@web.de>
@@ -3237,7 +3237,7 @@ M: Xie Changlong <xiechanglong.d@gmail.com>
S: Supported
F: replication*
F: block/replication.c
-F: tests/test-replication.c
+F: tests/unit/test-replication.c
F: docs/block-replication.txt
PVRDMA
diff --git a/tests/meson.build b/tests/meson.build
index 656d211..af43fd1 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -69,59 +69,6 @@ endforeach
libtestqapi = static_library('testqapi', sources: [genh, test_qapi_sources])
testqapi = declare_dependency(link_with: libtestqapi, sources: [genh, test_qapi_headers])
-testblock = declare_dependency(dependencies: [block], sources: 'iothread.c')
-
-tests = {
- 'check-block-qdict': [],
- 'check-qdict': [],
- 'check-qnum': [],
- 'check-qstring': [],
- 'check-qlist': [],
- 'check-qnull': [],
- 'check-qobject': [],
- 'check-qjson': [],
- 'check-qlit': [],
- 'test-qobject-output-visitor': [testqapi],
- 'test-clone-visitor': [testqapi],
- 'test-qobject-input-visitor': [testqapi],
- 'test-string-input-visitor': [testqapi],
- 'test-string-output-visitor': [testqapi],
- 'test-opts-visitor': [testqapi],
- 'test-visitor-serialization': [testqapi],
- 'test-bitmap': [],
- # all code tested by test-x86-cpuid is inside topology.h
- 'test-x86-cpuid': [],
- 'test-cutils': [],
- 'test-shift128': [],
- 'test-mul64': [],
- # all code tested by test-int128 is inside int128.h
- 'test-int128': [],
- 'rcutorture': [],
- 'test-rcu-list': [],
- 'test-rcu-simpleq': [],
- 'test-rcu-tailq': [],
- 'test-rcu-slist': [],
- 'test-qdist': [],
- 'test-qht': [],
- 'test-bitops': [],
- 'test-bitcnt': [],
- 'test-qgraph': ['qtest/libqos/qgraph.c'],
- 'check-qom-interface': [qom],
- 'check-qom-proplist': [qom],
- 'test-qemu-opts': [],
- 'test-keyval': [testqapi],
- 'test-logging': [],
- 'test-uuid': [],
- 'ptimer-test': ['ptimer-test-stubs.c', meson.source_root() / 'hw/core/ptimer.c'],
- 'test-qapi-util': [],
-}
-
-if have_system or have_tools
- tests += {
- 'test-qmp-event': [testqapi],
- }
-endif
-
test_deps = {
'test-qht-par': qht_bench,
}
@@ -129,65 +76,6 @@ test_deps = {
benchs = {}
if have_block
- tests += {
- 'test-coroutine': [testblock],
- 'test-aio': [testblock],
- 'test-aio-multithread': [testblock],
- 'test-throttle': [testblock],
- 'test-thread-pool': [testblock],
- 'test-hbitmap': [testblock],
- 'test-bdrv-drain': [testblock],
- 'test-bdrv-graph-mod': [testblock],
- 'test-blockjob': [testblock],
- 'test-blockjob-txn': [testblock],
- 'test-block-backend': [testblock],
- 'test-block-iothread': [testblock],
- 'test-write-threshold': [testblock],
- 'test-crypto-hash': [crypto],
- 'test-crypto-hmac': [crypto],
- 'test-crypto-cipher': [crypto],
- 'test-crypto-secret': [crypto, keyutils],
- 'test-authz-simple': [authz],
- 'test-authz-list': [authz],
- 'test-authz-listfile': [authz],
- 'test-io-task': [testblock],
- 'test-io-channel-socket': ['socket-helpers.c', 'io-channel-helpers.c', io],
- 'test-io-channel-file': ['io-channel-helpers.c', io],
- 'test-io-channel-command': ['io-channel-helpers.c', io],
- 'test-io-channel-buffer': ['io-channel-helpers.c', io],
- 'test-crypto-ivgen': [io],
- 'test-crypto-afsplit': [io],
- 'test-crypto-block': [io],
- }
- if 'CONFIG_GNUTLS' in config_host and \
- 'CONFIG_TASN1' in config_host and \
- 'CONFIG_POSIX' in config_host
- tests += {
- 'test-crypto-tlscredsx509': ['crypto-tls-x509-helpers.c', 'pkix_asn1_tab.c',
- tasn1, crypto, gnutls],
- 'test-crypto-tlssession': ['crypto-tls-x509-helpers.c', 'pkix_asn1_tab.c', 'crypto-tls-psk-helpers.c',
- tasn1, crypto, gnutls],
- 'test-io-channel-tls': ['io-channel-helpers.c', 'crypto-tls-x509-helpers.c', 'pkix_asn1_tab.c',
- tasn1, io, crypto, gnutls]}
- endif
- if 'CONFIG_AUTH_PAM' in config_host
- tests += {'test-authz-pam': [authz]}
- endif
- if 'CONFIG_QEMU_PRIVATE_XTS' in config_host
- tests += {'test-crypto-xts': [crypto, io]}
- endif
- if 'CONFIG_POSIX' in config_host
- tests += {'test-image-locking': [testblock]}
- endif
- if 'CONFIG_REPLICATION' in config_host
- tests += {'test-replication': [testblock]}
- endif
- if 'CONFIG_NETTLE' in config_host or 'CONFIG_GCRYPT' in config_host
- tests += {'test-crypto-pbkdf': [io]}
- endif
- if 'CONFIG_EPOLL_CREATE1' in config_host
- tests += {'test-fdmon-epoll': [testblock]}
- endif
benchs += {
'benchmark-crypto-hash': [crypto],
'benchmark-crypto-hmac': [crypto],
@@ -195,75 +83,6 @@ if have_block
}
endif
-if have_system
- tests += {
- 'test-iov': [],
- 'test-qmp-cmds': [testqapi],
- 'test-xbzrle': [migration],
- 'test-timed-average': [],
- 'test-util-sockets': ['socket-helpers.c'],
- 'test-base64': [],
- 'test-bufferiszero': [],
- 'test-vmstate': [migration, io]
- }
- if 'CONFIG_INOTIFY1' in config_host
- tests += {'test-util-filemonitor': []}
- endif
-
- # Some tests: test-char, test-qdev-global-props, and test-qga,
- # are not runnable under TSan due to a known issue.
- # https://github.com/google/sanitizers/issues/1116
- if 'CONFIG_TSAN' not in config_host
- if 'CONFIG_POSIX' in config_host
- tests += {
- 'test-char': ['socket-helpers.c', qom, io, chardev]
- }
- endif
-
- tests += {
- 'test-qdev-global-props': [qom, hwcore, testqapi]
- }
- endif
-endif
-
-if 'CONFIG_TSAN' not in config_host and \
- 'CONFIG_GUEST_AGENT' in config_host and \
- 'CONFIG_LINUX' in config_host
- tests += {'test-qga': ['qtest/libqtest.c']}
- test_deps += {'test-qga': qga}
-endif
-
-test_env = environment()
-test_env.set('G_TEST_SRCDIR', meson.current_source_dir())
-test_env.set('G_TEST_BUILDDIR', meson.current_build_dir())
-
-slow_tests = {
- 'test-crypto-tlscredsx509': 45,
- 'test-crypto-tlssession': 45
-}
-
-foreach test_name, extra: tests
- src = [test_name + '.c']
- deps = [qemuutil]
- if extra.length() > 0
- # use a sourceset to quickly separate sources and deps
- test_ss = ss.source_set()
- test_ss.add(extra)
- src += test_ss.all_sources()
- deps += test_ss.all_dependencies()
- endif
- exe = executable(test_name, src, genh, dependencies: deps)
-
- test(test_name, exe,
- depends: test_deps.get(test_name, []),
- env: test_env,
- args: ['--tap', '-k'],
- protocol: 'tap',
- timeout: slow_tests.get(test_name, 30),
- priority: slow_tests.get(test_name, 30),
- suite: ['unit'])
-endforeach
-
foreach bench_name, deps: benchs
exe = executable(bench_name, bench_name + '.c',
dependencies: [qemuutil] + deps)
@@ -299,6 +118,7 @@ if not get_option('tcg').disabled()
endif
endif
+subdir('unit')
subdir('qapi-schema')
subdir('qtest')
subdir('migration')
diff --git a/tests/check-block-qdict.c b/tests/unit/check-block-qdict.c
index 5a25825..5a25825 100644
--- a/tests/check-block-qdict.c
+++ b/tests/unit/check-block-qdict.c
diff --git a/tests/check-qdict.c b/tests/unit/check-qdict.c
index b5efa85..b5efa85 100644
--- a/tests/check-qdict.c
+++ b/tests/unit/check-qdict.c
diff --git a/tests/check-qjson.c b/tests/unit/check-qjson.c
index c845f91..c845f91 100644
--- a/tests/check-qjson.c
+++ b/tests/unit/check-qjson.c
diff --git a/tests/check-qlist.c b/tests/unit/check-qlist.c
index 3cd0ccb..3cd0ccb 100644
--- a/tests/check-qlist.c
+++ b/tests/unit/check-qlist.c
diff --git a/tests/check-qlit.c b/tests/unit/check-qlit.c
index bd6798d..bd6798d 100644
--- a/tests/check-qlit.c
+++ b/tests/unit/check-qlit.c
diff --git a/tests/check-qnull.c b/tests/unit/check-qnull.c
index ebf21db..ebf21db 100644
--- a/tests/check-qnull.c
+++ b/tests/unit/check-qnull.c
diff --git a/tests/check-qnum.c b/tests/unit/check-qnum.c
index b85fca2..b85fca2 100644
--- a/tests/check-qnum.c
+++ b/tests/unit/check-qnum.c
diff --git a/tests/check-qobject.c b/tests/unit/check-qobject.c
index c1713d1..c1713d1 100644
--- a/tests/check-qobject.c
+++ b/tests/unit/check-qobject.c
diff --git a/tests/check-qom-interface.c b/tests/unit/check-qom-interface.c
index c99be97..c99be97 100644
--- a/tests/check-qom-interface.c
+++ b/tests/unit/check-qom-interface.c
diff --git a/tests/check-qom-proplist.c b/tests/unit/check-qom-proplist.c
index 1b76581..1b76581 100644
--- a/tests/check-qom-proplist.c
+++ b/tests/unit/check-qom-proplist.c
diff --git a/tests/check-qstring.c b/tests/unit/check-qstring.c
index 4bf9772..4bf9772 100644
--- a/tests/check-qstring.c
+++ b/tests/unit/check-qstring.c
diff --git a/tests/crypto-tls-psk-helpers.c b/tests/unit/crypto-tls-psk-helpers.c
index a839547..a839547 100644
--- a/tests/crypto-tls-psk-helpers.c
+++ b/tests/unit/crypto-tls-psk-helpers.c
diff --git a/tests/crypto-tls-psk-helpers.h b/tests/unit/crypto-tls-psk-helpers.h
index 5aa9951..5aa9951 100644
--- a/tests/crypto-tls-psk-helpers.h
+++ b/tests/unit/crypto-tls-psk-helpers.h
diff --git a/tests/crypto-tls-x509-helpers.c b/tests/unit/crypto-tls-x509-helpers.c
index 9765859..9765859 100644
--- a/tests/crypto-tls-x509-helpers.c
+++ b/tests/unit/crypto-tls-x509-helpers.c
diff --git a/tests/crypto-tls-x509-helpers.h b/tests/unit/crypto-tls-x509-helpers.h
index 8fcd778..8fcd778 100644
--- a/tests/crypto-tls-x509-helpers.h
+++ b/tests/unit/crypto-tls-x509-helpers.h
diff --git a/tests/io-channel-helpers.c b/tests/unit/io-channel-helpers.c
index ff156ed..ff156ed 100644
--- a/tests/io-channel-helpers.c
+++ b/tests/unit/io-channel-helpers.c
diff --git a/tests/io-channel-helpers.h b/tests/unit/io-channel-helpers.h
index 3d14043..3d14043 100644
--- a/tests/io-channel-helpers.h
+++ b/tests/unit/io-channel-helpers.h
diff --git a/tests/iothread.c b/tests/unit/iothread.c
index afde12b..afde12b 100644
--- a/tests/iothread.c
+++ b/tests/unit/iothread.c
diff --git a/tests/iothread.h b/tests/unit/iothread.h
index 4877cea..4877cea 100644
--- a/tests/iothread.h
+++ b/tests/unit/iothread.h
diff --git a/tests/unit/meson.build b/tests/unit/meson.build
new file mode 100644
index 0000000..4bfe462
--- /dev/null
+++ b/tests/unit/meson.build
@@ -0,0 +1,184 @@
+
+testblock = declare_dependency(dependencies: [block], sources: 'iothread.c')
+
+tests = {
+ 'check-block-qdict': [],
+ 'check-qdict': [],
+ 'check-qnum': [],
+ 'check-qstring': [],
+ 'check-qlist': [],
+ 'check-qnull': [],
+ 'check-qobject': [],
+ 'check-qjson': [],
+ 'check-qlit': [],
+ 'test-qobject-output-visitor': [testqapi],
+ 'test-clone-visitor': [testqapi],
+ 'test-qobject-input-visitor': [testqapi],
+ 'test-string-input-visitor': [testqapi],
+ 'test-string-output-visitor': [testqapi],
+ 'test-opts-visitor': [testqapi],
+ 'test-visitor-serialization': [testqapi],
+ 'test-bitmap': [],
+ # all code tested by test-x86-cpuid is inside topology.h
+ 'test-x86-cpuid': [],
+ 'test-cutils': [],
+ 'test-shift128': [],
+ 'test-mul64': [],
+ # all code tested by test-int128 is inside int128.h
+ 'test-int128': [],
+ 'rcutorture': [],
+ 'test-rcu-list': [],
+ 'test-rcu-simpleq': [],
+ 'test-rcu-tailq': [],
+ 'test-rcu-slist': [],
+ 'test-qdist': [],
+ 'test-qht': [],
+ 'test-bitops': [],
+ 'test-bitcnt': [],
+ 'test-qgraph': ['../qtest/libqos/qgraph.c'],
+ 'check-qom-interface': [qom],
+ 'check-qom-proplist': [qom],
+ 'test-qemu-opts': [],
+ 'test-keyval': [testqapi],
+ 'test-logging': [],
+ 'test-uuid': [],
+ 'ptimer-test': ['ptimer-test-stubs.c', meson.source_root() / 'hw/core/ptimer.c'],
+ 'test-qapi-util': [],
+}
+
+if have_system or have_tools
+ tests += {
+ 'test-qmp-event': [testqapi],
+ }
+endif
+
+if have_block
+ tests += {
+ 'test-coroutine': [testblock],
+ 'test-aio': [testblock],
+ 'test-aio-multithread': [testblock],
+ 'test-throttle': [testblock],
+ 'test-thread-pool': [testblock],
+ 'test-hbitmap': [testblock],
+ 'test-bdrv-drain': [testblock],
+ 'test-bdrv-graph-mod': [testblock],
+ 'test-blockjob': [testblock],
+ 'test-blockjob-txn': [testblock],
+ 'test-block-backend': [testblock],
+ 'test-block-iothread': [testblock],
+ 'test-write-threshold': [testblock],
+ 'test-crypto-hash': [crypto],
+ 'test-crypto-hmac': [crypto],
+ 'test-crypto-cipher': [crypto],
+ 'test-crypto-secret': [crypto, keyutils],
+ 'test-authz-simple': [authz],
+ 'test-authz-list': [authz],
+ 'test-authz-listfile': [authz],
+ 'test-io-task': [testblock],
+ 'test-io-channel-socket': ['socket-helpers.c', 'io-channel-helpers.c', io],
+ 'test-io-channel-file': ['io-channel-helpers.c', io],
+ 'test-io-channel-command': ['io-channel-helpers.c', io],
+ 'test-io-channel-buffer': ['io-channel-helpers.c', io],
+ 'test-crypto-ivgen': [io],
+ 'test-crypto-afsplit': [io],
+ 'test-crypto-block': [io],
+ }
+ if 'CONFIG_GNUTLS' in config_host and \
+ 'CONFIG_TASN1' in config_host and \
+ 'CONFIG_POSIX' in config_host
+ tests += {
+ 'test-crypto-tlscredsx509': ['crypto-tls-x509-helpers.c', 'pkix_asn1_tab.c',
+ tasn1, crypto, gnutls],
+ 'test-crypto-tlssession': ['crypto-tls-x509-helpers.c', 'pkix_asn1_tab.c', 'crypto-tls-psk-helpers.c',
+ tasn1, crypto, gnutls],
+ 'test-io-channel-tls': ['io-channel-helpers.c', 'crypto-tls-x509-helpers.c', 'pkix_asn1_tab.c',
+ tasn1, io, crypto, gnutls]}
+ endif
+ if 'CONFIG_AUTH_PAM' in config_host
+ tests += {'test-authz-pam': [authz]}
+ endif
+ if 'CONFIG_QEMU_PRIVATE_XTS' in config_host
+ tests += {'test-crypto-xts': [crypto, io]}
+ endif
+ if 'CONFIG_POSIX' in config_host
+ tests += {'test-image-locking': [testblock]}
+ endif
+ if 'CONFIG_REPLICATION' in config_host
+ tests += {'test-replication': [testblock]}
+ endif
+ if 'CONFIG_NETTLE' in config_host or 'CONFIG_GCRYPT' in config_host
+ tests += {'test-crypto-pbkdf': [io]}
+ endif
+ if 'CONFIG_EPOLL_CREATE1' in config_host
+ tests += {'test-fdmon-epoll': [testblock]}
+ endif
+endif
+
+if have_system
+ tests += {
+ 'test-iov': [],
+ 'test-qmp-cmds': [testqapi],
+ 'test-xbzrle': [migration],
+ 'test-timed-average': [],
+ 'test-util-sockets': ['socket-helpers.c'],
+ 'test-base64': [],
+ 'test-bufferiszero': [],
+ 'test-vmstate': [migration, io]
+ }
+ if 'CONFIG_INOTIFY1' in config_host
+ tests += {'test-util-filemonitor': []}
+ endif
+
+ # Some tests: test-char, test-qdev-global-props, and test-qga,
+ # are not runnable under TSan due to a known issue.
+ # https://github.com/google/sanitizers/issues/1116
+ if 'CONFIG_TSAN' not in config_host
+ if 'CONFIG_POSIX' in config_host
+ tests += {
+ 'test-char': ['socket-helpers.c', qom, io, chardev]
+ }
+ endif
+
+ tests += {
+ 'test-qdev-global-props': [qom, hwcore, testqapi]
+ }
+ endif
+endif
+
+if 'CONFIG_TSAN' not in config_host and \
+ 'CONFIG_GUEST_AGENT' in config_host and \
+ 'CONFIG_LINUX' in config_host
+ tests += {'test-qga': ['../qtest/libqtest.c']}
+ test_deps += {'test-qga': qga}
+endif
+
+test_env = environment()
+test_env.set('G_TEST_SRCDIR', meson.current_source_dir())
+test_env.set('G_TEST_BUILDDIR', meson.current_build_dir())
+
+slow_tests = {
+ 'test-crypto-tlscredsx509': 45,
+ 'test-crypto-tlssession': 45
+}
+
+foreach test_name, extra: tests
+ src = [test_name + '.c']
+ deps = [qemuutil]
+ if extra.length() > 0
+ # use a sourceset to quickly separate sources and deps
+ test_ss = ss.source_set()
+ test_ss.add(extra)
+ src += test_ss.all_sources()
+ deps += test_ss.all_dependencies()
+ endif
+ exe = executable(test_name, src, genh, dependencies: deps)
+
+ test(test_name, exe,
+ depends: test_deps.get(test_name, []),
+ env: test_env,
+ args: ['--tap', '-k'],
+ protocol: 'tap',
+ timeout: slow_tests.get(test_name, 30),
+ priority: slow_tests.get(test_name, 30),
+ suite: ['unit'])
+endforeach
diff --git a/tests/pkix_asn1_tab.c b/tests/unit/pkix_asn1_tab.c
index 4aaf736..15397cf 100644
--- a/tests/pkix_asn1_tab.c
+++ b/tests/unit/pkix_asn1_tab.c
@@ -4,7 +4,7 @@
*/
#include "qemu/osdep.h"
-#include "tests/crypto-tls-x509-helpers.h"
+#include "crypto-tls-x509-helpers.h"
#ifdef QCRYPTO_HAVE_TLS_TEST_SUPPORT
diff --git a/tests/ptimer-test-stubs.c b/tests/unit/ptimer-test-stubs.c
index 7f801a4..7f801a4 100644
--- a/tests/ptimer-test-stubs.c
+++ b/tests/unit/ptimer-test-stubs.c
diff --git a/tests/ptimer-test.c b/tests/unit/ptimer-test.c
index 9176b96..9176b96 100644
--- a/tests/ptimer-test.c
+++ b/tests/unit/ptimer-test.c
diff --git a/tests/ptimer-test.h b/tests/unit/ptimer-test.h
index 09ac56d..09ac56d 100644
--- a/tests/ptimer-test.h
+++ b/tests/unit/ptimer-test.h
diff --git a/tests/rcutorture.c b/tests/unit/rcutorture.c
index de6f649..de6f649 100644
--- a/tests/rcutorture.c
+++ b/tests/unit/rcutorture.c
diff --git a/tests/socket-helpers.c b/tests/unit/socket-helpers.c
index f704fd1..f704fd1 100644
--- a/tests/socket-helpers.c
+++ b/tests/unit/socket-helpers.c
diff --git a/tests/socket-helpers.h b/tests/unit/socket-helpers.h
index 512a004..512a004 100644
--- a/tests/socket-helpers.h
+++ b/tests/unit/socket-helpers.h
diff --git a/tests/test-aio-multithread.c b/tests/unit/test-aio-multithread.c
index a555cc8..a555cc8 100644
--- a/tests/test-aio-multithread.c
+++ b/tests/unit/test-aio-multithread.c
diff --git a/tests/test-aio.c b/tests/unit/test-aio.c
index 8a46078..8a46078 100644
--- a/tests/test-aio.c
+++ b/tests/unit/test-aio.c
diff --git a/tests/test-authz-list.c b/tests/unit/test-authz-list.c
index 5351992..5351992 100644
--- a/tests/test-authz-list.c
+++ b/tests/unit/test-authz-list.c
diff --git a/tests/test-authz-listfile.c b/tests/unit/test-authz-listfile.c
index 64d0e15..64d0e15 100644
--- a/tests/test-authz-listfile.c
+++ b/tests/unit/test-authz-listfile.c
diff --git a/tests/test-authz-pam.c b/tests/unit/test-authz-pam.c
index 4fe1ef2..4fe1ef2 100644
--- a/tests/test-authz-pam.c
+++ b/tests/unit/test-authz-pam.c
diff --git a/tests/test-authz-simple.c b/tests/unit/test-authz-simple.c
index 6f9034d..6f9034d 100644
--- a/tests/test-authz-simple.c
+++ b/tests/unit/test-authz-simple.c
diff --git a/tests/test-base64.c b/tests/unit/test-base64.c
index 3012d7b..3012d7b 100644
--- a/tests/test-base64.c
+++ b/tests/unit/test-base64.c
diff --git a/tests/test-bdrv-drain.c b/tests/unit/test-bdrv-drain.c
index 8a29e33..8a29e33 100644
--- a/tests/test-bdrv-drain.c
+++ b/tests/unit/test-bdrv-drain.c
diff --git a/tests/test-bdrv-graph-mod.c b/tests/unit/test-bdrv-graph-mod.c
index c4f7d16..c4f7d16 100644
--- a/tests/test-bdrv-graph-mod.c
+++ b/tests/unit/test-bdrv-graph-mod.c
diff --git a/tests/test-bitcnt.c b/tests/unit/test-bitcnt.c
index e153dcb..e153dcb 100644
--- a/tests/test-bitcnt.c
+++ b/tests/unit/test-bitcnt.c
diff --git a/tests/test-bitmap.c b/tests/unit/test-bitmap.c
index 8db4f67..8db4f67 100644
--- a/tests/test-bitmap.c
+++ b/tests/unit/test-bitmap.c
diff --git a/tests/test-bitops.c b/tests/unit/test-bitops.c
index 5a791d2..5a791d2 100644
--- a/tests/test-bitops.c
+++ b/tests/unit/test-bitops.c
diff --git a/tests/test-block-backend.c b/tests/unit/test-block-backend.c
index 2fb1a44..2fb1a44 100644
--- a/tests/test-block-backend.c
+++ b/tests/unit/test-block-backend.c
diff --git a/tests/test-block-iothread.c b/tests/unit/test-block-iothread.c
index 3f866a3..3f866a3 100644
--- a/tests/test-block-iothread.c
+++ b/tests/unit/test-block-iothread.c
diff --git a/tests/test-blockjob-txn.c b/tests/unit/test-blockjob-txn.c
index 8bd13b9..8bd13b9 100644
--- a/tests/test-blockjob-txn.c
+++ b/tests/unit/test-blockjob-txn.c
diff --git a/tests/test-blockjob.c b/tests/unit/test-blockjob.c
index 7519847..7519847 100644
--- a/tests/test-blockjob.c
+++ b/tests/unit/test-blockjob.c
diff --git a/tests/test-bufferiszero.c b/tests/unit/test-bufferiszero.c
index e45fd31..e45fd31 100644
--- a/tests/test-bufferiszero.c
+++ b/tests/unit/test-bufferiszero.c
diff --git a/tests/test-char.c b/tests/unit/test-char.c
index 755d54c..755d54c 100644
--- a/tests/test-char.c
+++ b/tests/unit/test-char.c
diff --git a/tests/test-clone-visitor.c b/tests/unit/test-clone-visitor.c
index 4944b3d..4944b3d 100644
--- a/tests/test-clone-visitor.c
+++ b/tests/unit/test-clone-visitor.c
diff --git a/tests/test-coroutine.c b/tests/unit/test-coroutine.c
index e946d93..e946d93 100644
--- a/tests/test-coroutine.c
+++ b/tests/unit/test-coroutine.c
diff --git a/tests/test-crypto-afsplit.c b/tests/unit/test-crypto-afsplit.c
index 00a7c18..00a7c18 100644
--- a/tests/test-crypto-afsplit.c
+++ b/tests/unit/test-crypto-afsplit.c
diff --git a/tests/test-crypto-block.c b/tests/unit/test-crypto-block.c
index 3b1f0d5..3b1f0d5 100644
--- a/tests/test-crypto-block.c
+++ b/tests/unit/test-crypto-block.c
diff --git a/tests/test-crypto-cipher.c b/tests/unit/test-crypto-cipher.c
index 280319a..280319a 100644
--- a/tests/test-crypto-cipher.c
+++ b/tests/unit/test-crypto-cipher.c
diff --git a/tests/test-crypto-hash.c b/tests/unit/test-crypto-hash.c
index ce7d0ab..ce7d0ab 100644
--- a/tests/test-crypto-hash.c
+++ b/tests/unit/test-crypto-hash.c
diff --git a/tests/test-crypto-hmac.c b/tests/unit/test-crypto-hmac.c
index ee55382..ee55382 100644
--- a/tests/test-crypto-hmac.c
+++ b/tests/unit/test-crypto-hmac.c
diff --git a/tests/test-crypto-ivgen.c b/tests/unit/test-crypto-ivgen.c
index f581e6a..f581e6a 100644
--- a/tests/test-crypto-ivgen.c
+++ b/tests/unit/test-crypto-ivgen.c
diff --git a/tests/test-crypto-pbkdf.c b/tests/unit/test-crypto-pbkdf.c
index c50fd63..c50fd63 100644
--- a/tests/test-crypto-pbkdf.c
+++ b/tests/unit/test-crypto-pbkdf.c
diff --git a/tests/test-crypto-secret.c b/tests/unit/test-crypto-secret.c
index 34a4aec..34a4aec 100644
--- a/tests/test-crypto-secret.c
+++ b/tests/unit/test-crypto-secret.c
diff --git a/tests/test-crypto-tlscredsx509.c b/tests/unit/test-crypto-tlscredsx509.c
index f487349..f487349 100644
--- a/tests/test-crypto-tlscredsx509.c
+++ b/tests/unit/test-crypto-tlscredsx509.c
diff --git a/tests/test-crypto-tlssession.c b/tests/unit/test-crypto-tlssession.c
index 8b2453f..8b2453f 100644
--- a/tests/test-crypto-tlssession.c
+++ b/tests/unit/test-crypto-tlssession.c
diff --git a/tests/test-crypto-xts.c b/tests/unit/test-crypto-xts.c
index 7acbc95..7acbc95 100644
--- a/tests/test-crypto-xts.c
+++ b/tests/unit/test-crypto-xts.c
diff --git a/tests/test-cutils.c b/tests/unit/test-cutils.c
index 1aa8351..1aa8351 100644
--- a/tests/test-cutils.c
+++ b/tests/unit/test-cutils.c
diff --git a/tests/test-fdmon-epoll.c b/tests/unit/test-fdmon-epoll.c
index 11fd8a2..11fd8a2 100644
--- a/tests/test-fdmon-epoll.c
+++ b/tests/unit/test-fdmon-epoll.c
diff --git a/tests/test-hbitmap.c b/tests/unit/test-hbitmap.c
index b6726cf..b6726cf 100644
--- a/tests/test-hbitmap.c
+++ b/tests/unit/test-hbitmap.c
diff --git a/tests/test-image-locking.c b/tests/unit/test-image-locking.c
index ba057bd..ba057bd 100644
--- a/tests/test-image-locking.c
+++ b/tests/unit/test-image-locking.c
diff --git a/tests/test-int128.c b/tests/unit/test-int128.c
index b86a3c7..b86a3c7 100644
--- a/tests/test-int128.c
+++ b/tests/unit/test-int128.c
diff --git a/tests/test-io-channel-buffer.c b/tests/unit/test-io-channel-buffer.c
index 9c6724d..9c6724d 100644
--- a/tests/test-io-channel-buffer.c
+++ b/tests/unit/test-io-channel-buffer.c
diff --git a/tests/test-io-channel-command.c b/tests/unit/test-io-channel-command.c
index 99056e0..99056e0 100644
--- a/tests/test-io-channel-command.c
+++ b/tests/unit/test-io-channel-command.c
diff --git a/tests/test-io-channel-file.c b/tests/unit/test-io-channel-file.c
index 29038e6..29038e6 100644
--- a/tests/test-io-channel-file.c
+++ b/tests/unit/test-io-channel-file.c
diff --git a/tests/test-io-channel-socket.c b/tests/unit/test-io-channel-socket.c
index c49eec1..c49eec1 100644
--- a/tests/test-io-channel-socket.c
+++ b/tests/unit/test-io-channel-socket.c
diff --git a/tests/test-io-channel-tls.c b/tests/unit/test-io-channel-tls.c
index ad7554c..ad7554c 100644
--- a/tests/test-io-channel-tls.c
+++ b/tests/unit/test-io-channel-tls.c
diff --git a/tests/test-io-task.c b/tests/unit/test-io-task.c
index 953a50a..953a50a 100644
--- a/tests/test-io-task.c
+++ b/tests/unit/test-io-task.c
diff --git a/tests/test-iov.c b/tests/unit/test-iov.c
index 9c415e2..9c415e2 100644
--- a/tests/test-iov.c
+++ b/tests/unit/test-iov.c
diff --git a/tests/test-keyval.c b/tests/unit/test-keyval.c
index ee927fe..ee927fe 100644
--- a/tests/test-keyval.c
+++ b/tests/unit/test-keyval.c
diff --git a/tests/test-logging.c b/tests/unit/test-logging.c
index ccb819f..ccb819f 100644
--- a/tests/test-logging.c
+++ b/tests/unit/test-logging.c
diff --git a/tests/test-mul64.c b/tests/unit/test-mul64.c
index 9be775d..9be775d 100644
--- a/tests/test-mul64.c
+++ b/tests/unit/test-mul64.c
diff --git a/tests/test-opts-visitor.c b/tests/unit/test-opts-visitor.c
index 23e8970..23e8970 100644
--- a/tests/test-opts-visitor.c
+++ b/tests/unit/test-opts-visitor.c
diff --git a/tests/test-qapi-util.c b/tests/unit/test-qapi-util.c
index 847f305..847f305 100644
--- a/tests/test-qapi-util.c
+++ b/tests/unit/test-qapi-util.c
diff --git a/tests/test-qdev-global-props.c b/tests/unit/test-qdev-global-props.c
index c8862ca..c8862ca 100644
--- a/tests/test-qdev-global-props.c
+++ b/tests/unit/test-qdev-global-props.c
diff --git a/tests/test-qdist.c b/tests/unit/test-qdist.c
index 9541ce3..9541ce3 100644
--- a/tests/test-qdist.c
+++ b/tests/unit/test-qdist.c
diff --git a/tests/test-qemu-opts.c b/tests/unit/test-qemu-opts.c
index 8bbb17b..8bbb17b 100644
--- a/tests/test-qemu-opts.c
+++ b/tests/unit/test-qemu-opts.c
diff --git a/tests/test-qga.c b/tests/unit/test-qga.c
index eb33264..5cb140d 100644
--- a/tests/test-qga.c
+++ b/tests/unit/test-qga.c
@@ -4,7 +4,7 @@
#include <sys/socket.h>
#include <sys/un.h>
-#include "qtest/libqos/libqtest.h"
+#include "../qtest/libqos/libqtest.h"
#include "qapi/qmp/qdict.h"
#include "qapi/qmp/qlist.h"
diff --git a/tests/test-qgraph.c b/tests/unit/test-qgraph.c
index ae2f7b2..f819430 100644
--- a/tests/test-qgraph.c
+++ b/tests/unit/test-qgraph.c
@@ -17,8 +17,8 @@
*/
#include "qemu/osdep.h"
-#include "qtest/libqos/qgraph.h"
-#include "qtest/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/test-qht.c b/tests/unit/test-qht.c
index 4d23cef..4d23cef 100644
--- a/tests/test-qht.c
+++ b/tests/unit/test-qht.c
diff --git a/tests/test-qmp-cmds.c b/tests/unit/test-qmp-cmds.c
index d3413bf..d3413bf 100644
--- a/tests/test-qmp-cmds.c
+++ b/tests/unit/test-qmp-cmds.c
diff --git a/tests/test-qmp-event.c b/tests/unit/test-qmp-event.c
index 7dd0053..7dd0053 100644
--- a/tests/test-qmp-event.c
+++ b/tests/unit/test-qmp-event.c
diff --git a/tests/test-qobject-input-visitor.c b/tests/unit/test-qobject-input-visitor.c
index e41b91a..e41b91a 100644
--- a/tests/test-qobject-input-visitor.c
+++ b/tests/unit/test-qobject-input-visitor.c
diff --git a/tests/test-qobject-output-visitor.c b/tests/unit/test-qobject-output-visitor.c
index 9dc1e07..9dc1e07 100644
--- a/tests/test-qobject-output-visitor.c
+++ b/tests/unit/test-qobject-output-visitor.c
diff --git a/tests/test-rcu-list.c b/tests/unit/test-rcu-list.c
index 49641e1..49641e1 100644
--- a/tests/test-rcu-list.c
+++ b/tests/unit/test-rcu-list.c
diff --git a/tests/test-rcu-simpleq.c b/tests/unit/test-rcu-simpleq.c
index 057f7d3..057f7d3 100644
--- a/tests/test-rcu-simpleq.c
+++ b/tests/unit/test-rcu-simpleq.c
diff --git a/tests/test-rcu-slist.c b/tests/unit/test-rcu-slist.c
index 868e1e4..868e1e4 100644
--- a/tests/test-rcu-slist.c
+++ b/tests/unit/test-rcu-slist.c
diff --git a/tests/test-rcu-tailq.c b/tests/unit/test-rcu-tailq.c
index 8d487e0..8d487e0 100644
--- a/tests/test-rcu-tailq.c
+++ b/tests/unit/test-rcu-tailq.c
diff --git a/tests/test-replication.c b/tests/unit/test-replication.c
index b067240..b067240 100644
--- a/tests/test-replication.c
+++ b/tests/unit/test-replication.c
diff --git a/tests/test-shift128.c b/tests/unit/test-shift128.c
index f3ff736..f3ff736 100644
--- a/tests/test-shift128.c
+++ b/tests/unit/test-shift128.c
diff --git a/tests/test-string-input-visitor.c b/tests/unit/test-string-input-visitor.c
index 249faaf..249faaf 100644
--- a/tests/test-string-input-visitor.c
+++ b/tests/unit/test-string-input-visitor.c
diff --git a/tests/test-string-output-visitor.c b/tests/unit/test-string-output-visitor.c
index e2bedc5..e2bedc5 100644
--- a/tests/test-string-output-visitor.c
+++ b/tests/unit/test-string-output-visitor.c
diff --git a/tests/test-thread-pool.c b/tests/unit/test-thread-pool.c
index 70dc631..70dc631 100644
--- a/tests/test-thread-pool.c
+++ b/tests/unit/test-thread-pool.c
diff --git a/tests/test-throttle.c b/tests/unit/test-throttle.c
index 7adb5e6..7adb5e6 100644
--- a/tests/test-throttle.c
+++ b/tests/unit/test-throttle.c
diff --git a/tests/test-timed-average.c b/tests/unit/test-timed-average.c
index 82c9250..82c9250 100644
--- a/tests/test-timed-average.c
+++ b/tests/unit/test-timed-average.c
diff --git a/tests/test-util-filemonitor.c b/tests/unit/test-util-filemonitor.c
index b629e10..b629e10 100644
--- a/tests/test-util-filemonitor.c
+++ b/tests/unit/test-util-filemonitor.c
diff --git a/tests/test-util-sockets.c b/tests/unit/test-util-sockets.c
index 6748605..6748605 100644
--- a/tests/test-util-sockets.c
+++ b/tests/unit/test-util-sockets.c
diff --git a/tests/test-uuid.c b/tests/unit/test-uuid.c
index c111de5..c111de5 100644
--- a/tests/test-uuid.c
+++ b/tests/unit/test-uuid.c
diff --git a/tests/test-visitor-serialization.c b/tests/unit/test-visitor-serialization.c
index 4629958..4629958 100644
--- a/tests/test-visitor-serialization.c
+++ b/tests/unit/test-visitor-serialization.c
diff --git a/tests/test-vmstate.c b/tests/unit/test-vmstate.c
index a001879..a001879 100644
--- a/tests/test-vmstate.c
+++ b/tests/unit/test-vmstate.c
diff --git a/tests/test-write-threshold.c b/tests/unit/test-write-threshold.c
index fc1c45a..fc1c45a 100644
--- a/tests/test-write-threshold.c
+++ b/tests/unit/test-write-threshold.c
diff --git a/tests/test-x86-cpuid.c b/tests/unit/test-x86-cpuid.c
index bfabc04..bfabc04 100644
--- a/tests/test-x86-cpuid.c
+++ b/tests/unit/test-x86-cpuid.c
diff --git a/tests/test-xbzrle.c b/tests/unit/test-xbzrle.c
index 795d6f1..795d6f1 100644
--- a/tests/test-xbzrle.c
+++ b/tests/unit/test-xbzrle.c