GNOME Bugzilla – Bug 781632
test: dashdemux: Use real dash segments for unit test
Last modified: 2018-11-03 14:07:42 UTC
Until now, dashdemux has been improved with several features such as header parsing for efficient trick-play and etc. But unit test uses fake isobmff segments for unit test, and it causes test failure due to segment parsing error by dashdemux.
Created attachment 350260 [details] [review] test: dashdemux: Use real dash segments for unit test Currently lots of TC are failed, and with this patch, all of TCs are passed except for "testSeekSnapAfterSamePosition". It might be a bug in dashdemux.
Thanks but it would seem more useful to extend gst-validate with more (real) streams and add more checks of correctness. This will then also check the whole dashdemux/qtdemux/souphttpsrc combination, which is quite tightly integrated anyway.
(In reply to Sebastian Dröge (slomo) from comment #2) > Thanks but it would seem more useful to extend gst-validate with more (real) > streams and add more checks of correctness. This will then also check the > whole dashdemux/qtdemux/souphttpsrc combination, which is quite tightly > integrated anyway. Thanks for your comment. I thought both this unit-test and gst-validate are useful. Actually, I'd like to simulate preroll related bug (bug #778763) using unit-test and adding the preroll related TC into gst-validate seems to too much specific for me. So, this is a kind of pre-work for bug #778763 Umm... I'll try to add preroll related TC into gst-validate, anyway :)
I agree that both the unit tests and the integration tests are useful, and that they are used to test different things. There are cases where it would be difficult to control the server responses in quite the right way to trigger a particular code path in dashdemux. For example testing the clock drift logic (although alas those tests haven't been merged).
Created attachment 357906 [details] [review] adaptive_demux: tests: fix usage of test lock Fixing locking problems in the test framework was required before the seek tests could be fixed.
Created attachment 357908 [details] [review] tests: adaptivedemux: check entire received expected_data Another bug that needed fixing before the seek tests could be fixed.
Created attachment 357909 [details] [review] test: dashdemux: Use real dash segments for unit tests This patch replaces https://bugzilla.gnome.org/attachment.cgi?id=350260 When applied, all the dash_demux tests pass
Created attachment 357910 [details] [review] tests: hlsdemux: Fix generation of expected data Fixing the check of received data uncovered a rather nasty buffer overrun bug in the hlsdemux tests.
Created attachment 358074 [details] [review] test: dashdemux: Use real dash segments for unit tests Re-factored so that mssdemux tests can make use of the same MP4 fragments.
Created attachment 358075 [details] [review] tests: hlsdemux: Fix generation of expected data Updated to reflect refactoring changes in "test: dashdemux: Use real dash segments for unit tests" patch
Created attachment 358076 [details] [review] test: mssdemux: Use real isobmff segments for unit tests Fixing the bug in gst_adaptive_demux_test_check_received_data() caused the mssdemux tests to fail. As SmoothStreaming is also based upon ISOBMFF files, these tests can use the same GstAdaptiveDemuxTestMedia code that is used in dash_demux tests.
*** Bug 774844 has been marked as a duplicate of this bug. ***
Created attachment 358762 [details] [review] tests: dashdemux: Use real dash segments for unit tests Modified the generation of input & output data so that each media segment has a unique finger print. This allows checking that it is downloading the segment that the test is expecting, rather than another media segment.
Created attachment 358764 [details] [review] tests: mssdemux: Use real isobmff segments for unit tests The change in the "tests: dashdemux: Use real dash segments for unit tests" patch that made each segment unique exposed two bugs in the mssdemux seek tests.
elements/adaptive_demux_media.c:890:21: error: ‘video_sidx’ defined but not used [-Werror=unused-const-variable=] static const guint8 video_sidx[] = { ^~~~~~~~~~ elements/adaptive_demux_media.c:115:21: error: ‘audio_sidx’ defined but not used [-Werror=unused-const-variable=] static const guint8 audio_sidx[] = { ^~~~~~~~~~ cc1: all warnings being treated as errors
I'm surprised I didn't get that compilation error, as I am running in gst-uninstalled maintainer mode. Anyway, at the moment the SIDX indexes are not used by any tests. I can either: a) Add them to the map_filename_to_segment() function so that a future test could use them b) Delete the SIDX arrays Option (a) has the advantage of keeping the SIDX data with the media it indexes, however has the disadvantage of unused code that gets maintained when it is not needed.
Or mark them with G_GNUC_UNUSED to suppress the warning if you think they may be useful in future.
Created attachment 358841 [details] [review] tests: dashdemux: Use real dash segments for unit tests Fixed "unused variable" compile error for audio_sidx and video_sidx. Added #defines for the filenames used for init, sidx and media files, to keep it DRY.
Created attachment 362631 [details] [review] adaptive_demux: tests: fix usage of test lock updated to current master
Created attachment 362632 [details] [review] tests: adaptivedemux: check entire received expected_data updated to master added link to bugzilla ticket
Created attachment 362633 [details] [review] tests: dashdemux: Use real isobmff segments for unit tests Change gst_adaptive_demux_test_case_test_media_info() to use an enum for media type. Fixed bug in gst_adaptive_demux_test_case_test_media_info() that was causing it to return wrong segment sizes. Fixed bug in testMediaDownloadErrorMiddleFragment test that made it unreliable.
Created attachment 362634 [details] [review] tests: hlsdemux: Fix generation of expected data rebased to master
Created attachment 362635 [details] [review] tests: mssdemux: Use real isobmff segments for unit tests Rebased to master. Fixed bug in testFragmentDownloadError test that made it unreliable.
-- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/548.