gstreamer/tests/check/pipelines
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
..
cleanup.c Fix FSF address 2012-11-03 20:44:48 +00:00
parse-disabled.c Fix FSF address 2012-11-03 20:44:48 +00:00
parse-launch.c tests: fix pipelines_parse_launch.delayed_link flakiness 2019-12-14 11:25:20 +00:00
queue-error.c Fix double semicolons 2015-03-10 09:24:28 +00:00
seek.c tests: fix message leak in seek test 2017-04-19 13:39:46 +01:00
simple-launch-lines.c typefind: fix caps leak when used in connection with uridecodebin and playbin 2013-04-27 00:05:45 +01:00
stress.c tests: use g_timeout_add_seconds in pipeline stress test 2013-01-27 14:52:39 +00:00