[S] Change in osmo-ttcn3-hacks[master]: s1gw: make number of eNBs configurable via module params
Attention is currently required from: pespin. fixeria has posted comments on this change by fixeria. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38210?usp=email ) Change subject: s1gw: make number of eNBs configurable via module params ...................................................................... Patch Set 2: (1 comment) File s1gw/S1GW_Tests.ttcn: https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38210/comment/7413a2b1_95564... : PS2, Line 226: vc_conns[i] := f_ConnHdlr_spawn(refers(f_TC_setup_multi), pars); Oh, this is actually my TTCN-3 discovery of the month! Instead of doing `list := list & { item }` every time you want to add something, you can just reference items by index sequentially. And what's more important, it also works for template lists, for which you cannot do `list := list & { item }`.
Sounds weird, given that you could have a lengthof(vc_conns)==4 and then do vc_conns[4543] = ...
It's a good question what happens in this case. I gave this code a try: ``` private type component dummy_CT { }; private type record of integer IntList; testcase TC_record_of_test() runs on dummy_CT { var IntList list; list[0] := 42; list[3] := 43; log(list); } ``` and this is what I got printed: ``` MTC@LEGION: { 42, <unbound>, <unbound>, 43 } ``` so you'll have thousands of unbound values in the middle if you do `vc_conns[4543]`. -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38210?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Ia80b9118e66a5d6721b89d3ba068227d30dcc01f Gerrit-Change-Number: 38210 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria <vyanitskiy@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: Fri, 20 Sep 2024 14:35:42 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: pespin <pespin@sysmocom.de>
participants (1)
-
fixeria