pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/39488?usp=email )
Change subject: WIP: hnbgw: Submit proper L3 PDUs during CR ......................................................................
WIP: hnbgw: Submit proper L3 PDUs during CR
Related: OS#6717 Change-Id: I95be61170afe1d94eebf6668039ccf38eded5a29 --- M hnbgw/ConnHdlr.ttcn M hnbgw/testenv_generic.cfg M hnbgw/testenv_with-pfcp.cfg 3 files changed, 15 insertions(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/88/39488/1
diff --git a/hnbgw/ConnHdlr.ttcn b/hnbgw/ConnHdlr.ttcn index 47c25a7..10fd379 100644 --- a/hnbgw/ConnHdlr.ttcn +++ b/hnbgw/ConnHdlr.ttcn @@ -493,7 +493,17 @@ var octetstring nas;
if (pars.tx_sccp_cr_data_len == 0) { - nas := f_rnd_octstring(10); + var octetstring tmsi := f_gen_tmsi(suffix := 0); + var MobileIdentityLV mi_lv := valueof(ts_MI_IMSI_LV('001010000000002'H)); + if (pars.ps_domain) { + var PDU_L3_MS_SGSN l3_pdu; + l3_pdu := valueof(ts_GMM_ATTACH_REQ(mi_lv, f_RAI('001'H, '01'H, '2a2a'O, '17'O))); + nas := enc_PDU_L3_MS_SGSN(l3_pdu); + } else { + var PDU_ML3_MS_NW l3_pdu; + l3_pdu := valueof(ts_LU_REQ(LU_Type_IMSI_Attach, mi_lv, '00F110'O)); + nas := enc_PDU_ML3_MS_NW(l3_pdu); + } } else { /* The test asks for an exact number of Optional Data bytes. */
diff --git a/hnbgw/testenv_generic.cfg b/hnbgw/testenv_generic.cfg index d1daeab..9fde19d 100644 --- a/hnbgw/testenv_generic.cfg +++ b/hnbgw/testenv_generic.cfg @@ -1,4 +1,5 @@ [testsuite] +prepare=podman_set_lo_mtu.sh 1500 # OS#6602 program=HNBGW_Tests config=HNBGW_Tests.cfg
diff --git a/hnbgw/testenv_with-pfcp.cfg b/hnbgw/testenv_with-pfcp.cfg index 4f19a31..e769883 100644 --- a/hnbgw/testenv_with-pfcp.cfg +++ b/hnbgw/testenv_with-pfcp.cfg @@ -1,15 +1,18 @@ [testsuite] +prepare=podman_set_lo_mtu.sh 1500 # OS#6602 program=HNBGW_Tests config=HNBGW_Tests-with-pfcp.cfg clean=rename_junit_xml_classname.sh :with-pfcp
[stp] +prepare=podman_set_lo_mtu.sh 1500 # OS#6602 program=osmo-stp make=libosmo-sigtran package=osmo-stp copy=osmo-stp.cfg
[hnbgw] +prepare=podman_set_lo_mtu.sh 1500 # OS#6602 program=osmo-hnbgw -c osmo-hnbgw-with-pfcp.cfg make=osmo-hnbgw package=osmo-hnbgw