summaryrefslogtreecommitdiff
path: root/lldb/test/API/tools/lldb-server/TestGdbRemoteThreadsInStopReply.py
AgeCommit message (Collapse)Author
2024-02-16[lldb] Replace assertEquals with assertEqual (NFC) (#82073)Jonas Devlieghere
assertEquals is a deprecated alias for assertEqual and has been removed in Python 3.12. This wasn't an issue previously because we used a vendored version of the unittest module. Now that we use the built-in version this gets updated together with the Python version used to run the test suite.
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-23[lldb] Skip test_stop_reply_contains_thread_pcs on WindowsDavid Spickett
I marked this as expected to fail, but it doesn't always fail, and an unexpected success is a failure. Skip it instead.
2023-02-23[LLDB] Mark test_stop_reply_contains_thread_pcs as an expected failure on ↵David Spickett
Windows This has been flaky on the Windows on Arm LLDB bot. https://lab.llvm.org/buildbot/#/builders/219/builds/826 Given that test_stop_reply_reports_multiple_threads is already expected to fail on Windows, this is not suprising.
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-02-09[lldb] Account for extra threads in TestGdbRemoteThreadsInStopReply on windowsPavel Labath
After 9611282c, TestGdbRemoteThreadsInStopReply is not non-deterministic -- instead it deterministically fails due to extra threads created by std::thread thread pool. Adjust the tests to account for that.
2022-02-09[lldb] Adjust windows xfails for D119167Pavel Labath
A couple of additional tests pass with that patch. One new test fails (because it's not testing a slightly different thing). I'll update it later to restore the original meaning (I don't want to revert as the net effect is still very positive), but for now this gets the bot green.
2022-02-09[lldb/test] Remove sleeps from some lldb-server testsPavel Labath
Instead of using sleeps, have the inferior notify us (via a trap opcode) that the requested number of threads have been created. This allows us to get rid of some fairly dodgy test utility code -- wait_for_thread_count seemed like it was waiting for the threads to appear, but it never actually let the inferior run, so it only succeeded if the threads were already started when the function was called. Since the function was called after a fairly small delay (1s, usually), this is probably the reason why the tests were failing on some bots. Differential Revision: https://reviews.llvm.org/D119167
2020-12-27[lldb/test] Automatically skip remote lldb-server tests when applicablePavel Labath
The tests don't work with remote debugservers. This isn't a problem with any particular test, but the test infrastructure itself, which is why each of these tests has a @skipIfDarwinEmbedded decorator. This patch replaces that with a central category-based solution. It also moves the ad-hoc windows skipping mechanism there too.
2020-12-22[lldb/test] Add GdbRemoteTestCaseFactory to avoid duplication in lldb-server ↵Pavel Labath
tests This uses the same approach as the debug info tests to avoid needing to explicitly spell out the two kinds of tests. I convert a handful of tests to the new mechanism. The rest will be converted in follow-up patches.
2020-12-18[lldb/test] Reduce boilerplate in lldb-server testsPavel Labath
Nearly all of our lldb-server tests have two flavours (lldb-server and debugserver). Each of them is tagged with an appropriate decorator, and each of them starts with a call to a matching "init" method. The init calls are mandatory, and it's not possible to meaningfully combine them with a different decorator. This patch leverages the existing decorators to also tag the tests with the appropriate debug server tag, similar to how we do with debug info flavours. This allows us to make the "init" calls from inside the common setUp method.
2020-07-17[lldb] Unify sleep and time outs in GDB remote testcasesJonas Devlieghere
Reduce sleep and time outs in GDB remote testcases to one default value for each. Stop passing these values around and always use the default instead. Differential revision: https://reviews.llvm.org/D83904
2020-04-07Revert "[lldb-server] jThreadsInfo returns stack memory"Muhammad Omair Javaid
This reverts commit a53bf9b7c8f1ca950226a55c0e99fd706a7b6ad2.
2020-04-06[lldb-server] jThreadsInfo returns stack memoryJaroslav Sevcik
This patch adds parts of the stack that should be useful for unwinding to the jThreadsInfo reply from lldb-server. We return the top of the stack (12 words), and we also try to walk the frame pointer linked list and return the memory containing frame pointer and return address pairs. The idea is to cover the cases with and without frame pointer omission. Differential Revision: https://reviews.llvm.org/D74398
2020-02-13[lldb] Replace assertTrue(a == b, "msg") with assertEquals(a, b, "msg") in ↵Raphael Isemann
the test suite Summary: The error message from the construct `assertTrue(a == b, "msg") ` are nearly always completely useless for actually debugging the issue. This patch is just replacing this construct (and similar ones like `assertTrue(a != b, ...)` with the proper call to assertEqual or assertNotEquals. This patch was mostly written by a shell script with some manual verification afterwards: ``` lang=python import sys def sanitize_line(line): if line.strip().startswith("self.assertTrue(") and " == " in line: line = line.replace("self.assertTrue(", "self.assertEquals(") line = line.replace(" == ", ", ", 1) if line.strip().startswith("self.assertTrue(") and " != " in line: line = line.replace("self.assertTrue(", "self.assertNotEqual(") line = line.replace(" != ", ", ", 1) return line for a in sys.argv[1:]: with open(a, "r") as f: lines = f.readlines() with open(a, "w") as f: for line in lines: f.write(sanitize_line(line)) ``` Reviewers: labath, JDevlieghere Reviewed By: labath Subscribers: abidh, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D74475
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