mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 04:01:08 +00:00
tests/check/: Don't busy-wait in tests; this was causing test timeouts very frequently when running under valgrind.
Original commit message from CVS: * tests/check/elements/audioconvert.c: (set_channel_positions), (get_float_mc_caps), (get_int_mc_caps): * tests/check/elements/audioresample.c: * tests/check/elements/audiotestsrc.c: (GST_START_TEST): * tests/check/elements/videorate.c: * tests/check/elements/videotestsrc.c: (GST_START_TEST): * tests/check/elements/volume.c: * tests/check/elements/vorbisdec.c: * tests/check/pipelines/vorbisenc.c: (GST_START_TEST): Don't busy-wait in tests; this was causing test timeouts very frequently when running under valgrind.
This commit is contained in:
parent
fca1b42746
commit
dd42d7ba98
9 changed files with 27 additions and 10 deletions
14
ChangeLog
14
ChangeLog
|
@ -1,3 +1,17 @@
|
|||
2006-06-02 Michael Smith <msmith@fluendo.com>
|
||||
|
||||
* tests/check/elements/audioconvert.c: (set_channel_positions),
|
||||
(get_float_mc_caps), (get_int_mc_caps):
|
||||
* tests/check/elements/audioresample.c:
|
||||
* tests/check/elements/audiotestsrc.c: (GST_START_TEST):
|
||||
* tests/check/elements/videorate.c:
|
||||
* tests/check/elements/videotestsrc.c: (GST_START_TEST):
|
||||
* tests/check/elements/volume.c:
|
||||
* tests/check/elements/vorbisdec.c:
|
||||
* tests/check/pipelines/vorbisenc.c: (GST_START_TEST):
|
||||
Don't busy-wait in tests; this was causing test timeouts very
|
||||
frequently when running under valgrind.
|
||||
|
||||
2006-06-02 Thomas Vander Stichele <thomas at apestaart dot org>
|
||||
|
||||
* gst/tcp/README:
|
||||
|
|
|
@ -25,7 +25,6 @@
|
|||
#include <gst/check/gstcheck.h>
|
||||
#include <gst/audio/multichannel.h>
|
||||
|
||||
GList *buffers = NULL;
|
||||
gboolean have_eos = FALSE;
|
||||
|
||||
/* For ease of programming we use globals to keep refs for our floating
|
||||
|
|
|
@ -24,7 +24,6 @@
|
|||
|
||||
#include <gst/check/gstcheck.h>
|
||||
|
||||
GList *buffers = NULL;
|
||||
gboolean have_eos = FALSE;
|
||||
|
||||
/* For ease of programming we use globals to keep refs for our floating
|
||||
|
|
|
@ -24,7 +24,6 @@
|
|||
|
||||
#include <gst/check/gstcheck.h>
|
||||
|
||||
GList *buffers = NULL;
|
||||
gboolean have_eos = FALSE;
|
||||
|
||||
/* For ease of programming we use globals to keep refs for our floating
|
||||
|
@ -96,7 +95,10 @@ GST_START_TEST (test_all_waves)
|
|||
GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS,
|
||||
"could not set to playing");
|
||||
|
||||
while (g_list_length (buffers) < 10);
|
||||
g_mutex_lock (check_mutex);
|
||||
while (g_list_length (buffers) < 10)
|
||||
g_cond_wait (check_cond, check_mutex);
|
||||
g_mutex_unlock (check_mutex);
|
||||
|
||||
gst_element_set_state (audiotestsrc, GST_STATE_READY);
|
||||
|
||||
|
|
|
@ -24,7 +24,6 @@
|
|||
|
||||
#include <gst/check/gstcheck.h>
|
||||
|
||||
GList *buffers = NULL;
|
||||
gboolean have_eos = FALSE;
|
||||
|
||||
/* For ease of programming we use globals to keep refs for our floating
|
||||
|
|
|
@ -24,7 +24,6 @@
|
|||
|
||||
#include <gst/check/gstcheck.h>
|
||||
|
||||
GList *buffers = NULL;
|
||||
gboolean have_eos = FALSE;
|
||||
|
||||
/* For ease of programming we use globals to keep refs for our floating
|
||||
|
@ -94,7 +93,13 @@ GST_START_TEST (test_all_patterns)
|
|||
GST_STATE_PLAYING) == GST_STATE_CHANGE_SUCCESS,
|
||||
"could not set to playing");
|
||||
|
||||
while (g_list_length (buffers) < 10);
|
||||
g_mutex_lock (check_mutex);
|
||||
while (g_list_length (buffers) < 10) {
|
||||
GST_DEBUG_OBJECT (videotestsrc, "Waiting for more buffers");
|
||||
g_cond_wait (check_cond, check_mutex);
|
||||
}
|
||||
g_mutex_unlock (check_mutex);
|
||||
|
||||
|
||||
gst_element_set_state (videotestsrc, GST_STATE_READY);
|
||||
|
||||
|
|
|
@ -25,7 +25,6 @@
|
|||
#include <gst/base/gstbasetransform.h>
|
||||
#include <gst/check/gstcheck.h>
|
||||
|
||||
GList *buffers = NULL;
|
||||
gboolean have_eos = FALSE;
|
||||
|
||||
/* For ease of programming we use globals to keep refs for our floating
|
||||
|
|
|
@ -24,8 +24,6 @@
|
|||
|
||||
#include <gst/check/gstcheck.h>
|
||||
|
||||
GList *buffers = NULL;
|
||||
|
||||
/* For ease of programming we use globals to keep refs for our floating
|
||||
* src and sink pads we create; otherwise we always have to do get_pad,
|
||||
* get_peer, and then remove references in every test function */
|
||||
|
|
|
@ -198,10 +198,12 @@ GST_START_TEST (test_granulepos_offset)
|
|||
|
||||
/* header packets should have timestamp == NONE, granulepos 0 */
|
||||
buffer = get_buffer (bin, pad);
|
||||
GST_DEBUG ("Got buffer in test");
|
||||
check_buffer_timestamp (buffer, GST_CLOCK_TIME_NONE);
|
||||
check_buffer_duration (buffer, GST_CLOCK_TIME_NONE);
|
||||
check_buffer_granulepos (buffer, 0);
|
||||
gst_buffer_unref (buffer);
|
||||
GST_DEBUG ("Unreffed buffer in test");
|
||||
|
||||
buffer = get_buffer (bin, pad);
|
||||
check_buffer_timestamp (buffer, GST_CLOCK_TIME_NONE);
|
||||
|
|
Loading…
Reference in a new issue