From 53f77e4562f85ccf82c8831a4448e9aefb538837 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20F=C3=A4rber?= Date: Wed, 25 Mar 2015 18:40:15 +0100 Subject: tests: Use qtest_add_data_func() consistently MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: John Snow Signed-off-by: Andreas Färber --- tests/ahci-test.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'tests/ahci-test.c') diff --git a/tests/ahci-test.c b/tests/ahci-test.c index 6e3fa81..ae9415d 100644 --- a/tests/ahci-test.c +++ b/tests/ahci-test.c @@ -1486,7 +1486,6 @@ static void test_io_interface(gconstpointer opaque) static void create_ahci_io_test(enum IOMode type, enum AddrMode addr, enum BuffLen len, enum OffsetType offset) { - static const char *arch; char *name; AHCIIOTestOptions *opts = g_malloc(sizeof(AHCIIOTestOptions)); @@ -1495,17 +1494,13 @@ static void create_ahci_io_test(enum IOMode type, enum AddrMode addr, opts->io_type = type; opts->offset = offset; - if (!arch) { - arch = qtest_get_arch(); - } - - name = g_strdup_printf("/%s/ahci/io/%s/%s/%s/%s", arch, + name = g_strdup_printf("ahci/io/%s/%s/%s/%s", io_mode_str[type], addr_mode_str[addr], buff_len_str[len], offset_str[offset]); - g_test_add_data_func(name, opts, test_io_interface); + qtest_add_data_func(name, opts, test_io_interface); g_free(name); } -- cgit v1.1