summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test
Commit message (Collapse)AuthorAgeFilesLines
* 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
* Make LLDB's clang module cache path customizableAdrian Prantl2018-02-092-6/+13
| | | | | | | | | | | This patch makes LLDB's clang module cache path customizable via settings set target.clang-modules-cache-path <path> and uses it in the LLDB testsuite to reuse the same location inside the build directory for LLDB and clang. Differential Revision: https://reviews.llvm.org/D43099 llvm-svn: 324775
* [lldb-mi] This test now passes consistently, unXFAIL it.Davide Italiano2018-02-091-1/+0
| | | | llvm-svn: 324768
* [Testsuite] Remove leak tests, it's not useful anymore.Davide Italiano2018-02-093-141/+0
| | | | | | | | | This only worked on MacOS, which now ships a newer version of python without this bug. As such, we don't leak the fd, and this test is not needed anymore (as it also hardcoded the python version in the check). llvm-svn: 324743
* Only throw -fPIC when building a shared libraryAaron Smith2018-02-0819-36/+15
| | | | | | | | | | | | | | | | | | Summary: Update makefiles to specify -fPIC in Makefile.rules and only throw -fPIC when building a shared library. This change is necessary to allow building the lldb tests on Windows where -fPIC is not a valid option. Update a few places to Python 3.x syntax Reviewers: zturner, lldb-commits Reviewed By: zturner Subscribers: stella.stamenova, labath, llvm-commits Differential Revision: https://reviews.llvm.org/D42994 llvm-svn: 324671
* Rewrite testcase to not depend on Foundation implementation details.Adrian Prantl2018-02-087-31/+22
| | | | | | | | TODO: Add a separate testcase testing *only* Foundation implementation details! <rdar://problem/37252738> llvm-svn: 324655
* Rewrite the flaky test_restart_bug test in a more deterministic wayPavel Labath2018-02-083-88/+93
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The test was trying to reproduce a bug in handling of two concurrent events, which was impossible to do reliably in a black-box style test. In practice, this meant the test was only ever failing on remote targets, as these were slow enough to trigger this. Fortunately, we now have the ability to mock the server side of the connection, which means we can simulate the failure deterministically, so I rewrite the test to use the new gdb-client framework. I've needed to add a couple of new packets to the mock server to be able to do this. Instead of trying to guess how a "typical" gdb-client test will want to handle this, I throw an exception in the implementation to force the user to override them (the packets are only sent if the test explicitly performs some action which will trigger them, so a basic test which e.g. does not need the "continue" functionality will not need to implement them). Reviewers: owenpshaw Subscribers: srhines, lldb-commits Differential Revision: https://reviews.llvm.org/D42959 llvm-svn: 324590
* Deactivate TestTargetSymbolsBuildidCase if host is windowsEugene Zemtsov2018-02-082-1/+2
| | | | | | Makefile has unix magic and thus not working on windows. llvm-svn: 324558
* [test] Don't drop existing categories for methods.Jonas Devlieghere2018-02-071-7/+10
| | | | | | | | | The change in r324488 dropped the existing category attribute in for instance methods. This patch corrects that. Differential revision: https://reviews.llvm.org/D43024 llvm-svn: 324492
* [test] Enable setting category for inline tests.Jonas Devlieghere2018-02-071-2/+7
| | | | | | | | | Inlined tests have a test function that is actually an instance method, which requires a slightly different approach when it comes to setting the category attribute. The attribute must be set on the actual function, rather than on a particular instance. llvm-svn: 324488
* Remove obsolete fileAdrian Prantl2018-02-062-208/+0
| | | | llvm-svn: 324400
* Build each testcase variant in its own subdirectory and remove the srcdir ↵Adrian Prantl2018-02-0613-148/+131
| | | | | | | | | | | | | | lock file This patch creates a <test>.dwarf, <test>.dwo, etc., build directory for each testcase variant. Most importantly, this eliminates the need for the per-test lock file in the source directory. Tests that are marked as NO_DEBUG_INFO_TESTCASE and build with buildDefault() are built in a <test>.default build directory. Differential Revision: https://reviews.llvm.org/D42763 llvm-svn: 324368
* [testsuite] Skip a flakey test.Davide Italiano2018-02-051-0/+1
| | | | llvm-svn: 324293
* Disable test_restart_bug failing on AndroidEugene Zemtsov2018-02-051-0/+1
| | | | llvm-svn: 324288
* [lang/Objc] UNXFAIL a test. Nullability has been implemented in clang.Davide Italiano2018-02-051-1/+0
| | | | | | | | (a while ago). <rdar://problem/20416388> llvm-svn: 324280
* Skip TestTargetSymbolsSepDebugSymlink on remote targetsPavel Labath2018-02-051-0/+1
| | | | | | | Currently, our behavior when installing symlinks on the remote target is broken (pr36237). llvm-svn: 324236
* TestLinuxCore -- add a check for thread namePavel Labath2018-02-051-10/+19
| | | | | | | We've had a bug (fixed by https://reviews.llvm.org/D42828) where the thread name was being read incorrectly. Add a test for this behavior. llvm-svn: 324230
* [test] Un-XFAIL TestRaise.RaiseTestCase.test_restart_bugJonas Devlieghere2018-02-051-4/+0
| | | | | | | | This test was marked as an expected failure because of PR20231 but it seems to consistently result in an unexpected success across the bots. Let's try to re-enable this test again. llvm-svn: 324227
* [dotest] make debug info variant accessible in setUp()Pavel Labath2018-02-055-41/+29
| | | | | | | | | | | | | | | | | | | | | | | Summary: This changes the way we store the debug info variant to make it available earlier in the test bringup: instead of it being set by the test wrapper method, it is set as a *property* of the wrapper method. This way, we can inspect it as soon as self.testMethodName is initialized. The retrieval is implemented by a new function TestBase.getDebugInfo(), and all that's necessary to make it work is to change self.debug_info into self.getDebugInfo(). While searching for debug_info occurences i noticed that TestLogging is being replicated for no good reason, so I removed the replication there. Reviewers: aprantl, jingham Subscribers: eraman, JDevlieghere, lldb-commits Differential Revision: https://reviews.llvm.org/D42836 llvm-svn: 324226
* Resolve binary symlinks before finding its separate .debug fileJan Kratochvil2018-02-053-0/+45
| | | | | | | | | | | | | | | | | | | | | | I have found LLDB cannot find separate debug info of Fedora /usr/bin/gdb. It is because: lrwxrwxrwx 1 root root 14 Jan 25 20:41 /usr/bin/gdb -> ../libexec/gdb* -rwxr-xr-x 1 root root 10180296 Jan 25 20:41 /usr/libexec/gdb* ls: cannot access '/usr/lib/debug/usr/bin/gdb-8.0.1-35.fc27.x86_64.debug': No such file or directory -r--r--r-- 1 root root 29200464 Jan 25 20:41 /usr/lib/debug/usr/libexec/gdb-8.0.1-35.fc27.x86_64.debug FYI that -8.0.1-35.fc27.x86_64.debug may look confusing, it was always just .debug before. Why is /usr/bin/gdb a symlink is offtopic for this bugreport, Fedora has it so for some reasons. It is always safest to look at the .debug file only after resolving all symlinks on the binary file. Differential revision: https://reviews.llvm.org/D42853 llvm-svn: 324224
* Fix upper->lower case for /usr/lib/debug/.build-id/**.debugJan Kratochvil2018-02-053-0/+44
| | | | | | | | | | | | | I have found the lookup by build-id (when lookup by /usr/lib/debug/path/name/exec.debug failed) does not work as LLDB tries the build-id hex string in uppercase but Fedora uses lowercase. xubuntu-16.10 also uses lowercase during my test: /usr/lib/debug/.build-id/6c/61f3566329f43d03f812ae7057e9e7391b5ff6.debug Differential revision: https://reviews.llvm.org/D42852 llvm-svn: 324222
* Add the ability to restrict the breakpoint to a moduleJim Ingham2018-02-021-4/+13
| | | | | | for run_to_{source,name}_breakpoint. llvm-svn: 324119
OpenPOWER on IntegriCloud