Change in osmo-ttcn3-hacks[master]: hlr: add TC_MSLookup_mDNS_service_GSUP_HLR_home

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/.

osmith gerrit-no-reply at lists.osmocom.org
Thu Jan 30 15:52:05 UTC 2020


osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17073 )


Change subject: hlr: add TC_MSLookup_mDNS_service_GSUP_HLR_home
......................................................................

hlr: add TC_MSLookup_mDNS_service_GSUP_HLR_home

Request "gsup.hlr" service right after creating subscriber from the home
HLR. "TC_MSLookup_mDNS_service_other_home" is similar, but does not query
the "gsup.hlr" service. The "gsup.hlr" service has a different code path
in OsmoHLR:
- it exists without being explicitly configured and returns the IP and
  port of the HLR's own GSUP server
- the request is answered, even if the subscriber is not attached to the
  HLR (for Location Update via proxy)

Related: OS#4380
Change-Id: Id567989e4be7ac2d3857d3ea61a1ca3a2401a8dc
---
M hlr/HLR_Tests.ttcn
1 file changed, 44 insertions(+), 0 deletions(-)



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

diff --git a/hlr/HLR_Tests.ttcn b/hlr/HLR_Tests.ttcn
index 82c74f4..c8c6712 100644
--- a/hlr/HLR_Tests.ttcn
+++ b/hlr/HLR_Tests.ttcn
@@ -1715,6 +1715,49 @@
 	}
 }
 
+/* Request "gsup.hlr" service right after creating subscriber from the home HLR. "TC_MSLookup_mDNS_service_other_home"
+ * is similar, but does not query the "gsup.hlr" service. The "gsup.hlr" service has a different code path in OsmoHLR:
+ * - it exists without being explicitly configured and returns the IP and port of the HLR's own GSUP server
+ * - the request is answered, even if the subscriber is not attached to the HLR (for Location Update via proxy) */
+private function f_TC_MSLookup_mDNS_service_GSUP_HLR_home() runs on HLR_ConnHdlr {
+	timer T;
+	var MSLookup_mDNS vl_rmsg;
+	var integer id := f_rnd_int(65535); /* mDNS packet ID */
+	var charstring domain := "gsup.hlr." & hex2str(g_pars.sub.imsi) & ".imsi.mdns.osmocom.org";
+
+	/* Create subscriber */
+	g_pars.sub.msisdn := '133713381339'H;
+	f_vty_subscr_create(VTY, g_pars.sub);
+
+	/* Send mDNS query, expect result */
+	mDNS.send(ts_MSLookup_mDNS_query(id, domain));
+	T.start(1.0);
+	alt {
+	[] mDNS.receive(tr_MSLookup_mDNS_result_IPv4(id, domain, f_enc_IPv4(mp_hlr_ip), mp_hlr_gsup_port)) {
+		setverdict(pass);
+		}
+	[] mDNS.receive(MSLookup_mDNS:?) -> value vl_rmsg {
+		repeat;
+		}
+	[] T.timeout {
+		setverdict(fail, "OsmoHLR did not answer to mDNS query");
+		}
+	}
+
+	f_vty_subscr_delete(VTY, g_pars.sub);
+}
+testcase TC_MSLookup_mDNS_service_GSUP_HLR_home() runs on test_CT {
+	var hexstring imsi := f_rnd_imsi('26242'H);
+	var HLR_ConnHdlr vc_conn;
+	var HLR_ConnHdlrPars pars := valueof(t_Pars(imsi));
+
+	f_init(false);
+	f_vty_config(VTY, "mslookup", "mdns bind");
+
+	vc_conn := f_start_handler(refers(f_TC_MSLookup_mDNS_service_GSUP_HLR_home), pars);
+	vc_conn.done;
+}
+
 /* TODO:
   * UL with ISD error
   * UL with ISD timeout
@@ -1764,6 +1807,7 @@
 	if (mp_hlr_supports_dgsm) {
 		execute( TC_MSLookup_mDNS_service_other_home() );
 		execute( TC_MSLookup_GSUP_proxy() );
+		execute( TC_MSLookup_mDNS_service_GSUP_HLR_home() );
 	}
 };
 

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17073
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: Id567989e4be7ac2d3857d3ea61a1ca3a2401a8dc
Gerrit-Change-Number: 17073
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200130/765f235f/attachment.htm>


More information about the gerrit-log mailing list