diff options
author | Andreas Färber <afaerber@suse.de> | 2015-03-25 18:40:15 +0100 |
---|---|---|
committer | Andreas Färber <afaerber@suse.de> | 2015-06-19 10:29:14 +0200 |
commit | 53f77e4562f85ccf82c8831a4448e9aefb538837 (patch) | |
tree | 2e157291a0aff53457da50305a16f6a6488760b9 /tests/pc-cpu-test.c | |
parent | 6bc5cf92c0ab0085ba9a6e0cebcf5a544f416ca7 (diff) | |
download | qemu-53f77e4562f85ccf82c8831a4448e9aefb538837.zip qemu-53f77e4562f85ccf82c8831a4448e9aefb538837.tar.gz qemu-53f77e4562f85ccf82c8831a4448e9aefb538837.tar.bz2 |
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>
Diffstat (limited to 'tests/pc-cpu-test.c')
-rw-r--r-- | tests/pc-cpu-test.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/tests/pc-cpu-test.c b/tests/pc-cpu-test.c index a0122d3..3505c7c 100644 --- a/tests/pc-cpu-test.c +++ b/tests/pc-cpu-test.c @@ -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(); |