gstreamer/tests/check
Jonas Holmberg afbba8974a tests: fix spurious failure in test_collect collectpads test
pop() in collected callback.

There were three threads in the test cases that hanged: the test thread and two
threads that push buffers. Each thread push one buffer on one pad. There are
two pads in the collectpads so the second buffer will trigger the
collect-callback.

This is what happens when the hang occurs:

The first thread pushes a buffer and initializes a cookie to the value of a
counter in the collectpads object and waits on a cond for the counter to change
and for someone to consume the buffer (i.e. _pop() it).

The second thread pushes a buffer and calls the collected callback, which
signals the cond that the test thread is waiting for.

The test thread pops both buffers (without holding any lock). Each call to
_pop() increases the counter broadcasts the condition that the first thread is
now waiting for. It then joins both threads (hangs).

The first thread wakes up and returns, since its buffer has been consumed.

The second thread starts executing again. When the callback, called by the
second thread, has returned it initializes a cookie to the value of a counter,
which has already prematurely been increased by the test thread when it popped
the buffers, and wait's on a cond for the counter to change and for someone to
consume the buffer (i.e. _pop() it). Since the buffer has already been poped
and the counter has already been increased it will be stuck forever.

https://bugzilla.gnome.org/show_bug.cgi?id=685555
2013-03-18 10:45:13 +00:00
..
elements tests: unit test to trigger the queue/flushing race condition bug for allocation queries 2013-01-30 12:07:52 +00:00
generic Fix FSF address 2012-11-03 20:44:48 +00:00
gst controller: code cleanups 2013-03-08 13:16:40 +01:00
libs tests: fix spurious failure in test_collect collectpads test 2013-03-18 10:45:13 +00:00
pipelines tests: use g_timeout_add_seconds in pipeline stress test 2013-01-27 14:52:39 +00:00
tools Fix FSF address 2012-11-03 20:44:48 +00:00
.gitignore tests: add check for gst-inspect --exists functionality 2012-09-01 23:02:10 +01:00
Makefile.am Use GST_*_1_0 environment variables everywhere 2013-01-15 13:47:32 +00:00