Bug 99463 - [Qt] OpenGL rendering is not possible on bots using Xvfb
Summary: [Qt] OpenGL rendering is not possible on bots using Xvfb
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Balazs Kelemen
URL:
Keywords:
Depends on: 95992 98654
Blocks: 94800
  Show dependency treegraph
 
Reported: 2012-10-16 07:38 PDT by Balazs Kelemen
Modified: 2012-10-18 08:16 PDT (History)
6 users (show)

See Also:


Attachments
Patch (8.86 KB, patch)
2012-10-16 08:23 PDT, Balazs Kelemen
no flags Details | Formatted Diff | Diff
Patch (6.59 KB, patch)
2012-10-17 07:00 PDT, Balazs Kelemen
no flags Details | Formatted Diff | Diff
Patch (6.50 KB, patch)
2012-10-17 08:19 PDT, Balazs Kelemen
no flags Details | Formatted Diff | Diff
Patch (6.50 KB, patch)
2012-10-17 08:22 PDT, Balazs Kelemen
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Balazs Kelemen 2012-10-16 07:38:17 PDT
We need a workaround to be able to land the patches for pixel testing without breaking testing bots that run tests in xvfb-run. Painting seems to be extremely slow with Xvfb.
Comment 1 Balazs Kelemen 2012-10-16 08:16:17 PDT
At first glance it fixes the slowdown in xvfb-run. I tested it in the bot environment (but not ran all the tests yet).
Comment 2 Balazs Kelemen 2012-10-16 08:19:29 PDT
So the plan is to 1. get an r+, 2. ask Ossy to set env var for every bot, 3. land the two pixel test and this in one.
Comment 3 Balazs Kelemen 2012-10-16 08:23:07 PDT
Created attachment 168952 [details]
Patch
Comment 4 Balazs Kelemen 2012-10-16 08:39:34 PDT
Test session finished in 21.5 minutes with this for me on the bot machine.
Comment 5 Balazs Kelemen 2012-10-16 08:51:02 PDT
Of course it won't build on the ews without the dependencies.
Comment 6 Early Warning System Bot 2012-10-16 09:15:52 PDT
Comment on attachment 168952 [details]
Patch

Attachment 168952 [details] did not pass qt-wk2-ews (qt):
Output: http://queues.webkit.org/results/14389201
Comment 7 Jocelyn Turcotte 2012-10-16 09:57:16 PDT
Comment on attachment 168952 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=168952&action=review

> Tools/WebKitTestRunner/qt/PlatformWebViewQt.cpp:73
> +        if (!isRunningWithXvfb()) {

Is there really no way to detect this at runtime? This is like showing a dialog to the user asking if his processor supports 64 bits before launching a 64 bits binary, computers are supposed to be smarter than this.

> Tools/WebKitTestRunner/qt/TestInvocationQt.cpp:69
> +    if (TestController::shared().mainWebView()->supportsSnapshot()) {

I don't understand why you need to define it for every port if you only call it from Qt code.
Comment 8 Balazs Kelemen 2012-10-17 02:13:33 PDT
(In reply to comment #7)
> (From update of attachment 168952 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=168952&action=review
> 
> > Tools/WebKitTestRunner/qt/PlatformWebViewQt.cpp:73
> > +        if (!isRunningWithXvfb()) {
> 
> Is there really no way to detect this at runtime? This is like showing a dialog to the user asking if his processor supports 64 bits before launching a 64 bits binary, computers are supposed to be smarter than this.

I don't see an evident way to detect what X server we are running against, but I will try to find something. Most probably the best I can get up with is to check whether xvfb is running via /proc.

> 
> > Tools/WebKitTestRunner/qt/TestInvocationQt.cpp:69
> > +    if (TestController::shared().mainWebView()->supportsSnapshot()) {
> 
> I don't understand why you need to define it for every port if you only call it from Qt code.

Ok, I will move it behind PLATFORM(QT).
Comment 9 Jocelyn Turcotte 2012-10-17 02:52:56 PDT
(In reply to comment #8)
> I don't see an evident way to detect what X server we are running against, but I will try to find something. Most probably the best I can get up with is to check whether xvfb is running via /proc.

The problem is not xvfb itself but rather that it's slow. So it would be nice to know first why it's slow on xvfb, if it runs in software, etc. There has to be a way to call some Qt/OpenGL function to get caps telling us if it's worth making those snapshot.
Comment 10 Jocelyn Turcotte 2012-10-17 06:44:45 PDT
After discussion on IRC I'm not sure anymore that there would be a reliable way to detect this from within WebKitTestRunner. It turns out that this is caused by the mesa software rasterizer. So the environment variable is probably the best option we have beside adding a new command line option to WebKitTestRunner and run-webkit-test.
Comment 11 Balazs Kelemen 2012-10-17 07:00:21 PDT
Created attachment 169177 [details]
Patch
Comment 12 Balazs Kelemen 2012-10-17 08:19:46 PDT
Created attachment 169188 [details]
Patch
Comment 13 Balazs Kelemen 2012-10-17 08:22:36 PDT
Created attachment 169189 [details]
Patch
Comment 14 Jocelyn Turcotte 2012-10-17 08:56:02 PDT
Comment on attachment 169189 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=169189&action=review

> Tools/ChangeLog:27
> +        of evaulating pixel results if the snapshot is not supported, that is to check

s/evaulating/evaluating/
Comment 15 Balazs Kelemen 2012-10-17 08:58:27 PDT
Comment on attachment 169189 [details]
Patch

Going to land tomorrow when I can watch the bots.
Comment 16 Balazs Kelemen 2012-10-18 08:16:22 PDT
Landed in http://trac.webkit.org/changeset/131727