ms: Drop setting tlli during ms_alloc()

Inside osmo-pcu code, the code path is to always call ms_alloc with
tlli=GSM_RESERVED_TMSI; a different value is only passed during unit
tests.
It makes no sense to have unit tests using differnet code paths than
ther app itself, since in the app it always desired to go through the
ms_set_tlli() and ms_confirm_tlli() which does more stuff.
Hence, drop the tlli param in ms_alloc and change the unit tests to use
the available APIs used by the application.

Change-Id: I730ec911a43b0f4e78faee4eeffb3ca8601564f8
diff --git a/tests/ms/MsTest.cpp b/tests/ms/MsTest.cpp
index 6a770c9..ec1672a 100644
--- a/tests/ms/MsTest.cpp
+++ b/tests/ms/MsTest.cpp
@@ -86,7 +86,8 @@
 
 	printf("=== start %s ===\n", __func__);
 
-	ms = ms_alloc(bts, tlli);
+	ms = ms_alloc(bts);
+	ms_set_tlli(ms, tlli);
 	OSMO_ASSERT(ms_is_idle(ms));
 
 	dl_tbf = alloc_dl_tbf(bts, ms);
@@ -148,7 +149,8 @@
 
 	printf("=== start %s ===\n", __func__);
 
-	ms = ms_alloc(bts, tlli);
+	ms = ms_alloc(bts);
+	ms_set_tlli(ms, tlli);
 	ms_set_callback(ms, &ms_cb);
 
 	OSMO_ASSERT(ms_is_idle(ms));
@@ -219,7 +221,8 @@
 
 	printf("=== start %s ===\n", __func__);
 
-	ms = ms_alloc(bts, tlli);
+	ms = ms_alloc(bts);
+	ms_confirm_tlli(ms, tlli);
 	ms_set_callback(ms, &ms_replace_tbf_cb);
 
 	OSMO_ASSERT(ms_is_idle(ms));
@@ -290,7 +293,7 @@
 
 	printf("=== start %s ===\n", __func__);
 
-	ms = ms_alloc(bts, start_tlli);
+	ms = ms_alloc(bts);
 
 	OSMO_ASSERT(ms_is_idle(ms));
 
@@ -298,12 +301,10 @@
 	ms_set_tlli(ms, new_ms_tlli);
 	OSMO_ASSERT(ms_tlli(ms) == new_ms_tlli);
 	OSMO_ASSERT(ms_check_tlli(ms, new_ms_tlli));
-	OSMO_ASSERT(ms_check_tlli(ms, start_tlli));
 
 	ms_confirm_tlli(ms, new_ms_tlli);
 	OSMO_ASSERT(ms_tlli(ms) == new_ms_tlli);
 	OSMO_ASSERT(ms_check_tlli(ms, new_ms_tlli));
-	OSMO_ASSERT(!ms_check_tlli(ms, start_tlli));
 
 	/* MS announces TLLI, SGSN uses it later */
 	ms_set_tlli(ms, start_tlli);
@@ -474,7 +475,8 @@
 
 	printf("=== start %s ===\n", __func__);
 
-	ms = ms_alloc(bts, tlli);
+	ms = ms_alloc(bts);
+	ms_set_tlli(ms, tlli);
 	ms_set_callback(ms, &ms_cb);
 	ms_set_timeout(ms, 1);
 
@@ -532,7 +534,8 @@
 	the_pcu->vty.cs_downgrade_threshold = 0;
 	the_pcu->vty.cs_adj_lower_limit = 0;
 
-	ms = ms_alloc(bts, tlli);
+	ms = ms_alloc(bts);
+	ms_confirm_tlli(ms, tlli);
 
 	OSMO_ASSERT(ms_is_idle(ms));
 
@@ -571,14 +574,16 @@
 
 	printf("=== start %s ===\n", __func__);
 
-	ms1 = ms_alloc(bts, tlli);
+	ms1 = ms_alloc(bts);
+	ms_confirm_tlli(ms1, tlli);
 	dump_ms(ms1, "1: no BTS defaults  ");
 
 	bts->initial_cs_dl = 4;
 	bts->initial_cs_ul = 1;
 	the_pcu->vty.cs_downgrade_threshold = 0;
 
-	ms2 = ms_alloc(bts, tlli + 1);
+	ms2 = ms_alloc(bts);
+	ms_confirm_tlli(ms2, tlli + 1);
 	dump_ms(ms2, "2: with BTS defaults");
 
 	dl_tbf = alloc_dl_tbf(bts, ms2);