GNOME Bugzilla – Bug 786799
fix udpsrc unit test
Last modified: 2017-12-09 16:13:00 UTC
Created attachment 358395 [details] [review] tests/check/udpsrc: fix test_udpsrc to actually run The udpsrc unit test is a bit broken. The most important issue is that test_udpsrc is entirely skipped due to a typo. See the attached patches.
Created attachment 358396 [details] [review] tests/check/udpsrc: unlock check_mutex after use
Created attachment 358397 [details] [review] tests/check/udpsrc: ensure test won't timeout if the buffers are already received
Created attachment 358398 [details] [review] tests/check/udpsrc: verify the correct amount of bytes is sent to the socket This one is to avoid the typo bug we had in the first place, while still ignoring socket errors in case there is something wrong with the platform
Hilarious :) commit 33bddfe321d6c781e69bf4e29a71ddf381c6ada7 Author: George Kiagiadakis <george.kiagiadakis@collabora.com> Date: Fri Aug 25 15:19:37 2017 +0300 tests: udpsrc: verify the correct amount of bytes is sent to the socket https://bugzilla.gnome.org/show_bug.cgi?id=786799 commit ea7d2a0257ff344b3e2a53738890efc5efaebef2 Author: George Kiagiadakis <george.kiagiadakis@collabora.com> Date: Fri Aug 25 14:59:06 2017 +0300 tests: udpsrc: ensure test won't timeout if the buffers are already received Sometimes all the buffers are received before the time we lock the check_mutex, in which case g_cond_wait will wait forever for another one. Just check if this is the case before waiting. https://bugzilla.gnome.org/attachment.cgi?id=358397 commit 45c82ee79823dc7ee3db691ac23cf325c0091756 Author: George Kiagiadakis <george.kiagiadakis@collabora.com> Date: Fri Aug 25 14:45:52 2017 +0300 tests: udpsrc: fix test_udpsrc to actually run and fix locking Previously this would silently be skipped because 1600 != 1400 and there is no assertion on this call. Also unlock check_mutex after use. https://bugzilla.gnome.org/show_bug.cgi?id=786799
Comment on attachment 358396 [details] [review] tests/check/udpsrc: unlock check_mutex after use (squashed)