OLD | NEW |
1 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. | 1 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 import dbus, logging, os, re, shutil, socket, sys, time | 5 import dbus, logging, os, re, shutil, socket, sys, time |
6 import common | 6 import common |
7 import auth_server, constants as chromeos_constants, cryptohome, dns_server | 7 import auth_server, constants as chromeos_constants, cryptohome, dns_server |
8 import cros_logging, cros_ui, login | 8 import cros_logging, cros_ui, login |
9 from autotest_lib.client.bin import test, utils | 9 from autotest_lib.client.bin import test, utils |
10 from autotest_lib.client.common_lib import error | 10 from autotest_lib.client.common_lib import error |
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
292 """Runs through the log watched by |watcher| to see if a crash was | 292 """Runs through the log watched by |watcher| to see if a crash was |
293 reported for any process names listed in |processes|. SIGABRT crashes in | 293 reported for any process names listed in |processes|. SIGABRT crashes in |
294 chrome or supplied-chrome during logout are ignored. | 294 chrome or supplied-chrome during logout are ignored. |
295 """ | 295 """ |
296 logout_start_regex = re.compile(login.LOGOUT_ATTEMPT_MSG) | 296 logout_start_regex = re.compile(login.LOGOUT_ATTEMPT_MSG) |
297 crash_regex = re.compile( | 297 crash_regex = re.compile( |
298 'Received crash notification for (\w+).+ (sig \d+)') | 298 'Received crash notification for (\w+).+ (sig \d+)') |
299 logout_complete_regex = re.compile(login.LOGOUT_COMPLETE_MSG) | 299 logout_complete_regex = re.compile(login.LOGOUT_COMPLETE_MSG) |
300 | 300 |
301 in_logout = False | 301 in_logout = False |
302 for line in self._log_reader.get_logs().splitlines(): | 302 for line in self._log_reader.get_logs().split('\n'): |
303 if logout_start_regex.search(line): | 303 if logout_start_regex.search(line): |
304 in_logout = True | 304 in_logout = True |
305 elif logout_complete_regex.search(line): | 305 elif logout_complete_regex.search(line): |
306 in_logout = False | 306 in_logout = False |
307 else: | 307 else: |
308 match = crash_regex.search(line) | 308 match = crash_regex.search(line) |
309 if (match and not match.group(1) in processes and | 309 if (match and not match.group(1) in processes and |
310 not (in_logout and | 310 not (in_logout and |
311 (match.group(1) == chromeos_constants.BROWSER or | 311 (match.group(1) == chromeos_constants.BROWSER or |
312 match.group(1) == 'supplied_chrome') and | 312 match.group(1) == 'supplied_chrome') and |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
349 | 349 |
350 self.stop_authserver() | 350 self.stop_authserver() |
351 self.__log_crashed_processes(self.crash_blacklist) | 351 self.__log_crashed_processes(self.crash_blacklist) |
352 | 352 |
353 | 353 |
354 def get_auth_endpoint_misses(self): | 354 def get_auth_endpoint_misses(self): |
355 if hasattr(self, '_authServer'): | 355 if hasattr(self, '_authServer'): |
356 return self._authServer.get_endpoint_misses() | 356 return self._authServer.get_endpoint_misses() |
357 else: | 357 else: |
358 return {} | 358 return {} |
OLD | NEW |