diff options
author | Pau Espin Pedrol <pespin@sysmocom.de> | 2020-03-21 01:20:52 +0100 |
---|---|---|
committer | Pau Espin Pedrol <pespin@sysmocom.de> | 2020-03-21 01:24:28 +0100 |
commit | 866beceffffd840d09a5f109bf63277accfb6717 (patch) | |
tree | e010232f9602500f3954f622d930455a4c04c815 | |
parent | 2f1692495972556a319d199f33a12e17efbfb038 (diff) |
tests/RLCMACTest: Several fixes and improvements to RAcap tests
It was recently discovered that the Racap value used for testRAcap was
actually malformed (it was taken from a TTCN3 test). It had the presence
bit for "EGPRS multislot class" set but no struct was put after it.
So let's move that malformed value to a new test named
testMalformedRAcap(). Since it doesn't make sense trying to re-encode or
do similar things with an initially malformed value, let's drop all
those parts in this new test.
For the old testRAcap() test, use a new bitstream this time with the
"EGPRS multoslot class" struct set inside (class 3).
Change-Id: I1e7f8d8866695732ee24a79d8b54d660fd4f22d5
-rw-r--r-- | tests/rlcmac/RLCMACTest.cpp | 114 | ||||
-rw-r--r-- | tests/rlcmac/RLCMACTest.err | 8 | ||||
-rw-r--r-- | tests/rlcmac/RLCMACTest.ok | 9 |
3 files changed, 91 insertions, 40 deletions
diff --git a/tests/rlcmac/RLCMACTest.cpp b/tests/rlcmac/RLCMACTest.cpp index e62d6e4e..6529d4de 100644 --- a/tests/rlcmac/RLCMACTest.cpp +++ b/tests/rlcmac/RLCMACTest.cpp @@ -219,12 +219,79 @@ int encode_gsm_ra_cap(bitvec * vector, MS_Radio_Access_capability_t * data); void testRAcap(void *test_ctx) { + printf("*** %s ***\n", __func__); + MS_Radio_Access_capability_t data; + memset(&data, 0, sizeof(data)); + bitvec *bv_dec = bitvec_alloc(23, test_ctx); + bitvec *bv_enc = bitvec_alloc(23, test_ctx); + unsigned int len_dec, len_enc; + int rc; +/* +MS RA capability 1 + 0001 .... = Access Technology Type: GSM E --note that GSM E covers GSM P (1) + .... 0011 011. .... = Length in bits: 0x1b (27) + ...0 01.. RF Power Capability, GMSK Power Class: Not specified (1) + A5 Bits: Same values apply for parameters as in the immediately preceding Access capabilities field within this IE (0) + .... ...1 = Controlled early Classmark Sending: Implemented + 0... .... = Pseudo Synchronisation: Not Present + .0.. .... = Voice Group Call Service: no VGCS capability or no notifications wanted + ..0. .... = Voice Broadcast Service: no VBS capability or no notifications wanted + ...1 .... = Multislot capability struct: Present + HSCSD multislot class: Bits are not available (0) + SMS_VALUE (Switch-Measure-Switch): Bits are not available (0) + ECSD multislot class: Bits are not available (0) + DTM GPRS Multi Slot Class: Bits are not available (0) + .... ..00 011. .... = GPRS multislot class: Max Rx-Slot/TDMA:2 Max Tx-Slot/TDMA:2 Max-Sum-Slot/TDMA:3 Tta:3 Ttb:2 Tra:3 Trb:1 Type:1 (3) + ...0 .... = GPRS Extended Dynamic Allocation Capability: Not Implemented + .... ...0 0011 .... = EGPRS multislot class: Max Rx-Slot/TDMA:2 Max Tx-Slot/TDMA:2 Max-Sum-Slot/TDMA:3 Tta:3 Ttb:2 Tra:3 Trb:1 Type:1 (3) + .... 0... = EGPRS Extended Dynamic Allocation Capability: Not Implemented +*/ + bitvec_unhex(bv_dec, "1365146230"); + + printf("=== Test decoding of MS RA Capability ===\n"); + rc = decode_gsm_ra_cap(bv_dec, &data); + OSMO_ASSERT(rc == 0); + + /* Make sure there's 1 value (currently fails due to failed decoding) */ + OSMO_ASSERT(data.Count_MS_RA_capability_value == 1); + + /* Make sure GPRS / EGPRS multislot class is parsed correctly */ + printf("GPRS multislot class = %u\n", Decoding::get_ms_class_by_capability(&data)); + printf("EGPRS multislot class = %u\n", Decoding::get_egprs_ms_class_by_capability(&data)); + + /* Test encoding of decoded MS RA Capability */ + printf("=== Test encoding of MS RA Capability ===\n"); + rc = encode_gsm_ra_cap(bv_enc, &data); + printf("encode_gsm_ra_cap() returns %d\n", rc); + + bv_dec->cur_bit = 4; + len_dec = bitvec_get_uint(bv_dec, 7); + bv_enc->cur_bit = 4; + len_enc = bitvec_get_uint(bv_enc, 7); + + /* NOTE: vector2 is expected to be different because there is actually no + * way to distinguish between NULL and 0 in MS_Radio_Access_capability_t. + * The difference is in length indicator: 27 bits vs 65 bits. */ + printf("vector1 (len_ind=%u) = %s\n", len_dec, osmo_hexdump(bv_dec->data, bv_dec->data_len)); + printf("vector2 (len_ind=%u) = %s\n", len_enc, osmo_hexdump(bv_enc->data, bv_enc->data_len)); + + /* Mangle the length indicator (set it to 21) */ + unsigned int writeIndex = 4; + rc = bitvec_write_field(bv_dec, &writeIndex, 21, 7); + OSMO_ASSERT(rc == 0); + + /* Make sure decoding attempt fails */ + printf("=== Test decoding of a malformed vector (short length indicator) ===\n"); + rc = decode_gsm_ra_cap(bv_dec, &data); + printf("decode_gsm_ra_cap() returns %d\n", rc); +} + +void testMalformedRAcap(void *test_ctx) +{ printf("*** %s ***\n", __func__); MS_Radio_Access_capability_t data; memset(&data, 0, sizeof(data)); bitvec *bv_dec = bitvec_alloc(23, test_ctx); - bitvec *bv_enc = bitvec_alloc(23, test_ctx); - unsigned int len_dec, len_enc; int rc; /* MS RA capability 1 @@ -239,48 +306,26 @@ void testRAcap(void *test_ctx) ...1 .... = Multislot capability struct: Present .... ..00 011. .... = GPRS multislot class: Max Rx-Slot/TDMA:2 Max Tx-Slot/TDMA:2 Max-Sum-Slot/TDMA:3 Tta:3 Ttb:2 Tra:3 Trb:1 Type:1 (3) ...0 .... = GPRS Extended Dynamic Allocation Capability: Not Implemented + + It doesn't show up in wireshark's tree above because specific parser is + used, but this RA Cap bitstream has Exist_EGPRS_multislot_class = 1 but + it provides no struct with the expected data (malformed, generated + erroneusly through TTCN3). The CSN.1 dceoder should ideally return an + error here, but it doesn't (it returns a >0 value which we convert to 0 + in decode_gsm_ra_cap()). */ bitvec_unhex(bv_dec, "13a5146200"); printf("=== Test decoding of MS RA Capability ===\n"); rc = decode_gsm_ra_cap(bv_dec, &data); + printf("decode_gsm_ra_cap() returns %d\n", rc); OSMO_ASSERT(rc == 0); - /* Make sure there's 1 value (currently fails due to failed decoding) */ + /* For sake of completeness, check if the decoder could find 1 value + before failing to decode it */ OSMO_ASSERT(data.Count_MS_RA_capability_value == 1); - /* Make sure GPRS / EGPRS multislot class is parsed correctly */ - printf("GPRS multislot class = %u\n", Decoding::get_ms_class_by_capability(&data)); - printf("EGPRS multislot class = %u\n", Decoding::get_egprs_ms_class_by_capability(&data)); - - /* Test encoding of decoded MS RA Capability */ - printf("=== Test encoding of MS RA Capability ===\n"); - rc = encode_gsm_ra_cap(bv_enc, &data); - printf("encode_gsm_ra_cap() returns %d\n", rc); - - bv_dec->cur_bit = 4; - len_dec = bitvec_get_uint(bv_dec, 7); - bv_enc->cur_bit = 4; - len_enc = bitvec_get_uint(bv_enc, 7); - - /* NOTE: vector2 is expected to be different because there is actually no - * way to distinguish between NULL and 0 in MS_Radio_Access_capability_t. - * The difference is in length indicator: 29 bits vs 65 bits. */ - printf("vector1 (len_ind=%u) = %s\n", len_dec, osmo_hexdump(bv_dec->data, bv_dec->data_len)); - printf("vector2 (len_ind=%u) = %s\n", len_enc, osmo_hexdump(bv_enc->data, bv_enc->data_len)); - - /* Mangle the length indicator (set it to 21) */ - unsigned int writeIndex = 4; - rc = bitvec_write_field(bv_dec, &writeIndex, 21, 7); - OSMO_ASSERT(rc == 0); - - /* Make sure decoding attempt fails */ - printf("=== Test decoding of a malformed vector (short length indicator) ===\n"); - rc = decode_gsm_ra_cap(bv_dec, &data); - printf("decode_gsm_ra_cap() returns %d\n", rc); - bitvec_free(bv_dec); - bitvec_free(bv_enc); } int main(int argc, char *argv[]) @@ -300,5 +345,6 @@ int main(int argc, char *argv[]) testRlcMacUplink(ctx); testCsnLeftAlignedVarBmpBounds(ctx); testRAcap(ctx); + testMalformedRAcap(ctx); talloc_free(ctx); } diff --git a/tests/rlcmac/RLCMACTest.err b/tests/rlcmac/RLCMACTest.err index 13418ee9..4434d9b2 100644 --- a/tests/rlcmac/RLCMACTest.err +++ b/tests/rlcmac/RLCMACTest.err @@ -32,8 +32,10 @@ DCSN1 INFO csnStreamEncoder (type=8): PayloadType = 1 | spare = 0 | R = 0 | MESS DCSN1 INFO csnStreamDecoder (type=2): PayloadType = 1 | spare = 0 | R = 0 | MESSAGE_TYPE = 2 | DOWNLINK_TFI = 20 | : Ack_Nack_Description | FINAL_ACK_INDICATION = 1 | STARTING_SEQUENCE_NUMBER = 1 | RECEIVED_BLOCK_BITMAP[0] = 0 | RECEIVED_BLOCK_BITMAP[1] = 0 | RECEIVED_BLOCK_BITMAP[2] = 0 | RECEIVED_BLOCK_BITMAP[3] = 0 | RECEIVED_BLOCK_BITMAP[4] = 0 | RECEIVED_BLOCK_BITMAP[5] = 0 | RECEIVED_BLOCK_BITMAP[6] = 0 | RECEIVED_BLOCK_BITMAP[7] = 1 | : End Ack_Nack_Description | Exist_Channel_Request_Description = 1 | : Channel_Request_Description | PEAK_THROUGHPUT_CLASS = 0 | RADIO_PRIORITY = 0 | RLC_MODE = 0 | LLC_PDU_TYPE = 1 | RLC_OCTET_COUNT = 18 | : End Channel_Request_Description | : Channel_Quality_Report | C_VALUE = 40 | RXQUAL = 1 | SIGN_VAR = 0 | Slot[0].Exist = 0 | Slot[1].Exist = 0 | Slot[2].Exist = 0 | Slot[3].Exist = 0 | Slot[4].Exist = 0 | Slot[5].Exist = 0 | Slot[6].Exist = 0 | Slot[7].Exist = 0 | : End Channel_Quality_Report | Exist_AdditionsR99 = 1 | : AdditionsR99 | Exist_PFI = 0 | : End AdditionsR99 | Padding = 3|43|43|43|43|43| DCSN1 INFO csnStreamEncoder (type=2): PayloadType = 1 | spare = 0 | R = 0 | MESSAGE_TYPE = 2 | DOWNLINK_TFI = 20 | : Ack_Nack_Description | FINAL_ACK_INDICATION = 1 | STARTING_SEQUENCE_NUMBER = 1 | RECEIVED_BLOCK_BITMAP[0] = 0 | RECEIVED_BLOCK_BITMAP[1] = 0 | RECEIVED_BLOCK_BITMAP[2] = 0 | RECEIVED_BLOCK_BITMAP[3] = 0 | RECEIVED_BLOCK_BITMAP[4] = 0 | RECEIVED_BLOCK_BITMAP[5] = 0 | RECEIVED_BLOCK_BITMAP[6] = 0 | RECEIVED_BLOCK_BITMAP[7] = 1 | : End Ack_Nack_Description | Exist_Channel_Request_Description = 1 | : Channel_Request_Description | PEAK_THROUGHPUT_CLASS = 0 | RADIO_PRIORITY = 0 | RLC_MODE = 0 | LLC_PDU_TYPE = 1 | RLC_OCTET_COUNT = 18 | : End Channel_Request_Description | : Channel_Quality_Report | C_VALUE = 40 | RXQUAL = 1 | SIGN_VAR = 0 | Slot[0].Exist = 0 | Slot[1].Exist = 0 | Slot[2].Exist = 0 | Slot[3].Exist = 0 | Slot[4].Exist = 0 | Slot[5].Exist = 0 | Slot[6].Exist = 0 | Slot[7].Exist = 0 | : End Channel_Quality_Report | Exist_AdditionsR99 = 1 | : AdditionsR99 | Exist_PFI = 0 | : End AdditionsR99 | Padding = 3|43|43|43|43|43| DCSN1 INFO csnStreamDecoder (type=8): PayloadType = 1 | spare = 0 | R = 0 | MESSAGE_TYPE = 8 | DOWNLINK_TFI = 0 | MS_OUT_OF_MEMORY = 0 | Exist_EGPRS_ChannelQualityReport = 1 | : EGPRS_ChannelQualityReport | : EGPRS_BEP_LinkQualityMeasurements | Exist_MEAN_CV_BEP_GMSK = 0 | Exist_MEAN_CV_BEP_8PSK = 1 | MEAN_BEP_8PSK = 31 | CV_BEP_8PSK = 7 | : End EGPRS_BEP_LinkQualityMeasurements | C_VALUE = 58 | : EGPRS_TimeslotLinkQualityMeasurements | Exist_BEP_MEASUREMENTS = 0 | Exist_INTERFERENCE_MEASUREMENTS = 0 | : End EGPRS_TimeslotLinkQualityMeasurements | : End EGPRS_ChannelQualityReport | Exist_ChannelRequestDescription = 1 | : ChannelRequestDescription | PEAK_THROUGHPUT_CLASS = 6 | RADIO_PRIORITY = 0 | RLC_MODE = 0 | LLC_PDU_TYPE = 1 | RLC_OCTET_COUNT = 62 | : End ChannelRequestDescription | Exist_PFI = 0 | Exist_ExtensionBits = 0 | : EGPRS_AckNack | Desc = 0 | : Desc | FINAL_ACK_INDICATION = 0 | BEGINNING_OF_WINDOW = 1 | END_OF_WINDOW = 1 | STARTING_SEQUENCE_NUMBER = 1187 | Exist_CRBB = 0 | URBB = 127 | URBB = 255 | URBB = 255 | URBB = 238 | URBB = 0 | URBB = 0 | URBB = 0 | URBB = 0 | URBB = 0 | URBB = 0 | URBB = 0 | URBB = 0 | URBB = 0 | : End Desc | : End EGPRS_AckNack | Padding = -DCSN1 INFO csnStreamDecoder (RAcap): MS_RA_capability_value { | Choice MS_RA_capability_value_Choice = 1 | u.Content length = 29 | offset = 4 | RF_Power_Capability = 1 | Exist_A5_bits = 0 | ES_IND = 1 | PS = 0 | VGCS = 0 | VBS = 0 | Exist_Multislot_capability = 1 | : Multislot_capability | Exist_HSCSD_multislot_class = 0 | Exist_GPRS_multislot_class = 1 | GPRS_multislot_class = 3 | GPRS_Extended_Dynamic_Allocation_Capability = 0 | Exist_SM = 0 | Exist_ECSD_multislot_class = 0 | Exist_EGPRS_multislot_class = 1 | EGPRS_multislot_class = 0 | EGPRS_Extended_Dynamic_Allocation_Capability = 0 | Exist_DTM_GPRS_multislot_class = 0 | : End Multislot_capability | Exist_Eight_PSK_Power_Capability = 0 | COMPACT_Interference_Measurement_Capability = 0 | Revision_Level_Indicator = NULL | UMTS_FDD_Radio_Access_Technology_Capability = NULL | UMTS_384_TDD_Radio_Access_Technology_Capability = NULL | CDMA2000_Radio_Access_Technology_Capability = NULL | UMTS_128_TDD_Radio_Access_Technology_Capability = NULL | GERAN_Feature_Package_1 = NULL | Modulation_based_multislot_class_support = NULL | GMSK_MultislotPowerProfile = NULL | EightPSK_MultislotProfile = NULL | MultipleTBF_Capability = NULL | DownlinkAdvancedReceiverPerformance = NULL | ExtendedRLC_MAC_ControlMessageSegmentionsCapability = NULL | DTM_EnhancementsCapability = NULL | PS_HandoverCapability = NULL | DTM_Handover_Capability = NULL | FlexibleTimeslotAssignment = NULL | GAN_PS_HandoverCapability = NULL | RLC_Non_persistentMode = NULL | ReducedLatencyCapability = NULL | UplinkEGPRS2 = NULL | DownlinkEGPRS2 = NULL | EUTRA_FDD_Support = NULL | EUTRA_TDD_Support = NULL | GERAN_To_EUTRAN_supportInGERAN_PTM = NULL | PriorityBasedReselectionSupport = NULL | MS_RA_capability_value } | -DRLCMACDATA NOTICE Got 143 remaining bits unhandled by decoder at the end of bitvec -DCSN1 INFO csnStreamEncoder (RAcap): MS_RA_capability_value { | u.Content = 1 | RF_Power_Capability = 1 | Exist_A5_bits = 0 | ES_IND = 1 | PS = 0 | VGCS = 0 | VBS = 0 | Exist_Multislot_capability = 1 | : Multislot_capability | Exist_HSCSD_multislot_class = 0 | Exist_GPRS_multislot_class = 1 | GPRS_multislot_class = 3 | GPRS_Extended_Dynamic_Allocation_Capability = 0 | Exist_SM = 0 | Exist_ECSD_multislot_class = 0 | Exist_EGPRS_multislot_class = 1 | EGPRS_multislot_class = 0 | EGPRS_Extended_Dynamic_Allocation_Capability = 0 | Exist_DTM_GPRS_multislot_class = 0 | : End Multislot_capability | Exist_Eight_PSK_Power_Capability = 0 | COMPACT_Interference_Measurement_Capability = 0 | Revision_Level_Indicator = 0 | UMTS_FDD_Radio_Access_Technology_Capability = 0 | UMTS_384_TDD_Radio_Access_Technology_Capability = 0 | CDMA2000_Radio_Access_Technology_Capability = 0 | UMTS_128_TDD_Radio_Access_Technology_Capability = 0 | GERAN_Feature_Package_1 = 0 | Exist_Extended_DTM_multislot_class = 0 | Modulation_based_multislot_class_support = 0 | Exist_HighMultislotCapability = 0 | Exist_GERAN_lu_ModeCapability = 0 | GMSK_MultislotPowerProfile = 0 | EightPSK_MultislotProfile = 0 | MultipleTBF_Capability = 0 | DownlinkAdvancedReceiverPerformance = 0 | ExtendedRLC_MAC_ControlMessageSegmentionsCapability = 0 | DTM_EnhancementsCapability = 0 | Exist_DTM_GPRS_HighMultislotClass = 0 | PS_HandoverCapability = 0 | DTM_Handover_Capability = 0 | Exist_DownlinkDualCarrierCapability_r7 = 0 | FlexibleTimeslotAssignment = 0 | GAN_PS_HandoverCapability = 0 | RLC_Non_persistentMode = 0 | ReducedLatencyCapability = 0 | UplinkEGPRS2 = 0 | DownlinkEGPRS2 = 0 | EUTRA_FDD_Support = 0 | EUTRA_TDD_Support = 0 | GERAN_To_EUTRAN_supportInGERAN_PTM = 0 | PriorityBasedReselectionSupport = 0 | u.Content length = 65 | MS_RA_capability_value } | +DCSN1 INFO csnStreamDecoder (RAcap): MS_RA_capability_value { | Choice MS_RA_capability_value_Choice = 1 | u.Content length = 27 | offset = 4 | RF_Power_Capability = 1 | Exist_A5_bits = 0 | ES_IND = 1 | PS = 0 | VGCS = 0 | VBS = 0 | Exist_Multislot_capability = 1 | : Multislot_capability | Exist_HSCSD_multislot_class = 0 | Exist_GPRS_multislot_class = 1 | GPRS_multislot_class = 3 | GPRS_Extended_Dynamic_Allocation_Capability = 0 | Exist_SM = 0 | Exist_ECSD_multislot_class = 0 | Exist_EGPRS_multislot_class = 1 | EGPRS_multislot_class = 3 | EGPRS_Extended_Dynamic_Allocation_Capability = 0 | Exist_DTM_GPRS_multislot_class = 0 | : End Multislot_capability | COMPACT_Interference_Measurement_Capability = NULL | Revision_Level_Indicator = NULL | UMTS_FDD_Radio_Access_Technology_Capability = NULL | UMTS_384_TDD_Radio_Access_Technology_Capability = NULL | CDMA2000_Radio_Access_Technology_Capability = NULL | UMTS_128_TDD_Radio_Access_Technology_Capability = NULL | GERAN_Feature_Package_1 = NULL | Modulation_based_multislot_class_support = NULL | GMSK_MultislotPowerProfile = NULL | EightPSK_MultislotProfile = NULL | MultipleTBF_Capability = NULL | DownlinkAdvancedReceiverPerformance = NULL | ExtendedRLC_MAC_ControlMessageSegmentionsCapability = NULL | DTM_EnhancementsCapability = NULL | PS_HandoverCapability = NULL | DTM_Handover_Capability = NULL | FlexibleTimeslotAssignment = NULL | GAN_PS_HandoverCapability = NULL | RLC_Non_persistentMode = NULL | ReducedLatencyCapability = NULL | UplinkEGPRS2 = NULL | DownlinkEGPRS2 = NULL | EUTRA_FDD_Support = NULL | EUTRA_TDD_Support = NULL | GERAN_To_EUTRAN_supportInGERAN_PTM = NULL | PriorityBasedReselectionSupport = NULL | MS_RA_capability_value } | +DRLCMACDATA NOTICE Got 145 remaining bits unhandled by decoder at the end of bitvec +DCSN1 INFO csnStreamEncoder (RAcap): MS_RA_capability_value { | u.Content = 1 | RF_Power_Capability = 1 | Exist_A5_bits = 0 | ES_IND = 1 | PS = 0 | VGCS = 0 | VBS = 0 | Exist_Multislot_capability = 1 | : Multislot_capability | Exist_HSCSD_multislot_class = 0 | Exist_GPRS_multislot_class = 1 | GPRS_multislot_class = 3 | GPRS_Extended_Dynamic_Allocation_Capability = 0 | Exist_SM = 0 | Exist_ECSD_multislot_class = 0 | Exist_EGPRS_multislot_class = 1 | EGPRS_multislot_class = 3 | EGPRS_Extended_Dynamic_Allocation_Capability = 0 | Exist_DTM_GPRS_multislot_class = 0 | : End Multislot_capability | Exist_Eight_PSK_Power_Capability = 0 | COMPACT_Interference_Measurement_Capability = 0 | Revision_Level_Indicator = 0 | UMTS_FDD_Radio_Access_Technology_Capability = 0 | UMTS_384_TDD_Radio_Access_Technology_Capability = 0 | CDMA2000_Radio_Access_Technology_Capability = 0 | UMTS_128_TDD_Radio_Access_Technology_Capability = 0 | GERAN_Feature_Package_1 = 0 | Exist_Extended_DTM_multislot_class = 0 | Modulation_based_multislot_class_support = 0 | Exist_HighMultislotCapability = 0 | Exist_GERAN_lu_ModeCapability = 0 | GMSK_MultislotPowerProfile = 0 | EightPSK_MultislotProfile = 0 | MultipleTBF_Capability = 0 | DownlinkAdvancedReceiverPerformance = 0 | ExtendedRLC_MAC_ControlMessageSegmentionsCapability = 0 | DTM_EnhancementsCapability = 0 | Exist_DTM_GPRS_HighMultislotClass = 0 | PS_HandoverCapability = 0 | DTM_Handover_Capability = 0 | Exist_DownlinkDualCarrierCapability_r7 = 0 | FlexibleTimeslotAssignment = 0 | GAN_PS_HandoverCapability = 0 | RLC_Non_persistentMode = 0 | ReducedLatencyCapability = 0 | UplinkEGPRS2 = 0 | DownlinkEGPRS2 = 0 | EUTRA_FDD_Support = 0 | EUTRA_TDD_Support = 0 | GERAN_To_EUTRAN_supportInGERAN_PTM = 0 | PriorityBasedReselectionSupport = 0 | u.Content length = 65 | MS_RA_capability_value } | DRLCMACDATA ERROR Failed to encode MS RA Capability IE: not enough bits in the output buffer (rc=107) DCSN1 INFO csnStreamDecoder (RAcap): MS_RA_capability_value { | Choice MS_RA_capability_value_Choice = 1 | u.Content length = 21 | offset = 4 | RF_Power_Capability = 1 | Exist_A5_bits = 0 | ES_IND = 1 | PS = 0 | VGCS = 0 | VBS = 0 | Exist_Multislot_capability = 1 | : Multislot_capability | Exist_HSCSD_multislot_class = 0 | Exist_GPRS_multislot_class = 1 | GPRS_multislot_class = 3 | GPRS_Extended_Dynamic_Allocation_Capability = 0 | Exist_SM = 0 | Exist_ECSD_multislot_class = 0 | Exist_EGPRS_multislot_class = 1 | DCSN1 ERROR csnStreamDecoder: error NEED_MORE BITS TO UNPACK (-5) at EGPRS_multislot_class (idx 31): End Multislot_capability | +DCSN1 INFO csnStreamDecoder (RAcap): MS_RA_capability_value { | Choice MS_RA_capability_value_Choice = 1 | u.Content length = 29 | offset = 4 | RF_Power_Capability = 1 | Exist_A5_bits = 0 | ES_IND = 1 | PS = 0 | VGCS = 0 | VBS = 0 | Exist_Multislot_capability = 1 | : Multislot_capability | Exist_HSCSD_multislot_class = 0 | Exist_GPRS_multislot_class = 1 | GPRS_multislot_class = 3 | GPRS_Extended_Dynamic_Allocation_Capability = 0 | Exist_SM = 0 | Exist_ECSD_multislot_class = 0 | Exist_EGPRS_multislot_class = 1 | EGPRS_multislot_class = 0 | EGPRS_Extended_Dynamic_Allocation_Capability = 0 | Exist_DTM_GPRS_multislot_class = 0 | : End Multislot_capability | Exist_Eight_PSK_Power_Capability = 0 | COMPACT_Interference_Measurement_Capability = 0 | Revision_Level_Indicator = NULL | UMTS_FDD_Radio_Access_Technology_Capability = NULL | UMTS_384_TDD_Radio_Access_Technology_Capability = NULL | CDMA2000_Radio_Access_Technology_Capability = NULL | UMTS_128_TDD_Radio_Access_Technology_Capability = NULL | GERAN_Feature_Package_1 = NULL | Modulation_based_multislot_class_support = NULL | GMSK_MultislotPowerProfile = NULL | EightPSK_MultislotProfile = NULL | MultipleTBF_Capability = NULL | DownlinkAdvancedReceiverPerformance = NULL | ExtendedRLC_MAC_ControlMessageSegmentionsCapability = NULL | DTM_EnhancementsCapability = NULL | PS_HandoverCapability = NULL | DTM_Handover_Capability = NULL | FlexibleTimeslotAssignment = NULL | GAN_PS_HandoverCapability = NULL | RLC_Non_persistentMode = NULL | ReducedLatencyCapability = NULL | UplinkEGPRS2 = NULL | DownlinkEGPRS2 = NULL | EUTRA_FDD_Support = NULL | EUTRA_TDD_Support = NULL | GERAN_To_EUTRAN_supportInGERAN_PTM = NULL | PriorityBasedReselectionSupport = NULL | MS_RA_capability_value } | +DRLCMACDATA NOTICE Got 143 remaining bits unhandled by decoder at the end of bitvec diff --git a/tests/rlcmac/RLCMACTest.ok b/tests/rlcmac/RLCMACTest.ok index 89e07ecd..ffcaeb30 100644 --- a/tests/rlcmac/RLCMACTest.ok +++ b/tests/rlcmac/RLCMACTest.ok @@ -134,10 +134,13 @@ vector1 == vector2 : TRUE *** testRAcap *** === Test decoding of MS RA Capability === GPRS multislot class = 3 -EGPRS multislot class = 0 +EGPRS multislot class = 3 === Test encoding of MS RA Capability === encode_gsm_ra_cap() returns -5 -vector1 (len_ind=29) = 13 a5 14 62 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -vector2 (len_ind=65) = 18 25 14 62 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +vector1 (len_ind=27) = 13 65 14 62 30 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +vector2 (len_ind=65) = 18 25 14 62 30 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 === Test decoding of a malformed vector (short length indicator) === decode_gsm_ra_cap() returns -5 +*** testMalformedRAcap *** +=== Test decoding of MS RA Capability === +decode_gsm_ra_cap() returns 0 |