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

Side by Side Diff: client/site_tests/logging_UserCrash/logging_UserCrash.py

Issue 3856002: autotest: fix race condition between cron crash_sender and test invoked (Closed) Base URL: http://git.chromium.org/git/autotest.git
Patch Set: fix tab Created 10 years, 2 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 | « client/site_tests/logging_KernelCrash/logging_KernelCrash.py ('k') | 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) 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 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 # Now stackwalk the minidump 223 # Now stackwalk the minidump
224 stack = utils.system_output('/usr/bin/minidump_stackwalk %s %s' % 224 stack = utils.system_output('/usr/bin/minidump_stackwalk %s %s' %
225 (minidump_path, self._symbol_dir)) 225 (minidump_path, self._symbol_dir))
226 self._verify_stack(stack, basename, from_crash_reporter) 226 self._verify_stack(stack, basename, from_crash_reporter)
227 227
228 228
229 def _check_generated_minidump_sending(self, meta_path, minidump_path, 229 def _check_generated_minidump_sending(self, meta_path, minidump_path,
230 username, crasher_basename, 230 username, crasher_basename,
231 will_syslog_give_name): 231 will_syslog_give_name):
232 # Now check that the sending works 232 # Now check that the sending works
233 self._set_sending(True)
234 result = self._call_sender_one_crash( 233 result = self._call_sender_one_crash(
235 username=username, 234 username=username,
236 report=os.path.basename(minidump_path)) 235 report=os.path.basename(minidump_path))
237 if (not result['send_attempt'] or not result['send_success'] or 236 if (not result['send_attempt'] or not result['send_success'] or
238 result['report_exists']): 237 result['report_exists']):
239 raise error.TestFail('Minidump not sent properly') 238 raise error.TestFail('Minidump not sent properly')
240 if will_syslog_give_name: 239 if will_syslog_give_name:
241 if result['exec_name'] != crasher_basename: 240 if result['exec_name'] != crasher_basename:
242 raise error.TestFail('Executable name incorrect') 241 raise error.TestFail('Executable name incorrect')
243 if result['report_kind'] != 'minidump': 242 if result['report_kind'] != 'minidump':
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
476 'reporter_shutdown', 475 'reporter_shutdown',
477 'no_crash', 476 'no_crash',
478 'chronos_crasher', 477 'chronos_crasher',
479 'chronos_crasher_no_consent', 478 'chronos_crasher_no_consent',
480 'root_crasher', 479 'root_crasher',
481 'root_crasher_no_consent', 480 'root_crasher_no_consent',
482 'max_enqueued_crashes', 481 'max_enqueued_crashes',
483 'core_file_persists_in_debug', 482 'core_file_persists_in_debug',
484 'core_file_removed_in_production'], 483 'core_file_removed_in_production'],
485 initialize_crash_reporter = True) 484 initialize_crash_reporter = True)
OLDNEW
« no previous file with comments | « client/site_tests/logging_KernelCrash/logging_KernelCrash.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698