]> git.proxmox.com Git - mirror_qemu.git/blobdiff - tests/i440fx-test.c
Merge remote-tracking branch 'remotes/maxreitz/tags/pull-block-2017-04-03' into staging
[mirror_qemu.git] / tests / i440fx-test.c
index 05029e90b2be5b47375cddec8db39d489ebc23e7..e9d05c87d18062f84c78992a562389f94464ad09 100644 (file)
@@ -13,8 +13,6 @@
  */
 
 #include "qemu/osdep.h"
-#include <glib.h>
-#include <sys/mman.h>
 
 #include "libqtest.h"
 #include "libqos/pci.h"
@@ -40,7 +38,7 @@ static QPCIBus *test_start_get_bus(const TestData *s)
     cmdline = g_strdup_printf("-smp %d", s->num_cpus);
     qtest_start(cmdline);
     g_free(cmdline);
-    return qpci_init_pc();
+    return qpci_init_pc(NULL);
 }
 
 static void test_i440fx_defaults(gconstpointer opaque)
@@ -136,6 +134,8 @@ static void test_i440fx_defaults(gconstpointer opaque)
     /* 3.2.26 */
     g_assert_cmpint(qpci_config_readb(dev, 0x93), ==, 0x00); /* TRC */
 
+    g_free(dev);
+    qpci_free_pc(bus);
     qtest_end();
 }
 
@@ -272,6 +272,9 @@ static void test_i440fx_pam(gconstpointer opaque)
         /* Verify the area is not our new mask */
         g_assert(!verify_area(pam_area[i].start, pam_area[i].end, 0x82));
     }
+
+    g_free(dev);
+    qpci_free_pc(bus);
     qtest_end();
 }
 
@@ -396,7 +399,6 @@ static void request_pflash(FirmwareTestFixture *fixture,
 int main(int argc, char **argv)
 {
     TestData data;
-    int ret;
 
     g_test_init(&argc, &argv, NULL);
 
@@ -407,6 +409,5 @@ int main(int argc, char **argv)
     add_firmware_test("i440fx/firmware/bios", request_bios);
     add_firmware_test("i440fx/firmware/pflash", request_pflash);
 
-    ret = g_test_run();
-    return ret;
+    return g_test_run();
 }