Changeset 85982 in webkit


Ignore:
Timestamp:
May 6, 2011 3:38:43 PM (13 years ago)
Author:
dpranke@chromium.org
Message:

2011-05-06 Dirk Pranke <dpranke@chromium.org>

Reviewed by Ojan Vafai.

new-run-webkit-tests: crashes in race with crashing DRT
https://bugs.webkit.org/show_bug.cgi?id=60238

This fixes a race where if we wrote the URL to DRT and
DRT crashed immediately, we could get a broken pipe
error back during the write() and not handle it correctly,
causing NRWT to also crash.

  • Scripts/webkitpy/layout_tests/port/server_process.py:
  • Scripts/webkitpy/layout_tests/port/webkit.py:
Location:
trunk/Tools
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r85969 r85982  
     12011-05-06  Dirk Pranke  <dpranke@chromium.org>
     2
     3        Reviewed by Ojan Vafai.
     4
     5        new-run-webkit-tests: crashes in race with crashing DRT
     6        https://bugs.webkit.org/show_bug.cgi?id=60238
     7
     8        This fixes a race where if we wrote the URL to DRT and
     9        DRT crashed immediately, we could get a broken pipe
     10        error back during the write() and not handle it correctly,
     11        causing NRWT to also crash.
     12
     13        * Scripts/webkitpy/layout_tests/port/server_process.py:
     14        * Scripts/webkitpy/layout_tests/port/webkit.py:
     15
    1162011-05-06  Adam Barth  <abarth@webkit.org>
    217
  • trunk/Tools/Scripts/webkitpy/layout_tests/port/server_process.py

    r77592 r85982  
    203203    def stop(self):
    204204        """Stop (shut down) the subprocess), if it is running."""
     205        if not self._proc:
     206            return
     207
    205208        pid = self._proc.pid
    206209        self._proc.stdin.close()
  • trunk/Tools/Scripts/webkitpy/layout_tests/port/webkit.py

    r85797 r85982  
    429429
    430430        # First block is either text or audio
    431         block = self._read_block(deadline)
    432         if block.content_type == 'audio/wav':
    433             audio = block.decoded_content
    434         else:
    435             text = block.decoded_content
     431        if not self._server_process.crashed:
     432            block = self._read_block(deadline)
     433            if block.content_type == 'audio/wav':
     434                audio = block.decoded_content
     435            else:
     436                text = block.decoded_content
    436437
    437438        # Now read an optional second block of image data
    438         block = self._read_block(deadline)
    439         if block.content and block.content_type == 'image/png':
    440             image = block.decoded_content
    441             actual_image_hash = block.content_hash
     439        if not self._server_process.crashed:
     440            block = self._read_block(deadline)
     441            if block.content and block.content_type == 'image/png':
     442                image = block.decoded_content
     443                actual_image_hash = block.content_hash
    442444
    443445        error_lines = self._server_process.error.splitlines()
Note: See TracChangeset for help on using the changeset viewer.