Change in osmo-ttcn3-hacks[master]: pgw: Add TC_createSession_ping4_256 to test 256 parallel sessions

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
Tue Apr 21 21:02:17 UTC 2020


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

Change subject: pgw: Add TC_createSession_ping4_256 to test 256 parallel sessions
......................................................................

pgw: Add TC_createSession_ping4_256 to test 256 parallel sessions

Change-Id: I38cfaddfb60952f17846fbf87b1a29c32e646438
---
M pgw/PGW_Tests.ttcn
1 file changed, 38 insertions(+), 0 deletions(-)

Approvals:
  Jenkins Builder: Verified
  laforge: Looks good to me, approved



diff --git a/pgw/PGW_Tests.ttcn b/pgw/PGW_Tests.ttcn
index cf3b901..c99302c 100644
--- a/pgw/PGW_Tests.ttcn
+++ b/pgw/PGW_Tests.ttcn
@@ -126,6 +126,26 @@
 	fn.apply();
 }
 
+private function f_concat_pad(integer tot_len, hexstring prefix, integer suffix) return hexstring {
+	var integer suffix_len := tot_len - lengthof(prefix);
+	var charstring suffix_ch := int2str(suffix);
+	var integer pad_len := suffix_len - lengthof(suffix_ch);
+
+	return prefix & int2hex(0, pad_len) & str2hex(suffix_ch);
+}
+
+function f_gen_imei(integer suffix) return hexstring {
+	return f_concat_pad(14, '49999'H, suffix);
+}
+
+function f_gen_imsi(integer suffix) return hexstring {
+	return f_concat_pad(15, '26242'H, suffix);
+}
+
+function f_gen_msisdn(integer suffix) return hexstring {
+	return f_concat_pad(12, '49123'H, suffix);
+}
+
 
 /* find TEID of given interface type (and optionally instance) */
 private function f_find_teid(FullyQualifiedTEID_List list,
@@ -385,6 +405,23 @@
 	vc_conn := f_start_handler(refers(f_TC_createSession_ping4), pars);
 	vc_conn.done;
 }
+testcase TC_createSession_ping4_256() runs on PGW_Test_CT {
+	var PGW_Session_CT vc_conn[256];
+	var integer i;
+
+	f_init();
+
+	for (i := 0; i < sizeof(vc_conn); i:=i+1) {
+		var charstring tundev := "ping" & int2str(i);
+		var SessionPars pars := valueof(t_SessionPars(f_gen_imsi(i), tundev));
+		vc_conn[i] := f_start_handler(refers(f_TC_createSession_ping4), pars);
+	}
+
+	for (i := 0; i < lengthof(vc_conn); i:=i+1) {
+		vc_conn[i].done;
+	}
+}
+
 
 /* create a session, then delete it again */
 private function f_TC_createSession_deleteSession() runs on PGW_Session_CT {
@@ -422,6 +459,7 @@
 	execute( TC_tx_echo() );
 	execute( TC_createSession() );
 	execute( TC_createSession_ping4() );
+	execute( TC_createSession_ping4_256() );
 	execute( TC_createSession_deleteSession() );
 	execute( TC_deleteSession_unknown() );
 }

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17927
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: I38cfaddfb60952f17846fbf87b1a29c32e646438
Gerrit-Change-Number: 17927
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge at osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200421/a79fc734/attachment.htm>


More information about the gerrit-log mailing list