[PATCH] osmo-ttcn3-hacks[master]: WIP

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

Harald Welte gerrit-no-reply at lists.osmocom.org
Mon Mar 12 14:50:31 UTC 2018


Review at  https://gerrit.osmocom.org/7255

WIP

Change-Id: I47ced343f25841d2b516afd28635f6e69f87568a
---
M bts/BTS_Tests.default
M bts/BTS_Tests.ttcn
M library/LAPDm_Types.ttcn
M library/RSL_Emulation.ttcn
4 files changed, 107 insertions(+), 5 deletions(-)


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

diff --git a/bts/BTS_Tests.default b/bts/BTS_Tests.default
index fa8d0b0..0b27924 100644
--- a/bts/BTS_Tests.default
+++ b/bts/BTS_Tests.default
@@ -1,8 +1,8 @@
 [LOGGING]
-"BTS-Test-RSL-IPA".FileMask := ERROR | WARNING;
-"BTS-Test-RSL".FileMask := ERROR | WARNING;
+//"BTS-Test-RSL-IPA".FileMask := ERROR | WARNING;
+//"BTS-Test-RSL".FileMask := ERROR | WARNING;
 "IPA0-CTRL-IPA".FileMask := ERROR | WARNING;
-mtc.FileMask := LOG_ALL | TTCN_DEBUG | TTCN_MATCHING | DEBUG_ENCDEC;
+mtc.FileMask := LOG_ALL | TTCN_DEBUG | TTCN_MATCHING; // | DEBUG_ENCDEC;
 
 [TESTPORT_PARAMETERS]
 *.BTSVTY.CTRL_MODE := "client"
diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn
index 0faf92d..63f29b6 100644
--- a/bts/BTS_Tests.ttcn
+++ b/bts/BTS_Tests.ttcn
@@ -1283,6 +1283,7 @@
 	f_rsl_chan_deact();
 	f_L1CTL_DM_REL_REQ(L1CTL, g_chan_nr);
 }
+
 testcase TC_meas_res_sign_tchf() runs on test_CT {
 	var ConnHdlr vc_conn;
 	var ConnHdlrPars pars;
@@ -1342,7 +1343,7 @@
 }
 
 
-/* Test if a channel without valid uplink bursts generates RSL CONN FAIL IND */
+/* Test if a channel without valid uplink bursts generates RSL CONN FAIL IND (TS 48.058 4.10) */
 private function f_TC_conn_fail_crit(charstring id) runs on ConnHdlr {
 	f_l1_tune(L1CTL);
 	RSL.clear;
@@ -2604,6 +2605,60 @@
 	setverdict(pass);
 }
 
