mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-25 19:21:06 +00:00
Added testcase for failing bin iterate function due to glib thread-unsafeness.
Original commit message from CVS: Added testcase for failing bin iterate function due to glib thread-unsafeness.
This commit is contained in:
parent
8d61d9045d
commit
522f5f7231
4 changed files with 68 additions and 2 deletions
33
tests/old/testsuite/threads/159852.c
Normal file
33
tests/old/testsuite/threads/159852.c
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
#include <unistd.h>
|
||||||
|
#include <gst/gst.h>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
static gpointer
|
||||||
|
iterate_bin (GstBin * bin)
|
||||||
|
{
|
||||||
|
while (TRUE) {
|
||||||
|
gst_bin_iterate (bin);
|
||||||
|
}
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
main (int argc, char **argv)
|
||||||
|
{
|
||||||
|
gint i;
|
||||||
|
GstElement *bin;
|
||||||
|
|
||||||
|
gst_init (&argc, &argv);
|
||||||
|
|
||||||
|
for (i = 0; i < 100; i++) {
|
||||||
|
bin = gst_element_factory_make ("bin", "bin");
|
||||||
|
gst_scheduler_factory_make (NULL, GST_ELEMENT (bin));
|
||||||
|
|
||||||
|
g_thread_create ((GThreadFunc) iterate_bin, bin, TRUE, NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
sleep (20000);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
|
@ -1,7 +1,7 @@
|
||||||
include ../Rules
|
include ../Rules
|
||||||
|
|
||||||
tests_pass = thread1 thread2 thread3 thread4 thread5 threade threadf signal1
|
tests_pass = thread1 thread2 thread3 thread4 thread5 threade threadf signal1
|
||||||
tests_fail = 159566 signal2 signal3
|
tests_fail = 159566 signal2 signal3 159852
|
||||||
|
|
||||||
# threadh
|
# threadh
|
||||||
|
|
||||||
|
|
33
testsuite/threads/159852.c
Normal file
33
testsuite/threads/159852.c
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
#include <unistd.h>
|
||||||
|
#include <gst/gst.h>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
static gpointer
|
||||||
|
iterate_bin (GstBin * bin)
|
||||||
|
{
|
||||||
|
while (TRUE) {
|
||||||
|
gst_bin_iterate (bin);
|
||||||
|
}
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
main (int argc, char **argv)
|
||||||
|
{
|
||||||
|
gint i;
|
||||||
|
GstElement *bin;
|
||||||
|
|
||||||
|
gst_init (&argc, &argv);
|
||||||
|
|
||||||
|
for (i = 0; i < 100; i++) {
|
||||||
|
bin = gst_element_factory_make ("bin", "bin");
|
||||||
|
gst_scheduler_factory_make (NULL, GST_ELEMENT (bin));
|
||||||
|
|
||||||
|
g_thread_create ((GThreadFunc) iterate_bin, bin, TRUE, NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
sleep (20000);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
|
@ -1,7 +1,7 @@
|
||||||
include ../Rules
|
include ../Rules
|
||||||
|
|
||||||
tests_pass = thread1 thread2 thread3 thread4 thread5 threade threadf signal1
|
tests_pass = thread1 thread2 thread3 thread4 thread5 threade threadf signal1
|
||||||
tests_fail = 159566 signal2 signal3
|
tests_fail = 159566 signal2 signal3 159852
|
||||||
|
|
||||||
# threadh
|
# threadh
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue