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],
24 # all code tested by test-x86-cpuid is inside topology.h
30 # all code tested by test-int128 is inside int128.h
34 'test-rcu-simpleq': [],
42 'test-qgraph': ['../qtest/libqos/qgraph.c'],
43 'check-qom-interface': [qom],
44 'check-qom-proplist': [qom],
46 'test-keyval': [testqapi],
49 'ptimer-test': ['ptimer-test-stubs.c', meson.project_source_root() / 'hw/core/ptimer.c'],
51 'test-interval-tree': [],
52 'test-xs-node': [qom],
53 'test-virtio-dmabuf': [meson.project_source_root() / 'hw/display/virtio-dmabuf.c'],
56 if have_system or have_tools
58 'test-qmp-event': [testqapi],
62 tests += {'test-seccomp': ['../../softmmu/qemu-seccomp.c', seccomp]}
68 'test-coroutine': [testblock],
69 'test-aio': [testblock],
70 'test-aio-multithread': [testblock],
71 'test-throttle': [testblock],
72 'test-thread-pool': [testblock],
73 'test-hbitmap': [testblock],
74 'test-bdrv-drain': [testblock],
75 'test-bdrv-graph-mod': [testblock],
76 'test-blockjob': [testblock],
77 'test-blockjob-txn': [testblock],
78 'test-block-backend': [testblock],
79 'test-block-iothread': [testblock],
80 'test-write-threshold': [testblock],
81 'test-crypto-hash': [crypto],
82 'test-crypto-hmac': [crypto],
83 'test-crypto-cipher': [crypto],
84 'test-crypto-akcipher': [crypto],
85 'test-crypto-secret': [crypto, keyutils],
86 'test-crypto-der': [crypto],
87 'test-authz-simple': [authz],
88 'test-authz-list': [authz],
89 'test-authz-listfile': [authz],
90 'test-io-task': [testblock],
91 'test-io-channel-socket': ['socket-helpers.c', 'io-channel-helpers.c', io],
92 'test-io-channel-file': ['io-channel-helpers.c', io],
93 'test-io-channel-command': ['io-channel-helpers.c', io],
94 'test-io-channel-buffer': ['io-channel-helpers.c', io],
95 'test-io-channel-null': [io],
96 'test-crypto-ivgen': [io],
97 'test-crypto-afsplit': [io],
98 'test-crypto-block': [io],
100 if gnutls.found() and \
102 targetos != 'windows'
104 'test-crypto-tlscredsx509': ['crypto-tls-x509-helpers.c', 'pkix_asn1_tab.c',
105 tasn1, crypto, gnutls],
106 'test-crypto-tlssession': ['crypto-tls-x509-helpers.c', 'pkix_asn1_tab.c', 'crypto-tls-psk-helpers.c',
107 tasn1, crypto, gnutls],
108 'test-io-channel-tls': ['io-channel-helpers.c', 'crypto-tls-x509-helpers.c', 'pkix_asn1_tab.c',
109 tasn1, io, crypto, gnutls]}
112 tests += {'test-authz-pam': [authz]}
115 tests += {'test-crypto-xts': [crypto, io]}
117 if targetos != 'windows'
119 'test-image-locking': [testblock],
120 'test-nested-aio-poll': [testblock],
123 if config_host_data.get('CONFIG_REPLICATION')
124 tests += {'test-replication': [testblock]}
126 if nettle.found() or gcrypt.found()
127 tests += {'test-crypto-pbkdf': [io]}
134 'test-qmp-cmds': [testqapi],
135 'test-xbzrle': [migration],
136 'test-timed-average': [],
137 'test-util-sockets': ['socket-helpers.c'],
139 'test-bufferiszero': [],
140 'test-smp-parse': [qom, meson.project_source_root() / 'hw/core/machine-smp.c'],
141 'test-vmstate': [migration, io],
142 'test-yank': ['socket-helpers.c', qom, io, chardev]
144 if config_host_data.get('CONFIG_INOTIFY1')
145 tests += {'test-util-filemonitor': []}
148 # Some tests: test-char, test-qdev-global-props, and test-qga,
149 # are not runnable under TSan due to a known issue.
150 # https://github.com/google/sanitizers/issues/1116
151 if not get_option('tsan')
152 if targetos != 'windows'
154 'test-char': ['socket-helpers.c', qom, io, chardev]
159 'test-qdev-global-props': [qom, hwcore]
164 if have_ga and targetos == 'linux'
165 tests += {'test-qga': ['../qtest/libqmp.c']}
166 test_deps += {'test-qga': qga}
169 test_env = environment()
170 test_env.set('G_TEST_SRCDIR', meson.current_source_dir())
171 test_env.set('G_TEST_BUILDDIR', meson.current_build_dir())
174 'test-crypto-tlscredsx509': 45,
175 'test-crypto-tlssession': 45
178 foreach test_name, extra: tests
179 src = [test_name + '.c']
181 if extra.length() > 0
182 # use a sourceset to quickly separate sources and deps
183 test_ss = ss.source_set()
185 src += test_ss.all_sources()
186 deps += test_ss.all_dependencies()
188 exe = executable(test_name, src, genh, dependencies: deps)
191 depends: test_deps.get(test_name, []),
193 args: ['--tap', '-k'],
195 timeout: slow_tests.get(test_name, 30),
196 priority: slow_tests.get(test_name, 30),