summaryrefslogtreecommitdiffstats
path: root/lldb/test
Commit message (Collapse)AuthorAgeFilesLines
...
* Improve handling of print value argument in -stack-list-* commands.Hafiz Abid Qadeer2015-05-291-19/+19
| | | | | | | It was reviewed in http://reviews.llvm.org/D10106. Patch by paulmaybee. llvm-svn: 238572
* XFAIL two tests for androidPavel Labath2015-05-293-0/+8
| | | | | | bug #23694 llvm-svn: 238558
* Report inferior SIGSEGV as a signal instead of an exception on linuxPavel Labath2015-05-298-65/+203
| | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Previously, we reported inferior receiving SIGSEGV (or SIGILL, SIGFPE, SIGBUS) as an "exception" to LLDB, presumably to match OSX behaviour. Beside the fact that we were basically lying to the user, this was also causing problems with inferiors which handle SIGSEGV by themselves, since LLDB was unable to reinject this signal back into the inferior. This commit changes LLGS to report SIGSEGV as a signal. This has necessitated some changes in the test-suite, which had previously used eStopReasonException to locate threads that crashed. Now it uses platform-specific logic, which in the case of linux searches for eStopReasonSignaled with signal=SIGSEGV. I have also added the ability to set the description of StopInfoUnixSignal using the description field of the gdb-remote packet. The linux stub uses this to display additional information about the segfault (invalid address, address access protected, etc.). Test Plan: All tests pass on linux and osx. Reviewers: ovyalov, clayborg, emaste Subscribers: emaste, lldb-commits Differential Revision: http://reviews.llvm.org/D10057 llvm-svn: 238549
* [TestLldbGdbServer and TestGdbRemoteXXX] Use "ls -l" instead of "readlink"Siva Chandra2015-05-291-12/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Old Android devices, for example API 16, do not have the "readlink" command. To take care of such devices, this commit changes to use "ls -l" instead of "readlink" to get the lldb-server exe path. The tests fixed with this change for an Android API 16 arm device are: TestGdbRemoteAttach TestGdbRemoteAuxvSupport TestGdbRemoteExpeditedRegisters TestGdbRemoteKill TestGdbRemoteProcessInfo TestGdbRemoteSegFault TestGdbRemoteThreadsInStopReply TestGdbRemote_qThreadStopInfo Further, all tests in TestLldbGdbServer pass (previously erroring out), except one which times out. Test Plan: Run dosep.py with 8 test threads targetting Android API 16 device. Reviewers: vharron, ovyalov Reviewed By: ovyalov Subscribers: tberghammer, aemerson, lldb-commits Differential Revision: http://reviews.llvm.org/D10107 llvm-svn: 238532
* Add a new "qEcho" packet with the following format:Greg Clayton2015-05-291-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | qEcho:%s where '%s' is any valid string. The response to this packet is the exact packet itself with no changes, just reply with what you received! This will help us to recover from packets timing out much more gracefully. Currently if a packet times out, LLDB quickly will hose up the debug session. For example, if we send a "abc" packet and we expect "ABC" back in response, but the "abc" command takes longer than the current timeout value this will happen: --> "abc" <-- <<<error: timeout>>> Now we want to send "def" and get "DEF" back: --> "def" <-- "ABC" We got the wrong response for the "def" packet because we didn't sync up with the server to clear any current responses from previously issues commands. The fix is to modify GDBRemoteCommunication::WaitForPacketWithTimeoutMicroSecondsNoLock() so that when it gets a timeout, it syncs itself up with the client by sending a "qEcho:%u" where %u is an increasing integer, one for each time we timeout. We then wait for 3 timeout periods to sync back up. So the above "abc" session would look like: --> "abc" <-- <<<error: timeout>>> 1 second --> "qEcho:1" <-- <<<error: timeout>>> 1 second <-- <<<error: timeout>>> 1 second <-- "abc" <-- "qEcho:1" The first timeout is from trying to get the response, then we know we timed out and we send the "qEcho:1" packet and wait for 3 timeout periods to get back in sync knowing that we might actually get the response for the "abc" packet in the mean time... In this case we would actually succeed in getting the response for "abc". But lets say the remote GDB server is deadlocked and will never response, it would look like: --> "abc" <-- <<<error: timeout>>> 1 second --> "qEcho:1" <-- <<<error: timeout>>> 1 second <-- <<<error: timeout>>> 1 second <-- <<<error: timeout>>> 1 second We then disconnect and say we lost connection. We might also have a bad GDB server that just dropped the "abc" packet on the floor. We can still recover in this case and it would look like: --> "abc" <-- <<<error: timeout>>> 1 second --> "qEcho:1" <-- "qEcho:1" Then we know our remote GDB server is still alive and well, and it just dropped the "abc" response on the floor and we can continue to debug. <rdar://problem/21082939> llvm-svn: 238530
* Fix TestMultithreaded.Chaoren Lin2015-05-291-1/+1
| | | | llvm-svn: 238529
* Add "Failing Tests .." line to dosep logsYing Chen2015-05-281-0/+1
| | | | | | | | | | | | | | | Summary: -Buildbot parser depends on this line as start flag -Will remove the dependency from buildbot parser, but it takes some time to take effect -Will remove this line from printout after buildbot master reconfig Reviewers: chaoren, vharron Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D10110 llvm-svn: 238527
* Remove warning when testing for timeout command.Chaoren Lin2015-05-281-2/+2
| | | | llvm-svn: 238522
* Added a test that makes sure that structs returnedSean Callanan2015-05-281-0/+3
| | | | | | | | from expressions return intact. <rdar://problem/21146609> llvm-svn: 238512
* Simplify regex in TestDataFormatterUnordered.py for better readability.Chaoren Lin2015-05-281-6/+22
| | | | | | | | | | | | | | | | | | Summary: Using `(match){3}` instead of `matchmatchmatch`. This is an update to D10078. Test Plan: no change in test behavior. Reviewers: clayborg, sivachandra Reviewed By: sivachandra Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D10094 llvm-svn: 238510
* Skip ThreadStateTestCase.test_state_after_continue_with_dwarf on DarwinYing Chen2015-05-281-0/+6
| | | | | | | | | | | | | | | | Summary: - This test cause Python crash randomly on darwin builder - Tracked by bug 'llvm.org/pr23669' Test Plan: ./dotest.py -m --executable /Users/lldb_build/testSlave/buildDir/lldb.src/build/Debug/lldb --framework /Users/lldb_build/testSlave/buildDir/lldb.src/build/Debug/LLDB.framework -A x86_64 -C clang -p TestThreadStates.py Reviewers: chaoren, vharron Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D10053 llvm-svn: 238495
* Refactor test runner to print sub-test-case pass/fail rate.Zachary Turner2015-05-284-40/+67
| | | | llvm-svn: 238467
* XTIMEOUT new TestChangeProcessGroup.py on FreeBSDEd Maste2015-05-281-0/+1
| | | | llvm-svn: 238454
* Add a comment explaining the eCommandRequiresTarget testEd Maste2015-05-281-0/+2
| | | | | | llvm.org/pr23686 llvm-svn: 238438
* Revert r238425, it undoes the purpose of the testEd Maste2015-05-281-7/+3
| | | | | | llvm.org/pr23686 llvm-svn: 238437
* Fix TestCommandScript: return an error if target executable is not setEd Maste2015-05-281-3/+7
| | | | | | | | | | The test invokes the 'targetname' test command before setting a target executable, which caused Python to raise TypeError: cannot concatenate 'str' and 'NoneType' objects. llvm.org/pr23686 llvm-svn: 238425
* Cleanup the forked child in TestChangeProcessGroupPavel Labath2015-05-281-0/+8
| | | | | | | if the test fails for some reason, we can end up leaking a process. This has a tendency to confuse the buildbots. I have added a cleanup hook to make sure we cleanup the child. llvm-svn: 238421
* Don't check breakpoint location count in TestChangeProcessGroupPavel Labath2015-05-281-1/+1
| | | | | | apparently, we get two locations for the breakpoint on android. llvm-svn: 238417
* Fix breakpoint setting in gdb remote test cases on armTamas Berghammer2015-05-282-4/+10
| | | | llvm-svn: 238411
* Move prctl call in TestChangeProcessGroup to the childPavel Labath2015-05-281-13/+13
| | | | | | I was hoping the enable-tracing flag will be inherited from the parent. It is not. llvm-svn: 238408
* [NativeProcessLinux] Support inferiors which change their process groupPavel Labath2015-05-283-0/+200
| | | | | | | | | | | | | | | | | | | | Summary: Previously, we wait()ed for events from the inferiors process group. This is resulted in a failure if the inferior changed its process group in the middle of execution. To avoid this, I pass -1 to the wait() call. The flag __WNOTHREAD makes sure we don't actually wait for events from any process, but only the processes(threads) which are our children (or traced by us). Since this happens on the monitor thread, which is dedicated to monitoring a single inferior, we will be getting events only from this inferior. Test Plan: All tests pass on linux. I have added a test to check the new functionality. Reviewers: chaoren, ovyalov Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D10061 llvm-svn: 238405
* [TestDataFormatterUnordered] Use patterns to match unordered_<multi>set elementsSiva Chandra2015-05-281-8/+8
| | | | | | | | | | | | | | | | Summary: This fixes the test for i386 targets. Test Plan: dotest.py -C clang --arch i386 TestDataFormatterUnordered Reviewers: chying, chaoren, clayborg Reviewed By: clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D10078 llvm-svn: 238385
* [TestNamespace] Fix an accidentally committed local change.Siva Chandra2015-05-271-1/+1
| | | | | | | | | | | | Test Plan: dotest.py -p TestNamespace Reviewers: sivachandra Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D10076 llvm-svn: 238368
* [TestBase.runCmd] Better error message when runCmd fails.Siva Chandra2015-05-27174-253/+263
| | | | | | | | | | | | | | | | | | | | | Summary: Before: AssertionError: False is not True : Process is launched successfully After: AssertionError: False is not True : Command 'run a.out' failed. >>> error: invalid target, create a target using the 'target create' command >>> Process could not be launched successfully Reviewers: clayborg Reviewed By: clayborg Subscribers: lldb-commits, vharron Differential Revision: http://reviews.llvm.org/D9948 llvm-svn: 238363
* [TestDataFormatterUnordered] Fix a few typos in the test.Siva Chandra2015-05-271-2/+2
| | | | | | | | | | | | | | | | Summary: The typos were exposed by http://reviews.llvm.org/D9948. Test Plan: dotest.py -p TestDataFormatterUnordered Reviewers: vharron, clayborg Reviewed By: clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D10071 llvm-svn: 238361
* XTIMEOUT another test timing out on the FreeBSD buildbotEd Maste2015-05-271-0/+1
| | | | llvm-svn: 238348
* Add support for custom commands to set flags on themselvesEnrico Granata2015-05-273-13/+23
| | | | | | | | | This works for Python commands defined via a class (implement get_flags on your class) and C++ plugin commands (which can call SBCommand::GetFlags()/SetFlags()) Flags allow features such as not letting the command run if there's no target, or if the process is not stopped, ... Commands could always check for these things themselves, but having these accessible via flags makes custom commands more consistent with built-in ones llvm-svn: 238286
* test Makefile.rules - pick a more sensible default CC on LinuxVince Harron2015-05-271-1/+7
| | | | | | Differential Revision: http://reviews.llvm.org/D9920 llvm-svn: 238282
* dosep - force timeout processes to dump core when they timeoutVince Harron2015-05-271-2/+34
| | | | | | | | | | | | | move all core files to the session dir after all tests have completed TEST PLAN Run tests. Force a timeout by decreasing a timeout export LLDB_EVENTS_TIMEOUT=10s ./dosep.py Differential Revision: http://reviews.llvm.org/D9905 llvm-svn: 238281
* Add 'qXfer:features:read' to known stub listYing Chen2015-05-261-0/+1
| | | | | | | | | | | | | | | | | | Summary: -Fix darwin bot failure "unknown qSupported stub feature reported: qXfer:features:read" -TestGdbRemoteAuxvSupport.py and TestLldbGdbServer.py were affected by this problem Test Plan: dotest.py -m --executable /Users/lldb_build/testSlave/buildDir/lldb.src/build/Debug/lldb --framework /Users/lldb_build/testSlave/buildDir/lldb.src/build/Debug/LLDB.framework -A x86_64 -C clang -p TestLldbGdbServer.py dotest.py -m --executable /Users/lldb_build/testSlave/buildDir/lldb.src/build/Debug/lldb --framework /Users/lldb_build/testSlave/buildDir/lldb.src/build/Debug/LLDB.framework -A x86_64 -C clang -p TestGdbRemoteAuxvSupport.py Reviewers: clayborg, sivachandra, vharron Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D10043 llvm-svn: 238262
* Have lldb-mi tests import pexpect at a narrower scope.Zachary Turner2015-05-261-1/+1
| | | | | | | | The tests are xfail'ed on Windows, but would still error out since they were importing pexpect at global scope. This way the tests will correctly report as unsupported. llvm-svn: 238249
* Also don't try to copy a logfile if it doesn't exist.Zachary Turner2015-05-261-9/+10
| | | | | | | In some cases no log file will be written, so don't attempt to call os.rename() with a non-existent source path. llvm-svn: 238248
* On Windows, delete existing log file before renaming temp file.Zachary Turner2015-05-261-0/+7
| | | | | | | | | | On non-Windows platforms, os.rename() will silently replace the destination file if it already exists. On Windows, it doesn't do this, and the filesystem has no mechanism to simulate the same type of atomic rename operation. So on Windows, delete the file first before calling os.rename(). llvm-svn: 238239
* dotest.py - fixed a bug displaying usageVince Harron2015-05-223-5/+8
| | | | | | ./dotest.py --help llvm-svn: 238043
* Disable TestConcurrentEvents.py on Windows.Zachary Turner2015-05-221-1/+1
| | | | | | | This test takes over 5 minutes to run just by itself, and everything fails anyway, so it doesn't make sense to keep it running for now. llvm-svn: 238040
* [TestRaise] Skip the SIGRTMIN test on Android.Siva Chandra2015-05-221-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Running "kill -l" on nexus player (i386) device results in this: 1 HUP Hangup 33 33 Signal 33 2 INT Interrupt 34 34 Signal 34 3 QUIT Quit 35 35 Signal 35 4 ILL Illegal instruction 36 36 Signal 36 5 TRAP Trap 37 37 Signal 37 6 ABRT Aborted 38 38 Signal 38 7 BUS Bus error 39 39 Signal 39 8 FPE Floating point exception 40 40 Signal 40 9 KILL Killed 41 41 Signal 41 10 USR1 User signal 1 42 42 Signal 42 11 SEGV Segmentation fault 43 43 Signal 43 12 USR2 User signal 2 44 44 Signal 44 13 PIPE Broken pipe 45 45 Signal 45 14 ALRM Alarm clock 46 46 Signal 46 15 TERM Terminated 47 47 Signal 47 16 STKFLT Stack fault 48 48 Signal 48 17 CHLD Child exited 49 49 Signal 49 18 CONT Continue 50 50 Signal 50 19 STOP Stopped (signal) 51 51 Signal 51 20 TSTP Stopped 52 52 Signal 52 21 TTIN Stopped (tty input) 53 53 Signal 53 22 TTOU Stopped (tty output) 54 54 Signal 54 23 URG Urgent I/O condition 55 55 Signal 55 24 XCPU CPU time limit exceeded 56 56 Signal 56 25 XFSZ File size limit exceeded 57 57 Signal 57 26 VTALRM Virtual timer expired 58 58 Signal 58 27 PROF Profiling timer expired 59 59 Signal 59 28 WINCH Window size changed 60 60 Signal 60 29 IO I/O possible 61 61 Signal 61 30 PWR Power failure 62 62 Signal 62 31 SYS Bad system call 63 63 Signal 63 32 32 Signal 32 64 64 Signal 64 The signals from 33-64 are missing symbolic names. Test Plan: dotest.py -p TestRaise on Android Reviewers: labath Subscribers: tberghammer, aemerson, lldb-commits Differential Revision: http://reviews.llvm.org/D9944 llvm-svn: 238039
* Add real time signals support to LinuxSignalsPavel Labath2015-05-222-21/+107
| | | | | | | | | | | | | | Summary: This enables correct handling of real time signals by lldb. Test Plan: Added a test that verifies handling of SIGRTMIN Reviewers: tberghammer, ovyalov Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D9911 llvm-svn: 238009
* [TestLldbGdbServer] Up sleep duration to 1min in the inferior thread_func.Siva Chandra2015-05-221-1/+1
| | | | | | | | | | | | | | | | | | | | Summary: The current sleep duration is not sufficient for Android. [[ Its a completely different investigation as to why Android needs longer sleep durations for this test. ]] Test Plan: dotest.py -p TestLldbGdbServer on Android and local linux. Reviewers: chaoren Reviewed By: chaoren Subscribers: tberghammer, lldb-commits Differential Revision: http://reviews.llvm.org/D9926 llvm-svn: 237981
* Don't import module `lock` at global scope.Zachary Turner2015-05-211-1/+1
| | | | | | | | `lock` depends on `fcntl`, which doesn't exist on Windows. Until someone implements an equivalent locking mechanism on Windows, we can't have lock imported globally. llvm-svn: 237946
* dotest.py - debug feature that helps find dosep racesVince Harron2015-05-212-4/+36
| | | | | | | | | | | | | | | | | | | | | | SUMMARY dosep.py starts lots and lots of dotest instances. This option helps you find if two (or more) dotest instances are using the same directory at the same time. Enable it to cause test failures and stderr messages if dotest instances try to run in the same directory simultaneously. It is disabled by default because it litters the test directories with ".dirlock" files TEST PLAN Set lldbtest.debug_confirm_directory_exclusivity = True run ./dosep.py Differential Revision: http://reviews.llvm.org/D9868 llvm-svn: 237935
* XPASS a bunch of GdbRemote/LldbGdbServer testsVince Harron2015-05-216-8/+0
| | | | | | | | | | | | Depends on r237932 "Fixed intermittent failures in TestGdbRemote*/TestLldbGdbServer" Test Plan: Ran dosep 100x, no failures in these tests Differential Revision: http://reviews.llvm.org/D9892 llvm-svn: 237933
* Fixed intermittent failures in TestGdbRemote*/TestLldbGdbServerVince Harron2015-05-2114-2/+28
| | | | | | | | | | | | | | test/tools/lldb-server/commandline/Test* were actually executing in their parent directory. This looks fine at first because they aren't compiling an inferior executable. Unfortunately, they still call "make clean" during their cleanup, which is likely causing all kinds of havok in tests running in the parent directory Differential Revision: http://reviews.llvm.org/D9869 llvm-svn: 237932
* Re-enable packet logging for GdbRemote/LldbServer testsVince Harron2015-05-212-7/+11
| | | | | | | | Creates logs in session dir Differential Revision: http://reviews.llvm.org/D9847 llvm-svn: 237931
* Fix lldb executable discovery on OS XVince Harron2015-05-211-1/+1
| | | | | | | | It was broken by r237632 Differential Revision: http://reviews.llvm.org/D9846 llvm-svn: 237928
* [TestChangeValueAPI] Remove expectedFailureGcc decorator.Siva Chandra2015-05-211-1/+0
| | | | | | | | | | | | | | Test Plan: dotest.py -C <clang|gcc> -p TestChangeValueAPI Reviewers: vharron Reviewed By: vharron Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D9116 llvm-svn: 237927
* dotest.py - log session to a file instead of a StringIO classVince Harron2015-05-211-24/+32
| | | | | | | | | | | | | That way, if the test gets killed (by a dosep timeout) we get to see the session trace Test Plan: Run dotest.py Kill it while it's running, check the session dir for Test* files Differential Revision: http://reviews.llvm.org/D9845 llvm-svn: 237926
* Add logging for XTIMEOUT/UnexpectedSuccessVince Harron2015-05-211-0/+16
| | | | | | | | | | | | If an expected timeout test times out, touch <session-dir>/ExpectedTimeout-<test-name> If an expected timeout test passes, touch <session-dir>/UnexpectedCompletion-<test-name> Differential Revision: http://reviews.llvm.org/D9843 llvm-svn: 237925
* Modify dosep.py to add default session dir parameterVince Harron2015-05-211-10/+17
| | | | | | | | | | | | | | | | This ensures that all spawned dotest instances store their traces in the same location. Test Plan: run dosep.py with and without a -s option for dotest cd lldb/test ./dosep.py ./dosep.py -o '-s /tmp/traces' Differential Revision: http://reviews.llvm.org/D9839 llvm-svn: 237923
* [TestBuiltinTrap] Change skipIfGcc to expectedFailure for GCC <= 4.6.Siva Chandra2015-05-211-3/+1
| | | | | | | | | | | | | | Test Plan: dotest.py -C gcc -p TestBuiltinTrap Reviewers: vharron Reviewed By: vharron Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D9117 llvm-svn: 237922
* TestInlineStepping - made XFAIL more specificVince Harron2015-05-211-1/+2
| | | | | | Differential Revision: http://reviews.llvm.org/D9828 llvm-svn: 237921
OpenPOWER on IntegriCloud