Bug 199738 - [GTK][WPE] run-webkit-tests should run with a temporal homedir
Summary: [GTK][WPE] run-webkit-tests should run with a temporal homedir
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Carlos Alberto Lopez Perez
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-07-11 17:30 PDT by Carlos Alberto Lopez Perez
Modified: 2019-07-19 02:57 PDT (History)
12 users (show)

See Also:


Attachments
Patch (4.19 KB, patch)
2019-07-17 10:06 PDT, Carlos Alberto Lopez Perez
no flags Details | Formatted Diff | Diff
Patch (4.19 KB, patch)
2019-07-17 18:09 PDT, Carlos Alberto Lopez Perez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Carlos Alberto Lopez Perez 2019-07-11 17:30:17 PDT
On https://bugs.webkit.org/show_bug.cgi?id=169916#c7 I discovered some tests give different visual output depending if you run the tests with on an empty $HOME or not.

I guess this is related to some configuration of some library.

In order to make the output of the tests more predictable I think run-webkit-tests should run with a temporal new homedir.
Comment 1 Adrian Perez 2019-07-12 01:19:13 PDT
(In reply to Carlos Alberto Lopez Perez from comment #0)
> On https://bugs.webkit.org/show_bug.cgi?id=169916#c7 I discovered some tests
> give different visual output depending if you run the tests with on an empty
> $HOME or not.
>
> I guess this is related to some configuration of some library.

Ouch. It could be something like some configuration being present
(or not) in $HOME for the hinting and/or subpixel rendering settings
for fonts, for example.
 
> In order to make the output of the tests more predictable I think
> run-webkit-tests should run with a temporal new homedir.

Yes, or even have a separate home directory for each test case
being run. Or point $HOME to an empty, non-writable directory (not
sure if that would work). We may want to also set $XDG_CONFIG_HOME,
$XDG_CACHE_DIR, and so on.
Comment 2 Carlos Alberto Lopez Perez 2019-07-17 09:53:42 PDT
(In reply to Adrian Perez from comment #1)
> (In reply to Carlos Alberto Lopez Perez from comment #0)
> > On https://bugs.webkit.org/show_bug.cgi?id=169916#c7 I discovered some tests
> > give different visual output depending if you run the tests with on an empty
> > $HOME or not.
> >
> > I guess this is related to some configuration of some library.
> 
> Ouch. It could be something like some configuration being present
> (or not) in $HOME for the hinting and/or subpixel rendering settings
> for fonts, for example.
>  
> > In order to make the output of the tests more predictable I think
> > run-webkit-tests should run with a temporal new homedir.
> 
> Yes, or even have a separate home directory for each test case
> being run. 

I will try to use a separate home directory per worker.

> Or point $HOME to an empty, non-writable directory (not
> sure if that would work). We may want to also set $XDG_CONFIG_HOME,
> $XDG_CACHE_DIR, and so on.

XDG_CONFIG_HOME and XDG_CACHE_DIR are filtered out from the user environment by the webkitpy driver for tests.
So I think is enough with just setting $HOME because the value of this two variables default to $HOME/.confing and $HOME/.cache
Comment 3 Carlos Alberto Lopez Perez 2019-07-17 10:06:26 PDT
Created attachment 374302 [details]
Patch
Comment 4 Carlos Alberto Lopez Perez 2019-07-17 10:09:19 PDT
Comment on attachment 374302 [details]
Patch

Ok. Not ready for review still due to revert of r247512
Comment 5 Adrian Perez 2019-07-17 12:35:51 PDT
(In reply to Carlos Alberto Lopez Perez from comment #2)
> (In reply to Adrian Perez from comment #1)
> > (In reply to Carlos Alberto Lopez Perez from comment #0)
> > > On https://bugs.webkit.org/show_bug.cgi?id=169916#c7 I discovered some tests
> > > give different visual output depending if you run the tests with on an empty
> > > $HOME or not.
> > >
> > > I guess this is related to some configuration of some library.
> > 
> > Ouch. It could be something like some configuration being present
> > (or not) in $HOME for the hinting and/or subpixel rendering settings
> > for fonts, for example.
> >  
> > > In order to make the output of the tests more predictable I think
> > > run-webkit-tests should run with a temporal new homedir.
> > 
> > Yes, or even have a separate home directory for each test case
> > being run. 
> 
> I will try to use a separate home directory per worker.

Wonderful, thanks.

> > Or point $HOME to an empty, non-writable directory (not
> > sure if that would work). We may want to also set $XDG_CONFIG_HOME,
> > $XDG_CACHE_DIR, and so on.
> 
> XDG_CONFIG_HOME and XDG_CACHE_DIR are filtered out from the user environment
> by the webkitpy driver for tests.
> So I think is enough with just setting $HOME because the value of this two
> variables default to $HOME/.confing and $HOME/.cache

Good point, I had forgotten about the env var filter. Setting $HOME will do.
Comment 6 Carlos Alberto Lopez Perez 2019-07-17 18:09:13 PDT
Created attachment 374359 [details]
Patch
Comment 7 Carlos Alberto Lopez Perez 2019-07-19 02:56:50 PDT
Comment on attachment 374359 [details]
Patch

Clearing flags on attachment: 374359

Committed r247642: <https://trac.webkit.org/changeset/247642>
Comment 8 Carlos Alberto Lopez Perez 2019-07-19 02:56:58 PDT
All reviewed patches have been landed.  Closing bug.