aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@soleta.eu>2015-07-20 21:01:58 +0200
committerPablo Neira Ayuso <pablo@soleta.eu>2015-07-21 10:24:23 +0200
commit635bef7363b731638bf9f86251ec937f6795934d (patch)
tree4df0c5af8b4d2b6deac7c251fc2d71b05f91c2f4
parentea549806c90f02f87a1fc6625e0626602048737c (diff)
tests: osmux: adapt it to use the new circuit API
This also introduces a spare circuit that contains no voice data to test bandwidth preallocation through the new osmux dummy frame type.
-rw-r--r--tests/osmux/osmux_test.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/osmux/osmux_test.c b/tests/osmux/osmux_test.c
index dae9aa2..1b87db7 100644
--- a/tests/osmux/osmux_test.c
+++ b/tests/osmux/osmux_test.c
@@ -135,6 +135,13 @@ int main(void)
/* If the test takes longer than 10 seconds, abort it */
alarm(10);
+ for (i = 0; i < 2; i++)
+ osmux_xfrm_input_open_circuit(&h_input, i, 0);
+
+ /* Add two circuits with dummy padding */
+ osmux_xfrm_input_open_circuit(&h_input, 2, 1);
+ osmux_xfrm_input_open_circuit(&h_input, 3, 1);
+
for (i=1; i<64; i++) {
msg = msgb_alloc(1500, "test");
if (!msg)
@@ -178,6 +185,12 @@ int main(void)
k = 0;
}
}
+
+ for (i = 0; i < 4; i++)
+ osmux_xfrm_input_close_circuit(&h_input, i);
+
+ osmux_xfrm_input_fini(&h_input);
+
fprintf(stdout, "OK: Test passed\n");
return EXIT_SUCCESS;
}