mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-12-17 21:26:13 -07:00
tests: Use qtest_add_data_func() consistently
Replace uses of g_test_add_data_func() for QTest test cases. It is still valid to use it for any non-QTest test cases, which are not run for multiple target binaries. Suggested-by: John Snow <jsnow@redhat.com> Reviewed-by: John Snow <jsnow@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
This commit is contained in:
parent
6bc5cf92c0
commit
53f77e4562
6 changed files with 23 additions and 30 deletions
|
|
@ -75,7 +75,6 @@ static void test_pc_without_cpu_add(gconstpointer data)
|
|||
|
||||
static void add_pc_test_cases(void)
|
||||
{
|
||||
const char *arch = qtest_get_arch();
|
||||
QDict *response, *minfo;
|
||||
QList *list;
|
||||
const QListEntry *p;
|
||||
|
|
@ -119,15 +118,15 @@ static void add_pc_test_cases(void)
|
|||
(strcmp(mname, "pc-0.12") == 0) ||
|
||||
(strcmp(mname, "pc-0.11") == 0) ||
|
||||
(strcmp(mname, "pc-0.10") == 0)) {
|
||||
path = g_strdup_printf("/%s/cpu/%s/init/%ux%ux%u&maxcpus=%u",
|
||||
arch, mname, data->sockets, data->cores,
|
||||
path = g_strdup_printf("cpu/%s/init/%ux%ux%u&maxcpus=%u",
|
||||
mname, data->sockets, data->cores,
|
||||
data->threads, data->maxcpus);
|
||||
g_test_add_data_func(path, data, test_pc_without_cpu_add);
|
||||
qtest_add_data_func(path, data, test_pc_without_cpu_add);
|
||||
} else {
|
||||
path = g_strdup_printf("/%s/cpu/%s/add/%ux%ux%u&maxcpus=%u",
|
||||
arch, mname, data->sockets, data->cores,
|
||||
path = g_strdup_printf("cpu/%s/add/%ux%ux%u&maxcpus=%u",
|
||||
mname, data->sockets, data->cores,
|
||||
data->threads, data->maxcpus);
|
||||
g_test_add_data_func(path, data, test_pc_with_cpu_add);
|
||||
qtest_add_data_func(path, data, test_pc_with_cpu_add);
|
||||
}
|
||||
}
|
||||
qtest_end();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue