Compare commits

...

11 Commits

Author SHA1 Message Date
Pau Espin 8854ef2d80 DONTMERGE
Change-Id: I35c60e8a2772f4a9cfbed8922e92afd88c54a9d5
2024-04-25 13:16:37 +02:00
Vadim Yanitskiy 3b535cbafa ttcn3-sgsn-test-sns: add missing symlink to osmo-stp.cfg
This commit fixes the following error:

cp osmo-stp.cfg /home/osmocom-build/jenkins/workspace/ttcn3-sgsn-test-sns/logs/stp/
cp: cannot stat 'osmo-stp.cfg': No such file or directory

Change-Id: Ie0f887dc68e89d2fa1f9a2ee8dfd7f8ce71fc329
Fixes: e4fdd72 "ttcn3-sgsn-test-sns: add missing symlink to osmo-stp.cfg"
2024-04-25 14:50:20 +07:00
Vadim Yanitskiy bee0425ab7 ttcn3-sgsn-test: add config files for running SNS testcases
Change-Id: I767ec223585002d6420eda27ed338722f764c902
2024-04-22 19:23:02 +07:00
Vadim Yanitskiy 4310e25ea7 ttcn3-sgsn-test: add missing SGSN_Tests_NS.control
This does not enable the SNS testcases though.  We need a separate
job with its own configuration files for running the SNS testcases.

Change-Id: I605526dff6d3c0ec4c5dc58dc00ca51b4ccd68a7
Related: osmo-ttcn3-hacks.git Ib2bffbb110961474928f35d212cb492d4b6fdee0
2024-04-22 19:07:17 +07:00
Pau Espin 6beffab8df ttcn3-hnbgw: Apply latest changes to 'with-pfcp' scenario
Recent commits applied changes to the default scenario, but forgot to
apply them to the 'with-pfcp' subdir.

Fixes: 6de89a5fb5
Fixes: 3736d31fc0
Fixes: 0bdbcd6815
Fixes: 2c22a96355
Fixes: d3711e6710
Change-Id: Ie02a0754a6ca985e60e08f1f171f532b6cc16264
2024-04-18 18:07:19 +00:00
Pau Espin 8d8c48f90e ttcn3-asterisk: Set Asterisk AMI IP address in Asterisk_Tests
The Asterisk_tests testsuite recently gained initial AMI support.
Configure it with the proper IP address.

Depends: osmo-ttcn3-hacks.git Change-Id I2c570e4d04e7ab8c44962cf484e4bbc946209aee
Change-Id: Ibb6af1cbfb652214b2fdd2a6eb9a4887c9a9cfb0
2024-04-18 12:57:36 +02:00
Pau Espin 6de89a5fb5 ttcn3-hnbgw: osmo-hnbgw.cfg: Enable color in log file
Change-Id: Iffd28619ca075e0cf870e10989cfced6096ca8d7
2024-04-16 16:12:22 +02:00
Pau Espin 3736d31fc0 ttcn3-hnbgw: osmo-hnbgw.cfg: Switch from deprecated 'mgcp' node to 'mgw'
Change-Id: Ie27dcae05fa719cd0eac9faa6e2fb6b63581ac28
2024-04-16 16:07:38 +02:00
Pau Espin 0bdbcd6815 ttcn3-hnbgw: Set STATSVTY.CTRL_HOSTNAME to correct IP address
Also update osmo-hnbgw.cfg to configure statsd, as done in
osmo-ttcn3-hacks.git 904b5f1a56629b84f67807a75d5c0b356cc7d726.

Change-Id: I80c228b7ad4b9fb06b1651f23a2932bf19374297
2024-04-16 13:54:53 +02:00
Pau Espin 76d2ce9346 ttcn3-asterisk: Configure AMI
Change-Id: I590d89e9173b0372611790d4178747e28a1215d1
2024-04-16 11:20:35 +00:00
Pau Espin 2c22a96355 ttcn3-hnbgw: Set new mp_local_statsd_ip module paramter to correct IP addr
Depends: osmo-ttcn3-hacks.git Change-Id I213173c99ec314c2eebfb8836c4d3467b3a7f818
Change-Id: I16cddef5833bf2abff0edb82ec3eb9f6ce976364
2024-04-16 12:54:04 +02:00
15 changed files with 274 additions and 9 deletions

View File

