diff options
author | Pau Espin Pedrol <pespin@sysmocom.de> | 2021-01-19 18:58:07 +0100 |
---|---|---|
committer | Pau Espin Pedrol <pespin@espeweb.net> | 2021-02-05 12:01:14 +0100 |
commit | b34bb061cdaf93281adae99e450ad33de235b65d (patch) | |
tree | 9d27f1eefd0d1d408bd5346c2a57f0389a9f0b29 /pcu/PCU_Tests.ttcn | |
parent | cf5c33e0cd9b26cd5f0d9493dff3e80720742d37 (diff) |
pcu: Rewrite GPRS_Components functions to use pre-decoded RLCMAC blocks coming from PCUIF
This is only a step towards a major set of changes.
This specific commit changes internal implementation of functions to stay
compatible with existing tests.
Later on, changes will be modified to use the new altsteps directly.
Related: OS#4927
Change-Id: Iecc33565fdc673e3499db12a0d4e0587290cfd45
Diffstat (limited to 'pcu/PCU_Tests.ttcn')
-rw-r--r-- | pcu/PCU_Tests.ttcn | 29 |
1 files changed, 10 insertions, 19 deletions
diff --git a/pcu/PCU_Tests.ttcn b/pcu/PCU_Tests.ttcn index 4204139d..3c3b5706 100644 --- a/pcu/PCU_Tests.ttcn +++ b/pcu/PCU_Tests.ttcn @@ -264,7 +264,7 @@ runs on RAW_PCU_Test_CT { connect(self:STATSD_PROC, vc_STATSD:STATSD_PROC); vc_PCUIF.start(f_PCUIF_CT_handler(mp_pcu_sock_path)); - vc_BTS.start(f_BTS_CT_handler(0, valueof(info_ind))); + vc_BTS.start(f_BTS_CT_handler(0, valueof(info_ind), true)); /* Wait until the BTS is ready (SI13 negotiated) */ BTS.receive(tr_RAW_PCU_EV(BTS_EV_SI13_NEGO)); @@ -509,8 +509,7 @@ testcase TC_ta_idle_dl_tbf_ass() runs on RAW_PCU_Test_CT { /* Verify that the PCU generates valid PTCCH/D messages * while neither Uplink nor Downlink TBF is established. */ testcase TC_ta_ptcch_idle() runs on RAW_PCU_Test_CT { - var PTCCHDownlinkMsg ptcch_msg; - var PCUIF_Message pcu_msg; + var BTS_PTCCH_Block pcu_msg; timer T; /* Initialize the PCU interface abstraction */ @@ -520,28 +519,20 @@ testcase TC_ta_ptcch_idle() runs on RAW_PCU_Test_CT { BTS.send(ts_PCUIF_RTS_REQ(bts_nr := 0, trx_nr := 0, ts_nr := 7, sapi := PCU_IF_SAPI_PTCCH, fn := 0, arfcn := 871, block_nr := 0)); + T.start(5.0); alt { - [] BTS.receive(tr_PCUIF_DATA_REQ(bts_nr := 0, trx_nr := 0, ts_nr := 7, - sapi := PCU_IF_SAPI_PTCCH)) -> value pcu_msg { - log("Rx DATA.req message: ", pcu_msg); - setverdict(pass); - } + /* Make sure the message is encoded correctly + * TODO: do we expect all TA values to be equal '1111111'B? */ + [] as_rx_ptcch(pcu_msg, tr_PTCCHDownlinkMsg); + [] BTS.receive(PCUIF_Message:?) { repeat; } [] T.timeout { setverdict(fail, "Timeout waiting for a PTCCH/D block"); f_shutdown(__BFILE__, __LINE__); } } - - ptcch_msg := dec_PTCCHDownlinkMsg(pcu_msg.u.data_req.data); - log("Decoded PTCCH/D message: ", ptcch_msg); - - /* Make sure the message is encoded correctly - * TODO: do we expect all TA values to be equal '1111111'B? */ - if (not match(ptcch_msg, tr_PTCCHDownlinkMsg)) { - setverdict(fail, "Malformed PTCCH/D message"); - } + log("Decoded PTCCH/D message: ", pcu_msg.dl_block); f_shutdown(__BFILE__, __LINE__, final := true); } @@ -3212,7 +3203,7 @@ testcase TC_pcuif_fh_pkt_ass_dl() runs on RAW_PCU_Test_CT { /* Check if the IUT handles subsequent INFO.ind messages */ testcase TC_pcuif_info_ind_subsequent() runs on RAW_PCU_Test_CT { var template PCUIF_info_ind info_ind := ts_PCUIF_INFO_default; - var PCUIF_Message pcu_msg; + var BTS_PDTCH_Block data_msg; /* Initialize the PCU interface abstraction */ f_init_raw(testcasename(), info_ind); @@ -3220,7 +3211,7 @@ testcase TC_pcuif_info_ind_subsequent() runs on RAW_PCU_Test_CT { /* Send 16 conseqtive INFO.ind messages and check that the IUT stays alive */ for (var integer i := 0; i < 16; i := i + 1) { BTS.send(ts_PCUIF_INFO_IND(0, info_ind)); - f_pcuif_rx_data_req(pcu_msg); + f_pcuif_rx_data_req_pdtch(data_msg); } f_shutdown(__BFILE__, __LINE__, final := true); |