Issue metadata
Sign in to add a comment
|
content_shell stopped being able to run layout tests for files under /media |
||||||||||||||||||||
Issue description
run content_shell --run-layout-test passing a filename that includes a symlink somewhere.
Sometime in the past few weeks this broken, apparently resulting in content_shell seeing an empty document (always get a trivial layout test generated):
#READY
[17912:17912:0525/150047:1656602852095:ERROR:service_registry_impl.cc(95)] blink::mojom::VRService not found
Content-Type: text/plain
layer at (0,0) size 800x600
LayoutView at (0,0) size 800x600
layer at (0,0) size 800x600
LayoutBlockFlow {HTML} at (0,0) size 800x600
LayoutBlockFlow {BODY} at (8,8) size 784x584
#EOF
#EOF
#EOF
If I switch to using a true physical path (eg. cd `pwd -P`) then it's fine.
Next I plan to bisect to find what CL broke this.
,
May 25 2016
bisecting now
,
May 25 2016
This CL is what caused this to break. tkent@ can you please take a look and see if you can fix your code to still support paths with symlinks? Author: tkent <tkent@chromium.org> Date: Fri May 20 00:15:54 2016 -0700 content_shell: Redirect resource requests for some local paths. This CL changes content_shell in layout test mode so that it redirects resource requests for file:///{common,images,media,resources}/ to third_party/WebKit/ LayoutTests/imported/wpt/*. Such URLs are resolved from absolute path links in web-platform-tests like <script src="/resources/testharness.js">. After this CL, we can remove path rewrite step for /resources and /common in test_converter.py. BUG= 498120 , 613408 Review-Url: https://codereview.chromium.org/1984103003 Cr-Commit-Position: refs/heads/master@{#395025}
,
May 25 2016
What symlink do you have, and what path do you specify in the command line, and what's the working directory on invoking content_shell?
,
May 25 2016
I couldn't reproduce this on my Linux box with a symlinked checkout.
,
May 26 2016
I have ~/code/chrome-internal sym-linked to /media/ssd/code/chrome-internal and I'm seeing things like this:
rbyers@rbyers-dev:~/code/chrome-internal/src/third_party/WebKit/LayoutTests$ ~/code/chrome-internal/src/out/Debug_gn/content_shell --run-layout-test fast/events/touch/touch-target.html
#READY
[30627:30627:0525/204414:1677209501649:ERROR:service_registry_impl.cc(95)] blink::mojom::VRService not found
Content-Type: text/plain
layer at (0,0) size 800x600
LayoutView at (0,0) size 800x600
layer at (0,0) size 800x600
LayoutBlockFlow {HTML} at (0,0) size 800x600
LayoutBlockFlow {BODY} at (8,8) size 784x584
#EOF
#EOF
#EOF
,
May 26 2016
Oh crap, now it's not working from a non-symlinked directory either. Maybe that was a red-herring. I'll start debugging your patch to see what has actually changed for me.
,
May 26 2016
Oh, it's because you write all paths that start with media and my enlistment is on /media/ssd!
,
May 26 2016
,
May 26 2016
Perhaps we should only rewrite the URL when we see that a file actually exists at that path? That would make collisions like this much less likely. Also we should probably never rewrite the top-level URL for the page under test - it's content_shell converting that into an absolute path that's causing the problem for me here.
,
May 26 2016
Thank you for the investigation! > Perhaps we should only rewrite the URL when we see that a file actually exists at that path? Unfortunately we can't access local files because of the sandbox.
,
May 26 2016
,
May 26 2016
I though we could enable the path rewriting only during running WPT tests. However, I found it didn't work. e.g. A test: file:///media/ssd/.../LT/imported/wpt/html/foo.html The test contains: <img src="/media/poster.png"> <iframe src="bar.html"></iframe> file:///media/poster.png should be updated, but file:///media/ssd/.../LT/imported/wpt/html/bar.html should not be updated. I'll try both of - The first resource request should not be rewritten. - Paths including "/LayoutTests/" should not be rewritten.
,
May 26 2016
,
May 26 2016
,
May 26 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/00340348688b60b044587900939330cd4ea1e989 commit 00340348688b60b044587900939330cd4ea1e989 Author: tkent <tkent@chromium.org> Date: Thu May 26 08:18:41 2016 content_shell: Fix a regression for paths starting with /media/. crrev.com/395025 caused a regression that layout tests in /media are not runnable. - Do not rewrite a request URL if it's the first request after Reset(). - Do not rewrite a request URL if it contains "/LayoutTests/". BUG= 613408 , 614778 Review-Url: https://codereview.chromium.org/2012653004 Cr-Commit-Position: refs/heads/master@{#396146} [modify] https://crrev.com/00340348688b60b044587900939330cd4ea1e989/components/test_runner/test_runner.cc [modify] https://crrev.com/00340348688b60b044587900939330cd4ea1e989/components/test_runner/test_runner.h [modify] https://crrev.com/00340348688b60b044587900939330cd4ea1e989/components/test_runner/web_frame_test_client.cc [modify] https://crrev.com/00340348688b60b044587900939330cd4ea1e989/content/shell/renderer/layout_test/blink_test_runner.cc
,
May 27 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/2edc979d193cd4a03ac02b67ccdc7b3a979e6232 commit 2edc979d193cd4a03ac02b67ccdc7b3a979e6232 Author: tkent <tkent@chromium.org> Date: Fri May 27 04:58:25 2016 content_shell: Update absolute path rewriting logic again. With this CL, we rewrite absolute-looking paths only in web-platform-tests and csswg-test. RewriteAbsolutePathInWPT() doesn't affect non-W3C tests at all. BUG= 614778 Review-Url: https://codereview.chromium.org/2013203003 Cr-Commit-Position: refs/heads/master@{#396396} [modify] https://crrev.com/2edc979d193cd4a03ac02b67ccdc7b3a979e6232/components/test_runner/test_interfaces.cc [modify] https://crrev.com/2edc979d193cd4a03ac02b67ccdc7b3a979e6232/components/test_runner/test_runner.cc [modify] https://crrev.com/2edc979d193cd4a03ac02b67ccdc7b3a979e6232/components/test_runner/test_runner.h [modify] https://crrev.com/2edc979d193cd4a03ac02b67ccdc7b3a979e6232/components/test_runner/web_frame_test_client.cc [modify] https://crrev.com/2edc979d193cd4a03ac02b67ccdc7b3a979e6232/components/test_runner/web_test_delegate.h [modify] https://crrev.com/2edc979d193cd4a03ac02b67ccdc7b3a979e6232/content/shell/renderer/layout_test/blink_test_runner.cc [modify] https://crrev.com/2edc979d193cd4a03ac02b67ccdc7b3a979e6232/content/shell/renderer/layout_test/blink_test_runner.h
,
May 29 2016
,
Jun 23 2016
|
|||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||
Comment 1 by rbyers@chromium.org
, May 25 2016