summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test/functionalities/thread
Commit message (Collapse)AuthorAgeFilesLines
* PR31214: Make a test tolerate "line 0" when stepping by instruction.Paul Robinson2016-11-301-4/+10
| | | | | | Differential Revision: http://reviews.llvm.org/D27282 llvm-svn: 288282
* Fix "thread step until" handling of multiple line inputs.Jim Ingham2016-11-183-0/+117
| | | | | | Also document that it handles same, and add some tests. llvm-svn: 287386
* Don't set a software stepping breakpoint at 0 on arm or mips.Pavel Labath2016-10-261-5/+0
| | | | | | | | | | | | | | | | | | Summary: Check whether the setting the breakpoint failed during instruction emulation. If it did, the next pc is likely in unmapped memory, and the inferior will crash anyway after the next instruction. Do not return an error in this case, but just continue stepping. Reenabled the crash during step test for android/linux. Reviewers: labath Subscribers: aemerson, rengolin, tberghammer, danalbert, srhines, lldb-commits Differential Revision: https://reviews.llvm.org/D25926 Author: Jason Majors <jmajors@google.com> llvm-svn: 285187
* Use shorter names in TestConcurrentEvents testsPavel Labath2016-10-2435-35/+35
| | | | | | | | | Otherwise, they tend to generate filename too long errors. They already contain the same test name in the directory, file, and class names, so no information is really lost here. llvm-svn: 284987
* Remove an unnecessary and incorrect check for num locations of a breakpointJim Ingham2016-10-201-8/+0
| | | | | | | by grubbing the break list output. If you pass a number of locations into the run_break_* functions, they will check that this is right for you. llvm-svn: 284791
* Adding radar number on our end for llvm.org/pr15824.Jim Ingham2016-10-101-2/+2
| | | | llvm-svn: 283821
* Add the related radar on our end for llvm.org/pr15824.Jim Ingham2016-10-101-1/+1
| | | | llvm-svn: 283820
* [LLDB][MIPS] Skip some test case which were causing LLDB to go into infinite ↵Nitesh Jain2016-10-1035-35/+35
| | | | | | | | | | | | loop Reviewers: clayborg, labath Subscribers: jaydeep, bhushan, slthakur, llvm-commits Differential Revision: https://reviews.llvm.org/D24549 llvm-svn: 283732
* Fixup the xfail situation on Windows.Zachary Turner2016-10-051-3/+0
| | | | | | Xfails added and/or removed to reflect the current state of Windows. llvm-svn: 283380
* Fix up this test case.Jim Ingham2016-10-011-35/+0
| | | | | | | | | | | | | | The lldbutil.run_break_set_by_file_and_line has already checked that the number of locations was 1, so don't check it again. And certainly don't check it again by grubbing in break list output. Also, we know the Thread's IsStopped state is wrong, and have a test for that, so don't keep testing it in other files where that isn't the primary thing we're testing. I removed the xfail for Darwin. If this also passes on other systems, we can remove the xfails from them as we find that out. llvm-svn: 282993
* Fix up the test so it gets closer to passing.Jim Ingham2016-09-301-40/+11
| | | | | | | | | | | Remove the test for thread stopped states from this test. That isn't set properly now, and its setting doesn't matter till we actually support non-stop debugging, so we shouldn't have unrelated tests failing from it. Also changed some code that was trying and failing to grub command line output, and replaced it by SB API calls. llvm-svn: 282976
* Add the radar on our end to the bugreport string.Jim Ingham2016-09-301-3/+3
| | | | llvm-svn: 282970
* Add the tracking radar on our end.Jim Ingham2016-09-301-1/+1
| | | | llvm-svn: 282830
* *** This commit represents a complete reformatting of the LLDB source codeKate Stone2016-09-0650-472/+865
| | | | | | | | | | | | | | | | | | | | | | | *** to conform to clang-format’s LLVM style. This kind of mass change has *** two obvious implications: Firstly, merging this particular commit into a downstream fork may be a huge effort. Alternatively, it may be worth merging all changes up to this commit, performing the same reformatting operation locally, and then discarding the merge for this particular commit. The commands used to accomplish this reformatting were as follows (with current working directory as the root of the repository): find . \( -iname "*.c" -or -iname "*.cpp" -or -iname "*.h" -or -iname "*.mm" \) -exec clang-format -i {} + find . -iname "*.py" -exec autopep8 --in-place --aggressive --aggressive {} + ; The version of clang-format used was 3.9.0, and autopep8 was 1.2.4. Secondly, “blame” style tools will generally point to this commit instead of a meaningful prior commit. There are alternatives available that will attempt to look through this change and find the appropriate prior commit. YMMV. llvm-svn: 280751
* Disable TestThreadSpecificBpPlusCondition on Windows.Zachary Turner2016-08-121-1/+1
| | | | | | Test frequently times out stalling the test runner. llvm-svn: 278529
* Breakup TestConcurrentEvents.py into separate test subdirs per test methodTodd Fiala2016-07-2271-526/+1123
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change breaks up the monolithic TestConcurrentEvents.py into a separate subdir per test method. This allows them to run concurrently, reduces the chance of a timeout occurring during normal operation, and allows us to home in on any test methods that may be locking up. This is step one in the process of squashing timeouts in these test methods. The reason for breaking each test method into its own file is to make it very clear to us if there are a subset of the tests that do in fact lock up frequently. This will limit how much hunting we need to do to recreate it. The reason for putting each file in a separate subdirectory is so that our concurrent test runner can run multiple test files at the same time. The unit of serialization in the LLDB test suite is the test directory, so moving them into separate directories enables the test runner to do more at the same time. This change introduces usage of VPATH from gnu make. I use that to facilitate keeping a single copy of the main.cpp in the parent concurrent_events directory. Initially I had tried specifying the source file as ../main.cpp, but our current makefile rules get confused by that and then also build the output into the parent directory, which defeats the ability to run each of the test methods concurrently. In the event that not all systems support VPATH, I can do a bit of surgery on the Makefile rules and attempt to make it smarter with regards to relative paths to source files used in the build. llvm-svn: 276478
* Xfail TestCrashDuringStep and TestCreateDuringInstructionStep on arm-linuxOmair Javaid2016-05-161-0/+1
| | | | | | | Both of above tests fail on arm and bugs have been reported on android already. Adding arm-linux decorator because android decorator doesnt xfail these test when run on linux. llvm-svn: 269647
* Fix race in TestExitDuringStep and unify pseudo_barrier handlingPavel Labath2016-05-108-105/+13
| | | | | | | | | | | | | | | | | | Summary: TestExitDuringStep was very rarely hanging on the buildbots. I can't be sure, but I believe this was because of the fact that it declared its pseudo_barrier variable as "volatile int", which is not sufficient to guarantee corectness (also, all other tests used atomic variables for this, and they were passing reliably AFAIK). Besides switching to an atomic variable in this test as well, I have also took this opportunity to unify all the copies of the pseudo_barrier code to a single place to reduce the chance of this happening again. Reviewers: clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D20065 llvm-svn: 269025
* Remove flaky decorator from three tests on linuxPavel Labath2016-04-271-1/+0
| | | | | | The flakyness is no longer reproducible, and the tests seem to be passing reliably now. llvm-svn: 267704
* Remove flaky decorator from two tests on linuxPavel Labath2016-04-252-4/+0
| | | | | | The flakyness is no longer reproducible, and the tests seem to be passing reliably now. llvm-svn: 267392
* Fixup r266327Pavel Labath2016-04-181-2/+2
| | | | | | Fix XFAILed tests in TestThreadStates for the new signature of wait_for_running_event. llvm-svn: 266598
* [LLDB][MIPS] Fix TestConcurrentEventsMohit K. Bhakkad2016-04-181-35/+35
| | | | | | | | | | Patch by Nitesh Jain Reviewers: clayborg Subscribers: jaydeep, bhushan, mohit.bhakkad, sagar Differential Revision: http://reviews.llvm.org/D18389 llvm-svn: 266589
* [test] make expect_state_changes actually expect *only* themPavel Labath2016-04-141-4/+4
| | | | | | | | The android dirty stderr problem has uncovered an issue where lldbutil.expect_state_changes was reading events other than state change events, which resulted in general confusion. Make it more strict to accept *only* state changes. llvm-svn: 266327
* Remove expectedFailureFreeBSD decoratorEd Maste2016-02-191-1/+1
| | | | | | | | All invocations are updated to use the generic expectedFailureAll. Differential Revision: http://reviews.llvm.org/D17455 llvm-svn: 261355
* Remove expectedFailureLinux decorator.Zachary Turner2016-02-106-29/+29
| | | | llvm-svn: 260422
* [LLDB][MIPS] Generalise MIPS arch namesMohit K. Bhakkad2016-02-101-1/+1
| | | | | | | | | | Patch by Nitesh Jain Reviewers: clayborg, jaydeep. Subscribers: zturner, bhushan, mohit.bhakkad, sagar, lldb-commits. Differential Revision: http://reviews.llvm.org/D16840 llvm-svn: 260362
* Remove expectedFailureWindows decorator.Zachary Turner2016-02-087-14/+14
| | | | | | | | | | | | | | | expectedFailureWindows is equivalent to using the general expectedFailureAll decorator with oslist="windows". Additionally, by moving towards these common decorators we can solve the issue of having to support decorators that can be called with or without arguments. Once all decorators are always called with arguments, and this is enforced by design (because you can't specify the condition you're decorating for without passing an argument) the implementation of the decorators can become much simpler Differential Revision: http://reviews.llvm.org/D16936 llvm-svn: 260134
* Move the rest of the tests over to using the new decorator module.Zachary Turner2016-02-0412-12/+24
| | | | llvm-svn: 259838
* Move some of the common decorators to decorators.py.Zachary Turner2016-02-042-2/+4
| | | | | | | | | | | | This doesn't attempt to move every decorator. The reason for this is that it requires touching every single test file to import decorators.py. I would like to do this in a followup patch, but in the interest of keeping the patches as bite-sized as possible, I've only attempted to move the underlying common decorators first. A few tests call these directly, so those tests are updated as part of this patch. llvm-svn: 259807
* Remove redundant test in TestExitDuringStepPavel Labath2016-02-021-12/+4
| | | | | | | | | After recent changes, test_thread_state_is_stopped has become equivalent to test_step_in, as the function exit_during_step_base was not using the "test_thread_state" parameter. As test was XFAILed on all platforms anyway, and we have other tests for the bug which it (used to) test, I am simply removing the function. llvm-svn: 259517
* More fixes related to counting threads on Windows.Zachary Turner2016-01-222-82/+31
| | | | | | | | | | | | | | | The Windows 10 loader spawns threads at startup, so tests which count threads or assume that a given user thread will be at a specific index are incorrect in this case. The fix here is to use the standard mechanisms for getting the stopped thread (which is all we are really interested in anyway) and correlating them with the breakpoints that were set, and doing checks against those things. This fixes about 6 tests on Windows 10. llvm-svn: 258586
* Remove assumptions that thread 0 is always the main thread.Zachary Turner2016-01-213-91/+19
| | | | | | | | | | | | | | | | | Starting with Windows 10, the Windows loader is itself multi-threaded, meaning that the loader spins up a few threads to do process initialization before it executes main. Windows delivers these notifications asynchronously and they can come out of order, so we can't be sure that the first thread we get a notification about is actually the zero'th thread. This patch fixes this by requesting the thread stopped at the breakpoint that was specified, rather than getting thread 0 and verifying that it is stopped at a breakpoint. Differential Revision: http://reviews.llvm.org/D16247 llvm-svn: 258432
* Enable TestConcurrentEvents on i386 linuxPavel Labath2016-01-201-1/+0
| | | | | | The test has been passing reliably the last 100 runs of the build bot. llvm-svn: 258304
* Remove last XTIMEOUTs from android testsPavel Labath2016-01-191-0/+3
| | | | | | | | TestHelloWorld seems to be passing now as far as I can tell. TestExitDuringStep is still hanging. I have marked the relevant tests as flaky, which should handle the timeouts now as well. I'll be monitoring the buildbots for fallout. llvm-svn: 258114
* Fix decoration of TestConcurrentEventsPavel Labath2016-01-151-1/+35
| | | | | | | | | | TestConcurrentEvents was marked with a XFAIL decorator at class level, which actually does not work, and causes the class to be silently skipped everywhere. It seems that making it work at class level is quite a difficult task, so I will just move it to the individual test methods. I will follow this up with a commit which makes the decorator blow up in case someone tries to apply it to a class in the future. llvm-svn: 257901
* [TestThreadJump] Adjust match sub-string after recent change.Siva Chandra2016-01-121-2/+1
| | | | | | | | | | Reviewers: zturner Subscribers: zturner, lldb-commits Differential Revision: http://reviews.llvm.org/D16125 llvm-svn: 257531
* Fix TestThreadJump on Windows.Zachary Turner2016-01-121-2/+1
| | | | | | | | The system can create threads for a system threadpool, so there is no guarantee that the thread that is stopped is thread 1. So use a more robust check. llvm-svn: 257513
* Centralize the handling of attach permissions on linux in testsPavel Labath2016-01-111-18/+1
| | | | | | | | | | | | | | | Summary: On linux we need the process to give us special permissions before we can attach to it. Previously, the code for this was copied into every file that needed it. This moves the code to a central place to reduce code duplication. Reviewers: clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D15992 llvm-svn: 257319
* Remove XFAIL from a few tests that have been fixed on Windows.Zachary Turner2016-01-081-1/+0
| | | | llvm-svn: 257219
* Remove XFAIL from TestThreadStates on Windows.Zachary Turner2016-01-081-1/+0
| | | | llvm-svn: 257207
* Add expectedFailureFreeBSD to an additional thread state test failing on FreeBSDEd Maste2015-12-221-0/+1
| | | | | | This new failure has been noted in the existing PR, llvm.org/pr15824 llvm-svn: 256268
* Merge ENABLE_THREADS and ENABLE_STD_THREADS markersTamas Berghammer2015-12-154-8/+8
| | | | | | | | | | | | Both of these markers are used in the test suit for annotating when a test needs multi threaded support. Previously they had slightly different meening but they converged to the point where they are used interchangably. This CL removes the ENABLE_STD_THREADS one to simplify the test suite and avoid some confusion. Differential revision: http://reviews.llvm.org/D15498 llvm-svn: 255641
* [LLDB][MIPS] Mark TestConcurrentEvents.py expected failure, as MIPS atomic ↵Mohit K. Bhakkad2015-12-141-0/+1
| | | | | | | | | | sequences are yet to be supported in LLDB Reviewers: jaydeep. Subscribers: lldb-commits. Differential Revision: http://reviews.llvm.org/D15488 llvm-svn: 255488
* Make TestThreadStates more stablePavel Labath2015-12-071-25/+11
| | | | | | | | | | | | | | | | | | | | | Summary: Because of the large number of XFAILs TestThreadStates has decayed quite a bit. This commit does the following: - removes the "breakpoint list" expectations. Most tests have been failing on this, because the command output changed quite a while back. I remove it, because run_break_set_by_file_and_line already does a decent amount of checking - fixup test_state_after_expression: this was calling the wrong function by mistake. As now the function actually tests something (which we know is broken), I needed to XFAIL it as well. - replaces the sleep() with a proper wait-for-event functionality in parts which use async mode, to stabilize the one function that actually tests something. Reviewers: clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D15233 llvm-svn: 254901
* Make TestThreadSpecificBreakpoint.py more focused.Zachary Turner2015-12-045-53/+143
| | | | | | | | | | | | | | | | This test would fail before if conditional breakpoints weren't working correctly, and the nature of the test (spinning up 10 threads, etc) opens the door to raciness. This patch vastly simplifies the test, removes the need for relying on conditional expression evaluation, and as a result makes the correctness of the test vastly easier to reason about and reduces flakiness. Differential Revision: http://reviews.llvm.org/D15241 Reviewed By: Jim Ingham llvm-svn: 254792
* [LLDB][MIPS] XFAIL TestCrashDuringStep.py for MIPSJaydeep Patil2015-12-041-0/+1
| | | | | | | | | | | SUMMARY: Marked TestCrashDuringStep.py as XFAIL for MIPS. The test generates IO error due to breakpoint at invalid address. Reviewers: clayborg, labath Subscribers: nitesh.jain, mohit.bhakkad, sagar, bhushan and lldb-commits Differential Revision: http://reviews.llvm.org/D15182 llvm-svn: 254710
* Un XFAIL some tests that are now passing on Windows.Zachary Turner2015-12-031-1/+0
| | | | llvm-svn: 254633
* Remove expectedFailureFreeBSD from passing ThreadExitTestCase::test_with_dwarfEd Maste2015-11-241-1/+0
| | | | | | | | | This passes on my FreeBSD stable/10 desktop and my new FreeBSD 11-current buildbot (which is not yet hooked up to the buildmaster). llvm.org/pr18190 llvm-svn: 254000
* [TestExitDuringStep] Adjust after a recent type map change.Siva Chandra2015-11-181-1/+2
| | | | | | | | | | Reviewers: zturner Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D14784 llvm-svn: 253505
* Teach LLDB how to directly launch processes on the iOS simulatorEnrico Granata2015-11-051-0/+2
| | | | | | | | This allows for command-line debugging of iOS simulator binaries (as long as UI is not required, or a full UI simulator has previously been otherwise launched), as well as execution of the LLDB test suite on the iOS simulator This is known to compile on OSX 10.11 GM - feedback from people on other platforms and/or older versions of OSX as to the buildability of this code is greatly appreciated llvm-svn: 252112
OpenPOWER on IntegriCloud