pespin has uploaded this change for review. (
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/28406 )
Change subject: bsc: Call f_shutdown_helper() in BSC_Tests_CBSP tests
......................................................................
bsc: Call f_shutdown_helper() in BSC_Tests_CBSP tests
This should avoid some sporadic failure sptted during tear down.
Change-Id: I5ddce5cfcbfb057b4559a5d5a710d218bae1d8fe
---
M bsc/BSC_Tests.ttcn
M bsc/BSC_Tests_CBSP.ttcn
2 files changed, 35 insertions(+), 11 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/06/28406/1
diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn
index 200fd5b..c2cf8d3 100644
--- a/bsc/BSC_Tests.ttcn
+++ b/bsc/BSC_Tests.ttcn
@@ -21,6 +21,7 @@
*/
friend module BSC_Tests_VAMOS;
+friend module BSC_Tests_CBSP;
import from Misc_Helpers all;
import from General_Types all;
diff --git a/bsc/BSC_Tests_CBSP.ttcn b/bsc/BSC_Tests_CBSP.ttcn
index 53f7fbc..29635ff 100644
--- a/bsc/BSC_Tests_CBSP.ttcn
+++ b/bsc/BSC_Tests_CBSP.ttcn
@@ -12,6 +12,9 @@
* This test suite tests OsmoBSC while emulating the CBC (Cell Broadcast Centre)
*/
+friend module BSC_Tests;
+import from BSC_Tests all;
+
import from General_Types all;
import from Osmocom_Types all;
import from GSM_Types all;
@@ -19,8 +22,6 @@
import from BSSAP_Types all;
import from BSSMAP_Templates all;
-import from BSC_Tests all;
-
import from IPA_Emulation all;
import from IPA_CodecPort all;
import from IPA_Types all;
@@ -506,7 +507,7 @@
testcase TC_cbsp_bsc_server() runs on cbsp_test_CT {
g_pars := valueof(ts_CBSP_Pars_default(tcp_client := true));
f_init();
- setverdict(pass);
+ f_shutdown_helper();
}
/* Test if BSC (server) accepts connections from CBC (client, IPv6) */
@@ -515,14 +516,14 @@
g_pars.local_ip := mp_cbc_ip6;
g_pars.remote_ip := mp_bsc_cbsp_ip6;
f_init();
- setverdict(pass);
+ f_shutdown_helper();
}
/* Test if BSC (client) is connecting to CBC (server, IPv4) */
testcase TC_cbsp_bsc_client() runs on cbsp_test_CT {
g_pars := valueof(ts_CBSP_Pars_default(false, 0, 0));
f_init();
- setverdict(pass);
+ f_shutdown_helper();
}
/* Test if BSC (client) is connecting to CBC (server, IPv6) */
@@ -531,7 +532,7 @@
g_pars.local_ip := mp_cbc_ip6;
g_pars.remote_ip := mp_bsc_cbsp_ip6;
f_init();
- setverdict(pass);
+ f_shutdown_helper();
}
/* Test if a BSS-global RESET is executed successfully */
@@ -539,7 +540,7 @@
g_pars := valueof(ts_CBSP_Pars_default(false, 0, 0));
f_init();
f_cbsp_reset_bss(0);
- setverdict(pass);
+ f_shutdown_helper();
}
/* Test if a LAC_CI FAILURE Ind is sent when TRX holding the CBCH is locked
@@ -581,7 +582,7 @@
}
}
- setverdict(pass);
+ f_shutdown_helper();
}
/* Test if a LAC_CI FAILURE Ind is sent when conn of TRX holding the CBCH goes down. */
@@ -608,7 +609,7 @@
}
/* TODO: call f_init() again to reconnect? */
- setverdict(pass);
+ f_shutdown_helper();
}
testcase TC_cbsp_write() runs on cbsp_test_CT {
@@ -624,6 +625,7 @@
CBSP[0].send(ts_CBSP_Send(g_cbsp_conn_id[0], tx));
f_sleep(10.0);
+ f_shutdown_helper();
}
/* Write to entire BSS; three cells succeed; one fails (no CBCH) */
@@ -671,6 +673,7 @@
f_tc_cbsp_write_bss(payload_len := 61, expect_blocks := 4);
f_tc_cbsp_write_bss(payload_len := 77, expect_blocks := 4);
f_tc_cbsp_write_bss(payload_len := 82, expect_blocks := 4);
+ f_shutdown_helper();
}
/* Write to single BTS supporting CBCH: success */
@@ -686,6 +689,7 @@
var template (present) RSL_Message tr := f_page2rsl(pages[0], g_cbsp_msg_id,
g_cbsp_ser_no);
IPA_RSL[0][0].receive(tr_ASP_RSL_UD(tr));
f_sleep(5.0);
+ f_shutdown_helper();
}
/* Write to single BTS not supporting CBCH: failure */
@@ -699,6 +703,7 @@
f_cbsp_write(g_cbsp_msg_id, g_cbsp_ser_no, cell_list, content:=pages,
success_list:=omit, fail_list:={?});
f_sleep(5.0);
+ f_shutdown_helper();
}
/* Write to single non-existant BTS */
@@ -712,6 +717,7 @@
f_cbsp_write(g_cbsp_msg_id, g_cbsp_ser_no, cell_list, content:=pages,
success_list:=omit, fail_list:={?});
f_sleep(5.0);
+ f_shutdown_helper();
}
/* Write to single BTS using LAC+CI */
@@ -726,6 +732,7 @@
success_list:=?, fail_list:=omit);
IPA_RSL[0][0].receive(tr_ASP_RSL_UD(f_page2rsl(pages[0], g_cbsp_msg_id,
g_cbsp_ser_no)));
f_sleep(5.0);
+ f_shutdown_helper();
}
/* Write to single BTS using CI */
@@ -740,6 +747,7 @@
success_list:=?, fail_list:=omit);
IPA_RSL[0][0].receive(tr_ASP_RSL_UD(f_page2rsl(pages[0], g_cbsp_msg_id,
g_cbsp_ser_no)));
f_sleep(5.0);
+ f_shutdown_helper();
}
/* Write to single BTS using LAI */
@@ -758,6 +766,7 @@
success_list:=?, fail_list:=omit);
IPA_RSL[2][0].receive(tr_ASP_RSL_UD(f_page2rsl(pages[0], g_cbsp_msg_id,
g_cbsp_ser_no)));
f_sleep(5.0);
+ f_shutdown_helper();
}
/* Write to two BTS using LAC */
@@ -776,6 +785,7 @@
[] IPA_RSL[1][0].receive(tr_ASP_RSL_UD(tr));
}
f_sleep(5.0);
+ f_shutdown_helper();
}
/* Write a message, then replace it */
@@ -799,7 +809,7 @@
IPA_RSL[0][0].receive(tr_ASP_RSL_UD(f_page2rsl(pages[0], g_cbsp_msg_id,
g_cbsp_ser_no)));
f_sleep(1.0);
- setverdict(pass);
+ f_shutdown_helper();
}
/* Verify handling of the Repetition Period and the Number of Broadcasts */
@@ -854,7 +864,7 @@
}
f_sleep(1.0);
- setverdict(pass);
+ f_shutdown_helper();
}
/* Replace a message that doesn't exist: failure */
@@ -867,6 +877,7 @@
cell_list := ts_BSSMAP_CIL_LAC_CI({bssmap_lac_ci(mp_cgi_bts0)});
f_cbsp_replace(10, 10023, 10042, cell_list, content:=pages,
success_list:=omit, fail_list:=?);
+ f_shutdown_helper();
}
/* Write more messages than can be scheduled */
@@ -880,6 +891,7 @@
cell_list := ts_BSSMAP_CIL_LAC_CI({bssmap_lac_ci(mp_cgi_bts0)});
f_cbsp_write(g_cbsp_msg_id, g_cbsp_ser_no, cell_list, rep_period:=1, content:=pages,
success_list:=omit, fail_list:=?);
+ f_shutdown_helper();
}
/* Kill message that doesn't exist: failure */
@@ -891,6 +903,7 @@
cell_list := ts_BSSMAP_CIL_LAC_CI({bssmap_lac_ci(mp_cgi_bts0)});
f_cbsp_kill(g_cbsp_msg_id, g_cbsp_ser_no, 0, cell_list, success_list:=omit,
compl_list:=omit, fail_list:=?);
+ f_shutdown_helper();
}
/* Write a message, then kill it */
testcase TC_cbsp_write_then_kill() runs on cbsp_test_CT {
@@ -907,6 +920,7 @@
IPA_RSL[0][0].receive(tr_ASP_RSL_UD(tr));
/* kill it, expecting non-empty completion list; success must be empty in case of CBS!
*/
f_cbsp_kill(g_cbsp_msg_id, g_cbsp_ser_no, 0, cell_list, success_list:=omit,
compl_list:=?, fail_list:=omit);
+ f_shutdown_helper();
}
/* Write a message, then reset all messages */
@@ -919,6 +933,7 @@
cell_list := ts_BSSMAP_CIL_LAC_CI({bssmap_lac_ci(mp_cgi_bts0)});
f_cbsp_write(g_cbsp_msg_id, g_cbsp_ser_no, cell_list, content:=pages, success_list:=?,
fail_list:=omit);
f_cbsp_reset_bss(0);
+ f_shutdown_helper();
}
private const octetstring c_ETWS_sec_default :=
@@ -971,6 +986,7 @@
setverdict(fail, "Waiting for APP INFO");
}
}
+ f_shutdown_helper();
}
private function f_exp_rsl_etws(integer rsl_idx := 0, boolean enabled) runs on
cbsp_test_CT {
@@ -1017,6 +1033,7 @@
f_cbsp_write_emerg(g_cbsp_msg_id, g_cbsp_ser_no, cell_list);
f_exp_rsl_etws(0, true);
+ f_shutdown_helper();
}
/* Write ETWS PN to single BTS; verify it arrives on CCHAN */
@@ -1036,6 +1053,7 @@
/* then expect it to be disabled after the warning period (5s) */
f_exp_rsl_etws(0, false);
+ f_shutdown_helper();
}
/* Write (!replace) ETWS PN to a single BTS which already has an ongoing PN; expect
failure (OS#5539) */
@@ -1063,6 +1081,7 @@
g_cbsp_ser_no := g_cbsp_ser_no + 2;
f_cbsp_write_emerg(g_cbsp_msg_id, g_cbsp_ser_no, cell_list, success_list:=?,
fail_list:=omit);
f_exp_rsl_etws(0, true);
+ f_shutdown_helper();
}
/* Replace ETWS PN to a single BTS which already has an ongoing PN; expect success */
@@ -1082,6 +1101,7 @@
/* write another emergency while first one is still ongoing; expect it to fail */
f_cbsp_replace_emerg(g_cbsp_msg_id, g_cbsp_ser_no+1, g_cbsp_ser_no, cell_list);
+ f_shutdown_helper();
}
/* Write ETWS PN to a single BTS, then kill it during its lifetime (OS#5540) */
@@ -1105,6 +1125,7 @@
/* then expect it to be disabled */
f_exp_rsl_etws(0, false);
+ f_shutdown_helper();
}
@@ -1115,6 +1136,7 @@
f_init();
f_cbsp_msg_status_query(g_cbsp_msg_id, g_cbsp_ser_no, compl_list := omit, fail_list :=
?);
+ f_shutdown_helper();
}
/* Send a SMSCB to entire BSS followed by MSG_STATUS_QUERY; expect completion list and no
failure list */
@@ -1145,6 +1167,7 @@
}
};
f_cbsp_msg_status_query(g_cbsp_msg_id, g_cbsp_ser_no, cell_list:=cell_list, compl_list
:= compl_list, fail_list := omit);
+ f_shutdown_helper();
}
--
To view, visit
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/28406
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I5ddce5cfcbfb057b4559a5d5a710d218bae1d8fe
Gerrit-Change-Number: 28406
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: newchange