+/***********************************************************************
+ * LAPDm / RLL related
+ ***********************************************************************/
+
+/* test if SABM on Um triggers EST IND (TS 48.058 3.1) */
+private function f_TC_rll_est_ind() runs on ConnHdlr {
+	//t_LapdmCtrlSABM
+	//L1CTL.send
+}
+testcase TC_rll_est_ind() runs on test_CT {
+	/* FIXME: Test for DCCH/SACCH on SDCCH, TCH/F and TCH/H */
+	/* FIXME: Test for SAPI0 + SAPI3 */
+	/* FIXME: Test that repeated SABM don't lead to repeated EST IND */
+}
+
+/* test if RLL EST REQ trigeres SABM on Um; UA on Um triggers EST CONF (TS 48.058 3.2) */
+testcase TC_rll_est_req() runs on test_CT {
+}
+
+/* test if DISC on Um triggers RLL REL IND (TS 48.058 3.3) */
+testcase TC_rll_rel_ind() runs on test_CT {
+}
+
+/* test if RLL REL REQ triggers DISC on Um; UA/DM triggers RLL REL CONF (TS 48.058 3.4) */
+testcase TC_rll_rel_req() runs on test_CT {
+}
+
+/* test if RLL DATA REQ triggers I-frames on Um (TS 48.058 3.5) */
+testcase TC_rll_data_req() runs on test_CT {
+}
+
+/* test if I-frames on Um trigger RLL DATA IND (TS 48.058 3.6) */
+testcase TC_rll_data_ind() runs on test_CT {
+}
+
+/* test if RLL UNIT DATA REQ triggers UI-frame on Um (TS 48.058 3.7) */
+testcase TC_rll_unit_data_req() runs on test_CT {
+}
+
+
+/* test if UI-frames on Um trigger RLL UNIT DATA IND (TS 48.058 3.8) */
+testcase TC_rll_unit_data_ind() runs on test_CT {
+}
+
+/* test generation of RLL ERR IND based on Um errors (TS 48.058 3.9) */
+/*	protocol error as per 44.006 */
+/*	link layer failure (repetition of I-frame N200 times without ACK */
+/*	repetition of SABM or DISC N200 times without ACK */
+/*	receptiom of SABM in multi-frame established state */
+
+
+
+
+
 
 /* TODO Areas:
 
diff --git a/library/LAPDm_Types.ttcn b/library/LAPDm_Types.ttcn
index 91f55fa..2f5a22c 100644
--- a/library/LAPDm_Types.ttcn
+++ b/library/LAPDm_Types.ttcn
@@ -193,4 +193,51 @@
 	/* automatic decoding to the generic LapdmFrame will not work, you have to call one of the
 	 * type-specific decoder routines above */
 
+	/* SABM frame with L3 payload */
+	template (value) LapdmFrame ts_LAPDm_SABM(LapdmSapi sapi, boolean c_r, boolean p,
+						  octetstring l3) := {
+		ab := {
+			addr := ts_LapdmAddr(sapi, c_r),
+			ctrl := ts_LapdmCtrlSABM(p),
+			len := 0, /* overwritten in encoder */
+			m := true,
+			el := 1,
+			payload := l3
+		}
+	}
+	template LapdmFrame tr_LAPDm_SABM(template LapdmSapi sapi, template boolean c_r,
+					  template boolean p, template octetstring l3) := {
+		ab := {
+			addr := tr_LapdmAddr(sapi, c_r),
+			ctrl := tr_LapdmCtrlSABM(p),
+			len := ?,
+			m := ?,
+			el := 1,
+			payload := l3
+		}
+	}
+
+	template LapdmFrame ts_LAPDm_DISC(LapdmSapi sapi, boolean c_r, boolean p) := {
+		ab := {
+			addr := ts_LapdmAddr(sapi, c_r),
+			ctrl := ts_LapdmCtrlDISC(p),
+			len := 0,
+			m := true,
+			el := 1,
+			payload := ''O
+		}
+	}
+	template LapdmFrame tr_LAPDm_DISC(template LapdmSapi sapi, template boolean c_r,
+					  template boolean p) := {
+		ab := {
+			addr := tr_LapdmAddr(sapi, c_r),
+			ctrl := tr_LapdmCtrlDISC(p),
+			len := ?,
+			m := ?,
+			el := 1,
+			payload := ''O
+		}
+	}
+
+
 } with { encode "RAW"; /*variant "FIELDORDER(msb)" */}
diff --git a/library/RSL_Emulation.ttcn b/library/RSL_Emulation.ttcn
index 635ee42..3eca7b9 100644
--- a/library/RSL_Emulation.ttcn
+++ b/library/RSL_Emulation.ttcn
@@ -374,7 +374,7 @@
 			if (cid != -1) {
 				CLIENT_PT.send(rx_rsl.rsl) to ConnectionTable[cid].comp_ref;
 			} else {
-				setverdict(fail, "RSL for unknown Dchan");
+				//setverdict(fail, "RSL for unknown Dchan");
 			}
 		}
 

-- 
To view, visit https://gerrit.osmocom.org/7255
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I47ced343f25841d2b516afd28635f6e69f87568a
Gerrit-PatchSet: 1
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Owner: Harald Welte <laforge at gnumonks.org>



More information about the gerrit-log mailing list