Skip to content

Changes

Started by Oliver Smith
Started 1 yr 5 mo ago
Queued 6 ms
Took 3 min 7 sec on build4-deb12build-ansible
s1gw: Print idx of component timing out

Change-Id: I354104dd88627a6d15e160d02f5ddf1072745a17
Pau Espin Pedrol at
StatsD_Checker: Allow building without VTY support

Some programs may support exporting to statsd, but may not support the
Osmocom VTY set of commands to send reports, or not have a VTY at all.

The current StatsD_Checker implementation as it is now is not totally
useful without VTY code. a Follow-up patch will provide new APIs and
improved implementation to use it without VTY.

Change-Id: I5421c76e4f303fd16d4db945a1c69910e40ac820
Pau Espin Pedrol at
StatsD_Checker: Simplify by getting rid of StatsDExpectPriv

Get rid of extra record, we have plenty of them and we'll have more once
we add new APIs to work without VTY.
While doing so, simplify the expect loop by maintaining a counter.

Change-Id: Ib14c838c5f0647d050249853327671542182636f
Pau Espin Pedrol at
StatsD_Checker: Allow running without VTY support

New features are added to the public API of StatsD_Checker which make it
possible to use it...

* without "stats reset":
Feature to take snapshots (f_statsd_snapshot()) which can later be
used to validate expectancies with values relative to the snapshot,
using API f_statsd_expect_from_snapshot().
This way, one can do:
"""
var StatsDExpects statsd_exp := { /* relative expectancies here... */ };
var StatsDMetrics statsd_snapshot := f_statsd_snapshot(f_statsd_keys_from_expect(statsd_exp));
/* do some test stuff here changing the state of the IUT... */
f_statsd_expect_from_snapshot(statsd_exp, snapshot := statsd_snapshot);
"""

* without polling ("stats report"), aka with periodict reporting:
New parameter wait_converge in f_statsd_expect(), which allows
overcoming race conditions with StatsD server processing older incoming
metrics due to periodic reporting.
This feature also allows a test to wait until a state changes in the
IUT.

Change-Id: Ie1180a5b674504864309c3b9b11bfcf5256d9178
Pau Espin Pedrol at
s1gw: Initial StatsD support

Change-Id: Ib98c2fe68006a8d0f45de6966927b349a3b933ca
Pau Espin Pedrol at
s1gw: ConnHdlr: Use stats reported by osmo-s1gw to expect PFCP Assoc Setup

Change-Id: I329745125d78786fc9c243f0047cd394de9b16d4
Pau Espin Pedrol at
s1gw: TC_setup: Validate some metrics

Change-Id: Iae629bc9291ff8b6e482f61d692e4d97ff0136bd
Pau Espin Pedrol at
SIP_Emulation: Allow forwarding ASP_SIP_close

This allows closing SIP connections at will from within the test.

Change-Id: If5c6bb0c0d773e0ba18ec28062663bdec751c8c4
Pau Espin Pedrol at
asterisk: Introduce test TC_ims_call_mo_after_tcp_conn_closed

Related: SYS#7067
Change-Id: I90df69b2418557d7001dddee4b6930ebbc58066d
Pau Espin Pedrol at
deps/Makefile: Update titan.TestPorts.SIPmsg to current master

New HEAD contains 1 more commit which fixes a regression introduced in
previous version, which is needed in order to get
Asterisk_Tests.TC_ims_call_mo_after_tcp_conn_closed working fine.

Change-Id: I9962076666706bdb4f6319ddade53d5622236995
Pau Espin Pedrol at
testenv: support obtaining talloc reports

Allow setting vty_port= and vty_host= (default: 127.0.0.1) for SUT
components in testenv.cfg. Pass the values as OSMO_SUT_PORT and
OSMO_SUT_HOST to the testsuite, so ttcn3-tcpdump-stop.sh generates
talloc reports after running test cases.

The next patch will add vty_port/vty_host to existing testenv.cfg files.

I have considered enabling the talloc report only conditionally (e.g.
with a --talloc-report parameter). But previous behavior in
docker-playground was also that we created them unconditionally where
OSMO_SUT_PORT/HOST was set, and they are generated almost instantly so
it did not seem necessary to make this conditionally.

Related: OS#6552
Change-Id: I50a7035f072668ca2ab65de1bc1f194da8b18610
Oliver Smith at
*/testenv.cfg: add vty_port, vty_host

