]> git.proxmox.com Git - mirror_qemu.git/blame - tests/qtest/modules-test.c
Merge tag 'pull-maintainer-may24-160524-2' of https://gitlab.com/stsquad/qemu into...
[mirror_qemu.git] / tests / qtest / modules-test.c
CommitLineData
eb062cfa 1#include "qemu/osdep.h"
907b5105 2#include "libqtest.h"
eb062cfa 3
d39b6263
MAL
4const char common_args[] = "-nodefaults -machine none";
5
eb062cfa
MAL
6static void test_modules_load(const void *data)
7{
8 QTestState *qts;
0712c1b1 9 const char **args = (const char **)data;
eb062cfa 10
d39b6263 11 qts = qtest_init(common_args);
eb062cfa
MAL
12 qtest_module_load(qts, args[0], args[1]);
13 qtest_quit(qts);
14}
15
16int main(int argc, char *argv[])
17{
18 const char *modules[] = {
fd66dbd4
SH
19#ifdef CONFIG_BLKIO
20 "block-", "blkio",
21#endif
eb062cfa
MAL
22#ifdef CONFIG_CURL
23 "block-", "curl",
24#endif
25#ifdef CONFIG_GLUSTERFS
26 "block-", "gluster",
27#endif
28#ifdef CONFIG_LIBISCSI
29 "block-", "iscsi",
30#endif
31#ifdef CONFIG_LIBNFS
32 "block-", "nfs",
33#endif
34#ifdef CONFIG_LIBSSH
35 "block-", "ssh",
36#endif
37#ifdef CONFIG_RBD
38 "block-", "rbd",
39#endif
40#ifdef CONFIG_AUDIO_ALSA
41 "audio-", "alsa",
42#endif
43#ifdef CONFIG_AUDIO_OSS
44 "audio-", "oss",
45#endif
46#ifdef CONFIG_AUDIO_PA
47 "audio-", "pa",
48#endif
49#ifdef CONFIG_AUDIO_SDL
50 "audio-", "sdl",
51#endif
52#ifdef CONFIG_CURSES
53 "ui-", "curses",
54#endif
55#if defined(CONFIG_GTK) && defined(CONFIG_VTE)
56 "ui-", "gtk",
57#endif
58#ifdef CONFIG_SDL
59 "ui-", "sdl",
f54d432e
MAL
60#endif
61#if defined(CONFIG_SPICE) && defined(CONFIG_GIO)
62 "ui-", "spice-app",
eb062cfa
MAL
63#endif
64 };
65 int i;
66
67 g_test_init(&argc, &argv, NULL);
68
69 for (i = 0; i < G_N_ELEMENTS(modules); i += 2) {
eca3a945
CR
70 char *testname = g_strdup_printf("/module/load/%s%s",
71 modules[i], modules[i + 1]);
eb062cfa
MAL
72 qtest_add_data_func(testname, modules + i, test_modules_load);
73 g_free(testname);
74 }
75
76 return g_test_run();
77}