This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
laforge gerrit-no-reply at lists.osmocom.orglaforge has submitted this change and it was merged. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15674 ) Change subject: pcu: Allow tests to overwrite pcuif INFO_IND params ...................................................................... pcu: Allow tests to overwrite pcuif INFO_IND params Change-Id: I75c746b822184fdcc966d77a7c6a0a6918c236e6 --- M library/PCUIF_Types.ttcn M pcu/PCU_Tests_RAW.ttcn 2 files changed, 47 insertions(+), 99 deletions(-) Approvals: Jenkins Builder: Verified fixeria: Looks good to me, but someone else must approve laforge: Looks good to me, approved diff --git a/library/PCUIF_Types.ttcn b/library/PCUIF_Types.ttcn index a36e261..ae0762a 100644 --- a/library/PCUIF_Types.ttcn +++ b/library/PCUIF_Types.ttcn @@ -677,62 +677,13 @@ ts_PCUIF_InfoTrx, ts_PCUIF_InfoTrxNULL, ts_PCUIF_InfoTrxNULL, ts_PCUIF_InfoTrxNULL, ts_PCUIF_InfoTrxNULL, ts_PCUIF_InfoTrxNULL, ts_PCUIF_InfoTrxNULL, ts_PCUIF_InfoTrxNULL }; - template (value) PCUIF_Message ts_PCUIF_INFO_IND(template (value) uint8_t bts_nr, - template (value) uint16_t nsei, - template (value) uint16_t nsvci, - template (value) uint16_t bvci, - template (value) uint16_t local_port, - template (value) uint16_t remote_port, - template (value) OCT4 remote_ip, - template (value) PCUIF_Flags flags := c_PCUIF_Flags_default, - template (value) uint16_t mcc := 262, - template (value) uint16_t mnc := 42, - template (value) uint16_t lac := 13135, - template (value) uint8_t rac := 0, - template (value) uint16_t cell_id := 20960, - template (value) uint8_t bsic := 7, - template (value) PCUIF_InfoTrxs trx := ts_PCUIF_InfoTrxs_def, - template (value) uint32_t version := PCU_IF_VERSION) := { + template (value) PCUIF_info_ind info_ind) := { msg_type := PCU_IF_MSG_INFO_IND, bts_nr := bts_nr, spare := '0000'O, u := { - info_ind := { - version := version, - flags := flags, - trx := trx, - bsic := bsic, - mcc := mcc, - mnc := mnc, - mnc_3_digits := 0, - lac := lac, - rac := rac, - nsei := nsei, - nse_timer := { 3, 3, 3, 3, 30, 3, 10 }, - cell_timer := { 3, 3, 3, 3, 3, 10, 3, 10, 3, 10, 3 }, - cell_id := cell_id, - repeat_time := 5 * 50, - repeat_count := 3, - bvci := bvci, - t3142 := 20, - t3169 := 5, - t3191 := 5, - t3193_10ms := 160, - t3195 := 5, - t3101 := 10, - t3103 := 4, - t3105 := 8, - cv_countdown := 15, - dl_tbf_ext := 250 * 10, /* ms */ - ul_tbf_ext := 250 * 10, /* ms */ - initial_cs := 2, - initial_mcs := 6, - nsvci := { nsvci, 0 }, - local_pprt := { local_port, 0 }, - remote_port := { remote_port, 0 }, - remote_ip := { remote_ip , '00000000'O } - } + info_ind := info_ind } } template PCUIF_Message tr_PCUIF_INFO_IND(template uint8_t bts_nr := ?, diff --git a/pcu/PCU_Tests_RAW.ttcn b/pcu/PCU_Tests_RAW.ttcn index 4d20027..d5e53e2 100644 --- a/pcu/PCU_Tests_RAW.ttcn +++ b/pcu/PCU_Tests_RAW.ttcn @@ -69,9 +69,50 @@ } } +/* FIXME: make sure to use parameters from mp_gb_cfg.cell_id in the PCU INFO IND */ +template (value) PCUIF_info_ind ts_PCUIF_INFO_default := { + version := PCU_IF_VERSION, + flags := c_PCUIF_Flags_default, + trx := valueof(ts_PCUIF_InfoTrxs_def), + bsic := 7, + mcc := 262, + mnc := 42, + mnc_3_digits := 0, + lac := 13135, + rac := 0, + nsei := mp_nsconfig.nsei, + nse_timer := { 3, 3, 3, 3, 30, 3, 10 }, + cell_timer := { 3, 3, 3, 3, 3, 10, 3, 10, 3, 10, 3 }, + cell_id := 20960, + repeat_time := 5 * 50, + repeat_count := 3, + bvci := mp_gb_cfg.bvci, + t3142 := 20, + t3169 := 5, + t3191 := 5, + t3193_10ms := 160, + t3195 := 5, + t3101 := 10, + t3103 := 4, + t3105 := 8, + cv_countdown := 15, + dl_tbf_ext := 250 * 10, /* ms */ + ul_tbf_ext := 250 * 10, /* ms */ + initial_cs := 2, + initial_mcs := 6, + nsvci := { mp_nsconfig.nsvci, 0 }, + local_pprt := { mp_nsconfig.remote_udp_port, 0 }, + remote_port := { mp_nsconfig.local_udp_port, 0 }, + remote_ip := { f_inet_haddr(mp_nsconfig.local_ip) , '00000000'O } +} + function f_init_pcuif() runs on RAW_PCU_CT { + var PCUIF_info_ind info_ind; map(self:PCU, system:PCU); + + info_ind := valueof(ts_PCUIF_INFO_default); + /* Connect the Unix Domain Socket */ g_pcu_conn_id := f_pcuif_listen(PCU, mp_pcu_sock_path); PCU.receive(UD_connected:?); @@ -79,15 +120,8 @@ /* Wait for PCU_VERSION and return INFO_IND */ PCU.receive(t_SD_PCUIF(g_pcu_conn_id, tr_PCUIF_TXT_IND(0, PCU_VERSION, ?))); /* FIXME: make sure to use parameters from mp_gb_cfg.cell_id in the PCU INFO IND */ - var template PCUIF_Message info_ind := ts_PCUIF_INFO_IND(bts_nr := 0, - nsei := mp_nsconfig.nsei, - nsvci := mp_nsconfig.nsvci, - bvci := mp_gb_cfg.bvci, - local_port := mp_nsconfig.remote_udp_port, - remote_port := mp_nsconfig.local_udp_port, - remote_ip := f_inet_haddr(mp_nsconfig.local_ip) - ); - PCU.send(t_SD_PCUIF(g_pcu_conn_id, info_ind)); + var template PCUIF_Message info_ind_msg := ts_PCUIF_INFO_IND(0, info_ind); + PCU.send(t_SD_PCUIF(g_pcu_conn_id, info_ind_msg)); } function f_pcuif_tx(template (value) PCUIF_Message msg) runs on RAW_PCU_CT { @@ -439,9 +473,8 @@ } } -private function f_init_raw(charstring id) +private function f_init_raw(charstring id, template (value) PCUIF_info_ind info_ind := ts_PCUIF_INFO_default) runs on RAW_PCU_Test_CT { - var PCUIF_info_ind info_ind; var RAW_PCUIF_CT vc_PCUIF; var RAW_PCU_BTS_CT vc_BTS; @@ -459,44 +492,8 @@ connect(vc_BTS:PCUIF, vc_PCUIF:BTS); connect(vc_BTS:TC, self:BTS); - /* FIXME: make sure to use parameters from mp_gb_cfg.cell_id in the PCU INFO IND */ - info_ind := { - version := PCU_IF_VERSION, - flags := c_PCUIF_Flags_default, - trx := valueof(ts_PCUIF_InfoTrxs_def), - /* TODO: make this configurable */ - bsic := 7, mcc := 262, mnc := 42, - mnc_3_digits := 0, - /* TODO: make this configurable */ - lac := 13135, rac := 0, - nsei := mp_nsconfig.nsei, - nse_timer := { 3, 3, 3, 3, 30, 3, 10 }, - cell_timer := { 3, 3, 3, 3, 3, 10, 3, 10, 3, 10, 3 }, - cell_id := 20960, - repeat_time := 5 * 50, - repeat_count := 3, - bvci := mp_gb_cfg.bvci, - t3142 := 20, - t3169 := 5, - t3191 := 5, - t3193_10ms := 160, - t3195 := 5, - t3101 := 10, - t3103 := 4, - t3105 := 8, - cv_countdown := 15, - dl_tbf_ext := 250 * 10, /* ms */ - ul_tbf_ext := 250 * 10, /* ms */ - initial_cs := 2, - initial_mcs := 6, - nsvci := { mp_nsconfig.nsvci, 0 }, - local_pprt := { mp_nsconfig.remote_udp_port, 0 }, - remote_port := { mp_nsconfig.local_udp_port, 0 }, - remote_ip := { f_inet_haddr(mp_nsconfig.local_ip), '00000000'O } - }; - vc_PCUIF.start(f_PCUIF_CT_handler(mp_pcu_sock_path)); - vc_BTS.start(f_BTS_CT_handler(0, info_ind)); + vc_BTS.start(f_BTS_CT_handler(0, valueof(info_ind))); /* Wait until the BTS is ready (SI13 negotiated) */ BTS.receive(tr_RAW_PCU_EV(BTS_EV_SI13_NEGO)); -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15674 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I75c746b822184fdcc966d77a7c6a0a6918c236e6 Gerrit-Change-Number: 15674 Gerrit-PatchSet: 3 Gerrit-Owner: pespin <pespin at sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <axilirator at gmail.com> Gerrit-Reviewer: laforge <laforge at osmocom.org> Gerrit-Reviewer: osmith <osmith at sysmocom.de> Gerrit-Reviewer: pespin <pespin at sysmocom.de> Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20191007/b2d61917/attachment.htm>