laforge has submitted this change. ( https://gerrit.osmocom.org/c/pysim/+/28870 )
Change subject: Fix printing of SwMatchError after introduction of logical channels
......................................................................
Fix printing of SwMatchError after introduction of logical channels
the interpret_sw() method was moved from RuntimeState to RuntimeLchan
in Change-Id I7aa994b625467d4e46a2edd8123240b930305360 - but the code
in pySim/exceptions.py was not adjusted accordingly.
Change-Id: I0614436c99c6a6ebc22c4dc14fb361c5f5f16686
---
M pySim/exceptions.py
1 file changed, 2 insertions(+), 2 deletions(-)
Approvals:
Jenkins Builder: Verified
fixeria: Looks good to me, but someone else must approve
laforge: Looks good to me, approved
diff --git a/pySim/exceptions.py b/pySim/exceptions.py
index 24aff85..c6a81a1 100644
--- a/pySim/exceptions.py
+++ b/pySim/exceptions.py
@@ -53,8 +53,8 @@
self.rs = rs
def __str__(self):
- if self.rs:
- r = self.rs.interpret_sw(self.sw_actual)
+ if self.rs and self.rs.lchan[0]:
+ r = self.rs.lchan[0].interpret_sw(self.sw_actual)
if r:
return "SW match failed! Expected %s and got %s: %s - %s" % (self.sw_expected, self.sw_actual, r[0], r[1])
return "SW match failed! Expected %s and got %s." % (self.sw_expected, self.sw_actual)
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/28870
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I0614436c99c6a6ebc22c4dc14fb361c5f5f16686
Gerrit-Change-Number: 28870
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-MessageType: merged
laforge has submitted this change. ( https://gerrit.osmocom.org/c/pysim/+/28871 )
Change subject: ts_31_102: Fix terminal_profile, envelope and envelope_sms commands
......................................................................
ts_31_102: Fix terminal_profile, envelope and envelope_sms commands
In commit Ib88bb7d12faaac7d149ee1f6379bc128b83bbdd5 I accidentially
broke those commands by adding argparse definitions for better
documentation. When adding the @cmd2.with_argparser decorator,
the method argument changes from the raw string to an argparse.Namespace
object.
This patch fixes the below exception:
pySIM-shell (MF/ADF.USIM)> terminal_profile ffffffff
Traceback (most recent call last):
File "/usr/local/lib/python3.10/dist-packages/cmd2/cmd2.py", line 2129, in onecmd_plus_hooks
stop = self.onecmd(statement, add_to_history=add_to_history)
File "/usr/local/lib/python3.10/dist-packages/cmd2/cmd2.py", line 2559, in onecmd
stop = func(statement)
File "/usr/local/lib/python3.10/dist-packages/cmd2/decorators.py", line 336, in cmd_wrapper
return func(*args_list, **kwargs)
File "/space/home/laforge/projects/git/pysim/pySim/ts_31_102.py", line 1274, in do_terminal_profile
(data, sw) = self._cmd.card._scc.terminal_profile(arg)
File "/space/home/laforge/projects/git/pysim/pySim/commands.py", line 583, in terminal_profile
data_length = len(payload) // 2
TypeError: object of type 'Namespace' has no len()
Change-Id: Ia861eeb2970627d3ecfd0ca73f75ca571c6885b2
Fixes: Ib88bb7d12faaac7d149ee1f6379bc128b83bbdd5
---
M pySim/ts_31_102.py
1 file changed, 6 insertions(+), 6 deletions(-)
Approvals:
Jenkins Builder: Verified
fixeria: Looks good to me, but someone else must approve
laforge: Looks good to me, approved
diff --git a/pySim/ts_31_102.py b/pySim/ts_31_102.py
index 7850459..02ef005 100644
--- a/pySim/ts_31_102.py
+++ b/pySim/ts_31_102.py
@@ -1264,40 +1264,40 @@
term_prof_parser.add_argument('PROFILE', help='Hexstring of encoded terminal profile')
@cmd2.with_argparser(term_prof_parser)
- def do_terminal_profile(self, arg):
+ def do_terminal_profile(self, opts):
"""Send a TERMINAL PROFILE command to the card.
This is used to inform the card about which optional
features the terminal (modem/phone) supports, particularly
in the context of SIM Toolkit, Proactive SIM and OTA. You
must specify a hex-string with the encoded terminal profile
you want to send to the card."""
- (data, sw) = self._cmd.card._scc.terminal_profile(arg)
+ (data, sw) = self._cmd.card._scc.terminal_profile(opts.PROFILE)
self._cmd.poutput('SW: %s, data: %s' % (sw, data))
envelope_parser = argparse.ArgumentParser()
envelope_parser.add_argument('PAYLOAD', help='Hexstring of encoded payload to ENVELOPE')
@cmd2.with_argparser(envelope_parser)
- def do_envelope(self, arg):
+ def do_envelope(self, opts):
"""Send an ENVELOPE command to the card. This is how a
variety of information is communicated from the terminal
(modem/phone) to the card, particularly in the context of
SIM Toolkit, Proactive SIM and OTA."""
- (data, sw) = self._cmd.card._scc.envelope(arg)
+ (data, sw) = self._cmd.card._scc.envelope(opts.PAYLOAD)
self._cmd.poutput('SW: %s, data: %s' % (sw, data))
envelope_sms_parser = argparse.ArgumentParser()
envelope_sms_parser.add_argument('TPDU', help='Hexstring of encoded SMS TPDU')
@cmd2.with_argparser(envelope_sms_parser)
- def do_envelope_sms(self, arg):
+ def do_envelope_sms(self, opts):
"""Send an ENVELOPE(SMS-PP-Download) command to the card.
This emulates a terminal (modem/phone) having received a SMS
with a PID of 'SMS for the SIM card'. You can use this
command in the context of testing OTA related features
without a modem/phone or a cellular netwokr."""
tpdu_ie = SMS_TPDU()
- tpdu_ie.from_bytes(h2b(arg))
+ tpdu_ie.from_bytes(h2b(opts.TPDU))
dev_ids = DeviceIdentities(
decoded={'source_dev_id': 'network', 'dest_dev_id': 'uicc'})
sms_dl = SMSPPDownload(children=[dev_ids, tpdu_ie])
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/28871
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: Ia861eeb2970627d3ecfd0ca73f75ca571c6885b2
Gerrit-Change-Number: 28871
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-MessageType: merged
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/28855 )
Change subject: cbc: Fix use of incorrect variable in loop
......................................................................
cbc: Fix use of incorrect variable in loop
This went unnoticed before because all tests were running with both bsc
and mme set to 1.
Change-Id: I978c92819cb4e218c95bc719ade71787dc474b23
---
M cbc/CBC_Tests.ttcn
1 file changed, 1 insertion(+), 1 deletion(-)
Approvals:
Jenkins Builder: Verified
fixeria: Looks good to me, approved
diff --git a/cbc/CBC_Tests.ttcn b/cbc/CBC_Tests.ttcn
index 11b8e5a..5240d85 100644
--- a/cbc/CBC_Tests.ttcn
+++ b/cbc/CBC_Tests.ttcn
@@ -150,7 +150,7 @@
}
function f_start() runs on test_CT {
- for (var integer i := 0; i < g_num_mme; i := i + 1) {
+ for (var integer i := 0; i < g_num_bsc; i := i + 1) {
f_start_bsc(i, testcasename(), g_pars_BSC[i]);
}
for (var integer i := 0; i < g_num_mme; i := i + 1) {
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/28855
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: I978c92819cb4e218c95bc719ade71787dc474b23
Gerrit-Change-Number: 28855
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged
Attention is currently required from: pespin.
neels has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-hnbgw/+/28827 )
Change subject: reduce code dup in handle_cn_data_ind()
......................................................................
Patch Set 2:
(1 comment)
File src/osmo-hnbgw/hnbgw_cn.c:
https://gerrit.osmocom.org/c/osmo-hnbgw/+/28827/comment/51c26986_9c7909f7
PS1, Line 376: if (!map->is_ps) {
> I'd personally first check for the type of procedure ("switch (message->procedureCode)") and then in […]
Done
--
To view, visit https://gerrit.osmocom.org/c/osmo-hnbgw/+/28827
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-hnbgw
Gerrit-Branch: master
Gerrit-Change-Id: I4bca25d1643693cf3a9d3c49f35b29ff1dce0859
Gerrit-Change-Number: 28827
Gerrit-PatchSet: 2
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Sat, 30 Jul 2022 20:09:23 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: comment
Attention is currently required from: pespin.
neels has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/28817 )
Change subject: add library/PFCP_*, deps/PFCP
......................................................................
Patch Set 3:
(1 comment)
File library/PFCP_Templates.ttcn:
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/28817/comment/466a9b10_0587…
PS1, Line 18: type enumerated e_PFCP_Cause {
> I disagree, having a _Types file it should go there.
was going to move now but noticed that PFCP_Types.ttcn is from deps/titan.ProtocolModules.PFCP_v15.1.0/
so it's upstream code.
these types are only there for use with the templates, i hope you're not making me create a PFCP_Types2.ttcn for these?
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/28817
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: I0723b931b3f755ea291bffa2f27c34ba446c2f2f
Gerrit-Change-Number: 28817
Gerrit-PatchSet: 3
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Sat, 30 Jul 2022 20:04:57 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: neels <nhofmeyr(a)sysmocom.de>
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: comment
Attention is currently required from: pespin.
neels has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/28817 )
Change subject: add library/PFCP_*, deps/PFCP
......................................................................
Patch Set 3:
(1 comment)
File library/PFCP_Templates.ttcn:
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/28817/comment/8084122f_59b5…
PS1, Line 418: function ts_PFCP_Session_Est_Req(charstring node_id, OCT8 cp_seid, Create_PDR_list create_pdr, Create_FAR_list create_far) return template PDU_PFCP {
> I'm sorry but your personal tooling is not an acceptable motivation to avoid specifying template typ […]
honestly i'd like to know. i don't see constrictions nor errors with these templates.
i still don't understand the benefit. does someone have examples where a (value) and where a (present) actually improves usage of a template?
(also i find my tooling pretty important, since it translates to work hours our employer actually pays me)
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/28817
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: I0723b931b3f755ea291bffa2f27c34ba446c2f2f
Gerrit-Change-Number: 28817
Gerrit-PatchSet: 3
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Sat, 30 Jul 2022 19:56:38 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: neels <nhofmeyr(a)sysmocom.de>
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: comment
Attention is currently required from: pespin.
neels has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-upf/+/28311 )
Change subject: add contrib/set_cap_net_admin.sh
......................................................................
Patch Set 3:
(1 comment)
Patchset:
PS3:
if i get no veto i'm just going to merge this soon
--
To view, visit https://gerrit.osmocom.org/c/osmo-upf/+/28311
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-upf
Gerrit-Branch: master
Gerrit-Change-Id: If31c304e2602d3c37d5d8a5a2705417b2fc4686c
Gerrit-Change-Number: 28311
Gerrit-PatchSet: 3
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: laforge <laforge(a)osmocom.org>
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Sat, 30 Jul 2022 19:46:40 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
neels has submitted this change. ( https://gerrit.osmocom.org/c/osmo-msc/+/28783 )
Change subject: sdp_msg: add sdp_audio_codecs_cmp(), add compare flags
......................................................................
sdp_msg: add sdp_audio_codecs_cmp(), add compare flags
A problem with SDP fmtp handling is visible in this patch: when cmp_fmtp
is true, we compare fmtp strings 1:1, which is not how things should be
done. The intention is to fix fmtp handling in a later patch.
At least there now is a flag to bypass fmtp comparison altogether.
Related: SYS#5066
Change-Id: I18d33e189674229501afec950aa1c732386455a2
---
M include/osmocom/msc/sdp_msg.h
M src/libmsc/sdp_msg.c
2 files changed, 73 insertions(+), 17 deletions(-)
Approvals:
Jenkins Builder: Verified
dexter: Looks good to me, but someone else must approve
neels: Looks good to me, approved
diff --git a/include/osmocom/msc/sdp_msg.h b/include/osmocom/msc/sdp_msg.h
index 44a8a30..537713c 100644
--- a/include/osmocom/msc/sdp_msg.h
+++ b/include/osmocom/msc/sdp_msg.h
@@ -36,7 +36,10 @@
const char *sdp_msg_line_end(const char *src);
-int sdp_audio_codec_cmp(const struct sdp_audio_codec *a, const struct sdp_audio_codec *b);
+int sdp_audio_codec_cmp(const struct sdp_audio_codec *a, const struct sdp_audio_codec *b,
+ bool cmp_fmtp, bool cmp_payload_type);
+int sdp_audio_codecs_cmp(const struct sdp_audio_codecs *a, const struct sdp_audio_codecs *b,
+ bool cmp_fmtp, bool cmp_payload_type);
struct sdp_audio_codec *sdp_audio_codec_add(struct sdp_audio_codecs *ac, unsigned int payload_type,
const char *subtype_name, unsigned int rate, const char *fmtp);
diff --git a/src/libmsc/sdp_msg.c b/src/libmsc/sdp_msg.c
index 08a2186..a2a2d3d 100644
--- a/src/libmsc/sdp_msg.c
+++ b/src/libmsc/sdp_msg.c
@@ -31,30 +31,83 @@
#include <osmocom/msc/sdp_msg.h>
/* Compare name, rate and fmtp, returning typical cmp result: 0 on match, and -1 / 1 on mismatch.
- * Do *not* compare the payload_type number.
+ * If cmp_fmtp is false, do *not* compare the fmtp string; if true, compare fmtp 1:1 as strings.
+ * If cmp_payload_type is false, do *not* compare the payload_type number.
* The fmtp is only string-compared -- e.g. if AMR parameters appear in a different order, it amounts to a mismatch even
* though all parameters are the same. */
-int sdp_audio_codec_cmp(const struct sdp_audio_codec *a, const struct sdp_audio_codec *b)
+int sdp_audio_codec_cmp(const struct sdp_audio_codec *a, const struct sdp_audio_codec *b,
+ bool cmp_fmtp, bool cmp_payload_type)
{
- int rc;
+ int cmp;
if (a == b)
return 0;
if (!a)
return -1;
if (!b)
return 1;
- rc = strncmp(a->subtype_name, b->subtype_name, sizeof(a->subtype_name));
- if (rc)
- return rc;
+ cmp = strncmp(a->subtype_name, b->subtype_name, sizeof(a->subtype_name));
+ if (cmp)
+ return cmp;
+ cmp = OSMO_CMP(a->rate, b->rate);
+ if (cmp)
+ return cmp;
+ if (cmp_fmtp) {
+ cmp = strncmp(a->fmtp, b->fmtp, sizeof(a->fmtp));
+ if (cmp)
+ return cmp;
+ }
+ if (cmp_payload_type) {
+ cmp = OSMO_CMP(a->payload_type, b->payload_type);
+ if (cmp)
+ return cmp;
+ }
+ return 0;
+}
- if (a->rate < b->rate)
+/* Compare two lists of audio codecs, returning typical cmp result: 0 on match, and -1 / 1 on mismatch.
+ * The ordering in the two lists may differ, except that the first codec in 'a' must also be the first codec in 'b'.
+ * This is because the first codec typically expresses the preferred codec to use.
+ * If cmp_fmtp is false, do *not* compare the fmtp strings; if true, compare fmtp 1:1 as strings.
+ * If cmp_payload_type is false, do *not* compare the payload_type numbers.
+ * The fmtp is only string-compared -- e.g. if AMR parameters appear in a different order, it amounts to a mismatch even
+ * though all parameters are the same. */
+int sdp_audio_codecs_cmp(const struct sdp_audio_codecs *a, const struct sdp_audio_codecs *b,
+ bool cmp_fmtp, bool cmp_payload_type)
+{
+ const struct sdp_audio_codec *codec_a;
+ const struct sdp_audio_codec *codec_b;
+ int cmp;
+ if (a == b)
+ return 0;
+ if (!a)
return -1;
- if (a->rate > b->rate)
+ if (!b)
return 1;
- rc = strncmp(a->fmtp, b->fmtp, sizeof(a->fmtp));
- if (rc)
- return rc;
+ cmp = OSMO_CMP(a->count, b->count);
+ if (cmp)
+ return cmp;
+
+ if (!a->count)
+ return 0;
+
+ /* The first codec is the "chosen" codec and should match. The others may appear in different order. */
+ cmp = sdp_audio_codec_cmp(&a->codec[0], &b->codec[0], cmp_fmtp, cmp_payload_type);
+ if (cmp)
+ return cmp;
+
+ /* See if each codec in a is also present in b */
+ foreach_sdp_audio_codec(codec_a, a) {
+ bool match_found = false;
+ foreach_sdp_audio_codec(codec_b, b) {
+ if (!sdp_audio_codec_cmp(codec_a, codec_b, cmp_fmtp, cmp_payload_type)) {
+ match_found = true;
+ break;
+ }
+ }
+ if (!match_found)
+ return -1;
+ }
return 0;
}
@@ -130,13 +183,13 @@
return codec;
}
-/* Return a given sdp_msg's codec entry that matches the subtype_name, rate and fmtp of the given codec, or NULL if no
- * match is found. Comparison is made by sdp_audio_codec_cmp(). */
+/* Return a given sdp_msg's codec entry that matches the subtype_name and rate of the given codec, or NULL if no
+ * match is found. Comparison is made by sdp_audio_codec_cmp(cmp_payload_type=false). */
struct sdp_audio_codec *sdp_audio_codec_by_descr(struct sdp_audio_codecs *ac, const struct sdp_audio_codec *codec)
{
struct sdp_audio_codec *i;
foreach_sdp_audio_codec(i, ac) {
- if (!sdp_audio_codec_cmp(i, codec))
+ if (!sdp_audio_codec_cmp(i, codec, false, false))
return i;
}
return NULL;
@@ -452,8 +505,8 @@
}
/* Leave only those codecs in 'ac_dest' that are also present in 'ac_other'.
- * The matching is made by sdp_audio_codec_cmp(), i.e. payload_type numbers are not compared and fmtp parameters are
- * compared 1:1 as plain strings.
+ * The matching is made by sdp_audio_codec_cmp(cmp_payload_type=false), i.e. payload_type numbers are not compared and
+ * fmtp parameters are compared 1:1 as plain strings.
* If translate_payload_type_numbers has an effect if ac_dest and ac_other have mismatching payload_type numbers for the
* same SDP codec descriptions. If translate_payload_type_numbers is true, take the payload_type numbers from ac_other.
* If false, keep payload_type numbers in ac_dest unchanged. */
--
To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/28783
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Change-Id: I18d33e189674229501afec950aa1c732386455a2
Gerrit-Change-Number: 28783
Gerrit-PatchSet: 3
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged
Attention is currently required from: fixeria.
neels has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-msc/+/28784 )
Change subject: sdp_msg: s/sdp_audio_codec_/sdp_audio_codecs_
......................................................................
Patch Set 3: Code-Review+2
(1 comment)
Patchset:
PS3:
this is a pretty trivial thing, i'm going to pass this for the benefit of the rest of the codecs patches
--
To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/28784
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Change-Id: Id87eb350c1f17f8dbf776909824bfa06634c1d04
Gerrit-Change-Number: 28784
Gerrit-PatchSet: 3
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de>
Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Comment-Date: Sat, 30 Jul 2022 19:45:53 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: pespin.
neels has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-cbc/+/28819 )
Change subject: sbcap: Log info about messages received and trasmitted
......................................................................
Patch Set 3:
(2 comments)
Commit Message:
https://gerrit.osmocom.org/c/osmo-cbc/+/28819/comment/12db3bfe_4af0829b
PS2, Line 8:
> I see no need for writing an issue if it's a generic patch simply refactoring/improving some code. […]
it's about a hint to me where i can account the review work to
File src/sbcap/sbcap_common.c:
https://gerrit.osmocom.org/c/osmo-cbc/+/28819/comment/f96f757d_038eb039
PS2, Line 162: static char pdu_name[256] = "<unknown>";
> I rather have a static buf in the app than using OTC_SELECT. […]
hmm. a while back my impression was that we consciously decided to avoid static buffers, because over the years they build up, amounting to a lot of memory being hogged, completely unused for the vast majority of runtime. Ever since that decision i've been going out of my way to avoid static buffers
There are functional benefits to talloc strings; in addition to the ones i posted before, a talloc string will never cut short a string because the static buffer is too small; i.e. we don't need to pick a size that the largest possible string might ever need.
Since my attention was brought to this aspect, my opinion is that static buffers should be avoided. they are bad in various ways.
this patch is already merged but i consider this still an open issue you brushed over
--
To view, visit https://gerrit.osmocom.org/c/osmo-cbc/+/28819
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-cbc
Gerrit-Branch: master
Gerrit-Change-Id: Ifd1eca79bf4fac63de8066cd6a18004138d51d04
Gerrit-Change-Number: 28819
Gerrit-PatchSet: 3
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-CC: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Sat, 30 Jul 2022 19:41:44 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: neels <nhofmeyr(a)sysmocom.de>
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: comment
Hello Jenkins Builder,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/28869
to look at the new patch set (#2).
Change subject: BTS_Tests: send SACCH blocks in TC_rsl_ms_pwr_dyn_{up,ass_updown}()
......................................................................
BTS_Tests: send SACCH blocks in TC_rsl_ms_pwr_dyn_{up,ass_updown}()
We used to rely on trxcon sendig dummy RR Measurement Reports and
patching the L1 SACCH Header with the configured MS Power Level
and Timing Advance values. Recently TC_rsl_ms_pwr_dyn_ass_updown
started to fail because trxcon does not patch dummy MRs anymore.
Do not rely on dummy MRs, send SACCH blocks with the expected
MS Power Level and Timing Advance values from the testsuites.
Change-Id: I31dd6b9026d04403092256176f67785a0a6486ad
Related: OS#5635
---
M bts/BTS_Tests.ttcn
1 file changed, 16 insertions(+), 2 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/69/28869/2
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/28869
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: I31dd6b9026d04403092256176f67785a0a6486ad
Gerrit-Change-Number: 28869
Gerrit-PatchSet: 2
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-MessageType: newpatchset
msuraev has posted comments on this change. ( https://gerrit.osmocom.org/c/docker-playground/+/28873 )
Change subject: OsmoMSC: add image to test gerrit patchset
......................................................................
Patch Set 1:
This change is ready for review.
--
To view, visit https://gerrit.osmocom.org/c/docker-playground/+/28873
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-Change-Id: I9cc4c804825e653c2da285396a395e4d986fc157
Gerrit-Change-Number: 28873
Gerrit-PatchSet: 1
Gerrit-Owner: msuraev <msuraev(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Comment-Date: Sat, 30 Jul 2022 17:00:26 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/28870 )
Change subject: Fix printing of SwMatchError after introduction of logical channels
......................................................................
Fix printing of SwMatchError after introduction of logical channels
the interpret_sw() method was moved from RuntimeState to RuntimeLchan
in Change-Id I7aa994b625467d4e46a2edd8123240b930305360 - but the code
in pySim/exceptions.py was not adjusted accordingly.
Change-Id: I0614436c99c6a6ebc22c4dc14fb361c5f5f16686
---
M pySim/exceptions.py
1 file changed, 2 insertions(+), 2 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/70/28870/1
diff --git a/pySim/exceptions.py b/pySim/exceptions.py
index 24aff85..c6a81a1 100644
--- a/pySim/exceptions.py
+++ b/pySim/exceptions.py
@@ -53,8 +53,8 @@
self.rs = rs
def __str__(self):
- if self.rs:
- r = self.rs.interpret_sw(self.sw_actual)
+ if self.rs and self.rs.lchan[0]:
+ r = self.rs.lchan[0].interpret_sw(self.sw_actual)
if r:
return "SW match failed! Expected %s and got %s: %s - %s" % (self.sw_expected, self.sw_actual, r[0], r[1])
return "SW match failed! Expected %s and got %s." % (self.sw_expected, self.sw_actual)
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/28870
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I0614436c99c6a6ebc22c4dc14fb361c5f5f16686
Gerrit-Change-Number: 28870
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-MessageType: newchange
laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/28871 )
Change subject: ts_31_102: Fix terminal_profile, envelope and envelope_sms commands
......................................................................
ts_31_102: Fix terminal_profile, envelope and envelope_sms commands
In commit Ib88bb7d12faaac7d149ee1f6379bc128b83bbdd5 I accidentially
broke those commands by adding argparse definitions for better
documentation. When adding the @cmd2.with_argparser decorator,
the method argument changes from the raw string to an argparse.Namespace
object.
This patch fixes the below exception:
pySIM-shell (MF/ADF.USIM)> terminal_profile ffffffff
Traceback (most recent call last):
File "/usr/local/lib/python3.10/dist-packages/cmd2/cmd2.py", line 2129, in onecmd_plus_hooks
stop = self.onecmd(statement, add_to_history=add_to_history)
File "/usr/local/lib/python3.10/dist-packages/cmd2/cmd2.py", line 2559, in onecmd
stop = func(statement)
File "/usr/local/lib/python3.10/dist-packages/cmd2/decorators.py", line 336, in cmd_wrapper
return func(*args_list, **kwargs)
File "/space/home/laforge/projects/git/pysim/pySim/ts_31_102.py", line 1274, in do_terminal_profile
(data, sw) = self._cmd.card._scc.terminal_profile(arg)
File "/space/home/laforge/projects/git/pysim/pySim/commands.py", line 583, in terminal_profile
data_length = len(payload) // 2
TypeError: object of type 'Namespace' has no len()
Change-Id: Ia861eeb2970627d3ecfd0ca73f75ca571c6885b2
Fixes: Ib88bb7d12faaac7d149ee1f6379bc128b83bbdd5
---
M pySim/ts_31_102.py
1 file changed, 6 insertions(+), 6 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/71/28871/1
diff --git a/pySim/ts_31_102.py b/pySim/ts_31_102.py
index 7850459..02ef005 100644
--- a/pySim/ts_31_102.py
+++ b/pySim/ts_31_102.py
@@ -1264,40 +1264,40 @@
term_prof_parser.add_argument('PROFILE', help='Hexstring of encoded terminal profile')
@cmd2.with_argparser(term_prof_parser)
- def do_terminal_profile(self, arg):
+ def do_terminal_profile(self, opts):
"""Send a TERMINAL PROFILE command to the card.
This is used to inform the card about which optional
features the terminal (modem/phone) supports, particularly
in the context of SIM Toolkit, Proactive SIM and OTA. You
must specify a hex-string with the encoded terminal profile
you want to send to the card."""
- (data, sw) = self._cmd.card._scc.terminal_profile(arg)
+ (data, sw) = self._cmd.card._scc.terminal_profile(opts.PROFILE)
self._cmd.poutput('SW: %s, data: %s' % (sw, data))
envelope_parser = argparse.ArgumentParser()
envelope_parser.add_argument('PAYLOAD', help='Hexstring of encoded payload to ENVELOPE')
@cmd2.with_argparser(envelope_parser)
- def do_envelope(self, arg):
+ def do_envelope(self, opts):
"""Send an ENVELOPE command to the card. This is how a
variety of information is communicated from the terminal
(modem/phone) to the card, particularly in the context of
SIM Toolkit, Proactive SIM and OTA."""
- (data, sw) = self._cmd.card._scc.envelope(arg)
+ (data, sw) = self._cmd.card._scc.envelope(opts.PAYLOAD)
self._cmd.poutput('SW: %s, data: %s' % (sw, data))
envelope_sms_parser = argparse.ArgumentParser()
envelope_sms_parser.add_argument('TPDU', help='Hexstring of encoded SMS TPDU')
@cmd2.with_argparser(envelope_sms_parser)
- def do_envelope_sms(self, arg):
+ def do_envelope_sms(self, opts):
"""Send an ENVELOPE(SMS-PP-Download) command to the card.
This emulates a terminal (modem/phone) having received a SMS
with a PID of 'SMS for the SIM card'. You can use this
command in the context of testing OTA related features
without a modem/phone or a cellular netwokr."""
tpdu_ie = SMS_TPDU()
- tpdu_ie.from_bytes(h2b(arg))
+ tpdu_ie.from_bytes(h2b(opts.TPDU))
dev_ids = DeviceIdentities(
decoded={'source_dev_id': 'network', 'dest_dev_id': 'uicc'})
sms_dl = SMSPPDownload(children=[dev_ids, tpdu_ie])
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/28871
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: Ia861eeb2970627d3ecfd0ca73f75ca571c6885b2
Gerrit-Change-Number: 28871
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-MessageType: newchange
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/28868 )
Change subject: BTS_Tests: increate Tguard to 30.0s for TC_rsl_ms_pwr_dyn_up
......................................................................
BTS_Tests: increate Tguard to 30.0s for TC_rsl_ms_pwr_dyn_up
A comment in f_TC_rsl_ms_pwr_dyn_up() states:
> By default, the MS power loop gets triggered every 4th SACCH block (1.92s).
> We need 9 * 4 dB steps to get from 0 dBm to 33 dBm, so 9 * 1.92s total.
> Add an extra offset to avoid race conditions: +1.92s.
so the alt statement is expected to block for 19.2s, while the guard
timer is set to 20.0s by default. This is not enough, given that
f_TC_rsl_ms_pwr_dyn_up() also needs to wait for the first SACCH block
before entering the alt statement.
Let's give it more time to run in order to avoid sporadic failures.
Change-Id: Ib7de8383c95ac9e00560f786ec4c56f79f7d81bc
Related: OS#5635
---
M bts/BTS_Tests.ttcn
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/68/28868/1
diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn
index 58a7e44..ed5d316 100644
--- a/bts/BTS_Tests.ttcn
+++ b/bts/BTS_Tests.ttcn
@@ -3337,7 +3337,7 @@
f_init();
f_vty_config(BTSVTY, "phy 0", "osmotrx ms-power-loop -10");
for (var integer tn := 1; tn <= 1; tn := tn+1) {
- pars := valueof(t_Pars(t_RslChanNr_Bm(tn), ts_RSL_ChanMode_SIGN));
+ pars := valueof(t_Pars(t_RslChanNr_Bm(tn), ts_RSL_ChanMode_SIGN, t_guard := 30.0));
pars.bts0_band := f_vty_get_bts0_band();
vc_conn := f_start_handler(refers(f_TC_rsl_ms_pwr_dyn_up), pars, trxc_comp := true);
vc_conn.done;
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/28868
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: Ib7de8383c95ac9e00560f786ec4c56f79f7d81bc
Gerrit-Change-Number: 28868
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-MessageType: newchange
Attention is currently required from: pespin.
msuraev has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-msc/+/28844 )
Change subject: Introduce libsmpputil
......................................................................
Patch Set 7:
(2 comments)
This change is ready for review.
File include/osmocom/msc/smpp.h:
https://gerrit.osmocom.org/c/osmo-msc/+/28844/comment/a6a5bac6_08ba56c4
PS2, Line 5: //Length limits according to SMPP 3.4 spec including NUL-byte:
> /* */
Done
File src/utils/Makefile.am:
https://gerrit.osmocom.org/c/osmo-msc/+/28844/comment/d6bfffb5_35c97dac
PS2, Line 32: $(top_srcdir)/src/libmsc/smpp_smsc.h \
> it may make sense to define a new SMPP_UTIL_HEADERS with this file, and include SMPP_UTILS_HEADERS h […]
Given it's internal build-time optional library I don't think it's worth the effort.
--
To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/28844
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Change-Id: I61910651bc7c188dc2fb67d96189a66a47e7e8fb
Gerrit-Change-Number: 28844
Gerrit-PatchSet: 7
Gerrit-Owner: msuraev <msuraev(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Sat, 30 Jul 2022 09:03:17 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: comment
Attention is currently required from: msuraev.
msuraev has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-msc/+/28844 )
Change subject: Introduce libsmpputil
......................................................................
Set Ready For Review
--
To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/28844
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Change-Id: I61910651bc7c188dc2fb67d96189a66a47e7e8fb
Gerrit-Change-Number: 28844
Gerrit-PatchSet: 6
Gerrit-Owner: msuraev <msuraev(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: msuraev <msuraev(a)sysmocom.de>
Gerrit-Comment-Date: Sat, 30 Jul 2022 08:37:39 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
Attention is currently required from: msuraev.
msuraev has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-msc/+/28846 )
Change subject: Make esme struct shared
......................................................................
Set Ready For Review
--
To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/28846
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Change-Id: I8f7ac2c00d16660925dd0b03aa1a0973edf9eb70
Gerrit-Change-Number: 28846
Gerrit-PatchSet: 6
Gerrit-Owner: msuraev <msuraev(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Attention: msuraev <msuraev(a)sysmocom.de>
Gerrit-Comment-Date: Sat, 30 Jul 2022 08:37:06 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
Attention is currently required from: msuraev.
msuraev has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-msc/+/28845 )
Change subject: Add ESME-specific logging
......................................................................
Set Ready For Review
--
To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/28845
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Change-Id: Ie5ddde762350385f8d18ee1d441584a41b0290ec
Gerrit-Change-Number: 28845
Gerrit-PatchSet: 6
Gerrit-Owner: msuraev <msuraev(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Attention: msuraev <msuraev(a)sysmocom.de>
Gerrit-Comment-Date: Sat, 30 Jul 2022 08:36:54 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment