From: Chaoren Lin Date: Tue, 3 Feb 2015 01:51:05 +0000 (+0000) Subject: Fixed TestInferiorCrashing failures X-Git-Tag: llvmorg-3.7.0-rc1~13299 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0c1463d4ea6dd23c8d1f3c296811e891d930a8d4;p=platform%2Fupstream%2Fllvm.git Fixed TestInferiorCrashing failures LLGS debugging is outputting different thread stop reasons than local linux debugging. The stop reasons are reasonable so I've left left them alone. Might update them to match darwin in the future. llvm-svn: 227920 --- diff --git a/lldb/test/functionalities/inferior-crashing/TestInferiorCrashing.py b/lldb/test/functionalities/inferior-crashing/TestInferiorCrashing.py index 3050e54..ffd5382 100644 --- a/lldb/test/functionalities/inferior-crashing/TestInferiorCrashing.py +++ b/lldb/test/functionalities/inferior-crashing/TestInferiorCrashing.py @@ -92,7 +92,7 @@ class CrashingInferiorTestCase(TestBase): if sys.platform.startswith("darwin"): stop_reason = 'stop reason = EXC_BAD_ACCESS' else: - stop_reason = 'stop reason = invalid address' + stop_reason = 'stop reason = signal SIGSEGV' # The stop reason of the thread should be a bad access exception. self.expect("thread list", STOPPED_DUE_TO_EXC_BAD_ACCESS, @@ -101,6 +101,11 @@ class CrashingInferiorTestCase(TestBase): return stop_reason + def get_api_stop_reason(self): + if sys.platform.startswith("darwin"): + return lldb.eStopReasonException + return lldb.eStopReasonSignal + def setUp(self): # Call super's setUp(). TestBase.setUp(self) @@ -136,7 +141,7 @@ class CrashingInferiorTestCase(TestBase): "instead the actual state is: '%s'" % lldbutil.state_type_to_str(process.GetState())) - thread = lldbutil.get_stopped_thread(process, lldb.eStopReasonException) + thread = lldbutil.get_stopped_thread(process, self.get_api_stop_reason()) if not thread: self.fail("Fail to stop the thread upon bad access exception")