osmo-pcu/tests/alloc
Vadim Yanitskiy cb98894eb1 TLLI 0x00000000 is a valid TLLI, use 0xffffffff instead
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
2020-11-10 17:06:39 +00:00
..
AllocTest.cpp gprs_debug: Use only LOGL_NOTICE as default loglevel 2020-05-13 16:41:55 +00:00
AllocTest.err TLLI 0x00000000 is a valid TLLI, use 0xffffffff instead 2020-11-10 17:06:39 +00:00
AllocTest.ok Add multislot classes from latest spec 2018-01-25 16:12:58 +00:00
MslotTest.cpp use osmo_init_logging2() with proper talloc ctx 2018-04-01 16:57:42 +02:00
MslotTest.ok Simplify TS alloc: move slot check into functions 2018-02-21 12:08:40 +00:00