summaryrefslogtreecommitdiff
path: root/lldb/test/python_api
AgeCommit message (Collapse)Author
2015-10-28Move lldb/test to lldb/packages/Python/lldbsuite/test.Zachary Turner
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
2015-10-28Changes for Bug 17384Ravitheja Addepally
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
2015-10-27Rename `lldb_shared` to `use_lldb_suite`.Zachary Turner
llvm-svn: 251444
2015-10-26Python3 - Change sys.maxint to sys.maxsize.Zachary Turner
Python3 has no analogue to sys.maxint since ints in Python 3 have arbitrary size. However, the distinction was not actually important in any of these cases, and in a few cases using maxint was already a bug to begin with. llvm-svn: 251306
2015-10-26Convert `long` to `int`, and portably detect all integral types.Zachary Turner
llvm-svn: 251305
2015-10-26Convert deprecated unittest method names.Zachary Turner
Plural methods were long deprecated, and in Python 3 they are gone. Convert to the actual supported method names. llvm-svn: 251303
2015-10-26Port the python api decorator to use test categoriesPavel Labath
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
2015-10-23Add from __future__ import print_function everywhere.Zachary Turner
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
2015-10-22Update every test to import `lldb_shared`.Zachary Turner
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
2015-10-21Use six to portably handle module renames in Python 2 and 3Zachary Turner
llvm-svn: 250915
2015-10-16Skip hanging watchpoint test on Windows (rather than just xfailing).Adrian McCarthy
llvm-svn: 250576
2015-10-13Fix TestTargetAPI.py test for users who use Swig 3.0.5 or greater.Adrian McCarthy
DifferentialRevision: http://reviews.llvm.org/D13679 llvm-svn: 250188
2015-10-05[LLDB][MIPS] Skip invalid size watchpoint testcase for MIPSMohit K. Bhakkad
Reviewers: jaydeep. Subscribers: lldb-commits. Differential Revision: http://reviews.llvm.org/D13335 llvm-svn: 249299
2015-09-30Merge dwarf and dsym testsTamas Berghammer
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
2015-09-23Remove expectedFailureFreeBSD from passing TestChangeValueAPI testEd Maste
This test used fail intermittently, but now passes consistently on FreeBSD in local runs. We'll investigate further if it's intermittent on the FreeBSD buildbot, once it's restored. llvm.org/pr15039 llvm-svn: 248410
2015-09-22Remove expectedFailureFreeBSD from passing testEd Maste
HelloWorldTestCase::test_with_dwarf_and_process_launch_api passes consistently for me and for John Wolfe. llvm.org/pr21620 llvm-svn: 248269
2015-09-16Last set of XFAILs for Windows.Zachary Turner
llvm-svn: 247825
2015-09-14Marked TestEvents test as flakey on Linux.Todd Fiala
It's passing all the time for me (50/50), and was passing what looks like 9/10 times for the originator. llvm-svn: 247639
2015-09-14Fixes lldb-server commandline test xpass for OS X and Linux; resolves ↵Todd Fiala
llvm.org/pr20273 llvm-svn: 247605
2015-09-14Remove expectedFailureFreeBSD from passing test_with_dwarf_formatters_apiEd Maste
llvm.org/pr24282 llvm-svn: 247563
2015-09-11XFAIL miscellaneous tests on windows.Zachary Turner
llvm.org/pr24778 llvm-svn: 247460
2015-09-11XFAIL some more tests related to value apiZachary Turner
llvm.org/pr24772 llvm-svn: 247458
2015-09-08Exception registers aren't supported outside of DarwinEd Maste
Apply test update from r234992 to FreeBSD llvm-svn: 247009
2015-09-02XFAIL more watchpoint tests on Windows.Zachary Turner
llvm.org/pr24446 llvm-svn: 246725
2015-09-01XFAIL TestHelloWorld on Windows.Zachary Turner
https://llvm.org/pr24600 llvm-svn: 246569
2015-08-26Skip test which is causing ERRORs in dotest.py after r237053Dawn Perchik
This test runs fine on its own, but leaves python in a bad state to where all tests that run after it error out. See llvm.org/pr24575. This resolves the concerns raised in http://reviews.llvm.org/rL237053. Reviewed by: clayborg, ted Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D12329 llvm-svn: 246043
2015-08-18[ValueObjectSynthetic and ValueObjectDynamicValue] Override GetDeclarationSiva Chandra
Summary: Returns the declaration of the parent (non-synthetic or static) value. Reviewers: granata.enrico, clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D12092 llvm-svn: 245319
2015-08-13Remove Unicode byte-order mark from python files.Zachary Turner
This was caused by a bug in the PTVS source file editor, which has since been fixed and awaiting a new release. For now people using this editor need to remember to manually remove this before committing a file. llvm-svn: 244963
2015-08-13XFAIL Watchpoint tests on Windows.Zachary Turner
https://llvm.org/pr24446 tracks getting these tests re-enabled. llvm-svn: 244950
2015-07-27XFAIL test_with_dwarf_formatters_api on FreeBSDEd Maste
llvm.org/pr24282 llvm-svn: 243309
2015-07-24Add option eTypeOptionHideEmptyAggregates.Siva Chandra
Summary: For certain data structures, when the synthetic child provider returns zero children, a summary like "Empty instance of <typename>" could be more appropriate than something like "size=0 {}". This new option helps hide the trailing "{}". This is also exposed with a -h option for the command "type summary add". Reviewers: granata.enrico Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D11473 llvm-svn: 243166
2015-07-22XFAIL watchpoint tests on Android arm/aarch64Tamas Berghammer
Differential revision: http://reviews.llvm.org/D11409 llvm-svn: 242887
2015-07-22Fix typos.Bruce Mitchener
Summary: Fix a bunch of typos. Reviewers: clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D11386 llvm-svn: 242856
2015-07-16Add a class ValueObjectConstResultCast.Siva Chandra
Summary: Other changes around the main change include: 1. Add a method Cast to ValueObjectConstResult, ValueObjectConstResultImpl and ValueObjectConstResultChild. 2. Add an argument |live_address| of type lldb::addr_t to the constructor of ValueObjectConstResultChild. This is passed on to the backing ValueObjectConstResultImpl object constructor so that the address of the child value can be calculated properly. Reviewers: granata.enrico, clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D11203 llvm-svn: 242374
2015-07-01Reversed r238363, because the message is inconsistentSean Callanan
with all the other assertion messages. llvm-svn: 241212
2015-07-01[Python] Allow PyLong values in integer lists (when converting to C lists)Siva Chandra
Test Plan: dotest.py -p TestSBData Reviewers: clayborg, granata.enrico Reviewed By: clayborg, granata.enrico Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D10821 llvm-svn: 241208
2015-06-26Add test for SBValue.GetNonSyntheticValue in presence of synth provider.Siva Chandra
Test Plan: dotest.py -p TestFormattersSBAPI Reviewers: granata.enrico Reviewed By: granata.enrico Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D10783 llvm-svn: 240861
2015-06-26Added expectedFlakey test decoratorVince Harron
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
2015-06-25Update TestPrintStackTraces XFAIL once morePavel Labath
it seems the failure happens also with clang. The main thing which triggers the failure is architecture. llvm-svn: 240652
2015-06-25Fix TestThreadAPI on LinuxTamas Berghammer
On Linux malloc calls itself in some case. Change the test case to handle this scenario. llvm-svn: 240651
2015-06-25Make XFAIL on TestPrintStackTraces more specificPavel Labath
the thread creation failure was fixed, but a backtracing problem remains in some situations. llvm-svn: 240635
2015-06-18Fix a variety of typos.Bruce Mitchener
No functional change. llvm-svn: 239995
2015-06-06Fix TestAttachDenied and TestChangeProcessGroup for remote Windows to Android.Chaoren Lin
Summary: Updated `append_to_remote_wd` to work for both remote and local. Reviewers: clayborg, ovyalov Reviewed By: ovyalov Subscribers: tberghammer, lldb-commits Differential Revision: http://reviews.llvm.org/D10288 llvm-svn: 239203
2015-06-02Un-enable TestEvents test on linuxPavel Labath
Test still seems to fail about 1/10 runs. Skipping the test, but it a more greppable fashion. llvm-svn: 238826
2015-06-02Enable TestEvents test on linuxPavel Labath
This test was very inconspicuosly skipped on linux, when it was crashing for local debugging. It seems to work fine with LLGS, so I'm enabling it. llvm-svn: 238816
2015-05-27[TestBase.runCmd] Better error message when runCmd fails.Siva Chandra
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
2015-05-21[TestChangeValueAPI] Remove expectedFailureGcc decorator.Siva Chandra
Test Plan: dotest.py -C <clang|gcc> -p TestChangeValueAPI Reviewers: vharron Reviewed By: vharron Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D9116 llvm-svn: 237927
2015-05-21Add bug number for TestEventsTamas Berghammer
llvm-svn: 237904
2015-05-21XFAIL TestEvents on Linux bacuse it is flakyTamas Berghammer
llvm-svn: 237888
2015-05-12Added minor commentVince Harron
llvm-svn: 237174