gbproxy: Generalize as_count_bvc_block() into as_count_bvc_sts()

... and while add it, add as_count_bvc_unblock() based on it.

Related: OS#4968
Change-Id: I33ceace527d6a0cd816fb4e042fdcffd8f0dd23f
This commit is contained in:
Harald Welte 2021-03-30 12:16:36 +02:00
parent c771bfbe36
commit b1cc0b24d3
1 changed files with 14 additions and 2 deletions

View File

@ -2521,14 +2521,26 @@ testcase TC_bvc_reset_ptp_from_bss() runs on test_CT
f_cleanup();
}
private altstep as_count_bvc_block(integer sgsn_idx, BssgpBvci bvci, inout roro_integer roroi)
private altstep as_count_bvc_sts(integer sgsn_idx, BssgpBvci bvci,
template (present) BvcState exp_bvc_state, inout roro_integer roroi)
runs on test_CT {
var BSSGP_BVC_CT sgsn_bvc_ct := f_get_sgsn_bvc_ct(sgsn_idx, bvci);
[] SGSN_MGMT.receive(tr_BssgpStsInd(?, bvci, BVC_S_BLOCKED)) from sgsn_bvc_ct {
[] SGSN_MGMT.receive(tr_BssgpStsInd(?, bvci, exp_bvc_state)) from sgsn_bvc_ct {
roroi[sgsn_idx] := roroi[sgsn_idx] & { bvci };
repeat;
}
}
private altstep as_count_bvc_block(integer sgsn_idx, BssgpBvci bvci, inout roro_integer roroi)
runs on test_CT {
[] as_count_bvc_sts(sgsn_idx, bvci, BVC_S_BLOCKED, roroi);
}
private altstep as_count_bvc_unblock(integer sgsn_idx, BssgpBvci bvci, inout roro_integer roroi)
runs on test_CT {
[] as_count_bvc_sts(sgsn_idx, bvci, BVC_S_UNBLOCKED, roroi);
}
/* reset the signaling BVC from one BSS; expect no signaling BVC reset on SGSN; but BVC-BLOCK for PTP */
testcase TC_bvc_reset_sig_from_bss() runs on test_CT {