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 'CONFIG_POSIX' in config_host
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 'CONFIG_POSIX' in config_host
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]}
128 if config_host_data.get('CONFIG_EPOLL_CREATE1')
129 tests += {'test-fdmon-epoll': [testblock]}
136 'test-qmp-cmds': [testqapi],
137 'test-xbzrle': [migration],
138 'test-timed-average': [],
139 'test-util-sockets': ['socket-helpers.c'],
141 'test-bufferiszero': [],
142 'test-smp-parse': [qom, meson.project_source_root() / 'hw/core/machine-smp.c'],
143 'test-vmstate': [migration, io],
144 'test-yank': ['socket-helpers.c', qom, io, chardev]
146 if config_host_data.get('CONFIG_INOTIFY1')
147 tests += {'test-util-filemonitor': []}
150 # Some tests: test-char, test-qdev-global-props, and test-qga,
151 # are not runnable under TSan due to a known issue.
152 # https://github.com/google/sanitizers/issues/1116
153 if not get_option('tsan')
154 if 'CONFIG_POSIX' in config_host
156 'test-char': ['socket-helpers.c', qom, io, chardev]
161 'test-qdev-global-props': [qom, hwcore]
166 if have_ga and targetos == 'linux'
167 tests += {'test-qga': ['../qtest/libqmp.c']}
168 test_deps += {'test-qga': qga}
171 test_env = environment()
172 test_env.set('G_TEST_SRCDIR', meson.current_source_dir())
173 test_env.set('G_TEST_BUILDDIR', meson.current_build_dir())
176 'test-crypto-tlscredsx509': 45,
177 'test-crypto-tlssession': 45
180 foreach test_name, extra: tests
181 src = [test_name + '.c']
183 if extra.length() > 0
184 # use a sourceset to quickly separate sources and deps
185 test_ss = ss.source_set()
187 src += test_ss.all_sources()
188 deps += test_ss.all_dependencies()
190 exe = executable(test_name, src, genh, dependencies: deps)
193 depends: test_deps.get(test_name, []),
195 args: ['--tap', '-k'],
197 timeout: slow_tests.get(test_name, 30),
198 priority: slow_tests.get(test_name, 30),