Change in osmo-ttcn3-hacks[master]: ns: SNS: add testcase to test change_weight retries

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/.

lynxis lazus gerrit-no-reply at lists.osmocom.org
Mon Mar 22 12:17:41 UTC 2021


lynxis lazus has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/23182 )

Change subject: ns: SNS: add testcase to test change_weight retries
......................................................................

ns: SNS: add testcase to test change_weight retries

Change-Id: Ie8d976a81abe0bcff53bb74991d428dbf1fe314b
---
M ns/NS_Tests.ttcn
1 file changed, 43 insertions(+), 0 deletions(-)

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



diff --git a/ns/NS_Tests.ttcn b/ns/NS_Tests.ttcn
index 8182a91..1715b2e 100644
--- a/ns/NS_Tests.ttcn
+++ b/ns/NS_Tests.ttcn
@@ -481,6 +481,48 @@
 	f_clean_ns_codec();
 }
 
+/* receive 3x SNS_CHG_WEIGHT but never answer on it */
+testcase TC_sns_bss_change_weight_timeout() runs on RAW_Test_CT {
+	var integer i := 0;
+	var template PDU_NS rx;
+	var NSVCConfiguration nsvc_cfg;
+
+	f_init_vty();
+	f_init_ns_codec(mp_nsconfig);
+	f_incoming_sns_size();
+	f_incoming_sns_config();
+	f_outgoing_sns_config();
+	activate(as_rx_alive_tx_ack());
+	f_vty_config2(NSVTY, {"ns", "bind udp local"}, "ip-sns signalling-weight 99 data-weight 99");
+
+	nsvc_cfg := g_nsconfig.nsvc[0];
+	if (nsvc_cfg.provider.ip.address_family == AF_INET) {
+		var template IP4_Elements v4_elem := { tr_SNS_IPv4(nsvc_cfg.provider.ip.remote_ip,
+								   nsvc_cfg.provider.ip.remote_udp_port) };
+
+		rx := tr_SNS_CHG_WEIGHT(g_nsconfig.nsei, ?, v4 := v4_elem);
+	} else {
+		var template IP6_Elements v6_elem := { tr_SNS_IPv6(nsvc_cfg.provider.ip.remote_ip,
+								   nsvc_cfg.provider.ip.remote_udp_port) };
+		rx := tr_SNS_CHG_WEIGHT(g_nsconfig.nsei, ?, v4 := omit, v6 := v6_elem);
+	}
+
+	alt {
+	[] NSCP[0].receive(rx) {
+		i := i + 1;
+		if (i < 3) {
+			repeat;
+		}
+	}
+	[] as_rx_alive_tx_ack();
+	}
+
+	f_ns_exp(tr_SNS_SIZE(g_nsconfig.nsei, rst_flag := true, max_nsvcs := 8,
+				   num_v4 := 4, num_v6 := omit), 0);
+	setverdict(pass);
+	f_clean_ns_codec();
+}
+
 control {
 	if (mp_dialect == NS2_DIALECT_STATIC_RESETBLOCK or mp_dialect == NS2_DIALECT_IPACCESS) {
 		execute( TC_tx_reset() );
@@ -527,6 +569,7 @@
 	if (mp_dialect == NS2_DIALECT_SNS) {
 		execute( TC_sns_config_success() );
 		execute( TC_sns_bss_change_weight() );
+		execute( TC_sns_bss_change_weight_timeout() );
 	}
 }
 

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/23182
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: Ie8d976a81abe0bcff53bb74991d428dbf1fe314b
Gerrit-Change-Number: 23182
Gerrit-PatchSet: 2
Gerrit-Owner: lynxis lazus <lynxis at fe80.eu>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-Reviewer: lynxis lazus <lynxis at fe80.eu>
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/20210322/6a036bc7/attachment.htm>


More information about the gerrit-log mailing list