On Wed, Dec 05, 2018 at 12:17:09AM -0500, Jeff King wrote: > On Tue, Dec 04, 2018 at 05:34:56PM +0100, SZEDER Gábor wrote: > > > Several test scripts run daemons like 'git-daemon' or Apache, and > > communicate with them through TCP sockets. To have unique ports where > > these daemons are accessible, the ports are usually the number of the > > corresponding test scripts, unless the user overrides them via > > environment variables, and thus all those tests and test libs contain > > more or less the same bit of one-liner boilerplate code to find out > > the port. The last patch in this series will make this a bit more > > complicated. > > > > Factor out finding the port for a daemon into the common helper > > function 'test_set_port' to avoid repeating ourselves. > > OK. Looks like this should keep the same port numbers for all of the > existing tests, which I think is good. Not for all existing tests, though: t0410 and the 'git p4' tests do get different ports. Hrm, speaking of affecting 'git p4' tests... I should have put Luke on Cc, so doing it now.