gstreamer/tests/check
Mathieu Duponchelle 25d7914395 tests: fix pipelines_parse_launch.delayed_link flakiness
Fixes #345

There were two causes for the flakiness, one much rarer than
the other.

The test sets up a source with a sometimes pad added during
the transition of a wrapper bin from READY to PAUSED.

It runs 4 iterations, the last of which makes it so the
negotiation fails.

In that case, the intention as correctly presented by the following
comment:

/* [..] ie, the pipeline should create ok but fail to change state */

However the implementation of run_delayed_test was neither calling
get_state on the pipeline (it called it on the wrapper bin), nor
checking that the return of get_state was FAILURE (it actually
checked that it was not).

This led to an obvious race condition, and was fixed by calling
get_state on the pipeline, then checking that in this specific
case (expect_link == FALSE), the state change has actually failed.

The second, rarer race condition is at set_state time. When we
don't expect the link to succeed, the return of set_state may
either be FAILURE or ASYNC, depending on timing. This was fixed
by taking expect_link into account when checking the return value
of set_state.

Co-authored by: Thibault Saunier <tsaunier@igalia.com>
2019-12-14 11:25:20 +00:00
..
elements Remove deprecated GTimeVal 2019-12-10 19:18:32 -05:00
generic Remove autotools build system 2019-10-13 16:10:42 +01:00
gst datetime: Add constructor for timestamps in microseconds 2019-11-25 13:31:11 +01:00
libs harness: fixed race condition on forward pad while forwarding sticky events to sink harness 2019-11-13 20:33:51 +00:00
pipelines tests: fix pipelines_parse_launch.delayed_link flakiness 2019-12-14 11:25:20 +00:00
tools tests: refactor tools check a little 2014-10-31 16:10:01 +00:00
gstreamer.supp tests: Add test for new live-objects leaktracer API 2019-07-02 15:13:26 +05:30
meson.build tests: Add test for new live-objects leaktracer API 2019-07-02 15:13:26 +05:30