diff options
author | lmr <lmr@592f7852-d20e-0410-864c-8624ca9c26a4> | 2010-06-08 20:56:29 +0000 |
---|---|---|
committer | lmr <lmr@592f7852-d20e-0410-864c-8624ca9c26a4> | 2010-06-08 20:56:29 +0000 |
commit | d733994fa9f320184376cfda59668d692a7bc7f7 (patch) | |
tree | 85612f15d30f9160a20bdeb9a6e6633259057a01 | |
parent | 42e6cb0789e29582e9789fcc50e6d5931a16b556 (diff) |
Crash handling: Make messaging consistent, warn user about lack of GDB
Make messages consistent with the latest patch that got
into r4584, also warn user when GDB is not installed.
Without GDB, the core report generation code operates
with limited functionality.
Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
git-svn-id: svn://test.kernel.org/autotest/trunk@4587 592f7852-d20e-0410-864c-8624ca9c26a4
-rw-r--r-- | client/bin/test.py | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/client/bin/test.py b/client/bin/test.py index f67b3618..e5c4be3f 100644 --- a/client/bin/test.py +++ b/client/bin/test.py @@ -22,7 +22,7 @@ import os, traceback, sys, shutil, logging, resource, glob from autotest_lib.client.common_lib import error, utils from autotest_lib.client.common_lib import test as common_test -from autotest_lib.client.bin import sysinfo +from autotest_lib.client.bin import sysinfo, os_dep class test(common_test.base_test): @@ -52,11 +52,11 @@ class test(common_test.base_test): "print sys.version_info[0], sys.version_info[1]'") result = utils.run(cmd, ignore_status=True) if result.exit_status != 0: - logging.warn('System python is too old, crash handling disabled') + logging.warning('System python is too old, crash handling disabled') return major, minor = [int(x) for x in result.stdout.strip().split()] if (major, minor) < (2, 4): - logging.warn('System python is too old, crash handling disabled') + logging.warning('System python is too old, crash handling disabled') return self.pattern_file = '/proc/sys/kernel/core_pattern' @@ -74,10 +74,15 @@ class test(common_test.base_test): os.getpid()) utils.open_write_close(self.debugdir_tmp_file, self.debugdir + "\n") except Exception, e: - logging.error('Crash handling system disabled: %s' % e) + logging.warning('Crash handling disabled: %s', e) else: self.crash_handling_enabled = True - logging.debug('Crash handling system enabled') + try: + os_dep.command('gdb') + except ValueError: + logging.warning('Could not find GDB installed. Crash handling ' + 'will operate with limited functionality') + logging.debug('Crash handling enabled') def crash_handler_report(self): |