Change in osmo-ttcn3-hacks[master]: BTS_Tests: add a test case verifying coding of two NSVCs in INFO.ind

fixeria gerrit-no-reply at lists.osmocom.org
Tue Mar 23 05:54:12 UTC 2021


fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/23462 )


Change subject: BTS_Tests: add a test case verifying coding of two NSVCs in INFO.ind
......................................................................

BTS_Tests: add a test case verifying coding of two NSVCs in INFO.ind

Change-Id: Id11094774d737a545a2cce389059d7e527219573
---
M bts/BTS_Tests.ttcn
1 file changed, 36 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/62/23462/1

diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn
index 2dc6635..33545e1 100644
--- a/bts/BTS_Tests.ttcn
+++ b/bts/BTS_Tests.ttcn
@@ -5761,6 +5761,41 @@
 	setverdict(pass);
 }
 
+/* Verify coding of two NSVCs in the INFO.ind message */
+testcase TC_pcu_socket_two_nsvc() runs on test_CT {
+	f_init_vty_bsc();
+
+	f_vty_config2(BSCVTY, {"network", "bts 0"} , "gprs nsvc 0 nsvci 1234");
+	f_vty_config2(BSCVTY, {"network", "bts 0"} , "gprs nsvc 0 local udp port 1234");
+	f_vty_config2(BSCVTY, {"network", "bts 0"} , "gprs nsvc 0 remote ip 127.127.127.127");
+	f_vty_config2(BSCVTY, {"network", "bts 0"} , "gprs nsvc 0 remote udp port 1234");
+
+	f_vty_config2(BSCVTY, {"network", "bts 0"} , "gprs nsvc 1 nsvci 5678");
+	f_vty_config2(BSCVTY, {"network", "bts 0"} , "gprs nsvc 1 local udp port 5678");
+	f_vty_config2(BSCVTY, {"network", "bts 0"} , "gprs nsvc 1 remote ip fd00::ca:ff:ee");
+	f_vty_config2(BSCVTY, {"network", "bts 0"} , "gprs nsvc 1 remote udp port 5678");
+
+	f_init_with_pcuif();
+
+	var PCUIF_info_ind info_ind := g_pcu_last_info.u.info_ind;
+	var PCUIF_RemoteAddr remote_addr := info_ind.remote_addr;
+	var template PCUIF_RemoteAddr tr_remote_addr := {
+		addr_type := { PCUIF_ADDR_TYPE_IPV4, PCUIF_ADDR_TYPE_IPV6 },
+		addr := { f_inet_addr("127.127.127.127"), f_inet6_addr("fd00::ca:ff:ee") }
+	};
+
+	if (not match(info_ind.nsvci, { 1234, 5678 }))
+		{ setverdict(fail, "NSVCI ", info_ind.nsvci, " does not match { 1234, 5678 }"); }
+	if (not match(remote_addr, tr_remote_addr))
+		{ setverdict(fail, "NSVC address ", remote_addr, " does not match ", tr_remote_addr); }
+	if (not match(info_ind.local_port, { 1234, 5678 }))
+		{ setverdict(fail, "NSVC lport ", info_ind.local_port, " does not match { 1234, 5678 }"); }
+	if (not match(info_ind.remote_port, { 1234, 5678 }))
+		{ setverdict(fail, "NSVC rport ", info_ind.remote_port, " does not match { 1234, 5678 }"); }
+
+	setverdict(pass);
+}
+
 /***********************************************************************
  * Osmocom Style Dynamic Timeslot Support
  ***********************************************************************/
@@ -7353,6 +7388,7 @@
 		execute( TC_pcu_info_ind_fh_params() );
 		execute( TC_pcu_socket_nsvc_ipv4() );
 		execute( TC_pcu_socket_nsvc_ipv6() );
+		execute( TC_pcu_socket_two_nsvc() );
 	} else {
 		log("PCU socket path not available, skipping PCU tests");
 	}

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/23462
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: Id11094774d737a545a2cce389059d7e527219573
Gerrit-Change-Number: 23462
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210323/5a18aada/attachment.htm>


More information about the gerrit-log mailing list