summaryrefslogtreecommitdiffstats
path: root/lldb/test/functionalities/thread/concurrent_events/TestConcurrentEvents.py
Commit message (Collapse)AuthorAgeFilesLines
* Move lldb/test to lldb/packages/Python/lldbsuite/test.Zachary Turner2015-10-281-490/+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-271-1/+1
| | | | llvm-svn: 251444
* Add from __future__ import print_function everywhere.Zachary Turner2015-10-231-0/+2
| | | | | | | | | | | | | 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-221-8/+3
| | | | | | | | | | | | | | | | | | | | | 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
* Merge dwarf and dsym testsTamas Berghammer2015-09-301-105/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Add jThreadsInfo support to lldb-serverPavel Labath2015-07-161-1/+1
| | | | | | | | | | | | | | | Summary: This commit adds initial support for the jThreadsInfo packet to lldb-server. The current implementation does not expedite inferior memory. I have also added a description of the new packet to our protocol documentation (mostly taken from Greg's earlier commit message). Reviewers: clayborg, ovyalov, tberghammer Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D11187 llvm-svn: 242402
* Reversed r238363, because the message is inconsistentSean Callanan2015-07-011-1/+1
| | | | | | with all the other assertion messages. llvm-svn: 241212
* Update TestConcurrentEvents to use UnixSignals instead of python signals.Chaoren Lin2015-06-021-8/+4
| | | | | | | | | | | | Reviewers: clayborg, ovyalov Reviewed By: ovyalov Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D10195 llvm-svn: 238872
* Report inferior SIGSEGV as a signal instead of an exception on linuxPavel Labath2015-05-291-4/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Previously, we reported inferior receiving SIGSEGV (or SIGILL, SIGFPE, SIGBUS) as an "exception" to LLDB, presumably to match OSX behaviour. Beside the fact that we were basically lying to the user, this was also causing problems with inferiors which handle SIGSEGV by themselves, since LLDB was unable to reinject this signal back into the inferior. This commit changes LLGS to report SIGSEGV as a signal. This has necessitated some changes in the test-suite, which had previously used eStopReasonException to locate threads that crashed. Now it uses platform-specific logic, which in the case of linux searches for eStopReasonSignaled with signal=SIGSEGV. I have also added the ability to set the description of StopInfoUnixSignal using the description field of the gdb-remote packet. The linux stub uses this to display additional information about the segfault (invalid address, address access protected, etc.). Test Plan: All tests pass on linux and osx. Reviewers: ovyalov, clayborg, emaste Subscribers: emaste, lldb-commits Differential Revision: http://reviews.llvm.org/D10057 llvm-svn: 238549
* [TestBase.runCmd] Better error message when runCmd fails.Siva Chandra2015-05-271-1/+1
| | | | | | | | | | | | | | | | | | | | | 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
* Disable TestConcurrentEvents.py on Windows.Zachary Turner2015-05-221-1/+1
| | | | | | | This test takes over 5 minutes to run just by itself, and everything fails anyway, so it doesn't make sense to keep it running for now. llvm-svn: 238040
* Skip tests that are timing out on the FreeBSD buildbotEd Maste2015-05-091-0/+31
| | | | | | | | | 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
* XFAILing a single test in TestConcurrentEventsPavel Labath2015-04-221-0/+1
| | | | | | | apparently, TestConcurrentEvents is still not fixed. One test has failed on Linux i386 build. Will disable the failing test on i386 for now, and see how it goes.. llvm-svn: 235504
* Enable TestConcurrentEvents on LinuxPavel Labath2015-04-221-16/+0
| | | | | | | After the latest changes in NativeProcessLinux, these tests should be stable now. Please revert (and let me know) if any issue crops up. llvm-svn: 235502
* NativeProcessLinux: Merge operation and monitor threadsPavel Labath2015-04-201-1/+0
| | | | | | | | | | | | | | | | | Summary: This commit moves the functionality of the operation thread into the new monitor thread. This is required to avoid a kernel race between the two threads and I believe it actually makes the code cleaner. Test Plan: Ran the test suite a couple of times, no regressions. Reviewers: ovyalov, tberghammer, vharron Subscribers: tberghammer, lldb-commits Differential Revision: http://reviews.llvm.org/D9080 llvm-svn: 235304
* XFAIL tests that are known to fail occasionally on LinuxVince Harron2015-03-051-0/+1
| | | | | | | | Trying to get the build green so we can notice new failures easier. Differential Revision: http://reviews.llvm.org/D8039 llvm-svn: 231407
* Modify ThreadStateCoodrinator in order to resume threads if stop wasn't ↵Chaoren Lin2015-02-031-1/+1
| | | | | | requested. llvm-svn: 227924
* Correct typo: waychpoint -> watchpointEd Maste2014-04-071-1/+1
| | | | llvm-svn: 205719
* Adjust TestConcurrentEvents.py test running for Linux.Todd Fiala2014-02-281-21/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Related to this bug: http://llvm.org/bugs/show_bug.cgi?id=16714 On TOT lldb svn r202507, I found several of the tests disabled within TestConcurrentEvents.py to run fine, and several of them to fail 100% of the time on my system (25 out of 25 times). This changes the following tests for Linux: Enables (these all work consistently): * test_many_watchpoints_dwarf * test_signal_watch_break_dwarf (line 250) * test_signal_watch_break_dwarf (line 260 - same named test?) * test_crash_with_watchpoint_dwarf * test_crash_with_watchpoint_breakpoint_signal_dwarf * test_delayed_crash_with_breakpoint_watchpoint_dwarf Marks as expected failure (these all fail consistently): * test_many_watchpoints_dwarf * test_watch_break_dwarf * test_delay_watch_break_dwarf * test_watch_break_dwarf_delay * test_signal_watch_dwarf * test_delay_signal_watch_dwarf * test_signal_delay_watch_dwarf * test_two_breakpoints_one_watchpoint_dwarf * test_breakpoints_delayed_breakpoint_one_watchpoint_dwarf * test_two_watchpoint_threads_dwarf * test_watchpoint_with_delay_watchpoint_threads_dwarf * test_two_watchpoints_one_breakpoint_dwarf * test_two_watchpoints_one_delay_breakpoint_dwarf * test_watchpoint_delay_watchpoint_one_breakpoint_dwarf * test_two_watchpoints_one_signal_dwarf * test_signal_watch_break_dwarf llvm-svn: 202511
* FreeBSD hardware watchpoint implementationEd Maste2014-02-191-18/+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
* Remove decorators for llvm.org/pr17920 fixed by r200646Ed Maste2014-02-111-6/+0
| | | | llvm-svn: 201167
* Remove failure decorators for FreeBSD bugEd Maste2014-02-021-5/+0
| | | | | | | | | | | | | The issue described in llvm.org/pr18065 is actually due to FreeBSD bug theads/186309 [1], which is now fixed in FreeBSD SVN r261354 [2] and will be merged to release branches shortly. Diagnosed and fixed by John Wolfe. [1] http://www.freebsd.org/cgi/query-pr.cgi?pr=186309 [2] http://svnweb.freebsd.org/base?view=revision&revision=261354 llvm-svn: 200648
* Massive test suite cleanup to stop everyone from manually having to compute ↵Greg Clayton2013-12-101-1/+1
| | | | | | | | | | "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
* Add decorator for FreeBSD watchpoint failureEd Maste2013-12-091-0/+1
| | | | | | llvm.org/pr16706 llvm-svn: 196781
* Added two new test case decorator functions: @skipIfRemote and ↵Greg Clayton2013-12-051-1/+21
| | | | | | | | | | @skipIfRemoteDueToDeadlock. @skipIfRemote is used to decorate test cases that don't make sense to run remotely. @skipIfRemoteDueToDeadlock indicates these tests need to be looked at and currently deadlock the running of the test suite when run on remote systems. These issues should be fixed soon. llvm-svn: 196543
* test: Decorators for pr17910Ed Maste2013-12-021-11/+11
| | | | | | | | | | | | A number of tests fail to build on FreeBSD because the test build script defaults to libstdc++ for clang. On FreeBSD the libstdc++ is rather old and libc++ should be used instead. (These tests previously had an @expectedFailureFreeBSD decorator for pr16696, the umbrella PR for the lack of threaded inferior support on FreeBSD. The work to add that support will be committed soon.) llvm-svn: 196101
* Re-enable check previously disabled due to llvm.org/pr16603Daniel Malea2013-08-071-4/+3
| | | | llvm-svn: 187890
* Test compatibility improvements for ICCDaniel Malea2013-08-061-1/+1
| | | | | | | - update TestThreadStepOut.py to work with Intel compilers - fix typo in TestConcurrentEvents llvm-svn: 187801
* Assorted test suite fixes as a result of GCC 4.8 validation effortsDaniel Malea2013-07-301-0/+21
| | | | | | | | | | | | - disable some TestConcurrentEvents cases (which are affected by llvm.org/pr16714 -- watchpoints in multithreaded programs) - relax number-of-bp-locations check in TestUniqueTypes/TestUnsignedTypes - skip TestDataFormatterStdVector cases with GCC 4.8 (known failure due to llvm.org/pr15301) - workaround for race condition in TestHelloWorld.py - update TestSettings.py to work on distros (like Fedora) that have /bin/cat hardlinked to /usr/bin/cat After these changes, the test suite should run cleanly against GCC 4.8 (with DWARF v4)! llvm-svn: 187451
* tests: Mark expected FreeBSD failures due to pr16706Ed Maste2013-07-251-0/+17
| | | | | | Watchpoints are not yet working on FreeBSD llvm-svn: 187134
* tests: Mark expected FreeBSD failures due to pr16696Ed Maste2013-07-251-0/+11
| | | | | | Live debugging for threaded inferiors is not yet implemented on FreeBSD llvm-svn: 187131
* Fix gcc buildbot failures, re-enable tests disabled due to llvm.org/pr16575Daniel Malea2013-07-121-11/+2
| | | | llvm-svn: 186166
* Get debugserver to call task_set_state to prime the control registers so ↵Jim Ingham2013-07-111-21/+0
| | | | | | | | | | | | | 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
* Enable Mac OS X tests disabled due to llvm.org/pr16567Daniel Malea2013-07-111-9/+0
| | | | | | - thread count remains correct now that we use pthread_kill() instead of kill() to deliver signals llvm-svn: 186126
* Improve TestConcurrentEvents.pyDaniel Malea2013-07-111-73/+109
| | | | | | | | | | - code cleanup, improved reporting when failures take place - ensure known thread is interrupted by using pthread_kill() instead of kill() in the signal worker thread - above should avoid llvm.org/pr16567 on Mac OS X (though kill() could still cause threads to pop out of existance temporarily) - added an additional check that all threads have exited after worker threads are all join()ed - logged llvm.org/pr16603 for the new Linux bug discovered llvm-svn: 186124
* Cleanup in TestConcurrentEvents.pyDaniel Malea2013-07-091-17/+9
| | | | | | | | - re-enable tests fixed by Matt's commit this morning (addressed llvm.org/pr16567) - disabled tests affected by new bug llvm.org/pr16575 - removed some commented out code in inferior llvm-svn: 185951
* Add TestConcurrentEvents test for LLDB's handling of inferior threadsDaniel Malea2013-07-091-0/+485
- 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