Skip to content
Snippets Groups Projects
Commit 5c784391 authored by Kristof Szabados's avatar Kristof Szabados Committed by Gerrit Code Review
Browse files

Merge "fix: checkstate marked as non-deterministic function invoking during snapshots"

parents bd7509f2 482bfbc2
No related branches found
No related tags found
No related merge requests found
...@@ -630,7 +630,7 @@ namespace Common { ...@@ -630,7 +630,7 @@ namespace Common {
break; break;
case OPTYPE_CHECKSTATE_ANY: // [r1] v2: port or any case OPTYPE_CHECKSTATE_ANY: // [r1] v2: port or any
case OPTYPE_CHECKSTATE_ALL: // [r1] v2: port or all case OPTYPE_CHECKSTATE_ALL: // [r1] v2: port or all
u.expr.v2->chk_expr_immutability(); warning("State of port(s) may change during the actual snapshot.");
break; break;
case OPTYPE_HOSTID: // [v1] case OPTYPE_HOSTID: // [v1]
if (u.expr.v1) u.expr.v1->chk_expr_immutability(); if (u.expr.v1) u.expr.v1->chk_expr_immutability();
......
...@@ -1333,16 +1333,16 @@ module M { ...@@ -1333,16 +1333,16 @@ module M {
testcase T() runs on C { testcase T() runs on C {
timer t := 5.0; t.start; timer t := 5.0; t.start;
alt { alt {
[(p.checkstate("Connected"))] t.timeout {} // OK? [(p.checkstate("Connected"))] t.timeout {} // NOT OK
[(any port.checkstate("Connected"))] t.timeout {} // OK? [(any port.checkstate("Connected"))] t.timeout {} // NOT OK
[(p.checkstate(FS()))] t.timeout {} // NOT OK [(p.checkstate(FS()))] t.timeout {} // NOT OK
[(any port.checkstate(FS()))] t.timeout {} // NOT OK [(any port.checkstate(FS()))] t.timeout {} // NOT OK
} }
} }
} }
<END_MODULE> <END_MODULE>
<RESULT IF_FAIL COUNT 2> <RESULT IF_FAIL COUNT 4>
(?im)\bwarning\b.+?\bFunction invocation\b.+?\bmay change the actual snapshot\b (?im)\bwarning\b.+?\bstate of port\b.+?\bmay change during the actual snapshot\b
<END_RESULT> <END_RESULT>
<END_TC> <END_TC>
:exmp. :exmp.
......
...@@ -149,10 +149,10 @@ module InvokingFunctionFromSpecificPlaces_SW { //^In TTCN-3 module// ...@@ -149,10 +149,10 @@ module InvokingFunctionFromSpecificPlaces_SW { //^In TTCN-3 module//
[t.running] t.timeout {} //^In guard expression// //^warning\: State of timer// [t.running] t.timeout {} //^In guard expression// //^warning\: State of timer//
/* OPTYPE_CHECKSTATE_ANY */ /* OPTYPE_CHECKSTATE_ANY */
[(any port.checkstate("Connected"))] t.timeout {} [(any port.checkstate("Connected"))] t.timeout {} //^In guard expression// //^warning\: State of port//
[(any port.checkstate(fs()))] t.timeout {} //^In guard expression// //^warning\: Function invocation// [(any port.checkstate(fs()))] t.timeout {} //^In guard expression// //^warning\: State of port//
/* OPTYPE_CHECKSTATE_ALL */ /* OPTYPE_CHECKSTATE_ALL */
[(all port.checkstate(fs()))] t.timeout {} //^In guard expression// //^warning\: Function invocation// [(all port.checkstate(fs()))] t.timeout {} //^In guard expression// //^warning\: State of port//
/* OPTYPE_HOSTID */ /* OPTYPE_HOSTID */
[hostid() == ""] t.timeout {} [hostid() == ""] t.timeout {}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment