2 testblock = declare_dependency(dependencies: [block], sources: 'iothread.c')
5 'check-block-qdict': [],
14 'test-error-report': [],
15 'test-qobject-output-visitor': [testqapi],
16 'test-clone-visitor': [testqapi],
17 'test-qobject-input-visitor': [testqapi],
18 'test-forward-visitor': [testqapi],
19 'test-string-input-visitor': [testqapi],
20 'test-string-output-visitor': [testqapi],
21 'test-opts-visitor': [testqapi],
22 'test-visitor-serialization': [testqapi],
25 # all code tested by test-x86-topo is inside topology.h
31 # all code tested by test-int128 is inside int128.h
35 'test-rcu-simpleq': [],
43 'test-qgraph': ['../qtest/libqos/qgraph.c'],
44 'check-qom-interface': [qom],
45 'check-qom-proplist': [qom],
47 'test-keyval': [testqapi],
50 'ptimer-test': ['ptimer-test-stubs.c', meson.project_source_root() / 'hw/core/ptimer.c'],
52 'test-interval-tree': [],
53 'test-xs-node': [qom],
54 'test-virtio-dmabuf': [meson.project_source_root() / 'hw/display/virtio-dmabuf.c'],
57 if have_system or have_tools
59 'test-qmp-event': [testqapi],
63 tests += {'test-seccomp': ['../../system/qemu-seccomp.c', seccomp]}
69 'test-coroutine': [testblock],
70 'test-aio': [testblock],
71 'test-aio-multithread': [testblock],
72 'test-throttle': [testblock],
73 'test-thread-pool': [testblock],
74 'test-hbitmap': [testblock],
75 'test-bdrv-drain': [testblock],
76 'test-bdrv-graph-mod': [testblock],
77 'test-blockjob': [testblock],
78 'test-blockjob-txn': [testblock],
79 'test-block-backend': [testblock],
80 'test-block-iothread': [testblock],
81 'test-write-threshold': [testblock],
82 'test-crypto-hash': [crypto],
83 'test-crypto-hmac': [crypto],
84 'test-crypto-cipher': [crypto],
85 'test-crypto-akcipher': [crypto],
86 'test-crypto-secret': [crypto, keyutils],
87 'test-crypto-der': [crypto],
88 'test-authz-simple': [authz],
89 'test-authz-list': [authz],
90 'test-authz-listfile': [authz],
91 'test-io-task': [testblock],
92 'test-io-channel-socket': ['socket-helpers.c', 'io-channel-helpers.c', io],
93 'test-io-channel-file': ['io-channel-helpers.c', io],
94 'test-io-channel-command': ['io-channel-helpers.c', io],
95 'test-io-channel-buffer': ['io-channel-helpers.c', io],
96 'test-io-channel-null': [io],
97 'test-crypto-ivgen': [io],
98 'test-crypto-afsplit': [io],
99 'test-crypto-block': [io],
101 if gnutls.found() and \
105 'test-crypto-tlscredsx509': ['crypto-tls-x509-helpers.c', 'pkix_asn1_tab.c',
106 tasn1, crypto, gnutls],
107 'test-crypto-tlssession': ['crypto-tls-x509-helpers.c', 'pkix_asn1_tab.c', 'crypto-tls-psk-helpers.c',
108 tasn1, crypto, gnutls],
109 'test-io-channel-tls': ['io-channel-helpers.c', 'crypto-tls-x509-helpers.c', 'pkix_asn1_tab.c',
110 tasn1, io, crypto, gnutls]}
113 tests += {'test-authz-pam': [authz]}
116 tests += {'test-crypto-xts': [crypto, io]}
118 if host_os != 'windows'
120 'test-image-locking': [testblock],
121 'test-nested-aio-poll': [testblock],
124 if config_host_data.get('CONFIG_REPLICATION')
125 tests += {'test-replication': [testblock]}
127 if nettle.found() or gcrypt.found()
128 tests += {'test-crypto-pbkdf': [io]}
135 'test-qmp-cmds': [testqapi],
136 'test-xbzrle': [migration],
137 'test-timed-average': [],
138 'test-util-sockets': ['socket-helpers.c'],
140 'test-bufferiszero': [],
141 'test-smp-parse': [qom, meson.project_source_root() / 'hw/core/machine-smp.c'],
142 'test-vmstate': [migration, io],
143 'test-yank': ['socket-helpers.c', qom, io, chardev]
145 if config_host_data.get('CONFIG_INOTIFY1')
146 tests += {'test-util-filemonitor': []}
149 # Some tests: test-char, test-qdev-global-props, and test-qga,
150 # are not runnable under TSan due to a known issue.
151 # https://github.com/google/sanitizers/issues/1116
152 if not get_option('tsan')
153 if host_os != 'windows'
155 'test-char': ['socket-helpers.c', qom, io, chardev]
160 'test-qdev-global-props': [qom, hwcore]
165 if have_ga and host_os == 'linux'
166 tests += {'test-qga': ['../qtest/libqmp.c']}
167 test_deps += {'test-qga': qga}
170 test_env = environment()
171 test_env.set('G_TEST_SRCDIR', meson.current_source_dir())
172 test_env.set('G_TEST_BUILDDIR', meson.current_build_dir())
175 'test-aio-multithread' : 120,
176 'test-crypto-block' : 300,
177 'test-crypto-tlscredsx509': 45,
178 'test-crypto-tlssession': 45,
179 'test-replication': 60,
182 foreach test_name, extra: tests
183 src = [test_name + '.c']
185 if extra.length() > 0
186 # use a sourceset to quickly separate sources and deps
187 test_ss = ss.source_set()
189 src += test_ss.all_sources()
190 deps += test_ss.all_dependencies()
192 exe = executable(test_name, src, genh, dependencies: deps)
195 depends: test_deps.get(test_name, []),
197 args: ['--tap', '-k'],
199 timeout: slow_tests.get(test_name, 30),
200 priority: slow_tests.get(test_name, 30),