aboutsummaryrefslogtreecommitdiffstats
path: root/tests/osmux/osmux_test.c
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@gnumonks.org>2013-12-16 10:41:15 +0100
committerPablo Neira Ayuso <pablo@gnumonks.org>2013-12-16 10:43:20 +0100
commit078d532930abb402e949f455ec143ba4ebef2ab4 (patch)
tree1e97efa9ec7e8285478db632c12f04feaa05b96e /tests/osmux/osmux_test.c
parent88eae20dc2ac0e634f88df31c43b418451166670 (diff)
tests: osmux: test multi-batch support
Extend this to test multi-batch in one packet support, eg. OSMUX message (len=158) OSMUX seq=016 ccid=000 ft=1 ctr=6 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ]OSMUX seq=017 ccid=001 ft=1 ctr=2 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ]
Diffstat (limited to 'tests/osmux/osmux_test.c')
-rw-r--r--tests/osmux/osmux_test.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/tests/osmux/osmux_test.c b/tests/osmux/osmux_test.c
index 3003974..53c33c4 100644
--- a/tests/osmux/osmux_test.c
+++ b/tests/osmux/osmux_test.c
@@ -156,7 +156,10 @@ int main(void)
continue;
k++;
- osmux_xfrm_input(&h_input, msg, 0);
+ /* Fan out RTP packets between two circuit IDs to test
+ * multi-batch support.
+ */
+ osmux_xfrm_input(&h_input, msg, i % 2);
if (i % 4 == 0) {
gettimeofday(&last, NULL);
@@ -166,11 +169,12 @@ int main(void)
*/
osmux_xfrm_input_deliver(&h_input);
- /* The first RTP message that is delivered immediately,
- * wait until the three RTP messages that are extracted
- * from OSMUX has been delivered.
+ /* The first two RTP message (one per circuit ID batch)
+ * are delivered immediately, wait until the three RTP
+ * messages that are extracted from OSMUX has been
+ * delivered.
*/
- for (j=0; j<k; j++)
+ for (j=0; j<k-2; j++)
osmo_select_main(0);
k = 0;