test: test-timeout: add dirty hack for loop mode
authorDaniel Mack <zonque@gmail.com>
Thu, 16 Jan 2014 16:05:44 +0000 (17:05 +0100)
committerDaniel Mack <zonque@gmail.com>
Thu, 16 Jan 2014 16:05:44 +0000 (17:05 +0100)
test/test-kdbus-timeout.c

index 733c68e25ee60bc4ccb648e779c171ae4a8a818b..35f384922d8a77d9b5bb38dd5a472724ebfa7e80 100644 (file)
@@ -42,7 +42,7 @@ int timeout_msg_recv(struct conn *conn)
        return 0;
 }
 
-int main(int argc, char *argv[])
+static int run_test(void)
 {
        struct {
                struct kdbus_cmd_make head;
@@ -149,3 +149,11 @@ int main(int argc, char *argv[])
 
        return expected ? EXIT_FAILURE : EXIT_SUCCESS;
 }
+
+int main(int argc, char *argv[])
+{
+       if (argc > 1)
+               while (run_test() == 0);
+
+       return run_test();
+}