summaryrefslogtreecommitdiff
path: root/lldb/test/API/functionalities/step_scripted
AgeCommit message (Collapse)Author
2025-07-31[lldb] Add stop_description Python property to SBThread (#151568)Dave Lee
Add `stop_description` as a Python convenience property to `SBThread`.
2025-05-08[lldb] Disable test using GetControlFlowKind on armFelipe de Azevedo Piovezan
2025-05-08[lldb] Disable test using GetControlFlowKind on armFelipe de Azevedo Piovezan
This is only implemented for x86. Originally introduced in: https://github.com/llvm/llvm-project/pull/137904
2025-05-08[lldb] Expose QueueThreadPlanForStepSingleInstruction function to ↵Ely Ronnen
SBThreadPlan (#137904) Expose `QueueThreadPlanForStepSingleInstruction` function to SBThreadPlan
2024-06-28Reland "[lldb/Interpreter] Discard ScriptedThreadPlan::GetStopDescription ↵Med Ismail Bennani
return value (#96985)" (#97092) This reverts commit a2e3af5d581547d3ea53e5383d6f7f1cab45120a and solves the build error in https://lab.llvm.org/buildbot/#/builders/141/builds/369. Signed-off-by: Med Ismail Bennani <ismail@bennani.ma>
2024-06-28Revert "[lldb/Interpreter] Discard ScriptedThreadPlan::GetStopDescription ↵Nico Weber
return value (#96985)" This reverts commit 1130e923e2d7fe046101bf639bc5ebcde194c005. Very likely causes build problems on Windows and with LLVM_NO_DEAD_STRIP=ON, see https://github.com/llvm/llvm-project/pull/96985#pullrequestreview-2147599208
2024-06-28[lldb/Interpreter] Discard ScriptedThreadPlan::GetStopDescription return ↵Med Ismail Bennani
value (#96985) This patch changes `ScriptedThreadPlan::GetStopDescription` behavior by discarding its return value since it is optional in the first place (the user doesn't need to provide a return value in their implementation). This patch also addresses the test failures in TestStepScripted following 9a9ec22 and re-enables the tests that were XFAIL'd previously. The issue here was that the `Stream*` that's passed to `ThreadPlanPython::GetDescription` wasn't being passed by reference to the python method so it was never updated to reflect how the python method interacted with it. This patch solves this issue by making a temporary `StreamSP` that will be passed to the python method by reference, after what we will copy its content to the caller `Stream` pointer argument. --------- Signed-off-by: Med Ismail Bennani <ismail@bennani.ma>
2024-06-27Revert "Revert "[lldb/test] Mark TestStepScripted.py as XFAIL temporarily ↵Med Ismail Bennani
(#96894)"" (#96946) Reverts llvm/llvm-project#96942 since the test failures are still happening: https://lab.llvm.org/buildbot/#/builders/162/builds/899/
2024-06-27Revert "[lldb/test] Mark TestStepScripted.py as XFAIL temporarily (#96894)" ↵Med Ismail Bennani
(#96942) This tentatively reverts commit 204c403b5215197ecdbdb68ca7f11402d6d9892b to remove the XFAIL from the tests while also trying to fix them at the same time. Signed-off-by: Med Ismail Bennani <ismail@bennani.ma>
2024-06-27[lldb] Un-XFAIL TestStepScripted.test_misspelled_plan_namePavel Labath
XFAIL in #96894 was too wide. This one actually passes.
2024-06-27[lldb/test] Mark TestStepScripted.py as XFAIL temporarily (#96894)Med Ismail Bennani
After landing 9a9ec228cdcf, some of the `TestStepScripted.py` methods started failing on various bots: - https://lab.llvm.org/buildbot/#/builders/162/builds/851 - https://lab.llvm.org/buildbot/#/builders/59/builds/650 - https://green.lab.llvm.org/job/llvm.org/view/LLDB/job/as-lldb-cmake/6546/ - https://green.lab.llvm.org/job/llvm.org/view/LLDB/job/lldb-cmake/3359/ Since I'm not able to reproduce the test failure locally (tested on darwin x86_64/arm64 & linux arm64), I'll mark these as XFAIL until I can reproduce it or attach to a bot to investigate the issue on it directly. Signed-off-by: Med Ismail Bennani <ismail@bennani.ma>
2024-06-27[lldb] Make use of Scripted{Python,}Interface for ScriptedThreadPlan ↵Med Ismail Bennani
(#70392) (#96868) This patch makes ScriptedThreadPlan conforming to the ScriptedInterface & ScriptedPythonInterface facilities by introducing 2 ScriptedThreadPlanInterface & ScriptedThreadPlanPythonInterface classes. This allows us to get rid of every ScriptedThreadPlan-specific SWIG method and re-use the same affordances as other scripting offordances, like Scripted{Process,Thread,Platform} & OperatingSystem. To do so, this adds new transformer methods for `ThreadPlan`, `Stream` & `Event`, to allow the bijection between C++ objects and their python counterparts. This just re-lands #70392 after fixing test failures. Signed-off-by: Med Ismail Bennani <ismail@bennani.ma>
2024-06-26[lldb] fix(lldb/**.py): fix comparison to None (#94017)Eisuke Kawashima
from PEP8 (https://peps.python.org/pep-0008/#programming-recommendations): > Comparisons to singletons like None should always be done with is or is not, never the equality operators. Co-authored-by: Eisuke Kawashima <e-kwsm@users.noreply.github.com>
2024-05-23Revert "[lldb] Make use of Scripted{Python,}Interface for ScriptedThreadPlan ↵Med Ismail Bennani
(Reland #70392)" (#93153) Reverts llvm/llvm-project#93149 since it breaks https://lab.llvm.org/buildbot/#/builders/68/builds/74799
2024-05-23[lldb] Make use of Scripted{Python,}Interface for ScriptedThreadPlan (Reland ↵Med Ismail Bennani
#70392) (#93149) This patch makes ScriptedThreadPlan conforming to the ScriptedInterface & ScriptedPythonInterface facilities by introducing 2 ScriptedThreadPlanInterface & ScriptedThreadPlanPythonInterface classes. This allows us to get rid of every ScriptedThreadPlan-specific SWIG method and re-use the same affordances as other scripting offordances, like Scripted{Process,Thread,Platform} & OperatingSystem. To do so, this adds new transformer methods for `ThreadPlan`, `Stream` & `Event`, to allow the bijection between C++ objects and their python counterparts. This just re-lands #70392 after fixing test failures. Signed-off-by: Med Ismail Bennani <ismail@bennani.ma>
2024-01-29Revert "[lldb/Test] Temporarily XFAIL TestStepScripted.py"Jason Molenda
Also revert this patch until Ismail can re-land. This reverts commit febb4c42b192ed7c88c17f91cb903a59acf20baf.
2024-01-29Revert "[lldb] Make use of Scripted{Python,}Interface for ScriptedThreadPlan ↵Jason Molenda
(#70392)" Temporarily revert to unblock the CI bots, this is breaking the -DLLVM_ENABLE_MODULES=On modules style build. I've notified Ismail. This reverts commit 888501bc631c4f6d373b4081ff6c504a1ce4a682.
2024-01-29[lldb/Test] Temporarily XFAIL TestStepScripted.pyMed Ismail Bennani
This patch XFAILs TestStepScripted.py temporarily following 888501bc631c, until I fix it. Signed-off-by: Med Ismail Bennani <ismail@bennani.ma>
2024-01-29[lldb] Make use of Scripted{Python,}Interface for ScriptedThreadPlan (#70392)Med Ismail Bennani
This patch makes ScriptedThreadPlan conforming to the ScriptedInterface & ScriptedPythonInterface facilities by introducing 2 ScriptedThreadPlanInterface & ScriptedThreadPlanPythonInterface classes. This allows us to get rid of every ScriptedThreadPlan-specific SWIG method and re-use the same affordances as other scripting offordances, like Scripted{Process,Thread,Platform} & OperatingSystem. To do so, this adds new transformer methods for `ThreadPlan`, `Stream` & `Event`, to allow the bijection between C++ objects and their python counterparts. Signed-off-by: Med Ismail Bennani <ismail@bennani.ma>
2023-10-30Revert "[lldb] Make use of Scripted{Python,}Interface for ScriptedThreadPlan ↵Med Ismail Bennani
(#70392)" This reverts commit 4b3cd379cce3f455bf3c8677ca7a5be6e708a4ce since it introduces some test failures: https://lab.llvm.org/buildbot/#/builders/68/builds/62556
2023-10-30[lldb] Make use of Scripted{Python,}Interface for ScriptedThreadPlan (#70392)Med Ismail Bennani
This patch makes ScriptedThreadPlan conforming to the ScriptedInterface & ScriptedPythonInterface facilities by introducing 2 ScriptedThreadPlanInterface & ScriptedThreadPlanPythonInterface classes. This allows us to get rid of every ScriptedThreadPlan-specific SWIG method and re-use the same affordances as other scripting offordances, like Scripted{Process,Thread,Platform} & OperatingSystem. To do so, this adds new transformer methods for `ThreadPlan`, `Stream` & `Event`, to allow the bijection between C++ objects and their python counterparts. Signed-off-by: Med Ismail Bennani <ismail@bennani.ma>
2023-05-25[NFC][Py Reformat] Reformat python files in lldbJonas Devlieghere
This is an ongoing series of commits that are reformatting our Python code. Reformatting is done with `black` (23.1.0). If you end up having problems merging this commit because you have made changes to a python file, the best way to handle that is to run `git checkout --ours <yourfile>` and then reformat it with black. RFC: https://discourse.llvm.org/t/rfc-document-and-standardize-python-code-style Differential revision: https://reviews.llvm.org/D151460
2023-05-22[lldb] Add support for negative integer to {SB,}StructuredDataMed Ismail Bennani
This patch refactors the `StructuredData::Integer` class to make it templated, makes it private and adds 2 public specialization for both `int64_t` & `uint64_t` with a public type aliases, respectively `SignedInteger` & `UnsignedInteger`. It adds new getter for signed and unsigned interger values to the `StructuredData::Object` base class and changes the implementation of `StructuredData::Array::GetItemAtIndexAsInteger` and `StructuredData::Dictionary::GetValueForKeyAsInteger` to support signed and unsigned integers. This patch also adds 2 new `Get{Signed,Unsigned}IntegerValue` to the `SBStructuredData` class and marks `GetIntegerValue` as deprecated. Finally, this patch audits all the caller of `StructuredData::Integer` or `StructuredData::GetIntegerValue` to use the proper type as well the various tests that uses `SBStructuredData.GetIntegerValue`. rdar://105575764 Differential Revision: https://reviews.llvm.org/D150485 Signed-off-by: Med Ismail Bennani <ismail@bennani.ma>
2023-05-03Allow scripted thread plans to modify the thread stop description whenJim Ingham
they are completed.
2023-02-08[lldb][test] Fix function references to function calls (NFC)Dave Lee
2022-06-17[lldb][tests] Automatically call compute_mydir (NFC)Dave Lee
Eliminate boilerplate of having each test manually assign to `mydir` by calling `compute_mydir` in lldbtest.py. Differential Revision: https://reviews.llvm.org/D128077
2022-06-09[lldb] Use assertState in more tests (NFC)Dave Lee
Follow to D127355, converting more `assertEquals` to `assertState`. Differential Revision: https://reviews.llvm.org/D127378
2022-04-27Remove Python 2 checks from the test suiteJonas Devlieghere
We dropped downstream support for Python 2 in the previous release. Now that we have branched for the next release the window where this kind of change could introduce conflicts is closing too. Remove Python 2 checks from the test suite. Differential revision: https://reviews.llvm.org/D124429
2022-02-14[lldb] Replace asserts on .Success() with assertSuccess()Dave Lee
Replace forms of `assertTrue(err.Success())` with `assertSuccess(err)` (added in D82759). * `assertSuccess` prints out the error's message * `assertSuccess` expresses explicit higher level semantics, both to the reader and for test failure output * `assertSuccess` seems not to be well known, using it where possible will help spread knowledge * `assertSuccess` statements are more succinct Differential Revision: https://reviews.llvm.org/D119616
2021-09-30[lldb] Remove support for replaying the test suite from a reproducerJonas Devlieghere
This patch removes the infrastructure to replay the test suite from a reproducer, as well as the modifications made to the individual tests.
2021-02-06[lldb] Use assertIn/NotIn over assertTrue/False (NFC)Dave Lee
For improved failure messages, use `assertIn` over `assertTrue`. Differential Revision: https://reviews.llvm.org/D96095
2020-08-13[lldb] Skip TestStepScripted with reproducersJonas Devlieghere
Some of the test methods were already skipped because of an unexpected packet. The test started failing after it was expanded. Skip the whole test with reproducers so we don't have to add the decorator for every method.
2020-08-07Add a setting to force stepping to always run all threads.Jim Ingham
Also allow ScriptedThreadPlans to set & get their StopOthers state. <rdar://problem/64229484> Differential Revision: https://reviews.llvm.org/D85265
2020-05-27[lldb/Reproducers] Differentiate active and passive replay unexpected packet.Jonas Devlieghere
2020-04-21[lldb/Test] Add skipIfReproducer for tests that diverge during replayJonas Devlieghere
Add the skipIfReproducer decorator to the remaining tests that fail to replay because the GDB remote packets diverge during replay. This is *not* expected and should be fixed, but figuring out exactly what caused the divergence has proven pretty difficult to track down. I've marked these tests as skipped for now so we can get clean results and detect new regressions. I have no evidence to believe that these failures have the same root cause, so I've not assigned them a PR.
2020-02-11[lldb][test] Remove symlink for API tests.Jordan Rupprecht
Summary: Moves lldbsuite tests to lldb/test/API. This is a largely mechanical change, moved with the following steps: ``` rm lldb/test/API/testcases mkdir -p lldb/test/API/{test_runner/test,tools/lldb-{server,vscode}} mv lldb/packages/Python/lldbsuite/test/test_runner/test lldb/test/API/test_runner for d in $(find lldb/packages/Python/lldbsuite/test/* -maxdepth 0 -type d | egrep -v "make|plugins|test_runner|tools"); do mv $d lldb/test/API; done for d in $(find lldb/packages/Python/lldbsuite/test/tools/lldb-vscode -maxdepth 1 -mindepth 1 | grep -v ".py"); do mv $d lldb/test/API/tools/lldb-vscode; done for d in $(find lldb/packages/Python/lldbsuite/test/tools/lldb-server -maxdepth 1 -mindepth 1 | egrep -v "gdbremote_testcase.py|lldbgdbserverutils.py|socket_packet_pump.py"); do mv $d lldb/test/API/tools/lldb-server; done ``` lldb/packages/Python/lldbsuite/__init__.py and lldb/test/API/lit.cfg.py were also updated with the new directory structure. Reviewers: labath, JDevlieghere Tags: #lldb Differential Revision: https://reviews.llvm.org/D71151