[PATCH] osmo-ttcn3-hacks[master]: L1CTL: make sure to self.stop in all setverdict(fail) cases

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:07:42 UTC 2018


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

L1CTL: make sure to self.stop in all setverdict(fail) cases

Change-Id: I2013a8ec0641d8ef935e6615c1bde599f42db260
---
M library/L1CTL_PortType.ttcn
M library/L1CTL_Types.ttcn
2 files changed, 44 insertions(+), 15 deletions(-)


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

diff --git a/library/L1CTL_PortType.ttcn b/library/L1CTL_PortType.ttcn
index 40a4c75..6c4fe70 100644
--- a/library/L1CTL_PortType.ttcn
+++ b/library/L1CTL_PortType.ttcn
@@ -34,7 +34,7 @@
 	}
 
 	function f_L1CTL_FBSB(L1CTL_PT pt, Arfcn arfcn, L1ctlCcchMode ccch_mode := CCCH_MODE_COMBINED) {
-		timer T := 5.0;
+		timer T := 15.0;
 		for (var integer i := 0; i < 10; i := i+1) {
 			pt.send(ts_L1CTL_FBSB_REQ(arfcn, valueof(t_L1CTL_FBSB_F_ALL), 0, ccch_mode, 57));
 			T.start
@@ -45,11 +45,27 @@
 				self.stop;
 				};
 			[] pt.receive(tr_L1CTL_FBSB_CONF(?)) {
-				pt.send(t_L1ctlResetReq(L1CTL_RES_T_FULL));
-				pt.receive;
+				f_sleep(1.0);
 				}
 			[] pt.receive { repeat; };
-			[] T.timeout { setverdict(fail, "Timeout in FBSB") };
+			[] T.timeout {
+				setverdict(fail, "Timeout in FBSB") 
+				self.stop;
+				};
+			}
+		}
+	}
+
+	function f_L1CTL_CCCH_MODE(L1CTL_PT pt, L1ctlCcchMode ccch_mode) {
+		timer T := 2.0;
+		pt.send(ts_L1CTL_CCCH_MODE_REQ(ccch_mode));
+		T.start;
+		alt {
+		[] pt.receive(tr_L1CTL_CCCH_MODE_CONF) { }
+		[] pt.receive { repeat; }
+		[] T.timeout {
+			setverdict(fail, "Timeout in CCH_MODE");
+			self.stop;
 			}
 		}
 	}
@@ -63,7 +79,10 @@
 		alt {
 			[] pt.receive(tr_L1CTL_RACH_CONF) -> value rc { fn := rc.dl_info.frame_nr };
 			[] pt.receive { repeat; };
-			[] T.timeout { setverdict(fail, "Timeout in RACH") };
+			[] T.timeout {
+				setverdict(fail, "Timeout in RACH");
+				self.stop;
+				}
 		}
 		return fn;
 	}
@@ -88,7 +107,10 @@
 				}
 			};
 			[] pt.receive { repeat };
-			[] T.timeout { setverdict(fail, "Timeout waiting for IMM ASS") };
+			[] T.timeout {
+				setverdict(fail, "Timeout waiting for IMM ASS");
+				self.stop;
+				}
 		}
 		T.stop;
 		return rr.payload.imm_ass;
@@ -110,7 +132,10 @@
 				}
 			};
 			[] pt.receive { repeat };
-			[] T.timeout { setverdict(fail, "Timeout waiting for IMM ASS") };
+			[] T.timeout {
+				setverdict(fail, "Timeout waiting for IMM ASS");
+				self.stop;
+				}
 		}
 		T.stop;
 		return rr.payload.imm_ass;
@@ -123,7 +148,10 @@
 		alt {
 			[] pt.receive(tr_L1CTL_TBF_CFG_CONF(is_uplink)) {}
 			[] pt.receive { repeat };
-			[] T.timeout { setverdict(fail, "Timeout waiting for TBF-CFG.conf") };
+			[] T.timeout {
+				setverdict(fail, "Timeout waiting for TBF-CFG.conf");
+				self.stop;
+				};
 		}
 		T.stop;
 	}
@@ -140,7 +168,7 @@
 		pt.receive(L1CTL_connect_result:{result_code := SUCCESS, err:=omit});
 		f_L1CTL_setGetMsgLen(pt, 0, vl_f, {});
 
-		pt.send(t_L1ctlResetReq(L1CTL_RES_T_SCHED));
+		pt.send(t_L1ctlResetReq(L1CTL_RES_T_FULL));
 		pt.receive;
 	}
 
diff --git a/library/L1CTL_Types.ttcn b/library/L1CTL_Types.ttcn
index 34650d0..814e7df 100644
--- a/library/L1CTL_Types.ttcn
+++ b/library/L1CTL_Types.ttcn
@@ -437,13 +437,14 @@
 		}
 	};
 
-	template L1ctlUlMessage ts_L1CTL_CCCH_MODE_CONF := {
-		header := ts_L1ctlHeader(L1CTL_CCCH_MODE_CONF),
-		ul_info := omit,
-		ul_info_tbf := omit,
-		ul_info_abs := omit,
+
+	template L1ctlDlMessage tr_L1CTL_MsgType(template L1ctlMsgType msg_type) := {
+		header := tr_L1ctlHeader(msg_type),
+		dl_info := *,
 		payload := ?
-	};
+	}
+
+	template L1ctlDlMessage tr_L1CTL_CCCH_MODE_CONF := tr_L1CTL_MsgType(L1CTL_CCCH_MODE_CONF);
 
 	template L1ctlUlMessage ts_L1CTL_RACH_REQ(uint8_t ra, uint8_t combined, uint16_t offset) := {
 		header := ts_L1ctlHeader(L1CTL_RACH_REQ),

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2013a8ec0641d8ef935e6615c1bde599f42db260
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