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-forward-visitor': [testqapi],
18 'test-string-input-visitor': [testqapi],
19 'test-string-output-visitor': [testqapi],
20 'test-opts-visitor': [testqapi],
21 'test-visitor-serialization': [testqapi],
23 # all code tested by test-x86-cpuid is inside topology.h
29 # all code tested by test-int128 is inside int128.h
33 'test-rcu-simpleq': [],
40 'test-qgraph': ['../qtest/libqos/qgraph.c'],
41 'check-qom-interface': [qom],
42 'check-qom-proplist': [qom],
44 'test-keyval': [testqapi],
47 'ptimer-test': ['ptimer-test-stubs.c', meson.project_source_root() / 'hw/core/ptimer.c'],
49 'test-smp-parse': [qom, meson.project_source_root() / 'hw/core/machine-smp.c'],
52 if have_system or have_tools
54 'test-qmp-event': [testqapi],
58 tests += {'test-seccomp': ['../../softmmu/qemu-seccomp.c', seccomp]}
64 'test-coroutine': [testblock],
65 'test-aio': [testblock],
66 'test-aio-multithread': [testblock],
67 'test-throttle': [testblock],
68 'test-thread-pool': [testblock],
69 'test-hbitmap': [testblock],
70 'test-bdrv-drain': [testblock],
71 'test-bdrv-graph-mod': [testblock],
72 'test-blockjob': [testblock],
73 'test-blockjob-txn': [testblock],
74 'test-block-backend': [testblock],
75 'test-block-iothread': [testblock],
76 'test-write-threshold': [testblock],
77 'test-crypto-hash': [crypto],
78 'test-crypto-hmac': [crypto],
79 'test-crypto-cipher': [crypto],
80 'test-crypto-secret': [crypto, keyutils],
81 'test-authz-simple': [authz],
82 'test-authz-list': [authz],
83 'test-authz-listfile': [authz],
84 'test-io-task': [testblock],
85 'test-io-channel-socket': ['socket-helpers.c', 'io-channel-helpers.c', io],
86 'test-io-channel-file': ['io-channel-helpers.c', io],
87 'test-io-channel-command': ['io-channel-helpers.c', io],
88 'test-io-channel-buffer': ['io-channel-helpers.c', io],
89 'test-crypto-ivgen': [io],
90 'test-crypto-afsplit': [io],
91 'test-crypto-block': [io],
93 if gnutls.found() and \
95 'CONFIG_POSIX' in config_host
97 'test-crypto-tlscredsx509': ['crypto-tls-x509-helpers.c', 'pkix_asn1_tab.c',
98 tasn1, crypto, gnutls],
99 'test-crypto-tlssession': ['crypto-tls-x509-helpers.c', 'pkix_asn1_tab.c', 'crypto-tls-psk-helpers.c',
100 tasn1, crypto, gnutls],
101 'test-io-channel-tls': ['io-channel-helpers.c', 'crypto-tls-x509-helpers.c', 'pkix_asn1_tab.c',
102 tasn1, io, crypto, gnutls]}
105 tests += {'test-authz-pam': [authz]}
108 tests += {'test-crypto-xts': [crypto, io]}
110 if 'CONFIG_POSIX' in config_host
111 tests += {'test-image-locking': [testblock]}
113 if config_host_data.get('CONFIG_REPLICATION')
114 tests += {'test-replication': [testblock]}
116 if nettle.found() or gcrypt.found()
117 tests += {'test-crypto-pbkdf': [io]}
119 if config_host_data.get('CONFIG_EPOLL_CREATE1')
120 tests += {'test-fdmon-epoll': [testblock]}
127 'test-qmp-cmds': [testqapi],
128 'test-xbzrle': [migration],
129 'test-timed-average': [],
130 'test-util-sockets': ['socket-helpers.c'],
132 'test-bufferiszero': [],
133 'test-vmstate': [migration, io],
134 'test-yank': ['socket-helpers.c', qom, io, chardev]
136 if config_host_data.get('CONFIG_INOTIFY1')
137 tests += {'test-util-filemonitor': []}
140 # Some tests: test-char, test-qdev-global-props, and test-qga,
141 # are not runnable under TSan due to a known issue.
142 # https://github.com/google/sanitizers/issues/1116
143 if 'CONFIG_TSAN' not in config_host
144 if 'CONFIG_POSIX' in config_host
146 'test-char': ['socket-helpers.c', qom, io, chardev]
151 'test-qdev-global-props': [qom, hwcore, testqapi]
156 if have_ga and targetos == 'linux' and 'CONFIG_TSAN' not in config_host
157 tests += {'test-qga': ['../qtest/libqtest.c']}
158 test_deps += {'test-qga': qga}
161 test_env = environment()
162 test_env.set('G_TEST_SRCDIR', meson.current_source_dir())
163 test_env.set('G_TEST_BUILDDIR', meson.current_build_dir())
166 'test-crypto-tlscredsx509': 45,
167 'test-crypto-tlssession': 45
170 foreach test_name, extra: tests
171 src = [test_name + '.c']
173 if extra.length() > 0
174 # use a sourceset to quickly separate sources and deps
175 test_ss = ss.source_set()
177 src += test_ss.all_sources()
178 deps += test_ss.all_dependencies()
180 exe = executable(test_name, src, genh, dependencies: deps)
183 depends: test_deps.get(test_name, []),
185 args: ['--tap', '-k'],
187 timeout: slow_tests.get(test_name, 30),
188 priority: slow_tests.get(test_name, 30),