summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorPeter Maydell2021-03-14 16:13:53 +0100
committerPeter Maydell2021-03-14 16:13:53 +0100
commit757acb9a8295e8be4a37b2cfc1cd947e357fd29c (patch)
tree881fdcb812a8b8d067d5cb59832b3bb31ce9bcf9 /tests
parentMerge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20210314'... (diff)
parentREADME: Add Documentation blurb (diff)
downloadqemu-757acb9a8295e8be4a37b2cfc1cd947e357fd29c.tar.gz
qemu-757acb9a8295e8be4a37b2cfc1cd947e357fd29c.tar.xz
qemu-757acb9a8295e8be4a37b2cfc1cd947e357fd29c.zip
Merge remote-tracking branch 'remotes/thuth-gitlab/tags/pull-request-2021-03-12' into staging
* Move unit and bench tests into separate directories * Clean-up and improve gitlab-ci jobs * Drop the non-working "check-speed" makefile target * Minor documentation updates # gpg: Signature made Fri 12 Mar 2021 17:18:45 GMT # gpg: using RSA key 27B88847EEE0250118F3EAB92ED9D774FE702DB5 # gpg: issuer "thuth@redhat.com" # gpg: Good signature from "Thomas Huth <th.huth@gmx.de>" [full] # gpg: aka "Thomas Huth <thuth@redhat.com>" [full] # gpg: aka "Thomas Huth <huth@tuxfamily.org>" [full] # gpg: aka "Thomas Huth <th.huth@posteo.de>" [unknown] # Primary key fingerprint: 27B8 8847 EEE0 2501 18F3 EAB9 2ED9 D774 FE70 2DB5 * remotes/thuth-gitlab/tags/pull-request-2021-03-12: README: Add Documentation blurb MAINTAINERS: Merge the Gitlab-CI section into the generic CI section tests: remove "make check-speed" in favor of "make bench" gitlab-ci.yml: Merge check-crypto-old jobs into the build-crypto-old jobs gitlab-ci.yml: Merge one of the coroutine jobs with the tcg-disabled job gitlab-ci.yml: Add some missing dependencies to the jobs gitlab-ci.yml: Move build-tools-and-docs-debian to a better place tests: Move benchmarks into a separate folder tests: Move unit tests into a separate directory Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'tests')
-rw-r--r--tests/Makefile.include8
-rw-r--r--tests/bench/atomic64-bench.c (renamed from tests/atomic64-bench.c)0
-rw-r--r--tests/bench/atomic_add-bench.c (renamed from tests/atomic_add-bench.c)0
-rw-r--r--tests/bench/benchmark-crypto-cipher.c (renamed from tests/benchmark-crypto-cipher.c)0
-rw-r--r--tests/bench/benchmark-crypto-hash.c (renamed from tests/benchmark-crypto-hash.c)0
-rw-r--r--tests/bench/benchmark-crypto-hmac.c (renamed from tests/benchmark-crypto-hmac.c)0
-rw-r--r--tests/bench/meson.build34
-rw-r--r--tests/bench/qht-bench.c (renamed from tests/qht-bench.c)0
-rw-r--r--tests/meson.build216
-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
113 files changed, 226 insertions, 224 deletions
diff --git a/tests/Makefile.include b/tests/Makefile.include
index 799e47169c..8f220e15d1 100644
--- a/tests/Makefile.include
+++ b/tests/Makefile.include
@@ -3,13 +3,13 @@
.PHONY: check-help
check-help:
@echo "Regression testing targets:"
- @echo
@echo " $(MAKE) check Run block, qapi-schema, unit, softfloat, qtest and decodetree tests"
+ @echo " $(MAKE) bench Run speed tests"
@echo
+ @echo "Individual test suites:"
@echo " $(MAKE) check-qtest-TARGET Run qtest tests for given target"
@echo " $(MAKE) check-qtest Run qtest tests"
@echo " $(MAKE) check-unit Run qobject tests"
- @echo " $(MAKE) check-speed Run qobject speed tests"
@echo " $(MAKE) check-qapi-schema Run QAPI schema tests"
@echo " $(MAKE) check-block Run block tests"
ifneq ($(filter $(all-check-targets), check-softfloat),)
@@ -155,8 +155,4 @@ check-clean:
clean: check-clean
-# For backwards compatibility
-
-check-speed: bench-speed
-
endif
diff --git a/tests/atomic64-bench.c b/tests/bench/atomic64-bench.c
index e474753d34..e474753d34 100644
--- a/tests/atomic64-bench.c
+++ b/tests/bench/atomic64-bench.c
diff --git a/tests/atomic_add-bench.c b/tests/bench/atomic_add-bench.c
index f05471ab45..f05471ab45 100644
--- a/tests/atomic_add-bench.c
+++ b/tests/bench/atomic_add-bench.c
diff --git a/tests/benchmark-crypto-cipher.c b/tests/bench/benchmark-crypto-cipher.c
index c04f0a0fba..c04f0a0fba 100644
--- a/tests/benchmark-crypto-cipher.c
+++ b/tests/bench/benchmark-crypto-cipher.c
diff --git a/tests/benchmark-crypto-hash.c b/tests/bench/benchmark-crypto-hash.c
index 927b00bb4d..927b00bb4d 100644
--- a/tests/benchmark-crypto-hash.c
+++ b/tests/bench/benchmark-crypto-hash.c
diff --git a/tests/benchmark-crypto-hmac.c b/tests/bench/benchmark-crypto-hmac.c
index 5cca636789..5cca636789 100644
--- a/tests/benchmark-crypto-hmac.c
+++ b/tests/bench/benchmark-crypto-hmac.c
diff --git a/tests/bench/meson.build b/tests/bench/meson.build
new file mode 100644
index 0000000000..00b3c209dc
--- /dev/null
+++ b/tests/bench/meson.build
@@ -0,0 +1,34 @@
+
+qht_bench = executable('qht-bench',
+ sources: 'qht-bench.c',
+ dependencies: [qemuutil])
+
+executable('atomic_add-bench',
+ sources: files('atomic_add-bench.c'),
+ dependencies: [qemuutil],
+ build_by_default: false)
+
+executable('atomic64-bench',
+ sources: files('atomic64-bench.c'),
+ dependencies: [qemuutil],
+ build_by_default: false)
+
+benchs = {}
+
+if have_block
+ benchs += {
+ 'benchmark-crypto-hash': [crypto],
+ 'benchmark-crypto-hmac': [crypto],
+ 'benchmark-crypto-cipher': [crypto],
+ }
+endif
+
+foreach bench_name, deps: benchs
+ exe = executable(bench_name, bench_name + '.c',
+ dependencies: [qemuutil] + deps)
+ benchmark(bench_name, exe,
+ args: ['--tap', '-k'],
+ protocol: 'tap',
+ timeout: 0,
+ suite: ['speed'])
+endforeach
diff --git a/tests/qht-bench.c b/tests/bench/qht-bench.c
index 2e5b70ccd0..2e5b70ccd0 100644
--- a/tests/qht-bench.c
+++ b/tests/bench/qht-bench.c
diff --git a/tests/meson.build b/tests/meson.build
index 656d211e25..55a7b08275 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -1,18 +1,6 @@
py3 = import('python').find_installation()
-qht_bench = executable('qht-bench',
- sources: 'qht-bench.c',
- dependencies: [qemuutil])
-
-executable('atomic_add-bench',
- sources: files('atomic_add-bench.c'),
- dependencies: [qemuutil],
- build_by_default: false)
-
-executable('atomic64-bench',
- sources: files('atomic64-bench.c'),
- dependencies: [qemuutil],
- build_by_default: false)
+subdir('bench')
test_qapi_outputs = [
'qapi-builtin-types.c',
@@ -69,211 +57,10 @@ 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,
}
-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],
- 'benchmark-crypto-cipher': [crypto],
- }
-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)
- benchmark(bench_name, exe,
- args: ['--tap', '-k'],
- protocol: 'tap',
- timeout: 0,
- suite: ['speed'])
-endforeach
-
if have_tools and 'CONFIG_VHOST_USER' in config_host and 'CONFIG_LINUX' in config_host
executable('vhost-user-bridge',
sources: files('vhost-user-bridge.c'),
@@ -299,6 +86,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 5a25825093..5a25825093 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 b5efa859b0..b5efa859b0 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 c845f91d43..c845f91d43 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 3cd0ccbf19..3cd0ccbf19 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 bd6798d912..bd6798d912 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 ebf21db83c..ebf21db83c 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 b85fca2302..b85fca2302 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 c1713d15af..c1713d15af 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 c99be97ed8..c99be97ed8 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 1b76581980..1b76581980 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 4bf9772093..4bf9772093 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 a8395477c3..a8395477c3 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 5aa9951cb6..5aa9951cb6 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 97658592a2..97658592a2 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 8fcd7785ab..8fcd7785ab 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 ff156ed3c4..ff156ed3c4 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 3d14043710..3d14043710 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 afde12b4ef..afde12b4ef 100644
--- a/tests/iothread.c
+++ b/tests/unit/iothread.c
diff --git a/tests/iothread.h b/tests/unit/iothread.h
index 4877cea6a3..4877cea6a3 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 0000000000..4bfe4627ba
--- /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 4aaf736d3f..15397cf77a 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 7f801a4d09..7f801a4d09 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 9176b96c1c..9176b96c1c 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 09ac56da9e..09ac56da9e 100644
--- a/tests/ptimer-test.h
+++ b/tests/unit/ptimer-test.h
diff --git a/tests/rcutorture.c b/tests/unit/rcutorture.c
index de6f649058..de6f649058 100644
--- a/tests/rcutorture.c
+++ b/tests/unit/rcutorture.c
diff --git a/tests/socket-helpers.c b/tests/unit/socket-helpers.c
index f704fd1a69..f704fd1a69 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 512a004811..512a004811 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 a555cc8835..a555cc8835 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 8a46078463..8a46078463 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 5351992a01..5351992a01 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 64d0e1500f..64d0e1500f 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 4fe1ef2603..4fe1ef2603 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 6f9034d8ff..6f9034d8ff 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 3012d7be26..3012d7be26 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 8a29e33e00..8a29e33e00 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 c4f7d16039..c4f7d16039 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 e153dcb8a2..e153dcb8a2 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 8db4f67883..8db4f67883 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 5a791d2e17..5a791d2e17 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 2fb1a444bd..2fb1a444bd 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 3f866a35c6..3f866a35c6 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 8bd13b9949..8bd13b9949 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 7519847912..7519847912 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 e45fd31804..e45fd31804 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 755d54c15e..755d54c15e 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 4944b3d857..4944b3d857 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 e946d93a65..e946d93a65 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 00a7c180fd..00a7c180fd 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 3b1f0d509f..3b1f0d509f 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 280319a223..280319a223 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 ce7d0ab9b5..ce7d0ab9b5 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 ee55382a3c..ee55382a3c 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 f581e6aba7..f581e6aba7 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 c50fd639d2..c50fd639d2 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 34a4aecc12..34a4aecc12 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 f487349c32..f487349c32 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 8b2453fa79..8b2453fa79 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 7acbc956fd..7acbc956fd 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 bad3a60993..bad3a60993 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 11fd8a2fa9..11fd8a2fa9 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 b6726cf76b..b6726cf76b 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 ba057bd66c..ba057bd66c 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 b86a3c76e6..b86a3c76e6 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 9c6724dea4..9c6724dea4 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 99056e07c0..99056e07c0 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 29038e67b6..29038e67b6 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 c49eec1f03..c49eec1f03 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 ad7554c534..ad7554c534 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 953a50ae66..953a50ae66 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 9c415e2f1f..9c415e2f1f 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 e20c07cf3e..e20c07cf3e 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 ccb819f193..ccb819f193 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 9be775d084..9be775d084 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 23e897061c..23e897061c 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 847f305cff..847f305cff 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 c8862cac5f..c8862cac5f 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 9541ce31eb..9541ce31eb 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 6568e31a72..6568e31a72 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 eb33264e8e..5cb140d1b5 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 ae2f7b2dd8..f819430e2c 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 4d23cefab6..4d23cefab6 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 d3413bfef0..d3413bfef0 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 7dd0053190..7dd0053190 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 e41b91a2a6..e41b91a2a6 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 9dc1e075e7..9dc1e075e7 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 49641e1936..49641e1936 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 057f7d33f7..057f7d33f7 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 868e1e472e..868e1e472e 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 8d487e0ee0..8d487e0ee0 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 b067240add..b067240add 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 f3ff736e5c..f3ff736e5c 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 249faafc9d..249faafc9d 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 e2bedc5c7c..e2bedc5c7c 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 70dc6314a1..70dc6314a1 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 7adb5e6652..7adb5e6652 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 82c92500df..82c92500df 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 b629e10857..b629e10857 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 67486055ed..67486055ed 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 c111de5fc1..c111de5fc1 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 4629958647..4629958647 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 a001879585..a001879585 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 fc1c45a2eb..fc1c45a2eb 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 bfabc0403a..bfabc0403a 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 795d6f1cba..795d6f1cba 100644
--- a/tests/test-xbzrle.c
+++ b/tests/unit/test-xbzrle.c