diff options
author | Pau Espin Pedrol <pespin@sysmocom.de> | 2021-03-29 18:15:30 +0200 |
---|---|---|
committer | Pau Espin Pedrol <pespin@sysmocom.de> | 2021-03-31 17:39:50 +0200 |
commit | 86580e1966b7272cad75c845607e45b8347cf758 (patch) | |
tree | 3b65144d5888c3c1eed7fbb5de9ee2c86bdfdcda /tests | |
parent | b5ae0811d1667e792fc3a4e550384791f4bca4c9 (diff) |
pdch_ulc: Store TBF poll reason
This allows easily checking the initial reason to trigger the poll when
either it is received or times out.
Later on this reason can be transformed into an FSM event and sent to
the related FSM.
Related: OS#5020
Change-Id: Ie8fefd1f47ad674ce597a8065b15284088956bde
Diffstat (limited to 'tests')
-rw-r--r-- | tests/ulc/PdchUlcTest.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/ulc/PdchUlcTest.cpp b/tests/ulc/PdchUlcTest.cpp index 3372d2f0..84035d17 100644 --- a/tests/ulc/PdchUlcTest.cpp +++ b/tests/ulc/PdchUlcTest.cpp @@ -88,16 +88,16 @@ static void test_reserve_multiple() node = pdch_ulc_get_node(pdch->ulc, sba2->fn); OSMO_ASSERT(node->type == PDCH_ULC_NODE_SBA && node->sba.sba == sba2); - rc = pdch_ulc_reserve_tbf_poll(pdch->ulc, sba1->fn, tbf1); + rc = pdch_ulc_reserve_tbf_poll(pdch->ulc, sba1->fn, tbf1, PDCH_ULC_POLL_UL_ASS); OSMO_ASSERT(rc == -EEXIST); OSMO_ASSERT(pdch_ulc_get_tbf_poll(pdch->ulc, sba1->fn) == NULL); - rc = pdch_ulc_reserve_tbf_poll(pdch->ulc, sba2->fn, tbf1); + rc = pdch_ulc_reserve_tbf_poll(pdch->ulc, sba2->fn, tbf1, PDCH_ULC_POLL_UL_ASS); OSMO_ASSERT(rc == -EEXIST); OSMO_ASSERT(pdch_ulc_get_tbf_poll(pdch->ulc, sba2->fn) == NULL); /* Now Reserve correctly TBF1 */ OSMO_ASSERT(pdch_ulc_fn_is_free(pdch->ulc, tbf1_poll_fn1) == true); - rc = pdch_ulc_reserve_tbf_poll(pdch->ulc, tbf1_poll_fn1, tbf1); + rc = pdch_ulc_reserve_tbf_poll(pdch->ulc, tbf1_poll_fn1, tbf1, PDCH_ULC_POLL_UL_ASS); OSMO_ASSERT(rc == 0); OSMO_ASSERT(pdch_ulc_get_tbf_poll(pdch->ulc, tbf1_poll_fn1) == tbf1); OSMO_ASSERT(pdch_ulc_fn_is_free(pdch->ulc, tbf1_poll_fn1) == false); @@ -107,7 +107,7 @@ static void test_reserve_multiple() /* Now reserve correctly TBF2 */ OSMO_ASSERT(pdch_ulc_fn_is_free(pdch->ulc, tbf2_poll_fn1) == true); - rc = pdch_ulc_reserve_tbf_poll(pdch->ulc, tbf2_poll_fn1, tbf2); + rc = pdch_ulc_reserve_tbf_poll(pdch->ulc, tbf2_poll_fn1, tbf2, PDCH_ULC_POLL_UL_ASS); OSMO_ASSERT(rc == 0); OSMO_ASSERT(pdch_ulc_get_tbf_poll(pdch->ulc, tbf2_poll_fn1) == tbf2); OSMO_ASSERT(pdch_ulc_fn_is_free(pdch->ulc, tbf2_poll_fn1) == false); @@ -117,7 +117,7 @@ static void test_reserve_multiple() /* Now Reserve TBF1 for POLL again on a later FN, which is totally expected: */ OSMO_ASSERT(pdch_ulc_fn_is_free(pdch->ulc, tbf1_poll_fn2) == true); - rc = pdch_ulc_reserve_tbf_poll(pdch->ulc, tbf1_poll_fn2, tbf1); + rc = pdch_ulc_reserve_tbf_poll(pdch->ulc, tbf1_poll_fn2, tbf1, PDCH_ULC_POLL_UL_ASS); OSMO_ASSERT(rc == 0); OSMO_ASSERT(pdch_ulc_get_tbf_poll(pdch->ulc, tbf1_poll_fn2) == tbf1); OSMO_ASSERT(pdch_ulc_fn_is_free(pdch->ulc, tbf1_poll_fn2) == false); @@ -182,7 +182,7 @@ static void test_fn_wrap_around() fn = start_fn; while (fn < 40 || fn >= start_fn) { printf("*** RESERVE FN=%" PRIu32 ":\n", fn); - rc = pdch_ulc_reserve_tbf_poll(pdch->ulc, fn, tbf1); + rc = pdch_ulc_reserve_tbf_poll(pdch->ulc, fn, tbf1, PDCH_ULC_POLL_UL_ASS); OSMO_ASSERT(rc == 0); print_ulc_nodes(pdch->ulc); fn = fn_next_block(fn); |