Skip to content

Commit 51b3ca9

Browse files
committed
tests/qtest: Unify the test for the xenfv and xenpv machines
We have the same check in three places. Let's unify it in a central place instead. Message-Id: <[email protected]> Reviewed-by: Philippe Mathieu-Daudé <[email protected]> Signed-off-by: Thomas Huth <[email protected]>
1 parent dda2f55 commit 51b3ca9

File tree

4 files changed

+4
-15
lines changed

4 files changed

+4
-15
lines changed

tests/qtest/device-introspect-test.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -287,11 +287,6 @@ static void add_machine_test_case(const char *mname)
287287
{
288288
char *path, *args;
289289

290-
/* Ignore blacklisted machines */
291-
if (!memcmp("xenfv", mname, 5) || g_str_equal("xenpv", mname)) {
292-
return;
293-
}
294-
295290
path = g_strdup_printf("device/introspect/concrete/defaults/%s", mname);
296291
args = g_strdup_printf("-M %s", mname);
297292
qtest_add_data_func(path, args, test_device_intro_concrete);

tests/qtest/libqtest.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1232,6 +1232,10 @@ void qtest_cb_for_every_machine(void (*cb)(const char *machine),
12321232
qstr = qobject_to(QString, qobj);
12331233
g_assert(qstr);
12341234
mname = qstring_get_str(qstr);
1235+
/* Ignore machines that cannot be used for qtests */
1236+
if (!memcmp("xenfv", mname, 5) || g_str_equal("xenpv", mname)) {
1237+
continue;
1238+
}
12351239
if (!skip_old_versioned || !qtest_is_old_versioned_machine(mname)) {
12361240
cb(mname);
12371241
}

tests/qtest/qom-test.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -81,11 +81,6 @@ static void add_machine_test_case(const char *mname)
8181
{
8282
char *path;
8383

84-
/* Ignore blacklisted machines that have known problems */
85-
if (!memcmp("xenfv", mname, 5) || g_str_equal("xenpv", mname)) {
86-
return;
87-
}
88-
8984
path = g_strdup_printf("qom/%s", mname);
9085
qtest_add_data_func(path, g_strdup(mname), test_machine);
9186
g_free(path);

tests/qtest/test-hmp.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -143,11 +143,6 @@ static void add_machine_test_case(const char *mname)
143143
{
144144
char *path;
145145

146-
/* Ignore blacklisted machines that have known problems */
147-
if (!memcmp("xenfv", mname, 5) || g_str_equal("xenpv", mname)) {
148-
return;
149-
}
150-
151146
path = g_strdup_printf("hmp/%s", mname);
152147
qtest_add_data_func(path, g_strdup(mname), test_machine);
153148
g_free(path);

0 commit comments

Comments
 (0)