Change in osmo-ttcn3-hacks[master]: MSC_Tests.ttcn: fix: verify the contents of SM-RP DA/OA for MO SMS
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16566 ) Change subject: MSC_Tests.ttcn: fix: verify the contents of SM-RP DA/OA for MO SMS .. MSC_Tests.ttcn: fix: verify the contents of SM-RP DA/OA for MO SMS Change-Id: Ib467eeca6439bc6cce72293fbb5bb48f6d233db9 --- M msc/MSC_Tests.ttcn 1 file changed, 11 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/66/16566/1 diff --git a/msc/MSC_Tests.ttcn b/msc/MSC_Tests.ttcn index 25d6b64..61b637a 100644 --- a/msc/MSC_Tests.ttcn +++ b/msc/MSC_Tests.ttcn @@ -2085,10 +2085,17 @@ var template GSUP_PDU mo_forwardSM := tr_GSUP_MO_FORWARD_SM_REQ( imsi := g_pars.imsi, sm_rp_mr := spars.rp.msg_ref, - /* FIXME: extract SM-RP-DA from spars.rp.dest */ - sm_rp_da := tr_GSUP_SM_RP_DA_SMSC_ADDR(?), - /* FIXME: MSISDN coding troubles */ - sm_rp_oa := tr_GSUP_SM_RP_OA_MSISDN(?), + /* SM-RP-DA: SMSC address */ + sm_rp_da := tr_GSUP_SM_RP_DA_SMSC_ADDR(t_GSUP_SM_RP_Addr( + number := spars.rp.dest.rP_NumberDigits, + npi := spars.rp.dest.rP_NumberingPlanIdentification, + ton := spars.rp.dest.rP_TypeOfNumber, + ext := spars.rp.dest.rP_Ext)), + /* SM-RP-OA: subscriber's MSISDN (filled in by MSC) */ + sm_rp_oa := tr_GSUP_SM_RP_OA_MSISDN(t_GSUP_SM_RP_Addr( + number := g_pars.msisdn, + /* FIXME: MSISDN we have in g_pars lacks this info */ + npi := ?, ton := ?, ext := ?)), /* TODO: can we use decmatch here? */ sm_rp_ui := sm_tpdu ); -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16566 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Ib467eeca6439bc6cce72293fbb5bb48f6d233db9 Gerrit-Change-Number: 16566 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-MessageType: newchange
Change in osmo-ttcn3-hacks[master]: library/GSUP_Types.ttcn: fix MSISDN / SMSC coding in SM-RP-OA/DA
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16565 ) Change subject: library/GSUP_Types.ttcn: fix MSISDN / SMSC coding in SM-RP-OA/DA .. library/GSUP_Types.ttcn: fix MSISDN / SMSC coding in SM-RP-OA/DA Unlike IMSI, both MSISDN and SMSC address in SM-RP-OA/DA not only contain the BCD encoded digits, but also a little header with NPI (Numbering Plan Identification), ToN (Type of Number), and Extension fields. Change-Id: I3f55834489f3e613f541cf1e216027e8d48ccaf0 --- M library/GSUP_Types.ttcn M library/Osmocom_Types.ttcn M msc/MSC_Tests.ttcn 3 files changed, 60 insertions(+), 18 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/65/16565/1 diff --git a/library/GSUP_Types.ttcn b/library/GSUP_Types.ttcn index 8977d9f..3fa525f 100644 --- a/library/GSUP_Types.ttcn +++ b/library/GSUP_Types.ttcn @@ -869,6 +869,38 @@ OSMO_GSUP_SM_RP_ODA_ID_NULL ('FF'O) } with { variant "FIELDLENGTH(8)" }; +/* See 3GPP TS 24.011, figures 8.5 and 8.6 */ +type record GSUP_SM_RP_Addr { + BIT4npi, /* Numbering Plan Identification */ + BIT3ton, /* Type of Number */ + BIT1ext, /* Extension? */ + hexstring number length (1..20) +} with { + variant "PADDING(yes)"; + variant "PADDING_PATTERN(''B)" +}; + +private function f_pad_SM_RP_Addr(template hexstring number) +return template hexstring { + if (isvalue(number) and not istemplatekind(number, "omit")) { + return f_pad_bcd_number(valueof(number)); + } else { + return number; + } +} + +template GSUP_SM_RP_Addr t_GSUP_SM_RP_Addr(template hexstring number, + template BIT4 npi := '0001'B, + template BIT3 ton := '001'B, + template BIT1 ext := '1'B) := { + npi := npi, + ton := ton, + ext := ext, + /* Work around TITAN's padding problems: encoding works fine, +* but it does not consider 'F'H as padding in decoded data. */ + number := f_pad_SM_RP_Addr(number) +} + /** * SM-RP-DA represents the SM Destination Address, see 7.6.8.1. * It can be either of the following: @@ -879,9 +911,9 @@ * - service centre address */ type union GSUP_SM_RP_DA_ID { - hexstring imsi, - hexstring msisdn, - hexstring smsc_addr + hexstring imsi, + GSUP_SM_RP_Addr msisdn, + GSUP_SM_RP_Addr smsc_addr }; type record GSUP_SM_RP_DA { @@ -904,20 +936,20 @@ id_enc := { imsi := imsi } } -template (value) GSUP_SM_RP_DA ts_GSUP_SM_RP_DA_MSISDN(hexstring msisdn) := { +template (value) GSUP_SM_RP_DA ts_GSUP_SM_RP_DA_MSISDN(GSUP_SM_RP_Addr msisdn) := { id_type := OSMO_GSUP_SM_RP_ODA_ID_MSISDN, id_enc := { msisdn := msisdn } } -template GSUP_SM_RP_DA tr_GSUP_SM_RP_DA_MSISDN(template hexstring msisdn) := { +template GSUP_SM_RP_DA tr_GSUP_SM_RP_DA_MSISDN(template GSUP_SM_RP_Addr msisdn) := { id_type := OSMO_GSUP_SM_RP_ODA_ID_MSISDN, id_enc := { msisdn := msisdn } } -template (value) GSUP_SM_RP_DA ts_GSUP_SM_RP_DA_SMSC_ADDR(hexstring smsc_addr) := { +template (value) GSUP_SM_RP_DA ts_GSUP_SM_RP_DA_SMSC_ADDR(GSUP_SM_RP_Addr smsc_addr) := { id_type := OSMO_GSUP_SM_RP_ODA_ID_SMSC_ADDR, id_enc := { smsc_addr := smsc_addr } } -template GSUP_SM_RP_DA tr_GSUP_SM_RP_DA_SMSC_ADDR(template hexstring smsc_addr) := { +template GSUP_SM_RP_DA tr_GSUP_SM_RP_DA_SMSC_ADDR(template GSUP_SM_RP_Addr smsc_addr) := { id_type := OSMO_GSUP_SM_RP_ODA_ID_SMSC_ADDR, id_enc := { smsc_addr := smsc_addr } } @@ -953,8 +985,8 @@ * - service centre address */ type union GSUP_SM_RP_OA_ID { - hexstring msisdn, - hexstring smsc_addr + GSUP_SM_RP_Addr msisdn, + GSUP_SM_RP_Addr smsc_addr }; type record GSUP_SM_RP_OA { @@ -967,20 +999,20 @@ )" }; -template (value) GSUP_SM_RP_OA ts_GSUP_SM_RP_OA_MSISDN(hexstring msisdn) := { +template (value) GSUP_SM_RP_OA ts_GSUP_SM_RP_OA_MSISDN(GSUP_SM_RP_Addr msisdn) := { id_type := OSMO_GSUP_SM_RP_ODA_ID_MSISDN, id_enc := { msisdn := msisdn } } -template GSUP_SM_RP_OA tr_GSUP_SM_RP_OA_MSISDN(template hexstring msisdn) := { +template GSUP_SM_RP_OA tr_GSUP_SM_RP_OA_MSISDN(template GSUP_SM_RP_Addr msisdn) := { id_type := OSMO_GSUP_SM_RP_ODA_ID_MSISDN, id_enc := { msisdn := msisdn } } -template (value) GSUP_SM_RP_OA ts_GSUP_SM_RP_OA_SMSC_ADDR(hexstring smsc_addr) := { +template (value) GSUP_SM_RP_OA ts_GSUP_SM_RP_OA_SMSC_ADDR(GSUP_SM_RP_Addr smsc_addr) := { id_type := OSMO_GSUP_SM_RP_ODA_ID_SMSC_ADDR, id_enc := { smsc_addr := smsc_addr } } -template GSUP_SM_RP_OA
Build failure of network:osmocom:nightly/simtrace2 in xUbuntu_16.04/i586
Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/simtrace2/xUbuntu_16.04/i586 Package network:osmocom:nightly/simtrace2 failed to build in xUbuntu_16.04/i586 Check out the package for editing: osc checkout network:osmocom:nightly simtrace2 Last lines of build log: [ 117s] /usr/src/packages/BUILD/firmware/apps/dfu/main.c:360: warning: undefined reference to `__stack_chk_guard' [ 117s] obj/simtrace/flash_dfu_desc.o: In function `set_usb_serial_str': [ 117s] /usr/src/packages/BUILD/firmware/./atmel_softpack_libraries/usb/device/dfu/dfu_desc.c:186: warning: undefined reference to `__stack_chk_fail' [ 117s] /usr/src/packages/BUILD/firmware/./atmel_softpack_libraries/usb/device/dfu/dfu_desc.c:186: warning: undefined reference to `__stack_chk_guard' [ 117s] obj/simtrace/flash_dfu_driver.o: In function `handle_getstate': [ 117s] /usr/src/packages/BUILD/firmware/./atmel_softpack_libraries/usb/device/dfu/dfu_driver.c:91: warning: undefined reference to `__stack_chk_fail' [ 117s] /usr/src/packages/BUILD/firmware/./atmel_softpack_libraries/usb/device/dfu/dfu_driver.c:91: warning: undefined reference to `__stack_chk_guard' [ 117s] collect2: error: ld returned 1 exit status [ 117s] % [ 117s] Makefile:233: recipe for target 'flash' failed [ 117s] make[2]: *** [flash] Error 1 [ 117s] make[2]: Leaving directory '/usr/src/packages/BUILD/firmware' [ 117s] Makefile:10: recipe for target 'fw-simtrace-dfu' failed [ 117s] make[1]: *** [fw-simtrace-dfu] Error 2 [ 117s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 117s] dh_auto_build: make -j1 returned exit code 2 [ 117s] debian/rules:16: recipe for target 'build' failed [ 117s] make: *** [build] Error 2 [ 117s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 117s] [ 117s] cloud109 failed "build simtrace2_0.7.0.3.75a5.dsc" at Fri Dec 13 01:45:41 UTC 2019. [ 117s] [ 117s] ### VM INTERACTION START ### [ 120s] [ 102.393779] sysrq: SysRq : Power Off [ 120s] [ 102.412865] reboot: Power down [ 120s] ### VM INTERACTION END ### [ 120s] [ 120s] cloud109 failed "build simtrace2_0.7.0.3.75a5.dsc" at Fri Dec 13 01:45:45 UTC 2019. [ 120s] -- Configure notifications at https://build.opensuse.org/my/notifications openSUSE Build Service (https://build.opensuse.org/)
Build failure of network:osmocom:nightly/simtrace2 in xUbuntu_16.04/x86_64
Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/simtrace2/xUbuntu_16.04/x86_64 Package network:osmocom:nightly/simtrace2 failed to build in xUbuntu_16.04/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly simtrace2 Last lines of build log: [ 82s] /usr/src/packages/BUILD/firmware/apps/dfu/main.c:360: warning: undefined reference to `__stack_chk_guard' [ 82s] obj/simtrace/flash_dfu_desc.o: In function `set_usb_serial_str': [ 82s] /usr/src/packages/BUILD/firmware/./atmel_softpack_libraries/usb/device/dfu/dfu_desc.c:186: warning: undefined reference to `__stack_chk_fail' [ 82s] /usr/src/packages/BUILD/firmware/./atmel_softpack_libraries/usb/device/dfu/dfu_desc.c:186: warning: undefined reference to `__stack_chk_guard' [ 82s] obj/simtrace/flash_dfu_driver.o: In function `handle_getstate': [ 82s] /usr/src/packages/BUILD/firmware/./atmel_softpack_libraries/usb/device/dfu/dfu_driver.c:91: warning: undefined reference to `__stack_chk_fail' [ 82s] /usr/src/packages/BUILD/firmware/./atmel_softpack_libraries/usb/device/dfu/dfu_driver.c:91: warning: undefined reference to `__stack_chk_guard' [ 82s] collect2: error: ld returned 1 exit status [ 82s] % [ 82s] Makefile:233: recipe for target 'flash' failed [ 82s] make[2]: *** [flash] Error 1 [ 82s] make[2]: Leaving directory '/usr/src/packages/BUILD/firmware' [ 82s] Makefile:10: recipe for target 'fw-simtrace-dfu' failed [ 82s] make[1]: *** [fw-simtrace-dfu] Error 2 [ 82s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 82s] dh_auto_build: make -j1 returned exit code 2 [ 82s] debian/rules:16: recipe for target 'build' failed [ 82s] make: *** [build] Error 2 [ 82s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 82s] [ 82s] lamb51 failed "build simtrace2_0.7.0.3.75a5.dsc" at Fri Dec 13 01:40:58 UTC 2019. [ 82s] [ 82s] ### VM INTERACTION START ### [ 85s] [ 74.866482] sysrq: SysRq : Power Off [ 85s] [ 74.873369] reboot: Power down [ 85s] ### VM INTERACTION END ### [ 85s] [ 85s] lamb51 failed "build simtrace2_0.7.0.3.75a5.dsc" at Fri Dec 13 01:41:01 UTC 2019. [ 85s] -- Configure notifications at https://build.opensuse.org/my/notifications openSUSE Build Service (https://build.opensuse.org/)
Change in osmo-ttcn3-hacks[master]: hlr: add tests for GSUP proxy routing
fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16021 ) Change subject: hlr: add tests for GSUP proxy routing .. Patch Set 3: (1 comment) https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16021/3/hlr/HLR_Tests.ttcn File hlr/HLR_Tests.ttcn: https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16021/3/hlr/HLR_Tests.ttcn@104 PS3, Line 104: 7468652d736f757263650a char2oct("the-source\n")? -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16021 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I3728776d862c5e5fa7628ca28d74c1ef247459fa Gerrit-Change-Number: 16021 Gerrit-PatchSet: 3 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: neels Gerrit-CC: fixeria Gerrit-CC: pespin Gerrit-Comment-Date: Fri, 13 Dec 2019 01:39:21 + Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment
Change in osmo-ttcn3-hacks[master]: msc: introduce f_logp()
fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16562 ) Change subject: msc: introduce f_logp() .. Patch Set 1: > Patch Set 1: > > The ongoing discussion is whether to move this to a more general position, > which would imply needing to pass MSCVTY as argument to every call, or > whether this is better per-ConnHdlr for more logging convenienve. Ah, I see your point now. -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16562 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Iddcda7f0f9940cc21f89d52962707667fe844010 Gerrit-Change-Number: 16562 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: neels Gerrit-Comment-Date: Fri, 13 Dec 2019 01:21:26 + Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment
Change in osmo-ttcn3-hacks[master]: msc: introduce f_logp()
fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16562 ) Change subject: msc: introduce f_logp() .. Patch Set 1: Code-Review+1 (1 comment) https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16562/1/msc/MSC_Tests.ttcn File msc/MSC_Tests.ttcn: https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16562/1/msc/MSC_Tests.ttcn@173 PS1, Line 173: MSCVTY If we pass this as a parameter, then other BSC/BTS/... tests could use it too. -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16562 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Iddcda7f0f9940cc21f89d52962707667fe844010 Gerrit-Change-Number: 16562 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: neels Gerrit-Comment-Date: Fri, 13 Dec 2019 01:20:40 + Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
Change in osmo-ttcn3-hacks[master]: msc: add tests for SMS and voice call while Paging
fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16297 ) Change subject: msc: add tests for SMS and voice call while Paging .. Patch Set 4: Code-Review-1 (5 comments) https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16297/4/msc/BSC_ConnectionHandler.ttcn File msc/BSC_ConnectionHandler.ttcn: https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16297/4/msc/BSC_ConnectionHandler.ttcn@1757 PS4, Line 1757: expect_deliver_pdu This naming is confusing. We don't 'expect' (to receive) anything in this function. I would call it 'f_mt_sms_compose' or 'f_mt_sms_assemble', because all it does is composing CP/RP/TP and DTAP layers together. https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16297/4/msc/MSC_Tests.ttcn File msc/MSC_Tests.ttcn: https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16297/4/msc/MSC_Tests.ttcn@1905 PS4, Line 1905: and call unrelated comment https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16297/4/msc/MSC_Tests.ttcn@1942 PS4, Line 1942: 43 I guess a different value needs to be used here. https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16297/4/msc/MSC_Tests.ttcn@5026 PS4, Line 5026: f_mt_sms_expect_deliver_pdu So you only receive SMS here, but do not acknowledge. MSC would still consider that SMS as to be delivered, and that might break other test cases (given that you're using not unique IMSI prefix 43). https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16297/4/msc/MSC_Tests.ttcn@5049 PS4, Line 5049: 43 same -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16297 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Ieeae6322d4e80893ea3408c6b74bf8e32bea8e46 Gerrit-Change-Number: 16297 Gerrit-PatchSet: 4 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: neels Gerrit-CC: laforge Gerrit-CC: pespin Gerrit-Comment-Date: Fri, 13 Dec 2019 00:59:47 + Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
Change in pysim[master]: test
dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/16564 ) Change subject: test .. test Change-Id: I12e6b46787efb39c5745f4e7f3cdcca9209881b8 --- A test 1 file changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/64/16564/1 diff --git a/test b/test new file mode 100644 index 000..e69de29 --- /dev/null +++ b/test -- To view, visit https://gerrit.osmocom.org/c/pysim/+/16564 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I12e6b46787efb39c5745f4e7f3cdcca9209881b8 Gerrit-Change-Number: 16564 Gerrit-PatchSet: 1 Gerrit-Owner: dexter Gerrit-MessageType: newchange
Change in pysim[master]: test
dexter has abandoned this change. ( https://gerrit.osmocom.org/c/pysim/+/16563 ) Change subject: test .. Abandoned -- To view, visit https://gerrit.osmocom.org/c/pysim/+/16563 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: Ib5aa0ef437e897300a5fa49cf76d250aec7805cf Gerrit-Change-Number: 16563 Gerrit-PatchSet: 1 Gerrit-Owner: dexter Gerrit-Reviewer: Jenkins Builder Gerrit-MessageType: abandon
Change in osmo-ttcn3-hacks[master]: hlr: add tests for GSUP proxy routing
Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16021 to look at the new patch set (#3). Change subject: hlr: add tests for GSUP proxy routing .. hlr: add tests for GSUP proxy routing GSUP proxy routing, as it is implemented in an upcoming osmo-hlr patch, requires that osmo-hlr returns a received Source Name IE back as Destination Name IE. Add tests for these, for various situations. At the time of writing, these tests still fail on master, and will pass as soon as GSUP request handling with request->response association is introduced to osmo-hlr in an upcoming patch (I179ebb0385b5b355f4740e14d43be97bf93622e3). Implement this by adding a source_name to the g_pars, which should be sent out in ts_GSUP_* to osmo-hlr, and expected back as destination_name in returned messages. Add source_name and destination_name to various templates, with default := omit. Add f_gen_ts_ies() and f_gen_tr_ies() to compose expected IEs more generically. Change-Id: I3728776d862c5e5fa7628ca28d74c1ef247459fa --- M hlr/HLR_Tests.ttcn M library/GSUP_Types.ttcn 2 files changed, 233 insertions(+), 66 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/21/16021/3 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16021 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I3728776d862c5e5fa7628ca28d74c1ef247459fa Gerrit-Change-Number: 16021 Gerrit-PatchSet: 3 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: neels Gerrit-CC: fixeria Gerrit-CC: pespin Gerrit-MessageType: newpatchset
Change in osmo-msc[master]: sms db: when storing an SMS, retrieve the ID
neels has submitted this change. ( https://gerrit.osmocom.org/c/osmo-msc/+/16218 ) Change subject: sms db: when storing an SMS, retrieve the ID .. sms db: when storing an SMS, retrieve the ID seemed like a good idea, but not sure if we need it at all. Change-Id: I5fa55307a6abb8bbfe56619235d7b79fbbda6caf --- M src/libmsc/db.c 1 file changed, 3 insertions(+), 0 deletions(-) Approvals: laforge: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/libmsc/db.c b/src/libmsc/db.c index 241bc86..a1683be 100644 --- a/src/libmsc/db.c +++ b/src/libmsc/db.c @@ -769,6 +769,9 @@ return -EIO; dbi_result_free(result); + + sms->id = dbi_conn_sequence_last(conn, "id"); + LOGP(DLSMS, LOGL_INFO, "Stored SMS id=%llu in DB\n", sms->id); return 0; } -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/16218 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: I5fa55307a6abb8bbfe56619235d7b79fbbda6caf Gerrit-Change-Number: 16218 Gerrit-PatchSet: 3 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-CC: pespin Gerrit-MessageType: merged
Change in osmo-msc[master]: sms db: when storing an SMS, retrieve the ID
neels has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-msc/+/16218 ) Change subject: sms db: when storing an SMS, retrieve the ID .. Patch Set 2: (1 comment) https://gerrit.osmocom.org/c/osmo-msc/+/16218/1/src/libmsc/db.c File src/libmsc/db.c: https://gerrit.osmocom.org/c/osmo-msc/+/16218/1/src/libmsc/db.c@773 PS1, Line 773: sms->id = dbi_conn_sequence_last(conn, "id"); > So we had an id which was always 0 until now? yes, but AFAICT no code path used it; we would instead always retrieve from the db later. Still it seems a sane thing to do in principle. -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/16218 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: I5fa55307a6abb8bbfe56619235d7b79fbbda6caf Gerrit-Change-Number: 16218 Gerrit-PatchSet: 2 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-CC: pespin Gerrit-Comment-Date: Thu, 12 Dec 2019 15:46:25 + Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: pespin Gerrit-MessageType: comment
Change in pysim[master]: test
dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/16563 ) Change subject: test .. test Change-Id: Ib5aa0ef437e897300a5fa49cf76d250aec7805cf --- A testme 1 file changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/63/16563/1 diff --git a/testme b/testme new file mode 100644 index 000..e69de29 --- /dev/null +++ b/testme -- To view, visit https://gerrit.osmocom.org/c/pysim/+/16563 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: Ib5aa0ef437e897300a5fa49cf76d250aec7805cf Gerrit-Change-Number: 16563 Gerrit-PatchSet: 1 Gerrit-Owner: dexter Gerrit-MessageType: newchange
Change in osmo-ttcn3-hacks[master]: msc: fix 2 Iu tests: use f_mm_common() instead of f_mm_auth()
neels has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16299 ) Change subject: msc: fix 2 Iu tests: use f_mm_common() instead of f_mm_auth() .. msc: fix 2 Iu tests: use f_mm_common() instead of f_mm_auth() Fix these tests by using f_mm_common(), which takes care of Iu auth+ciph: TC_iu_lu_imsi_reject TC_iu_lu_imsi_timeout_gsup Change-Id: Id2bf160ac4e1cad4770202c6a6f1b8e21d68 --- M msc/MSC_Tests.ttcn 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, but someone else must approve laforge: Looks good to me, approved diff --git a/msc/MSC_Tests.ttcn b/msc/MSC_Tests.ttcn index 480ec96..6e482e2 100644 --- a/msc/MSC_Tests.ttcn +++ b/msc/MSC_Tests.ttcn @@ -478,7 +478,7 @@ f_create_gsup_expect(hex2str(g_pars.imsi)); f_cl3_or_initial_ue(l3_lu); - f_mm_auth(); + f_mm_common(); GSUP.receive(tr_GSUP_UL_REQ(g_pars.imsi)); GSUP.send(ts_GSUP_UL_ERR(g_pars.imsi, 23)); alt { @@ -508,7 +508,7 @@ f_create_gsup_expect(hex2str(g_pars.imsi)); f_cl3_or_initial_ue(l3_lu); - f_mm_auth(); + f_mm_common(); GSUP.receive(tr_GSUP_UL_REQ(g_pars.imsi)); /* Normally the HLR would need to respond here, but we decide to force a timeout here */ alt { -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16299 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Id2bf160ac4e1cad4770202c6a6f1b8e21d68 Gerrit-Change-Number: 16299 Gerrit-PatchSet: 2 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: lynxis lazus Gerrit-Reviewer: neels Gerrit-Reviewer: pespin Gerrit-MessageType: merged
Change in osmo-ttcn3-hacks[master]: msc: Iu: fix missing 'ran_is_geran := false' for TC_iu_lu_and_mt_sms_...
neels has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16300 ) Change subject: msc: Iu: fix missing 'ran_is_geran := false' for TC_iu_lu_and_mt_sms_paging_repeated .. msc: Iu: fix missing 'ran_is_geran := false' for TC_iu_lu_and_mt_sms_paging_repeated Change-Id: I011795cacf62f2cac6861fe657966795e6370ddb --- M msc/MSC_Tests_Iu.ttcn 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, but someone else must approve laforge: Looks good to me, approved diff --git a/msc/MSC_Tests_Iu.ttcn b/msc/MSC_Tests_Iu.ttcn index 987baf0..9ea0c76 100644 --- a/msc/MSC_Tests_Iu.ttcn +++ b/msc/MSC_Tests_Iu.ttcn @@ -285,7 +285,7 @@ var BSC_ConnHdlrPars pars; var BSC_ConnHdlr vc_conn; f_init(3); - pars := f_init_pars(101844); + pars := f_init_pars(101844, ran_idx := 2, ran_is_geran := false); vc_conn := f_start_handler_with_pars(refers(f_tc_lu_and_mt_sms_paging_repeated), pars); vc_conn.done; } -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16300 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I011795cacf62f2cac6861fe657966795e6370ddb Gerrit-Change-Number: 16300 Gerrit-PatchSet: 2 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-Reviewer: pespin Gerrit-MessageType: merged
Change in osmo-ttcn3-hacks[master]: msc: expect only one Paging on GERAN
neels has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16301 ) Change subject: msc: expect only one Paging on GERAN .. Patch Set 3: Code-Review+2 Re-adding previous +2, which was only lost from removing the orthogonal f_logp() feature (put in a separate patch now) -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16301 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Ie914ea88f31ac158f4bd1700143bbe728dd05e0b Gerrit-Change-Number: 16301 Gerrit-PatchSet: 3 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-Comment-Date: Thu, 12 Dec 2019 15:33:29 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
Change in osmo-ttcn3-hacks[master]: msc: expect only one Paging on GERAN
neels has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16301 ) Change subject: msc: expect only one Paging on GERAN .. msc: expect only one Paging on GERAN After discussion on this thread: http://lists.osmocom.org/pipermail/openbsc/2019-November/013058.html Do not expect repeated Paging on GERAN. Pending clarification on 3G, still expect repeated Paging on Iu, though we are not 100% certain that this is indeed required. Fixes MSC_Tests.TC_lu_and_mt_sms_paging_repeated, but not MSC_Tests_Iu.TC_iu_lu_and_mt_sms_paging_repeated Change-Id: Ie914ea88f31ac158f4bd1700143bbe728dd05e0b --- M msc/MSC_Tests.ttcn 1 file changed, 28 insertions(+), 2 deletions(-) Approvals: Jenkins Builder: Verified neels: Looks good to me, approved diff --git a/msc/MSC_Tests.ttcn b/msc/MSC_Tests.ttcn index 6e482e2..a083606 100644 --- a/msc/MSC_Tests.ttcn +++ b/msc/MSC_Tests.ttcn @@ -1974,11 +1974,37 @@ f_vty_sms_send(hex2str(pars.imsi), "2342", "Hello SMS"); + log("Expecting first Paging"); /* MSC->BSC: expect PAGING from MSC */ f_expect_paging(); - /* MSC->BSC: expect PAGING from MSC */ - f_expect_paging(); + if (g_pars.ran_is_geran) { + log("GERAN: expect no further Paging"); + } else { + log("UTRAN: expect more Paging"); + } + + timer T := 5.0; + T.start; + alt { + [g_pars.ran_is_geran] BSSAP.receive(tr_BSSMAP_Paging(g_pars.imsi)) { + setverdict(fail, "GERAN should not repeat Paging, but received a second Paging"); + mtc.stop; + } + [not g_pars.ran_is_geran] BSSAP.receive(tr_RANAP_Paging(cs_domain, imsi_hex2oct(g_pars.imsi))) { + log("UTRAN: second Paging received, as expected"); + setverdict(pass); + } + [] T.timeout { + if (g_pars.ran_is_geran) { + log("GERAN: No further Paging received, as expected"); + setverdict(pass); + } else { + setverdict(fail, "UTRAN: Expected a second Paging"); + mtc.stop; + } + } + } /* Establish DTAP / BSSAP / SCCP connection */ f_establish_fully(EST_TYPE_PAG_RESP); -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16301 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Ie914ea88f31ac158f4bd1700143bbe728dd05e0b Gerrit-Change-Number: 16301 Gerrit-PatchSet: 3 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-MessageType: merged
Change in osmo-ttcn3-hacks[master]: msc: introduce f_logp()
neels has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16562 ) Change subject: msc: introduce f_logp() .. Patch Set 1: The ongoing discussion is whether to move this to a more general position, which would imply needing to pass MSCVTY as argument to every call, or whether this is better per-ConnHdlr for more logging convenienve. -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16562 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Iddcda7f0f9940cc21f89d52962707667fe844010 Gerrit-Change-Number: 16562 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: neels Gerrit-Comment-Date: Thu, 12 Dec 2019 15:32:08 + Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment
Change in osmo-ttcn3-hacks[master]: msc: introduce f_logp()
neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16562 ) Change subject: msc: introduce f_logp() .. msc: introduce f_logp() This is separated from other patches that were using it, so introduce this function and apply to some select places, so that log markers are also seen in the osmo-msc log output, to help pinpoint what is happening when. Change-Id: Iddcda7f0f9940cc21f89d52962707667fe844010 --- M msc/MSC_Tests.ttcn 1 file changed, 21 insertions(+), 13 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/62/16562/1 diff --git a/msc/MSC_Tests.ttcn b/msc/MSC_Tests.ttcn index 885743a..c4d407a 100644 --- a/msc/MSC_Tests.ttcn +++ b/msc/MSC_Tests.ttcn @@ -165,6 +165,14 @@ }; } +private function f_logp(charstring log_msg) runs on BSC_ConnHdlr +{ +// log on TTCN3 log output +log(log_msg); +// log in stderr log + f_vty_transceive(MSCVTY, "logp lglobal notice " & log_msg); +} + /* altstep for the global guard timer (only used when BSSAP_DIRECT * is used for communication */ private altstep as_Tguard_direct() runs on MTC_CT { @@ -1913,13 +1921,13 @@ } f_ran_register_imsi(g_pars.imsi, tmsi); - log("first SMS"); + f_logp("first SMS"); f_vty_sms_send(hex2str(pars.imsi), "2342", "Hello SMS"); /* MSC->BSC: expect PAGING from MSC */ f_expect_paging(); - log("second SMS"); + f_logp("second SMS"); /* Now osmo-msc is in state "Paging pending", make sure that another SMS to be sent at this time just joins in * with the pending paging. Another SMS: */ f_vty_sms_send(hex2str(pars.imsi), "2342", "Another SMS"); @@ -2022,14 +2030,14 @@ f_vty_sms_send(hex2str(pars.imsi), "2342", "Hello SMS"); - log("Expecting first Paging"); + f_logp("Expecting first Paging"); /* MSC->BSC: expect PAGING from MSC */ f_expect_paging(); if (g_pars.ran_is_geran) { - log("GERAN: expect no further Paging"); + f_logp("GERAN: expect no further Paging"); } else { - log("UTRAN: expect more Paging"); + f_logp("UTRAN: expect more Paging"); } timer T := 5.0; @@ -2040,12 +2048,12 @@ mtc.stop; } [not g_pars.ran_is_geran] BSSAP.receive(tr_RANAP_Paging(cs_domain, imsi_hex2oct(g_pars.imsi))) { - log("UTRAN: second Paging received, as expected"); + f_logp("UTRAN: second Paging received, as expected"); setverdict(pass); } [] T.timeout { if (g_pars.ran_is_geran) { - log("GERAN: No further Paging received, as expected"); + f_logp("GERAN: No further Paging received, as expected"); setverdict(pass); } else { setverdict(fail, "UTRAN: Expected a second Paging"); @@ -5008,30 +5016,30 @@ } f_ran_register_imsi(g_pars.imsi, tmsi); - log("start Paging by an SMS"); + f_logp("start Paging by an SMS"); f_vty_sms_send(hex2str(pars.imsi), "2342", "Hello SMS"); /* MSC->BSC: expect PAGING from MSC */ f_expect_paging(); - log("MNCC signals MT call, before Paging Response"); + f_logp("MNCC signals MT call, before Paging Response"); f_mt_call_initate(cpars); f_ran_register_imsi(g_pars.imsi, g_pars.tmsi); f_sleep(0.5); - log("phone answers Paging, expecting both SMS and MT call to be established"); + f_logp("phone answers Paging, expecting both SMS and MT call to be established"); f_establish_fully(EST_TYPE_PAG_RESP); spars.tp.ud := 'C8329BFD064D9B53'O; interleave { [] BSSAP.receive(f_mt_sms_expect_deliver_pdu(spars)) { - log("Got SMS-DELIVER"); + f_logp("Got SMS-DELIVER"); }; [] BSSAP.receive(tr_PDU_DTAP_MT(tr_ML3_MT_CC_SETUP(cpars.transaction_id, *, cpars.called_party))) { - log("Got CC Setup"); + f_logp("Got CC Setup"); }; } setverdict(pass); - log("success, tear down"); + f_logp("success, tear down"); var default ccrel := activate(as_optional_cc_rel(cpars)); if (g_pars.ran_is_geran) { BSSAP.send(ts_BSSMAP_ClearRequest(0)); -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16562 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Iddcda7f0f9940cc21f89d52962707667fe844010 Gerrit-Change-Number: 16562 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-MessageType: newchange
Change in osmo-ttcn3-hacks[master]: msc: expect only one Paging on GERAN
Hello laforge, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16301 to look at the new patch set (#3). Change subject: msc: expect only one Paging on GERAN .. msc: expect only one Paging on GERAN After discussion on this thread: http://lists.osmocom.org/pipermail/openbsc/2019-November/013058.html Do not expect repeated Paging on GERAN. Pending clarification on 3G, still expect repeated Paging on Iu, though we are not 100% certain that this is indeed required. Fixes MSC_Tests.TC_lu_and_mt_sms_paging_repeated, but not MSC_Tests_Iu.TC_iu_lu_and_mt_sms_paging_repeated Change-Id: Ie914ea88f31ac158f4bd1700143bbe728dd05e0b --- M msc/MSC_Tests.ttcn 1 file changed, 28 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/01/16301/3 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16301 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Ie914ea88f31ac158f4bd1700143bbe728dd05e0b Gerrit-Change-Number: 16301 Gerrit-PatchSet: 3 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: newpatchset
Change in osmo-ttcn3-hacks[master]: msc: add tests for SMS and voice call while Paging
Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16297 to look at the new patch set (#4). Change subject: msc: add tests for SMS and voice call while Paging .. msc: add tests for SMS and voice call while Paging Start a second - MT SMS - MT call while a Paging is already ongoing. The second trans being an SMS works. The second trans being a call fails with current osmo-msc master; a fix is in the related patch (s.b.). Related: Idd4537b5f4817d17e5c87d9a93775a32aee0e7be Change-Id: Ieeae6322d4e80893ea3408c6b74bf8e32bea8e46 --- M msc/BSC_ConnectionHandler.ttcn M msc/MSC_Tests.ttcn M msc/MSC_Tests_Iu.ttcn 3 files changed, 139 insertions(+), 7 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/97/16297/4 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16297 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Ieeae6322d4e80893ea3408c6b74bf8e32bea8e46 Gerrit-Change-Number: 16297 Gerrit-PatchSet: 4 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: neels Gerrit-CC: laforge Gerrit-CC: pespin Gerrit-MessageType: newpatchset
Change in osmo-ttcn3-hacks[master]: msc: add tests for SMS and voice call while Paging
neels has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16297 ) Change subject: msc: add tests for SMS and voice call while Paging .. Patch Set 2: (3 comments) https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16297/2/msc/MSC_Tests.ttcn File msc/MSC_Tests.ttcn: https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16297/2/msc/MSC_Tests.ttcn@173 PS2, Line 173: f_vty_transceive(MSCVTY, "logp lglobal notice " & log_msg); What about this MSCVTY? I would prefer to not have to pass that as argument all the time, Seems good enough to me to "code dup" these two lines to each FOO_ConnHdlr context? If it's too controversial I could also drop this part into a separate patch and only log() below... https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16297/2/msc/MSC_Tests.ttcn@1892 PS2, Line 1892: spars.tp.ud := 'C8329BFD064D9B53'O; re below comment: same PDU as here, and see the "Hello SMS" above that this represents in, what, a septet stream or similar nightmare. https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16297/2/msc/MSC_Tests.ttcn@1941 PS2, Line 1941: spars.tp.ud := '41F79B8E2ECB41D3E614'O; ("Another SMS") I guess I would have put comments next to it if the previous code I copied from had them. Seems obvious enough, right? -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16297 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Ieeae6322d4e80893ea3408c6b74bf8e32bea8e46 Gerrit-Change-Number: 16297 Gerrit-PatchSet: 2 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: neels Gerrit-CC: laforge Gerrit-CC: pespin Gerrit-Comment-Date: Thu, 12 Dec 2019 15:20:48 + Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment
Change in osmo-msc[master]: Add tests for transaction routines
neels has abandoned this change. ( https://gerrit.osmocom.org/c/osmo-msc/+/12556 ) Change subject: Add tests for transaction routines .. Abandoned -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/12556 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: I78dfb7cd35073a305cf668beda7d9d58d5a5a713 Gerrit-Change-Number: 12556 Gerrit-PatchSet: 11 Gerrit-Owner: Max Gerrit-Assignee: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-MessageType: abandon
Change in osmo-msc[master]: add full SDP codec information to the MNCC socket
neels has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-msc/+/15953 ) Change subject: add full SDP codec information to the MNCC socket .. Patch Set 6: (5 comments) https://gerrit.osmocom.org/c/osmo-msc/+/15953/5//COMMIT_MSG Commit Message: https://gerrit.osmocom.org/c/osmo-msc/+/15953/5//COMMIT_MSG@7 PS5, Line 7: add full SDP codec information to the MNCC socket > So there's 2 main topics here which seem would be in different commits, > splitting this huge commit: […] That is true, but it is also true that it is realitvely hard to do one without the other. I actually started out separating it once, and I gave up, because it seemed to be too much effort. The reasons: to only move the CRCX implies changing the order of the callbacks between msc_a and gsm_04_08_cc. That semantically separates in different places than before, and would require keeping state across those calls. Keeping that state is in this patch implemented by cc_sdp.c, which accumulates all information about what parts imply what codec choices. So, "just for the sake of review", I would invent a different patch version, that keeps state in a way that needs to be made to work and make sense, yet is again completely discarded one patch later. I would argue that reviewers should in fact take a test setup, be it in hardware or in ttcn3, and examine what this code does and how it acts and reacts. This kind of profound change should anyway see such scrutiny, IMHO. To put it in blunt words, I want people to understand this patch and what it is doing. Now, OTOH, that may be naive. I am not sure what benefit it would bring to do the extra work and separate patches, just to get two half uninformed reviews instead of no informed review at all. But if it means getting the patch merged (and if sysmocom agrees in the form of time available) then I can also invest more time in separating this paradigm shift into one weird patch that is then followed by still a paradigm shift. I know I'm sounding sarcastic, but whatever the community needs is fine with me. Maybe it does need to sit here a bit longer, maybe needs to be test-run at congress first, gain more audience before it can be merged. I personally think this change is really exciting, also with the other change that I still have in mind for after this patch, because it allows a truly informed codec choice for the first time. So we can let this sit here for a bit, I'm fairly confident that someone or other will be drawn to it at some point and give it deep attention. https://gerrit.osmocom.org/c/osmo-msc/+/15953/5/include/osmocom/msc/gsm_04_08.h File include/osmocom/msc/gsm_04_08.h: https://gerrit.osmocom.org/c/osmo-msc/+/15953/5/include/osmocom/msc/gsm_04_08.h@51 PS5, Line 51: int cc_assignment_done(struct gsm_trans *trans); (talking about these callbacks above) https://gerrit.osmocom.org/c/osmo-msc/+/15953/5/src/libmsc/gsm_04_08_cc.c File src/libmsc/gsm_04_08_cc.c: https://gerrit.osmocom.org/c/osmo-msc/+/15953/5/src/libmsc/gsm_04_08_cc.c@581 PS5, Line 581: >msc_a->cc.codec_list_bss_supported); (talking about this state above) https://gerrit.osmocom.org/c/osmo-msc/+/15953/5/src/libmsc/gsm_04_08_cc.c@640 PS5, Line 640: sdp->rtp = *rtp_cn_local; (and this state) https://gerrit.osmocom.org/c/osmo-msc/+/15953/5/src/libmsc/gsm_04_08_cc.c@719 PS5, Line 719: sdp_audio_codecs_to_bearer_cap(>bearer_cap, >cc.sdp.result.audio_codecs); (this state ... and so on) -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/15953 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: I8c3b2de53ffae4ec3a66b9dabf308c290a2c999f Gerrit-Change-Number: 15953 Gerrit-PatchSet: 6 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: neels Gerrit-Reviewer: pespin Gerrit-Comment-Date: Thu, 12 Dec 2019 15:04:16 + Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: pespin Gerrit-MessageType: comment
Change in osmo-ci[master]: OBS: clone from gerrit.osmocom.org
osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ci/+/16561 ) Change subject: OBS: clone from gerrit.osmocom.org .. OBS: clone from gerrit.osmocom.org Work around "garbage at end of loose object" errors that occasionally cause these jenkins jobs to fail. A few repositories are not hosted on gerrit, so they still get cloned from git.osmocom.org. However, having almost all repositories cloned from gerrit should improve the situation a lot. Related: OS#4083 Change-Id: Id8f08a1bc10d6c81be9ad44c60646e2ea9f6cf4e --- M scripts/common.sh M scripts/osmocom-latest-packages.sh M scripts/osmocom-nightly-packages.sh 3 files changed, 20 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/61/16561/1 diff --git a/scripts/common.sh b/scripts/common.sh index 6d91101..8b21166 100644 --- a/scripts/common.sh +++ b/scripts/common.sh @@ -1,6 +1,7 @@ #!/bin/sh # Various functions and variables used in multiple osmo-ci shell scripts OSMO_GIT_URL="https://git.osmocom.org; +OSMO_GIT_URL_GERRIT="https://gerrit.osmocom.org; # Osmocom repositories of which we want to build release tarballs automatically, and list the current versions at # https://jenkins.osmocom.org/jenkins/job/Osmocom-list-commits/lastSuccessfulBuild/artifact/commits.txt @@ -99,6 +100,20 @@ fi } +# Print git clone URL for an Osmocom git repository. Prefer the gerrit clone URL, because cloning from the regular URL +# sometimes results in the "garbage at end of loose object" error (OS#4083). +# $1: Osmocom project (e.g. "osmo-hlr") +osmo_git_clone_url() { + case "$1" in + rtl-sdr|osmo-fl2k|libosmo-dsp|libgtpnl|libasn1c|libusrp|libsmpp34) + echo "$OSMO_GIT_URL"/"$1" + ;; + *) + echo "$OSMO_GIT_URL_GERRIT"/"$1" + ;; + esac +} + # Print the subdirectory of the repository where the source lies (configure.ac etc.). # Print nothing when the source is in the topdir of the repository. osmo_source_subdir() { diff --git a/scripts/osmocom-latest-packages.sh b/scripts/osmocom-latest-packages.sh index 509bced..3770ee1 100755 --- a/scripts/osmocom-latest-packages.sh +++ b/scripts/osmocom-latest-packages.sh @@ -55,7 +55,7 @@ if [ "$project" = "limesuite" ]; then [ -d "$project" ] || git clone "https://github.com/myriadrf/LimeSuite; "$project" else -[ -d "$project" ] || osmo_git_clone_date "https://git.osmocom.org/$project; +[ -d "$project" ] || osmo_git_clone_date "$(osmo_git_clone_url "$project")" fi cd "$project" git fetch @@ -131,6 +131,7 @@ build_osmocom() { prepare + # NOTE: when adding a repository that is not in gerrit, adjust osmo_git_clone_url() checkout limesuite checkout osmo-gsm-manuals checkout libosmocore diff --git a/scripts/osmocom-nightly-packages.sh b/scripts/osmocom-nightly-packages.sh index 1c76cc1..d49d968 100755 --- a/scripts/osmocom-nightly-packages.sh +++ b/scripts/osmocom-nightly-packages.sh @@ -64,14 +64,13 @@ checkout() { local name=$1 local branch=$2 - local url="https://git.osmocom.org; cd "$REPO" if [ -n "$branch" ] ; then -osmo_git_clone_date "$url/$name" -b "$branch" +osmo_git_clone_date "$(osmo_git_clone_url "$name")" -b "$branch" else -osmo_git_clone_date "$url/$name" +osmo_git_clone_date "$(osmo_git_clone_url "$name")" fi cd - @@ -177,6 +176,7 @@ prepare + # NOTE: when adding a repository that is not in gerrit, adjust osmo_git_clone_url() checkout_limesuite checkout osmo-gsm-manuals checkout libosmocore -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/16561 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: Id8f08a1bc10d6c81be9ad44c60646e2ea9f6cf4e Gerrit-Change-Number: 16561 Gerrit-PatchSet: 1 Gerrit-Owner: osmith Gerrit-MessageType: newchange
Change in osmo-ci[master]: jobs/update-osmo-ci-on-slaves.yml: use master only
osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ci/+/16560 ) Change subject: jobs/update-osmo-ci-on-slaves.yml: use master only .. jobs/update-osmo-ci-on-slaves.yml: use master only When manually triggering the update-osmo-ci-on-slaves, it must only ever use the master branch. Earler today I ran it manually, and it seemed to pick the last branch that was pushed to instead. Change-Id: I44ee3ff4477cb8313e5608b10b46ac131f51fbfc --- M jobs/update-osmo-ci-on-slaves.yml 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/60/16560/1 diff --git a/jobs/update-osmo-ci-on-slaves.yml b/jobs/update-osmo-ci-on-slaves.yml index d1bc893..e881e92 100644 --- a/jobs/update-osmo-ci-on-slaves.yml +++ b/jobs/update-osmo-ci-on-slaves.yml @@ -22,6 +22,8 @@ git-config-name: 'Jenkins Builder' git-config-email: 'jenk...@osmocom.org' skip-tag: true + branches: +- 'master' triggers: - pollscm: -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/16560 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I44ee3ff4477cb8313e5608b10b46ac131f51fbfc Gerrit-Change-Number: 16560 Gerrit-PatchSet: 1 Gerrit-Owner: osmith Gerrit-MessageType: newchange
Change in simtrace2[master]: DFU: add DFU application
tsaitgaist has posted comments on this change. ( https://gerrit.osmocom.org/c/simtrace2/+/16558 ) Change subject: DFU: add DFU application .. Patch Set 1: > Patch Set 1: > > what about something bogus like "afblud" (application for boot loader update > via dfu)? I find afblud also very cryptic, but I agree that the firmware names are not super clear for uninitiated users. just flashing the DFU application using the DFU bootloader so to updated the bootloader using DFU is complicated enough to parse. instead I think we just need to provide a script taking care of updating everything. this will hide all the details and avoid confusion and mistakes. thus I don't think renaming is necessary, but I don't mind. instead of renaming the DFU "app" (since it's the same for the bootloader or application), I would just rename the final binary in the Makefile. -- To view, visit https://gerrit.osmocom.org/c/simtrace2/+/16558 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: simtrace2 Gerrit-Branch: master Gerrit-Change-Id: Ic273bb593a7669111b0219fe301d7897419167c8 Gerrit-Change-Number: 16558 Gerrit-PatchSet: 1 Gerrit-Owner: tsaitgaist Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: tsaitgaist Gerrit-CC: laforge Gerrit-Comment-Date: Thu, 12 Dec 2019 11:53:23 + Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment
Build failure of network:osmocom:nightly/simtrace2 in xUbuntu_16.04/x86_64
Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/simtrace2/xUbuntu_16.04/x86_64 Package network:osmocom:nightly/simtrace2 failed to build in xUbuntu_16.04/x86_64 Check out the package for editing: osc checkout network:osmocom:nightly simtrace2 Last lines of build log: [ 225s] /usr/src/packages/BUILD/firmware/apps/dfu/main.c:360: warning: undefined reference to `__stack_chk_guard' [ 225s] obj/simtrace/flash_dfu_desc.o: In function `set_usb_serial_str': [ 225s] /usr/src/packages/BUILD/firmware/./atmel_softpack_libraries/usb/device/dfu/dfu_desc.c:186: warning: undefined reference to `__stack_chk_fail' [ 225s] /usr/src/packages/BUILD/firmware/./atmel_softpack_libraries/usb/device/dfu/dfu_desc.c:186: warning: undefined reference to `__stack_chk_guard' [ 225s] obj/simtrace/flash_dfu_driver.o: In function `handle_getstate': [ 225s] /usr/src/packages/BUILD/firmware/./atmel_softpack_libraries/usb/device/dfu/dfu_driver.c:91: warning: undefined reference to `__stack_chk_fail' [ 225s] /usr/src/packages/BUILD/firmware/./atmel_softpack_libraries/usb/device/dfu/dfu_driver.c:91: warning: undefined reference to `__stack_chk_guard' [ 225s] collect2: error: ld returned 1 exit status [ 225s] % [ 225s] Makefile:233: recipe for target 'flash' failed [ 225s] make[2]: *** [flash] Error 1 [ 225s] make[2]: Leaving directory '/usr/src/packages/BUILD/firmware' [ 225s] Makefile:10: recipe for target 'fw-simtrace-dfu' failed [ 225s] make[1]: *** [fw-simtrace-dfu] Error 2 [ 225s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 225s] dh_auto_build: make -j1 returned exit code 2 [ 225s] debian/rules:16: recipe for target 'build' failed [ 225s] make: *** [build] Error 2 [ 225s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 225s] [ 225s] lamb27 failed "build simtrace2_0.7.0.3.75a5.dsc" at Thu Dec 12 10:54:57 UTC 2019. [ 225s] [ 225s] ### VM INTERACTION START ### [ 229s] [ 193.144278] sysrq: SysRq : Power Off [ 229s] [ 193.209250] reboot: Power down [ 229s] ### VM INTERACTION END ### [ 229s] [ 229s] lamb27 failed "build simtrace2_0.7.0.3.75a5.dsc" at Thu Dec 12 10:55:02 UTC 2019. [ 229s] -- Configure notifications at https://build.opensuse.org/my/notifications openSUSE Build Service (https://build.opensuse.org/)
Build failure of network:osmocom:nightly/simtrace2 in xUbuntu_16.04/i586
Visit https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/simtrace2/xUbuntu_16.04/i586 Package network:osmocom:nightly/simtrace2 failed to build in xUbuntu_16.04/i586 Check out the package for editing: osc checkout network:osmocom:nightly simtrace2 Last lines of build log: [ 169s] /usr/src/packages/BUILD/firmware/apps/dfu/main.c:360: warning: undefined reference to `__stack_chk_guard' [ 169s] obj/simtrace/flash_dfu_desc.o: In function `set_usb_serial_str': [ 169s] /usr/src/packages/BUILD/firmware/./atmel_softpack_libraries/usb/device/dfu/dfu_desc.c:186: warning: undefined reference to `__stack_chk_fail' [ 169s] /usr/src/packages/BUILD/firmware/./atmel_softpack_libraries/usb/device/dfu/dfu_desc.c:186: warning: undefined reference to `__stack_chk_guard' [ 169s] obj/simtrace/flash_dfu_driver.o: In function `handle_getstate': [ 169s] /usr/src/packages/BUILD/firmware/./atmel_softpack_libraries/usb/device/dfu/dfu_driver.c:91: warning: undefined reference to `__stack_chk_fail' [ 169s] /usr/src/packages/BUILD/firmware/./atmel_softpack_libraries/usb/device/dfu/dfu_driver.c:91: warning: undefined reference to `__stack_chk_guard' [ 169s] collect2: error: ld returned 1 exit status [ 169s] % [ 169s] Makefile:233: recipe for target 'flash' failed [ 169s] make[2]: *** [flash] Error 1 [ 169s] make[2]: Leaving directory '/usr/src/packages/BUILD/firmware' [ 169s] Makefile:10: recipe for target 'fw-simtrace-dfu' failed [ 169s] make[1]: *** [fw-simtrace-dfu] Error 2 [ 169s] make[1]: Leaving directory '/usr/src/packages/BUILD' [ 169s] dh_auto_build: make -j1 returned exit code 2 [ 169s] debian/rules:16: recipe for target 'build' failed [ 169s] make: *** [build] Error 2 [ 169s] dpkg-buildpackage: error: debian/rules build gave error exit status 2 [ 169s] [ 169s] lamb05 failed "build simtrace2_0.7.0.3.75a5.dsc" at Thu Dec 12 10:45:36 UTC 2019. [ 169s] [ 169s] ### VM INTERACTION START ### [ 172s] [ 158.664503] sysrq: SysRq : Power Off [ 172s] [ 158.689088] reboot: Power down [ 172s] ### VM INTERACTION END ### [ 172s] [ 172s] lamb05 failed "build simtrace2_0.7.0.3.75a5.dsc" at Thu Dec 12 10:45:39 UTC 2019. [ 172s] -- Configure notifications at https://build.opensuse.org/my/notifications openSUSE Build Service (https://build.opensuse.org/)
Change in openbsc[master]: osmoappdesc.py, tests, ipa.py: switch to python 3
osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/openbsc/+/16544 ) Change subject: osmoappdesc.py, tests, ipa.py: switch to python 3 .. Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/openbsc/+/16544 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Change-Id: Id7d006f892198bb8a7c0d4a8a8ea00b8d0e62df4 Gerrit-Change-Number: 16544 Gerrit-PatchSet: 2 Gerrit-Owner: osmith Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: osmith Gerrit-Comment-Date: Thu, 12 Dec 2019 09:47:42 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
Change in osmo-bsc[master]: debian, osmoappdesc.py, tests: switch to python 3
osmith has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/16545 ) Change subject: debian, osmoappdesc.py, tests: switch to python 3 .. debian, osmoappdesc.py, tests: switch to python 3 Make build and external tests work with python3, so we can drop the python2 dependency. This should be merged shortly after osmo-python-tests was migrated to python3, and the jenkins build slaves were (automatically) updated to have the new osmo-python-tests installed. Related: OS#2819 Depends: osmo-python-tests I3ffc3519bf6c22536a49dad7a966188ddad351a7 Change-Id: I438ca0c4b8e7957d0f347a5b2f5c4cb93f9325e6 --- M debian/control M osmoappdesc.py M tests/ctrl_test_runner.py M tests/vty_test_runner.py 4 files changed, 226 insertions(+), 226 deletions(-) Approvals: laforge: Looks good to me, approved Jenkins Builder: Verified diff --git a/debian/control b/debian/control index a6b8c02..93b8a55 100644 --- a/debian/control +++ b/debian/control @@ -9,7 +9,7 @@ automake, libtool, pkg-config, - python-minimal, + python3-minimal, libcdk5-dev, libtalloc-dev, libosmocore-dev (>= 1.2.0), diff --git a/osmoappdesc.py b/osmoappdesc.py index f5f18b2..08c3252 100644 --- a/osmoappdesc.py +++ b/osmoappdesc.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # (C) 2013 by Katerina Barone-Adesi # This program is free software: you can redistribute it and/or modify diff --git a/tests/ctrl_test_runner.py b/tests/ctrl_test_runner.py index 4d87b74..e598273 100755 --- a/tests/ctrl_test_runner.py +++ b/tests/ctrl_test_runner.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python2 +#!/usr/bin/env python3 # (C) 2013 by Jacob Erlbeck # (C) 2014 by Holger Hans Peter Freyther @@ -53,8 +53,8 @@ try: self.proc = osmoutil.popen_devnull(osmo_ctrl_cmd) except OSError: -print >> sys.stderr, "Current directory: %s" % os.getcwd() -print >> sys.stderr, "Consider setting -b" +print("Current directory: %s" % os.getcwd(), file=sys.stderr) +print("Consider setting -b", file=sys.stderr) time.sleep(2) appstring = self.ctrl_app()[2] @@ -72,7 +72,7 @@ def connect(self, host, port): if verbose: -print "Connecting to host %s:%i" % (host, port) +print("Connecting to host %s:%i" % (host, port)) retries = 30 while True: @@ -92,7 +92,7 @@ def send(self, data): if verbose: -print "Sending \"%s\"" %(data) +print("Sending \"%s\"" %(data)) data = Ctrl().add_header(data) return self.sock.send(data) == len(data) @@ -121,9 +121,9 @@ data = self.sock.recv(4096) while (len(data)>0): (head, data) = IPA().split_combined(data) -answer = Ctrl().rem_header(head) +answer = Ctrl().rem_header(head).decode() if verbose: -print "Got message:", answer +print("Got message:", answer) (mtype, id, msg) = answer.split(None, 2) id = int(id) rsp = {'mtype': mtype, 'id': id} @@ -139,7 +139,7 @@ responses[id] = rsp if verbose: -print "Decoded replies: ", responses +print("Decoded replies: ", responses) return responses @@ -159,80 +159,80 @@ def testCtrlErrs(self): r = self.do_get('invalid') -self.assertEquals(r['mtype'], 'ERROR') -self.assertEquals(r['error'], 'Command not found') +self.assertEqual(r['mtype'], 'ERROR') +self.assertEqual(r['error'], 'Command not found') r = self.do_set('rf_locked', '999') -self.assertEquals(r['mtype'], 'ERROR') -self.assertEquals(r['error'], 'Value failed verification.') +self.assertEqual(r['mtype'], 'ERROR') +self.assertEqual(r['error'], 'Value failed verification.') r = self.do_get('bts') -self.assertEquals(r['mtype'], 'ERROR') -self.assertEquals(r['error'], 'Error while parsing the index.') +self.assertEqual(r['mtype'], 'ERROR') +self.assertEqual(r['error'], 'Error while parsing the index.') r = self.do_get('bts.999') -self.assertEquals(r['mtype'], 'ERROR') -self.assertEquals(r['error'], 'Error while resolving object') +self.assertEqual(r['mtype'], 'ERROR') +self.assertEqual(r['error'], 'Error while resolving object') def testBtsLac(self): r = self.do_get('bts.0.location-area-code') -self.assertEquals(r['mtype'], 'GET_REPLY') -self.assertEquals(r['var'], 'bts.0.location-area-code') -self.assertEquals(r['value'], '1') +self.assertEqual(r['mtype'], 'GET_REPLY') +self.assertEqual(r['var'], 'bts.0.location-area-code') +
Change in openbsc[master]: osmoappdesc.py, tests, ipa.py: switch to python 3
Hello laforge, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/openbsc/+/16544 to look at the new patch set (#2). Change subject: osmoappdesc.py, tests, ipa.py: switch to python 3 .. osmoappdesc.py, tests, ipa.py: switch to python 3 Make build and external tests work with python3, so we can drop the python2 dependency. This should be merged shortly after osmo-python-tests was migrated to python3, and the jenkins build slaves were (automatically) updated to have the new osmo-python-tests installed. Related: OS#2819 Depends: osmo-python-tests I3ffc3519bf6c22536a49dad7a966188ddad351a7 Change-Id: Id7d006f892198bb8a7c0d4a8a8ea00b8d0e62df4 --- M openbsc/contrib/ipa.py M openbsc/osmoappdesc.py M openbsc/tests/ctrl_test_runner.py M openbsc/tests/smpp_test_runner.py M openbsc/tests/vty_test_runner.py 5 files changed, 452 insertions(+), 442 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/44/16544/2 -- To view, visit https://gerrit.osmocom.org/c/openbsc/+/16544 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Change-Id: Id7d006f892198bb8a7c0d4a8a8ea00b8d0e62df4 Gerrit-Change-Number: 16544 Gerrit-PatchSet: 2 Gerrit-Owner: osmith Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: newpatchset
Change in osmo-msc[master]: osmoappdesc.py, tests: switch to python 3
osmith has submitted this change. ( https://gerrit.osmocom.org/c/osmo-msc/+/16550 ) Change subject: osmoappdesc.py, tests: switch to python 3 .. osmoappdesc.py, tests: switch to python 3 Make build and external tests work with python3, so we can drop the python2 dependency. This should be merged shortly after osmo-python-tests was migrated to python3, and the jenkins build slaves were (automatically) updated to have the new osmo-python-tests installed. Related: OS#2819 Depends: osmo-python-tests I3ffc3519bf6c22536a49dad7a966188ddad351a7 Change-Id: I53ccde96dd3785098df0f7d693c504c8b8302e90 --- M osmoappdesc.py M tests/ctrl_test_runner.py M tests/smpp_test_runner.py M tests/vty_test_runner.py 4 files changed, 60 insertions(+), 60 deletions(-) Approvals: laforge: Looks good to me, approved Jenkins Builder: Verified diff --git a/osmoappdesc.py b/osmoappdesc.py index bd7fea3..b7a274c 100644 --- a/osmoappdesc.py +++ b/osmoappdesc.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # (C) 2013 by Katerina Barone-Adesi # This program is free software: you can redistribute it and/or modify diff --git a/tests/ctrl_test_runner.py b/tests/ctrl_test_runner.py index f652a67..d24cc00 100755 --- a/tests/ctrl_test_runner.py +++ b/tests/ctrl_test_runner.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python2 +#!/usr/bin/env python3 # (C) 2013 by Jacob Erlbeck # (C) 2014 by Holger Hans Peter Freyther @@ -53,8 +53,8 @@ try: self.proc = osmoutil.popen_devnull(osmo_ctrl_cmd) except OSError: -print >> sys.stderr, "Current directory: %s" % os.getcwd() -print >> sys.stderr, "Consider setting -b" +print("Current directory: %s" % os.getcwd(), file=sys.stderr) +print("Consider setting -b", file=sys.stderr) time.sleep(2) appstring = self.ctrl_app()[2] @@ -72,7 +72,7 @@ def connect(self, host, port): if verbose: -print "Connecting to host %s:%i" % (host, port) +print("Connecting to host %s:%i" % (host, port)) retries = 30 while True: @@ -92,7 +92,7 @@ def send(self, data): if verbose: -print "Sending \"%s\"" %(data) +print("Sending \"%s\"" %(data)) data = Ctrl().add_header(data) return self.sock.send(data) == len(data) @@ -123,7 +123,7 @@ (head, data) = IPA().split_combined(data) answer = Ctrl().rem_header(head) if verbose: -print "Got message:", answer +print("Got message:", answer) (mtype, id, msg) = answer.split(None, 2) id = int(id) rsp = {'mtype': mtype, 'id': id} @@ -139,7 +139,7 @@ responses[id] = rsp if verbose: -print "Decoded replies: ", responses +print("Decoded replies: ", responses) return responses @@ -183,9 +183,9 @@ if args.p: confpath = args.p -print "confpath %s, workdir %s" % (confpath, workdir) +print("confpath %s, workdir %s" % (confpath, workdir)) os.chdir(workdir) -print "Running tests for specific control commands" +print("Running tests for specific control commands") suite = unittest.TestSuite() suite.addTest(unittest.TestLoader().loadTestsFromTestCase(TestCtrlMSC)) res = unittest.TextTestRunner(verbosity=verbose_level).run(suite) diff --git a/tests/smpp_test_runner.py b/tests/smpp_test_runner.py index f6567d9..b8c6e1c 100755 --- a/tests/smpp_test_runner.py +++ b/tests/smpp_test_runner.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python2 +#!/usr/bin/env python3 # (C) 2014 by Holger Hans Peter Freyther # based on vty_test_runner.py: @@ -46,8 +46,8 @@ try: self.proc = osmoutil.popen_devnull(osmo_vty_cmd) except OSError: -print >> sys.stderr, "Current directory: %s" % os.getcwd() -print >> sys.stderr, "Consider setting -b" +print("Current directory: %s" % os.getcwd(), file=sys.stderr) +print("Consider setting -b", file=sys.stderr) appstring = self.vty_app()[2] appport = self.vty_app()[0] @@ -73,14 +73,14 @@ # Enable the configuration self.vty.enable() self.assertTrue(self.vty.verify("configure terminal", [''])) -self.assertEquals(self.vty.node(), 'config') +self.assertEqual(self.vty.node(), 'config') self.assertTrue(self.vty.verify('smpp', [''])) -self.assertEquals(self.vty.node(), 'config-smpp') +self.assertEqual(self.vty.node(), 'config-smpp') self.assertTrue(self.vty.verify('system-id test', [''])) self.assertTrue(self.vty.verify('local-tcp-port 2775', [''])) self.assertTrue(self.vty.verify('esme test', [''])) -self.assertEquals(self.vty.node(), 'config-smpp-esme') +
Change in osmo-sgsn[master]: osmoappdesc.py, tests: switch to python 3
osmith has submitted this change. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/16552 ) Change subject: osmoappdesc.py, tests: switch to python 3 .. osmoappdesc.py, tests: switch to python 3 Make build and external tests work with python3, so we can drop the python2 dependency. This should be merged shortly after osmo-python-tests was migrated to python3, and the jenkins build slaves were (automatically) updated to have the new osmo-python-tests installed. Related: OS#2819 Depends: osmo-python-tests I3ffc3519bf6c22536a49dad7a966188ddad351a7 Change-Id: I8c07d99c1bc9f0383e4bce17544e0998998cc54d --- M osmoappdesc.py M tests/ctrl_test_runner.py M tests/vty_test_runner.py 3 files changed, 82 insertions(+), 82 deletions(-) Approvals: laforge: Looks good to me, approved Jenkins Builder: Verified diff --git a/osmoappdesc.py b/osmoappdesc.py index 08166a9..e91043f 100644 --- a/osmoappdesc.py +++ b/osmoappdesc.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # (C) 2013 by Katerina Barone-Adesi # This program is free software: you can redistribute it and/or modify diff --git a/tests/ctrl_test_runner.py b/tests/ctrl_test_runner.py index 9c253fc..69b2478 100755 --- a/tests/ctrl_test_runner.py +++ b/tests/ctrl_test_runner.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python2 +#!/usr/bin/env python3 # (C) 2013 by Jacob Erlbeck # (C) 2014 by Holger Hans Peter Freyther @@ -53,8 +53,8 @@ try: self.proc = osmoutil.popen_devnull(osmo_ctrl_cmd) except OSError: -print >> sys.stderr, "Current directory: %s" % os.getcwd() -print >> sys.stderr, "Consider setting -b" +print("Current directory: %s" % os.getcwd(), file=sys.stderr) +print("Consider setting -b", file=sys.stderr) time.sleep(2) appstring = self.ctrl_app()[2] @@ -72,7 +72,7 @@ def connect(self, host, port): if verbose: -print "Connecting to host %s:%i" % (host, port) +print("Connecting to host %s:%i" % (host, port)) retries = 30 while True: @@ -92,7 +92,7 @@ def send(self, data): if verbose: -print "Sending \"%s\"" %(data) +print("Sending \"%s\"" %(data)) data = Ctrl().add_header(data) return self.sock.send(data) == len(data) @@ -121,9 +121,9 @@ data = self.sock.recv(4096) while (len(data)>0): (head, data) = IPA().split_combined(data) -answer = Ctrl().rem_header(head) +answer = Ctrl().rem_header(head).decode() if verbose: -print "Got message:", answer +print("Got message:", answer) (mtype, id, msg) = answer.split(None, 2) id = int(id) rsp = {'mtype': mtype, 'id': id} @@ -139,7 +139,7 @@ responses[id] = rsp if verbose: -print "Decoded replies: ", responses +print("Decoded replies: ", responses) return responses @@ -154,9 +154,9 @@ def testListSubscribers(self): # TODO. Add command to mark a subscriber as active r = self.do_get('subscriber-list-active-v1') -self.assertEquals(r['mtype'], 'GET_REPLY') -self.assertEquals(r['var'], 'subscriber-list-active-v1') -self.assertEquals(r['value'], None) +self.assertEqual(r['mtype'], 'GET_REPLY') +self.assertEqual(r['var'], 'subscriber-list-active-v1') +self.assertEqual(r['value'], None) def add_sgsn_test(suite, workdir): if not os.path.isfile(os.path.join(workdir, "src/sgsn/osmo-sgsn")): @@ -191,9 +191,9 @@ if args.p: confpath = args.p -print "confpath %s, workdir %s" % (confpath, workdir) +print("confpath %s, workdir %s" % (confpath, workdir)) os.chdir(workdir) -print "Running tests for specific control commands" +print("Running tests for specific control commands") suite = unittest.TestSuite() add_sgsn_test(suite, workdir) res = unittest.TextTestRunner(verbosity=verbose_level).run(suite) diff --git a/tests/vty_test_runner.py b/tests/vty_test_runner.py index a925b6b..ed52d5f 100755 --- a/tests/vty_test_runner.py +++ b/tests/vty_test_runner.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python2 +#!/usr/bin/env python3 # (C) 2013 by Katerina Barone-Adesi # (C) 2013 by Holger Hans Peter Freyther @@ -33,9 +33,9 @@ def checkForEndAndExit(self): res = self.vty.command("list") #print ('looking for "exit"\n') -self.assert_(res.find(' exit\r') > 0) +self.assertTrue(res.find(' exit\r') > 0) #print 'found "exit"\nlooking for "end"\n' -self.assert_(res.find(' end\r') > 0) +self.assertTrue(res.find(' end\r') > 0) #print 'found "end"\n' def vty_command(self): @@ -54,8 +54,8 @@ try: self.proc = osmoutil.popen_devnull(osmo_vty_cmd)
Change in osmo-iuh[master]: debian, asn1tostruct.py: switch to python3
osmith has submitted this change. ( https://gerrit.osmocom.org/c/osmo-iuh/+/16548 ) Change subject: debian, asn1tostruct.py: switch to python3 .. debian, asn1tostruct.py: switch to python3 Make build work with python3 and drop the python2 dependency. Related: OS#2819 Change-Id: Idb9d7a349ddb7619c784823f740648c7956bae5e --- M asn1/utils/asn1tostruct.py M debian/control 2 files changed, 35 insertions(+), 35 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/asn1/utils/asn1tostruct.py b/asn1/utils/asn1tostruct.py index 3c33980..220517d 100755 --- a/asn1/utils/asn1tostruct.py +++ b/asn1/utils/asn1tostruct.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python2 +#!/usr/bin/env python3 import re, os, sys, string import datetime @@ -27,11 +27,11 @@ sys.stderr.write(FAIL + string + ENDC + "\n") def printWarning(string): -print WARN + string + ENDC +print(WARN + string + ENDC) def printDebug(string): if verbosity > 0: -print string +print(string) def outputHeaderToFile(f, filename): now = datetime.datetime.utcfromtimestamp(int(os.environ.get('SOURCE_DATE_EPOCH', time.time( @@ -57,7 +57,7 @@ return lowered for c in swapped: -if c in string.lowercase: +if c.islower(): newstr += c idx += 1 else: @@ -70,14 +70,14 @@ return newstr def usage(): -print "Python parser for asn1 v%s" % (version) -print "Usage: python asn1tostruct.py [options]" -print "Available options:" -print "-dEnable script debug" -print "-f [file] Input file to parse" -print "-o [dir] Output files to given directory" -print "-p [pfx] Prefix all types with given prefix" -print "-hPrint this help and return" +print("Python parser for asn1 v%s" % (version)) +print("Usage: python asn1tostruct.py [options]") +print("Available options:") +print("-dEnable script debug") +print("-f [file] Input file to parse") +print("-o [dir] Output files to given directory") +print("-p [pfx] Prefix all types with given prefix") +print("-hPrint this help and return") try: opts, args = getopt.getopt(sys.argv[1:], "df:ho:p:", ["debug", "file", "help", "outdir", "prefix"]) @@ -102,7 +102,7 @@ sys.exit(2) for filename in filenames: -file = open(filename, 'r') +file = open(filename, 'r', encoding='utf-8') for line in file: # Removing any comment if line.find('--') >= 0: @@ -139,17 +139,17 @@ printFail("No Information Element parsed, exiting") sys.exit(0) -f = open(outdir + fileprefix + '_ies_defs.h', 'w') +f = open(outdir + fileprefix + '_ies_defs.h', 'w', encoding='utf-8') outputHeaderToFile(f, filename) f.write("#include \"%s_common.h\"\n\n" % (fileprefix)) f.write("#ifndef %s_IES_DEFS_H_\n#define %s_IES_DEFS_H_\n\n" % (fileprefix.upper(), fileprefix.upper())) for key in iesDefs: -if key not in ieofielist.values(): +if key not in list(ieofielist.values()): continue -for (i, j) in ieofielist.items(): +for (i, j) in list(ieofielist.items()): if j == key: break @@ -200,10 +200,10 @@ f.write("uint8_t direction;\n") f.write("union {\n") -messageList = iesDefs.keys() +messageList = list(iesDefs.keys()) messageList.sort() for message in messageList: -if message in ieofielist.values(): +if message in list(ieofielist.values()): continue if len(iesDefs[message]["ies"]) == 0: continue @@ -212,7 +212,7 @@ f.write("} %s_message;\n\n" % (fileprefix)) for key in iesDefs: -if key in ieofielist.values(): +if key in list(ieofielist.values()): continue structName = re.sub('ies', '', key) asn1cStruct = re.sub('-', '_', re.sub('IEs', '', re.sub('-IEs', '', key))) @@ -242,7 +242,7 @@ f.write("%s_t *%s);\n\n" % (prefix + re.sub('-', '_', key), lowerFirstCamelWord(re.sub('-', '_', key for key in iesDefs: -if key not in ieofielist.values(): +if key not in list(ieofielist.values()): continue asn1cStruct = re.sub('-', '_', re.sub('IEs', '', key)) asn1cStruct = prefix + re.sub('Item', 'List', asn1cStruct) @@ -276,11 +276,11 @@ f.write("#endif /* %s_IES_DEFS_H_ */\n\n" % (fileprefix.upper())) #Generate Decode functions -f = open(outdir + fileprefix + '_decoder.c', 'w') +f = open(outdir + fileprefix + '_decoder.c', 'w', encoding='utf-8') outputHeaderToFile(f, filename) f.write("#include \"%s_common.h\"\n#include \"%s_ies_defs.h\"\n\n" % (fileprefix, fileprefix)) for key in iesDefs: -if key in ieofielist.values(): +if key in list(ieofielist.values()): continue structName = re.sub('ies', '', key) asn1cStruct = re.sub('-', '_', re.sub('IEs', '', re.sub('-IEs', '', key))) @@ -293,7 +293,7 @@ asn1cStruct =
Change in libosmocore[master]: debian, utils: switch to python 3
osmith has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/16543 ) Change subject: debian, utils: switch to python 3 .. debian, utils: switch to python 3 Make build and external tests work with python3, so we can drop the python2 dependency. This should be merged shortly after osmo-python-tests was migrated to python3, and the jenkins build slaves were (automatically) updated to have the new osmo-python-tests installed. Related: OS#2819 Depends: osmo-python-tests I3ffc3519bf6c22536a49dad7a966188ddad351a7 Change-Id: I84ef43f700e125c7a65f92347f12844e07e65655 --- M debian/control M include/Makefile.am M src/gsm/Makefile.am M tests/Makefile.am M utils/conv_codes_gsm.py M utils/conv_gen.py 6 files changed, 6 insertions(+), 6 deletions(-) Approvals: laforge: Looks good to me, approved Jenkins Builder: Verified diff --git a/debian/control b/debian/control index 6c9cfae..cf7a853 100644 --- a/debian/control +++ b/debian/control @@ -16,7 +16,7 @@ pkg-config, libtalloc-dev, libsctp-dev, - python (>= 2.7.6) + python3 Standards-Version: 3.9.8 Vcs-Git: git://git.osmocom.org/libosmocore.git Vcs-Browser: http://git.osmocom.org/libosmocore/ diff --git a/include/Makefile.am b/include/Makefile.am index a82d6ac..d76addd 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -179,7 +179,7 @@ $(AM_V_GEN)sed -e's/XX/$*/g' $< > $@ osmocom/gsm/gsm0503.h: $(top_srcdir)/utils/conv_gen.py $(top_srcdir)/utils/conv_codes_gsm.py - $(AM_V_GEN)python $(top_srcdir)/utils/conv_gen.py gen_header gsm \ + $(AM_V_GEN)python3 $(top_srcdir)/utils/conv_gen.py gen_header gsm \ --target-path $(builddir)/osmocom/gsm CLEANFILES = osmocom/gsm/gsm0503.h diff --git a/src/gsm/Makefile.am b/src/gsm/Makefile.am index f13ba9d..4a1faca 100644 --- a/src/gsm/Makefile.am +++ b/src/gsm/Makefile.am @@ -49,6 +49,6 @@ # Convolutional codes generation gsm0503_conv.c: $(top_srcdir)/utils/conv_gen.py $(top_srcdir)/utils/conv_codes_gsm.py - $(AM_V_GEN)python $(top_srcdir)/utils/conv_gen.py gen_codes gsm + $(AM_V_GEN)python3 $(top_srcdir)/utils/conv_gen.py gen_codes gsm CLEANFILES = gsm0503_conv.c diff --git a/tests/Makefile.am b/tests/Makefile.am index e8e4dee..3a3ea37 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -362,7 +362,7 @@ mv $@.tmp $@ conv/gsm0503_test_vectors.c: $(top_srcdir)/utils/conv_gen.py $(top_srcdir)/utils/conv_codes_gsm.py - $(AM_V_GEN)python $(top_srcdir)/utils/conv_gen.py gen_vectors gsm \ + $(AM_V_GEN)python3 $(top_srcdir)/utils/conv_gen.py gen_vectors gsm \ --target-path $(builddir)/conv if ENABLE_EXT_TESTS diff --git a/utils/conv_codes_gsm.py b/utils/conv_codes_gsm.py index ec77660..e189985 100644 --- a/utils/conv_codes_gsm.py +++ b/utils/conv_codes_gsm.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # -*- coding: utf-8 -*- from conv_gen import ConvolutionalCode diff --git a/utils/conv_gen.py b/utils/conv_gen.py index 06283d8..d2eda15 100644 --- a/utils/conv_gen.py +++ b/utils/conv_gen.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 mod_license = """ /* -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16543 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I84ef43f700e125c7a65f92347f12844e07e65655 Gerrit-Change-Number: 16543 Gerrit-PatchSet: 2 Gerrit-Owner: osmith Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: osmith Gerrit-MessageType: merged
Change in osmo-hlr[master]: tests/auc: change back to python3
osmith has submitted this change. ( https://gerrit.osmocom.org/c/osmo-hlr/+/16546 ) Change subject: tests/auc: change back to python3 .. tests/auc: change back to python3 Change the interpreter of the python script back to python3, as it was when the script was initially added in Idff9d757ab956179aa41ada2a223fd9f439aafbd. In the meantime, it had been changed to python2 to make it work with build slaves that were missing python3, but this is not necessary anymore. This should be merged shortly after osmo-python-tests was migrated to python3, and the jenkins build slaves were (automatically) updated to have the new osmo-python-tests installed. Related: OS#2819 Depends: osmo-python-tests I3ffc3519bf6c22536a49dad7a966188ddad351a7 Change-Id: Ifbb8f8f5428657a1c2d4d6d1217f8e374be43aba --- M debian/control M tests/auc/gen_ts_55_205_test_sets/pdftxt_2_c.py 2 files changed, 2 insertions(+), 3 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/debian/control b/debian/control index debf669..a32c68d 100644 --- a/debian/control +++ b/debian/control @@ -7,7 +7,7 @@ dh-autoreconf, dh-systemd (>= 1.5), autotools-dev, - python-minimal, + python3-minimal, libosmocore-dev, libosmo-abis-dev, libosmo-netif-dev, diff --git a/tests/auc/gen_ts_55_205_test_sets/pdftxt_2_c.py b/tests/auc/gen_ts_55_205_test_sets/pdftxt_2_c.py index b01a797..9df65b5 100755 --- a/tests/auc/gen_ts_55_205_test_sets/pdftxt_2_c.py +++ b/tests/auc/gen_ts_55_205_test_sets/pdftxt_2_c.py @@ -1,5 +1,4 @@ -#!/usr/bin/env python -# FIXME: use python3 once buildslaves are updated. +#!/usr/bin/env python3 # Convert test sets pasted from 3GPP TS 55.205 to C code. # (C) 2016 by sysmocom s.f.m.c. GmbH -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16546 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: Ifbb8f8f5428657a1c2d4d6d1217f8e374be43aba Gerrit-Change-Number: 16546 Gerrit-PatchSet: 1 Gerrit-Owner: osmith Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: osmith Gerrit-MessageType: merged
Change in osmo-pcap[master]: osmoappdesc.py: switch to python 3
osmith has submitted this change. ( https://gerrit.osmocom.org/c/osmo-pcap/+/16551 ) Change subject: osmoappdesc.py: switch to python 3 .. osmoappdesc.py: switch to python 3 Make build and external tests work with python3, so we can drop the python2 dependency. Note that the external tests, which are using this file, are currently not enabled in jenkins (OS#4317). However, I've manually verified that the external tests work with this change. Related: OS#2819 Depends: osmo-python-tests I3ffc3519bf6c22536a49dad7a966188ddad351a7 Change-Id: I19a996458745026cff60608710944e5ab76d8976 --- M osmoappdesc.py 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/osmoappdesc.py b/osmoappdesc.py index 38b18c0..331e6a9 100644 --- a/osmoappdesc.py +++ b/osmoappdesc.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # (C) 2016 by Holger Hans Peter Freyther # This program is free software: you can redistribute it and/or modify -- To view, visit https://gerrit.osmocom.org/c/osmo-pcap/+/16551 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcap Gerrit-Branch: master Gerrit-Change-Id: I19a996458745026cff60608710944e5ab76d8976 Gerrit-Change-Number: 16551 Gerrit-PatchSet: 1 Gerrit-Owner: osmith Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: osmith Gerrit-MessageType: merged
Change in osmo-mgw[master]: osmoappdesc.py: switch to python 3
osmith has submitted this change. ( https://gerrit.osmocom.org/c/osmo-mgw/+/16549 ) Change subject: osmoappdesc.py: switch to python 3 .. osmoappdesc.py: switch to python 3 Make build and external tests work with python3, so we can drop the python2 dependency. This should be merged shortly after osmo-python-tests was migrated to python3, and the jenkins build slaves were (automatically) updated to have the new osmo-python-tests installed. Related: OS#2819 Depends: osmo-python-tests I3ffc3519bf6c22536a49dad7a966188ddad351a7 Change-Id: I48f4c2c520e8285aff5d6d65f95bd041c13466e8 --- M osmoappdesc.py 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/osmoappdesc.py b/osmoappdesc.py index cee5a24..58e72e1 100644 --- a/osmoappdesc.py +++ b/osmoappdesc.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # (C) 2013 by Katerina Barone-Adesi # This program is free software: you can redistribute it and/or modify -- To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/16549 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Change-Id: I48f4c2c520e8285aff5d6d65f95bd041c13466e8 Gerrit-Change-Number: 16549 Gerrit-PatchSet: 1 Gerrit-Owner: osmith Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: osmith Gerrit-MessageType: merged
Change in osmo-sip-connector[master]: osmoappdesc.py: switch to python 3
osmith has submitted this change. ( https://gerrit.osmocom.org/c/osmo-sip-connector/+/16553 ) Change subject: osmoappdesc.py: switch to python 3 .. osmoappdesc.py: switch to python 3 Make build and external tests work with python3, so we can drop the python2 dependency. This should be merged shortly after osmo-python-tests was migrated to python3, and the jenkins build slaves were (automatically) updated to have the new osmo-python-tests installed. Related: OS#2819 Depends: osmo-python-tests I3ffc3519bf6c22536a49dad7a966188ddad351a7 Change-Id: Ic913e336a5a962fe9515479b03eecdbef0917721 --- M osmoappdesc.py 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/osmoappdesc.py b/osmoappdesc.py index adb9662..e0263b5 100644 --- a/osmoappdesc.py +++ b/osmoappdesc.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # (C) 2016 by Holger Hans Peter Freyther -- To view, visit https://gerrit.osmocom.org/c/osmo-sip-connector/+/16553 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sip-connector Gerrit-Branch: master Gerrit-Change-Id: Ic913e336a5a962fe9515479b03eecdbef0917721 Gerrit-Change-Number: 16553 Gerrit-PatchSet: 1 Gerrit-Owner: osmith Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: osmith Gerrit-MessageType: merged
Change in libosmo-sccp[master]: osmoappdesc.py, tests: switch to python 3
osmith has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/16542 ) Change subject: osmoappdesc.py, tests: switch to python 3 .. osmoappdesc.py, tests: switch to python 3 Make build and external tests work with python3, so we can drop the python2 dependency. This should be merged shortly after osmo-python-tests was migrated to python3, and the jenkins build slaves were (automatically) updated to have the new osmo-python-tests installed. Related: OS#2819 Depends: osmo-python-tests I3ffc3519bf6c22536a49dad7a966188ddad351a7 Change-Id: I344c49001fba23bdcfdef06ab174c52b60edd01c --- M osmoappdesc.py M tests/vty/vty_test_runner.py 2 files changed, 17 insertions(+), 17 deletions(-) Approvals: laforge: Looks good to me, approved Jenkins Builder: Verified diff --git a/osmoappdesc.py b/osmoappdesc.py index 02ccda6..6c1bafa 100644 --- a/osmoappdesc.py +++ b/osmoappdesc.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 app_configs = { "osmo-stp": ["doc/examples/osmo-stp.cfg"], diff --git a/tests/vty/vty_test_runner.py b/tests/vty/vty_test_runner.py index 47ce23c..605bc93 100755 --- a/tests/vty/vty_test_runner.py +++ b/tests/vty/vty_test_runner.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python2 +#!/usr/bin/env python3 # (C) 2013 by Katerina Barone-Adesi # (C) 2013 by Holger Hans Peter Freyther @@ -35,9 +35,9 @@ def checkForEndAndExit(self): res = self.vty.command("list") #print ('looking for "exit"\n') -self.assert_(res.find(' exit\r') > 0) +self.assertTrue(res.find(' exit\r') > 0) #print 'found "exit"\nlooking for "end"\n' -self.assert_(res.find(' end\r') > 0) +self.assertTrue(res.find(' end\r') > 0) #print 'found "end"\n' def vty_command(self): @@ -56,8 +56,8 @@ try: self.proc = osmoutil.popen_devnull(osmo_vty_cmd) except OSError: -print >> sys.stderr, "Current directory: %s" % os.getcwd() -print >> sys.stderr, "Consider setting -b" +print("Current directory: %s" % os.getcwd(), file=sys.stderr) +print("Consider setting -b", file=sys.stderr) appstring = self.vty_app()[2] appport = self.vty_app()[0] @@ -89,22 +89,22 @@ line = fp.readline().strip() if not line: return False -print "%s: parsing line: %s" %(path, line) +print("%s: parsing line: %s" %(path, line)) it = line.split() if lport == int(it[5]): -print "%s: local port %d found" %(path, lport) +print("%s: local port %d found" %(path, lport)) itaddr_list = it[8:] if len(itaddr_list) != len(laddr_list): -print "%s: addr list mismatch: %r vs %r" % (path, repr(itaddr_list), repr(laddr_list)) +print("%s: addr list mismatch: %r vs %r" % (path, repr(itaddr_list), repr(laddr_list))) continue for addr in laddr_list: if addr not in itaddr_list: -print "%s: addr not found in list: %s vs %r" % (path, addr, repr(itaddr_list)) +print("%s: addr not found in list: %s vs %r" % (path, addr, repr(itaddr_list))) return False return True return False except IOError as e: -print "I/O error({0}): {1}".format(e.errno, e.strerror) +print("I/O error({0}): {1}".format(e.errno, e.strerror)) return False def testMultiHome(self): @@ -115,9 +115,9 @@ found = True break else: -print "[%d] osmo-stp not yet available, retrying in a second" % i +print("[%d] osmo-stp not yet available, retrying in a second" % i) time.sleep(1) -self.assert_(found) +self.assertTrue(found) try: proto = socket.IPPROTO_SCTP except AttributeError: # it seems to be not defined under python2? @@ -128,8 +128,8 @@ s.connect(('127.0.0.2',2905)) except socket.error as msg: s.close() -self.assert_(False) -print "Connected to STP through SCTP" +self.assertTrue(False) +print("Connected to STP through SCTP") s.close() if __name__ == '__main__': @@ -158,9 +158,9 @@ if args.p: confpath = args.p -print "confpath %s, workdir %s" % (confpath, workdir) +print("confpath %s, workdir %s" % (confpath, workdir))
Change in ...osmo-python-tests[master]: Drop python2 support (again)
osmith has submitted this change. ( https://gerrit.osmocom.org/c/python/osmo-python-tests/+/16540 ) Change subject: Drop python2 support (again) .. Drop python2 support (again) Re-apply reverted commit Iabda95073faa2191fd117e9637e0858c589e9d9e ("Drop python2 support"), but with additional changes to make the scripts actually work with python3 and to make it build without python2. I have verified, that the contrib/jenkins.sh scripts of all Osmocom repositories (with their python3 patches on top) are working with this patch and that all Osmocom repositories with the python3 patches build in OBS (tested in own namespace). All related patches for changing from python2 to 3 in other repositories must be merged shortly after this one, as soon as the build slaves were (automatically) updated to have the new osmo-python-tests installed: https://gerrit.osmocom.org/q/topic:drop-py2 New fixes: * osmopy/obscvty.py: verify: fix compare Comparing maps in python3 does not work the same as in python2. Convert them to lists first, so the compare works as intended again. Fix error: File "/home/user/code/osmo-dev/src/osmo-python-tests/scripts/osmotestvty.py", line 57, in test_history assert(self.vty.w_verify(test_str, [t1])) AssertionError * osmopy/obscvty.py: use enc/dec with send/recv Fix error: self.socket.send("%s\r" % request) TypeError: a bytes-like object is required, not 'str' * scripts/osmotestconfig.py: use encode() before writing to file Fix error: File "/home/user/code/osmo-dev/src/osmo-python-tests/scripts/osmotestconfig.py", line 91, in copy_config tmpfile.write(open(config).read()) File "/usr/lib/python3.5/tempfile.py", line 622, in func_wrapper return func(*args, **kwargs) TypeError: a bytes-like object is required, not 'str' * debian/control: add --buildsystem=pybuild. Otherwise "--with python3" is ignored and the build fails if python2 is not installed, with: Can't exec "pyversions": No such file or directory at /usr/[...]/python_distutils.pm line 120. Related: OS#2819 Change-Id: I3ffc3519bf6c22536a49dad7a966188ddad351a7 --- M contrib/jenkins.sh M debian/control M debian/rules M osmopy/__init__.py M osmopy/obscvty.py M osmopy/osmo_interact/__init__.py M osmopy/osmo_interact/common.py M osmopy/osmoutil.py M scripts/osmodumpdoc.py M scripts/osmotestconfig.py M scripts/osmotestvty.py M setup.py D tests/test_py2.py 13 files changed, 28 insertions(+), 77 deletions(-) Approvals: laforge: Looks good to me, approved Jenkins Builder: Verified diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index 08908a4..9b219f9 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -4,16 +4,6 @@ COM_FLAGS='-m compileall' -# FIXME: remove once python 2 support is deprecated -PY2=python2 -PY2_LIST="osmopy scripts/osmodumpdoc.py scripts/osmotestvty.py scripts/osmotestconfig.py" -$PY2 ./setup.py install -$PY2 tests/test_py2.py -for f in $PY2_LIST -do -$PY2 $COM_FLAGS $f -done - rm -rf ./build PY3=python3 PY3_LIST="osmopy scripts/osmo_ctrl.py scripts/osmo_rate_ctr2csv.py scripts/osmodumpdoc.py scripts/osmotestvty.py scripts/osmotestconfig.py scripts/osmo_interact_ctrl.py scripts/osmo_interact_vty.py scripts/osmo_verify_transcript_ctrl.py scripts/osmo_verify_transcript_vty.py scripts/soap.py scripts/twisted_ipa.py" diff --git a/debian/control b/debian/control index 52b614c..1ad871d 100644 --- a/debian/control +++ b/debian/control @@ -2,26 +2,12 @@ Section: python Priority: optional Maintainer: Harald Welte -Build-Depends: debhelper (>= 9), python, dh-python, python-setuptools, python3, python3-setuptools +Build-Depends: debhelper (>= 9), dh-python, python3, python3-setuptools Standards-Version: 3.9.8 Homepage: http://git.osmocom.org/python/osmo-python-tests/ Vcs-Git: git://git.osmocom.org/python/osmo-python-tests Vcs-Browser: http://git.osmocom.org/python/osmo-python-tests/ -Package: python2-osmopy-libs -Architecture: all -Depends: ${python:Depends}, ${misc:Depends} -Description: Python code (not only) for testing of Osmocom programs - . - This package contains the Python 2 version of osmopy libraries. - -Package: python2-osmopy-utils -Architecture: all -Depends: ${python:Depends}, ${misc:Depends}, python2-osmopy-libs -Description: Python code (not only) for testing of Osmocom programs - . - This package contains the Python 2 version of osmopy utils. - Package: python3-osmopy-libs Architecture: all Depends: ${python3:Depends}, ${misc:Depends} diff --git a/debian/rules b/debian/rules index 04b59f6..ff16a03 100755 --- a/debian/rules +++ b/debian/rules @@ -1,13 +1,9 @@ #!/usr/bin/make -f %: - dh $@ --with python2,python3 + dh $@ --with python3 --buildsystem=pybuild override_dh_auto_install: - python2 setup.py install --install-layout=deb