aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorMax <msuraev@sysmocom.de>2018-01-23 20:09:06 +0100
committerMax <msuraev@sysmocom.de>2018-01-24 11:06:22 +0100
commit0e5998087ee530d8b13e56ac8355693869cd7446 (patch)
tree1c85647057acdc7b34b2da6010981cfc1497be12 /tests
parent0524e38d9ea519898a61256389c3a7277410ccb8 (diff)
TBF: make UL/DL state internal
* add functions/macros for setting TBF's UL/DL state * add functions for checking TBF's UL/DL state * move pre-free check into separate function N. B: this should not be confused with TBF-UL or TBF-DL state. Change-Id: Idcbf5775d17b1247f2ed01788f9b0788ce66e871 Related: OS#1539
Diffstat (limited to 'tests')
-rw-r--r--tests/tbf/TbfTest.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/tbf/TbfTest.cpp b/tests/tbf/TbfTest.cpp
index 9e21c73..968f9eb 100644
--- a/tests/tbf/TbfTest.cpp
+++ b/tests/tbf/TbfTest.cpp
@@ -175,7 +175,7 @@ static gprs_rlcmac_dl_tbf *create_dl_tbf(BTS *the_bts, uint8_t ms_class,
check_tbf(dl_tbf);
/* "Establish" the DL TBF */
- dl_tbf->dl_ass_state = GPRS_RLCMAC_DL_ASS_SEND_ASS;
+ TBF_SET_ASS_STATE_DL(dl_tbf, GPRS_RLCMAC_DL_ASS_SEND_ASS);
TBF_SET_STATE(dl_tbf, GPRS_RLCMAC_FLOW);
dl_tbf->m_wait_confirm = 0;
check_tbf(dl_tbf);
@@ -276,7 +276,7 @@ static void test_tbf_final_ack(enum test_tbf_final_ack_mode test_mode)
OSMO_ASSERT(new_tbf != dl_tbf);
OSMO_ASSERT(new_tbf->tfi() == 1);
check_tbf(dl_tbf);
- dl_tbf->dl_ass_state = GPRS_RLCMAC_DL_ASS_NONE;
+ TBF_SET_ASS_STATE_DL(dl_tbf, GPRS_RLCMAC_DL_ASS_NONE);
if (test_mode == TEST_MODE_REVERSE_FREE) {
GprsMs::Guard guard(ms);
tbf_free(new_tbf);
@@ -365,7 +365,7 @@ static void test_tbf_delayed_release()
/* Clean up and ensure tbfs are in the correct state */
OSMO_ASSERT(dl_tbf->state_is(GPRS_RLCMAC_WAIT_RELEASE));
- dl_tbf->dl_ass_state = GPRS_RLCMAC_DL_ASS_NONE;
+ TBF_SET_ASS_STATE_DL(dl_tbf, GPRS_RLCMAC_DL_ASS_NONE);
check_tbf(dl_tbf);
tbf_free(dl_tbf);
printf("=== end %s ===\n", __func__);
@@ -2699,7 +2699,7 @@ static void establish_and_use_egprs_dl_tbf(BTS *the_bts, int mcs)
/* Clean up and ensure tbfs are in the correct state */
OSMO_ASSERT(dl_tbf->state_is(GPRS_RLCMAC_WAIT_RELEASE));
- dl_tbf->dl_ass_state = GPRS_RLCMAC_DL_ASS_NONE;
+ TBF_SET_ASS_STATE_DL(dl_tbf, GPRS_RLCMAC_DL_ASS_NONE);
check_tbf(dl_tbf);
tbf_free(dl_tbf);
}
@@ -2748,7 +2748,7 @@ static void tbf_cleanup(gprs_rlcmac_dl_tbf *dl_tbf)
/* Clean up and ensure tbfs are in the correct state */
OSMO_ASSERT(dl_tbf->state_is(GPRS_RLCMAC_WAIT_RELEASE));
- dl_tbf->dl_ass_state = GPRS_RLCMAC_DL_ASS_NONE;
+ TBF_SET_ASS_STATE_DL(dl_tbf, GPRS_RLCMAC_DL_ASS_NONE);
check_tbf(dl_tbf);
tbf_free(dl_tbf);