84 lines
3.0 KiB
Plaintext
84 lines
3.0 KiB
Plaintext
module CBC_Tests {
|
|
|
|
import from Osmocom_Types all;
|
|
|
|
import from BSSAP_Types all;
|
|
import from CBSP_Types all;
|
|
import from CBSP_Templates all;
|
|
import from CBSP_Adapter all;
|
|
import from CBSP_CodecPort all;
|
|
|
|
modulepar {
|
|
charstring mp_cbc_host := "127.0.0.1";
|
|
integer mp_cbc_port := 48049;
|
|
};
|
|
|
|
type component test_CT extends CBSP_Adapter_CT {
|
|
};
|
|
|
|
private function f_init() runs on test_CT {
|
|
CBSP_Adapter.f_connect(mp_cbc_host, mp_cbc_port, "", -1);
|
|
}
|
|
|
|
testcase TC_foo() runs on test_CT {
|
|
f_init();
|
|
var BSSMAP_FIELD_CellIdentificationList cell_list := {
|
|
cIl_allInBSS := ''O
|
|
};
|
|
f_cbsp_send(ts_CBSP_RESTART(cell_list, CBSP_BC_MSGT_CBS, CBSP_RI_DATA_LOST));
|
|
f_cbsp_send(ts_CBSP_RESTART(cell_list, CBSP_BC_MSGT_EMERG, CBSP_RI_DATA_LOST));
|
|
f_sleep(10.0);
|
|
}
|
|
|
|
/* test whether or not we receive a KEEP-ALIVE at all */
|
|
testcase TC_rx_keepalive() runs on test_CT {
|
|
f_init();
|
|
f_cbsp_exp(tr_CBSP_KEEP_ALIVE(?));
|
|
setverdict(pass);
|
|
}
|
|
|
|
testcase TC_rx_keepalive_timeout() runs on test_CT {
|
|
var CBSP_PDU rx;
|
|
var CBSP_IE ie;
|
|
|
|
f_init();
|
|
rx := f_cbsp_exp(tr_CBSP_KEEP_ALIVE(?));
|
|
f_cbsp_find_ie(rx, CBSP_IEI_KEEP_ALIVE_REP_PERIOD, ie);
|
|
|
|
setverdict(pass);
|
|
}
|
|
|
|
testcase TC_selftest() runs on test_CT {
|
|
const octetstring c_load_q := '0700000d0400080000f110012345671200'O;
|
|
const octetstring c_load_q_compl := '0800000f0a000a0000f1100123456700001200'O;
|
|
const octetstring c_reset := '1000000b0400080000f11001234567'O;
|
|
const octetstring c_reset_compl := '1100000b0400080000f11001234567'O;
|
|
const octetstring c_msg_sts_q := '0a0000130e022b0200000400080000f110012345671200'O;
|
|
const octetstring c_msg_sts_q_fail := '0c0000140e022b0200000900090000f11001234567021200'O;
|
|
const octetstring c_kill := '040000110e00000200000400080000f11001234567'O;
|
|
const octetstring c_kill_fail := '060000120e00000200000900090000f1100123456702'O;
|
|
const octetstring c_write_repl := '010000c70e022b0300300400080000f110012345671200050006000407000613020c400107f4f29c9e769f5de337b90c921d1b8d46a3d168341a8d46a3d168341a8d46a3d168341a8d46a3d168341a8d46a3d168341a8d46a3d168341a8d46a3d168341a8d46a3d168341a8d46a3d168341a8d46a3d100'O;
|
|
const octetstring c_write_repl_compl := '020000130e022b0300300400080000f110012345671200'O;
|
|
const octetstring c_write_repl_fail := '030000140e022b0300300900090000f110012345670d1200'O;
|
|
const octetstring c_msg_s_q := '0a0000130e022b0200900400080000f110012345671200'O;
|
|
const octetstring c_msg_s_q_compl := '0b0000160e022b02009008000b0000f110012345670008001200'O;
|
|
const octetstring c_kill_compl := '050000160e022b02008008000b0000f110012345670006001200'O;
|
|
|
|
log(dec_CBSP_PDU(c_load_q));
|
|
log(dec_CBSP_PDU(c_load_q_compl));
|
|
log(dec_CBSP_PDU(c_reset));
|
|
log(dec_CBSP_PDU(c_reset_compl));
|
|
log(dec_CBSP_PDU(c_msg_sts_q));
|
|
log(dec_CBSP_PDU(c_msg_sts_q_fail));
|
|
log(dec_CBSP_PDU(c_kill));
|
|
log(dec_CBSP_PDU(c_kill_fail));
|
|
log(dec_CBSP_PDU(c_write_repl));
|
|
log(dec_CBSP_PDU(c_write_repl_compl));
|
|
log(dec_CBSP_PDU(c_write_repl_fail));
|
|
log(dec_CBSP_PDU(c_msg_s_q));
|
|
log(dec_CBSP_PDU(c_msg_s_q_compl));
|
|
log(dec_CBSP_PDU(c_kill_compl));
|
|
}
|
|
|
|
}
|