aboutsummaryrefslogtreecommitdiffstats
path: root/tests/types/TypesTest.ok
AgeCommit message (Collapse)AuthorFilesLines
2023-06-03Document pcu_lsb() functionPau Espin Pedrol1-1/+1
While at it, fix a typo in the test output. This function is nowadays only used in ms_current_pacch_slots(), which is used only to print the PACCH TS (the first common UL & DL TS). Change-Id: Id1d0b681f6866618f9f3a8c64d6a6c809ca50ea7
2020-11-10TLLI 0x00000000 is a valid TLLI, use 0xffffffff insteadVadim Yanitskiy1-1/+1
The assumption that TLLI 0x00000000 is invalid and can be used as the initializer is wrong. Similar to TMSI, 0x00000000 is a perfectly valid value, while 0xffffffff is reserved - use it. According to 3GPP TS 23.003, section 2.4, a TMSI/P-TMSI with all 32 bits equal to 1 is special and shall not be allocated by the network. The reason is that it must be stored on the SIM, where 'ff'O represents the erased state. According to section 2.6 of the same document, a local/foreign TLLI is derived from P-TMSI, so the same rule applies to TLLI. I manually checked and corrected all occurances of 'tlli' in the code. The test expectations have been adjusted with this command: $ find tests/ -name "*.err" | xargs sed -i "s/0x00000000/0xffffffff/g" so there should be no behavior change. The only exception is the 'TypesTest', where TLLI 0xffffffff is being encoded and expected in the hexdump, so I regenerated the test output. Change-Id: Ie89fab75ecc1d8b5e238d3ff214ea7ac830b68b5 Related: OS#4844
2019-03-27Use Timing Advance Index in UL assignmentsMax1-2/+2
Write TAI (if available) when generating Rest Octets for UL Assignment. This should not affect actual PCU behavior because TAI is not yet supported by upper layers but we have to adjust corresponding tests anyway. That's updated version of reverted commit. Change-Id: I69407793bdb863be5fc42adadf75842d22f27335 Related: OS#3014
2019-03-27Rewrite Packet Uplink IA Rest Octets for SBAMax1-1/+1
Use bitvec_set_*() directly without external write pointer tracking to simplify the code. This is part of IA Rest Octets (3GPP TS 44.018 ยง10.5.2.16) which is the last part of the message so it should not interfere with the rest of encoding functions. The difference in the expected test output is due to proper handling of TAI which should not be transmitted for SBA according to the Note in Table 10.5.2.16.1 in 3GPP TS 44.018. The change was manually tested against real mobile phone using options 'gprs mode gprs' in osmo-bsc.cfg and 'two-phase-access' in osmo-pcu.cfg to make sure appropriate code path is actually triggered. That's partially based on reverted commit 93d947f5e8a30acc9250c124bf9d5bb6a8863526. Change-Id: I97d53c27c1ca9e032d431b3aa7f915027d63ddc0 Related: OS#3014
2019-03-27Fix Channel Coding Command for MCSMax1-2/+2
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
2019-02-19Add encoding tests for Immediate AssignmentMax1-0/+10
Change-Id: I63f4654b23c7c4f063f6b3254d77157fac798586
2017-12-22Add tests for pcu_lsb()Max1-0/+257
This utility functions is used by TBF allocation routines and only tested indirectly through allocation test. Let's add proper exhaustive test which checks all uint8_t values. This also requires adding missing include to pcu_utils.h Change-Id: If08a7f0d31f0e5ad8a5efa5885880aed19c329ab
2016-11-09Handle Immediate assignment rejectaravind sirsikar1-0/+2
When RACH is received, PCU will generate the Immediate assignment reject message if no resources are present. The encoding is done based on section 9.1.20 of 44.018 version 11.7.0 Release 11. This patch also includes the test case to validate the generated Immediate assignment reject message. This patch is integration tested on Osmo-trx setup with Ettus B210 board and LG F70 MS with some simulation code changes in Osmo-pcu. Change-Id: I3d33e2b9746fa4f338fad0e6b63b1c5f07de6f9b
2016-02-08tbf: Use bitvec based window methods for GPRSJacob Erlbeck1-1/+2
Currently the old fixed 64 bit RBB based implementation is used for GPRS. Use the new bitvec based methods instead. Sponsored-by: On-Waves ehf
2013-12-12tests/TypesTest: Check rbb handling in DLDaniel Willmann1-0/+1
2013-12-12tests/TypesTest: Print the result of Encoding::encode_rbb()Daniel Willmann1-0/+5
2013-11-21types: Add a simple testcase for basic types and fix the LLC codeHolger Hans Peter Freyther1-0/+1
* Make append_data, remaining_space and fits_in_current.. work on m_length and not the index. This ways things can't overflow. * The current API consumer was moving the m_index so it should have worked okay.