| 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 | 5 import dbus, logging, os, re, shutil, socket, sys |
| 6 import common | 6 import common |
| 7 import auth_server, constants, cryptohome, dns_server | 7 import auth_server, constants, cryptohome, dns_server |
| 8 import cros_logging, cros_ui, login, ownership | 8 import cros_logging, cros_ui, login, ownership |
| 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 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 317 self._dnsServer.stop() | 317 self._dnsServer.stop() |
| 318 | 318 |
| 319 | 319 |
| 320 def __log_crashed_processes(self, processes): | 320 def __log_crashed_processes(self, processes): |
| 321 """Runs through the log watched by |watcher| to see if a crash was | 321 """Runs through the log watched by |watcher| to see if a crash was |
| 322 reported for any process names listed in |processes|. SIGABRT crashes in | 322 reported for any process names listed in |processes|. SIGABRT crashes in |
| 323 chrome or supplied-chrome during logout are ignored. | 323 chrome or supplied-chrome during logout are ignored. |
| 324 """ | 324 """ |
| 325 logout_start_regex = re.compile(login.LOGOUT_ATTEMPT_MSG) | 325 logout_start_regex = re.compile(login.LOGOUT_ATTEMPT_MSG) |
| 326 crash_regex = re.compile( | 326 crash_regex = re.compile( |
| 327 'Received crash notification for (\w+).+ (sig \d+)') | 327 'Received crash notification for ([-\w]+).+ (sig \d+)') |
| 328 logout_complete_regex = re.compile(login.LOGOUT_COMPLETE_MSG) | 328 logout_complete_regex = re.compile(login.LOGOUT_COMPLETE_MSG) |
| 329 | 329 |
| 330 in_logout = False | 330 in_logout = False |
| 331 for line in self._log_reader.get_logs().splitlines(): | 331 for line in self._log_reader.get_logs().splitlines(): |
| 332 if logout_start_regex.search(line): | 332 if logout_start_regex.search(line): |
| 333 in_logout = True | 333 in_logout = True |
| 334 elif logout_complete_regex.search(line): | 334 elif logout_complete_regex.search(line): |
| 335 in_logout = False | 335 in_logout = False |
| 336 else: | 336 else: |
| 337 match = crash_regex.search(line) | 337 match = crash_regex.search(line) |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 383 | 383 |
| 384 self.stop_authserver() | 384 self.stop_authserver() |
| 385 self.__log_crashed_processes(self.crash_blacklist) | 385 self.__log_crashed_processes(self.crash_blacklist) |
| 386 | 386 |
| 387 | 387 |
| 388 def get_auth_endpoint_misses(self): | 388 def get_auth_endpoint_misses(self): |
| 389 if hasattr(self, '_authServer'): | 389 if hasattr(self, '_authServer'): |
| 390 return self._authServer.get_endpoint_misses() | 390 return self._authServer.get_endpoint_misses() |
| 391 else: | 391 else: |
| 392 return {} | 392 return {} |
| OLD | NEW |