[L] Change in osmo-ttcn3-hacks[master]: Introduce Asterisk_Tests testsuite
Attention is currently required from: pespin. Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36490?usp=email to look at the new patch set (#2). The following approvals got outdated and were removed: Verified-1 by Jenkins Builder Change subject: Introduce Asterisk_Tests testsuite .. Introduce Asterisk_Tests testsuite Add initial infrastructure to run tests against an Asterisk process. An not-yet-finished draft test doing registration is submitted to validate communication towards Asterisk works. The testsuite will be improved in follow-up commits, but this way other people can already start using it and we can set up the dockerized setup + jenkins jobs to run it nightly. Related: SYS#6782 Change-Id: I66f776d5df6fb5dc488d9e589b84a6b2385406e8 --- M Makefile A asterisk/Asterisk_Tests.cfg A asterisk/Asterisk_Tests.default A asterisk/Asterisk_Tests.ttcn A asterisk/README.md A asterisk/expected-results.xml A asterisk/gen_links.sh A asterisk/regen_makefile.sh M library/SIP_Emulation.ttcn M library/SIP_Templates.ttcn 10 files changed, 414 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/90/36490/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36490?usp=email 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: I66f776d5df6fb5dc488d9e589b84a6b2385406e8 Gerrit-Change-Number: 36490 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Attention: pespin Gerrit-MessageType: newpatchset
[L] Change in docker-playground[master]: Introduce ttcn3-asterisk-ims-ue-test
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/docker-playground/+/36492?usp=email ) Change subject: Introduce ttcn3-asterisk-ims-ue-test .. Introduce ttcn3-asterisk-ims-ue-test This dockerized setup allows running the Asterisk_Tests ttcn3 testsuite against Asterisk from the asterisk-master docker image, in order to test the IMS UE feature which will be developed soon. Related: SYS#6782 Depends: osmo-ttcn3-hacks.git Change-Id I66f776d5df6fb5dc488d9e589b84a6b2385406e8 Change-Id: Idd262b9224ea879a6e941792944fe0b0db3e68ba --- A ttcn3-asterisk-ims-ue-test/Asterisk_Tests.cfg A ttcn3-asterisk-ims-ue-test/Dockerfile A ttcn3-asterisk-ims-ue-test/Makefile A ttcn3-asterisk-ims-ue-test/asterisk/asterisk.conf A ttcn3-asterisk-ims-ue-test/asterisk/asterisk.sh A ttcn3-asterisk-ims-ue-test/asterisk/extensions.conf A ttcn3-asterisk-ims-ue-test/asterisk/pjsip.conf A ttcn3-asterisk-ims-ue-test/jenkins.sh 8 files changed, 361 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/docker-playground refs/changes/92/36492/1 diff --git a/ttcn3-asterisk-ims-ue-test/Asterisk_Tests.cfg b/ttcn3-asterisk-ims-ue-test/Asterisk_Tests.cfg new file mode 100644 index 000..c8744bb --- /dev/null +++ b/ttcn3-asterisk-ims-ue-test/Asterisk_Tests.cfg @@ -0,0 +1,22 @@ +[ORDERED_INCLUDE] +"/osmo-ttcn3-hacks/Common.cfg" +"/osmo-ttcn3-hacks/asterisk/Asterisk_Tests.default" + +[LOGGING] + +[TESTPORT_PARAMETERS] +*.SIP.default_local_address := "172.18.11.103" +*.SIP.local_sip_port := "5060" +*.SIP.default_dest_address := "172.18.11.10" +*.SIP.default_dest_port := "5094" + +[MODULE_PARAMETERS] +Asterisk_Tests.mp_local_sip_host := "172.18.11.103" +Asterisk_Tests.mp_remote_sip_host := "172.18.11.10" +Asterisk_Tests.mp_local_sip_port := 5060 +Asterisk_Tests.mp_remote_sip_port := 5094 + +[MAIN_CONTROLLER] + +[EXECUTE] +Asterisk_Tests.control diff --git a/ttcn3-asterisk-ims-ue-test/Dockerfile b/ttcn3-asterisk-ims-ue-test/Dockerfile new file mode 100644 index 000..1a2f8aa --- /dev/null +++ b/ttcn3-asterisk-ims-ue-test/Dockerfile @@ -0,0 +1,13 @@ +ARGREGISTRY +ARGUSER +FROM $REGISTRY/$USER/debian-bookworm-titan +ARGOSMO_TTCN3_BRANCH="master" + +ADD https://gerrit.osmocom.org/plugins/gitiles/osmo-ttcn3-hacks/+/$OSMO_TTCN3_BRANCH?format=TEXT /tmp/commit +RUNttcn3-docker-prepare "$OSMO_TTCN3_BRANCH" asterisk + +VOLUME /data + +COPY Asterisk_Tests.cfg /data/Asterisk_Tests.cfg + +CMDttcn3-docker-run asterisk Asterisk_Tests diff --git a/ttcn3-asterisk-ims-ue-test/Makefile b/ttcn3-asterisk-ims-ue-test/Makefile new file mode 100644 index 000..8d0e10b --- /dev/null +++ b/ttcn3-asterisk-ims-ue-test/Makefile @@ -0,0 +1 @@ +include ../make/Makefile diff --git a/ttcn3-asterisk-ims-ue-test/asterisk/asterisk.conf b/ttcn3-asterisk-ims-ue-test/asterisk/asterisk.conf new file mode 100644 index 000..a17d606 --- /dev/null +++ b/ttcn3-asterisk-ims-ue-test/asterisk/asterisk.conf @@ -0,0 +1,142 @@ +[directories](!) +astcachedir => /var/cache/asterisk +astetcdir => /etc/asterisk +astmoddir => /usr/lib/asterisk/modules +astvarlibdir => /var/lib/asterisk +astdbdir => /var/lib/asterisk +astkeydir => /var/lib/asterisk +astdatadir => /var/lib/asterisk +astagidir => /var/lib/asterisk/agi-bin +astspooldir => /var/spool/asterisk +astrundir => /var/run/asterisk +astlogdir => /data +astsbindir => /usr/sbin + +[options] +;verbose = 3 +;debug = 3 +;trace = 0 ; Set the trace level. +;refdebug = yes; Enable reference count debug logging. +;alwaysfork = yes ; Same as -F at startup. +;nofork = yes ; Same as -f at startup. +;quiet = yes ; Same as -q at startup. +;timestamp = yes ; Same as -T at startup. +;execincludes = yes; Support #exec in config files. +;console = yes ; Run as console (same as -c at startup). +;highpriority = yes; Run realtime priority (same as -p at + ; startup). +;initcrypto = yes ; Initialize crypto keys (same as -i at + ; startup). +;nocolor = yes ; Disable console colors. +;dontwarn = yes; Disable some warnings. +;dumpcore = yes; Dump core on crash (same as -g at startup). +;languageprefix = yes ; Use the new sound prefix path syntax. +;systemname = my_system_name ; Prefix uniqueid with a system name for + ; Global uniqueness issues. +;autosystemname = yes ; Automatically set systemname to hostname, + ; uses 'localhost' on failure, or systemname if + ; set. +;mindtmfduration = 80 ; Set minimum DTMF duration in ms (default 80 ms) +
[M] Change in docker-playground[master]: Introduce asterisk-master docker image
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/docker-playground/+/36491?usp=email ) Change subject: Introduce asterisk-master docker image .. Introduce asterisk-master docker image This Docker image allows building and running Asterisk from git. Default config is to build the sysmocom fork used to develop new features (hence pointing to sysmocom/master branch in that repo. Related: SYS#6782 Change-Id: Iaa3816f8ceefac8956e61e15f79ed708dec55238 --- A asterisk-master/Dockerfile A asterisk-master/Makefile M make/Makefile 3 files changed, 81 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/docker-playground refs/changes/91/36491/1 diff --git a/asterisk-master/Dockerfile b/asterisk-master/Dockerfile new file mode 100644 index 000..6b8c21b --- /dev/null +++ b/asterisk-master/Dockerfile @@ -0,0 +1,64 @@ +ARGREGISTRY=docker.io +ARGUSER +ARGDISTRO +FROM $USER/$DISTRO-build +# Arguments used after FROM must be specified again +ARGDISTRO + +RUNapt-get update && \ + apt-get upgrade -y && \ + DEBIAN_FRONTEND=noninteractive \ + apt-get install -y --no-install-recommends \ + vim \ + sudo \ + iproute2 \ + iputils-ping \ + libcap2-bin \ + net-tools \ + libedit-dev \ + libnewt-dev \ + libssl-dev \ + libncurses5-dev \ + subversion \ + libsqlite3-dev \ + build-essential \ + libjansson-dev \ + libxml2-dev \ + uuid-dev \ + wget && \ + apt-get clean + +# create a user +ARGusername=asterisk +RUNuseradd -m ${username} && \ + echo "${username} ALL=(root) NOPASSWD:ALL" > /etc/sudoers.d/${username} && \ + chmod 0440 /etc/sudoers.d/${username} + +WORKDIR/home/${username} + + +# clone open5gs +ARGASTERISK_REMOTE=https://gitea.sysmocom.de/sysmocom/asterisk.git +RUNgit clone $ASTERISK_REMOTE + +RUNcd asterisk && \ + git fetch && git checkout -f -B sysmocom/master origin/sysmocom/master + +RUNcd asterisk && \ + ./bootstrap.sh && \ + ./configure && \ + make "-j$(nproc)" + +ARGASTERISK_BRANCH=sysmocom/master + +ADD https://gitea.sysmocom.de/api/v1/repos/sysmocom/asterisk/git/refs/heads/$ASTERISK_BRANCH /tmp/asterisk-ver + +# update the source code (if needed) +RUNcd asterisk && \ + git fetch && git checkout -B $ASTERISK_BRANCH origin/$ASTERISK_BRANCH + +RUNcd asterisk && \ + make "-j$(nproc)" && \ + make install && \ + make samples && \ + ldconfig diff --git a/asterisk-master/Makefile b/asterisk-master/Makefile new file mode 100644 index 000..8d0e10b --- /dev/null +++ b/asterisk-master/Makefile @@ -0,0 +1 @@ +include ../make/Makefile diff --git a/make/Makefile b/make/Makefile index 722..74efbff 100644 --- a/make/Makefile +++ b/make/Makefile @@ -17,6 +17,7 @@ USERNAME?=$(USER) UID=$(shell id -u) NAME?=$(shell basename $(CURDIR)) +ASTERISK_BRANCH?=sysmocom/master LIBOSMOCORE_BRANCH?=master OSMO_TTCN3_BRANCH?=master OSMO_BB_BRANCH?=master @@ -100,6 +101,7 @@ --build-arg OSMOCOM_REPO_PATH=$(OSMOCOM_REPO_PATH) \ --build-arg OSMOCOM_REPO_VERSION=$(OSMOCOM_REPO_VERSION) \ --build-arg OSMOCOM_REPO_TESTSUITE_MIRROR=$(OSMOCOM_REPO_TESTSUITE_MIRROR) \ + --build-arg ASTERISK_BRANCH=$(ASTERISK_BRANCH) \ --build-arg LIBOSMOCORE_BRANCH=$(LIBOSMOCORE_BRANCH) \ --build-arg OSMO_BB_BRANCH=$(OSMO_BB_BRANCH) \ --build-arg OSMO_BSC_BRANCH=$(OSMO_BSC_BRANCH) \ -- To view, visit https://gerrit.osmocom.org/c/docker-playground/+/36491?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-Change-Id: Iaa3816f8ceefac8956e61e15f79ed708dec55238 Gerrit-Change-Number: 36491 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange
[L] Change in osmo-ttcn3-hacks[master]: Introduce Asterisk_Tests testsuite
Jenkins Builder has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36490?usp=email ) Change subject: Introduce Asterisk_Tests testsuite .. Patch Set 1: (1 comment) File library/SIP_Templates.ttcn: Robot Comment from checkpatch (run ID jenkins-gerrit-lint-15493): https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36490/comment/9a182294_fe18ac56 PS1, Line 528: /* Expect during first REGISTER when authorization is requried: */ 'requried' may be misspelled - perhaps 'required'? -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36490?usp=email 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: I66f776d5df6fb5dc488d9e589b84a6b2385406e8 Gerrit-Change-Number: 36490 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-CC: Jenkins Builder Gerrit-Comment-Date: Thu, 28 Mar 2024 20:21:20 + Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment
[L] Change in osmo-ttcn3-hacks[master]: Introduce Asterisk_Tests testsuite
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36490?usp=email ) Change subject: Introduce Asterisk_Tests testsuite .. Introduce Asterisk_Tests testsuite Add initial infrastructure to run tests against an Asterisk process. An not-yet-finished draft test doing registration is submitted to validate communication towards Asterisk works. The testsuite will be improved in follow-up commits, but this way other people can already start using it and we can set up the dockerized setup + jenkins jobs to run it nightly. Related: SYS#6782 Change-Id: I66f776d5df6fb5dc488d9e589b84a6b2385406e8 --- M Makefile A asterisk/Asterisk_Tests.cfg A asterisk/Asterisk_Tests.default A asterisk/Asterisk_Tests.ttcn A asterisk/README.md A asterisk/expected-results.xml A asterisk/gen_links.sh A asterisk/regen_makefile.sh M library/SIP_Emulation.ttcn M library/SIP_Templates.ttcn 10 files changed, 414 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/90/36490/1 diff --git a/Makefile b/Makefile index 51e51ed..bd88ca5 100644 --- a/Makefile +++ b/Makefile @@ -14,6 +14,7 @@ # limitations under the License. SUBDIRS= \ + asterisk \ bsc \ bsc-nat \ bts \ diff --git a/asterisk/Asterisk_Tests.cfg b/asterisk/Asterisk_Tests.cfg new file mode 100644 index 000..a3669f9 --- /dev/null +++ b/asterisk/Asterisk_Tests.cfg @@ -0,0 +1,18 @@ +[ORDERED_INCLUDE] +# Common configuration, shared between test suites +"../Common.cfg" +# testsuite specific configuration, not expected to change +"./Asterisk_Tests.default" + +# Local configuration below + +[LOGGING] + +[TESTPORT_PARAMETERS] + +[MODULE_PARAMETERS] + +[MAIN_CONTROLLER] + +[EXECUTE] +Asterisk_Tests.control diff --git a/asterisk/Asterisk_Tests.default b/asterisk/Asterisk_Tests.default new file mode 100644 index 000..a2fda0f --- /dev/null +++ b/asterisk/Asterisk_Tests.default @@ -0,0 +1,18 @@ +[LOGGING] +FileMask := LOG_ALL | TTCN_MATCHING; + +mtc.FileMask := ERROR | WARNING | PARALLEL | VERDICTOP; + +[TESTPORT_PARAMETERS] +*.SIP.local_sip_port := "5060" +*.SIP.default_local_address := "127.0.0.2" +*.SIP.default_sip_protocol := "UDP" +*.SIP.default_dest_port := "5060" +*.SIP.default_dest_address := "127.0.0.1" + + +[MODULE_PARAMETERS] + +[MAIN_CONTROLLER] + +[EXECUTE] diff --git a/asterisk/Asterisk_Tests.ttcn b/asterisk/Asterisk_Tests.ttcn new file mode 100644 index 000..5d9754e --- /dev/null +++ b/asterisk/Asterisk_Tests.ttcn @@ -0,0 +1,240 @@ +module Asterisk_Tests { + +/* Asterisk test suite in TTCN-3 + * (C) 2024 by sysmocom - s.f.m.c. GmbH + * All rights reserved. + * Author: Pau Espin Pedrol + * + * Released under the terms of GNU General Public License, Version 2 or + * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + +import from General_Types all; +import from Osmocom_Types all; +import from Native_Functions all; +import from Misc_Helpers all; + +import from SDP_Types all; +import from SDP_Templates all; + +import from SIP_Emulation all; +import from SIPmsg_Types all; +import from SIP_Templates all; + +modulepar { + charstring mp_local_sip_host := "127.0.0.2"; + integer mp_local_sip_port := 5060; + charstring mp_remote_sip_host := "127.0.0.1"; + integer mp_remote_sip_port := 5060; +} + +type component test_CT { + var SIP_Emulation_CT vc_SIP; +} + +type component ConnHdlr extends SIP_ConnHdlr { + var ConnHdlrPars g_pars; + timer g_Tguard; + var PDU_SIP_Request g_rx_sip_req; + var PDU_SIP_Response g_rx_sip_resp; +} + +type record ConnHdlrPars { + float t_guard, + charstring user, + SipUrl registrar_sip_url, + SipAddr registrar_sip_record, + CallidString registrar_sip_call_id, + Via registrar_via, + integer registrar_sip_seq_nr, + SipAddr sip_url_ext, + Contact local_contact, + CallPars cp optional +} + +template (value) ConnHdlrPars t_Pars(charstring user, +charstring displayname := "\"Anonymous\"") := { + t_guard := 30.0, + user := user, + registrar_sip_url := valueof(ts_SipUrlHost(mp_remote_sip_host)), + registrar_sip_record := ts_SipAddr(ts_HostPort(mp_remote_sip_host), + ts_UserInfo(user), + displayName := displayname), + registrar_sip_call_id := hex2str(f_rnd_hexstring(15)) & "@" & mp_local_sip_host, + registrar_via := ts_Via_from(ts_HostPort(mp_local_sip_host, mp_local_sip_port)), + registrar_sip_seq_nr := f_sip_rand_seq_nr(), + sip_url_ext := ts_SipAddr(ts_HostPort(mp_local_sip_host, mp_local_sip_port), + ts_UserInfo(user)), + local_contact := valueof(ts_Contact({ +
[L] Change in osmo-ttcn3-hacks[master]: SIP_Templates: Rework templates to make them more extensible
Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36489?usp=email to look at the new patch set (#2). The following approvals got outdated and were removed: Verified+1 by Jenkins Builder Change subject: SIP_Templates: Rework templates to make them more extensible .. SIP_Templates: Rework templates to make them more extensible The existing template system in SIP_Templates made it difficult to craft specific templates, since it was usually skipping several layers of fields when passing parameters. This commit reworks some of those templates, adds news templates, and cleans formatting for others, as a preparation for further work which will be done when adding Asterisk_Tests testsuite. Change-Id: Ifd14213e9c2b8f5061f828a63ef47844828d94ea --- M library/SIP_Templates.ttcn M sip/SIP_Tests.ttcn 2 files changed, 329 insertions(+), 192 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/89/36489/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36489?usp=email 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: Ifd14213e9c2b8f5061f828a63ef47844828d94ea Gerrit-Change-Number: 36489 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-MessageType: newpatchset
[S] Change in osmo-ttcn3-hacks[master]: SIP: generate seq_nr within allowed range
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36488?usp=email ) Change subject: SIP: generate seq_nr within allowed range .. SIP: generate seq_nr within allowed range Change-Id: Iea5f4568af1bd795db57d2b77e82d976edc9e337 --- M library/SIP_Templates.ttcn M sip/SIP_Tests.ttcn 2 files changed, 20 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/88/36488/1 diff --git a/library/SIP_Templates.ttcn b/library/SIP_Templates.ttcn index 75681a9..f57b524 100644 --- a/library/SIP_Templates.ttcn +++ b/library/SIP_Templates.ttcn @@ -1,6 +1,7 @@ module SIP_Templates { import from SIPmsg_Types all; +import from Osmocom_Types all; /* wrapper type to encapsulate the Addr_Union + parameter list used in From, To. ... */ type record SipAddr { @@ -409,5 +410,13 @@ } +/* RFC 3261 8.1.1.5: + * "The sequence number value MUST be expressible as a 32-bit unsigned integer + * and MUST be less than 2**31." + */ +function f_sip_rand_seq_nr() return integer { +/* 2**31 = 2147483648 */ + return f_rnd_int(2147483648) +} } diff --git a/sip/SIP_Tests.ttcn b/sip/SIP_Tests.ttcn index 9d92b87..ab33af7 100644 --- a/sip/SIP_Tests.ttcn +++ b/sip/SIP_Tests.ttcn @@ -101,13 +101,13 @@ if (cp.is_mo) { cp.comp.sip_url_ext := valueof(ts_SipAddr(cp.called, mp_local_host, 5060)); cp.comp.sip_url_gsm := valueof(ts_SipAddr(cp.calling, mp_osmosip_host, 5060)); - cp.mncc_call_id := f_rnd_int(429496725); + cp.mncc_call_id := f_sip_rand_seq_nr(); } else { cp.comp.sip_url_ext := valueof(ts_SipAddr(cp.calling, mp_local_host, 5060)); cp.comp.sip_url_gsm := valueof(ts_SipAddr(cp.called, mp_osmosip_host, 5060)); cp.comp.sip_call_id := hex2str(f_rnd_hexstring(15)); } - cp.comp.sip_seq_nr := f_rnd_int(4294967295); + cp.comp.sip_seq_nr := f_sip_rand_seq_nr(); cp.comp.sip_body := ""; } -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36488?usp=email 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: Iea5f4568af1bd795db57d2b77e82d976edc9e337 Gerrit-Change-Number: 36488 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange
[L] Change in osmo-ttcn3-hacks[master]: SIP_Templates: Rework templates to make them more extensible
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36489?usp=email ) Change subject: SIP_Templates: Rework templates to make them more extensible .. SIP_Templates: Rework templates to make them more extensible The existing template system in SIP_Templates made it difficult to craft specific templates, since it was usually skipping several layers of fields when passing parameters. This commit reworks some of those templates, adds news templates, and cleans formatting for others, as a preparation for further work which will be done when adding Asterisk_Tests testsuite. Change-Id: Ifd14213e9c2b8f5061f828a63ef47844828d94ea --- M library/SIP_Templates.ttcn M sip/SIP_Tests.ttcn 2 files changed, 305 insertions(+), 180 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/89/36489/1 diff --git a/library/SIP_Templates.ttcn b/library/SIP_Templates.ttcn index f57b524..dc4212a 100644 --- a/library/SIP_Templates.ttcn +++ b/library/SIP_Templates.ttcn @@ -11,59 +11,142 @@ const charstring c_SIP_VERSION := "SIP/2.0"; -template (value) SipUrl ts_SipUrl(charstring user_or_tel, charstring host, integer portnr) := { +template (value) SipUrl ts_SipUrl(template (value) HostPort host_port, + template (omit) UserInfo user_info := omit) := { scheme := "sip", - userInfo := { - userOrTelephoneSubscriber := user_or_tel, - password := omit - }, - hostPort := { - host := host, - portField := portnr - }, + userInfo := user_info, + hostPort := host_port, urlParameters := omit, headers := omit } -template SipUrl tr_SipUrl(template charstring user_or_tel, - template charstring host, - template integer portnr) := { +template (present) SipUrl tr_SipUrl(template (present) HostPort host_port := ?, + template UserInfo user_info := *) := { scheme := "sip", - userInfo := { - userOrTelephoneSubscriber := user_or_tel, - password := * - }, - hostPort := { - host := host, - portField := portnr - }, + userInfo := user_info, + hostPort := host_port, urlParameters := *, headers := * } -template (value) SipAddr ts_SipAddr(charstring user_or_tel, charstring host, integer portnr) := { - addr := { - nameAddr := { - displayName := omit, - addrSpec := ts_SipUrl(user_or_tel, host, portnr) - } - }, - params := omit +template (value) SipUrl ts_SipUrlHost(template (value) charstring host) + := ts_SipUrl(ts_HostPort(host)); + +// [20.10] +template (present) NameAddr tr_NameAddr(template (present) SipUrl addrSpec := ?, + template charstring displayName := *) := { + displayName := displayName, + addrSpec := addrSpec } -template SipAddr tr_SipAddr(template charstring user_or_tel, - template charstring host, - template integer portnr) := { +template (value) NameAddr ts_NameAddr(template (value) SipUrl addrSpec, + template (omit) charstring displayName := omit) := { + displayName := displayName, + addrSpec := addrSpec +} + +template (present) Addr_Union tr_Addr_Union_NameAddr(template (present) NameAddr nameAddr := ?) := { + nameAddr := nameAddr +} +template (value) Addr_Union ts_Addr_Union_NameAddr(template (value) NameAddr nameAddr) := { + nameAddr := nameAddr +} + +template (present) Addr_Union tr_Addr_Union_SipUrl(template (present) SipUrl sipUrl := ?) := { + addrSpecUnion := sipUrl +} +template (value) Addr_Union ts_Addr_Union_SipUrl(template (value) SipUrl sipUrl) := { + addrSpecUnion := sipUrl +} + + +template (present) ContactAddress tr_ContactAddress(template (present) Addr_Union addressField := ?, + template SemicolonParam_List contactParams := *) := { + addressField := addressField, + contactParams := contactParams +} +template (value) ContactAddress ts_ContactAddress(template (value) Addr_Union addressField, + template (omit) SemicolonParam_List contactParams := omit) := { + addressField := addressField, + contactParams := contactParams +} + +template (present) Contact tr_Contact(template (present) ContactAddress_List contactAddresses := ?) := { + fieldName := CONTACT_E, + contactBody := { + contactAddresses := contactAddresses + } +} +template (value) Contact ts_Contact(template (value) ContactAddress_List contactAddresses)
[M] Change in osmo-hnbgw[master]: use json to decode counters from nftables
Attention is currently required from: neels. Jenkins Builder has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-hnbgw/+/36485?usp=email ) Change subject: use json to decode counters from nftables .. Patch Set 4: (2 comments) File src/osmo-hnbgw/nft_kpi.c: Robot Comment from checkpatch (run ID jenkins-gerrit-lint-15489): https://gerrit.osmocom.org/c/osmo-hnbgw/+/36485/comment/440cb2eb_4da76159 PS4, Line 266: json_array_foreach (nftables, i, item) { space prohibited between function name and open parenthesis '(' Robot Comment from checkpatch (run ID jenkins-gerrit-lint-15489): https://gerrit.osmocom.org/c/osmo-hnbgw/+/36485/comment/46adcedb_e8c91e24 PS4, Line 294: json_array_foreach (expr, j, expr_item) { space prohibited between function name and open parenthesis '(' -- To view, visit https://gerrit.osmocom.org/c/osmo-hnbgw/+/36485?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hnbgw Gerrit-Branch: master Gerrit-Change-Id: Id4e7fa017c31945388a010d8581715d71482116b Gerrit-Change-Number: 36485 Gerrit-PatchSet: 4 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-CC: osmith Gerrit-Attention: neels Gerrit-Comment-Date: Thu, 28 Mar 2024 15:21:25 + Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment
[M] Change in osmo-hnbgw[master]: use json to decode counters from nftables
Attention is currently required from: neels. Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-hnbgw/+/36485?usp=email to look at the new patch set (#4). The following approvals got outdated and were removed: Verified-1 by Jenkins Builder Change subject: use json to decode counters from nftables .. use json to decode counters from nftables Switch nft output to json. Add libjansson dependency, and use it to parse the result. Navigate the json tree to retrieve the counter values. Parsing with json takes longer than the direct string parsing of nft language, but it is the more correct and more stable approach: in case nftables changes its API, json is likely to still be compatible. Related: SYS#6773 Change-Id: Id4e7fa017c31945388a010d8581715d71482116b --- M configure.ac M src/osmo-hnbgw/nft_kpi.c 2 files changed, 115 insertions(+), 72 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hnbgw refs/changes/85/36485/4 -- To view, visit https://gerrit.osmocom.org/c/osmo-hnbgw/+/36485?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hnbgw Gerrit-Branch: master Gerrit-Change-Id: Id4e7fa017c31945388a010d8581715d71482116b Gerrit-Change-Number: 36485 Gerrit-PatchSet: 4 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-CC: osmith Gerrit-Attention: neels Gerrit-MessageType: newpatchset
[M] Change in osmo-hnbgw[master]: use json to decode counters from nftables
Attention is currently required from: neels. Jenkins Builder has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-hnbgw/+/36485?usp=email ) Change subject: use json to decode counters from nftables .. Patch Set 3: (2 comments) File src/osmo-hnbgw/nft_kpi.c: Robot Comment from checkpatch (run ID jenkins-gerrit-lint-15486): https://gerrit.osmocom.org/c/osmo-hnbgw/+/36485/comment/9b8a4186_13126240 PS3, Line 266: json_array_foreach (nftables, i, item) { space prohibited between function name and open parenthesis '(' Robot Comment from checkpatch (run ID jenkins-gerrit-lint-15486): https://gerrit.osmocom.org/c/osmo-hnbgw/+/36485/comment/ce27fe6c_95a4e951 PS3, Line 294: json_array_foreach (expr, j, expr_item) { space prohibited between function name and open parenthesis '(' -- To view, visit https://gerrit.osmocom.org/c/osmo-hnbgw/+/36485?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hnbgw Gerrit-Branch: master Gerrit-Change-Id: Id4e7fa017c31945388a010d8581715d71482116b Gerrit-Change-Number: 36485 Gerrit-PatchSet: 3 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-CC: osmith Gerrit-Attention: neels Gerrit-Comment-Date: Thu, 28 Mar 2024 15:00:50 + Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment
[S] Change in libosmocore[master]: sockaddr_str: add conversion to,from osmo_sockaddr
neels has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/36265?usp=email ) Change subject: sockaddr_str: add conversion to,from osmo_sockaddr .. sockaddr_str: add conversion to,from osmo_sockaddr Add functions to pass struct osmo_sockaddr to the osmo_sockaddr_str_{to,from}* API directly. So far the interface to osmo_sockaddr_str_ is: osmo_sockaddr_str_from_sockaddr(_sa_str, _osa->u.sas); I'm working a lot with osmo_sockaddr at the moment, and the cumulated time of forgetting to add 'u.sas' and having another compilation cycle because of those is justifying this additional API. Change-Id: I0df84b4bb8cb5d8434b735fa3a38e7f95be43e91 --- M TODO-RELEASE M include/osmocom/core/sockaddr_str.h M src/core/libosmocore.map M src/core/sockaddr_str.c 4 files changed, 48 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, but someone else must approve neels: Looks good to me, approved diff --git a/TODO-RELEASE b/TODO-RELEASE index 01f7c41..ce04162 100644 --- a/TODO-RELEASE +++ b/TODO-RELEASE @@ -11,6 +11,7 @@ core ADD osmo_sock_multiaddr_get_ip_and_port(), osmo_multiaddr_ip_and_port_snprintf(), osmo_sock_multiaddr_get_name_buf() core ADD osmo_sock_sctp_get_peer_addr_info() core ADD gsmtap_inst_fd2() core, DEPRECATE gsmtap_inst_fd() +core ADD osmo_sockaddr_str_from_osa() osmo_sockaddr_str_to_osa() core behavior change osmo_tdef_fsm_inst_state_chg(): allow millisecond precision core ABI change osmo_io_ops now contains a struct of structs, not union of structs core ABI change osmo_iofd_set_ioops() now returns a value (error code) diff --git a/include/osmocom/core/sockaddr_str.h b/include/osmocom/core/sockaddr_str.h index c646f49..8ec514c 100644 --- a/include/osmocom/core/sockaddr_str.h +++ b/include/osmocom/core/sockaddr_str.h @@ -34,6 +34,7 @@ struct sockaddr_storage; struct sockaddr_in; struct sockaddr_in6; +struct osmo_sockaddr; /*! \defgroup sockaddr_str IP address/port utilities. * @{ @@ -84,6 +85,7 @@ int osmo_sockaddr_str_from_sockaddr_in(struct osmo_sockaddr_str *sockaddr_str, const struct sockaddr_in *src); int osmo_sockaddr_str_from_sockaddr_in6(struct osmo_sockaddr_str *sockaddr_str, const struct sockaddr_in6 *src); int osmo_sockaddr_str_from_sockaddr(struct osmo_sockaddr_str *sockaddr_str, const struct sockaddr_storage *src); +int osmo_sockaddr_str_from_osa(struct osmo_sockaddr_str *sockaddr_str, const struct osmo_sockaddr *src); int osmo_sockaddr_str_to_in_addr(const struct osmo_sockaddr_str *sockaddr_str, struct in_addr *dst); int osmo_sockaddr_str_to_in6_addr(const struct osmo_sockaddr_str *sockaddr_str, struct in6_addr *dst); @@ -92,6 +94,7 @@ int osmo_sockaddr_str_to_sockaddr_in(const struct osmo_sockaddr_str *sockaddr_str, struct sockaddr_in *dst); int osmo_sockaddr_str_to_sockaddr_in6(const struct osmo_sockaddr_str *sockaddr_str, struct sockaddr_in6 *dst); int osmo_sockaddr_str_to_sockaddr(const struct osmo_sockaddr_str *sockaddr_str, struct sockaddr_storage *dst); +int osmo_sockaddr_str_to_osa(const struct osmo_sockaddr_str *sockaddr_str, struct osmo_sockaddr *dst); int osmo_sockaddr_str_from_32n(struct osmo_sockaddr_str *sockaddr_str, uint32_t ip, uint16_t port) OSMO_DEPRECATED("osmo_sockaddr_str_from_32n() actually uses *host* byte order. Use osmo_sockaddr_str_from_32h() instead"); diff --git a/src/core/libosmocore.map b/src/core/libosmocore.map index fb294ba..c5ab6e3 100644 --- a/src/core/libosmocore.map +++ b/src/core/libosmocore.map @@ -400,6 +400,7 @@ osmo_sockaddr_str_from_sockaddr; osmo_sockaddr_str_from_sockaddr_in; osmo_sockaddr_str_from_sockaddr_in6; +osmo_sockaddr_str_from_osa; osmo_sockaddr_str_from_str; osmo_sockaddr_str_from_str2; osmo_sockaddr_str_is_nonzero; @@ -412,6 +413,7 @@ osmo_sockaddr_str_to_sockaddr; osmo_sockaddr_str_to_sockaddr_in; osmo_sockaddr_str_to_sockaddr_in6; +osmo_sockaddr_str_to_osa; osmo_sockaddr_to_octets; osmo_sockaddr_to_str; osmo_sockaddr_to_str_and_uint; diff --git a/src/core/sockaddr_str.c b/src/core/sockaddr_str.c index 9f1e897..bea6184 100644 --- a/src/core/sockaddr_str.c +++ b/src/core/sockaddr_str.c @@ -33,6 +33,7 @@ #include #include #include +#include /*! \addtogroup sockaddr_str * @@ -359,6 +360,17 @@ return -EINVAL; } +/*! Convert IPv4 or IPv6 address and port to osmo_sockaddr_str. + * \param[out] sockaddr_str The instance to copy to. + * \param[in] src IPv4 or IPv6 address and port data. + * \return 0 on success, negative if src does not indicate AF_INET nor AF_INET6 (or if the conversion fails, which + * should not be possible in practice). + */ +int osmo_sockaddr_str_from_osa(struct osmo_sockaddr_str *sockaddr_str, const struct osmo_sockaddr *src) +{ + return
[S] Change in libosmocore[master]: sockaddr_str: add conversion to,from osmo_sockaddr
Attention is currently required from: laforge. neels has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/36265?usp=email ) Change subject: sockaddr_str: add conversion to,from osmo_sockaddr .. Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/36265?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I0df84b4bb8cb5d8434b735fa3a38e7f95be43e91 Gerrit-Change-Number: 36265 Gerrit-PatchSet: 2 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-Reviewer: pespin Gerrit-Attention: laforge Gerrit-Comment-Date: Thu, 28 Mar 2024 14:47:29 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
[S] Change in osmo-ci[master]: checkpatch: recognize json_array_foreach etc.
Attention is currently required from: osmith. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/36487?usp=email ) Change subject: checkpatch: recognize json_array_foreach etc. .. Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/36487?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I0b58c6d70a961c7d0ba93a2f0d6a5a4afa321fa9 Gerrit-Change-Number: 36487 Gerrit-PatchSet: 2 Gerrit-Owner: osmith Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-Attention: osmith Gerrit-Comment-Date: Thu, 28 Mar 2024 14:23:44 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
[S] Change in osmo-ci[master]: jobs/ttcn3: …-pablo-gtp: don't wipe workspace
Attention is currently required from: osmith. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/36486?usp=email ) Change subject: jobs/ttcn3: …-pablo-gtp: don't wipe workspace .. Patch Set 1: Code-Review+1 (1 comment) File jobs/ttcn3-testsuites.yml: https://gerrit.osmocom.org/c/osmo-ci/+/36486/comment/78d5b878_16ea9dfa PS1, Line 35: wipe_workspace: false maybe document it with a comment here on why this is needed. -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/36486?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I4ac1b2c3f5ba63c131dd1d6a4888f32a27264eba Gerrit-Change-Number: 36486 Gerrit-PatchSet: 1 Gerrit-Owner: osmith Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-Attention: osmith Gerrit-Comment-Date: Thu, 28 Mar 2024 14:23:05 + Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
[S] Change in osmo-ttcn3-hacks[master]: msc: f_expect_paging(): fix by_tmsi arg
Attention is currently required from: fixeria, neels. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36455?usp=email ) Change subject: msc: f_expect_paging(): fix by_tmsi arg .. Patch Set 1: (1 comment) File msc/BSC_ConnectionHandler.ttcn: https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36455/comment/fe9042bd_9195b0a9 PS1, Line 1360: boolean by_tmsi := true > i appreciate the feedback and myself tend to give strict review, so i know > what it's like. […] You already spent more time saying how much time you'd spend changing it, than actually applying the requested change, btw requested by already 2 people, not only me. -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36455?usp=email 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: I9434745b7faeb738caafed8080b9f7b1a6a8079a Gerrit-Change-Number: 36455 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-CC: fixeria Gerrit-Attention: neels Gerrit-Attention: fixeria Gerrit-Comment-Date: Thu, 28 Mar 2024 14:19:51 + Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: neels Comment-In-Reply-To: pespin Comment-In-Reply-To: fixeria Gerrit-MessageType: comment
[S] Change in libosmocore[master]: sockaddr_str: add conversion to,from osmo_sockaddr
Attention is currently required from: laforge, neels. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/36265?usp=email ) Change subject: sockaddr_str: add conversion to,from osmo_sockaddr .. Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/36265?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I0df84b4bb8cb5d8434b735fa3a38e7f95be43e91 Gerrit-Change-Number: 36265 Gerrit-PatchSet: 2 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Attention: neels Gerrit-Attention: laforge Gerrit-Comment-Date: Thu, 28 Mar 2024 14:17:08 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
[S] Change in osmo-ci[master]: checkpatch: recognize json_array_foreach etc.
Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-ci/+/36487?usp=email to look at the new patch set (#2). Change subject: checkpatch: recognize json_array_foreach etc. .. checkpatch: recognize json_array_foreach etc. Treat json_array_foreach, json_object_foreach, json_object_foreach_safe etc. the same as if, while, for, switch, and require exactly one space after using it: json_array_foreach (nftables, i, item) { … } Related: osmo-hnbgw Id4e7fa017c31945388a010d8581715d71482116b Change-Id: I0b58c6d70a961c7d0ba93a2f0d6a5a4afa321fa9 --- M lint/checkpatch/checkpatch.pl 1 file changed, 20 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/87/36487/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/36487?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I0b58c6d70a961c7d0ba93a2f0d6a5a4afa321fa9 Gerrit-Change-Number: 36487 Gerrit-PatchSet: 2 Gerrit-Owner: osmith Gerrit-Reviewer: Jenkins Builder Gerrit-MessageType: newpatchset
[M] Change in osmo-hnbgw[master]: use json to decode counters from nftables
Attention is currently required from: neels. osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-hnbgw/+/36485?usp=email ) Change subject: use json to decode counters from nftables .. Patch Set 2: (1 comment) File src/osmo-hnbgw/nft_kpi.c: https://gerrit.osmocom.org/c/osmo-hnbgw/+/36485/comment/8cc89a5e_740b8d79 PS2, Line 266: json_array_foreach (nftables, i, item) { > space prohibited between function name and open parenthesis '(' fix for the linter: https://gerrit.osmocom.org/c/osmo-ci/+/36487 -- To view, visit https://gerrit.osmocom.org/c/osmo-hnbgw/+/36485?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hnbgw Gerrit-Branch: master Gerrit-Change-Id: Id4e7fa017c31945388a010d8581715d71482116b Gerrit-Change-Number: 36485 Gerrit-PatchSet: 2 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-CC: osmith Gerrit-Attention: neels Gerrit-Comment-Date: Thu, 28 Mar 2024 08:03:09 + Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment
[S] Change in osmo-ci[master]: checkpatch: recognize json_array_for_each etc.
osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ci/+/36487?usp=email ) Change subject: checkpatch: recognize json_array_for_each etc. .. checkpatch: recognize json_array_for_each etc. Treat json_array_foreach, json_object_foreach, json_object_foreach_safe etc. the same as if, while, for, switch, and require exactly one space after using it: json_array_foreach (nftables, i, item) { … } Related: osmo-hnbgw Id4e7fa017c31945388a010d8581715d71482116b Change-Id: I0b58c6d70a961c7d0ba93a2f0d6a5a4afa321fa9 --- M lint/checkpatch/checkpatch.pl 1 file changed, 20 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/87/36487/1 diff --git a/lint/checkpatch/checkpatch.pl b/lint/checkpatch/checkpatch.pl index eada2a9..ff6eea1 100755 --- a/lint/checkpatch/checkpatch.pl +++ b/lint/checkpatch/checkpatch.pl @@ -4888,6 +4888,7 @@ # Ignore those directives where spaces _are_ permitted. if ($name =~ /^(?: if|for|while|switch|return|case| + [a-z_]*for[_]?each[a-z_]*| volatile|__volatile__| __attribute__|format|__extension__| asm|__asm__)$/x) @@ -5513,7 +5514,7 @@ } # Need a space before open parenthesis after if, while etc - if ($line =~ /\b(if|while|for|switch)\(/) { + if ($line =~ /\b(if|while|for|switch|[a-z_]*for[_]?each[a-z_]*)\(/) { if (ERROR("SPACING", "space required before the open parenthesis '('\n" . $herecurr) && $fix) { -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/36487?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I0b58c6d70a961c7d0ba93a2f0d6a5a4afa321fa9 Gerrit-Change-Number: 36487 Gerrit-PatchSet: 1 Gerrit-Owner: osmith Gerrit-MessageType: newchange
[S] Change in osmo-ci[master]: jobs/ttcn3: …-pablo-gtp: don't wipe workspace
osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ci/+/36486?usp=email ) Change subject: jobs/ttcn3: …-pablo-gtp: don't wipe workspace .. jobs/ttcn3: …-pablo-gtp: don't wipe workspace The ttcn3-ggsn-test-kernel-* jobs should not wipe their workspace, as cloning the kernel repositories takes a long time and lots of traffic. (The exception are the jobs using the debian kernel, as there we don't clone and build a kernel tree.) The way the scripts in docker-playground.git are written, this also caused a permission error. Change-Id: I4ac1b2c3f5ba63c131dd1d6a4888f32a27264eba --- M jobs/ttcn3-testsuites.yml 1 file changed, 18 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/86/36486/1 diff --git a/jobs/ttcn3-testsuites.yml b/jobs/ttcn3-testsuites.yml index 8a17e04..168cb10 100644 --- a/jobs/ttcn3-testsuites.yml +++ b/jobs/ttcn3-testsuites.yml @@ -32,6 +32,7 @@ Test osmo-ggsn master with the Debian kernel. - ttcn3-ggsn-test-kernel-pablo-gtp: timer: H 04 * * * + wipe_workspace: false description: | Test osmo-ggsn master with the Linux kernel built from main of https://git.kernel.org/pub/scm/linux/kernel/git/pablo/gtp.git/;>pablo/gtp.git. -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/36486?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I4ac1b2c3f5ba63c131dd1d6a4888f32a27264eba Gerrit-Change-Number: 36486 Gerrit-PatchSet: 1 Gerrit-Owner: osmith Gerrit-MessageType: newchange