Attention is currently required from: dexter.
Hello Jenkins Builder,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/pysim/+/42662?usp=email
to look at the new patch set (#2).
The following approvals got outdated and were removed:
Verified-1 by Jenkins Builder
Change subject: ts_51_011/EF.SMSP: fix handling of 'alpha_id' field
......................................................................
ts_51_011/EF.SMSP: fix handling of 'alpha_id' field
The field 'alpha_id' is technically not an optional field, even though
the specification describes it as optional. Once the card manufacturer
decides that the field should be present, it must be always present and
vice versa.
(see code comment for a more detailed description)
Related: SYS#7765
Change-Id: I0ec99b2648b22c56f9145345e4cd8776f9217701
---
M pySim/ts_51_011.py
1 file changed, 30 insertions(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/62/42662/2
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/42662?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I0ec99b2648b22c56f9145345e4cd8776f9217701
Gerrit-Change-Number: 42662
Gerrit-PatchSet: 2
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Attention: dexter <pmaier(a)sysmocom.de>
dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/42662?usp=email )
Change subject: ts_51_011/EF.SMSP: fix handling of 'alpha_id' field
......................................................................
ts_51_011/EF.SMSP: fix handling of 'alpha_id' field
The field 'alpha_id' is technically not an optional field, even though
the specification describes it as optional. Once the card manufacturer
decides that the field should be present, it must be always present and
vice versa.
(see code comment for a more detailed description)
Related: SYS#7765
Change-Id: I0ec99b2648b22c56f9145345e4cd8776f9217701
---
M pySim/ts_51_011.py
1 file changed, 20 insertions(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/62/42662/1
diff --git a/pySim/ts_51_011.py b/pySim/ts_51_011.py
index 0dbf6eb..26e2d18 100644
--- a/pySim/ts_51_011.py
+++ b/pySim/ts_51_011.py
@@ -331,7 +331,7 @@
'ton_npi'/TonNpi, 'call_number'/PaddedBcdAdapter(Rpad(Bytes(10))))
DestAddr = Struct('length'/Rebuild(Int8ub, lambda ctx: EF_SMSP.dest_addr_len(ctx)),
'ton_npi'/TonNpi, 'call_number'/PaddedBcdAdapter(Rpad(Bytes(10))))
- self._construct = Struct('alpha_id'/COptional(GsmOrUcs2Adapter(Rpad(Bytes(this._.total_len-28)))),
+ self._construct = Struct('alpha_id'/GsmOrUcs2Adapter(Rpad(Bytes(this._.total_len-28))),
'parameter_indicators'/InvertAdapter(BitStruct(
Const(7, BitsInteger(3)),
'tp_vp'/Flag,
@@ -345,6 +345,25 @@
'tp_dcs'/Bytes(1),
'tp_vp_minutes'/EF_SMSP.ValidityPeriodAdapter(Byte))
+ # Ensure 'alpha_id' is always present
+ def encode_record_hex(self, abstract_data: dict, record_nr: int, total_len: int = None) -> str:
+ # Problem: TS 51.011 Section 10.5.6 describes the 'alpha_id' field as optional. However, this is only true
+ # at the time when the record length of the file is set up in the file system. A card manufacturer may decide
+ # to remove the field by setting the record length to 28. Likewise, the card manaufacturer may also decide to
+ # set the field to a distinct length by setting the record length to a value greater than 28 (e.g. 14 bytes
+ # 'alpha_id' + 28 bytes). Due to the fixed nature of the record length, this eventually means that in practice
+ # 'alpha_id' is a mandatory field with a fixed length.
+ #
+ # Due to the problematic specification of 'alpha_id' as a pseudo-optional field at the beginning of a
+ # fixed-size memory, the construct definition in self._construct has been incorrectly implemented and the field
+ # has been marked as COptional. We may correct the problem by removing COptional. But to maintain compatibility,
+ # we then have to ensure that in case the field is not provided (None), it is set to an empty string ('').
+ #
+ # See also ts_31_102.py, class EF_OCI for a correct example.
+ if abstract_data['alpha_id'] is None:
+ abstract_data['alpha_id'] = ''
+ return super().encode_record_hex(abstract_data, record_nr, total_len)
+
# TS 51.011 Section 10.5.7
class EF_SMSS(TransparentEF):
class MemCapAdapter(Adapter):
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/42662?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I0ec99b2648b22c56f9145345e4cd8776f9217701
Gerrit-Change-Number: 42662
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Attention is currently required from: osmith.
Hello Jenkins Builder, osmith,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmo-ci/+/42661?usp=email
to look at the new patch set (#2).
The following approvals got outdated and were removed:
Verified+1 by Jenkins Builder
Change subject: jobs/master-builds.yml: pysim: allow skipping card tests
......................................................................
jobs/master-builds.yml: pysim: allow skipping card tests
Skip tests requiring physical cards ("card-test") for commits
having a special marker in the COMMIT_MSG:
Jenkins: skip-card-tests
This speeds up the build verification significantly, and may be
useful for patches that do not modify the core logic (such as
documentation improvements and misc fixes).
Change-Id: I591717a2e2659c02447087dec23aa279cfd55551
---
M jobs/master-builds.yml
1 file changed, 3 insertions(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/61/42661/2
--
To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/42661?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-Change-Id: I591717a2e2659c02447087dec23aa279cfd55551
Gerrit-Change-Number: 42661
Gerrit-PatchSet: 2
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: osmith <osmith(a)sysmocom.de>
Attention is currently required from: osmith.
fixeria has posted comments on this change by fixeria. ( https://gerrit.osmocom.org/c/osmo-ci/+/42661?usp=email )
Change subject: jobs/master-builds.yml: pysim: allow skipping card tests
......................................................................
Patch Set 1:
(1 comment)
Patchset:
PS1:
I am not sure if this is the right approach.
@osmith@sysmocom.de if you have a better idea, please propose.
--
To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/42661?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-Change-Id: I591717a2e2659c02447087dec23aa279cfd55551
Gerrit-Change-Number: 42661
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: osmith <osmith(a)sysmocom.de>
Gerrit-Comment-Date: Wed, 22 Apr 2026 23:28:15 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Hello Jenkins Builder,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/pysim/+/42658?usp=email
to look at the new patch set (#2).
The following approvals got outdated and were removed:
Verified+1 by Jenkins Builder
Change subject: contrib/jenkins.sh: add support for "Jenkins: skip-card-tests" marker
......................................................................
contrib/jenkins.sh: add support for "Jenkins: skip-card-tests" marker
Add a have_jenkins_marker() helper that checks the commit message
for a given value on the "Jenkins:" footer line, for instance:
Jenkins: skip-card-tests
When this marker is present, the real-card integration tests
(pySim-prog_test and pySim-shell_test) are skipped, allowing commits
that don't affect card I/O to bypass long card-dependent test runs.
Change-Id: If76d812ee43b7eb3b57fdc660c60bf31fbff5b16
Jenkins: skip-card-tests
---
M contrib/jenkins.sh
1 file changed, 17 insertions(+), 9 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/58/42658/2
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/42658?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: If76d812ee43b7eb3b57fdc660c60bf31fbff5b16
Gerrit-Change-Number: 42658
Gerrit-PatchSet: 2
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/42658?usp=email )
Change subject: contrib/jenkins.sh: add support for "Jenkins: skip-card-tests" marker
......................................................................
contrib/jenkins.sh: add support for "Jenkins: skip-card-tests" marker
Add a have_jenkins_marker() helper that checks the commit message
for a given value on the "Jenkins:" footer line, for instance:
Jenkins: skip-card-tests
When this marker is present, the real-card integration tests
(pySim-prog_test and pySim-shell_test) are skipped, allowing commits
that don't affect card I/O to bypass long card-dependent test runs.
Change-Id: If76d812ee43b7eb3b57fdc660c60bf31fbff5b16
Jenkins: skip-card-tests
---
M contrib/jenkins.sh
1 file changed, 15 insertions(+), 7 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/58/42658/1
diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh
index c527a83..4df7277 100755
--- a/contrib/jenkins.sh
+++ b/contrib/jenkins.sh
@@ -15,6 +15,10 @@
. venv/bin/activate
}
+have_jenkins_marker() {
+ git show --summary HEAD | grep "Jenkins:" | grep -q "$1"
+}
+
if [ ! -d "./tests/" ] ; then
echo "###############################################"
echo "Please call from pySim-prog top directory"
@@ -36,17 +40,21 @@
# Execute automatically discovered unit tests first
python -m unittest discover -v -s tests/unittests
- # Run pySim-prog integration tests (requires physical cards)
- cd tests/pySim-prog_test/
- ./pySim-prog_test.sh
- cd ../../
+ if have_jenkins_marker "skip-card-tests"; then
+ echo "Skipping real-card tests (skip-card-tests)"
+ else
+ # Run pySim-prog integration tests (requires physical cards)
+ cd tests/pySim-prog_test/
+ ./pySim-prog_test.sh
+ cd ../../
+
+ # Run pySim-shell integration tests (requires physical cards)
+ python3 -m unittest discover -v -s ./tests/pySim-shell_test/
+ fi
# Run pySim-trace test
tests/pySim-trace_test/pySim-trace_test.sh
- # Run pySim-shell integration tests (requires physical cards)
- python3 -m unittest discover -v -s ./tests/pySim-shell_test/
-
# Run pySim-smpp2sim test
tests/pySim-smpp2sim_test/pySim-smpp2sim_test.sh
;;
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/42658?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: If76d812ee43b7eb3b57fdc660c60bf31fbff5b16
Gerrit-Change-Number: 42658
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>