summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* meson: do not build gst test in static modeStéphane Cerveau2023-03-291-1/+5
| | | | | | In the case of gstreamer test, the symbol gst_init_static_plugins needed by gstreamer will be available at the end of the build with gstreamer-full library.
* test-consent: Don't try to set the consent prop after creationOlivier Crête2023-01-061-4/+2
| | | | It was already set at creation time, so all we got was a warning.
* test-turn: Make it work against coturnOlivier Crête2023-01-041-6/+5
|
* ci: Expose full code coverage report to GitLabOlivier Crête2022-10-172-1/+1
|
* ci: Use fdo templatesOlivier Crête2022-10-172-8/+14
|
* Don't try to use link-local addresses outside local networkJohan Sternerup2022-04-061-0/+34
| | | | | | | | | | If we have gathered a host IP-address that is link-local we should never try to use it for anything else than trying to match it with another link-local address. Some routers seem to have problems with traffic from link-local addresses destined at external IP-addresses. By definition link-local addresses should stay local so there's no reason to access STUN/TURN from it or try to form a candidate with another address that is not link-local.
* agent: Clear the original message pointer instead of a copyOlivier Crête2021-11-261-1/+1
| | | | | In one case, the message pointer gets replaced by the rfc4571_message one, so it wasn't getting cleared as expected.
* test-io-stream-common: Avoid CPU starvation by yieldingOle André Vadla Ravnås2021-11-221-0/+2
| | | | | | | Busy-looping is not a good idea, especially not when run under Valgrind, where such a thread may result in well-behaved threads running thousands of times slower. While passing --fair-sched=yes to Valgrind avoids the issue, it's still better to make our busy-looping less aggressive.
* test-io-stream-thread: Handle partial I/OOle André Vadla Ravnås2021-11-221-4/+4
|
* test-io-stream-closing-write: Handle partial I/OOle André Vadla Ravnås2021-11-221-11/+12
|
* test-io-stream-closing-read: Handle partial I/OOle André Vadla Ravnås2021-11-221-12/+11
|
* test-io-stream-common: Remove incorrect assertionOle André Vadla Ravnås2021-11-221-4/+0
| | | | | We cannot assume that the message will be completely filled even in reliable mode.
* test-io-stream-common: Fix GSource callback signatureOle André Vadla Ravnås2021-11-221-1/+11
| | | | | Cannot pass g_main_loop_quit as the GSourceFunc as its return type is void.
* test-io-stream-common: Remove dead codeOle André Vadla Ravnås2021-11-221-6/+0
| | | | | Due to off-by-one errors. Since the code added above now handles what this code tried to handle, we can go ahead and remove it.
* agent: Add support for bytestream TCPOle André Vadla Ravnås2021-11-2210-15/+195
|
* conncheck: don't ignore local socket errorsFabrice Bellet2021-11-221-1/+1
| | | | | | | | | | | | | | | | | With this patch we ensure that local socket errors during connection establishment are properly transmitted to the connection check layer, so the related pair can be put in state failed when needed. The local socket errors we are interested in, are those occuring when the local source address cannot be bound anymore, because the underlying interface vanished for example. In particular, we don't ignore errors coming from g_socket_bind() with tcp active sockets, that perform a bind to *whatever* local address is available, in case it cannot bind to the specified address. This behaviour was demonstrated with the test-tcp example, that tried to bind to the IPv4 loopback address on a socket initially created for the IPv6 loopback.
* tests: Use g_assert_true() instead of g_assert() everywhereOlivier Crête2021-11-0127-350/+350
|
* test-restart: fix potential stack buffer overflow with new candidate APIFabrice Bellet2021-05-131-19/+19
|
* test-consent: fix potential stack buffer overflow with new candidate APIFabrice Bellet2021-05-131-19/+19
|
* test-io-stream-pollable: Handle partial readsOle André Vadla Ravnås2021-05-111-7/+12
|
* agent: don't change agent role when restarting iceFabrice Bellet2021-03-051-8/+0
| | | | | Ice restart must not change the role of the agents since RFC8445, section 9, "ICE Restarts".
* test-fallback: fix stack buffer overflow with new candidate APIFabrice Bellet2020-12-141-31/+31
|
* agent: implement support for RFC7675 - Consent FreshnessMatthew Waters2020-12-102-1/+522
| | | | | | | | | | | | | | | Specified in https://tools.ietf.org/html/rfc7675 RFC 7675 is a slight modification of the existing keepalive connection checks that could be enabled manually or were used with the GOOGLE compatibility mode. Slight differences from the existing keepalive connection checks include: - an additional consent expiry timer instead of relying on all binding requests to succeed. - 403: 'Forbidden' stun error-code which revokes consent with immediate effect.
* agent: report duplicated port in udp bsd sockets tooFabrice Bellet2020-12-073-11/+30
| | | | | | | | | | | | | | | | | | This patch fixes cases, where the range is full, some ports fail with HOST_CANDIDATE_CANT_CREATE_SOCKET, other fail with HOST_CANDIDATE_DUPLICATE_PORT, the value of res we keep when leaving the loop is randomly the one of the last iteration of the loop. CANT_CREATE_SOCKET still happens when trying to create an udp bsd socket with the same address and port than one of another component, so it is also a case of duplicate port in fact. To be homogeneous, we add a gerror for nice_udp_bsd_socket_new(), like we did in nice_tcp_passive_socket_new(), and we can catch the same G_IO_ERROR_ADDRESS_IN_USE there too, when failing to get free available udp ports. This patch is a complement to merge request !158
* candidate: Hide the internal implementation from APIOlivier Crête2020-08-201-1/+2
| | | | This is slightly an API break, but it should never have been public.
* agent: Actually fail gathering on UDP port unavailabilityOlivier Crête2020-08-182-4/+16
| | | | | | | This will make it fail if either our test of UDP port clash fails or if the kernel rejects the new socket because there is a port clash. Also include a unit test for this.
* tests: Fix warning when building with newer GLib versionOlivier Crête2020-07-221-2/+5
|
* agent: Accept duplicated ports if no other optionOlivier Crête2020-07-212-0/+65
| | | | | | | | Commit a04fa4d492 introduced a new feature to try to have a different port for every local candidate, even if they are on different interfaces. This breaks setups where the application really wants a specific port and sets a range of exactly 1 port or a very small range. In that case, if we can't find non-duplicated ports, then we just go around again and skip that check, but only if both ports are in the same stream and component. Otherwise, we fail the whole component!
* Remove autotools buildTim-Philipp Müller2020-05-225-222/+4
| | | | | | Remove dist check on the CI, since it doesn't really add anything in the Meson case (tarball is based on files checked into git and srcdir != builddir).
* Makefile.am: Add dist meson friendly testOlivier Crête2020-05-221-1/+2
|
* test-new-trickle: No need to be connected to receive dataOlivier Crête2020-05-221-1/+1
|
* valgrind supp: Add updated gllibc suppressionsOlivier Crête2020-05-181-6/+16
|
* address: Make the private IP address detector more completeOlivier Crête2020-05-061-1/+63
| | | | | | Also adds a unit test Fixes #67
* Use g_assert_cmp.int() to get better debug logs on crashOlivier Crête2020-05-0524-227/+227
|
* tests: Replace g_assert (memcmp) with g_assert_cmpmem()Olivier Crête2020-05-058-12/+12
| | | | This makes for clearer reports in the CI
* test-thread: Use GCond to make sure there is no raceOlivier Crête2020-05-051-36/+32
|
* test-gstreamer: Use g_debug instead of gst debugOlivier Crête2020-05-051-9/+9
| | | | This matches the rest of the tests.
* test-gstreamer: Use GCond to avoid race conditionOlivier Crête2020-05-051-16/+23
| | | | | This race condition is hit all the time when running the test under valgrind.
* agent: fix boundary test of max turn servers and local addressesFabrice Bellet2020-05-041-1/+1
| | | | | We can accept up to 8 turn servers, with turn preference value starting at zero. Also fix the error message.
* discovery: add a unique local preference value per turn serverFabrice Bellet2020-05-041-0/+4
| | | | | | | | | | This value is built from the position in the component turn servers list, and from the base address network interface position in the list of network interfaces. This value is used to ensure a unique candidate priority for each one. Also ensure that the fields that compose the local preference don't overlap, by checking their maximum value. See RFC-8445, section 5.1.2.2 "Guidelines for Choosing Type and Local Preferences".
* tests: add a unit test for private addresses rangesFabrice Bellet2020-03-023-1/+112
| | | | This is a unix-only test
* tests: fix local preference based on interface rank in listFabrice Bellet2020-03-021-2/+13
| | | | | | The local preference of UDP candidates is (now) determined by the position of the IP address in the list returned by nice_interfaces_get_local_ips().
* test-thread: Increase timeoutOlivier Crête2020-02-061-1/+1
|
* test-io-stream-common: Remove io_stream pointer when removing streamOlivier Crête2020-02-061-0/+1
|
* test-send-recv: Change timeout to 150sOlivier Crête2020-02-061-1/+1
|
* tests: Make iostream test termination more reliableOlivier Crête2020-02-062-18/+15
|
* test-io-common: Abort on errorOlivier Crête2020-02-061-0/+1
|
* test-send-recv: Write in a loop until blockedOlivier Crête2020-02-061-20/+22
| | | | | We're not sure that our callback will be called again if we haven't filled the pipe.
* meson: fix build with Meson 0.49.2Tim-Philipp Müller2019-09-171-3/+1
| | | | The parser didn't seem to handle line continuations properly back then.
* tests: Don't use GSubprocessLauncherOlivier Crete2019-08-051-10/+5
| | | | It crashes on Windows