sgsn: Allow f_gtpu_xceive_mt() to verify non-forwarding case
In some scenarios we do not expect a PDU from GTP to show up on the Gb side. Let's add support for this. Change-Id: Ia9fde1d433657c920ee1ec4d41004f4544ceb346 Related: OS#4616
This commit is contained in:
parent
f2f3c9bf79
commit
a5c71cdefe
|
@ -1506,15 +1506,26 @@ template (value) PDU_SN ts_SN_UD(BIT4 nsapi, octetstring payload) := {
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Transceive given 'payload' as MT message from GTP -> OsmoSGSN -> Gb */
|
/* Transceive given 'payload' as MT message from GTP -> OsmoSGSN -> Gb */
|
||||||
private function f_gtpu_xceive_mt(inout PdpActPars apars, octetstring payload, integer ran_index := 0)
|
private function f_gtpu_xceive_mt(inout PdpActPars apars, octetstring payload, integer ran_index := 0, boolean expect_fwd := true)
|
||||||
runs on BSSGP_ConnHdlr {
|
runs on BSSGP_ConnHdlr {
|
||||||
|
timer T := 5.0;
|
||||||
/* Send PDU via GTP from our simulated GGSN to the SGSN */
|
/* Send PDU via GTP from our simulated GGSN to the SGSN */
|
||||||
f_gtpu_send(apars, payload);
|
f_gtpu_send(apars, payload);
|
||||||
|
T.start;
|
||||||
/* Expect PDU via BSSGP/LLC on simulated PCU from SGSN */
|
/* Expect PDU via BSSGP/LLC on simulated PCU from SGSN */
|
||||||
alt {
|
alt {
|
||||||
[] as_xid(apars, ran_index);
|
[] as_xid(apars, ran_index);
|
||||||
//[] BSSGP[ran_index].receive(tr_BD_SNDCP(apars.sapi, tr_SN_UD(apars.nsapi, payload)));
|
//[] BSSGP[ran_index].receive(tr_BD_SNDCP(apars.sapi, tr_SN_UD(apars.nsapi, payload)));
|
||||||
[] BSSGP[ran_index].receive(tr_SN_UD(apars.nsapi, payload));
|
[expect_fwd] BSSGP[ran_index].receive(tr_SN_UD(apars.nsapi, payload));
|
||||||
|
[expect_fwd] T.timeout {
|
||||||
|
setverdict(fail, "Timeout waiting for GTP-U to appear on BSSGP");
|
||||||
|
mtc.stop;
|
||||||
|
}
|
||||||
|
[not expect_fwd] BSSGP[ran_index].receive(tr_SN_UD(apars.nsapi, payload)) {
|
||||||
|
setverdict(fail, "GTP-U forwarded to BSSGP but not expected")
|
||||||
|
mtc.stop;
|
||||||
|
}
|
||||||
|
[not expect_fwd] T.timeout {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue