aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorMax <msuraev@sysmocom.de>2019-03-06 18:17:32 +0100
committerMax <msuraev@sysmocom.de>2019-03-27 12:32:04 +0000
commit6e96dd4665bf5f287283fbf1087f3d218222ea71 (patch)
treeeb2b470b9987597a245a29b0578a89cd5cfff46a /tests
parent898dddb1d122068700694b59b9261fe07fa9cdef (diff)
Fix Channel Coding Command for MCS
Previously result of ".to_num() - 1" was used without any checks which means that in case of to_num() returning zero we would effectively try to encode (uint8_t)(-1). Let's fix this by using proper mcs_chan_code() function which returns Channel Coding Command for MCS without the need to further correct it and adjust expected tests output accordingly. Change-Id: I868062a81fffe6714a811c032215f25a79259905
Diffstat (limited to 'tests')
-rw-r--r--tests/tbf/TbfTest.cpp4
-rw-r--r--tests/types/TypesTest.cpp4
-rw-r--r--tests/types/TypesTest.ok4
3 files changed, 6 insertions, 6 deletions
diff --git a/tests/tbf/TbfTest.cpp b/tests/tbf/TbfTest.cpp
index 6dc802cf..151e7fac 100644
--- a/tests/tbf/TbfTest.cpp
+++ b/tests/tbf/TbfTest.cpp
@@ -739,7 +739,7 @@ static gprs_rlcmac_ul_tbf *puan_urbb_len_issue(BTS *the_bts,
struct msgb *msg1 = ul_tbf->create_ul_ack(*fn, ts_no);
- static uint8_t exp1[] = { 0x40, 0x24, 0x01, 0x3f, 0x3e, 0x24, 0x46, 0x68, 0x90, 0x87, 0xb0, 0x06,
+ static uint8_t exp1[] = { 0x40, 0x24, 0x01, 0x03, 0x3e, 0x24, 0x46, 0x68, 0x90, 0x87, 0xb0, 0x06,
0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b
};
@@ -766,7 +766,7 @@ static gprs_rlcmac_ul_tbf *puan_urbb_len_issue(BTS *the_bts,
msg1 = ul_tbf->create_ul_ack(*fn, ts_no);
- static uint8_t exp2[] = { 0x40, 0x24, 0x01, 0x3f, 0x3e, 0x24, 0x46, 0x68, 0x90, 0x88, 0xb0, 0x06, 0x8b,
+ static uint8_t exp2[] = { 0x40, 0x24, 0x01, 0x03, 0x3e, 0x24, 0x46, 0x68, 0x90, 0x88, 0xb0, 0x06, 0x8b,
0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b
};
diff --git a/tests/types/TypesTest.cpp b/tests/types/TypesTest.cpp
index 9c24ffe6..48794243 100644
--- a/tests/types/TypesTest.cpp
+++ b/tests/types/TypesTest.cpp
@@ -497,7 +497,7 @@ void test_immediate_assign_ul0m()
0x23, /* TA */
0x00, /* 0-length §10.5.2.21 Mobile Allocation */
/* ETSI TS 44.018 §10.5.2.16 IA Rest Octets */
- 0xc8, 0x02, 0x7b, 0xa0, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, };
+ 0xc8, 0x02, 0x1b, 0xa0, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, };
check_imm_ass(tbf, false, GSM_L1_BURST_TYPE_ACCESS_0, res, sizeof(res), "ia_rest_uplink(MBA)");
}
@@ -537,7 +537,7 @@ void test_immediate_assign_ul1s()
0x23, /* TA */
0x00, /* 0-length §10.5.2.21 Mobile Allocation */
/* ETSI TS 44.018 §10.5.2.16 IA Rest Octets */
- 0x46, 0xa0, 0x09, 0xe0, 0x17, 0x40, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, };
+ 0x46, 0xa0, 0x08, 0x00, 0x17, 0x40, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, };
check_imm_ass(tbf, false, GSM_L1_BURST_TYPE_ACCESS_1, res, sizeof(res), "ia_rest_egprs_uplink(SBA)");
}
diff --git a/tests/types/TypesTest.ok b/tests/types/TypesTest.ok
index d4cc2550..dd7dc4c7 100644
--- a/tests/types/TypesTest.ok
+++ b/tests/types/TypesTest.ok
@@ -9,13 +9,13 @@ show_rbb: IIRRIIIR
[11] DL Immediate Assignment <ia_rest_downlink>:
06 3f 30 0d 23 6d 7f 03 18 23 00 d0 00 00 00 08 17 47 08 0b 5b 2b 2b
[11] UL Immediate Assignment <ia_rest_uplink(MBA)>:
- 06 3f 10 0d 23 6d 0d 03 18 23 00 c8 02 7b a0 2b 2b 2b 2b 2b 2b 2b 2b
+ 06 3f 10 0d 23 6d 0d 03 18 23 00 c8 02 1b a0 2b 2b 2b 2b 2b 2b 2b 2b
[11] UL Immediate Assignment <ia_rest_uplink(SBA)>:
06 3f 10 0d 23 6d 0d 03 18 23 00 c5 d1 08 0b 5b 2b 2b 2b 2b 2b 2b 2b
[11] UL Immediate Assignment <ia_rest_egprs_uplink(MBA)>:
06 3f 10 0d 23 6d 7f 03 18 23 00 46 97 40 0b 58 2b 2b 2b 2b 2b 2b 2b
[11] UL Immediate Assignment <ia_rest_egprs_uplink(SBA)>:
- 06 3f 10 0d 23 6d 7f 03 18 23 00 46 a0 09 e0 17 40 2b 2b 2b 2b 2b 2b
+ 06 3f 10 0d 23 6d 7f 03 18 23 00 46 a0 08 00 17 40 2b 2b 2b 2b 2b 2b
assignment reject: 06 3a 10 7f 06 36 14 7f 06 36 14 7f 06 36 14 7f 06 36 14 c0 2b 2b
assignment reject: 06 3a 10 70 06 36 14 70 06 36 14 70 06 36 14 70 06 36 14 0b 2b 2b
Testing LBS utility...