summaryrefslogtreecommitdiffstats
path: root/lldb/test/functionalities/breakpoint
Commit message (Collapse)AuthorAgeFilesLines
* Move lldb/test to lldb/packages/Python/lldbsuite/test.Zachary Turner2015-10-2846-2133/+0
| | | | | | | | | | | This is the conclusion of an effort to get LLDB's Python code structured into a bona-fide Python package. This has a number of benefits, but most notably the ability to more easily share Python code between different but related pieces of LLDB's Python infrastructure (for example, `scripts` can now share code with `test`). llvm-svn: 251532
* Rename `lldb_shared` to `use_lldb_suite`.Zachary Turner2015-10-2715-15/+15
| | | | llvm-svn: 251444
* Port the python api decorator to use test categoriesPavel Labath2015-10-264-4/+4
| | | | | | | | | | | | | | | | | | Summary: Per discussions on the mailing list, I have implemented a decorator which annotates individual test methods with categories. I have used this framework to replace the '-a' and '+a' command-line switches (now '-G pyapi' and '--skip-category pyapi') and the @python_api_test decorator (now @add_test_categories('pyapi')). The test suite now gives an error message suggesting the new options if the user specifies the deprecated +/-a switches. If the general direction is good, I will follow this up with other switches. Reviewers: tberghammer, tfiala, granata.enrico, zturner Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D14020 llvm-svn: 251277
* [TestBreakpointCommand] Fix after r251121Siva Chandra2015-10-231-3/+3
| | | | | | | | | | | | | | | Summary: "from __future__ import print_function" was added to the test file but not to the embedded interpreter. This change uses file.write instead to avoid all problems with print. Reviewers: zturner Subscribers: zturner, lldb-commits Differential Revision: http://reviews.llvm.org/D14029 llvm-svn: 251150
* Add from __future__ import print_function everywhere.Zachary Turner2015-10-2316-8/+40
| | | | | | | | | | | | | Apparently there were tons of instances I missed last time, I guess I accidentally ran 2to3 non-recursively. This should be every occurrence of a print statement fixed to use a print function as well as from __future__ import print_function being added to every file. After this patch print statements will stop working everywhere in the test suite, and the print function should be used instead. llvm-svn: 251121
* Update every test to import `lldb_shared`.Zachary Turner2015-10-2215-115/+30
| | | | | | | | | | | | | | | | | | | | | This is necessary in order to allow third party modules to be located under lldb/third_party rather than under the test folder directly. Since we're already touching every test file anyway, we also go ahead and delete the unittest2 import and main block wherever possible. The ability to run a test as a standalone file has already been broken for some time, and if we decide we want this back, we should use unittest instead of unittest2. A few places could not have the import of unittest2 removed,because they depend on the unittest2.expectedFailure or skip decorators. Removing all those was orthogonal in spirit to the purpose of this CL, so the import of unittest2 remains in those files that were using it for its test decorators. Those can be addressed separately. llvm-svn: 251055
* XFAIL new dwo test failing with totclang on linux i386Tamas Berghammer2015-10-071-0/+1
| | | | llvm-svn: 249539
* Fix TestCompDirSymLink.py - remove existing symlink leftovers if previous ↵Oleksiy Vyalov2015-10-021-0/+2
| | | | | | | | test run was terminated (e.g., due timeout). llvm-svn: 249203
* Merge dwarf and dsym testsTamas Berghammer2015-09-3015-184/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently most of the test files have a separate dwarf and a separate dsym test with almost identical content (only the build step is different). With adding dwo symbol file handling to the test suit it would increase this to a 3-way duplication. The purpose of this change is to eliminate this redundancy with generating 2 test case (one dwarf and one dsym) for each test function specified (dwo handling will be added at a later commit). Main design goals: * There should be no boilerplate code in each test file to support the multiple debug info in most of the tests (custom scenarios are acceptable in special cases) so adding a new test case is easier and we can't miss one of the debug info type. * In case of a test failure, the debug symbols used during the test run have to be cleanly visible from the output of dotest.py to make debugging easier both from build bot logs and from local test runs * Each test case should have a unique, fully qualified name so we can run exactly 1 test with "-f <test-case>.<test-function>" syntax * Test output should be grouped based on test files the same way as it happens now (displaying dwarf/dsym results separately isn't preferable) Proposed solution (main logic in lldbtest.py, rest of them are test cases fixed up for the new style): * Have only 1 test fuction in the test files what will run for all debug info separately and this test function should call just "self.build(...)" to build an inferior with the right debug info * When a class is created by python (the class object, not the class instance), we will generate a new test method for each debug info format in the test class with the name "<test-function>_<debug-info>" and remove the original test method. This way unittest2 see multiple test methods (1 for each debug info, pretty much as of now) and will handle the test selection and the failure reporting correctly (the debug info will be visible from the end of the test name) * Add new annotation @no_debug_info_test to disable the generation of multiple tests for each debug info format when the test don't have an inferior Differential revision: http://reviews.llvm.org/D13028 llvm-svn: 248883
* Remove expectedFailureFreeBSD from passing testEd Maste2015-09-161-1/+0
| | | | | | | | ExprCommandCallUserDefinedFunction::test_with_dwarf llvm.org/pr21142 llvm-svn: 247800
* XFAIL some C++ language specific tests on Windows.Zachary Turner2015-09-111-0/+1
| | | | | | http://llvm.org/pr24764 llvm-svn: 247455
* Don't allow duplicate names for tests.Zachary Turner2015-09-091-1/+1
| | | | | | | | | We had 2 tests named TestCPPBreakpoints.py. If one of those tests failed, both of them would be reported as failures and contribute to the failure count. There may be other examples of duplicate test names, and we should fix those as we find them. llvm-svn: 247173
* XFAIL Tests that require C++ exceptions on Windows.Zachary Turner2015-08-211-0/+1
| | | | | | | | | clang-cl does not yet support C++ exceptions, so these tests will not even compile. Re-enabling these tests is tracked by llvm.org/pr24538 llvm-svn: 245747
* XFAIL breakpoint tests on WindowsZachary Turner2015-08-202-0/+2
| | | | | | llvm.org/pr24528 tracks fixing this test. llvm-svn: 245629
* Make DWARF at_comp_dir symbolic links configurable via ↵Oleksiy Vyalov2015-07-293-0/+88
| | | | | | | | plugin.symbol-file.dwarf.comp-dir-symlink-paths setting. http://reviews.llvm.org/D11586 llvm-svn: 243580
* Fix comment in test.Dawn Perchik2015-07-231-1/+1
| | | | llvm-svn: 242979
* Add support for specifying a language to use when parsing breakpoints.Dawn Perchik2015-07-214-9/+49
| | | | | | | | | | | | | | | | | | | | Target and breakpoints options were added: breakpoint set --language lang --name func settings set target.language pascal These specify the Language to use when interpreting the breakpoint's expression (note: currently only implemented for breakpoints on identifiers). If the breakpoint language is not set, the target.language setting is used. This support is required by Pascal, for example, to set breakpoint at 'ns.foo' for function 'foo' in namespace 'ns'. Tests on the language were also added to Module::PrepareForFunctionNameLookup for efficiency. Reviewed by: clayborg Subscribers: jingham, lldb-commits Differential Revision: http://reviews.llvm.org/D11119 llvm-svn: 242844
* Reversed r238363, because the message is inconsistentSean Callanan2015-07-018-13/+13
| | | | | | with all the other assertion messages. llvm-svn: 241212
* [TestBase.runCmd] Better error message when runCmd fails.Siva Chandra2015-05-278-13/+13
| | | | | | | | | | | | | | | | | | | | | 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
* Add --move-to-nearest-code / target.move-to-nearest-code options (attempt 2)Ilia K2015-05-186-9/+98
| | | | | | | | | | | | This patch initially was committed in r237460 but later it was reverted (r237479) due to 4 new failures: * TestExitDuringStep.py * TestNumThreads.py * TestThreadExit.py * TestThreadStates.py This patch also fixes these tests. llvm-svn: 237566
* Reverting r237460 to fix test failures introduced on OSX & LinuxVince Harron2015-05-156-98/+9
| | | | | | | | | TestExitDuringStep.py TestNumThreads.py TestThreadExit.py TestThreadStates.py llvm-svn: 237479
* Add --move-to-nearest-code / target.move-to-nearest-code optionsIlia K2015-05-156-9/+98
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This option forces to only set a source line breakpoint when there is an exact-match This patch includes the following commits: # Add the -m/--exact-match option in "breakpoint set" command ## Add exact_match arg in BreakpointResolverFileLine ctor ## Add m_exact_match field in BreakpointResolverFileLine ## Add exact_match arg in BreakpointResolverFileRegex ctor ## Add m_exact_match field in BreakpointResolverFileRegex ## Add exact_match arg in Target::CreateSourceRegexBreakpoint ## Add exact_match arg in Target::CreateBreakpoint ## Add -m/--exact-match option in "breakpoint set" command # Add target.exact-match option to skip BP if source line doesn't match ## Add target.exact-match global option ## Add Target::GetExactMatch ## Refactor Target::CreateSourceRegexBreakpoint to accept LazyBool exact_match (was bool) ## Refactor Target::CreateBreakpoint to accept LazyBool exact_match (was bool) # Add target.exact-match test in SettingsCommandTestCase # Add BreakpointOptionsTestCase tests to test --skip-prologue/--exact-match options # Fix a few typos in lldbutil.check_breakpoint_result func # Rename --exact-match/m_exact_match/exact_match/GetExactMatch to --move-to-nearest-code/m_move_to_nearest_code/move_to_nearest_code/GetMoveToNearestCode # Add exact_match field in BreakpointResolverFileLine::GetDescription and BreakpointResolverFileRegex::GetDescription, for example: was: ``` 1: file = '/Users/IliaK/p/llvm/tools/lldb/test/functionalities/breakpoint/breakpoint_command/main.c', line = 12, locations = 1, resolved = 1, hit count = 2 1.1: where = a.out`main + 20 at main.c:12, address = 0x0000000100000eb4, resolved, hit count = 2 ``` now: ``` 1: file = '/Users/IliaK/p/llvm/tools/lldb/test/functionalities/breakpoint/breakpoint_command/main.c', line = 12, exact_match = 0, locations = 1, resolved = 1, hit count = 2 1.1: where = a.out`main + 20 at main.c:12, address = 0x0000000100000eb4, resolved, hit count = 2 ``` Test Plan: ./dotest.py -v --executable $BUILDDIR/bin/lldb functionalities/breakpoint/ ./dotest.py -v --executable $BUILDDIR/bin/lldb settings/ ./dotest.py -v --executable $BUILDDIR/bin/lldb tools/lldb-mi/breakpoint/ Reviewers: jingham, clayborg Reviewed By: clayborg Subscribers: lldb-commits, clayborg, jingham Differential Revision: http://reviews.llvm.org/D9273 llvm-svn: 237460
* 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
* Make several test case arm32 compatibleTamas Berghammer2015-04-171-1/+3
| | | | llvm-svn: 235172
* Make TestBreakpointConditions aarch64 compatibleTamas Berghammer2015-04-011-1/+4
| | | | llvm-svn: 233800
* Replace sys.platform skips in tests with @skip decorators which check ↵Robert Flack2015-03-3012-18/+18
| | | | | | | | | | | | | | | | against remote platform. Adds @skipIfPlatform and @skipUnlessPlatform decorators which will skip if / unless the target platform is in the provided platform list. Test Plan: ninja check-lldb shows no regressions. When running cross platform, tests which cannot run on the target platform are skipped. Differential Revision: http://reviews.llvm.org/D8665 llvm-svn: 233547
* Don't clobber CFLAGS_EXTRAS in tests.Robert Flack2015-03-241-1/+1
| | | | | | | | | | | | | | | | | To run tests against a different target platform many extra compiler flags are needed to specify sysroot, include dirs, etc. The environment variable CFLAGS_EXTRAS seems suited for this purpose except that several Makefiles clobber the current flags. This change modifies all of these to add to CFLAGS_EXTRAS instead. Test Plan: Verify no regressions in ninja check-lldb. Run tests using CFLAGS_EXTRAS to specify cross compilation flags for a different target running lldb-server platform. Differential Revision: http://reviews.llvm.org/D8559 llvm-svn: 233066
* Add an -A option to "break set -p" to search all files for matches. Also ↵Jim Ingham2015-02-121-0/+19
| | | | | | | | | | | add the version of SBTarget::BreakpointCreateBySourceRegex that takes file spec lists to the Python interface, and add a test for this. <rdar://problem/19805037> llvm-svn: 228938
* Fix a handling of full path in break-insert.Hafiz Abid Qadeer2015-02-081-0/+5
| | | | | | | | | | | | | | | | | | | | For some time, eclipse (CDT) uses full path of the file in break-insert command when putting breakpoint on a source line. On windows, a typical command looks like the following. 56-break-insert -f F:\\work\\ws\\test\\main.c:49 Current implementation in lldb-mi have problem in 2 ways. 1. It was assuming that there will be only one : in the path which is wrong if full path is supplied. 2. CDT sends out path with double backslashes in windows which gives error on resolution. Fixed the : issue in lldb-mi. Changed FileSpec::Normalize to make sure that it handles the path with \\ correctly. Added test cases to check for full path in both lldb-mi and lldb. Also added a test case to check SBFileSpec with double slashes. llvm-svn: 228538
* 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
* 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-141-0/+3
| | | | | | | 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
* 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
* Simple test for file & line dummy breakpoints.Jim Ingham2014-12-093-0/+98
| | | | llvm-svn: 223731
* Add a test for setting and hitting the C++ Exception throw breakpoint.Jim Ingham2014-10-283-0/+76
| | | | llvm-svn: 220743
* Update TestInlinedBreakpoints to reflect the fact thatJason Molenda2014-10-071-1/+4
| | | | | | | | | | | | the default search method is "always" as of r218405. For the purposes of this test, set it back to "headers" to confirm that the file+line breakpoint doesn't work, then verify that it does work with "always". Leave it in "always" setting. <rdar://problem/18564244> llvm-svn: 219251
* Add FreeBSD test failure decoratorsEd Maste2014-10-021-0/+1
| | | | llvm-svn: 218908
* 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
* Test case for the previous commit.Jim Ingham2014-04-021-0/+88
| | | | llvm-svn: 205381
* Correctly set the working directory when launching processes for both local ↵Greg Clayton2013-12-132-2/+2
| | | | | | and remote targets. llvm-svn: 197266
* Massive test suite cleanup to stop everyone from manually having to compute ↵Greg Clayton2013-12-107-7/+7
| | | | | | | | | | "mydir" inside each test case. This has led to many test suite failures because of copy and paste where new test cases were based off of other test cases and the "mydir" variable wasn't updated. Now you can call your superclasses "compute_mydir()" function with "__file__" as the sole argument and the relative path will be computed for you. llvm-svn: 196985
* Remove FreeBSD test failure annotations for llvm.org/pr17213Ed Maste2013-11-151-2/+0
| | | | | | This was a FreeBSD kernel issue, now fixed. llvm-svn: 194842
* test: Add @expectedFailureFreeBSD decoratorEd Maste2013-09-121-0/+2
| | | | | | llvm.org/pr17213 Expression evaluation fails on FreeBSD in some cases llvm-svn: 190622
* Update break conditions test to have consistent behaviour on all test suite ↵Matt Kopec2013-07-311-1/+1
| | | | | | | | compilers. Also update comment in const variables test to reflect ICC status. llvm-svn: 187501
* Set an extra debug flag when testing with ICC so that it generates the ↵Matt Kopec2013-07-312-0/+8
| | | | | | correct debug info for inlined tests. llvm-svn: 187500
* Add missing -std=c99 flag to appease GCC 4.6Daniel Malea2013-07-031-0/+1
| | | | | | - this issue was detected on recent GCC buildbot runs llvm-svn: 185571
* Fixed a problem with materialization andSean Callanan2013-06-202-0/+17
| | | | | | | | | | dematerialization of registers that caused conditional breakpoint expressions not to work properly. Also added a testcase. <rdar://problem/14129252> llvm-svn: 184451
* Fix breakpoint test to account for full path of source file location.Matt Kopec2013-06-171-6/+6
| | | | llvm-svn: 184126
* Fix single whitespace before breakpoint filename in some tests due to r183932.Matt Kopec2013-06-172-7/+7
| | | | llvm-svn: 184104
* Fixed incorrect python that was trying to validate that we got a valid ↵Greg Clayton2013-03-192-2/+2
| | | | | | | | lldb.SBThread object by checking to see if it is equal to "None". This test is incorrect as functions that return lldb.SBThread objects never return None, they just return lldb.SBThread objects that contain invalid opaque classes. llvm-svn: 177416
OpenPOWER on IntegriCloud