summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite
Commit message (Collapse)AuthorAgeFilesLines
* 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
* Use an alternative approach to prevent Spotlight from indexing the build ↵Adrian Prantl2018-02-022-9/+1
| | | | | | directory. llvm-svn: 324115
* Create a marker for Spotlight to never index $BUILD_DIR.Adrian Prantl2018-02-011-2/+11
| | | | | | | | | | LLDB queries Spotlight to locate .dSYM bundles based on the UUID embedded in a binary, and because the UUID is a hash of filename and .text section, there *will* be conflicts inside $BUILD_DIR. This should fix the broken green dragon bots. llvm-svn: 324019
* Added lldbutil.run_to_name_breakpoint and use it in one test.Jim Ingham2018-02-012-52/+58
| | | | | | | | Using the "run_to_{source,name}_breakpoint will allow us to remove a lot of boiler-plate from the testsuite. We mostly use source breakpoints, but some tests use by name ones so this was needed. llvm-svn: 324010
* Extend windows->android XFAIL on TestLoadUnloadPavel Labath2018-02-011-2/+0
| | | | | | | This fails regardless of the android architecture or compiler used. The important bit is the mismatch in path separators. llvm-svn: 323974
* mock_gdb_server: rectify ack handling codePavel Labath2018-02-011-11/+3
| | | | | | | | | | | | | | | | | The mock server was sending acks back in response to spurious acks from the client, but the client was not prepared to handle these. Most of the time this would work because the only time the client was sending unsolicited acks is after the initial connection, and there reply-ack would get ignored in the "flush all packets from the server" loop which came after the ack. However, this loop had only a 10ms delay, and sometimes this was not enough to catch the reply (which meant the connection got out of sync, and test failed). Since this behavior not consistent with how lldb-server handles this situation (it just ignores the ack), I fix the mock server to do the same. llvm-svn: 323953
* replace os.mkdirs with lldbutil.mkdir_p (NFC)Adrian Prantl2018-01-312-4/+2
| | | | llvm-svn: 323917
* Fix TestMixedDwarfBinary.pyPavel Labath2018-01-311-1/+1
| | | | | | | As of yesterday, tests need to use self.getBuildArtifact() to get the built executable. llvm-svn: 323884
* [lldb] Enable debugging of binaries with mixed (splitted/regular) dwarfDavide Italiano2018-01-314-0/+70
| | | | | | | This recommits the patch, now that I verified that the bot instability is due to something else. Sorry for the noise. llvm-svn: 323879
* Fix TestTargetSymbolsAddCommand makefilePavel Labath2018-01-311-4/+5
| | | | | | | | | We started passing the "all" target to make, which rendered the "localall" trick in this Makefile inoperable. I implement the strip step differently, and also reformat the Makefile. llvm-svn: 323855
* Revert "[lldb] Enable debugging of binaries with mixed (splitted/regular) dwarf"Davide Italiano2018-01-314-70/+0
| | | | | | It might have caused some instability on the bots. llvm-svn: 323845
* [lldb] Enable debugging of binaries with mixed (splitted/regular) dwarfAlexander Shaposhnikov2018-01-304-0/+70
| | | | | | | | | | | | | | Initialize the default value of SymbolFileDWARF uuid with the appropriately shifted DW_INVALID_OFFSET constant. This change fixes the collision in the computation of DIE uid (inside DIERef::GetUID) and incorrect CompileUnit lookup (because of the misleading cu_offset value). Test plan: make check-lldb Differential revision: https://reviews.llvm.org/D42563 llvm-svn: 323832
* Enforce that NO_DEBUG_INFO_TESTCASEs build using buildDefault().Adrian Prantl2018-01-304-6/+18
| | | | | | This is a prerequisite for building each test variant in its own subdirectory. llvm-svn: 323830
* XUnit Formatter: Handle UTF-8 decode errors on invalid XMLVedant Kumar2018-01-301-1/+3
| | | | | | | | | Strings which contain garbage data can trigger an exception in the XUnit plugin at the UTF-8 decode step because the decode is strict. Use a lax mode to avoid an exception. See: https://ci.swift.org/job/oss-lldb-incremental-osx/780 llvm-svn: 323817
* PR25934: Skip EventAPITestCase. It still SEGV's on Darwin.Vedant Kumar2018-01-301-0/+1
| | | | | | | | See: https://ci.swift.org/job/swift-lldb-PR-osx/39 llvm.org/PR25934 llvm-svn: 323809
* Add more diagnostics to help diagnose flaky testAdrian Prantl2018-01-302-5/+7
| | | | llvm-svn: 323808
* Rewrite this test not to use pexpect.Jim Ingham2018-01-301-70/+41
| | | | llvm-svn: 323805
* Compile the LLDB tests out-of-tree.Adrian Prantl2018-01-30175-617/+726
| | | | | | | | | | | | | | | | | | | | | | | | This patch is the result of a discussion on lldb-dev, see http://lists.llvm.org/pipermail/lldb-dev/2018-January/013111.html for background. For each test (should be eventually: each test configuration) a separate build directory is created and we execute make VPATH=$srcdir/path/to/test -C $builddir/path/to/test -f $srcdir/path/to/test/Makefile -I $srcdir/path/to/test In order to make this work all LLDB tests need to be updated to find the executable in the test build directory, since CWD still points at the test's source directory, which is a requirement for unittest2. Although we have done extensive testing, I'm expecting that this first attempt will break a few bots. Please DO NOT HESITATE TO REVERT this patch in order to get the bots green again. We will likely have to iterate on this some more. Differential Revision: https://reviews.llvm.org/D42281 llvm-svn: 323803
* Enforce that tests building with buildDefault set NO_DEBUG_INFO_TESTCASEAdrian Prantl2018-01-304-1/+8
| | | | | | | and fix resulting errors. This is a prerequisite for building each test variant in its own build directory. llvm-svn: 323789
* One more TestGDBRemoteClient/windows fixPavel Labath2018-01-301-2/+3
| | | | | | We also need to be .EXE-aware when searching for the clang binary. llvm-svn: 323763
* Fix TestGDBRemoteClient on windowsPavel Labath2018-01-301-2/+3
| | | | | | | | | The logic was incorrect because on windows, we need to look for yaml2obj.EXE. I implement the search in terms of distutils.spawn.find_executable, which should handle the platform differences for us. llvm-svn: 323744
* Skip TestWithModuleDebugging on i386 linux (pr36146)Pavel Labath2018-01-301-0/+1
| | | | | | It fails due to an assertion (if these are enabled). llvm-svn: 323736
* dotest: Apply --skip-categories to debug info categoriesVedant Kumar2018-01-301-1/+1
| | | | llvm-svn: 323723
* [test-suite] UNXfail several tests that now pass locally.Davide Italiano2018-01-292-5/+0
| | | | | | | Another step towards enabling unexpected successes as failures by default. llvm-svn: 323707
* [lldb] Generic base for testing gdb-remote behaviorPavel Labath2018-01-294-4/+518
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: Adds new utilities that make it easier to write test cases for lldb acting as a client over a gdb-remote connection. - A GDBRemoteTestBase class that starts a mock GDB server and provides an easy way to check client packets - A MockGDBServer that, via MockGDBServerResponder, can be made to issue server responses that test client behavior. - Utility functions for handling common data encoding/decoding - Utility functions for creating dummy targets from YAML files ---- Split from the review at https://reviews.llvm.org/D42145, which was a new feature that necessitated the new testing capabilities. Reviewers: clayborg, labath Reviewed By: clayborg, labath Subscribers: hintonda, davide, jingham, krytarowski, mgorny, lldb-commits Differential Revision: https://reviews.llvm.org/D42195 Patch by Owen Shaw <llvm@owenpshaw.net> llvm-svn: 323636
* [lldbtestsuite] Don't crash on `None` input for is_exe().Davide Italiano2018-01-261-0/+2
| | | | | | | | Now the function returns `False`, and the caller can take the appropriate action (in this case, for --executable, reporting that the file doesn't exist). llvm-svn: 323566
* gmodules XFAIL two more tests that only fail for android (pr36109)Pavel Labath2018-01-262-0/+2
| | | | llvm-svn: 323537
* Fix linux fallout from c++ gmodules enablePavel Labath2018-01-262-2/+5
| | | | | | | | | | | TestLibcxxListLoop - fails because the evil "define private public" trick does not work with gmodules. The purpose of the test is not to test debug info parsing so I just mark it as no_debug_info_testcase. In the long term it may be interesting to write a mock std::list which will allow us to test bad inputs to data formatters more easily. TestGModules - seems to be a genuine bug. Filed pr36107 and xfailed. llvm-svn: 323520
* [test] Fix a test that never compiled under -fmodulesVedant Kumar2018-01-251-5/+0
| | | | | | | | | | This test #include's stdio.h, which, on at least two bots results in a module import of MacTypes.h (due to weird SDK layering issues), which causes the test to fail to compile. Just don't #include stdio.h, as it's not needed for the test. llvm-svn: 323467
* Use test-specific module caches to avoid stale header conflictsVedant Kumar2018-01-2511-11/+22
| | | | | | | | | | | | | | | | | | | Stale global module caches cause problems for the bots. The modules become invalid when clang headers are updated by version control, and tests which use these modules fail to compile, e.g: fatal error: file '.../__stddef_max_align_t.h' has been modified since the module file '/var/.../Darwin.pcm' was built note: please rebuild precompiled header '/var/.../Darwin.pcm' Eventually we should transition to having just a single module cache to speed tests up. This patch should be just enough to fix the spurious bot failures due to stale caches. rdar://36479805, also related to llvm.org/PR36048 Differential Revision: https://reviews.llvm.org/D42277 llvm-svn: 323450
* Move getBuildArtifact() from TestBase to Base and derive MiTestCaseBase from itAdrian Prantl2018-01-232-5/+5
| | | | | | Thanks to Pavel Labath for pointing this out! llvm-svn: 323219
* [lldb] Fix some C++ virtual method call bugs in LLDB expression evaluation byLang Hames2018-01-223-0/+71
| | | | | | | | | | | | | | | | | | | building method override tables for CXXMethodDecls in DWARFASTParserClang::CompleteTypeFromDWARF. C++ virtual method calls in LLDB expressions may fail if the override table for the method being called is not correct as IRGen will produce references to the wrong (or a missing) vtable entry. This patch does not fix calls to virtual methods with covariant return types as it mistakenly treats these as overloads, rather than overrides. This will be addressed in a future patch. Review: https://reviews.llvm.org/D41997 Partially fixes <rdar://problem/14205774> llvm-svn: 323163
* Fix TestTargetSymbolsAddCommand [getBuildArtifact refactor]Pavel Labath2018-01-221-1/+1
| | | | llvm-svn: 323086
* Wrap all references to build artifacts in the LLDB testsuite (NFC)Adrian Prantl2018-01-19413-621/+639
| | | | | | | | | in TestBase::getBuildArtifact(). This NFC commit is in preparation for https://reviews.llvm.org/D42281 (compile the LLDB tests out-of-tree). Differential Revision: https://reviews.llvm.org/D42280 llvm-svn: 323007
* A third attempt to mark TestRdar12408181.py as skippedVedant Kumar2018-01-171-1/+3
| | | | | | | | | | | | | Due to an unfortunate difference between the open source test harness and our internal harness, applying two @skip... decorators to this test works in the internal build but not in the open source build. I've tried another approach to skipping this test and tested it out with the open source harness. Hopefully this sticks! rdar://36417163 llvm-svn: 322756
* Try again to mark TestRdar12408181.py as skippedVedant Kumar2018-01-171-3/+7
| | | | | | rdar://36417163 llvm-svn: 322740
OpenPOWER on IntegriCloud