Attention is currently required from: dexter.
laforge has posted comments on this change by dexter. (
https://gerrit.osmocom.org/c/pysim/+/38195?usp=email )
Change subject: filesystem: pass total_len to construct of when encoding file contents
......................................................................
Patch Set 2:
(2 comments)
File pySim/filesystem.py:
https://gerrit.osmocom.org/c/pysim/+/38195/comment/11de1800_b42b75ff?usp=em… :
PS1, Line 1043: __get_rec_len
I thought I could re-use _get_size() in TransRecEf,
that is why _get_size only has one underscore.
I'm not following your argument
here. In general, I think double-underscores in python are (should be?) reserved for
python internal stuff like __str__ __init__, etc.
As we do not have a _get_rec_len with one underscore, why should we add one with two?
https://gerrit.osmocom.org/c/pysim/+/38195/comment/4de91a69_da1076d8?usp=em… :
PS1, Line 1266: return b2h(filter_dict(build_construct(self._construct,
abstract_data, self._get_size(total_len))))
I see, we can not use _get_size here. […]
TransRecEF registeres the cdm2 command-set form TransparentEF, yes. It will call
lchan.update_binary_dec() which in turn will call TransparentEF.encode_hex() which will
call self._encode_bin() which is TransRecEF._encode_bin() which iterates over
self.encode_record_bin() for all the given records in the input data.
So I don't understand the question about "how to test". Any update on a
TransRecEF should exercise the above-mentioned methods, as long as the speicifc TransRecEF
derived class only provides a _construct and does not override the _encode_{hex,bin}
inherited from TransRecordEF.
--
To view, visit
https://gerrit.osmocom.org/c/pysim/+/38195?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I1b7a51594fbc5d9fe01132c39354a2fa88d53f9b
Gerrit-Change-Number: 38195
Gerrit-PatchSet: 2
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Attention: dexter <pmaier(a)sysmocom.de>
Gerrit-Comment-Date: Wed, 18 Sep 2024 17:31:40 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: laforge <laforge(a)osmocom.org>
Comment-In-Reply-To: dexter <pmaier(a)sysmocom.de>