Add these variables, so a talloc report can be obtained after running
test cases.

Closes: OS#6552
Change-Id: I5c0305c5d2ac6ac79dcf01bed8fb9d5beeeb99a6
Oliver Smith at
HTTP_Adapter: Rename s/g_pars/g_http_pars/

The HTTP_Adapter component is a probable candidate to end up as part of
another component extending it, like the Prometheus_Checker coming up
soon.
Since the fields in HTTP_Adapter are available to subclass components,
that means they cannot use the usual "g_pars".
Rename the self-enclosed "g_pars" in HTTP_Adapter to let subclasses use
it.

Change-Id: Ia07cf8717593073a71632e247d7fe0775e66eb13
Pau Espin Pedrol at
Misc_Helpers: Introduce API helper f_str_startswith

Counterpart of f_str_endswith(), this API is usually available in
several programming languages like python, and it's handy to have since
it's usually used and hence dev doesn't need to think on how to
implement it using regexp, etc.

This API will be used in a follow-up patch implementing Prometheus
metrics checker module.

Change-Id: Iad392ac652714a54a25954ea697f082d55772aa8
Pau Espin Pedrol at
Introduce Prometheus_Checker module

This module serves the same purpose as the existing StatsD_Checker.
It will be used in open5gs, which so far exports its metrics using
Prometheus.

Change-Id: Iec5544ba74978918f1bddba12971f69a1824683e
Pau Espin Pedrol at
hss: Initial validation of Prometheus metrics

Requires open5gs b2f56b964133bbe2f6ab07ead4cb62524528fcf7 for HSS
diameter metrics.

Change-Id: I507537c66a031b67518294daa8338f3836a90d6b
Pau Espin Pedrol at
pcrf: Validate Gx metrics

Change-Id: I4eab93f14d45f291c391d9519dc1462508f8a1eb
Pau Espin Pedrol at
cosmetic: Fix same typo in comment in several files

Change-Id: Id59e09b0ac89251175ecee23e7f9d1a058644aa8
Pau Espin Pedrol at
lapdm: remove

In the related patch, lapdm/L1CTL_Test.ttcn has been moved to
bts/BTS_Tests_LAPDm.ttcn. The remaining files in this directory are
unused. Remove them to unclutter the repository a bit.

Related: Ibbc967f0bd9a19ab4bbd17f612654d72cb32d571
Change-Id: I6aae060a5b252d3ab36378da8c721154b3186466
laforge at
upf: remove unused port PFCP from test_CT

Change-Id: Iba31a6aaa9a9ec854ba36956d1b853dcf66a804d
laforge at
hnbgw: move vc_PFCP from ConnHdlr to test_CT

A logical relation between the PFCP emulation component (acting as
the UP function) and its ConnHdlr components is one-to-many.  It's
unusual for the ConnHdlr components to have their own emulation
component, especially when a testcase spawns many of them.  This
renders the dispatch function of the PFCP emulation component useless.

The HNBGW testsuite, which is using the PFCP emulation, does not
spawn more than one ConnHdlr component, so there was no problem
with that so far.  Let's move the PFCP emulation to test_CT, in
order to allow spawning more than one ConnHdlr and to make the
component hierarchy less confusing.

Change-Id: Iaf7a54c674f2dc549572d918beb6f355f48ee700
laforge at
library/PFCP_Emulation: look up by SeqNr and SEID separately

This allows routing of PFCP PDUs without SEID by SeqNr.
An example of such a PDU is the Heartbeat Request.

Change-Id: Ic7912d944e94852a587993708d51439ec90f08cd
laforge at
library/PFCP_Emulation: fix routing of incoming PDUs

Before this patch, the PFCP_Emulation component was unable to route
incoming PDUs properly.  The problem is that the SeqNr and SEID were
neither stored nor updated whem sending outgoing PDUs, and thus
remained unbound all the time.

Change-Id: I8e62471915ab9a917ac960d3078e89669b5ac0ea
laforge at
library/PFCP_Emulation: allow retrieving the Recovery Time Stamp

The Recovery Time Stamp is a mandatory IE for some PDUs, such as:

* Heartbeat Request/Response
* PFCP Association Setup Request/Response

Allow the PFCP_ConnHdlr components to retrieve its value, so that
they can include it in outgoing (and expect in incoming) PDUs.

