summaryrefslogtreecommitdiff
path: root/lldb/test/API/commands/process/attach/TestProcessAttach.py
AgeCommit message (Collapse)Author
2024-02-15[lldb] Fix Python test formatting (NFC)Jonas Devlieghere
2023-09-21I can't make this test fail locally, but it is failing on the macOSJim Ingham
bots as well. I'll have to figure out a different way to test this.
2023-09-20The test: test_run_then_attach_wait_interrupt was flakey on Linux & Windows.Jim Ingham
I changed the test so I could tell whether the problem was sometimes the interrupt was failing, or maybe the was just racy. It failed again, but in the new failures we waited 20 seconds for the attach-wait to get interrupted and that never happened. So there seems to be some real raciness in the feature of interrupting an attach-wait, but only on Linux & Windows. The bug fix that this test was testing was for a bug that would cause us to never try to interrupt in this case. So it looks like this test is uncovering some flakiness in the underlying interrupt support when in this state. That's a separate bug that needs fixing. For now, I disabled the test except on macOS where it seems to run reliably.
2023-09-20Revert "Remove some raciness from the ↵Daniel Thornburgh
TestProcessAttach.test_run_then_attach_wait_interrupt" This reverts commit df93c4ffdf220630ecceba5c9a7822c0aca7deaa. This change is breaking the LLDB CI builders, e.g. https://lab.llvm.org/buildbot/#/builders/68/builds/60350
2023-09-20Remove some raciness from the ↵Jim Ingham
TestProcessAttach.test_run_then_attach_wait_interrupt command. We were reading the command output right after sending the interrupt, but sometimes that wasn't long enough for the command result text to have been emitted. I added a poll for the state change to eStateExited, and then added a bit more sleep to give the command a chance to complete.
2023-09-20Revert "Fix a bug with cancelling "attach -w" after you have run a process ↵David Spickett
previously (#65822)" This reverts commit 7265f792dc8e1157a3874aee5f8aed6d4d8236e7. The new test case is flaky on Linux AArch64 (https://lab.llvm.org/buildbot/#/builders/96) and more flaky on Windows on Arm (https://lab.llvm.org/buildbot/#/builders/219/builds/5735).
2023-09-19A test was changing directory and then incorrectly restoring the directoryJim Ingham
to the "testdir" which is the build directory for that test, not the original source directory. That caused subsequent tests to fail.
2023-09-19Fix a bug with cancelling "attach -w" after you have run a process ↵jimingham
previously (#65822) The problem is that the when the "attach" command is initiated, the ExecutionContext for the command has a process - it's the exited one from the previour run. But the `attach wait` creates a new process for the attach, and then errors out instead of interrupting when it finds that its process and the one in the command's ExecutionContext don't match. This change checks that if we're returning a target from GetExecutionContext, we fill the context with it's current process, not some historical one.
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-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
2021-10-13[lldb] Skip several lldb tests that are flaky on WindowsStella Stamenova
These tests fail every 10 or so runs on Windows causing both local failures as well as buildbot failures. Differential Revision: https://reviews.llvm.org/D111659
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-09-29Make "process attach -c" work correctly, and add a test for it.Jim Ingham
The issue here was that we were not updating the interpreter's execution context when calling HandleCommand to continue the process. Since we had just created the process, it wasn't in the interpreter's execution context so HandleCommand failed at CheckRequirements. The patch fixes that by passing the process execution context directly to HandleCommand. Differential Revision: https://reviews.llvm.org/D110787
2021-07-29Fix typoAdrian Prantl
2021-07-29Simplify testcase to use v instead of p (NFC)Adrian Prantl
2021-01-19[lldb/test] Skip TestProcessAttach: ↵Stella Stamenova
test_attach_to_process_from_different_dir_by_id on Windows This test is flakey on Windows and on failure it hangs causing the test suite to fail and future builds (on the buildbot, especially) to fail because they cannot re-write the files that are currently in use
2020-12-20[lldb] [test] Update test status for NetBSDMichał Górny
2020-12-17[lldb] [POSIX-DYLD] Update the cached exe path after attachMichał Górny
Fix the POSIX-DYLD plugin to update the cached executable path after attaching. Previously, the path was cached in DYLDRendezvous constructor and not updated afterwards. This meant that if LLDB was attaching to a process (e.g. via connecting to lldb-server), the code stored the empty path before DidAttach() resolved it. The fix updates the cached path in DidAttach(). This fixes a new instance of https://llvm.org/pr17880 Differential Revision: https://reviews.llvm.org/D92264
2020-11-10[lldb] [Process/NetBSD] Copy the recent improvements from FreeBSDMichał Górny
Copy the recent improvements from the FreeBSDRemote plugin, notably: - moving event reporting setup into SetupTrace() helper - adding more debug info into SIGTRAP handling - handling user-generated (and unknown) SIGTRAP events - adding missing error handling to the generic signal handler - fixing attaching to processes - switching watchpoint helpers to use llvm::Error - minor style and formatting changes This fixes a number of tests, mostly related to fixed attaching. Differential Revision: https://reviews.llvm.org/D91167
2020-07-14[lldb/Test] Always set the cleanupSubprocesses tear down hookJonas Devlieghere
Always clean up subprocesses on tear down instead of relying on the caller to do so. This is not only less error prone but also means the tests can be more concise. Differential revision: https://reviews.llvm.org/D83787
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