kastiglione created this revision.
kastiglione added reviewers: JDevlieghere, mib.
Herald added a project: All.
kastiglione requested review of this revision.
Herald added a project: LLDB.
Herald added a subscriber: lldb-commits.
Follow to D127355 <https://reviews.llvm.org/D127355>, converting more
`assertEquals` to `assertState`.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D127378
Files:
lldb/test/API/commands/register/register/register_command/TestRegisters.py
lldb/test/API/commands/watchpoints/multiple_hits/TestMultipleHits.py
lldb/test/API/functionalities/breakpoint/auto_continue/TestBreakpointAutoContinue.py
lldb/test/API/functionalities/breakpoint/debugbreak/TestDebugBreak.py
lldb/test/API/functionalities/conditional_break/TestConditionalBreak.py
lldb/test/API/functionalities/dyld-exec-linux/TestDyldExecLinux.py
lldb/test/API/functionalities/dyld-launch-linux/TestDyldLaunchLinux.py
lldb/test/API/functionalities/exec/TestExec.py
lldb/test/API/functionalities/gdb_remote_client/TestNoLocalFile.py
lldb/test/API/functionalities/gdb_remote_client/TestRestartBug.py
lldb/test/API/functionalities/postmortem/minidump/TestMiniDump.py
lldb/test/API/functionalities/process_save_core/TestProcessSaveCore.py
lldb/test/API/functionalities/process_save_core_minidump/TestProcessSaveCoreMinidump.py
lldb/test/API/functionalities/signal/handle-abrt/TestHandleAbort.py
lldb/test/API/functionalities/signal/handle-segv/TestHandleSegv.py
lldb/test/API/functionalities/signal/raise/TestRaise.py
lldb/test/API/functionalities/step-vrs-interrupt/TestStepVrsInterruptTimeout.py
lldb/test/API/functionalities/step_scripted/TestStepScripted.py
lldb/test/API/functionalities/stop-on-sharedlibrary-load/TestStopOnSharedlibraryEvents.py
lldb/test/API/lang/c/step_over_no_deadlock/TestStepOverDoesntBlock.py
lldb/test/API/lang/cpp/dynamic-value/TestCppValueCast.py
lldb/test/API/lang/objc/objc-checker/TestObjCCheckers.py
lldb/test/API/linux/aarch64/unwind_signal/TestUnwindSignal.py
lldb/test/API/macosx/ignore_exceptions/TestIgnoredExceptions.py
lldb/test/API/python_api/frame/TestFrames.py
lldb/test/API/python_api/frame/inlines/TestInlinedFrame.py
lldb/test/API/python_api/function_symbol/TestDisasmAPI.py
lldb/test/API/python_api/function_symbol/TestSymbolAPI.py
lldb/test/API/python_api/lldbutil/frame/TestFrameUtils.py
lldb/test/API/python_api/target/TestTargetAPI.py
lldb/test/API/python_api/thread/TestThreadAPI.py
lldb/test/API/python_api/type/TestTypeList.py
lldb/test/API/python_api/value/TestValueAPI.py
lldb/test/API/python_api/value/linked_list/TestValueAPILinkedList.py
lldb/test/API/python_api/watchpoint/TestSetWatchpoint.py
lldb/test/API/python_api/watchpoint/TestWatchpointIgnoreCount.py
lldb/test/API/python_api/watchpoint/TestWatchpointIter.py
lldb/test/API/python_api/watchpoint/condition/TestWatchpointConditionAPI.py
lldb/test/API/python_api/watchpoint/watchlocation/TestSetWatchlocation.py
lldb/test/API/python_api/watchpoint/watchlocation/TestTargetWatchAddress.py
Index: lldb/test/API/python_api/watchpoint/watchlocation/TestTargetWatchAddress.py
===================================================================
--- lldb/test/API/python_api/watchpoint/watchlocation/TestTargetWatchAddress.py
+++ lldb/test/API/python_api/watchpoint/watchlocation/TestTargetWatchAddress.py
@@ -48,8 +48,8 @@
# We should be stopped due to the breakpoint. Get frame #0.
process = target.GetProcess()
- self.assertEqual(process.GetState(), lldb.eStateStopped,
- PROCESS_STOPPED)
+ self.assertState(process.GetState(), lldb.eStateStopped,
+ PROCESS_STOPPED)
thread = lldbutil.get_stopped_thread(
process, lldb.eStopReasonBreakpoint)
frame0 = thread.GetFrameAtIndex(0)
@@ -122,8 +122,8 @@
# We should be stopped due to the breakpoint. Get frame #0.
process = target.GetProcess()
- self.assertEqual(process.GetState(), lldb.eStateStopped,
- PROCESS_STOPPED)
+ self.assertState(process.GetState(), lldb.eStateStopped,
+ PROCESS_STOPPED)
thread = lldbutil.get_stopped_thread(
process, lldb.eStopReasonBreakpoint)
frame0 = thread.GetFrameAtIndex(0)
Index: lldb/test/API/python_api/watchpoint/watchlocation/TestSetWatchlocation.py
===================================================================
--- lldb/test/API/python_api/watchpoint/watchlocation/TestSetWatchlocation.py
+++ lldb/test/API/python_api/watchpoint/watchlocation/TestSetWatchlocation.py
@@ -50,8 +50,8 @@
# We should be stopped due to the breakpoint. Get frame #0.
process = target.GetProcess()
- self.assertEqual(process.GetState(), lldb.eStateStopped,
- PROCESS_STOPPED)
+ self.assertState(process.GetState(), lldb.eStateStopped,
+ PROCESS_STOPPED)
thread = lldbutil.get_stopped_thread(
process, lldb.eStopReasonBreakpoint)
frame0 = thread.GetFrameAtIndex(0)
Index: lldb/test/API/python_api/watchpoint/condition/TestWatchpointConditionAPI.py
===================================================================
--- lldb/test/API/python_api/watchpoint/condition/TestWatchpointConditionAPI.py
+++ lldb/test/API/python_api/watchpoint/condition/TestWatchpointConditionAPI.py
@@ -54,8 +54,8 @@
# We should be stopped due to the breakpoint. Get frame #0.
process = target.GetProcess()
- self.assertEqual(process.GetState(), lldb.eStateStopped,
- PROCESS_STOPPED)
+ self.assertState(process.GetState(), lldb.eStateStopped,
+ PROCESS_STOPPED)
thread = lldbutil.get_stopped_thread(
process, lldb.eStopReasonBreakpoint)
frame0 = thread.GetFrameAtIndex(0)
Index: lldb/test/API/python_api/watchpoint/TestWatchpointIter.py
===================================================================
--- lldb/test/API/python_api/watchpoint/TestWatchpointIter.py
+++ lldb/test/API/python_api/watchpoint/TestWatchpointIter.py
@@ -51,8 +51,8 @@
# We should be stopped due to the breakpoint. Get frame #0.
process = target.GetProcess()
- self.assertEqual(process.GetState(), lldb.eStateStopped,
- PROCESS_STOPPED)
+ self.assertState(process.GetState(), lldb.eStateStopped,
+ PROCESS_STOPPED)
thread = lldbutil.get_stopped_thread(
process, lldb.eStopReasonBreakpoint)
frame0 = thread.GetFrameAtIndex(0)
Index: lldb/test/API/python_api/watchpoint/TestWatchpointIgnoreCount.py
===================================================================
--- lldb/test/API/python_api/watchpoint/TestWatchpointIgnoreCount.py
+++ lldb/test/API/python_api/watchpoint/TestWatchpointIgnoreCount.py
@@ -55,8 +55,8 @@
# We should be stopped due to the breakpoint. Get frame #0.
process = target.GetProcess()
- self.assertEqual(process.GetState(), lldb.eStateStopped,
- PROCESS_STOPPED)
+ self.assertState(process.GetState(), lldb.eStateStopped,
+ PROCESS_STOPPED)
thread = lldbutil.get_stopped_thread(
process, lldb.eStopReasonBreakpoint)
frame0 = thread.GetFrameAtIndex(0)
Index: lldb/test/API/python_api/watchpoint/TestSetWatchpoint.py
===================================================================
--- lldb/test/API/python_api/watchpoint/TestSetWatchpoint.py
+++ lldb/test/API/python_api/watchpoint/TestSetWatchpoint.py
@@ -48,8 +48,8 @@
# We should be stopped due to the breakpoint. Get frame #0.
process = target.GetProcess()
- self.assertEqual(process.GetState(), lldb.eStateStopped,
- PROCESS_STOPPED)
+ self.assertState(process.GetState(), lldb.eStateStopped,
+ PROCESS_STOPPED)
thread = lldbutil.get_stopped_thread(
process, lldb.eStopReasonBreakpoint)
frame0 = thread.GetFrameAtIndex(0)
Index: lldb/test/API/python_api/value/linked_list/TestValueAPILinkedList.py
===================================================================
--- lldb/test/API/python_api/value/linked_list/TestValueAPILinkedList.py
+++ lldb/test/API/python_api/value/linked_list/TestValueAPILinkedList.py
@@ -49,7 +49,7 @@
self.assertTrue(process, PROCESS_IS_VALID)
# Get Frame #0.
- self.assertEqual(process.GetState(), lldb.eStateStopped)
+ self.assertState(process.GetState(), lldb.eStateStopped)
thread = lldbutil.get_stopped_thread(
process, lldb.eStopReasonBreakpoint)
self.assertTrue(
Index: lldb/test/API/python_api/value/TestValueAPI.py
===================================================================
--- lldb/test/API/python_api/value/TestValueAPI.py
+++ lldb/test/API/python_api/value/TestValueAPI.py
@@ -45,7 +45,7 @@
self.assertTrue(process, PROCESS_IS_VALID)
# Get Frame #0.
- self.assertEqual(process.GetState(), lldb.eStateStopped)
+ self.assertState(process.GetState(), lldb.eStateStopped)
thread = lldbutil.get_stopped_thread(
process, lldb.eStopReasonBreakpoint)
self.assertTrue(
Index: lldb/test/API/python_api/type/TestTypeList.py
===================================================================
--- lldb/test/API/python_api/type/TestTypeList.py
+++ lldb/test/API/python_api/type/TestTypeList.py
@@ -46,7 +46,7 @@
self.assertTrue(process, PROCESS_IS_VALID)
# Get Frame #0.
- self.assertEqual(process.GetState(), lldb.eStateStopped)
+ self.assertState(process.GetState(), lldb.eStateStopped)
thread = lldbutil.get_stopped_thread(
process, lldb.eStopReasonBreakpoint)
self.assertTrue(
Index: lldb/test/API/python_api/thread/TestThreadAPI.py
===================================================================
--- lldb/test/API/python_api/thread/TestThreadAPI.py
+++ lldb/test/API/python_api/thread/TestThreadAPI.py
@@ -197,7 +197,7 @@
self.assertTrue(process, PROCESS_IS_VALID)
# Frame #0 should be on self.step_out_of_malloc.
- self.assertEqual(process.GetState(), lldb.eStateStopped)
+ self.assertState(process.GetState(), lldb.eStateStopped)
thread = get_stopped_thread(process, lldb.eStopReasonBreakpoint)
self.assertTrue(
thread.IsValid(),
@@ -243,7 +243,7 @@
self.assertTrue(process, PROCESS_IS_VALID)
# Frame #0 should be on self.step_out_of_malloc.
- self.assertEqual(process.GetState(), lldb.eStateStopped)
+ self.assertState(process.GetState(), lldb.eStateStopped)
thread = get_stopped_thread(process, lldb.eStopReasonBreakpoint)
self.assertTrue(
thread.IsValid(),
Index: lldb/test/API/python_api/target/TestTargetAPI.py
===================================================================
--- lldb/test/API/python_api/target/TestTargetAPI.py
+++ lldb/test/API/python_api/target/TestTargetAPI.py
@@ -428,7 +428,7 @@
self.assertTrue(process, PROCESS_IS_VALID)
# Frame #0 should be on self.line1.
- self.assertEqual(process.GetState(), lldb.eStateStopped)
+ self.assertState(process.GetState(), lldb.eStateStopped)
thread = lldbutil.get_stopped_thread(
process, lldb.eStopReasonBreakpoint)
self.assertTrue(
@@ -443,7 +443,7 @@
# Continue the inferior, the breakpoint 2 should be hit.
process.Continue()
- self.assertEqual(process.GetState(), lldb.eStateStopped)
+ self.assertState(process.GetState(), lldb.eStateStopped)
thread = lldbutil.get_stopped_thread(
process, lldb.eStopReasonBreakpoint)
self.assertTrue(
Index: lldb/test/API/python_api/lldbutil/frame/TestFrameUtils.py
===================================================================
--- lldb/test/API/python_api/lldbutil/frame/TestFrameUtils.py
+++ lldb/test/API/python_api/lldbutil/frame/TestFrameUtils.py
@@ -39,8 +39,8 @@
if not process:
self.fail("SBTarget.LaunchProcess() failed")
- self.assertEqual(process.GetState(), lldb.eStateStopped,
- PROCESS_STOPPED)
+ self.assertState(process.GetState(), lldb.eStateStopped,
+ PROCESS_STOPPED)
import lldbsuite.test.lldbutil as lldbutil
thread = lldbutil.get_stopped_thread(
Index: lldb/test/API/python_api/function_symbol/TestSymbolAPI.py
===================================================================
--- lldb/test/API/python_api/function_symbol/TestSymbolAPI.py
+++ lldb/test/API/python_api/function_symbol/TestSymbolAPI.py
@@ -52,7 +52,7 @@
self.assertTrue(process, PROCESS_IS_VALID)
# Frame #0 should be on self.line1.
- self.assertEqual(process.GetState(), lldb.eStateStopped)
+ self.assertState(process.GetState(), lldb.eStateStopped)
thread = lldbutil.get_stopped_thread(
process, lldb.eStopReasonBreakpoint)
self.assertTrue(
@@ -69,7 +69,7 @@
# Continue the inferior, the breakpoint 2 should be hit.
process.Continue()
- self.assertEqual(process.GetState(), lldb.eStateStopped)
+ self.assertState(process.GetState(), lldb.eStateStopped)
thread = lldbutil.get_stopped_thread(
process, lldb.eStopReasonBreakpoint)
self.assertTrue(
Index: lldb/test/API/python_api/function_symbol/TestDisasmAPI.py
===================================================================
--- lldb/test/API/python_api/function_symbol/TestDisasmAPI.py
+++ lldb/test/API/python_api/function_symbol/TestDisasmAPI.py
@@ -52,7 +52,7 @@
self.assertTrue(process, PROCESS_IS_VALID)
# Frame #0 should be on self.line1.
- self.assertEqual(process.GetState(), lldb.eStateStopped)
+ self.assertState(process.GetState(), lldb.eStateStopped)
thread = lldbutil.get_stopped_thread(
process, lldb.eStopReasonBreakpoint)
self.assertTrue(
@@ -75,7 +75,7 @@
# Continue the inferior, the breakpoint 2 should be hit.
process.Continue()
- self.assertEqual(process.GetState(), lldb.eStateStopped)
+ self.assertState(process.GetState(), lldb.eStateStopped)
thread = lldbutil.get_stopped_thread(
process, lldb.eStopReasonBreakpoint)
self.assertTrue(
Index: lldb/test/API/python_api/frame/inlines/TestInlinedFrame.py
===================================================================
--- lldb/test/API/python_api/frame/inlines/TestInlinedFrame.py
+++ lldb/test/API/python_api/frame/inlines/TestInlinedFrame.py
@@ -46,8 +46,8 @@
None, None, self.get_process_working_directory())
process = target.GetProcess()
- self.assertEqual(process.GetState(), lldb.eStateStopped,
- PROCESS_STOPPED)
+ self.assertState(process.GetState(), lldb.eStateStopped,
+ PROCESS_STOPPED)
import lldbsuite.test.lldbutil as lldbutil
stack_traces1 = lldbutil.print_stacktraces(process, string_buffer=True)
@@ -78,8 +78,8 @@
# Expect to break again for the second time.
process.Continue()
- self.assertEqual(process.GetState(), lldb.eStateStopped,
- PROCESS_STOPPED)
+ self.assertState(process.GetState(), lldb.eStateStopped,
+ PROCESS_STOPPED)
stack_traces2 = lldbutil.print_stacktraces(
process, string_buffer=True)
if self.TraceOn():
Index: lldb/test/API/python_api/frame/TestFrames.py
===================================================================
--- lldb/test/API/python_api/frame/TestFrames.py
+++ lldb/test/API/python_api/frame/TestFrames.py
@@ -37,8 +37,8 @@
None, None, self.get_process_working_directory())
process = target.GetProcess()
- self.assertEqual(process.GetState(), lldb.eStateStopped,
- PROCESS_STOPPED)
+ self.assertState(process.GetState(), lldb.eStateStopped,
+ PROCESS_STOPPED)
# Keeps track of the number of times 'a' is called where it is within a
# depth of 3 of the 'c' leaf function.
@@ -140,8 +140,8 @@
None, None, self.get_process_working_directory())
process = target.GetProcess()
- self.assertEqual(process.GetState(), lldb.eStateStopped,
- PROCESS_STOPPED)
+ self.assertState(process.GetState(), lldb.eStateStopped,
+ PROCESS_STOPPED)
thread = lldbutil.get_stopped_thread(
process, lldb.eStopReasonBreakpoint)
@@ -181,8 +181,8 @@
None, None, self.get_process_working_directory())
process = target.GetProcess()
- self.assertEqual(process.GetState(), lldb.eStateStopped,
- PROCESS_STOPPED)
+ self.assertState(process.GetState(), lldb.eStateStopped,
+ PROCESS_STOPPED)
thread = lldbutil.get_stopped_thread(
process, lldb.eStopReasonBreakpoint)
Index: lldb/test/API/macosx/ignore_exceptions/TestIgnoredExceptions.py
===================================================================
--- lldb/test/API/macosx/ignore_exceptions/TestIgnoredExceptions.py
+++ lldb/test/API/macosx/ignore_exceptions/TestIgnoredExceptions.py
@@ -41,7 +41,7 @@
self.assertEqual(return_bkpt.GetNumLocations(), 1, "Found return breakpoint")
# Now continue, and we should stop with a stop reason of SIGBUS:
process.Continue()
- self.assertEqual(process.state, lldb.eStateStopped, "Stopped after continue to SIGBUS")
+ self.assertState(process.state, lldb.eStateStopped, "Stopped after continue to SIGBUS")
if thread.stop_reason == lldb.eStopReasonBreakpoint:
id = thread.GetStopReasonDataAtIndex(0)
name = thread.frame[0].name
Index: lldb/test/API/linux/aarch64/unwind_signal/TestUnwindSignal.py
===================================================================
--- lldb/test/API/linux/aarch64/unwind_signal/TestUnwindSignal.py
+++ lldb/test/API/linux/aarch64/unwind_signal/TestUnwindSignal.py
@@ -29,7 +29,7 @@
process = target.LaunchSimple(
None, None, self.get_process_working_directory())
self.assertTrue(process, PROCESS_IS_VALID)
- self.assertEqual(process.GetState(), lldb.eStateStopped)
+ self.assertState(process.GetState(), lldb.eStateStopped)
signo = process.GetUnixSignals().GetSignalNumberFromName("SIGILL")
thread = lldbutil.get_stopped_thread(process, lldb.eStopReasonSignal)
Index: lldb/test/API/lang/objc/objc-checker/TestObjCCheckers.py
===================================================================
--- lldb/test/API/lang/objc/objc-checker/TestObjCCheckers.py
+++ lldb/test/API/lang/objc/objc-checker/TestObjCCheckers.py
@@ -49,8 +49,8 @@
process = target.LaunchSimple(
None, None, self.get_process_working_directory())
- self.assertEqual(process.GetState(), lldb.eStateStopped,
- PROCESS_STOPPED)
+ self.assertState(process.GetState(), lldb.eStateStopped,
+ PROCESS_STOPPED)
threads = lldbutil.get_threads_stopped_at_breakpoint(
process, main_bkpt)
Index: lldb/test/API/lang/cpp/dynamic-value/TestCppValueCast.py
===================================================================
--- lldb/test/API/lang/cpp/dynamic-value/TestCppValueCast.py
+++ lldb/test/API/lang/cpp/dynamic-value/TestCppValueCast.py
@@ -63,8 +63,8 @@
process = target.LaunchSimple(
None, None, self.get_process_working_directory())
- self.assertEqual(process.GetState(), lldb.eStateStopped,
- PROCESS_STOPPED)
+ self.assertState(process.GetState(), lldb.eStateStopped,
+ PROCESS_STOPPED)
# Find DerivedA and DerivedB types.
typeA = target.FindFirstType('DerivedA')
Index: lldb/test/API/lang/c/step_over_no_deadlock/TestStepOverDoesntBlock.py
===================================================================
--- lldb/test/API/lang/c/step_over_no_deadlock/TestStepOverDoesntBlock.py
+++ lldb/test/API/lang/c/step_over_no_deadlock/TestStepOverDoesntBlock.py
@@ -27,4 +27,4 @@
thread.StepOver()
state = process.GetState()
- self.assertEqual(state, lldb.eStateStopped)
+ self.assertState(state, lldb.eStateStopped)
Index: lldb/test/API/functionalities/stop-on-sharedlibrary-load/TestStopOnSharedlibraryEvents.py
===================================================================
--- lldb/test/API/functionalities/stop-on-sharedlibrary-load/TestStopOnSharedlibraryEvents.py
+++ lldb/test/API/functionalities/stop-on-sharedlibrary-load/TestStopOnSharedlibraryEvents.py
@@ -58,7 +58,7 @@
self.assertGreater(backstop_bkpt_1.GetNumLocations(), 0, "Set our second breakpoint")
process.Continue()
- self.assertEqual(process.GetState(), lldb.eStateStopped, "We didn't stop for the load")
+ self.assertState(process.GetState(), lldb.eStateStopped, "We didn't stop for the load")
self.assertEqual(backstop_bkpt_1.GetHitCount(), 0, "Hit our backstop breakpoint")
# We should be stopped after the library is loaded, check that:
@@ -82,14 +82,14 @@
if bkpt_modifier == None:
process.Continue()
- self.assertEqual(process.GetState(), lldb.eStateStopped, "We didn't stop for the load")
+ self.assertState(process.GetState(), lldb.eStateStopped, "We didn't stop for the load")
self.assertEqual(backstop_bkpt_2.GetHitCount(), 0, "Hit our backstop breakpoint")
self.assertEqual(thread.stop_reason, lldb.eStopReasonBreakpoint, "We attributed the stop to the breakpoint")
self.assertEqual(load_bkpt.GetHitCount(), 1, "We hit our breakpoint at the load address")
else:
bkpt_modifier(load_bkpt)
process.Continue()
- self.assertEqual(process.GetState(), lldb.eStateStopped, "We didn't stop")
+ self.assertState(process.GetState(), lldb.eStateStopped, "We didn't stop")
self.assertTrue(thread.IsValid(), "Our thread was no longer valid.")
self.assertEqual(thread.stop_reason, lldb.eStopReasonBreakpoint, "We didn't hit some breakpoint")
self.assertEqual(backstop_bkpt_2.GetHitCount(), 1, "We continued to the right breakpoint")
Index: lldb/test/API/functionalities/step_scripted/TestStepScripted.py
===================================================================
--- lldb/test/API/functionalities/step_scripted/TestStepScripted.py
+++ lldb/test/API/functionalities/step_scripted/TestStepScripted.py
@@ -100,7 +100,7 @@
self.assertSuccess(err)
# We should not have exited:
- self.assertEqual(process.GetState(), lldb.eStateStopped, "We are stopped")
+ self.assertState(process.GetState(), lldb.eStateStopped, "We are stopped")
# We should still be in foo:
self.assertEqual("foo", frame.GetFunctionName())
Index: lldb/test/API/functionalities/step-vrs-interrupt/TestStepVrsInterruptTimeout.py
===================================================================
--- lldb/test/API/functionalities/step-vrs-interrupt/TestStepVrsInterruptTimeout.py
+++ lldb/test/API/functionalities/step-vrs-interrupt/TestStepVrsInterruptTimeout.py
@@ -33,4 +33,4 @@
self.dbg.SetAsync(False)
self.runCmd("settings set target.process.interrupt-timeout 1")
thread.StepOver()
- self.assertEqual(process.GetState(), lldb.eStateStopped, "Stopped like we should")
+ self.assertState(process.GetState(), lldb.eStateStopped, "Stopped like we should")
Index: lldb/test/API/functionalities/signal/raise/TestRaise.py
===================================================================
--- lldb/test/API/functionalities/signal/raise/TestRaise.py
+++ lldb/test/API/functionalities/signal/raise/TestRaise.py
@@ -43,7 +43,7 @@
process = target.LaunchSimple(
[signal], None, self.get_process_working_directory())
self.assertTrue(process, PROCESS_IS_VALID)
- self.assertEqual(process.GetState(), lldb.eStateStopped)
+ self.assertState(process.GetState(), lldb.eStateStopped)
thread = lldbutil.get_stopped_thread(
process, lldb.eStopReasonBreakpoint)
self.assertTrue(
@@ -82,7 +82,7 @@
# Make sure we stop at the signal
lldbutil.set_actions_for_signal(self, signal, "false", "true", "true")
process.Continue()
- self.assertEqual(process.GetState(), lldb.eStateStopped)
+ self.assertState(process.GetState(), lldb.eStateStopped)
thread = lldbutil.get_stopped_thread(process, lldb.eStopReasonSignal)
self.assertTrue(
thread.IsValid(),
@@ -135,7 +135,7 @@
# Make sure we stop at the signal
lldbutil.set_actions_for_signal(self, signal, "true", "true", "true")
process.Continue()
- self.assertEqual(process.GetState(), lldb.eStateStopped)
+ self.assertState(process.GetState(), lldb.eStateStopped)
thread = lldbutil.get_stopped_thread(process, lldb.eStopReasonSignal)
self.assertTrue(
thread.IsValid(),
Index: lldb/test/API/functionalities/signal/handle-segv/TestHandleSegv.py
===================================================================
--- lldb/test/API/functionalities/signal/handle-segv/TestHandleSegv.py
+++ lldb/test/API/functionalities/signal/handle-segv/TestHandleSegv.py
@@ -28,7 +28,7 @@
process = target.LaunchSimple(
None, None, self.get_process_working_directory())
self.assertTrue(process, PROCESS_IS_VALID)
- self.assertEqual(process.GetState(), lldb.eStateStopped)
+ self.assertState(process.GetState(), lldb.eStateStopped)
signo = process.GetUnixSignals().GetSignalNumberFromName("SIGSEGV")
thread = lldbutil.get_stopped_thread(process, lldb.eStopReasonSignal)
Index: lldb/test/API/functionalities/signal/handle-abrt/TestHandleAbort.py
===================================================================
--- lldb/test/API/functionalities/signal/handle-abrt/TestHandleAbort.py
+++ lldb/test/API/functionalities/signal/handle-abrt/TestHandleAbort.py
@@ -32,7 +32,7 @@
process = target.LaunchSimple(
None, None, self.get_process_working_directory())
self.assertTrue(process, PROCESS_IS_VALID)
- self.assertEqual(process.GetState(), lldb.eStateStopped)
+ self.assertState(process.GetState(), lldb.eStateStopped)
signo = process.GetUnixSignals().GetSignalNumberFromName("SIGABRT")
thread = lldbutil.get_stopped_thread(process, lldb.eStopReasonSignal)
Index: lldb/test/API/functionalities/process_save_core_minidump/TestProcessSaveCoreMinidump.py
===================================================================
--- lldb/test/API/functionalities/process_save_core_minidump/TestProcessSaveCoreMinidump.py
+++ lldb/test/API/functionalities/process_save_core_minidump/TestProcessSaveCoreMinidump.py
@@ -25,7 +25,7 @@
target = self.dbg.CreateTarget(exe)
process = target.LaunchSimple(
None, None, self.get_process_working_directory())
- self.assertEqual(process.GetState(), lldb.eStateStopped)
+ self.assertState(process.GetState(), lldb.eStateStopped)
# get neccessary data for the verification phase
process_info = process.GetProcessInfo()
Index: lldb/test/API/functionalities/process_save_core/TestProcessSaveCore.py
===================================================================
--- lldb/test/API/functionalities/process_save_core/TestProcessSaveCore.py
+++ lldb/test/API/functionalities/process_save_core/TestProcessSaveCore.py
@@ -40,7 +40,7 @@
breakpoint = target.BreakpointCreateByName("bar")
process = target.LaunchSimple(
None, None, self.get_process_working_directory())
- self.assertEqual(process.GetState(), lldb.eStateStopped)
+ self.assertState(process.GetState(), lldb.eStateStopped)
self.assertTrue(process.SaveCore(core))
self.assertTrue(os.path.isfile(core))
self.assertSuccess(process.Kill())
@@ -74,7 +74,7 @@
breakpoint = target.BreakpointCreateByName("bar")
process = target.LaunchSimple(
None, None, self.get_process_working_directory())
- self.assertEqual(process.GetState(), lldb.eStateStopped)
+ self.assertState(process.GetState(), lldb.eStateStopped)
self.assertTrue(process.SaveCore(core))
self.assertTrue(os.path.isfile(core))
self.assertSuccess(process.Kill())
Index: lldb/test/API/functionalities/postmortem/minidump/TestMiniDump.py
===================================================================
--- lldb/test/API/functionalities/postmortem/minidump/TestMiniDump.py
+++ lldb/test/API/functionalities/postmortem/minidump/TestMiniDump.py
@@ -120,7 +120,7 @@
breakpoint = target.BreakpointCreateByName("bar")
process = target.LaunchSimple(
None, None, self.get_process_working_directory())
- self.assertEqual(process.GetState(), lldb.eStateStopped)
+ self.assertState(process.GetState(), lldb.eStateStopped)
self.assertTrue(process.SaveCore(core))
self.assertTrue(os.path.isfile(core))
self.assertSuccess(process.Kill())
@@ -156,7 +156,7 @@
breakpoint = target.BreakpointCreateByName("bar")
process = target.LaunchSimple(
None, None, self.get_process_working_directory())
- self.assertEqual(process.GetState(), lldb.eStateStopped)
+ self.assertState(process.GetState(), lldb.eStateStopped)
self.assertTrue(process.SaveCore(core))
self.assertTrue(os.path.isfile(core))
self.assertSuccess(process.Kill())
Index: lldb/test/API/functionalities/gdb_remote_client/TestRestartBug.py
===================================================================
--- lldb/test/API/functionalities/gdb_remote_client/TestRestartBug.py
+++ lldb/test/API/functionalities/gdb_remote_client/TestRestartBug.py
@@ -62,4 +62,4 @@
# auto-continue after setting the breakpoint.
self.assertEqual(self.server.responder.continueCount, 1)
# And the process should end up in the stopped state.
- self.assertEqual(process.GetState(), lldb.eStateStopped)
+ self.assertState(process.GetState(), lldb.eStateStopped)
Index: lldb/test/API/functionalities/gdb_remote_client/TestNoLocalFile.py
===================================================================
--- lldb/test/API/functionalities/gdb_remote_client/TestNoLocalFile.py
+++ lldb/test/API/functionalities/gdb_remote_client/TestNoLocalFile.py
@@ -101,6 +101,6 @@
process = target.Launch(launch_info, error)
self.assertSuccess(error, "Successfully launched.")
- self.assertEqual(process.GetState(), lldb.eStateStopped, "Should be stopped at entry")
+ self.assertState(process.GetState(), lldb.eStateStopped, "Should be stopped at entry")
self.assertIsNotNone(self.a_packet_file, "A packet was sent")
self.assertEqual(self.absent_file, self.a_packet_file, "The A packet file was correct")
Index: lldb/test/API/functionalities/exec/TestExec.py
===================================================================
--- lldb/test/API/functionalities/exec/TestExec.py
+++ lldb/test/API/functionalities/exec/TestExec.py
@@ -69,8 +69,8 @@
self.addTearDownHook(cleanup)
# The stop reason of the thread should be breakpoint.
- self.assertEqual(process.GetState(), lldb.eStateStopped,
- STOPPED_DUE_TO_BREAKPOINT)
+ self.assertState(process.GetState(), lldb.eStateStopped,
+ STOPPED_DUE_TO_BREAKPOINT)
threads = lldbutil.get_threads_stopped_at_breakpoint(
process, breakpoint1)
@@ -94,7 +94,7 @@
if not skip_exec:
self.assertNotEqual(process.GetState(), lldb.eStateExited,
"Process should not have exited!")
- self.assertEqual(process.GetState(), lldb.eStateStopped,
+ self.assertState(process.GetState(), lldb.eStateStopped,
"Process should be stopped at __dyld_start")
threads = lldbutil.get_stopped_threads(
@@ -137,8 +137,8 @@
self, 'Set breakpoint 1 here', lldb.SBFileSpec('main.cpp', False))
# The stop reason of the thread should be breakpoint.
- self.assertEqual(process.GetState(), lldb.eStateStopped,
- STOPPED_DUE_TO_BREAKPOINT)
+ self.assertState(process.GetState(), lldb.eStateStopped,
+ STOPPED_DUE_TO_BREAKPOINT)
threads = lldbutil.get_threads_stopped_at_breakpoint(process, breakpoint1)
self.assertEqual(len(threads), 1)
@@ -164,7 +164,7 @@
self.assertNotEqual(process.GetState(), lldb.eStateExited,
"Process should not have exited!")
- self.assertEqual(process.GetState(), lldb.eStateStopped,
+ self.assertState(process.GetState(), lldb.eStateStopped,
"Process should be stopped at __dyld_start")
threads = lldbutil.get_stopped_threads(
Index: lldb/test/API/functionalities/dyld-launch-linux/TestDyldLaunchLinux.py
===================================================================
--- lldb/test/API/functionalities/dyld-launch-linux/TestDyldLaunchLinux.py
+++ lldb/test/API/functionalities/dyld-launch-linux/TestDyldLaunchLinux.py
@@ -43,17 +43,17 @@
self.assertSuccess(error)
# Stopped on main here.
- self.assertEqual(process.GetState(), lldb.eStateStopped)
+ self.assertState(process.GetState(), lldb.eStateStopped)
thread = process.GetSelectedThread()
self.assertIn("main", thread.GetFrameAtIndex(0).GetDisplayFunctionName())
process.Continue()
# Stopped on get_signal_crash function here.
- self.assertEqual(process.GetState(), lldb.eStateStopped)
+ self.assertState(process.GetState(), lldb.eStateStopped)
self.assertIn("get_signal_crash", thread.GetFrameAtIndex(0).GetDisplayFunctionName())
process.Continue()
# Stopped because of generated signal.
- self.assertEqual(process.GetState(), lldb.eStateStopped)
+ self.assertState(process.GetState(), lldb.eStateStopped)
self.assertIn("raise", thread.GetFrameAtIndex(0).GetDisplayFunctionName())
self.assertIn("get_signal_crash", thread.GetFrameAtIndex(1).GetDisplayFunctionName())
Index: lldb/test/API/functionalities/dyld-exec-linux/TestDyldExecLinux.py
===================================================================
--- lldb/test/API/functionalities/dyld-exec-linux/TestDyldExecLinux.py
+++ lldb/test/API/functionalities/dyld-exec-linux/TestDyldExecLinux.py
@@ -56,6 +56,6 @@
process.Continue();
# Stopped on main here.
- self.assertEqual(process.GetState(), lldb.eStateStopped)
+ self.assertState(process.GetState(), lldb.eStateStopped)
thread = process.GetSelectedThread()
self.assertIn("main", thread.GetFrameAtIndex(0).GetDisplayFunctionName())
Index: lldb/test/API/functionalities/conditional_break/TestConditionalBreak.py
===================================================================
--- lldb/test/API/functionalities/conditional_break/TestConditionalBreak.py
+++ lldb/test/API/functionalities/conditional_break/TestConditionalBreak.py
@@ -48,8 +48,8 @@
self.assertTrue(process, PROCESS_IS_VALID)
# The stop reason of the thread should be breakpoint.
- self.assertEqual(process.GetState(), lldb.eStateStopped,
- STOPPED_DUE_TO_BREAKPOINT)
+ self.assertState(process.GetState(), lldb.eStateStopped,
+ STOPPED_DUE_TO_BREAKPOINT)
# Find the line number where a's parent frame function is c.
line = line_number(
Index: lldb/test/API/functionalities/breakpoint/debugbreak/TestDebugBreak.py
===================================================================
--- lldb/test/API/functionalities/breakpoint/debugbreak/TestDebugBreak.py
+++ lldb/test/API/functionalities/breakpoint/debugbreak/TestDebugBreak.py
@@ -26,7 +26,7 @@
None, None, self.get_process_working_directory())
# We've hit the first stop, so grab the frame.
- self.assertEqual(process.GetState(), lldb.eStateStopped)
+ self.assertState(process.GetState(), lldb.eStateStopped)
stop_reason = lldb.eStopReasonException if (lldbplatformutil.getPlatform(
) == "windows" or lldbplatformutil.getPlatform() == "macosx") else lldb.eStopReasonSignal
thread = lldbutil.get_stopped_thread(process, stop_reason)
Index: lldb/test/API/functionalities/breakpoint/auto_continue/TestBreakpointAutoContinue.py
===================================================================
--- lldb/test/API/functionalities/breakpoint/auto_continue/TestBreakpointAutoContinue.py
+++ lldb/test/API/functionalities/breakpoint/auto_continue/TestBreakpointAutoContinue.py
@@ -66,7 +66,7 @@
bpno = self.make_target_and_bkpt("-N BKPT -C 'break modify --auto-continue 0 BKPT'")
process = self.launch_it(lldb.eStateStopped)
state = process.GetState()
- self.assertEqual(state, lldb.eStateStopped, "Process should be stopped")
+ self.assertState(state, lldb.eStateStopped, "Process should be stopped")
bkpt = self.target.FindBreakpointByID(bpno)
threads = lldbutil.get_threads_stopped_at_breakpoint(process, bkpt)
self.assertEqual(len(threads), 1, "There was a thread stopped at our breakpoint")
Index: lldb/test/API/commands/watchpoints/multiple_hits/TestMultipleHits.py
===================================================================
--- lldb/test/API/commands/watchpoints/multiple_hits/TestMultipleHits.py
+++ lldb/test/API/commands/watchpoints/multiple_hits/TestMultipleHits.py
@@ -26,7 +26,7 @@
process = target.LaunchSimple(None, None,
self.get_process_working_directory())
- self.assertEqual(process.GetState(), lldb.eStateStopped)
+ self.assertState(process.GetState(), lldb.eStateStopped)
thread = lldbutil.get_stopped_thread(process, lldb.eStopReasonBreakpoint)
self.assertIsNotNone(thread)
@@ -46,6 +46,6 @@
self.assertSuccess(error)
process.Continue();
- self.assertEqual(process.GetState(), lldb.eStateStopped)
+ self.assertState(process.GetState(), lldb.eStateStopped)
self.assertEqual(thread.GetStopReason(), lldb.eStopReasonWatchpoint)
Index: lldb/test/API/commands/register/register/register_command/TestRegisters.py
===================================================================
--- lldb/test/API/commands/register/register/register_command/TestRegisters.py
+++ lldb/test/API/commands/register/register/register_command/TestRegisters.py
@@ -221,8 +221,8 @@
self.assertTrue(matched, STOPPED_DUE_TO_SIGNAL)
process = target.GetProcess()
- self.assertEqual(process.GetState(), lldb.eStateStopped,
- PROCESS_STOPPED)
+ self.assertState(process.GetState(), lldb.eStateStopped,
+ PROCESS_STOPPED)
thread = process.GetThreadAtIndex(0)
self.assertTrue(thread.IsValid(), "current thread is valid")
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits