Commit Graph

7 Commits

Author SHA1 Message Date
Philipp Maier e82fed7520 sysmo_isim_sja2: add full TUAK support and unit-tests
we do not have full TUAK support yet. All we can do so far is to set the
algorithm to TUAK, but we can not set configuration parameters and keys.
This patch adds features to modify the TUAK configuration byte. The key
and the TOP/TOPc is modified using the existing key and OP/OPC
commandline otions.

This patch also addes tests to verify sysmo-isim-tool.sja5.py. This also
includes TUAK. The tests are not activated for automatic testing yet
since the test fixture does not yet have a sysmo-isim-sja5 installed.

Related: SYS#6473
2023-06-23 14:05:44 +02:00
Philipp Maier 80653e791a tests: Make sure tests do not return with 0 on failure
The run-tests script that runs the two testsuites for the two different
supported card models returns 0, even when the tests fail. This tricks
jenkins into thinking everything were ok. Lets make sure the script is
stopped immediately and returns with 1 when the tests fail.
2020-02-18 13:34:54 +01:00
Philipp Maier 8dd52e04ac sja2: Add support for new simcard model
Adding support for the new SJA2 simcard type requires comprensive
refactoring of sysmo-usim-tool. We resolve the commonalities of
both simcard models in a class based approach so that code duplication
is reduced to a minium.

- Refactor sysmo-usim-tool into a class based model
- Add support for SJA2 simcard models
- Add tests for SJA2 simcard models

Change-Id: I0feab71bdaab079b35737bb4e0e2a417c4a1f96b
Related: SYS#4466
2020-01-06 11:09:21 +01:00
Philipp Maier 83760e2c22 Support programming of the MNC length value (EF.AD)
The file EF.AD contains the length of the MNC, this allows to phone to
distinguish where MCC/MNC end and where the MSIN number of the IMSI
begins. All cards are shipped with an MNC length of 2, which is fine for
the most situations, but when a MNC with 3 digits is needed the MNC
length value has to be updated. Otherwise the phone will recognize the
third digit of the MNC as part of the MSIN.

Related: OS#3850
2019-03-21 17:05:42 +01:00
Philipp Maier 75342b86d1 tests/run-tests: Prepare test card before executing the tests
All tests need a physical card to be inserted in a reader. This card may
have a different IMSI and/or ICCID id set than the one that is expected
by the tests. Since sysmo-usim-tool.sjs1.py unconditionally displays
IMSI and ICCID we find those parameters in every .out file.

In order to run the unit-tests without changing the .out files very often
or having to manually prepare a test card we should write the expected
IMSI and ICCID before each testsuite is executed.

- Add a script to the testsuite that prepares the testcard, run this
  script from run-tests before the actual tests are executed.

Change-Id: I470f4f7d5facab277b6e78252bac7cc4d1fbc6bb
Related: OS#3376
2018-08-08 12:30:13 +02:00
Philipp Maier 8c31a63f31 tests/run-tests: Replace == by -eq when comparing rc
The use of == with test seems to cause problems when comparing the
return code in line 20. Lets use -eq instead.

Change-Id: I92905770f3a96a632a51858952a82180303d6c05
Related: OS#3376
2018-08-08 12:28:22 +02:00
Harald Welte 5140557f3b Add testsuite
The idea of the testsuite is to test all functions of the utility
against one known SIM card that is inserted at the time the test
is executed.

We could insert this card into a reader attached to a
permanently-running machine and then use that as a jenkins build
test slave.
2017-08-16 23:16:17 +02:00