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],
55 if have_system or have_tools
57 'test-qmp-event': [testqapi],
61 tests += {'test-seccomp': ['../../softmmu/qemu-seccomp.c', seccomp]}
67 'test-coroutine': [testblock],
68 'test-aio': [testblock],
69 'test-aio-multithread': [testblock],
70 'test-throttle': [testblock],
71 'test-thread-pool': [testblock],
72 'test-hbitmap': [testblock],
73 'test-bdrv-drain': [testblock],
74 'test-bdrv-graph-mod': [testblock],
75 'test-blockjob': [testblock],
76 'test-blockjob-txn': [testblock],
77 'test-block-backend': [testblock],
78 'test-block-iothread': [testblock],
79 'test-write-threshold': [testblock],
80 'test-crypto-hash': [crypto],
81 'test-crypto-hmac': [crypto],
82 'test-crypto-cipher': [crypto],
83 'test-crypto-akcipher': [crypto],
84 'test-crypto-secret': [crypto, keyutils],
85 'test-crypto-der': [crypto],
86 'test-authz-simple': [authz],
87 'test-authz-list': [authz],
88 'test-authz-listfile': [authz],
89 'test-io-task': [testblock],
90 'test-io-channel-socket': ['socket-helpers.c', 'io-channel-helpers.c', io],
91 'test-io-channel-file': ['io-channel-helpers.c', io],
92 'test-io-channel-command': ['io-channel-helpers.c', io],
93 'test-io-channel-buffer': ['io-channel-helpers.c', io],
94 'test-io-channel-null': [io],
95 'test-crypto-ivgen': [io],
96 'test-crypto-afsplit': [io],
97 'test-crypto-block': [io],
99 if gnutls.found() and \
101 targetos != 'windows'
103 'test-crypto-tlscredsx509': ['crypto-tls-x509-helpers.c', 'pkix_asn1_tab.c',
104 tasn1, crypto, gnutls],
105 'test-crypto-tlssession': ['crypto-tls-x509-helpers.c', 'pkix_asn1_tab.c', 'crypto-tls-psk-helpers.c',
106 tasn1, crypto, gnutls],
107 'test-io-channel-tls': ['io-channel-helpers.c', 'crypto-tls-x509-helpers.c', 'pkix_asn1_tab.c',
108 tasn1, io, crypto, gnutls]}
111 tests += {'test-authz-pam': [authz]}
114 tests += {'test-crypto-xts': [crypto, io]}
116 if targetos != 'windows'
118 'test-image-locking': [testblock],
119 'test-nested-aio-poll': [testblock],
122 if config_host_data.get('CONFIG_REPLICATION')
123 tests += {'test-replication': [testblock]}
125 if nettle.found() or gcrypt.found()
126 tests += {'test-crypto-pbkdf': [io]}
133 'test-qmp-cmds': [testqapi],
134 'test-xbzrle': [migration],
135 'test-timed-average': [],
136 'test-util-sockets': ['socket-helpers.c'],
138 'test-bufferiszero': [],
139 'test-smp-parse': [qom, meson.project_source_root() / 'hw/core/machine-smp.c'],
140 'test-vmstate': [migration, io],
141 'test-yank': ['socket-helpers.c', qom, io, chardev]
143 if config_host_data.get('CONFIG_INOTIFY1')
144 tests += {'test-util-filemonitor': []}
147 # Some tests: test-char, test-qdev-global-props, and test-qga,
148 # are not runnable under TSan due to a known issue.
149 # https://github.com/google/sanitizers/issues/1116
150 if not get_option('tsan')
151 if targetos != 'windows'
153 'test-char': ['socket-helpers.c', qom, io, chardev]
158 'test-qdev-global-props': [qom, hwcore]
163 if have_ga and targetos == 'linux'
164 tests += {'test-qga': ['../qtest/libqmp.c']}
165 test_deps += {'test-qga': qga}
168 test_env = environment()
169 test_env.set('G_TEST_SRCDIR', meson.current_source_dir())
170 test_env.set('G_TEST_BUILDDIR', meson.current_build_dir())
173 'test-crypto-tlscredsx509': 45,
174 'test-crypto-tlssession': 45
177 foreach test_name, extra: tests
178 src = [test_name + '.c']
180 if extra.length() > 0
181 # use a sourceset to quickly separate sources and deps
182 test_ss = ss.source_set()
184 src += test_ss.all_sources()
185 deps += test_ss.all_dependencies()
187 exe = executable(test_name, src, genh, dependencies: deps)
190 depends: test_deps.get(test_name, []),
192 args: ['--tap', '-k'],
194 timeout: slow_tests.get(test_name, 30),
195 priority: slow_tests.get(test_name, 30),