pespin submitted this change.

View Change

Approvals: Jenkins Builder: Verified fixeria: Looks good to me, approved laforge: Looks good to me, approved
tests/osmux_test2: Document unit tests

Change-Id: I56f27af52b6a8d798879c70d68a9a3b9e512867d
---
M tests/osmux/osmux_test2.c
1 file changed, 16 insertions(+), 1 deletion(-)

diff --git a/tests/osmux/osmux_test2.c b/tests/osmux/osmux_test2.c
index 7a66920..46065fe 100644
--- a/tests/osmux/osmux_test2.c
+++ b/tests/osmux/osmux_test2.c
@@ -155,6 +155,7 @@
OSMO_ASSERT(_rc == _osmuxh->ctr+1); \
}

+/* Test some regular scenario where frames arrive at exactly the time they should. */
static void test_output_consecutive(void)
{
struct osmux_out_handle *h_output;
@@ -222,6 +223,12 @@
talloc_free(h_output);
}

+/* Test that receiving new osmux frame triggers flushing of RTP pakcets
+ * generated from previous one, to avoid steady growing delay in scheduling due to
+ * jitter of osmux packets received. Specifically test case where the 2 Osmux
+ * packets arrive with a small delay of system time in between them, aka the 1st
+ * Osmux frame has had some of its AMR payloads already forwarded as RTP to the
+ * upper layers. */
static void test_output_interleaved(void)
{
struct osmux_out_handle *h_output;
@@ -264,6 +271,11 @@
talloc_free(h_output);
}

+/* Test that receiving new osmux frame triggers flushing of RTP pakcets
+ * generated from previous one, to avoid steady growing delay in scheduling due to
+ * jitter of osmux packets received. Specifically test case where the 2 Osmux
+ * packets arrive (almost) exactly at the same time, so no internal acton is
+ * triggered between receival of those. */
static void test_output_2together(void)
{
struct osmux_out_handle *h_output;
@@ -302,7 +314,8 @@
talloc_free(h_output);
}

-/* FIXME: this test shows generated rtp stream doesn't have osmux lost frames into account! */
+/* Generated rtp stream gets first RTP pkt marked with M bit after osmux frame
+ * lost is detected (hence a gap in sequence) */
static void test_output_frame_lost(void)
{
struct osmux_out_handle *h_output;
@@ -340,6 +353,8 @@
talloc_free(h_output);
}

+/* Test all packets are transmitted immediately when osmux_xfrm_output_flush()
+ * is called. */
static void test_output_flush(void)
{
struct osmux_out_handle *h_output;

To view, visit change 29504. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: libosmo-netif
Gerrit-Branch: master
Gerrit-Change-Id: I56f27af52b6a8d798879c70d68a9a3b9e512867d
Gerrit-Change-Number: 29504
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin@sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy@sysmocom.de>
Gerrit-Reviewer: laforge <laforge@osmocom.org>
Gerrit-Reviewer: pespin <pespin@sysmocom.de>
Gerrit-MessageType: merged