gstreamer/tests/check/libs
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
..
.gitignore testclock: minor cleanups, add since markers for gtk-doc 2012-11-13 22:43:04 +00:00
adapter.c tests: gst_adapter_prev_timestamp -> gst_adapter_prev_pts 2012-11-13 23:11:34 +00:00
basesink.c tests: add basesink test 2013-02-05 17:22:37 +01:00
basesrc.c Fix FSF address 2012-11-03 20:44:48 +00:00
bitreader.c Fix FSF address 2012-11-03 20:44:48 +00:00
bytereader.c Fix FSF address 2012-11-03 20:44:48 +00:00
bytewriter.c Fix FSF address 2012-11-03 20:44:48 +00:00
collectpads.c tests: fix spurious failure in test_collect collectpads test 2013-03-18 10:45:13 +00:00
controller.c controller: remove a bogus test 2013-03-07 11:37:21 +01:00
gstlibscpp.cc Fix FSF address 2012-11-03 20:44:48 +00:00
gstnetclientclock.c Fix FSF address 2012-11-03 20:44:48 +00:00
gstnettimeprovider.c Fix FSF address 2012-11-03 20:44:48 +00:00
gsttestclock.c tests: don't use deprecated thread API 2012-11-20 16:34:28 +01:00
libsabi.c tests: fix ABI check struct sizes for ARM 2013-01-17 09:27:48 +00:00
queuearray.c tests: check return value of gst_queue_array_drop_element() too 2013-01-30 11:34:15 +00:00
struct_arm.h tests: fix ABI check struct sizes for ARM 2013-01-17 09:27:48 +00:00
struct_hppa.h tests: enable library abi checks 2012-09-27 10:37:32 +02:00
struct_i386.h tests: update struct_i386.h for ABI checks 2012-10-07 00:16:48 +01:00
struct_ppc32.h tests: update struct_ppc32.h for ABI checks 2012-10-06 17:26:21 +01:00
struct_ppc64.h tests: enable library abi checks 2012-09-27 10:37:32 +02:00
struct_sparc.h tests: enable library abi checks 2012-09-27 10:37:32 +02:00
struct_x86_64.h tests: enable library abi checks 2012-09-27 10:37:32 +02:00
test_transform.c replace gst_element_class_set_details_simple with gst_element_class_set_metadata 2012-09-14 17:01:21 +02:00
transform1.c Fix FSF address 2012-11-03 20:44:48 +00:00
typefindhelper.c Fix FSF address 2012-11-03 20:44:48 +00:00