[Asterisk-code-review] Add test for AST-2017-003 (testsuite[master])

George Joseph asteriskteam at digium.com
Mon May 22 15:39:51 CDT 2017


George Joseph has submitted this change and it was merged. ( https://gerrit.asterisk.org/5681 )

Change subject: Add test for AST-2017-003
......................................................................


Add test for AST-2017-003

This test sends an INVITE with a multipart body. The only part in the
multipart body is zero-length. The test passes as long as Asterisk
does not crash.

Change-Id: I9da3b790e16e0a39d56686e3b27e5becb508d896
---
A tests/channels/pjsip/multipart_empty_part/configs/pjsip.conf
A tests/channels/pjsip/multipart_empty_part/sipp/multipart.xml
A tests/channels/pjsip/multipart_empty_part/test-config.yaml
M tests/channels/pjsip/tests.yaml
4 files changed, 54 insertions(+), 0 deletions(-)

Approvals:
  Mark Michelson: Looks good to me, but someone else must approve
  George Joseph: Looks good to me, approved; Approved for Submit
  Jenkins2: Verified



diff --git a/tests/channels/pjsip/multipart_empty_part/configs/pjsip.conf b/tests/channels/pjsip/multipart_empty_part/configs/pjsip.conf
new file mode 100644
index 0000000..a8a0815
--- /dev/null
+++ b/tests/channels/pjsip/multipart_empty_part/configs/pjsip.conf
@@ -0,0 +1,4 @@
+[main-transport]
+type = transport
+bind = 127.0.0.1
+protocol = udp
diff --git a/tests/channels/pjsip/multipart_empty_part/sipp/multipart.xml b/tests/channels/pjsip/multipart_empty_part/sipp/multipart.xml
new file mode 100644
index 0000000..2a37151
--- /dev/null
+++ b/tests/channels/pjsip/multipart_empty_part/sipp/multipart.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE scenario SYSTEM "sipp.dtd">
+
+<scenario name="Basic Sipstone UAC">
+
+    <send retrans="500">
+		<![CDATA[
+    INVITE sip:2565551100 at one.example.com SIP/2.0
+    Via: SIP/2.0/UDP sip.example.com;branch=7c337f30d7ce.1
+    From: "Alice, A," <sip:bob at example.com>
+    To: Bob <sip:bob at example.com>
+    Call-ID: 602214199 at mouse.wonderland.com
+    CSeq: 1 INVITE
+    Contact: Alice <sip:alice at mouse.wonderland.com>
+    content-type: multipart/mixed;boundary=++
+
+    --++
+    --++--
+
+		]]>
+	</send>
+
+</scenario>
diff --git a/tests/channels/pjsip/multipart_empty_part/test-config.yaml b/tests/channels/pjsip/multipart_empty_part/test-config.yaml
new file mode 100644
index 0000000..b1786f5
--- /dev/null
+++ b/tests/channels/pjsip/multipart_empty_part/test-config.yaml
@@ -0,0 +1,26 @@
+testinfo:
+    summary: 'Ensures that AST-2017-003 has been addressed'
+    descriptions: |
+        'A SIPp scenario sends an INVITE with a multipart body. The only part of the multipart
+        body is an empty string. The test passes as long as Asterisk does not crash when
+        the request is received.'
+
+test-modules:
+    test-object:
+        config-section: test-object-config
+        typename: 'sipp.SIPpTestCase'
+
+test-object-config:
+    test-iterations:
+        -
+            scenarios:
+                - { 'key-args': {'scenario': 'multipart.xml'}}
+
+properties:
+    minversion: '13.15.1'
+    dependencies:
+        - sipp:
+            version : 'v3.0'
+        - asterisk : 'res_pjsip'
+    tags:
+        - pjsip
diff --git a/tests/channels/pjsip/tests.yaml b/tests/channels/pjsip/tests.yaml
index 77cbc94..59f5f1c 100644
--- a/tests/channels/pjsip/tests.yaml
+++ b/tests/channels/pjsip/tests.yaml
@@ -52,3 +52,4 @@
     - test: 'srtp_not_loaded'
     - test: 'user_eq_phone'
     - test: 'cseq_method'
+    - test: 'multipart_empty_part'

-- 
To view, visit https://gerrit.asterisk.org/5681
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I9da3b790e16e0a39d56686e3b27e5becb508d896
Gerrit-PatchSet: 2
Gerrit-Project: testsuite
Gerrit-Branch: master
Gerrit-Owner: Matthew Fredrickson <creslin at digium.com>
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Jenkins2
Gerrit-Reviewer: Mark Michelson <mmichelson at digium.com>



More information about the asterisk-code-review mailing list