diff options
author | Pau Espin Pedrol <pespin@sysmocom.de> | 2022-11-18 14:29:22 +0100 |
---|---|---|
committer | Pau Espin Pedrol <pespin@sysmocom.de> | 2022-11-21 10:56:52 +0100 |
commit | 8eeb8220e144dfa022ea266dfb4858ef10c58c00 (patch) | |
tree | 28fa3c7f6ac9ad99da5303604c07087ba7dd3932 | |
parent | fbce10e28650eac3c174b240147cfd627cbeabcc (diff) |
tests/osmux: Add extra asserts to validate osmux header is pulled correctly
Change-Id: Ie2ccc22c53c33025c477236166ea97972c21ec3e
-rw-r--r-- | tests/osmux/osmux_input_test.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/osmux/osmux_input_test.c b/tests/osmux/osmux_input_test.c index 5d1b84e..df02423 100644 --- a/tests/osmux/osmux_input_test.c +++ b/tests/osmux/osmux_input_test.c @@ -264,6 +264,7 @@ static void test_last_amr_cmr_f_q_used_osmux_deliver_cb(struct msgb *batch_msg, /* We expect 1 batch: */ osmuxh = osmux_xfrm_output_pull(batch_msg); + OSMO_ASSERT(osmuxh); OSMO_ASSERT(osmuxh->ft == OSMUX_FT_VOICE_AMR); /* Check CMR and Q values are the ones from the last message: */ OSMO_ASSERT(osmuxh->amr_f == 0); @@ -357,6 +358,7 @@ static void test_initial_osmux_seqnum_osmux_deliver_cb(struct msgb *batch_msg, v /* We expect 1 batch: */ osmuxh = osmux_xfrm_output_pull(batch_msg); + OSMO_ASSERT(osmuxh); /* Check seqnum is the one configured beforehand: */ OSMO_ASSERT(osmuxh->seq == 123); @@ -425,6 +427,7 @@ static void test_rtp_dup_osmux_deliver_cb(struct msgb *batch_msg, void *data) /* We expect 1 batch: */ osmuxh = osmux_xfrm_output_pull(batch_msg); + OSMO_ASSERT(osmuxh); /* Check seqnum is the one configured beforehand: */ OSMO_ASSERT(osmuxh->seq == 123); osmux_pl = (uint8_t *)osmuxh + sizeof(*osmuxh); @@ -503,6 +506,7 @@ static void test_rtp_pkt_gap_osmux_deliver_cb(struct msgb *batch_msg, void *data /* We expect 1 batch: */ osmuxh = osmux_xfrm_output_pull(batch_msg); + OSMO_ASSERT(osmuxh); /* Check seqnum is the one configured beforehand: */ OSMO_ASSERT(osmuxh->seq == 123); /* Check four AMR payloads appear: */ @@ -587,6 +591,7 @@ static void test_rtp_pkt_gap_bigger_than_batch_factor_osmux_deliver_cb(struct ms /* We expect 1 batch: */ osmuxh = osmux_xfrm_output_pull(batch_msg); + OSMO_ASSERT(osmuxh); /* Check seqnum is the one configured beforehand: */ OSMO_ASSERT(osmuxh->seq == (123 + *osmux_transmitted - 1)); /* Check four AMR payloads appear: */ |