]> git.proxmox.com Git - mirror_qemu.git/blobdiff - tests/wdt_ib700-test.c
xhci: rename xhci_complete_packet to xhci_try_complete_packet
[mirror_qemu.git] / tests / wdt_ib700-test.c
index 10a54720ff11837a0af259d1bbfdcea12bebcfe1..49f4f0c2216f07a45746fc162599c9f90078404c 100644 (file)
@@ -7,10 +7,8 @@
  * See the COPYING file in the top-level directory.
  */
 
-#include <glib.h>
-#include <string.h>
-#include "libqtest.h"
 #include "qemu/osdep.h"
+#include "libqtest.h"
 #include "qemu/timer.h"
 
 static void qmp_check_no_event(void)
@@ -40,29 +38,29 @@ static QDict *qmp_get_event(const char *name)
 
 static QDict *ib700_program_and_wait(QTestState *s)
 {
-    clock_step(NSEC_PER_SEC * 40);
+    clock_step(NANOSECONDS_PER_SECOND * 40);
     qmp_check_no_event();
 
     /* 2 second limit */
     outb(0x443, 14);
 
     /* Ping */
-    clock_step(NSEC_PER_SEC);
+    clock_step(NANOSECONDS_PER_SECOND);
     qmp_check_no_event();
     outb(0x443, 14);
 
     /* Disable */
-    clock_step(NSEC_PER_SEC);
+    clock_step(NANOSECONDS_PER_SECOND);
     qmp_check_no_event();
     outb(0x441, 1);
-    clock_step(3 * NSEC_PER_SEC);
+    clock_step(3 * NANOSECONDS_PER_SECOND);
     qmp_check_no_event();
 
     /* Enable and let it fire */
     outb(0x443, 13);
-    clock_step(3 * NSEC_PER_SEC);
+    clock_step(3 * NANOSECONDS_PER_SECOND);
     qmp_check_no_event();
-    clock_step(2 * NSEC_PER_SEC);
+    clock_step(2 * NANOSECONDS_PER_SECOND);
     return qmp_get_event("WATCHDOG");
 }
 
@@ -119,15 +117,11 @@ static void ib700_none(void)
 
 int main(int argc, char **argv)
 {
-    int ret;
-
     g_test_init(&argc, &argv, NULL);
     qtest_add_func("/wdt_ib700/pause", ib700_pause);
     qtest_add_func("/wdt_ib700/reset", ib700_reset);
     qtest_add_func("/wdt_ib700/shutdown", ib700_shutdown);
     qtest_add_func("/wdt_ib700/none", ib700_none);
 
-    ret = g_test_run();
-
-    return ret;
+    return g_test_run();
 }