Closed
Bug 1190574
Opened 9 years ago
Closed 9 years ago
Test harness functions like test.chain.replace aren't asserting inputs, hiding bad tests.
Categories
(Core :: WebRTC, defect, P1)
Core
WebRTC
Tracking
()
RESOLVED
FIXED
mozilla45
backlog | webrtc/webaudio+ |
People
(Reporter: jib, Assigned: jib)
References
Details
Attachments
(1 file, 3 obsolete files)
With a patch that catches this, I found these broken tests (which I've fixed):
> 21114 INFO TEST-UNEXPECTED-FAIL | dom/media/tests/mochitest/test_peerConnection_forwarding_basicAudioVideoCombined.html | Error executing test: Error: Unknown test: PC_REMOTE_CHECK_MEDIA_FLOW_PRESENT
> 25134 INFO TEST-UNEXPECTED-FAIL | dom/media/tests/mochitest/test_peerConnection_relayOnly.html | Error executing test: Error: Unknown test: PC_LOCAL_SETURP_ICE_HANDLER
> 30551 INFO TEST-UNEXPECTED-FAIL | dom/media/tests/mochitest/test_peerConnection_replaceTrack.html | Error executing test: Error: Unknown test: PC_REMOTE_CHECK_MEDIA_FLOW_PRESENT
> 31887 INFO TEST-UNEXPECTED-FAIL | dom/media/tests/mochitest/test_peerConnection_syncSetDescription.html | Error executing test: Error: Unknown test: [object Object]
> 31903 INFO TEST-UNEXPECTED-FAIL | dom/media/tests/mochitest/test_peerConnection_forwarding_basicAudioVideoCombined.html | Error executing test: Error: Unknown test: PC_REMOTE_CHECK_MEDIA_FLOW_PRESENT
Assignee | ||
Comment 1•9 years ago
|
||
Bug 1190574 - make test.chain.replace and cohorts throw on unknown test name + fix broken tests
Attachment #8642618 -
Flags: review?(drno)
Assignee | ||
Comment 2•9 years ago
|
||
Ignore dom/media/tests/mochitest/test_peerConnection_relayOnly.html, that's one I was testing with in Bug 1187775, which is how I stumbled on this.
Assignee | ||
Comment 3•9 years ago
|
||
Comment on attachment 8642618 [details] MozReview Request: Bug 1190574 - make test.chain.replace and cohorts throw on unknown test name + fix broken tests Bug 1190574 - make test.chain.replace and cohorts throw on unknown test name + fix broken tests
Updated•9 years ago
|
Attachment #8642618 -
Flags: review?(drno)
Comment 4•9 years ago
|
||
Comment on attachment 8642618 [details] MozReview Request: Bug 1190574 - make test.chain.replace and cohorts throw on unknown test name + fix broken tests https://reviewboard.mozilla.org/r/14739/#review13335 ::: dom/media/tests/mochitest/test_selftest.html:28 (Diff revision 2) > + is(catcher(() => test.chain.replace("PC_LOCAL_SET_LOCAL_DESCRIPTION", TEST)), > + null, "test.chain.replace works"); > + is(catcher(() => test.chain.replace("FOO", TEST)), > + "Unknown test: FOO", "test.chain.replace catches typos"); This makes me wonder if we should have something more detailed, where we verify that every single of the chain functions works as expected.
Comment 5•9 years ago
|
||
Comment on attachment 8642618 [details] MozReview Request: Bug 1190574 - make test.chain.replace and cohorts throw on unknown test name + fix broken tests https://reviewboard.mozilla.org/r/14739/#review13337 Ship It!
Attachment #8642618 -
Flags: review+
Assignee | ||
Comment 6•9 years ago
|
||
(In reply to Nils Ohlmeier [:drno] from comment #4) > This makes me wonder if we should have something more detailed, where we > verify that every single of the chain functions works as expected. I think that's a good idea. Feel free to expound on it or open a followup bug.
Updated•9 years ago
|
backlog: --- → webRTC+
Rank: 10
Priority: -- → P1
Comment 7•9 years ago
|
||
I filled bug 1203683 as a follow up. jib: I thought you land this after my r+. Any reason not to land it?
Assignee | ||
Comment 8•9 years ago
|
||
Comment on attachment 8642618 [details] MozReview Request: Bug 1190574 - make test.chain.replace and cohorts throw on unknown test name + fix broken tests Bug 1190574 - make test.chain.replace and cohorts throw on unknown test name + fix broken tests
Assignee | ||
Comment 9•9 years ago
|
||
See Bug 1202046 comment 2 for why I didn't land this. Basically https://treeherder.mozilla.org/#/jobs?repo=try&revision=099d31b82ace showed "PeerConnectionWrapper (pcRemote): legal ICE state transition from new to failed" perma-failing when I enabled the missing tests. I've done a rebase and a new try to see if things have improved.
Comment 10•9 years ago
|
||
Oh sorry. I mis-read comment 2. I thought this would fix it. But you said it runs into the same error. Hmm so if the rebasing doesn't magically fix it, we basically have a perma orange ICE connection issue. Let me know if that is the case. I would be interested in trying out a couple of things if that is the case.
Assignee | ||
Comment 11•9 years ago
|
||
Yup still perma-orange: https://treeherder.mozilla.org/#/jobs?repo=try&revision=f89edd89af4f Yeah comment 2 was a different error which is gone. This is all Bug 1202046 now it seems.
Comment 12•9 years ago
|
||
Bug 1190574 - make test.chain.replace and cohorts throw on unknown test name + fix broken tests
Comment 13•9 years ago
|
||
Bug 1190574: really made sLD/sRD calls synchronos. r?jib
Attachment #8661084 -
Flags: review?(jib)
Updated•9 years ago
|
Attachment #8661083 -
Attachment is obsolete: true
Assignee | ||
Updated•9 years ago
|
Attachment #8661084 -
Flags: review?(jib)
Assignee | ||
Comment 14•9 years ago
|
||
Comment on attachment 8661084 [details] MozReview Request: Bug 1190574: added missing calls to release stored ICE candidates. r+jib https://reviewboard.mozilla.org/r/19291/#review17227 ::: dom/media/tests/mochitest/test_peerConnection_syncSetDescription.html:19 (Diff revision 1) > - test.pcLocal._pc.setLocalDescription(test.originalOffer); > + return new Promise((resolve, reject) => > + test.pcLocal._pc.setLocalDescription(test.originalOffer, resolve, reject)); No, the whole point of this test is to verify that we support calling these methods without waiting for them to succeed. It's the only reason peerConnections still has an "operations" array [1]. It's a legacy thing back to the callback days when people signaled after createOffer rather than after setLocalDescription [2]. [1] http://w3c.github.io/webrtc-pc/#operation [2] http://dev.w3.org/2011/webrtc/editor/webrtc-20120720.html#simple-example
Comment 15•9 years ago
|
||
(In reply to Jan-Ivar Bruaroey [:jib] from comment #14) > Comment on attachment 8661084 [details] > MozReview Request: Bug 1190574: really made sLD/sRD calls synchronos. r?jib > > https://reviewboard.mozilla.org/r/19291/#review17227 > > ::: dom/media/tests/mochitest/test_peerConnection_syncSetDescription.html:19 > (Diff revision 1) > > - test.pcLocal._pc.setLocalDescription(test.originalOffer); > > + return new Promise((resolve, reject) => > > + test.pcLocal._pc.setLocalDescription(test.originalOffer, resolve, reject)); > > No, the whole point of this test is to verify that we support calling these > methods without waiting for them to succeed. It's the only reason > peerConnections still has an "operations" array [1]. It's a legacy thing > back to the callback days when people signaled after createOffer rather than > after setLocalDescription [2]. As far as I know, whether you call with Promises or with Callbacks, you are still required to queue.
Comment 16•9 years ago
|
||
Also, there's absolutely no reason you have to wait till after setLocalDescription() to signal, promises or otherwise.
Assignee | ||
Comment 17•9 years ago
|
||
Fair enough, but all our tests signal after setLocalDescription, except this one, so if we wait for success on this one as well, then we lose coverage.
Comment 18•9 years ago
|
||
You are right I missed what the point of this test is. I removed the promises. But the reason why the test fails without my latest patch is that the stored ICE candidates are never added on the far ends PeerConnection. So if I add one single success callback to sRD() to release the ICE candidates into the PC then the test starts to fail. It appears the reason is that the wrapping of legacy calls with onSuccess callbacks into a Promise basically no longer guarantees that the wrapping Promise from sRD gets executed before the native promise based call into createAnswer().
Comment 19•9 years ago
|
||
Comment on attachment 8661084 [details] MozReview Request: Bug 1190574: added missing calls to release stored ICE candidates. r+jib Bug 1190574: added missing calls to release stored ICE candidates.
Attachment #8661084 -
Attachment description: MozReview Request: Bug 1190574: really made sLD/sRD calls synchronos. r?jib → MozReview Request: Bug 1190574: added missing calls to release stored ICE candidates.
Attachment #8661084 -
Flags: review?(jib)
Comment 20•9 years ago
|
||
So my latest patch only adds the releasing of the ICE candidates, which is the reason the test keeps failing. But it now fails for the above mentioned reason. Jib can you take a look how to fix this best in PeerConnection.js? I know we are mixing now old style with and without callback, plus Promise based createOffer and createAnswer. But we should probably fix it I think.
Assignee | ||
Comment 21•9 years ago
|
||
Comment on attachment 8661084 [details] MozReview Request: Bug 1190574: added missing calls to release stored ICE candidates. r+jib https://reviewboard.mozilla.org/r/19291/#review17315 ::: dom/media/tests/mochitest/test_peerConnection_syncSetDescription.html:24 (Diff revision 2) > - test.pcRemote._pc.setRemoteDescription(test._local_offer); > + test.pcRemote._pc.setRemoteDescription(test._local_offer, > + test.pcRemote.releaseIceCandidates); The legacy api is fickle. You can't call setLocal/RemoteDescription with two arguments. 1 (new) or 3 (old), but not 2. i.e. you need to add the required error callback here. Unfortunately, due to webidl overload limitations, the error about this is hidden. If you were to add: .catch(e => console.error(e)) to the tail of that call, before the semicolon, then you would see: TypeError: Not enough arguments to mozRTCPeerConnection.setLocalDescription. Hopefully, we wont be writing a lot of new legacy code after this test.
Attachment #8661084 -
Flags: review?(jib)
Assignee | ||
Comment 22•9 years ago
|
||
I'm fairly confident PeerConnection.js is working here. Here's a fiddle showing sync setLD/RD in action, albeit with new promise methods https://jsfiddle.net/23mzs084/
Comment 23•9 years ago
|
||
Comment on attachment 8661084 [details] MozReview Request: Bug 1190574: added missing calls to release stored ICE candidates. r+jib Bug 1190574: added missing calls to release stored ICE candidates. r?jib
Attachment #8661084 -
Attachment description: MozReview Request: Bug 1190574: added missing calls to release stored ICE candidates. → MozReview Request: Bug 1190574: added missing calls to release stored ICE candidates. r?jib
Attachment #8661084 -
Flags: review?(jib)
Comment 24•9 years ago
|
||
Good catch. Yeah adding the error callback seem to make it work. So here is the patch which fixes the missing relay of ICE candidates for this test.
Assignee | ||
Updated•9 years ago
|
Attachment #8661084 -
Flags: review?(jib) → review+
Assignee | ||
Comment 25•9 years ago
|
||
Comment on attachment 8661084 [details] MozReview Request: Bug 1190574: added missing calls to release stored ICE candidates. r+jib https://reviewboard.mozilla.org/r/19291/#review17357 ::: dom/media/tests/mochitest/test_peerConnection_syncSetDescription.html:25 (Diff revision 3) > + test.pcRemote.releaseIceCandidates, function() {}); We probably want generateErrorCallback there in case there's a problem.
Comment 26•9 years ago
|
||
Nils - is this ready to land? See also bug 1202046 which used to go perma-orange with this patch.
Flags: needinfo?(jib)
Assignee | ||
Updated•9 years ago
|
Flags: needinfo?(jib) → needinfo?(drno)
Assignee | ||
Comment 27•9 years ago
|
||
Comment on attachment 8642618 [details] MozReview Request: Bug 1190574 - make test.chain.replace and cohorts throw on unknown test name + fix broken tests Review request updated; see interdiff: https://reviewboard.mozilla.org/r/14739/diff/3-4/
Assignee | ||
Comment 28•9 years ago
|
||
Bug 1190574: added missing calls to release stored ICE candidates. r?jib
Attachment #8683325 -
Flags: review?(jib)
Assignee | ||
Comment 29•9 years ago
|
||
Comment on attachment 8683325 [details] MozReview Request: Bug 1190574: added missing calls to release stored ICE candidates. r?jib Just a rebase.
Attachment #8683325 -
Flags: review?(jib) → review+
Comment 30•9 years ago
|
||
Comment on attachment 8661083 [details] MozReview Request: Bug 1190574 - make test.chain.replace and cohorts throw on unknown test name + fix broken tests Review request updated; see interdiff: https://reviewboard.mozilla.org/r/19289/diff/1-2/
Attachment #8661083 -
Attachment is obsolete: false
Comment 31•9 years ago
|
||
Comment on attachment 8661084 [details] MozReview Request: Bug 1190574: added missing calls to release stored ICE candidates. r+jib Review request updated; see interdiff: https://reviewboard.mozilla.org/r/19291/diff/3-4/
Attachment #8661084 -
Attachment description: MozReview Request: Bug 1190574: added missing calls to release stored ICE candidates. r?jib → MozReview Request: Bug 1190574: added missing calls to release stored ICE candidates. r+jib
Comment 32•9 years ago
|
||
Comment on attachment 8661084 [details] MozReview Request: Bug 1190574: added missing calls to release stored ICE candidates. r+jib Review request updated; see interdiff: https://reviewboard.mozilla.org/r/19291/diff/4-5/
Comment 33•9 years ago
|
||
Sorry I did not realized that this was still depending on me. Pushed the one change jib requested. Try run is on its way...
Assignee | ||
Comment 34•9 years ago
|
||
Seeing this in try in bug 1202046 comment 10: > 15:00:37 INFO - 4275 INFO TEST-PASS | dom/media/tests/mochitest/test_selftest.html | test.chain.replace catches typos > 15:00:37 INFO - 4276 INFO TEST-UNEXPECTED-FAIL | dom/media/tests/mochitest/test_selftest.html | Test timed out.
Comment 35•9 years ago
|
||
The try run in comment 32 apparently did not execute anything. Time to go back to bigger guns again...
Comment 36•9 years ago
|
||
Comment on attachment 8661084 [details] MozReview Request: Bug 1190574: added missing calls to release stored ICE candidates. r+jib Review request updated; see interdiff: https://reviewboard.mozilla.org/r/19291/diff/5-6/
Comment 37•9 years ago
|
||
(In reply to Jan-Ivar Bruaroey [:jib] from comment #34) > Seeing this in try in bug 1202046 comment 10: > > > 15:00:37 INFO - 4275 INFO TEST-PASS | dom/media/tests/mochitest/test_selftest.html | test.chain.replace catches typos > > 15:00:37 INFO - 4276 INFO TEST-UNEXPECTED-FAIL | dom/media/tests/mochitest/test_selftest.html | Test timed out. If we never call finish() in a test then it times out :-) Lets see if the latest patch will turn green...
Updated•9 years ago
|
Attachment #8683325 -
Attachment is obsolete: true
Flags: needinfo?(drno)
Updated•9 years ago
|
Attachment #8661083 -
Attachment is obsolete: true
Updated•9 years ago
|
Attachment #8642618 -
Attachment is obsolete: true
Comment 39•9 years ago
|
||
does 8c850071a79d Bug 1190574 - make test.chain.replace and cohorts throw on unknown test name + fix broken tests also need checkin ?
Flags: needinfo?(jib)
Updated•9 years ago
|
Keywords: checkin-needed
Comment 41•9 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/689ca8a01248 https://hg.mozilla.org/integration/mozilla-inbound/rev/203a48eb1726
Keywords: checkin-needed
Comment 42•9 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/689ca8a01248 https://hg.mozilla.org/mozilla-central/rev/203a48eb1726
Status: NEW → RESOLVED
Closed: 9 years ago
status-firefox45:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla45
Comment 43•9 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/689ca8a01248 https://hg.mozilla.org/mozilla-central/rev/203a48eb1726
You need to log in
before you can comment on or make changes to this bug.
Description
•