These tests verify that osmo-mgw handles requests no matter of IP
version used in the remote address.
Change-Id: Ib134dda5a8f7c8f50968b6ce330f9986ae72575d
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
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
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
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
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
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
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
The endpoint number of a virtual endpoint must not use leading zeros
but, but the testcase MGCP_Test.TC_crcx_dlcx_30ep does. Lets not do this
as it violates the spec. See also: RFC 3435, section E.3.
Change-Id: I99d2fa76cb60d0d671c9413f3dbd711ec68aeb77
Related: OS#2659
The .cc and the .ttcn file of RTP_CodecPort_CtrlFunct is currently
copied into the mgw directory and then used. However, those files do
exist in the /library folder as well, lets just link them using
gen_links.sh
Change-Id: I14f80051f6a168b7a8155c6e523c085e974b62b5
Latest osmo-mgw release is 1.7.0, so this param is not needed at all.
Furthermore, the config can be moved to .cfg.
Change-Id: I537c0f5fd6f9e18e111c773c0e42e5f1120ce2f4
Some stuff was wrong and some was missing after new features being
implemented in tests over time.
Change-Id: I7a279592a68ffc76408a8e728e76151534265cc0
The testcase TC_ts101318_rfc5993_rtp_conversion tests the RTP packet
format conversion of ts101318 to rfc5993 and vice versa. At the moment
the testcase sends RTP packets in both directions at the same time. In
order to simplify the test and to make race conditions less likely, lets
test both directions separately and add some guard time.
Change-Id: Id9b69587f7fb5f6b0da072ac5f4863fd4111e597
The testcase TC_one_crcx_receive_only_rtp performs a short RTP
transmission that lasts about 1 second. Then it conuts out the number of
packets that are transmitted and checks against a fixed value. The
compare values are determined using experimentation and reflect the
number of bytes/packets that one could expect under normal conditions on
an average machine.
However, there may be load sitations on the test host that may cause that
a too little number of packets is transmitted and the test will fail. Lets
reduce the number a bit as the only thing we want to make sure with this
is that there are at least some (more than one or two) packets transmitted
Change-Id: Ie63445d61268d178940ce8d9cfa984519c42041a
The following testcases are carried out using two bidirectional
connections on one MGW endpoint.
MGCP_Test.TC_amr_oa_bwe_rtp_conversion
MGCP_Test.TC_amr_oa_oa_rtp_conversion
MGCP_Test.TC_amr_bwe_bwe_rtp_conversion
The test is programmed in a way that the TTCN3 side of the RTP emulation
also works in bidirectional mode. This is prone to run into a race
condition when the RX side is activated but the TX side is already
transmitting.
However, in order to test if the RTP format conversion works we do not
need to test both directions at the same time. Its perfectly fine to do
the one direction first and then do the other afterwards. Lets also add
some guard time while switching the RTP flows.
Change-Id: Idf257cfc1ab45a7f0fb6e1a2f6426f1b3145879b
Fix ttcn3-mgw-latest by not running "conn-timeout 0" during f_init_vty
at the start of every test case. The latest osmo-mgw release does not
have that command yet.
Change-Id: I8bbf15baa45679d5812a5a9184520ef9b9e73bba
Some of our files didn't have a copyright notice at all, let's add
it. Also, update the notices in other files and ensure a SPDX
identifier is present in all but the most trivial files.
Change-Id: If7fa19ce484b415bc645e39b3d0d666b44b5f0fd
osmo-mgw now implements a conversion between the AMR octet-aligned
and banwith-efficient payload format. Lets add tests for this
Change-Id: I050bfeabfb5fdbf986d429eef3af69fe8158d56e
depends: osmo-mgw I622c01874b25f5049d4f59eb8157e0ea3cbe16ba
related: SYS#4470
When creating an RTP flow, there is currently no way to set SDP fmtp
parameters. Lets add a template and a parameter in order to be able to
set those parameters.
Change-Id: Ic1840d5023cb3888a17980f4ed08c19175864896
Related: SYS#4470
The MGW recentenly adds support to convert between ts101318 and rfc5993
when GSM-HR is used. Lets add a testcase for that.
depends: osmo-mgw Iceef19e5619f8c92dfa7c8cdecb2e9b15f0a11a1
Change-Id: I96df45fe45b53088e07b26f14173a75498a84143
Related: OS#3807
The MGCP_Test testsuite currenty lacks VTY access capabilities, lets
add them so that future testcases can access the VTY in order to change
options on the fly.
Depends: osmo-ttcn3-hacks Ife949c61156222de3026280071226ef6f5dbd959
Change-Id: If383f81af3306f8f5bdf50152498ae1303d390df
Related: OS#3807
When stopping the test TC_two_crcx_and_unsolicited_rtp the unsolicited
RTP stream is not stopped. As a result it could happen that between
tearing down the other flows and stopping the test an unsolicited RTP
packet is sent to a closed socket.
The resulting ICMP destination unreachable packet translates to a
"Connection refused" error on the sending socket and fails the test.
Avoid this by making sure the unsolicited RTP sender is stopped before
stopping the test.
Change-Id: Ied839596589609e75fa487046a85db48991e4c73
This function can now be called from anywhere to try and safely shutdown
a testcase. It is not optimal as we can't call "all component.stop" from
outside the mtc, but without any proper and orderly shutdown handling of
all our emulation components I believe this is the best we can do.
To use it:
import from Misc_Helpers all;
in your module and then call
Misc_Helpers.f_shutdown(__BFILE__, __LINE__);
You can also pass the function a verdict and a message and it will take care
of calling setverdict, but beware of the following:
While setverdict would accept any number of arguments as log message
and convert them to a log string f_shutdown expects one charstring.
It's possible to use the log2str function to use the log arguments in
setverdict for f_shutdown, for example
setverdict(fail, "Template didn't match: ", tmpl_foo);
would become
Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, log2str("Template didn't match: ", tmpl_foo));
Change-Id: I84d1aa6732f6b748d2bfdeac8f6309023717f267
TC_two_crcx_and_one_mdcx_rtp_ho sometimes failed while trying to send an
RTP packet without a connected port. f_flow_modify re-bind()s the port,
sends the MDCX and then connect()s it after the MDCX ACK returned the
IP/port combination.
If the transmit timer fires off between the bind and connect the
resulting send call will fail.
Change-Id: Idf93ceb830a44dafa56430ab5178f05da6bdd6fb
It is legal that two connections use the same codec but negotiate
different dynamic payload types for both connections. Then the MGW is
expected to receive packets with one PT and send them with the other PT.
This is currently not done in osmo-mgw so the two tests that this commit
adds are expected to fail for now.
- add testcase TC_two_crcx_diff_pt_and_rtp
- add testcase TC_two_crcx_diff_pt_and_rtp_bidir
Change-Id: Ib4606dfc08764410ee9e450949361544adb07cd3
Related: OS#3384
At the moment we check the error counters of the RTP statistics in
the testcases. However, in most situations we will do the check to
make sure that no errors occurred (all counters == 0). Rather than
having a long tail of if statements in the testcases we should have
a function for this. This also makes it much easier in case we add
more error countes lateron.
- add and use function f_rtpem_stats_err_check()
Change-Id: I69e5f80b0765284ec99056ce62c315461967d2a1
Related: OS#3384
When an RTP packet is received, the payload type is not checked,
so we will not detect if the MGW emits packets with a wrong payload
type for some reason.
- Introduce a statistics counter that counts packets with wrong PT
- Update testcases so that they check for the statistics for wrong
PT count.
Change-Id: I83d4b04656a16ced624024245a2fcb7a0ad48a8a
Related: OS#3384
Call mtc.stop after setverdict(fail), add reasons to most failures and
fail with verdict error for internal errors.
Change-Id: I9b618235939fa41160b9be6677b121963d3ec857
At the moment the RTP stream emulation is left in its default
configuration, this means that the payload type that appears in the RTP
stream is always 0. This may mismatch the payload type that is
configured with MGCP.
If nothing else is set, we should make sure that whan we create and modify
flows, the RTP emulation is always reconfigured to use the payload-type that
we set in the flow parameters. The other rtp-emulation parameters should
be set to their defaults.
- Make sure f_flow_modify and f_flow_create set the rtp flow parameters
properly.
Change-Id: Ie888424ac3e0bf0d960b6f071855b6dd43935a0e
Related:OS#3384
The RTP stream tests TC_two_crcx_and_unsolicited_rtp and
TC_two_crcx_and_one_mdcx_rtp_ho, which were introduced recently
with Change-Id I556a6efff0e74aab897bd8165200eec36e46629f, use
hardcoded ip addresses (127.0.0.1) to establish the RTP streams
that are used to test how the MGW reacts on unsolicited packets.
This works fine when everything runs on local host but on docker
it failes since the containers there have different ip-addresses.
- replace hardcoded IP-Addresses with modulepar variable in
TC_two_crcx_and_unsolicited_rtp and TC_two_crcx_and_one_mdcx_rtp_ho
Change-Id: I5af5186f173c2b8564e8034249c82245acdd09f6
Related: OS#2703
The test coverage of the RTP aspects of the MGW is currently very
minima. Lets add a few more testcase to verify RTP behaves as
expected in various situations.
- Add testcase TC_one_crcx_receive_only_rtp:
Test recvonly mode of the MGW. All packets must be absorbed by
the MGW, no packets must come back.
- Add testcase TC_one_crcx_loopback_rtp:
Test loopback mode of the MGW. All packet sent to the MGW must
come back.
- Add testcase TC_two_crcx_and_rtp_bidir:
We already test unidirectional transmissions. This test does
the same as TC_two_crcx_and_rtp but for both directions.
- Add testcase TC_two_crcx_mdcx_and_rtp:
Simulate a typical behaviour of a normal call. First create
two half open connections and complete the connections later
using MDCX.
- Add testcase TC_two_crcx_and_unsolicited_rtp:
Test what happens when a RTP packets from rogue source are mixed
into the RTP stream.
- Add testcase TC_two_crcx_and_one_mdcx_rtp_ho:
Test a typical handover situation. An existing connection is
handovered to another source on one end but the old source will
keep transmitting for a while.
Change-Id: I556a6efff0e74aab897bd8165200eec36e46629f
Closes: OS#2703
The testcase ts_CRCX_no_lco looks at the media attributes to see
if it findes the expected default codec there. In this testcase
we expect PCMU/8000/1 as media attribute, but this is a codec from
the fixed payload type domain. The MGW may not list this info inside
the media attributes. Listing the payload type number in the media
description is sufficient. We should check this instead.
- Remove media attribute check
- Check meida description for PCMU (0)
Change-Id: I69600a1025e68011e8fc5d8bf22d842d9c63bf53
Related: OS#2658
When a CRCX without an LCO option (codec) is sent, then older versions
of osmo-mgw will omit the port number in the SDP part of the response.
Also no default codec is selected and reported back. This testcase
pinpoints the problem.
Change-Id: Ie16cdab936ce468fe378d4ec9e1c61f81c07fb4e
Related: OS#2658
The osmo-mgw now rejects multiple appearances of LCO, the testcase
TC_crcx_illegal_double_lco now passes.
- update expected-results.xml
Change-Id: If4a68e9373b34696236935cce936e9d3c254511b
Related: OS#3119
When sockets cannot be bound or connected, the existing TTCN-3 code prints
the following rather cryptic error messages:
"IPA-CTRL-IPA(47)@f70ff1fd5cfd: Dynamic test case error: Using the value of an optional field containing omit. (Transport endpoint is not connected)"
The "Transport endpoint is not connected" sort-of gives it away, but
let's make it more explicit by introducing explicit checks for the
res.connId and manual setverdict(fail) statements with proper error
message.
Change-Id: Id22a1b5189d81c4fca03d5e7aff60ffdd1ad56bf
'make clean' as generated by ttcn3_makefilegen removes all *.log files, which
of course cleans out expected-results.log, which should not happen. Since this
is a junit XML file, rename the suffix to .xml.
Change-Id: Ic334f6b758eef865e3a497aa430691a3ae696d25
Compare current test results to the expected results, and exit in error on
discrepancies.
Add compare-result.sh: (trivially) grep junit xml output to determine which
tests passed and which didn't, and compare against an expected-result.log,
another junit file from a previous run. Summarize and determine success.
Include an "xfail" feature: tests that are expected to fail are marked as
"xfail", unexpected failures as "FAIL".
In various subdirs, copy the current jenkins jobs' junit xml outputs as
expected-results.log, so that we will start getting useful output in both
jenkins runs and manual local runs.
In start-testsuite.sh, after running the tests, invoke the results comparison.
Due to the single-line parsing nature, the script so far does not distinguish
between error and failure. I doubt that we actually need to do that though.
Related: OS#3136
Change-Id: I87d62a8be73d73a5eeff61a842e7c27a0066079d