Change in osmo-ttcn3-hacks[master]: gbproxy: Improve NSEI/... numbering and improve paging test coverage

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
Mon Dec 7 13:06:06 UTC 2020


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

Change subject: gbproxy: Improve NSEI/... numbering and improve paging test coverage
......................................................................

gbproxy: Improve NSEI/... numbering and improve paging test coverage

With this setup we can and do now test:
* Paging a LAI on BVC0 is sent once per matching NSE
* Paging a LAI on BVC0 is sent to multiple different matching NSE
* Paging a RA ID on BVC0 is sent once per matching NSE
* Paging a RA ID on BVC0 is sent to multiple different matching NSE

Change-Id: I698a932b3dc78c776e9350283109463bcdc40e6b
Related: SYS#5226
---
M gbproxy/GBProxy_Tests.fr.cfg
M gbproxy/GBProxy_Tests.ttcn
M gbproxy/osmo-gbproxy.fr.cfg
3 files changed, 147 insertions(+), 48 deletions(-)

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



diff --git a/gbproxy/GBProxy_Tests.fr.cfg b/gbproxy/GBProxy_Tests.fr.cfg
index 9b31dfd..7b63125 100644
--- a/gbproxy/GBProxy_Tests.fr.cfg
+++ b/gbproxy/GBProxy_Tests.fr.cfg
@@ -20,7 +20,7 @@
 
 GBProxy_Tests.mp_nsconfig_pcu := {
 	{
-		nsei := 1,
+		nsei := 2001,
 		role_sgsn := false,
 		handle_sns := false,
 		nsvc := {
@@ -58,30 +58,56 @@
 				nsvci := 4
 			}
 		}
-	}
-}
-GBProxy_Tests.mp_gbconfigs := {
-		{
-			nsei := 1,
-			sgsn_role := false,
-			bvc := {
-				{
-					bvci := 196,
-					cell_id := {
-						ra_id := {
-							lai := {
-								mcc_mnc := '262F42'H,
-								lac := 13135
-							},
-							rac := 0
-						},
-						cell_id := 20960
-					},
-					depth := BSSGP_DECODE_DEPTH_BSSGP
-				}
+	},
+	{
+		nsei := 2002,
+		role_sgsn := false,
+		handle_sns := false,
+		nsvc := {
+			{
+				provider := {
+					fr := {
+						netdev := "hdlc5",
+						dlci := 20
+					}
+				},
+				nsvci := 5
+			}, {
+				provider := {
+					fr := {
+						netdev := "hdlc6",
+						dlci := 21
+					}
+				},
+				nsvci := 6
 			}
 		}
-	};
+	},
+	{
+		nsei := 2003,
+		role_sgsn := false,
+		handle_sns := false,
+		nsvc := {
+			{
+				provider := {
+					fr := {
+						netdev := "hdlc7",
+						dlci := 22
+					}
+				},
+				nsvci := 7
+			}, {
+				provider := {
+					fr := {
+						netdev := "hdlc8",
+						dlci := 23
+					}
+				},
+				nsvci := 8
+			}
+		}
+	}
+}
 
 [MAIN_CONTROLLER]
 
diff --git a/gbproxy/GBProxy_Tests.ttcn b/gbproxy/GBProxy_Tests.ttcn
index 2233ece..1430af0 100644
--- a/gbproxy/GBProxy_Tests.ttcn
+++ b/gbproxy/GBProxy_Tests.ttcn
@@ -44,7 +44,7 @@
 const integer max_fr_info_size := 1600;
 
 modulepar {
-	/* IP/port on which we run our internal GSUP/HLR emulation */
+	/* SGSN NS configuration */
 	NSConfigurations mp_nsconfig_sgsn := {
 		{
 			nsei := 101,
@@ -66,9 +66,12 @@
 			}
 		}
 	};
