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 774409 - tests/jitterbuffer: Major refactoring and cleanups
tests/jitterbuffer: Major refactoring and cleanups
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
git master
Other All
: Normal minor
: 1.11.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2016-11-14 14:37 UTC by Håvard Graff (hgr)
Modified: 2016-12-14 13:03 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
refactorings (105.93 KB, patch)
2016-11-14 14:37 UTC, Håvard Graff (hgr)
none Details | Review
updated patch (104.84 KB, patch)
2016-11-14 14:54 UTC, Håvard Graff (hgr)
none Details | Review
updated patch (104.87 KB, patch)
2016-11-16 08:22 UTC, Håvard Graff (hgr)
none Details | Review
Updated patch (again) (104.83 KB, patch)
2016-12-08 12:50 UTC, Håvard Graff (hgr)
none Details | Review
updated patch with (yet another) test-fix (104.87 KB, patch)
2016-12-13 09:58 UTC, Håvard Graff (hgr)
none Details | Review
Rebased Patch (109.21 KB, patch)
2016-12-14 12:26 UTC, Håvard Graff (hgr)
committed Details | Review

Description Håvard Graff (hgr) 2016-11-14 14:37:31 UTC
Created attachment 339806 [details] [review]
refactorings

* Changed PCMU->TEST for common macros
* Changed verify-functions (lost & rtx) into macros.
* Remove option to add marker-bit for test-buffers (not used anywhere)
* Add new push_test_buffer function that makes sure there are correlation
  between dts and the time on the clock. (classic test-mistake)
* Established a generic starting-point for tests with the
  construct_deterministic_initial_state function and use it where
  applicable, which removes lots of "boilerplate" everywhere.
* Add basic lost-event test
* Remove as much "magic constants" as possible.
* Remove 3 tests that no longer are testing anything that others don't,
  and was completely unmaintainable.
* Remove unnecessary use of the testclock
* Verify each test is testing what it actually says it does (and modify
  where it doesn't)

In general, make the tests much smaller, better, more maintainable and
readable.
Comment 1 Håvard Graff (hgr) 2016-11-14 14:54:41 UTC
Created attachment 339810 [details] [review]
updated patch

Updated patch without latency-changed stuff...
Comment 2 Håvard Graff (hgr) 2016-11-16 08:22:21 UTC
Created attachment 339997 [details] [review]
updated patch

Plug a test-leak. (valgrind)
Comment 3 Håvard Graff (hgr) 2016-12-08 12:50:46 UTC
Created attachment 341607 [details] [review]
Updated patch (again)

Our CI flushed out a race-conditions with when the events were being pulled out
in the deterministic setup, which is fixed now.
Comment 4 Håvard Graff (hgr) 2016-12-13 09:58:12 UTC
Created attachment 341863 [details] [review]
updated patch with (yet another) test-fix

We found one more race-condition in an existing test, so adding a fix for that to the pile :)
Comment 5 Sebastian Dröge (slomo) 2016-12-13 10:04:47 UTC
Comment on attachment 341863 [details] [review]
updated patch with (yet another) test-fix

Does not apply to latest GIT master
Comment 6 Håvard Graff (hgr) 2016-12-14 12:26:57 UTC
Created attachment 341954 [details] [review]
Rebased Patch

Updated patch rebased against latest master.
Comment 7 Sebastian Dröge (slomo) 2016-12-14 13:01:02 UTC
commit 0a81f71df5aa15627eb9f1756c92eabe5d3aa38c
Author: Havard Graff <havard.graff@gmail.com>
Date:   Wed Dec 14 10:39:12 2016 +0100

    tests/jitterbuffer: Major refactoring and cleanups
    
    * Changed PCMU->TEST for common macros
    * Changed verify-functions (lost & rtx) into macros.
    * Remove option to add marker-bit for test-buffers (not used anywhere)
    * Add new push_test_buffer function that makes sure there are correlation
      between dts and the time on the clock. (classic test-mistake)
    * Established a generic starting-point for tests with the
      construct_deterministic_initial_state function and use it where
      applicable, which removes lots of "boilerplate" everywhere.
    * Add basic lost-event test
    * Remove as much "magic constants" as possible.
    * Remove 3 tests that no longer are testing anything that others don't,
      and was completely unmaintainable.
    * Remove unnecessary use of the testclock
    * Verify each test is testing what it actually says it does (and modify
      where it doesn't)
    
    In general, make the tests much smaller, better, more maintainable and
    readable.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=774409