After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 786799 - fix udpsrc unit test
fix udpsrc unit test
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
git master
Other Linux
: Normal normal
: 1.13.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2017-08-25 12:31 UTC by George Kiagiadakis
Modified: 2017-12-09 16:13 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
tests/check/udpsrc: fix test_udpsrc to actually run (975 bytes, patch)
2017-08-25 12:31 UTC, George Kiagiadakis
committed Details | Review
tests/check/udpsrc: unlock check_mutex after use (670 bytes, patch)
2017-08-25 12:31 UTC, George Kiagiadakis
committed Details | Review
tests/check/udpsrc: ensure test won't timeout if the buffers are already received (1.98 KB, patch)
2017-08-25 12:31 UTC, George Kiagiadakis
committed Details | Review
tests/check/udpsrc: verify the correct amount of bytes is sent to the socket (2.23 KB, patch)
2017-08-25 12:33 UTC, George Kiagiadakis
committed Details | Review

Description George Kiagiadakis 2017-08-25 12:31:06 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.
Comment 1 George Kiagiadakis 2017-08-25 12:31:27 UTC
Created attachment 358396 [details] [review]
tests/check/udpsrc: unlock check_mutex after use
Comment 2 George Kiagiadakis 2017-08-25 12:31:41 UTC
Created attachment 358397 [details] [review]
tests/check/udpsrc: ensure test won't timeout if the buffers are already received
Comment 3 George Kiagiadakis 2017-08-25 12:33:11 UTC
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
Comment 4 Tim-Philipp Müller 2017-12-09 16:12:11 UTC
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 5 Tim-Philipp Müller 2017-12-09 16:12:53 UTC
Comment on attachment 358396 [details] [review]
tests/check/udpsrc: unlock check_mutex after use

(squashed)