|
15 | 15 | #include "qemu/cutils.h"
|
16 | 16 | #include "libqtest.h"
|
17 | 17 |
|
18 |
| -static const char *blacklist_x86[] = { |
19 |
| - "xenfv", "xenpv", NULL |
20 |
| -}; |
21 |
| - |
22 |
| -static const struct { |
23 |
| - const char *arch; |
24 |
| - const char **machine; |
25 |
| -} blacklists[] = { |
26 |
| - { "i386", blacklist_x86 }, |
27 |
| - { "x86_64", blacklist_x86 }, |
28 |
| -}; |
29 |
| - |
30 |
| -static bool is_blacklisted(const char *arch, const char *mach) |
31 |
| -{ |
32 |
| - int i; |
33 |
| - const char **p; |
34 |
| - |
35 |
| - for (i = 0; i < ARRAY_SIZE(blacklists); i++) { |
36 |
| - if (!strcmp(blacklists[i].arch, arch)) { |
37 |
| - for (p = blacklists[i].machine; *p; p++) { |
38 |
| - if (!strcmp(*p, mach)) { |
39 |
| - return true; |
40 |
| - } |
41 |
| - } |
42 |
| - } |
43 |
| - } |
44 |
| - return false; |
45 |
| -} |
46 |
| - |
47 | 18 | static void test_properties(QTestState *qts, const char *path, bool recurse)
|
48 | 19 | {
|
49 | 20 | char *child_path;
|
@@ -108,13 +79,16 @@ static void test_machine(gconstpointer data)
|
108 | 79 |
|
109 | 80 | static void add_machine_test_case(const char *mname)
|
110 | 81 | {
|
111 |
| - const char *arch = qtest_get_arch(); |
| 82 | + char *path; |
112 | 83 |
|
113 |
| - if (!is_blacklisted(arch, mname)) { |
114 |
| - char *path = g_strdup_printf("qom/%s", mname); |
115 |
| - qtest_add_data_func(path, g_strdup(mname), test_machine); |
116 |
| - g_free(path); |
| 84 | + /* Ignore blacklisted machines that have known problems */ |
| 85 | + if (!memcmp("xenfv", mname, 5) || g_str_equal("xenpv", mname)) { |
| 86 | + return; |
117 | 87 | }
|
| 88 | + |
| 89 | + path = g_strdup_printf("qom/%s", mname); |
| 90 | + qtest_add_data_func(path, g_strdup(mname), test_machine); |
| 91 | + g_free(path); |
118 | 92 | }
|
119 | 93 |
|
120 | 94 | int main(int argc, char **argv)
|
|
0 commit comments