Attention is currently required from: dexter.
Jenkins Builder has posted comments on this change by dexter. ( https://gerrit.osmocom.org/c/pysim/+/37947?usp=email )
Change subject: suci-tutorial: add section about SUCI calculation by the USIM
......................................................................
Patch Set 3:
(1 comment)
File docs/suci-tutorial.rst:
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-18248):
https://gerrit.osmocom.org/c/pysim/+/37947/comment/3bf5a437_cc02af4e?usp=em… :
PS3, Line 212: specifiy any file or file format to store the key material. This means the exact
'specifiy' may be misspelled - perhaps 'specify'?
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/37947?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: I45d47f9278b30d99ebde6891de0ba8cc74b1a0a0
Gerrit-Change-Number: 37947
Gerrit-PatchSet: 3
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: dexter <pmaier(a)sysmocom.de>
Gerrit-Comment-Date: Tue, 03 Sep 2024 15:14:22 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Attention is currently required from: fixeria, laforge.
Jenkins Builder has posted comments on this change by dexter. ( https://gerrit.osmocom.org/c/pysim/+/37819?usp=email )
Change subject: Add testsuite for pySim-shell with real cards
......................................................................
Patch Set 16:
(1 comment)
File tests/pySim-shell_test/README.txt:
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-18247):
https://gerrit.osmocom.org/c/pysim/+/37819/comment/25eff2a5_2cf9e19b?usp=em… :
PS16, Line 10: Each testcase has its own subdirectory and can be executed separatly. The sub
'separatly' may be misspelled - perhaps 'separately'?
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/37819?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: Ieae1330767a6e55e62437f5f988a0d33b727b5de
Gerrit-Change-Number: 37819
Gerrit-PatchSet: 16
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Comment-Date: Tue, 03 Sep 2024 15:14:20 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/38006?usp=email )
Change subject: pySim-prog_test: tolerate missing .data files
......................................................................
pySim-prog_test: tolerate missing .data files
When the test detects a card, but does not find the .data faile for
it, then it fails. This can be a problem in case we want to intentionally
exclude a specific card model.
Related: OS#6532
Change-Id: Iba196ada0076385de7bffcb157a85fda0a6c1852
---
M tests/pySim-prog_test/pySim-prog_test.sh
1 file changed, 10 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/06/38006/1
diff --git a/tests/pySim-prog_test/pySim-prog_test.sh b/tests/pySim-prog_test/pySim-prog_test.sh
index e768d8f..215ebee 100755
--- a/tests/pySim-prog_test/pySim-prog_test.sh
+++ b/tests/pySim-prog_test/pySim-prog_test.sh
@@ -134,6 +134,11 @@
continue
fi
echo "Card is of type: $CARD_NAME"
+
+ if ! [ -r "$CARD_NAME.data" ]; then
+ echo "Warning: no .data file for this card, skipping..."
+ continue
+ fi
gen_ok_file $I $CARD_NAME
done
}
@@ -163,6 +168,11 @@
ADM_HEX=""
ADM_OPT="-a"
+ if ! [ -r "$CARD_NAME.data" ]; then
+ echo "Warning: no .data file for this card, skipping..."
+ continue
+ fi
+
source "$CARD_NAME.data"
if [ -n "$ADM_HEX" ]; then
ADM_OPT="-A"
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/38006?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: Iba196ada0076385de7bffcb157a85fda0a6c1852
Gerrit-Change-Number: 38006
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/38008?usp=email )
Change subject: pySim-shell: use upper case letters for positional arguments
......................................................................
pySim-shell: use upper case letters for positional arguments
When we define positional arguments for the argument parser, we usually
use upper case letters only. However, there are some code locations that
use lower case letters. Let's translate those to capital letters to
have a consistent appeariance.
Related: OS#6531
Change-Id: Iec1ff8262bc6e9cf87c3cbf7b32fa5f753b7e574
---
M pySim-shell.py
M pySim/filesystem.py
M pySim/ts_102_221.py
M pySim/ts_31_102.py
M pySim/ts_51_011.py
5 files changed, 36 insertions(+), 37 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/08/38008/1
diff --git a/pySim-shell.py b/pySim-shell.py
index 52e78d4..e0e0812 100755
--- a/pySim-shell.py
+++ b/pySim-shell.py
@@ -346,8 +346,7 @@
return -1
bulk_script_parser = argparse.ArgumentParser()
- bulk_script_parser.add_argument(
- 'script_path', help="path to the script file")
+ bulk_script_parser.add_argument('SCRIPT_PATH', help="path to the script file")
bulk_script_parser.add_argument('--halt_on_error', help='stop card handling if an exeption occurs',
action='store_true')
bulk_script_parser.add_argument('--tries', type=int, default=2,
@@ -363,7 +362,7 @@
"""Run script on multiple cards (bulk provisioning)"""
# Make sure that the script file exists and that it is readable.
- if not os.access(opts.script_path, os.R_OK):
+ if not os.access(opts.SCRIPT_PATH, os.R_OK):
self.poutput("Invalid script file!")
return
@@ -388,7 +387,7 @@
os.system(opts.pre_card_action)
# process the card
- rc = self._process_card(first, opts.script_path)
+ rc = self._process_card(first, opts.SCRIPT_PATH)
if rc == 0:
success_count = success_count + 1
self._show_success_sign()
@@ -440,13 +439,13 @@
first = False
echo_parser = argparse.ArgumentParser()
- echo_parser.add_argument('string', help="string to echo on the shell", nargs='+')
+ echo_parser.add_argument('STRING', help="string to echo on the shell", nargs='+')
@cmd2.with_argparser(echo_parser)
@cmd2.with_category(CUSTOM_CATEGORY)
def do_echo(self, opts):
"""Echo (print) a string on the console"""
- self.poutput(' '.join(opts.string))
+ self.poutput(' '.join(opts.STRING))
@cmd2.with_category(CUSTOM_CATEGORY)
def do_version(self, opts):
diff --git a/pySim/filesystem.py b/pySim/filesystem.py
index b166bc2..df6b59e 100644
--- a/pySim/filesystem.py
+++ b/pySim/filesystem.py
@@ -626,19 +626,19 @@
upd_bin_parser = argparse.ArgumentParser()
upd_bin_parser.add_argument(
'--offset', type=auto_uint16, default=0, help='Byte offset for start of read')
- upd_bin_parser.add_argument('data', type=is_hexstr, help='Data bytes (hex format) to write')
+ upd_bin_parser.add_argument('DATA', type=is_hexstr, help='Data bytes (hex format) to write')
@cmd2.with_argparser(upd_bin_parser)
def do_update_binary(self, opts):
"""Update (Write) data of a transparent EF"""
- (data, _sw) = self._cmd.lchan.update_binary(opts.data, opts.offset)
+ (data, _sw) = self._cmd.lchan.update_binary(opts.DATA, opts.offset)
if data:
self._cmd.poutput(data)
upd_bin_dec_parser = argparse.ArgumentParser()
upd_bin_dec_parser.add_argument('--json-path', type=str,
help='JSON path to modify specific element of file only')
- upd_bin_dec_parser.add_argument('data', help='Abstract data (JSON format) to write')
+ upd_bin_dec_parser.add_argument('DATA', help='Abstract data (JSON format) to write')
@cmd2.with_argparser(upd_bin_dec_parser)
def do_update_binary_decoded(self, opts):
@@ -646,9 +646,9 @@
if opts.json_path:
(data_json, _sw) = self._cmd.lchan.read_binary_dec()
js_path_modify(data_json, opts.json_path,
- json.loads(opts.data))
+ json.loads(opts.DATA))
else:
- data_json = json.loads(opts.data)
+ data_json = json.loads(opts.DATA)
(data, _sw) = self._cmd.lchan.update_binary_dec(data_json)
if data:
self._cmd.poutput_json(data)
@@ -841,13 +841,13 @@
read_rec_parser.add_argument(
'--count', type=auto_uint8, default=1, help='Number of records to be read, beginning at record_nr')
read_rec_parser.add_argument(
- 'record_nr', type=auto_uint8, help='Number of record to be read')
+ 'RECORD_NR', type=auto_uint8, help='Number of record to be read')
@cmd2.with_argparser(read_rec_parser)
def do_read_record(self, opts):
"""Read one or multiple records from a record-oriented EF"""
for r in range(opts.count):
- recnr = opts.record_nr + r
+ recnr = opts.RECORD_NR + r
(data, _sw) = self._cmd.lchan.read_record(recnr)
if len(data) > 0:
recstr = str(data)
@@ -859,12 +859,12 @@
read_rec_dec_parser.add_argument('--oneline', action='store_true',
help='No JSON pretty-printing, dump as a single line')
read_rec_dec_parser.add_argument(
- 'record_nr', type=auto_uint8, help='Number of record to be read')
+ 'RECORD_NR', type=auto_uint8, help='Number of record to be read')
@cmd2.with_argparser(read_rec_dec_parser)
def do_read_record_decoded(self, opts):
"""Read + decode a record from a record-oriented EF"""
- (data, _sw) = self._cmd.lchan.read_record_dec(opts.record_nr)
+ (data, _sw) = self._cmd.lchan.read_record_dec(opts.RECORD_NR)
self._cmd.poutput_json(data, opts.oneline)
read_recs_parser = argparse.ArgumentParser()
@@ -898,13 +898,13 @@
upd_rec_parser = argparse.ArgumentParser()
upd_rec_parser.add_argument(
- 'record_nr', type=auto_uint8, help='Number of record to be read')
- upd_rec_parser.add_argument('data', type=is_hexstr, help='Data bytes (hex format) to write')
+ 'RECORD_NR', type=auto_uint8, help='Number of record to be read')
+ upd_rec_parser.add_argument('DATA', type=is_hexstr, help='Data bytes (hex format) to write')
@cmd2.with_argparser(upd_rec_parser)
def do_update_record(self, opts):
"""Update (write) data to a record-oriented EF"""
- (data, _sw) = self._cmd.lchan.update_record(opts.record_nr, opts.data)
+ (data, _sw) = self._cmd.lchan.update_record(opts.RECORD_NR, opts.DATA)
if data:
self._cmd.poutput(data)
@@ -912,31 +912,31 @@
upd_rec_dec_parser.add_argument('--json-path', type=str,
help='JSON path to modify specific element of record only')
upd_rec_dec_parser.add_argument(
- 'record_nr', type=auto_uint8, help='Number of record to be read')
+ 'RECORD_NR', type=auto_uint8, help='Number of record to be read')
upd_rec_dec_parser.add_argument('data', help='Abstract data (JSON format) to write')
@cmd2.with_argparser(upd_rec_dec_parser)
def do_update_record_decoded(self, opts):
"""Encode + Update (write) data to a record-oriented EF"""
if opts.json_path:
- (data_json, _sw) = self._cmd.lchan.read_record_dec(opts.record_nr)
+ (data_json, _sw) = self._cmd.lchan.read_record_dec(opts.RECORD_NR)
js_path_modify(data_json, opts.json_path,
json.loads(opts.data))
else:
data_json = json.loads(opts.data)
(data, _sw) = self._cmd.lchan.update_record_dec(
- opts.record_nr, data_json)
+ opts.RECORD_NR, data_json)
if data:
self._cmd.poutput(data)
edit_rec_dec_parser = argparse.ArgumentParser()
edit_rec_dec_parser.add_argument(
- 'record_nr', type=auto_uint8, help='Number of record to be edited')
+ 'RECORD_NR', type=auto_uint8, help='Number of record to be edited')
@cmd2.with_argparser(edit_rec_dec_parser)
def do_edit_record_decoded(self, opts):
"""Edit the JSON representation of one record in an editor."""
- (orig_json, _sw) = self._cmd.lchan.read_record_dec(opts.record_nr)
+ (orig_json, _sw) = self._cmd.lchan.read_record_dec(opts.RECORD_NR)
with tempfile.TemporaryDirectory(prefix='pysim_') as dirname:
filename = '%s/file' % dirname
# write existing data as JSON to file
@@ -950,7 +950,7 @@
self._cmd.poutput("Data not modified, skipping write")
else:
(data, _sw) = self._cmd.lchan.update_record_dec(
- opts.record_nr, edited_json)
+ opts.RECORD_NR, edited_json)
if data:
self._cmd.poutput_json(data)
@@ -1302,12 +1302,12 @@
retrieve_data_parser = argparse.ArgumentParser()
retrieve_data_parser.add_argument(
- 'tag', type=auto_int, help='BER-TLV Tag of value to retrieve')
+ 'TAG', type=auto_int, help='BER-TLV Tag of value to retrieve')
@cmd2.with_argparser(retrieve_data_parser)
def do_retrieve_data(self, opts):
"""Retrieve (Read) data from a BER-TLV EF"""
- (data, _sw) = self._cmd.lchan.retrieve_data(opts.tag)
+ (data, _sw) = self._cmd.lchan.retrieve_data(opts.TAG)
self._cmd.poutput(data)
def do_retrieve_tags(self, _opts):
@@ -1317,24 +1317,24 @@
set_data_parser = argparse.ArgumentParser()
set_data_parser.add_argument(
- 'tag', type=auto_int, help='BER-TLV Tag of value to set')
+ 'TAG', type=auto_int, help='BER-TLV Tag of value to set')
set_data_parser.add_argument('data', type=is_hexstr, help='Data bytes (hex format) to write')
@cmd2.with_argparser(set_data_parser)
def do_set_data(self, opts):
"""Set (Write) data for a given tag in a BER-TLV EF"""
- (data, _sw) = self._cmd.lchan.set_data(opts.tag, opts.data)
+ (data, _sw) = self._cmd.lchan.set_data(opts.TAG, opts.data)
if data:
self._cmd.poutput(data)
del_data_parser = argparse.ArgumentParser()
del_data_parser.add_argument(
- 'tag', type=auto_int, help='BER-TLV Tag of value to set')
+ 'TAG', type=auto_int, help='BER-TLV Tag of value to set')
@cmd2.with_argparser(del_data_parser)
def do_delete_data(self, opts):
"""Delete data for a given tag in a BER-TLV EF"""
- (data, _sw) = self._cmd.lchan.set_data(opts.tag, None)
+ (data, _sw) = self._cmd.lchan.set_data(opts.TAG, None)
if data:
self._cmd.poutput(data)
diff --git a/pySim/ts_102_221.py b/pySim/ts_102_221.py
index 9e0db68..15307a1 100644
--- a/pySim/ts_102_221.py
+++ b/pySim/ts_102_221.py
@@ -905,14 +905,14 @@
'Negotiated Duration: %u secs, Token: %s, SW: %s' % (duration, token, sw))
resume_uicc_parser = argparse.ArgumentParser()
- resume_uicc_parser.add_argument('token', type=str, help='Token provided during SUSPEND')
+ resume_uicc_parser.add_argument('TOKEN', type=str, help='Token provided during SUSPEND')
@cmd2.with_argparser(resume_uicc_parser)
def do_resume_uicc(self, opts):
"""Perform the REUSME UICC operation. Only supported on some UICC. Also: A power-cycle
of the card is required between SUSPEND and RESUME, and only very few non-RESUME
commands are permitted between SUSPEND and RESUME. See TS 102 221 Section 11.1.22."""
- self._cmd.card._scc.resume_uicc(opts.token)
+ self._cmd.card._scc.resume_uicc(opts.TOKEN)
term_cap_parser = argparse.ArgumentParser()
# power group
diff --git a/pySim/ts_31_102.py b/pySim/ts_31_102.py
index c82cd2f..4161ad8 100644
--- a/pySim/ts_31_102.py
+++ b/pySim/ts_31_102.py
@@ -1706,14 +1706,14 @@
@with_default_category('Application-Specific Commands')
class AddlShellCommands(CommandSet):
authenticate_parser = argparse.ArgumentParser()
- authenticate_parser.add_argument('rand', type=is_hexstr, help='Random challenge')
- authenticate_parser.add_argument('autn', type=is_hexstr, help='Authentication Nonce')
+ authenticate_parser.add_argument('RAND', type=is_hexstr, help='Random challenge')
+ authenticate_parser.add_argument('AUTN', type=is_hexstr, help='Authentication Nonce')
#authenticate_parser.add_argument('--context', help='Authentication context', default='3G')
@cmd2.with_argparser(authenticate_parser)
def do_authenticate(self, opts):
"""Perform Authentication and Key Agreement (AKA)."""
- (data, _sw) = self._cmd.lchan.scc.authenticate(opts.rand, opts.autn)
+ (data, _sw) = self._cmd.lchan.scc.authenticate(opts.RAND, opts.AUTN)
self._cmd.poutput_json(data)
term_prof_parser = argparse.ArgumentParser()
diff --git a/pySim/ts_51_011.py b/pySim/ts_51_011.py
index f6bd3cc..6d834f0 100644
--- a/pySim/ts_51_011.py
+++ b/pySim/ts_51_011.py
@@ -1072,12 +1072,12 @@
super().__init__()
authenticate_parser = argparse.ArgumentParser()
- authenticate_parser.add_argument('rand', type=is_hexstr, help='Random challenge')
+ authenticate_parser.add_argument('RAND', type=is_hexstr, help='Random challenge')
@cmd2.with_argparser(authenticate_parser)
def do_authenticate(self, opts):
"""Perform GSM Authentication."""
- (data, sw) = self._cmd.lchan.scc.run_gsm(opts.rand)
+ (data, sw) = self._cmd.lchan.scc.run_gsm(opts.RAND)
self._cmd.poutput_json(data)
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/38008?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: Iec1ff8262bc6e9cf87c3cbf7b32fa5f753b7e574
Gerrit-Change-Number: 38008
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/38005?usp=email )
Change subject: pySim-prog_test: tolerate empty reader slots
......................................................................
pySim-prog_test: tolerate empty reader slots
The test currently expects all reader slots to be populated. This means
the cards may plugged into a random order, but there may not be any empty
slots in the system at all. This requirement is easy to meet when each
card has its own single-slot USB PCSC-reader, but as soon as multislot
readers are used there may be some empty slots.
Related: OS#6532
Change-Id: I7ba1d1350b6998d65e90408184accdb212556a7c
---
M tests/pySim-prog_test/pySim-prog_test.sh
1 file changed, 6 insertions(+), 5 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/05/38005/1
diff --git a/tests/pySim-prog_test/pySim-prog_test.sh b/tests/pySim-prog_test/pySim-prog_test.sh
index 173822a..e768d8f 100755
--- a/tests/pySim-prog_test/pySim-prog_test.sh
+++ b/tests/pySim-prog_test/pySim-prog_test.sh
@@ -130,8 +130,8 @@
echo "Probing card in terminal #$I"
CARD_NAME=$(probe_card $I)
if [ -z "$CARD_NAME" ]; then
- echo "Error: Unresponsive card!"
- exit 1
+ echo "Warning: Unresponsive card!"
+ continue
fi
echo "Card is of type: $CARD_NAME"
gen_ok_file $I $CARD_NAME
@@ -146,8 +146,8 @@
echo "Probing card in terminal #$I"
CARD_NAME=$(probe_card $I)
if [ -z "$CARD_NAME" ]; then
- echo "Error: Unresponsive card!"
- exit 1
+ echo "Warning: Unresponsive card, trying next terminal..."
+ continue
fi
echo "Card is of type: $CARD_NAME"
@@ -216,7 +216,8 @@
# then the number of cards will be used as reader number.
gen_card_list
if [ $N_TERMINALS -eq 0 ]; then
- N_TERMINALS=$N_CARDS
+ N_TERMINALS=`pcsc_scan -r | sed '$!d' | cut -d ':' -f 1`
+ ((N_TERMINALS++))
fi
echo "Number of card terminals installed: $N_TERMINALS"
echo ""
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/38005?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I7ba1d1350b6998d65e90408184accdb212556a7c
Gerrit-Change-Number: 38005
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Attention is currently required from: fixeria, laforge.
dexter has posted comments on this change by dexter. ( https://gerrit.osmocom.org/c/pysim/+/37819?usp=email )
Change subject: Add testsuite for pySim-shell with real cards
......................................................................
Patch Set 16:
(2 comments)
File tests/pySim-shell_test/ara_m/test.py:
https://gerrit.osmocom.org/c/pysim/+/37819/comment/ee8e6d4a_ad5d6d31?usp=em… :
PS15, Line 27: self.setup(__file__)
> Either what @laforge@osmocom.org suggested, or adding a class variable should work. […]
Thanks for your hints. Now it works!
https://gerrit.osmocom.org/c/pysim/+/37819/comment/11e90de4_e5f687d8?usp=em… :
PS15, Line 35: self.cleanup()
> I would prefer a solution that does not have to define a class variable in every derived class (test […]
Done
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/37819?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: Ieae1330767a6e55e62437f5f988a0d33b727b5de
Gerrit-Change-Number: 37819
Gerrit-PatchSet: 16
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Comment-Date: Tue, 03 Sep 2024 15:13:22 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: laforge <laforge(a)osmocom.org>
Comment-In-Reply-To: fixeria <vyanitskiy(a)sysmocom.de>
Comment-In-Reply-To: dexter <pmaier(a)sysmocom.de>
Attention is currently required from: fixeria, laforge.
Hello Jenkins Builder, laforge,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/pysim/+/37819?usp=email
to look at the new patch set (#16).
The following approvals got outdated and were removed:
Verified-1 by Jenkins Builder
Change subject: Add testsuite for pySim-shell with real cards
......................................................................
Add testsuite for pySim-shell with real cards
This patch adds a comprehensive testsuite for pySim-shell. The testsuite
is based on python's unittest framework in combination with pySim-shell
scripts.
Related: OS#6531
Change-Id: Ieae1330767a6e55e62437f5f988a0d33b727b5de
---
M contrib/jenkins.sh
A tests/pySim-shell_test/README.txt
A tests/pySim-shell_test/__init__.py
A tests/pySim-shell_test/ara_m/__init__.py
A tests/pySim-shell_test/ara_m/adf_ara-m.cfg.ok
A tests/pySim-shell_test/ara_m/adf_ara-m.script.ok
A tests/pySim-shell_test/ara_m/adf_ara-m_empty.cfg.ok
A tests/pySim-shell_test/ara_m/test.py
A tests/pySim-shell_test/ara_m/test.script
A tests/pySim-shell_test/authenticate/__init__.py
A tests/pySim-shell_test/authenticate/auth_result.ok
A tests/pySim-shell_test/authenticate/test.py
A tests/pySim-shell_test/authenticate/test.script
A tests/pySim-shell_test/card_data.csv
A tests/pySim-shell_test/cardinfo/__init__.py
A tests/pySim-shell_test/cardinfo/sysmoEUICC1-C2T-cardinfo.ok
A tests/pySim-shell_test/cardinfo/sysmoISIM-SJA2-cardinfo.ok
A tests/pySim-shell_test/cardinfo/sysmoISIM-SJA5-S17-cardinfo.ok
A tests/pySim-shell_test/cardinfo/sysmoSIM-GR1-cardinfo.ok
A tests/pySim-shell_test/cardinfo/test.py
A tests/pySim-shell_test/cardinfo/test.template
A tests/pySim-shell_test/chv/__init__.py
A tests/pySim-shell_test/chv/test.py
A tests/pySim-shell_test/chv/test_manage_csv.ok
A tests/pySim-shell_test/chv/test_manage_csv.template
A tests/pySim-shell_test/chv/test_manage_direct.ok
A tests/pySim-shell_test/chv/test_manage_direct.template
A tests/pySim-shell_test/chv/test_unblock_csv.ok
A tests/pySim-shell_test/chv/test_unblock_csv.script
A tests/pySim-shell_test/chv/test_unblock_direct.ok
A tests/pySim-shell_test/chv/test_unblock_direct.template
A tests/pySim-shell_test/config.yaml
A tests/pySim-shell_test/euicc/__init__.py
A tests/pySim-shell_test/euicc/enable_disable_profile.ok
A tests/pySim-shell_test/euicc/euicc_info1.ok
A tests/pySim-shell_test/euicc/euicc_info2.ok
A tests/pySim-shell_test/euicc/get_eid.ok
A tests/pySim-shell_test/euicc/get_profiles_info.ok
A tests/pySim-shell_test/euicc/notifications.ok
A tests/pySim-shell_test/euicc/set_nickname.ok
A tests/pySim-shell_test/euicc/test.py
A tests/pySim-shell_test/euicc/test_enable_disable_profile.script
A tests/pySim-shell_test/euicc/test_gen_notif.script
A tests/pySim-shell_test/euicc/test_get_eid.script
A tests/pySim-shell_test/euicc/test_get_euicc_info.script
A tests/pySim-shell_test/euicc/test_get_profiles_info.script
A tests/pySim-shell_test/euicc/test_list_notif.script
A tests/pySim-shell_test/euicc/test_rm_notif.template
A tests/pySim-shell_test/euicc/test_set_nickname.script
A tests/pySim-shell_test/export/__init__.py
A tests/pySim-shell_test/export/export.script.ok
A tests/pySim-shell_test/export/test.py
A tests/pySim-shell_test/export/test.script
A tests/pySim-shell_test/file_admin/__init__.py
A tests/pySim-shell_test/file_admin/activate_deactivate_file.ok
A tests/pySim-shell_test/file_admin/test.py
A tests/pySim-shell_test/file_admin/test_activate_deactivate_file.script
A tests/pySim-shell_test/file_admin/test_create_delete_df.script
A tests/pySim-shell_test/file_admin/test_create_resize_delete_linear_fixed_ef.script
A tests/pySim-shell_test/file_admin/test_create_resize_delete_transparent_ef.script
A tests/pySim-shell_test/file_content/__init__.py
A tests/pySim-shell_test/file_content/test.py
A tests/pySim-shell_test/file_content/test_ber_tlv_uicc.ok
A tests/pySim-shell_test/file_content/test_ber_tlv_uicc.script
A tests/pySim-shell_test/file_content/test_binary_sim.ok
A tests/pySim-shell_test/file_content/test_binary_sim.script
A tests/pySim-shell_test/file_content/test_binary_uicc.ok
A tests/pySim-shell_test/file_content/test_binary_uicc.script
A tests/pySim-shell_test/file_content/test_record_sim.ok
A tests/pySim-shell_test/file_content/test_record_sim.script
A tests/pySim-shell_test/file_content/test_record_uicc.ok
A tests/pySim-shell_test/file_content/test_record_uicc.script
A tests/pySim-shell_test/file_specific/__init__.py
A tests/pySim-shell_test/file_specific/ef_imsi.ok
A tests/pySim-shell_test/file_specific/test.py
A tests/pySim-shell_test/file_specific/test_ef_ist.ok
A tests/pySim-shell_test/file_specific/test_ef_ist.script
A tests/pySim-shell_test/file_specific/test_ef_ust.ok
A tests/pySim-shell_test/file_specific/test_ef_ust.script
A tests/pySim-shell_test/file_specific/test_update_imsi_plmn.script
A tests/pySim-shell_test/fsdump/__init__.py
A tests/pySim-shell_test/fsdump/fsdump.json.ok
A tests/pySim-shell_test/fsdump/test.py
A tests/pySim-shell_test/fsdump/test.script
A tests/pySim-shell_test/get_identity/__init__.py
A tests/pySim-shell_test/get_identity/test.py
A tests/pySim-shell_test/get_identity/test.script
A tests/pySim-shell_test/gp/__init__.py
A tests/pySim-shell_test/gp/get_status_isd.ok
A tests/pySim-shell_test/gp/key_information.ok
A tests/pySim-shell_test/gp/test.py
A tests/pySim-shell_test/gp/test_est_scp02_csv.script
A tests/pySim-shell_test/gp/test_est_scp02_direct.template
A tests/pySim-shell_test/gp/test_est_scp03_csv.script
A tests/pySim-shell_test/gp/test_est_scp03_direct.template
A tests/pySim-shell_test/gp/test_get_status.script
A tests/pySim-shell_test/gp/test_put_delete_key.script
A tests/pySim-shell_test/lchan/__init__.py
A tests/pySim-shell_test/lchan/test.ok
A tests/pySim-shell_test/lchan/test.py
A tests/pySim-shell_test/lchan/test.script
A tests/pySim-shell_test/navigate_fs/__init__.py
A tests/pySim-shell_test/navigate_fs/checkpoints_sim.ok
A tests/pySim-shell_test/navigate_fs/checkpoints_uicc.ok
A tests/pySim-shell_test/navigate_fs/test.py
A tests/pySim-shell_test/navigate_fs/test_sim.script
A tests/pySim-shell_test/navigate_fs/test_uicc.script
A tests/pySim-shell_test/utils.py
A tests/pySim-shell_test/verify_adm/__init__.py
A tests/pySim-shell_test/verify_adm/test.py
A tests/pySim-shell_test/verify_adm/test_cmdline.script
A tests/pySim-shell_test/verify_adm/test_csv.script
A tests/pySim-shell_test/verify_adm/test_direct.template
113 files changed, 22,411 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/19/37819/16
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/37819?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: Ieae1330767a6e55e62437f5f988a0d33b727b5de
Gerrit-Change-Number: 37819
Gerrit-PatchSet: 16
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
dexter has submitted this change. ( https://gerrit.osmocom.org/c/pysim/+/37823?usp=email )
(
13 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the submitted one.
)Change subject: tests: move pySim-prog test and its data into a sub directory
......................................................................
tests: move pySim-prog test and its data into a sub directory
We currently have the shell script that performs the test in the
tests directory and the related data in pysim-testdata directory.
This is confusing, let's have evrything in a dedicated sub directory
Change-Id: Ic995a7f600d164fc0be3c2eb8255dbe043429bea
Related: OS#6531
---
M contrib/jenkins.sh
R tests/pySim-prog_test/Fairwaves-SIM.data
R tests/pySim-prog_test/Fairwaves-SIM.ok
R tests/pySim-prog_test/Wavemobile-SIM.data
R tests/pySim-prog_test/Wavemobile-SIM.ok
R tests/pySim-prog_test/fakemagicsim.data
R tests/pySim-prog_test/fakemagicsim.ok
R tests/pySim-prog_test/pySim-prog_test.sh
R tests/pySim-prog_test/sysmoISIM-SJA2.data
R tests/pySim-prog_test/sysmoISIM-SJA2.ok
R tests/pySim-prog_test/sysmoUSIM-SJS1.data
R tests/pySim-prog_test/sysmoUSIM-SJS1.ok
R tests/pySim-prog_test/sysmosim-gr1.data
R tests/pySim-prog_test/sysmosim-gr1.ok
14 files changed, 7 insertions(+), 7 deletions(-)
Approvals:
Jenkins Builder: Verified
laforge: Looks good to me, approved
diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh
index 099c338..b3d83dd 100755
--- a/contrib/jenkins.sh
+++ b/contrib/jenkins.sh
@@ -9,7 +9,7 @@
export PYTHONUNBUFFERED=1
-if [ ! -d "./pysim-testdata/" ] ; then
+if [ ! -d "./tests/" ] ; then
echo "###############################################"
echo "Please call from pySim-prog top directory"
echo "###############################################"
@@ -29,10 +29,10 @@
# Execute automatically discovered unit tests first
python -m unittest discover -v -s tests/unittests
- # Run the test with physical cards
- cd pysim-testdata
- ../tests/pySim-prog_test.sh
- cd ..
+ # Run pySim-prog integration tests (requires physical cards)
+ cd tests/pySim-prog_test/
+ ./pySim-prog_test.sh
+ cd ../../
# Run pySim-trace test
tests/pySim-trace_test/pySim-trace_test.sh
diff --git a/pysim-testdata/Fairwaves-SIM.data b/tests/pySim-prog_test/Fairwaves-SIM.data
similarity index 100%
rename from pysim-testdata/Fairwaves-SIM.data
rename to tests/pySim-prog_test/Fairwaves-SIM.data
diff --git a/pysim-testdata/Fairwaves-SIM.ok b/tests/pySim-prog_test/Fairwaves-SIM.ok
similarity index 100%
rename from pysim-testdata/Fairwaves-SIM.ok
rename to tests/pySim-prog_test/Fairwaves-SIM.ok
diff --git a/pysim-testdata/Wavemobile-SIM.data b/tests/pySim-prog_test/Wavemobile-SIM.data
similarity index 100%
rename from pysim-testdata/Wavemobile-SIM.data
rename to tests/pySim-prog_test/Wavemobile-SIM.data
diff --git a/pysim-testdata/Wavemobile-SIM.ok b/tests/pySim-prog_test/Wavemobile-SIM.ok
similarity index 100%
rename from pysim-testdata/Wavemobile-SIM.ok
rename to tests/pySim-prog_test/Wavemobile-SIM.ok
diff --git a/pysim-testdata/fakemagicsim.data b/tests/pySim-prog_test/fakemagicsim.data
similarity index 100%
rename from pysim-testdata/fakemagicsim.data
rename to tests/pySim-prog_test/fakemagicsim.data
diff --git a/pysim-testdata/fakemagicsim.ok b/tests/pySim-prog_test/fakemagicsim.ok
similarity index 100%
rename from pysim-testdata/fakemagicsim.ok
rename to tests/pySim-prog_test/fakemagicsim.ok
diff --git a/tests/pySim-prog_test.sh b/tests/pySim-prog_test/pySim-prog_test.sh
similarity index 98%
rename from tests/pySim-prog_test.sh
rename to tests/pySim-prog_test/pySim-prog_test.sh
index 28d9777..173822a 100755
--- a/tests/pySim-prog_test.sh
+++ b/tests/pySim-prog_test/pySim-prog_test.sh
@@ -20,8 +20,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-PYSIM_PROG=../pySim-prog.py
-PYSIM_READ=../pySim-read.py
+PYSIM_PROG=../../pySim-prog.py
+PYSIM_READ=../../pySim-read.py
TEMPFILE=temp.tmp
PYTHON=python3
diff --git a/pysim-testdata/sysmoISIM-SJA2.data b/tests/pySim-prog_test/sysmoISIM-SJA2.data
similarity index 100%
rename from pysim-testdata/sysmoISIM-SJA2.data
rename to tests/pySim-prog_test/sysmoISIM-SJA2.data
diff --git a/pysim-testdata/sysmoISIM-SJA2.ok b/tests/pySim-prog_test/sysmoISIM-SJA2.ok
similarity index 100%
rename from pysim-testdata/sysmoISIM-SJA2.ok
rename to tests/pySim-prog_test/sysmoISIM-SJA2.ok
diff --git a/pysim-testdata/sysmoUSIM-SJS1.data b/tests/pySim-prog_test/sysmoUSIM-SJS1.data
similarity index 100%
rename from pysim-testdata/sysmoUSIM-SJS1.data
rename to tests/pySim-prog_test/sysmoUSIM-SJS1.data
diff --git a/pysim-testdata/sysmoUSIM-SJS1.ok b/tests/pySim-prog_test/sysmoUSIM-SJS1.ok
similarity index 100%
rename from pysim-testdata/sysmoUSIM-SJS1.ok
rename to tests/pySim-prog_test/sysmoUSIM-SJS1.ok
diff --git a/pysim-testdata/sysmosim-gr1.data b/tests/pySim-prog_test/sysmosim-gr1.data
similarity index 100%
rename from pysim-testdata/sysmosim-gr1.data
rename to tests/pySim-prog_test/sysmosim-gr1.data
diff --git a/pysim-testdata/sysmosim-gr1.ok b/tests/pySim-prog_test/sysmosim-gr1.ok
similarity index 100%
rename from pysim-testdata/sysmosim-gr1.ok
rename to tests/pySim-prog_test/sysmosim-gr1.ok
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/37823?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: Ic995a7f600d164fc0be3c2eb8255dbe043429bea
Gerrit-Change-Number: 37823
Gerrit-PatchSet: 15
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
dexter has submitted this change. ( https://gerrit.osmocom.org/c/pysim/+/37822?usp=email )
(
7 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the submitted one.
)Change subject: tests: move pySim-trace test and its data into a sub directory
......................................................................
tests: move pySim-trace test and its data into a sub directory
We currently have the test data for pySim-trace in pysim-testdata.
This means we mix the test data with the data from our original
pySim integration tests. This is very confusing. Let's put the
test data and the testcase for pySim-trace into a dedicated
sub directory.
Change-Id: I565b4268a05c1a1334b5e7d3fbcd9ef2ef0f0c4c
Related: OS#6531
---
M contrib/jenkins.sh
R tests/pySim-trace_test/pySim-trace_test.sh
R tests/pySim-trace_test/pySim-trace_test_gsmtap.pcapng
R tests/pySim-trace_test/pySim-trace_test_gsmtap.pcapng.ok
4 files changed, 6 insertions(+), 3 deletions(-)
Approvals:
laforge: Looks good to me, approved
Jenkins Builder: Verified
diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh
index 3dabdd7..099c338 100755
--- a/contrib/jenkins.sh
+++ b/contrib/jenkins.sh
@@ -32,7 +32,10 @@
# Run the test with physical cards
cd pysim-testdata
../tests/pySim-prog_test.sh
- ../tests/pySim-trace_test.sh
+ cd ..
+
+ # Run pySim-trace test
+ tests/pySim-trace_test/pySim-trace_test.sh
;;
"distcheck")
virtualenv -p python3 venv --system-site-packages
diff --git a/tests/pySim-trace_test.sh b/tests/pySim-trace_test/pySim-trace_test.sh
similarity index 95%
rename from tests/pySim-trace_test.sh
rename to tests/pySim-trace_test/pySim-trace_test.sh
index 3e200c3..ec23ad3 100755
--- a/tests/pySim-trace_test.sh
+++ b/tests/pySim-trace_test/pySim-trace_test.sh
@@ -20,8 +20,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-PYSIM_TRACE=../pySim-trace.py
-GSMTAP_TRACE=pySim-trace_test_gsmtap.pcapng
+PYSIM_TRACE=./pySim-trace.py
+GSMTAP_TRACE=./tests/pySim-trace_test/pySim-trace_test_gsmtap.pcapng
TEMPFILE=temp.tmp
export PYSIM_INTEGRATION_TEST=1
diff --git a/pysim-testdata/pySim-trace_test_gsmtap.pcapng b/tests/pySim-trace_test/pySim-trace_test_gsmtap.pcapng
similarity index 100%
rename from pysim-testdata/pySim-trace_test_gsmtap.pcapng
rename to tests/pySim-trace_test/pySim-trace_test_gsmtap.pcapng
Binary files differ
diff --git a/pysim-testdata/pySim-trace_test_gsmtap.pcapng.ok b/tests/pySim-trace_test/pySim-trace_test_gsmtap.pcapng.ok
similarity index 100%
rename from pysim-testdata/pySim-trace_test_gsmtap.pcapng.ok
rename to tests/pySim-trace_test/pySim-trace_test_gsmtap.pcapng.ok
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/37822?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I565b4268a05c1a1334b5e7d3fbcd9ef2ef0f0c4c
Gerrit-Change-Number: 37822
Gerrit-PatchSet: 9
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de>