stp: Add TC_rapid_init_shutdown()

Change-Id: I3d37cd80acfaf042b60f1590ee12a0e26d8853b5
Related: OS#4625
This commit is contained in:
Harald Welte 2020-06-23 22:04:02 +02:00
parent 3355c4dc28
commit e1aa2796f1
1 changed files with 36 additions and 0 deletions

View File

@ -685,7 +685,40 @@ testcase TC_clnt_asp_to_sg() runs on RAW_M3UA_CT {
f_clear_m3ua();
}
/* test a rapid sequence of several INIT/SHUTDOWN before sending the first ASPUP. OS#4625 */
private function f_TC_rapid_init_shutdown() runs on RAW_M3UA_CT {
//f_init_common();
//activate(as_m3ua_sctp());
//map(self:M3UA[0], system:M3UA_CODEC_PT);
//f_M3UA_connect(0);
/* close one M3UA connection before ever doing anything on it */
log("close 1");
f_M3UA_close(0);
/* re-open and close again */
log("open 2");
f_M3UA_connect(0);
log("close 2");
f_M3UA_close(0);
/* third re-open, now we want to send an ASPUP */
log("open 3");
f_M3UA_connect(0);
log("asp_up");
f_M3UA_asp_up(0);
log("end");
}
testcase TC_rapid_init_shutdown() runs on RAW_M3UA_CT {
log("init");
f_init_m3ua();
var integer i;
for (i := 0; i < 1; i := i + 1) {
f_TC_rapid_init_shutdown();
}
}
control {
/* M3UA Tests */
@ -721,6 +754,9 @@ control {
/* put this one last as it changes the stp side config */
execute( TC_clnt_asp_act_tmt_loadshare() );
/* put this one last as it may crash (older versions of) OsmoSTP */
execute( TC_rapid_init_shutdown() );
}