summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test
Commit message (Collapse)AuthorAgeFilesLines
...
* 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
* Skip a flaky test (TestRdar12408181.py)Vedant Kumar2018-01-171-1/+3
| | | | | | | | | | This test frequently times out on our bots. While we're investigating the issue, mark the test as skipped so the builds aren't impacted as much. rdar://36417163 llvm-svn: 322728
* Fix Breakpoint::RemoveInvalidLocations to fix the exec testcase.Jim Ingham2018-01-121-3/+1
| | | | | | | | | | | | | | | | | RemoveInvalidLocations was clearing out the m_locations in the breakpoint by hand, and it wasn't also clearing the locations from the address->location map, which confused us when we went to update breakpoint locations. I also made Breakpoint::ModulesChanged check the Location's Section to make sure it hadn't been deleted. This shouldn't strictly be necessary, but if the DynamicLoaderPlugin doesn't do it's job right (I'm looking at you new Darwin DynamicLoader...) then it can end up leaving stale locations on rerun. It doesn't hurt to clean them up here as a backstop. <rdar://problem/36134350> llvm-svn: 322348
* Fix the Makefile - this version should work on the botJim Ingham2018-01-121-4/+3
| | | | llvm-svn: 322341
* Skip TestFunctionTemplateParameterPack.py, which unexpectedly asserts (PR35920)Vedant Kumar2018-01-121-1/+7
| | | | | | | | | | This test stresses expression evaluation support for template functions. Currently the support is rudimentary, and running this test causes assertion failures in clang. This test cannot be XFAIL'ed because the test harness treats assertion failures as unexpected events. For now, the test must be skipped. llvm-svn: 322340
* Print the SBDebugger.CreateTarget error message.Jim Ingham2018-01-121-1/+3
| | | | | | | This is failing on the bot but not locally. Maybe the error message will tell us why. llvm-svn: 322338
* Fix the same thinko in another place...Jim Ingham2018-01-111-1/+1
| | | | | | Thanks Jason. llvm-svn: 322329
* Fix a tiny thinko in this test and re-add.Jim Ingham2018-01-114-0/+120
| | | | | | target.IsValid() not target... llvm-svn: 322328
* [testsuite] Remove a broken test which tried to find App in bundles.Davide Italiano2018-01-115-119/+0
| | | | | | | That never really worked, and the change associated isn't yet committed, so, let's try to make the bots green for now. llvm-svn: 322322
* Make the bundle folders in the find-app-in-bundle test non-emptyPavel Labath2018-01-112-0/+0
| | | | | | | git will not create empty folders, which makes this test fail if the repo is checked out with git. llvm-svn: 322271
* Advanced guessing of rendezvous breakpoint (resubmit)Eugene Zemtsov2018-01-112-15/+14
| | | | | | | | | | | | | When rendezvous structure is not initialized we need to set up rendezvous breakpoint anyway. In this case the code will locate dynamic loader (interpreter) and look for known function names. This is r322209, but with fixed VDSO loading fixed. Bug: https://bugs.llvm.org/show_bug.cgi?id=25806 Differential Revision: https://reviews.llvm.org/D41533 llvm-svn: 322251
* Running this on other systems won't work because I don'tJim Ingham2018-01-101-0/+1
| | | | | | know how to specifically build a MachO binary on other systems. llvm-svn: 322239
* Runs the part of the test that just finds the binary on all systems.Jim Ingham2018-01-101-13/+14
| | | | | | That should work everywhere. Then only try actually running on macosx. llvm-svn: 322235
* Add a test for finding a binary in an app package.Jim Ingham2018-01-105-0/+117
| | | | llvm-svn: 322232
* Revert "Advanced guessing of rendezvous breakpoint"Eugene Zemtsov2018-01-102-14/+15
| | | | | | | This reverts commit r322209, because it broke TestNoreturnUnwind,TestInferiorAssert and TestNumThreads on i386. llvm-svn: 322229
* Advanced guessing of rendezvous breakpointEugene Zemtsov2018-01-102-15/+14
| | | | | | | | | | | When rendezvous structure is not initialized we need to set up rendezvous breakpoint anyway. In this case the code will locate dynamic loader (interpreter) and look for known function names. Bug: https://bugs.llvm.org/show_bug.cgi?id=25806 Differential Revision: https://reviews.llvm.org/D41533 llvm-svn: 322209
* Add Utility/Environment class for handling... environmentsPavel Labath2018-01-101-0/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: There was some confusion in the code about how to represent process environment. Most of the code (ab)used the Args class for this purpose, but some of it used a more basic StringList class instead. In either case, the fact that the underlying abstraction did not provide primitive operations for the typical environment operations meant that even a simple operation like checking for an environment variable value was several lines of code. This patch adds a separate Environment class, which is essentialy a llvm::StringMap<std::string> in disguise. To standard StringMap functionality, it adds a couple of new functions, which are specific to the environment use case: - (most important) envp conversion for passing into execve() and likes. Instead of trying to maintain a constantly up-to-date envp view, it provides a function which creates a envp view on demand, with the expectation that this will be called as the very last thing before handing the value to the system function. - insert(StringRef KeyEqValue) - splits KeyEqValue into (key, value) pair and inserts it into the environment map. - compose(value_type KeyValue) - takes a map entry and converts in back into "KEY=VALUE" representation. With this interface most of the environment-manipulating code becomes one-liners. The only tricky part was maintaining compatibility in SBLaunchInfo, which expects that the environment entries are accessible by index and that the returned const char* is backed by the launch info object (random access into maps is hard and the map stores the entry in a deconstructed form, so we cannot just return a .c_str() value). To solve this, I have the SBLaunchInfo convert the environment into the "envp" form, and use it to answer the environment queries. Extra code is added to make sure the envp version is always in sync. (This also improves the layering situation as Args was in the Interpreter module whereas Environment is in Utility.) Reviewers: zturner, davide, jingham, clayborg Subscribers: emaste, lldb-commits, mgorny Differential Revision: https://reviews.llvm.org/D41359 llvm-svn: 322174
* [dotest] Remove crashinfo hookPavel Labath2018-01-104-102/+0
| | | | | | | | | | | | | | | | Summary: This used to be important when all tests were run in a single process, but that has no longer been the case for a while. Furthermore, this hook fails to build on new mac versions for several people, and it's not clear whether fixing it is worth the effort. Reviewers: jingham, clayborg, davide Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D41871 llvm-svn: 322167
* TestConflictingSymbols: simplify test by using run_break_set_by_source_regexpPavel Labath2018-01-091-14/+8
| | | | | | follow-up to r321271 based on post-commit feedback by Jim Ingham. llvm-svn: 322075
* Cut and paste error - I wasn't actually running both tests...Jim Ingham2018-01-091-1/+1
| | | | llvm-svn: 322054
* Look for external types in all clang modules imported by the current symbol ↵Adrian Prantl2018-01-047-0/+51
| | | | | | | | | | | | | file. This fixes a bug in -gmodules DWARF handling when debugging without a .dSYM bundle that was particularly noticable when debugging LLVM itself. Debugging without clang modules and DWO handling should be unaffected by this patch. <rdar://problem/32436209> llvm-svn: 321802
* Enable TestReadMemCString on non-darwin targetsPavel Labath2017-12-222-11/+4
| | | | | | | | | | | | | | The test works fine on linux, and I believe other targets should not have an issue with as well. If they do, we can start blacklisting instead of whitelisting. The idea of using "-1" as the value of the pointer on non-apple targets backfired, as it fails the "address != LLDB_INVALID_ADDRESS" test (-1 is the value of LLDB_INVALID_ADDRESS). However, it should be safe to use 0x100 for other targets as well. The first page of memory is generally kept unreadable to catch null pointer dereferences. llvm-svn: 321353
* Change SBProcess::ReadCStringFromMemory() back to returningJason Molenda2017-12-224-1/+82
| | | | | | | | | an empty Python string object when it reads a 0-length string out of memory (and a successful SBError object). <rdar://problem/26186692> llvm-svn: 321338
* Make one more test redhat-compatiblePavel Labath2017-12-211-11/+11
| | | | | | This test was also using "a" in an expression. llvm-svn: 321277
* Work around test failures on red-hat linuxPavel Labath2017-12-213-8/+41
| | | | | | | | | | | | | | | | Two tests were failing because the debugger was picking up multiply defined internal symbols from the system libraries. This is a bug, as there should be no ambiguity because the tests are defining variables with should shadow these symbols, but lldb is not smart enough to figure that out. I work around the issue by renaming the variables in these tests, and in exchange I create a self-contained test which reproduces the issue without depending on the system libraries. This increases the predictability of our test suite. llvm-svn: 321271
* Temporarily XFAIL test/functionalities/exec while investiagting bot breakage.Adrian Prantl2017-12-191-0/+2
| | | | | | | | When building with cmake on green gragon or on ci.swift.org, this test fails. rdar://problem/36134350 llvm-svn: 321095
* [testsuite] Un-XFAIL the global variables tests.Davide Italiano2017-12-171-6/+0
| | | | | | | | <rdar://problem/28725399> Differential Revision: https://reviews.llvm.org/D41312 llvm-svn: 320952
* [MacOSX/Queues] Relax an overly aggressive assertion in a test.Davide Italiano2017-12-151-1/+2
| | | | | | | | | | "Default" is a valid QoS for a thread on older versions of macOS, like the one installed in the bot. Thanks to Jason Molenda for helping me figuring out the problem. <rdar://problem/28346273> llvm-svn: 320883
* [TestModulesInlineFunctions] This test now passes.Davide Italiano2017-12-121-1/+0
| | | | | | | | | Remove yet another spurious unexpected success. Ack'ed by Jim Ingham. Fixes PR25743. llvm-svn: 320454
* [TestCppScope] This test now passes on Darwin.Davide Italiano2017-12-121-5/+0
| | | | | | | | | I tested on x86-64 and Jason on embedded architectures. This cleans up another couple of reported unexpected successes. <rdar://problem/28623427> llvm-svn: 320452
* [testsuite] Remove even more testing vestiges.Davide Italiano2017-12-121-3/+0
| | | | | | | With this one, the number of unexpected successes for the LLDB test suite when building with clang ToT goes down to 18. llvm-svn: 320450
* Rollback [Testsuite] Rename this file from *m -> *mm.Davide Italiano2017-12-121-0/+0
| | | | | | | | After discussing this with Jim and Jason, I think my commit was actually sweeping the issue under the carpet rather than fixing it. I'll take a closer look between tonight and tomorrow. llvm-svn: 320447
OpenPOWER on IntegriCloud