Commit 6e27c1ef authored by Jakub Adam's avatar Jakub Adam

tests: Disable UPnP

An application using more than one NiceAgent instance may crash due to
a race in gUPnP.

Fix is to be released in gUPnP 1.1.2 / 1.0.4:

https://gitlab.gnome.org/GNOME/gupnp/commit/0123e574595e0a547ce26422633df72d63d3d0e0
parent 1ff4d53d
......@@ -49,6 +49,7 @@ test_invalid_stream (NiceAddress *addr)
GIOStream *io_stream;
agent = nice_agent_new_reliable (NULL, NICE_COMPATIBILITY_RFC5245);
g_object_set (G_OBJECT (agent), "upnp", FALSE, NULL);
nice_agent_add_local_address (agent, addr);
/* Try building an I/O stream for an invalid stream. All its operations should
......@@ -69,6 +70,7 @@ test_io_stream_properties (NiceAddress *addr)
GOutputStream *output_stream;
agent = nice_agent_new_reliable (NULL, NICE_COMPATIBILITY_RFC5245);
g_object_set (G_OBJECT (agent), "upnp", FALSE, NULL);
nice_agent_add_local_address (agent, addr);
stream_id = nice_agent_add_stream (agent, 1);
......@@ -125,6 +127,7 @@ test_pollable_properties (NiceAddress *addr)
GSource *stream_source;
agent = nice_agent_new_reliable (NULL, NICE_COMPATIBILITY_RFC5245);
g_object_set (G_OBJECT (agent), "upnp", FALSE, NULL);
nice_agent_add_local_address (agent, addr);
/* Add a stream. */
......@@ -295,6 +298,7 @@ test_pollable_cancellation (NiceAddress *addr)
GCancellable *cancellable;
agent = nice_agent_new_reliable (NULL, NICE_COMPATIBILITY_RFC5245);
g_object_set (G_OBJECT (agent), "upnp", FALSE, NULL);
nice_agent_add_local_address (agent, addr);
/* Add a stream. */
......@@ -373,6 +377,7 @@ test_zero_length_reads_writes (NiceAddress *addr)
guint8 buf[1]; /* should never be accessed */
agent = nice_agent_new_reliable (NULL, NICE_COMPATIBILITY_RFC5245);
g_object_set (G_OBJECT (agent), "upnp", FALSE, NULL);
nice_agent_add_local_address (agent, addr);
/* Add a stream. */
......
......@@ -272,6 +272,17 @@ int main (void)
g_object_set (G_OBJECT (lagent), "controlling-mode", TRUE, NULL);
g_object_set (G_OBJECT (ragent), "controlling-mode", FALSE, NULL);
/* An application using more than one NiceAgent instance may crash due to
* a race in gUPnP.
*
* UPnP can be re-enabled here and in other libnice tests once gUPnP
* 1.1.2 / 1.0.4 is released.
*
* See https://gitlab.gnome.org/GNOME/gupnp/commit/0123e574595e0a547ce26422633df72d63d3d0e0
*/
g_object_set (G_OBJECT (lagent), "upnp", FALSE, NULL);
g_object_set (G_OBJECT (ragent), "upnp", FALSE, NULL);
/* step: add one stream, with RTP+RTCP components, to each agent */
ls_id = nice_agent_add_stream (lagent, 1);
......
......@@ -445,6 +445,8 @@ int main (void)
g_object_set (G_OBJECT (lagent), "ice-tcp", FALSE, NULL);
g_object_set (G_OBJECT (ragent), "ice-tcp", FALSE, NULL);
g_object_set (G_OBJECT (lagent), "upnp", FALSE, NULL);
g_object_set (G_OBJECT (ragent), "upnp", FALSE, NULL);
nice_agent_set_software (lagent, "test-drop-invalid, Left Agent");
nice_agent_set_software (ragent, "test-drop-invalid, Right Agent");
......
......@@ -503,7 +503,8 @@ int main (void)
lagent = nice_agent_new (g_main_loop_get_context (global_mainloop), NICE_COMPATIBILITY_RFC5245);
ragent = nice_agent_new (g_main_loop_get_context (global_mainloop), NICE_COMPATIBILITY_RFC5245);
g_object_set (G_OBJECT (lagent), "upnp", FALSE, NULL);
g_object_set (G_OBJECT (ragent), "upnp", FALSE, NULL);
/* step: add a timer to catch state changes triggered by signals */
timer_id = g_timeout_add (30000, timer_cb, NULL);
......
......@@ -227,6 +227,9 @@ GST_START_TEST (buffer_list_test)
sink_agent = nice_agent_new (NULL, NICE_COMPATIBILITY_RFC5245);
src_agent = nice_agent_new (NULL, NICE_COMPATIBILITY_RFC5245);
g_object_set (G_OBJECT (sink_agent), "upnp", FALSE, NULL);
g_object_set (G_OBJECT (src_agent), "upnp", FALSE, NULL);
nice_agent_add_local_address (sink_agent, addr);
nice_agent_add_local_address (src_agent, addr);
......
......@@ -418,6 +418,8 @@ int main (void)
g_object_set (G_OBJECT (lagent), "ice-udp", FALSE, NULL);
g_object_set (G_OBJECT (ragent), "ice-udp", FALSE, NULL);
g_object_set (G_OBJECT (lagent), "upnp", FALSE, NULL);
g_object_set (G_OBJECT (ragent), "upnp", FALSE, NULL);
nice_agent_set_software (lagent, "Test-icetcp, Left Agent");
nice_agent_set_software (ragent, "Test-icetcp, Right Agent");
......
......@@ -430,6 +430,8 @@ int main (void)
g_object_set (G_OBJECT (lagent), "ice-tcp", FALSE, NULL);
g_object_set (G_OBJECT (ragent), "ice-tcp", FALSE, NULL);
g_object_set (G_OBJECT (lagent), "upnp", FALSE, NULL);
g_object_set (G_OBJECT (ragent), "upnp", FALSE, NULL);
/* step: add a timer to catch state changes triggered by signals */
timer_id = g_timeout_add (30000, timer_cb, NULL);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment