<p>George Joseph has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/c/testsuite/+/18762">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">sipp.py: Add tls options to list of those needing path correction<br><br>Added "-tls_cert", "-tls_key", "-tls_ca" and "-tls_crl" to the list<br>of sipp options that will have their file paths made relative<br>to the test's sipp directory.  "-slave_cfg", "-inf" and "-oocsf"<br>were already handled.<br><br>This reverts part of an earlier change that made sipp's<br>working directory the test's sipp directory (which caused<br>issues with lots of other tests).<br><br>Change-Id: I71148de1cc9b18d95b51f2b9b74967a909eb1e72<br>---<br>M lib/python/asterisk/sipp.py<br>M tests/channels/pjsip/secure_calling/calls/nominal/allow_wildcard_certs/cn/test-config.yaml<br>M tests/channels/pjsip/secure_calling/calls/nominal/allow_wildcard_certs/san/test-config.yaml<br>3 files changed, 12 insertions(+), 16 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/testsuite refs/changes/62/18762/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/lib/python/asterisk/sipp.py b/lib/python/asterisk/sipp.py</span><br><span>index 41a50c8..3c2553b 100644</span><br><span>--- a/lib/python/asterisk/sipp.py</span><br><span>+++ b/lib/python/asterisk/sipp.py</span><br><span>@@ -646,7 +646,7 @@</span><br><span>         sipp_args = [</span><br><span>             self.sipp, self.target,</span><br><span>             '-sf',</span><br><span style="color: hsl(0, 100%, 40%);">-            '%s' % (self.scenario['scenario']),</span><br><span style="color: hsl(120, 100%, 40%);">+            '%s/sipp/%s' % (self.test_dir, self.scenario['scenario']),</span><br><span>             '-nostdin',</span><br><span>             '-skip_rlimit',</span><br><span>         ]</span><br><span>@@ -662,18 +662,12 @@</span><br><span>         default_args.update(self.scenario)</span><br><span>         del default_args['scenario']</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-        # correct the path specified by -slave_cfg</span><br><span style="color: hsl(0, 100%, 40%);">-        if '-slave_cfg' in default_args:</span><br><span style="color: hsl(0, 100%, 40%);">-            default_args['-slave_cfg'] = ('%s/sipp/%s' % (</span><br><span style="color: hsl(0, 100%, 40%);">-                self.test_dir, default_args['-slave_cfg']))</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-        if '-inf' in default_args:</span><br><span style="color: hsl(0, 100%, 40%);">-            default_args['-inf'] = ('%s/sipp/%s' % (</span><br><span style="color: hsl(0, 100%, 40%);">-                self.test_dir, default_args['-inf']))</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-        if '-oocsf' in default_args:</span><br><span style="color: hsl(0, 100%, 40%);">-            default_args['-oocsf'] = ('%s/sipp/%s' % (</span><br><span style="color: hsl(0, 100%, 40%);">-                self.test_dir, default_args['-oocsf']))</span><br><span style="color: hsl(120, 100%, 40%);">+        # correct file paths to be relative to the test's sipp directory</span><br><span style="color: hsl(120, 100%, 40%);">+        correctable_paths = { "-slave_cfg", "-inf", "-oocsf", "-tls_cert", "-tls_key", "-tls_ca", "-tls_crl" }</span><br><span style="color: hsl(120, 100%, 40%);">+        for defarg in default_args:</span><br><span style="color: hsl(120, 100%, 40%);">+            if defarg in correctable_paths:</span><br><span style="color: hsl(120, 100%, 40%);">+                default_args[defarg] = ('%s/sipp/%s' % (</span><br><span style="color: hsl(120, 100%, 40%);">+                    self.test_dir, default_args[defarg]))</span><br><span> </span><br><span>         if '-mp' not in default_args:</span><br><span>             # Current SIPp correctly chooses an available port for audio, but</span><br><span>@@ -719,7 +713,7 @@</span><br><span>                              sipp_args[0],</span><br><span>                              sipp_args,</span><br><span>                              {"TERM": "vt100", },</span><br><span style="color: hsl(0, 100%, 40%);">-                             "{0}/sipp".format(self.test_dir),</span><br><span style="color: hsl(120, 100%, 40%);">+                             None,</span><br><span>                              None)</span><br><span>         return self._our_exit_deferred</span><br><span> </span><br><span>diff --git a/tests/channels/pjsip/secure_calling/calls/nominal/allow_wildcard_certs/cn/test-config.yaml b/tests/channels/pjsip/secure_calling/calls/nominal/allow_wildcard_certs/cn/test-config.yaml</span><br><span>index ed11289..10e36f3 100644</span><br><span>--- a/tests/channels/pjsip/secure_calling/calls/nominal/allow_wildcard_certs/cn/test-config.yaml</span><br><span>+++ b/tests/channels/pjsip/secure_calling/calls/nominal/allow_wildcard_certs/cn/test-config.yaml</span><br><span>@@ -21,7 +21,8 @@</span><br><span>     test-iterations:</span><br><span>         -</span><br><span>             scenarios:</span><br><span style="color: hsl(0, 100%, 40%);">-                - { 'key-args': {'scenario': 'invite_recv.xml', '-s': 'uas', '-p': '5062', '-t': 'l1', '-tls_version': '1.2' } }</span><br><span style="color: hsl(120, 100%, 40%);">+                - { 'key-args': {'scenario': 'invite_recv.xml', '-s': 'uas', '-p': '5062', '-t': 'l1',</span><br><span style="color: hsl(120, 100%, 40%);">+                    '-tls_version': '1.2', '-tls_cert': 'cacert.pem', '-tls_key': 'cakey.pem' } }</span><br><span> </span><br><span> orig-config:</span><br><span>     channel: 'PJSIP/uas'</span><br><span>diff --git a/tests/channels/pjsip/secure_calling/calls/nominal/allow_wildcard_certs/san/test-config.yaml b/tests/channels/pjsip/secure_calling/calls/nominal/allow_wildcard_certs/san/test-config.yaml</span><br><span>index 7fc276d..95a8aa8 100644</span><br><span>--- a/tests/channels/pjsip/secure_calling/calls/nominal/allow_wildcard_certs/san/test-config.yaml</span><br><span>+++ b/tests/channels/pjsip/secure_calling/calls/nominal/allow_wildcard_certs/san/test-config.yaml</span><br><span>@@ -21,7 +21,8 @@</span><br><span>     test-iterations:</span><br><span>         -</span><br><span>             scenarios:</span><br><span style="color: hsl(0, 100%, 40%);">-                - { 'key-args': {'scenario': 'invite_recv.xml', '-s': 'uas', '-p': '5062', '-t': 'l1', '-tls_version': '1.2' } }</span><br><span style="color: hsl(120, 100%, 40%);">+                - { 'key-args': {'scenario': 'invite_recv.xml', '-s': 'uas', '-p': '5062', '-t': 'l1',</span><br><span style="color: hsl(120, 100%, 40%);">+                    '-tls_version': '1.2', '-tls_cert': 'cacert.pem', '-tls_key': 'cakey.pem' } }</span><br><span> </span><br><span> orig-config:</span><br><span>     channel: 'PJSIP/uas'</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/c/testsuite/+/18762">change 18762</a>. To unsubscribe, or for help writing mail filters, 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/c/testsuite/+/18762"/><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-Change-Id: I71148de1cc9b18d95b51f2b9b74967a909eb1e72 </div>
<div style="display:none"> Gerrit-Change-Number: 18762 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: George Joseph <gjoseph@digium.com> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>