diff --git a/ChangeLog b/ChangeLog index 3e68dc706d..6b3b691efb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2005-11-16 Wim Taymans + + * check/Makefile.am: + Enable more tests. + + * check/elements/fakesrc.c: (GST_START_TEST): + Set element to NULL before disposing it. + 2005-11-16 Andy Wingo * gst/net/Makefile.am: diff --git a/check/Makefile.am b/check/Makefile.am index eade55243a..9cc9d2de83 100644 --- a/check/Makefile.am +++ b/check/Makefile.am @@ -85,10 +85,7 @@ net_gstnettimeprovider_LDADD = \ # valgrind testing # these just need valgrind fixing, period -VALGRIND_TO_FIX = \ - gst/gstevent \ - gst-libs/controller \ - pipelines/simple_launch_lines +VALGRIND_TO_FIX = # these need fixing because the threads cause segfaults under valgrind TESTS_THREADED = \ diff --git a/check/elements/fakesrc.c b/check/elements/fakesrc.c index 1b96dd2cb4..130d6f1682 100644 --- a/check/elements/fakesrc.c +++ b/check/elements/fakesrc.c @@ -88,6 +88,9 @@ GST_START_TEST (test_num_buffers) g_list_foreach (buffers, (GFunc) gst_mini_object_unref, NULL); g_list_free (buffers); + fail_unless (gst_element_set_state (src, + GST_STATE_NULL) == GST_STATE_CHANGE_SUCCESS, "could not set to null"); + /* cleanup */ cleanup_fakesrc (src); } @@ -123,6 +126,9 @@ GST_START_TEST (test_sizetype_empty) g_list_foreach (buffers, (GFunc) gst_mini_object_unref, NULL); g_list_free (buffers); + fail_unless (gst_element_set_state (src, + GST_STATE_NULL) == GST_STATE_CHANGE_SUCCESS, "could not set to null"); + /* cleanup */ cleanup_fakesrc (src); } @@ -159,6 +165,9 @@ GST_START_TEST (test_sizetype_fixed) g_list_foreach (buffers, (GFunc) gst_mini_object_unref, NULL); g_list_free (buffers); + fail_unless (gst_element_set_state (src, + GST_STATE_NULL) == GST_STATE_CHANGE_SUCCESS, "could not set to null"); + /* cleanup */ cleanup_fakesrc (src); } @@ -197,6 +206,9 @@ GST_START_TEST (test_sizetype_random) g_list_foreach (buffers, (GFunc) gst_mini_object_unref, NULL); g_list_free (buffers); + fail_unless (gst_element_set_state (src, + GST_STATE_NULL) == GST_STATE_CHANGE_SUCCESS, "could not set to null"); + /* cleanup */ cleanup_fakesrc (src); } @@ -222,6 +234,9 @@ GST_START_TEST (test_no_preroll) fail_unless (ret == GST_STATE_CHANGE_NO_PREROLL, "error going to paused the second time"); + fail_unless (gst_element_set_state (src, + GST_STATE_NULL) == GST_STATE_CHANGE_SUCCESS, "could not set to null"); + /* cleanup */ cleanup_fakesrc (src); } diff --git a/tests/check/Makefile.am b/tests/check/Makefile.am index eade55243a..9cc9d2de83 100644 --- a/tests/check/Makefile.am +++ b/tests/check/Makefile.am @@ -85,10 +85,7 @@ net_gstnettimeprovider_LDADD = \ # valgrind testing # these just need valgrind fixing, period -VALGRIND_TO_FIX = \ - gst/gstevent \ - gst-libs/controller \ - pipelines/simple_launch_lines +VALGRIND_TO_FIX = # these need fixing because the threads cause segfaults under valgrind TESTS_THREADED = \ diff --git a/tests/check/elements/fakesrc.c b/tests/check/elements/fakesrc.c index 1b96dd2cb4..130d6f1682 100644 --- a/tests/check/elements/fakesrc.c +++ b/tests/check/elements/fakesrc.c @@ -88,6 +88,9 @@ GST_START_TEST (test_num_buffers) g_list_foreach (buffers, (GFunc) gst_mini_object_unref, NULL); g_list_free (buffers); + fail_unless (gst_element_set_state (src, + GST_STATE_NULL) == GST_STATE_CHANGE_SUCCESS, "could not set to null"); + /* cleanup */ cleanup_fakesrc (src); } @@ -123,6 +126,9 @@ GST_START_TEST (test_sizetype_empty) g_list_foreach (buffers, (GFunc) gst_mini_object_unref, NULL); g_list_free (buffers); + fail_unless (gst_element_set_state (src, + GST_STATE_NULL) == GST_STATE_CHANGE_SUCCESS, "could not set to null"); + /* cleanup */ cleanup_fakesrc (src); } @@ -159,6 +165,9 @@ GST_START_TEST (test_sizetype_fixed) g_list_foreach (buffers, (GFunc) gst_mini_object_unref, NULL); g_list_free (buffers); + fail_unless (gst_element_set_state (src, + GST_STATE_NULL) == GST_STATE_CHANGE_SUCCESS, "could not set to null"); + /* cleanup */ cleanup_fakesrc (src); } @@ -197,6 +206,9 @@ GST_START_TEST (test_sizetype_random) g_list_foreach (buffers, (GFunc) gst_mini_object_unref, NULL); g_list_free (buffers); + fail_unless (gst_element_set_state (src, + GST_STATE_NULL) == GST_STATE_CHANGE_SUCCESS, "could not set to null"); + /* cleanup */ cleanup_fakesrc (src); } @@ -222,6 +234,9 @@ GST_START_TEST (test_no_preroll) fail_unless (ret == GST_STATE_CHANGE_NO_PREROLL, "error going to paused the second time"); + fail_unless (gst_element_set_state (src, + GST_STATE_NULL) == GST_STATE_CHANGE_SUCCESS, "could not set to null"); + /* cleanup */ cleanup_fakesrc (src); }