bsc: Call f_shutdown_helper() in BSC_Tests_CBSP tests

This should avoid some sporadic failure sptted during tear down.

Change-Id: I5ddce5cfcbfb057b4559a5d5a710d218bae1d8fe
This commit is contained in:
Pau Espin 2022-06-23 12:12:25 +02:00 committed by Vadim Yanitskiy
parent 65d879d957
commit d5496adfdb
1 changed files with 31 additions and 9 deletions

View File

@ -506,7 +506,7 @@ return template (present) RSL_Message
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 +515,14 @@ testcase TC_cbsp_bsc_server_ipv6() runs on cbsp_test_CT {
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 +531,7 @@ testcase TC_cbsp_bsc_client_ipv6() runs on cbsp_test_CT {
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 +539,7 @@ testcase TC_cbsp_reset_bss() runs on cbsp_test_CT {
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 +581,7 @@ testcase TC_cbsp_cell_rflock_failure_restart() runs on cbsp_test_CT {
}
}
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 +608,7 @@ testcase TC_cbsp_cell_rsl_down_failure() runs on cbsp_test_CT {
}
/* TODO: call f_init() again to reconnect? */
setverdict(pass);
f_shutdown_helper();
}
testcase TC_cbsp_write() runs on cbsp_test_CT {
@ -624,6 +624,7 @@ testcase TC_cbsp_write() runs on cbsp_test_CT {
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 +672,7 @@ testcase TC_cbsp_write_bss() runs on cbsp_test_CT {
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 +688,7 @@ testcase TC_cbsp_write_bts_cgi() runs on cbsp_test_CT {
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 +702,7 @@ testcase TC_cbsp_write_bts_no_cbch() runs on cbsp_test_CT {
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 +716,7 @@ testcase TC_cbsp_write_unknown_bts() runs on cbsp_test_CT {
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 +731,7 @@ testcase TC_cbsp_write_lac_ci() runs on cbsp_test_CT {
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 +746,7 @@ testcase TC_cbsp_write_ci() runs on cbsp_test_CT {
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 +765,7 @@ testcase TC_cbsp_write_lai() runs on cbsp_test_CT {
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 +784,7 @@ testcase TC_cbsp_write_lac() runs on cbsp_test_CT {
[] 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 +808,7 @@ testcase TC_cbsp_write_then_replace() runs on cbsp_test_CT {
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 +863,7 @@ testcase TC_cbsp_write_rep_period_num() runs on cbsp_test_CT {
}
f_sleep(1.0);
setverdict(pass);
f_shutdown_helper();
}
/* Replace a message that doesn't exist: failure */
@ -867,6 +876,7 @@ testcase TC_cbsp_replace_nonexist() runs on cbsp_test_CT {
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 +890,7 @@ testcase TC_cbsp_write_too_many() runs on cbsp_test_CT {
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 +902,7 @@ testcase TC_cbsp_kill_nonexist() runs on cbsp_test_CT {
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 +919,7 @@ testcase TC_cbsp_write_then_kill() runs on cbsp_test_CT {
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 +932,7 @@ testcase TC_cbsp_write_then_reset() runs on cbsp_test_CT {
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 :=
@ -973,6 +987,7 @@ testcase TC_cbsp_emerg_write_bts_cgi_dchan() runs on cbsp_test_CT {
}
f_perform_clear_test_ct(dt);
f_shutdown_helper();
}
private function f_exp_rsl_etws(integer rsl_idx := 0, boolean enabled) runs on cbsp_test_CT {
@ -1019,6 +1034,7 @@ testcase TC_cbsp_emerg_write_bts_cgi_cchan() runs on cbsp_test_CT {
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 */
@ -1038,6 +1054,7 @@ testcase TC_cbsp_emerg_write_bts_cgi_cchan_disable() runs on cbsp_test_CT {
/* 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) */
@ -1065,6 +1082,7 @@ testcase TC_cbsp_emerg_write_bts_cgi_noreplace() runs on cbsp_test_CT {
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 */
@ -1084,6 +1102,7 @@ testcase TC_cbsp_emerg_write_bts_cgi_replace() runs on cbsp_test_CT {
/* 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) */
@ -1107,6 +1126,7 @@ testcase TC_cbsp_emerg_write_bts_cgi_kill() runs on cbsp_test_CT {
/* then expect it to be disabled */
f_exp_rsl_etws(0, false);
f_shutdown_helper();
}
@ -1117,6 +1137,7 @@ testcase TC_cbsp_status_q_empty() runs on cbsp_test_CT {
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 */
@ -1147,6 +1168,7 @@ testcase TC_cbsp_status_q_bts_cgi() runs on cbsp_test_CT {
}
};
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();
}