GNOME Bugzilla – Bug 774409
tests/jitterbuffer: Major refactoring and cleanups
Last modified: 2016-12-14 13:03:24 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.
Created attachment 339810 [details] [review] updated patch Updated patch without latency-changed stuff...
Created attachment 339997 [details] [review] updated patch Plug a test-leak. (valgrind)
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.
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 on attachment 341863 [details] [review] updated patch with (yet another) test-fix Does not apply to latest GIT master
Created attachment 341954 [details] [review] Rebased Patch Updated patch rebased against latest master.
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