Attention is currently required from: neels.
1 comment:
File sip/SIP_Tests.ttcn:
og("FAIL: expected SIP message ", sip_expect);
setverdict(fail, "Received unexpected SIP message");
I'm not sure that f_shutdown() should always dup the log in addition to setverdict(), it only makes sense for logs that contain a message dump.
IMO, there should be no duplication at all. `log()` is for logging various events happening during the testcase execution, not for indicating the failure reason. There exists `setverdict()` for that purpose.
Maybe f_shutdown() could get args expected_msg and got_msg, and log those only when present.
I don't like this idea. Ideally, `f_shutdown()` should do what its name suggests - shutdown everything. The already existing additional feature for setting the verdict and the respective message by passing optional argument looks ideologically wrong to me. And you're suggesting to overload this function with even more stuff that can be done by calling `setverdict()`.
That would make most sense if ttcn3 could somehow output the exact reason why a msg does not match a template. (So far I just compare manually, or paste into a diff invocation, cumbersome)
This can be achieved by adding `TTCN_MATCHING` to the logging mask in the testcase config file. TITAN would highlight the exact message part(s) which did not match the template. Quite useful.
I confirmed that a message dump in the verdict doesn't get picked up properly by logformat. I pasted below a comparison of 'log("FAIL: foo ", msg)' and 'f_shutdown(..., log2str("foo ", msg))'.
Did you try what I suggested? If the problem is that TITAN does not format the verdict message (set by `setverdict()`) properly, then I believe TITAN needs to be fixed/improved?
To view, visit change 34415. To unsubscribe, or for help writing mail filters, visit settings.