diff --git a/tests/check/generic/states.c b/tests/check/generic/states.c index 11679164c0..bd33b4126b 100644 --- a/tests/check/generic/states.c +++ b/tests/check/generic/states.c @@ -203,12 +203,14 @@ GST_START_TEST (test_state_changes_down_seq) GST_END_TEST; - -static Suite * -states_suite (void) +/* Separate function because XInitThreads leaks, but valgrind + * gets confused when a dynamically loaded symbol leaks, and + * shows it as a ??? symbol in an unrelated library, making + * it awkward to ignore in the suppression files + */ +static void +call_xinitthreads (void) { - Suite *s = suite_create ("states_base"); - TCase *tc_chain = tcase_create ("general"); GModule *libx11; libx11 = @@ -220,6 +222,15 @@ states_suite (void) } g_module_close (libx11); } +} + +static Suite * +states_suite (void) +{ + Suite *s = suite_create ("states_base"); + TCase *tc_chain = tcase_create ("general"); + + call_xinitthreads (); suite_add_tcase (s, tc_chain); tcase_add_checked_fixture (tc_chain, setup, teardown); diff --git a/tests/check/gst-plugins-base.supp b/tests/check/gst-plugins-base.supp index 3e923c8b76..0c92fbccf2 100644 --- a/tests/check/gst-plugins-base.supp +++ b/tests/check/gst-plugins-base.supp @@ -569,3 +569,12 @@ fun:glXChooseFBConfig fun:gst_gl_context_glx_choose_format } +{ + + Memcheck:Leak + match-leak-kinds: definite + fun:malloc + ... + fun:call_xinitthreads + fun:states_suite +}