2 testblock = declare_dependency(dependencies: [block], sources: 'iothread.c')
5 'check-block-qdict': [],
14 'test-qobject-output-visitor': [testqapi],
15 'test-clone-visitor': [testqapi],
16 'test-qobject-input-visitor': [testqapi],
17 'test-string-input-visitor': [testqapi],
18 'test-string-output-visitor': [testqapi],
19 'test-opts-visitor': [testqapi],
20 'test-visitor-serialization': [testqapi],
22 # all code tested by test-x86-cpuid is inside topology.h
27 # all code tested by test-int128 is inside int128.h
31 'test-rcu-simpleq': [],
38 'test-qgraph': ['../qtest/libqos/qgraph.c'],
39 'check-qom-interface': [qom],
40 'check-qom-proplist': [qom],
42 'test-keyval': [testqapi],
45 'ptimer-test': ['ptimer-test-stubs.c', meson.source_root() / 'hw/core/ptimer.c'],
49 if have_system or have_tools
51 'test-qmp-event': [testqapi],
57 'test-coroutine': [testblock],
58 'test-aio': [testblock],
59 'test-aio-multithread': [testblock],
60 'test-throttle': [testblock],
61 'test-thread-pool': [testblock],
62 'test-hbitmap': [testblock],
63 'test-bdrv-drain': [testblock],
64 'test-bdrv-graph-mod': [testblock],
65 'test-blockjob': [testblock],
66 'test-blockjob-txn': [testblock],
67 'test-block-backend': [testblock],
68 'test-block-iothread': [testblock],
69 'test-write-threshold': [testblock],
70 'test-crypto-hash': [crypto],
71 'test-crypto-hmac': [crypto],
72 'test-crypto-cipher': [crypto],
73 'test-crypto-secret': [crypto, keyutils],
74 'test-authz-simple': [authz],
75 'test-authz-list': [authz],
76 'test-authz-listfile': [authz],
77 'test-io-task': [testblock],
78 'test-io-channel-socket': ['socket-helpers.c', 'io-channel-helpers.c', io],
79 'test-io-channel-file': ['io-channel-helpers.c', io],
80 'test-io-channel-command': ['io-channel-helpers.c', io],
81 'test-io-channel-buffer': ['io-channel-helpers.c', io],
82 'test-crypto-ivgen': [io],
83 'test-crypto-afsplit': [io],
84 'test-crypto-block': [io],
86 if 'CONFIG_GNUTLS' in config_host and \
87 'CONFIG_TASN1' in config_host and \
88 'CONFIG_POSIX' in config_host
90 'test-crypto-tlscredsx509': ['crypto-tls-x509-helpers.c', 'pkix_asn1_tab.c',
91 tasn1, crypto, gnutls],
92 'test-crypto-tlssession': ['crypto-tls-x509-helpers.c', 'pkix_asn1_tab.c', 'crypto-tls-psk-helpers.c',
93 tasn1, crypto, gnutls],
94 'test-io-channel-tls': ['io-channel-helpers.c', 'crypto-tls-x509-helpers.c', 'pkix_asn1_tab.c',
95 tasn1, io, crypto, gnutls]}
97 if 'CONFIG_AUTH_PAM' in config_host
98 tests += {'test-authz-pam': [authz]}
100 if 'CONFIG_QEMU_PRIVATE_XTS' in config_host
101 tests += {'test-crypto-xts': [crypto, io]}
103 if 'CONFIG_POSIX' in config_host
104 tests += {'test-image-locking': [testblock]}
106 if 'CONFIG_REPLICATION' in config_host
107 tests += {'test-replication': [testblock]}
109 if 'CONFIG_NETTLE' in config_host or 'CONFIG_GCRYPT' in config_host
110 tests += {'test-crypto-pbkdf': [io]}
112 if 'CONFIG_EPOLL_CREATE1' in config_host
113 tests += {'test-fdmon-epoll': [testblock]}
120 'test-qmp-cmds': [testqapi],
121 'test-xbzrle': [migration],
122 'test-timed-average': [],
123 'test-util-sockets': ['socket-helpers.c'],
125 'test-bufferiszero': [],
126 'test-vmstate': [migration, io],
127 'test-yank': ['socket-helpers.c', qom, io, chardev]
129 if 'CONFIG_INOTIFY1' in config_host
130 tests += {'test-util-filemonitor': []}
133 # Some tests: test-char, test-qdev-global-props, and test-qga,
134 # are not runnable under TSan due to a known issue.
135 # https://github.com/google/sanitizers/issues/1116
136 if 'CONFIG_TSAN' not in config_host
137 if 'CONFIG_POSIX' in config_host
139 'test-char': ['socket-helpers.c', qom, io, chardev]
144 'test-qdev-global-props': [qom, hwcore, testqapi]
149 if 'CONFIG_TSAN' not in config_host and \
150 'CONFIG_GUEST_AGENT' in config_host and \
151 'CONFIG_LINUX' in config_host
152 tests += {'test-qga': ['../qtest/libqtest.c']}
153 test_deps += {'test-qga': qga}
156 test_env = environment()
157 test_env.set('G_TEST_SRCDIR', meson.current_source_dir())
158 test_env.set('G_TEST_BUILDDIR', meson.current_build_dir())
161 'test-crypto-tlscredsx509': 45,
162 'test-crypto-tlssession': 45
165 foreach test_name, extra: tests
166 src = [test_name + '.c']
168 if extra.length() > 0
169 # use a sourceset to quickly separate sources and deps
170 test_ss = ss.source_set()
172 src += test_ss.all_sources()
173 deps += test_ss.all_dependencies()
175 exe = executable(test_name, src, genh, dependencies: deps)
178 depends: test_deps.get(test_name, []),
180 args: ['--tap', '-k'],
182 timeout: slow_tests.get(test_name, 30),
183 priority: slow_tests.get(test_name, 30),