Bug 64135 - Some tests rely on a /tmp/LayoutTests symlink pointing to the LayoutTests directory
Summary: Some tests rely on a /tmp/LayoutTests symlink pointing to the LayoutTests dir...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on: 67239
Blocks: 65781
  Show dependency treegraph
 
Reported: 2011-07-07 17:12 PDT by Gustavo Noronha (kov)
Modified: 2011-09-07 11:53 PDT (History)
4 users (show)

See Also:


Attachments
create and remove the symlink like old-run-webkit-tests used to (2.32 KB, patch)
2011-07-08 06:02 PDT, Gustavo Noronha (kov)
abarth: review-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Gustavo Noronha (kov) 2011-07-07 17:12:11 PDT
Old run-webkit-tests used to create a symlink to the LayoutTests directory in /tmp. A few tests rely on that symlink existing, such as these:

fast/dom/frame-loading-via-document-write.html
fast/loader/local-CSS-from-local.html
fast/loader/local-JavaScript-from-local.html
fast/loader/local-image-from-local.html

Here's where it creates the symlink:

http://trac.webkit.org/browser/trunk/Tools/Scripts/old-run-webkit-tests#L501

If nobody beats me to it, I'll write a patch as soon as my tree is free from a bisect I just started.
Comment 1 Gustavo Noronha (kov) 2011-07-08 06:02:19 PDT
Created attachment 100112 [details]
create and remove the symlink like old-run-webkit-tests used to
Comment 2 Adam Barth 2011-07-11 14:11:44 PDT
Comment on attachment 100112 [details]
create and remove the symlink like old-run-webkit-tests used to

Please just fix the tests.  This patch is wrong on several levels.
Comment 3 Dirk Pranke 2011-07-11 14:31:13 PDT
Ugh. I wonder why we haven't seen the mac NRWT port failling this test more often.

Adam already R-'ed this, but at any rate, this is the wrong way to work around this. The top-level run_webkit_tests.py script is just a wrapper around controllers/manager.py which does all the real work. 

