Skip to contentSkip to conversation

bios-tables-test: split piix4 and q35 tests

PATCH In review Paolo Bonzini 2 participants 2 messages Jan 19, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 bios-tables-test: split piix4 and q35 tests

This makes it clear which one is failing.

---
 tests/bios-tables-test.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)
tests/bios-tables-test.c +8 -2
index 2519f7d..4d0fa84 100644
@@ -765,7 +765,7 @@ static void test_acpi_one(const char *params, test_data *data)
     g_free(args);
 }
 
-static void test_acpi_tcg(void)
+static void test_acpi_piix4_tcg(void)
 {
     test_data data;
 
@@ -776,6 +776,11 @@ static void test_acpi_tcg(void)
     data.machine = MACHINE_PC;
     test_acpi_one("-machine accel=tcg", &data);
     free_test_data(&data);
+}
+
+static void test_acpi_q35_tcg(void)
+{
+    test_data data;
 
     memset(&data, 0, sizeof(data));
     data.machine = MACHINE_Q35;
@@ -799,7 +804,8 @@ int main(int argc, char *argv[])
     g_test_init(&argc, &argv, NULL);
 
     if (strcmp(arch, "i386") == 0 || strcmp(arch, "x86_64") == 0) {
-        qtest_add_func("acpi/tcg", test_acpi_tcg);
+        qtest_add_func("acpi/piix4/tcg", test_acpi_piix4_tcg);
+        qtest_add_func("acpi/q35/tcg", test_acpi_q35_tcg);
     }
     ret = g_test_run();
     unlink(disk);
Signature · 1 line
1.8.3.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 34 lines · Paolo Bonzini

This makes it clear which one is failing.

---
  tests/bios-tables-test.c | 10 ++++++++--
  1 file changed, 8 insertions(+), 2 deletions(-)
tests/bios-tables-test.c +6 -1
index 2519f7d..4d0fa84 100644
@@ -765,7 +765,7 @@ static void test_acpi_one(const char *params, test_data *data)
      g_free(args);
  }
 
-static void test_acpi_tcg(void)
+static void test_acpi_piix4_tcg(void)
  {
      test_data data;
 
@@ -776,6 +776,11 @@ static void test_acpi_tcg(void)
      data.machine = MACHINE_PC;
      test_acpi_one("-machine accel=tcg", &data);
      free_test_data(&data);
+}
+
+static void test_acpi_q35_tcg(void)
+{
+    test_data data;
 
      memset(&data, 0, sizeof(data));
      data.machine = MACHINE_Q35;

tests/bios-tables-test.c int main(int argc, char *argv[]) · line 811

Quoted 9 lines
tests/bios-tables-test.c +2 -1
@@ -799,7 +804,8 @@ int main(int argc, char *argv[])
      g_test_init(&argc, &argv, NULL);
 
      if (strcmp(arch, "i386") == 0 || strcmp(arch, "x86_64") == 0) {
-        qtest_add_func("acpi/tcg", test_acpi_tcg);
+        qtest_add_func("acpi/piix4/tcg", test_acpi_piix4_tcg);
+        qtest_add_func("acpi/q35/tcg", test_acpi_q35_tcg);
      }
      ret = g_test_run();
      unlink(disk);