aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/tests/mgcp/mgcp_test.c
diff options
context:
space:
mode:
authorJacob Erlbeck <jerlbeck@sysmocom.de>2013-12-18 12:54:49 +0100
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2013-12-19 11:56:11 +0100
commit93c9da3b37ea760840fcccf21460f80978a30157 (patch)
treeb074f27e28a04fc1c6feab83bf8e06c5eee2f057 /openbsc/tests/mgcp/mgcp_test.c
parentd074f8f3964e3d98081736a42ab2c839987e0159 (diff)
mgcp/test: Add test cases for constant RTP sequence number
This adds two test cases: 1. Packet repetition (dSeq=0, dTS=0) 2. Broken seqNo (dSeq=0, dTS=160) The second had been already present in the test cases, but it was a mere copy&paste mistake which turned out to be rather helpful. This patch therefore turns it into a documented test case. Sponsored-by: On-Waves ehf
Diffstat (limited to 'openbsc/tests/mgcp/mgcp_test.c')
-rw-r--r--openbsc/tests/mgcp/mgcp_test.c22
1 files changed, 21 insertions, 1 deletions
diff --git a/openbsc/tests/mgcp/mgcp_test.c b/openbsc/tests/mgcp/mgcp_test.c
index 9777a4df9..b93ce7ef2 100644
--- a/openbsc/tests/mgcp/mgcp_test.c
+++ b/openbsc/tests/mgcp/mgcp_test.c
@@ -605,7 +605,27 @@ struct rtp_packet_info test_rtp_packets1[] = {
{0.380000, 20, "\x80\x62\x00\x14\x00\x00\x8C\x58\x10\x20\x30\x40"
"\x01\x23\x45\x67\x89\xAB\xCD\xEF"},
/* RTP: SeqNo=21, TS=36088 */
- {0.380000, 20, "\x80\x62\x00\x14\x00\x00\x8C\xF8\x10\x20\x30\x40"
+ {0.380000, 20, "\x80\x62\x00\x15\x00\x00\x8C\xF8\x10\x20\x30\x40"
+ "\x01\x23\x45\x67\x89\xAB\xCD\xEF"},
+ /* Repeat last packet */
+ /* RTP: SeqNo=21, TS=36088 */
+ {0.400000, 20, "\x80\x62\x00\x15\x00\x00\x8C\xF8\x10\x20\x30\x40"
+ "\x01\x23\x45\x67\x89\xAB\xCD\xEF"},
+ /* RTP: SeqNo=22, TS=36248 */
+ {0.420000, 20, "\x80\x62\x00\x16\x00\x00\x8D\x98\x10\x20\x30\x40"
+ "\x01\x23\x45\x67\x89\xAB\xCD\xEF"},
+ /* RTP: SeqNo=23, TS=36408 */
+ {0.440000, 20, "\x80\x62\x00\x17\x00\x00\x8E\x38\x10\x20\x30\x40"
+ "\x01\x23\x45\x67\x89\xAB\xCD\xEF"},
+ /* Don't increment SeqNo but increment timestamp by 160 */
+ /* RTP: SeqNo=23, TS=36568 */
+ {0.460000, 20, "\x80\x62\x00\x17\x00\x00\x8E\xD8\x10\x20\x30\x40"
+ "\x01\x23\x45\x67\x89\xAB\xCD\xEF"},
+ /* RTP: SeqNo=24, TS=36728 */
+ {0.480000, 20, "\x80\x62\x00\x18\x00\x00\x8F\x78\x10\x20\x30\x40"
+ "\x01\x23\x45\x67\x89\xAB\xCD\xEF"},
+ /* RTP: SeqNo=25, TS=36888 */
+ {0.500000, 20, "\x80\x62\x00\x19\x00\x00\x90\x18\x10\x20\x30\x40"
"\x01\x23\x45\x67\x89\xAB\xCD\xEF"},
};