pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/40113?usp=email )
Change subject: Fix MNC decoding in f_dec_mcc_mnc()
......................................................................
Fix MNC decoding in f_dec_mcc_mnc()
This API is so far only used in MSC_Tests.ttcn f_sgs_perform_lu(), but
will be used in more testsuites in follow-up commits.
Change-Id: I9db37d0dc9abbbefd57af4f0e2b91bf8a918d4e9
---
M library/GSM_Types.ttcn
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/13/40113/1
diff --git a/library/GSM_Types.ttcn b/library/GSM_Types.ttcn
index 64581e5..6d3e170 100644
--- a/library/GSM_Types.ttcn
+++ b/library/GSM_Types.ttcn
@@ -504,7 +504,7 @@
var hexstring hs := oct2hex(mcc_mnc);
mcc := hs[1] & hs[0] & hs[3];
mnc := hs[5] & hs[4];
- if (hs[2] == 'F'H) {
+ if (hs[2] != 'F'H) {
mnc := mnc & hs[2];
}
}
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/40113?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: I9db37d0dc9abbbefd57af4f0e2b91bf8a918d4e9
Gerrit-Change-Number: 40113
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Attention is currently required from: pespin.
Hello Jenkins Builder,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/40112?usp=email
to look at the new patch set (#3).
The following approvals got outdated and were removed:
Verified+1 by Jenkins Builder
Change subject: Move f_{dec,enc}_mcc_mnc() API BSSMAP_Templates.ttcn -> GSM_Types.ttcn
......................................................................
Move f_{dec,enc}_mcc_mnc() API BSSMAP_Templates.ttcn -> GSM_Types.ttcn
The GsmMcc and GsmMnc types used in the function are defined in
GSM_Types.ttcn, which is also incldued by BSSMAP_Templates.
Hence, move the function there so that it can be used in other
testsuites including more generic GSM_Types.ttcn but not
BSSMAP_Templates.ttcn.
Change-Id: Iafafd2957a11d34a9402d252a169fec40593f483
---
M library/BSSMAP_Templates.ttcn
M library/GSM_Types.ttcn
2 files changed, 17 insertions(+), 18 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/12/40112/3
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/40112?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: Iafafd2957a11d34a9402d252a169fec40593f483
Gerrit-Change-Number: 40112
Gerrit-PatchSet: 3
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/40115?usp=email )
Change subject: hnbgw: Test paging with Page Area ID IE
......................................................................
hnbgw: Test paging with Page Area ID IE
Change-Id: I5a053bcf1f8470038e95d03889da077f8f967bfa
---
M hnbgw/HNBGW_Tests.ttcn
M hnbgw/expected-results.xml
M library/ranap/RANAP_Templates.ttcn
3 files changed, 170 insertions(+), 2 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/15/40115/1
diff --git a/hnbgw/HNBGW_Tests.ttcn b/hnbgw/HNBGW_Tests.ttcn
index c223ef7..28b41d2 100644
--- a/hnbgw/HNBGW_Tests.ttcn
+++ b/hnbgw/HNBGW_Tests.ttcn
@@ -2200,6 +2200,108 @@
f_shutdown_helper();
}
+/* Make sure that whichever MSC paged a subscriber will also get the Paging Response. Page by IMSI, which would be
+ * round-robined to another MSC, to make sure the Paging->Response relation is stronger than the NRI->MSC mapping. */
+friend function f_tc_mscpool_paging_imsi_lai_registered(charstring id) runs on ConnHdlr {
+ var hexstring imsi := '001010000000123'H;
+ var RANAP_IEs.CN_DomainIndicator domain_ind;
+ var template (value) RANAP_IEs.LAI lai := ts_RANAP_LAI(hex2oct(g_pars.hnb.lai.mcc_mnc),
+ int2oct(g_pars.hnb.lai.lac, 2));
+ var template (value) RANAP_IEs.PagingAreaID pag_area_id := ts_RANAP_PagingAreaID_LAI(lai);
+ if (g_pars.ps_domain) {
+ domain_ind := ps_domain;
+ } else {
+ domain_ind := cs_domain;
+ }
+ var template (value) RANAP_PDU paging := ts_RANAP_Paging_pag_area_id(domain_ind, imsi_hex2oct(imsi), pag_area_id);
+ BSSAP.send(ts_RANAP_UNITDATA_req(g_pars.sccp_addr_hnbgw, g_pars.sccp_addr_msc, paging));
+ /* TODO: Expect RUA ConnectionlessTransfer Paging (on subset of HNB).
+ * We could verify the Paging sent from osmo-hnbgw to RUA with some effort,
+ * but, this test does not care whether the Paging was forwarded to RUA or not, only that osmo-hnbgw *received*
+ * the Paging. In the CN pool decisions, osmo-hnbgw should match up Paging Response to an earlier Paging.
+ */
+
+ f_sleep(1.0);
+
+ /* Despite the round robin pointing at the second MSC ('roundrobin next msc 1'), the earlier Paging for the same IMSI
+ * causes this Paging Response to go to the first MSC ('msc 0'). */
+ f_perform_compl_l3(f_gen_one_compl_l3(PAGRESP, ts_MI_IMSI_LV(imsi)));
+ f_sleep(1.0);
+}
+
+/* Test CN sending a RANAP Paging Command with Paging Area ID IE (LAI) present requesting a registered HNB: */
+testcase TC_mscpool_paging_imsi_lai_registered() runs on test_CT {
+ f_init(nr_msc := 3);
+ f_sleep(1.0);
+
+ var boolean ps_domain := false;
+
+ /* Testing a Paging on the first MSC to get a Paging Response back to the first MSC. Set round robin to the
+ * second MSC to make sure we're getting the Paging logic, not a coincidental round robin match. */
+ f_vty_set_roundrobin_next(HNBGWVTY, ps_domain, 0);
+
+ f_ctrs_cn_init(ps_domain := ps_domain);
+
+ var ConnHdlr vc_conn1;
+ var template (value) TestHdlrParams pars1 := f_TestHdlrParams(0, ps_domain := ps_domain, cn_nr := 0);
+ vc_conn1 := f_start_handler_with_pars(refers(f_tc_mscpool_paging_imsi_lai_registered), pars1);
+ vc_conn1.done;
+ f_ctrs_cn_expect(0, "cnpool:subscr:paged");
+ f_shutdown_helper();
+}
+
+/* Make sure that whichever MSC paged a subscriber will also get the Paging Response. Page by IMSI, which would be
+ * round-robined to another MSC, to make sure the Paging->Response relation is stronger than the NRI->MSC mapping. */
+friend function f_tc_mscpool_paging_imsi_rai_registered(charstring id) runs on ConnHdlr {
+ var hexstring imsi := '001010000000123'H;
+ var RANAP_IEs.CN_DomainIndicator domain_ind;
+ var template (value) RANAP_IEs.LAI lai := ts_RANAP_LAI(hex2oct(g_pars.hnb.lai.mcc_mnc),
+ int2oct(g_pars.hnb.lai.lac, 2));
+ var template (value) RANAP_IEs.RAI rai := ts_RANAP_RAI(lai,
+ int2oct(g_pars.hnb.rac, 1));
+ var template (value) RANAP_IEs.PagingAreaID pag_area_id := ts_RANAP_PagingAreaID_RAI(rai);
+ if (g_pars.ps_domain) {
+ domain_ind := ps_domain;
+ } else {
+ domain_ind := cs_domain;
+ }
+ var template (value) RANAP_PDU paging := ts_RANAP_Paging_pag_area_id(domain_ind, imsi_hex2oct(imsi), pag_area_id);
+ BSSAP.send(ts_RANAP_UNITDATA_req(g_pars.sccp_addr_hnbgw, g_pars.sccp_addr_msc, paging));
+ /* TODO: Expect RUA ConnectionlessTransfer Paging (on subset of HNB).
+ * We could verify the Paging sent from osmo-hnbgw to RUA with some effort,
+ * but, this test does not care whether the Paging was forwarded to RUA or not, only that osmo-hnbgw *received*
+ * the Paging. In the CN pool decisions, osmo-hnbgw should match up Paging Response to an earlier Paging.
+ */
+
+ f_sleep(1.0);
+
+ /* Despite the round robin pointing at the second MSC ('roundrobin next msc 1'), the earlier Paging for the same IMSI
+ * causes this Paging Response to go to the first MSC ('msc 0'). */
+ f_perform_compl_l3(f_gen_one_compl_l3(PAGRESP, ts_MI_IMSI_LV(imsi)));
+ f_sleep(1.0);
+}
+
+/* Test CN sending a RANAP Paging Command with Paging Area ID IE (LAI) present requesting a registered HNB: */
+testcase TC_mscpool_paging_imsi_rai_registered() runs on test_CT {
+ f_init(nr_msc := 3);
+ f_sleep(1.0);
+
+ var boolean ps_domain := true;
+
+ /* Testing a Paging on the first MSC to get a Paging Response back to the first MSC. Set round robin to the
+ * second MSC to make sure we're getting the Paging logic, not a coincidental round robin match. */
+ f_vty_set_roundrobin_next(HNBGWVTY, ps_domain, 0);
+
+ f_ctrs_cn_init(ps_domain := ps_domain);
+
+ var ConnHdlr vc_conn1;
+ var template (value) TestHdlrParams pars1 := f_TestHdlrParams(0, ps_domain := ps_domain, cn_nr := 0);
+ vc_conn1 := f_start_handler_with_pars(refers(f_tc_mscpool_paging_imsi_rai_registered), pars1);
+ vc_conn1.done;
+ f_ctrs_cn_expect(0, "cnpool:subscr:paged");
+ f_shutdown_helper();
+}
+
/* For round-robin, skip a CN link that has 'no allow-attach' set. */
testcase TC_mscpool_no_allow_attach_round_robin() runs on test_CT {
@@ -2516,6 +2618,8 @@
execute( TC_mscpool_LU_by_tmsi_from_other_PLMN() );
execute( TC_mscpool_paging_imsi() );
execute( TC_mscpool_paging_tmsi() );
+ execute( TC_mscpool_paging_imsi_lai_registered() );
+ execute( TC_mscpool_paging_imsi_rai_registered() );
execute( TC_mscpool_no_allow_attach_round_robin() );
execute( TC_mscpool_no_allow_attach_valid_nri() );
execute( TC_mscpool_sccp_n_pcstate_detaches_cnlink() );
diff --git a/hnbgw/expected-results.xml b/hnbgw/expected-results.xml
index 655db84..3fca542 100644
--- a/hnbgw/expected-results.xml
+++ b/hnbgw/expected-results.xml
@@ -43,6 +43,8 @@
<testcase classname='HNBGW_Tests' name='TC_mscpool_LU_by_tmsi_from_other_PLMN' time='MASKED'/>
<testcase classname='HNBGW_Tests' name='TC_mscpool_paging_imsi' time='MASKED'/>
<testcase classname='HNBGW_Tests' name='TC_mscpool_paging_tmsi' time='MASKED'/>
+ <testcase classname='HNBGW_Tests' name='TC_mscpool_paging_imsi_lai_registered' time='MASKED'/>
+ <testcase classname='HNBGW_Tests' name='TC_mscpool_paging_imsi_rai_registered' time='MASKED'/>
<testcase classname='HNBGW_Tests' name='TC_mscpool_no_allow_attach_round_robin' time='MASKED'/>
<testcase classname='HNBGW_Tests' name='TC_mscpool_no_allow_attach_valid_nri' time='MASKED'/>
<testcase classname='HNBGW_Tests' name='TC_mscpool_sccp_n_pcstate_detaches_cnlink' time='MASKED'/>
diff --git a/library/ranap/RANAP_Templates.ttcn b/library/ranap/RANAP_Templates.ttcn
index b09d23e..c328171 100644
--- a/library/ranap/RANAP_Templates.ttcn
+++ b/library/ranap/RANAP_Templates.ttcn
@@ -760,7 +760,8 @@
*****************************************************************************************************/
template (value) RANAP_PDU
-ts_RANAP_Paging(template (value) CN_DomainIndicator dom, template (value) IMSI imsi,
+ts_RANAP_Paging(template (value) CN_DomainIndicator dom,
+ template (value) IMSI imsi,
template (omit) Paging.protocolExtensions exts := omit) := {
initiatingMessage := {
procedureCode := id_Paging,
@@ -790,7 +791,8 @@
}
}
template RANAP_PDU
-tr_RANAP_Paging(template CN_DomainIndicator dom, template IMSI imsi,
+tr_RANAP_Paging(template (present) CN_DomainIndicator dom,
+ template (present) IMSI imsi,
template Paging.protocolExtensions exts := *) := {
initiatingMessage := {
procedureCode := id_Paging,
@@ -820,6 +822,7 @@
}
}
+
template (value) TemporaryUE_ID ts_RANAP_TemporaryUE_ID_TMSI(octetstring tmsi) := {
tMSI := tmsi
}
@@ -862,6 +865,65 @@
}
}
+template (value) LAI ts_RANAP_LAI(template (value) OCT3 pLMNidentity,
+ template (value) OCT2 lac) := {
+ pLMNidentity := pLMNidentity,
+ lAC := lac,
+ iE_Extensions := omit
+};
+
+template (value) RAI ts_RANAP_RAI(template (value) LAI lai,
+ template (value) OCT1 rac) := {
+ lAI := lai,
+ rAC := rac,
+ iE_Extensions := omit
+};
+
+template (value) PagingAreaID ts_RANAP_PagingAreaID_LAI(template (value) LAI lai) := {
+ lAI := lai
+};
+
+template (value) PagingAreaID ts_RANAP_PagingAreaID_RAI(template (value) RAI rai) := {
+ rAI := rai
+};
+
+template (value) RANAP_PDU
+ts_RANAP_Paging_pag_area_id(template (value) CN_DomainIndicator dom, template (value) IMSI imsi,
+ template (value) PagingAreaID pag_area_id,
+ template (omit) Paging.protocolExtensions exts := omit) := {
+ initiatingMessage := {
+ procedureCode := id_Paging,
+ criticality := ignore,
+ value_ := {
+ paging := {
+ protocolIEs := {
+ {
+ id := id_CN_DomainIndicator,
+ criticality := ignore,
+ value_ := {
+ cN_DomainIndicator := dom
+ }
+ }, {
+ id := id_PermanentNAS_UE_ID,
+ criticality := ignore,
+ value_ := {
+ permanentNAS_UE_ID := {
+ iMSI := imsi
+ }
+ }
+ }, {
+ id := id_PagingAreaID,
+ criticality := ignore,
+ value_ := {
+ pagingAreaID := pag_area_id
+ }
+ }
+ },
+ protocolExtensions := exts
+ }
+ }
+ }
+}
/*****************************************************************************************************
* Common ID
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/40115?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: I5a053bcf1f8470038e95d03889da077f8f967bfa
Gerrit-Change-Number: 40115
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Attention is currently required from: pespin.
Hello Jenkins Builder,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/40112?usp=email
to look at the new patch set (#2).
The following approvals got outdated and were removed:
Verified-1 by Jenkins Builder
Change subject: Move f_{dec,enc}_mcc_mnc() API BSSMAP_Templates.ttcn -> GSM_Types.ttcn
......................................................................
Move f_{dec,enc}_mcc_mnc() API BSSMAP_Templates.ttcn -> GSM_Types.ttcn
The GsmMcc and GsmMnc types used in the function are defined in
GSM_Types.ttcn, which is also incldued by BSSMAP_Templates.
Hence, move the function there so that it can be used in other
testsuites including more generic GSM_Types.ttcn but not
BSSMAP_Templates.ttcn.
Change-Id: Iafafd2957a11d34a9402d252a169fec40593f483
---
M cbc/CBC_Tests.ttcn
M library/BSSMAP_Templates.ttcn
M library/GSM_Types.ttcn
3 files changed, 18 insertions(+), 18 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/12/40112/2
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/40112?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: Iafafd2957a11d34a9402d252a169fec40593f483
Gerrit-Change-Number: 40112
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Attention is currently required from: osmith.
fixeria has posted comments on this change by osmith. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/40028?usp=email )
Change subject: buildsystem: remove ttcn3_compiler workaround
......................................................................
Patch Set 2:
(1 comment)
File _buildsystem/regen_makefile.inc.sh:
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/40028/comment/8310a64a_3c82… :
PS1, Line 62: sed -i -e 's/TTCN3_DIR = $/TTCN3_DIR = \/usr\/ttcn3/' Makefile
> Merged as-is, I'll probably make a follow-up patch for that later.
@pespin@sysmocom.de what you're saying is valid for https://aur.archlinux.org/packages/eclipse-titan, but not for https://aur.archlinux.org/packages/titan-git that is still using `/usr/ttcn3`. Since we're co-maintainers, we should ideally unify the install path for both packages. Not sure which one is more suitable.
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/40028?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: Ia50aa3caffeaa85eefba10695096aa23dcb69c93
Gerrit-Change-Number: 40028
Gerrit-PatchSet: 2
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: osmith <osmith(a)sysmocom.de>
Gerrit-Comment-Date: Tue, 22 Apr 2025 10:04:59 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: osmith <osmith(a)sysmocom.de>
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>