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 17:56:12 +0000 (12:56 -0500)
commitff2b03c86766eba10a9fdee2ebeedf801efe83a3
tree05d6237611bcdbfa79c647ffcac8eb0626a19616
parentac883ec3865ef6eb92fea65ce3f88eec7da02692
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.034425 seconds and 4 git commands to generate.