[lldb/test] Test lldb-server named pipe functionality on windows
authorPavel Labath <pavel@labath.sk>
Mon, 8 Feb 2021 09:28:42 +0000 (10:28 +0100)
committerPavel Labath <pavel@labath.sk>
Tue, 16 Feb 2021 14:47:39 +0000 (15:47 +0100)
commit85f025e5b33d148808177427eebca4cc14f93079
tree1da49c1b5fea54016d9ce360fd3b04b9e31cc119
parentb6e52d8fa7217db319e240854a9d8ff3133d02b6
[lldb/test] Test lldb-server named pipe functionality on windows

lldb-server can use a named pipe to communicate the port number it is
listening on. This windows bits of this are already implemented, but we
did not have a test for that, most likely because python does not have
native pipe functionality.

This patch implements the windows bits necessary to test this. I'm using
the ctypes package to call the native APIs directly to avoid a
dependency to non-standard python packages. This introduces some amount
of boilerplate, but our named pipe use case is fairly limited, so we
should not end up needing to wrap large chunks of windows APIs.

Surprisingly to changes to lldb-server were needed to make the test
pass.

Differential Revision: https://reviews.llvm.org/D96260
lldb/test/API/tools/lldb-server/commandline/TestGdbRemoteConnection.py