aboutsummaryrefslogtreecommitdiffstats
path: root/tests/ulc/PdchUlcTest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ulc/PdchUlcTest.cpp')
-rw-r--r--tests/ulc/PdchUlcTest.cpp27
1 files changed, 19 insertions, 8 deletions
diff --git a/tests/ulc/PdchUlcTest.cpp b/tests/ulc/PdchUlcTest.cpp
index 3547bf6f..7d649b03 100644
--- a/tests/ulc/PdchUlcTest.cpp
+++ b/tests/ulc/PdchUlcTest.cpp
@@ -35,6 +35,7 @@ extern "C" {
#include "bts.h"
#include "sba.h"
#include "pdch_ul_controller.h"
+#include "alloc_algo.h"
/* globals used by the code */
void *tall_pcu_ctx;
@@ -165,10 +166,14 @@ static void test_reserve_multiple()
printf("=== end: %s ===\n", __FUNCTION__);
}
-int _alloc_algorithm_dummy(struct gprs_rlcmac_bts *bts, struct gprs_rlcmac_tbf *tbf,
- bool single, int8_t use_tbf)
+int _alloc_algorithm_dummy(const struct alloc_resources_req *req,
+ struct alloc_resources_res *res)
{
- tbf->trx = &bts->trx[0];
+ res->trx = &req->bts->trx[0];
+ res->first_common_ts = &res->trx->pdch[0];
+ res->reserved_ul_slots = 1 << 0;
+ res->reserved_dl_slots = 1 << 0;
+ res->ass_slots_mask = 1 << 0;
return 0;
}
@@ -181,8 +186,11 @@ static void test_fn_wrap_around()
the_pcu->alloc_algorithm = _alloc_algorithm_dummy;
struct gprs_rlcmac_bts *bts = setup_new_bts();
- struct GprsMs *ms = ms_alloc(bts, 0x12345678);
- struct gprs_rlcmac_tbf *tbf1 = tbf_alloc_dl_tbf(bts, ms, 0, true);
+ struct GprsMs *ms = ms_alloc(bts, NULL);
+ ms_confirm_tlli(ms, 0x12345678);
+ OSMO_ASSERT(ms_new_dl_tbf_assigned_on_pch(ms) == 0);
+ struct gprs_rlcmac_tbf *tbf1 = ms_dl_tbf(ms);
+ OSMO_ASSERT(tbf1);
struct gprs_rlcmac_pdch *pdch = &tbf1->trx->pdch[0];
int rc;
uint32_t fn, last_fn;
@@ -315,9 +323,10 @@ int main(int argc, char **argv)
log_set_log_level(osmo_stderr_target, LOGL_DEBUG);
log_set_print_category_hex(osmo_stderr_target, 0);
log_set_print_category(osmo_stderr_target, 0);
- log_parse_category_mask(osmo_stderr_target, "DPCU,1:DRLCMAC,1:DRLCMACUL,1");
+ log_parse_category_mask(osmo_stderr_target, "DPCU,1:DRLCMAC,1:DRLCMACUL,1:DMS,1");
the_pcu = gprs_pcu_alloc(tall_pcu_ctx);
+ OSMO_ASSERT(osmo_tdef_set(the_pcu->T_defs, -2030, 0, OSMO_TDEF_S) == 0);
test_reserve_multiple();
test_fn_wrap_around();
@@ -337,11 +346,13 @@ extern "C" {
abort();
} void l1if_connect_pdch() {
abort();
+ } void l1if_disconnect_pdch() {
+ abort();
}
- void l1if_close_pdch() {
+ void l1if_close_trx() {
abort();
}
- void l1if_open_pdch() {
+ void l1if_open_trx() {
abort();
}
}