Attention is currently required from: laforge.
dexter has posted comments on this change by laforge. ( https://gerrit.osmocom.org/c/pysim/+/38255?usp=email )
Change subject: pySim-shell: New '-e' command line argument
......................................................................
Patch Set 2:
(1 comment)
File pySim-shell.py:
https://gerrit.osmocom.org/c/pysim/+/38255/comment/e8e42ac1_a6439155?usp=em… :
PS1, Line 1128: for c in opts.execute_command:
> I think when -e is not used opts.execute_command is none, then the for refuses to iterate.
Done
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/38255?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: I74004f46105553f077c039ca0f86f75afccc7342
Gerrit-Change-Number: 38255
Gerrit-PatchSet: 2
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: dexter <pmaier(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Comment-Date: Mon, 23 Sep 2024 11:03:05 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: dexter <pmaier(a)sysmocom.de>
Attention is currently required from: fixeria, laforge.
Hello Jenkins Builder,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/pysim/+/38254?usp=email
to look at the new patch set (#2).
The following approvals got outdated and were removed:
Verified+1 by Jenkins Builder
Change subject: tests: sanitize all cards before running tests
......................................................................
tests: sanitize all cards before running tests
Even though our tests are written in a way that they shouldn't interfere
with each other, it may happen that one testrun writes content to a file
that upsets a different testrun. The resulting problems are often
difficult to diagnose.
To minimize the problem, let's reset the cards to a defined state before
running the actual tests. This can be done using pySim-shell's export
feature. We can generate a backup from a known good state and then play
back the backup to reset files that have been changed. Files that didn't
change will not be written thanks to the conserve_write feature of
pySim-shell.
Related: OS#4384
Change-Id: I42eaf61280968518164f2280245136fd30a603ce
---
M contrib/jenkins.sh
A tests/card_sanitizer/card_backup_3b991800118822334455667760_2222334455667788990.script
A tests/card_sanitizer/card_backup_3b9a940092027593110001020221_1122334455667788990.script
A tests/card_sanitizer/card_backup_3b9f95801fc78031e073f62113674d4516004301008f_89445310150011013678.script
A tests/card_sanitizer/card_backup_3b9f96801f878031e073fe211b674a357530350265f8_8949440000001155314.script
A tests/card_sanitizer/card_backup_3b9f96801f878031e073fe211b674a4c753034054ba9_8988211000000467343.script
A tests/card_sanitizer/card_backup_3b9f96801fc78031a073be21136743200718000001a5_8988211320300000028.script
A tests/card_sanitizer/card_backup_3b9f96801fc78031a073be21136744220610000001a9_8988219000000117833.script
A tests/card_sanitizer/card_data.csv
A tests/card_sanitizer/card_sanitizer.py
10 files changed, 18,135 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/54/38254/2
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/38254?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: I42eaf61280968518164f2280245136fd30a603ce
Gerrit-Change-Number: 38254
Gerrit-PatchSet: 2
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-CC: laforge <laforge(a)osmocom.org>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Attention is currently required from: laforge.
dexter has uploaded a new patch set (#2) to the change originally created by laforge. ( https://gerrit.osmocom.org/c/pysim/+/38255?usp=email )
The following approvals got outdated and were removed:
Verified-1 by Jenkins Builder
Change subject: pySim-shell: New '-e' command line argument
......................................................................
pySim-shell: New '-e' command line argument
Using '-e' it is possible to specify *multiple* pySim-shell commands
which shall be executed at startup. This extends the current ability
to execute just a single command.
Example:
./pySim-shell.py -p0 -e 'select ADF.USIM/EF.IMSI' -e 'read_binary_decoded'
Change-Id: I74004f46105553f077c039ca0f86f75afccc7342
---
M pySim-shell.py
1 file changed, 10 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/55/38255/2
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/38255?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: I74004f46105553f077c039ca0f86f75afccc7342
Gerrit-Change-Number: 38255
Gerrit-PatchSet: 2
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: dexter <pmaier(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Attention is currently required from: fixeria, laforge.
dexter has posted comments on this change by dexter. ( https://gerrit.osmocom.org/c/pysim/+/38254?usp=email )
Change subject: tests: sanitize all cards before running tests
......................................................................
Patch Set 2:
(3 comments)
Patchset:
PS1:
> Do we have some information how much time the restore of all cards takes?
I now did a test run with a stopwatch to measure this. It takes 7:31 for all 7 cards. I wonder if there is any logic that would allow us to run the sanitizer only on the first patch (the one closest to master) of a patch set.
File tests/card_sanitizer/card_sanitizer.py:
https://gerrit.osmocom.org/c/pysim/+/38254/comment/b82378c6_30570f01?usp=em… :
PS1, Line 33: from smartcard.CardType import ATRCardType
: from smartcard.CardRequest import CardRequest
: fr
> unused imports
Done
File tests/card_sanitizer/restore.script:
https://gerrit.osmocom.org/c/pysim/+/38254/comment/418e4c78_e9bbb182?usp=em… :
PS1, Line 3: ru
> I don't like this approach with a global file in /var/tmp. […]
That was a good idea, it simplifies things a lot.
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/38254?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: I42eaf61280968518164f2280245136fd30a603ce
Gerrit-Change-Number: 38254
Gerrit-PatchSet: 2
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-CC: laforge <laforge(a)osmocom.org>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Comment-Date: Mon, 23 Sep 2024 11:03:05 +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>
Attention is currently required from: pespin.
osmith has posted comments on this change by osmith. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38264?usp=email )
Change subject: ggsn: f_wait_icmp4: ignore ICMPv4 redirect
......................................................................
Patch Set 1:
(1 comment)
Patchset:
PS1:
> Do you know why this redirect happens with podman? I never heard about this ICMP redirect btw.
Not really, I was just happy to figure out how to make the test pass
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38264?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I6dff4db1fb0803a02f412ff23bb5dcac8e50a504
Gerrit-Change-Number: 38264
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Mon, 23 Sep 2024 11:00:21 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Attention is currently required from: osmith.
laforge has posted comments on this change by osmith. ( https://gerrit.osmocom.org/c/python/pyosmocom/+/38268?usp=email )
Change subject: contrib/jenkins: run pysim tests too
......................................................................
Patch Set 3: Code-Review+1
--
To view, visit https://gerrit.osmocom.org/c/python/pyosmocom/+/38268?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: python/pyosmocom
Gerrit-Branch: master
Gerrit-Change-Id: I6bb7f137d3124e68574bc599969a8e7fd8b68904
Gerrit-Change-Number: 38268
Gerrit-PatchSet: 3
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Attention: osmith <osmith(a)sysmocom.de>
Gerrit-Comment-Date: Mon, 23 Sep 2024 10:59:48 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
jolly has submitted this change. ( https://gerrit.osmocom.org/c/osmo-msc/+/38197?usp=email )
Change subject: Remove speech codec list from bearer_cap for phase 1 mobile station
......................................................................
Remove speech codec list from bearer_cap for phase 1 mobile station
According to TS 04.08 Clause 10.5.4.5.1, the octet 3a etc. shall not be
included, if only GSM full/half rate speech version 1 is supported.
As phase 1 mobile stations only support FR and HR speech, the speech
list in the bearer capability must be reduced to the codecs listed
above. If there is none of these codecs left, the call is rejected.
The octet 3a etc. must be omitted when encoding bearer capability for
phase 1 mobile stations. This is done by removing the speech list.
I do not use a "codec filter", because it is not required. The phase 1
mobile station can only respond with codecs it supports, so no filtering
is required.
Related: OS#6461
Change-Id: Idd267dad0ade18cee7d5be813a57e1ee3168e2db
---
M include/osmocom/msc/codec_mapping.h
M src/libmsc/codec_mapping.c
M src/libmsc/gsm_04_08_cc.c
3 files changed, 43 insertions(+), 0 deletions(-)
Approvals:
pespin: Looks good to me, approved
Jenkins Builder: Verified
laforge: Looks good to me, but someone else must approve
diff --git a/include/osmocom/msc/codec_mapping.h b/include/osmocom/msc/codec_mapping.h
index 3b502a9..79925c9 100644
--- a/include/osmocom/msc/codec_mapping.h
+++ b/include/osmocom/msc/codec_mapping.h
@@ -47,6 +47,7 @@
const struct codec_mapping *codec_mapping_by_mgcp_codec(enum mgcp_codecs mgcp);
int bearer_cap_add_speech_ver(struct gsm_mncc_bearer_cap *bearer_cap, enum gsm48_bcap_speech_ver speech_ver);
+int bearer_cap_filter_rev_lev(struct gsm_mncc_bearer_cap *bearer_cap, uint8_t rev_lev);
int sdp_audio_codec_add_to_bearer_cap(struct gsm_mncc_bearer_cap *bearer_cap, const struct sdp_audio_codec *codec);
int sdp_audio_codecs_to_bearer_cap(struct gsm_mncc_bearer_cap *bearer_cap, const struct sdp_audio_codecs *ac);
int bearer_cap_set_radio(struct gsm_mncc_bearer_cap *bearer_cap);
diff --git a/src/libmsc/codec_mapping.c b/src/libmsc/codec_mapping.c
index bb5968f..f3a707b 100644
--- a/src/libmsc/codec_mapping.c
+++ b/src/libmsc/codec_mapping.c
@@ -343,6 +343,37 @@
return 0;
}
+/* Bearer capability for phase 1 mobile stations must not have a speech version list. It uses the the radio capability
+ * to select the codec. The speech version list is removed. If no phase 1 codec was in the speech version list, an
+ * error is returned also. */
+int bearer_cap_filter_rev_lev(struct gsm_mncc_bearer_cap *bearer_cap, uint8_t rev_lev)
+{
+ bool fr_present = false, hr_present = false;
+ int i;
+
+ if (rev_lev > 0)
+ return 0;
+
+
+ for (i = 0; bearer_cap->speech_ver[i] >= 0; i++) {
+ switch (bearer_cap->speech_ver[i]) {
+ case GSM48_BCAP_SV_FR:
+ fr_present = true;
+ break;
+ case GSM48_BCAP_SV_HR:
+ hr_present = true;
+ break;
+ }
+ }
+
+ bearer_cap->speech_ver[0] = -1;
+
+ if (!fr_present && !hr_present)
+ return -ENOTSUP;
+
+ return 0;
+}
+
/* Try to convert the SDP audio codec name to Speech Versions to append to Bearer Capabilities.
* Return the number of Speech Version entries added (some may add more than one, others may be unknown/unapplicable and
* return 0). */
diff --git a/src/libmsc/gsm_04_08_cc.c b/src/libmsc/gsm_04_08_cc.c
index fc4f730..c27caab 100644
--- a/src/libmsc/gsm_04_08_cc.c
+++ b/src/libmsc/gsm_04_08_cc.c
@@ -950,6 +950,13 @@
msgb_free(msg);
return rc;
}
+ rc = bearer_cap_filter_rev_lev(&bearer_cap, trans->vsub->classmark.classmark1.rev_lev);
+ if (rc) {
+ LOG_TRANS(trans, LOGL_ERROR, "No codec offered is supported by phase 1 mobile.\n");
+ trans_free(trans);
+ msgb_free(msg);
+ return rc;
+ }
break;
case GSM48_BCAP_ITCAP_3k1_AUDIO:
case GSM48_BCAP_ITCAP_FAX_G3:
@@ -1136,6 +1143,7 @@
trans->bearer_cap.transfer);
return -EINVAL;
}
+ bearer_cap_filter_rev_lev(&proceeding->bearer_cap, trans->vsub->classmark.classmark1.rev_lev);
gsm48_encode_bearer_cap(msg, 0, &proceeding->bearer_cap);
memcpy(&trans->bearer_cap, &proceeding->bearer_cap, sizeof(trans->bearer_cap));
}
@@ -1851,6 +1859,7 @@
gsm48_start_cc_timer(trans, 0x323, GSM48_T323);
/* bearer capability */
+ bearer_cap_filter_rev_lev(&modify->bearer_cap, trans->vsub->classmark.classmark1.rev_lev);
gsm48_encode_bearer_cap(msg, 1, &modify->bearer_cap);
memcpy(&trans->bearer_cap, &modify->bearer_cap, sizeof(trans->bearer_cap));
@@ -1898,6 +1907,7 @@
gh->msg_type = GSM48_MT_CC_MODIFY_COMPL;
/* bearer capability */
+ bearer_cap_filter_rev_lev(&modify->bearer_cap, trans->vsub->classmark.classmark1.rev_lev);
gsm48_encode_bearer_cap(msg, 1, &modify->bearer_cap);
memcpy(&trans->bearer_cap, &modify->bearer_cap, sizeof(trans->bearer_cap));
@@ -1951,6 +1961,7 @@
gh->msg_type = GSM48_MT_CC_MODIFY_REJECT;
/* bearer capability */
+ bearer_cap_filter_rev_lev(&modify->bearer_cap, trans->vsub->classmark.classmark1.rev_lev);
gsm48_encode_bearer_cap(msg, 1, &modify->bearer_cap);
memcpy(&trans->bearer_cap, &modify->bearer_cap, sizeof(trans->bearer_cap));
/* cause */
--
To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/38197?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Change-Id: Idd267dad0ade18cee7d5be813a57e1ee3168e2db
Gerrit-Change-Number: 38197
Gerrit-PatchSet: 3
Gerrit-Owner: jolly <andreas(a)eversberg.eu>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: jolly <andreas(a)eversberg.eu>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: nt2mku <degrunert.web(a)googlemail.com>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de>
osmith has posted comments on this change by osmith. ( https://gerrit.osmocom.org/c/python/pyosmocom/+/38268?usp=email )
Change subject: contrib/jenkins: run pysim tests too
......................................................................
Set Ready For Review
--
To view, visit https://gerrit.osmocom.org/c/python/pyosmocom/+/38268?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: python/pyosmocom
Gerrit-Branch: master
Gerrit-Change-Id: I6bb7f137d3124e68574bc599969a8e7fd8b68904
Gerrit-Change-Number: 38268
Gerrit-PatchSet: 3
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Comment-Date: Mon, 23 Sep 2024 10:56:22 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No