Change in osmo-ttcn3-hacks[master]: sgsn: add TC_attach_detach_check_subscriber_list

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
Wed Jun 13 10:28:44 UTC 2018


Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/9579 )

Change subject: sgsn: add TC_attach_detach_check_subscriber_list
......................................................................

sgsn: add TC_attach_detach_check_subscriber_list

MS <-> SGSN: Attach
MS ->  SGSN: Detach Req (Power off)
VTY -> SGSN: Check if MS is NOT in subscriber cache

Change-Id: I0956d54760f19ca556fa0d16ea4c5b96ac13f2fa
---
M sgsn/SGSN_Tests.ttcn
1 file changed, 20 insertions(+), 1 deletion(-)

Approvals:
  Jenkins Builder: Verified
  Harald Welte: Looks good to me, approved



diff --git a/sgsn/SGSN_Tests.ttcn b/sgsn/SGSN_Tests.ttcn
index 9632718..802c3e6 100644
--- a/sgsn/SGSN_Tests.ttcn
+++ b/sgsn/SGSN_Tests.ttcn
@@ -1248,7 +1248,6 @@
 	vc_conn.done;
 }
 
-
 private function f_TC_hlr_location_cancel_request_update(charstring id) runs on BSSGP_ConnHdlr {
 	/* MS: perform regular attach */
 	f_TC_attach(id);
@@ -1365,7 +1364,26 @@
 	vc_conn.done;
 }
 
+private function f_TC_attach_detach_check_subscriber_list(charstring id) runs on BSSGP_ConnHdlr {
+	f_TC_attach(id);
+	f_detach_mo(c_GMM_DTT_MO_GPRS, true, true);
+}
 
+testcase TC_attach_detach_check_subscriber_list() runs on test_CT {
+	/* MS <-> SGSN: Attach
+	 * MS ->  SGSN: Detach Req (Power off)
+	 * VTY -> SGSN: Check if MS is NOT in subscriber cache
+	 */
+	var BSSGP_ConnHdlr vc_conn;
+	var integer id := 33;
+	var charstring imsi := hex2str(f_gen_imsi(id));
+
+	f_init();
+	vc_conn := f_start_handler(refers(f_TC_attach_detach_check_subscriber_list), testcasename(), g_gb[0], id);
+	vc_conn.done;
+
+	f_vty_transceive_not_match(SGSNVTY, "show subscriber cache", pattern "* IMSI: {imsi}*");
+}
 
 /* Attempt an attach, but loose the Identification Request (IMEI) */
 private function f_TC_attach_no_imei_response(charstring id) runs on BSSGP_ConnHdlr {
@@ -1473,6 +1491,7 @@
 	execute( TC_attach_closed() );
 	execute( TC_attach_no_imei_response() );
 	execute( TC_attach_no_imsi_response() );
+	execute( TC_attach_detach_check_subscriber_list(), 10.0 );
 	execute( TC_hlr_location_cancel_request_update(), 10.0 );
 	execute( TC_hlr_location_cancel_request_withdraw(), 10.0 );
 	execute( TC_hlr_location_cancel_request_unknown_subscriber_withdraw(), 10.0 );

-- 
To view, visit https://gerrit.osmocom.org/9579
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I0956d54760f19ca556fa0d16ea4c5b96ac13f2fa
Gerrit-Change-Number: 9579
Gerrit-PatchSet: 1
Gerrit-Owner: lynxis lazus <lynxis at fe80.eu>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20180613/f04d343d/attachment.htm>


More information about the gerrit-log mailing list