summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test/functionalities
Commit message (Collapse)AuthorAgeFilesLines
* [lldb] Fix and test completion for ambiguous long optionsRaphael Isemann2019-08-281-0/+7
| | | | | | | | | | The refactoring patch for the option completion broke the completion for ambiguous long options. As this feature was also untested (as testing ambiguous options with the current test methods is impossible), I just noticed now. This patch restores the old behavior and adds a test for this feature. llvm-svn: 370185
* [test] Disable TestConcurrentManySignals on Darwin.Jonas Devlieghere2019-08-281-0/+2
| | | | | | This test is flaky on GreenDragon. Disable it until we figure out why. llvm-svn: 370136
* [lldb][NFC] Add missing invalid_core_file to TestTargetCommand testRaphael Isemann2019-08-271-0/+1
| | | | llvm-svn: 370057
* [lldb][NFC] Add some tests for the target subcommandsRaphael Isemann2019-08-271-1/+145
| | | | llvm-svn: 370050
* [lldb][NFC] Give added test method a unique nameRaphael Isemann2019-08-271-2/+2
| | | | | | | | Otherwise dotest doesn't run the test and just lets it always pass. Also update the comment to explain that we do directory and not file completion. llvm-svn: 370047
* [lldb] Allow partial completions to fix directory completion.Raphael Isemann2019-08-271-0/+7
| | | | | | | | | | | | On the command line we usually insert a space after a completion to indicate that the completion was successful. After the completion API refactoring, this also happens with directories which essentially breaks file path completion (as adding a space terminates the path and starts a new arg). This patch restores the old behavior by again allowing partial completions. Also extends the iohandler and SB API tests as the implementation for this is different in Editline and SB API. llvm-svn: 370043
* [test] Disable two of the recently (re)enabled tests on Windows.Jonas Devlieghere2019-08-271-0/+1
| | | | | | This disables two tests on Windows that I re-enabled in r369995. llvm-svn: 370003
* [dotest] Remove long running test "decorator" and re-enable tests.Jonas Devlieghere2019-08-275-15/+0
| | | | | | | | | | | | Today I discovered the skipLongRunningTest decorator and to my surprise all the tests were passing without the decorator. They don't seem to be that expensive either, they take a few seconds but we have tests that take much longer than that. As such I propose to remove the decorator and enable them by default. Differential revision: https://reviews.llvm.org/D66774 llvm-svn: 369995
* Skip tail call frame tests when dwarf_version < 4Vedant Kumar2019-08-238-8/+16
| | | | | | rdar://problem/54656572 llvm-svn: 369821
* [lldb][NFC] Add test for target stop-hook disable/enable/deleteRaphael Isemann2019-08-221-5/+28
| | | | llvm-svn: 369646
* [lldb][NFC] Merge multiple TestApropos.pyRaphael Isemann2019-08-211-0/+10
| | | | | | That's cleaner and makes lldb-dotest no longer fail due to conflicting names. llvm-svn: 369530
* [lldb] Add tests for setting completions and enable 'settings remove' completionRaphael Isemann2019-08-211-0/+18
| | | | llvm-svn: 369521
* [lldb][NFC] Add tests for register commandRaphael Isemann2019-08-211-0/+13
| | | | llvm-svn: 369513
* [lldb][NFC] Add tests for invalid command invocationsRaphael Isemann2019-08-215-0/+77
| | | | llvm-svn: 369506
* Update a few tests that may change the platform to save & restoreJason Molenda2019-08-213-4/+23
| | | | | | | | | | | 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
* [LLDB][Test] Remove `skipIfWindows` for conditional breakpoint test (NFC)Med Ismail Bennani2019-08-201-8/+0
| | | | | | | | | | | | | | | | | | | | | Summary: The test for conditional breakpoints on Windows was skipped because there was no expression evaluation support at the time it was written. After removing the annotation and testing it again, the test is passing. http://lists.llvm.org/pipermail/lldb-dev/2019-August/015405.html Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com> Reviewers: stella.stamenova, jingham Subscribers: lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D66499 llvm-svn: 369453
* [lldb][NFC] Test quotes when completingRaphael Isemann2019-08-201-0/+26
| | | | llvm-svn: 369353
* [lldb][NFC] Add a few more completion tests to increase test coverageRaphael Isemann2019-08-191-0/+23
| | | | | | | These tests are mostly trying to reach the different completion functions in CommandCompletions.cpp (::ArchitectureNames, ::DiskFiles, ::Modules). llvm-svn: 369249
* Stop-hooks weren't getting called on step-out. Fix that.Jim Ingham2019-08-153-0/+65
| | | | | | | | | | | | | | | | There was a little bit of logic in the StopInfoBreakpoint::PerformAction that would null out the StopInfo once we had a completed plan so that the next call to GetStopInfo would replace it with the StopInfoThreadPlan. But the stop-hooks check for whether a thread stopped for a reason didn't trigger this conversion. So I added an API to do that directly, and then called it where before we just reset the StopInfo. <rdar://problem/54270767> Differential Revision: https://reviews.llvm.org/D66241 llvm-svn: 369052
* [Formatters] Temporarily disable libc++ std::function formatter due to ↵Shafik Yaghmour2019-08-021-0/+3
| | | | | | | | | | performance issue Summary: We have been seeing increased reports of performance issue around large project and formatting std::function variables especially in functions signatures in back traces. There are some possible fixes but exploring those fixes may take time and it is better to temporarily disable the formatter due to its impact and re-enable it once we have a fix. Differential Revision: https://reviews.llvm.org/D65666 llvm-svn: 367701
* [lldb][NFC] Remove unused imports in python testsRaphael Isemann2019-08-02250-513/+0
| | | | llvm-svn: 367663
* Fix `skipIfSanitized` decorator on macOSJonas Devlieghere2019-08-011-2/+2
| | | | | | | | | | | For security reasons, DYLD_INSERT_LIBRARIES is not propagated to a child process. This breaks the skipIfSanitized decorator, which checks for the environment variable being set. Instead, always set the ASAN_OPTIONS and make the decorator check for that. Differential revision: https://reviews.llvm.org/D65594 llvm-svn: 367595
* Fix TestThreadSpecificBreakpoint on WindowsAdrian McCarthy2019-08-012-15/+14
| | | | | | | | | | | | | | | | | | This test was frequently hanging on Windows, causing a timeout after 10 minutes. The short delay (100 microsecond) in the sample program could cause a deadlock in the Windows thread pool, as I've explained in the test program's comments. Now that it doesn't hang, it passes reliably, so I've removed the Windows-specific XFAIL. I've tried to clarify the comments in TestThreadSpecificGBreakpoint.py by eliminating some redundancy and typos, and I simplified away a couple unnecessary assignments. Differential Revision: https://reviews.llvm.org/D65546 llvm-svn: 367573
* Fix completion for functions in anonymous namespacesJonas Devlieghere2019-07-312-0/+6
| | | | | | | | | | | | | | | | | I was going through some of the old bugs and came across PR21069 which I was able to reproduce. The issue is that we match the regex `^foo` against the `DW_AT_name` in the DWARF, which for our anonymous function is indeed `foo`. However, when we get the function name from the symbol context, the result is `(anonymous namespace)::foo()`. This throws off completions, which assumes that it's appending to whatever is already present on the input, resulting in a bogus `b fooonymous\ namespace)::foo()`. Bug report: https://llvm.org/PR21069 Differential revision: https://reviews.llvm.org/D65498 llvm-svn: 367455
* Test load unloading of modules with libraries-svr4Antonio Afonso2019-07-291-0/+40
| | | | | | | | | | | | | | | | | | Summary: This doubles the 3 tests running right now on linux by also executing each test with libraries-svr4 enabled. Not sure if there's a better way to do this as I had to copy/paste all the decorators as well... Reviewers: labath, clayborg, xiaobai Reviewed By: labath Subscribers: srhines, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D65129 llvm-svn: 367247
* [lldb] Increase testsuite packet-timeout 5secs -> 1minJan Kratochvil2019-07-291-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | rL357954 did increase `packet-timeout` 1sec -> 5secs. Which is IMO about the maximum timeout reasonable for regular use. But for testsuite I think the timeout should be higher as the testsuite runs in parallel and it can be run even on slow hosts and with other load (moreover if it runs on some slow arch). I have chosen 60 secs, that should be enough hopefully. Larger value could make debugging with hanging `lldb-server` annoying. This patch was based on this testsuite timeout: http://lab.llvm.org:8014/builders/lldb-x86_64-fedora/builds/546/steps/test/logs/stdio FAIL: test_connect (TestGDBRemoteClient.TestGDBRemoteClient) Test connecting to a remote gdb server ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/jkratoch/slave-lldb-x86_64-fedora/lldb-x86_64-fedora/llvm/tools/lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestGDBRemoteClient.py", line 13, in test_connect process = self.connect(target) File "/home/jkratoch/slave-lldb-x86_64-fedora/lldb-x86_64-fedora/llvm/tools/lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/gdbclientutils.py", line 480, in connect self.assertTrue(error.Success(), error.description) AssertionError: False is not True : failed to get reply to handshake packet Differential Revision: https://reviews.llvm.org/D65271 llvm-svn: 367234
* [lldb] [test] Mark three new tests XFAIL on NetBSDMichal Gorny2019-07-292-0/+3
| | | | llvm-svn: 367228
* [Tests] Split inferior crashing testsJonas Devlieghere2019-07-264-196/+359
| | | | | | | | We noticed that TestInferiorCrashing.py and TestRecursiveInferior.py are the second and third slowest tests in the test suite. Splitting them up allows lit to schedule them more effectively. llvm-svn: 367077
* [lldb] [Process/NetBSD] Report stopped process on SIGSTOPMichal Gorny2019-07-252-2/+0
| | | | | | | | | | | | | Mark the process as stopped when SIGSTOP arrives. This is necessary for lldb-server to generate correct response to 'process interrupt', and therefore to prevent the whole stack crashing when process is stopped. Thanks to Pavel Labath for the tip. Differential Revision: https://reviews.llvm.org/D65289 llvm-svn: 367047
* LLGS: fix tracking execve on linuxPavel Labath2019-07-252-73/+13
| | | | | | | | | | | | | | | | | | | Summary: Due to a logic error, lldb-server ended up asserting/crashing every time the debugged process attempted an execve(). This fixes the error, and extends TestExec to work on other platforms too. The "extension" consists of avoiding non-standard posix_spawn extensions and using the classic execve() call, which should be available on any platform that actually supports re-execing. I change the test decorator from @skipUnlessDarwin to @skipIfWindows. Reviewers: clayborg, jasonmolenda Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D65207 llvm-svn: 366985
* [lldb][test_suite] Update tests with unexpected pass on Android aarch64Alex Langford2019-07-2310-16/+31
| | | | | | | | | | 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
* Support Linux signal return trampolines in frame initializationJoseph Tremoulet2019-07-193-0/+102
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Add __kernel_rt_sigreturn to the list of trap handlers for Linux (it's used as such on aarch64 at least), and __restore_rt as well (used on x86_64). Skip decrement-and-recompute for trap handlers in InitializeNonZerothFrame, as signal dispatch may point the child frame's return address to the start of the return trampoline. Parse the 'S' flag for signal handlers from eh_frame augmentation, and propagate it to the unwind plan. Reviewers: labath, jankratochvil, compnerd, jfb, jasonmolenda Reviewed By: jasonmolenda Subscribers: clayborg, MaskRay, wuzish, nemanjai, kbarton, jrtc27, atanasyan, jsji, javed.absar, kristof.beyls, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D63667 llvm-svn: 366580
* [lldb] Make TestDeletedExecutable more reliableRaphael Isemann2019-07-112-5/+25
| | | | | | | | | | | | | | | | | | | | | Summary: It seems that calling Popen can return to the caller before the started process has read all the needed information from its executable. This means that in case we delete the executable while the process is still starting up, this test will create a zombie process which in turn leads to a failing test. On my macOS system this happens quite frequently. This patch fixes this by letting the test synchronize with the inferior after it has started up. Reviewers: davide Reviewed By: davide Subscribers: labath, friss, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D64546 llvm-svn: 365813
* [lldb-suite] Skip TestMachCore on WindowsStella Stamenova2019-07-091-1/+4
| | | | | | This test was originally marked as expected failure on Windows, but it is timing out instead of outright failing now. The expectedFailure attribute does not correctly track timeouts (as in, they don't count as failures), so now this is causing the test suite to fail. llvm-svn: 365527
* [lldb] [test] Update NetBSD XFAILs in test suiteMichal Gorny2019-07-086-0/+8
| | | | llvm-svn: 365338
* [lldb] [lldbsuite] Use a unique class name for TestBacktraceAllStella Stamenova2019-07-011-1/+1
| | | | | | It looks like when this test was added, it was based on TestBreakAfterJoin and it ended up with the same class name. This is an issue because the logs associated with the tests use the class name as the identifier for the file and if two tests have the same name their logs overwrite each other. On non-windows, this just means we lose one of the logs, but on Windows this means that one of the tests will fail occasionally because the file are locked by the other test. llvm-svn: 364826
* [lldb] [Process/NetBSD] Use global enable bits for watchpointsMichal Gorny2019-07-0112-20/+0
| | | | | | | | | | | Set global enable bits (i.e. bits 1, 3, 5, 7) to enable watchpoints on NetBSD rather than the local enable bits (0, 2, 4, 6). The former are necessary for watchpoints to be correctly recognized by the NetBSD kernel. The latter cause them to be reported as trace points. Differential Revision: https://reviews.llvm.org/D63792 llvm-svn: 364781
* @skipIfXmlSupportMissing TestRecognizeBreakpointPavel Labath2019-07-011-0/+1
| | | | llvm-svn: 364753
* Replace tabs with spaces.Adrian Prantl2019-06-291-2/+2
| | | | llvm-svn: 364716
* Make sure the thread list is updated before you set the stop reasonJim Ingham2019-06-283-0/+206
| | | | | | | | | | | | | | | on a thread. When talking to some older gdb-remote stubs, We were getting a stop reason from the stop reply packet and setting it on the relevant thread before we updated the full stop list. That would get discarded when the full list was updated. Also, if you already have a thread list when you go to see if there is an Operating System plugin, and you do indeed load a new OS plugin, you have to re-fetch the thread list or it will only show the raw threads. Differential Revision: https://reviews.llvm.org/D62887 llvm-svn: 364666
* Support nested target.xml register definition files, lack of reg group markers.Jason Molenda2019-06-261-0/+238
| | | | | | | | | | | | | | | | | | | | | The qemu x86_64 target returns a target.xml register definition file which includes other xml files and they include others, etc. Also, the registers are not put in register groups like lldb wants to see. This patch (1) puts registers that aren't in a register group in a "general" register group, (2) change ProcessGDBRemote::GetGDBServerRegisterInfo to be a method that starts the parsing, asking a recurisve function to fetch and parse target.xml, (3) adds ProcessGDBRemote::GetGDBServerRegisterInfoXMLAndProcess which can recusively call itself to read and parse included xml files, (4) in addition to expecting the top-level <target> element (which only happens in the top level xml file), also an xml file that consists of a <feature> node - read the register defintions and includes from that <feature> element. <rdar://problem/49537922> Differential revision: https://reviews.llvm.org/D63802 llvm-svn: 364484
* Skip failing test on older versions of clang.Adrian Prantl2019-06-121-0/+1
| | | | llvm-svn: 363202
* [ABI] Fix SystemV ABI to handle nested aggregate type returned in registerAlex Langford2019-06-043-5/+236
| | | | | | | | | | Add a function to flatten the nested aggregate type Differential Revision: https://reviews.llvm.org/D62702 Patch by Wanyi Ye <kusmour@gmail.com> llvm-svn: 362543
* [lldb] [test] Mark frequently failing flaky tests skipped on NetBSDMichal Gorny2019-05-153-4/+4
| | | | llvm-svn: 360767
* TestMinidumpNew.py: Use yaml2obj where possiblePavel Labath2019-05-1410-79/+147
| | | | | | | | | Replace checked-in minidumps with their yaml forms now that yaml2obj supports the ThreadList stream. I delete the test_modules_in_mini_dump test altogether as this functionality is covered more systematically in TestMinidumpUUID.py. llvm-svn: 360655
* Change the disabling of packet logging to be in TearDownHook lambdas.Jason Molenda2019-05-104-12/+9
| | | | llvm-svn: 360482
* Ted pointed out that some of test tests that are enabling packetJason Molenda2019-05-104-7/+17
| | | | | | | | logging when the testsuite is run with trace mode enabled are leaving the logging enabled after the tests have finished. That state isn't cleared in a --no-multiprocess testsuite run. llvm-svn: 360480
* minidump: Don't eagerly resolve module paths read from the minidumpPavel Labath2019-05-102-1/+29
| | | | | | | | This can cause us to return paths to files on the local filesystem even if we don't end up using that file (for instance because the file is not a real module). llvm-svn: 360432
* Revert "Disable the step over skipping calls feature since buildbots are not ↵Pavel Labath2019-05-101-1/+0
| | | | | | | | | | | | | | | | happy." While this fixed the windows bot failures, it also broke all other bots. Upon closer inspection, it turns out that the windows bots were "broken" because two tests were unexpectedly passing -- i.e., the original patch (r360375) actually improved our stepping support on windows. So instead, I remove the relevant XFAILs. This reverts commit r360397. llvm-svn: 360407
* Improve step over performance by not stopping at branches that are function ↵Greg Clayton2019-05-091-4/+3
| | | | | | | | | | calls and stepping into and them out of each one Currently when we single step over a source line, we run and stop at every branch in the source line range. We can reduce the number of times we stop when stepping over by figuring out if any of these branches are function calls, and if so, ignore these branches. Since we are stepping over we can safely ignore these calls since they will return to the next instruction. Currently the step logic would stop at those branches (1st stop), single step into the branch (2nd stop), and then set a breakpoint at the return address (3rd stop), and then continue. Differential Revision: https://reviews.llvm.org/D58678 llvm-svn: 360375
OpenPOWER on IntegriCloud