summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test/functionalities
Commit message (Collapse)AuthorAgeFilesLines
* Revert r357504, r357491, r357482 because of bot breakage.Adrian Prantl2019-04-025-86/+1
| | | | | | | | | | | | | See discussion in https://reviews.llvm.org/D60001. Revert Clean up windows build bot. This reverts r357504 (git commit 380c2420ecb0c3e809b04f385d37b89800df1ecf) Revert Fix buildbot where paths were not matching up. This reverts r357491 (git commit 5050586860140b55a0cc68c77dd1438f44a23ca5) Revert Allow partial UUID matching in Minidump core file plug-in This reverts r357482 (git commit 838bba9c34bf1e5500c2e100327bc764afc8d367) llvm-svn: 357534
* Clean up windows build bot. Greg Clayton2019-04-021-0/+2
| | | | llvm-svn: 357504
* Fix buildbot where paths were not matching up.Greg Clayton2019-04-021-1/+4
| | | | llvm-svn: 357491
* Allow partial UUID matching in Minidump core file plug-inGreg Clayton2019-04-025-0/+80
| | | | | | | | | | | | Breakpad had bugs in earlier versions where it would take a 20 byte ELF build ID and put it into the minidump file as a 16 byte PDB70 UUID with an age of zero. This would make it impossible to do postmortem debugging with one of these older minidump files. This fix allows partial matching of UUIDs. To do this we first try and match with the full UUID value, and then fall back to removing the original directory path from the module specification and we remove the UUID requirement, and then manually do the matching ourselves. This allows scripts to find symbols files using a symbol server, place them all in a directory, use the "setting set target.exec-search-paths" setting to specify the directory, and then load the core file. The Target::GetSharedModule() can then find the correct file without doing any other matching and load it. Tests were added to cover a partial UUID match where the breakpad file has a 16 byte UUID and the actual file on disk has a 20 byte UUID, both where the first 16 bytes match, and don't match. Differential Revision: https://reviews.llvm.org/D60001 llvm-svn: 357482
* Fix flakyness in TestCommandScriptImmediateOutputPavel Labath2019-04-021-4/+6
| | | | | | | | | | | | | | | I'm not sure why this surfaced at this particular point, but TestCommandScriptImmediateOutput (a pexpect test) had a synchronization issue, where the (lldb) promts it was expecting were getting out of sync. This happened for two reasons: - it did not expect the initial (lldb) prompt we print at startup - launchArgs() returned None, which resulted in an extra "target create None" command being issued to lldb (and an extra unhandled prompt being printed). Resolving these two issues seems to fix (or at least, improve) the test. llvm-svn: 357459
* Fix llvm_unreachable in TestWriteMemoryPavel Labath2019-04-021-1/+1
| | | | | | | | | | The test was hitting llvm_unreachable in Platform::GetSoftwareBreakpointTrapOpcode because it could not figure out the architecture of the process. Since that is not the purpose of the test, I change the test to use an explicit CreateTargetWithFileAndTargetTriple command to specify it. llvm-svn: 357456
* [Process] Fix WriteMemory return valueMed Ismail Bennani2019-04-011-0/+29
| | | | | | | | | | | | | | | | | | | | | Summary: In case of a breakpoint site overlapping with the destination address, the WriteMemory method reported an incorrect memory size. Instead of returning the right amount of bytes written, it falls through the scope and returned 0. Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com> Reviewers: jasonmolenda, friss, jingham Subscribers: JDevlieghere, davide, lldb-commits, #lldb Tags: #lldb Differential Revision: https://reviews.llvm.org/D60022 llvm-svn: 357420
* [lldb] [Process/elf-core] Support aarch64 NetBSD core dumpsMichal Gorny2019-04-017-0/+15
| | | | | | | | | | | Include support for NetBSD core dumps from evbarm/aarch64 system, and matching test cases for them. Based on earlier work by Kamil Rytarowski. Differential Revision: https://reviews.llvm.org/D60034 llvm-svn: 357399
* [Platform] Remove Kalimba PlatformJonas Devlieghere2019-03-271-2/+0
| | | | | | | | | This patch removes the Kalimba platform. For more information please refer to the corresponding thread on the mailing list. http://lists.llvm.org/pipermail/lldb-dev/2019-March/014921.html llvm-svn: 357086
* Reapply minidump changes reverted in r356806Pavel Labath2019-03-258-0/+134
| | | | | | | | | The changes were reverted due to ubsan errors (unaligned accesses). Here I fix those errors by first copying the data into aligned storage. Besides fixing alignment issues, this also fixes reading of minidump strings on big-endian systems. llvm-svn: 356896
* Revert minidump changesJonas Devlieghere2019-03-228-134/+0
| | | | | | | | | | | | | | This reverts the following two commits: Revert "Extend r356573 (minidump UUID handling) to cover elf build-ids too" Revert "Fix UUID decoding from minidump files" Greg's original commit broke the sanitizer bot which has been red for several days now. http://green.lab.llvm.org/green/view/LLDB/job/lldb-sanitized/ llvm-svn: 356806
* Extend r356573 (minidump UUID handling) to cover elf build-ids tooPavel Labath2019-03-222-0/+13
| | | | | | | | Breakpad (but not crashpad) will insert an empty (all-zero) build-id record for modules which do not have a build-id. This tells lldb to treat such records as empty/invalid uuids. llvm-svn: 356751
* Fix UUID decoding from minidump filesGreg Clayton2019-03-207-0/+121
| | | | | | | | | | | | | This patch fixes: UUIDs now don't include the age field from a PDB70 when the age is zero. Prior to this they would incorrectly contain the zero age which stopped us from being able to match up the UUID with real files. UUIDs for Apple targets get the first 32 bit value and next two 16 bit values swapped. Breakpad incorrectly swaps these values when it creates darwin minidump files, so this must be undone so we can match up symbol files with the minidump modules. UUIDs that are all zeroes are treated as invalid UUIDs. Breakpad will always save out a UUID, even if one wasn't available. This caused all files that have UUID values of zero to be uniqued to the first module that had a zero UUID. We now don't fill in the UUID if it is all zeroes. Added tests for PDB70 and ELF build ID based CvRecords. Differential Revision: https://reviews.llvm.org/D59433 llvm-svn: 356573
* Fix TestCommandScriptImmediateOutput for python3Pavel Labath2019-03-181-3/+3
| | | | | | s/iteritems/items llvm-svn: 356370
* Fix a double-overrelease in the TestDataFormatterObjC test program.Adrian Prantl2019-03-141-4/+5
| | | | llvm-svn: 356160
* [Python] Fix TestDataFormatterSmartArray to work across python versions.Davide Italiano2019-03-131-4/+4
| | | | | | | | | | | Python 3 default encoding is utf-8, so taking random bytes and interpreting them as a string might result in invalid unicode sequences. As the only thing we care about here is that the formatter shows the elements of the underyling array, relax the string matching (this is good enough as all the elements are distinct so they resolve to different strings). llvm-svn: 356096
* [lldbsuite] Un-xfail TestPyObjSynthProvider on WindowsStella Stamenova2019-03-131-1/+0
| | | | | | One of Davide's changes yesterday fixed the behavior on Windows, so the test is now passing. llvm-svn: 356065
* [testsuite] Remove dead code in TestFormats.Davide Italiano2019-03-131-27/+0
| | | | llvm-svn: 356000
* Re-enable this test, the underlying bug was fixed and the test now passes.Jim Ingham2019-03-121-1/+0
| | | | llvm-svn: 355956
* Fix a crasher in StackFrame::GetValueForVariableExpressionPath()Greg Clayton2019-03-113-0/+123
| | | | | | | | There was a crash that would happen if an IDE would ask for a child of a shared pointer via any SB API call that ends up calling StackFrame::GetValueForVariableExpressionPath(). The previous code expects an error to be set describing why the synthetic child of a type was not able to be found, but we have some synthetic child providers that weren't setting the error and returning an empty value object shared pointer. This fixes that to ensure we don't lose our debug session by crashing, fully tests GetValueForVariableExpressionPath functionality, and ensures we don't crash on GetValueForVariableExpressionPath() in the future. Differential Revision: https://reviews.llvm.org/D59200 llvm-svn: 355850
* [lldb] [test] Mark a few tests flakey on NetBSDMichal Gorny2019-03-114-0/+6
| | | | llvm-svn: 355830
* [lldb] [test] Make 2lwp_process_SIGSEGV test more portableMichal Gorny2019-03-104-5/+8
| | | | | | | | | | Fix 2lwp_process_SIGSEGV NetBSD core test to terminate inside regular function rather than libc call, in order to get reproducible backtrace on different platforms. Differential Revision: https://reviews.llvm.org/D59177 llvm-svn: 355786
* [lldb] [test] Adjust XFAIL list to match buildbot resultsMichal Gorny2019-03-092-4/+0
| | | | | | | | Adjust the XFAIL-ing tests to match consistent results from buildbot. I'm going to work on differences between them and my local results following this. llvm-svn: 355774
* [lldb] [test] Skip broken NetBSD core testMichal Gorny2019-03-081-0/+1
| | | | | | | Apparently the problem is harder than anticipated. Skip the test for now to fix buildbots. llvm-svn: 355750
* [lldb] [test] Do not check libc function names in NetBSD core testMichal Gorny2019-03-081-1/+1
| | | | | | | | | Fix the NetBSD core test not to verify libc function names in backtrace. This obviously requires the same libc.so as originally used to produce the core file, and so it is going to fail everywhere except on my system. llvm-svn: 355747
* [lldb] [Process] Add proper support for NetBSD core files with threadsMichal Gorny2019-03-0811-0/+316
| | | | | | | | | | | | | | Improve the support for processing NetBSD cores. Fix reading process identifier, thread information and associating the terminating signal with the correct thread. Includes test cases for single-threaded program receiving SIGSEGV, and two dual-threaded programs: one where thread receives the signal, and the other one when the whole process is signalled. Differential Revision: https://reviews.llvm.org/D32149 llvm-svn: 355736
* Fix TestPaths.py on windowsAlex Langford2019-03-071-10/+2
| | | | | | | | | | | | I committed an implementation of GetClangResourceDir on windows but forgot to update this test. I merged the tests like I intended to, but I realized that the test was actually failing. After looking into it, it appears that FileSystem::Resolve was taking the path and setting the FileSpec's Directory to "/path/to/lldb/lib/clang/" and the File to "9.0.0" which isn't what we want. So I removed the resolve line from DefaultComputeClangResourceDir. llvm-svn: 355648
* Fix core files for 32 bit architectures that are supported in ProcessELFCore.cppGreg Clayton2019-03-062-0/+29
| | | | | | | | | | Core files need to know the size of the PRSTATUS header so that we can grab the register values that follow it. The code that figure out this size was using a hard coded list of architecture cores instead of relying on 32 or 64 bit for most cores. The fix here fixes core files for 32 bit ARM. Prior to this the PRSTATUS header size was being returned as zero and the register values were being taken from the first bytes of the PRSTATUS struct (signo, etc). Differential Revision: https://reviews.llvm.org/D58985 llvm-svn: 355526
* [ExpressionParser] Test GetClangResourceDirAlex Langford2019-03-061-0/+9
| | | | | | | | | | | | | Summary: I'm doing this because I plan on implementing `ComputeClangResourceDirectory` on windows so that `GetClangResourceDir` will work. Additionally, I made test_paths make sure that the directory member of the returned FileSpec is not none. This will fail on windows since `ComputeClangResourceDirectory` isn't implemented yet. Differential Revision: https://reviews.llvm.org/D58748 llvm-svn: 355463
* [lldb] Disable some of TestJITLoaderGDB.py tests on WindowsYury Delendik2019-03-051-0/+2
| | | | | | | | | | | | The test expect sample executable code be built, but fails on Windows. Review comment https://reviews.llvm.org/D57689#1418597 Tags: #lldb Differential Revision: https://reviews.llvm.org/D57689 llvm-svn: 355413
* Adds property to force enabling of GDB JIT loader for MacOSYury Delendik2019-03-054-0/+112
| | | | | | | | | | | | | | | | | Summary: Based on https://gist.github.com/thlorenz/30bf0a3f67b1d97b2945#patching-and-rebuilding The functionality was disabled at https://github.com/llvm/llvm-project/commit/521c2278abb16f0148cef1bd061cadb01ef43192 Reviewers: jingham Subscribers: lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D57689 llvm-svn: 355402
* [lldb] [test] Mark failing tests XFAIL on NetBSDMichal Gorny2019-03-0482-1/+123
| | | | | | | | | | | | | | | | 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
* Remove XFAIL-Linux from two asan testsPavel Labath2019-02-272-6/+0
| | | | | | | | It turns out these tests actually succeed, if one has a clang with address sanitizer support enabled (i.e., has enabled the compiler-rt project). I guess none of the linux lldb devs have done that until now. llvm-svn: 354976
* When deserializing breakpoints some options may not be present.Jim Ingham2019-02-221-0/+6
| | | | | | | | | | | The deserializer was not handling this case. For now we just accept the absent option, and set it to the breakpoint default. This will be more important if/when I figure out how to serialize the options set on breakpont locations. <rdar://problem/48322664> llvm-svn: 354702
* [lldb] [test] Do not link -ldl on NetBSDMichal Gorny2019-02-212-2/+3
| | | | | | | | | | | | | | | | Fix the load_* using test Makefiles not to link -ldl on NetBSD. There is no such a library on NetBSD, and dlopen() is available without a library. Quoting the manpage: (These functions are not in a library. They are included in every dynamically linked program automatically.) To resolve this portably, introduce a new USE_LIBDL option. If it set to 1, Makefile.rules automatically appends -ldl on platforms needing it. Differential Revision: https://reviews.llvm.org/D58517 llvm-svn: 354617
* testsuite: Fix TestCompDirSymLink and TestSourceManager on Linux with ↵Jan Kratochvil2019-02-211-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | symlinked build dir Getting failure when building in a directory which is symlinked elsewhere: Failing Tests (1): lldb-Suite :: functionalities/breakpoint/comp_dir_symlink/TestCompDirSymLink.py lldb-Suite :: source-manager/TestSourceManager.py For TestCompDirSymLink: ------------------------------------------------------------------------------ runCmd: file .../lldb-test-build.noindex/functionalities/breakpoint/comp_dir_symlink/TestCompDirSymLink.test_symlink_paths_set_procselfcwd_dwarf/CompDirSymLink output: Current executable set to '.../lldb-test-build.noindex/functionalities/breakpoint/comp_dir_symlink/TestCompDirSymLink.test_symlink_paths_set_procselfcwd_dwarf/CompDirSymLink' (x86_64). runCmd: settings set plugin.symbol-file.dwarf.comp-dir-symlink-paths /proc/self/cwd output: None runCmd: breakpoint set -f ".../lldb-test-build.noindex/functionalities/breakpoint/comp_dir_symlink/TestCompDirSymLink.test_symlink_paths_set_procselfcwd_dwarf/relative.cpp" -l 11 output: Breakpoint 1: no locations (pending). WARNING: Unable to resolve breakpoint to any actual locations. It is because /proc/self/cwd (used above for plugin.symbol-file.dwarf.comp-dir-symlink-paths) points to an already resolved directory: (cd /tmp;mkdir real;ln -s real symlink;cd symlink;ls -l /proc/self/cwd) lrwxrwxrwx 1 jkratoch jkratoch 0 Feb 20 19:55 /proc/self/cwd -> /tmp/real/ ------------------------------------------------------------------------------ For TestSourceManager the resolving is done by 'make -C' as found by Pavel Labath. Differential Revision: https://reviews.llvm.org/D58465 llvm-svn: 354556
* [lldb] [test] Fix expected netbsd output for TestImageListMultiArchitectureMichal Gorny2019-02-201-1/+1
| | | | llvm-svn: 354483
* Un-XFAIL TestLinuxCore for windowsPavel Labath2019-02-181-11/+0
| | | | | | | It turns out all that was needed to get this test passing was to fix the python3 incompatibility. llvm-svn: 354278
* Fix TestLinuxCore for python3Pavel Labath2019-02-181-4/+4
| | | | | | | - dictionaries don't have iteritems() - division returns floats llvm-svn: 354273
* Fix TestDataFormatterLibcxxListLoop.py testRaphael Isemann2019-02-161-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: The compilation of the TestDataFormatterLibcxxListLoop.py currently fails with this error: ``` functionalities/data-formatter/data-formatter-stl/libcxx/list/loop/main.cpp:19:24: error: no member named '__value_' in 'std::__1::__list_node_base<int, void *>' assert(third_elem->__value_ == 3); ~~~~~~~~~~ ^ ``` It seems the internal structure of list has changed with the 3.8 release. This patch makes the test compile with the current libc++ and with the previous libc++. Reviewers: shafik, zturner, labath Reviewed By: labath Subscribers: christof, jdoerfert, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D58273 llvm-svn: 354202
* Fix the gdb-client test suite for python3Pavel Labath2019-02-151-12/+5
| | | | | | | | | | This applies the same fix that was done in r354106 to the lldb-server test: bitcasting the string to a bytes object before sending it over a socket. Since the gdb-remote protocol occasionally contains binary data, and it does not assign any particular encoding to them, this is the right thing to do here. llvm-svn: 354114
* [testsuite] Convert TestSingleQuote to lit.Davide Italiano2019-02-123-85/+0
| | | | | | Nothing crazy, this is pretty mechanical. llvm-svn: 353894
* [gdb-remote] Use lldb's portable Host::GetEnvironment() instead of getenvAaron Smith2019-02-071-0/+1
| | | | | | | | | | | | Reviewers: zturner, llvm-commits, labath, serge-sans-paille Reviewed By: labath Subscribers: Hui, labath, lldb-commits Differential Revision: https://reviews.llvm.org/D56230 llvm-svn: 353440
* [lldb] Make frame recognizers vend synthesized eValueTypeVariableArgument valuesKuba Mracek2019-02-071-0/+2
| | | | llvm-svn: 353363
* [testsuite] Convert a pexpect test to lit.Davide Italiano2019-02-062-64/+0
| | | | | | | | | | | | | | Summary: Reviewers: JDevlieghere, friss, zturner, labath, jingham, serge-sans-paille Subscribers: llvm-commits, lldb-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D57840 llvm-svn: 353345
* Add the source directory for https://reviews.llvm.org/D57552.Jim Ingham2019-02-061-0/+7
| | | | llvm-svn: 353251
* Fix PathMappingList::FindFile to handle relative incoming FileSpecs.Jim Ingham2019-02-052-230/+246
| | | | | | | | | | | | An equivalent change was made to RemapPaths, but it needed to be made here as well. Also added a test for this and made the setup a little more complex to avoid false successes. <rdar://problem/47642498> Differential Revision: https://reviews.llvm.org/D57552 llvm-svn: 353243
* [Python2 to Python 3] Fix print -> print().Davide Italiano2019-02-051-6/+6
| | | | llvm-svn: 353130
* [Python] Python 2 and Python 3 disagree on `/`.Davide Italiano2019-01-311-1/+1
| | | | | | | | One considers it integer division, the other doesn't. Move to `//` (floor division) so that this test passes independently from the version. llvm-svn: 352706
* Adjust documentation for git migration.James Y Knight2019-01-291-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes most references to the paths: llvm.org/svn/ llvm.org/git/ llvm.org/viewvc/ github.com/llvm-mirror/ github.com/llvm-project/ reviews.llvm.org/diffusion/ to instead point to https://github.com/llvm/llvm-project. This is *not* a trivial substitution, because additionally, all the checkout instructions had to be migrated to instruct users on how to use the monorepo layout, setting LLVM_ENABLE_PROJECTS instead of checking out various projects into various subdirectories. I've attempted to not change any scripts here, only documentation. The scripts will have to be addressed separately. Additionally, I've deleted one document which appeared to be outdated and unneeded: lldb/docs/building-with-debug-llvm.txt Differential Revision: https://reviews.llvm.org/D57330 llvm-svn: 352514
OpenPOWER on IntegriCloud