summaryrefslogtreecommitdiff
path: root/lldb/test/API/functionalities/thread/concurrent_events
AgeCommit message (Collapse)Author
2025-02-06[lldb][NFC] Remove old skipIfOutOfTreeDebugserver's (#126144)Jason Molenda
When a test depends on a new debugserver feature/fix, the API test must be marked @skipIfOutOfTreeDebugserver because the macOS CI bots test using the latest Xcode release debugserver. But over time all of these fixes & new features are picked up in the Xcode debugserver and these skips can be removed. We may see unexpected test failures from removing all of these 1+ year old skips, but that's likely a separate reason the test is failing that is being papered over by this skip.
2024-05-15[lldb][test][FreeBSD] Fix some concurrent event tests (#84155)David Spickett
A lot of `TestConcurrent*.py` expect one of the threads to crash, but we weren't checking for it properly. Possibly because signal reporting got better on FreeBSD at some point, and it now shows the same info as Linux does. ``` lldb-api :: functionalities/inferior-changed/TestInferiorChanged.py lldb-api :: functionalities/inferior-crashing/TestInferiorCrashing.py lldb-api :: functionalities/inferior-crashing/TestInferiorCrashingStep.py lldb-api :: functionalities/inferior-crashing/recursive-inferior/TestRecursiveInferior.py lldb-api :: functionalities/inferior-crashing/recursive-inferior/TestRecursiveInferiorStep.py lldb-api :: functionalities/thread/concurrent_events/TestConcurrentCrashWithBreak.py lldb-api :: functionalities/thread/concurrent_events/TestConcurrentCrashWithSignal.py lldb-api :: functionalities/thread/concurrent_events/TestConcurrentCrashWithWatchpoint.py lldb-api :: functionalities/thread/concurrent_events/TestConcurrentCrashWithWatchpointBreakpointSignal.py ``` Fixes #48777 `TestConcurrentTwoBreakpointsOneSignal.py` no longer fails, at least on an AWS instance, so I've removed the xfail there.
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-08-11[lldb] Remove unused "import unittest2" statementsDave Lee
2022-08-05Reapply the commits to enable accurate hit-count detection for watchpoints.Jim Ingham
This commit combines the initial commit (7c240de609af), a fix for x86_64 Linux (3a0581501e76) and a fix for thinko in a last minute rewrite that I really should have run the testsuite on. Also, make sure that all the "I need to step over watchpoint" plans execute before we call a public stop. Otherwise, e.g. if you have N watchpoints and a Signal, the signal stop info will get us to stop with the watchpoints in a half-done state. Differential Revision: https://reviews.llvm.org/D130674
2022-07-18Revert "Make hit point counts reliable for architectures that stop before ↵Jim Ingham
evaluation." This reverts commit 5778ada8e54edb2bc2869505b88a959d1915c02f. The watchpoint tests all stall on aarch64-ubuntu bots. Reverting till I can get my hands on an system to test this out.
2022-07-18Make hit point counts reliable for architectures that stop before evaluation.Jim Ingham
Since we want to present the "new & old" values for watchpoint hits, on architectures, including the ARM family, that stop before the triggering instruction is run, we need to single step over the instruction before stopping for realz. This was incorrectly done directly in the StopInfoWatchpoint::ShouldStop. That causes problems if more than one thread stops "for a reason" at the same time as the watchpoint, since the other actions didn't expect the process to make progress in this part of the execution control machinery. The correct way to do this is to schedule the step over using ThreadPlans, and then to restore the stop info after that plan stops, so that the rest of the stop info actions can happen when all the other threads have handled their immediate actions as well. Differential Revision: https://reviews.llvm.org/D129814
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-07Skip TestConcurrentWatchBreak.py on Darwin arm64Jason Molenda
This test depends on multiple threads with one of them hitting a watchpoint at the same time as a breakpoint, and can fail because of the way arm64 watchpoints are handled. I added skips to most of these via ``` commit bef4da4a6aef8196f007f44e3e9c8e3419ffb623 Author: Jason Molenda <jason@molenda.com> Date: Wed May 25 16:05:16 2022 -0700 Skip testing of watchpoint hit-count/ignore-count on multithreaded ``` but missed that this test is susceptable to the same issue.
2022-05-25Skip testing of watchpoint hit-count/ignore-count on multithreadedJason Molenda
Skip all watchpoint hit-count/ignore-count tests for multithreaded API tests for now on arm64 Darwin. On AArch64, insns that trigger a WP are rolled back and we are notified. lldb needs to disable the WP, insn step, re-enable it, then report it to the user. lldb only does this full step action for the "selected thread", and so when a program stops with multiple threads hitting a stop reason, some of them watchpoints, any non-selected-thread will not be completed in this way. But all threads with the initial watchpoint exception will have their hit-count/ignore-counts updated. When we resume execution, the other threads sitting at the instruction will again execute & trigger the WP exceptoin again, repeating until we've gone through all of the threads. This bug is being tracked in llvm.org/pr49433 and inside apple in rdar://93863107
2022-03-04[LLDB] Remove cases of using namespace stdShafik Yaghmour
We had using namespace std; sprinkled around several source files and tests. Differential Revision: https://reviews.llvm.org/D120966
2022-01-05[lldb/linux] Fix a race in handling of simultaneous thread exitsPavel Labath
D116372, while fixing one kind of a race, ended up creating a new one. The new issue could occur when one inferior thread exits while another thread initiates termination of the entire process (exit_group(2)). With some bad luck, we could start processing the exit notification (PTRACE_EVENT_EXIT) only to have the become unresponsive (ESRCH) in the middle of the MonitorCallback function. This function would then delete the thread from our list even though it wasn't completely dead (it stays zombified until we read the WIFEXITED event). The linux kernel will not deliver the exited event for the entire process until we process individual thread exits. In a pre-D116372 world, this wouldn't be a problem because we would read this event (even though we would not know what to do with it) with waitpid(-1). Now, when we issue invididual waitpids, this event will never be picked up, and we end up hanging. The fix for this is actually quite simple -- don't delete the thread in this situation. The thread will be deleted when the WIFEXITED event comes. This situation was kind of already tested by TestCreateDuringInstructionStep (which is how I found this problem), but it was mostly accidental, so I am also creating a dedicated test which reproduces this situation.
2021-12-30[lldb] Remove lldbtest.getBuildFlagsPavel Labath
It was being used only in some very old tests (which pass even without it) and its implementation is highly questionable. These days we have different mechanisms for requesting a build with a particular kind of c++ library (USE_LIB(STD)CPP in the makefile).
2021-08-11[lldb] Skip TestConcurrent.* watchpoint tests for Darwin on ARMJonas Devlieghere
All TestConcurrent.* tests that involve watchpoints are broken on ARM-based Darwin platforms, including Apple Silicon. rdar://81811539
2021-03-10[lldb] [test] Update XFAILs for FreeBSD/aarch64Michał Górny
2020-12-20[lldb] [test] Update test status for NetBSDMichał Górny
2020-10-27[lldb] [Process/FreeBSDRemote] Enable watchpoint supportMichał Górny
Replace the inline x86 watchpoint handling code with the reusable NativeRegisterContextWatchpoint_x86. Implement watchpoint support in NativeThreadFreeBSD and SIGTRAP handling for watchpoints. Un-skip all concurrent_events tests as they pass with the new plugin. Differential Revision: https://reviews.llvm.org/D90102
2020-02-20[lldb] Remove license headers from all test source filesRaphael Isemann
Summary: Around a third of our test sources have LLVM license headers. This patch removes those headers from all test sources and also fixes any tests that depended on the length of the license header. The reasons for this are: * A few tests verify line numbers and will start failing if the number of lines in the LLVM license header changes. Once I landed my patch for valid SourceLocations in debug info we will probably have even more tests that verify line numbers. * No other LLVM project is putting license headers in its test files to my knowledge. * They make the test sources much more verbose than they have to be. Several tests have longer license headers than the actual test source. For the record, the following tests had their line numbers changed to pass with the removal of the license header: lldb-api :: functionalities/breakpoint/breakpoint_by_line_and_column/TestBreakpointByLineAndColumn.py lldb-shell :: Reproducer/TestGDBRemoteRepro.test lldb-shell :: Reproducer/TestMultipleTargets.test lldb-shell :: Reproducer/TestReuseDirectory.test lldb-shell :: ExecControl/StopHook/stop-hook-threads.test lldb-shell :: ExecControl/StopHook/stop-hook.test lldb-api :: lang/objc/exceptions/TestObjCExceptions.py Reviewers: #lldb, espindola, JDevlieghere Reviewed By: #lldb, JDevlieghere Subscribers: emaste, aprantl, arphaman, JDevlieghere, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D74839
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