]> Git Repo - qemu.git/blobdiff - tests/m48t59-test.c
test-aio: test timers on Windows too
[qemu.git] / tests / m48t59-test.c
index d79f55472dda724c3a099d1b7f794beff4a25032..71b4f280528bbe9258e66bcd68edf71ec60ac5fd 100644 (file)
@@ -11,7 +11,6 @@
  * See the COPYING file in the top-level directory.
  *
  */
-#include "libqtest.h"
 
 #include <glib.h>
 #include <stdio.h>
@@ -19,6 +18,8 @@
 #include <stdlib.h>
 #include <unistd.h>
 
+#include "libqtest.h"
+
 #define RTC_SECONDS             0x9
 #define RTC_MINUTES             0xa
 #define RTC_HOURS               0xb
@@ -35,17 +36,14 @@ static bool use_mmio;
 
 static uint8_t cmos_read_mmio(uint8_t reg)
 {
-    uint8_t data;
-
-    memread(base + (uint32_t)reg_base + (uint32_t)reg, &data, 1);
-    return data;
+    return readb(base + (uint32_t)reg_base + (uint32_t)reg);
 }
 
 static void cmos_write_mmio(uint8_t reg, uint8_t val)
 {
     uint8_t data = val;
 
-    memwrite(base + (uint32_t)reg_base + (uint32_t)reg, &data, 1);
+    writeb(base + (uint32_t)reg_base + (uint32_t)reg, data);
 }
 
 static uint8_t cmos_read_ioio(uint8_t reg)
@@ -142,7 +140,9 @@ static void cmos_get_date_time(struct tm *date)
     date->tm_mday = mday;
     date->tm_mon = mon - 1;
     date->tm_year = base_year + year - 1900;
+#ifndef __sun__
     date->tm_gmtoff = 0;
+#endif
 
     ts = mktime(date);
 }
@@ -250,7 +250,7 @@ int main(int argc, char **argv)
 
     g_test_init(&argc, &argv, NULL);
 
-    s = qtest_start("-display none -rtc clock=vm");
+    s = qtest_start("-rtc clock=vm");
 
     qtest_add_func("/rtc/bcd/check-time", bcd_check_time);
     qtest_add_func("/rtc/fuzz-registers", fuzz_registers);
This page took 0.024982 seconds and 4 git commands to generate.