neels has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36466?usp=email )


Change subject: fix MGCP_Test.TC_one_crcx_loopback_rtp_implicit expectations
......................................................................

fix MGCP_Test.TC_one_crcx_loopback_rtp_implicit expectations

osmo-mgw should not respond to unknown peers. The test expected the
wrong thing, because of an old hack for 3G voice. Fix that.

Related: OS#6424
Change-Id: Ibe2ee59d1ed2c25ffef7e8534c172ac190b4983d
---
M mgw/MGCP_Test.ttcn
1 file changed, 29 insertions(+), 5 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks 
refs/changes/66/36466/1

diff --git a/mgw/MGCP_Test.ttcn b/mgw/MGCP_Test.ttcn
index 3161079..7090b34 100644
--- a/mgw/MGCP_Test.ttcn
+++ b/mgw/MGCP_Test.ttcn
@@ -1931,11 +1931,22 @@

                stats := f_rtpem_stats_get(RTPEM[0]);

-               if (stats.num_pkts_tx != stats.num_pkts_rx) {
-                       setverdict(fail);
-               }
-               if (stats.bytes_payload_tx != stats.bytes_payload_rx) {
-                       setverdict(fail);
+               if (one_phase) {
+                       /* osmo-mgw knows both local and remote RTP address. 
Expect all packets to be reflected. */
+                       if (stats.num_pkts_tx != stats.num_pkts_rx) {
+                               setverdict(fail);
+                       }
+                       if (stats.bytes_payload_tx != stats.bytes_payload_rx) {
+                               setverdict(fail);
+                       }
+               } else {
+                       /* osmo-mgw knows only the local RTP address. Expect no 
packets to be reflected. */
+                       if (stats.num_pkts_rx > 0) {
+                               setverdict(fail, "stats.num_pkts_rx=", 
stats.num_pkts_rx, ": osmo-mgw should not send RTP packets to an arbitrary 
peer");
+                       }
+                       if (stats.bytes_payload_rx > 0) {
+                               setverdict(fail);
+                       }
                }

                f_rtpem_stats_err_check(stats);

--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36466?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: Ibe2ee59d1ed2c25ffef7e8534c172ac190b4983d
Gerrit-Change-Number: 36466
Gerrit-PatchSet: 1
Gerrit-Owner: neels <[email protected]>
Gerrit-MessageType: newchange

Reply via email to