bts: TC_ipa_crcx_twice_not_active + TC_ipa_crcx_mdcx_dlcx_not_active

Change-Id: Ie643203c4fa4ba0baf5c640d9fd8eaf9fd85cd5b
This commit is contained in:
Harald Welte 2018-02-25 12:49:55 +01:00
parent 1eba37487b
commit a3f1df9cd7
1 changed files with 38 additions and 0 deletions

View File

@ -1013,6 +1013,42 @@ testcase TC_ipa_dlcx_not_active() runs on test_CT {
vc_conn.done;
}
/* Send IPA CRCX twice to inactive lchan */
function f_TC_ipa_crcx_twice_not_active(charstring id) runs on ConnHdlr {
f_rsl_transceive(ts_RSL_IPA_CRCX(g_chan_nr), tr_RSL_IPA_CRCX_ACK(g_chan_nr, ?, ?, ?),
"IPA CRCX ACK");
f_rsl_transceive(ts_RSL_IPA_CRCX(g_chan_nr), tr_RSL_IPA_CRCX_NACK(g_chan_nr, RSL_ERR_RES_UNAVAIL),
"IPA CRCX NACK");
}
testcase TC_ipa_crcx_twice_not_active() runs on test_CT {
var ConnHdlrPars pars := valueof(t_Pars(t_RslChanNr_Bm(1), ts_RSL_ChanMode_SIGN));
f_init(testcasename());
var ConnHdlr vc_conn := f_start_handler(refers(f_TC_ipa_crcx_twice_not_active), pars);
vc_conn.done;
}
/* Regular sequence of CRCX/MDCX/DLCX */
function f_TC_ipa_crcx_mdcx_dlcx_not_active(charstring id) runs on ConnHdlr {
f_rsl_transceive(ts_RSL_IPA_CRCX(g_chan_nr), tr_RSL_IPA_CRCX_ACK(g_chan_nr, ?, ?, ?),
"IPA CRCX ACK");
var uint32_t remote_ip := f_rnd_int(c_UINT32_MAX);
var uint16_t remote_port := f_rnd_int(c_UINT16_MAX);
var uint7_t rtp_pt2 := f_rnd_int(127);
var uint16_t fake_conn_id := 23; /* we're too lazy to read it out from the CRCX ACK above */
f_rsl_transceive(ts_RSL_IPA_MDCX(g_chan_nr, fake_conn_id, remote_ip, remote_port, rtp_pt2),
tr_RSL_IPA_MDCX_ACK(g_chan_nr, ?, ?, ?, rtp_pt2),
"IPA MDCX ACK");
f_rsl_transceive(ts_RSL_IPA_DLCX(g_chan_nr, fake_conn_id), tr_RSL_IPA_DLCX_ACK(g_chan_nr, ?, ?),
"IPA DLCX ACK");
}
testcase TC_ipa_crcx_mdcx_dlcx_not_active() runs on test_CT {
var ConnHdlrPars pars := valueof(t_Pars(t_RslChanNr_Bm(1), ts_RSL_ChanMode_SIGN));
f_init(testcasename());
var ConnHdlr vc_conn := f_start_handler(refers(f_TC_ipa_crcx_mdcx_dlcx_not_active), pars);
vc_conn.done;
}
/* TODO Areas:
* channel activation
@ -1064,6 +1100,8 @@ control {
execute( TC_rsl_mand_ie_error() );
execute( TC_rsl_ie_content_error() );
execute( TC_ipa_dlcx_not_active() );
execute( TC_ipa_crcx_twice_not_active() );
execute( TC_ipa_crcx_mdcx_dlcx_not_active() );
}