When an error occurs without using an RPC, the error reporting lacks
of traceback, listing only the exception itself. This patch adds the
traceback to the error string reported by R().
Test-Parameters: @lnet
Signed-off-by: Cyril Bordage <cbordage@whamcloud.com>
Change-Id: I3fe5f7628a3f96aeb7941ec75db6b6b5e49e9d84
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/48987
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Frank Sehr <fsehr@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
if type(e) == LUTFError and e.halt:
raise e
else:
- rc = {'status': 'FAIL', 'error': str(e)}
+ rc = {'status': 'FAIL', 'error': traceback.format_exc()}
skip_test = True
if skip_test:
rc['reason'] = 'Test setup cleanup failed'
if type(e) == LUTFError and e.halt:
raise e
else:
- rc = {'status': 'FAIL', 'error': str(e)}
+ rc = {'status': 'FAIL', 'error': traceback.format_exc()}
logging.debug("Finished test script: %s" % str(self.name))
duration = datetime.datetime.now() - start_time