lists.osmocom.org
Sign In Sign Up
Manage this list Sign In Sign Up

Keyboard Shortcuts

Thread View

  • j: Next unread message
  • k: Previous unread message
  • j a: Jump to all threads
  • j l: Jump to MailingList overview

gerrit-log

Thread Start a new thread
Download
Threads by month
  • ----- 2026 -----
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2025 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2024 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2023 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2022 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
gerrit-log@lists.osmocom.org

October 2023

  • 1 participants
  • 1843 discussions
[L] Change in docker-playground[master]: Introduce ttcn3-hss-test-ogs
by osmith 11 Oct '23

11 Oct '23
Attention is currently required from: fixeria, pespin. osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/docker-playground/+/34715?usp=email ) Change subject: Introduce ttcn3-hss-test-ogs ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/docker-playground/+/34715?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: Iebeefd9689ae2efa54678b99ff929ca255ec64d1 Gerrit-Change-Number: 34715 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Comment-Date: Wed, 11 Oct 2023 11:45:27 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[L] Change in osmo-ttcn3-hacks[master]: Introduce HSS_Tests testsuite
by osmith 11 Oct '23

11 Oct '23
Attention is currently required from: fixeria, osmith, pespin. osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/34714?usp=email ) Change subject: Introduce HSS_Tests testsuite ...................................................................... Patch Set 1: Code-Review+1 (1 comment) File hss/HSS_Tests.ttcn: https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/34714/comment/d58e1d96_8c7b… PS1, Line 105: //BIT3 pdn_type commented out code kept intentionally? see also t_SessionPars -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/34714?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: Ic2fccd9c54aea04f1a31649a0af47c974939fb2f Gerrit-Change-Number: 34714 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Attention: osmith <osmith(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Comment-Date: Wed, 11 Oct 2023 11:40:21 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[M] Change in osmo-ttcn3-hacks[master]: library/DIAMETER: Add several missing tr templates
by osmith 11 Oct '23

11 Oct '23
Attention is currently required from: fixeria, pespin. osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/34713?usp=email ) Change subject: library/DIAMETER: Add several missing tr templates ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/34713?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: I21da18a5e1f0d368176d653494e0e0cde0beb656 Gerrit-Change-Number: 34713 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Comment-Date: Wed, 11 Oct 2023 11:36:31 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[S] Change in osmo-ci[master]: jobs/ttcn3-testsuites.yml: Add ttcn3-hss-test-ogs
by pespin 11 Oct '23

11 Oct '23
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/34716?usp=email ) Change subject: jobs/ttcn3-testsuites.yml: Add ttcn3-hss-test-ogs ...................................................................... jobs/ttcn3-testsuites.yml: Add ttcn3-hss-test-ogs Related: SYS#6588 Change-Id: Ic98a5a22b2c10b32052e613d0a46fbc7640c60d9 --- M jobs/ttcn3-testsuites.yml 1 file changed, 16 insertions(+), 1 deletion(-) Approvals: Jenkins Builder: Verified osmith: Looks good to me, approved diff --git a/jobs/ttcn3-testsuites.yml b/jobs/ttcn3-testsuites.yml index 4c15f84..80625a5 100644 --- a/jobs/ttcn3-testsuites.yml +++ b/jobs/ttcn3-testsuites.yml @@ -125,7 +125,12 @@ - ttcn3-mme-test-ogs: timer: H 07 * * * description: | - Test open5gs-mme + Test open5gs-mmed + email: jenkins-notifications(a)lists.osmocom.org acetcom(a)gmail.com + - ttcn3-hss-test-ogs: + timer: H 07 * * * + description: | + Test open5gs-hssd email: jenkins-notifications(a)lists.osmocom.org acetcom(a)gmail.com - ttcn3-dia2gsup-test: timer: H 07 * * * -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/34716?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: Ic98a5a22b2c10b32052e613d0a46fbc7640c60d9 Gerrit-Change-Number: 34716 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
[S] Change in osmo-ci[master]: jobs/ttcn3-testsuites.yml: Add ttcn3-hss-test-ogs
by osmith 11 Oct '23

11 Oct '23
Attention is currently required from: pespin. osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/34716?usp=email ) Change subject: jobs/ttcn3-testsuites.yml: Add ttcn3-hss-test-ogs ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/34716?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: Ic98a5a22b2c10b32052e613d0a46fbc7640c60d9 Gerrit-Change-Number: 34716 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Wed, 11 Oct 2023 08:17:51 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[S] Change in osmo-ci[master]: jobs/ttcn3-testsuites.yml: Add ttcn3-hss-test-ogs
by pespin 10 Oct '23

10 Oct '23
Attention is currently required from: osmith. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/34716?usp=email ) Change subject: jobs/ttcn3-testsuites.yml: Add ttcn3-hss-test-ogs ...................................................................... Patch Set 1: (1 comment) Patchset: PS1: I already submitted the changed config, the test is created here: https://jenkins.osmocom.org/jenkins/view/TTCN3/job/ttcn3-hss-test-ogs/ I manually disabled it through jenkins UI meanwhile, until the related docker-playground and osmo-ttcn3 patches get mergd. -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/34716?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: Ic98a5a22b2c10b32052e613d0a46fbc7640c60d9 Gerrit-Change-Number: 34716 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Attention: osmith <osmith(a)sysmocom.de> Gerrit-Comment-Date: Tue, 10 Oct 2023 17:31:27 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment
1 0
0 0
[S] Change in osmo-ci[master]: jobs/ttcn3-testsuites.yml: Add ttcn3-hss-test-ogs
by pespin 10 Oct '23

10 Oct '23
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ci/+/34716?usp=email ) Change subject: jobs/ttcn3-testsuites.yml: Add ttcn3-hss-test-ogs ...................................................................... jobs/ttcn3-testsuites.yml: Add ttcn3-hss-test-ogs Related: SYS#6588 Change-Id: Ic98a5a22b2c10b32052e613d0a46fbc7640c60d9 --- M jobs/ttcn3-testsuites.yml 1 file changed, 16 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/16/34716/1 diff --git a/jobs/ttcn3-testsuites.yml b/jobs/ttcn3-testsuites.yml index 4c15f84..80625a5 100644 --- a/jobs/ttcn3-testsuites.yml +++ b/jobs/ttcn3-testsuites.yml @@ -125,7 +125,12 @@ - ttcn3-mme-test-ogs: timer: H 07 * * * description: | - Test open5gs-mme + Test open5gs-mmed + email: jenkins-notifications(a)lists.osmocom.org acetcom(a)gmail.com + - ttcn3-hss-test-ogs: + timer: H 07 * * * + description: | + Test open5gs-hssd email: jenkins-notifications(a)lists.osmocom.org acetcom(a)gmail.com - ttcn3-dia2gsup-test: timer: H 07 * * * -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/34716?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: Ic98a5a22b2c10b32052e613d0a46fbc7640c60d9 Gerrit-Change-Number: 34716 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
[L] Change in docker-playground[master]: Introduce ttcn3-hss-test-ogs
by pespin 10 Oct '23