+	/* BSS NSEI start at 2000 + x
+	 * NSVCI start from value of NSEI + 100
+	 * UDP port is NSVCI * 10 */
 	NSConfigurations mp_nsconfig_pcu := {
 		{
-			nsei := 96,
+			nsei := 2001,
 			role_sgsn := false,
 			handle_sns := false,
 			nsvc := {
@@ -82,12 +85,12 @@
 							remote_ip := "127.0.0.1"
 						}
 					},
-					nsvci := 97
+					nsvci := 2101
 				}
 			}
 		},
 		{
-			nsei := 97,
+			nsei := 2002,
 			role_sgsn := false,
 			handle_sns := false,
 			nsvc := {
@@ -95,18 +98,18 @@
 					provider := {
 						ip := {
 							address_family := AF_INET,
-							local_udp_port := 21011,
+							local_udp_port := 21020,
 							local_ip := "127.0.0.1",
 							remote_udp_port := 23000,
 							remote_ip := "127.0.0.1"
 						}
 					},
-					nsvci := 98
+					nsvci := 2102
 				}
 			}
 		},
 		{
-			nsei := 98,
+			nsei := 2003,
 			role_sgsn := false,
 			handle_sns := false,
 			nsvc := {
@@ -114,24 +117,33 @@
 					provider := {
 						ip := {
 							address_family := AF_INET,
-							local_udp_port := 21012,
+							local_udp_port := 21030,
 							local_ip := "127.0.0.1",
 							remote_udp_port := 23000,
 							remote_ip := "127.0.0.1"
 						}
 					},
-					nsvci := 99
+					nsvci := 2103
 				}
 			}
 		}
 	};
