Change in osmo-ttcn3-hacks[master]: pcu: SNS: add TC_sns_add_existent

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

laforge gerrit-no-reply at lists.osmocom.org
Thu Dec 10 15:21:31 UTC 2020


laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/21621 )

Change subject: pcu: SNS: add TC_sns_add_existent
......................................................................

pcu: SNS: add TC_sns_add_existent

Try to add via SNS an already existent NSVC which should
fail.

Change-Id: I096bcbe38d82d08a150a2f8e56f6bc02353273a1
---
M pcu/PCU_Tests_SNS.ttcn
1 file changed, 12 insertions(+), 3 deletions(-)

Approvals:
  laforge: Looks good to me, approved
  pespin: Looks good to me, but someone else must approve
  Jenkins Builder: Verified



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 @@
 	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 @@
 								     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 @@
 	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 @@
 	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() );
 

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/21621
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I096bcbe38d82d08a150a2f8e56f6bc02353273a1
Gerrit-Change-Number: 21621
Gerrit-PatchSet: 2
Gerrit-Owner: lynxis lazus <lynxis at fe80.eu>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann at sysmocom.de>
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20201210/88fe9877/attachment.htm>


More information about the gerrit-log mailing list