Tests: only call usleep if the test in configured to wait
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 12 Nov 2015 20:01:59 +0000 (15:01 -0500)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 12 Nov 2015 22:16:07 +0000 (17:16 -0500)
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
tests/utils/testapp/gen-ust-events/gen-ust-events.c

index b0892ce96ec5ba43f41a71c8dd39ac7d0f19979f..f1eb18f52f927cb7ffd6181d11f2d19666768e42 100644 (file)
@@ -126,7 +126,9 @@ int main(int argc, char **argv)
                 * that at least one tracepoint has been hit.
                 */
                create_file(after_first_event_file_path);
-               usleep(nr_usec);
+               if (nr_usec) {
+                       usleep(nr_usec);
+               }
        }
 
        return 0;
This page took 0.025798 seconds and 4 git commands to generate.