@ -3,12 +3,18 @@
"/osmo-ttcn3-hacks/asterisk/Asterisk_Tests.default"
[LOGGING]
*.FileMask := ERROR | WARNING | PARALLEL | VERDICTOP | DEBUG | TTCN_DEBUG;
[TESTPORT_PARAMETERS]
*.AMI.CTRL_HOSTNAME := "172.18.11.10"
*.SIP.default_local_address := "172.18.11.103"
*.IMS.default_local_address := "172.18.11.103"
*.SIP.local_sip_port := "5060"
*.IMS.local_sip_port := "5061"
*.SIP.default_dest_address := "172.18.11.10"
*.IMS.default_dest_address := "172.18.11.10"
*.SIP.default_dest_port := "5094"
*.IMS.default_dest_port := "5094"
[MODULE_PARAMETERS]
Asterisk_Tests.mp_local_sip_host := "172.18.11.103"
@ -19,4 +25,4 @@ Asterisk_Tests.mp_remote_sip_port := 5094
[MAIN_CONTROLLER]
[EXECUTE]
Asterisk_Tests.control
Asterisk_Tests.TC_internal_registration

View File

@ -3,6 +3,14 @@ ARG USER
FROM $REGISTRY/$USER/debian-bookworm-titan
ARG OSMO_TTCN3_BRANCH="master"
# Install packages from Debian repositories (alphabetic order)
RUN set -x && \
apt-get update && \
apt-get install -y --no-install-recommends \
telnet \
&& \
apt-get clean
ADD https://gerrit.osmocom.org/plugins/gitiles/osmo-ttcn3-hacks/+/$OSMO_TTCN3_BRANCH?format=TEXT /tmp/commit
RUN ttcn3-docker-prepare "$OSMO_TTCN3_BRANCH" asterisk

View File

@ -11,6 +11,7 @@ ASTERISK_CFG_PATH="/etc/asterisk"
cp /data/asterisk.conf "${ASTERISK_CFG_PATH}/"
#sed -i "s#/etc/asterisk#${ASTERISK_CFG_PATH}#" "${ASTERISK_CFG_PATH}/asterisk.conf"
cp /data/pjsip.conf "${ASTERISK_CFG_PATH}/"
cp /data/manager.conf "${ASTERISK_CFG_PATH}/"
cat /data/extensions.conf >>"${ASTERISK_CFG_PATH}/extensions.conf"
/usr/sbin/asterisk -C "${ASTERISK_CFG_PATH}/asterisk.conf" -f -g -vvvvv -ddddd

View File

@ -0,0 +1,11 @@
[general]
enabled = yes
;webenabled = yes
port = 5038
bindaddr = 172.18.11.10
[test_user]
secret = 1234
;deny=0.0.0.0/0.0.0.0
permit=172.18.11.103/255.255.0.0

View File

