summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test/tools
Commit message (Collapse)AuthorAgeFilesLines
* [lldb-vscode] Centrally skip debug info variants for vscode testsPavel Labath2019-12-1710-25/+2
| | | | Previously each test was annotated manually. This does the same thing.
* [lldb] Use file-based synchronization in TestVSCode_attachPavel Labath2019-12-162-14/+26
| | | | The is the best method we have at the moment for attach-style tests.
* [lldb][NFC] Remove 'from __future__ import print_function' from all tests ↵Raphael Isemann2019-12-1328-28/+0
| | | | | | | | | | | | | | | | | | | | | that don't actually call 'print()' Summary: A lot of tests do this trick but the vast majority of them don't even call `print()`. Most of this patch was generated by a script that just looks at all the files and deletes the line if there is no `print (` or `print(` anywhere else in the file. I checked the remaining tests manually and deleted the import if we never call print (but instead do stuff like `expr print(...)` and similar false-positives). I also corrected the additional empty lines after the import in the files that I manually edited. Reviewers: JDevlieghere, labath, jfb Reviewed By: labath Subscribers: dexonsmith, wuzish, nemanjai, kbarton, christof, arphaman, abidh, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D71452
* The field ‘totalFrames’ which is total number of frames available, is ↵Serhiy Redko2019-12-092-7/+27
| | | | | | | | | | | | mandatory in StackTraces response for VSCode extension that implements DAP and declares capability 'supportsDelayedStackTraceLoading': "The debug adapter supports the delayed loading of parts of the stack, which requires that both the 'startFrame' and 'levels' arguments and the 'totalFrames' result of the 'StackTrace' request are supported." Lack of this field makes VSCode incorrectly display stack traces information D71034
* [lldb] Remove Xfail decorators from steadily passing testsMuhammad Omair Javaid2019-12-092-9/+3
| | | | | This patch removes xfail decorator from some lldb testcases which are passing steadily now for past few week/months on aarch64/linux buildbot.
* [lldb] [test] Un-XFAIL lldb-server tests fixed on NetBSDMichał Górny2019-11-261-2/+0
|
* [lldb] [Process/NetBSD] Improve threading supportMichał Górny2019-11-251-0/+149
| | | | | | | | | | | | | | | | | | | | | | | | | Implement major improvements to multithreaded program support. Notably, support tracking new and exited threads, associate signals and events with correct threads and support controlling individual threads when resuming. Firstly, use PT_SET_EVENT_MASK to enable reporting of created and exited threads via SIGTRAP. Handle TRAP_LWP events to keep track of the currently running threads. Secondly, update the signal (both generic and SIGTRAP) handling code to account for per-thread signals correctly. Signals delivered to the whole process are reported on all threads, while per-thread signals and events are reported only to the specific thread. The remaining threads are marked as 'stopped with no reason'. Note that NetBSD always stops all threads on debugger events. Thirdly, implement the ability to set every thread as running, stopped or single-stepping separately while continuing the process. This also provides the ability to send a signal to the whole process or to one of its thread while resuming. Differential Revision: https://reviews.llvm.org/D70022
* [lldb-vscode] Fix a race in test_extra_launch_commandsPavel Labath2019-11-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The test used a non-stopping "run" command to launch the process. This is different from the regular launch with no extra launch commands, which uses eLaunchFlagStopAtEntry to ensure that the process stops straight away. I'm not really sure what's supposed to happen in non-stop-at-entry mode, or if that's even supported, but what ended up happening was the launch packet got a reply while the process was running. Then the test case did a continue_to_next_stop(), which queued a *second* resume request (along with the internal "resumes" which were being issued as a part of normal process startup). These two resumes ended up chasing each other's tails inside lldb in a way which produced hilarious log traces. Surprisingly, the test ended up passing most of the time, but it did cause spurious failures when the test seemed to miss a breakpoint. This changes the test to use stop-at-entry mode in the manual launch sequence too, which seems to be enough to make the test pass reliably. Reviewers: clayborg, kusmour, jankratochvil Subscribers: lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D70127
* [lldb] [test] Un-XFAIL one lldb-server test on NetBSDMichał Górny2019-11-201-1/+0
|
* [lldb] [test] XFAIL more lldb-server tests on NetBSDMichał Górny2019-11-181-0/+11
|
* [lldb] [Process/NetBSD] Implement thread name gettingMichał Górny2019-11-182-2/+1
| | | | | | | Implement thread name getting sysctl() on NetBSD. Also fix the incorrect type in pthread_setname_np() in the relevant test. Differential Revision: https://reviews.llvm.org/D70363
* [lldb] [test] Enable lldb-server tests on NetBSD, and set XFAILsMichał Górny2019-11-1810-0/+19
| | | | Differential Revision: https://reviews.llvm.org/D70335
* [lldb-vscode] support the completion requestWalter Erquinigo2019-11-156-2/+154
| | | | | | | | | | | | | | | | Summary: The DAP has a completion request that has been unimplemented. It allows showing autocompletion tokens inside the Debug Console. I implemented it in a very simple fashion mimicking what the user would see when autocompleting an expression inside the CLI. There are two cases: normal variables and commands. The latter occurs when a text is prepepended with ` in the Debug Console. These two cases work well and have tests. Reviewers: clayborg, aadsm Subscribers: lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D69873
* [lldb] Re-enable VSCode testsJonas Devlieghere2019-11-118-24/+3
| | | | | | | The VSCode tests were all disabled on macOS because the implementation had some issues that resulted in flakiness on Darwin. It seems most of these issues have been addressed. I've re-enabled all the tests that consistently passed locally.
* Found more timeouts to unify.Adrian Prantl2019-10-213-5/+7
| | | | llvm-svn: 375454
* Unify timeouts in gdbserver tests and ensure they are larger if ASAN is enabled.Adrian Prantl2019-10-215-8/+10
| | | | llvm-svn: 375431
* Fix an inverted condition in test.Adrian Prantl2019-10-171-3/+3
| | | | llvm-svn: 375127
* Increase gdbremote_testcase timeouts when running under ASAN.Adrian Prantl2019-10-151-5/+12
| | | | llvm-svn: 374906
* Skip Apple simulator test for all remote testing scenarios.Frederic Riss2019-10-091-3/+3
| | | | | | | The test makes no sense to run remotely, period. The architecture of the target is not the discriminant here. llvm-svn: 374217
* [Testsuite] Get rid of most of the recursive shared library MakefilesFrederic Riss2019-10-083-21/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Most of the secondary Makefiles we have are just a couple variable definitions and then an include of Makefile.rules. This patch removes most of the secondary Makefiles and replaces them with a direct invocation of Makefile.rules in the main Makefile. The specificities of each sub-build are listed right there on the recursive $(MAKE) call. All the variables that matter are being passed automagically by make as they have been passed on the command line. The only things you need to specify are the variables customizating the Makefile.rules logic for each image. This patch also removes most of the clean logic from those Makefiles and from Makefile.rules. The clean rule is not required anymore now that we run the testsuite in a separate build directory that is wiped with each run. The patch leaves a very crude version of clean in Makefile.rules which removes everything inside of $(BUILDDIR). It does this only when the $(BUILDDIR) looks like a sub-directory of our standard testsuite build directory to be extra safe. Reviewers: aprantl, labath Subscribers: lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D68558 llvm-svn: 374076
* Revert: [lldb] [testsuite] Remove redundant MAKE_DSYM := NOJan Kratochvil2019-09-273-0/+3
| | | | | | | | | | Revert: llvm-svn: 373061 It broke OSX testsuite: https://reviews.llvm.org/D67589#1686150 lldb/packages/Python/lldbsuite/test/macosx/function-starts/TestFunctionStarts.py llvm-svn: 373110
* [lldb] [testsuite] Remove redundant MAKE_DSYM := NOJan Kratochvil2019-09-273-3/+0
| | | | | | | According to a comment by Pavel Labath: https://reviews.llvm.org/D67589#inline-612375 llvm-svn: 373061
* Canonicalize variable usage in testsuite MakefilesAdrian Prantl2019-09-252-2/+2
| | | | | | | | | | | | This test streamlines our use of variables that are expected by Makefile.rules throughout the test suite. Mostly it replaced potentially dangerous overrides and updates of variables like CFLAGS with safe assignments to variables reserved for this purpose like CFLAGS_EXTRAS. Differential Revision: https://reviews.llvm.org/D67984 llvm-svn: 372795
* [dotest] Centralize initialization commands even morePavel Labath2019-09-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: In r367234 we introduced a central place to hold the set up commands for the various ways we have of launching lldb. However, a number of commands still remained outside of that. This patch moves the remaining set up commands into this function, which allows us to remove manual clang module path setting code in TestBatchMode. One unfortunate victim of this approach is TestSTTYBeforeAndAfter which, due to how it launches lldb (pexpect->expect->lldb), fails get the quoting right. It would be possible to fix the quoting there, it would be a bit icky, and none of the commands in this list are really relevant for what this test is doing, so I just remove the commands outright. Reviewers: JDevlieghere, jankratochvil Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D67173 llvm-svn: 371019
* Upstream macCatalyst support in debugserver and the macOS dynamic loaderAdrian Prantl2019-09-041-0/+1
| | | | | | | | | | | plugin. Unfortunately the test is currently XFAILed because of missing changes to the clang driver. Differential Revision: https://reviews.llvm.org/D67124 llvm-svn: 370931
* [dotest] Avoid the need for LEVEL= makefile boilerplatePavel Labath2019-09-0415-45/+15
| | | | | | | | | | | | | | | | | | | | | | | Summary: Instead of each test case knowing its depth relative to the test root, we can just have dotest add the folder containing Makefile.rules to the include path. This was motivated by r370616, though I have been wanting to do this ever since we moved to building tests out-of-tree. The only manually modified files in this patch are lldbinline.py and plugins/builder_base.py. The rest of the patch has been produced by this shell command: find . \( -name Makefile -o -name '*.mk' \) -exec sed --in-place -e '/LEVEL *:\?=/d' -e '1,2{/^$/d}' -e 's,\$(LEVEL)/,,' {} + Reviewers: teemperor, aprantl, espindola, jfb Subscribers: emaste, javed.absar, arichardson, christof, arphaman, lldb-commits Differential Revision: https://reviews.llvm.org/D67083 llvm-svn: 370845
* TestAppleSimulatorOSType: Pass the --standalone argument to simctlFrederic Riss2019-08-221-1/+1
| | | | | | | | It looks like running without this argument was supported for legacy reasons, but a Xcode 11 beta made the argument mandatory for our usecase. llvm-svn: 369709
* Update a few tests that may change the platform to save & restoreJason Molenda2019-08-211-0/+8
| | | | | | | | | | | the platform in the setUp/tearDown methods. I want to migrate the re-instatement of the correct plaform to the setUp base method but haven't had time to look at that yet, so I want to land this handful of fixes until I get to it. Differential revision: https://reviews.llvm.org/D66331 llvm-svn: 369484
* [lldb-vscode] add `launchCommands` to handle launch specific commandsAlex Langford2019-08-193-14/+96
| | | | | | | | | | | | | | Summary: This can help `lldb-vscode` handle launch commands associate with remote platform attach request have field `attachCommands` to handle attach specific commands add a corresponding one for launch request if no launch command is provided, create a new target and launch; otherwise, execute the launch command Differential Revision: https://reviews.llvm.org/D65363 Patch by Wanyi Ye <kusmour@gmail.com> llvm-svn: 369296
* Update Python tests for lldb-server on WindowsAaron Smith2019-08-1416-15/+85
| | | | | | | | | | | | | | | | Summary: Thanks to Hui Huang and reviewers for all the help with this patch! Reviewers: labath, jfb, clayborg Reviewed By: labath Subscribers: Hui, clayborg, dexonsmith, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D61687 llvm-svn: 368776
* Initial support for native debugging of x86/x64 Windows processesAaron Smith2019-08-131-5/+5
| | | | | | | | | | | | | | | | Summary: Thanks to Hui Huang and the reviewers for all the help with this patch. Reviewers: labath, Hui, jfb, clayborg, amccarth Reviewed By: labath Subscribers: amccarth, compnerd, dexonsmith, mgorny, jfb, teemperor, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D63165 llvm-svn: 368759
* [lldb][NFC] Remove unused imports in python testsRaphael Isemann2019-08-0216-23/+0
| | | | llvm-svn: 367663
* [lldb] [test/lldb-vscode] Use realpath to match vscode behaviorMichal Gorny2019-07-301-2/+4
| | | | | | | | | | | Compare the directory paths returned by lldb-vscode against realpaths rather than apparent paths. This matches lldb-vscode behavior and therefore fixes test failures when one of the parent directories of the source tree is a symlink. Differential Revision: https://reviews.llvm.org/D65432 llvm-svn: 367291
* [lldb] [test/lldb-vscode] Use os.path.dirname() [NFC]Michal Gorny2019-07-301-5/+5
| | | | | | | Replace os.path.split()[0] with os.path.dirname(). Suggested by Pavel Labath in D65432. llvm-svn: 367290
* [lldb] Increase testsuite packet-timeout 5secs -> 1minJan Kratochvil2019-07-292-9/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | rL357954 did increase `packet-timeout` 1sec -> 5secs. Which is IMO about the maximum timeout reasonable for regular use. But for testsuite I think the timeout should be higher as the testsuite runs in parallel and it can be run even on slow hosts and with other load (moreover if it runs on some slow arch). I have chosen 60 secs, that should be enough hopefully. Larger value could make debugging with hanging `lldb-server` annoying. This patch was based on this testsuite timeout: http://lab.llvm.org:8014/builders/lldb-x86_64-fedora/builds/546/steps/test/logs/stdio FAIL: test_connect (TestGDBRemoteClient.TestGDBRemoteClient) Test connecting to a remote gdb server ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/jkratoch/slave-lldb-x86_64-fedora/lldb-x86_64-fedora/llvm/tools/lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestGDBRemoteClient.py", line 13, in test_connect process = self.connect(target) File "/home/jkratoch/slave-lldb-x86_64-fedora/lldb-x86_64-fedora/llvm/tools/lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/gdbclientutils.py", line 480, in connect self.assertTrue(error.Success(), error.description) AssertionError: False is not True : failed to get reply to handshake packet Differential Revision: https://reviews.llvm.org/D65271 llvm-svn: 367234
* [lldb] [Process/NetBSD] Report stopped process on SIGSTOPMichal Gorny2019-07-251-2/+0
| | | | | | | | | | | | | Mark the process as stopped when SIGSTOP arrives. This is necessary for lldb-server to generate correct response to 'process interrupt', and therefore to prevent the whole stack crashing when process is stopped. Thanks to Pavel Labath for the tip. Differential Revision: https://reviews.llvm.org/D65289 llvm-svn: 367047
* [lldb][test_suite] Update tests with unexpected pass on Android aarch64Alex Langford2019-07-231-1/+0
| | | | | | | | | | Summary: update some test decorates that can actually pass on andriod aarch64 Patch by Wanyi Ye <kusmour@gmail.com> Differential Revision: https://reviews.llvm.org/D64767 llvm-svn: 366858
* [lldb] Fix occasional hangs of VSCode testcasesJan Kratochvil2019-07-231-7/+1
| | | | | | | | | | | | | | | | | | | | | | On slower machines the vscode testcases were sometimes hanging: 1910 ? Sl 0:00 | \_ /usr/bin/python .../llvm/tools/lldb/test/dotest.py ... -p TestVSCode_setBreakpoints.py 2649 ? Sl 0:00 | \_ .../build/bin/lldb-vscode 2690 ? S 0:00 | \_ .../build/bin/lldb-server gdbserver --fd=9 --native-regs --setsid 2708 ? t 0:00 | \_ .../build/lldb-test-build.noindex/tools/lldb-vscode/breakpoint/TestVSCode_setBreakpoints.test_functionality/a.out A reproducer of the racy bug for send_recv(): # self.send_packet(command) #+ import time #+ time.sleep(1) # done = False I guess `request_continue` was probably originally intended to be synchronous but then it isn't and this code has been leftover there. Differential revision: https://reviews.llvm.org/D65163 llvm-svn: 366850
* Revert "Revert "Implement xfer:libraries-svr4:read packet""Antonio Afonso2019-07-238-1/+226
| | | | | | This reverts commit 08c38f77c5fb4d3735ec215032fed8ee6730b3db. llvm-svn: 366847
* Restore tests for lldb-server and lldb-vscode removed at rL366590Antonio Afonso2019-07-2263-0/+10564
| | | | | | | | | | | | | | | | Summary: This was removed here rL366590 by accident. Reviewers: xiaobai, jfb Reviewed By: xiaobai Subscribers: dexonsmith, srhines, krytarowski, jfb, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D65123 llvm-svn: 366766
* [lldb][NFC] Cleanup mentions and code related to lldb-miRaphael Isemann2019-07-19111-15069/+0
| | | | | | | | | | | | | | | | Summary: lldb-mi has been removed, but there are still a bunch of references in the code base. This patch removes all of them. Reviewers: JDevlieghere, jfb Reviewed By: JDevlieghere Subscribers: dexonsmith, ki.stfu, mgorny, abidh, jfb, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D64992 llvm-svn: 366590
* Revert "Implement xfer:libraries-svr4:read packet"Pavel Labath2019-07-018-226/+1
| | | | | | | | | | | | | | | | | | | D62502, together with D62503 have broken the builds which have XML support enabled. Reverting D62503 (r364355) fixed that, but has broken has left some of the tests introduced by D62502 broken more or less nondeternimistically (it depended on whether the system happens to place the library list near unreadable pages of memory). I attempted to make a partial fix for this in r364748, but Jan Kratochvil pointed out that this reintroduces the problem which reverting D62503 was trying to solve. So instead, I back out the whole thing so we can get back to a clean slate that works for everyone. We can figure out a way forward from there. This reverts r364748, r363772 and r363707. llvm-svn: 364751
* Stabilize TestGdbRemoteLibrariesSvr4SupportPavel Labath2019-06-191-3/+6
| | | | | | | | | | | | | | on some systems this test fails because the two methods it uses to cross-reference the data don't match in the case of the vdso module. The "read from /proc/%pid/maps" method returns "[vdso]", while the method which reads it from the linker rendezvous structures returns "linux-vdso.so.1". Neither of the two names match any actual file. This restricts the test to only consider the libraries that we ourselves have added to the test, minimizing the impact of system dependencies that we cannot control. llvm-svn: 363772
* Implement xfer:libraries-svr4:read packetAntonio Afonso2019-06-188-1/+223
| | | | | | | | | | | | | | | | | | | Summary: This is the fourth patch to improve module loading in a series that started here (where I explain the motivation and solution): D62499 Implement the `xfer:libraries-svr4` packet by adding a new function that generates the list and then in Handle_xfer I generate the XML for it. The XML is really simple so I'm just using string concatenation because I believe it's more readable than having to deal with a DOM api. Reviewers: clayborg, xiaobai, labath Reviewed By: labath Subscribers: emaste, mgorny, srhines, krytarowski, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D62502 llvm-svn: 363707
* [lldb] [test] Extend D55859 symbols.enable-external-lookup=false for more ↵Jan Kratochvil2019-06-171-2/+6
| | | | | | | | | | | | | | | | | | | | | | testcases D55859 <https://reviews.llvm.org/D55859> has no effect for some of the testcases so this patch extends it even for (all?) other testcases known to me. LLDB was failing when LLDB prints errors reading system debug infos (`*-debuginfo.rpm`, DWZ-optimized) which should never happen as LLDB testcases should not be affected by system debug infos. `lldb/packages/Python/lldbsuite/test/api/multithreaded/driver.cpp.template` is using only SB API which does not expose `ModuleList` so I had to call `HandleCommand()` there. `lldb-test.cpp` could also use `HandleCommand` and then there would be no need for `ModuleListProperties::SetEnableExternalLookup()` but I think it is cleaner with API and not on based on text commands. Differential Revision: https://reviews.llvm.org/D63339 llvm-svn: 363567
* [lldb-server] Support 'g' packetsPavel Labath2019-05-306-44/+218
| | | | | | | Differential Revision: https://reviews.llvm.org/D62221 Patch by Guilherme Andrade <guiandrade@google.com>. llvm-svn: 362063
* [lldb-mi] Include full path in the -data-disassemble responseTatyana Krasnukha2019-05-211-0/+8
| | | | | | | | Differential Revision: https://reviews.llvm.org/D59015 Patch by Anton Kolesov <Anton.Kolesov@synopsys.com> llvm-svn: 361255
* [lldb] [test] Skip one more TestMiBreak on NetBSDMichal Gorny2019-05-151-1/+1
| | | | llvm-svn: 360800
* @skipIfLinux flaky lldb-mi testsPavel Labath2019-05-132-1/+3
| | | | llvm-svn: 360564
* Fix TestVSCode_attach on LinuxStella Stamenova2019-05-091-4/+7
| | | | | | The test is failing sometimes because the debugger is failing to attach for lack of permissions. The fix is to call lldb_enable_attach inside the inferior main function llvm-svn: 360371
OpenPOWER on IntegriCloud