Closed Bug 833723 Opened 12 years ago Closed 5 years ago

test_bug455311.js fails on Linux locally

Categories

(Core :: Networking, defect, P5)

x86
Linux
defect

Tracking

()

RESOLVED FIXED
mozilla71
Tracking Status
firefox71 --- fixed

People

(Reporter: gk, Assigned: ehsan.akhgari)

References

(Blocks 1 open bug)

Details

(Whiteboard: [necko-would-take])

Attachments

(2 files)

User Agent: Mozilla/5.0 (Windows NT 6.1; rv:17.0) Gecko/20100101 Firefox/17.0 Steps to reproduce: I tried to run the xpcshell testsuite both on a desktop (Ubuntu 12.04) and on a server (Ubuntu 10.04). Actual results: test_bug455311.js failed with the following output: TEST-UNEXPECTED-FAIL | /home/groeg/JonDoBrowser/stable/testing/mozilla-esr17/obj-i686-pc-linux-gnu/_tests/xpcshell/netwerk/test/unit/test_bug455311.js | test failed (with xpcshell return code: 0), see following log: >>>>>>> TEST-INFO | (xpcshell/head.js) | test 1 pending TEST-INFO | (xpcshell/head.js) | test 2 pending TEST-UNEXPECTED-FAIL | /home/groeg/JonDoBrowser/stable/testing/mozilla-esr17/obj-i686-pc-linux-gnu/_tests/xpcshell/netwerk/test/unit/test_bug455311.js | [xpconnect wrapped nsIURI] == [xpconnect wrapped nsIURI] - See following stack: JS frame :: /home/groeg/JonDoBrowser/stable/testing/mozilla-esr17/testing/xpcshell/head.js :: do_throw :: line 451 JS frame :: /home/groeg/JonDoBrowser/stable/testing/mozilla-esr17/testing/xpcshell/head.js :: _do_check_eq :: line 545 JS frame :: /home/groeg/JonDoBrowser/stable/testing/mozilla-esr17/testing/xpcshell/head.js :: do_check_eq :: line 566 JS frame :: /home/groeg/JonDoBrowser/stable/testing/mozilla-esr17/obj-i686-pc-linux-gnu/_tests/xpcshell/netwerk/test/unit/test_bug455311.js :: run_test :: line 122 JS frame :: /home/groeg/JonDoBrowser/stable/testing/mozilla-esr17/testing/xpcshell/head.js :: _execute_test :: line 315 JS frame :: -e :: <TOP_LEVEL> :: line 1 TEST-INFO | (xpcshell/head.js) | exiting test <<<<<<< Expected results: The test shouldn't have failed.
linkURI.spec is: file:///home/groeg/JonDoBrowser/stable/testing/mozilla-esr17/obj-i686-pc-linux-gnu/_tests/xpcshell/netwerk/test/unit/test_link.desktop while channel.URI.spec is: /home/groeg/JonDoBrowser/stable/testing/mozilla-esr17/netwerk/test/unit/test_link.desktop Looking a bit deeper https://mxr.mozilla.org/mozilla-esr17/source/netwerk/protocol/file/nsFileChannel.cpp#243ff. causes the former to get resolved to the latter. So the question is, where does the test go wrong? 1) Should the former should not get resolved to the latter? 2) Does getLinkFile() (https://mxr.mozilla.org/mozilla-esr17/source/netwerk/test/unit/test_bug455311.js#116) give the wrong thing back and the error would thus be somewhere in do_get_file()? 3) ...?
Blocks: 514067
OS: Windows 7 → Linux
https://bugzilla.mozilla.org/show_bug.cgi?id=482085 could be relevant here. But still not sure what the expected behavior/where the bug is.
Status: UNCONFIRMED → NEW
Ever confirmed: true
I've finally bisected my way down to bug 670514 which causes the test failure. Given the nature of that bug I guess the fix to this bug will adapt the unit test although that might not safe. I am willing to come up with a patch if someone points me in the right direction (see my previous comments). Boris?
Version: 17 Branch → Trunk
Flags: needinfo?(bzbarsky)
Fixing the test makes sense, but why is this not failing all over? I thought we symlinked this stuff in general on Linux/Mac...
Flags: needinfo?(bzbarsky)
(In reply to Boris Zbarsky (:bz) from comment #4) > Fixing the test makes sense, but why is this not failing all over? I > thought we symlinked this stuff in general on Linux/Mac... How do you think that test should get fixed: 1) We should delete the offending lines in it and make the test just pass (that makes me actually a bit nervous as those lines/tests are probably there for some reason...). 2) We should try to avoid the symlink issue leaving the tests itself untouched. 3) ... Maybe we should investigate why this test is not failing all over first which could lead to solution 2) mentioned above. Not sure whom to talk to in this case, though.
Flags: needinfo?(bzbarsky)
> Maybe we should investigate why this test is not failing all over first Yes. So I just checked, and it fails locally for me too on Linux. It passes on tinderbox, because tinderbox runs on a packaged build, not directly out of an objdir, so doesn't have a symlink. So the right fix for the test is probably to fix this line: do_check_eq(chan.URI, linkURI); to use a URI on the RHS that has resolved the file to its target in cases when it's a symlink...
Flags: needinfo?(bzbarsky)
Whiteboard: [necko-would-take]
Priority: -- → P5

I'm tired of ignoring this test failure locally all the time, so I'd like to fix it.

Assignee: nobody → ehsan
Pushed by eakhgari@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/89552e3aa8be Make test_bug455311.js pass locally on Linux by resolving symlinks; r=bzbarsky
Flags: needinfo?(ehsan)
Pushed by eakhgari@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/41422a29d1c5 Make test_bug455311.js pass locally on Linux by resolving symlinks; r=bzbarsky
Attached file Bug 833723 - Part 2: Fix typo (deleted) —
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla71
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: