check/Makefile.am: have some tests be disabled for valgrinding

Original commit message from CVS:

* check/Makefile.am:
have some tests be disabled for valgrinding
* check/elements/vorbisdec.c: (cleanup_vorbisdec),
(GST_START_TEST):
* ext/vorbis/vorbisdec.c: (vorbisdec_finalize):
Fix A Leak.  Chain To Parent Finalize.
This commit is contained in:
Thomas Vander Stichele 2005-09-19 16:12:09 +00:00
parent 7ff873d88b
commit 82da93b310
6 changed files with 30 additions and 3 deletions

View file

@ -1,3 +1,12 @@
2005-09-19 Thomas Vander Stichele <thomas at apestaart dot org>
* check/Makefile.am:
have some tests be disabled for valgrinding
* check/elements/vorbisdec.c: (cleanup_vorbisdec),
(GST_START_TEST):
* ext/vorbis/vorbisdec.c: (vorbisdec_finalize):
Fix A Leak. Chain To Parent Finalize.
2005-09-19 Wim Taymans <wim@fluendo.com>
* examples/seeking/seek.c: (make_wav_pipeline), (main):

View file

@ -34,6 +34,11 @@ check_PROGRAMS = \
pipelines/simple_launch_lines \
$(check_vorbis)
# tests to fix leaks in
VALGRIND_TO_FIX = \
elements/audioresample \
pipelines/simple_launch_lines
# these tests don't even pass
# generic/states: elements need state fixin' before this can be added
noinst_PROGRAMS = \
@ -43,6 +48,6 @@ AM_CFLAGS = $(GST_OBJ_CFLAGS) $(GST_CHECK_CFLAGS) $(CHECK_CFLAGS)
LDADD = $(GST_OBJ_LIBS) $(GST_CHECK_LIBS) $(CHECK_LIBS)
# valgrind testing
VALGRIND_TESTS_DISABLE =
VALGRIND_TESTS_DISABLE = $(VALGRIND_TO_FIX)
SUPPRESSIONS = $(top_srcdir)/common/gst.supp

View file

@ -82,6 +82,7 @@ void
cleanup_vorbisdec (GstElement * vorbisdec)
{
GST_DEBUG ("cleanup_vorbisdec");
gst_element_set_state (vorbisdec, GST_STATE_NULL);
gst_check_teardown_src_pad (vorbisdec);
gst_check_teardown_sink_pad (vorbisdec);
@ -213,11 +214,13 @@ GST_START_TEST (test_identification_header)
1);
fail_unless (gst_tag_list_get_string (tag_list, GST_TAG_ARTIST, &artist));
fail_unless_equals_string (artist, "me");
g_free (artist);
fail_unless_equals_int (gst_tag_list_get_tag_size (tag_list, "album"), 0);
gst_tag_list_free (tag_list);
gst_message_unref (message);
/* cleanup */
gst_bus_set_flushing (bus, TRUE);
gst_element_set_bus (vorbisdec, NULL);
gst_object_unref (GST_OBJECT (bus));
cleanup_vorbisdec (vorbisdec);

View file

@ -183,7 +183,7 @@ gst_vorbis_dec_init (GstVorbisDec * dec, GstVorbisDecClass * g_class)
static void
vorbisdec_finalize (GObject * object)
{
/* Release any possibly allocated libvorbis data.
/* Release any possibly allocated libvorbis data.
* _clear functions can safely be called multiple times
*/
GstVorbisDec *vd = GST_VORBIS_DEC (object);
@ -192,6 +192,8 @@ vorbisdec_finalize (GObject * object)
vorbis_dsp_clear (&vd->vd);
vorbis_comment_clear (&vd->vc);
vorbis_info_clear (&vd->vi);
G_OBJECT_CLASS (parent_class)->finalize (object);
}
static gboolean

View file

@ -34,6 +34,11 @@ check_PROGRAMS = \
pipelines/simple_launch_lines \
$(check_vorbis)
# tests to fix leaks in
VALGRIND_TO_FIX = \
elements/audioresample \
pipelines/simple_launch_lines
# these tests don't even pass
# generic/states: elements need state fixin' before this can be added
noinst_PROGRAMS = \
@ -43,6 +48,6 @@ AM_CFLAGS = $(GST_OBJ_CFLAGS) $(GST_CHECK_CFLAGS) $(CHECK_CFLAGS)
LDADD = $(GST_OBJ_LIBS) $(GST_CHECK_LIBS) $(CHECK_LIBS)
# valgrind testing
VALGRIND_TESTS_DISABLE =
VALGRIND_TESTS_DISABLE = $(VALGRIND_TO_FIX)
SUPPRESSIONS = $(top_srcdir)/common/gst.supp

View file

@ -82,6 +82,7 @@ void
cleanup_vorbisdec (GstElement * vorbisdec)
{
GST_DEBUG ("cleanup_vorbisdec");
gst_element_set_state (vorbisdec, GST_STATE_NULL);
gst_check_teardown_src_pad (vorbisdec);
gst_check_teardown_sink_pad (vorbisdec);
@ -213,11 +214,13 @@ GST_START_TEST (test_identification_header)
1);
fail_unless (gst_tag_list_get_string (tag_list, GST_TAG_ARTIST, &artist));
fail_unless_equals_string (artist, "me");
g_free (artist);
fail_unless_equals_int (gst_tag_list_get_tag_size (tag_list, "album"), 0);
gst_tag_list_free (tag_list);
gst_message_unref (message);
/* cleanup */
gst_bus_set_flushing (bus, TRUE);
gst_element_set_bus (vorbisdec, NULL);
gst_object_unref (GST_OBJECT (bus));
cleanup_vorbisdec (vorbisdec);