Title: [132350] trunk
Revision
132350
Author
[email protected]
Date
2012-10-24 07:33:47 -0700 (Wed, 24 Oct 2012)

Log Message

[EFL] run-webkit-tests writes garbage on stderr when running on Xvfb
https://bugs.webkit.org/show_bug.cgi?id=100243

Patch by Thiago Marcos P. Santos <[email protected]> on 2012-10-24
Reviewed by Kenneth Rohde Christiansen.

.:

Search for X11 development libraries (and thus Xext), necessary to
disable the X extensions error reporting.

* Source/cmake/OptionsEfl.cmake:

Source/WebKit2:

These errors generate noise on the reports and in some cases, like when
running perf tests, makes the test fail. By using Xext, we can add a
dummy handler to ignore these errors.

* PlatformEfl.cmake:
* WebProcess/efl/WebProcessMainEfl.cpp:
(dummyExtensionErrorHandler):
(WebKit::WebProcessMainEfl):

Tools:

These errors generate noise on the reports and in some cases, like when
running perf tests, makes the test fail. By using Xext, we can add a
dummy handler to ignore these errors.

We could have added this handler on the top level EWK API, but that
would be intrusive and could override handlers defined by the user.

* WebKitTestRunner/PlatformEfl.cmake:
* WebKitTestRunner/efl/main.cpp:
(dummyExtensionErrorHandler):
(main):

Modified Paths

Diff

Modified: trunk/ChangeLog (132349 => 132350)


--- trunk/ChangeLog	2012-10-24 14:24:43 UTC (rev 132349)
+++ trunk/ChangeLog	2012-10-24 14:33:47 UTC (rev 132350)
@@ -1,3 +1,15 @@
+2012-10-24  Thiago Marcos P. Santos  <[email protected]>
+
+        [EFL] run-webkit-tests writes garbage on stderr when running on Xvfb
+        https://bugs.webkit.org/show_bug.cgi?id=100243
+
+        Reviewed by Kenneth Rohde Christiansen.
+
+        Search for X11 development libraries (and thus Xext), necessary to
+        disable the X extensions error reporting.
+
+        * Source/cmake/OptionsEfl.cmake:
+
 2012-10-24  Mario Sanchez Prada  <[email protected]>
 
         [WK2] [GTK] TestWebKitAccessibility is not being run

Modified: trunk/Source/WebKit2/ChangeLog (132349 => 132350)


--- trunk/Source/WebKit2/ChangeLog	2012-10-24 14:24:43 UTC (rev 132349)
+++ trunk/Source/WebKit2/ChangeLog	2012-10-24 14:33:47 UTC (rev 132350)
@@ -1,3 +1,19 @@
+2012-10-24  Thiago Marcos P. Santos  <[email protected]>
+
+        [EFL] run-webkit-tests writes garbage on stderr when running on Xvfb
+        https://bugs.webkit.org/show_bug.cgi?id=100243
+
+        Reviewed by Kenneth Rohde Christiansen.
+
+        These errors generate noise on the reports and in some cases, like when
+        running perf tests, makes the test fail. By using Xext, we can add a
+        dummy handler to ignore these errors.
+
+        * PlatformEfl.cmake:
+        * WebProcess/efl/WebProcessMainEfl.cpp:
+        (dummyExtensionErrorHandler):
+        (WebKit::WebProcessMainEfl):
+
 2012-10-24  Eric Carlson  <[email protected]>
 
         Allow ports to override text track rendering style

Modified: trunk/Source/WebKit2/PlatformEfl.cmake (132349 => 132350)


--- trunk/Source/WebKit2/PlatformEfl.cmake	2012-10-24 14:24:43 UTC (rev 132349)
+++ trunk/Source/WebKit2/PlatformEfl.cmake	2012-10-24 14:33:47 UTC (rev 132350)
@@ -209,7 +209,6 @@
 LIST (APPEND WebProcess_LIBRARIES
     ${CAIRO_LIBRARIES}
     ${ECORE_IMF_LIBRARIES}
-    ${ECORE_X_LIBRARIES}
     ${EDJE_LIBRARIES}
     ${EFLDEPS_LIBRARIES}
     ${EVAS_LIBRARIES}
@@ -219,6 +218,12 @@
     ${SQLITE_LIBRARIES}
 )
 
+IF (ENABLE_ECORE_X)
+    LIST(APPEND WebProcess_LIBRARIES
+        ${ECORE_X_LIBRARIES}
+        ${X11_Xext_LIB})
+ENDIF ()
+
 ADD_CUSTOM_TARGET(forwarding-headerEfl
     COMMAND ${PERL_EXECUTABLE} ${WEBKIT2_DIR}/Scripts/generate-forwarding-headers.pl ${WEBKIT2_DIR} ${DERIVED_SOURCES_WEBKIT2_DIR}/include efl
 )

Modified: trunk/Source/WebKit2/WebProcess/efl/WebProcessMainEfl.cpp (132349 => 132350)


--- trunk/Source/WebKit2/WebProcess/efl/WebProcessMainEfl.cpp	2012-10-24 14:24:43 UTC (rev 132349)
+++ trunk/Source/WebKit2/WebProcess/efl/WebProcessMainEfl.cpp	2012-10-24 14:33:47 UTC (rev 132350)
@@ -43,6 +43,13 @@
 
 #ifdef HAVE_ECORE_X
 #include <Ecore_X.h>
+#include <X11/Xlib.h>
+#include <X11/extensions/Xext.h>
+
+static int dummyExtensionErrorHandler(Display*, _Xconst char*, _Xconst char*)
+{
+    return 0;
+}
 #endif
 
 #if USE(COORDINATED_GRAPHICS)
