apolyakov added inline comments.
================
Comment at: lit/tools/lldb-mi/target/inputs/target-select-so-path.py:8-11
+def get_free_port():
+ s = socket.socket()
+ s.bind(('', 0))
+ return s.getsockname()[1]
----------------
labath wrote:
> This is still racy, because the port can be snatched from under you between
> the time you get the free port and the time when lldb-server binds to it. If
> this was the only test doing it then it might be fine, but since this is
> going to be running concurrently with other tests, all of which are fetching
> free ports, the chances of that happening add up.
>
> (Also, binding to the wildcard address will trigger a firewall popup on some
> machines.)
There is a problem with getting port from lldb-server. If we run `lldb-server
gdbserver --pipe 0 ocalhost:0`, it'll print port number to its stdout, but we
can't get it using pipes since to do this we need to wait until lldb-server
finishes that isn't what we want.
https://reviews.llvm.org/D49739
_______________________________________________
lldb-commits mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits