[Lldb-commits] [PATCH] D131083: [lldb] Add assertStopReason helper function
Jonas Devlieghere via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Wed Aug 3 10:42:45 PDT 2022
JDevlieghere created this revision.
JDevlieghere added reviewers: mib, kastiglione, jingham.
Herald added a project: All.
JDevlieghere requested review of this revision.
Add a function to make it easier to debug a test failure caused by an unexpected stop reason. This is similar to the `assertState` helper function that I added in D127355 <https://reviews.llvm.org/D127355>.
Before:
self.assertEqual(stop_reason, lldb.eStopReasonInstrumentation)
AssertionError: 5 != 10
After:
self.assertStopReason(stop_reason, lldb.eStopReasonInstrumentation)
AssertionError: signal (5) != instrumentation (10)
https://reviews.llvm.org/D131083
Files:
lldb/docs/resources/test.rst
lldb/packages/Python/lldbsuite/test/lldbtest.py
lldb/test/API/commands/process/continue_to_bkpt/TestContinueToBkpts.py
lldb/test/API/commands/watchpoints/multiple_hits/TestMultipleHits.py
lldb/test/API/commands/watchpoints/step_over_watchpoint/TestStepOverWatchpoint.py
lldb/test/API/commands/watchpoints/watchpoint_count/TestWatchpointCount.py
lldb/test/API/commands/watchpoints/watchpoint_disable/TestWatchpointDisable.py
lldb/test/API/functionalities/breakpoint/breakpoint_on_lambda_capture/TestBreakOnLambdaCapture.py
lldb/test/API/functionalities/breakpoint/step_over_breakpoint/TestStepOverBreakpoint.py
lldb/test/API/functionalities/breakpoint/two_hits_one_actual/TestTwoHitsOneActual.py
lldb/test/API/functionalities/gdb_remote_client/TestRecognizeBreakpoint.py
lldb/test/API/functionalities/mtc/simple/TestMTCSimple.py
lldb/test/API/functionalities/postmortem/elf-core/gcore/TestGCore.py
lldb/test/API/functionalities/postmortem/elf-core/thread_crash/TestLinuxCoreThreads.py
lldb/test/API/functionalities/postmortem/minidump-new/TestMiniDumpNew.py
lldb/test/API/functionalities/postmortem/minidump/TestMiniDump.py
lldb/test/API/functionalities/postmortem/netbsd-core/TestNetBSDCore.py
lldb/test/API/functionalities/postmortem/wow64_minidump/TestWow64MiniDump.py
lldb/test/API/functionalities/process_group/TestChangeProcessGroup.py
lldb/test/API/functionalities/return-value/TestReturnValue.py
lldb/test/API/functionalities/scripted_process/TestScriptedProcess.py
lldb/test/API/functionalities/stop-on-sharedlibrary-load/TestStopOnSharedlibraryEvents.py
lldb/test/API/functionalities/thread/create_during_step/TestCreateDuringStep.py
lldb/test/API/functionalities/thread/num_threads/TestNumThreads.py
lldb/test/API/functionalities/thread/state/TestThreadStates.py
lldb/test/API/functionalities/thread/state_after_expression/TestStateAfterExpression.py
lldb/test/API/functionalities/ubsan/basic/TestUbsanBasic.py
lldb/test/API/lang/c/stepping/TestStepAndBreakpoints.py
lldb/test/API/macosx/ignore_exceptions/TestIgnoredExceptions.py
lldb/test/API/python_api/thread/TestThreadAPI.py
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D131083.449705.patch
Type: text/x-patch
Size: 32340 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20220803/6c1c09b4/attachment-0001.bin>
More information about the lldb-commits
mailing list