summaryrefslogtreecommitdiffstats
path: root/lldb/test/functionalities/watchpoint
Commit message (Collapse)AuthorAgeFilesLines
* Move lldb/test to lldb/packages/Python/lldbsuite/test.Zachary Turner2015-10-2835-1953/+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-2713-13/+13
| | | | llvm-svn: 251444
* Port the python api decorator to use test categoriesPavel Labath2015-10-261-1/+1
| | | | | | | | | | | | | | | | | | 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-2313-2/+28
| | | | | | | | | | | | | 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-2213-101/+27
| | | | | | | | | | | | | | | | | | | | | 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 a watchpoint test on Windows, until Windows implements watchpoints.Adrian McCarthy2015-10-131-0/+1
| | | | llvm-svn: 250189
* Improve TestValueOfVectorVariableTamas Berghammer2015-10-121-10/+3
| | | | | | | * XFAIL it for android arm/aarch64 as watchpoints aren't supported there * Remove the dwarf/dsym test separation as they will be generated automatically llvm-svn: 250024
* [TestValueOfVectorVariable] Reduce the vector size to 4.Siva Chandra2015-10-092-4/+6
| | | | | | | | | | | | Summary: On x86, we only have 4 watchpoint registers. Reviewers: mohit.bhakkad Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D13608 llvm-svn: 249916
* Correction in rL249838: Moving test to appropriate directoryMohit K. Bhakkad2015-10-093-0/+75
| | | | llvm-svn: 249897
* Merge dwarf and dsym testsTamas Berghammer2015-09-3012-460/+117
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 watchpoint testsEd Maste2015-09-163-3/+0
| | | | | | llvm.org/pr18832 llvm-svn: 247801
* XFAIL more watchpoint tests on Windows.Zachary Turner2015-09-022-0/+2
| | | | | | 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-138-8/+22
| | | | | | https://llvm.org/pr24446 tracks getting these tests re-enabled. llvm-svn: 244950
* XFAIL watchpoint tests on Android arm/aarch64Tamas Berghammer2015-07-2210-1/+17
| | | | | | Differential revision: http://reviews.llvm.org/D11409 llvm-svn: 242887
* Remove outdated comment.Chaoren Lin2015-07-021-1/+0
| | | | llvm-svn: 241276
* Change executable name to a.out.Chaoren Lin2015-07-021-1/+1
| | | | | | | | | | | | Summary: The long name causes problems with some shells. Reviewers: sivachandra Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D10888 llvm-svn: 241222
* Reversed r238363, because the message is inconsistentSean Callanan2015-07-0110-19/+19
| | | | | | with all the other assertion messages. llvm-svn: 241212
* [TestBase.runCmd] Better error message when runCmd fails.Siva Chandra2015-05-2710-19/+19
| | | | | | | | | | | | | | | | | | | | | 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
* ["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
* Skip tests that are timing out on the FreeBSD buildbotEd Maste2015-05-091-0/+1
| | | | | | | | | 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
* [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
* Remove gcc xfail for TestWatchpointMultipleThreads.Chaoren Lin2015-04-141-2/+0
| | | | llvm-svn: 234826
* Missing `-lpthread` causes gcc test failure.Chaoren Lin2015-04-133-3/+0
| | | | | | | | | | | | | | | Summary: `-lpthread` was removed for `g++ -std=c++11` on Linux due to llvm.org/pr21553, but the original issue doesn't seem to be reproducible anymore. Even if it were, it had nothing to do with compiling inferiors. Reviewers: sbest, sivachandra, chying Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D8991 llvm-svn: 234770
* Enabled a bunch of tests on LinuxVince Harron2015-03-311-2/+1
| | | | | | | | | Removed expectedFailureLinux from failures that I was unable to reproduce, updated and improved some other comments near XFAIL tests Differential Revision: http://reviews.llvm.org/D8676 llvm-svn: 233716
* Replace sys.platform skips in tests with @skip decorators which check ↵Robert Flack2015-03-309-15/+15
| | | | | | | | | | | | | | | | 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
* Changed '-x'/'-xsize' to '-s'/'-size' when specifyingSean Callanan2015-03-263-13/+13
| | | | | | | | the size of a watchpoint. <rdar://problem/18184972> llvm-svn: 233237
* xfail tests that failed with clang-3.7, gcc4.8.2 and on i386 to get buildbot ↵Ying Chen2015-03-253-0/+3
| | | | | | | | | | | | | | | | | | 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
* Shorten executable name in WatchpointLLDBCommandTestCaseTamas Berghammer2015-03-231-1/+1
| | | | | | | It is required because the name of the executable exceeded the maximum allowed file name on android. llvm-svn: 232959
* Report watchpoint hits during single stepping.Chaoren Lin2015-03-193-0/+148
| | | | | | | | | | | | | | | | | | Summary: Reorganized NativeProcessLinux::MonitorSIGTRAP to check for watchpoint hits on TRAP_TRACE. Added test for stepping over watchpoints. https://llvm.org/bugs/show_bug.cgi?id=22814 Reviewers: ovyalov, tberghammer, vharron, clayborg Subscribers: jingham, labath, lldb-commits Differential Revision: http://reviews.llvm.org/D8404 llvm-svn: 232784
* Applying D7950 to four near copies of the file.Chaoren Lin2015-03-026-90/+86
| | | | | | | | | | | | | | 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
* Convert TestWatchLocation to use C++11 library instead of pthread.Chaoren Lin2015-02-272-45/+45
| | | | | | | | | | Reviewers: clayborg, zturner, ki.stfu, abidh Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D7950 llvm-svn: 230799
* Fixes http://reviews.llvm.org/rL230691Chaoren Lin2015-02-271-7/+4
| | | | | | | | | | | | Summary: OS X doesn't implement pthread barriers, using a simple atomic flag instead. Reviewers: ki.stfu Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D7933 llvm-svn: 230739
* Add synchronization to TestWatchLocation.Chaoren Lin2015-02-261-0/+10
| | | | | | | | | | | | | | Summary: There was no guarantee that the three threads haven't already exited by the time the watchpoint is set. Reviewers: ovyalov Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D7916 llvm-svn: 230691
* Add a few more bug IDs for x'fail test casesEnrico Granata2014-10-171-2/+2
| | | | llvm-svn: 220003
* Get test executables compiling on Windows.Zachary Turner2014-08-133-3/+3
| | | | | | | | | | | | | | 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
* Mark test_watchpoint_multiple_threads_with_dwarf as XFAIL on Linux/clang.Todd Fiala2014-07-071-0/+1
| | | | | | See http://llvm.org/bugs/show_bug.cgi?id=20233 for details. llvm-svn: 212491
* Fix typos.Bruce Mitchener2014-07-011-2/+2
| | | | llvm-svn: 212132
* FreeBSD hardware watchpoint implementationEd Maste2014-02-197-13/+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
* Update decorator for test that still fails with FreeBSD Watchpoint supportEd Maste2014-02-191-1/+1
| | | | | | llvm.org/pr18832 llvm-svn: 201705
* Update decorators for tests that still fail with FreeBSD Watchpoint supportEd Maste2014-02-142-2/+2
| | | | | | | | llvm.org/pr18832 Reported by John Wolfe llvm-svn: 201418
* Correctly set the working directory when launching processes for both local ↵Greg Clayton2013-12-131-1/+1
| | | | | | and remote targets. llvm-svn: 197266
* Massive test suite cleanup to stop everyone from manually having to compute ↵Greg Clayton2013-12-1011-11/+11
| | | | | | | | | | "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
* test: Add decorator for FreeBSD watchpoint failureEd Maste2013-11-251-0/+1
| | | | | | | Watchpoints have not yet been implemented for FreeBSD. llvm.org/pr16706 llvm-svn: 195649
* Mark watchpoint test as still failing on i386 Linux.Matt Kopec2013-10-011-3/+1
| | | | llvm-svn: 191717
* Mark 32/64-bit tests as expected fail after root causing and referencing ↵Matt Kopec2013-09-261-2/+4
| | | | | | | | bugzilla. Fix TestFrames.py error to check against a None pc value. llvm-svn: 191470
* merge lldb-platform-work branch (and assorted fixes) into trunkDaniel Malea2013-08-262-8/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This merge brings in the improved 'platform' command that knows how to interface with remote machines; that is, query OS/kernel information, push and pull files, run shell commands, etc... and implementation for the new communication packets that back that interface, at least on Darwin based operating systems via the POSIXPlatform class. Linux support is coming soon. Verified the test suite runs cleanly on Linux (x86_64), build OK on Mac OS X Mountain Lion. Additional improvements (not in the source SVN branch 'lldb-platform-work'): - cmake build scripts for lldb-platform - cleanup test suite - documentation stub for qPlatform_RunCommand - use log class instead of printf() directly - reverted work-in-progress-looking changes from test/types/TestAbstract.py that work towards running the test suite remotely. - add new logging category 'platform' Reviewers: Matt Kopec, Greg Clayton Review: http://llvm-reviews.chandlerc.com/D1493 llvm-svn: 189295
* tests: Mark expected FreeBSD failures due to pr16706Ed Maste2013-07-259-0/+15
| | | | | | Watchpoints are not yet working on FreeBSD llvm-svn: 187134
* Get debugserver to call task_set_state to prime the control registers so ↵Jim Ingham2013-07-111-27/+2
| | | | | | | | | | | | | that watchpoints take for threads created while the program is running. Remove the testcase skips from TestConcurrentEvents.py, since they all pass now, and fix TestWatchpointMultipleThreads.py - which should have caught this problem - so it doesn't artificially break on new thread creation before the watchpoint triggers. llvm.org/pr16566 <rdar://problem/14383244> llvm-svn: 186132
* Add TestConcurrentEvents test for LLDB's handling of inferior threadsDaniel Malea2013-07-091-0/+1
| | | | | | | | | | | | | | - Test verifies LLDB's handling of inferiors with threads that: hit breakpoints, modfiy variables that have watchpoints set, generate user signals, and crash. - Add a few "stress tests" (with ~100 threads) -- run these with "-l" dotest.py flag. - Fix stop_reason_to_str helper in lldbutil to handle eStopReasonThreadExited. - Add sort_stopped_threads helper to lldbutil to separate thread lists based on stop reason. Logged llvm.org/pr16566 and llvm.org/pr16567 for bugs exposed. llvm-svn: 185889
OpenPOWER on IntegriCloud