From 794797c23fac8fce4a72635fd52bf495f98a9d6d Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Fri, 23 May 2025 15:01:05 -0400 Subject: [PATCH] MT#55283 tests for I100d0d0476b Change-Id: I6cc0c1f185f3c159423fc1f4a0977e506bd1343e --- t/Makefile | 8 +- t/auto-daemon-tests-asymmetric.pl | 1701 +++++++++++++++++++++++++++++ 2 files changed, 1707 insertions(+), 2 deletions(-) create mode 100755 t/auto-daemon-tests-asymmetric.pl diff --git a/t/Makefile b/t/Makefile index e34e8f402..1d551366f 100644 --- a/t/Makefile +++ b/t/Makefile @@ -107,7 +107,7 @@ include ../lib/common.Makefile daemon-tests-evs daemon-tests-player-cache daemon-tests-redis daemon-tests-redis-json \ daemon-tests-measure-rtp daemon-tests-mos-legacy daemon-tests-mos-fullband daemon-tests-config-file \ daemon-tests-templ-def daemon-tests-templ-def-offer daemon-tests-t38 daemon-tests-evs-dtx \ - daemon-tests-transform daemon-tests-http daemon-tests-heuristic + daemon-tests-transform daemon-tests-http daemon-tests-heuristic daemon-tests-asymmetric TESTS= test-bitstr aes-crypt aead-aes-crypt test-const_str_hash.strhash ifeq ($(with_transcoding),yes) @@ -150,7 +150,8 @@ daemon-tests: daemon-tests-main daemon-tests-jb daemon-tests-pubsub daemon-tests daemon-tests-templ-def daemon-tests-templ-def-offer \ daemon-tests-sdp-manipulations daemon-tests-sdes-manipulations \ daemon-tests-sdp-orig-replacements daemon-tests-moh daemon-tests-evs-dtx daemon-tests-transform \ - daemon-tests-transcode-config daemon-tests-codec-prefs daemon-tests-http daemon-tests-heuristic + daemon-tests-transcode-config daemon-tests-codec-prefs daemon-tests-http daemon-tests-heuristic \ + daemon-tests-asymmetric daemon-test-deps: tests-preload.so $(MAKE) -C ../daemon @@ -164,6 +165,9 @@ daemon-tests-jb: daemon-test-deps daemon-tests-heuristic: daemon-test-deps ./auto-test-helper "$@" perl -I../perl auto-daemon-tests-heuristic.pl +daemon-tests-asymmetric: daemon-test-deps + ./auto-test-helper "$@" perl -I../perl auto-daemon-tests-asymmetric.pl + daemon-tests-dtx: daemon-test-deps ./auto-test-helper "$@" perl -I../perl auto-daemon-tests-dtx.pl diff --git a/t/auto-daemon-tests-asymmetric.pl b/t/auto-daemon-tests-asymmetric.pl new file mode 100755 index 000000000..a5f15c4315 --- /dev/null +++ b/t/auto-daemon-tests-asymmetric.pl @@ -0,0 +1,1701 @@ +#!/usr/bin/perl + +use strict; +use warnings; +use NGCP::Rtpengine::Test; +use NGCP::Rtpclient::SRTP; +use NGCP::Rtpengine::AutoTest; +use Test::More; + + +autotest_start(qw(--config-file=none -t -1 -i 203.0.113.1 + -n 2223 -f -L 7 -E)) + or die; + + +my ($sock_a, $sock_b, $sock_c, $sock_d, $sock_e, $port_a, $port_b); + + + + +($sock_a, $sock_b, $sock_c, $sock_d, $sock_e) = new_call( + [qw(198.51.100.1 2010)], # caller + [qw(198.51.100.3 2012)], # callee - from SDP + [qw(198.51.100.3 2032)], # callee - different port + [qw(198.51.100.6 2012)], # callee - different address + [qw(198.51.100.6 2032)], # callee - all different +); + +($port_a) = offer('default, forward', { flags => ['asymmetric'] }, < ['asymmetric'] }, < ['asymmetric'] }, < ['asymmetric'] }, < ['asymmetric', 'strict source'] }, < ['asymmetric', 'strict source'] }, < ['asymmetric', 'strict source'] }, < ['asymmetric', 'strict source'] }, < ['asymmetric'], 'endpoint learning' => 'off' }, < ['asymmetric'], 'endpoint learning' => 'off' }, < ['asymmetric'], 'endpoint learning' => 'off' }, < ['asymmetric'], 'endpoint learning' => 'off' }, < ['asymmetric', 'strict source'], 'endpoint learning' => 'off' }, < ['asymmetric', 'strict source'], 'endpoint learning' => 'off' }, < ['asymmetric', 'strict source'], 'endpoint learning' => 'off' }, < ['asymmetric', 'strict source'], 'endpoint learning' => 'off' }, < ['asymmetric'], 'endpoint learning' => 'heuristic' }, < ['asymmetric'], 'endpoint learning' => 'heuristic' }, < ['asymmetric'], 'endpoint learning' => 'heuristic' }, < ['asymmetric'], 'endpoint learning' => 'heuristic' }, < ['asymmetric', 'strict source'], 'endpoint learning' => 'heuristic' }, < ['asymmetric', 'strict source'], 'endpoint learning' => 'heuristic' }, < ['asymmetric', 'strict source'], 'endpoint learning' => 'heuristic' }, < ['asymmetric', 'strict source'], 'endpoint learning' => 'heuristic' }, <