aboutsummaryrefslogtreecommitdiffstats
path: root/tests/alloc
diff options
context:
space:
mode:
authorJacob Erlbeck <jerlbeck@sysmocom.de>2015-05-13 13:33:12 +0200
committerJacob Erlbeck <jerlbeck@sysmocom.de>2015-05-20 11:36:12 +0200
commite43460b50fc152026ab96b5095b94fbac6939ab2 (patch)
treebe82e5062fa68f19a4bd660394a77104728e5560 /tests/alloc
parent536708617505a017b6b263a32f592471913ec464 (diff)
ms: Integrate the MS storage
Use the MS storage to find a MS object for a given TLLI instead of searching the TBF lists. The TBFs are then taken from the MS object, if one has been found. If all TBF might be temporarily detached from the MS object, a GprsMs::Guard is added to prevent the deletion of the object, in case another TBF gets attached later on in the scope. Ticket: #1674 Sponsored-by: On-Waves ehf
Diffstat (limited to 'tests/alloc')
-rw-r--r--tests/alloc/AllocTest.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/alloc/AllocTest.cpp b/tests/alloc/AllocTest.cpp
index dcc33712..3dc3e7ae 100644
--- a/tests/alloc/AllocTest.cpp
+++ b/tests/alloc/AllocTest.cpp
@@ -190,6 +190,7 @@ static void test_alloc_b(int ms_class)
dl_tbf = tbf_alloc_dl_tbf(bts, NULL, tfi, trx_no, ms_class, 1);
dl_tbf->m_tlli = 0x23;
dl_tbf->m_tlli_valid = true;
+ dl_tbf->update_ms(dl_tbf->m_tlli);
OSMO_ASSERT(dl_tbf);
dump_assignment(dl_tbf, "DL");
@@ -198,6 +199,7 @@ static void test_alloc_b(int ms_class)
ul_tbf = tbf_alloc_ul_tbf(bts, dl_tbf, tfi, trx_no, ms_class, 0);
ul_tbf->m_tlli = 0x23;
ul_tbf->m_tlli_valid = true;
+ ul_tbf->update_ms(ul_tbf->m_tlli);
ul_tbf->m_contention_resolution_done = 1;
OSMO_ASSERT(ul_tbf);
dump_assignment(ul_tbf, "UL");
@@ -348,6 +350,7 @@ static void test_alloc_b(bool ts0, bool ts1, bool ts2, bool ts3, bool ts4, bool
OSMO_ASSERT(dl_tbf);
dl_tbf->m_tlli = 0x23;
dl_tbf->m_tlli_valid = true;
+ dl_tbf->update_ms(dl_tbf->m_tlli);
tfi = the_bts.tfi_find_free(GPRS_RLCMAC_UL_TBF, &trx_no, -1);
OSMO_ASSERT(tfi >= 0);
@@ -355,6 +358,7 @@ static void test_alloc_b(bool ts0, bool ts1, bool ts2, bool ts3, bool ts4, bool
OSMO_ASSERT(ul_tbf);
ul_tbf->m_tlli = 0x23;
ul_tbf->m_tlli_valid = true;
+ ul_tbf->update_ms(ul_tbf->m_tlli);
ul_tbf->m_contention_resolution_done = 1;
OSMO_ASSERT(dl_tbf->first_common_ts == ul_tbf->first_common_ts);