Dockerfile for a containes with m3ua-testtool / sua-testtool

This commit is contained in:
Harald Welte 2017-05-03 15:13:57 +02:00
parent 95d26e7fc6
commit 3f7ff12115
17 changed files with 639 additions and 0 deletions

18
m3ua-test/Dockerfile Normal file
View File

@ -0,0 +1,18 @@
FROM sigtran-tests
MAINTAINER Harald Welte <laforge@gnumonks.org>
RUN cd /tmp && git clone https://github.com/nplab/m3ua-testtool && \
cd m3ua-testtool && \
cc -o runm3uatest runm3uatest.c && \
cp runm3uatest /usr/local/bin/
COPY dotguile /root/.guile
RUN mkdir /data
VOLUME /data
COPY m3ua-param-testtool.scm run-all-sgp-tests /data/
CMD /data/run-all-sgp-tests

35
m3ua-test/dotguile Normal file
View File

@ -0,0 +1,35 @@
;;;
;;; Copyright (c) 2011 Michael Tuexen
;;; All rights reserved.
;;;
;;; Redistribution and use in source and binary forms, with or without
;;; modification, are permitted provided that the following conditions
;;; are met:
;;; 1. Redistributions of source code must retain the above copyright
;;; notice, this list of conditions and the following disclaimer.
;;; 2. Redistributions in binary form must reproduce the above copyright
;;; notice, this list of conditions and the following disclaimer in the
;;; documentation and/or other materials provided with the distribution.
;;;
;;; THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
;;; ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
;;; IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
;;; ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
;;; FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
;;; DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
;;; OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
;;; HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
;;; LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
;;; OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
;;; SUCH DAMAGE.
;;;
;;; $Id: dotguile,v 1.1 2012/08/26 21:06:27 tuexen Exp $
;;; Change the following line to reflect where the files are located.
(define dir "/tmp/m3ua-testtool/")
(define files (list "common.scm"
"m3ua.scm"
"m3ua-asp-tests.scm"
"m3ua-sgp-tests.scm"))
(map (lambda (file) (load-from-path (string-append dir file))) files)
(load-from-path "/data/m3ua-param-testtool.scm")

View File

