tool for "re-formatting" [sysmocom] cards in tester
In our automatic testing of pySim, we (every so often) run into the problem of some prior test case execution (e.g. as part of gerrit build verification) leaving the card in a different state than expected by the next test case execution.
We would need a tool that would "re-format" the card, to ensure it always is in 100% the expected state. At least for sysmoISIM-SJA2, sysmoTSIM-SJA1, sysmoUSIM-SJA2 and other "recent" card models this is very much possible.The tool should ideally be "generic" so it can be parametrized with
- the specific card profile and profile version to load
- the personalization script to use (to set keys/PINs/...)
That way the tool can be used for all current and future card models.
We will be installing it on the build slave in a way that only 'root' has access to the tool and related files, and the jenkins-build user will get sudo privilege only to execute the tool but not to read or modify the card profiles etc.
Updated by laforge over 2 years ago
- % Done changed from 0 to 30
as we now have support for the proprietary files of the cards in pySim/sysmocom_sja2.py, the
export command actually also exports those files in binary form, meaning we are pretty close to a "generic" full backup.
There still are some files (like PIN/PUK/ADM) that cannot be read even with ADM1 pin, and hence those are not part of the 'export' and not of any restore either.
But I guess it should already be very usable the purpose of restoring the card into a known state in our automatic testers. dexter please feel free to give it a try.