pespin has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38568?usp=email )


Change subject: WIP: hnbgw: update test
......................................................................

WIP: hnbgw: update test

Change-Id: I10065e506ac234a5e3b4203c493d76d9d9df6ffd
---
M hnbgw/ConnHdlr.ttcn
M hnbgw/HNBGW_Tests.ttcn
2 files changed, 18 insertions(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks 
refs/changes/68/38568/1

diff --git a/hnbgw/ConnHdlr.ttcn b/hnbgw/ConnHdlr.ttcn
index 2a46bba..81fd615 100644
--- a/hnbgw/ConnHdlr.ttcn
+++ b/hnbgw/ConnHdlr.ttcn
@@ -235,6 +235,16 @@
        }
 }

+function f_ranap_domain_indicator() runs on ConnHdlr return 
RANAP_IEs.CN_DomainIndicator {
+       var RANAP_IEs.CN_DomainIndicator dom;
+       if (g_pars.ps_domain) {
+               dom := ps_domain;
+       } else {
+               dom := cs_domain;
+       }
+       return dom;
+}
+
 function f_bssap_expect(template (present) RANAP_PDU exp_rx) runs on ConnHdlr 
return RANAP_PDU
 {
        var RANAP_PDU rx;
diff --git a/hnbgw/HNBGW_Tests.ttcn b/hnbgw/HNBGW_Tests.ttcn
index f7346a9..7f5e967 100644
--- a/hnbgw/HNBGW_Tests.ttcn
+++ b/hnbgw/HNBGW_Tests.ttcn
@@ -226,7 +226,6 @@
 }

 function MSC_UnitdataCallback(RANAP_PDU ranap) runs on RAN_Emulation_CT return 
template RANAP_PDU {
-       // TODO: Actually implement unitdata handling
        return omit;
 }

@@ -1305,15 +1304,23 @@

 /* SCCP Connect Req is answererd with Connect Refused: */
 private function f_tc_ranap_creq_cref_ConnHdlr(charstring id, TestHdlrParams 
pars) runs on ConnHdlr {
+       var template (value) RANAP_PDU tx_ranap;
        f_init_handler(pars);

+       f_ran_register_IuSigConId(pars.sigc_id);
+
        /* HNB -> MSC: InitialUE */
        f_iuh2iu_connect(f_build_initial_ue(g_pars));

        /* This triggers a tx of SCCP CREF CN -> HNBGW: */
        BSSAP.send(ts_MSC_CONN_PRIM_DISC_REQ(sccp_par_reason_end_user_failure));
+
+       BSSAP.receive(tr_RANAP_ResetResource(f_ranap_domain_indicator(), { 
transmissionNetwork := 66 }, g_pars.sigc_id));
+       tx_ranap := ts_RANAP_ResetResourceAck(f_ranap_domain_indicator(), 
g_pars.sigc_id);
+       BSSAP.send(ts_RANAP_UNITDATA_req(pars.sccp_addr_hnbgw, 
pars.sccp_addr_msc, tx_ranap));
        /* HNBGW disconnects the session on the RUA side as a result: */
        RUA.receive(RUA_Disc_Ind:?);
+       f_sleep(10.0);
 }
 private function f_tc_ranap_creq_cref(integer imsi_suffix, boolean ps_domain) 
runs on test_CT {
        var ConnHdlr vc_conn;

--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38568?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings?usp=email

Gerrit-MessageType: newchange
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I10065e506ac234a5e3b4203c493d76d9d9df6ffd
Gerrit-Change-Number: 38568
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <[email protected]>

Reply via email to