Change-Id: I23eb2b4e309460f93183df83cdd35e46a93fbb94
laforge at
s1gw: rework f_pfcp_wait_assoc_setup() into f_ConnHdlr_pfcp_expect()

Generalize this function, so that it can be used to expect any
PFCP PDUs, not just the Association Setup.

Change-Id: If691cb9df72672eddfbafdd8e03ae09c81b1ce71
Vadim Yanitskiy at
s1gw: cache PFCP Recovery Timestamp in ConnHdlr

Change-Id: I71f1473b52c893245b70ef67599a2f33569c37dd
Vadim Yanitskiy at
s1gw: send the actual Recovery Time Stamp

Change-Id: I350d28289526d8264ef9b70e796ef76ee7fcbb4b
Vadim Yanitskiy at
s1gw: move t_ConnHdlrPars back to S1GW_Tests

This is a partial revert of 956bf05e7, which moved the t_ConnHdlrPars
from module S1GW_Tests to S1GW_ConnHdlr and added f_new_ConnHdlrPars().

The problem is that we want to assign module parameter values to
some fields of the ConnHdlrPars record, but TTCN-3 does not allow
to access module parameters of one module from another.  Having to
add more and more parameters to the proxy function
f_new_ConnHdlrPars() is highly inconvenient.

Change-Id: Ibc34d0219a616a239c0595e61a783f18fbc91b36
Related: 956bf05e7 "s1gw: Initial StatsD support"
Vadim Yanitskiy at
s1gw: add TC_pfcp_heartbeat

Change-Id: Iadb24c2c346a62aa8b59d24475e71f683fc3dfe6
Vadim Yanitskiy at
library/s1ap: add more E-RAB related templates

Change-Id: I57df78e72bd2b070a6222c87f6faf4930bf1bdc5
Vadim Yanitskiy at
library/PFCP_Templates: add missing receive templates

Change-Id: I534d23c4463f9de86bcc0a03b969f22f291ef8c1
Vadim Yanitskiy at
testenv: on crash, wait until test stopped

When the IUT (or other test component) crashes, wait until
ttcn3-tcpdump-stop.sh has closed the pcap, as otherwise the last
buffered data may be lost.

Add a timeout of 2 minutes in case the test doesn't stop on its own.

I considered making this feature optional, but impatient users can still
immediately kill everything with ^C.

Change-Id: If49263869b1d46103813e9d06deff47f8ba72896
laforge at
testenv: display current test name on ^C

When running a whole testsuite and getting a lot of output, it can be
useful to know which test was currently running when pressing ^C. Now
that we have a function that provides this information, show it to the
user.

Change-Id: I2eb639f47440447ac71027956b9c234323565956
laforge at
library/PFCP_Templates: fix missing fields in {ts,tr}_PFCP_Session_Est_Resp

Change-Id: Ib0887f1150f87746f9048f2944cd18c65224a4c7
Vadim Yanitskiy at
library/s1ap: fix formatting in ts_S1AP_RABSetupItemCtxtSURes

Change-Id: Ie6a367841a927ee0b542ccff2d6eb4ab9e51ca12
Vadim Yanitskiy at
sgsn/SGSN_Tests: remove a superfluous/wrong comment

Change-Id: Ib1cdea68e534bcf33aaeb8635d85f1f02cacb148
lynxis at
asterisk: TC_ims_reregistration: Expect re-register using existing ipsec ctx

Change-Id: I8d100dbba6cddfa5f31437c9cdc8c48f1bbd5701
Pau Espin Pedrol at
testenv: get coredump + backtrace on crash

If the SUT or another test component crashes, check if a matching
coredump was registered in coredumpctl. If that is the case, then copy
it into the testdir and print + store the backtrace.

This solves the problem that it is especially tricky to get a good
backtrace when a component crashes inside a container. One needs to
grab the coredump from the host (usually handled by systemd-coredump,
we cannot override /proc/sys/kernel/core_pattern for containers so it
can't be handled in the container), then put the coredump into the
container and finally run gdb to get the backtrace inside the container
(where proper libraries and debug symbols are). This patch automates all
of these steps.

Pau requested this feature.

Related: OS#6494
Change-Id: I743c20968bda9b6d6fb9c2d23bef70ee11950761
Oliver Smith at