Commit
c4328a5457001987aef39943fd638cca1079c5e9
by Pau Espin Pedrol
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.
Commit
1498eeedb4c59c84d0c692c211872f29f606dc87
by Pau Espin Pedrol
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.
Commit
a3810cfe130b9c29fc16c86aea6dbaa30fa64515
by Pau Espin Pedrol
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.
Commit
cbed7a7f4130fe158e184f1ba318e10b0236ecee
by Pau Espin Pedrol
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.
Commit
bcee2e6ff23e13699cf01fe0eeb8cae97b09a3ae
by Oliver Smith
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.
Commit
7324d47706d4c564acfd2e5ce2b702608791d81d
by Pau Espin Pedrol
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.
Commit
c5c4961ea578692d07df43e3e8174e7d369bbe04
by Pau Espin Pedrol
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.
Commit
48d4a3510b787753dea547ef2a246582e5fa4f3e
by laforge
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.
Commit
d13980f024e692222105a173930fb53559182b85
by laforge
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.
Commit
2962d17079f26e2d874e82fe019adab34088d270
by laforge
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.
Commit
67c5196f8b7b550d4c598d44333925313d611fa4
by Vadim Yanitskiy
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.
Commit
33dfe43fdc8d2ad320ef7bd742f5611aa5642620
by laforge
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.
Commit
d7531335952fd993f56d7632f8c96bf505c765eb
by Oliver Smith
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.