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 grp, logging, os, pwd, re, stat, subprocess | 5 import grp, logging, os, pwd, re, stat, subprocess |
6 from signal import SIGSEGV | 6 from signal import SIGSEGV |
7 from autotest_lib.client.bin import site_crash_test, site_utils, test | 7 from autotest_lib.client.bin import site_crash_test, site_utils, test |
8 from autotest_lib.client.common_lib import error, utils | 8 from autotest_lib.client.common_lib import error, utils |
9 | 9 |
10 _CORE_PATTERN = '/proc/sys/kernel/core_pattern' | 10 _CORE_PATTERN = '/proc/sys/kernel/core_pattern' |
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
238 raise error.TestFail('Minidump not sent properly') | 238 raise error.TestFail('Minidump not sent properly') |
239 if will_syslog_give_name: | 239 if will_syslog_give_name: |
240 if result['exec_name'] != crasher_basename: | 240 if result['exec_name'] != crasher_basename: |
241 raise error.TestFail('Executable name incorrect') | 241 raise error.TestFail('Executable name incorrect') |
242 if result['report_kind'] != 'minidump': | 242 if result['report_kind'] != 'minidump': |
243 raise error.TestFail('Expected a minidump report') | 243 raise error.TestFail('Expected a minidump report') |
244 if result['report_payload'] != minidump_path: | 244 if result['report_payload'] != minidump_path: |
245 raise error.TestFail('Sent the wrong minidump payload') | 245 raise error.TestFail('Sent the wrong minidump payload') |
246 if result['meta_path'] != meta_path: | 246 if result['meta_path'] != meta_path: |
247 raise error.TestFail('Used the wrong meta file') | 247 raise error.TestFail('Used the wrong meta file') |
| 248 if result['sig'] is not None: |
| 249 raise error.TestFail('User crash should not have signature') |
248 | 250 |
249 # Check version matches. | 251 # Check version matches. |
250 lsb_release = utils.read_file('/etc/lsb-release') | 252 lsb_release = utils.read_file('/etc/lsb-release') |
251 version_match = re.search(r'CHROMEOS_RELEASE_VERSION=(.*)', lsb_release) | 253 version_match = re.search(r'CHROMEOS_RELEASE_VERSION=(.*)', lsb_release) |
252 if not ('Version: %s' % version_match.group(1)) in result['output']: | 254 if not ('Version: %s' % version_match.group(1)) in result['output']: |
253 raise error.TestFail('Did not find version %s in log output' % | 255 raise error.TestFail('Did not find version %s in log output' % |
254 version_match.group(1)) | 256 version_match.group(1)) |
255 | 257 |
256 | 258 |
257 def _check_crashing_process(self, username, consent=True): | 259 def _check_crashing_process(self, username, consent=True): |
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
475 'reporter_shutdown', | 477 'reporter_shutdown', |
476 'no_crash', | 478 'no_crash', |
477 'chronos_crasher', | 479 'chronos_crasher', |
478 'chronos_crasher_no_consent', | 480 'chronos_crasher_no_consent', |
479 'root_crasher', | 481 'root_crasher', |
480 'root_crasher_no_consent', | 482 'root_crasher_no_consent', |
481 'max_enqueued_crashes', | 483 'max_enqueued_crashes', |
482 'core_file_persists_in_debug', | 484 'core_file_persists_in_debug', |
483 'core_file_removed_in_production'], | 485 'core_file_removed_in_production'], |
484 initialize_crash_reporter = True) | 486 initialize_crash_reporter = True) |
OLD | NEW |