GNOME Bugzilla – Bug 757354
adaptivedemux: tests: add download error test
Last modified: 2015-10-30 12:52:51 UTC
Create a test to simulate download errors.
Created attachment 314457 [details] [review] unit test for download errors this test discovered 4 bugs that needs to be merged before merging this test: https://bugzilla.gnome.org/show_bug.cgi?id=756237 https://bugzilla.gnome.org/show_bug.cgi?id=756209 https://bugzilla.gnome.org/show_bug.cgi?id=756239 https://bugzilla.gnome.org/show_bug.cgi?id=756240
With these prerequisites in, the dash_demux unit test isn't passing on this patch. Possibly due some other patch being put in yesterday. elements/dash_demux.c:511:F:basicTest:testDownloadError:0: 'stateChange' (0) is not equal to 'GST_STATE_CHANGE_SUCCESS' (1) That's on the state change back down to NULL.
it's not due to the new patches. It happened to me before. It does happen from time to time (1 in a few runs). It is a race condition somewhere and I didn't track it down yet.
That's odd. I get 100% failure here. Here's the output (two runs with increasing GST_DEBUG), in case the few errors here don't match what you were seeing: Running suite(s): dash_demux 0:00:01.113179350 31723 0x2b75b8002a30 ERROR adaptivedemux gstadaptivedemux.c:2799:gst_adaptive_demux_stream_download_loop:<dashdemux:audio_00> Download error: Couldn't download fragments, too many failures 0:00:01.113464594 31723 0x2b75b8002a30 ERROR adaptivedemux gstadaptivedemux.c:2799:gst_adaptive_demux_stream_download_loop:<dashdemux:audio_00> Download error: Couldn't download fragments, too many failures 80%: Checks: 5, Failures: 1, Errors: 0 elements/dash_demux.c:511:F:basicTest:testDownloadError:0: 'stateChange' (0) is not equal to 'GST_STATE_CHANGE_SUCCESS' (1) Running suite(s): dash_demux 0:00:00.102264272 31741 0xb54450 WARN basesrc gstbasesrc.c:2391:gst_base_src_update_length:<fakesouphttpsrc0> processing at or past EOS 0:00:00.164829780 31741 0x2addfc005000 WARN basesrc gstbasesrc.c:2391:gst_base_src_update_length:<fakesouphttpsrc1> processing at or past EOS 0:00:00.196608235 31741 0x2ade08003540 WARN basesrc gstbasesrc.c:2391:gst_base_src_update_length:<fakesouphttpsrc2> processing at or past EOS 0:00:00.230136371 31748 0xb54450 WARN basesrc gstbasesrc.c:2391:gst_base_src_update_length:<fakesouphttpsrc0> processing at or past EOS 0:00:00.325967233 31748 0x2addfc005000 WARN basesrc gstbasesrc.c:2391:gst_base_src_update_length:<fakesouphttpsrc1> processing at or past EOS 0:00:00.346952769 31748 0x2ade08002d40 WARN basesrc gstbasesrc.c:2391:gst_base_src_update_length:<fakesouphttpsrc2> processing at or past EOS 0:00:00.437748584 31748 0xb54990 WARN basesrc gstbasesrc.c:2391:gst_base_src_update_length:<fakesouphttpsrc4> processing at or past EOS 0:00:00.440227286 31748 0xb54990 WARN basesrc gstbasesrc.c:2391:gst_base_src_update_length:<fakesouphttpsrc3> processing at or past EOS 0:00:00.486240598 31755 0xb55450 WARN basesrc gstbasesrc.c:2391:gst_base_src_update_length:<fakesouphttpsrc0> processing at or past EOS 0:00:00.509573622 31755 0x2addf8005000 WARN basesrc gstbasesrc.c:2391:gst_base_src_update_length:<fakesouphttpsrc1> processing at or past EOS 0:00:00.532860603 31760 0xb55450 WARN basesrc gstbasesrc.c:2391:gst_base_src_update_length:<fakesouphttpsrc0> processing at or past EOS 0:00:00.606584612 31760 0x2addf8005000 WARN basesrc gstbasesrc.c:2391:gst_base_src_update_length:<fakesouphttpsrc1> processing at or past EOS 0:00:00.639619129 31766 0xb55450 WARN basesrc gstbasesrc.c:2391:gst_base_src_update_length:<fakesouphttpsrc0> processing at or past EOS 0:00:00.642026028 31766 0x2addf4002a30 WARN check elements/fake_http_src.c:186:gst_fake_soup_http_src_start: gst_fake_soup_http_src_start cannot find url 'http://unit.test/audio_file_not_available.webm' in input data 0:00:00.642108982 31766 0x2addf4002a30 WARN basesrc gstbasesrc.c:3717:gst_base_src_activate_push:<fakesouphttpsrc1> Failed to start in push mode 0:00:00.642135725 31766 0x2addf4002a30 WARN GST_PADS gstpad.c:1099:gst_pad_set_active:<fakesouphttpsrc1:src> Failed to activate pad 0:00:00.642174751 31766 0x2addf4002a30 WARN adaptivedemux gstadaptivedemux.c:2265:gst_adaptive_demux_stream_download_uri:<dashdemux> Could not sync state for src element 0:00:00.642206351 31766 0x2addf4002a30 WARN adaptivedemux gstadaptivedemux.c:2701:gst_adaptive_demux_stream_download_loop:<dashdemux> Error while downloading fragment 0:00:00.643128222 31766 0x2addf8003ca0 WARN basesrc gstbasesrc.c:2391:gst_base_src_update_length:<fakesouphttpsrc2> processing at or past EOS 0:00:00.643824551 31766 0x2addf4002a30 WARN check elements/fake_http_src.c:186:gst_fake_soup_http_src_start: gst_fake_soup_http_src_start cannot find url 'http://unit.test/audio_file_not_available.webm' in input data 0:00:00.643930578 31766 0x2addf4002a30 WARN basesrc gstbasesrc.c:3717:gst_base_src_activate_push:<fakesouphttpsrc1> Failed to start in push mode 0:00:00.644001352 31766 0x2addf4002a30 WARN GST_PADS gstpad.c:1099:gst_pad_set_active:<fakesouphttpsrc1:src> Failed to activate pad 0:00:00.644050967 31766 0x2addf4002a30 WARN adaptivedemux gstadaptivedemux.c:2265:gst_adaptive_demux_stream_download_uri:<dashdemux> Could not sync state for src element 0:00:00.644087139 31766 0x2addf4002a30 WARN adaptivedemux gstadaptivedemux.c:2701:gst_adaptive_demux_stream_download_loop:<dashdemux> Error while downloading fragment 0:00:00.894456888 31766 0x2addf8003ca0 WARN basesrc gstbasesrc.c:2391:gst_base_src_update_length:<fakesouphttpsrc2> processing at or past EOS 0:00:00.895262586 31766 0x2addf4002a30 WARN check elements/fake_http_src.c:186:gst_fake_soup_http_src_start: gst_fake_soup_http_src_start cannot find url 'http://unit.test/audio_file_not_available.webm' in input data 0:00:00.895342066 31766 0x2addf4002a30 WARN basesrc gstbasesrc.c:3717:gst_base_src_activate_push:<fakesouphttpsrc1> Failed to start in push mode 0:00:00.895485859 31766 0x2addf4002a30 WARN GST_PADS gstpad.c:1099:gst_pad_set_active:<fakesouphttpsrc1:src> Failed to activate pad 0:00:00.895587110 31766 0x2addf4002a30 WARN adaptivedemux gstadaptivedemux.c:2265:gst_adaptive_demux_stream_download_uri:<dashdemux> Could not sync state for src element 0:00:00.895634371 31766 0x2addf4002a30 WARN adaptivedemux gstadaptivedemux.c:2701:gst_adaptive_demux_stream_download_loop:<dashdemux> Error while downloading fragment 0:00:01.145826532 31766 0x2addf8003ca0 WARN basesrc gstbasesrc.c:2391:gst_base_src_update_length:<fakesouphttpsrc2> processing at or past EOS 0:00:01.146522763 31766 0x2addf4002a30 WARN check elements/fake_http_src.c:186:gst_fake_soup_http_src_start: gst_fake_soup_http_src_start cannot find url 'http://unit.test/audio_file_not_available.webm' in input data 0:00:01.146560991 31766 0x2addf4002a30 WARN basesrc gstbasesrc.c:3717:gst_base_src_activate_push:<fakesouphttpsrc1> Failed to start in push mode 0:00:01.146577214 31766 0x2addf4002a30 WARN GST_PADS gstpad.c:1099:gst_pad_set_active:<fakesouphttpsrc1:src> Failed to activate pad 0:00:01.146595951 31766 0x2addf4002a30 WARN adaptivedemux gstadaptivedemux.c:2265:gst_adaptive_demux_stream_download_uri:<dashdemux> Could not sync state for src element 0:00:01.146610595 31766 0x2addf4002a30 WARN adaptivedemux gstadaptivedemux.c:2701:gst_adaptive_demux_stream_download_loop:<dashdemux> Error while downloading fragment 0:00:01.146666619 31766 0x2addf4002a30 ERROR adaptivedemux gstadaptivedemux.c:2799:gst_adaptive_demux_stream_download_loop:<dashdemux:audio_00> Download error: Couldn't download fragments, too many failures 0:00:01.146771140 31766 0x2addf4002a30 WARN check elements/fake_http_src.c:186:gst_fake_soup_http_src_start: gst_fake_soup_http_src_start cannot find url 'http://unit.test/audio_file_not_available.webm' in input data 0:00:01.146795164 31766 0x2addf4002a30 WARN basesrc gstbasesrc.c:3717:gst_base_src_activate_push:<fakesouphttpsrc1> Failed to start in push mode 0:00:01.146809732 31766 0x2addf4002a30 WARN GST_PADS gstpad.c:1099:gst_pad_set_active:<fakesouphttpsrc1:src> Failed to activate pad 0:00:01.146826707 31766 0x2addf4002a30 WARN adaptivedemux gstadaptivedemux.c:2265:gst_adaptive_demux_stream_download_uri:<dashdemux> Could not sync state for src element 0:00:01.146840160 31766 0x2addf4002a30 WARN adaptivedemux gstadaptivedemux.c:2701:gst_adaptive_demux_stream_download_loop:<dashdemux> Error while downloading fragment 0:00:01.146860397 31766 0x2addf4002a30 ERROR adaptivedemux gstadaptivedemux.c:2799:gst_adaptive_demux_stream_download_loop:<dashdemux:audio_00> Download error: Couldn't download fragments, too many failures 80%: Checks: 5, Failures: 1, Errors: 0 elements/dash_demux.c:511:F:basicTest:testDownloadError:0: 'stateChange' (0) is not equal to 'GST_STATE_CHANGE_SUCCESS' (1) make: *** [elements/dash_demux.check] Error 1
try to merge first the 4th bug mentioned in the ticket
Right, I'd thought I'd merged https://bugzilla.gnome.org/show_bug.cgi?id=756240. With it in, the test passes. Sorry about that.
commit 7aa81d78a72abcfff253897918502eeb1e96518a Author: Florin Apostol <florin.apostol@oregan.net> Date: Fri Oct 16 17:10:11 2015 +0100 adaptivedemux: tests: added download error test Tests adaptive demux behaviour when the uri is wrong and download does not happen.