@@ -68,6 +75,9 @@
         return 1;
     }
 
+#ifdef HAVE_ECORE_X
+    XSetExtensionErrorHandler(dummyExtensionErrorHandler);
+
     if (!ecore_x_init(0)) {
         // Could not init ecore_x.
         // PlatformScreenEfl and systemBeep() functions
@@ -76,6 +86,7 @@
         eina_shutdown();
         return 1;
     }
+#endif
 
 #if ENABLE(GLIB_SUPPORT)
     g_type_init();

Modified: trunk/Source/cmake/OptionsEfl.cmake (132349 => 132350)


--- trunk/Source/cmake/OptionsEfl.cmake	2012-10-24 14:24:43 UTC (rev 132349)
+++ trunk/Source/cmake/OptionsEfl.cmake	2012-10-24 14:33:47 UTC (rev 132350)
@@ -103,6 +103,11 @@
 
 OPTION(ENABLE_ECORE_X "Enable Ecore_X specific usage (cursor, bell)" ON)
 IF (ENABLE_ECORE_X)
+    # We need Xext.h to disable Xlib error messages  when running WTR on Xvfb.
+    # These errors are dumped on stderr and makes the test driver thinks that
+    # the test case has failed.
+    FIND_PACKAGE(X11 REQUIRED)
+
     LIST(APPEND ECORE_ADDITIONAL_COMPONENTS X)
     ADD_DEFINITIONS(-DHAVE_ECORE_X)
 ENDIF ()

Modified: trunk/Tools/ChangeLog (132349 => 132350)


--- trunk/Tools/ChangeLog	2012-10-24 14:24:43 UTC (rev 132349)
+++ trunk/Tools/ChangeLog	2012-10-24 14:33:47 UTC (rev 132350)
@@ -1,3 +1,22 @@
+2012-10-24  Thiago Marcos P. Santos  <[email protected]>
+
+        [EFL] run-webkit-tests writes garbage on stderr when running on Xvfb
+        https://bugs.webkit.org/show_bug.cgi?id=100243
+
+        Reviewed by Kenneth Rohde Christiansen.
+
+        These errors generate noise on the reports and in some cases, like when
+        running perf tests, makes the test fail. By using Xext, we can add a
+        dummy handler to ignore these errors.
+
+        We could have added this handler on the top level EWK API, but that
+        would be intrusive and could override handlers defined by the user.
+
+        * WebKitTestRunner/PlatformEfl.cmake:
+        * WebKitTestRunner/efl/main.cpp:
+        (dummyExtensionErrorHandler):
+        (main):
+
 2012-10-24  Carlos Garcia Campos  <[email protected]>
 
         Unreviewed. Fix the GTK+ build.

Modified: trunk/Tools/WebKitTestRunner/PlatformEfl.cmake (132349 => 132350)


--- trunk/Tools/WebKitTestRunner/PlatformEfl.cmake	2012-10-24 14:24:43 UTC (rev 132349)
+++ trunk/Tools/WebKitTestRunner/PlatformEfl.cmake	2012-10-24 14:33:47 UTC (rev 132350)
@@ -25,7 +25,6 @@
     ${CAIRO_INCLUDE_DIRS}
     ${ECORE_INCLUDE_DIRS}
     ${ECORE_EVAS_INCLUDE_DIRS}
-    ${ECORE_X_INCLUDE_DIRS}
     ${EINA_INCLUDE_DIRS}
     ${EVAS_INCLUDE_DIRS}
     ${GLIB_INCLUDE_DIRS}
@@ -35,7 +34,6 @@
     ${CAIRO_LIBRARIES}
     ${ECORE_LIBRARIES}
     ${ECORE_EVAS_LIBRARIES}
-    ${ECORE_X_LIBRARIES}
     ${EINA_LIBRARIES}
     ${EVAS_LIBRARIES}
     ${GLIB_LIBRARIES}
@@ -43,6 +41,17 @@
     ${WTF_LIBRARY_NAME}
 )
 
+IF (ENABLE_ECORE_X)
+    LIST(APPEND WebKitTestRunner_INCLUDE_DIRECTORIES
+        ${ECORE_X_INCLUDE_DIRS}
+    )
+
+    LIST(APPEND WebKitTestRunner_LIBRARIES
+        ${ECORE_X_LIBRARIES}
+        ${X11_Xext_LIB}
+    )
+ENDIF ()
+
 LIST(APPEND WebKitTestRunnerInjectedBundle_SOURCES
     ${TOOLS_DIR}/DumpRenderTree/efl/FontManagement.cpp
 

Modified: trunk/Tools/WebKitTestRunner/efl/main.cpp (132349 => 132350)


--- trunk/Tools/WebKitTestRunner/efl/main.cpp	2012-10-24 14:24:43 UTC (rev 132349)
+++ trunk/Tools/WebKitTestRunner/efl/main.cpp	2012-10-24 14:33:47 UTC (rev 132350)
@@ -24,10 +24,24 @@
 #include <wtf/Assertions.h>
 #include <stdlib.h>
 
+#ifdef HAVE_ECORE_X
+#include <X11/Xlib.h>
+#include <X11/extensions/Xext.h>
+
+static int dummyExtensionErrorHandler(Display*, _Xconst char*, _Xconst char*)
+{
+    return 0;
+}
+#endif
+
 int main(int argc, char** argv)
 {
     WTFInstallReportBacktraceOnCrashHook();
 
+#ifdef HAVE_ECORE_X
+    XSetExtensionErrorHandler(dummyExtensionErrorHandler);
+#endif
+
     if (!ewk_init())
         return 1;
 
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to