summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Couzens <lynxis@fe80.eu>2021-02-22 03:00:28 +0100
committerlaforge <laforge@osmocom.org>2021-02-28 10:37:22 +0000
commit025bbc0b6d576474b96b48e1a80d0e22e942a5e6 (patch)
tree847337586bc50dc7ace347b59f6601651b3887ac
parent1491c64114ca3b42ac4844cc78ed7ec51caad970 (diff)
pcu: add TC_sns_so_bvc_reset_unknown_bvciHEADmaster
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
-rw-r--r--pcu/PCU_Tests_SNS.ttcn42
1 files changed, 42 insertions, 0 deletions
diff --git a/pcu/PCU_Tests_SNS.ttcn b/pcu/PCU_Tests_SNS.ttcn
index c4f6b6e..34aec72 100644
--- a/pcu/PCU_Tests_SNS.ttcn
+++ b/pcu/PCU_Tests_SNS.ttcn
@@ -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() );