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)
commit0bc81e4555396942f9b91c17cf314f13e55ab0c7
tree91778719d4e3f359227d97ab0748f226691a70ce
parent8a06890acaaa32494e47fb92e45ad40eca87af3f
Tests: race between consumer pause and trace start/stop

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>
tests/regression/tools/notification/notification.c
This page took 0.025801 seconds and 4 git commands to generate.