[webkit-dev] mod_pywebsocket for testing Web Socket implementation

Mark Rowe mrowe at apple.com
Mon Sep 7 22:00:13 PDT 2009


On 2009-09-07, at 21:30, Yuzo Fujishima wrote:

> Hi, Mark,
>
> Thank you for the response.
>
> I've switched to mod_python-based approach because:
> - It should be closer to what real web sites would do.
>   (See a comment by ap@: https://bugs.webkit.org/show_bug.cgi?id=27490#c3 
> )

> - I thought extending httpd is preferred to adding a new thing.
>   (See a comment by eric@: https://bugs.webkit.org/show_bug.cgi?id=27491#c7 
> )
>   Maybe I misunderstood the intention.

Eric's comment seems to be about code duplication in run-webkit-tests  
more than anything.

> - I don't have to worry about SSL (mod_ssl would do it)

> And, I thought there is a way to install extension modules to the
> development httpd.
> Would installing mod_python and mod_pywebsocket be very difficult?

Our goal is to have regression tests that work out of the box on as  
many platform as is possible.  On Windows this means that the required  
software be available from Cygwin.  On Mac OS X this means that  
required software is included with the operating system.  I'm not  
aware of any existing regression tests that require extra software to  
be installed on all platforms before they can be run.

> Then perhaps I need to write an adapter to call mod_pywebsocket from
> a standalone Python web server such as SimpleHTTPServer-derived one.
> (SSL could be an issue here. Python 2.3 doesn't have a module for  
> SSL and
> we need
> to use a third party module such as pyOpenSSL. How easy it is to add
> a third party Python module to WebKit development environment?)

Python starting with v2.6 has reasonable built-in support for SSL  
servers.  This is the version that ships with Mac OS X 10.6.  Mac OS X  
10.5 ships with Python 2.5 (predating this built-in support) but  
includes pyOpenSSL.  Mac OS X 10.4 ships with Python 2.3 and does not  
include pyOpenSSL.  From what I can see, Cygwin currently has Python  
2.5 and does not appear to support pyOpenSSL.

It seems that only a small portion of the WebSockets tests would need  
to deal with SSL, while the majority of the tests would work fine on  
any platform supporting Python 2.3.  For the SSL tests it would be  
reasonable to have tests that worked out of the box on only some  
platforms, especially when those platforms are used by the majority of  
WebKit developers (Mac OS X >= 10.5 and Linux).  Doing this seems like  
a simpler approach than requiring two third-party Apache modules be  
built + configured on all platforms in order to run even the basic  
tests.

- Mark

> On Tue, Sep 8, 2009 at 11:21 AM, Mark Rowe<mrowe at apple.com> wrote:
>
>> On 2009-09-07, at 18:28, Yuzo Fujishima wrote:
>
>>> Hi, webkit-dev,
>
>>> I'd like to propose to use mod_pywebsocket
>>> http://code.google.com/p/pywebsocket/
>>> to test WebKit's implementation of Web Socket.
>
>>> To do that, we need to install mod_python and mod_pywebsocket to
>>> the Apache HTTP server used for testing WebKit. (I assume mod_ssl is
>>> already there.)
>
>>> I think I can modify .conf files under LayoutTests/http/conf but  
>>> need
>>> instruction
>>> as to how to ensure that each test server has mod_python and
>>> mod_pywebsocket
>>> installed. Can anyone help? Any pointers or examples?
>
>> The WebKit regression tests use the system version of Apache on each
>> platform that they run on.  mod_python and mod_pywebsocket are not  
>> Apache
>> modules that are included out of the box on most platforms, which  
>> makes
>> them
>> difficult to use in our regression tests.  I recall work was done  
>> on a
>> server implementation for WebSocket regression testing that was  
>> written
>> purely in Python.  What happened to that?  Why was that simple  
>> approach
>> dropped in favor of an approach that requires multiple third-party  
>> Apache
>> modules to be built and installed?
>
>> - Mark
>
>
>

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3166 bytes
Desc: not available
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20090907/dec8d736/attachment.bin>


More information about the webkit-dev mailing list