+	/* BVCI are NSEI*10 + x
+	 * The first NSE only has one BVC, the second one 2 and so on
+	 * The Cell ID is BVCI + 10000
+	 * LAC/RAC are configured in such a way that:
+	 * LAC 13135 is present once in NSE(2001), twice in NSE(2002) and once in NSE(2003)
+	 * LAC 13300 is present twice in NSE(2003)
+	 * RAI 13135-1 is present in NSE(2002) and NSE(2003)
+	 * RAI 13300-0 is present twice in NSE(2003)
+	 */
 	BssgpConfigs mp_gbconfigs := {
 		{
-			nsei := 96,
+			nsei := 2001,
 			sgsn_role := false,
 			bvc := {
 				{
-					bvci := 196,
+					bvci := 20011,
 					cell_id := {
 						ra_id := {
 							lai := {
@@ -140,18 +152,18 @@
 							},
 							rac := 0
 						},
-						cell_id := 20960
+						cell_id := 30011
 					},
 					depth := BSSGP_DECODE_DEPTH_BSSGP,
 					create_cb := refers(BSSGP_Emulation.DefaultCreateCallback)
 				}
 			}
 		}, {
-			nsei := 97,
+			nsei := 2002,
 			sgsn_role := false,
 			bvc := {
 				{
-					bvci := 210,
+					bvci := 20021,
 					cell_id := {
 						ra_id := {
 							lai := {
@@ -160,18 +172,48 @@
 							},
 							rac := 1
 						},
-						cell_id := 20961
+						cell_id := 30021
+					},
+					depth := BSSGP_DECODE_DEPTH_BSSGP,
+					create_cb := refers(BSSGP_Emulation.DefaultCreateCallback)
+				},
+				{
+					bvci := 20022,
+					cell_id := {
+						ra_id := {
+							lai := {
+								mcc_mnc := c_mcc_mnc,
+								lac := 13135
+							},
+							rac := 2
+						},
+						cell_id := 30022
 					},
 					depth := BSSGP_DECODE_DEPTH_BSSGP,
 					create_cb := refers(BSSGP_Emulation.DefaultCreateCallback)
 				}
 			}
 		}, {
-			nsei := 98,
+			nsei := 2003,
 			sgsn_role := false,
 			bvc := {
 				{
-					bvci := 220,
+					bvci := 20031,
+					cell_id := {
+						ra_id := {
+							lai := {
+								mcc_mnc := c_mcc_mnc,
+								lac := 13135
+							},
+							rac := 1
+						},
+						cell_id := 30031
+					},
+					depth := BSSGP_DECODE_DEPTH_BSSGP,
+					create_cb := refers(BSSGP_Emulation.DefaultCreateCallback)
+				},
+				{
+					bvci := 20032,
 					cell_id := {
 						ra_id := {
 							lai := {
@@ -180,7 +222,22 @@
 							},
 							rac := 0
 						},
-						cell_id := 20962
+						cell_id := 30032
+					},
+					depth := BSSGP_DECODE_DEPTH_BSSGP,
+					create_cb := refers(BSSGP_Emulation.DefaultCreateCallback)
+				},
+				{
+					bvci := 20033,
+					cell_id := {
+						ra_id := {
+							lai := {
+								mcc_mnc := c_mcc_mnc,
+								lac := 13300
+							},
+							rac := 0
+						},
+						cell_id := 30033
 					},
 					depth := BSSGP_DECODE_DEPTH_BSSGP,
 					create_cb := refers(BSSGP_Emulation.DefaultCreateCallback)
@@ -1354,8 +1411,13 @@
 /* PS-PAGING on SIG-BVC for Location Area */
 private function f_TC_paging_ps_sig_lac(charstring id) runs on BSSGP_ConnHdlr
 {
-	/* Both PCU index 0 and 1 have a BVC within the LAC */
-	f_send_paging_ps_exp_multi(ts_BssgpP4LAC(pcu_bvc_cfg[0].cell_id.ra_id.lai), 0, {0, 1});
+	/* The first LAC (13135) is shared by all three NSEs */
+	f_send_paging_ps_exp_multi(ts_BssgpP4LAC(pcu_bvc_cfg[0].cell_id.ra_id.lai), 0, {0, 1, 2});
+	/* Reset state */
+	g_roi := {};
+	/* Make LAC (13300) available on pcu index 2 */
+	f_connect_to_pcu_bvc(port_idx := 2, nse_idx := 2, bvc_idx := 1);
+	f_send_paging_ps_exp_multi(ts_BssgpP4LAC(pcu_bvc_cfg[2].cell_id.ra_id.lai), 0, {2});
 }
 testcase TC_paging_ps_sig_lac() runs on test_CT {
 	var BSSGP_ConnHdlr vc_conn;
@@ -1389,8 +1451,15 @@
 /* PS-PAGING on SIG-BVC for Routeing Area */
 private function f_TC_paging_ps_sig_rac(charstring id) runs on BSSGP_ConnHdlr
 {
-	/* Only PCU index 0 has a matching BVC within the LAC */
+	/* Only PCU index 0 has a matching BVC with the RA ID */
 	f_send_paging_ps_exp_multi(ts_BssgpP4RAC(pcu_bvc_cfg[0].cell_id.ra_id), 0, {0});
+	g_roi := {};
+	/* PCU index 1 and 2 have a matching BVC with the RA ID */
+	f_send_paging_ps_exp_multi(ts_BssgpP4RAC(pcu_bvc_cfg[2].cell_id.ra_id), 0, {1, 2});
+	g_roi := {};
+	/* PCU index 2 has two matching BVCs with the RA ID */
+	f_connect_to_pcu_bvc(port_idx := 2, nse_idx := 2, bvc_idx := 1);
+	f_send_paging_ps_exp_multi(ts_BssgpP4RAC(pcu_bvc_cfg[2].cell_id.ra_id), 0, {2});
 }
 testcase TC_paging_ps_sig_rac() runs on test_CT {
 	var BSSGP_ConnHdlr vc_conn;
diff --git a/gbproxy/osmo-gbproxy.fr.cfg b/gbproxy/osmo-gbproxy.fr.cfg
index 5c5644b..dd73b71 100644
--- a/gbproxy/osmo-gbproxy.fr.cfg
+++ b/gbproxy/osmo-gbproxy.fr.cfg
@@ -24,10 +24,14 @@
  encapsulation udp local-port 23000
  encapsulation framerelay-gre enabled 0
 
- nse 1 nsvci 1 frnet hdlcnet1 dlci 16
- nse 1 nsvci 2 frnet hdlcnet2 dlci 17
- nse 1 nsvci 3 frnet hdlcnet3 dlci 18
- nse 1 nsvci 4 frnet hdlcnet4 dlci 19
+ nse 2001 nsvci 1 frnet hdlcnet1 dlci 16
+ nse 2001 nsvci 2 frnet hdlcnet2 dlci 17
+ nse 2001 nsvci 3 frnet hdlcnet3 dlci 18
+ nse 2001 nsvci 4 frnet hdlcnet4 dlci 19
+ nse 2002 nsvci 5 frnet hdlcnet5 dlci 20
+ nse 2002 nsvci 6 frnet hdlcnet6 dlci 21
+ nse 2003 nsvci 7 frnet hdlcnet7 dlci 22
+ nse 2003 nsvci 8 frnet hdlcnet8 dlci 23
 
 gbproxy
  sgsn nsei 101

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/21420
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: I698a932b3dc78c776e9350283109463bcdc40e6b
Gerrit-Change-Number: 21420
Gerrit-PatchSet: 7
Gerrit-Owner: daniel <dwillmann at sysmocom.de>
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/20201207/fdf7da07/attachment.htm>


More information about the gerrit-log mailing list