From: Jérémie Galarneau Date: Thu, 12 Nov 2015 20:01:59 +0000 (-0500) Subject: Tests: only call usleep if the test in configured to wait X-Git-Tag: v2.8.0-rc1~215 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=b734f5f715395468cf9c68166820558126264d52;p=lttng-tools.git Tests: only call usleep if the test in configured to wait Signed-off-by: Jérémie Galarneau --- diff --git a/tests/utils/testapp/gen-ust-events/gen-ust-events.c b/tests/utils/testapp/gen-ust-events/gen-ust-events.c index b0892ce96..f1eb18f52 100644 --- a/tests/utils/testapp/gen-ust-events/gen-ust-events.c +++ b/tests/utils/testapp/gen-ust-events/gen-ust-events.c @@ -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;