Changeset 173290 in webkit


Ignore:
Timestamp:
Sep 4, 2014 4:47:36 PM (10 years ago)
Author:
Brent Fulgham
Message:

[Win] webkitpy test suite frequently fails to complete
https://bugs.webkit.org/show_bug.cgi?id=136546

Reviewed by Daniel Bates.

Properly convert the ASCII crash log produced by ntsd into
a unicode string as early as possible so that we handle it
properly when generating our logs and other test support output.

We were mixing ASCII/unicode strings under Windows, which was
causing test system failures when we processed some crash logs.

Also do a better job of handling garbage pid entries in the
Cygwin lock files.

  • Scripts/webkitpy/common/system/crashlogs.py:

(CrashLogs._find_newest_log_win): The ntsd '.logopen' command
creates an ASCII file. Decode it as ASCII, not 'utf-8', and
handle the strings as unicode from that point on.

  • Scripts/webkitpy/port/http_lock.py:

(HttpLock._current_lock_pid): Add logging and handle case of
the current_pid failing to cleanly convert to 'int'.

  • Scripts/webkitpy/port/win.py:

(WinPort): Add 64-bit architecture as a known target for the
Windows build.

Location:
trunk/Tools
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r173288 r173290  
     12014-09-04  Brent Fulgham  <bfulgham@apple.com>
     2
     3        [Win] webkitpy test suite frequently fails to complete
     4        https://bugs.webkit.org/show_bug.cgi?id=136546
     5
     6        Reviewed by Daniel Bates.
     7
     8        Properly convert the ASCII crash log produced by ntsd into
     9        a unicode string as early as possible so that we handle it
     10        properly when generating our logs and other test support output.
     11
     12        We were mixing ASCII/unicode strings under Windows, which was
     13        causing test system failures when we processed some crash logs.
     14
     15        Also do a better job of handling garbage pid entries in the
     16        Cygwin lock files.
     17
     18        * Scripts/webkitpy/common/system/crashlogs.py:
     19        (CrashLogs._find_newest_log_win): The ntsd '.logopen' command
     20        creates an ASCII file. Decode it as ASCII, not 'utf-8', and
     21        handle the strings as unicode from that point on.
     22        * Scripts/webkitpy/port/http_lock.py:
     23        (HttpLock._current_lock_pid): Add logging and handle case of
     24        the current_pid failing to cleanly convert to 'int'.
     25        * Scripts/webkitpy/port/win.py:
     26        (WinPort): Add 64-bit architecture as a known target for the
     27        Windows build.
     28
    1292014-09-04  Andy Estes  <aestes@apple.com>
    230
  • trunk/Tools/Scripts/webkitpy/common/system/crashlogs.py

    r151191 r173290  
    8686
    8787        logs = self._host.filesystem.files_under(self._results_directory, file_filter=is_crash_log)
    88         errors = ''
     88        errors = u''
    8989        for path in reversed(sorted(logs)):
    9090            try:
    9191                if not newer_than or self._host.filesystem.mtime(path) > newer_than:
    92                     log_file = self._host.filesystem.read_binary_file(path).decode('utf8', 'ignore')
     92                    log_file = self._host.filesystem.read_binary_file(path).decode('ascii', 'ignore')
    9393                    match = self.PID_LINE_REGEX.search(log_file)
    9494                    if match is None:
     
    9999                print "IOError %s" % str(e)
    100100                if include_errors:
    101                     errors += "ERROR: Failed to read '%s': %s\n" % (path, str(e))
     101                    errors += u"ERROR: Failed to read '%s': %s\n" % (path, str(e))
    102102            except OSError, e:
    103103                print "OSError %s" % str(e)
    104104                if include_errors:
    105                     errors += "ERROR: Failed to read '%s': %s\n" % (path, str(e))
     105                    errors += u"ERROR: Failed to read '%s': %s\n" % (path, str(e))
    106106            except UnicodeDecodeError, e:
    107107                print "UnicodeDecodeError %s" % str(e)
    108108                if include_errors:
    109                     errors += "ERROR: Failed to decode '%s' as utf8: %s\n" % (path, str(e))
     109                    errors += u"ERROR: Failed to decode '%s' as ascii: %s\n" % (path, str(e))
    110110
    111111        if include_errors and errors:
  • trunk/Tools/Scripts/webkitpy/port/http_lock.py

    r146546 r173290  
    9292            return
    9393        try:
    94             current_pid = self._filesystem.read_text_file(lock_list[0])
    95             if not (current_pid and self._executive.check_running_pid(int(current_pid))):
    96                 _log.debug("Removing stuck lock file: %s" % lock_list[0])
     94            _log.debug("Retrieving current lock pid from %s" % lock_list[0])
     95            current_pid_string = self._filesystem.read_text_file(lock_list[0])
     96            _log.debug("Checking current lock on pid %s" % current_pid_string)
     97            if not current_pid_string:
     98                self._filesystem.remove(lock_list[0])
     99                return
     100
     101            try:
     102                current_pid = int(current_pid_string)
     103                if not (current_pid and self._executive.check_running_pid(current_pid)):
     104                    _log.debug("Removing stuck lock file: %s" % lock_list[0])
     105                    self._filesystem.remove(lock_list[0])
     106                    return
     107            except ValueError, e:
     108                _log.debug("ValueError: %s" % e)
    97109                self._filesystem.remove(lock_list[0])
    98110                return
  • trunk/Tools/Scripts/webkitpy/port/win.py

    r164250 r173290  
    5050    VERSION_FALLBACK_ORDER = ["win-xp", "win-vista", "win-7sp0", "win"]
    5151
    52     ARCHITECTURES = ['x86']
     52    ARCHITECTURES = ['x86', 'x86_64']
    5353
    5454    CRASH_LOG_PREFIX = "CrashLog"
Note: See TracChangeset for help on using the changeset viewer.