]> git.proxmox.com Git - mirror_qemu.git/blobdiff - tests/ds1338-test.c
Revert "vl: Fix to create migration object before block backends again"
[mirror_qemu.git] / tests / ds1338-test.c
index a7fb415353a5d1b1f4e4f4cb2b62f808e6d8195a..742dad911328af732d1d188019eb9c15514830f3 100644 (file)
  *  with this program; if not, see <http://www.gnu.org/licenses/>.
  */
 
+#include "qemu/osdep.h"
 #include "libqtest.h"
 #include "libqos/i2c.h"
 
-#include <glib.h>
-
 #define IMX25_I2C_0_BASE 0x43F80000
 
 #define DS1338_ADDR 0x68
@@ -61,17 +60,15 @@ int main(int argc, char **argv)
 
     g_test_init(&argc, &argv, NULL);
 
-    s = qtest_start("-display none -machine imx25_pdk");
-    i2c = imx_i2c_create(IMX25_I2C_0_BASE);
+    s = qtest_start("-display none -machine imx25-pdk");
+    i2c = imx_i2c_create(s, IMX25_I2C_0_BASE);
     addr = DS1338_ADDR;
 
     qtest_add_func("/ds1338/tx-rx", send_and_receive);
 
     ret = g_test_run();
 
-    if (s) {
-        qtest_quit(s);
-    }
+    qtest_quit(s);
     g_free(i2c);
 
     return ret;