summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test/functionalities
Commit message (Collapse)AuthorAgeFilesLines
* Respect platform sysroot when loading core filesPavel Labath2018-08-281-9/+41
| | | | | | | Patch by Eugene Birukov <eugenebi@microsoft.com> Differential Revision: https://reviews.llvm.org/D49685 llvm-svn: 340841
* Disable exceptions for TestDataFormatterLibcxxOptional.pyFrederic Riss2018-08-251-1/+1
| | | | | | | | | | On macOS, some of the <optional> APIs used by the test are available only starting on macOS 10.14 when using exceptions. Build the test with -fno-exceptions so that the test builds on older systems too. rdar://problem/43700544 llvm-svn: 340676
* Add libc++ data formatter for std::functionAdrian Prantl2018-08-232-11/+30
| | | | | | | | | | | | - Added LibcxxFunctionSummaryProvider - Removed LibcxxFunctionFrontEnd - Modified data formatter tests to test new summary functionality Patch by Shafik Yaghmour! Differential Revision: https://reviews.llvm.org/D50864 llvm-svn: 340543
* Disable two flaky pexpect-backed tests on DarwinVedant Kumar2018-08-161-0/+2
| | | | | | | | These tests are sporadically timing out on our bots, e.g here: https://ci.swift.org/job/swift-PR-Linux/6841 llvm-svn: 339914
* Add libc++ data formatters for std::optional.Adrian Prantl2018-08-153-0/+124
| | | | | | | | | | Patch by Shafik Yaghmour! This reapplies an earlier version after addressing some post-commit feedback. Differential Revision: https://reviews.llvm.org/D49271 llvm-svn: 339828
* Update TestTargetXMLArch.py test for llvm triple change with unspecifiedJason Molenda2018-08-131-1/+1
| | | | | | components in r339294. llvm-svn: 339615
* [tests, libstdcxx] Add missing test category on the ↵Stella Stamenova2018-08-101-0/+1
| | | | | | | | TestDataFormatterStdUniquePtr tests Each test needs to be marked with the add_test_categories decorator individually. llvm-svn: 339457
* If a function starts with line number 0, don't try to check if a breakpoint ↵Jim Ingham2018-08-072-1/+7
| | | | | | | | | | crossed function boundaries. clang doesn't use line number 0 (to mean artifically generated code) very often, but swift does it quite often. We were rejecting all by line breakpoints in functions that started at line 0. But that's a special marker so we can just not do this test in that case. llvm-svn: 339182
* Add support for ARM and ARM64 breakpad generated minidump files (version 2).Greg Clayton2018-08-064-0/+155
| | | | | | | | | | | | | | | | In this patch I add support for ARM and ARM64 break pad files. There are two flavors of ARM: Apple where FP is R7, and non Apple where FP is R11. Added minimal tests that load up ARM64 and the two flavors or ARM core files with a single thread and known register values in each register. Each register is checked for the exact value. This is a fixed version of: https://reviews.llvm.org/D49750 The changes from D49750 are: Don't init the m_arch in the Initialize call as a system info isn't required. This keeps the thread list, module list and other tests from failing Added -Wextended-offsetof to Xcode project so we catch use extended usages of offsetof before submission Fixed any extended offset of warnings Differential Revision: https://reviews.llvm.org/D50336 llvm-svn: 339032
* Revert "Add support for ARM and ARM64 breakpad generated minidump files"Pavel Labath2018-08-034-155/+0
| | | | | | | | This reverts commit r338734 (and subsequent fixups in r338772 and r338746), because it breaks some minidump unit tests and introduces a lot of compiler warnings. llvm-svn: 338828
* [lldbsuite, windows] Mark tests as XFAIL on Windows or skip themStella Stamenova2018-08-026-2/+22
| | | | | | | | | | | | | | 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
* Add support for ARM and ARM64 breakpad generated minidump filesGreg Clayton2018-08-024-0/+155
| | | | | | | | In this patch I add support for ARM and ARM64 break pad files. There are two flavors of ARM: Apple where FP is R7, and non Apple where FP is R11. Added minimal tests that load up ARM64 and the two flavors or ARM core files with a single thread and known register values in each register. Each register is checked for the exact value. Differential Revision: https://reviews.llvm.org/D49750 llvm-svn: 338734
* Remove unnecessary target from TestCompletion patchRaphael Isemann2018-08-011-1/+0
| | | | | | | | | | As Jim pointed out, we don't need to manually create a target here because we already create a target implicitly in the very next line (which means we just created a target and don't use it). This patch just removes the line that creates the first unused target. llvm-svn: 338657
* Add the actually calculated completions to COMPLETION_MSGRaphael Isemann2018-07-271-2/+2
| | | | | | | | | | Summary: Otherwise this assertion message is not very useful to whoever is reading the log. Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D49947 llvm-svn: 338179
* Add missing boundary checks to variable completion.Raphael Isemann2018-07-272-2/+49
| | | | | | | | | | Summary: Stopgap patch to at least stop all the crashes I get from this code. Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D49949 llvm-svn: 338177
* Fix whitespace in the python test suite.Raphael Isemann2018-07-2730-95/+91
| | | | | | | | | | | | | 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
* Revert "Recommit [DataFormatters] Add formatter for C++17 std::optional."Davide Italiano2018-07-273-93/+0
| | | | | | | This broke a linux bot which doesn't support -std=c++17. The solution is to add a decorator to skip these tests on machines with older compilers. llvm-svn: 338162
* Recommit [DataFormatters] Add formatter for C++17 std::optional.Davide Italiano2018-07-273-0/+93
| | | | | | | | | | This should have all the correct files now. <rdar://problem/41471112> Patch by Shafik Yaghmour. Differential Revision: https://reviews.llvm.org/D49271 llvm-svn: 338156
* Fix duplicate suggestions after an ambiguous commandRaphael Isemann2018-07-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: So far lldb is printing this when it finds an ambiguous command: ``` (lldb) g Ambiguous command 'g'. Possible matches: gdb-remote gui gdb-remote gui ``` The duplicates come from the fact that we call the same query twice with the same parameters and add it to the same list. This patch just removes the second query call to `GetCommandObject`. As `GetCommandObject` is const and the name parameter is also not modified, this shouldn't break anything else. I didn't merge the remaining if statement into the else as I think otherwise the `if obj==nullptr do X else Y` pattern in there becomes hard to recognize. Reviewers: davide Reviewed By: davide Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D49866 llvm-svn: 338043
* Don't print two errors for unknown commands.Raphael Isemann2018-07-262-0/+40
| | | | | | | | | | | | | | | | | | | Summary: We always print two error messages when we hit an unknown command. As the function `CommandInterpreter::HandleCommand` that prints the second error message unconditionally called the `CommandInterpreter::ResolveCommandImpl` before (which prints the first error message), we can just remove that second error message. Fixes https://bugs.llvm.org/show_bug.cgi?id=38312 Reviewers: labath Reviewed By: labath Subscribers: labath, lldb-commits Differential Revision: https://reviews.llvm.org/D49831 llvm-svn: 338040
* Revert "[DataFormatters] Add formatter for C++17 std::optional."Davide Italiano2018-07-253-93/+0
| | | | | | | I forgot to git add some files. I'm going to recommit the correct version at once soon. llvm-svn: 337963
* [DataFormatters] Add formatter for C++17 std::optional.Davide Italiano2018-07-253-0/+93
| | | | | | | | | | <rdar://problem/41471112> Patch by Shafik Yaghmour. Differential Revision: https://reviews.llvm.org/D49271 llvm-svn: 337959
* Defend LoadImageUsingPaths against a path listJim Ingham2018-07-201-2/+19
| | | | | | with empty paths on it. llvm-svn: 337515
* Fix TestDataFormatterUnordered for older libc++ versionsPavel Labath2018-07-161-0/+5
| | | | | | | | | | | | | | clang recently started diagnosing "exception specification in declaration does not match previous declaration" errors. Unfortunately old libc++ versions had a bug, where they violated this rule, which means that tests using this library version now fail due to build errors. Since it was easy to work around the bug by compiling this test with -fno-exceptions, I do that here. If supporting old libc++ versions becomes a burden, we'll have to revisit this. llvm-svn: 337173
* Make these tests c++ tests so they can be skipped on systems that don't ↵Jim Ingham2018-07-132-4/+7
| | | | | | support those tests. llvm-svn: 337058
* Fix the libcxx set, multiset, vector and bitset formatters to work on ↵Jim Ingham2018-07-138-120/+202
| | | | | | | | | | | | | | | | references. The synthetic child providers for these classes had a type expression that matched pointers & references to the type, but the Front End only worked on the actual object. I fixed this by adding a way for the Synthetic Child FrontEnd provider to request dereference, and then had these formatters use that mode. <rdar://problem/40849836> Differential Revision: https://reviews.llvm.org/D49279 llvm-svn: 337035
* Fix TestAttachDenied on macOS MojaveFrederic Riss2018-07-132-0/+15
| | | | | | | | | TestAttachDenied tries to attach to a process that is ptracing itself and verifies that we error out. Starting with macOS Mojave, processes need an entitlement to be able to ptrace. This commit adds the entitlement for the test binary when building on Darwin. llvm-svn: 337029
* [testsuite] Implement a category to skip libstdcxx testsDavide Italiano2018-07-109-30/+9
| | | | | | | | | | | | | | | | On systems where it's not supported. As far as I understand Linux is the only systems which now ships with libstdcxx (maybe NetBSD?, but I'm not entirely sure of the state of lldb on the platform). We could make this more fine grained looking for the header as we do for libcxx. This is a little tricky as there's no such thing as /usr/include/c++/v1, but libstdcxx encodes the version number in the path (i.e. /usr/include/c++/5.4). I guess we might match a regex, but it seems fragile to me. Differential Revision: https://reviews.llvm.org/D49110 llvm-svn: 336724
* Rollback [test-suite] Add a decorator for the lack of libstdcxx on the system.Davide Italiano2018-07-099-9/+26
| | | | | | Pavel suggested an alternative approach that I'll try to implement. llvm-svn: 336608
* [test-suite] Add a decorator for the lack of libstdcxx on the system.Davide Italiano2018-07-069-26/+9
| | | | | | | | | This generalizes a bunch of target-specific tests. MacOS has no libstdcxx anymore, and neither does FreeBSD (or Windows). <rdar://problem/41896105> llvm-svn: 336463
* Remove a bunch more references to _LIBCPP_INLINE_VISIBILITYJim Ingham2018-07-068-40/+18
| | | | | | | | and adjust the tests that needed it to set their breakpoints more robustly. <rdar://problem/41867390> llvm-svn: 336403
* Don't muck with _LIBCPP_INLINE_VISIBILITY just to get predictable line table ↵Jim Ingham2018-07-051-9/+8
| | | | | | | | | | | | | | | entries. This test was trying to stop at a variety of std::vector calls. It looks like the test was failing because various inlined std functions left no line table entries for the line that invoked the inlined function. The author worked around that by undefining _LIBCPP_INLINE_VISIBILITY. That's an internal libcxx macro, we really shouldn't be playing around with it. Better to just force ourselves to stop where we want using some other non-inlineable statement. printf seems a good candidate... <rdar://problem/41867390> llvm-svn: 336397
* Fix and simplify lldb.command decoratorDave Lee2018-07-043-2/+45
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: This change fixes one issue with `lldb.command`, and also reduces the implementation. The fix: a command function's docstring was not shown when running `help <command_name>`. This is because the docstring attached the source function is not propagated to the decorated function (`f.__call__`). By returning the original function, the docstring will be properly displayed by `help`. Also with this change, the command name is assumed to be the function's name, but can still be explicitly defined as previously. Additionally, the implementation was updated to: * Remove inner class * Remove use of `inspect` module * Remove `*args` and `**kwargs` Reviewers: clayborg Reviewed By: clayborg Subscribers: keith, xiaobai, lldb-commits Differential Revision: https://reviews.llvm.org/D48658 llvm-svn: 336287
* [lldbsuite, windows] Don't crash LLDB when we try to retrieve a register on ↵Stella Stamenova2018-07-022-2/+3
| | | | | | | | | | | | | | | | Windows Summary: 1) When ReadRegister is called with a null register into on Windows, rather than crashing due to an access violation, simply return false. Not all registers and properties will be read or calculated correctly, but that is consistent with other platforms that also return false in that case 2) Update a couple of tests to reference pr37995 as their reason for failure since it is much more accurate. Support for floating point registers doesn't exist on Windows at all, rather than having issues. Reviewers: asmith, labath, zturner Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D48844 llvm-svn: 336147
* Fix TestLoadUsingPaths on linuxPavel Labath2018-06-291-0/+1
| | | | | | | we need to explicitly link the test program with -ldl for the dlopen function to be available. llvm-svn: 335956
* Add a way to load an image using a library name and list of paths.Jim Ingham2018-06-286-0/+184
| | | | | | | | | | This provides an efficient (at least on Posix platforms) way to offload to the target process the search & loading of a library when all we have are the library name and a set of potential candidate locations. <rdar://problem/40905971> llvm-svn: 335912
* [lldbsuite] Fix TestBreakpointHitCount on WindowsStella Stamenova2018-06-281-1/+1
| | | | | | | | | | | | Summary: On Windows, the newer DIA SDKs end up producing function names that contain the return type as well. This means that the function name returned in the test will contain the return type (int) in addition to the name of the function and the type of the input (a(int)). To account for the possibility of both, the test should pass if the function name matches either pattern. Reviewers: zturner, asmith Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D48654 llvm-svn: 335906
* Skip core file tests on build configurations lacking necessary componentsPavel Labath2018-06-281-0/+10
| | | | | | | | | | | | | | | | | | | Summary: To successfully open a core file, we need to have LLVM built with support for the relevant target. Right now, if one does not have the appropriate targets configured, the tests will fail. This patch uses the GetBuildConfiguration SB API to inform the test (and anyone else who cares) about the list of supported LLVM targets. The test then uses this information to approriately skip the tests. Reviewers: clayborg, jingham Subscribers: martong, lldb-commits Differential Revision: https://reviews.llvm.org/D48641 llvm-svn: 335859
* This is not a debug info sensitive test.Jim Ingham2018-06-261-0/+2
| | | | llvm-svn: 335688
* Fix TestThreadExit for gcc&libc++ comboPavel Labath2018-06-251-1/+2
| | | | | | | | | | | | | | | | pseudo_barrier_wait() begins by decrementing an atomic variable. Since these are always_inline in libc++, there is no line table anchor to break on before we decrement it. This meant that on gcc we stopped after the variable has been decremented, which meant that thread2 could have exited, violating the test setup. On clang this wasn't a problem because it generated some line table entries for the do{}while(0) loop in the macro, so we still ended up stopping, before we touched the variable. I fix this by adding a dummy statement before the pseudo_barrier_wait() command and setting the breakpoint there. llvm-svn: 335476
* Make testcase classnames uniqueJan Kratochvil2018-06-243-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | Filenames with test results contain only the class name which makes it more difficult to find it if the same class name is present in multiple *.py files. packages/Python/lldbsuite/test/functionalities/step-avoids-no-debug/TestStepNoDebug.py -class ReturnValueTestCase(TestBase): +class StepAvoidsNoDebugTestCase(TestBase): as ReturnValueTestCase is already present in: packages/Python/lldbsuite/test/functionalities/return-value/TestReturnValue.py packages/Python/lldbsuite/test/functionalities/thread/crash_during_step/TestCrashDuringStep.py -class CreateDuringStepTestCase(TestBase): +class CrashDuringStepTestCase(TestBase): as CreateDuringStepTestCase is already present in: packages/Python/lldbsuite/test/functionalities/thread/create_during_step/TestCreateDuringStep.py packages/Python/lldbsuite/test/functionalities/thread/step_until/TestStepUntil.py -class TestCStepping(TestBase): +class StepUntilTestCase(TestBase): as TestCStepping is already present in: packages/Python/lldbsuite/test/lang/c/stepping/TestStepAndBreakpoints.py llvm-svn: 335431
* [DataFormatter] Add CFDictionary data formatterJonas Devlieghere2018-06-212-1/+10
| | | | | | | | Add data formatter for NSCFDictionary/CFDictionaryRef. Differential revision: https://reviews.llvm.org/D48450 llvm-svn: 335271
* Make test sources compatible with android+libcxx+modulesPavel Labath2018-06-201-45/+45
| | | | | | | | | | | | | | In a modules build, android is very picky about which symbols are visible after including libc++ headers (e.g. <cstdio> defines only std::printf and not ::printf). This consolidates the tests where this was an issue to always include the <c???> version of the headers and prefixes the symbols with std:: as necessary. Apart from that, there is no functional change in the tests. llvm-svn: 335149
* Make sure TestNumThreads works with libc++Pavel Labath2018-06-202-2/+6
| | | | | | | | | | | | | | | | The problem was that with libc++ the std::unique_lock declaration was completely inlined, so there was no line table entry in the main.cpp file to set a breakpoint on. Therefore, the breakpoint got moved to the next line, but that meant the test would deadlock as the thread would stop with the lock already held. I fix that issue by adding a dummy statement before the std::unique_lock line to anchor the breakpoint. I think this should fix the issue because of which this test was disabled on darwin, but someone should verify that before enabling it. llvm-svn: 335132
* Make TestCommandScript.py NO_DEBUG_INFO_TESTCASEPavel Labath2018-06-191-0/+1
| | | | llvm-svn: 335051
* Fix the 'tb' alias commandFrederic Riss2018-06-181-0/+25
| | | | | | | No idea when this broke or if it ever worked. Added a small test for one-shot breakpoints while I was there. llvm-svn: 334921
* Fix TestExec after r334783Frederic Riss2018-06-151-8/+1
| | | | | | | | | | | | The second makefile that was added has implicit rules which meant that secondprog.cpp would be built once into a secondprog binary, but it would also be compiled as a.out overwriting the main binary. This lead to spurious failures. This commit simplifies the Makefile to build only once with the correct executable name. llvm-svn: 334861
* Change TestExec.py from creating an i386+x86_64 fat binaryJason Molenda2018-06-155-90/+87
| | | | | | | | | | on darwin systems and re-execing itself, to creating two separate test programs; lldb runs the first program and it exec's the second. Support for compiling for i386 is going away. llvm-svn: 334783
* [lit] Split test_set_working_dir TestProcessLaunch into two tests and fix it ↵Stella Stamenova2018-06-131-11/+28
| | | | | | | | | | | | | | | | | | | | | | on Windows Summary: test_set_working_dir was testing two scenario: failure to set the working dir because of a non existent directory and succeeding to set the working directory. Since the negative case fails on both Linux and Windows, the positive case was never tested. I split the test into two which allows us to always run both the negative and positive cases. The positive case now succeeds on Linux and the negative case still fails. During the investigation, it turned out that lldbtest.py will try to execute a process launch command up to 3 times if the command failed. This means that we could be covering up intermittent failures by running any test that does process launch multiple times without ever realizing it. I've changed the counter to 1 (though it can still be overwritten with the environment variable). This change also fixes both the positive and negative cases on Windows. There were a few issues: 1) In ProcessLauncherWindows::LaunchProcess, the error was not retrieved until CloseHandle was possibly called. Since CloseHandle is also a system API, its success would overwrite any existing error that could be retrieved using GetLastError. So by the time the error was retrieved, it was now a success. 2) In DebuggerThread::StopDebugging TerminateProcess was called on the process handle regardless of whether it was a valid handle. This was causing the process to crash when the handle was LLDB_INVALID_PROCESS (0xFFFFFFFF). 3) In ProcessWindows::DoLaunch we need to check that the working directory exists before launching the process to have the same behavior as other platforms which first check the directory and then launch process. This way we also control the exact error string. Reviewers: labath, zturner, asmith, jingham Reviewed By: labath Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D48050 llvm-svn: 334642
* [ObjC] Add dataformatter for NSDecimalNumberJonas Devlieghere2018-06-132-1/+13
| | | | | | | | | | This patch adds a data formatter for NSDecimalNumber. The latter is a Foundation object used for representing and performing arithmetic on base-10 numbers that bridges to Decimal. Differential revision: https://reviews.llvm.org/D48114 llvm-svn: 334638
OpenPOWER on IntegriCloud