summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test/tools/lldb-server
Commit message (Collapse)AuthorAgeFilesLines
* [lldb][NFC] Remove 'from __future__ import print_function' from all tests ↵Raphael Isemann2019-12-1319-19/+0
| | | | | | | | | | | | | | | | | | | | | that don't actually call 'print()' Summary: A lot of tests do this trick but the vast majority of them don't even call `print()`. Most of this patch was generated by a script that just looks at all the files and deletes the line if there is no `print (` or `print(` anywhere else in the file. I checked the remaining tests manually and deleted the import if we never call print (but instead do stuff like `expr print(...)` and similar false-positives). I also corrected the additional empty lines after the import in the files that I manually edited. Reviewers: JDevlieghere, labath, jfb Reviewed By: labath Subscribers: dexonsmith, wuzish, nemanjai, kbarton, christof, arphaman, abidh, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D71452
* [lldb] Remove Xfail decorators from steadily passing testsMuhammad Omair Javaid2019-12-092-9/+3
| | | | | This patch removes xfail decorator from some lldb testcases which are passing steadily now for past few week/months on aarch64/linux buildbot.
* [lldb] [test] Un-XFAIL lldb-server tests fixed on NetBSDMichał Górny2019-11-261-2/+0
|
* [lldb] [Process/NetBSD] Improve threading supportMichał Górny2019-11-251-0/+149
| | | | | | | | | | | | | | | | | | | | | | | | | Implement major improvements to multithreaded program support. Notably, support tracking new and exited threads, associate signals and events with correct threads and support controlling individual threads when resuming. Firstly, use PT_SET_EVENT_MASK to enable reporting of created and exited threads via SIGTRAP. Handle TRAP_LWP events to keep track of the currently running threads. Secondly, update the signal (both generic and SIGTRAP) handling code to account for per-thread signals correctly. Signals delivered to the whole process are reported on all threads, while per-thread signals and events are reported only to the specific thread. The remaining threads are marked as 'stopped with no reason'. Note that NetBSD always stops all threads on debugger events. Thirdly, implement the ability to set every thread as running, stopped or single-stepping separately while continuing the process. This also provides the ability to send a signal to the whole process or to one of its thread while resuming. Differential Revision: https://reviews.llvm.org/D70022
* [lldb] [test] Un-XFAIL one lldb-server test on NetBSDMichał Górny2019-11-201-1/+0
|
* [lldb] [test] XFAIL more lldb-server tests on NetBSDMichał Górny2019-11-181-0/+11
|
* [lldb] [Process/NetBSD] Implement thread name gettingMichał Górny2019-11-182-2/+1
| | | | | | | Implement thread name getting sysctl() on NetBSD. Also fix the incorrect type in pthread_setname_np() in the relevant test. Differential Revision: https://reviews.llvm.org/D70363
* [lldb] [test] Enable lldb-server tests on NetBSD, and set XFAILsMichał Górny2019-11-1810-0/+19
| | | | Differential Revision: https://reviews.llvm.org/D70335
* Found more timeouts to unify.Adrian Prantl2019-10-213-5/+7
| | | | llvm-svn: 375454
* Unify timeouts in gdbserver tests and ensure they are larger if ASAN is enabled.Adrian Prantl2019-10-215-8/+10
| | | | llvm-svn: 375431
* Fix an inverted condition in test.Adrian Prantl2019-10-171-3/+3
| | | | llvm-svn: 375127
* Increase gdbremote_testcase timeouts when running under ASAN.Adrian Prantl2019-10-151-5/+12
| | | | llvm-svn: 374906
* Skip Apple simulator test for all remote testing scenarios.Frederic Riss2019-10-091-3/+3
| | | | | | | The test makes no sense to run remotely, period. The architecture of the target is not the discriminant here. llvm-svn: 374217
* [Testsuite] Get rid of most of the recursive shared library MakefilesFrederic Riss2019-10-083-21/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Most of the secondary Makefiles we have are just a couple variable definitions and then an include of Makefile.rules. This patch removes most of the secondary Makefiles and replaces them with a direct invocation of Makefile.rules in the main Makefile. The specificities of each sub-build are listed right there on the recursive $(MAKE) call. All the variables that matter are being passed automagically by make as they have been passed on the command line. The only things you need to specify are the variables customizating the Makefile.rules logic for each image. This patch also removes most of the clean logic from those Makefiles and from Makefile.rules. The clean rule is not required anymore now that we run the testsuite in a separate build directory that is wiped with each run. The patch leaves a very crude version of clean in Makefile.rules which removes everything inside of $(BUILDDIR). It does this only when the $(BUILDDIR) looks like a sub-directory of our standard testsuite build directory to be extra safe. Reviewers: aprantl, labath Subscribers: lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D68558 llvm-svn: 374076
* Revert: [lldb] [testsuite] Remove redundant MAKE_DSYM := NOJan Kratochvil2019-09-273-0/+3
| | | | | | | | | | Revert: llvm-svn: 373061 It broke OSX testsuite: https://reviews.llvm.org/D67589#1686150 lldb/packages/Python/lldbsuite/test/macosx/function-starts/TestFunctionStarts.py llvm-svn: 373110
* [lldb] [testsuite] Remove redundant MAKE_DSYM := NOJan Kratochvil2019-09-273-3/+0
| | | | | | | According to a comment by Pavel Labath: https://reviews.llvm.org/D67589#inline-612375 llvm-svn: 373061
* Canonicalize variable usage in testsuite MakefilesAdrian Prantl2019-09-252-2/+2
| | | | | | | | | | | | This test streamlines our use of variables that are expected by Makefile.rules throughout the test suite. Mostly it replaced potentially dangerous overrides and updates of variables like CFLAGS with safe assignments to variables reserved for this purpose like CFLAGS_EXTRAS. Differential Revision: https://reviews.llvm.org/D67984 llvm-svn: 372795
* Upstream macCatalyst support in debugserver and the macOS dynamic loaderAdrian Prantl2019-09-041-0/+1
| | | | | | | | | | | plugin. Unfortunately the test is currently XFAILed because of missing changes to the clang driver. Differential Revision: https://reviews.llvm.org/D67124 llvm-svn: 370931
* [dotest] Avoid the need for LEVEL= makefile boilerplatePavel Labath2019-09-049-27/+9
| | | | | | | | | | | | | | | | | | | | | | | 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
* TestAppleSimulatorOSType: Pass the --standalone argument to simctlFrederic Riss2019-08-221-1/+1
| | | | | | | | It looks like running without this argument was supported for legacy reasons, but a Xcode 11 beta made the argument mandatory for our usecase. llvm-svn: 369709
* Update a few tests that may change the platform to save & restoreJason Molenda2019-08-211-0/+8
| | | | | | | | | | | the platform in the setUp/tearDown methods. I want to migrate the re-instatement of the correct plaform to the setUp base method but haven't had time to look at that yet, so I want to land this handful of fixes until I get to it. Differential revision: https://reviews.llvm.org/D66331 llvm-svn: 369484
* Update Python tests for lldb-server on WindowsAaron Smith2019-08-1416-15/+85
| | | | | | | | | | | | | | | | Summary: Thanks to Hui Huang and reviewers for all the help with this patch! Reviewers: labath, jfb, clayborg Reviewed By: labath Subscribers: Hui, clayborg, dexonsmith, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D61687 llvm-svn: 368776
* Initial support for native debugging of x86/x64 Windows processesAaron Smith2019-08-131-5/+5
| | | | | | | | | | | | | | | | Summary: Thanks to Hui Huang and the reviewers for all the help with this patch. Reviewers: labath, Hui, jfb, clayborg, amccarth Reviewed By: labath Subscribers: amccarth, compnerd, dexonsmith, mgorny, jfb, teemperor, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D63165 llvm-svn: 368759
* [lldb][NFC] Remove unused imports in python testsRaphael Isemann2019-08-0210-14/+0
| | | | llvm-svn: 367663
* [lldb][test_suite] Update tests with unexpected pass on Android aarch64Alex Langford2019-07-231-1/+0
| | | | | | | | | | 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
* Revert "Revert "Implement xfer:libraries-svr4:read packet""Antonio Afonso2019-07-238-1/+226
| | | | | | This reverts commit 08c38f77c5fb4d3735ec215032fed8ee6730b3db. llvm-svn: 366847
* Restore tests for lldb-server and lldb-vscode removed at rL366590Antonio Afonso2019-07-2240-0/+7616
| | | | | | | | | | | | | | | | Summary: This was removed here rL366590 by accident. Reviewers: xiaobai, jfb Reviewed By: xiaobai Subscribers: dexonsmith, srhines, krytarowski, jfb, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D65123 llvm-svn: 366766
* [lldb][NFC] Cleanup mentions and code related to lldb-miRaphael Isemann2019-07-1940-7616/+0
| | | | | | | | | | | | | | | | Summary: lldb-mi has been removed, but there are still a bunch of references in the code base. This patch removes all of them. Reviewers: JDevlieghere, jfb Reviewed By: JDevlieghere Subscribers: dexonsmith, ki.stfu, mgorny, abidh, jfb, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D64992 llvm-svn: 366590
* Revert "Implement xfer:libraries-svr4:read packet"Pavel Labath2019-07-018-226/+1
| | | | | | | | | | | | | | | | | | | D62502, together with D62503 have broken the builds which have XML support enabled. Reverting D62503 (r364355) fixed that, but has broken has left some of the tests introduced by D62502 broken more or less nondeternimistically (it depended on whether the system happens to place the library list near unreadable pages of memory). I attempted to make a partial fix for this in r364748, but Jan Kratochvil pointed out that this reintroduces the problem which reverting D62503 was trying to solve. So instead, I back out the whole thing so we can get back to a clean slate that works for everyone. We can figure out a way forward from there. This reverts r364748, r363772 and r363707. llvm-svn: 364751
* Stabilize TestGdbRemoteLibrariesSvr4SupportPavel Labath2019-06-191-3/+6
| | | | | | | | | | | | | | on some systems this test fails because the two methods it uses to cross-reference the data don't match in the case of the vdso module. The "read from /proc/%pid/maps" method returns "[vdso]", while the method which reads it from the linker rendezvous structures returns "linux-vdso.so.1". Neither of the two names match any actual file. This restricts the test to only consider the libraries that we ourselves have added to the test, minimizing the impact of system dependencies that we cannot control. llvm-svn: 363772
* Implement xfer:libraries-svr4:read packetAntonio Afonso2019-06-188-1/+223
| | | | | | | | | | | | | | | | | | | Summary: This is the fourth patch to improve module loading in a series that started here (where I explain the motivation and solution): D62499 Implement the `xfer:libraries-svr4` packet by adding a new function that generates the list and then in Handle_xfer I generate the XML for it. The XML is really simple so I'm just using string concatenation because I believe it's more readable than having to deal with a DOM api. Reviewers: clayborg, xiaobai, labath Reviewed By: labath Subscribers: emaste, mgorny, srhines, krytarowski, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D62502 llvm-svn: 363707
* [lldb-server] Support 'g' packetsPavel Labath2019-05-306-44/+218
| | | | | | | Differential Revision: https://reviews.llvm.org/D62221 Patch by Guilherme Andrade <guiandrade@google.com>. llvm-svn: 362063
* [lldb-server] Update tests to use std::thread/mutex for all platformsAaron Smith2019-04-121-86/+81
| | | | | | | | | | | | | | | | | | Summary: Some cleanup suggested when bringing up lldb-server on Windows. Thanks to Hui Huang for the patch. Reviewers: zturner, labath, jfb, Hui Reviewed By: labath Subscribers: clayborg, dexonsmith, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D60496 llvm-svn: 358265
* Simplify TestGdbRemoteRegisterStatePavel Labath2019-04-021-9/+0
| | | | | | | | While reviewing D56233 it became clear to me that this test can be simplified. There's no need for a start-stop cycle in the inferior -- we can start fiddling with its registers as soon as it is launched. llvm-svn: 357451
* Fix TestAppleSimulatorOSType.py with Xcode 10.2Frederic Riss2019-03-071-1/+3
| | | | | | | It looks like the simctl tool shipped in Xcode10.2 changed the format of its json output. llvm-svn: 355644
* Fix lldb-server test suite for python3Pavel Labath2019-02-155-16/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch finishes the python3-ification of the lldb-server test suite. It reverts the partial attempt in r352709 to encode/decode the string via utf8 before writing to the socket. This wasn't enough because the gdb-remote protocol can sometimes (but not very often) carry binary data, and the utf8 codec chokes on that. Instead I add utility functions to the "seven" module for performing "identity" transformations on the byte data. This basically drills back the hole in the python type system that the string/bytes distinction was supposed to plug. That is not ideal, but was the best solution of the alternatives I could come up with. The options I considered were: - make use of the type system to add type safety to the test suite: This required making a lot of changes to the test suite, since most of the strings would now become byte objects instead, and it was not even fully clear to me where to draw the line. One extreme solution would be to just use byte objects everywhere, as the protocol doesn't support non-ascii characters anyway. However, this appeared to be: a) weird, because most of the protocol actually deals with strings, but we would have to prefix everything with 'b' b) clunky, because the handling of the bytes objects is sufficiently different in PY2 and PY3 (e.g. b'a'[0] is a string in PY2, but an int in PY3). - using the latin1 codec (which gives an identity transformation for the first 256 code points of unicode) instead of the custom bytes_to_string functions. This almost could work, but it was still slightly different between python 2 and 3, because in PY2 in would return a unicode object, which would then cause problems when combined with regular strings if it contained 8-bit chars. With this in mind, I think the best solution for the time being is to just coerce everything into the string type as early as possible, and have things proceed indentically on both python versions. Once we stop supporting python3, we can revisit the idea of using bytes objects more prevasively. Reviewers: davide, zturner, serge-sans-paille Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D58177 llvm-svn: 354106
* Revert "Fix one more string/bytes issue in lldb-server tests"Pavel Labath2019-02-131-1/+1
| | | | | | | | | | | | | It looks like I was too hasty to submit the previous patch. It does fix some tests on python3, but it also breaks one tests with python2. This happens because the gdb-remote protocol can sometimes (but not very often) contain binary data, and attempting to parse this as utf8 characters fails. This reverts commit r353944. llvm-svn: 353945
* Fix one more string/bytes issue in lldb-server testsPavel Labath2019-02-131-1/+1
| | | | | | This fixes about a dozen tests with python3. llvm-svn: 353944
* [Py3/TestAppleOSSimulator] Another byte<->str interoperability issue.Davide Italiano2019-02-051-1/+1
| | | | llvm-svn: 353226
* [testsuite] Fix TestAppleSimulator so that it works with Python 3.Davide Italiano2019-01-311-2/+2
| | | | llvm-svn: 352710
* [Python] Fix gdb-remote and lldb-server utilities to work with Py3.Davide Italiano2019-01-312-5/+5
| | | | llvm-svn: 352709
* Update the file headers across all of the LLVM projects in the monorepoChandler Carruth2019-01-192-8/+6
| | | | | | | | | | | | | | | | | 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
* A few small updates to the testsuite for running against an iOS device.Jason Molenda2018-12-171-0/+1
| | | | | | | Remove the expected-fails for 34538611; using an alternate platform implementation handles these correctly. llvm-svn: 349417
* Make TestAppleSimulatorOSType.py more flexibleFrederic Riss2018-11-171-1/+7
| | | | | | Different versions of Xcode have different outputs for the simctl command llvm-svn: 347117
* Tiny testsuite tweaks. Don't run the apple simulatorJason Molenda2018-10-161-0/+3
| | | | | | | | | | tests when targetting a device. Add an include to safe-to-call-func to work around a modules issue with a certain combination of header files. Add rules for Darwin systems to ad-hoc codesign binaries that the testsuite builds. llvm-svn: 344635
* Fix whitespace in the python test suite.Raphael Isemann2018-07-272-2/+2
| | | | | | | | | | | | | 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
* [debugserver] Fix the G packet handling.Frederic Riss2018-04-271-0/+9
| | | | | | Of course r331004 needed a counterpart on the write side. llvm-svn: 331073
* Mark test as @skipIfOutOfTreeDebugserverFrederic Riss2018-04-271-0/+1
| | | | | | This test will currently fail for people using the system debugserver. llvm-svn: 331043
* [debugserver] Fix handling of the 'g' packetFrederic Riss2018-04-271-0/+30
| | | | | | | | | | | | | | LLDB doesn't use this packet so we never hit this, but it looks like some other projects talk to debugserver and are hitting an assert (https://github.com/derekparker/delve/issues/1015). We had an off by 1 in the accounting of the FPU structure sizes. I added a test that basically just check that 'g' doesn't return an error (currently it assert in debug builds). I didn't make it an lldb-server test because it looks like lldb-server doesn't implement the g packet. llvm-svn: 331004
* [debugserver] Return 'ios' instead of 'iphoneos' for the ostype.Frederic Riss2018-04-251-8/+8
| | | | | | | | | | | | | When I merged the 2 codepaths that return an OS type, I hade checked that the places accepting 'iphoneos' would also accept 'ios', but then I got it backwards and return 'iphoneos'. We use this value to build triples, and there 'iphoneos' is invalid. This also makes the test slightly simpler. llvm-svn: 330877
OpenPOWER on IntegriCloud