Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(82)

Side by Side Diff: Tools/Scripts/webkitpy/layout_tests/port/driver.py

Issue 325993002: Set process name and pid when faking out a crash for asan. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (C) 2011 Google Inc. All rights reserved. 1 # Copyright (C) 2011 Google Inc. All rights reserved.
2 # 2 #
3 # Redistribution and use in source and binary forms, with or without 3 # Redistribution and use in source and binary forms, with or without
4 # modification, are permitted provided that the following conditions are 4 # modification, are permitted provided that the following conditions are
5 # met: 5 # met:
6 # 6 #
7 # * Redistributions of source code must retain the above copyright 7 # * Redistributions of source code must retain the above copyright
8 # notice, this list of conditions and the following disclaimer. 8 # notice, this list of conditions and the following disclaimer.
9 # * Redistributions in binary form must reproduce the above 9 # * Redistributions in binary form must reproduce the above
10 # copyright notice, this list of conditions and the following disclaimer 10 # copyright notice, this list of conditions and the following disclaimer
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 image, actual_image_hash = self._read_optional_image_block(deadline) # The second (optional) block is image data. 163 image, actual_image_hash = self._read_optional_image_block(deadline) # The second (optional) block is image data.
164 164
165 crashed = self.has_crashed() 165 crashed = self.has_crashed()
166 timed_out = self._server_process.timed_out 166 timed_out = self._server_process.timed_out
167 pid = self._server_process.pid() 167 pid = self._server_process.pid()
168 leaked = self._leaked 168 leaked = self._leaked
169 169
170 if not crashed and 'AddressSanitizer' in self.error_from_test: 170 if not crashed and 'AddressSanitizer' in self.error_from_test:
171 self.error_from_test = 'OUTPUT CONTAINS "AddressSanitizer", so we ar e treating this test as if it crashed, even though it did not.\n\n' + self.error _from_test 171 self.error_from_test = 'OUTPUT CONTAINS "AddressSanitizer", so we ar e treating this test as if it crashed, even though it did not.\n\n' + self.error _from_test
172 crashed = True 172 crashed = True
173 self._crashed_process_name = "unknown process name"
174 self._crashed_pid = 0
173 175
174 if stop_when_done or crashed or timed_out or leaked: 176 if stop_when_done or crashed or timed_out or leaked:
175 # We call stop() even if we crashed or timed out in order to get any remaining stdout/stderr output. 177 # We call stop() even if we crashed or timed out in order to get any remaining stdout/stderr output.
176 # In the timeout case, we kill the hung process as well. 178 # In the timeout case, we kill the hung process as well.
177 out, err = self._server_process.stop(self._port.driver_stop_timeout( ) if stop_when_done else 0.0) 179 out, err = self._server_process.stop(self._port.driver_stop_timeout( ) if stop_when_done else 0.0)
178 if out: 180 if out:
179 text += out 181 text += out
180 if err: 182 if err:
181 self.error_from_test += err 183 self.error_from_test += err
182 self._server_process = None 184 self._server_process = None
(...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after
504 self.content = str() # FIXME: Should be bytearray() once we require Pyt hon 2.6. 506 self.content = str() # FIXME: Should be bytearray() once we require Pyt hon 2.6.
505 self.decoded_content = None 507 self.decoded_content = None
506 self.malloc = None 508 self.malloc = None
507 self.js_heap = None 509 self.js_heap = None
508 510
509 def decode_content(self): 511 def decode_content(self):
510 if self.encoding == 'base64' and self.content is not None: 512 if self.encoding == 'base64' and self.content is not None:
511 self.decoded_content = base64.b64decode(self.content) 513 self.decoded_content = base64.b64decode(self.content)
512 else: 514 else:
513 self.decoded_content = self.content 515 self.decoded_content = self.content
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698