Attention is currently required from: neels.
fixeria has posted comments on this change. (
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/34415?usp=email )
Change subject: sip: tweak failure reporting for SIP messages
......................................................................
Patch Set 3:
(1 comment)
File sip/SIP_Tests.ttcn:
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/34415/comment/e7e11706_2703…
PS1, Line 195: 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
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/34415?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: Id48016657ebb83953fe74f65332f318edf8f75e6
Gerrit-Change-Number: 34415
Gerrit-PatchSet: 3
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Comment-Date: Fri, 15 Sep 2023 18:10:26 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: neels <nhofmeyr(a)sysmocom.de>
Comment-In-Reply-To: laforge <laforge(a)osmocom.org>
Comment-In-Reply-To: fixeria <vyanitskiy(a)sysmocom.de>
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: comment