summaryrefslogtreecommitdiffstats
path: root/lldb/test/functionalities/thread
Commit message (Collapse)AuthorAgeFilesLines
* Move lldb/test to lldb/packages/Python/lldbsuite/test.Zachary Turner2015-10-2843-3119/+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-2714-14/+14
| | | | 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-2314-0/+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-2214-102/+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
* Merge dwarf and dsym testsTamas Berghammer2015-09-3014-448/+152
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Enable test_create_after_attach_with_dwarf_and_popen on linuxPavel Labath2015-09-291-1/+0
| | | | | | The test still remains XTIMEOUTed. Will remove that as well if it turns out its passing. llvm-svn: 248790
* Last set of XFAILs for Windows.Zachary Turner2015-09-161-0/+2
| | | | llvm-svn: 247825
* Final unexpected success cleanup for OS X.Todd Fiala2015-09-141-2/+0
| | | | | | | Top of tree is running with no unexpected successes with this change, on latest available El Capitan and Xcode betas. llvm-svn: 247608
* XFAIL miscellaneous tests on windows.Zachary Turner2015-09-111-0/+1
| | | | | | llvm.org/pr24778 llvm-svn: 247460
* XFAIL 2 breakpoint tests on Windows.Zachary Turner2015-09-111-0/+1
| | | | | | llvm.org/pr24777 llvm-svn: 247459
* For now skip ThreadSpecificBreakTestCase on FreeBSDEd Maste2015-09-091-0/+1
| | | | | | | | | | It often hangs or times out, and obscures issues with other tests. Just skip it for now (until the FreeBSD test suite is producing consistent results) so that we can get a buildbot back. Previous investigation (for failures) in llvm.org/pr18522 llvm-svn: 247190
* XFAIL tests that rely on exact thread counts.Zachary Turner2015-09-023-0/+6
| | | | | | | | | On Windows we have to deal with OS created threads, so we can never know the exact number of threads. llvm.org/pr24681 llvm-svn: 246723
* XFAIL tests on Windows that are failing to resolve breakpoints.Zachary Turner2015-09-024-0/+8
| | | | | | llvm.org/pr24668 llvm-svn: 246670
* XFAIL test_thread_state_after_continue on Windows.Zachary Turner2015-09-021-1/+3
| | | | | | https://llvm.org/pr24660 llvm-svn: 246668
* Enable a couple of tests in TestExitDuringStep on linuxPavel Labath2015-09-021-2/+0
| | | | | | tests have been reliably passing at least the last 100 runs of the build bot. llvm-svn: 246647
* Fix a bunch of portability issues in test executables.Zachary Turner2015-08-255-24/+23
| | | | llvm-svn: 245983
* Make TestCreateDuringInstructionStep linux-specificPavel Labath2015-08-243-132/+0
| | | | | | | | | | | | | | | | | | Summary: There were a number of issues about the way I have designed this test originally: - it relied on single-stepping through large parts of code, which was slow and unreliable - the threading libraries interfered with the exact thing we wanted to test For this reason, I have rewritted the test using low-level linux api, which allows the test to be much more focused. The functionality for other platforms will need to be tested separately. Reviewers: tberghammer Subscribers: tberghammer, danalbert, srhines, lldb-commits Differential Revision: http://reviews.llvm.org/D12280 llvm-svn: 245838
* Skip TestCreateAfterAttach on Windows.Zachary Turner2015-08-211-1/+1
| | | | | | | As with every other platform, this test occasionally hangs on Windows. llvm-svn: 245748
* Skip TestCreateDuringInstructionStep on android aarch64Pavel Labath2015-08-201-1/+4
| | | | | | we are unable to step through _M_start_thread due to atomic instruction sequences. llvm-svn: 245552
* [NativeProcessLinux] Fix a bug in instruction-stepping over thread creationPavel Labath2015-08-203-0/+129
| | | | | | | | | | | | | | | | | | | | | | | Summary: There was a bug in NativeProcessLinux, where doing an instruction-level single-step over the thread-creation syscall resulted in loss of control over the inferior. This happened because after the inferior entered the thread-creation maintenance stop, we unconditionally performed a PTRACE_CONT, even though the original intention was to do a PTRACE_SINGLESTEP. This is fixed by storing the original state of the thread before the stop (stepping or running) and then performing the appropriate action when resuming. I also get rid of the callback in the ThreadContext structure, which stored the lambda used to resume the thread, but which was not used consistently. A test verifying the correctness of the new behavior is included. Reviewers: ovyalov, tberghammer Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D12104 llvm-svn: 245545
* Add TestCrashDuringStepPavel Labath2015-08-193-0/+86
| | | | | | this tests that a crash that happens during instruction step is reported correctly. llvm-svn: 245440
* Convert all use of pthreads in tests to c++11 threads.Zachary Turner2015-08-1710-110/+90
| | | | | | | | | | This eliminates portability issues among platforms that don't have a pthreads implementation. Differential Revision: http://reviews.llvm.org/D12043 Reviewed By: Greg Clayton llvm-svn: 245234
* Fix typos.Bruce Mitchener2015-07-222-2/+2
| | | | | | | | | | | | Summary: Fix a bunch of typos. Reviewers: clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D11386 llvm-svn: 242856
* 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
* Windows doesn't have fork.Adrian McCarthy2015-07-071-0/+1
| | | | llvm-svn: 241640
* Normalize line endings.Adrian McCarthy2015-07-061-78/+78
| | | | llvm-svn: 241507
* Fix step over breakpoint on Windows (which was detected by ↵Adrian McCarthy2015-07-063-100/+100
| | | | | | TestCreateAfterAttach.py). llvm-svn: 241475
* Reversed r238363, because the message is inconsistentSean Callanan2015-07-0111-15/+15
| | | | | | with all the other assertion messages. llvm-svn: 241212
* Added expectedFlakey test decoratorVince Harron2015-06-262-1/+4
| | | | | | | | | | | | | | | | | SUMMARY Flakey tests get two chances to pass Also, switched a bunch of tests to use new decorator. TEST PLAN Add one of these decorators to a test Edit a test to pass on the first invocation, confirm test appears as pass Edit a test to pass on the first invocation, pass on the second, confirm test appears as xfail Edit a test to fail on two consecutive runs, confirm test appears in results as fail/error Differential Revision: http://reviews.llvm.org/D10721 llvm-svn: 240789
* Remove XFAIL from TestCreateAfterAttachPavel Labath2015-06-251-3/+0
| | | | | | | The tested functionality is implemented now. The test remains XTIMEOUTed, because it times out occasionally, probably due to test suite deficiencies. llvm-svn: 240632
* Remove old local-only linux debugging codePavel Labath2015-06-246-10/+10
| | | | | | | | | | | | | | | | | | | | Summary: Currently, the local-only path fails about 50% of the tests, which means that: a) nobody is using it; and b) the remote debugging path is much more stable. This commit removes the local-only linux debugging code (ProcessLinux) and makes remote-loopback the only way to debug local applications (the same architecture as OSX). The ProcessPOSIX code is moved to the FreeBSD directory, which is now the only user of this class. Hopefully, FreeBSD will soon move to the new architecture as well and then this code can be removed completely. Test Plan: Test suite passes via remote stub. Reviewers: emaste, vharron, ovyalov, clayborg Subscribers: tberghammer, emaste, lldb-commits Differential Revision: http://reviews.llvm.org/D10661 llvm-svn: 240543
* Fix a variety of typos.Bruce Mitchener2015-06-182-2/+2
| | | | | | No functional change. llvm-svn: 239995
* 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
* Fix TestJoinAfterBreak test on WindowsAdrian McCarthy2015-06-013-41/+23
| | | | llvm-svn: 238787
* 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
* Skip ThreadStateTestCase.test_state_after_continue_with_dwarf on DarwinYing Chen2015-05-281-0/+6
| | | | | | | | | | | | | | | | Summary: - This test cause Python crash randomly on darwin builder - Tracked by bug 'llvm.org/pr23669' Test Plan: ./dotest.py -m --executable /Users/lldb_build/testSlave/buildDir/lldb.src/build/Debug/lldb --framework /Users/lldb_build/testSlave/buildDir/lldb.src/build/Debug/LLDB.framework -A x86_64 -C clang -p TestThreadStates.py Reviewers: chaoren, vharron Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D10053 llvm-svn: 238495
* [TestBase.runCmd] Better error message when runCmd fails.Siva Chandra2015-05-2711-15/+15
| | | | | | | | | | | | | | | | | | | | | 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
* Update Makefile to reflect that TestNumThreads now uses std::thread instead ↵Adrian McCarthy2015-05-211-1/+1
| | | | | | of pthreads. llvm-svn: 237919
* Have TestNumThreads use std::thread instead of pthreads so that it can work ↵Adrian McCarthy2015-05-204-62/+57
| | | | | | cross-platform. llvm-svn: 237844
* Fix test expectation in TestThreadExit after r237566Tamas Berghammer2015-05-181-4/+4
| | | | llvm-svn: 237578
* Add --move-to-nearest-code / target.move-to-nearest-code options (attempt 2)Ilia K2015-05-184-4/+4
| | | | | | | | | | | | 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 r237392 since it broke TestNumThreads on ubuntu builder.Oleksiy Vyalov2015-05-154-57/+62
| | | | llvm-svn: 237415
* Enable multithreaded debugging on Windows.Adrian McCarthy2015-05-144-62/+57
| | | | llvm-svn: 237392
* XFAIL and Skip flaky test case on linuxTamas Berghammer2015-05-121-0/+2
| | | | llvm-svn: 237135
* Skip and XFAIL TestThreadStepOut as it times out on the Linux build botTamas Berghammer2015-05-111-0/+6
| | | | llvm-svn: 236986
* 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
* [TestCreateAfterAttach] Add @skipIfRemote to the forking test.Siva Chandra2015-05-081-0/+1
| | | | | | | | | | | | | | Test Plan: dotest.py -p TestCreateAfterAttach Reviewers: chaoren Reviewed By: chaoren Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D9617 llvm-svn: 236903
* un-skipped a bunch of tests on LinuxVince Harron2015-05-041-1/+0
| | | | | | | | | Some have been marked as skipIfLinux for years. The seem to be passing so I've enabled them. Differential Revision: http://reviews.llvm.org/D9428 llvm-svn: 236403
OpenPOWER on IntegriCloud