aboutsummaryrefslogtreecommitdiffstats
path: root/tests/tbf
diff options
context:
space:
mode:
authorJacob Erlbeck <jerlbeck@sysmocom.de>2015-05-21 11:07:53 +0200
committerJacob Erlbeck <jerlbeck@sysmocom.de>2015-05-28 12:29:40 +0200
commit7b9f825ae8f8a39c072413820a1a0557f420499d (patch)
tree7f989065bba29d68101ea0f1242830eff0ddf0d5 /tests/tbf
parentb0e5eaf59adbefc44e01850a6784c9da0c3abbf9 (diff)
ms: Use the IMSI to retrieve the MS object
This commit extends get_ms() to really compare the IMSI if it has been given. Matching by TLLI has a higher precedence than matching by IMSI. Ticket: #1674 Sponsored-by: On-Waves ehf
Diffstat (limited to 'tests/tbf')
-rw-r--r--tests/tbf/TbfTest.cpp14
-rw-r--r--tests/tbf/TbfTest.err2
2 files changed, 9 insertions, 7 deletions
diff --git a/tests/tbf/TbfTest.cpp b/tests/tbf/TbfTest.cpp
index bc783176..b0106caf 100644
--- a/tests/tbf/TbfTest.cpp
+++ b/tests/tbf/TbfTest.cpp
@@ -327,28 +327,28 @@ static void test_tbf_imsi()
dl_tbf[0]->assign_imsi("001001000000001");
ms1 = the_bts.ms_store().get_ms(0, 0, "001001000000001");
- /* OSMO_ASSERT(ms1 != NULL); */
+ OSMO_ASSERT(ms1 != NULL);
ms2 = the_bts.ms_store().get_ms(0xf1000001);
OSMO_ASSERT(ms2 != NULL);
OSMO_ASSERT(strcmp(ms2->imsi(), "001001000000001") == 0);
- /* OSMO_ASSERT(ms1 == ms2); */
+ OSMO_ASSERT(ms1 == ms2);
/* change the IMSI on TBF 0 */
dl_tbf[0]->assign_imsi("001001000000002");
ms1 = the_bts.ms_store().get_ms(0, 0, "001001000000001");
OSMO_ASSERT(ms1 == NULL);
ms1 = the_bts.ms_store().get_ms(0, 0, "001001000000002");
- /* OSMO_ASSERT(ms1 != NULL); */
+ OSMO_ASSERT(ms1 != NULL);
OSMO_ASSERT(strcmp(ms2->imsi(), "001001000000002") == 0);
- /* OSMO_ASSERT(ms1 == ms2); */
+ OSMO_ASSERT(ms1 == ms2);
/* use the same IMSI on TBF 2 */
dl_tbf[1]->assign_imsi("001001000000002");
ms1 = the_bts.ms_store().get_ms(0, 0, "001001000000002");
- /* OSMO_ASSERT(ms1 != NULL); */
+ OSMO_ASSERT(ms1 != NULL);
OSMO_ASSERT(ms1 != ms2);
- /* OSMO_ASSERT(strcmp(ms1->imsi(), "001001000000002") == 0); */
- /* OSMO_ASSERT(strcmp(ms2->imsi(), "") == 0); */
+ OSMO_ASSERT(strcmp(ms1->imsi(), "001001000000002") == 0);
+ OSMO_ASSERT(strcmp(ms2->imsi(), "") == 0);
tbf_free(dl_tbf[1]);
ms1 = the_bts.ms_store().get_ms(0, 0, "001001000000002");
diff --git a/tests/tbf/TbfTest.err b/tests/tbf/TbfTest.err
index 7fa1283b..8c411f89 100644
--- a/tests/tbf/TbfTest.err
+++ b/tests/tbf/TbfTest.err
@@ -395,6 +395,8 @@ The MS object cannot fully confirm an unexpected TLLI: 0xf1000002, partly confir
Attaching TBF to MS object, TLLI = 0xf1000002, TBF = TBF(TFI=1 TLLI=0xf1000002 DIR=DL STATE=FLOW)
Modifying MS object, TLLI = 0xf1000001, IMSI '' -> '001001000000001'
Modifying MS object, TLLI = 0xf1000001, IMSI '001001000000001' -> '001001000000002'
+TBF(TFI=1 TLLI=0xf1000002 DIR=DL STATE=FLOW) the IMSI '001001000000002' was already assigned to another MS object: TLLI = 0xf1000001, that IMSI will be removed
+Modifying MS object, TLLI = 0xf1000001, IMSI '001001000000002' -> ''
Modifying MS object, TLLI = 0xf1000002, IMSI '' -> '001001000000002'
TBF(TFI=1 TLLI=0xf1000002 DIR=DL STATE=FLOW) free
TBF(TFI=1 TLLI=0xf1000002 DIR=DL STATE=FLOW) Software error: Pending downlink assignment. This may not happen, because the assignment message never gets transmitted. Please be sure not to free in this state. PLEASE FIX!