@ -10,11 +10,13 @@
[TESTPORT_PARAMETERS]
*.HNBGWVTY.CTRL_HOSTNAME := "172.18.35.20"
*.STATSVTY.CTRL_HOSTNAME := "172.18.35.20"
[MODULE_PARAMETERS]
HNBGW_Tests.mp_hnodeb_ip := "172.18.35.203";
HNBGW_Tests.mp_hnbgw_ip := "172.18.35.20";
HNBGW_Tests.mp_mgw_ip := "172.18.35.203";
HNBGW_Tests.mp_local_statsd_ip := "172.18.35.203";
HNBGW_Tests.mp_cn_cfg := {
{
transport := RANAP_TRANSPORT_IuCS,

View File

@ -8,7 +8,7 @@ log gsmtap 172.18.35.203
!
log stderr
logging filter all 1
logging color 0
logging color 1
logging print category-hex 0
logging print category 1
logging print level 1
@ -19,10 +19,21 @@ log stderr
!
line vty
no login
bind 0.0.0.0
bind 172.18.35.20
ctrl
bind 0.0.0.0
bind 172.18.35.20
!
stats interval 0
stats reporter statsd
prefix TTCN3
level subscriber
remote-ip 172.18.35.203
remote-port 8125
flush-period 1
mtu 1024
enable
cs7 instance 0
asp asp-clnt-msc-0 2905 2905 m3ua
local-ip 172.18.35.20
@ -68,7 +79,7 @@ hnbgw
local-ip 172.18.35.20
local-port 29169
hnbap-allow-tmsi 1
mgcp
mgw 0
mgw local-ip 172.18.35.20
mgw remote-ip 172.18.35.203
# don't spam RANAP RESET messages for up to eight CN links across all tests

View File

@ -11,11 +11,13 @@
[TESTPORT_PARAMETERS]
*.HNBGWVTY.CTRL_HOSTNAME := "172.18.35.20"
*.STATSVTY.CTRL_HOSTNAME := "172.18.35.20"
[MODULE_PARAMETERS]
HNBGW_Tests.mp_hnodeb_ip := "172.18.35.203";
HNBGW_Tests.mp_hnbgw_ip := "172.18.35.20";
HNBGW_Tests.mp_mgw_ip := "172.18.35.203";
HNBGW_Tests.mp_local_statsd_ip := "172.18.35.203";
HNBGW_Tests.mp_cn_cfg := {
{
transport := RANAP_TRANSPORT_IuCS,
@ -114,6 +116,8 @@ HNBGW_Tests.mp_enable_pfcp_tests := true;
HNBGW_Tests.mp_pfcp_ip_local := "172.18.35.203";
HNBGW_Tests.mp_pfcp_ip_remote := "172.18.35.20";
HNBGW_Tests.mp_validate_talloc_asn1 := true;
# keep in sync with osmo-hnbgw.cfg "timer hnbgw x31":
HNBGW_Tests.mp_hnbgw_timer_x31 := 5;
[MAIN_CONTROLLER]

View File

@ -8,7 +8,7 @@ log gsmtap 172.18.35.203
!
log stderr
logging filter all 1
logging color 0
logging color 1
logging print category-hex 0
logging print category 1
logging print level 1
@ -19,10 +19,20 @@ log stderr
!
line vty
no login
bind 0.0.0.0
bind 172.18.35.20
ctrl
bind 0.0.0.0
bind 172.18.35.20
!
stats interval 0
stats reporter statsd
prefix TTCN3
level subscriber
remote-ip 172.18.35.203
remote-port 8125
flush-period 1
mtu 1024
enable
cs7 instance 0
asp asp-clnt-msc-0 2905 2905 m3ua
local-ip 172.18.35.20
@ -68,7 +78,7 @@ hnbgw
local-ip 172.18.35.20
local-port 29169
hnbap-allow-tmsi 1
mgcp
mgw 0
mgw local-ip 172.18.35.20
mgw remote-ip 172.18.35.203
# don't spam RANAP RESET messages for up to eight CN links across all tests

View File

@ -0,0 +1 @@
../ttcn3-sgsn-test/jenkins-sns.sh

View File

@ -0,0 +1 @@
../ttcn3-sgsn-test/osmo-stp.cfg

1
ttcn3-sgsn-test-sns/sns Symbolic link
View File

@ -0,0 +1 @@
../ttcn3-sgsn-test/sns

View File

@ -74,3 +74,4 @@ SGSN_Tests.mp_sgsn_gtp_ip := "172.18.8.10"
[EXECUTE]
SGSN_Tests.control
SGSN_Tests_Iu.control
SGSN_Tests_NS.control

57
ttcn3-sgsn-test/jenkins-sns.sh Executable file
View File

@ -0,0 +1,57 @@
#!/bin/sh
. ../jenkins-common.sh
IMAGE_SUFFIX="${IMAGE_SUFFIX:-master}"
docker_images_require \
"osmo-stp-$IMAGE_SUFFIX" \
"osmo-sgsn-$IMAGE_SUFFIX" \
"ttcn3-sgsn-test"
set_clean_up_trap
set -e
mkdir $VOL_BASE_DIR/sgsn-tester
cp sns/SGSN_Tests.cfg $VOL_BASE_DIR/sgsn-tester/
write_mp_osmo_repo "$VOL_BASE_DIR/sgsn-tester/SGSN_Tests.cfg"
mkdir $VOL_BASE_DIR/sgsn
cp sns/osmo-sgsn.cfg $VOL_BASE_DIR/sgsn/
mkdir $VOL_BASE_DIR/stp
cp osmo-stp.cfg $VOL_BASE_DIR/stp/
mkdir $VOL_BASE_DIR/unix
network_create
network_replace_subnet_in_configs
echo Starting container with STP
docker run --rm \
$(docker_network_params $SUBNET 200) \
--ulimit core=-1 \
-v $VOL_BASE_DIR/stp:/data \
--name ${BUILD_TAG}-stp -d \
$DOCKER_ARGS \
$REPO_USER/osmo-stp-$IMAGE_SUFFIX
echo Starting container with SGSN
docker run --rm \
$(docker_network_params $SUBNET 10) \
--ulimit core=-1 \
-v $VOL_BASE_DIR/sgsn:/data \
--name ${BUILD_TAG}-sgsn-sns -d \
$DOCKER_ARGS \
$REPO_USER/osmo-sgsn-$IMAGE_SUFFIX \
/bin/sh -c "osmo-sgsn -c /data/osmo-sgsn.cfg >/data/osmo-sgsn.log 2>&1"
echo Starting container with SGSN testsuite
docker run --rm \
$(docker_network_params $SUBNET 103) \
--ulimit core=-1 \
-e "TTCN3_PCAP_PATH=/data" \
-e "OSMO_SUT_HOST=172.18.$SUBNET.10" \
-e "OSMO_SUT_PORT=4245" \
-v $VOL_BASE_DIR/sgsn-tester:/data \
--name ${BUILD_TAG}-ttcn3-sgsn-test-sns \
$DOCKER_ARGS \
$REPO_USER/ttcn3-sgsn-test

View File

@ -0,0 +1,46 @@
[ORDERED_INCLUDE]
# Common configuration, shared between test suites
"/osmo-ttcn3-hacks/Common.cfg"
# testsuite specific configuration, not expected to change
"/osmo-ttcn3-hacks/sgsn/SGSN_Tests.default"
# Local configuration below
[LOGGING]
[TESTPORT_PARAMETERS]
*.SGSNVTY.CTRL_HOSTNAME := "172.18.8.10"
[MODULE_PARAMETERS]
SGSN_Tests.mp_nsconfig := {
{
handle_sns := true,
nsvc := {
{
provider := {
ip := {
address_family := AF_INET,
local_ip := "172.18.8.103",
remote_ip := "172.18.8.10",
data_weight := 1,
signalling_weight := 1
}
}
}
}
}
}
SGSN_Tests.mp_ranap_cfg := {
{
sctp_addr := { 23908, "172.18.8.103", 2905, "172.18.8.200" }
}
}
SGSN_Tests.mp_hlr_ip := "172.18.8.103"
SGSN_Tests.mp_ggsn_ip := "172.18.8.103"
SGSN_Tests.mp_sgsn_gtp_ip := "172.18.8.10"
[MAIN_CONTROLLER]
[EXECUTE]
SGSN_Tests_NS.control

View File

@ -0,0 +1,105 @@
!
! OsmoSGSN (1.2.0.46-e77e-dirty) configuration saved from vty
!!
!
log gsmtap 172.18.8.103
logging level set-all debug
logging filter all 1
!
log stderr
logging filter all 1
logging color 1
logging print category 1
logging timestamp 1
logging print extended-timestamp 1
logging print file 1
logging level mm debug
logging level pag notice
logging level meas notice
logging level ref notice
logging level gprs debug
logging level llc debug
logging level sndcp debug
logging level slhc notice
logging level ranap info
logging level sua info
logging level v42bis info
logging level lglobal info
logging level llapd notice
logging level linp notice
logging level lmux notice
logging level lmi notice
logging level lmib notice
logging level lsms notice
logging level lctrl notice
logging level lgtp debug
logging level lstats notice
logging level lgsup debug
logging level loap notice
logging level lss7 notice
logging level lsccp info
logging level lsua notice
logging level lm3ua notice
logging level lmgcp notice
!
stats interval 5
!
line vty
no login
bind 0.0.0.0
ctrl
bind 0.0.0.0
!
cs7 instance 0
point-code 0.23.4
asp asp-clnt-OsmoSGSN-A 2905 0 m3ua
local-ip 172.18.8.10
local-ip fd02:db8:8::10
remote-ip 172.18.8.200
remote-ip fd02:db8:8::200
role asp
sctp-role client
as as-clnt-OsmoSGSN-A m3ua
asp asp-clnt-OsmoSGSN-A
routing-key 3 0.23.4
ns
timer tns-block 3
timer tns-block-retries 3
timer tns-reset 3
timer tns-reset-retries 3
timer tns-test 30
timer tns-alive 3
timer tns-alive-retries 10
bind udp local
listen 172.18.8.10 23000
accept-dynamic-ip-sns
bssgp
sgsn
gtp local-ip 172.18.8.10
ggsn 0 remote-ip 172.18.8.103
ggsn 0 gtp-version 1
gsup remote-ip 172.18.8.103
gsup remote-port 4222
auth-policy remote
gsup oap-id 0
! apn * ggsn 0
no cdr filename
no cdr trap
cdr interval 600
timer t3312 600
timer t3322 6
timer t3350 6
timer t3360 6
timer t3370 6
timer t3313 30
timer t3314 44
timer t3316 44
timer t3385 8
timer t3386 8
timer t3395 8
timer t3397 8
no compression rfc1144
no compression v42bis
mme test-mme0
gtp remote-ip 172.18.8.103
gtp ran-info-relay 262 42 3