@ -0,0 +1,136 @@
;;;
;;; Copyright (C) 2004, 2005 M. Tuexen tuexen@fh-muenster.de
;;;
;;; All rights reserved.
;;;
;;; Redistribution and use in source and binary forms, with or
;;; without modification, are permitted provided that the
;;; following conditions are met:
;;; 1. Redistributions of source code must retain the above
;;; copyright notice, this list of conditions and the
;;; following disclaimer.
;;; 2. Redistributions in binary form must reproduce the
;;; above copyright notice, this list of conditions and
;;; the following disclaimer in the documentation and/or
;;; other materials provided with the distribution.
;;; 3. Neither the name of the project nor the names of
;;; its contributors may be used to endorse or promote
;;; products derived from this software without specific
;;; prior written permission.
;;;
;;; THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS
;;; ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
;;; BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
;;; MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
;;; DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS
;;; BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
;;; EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
;;; LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
;;; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
;;; HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
;;; IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
;;; NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
;;; USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
;;; OF SUCH DAMAGE.
;;; $Id: m3ua-param-testtool.scm,v 1.5 2012/08/28 19:56:13 tuexen Exp $
;;; Define a transport address of the system under test (osmo-stp)
(define sut-addr "172.18.0.200")
(define sut-port m3ua-port)
(define sut-port-1 m3ua-port)
(define sut-port-2 m3ua-port)
;;; Define the transport address of the tester
(define tester-addr "172.18.0.2")
(define tester-port 3333)
(define tester-port-1 3000)
(define tester-port-2 3001)
;;; Define the point code of the IUT
(define iut-pc 1)
;;; Define the point code of the tester
(define tester-pc 23)
(define tester-pc-1 100)
(define tester-pc-2 101)
(define tester-invalid-pc 102)
(define tester-unauthorized-pc 103)
(define tester-unprovisioned-pc 104)
(define tester-unavailable-pc 1234)
(define tester-available-pc 1235)
(define tester-congested-pc 1236)
(define tester-restricted-pc 1237)
;;; Define a valid SS7 message and SI
(define ss7-message (list 11 34 45 67 67 89))
(define ss7-si 0)
(define iut-ni 1)
(define iut-mp 0)
(define iut-sls 0)
;;; Define correlation id
(define correlation-id 1)
;;; Define network appearance
(define network-appearance 1)
(define invalid-network-appearance 2)
;;; Define an routing context
(define tester-rc-valid 23)
(define tester-rc-valid-1 1)
(define tester-rc-valid-2 2)
;;; Define an invalid routing context
(define tester-rc-invalid 3)
;;; Define an asp-identifier
(define asp-id 1)
(define asp-id-1 1)
(define asp-id-2 2)
;;; Define traffic-type-mode
;;;(define traffic-mode m3ua-traffic-mode-type-override)
(define traffic-mode m3ua-traffic-mode-type-loadshare)
;;;(define traffic-mode m3ua-traffic-mode-type-broadcast)
(define asp-up-message-parameters (list))
;;; (define asp-up-message-parameters (list (m3ua-make-asp-id-parameter asp-id)))
;;;asp-up-message-parameters
(define asp-active-message-parameters (list))
;;;(define asp-active-message-parameters (list (m3ua-make-traffic-mode-type-parameter traffic-mode)
;;; (m3ua-make-routing-context-parameter (list tester-rc-valid))))
;;;asp-active-message-parameters
(define asp-active-ack-message-parameters (list))
;;;(define asp-active-ack-message-parameters (list (m3ua-make-traffic-mode-type-parameter traffic-mode)
;;; (m3ua-make-routing-context-parameter (list tester-rc-valid))))
;;;asp-active-ack-message-parameters
(define asp-inactive-message-parameters (list))
;;;(define asp-inactive-message-parameters (list (m3ua-make-traffic-mode-type-parameter traffic-mode)
;;; (m3ua-make-routing-context-parameter (list tester-rc-valid))))
;;;asp-inactive-message-parameters
(define asp-inactive-ack-message-parameters (list))
;;;(define asp-inactive-ack-message-parameters (list (m3ua-make-routing-context-parameter (list tester-rc-valid))))
;;;asp-inactive-ack-message-parameters
(define data-message-parameters (list))
;;;(define data-message-parameters (list (m3ua-make-network-appearance-parameter network-appearance)
;;; (m3ua-make-routing-context-parameter (list tester-rc-valid))))
;;;data-message-parameters
;;; Define parameter for DATA message
(define rc 23)
(define opc 1)
(define dpc 2)
(define si 0)
(define sls 0)
(define ni 0)
(define mp 0)
(define ss7-message (list 11 34 45 67 67 89))
(define data-message-parameters (list (m3ua-make-routing-context-parameter (list rc))))

43
m3ua-test/run-all-sgp-tests Executable file
View File

@ -0,0 +1,43 @@
#!/usr/bin/env tcsh
set timeout = 10
set sleeptime = 1
set testcases = (m3ua-sgp-aspsm-v-001 \
m3ua-sgp-aspsm-v-003 \
m3ua-sgp-aspsm-v-005 \
m3ua-sgp-aspsm-i-001 \
m3ua-sgp-aspsm-i-002 \
m3ua-sgp-aspsm-i-003 \
m3ua-sgp-aspsm-i-004 \
m3ua-sgp-aspsm-o-001 \
m3ua-sgp-aspsm-o-003 \
m3ua-sgp-aspsm-o-004 \
m3ua-sgp-asptm-v-001 \
m3ua-sgp-asptm-v-003 \
m3ua-sgp-asptm-v-006 \
m3ua-sgp-asptm-v-008 \
m3ua-sgp-asptm-v-010 \
m3ua-sgp-asptm-v-011 \
m3ua-sgp-asptm-i-001 \
m3ua-sgp-asptm-i-004 \
m3ua-sgp-asptm-i-005 \
m3ua-sgp-asptm-i-006 \
m3ua-sgp-asptm-i-008 \
m3ua-sgp-asptm-i-010 \
m3ua-sgp-asptm-o-001 \
m3ua-sgp-asptm-o-003 \
m3ua-sgp-mtr-v-002-alternate \
m3ua-sgp-mtr-v-003-alternate \
m3ua-sgp-mtr-i-001 \
m3ua-sgp-mtr-i-002 \
m3ua-sgp-mtr-i-003 \
m3ua-sgp-rkm-v-001 \
m3ua-sgp-rkm-v-002 \
m3ua-sgp-rkm-v-003 \
)
foreach testcase ($testcases)
(runm3uatest -t $timeout $testcase > /dev/tty) >& /dev/null
sleep $sleeptime
end

