pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-netif/+/30184 )
Change subject: tests/osmux: Test incoming RTP stream with seqnum jumps during wraparound ......................................................................
tests/osmux: Test incoming RTP stream with seqnum jumps during wraparound
Related: SYS#6161 Change-Id: Idd3a609452767f9c480c7c5ba9fc2a3e0a499968 --- M tests/osmux/osmux_input_test.c 1 file changed, 8 insertions(+), 4 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmo-netif refs/changes/84/30184/1
diff --git a/tests/osmux/osmux_input_test.c b/tests/osmux/osmux_input_test.c index 66335cd..aaab557 100644 --- a/tests/osmux/osmux_input_test.c +++ b/tests/osmux/osmux_input_test.c @@ -515,7 +515,7 @@
*osmux_transmitted = true; } -static void test_rtp_pkt_gap(void) +static void test_rtp_pkt_gap(uint16_t rtp_start_seqnum) { struct msgb *msg; int rc; @@ -523,11 +523,11 @@ bool osmux_transmitted = false; struct osmux_in_handle *h_input;
- printf("===%s===\n", __func__); + printf("===%s(%" PRIu16 ")===\n", __func__, rtp_start_seqnum);
clock_override_enable(true); clock_override_set(0, 0); - rtp_init(60, 18000); + rtp_init(rtp_start_seqnum, 18000);
h_input = osmux_xfrm_input_alloc(tall_ctx); osmux_xfrm_input_set_initial_seqnum(h_input, 123); @@ -595,7 +595,11 @@ test_last_amr_cmr_f_q_used(); test_initial_osmux_seqnum(); test_rtp_dup(); - test_rtp_pkt_gap(); + test_rtp_pkt_gap(60); + /* Test several wraparound scenarios: */ + test_rtp_pkt_gap(65533); + test_rtp_pkt_gap(65534); + test_rtp_pkt_gap(65535);
fprintf(stdout, "OK: Test passed\n"); return EXIT_SUCCESS;