Tests: race between consumer pause and trace start/stop
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Sat, 9 Dec 2017 17:51:46 +0000 (12:51 -0500)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Sat, 9 Dec 2017 20:20:25 +0000 (15:20 -0500)
This fixes two problems with the current test.

1. Starting the tracing before pausing the consumption can result
in an arbitrary number of buffer usage conditions being sent to
the client as the buffers can be filled and emptied a number of
times.

2. Resuming the consumption before stopping tracing can, in a
similar way as '1', result in an arbitrary number of notifications
being sent to the client.

Note that the non-blocking stop is used since the blocking
variant would wait for pending data to be flushed forever since
the consumption is paused. Hence, we stop the tracing, resume
the consumption, and wait for the buffers to be flushed explicitly
using the lttng_data_pending() call. No sleeps are performed in
that loop since those could hide races triggered by this test.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>

No differences found
This page took 0.026159 seconds and 4 git commands to generate.