aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2021-04-26 16:48:34 +0200
committerPau Espin Pedrol <pespin@sysmocom.de>2021-04-26 17:19:07 +0200
commit54742f287c9fe3208f867f95a11ef63e5b0ab4e9 (patch)
tree3d0b5e4b92745af009150098b1d55dd6404f8358 /tests
parent14339f6faca8a3e7db54c00c3de6ce8eb791f244 (diff)
ul_tbf: Clean up handle_tbf_reject()
Document the function, make it look similar to usual TBF creation path tbf_alloc_ul()->tbf_alloc_ul_tbf->tbf::setup(), which it mimics with some differences. Get rid of unneeded stuff like creating MS and settings its TLLI (that's already done in only caller of the function). There's no need for calling update_ms() either. Change-Id: I61df2e4f0f0df1f8db941741a2d35a2319252c5e
Diffstat (limited to 'tests')
-rw-r--r--tests/tbf/TbfTest.cpp8
-rw-r--r--tests/tbf/TbfTest.err4
2 files changed, 7 insertions, 5 deletions
diff --git a/tests/tbf/TbfTest.cpp b/tests/tbf/TbfTest.cpp
index c839ee05..cf8e0830 100644
--- a/tests/tbf/TbfTest.cpp
+++ b/tests/tbf/TbfTest.cpp
@@ -3160,7 +3160,8 @@ static void test_packet_access_rej_prr_no_other_tbfs()
int ts_no = 7;
uint8_t trx_no = 0;
uint32_t tlli = 0xffeeddcc;
- struct gprs_rlcmac_ul_tbf *ul_tbf = NULL;
+ struct gprs_rlcmac_ul_tbf *ul_tbf;
+ struct GprsMs *ms;
fprintf(stderr, "=== start %s ===\n", __func__);
@@ -3168,8 +3169,9 @@ static void test_packet_access_rej_prr_no_other_tbfs()
int rc = 0;
- ul_tbf = handle_tbf_reject(bts, NULL, tlli,
- trx_no, ts_no);
+ ms = bts_alloc_ms(bts, 0, 0);
+ ms_set_tlli(ms, tlli);
+ ul_tbf = handle_tbf_reject(bts, ms, trx_no, ts_no);
OSMO_ASSERT(ul_tbf != 0);
diff --git a/tests/tbf/TbfTest.err b/tests/tbf/TbfTest.err
index 4b38aec9..e700fe26 100644
--- a/tests/tbf/TbfTest.err
+++ b/tests/tbf/TbfTest.err
@@ -7956,8 +7956,8 @@ MS(TLLI=0xffeeddd3, IMSI=, TA=7, 11/11,) Allocating UL TBF
[UL] algo A <multi> (suggested TRX: 0): failed to allocate a TS, no USF available
TBF(TFI=0 TLLI=0xffeeddd3 DIR=UL STATE=NULL EGPRS) Timeslot Allocation failed: trx = 0, single_slot = 0
MS(TLLI=0xffeeddd3, IMSI=, TA=7, 11/11,) No PDCH resource
+MS(TLLI=0xffeeddd3, IMSI=, TA=7, 11/11,) Attaching UL TBF: TBF(TFI=0 TLLI=0xffeeddd3 DIR=UL STATE=NULL)
TBF(TFI=0 TLLI=0xffeeddd3 DIR=UL STATE=NULL) changes state from NULL to ASSIGN
-MS(TLLI=0xffeeddd3, IMSI=, TA=7, 11/11,) Attaching UL TBF: TBF(TFI=0 TLLI=0xffeeddd3 DIR=UL STATE=ASSIGN)
TBF(TFI=0 TLLI=0xffeeddd3 DIR=UL STATE=ASSIGN) changes UL ASS state from GPRS_RLCMAC_UL_ASS_NONE to GPRS_RLCMAC_UL_ASS_SEND_ASS_REJ
PDCH(bts=0,trx=0,ts=7) Expiring FN=82 but previous FN=2654231 is still reserved!
PDCH(bts=0,trx=0,ts=7) Timeout for registered POLL (FN=2654231): TBF(TFI=6 TLLI=0xffeeddd2 DIR=UL STATE=ASSIGN EGPRS)
@@ -7974,8 +7974,8 @@ PDCH(bts=0,trx=0,ts=7) FN=2654218 Scheduling control message at RTS for TBF(TFI=
=== start test_packet_access_rej_prr_no_other_tbfs ===
Creating MS object, TLLI = 0xffffffff
Modifying MS object, UL TLLI: 0xffffffff -> 0xffeeddcc, not yet confirmed
+MS(TLLI=0xffeeddcc, IMSI=, TA=220, 0/0,) Attaching UL TBF: TBF(TFI=0 TLLI=0xffeeddcc DIR=UL STATE=NULL)
TBF(TFI=0 TLLI=0xffeeddcc DIR=UL STATE=NULL) changes state from NULL to ASSIGN
-MS(TLLI=0xffeeddcc, IMSI=, TA=220, 0/0,) Attaching UL TBF: TBF(TFI=0 TLLI=0xffeeddcc DIR=UL STATE=ASSIGN)
TBF(TFI=0 TLLI=0xffeeddcc DIR=UL STATE=ASSIGN) changes UL ASS state from GPRS_RLCMAC_UL_ASS_NONE to GPRS_RLCMAC_UL_ASS_SEND_ASS_REJ
TBF(TFI=0 TLLI=0xffeeddcc DIR=UL STATE=ASSIGN) starting timer T0 [reject (PACCH)] with 0 sec. 2000 microsec, cur_fn=2654167
PDCH(bts=0,trx=0,ts=7) FN=2654218 Scheduling control message at RTS for TBF(TFI=0 TLLI=0xffeeddcc DIR=UL STATE=ASSIGN)