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 utils | 7 from autotest_lib.client.bin import utils |
8 from autotest_lib.client.common_lib import error | 8 from autotest_lib.client.common_lib import error |
9 from autotest_lib.client.cros import crash_test | 9 from autotest_lib.client.cros import crash_test |
10 | 10 |
(...skipping 568 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
579 if not ('log=' + result['log']) in utils.read_file(result['meta']): | 579 if not ('log=' + result['log']) in utils.read_file(result['meta']): |
580 raise error.TestFail('Meta file does not reference log') | 580 raise error.TestFail('Meta file does not reference log') |
581 | 581 |
582 | 582 |
583 def _test_crash_log_infinite_recursion(self): | 583 def _test_crash_log_infinite_recursion(self): |
584 recursion_triggering_crasher = os.path.join( | 584 recursion_triggering_crasher = os.path.join( |
585 os.path.dirname(self.bindir), 'crash_log_recursion_test') | 585 os.path.dirname(self.bindir), 'crash_log_recursion_test') |
586 # The configuration file hardcodes this path, so make sure it's still | 586 # The configuration file hardcodes this path, so make sure it's still |
587 # the same. | 587 # the same. |
588 if (recursion_triggering_crasher != | 588 if (recursion_triggering_crasher != |
589 '/home/autotest/tests/crash_log_recursion_test'): | 589 '/usr/local/autotest/tests/crash_log_recursion_test'): |
590 raise error.TestError('Path to recursion test changed') | 590 raise error.TestError('Path to recursion test changed') |
591 # Copy crasher_path to a test location with correct mode and a | 591 # Copy crasher_path to a test location with correct mode and a |
592 # special name to trigger crash log creation. | 592 # special name to trigger crash log creation. |
593 utils.system('cp -a "%s" "%s"' % (self._crasher_path, | 593 utils.system('cp -a "%s" "%s"' % (self._crasher_path, |
594 recursion_triggering_crasher)) | 594 recursion_triggering_crasher)) |
595 # Simply completing this command means that we avoided | 595 # Simply completing this command means that we avoided |
596 # infinite recursion. | 596 # infinite recursion. |
597 result = self._run_crasher_process( | 597 result = self._run_crasher_process( |
598 'root', crasher_path=recursion_triggering_crasher) | 598 'root', crasher_path=recursion_triggering_crasher) |
599 | 599 |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
673 'root_crasher_no_consent', | 673 'root_crasher_no_consent', |
674 'crash_filtering', | 674 'crash_filtering', |
675 'max_enqueued_crashes', | 675 'max_enqueued_crashes', |
676 'core2md_failure', | 676 'core2md_failure', |
677 'internal_directory_failure', | 677 'internal_directory_failure', |
678 'crash_logs_creation', | 678 'crash_logs_creation', |
679 'crash_log_infinite_recursion', | 679 'crash_log_infinite_recursion', |
680 'core_file_persists_in_debug', | 680 'core_file_persists_in_debug', |
681 'core_file_removed_in_production'], | 681 'core_file_removed_in_production'], |
682 initialize_crash_reporter = True) | 682 initialize_crash_reporter = True) |
OLD | NEW |