summaryrefslogtreecommitdiffstats
path: root/lldb/test
Commit message (Collapse)AuthorAgeFilesLines
...
* Added support for XTIMEOUT to dosepVince Harron2015-05-121-0/+36
| | | | | | | | | | | Ideally, this would be put in the individual test files. Unfortunately, I'm not sure how to do that quickly/easily. I'm open to suggestions. In the meantime, I'll submit this to stabilze the build server. llvm-svn: 237206
* Revert accidental file checkinVince Harron2015-05-121-1/+1
| | | | llvm-svn: 237184
* XFAIL'd TestPersistObjCPointeeType.pyVince Harron2015-05-122-1/+3
| | | | llvm-svn: 237182
* Added minor commentVince Harron2015-05-121-0/+1
| | | | llvm-svn: 237174
* XFAIL and Skip flaky test case on linuxTamas Berghammer2015-05-121-0/+2
| | | | llvm-svn: 237135
* Disable GCC optimizations for builtin functions in lldb testsIlia K2015-05-121-1/+1
| | | | | | | | | This patch adds new default flag -fno-builtin which forces gcc to not optimize builtin functions. For example, without this flag GCC replaces printf("hello\n") -> puts("hello") even if -O0 was specified Also this patch fixes the MiDataTestCase.test_lldbmi_data_disassemble test on Linux/gcc. llvm-svn: 237118
* Fix MiDataTestCase.test_lldbmi_data_disassemble test on Linux (bug 23489)Ilia K2015-05-121-3/+4
| | | | llvm-svn: 237105
* Skip MiDataTestCase.test_lldbmi_data_disassemble test to get Linux build greenIlia K2015-05-121-0/+1
| | | | llvm-svn: 237098
* Improve MiStartupOptionsTestCase.test_lldbmi_executable_option_file test (MI)Ilia K2015-05-121-1/+8
| | | | llvm-svn: 237096
* Show error message from failed evaluation when doing -var-createIlia K2015-05-121-1/+1
| | | | | | | | | | | | | | | | | Summary: When -var-create fails, we will now show the error message from the failed evaluation if it is available. Patch from chuckr@microsoft.com Test Plan: I fixed the MiVarTestCase.test_lldbmi_eval test to expect the new error string. All MI tests passing on OS X. Reviewers: abidh, ChuckR Subscribers: greggm, lldb-commits, paulmaybee Differential Revision: http://reviews.llvm.org/D9691 llvm-svn: 237094
* Escape strings in disassembly comments.Ilia K2015-05-122-0/+30
| | | | | | | | | | | | Summary: Patch from chuckr@microsoft.com Reviewers: abidh, ChuckR Subscribers: paulmaybee, lldb-commits Differential Revision: http://reviews.llvm.org/D9544 llvm-svn: 237092
* TestPublicAPIHeaders.py - Changed expectedFailureDarwin to skipIfDarwinVince Harron2015-05-121-1/+2
| | | | | | expectedFailure doesn't work if the failure is in a teardown step. llvm-svn: 237089
* Working on getting the OSX build greenVince Harron2015-05-125-0/+10
| | | | | | | | | | | | | | Added missing SBLanguageRuntime.h to lldb.xcodeproj, set to Public (fixed compile error in TestPublicAPIHeaders) Removed reference to (temporarily) missing gtest.xcodeproj Fixed TestDeadStrip compile error XFAIL TestPublicAPIHeaders - test passes but teardown command 'settings remove target.env-vars DYLD_LIBRARY_PATH' fails XFAIL TestCModules - use of undeclared identifier 'MIN' XFAIL TestModulesAutoImport - clang: error: unknown argument: '-gmodules' XFAIL TestObjCNewSyntax - expr -- @((char*)"Hello world" + 6) cannot box a string value because NSString has not been declared http://reviews.llvm.org/D9643 llvm-svn: 237085
* Change session log filename pattern: test before archVince Harron2015-05-121-2/+2
| | | | | | | | | | | | | | | | | | | | This is a very minor change. Just reshuffle the elements of the log filename so that the test name comes before the arch/compiler Before: Failure-x86_64-clang-TestCModules.CModulesTestCase.test_expr_with_dwarf.log After: Failure-TestCModules.CModulesTestCase.test_expr_with_dwarf-x86_64-clang.log This way, results are grouped by test name, not by arch. I think this is much more useful. Differential Revision: http://reviews.llvm.org/D9648 llvm-svn: 237076
* ["watch set" tests] Use default test case executable names.Siva Chandra2015-05-112-12/+8
| | | | | | | | | | | | | | Summary: This change similar to r236783. Reviewers: chaoren Reviewed By: chaoren Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D9630 llvm-svn: 237010
* os.path.join does not always work for paths on remote platforms.Chaoren Lin2015-05-116-18/+28
| | | | | | | | | | | | | | | | Summary: Since we don't yet have remote windows debugging, it should be safe to assume that the remote target uses unix path separators. Reviewers: ovyalov, zturner, clayborg, vharron Reviewed By: vharron Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D9633 llvm-svn: 237006
* New test for llvm.org/pr23478Tamas Berghammer2015-05-113-0/+106
| | | | | | | | | | When there is two brekapoint on two consecutive instruction then the second breakpoint is ignored by lldb. This test check for the correct behaviour in this scenario. Differential revision: http://reviews.llvm.org/D9661 llvm-svn: 236997
* XFAIL a test that fails on FreeBSD 11 (local and buildbot)Ed Maste2015-05-111-0/+1
| | | | | | | | | | | For some reason this happens only when running the full test suite (e.g., via ninja check-lldb), but not when running the TestStaticVariables.py tests in isolation. XFAIL for now while investigating, in an attempt to bring the bot to green and reduce noise. llvm.org/pr20550 llvm-svn: 236993
* Skip and XFAIL TestThreadStepOut as it times out on the Linux build botTamas Berghammer2015-05-111-0/+6
| | | | llvm-svn: 236986
* Skip and XFAIL test occasionally timing out on the Linux build botTamas Berghammer2015-05-111-0/+2
| | | | llvm-svn: 236984
* Fixed lldb-mi test failures introduced by r236956Vince Harron2015-05-101-85/+68
| | | | | | | Move enable/disableLogForCurrentTest from lldbtest.TestBase to lldbtest.Base so they're accessible to Mi tests llvm-svn: 236963
* Remove unsupported lldb-server parameters from testVince Harron2015-05-101-3/+1
| | | | llvm-svn: 236958
* We can't use sys.path[0] to determine the script directory because it ↵Vince Harron2015-05-102-5/+10
| | | | | | | | | | | | | doesn't work under a debugger Test Plan: run tests with/without python debugger Tested on OSX & Linux with PyCharm Reviewers: chying, clayborg Differential Revision: http://reviews.llvm.org/D9593 llvm-svn: 236957
* Add support for ./dotest.py --channel and --log-successVince Harron2015-05-103-16/+179
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: New dotest options that allow arbitrary log channels and categories to be enabled. Also enables logging for locally run debug servers. Log messages are separated into separate files per test case. (this makes it possible to log in dosep runs) These new log files are stored side-by-side with trace files in the session directory. These files are deleted by default if the test run is successful. If --log-success is specified, even successful logs are retained. --log-success is useful for creating reference log files. Test Plan: add '--channel "lldb all" --channel "gdb-remote packets" --log-success' to your dotest options Tested on OSX and Linux Differential Revision: http://reviews.llvm.org/D9594 llvm-svn: 236956
* Skip tests that are timing out on the FreeBSD buildbotEd Maste2015-05-093-0/+33
| | | | | | | | | XFAILing these does not work because the timeout is caught by the top-level test infrastucture instead. Some might be llvm.org/pr22784 llvm-svn: 236924
* TestCModules was effectively skipped on LinuxVince Harron2015-05-081-3/+2
| | | | | | | | | | | | | | Summary: I've removed the secret skip and added expectedFailureLinux Test Plan: run tests Reviewers: flackr Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D9615 llvm-svn: 236914
* Bump the default timeout in dosep.py to 10m.Siva Chandra2015-05-081-10/+5
| | | | | | | | | | | | | | | | | Summary: This seems to be sufficient to get the tests taking longer than the previous timeout of 5m to run to completion on Android to pass instead of timing out. Reviewers: chaoren Reviewed By: chaoren Subscribers: tberghammer, lldb-commits Differential Revision: http://reviews.llvm.org/D9627 llvm-svn: 236913
* [TestCreateAfterAttach] Add @skipIfRemote to the forking test.Siva Chandra2015-05-081-0/+1
| | | | | | | | | | | | | | Test Plan: dotest.py -p TestCreateAfterAttach Reviewers: chaoren Reviewed By: chaoren Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D9617 llvm-svn: 236903
* Skip tests that are timing out on the FreeBSD buildbotEd Maste2015-05-081-0/+30
| | | | | | | | | XFAILing these does not work because the timeout is caught by the top-level test infrastucture instead. Might be llvm.org/pr22784 llvm-svn: 236895
* Add expectedFailureFreeBSD decorator for buildbot pexpect issueEd Maste2015-05-084-0/+4
| | | | | | | | | | I'm not yet sure what's wrong with pexpect and I cannot reproduce this problem locally. XFAIL these tests for now to reduce buildbot noise so I can track down the remaining buildbot failures. llvm.org/pr22784 llvm-svn: 236857
* Enable TestCallStopAndContinue on FreeBSDEd Maste2015-05-081-1/+0
| | | | | | | | | | It's reported to pass consistently on Linux now, and it passed for me in local testing on FreeBSD. Remove the expectedFailureFreeBSD decorator for now. llvm.org/pr20274 llvm-svn: 236853
* Improve MiBreakTestCase.test_lldbmi_break_insert_{function*,file_line*} ↵Ilia K2015-05-081-2/+16
| | | | | | tests (MI) llvm-svn: 236840
* Fix =breakpoint-created event after creation of BP (MI)Ilia K2015-05-081-7/+5
| | | | | | | | | | | | | | | | | | | | | | | | | For example: was: ``` $ bin/lldb-mi ~/p/hello [...] -break-insert main ^done,bkpt={number="1",type="breakpoint",disp="keep",enabled="y",addr="0x0000000100000e2d",func="main",file="hello.cpp",fullname="/Users/IliaK/p/hello.cpp",line="14",times="0",original-location="main"} (gdb) =breakpoint-modified,bkpt={number="1",type="breakpoint",disp="keep",enabled="y",addr="0x0000000100000e2d",func="main",file="hello.cpp",fullname="/Users/IliaK/p/hello.cpp",line="14",times="0",original-location="main"} ``` now: ``` $ bin/lldb-mi ~/p/hello [...] -break-insert main ^done,bkpt={number="1",type="breakpoint",disp="keep",enabled="y",addr="0x0000000100000e2d",func="main",file="hello.cpp",fullname="/Users/IliaK/p/hello.cpp",line="14",times="0",original-location="main"} (gdb) =breakpoint-created,bkpt={number="1",type="breakpoint",disp="keep",enabled="y",addr="0x0000000100000e2d",func="main",file="hello.cpp",fullname="/Users/IliaK/p/hello.cpp",line="14",times="0",original-location="main"} ``` llvm-svn: 236837
* Fix BP address for local symbols if target not launched (MI)Ilia K2015-05-081-5/+3
| | | | | | | | | | | | | | | | | | | | | For example: was: ``` $ bin/lldb-mi ~/p/hello [...] -break-insert -f main ^done,bkpt={number="1",type="breakpoint",disp="keep",enabled="y",addr="0xffffffffffffffff",func="main",file="hello.cpp",fullname="/Users/IliaK/p/hello.cpp",line="14",pending=["main"],times="0",original-location="main"} ``` now: ``` $ bin/lldb-mi ~/p/hello [...] -break-insert -f main ^done,bkpt={number="1",type="breakpoint",disp="keep",enabled="y",addr="0x0000000100000e2d",func="main",file="hello.cpp",fullname="/Users/IliaK/p/hello.cpp",line="14",pending=["main"],times="0",original-location="main"} ``` llvm-svn: 236830
* Add support for Unicode strings in CMICmnLLDBUtilSBValue::GetValue (MI)Ilia K2015-05-082-10/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch includes the following changes: # Add CMIUtilString::ConvertToASCII to convert unicode to ASCII (MI) # Rework CMICmnLLDBUtilSBValue::GetSimpleValue to print wide/unicode char (MI) ## Add CMICmnLLDBUtilSBValue::GetSimpleValueChar ## Extend CMICmnLLDBUtilSBValue::IsCharType to accept char16_t/char32_t ## Don't ignore the fail_value in SBValue::GetValueAsUnsigned # Rework CMIUtilString::ConvertToASCII (MI) ## Don't use templates ## Change the function signature to convert signle characters (was std::basic_string) ## Rename CMIUtilString::ConvertToASCII to CMIUtilString::ConvertToPrintableASCII # Add CMIUtilString::ConvertToPrintableASCII for char (MI) ## Refactor CMIUtilString::Escape ## Simplify CMICmnLLDBUtilSBValue::GetSimpleValueChar for char # Add char16_t* and char32_t* support in CMICmnLLDBUtilSBValue::GetSimpleValue (MI) ## Add CMICmnLLDBUtilSBValue::GetSimpleValueCStringPointer ## Add CMICmnLLDBUtilSBValue::ReadCStringFromHostMemory2 (it's extended version of CMICmnLLDBUtilSBValue::ReadCStringFromHostMemory) # Improve error checking in CMICmnLLDBUtilSBValue::GetSimpleValueChar (MI) # Refactor CMICmnLLDBUtilSBValue (MI) ## Remove CMICmnLLDBUtilSBValue::ReadCStringFromHostMemory (use CMICmnLLDBUtilSBValue::ReadCStringFromHostMemory2 instead) ## Rename CMICmnLLDBUtilSBValue::ReadCStringFromHostMemory2 to CMICmnLLDBUtilSBValue::ReadCStringFromHostMemory ## Move CMICmnLLDBUtilSBValue::GetValueCString to private methods ## Rename CMICmnLLDBUtilSBValue::GetValueCString to CMICmnLLDBUtilSBValue::GetSimpleValueCStringArray ## Remove CMICmnLLDBUtilSBValue::GetChildValueCString # Improve MiGdbSetShowTestCase.test_lldbmi_gdb_set_show_print_char_array_as_string test to check char16_t/char32_t (MI) # Fix CMICmnLLDBUtilSBValue::GetSimpleValueCStringArray for Unicode (MI) ## Fix handling of char16_t and char32_t ## Improve CMICmnLLDBUtilSBValue::ReadCStringFromHostMemory to read variables of type char[]: add vnMaxLen argument ## Turn on few cases to check char16_t[] and char32_t[] output in MiGdbSetShowTestCase.test_lldbmi_gdb_set_show_print_char_array_as_string # Remove unnecessary checks in CMICmnLLDBUtilSBValue (MI) llvm-svn: 236827
* Fix -var-create for undefined variables (MI)Ilia K2015-05-081-1/+1
| | | | llvm-svn: 236825
* Print process's output line by line (MI)Ilia K2015-05-081-1/+2
| | | | | | | | | | | | | | | | | | | | | For example: was: ``` @"'\r\n` - it's \\ni=1\r\nj=2\r\nx=3\r\ny=4\r\nargc: /Users/IliaK/p/hello\r\nargc: (null)\r\n" ``` now: ``` @"'\r\n" @"` - it's \\ni=1\r\n" @"j=2\r\n" @"x=3\r\n" @"y=4\r\n" @"argc: /Users/IliaK/p/hello\r\n" @"argc: (null)\r\n" ``` llvm-svn: 236824
* Add MiExitTestCase.test_lldbmi_q that checks reduction of quit (MI)Ilia K2015-05-081-0/+24
| | | | llvm-svn: 236822
* Fix -var-list-children command (MI)Ilia K2015-05-082-5/+98
| | | | | | | | | | | | | | | | | | | | | | | | | | This patch incldues the following: # Add from/to arguments in -var-list-children command (MI) ## Handle from and to args ## Don't print children=[] if numchild is 0 ## A bit refactoring ## Add MiVarTestCase.test_lldbmi_var_list_children test # Refactor -var-list-children (MI) ## Remove CMICmdCmdVarListChildren::VecMIValueResult_t ## Add CMICmdCmdVarListChildren::m_miValueList ## Remove CMICmdCmdVarListChildren::m_vecMiValueResult (use CMICmdCmdVarListChildren::m_miValueList instead) ## Print error message if value is invalid: ``` ^error,msg="variable invalid" ``` ## Refactor CMICmdCmdVarListChildren::Acknowledge and remove duplicated code ## Don't print children=[] if numchild is 0 ## Add error checking ## Use CMICmnLLDBDebugSessionInfo::VariableInfoFormat_e for print-values ## Add few more empty-range test cases in MiVarTestCase.test_lldbmi_var_list_children #Improve MiVarTestCase.test_lldbmi_var_list_children test (MI) llvm-svn: 236820
* Make LLDB-MI tests wait for LLDB-MI to start up before sending any MI commandsBruce Mitchener2015-05-084-25/+2
| | | | | | | | | | | | | | | | | | | | | Summary: This set of changes addresses the issue I described in [[ http://llvm.org/pr23403 | Bug 23403 ]], in short most LLDB-MI tests fail unexpectedly due to timeout on my Ubuntu 14.10 x86_64 VirtualBox VM. I have no idea why the Ubuntu buildbots don't seem to suffer from this issue. This patch just makes **MiTestCaseBase.spawnLldbMi()** block until the spawned LLDB-MI child process outputs the **(gdb)** prompt, which ensures that MI commands aren't sent to the LLDB-MI child process until it's ready. Before these changes 52 LLDB-MI tests failed unexpectedly (all but one due to timeouts), after these changes no tests fail due to timeouts. I still get one unexpected failure in **test_lldbmi_source_option_start_script_error** in **TestMiStartupOptions.py**, but that's due to a file error, that test should be skipped on Linux just like the other two //start_script// tests until the file error is fixed. Patch from Vadim Macagon. Thanks! Test Plan: ./dotest.py -A x86_64 -C clang --executable $BUILDDIR/bin/lldb tools/lldb-mi/ Reviewers: abidh, domipheus, ki.stfu Reviewed By: ki.stfu Subscribers: brucem, lldb-commits Differential Revision: http://reviews.llvm.org/D9595 llvm-svn: 236816
* change comment symbol from // to #Ying Chen2015-05-081-2/+2
| | | | llvm-svn: 236803
* Remove tailing " (deleted)" from executable name returned by readlinkYing Chen2015-05-081-1/+3
| | | | | | | | | | | | Summary: When calling readlink, " (deleted)" is appended to executable path if it's deleted. Remove if it's there. Reviewers: chaoren, sivachandra, vharron Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D9583 llvm-svn: 236802
* [TestEvents] Add a 'connected' state to include remote debugging.Siva Chandra2015-05-081-10/+20
| | | | | | | | | | | | | | Test Plan: dotest.py -p TestEvents Reviewers: vharron, chaoren Reviewed By: chaoren Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D9581 llvm-svn: 236800
* Pass Android device ID to TestStubReverseConnect.Chaoren Lin2015-05-071-1/+1
| | | | llvm-svn: 236789
* [TestWatchpointMultipleThreads] Use default test executable names.Siva Chandra2015-05-071-15/+10
| | | | | | | | | | | | | | | | | | Summary: Android has limits on file name lengths. This commit reduces the names of the test executables to satisfy these limits. Test Plan: dotest.py -p TestWatchpointMultipleThreads Reviewers: chaoren Reviewed By: chaoren Subscribers: tberghammer, lldb-commits Differential Revision: http://reviews.llvm.org/D9540 llvm-svn: 236783
* Make it so that changing formats on a synthetic value object causes children ↵Enrico Granata2015-05-071-0/+9
| | | | | | | | to be invalidated and refetched when needed This is required for supporting vector types formatting llvm-svn: 236769
* Extend r236708 to skip tests also failing on FreeBSDEd Maste2015-05-071-0/+3
| | | | llvm-svn: 236749
* Increase the timeout limit for TestConcurrentEventsPavel Labath2015-05-071-0/+5
| | | | | | | After recent changes, TestConcurrentEvents began timing out. This increases the timeout limit to 7m for this test, ensure the Test has enough time to complete. llvm-svn: 236725
* Skip few MiStartupOptionsTestCase tests to get Linux build greenIlia K2015-05-071-0/+2
| | | | llvm-svn: 236708
* Implement -target-attach and -target-detachIlia K2015-05-073-0/+151
| | | | | | | | | | | | | | | | | | | | | Summary: This changes add -target-attach and -target-detach. -target-attach allows lldb-mi to attach to an existing process by it's process id, matching gdb mi's syntax of '-target-attach <pid'. Additionally, support has been added for attaching to a process by name using '-target-attach -n <name>'. Combining this with --waitfor will allow lldb mi to attach to a process by name when the process starts. -target-detach simply detaches from the current process Patch from chuckr@microsoft.com Test Plan: I have added three tests, one each for -target-attach <pid>, -target-attach -n <name>, and -target-attach -n <name> --waitfor Reviewers: paulmaybee, abidh, ChuckR Subscribers: greggm, lldb-commits Differential Revision: http://reviews.llvm.org/D9484 llvm-svn: 236705
OpenPOWER on IntegriCloud