bts: Verify PCU socket can disconnect + re-connect
Change-Id: Ic69c3f34405012d42319bd9752f875071aae2243
Related: OS#4023
diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn
index 2885628..6786d68 100644
--- a/bts/BTS_Tests.ttcn
+++ b/bts/BTS_Tests.ttcn
@@ -3921,6 +3921,26 @@
Misc_Helpers.f_shutdown(__BFILE__, __LINE__);
}
+/* Ensure that PCUIF socket can disconnect + reconnect */
+testcase TC_pcu_socket_reconnect() runs on test_CT {
+ /* this (among other things) establishes the first connection to the PCUIF socket */
+ f_init();
+
+ f_sleep(1.0);
+
+ f_pcuif_close(PCU, g_pcu_conn_id);
+ g_pcu_conn_id := -1;
+
+ f_sleep(1.0);
+
+ /* re-connect */
+ PCU.clear;
+ f_init_pcu(PCU, testcasename(), g_pcu_conn_id, g_pcu_last_info);
+ setverdict(pass);
+
+ Misc_Helpers.f_shutdown(__BFILE__, __LINE__);
+}
+
/***********************************************************************
* Osmocom Style Dynamic Timeslot Support
@@ -5230,6 +5250,7 @@
execute( TC_pcu_oml_alert() );
execute( TC_pcu_rr_suspend() );
execute( TC_pcu_socket_connect_multi() );
+ execute( TC_pcu_socket_reconnect() );
} else {
log("PCU socket path not available, skipping PCU tests");
}