Commit Graph

144 Commits

Author SHA1 Message Date
Philipp Maier cd756ed891 MGCP_Test: use constants to predefine RTP payloads
The function f_TC_amr_x_x_rtp_conversion() is called with RTP payload
octetstrings in the parameter list. Lets define constants for those
octetstrings so that it is better visible which RTP payload is which.

Change-Id: I7efc22e2f8a941e36200dda7841089e6c97185c6
2023-02-27 10:06:57 +00:00
Philipp Maier 8ed48c5316 MGCP_Test: Test ts101318 rfc5993 conversation with fmtp
The MGW now supports explicit HR GSM RTP format announcement via
SDP/fmtp. Lets add a testcase for this.

Depends. osmo-mgw.git Idde8da27fd335dc03b8fbd9e0fedc1491b77e9e4
Change-Id: If562955e7ae73b15dc3c4d742404741e20e31827
Related: OS#5688

Change-Id: I14421f780c4ef9e4c7e91182154070617852e957
2023-02-27 10:06:57 +00:00
Philipp Maier 465115e777 MGCP_Test: reject empty fmtp strings
When setting up an RTP flow the fmtp string is checked using isvalue(),
however this does not guard against empty fmtp strings. Rejecting empty
strings is especially useful in situations where the caller wants to
signal using "" that no fmtp string is present.

Change-Id: I2641a52a3b271681f4f2e424c34be12e125092d6
Related: OS#5688
2023-02-13 09:59:32 +00:00
Oliver Smith 871f45a54e mgw: new test TC_two_crcx_mdcx_and_rtp_clearmode
Add a test that uses SDP CLEARMODE towards the MGW. The SDP parameters
generated by the test look as expected when compared to RFC 4040
section 5.

Related: OS#4395
Related: https://www.rfc-editor.org/rfc/rfc4040#section-5
Change-Id: I89c5dfdcd728ab3b50e77c5062f07e1b802b1f01
2023-01-24 17:50:29 +01:00
Oliver Smith 3cfa2cce75 mgw: f_tc_two_crcx_mdcx_and_rtp: add arguments
Add arguments for codec_name and payload_type.

Related: OS#4395
Change-Id: I94d1628470db49c53eda64c29bc0716bcb339798
2023-01-24 16:46:59 +01:00
Philipp Maier e5af8a3576 MGCP_Test: ensure PT translation works when converting AMR bwe/oa
The tests that test the conversion from AMR octet-aligned to AMR
bandwith-efficient use the same payload type number on both ends. This
does match the reality. Typically the BSS uses 96 as payload type
internally, while 3gpp specifies a payload type of 112 on the link
between BSS and CN. To reflect those conditions in the test as well,
lets use 96 on one RTP end and 112 on the other.

This also increses the test coverage as we now test if PT translation
and bwe/oa conversion work together.

Change-Id: Id734b6954098130bba02f8cdf1b06e0080c3e915
Related: OS#5461
2023-01-19 13:45:42 +00:00
Pau Espin 262584764f mgw: Introduce test to validate Osmux<->RTP-AMR-BWE
Related: SYS#6161
Change-Id: I974e265938da15639acae7e2c9c589d5784ae5c5
2022-10-26 11:16:14 +02:00
Pau Espin cec73acdd4 mgw: Update to contain similar config from docker-playground.git
Change-Id: I2aa4d86e548d6644f1dd9358f6b8b48a19c96c3c
2022-10-11 21:22:16 +02:00
Pau Espin f369983975 mgw: Fix f_two_crcx_mdcx_and_rtp_osmux()
Previously the test was starting to count Osmux packets too early.
Now that osmux conn state has been improved in osmo-mgw [1], Osmux
Rx packets are not forwarded until the conn is completely configured
through MGCP, hence first osmux packets snet by our async emulation
are dropped.
So we must start counting the transmitted valid osmux packets according
to what the test says, when the full conn is set up.

[1] osmo-mgw.git Change-Id I7654ddf51d197a4107e55f4e406053b2e4a02f83.

Related: SYS#5987
Change-Id: I7efd87bbbda2ffa8fd0c5a64658d42edd0f30857
2022-10-11 21:22:16 +02:00
Pau Espin 982b979170 mgw: Remove hack in f_two_crcx_mdcx_and_rtp_osmux() no longer needed
Since osmo-mgw.git 2177919edb3bc0dd308be388272486ffd97f4761, osmo-mgw can handle
properly conns containing a different remote and local CID.
Hence this hack can be dropped.

