Skip to content
Success

Changes

Summary

  1. filesystem: pass total_len to construct of when encoding file contents (details)
  2. cosmetic: use **kwargs instead of **_kwargs (details)
  3. ts_51_011: replace encoding of EF.MSISDN with construct model (details)
  4. ts_51_011: fix unittest for EF.ADN (details)
  5. ts_51_011: use _test_de_encode instead of _test_decode in EF.CFIS (details)
  6. ts_102_221: se _test_de_encode instead of _test_decode in EF.DIR (details)
  7. utils: move enc_msisdn and dec_msisdn to legacy/utils.py (details)
Commit efddffe0158c50b6c36b5fd76795c89350921793 by pmaier@sysmocom.de
filesystem: pass total_len to construct of when encoding file contents

In our construct models we frequently use a context parameter "total_len",
we also pass this parameter to construct when we decode files, but we
do not pass it when we generate files. This is a problem, because when
total_len is used in the construct model, this parameter must be known
also when decoding the file.

Let's make sure that the total_len is properly determined and and passed
to construct (via pyosmocom).

Related: OS#5714
Change-Id: I1b7a51594fbc5d9fe01132c39354a2fa88d53f9b
The file was modifiedpySim/ts_51_011.py
The file was modifiedpySim/sysmocom_sja2.py
The file was modifiedtests/unittests/test_files.py
The file was modifiedpySim/gsm_r.py
The file was modifiedpySim/ts_31_102.py
The file was modifiedpySim/filesystem.py
The file was modifiedpySim/runtime.py
The file was modifiedpySim/ts_31_102_telecom.py
The file was modifiedtests/pySim-shell_test/file_content/test_record_uicc.ok
Commit 4045146f62b331a2819e831cbe3b040a060c4e91 by pmaier@sysmocom.de
cosmetic: use **kwargs instead of **_kwargs

Some methods sometimes have a **_kwargs parameter, let's be consistent
and use **kwargs only.

Related: OS#5714
Change-Id: I98857cc774185e55a604eb4fbfbf62ed4bd6ded7
The file was modifiedpySim/ts_31_102.py
The file was modifiedpySim/ts_102_221.py
Commit 39552464d8097023b4cef861b0ab216b390ef4c2 by pmaier@sysmocom.de
ts_51_011: replace encoding of EF.MSISDN with construct model

The encoding of EF.MSISDN is currently done with enc_msisdn and
dec_msisdn from utils.py. Let's replace this with a construct
based model, similar to the one we already use with EF.ADN

Related: OS#5714
Change-Id: I647f5c63f7f87902a86c0c5d8e92fdc7f4350a5a
The file was modifiedtests/pySim-trace_test/pySim-trace_test_gsmtap.pcapng.ok
The file was modifiedpySim/ts_51_011.py
Commit dc2ca5d6be4ac435b0c6b73ac0bd82df973131a6 by pmaier@sysmocom.de
ts_51_011: fix unittest for EF.ADN

The unittest for EF.ADN can run with _test_de_encode. However, the original
test vectors seem to be from a card with a slightly larger record size, so
they need a bit of re-alignment

Related: OS#5714
Change-Id: I241792e66ee6167be6ddc076453344b6307d6265
The file was modifiedpySim/ts_51_011.py
Commit 10ea4a07141b1f970373367d38d1f8b726e6e015 by pmaier@sysmocom.de
ts_51_011: use _test_de_encode instead of _test_decode in EF.CFIS unittest

The unittest for EF.CFIS only runs with _test_decode, but it also runs with
_test_de_encode without any problems

Related: OS#5714
Change-Id: Ib876fd799f871fe64ced2a7b64847ffd09e16ed9
The file was modifiedpySim/ts_51_011.py
Commit 1f45799188e4b61fcbe7aaff8af4611789a03c5e by pmaier@sysmocom.de
ts_102_221: se _test_de_encode instead of _test_decode in EF.DIR unittest

The unittest for EF.DIR only runs with _test_decode, but it also runs with
_test_de_encode without any problems

Related: OS#5714
Change-Id: If459073c6ff927c1cc1790d506e3979243b1fb4c
The file was modifiedpySim/ts_102_221.py
Commit 93c89856c825139e8ead856b4439f24e2851418a by pmaier@sysmocom.de
utils: move enc_msisdn and dec_msisdn to legacy/utils.py

We now have a construct based encoder/decoder for the record content
of EF.MSISDN. This means that we do not need the functions enc_msisdn
and dec_msisdn in the non-legacy code anymore. We can now move both
to legacy/utils.py.

Related: OS#5714
Change-Id: I19ec8ba14551ec282fc0cc12ae2f6d528bdfc527
The file was modifiedpySim/legacy/cards.py
The file was modifiedpySim/legacy/utils.py
The file was modifiedpySim/utils.py
The file was modifiedpySim-read.py
The file was modifiedtests/unittests/test_utils.py