summaryrefslogtreecommitdiff
path: root/lldb/test/API/functionalities/progress_reporting/TestProgressReporting.py
AgeCommit message (Collapse)Author
2025-06-26Reland "[lldb][target] Add progress report for wait-attaching to proc… ↵Chelsea Cassanova
(#145111) …ess" (#144810) This relands commit e0933ab5ae4856c4aa188a5ea16716b3a8d0840b. The original commit was causing the test TestCreateAfterAttach.py to fail on ARM Ubuntu bots. It's possible that this could've been happening because the test for wait-attach progress reporting is waiting on a process named "a.out" which could be too generic as multiple other tests (when run in parallel on the bots) could also be using processes named "a.out". This commit changes the wait-attach progress report test to wait on a unique process name. Original PR description: This commit adds a progress report when wait-attaching to a process as well as a test for this. Original PR link: https://github.com/llvm/llvm-project/pull/144768
2025-06-18Revert "[lldb][target] Add progress report for wait-attaching to process" ↵Chelsea Cassanova
(#144810) This is breaking TestCreateAfterAttach.py on Ubuntu: ``` ====================================================================== FAIL: test_create_after_attach_dwo (TestCreateAfterAttach.CreateAfterAttachTestCase.test_create_after_attach_dwo) Test thread creation after process attach. ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/llvm-project/lldb/packages/Python/lldbsuite/test/lldbtest.py", line 1804, in test_method return attrvalue(self) ^^^^^^^^^^^^^^^ File "/home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/llvm-project/lldb/packages/Python/lldbsuite/test/decorators.py", line 149, in wrapper return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "/home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/llvm-project/lldb/test/API/functionalities/thread/create_after_attach/TestCreateAfterAttach.py", line 36, in test_create_after_attach self.runCmd("process attach -p " + str(pid)) File "/home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/llvm-project/lldb/packages/Python/lldbsuite/test/lldbtest.py", line 1005, in runCmd self.assertTrue(self.res.Succeeded(), msg + output) AssertionError: False is not true : Command 'process attach -p 1474309' did not return successfully Error output: error: attach failed: lost connection ``` on the buildbots for lldb-remote-linux-ubuntu, lldb-arm-ubuntu, lldb-aarch64-ubuntu, lldb-arm-ubuntu.
2025-06-18[lldb][target] Add progress report for wait-attaching to process (#144768)Chelsea Cassanova
This commit adds a progress report when wait-attaching to a process as well as a test for this.
2024-04-26[lldb][sbapi] Fix API break in SBDebugger broadcast bits (#90261)Chelsea Cassanova
https://github.com/llvm/llvm-project/pull/87409 removed the broadcast bits from SBDebugger and placed them in `lldb-enumerations.h`. This is API-breaking so this commits places the enum back into `SBDebugger.h` and references the bits from `lldb-enumerations.h`. rdar://127128536
2024-04-11Reland "[lldb][sbdebugger] Move SBDebugger Broadcast bit enum into ll… ↵Chelsea Cassanova
(#88331) …db-enumerations.h" (#88324)" This reverts commit 9f6d08f2566a26144ea1753f80aebb1f2ecfdc63. This broke the build because of a usage of one of the original SBDebugger broadcast bits that wasn't updated in the original commit.
2024-04-10Revert "[lldb][sbdebugger] Move SBDebugger Broadcast bit enum into ↵Chelsea Cassanova
lldb-enumerations.h" (#88324) Reverts llvm/llvm-project#87409 due a missed update to the broadcast bit causing a build failure on the x86_64 Debian buildbot.
2024-04-10[lldb][sbdebugger] Move SBDebugger Broadcast bit enum into ↵Chelsea Cassanova
lldb-enumerations.h (#87409) When the `eBroadcastBitProgressCategory` bit was originally added to Debugger.h and SBDebugger.h, each corresponding bit was added in order of the other bits that were previously there. Since `Debugger.h` has an enum bit that `SBDebugger.h` does not, this meant that their offsets did not match. Instead of trying to keep the bit offsets in sync between the two, it's preferable to just move SBDebugger's enum into the main enumerations header and use the bits from there. This also requires that API tests using the bits from SBDebugger update their usage.
2024-01-16[lldb][Progress] Separate title and details (#77547)Chelsea Cassanova
Per this RFC: https://discourse.llvm.org/t/rfc-improve-lldb-progress-reporting/75717 on improving progress reports, this commit separates the title field and details field so that the title specifies the category that the progress report falls under. The details field is added as a part of the constructor for progress reports and by default is an empty string. In addition, changes the total amount of progress completed into a std::optional. Also updates the test to check for details being correctly reported from the event structured data dictionary.
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-02-10[lldb] Add an SB API to get progress events as SBStructuredDataJonas Devlieghere
This is a preparatory patch to add an SB API to get the progress data as SBStructuredData. The advantage of using SBStructuredData is that the dictionary can grow over time with more fields. This approach is identical to the way this is implemented for diagnostic events. Differential revision: https://reviews.llvm.org/D143687
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-03-23[lldb/test] Add events listener helper function to lldbtestMed Ismail Bennani
This patch introduces 2 new lldb utility functions: - lldbutil.start_listening_from: This can be called in the test setup to create a listener and set it up for a specific event mask and add it to the user-provided broadcaster's list. - lldbutil.fetch_next_event: This will use fetch a single event from the provided istener and return it if it matches the provided broadcaster. The motivation behind this is to easily test new kinds of events (i.e. Swift type-system progress events). However, this patch also updates `TestProgressReporting.py` and `TestDiagnosticReporting.py` to make use of these new helper functions. Differential Revision: https://reviews.llvm.org/D122193 Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
2022-03-21Revert "[lldb/test] Add events listener helper class to lldbtest"Pavel Labath
It removes the "wait-until-event-thread-stops" logic, which makes TestDiagnosticReporting.py flaky. This reverts commits 09ff41a087760ea7e80b8e5390a05101c5a5b929 and acdd41b4590935e39208a941fbac7889d778e8e5.
2022-03-18[lldb/test] Add events listener helper class to lldbtestMed Ismail Bennani
This patch introduces a generic helper class that will listen for event in a background thread and match it against a source broadcaster. If the event received matches the source broadcaster, the event is queued up in a list that the user can access later on. The motivation behind this is to easily test new kinds of events (i.e. Swift type-system progress events). However, this patch also updates `TestProgressReporting.py` and `TestDiagnosticReporting.py` to make use of this new helper class. Differential Revision: https://reviews.llvm.org/D121977 Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
2022-02-25Reland "[lldb/test] Fix TestProgressReporting.py race issue with the event ↵Med Ismail Bennani
listener" This patch relands commit 3e3e79a9e4c378b59f5f393f556e6a84edcd8898, and fixes the memory sanitizer issue described in D120284, by removing the output arguments from the LLDB_INSTRUMENT_VA invocation. Differential Revision: https://reviews.llvm.org/D120599 Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
2022-02-25Revert "[lldb/test] Fix TestProgressReporting.py race issue with the event ↵Michael Forster
listener" This reverts commit 3e3e79a9e4c378b59f5f393f556e6a84edcd8898. MemorySanitizer: use-of-uninitialized-value
2022-02-23[lldb/test] Fix TestProgressReporting.py race issue with the event listenerMed Ismail Bennani
This patch is a follow-up of D120100 to address some feedbacks from @labath. This should mainly fix the race issue with the even listener by moving the listener setup to the main thread. This also changes the SBDebugger::GetProgressFromEvent SWIG binding arguments to be output only, so the user don't have to provide them. Finally, this updates the test to check it the out arguments are returned in a tuple and re-enables the test on all platforms. Differential Revision: https://reviews.llvm.org/D120284 Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
2022-02-18[lldb/bindings] Expose the progress reporting machinery to the SWIG interfaceMed Ismail Bennani
This patch defines the SBDebugger::eBroadcastBitProgress enum in the SWIG interface and exposes the SBDebugger::{GetProgressFromEvent,GetBroadcaster} methods as well. This allows to exercise the API from the script interpreter using python. Differential Revision: https://reviews.llvm.org/D120100 Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>