aboutsummaryrefslogtreecommitdiffstats
path: root/tests/tbf
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2020-02-03 17:18:03 +0100
committerPau Espin Pedrol <pespin@sysmocom.de>2020-02-05 17:26:02 +0100
commit5e300ce565b3e3f39a67cf5a251efa06589f2916 (patch)
tree1225165d83f18aa27f9d7b8f976cc1b11480211f /tests/tbf
parent47de23266dd9db47cef97d10342eb52dba084c35 (diff)
Check return code of rlcmac decode/encode functions
Diffstat (limited to 'tests/tbf')
-rw-r--r--tests/tbf/TbfTest.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/tbf/TbfTest.cpp b/tests/tbf/TbfTest.cpp
index bdbc1389..5edb544c 100644
--- a/tests/tbf/TbfTest.cpp
+++ b/tests/tbf/TbfTest.cpp
@@ -615,7 +615,7 @@ static void send_ul_mac_block(BTS *the_bts, unsigned trx_no, unsigned ts_no,
rlc_block = bitvec_alloc(23, tall_pcu_ctx);
- encode_gsm_rlcmac_uplink(rlc_block, ulreq);
+ OSMO_ASSERT(encode_gsm_rlcmac_uplink(rlc_block, ulreq) == 0);
num_bytes = bitvec_pack(rlc_block, &buf[0]);
OSMO_ASSERT(size_t(num_bytes) < sizeof(buf));
bitvec_free(rlc_block);
@@ -2511,6 +2511,7 @@ static void test_tbf_epdan_out_of_rx_window(void)
RlcMacUplink_t ul_control_block;
gprs_rlc_v_b *prlcmvb;
gprs_rlc_dl_window *prlcdlwindow;
+ int rc;
memset(&ul_control_block, 0, sizeof(RlcMacUplink_t));
@@ -2557,7 +2558,8 @@ static void test_tbf_epdan_out_of_rx_window(void)
bits.data_len = sizeof(bits_data);
bits.cur_bit = 0;
- decode_gsm_rlcmac_uplink(block, &ul_control_block);
+ rc = decode_gsm_rlcmac_uplink(block, &ul_control_block);
+ OSMO_ASSERT(rc == 0);
ack_nack = &ul_control_block.u.Egprs_Packet_Downlink_Ack_Nack;