gstreamer/subprojects/gst-editing-services/tests/check
Alicia Boya García bcf95cc087 tests: nle: Call ges_init() only inside test cases
Some NLE tests were calling ges_init() from the test suite
initialization function. This was causing them to deadlock when running
with glib 2.76.3.

ges_init() causes a GThreadPool to be initialized. Even if GES at this
point doesn't request any thread to be created, since glib 2.63.4+
(see 8aeca4fa64)
the first time a GThreadPool is initialized a "pool-spawner" thread is
created, which is later used by g_thread_pool_push().

The default behavior of the GStreamer check tests is to fork for every
test case. This is not safe if any thread has been created at this
point. In this particular case, GThreadPool preserves the state that
says a "pool-spawner" thread has been created, and will have access to
its mutex and condition variable, but their queues will have different
contents as the memory has been forked. In consequence, calls to
g_thread_pool_push() will deadlock.

The deadlock will not occur if running the tests with CK_FORK=no.

This patch modifies the affected tests to only call ges_init() from
inside the test cases, fixing the deadlock.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4915>
2023-06-22 18:04:24 +00:00
..
assets Move files from gst-editing-services into the "subprojects/gst-editing-services/" subdir 2021-09-24 16:15:30 -03:00
ges ges: tests: Use assert_equals_int where it makes sense 2023-05-30 22:37:32 +00:00
nle tests: nle: Call ges_init() only inside test cases 2023-06-22 18:04:24 +00:00
python ges: Add test for the newly added DiscovererManager object 2023-04-29 06:54:10 -04:00
scenarios scenarios: Update for videoaggregator rounding behavior change 2022-02-19 06:53:02 +00:00
meson.build build: Fix building ges with tools disabled 2022-10-25 08:53:19 +00:00
nose2-junit-xml.cfg.in Move files from gst-editing-services into the "subprojects/gst-editing-services/" subdir 2021-09-24 16:15:30 -03:00