add chopped IPA ping test to BTS tests
Run the chopped IPA ping test from the IPA_Testing module
as part of the BTS test suite. Contrary to the BSC version
of this test, this test listens for an IPA connection rather
than connecting to an IPA server. Make code in the IPA_Testing
module for accepting connections actually work.
Change-Id: I4804ccabd342b82d44e69dbc6eaaae220ec7d4e4
Related: OS#2010
diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn
index 82a54f3..2d59627 100644
--- a/bts/BTS_Tests.ttcn
+++ b/bts/BTS_Tests.ttcn
@@ -15,6 +15,7 @@
import from RSL_Types all;
import from IPA_Types all;
import from IPA_Emulation all;
+import from IPA_Testing all;
import from RSL_Emulation all;
import from IPL4asp_Types all;
@@ -4146,6 +4147,10 @@
f_tch_sign_l2_fill_frame(true);
}
+testcase TC_chopped_ipa_ping() runs on test_CT {
+ IPA_Testing.f_run_TC_chopped_ipa_ping(mp_rsl_ip, mp_rsl_port, LISTEN_FOR_CLIENT);
+}
+
/* test generation of RLL ERR IND based on Um errors (TS 48.058 3.9) */
/* protocol error as per 44.006 */
/* link layer failure (repetition of I-frame N200 times without ACK */
@@ -4278,6 +4283,8 @@
execute( TC_tch_sign_l2_fill_frame() );
execute( TC_tch_sign_l2_fill_frame_dtxd() );
+
+ execute( TC_chopped_ipa_ping() );
}
diff --git a/bts/gen_links.sh b/bts/gen_links.sh
index b6c4e12..1ec6153 100755
--- a/bts/gen_links.sh
+++ b/bts/gen_links.sh
@@ -42,6 +42,7 @@
FILES+="Native_Functions.ttcn Native_FunctionDefs.cc "
FILES+="TRXC_Types.ttcn TRXC_CodecPort.ttcn TRXC_CodecPort_CtrlFunct.ttcn TRXC_CodecPort_CtrlFunctDef.cc "
FILES+="PCUIF_Types.ttcn PCUIF_CodecPort.ttcn "
+FILES+="IPA_Testing.ttcn"
gen_links $DIR $FILES
ignore_pp_results
diff --git a/library/IPA_Testing.ttcn b/library/IPA_Testing.ttcn
index 62aa143..a94dd46 100644
--- a/library/IPA_Testing.ttcn
+++ b/library/IPA_Testing.ttcn
@@ -139,8 +139,10 @@
if (conmode == CONNECT_TO_SERVER) {
f_send_chopped_ipa_msg(ipa_ip, ipa_tcp_port, connId, ipa_msg_ping);
} else {
- IPL4.receive(t_recvfrom(omit)) -> value asp_rx {
- f_send_chopped_ipa_msg(asp_rx.remName, asp_rx.remPort, connId, ipa_msg_ping);
+ var PortEvent port_evt;
+ IPL4.receive(PortEvent:{connOpened := ?}) -> value port_evt {
+ var ConnectionOpenedEvent conn := port_evt.connOpened;
+ f_send_chopped_ipa_msg(conn.remName, conn.remPort, conn.connId, ipa_msg_ping);
}
}