fixeria submitted this change.

View Change

Approvals: pespin: Looks good to me, approved Jenkins Builder: Verified osmith: Looks good to me, but someone else must approve
library: fix [T.running] T.timeout alt guards

TIMER.running uses the current time, while TIMER.timeout uses the
snapshot time. If the guard of a [T.running] T.timeout alt branch is
evaluated on each snapshot, it becomes false as soon as T expires, so
the branch can never be selected. Whether this happens depends on
the TITAN version and on where the branch is located:

* up to 11.0.0, guards of plain alt statements were evaluated once
per alt, but guards of altsteps were re-evaluated on each snapshot;
* 11.1.0 changed altsteps to evaluate guards only once per alt as well
(titan.core b16544e09, #747);
* 11.2.0 reverted this after a discussion with the TTCN-3 standard
team, and now guards of both alts and altsteps are re-evaluated on
each snapshot (titan.core 4ca840ba5, #747).

The guard is redundant anyway: the timeout operation on a timer
that is not running simply does not match. Remove it.

Change-Id: I263fe10359dc81e1fcf68690930bad7941ad3174
---
M bts/BTS_Tests.ttcn
M library/BSSGP_Emulation.ttcnpp
M library/NS_Emulation.ttcnpp
3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn
index c9aff76..cd77e3a 100644
--- a/bts/BTS_Tests.ttcn
+++ b/bts/BTS_Tests.ttcn
@@ -2431,7 +2431,7 @@
[] RSL.receive(tr_RSL_MEAS_RES(?)) -> value rsl {
Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, log2str("Received unexpected MEAS RES ", rsl));
}
- [g_Tmeas_exp.running] g_Tmeas_exp.timeout {
+ [] g_Tmeas_exp.timeout {
Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, "Didn't receive expected measurement result")
}
}
diff --git a/library/BSSGP_Emulation.ttcnpp b/library/BSSGP_Emulation.ttcnpp
index d01c7a2..371eecf 100644
--- a/library/BSSGP_Emulation.ttcnpp
+++ b/library/BSSGP_Emulation.ttcnpp
@@ -459,7 +459,7 @@
}
}
}
- [g_T2.running] g_T2.timeout {
+ [] g_T2.timeout {
setverdict(fail, "Timeout waiting for BVC-RESET-ACK on BVCI=0");
BSCP.send(f_BnsUdReq(ts_BSSGP_STATUS(udi.bvci, BSSGP_CAUSE_BVCI_UNKNOWN, udi.bssgp), 0, 0));
g_T2.start;
@@ -1115,10 +1115,10 @@
f_ptp_change_state(BVC_S_BLOCKED);
}
/* Re-transmit BLOCK / UNBLOCK on T1 timeout */
- [g_T1.running and not g_t1_waits_for_block_ack] g_T1.timeout {
+ [not g_t1_waits_for_block_ack] g_T1.timeout {
f_ptp_sendUnblock();
}
- [g_T1.running and g_t1_waits_for_block_ack] g_T1.timeout {
+ [g_t1_waits_for_block_ack] g_T1.timeout {
f_ptp_sendBlock(g_last_block_cause);
}

diff --git a/library/NS_Emulation.ttcnpp b/library/NS_Emulation.ttcnpp
index 0ed022a..d1700f8 100644
--- a/library/NS_Emulation.ttcnpp
+++ b/library/NS_Emulation.ttcnpp
@@ -781,13 +781,13 @@
}

/* transition to DEAD if t_alive times out */
- [Tns_alive.running] Tns_alive.timeout {
+ [] Tns_alive.timeout {
log("Tns-alive expired: changing to DEAD_BLOCKED + starting Tns-test");
f_change_state(NSVC_S_DEAD_BLOCKED);
Tns_test.start;
}

- [Tns_test.running] Tns_test.timeout {
+ [] Tns_test.timeout {
log("Tns-test expired: sending NS-ALIVE");
f_sendAlive();
}

To view, visit change 44066. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-MessageType: merged
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I263fe10359dc81e1fcf68690930bad7941ad3174
Gerrit-Change-Number: 44066
Gerrit-PatchSet: 3
Gerrit-Owner: fixeria <vyanitskiy@sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy@sysmocom.de>
Gerrit-Reviewer: osmith <osmith@sysmocom.de>
Gerrit-Reviewer: pespin <pespin@sysmocom.de>