summaryrefslogtreecommitdiffstats
path: root/lldb/test
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix the kalimba arch 4 test, broken when I introduced handlingMatthew Gardiner2014-10-011-1/+1
| | | | | | of kalimba architecture variants. llvm-svn: 218749
* Fixup gtest layout, add Linux ThreadStateCoordinator.cpp.Todd Fiala2014-09-253-79/+0
| | | | | | | | | | | | | | | | | | | | | | | | | This change does the following: * Remove test/c++/... * Add gtest. * Add gtest/unittest directory for unittesting individual classes. * Add an initial Plugins/Process?linux/ThreadStateCoordinatorTest.cpp. - currently failing a test (intentional). - added a bare-bones ThreadStateCoordinator.cpp to Plugins/Process/Linux, more soon. Just enough to prove out running gtest on Ubuntu and MacOSX. * Added recursive make machinery so that doing a 'make' in gtest/ is sufficient to kick off the existing test several directories down. - Caveat - I currently short circuit from gtest/unittest/Makefile directly to the one and only gtest/unittest/Plugins/Process/Linux directory. We'll need to add the intervening layers. I haven't done this yet since to fix the Xcode test failure correspondence, I may need to add a python layer which might just handle the directory crawling. * Added an Xcode project to the lldb workspace for gtest. - Runs the recursive make system in gtest/Makefile. - Default target is 'test'. test and clean are supported. - Currently does not support test failure file/line correspondence. Requires a bit of text transformation to hook that up. llvm-svn: 218460
* The beginnings of a gtest-based test framework.Todd Fiala2014-09-243-0/+79
| | | | | | | | | | | | | | | | | | | | | | | | Makes use of LLVM gtest support. This does *not* run as part of the lldb test suite. I'm using it to start testing some components that I'll be adding to the inner guts of NativeThreadLinux to more maintainably handle thread states and deferred thread state notification. Runs with default Makefile target "test" using gmake within a given test directory (currently only test/c++/native_process/thread_state_coordinator). The Makefile.rules currently assume it is using the LLVM gtest. It works on a canonical MacOSX dir structture (i.e. lldb, lldb/llvm, lldb/llvm/tools/clang). It also works on Ubuntu assuming the standard dir layout of llvm, llvm/tools/clang, llvm/tools/lldb. In this case, it expects a directory called build-debug parallel to the llvm source dir. All directory assumptions can be overridden with environment variables. See test/c++/make/Makefile.rules for details. We'll want to make this smarter in the future, particularly around finding the LLVM build output dir. llvm-svn: 218422
* Add ASan history threads into process_sp->GetExtendedThreadList, so they ↵Kuba Brecka2014-09-231-0/+6
| | | | | | | | don't get freed too early Reviewed at http://reviews.llvm.org/D5452 llvm-svn: 218323
* Enable libcxx map test on FreeBSD againEd Maste2014-09-211-1/+0
| | | | | | | | | | The test used to trigger an assertion failure "Cannot get layout of forward declarations!", but it no longer fails when built with Clang 3.4.1 (system compiler) or 3.5 from SVN on FreeBSD. llvm.org/pr17231 llvm-svn: 218196
* Test suite runs better again after recent fixes that would select a platform ↵Greg Clayton2014-09-191-0/+2
| | | | | | | | | | | | | if a "file a.out" auto selected a different platform than the selected one. Changes include: - fix it so you can select the "host" platform using "platform select host" - change all callbacks that create platforms to returns shared pointers - fix TestImageListMultiArchitecture.py to restore the "host" platform by running "platform select host" - Add a new "PlatformSP Platform::Find(const ConstString &name)" method to get a cached platform - cache platforms that are created and re-use them instead of always creating a new one llvm-svn: 218145
* Extend the member function discovery APIs to also support Objective-C as ↵Enrico Granata2014-09-193-2/+30
| | | | | | | | | well as C++ For the Objective-C case, we do not have a "function type" notion, so we actually end up wrapping the clang ObjCMethodDecl in the Impl object, and ask function-y questions of it In general, you can always ask for return type, number of arguments, and type of each argument using the TypeMemberFunction layer - but in the C++ case, you can also acquire a Type object for the function itself, which instead you can't do in the Objective-C case llvm-svn: 218132
* Add some tests to be skipped when run remotely and also fixed a test to be ↵Greg Clayton2014-09-186-0/+15
| | | | | | more reliable when it comes to stopping on a specific line. llvm-svn: 218079
* More categories could be added, and having an explicit list in this test ↵Enrico Granata2014-09-161-10/+1
| | | | | | case is a fairly bullet-proof recipe for disaster. Use the * enabling feature to workaround this. Fixes rdar://18358649 llvm-svn: 217927
* Change SBType.GetMemberFunctionAtIndex() to return an object describing the ↵Enrico Granata2014-09-151-9/+12
| | | | | | member function in more detail. A type was really quite vague. This now has function name, kind, as well as function type llvm-svn: 217828
* Add a --help (-h) option to "command script add" that enables users to ↵Enrico Granata2014-09-151-9/+7
| | | | | | | | | | | | | define a one-liner short help for their command Also, in case they don't define any, change the default from "Run Python function <blah>" into "For more information run help <blah>" The core issue here is that Python only allows one docstring per function, so we can't really attach both a short and a long help to the same command easily There are alternatives but this is not a pressing enough concern to go through the motions quite yet Fixes rdar://18322737 llvm-svn: 217795
* llgs: fix thread names broken by recent native thread changes.Todd Fiala2014-09-121-3/+35
| | | | | | | | * Fixes the local stack variable return pointer usage in NativeThreadLinux::GetName(). * Changes NativeThreadProtocol::GetName() to return a std::string. * Adds a unit test to verify thread names don't regress in the future. Currently only run on Linux since I know default thread names there. llvm-svn: 217717
* Add logic to LLDB to figure out the types of member functions of C++ ↵Enrico Granata2014-09-123-0/+114
| | | | | | classes. Add plumbing for that all the way up to the SB layer llvm-svn: 217701
* llgs: fix Ctrl-C inferior interrupt handling to do the right thing.Todd Fiala2014-09-112-6/+5
| | | | | | | | | | | | | | | | * Sends a SIGSTOP to the process. * Fixes busted SIGSTOP handling. Now builds a list of non-stopped that we wait for the PTRACE group-stop for. When the final must-stop tid gets its group stop, we propagate the process state change. Only the signal receiving the notification of the pending SIGSTOP is marked with the SIGSTOP signal. All the rest, if they weren't already stopped, are marked as stopped with signal 0. * Fixes a few broken tests. * Marks the Linux test I added earlier as expect-pass (no longer XFAIL). Implements fix for http://llvm.org/bugs/show_bug.cgi?id=20908. llvm-svn: 217647
* gdb-remote tests: added test to verify thread stop info when multi-threaded ↵Todd Fiala2014-09-111-9/+46
| | | | | | | | | | app is interrupted. The Linux version is marked XFAIL for the moment, fixing next. Related to http://llvm.org/bugs/show_bug.cgi?id=20908. llvm-svn: 217613
* llgs: implement qThreadStopInfo.Todd Fiala2014-09-101-0/+87
| | | | | | | | | | | This change implements this ticket: http://llvm.org/bugs/show_bug.cgi?id=20899 Adds the qThreadStopInfo RSP command for llgs and includes a test that verifies both debugserver and llgs respond with something reasonable on a multithreaded app. llvm-svn: 217549
* Fix test failure for ↵Kuba Brecka2014-09-082-5/+10
| | | | | | | | test/functionalities/connect_remote/TestConnectRemote.py when port 12345 is already in use Reviewed at http://reviews.llvm.org/D5221 llvm-svn: 217388
* Modify call-function and rdar-12437442 tests to clean up all files produced ↵Todd Fiala2014-09-082-0/+7
| | | | | | during test run. llvm-svn: 217387
* Implement ASan history threads in SB APIKuba Brecka2014-09-061-0/+18
| | | | | | | | | Reviewed at http://reviews.llvm.org/D5219 and http://lists.cs.uiuc.edu/pipermail/lldb-commits/Week-of-Mon-20140901/012809.html llvm-svn: 217300
* ASan malloc/free history threadsKuba Brecka2014-09-044-0/+146
| | | | | | Reviewed at http://reviews.llvm.org/D4596 llvm-svn: 217116
* Fix a test broken by r216564.Todd Fiala2014-08-291-4/+6
| | | | | | | | | | | | | | llgs Linux is no longer doing the translation to some gdb fixed signal numbers. This change modifies the test method to take in the signo expected for a segfault. The debugserver test uses the fixed gdb number, and everything else uses signal.SIGSEGV for the platform. Sidenote: I somehow did not see this reported in multicore tests. I will need to verify that we aren't missing test failures in that script. I need to verify why this wasn't more obvious with test/dosep.py. llvm-svn: 216770
* Allow "breakpoint command add" to add commands to more than one breakpoint ↵Jim Ingham2014-08-291-1/+9
| | | | | | | | at a time. <rdar://problem/13314462> llvm-svn: 216747
* Clean up after the multithreaded test case finishes.Jason Molenda2014-08-261-0/+3
| | | | | | | Patch by Sean Callanan. <rdar://problem/18140875> llvm-svn: 216504
* There seems to be no sane reason for a test case to enable logging every ↵Enrico Granata2014-08-261-2/+0
| | | | | | time it runs.. probably leftover from when I was debugging it llvm-svn: 216502
* Added a couple more gdb-remote tests to ensure qProcessInfo on darwin is not ↵Todd Fiala2014-08-261-0/+39
| | | | | | | | | | | | defining triple. And likewise for qProcessInfo on Linux, but ensures cputype/cpusubtype is not defined. The Apple case is the more important one, since we take a slightly different path to initialize ProcessGDBRemote-related remote host/process info if triple is present. Related to http://llvm.org/bugs/show_bug.cgi?id=20755. llvm-svn: 216473
* Fix llgs to send triple for non-Apple platforms and lldb to interpret correctly.Todd Fiala2014-08-262-2/+39
| | | | | | | | | | | | | This change addresses this bug: http://llvm.org/bugs/show_bug.cgi?id=20755 This change: * Modifies llgs to send triple instead of cputype and cpusubtype when not on Apple platforms in qProcessInfo. * Modifies lldb's GDBRemoteCommunicationClient to handle the triple returned from qProcessInfo if given. When given, it will prefer to use triple over cputype and cpusubtype. * Adds gdb-remote protocol tests to verify that cputype and cpusubtype are specified on darwin, and that triple is specified on Linux. llvm-svn: 216470
* Refactored existing gdb-remote qProcessInfo tests into separate python file.Todd Fiala2014-08-262-101/+113
| | | | | | | | | I'm about to add some more qProcessInfo tests so I wanted to first pull them out of the monolithic TestLldbGdbServer test case class. Related to http://llvm.org/bugs/show_bug.cgi?id=20755 llvm-svn: 216465
* Added a test case to ensure lldb::SBHostOS::GetLLDBPath() doesn't return ↵Greg Clayton2014-08-251-0/+37
| | | | | | lldb::SBFileSpec objects with the filename filled in for directory paths. llvm-svn: 216399
* Use consistent capitalization for ENABLE_THREADS in testsEd Maste2014-08-132-2/+2
| | | | llvm-svn: 215565
* Get test executables compiling on Windows.Zachary Turner2014-08-1331-138/+201
| | | | | | | | | | | | | | Many of the test executables use pthreads directly. This isn't portable on Windows, so this patch converts these test to use C++11 threads and mutexes. Since Windows' implementation of std::thread classes throw and catch from header files, this patch also disables exceptions when compiling with clang on Windows. Reviewed by: Todd Fiala, Ed Maste Differential Revision: http://reviews.llvm.org/D4816 llvm-svn: 215562
* llgs: corrected Linux signal reception notification for SIGABRT, SIGSEGV and ↵Todd Fiala2014-08-125-5/+146
| | | | | | | | | their ilk. Added llgs/debugserver gdb-remote tests around SIGABRT and SIGSEGV signal reception notification. Found a few bugs in exception signal handling in Linux llgs. Fixed those. llvm-svn: 215458
* Fix some python shutdown / ordering issues.Zachary Turner2014-08-081-11/+10
| | | | | | | | Differential Revision: http://reviews.llvm.org/D4826 Reviewed by: Enrico Granata llvm-svn: 215256
* Add decorators for tests failing to build on the lab.llvm.org FreeBSD buildbotEd Maste2014-08-065-0/+5
| | | | | | llvm.org/pr20548 llvm-svn: 214960
* Force trace on system() failure on FreeBSD while tracking down buildbot issuesEd Maste2014-08-051-1/+6
| | | | llvm-svn: 214922
* On FreeBSD skip test that produces bogus outputEd Maste2014-08-051-0/+1
| | | | | | | | | | The test produces lines that start with "<word>: " which confuses the buildbot log parser. Disable the test until either the test is fixed or the buildbot can deal with the undesired output. llvm.org/pr20545 llvm-svn: 214900
* Don't hand compute mydir, do it using "TestBase.compute_mydir(__file__)".Greg Clayton2014-08-011-1/+1
| | | | llvm-svn: 214575
* Add decorator for FreeBSD test failure - malloc() breakpoint issueEd Maste2014-08-011-0/+1
| | | | | | llvm.org/pr20476 llvm-svn: 214527
* Fix test execution: the cmake keyword is CACHE, not CACHEDEd Maste2014-08-011-1/+1
| | | | llvm-svn: 214522
* Make CMake choose the target architecture according to the build.Zachary Turner2014-07-313-27/+35
| | | | | | | | | | | | | | | | | | Previously, CMake was invoking the test runner and not specifying what architecture to use when building test executables. The Makefiles for the test executables then had logic to choose x64 by default. This doesn't work on Windows because the test compiler would then try to link against the 64-bit MSVCRT and not find them since only the 32-bit MSVCRT was in the path. This patch addresses this by figuring out, at CMake time, whether or not you are building LLDB with a 64 or 32-bit toolchain. Then, it explicitly passes this value to the test runner, causing the test runner to build tests whose architecture matches that of LLDB itself. This can still be overridden by setting the CMake variable LLDB_TEST_EXECUTABLE_ARCH=(x64|x86) llvm-svn: 214443
* Remove shell-globbing from all test makefiles.Zachary Turner2014-07-317-7/+7
| | | | llvm-svn: 214441
* Add decorator for TestStopHookMultipleThreads failing on FreeBSDEd Maste2014-07-311-0/+1
| | | | | | llvm.org/pr15037 llvm-svn: 214402
* Disable test on Windows. script print deadlocks on Windows.Zachary Turner2014-07-301-0/+1
| | | | llvm-svn: 214351
* Add $vAttach support to llgs.Todd Fiala2014-07-292-2/+133
| | | | | | Also adds a new test case for vAttach;{pid} for llgs and debugserver. llvm-svn: 214236
* Use the most up to date dsymutil on Darwin, not the one in /usr/bin/dsymutil.Greg Clayton2014-07-291-1/+1
| | | | llvm-svn: 214207
* Fixup TestStepNoDebug to cleanup properly on shutdown.Todd Fiala2014-07-281-1/+2
| | | | | | | | | | | This was causing core dumps on MacOSX and was not properly cleaning up the state of the inferior before exiting. The test was overriding def tearDown(), but failed to call the base class after doing its own cleanup. This essentially eliminated normal clean-up activity. llvm-svn: 214138
* llgs: add --reverse-connect support.Todd Fiala2014-07-263-6/+136
| | | | | | Also includes --reverse-connect tests for llgs and debugserver. llvm-svn: 214031
* We were turning off all these tests on OSX and FreeBSD because of a known ↵Jim Ingham2014-07-241-15/+28
| | | | | | | | (and fairly unimportant) bug. Keep a test for that bug, but let the useful parts of the test run anyway. llvm-svn: 213875
* Ensure that if some unspecified person were to pass in an invalid ↵Enrico Granata2014-07-233-0/+56
| | | | | | architecture when trying to create a target, that it would fail, but not cause LLDB to crash. llvm-svn: 213781
* Add kalimba architecture checking to TestImageListMultiArchitectureTodd Fiala2014-07-233-0/+9
| | | | | | | | | Verify that ObjectFileELF's kalimba detection works regardless of the host platform. Change by Matthew Gardiner. llvm-svn: 213763
* Make the test runner understand Windows command shell execution.Zachary Turner2014-07-227-67/+48
| | | | | | | | | | | | | | | | Currently, the test runner makes the assumption that it will run commands through /bin/sh. This is obviously not true on Windows, so this patch abstracts this logic out somewhat. Instead of having the caller build the command string himself, the caller will now pass in argument list of the form [[a, b], [c, d], ...] which will get converted into a string of the form a b; c d or a b && c d, depending on the platform. Reviewed by: Todd Fiala Differential Revision: http://reviews.llvm.org/D4590 llvm-svn: 213669
OpenPOWER on IntegriCloud