Attention is currently required from: pespin. neels has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/37189?usp=email ) Change subject: Osmocom_CTRL: counters: return -1 for absent objects ...................................................................... Patch Set 1: (1 comment) Patchset: PS1:
imho f_ctrl_get_ratectr_abs() is conceived to be used when a rate ctr should be obtained, and fail o […] I thought about that actually.
- Our tests currently pass, hence this patch affects no callers at all. (any absent object would currently setverdict(fail) unconditionally) - Future tests implicitly expect counters >= 0, and would fail if they get -1 instead, simply by verifying the expected counters as we already do. - If a test tests for a before-after diff of a counter, it will get unexpected diff values when a counter returns -1. (One corner case is expecting that a counter diff remains zero, which should always also have a phase of the test where the same counter increments; one of these phases will fail on an absent object.) So, no additional code needed to handle -1 return values, in all practical situations. That is why I did not continue to carry the on_error param further out to f_ctrl_get_ratectr_abs(). -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/37189?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: Id00bbfe721d453e5f551e6d47e1b1d03d219700b Gerrit-Change-Number: 37189 Gerrit-PatchSet: 1 Gerrit-Owner: neels <nhofmeyr@sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge@osmocom.org> Gerrit-CC: pespin <pespin@sysmocom.de> Gerrit-Attention: pespin <pespin@sysmocom.de> Gerrit-Comment-Date: Wed, 12 Jun 2024 02:55:17 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: pespin <pespin@sysmocom.de> Gerrit-MessageType: comment