summaryrefslogtreecommitdiffstats
path: root/lldb/test/functionalities/inferior-crashing/recursive-inferior/TestRecursiveInferior.py
Commit message (Collapse)AuthorAgeFilesLines
* Move lldb/test to lldb/packages/Python/lldbsuite/test.Zachary Turner2015-10-281-219/+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
* Convert deprecated unittest method names.Zachary Turner2015-10-261-1/+1
| | | | | | | Plural methods were long deprecated, and in Python 3 they are gone. Convert to the actual supported method names. llvm-svn: 251303
* Fix usages of range() and xrange() for Python 3.Zachary Turner2015-10-261-1/+1
| | | | llvm-svn: 251302
* 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-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-7/+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-49/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Re-enable FreeBSD tests do not hang locallyEd Maste2015-09-251-1/+1
| | | | | | | | | These tests used to hang on the old FreeBSD buildbot, which has been retired. They do not hang when run locally, but do fail. llvm.org/pr24939 llvm-svn: 248577
* Remove expectedFailureFreeBSD from passing testsEd Maste2015-09-221-1/+0
| | | | | | | | | These two tests are skipped on Linux with a comment that the behaviour is as expected, but they are consistently passing on FreeBSD now. llvm.org/pr15989 llvm-svn: 248271
* XFAIL step after crash tests on android-aarch64 API 21Tamas Berghammer2015-09-171-0/+1
| | | | | | | Android-aarch64 for API21 uses sa_restore to return from a signal handler what have no eh_frame specified. llvm-svn: 247879
* XFAIL miscellaneous tests on windows.Zachary Turner2015-09-111-0/+7
| | | | | | llvm.org/pr24778 llvm-svn: 247460
* Reversed r238363, because the message is inconsistentSean Callanan2015-07-011-6/+6
| | | | | | with all the other assertion messages. llvm-svn: 241212
* Enable TestInferiorCrashing and TestRecursiveInferior on androidPavel Labath2015-06-251-1/+3
| | | | | | | | | | | | | | | | | Summary: the original bug was fixed (a rogue breakpoint messing up inferior data structures) and the tests seems to pass now. Since android has a default SEGV handler, I have had to alter the test expectation in this case. Test Plan: Tests pass on android arm. Reviewers: tberghammer Subscribers: tberghammer, aemerson, lldb-commits Differential Revision: http://reviews.llvm.org/D10733 llvm-svn: 240638
* XFAIL additional signal vs exception tests failing on FreeBSDEd Maste2015-05-291-0/+1
| | | | | | | | We need to apply to FreeBSD a change equivalent to r238549. llvm.org/pr23699 llvm-svn: 238616
* XFAIL two tests for androidPavel Labath2015-05-291-0/+1
| | | | | | bug #23694 llvm-svn: 238558
* Report inferior SIGSEGV as a signal instead of an exception on linuxPavel Labath2015-05-291-20/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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-6/+6
| | | | | | | | | | | | | | | | | | | | | 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
* Uses the target platform to determine the platform context.Robert Flack2015-04-171-1/+1
| | | | | | | | | | | | | | | Uses the target platform to determine the platform context to use. This fixes an early failure in some tests when running on a different remote target. Test Plan: ./dotest.py $DOTEST_OPTS -t -p TestGlobalVariables.py|TestSharedLib.py Running on macosx -> linux, this fails at a later stage in the test - rather than in registerSharedLibrariesWithTarget looking for a library without the correct "lib" prefix and ".so" suffix. Differential Revision: http://reviews.llvm.org/D9047 llvm-svn: 235164
* TestRecursiveInferior fixed on LinuxVince Harron2015-04-031-4/+4
| | | | | | | | | | | | | | | | | Summary: Updated test to reflect that Linux and Darwin behave the same now. Removed @expectedFailureLinux for passing tests. Test Plan: run tests Reviewers: clayborg, sivachandra Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D8678 llvm-svn: 233989
* Many many test failures after some recent changes. The problem is ↵Greg Clayton2015-04-021-3/+3
| | | | | | | | | | | | | | | | lldbtest.getPlatform() returns the "OS" of the selected platform's triple. This is "macosx" for desktop macosx and "ios" for iOS. It used to be "darwin". There was a lot of code that was checking "if self.getPlatform() == 'darwin'" which is not correct. I fixed this by adding a: lldbtest.platformIsDarwin() which returns true if the current platform's OS is "macosx", "ios" or "darwin". These three valid darwin are now returned by a static function: lldbtest.getDarwinOSTriples() Fixed up all places that has 'if self.getPlatform() == "darwin":' with "if self.platformIsDarwin()" and all instances of 'if self.getPlatform() != "darwin":' with "if not self.platformIsDarwin()". I also fixed some darwin decorator functions to do the right thing as well. llvm-svn: 233933
* Fix test expectation for aarch64 in several test caseTamas Berghammer2015-04-021-5/+3
| | | | | | | | | | | | These test cases check if they are able to read registers after the inferior is crashed. Previously they did it with reading the eax register what is only available on i386 and x86_64. Thic CL add code to do the check based on the target architecture (currently i386, x86_64 and aarch64 is supported) Differential revision: http://reviews.llvm.org/D8702 llvm-svn: 233907
* Update sys.platform switched behavior in tests to use self.getPlatform ↵Robert Flack2015-04-011-3/+3
| | | | | | | | | | | | | | | | | | | | | | (remote target platform) Uses target platform when determining which platform specific behavior to use or expect in tests. TestHelp.py was unchanged because this is asserting behavior of the local lldb binary. Test Plan: Run tests on different remote os. Several previously failing tests now pass: TestArrayTypes.py TestInferiorChanged.py TestInferiorCrashing.py TestIvarProtocols.py TestProcessIO.py TestPublicAPIHeaders.py TestRecursiveInferior.py Differential Revision: http://reviews.llvm.org/D8747 llvm-svn: 233805
* Replace sys.platform skips in tests with @skip decorators which check ↵Robert Flack2015-03-301-6/+6
| | | | | | | | | | | | | | | | 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
* Fixed up intermittently failing tests to skip on Linux.Todd Fiala2014-03-251-1/+3
| | | | | | | | | | | Also added 'import sys' on some tests that are using non-standard unittest2.skipUnless blocks with code that is intended to do things that we have more specializes @* attributes for. These skip conditions were failing to execute due to missing import, causing darwin-only tests to run on Linux regardless. Will file a bug for that separately. llvm-svn: 204747
* Stop skipping test on FreeBSD that no longer failsEd Maste2014-02-221-1/+0
| | | | | | llvm.org/pr17232 llvm-svn: 201928
* 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-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
* Remove annotations for pr17184 (now fixed)Ed Maste2013-11-141-2/+0
| | | | | | | This failure was due to a limitation in the FreeBSD kernel that has now been addressed. (llvm.org/pr17226 has the details.) llvm-svn: 194731
* Mark two FreeBSD tests failing due to llvm.org/pr15989Ed Maste2013-11-141-1/+1
| | | | | | | After solving llvm.org/pr17226 these two tests now fail for the same reason they do on Linux. llvm-svn: 194726
* Fix this test to be consistent in whether a process will or will not be thereEnrico Granata2013-10-311-2/+2
| | | | llvm-svn: 193827
* Fix the partial backtrace in a recursive inferior compiled with ↵Ashok Thirumurthi2013-09-261-2/+1
| | | | | | | | | | | | -fomit-frame-pointer. - Removes the block in UnwindLLDB::AddOneMoreFrame that tests for a bad stack setup, since it is neither correct (tests the FP GPR), complete (doesn't consider multi-frame cycles), nor reachable (the construction of RegisterContextLLDB will fail in the case where either of the two (why just two?) previous frames have the same canonical frame address as the frame that we propose adding to the stack). llvm-svn: 191430
* Skip tests that segfault or are inconsistent on FreeBSDEd Maste2013-09-131-0/+1
| | | | | | | | | | | | | I now see no unexpected failures on FreeBSD on a local run of the test suite. llvm.org/pr17214 llvm.org/pr17225 llvm.org/pr17231 llvm.org/pr17232 llvm.org/pr17233 llvm-svn: 190709
* test: Add @expectedFailureFreeBSD decoratorsEd Maste2013-09-101-0/+3
| | | | | | llvm.org/pr17184 expression interpreter fails for crash/assert tests llvm-svn: 190416
* Fixing a problem with inferior exit caused by signalAndrew Kaylor2013-09-041-1/+0
| | | | llvm-svn: 189953
* Skip two tests that hang the FreeBSD buildbotEd Maste2013-08-301-0/+1
| | | | | | llvm.org/pr16684 llvm-svn: 189679
* Skipping two tests that hang consistently on Linux while investigating the ↵Ashok Thirumurthi2013-08-301-0/+1
| | | | | | issue in more depth. llvm-svn: 189678
* Adding a test case for pr15415 - partial backtrace with -fomit-frame-pointerAshok Thirumurthi2013-06-061-0/+242
that is patterned after its parent TestInferiorCrashing.py. - The xfail decorator limits the xfail to tool-chains that support this compiler option. - Included a TODO concerning the platform-specific behavior when 'next' is issued after a crash. - Toggling -fomit-frame-pointer results in an xpass as mentioned in pr15415. Thanks to Daniel for the review, and Samuel for the bug report and reproducer. llvm-svn: 183434
OpenPOWER on IntegriCloud