Change in osmo-ttcn3-hacks[master]: WIP: msc/USSD: add unknown request code testcase

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

Vadim Yanitskiy gerrit-no-reply at lists.osmocom.org
Wed Jun 6 00:15:13 UTC 2018


Vadim Yanitskiy has uploaded this change for review. ( https://gerrit.osmocom.org/9470


Change subject: WIP: msc/USSD: add unknown request code testcase
......................................................................

WIP: msc/USSD: add unknown request code testcase

The idea of this testcase is to check reaction of the network on
reception of USSD request with unknown/unhandled request code.

It is not clearly defined by the GSM specs, how the network
should react in such cases, but looking at GSM TS 04.80,
section 4.3.2 "Error types description", the UnexpectedDataValue
error looks suitable. Commercial networks also use this error
when an unknown request code is sent.

Change-Id: I6a3fcaafc37972a38c13722f0b511ea5e1e3fbd8
---
M msc/MSC_Tests.ttcn
1 file changed, 54 insertions(+), 0 deletions(-)



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

diff --git a/msc/MSC_Tests.ttcn b/msc/MSC_Tests.ttcn
index 05d6b4f..7b8740c 100644
--- a/msc/MSC_Tests.ttcn
+++ b/msc/MSC_Tests.ttcn
@@ -2163,6 +2163,59 @@
 	vc_conn.done;
 }
 
+private function f_tc_lu_and_ussd_wrong_code(charstring id, BSC_ConnHdlrPars pars)
+runs on BSC_ConnHdlr {
+	f_init_handler(pars);
+
+	/* Perform location update */
+	f_perform_lu();
+
+	/* Send CM Service Request for SS/USSD */
+	f_establish_fully(EST_TYPE_SS_ACT);
+
+	/* Compose a new SS/REGISTER message with request */
+	var template (value) PDU_ML3_MS_NW ussd_req := ts_ML3_MO_SS_REGISTER(
+		tid := 1, /* We just need a single transaction */
+		ti_flag := c_TIF_ORIG, /* Sent from the side that originates the TI */
+		facility := f_USSD_FACILITY_IE_INVOKE(
+			invoke_id := 5, /* Phone may not start from 0 or 1 */
+			op_code := SS_OP_CODE_PROCESS_USS_REQ,
+			ussd_string := "*#999#"
+		)
+	);
+
+	/* Compose SS/RELEASE_COMPLETE template with expected response */
+	var template PDU_ML3_NW_MS ussd_rsp := tr_ML3_MT_SS_RELEASE_COMPLETE(
+		tid := 1, /* Response should arrive within the same transaction */
+		ti_flag := c_TIF_REPL, /* Sent to the side that originates the TI */
+		facility := f_USSD_FACILITY_IE_RETURN_ERROR(
+			invoke_id := 5, /* InvokeID shall be the same for both REQ and RSP */
+			err_code := SS_ERR_CODE_UNEXPECTED_DATA_VALUE
+		)
+	);
+
+	/* Request own number request */
+	BSSAP.send(ts_PDU_DTAP_MO(ussd_req));
+	alt {
+	/* We expect RELEASE_COMPLETE message with the response */
+	[] BSSAP.receive(tr_PDU_DTAP_MT(ussd_rsp)) {
+		setverdict(pass);
+		}
+	[] BSSAP.receive {
+		setverdict(fail, "Unknown/unexpected BSSAP received");
+		self.stop;
+		}
+	}
+
+	f_expect_clear();
+}
+testcase TC_lu_and_ussd_wrong_code() runs on MTC_CT {
+	var BSC_ConnHdlr vc_conn;
+	f_init();
+	vc_conn := f_start_handler(refers(f_tc_lu_and_ussd_wrong_code), 47);
+	vc_conn.done;
+}
+
 /* TODO (SMS):
    * different user data lengths
    * SMPP transaction mode with unsuccessful delivery
@@ -2245,6 +2298,7 @@
 	execute( TC_smpp_mt_sms() );
 
 	execute( TC_lu_and_ussd_single_req() );
+	execute( TC_lu_and_ussd_wrong_code() );
 
 	/* Run this last: at the time of writing this test crashes the MSC */
 	execute( TC_lu_imsi_auth_tmsi_encr_3_1_log_msc_debug() );

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

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I6a3fcaafc37972a38c13722f0b511ea5e1e3fbd8
Gerrit-Change-Number: 9470
Gerrit-PatchSet: 1
Gerrit-Owner: Vadim Yanitskiy <axilirator at gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20180606/6d89a6f2/attachment.htm>


More information about the gerrit-log mailing list