aboutsummaryrefslogtreecommitdiffstats
path: root/tests/types
AgeCommit message (Collapse)AuthorFilesLines
2018-01-15Allocate global context for TypesTestMax1-0/+5
Missing allocation leads to LSAN error: ==24997==ERROR: LeakSanitizer: detected memory leaks Indirect leak of 230 byte(s) in 2 object(s) allocated from: #0 0x7feaa1b2fb50 in __interceptor_malloc (/usr/lib/x86_64-linux-gnu/libasan.so.4+0xdeb50) #1 0x7feaa13dbc80 in _talloc_zero (/usr/lib/x86_64-linux-gnu/libtalloc.so.2+0x5c80) Change-Id: I62c03dad353f459abcdb7a18a69b7782da38dfb7 SUMMARY: AddressSanitizer: 230 byte(s) leaked in 2 allocation(s).
2017-12-22Add tests for pcu_lsb()Max2-0/+275
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
2017-05-15remove pcu own bitvector implementationAlexander Couzens1-1/+1
The osmocore bitvec is exact the same, but use a pointer instead of a reference. Change-Id: Id8f797631d89aa12b6e48efb2dc153a3e2f059f7
2016-11-09Handle Immediate assignment rejectaravind sirsikar2-0/+39
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-09-02Fix GPRS PUAN encoding: wrong BSN statusAravind Sirsikar1-3/+2
Earlier there was an incorrect encoding of BSN status in GPRS PUAN message. This was a bottle neck for GPRS performance testing for UL. Which has been fixed in this patch. Related: OS#1806 Change-Id: I98e586aa5cb9200cf03e092556304211d4d459aa
2016-09-02GPRS: PUAN encoding: add test case to show wrong BSNs statusAravind Sirsikar1-0/+18
This patch adds a test case which expects a current bug with GPRS PUAN encoding. The test's expectation is corrected along with the bug fix in a subsequent commit Related: OS#1806 Change-Id: Ied0f1dd3037d8fac6a772f4e097defb72634f955
2016-02-08tbf: Use bitvec based window methods for GPRSJacob Erlbeck2-3/+56
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
2016-02-01rlc: Add constructor to window classesJacob Erlbeck1-3/+3
Currently the gprs_rlc_dl_window and gprs_rlc_ul_window do not have constructors, but need to get initialized explicitly. This commit adds constructors to both classes and removes explicit external initialization code. Sponsored-by: On-Waves ehf
2015-12-16rlc: Do not raise_v_q in receive_bsnJacob Erlbeck1-8/+17
Currently gprs_rlc_ul_window::receive_bsn calls raise_v_q and returns the number of RLC data blocks that can be taken from the queue. This does not fit the EGPRS feature to put 2 independant data blocks in a single RLC block. This commit removes raise_v_q from receive_bsn, hence it must be called explicitely to get the number of processable data blocks. Sponsored-by: On-Waves ehf
2015-05-04pcu: Fix non-critical warningsJacob Erlbeck1-2/+0
These fixes do not affect the semantics of the code. They either help gcc by providing default values that won't be used ("may be uninitialised"), remove unused variables, or change signed to unsigned variables to avoid comparison warnings. Addresses: bts.cpp:494:32: warning: 'tbf' may be used uninitialized in this function emu/test_replay_gprs_attach.cpp:81:27: warning: comparison between signed and unsigned integer expressions emu/test_pdp_activation.cpp:95:23: warning: unused variable ‘budh’ emu/test_pdp_activation.cpp:97:6: warning: variable ‘rc’ set but not used emu/pcu_emu.cpp:109:26: warning: unused variable ‘bts’ alloc/AllocTest.cpp:74:27: warning: unused variable ‘tbf’ osmocom/core/utils.h:13:50: warning: comparison between signed and unsigned integer expressions types/TypesTest.cpp:319:7: warning: unused variable ‘count’ types/TypesTest.cpp:320:11: warning: unused variable ‘rbb’ alloc/AllocTest.cpp:74:27: warning: unused variable ‘tbf’ alloc/AllocTest.cpp:132:11: warning: unused variable ‘ts_no’
2014-01-15rlc: Use an enum for the state array instead of charsDaniel Willmann1-3/+3
gprs_rlc_bsn_state is now used to hold the ACK state of sent/received rlc packets.
2014-01-15rlc/tbf: Move v_b into DL windowDaniel Willmann1-3/+2
Move functions resend_needed(), mark_for_resend(), update(), move_window(), state(), count_unacked() out of v_b directly into the UL window and provide a function get_state in v_b to access the v_b elements.
2014-01-15rlc/tbf: Add function receive_bsn that updates v_r, v_q, v_nDaniel Willmann1-27/+9
We don't need to expose the mecanics of updating the variables to the outside.
2014-01-15rlc/tbf: Move v_n into gprs_rlc_ul_window and adapt the testsDaniel Willmann1-40/+39
v_n is part of the UL window handling so move it inside the ul_window
2013-12-12tests/TypesTest: Check rbb handling in DLDaniel Willmann2-0/+37
2013-12-12tests/TypesTest: Ensure that extract_rbb(encode_rbb(x)) == xDaniel Willmann1-0/+11
2013-12-12tests/TypesTest: Print the result of Encoding::encode_rbb()Daniel Willmann2-0/+17
2013-12-12tests/TypesTest: Add OSMO_ASSERT_STR_EQ which prints out the parametersDaniel Willmann1-6/+15
Use it to compare rbb
2013-12-12tests/TypesTest: Test ssn() and update_rbb() uplink window methods in TypesTestDaniel Willmann1-0/+27
Test that ssn and rbb are updated correctly.
2013-12-04rlc: Create a testcase for the uplink windowHolger Hans Peter Freyther1-1/+99
2013-11-26rlc: Add a basic test for the DL Window and moving the windowHolger Hans Peter Freyther1-0/+49
2013-11-26rlc: Test the basic of the gprs_rlc_v_n code for remembering the stateHolger Hans Peter Freyther1-0/+20
2013-11-23rlc: Create a basic test that mark/is is talking about the sameHolger Hans Peter Freyther1-0/+27
2013-11-21rlc: Add a simple test for the RLC data structure for the initHolger Hans Peter Freyther1-0/+15
2013-11-21types: Add a simple testcase for basic types and fix the LLC codeHolger Hans Peter Freyther3-0/+94
* 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.