Related: SYS#5987
Change-Id: I531631d716581f68c11d3c0b07fc6755a822a0d3
2022-10-11 21:22:16 +02:00
Pau Espin 787e2e4292 mgw: Introduce test TC_crcx_osmux_257
Related: SYS#5987
Change-Id: I74e6c760e076fe2547b6297a54524255fb8b
2022-10-11 21:22:09 +02:00
Pau Espin e792887fbb mgw: Avoid hardcoding in test the amount of endpoints configured in osmo-mgw
Some tests require to match what's configured in osmo-mgw.
Let's make it possible to change it through a module parameter.
This will be needed for a follow-up patch to test >256 concurrent osmux
conns, which will require increasing the number of configured endpoints
above that value.

Change-Id: Ia1e5a0b59ba7c49e97c2cf7ee7a009f3827cf36d
2022-10-07 12:45:18 +02:00
Pau Espin db1e068161 mgw: Log osmux stats in f_two_crcx_mdcx_and_rtp_osmux()
Change-Id: I2122e086f828a44ddf1c285e11a1eb79759ae989
2022-10-07 12:45:18 +02:00
Pau Espin 779e4a79af mgw: Rename osmux RtpFlowData fields to clarify them
Change-Id: I64b4060706a321bc1f5e46d791035e6d85fa8e1e
2022-10-07 12:44:42 +02:00
Pau Espin a990b1bb60 mgw: Set osmux bind-ip(-v6) VTY configs
Until now we forgot to properly configure the osmux socket local ip, but
that was fine because 0.0.0.0 was taken as a default.
With addition of IPv6, this changed, and the socket is not bound unless
an IP address is set (to allow conditional use of IPv4, IPv6 or both).

Depends: osmo-mgw.git Change-Id I446cd7da217e9f4a74995d7784ae55dcc60a29b7
Change-Id: I4e0ea11ae7e55da600aec56bebf694f3ba0f7b72
2022-10-04 18:21:47 +02:00
Pau Espin 71ed463957 Move AMR defintions out of OSMUX_Types to its own file
This way they can be used without the need to import OSMUX related
modules.

Change-Id: I0edfbb7359516ba77180afab18c3e1ffb2d0c927
2022-09-07 10:46:17 +02:00
Neels Hofmeyr 13b83db5db update various expected-results.xml
Change-Id: I850b79526145307246bca40c70ed8e4d586d8c68
2022-08-12 02:31:23 +00:00
Philipp Maier 13aff99872 MGCP_Test: add testcase TC_e1_dlcx_wildcarded
We are currently testing the behaviour of wildcarded DLCX on the virtual
trunk. Lets run a similar test on the E1 trunk as well.

Change-Id: I6cfbd24982d1e72206f8237b2eaea52cdaebf9dc
Related: OS#5572
2022-07-11 19:14:59 +00:00
Philipp Maier 6c740e8d52 MGCP_Test: fix TC_dlcx_wildcarded
When the final condition of the testcase is verified through statsd,
there may be still (invalid) data from a previous measurement in the
statsd pipeline, querying the stats once before verifying the actual
stats fixes the problem.

Change-Id: I5fe18e433b32c364778b515ed37fcbcf443b3cb3
Related: OS#5572
2022-07-11 19:14:59 +00:00
Pau Espin d7963bb037 mgw: Introduce test TC_two_crcx_mdcx_and_iuup{_rtp}_rfci_unordered
Related: SYS#5969
Change-Id: I2523f18a0fdba87f4e13a2ce3c5da482c4af2e3c
2022-05-26 21:08:16 +00:00
Pau Espin 6ed763001d Allow Setting IuUP_Cfg from test using RTP_Emulation
Change-Id: I4e8296dae40277be51974338bc0d21c939eec149
2022-05-26 18:27:39 +00:00
Pau Espin 2803cd3d7d mgw: Introduce test TC_two_crcx_mdcx_and_iuup_rtp
This test validates we can connect 3G to 2G AMR calls fine.

