Browse Source

ran emulation: allow multiple reset attempts

bsc-nat introduces a delay that will lead to failed tests, since the
reset attempt happens too early and times out, and the tests do not
retry.

Change-Id: I9f6db2a24e984eef31e76f9d42a80eb6a1bb6928
changes/02/27602/3
Eric Wild 4 months ago committed by laforge
parent
commit
49888a65dc
  1. 1
      bsc-nat/BSC_MS_ConnectionHandler.ttcn
  2. 1
      bsc-nat/MSC_ConnectionHandler.ttcn
  3. 31
      library/RAN_Emulation.ttcnpp
  4. 1
      msc/BSC_ConnectionHandler.ttcn
  5. 2
      msc/MSC_Tests.ttcn

1
bsc-nat/BSC_MS_ConnectionHandler.ttcn

@ -74,6 +74,7 @@ const RanOps BSC_MS_RanOps := {
protocol := RAN_PROTOCOL_BSSAP,
transport := BSSAP_TRANSPORT_AoIP,
use_osmux := false,
bssap_reset_retries := 1,
sccp_addr_local := omit,
sccp_addr_peer := omit
}

1
bsc-nat/MSC_ConnectionHandler.ttcn

@ -104,6 +104,7 @@ const RanOps MSC_RanOps := {
protocol := RAN_PROTOCOL_BSSAP,
transport := BSSAP_TRANSPORT_AoIP,
use_osmux := false,
bssap_reset_retries := 1,
sccp_addr_local := omit,
sccp_addr_peer := omit
}

31
library/RAN_Emulation.ttcnpp

@ -521,20 +521,28 @@ runs on RAN_Emulation_CT return template PDU_BSSAP {
function f_bssap_reset(SCCP_PAR_Address peer, SCCP_PAR_Address own) runs on RAN_Emulation_CT {
timer T := 5.0;
var boolean append_osmux_support := append_osmux_ie();
var integer attempts := g_ran_ops.bssap_reset_retries;
BSSAP.send(ts_BSSAP_UNITDATA_req(peer, own, ts_BSSMAP_Reset(0, append_osmux_support)));
T.start;
alt {
[] BSSAP.receive(tr_BSSAP_UNITDATA_ind(own, peer, tr_BSSMAP_ResetAck(append_osmux_support))) {
log("BSSMAP: Received RESET-ACK in response to RESET, we're ready to go!");
}
[] as_reset_ack(append_osmux_support);
[] BSSAP.receive { repeat };
[] T.timeout {
setverdict(fail, "BSSMAP: Timeout waiting for RESET-ACK after sending RESET");
mtc.stop;
while (attempts > 0) {
attempts := attempts - 1;
BSSAP.send(ts_BSSAP_UNITDATA_req(peer, own, ts_BSSMAP_Reset(0, append_osmux_support)));
T.start;
alt {
[] BSSAP.receive(tr_BSSAP_UNITDATA_ind(own, peer, tr_BSSMAP_ResetAck(append_osmux_support))) {
log("BSSMAP: Received RESET-ACK in response to RESET, we're ready to go!");
return;
}
[] as_reset_ack(append_osmux_support);
[] BSSAP.receive { repeat };
[] T.timeout {
continue;
}
}
}
setverdict(fail, "BSSMAP: Timeout waiting for RESET-ACK after sending RESET");
mtc.stop;
}
private function f_bssap_l3_is_rr(PDU_BSSAP bssap) return boolean {
@ -713,6 +721,7 @@ type record RanOps {
RanProtocol protocol,
RAN_Transport transport,
boolean use_osmux,
integer bssap_reset_retries,
/* needed for performing BSSMAP RESET */
SCCP_PAR_Address sccp_addr_local optional,
SCCP_PAR_Address sccp_addr_peer optional

1
msc/BSC_ConnectionHandler.ttcn

@ -260,6 +260,7 @@ const RanOps BSC_RanOps := {
protocol := RAN_PROTOCOL_BSSAP,
transport := BSSAP_TRANSPORT_AoIP,
use_osmux := false,
bssap_reset_retries := 1,
sccp_addr_local := omit,
sccp_addr_peer := omit
}

2
msc/MSC_Tests.ttcn

@ -140,6 +140,7 @@ modulepar {
charstring mp_smpp_password := "osmocom1";
charstring mp_mme_name := "mmec01.mmegi0001.mme.epc.mnc070.mcc901.3gppnetwork.org";
charstring mp_vlr_name := "vlr.example.net";
integer mp_bssap_reset_retries := 1;
RAN_Configurations mp_bssap_cfg := {
{
@ -327,6 +328,7 @@ function f_init(integer num_bsc := 1, boolean sgsap := false, boolean gsup := tr
if (isbound(mp_bssap_cfg[i])) {
var RanOps ranops := BSC_RanOps;
ranops.use_osmux := osmux;
ranops.bssap_reset_retries := mp_bssap_reset_retries;
f_ran_adapter_init(g_bssap[i], mp_bssap_cfg[i], "MSC_Test_" & int2str(i), ranops);
f_ran_adapter_start(g_bssap[i]);
} else {

Loading…
Cancel
Save