gbproxy: Add test case for PAGING-PS-REJECT
The test fail with current osmo-gbproxy master, as the related implementation is missing. Related: OS#4951 Change-Id: I19a36dfef8f33f278a54b938a5daccce08de6fe0
This commit is contained in:
parent
be9bf1e74d
commit
cf20007b26
|
@ -1468,6 +1468,26 @@ testcase TC_paging_ps_ptp_bvci_imsi() runs on test_CT {
|
|||
f_cleanup();
|
||||
}
|
||||
|
||||
/* Rejected PS-PAGING on PTP-BVC for BVCI (one cell) */
|
||||
testcase TC_paging_ps_reject_ptp_bvci() runs on test_CT {
|
||||
f_init();
|
||||
f_start_handlers(refers(f_TC_paging_ps_reject_ptp_bvci), testcasename(), 16);
|
||||
f_cleanup();
|
||||
}
|
||||
|
||||
/* Rejected PS-PAGING on PTP-BVC for BVCI (one cell) using IMSI only (no P-TMSI allocated) */
|
||||
private function f_TC_paging_ps_reject_ptp_bvci(charstring id) runs on BSSGP_ConnHdlr
|
||||
{
|
||||
/* first send the PS-PAGING from SGSN -> PCU */
|
||||
f_send_paging_ps_exp_one_bss(ts_BssgpP4Bvci(pcu_bvc_cfg[0].bvci), 0, false, 0);
|
||||
/* then simulate the PS-PAGING-REJECT from the PCU */
|
||||
f_send_paging_ps_rej(use_sig:=false);
|
||||
}
|
||||
testcase TC_paging_ps_reject_ptp_bvci_imsi() runs on test_CT {
|
||||
f_init();
|
||||
f_start_handlers(refers(f_TC_paging_ps_reject_ptp_bvci), testcasename(), 16, have_ptmsi:=false);
|
||||
f_cleanup();
|
||||
}
|
||||
|
||||
/* PS-PAGING on PTP-BVC for unknown BVCI */
|
||||
private function f_TC_paging_ps_ptp_bvci_unknown(charstring id) runs on BSSGP_ConnHdlr
|
||||
|
@ -1536,6 +1556,53 @@ private function f_send_paging_ps_exp_multi(template (value) Paging_Field4 p4, i
|
|||
setverdict(pass);
|
||||
}
|
||||
|
||||
/* Send PAGING-PS-REJECT on SIG BVC, expect it to arrive on the "right" SGSN */
|
||||
private function f_send_paging_ps_rej(boolean use_sig := true, integer pcu_idx := 0) runs on BSSGP_ConnHdlr
|
||||
{
|
||||
var template (value) PDU_BSSGP pdu_tx;
|
||||
var template (present) PDU_BSSGP exp_rx;
|
||||
var PDU_BSSGP pdu_rx;
|
||||
timer T := 5.0;
|
||||
var template (omit) GsmTmsi tmsi_int := omit;
|
||||
|
||||
if (ispresent(g_pars.p_tmsi)) {
|
||||
tmsi_int := oct2int(g_pars.p_tmsi);
|
||||
}
|
||||
|
||||
pdu_tx := ts_BSSGP_PAGING_PS_REJ(g_pars.imsi, 23, 42, tmsi_int);
|
||||
exp_rx := tr_BSSGP_PAGING_PS_REJ(g_pars.imsi, 23, 42, tmsi_int);
|
||||
|
||||
if (use_sig) {
|
||||
PCU_SIG[pcu_idx].send(pdu_tx);
|
||||
} else {
|
||||
PCU_PTP[pcu_idx].send(pdu_tx);
|
||||
}
|
||||
T.start;
|
||||
alt {
|
||||
[use_sig] SGSN_SIG[g_pars.sgsn_idx].receive(exp_rx) -> value pdu_rx {
|
||||
setverdict(pass);
|
||||
}
|
||||
[use_sig] SGSN_SIG[g_pars.sgsn_idx].receive {
|
||||
setverdict(fail, "Unexpected PDU on SGSN");
|
||||
}
|
||||
[use_sig] any from SGSN_SIG.receive(exp_rx) -> value pdu_rx {
|
||||
setverdict(fail, "PAGING-PS-REJECT arrived on wrong SGSN");
|
||||
}
|
||||
[not use_sig] SGSN_PTP[g_pars.sgsn_idx].receive(exp_rx) -> value pdu_rx {
|
||||
setverdict(pass);
|
||||
}
|
||||
[not use_sig] SGSN_PTP[g_pars.sgsn_idx].receive {
|
||||
setverdict(fail, "Unexpected PDU on SGSN");
|
||||
}
|
||||
[not use_sig] any from SGSN_PTP.receive(exp_rx) -> value pdu_rx {
|
||||
setverdict(fail, "PAGING-PS-REJECT arrived on wrong SGSN");
|
||||
}
|
||||
[] T.timeout {
|
||||
setverdict(fail, "Timeout waiting for PAGING-PS-REJECT");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* PS-PAGING on SIG-BVC for BSS Area */
|
||||
private function f_TC_paging_ps_sig_bss(charstring id) runs on BSSGP_ConnHdlr
|
||||
{
|
||||
|
@ -1635,6 +1702,28 @@ testcase TC_paging_ps_sig_bvci_imsi() runs on test_CT {
|
|||
f_cleanup();
|
||||
}
|
||||
|
||||
/* Rejected PS-PAGING on SIG-BVC for BVCI (one cell) */
|
||||
private function f_TC_paging_ps_reject_sig_bvci(charstring id) runs on BSSGP_ConnHdlr
|
||||
{
|
||||
/* first send the PS-PAGING from SGSN -> PCU */
|
||||
f_send_paging_ps_exp_multi(ts_BssgpP4Bvci(pcu_bvc_cfg[0].bvci), 0, {0});
|
||||
/* then simulate the PS-PAGING-REJECT from the PCU */
|
||||
f_send_paging_ps_rej(use_sig:=true);
|
||||
|
||||
}
|
||||
testcase TC_paging_ps_reject_sig_bvci() runs on test_CT {
|
||||
f_init();
|
||||
f_start_handlers(refers(f_TC_paging_ps_reject_sig_bvci), testcasename(), 16);
|
||||
f_cleanup();
|
||||
}
|
||||
|
||||
/* Rejected PS-PAGING on SIG-BVC for BVCI (one cell) using IMSI only (no P-TMSI allocated) */
|
||||
testcase TC_paging_ps_reject_sig_bvci_imsi() runs on test_CT {
|
||||
f_init();
|
||||
f_start_handlers(refers(f_TC_paging_ps_reject_sig_bvci), testcasename(), 16, have_ptmsi:=false);
|
||||
f_cleanup();
|
||||
}
|
||||
|
||||
/* PS-PAGING on SIG-BVC for unknown BVCI */
|
||||
private function f_TC_paging_ps_sig_bvci_unknown(charstring id) runs on BSSGP_ConnHdlr
|
||||
{
|
||||
|
@ -2482,6 +2571,8 @@ control {
|
|||
execute( TC_paging_ps_ptp_bvci() );
|
||||
execute( TC_paging_ps_ptp_bvci_imsi() );
|
||||
execute( TC_paging_ps_ptp_bvci_unknown() );
|
||||
execute( TC_paging_ps_reject_ptp_bvci() );
|
||||
execute( TC_paging_ps_reject_ptp_bvci_imsi() );
|
||||
|
||||
/* PAGING-PS over SIG BVC */
|
||||
execute( TC_paging_ps_sig_bss() );
|
||||
|
@ -2492,6 +2583,8 @@ control {
|
|||
execute( TC_paging_ps_sig_bvci() );
|
||||
execute( TC_paging_ps_sig_bvci_imsi() );
|
||||
execute( TC_paging_ps_sig_bvci_unknown() );
|
||||
execute( TC_paging_ps_reject_sig_bvci() );
|
||||
execute( TC_paging_ps_reject_sig_bvci_imsi() );
|
||||
|
||||
/* PAGING-CS over PTP BVC */
|
||||
execute( TC_paging_cs_ptp_bss() );
|
||||
|
|
Loading…
Reference in New Issue