[lldb][tests] Automatically call compute_mydir (NFC)Eliminate boilerplate of having each test manually assign to `mydir` by calling`compute_mydir` in lldbtest.py.Differential Revision: https://r
[lldb][tests] Automatically call compute_mydir (NFC)Eliminate boilerplate of having each test manually assign to `mydir` by calling`compute_mydir` in lldbtest.py.Differential Revision: https://reviews.llvm.org/D128077
show more ...
[lldb/test] s/add_no_ack_remote_stream/do_handshakeThese two functions are doing the same thing, only one of them issending the packets immediately and the other "queues" them to be sentlater. Th
[lldb/test] s/add_no_ack_remote_stream/do_handshakeThese two functions are doing the same thing, only one of them issending the packets immediately and the other "queues" them to be sentlater. The first one is better as in case of errors, the backtrace willpoint straight to the place that caused them.Modify the first method to avoid duplication, and ten standardize on it.
[lldb] Remote leftover _llgs from TestGdbRemoteConnection.pythe suffix will be added when the test is instantiated for llgs anddebugserver.
[lldb/test] Test lldb-server named pipe functionality on windowslldb-server can use a named pipe to communicate the port number it islistening on. This windows bits of this are already implemented
[lldb/test] Test lldb-server named pipe functionality on windowslldb-server can use a named pipe to communicate the port number it islistening on. This windows bits of this are already implemented, but wedid not have a test for that, most likely because python does not havenative pipe functionality.This patch implements the windows bits necessary to test this. I'm usingthe ctypes package to call the native APIs directly to avoid adependency to non-standard python packages. This introduces some amountof boilerplate, but our named pipe use case is fairly limited, so weshould not end up needing to wrap large chunks of windows APIs.Surprisingly to changes to lldb-server were needed to make the testpass.Differential Revision: https://reviews.llvm.org/D96260
[lldb] Deduplicate more lldb-server testsUse auto-generation of lldb-server&debugserver variants.
[lldb] Deduplicate some lldb-server testsMerge llgs and debugserver flavours
[lldb/test] Automatically skip remote lldb-server tests when applicableThe tests don't work with remote debugservers. This isn't a problem withany particular test, but the test infrastructure itse
[lldb/test] Automatically skip remote lldb-server tests when applicableThe tests don't work with remote debugservers. This isn't a problem withany particular test, but the test infrastructure itself, which is whyeach of these tests has a @skipIfDarwinEmbedded decorator.This patch replaces that with a central category-based solution. It alsomoves the ad-hoc windows skipping mechanism there too.
[lldb/test] Reduce boilerplate in lldb-server testsNearly all of our lldb-server tests have two flavours (lldb-server anddebugserver). Each of them is tagged with an appropriate decorator, andeac
[lldb/test] Reduce boilerplate in lldb-server testsNearly all of our lldb-server tests have two flavours (lldb-server anddebugserver). Each of them is tagged with an appropriate decorator, andeach of them starts with a call to a matching "init" method. The initcalls are mandatory, and it's not possible to meaningfully combine themwith a different decorator.This patch leverages the existing decorators to also tag the tests withthe appropriate debug server tag, similar to how we do with debug infoflavours. This allows us to make the "init" calls from inside the commonsetUp method.
[lldb] Enable FreeBSDRemote plugin by default and update test statusThe new FreeBSDRemote plugin has reached feature parity on i386and amd64 targets. Use it by default on these architectures, whi
[lldb] Enable FreeBSDRemote plugin by default and update test statusThe new FreeBSDRemote plugin has reached feature parity on i386and amd64 targets. Use it by default on these architectures, whileallowing the use of the legacy plugin via FREEBSD_LEGACY_PLUGIN envvar.Revisit the method of switching plugins. Apparently, the return valueof PlatformFreeBSD::CanDebugProcess() is what really decides whetherthe legacy or the new plugin is used.Update the test status. Reenable the tests that were previouslydisabled on FreeBSD and do not cause hangs or are irrelevant to FreeBSD.Mark all tests that fail reliably as expectedFailure. For now, teststhat are flaky (i.e. produce unstable results) are left enabledand cause unpredictable test failures.Differential Revision: https://reviews.llvm.org/D90757
[lldb] Use reverse connection method for lldb-server testsThis fixes an flakyness is all gdb-remote tests. These tests have been(mildly) flaky since we started using "localhost" instead of 127.0.0
[lldb] Use reverse connection method for lldb-server testsThis fixes an flakyness is all gdb-remote tests. These tests have been(mildly) flaky since we started using "localhost" instead of 127.0.0.1in the test suite. The reason is that lldb-server needs to create twosockets (v4 and v6) to listen for localhost connections. The algorithmit uses first tries to select a random port (bind(localhost:0)) for thefirst address, and then bind the same port for the second one.The creating of the second socket can fail as there's no guarantee thatport will be available -- it seems that the (linux) kernel tries tochoose an unused port for the first socket (I've had to create thousandsof sockets to reproduce this reliably), but this can apparantly failwhen the system is under load (and our test suite creates a _lot_ ofsockets).The socket creationg operation is considered successful if it creates atleast one socket is created, but the test harness has no way of knowingwhich one it is, so it can end up connecting to the wrong address.I'm not aware of a way to atomically create two sockets bound to thesame port. One way to fix this would be to make lldb-server report theaddress is it listening on instead of just the port. However, this wouldbe a breaking change and it's not clear to me that's worth it (thealgorithm works pretty well under normal circumstances).Instead, this patch sidesteps that problem by using "reverse"connections. This way, the test harness is responsible for creating thelistening socket so it can pass the address that it has managed to open.It also results in much simpler code overall.To preserve test coverage for the named pipe method, I've moved therelevant code to a dedicated test. To avoid original problem, this testpasses raw addresses (as obtained by getaddrinfo(localhost)) instead of"localhost".Differential Revision: https://reviews.llvm.org/D90313
[lldb/ipv6] Support running lldb tests in an ipv6-only environment.When running in an ipv6-only environment where `AF_INET` sockets are not available, many lldb tests (mostly gdb remote tests) fail
[lldb/ipv6] Support running lldb tests in an ipv6-only environment.When running in an ipv6-only environment where `AF_INET` sockets are not available, many lldb tests (mostly gdb remote tests) fail because things like `127.0.0.1` don't work there.Use `localhost` instead of `127.0.0.1` whenever possible, or include a fallback of creating `AF_INET6` sockets when `AF_INET` fails.Reviewed By: labathDifferential Revision: https://reviews.llvm.org/D87333
[lldb] Unify sleep and time outs in GDB remote testcasesReduce sleep and time outs in GDB remote testcases to one default valuefor each. Stop passing these values around and always use the default
[lldb] Unify sleep and time outs in GDB remote testcasesReduce sleep and time outs in GDB remote testcases to one default valuefor each. Stop passing these values around and always use the defaultinstead.Differential revision: https://reviews.llvm.org/D83904
[lldb][test] Remove symlink for API tests.Summary: Moves lldbsuite tests to lldb/test/API.This is a largely mechanical change, moved with the following steps:```rm lldb/test/API/testcasesmkdi
[lldb][test] Remove symlink for API tests.Summary: Moves lldbsuite tests to lldb/test/API.This is a largely mechanical change, moved with the following steps:```rm lldb/test/API/testcasesmkdir -p lldb/test/API/{test_runner/test,tools/lldb-{server,vscode}}mv lldb/packages/Python/lldbsuite/test/test_runner/test lldb/test/API/test_runnerfor d in $(find lldb/packages/Python/lldbsuite/test/* -maxdepth 0 -type d | egrep -v "make|plugins|test_runner|tools"); do mv $d lldb/test/API; donefor d in $(find lldb/packages/Python/lldbsuite/test/tools/lldb-vscode -maxdepth 1 -mindepth 1 | grep -v ".py"); do mv $d lldb/test/API/tools/lldb-vscode; donefor d in $(find lldb/packages/Python/lldbsuite/test/tools/lldb-server -maxdepth 1 -mindepth 1 | egrep -v "gdbremote_testcase.py|lldbgdbserverutils.py|socket_packet_pump.py"); do mv $d lldb/test/API/tools/lldb-server; done```lldb/packages/Python/lldbsuite/__init__.py and lldb/test/API/lit.cfg.py were also updated with the new directory structure.Reviewers: labath, JDevlieghereTags: #lldbDifferential Revision: https://reviews.llvm.org/D71151