<p>Corey Farrell <strong>posted comments</strong> on this change.</p><p><a href="https://gerrit.asterisk.org/8691">View Change</a></p><p>Patch set 1:</p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;"><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;"><p style="white-space: pre-wrap; word-wrap: break-word;">Has this been verified against tests with multiple instances of<br>sipp?  What would stop test_suite_utils.py from returning the<br>same<br>point multiple times?  That is if step 1 we find multiple ports,<br>then step 2 we start multiple instances of sipp.</p></blockquote><p style="white-space: pre-wrap; word-wrap: break-word;">I tested it against a few different tests including<br>"tests/channels/pjsip/incoming_calls_without_auth" which starts up<br>28 scenarios. Note, for that test I change all the scenario xml<br>files to use [media_port] instead of the hard coded value before<br>testing.</p><p style="white-space: pre-wrap; word-wrap: break-word;">The OS handles whether or not the port is available, but I think<br>you are saying that there possibly exists a window between us<br>getting the port and from when we bind to it right? Which, I<br>believe you are correct.</p></blockquote><p style="white-space: pre-wrap; word-wrap: break-word;">My concern was/is that get_available_port binds a socket, gets the port, closes the socket, then returns the port.  What would stop the very next call to get_available_port from returning the same port?  I think this assumes that s.bind('', 0) will not bind the same port twice in a row?</p><p style="white-space: pre-wrap; word-wrap: break-word;">In any case I wonder if maybe the appropriate fix is to patch sipp itself?</p><ul style="list-style: none; padding-left: 20px;"></ul><p>To view, visit <a href="https://gerrit.asterisk.org/8691">change 8691</a>. To unsubscribe, visit <a href="https://gerrit.asterisk.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.asterisk.org/8691"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: testsuite </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: comment </div>
<div style="display:none"> Gerrit-Change-Id: I3da461123afc30e1f5ca12e65d289eaa42d6de00 </div>
<div style="display:none"> Gerrit-Change-Number: 8691 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Kevin Harwell <kharwell@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Corey Farrell <git@cfware.com> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins2 </div>
<div style="display:none"> Gerrit-Reviewer: Kevin Harwell <kharwell@digium.com> </div>
<div style="display:none"> Gerrit-Comment-Date: Wed, 28 Mar 2018 21:24:54 +0000 </div>
<div style="display:none"> Gerrit-HasComments: No </div>