summaryrefslogtreecommitdiff
path: root/lldb/test/API/tools/lldb-server/attach-wait/TestGdbRemoteAttachWait.py
AgeCommit message (Collapse)Author
2024-05-17[lldb] Fixed the test TestGdbRemoteAttachWait running on a remote target ↵Dmitry Vasilyev
(#92413) Install `_exe_to_attach` to a remote target if necessary.
2024-02-21[lldb][test] Modernize asserts (#82503)Jordan Rupprecht
This uses [teyit](https://pypi.org/project/teyit/) to modernize asserts, as recommended by the [unittest release notes](https://docs.python.org/3.12/whatsnew/3.12.html#id3). For example, `assertTrue(a == b)` is replaced with `assertEqual(a, b)`. This produces better error messages, e.g. `error: unexpectedly found 1 and 2 to be different` instead of `error: False`.
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
2022-07-07[lldb/test] Use the shim executable for TestGdbRemoteAttach*Or*Wait as wellPavel Labath
Without it, the test may nondeterminstically fail due to YAMA restrictions. Also, merge the two tests into one to reduce duplication.
2022-07-07Recommit "[lldb/test] Don't use preexec_fn for launching inferiors"Pavel Labath
This recommits b15b1421, which reverted in was reverted in f51c47d98 due to failures on apple systems. The problem was that the patch introduced a race where the debug server could start the attach process before the first process (which isn't supposed to be attached to) was set up. This caused us to attach to the wrong process. The new version introduces additional synchronization to ensure that does not happen. Original commit message was: As the documentation states, using this is not safe in multithreaded programs, and I have traced it to a rare deadlock in some of the tests. The reason this was introduced was to be able to attach to a program from the very first instruction, where our usual mechanism of synchronization -- waiting for a file to appear -- does not work. However, this is only needed for a single test (TestGdbRemoteAttachWait) so instead of doing this everywhere, I create a bespoke solution for that single test. The solution basically consists of outsourcing the preexec_fn code to a separate (and single-threaded) shim process, which enables attaching and then executes the real program. This pattern could be generalized in case we needed to use it for other tests, but I suspect that we will not be having many tests like this. This effectively reverts commit a997a1d7fbe229433fb458bb0035b32424ecf3bd.
2022-07-05Revert "[lldb/test] Don't use preexec_fn for launching inferiors"Jonas Devlieghere
This reverts commit b15b1421bc9a11b318b65b489e5fd58dd917db1f because it breaks GreenDragon [1]. The bot has been red for several days, so reverting to green while I take a look. [1] https://green.lab.llvm.org/green/view/LLDB/job/lldb-cmake/45012/
2022-07-01[lldb/test] Don't use preexec_fn for launching inferiorsPavel Labath
As the documentation states, using this is not safe in multithreaded programs, and I have traced it to a rare deadlock in some of the tests. The reason this was introduced was to be able to attach to a program from the very first instruction, where our usual mechanism of synchronization -- waiting for a file to appear -- does not work. However, this is only needed for a single test (TestGdbRemoteAttachWait) so instead of doing this everywhere, I create a bespoke solution for that single test. The solution basically consists of outsourcing the preexec_fn code to a separate (and single-threaded) shim process, which enables attaching and then executes the real program. This pattern could be generalized in case we needed to use it for other tests, but I suspect that we will not be having many tests like this. This effectively reverts commit a997a1d7fbe229433fb458bb0035b32424ecf3bd.