Attention is currently required from: osmith.
daniel has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/27148 )
Change subject: scripts/osmocom-packages-docker: docker run --rm
......................................................................
Patch Set 2: Code-Review+1
--
To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/27148
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-Change-Id: I357ae8071d27088a2c0a74f962ac1589bff43a70
Gerrit-Change-Number: 27148
Gerrit-PatchSet: 2
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de>
Gerrit-Attention: osmith <osmith(a)sysmocom.de>
Gerrit-Comment-Date: Fri, 11 Feb 2022 15:17:05 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: osmith.
daniel has posted comments on this change. ( https://gerrit.osmocom.org/c/docker-playground/+/27160 )
Change subject: treewide: fix missing --rm for "docker run"
......................................................................
Patch Set 1: -Code-Review
--
To view, visit https://gerrit.osmocom.org/c/docker-playground/+/27160
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-Change-Id: I48b01c43fedf379b8a565eaab0369806d7831bd8
Gerrit-Change-Number: 27160
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: osmith <osmith(a)sysmocom.de>
Gerrit-Comment-Date: Fri, 11 Feb 2022 15:16:10 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: osmith.
daniel has posted comments on this change. ( https://gerrit.osmocom.org/c/docker-playground/+/27160 )
Change subject: treewide: fix missing --rm for "docker run"
......................................................................
Patch Set 1: Code-Review+1
--
To view, visit https://gerrit.osmocom.org/c/docker-playground/+/27160
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-Change-Id: I48b01c43fedf379b8a565eaab0369806d7831bd8
Gerrit-Change-Number: 27160
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: osmith <osmith(a)sysmocom.de>
Gerrit-Comment-Date: Fri, 11 Feb 2022 15:15:38 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: osmith.
fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/docker-playground/+/27160 )
Change subject: treewide: fix missing --rm for "docker run"
......................................................................
Patch Set 1: Code-Review-1
(3 comments)
Patchset:
PS1:
CR-1 for duplicate --rm.
File common/pipework:
https://gerrit.osmocom.org/c/docker-playground/+/27160/comment/984340e1_6f6…
PS1, Line 426: --rm
Do you think we should submit a bug report or PR to the upstream?
https://github.com/jpetazzo/pipework
File ttcn3-ggsn-test/jenkins.sh:
https://gerrit.osmocom.org/c/docker-playground/+/27160/comment/1c779c8b_a2b…
PS1, Line 62: --rm \
It's already here.
--
To view, visit https://gerrit.osmocom.org/c/docker-playground/+/27160
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-Change-Id: I48b01c43fedf379b8a565eaab0369806d7831bd8
Gerrit-Change-Number: 27160
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: osmith <osmith(a)sysmocom.de>
Gerrit-Comment-Date: Fri, 11 Feb 2022 15:15:37 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: osmith.
fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/docker-playground/+/27158 )
Change subject: make/Makefile: always use docker run --rm
......................................................................
Patch Set 1: Code-Review+1
--
To view, visit https://gerrit.osmocom.org/c/docker-playground/+/27158
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-Change-Id: Iea063aa39a08397ea64d2018b433991a130e7f56
Gerrit-Change-Number: 27158
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: osmith <osmith(a)sysmocom.de>
Gerrit-Comment-Date: Fri, 11 Feb 2022 14:59:11 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/27164 )
Change subject: pySim-shell: export: allow export as JSON instead of hex
......................................................................
pySim-shell: export: allow export as JSON instead of hex
The primary use case of the --json option is to systematically execute
all of our decoder classes in order to find bugs. As we don't have
encoders for all files yet, the output generated by 'export --json'
will in many cases not be executable as script again, unlike the normal
'export' output.
Change-Id: Idd820f8e3af70ebcbf82037b56fd2ae9655afbc5
---
M pySim-shell.py
1 file changed, 27 insertions(+), 14 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/64/27164/1
diff --git a/pySim-shell.py b/pySim-shell.py
index 6bbe9ed..875dd64 100755
--- a/pySim-shell.py
+++ b/pySim-shell.py
@@ -457,7 +457,7 @@
self._cmd.poutput(directory_str)
self._cmd.poutput("%d files" % len(selectables))
- def walk(self, indent=0, action=None, context=None):
+ def walk(self, indent=0, action=None, context=None, as_json=False):
"""Recursively walk through the file system, starting at the currently selected DF"""
files = self._cmd.rs.selected_file.get_selectables(
flags=['FNAMES', 'ANAMES'])
@@ -489,12 +489,12 @@
# If the DF was skipped, we never have entered the directory
# below, so we must not move up.
if skip_df == False:
- self.walk(indent + 1, action, context)
+ self.walk(indent + 1, action, context, as_json)
fcp_dec = self._cmd.rs.select("..", self._cmd)
elif action:
df_before_action = self._cmd.rs.selected_file
- action(f, context)
+ action(f, context, as_json)
# When walking through the file system tree the action must not
# always restore the currently selected file to the file that
# was selected before executing the action() callback.
@@ -506,7 +506,7 @@
"""Display a filesystem-tree with all selectable files"""
self.walk()
- def export(self, filename, context):
+ def export(self, filename, context, as_json=False):
""" Select and export a single file """
context['COUNT'] += 1
df = self._cmd.rs.selected_file
@@ -537,23 +537,36 @@
self._cmd.poutput("select " + self._cmd.rs.selected_file.name)
if structure == 'transparent':
- result = self._cmd.rs.read_binary()
- self._cmd.poutput("update_binary " + str(result[0]))
+ if as_json:
+ result = self._cmd.rs.read_binary_dec()
+ self._cmd.poutput("update_binary_decoded '%s'" % json.dumps(result[0], cls=JsonEncoder))
+ else:
+ result = self._cmd.rs.read_binary()
+ self._cmd.poutput("update_binary " + str(result[0]))
elif structure == 'cyclic' or structure == 'linear_fixed':
# Use number of records specified in select response
if 'num_of_rec' in fd:
num_of_rec = fd['num_of_rec']
for r in range(1, num_of_rec + 1):
- result = self._cmd.rs.read_record(r)
- self._cmd.poutput("update_record %d %s" %
- (r, str(result[0])))
+ if as_json:
+ result = self._cmd.rs.read_record(r)
+ self._cmd.poutput("update_record_decoded %d '%s'" % (r, json.dumps(result[0], cls=JsonEncoder)))
+ else:
+ result = self._cmd.rs.read_record_dec(r)
+ self._cmd.poutput("update_record %d %s" % (r, str(result[0])))
+
# When the select response does not return the number of records, read until we hit the
# first record that cannot be read.
else:
r = 1
while True:
try:
- result = self._cmd.rs.read_record(r)
+ if as_json:
+ result = self._cmd.rs.read_record_dec(r)
+ self._cmd.poutput("update_record_decoded %d '%s'" % (r, json.dumps(result[0], cls=JsonEncoder)))
+ else:
+ result = self._cmd.rs.read_record(r)
+ self._cmd.poutput("update_record %d %s" % (r, str(result[0])))
except SwMatchError as e:
# We are past the last valid record - stop
if e.sw_actual == "9402":
@@ -561,8 +574,6 @@
# Some other problem occurred
else:
raise e
- self._cmd.poutput("update_record %d %s" %
- (r, str(result[0])))
r = r + 1
elif structure == 'ber_tlv':
tags = self._cmd.rs.retrieve_tags()
@@ -591,6 +602,8 @@
export_parser = argparse.ArgumentParser()
export_parser.add_argument(
'--filename', type=str, default=None, help='only export specific file')
+ export_parser.add_argument(
+ '--json', action='store_true', help='export as JSON (less reliable)')
@cmd2.with_argparser(export_parser)
def do_export(self, opts):
@@ -598,9 +611,9 @@
context = {'ERR': 0, 'COUNT': 0, 'BAD': [],
'DF_SKIP': 0, 'DF_SKIP_REASON': []}
if opts.filename:
- self.export(opts.filename, context)
+ self.export(opts.filename, context, opts.json)
else:
- self.walk(0, self.export, context)
+ self.walk(0, self.export, context, opts.json)
self._cmd.poutput(boxed_heading_str("Export summary"))
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/27164
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: Idd820f8e3af70ebcbf82037b56fd2ae9655afbc5
Gerrit-Change-Number: 27164
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-MessageType: newchange