mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-07 16:49:52 +00:00
check: Avoid race with leaks test
The problem is that the taskpool might not have completely drained by the time we check for leaks. Instead, ensure all tasks have stopped before testing for valid results. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/523>
This commit is contained in:
parent
3ac3a01298
commit
58859c8ee9
1 changed files with 9 additions and 0 deletions
|
@ -169,6 +169,9 @@ GST_START_TEST (test_get_live_objects)
|
|||
GST_STATE_CHANGE_SUCCESS);
|
||||
gst_object_unref (pipe);
|
||||
|
||||
/* Force all leftover tasks to stop */
|
||||
gst_task_cleanup_all ();
|
||||
|
||||
/* Check the live-objects data returned by the tracer */
|
||||
{
|
||||
guint ii, size;
|
||||
|
@ -251,6 +254,9 @@ GST_START_TEST (test_get_live_objects_filtered_detailed)
|
|||
GST_STATE_CHANGE_SUCCESS);
|
||||
gst_object_unref (pipe);
|
||||
|
||||
/* Force all leftover tasks to stop */
|
||||
gst_task_cleanup_all ();
|
||||
|
||||
/* Check the live-objects data returned by the tracer */
|
||||
{
|
||||
guint ii, jj, isize, jsize;
|
||||
|
@ -432,6 +438,9 @@ GST_START_TEST (test_activity_get_checkpoint)
|
|||
GST_STATE_CHANGE_SUCCESS);
|
||||
gst_object_unref (pipe);
|
||||
|
||||
/* Force all leftover tasks to stop */
|
||||
gst_task_cleanup_all ();
|
||||
|
||||
{
|
||||
GstStructure *cpoint;
|
||||
const GstStructure *cs, *rs;
|
||||
|
|
Loading…
Reference in a new issue