"For supporting multiple tests running in parallel, I think it might make sense to add support to the test framework for specifying a range of ports to use for the p2p and rpc ports on the command line, which the rpc_tests.py script could use. The logic now of hoping that pid's don't collide modulo some big number is not sufficiently robust in my opinion."
Original comment from @sdaftuar here.
"For supporting multiple tests running in parallel, I think it might make sense to add support to the test framework for specifying a range of ports to use for the p2p and rpc ports on the command line, which the rpc_tests.py script could use. The logic now of hoping that pid's don't collide modulo some big number is not sufficiently robust in my opinion."
Original comment from @sdaftuar here.