10 Oct '23
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/docker-playground/+/34715?usp=email ) Change subject: Introduce ttcn3-hss-test-ogs ...................................................................... Introduce ttcn3-hss-test-ogs Related: SYS#6588 Depends: osmo-ttcn3-hacks.git Ic2fccd9c54aea04f1a31649a0af47c974939fb2f Change-Id: Iebeefd9689ae2efa54678b99ff929ca255ec64d1 --- A ttcn3-hss-test-ogs/Dockerfile A ttcn3-hss-test-ogs/Makefile A ttcn3-hss-test-ogs/jenkins.sh A ttcn3-hss-test-ogs/ogs/HSS_Tests.cfg A ttcn3-hss-test-ogs/ogs/freediameter.conf A ttcn3-hss-test-ogs/ogs/mongod.conf A ttcn3-hss-test-ogs/ogs/open5gs-hss.yaml 7 files changed, 503 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/docker-playground refs/changes/15/34715/1 diff --git a/ttcn3-hss-test-ogs/Dockerfile b/ttcn3-hss-test-ogs/Dockerfile new file mode 100644 index 0000000..f8ae830 --- /dev/null +++ b/ttcn3-hss-test-ogs/Dockerfile @@ -0,0 +1,21 @@ +ARG REGISTRY +ARG USER +FROM $REGISTRY/$USER/debian-bookworm-titan + +RUN apt-get update && \ + apt-get upgrade -y && \ + DEBIAN_FRONTEND='noninteractive' apt-get install -y --no-install-recommends --no-install-suggests \ + libgnutls28-dev \ + && \ + apt-get clean + +ARG OSMO_TTCN3_BRANCH="master" + +ADD https://gerrit.osmocom.org/plugins/gitiles/osmo-ttcn3-hacks/+/$OSMO_TTCN3_B… /tmp/commit +RUN ttcn3-docker-prepare "$OSMO_TTCN3_BRANCH" hss + +VOLUME /data + +COPY ogs/HSS_Tests.cfg /data/HSS_Tests.cfg + +CMD ttcn3-docker-run hss HSS_Tests diff --git a/ttcn3-hss-test-ogs/Makefile b/ttcn3-hss-test-ogs/Makefile new file mode 100644 index 0000000..8d0e10b --- /dev/null +++ b/ttcn3-hss-test-ogs/Makefile @@ -0,0 +1 @@ +include ../make/Makefile diff --git a/ttcn3-hss-test-ogs/jenkins.sh b/ttcn3-hss-test-ogs/jenkins.sh new file mode 100755 index 0000000..5ca59a9 --- /dev/null +++ b/ttcn3-hss-test-ogs/jenkins.sh @@ -0,0 +1,72 @@ +#!/bin/sh + +. ../jenkins-common.sh + +IMAGE_SUFFIX="${IMAGE_SUFFIX:-master}" +docker_images_require \ + "open5gs-$IMAGE_SUFFIX" \ + "ttcn3-hss-test-ogs" + +set_clean_up_trap +set -e + +mkdir -p $VOL_BASE_DIR/mongo/db +cp ogs/mongod.conf $VOL_BASE_DIR/mongo/ + +mkdir $VOL_BASE_DIR/hss-tester +cp ogs/HSS_Tests.cfg $VOL_BASE_DIR/hss-tester/ +write_mp_osmo_repo "$VOL_BASE_DIR/hss-tester/HSS_Tests.cfg" + +mkdir $VOL_BASE_DIR/hss +cp ogs/open5gs-*.yaml $VOL_BASE_DIR/hss/ +cp ogs/freediameter.conf $VOL_BASE_DIR/hss/ + +network_create +network_replace_subnet_in_configs + +# start container with mongod in background +docker run --rm --user $(id -u) \ + $(docker_network_params $SUBNET 103) \ + --ulimit core=-1 \ + -v $VOL_BASE_DIR/mongo:/data \ + --name ${BUILD_TAG}-mongo -d \ + $DOCKER_ARGS \ + $REPO_USER/open5gs-$IMAGE_SUFFIX \ + /bin/sh -c "mongod -f /data/mongod.conf >/data/mongod.out 2>&1" + +# mongod needs some time to bootstrap... +while ! nc -z 172.18.$SUBNET.103 27017; do sleep 1; done + +# create a test subscriber with IMSI=001010000000000 +docker run --rm \ + $(docker_network_params $SUBNET 8) \ + $REPO_USER/open5gs-$IMAGE_SUFFIX \ + open5gs-dbctl --db_uri=mongodb://172.18.$SUBNET.103/open5gs \ + add 001010000000000 \ + 3c6e0b8a9c15224a8228b9a98ca1531d \ + 762a2206fe0b4151ace403c86a11e479 + +# start container with hss in background +docker run --sysctl net.ipv6.conf.all.disable_ipv6=0 \ + --rm \ + --ulimit core=-1 \ + -v $VOL_BASE_DIR/hss:/data \ + --name ${BUILD_TAG}-ogs-hss -d \ + $DOCKER_ARGS \ + $(docker_network_params $SUBNET 201) \ + $REPO_USER/open5gs-$IMAGE_SUFFIX \ + /bin/sh -c "open5gs-hssd -c /data/open5gs-hss.yaml >/data/open5gs-hssd.out 2>&1" + +# start docker container with testsuite in foreground +docker run --rm \ + --sysctl net.ipv6.conf.all.disable_ipv6=0 \ + $(docker_network_params $SUBNET 202) \ + --ulimit core=-1 \ + -v $VOL_BASE_DIR/hss-tester:/data \ + -e "TTCN3_PCAP_PATH=/data" \ + --name ${BUILD_TAG}-hss-test \ + $DOCKER_ARGS \ + $REPO_USER/ttcn3-hss-test-ogs + +# remove mongodb's database +rm -rf $VOL_BASE_DIR/mongo/db/ diff --git a/ttcn3-hss-test-ogs/ogs/HSS_Tests.cfg b/ttcn3-hss-test-ogs/ogs/HSS_Tests.cfg new file mode 100644 index 0000000..17fa1a5 --- /dev/null +++ b/ttcn3-hss-test-ogs/ogs/HSS_Tests.cfg @@ -0,0 +1,26 @@ +[ORDERED_INCLUDE] +# Common configuration, shared between test suites +"/osmo-ttcn3-hacks/Common.cfg" +# testsuite specific configuration, not expected to change +"/osmo-ttcn3-hacks/hss/HSS_Tests.default" + +# Local configuration below + +[LOGGING] + +[TESTPORT_PARAMETERS] + +[MODULE_PARAMETERS] +mp_hss_hostname := "172.18.3.201"; +mp_hss_port := 3868; +mp_diam_local_hostname := "172.18.3.202"; +mp_diam_local_port := 3868; +mp_diam_orig_realm := "localdomain"; +mp_diam_orig_host := "mme.localdomain"; +mp_diam_dest_realm := "localdomain"; +mp_diam_dest_host := "hss.localdomain"; + +[MAIN_CONTROLLER] + +[EXECUTE] +HSS_Tests.control diff --git a/ttcn3-hss-test-ogs/ogs/freediameter.conf b/ttcn3-hss-test-ogs/ogs/freediameter.conf new file mode 100644 index 0000000..2678592 --- /dev/null +++ b/ttcn3-hss-test-ogs/ogs/freediameter.conf @@ -0,0 +1,265 @@ +# This is a sample configuration file for freeDiameter daemon. + +# Most of the options can be omitted, as they default to reasonable values. +# Only TLS-related options must be configured properly in usual setups. + +# It is possible to use "include" keyword to import additional files +# e.g.: include "/etc/freeDiameter.d/*.conf" +# This is exactly equivalent as copy & paste the content of the included file(s) +# where the "include" keyword is found. + + +############################################################## +## Peer identity and realm + +# The Diameter Identity of this daemon. +# This must be a valid FQDN that resolves to the local host. +# Default: hostname's FQDN +#Identity = "aaa.koganei.freediameter.net"; +Identity = "hss.localdomain"; + +# The Diameter Realm of this daemon. +# Default: the domain part of Identity (after the first dot). +#Realm = "koganei.freediameter.net"; +Realm = "localdomain"; + +############################################################## +## Transport protocol configuration + +# The port this peer is listening on for incoming connections (TCP and SCTP). +# Default: 3868. Use 0 to disable. +Port = 3868; + +# The port this peer is listening on for incoming TLS-protected connections (TCP and SCTP). +# See TLS_old_method for more information about TLS flavours. +# Note: we use TLS/SCTP instead of DTLS/SCTP at the moment. This will change in future version of freeDiameter. +# Default: 5868. Use 0 to disable. +SecPort = 0; + +# Use RFC3588 method for TLS protection, where TLS is negociated after CER/CEA exchange is completed +# on the unsecure connection. The alternative is RFC6733 mechanism, where TLS protects also the +# CER/CEA exchange on a dedicated secure port. +# This parameter only affects outgoing connections. +# The setting can be also defined per-peer (see Peers configuration section). +# Default: use RFC6733 method with separate port for TLS. +#TLS_old_method; + +# Disable use of TCP protocol (only listen and connect over SCTP) +# Default : TCP enabled +#No_TCP; + +# Disable use of SCTP protocol (only listen and connect over TCP) +# Default : SCTP enabled +#No_SCTP; +# This option is ignored if freeDiameter is compiled with DISABLE_SCTP option. + +# Prefer TCP instead of SCTP for establishing new connections. +# This setting may be overwritten per peer in peer configuration blocs. +# Default : SCTP is attempted first. +#Prefer_TCP; + +# Default number of streams per SCTP associations. +# This setting may be overwritten per peer basis. +# Default : 30 streams +#SCTP_streams = 30; + +############################################################## +## Endpoint configuration + +# Disable use of IP addresses (only IPv6) +# Default : IP enabled +#No_IP; + +# Disable use of IPv6 addresses (only IP) +# Default : IPv6 enabled +#No_IPv6; + +# Specify local addresses the server must bind to +# Default : listen on all addresses available. +#ListenOn = "202.249.37.5"; +#ListenOn = "2001:200:903:2::202:1"; +#ListenOn = "fe80::21c:5ff:fe98:7d62%eth0"; +ListenOn = "172.18.3.201"; + + +############################################################## +## Server configuration + +# How many Diameter peers are allowed to be connecting at the same time ? +# This parameter limits the number of incoming connections from the time +# the connection is accepted until the first CER is received. +# Default: 5 unidentified clients in paralel. +#ThreadsPerServer = 5; + +############################################################## +## TLS Configuration + +# TLS is managed by the GNUTLS library in the freeDiameter daemon. +# You may find more information about parameters and special behaviors +# in the relevant documentation. +# http://www.gnu.org/software/gnutls/manual/ + +# Credentials of the local peer +# The X509 certificate and private key file to use for the local peer. +# The files must contain PKCS-1 encoded RSA key, in PEM format. +# (These parameters are passed to gnutls_certificate_set_x509_key_file function) +# Default : NO DEFAULT +#TLS_Cred = "<x509 certif file.PEM>" , "<x509 private key file.PEM>"; +#TLS_Cred = "/etc/ssl/certs/freeDiameter.pem", "/etc/ssl/private/freeDiameter.key"; + +# Certificate authority / trust anchors +# The file containing the list of trusted Certificate Authorities (PEM list) +# (This parameter is passed to gnutls_certificate_set_x509_trust_file function) +# The directive can appear several times to specify several files. +# Default : GNUTLS default behavior +#TLS_CA = "<file.PEM>"; + +# Certificate Revocation List file +# The information about revoked certificates. +# The file contains a list of trusted CRLs in PEM format. They should have been verified before. +# (This parameter is passed to gnutls_certificate_set_x509_crl_file function) +# Note: openssl CRL format might have interoperability issue with GNUTLS format. +# Default : GNUTLS default behavior +#TLS_CRL = "<file.PEM>"; + +# GNU TLS Priority string +# This string allows to configure the behavior of GNUTLS key exchanges +# algorithms. See gnutls_priority_init function documentation for information. +# You should also refer to the Diameter required TLS support here: +# http://tools.ietf.org/html/rfc6733#section-13.1 +# Default : "NORMAL" +# Example: TLS_Prio = "NONE:+VERS-TLS1.1:+AES-128-CBC:+RSA:+SHA1:+COMP-NULL"; +#TLS_Prio = "NORMAL"; + +# Diffie-Hellman parameters size +# Set the number of bits for generated DH parameters +# Valid value should be 768, 1024, 2048, 3072 or 4096. +# (This parameter is passed to gnutls_dh_params_generate2 function, +# it usually should match RSA key size) +# Default : 1024 +#TLS_DH_Bits = 1024; + +# Alternatively, you can specify a file to load the PKCS#3 encoded +# DH parameters directly from. This accelerates the daemon start +# but is slightly less secure. If this file is provided, the +# TLS_DH_Bits parameters has no effect. +# Default : no default. +#TLS_DH_File = "<file.PEM>"; + + +############################################################## +## Timers configuration + +# The Tc timer of this peer. +# It is the delay before a new attempt is made to reconnect a disconnected peer. +# The value is expressed in seconds. The recommended value is 30 seconds. +# Default: 30 +#TcTimer = 30; + +# The Tw timer of this peer. +# It is the delay before a watchdog message is sent, as described in RFC 3539. +# The value is expressed in seconds. The default value is 30 seconds. Value must +# be greater or equal to 6 seconds. See details in the RFC. +# Default: 30 +#TwTimer = 30; + +############################################################## +## Applications configuration + +# Disable the relaying of Diameter messages? +# For messages not handled locally, the default behavior is to forward the +# message to another peer if any is available, according to the routing +# algorithms. In addition the "0xffffff" application is advertised in CER/CEA +# exchanges. +# Default: Relaying is enabled. +#NoRelay; +NoRelay; + +# Number of server threads that can handle incoming messages at the same time. +# Default: 4 +#AppServThreads = 4; + +# Other applications are configured by loaded extensions. + +############################################################## +## Extensions configuration + +# The freeDiameter framework merely provides support for +# Diameter Base Protocol. The specific application behaviors, +# as well as advanced functions, are provided +# by loadable extensions (plug-ins). +# These extensions may in addition receive the name of a +# configuration file, the format of which is extension-specific. +# +# Format: +#LoadExtension = "/path/to/extension" [ : "/optional/configuration/file" ] ; +# +# Examples: +#LoadExtension = "extensions/sample.fdx"; +#LoadExtension = "extensions/sample.fdx":"conf/sample.conf"; + +# Extensions are named as follow: +# dict_* for extensions that add content to the dictionary definitions. +# dbg_* for extensions useful only to retrieve more information on the framework execution. +# acl_* : Access control list, to control which peers are allowed to connect. +# rt_* : routing extensions that impact how messages are forwarded to other peers. +# app_* : applications, these extensions usually register callbacks to handle specific messages. +# test_* : dummy extensions that are useful only in testing environments. + + +# The dbg_msg_dump.fdx extension allows you to tweak the way freeDiameter displays some +# information about some events. This extension does not actually use a configuration file +# but receives directly a parameter in the string passed to the extension. Here are some examples: +## LoadExtension = "dbg_msg_dumps.fdx" : "0x1111"; # Removes all default hooks, very quiet even in case of errors. +## LoadExtension = "dbg_msg_dumps.fdx" : "0x2222"; # Display all events with few details. +## LoadExtension = "dbg_msg_dumps.fdx" : "0x0080"; # Dump complete information about sent and received messages. +# The four digits respectively control: connections, routing decisions, sent/received messages, errors. +# The values for each digit are: +# 0 - default - keep the default behavior +# 1 - quiet - remove any specific log +# 2 - compact - display only a summary of the information +# 4 - full - display the complete information on a single long line +# 8 - tree - display the complete information in an easier to read format spanning several lines. + +LoadExtension = "/usr/lib/x86_64-linux-gnu/freeDiameter/dbg_msg_dumps.fdx" : "0x8888"; +LoadExtension = "/usr/lib/x86_64-linux-gnu/freeDiameter/dict_rfc5777.fdx"; +LoadExtension = "/usr/lib/x86_64-linux-gnu/freeDiameter/dict_mip6i.fdx"; +LoadExtension = "/usr/lib/x86_64-linux-gnu/freeDiameter/dict_nasreq.fdx"; +LoadExtension = "/usr/lib/x86_64-linux-gnu/freeDiameter/dict_nas_mipv6.fdx"; +LoadExtension = "/usr/lib/x86_64-linux-gnu/freeDiameter/dict_dcca.fdx"; +LoadExtension = "/usr/lib/x86_64-linux-gnu/freeDiameter/dict_dcca_3gpp.fdx"; + + +############################################################## +## Peers configuration + +# The local server listens for incoming connections. By default, +# all unknown connecting peers are rejected. Extensions can override this behavior (e.g., acl_wl). +# +# In addition to incoming connections, the local peer can +# be configured to establish and maintain connections to some +# Diameter nodes and allow connections from these nodes. +# This is achieved with the ConnectPeer directive described below. +# +# Note that the configured Diameter Identity MUST match +# the information received inside CEA, or the connection will be aborted. +# +# Format: +#ConnectPeer = "diameterid" [ { parameter1; parameter2; ...} ] ; +# Parameters that can be specified in the peer's parameter list: +# No_TCP; No_SCTP; No_IP; No_IPv6; Prefer_TCP; TLS_old_method; +# No_TLS; # assume transparent security instead of TLS. DTLS is not supported yet (will change in future versions). +# Port = 5868; # The port to connect to +# TcTimer = 30; +# TwTimer = 30; +# ConnectTo = "202.249.37.5"; +# ConnectTo = "2001:200:903:2::202:1"; +# TLS_Prio = "NORMAL"; +# Realm = "realm.net"; # Reject the peer if it does not advertise this realm. +# Examples: +#ConnectPeer = "aaa.wide.ad.jp"; +#ConnectPeer = "old.diameter.serv" { TcTimer = 60; TLS_old_method; No_SCTP; Port=3868; } ; +ConnectPeer = "mme.localdomain" { ConnectTo = "172.18.3.202"; Port = 3868; No_TLS; TcTimer = 2; }; + + +############################################################## diff --git a/ttcn3-hss-test-ogs/ogs/mongod.conf b/ttcn3-hss-test-ogs/ogs/mongod.conf new file mode 100644 index 0000000..65beb4e --- /dev/null +++ b/ttcn3-hss-test-ogs/ogs/mongod.conf @@ -0,0 +1,44 @@ +# mongod.conf + +# for documentation of all options, see: +# http://docs.mongodb.org/manual/reference/configuration-options/ + +# Where and how to store data. +storage: + dbPath: /data/db + journal: + enabled: true +# engine: +# mmapv1: +# wiredTiger: + +# where to write logging data. +systemLog: + destination: file + logAppend: true + path: /data/mongod.log + +# network interfaces +net: + port: 27017 + bindIp: 172.18.16.103 + + +# how the process runs +processManagement: + timeZoneInfo: /usr/share/zoneinfo + +#security: + +#operationProfiling: + +#replication: + +#sharding: + +## Enterprise-Only Options: + +#auditLog: + +#snmp: + diff --git a/ttcn3-hss-test-ogs/ogs/open5gs-hss.yaml b/ttcn3-hss-test-ogs/ogs/open5gs-hss.yaml new file mode 100644 index 0000000..5f38e58 --- /dev/null +++ b/ttcn3-hss-test-ogs/ogs/open5gs-hss.yaml @@ -0,0 +1,63 @@ +db_uri: mongodb://172.18.3.103/open5gs + +# +# o Set OGS_LOG_INFO to all domain level +# - If `level` is omitted, the default level is OGS_LOG_INFO) +# - If `domain` is omitted, the all domain level is set from 'level' +# (Default values are used, so no configuration is required) +# +# o Set OGS_LOG_ERROR to all domain level +# - `level` can be set with none, fatal, error, warn, info, debug, trace +# logger: +# level: error +# +# o Set OGS_LOG_DEBUG to mme/emm domain level +# logger: +# level: debug +# domain: mme,emm +# +# o Set OGS_LOG_TRACE to all domain level +# logger: +# level: trace +# domain: core,sbi,ausf,event,tlv,mem,sock +# +logger: + level: trace + +hss: + freeDiameter: /data/freediameter.conf + +# +# hss: +# sms_over_ims: "sip:smsc.mnc001.mcc001.3gppnetwork.org:7060;transport=tcp" +# + +# +# o Disable use of IPv4 addresses (only IPv6) +# parameter: +# no_ipv4: true +# +# o Disable use of IPv6 addresses (only IPv4) +# parameter: +# no_ipv6: true +# +# o Prefer IPv4 instead of IPv6 for estabishing new GTP connections. +# parameter: +# prefer_ipv4: true +# +# o Use MongoDB Change Stream +# parameter: +# use_mongodb_change_stream: true +# +parameter: + +# +# o Maximum Number of UE +# max: +# ue: 1024 +# +# o Maximum Number of Peer(S1AP/NGAP, DIAMETER, GTP, PFCP or SBI) +# max: +# peer: 64 +# +max: -- To view, visit https://gerrit.osmocom.org/c/docker-playground/+/34715?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: Iebeefd9689ae2efa54678b99ff929ca255ec64d1 Gerrit-Change-Number: 34715 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
[M] Change in osmo-ttcn3-hacks[master]: library/DIAMETER: Add several missing tr templates
by pespin 10 Oct '23

