[Lldb-commits] [PATCH] D49739: [WIP] Re-implement MI target-select command.

Pavel Labath via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed Jul 25 03:09:28 PDT 2018


labath added a comment.

In https://reviews.llvm.org/D49739#1174744, @apolyakov wrote:

> What do you think about running tests with a hardcoded port number(as it's done in a web-services). Doing this, we get rid of additional scripts and os-specific things. AFAIK, debugserver even has its own default port.


Even if you somehow managed (which I doubt) to find a port that has a reasonable chance of being free on most machines, then you'd still run into issues, because two of such tests could not run in parallel. Or you'd have to choose a different hard-coded port for each test, which again lowers your chance of not conflicting with anything.

Generally, I think ports are too scarce of a resource these days for anyone to be able to simply squat them and expect things will work. On unix you could do this with domain sockets, as you can put almost anything in their "address" (build folder, test name, timestamp, ...). However, that won't work on windows (though I believe it may be possible to get named pipes to do this for you there).

> P.S. As I saw in the lldb-mi python tests, port number is just a random value in a specific range, so, in general, it's the same as a hardcoded number.

Can you point me to the code that does this? If the tests are just choosing a random port and hoping it will be free, then I'm not surprised they are flaky.


https://reviews.llvm.org/D49739





More information about the lldb-commits mailing list