Commit Graph

13 Commits

Author SHA1 Message Date
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 3bd5054d56 sysmo_usimsjs1: use correct parameter for 3G auth
when programming the 3G authentication (EF_AUTH), the parameter for 2G
is used.

- make sure that parameter algo_3g_str is used to select the 3g
  authentication algorithem, do not use algo_2g_str here.

Change-Id: I6aaf49062f6faf36455dc48639dc58f3da8e804d
2018-10-24 17:37:24 +02:00
Philipp Maier 48c0993312 tests/test-data: Update ADM1 key
Updated the test-data to the ADM1 key of the test card we currently have
in use. Developers must change this ADM1 key to match theur own
testcards.

Change-Id: I68e7a739fa093d255006bf427c0a332610935800
Related: OS#3376
2018-08-08 12:30:13 +02: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 12f0d25693 tests/08_seq: Test resetting of SEQ/SQN
the resetting of the SEQ/SQN parameters is currently not tested, we
currently only read out the parameters. Lets test resetting as well.

Change-Id: Ie3e386a79f69cd5e35782f593c3a30e1d2b50afb
Related: OS#3376
2018-08-08 12:30:13 +02:00
Philipp Maier 050231d86c tests/05_milenage_par: Extend unit test
At the moment we only read the milenage parameters but we do not write
them. Lets extend the unit test so that we test writing as well.

Change-Id: I81dd27b3e65510db931188171093f0e909cde16f
Related: OS#3376
2018-08-08 12:30:13 +02:00
Philipp Maier 6868ea7c26 tests/08_seq: Update .out file
The log output for writing the SQN parameters has changed. Update the
.out file accordingly

Change-Id: I58e7c44d3ff0a1c4fea7b8edaa4ca7326a4fd88a
Related: OS#3376
2018-08-08 12:29:50 +02:00
Philipp Maier 01d60a1f03 tests/04_algo: Update .out file
The output for the Algo setting has changed. Update the .out file
accordingly.

Change-Id: Ia9d175e0a8dbd02fd518f1735e42aa56296ea24d
Related: OS#3376
2018-08-08 12:29:26 +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
Philipp Maier 0868212cc8 tests/04_algo.sh: Fix string concatenation.
The concatenation

ALGOS=+"MILENAGE:...

seems to cause problems. Lets replace it with:

ALGOS=$ALGOS"MILENAGE:...

Change-Id: I8d946c47502305be77595cd45a64708d03441dd5
Related OS#3376
2018-08-08 12:28:22 +02:00
Harald Welte 5c15b238f5 Divide SQNms Offset by 6
The SQNms offset is a *byte* index into the SQNA file, let's divide
this by 6 before showing it to the user, so he can immediately
make the connection into the SQN array dumped below
2017-08-17 14:38:07 +02:00
Harald Welte 9b3c122329 Fix decoding of SQN values in SYSMO_USIMSJS1_FILE_EF_SQNC 2017-08-17 13:15:39 +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