]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
tests: Remove (mostly) useless architecture checks
authorThomas Huth <thuth@redhat.com>
Fri, 1 Mar 2019 16:16:10 +0000 (17:16 +0100)
committerLaurent Vivier <laurent@vivier.eu>
Wed, 6 Mar 2019 09:10:36 +0000 (10:10 +0100)
These checks at the beginning of some of the tests are mostly useless:
We only run the tests on x86 anyway, and g_test_message() does not
print anything unless you call g_test_init() first.

Signed-off-by: Thomas Huth <thuth@redhat.com>
Acked-by: John Snow <jsnow@redhat.com>
Acked-by: Corey Minyard <cminyard@mvista.com>
Message-Id: <1551456970-463-1-git-send-email-thuth@redhat.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
tests/fdc-test.c
tests/ide-test.c
tests/ipmi-bt-test.c
tests/ipmi-kcs-test.c

index 88f1abfa10e256e16ad76184921d7dcfa84696cb..31cd3295c102f556ea14a1b57967b91f7c7533f9 100644 (file)
@@ -548,16 +548,9 @@ static void fuzz_registers(void)
 
 int main(int argc, char **argv)
 {
-    const char *arch = qtest_get_arch();
     int fd;
     int ret;
 
-    /* Check architecture */
-    if (strcmp(arch, "i386") && strcmp(arch, "x86_64")) {
-        g_test_message("Skipping test for non-x86\n");
-        return 0;
-    }
-
     /* Create a temporary raw image */
     fd = mkstemp(test_image);
     g_assert(fd >= 0);
index f0280e636b5d0d62615281fbaba121a2720c0f4c..300d64e77ddf6be63ebc0cd14e89fd38846405f0 100644 (file)
@@ -1009,16 +1009,9 @@ static void test_cdrom_dma(void)
 
 int main(int argc, char **argv)
 {
-    const char *arch = qtest_get_arch();
     int fd;
     int ret;
 
-    /* Check architecture */
-    if (strcmp(arch, "i386") && strcmp(arch, "x86_64")) {
-        g_test_message("Skipping test for non-x86\n");
-        return 0;
-    }
-
     /* Create temporary blkdebug instructions */
     fd = mkstemp(debug_path);
     g_assert(fd >= 0);
index f4a81b526505f688d0d68f6de96621ed2229f981..fc4c83b5db7c53d6730d3ac5e9facd5a7db14dc4 100644 (file)
@@ -400,15 +400,8 @@ static void open_socket(void)
 
 int main(int argc, char **argv)
 {
-    const char *arch = qtest_get_arch();
     int ret;
 
-    /* Check architecture */
-    if (strcmp(arch, "i386") && strcmp(arch, "x86_64")) {
-        g_test_message("Skipping test for non-x86\n");
-        return 0;
-    }
-
     open_socket();
 
     /* Run the tests */
index 178ffc1797346ce5229ec470fcc3796c7de6cae9..a2354c10c7fe5e222e45802f6c94c4da2e990eb3 100644 (file)
@@ -263,16 +263,9 @@ static void test_enable_irq(void)
 
 int main(int argc, char **argv)
 {
-    const char *arch = qtest_get_arch();
     char *cmdline;
     int ret;
 
-    /* Check architecture */
-    if (strcmp(arch, "i386") && strcmp(arch, "x86_64")) {
-        g_test_message("Skipping test for non-x86\n");
-        return 0;
-    }
-
     /* Run the tests */
     g_test_init(&argc, &argv, NULL);