summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test
Commit message (Collapse)AuthorAgeFilesLines
* Including <functional> for std::bindRaphael Isemann2018-03-051-0/+1
| | | | | | Differential Revision: https://reviews.llvm.org/D44099 llvm-svn: 326727
* Mark ObjC testcase as skipUnlessDarwin and fix a typo in test function.Adrian Prantl2018-03-021-1/+2
| | | | llvm-svn: 326640
* Don't compile testcase with clang modules enabled.Adrian Prantl2018-03-022-2/+1
| | | | | | | It isn't actually necessary for what we are testing here and should fix the test on the Linux bots. llvm-svn: 326634
* Make the clang module cache setting available without a targetAdrian Prantl2018-03-026-2/+55
| | | | | | | | | | | | | | | It turns out that setting the clang module cache after LLDB has a Target can be too late. In particular, the Swift language plugin needs to know the setting without having access to a Target. This patch moves the setting into the *LLDB* module cache, where it is a global setting that is available before any Target is created and more importantly, is shared between all Targets. rdar://problem/37944432 Differential Revision: https://reviews.llvm.org/D43984 llvm-svn: 326628
* [testsuite] Remove workaround for categories and inline tests.Jonas Devlieghere2018-03-021-9/+6
| | | | | | | | | | | | | | | | Adding categories to inline tests does not work because the attribute is set at the function level. For methods, this means it applies to all instances of that particular class. While this is what we want in most cases, it's not for inline tests, where different instances correspond to different tests. With the workaround in place, assigning a category to one test resulted in the category applied to *all* inline tests. This patch removes the workaround and throws an exception with an informative error message, to prevent this from happening in the future. llvm-svn: 326552
* Speed up TestWatchpointMultipleThreadsPavel Labath2018-03-022-120/+41
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: The inferior was sleeping before doing any interesting work. I remove that to make the test faster. While looking at the purpose of the test (to check that watchpoints are propagated to all existing threads - r140757) I noticed that the test has diverged from the original intention and now it creates the threads *after* the watchpoint is set (this probably happened during the std::thread refactor). After some discussion, we decided both scenarios make sense, so I modify the test to test both. The watchpoint propagation functionality is not really debug info depenent, so I also stop replication of this test. This brings the test's time from ~108s down to 4s. Reviewers: davide, jingham Subscribers: aprantl, lldb-commits Differential Revision: https://reviews.llvm.org/D43857 llvm-svn: 326514
* Make TestDynamicValueSameBase gcc-compatiblePavel Labath2018-03-011-3/+7
| | | | | | | | | | gcc will say that the type of "this" is "T * const", clang "T *". Compare the unqualified type names to erase the difference between the two, as the constness is not a part of this test. FWIW, I think that the gcc behavior makes more sense here. llvm-svn: 326449
* [test] Restore cleanup behavior in TestQuoting.pyVedant Kumar2018-03-011-1/+1
| | | | | | | | | | Before the change to compile tests out-of-tree, the cleanup classmethod in TestQuoting.py would remove a temp file. After the change it threw an exception due to a malformed call to getBuildArtifact(). Bring back the old behavior. llvm-svn: 326414
* We were getting the wrong dynamic type if there were two classes with the ↵Jim Ingham2018-03-013-0/+99
| | | | | | | | | | | | | | same basename. There's a bug in FindTypes, it ignores the exact flag if you pass a name that doesn't begin with :: and pass eTypeClassAny for the type. In this case we always know that the name we get from the vtable name is absolute so we can work around the bug by prepending the "::". This doesn't fix the FindTypes bug. <rdar://problem/38010986> llvm-svn: 326412
* Adapt some tests to work with PPC64le architecturePavel Labath2018-02-284-4/+7
| | | | | | | | | | | | | | | Summary: Merge branch 'master' into adaptPPC64tests Reviewers: clayborg, alexandreyy, labath Reviewed By: clayborg, alexandreyy Subscribers: luporl, lbianc, alexandreyy, lldb-commits Differential Revision: https://reviews.llvm.org/D42917 Patch by Ana Julia Caetano <ana.caetano@eldorado.org.br>. llvm-svn: 326369
* Revert "[lldb] Use vFlash commands when writing to target's flash memory ↵Pavel Labath2018-02-281-61/+0
| | | | | | | | | | | | regions" This reverts commit r326261 as it introduces inconsistencies in the handling of load addresses for ObjectFileELF -- some parts of the class use physical addresses, and some use virtual. This has manifested itself as us not being able to set the load address of the vdso "module" on android. llvm-svn: 326367
* Fix lldbinline tests for remote targetsPavel Labath2018-02-271-1/+1
| | | | | | | | | | r326140 exposed the fact that we are not actually running inline tests on remote targets. The tests fail to launch the inferior in the first place because they passed an invalid working directory to the launch function. This should fix that. llvm-svn: 326264
* [lldb] Use vFlash commands when writing to target's flash memory regionsPavel Labath2018-02-271-0/+61
| | | | | | | | | | | | | | | | | | | | | | Summary: When writing an object file over gdb-remote, use the vFlashErase, vFlashWrite, and vFlashDone commands if the write address is in a flash memory region. A bare metal target may have this kind of setup. - Update ObjectFileELF to set load addresses using physical addresses. A typical case may be a data section with a physical address in ROM and a virtual address in RAM, which should be loaded to the ROM address. - Add support for querying the target's qXfer:memory-map, which contains information about flash memory regions, leveraging MemoryRegionInfo data structures with minor modifications - Update ProcessGDBRemote to use vFlash commands in DoWriteMemory when the target address is in a flash region Original discussion at http://lists.llvm.org/pipermail/lldb-dev/2018-January/013093.html Reviewers: clayborg, labath Reviewed By: labath Subscribers: arichardson, emaste, mgorny, lldb-commits Differential Revision: https://reviews.llvm.org/D42145 Patch by Owen Shaw <llvm@owenpshaw.net> llvm-svn: 326261
* Move TestGdbRemoteExitCode next to the other llgs testsPavel Labath2018-02-273-363/+0
| | | | | | | This test contained a copy of the inferior used by most of llgs test. This was done to enable better paralelization, but now it's irrelevant. llvm-svn: 326218
* Mark test_*int*_t_dwarf as failing on FreeBSDEd Maste2018-02-271-0/+9
| | | | | | | | | | | | Further investigation required; tests will be enabled on the buildbot worker soon. Marking failing tests for now in order to start with a green buildbot while investigation takes place. This is a recommit of r326134, with the required import added. llvm.org/pr36527 llvm-svn: 326166
* Move "concurrent events" tests back into one folderPavel Labath2018-02-2771-348/+4
| | | | | | | | | These tests all test very similar things, and use the same inferior. They were only placed in separate folders to achieve better paralelization. Now that we paralelize at a file level, this is no longer relevant, and we can put them together again. llvm-svn: 326159
* Add a sanity check for inline testcases.Adrian Prantl2018-02-262-0/+10
| | | | | | | | | | | When writing an inline test, there is no way to make sure that any of the inline commands are actually executed, so this patch adds a sanity check that at least one breakpoint was hit. This avoids a test with no breakpoints being hit passing. Differential Revision: https://reviews.llvm.org/D43694 llvm-svn: 326140
* Revert r326134 due to broken buildbotEd Maste2018-02-261-8/+0
| | | | llvm-svn: 326139
* Mark test_*int*_t_dwarf as failing on FreeBSDEd Maste2018-02-261-0/+8
| | | | | | | | | | Further investigation required; tests will be enabled on the buildbot worker soon. Marking failing tests for now in order to start with a green buildbot while investigation takes place. llvm.org/pr36527 llvm-svn: 326134
* Partial fix for TestConflictingSymbol.py on WindowsAdrian McCarthy2018-02-263-4/+4
| | | | | | | | | | | | | | | | | Without this fix, the test ERRORs because the link of the inferior fails. This patch adds the LLDB_TEST_API macro where needed and uses the new -2 magic value for num_expected_locations to account for lazy-loading of module symbols on Windows. With this fix, the test itself still fails: conflicting_symbol isn't in the debug info nor the export table, and Windows binaries don't have an equivalent of the ELF .symtab. We need to understand why the test works to keep the symbol out of the debug info. In the mean time, having the test fail at this point is a better indication of the remaining problem than a build error. Differential Revision: https://reviews.llvm.org/D43688 llvm-svn: 326130
* Add "lldb-test breakpoint" command and convert the case-sensitivity test to ↵Pavel Labath2018-02-263-143/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | use it Summary: The command takes two input arguments: a module to use as a debug target and a file containing a list of commands. The command will execute each of the breakpoint commands in the file and dump the breakpoint state after each one. The commands are expected to be breakpoint set/remove/etc. commands, but I explicitly allow any lldb command here, so you can do things like change setting which impact breakpoint resolution, etc. There is also a "-persistent" flag, which causes lldb-test to *not* automatically clear the breakpoint list after each command. Right now I don't use it, but the idea behind it was that it could be used to test more complex combinations of breakpoint commands (set+modify, set+disable, etc.). Right now the command prints out only the basic breakpoint state, but more information can be easily added there. To enable easy matching of the "at least one breakpoint location found" state, the command explicitly prints out the string "At least one breakpoint location.". To enable testing of breakpoints set with an absolute paths, I add the ability to perform rudimentary substitutions on the commands: right now the string %p is replaced by the directory which contains the command file (so, under normal circumstances, this will perform the same substitution as lit would do for %p). I use this command to rewrite the TestBreakpointCaseSensitivity test -- the test was checking about a dozen breakpoint commands, but it was launching a new process for each one, so it took about 90 seconds to run. The new test takes about 0.3 seconds for me, which is approximately a 300x speedup. Reviewers: davide, zturner, jingham Subscribers: luporl, lldb-commits Differential Revision: https://reviews.llvm.org/D43686 llvm-svn: 326112
* Fix tabs/spaces indentation problem in TestUnicodeSymbols.pyAdrian McCarthy2018-02-261-7/+7
| | | | | | Differential Revision: https://reviews.llvm.org/D43705 llvm-svn: 326095
* Fix breakpoint thread name conditionals after breakpoint options refactor.Jim Ingham2018-02-232-35/+29
| | | | | | PR36435 llvm-svn: 325958
* Replace HashStringUsingDJB with llvm::djbHashPavel Labath2018-02-233-0/+30
| | | | | | | | | | | | | | | | | | | | | | Summary: The llvm function is equivalent to this one. Where possible I tried to replace const char* with llvm::StringRef to avoid extra strlen computations. In most places, I was able to track the c string back to the ConstString it was created from. I also create a test that verifies we are able to lookup names with unicode characters, as a bug in the llvm compiler (it accidentally used a different hash function) meant this was not working until recently. This also removes the unused ExportTable class. Reviewers: aprantl, davide Subscribers: JDevlieghere, lldb-commits Differential Revision: https://reviews.llvm.org/D43596 llvm-svn: 325927
* Fix TestMultithreaded when there's no debugserver specifiedFrederic Riss2018-02-231-1/+1
| | | | | | | r325858 was bogus and would error out with a KeyError when --server was not passed to dotest.py. llvm-svn: 325862
* Fix TestUbsanBasicFrederic Riss2018-02-231-1/+1
| | | | | | | | | | | | | | | Summary: Potentially due to the recent testuite refactorings, this test now reports a full absolute path but expect just the filename. For some reason this test is skipped on GreenDragon so we've never seen the issue. Reviewers: vsk Subscribers: kubamracek, lldb-commits Differential Revision: https://reviews.llvm.org/D43577 llvm-svn: 325859
* Fix TestMultithreaded when specifying an alternative debugserver.Frederic Riss2018-02-231-0/+2
| | | | | | | | | | | | | Summary: This test launches a helper that uses the debugserver. The environment variable sepcifying the debug server wasn't passed to this helper, thus it was using the default one. Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D43546 llvm-svn: 325858
* [testsuite] Throw away test/debug_info/apple_types.Davide Italiano2018-02-233-104/+0
| | | | | | | | | | | | This test was only testing that clang produced the correct informations for __apple accelerated tables. So, it's a clang test. Also, it doesn't require any debugger intervention, the object file can be analyzed statically with a dumper. Also, the input program was highly verbose (unnecessarily). r325850 commits a clang test instead, so it's time to retire this. llvm-svn: 325851
* [ObjC] Fix the NSConcreteData formatter and test itVedant Kumar2018-02-222-2/+14
| | | | | | | The length field of an NSConcreteData lives one word past the start of the object, not two. llvm-svn: 325841
* Fix TestMoveNearest on WindowsAdrian McCarthy2018-02-221-3/+2
| | | | | | | | | | The header file for the DLL tried to declare inline functions and a local function as dllexport which broke the compile and link. Removing the bad declarations solves the problem, and the test passes on Windows now. Differential Revision: https://reviews.llvm.org/D43600 llvm-svn: 325836
* Fix TestSBData.py on WindowsAdrian McCarthy2018-02-221-1/+1
| | | | | | | | | Ensure that the test data is an array of bytes rather than a string that gets encoded differently between Python 2 and Python 3. Differential Revision: https://reviews.llvm.org/D43532 llvm-svn: 325835
* [testsuite/decorators] Get rid of some `expectFlakey` variants.Davide Italiano2018-02-211-27/+0
| | | | | | These seem to be pretty much dead. llvm-svn: 325708
* Fix TestBreakpointInGlobalConstructor for WindowsAdrian McCarthy2018-02-212-3/+5
| | | | | | | | | | | | | | | | | | Summary: This test was failing on Windows because it expected the breakpoint in the dynamic library to be resolved before the process is launched. Since the DLL isn't loaded until the process is launched this didn't work. The fix creates a special value (-2) for num_expected_locations that ignores the actual number of breakpoint locations found. Reviewers: jasonmolenda Subscribers: sanjoy, lldb-commits Differential Revision: https://reviews.llvm.org/D43419 llvm-svn: 325704
* Fix remote tests broken by r325690Pavel Labath2018-02-211-1/+1
| | | | | | | | The patch added an extra argument to the append_to_process_working_directory function. I have somehow missed updating this test, and it did not show up because the code was only run in remote mode. llvm-svn: 325702
* Fix a couple of more tests to not create files in the source treePavel Labath2018-02-217-28/+23
| | | | | | | | | | | | | | | | | | | | | | | | Summary: These were not being flaky, but they're still making the tree dirty. These tests were using lldbutil.append_to_process_working_directory to derive the file path so I fix them by modifying the function to return the build directory for local tests. Technically, now the path returned by this function does not point to the process working directory for local tests, but I think it makes sense to keep the function name, as I think we should move towards launching the process in the build directory (and I intend to change this for the handful of inferiors that actually care about their PWD, for example because they need to create files there). Reviewers: davide, aprantl Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D43506 llvm-svn: 325690
* Fix TestAppleTypesIsProduced after r324226Frederic Riss2018-02-211-1/+1
| | | | | | | | This test was accessing self.debug_info, which doesn't exist anymore. For some reason the macOS bots are skipping this test because they think the compiler is not clang. We'll look into this separately. llvm-svn: 325666
* Avoid dirtying the source tree in breakpoint command testsPavel Labath2018-02-204-92/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The paralelization patch exposed a bunch of cases where we were still touching the source tree (as these tests were now stepping on each others toes and being flaky). This patch removes such issues from breakpoint command tests. Since the only reason they were creating files was to indirectly test whether the breakpoint commands got executed (and plumbing the full build tree path to all places that needed it would be messy) I decided to modify the tests to check for a different side effect instead: modification of a global variable. This also makes the code simpler as checking the value of the global variable is easier, and there is nothing to clean up. As the tests aren't really doing anything debug-info related, I took the opportunity to also mark them as NO_DEBUG_INFO_TESTCASEs. Reviewers: jingham, aprantl Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D43464 llvm-svn: 325570
* Two more dosep-paralellization fallout fixesPavel Labath2018-02-191-32/+14
| | | | | | | | | | | | | | | | The first issue is about the flaky test rerun logic. This was grouping tests by subdir and passing them into walk_and_invoke in the incorrect form. This part can be just deleted as its not needed anymore. The second problem (which I noticed while investigating the first one) was that the "-p" switch was not working in multiprocessing mode. This happened because we were returning None from process_file instead of a tuple full of empty values for tests that did not match the -p regex. Both of these would be caught earlier if python was a more strongly typed language. :/ llvm-svn: 325519
* Add SBDebugger::GetBuildConfiguration and use it to skip an XML testPavel Labath2018-02-192-1/+9
| | | | | | | | | | | | | | | | | | | | | Summary: This adds a SBDebugger::GetBuildConfiguration static function, which returns a SBStructuredData describing the the build parameters of liblldb. Right now, it just contains one entry: whether we were built with XML support. I use the new functionality to skip a test which requires XML support, but concievably the new function could be useful to other liblldb clients as well (making sure the library supports the feature they are about to use). Reviewers: zturner, jingham, clayborg, davide Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D43333 llvm-svn: 325504
* Make gdb-client tests generate binaries in the build treePavel Labath2018-02-191-7/+1
| | | | | | | | | | | These were missed in the great refactor because they were added concurrently with it. Since we started running tests in a more parallel fashion they started to be flaky. This should fix it. Now that we are no longer polluting the source tree, I also delete the bit of custom cleanup code specific to these tests. llvm-svn: 325495
* Shorten socket names in TestPlatformProcessConnectPavel Labath2018-02-161-3/+3
| | | | | | | | | | | The test was generating long unix socket names, and the addition of a new folder in the previous patch pushed it over the limit (although linux has a fairly generous limit for path names, this does not apply to unix sockets). Modify the test to use a shorter name instead. llvm-svn: 325340
* Re-enable lang/objc/modules/TestObjCModulesJonas Devlieghere2018-02-161-4/+0
| | | | | | | | The reason this test was disabled is no longer relevant. However, it didn't turn into an unexpected success because of a syntax error in the test itself. This commit fixes that and re-enables the test. llvm-svn: 325339
* Fix paralelization of remote testsPavel Labath2018-02-161-1/+1
| | | | | | | | | | Since we now can run multiple tests from the same directory at once, we need to include the test name in the remote test directory instead. I'm not sure if the test_number in the remote path is necessary anymore (or even if it was ever necessary), but I choose to leave it in for now. llvm-svn: 325334
* [dosep] Run tests in a more parallel fashionPavel Labath2018-02-162-61/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Due to in-tree builds, we were parallelizing the tests at the directory level. Now that the tests are built out-of-tree, we can remove this limitation and paralelize at file level instead. This decreases test suite time by about 10% for me, which is not world-shattering, but it makes the code slightly simpler and will also allow us to merge tests which were artificially spread over multiple folders (TestConcurrentEvents...) to work-around this limitation. To make this work, I've also needed to include the test file name in the build directory name, as just the test method name is not unique enough (plenty of tests have a test method called "test" or similar). While doing this, I've found a couple of tests that are taking waaay longer then they ought to (TestBreakpointCaseSensitivity -- 90 seconds), which I plan to look into in the future. Reviewers: aprantl Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D43335 llvm-svn: 325322
* @skipIfRemote TestTargetXMLArchPavel Labath2018-02-151-0/+1
| | | | | | The test does not actually connect to any remote targets. llvm-svn: 325250
* Remove vestigial remnants of the test crash info hookPavel Labath2018-02-142-8/+0
| | | | llvm-svn: 325137
* [testsuite] Reintroduce test to check leaking.Davide Italiano2018-02-123-0/+141
| | | | | | | It wasn't python leaking, it was lldb. Thanks to Pavel for the explanation. Pointy-hat to me. llvm-svn: 324919
* Skip TestTargetXMLArch on non-darwin OSsPavel Labath2018-02-121-0/+1
| | | | | | | | | | | | | This test uses XML packets, but libxml is an optional dependency of lldb, and this test fails if it is not present. I'm leaving this enabled on mac, as thats the only platform that's likely to have libxml always available, but ideally we should have a way to skip this based on build configuration. I'll see if I can whip something like that up soon, but for the time being, this unblocks the buildbots. llvm-svn: 324870
* Looks like this fails when built i386 on linux bots, possible targetJason Molenda2018-02-101-0/+1
| | | | | | | | | arch incompat with spec in file so it's rejected and the test fails. will look into this later, will be a test case issue not a test issue; test case may only be valid when lldb is built for/running on an x86_64 system. llvm-svn: 324795
* Add test case for x86_64 architecture recognition in theJason Molenda2018-02-102-1/+122
| | | | | | target.xml packet if it is included. llvm-svn: 324792
OpenPOWER on IntegriCloud