sccp: Add TC_process_rx_xudt, verifying reception of SCCP XUDT

Test if a XUDT SCCP message is processed by libosmo-sigtran.  We
assume any XUDT is received (and echoed back) just like normal UDT.

Related: OS#5281, SYS#5674
Change-Id: Idbf6db7a684e51858129618b2fcffcbe55b1b70f
diff --git a/sccp/SCCP_Tests_RAW.ttcn b/sccp/SCCP_Tests_RAW.ttcn
index 1ac82a2..5013ddf 100644
--- a/sccp/SCCP_Tests_RAW.ttcn
+++ b/sccp/SCCP_Tests_RAW.ttcn
@@ -310,6 +310,31 @@
 	}
 }
 
+private function f_tx_xudt_exp(SCCP_PAR_Address calling, SCCP_PAR_Address called, octetstring data) runs on SCCP_Test_RAW_CT {
+	var template PDU_SCCP exp_rx;
+	f_send_sccp(ts_SCCP_XUDT(calling, called, data));
+	exp_rx := (tr_SCCP_UDT(called, calling, data), tr_SCCP_XUDT(called, calling, data));
+	f_exp_sccp(exp_rx);
+}
+
+/* Test if the IUT SCCP code processes an XUDT [treat it like UDT] and answers back. */
+testcase TC_process_rx_xudt() runs on SCCP_Test_RAW_CT {
+	var SCCP_PAR_Address calling, called;
+	var octetstring data := f_rnd_octstring(f_rnd_int(100));
+
+	f_init_raw(mp_sccp_cfg[0]);
+	f_sleep(1.0);
+
+	called := valueof(ts_SccpAddr_PC_SSN(mp_sccp_cfg[0].peer_pc, mp_sccp_cfg[0].peer_ssn,
+					     mp_sccp_cfg[0].sio, mp_sccp_cfg[0].sccp_service_type));
+	calling := valueof(ts_SccpAddr_PC_SSN(mp_sccp_cfg[0].own_pc, mp_sccp_cfg[0].own_ssn,
+					     mp_sccp_cfg[0].sio, mp_sccp_cfg[0].sccp_service_type));
+
+	/* Make sure an XUDT is echoed back just like an UDT */
+	f_tx_xudt_exp(calling, called, data);
+	setverdict(pass);
+}
+
 function f_scmg_xceive(SCCP_PAR_Address calling, SCCP_PAR_Address called,
 		       template (value) PDU_SCMG_message tx,
 		       template (omit) PDU_SCMG_message rx_exp,
@@ -429,6 +454,7 @@
 	execute( TC_udt_without_cr_cc() );
 	execute( TC_tiar_timeout() );
 	execute( TC_it_avoids_tiar() );
+	execute( TC_process_rx_xudt() );
 
 	execute( TC_scmg_sst_ssn1() );
 	execute( TC_scmg_sst_ssn_valid() );