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 ]
This commit is contained in:
Pablo Neira Ayuso 2013-12-16 10:41:15 +01:00
parent 88eae20dc2
commit 078d532930
1 changed files with 9 additions and 5 deletions

View File

@ -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;