fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36469?usp=email )
Change subject: msc: fix missing 'repeat' in as_optional_cc_rel() ......................................................................
msc: fix missing 'repeat' in as_optional_cc_rel()
We do activate() this altstep in several testcases, so that it's kinda "running in background". In reality, the defaults in TTCN-3 are just a syntax suggar, and the following code:
``` var default foo := activate(as_foo_bar()); alt { [] PORT1.receive(tr_Msg1) { repeat; } [] PORT1.receive(tr_Msg2) { setverdict(pass); } } PORT2.receive(tr_Msg3); ```
actually evaluates to:
``` alt { [] PORT1.receive(tr_Msg1) { repeat; } [] PORT1.receive(tr_Msg2) { setverdict(pass); } [] as_foo_bar(); }
alt { [] PORT2.receive(tr_Msg3); [] as_foo_bar(); } ```
If as_foo_bar() contains no 'repeat' statement, then whenever it triggers it would efficiently cancel (unblock) the current alt statement, resulting in weird behavior due to messages not being dequeued from ports as expected. And this is exactly what we saw happening in OS#6414.
Change-Id: I0143b4d33b1ebe4cce99c09018540524c4626eec Related: OS#6414 --- M msc/MSC_Tests.ttcn 1 file changed, 45 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/69/36469/1
diff --git a/msc/MSC_Tests.ttcn b/msc/MSC_Tests.ttcn index 2b5af7c..7e8f467 100644 --- a/msc/MSC_Tests.ttcn +++ b/msc/MSC_Tests.ttcn @@ -187,6 +187,7 @@ } BSSAP.send(ts_PDU_DTAP_MO(ts_ML3_MO_CC_REL_COMPL(cpars.transaction_id, tid_remote))); } + repeat; } }