summaryrefslogtreecommitdiffstats
path: root/lldb/test
Commit message (Collapse)AuthorAgeFilesLines
...
* Restrict SigtrampUnwind test to Darwin onlyEd Maste2015-01-301-0/+1
| | | | | | | It needs OS-specific knowledge and has not yet been adapted to other systems. llvm-svn: 227579
* Skip Objective-C test on non-Darwin platformsEd Maste2015-01-301-1/+2
| | | | llvm-svn: 227578
* Fixed the failing test:Greg Clayton2015-01-281-7/+7
| | | | | | | | | | ./dotest.py -A x86_64 -C clang -v -t -f TestImageListMultiArchitecture.test_image_list_shows_multiple_architectures The problem was that if the platform wasn't compatible with the current file in the "target create" command, it wasn't finding a platform that was like it used to. Also, the currently selected platform was being used upload the file _before_ the target was created which was incorrect as "target create a.out" might switch platforms if its architecture doesn't match, so I moved the uploading to happen after the target was created so we use the right platform (the one in the target, not the selected one). llvm-svn: 227380
* Move several GetByteSize() calls over to the brave new world of taking an ↵Enrico Granata2015-01-283-0/+147
| | | | | | | | | | ExecutionContext* And since enough of these are doing the right thing, add a test case to verify we are doing the right thing with freeze drying ObjC object types Fixes rdar://18092770 llvm-svn: 227282
* Added test case to make sure we don't regress on settings breakpoints by ↵Greg Clayton2015-01-273-0/+210
| | | | | | | | | | | | | | | selector and with the various partially specified ObjC specified breakpoints. This test tests the equivalent of: breakpoint set --name count breakpoint set --selector count breakpoint set --name isEqual: breakpoint set --selector isEqual: breakpoint set --name "-[MyClass(MyCategory) myCategoryFunction]" breakpoint set --name "-[MyClass myCategoryFunction]" breakpoint set --name "[MyClass myCategoryFunction]" llvm-svn: 227271
* Clean lldb-mi test cases.Hafiz Abid Qadeer2015-01-278-752/+343
| | | | | | | | | | | This patch adds lldbmi_testcase.MiTestCaseBase class and removes a lot of repitition in the lldb-mi test cases. Also cleans import list and code-style. Presented for review in http://reviews.llvm.org/D7162. Patch from Ilia K <ki.stfu@gmail.com>. llvm-svn: 227218
* Fix the test to disassemble as if at address zero, not at an invalid ↵Greg Clayton2015-01-271-1/+1
| | | | | | | | address. The default SBAddress constructor sets the offset to 0xffffffffffffffff and the section to NULL. This was causing problems on clang 602 branches that use MemoryObjects to as the container for opcode bytes instead of a plain array of bytes. So we were asking for 3 bytes to be disassembled at address 0xffffffffffffffff which would cause an unsigned overflow and cause the MemoryObject to refuse to read anymore bytes. llvm-svn: 227153
* Add an overload of SetValueFromCString() to ValueObjectSynthetic that is ↵Enrico Granata2015-01-263-0/+26
| | | | | | | | | | just a passthrough to the parent object Without this overload, attempts to edit the value of a variable with synthetic children enabled would change the value inside the synthetic ValueObject, but not propagate the changes to the underlying storage, hence resulting in no write for any meaningful purpose Comes with a test case, and fixes rdar://19586311 llvm-svn: 227120
* Also except OSError when terminating a child.Hafiz Abid Qadeer2015-01-261-1/+1
| | | | | | | | | Ilia K <ki.stfu@gmail.com> sent this patch. He noted that it was possible for child to be terminated after isAlive call and before we send it quit command. In this case, sending command to it causes OSError. This patch just adds this exception to the except list. llvm-svn: 227086
* Replace more runCmd('continue') with process control API.Enrico Granata2015-01-223-24/+24
| | | | llvm-svn: 226860
* Make OSX test run firewall friendly.Oleksiy Vyalov2015-01-223-1/+9
| | | | | | http://reviews.llvm.org/D7115 llvm-svn: 226856
* Add a benchmark test case that shows how much slower repeat 'continue' ↵Enrico Granata2015-01-223-0/+120
| | | | | | commands are than going through the SB API directly llvm-svn: 226852
* Speed these tests up quite significantly by using the SB API instead of ↵Enrico Granata2015-01-216-52/+26
| | | | | | | | running the "continue" command at each step The reason why one mechanism is so much faster than the other (as in, ~10 seconds vs. ~1 minute) is quite baffling to me at the moment, but these are not process handling tests, so do what's faster llvm-svn: 226730
* Fixed a makefile rule used by several testsKate Stone2015-01-211-1/+1
| | | | | | Now quotes dsymutil path, required when running tests where the toolchain is in a path that contains a space llvm-svn: 226695
* Fix some platform specific paths in TestSettings.py.Zachary Turner2015-01-211-3/+7
| | | | | | | | | | | | | | We were referring to hardcoded paths /bin/ls and /bin/cat. For the purposes of this test, the actual value it's set to doesn't matter, and it might as well be a non-existent path. All that matters is that the before and after values have to match, and that trailing whitespace is stripped. On Windows FileSpec (correctly) converts /bin/ls to D:\bin\ls though, so the before and after values won't match. So this patch just correctly builds up a valid path in a platform-agnostic manner, and verifies that it matches before and after the set. llvm-svn: 226625
* XFAIL pexpect tests on Windows.Zachary Turner2015-01-2025-1/+65
| | | | | | | | | | | | | At some point we will need to either provide a pexpect equivalent on Windows, or provide some other method of doing out-of-process tests. Even with a pexpect replacement, it may be worth re-evaluating some of these tests to see if they would be better served as in-process tests. The larger issue of coming up with a pexpect replacement on Windows is tracked in http://llvm.org/pr22274. llvm-svn: 226614
* Fix help test cases after r226068Ed Maste2015-01-203-8/+8
| | | | | | | From: Ilia K <ki.stfu@gmail.com> Differential Revision: http://reviews.llvm.org/D7066 llvm-svn: 226568
* Fix a race condition where you could set the selected thread & target in theJim Ingham2015-01-191-36/+60
| | | | | | | | | | CommandInterpreter's execution context AFTER the process had started running and before it initially stopped. Also fixed one test case that was implicitly using this (and an abuse of the async mode) to accidentally succeed. <rdar://problem/16814726> llvm-svn: 226528
* During source manager test, write back the file using binary mode.Zachary Turner2015-01-151-2/+2
| | | | | | | | | On Windows, opening with "w" opens it as text instead of binary. This causes translation of newline characters, so that "\n" turns into "\r\n", which in turn leads to git detecting that the file has changed and wanting to commit it. llvm-svn: 226220
* Fixed the regex test case after recent modifications to the "help" command ↵Greg Clayton2015-01-151-2/+1
| | | | | | | | output. <rdar://problem/18527567> llvm-svn: 226218
* Make sure that when a breakpoint is hit but its condition is not met,Jim Ingham2015-01-151-4/+4
| | | | | | | | | | the hit count is not updated. Also, keep the hit count for the breakpoint in the breakpoint. We were using just the sum of the location's hit counts, but that was wrong since if a shared library is unloaded, and the location goes away, the breakpoint hit count should not suddenly drop by the number of hits there were on that location. llvm-svn: 226074
* Fix a number of tests on Windows.Zachary Turner2015-01-144-3/+8
| | | | | | | These fix various issues with path handling and disable a few tests which use features of LLVM which are not yet supported on Windows. llvm-svn: 226042
* test: Add workaround for FreeBSD libedit vs readline issueEd Maste2015-01-141-0/+12
| | | | | | | | | | | | | | | If stdout is not a terminal Python executes rl_variable_bind ("enable-meta-key", "off"); This produces a warning with FreeBSD's libedit because the enable-meta-key variable is unknown. Not an issue on Apple because cpython commit f0ab6f9f0603 added a #ifndef __APPLE__ around the call. See http://bugs.python.org/issue19884 for more information. For now we just discard the warning output to get the tests working again on FreeBSD. llvm-svn: 226037
* Don't run functionalities/tty under sudo / as root.Jason Molenda2015-01-131-0/+10
| | | | | | | | | | | | | | The terminal window will be opened under the ownership of the real userid and it won't be able to open the socket talking back to lldb -- the testsuite will hang here. The same thing probably should be done for lldb when run on a remote system over ssh. I added a line for that but commented it out for now because I haven't tested it. llvm-svn: 225748
* Hoist the RegisterNumber class out of RegisterContextLLDB and makeJason Molenda2015-01-103-0/+126
| | | | | | | | | | | | | | | it more generally available. Add checks to UnwindAssembly_x86::AugmentUnwindPlanFromCallSite() so that it won't try to augment an UnwindPlan that already describes the function epilogue. Add a test case for backtracing out of _sigtramp on Darwin systems. This could probably be adapted to test the same thing on linux/bsd but the function names of sigtramp and kill are probably platform specific and I'm not sure what they should be. llvm-svn: 225578
* Add C++ breakpoint tests where names are partially specified to ensure we ↵Greg Clayton2015-01-103-0/+159
| | | | | | | | | | don't regress on this again. Top of tree never regressed, but we have internal branches that we constantly merge and we need to make sure we don't regress. <rdar://problem/19429907> llvm-svn: 225572
* [TestInferiorAssert] Differentiate DWARF and DSYM tests with suffixes.Siva Chandra2015-01-101-4/+4
| | | | | | | | | | | | Reviewers: vharron, clayborg Reviewed By: clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D6907 llvm-svn: 225564
* Modify dotest.py to be able to run without an lldb build.Stephane Sezer2015-01-092-25/+34
| | | | | | | | | | | | Summary: This will ease llgs development a bit by not requiring an lldb/lldb.py build to launch the tests. Also, we can now use LLDB_DEBUGSERVER_PATH to point to a debug server to use to run the tests. I used that to point to a ds2 build and run llgs tests against ds2. Reviewers: clayborg, tfiala, vharron Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D6554 llvm-svn: 225549
* Fixed an issue where you couldn't delete a user defined regex, python, or ↵Greg Clayton2015-01-091-0/+13
| | | | | | | | | | | multi-word command by adding a new "command delete" command. This new command will delete user defined regular commands, but not aliases. We still have "command unalias" to remove aliases as they are currently in different buckets. Appropriate error messages are displayed to inform the user when "command unalias" is used on removable user defined commands that points users to the "command delete" command. Added a test to verify we can remove user defined commands and also verify that "command unalias" fails when used on a user defined command. <rdar://problem/18248300> llvm-svn: 225535
* [InlineTest] getRerunArgs returns an empty string if the test was skipped.Siva Chandra2015-01-091-3/+5
| | | | | | | | | | | | | | | | | | | | | | Summary: The main issue that this patch is trying to address is that the current implementation of getRerunArgs of InlineTest relies on the attribute 'using_dsym' which could be absent if the test was skipped altogether. [That is, if both dsym and dwarf tests were skipped.] While at it, the use of deprecated Python module 'new' is eliminated. Test Plan: [Linux] dotest.py -p TestExprPathSynthetic Reviewers: vharron, clayborg Reviewed By: clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D6888 llvm-svn: 225496
* Dynamic values have been around (and stable and reliable) for long enough ↵Enrico Granata2015-01-091-0/+10
| | | | | | | | | | | | that we can turn them on by default Change the default of prefer-dynamic-value to eDynamicDontRunTarget (i.e. enable dynamic values, but do not run code to do so) Of course, disable this for the test suite, since testing no-dynamic-values is actually valuable Fixes rdar://17363061 llvm-svn: 225486
* This patch fixes my think-o in ValueObject::UpdateValueIfNeeded() about the ↵Enrico Granata2015-01-083-0/+99
| | | | | | | | | right thing to assert() It also comes with a (rudimentary) test case that gets itself in a failed update scenario, and checks that we don't crash This is the easiest case I could think of that forces the failed update case Zachary was seeing llvm-svn: 225463
* Added documentation for test timeoutVince Harron2015-01-081-7/+37
| | | | | | | | Differential Revision: http://reviews.llvm.org/D6669 Submitted for Chaoren Lin llvm-svn: 225425
* Fix inlined test cases so they print out the correct command to run when ↵Greg Clayton2015-01-072-47/+46
| | | | | | | | | | | | | they fail instead of printing out incorrect information. To fix this I added a new method to TestBase: def getRerunArgs(self): return " -f %s.%s" % (self.__class__.__name__, self._testMethodName) The InlineTest which inherits from TestBase then overrides this function with a custom version which does the right thing. llvm-svn: 225407
* Added a test case for launching a process in a separate terminal window to ↵Greg Clayton2015-01-061-0/+35
| | | | | | | | ensure we don't regress on this. A recent POSIX host thread issue where HostThreadPosix::Join() wasn't returning the thread result was responsible for this regression, yet we had no test case covering this so it wasn't discovered. llvm-svn: 225284
* Make array symbol reading resilient to incomplete DWARF.Siva Chandra2015-01-051-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: GCC emits DW_TAG_subrange_type for static member arrays, but with no attributes. This in turn results in wrong type/value of the array when printing with 'target variable <array var name>'. This patch fixes this so that the array value is printed in this format: (<element type> []) <array var name> = {} Earlier, the array was being interpreted to be of its element type. Note: This does not fix anything to do with 'expr' or 'p' commands. Those commands still error out complaining about incomplete types. Test Plan: dotest.py -p TestStaticVariables Reviewers: emaste, clayborg Reviewed By: clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D6799 llvm-svn: 225219
* Fix about 20 tests on Windows.Zachary Turner2015-01-051-2/+5
| | | | | | | | | | Passing the argument string from dosep to dotest was failing on Windows due to the fact that Windows uses \ for its path separator. As a result, shlex.split() was treating it as an escape character. This fixes the issue by telling shlex.split() to not use posix mode when running on Windows. llvm-svn: 225195
* Cleanup lldb-mi test cases.Hafiz Abid Qadeer2014-12-306-79/+0
| | | | | | | | | | | Following changes were done. 1. Remove the extra line after -exec-run. 2. Remove check for prompt. 3. Remove 'quit' command. Initial patch was contributed by ki.stfu@gmail.com. llvm-svn: 224990
* [TestEvents] Replace expectedFailureLinux with skipIfLinuxSiva Chandra2014-12-191-2/+5
| | | | | | | | | | | | | | | | | | | | | Summary: If we do not mark them as skip, they are still executed, which in turn is leading to an assertion failure. The change also adds skipIfLinux to a testlet which was not previously marked with skipIfLinux. This is because running even that test let leads to an assertion failure. Test Plan: dotest.py -C clang -p TestEvents.py Reviewers: vharron Reviewed By: vharron Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D6715 llvm-svn: 224644
* [TestStaticVariables] Mark the one unmarked test let also expectedFailure.Siva Chandra2014-12-191-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The test is question here is already annotated with @expectedFailureDarwin(9980907). This change also removes an uneccessary (and probably wrong) logic of byssing few asserts if the compiler is not clang or llvm-gcc. Both GCC and Clang emit incomplete debug info. Clang emits this: < 1><0x00000026> DW_TAG_class_type DW_AT_name "A" DW_AT_byte_size 0x00000001 DW_AT_decl_file 0x00000001 DW_AT_decl_line 0x0000001b < 2><0x0000002e> DW_TAG_member DW_AT_name "g_points" DW_AT_type <0x0000003b> DW_AT_decl_file 0x00000001 DW_AT_decl_line 0x0000001e DW_AT_external yes(1) DW_AT_declaration yes(1) DW_AT_accessibility DW_ACCESS_public < 1><0x0000003b> DW_TAG_array_type DW_AT_type <0x00000046> < 2><0x00000040> DW_TAG_subrange_type DW_AT_type <0x0000007b> Notice that the DIE at 0x40 does not specify an upperbound. This is with Clang-3.5 and Clang ToT. GCC emits this: < 1><0x000000aa> DW_TAG_class_type DW_AT_name "A" DW_AT_byte_size 0x00000001 DW_AT_decl_file 0x00000001 DW_AT_decl_line 0x0000001b DW_AT_sibling <0x000000c1> < 2><0x000000b4> DW_TAG_member DW_AT_name "g_points" DW_AT_decl_file 0x00000001 DW_AT_decl_line 0x0000001e DW_AT_type <0x000000c1> DW_AT_external yes(1) DW_AT_accessibility DW_ACCESS_public DW_AT_declaration yes(1) < 1><0x000000c1> DW_TAG_array_type DW_AT_type <0x0000007e> DW_AT_sibling <0x000000cc> < 2><0x000000ca> DW_TAG_subrange_type The DIE at 0xca is missing attributes. This is with gcc-4.8.2. Test Plan: dotest.py -C clang -P TestStaticVariables.py Reviewers: clayborg Reviewed By: clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D6713 llvm-svn: 224643
* [TestCompletion] Spawn LLDB with '--no-use-colors'.Siva Chandra2014-12-191-1/+2
| | | | | | | | | | | | | | | | | | | Summary: TestCompletion was broken for Ubuntu (and probably for Debian also). The issue was that the lldb prompt in color (which is the default behavior) was confusing pexpect. Test Plan: "http://199.223.233.39:8011/lldb-try-clang-build-clang-test/" Reviewers: zturner, clayborg Reviewed By: clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D6671 llvm-svn: 224642
* Don't generate lldb inline test Makefiles if Makefile already exists.Zachary Turner2014-12-191-2/+5
| | | | | | | Differential Revision: http://reviews.llvm.org/D6664 Reviewed by: Sean Callanan llvm-svn: 224593
* Delete MSVC intermediate files on "make clean" from tests.Zachary Turner2014-12-161-1/+3
| | | | | | | | | lld-link shells out to MSVC for certain types of work, and this results in some MSVC output files being generated even though clang / lld are the compiler / linker. This is expected, so we make sure to clean these output files on make clean. llvm-svn: 224345
* Fixed 2 typos in help.Hafiz Abid Qadeer2014-12-161-2/+2
| | | | llvm-svn: 224331
* If a binary was stripped we sometimes didn't show the ivars of an Objective ↵Greg Clayton2014-12-162-31/+101
| | | | | | | | | | | | | | C class correctly. Now we do as we consult the runtime data for the class so we don't have to have a symbol in the symbol table. Fixed: 1 - try the symbol table symbol for an ObjC ivar and use it if available 2 - fall back to using the runtime data since it is slower to gather via memory read 3 - Fixed our hidden ivars test case to test this to ensure we don't regress 4 - split out a test case in the hidden ivars to cover only the part that was failing so we don't have an expected failure for all of the other content in the test. <rdar://problem/18882687> llvm-svn: 224306
* Now that AddressOf() does sane things with const results, this check is ↵Enrico Granata2014-12-151-4/+0
| | | | | | wrong. Since this is actually quite orthogonal to what this test is all about, actually get rid of the assertions llvm-svn: 224290
* Tests will timeout if they exceed time limit.Vince Harron2014-12-131-11/+63
| | | | | | | | | | | | | | | | Default time limit is 5 minutes. Override the default timeout of 5 minutes with LLDB_TEST_TIMEOUT. LLDB_TEST_TIMEOUT=10m Override the timeout for individual tests with LLDB_[TESTNAME]_TIMEOUT. E.g., LLDB_TESTCONCURRENTEVENTS_TIMEOUT=2m Set to "0" to run without timeout. Submitted for Chaoren Lin llvm-svn: 224171
* Some more cleanup of the ValueObjectConstResultImpl code. NFC.Enrico Granata2014-12-121-1/+1
| | | | llvm-svn: 224160
* Fix up this test caseEnrico Granata2014-12-121-9/+9
| | | | llvm-svn: 224157
* Add a test case to validate that AddressOf() and GetLoadAddress() work on a ↵Enrico Granata2014-12-122-0/+43
| | | | | | ValueObjectConstResult. This test passing is the baseline of functionality we want to ensure for our const results llvm-svn: 224151
OpenPOWER on IntegriCloud