summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test/macosx
Commit message (Collapse)AuthorAgeFilesLines
* [lldb][NFC] Remove all `setUp` overrides that only call the parent ↵Raphael Isemann2019-12-133-12/+0
| | | | | | | | | | | | | | | | | | | | | | | | | implementation Summary: A lot of our tests copied the setUp code from our TestSampleTest.py: ``` def setUp(self): # Call super's setUp(). TestBase.setUp(self) ``` This code does nothing unless we actually do any setUp work in there, so let's remove all these method definitions. Reviewers: labath, JDevlieghere Reviewed By: labath Subscribers: lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D71454
* [lldb][NFC] Remove 'from __future__ import print_function' from all tests ↵Raphael Isemann2019-12-1315-15/+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] Update hardcoded Makefile.rules inclusions.Jordan Rupprecht2019-12-051-3/+1
| | | | | | This replaces `include $(LEVEL)/Makefile.rules` with `include Makefile.rules`. The lldb test driver already passes the include path when running make, and specifically looking for "../../Makefile.rules" forces the test to be in a specific location. Removing this hardcoded relative path will make it possible to move this test as-is.
* Replace tabs with spaces. (NFC)Adrian Prantl2019-11-111-11/+11
|
* Fix a regression in macOS-style path remapping.Adrian Prantl2019-11-114-6/+21
| | | | | | | | | | | | | | | | When we switched to the LLVM .debug_line parser, the .dSYM-style path remapping logic stopped working for relative paths because of how RemapSourceFile silently fails for relative paths. This patch both makes the code more readable and fixes this particular bug. One interesting thing I learned is that Module::RemapSourceFile() is a macOS-only code path that operates on on the lldb::Module level and is completely separate from target.source-map, which operates on a per-Target level. Differential Revision: https://reviews.llvm.org/D70037 rdar://problem/56924558
* Add a testcase for .dSYM path remapping dictionaries.Adrian Prantl2019-11-113-0/+69
| | | | rdar://problem/56924558
* Revert "Add a testcase for .dSYM path remapping dictionaries."Jonas Devlieghere2019-11-083-69/+0
| | | | This reverts commit 2bbc4fdd8fa0ed58d610ab6260cb664c7cfef204.
* Add a testcase for .dSYM path remapping dictionaries.Adrian Prantl2019-11-083-0/+69
| | | | rdar://problem/56924558
* Modernize add-dsym test MakefileFred Riss2019-11-051-17/+7
|
* [Make] Remove spurious line breakJonas Devlieghere2019-10-101-1/+1
| | | | | | This test is disabled upstream and therefore this went unnoticed. llvm-svn: 374462
* TestIndirectSymbols: Modernize the MakefileFrederic Riss2019-10-092-36/+14
| | | | | | | | This old test used a completely hand-rolled Makefile. Modernize so that it's able to cross-compile. And XFAIL the test as it fails on embedded targets... llvm-svn: 374256
* [Testsuite] Get rid of most of the recursive shared library MakefilesFrederic Riss2019-10-084-22/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-274-0/+6
| | | | | | | | | | 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-274-6/+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-251-1/+1
| | | | | | | | | | | | 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-046-0/+66
| | | | | | | | | | | 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-0414-36/+11
| | | | | | | | | | | | | | | | | | | | | | | 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
* TestFunctionStarts.py: add synchronizationFrederic Riss2019-08-262-2/+21
| | | | | | | | | We have started to see the no_binary version of this test fail. The reason is that the binary was being removed before the spawn actually launched the inferior. Add a simple filesystem based synchronization to avoid this race. llvm-svn: 369930
* [lldb][NFC] Remove unused imports in python testsRaphael Isemann2019-08-0215-28/+0
| | | | llvm-svn: 367663
* Ah, forgot a debug line I left in the dsym-for-uuid.sh scriptJason Molenda2019-07-171-1/+0
| | | | | | | to make sure it was correctly being disabled after this test case completed. llvm-svn: 366381
* Add support to ProcessMachCore::DoLoadCore to handle an EFI UUID str.Jason Molenda2019-07-175-0/+442
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a core file has an EFI version string which includes a UUID (similar to what it returns for the kdp KDP_KERNELVERSION packet) in the LC_IDENT or LC_NOTE 'kern ver str' load command. In that case, we should try to find the binary and dSYM for the UUID listed. The dSYM may have python code which knows how to relocate the binary to the correct address in lldb's target section load list and loads other ancillary binaries. The test case is a little involved, 1. it compiles an inferior hello world apple (a.out), 2. it compiles a program which can create a corefile manually with a specific binary's UUID encoded in it, 3. it gets the UUID of the a.out binary, 4. it creates a shell script, dsym-for-uuid.sh, which will return the full path to the a.out + a.out.dSYM when called with teh correct UUID, 5. it sets the LLDB_APPLE_DSYMFORUUID_EXECUTABLE env var before creating the lldb target, to point to this dsym-for-uuid.sh, 6. runs the create-corefile binary we compiled in step #2, 7. loads the corefile from step #6 into lldb, 8. verifies that lldb loaded a.out by reading the LC_NOTE load command from the corefile, calling dsym-for-uuid.sh with that UUID, got back the path to a.out and loaded it. whew! <rdar://problem/47562911> llvm-svn: 366378
* Add color to the default thread and frame format.Jonas Devlieghere2019-06-171-1/+1
| | | | | | | | | | | | | | Now that we correctly ignore ASCII escape sequences when colors are disabled (r362240), I'd like to change the default frame and thread format to include color in their output, in line with the syntax highlighting that Raphael added a while ago. This patch adds highlighting for the stop reason, the file, line and column number. With colors disabled, this of course is a no-op. Differential revision: https://reviews.llvm.org/D62743 llvm-svn: 363608
* Disable queues_with_libBacktraceRecordingJonas Devlieghere2019-05-011-0/+1
| | | | | | | | After multiple attempts from both Fred and Adrian, this variant of the test is still flaky on GreenDragon. This commit disables it while we continue investigate. llvm-svn: 359724
* Two tests were using the interactive convenience variableJason Molenda2019-04-251-2/+2
| | | | | | | lldb.debugger. They should not be. <rdar://problem/50210340> llvm-svn: 359234
* Fix the swig typemap for "uint32_t *versions, uint32_t num_versions".Jim Ingham2019-03-282-0/+267
| | | | | | | | | It was making a list of a certain size but not always filling in that many elements, which would lead to a crash iterating over the list. Differential Revision: https://reviews.llvm.org/D59913 llvm-svn: 357207
* [Python] Fix another batch of python 2/python 3 portability issues.Davide Italiano2019-03-131-2/+7
| | | | llvm-svn: 355998
* Actually implement the TestQueues.py workaroundFrederic Riss2019-03-091-5/+4
| | | | | | | | The code commited in r355764 didn't do what I want as I typed GetThreadID instead of GetQueueID. This commit contains a (hopefully) better version of the workaround. llvm-svn: 355766
* Try to workaround the TestQueues.py flakynessFrederic Riss2019-03-091-0/+5
| | | | | | | | This is not a fix, but if I understand enough of the issue, it should bail out early of the test when in a situation that would result in a failure down the road. llvm-svn: 355764
* Add more logging to TestQueues.pyFrederic Riss2019-03-081-2/+4
| | | | | | | | | The last round of logging taught us that when the test fails, lldb is indeed aware of the thread it's failing to associate to a given queue. Add more logging to try to figure out why the thread and the queue do not appear related to the Queue APIs. llvm-svn: 355706
* Add logging to TestQueues.pyFrederic Riss2019-03-071-0/+20
| | | | | | | In an attempt to understand why the test is still failing after r355555, add some logging. llvm-svn: 355647
* Update the file headers across all of the LLVM projects in the monorepoChandler Carruth2019-01-195-20/+15
| | | | | | | | | | | | | | | | | 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
* Split two sub-tests into separate top-level methods.Adrian Prantl2019-01-071-1/+7
| | | | llvm-svn: 350559
* Refactor test, no changes expected.Adrian Prantl2019-01-071-7/+4
| | | | llvm-svn: 350557
* Fine-tune and document the barrier in TestQueues.Adrian Prantl2019-01-071-10/+16
| | | | llvm-svn: 350543
* TestQueues: Move the synchronisation code into the binary itself.Adrian Prantl2019-01-032-43/+14
| | | | | | Thanks to Pavel Labath for the suggestion! llvm-svn: 350360
* Add file-based synching to places missed in r350247.Adrian Prantl2019-01-022-10/+15
| | | | llvm-svn: 350266
* Add file-based synchronization to flaky testAdrian Prantl2019-01-022-3/+38
| | | | | | | | | | TestQueues is failing randomly on green dragon and I suspect it is because the enqueued threads haven't executed by the time we expect them. This patch adds file-based synchronization to the queues. Differential Revision: https://reviews.llvm.org/D56208 llvm-svn: 350247
* A few small updates to the testsuite for running against an iOS device.Jason Molenda2018-12-171-1/+5
| | | | | | | Remove the expected-fails for 34538611; using an alternate platform implementation handles these correctly. llvm-svn: 349417
* Add a test to verify that lldb can load a kext binary.Jason Molenda2018-11-302-0/+260
| | | | | | <rdar://problem/46356062> llvm-svn: 348040
* Port the Darwin universal binary testcase to x86_64.Adrian Prantl2018-11-152-61/+57
| | | | | | | | | Xcode 10 doesn't ship with an i386 SDK any more. This patch ports the testcase from an i386/x86_64 -> x86_64/x86_64h universal binary. rdar://problem/46099343 llvm-svn: 346981
* Tiny testsuite tweaks. Don't run the apple simulatorJason Molenda2018-10-161-0/+1
| | | | | | | | | | 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
* lldbtest.py: Unconditionally set the clang module cache path.Adrian Prantl2018-08-211-1/+2
| | | | | | This should fix the errors observable on the new lldb-cmake bot. llvm-svn: 340293
* Fix a little thinko in generating ___lldb_unnamed_symbol symbols Jim Ingham2018-08-153-0/+112
| | | | | | | | | | | when we have only an in-memory copy of the binary. Also added a test for the generation of these symbols in the in-memory and regular cases. <rdar://problem/43160401> llvm-svn: 339833
* Fix whitespace in the python test suite.Raphael Isemann2018-07-274-9/+9
| | | | | | | | | | | | | 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
* Fix silly error introduced after testing in r333813.James Y Knight2018-06-021-7/+0
| | | | | | Oops. llvm-svn: 333816
* Fix support for distinguishing archive members by timestamp on Darwin.James Y Knight2018-06-025-0/+129
| | | | | | | | | | | | | | | | | | | On Darwin, the binary's symbol table points to debug info in object files -- potentially object files within a static library. Such a library may have multiple entries with the same name, distinguished only by timestamp. The code was already _attempting_ to handle this case (see the code in ObjectContainerBSDArchive::Archive::FindObject which disambiguates via timestamp). But, unfortunately, while the timestamp was taken into account on the _first_ lookup, the result was then cached in a map keyed only off of the path. Added the timestamp to the cache, and added a test case. Differential Revision: https://reviews.llvm.org/D47660 llvm-svn: 333813
* [dotest] Clean up test folder clean-upPavel Labath2018-03-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch implements a unified way of cleaning the build folder of each test. This is done by completely removing the build folder before each test, in the respective setUp() method. Previously, we were using a combination of several methods, each with it's own drawbacks: - nuking the entire build tree before running dotest: the issue here is that this did not take place if you ran dotest manually - running "make clean" before the main "make" target: this relied on the clean command being correctly implemented. This was usually true, but not always. - for files which were not produced by make, each python file was responsible for ensuring their deleting, using a variety of methods. With this approach, the previous methods become redundant. I remove the first two, since they are centralized. For the other various bits of clean-up code in python files, I indend to delete it when I come across it. Reviewers: aprantl Subscribers: emaste, ki.stfu, mgorny, eraman, lldb-commits Differential Revision: https://reviews.llvm.org/D44526 llvm-svn: 327703
* [testsuite] Throw away test/debug_info/apple_types.Davide Italiano2018-02-233-104/+0
| | | | | | | | | | | | This test was only testing that clang produced the correct informations for __apple accelerated tables. So, it's a clang test. Also, it doesn't require any debugger intervention, the object file can be analyzed statically with a dumper. Also, the input program was highly verbose (unnecessarily). r325850 commits a clang test instead, so it's time to retire this. llvm-svn: 325851
* Fix TestAppleTypesIsProduced after r324226Frederic Riss2018-02-211-1/+1
| | | | | | | | This test was accessing self.debug_info, which doesn't exist anymore. For some reason the macOS bots are skipping this test because they think the compiler is not clang. We'll look into this separately. llvm-svn: 325666
* Make LLDB's clang module cache path customizableAdrian Prantl2018-02-091-6/+5
| | | | | | | | | | | This patch makes LLDB's clang module cache path customizable via settings set target.clang-modules-cache-path <path> and uses it in the LLDB testsuite to reuse the same location inside the build directory for LLDB and clang. Differential Revision: https://reviews.llvm.org/D43099 llvm-svn: 324775
OpenPOWER on IntegriCloud