summaryrefslogtreecommitdiffstats
path: root/lldb/test/python_api/watchpoint
Commit message (Collapse)AuthorAgeFilesLines
* Move lldb/test to lldb/packages/Python/lldbsuite/test.Zachary Turner2015-10-2812-773/+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-276-6/+6
| | | | llvm-svn: 251444
* Port the python api decorator to use test categoriesPavel Labath2015-10-265-6/+6
| | | | | | | | | | | | | | | | | | 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
* Add from __future__ import print_function everywhere.Zachary Turner2015-10-236-10/+23
| | | | | | | | | | | | | 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-226-48/+12
| | | | | | | | | | | | | | | | | | | | | 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
* Skip hanging watchpoint test on Windows (rather than just xfailing).Adrian McCarthy2015-10-161-1/+1
| | | | llvm-svn: 250576
* [LLDB][MIPS] Skip invalid size watchpoint testcase for MIPSMohit K. Bhakkad2015-10-051-0/+1
| | | | | | | | Reviewers: jaydeep. Subscribers: lldb-commits. Differential Revision: http://reviews.llvm.org/D13335 llvm-svn: 249299
* Merge dwarf and dsym testsTamas Berghammer2015-09-306-108/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* XFAIL more watchpoint tests on Windows.Zachary Turner2015-09-021-0/+1
| | | | | | llvm.org/pr24446 llvm-svn: 246725
* Remove Unicode byte-order mark from python files.Zachary Turner2015-08-135-5/+5
| | | | | | | | | This was caused by a bug in the PTVS source file editor, which has since been fixed and awaiting a new release. For now people using this editor need to remember to manually remove this before committing a file. llvm-svn: 244963
* XFAIL Watchpoint tests on Windows.Zachary Turner2015-08-135-5/+10
| | | | | | https://llvm.org/pr24446 tracks getting these tests re-enabled. llvm-svn: 244950
* XFAIL watchpoint tests on Android arm/aarch64Tamas Berghammer2015-07-226-0/+7
| | | | | | Differential revision: http://reviews.llvm.org/D11409 llvm-svn: 242887
* Enabling two watchpoint tests on linuxPavel Labath2015-04-302-2/+0
| | | | | | After recent changes, these tests should be stable. Please let me know if you still see failures. llvm-svn: 236226
* Remove gcc xfail for TestTargetWatchAddress.Chaoren Lin2015-04-141-1/+0
| | | | llvm-svn: 234828
* Replace sys.platform skips in tests with @skip decorators which check ↵Robert Flack2015-03-306-7/+7
| | | | | | | | | | | | | | | | 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
* xfail tests that failed with clang-3.7, gcc4.8.2 and on i386 to get buildbot ↵Ying Chen2015-03-251-0/+1
| | | | | | | | | | | | | | | | | | green Summary: -Refer to bug https://buganizer.corp.google.com/issues/19893563 -Test log http://lab.llvm.org:8011/builders/lldb-x86_64-ubuntu-14.04-cmake/builds/1145 Test Plan: Run tests with different compiler and archs locally Reviewers: sivachandra, ovyalov, chaoren, vharron Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D8573 llvm-svn: 233157
* XFAIL tests that are known to fail occasionally on LinuxVince Harron2015-03-052-0/+2
| | | | | | | | Trying to get the build green so we can notice new failures easier. Differential Revision: http://reviews.llvm.org/D8039 llvm-svn: 231407
* Applying D7950 to four near copies of the file.Chaoren Lin2015-03-022-42/+48
| | | | | | | | | | | | | | Summary: Using std::thread/random instead of pthread/rand. Two of them also suffered from the synchronization problem in D7916. Reviewers: clayborg, zturner, ki.stfu Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D7991 llvm-svn: 230993
* Get test executables compiling on Windows.Zachary Turner2014-08-131-1/+1
| | | | | | | | | | | | | | 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
* Enabled TestSetWatchlocation.py on Linux.Todd Fiala2014-02-281-1/+0
| | | | | | | This worked 25 out of 25 times for me on Ubuntu 12.04 LTS x86_64 built with gcc 4.8.2 and the July 2013 libedit. llvm-svn: 202516
* FreeBSD hardware watchpoint implementationEd Maste2014-02-196-6/+0
| | | | | | | | | | | | | | | Implement x86_64 debug register read/write in support of hardware watchpoints. Hoist LinuxThread::TraceNotify code back into POSIXThread::TraceNotify() Patch by John Wolfe. We still need to rework this later to avoid the #ifdef FreeBSD. llvm-reviews.chandlerc.com/D2572 llvm.org/pr16706 llvm-svn: 201706
* Correctly set the working directory when launching processes for both local ↵Greg Clayton2013-12-136-7/+7
| | | | | | and remote targets. llvm-svn: 197266
* Massive test suite cleanup to stop everyone from manually having to compute ↵Greg Clayton2013-12-106-6/+6
| | | | | | | | | | "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
* Re-enable TestRegisters and TestTargetWatchAddress on LinuxDaniel Malea2013-09-051-1/+0
| | | | | | | - TestRegisters passes locally (llvm.org/pr16301 no longer reproduces) -- verifying this on buildbots - TestTargetWatchAddress also passes locally, and referenced llvm.org/pr14323 which is now closed llvm-svn: 190104
* tests: Mark expected FreeBSD failures due to pr16706Ed Maste2013-07-256-0/+6
| | | | | | Watchpoints are not yet working on FreeBSD llvm-svn: 187134
* Disabling another watchpoint test with intermittent failure.Matt Kopec2013-05-301-0/+1
| | | | llvm-svn: 182952
* Disabling watchpoint test with intermittent failure.Andrew Kaylor2013-05-291-0/+1
| | | | llvm-svn: 182887
* Removing expected fail from another test that is now passing.Andrew Kaylor2013-05-291-1/+0
| | | | llvm-svn: 182815
* Removing expected failures for watchpoint tests which are now passing.Andrew Kaylor2013-05-291-1/+0
| | | | llvm-svn: 182813
* Clean up linux test decorators and add links to known bugsDaniel Malea2013-05-152-2/+2
| | | | | | | | | - s/skipOnLinux/skipIfLinux/ to match style of every other decorator - linkify bugizilla/PR numbers in comments No intended change in functionality. llvm-svn: 181913
* Add watchpoint support for Linux on 64-bit host.Matt Kopec2013-05-074-4/+0
| | | | llvm-svn: 181341
* Update test scripts and Makefiles to allow testing with GCC:Daniel Malea2013-01-251-1/+1
| | | | | | | | | | | - introduce new variable ARCHFLAG in make/Makefile.rules to switch between "-arch" on Mac and "-m" everywhere else - update testcase makefiles to use LD_EXTRAS instead of LDFLAGS (the former interacts with Makefile.rules badly) - special treatment for gcc 4.6: replace "-std=c++11" with "-std=c++0x" as the former is not handled correctly - remove hardcoded "-arch" from test Makefile This patch should not have any effect on lldb on Mac OS X. llvm-svn: 173402
* Update test status on LinuxDaniel Malea2012-11-236-0/+6
| | | | | | | | | - add decorators @expectedFailLinux and @skipOnLinux - skip/mark xfail cases due to open bugzillas # 14323, 14416, 14423, 14424, 14425, 14426 Patch by Ashok Thirumurthi! llvm-svn: 168529
* Patch from Dan Malea daniel.malea@gmail.com to add some requiredJason Molenda2012-11-081-0/+1
| | | | | | flags to the Linux makefiles to get the tests to run. llvm-svn: 167600
* rdar://problem/11584012Johnny Chen2012-06-046-6/+63
| | | | | | | | | | | Refactorings of watchpoint creation APIs so that SBTarget::WatchAddress(), SBValue::Watch(), and SBValue::WatchPointee() now take an additional 'SBError &error' parameter (at the end) to contain the reason if there is some failure in the operation. Update 'watchpoint set variable/expression' commands to take advantage of that. Update existing test cases to reflect the API change and add test cases to verify that the SBError mechanism works for SBTarget::WatchAddress() by passing an invalid watch_size. llvm-svn: 157964
* Second batch of adding @dsym_test/@dwarf_test decorators to existing test cases.Johnny Chen2012-04-066-0/+12
| | | | | | | Plus some minor cleanup of test method names. Third and final batch is coming. llvm-svn: 154197
* Fix wrong test method name.Johnny Chen2011-12-211-1/+1
| | | | llvm-svn: 147072
* Add test cases for setting condition on a watchpoint for both command and API.Johnny Chen2011-10-173-0/+134
| | | | llvm-svn: 142291
* Remove debug 'print watchpoint' statement.Johnny Chen2011-10-141-1/+0
| | | | llvm-svn: 141965
* Add a test case to exercise the newly added SB API:Johnny Chen2011-10-141-0/+102
| | | | | | | lldb::SBWatchpoint SBTarget::WatchAddress (lldb::addr_t addr, size_t size, bool read, bool write) llvm-svn: 141931
* Fix wrong docstring with respect to API usage.Johnny Chen2011-10-141-5/+5
| | | | llvm-svn: 141928
* SBValue::Watch() and SBValue::WatchPointee() are now the official API for ↵Johnny Chen2011-10-144-71/+90
| | | | | | | | | | | | | | | | | | creating a watchpoint for either the variable encapsulated by SBValue (Watch) or the pointee encapsulated by SBValue (WatchPointee). Removed SBFrame::WatchValue() and SBFrame::WatchLocation() API as a result of that. Modified the watchpoint related test suite to reflect the change. Plus replacing WatchpointLocation with Watchpoint throughout the code base. There are still cleanups to be dome. This patch passes the whole test suite. Check it in so that we aggressively catch regressions. llvm-svn: 141925
* Add capability to set ignore count for watchpoint on the command line:Johnny Chen2011-10-051-0/+102
| | | | | | | | watchpoint ignore -i <count> [<watchpt-id | watchpt-id-list>] Add tests of watchpoint ignore_count for command line as well as API. llvm-svn: 141217
* Add SBFrame.WatchLocation() to find and watch the location pointed to byJohnny Chen2011-10-014-1/+193
| | | | | | | | | a variable usng the frame as the scope. Add TestSetWatchpoint.py to exercise this API. Also fix some SWIG Python docstrings. llvm-svn: 140914
* SBWatchpointLocation.GetDescription() takes an additional description level arg.Johnny Chen2011-09-271-0/+3
| | | | | | Modify get_description() utility function in lldbutil.py to handle that. llvm-svn: 140638
* Add SBTarget::GetLastCreatedWatchpointLocation() API and export to the ↵Johnny Chen2011-09-271-1/+3
| | | | | | | | | | | Python interface. Also add rich comparison methods (__eq__ and __ne__) for SBWatchpointLocation. Modify TestWatchpointLocationIter.py to exercise the new APIs. Add fuzz testings for the recently added SBTarget APIs related to watchpoint manipulations. llvm-svn: 140633
* Export the watchpoint related API (SBWatchpointLocation class and added ↵Johnny Chen2011-09-271-0/+118
| | | | | | | | | | | | | | SBTarget methods) to the Python interface. Implement yet another (threre're 3 now) iterator protocol for SBTarget: watchpoint_location_iter(), to iterate on the available watchpoint locations. And add a print representation for SBWatchpointLocation. Exercise some of these Python API with TestWatchpointLocationIter.py. llvm-svn: 140595
* Fix comment.Johnny Chen2011-09-241-1/+1
| | | | llvm-svn: 140450
* Add an SB API SBFrame::WatchValue() and exported to the Python interface toJohnny Chen2011-09-243-0/+126
set a watchpoint Pythonically. If the find-and-watch-a-variable operation fails, an invalid SBValue is returned, instead. Example Python usage: value = frame0.WatchValue('global', lldb.eValueTypeVariableGlobal, lldb.LLDB_WATCH_TYPE_READ|lldb.LLDB_WATCH_TYPE_WRITE) Add TestSetWatchpoint.py to exercise this API. We have 400 test cases now. llvm-svn: 140436
OpenPOWER on IntegriCloud