When I first started looking at the interactive ui tests, I noticed
that they were extremely flaky. After much debugging I discovered
that my window manager would move the window around and this would
interfere with the ability of the test to find a window's size and
position, and correctly deliver a click into that window at the
correct point on the screen.
There are no visible warnings that the tests need to be run in an
isolated x server and window manager to get deterministic behavior.
oshima@ was the first to suggest to me that the tests actually NEED to
be run this way and are invalid if run outside that context.
I'd put up some instructions, but I'm not sure of the best way to set
up for a manual session. I was thinking something like this:
Session setup:
Xvfb :6.0 & DISPLAY=:6.0 icewm &
Running a test in that session:
DISPLAY=:6.0 out/Debug/interactive_ui_tests
--gtest_filter=MyTestClassName.MyTestMethodName
But petermayo@ suggested that I should use:
xterm -e '~/bin/Xvfb :6.0 & DISPLAY=:6.0 icewm'
And to peek at the display I should use use:
xwd -display :6.0 -root | xwud
Can anyone else comment on what the best instructions are for setting
up xvfb and icewm? And whether it's really actually necessary at all?
I wasn't aware of this. It seems there are two reasonable approaches
to fixing it:
1) constraining the environment further, as you suggest below
2) fixing the tests to not be sensitive to this
Can you estimate how hard the latter is? In general relying on being
able to position the window directly is something that can fail on
Linux (as these tests are showing) so in some sense the testing
infrastructure is failing for the correct reason. (It depends on
whether we care about asserting that we control positioning
perfectly.)
> There are no visible warnings that the tests need to be run in an
> isolated x server and window manager to get deterministic behavior.
> oshima@ was the first to suggest to me that the tests actually NEED to
> be run this way and are invalid if run outside that context.
oshima should have updated the test running instructions!
(I personally haven't run interactive_ui_tests locally since... well,
as far back as I can remember.)
> I'd put up some instructions, but I'm not sure of the best way to set
> up for a manual session. I was thinking something like this:
>
> Session setup:
> Xvfb :6.0 & DISPLAY=:6.0 icewm &
>
> Running a test in that session:
> DISPLAY=:6.0 out/Debug/interactive_ui_tests
> --gtest_filter=MyTestClassName.MyTestMethodName
>
> But petermayo@ suggested that I should use:
> xterm -e '~/bin/Xvfb :6.0 & DISPLAY=:6.0 icewm'
>
> And to peek at the display I should use use:
> xwd -display :6.0 -root | xwud
>
> Can anyone else comment on what the best instructions are for setting
> up xvfb and icewm?
If you do go down this route, the instructions you pasted above are
roughly the same commands.
I think it'd be better to use Xephyr though, because that will allow
you to see the test output (while still keeping it in a controlled
environment).
See the discussion under "Running tests" on the debugging page:
http://code.google.com/p/chromium/wiki/LinuxDebugging#Running_Tests
It links to more info about Xephyr, including the steps to set it up.
(...now that we use DumpRenderTree, I guess we should move the Xephyr
notes off of the layout tests page as it's no longer relevant to
layout tests in particualr.)
On Fri, May 20, 2011 at 6:25 AM, Chad Faragher <wy...@chromium.org> wrote:I wasn't aware of this. It seems there are two reasonable approaches
> I think that the testing and infrastructure page
> (http://www.chromium.org/developers/testing) needs a note that, on
> Linux, the interactive ui tests need to be run using xvfb and icewm.
>
> When I first started looking at the interactive ui tests, I noticed
> that they were extremely flaky. After much debugging I discovered
> that my window manager would move the window around and this would
> interfere with the ability of the test to find a window's size and
> position, and correctly deliver a click into that window at the
> correct point on the screen.
to fixing it:
1) constraining the environment further, as you suggest below
2) fixing the tests to not be sensitive to this
Can you estimate how hard the latter is? In general relying on being
able to position the window directly is something that can fail on
Linux (as these tests are showing) so in some sense the testing
infrastructure is failing for the correct reason. (It depends on
whether we care about asserting that we control positioning
perfectly.)
> There are no visible warnings that the tests need to be run in an
> isolated x server and window manager to get deterministic behavior.
> oshima@ was the first to suggest to me that the tests actually NEED to
> be run this way and are invalid if run outside that context.
On Fri, May 20, 2011 at 6:25 AM, Chad Faragher <wy...@chromium.org> wrote:
...
If you do go down this route, the instructions you pasted above are
> I'd put up some instructions, but I'm not sure of the best way to set
> up for a manual session. I was thinking something like this:
>
> Session setup:
> Xvfb :6.0 & DISPLAY=:6.0 icewm &
>
> Running a test in that session:
> DISPLAY=:6.0 out/Debug/interactive_ui_tests
> --gtest_filter=MyTestClassName.MyTestMethodName
>
> But petermayo@ suggested that I should use:
> xterm -e '~/bin/Xvfb :6.0 & DISPLAY=:6.0 icewm'
>
> And to peek at the display I should use use:
> xwd -display :6.0 -root | xwud
>
> Can anyone else comment on what the best instructions are for setting
> up xvfb and icewm?
roughly the same commands.
I think it'd be better to use Xephyr though, because that will allow
you to see the test output (while still keeping it in a controlled
environment).
See the discussion under "Running tests" on the debugging page:
http://code.google.com/p/chromium/wiki/LinuxDebugging#Running_Tests
It links to more info about Xephyr, including the steps to set it up.
(...now that we use DumpRenderTree, I guess we should move the Xephyr
notes off of the layout tests page as it's no longer relevant to
layout tests in particualr.)