|
|
|
@ -324,18 +324,17 @@ int test_s1ap_tenb_mobility(test_event test_params)
|
|
|
|
|
TESTASSERT(mac_ue.supported_cc_list[0].enb_cc_idx == 0);
|
|
|
|
|
TESTASSERT(mac_ue.ue_bearers[srb_to_lcid(lte_srb::srb0)].direction == mac_lc_ch_cfg_t::BOTH);
|
|
|
|
|
TESTASSERT(mac_ue.ue_bearers[srb_to_lcid(lte_srb::srb1)].direction == mac_lc_ch_cfg_t::BOTH);
|
|
|
|
|
TESTASSERT(mac_ue.ue_bearers[srb_to_lcid(lte_srb::srb2)].direction == mac_lc_ch_cfg_t::BOTH);
|
|
|
|
|
TESTASSERT(mac_ue.ue_bearers[srb_to_lcid(lte_srb::srb2)].direction == mac_lc_ch_cfg_t::IDLE);
|
|
|
|
|
TESTASSERT(mac_ue.ue_bearers[drb_to_lcid(lte_drb::drb1)].direction == mac_lc_ch_cfg_t::IDLE);
|
|
|
|
|
|
|
|
|
|
tester.tic();
|
|
|
|
|
TESTASSERT(tester.rrc.get_nof_users() == 1);
|
|
|
|
|
TESTASSERT(tester.mac.ue_db.count(0x46));
|
|
|
|
|
// auto& mac_ue = tester.mac.ue_db[0x46];
|
|
|
|
|
TESTASSERT(mac_ue.supported_cc_list[0].active);
|
|
|
|
|
TESTASSERT(mac_ue.supported_cc_list[0].enb_cc_idx == 0);
|
|
|
|
|
TESTASSERT(mac_ue.ue_bearers[srb_to_lcid(lte_srb::srb0)].direction == mac_lc_ch_cfg_t::BOTH);
|
|
|
|
|
TESTASSERT(mac_ue.ue_bearers[srb_to_lcid(lte_srb::srb1)].direction == mac_lc_ch_cfg_t::BOTH);
|
|
|
|
|
TESTASSERT(mac_ue.ue_bearers[srb_to_lcid(lte_srb::srb2)].direction == mac_lc_ch_cfg_t::BOTH);
|
|
|
|
|
TESTASSERT(mac_ue.ue_bearers[srb_to_lcid(lte_srb::srb2)].direction == mac_lc_ch_cfg_t::IDLE);
|
|
|
|
|
TESTASSERT(mac_ue.ue_bearers[drb_to_lcid(lte_drb::drb1)].direction == mac_lc_ch_cfg_t::IDLE);
|
|
|
|
|
// Check Security Configuration
|
|
|
|
|
TESTASSERT(tester.pdcp.bearers.count(0x46));
|
|
|
|
@ -354,7 +353,7 @@ int test_s1ap_tenb_mobility(test_event test_params)
|
|
|
|
|
TESTASSERT(tester.pdcp.bearers[0x46][srb_to_lcid(lte_srb::srb1)].sec_cfg.integ_algo == as_sec_cfg.integ_algo);
|
|
|
|
|
|
|
|
|
|
TESTASSERT(mac_ue.ue_bearers[srb_to_lcid(lte_srb::srb1)].direction == mac_lc_ch_cfg_t::BOTH);
|
|
|
|
|
TESTASSERT(mac_ue.ue_bearers[srb_to_lcid(lte_srb::srb2)].direction == mac_lc_ch_cfg_t::BOTH);
|
|
|
|
|
TESTASSERT(mac_ue.ue_bearers[srb_to_lcid(lte_srb::srb2)].direction == mac_lc_ch_cfg_t::IDLE);
|
|
|
|
|
TESTASSERT(mac_ue.ue_bearers[drb_to_lcid(lte_drb::drb1)].direction == mac_lc_ch_cfg_t::IDLE);
|
|
|
|
|
|
|
|
|
|
// Check if S1AP Handover Request ACK send is called
|
|
|
|
@ -373,7 +372,7 @@ int test_s1ap_tenb_mobility(test_event test_params)
|
|
|
|
|
auto& recfg_r8 = dl_dcch_msg.msg.c1().rrc_conn_recfg().crit_exts.c1().rrc_conn_recfg_r8();
|
|
|
|
|
|
|
|
|
|
TESTASSERT(mac_ue.ue_bearers[srb_to_lcid(lte_srb::srb1)].direction == mac_lc_ch_cfg_t::BOTH);
|
|
|
|
|
TESTASSERT(mac_ue.ue_bearers[srb_to_lcid(lte_srb::srb2)].direction == mac_lc_ch_cfg_t::BOTH);
|
|
|
|
|
TESTASSERT(mac_ue.ue_bearers[srb_to_lcid(lte_srb::srb2)].direction == mac_lc_ch_cfg_t::IDLE);
|
|
|
|
|
TESTASSERT(mac_ue.ue_bearers[drb_to_lcid(lte_drb::drb1)].direction == mac_lc_ch_cfg_t::IDLE);
|
|
|
|
|
|
|
|
|
|
// Receives MMEStatusTransfer
|
|
|
|
@ -393,7 +392,7 @@ int test_s1ap_tenb_mobility(test_event test_params)
|
|
|
|
|
TESTASSERT(tester.pdcp.bearers[0x46][3].state.rx_hfn == 4);
|
|
|
|
|
|
|
|
|
|
TESTASSERT(mac_ue.ue_bearers[srb_to_lcid(lte_srb::srb1)].direction == mac_lc_ch_cfg_t::BOTH);
|
|
|
|
|
TESTASSERT(mac_ue.ue_bearers[srb_to_lcid(lte_srb::srb2)].direction == mac_lc_ch_cfg_t::BOTH);
|
|
|
|
|
TESTASSERT(mac_ue.ue_bearers[srb_to_lcid(lte_srb::srb2)].direction == mac_lc_ch_cfg_t::IDLE);
|
|
|
|
|
TESTASSERT(mac_ue.ue_bearers[drb_to_lcid(lte_drb::drb1)].direction == mac_lc_ch_cfg_t::IDLE);
|
|
|
|
|
|
|
|
|
|
// user PRACHs and sends C-RNTI CE
|
|
|
|
@ -511,7 +510,8 @@ int test_intraenb_mobility(srsran::log_sink_spy& spy, test_event test_params)
|
|
|
|
|
TESTASSERT(tester.phy.last_cfg[0].enb_cc_idx == ue_cfg->supported_cc_list[0].enb_cc_idx);
|
|
|
|
|
TESTASSERT(ue_cfg->ue_bearers[srb_to_lcid(lte_srb::srb0)].direction == srsenb::mac_lc_ch_cfg_t::BOTH);
|
|
|
|
|
TESTASSERT(ue_cfg->ue_bearers[srb_to_lcid(lte_srb::srb1)].direction == srsenb::mac_lc_ch_cfg_t::BOTH);
|
|
|
|
|
TESTASSERT(ue_cfg->ue_bearers[srb_to_lcid(lte_srb::srb2)].direction == srsenb::mac_lc_ch_cfg_t::BOTH);
|
|
|
|
|
TESTASSERT(ue_cfg->ue_bearers[srb_to_lcid(lte_srb::srb2)].direction == srsenb::mac_lc_ch_cfg_t::IDLE);
|
|
|
|
|
TESTASSERT(ue_cfg->ue_bearers[drb_to_lcid(lte_drb::drb1)].direction == srsenb::mac_lc_ch_cfg_t::IDLE);
|
|
|
|
|
|
|
|
|
|
/* Test Case: The UE receives a duplicate C-RNTI CE. Nothing should happen */
|
|
|
|
|
if (test_params == test_event::duplicate_crnti_ce) {
|
|
|
|
@ -525,7 +525,8 @@ int test_intraenb_mobility(srsran::log_sink_spy& spy, test_event test_params)
|
|
|
|
|
/* Test Case: Terminate first Handover. No extra messages should be sent DL. SR/CQI resources match recfg message */
|
|
|
|
|
uint8_t recfg_complete[] = {0x10, 0x00};
|
|
|
|
|
copy_msg_to_buffer(pdu, recfg_complete);
|
|
|
|
|
tester.rrc.write_pdu(tester.rnti, srb_to_lcid(lte_srb::srb2), std::move(pdu));
|
|
|
|
|
tester.rrc.write_pdu(tester.rnti, srb_to_lcid(lte_srb::srb1), std::move(pdu));
|
|
|
|
|
tester.tic();
|
|
|
|
|
TESTASSERT(tester.pdcp.last_sdu.sdu == nullptr);
|
|
|
|
|
ue_cfg = &tester.mac.ue_db[tester.rnti];
|
|
|
|
|
TESTASSERT(ue_cfg->pucch_cfg.sr_configured);
|
|
|
|
@ -534,6 +535,10 @@ int test_intraenb_mobility(srsran::log_sink_spy& spy, test_event test_params)
|
|
|
|
|
TESTASSERT(ue_cfg->supported_cc_list[0].dl_cfg.cqi_report.pmi_idx ==
|
|
|
|
|
phy_cfg_ded.cqi_report_cfg.cqi_report_periodic.setup().cqi_pmi_cfg_idx);
|
|
|
|
|
TESTASSERT(ue_cfg->pucch_cfg.n_pucch == phy_cfg_ded.cqi_report_cfg.cqi_report_periodic.setup().cqi_pucch_res_idx);
|
|
|
|
|
TESTASSERT(ue_cfg->ue_bearers[srb_to_lcid(lte_srb::srb0)].direction == srsenb::mac_lc_ch_cfg_t::BOTH);
|
|
|
|
|
TESTASSERT(ue_cfg->ue_bearers[srb_to_lcid(lte_srb::srb1)].direction == srsenb::mac_lc_ch_cfg_t::BOTH);
|
|
|
|
|
TESTASSERT(ue_cfg->ue_bearers[srb_to_lcid(lte_srb::srb2)].direction == srsenb::mac_lc_ch_cfg_t::BOTH);
|
|
|
|
|
TESTASSERT(ue_cfg->ue_bearers[drb_to_lcid(lte_drb::drb1)].direction == srsenb::mac_lc_ch_cfg_t::BOTH);
|
|
|
|
|
|
|
|
|
|
/* Test Case: The RRC should be able to start a new handover */
|
|
|
|
|
uint8_t meas_report[] = {0x08, 0x10, 0x38, 0x74, 0x00, 0x05, 0xBC, 0x80}; // PCI == 1
|
|
|
|
|