pespin has uploaded this change for review. (
https://gerrit.osmocom.org/c/libosmo-netif/+/30222 )
Change subject: tests/osmux: Add extra asserts to validate osmuxh eader is pulled
correctly
......................................................................
tests/osmux: Add extra asserts to validate osmuxh eader is pulled correctly
Change-Id: Ie2ccc22c53c33025c477236166ea97972c21ec3e
---
M tests/osmux/osmux_input_test.c
1 file changed, 5 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmo-netif refs/changes/22/30222/1
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 @@
/* 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 @@
/* 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 @@
/* 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 @@
/* 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 @@
/* 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: */
--
To view, visit
https://gerrit.osmocom.org/c/libosmo-netif/+/30222
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-netif
Gerrit-Branch: master
Gerrit-Change-Id: Ie2ccc22c53c33025c477236166ea97972c21ec3e
Gerrit-Change-Number: 30222
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: newchange