summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Couzens <lynxis@fe80.eu>2020-12-09 02:19:29 +0100
committerlaforge <laforge@osmocom.org>2020-12-10 15:21:30 +0000
commit2a0ac80fd1114c761f4f9c44dc242d385667b692 (patch)
treed3fee32582c5349c2bd130b74f20ef0ba5c183a4
parent1e21fd40a143518c99be512bbb12a41b3125ddfd (diff)
pcu: SNS: add TC_sns_add_existent
Try to add via SNS an already existent NSVC which should fail. Change-Id: I096bcbe38d82d08a150a2f8e56f6bc02353273a1
-rw-r--r--pcu/PCU_Tests_SNS.ttcn15
1 files changed, 12 insertions, 3 deletions
diff --git a/pcu/PCU_Tests_SNS.ttcn b/pcu/PCU_Tests_SNS.ttcn
index 5c03b94..937e30e 100644
--- a/pcu/PCU_Tests_SNS.ttcn
+++ b/pcu/PCU_Tests_SNS.ttcn
@@ -143,7 +143,7 @@ runs on RAW_NS_CT {
rx := f_ns_exp(tr_SNS_CONFIG_ACK(g_nsconfig[idx].nsei, cause), idx);
}
-function f_outgoing_sns_add(integer idx_add, uint8_t w_sig := 1, uint8_t w_user := 1, integer idx := 0)
+function f_outgoing_sns_add(integer idx_add, uint8_t w_sig := 1, uint8_t w_user := 1, integer idx := 0, template (omit) NsCause cause := omit)
runs on RAW_NS_CT {
log("f_outgoing_sns_add(idx_add=", idx_add, ")");
var PDU_NS rx;
@@ -153,13 +153,13 @@ runs on RAW_NS_CT {
nsvc_cfg.provider.ip.local_udp_port,
w_sig, w_user) };
NSCP[idx].send(t_NS_Send(g_ns_conn_id[idx], ts_SNS_ADD(g_nsconfig[idx].nsei, 23, v4)));
- rx := f_ns_exp(tr_SNS_ACK(g_nsconfig[idx].nsei, 23, omit, v4));
+ rx := f_ns_exp(tr_SNS_ACK(g_nsconfig[idx].nsei, 23, cause, v4));
} else {
var template (omit) IP6_Elements v6 := { ts_SNS_IPv6(nsvc_cfg.provider.ip.local_ip,
nsvc_cfg.provider.ip.local_udp_port,
w_sig, w_user) };
NSCP[idx].send(t_NS_Send(g_ns_conn_id[idx], ts_SNS_ADD(g_nsconfig[idx].nsei, 23, omit, v6)));
- rx := f_ns_exp(tr_SNS_ACK(g_nsconfig[idx].nsei, 23, omit, omit, v6));
+ rx := f_ns_exp(tr_SNS_ACK(g_nsconfig[idx].nsei, 23, cause, omit, v6));
}
}
@@ -420,6 +420,14 @@ testcase TC_sns_add() runs on RAW_Test_CT {
setverdict(pass);
}
+/* Test adding an already present IP endpoint at runtime */
+testcase TC_sns_add_nack() runs on RAW_Test_CT {
+ f_sns_bringup_1c1u();
+
+ f_outgoing_sns_add(idx_add := 0, w_sig := 0, w_user := 1, idx := 0, cause := NS_CAUSE_PROTOCOL_ERROR_UNSPEIFIED);
+ setverdict(pass);
+}
+
/* Test deleting IP endpoints at runtime */
testcase TC_sns_del() runs on RAW_Test_CT {
f_sns_bringup_1c1u();
@@ -473,6 +481,7 @@ control {
execute( TC_sns_1c1u_so_bvc_reset() );
execute( TC_sns_1c1u_so_bvc_reset_too_early() );
execute( TC_sns_add() );
+ execute( TC_sns_add_nack() );
execute( TC_sns_del() );
execute( TC_sns_chg_weight() );