2011-06-17 Chang Shu <cshu@webkit.org>
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 17 Jun 2011 18:23:24 +0000 (18:23 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 17 Jun 2011 18:23:24 +0000 (18:23 +0000)
        Reviewed by Anders Carlsson.

        [Qt] [WK2] Debug info leaks to stdout from plugins in Qt WebKit2 layout tests
        https://bugs.webkit.org/show_bug.cgi?id=61940

        Unskip passed tests.

        * platform/qt-wk2/Skipped:
2011-06-17  Chang Shu  <cshu@webkit.org>

        Reviewed by Anders Carlsson.

        [Qt] [WK2] Debug info leaks to stdout from plugins in Qt WebKit2 layout tests
        https://bugs.webkit.org/show_bug.cgi?id=61940

        Tempararily supress stdout during getPluginInfo during which debug info was leaked out.

        * Shared/Plugins/Netscape/x11/NetscapePluginModuleX11.cpp:
        (WebKit::StdoutRedirect::StdoutRedirect):
        (WebKit::StdoutRedirect::~StdoutRedirect):
        (WebKit::NetscapePluginModule::getPluginInfo):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@89150 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/ChangeLog
LayoutTests/platform/qt-wk2/Skipped
Source/WebKit2/ChangeLog
Source/WebKit2/Shared/Plugins/Netscape/x11/NetscapePluginModuleX11.cpp

index 749f612..27fc966 100644 (file)
@@ -1,3 +1,14 @@
+2011-06-17  Chang Shu  <cshu@webkit.org>
+
+        Reviewed by Anders Carlsson.
+
+        [Qt] [WK2] Debug info leaks to stdout from plugins in Qt WebKit2 layout tests
+        https://bugs.webkit.org/show_bug.cgi?id=61940
+
+        Unskip passed tests.
+
+        * platform/qt-wk2/Skipped:
+
 2011-06-17  Annie Sullivan  <sullivan@chromium.org>
 
         Reviewed by Ryosuke Niwa.
index 7aecdbe..7bb94c6 100644 (file)
@@ -2204,248 +2204,6 @@ http/tests/media/video-buffered.html
 
 # These tests always fail (with and without --singly). It needs investigation.
 animations/animation-controller-drt-api.html
-dom/xhtml/level2/html/HTMLDocument17.xhtml
-dom/xhtml/level2/html/HTMLDocument18.xhtml
-dom/xhtml/level2/html/HTMLDocument19.xhtml
-dom/xhtml/level2/html/HTMLDocument20.xhtml
-dom/xhtml/level2/html/HTMLDocument21.xhtml
-dom/xhtml/level3/core/attrisid02.xhtml
-dom/xhtml/level3/core/attrisid03.xhtml
-dom/xhtml/level3/core/attrisid07.xhtml
-dom/xhtml/level3/core/canonicalform01.xhtml
-dom/xhtml/level3/core/canonicalform02.xhtml
-dom/xhtml/level3/core/canonicalform03.xhtml
-dom/xhtml/level3/core/canonicalform04.xhtml
-dom/xhtml/level3/core/canonicalform05.xhtml
-dom/xhtml/level3/core/canonicalform07.xhtml
-dom/xhtml/level3/core/canonicalform10.xhtml
-dom/xhtml/level3/core/canonicalform11.xhtml
-dom/xhtml/level3/core/canonicalform12.xhtml
-dom/xhtml/level3/core/cdatasections01.xhtml
-dom/xhtml/level3/core/checkcharacternormalization01.xhtml
-dom/xhtml/level3/core/checkcharacternormalization02.xhtml
-dom/xhtml/level3/core/checkcharacternormalization03.xhtml
-dom/xhtml/level3/core/comments01.xhtml
-dom/xhtml/level3/core/datatypenormalization13.xhtml
-dom/xhtml/level3/core/datatypenormalization14.xhtml
-dom/xhtml/level3/core/datatypenormalization15.xhtml
-dom/xhtml/level3/core/datatypenormalization16.xhtml
-dom/xhtml/level3/core/datatypenormalization17.xhtml
-dom/xhtml/level3/core/datatypenormalization18.xhtml
-dom/xhtml/level3/core/documentadoptnode17.xhtml
-dom/xhtml/level3/core/documentadoptnode18.xhtml
-dom/xhtml/level3/core/documentadoptnode19.xhtml
-dom/xhtml/level3/core/documentadoptnode20.xhtml
-dom/xhtml/level3/core/documentgetinputencoding04.xhtml
-dom/xhtml/level3/core/documentgetxmlencoding05.xhtml
-dom/xhtml/level3/core/documentnormalizedocument01.xhtml
-dom/xhtml/level3/core/documentnormalizedocument02.xhtml
-dom/xhtml/level3/core/documentnormalizedocument03.xhtml
-dom/xhtml/level3/core/documentnormalizedocument04.xhtml
-dom/xhtml/level3/core/documentnormalizedocument05.xhtml
-dom/xhtml/level3/core/documentnormalizedocument07.xhtml
-dom/xhtml/level3/core/documentnormalizedocument08.xhtml
-dom/xhtml/level3/core/documentnormalizedocument09.xhtml
-dom/xhtml/level3/core/documentnormalizedocument13.xhtml
-dom/xhtml/level3/core/documentrenamenode01.xhtml
-dom/xhtml/level3/core/documentrenamenode02.xhtml
-dom/xhtml/level3/core/documentrenamenode03.xhtml
-dom/xhtml/level3/core/documentrenamenode04.xhtml
-dom/xhtml/level3/core/documentrenamenode05.xhtml
-dom/xhtml/level3/core/documentrenamenode06.xhtml
-dom/xhtml/level3/core/documentrenamenode07.xhtml
-dom/xhtml/level3/core/documentrenamenode09.xhtml
-dom/xhtml/level3/core/documentrenamenode15.xhtml
-dom/xhtml/level3/core/documentrenamenode16.xhtml
-dom/xhtml/level3/core/documentrenamenode17.xhtml
-dom/xhtml/level3/core/documentrenamenode28.xhtml
-dom/xhtml/level3/core/domconfigcanonicalform1.xhtml
-dom/xhtml/level3/core/domconfigcdatasections1.xhtml
-dom/xhtml/level3/core/domconfigcheckcharacternormalization1.xhtml
-dom/xhtml/level3/core/domconfigcomments1.xhtml
-dom/xhtml/level3/core/domconfigdatatypenormalization1.xhtml
-dom/xhtml/level3/core/domconfigdatatypenormalization2.xhtml
-dom/xhtml/level3/core/domconfigelementcontentwhitespace1.xhtml
-dom/xhtml/level3/core/domconfigentities1.xhtml
-dom/xhtml/level3/core/domconfigerrorhandler1.xhtml
-dom/xhtml/level3/core/domconfigerrorhandler2.xhtml
-dom/xhtml/level3/core/domconfiginfoset1.xhtml
-dom/xhtml/level3/core/domconfignamespacedeclarations1.xhtml
-dom/xhtml/level3/core/domconfignamespaces1.xhtml
-dom/xhtml/level3/core/domconfignamespaces2.xhtml
-dom/xhtml/level3/core/domconfignormalizecharacters1.xhtml
-dom/xhtml/level3/core/domconfigschemalocation1.xhtml
-dom/xhtml/level3/core/domconfigschematype1.xhtml
-dom/xhtml/level3/core/domconfigsplitcdatasections1.xhtml
-dom/xhtml/level3/core/domconfigurationcansetparameter01.xhtml
-dom/xhtml/level3/core/domconfigurationcansetparameter02.xhtml
-dom/xhtml/level3/core/domconfigurationcansetparameter03.xhtml
-dom/xhtml/level3/core/domconfigurationcansetparameter06.xhtml
-dom/xhtml/level3/core/domconfigurationgetparameter01.xhtml
-dom/xhtml/level3/core/domconfigvalidate1.xhtml
-dom/xhtml/level3/core/domconfigvalidateifschema1.xhtml
-dom/xhtml/level3/core/domconfigwellformed1.xhtml
-dom/xhtml/level3/core/domimplementationgetfeature01.xhtml
-dom/xhtml/level3/core/domimplementationgetfeature02.xhtml
-dom/xhtml/level3/core/domimplementationgetfeature03.xhtml
-dom/xhtml/level3/core/domimplementationgetfeature05.xhtml
-dom/xhtml/level3/core/domimplementationgetfeature06.xhtml
-dom/xhtml/level3/core/domimplementationregistry01.xhtml
-dom/xhtml/level3/core/domimplementationregistry02.xhtml
-dom/xhtml/level3/core/domimplementationregistry03.xhtml
-dom/xhtml/level3/core/domimplementationregistry04.xhtml
-dom/xhtml/level3/core/domimplementationregistry05.xhtml
-dom/xhtml/level3/core/domimplementationregistry06.xhtml
-dom/xhtml/level3/core/domimplementationregistry07.xhtml
-dom/xhtml/level3/core/domimplementationregistry08.xhtml
-dom/xhtml/level3/core/domimplementationregistry09.xhtml
-dom/xhtml/level3/core/domimplementationregistry10.xhtml
-dom/xhtml/level3/core/domimplementationregistry11.xhtml
-dom/xhtml/level3/core/domimplementationregistry13.xhtml
-dom/xhtml/level3/core/domimplementationregistry14.xhtml
-dom/xhtml/level3/core/domimplementationregistry15.xhtml
-dom/xhtml/level3/core/domimplementationregistry16.xhtml
-dom/xhtml/level3/core/domimplementationregistry17.xhtml
-dom/xhtml/level3/core/domimplementationregistry18.xhtml
-dom/xhtml/level3/core/domimplementationregistry19.xhtml
-dom/xhtml/level3/core/domimplementationregistry20.xhtml
-dom/xhtml/level3/core/domimplementationregistry21.xhtml
-dom/xhtml/level3/core/domimplementationregistry22.xhtml
-dom/xhtml/level3/core/domimplementationregistry24.xhtml
-dom/xhtml/level3/core/domimplementationregistry25.xhtml
-dom/xhtml/level3/core/domstringlistcontains01.xhtml
-dom/xhtml/level3/core/domstringlistcontains02.xhtml
-dom/xhtml/level3/core/domstringlistgetlength01.xhtml
-dom/xhtml/level3/core/domstringlistitem01.xhtml
-dom/xhtml/level3/core/domstringlistitem02.xhtml
-dom/xhtml/level3/core/elementcontentwhitespace01.xhtml
-dom/xhtml/level3/core/elementcontentwhitespace02.xhtml
-dom/xhtml/level3/core/elementcontentwhitespace03.xhtml
-dom/xhtml/level3/core/elementsetidattribute01.xhtml
-dom/xhtml/level3/core/elementsetidattribute03.xhtml
-dom/xhtml/level3/core/elementsetidattribute04.xhtml
-dom/xhtml/level3/core/elementsetidattribute07.xhtml
-dom/xhtml/level3/core/elementsetidattribute08.xhtml
-dom/xhtml/level3/core/elementsetidattribute09.xhtml
-dom/xhtml/level3/core/elementsetidattribute10.xhtml
-dom/xhtml/level3/core/elementsetidattribute11.xhtml
-dom/xhtml/level3/core/elementsetidattributenode01.xhtml
-dom/xhtml/level3/core/elementsetidattributenode02.xhtml
-dom/xhtml/level3/core/elementsetidattributenode03.xhtml
-dom/xhtml/level3/core/elementsetidattributenode04.xhtml
-dom/xhtml/level3/core/elementsetidattributenode07.xhtml
-dom/xhtml/level3/core/elementsetidattributenode08.xhtml
-dom/xhtml/level3/core/elementsetidattributenode10.xhtml
-dom/xhtml/level3/core/elementsetidattributens01.xhtml
-dom/xhtml/level3/core/elementsetidattributens02.xhtml
-dom/xhtml/level3/core/elementsetidattributens03.xhtml
-dom/xhtml/level3/core/elementsetidattributens04.xhtml
-dom/xhtml/level3/core/elementsetidattributens05.xhtml
-dom/xhtml/level3/core/elementsetidattributens10.xhtml
-dom/xhtml/level3/core/elementsetidattributens11.xhtml
-dom/xhtml/level3/core/elementsetidattributens12.xhtml
-dom/xhtml/level3/core/elementsetidattributens13.xhtml
-dom/xhtml/level3/core/elementsetidattributens14.xhtml
-dom/xhtml/level3/core/entities01.xhtml
-dom/xhtml/level3/core/entities02.xhtml
-dom/xhtml/level3/core/entities03.xhtml
-dom/xhtml/level3/core/entities04.xhtml
-dom/xhtml/level3/core/entitygetinputencoding01.xhtml
-dom/xhtml/level3/core/entitygetxmlencoding01.xhtml
-dom/xhtml/level3/core/entitygetxmlencoding02.xhtml
-dom/xhtml/level3/core/entitygetxmlversion01.xhtml
-dom/xhtml/level3/core/handleerror01.xhtml
-dom/xhtml/level3/core/handleerror02.xhtml
-dom/xhtml/level3/core/infoset01.xhtml
-dom/xhtml/level3/core/infoset02.xhtml
-dom/xhtml/level3/core/infoset03.xhtml
-dom/xhtml/level3/core/infoset04.xhtml
-dom/xhtml/level3/core/infoset05.xhtml
-dom/xhtml/level3/core/infoset08.xhtml
-dom/xhtml/level3/core/infoset09.xhtml
-dom/xhtml/level3/core/namespacedeclarations01.xhtml
-dom/xhtml/level3/core/namespacedeclarations02.xhtml
-dom/xhtml/level3/core/nodecomparedocumentposition03.xhtml
-dom/xhtml/level3/core/nodecomparedocumentposition05.xhtml
-dom/xhtml/level3/core/nodecomparedocumentposition16.xhtml
-dom/xhtml/level3/core/nodecomparedocumentposition22.xhtml
-dom/xhtml/level3/core/nodecomparedocumentposition23.xhtml
-dom/xhtml/level3/core/nodecomparedocumentposition24.xhtml
-dom/xhtml/level3/core/nodecomparedocumentposition33.xhtml
-dom/xhtml/level3/core/nodegetbaseuri12.xhtml
-dom/xhtml/level3/core/nodegetbaseuri13.xhtml
-dom/xhtml/level3/core/nodegetbaseuri14.xhtml
-dom/xhtml/level3/core/nodegetfeature01.xhtml
-dom/xhtml/level3/core/nodegetfeature02.xhtml
-dom/xhtml/level3/core/nodegetfeature03.xhtml
-dom/xhtml/level3/core/nodegetfeature04.xhtml
-dom/xhtml/level3/core/nodegetfeature05.xhtml
-dom/xhtml/level3/core/nodegetfeature06.xhtml
-dom/xhtml/level3/core/nodegetfeature07.xhtml
-dom/xhtml/level3/core/nodegetfeature08.xhtml
-dom/xhtml/level3/core/nodegetfeature09.xhtml
-dom/xhtml/level3/core/nodegetfeature10.xhtml
-dom/xhtml/level3/core/nodegetfeature11.xhtml
-dom/xhtml/level3/core/nodegetfeature12.xhtml
-dom/xhtml/level3/core/nodegetfeature13.xhtml
-dom/xhtml/level3/core/nodegettextcontent05.xhtml
-dom/xhtml/level3/core/nodegettextcontent15.xhtml
-dom/xhtml/level3/core/nodegettextcontent16.xhtml
-dom/xhtml/level3/core/nodegettextcontent18.xhtml
-dom/xhtml/level3/core/nodegetuserdata01.xhtml
-dom/xhtml/level3/core/nodegetuserdata02.xhtml
-dom/xhtml/level3/core/nodegetuserdata03.xhtml
-dom/xhtml/level3/core/nodegetuserdata04.xhtml
-dom/xhtml/level3/core/nodegetuserdata05.xhtml
-dom/xhtml/level3/core/nodegetuserdata06.xhtml
-dom/xhtml/level3/core/nodegetuserdata07.xhtml
-dom/xhtml/level3/core/nodeisdefaultnamespace04.xhtml
-dom/xhtml/level3/core/nodeisequalnode25.xhtml
-dom/xhtml/level3/core/nodeisequalnode26.xhtml
-dom/xhtml/level3/core/nodeisequalnode27.xhtml
-dom/xhtml/level3/core/nodeissamenode07.xhtml
-dom/xhtml/level3/core/nodeissamenode08.xhtml
-dom/xhtml/level3/core/nodeissamenode09.xhtml
-dom/xhtml/level3/core/nodelookupnamespaceuri04.xhtml
-dom/xhtml/level3/core/nodelookupprefix04.xhtml
-dom/xhtml/level3/core/nodelookupprefix12.xhtml
-dom/xhtml/level3/core/noderemovechild07.xhtml
-dom/xhtml/level3/core/noderemovechild24.xhtml
-dom/xhtml/level3/core/noderemovechild25.xhtml
-dom/xhtml/level3/core/noderemovechild26.xhtml
-dom/xhtml/level3/core/noderemovechild27.xhtml
-dom/xhtml/level3/core/nodereplacechild10.xhtml
-dom/xhtml/level3/core/nodereplacechild21.xhtml
-dom/xhtml/level3/core/nodereplacechild25.xhtml
-dom/xhtml/level3/core/nodereplacechild38.xhtml
-dom/xhtml/level3/core/nodesettextcontent04.xhtml
-dom/xhtml/level3/core/nodesettextcontent13.xhtml
-dom/xhtml/level3/core/nodesetuserdata01.xhtml
-dom/xhtml/level3/core/nodesetuserdata02.xhtml
-dom/xhtml/level3/core/nodesetuserdata03.xhtml
-dom/xhtml/level3/core/nodesetuserdata04.xhtml
-dom/xhtml/level3/core/nodesetuserdata05.xhtml
-dom/xhtml/level3/core/nodesetuserdata06.xhtml
-dom/xhtml/level3/core/nodesetuserdata07.xhtml
-dom/xhtml/level3/core/nodesetuserdata08.xhtml
-dom/xhtml/level3/core/nodesetuserdata09.xhtml
-dom/xhtml/level3/core/nodesetuserdata10.xhtml
-dom/xhtml/level3/core/normalizecharacters01.xhtml
-dom/xhtml/level3/core/normalizecharacters02.xhtml
-dom/xhtml/level3/core/normalizecharacters03.xhtml
-dom/xhtml/level3/core/normalizecharacters04.xhtml
-dom/xhtml/level3/core/normalizecharacters05.xhtml
-dom/xhtml/level3/core/normalizecharacters06.xhtml
-dom/xhtml/level3/core/normalizecharacters07.xhtml
-dom/xhtml/level3/core/normalizecharacters08.xhtml
-dom/xhtml/level3/core/splitcdatasections01.xhtml
-dom/xhtml/level3/core/textiselementcontentwhitespace04.xhtml
-dom/xhtml/level3/core/textiselementcontentwhitespace05.xhtml
-dom/xhtml/level3/core/textiselementcontentwhitespace06.xhtml
-dom/xhtml/level3/core/userdatahandler01.xhtml
-dom/xhtml/level3/core/userdatahandler02.xhtml
-dom/xhtml/level3/core/userdatahandler03.xhtml
-dom/xhtml/level3/core/userdatahandler04.xhtml
 editing/execCommand/format-block-multiple-paragraphs-in-pre.html
 editing/execCommand/indent-pre.html
 editing/inserting/insert-br-quoted-007.html
index d74764c..880a6ae 100644 (file)
@@ -1,3 +1,17 @@
+2011-06-17  Chang Shu  <cshu@webkit.org>
+
+        Reviewed by Anders Carlsson.
+
+        [Qt] [WK2] Debug info leaks to stdout from plugins in Qt WebKit2 layout tests
+        https://bugs.webkit.org/show_bug.cgi?id=61940
+
+        Tempararily supress stdout during getPluginInfo during which debug info was leaked out.
+
+        * Shared/Plugins/Netscape/x11/NetscapePluginModuleX11.cpp:
+        (WebKit::StdoutRedirect::StdoutRedirect):
+        (WebKit::StdoutRedirect::~StdoutRedirect):
+        (WebKit::NetscapePluginModule::getPluginInfo):
+
 2011-06-17  Anders Carlsson  <andersca@apple.com>
 
         Reviewed by Andreas Kling.
index 3eff1f8..458e17b 100644 (file)
 #include <QLibrary>
 #endif
 
+#include <fcntl.h>
+#include <sys/stat.h>
+#include <sys/types.h>
+#include <unistd.h>
+
 using namespace WebCore;
 
 namespace WebKit {
 
+class StdoutDevNullRedirector {
+public:
+    StdoutDevNullRedirector();
+    ~StdoutDevNullRedirector();
+
+private:
+    int m_savedStdout;
+};
+
+StdoutDevNullRedirector::StdoutDevNullRedirector()
+    : m_savedStdout(-1)
+{
+    int newStdout = open("/dev/null", O_WRONLY);
+    if (newStdout == -1)
+        return;
+    m_savedStdout = dup(STDOUT_FILENO);
+    dup2(newStdout, STDOUT_FILENO);
+}
+
+StdoutDevNullRedirector::~StdoutDevNullRedirector()
+{
+    if (m_savedStdout != -1)
+        dup2(m_savedStdout, STDOUT_FILENO);
+}
+
 #if PLATFORM(QT)
 static void initializeGTK()
 {
@@ -65,6 +95,10 @@ void NetscapePluginModule::applyX11QuirksBeforeLoad()
 
 bool NetscapePluginModule::getPluginInfo(const String& pluginPath, PluginModuleInfo& plugin)
 {
+    // Tempararily suppress stdout in this function as plugins will be loaded and shutdown and debug info
+    // is leaked to layout test output.
+    StdoutDevNullRedirector stdoutDevNullRedirector;
+
     // We are loading the plugin here since it does not seem to be a standardized way to
     // get the needed informations from a UNIX plugin without loading it.