run_webkit_tests needs to create a "dummy" home directory and set $HOME to that |
|||||||
Issue descriptionTo 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
,
Jul 6 2016
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?
,
Jul 7 2016
> 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.
,
Jul 7 2016
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.
,
Jul 13 2016
I'd like to try to work on this today.
,
Jul 13 2016
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?
,
Jul 13 2016
I do still have mass timeouts and that CL fixes it.
,
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
,
Jul 15 2016
,
Dec 15 2017
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.
,
Dec 15 2017
Perhaps we can create a symbolic link from the dummy home .cache to the real home/.cache. Will try.
,
Dec 15 2017
c#11 or maybe just copy $HOME/.cache/fontconfig in _copy_files_to_dummy_home_dir? |
|||||||
►
Sign in to add a comment |
|||||||
Comment 1 by tansell@chromium.org
, May 18 2016