Change in pysim[master]: filesystem: add unit tests for encoder/decoder methods

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

laforge gerrit-no-reply at lists.osmocom.org
Sun May 9 19:27:00 UTC 2021


laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/pysim/+/24012 )

Change subject: filesystem: add unit tests for encoder/decoder methods
......................................................................


Patch Set 4:

> Patch Set 4:
> 
> (1 comment)
> 
> Some comments from my side as I also thought about tests and just saw this change.
> 
> In my opinion, the test framework should not only include the direction _encode_decode_testvector, but also the opposite scenario, i.e. _decode_encode_testvector, with a bit vector (or hexstr) on both ends.

The problem is that this is not possible 100% reliable.  Most files contain bits that are unused (at least in the past/current version of the spec) so you cannot have the assumption that "anything that will decode from this binary blob will look identical when re-encoded".

If you copy those "input blobs" from several different cards, I'm sure you will find some that have unused bits as 0, others as 1, or even a mixture.  If you pass those through the decoder, the information abtou the unused bits is lost, and if you re-encode they will have whatever pysim thinks is right to use for  unused bits :(


-- 
To view, visit https://gerrit.osmocom.org/c/pysim/+/24012
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I02d884547f4982e0b8ed7ef21b8cda75237942e2
Gerrit-Change-Number: 24012
Gerrit-PatchSet: 4
Gerrit-Owner: dexter <pmaier at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy at sysmocom.de>
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-CC: Falkenber9 <robert.falkenberg at tu-dortmund.de>
Gerrit-Comment-Date: Sun, 09 May 2021 19:27:00 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210509/331c16ae/attachment.htm>


More information about the gerrit-log mailing list