[PATCH] osmo-ttcn3-hacks[master]: hlr: Add TC_vty_msisdn_isd

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

Harald Welte gerrit-no-reply at lists.osmocom.org
Thu Mar 1 21:44:11 UTC 2018


Review at  https://gerrit.osmocom.org/7039

hlr: Add TC_vty_msisdn_isd

This tests whether the HLR is sending an InsertSubscriberData to the VLR
of an active/registered subscriber after the MSISDN is updated in the
HLR.

Change-Id: I597a3c2d49aa6fa65007304105363a3e99fa4ae9
Related: OS#2785
---
M hlr/HLR_Tests.ttcn
1 file changed, 41 insertions(+), 0 deletions(-)


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

diff --git a/hlr/HLR_Tests.ttcn b/hlr/HLR_Tests.ttcn
index 44e713e..bb417a5 100644
--- a/hlr/HLR_Tests.ttcn
+++ b/hlr/HLR_Tests.ttcn
@@ -210,6 +210,12 @@
 	}
 }
 
+function f_vty_subscr_update_msisdn(HlrSubscriber sub, hexstring new_msisdn) runs on test_CT {
+	var charstring prefix := valueof(t_subscr_prefix(sub.imsi));
+	f_vty_transceive_match(VTY, prefix & "update msisdn " & hex2str(new_msisdn),
+				pattern "% Updated subscriber *");
+}
+
 /* perform 'delete' on subscriber */
 function f_vty_subscr_delete(HlrSubscriber sub) runs on test_CT {
 	var charstring prefix := valueof(t_subscr_prefix(sub.imsi));
@@ -394,6 +400,40 @@
 	setverdict(pass);
 }
 
+/* VTY changes to MSISDN should result in ISD to current VLR */
+testcase TC_vty_msisdn_isd() runs on test_CT {
+	var HlrSubscriber sub;
+	var hexstring new_msisdn;
+	var GSUP_PDU res;
+	timer T := 5.0;
+
+	f_init();
+
+	/* Create Subscriber */
+	sub := valueof(t_Sub2G(f_rnd_imsi('26242'H), '49161'H & f_rnd_hexstring(7, 9), "comp128v1"));
+	f_vty_subscr_create(sub);
+
+	/* Perform UpdateLocation (VLR now known to HLR) */
+	res := f_perform_UL(sub.imsi, sub.msisdn);
+
+	/* Then change IMSI via VTY */
+	new_msisdn := '49161'H & f_rnd_hexstring(7, 9);
+	f_vty_subscr_update_msisdn(sub, new_msisdn);
+	/* And expect InsertSubscriberData as result */
+	T.start;
+	alt {
+	[] GSUP.receive(tr_GSUP_ISD_REQ(sub.imsi, new_msisdn)) {
+		GSUP.send(ts_GSUP_ISD_RES(sub.imsi));
+		sub.msisdn := new_msisdn;
+		setverdict(pass);
+		}
+	[] GSUP.receive { repeat; }
+	[] T.timeout {
+		setverdict(fail, "Timeout waiting for ISD.req");
+		}
+	}
+}
+
 /* TODO:
   * UL with ISD error
   * UL with ISD timeout
@@ -415,6 +455,7 @@
 	execute( TC_gsup_ul_unknown_imsi() );
 	execute( TC_gsup_ul() );
 	execute( TC_vty() );
+	execute( TC_vty_msisdn_isd() );
 };
 
 };

-- 
To view, visit https://gerrit.osmocom.org/7039
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I597a3c2d49aa6fa65007304105363a3e99fa4ae9
Gerrit-PatchSet: 1
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Owner: Harald Welte <laforge at gnumonks.org>



More information about the gerrit-log mailing list