summaryrefslogtreecommitdiffstats
path: root/lldb/test/functionalities/inferior-assert/TestInferiorAssert.py
Commit message (Collapse)AuthorAgeFilesLines
* Move lldb/test to lldb/packages/Python/lldbsuite/test.Zachary Turner2015-10-281-247/+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
* Changes for Bug 17384Ravitheja Addepally2015-10-281-4/+9
| | | | | | | | | | | | | | | | | | | | | | | Summary: Virtual dynamic shared objects, or vdso files were not loaded for Linux OS.In Bug 17384 the call stack could not be unwinded from functions residing in the vdso object. This commit adds support for loading such files by reading the Aux vectors since a vdso is invisibily mapped to the inferiors address space and the actual file is not present in the filesystem. The presence of the vdso is detected by inspecting the Aux vector for AT_SYSINFO_EHDR tag. Reviewers: lldb-commits, ovyalov, tberghammer Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D14118 llvm-svn: 251505
* Rename `lldb_shared` to `use_lldb_suite`.Zachary Turner2015-10-271-1/+1
| | | | llvm-svn: 251444
* Fix usages of range() and xrange() for Python 3.Zachary Turner2015-10-261-2/+2
| | | | 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-1/+3
| | | | | | | | | | | | | 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
* Change expected stop reason in TestInferiorAssert for Android API <= 16Tamas Berghammer2015-10-021-1/+5
| | | | llvm-svn: 249120
* Merge dwarf and dsym testsTamas Berghammer2015-09-301-34/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Removed XFAIL marker from passing tests, rdars 18684124, 15367233Todd Fiala2015-09-141-6/+0
| | | | | | | | Related to these two test case classes: test/driver/batch_mode/TestBatchMode.py test/functionalities/inferior-assert/TestInferiorAssert.py llvm-svn: 247567
* Remove expectedFailureFreeBSD from passing test_inferior_asserting_disassembleEd Maste2015-09-141-1/+0
| | | | | | llvm.org/pr18533 llvm-svn: 247564
* XFAIL TestInferiorAssert for Android API <= 16.Chaoren Lin2015-08-031-0/+1
| | | | llvm-svn: 243922
* Reversed r238363, because the message is inconsistentSean Callanan2015-07-011-4/+4
| | | | | | with all the other assertion messages. llvm-svn: 241212
* [TestBase.runCmd] Better error message when runCmd fails.Siva Chandra2015-05-271-4/+4
| | | | | | | | | | | | | | | | | | | | | 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
* Fix test expectation for aarch64 in several test caseTamas Berghammer2015-04-021-3/+2
| | | | | | | | | | | | 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
* Enabled a bunch of tests on LinuxVince Harron2015-03-311-1/+0
| | | | | | | | | Removed expectedFailureLinux from failures that I was unable to reproduce, updated and improved some other comments near XFAIL tests Differential Revision: http://reviews.llvm.org/D8676 llvm-svn: 233716
* Replace sys.platform skips in tests with @skip decorators which check ↵Robert Flack2015-03-301-4/+4
| | | | | | | | | | | | | | | | 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
* Change the default disassembly format again. First attempt atJason Molenda2015-02-131-1/+1
| | | | | | | | | | | | | | | | changing it was in r219544 - after living on that for a few months, I wanted to take another crack at this. The disassembly-format setting still exists and the old format can be user specified with a setting like ${current-pc-arrow}${addr-file-or-load}{ <${function.name-without-args}${function.concrete-only-addr-offset-no-padding}>}: This patch was discussed in http://reviews.llvm.org/D7578 <rdar://problem/19726421> llvm-svn: 229186
* [TestInferiorAssert] Differentiate DWARF and DSYM tests with suffixes.Siva Chandra2015-01-101-4/+4
| | | | | | | | | | | | Reviewers: vharron, clayborg Reviewed By: clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D6907 llvm-svn: 225564
* XFAIL all of TestInferiorAssert.py tests on Windows.Zachary Turner2014-12-091-0/+6
| | | | | | | | | | | | | | Getting this working correctly is a significant amount of work. Assertions on Windows show up as error code 0xC0000409, which is STATUS_STACK_BUFFER_OVERRUN. In order to accurately determine that this is not just any stack buffer overrun, but one triggered by a call to abort, we would need to analyze the call stack. This in turn requires better symbol support for Windows executables, and work on LLDB to make stack frames better on Windows. For now, these are XFAIL'ed and tracked in http://llvm.org/pr21793. llvm-svn: 223816
* Making all @expectedFailure markers take an explicit bugnumber annotation. ↵Enrico Granata2014-10-171-6/+6
| | | | | | This used to be optional, but that makes it harder to track what tests are failing for what reason. So, make it mandatory, in the form of refusing to run the test suite if annotations are missing llvm-svn: 220012
* Add a new disassembly-format specification so that the disassemblerJason Molenda2014-10-101-2/+5
| | | | | | | | | | | | | | | | | | | | | output style can be customized. Change the built-in default to be more similar to gdb's disassembly formatting. The disassembly-format for a gdb-like output is ${addr-file-or-load} <${function.name-without-args}${function.concrete-only-addr-offset-no-padding}>: The disassembly-format for the lldb style output is {${function.initial-function}{${module.file.basename}`}{${function.name-without-args}}:\n}{${function.changed}\n{${module.file.basename}`}{${function.name-without-args}}:\n}{${current-pc-arrow} }{${addr-file-or-load}}: The two backticks in the lldb style formatter triggers the sub-expression evaluation in CommandInterpreter::PreprocessCommand() so you can't use that one as-is ... changing to use ' characters instead of ` would work around that. <rdar://problem/9885398> llvm-svn: 219544
* Switch to Darwin decorator for tests that XPASS on FreeBSDEd Maste2014-04-221-2/+2
| | | | | | | | | | | Since these tests pass on (at least some) other platforms, change the decorators to @expectedFailureDwarwin. Tested on FreeBSD with Clang 3.4 and libc++. rdar://9980907 rdar://15367233 llvm-svn: 206895
* Add a comment to tests that XPASS on FreeBSDEd Maste2014-04-211-2/+2
| | | | | | | | | | | | | | Perhaps these should be @expectedFailureDarwin instead of @unittest2.expectedFailure (applying to all hosts); I'm not aware of the details in the rdars. Just add a comment for now, for the benefit of anyone investigating FreeBSD test issues in the future. rdar://9980907 rdar://15367233 llvm-svn: 206760
* Fix for failure to unwind Linux stack frames with call in final position.Todd Fiala2014-02-011-0/+1
| | | | | | | | | | | | | | | Fixes http://llvm.org/bugs/show_bug.cgi?id=18656. Note this exposes a failure on Linux of TestInferiorAssert.test_inferior_asserting_disassemble, similar to how it fails on FreeBSD. I'll file a bug for this next. We're now getting another frame beyond where we used to prior to this fix, so the fix is exposing failures in previosly not-reachable frames. Much thanks to Jason Molenda, who had much to do with helping figure out where unwinding was breaking. llvm-svn: 200600
* Add decorator for failing FreeBSD testEd Maste2014-01-181-0/+1
| | | | llvm-svn: 199551
* Fixed the assertion test case.Greg Clayton2014-01-101-2/+6
| | | | llvm-svn: 198962
* Correctly set the working directory when launching processes for both local ↵Greg Clayton2013-12-131-4/+4
| | | | | | 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-1/+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
* Another instance of the same test failingEnrico Granata2013-10-311-0/+2
| | | | llvm-svn: 193826
* Another instance of the same test failingEnrico Granata2013-10-311-0/+2
| | | | llvm-svn: 193825
* Mark this as an expected failureEnrico Granata2013-10-311-1/+3
| | | | llvm-svn: 193824
* Mark 32/64-bit tests as expected fail after root causing and referencing ↵Matt Kopec2013-09-261-0/+4
| | | | | | | | bugzilla. Fix TestFrames.py error to check against a None pc value. llvm-svn: 191470
* Fix an xpass on the buildbots by relaxing a test for PC location in the ↵Ashok Thirumurthi2013-09-241-2/+2
| | | | | | disassembly. llvm-svn: 191321
* Adds an option to resolve a symbol from an address that can be usedAshok Thirumurthi2013-09-241-3/+1
| | | | | | | | | | | | | | | | | to build out the symbol table as addresses are used, and implements the mechanism for ELF to add stripped symbols from eh_frame. Uses this mechanism to allow disassembly for addresses corresponding to stripped symbols for ELF, and provide hooks to implement this for PE COFF. Also removes eSymbolContextTailCall in favor of an option for ResolveSymbolContextForAddress for consistency with the documentation for eSymbolContextEverything. Essentially, this is just an option for interpreting the so_addr. llvm-svn: 191307
* Fix lldb regressions due to r190812 in the case where debug info is present.Ashok Thirumurthi2013-09-201-7/+2
| | | | | | | | | | | | Specifically, allows the unwinder to handle the case where sc.function gets resolved with a pc that is one past the address range of the function (consistent with a tail call). However, there is no matching symbol. Adds eSymbolContextTailCall to provide callers with control over the scope of symbol resolution and to allow ResolveSymbolContextForAddress to handle tail calls since this routine is common to unwind and disassembly. llvm-svn: 191102
* Disable TestInferiorAssert (due to llvm.org/pr17276)Daniel Malea2013-09-191-2/+7
| | | | | | - last remaining failure on the clang buildbot llvm-svn: 191047
* test: Update FreeBSD failure decoratorsEd Maste2013-09-131-1/+2
| | | | | | | | | | | | | | | llvm.org/pr15261 missing size for static arrays llvm.org/pr15278 expressions generating signals llvm.org/pr15824 thread states aren't properly maintained llvm.org/pr16696 threaded inferior debugging not yet on FreeBSD llvm.org/pr17214 inline stepping fails on FreeBSD llvm.org/pr17225 Clang assertion failure llvm.org/pr17226 frame info lost after failed expression evaluation llvm.org/pr17228 test timeout The first three are existing Linux issues that also affect FreeBSD. llvm-svn: 190698
* test: Add @expectedFailureFreeBSD decoratorsEd Maste2013-09-101-0/+1
| | | | | | llvm.org/pr17184 expression interpreter fails for crash/assert tests llvm-svn: 190416
* Adds a test for "disassemble -a" after an assert, which can fail with ELFAshok Thirumurthi2013-07-231-0/+34
| | | | | | because a synthetic symbol hasn't been provided for stripped function symbols. llvm-svn: 186959
* Fix the partial backtrace when using a combination of stripped function symbolsAshok Thirumurthi2013-07-181-6/+0
| | | | | | | | | | | | | | and -fomit-frame-pointer. - Parses eh_frame FDEs to determine the function address and size so that the call frame parsing can continue. Note: This code path is specific to ELF and PECOFF, because ObjectFileMachO uses LCT_FunctionStarts to efficiently populate the symbol table. Thanks to Jason Molenda for the review! llvm-svn: 186585
* Avoided the use of two test decorators with xfail/xpass logic in the same test.Ashok Thirumurthi2013-05-171-6/+6
| | | | | | - Used xfail and skip, temporarily, while resolving bugzilla #15671. llvm-svn: 182159
* Fix xpasses on the gcc buildbots using compiler versions to qualify the xfail.Ashok Thirumurthi2013-05-171-3/+6
| | | | | | | | | | - Note that this is not correct, as the failure is associated with build options of libc.so, however it's failing on a Debian buildbot that uses gcc 4.6.2 (and the real goal is a complete backtrace even with -fomit-frame-pointer). - Adds helpers to lldbtest.py to check the expectedCompiler and expectedVersion, with an eventual goal of reducing the number of test decorators. --- Currently allows a comparison operator and a compiler version to be specified. --- Can be extended to support ranges of compiler versions. llvm-svn: 182155
* Adds a test case for bugzilla #15671 patterned after TestInferiorCrashing.py.Ashok Thirumurthi2013-05-171-0/+218
- On Linux, the partial back-trace after an assert can cause the basic test to fail as discussed on lldb-dev. - Uses SBFrame to walk up the stack to the assert site and tests expression evaluation of locals, globals and arguments. Thanks to Daniel for review and testing on OS/X. llvm-svn: 182115
OpenPOWER on IntegriCloud