10 Oct '23
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/34713?usp=email ) Change subject: library/DIAMETER: Add several missing tr templates ...................................................................... library/DIAMETER: Add several missing tr templates Change-Id: I21da18a5e1f0d368176d653494e0e0cde0beb656 --- M library/DIAMETER_Templates.ttcn M library/Osmocom_Types.ttcn 2 files changed, 171 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/13/34713/1 diff --git a/library/DIAMETER_Templates.ttcn b/library/DIAMETER_Templates.ttcn index 8bb53e0..fde071b 100644 --- a/library/DIAMETER_Templates.ttcn +++ b/library/DIAMETER_Templates.ttcn @@ -852,6 +852,14 @@ /* TS 29.272 7.3.27 Context-Identifier */ +template (present) GenericAVP tr_AVP_3GPP_ContextId(template (present) uint32_t ctx := ?) := { + avp := { + avp_header := tr_DIA_Hdr_3GPP(c_AVP_Code_AAA_3GPP_Context_Identifier), + avp_data := { + avp_AAA_3GPP_Context_Identifier := int2oct_tmpl(ctx, 4) + } + } +} template (value) GenericAVP ts_AVP_3GPP_ContextId(uint32_t ctx) := { avp := { avp_header := ts_DIA_Hdr_3GPP(c_AVP_Code_AAA_3GPP_Context_Identifier), @@ -871,6 +879,15 @@ } } +template (present) GenericAVP tr_AVP_3GPP_SubscrRauTauTmr(template (present) uint32_t tmr := ?) := { + avp := { + avp_header := tr_DIA_Hdr_3GPP(c_AVP_Code_AAA_3GPP_Subscribed_Periodic_RAU_TAU_Timer), + avp_data := { + avp_AAA_3GPP_Subscribed_Periodic_RAU_TAU_Timer := int2oct_tmpl(tmr, 4) + } + } +} + template (value) GenericAVP ts_AVP_3GPP_SubscrRauTauTmr(uint32_t tmr) := { avp := { avp_header := ts_DIA_Hdr_3GPP(c_AVP_Code_AAA_3GPP_Subscribed_Periodic_RAU_TAU_Timer), @@ -881,6 +898,14 @@ } /* TS 29.272 7.3.33 All-APN-Configurations-Included-Indicator */ +template (present) GenericAVP tr_AVP_3GPP_AllApnConfigsIncl(template (present) AAA_3GPP_All_APN_Configurations_Included_Indicator ind := ?) := { + avp := { + avp_header := tr_DIA_Hdr_3GPP(c_AVP_Code_AAA_3GPP_All_APN_Configurations_Included_Indicator), + avp_data := { + avp_AAA_3GPP_All_APN_Configurations_Included_Indicator := ind + } + } +} template (value) GenericAVP ts_AVP_3GPP_AllApnConfigsIncl(template (value) AAA_3GPP_All_APN_Configurations_Included_Indicator ind := All_APN_CONFIGURATIONS_INCLUDED) := { avp := { avp_header := ts_DIA_Hdr_3GPP(c_AVP_Code_AAA_3GPP_All_APN_Configurations_Included_Indicator), @@ -891,6 +916,14 @@ } /* TS 29.272 7.3.34 APN-Configuration-Profile */ +template (present) GenericAVP tr_AVP_3GPP_ApnConfigProfile(template (present) AVP_list content := ?) := { + avp := { + avp_header := tr_DIA_Hdr_3GPP(c_AVP_Code_AAA_3GPP_APN_Configuration_Profile), + avp_data := { + avp_AAA_3GPP_APN_Configuration_Profile := content + } + } +} template (value) GenericAVP ts_AVP_3GPP_ApnConfigProfile(template (value) AVP_list content) := { avp := { avp_header := ts_DIA_Hdr_3GPP(c_AVP_Code_AAA_3GPP_APN_Configuration_Profile), @@ -901,6 +934,21 @@ } /* TS 29.272 7.3.35 APN-Configuration */ +template (present) GenericAVP tr_AVP_3GPP_ApnConfig(template (present) uint32_t ctx := ?, + template (present) AAA_3GPP_PDN_Type pdn_type := ?, + template (present) charstring apn := ?) := { + avp := { + avp_header := tr_DIA_Hdr_3GPP(c_AVP_Code_AAA_3GPP_APN_Configuration_Profile), + avp_data := { + avp_AAA_3GPP_APN_Configuration := { + tr_AVP_3GPP_ContextId(ctx), + tr_AVP_3GPP_PdnType(pdn_type), + tr_AVP_3GPP_EpsSubscrQosProfile(?, ?), + tr_AVP_ServiceSelection(apn) + } + } + } +} template (value) GenericAVP ts_AVP_3GPP_ApnConfig(uint32_t ctx, AAA_3GPP_PDN_Type pdn_type, charstring apn) := { avp := { @@ -917,6 +965,14 @@ } /* TS 29.272 7.3.36 Service-Selection (refers to RFC 5778) */ +template (present) GenericAVP tr_AVP_ServiceSelection(template (present) charstring apn := ?) := { + avp := { + avp_header := tr_DIA_Hdr(c_AVP_Code_MIPv6_NONE_Service_Selection), + avp_data := { + avp_MIPv6_NONE_Service_Selection := char2oct_tmpl(apn) + } + } +} template (value) GenericAVP ts_AVP_ServiceSelection(charstring apn) := { avp := { avp_header := ts_DIA_Hdr(c_AVP_Code_MIPv6_NONE_Service_Selection), @@ -971,6 +1027,15 @@ } } +template (present) GenericAVP tr_AVP_PCC_3GPP_QoS_Class_Identifier(template (present) uint32_t val := ?) := { + avp := { + avp_header := tr_DIA_Hdr_3GPP(c_AVP_Code_PCC_3GPP_QoS_Class_Identifier), + avp_data := { + avp_PCC_3GPP_QoS_Class_Identifier := int2oct_tmpl(val, 4) + } + } +} + template (value) GenericAVP ts_AVP_PCC_3GPP_QoS_Class_Identifier(uint32_t val) := { avp := { avp_header := ts_DIA_Hdr_3GPP(c_AVP_Code_PCC_3GPP_QoS_Class_Identifier), @@ -980,6 +1045,15 @@ } } +template (present) GenericAVP tr_AVP_3GPP_PriorityLevel(template (present) uint32_t prio := ?) := { + avp := { + avp_header := tr_DIA_Hdr_3GPP(c_AVP_Code_PCC_3GPP_Priority_Level), + avp_data := { + avp_PCC_3GPP_Priority_Level := int2oct_tmpl(prio, 4) + } + } +} + template (value) GenericAVP ts_AVP_3GPP_PriorityLevel(uint32_t prio) := { avp := { avp_header := ts_DIA_Hdr_3GPP(c_AVP_Code_PCC_3GPP_Priority_Level), @@ -989,6 +1063,18 @@ } } +template (present) GenericAVP tr_AVP_PCC_3GPP_AllocRetenPrio(template (present) uint32_t prio := ?) := { + avp := { + avp_header := tr_DIA_Hdr_3GPP(c_AVP_Code_PCC_3GPP_Allocation_Retention_Priority), + avp_data := { + avp_PCC_3GPP_Allocation_Retention_Priority := { + tr_AVP_3GPP_PriorityLevel(prio) + /* pre-emption capability */ + /* pre-emption vulnerability */ + } + } + } +} template (value) GenericAVP ts_AVP_PCC_3GPP_AllocRetenPrio(uint32_t prio) := { avp := { avp_header := ts_DIA_Hdr_3GPP(c_AVP_Code_PCC_3GPP_Allocation_Retention_Priority), @@ -1002,6 +1088,19 @@ } } +template (present) GenericAVP tr_AVP_3GPP_EpsSubscrQosProfile(template (present) uint32_t qos_class := ?, + template (present) uint32_t prio := ?) := { + avp := { + avp_header := tr_DIA_Hdr_3GPP(c_AVP_Code_AAA_3GPP_EPS_Subscribed_QoS_Profile), + avp_data := { + avp_AAA_3GPP_EPS_Subscribed_QoS_Profile := { + tr_AVP_PCC_3GPP_QoS_Class_Identifier(qos_class), + tr_AVP_PCC_3GPP_AllocRetenPrio(prio) + } + } + } +} + template (value) GenericAVP ts_AVP_3GPP_EpsSubscrQosProfile(uint32_t qos_class, uint32_t prio) := { avp := { avp_header := ts_DIA_Hdr_3GPP(c_AVP_Code_AAA_3GPP_EPS_Subscribed_QoS_Profile), @@ -1016,6 +1115,17 @@ /* TS 29.272 7.3.41 AMBR */ +template (present) GenericAVP tr_AVP_3GPP_AMBR(template (present) uint32_t ul := ?, template (present) uint32_t dl := ?) := { + avp := { + avp_header := tr_DIA_Hdr_3GPP(c_AVP_Code_AAA_3GPP_AMBR), + avp_data := { + avp_AAA_3GPP_AMBR := { + tr_AVP_3GPP_MaxReqBwUL(ul), + tr_AVP_3GPP_MaxReqBwDL(dl) + } + } + } +} template (value) GenericAVP ts_AVP_3GPP_AMBR(uint32_t ul, uint32_t dl) := { avp := { avp_header := ts_DIA_Hdr_3GPP(c_AVP_Code_AAA_3GPP_AMBR), @@ -1028,6 +1138,15 @@ } } +template (present) GenericAVP tr_AVP_3GPP_MaxReqBwUL(template (present) uint32_t bw := ?) := { + avp := { + avp_header := tr_DIA_Hdr_3GPP(c_AVP_Code_RX_3GPP_Max_Requested_Bandwidth_UL), + avp_data := { + avp_RX_3GPP_Max_Requested_Bandwidth_UL := int2oct_tmpl(bw, 4) + } + } +} + template (value) GenericAVP ts_AVP_3GPP_MaxReqBwUL(uint32_t bw) := { avp := { avp_header := ts_DIA_Hdr_3GPP(c_AVP_Code_RX_3GPP_Max_Requested_Bandwidth_UL), @@ -1037,6 +1156,15 @@ } } +template (present) GenericAVP tr_AVP_3GPP_MaxReqBwDL(template (present) uint32_t bw := ?) := { + avp := { + avp_header := tr_DIA_Hdr_3GPP(c_AVP_Code_RX_3GPP_Max_Requested_Bandwidth_DL), + avp_data := { + avp_RX_3GPP_Max_Requested_Bandwidth_DL := int2oct_tmpl(bw, 4) + } + } +} + template (value) GenericAVP ts_AVP_3GPP_MaxReqBwDL(uint32_t bw) := { avp := { avp_header := ts_DIA_Hdr_3GPP(c_AVP_Code_RX_3GPP_Max_Requested_Bandwidth_DL), @@ -1209,6 +1337,14 @@ } /* TS 29.272 7.3.62 PDN-Type */ +template (present) GenericAVP tr_AVP_3GPP_PdnType(template (present) AAA_3GPP_PDN_Type pdn_type := ?) := { + avp := { + avp_header := tr_DIA_Hdr_3GPP(c_AVP_Code_AAA_3GPP_PDN_Type), + avp_data := { + avp_AAA_3GPP_PDN_Type := pdn_type + } + } +} template (value) GenericAVP ts_AVP_3GPP_PdnType(template (value) AAA_3GPP_PDN_Type pdn_type) := { avp := { avp_header := ts_DIA_Hdr_3GPP(c_AVP_Code_AAA_3GPP_PDN_Type), diff --git a/library/Osmocom_Types.ttcn b/library/Osmocom_Types.ttcn index 8892631..ce22c1e 100644 --- a/library/Osmocom_Types.ttcn +++ b/library/Osmocom_Types.ttcn @@ -153,6 +153,32 @@ } } +function int2oct_tmpl(template integer inp, integer num_oct) return template octetstring +{ + if (istemplatekind(inp, "omit")) { + return omit; + } else if (istemplatekind(inp, "*")) { + return *; + } else if (istemplatekind(inp, "?")) { + return ?; + } else { + return int2oct(valueof(inp), num_oct); + } +} + +function char2oct_tmpl(template charstring inp) return template octetstring +{ + if (istemplatekind(inp, "omit")) { + return omit; + } else if (istemplatekind(inp, "*")) { + return *; + } else if (istemplatekind(inp, "?")) { + return ?; + } else { + return char2oct(valueof(inp)); + } +} + function f_array_contains(IntegerRecord arr, integer key) return boolean { for (var integer i:= 0; i< sizeof(arr); i := i + 1) { if (arr[i] == key) { -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/34713?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: I21da18a5e1f0d368176d653494e0e0cde0beb656 Gerrit-Change-Number: 34713 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
[L] Change in osmo-ttcn3-hacks[master]: Introduce HSS_Tests testsuite
by pespin 10 Oct '23

10 Oct '23
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/34714?usp=email ) Change subject: Introduce HSS_Tests testsuite ...................................................................... Introduce HSS_Tests testsuite Change-Id: Ic2fccd9c54aea04f1a31649a0af47c974939fb2f Related: SYS#6588 --- M Makefile A hss/HSS_Tests.cfg A hss/HSS_Tests.default A hss/HSS_Tests.ttcn A hss/expected-results.xml A hss/gen_links.sh A hss/regen_makefile.sh 7 files changed, 352 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/14/34714/1 diff --git a/Makefile b/Makefile index 1d119d1..0ed632f 100644 --- a/Makefile +++ b/Makefile @@ -27,6 +27,7 @@ hlr \ hnbgw \ hnodeb \ + hss \ mgw \ mme \ msc \ diff --git a/hss/HSS_Tests.cfg b/hss/HSS_Tests.cfg new file mode 100644 index 0000000..24fe9c4 --- /dev/null +++ b/hss/HSS_Tests.cfg @@ -0,0 +1,18 @@ +[ORDERED_INCLUDE] +# Common configuration, shared between test suites +"../Common.cfg" +# testsuite specific configuration, not expected to change +"./HSS_Tests.default" + +# Local configuration below + +[LOGGING] + +[TESTPORT_PARAMETERS] + +[MODULE_PARAMETERS] + +[MAIN_CONTROLLER] + +[EXECUTE] +HSS_Tests.control diff --git a/hss/HSS_Tests.default b/hss/HSS_Tests.default new file mode 100644 index 0000000..4c0b502 --- /dev/null +++ b/hss/HSS_Tests.default @@ -0,0 +1,7 @@ +[LOGGING] + +[TESTPORT_PARAMETERS] + +[MODULE_PARAMETERS] + +[EXECUTE] diff --git a/hss/HSS_Tests.ttcn b/hss/HSS_Tests.ttcn new file mode 100644 index 0000000..bd18e9e --- /dev/null +++ b/hss/HSS_Tests.ttcn @@ -0,0 +1,263 @@ +module HSS_Tests { + +import from General_Types all; +import from Osmocom_Types all; +import from Native_Functions all; +import from Misc_Helpers all; + +import from DIAMETER_Types all; +import from DIAMETER_Templates all; +import from DIAMETER_Emulation all; + +type record of hexstring SubscriberConfigs; + +modulepar { + charstring mp_hss_hostname := "127.0.0.4"; + integer mp_hss_port := 3868; + charstring mp_diam_local_hostname := "127.0.0.1"; + integer mp_diam_local_port := 3868; + charstring mp_diam_orig_realm := "localdomain"; + charstring mp_diam_orig_host := "mme.localdomain"; + charstring mp_diam_dest_realm := "localdomain"; + charstring mp_diam_dest_host := "hss.localdomain"; + SubscriberConfigs subscribers := { + /* Existing subscriber, ULA returns SERVICE_GRANTED */ + '001010000000000'H + }; +} + +/* main component, we typically have one per testcase */ +type component MTC_CT { + + /* emulated MME/SGSN */ + var DIAMETER_Emulation_CT vc_S6a; + port DIAMETER_PT S6a_UNIT; + port DIAMETEREM_PROC_PT S6a_PROC; + /* global test case guard timer (actual timeout value is set in f_init()) */ + timer T_guard; +} + +/* global altstep for global guard timer; */ +altstep as_Tguard() runs on MTC_CT { + [] T_guard.timeout { + setverdict(fail, "Timeout of T_guard"); + mtc.stop; + } +} + +type component DIAMETER_ConnHdlr_CT extends DIAMETER_ConnHdlr { + port DIAMETER_Conn_PT DIAMETER_CLIENT; + port DIAMETEREM_PROC_PT DIAMETER_PROC_CLIENT; +} + +function f_diam_connhldr_ct_main(hexstring imsi) runs on DIAMETER_ConnHdlr_CT { + var DIAMETER_ConnHdlr vc_conn_unused; + var PDU_DIAMETER msg; + var UINT32 ete_id; + + f_diameter_expect_imsi(imsi); + + while (true) { + alt { + [] DIAMETER_CLIENT.receive(PDU_DIAMETER:?) -> value msg { + DIAMETER.send(msg); + } + [] DIAMETER.receive(PDU_DIAMETER:?) -> value msg { + DIAMETER_CLIENT.send(msg); + } + [] DIAMETER_PROC_CLIENT.getcall(DIAMETEREM_register_eteid:{?,?}) -> param(ete_id, vc_conn_unused) { + DIAMETER_PROC.call(DIAMETEREM_register_eteid:{ete_id, self}) { + [] DIAMETER_PROC.getreply(DIAMETEREM_register_eteid:{?,?}) {}; + } + DIAMETER_PROC_CLIENT.reply(DIAMETEREM_register_eteid:{ete_id, vc_conn_unused}); + } + } + } +} + +/* per-session component; we typically have 1..N per testcase */ +type component Cli_Session_CT { + var SessionPars g_pars; + + port DIAMETER_Conn_PT S6a; + port DIAMETEREM_PROC_PT S6a_PROC; +} +function f_diam_connhldr_expect_eteid(UINT32 ete_id) runs on Cli_Session_CT { + S6a_PROC.call(DIAMETEREM_register_eteid:{ete_id, null}) { + [] S6a_PROC.getreply(DIAMETEREM_register_eteid:{?,?}) {}; + } +} + +/* configuration data for a given Session */ +type record SessionPars { + hexstring imsi, + uint32_t s6a_next_hbh_id, + uint32_t s6a_next_ete_id + //hexstring msisdn optional, + + + // serving network + //integer rat_type, + // flags? + //charstring apn, + /* Apn subscribed or non-subscribed */ + //boolean selection_mode, + //BIT3 pdn_type +} + +template (value) SessionPars +t_SessionPars(hexstring imsi, uint32_t s6a_next_hbh_id := 1000, uint32_t s6a_next_ete_id := 22220 + //, integer rat_type := 6, charstring apn := "internet", boolean selection_mode := false, BIT3 pdn_type := '001'B + ) := { + imsi := imsi, + s6a_next_hbh_id := s6a_next_hbh_id, + s6a_next_ete_id := s6a_next_ete_id + //msisdn := '1234'H, + //rat_type := rat_type, + //apn := apn, + //selection_mode := selection_mode, + //pdn_type := pdn_type +} + +type function void_fn() runs on Cli_Session_CT; + +friend function DiameterForwardUnitdataCallback(PDU_DIAMETER msg) +runs on DIAMETER_Emulation_CT return template PDU_DIAMETER { + DIAMETER_UNIT.send(msg); + return omit; +} + +friend function f_init_diameter(charstring id) runs on MTC_CT { + var DIAMETEROps ops := { + create_cb := refers(DIAMETER_Emulation.ExpectedCreateCallback), + unitdata_cb := refers(DiameterForwardUnitdataCallback), + raw := false /* handler mode (IMSI based routing) */ + }; + var DIAMETER_conn_parameters pars; + + /* S6a setup: */ + pars := { + remote_ip := mp_hss_hostname, + remote_sctp_port := mp_hss_port, + local_ip := mp_diam_local_hostname, + local_sctp_port := mp_diam_local_port, + origin_host := mp_diam_orig_host, + origin_realm := mp_diam_orig_realm, + auth_app_id := omit, + vendor_app_id := c_DIAMETER_3GPP_S6_AID + }; + vc_S6a := DIAMETER_Emulation_CT.create(id); + map(vc_S6a:DIAMETER, system:DIAMETER_CODEC_PT); + connect(vc_S6a:DIAMETER_UNIT, self:S6a_UNIT); + connect(vc_S6a:DIAMETER_PROC, self:S6a_PROC); + vc_S6a.start(DIAMETER_Emulation.main(ops, pars, id)); + + f_diameter_wait_capability(S6a_UNIT); + /* Give some time for our emulation to get out of SUSPECT list of SUT (3 watchdong ping-pongs): + * RFC6733 sec 5.1 + * RFC3539 sec 3.4.1 [5] + * https://github.com/freeDiameter/freeDiameter/blob/master/libfdcore/p_psm.c#… + */ + f_sleep(1.0); +} + +private function f_init(float guard_timeout := 60.0) runs on MTC_CT { + T_guard.start(guard_timeout); + activate(as_Tguard()); + f_init_diameter(testcasename()); +} + +function f_start_handler(void_fn fn, template (omit) SessionPars pars_tmpl := omit) +runs on MTC_CT return Cli_Session_CT { + var charstring id := testcasename(); + var DIAMETER_ConnHdlr_CT vc_conn_s6a; + var Cli_Session_CT vc_conn; + var SessionPars pars; + + if (isvalue(pars_tmpl)) { + pars := valueof(pars_tmpl); + } else { + /*TODO: set default values */ + } + + vc_conn := Cli_Session_CT.create(id); + + vc_conn_s6a := DIAMETER_ConnHdlr_CT.create(id); + connect(vc_conn_s6a:DIAMETER, vc_S6a:DIAMETER_CLIENT); + connect(vc_conn_s6a:DIAMETER_PROC, vc_S6a:DIAMETER_PROC); + connect(vc_conn:S6a, vc_conn_s6a:DIAMETER_CLIENT); + connect(vc_conn:S6a_PROC, vc_conn_s6a:DIAMETER_PROC_CLIENT); + vc_conn_s6a.start(f_diam_connhldr_ct_main(pars.imsi)); + + vc_conn.start(f_handler_init(fn, pars)); + return vc_conn; +} + +private function f_handler_init(void_fn fn, SessionPars pars) +runs on Cli_Session_CT { + g_pars := valueof(pars); + fn.apply(); +} + +/* ULR + ULA against HSS */ +private function f_dia_ulr_ula() runs on Cli_Session_CT { + var octetstring sess_id := char2oct("foobar"); + var template (present) AVP_list sub_data; + var PDU_DIAMETER rx_dia; + var UINT32 hbh_id := int2oct(g_pars.s6a_next_hbh_id, 4); + var UINT32 ete_id := int2oct(g_pars.s6a_next_ete_id, 4); + + /* Unlike ULR, ULA contains no IMSI. Register ete_id in DIAMETER_Emulation, + * so AIA is forwarded back to us in DIAMETER port instead of MTC_CT.DIAMETER_UNIT. + */ + f_diam_connhldr_expect_eteid(ete_id); + + /* TODO: change this into a ts_DIA_ULR */ + S6a.send(ts_DIA_ULR(g_pars.imsi, '111F11'O, sess_id, + mp_diam_orig_host, mp_diam_orig_realm, + mp_diam_dest_realm, hbh_id, ete_id)); + g_pars.s6a_next_hbh_id := g_pars.s6a_next_hbh_id + 1; + g_pars.s6a_next_ete_id := g_pars.s6a_next_ete_id + 1; + + sub_data := superset( + ts_AVP_3GPP_SubscriberStatus(SERVICE_GRANTED), + tr_AVP_3GPP_SubscrRauTauTmr(?), + tr_AVP_3GPP_AMBR(?, ?), + tr_AVP_3GPP_ApnConfigProfile({ + tr_AVP_3GPP_ContextId(?), + tr_AVP_3GPP_AllApnConfigsIncl, + tr_AVP_3GPP_ApnConfig(?, ?, ?) + }) + ); + + alt { + [] S6a.receive(tr_DIA_ULA(/* sub_data */ ?, sess_id, ?, ?, hbh_id, ete_id)) -> value rx_dia { + setverdict(pass); + } + [] S6a.receive(PDU_DIAMETER:?) -> value rx_dia { + Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, + log2str("Received unexpected DIAMETER ", rx_dia)); + } + } +} + +/* create a session, expect it to succeed */ +private function f_TC_ulr_ula() runs on Cli_Session_CT { + f_dia_ulr_ula(); + setverdict(pass); +} +testcase TC_ulr_ula() runs on MTC_CT { + var Cli_Session_CT vc_conn; + var SessionPars pars := valueof(t_SessionPars(subscribers[0])); + f_init(); + vc_conn := f_start_handler(refers(f_TC_ulr_ula), pars); + vc_conn.done; +} + + +control { + execute( TC_ulr_ula() ); +} + + +} diff --git a/hss/expected-results.xml b/hss/expected-results.xml new file mode 100644 index 0000000..8e8d1df --- /dev/null +++ b/hss/expected-results.xml @@ -0,0 +1,4 @@ +<?xml version="1.0"?> +<testsuite name='Titan' tests='1' failures='0' errors='0' skipped='0' inconc='0' time='MASKED'> + <testcase classname='HSS_Tests' name='TC_ulr_ula' time='MASKED'/> +</testsuite> diff --git a/hss/gen_links.sh b/hss/gen_links.sh new file mode 100755 index 0000000..b97d53f --- /dev/null +++ b/hss/gen_links.sh @@ -0,0 +1,29 @@ +#!/bin/bash + +BASEDIR=../deps + +. ../gen_links.sh.inc + +DIR=$BASEDIR/titan.Libraries.TCCUsefulFunctions/src +FILES="TCCInterface_Functions.ttcn TCCConversion_Functions.ttcn TCCConversion.cc TCCInterface.cc TCCInterface_ip.h" +FILES+=" TCCEncoding_Functions.ttcn TCCEncoding.cc " # GSM 7-bit coding +gen_links $DIR $FILES + +DIR=$BASEDIR/titan.TestPorts.Common_Components.Socket-API/src +FILES="Socket_API_Definitions.ttcn" +gen_links $DIR $FILES + +DIR=$BASEDIR/titan.TestPorts.IPL4asp/src +FILES="IPL4asp_Functions.ttcn IPL4asp_PT.cc IPL4asp_PT.hh IPL4asp_PortType.ttcn IPL4asp_Types.ttcn IPL4asp_discovery.cc IPL4asp_protocol_L234.hh" +gen_links $DIR $FILES + +DIR=$BASEDIR/titan.ProtocolModules.DIAMETER_ProtocolModule_Generator/src +FILES="DIAMETER_EncDec.cc" +gen_links $DIR $FILES + +DIR=../library +FILES="Misc_Helpers.ttcn General_Types.ttcn Osmocom_Types.ttcn Native_Functions.ttcn Native_FunctionDefs.cc " +FILES+="DIAMETER_Types.ttcn DIAMETER_CodecPort.ttcn DIAMETER_CodecPort_CtrlFunct.ttcn DIAMETER_CodecPort_CtrlFunctDef.cc DIAMETER_Emulation.ttcn DIAMETER_Templates.ttcn " +gen_links $DIR $FILES + +ignore_pp_results diff --git a/hss/regen_makefile.sh b/hss/regen_makefile.sh new file mode 100755 index 0000000..23fbd73 --- /dev/null +++ b/hss/regen_makefile.sh @@ -0,0 +1,20 @@ +#!/bin/bash + +NAME=HSS_Tests + +FILES=" + *.ttcn + DIAMETER_CodecPort_CtrlFunctDef.cc + DIAMETER_EncDec.cc + IPL4asp_PT.cc + IPL4asp_discovery.cc + Native_FunctionDefs.cc + TCCConversion.cc + TCCEncoding.cc + TCCInterface.cc +" + +export CPPFLAGS_TTCN3=" +" + +../regen-makefile.sh -e $NAME $FILES -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/34714?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: Ic2fccd9c54aea04f1a31649a0af47c974939fb2f Gerrit-Change-Number: 34714 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 124
  • 125
  • 126
  • 127
  • 128
  • 129
  • 130
  • ...
  • 185
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.