Change in osmo-ttcn3-hacks[master]: pcu: Refactor GPRS infrastructure to keep state and simplify tests

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Vadim Yanitskiy gerrit-no-reply at lists.osmocom.org
Tue May 19 20:23:16 UTC 2020


Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/18370 )

Change subject: pcu: Refactor GPRS infrastructure to keep state and simplify tests
......................................................................


Patch Set 1:

(5 comments)

https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/18370/1/pcu/GPRS_Components.ttcn 
File pcu/GPRS_Components.ttcn:

https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/18370/1/pcu/GPRS_Components.ttcn@104 
PS1, Line 104: /* Support only 1 ms for now */
             : 	var GprsMS g_ms[1];
Does it really make sense to have it here? In all test cases you basically initialize this instance, then copy it to another instance, and never use anymore.


https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/18370/1/pcu/GPRS_Components.ttcn@111 
PS1, Line 111: f_init_gprs_ms
This function looks redundant. Just let test cases evaluate t_GprsMS_def as they need.

  var GprsMS ms := valueof(t_GprsMS_def);
  ms.foo := bar;


https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/18370/1/pcu/GPRS_Components.ttcn@239 
PS1, Line 239: f_ms_set_lqual
This functions is redundant.


https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/18370/1/pcu/GPRS_Components.ttcn@244 
PS1, Line 244: f_ms_set_ta
I am sorry, but it looks like f_sum(a, b) { return a + b } to me.


https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/18370/1/pcu/PCU_Tests.ttcn 
File pcu/PCU_Tests.ttcn:

https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/18370/1/pcu/PCU_Tests.ttcn@268 
PS1, Line 268: f_ms_set_ta(ms, ta);
Do we really need a function for that? Why not just:

  ms.ta := ta;



-- 
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/18370
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: Ib3fee37580f0ea0530a659dec83656799bf57288
Gerrit-Change-Number: 18370
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Vadim Yanitskiy <axilirator at gmail.com>
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-Comment-Date: Tue, 19 May 2020 20:23:16 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200519/9430230d/attachment.htm>


More information about the gerrit-log mailing list