2
m3ua-test/start.sh Executable file
View File

@ -0,0 +1,2 @@
#!/bin/sh
docker run --network sigtran --ip 172.18.0.2 -it m3ua-test

View File

@ -0,0 +1,31 @@
FROM debian-jessie-build
MAINTAINER Harald Welte <laforge@gnumonks.org>
COPY Release.key /tmp/Release.key
RUN apt-key add /tmp/Release.key && \
rm /tmp/Release.key && \
echo "deb http://download.opensuse.org/repositories/network:/osmocom:/nightly/Debian_8.0/ ./" > /etc/apt/sources.list.d/osmocom-nightly.list
RUN apt-get update && apt-get install -y \
libosmocore-dev \
libosmo-netif-dev \
libsctp-dev
WORKDIR /tmp
RUN git clone git://git.osmocom.org/libosmo-sccp.git && \
cd libosmo-sccp && \
autoreconf -fi && \
./configure && \
make -j8 install && \
ldconfig
VOLUME /data
COPY osmo-stp.cfg /data/
CMD /usr/local/bin/osmo-stp -c /data/osmo-stp.cfg
EXPOSE 2905 14001 4239

View File

@ -0,0 +1,20 @@
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1.4.5 (GNU/Linux)
mQENBFJBt/wBCADAht3d/ilNuyzaXYw/QwTRvmjyoDvfXw+H/3Fvk1zlDZoiKPPc
a1wCVBINUZl7vYM2OXqbJwYa++JP2Q48xKSvC6thbRc/YLievkbcvTemf7IaREfl
CTjoYpoqXHa9kHMw1aALDm8CNU88jZmnV7v9L6hKkbYDxie+jpoj7D6B9JlxgNJ4
5dQyRNsFGVcIl4Vplt1HyGc5Q5nQI/VgS2rlF/IOXmhRQBc4LEDdU8R2IKnkU4ee
S7TWanAigGAQhxGuCkS39/CWzc1DhLhjlNhBl/+RTPejkqJtAy00ZLps3+RqUN1Y
CU/Fsr7aRlYVGqQ/BlptwV0XQ2VVYJX2oEBBABEBAAG0MG5ldHdvcmsgT0JTIFBy
b2plY3QgPG5ldHdvcmtAYnVpbGQub3BlbnN1c2Uub3JnPokBPAQTAQIAJgUCVlbg
vgIbAwUJCDPYwgYLCQgHAwIEFQIIAwQWAgMBAh4BAheAAAoJEGLrGgkXKA3fKpsH
+wcLqrk927aVs37n8xHHUpLCPiB215zB1p/uS/ZJtWuvY17caZX9kCIkQJhlVfyH
ObUJOiJkllAHhbybsCCAShB2COyf9q78y/x9hx2VMOI0nSznowuk5CYnWB3NNd/y
jC+FKw2Q+6+WRoODYodQPgCaBGp9Ptl2MFUots+NnMzhxlDUWL14WG7D/4IqK5TW
IJRrk4YCDtcl5jx9Zt2evf99CqJqZg+GsfESzd4reHjJBokHqz5wOXTGuOpJroAZ
KPztGvm/ltA3qYfZy6rlREpTE/GQxeXv6c8w+Zz82CeDYouzArTEr4qc+RD36TZt
IUpbkm7ZOzHDFrLNx/1YCv6IRgQTEQIABgUCUkG3/AAKCRA7MBG3a51lIzhdAJ9v
d6XPffMZRcCGgDEY5OaTn/MsCQCgrXbeZpFJgnirSrc8rRonvzYFiF4=
=XdMN
-----END PGP PUBLIC KEY BLOCK-----

