osmo-pcu/tests/rlcmac
Aravind Sirsikar 9f5f008aed CSN1 decoding: add test to show bug in CSN_LEFT_ALIGNED_VAR_BMP
CSN1 decoding currently contains an attempted read past vector boundaries in
case of a starting bit offset != 0, so that the last amount of bits read should
be < 8. In the case of CSN_LEFT_ALIGNED_VAR_BMP, the mod-8 calculation is
flawed, and in what should be the final step of reading n < 8 bits, 8 bits are
read instead of n (with an extraneous read of n bits following after that).
This leads to -EINVAL being returned by bitvec_get_bit_pos() and bogus
resulting data.

Add testCsnLeftAlignedVarBmpBounds() in RLCMACTest.cpp to show and expect this
bug. The test's expectation shall be corrected along with the bug fix in a
subsequent commit.

Related: OS#1805
Tweaked-by: Neels Hofmeyr <nhofmeyr@sysmocom.de>
Change-Id: I4641f5d1d49f66cb1a5cd813befb3a2a266001b0
2016-09-14 01:26:33 +00:00
..
RLCMACTest.cpp CSN1 decoding: add test to show bug in CSN_LEFT_ALIGNED_VAR_BMP 2016-09-14 01:26:33 +00:00
RLCMACTest.err tests: Move the RLCMACTest into the test directory and setup autotest 2013-08-02 13:40:20 +04:00
RLCMACTest.ok Fix issue in encoding CSN_RECURSIVE_ARRAY 2016-03-16 15:01:53 +01:00