summaryrefslogtreecommitdiffstats
path: root/lldb/test/functionalities/stop-hook/multiple_threads/TestStopHookMultipleThreads.py
Commit message (Collapse)AuthorAgeFilesLines
* Move lldb/test to lldb/packages/Python/lldbsuite/test.Zachary Turner2015-10-281-76/+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/+2
| | | | | | | | | | | | | | | | | | | | | 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-19/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 ↵Ed Maste2015-09-141-1/+0
| | | | | | | | | | | | | | | StopHookForMultipleThreadsTestCase::test_stop_hook_multiple_threads_with_dwarf on FreeBSD This test passes locally but was disabled due to pexpect issues on the FreeBSD buildbot. That buildbot has been retired as it was overloaded, and we will investigate again if this fails once a new buildbot is in place. Noted by John Wolfe. llvm.org/pr22784 This re-applies r247013. llvm-svn: 247565
* Update expectedFailureFreeBSD to expectedFlakeyFreeBSD for intermittent testsEd Maste2015-09-091-1/+1
| | | | | | | | | | | Due to LLDB or test race conditions these tests do not pass consistently. llvm.org/pr15037 llvm.org/pr19310 llvm.org/pr22611 llvm-svn: 247143
* Revert "Enable ↵Ed Maste2015-09-081-0/+1
| | | | | | | | | | | | | StopHookForMultipleThreadsTestCase::test_stop_hook_multiple_threads_with_dwarf on FreeBSD" And update the comment describing the reason this test is skipped. Unlike the issue described llvm.org/pr22784 this test sometimes causes a hang on my local machine and is not just a problem on the retired buildbot. This reverts commit r247013. llvm-svn: 247024
* Enable ↵Ed Maste2015-09-081-1/+0
| | | | | | | | | | | | | StopHookForMultipleThreadsTestCase::test_stop_hook_multiple_threads_with_dwarf on FreeBSD This test passes locally but was disabled due to pexpect issues on the FreeBSD buildbot. That buildbot has been retired as it was overloaded, and we will investigate again if this fails once a new buildbot is in place. Noted by John Wolfe. llvm.org/pr22784 llvm-svn: 247013
* Xfail pexpect tests for Windows hosts.Chaoren Lin2015-07-161-1/+1
| | | | llvm-svn: 242457
* Make TestStopHook* remote platform compatibleTamas Berghammer2015-07-061-1/+12
| | | | llvm-svn: 241436
* Added expectedFlakey test decoratorVince Harron2015-06-261-1/+1
| | | | | | | | | | | | | | | | | 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
* Fix a variety of typos.Bruce Mitchener2015-06-181-1/+1
| | | | | | No functional change. llvm-svn: 239995
* Skip test failing on FreeBSD buildbot due to pexepect issuesEd Maste2015-06-031-0/+1
| | | | | | | | | The pexpect exception is not handled by expectedFailureFreeBSD, so just skip the test for now. llvm.org/pr22784 llvm-svn: 238977
* Refactored lldb executable name discoveryVince Harron2015-05-181-1/+1
| | | | | | | | | | | | | | | | | | | | The lldb executable was referenced through the code by 7 different (effectively) global variables. global lldbExecutablePath global lldbExecutable os.environ['LLDB_EXEC'] os.environ['LLDB_TEST'] dotest.lldbExec dotest.lldbHere lldbtest.lldbExec This change uses one global variable lldbtest_config.lldbExec to replace them all. Differential Revision: http://reviews.llvm.org/D9817 llvm-svn: 237600
* Replace sys.platform skips in tests with @skip decorators which check ↵Robert Flack2015-03-301-1/+1
| | | | | | | | | | | | | | | | 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
* Fix StopHookForMultipleThreadsTestCase tests after r233098Ilia K2015-03-261-1/+1
| | | | llvm-svn: 233266
* XFAIL pexpect tests on Windows.Zachary Turner2015-01-201-0/+1
| | | | | | | | | | | | | At some point we will need to either provide a pexpect equivalent on Windows, or provide some other method of doing out-of-process tests. Even with a pexpect replacement, it may be worth re-evaluating some of these tests to see if they would be better served as in-process tests. The larger issue of coming up with a pexpect replacement on Windows is tracked in http://llvm.org/pr22274. llvm-svn: 226614
* Add a couple of extra exepct strings so this test file keeps in sync with lldbJason Molenda2014-10-021-0/+2
| | | | | | a little better. llvm-svn: 218851
* Add decorator for TestStopHookMultipleThreads failing on FreeBSDEd Maste2014-07-311-0/+1
| | | | | | llvm.org/pr15037 llvm-svn: 214402
* Fixes a number of issue related to test portability on Windows.Zachary Turner2014-07-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | 99% of this CL is simply moving calls to "import pexpect" to a more narrow scope - i.e. the function that actually runs a particular test. This way the test suite can run on Windows, which doesn't have pexpect, and the individual tests that use pexpect can be disabled on a platform-specific basis. Additionally, this CL fixes a few other cases of non-portability. Notably, using "ps" to get the command line, and os.uname() to determine the architecture don't work on Windows. Finally, this also adds a stubbed out builder_win32 module. The full test suite runs correctly on Windows after this CL, although there is still some work remaining on the C++ side to fix one-shot script commands from LLDB (e.g. script print "foo"), which currently deadlock. Reviewed by: Todd Fiala Differential Revision: http://reviews.llvm.org/D4573 llvm-svn: 213343
* Flipped intermittent test failures from skip to XFAIL.Todd Fiala2014-07-101-1/+1
| | | | | | | | | | | | | | | | | | The following intermittently-failing tests have been flipped from skip to XFAIL on some combo of Linux and MacOSX: TestCallStopAndContinue.py (Linux, MacOSX) TestCallWithTimeout.py (Linux) TestConvenienceVariables.py (Linux) TestStopHookMultipleThreads.py (Linux) The following new tests have been marked XFAIL but are just intermittently failing: TestMultipleDebug.py (definitely intermittent on MacOSX, not sure I've seen it pass yet on Linux) llvm-svn: 212762
* Skip tests that are intermittent on Linux, fix gdb-remote port-grabbing code.Todd Fiala2014-07-091-1/+1
| | | | | | | | | | | | | Marked skipped for Linux: TestCallStopAndContinue TestConvenienceVariables TestStopHookMultipleThreads Fixed up gdb-remote port-grabbing code to use a random port in a wide range, and to allow that to fail more gracefully. This appears to have solved some gdb-remote intermittent failing behavior. llvm-svn: 212662
* Marked linux TestStopHookMultipleThreads as expected failure.Todd Fiala2014-02-281-1/+1
| | | | | | | | | | Related to this bug: http://llvm.org/bugs/show_bug.cgi?id=15037 Previously this was marked as skipped. I tried running it 10 times in a row and it failed every time. Switched it to XFAIL. llvm-svn: 202506
* 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
* Disable TestStopHookMultipleThreads.py (on Linux) due to llvm.org/pr15037Daniel Malea2013-09-301-0/+1
| | | | | | - stop hooks sometimes fail to fire on Linux llvm-svn: 191704
* Enable tests affected by llvm.org/pr14637Daniel Malea2013-09-251-1/+0
| | | | | | - to verify that r191392 has the desired effect llvm-svn: 191396
* Disabling test broken (on GCC buildbot) due to http://llvm.org/pr14637Daniel Malea2013-09-171-0/+1
| | | | | | | - prompt disappears with older libedit versions - will re-enable once we have a recent libedit on the buildbot in question llvm-svn: 190889
* Re-enabling TestStopHookMultipleThreadsDaniel Malea2013-09-171-1/+0
| | | | | | - original bug llvm.org/pr14323 is long closed llvm-svn: 190865
* Clean up linux test decorators and add links to known bugsDaniel Malea2013-05-151-1/+1
| | | | | | | | | - s/skipOnLinux/skipIfLinux/ to match style of every other decorator - linkify bugizilla/PR numbers in comments No intended change in functionality. llvm-svn: 181913
* Test suite cleanup for Linux: mark test cases expected to fail due to open ↵Daniel Malea2012-12-191-0/+1
| | | | | | | | bugzillas - bugzillas covered: 14323, 14600, 14541, 14437, 14540, 14541 llvm-svn: 170564
* <rdar://problem/12798131> Greg Clayton2012-12-041-1/+1
| | | | | | | | | | | | Cleaned up the option parsing code to always pass around the short options as integers. Previously we cast this down to "char" and lost some information. I recently added an assert that would detect duplicate short character options which was firing during the test suite. This fix does the following: - make sure all short options are treated as "int" - make sure that short options can be non-printable values when a short option is not required or when an option group is mixed into many commands and a short option is not desired - fix the help printing to "do the right thing" in all cases. Previously if there were duplicate short character options, it would just not emit help for the duplicates - fix option parsing when there are duplicates to parse options correctly. Previously the option parsing, when done for an OptionGroup, would just start parsing options incorrectly by omitting table entries and it would end up setting the wrong option value llvm-svn: 169189
* Add a new option to the test driver, -N dsym or -N dwarf, in order to ↵Johnny Chen2012-04-061-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | exclude tests decorated with either @dsym_test or @dwarf_test to be executed during the testsuite run. There are still lots of Test*.py files which have not been decorated with the new decorator. An example: # From TestMyFirstWatchpoint.py -> class HelloWatchpointTestCase(TestBase): mydir = os.path.join("functionalities", "watchpoint", "hello_watchpoint") @dsym_test def test_hello_watchpoint_with_dsym_using_watchpoint_set(self): """Test a simple sequence of watchpoint creation and watchpoint hit.""" self.buildDsym(dictionary=self.d) self.setTearDownCleanup(dictionary=self.d) self.hello_watchpoint() @dwarf_test def test_hello_watchpoint_with_dwarf_using_watchpoint_set(self): """Test a simple sequence of watchpoint creation and watchpoint hit.""" self.buildDwarf(dictionary=self.d) self.setTearDownCleanup(dictionary=self.d) self.hello_watchpoint() # Invocation -> [17:50:14] johnny:/Volumes/data/lldb/svn/ToT/test $ ./dotest.py -N dsym -v -p TestMyFirstWatchpoint.py LLDB build dir: /Volumes/data/lldb/svn/ToT/build/Debug LLDB-137 Path: /Volumes/data/lldb/svn/ToT URL: https://johnny@llvm.org/svn/llvm-project/lldb/trunk Repository Root: https://johnny@llvm.org/svn/llvm-project Repository UUID: 91177308-0d34-0410-b5e6-96231b3b80d8 Revision: 154133 Node Kind: directory Schedule: normal Last Changed Author: gclayton Last Changed Rev: 154109 Last Changed Date: 2012-04-05 10:43:02 -0700 (Thu, 05 Apr 2012) Session logs for test failures/errors/unexpected successes will go into directory '2012-04-05-17_50_49' Command invoked: python ./dotest.py -N dsym -v -p TestMyFirstWatchpoint.py compilers=['clang'] Configuration: arch=x86_64 compiler=clang ---------------------------------------------------------------------- Collected 2 tests 1: test_hello_watchpoint_with_dsym_using_watchpoint_set (TestMyFirstWatchpoint.HelloWatchpointTestCase) Test a simple sequence of watchpoint creation and watchpoint hit. ... skipped 'dsym tests' 2: test_hello_watchpoint_with_dwarf_using_watchpoint_set (TestMyFirstWatchpoint.HelloWatchpointTestCase) Test a simple sequence of watchpoint creation and watchpoint hit. ... ok ---------------------------------------------------------------------- Ran 2 tests in 1.138s OK (skipped=1) Session logs for test failures/errors/unexpected successes can be found in directory '2012-04-05-17_50_49' [17:50:50] johnny:/Volumes/data/lldb/svn/ToT/test $ llvm-svn: 154154
* If we spawn an lldb process for test (via pexpect), do not load the init ↵Johnny Chen2011-10-071-1/+1
| | | | | | | | | file unless told otherwise. Set up self.lldbOption to be "--no-lldbibit" unless env variable NO_LLDBIBIT is defined and equals "NO". Also add "-nx" to gdb spawned. llvm-svn: 141384
* Fix a problem where the stop-hook command 'frame variable g_val' produces ↵Johnny Chen2011-10-051-0/+74
nothing when newly created threads were subsequently stopped due to breakpoint hit. The stop-hook mechanism delegates to CommandInterpreter::HandleCommands() to execuet the commands. Make sure the execution context is switched only once at the beginning of HandleCommands() only and don't update the context while looping on each individual command to be executed. rdar://problem/10228156 llvm-svn: 141144
OpenPOWER on IntegriCloud