View File

@ -0,0 +1,48 @@
!
! osmo-stp (0.0.6.3.179-b248) configuration saved from vty
!!
!
log stderr
logging filter all 1
logging color 1
logging print category 1
logging timestamp 0
logging level all everything
logging level lglobal notice
logging level llapd notice
logging level linp debug
logging level lmux notice
logging level lmi notice
logging level lmib notice
logging level lsms notice
logging level lctrl notice
logging level lgtp notice
logging level lstats notice
logging level lgsup notice
logging level loap notice
logging level lss7 debug
logging level lsccp debug
logging level lsua debug
logging level lm3ua debug
!
line vty
no login
!
cs7 instance 0
asp asp0 0 2905 m3ua
remote-ip 172.18.0.2
asp asp-s-0 0 14001 sua
remote-ip 172.18.0.3
as as0 m3ua
asp asp0
routing-key 23 0.2.7
as as-s-0 sua
asp asp-s-0
routing-key 24 0.3.0
route-table system
update route 0.2.7 0.2.7 linkset as0
update route 0.3.0 0.3.0 linkset as-s-0
listen m3ua 2905
local-ip 172.18.0.200
listen sua 14001
local-ip 172.18.0.200

2
osmo-stp-master/start.sh Executable file
View File

@ -0,0 +1,2 @@
#!/bin/sh
docker run --network sigtran --ip 172.18.0.200 -it osmo-stp-master

13
sigtran-tests/Dockerfile Normal file
View File

@ -0,0 +1,13 @@
FROM debian-jessie-build
MAINTAINER Harald Welte <laforge@gnumonks.org>
RUN apt-get update && apt-get -y install \
guile-2.0 guile-2.0-dev gnulib libsctp-dev tcsh
RUN cd /tmp && git clone https://github.com/nplab/guile-sctp && \
cd guile-sctp && \
./bootstrap && \
./configure && \
make && \
make install

View File

@ -0,0 +1,23 @@
From f3a0f7543e8bf36a80d22a7928a4e8c1d91e81ff Mon Sep 17 00:00:00 2001
From: Harald Welte <laforge@gnumonks.org>
Date: Mon, 17 Apr 2017 10:37:17 +0200
Subject: [PATCH 1/2] Fix copy+paste mistake from m3ua in runner script
---
run-some-sua-sgp-tests | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/run-some-sua-sgp-tests b/run-some-sua-sgp-tests
index df222f6..7086977 100755
--- a/run-some-sua-sgp-tests
+++ b/run-some-sua-sgp-tests
@@ -31,5 +31,5 @@ set timeout = 10
set testcases = ( )
foreach testcase ($testcases)
- (runm3uatest -t $timeout $testcase > /dev/tty) >& /dev/null
+ (run-sua-test -t $timeout $testcase > /dev/tty) >& /dev/null
end
--
2.11.0

View File

@ -0,0 +1,35 @@
From 1da5c06540daf6223eed3a8bc2b0aa0ac4a0182b Mon Sep 17 00:00:00 2001
From: Harald Welte <laforge@gnumonks.org>
Date: Mon, 17 Apr 2017 10:37:44 +0200
Subject: [PATCH 2/2] port "guile executable path" hack for non-macos from
m3ua-testtool
I think it's a bad idea to make assumptions where the executalbe of the
guile interpreter lives, but in any case, let's at least make
m3ua-testtool and sua-testtool behave consistently here.
---
run-sua-test.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/run-sua-test.c b/run-sua-test.c
index 9b49891..f8a4e36 100644
--- a/run-sua-test.c
+++ b/run-sua-test.c
@@ -97,9 +97,11 @@ main(int argc, char *argv[]) {
}
if ((pid = fork()) == 0) {
- execlp("/usr/local/bin/guile", "guile",
- "-c", command,
- (char *)0);
+#if defined(__APPLE__) || defined(__FreeBSD__)
+ execlp("/usr/local/bin/guile", "guile", "-c", command, NULL);
+#else
+ execlp("/usr/bin/guile", "guile", "-c", command, NULL);
+#endif
fprintf(stderr, "%s\n", "Couln't start guile.");
}
printf("Test %-40.40s ", argv[optind]);
--
2.11.0

