summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test/linux
Commit message (Collapse)AuthorAgeFilesLines
* [lldb][NFC] Remove all `setUp` overrides that only call the parent ↵Raphael Isemann2019-12-131-3/+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-132-2/+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
* Mark some tests as xfail on AArch64 LinuxDiana Picus2019-12-031-1/+1
| | | | | | | | | I have either opened new bug reports for these tests, or added links to existing bugs. This should help make the lldb-aarch64-ubuntu buildbot green (there will still be some unexpected passes that someone should look into, but those can be handled later).
* 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
* [dotest] Avoid the need for LEVEL= makefile boilerplatePavel Labath2019-09-045-13/+5
| | | | | | | | | | | | | | | | | | | | | | | 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
* [lldb][NFC] Remove unused imports in python testsRaphael Isemann2019-08-025-10/+0
| | | | llvm-svn: 367663
* 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
* Revert "[LLDB] Support GNU-style compressed debug sections (.zdebug)"Davide Italiano2018-05-123-66/+0
| | | | | | | | | | This reverts commit r332162 as it breaks the bots (Ubuntu 14.04) with the following message: Build Command Output: objcopy: option '--compress-debug-sections' doesn't allow an argument llvm-svn: 332165
* [LLDB] Support GNU-style compressed debug sections (.zdebug)Davide Italiano2018-05-123-0/+66
| | | | | | | | Patch by Erik Welander! Differential Revision: https://reviews.llvm.org/D45628 llvm-svn: 332162
* [dotest] Clean up test folder clean-upPavel Labath2018-03-162-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Rewrite TestTargetSymbolsBuildidCase to be more focusedPavel Labath2018-03-063-45/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The test was failing in remote debugging scenario with windows as a host as cmd.exe is not able to parse the complicated shell commands in the Makefile. The test seemed like a perfect candidate for a more focused testing approach, so I have rewritten in on top of lldb-test's module-sections functionality. The slight gotcha there was that the Module::GetSectionList does not include the sections from the symbol file until someone manually calls Module::GetSymbolVendor. Normally, this is not an issue, because someone will have initialized the symbol vendor by the time anyone starts looking at the sections. However, when all one this is dump the section list, we run into this problem. I've tried making this behavior more automatic, but it turns out it's not that easy, so for now, I just manually initialize the Symbol Vendor before dumping out the sections in lldb-test. Reviewers: jankratochvil Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D42914 llvm-svn: 326805
* Deactivate TestTargetSymbolsBuildidCase if host is windowsEugene Zemtsov2018-02-081-0/+1
| | | | | | Makefile has unix magic and thus not working on windows. llvm-svn: 324558
* Skip TestTargetSymbolsSepDebugSymlink on remote targetsPavel Labath2018-02-051-0/+1
| | | | | | | Currently, our behavior when installing symlinks on the remote target is broken (pr36237). llvm-svn: 324236
* Resolve binary symlinks before finding its separate .debug fileJan Kratochvil2018-02-053-0/+45
| | | | | | | | | | | | | | | | | | | | | | I have found LLDB cannot find separate debug info of Fedora /usr/bin/gdb. It is because: lrwxrwxrwx 1 root root 14 Jan 25 20:41 /usr/bin/gdb -> ../libexec/gdb* -rwxr-xr-x 1 root root 10180296 Jan 25 20:41 /usr/libexec/gdb* ls: cannot access '/usr/lib/debug/usr/bin/gdb-8.0.1-35.fc27.x86_64.debug': No such file or directory -r--r--r-- 1 root root 29200464 Jan 25 20:41 /usr/lib/debug/usr/libexec/gdb-8.0.1-35.fc27.x86_64.debug FYI that -8.0.1-35.fc27.x86_64.debug may look confusing, it was always just .debug before. Why is /usr/bin/gdb a symlink is offtopic for this bugreport, Fedora has it so for some reasons. It is always safest to look at the .debug file only after resolving all symlinks on the binary file. Differential revision: https://reviews.llvm.org/D42853 llvm-svn: 324224
* Fix upper->lower case for /usr/lib/debug/.build-id/**.debugJan Kratochvil2018-02-053-0/+44
| | | | | | | | | | | | | I have found the lookup by build-id (when lookup by /usr/lib/debug/path/name/exec.debug failed) does not work as LLDB tries the build-id hex string in uppercase but Fedora uses lowercase. xubuntu-16.10 also uses lowercase during my test: /usr/lib/debug/.build-id/6c/61f3566329f43d03f812ae7057e9e7391b5ff6.debug Differential revision: https://reviews.llvm.org/D42852 llvm-svn: 324222
* Fix TestMixedDwarfBinary.pyPavel Labath2018-01-311-1/+1
| | | | | | | As of yesterday, tests need to use self.getBuildArtifact() to get the built executable. llvm-svn: 323884
* [lldb] Enable debugging of binaries with mixed (splitted/regular) dwarfDavide Italiano2018-01-314-0/+70
| | | | | | | This recommits the patch, now that I verified that the bot instability is due to something else. Sorry for the noise. llvm-svn: 323879
* Fix TestTargetSymbolsAddCommand makefilePavel Labath2018-01-311-4/+5
| | | | | | | | | We started passing the "all" target to make, which rendered the "localall" trick in this Makefile inoperable. I implement the strip step differently, and also reformat the Makefile. llvm-svn: 323855
* Revert "[lldb] Enable debugging of binaries with mixed (splitted/regular) dwarf"Davide Italiano2018-01-314-70/+0
| | | | | | It might have caused some instability on the bots. llvm-svn: 323845
* [lldb] Enable debugging of binaries with mixed (splitted/regular) dwarfAlexander Shaposhnikov2018-01-304-0/+70
| | | | | | | | | | | | | | Initialize the default value of SymbolFileDWARF uuid with the appropriately shifted DW_INVALID_OFFSET constant. This change fixes the collision in the computation of DIE uid (inside DIERef::GetUID) and incorrect CompileUnit lookup (because of the misleading cu_offset value). Test plan: make check-lldb Differential revision: https://reviews.llvm.org/D42563 llvm-svn: 323832
* Fix TestTargetSymbolsAddCommand [getBuildArtifact refactor]Pavel Labath2018-01-221-1/+1
| | | | llvm-svn: 323086
* Wrap all references to build artifacts in the LLDB testsuite (NFC)Adrian Prantl2018-01-193-4/+5
| | | | | | | | | in TestBase::getBuildArtifact(). This NFC commit is in preparation for https://reviews.llvm.org/D42281 (compile the LLDB tests out-of-tree). Differential Revision: https://reviews.llvm.org/D42280 llvm-svn: 323007
* Extend 'target symbols add' to load symbols from a given moduleEugene Zemtsov2017-07-243-0/+70
| | | | | | | | | | | | | | Now -shlib flag can be provided alongside with names of symbols files: (lldb) target symbols add --shlib stripper-lib.so unstripper-lib.so This is helpful when default matching mechanisms by name and UUID can't find a module, and the user needs to explicitly specify which module the given symbol file belongs to. Differential Revision: https://reviews.llvm.org/D35607 llvm-svn: 308933
* NPL: Fix one more bug in the single step workaroundPavel Labath2017-02-171-4/+1
| | | | | | | | | | | | | | | | | In the case we are stepping over the thread creation instruction, we will end up calling Thread::SingleStep back-to-back twice (because of the intermediate PTRACE_EVENT_CLONE stop). This will cause the cpu mask to be set inappropriately (because the old SingleStepCheck object will be destroyed after we create the new one), and the single-step will fail. Before the refactor the code was still incorrect in this case, but in a different way (the thread was left with the incorrect mask after the stepping was complete), so this was not easy to spot. This fixes TestCreateDuringInstructionStep on the affected devices. llvm-svn: 295440
* Remove an ancient XFAIL from TestBuiltinTrapPavel Labath2016-09-261-6/+0
| | | | | | | in refers to gcc-4.6. Hopefully noone is using that anymore, and I think there is a good chance it was fixed anyway. llvm-svn: 282406
* *** This commit represents a complete reformatting of the LLDB source codeKate Stone2016-09-062-20/+46
| | | | | | | | | | | | | | | | | | | | | | | *** to conform to clang-format’s LLVM style. This kind of mass change has *** two obvious implications: Firstly, merging this particular commit into a downstream fork may be a huge effort. Alternatively, it may be worth merging all changes up to this commit, performing the same reformatting operation locally, and then discarding the merge for this particular commit. The commands used to accomplish this reformatting were as follows (with current working directory as the root of the repository): find . \( -iname "*.c" -or -iname "*.cpp" -or -iname "*.h" -or -iname "*.mm" \) -exec clang-format -i {} + find . -iname "*.py" -exec autopep8 --in-place --aggressive --aggressive {} + ; The version of clang-format used was 3.9.0, and autopep8 was 1.2.4. Secondly, “blame” style tools will generally point to this commit instead of a meaningful prior commit. There are alternatives available that will attempt to look through this change and find the appropriate prior commit. YMMV. llvm-svn: 280751
* Mark some arm-linux specific xfails marking bug entriesOmair Javaid2016-05-251-0/+1
| | | | | | | | TestCallUserAnonTypedef.py and TestIRInterpreter.py fail to limitation of JIT expressions in handling hard float ABI targets. TestBSDArchives.py fails due to python unicode error. TestBuiltinTrap.py fails due to wrong line information generated by some gcc versions. llvm-svn: 270745
* Xfail TestCrashDuringStep and TestCreateDuringInstructionStep on arm-linuxOmair Javaid2016-05-161-0/+1
| | | | | | | Both of above tests fail on arm and bugs have been reported on android already. Adding arm-linux decorator because android decorator doesnt xfail these test when run on linux. llvm-svn: 269647
* Move the rest of the tests over to using the new decorator module.Zachary Turner2016-02-041-1/+2
| | | | llvm-svn: 259838
* Move some of the common decorators to decorators.py.Zachary Turner2016-02-041-1/+2
| | | | | | | | | | | | This doesn't attempt to move every decorator. The reason for this is that it requires touching every single test file to import decorators.py. I would like to do this in a followup patch, but in the interest of keeping the patches as bite-sized as possible, I've only attempted to move the underlying common decorators first. A few tests call these directly, so those tests are updated as part of this patch. llvm-svn: 259807
* Remove `use_lldb_suite` from the package, and don't import it anymore.Zachary Turner2015-11-032-2/+2
| | | | | | | | | | | | | | | | This module was originally intended to be imported by top-level scripts to be able to find the LLDB packages and third party libraries. Packages themselves shouldn't need to import it, because by the time it gets into the package, the top-level script should have already done this. Indeed, it was just adding the same values to sys.path multiple times, so this patch is essentially no functional change. To make sure it doesn't get re-introduced, we also delete the `use_lldb_suite` module from `lldbsuite/test`, although the original copy still remains in `lldb/test` llvm-svn: 251963
* Tighten up sys.path, and use absolute imports everywhere.Zachary Turner2015-11-032-4/+4
| | | | | | | | | | | | | | | | | | | | For convenience, we had added the folder that dotest.py was in to sys.path, so that we could easily write things like `import lldbutil` from anywhere and any test. This introduces a subtle problem when using Python's package system, because when unittest2 imports a particular test suite, the test suite is detached from the package. Thus, writing "import lldbutil" from dotest imports it as part of the package, and writing the same line from a test does a fresh import since the importing module was not part of the same package. The real way to fix this is to use absolute imports everywhere. Instead of writing "import lldbutil", we need to write "import lldbsuite.test.util". This patch fixes up that and all other similar cases, and additionally removes the script directory from sys.path to ensure that this can't happen again. llvm-svn: 251886
* Move lldb/test to lldb/packages/Python/lldbsuite/test.Zachary Turner2015-10-286-0/+199
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
OpenPOWER on IntegriCloud