summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test
Commit message (Collapse)AuthorAgeFilesLines
...
* Skip tail call frame tests when dwarf_version < 4Vedant Kumar2019-08-239-8/+17
| | | | | | rdar://problem/54656572 llvm-svn: 369821
* [LLDB] Address post-commit code review feedback.Jonas Devlieghere2019-08-231-2/+0
| | | | | | | This patch addresses Adrian McCarthy's code review feedback in https://reviews.llvm.org/D66447 llvm-svn: 369731
* 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
* [lldb][NFC] Add test for target stop-hook disable/enable/deleteRaphael Isemann2019-08-221-5/+28
| | | | llvm-svn: 369646
* [test] Update test so it matches the Windows outputJonas Devlieghere2019-08-211-3/+3
| | | | llvm-svn: 369595
* When building file without debug info, include the architectureJason Molenda2019-08-211-1/+5
| | | | | | setting in the cflags on Darwin systems. llvm-svn: 369584
* Add char8_t support (C++20)Jonas Devlieghere2019-08-213-0/+53
| | | | | | | | | | | | This patch adds support for the char8_t type introduced in C++20 char8_t. The original patch was submitted by James Blachly on the LLDB mailing list [1]. I modified the patch a bit and added a test. [1] http://lists.llvm.org/pipermail/lldb-dev/2019-August/015393.html Differential revision: https://reviews.llvm.org/D66447 llvm-svn: 369582
* [lldb][NFC] Merge multiple TestApropos.pyRaphael Isemann2019-08-212-26/+10
| | | | | | That's cleaner and makes lldb-dotest no longer fail due to conflicting names. llvm-svn: 369530
* [lldb] Add tests for 'settings remove' and fix error message typosRaphael Isemann2019-08-211-0/+39
| | | | llvm-svn: 369524
* [lldb] Add tests for setting completions and enable 'settings remove' completionRaphael Isemann2019-08-211-0/+18
| | | | llvm-svn: 369521
* [lldb][NFC] Add tests for register commandRaphael Isemann2019-08-211-0/+13
| | | | llvm-svn: 369513
* [lldb][NFC] Add tests for invalid command invocationsRaphael Isemann2019-08-216-0/+93
| | | | llvm-svn: 369506
* Update a few tests that may change the platform to save & restoreJason Molenda2019-08-214-4/+31
| | | | | | | | | | | 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
* [dotest] Don't set the DWARF version override in CFLAGS_EXTRA.Jonas Devlieghere2019-08-202-6/+5
| | | | | | | | We cannot override the DWARF version in the CFLAGS_EXTRA because they are used by tests that explicitly build without debug info. Instead, we pass them through the regular CFLAGS. llvm-svn: 369477
* [LLDB][Test] Remove `skipIfWindows` for conditional breakpoint test (NFC)Med Ismail Bennani2019-08-201-8/+0
| | | | | | | | | | | | | | | | | | | | | Summary: The test for conditional breakpoints on Windows was skipped because there was no expression evaluation support at the time it was written. After removing the annotation and testing it again, the test is passing. http://lists.llvm.org/pipermail/lldb-dev/2019-August/015405.html Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com> Reviewers: stella.stamenova, jingham Subscribers: lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D66499 llvm-svn: 369453
* [lldb][NFC] Test quotes when completingRaphael Isemann2019-08-201-0/+26
| | | | llvm-svn: 369353
* [lldb] Fix typo on the BreakpointLocation header and the lldbtest.py (NFC)Med Ismail Bennani2019-08-191-3/+5
| | | | | | | | | | | | | | | Summary: This commit fixes some typo I found while exploring LLDB's codebase. Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com> Subscribers: lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D66452 llvm-svn: 369313
* [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
* [lldb] Make TestIOHandlerCompletion more stable and document itRaphael Isemann2019-08-191-1/+4
| | | | | | | | | | Instead of relying that three tabs show all completions, we should show all remaining completions which will always stop the mode where we show completions. Should fix this test on systems that somehow have more completions that our normal LLDB (as they would end up being stuck in the mode where we show completions). llvm-svn: 369293
* [dotest] Add --dwarf-version to override the tested DWARF version.Jonas Devlieghere2019-08-195-7/+22
| | | | | | | | | | | | | On the matrix bot on GreenDragon [1] we want to run the test suite against different DWARF versions. The idea here is not to replace targeted tests for certain DWARF features, but rather to provide an easy way to support this configuration. [1] http://green.lab.llvm.org/green/view/LLDB/job/lldb-cmake-matrix/ Differential revision: https://reviews.llvm.org/D66370 llvm-svn: 369272
* [lldb][NFC] Add a few more completion tests to increase test coverageRaphael Isemann2019-08-191-0/+23
| | | | | | | These tests are mostly trying to reach the different completion functions in CommandCompletions.cpp (::ArchitectureNames, ::DiskFiles, ::Modules). llvm-svn: 369249
* Stop-hooks weren't getting called on step-out. Fix that.Jim Ingham2019-08-153-0/+65
| | | | | | | | | | | | | | | | There was a little bit of logic in the StopInfoBreakpoint::PerformAction that would null out the StopInfo once we had a completed plan so that the next call to GetStopInfo would replace it with the StopInfoThreadPlan. But the stop-hooks check for whether a thread stopped for a reason didn't trigger this conversion. So I added an API to do that directly, and then called it where before we just reset the StopInfo. <rdar://problem/54270767> Differential Revision: https://reviews.llvm.org/D66241 llvm-svn: 369052
* Change test to use uint64_t to support compiling for 32-bit architectures.Adrian Prantl2019-08-151-2/+2
| | | | llvm-svn: 369034
* Improve anonymous class heuristic in ClangASTContext::CreateRecordTypeShafik Yaghmour2019-08-144-10/+15
| | | | | | | | | Summary: Currently the heuristic used in ClangASTContext::CreateRecordType to identify an anonymous class is that there is that name is a nullptr or simply a null terminator. This heuristic is not accurate since it will also sweep up unnamed classes and lambdas. The improved heuristic relies on the requirement that an anonymous class must be contained within a class. Differential Revision: https://reviews.llvm.org/D66175 llvm-svn: 368937
* [API] Have SBCommandReturnObject::GetOutput/Error return "" instead of nullptrPavel Labath2019-08-142-2/+17
| | | | | | | | | | | | | | | | | | | | | | | Summary: It seems this was an unintended side-effect of D26698. AFAICT, these functions did return an empty string before that patch, and the patch contained code which attempted to ensure that, but those efforts were negated by ConstString::AsCString, which by default returns a nullptr even for empty strings. This patch: - fixes the GetOutput/Error methods to really return empty strings - adds and explicit test for that - removes a workaround in lldbtest.py, which was masking this problem from our other tests Reviewers: jingham, clayborg Subscribers: zturner, lldb-commits Differential Revision: https://reviews.llvm.org/D65739 llvm-svn: 368806
* Update Python tests for lldb-server on WindowsAaron Smith2019-08-1417-17/+87
| | | | | | | | | | | | | | | | 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] Add basic IOHandler completion testRaphael Isemann2019-08-132-0/+63
| | | | | | | | | We have no test coverage for the IOHandler code that is doing the completion in the command line. This is adding a pexpect-based test as a preparation for the switch to using CompletionRequest in the whole completion machinery. llvm-svn: 368679
* Revert "[lldb] Fix dynamic_cast by no longer failing on variable without ↵Stella Stamenova2019-08-125-65/+0
| | | | | | | | metadata" This reverts commit b448d1bf212219febbb182d00c210bad1bd25e7f. llvm-svn: 368615
* [lldb] Fix dynamic_cast by no longer failing on variable without metadataRaphael Isemann2019-08-105-0/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Our IR rewriting infrastructure currently fails when it encounters a variable which has no metadata associated. This causes dynamic_cast to fail as in this case IRForTarget considers the type info pointers ('@_ZTI...') to be variables without associated metadata. As there are no variables for these internal variables, this is actually not an error and dynamic_cast would work fine if we didn't throw this error. This patch fixes this by removing this diagnostics code. In case we would actually hit a variable that has no metadata (but is supposed to have), we still have the error in the expression log so this shouldn't make it harder to diagnose any missing metadata errors. This patch should fix dynamic_cast and also adds a bunch of test coverage to that language feature. Fixes rdar://10813639 Reviewers: davide, labath Reviewed By: labath Subscribers: friss, labath, abidh, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D65932 llvm-svn: 368511
* Adjust a ValueObjectChild's offset when the child is a bitfieldAdrian Prantl2019-08-072-0/+11
| | | | | | | | | | | | | | | | | | If a bitfield doesn't fit into the child_byte_size'd window at child_byte_offset, move the window forward until it fits. The problem here is that Value has no notion of bitfields and thus the Value's DataExtractor is sized like the bitfields CompilerType; a sequence of bitfields, however, can be larger than their underlying type. This was not in the big-endian-derived DWARF 2 bitfield attributes because their offsets were counted from the end of the window, so they always fit. rdar://problem/53132189 Differential Revision: https://reviews.llvm.org/D65492 llvm-svn: 368226
* Fix ClangASTContext::CreateParameterDeclaration to not call addDeclShafik Yaghmour2019-08-026-0/+71
| | | | | | | | | Summary: The change https://reviews.llvm.org/D55575 modified ClangASTContext::CreateParameterDeclaration to call decl_ctx->addDecl(decl); this caused a regression since the existing code in DWARFASTParserClang::ParseChildParameters is called with the containing DeclContext. So when end up with cases where we are parsing a parameter for a member function and the parameter is added to the CXXRecordDecl as opposed to the CXXMethodDecl. This example is given in the regression test TestBreakpointInMemberFuncWNonPrimitiveParams.py which without this fix in a modules build leads to assert on setting a breakpoint in a member function with non primitive parameters. This scenario would be common when debugging LLDB or clang. Differential Revision: https://reviews.llvm.org/D65414 llvm-svn: 367726
* [Formatters] Temporarily disable libc++ std::function formatter due to ↵Shafik Yaghmour2019-08-021-0/+3
| | | | | | | | | | performance issue Summary: We have been seeing increased reports of performance issue around large project and formatting std::function variables especially in functions signatures in back traces. There are some possible fixes but exploring those fixes may take time and it is better to temporarily disable the formatter due to its impact and re-enable it once we have a fix. Differential Revision: https://reviews.llvm.org/D65666 llvm-svn: 367701
* [lldb][NFC] Remove unused imports in python testsRaphael Isemann2019-08-02513-1022/+0
| | | | llvm-svn: 367663
* Fix `skipIfSanitized` decorator on macOSJonas Devlieghere2019-08-013-8/+7
| | | | | | | | | | | For security reasons, DYLD_INSERT_LIBRARIES is not propagated to a child process. This breaks the skipIfSanitized decorator, which checks for the environment variable being set. Instead, always set the ASAN_OPTIONS and make the decorator check for that. Differential revision: https://reviews.llvm.org/D65594 llvm-svn: 367595
* Fix TestThreadSpecificBreakpoint on WindowsAdrian McCarthy2019-08-012-15/+14
| | | | | | | | | | | | | | | | | | This test was frequently hanging on Windows, causing a timeout after 10 minutes. The short delay (100 microsecond) in the sample program could cause a deadlock in the Windows thread pool, as I've explained in the test program's comments. Now that it doesn't hang, it passes reliably, so I've removed the Windows-specific XFAIL. I've tried to clarify the comments in TestThreadSpecificGBreakpoint.py by eliminating some redundancy and typos, and I simplified away a couple unnecessary assignments. Differential Revision: https://reviews.llvm.org/D65546 llvm-svn: 367573
* Fix completion for functions in anonymous namespacesJonas Devlieghere2019-07-312-0/+6
| | | | | | | | | | | | | | | | | I was going through some of the old bugs and came across PR21069 which I was able to reproduce. The issue is that we match the regex `^foo` against the `DW_AT_name` in the DWARF, which for our anonymous function is indeed `foo`. However, when we get the function name from the symbol context, the result is `(anonymous namespace)::foo()`. This throws off completions, which assumes that it's appending to whatever is already present on the input, resulting in a bogus `b fooonymous\ namespace)::foo()`. Bug report: https://llvm.org/PR21069 Differential revision: https://reviews.llvm.org/D65498 llvm-svn: 367455
* [lldb][NFC] Check in completion crash test caseRaphael Isemann2019-07-313-0/+18
| | | | llvm-svn: 367420
* [lldb][NFC] Check in another crashing test caseRaphael Isemann2019-07-313-0/+18
| | | | llvm-svn: 367416
* [lldb][NFC] Check in completion crash test in lambdaRaphael Isemann2019-07-313-0/+13
| | | | llvm-svn: 367411
* [dotest] Remove multiprocessingJonas Devlieghere2019-07-304-1887/+4
| | | | | | | | | | | Now that the Xcode project is removed, I want to focus on dotest as a test framework, and remove its driver capabilities for which we already rely on llvm's lit. Removing multiprocessing is the first step in that direction. Differential revision: https://reviews.llvm.org/D65311 llvm-svn: 367331
* [lldb][NFC] Fix import-std-module tests that relied on fix-its to passRaphael Isemann2019-07-302-5/+5
| | | | | | | These tests currently pass, but they rely on fix-its in our expression parser to pass because they have some typos. llvm-svn: 367309
* [lldb] Fix crash when tab-completing in multi-line exprRaphael Isemann2019-07-303-0/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Tab completing inside the multiline expression command can cause LLDB to crash. The easiest way to do this is to go inside a frame with at least one local variable and then try to complete: (lldb) expr 1. a[tab] Reason for this was some mixup when we calculate the cursor position. Obviously we should calculate the offset inside the string by doing 'end - start', but we are doing 'start - end' (which causes the offset to become -1 which will lead to some out-of-bounds reading). Fixes rdar://51754005 I don't see any way to test this as the *multiline* expression completion is completely untested at the moment and I don't think we have any existing code for testing infrastructure for it. Reviewers: shafik, davide, labath Reviewed By: labath Subscribers: abidh, lldb-commits, davide, clayborg, labath Tags: #lldb Differential Revision: https://reviews.llvm.org/D64995 llvm-svn: 367308
* [lldb][NFC] Check in crashing test caseRaphael Isemann2019-07-303-0/+19
| | | | llvm-svn: 367307
* [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] [test] Mark newly running test XFAIL on NetBSDMichal Gorny2019-07-301-0/+1
| | | | | | | | The test was not previously run due to decorator bug (fixed in r366903). It is not a regression and is probably related to the other failing test, so just disable it. llvm-svn: 367285
* Test load unloading of modules with libraries-svr4Antonio Afonso2019-07-291-0/+40
| | | | | | | | | | | | | | | | | | Summary: This doubles the 3 tests running right now on linux by also executing each test with libraries-svr4 enabled. Not sure if there's a better way to do this as I had to copy/paste all the decorators as well... Reviewers: labath, clayborg, xiaobai Reviewed By: labath Subscribers: srhines, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D65129 llvm-svn: 367247
* [lldb] Increase testsuite packet-timeout 5secs -> 1minJan Kratochvil2019-07-295-14/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | 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] [test] Mark three new tests XFAIL on NetBSDMichal Gorny2019-07-292-0/+3
| | | | llvm-svn: 367228
OpenPOWER on IntegriCloud