24
sua-test/Dockerfile Normal file
View File

@ -0,0 +1,24 @@
FROM sigtran-tests
MAINTAINER Harald Welte <laforge@gnumonks.org>
COPY *.patch /tmp/
RUN git config --global user.email "nobody@localhost" && \
git config --global user.name "Docker Container"
RUN cd /tmp && git clone https://github.com/nplab/sua-testtool && \
cd sua-testtool && \
git am /tmp/*.patch && \
cc -o run-sua-test run-sua-test.c && \
cp run-sua-test /usr/local/bin/
COPY dotguile /root/.guile
RUN mkdir /data
VOLUME /data
COPY sua-param-testtool-sgp.scm run-some-sua-sgp-tests /data/
CMD /data/run-some-sua-sgp-tests

35
sua-test/dotguile Normal file
View File

@ -0,0 +1,35 @@
;;;
;;; Copyright (c) 2011 Michael Tuexen
;;; All rights reserved.
;;;
;;; Redistribution and use in source and binary forms, with or without
;;; modification, are permitted provided that the following conditions
;;; are met:
;;; 1. Redistributions of source code must retain the above copyright
;;; notice, this list of conditions and the following disclaimer.
;;; 2. Redistributions in binary form must reproduce the above copyright
;;; notice, this list of conditions and the following disclaimer in the
;;; documentation and/or other materials provided with the distribution.
;;;
;;; THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
;;; ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
;;; IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
;;; ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
;;; FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
;;; DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
;;; OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
;;; HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
;;; LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
;;; OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
;;; SUCH DAMAGE.
;;;
;;; $Id: dotguile,v 1.1 2011/03/20 16:48:30 tuexen Exp $
;;; Change the following line to reflect where the files are located.
(define dir "/tmp/sua-testtool/")
(define files (list "common.scm"
"sua.scm"
"sua-asp-tests.scm"
"sua-sgp-tests.scm"))
(map (lambda (file) (load-from-path (string-append dir file))) files)
(load-from-path "/data/sua-param-testtool-sgp.scm")

62
sua-test/run-some-sua-sgp-tests Executable file
View File

@ -0,0 +1,62 @@
#!/usr/bin/env csh
#
# Copyright (c) 2011 Michael Tuexen
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
#
# $Id: run-some-sua-sgp-tests,v 1.3 2011/03/20 16:53:06 tuexen Exp $
#
set timeout = 10
set testcases = ( sua-sgp-aspsm-v-01 \
sua-sgp-aspsm-v-02 \
sua-sgp-aspsm-v-03 \
sua-sgp-aspsm-i-01 \
sua-sgp-aspsm-i-02 \
sua-sgp-aspsm-i-04 \
sua-sgp-aspsm-o-01 \
sua-sgp-aspsm-o-02 \
sua-sgp-aspsm-o-03 \
sua-sgp-asptm-v-01 \
sua-sgp-asptm-v-02 \
sua-sgp-asptm-v-04 \
sua-sgp-asptm-v-05 \
sua-sgp-asptm-v-06 \
sua-sgp-asptm-v-07 \
sua-sgp-asptm-i-01 \
sua-sgp-asptm-i-03 \
sua-sgp-asptm-i-04 \
sua-sgp-asptm-i-05 \
sua-sgp-asptm-i-06 \
sua-sgp-asptm-i-08 \
sua-sgp-asptm-o-01 \
sua-sgp-asptm-o-02 \
sua-sgp-mtr-i-01 \
sua-sgp-mtr-i-02 \
sua-sgp-mtr-i-03 \
sua-sgp-mtr-i-04 \
)
foreach testcase ($testcases)
(run-sua-test -t $timeout $testcase > /dev/tty) >& /dev/null
end

2
sua-test/start.sh Executable file
View File

@ -0,0 +1,2 @@
#!/bin/sh
docker run --network sigtran --ip 172.18.0.3 -it sua-test

View File

@ -0,0 +1,110 @@
;;;
;;; Copyright (c) 2011 Michael Tuexen
;;; All rights reserved.
;;;
;;; Redistribution and use in source and binary forms, with or without
;;; modification, are permitted provided that the following conditions
;;; are met:
;;; 1. Redistributions of source code must retain the above copyright
;;; notice, this list of conditions and the following disclaimer.
;;; 2. Redistributions in binary form must reproduce the above copyright
;;; notice, this list of conditions and the following disclaimer in the
;;; documentation and/or other materials provided with the distribution.
;;;
;;; THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
;;; ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
;;; IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
;;; ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
;;; FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
;;; DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
;;; OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
;;; HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
;;; LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
;;; OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
;;; SUCH DAMAGE.
;;;
;;; $Id: sua-param-testtool-sgp.scm,v 1.2 2011/03/21 22:18:29 tuexen Exp $
;;; Define a transport address of the system under test
(define sut-addr "172.18.0.200")
(define sut-port sua-port)
(define sut-port-1 sua-port)
(define sut-port-2 (1+ sua-port))
;;; Define the transport address of the tester
(define tester-addr "172.18.0.3")
(define tester-port 0)
(define tester-port-1 3000)
(define tester-port-2 3001)
;;; Define the point code of the SUT
(define sut-pc 1)
;;; Define the SSN of the SUT
(define sut-ssn 3)
;;; Define the point code of the tester
(define tester-pc 24)
(define tester-pc-1 100)
(define tester-pc-2 101)
(define tester-invalid-pc 102)
(define tester-unauthorized-pc 103)
(define tester-unprovisioned-pc 104)
;;; Define the SSN of the tester
(define tester-ssn 3)
;;; Define correlation id
(define correlation-id 1)
;;; Define network appearance
(define network-appearance 1)
(define invalid-network-appearance 2)
;;; Define an routing context
(define tester-rc-valid 1)
(define tester-rc-valid-1 1)
(define tester-rc-valid-2 2)
;;; Define an invalid routing context
(define tester-rc-invalid 3)
;;; Define an asp-identifier
(define asp-id 1)
(define asp-id-1 1)
(define asp-id-2 2)
(define sccp-test-message (list))
;;; Define traffic-type-mode
(define traffic-mode sua-traffic-mode-type-override)
;(define traffic-mode sua-traffic-mode-type-loadshare)
;;;(define traffic-mode sua-traffic-mode-type-broadcast)
(define asp-up-message-parameters (list))
;;; (define asp-up-message-parameters (list (sua-make-asp-id-parameter asp-id)))
;;;asp-up-message-parameters
(define asp-active-message-parameters (list))
;;;(define asp-active-message-parameters (list (sua-make-traffic-mode-type-parameter traffic-mode)
;;; (sua-make-routing-context-parameter (list tester-rc-valid))))
;;;asp-active-message-parameters
(define asp-active-ack-message-parameters (list))
;;;(define asp-active-ack-message-parameters (list (sua-make-traffic-mode-type-parameter traffic-mode)
;;; (sua-make-routing-context-parameter (list tester-rc-valid))))
;;;asp-active-ack-message-parameters
(define asp-inactive-message-parameters (list))
;;;(define asp-inactive-message-parameters (list (sua-make-traffic-mode-type-parameter traffic-mode)
;;; (sua-make-routing-context-parameter (list tester-rc-valid))))
;;;asp-inactive-message-parameters
(define asp-inactive-ack-message-parameters (list))
;;;(define asp-inactive-ack-message-parameters (list (sua-make-routing-context-parameter (list tester-rc-valid))))
;;;asp-inactive-ack-message-parameters
(define data-message-parameters (list))
;;;(define data-message-parameters (list (sua-make-network-appearance-parameter network-appearance)
;;; (sua-make-routing-context-parameter (list tester-rc-valid))))
;;;data-message-parameters