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 <[email protected]>
---
 client/bin/test.py |   13 +++++++++----
 1 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/client/bin/test.py b/client/bin/test.py
index f67b361..e7d5ca4 100644
--- a/client/bin/test.py
+++ b/client/bin/test.py
@@ -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):
-- 
1.7.0.1

_______________________________________________
Autotest mailing list
[email protected]
http://test.kernel.org/cgi-bin/mailman/listinfo/autotest

Reply via email to