Change-Id: I3627711d80c5e42d56e478c1c4ff3fb5b27adfdf
2022-01-17 09:11:21 +00:00
Pau Espin a6b9c4ced5 mgw: Introduce test TC_two_crcx_mdcx_and_iuup
Related: OS#1937
Change-Id: I0866fb499c6d426386d9811d075a7fe8386c5cb1
2022-01-05 11:27:16 +01:00
Philipp Maier 1298b09cb4 MGCP_Test: fix TC_dlcx_wildcarded
Due to the migration to a multithreading scheme the timing behavior of
the stats items has slightly changed. There is now a 1 sec update cycle
in which the stats items are regenerated. This means we have to wait 1
sec. before we can query the endpoints.used stats item.

Change-Id: I90613616f9ff85ca59464dfd45d331ed1a54d9c5
Related: OS#5316
2021-11-18 19:10:55 +00:00
Oliver Smith f8fe1329e2 regen_makefile.sh: set executable name explicitly
Set the executable name in each regen_makefile.sh explicitly with -e,
instead of having it set indirectly from the first .ttcn file. Make it
consistent by placing the name on top of each of these files.

Fix for warning:
ttcn3_makefilegen: warning: File `BSC_Tests.ttcn' was given more than once for the Makefile.

Related: OS#5252
Change-Id: I5ed03f8f3ed905483620dc7bae33b617bbb8507f
2021-10-13 11:12:22 +02:00
Oliver Smith 2e0e624060 regen_makefile.sh: files/flags in separate lines
Make all regen_makefile.sh more readable and diff friendly by moving
each entry in FILES and CPPFLAGS_TTCN3 into separate lines. Order
entries alphabetically.

Related: OS#5252
Change-Id: I6b6866eb9f6ec6232e4ae434517457a4c8c1c050
2021-10-12 16:35:01 +02:00
Philipp Maier 3560bd656a MGCP_Test: add control interface to MGW testsuite
The testsuite for osmo-mgw does not use the control interface yet.

Change-Id: I7324802bf6e692ce8b7d9b269dd2385a7d3d0d77
2021-08-19 11:52:23 +02:00
Philipp Maier 2ff3e66bf0 MGCP_Test: do not use module parameter mp_test_ip (statsd)
The module parameter mp_test_ip was added with the following commit:
Change-Id I61e23e264bc85eb36d07431c7839fb445c110947

There is already mp_local_ipv4, which has the same function, so we
should remove mp_test_ip again and use mp_local_ipv4 to set up the
receiving of statsd information.

Change-Id: I70f33aed4102c67118cc6701c2578a70c0dfe604
Related: SYS#5535
2021-08-19 10:58:25 +02:00
Philipp Maier 4268cd372f osmo-mgw.cfg: add missing statsd configuration
The recently added test TC_dlcx_wildcarded depends on statsd information
from osmo-mgw but in the osmo-mgw configuration no statsd is configured.

Change-Id: I35e07a6b1853234559ab4d7e044f3899e8d0a3e8
Related: SYS#5535
2021-08-17 12:14:06 +00:00
Philipp Maier 21c1cffcec MGCP_Test: test DLCX request to non existant endpoint
Since we now support wildcarded DLCX request, which so not necessarly
require a specific endpoint (the trunk is enough). We should also check
what happens when we send a DLCX request to a non existent endpoint. The
situation would be very similar. osmo-mgw will be unable to resolve the
endpoint, but the trunk will be resolved. However eventually the request
is not wildcarded and we expect that osmo-mgw is rejecting it.

Change-Id: I3d8c6f84404c1c95f97f113813528175523d36b8
Related: SYS#5535
2021-08-03 17:16:04 +02:00
Philipp Maier 55b905446c MGCP_Test: upgrade expected behavior for TC_dlcx_wildcarded
The testcase TC_dlcx_wildcarded expect osmo-mgw to reject wildcarded
DLCX requests but osmo-mgw now implements wildcarded DLCX

Depends: osmo-mgw I6d3a74f6087512130d85002348787bffc672de81
Depends: docker-playground I693cc17dbf6836e7a74b34111671b6e589744a63
Change-Id: I61e23e264bc85eb36d07431c7839fb445c110947
Related: SYS#5535
2021-08-03 17:16:04 +02:00
Neels Hofmeyr cb8d9894af update expected-results.xml files
Change-Id: Idcf764cd2d251210bb123d2a5ea782cda0d670b7
2021-07-05 13:11:14 +02:00
Philipp Maier 37965088d5 MGCP_Test: avoid crash in latest (TC_one_crcx_loopback_rtp_implicit)
The testcase TC_one_crcx_loopback_rtp_implicit triggers a bug in older
osmo-mgw version that eventually leads into a crash of osmo-mgw. This
also means that all tests after TC_one_crcx_loopback_rtp_implicit will
also fail. Lets move TC_one_crcx_loopback_rtp_implicit to the end of the
control section to postpone the crash to the very end of the testrun.

Change-Id: I25abf30f8c49e580c46e7a61e887bd0add9a4cd4
Related: OS#5123
2021-06-02 18:54:26 +00:00
Philipp Maier c0ca42d119 MGCP_Test: add testcase TC_one_crcx_loopback_rtp_ipv6
There is an TC_one_crcx_loopback_rtp, an ipv6 variant can be added with
minimal effort.

Change-Id: If16ee5186fa697caa9cc404b7159be054cac5196
2021-05-17 20:32:09 +00:00
Philipp Maier eba70db649 MGCP_Test: fix TC_one_crcx_loopback_rtp_implicit
The testcase TC_one_crcx_loopback_rtp_implicit uses
f_TC_one_crcx_loopback_rtp, which creates the RTP flow with IPv4
addresses but since we do not send a local RTP IP address with the CRCX
to the MGW, the MGW will prefer IPv6, which means that we get an IPv6
address back while the RTP strem is IPv4 on the TTCN3 side.

Related: OS#5123
Change-Id: I80498737d5b32f28b62e0c17cce1969b54af948c
2021-05-17 20:32:09 +00:00
Philipp Maier 1ac1398d9f MGCP_Test: test LOOPBACK with implicit destination addr
Test what happens when the MGW gets a CRCX that creates a connection in
LOOPBACK mode but does not specify an RTP destination address. The MGW
is expected to deduct the destination address from the first incoming
RTP packet and loop it back to its originating address.

Change-Id: I7baf827fb0c3f33e13ccbaffd37ba0eb4e20c304
Related: OS#5123
2021-05-13 18:01:25 +00:00
Harald Welte 317c04f2ad mgw: osmo-mgw config should not try to set DSCP > 63
DSCP is a 6-bit value, it cannot be 184.

Change-Id: I9e023125d42ba350c924f2dd7055e84a1a6564cc
2021-04-28 19:27:37 +02:00
Alexander Couzens 7d8c0e3b35 update expected-results.xml
Change-Id: Ib4399aa488afd917e3eda5e79d56ea3797ef7c78
2021-01-14 21:40:30 +01:00
Neels Hofmeyr 929b406940 update expected results
Change-Id: Icb534a2b00fc48c3ead009a620e6061e595cb581
2020-10-01 06:48:55 +02:00
Pau Espin befd3aaca4 mgw: Introduce test TC_crcx_osmo_ign
Related: SYS#5063
Change-Id: I79415c385e89fe859854430bb20940f078fccea0
2020-09-22 19:32:11 +00:00
Pau Espin 9e0141aa84 mgw: Test IPv6 RTP streams in osmo-mgw
Change-Id: I2a47926757af84ffa190a954aac0dcc5369528b3
2020-09-09 18:13:37 +00:00
Pau Espin db2dc0494e mgw: Test IPv6 addresses in MGCP messages
These tests verify that osmo-mgw handles requests no matter of IP
version used in the remote address.

Change-Id: Ib134dda5a8f7c8f50968b6ce330f9986ae72575d
2020-09-09 13:54:42 +00:00
Pau Espin b604af09ea mgw: Rename IP address module parameter specifying IP version
Change-Id: Ia393d7175de277ec8fa524ba74bf3b150b74c766
2020-09-09 13:54:42 +00:00
Pau Espin 25f47a72dc mgw: Fix using incorrect IP version in TC_one_crcx_receive_only_rtp
Send the remote address to MGW so it knows which IP version to return
during CRCX ACK. This actually better suits the test, since there's less
point in checking whether we receive something if we never pass the
IP/port to MGW. In any case, the "recvonly" should still tell MGW to
refrain from sending stuff to us, so we are really testing that here.

Change-Id: Id3452cecf7fb281e5e46471f7f53983c08c6bfdf
2020-09-09 12:22:42 +00:00
Pau Espin e67b1c64ce mgw: Fix logic in test TC_two_crcx_mdcx_and_rtp_osmux
rtpem should be set to BIDIR at the same time where MDCX "sendrecv" is
sent, otherwise if MGW sends us RTP packets (because we set the conn to
sendrecv) they will be counted incorrectly in
stats[0].num_pkts_rx_err_disabled.

This issue doesn't trigger in current code because the MGW doesn't know
anyway the remote IP address of the other connection until an MDCX is
sent to it. However, if for whatever reason the IP address is known (for
instance because it is set during CRCX, which will be done in next
commits), then RTP messages would be sent and the error counter would
be > 0.

Change-Id: I8f2c4e497e522fc17e5cfe76987f802265c486ab
2020-09-09 12:22:42 +00:00
Pau Espin 89c76d2102 mgw: Fix logic in test TC_two_crcx_mdcx_and_rtp
rtpem should be set to BIDIR at the same time where MDCX "sendrecv" is
sent, otherwise if MGW sends us RTP packets (because we set the conn to
sendrecv) they will be counted incorrectly in
stats[0].num_pkts_rx_err_disabled.

This issue doesn't trigger in current code because the MGW doesn't know
anyway the remote IP address of the other connection until an MDCX is
sent to it. However, if for whatever reason the IP address is known (for
instance because it is set during CRCX, which will be done in next
commits), then RTP messages would be sent and the error counter would
be > 0.

Change-Id: I653eb75439321f9a488dc56dca5d3fc5a8811547
2020-09-09 12:22:42 +00:00
Pau Espin 71387aac71 mgw: Allow setting udp ip/port with wildcard osmux in f_flow_create_osmux()
This will be needed once IPv4+IPv6 support is used, since we want to set
the remote IP addr in CRCX for convinience to get an IP adr from ther
same family during CRCX, while still allowing for testing Osmux CID
wildcard value.

Change-Id: I3abd80b1c0053004aab3d03e09fada1129a59765
2020-09-09 12:22:42 +00:00
Philipp Maier 2609c750d5 MGCP_Test: add E1 related testscases
osmo-mgw recently added support for E1 trunks via libosmoabis. While the
actual E1 plane may be difficult to test, there is some functionality
that can already be tested without having E1 support in TTCN3.

Lets add three testcases:
- TC_e1_crcx_and_dlcx_ep:
  Does a CRCX to an E1 endpoint followed by a DLCX
- TC_e1_crcx_with_overlap:
  Not all E1 endpoint combinations are possible at the same time. This
  test verifies that invalid endpoint combinations are prevented.
- TC_e1_crcx_loopback:
  Opes an E1 endpoint and tests if RTP loopback works (NO E1 traffic
  involved)

Change-Id: I673eeffcb3012b42f039789960c54d99282e1aad
Related: OS#2659
2020-08-12 18:21:49 +00:00
Philipp Maier c60e8477f5 MGCP_Test: fix test expectation in TC_crcx_wildcarded_exhaust
The testcase TC_crcx_wildcarded_exhaust assumes a wrong number of
endpoints. Since osmo-mgw has a wrongly solved off-by-one in its
endpoint allocation it allocates the wrong number of endpoints. This
is now fixed, lets now also fix the test expection.

(The failure of TC_crcx_wildcarded_exhaust also causes
 TC_crcx_dlcx_30ep to fail.)

Depends: Change id I73b31e3c236a61ea0a6f76ef5ff98ce589f52c77
Change-Id: I73344ef8793cc81df0a1815bb8d890e7849cdd20
Related: OS#2659
2020-07-21 09:29:15 +00:00
Philipp Maier 882843dc0f MGCP_Test: fix test vector in TC_amr_oa_bwe_rtp_conversion
The rtp payload test vector in TC_amr_oa_bwe_rtp_conversion is wrong, it
lacks the last byte which should be 0x00. Also the testvector is not
very well chossen since it after BWE conversion the actual payload does
not shrink (even if it looks like if it would because of the 0x00 byte
at the end). Lets pick a better payload from a real world trace that
actually shrinks by one byte when it is converted to BWE and use that
one.

Change-Id: Id4256049bbca49ad5c2eb0579128838ebae062f8
2020-06-02 14:13:57 +02:00