Assuming we did want NRWT to hack this, we should create the link (if it doesn't already exist) in manager.py:824 set_up_run(), and remove the link (if and only if we created it) in clean_up_run() in 951.

However, we really shouldn't have to be doing this at all, and NRWT shouldn't need to be aware of this. Chromium, for example, is smart enough to dynamically remap this in pathToLocalResource(), and the other ports probably should be as well.

Can you file a separate bug to get the DRT's fixed if we can't just fix the tests?
Comment 4 Eric Seidel (no email) 2011-07-11 16:13:50 PDT
Comment on attachment 100112 [details]
create and remove the symlink like old-run-webkit-tests used to

Yeah, definitely the wrong layer.  What tests depend on this?
Comment 5 Gustavo Noronha (kov) 2011-07-12 05:59:23 PDT
(In reply to comment #4)
> (From update of attachment 100112 [details])
> Yeah, definitely the wrong layer.  What tests depend on this?

There's a (probably not exhaustive) list at the first comment. Here they are:

fast/dom/frame-loading-via-document-write.html
fast/loader/local-CSS-from-local.html
fast/loader/local-JavaScript-from-local.html
fast/loader/local-image-from-local.html
Comment 6 Jarred Nicholls 2011-08-30 13:32:11 PDT
Gonna fix this, it's bothering me as well.  And no, this should not be fixed in the NRWT (especially not outside of the manager).  I think the tests can be fixed instead.
Comment 7 Jarred Nicholls 2011-08-30 14:53:42 PDT
Ok, so I don't want to lower the integrity of the fast/loader tests by making the urls relative (as opposed to fully qualified file:// scheme), which was my original intent.  Similarly, those tests in http/tests/security which test loading local resources from a remote document still need the pathToLocalResource normalization.

I'll open a ticket to fix the DRTs pathToLocalResource() so it normalizes file:///tmp/LayoutTests like Chromium's.
Comment 8 Andras Becsi 2011-09-02 05:16:34 PDT
(In reply to comment #4)
> (From update of attachment 100112 [details])
> Yeah, definitely the wrong layer.  What tests depend on this?

I'm not sure whether all these tests still exist, but in BUG 33153 I found a bunch of these which also cause problems when running multiple instances of run-webkit-tests with differing repositories.

LayoutTests/fast/dom/frame-loading-via-document-write.html
LayoutTests/fast/loader/local-CSS-from-local.html
LayoutTests/fast/loader/local-JavaScript-from-local.html
LayoutTests/fast/loader/local-iFrame-source-from-local.html
LayoutTests/fast/loader/local-image-from-local.html
LayoutTests/fast/loader/user-style-sheet-resource-load-callbacks.html
LayoutTests/http/tests/misc/image-blocked-src-change.html
LayoutTests/http/tests/misc/image-blocked-src-no-change.html
LayoutTests/http/tests/security/frame-loading-via-document-write.html
LayoutTests/http/tests/security/local-CSS-from-remote.html
LayoutTests/http/tests/security/local-JavaScript-from-remote.html
LayoutTests/http/tests/security/local-iFrame-from-remote.html
LayoutTests/http/tests/security/local-image-from-remote.html
LayoutTests/http/tests/security/local-user-CSS-from-remote.html
LayoutTests/http/tests/security/local-video-poster-from-remote.html
LayoutTests/http/tests/security/local-video-source-from-remote.html
LayoutTests/http/tests/security/local-video-src-from-remote.html
Comment 9 Jarred Nicholls 2011-09-02 06:36:34 PDT
Output of a "grep -r "pathToLocalResource(" * | awk '{ print $1 }'" on LayoutTests:

fast/dom/frame-loading-via-document-write.html:
fast/loader/local-image-from-local-expected.txt:Currently
fast/loader/local-JavaScript-from-local-expected.txt:Currently
fast/loader/local-iFrame-source-from-local.html:
fast/loader/local-iFrame-source-from-local.html:
fast/loader/local-image-from-local.html:
fast/loader/local-image-from-local.html:
fast/loader/local-iFrame-source-from-local-expected.txt:Currently
fast/loader/local-CSS-from-local.html:
fast/loader/local-CSS-from-local.html:
fast/loader/local-CSS-from-local-expected.txt:Currently
fast/loader/local-JavaScript-from-local.html:
fast/loader/local-JavaScript-from-local.html:
http/tests/security/local-CSS-from-remote.html:
http/tests/security/local-CSS-from-remote.html:
http/tests/security/local-video-poster-from-remote.html:
http/tests/security/local-JavaScript-from-remote-expected.txt:Currently
http/tests/security/local-JavaScript-from-remote.html:
http/tests/security/local-JavaScript-from-remote.html:
http/tests/security/local-CSS-from-remote-expected.txt:Currently
http/tests/security/local-image-from-remote-expected.txt:Currently
http/tests/security/local-iFrame-from-remote.html:
http/tests/security/local-iFrame-from-remote.html:
http/tests/security/local-video-source-from-remote.html:
http/tests/security/local-image-from-remote.html:
http/tests/security/local-image-from-remote.html:
http/tests/security/frame-loading-via-document-write.html:
http/tests/security/local-image-from-remote-whitelisted.html:var
http/tests/security/local-iFrame-from-remote-expected.txt:Currently
http/tests/security/local-video-src-from-remote.html:
http/tests/plugins/post-url-file.html:


Output of a "grep -r "/tmp/LayoutTests/" * | awk '{ print $1 }'" on LayoutTests:

fast/dom/frame-loading-via-document-write.html:
fast/loader/local-iFrame-source-from-local.html:
fast/loader/user-style-sheet-resource-load-callbacks.html:
fast/loader/local-image-from-local.html:
fast/loader/local-CSS-from-local.html:
fast/loader/local-JavaScript-from-local.html:
http/tests/security/local-CSS-from-remote.html:
http/tests/security/local-video-poster-from-remote.html:
http/tests/security/local-user-CSS-from-remote.html:
http/tests/security/local-JavaScript-from-remote.html:
http/tests/security/local-iFrame-from-remote.html:
http/tests/security/local-video-source-from-remote.html:
http/tests/security/local-image-from-remote.html:
http/tests/security/frame-loading-via-document-write.html:
http/tests/security/local-image-from-remote-whitelisted.html:var
http/tests/security/local-video-src-from-remote.html:
http/tests/misc/image-blocked-src-no-change.html:
http/tests/misc/image-blocked-src-no-change.html:
http/tests/misc/image-blocked-src-change.html: