New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 612730 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Jul 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 2
Type: Bug

Blocking:
issue 595504



Sign in to add a comment

run_webkit_tests needs to create a "dummy" home directory and set $HOME to that

Project Member Reported by tansell@chromium.org, May 18 2016

Issue description

To prevent a user's settings leaking into the layout tests, we should create a dummy HOME directory, populate it with just what is needed and then tell content_shell to use that instead.

The code already seems to "cleans up" the environment in setup_environ_for_server - this would follow a similar theory where it "cleans up" the user home dir.

This would fix http://crbug.com/595504

 
Status: Available (was: Untriaged)
Cc: qyears...@chromium.org
Labels: -Pri-3 Pri-2
To clarify this: would this mean creating a temp directory and setting $HOME somewhere before starting layout tests?

Not quite sure whether it makes most sense to put this in Port, Host, or 
somewhere like in layout_tests/controllers/manager.py. Dirk or Tim do you currently have thoughts about this?

Maybe Port since this is where setup_environ_for_server is done, and maybe it's a good idea to keep things that affect environment variables together, and also this is platform-specific?
Cc: ojan@chromium.org
> To clarify this: would this mean creating a temp directory and setting $HOME somewhere before starting layout tests?

Correct.

Dirk or someone else with better understanding of the code (Ojan maybe?) will need to answer the second part.

One part is figuring out exactly what is needed in the fake $HOME directory. I *think* it is just `~/.Xauthority` but people have all sorts of weird set ups.

yes, setup_environ_for_server() would probably be a good place for this.

However, I continue to prefer us to push google IT to fix whatever they regressed in bug 595504 (since it seems to affect other test suites as well), and if they do, I'm not sure it's worth fixing this.

But, if we're not getting anywhere with them, a workaround seems to be better than nothing.
Cc: -qyears...@chromium.org
Owner: qyears...@chromium.org
Status: Assigned (was: Available)
I'd like to try to work on this today.
Cc: dgro...@chromium.org wkorman@chromium.org
Status: Started (was: Assigned)
Uploaded a CL (http://crrev.com/2141093006), but I haven't properly confirmed that it works, since I can't reproduce the original bug now -- is anyone else still having mass timeouts, and if so, does `git cl patch 2141093006` fix it?
I do still have mass timeouts and that CL fixes it.
Project Member

Comment 8 by bugdroid1@chromium.org, Jul 14 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/803ead9a7c52156198f7c23be623fdd935ea45be

commit 803ead9a7c52156198f7c23be623fdd935ea45be
Author: qyearsley <qyearsley@chromium.org>
Date: Thu Jul 14 21:24:19 2016

In Linux Port, make a dummy HOME directory for running tests.

I haven't really confirmed that this solves the problem because I wasn't able to reproduce it again :-/

Note, there's a related change http://crrev.com/2143123004 which would make it so that the real os.environ isn't used in tests.

BUG= 612730 

Review-Url: https://codereview.chromium.org/2141093006
Cr-Commit-Position: refs/heads/master@{#405576}

[modify] https://crrev.com/803ead9a7c52156198f7c23be623fdd935ea45be/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/linux.py
[modify] https://crrev.com/803ead9a7c52156198f7c23be623fdd935ea45be/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/linux_unittest.py

Status: Fixed (was: Started)
Cc: thomasanderson@chromium.org
Note that the dummy home causes very slow FcInit() with the statically linked fontconfig because of missing font cache under ~/.cache. Tried XDG_CACHE_HOME but it doesn't fully work. Not sure why it worked before we statically link fontconfig.
Perhaps we can create a symbolic link from the dummy home .cache to the real home/.cache. Will try.
c#11 or maybe just copy $HOME/.cache/fontconfig in _copy_files_to_dummy_home_dir?

Sign in to add a comment