summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test/python_api
Commit message (Collapse)AuthorAgeFilesLines
* Ah, only skip this for embedded darwin targets.Jason Molenda2019-09-111-1/+1
| | | | llvm-svn: 371583
* Skip a test in TestProcessIO.py when running against ios devices.Jason Molenda2019-09-111-0/+1
| | | | llvm-svn: 371582
* [Windows] Add support of watchpoints to `ProcessWindows`Aleksandr Urakov2019-09-066-16/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch adds support of watchpoints to the old `ProcessWindows` plugin. The `ProcessWindows` plugin uses the `RegisterContext` to set and reset watchpoints. The `RegisterContext` has some interface to access watchpoints, but it is very limited (e.g. it is impossible to retrieve the last triggered watchpoint with it), that's why I have implemented a slightly different interface in the `RegisterContextWindows`. Moreover, I have made the `ProcessWindows` plugin responsible for search of a vacant watchpoint slot, because watchpoints exist per-process (not per-thread), then we can place the same watchpoint in the same slot in different threads. With this scheme threads don't need to have their own watchpoint lists, and it simplifies identifying of the last triggered watchpoint. Reviewers: asmith, stella.stamenova, amccarth Reviewed By: amccarth Subscribers: labath, zturner, leonid.mashinskiy, abidh, JDevlieghere, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D67168 llvm-svn: 371166
* [dotest] Delete trivial inline test makefilesPavel Labath2019-09-051-3/+0
| | | | | | inline tests are able to generate these automatically llvm-svn: 371015
* [Python] Implement __next__ for value_iterJonas Devlieghere2019-09-041-0/+7
| | | | | | | | | Python 3 iteration calls the next() method instead of next() and value_iter only implemented the Python 2 version. Differential revision: https://reviews.llvm.org/D67184 llvm-svn: 370954
* [Python] Implement truth testing for lldb.valueJonas Devlieghere2019-09-041-0/+4
| | | | | | | | | Python 3 calls __bool__() instead of __len__() and lldb.value only implemented the __len__ method. This adds the __bool__() implementation. Differential revision: https://reviews.llvm.org/D67183 llvm-svn: 370953
* [dotest] Avoid the need for LEVEL= makefile boilerplatePavel Labath2019-09-0439-116/+39
| | | | | | | | | | | | | | | | | | | | | | | Summary: Instead of each test case knowing its depth relative to the test root, we can just have dotest add the folder containing Makefile.rules to the include path. This was motivated by r370616, though I have been wanting to do this ever since we moved to building tests out-of-tree. The only manually modified files in this patch are lldbinline.py and plugins/builder_base.py. The rest of the patch has been produced by this shell command: find . \( -name Makefile -o -name '*.mk' \) -exec sed --in-place -e '/LEVEL *:\?=/d' -e '1,2{/^$/d}' -e 's,\$(LEVEL)/,,' {} + Reviewers: teemperor, aprantl, espindola, jfb Subscribers: emaste, javed.absar, arichardson, christof, arphaman, lldb-commits Differential Revision: https://reviews.llvm.org/D67083 llvm-svn: 370845
* [API] Have SBCommandReturnObject::GetOutput/Error return "" instead of nullptrPavel Labath2019-08-141-0/+17
| | | | | | | | | | | | | | | | | | | | | | | Summary: It seems this was an unintended side-effect of D26698. AFAICT, these functions did return an empty string before that patch, and the patch contained code which attempted to ensure that, but those efforts were negated by ConstString::AsCString, which by default returns a nullptr even for empty strings. This patch: - fixes the GetOutput/Error methods to really return empty strings - adds and explicit test for that - removes a workaround in lldbtest.py, which was masking this problem from our other tests Reviewers: jingham, clayborg Subscribers: zturner, lldb-commits Differential Revision: https://reviews.llvm.org/D65739 llvm-svn: 368806
* [lldb][NFC] Remove unused imports in python testsRaphael Isemann2019-08-0274-146/+0
| | | | llvm-svn: 367663
* Fix `skipIfSanitized` decorator on macOSJonas Devlieghere2019-08-011-1/+1
| | | | | | | | | | | For security reasons, DYLD_INSERT_LIBRARIES is not propagated to a child process. This breaks the skipIfSanitized decorator, which checks for the environment variable being set. Instead, always set the ASAN_OPTIONS and make the decorator check for that. Differential revision: https://reviews.llvm.org/D65594 llvm-svn: 367595
* [lldb] [test] Mark newly running test XFAIL on NetBSDMichal Gorny2019-07-301-0/+1
| | | | | | | | The test was not previously run due to decorator bug (fixed in r366903). It is not a regression and is probably related to the other failing test, so just disable it. llvm-svn: 367285
* [lldb][test_suite] Update tests with unexpected pass on Android aarch64Alex Langford2019-07-231-0/+1
| | | | | | | | | | Summary: update some test decorates that can actually pass on andriod aarch64 Patch by Wanyi Ye <kusmour@gmail.com> Differential Revision: https://reviews.llvm.org/D64767 llvm-svn: 366858
* [lldb] [test] Un-XFAIL TestFormattersSBAPI on NetBSDMichal Gorny2019-07-131-1/+0
| | | | llvm-svn: 365991
* [lldb] [test] Update NetBSD XFAILs in test suiteMichal Gorny2019-07-085-4/+1
| | | | llvm-svn: 365338
* [lldb] [lldbsuite] Use a unique class name for TestValueVarUpdateStella Stamenova2019-07-011-1/+1
| | | | | | It looks like when this test was added, it was based on TestHelloWorld and it ended up with the same class name. This is an issue because the logs associated with the tests use the class name as the identifier for the file and if two tests have the same name their logs overwrite each other. On non-windows, this just means we lose one of the logs, but on Windows this means that one of the tests will fail occasionally because the file are locked by the other test. llvm-svn: 364860
* [ABI] Implement Windows ABI for x86_64Alex Langford2019-06-241-1/+0
| | | | | | | | | | | | | | | | | | Summary: Implement the ABI for WIndows-x86_64 including register info and calling convention. Handled nested struct returned in register (SysV doesn't have it supported) Reviewers: xiaobai, compnerd Reviewed By: compnerd Subscribers: labath, jasonmolenda, fedor.sergeev, mgorny, teemperor, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D62213 llvm-svn: 364216
* [lldb] [test] Mark frequently failing flaky tests skipped on NetBSDMichal Gorny2019-05-151-0/+2
| | | | llvm-svn: 360767
* Make SBDebugger.RunCommandInterpreter callable from Python.Jim Ingham2019-05-151-0/+38
| | | | | | | | Authored by: Lukas Boger Differential Revision: https://reviews.llvm.org/D61602 llvm-svn: 360730
* typedef enum -> enumFangrui Song2019-05-142-4/+4
| | | | | | | | Reviewed By: labath Differential Revision: https://reviews.llvm.org/D61883 llvm-svn: 360654
* Revert "Disable the step over skipping calls feature since buildbots are not ↵Pavel Labath2019-05-101-1/+0
| | | | | | | | | | | | | | | | happy." While this fixed the windows bot failures, it also broke all other bots. Upon closer inspection, it turns out that the windows bots were "broken" because two tests were unexpectedly passing -- i.e., the original patch (r360375) actually improved our stepping support on windows. So instead, I remove the relevant XFAILs. This reverts commit r360397. llvm-svn: 360407
* Another use of the interactive lldb.debugger.Jason Molenda2019-04-251-1/+1
| | | | llvm-svn: 359240
* Make TestPrintStackTraces deterministicPavel Labath2019-04-122-158/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This test contained an incredibly complicated inferior, but in reality, all it was testing was that we can backtrace up to main and see main's arguments. However, the way this was implemented (setting a breakpoint on a separate thread) meant that each time the test would run, it would stop in a different location on the main thread. Most of the time this location would be deep in some libc function, which meant that the success of this test depended on our ability to backtrace out of a random function of the c library that the user happens to have installed. This makes the test unpredictable. Backtracing out of a libc function is an important functionality, but this is not the way to test it. Often it is not even our fault that we cannot backtrace out because the C library contains a lot of assembly routines that may not have correct unwind info associated with them. For this reason the test has accumulated numerous @expectedFail/Flaky decorators. In this patch, I replace the inferior with one that does not depend on libc functions. Instead I create a couple of stack frames of user code, and have the test verify that. I also simplify the test by using lldbutil.run_to_source_breakpoint. llvm-svn: 358266
* modify-python-lldb.py: (Re)move __len__ and __iter__ supportPavel Labath2019-04-041-0/+1
| | | | | | | | | | | | | | | | Summary: This patch moves the modify-python-lldb code for adding new functions to the SBModule class into the SBModule interface file. As this is the last class using this functionality, I also remove all support for this kind of modifications from modify-python-lldb.py. Reviewers: amccarth, clayborg, jingham Subscribers: zturner, lldb-commits Differential Revision: https://reviews.llvm.org/D60195 llvm-svn: 357680
* modify-python-lldb.py: clean up __iter__ and __len__ supportPavel Labath2019-04-036-0/+13
| | | | | | | | | | | | | | | | | | | | | | | Summary: Instead of modifying the swig-generated code, just add the appropriate methods to the interface files in order to get the swig to do the generation for us. This is a straight-forward move from the python script to the interface files. The single class which has nontrivial handling in the script (SBModule) has been left for a separate patch. For the cases where I did not find any tests exercising the iteration/length methods (i.e., no tests failed after I stopped emitting them), I tried to add basic tests for that functionality. Reviewers: zturner, jingham, amccarth Subscribers: jdoerfert, lldb-commits Differential Revision: https://reviews.llvm.org/D60119 llvm-svn: 357572
* [testsuite] Remove other traces broken in python 3.Davide Italiano2019-03-131-31/+0
| | | | | | | They can be reinstated in case somebody needs to debug this test in the future. llvm-svn: 356002
* [test] Some unicode sequences can't be printed, and Py 3 is more picky.Davide Italiano2019-03-131-4/+0
| | | | | | | | Given this was under trace, it can just be removed. If somebody ever needs to debug this testcase again and print the data, they can add a new statement. llvm-svn: 355999
* [lldb] [test] Mark more tests flakey on NetBSDMichal Gorny2019-03-111-0/+1
| | | | llvm-svn: 355838
* [lldbsuite, windows] Skip the TestEvents tests on WindowsStella Stamenova2019-03-051-0/+3
| | | | | | These tests are flakey on Windows and recently they have started failing AND also hanging the whole suite when they fail. llvm-svn: 355443
* [lldb] [test] Mark failing tests XFAIL on NetBSDMichal Gorny2019-03-0412-2/+13
| | | | | | | | | | | | | | | | Add a convenience 'expectedFailureNetBSD' decorator and mark all tests currently failing on NetBSD with it. Also skip a few tests that hang the test suite. This should establish a baseline for the test suite and get us closer to enabling tests on buildbot. This will help us catch regressions while we still have a lot of work to do to get tests working. It seems that there are also some flaky tests. I am going to address them later on. Differential Revision: https://reviews.llvm.org/D58527 llvm-svn: 355320
* Embed swig version into lldb.py in a different wayPavel Labath2019-02-151-0/+28
| | | | | | | | | | | | | | | | | | | | | | | Summary: Instead of doing string chopping on the resulting python file, get swig to output the version for us. The two things which make slightly non-trivial are: - in order to get swig to expand SWIG_VERSION for us, we cannot use %pythoncode directly, but we have to go through an intermediate macro. - SWIG_VERSION is a hex number, but it's components are supposed to be interpreted decimally, so there is a bit of integer magic needed to get the right number to come out. I've tested that this approach works both with the latest (3.0.12) and oldest (1.3.40) supported swig. Reviewers: zturner, jingham, serge-sans-paille Subscribers: jdoerfert, lldb-commits Differential Revision: https://reviews.llvm.org/D58172 llvm-svn: 354104
* Update the file headers across all of the LLVM projects in the monorepoChandler Carruth2019-01-1928-112/+84
| | | | | | | | | | | | | | | | | to reflect the new license. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. llvm-svn: 351636
* [Core] Use the implementation method GetAddressOf in ValueObjectConstResultChildAleksandr Urakov2019-01-141-0/+3
| | | | | | | | | | | | | | | | | | | | Summary: This patch allows to retrieve an address object for `ValueObject`'s children retrieved through e.g. `GetChildAtIndex` or `GetChildMemberWithName`. It just uses the corresponding method of the implementation object `m_impl` to achieve that. Reviewers: zturner, JDevlieghere, clayborg, labath, serge-sans-paille Reviewed By: clayborg Subscribers: leonid.mashinskiy, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D56147 llvm-svn: 351065
* Disable a few tests on the green dragon sanitzier bot.Adrian Prantl2018-12-201-0/+1
| | | | | | | | These are tests that found actual, but hard to fix, bugs that are tracked elsewhere. Leaving them red only distracts from new failures this bot finds. llvm-svn: 349851
* [lldbsuite] Un-xfail TestEvents on WindowsStella Stamenova2018-12-201-3/+0
| | | | | | There are a couple of tests in TestEvents that are now passing. llvm-svn: 349781
* [lldbsuite] Un-xfail tests on Windows that are now passing (pt.3)Stella Stamenova2018-12-203-4/+0
| | | | | | This is a set of tests that were all marked as failing becuse of several different bugs. A couple of the bugs are now resolved as fixed since all the tests that were failing associated with the bug are now passing. It is possible that some of them are false positives, but there's a large number of unexpectedly passing tests on Windows, so I am doing a bulk un-xfail to get the buildbot to green. llvm-svn: 349711
* TestHelloWorld: Use a file on the target platform for synchronisation.Adrian Prantl2018-12-182-19/+29
| | | | | | Thanks to Pavel Labath for the idea! llvm-svn: 349550
* A few small updates to the testsuite for running against an iOS device.Jason Molenda2018-12-171-2/+0
| | | | | | | Remove the expected-fails for 34538611; using an alternate platform implementation handles these correctly. llvm-svn: 349417
* Remove sleep() synchronisation from teststcase andAdrian Prantl2018-12-171-9/+3
| | | | | | | | | | make the executable name more unique. This test is failing sporadically on some bots. By removing the sleep synchronisation, I'm hoping to get it to fail more reproducibly so I can investigate what is going on. llvm-svn: 349397
* Remove header grouping comments.Jonas Devlieghere2018-11-112-2/+2
| | | | | | | | This patch removes the comments grouping header includes. They were added after running IWYU over the LLDB codebase. However they add little value, are often outdates and burdensome to maintain. llvm-svn: 346626
* [lldbsuite, windows] Mark tests as XFAIL on Windows or skip themStella Stamenova2018-08-021-0/+1
| | | | | | | | | | | | | | Summary: 1) Several tests that are flakey on windows fail the run even if they are marked as expected to be flakey. This is because they fail frequently enough that even a retry won't help 2) Skip several tests on Windows that will occasionally hang rather than failing or exiting. This is causing the entire test suite to hang Reviewers: asmith, labath, zturner Reviewed By: zturner Differential Revision: https://reviews.llvm.org/D50198 llvm-svn: 338769
* Fix whitespace in the python test suite.Raphael Isemann2018-07-272-6/+6
| | | | | | | | | | | | | Summary: The test suite has often unnecessary trailing whitespace, and sometimes unnecessary trailing lines or a missing final new line. This patch just strips trailing whitespace/lines and adds missing newlines at the end. Subscribers: ki.stfu, JDevlieghere, christof, lldb-commits Differential Revision: https://reviews.llvm.org/D49943 llvm-svn: 338171
* Add new API to SBTarget and SBModule classes.Alexander Polyakov2018-07-032-0/+48
| | | | | | | | | | | | | | Summary: The new API allows to find a list of compile units related to target/module. Reviewers: aprantl, clayborg Reviewed By: aprantl Subscribers: jingham, lldb-commits Differential Revision: https://reviews.llvm.org/D48801 llvm-svn: 336200
* Mark this test as no debuginfoAdrian Prantl2018-06-221-1/+1
| | | | llvm-svn: 335386
* [lit, windows] Disable a number of tests that are failing on WindowsStella Stamenova2018-06-075-0/+5
| | | | | | | | | | | | | | Summary: They all correspond to bugs that are already logged and I've added the appropriate (or most appropriate) bug numbers. This leaves only a handful of failing tests. Reviewers: asmith, zturner, labath Reviewed By: zturner Subscribers: eraman, llvm-commits Differential Revision: https://reviews.llvm.org/D47892 llvm-svn: 334210
* [lit, lldbsuite] Fixes for several tests LLDB tests for Python 3 or WindowsStella Stamenova2018-05-071-0/+6
| | | | | | | | | | | | | | | | | Summary: In decorators.py, when opening streams, open them in text mode. In Py3, if they are not opened in text mode, the data is also expected to be binary, but we always use text data. In TestLinuxCore, skip the tests that are not applicable on Windows In the python api main.c, update the code to be compilable on Windows Reviewers: asmith, zturner Reviewed By: zturner Subscribers: zturner Differential Revision: https://reviews.llvm.org/D46440 llvm-svn: 331686
* Add children and child[N] properties to SBValue.i.Jim Ingham2018-05-041-1/+15
| | | | | | Also fixed some bad formatting in SBValue.i. llvm-svn: 331501
* Add and fix some tests for PPC64Pavel Labath2018-03-261-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: TestExprsChar.py Char is unsigned char by default in PowerPC. TestDisassembleBreakpoint.py Modify disassemble testcase to consider multiple architectures. TestThreadJump.py Jumping directly to the return line on PowerPC architecture dos not means returning the value that is seen on the code. The last test fails, because it needs the execution of some assembly in the beginning of the function. Avoiding this test for this architecture. TestEhFrameUnwind.py Implement func for ppc64le test case. TestWatchLocation.py TestStepOverWatchpoint.py PowerPC currently supports only one H/W watchpoint. TestDisassembleRawData.py Add PowerPC opcode and instruction for disassemble testcase. Reviewers: labath Reviewed By: labath Subscribers: davide, labath, alexandreyy, lldb-commits, luporl, lbianc Differential Revision: https://reviews.llvm.org/D44472 Patch by Alexandre Yukio Yamashita <alexandre.yamashita@eldorado.org.br>. llvm-svn: 328488
* Fix TestSBData.py on WindowsAdrian McCarthy2018-02-221-1/+1
| | | | | | | | | Ensure that the test data is an array of bytes rather than a string that gets encoded differently between Python 2 and Python 3. Differential Revision: https://reviews.llvm.org/D43532 llvm-svn: 325835
* Fix a couple of more tests to not create files in the source treePavel Labath2018-02-211-18/+11
| | | | | | | | | | | | | | | | | | | | | | | | Summary: These were not being flaky, but they're still making the tree dirty. These tests were using lldbutil.append_to_process_working_directory to derive the file path so I fix them by modifying the function to return the build directory for local tests. Technically, now the path returned by this function does not point to the process working directory for local tests, but I think it makes sense to keep the function name, as I think we should move towards launching the process in the build directory (and I intend to change this for the handful of inferiors that actually care about their PWD, for example because they need to create files there). Reviewers: davide, aprantl Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D43506 llvm-svn: 325690
* Only throw -fPIC when building a shared libraryAaron Smith2018-02-081-5/+5
| | | | | | | | | | | | | | | | | | Summary: Update makefiles to specify -fPIC in Makefile.rules and only throw -fPIC when building a shared library. This change is necessary to allow building the lldb tests on Windows where -fPIC is not a valid option. Update a few places to Python 3.x syntax Reviewers: zturner, lldb-commits Reviewed By: zturner Subscribers: stella.stamenova, labath, llvm-commits Differential Revision: https://reviews.llvm.org/D42994 llvm-svn: 324671
OpenPOWER on IntegriCloud