pcu: add TC_sns_so_bvc_reset_unknown_bvci

Do an SGSN originated reset of signalling BVCI,
then do a SGSN originated reset of an unknown BVCI.

PCU  -X SGSN: BVCI  0 BSSGP-RESET (ignores reset)
PCU <-  SGSN: BVCI  0 BSSGP-RESET
PCU  -> SGSN: BVCI  0 BSSGP-RESET-ACK (with cell information)
PCU  -X SGSN: BVCI 23 BSSGP-RESET (ignores reset, 23 is configured on PCU, 24 is not configured)
PCU <-  SGSN: BVCI 24 BSSGP-RESET (unconfigured BVCI)
PCU  -> SGSN: BVCI 24 BSSGP-STATUS Unknown BVCI

Related: OS#3879
Change-Id: Iea5519b453dd544c5a78b3b16ddb5132d20cf67c
This commit is contained in:
Alexander Couzens 2021-02-22 03:00:28 +01:00 committed by laforge
parent 1491c64114
commit 025bbc0b6d
1 changed files with 42 additions and 0 deletions

View File

@ -17,6 +17,7 @@ import from Osmocom_Gb_Types all;
import from NS_Emulation all;
import from NS_Types all;
import from RAW_NS all;
import from BSSGP_Types all;
/**********************************************************************************
* Modern Gb/IP bring-up test cases using IP Sub-Network Service (SNS)
@ -246,6 +247,46 @@ testcase TC_sns_1c1u_so_bvc_reset_too_early() runs on RAW_Test_CT {
f_clean_ns_codec();
}
/* Do an SGSN originated BSSGP-Reset of a not-configured BVCI.
*
* PCU -X SGSN: BVCI 0 BSSGP-RESET (ignores reset)
* PCU <- SGSN: BVCI 0 BSSGP-RESET
* PCU -> SGSN: BVCI 0 BSSGP-RESET-ACK (with cell information)
* PCU -X SGSN: BVCI 23 BSSGP-RESET (ignores reset, 23 is configured on PCU, 24 is not configured)
* PCU <- SGSN: BVCI 24 BSSGP-RESET (unconfigured BVCI)
* PCU -> SGSN: BVCI 24 BSSGP-STATUS Unknown BVCI
*/
testcase TC_sns_so_bvc_reset_unknown_bvci() runs on RAW_Test_CT {
f_init_ns_codec(mp_nsconfig);
f_init_pcuif();
f_incoming_sns_size();
f_incoming_sns_config();
f_outgoing_sns_config();
/* wait for one ALIVE cycle, then ACK any further ALIVE in the background */
as_rx_alive_tx_ack(oneshot := true);
activate(as_rx_alive_tx_ack());
/* Expect BVC-RESET, but ignore it to prevent a race condition of BVC RESETs */
var template PDU_NS pdu := tr_NS_UNITDATA(t_SduCtrlB, 0, decmatch tr_BVC_RESET(?, 0, omit));
f_ns_exp(pdu, idx := 0);
/* SGSN originated BVC-RESET on an uninitialized sign BVC */
f_tx_bvc_reset_rx_ack(0, omit, omit, idx := 0);
/* Expect BVC-RESET PTP BVC, but ignore it to prevent a race condition of BVC RESETs */
pdu := tr_NS_UNITDATA(t_SduCtrlB, 0, decmatch tr_BVC_RESET(?, mp_gb_cfg.bvc[0].bvci, mp_gb_cfg.bvc[0].cell_id));
f_ns_exp(pdu);
/* Send a BVC-RESET on the wrong BVC */
var PDU_BSSGP bssgp_tx := valueof(ts_BVC_RESET(BSSGP_CAUSE_NET_SV_CAP_MOD_GT_ZERO_KBPS, mp_gb_cfg.bvc[0].bvci + 1,
omit));
NSCP[0].send(ts_NS_UNITDATA(t_SduCtrlB, 0, enc_PDU_BSSGP(bssgp_tx)));
NSCP[0].receive(tr_NS_UNITDATA(t_SduCtrlB, 0, decmatch tr_BSSGP_STATUS(mp_gb_cfg.bvc[0].bvci + 1, BSSGP_CAUSE_BVCI_UNKNOWN, *)));
setverdict(pass);
f_clean_ns_codec();
}
/* Test adding new IP endpoints at runtime */
testcase TC_sns_add() runs on RAW_Test_CT {
f_sns_bringup_1c1u();
@ -328,6 +369,7 @@ control {
execute( TC_sns_1c1u_separate() );
execute( TC_sns_1c1u_so_bvc_reset() );
execute( TC_sns_1c1u_so_bvc_reset_too_early() );
execute( TC_sns_so_bvc_reset_unknown_bvci() );
execute( TC_sns_add() );
execute( TC_sns_add_nack() );
execute( TC_sns_del() );