| 1 |
# librist. Copyright (c) 2020 SipRadius LLC. All right reserved. |
| 2 |
# SPDX-License-Identifier: BSD-2-Clause |
| 3 |
|
| 4 |
subdir('unit') |
| 5 |
|
| 6 |
extra_sources = ['../../contrib/time-shim.c','../../contrib/pthread-shim.c'] |
| 7 |
|
| 8 |
if filter_obj |
| 9 |
extra_sources += [objcopy_fake_file ] |
| 10 |
endif |
| 11 |
|
| 12 |
|
| 13 |
test_send_receive = executable('test_send_receive', |
| 14 |
'test_send_receive.c', |
| 15 |
extra_sources, |
| 16 |
include_directories: inc, |
| 17 |
link_with: librist, |
| 18 |
dependencies: [ |
| 19 |
threads, |
| 20 |
tools_dependencies, |
| 21 |
stdatomic_dependency |
| 22 |
]) |
| 23 |
|
| 24 |
test_sender_restart = executable('test_sender_restart', |
| 25 |
'test_sender_restart.c', |
| 26 |
extra_sources, |
| 27 |
include_directories: inc, |
| 28 |
link_with: librist, |
| 29 |
dependencies: [ |
| 30 |
threads, |
| 31 |
tools_dependencies, |
| 32 |
stdatomic_dependency |
| 33 |
]) |
| 34 |
|
| 35 |
test_reflector = executable('test_reflector', |
| 36 |
'test_reflector.c', |
| 37 |
extra_sources, |
| 38 |
include_directories: inc, |
| 39 |
link_with: librist, |
| 40 |
dependencies: [ |
| 41 |
threads, |
| 42 |
tools_dependencies, |
| 43 |
stdatomic_dependency |
| 44 |
]) |
| 45 |
|
| 46 |
# issue #188 coverage: listener-side cname re-association. Three |
| 47 |
# modes (plaintext / psk / srp) exercise the SRP-only gate: only an |
| 48 |
# authenticated per-peer SRP session may migrate an existing peer |
| 49 |
# record onto a new source tuple. |
| 50 |
test_nat_port_rebind = executable('test_nat_port_rebind', |
| 51 |
'test_nat_port_rebind.c', |
| 52 |
extra_sources, |
| 53 |
include_directories: inc, |
| 54 |
link_with: librist, |
| 55 |
dependencies: [ |
| 56 |
threads, |
| 57 |
tools_dependencies, |
| 58 |
stdatomic_dependency |
| 59 |
]) |
| 60 |
|
| 61 |
# Security regression guard: a shared-PSK peer that forges the victim's |
| 62 |
# cname must NOT be absorbed into the victim's peer record (cname is not |
| 63 |
# a per-peer secret under PSK). |
| 64 |
test_psk_cname_hijack = executable('test_psk_cname_hijack', |
| 65 |
'test_psk_cname_hijack.c', |
| 66 |
extra_sources, |
| 67 |
include_directories: inc, |
| 68 |
link_with: librist, |
| 69 |
dependencies: [ |
| 70 |
threads, |
| 71 |
tools_dependencies, |
| 72 |
stdatomic_dependency |
| 73 |
]) |
| 74 |
|
| 75 |
# Multipath safety: two same-cname bonded paths must not be merged by |
| 76 |
# the cname re-association, and a healthy path must not rebind. |
| 77 |
test_multipath_cname = executable('test_multipath_cname', |
| 78 |
'test_multipath_cname.c', |
| 79 |
extra_sources, |
| 80 |
include_directories: inc, |
| 81 |
link_with: librist, |
| 82 |
dependencies: [ |
| 83 |
threads, |
| 84 |
tools_dependencies, |
| 85 |
stdatomic_dependency |
| 86 |
]) |
| 87 |
|
| 88 |
# Multipath safety: one bonded leg rebinds mid-stream while the other |
| 89 |
# stays alive; the survivor must be undisturbed and the stream must not |
| 90 |
# stall. |
| 91 |
test_multipath_leg_rebind = executable('test_multipath_leg_rebind', |
| 92 |
'test_multipath_leg_rebind.c', |
| 93 |
extra_sources, |
| 94 |
include_directories: inc, |
| 95 |
link_with: librist, |
| 96 |
dependencies: [ |
| 97 |
threads, |
| 98 |
tools_dependencies, |
| 99 |
stdatomic_dependency |
| 100 |
]) |
| 101 |
|
| 102 |
# Dynamic RTT-based bonded-leg muting (?rtt-drop=): a real two-leg bonded |
| 103 |
# sender must mute a leg whose RTT spikes over the ceiling, reroute payload to |
| 104 |
# the healthy leg, restore on recovery, and never black out the stream. |
| 105 |
test_rtt_mute_bonding = executable('test_rtt_mute_bonding', |
| 106 |
'test_rtt_mute_bonding.c', |
| 107 |
extra_sources, |
| 108 |
include_directories: inc, |
| 109 |
link_with: librist, |
| 110 |
dependencies: [ |
| 111 |
threads, |
| 112 |
tools_dependencies, |
| 113 |
stdatomic_dependency |
| 114 |
]) |
| 115 |
|
| 116 |
# issue #188 coverage: receiver-caller socket rebind on session |
| 117 |
# silence (plaintext + shared-PSK; SRP uses listener-side path). |
| 118 |
test_caller_socket_rebind = executable('test_caller_socket_rebind', |
| 119 |
'test_caller_socket_rebind.c', |
| 120 |
extra_sources, |
| 121 |
include_directories: inc, |
| 122 |
link_with: librist, |
| 123 |
dependencies: [ |
| 124 |
threads, |
| 125 |
tools_dependencies, |
| 126 |
stdatomic_dependency |
| 127 |
]) |
| 128 |
|
| 129 |
test_eap_authenticator_restart = executable('test_eap_authenticator_restart', |
| 130 |
'test_eap_authenticator_restart.c', |
| 131 |
extra_sources, |
| 132 |
include_directories: inc, |
| 133 |
link_with: librist, |
| 134 |
dependencies: [ |
| 135 |
threads, |
| 136 |
tools_dependencies, |
| 137 |
stdatomic_dependency |
| 138 |
]) |
| 139 |
|
| 140 |
|
| 141 |
test_oob_read = executable('test_oob_read', |
| 142 |
'test_oob_read.c', |
| 143 |
extra_sources, |
| 144 |
include_directories: inc, |
| 145 |
link_with: librist, |
| 146 |
dependencies: [ |
| 147 |
threads, |
| 148 |
tools_dependencies, |
| 149 |
stdatomic_dependency |
| 150 |
]) |
| 151 |
|
| 152 |
|
| 153 |
###Sender restart test (bug fix verification) |
| 154 |
test('Sender restart test', test_sender_restart, args: ['5'], suite: ['regression', 'sender']) |
| 155 |
|
| 156 |
###Out-of-band polling read (rist_oob_read) round-trip |
| 157 |
test('OOB polling read Main profile', test_oob_read, |
| 158 |
args: ['1', 'rist://@127.0.0.1:8190', 'rist://127.0.0.1:8190'], |
| 159 |
suite: ['regression', 'oob'], timeout: 60) |
| 160 |
test('OOB polling read Advanced profile', test_oob_read, |
| 161 |
args: ['2', 'rist://@127.0.0.1:8192', 'rist://127.0.0.1:8192'], |
| 162 |
suite: ['regression', 'oob'], timeout: 60) |
| 163 |
|
| 164 |
###issue #188 NAT source-port rebind recovery |
| 165 |
test('NAT port rebind cname re-association (plaintext gate refuses)', test_nat_port_rebind, |
| 166 |
suite: ['regression', 'nat'], timeout: 90) |
| 167 |
test('NAT port rebind cname re-association (psk gate refuses)', test_nat_port_rebind, |
| 168 |
args: ['psk'], suite: ['regression', 'nat'], timeout: 90) |
| 169 |
test('Receiver caller socket rebind on silence (plaintext)', test_caller_socket_rebind, |
| 170 |
suite: ['regression', 'nat'], timeout: 90) |
| 171 |
test('Receiver caller socket rebind on silence (psk)', test_caller_socket_rebind, |
| 172 |
args: ['psk'], suite: ['regression', 'nat'], timeout: 90) |
| 173 |
# PSK cname forgery must not take over an existing peer record. |
| 174 |
test('NAT rebind PSK cname hijack is refused', test_psk_cname_hijack, |
| 175 |
suite: ['regression', 'nat', 'security'], timeout: 90) |
| 176 |
# Two bonded same-cname paths must stay distinct and not rebind. |
| 177 |
test('Multipath same-cname paths stay distinct (psk)', test_multipath_cname, |
| 178 |
suite: ['regression', 'nat', 'multipath'], timeout: 90) |
| 179 |
# RTT-based bonded-leg auto-mute: mute on spike, reroute, restore, guard. |
| 180 |
test('Bonded leg auto-mutes on RTT spike and recovers', test_rtt_mute_bonding, |
| 181 |
suite: ['regression', 'multipath'], timeout: 120) |
| 182 |
if have_srp |
| 183 |
# Positive path: an authenticated SRP caller IS migrated onto the |
| 184 |
# new source tuple after a NAT source-port rebind. |
| 185 |
test('NAT port rebind cname re-association (srp migration)', test_nat_port_rebind, |
| 186 |
args: ['srp'], suite: ['regression', 'nat', 'srp'], timeout: 120) |
| 187 |
# Two bonded SRP paths with the SAME username/password + cname must |
| 188 |
# stay distinct even though the SRP gate lets re-association fire. |
| 189 |
test('Multipath same-cname paths stay distinct (srp)', test_multipath_cname, |
| 190 |
args: ['srp'], suite: ['regression', 'nat', 'multipath', 'srp'], timeout: 120) |
| 191 |
# One bonded SRP leg rebinds mid-stream while the other stays alive. |
| 192 |
test('Multipath one leg rebinds mid-stream (srp)', test_multipath_leg_rebind, |
| 193 |
suite: ['regression', 'nat', 'multipath', 'srp'], timeout: 120) |
| 194 |
# Regression for the EAP-SRP no-rebind bug: an SRP caller whose |
| 195 |
# listener restarts (all session state lost) must reset EAP and |
| 196 |
# re-authenticate on the fresh socket by itself, with no operator |
| 197 |
# intervention. Before the fix the SRP caller was killed and stayed |
| 198 |
# idle forever. |
| 199 |
test('Receiver caller socket rebind on silence (srp)', test_caller_socket_rebind, |
| 200 |
args: ['srp'], suite: ['regression', 'nat', 'srp'], timeout: 120) |
| 201 |
# Regression for the EAP-SRP re-auth lockout after an *authenticator* |
| 202 |
# (listener/hub) restart: the fresh authenticator re-challenges with |
| 203 |
# IDENTITY, but a caller parked in EAP SUCCESS refused it forever, so the |
| 204 |
# hub sat in "Waiting for EAP" and carried 0 packets. Distinct from the |
| 205 |
# silence rebind above (the authenticator is NOT silent here); recovery |
| 206 |
# must come from the identity-request re-auth path. |
| 207 |
test('EAP-SRP caller re-auth after authenticator restart (srp)', test_eap_authenticator_restart, |
| 208 |
suite: ['regression', 'srp'], timeout: 120) |
| 209 |
# Regression for the bonded EAP-SRP sender-leg flap bug (issue #224). |
| 210 |
# A bonded caller's leg is silenced (100% loss both ways) with its |
| 211 |
# interface left UP, so its miface-bound socket persists on the same |
| 212 |
# source tuple; the listener purges the timed-out leg while the other |
| 213 |
# leg keeps the bond alive. When the loss clears the caller must reset |
| 214 |
# EAP and re-authenticate the leg on its own -- before the fix it |
| 215 |
# stayed wedged in stale EAP SUCCESS forever. This needs real |
| 216 |
# interfaces + tc packet loss (a loopback leg has no miface binding and |
| 217 |
# self-heals via a new-port handshake, hiding the bug), so it runs only |
| 218 |
# on Linux as root with netns/tc and cleanly SKIPs (exit 77) otherwise. |
| 219 |
if get_option('built_tools') |
| 220 |
test('Bonded SRP leg re-authenticates after a same-tuple flap (srp, netns)', |
| 221 |
find_program('test_bonded_leg_flap_netns.sh'), |
| 222 |
args: [ristsender_exe, ristreceiver_exe], |
| 223 |
suite: ['netns', 'nat', 'multipath', 'srp'], timeout: 120) |
| 224 |
# Companion: a sub-grace stall must NOT re-auth. Same topology, but a |
| 225 |
# short silence (under the buffer-derived grace) must ride through on |
| 226 |
# the existing session instead of tearing down and re-handshaking. |
| 227 |
test('Bonded SRP leg rides through a sub-grace stall without re-auth (srp, netns)', |
| 228 |
find_program('test_bonded_leg_stall_grace_netns.sh'), |
| 229 |
args: [ristsender_exe, ristreceiver_exe], |
| 230 |
suite: ['netns', 'nat', 'multipath', 'srp'], timeout: 120) |
| 231 |
# A leg muted for high RTT plus its only sibling stalled for silence |
| 232 |
# must not leave the balancer with zero carriers: the receiver must |
| 233 |
# keep getting data on the reinstated leg instead of starving. |
| 234 |
test('Bonded muted+stalled split keeps a carrier (srp, netns)', |
| 235 |
find_program('test_bonded_carrier_never_starved_netns.sh'), |
| 236 |
args: [ristsender_exe, ristreceiver_exe], |
| 237 |
suite: ['netns', 'nat', 'multipath', 'srp'], timeout: 120) |
| 238 |
endif |
| 239 |
endif |
| 240 |
|
| 241 |
###?profile= URL override tests (rist_*_create profile != URL profile) |
| 242 |
test('?profile=2 URL overrides Main to Advanced', |
| 243 |
test_send_receive, |
| 244 |
args: ['1', 'rist://@127.0.0.1:7080?profile=2', 'rist://127.0.0.1:7080?profile=2', '0'], |
| 245 |
suite: ['url-profile', 'advanced', 'unicast', 'server']) |
| 246 |
test('?profile=2 URL overrides Main to Advanced + 10% loss', |
| 247 |
test_send_receive, |
| 248 |
args: ['1', 'rist://@127.0.0.1:7082?profile=2&rtt-max=10&rtt-min=1', 'rist://127.0.0.1:7082?profile=2&rtt-max=10&rtt-min=1', '10'], |
| 249 |
suite: ['url-profile', 'advanced', 'unicast', 'server']) |
| 250 |
test('?profile=1 URL overrides Advanced to Main', |
| 251 |
test_send_receive, |
| 252 |
args: ['2', 'rist://@127.0.0.1:7084?profile=1', 'rist://127.0.0.1:7084?profile=1', '0'], |
| 253 |
suite: ['url-profile', 'main', 'unicast', 'server']) |
| 254 |
test('?profile=2 URL overrides Simple to Advanced', |
| 255 |
test_send_receive, |
| 256 |
args: ['0', 'rist://@127.0.0.1:7086?profile=2', 'rist://127.0.0.1:7086?profile=2', '0'], |
| 257 |
suite: ['url-profile', 'advanced', 'unicast', 'server']) |
| 258 |
|
| 259 |
###Cross-profile interop (TR-06-3 Section 9): mismatched sender/receiver profiles |
| 260 |
### on one flow. Exercises the Advanced sender's Main-Profile fallback (sends |
| 261 |
### Main-conformant media until the peer advertises I=1) and the Advanced |
| 262 |
### receiver's mid-stream framing-transition reset. |
| 263 |
test('Interop - Advanced sender to Main receiver', |
| 264 |
test_send_receive, |
| 265 |
args: ['1', 'rist://@127.0.0.1:7090?profile=1', 'rist://127.0.0.1:7090?profile=2', '0'], |
| 266 |
suite: ['interop', 'advanced', 'main', 'unicast']) |
| 267 |
test('Interop - Advanced sender to Main receiver + 10% loss', |
| 268 |
test_send_receive, |
| 269 |
args: ['1', 'rist://@127.0.0.1:7092?profile=1&rtt-max=10&rtt-min=1', 'rist://127.0.0.1:7092?profile=2&rtt-max=10&rtt-min=1', '10'], |
| 270 |
suite: ['interop', 'advanced', 'main', 'unicast']) |
| 271 |
test('Interop - Main sender to Advanced receiver', |
| 272 |
test_send_receive, |
| 273 |
args: ['2', 'rist://@127.0.0.1:7094?profile=2', 'rist://127.0.0.1:7094?profile=1', '0'], |
| 274 |
suite: ['interop', 'advanced', 'main', 'unicast']) |
| 275 |
test('Interop - Main sender to Advanced receiver + 10% loss', |
| 276 |
test_send_receive, |
| 277 |
args: ['2', 'rist://@127.0.0.1:7096?profile=2&rtt-max=10&rtt-min=1', 'rist://127.0.0.1:7096?profile=1&rtt-max=10&rtt-min=1', '10'], |
| 278 |
suite: ['interop', 'advanced', 'main', 'unicast']) |
| 279 |
|
| 280 |
###Reflector tests |
| 281 |
test('Reflector functionality', test_reflector, suite: ['main', 'reflector'], timeout: 120) |
| 282 |
|
| 283 |
###Simple profile tests |
| 284 |
#Unicast |
| 285 |
test('Simple profile unicast', test_send_receive, args: ['0', 'rist://@127.0.0.1:1234', 'rist://127.0.0.1:1234', '0'], suite: ['simple', 'unicast']) |
| 286 |
test('Simple profile unicast packet loss 10%', test_send_receive, args: ['0', 'rist://@127.0.0.1:2234', 'rist://127.0.0.1:2234', '10'],suite: ['simple', 'unicast']) |
| 287 |
test('Simple profile unicast packet loss 25%', test_send_receive, args: ['0', 'rist://@127.0.0.1:3234', 'rist://127.0.0.1:3234', '25'],suite: ['simple', 'unicast']) |
| 288 |
if (host_machine.system() != 'darwin') |
| 289 |
#Multicast |
| 290 |
test('Simple profile multicast', test_send_receive, args: ['0', 'rist://@239.0.0.1:1236?rtt-max=10&rtt-min=1', 'rist://239.0.0.1:1236?rtt-max=10&rtt-min=1', '0'],suite: ['simple', 'multicast']) |
| 291 |
test('Simple profile multicast packet loss 10%', test_send_receive, args: ['0', 'rist://@239.0.0.2:2236?rtt-max=10&rtt-min=1', 'rist://239.0.0.2:2236?rtt-max=10&rtt-min=1', '10'],suite: ['simple', 'multicast']) |
| 292 |
test('Simple profile multicast packet loss 25%', test_send_receive, args: ['0', 'rist://@239.0.0.3:3236?rtt-max=10&rtt-min=1', 'rist://239.0.0.3:3236?rtt-max=10&rtt-min=1', '25'],suite: ['simple', 'multicast']) |
| 293 |
endif |
| 294 |
|
| 295 |
###Main profile tests: |
| 296 |
#Null Packet Deletion |
| 297 |
test('Main profile NPD receive server mode, sender client mode', test_send_receive, args: ['1', 'rist://@127.0.0.1:3501?rtt-max=10&rtt-min=1', 'rist://127.0.0.1:3501?rtt-max=10&rtt-min=1', '0', '1'], suite: ['main', 'unicast', 'server', 'NPD']) |
| 298 |
test('Main profile NPD receive client mode, sender server mode', test_send_receive, args: ['1', 'rist://127.0.0.1:3502?rtt-max=10&rtt-min=1', 'rist://@127.0.0.1:3502?rtt-max=10&rtt-min=1', '0', '1'], suite: ['main', 'unicast', 'client', 'NPD']) |
| 299 |
#Sender connecting to receiver |
| 300 |
test('Main profile receive server mode, sender client mode', test_send_receive, args: ['1', 'rist://@127.0.0.1:4001?rtt-max=10&rtt-min=1', 'rist://127.0.0.1:4001?rtt-max=10&rtt-min=1', '0'],suite: ['main', 'unicast', 'server']) |
| 301 |
test('Main profile receive server mode, sender client mode packet loss 10%', test_send_receive, args: ['1', 'rist://@127.0.0.1:4002?rtt-max=10&rtt-min=1', 'rist://127.0.0.1:4002?rtt-max=10&rtt-min=1', '10'],suite: ['main', 'unicast', 'server']) |
| 302 |
test('Main profile receive server mode, sender client mode packet loss 25%', test_send_receive, args: ['1', 'rist://@127.0.0.1:4003?rtt-max=10&rtt-min=1', 'rist://127.0.0.1:4003?rtt-max=10&rtt-min=1', '25'],suite: ['main', 'unicast', 'server']) |
| 303 |
#Receiver connecting to sender |
| 304 |
test('Main profile receive client mode, sender server mode', test_send_receive, args: ['1', 'rist://127.0.0.1:5001?rtt-max=10&rtt-min=1', 'rist://@127.0.0.1:5001?rtt-max=10&rtt-min=1', '0'],suite: ['main', 'unicast', 'client']) |
| 305 |
test('Main profile receive client mode, sender server mode packet loss 10%', test_send_receive, args: ['1', 'rist://127.0.0.1:5002?rtt-max=10&rtt-min=1', 'rist://@127.0.0.1:5002?rtt-max=10&rtt-min=1', '10'],suite: ['main', 'unicast', 'client']) |
| 306 |
test('Main profile receive client mode, sender server mode packet loss 25%', test_send_receive, args: ['1', 'rist://127.0.0.1:5003?rtt-max=10&rtt-min=1', 'rist://@127.0.0.1:5003?rtt-max=10&rtt-min=1', '25'],suite: ['main', 'unicast', 'client']) |
| 307 |
#Encryption: TODO |
| 308 |
test('Main profile encryption receive server mode, sender client mode', test_send_receive, args: ['1', 'rist://@127.0.0.1:6001?secret=12345678&aes-type=128', 'rist://127.0.0.1:6001?secret=12345678&aes-type=128', '0'],suite: ['main', 'unicast', 'server', 'encryption']) |
| 309 |
test('Main profile encryption receive client mode, sender server mode ', test_send_receive, args: ['1', 'rist://127.0.0.1:6002?secret=12345678&aes-type=128', 'rist://@127.0.0.1:6002?secret=12345678&aes-type=128', '0'],suite: ['main', 'unicast', 'client', 'encryption']) |
| 310 |
test('Main profile encryption receive client mode, sender server mode AES256 ', test_send_receive, args: ['1', 'rist://127.0.0.1:6007?secret=12345678&aes-type=256', 'rist://@127.0.0.1:6007?secret=12345678&aes-type=256', '0'],suite: ['main', 'unicast', 'client', 'encryption']) |
| 311 |
#Caller-controlled seq (RIST_DATA_FLAGS_USE_SEQ) passthrough |
| 312 |
test('Main profile USE_SEQ passthrough', test_send_receive, args: ['1', 'rist://@127.0.0.1:6020?rtt-max=10&rtt-min=1', 'rist://127.0.0.1:6020?rtt-max=10&rtt-min=1', '0', '0', '1'], suite: ['main', 'unicast', 'use_seq']) |
| 313 |
test('Main profile USE_SEQ passthrough 10% loss', test_send_receive, args: ['1', 'rist://@127.0.0.1:6021?rtt-max=10&rtt-min=1', 'rist://127.0.0.1:6021?rtt-max=10&rtt-min=1', '10', '0', '1'], suite: ['main', 'unicast', 'use_seq']) |
| 314 |
###Advanced profile tests (VSF TR-06-3): |
| 315 |
test('Advanced profile receive server mode, sender client mode', test_send_receive, args: ['2', 'rist://@127.0.0.1:7001?rtt-max=10&rtt-min=1', 'rist://127.0.0.1:7001?rtt-max=10&rtt-min=1', '0'],suite: ['advanced', 'unicast', 'server']) |
| 316 |
test('Advanced profile receive server mode, sender client mode packet loss 10%', test_send_receive, args: ['2', 'rist://@127.0.0.1:7002?rtt-max=10&rtt-min=1', 'rist://127.0.0.1:7002?rtt-max=10&rtt-min=1', '10'],suite: ['advanced', 'unicast', 'server']) |
| 317 |
test('Advanced profile receive client mode, sender server mode', test_send_receive, args: ['2', 'rist://127.0.0.1:7003?rtt-max=10&rtt-min=1', 'rist://@127.0.0.1:7003?rtt-max=10&rtt-min=1', '0'],suite: ['advanced', 'unicast', 'client']) |
| 318 |
test('Advanced profile receive client mode, sender server mode packet loss 10%', test_send_receive, args: ['2', 'rist://127.0.0.1:7004?rtt-max=10&rtt-min=1', 'rist://@127.0.0.1:7004?rtt-max=10&rtt-min=1', '10'],suite: ['advanced', 'unicast', 'client']) |
| 319 |
|
| 320 |
###Phase C: Native control plane, 32-bit seq, Type 8 wrapping |
| 321 |
test('Advanced profile server mode packet loss 25% (native NACK)', test_send_receive, args: ['2', 'rist://@127.0.0.1:7010?rtt-max=10&rtt-min=1', 'rist://127.0.0.1:7010?rtt-max=10&rtt-min=1', '25'],suite: ['advanced', 'unicast', 'server', 'phase-c']) |
| 322 |
test('Advanced profile client mode packet loss 25% (native NACK)', test_send_receive, args: ['2', 'rist://127.0.0.1:7011?rtt-max=10&rtt-min=1', 'rist://@127.0.0.1:7011?rtt-max=10&rtt-min=1', '25'],suite: ['advanced', 'unicast', 'client', 'phase-c']) |
| 323 |
|
| 324 |
###Phase D1: PSK encryption (AES-CTR, mode 1) |
| 325 |
test('Advanced profile encryption server mode AES128', test_send_receive, args: ['2', 'rist://@127.0.0.1:7020?secret=12345678&aes-type=128', 'rist://127.0.0.1:7020?secret=12345678&aes-type=128', '0'],suite: ['advanced', 'unicast', 'server', 'encryption', 'phase-d1']) |
| 326 |
test('Advanced profile encryption client mode AES128', test_send_receive, args: ['2', 'rist://127.0.0.1:7021?secret=12345678&aes-type=128', 'rist://@127.0.0.1:7021?secret=12345678&aes-type=128', '0'],suite: ['advanced', 'unicast', 'client', 'encryption', 'phase-d1']) |
| 327 |
test('Advanced profile encryption server mode AES256', test_send_receive, args: ['2', 'rist://@127.0.0.1:7022?secret=12345678&aes-type=256', 'rist://127.0.0.1:7022?secret=12345678&aes-type=256', '0'],suite: ['advanced', 'unicast', 'server', 'encryption', 'phase-d1']) |
| 328 |
test('Advanced profile encryption server mode AES128 + 10% loss', test_send_receive, args: ['2', 'rist://@127.0.0.1:7023?secret=12345678&aes-type=128', 'rist://127.0.0.1:7023?secret=12345678&aes-type=128', '10'],suite: ['advanced', 'unicast', 'server', 'encryption', 'phase-d1']) |
| 329 |
test('Advanced profile encryption mismatch (should fail)', test_send_receive, args: ['2', 'rist://@127.0.0.1:7030?secret=12345678&aes-type=128', 'rist://127.0.0.1:7030', '0'], should_fail: true) |
| 330 |
test('Advanced profile encryption mismatch reverse (should fail)', test_send_receive, args: ['2', 'rist://@127.0.0.1:7031', 'rist://127.0.0.1:7031?secret=12345678&aes-type=128', '0'], should_fail: true) |
| 331 |
|
| 332 |
###Flow ID: stream-id via virt-dst-port on native AP Type 5 |
| 333 |
test('Advanced profile Flow ID server mode virt-dst-port', test_send_receive, args: ['2', 'rist://@127.0.0.1:7040?virt-dst-port=5000', 'rist://127.0.0.1:7040?virt-dst-port=5000', '0'],suite: ['advanced', 'unicast', 'server', 'flow-id']) |
| 334 |
test('Advanced profile Flow ID client mode virt-dst-port', test_send_receive, args: ['2', 'rist://127.0.0.1:7041?virt-dst-port=5000', 'rist://@127.0.0.1:7041?virt-dst-port=5000', '0'],suite: ['advanced', 'unicast', 'client', 'flow-id']) |
| 335 |
|
| 336 |
###Phase D4: Flow Attribute messages (CI=0x8001) |
| 337 |
test('Advanced profile Flow Attribute server mode', test_send_receive, args: ['2', 'rist://@127.0.0.1:7060?rtt-max=10&rtt-min=1', 'rist://127.0.0.1:7060?rtt-max=10&rtt-min=1', '0', '0', '0', '1'],suite: ['advanced', 'unicast', 'server', 'flow-attr']) |
| 338 |
test('Advanced profile Flow Attribute client mode', test_send_receive, args: ['2', 'rist://127.0.0.1:7061?rtt-max=10&rtt-min=1', 'rist://@127.0.0.1:7061?rtt-max=10&rtt-min=1', '0', '0', '0', '1'],suite: ['advanced', 'unicast', 'client', 'flow-attr']) |
| 339 |
|
| 340 |
###Phase D6: LZ4 payload compression |
| 341 |
test('Advanced profile LZ4 compression server mode', test_send_receive, args: ['2', 'rist://@127.0.0.1:7050', 'rist://127.0.0.1:7050?compression=1', '0'],suite: ['advanced', 'unicast', 'server', 'lz4']) |
| 342 |
test('Advanced profile LZ4 compression client mode', test_send_receive, args: ['2', 'rist://127.0.0.1:7051', 'rist://@127.0.0.1:7051?compression=1', '0'],suite: ['advanced', 'unicast', 'client', 'lz4']) |
| 343 |
test('Advanced profile LZ4 compression + 10% loss', test_send_receive, args: ['2', 'rist://@127.0.0.1:7052', 'rist://127.0.0.1:7052?compression=1', '10'],suite: ['advanced', 'unicast', 'server', 'lz4']) |
| 344 |
test('Advanced profile LZ4 + AES128 server mode', test_send_receive, args: ['2', 'rist://@127.0.0.1:7053?secret=12345678&aes-type=128', 'rist://127.0.0.1:7053?secret=12345678&aes-type=128&compression=1', '0'],suite: ['advanced', 'unicast', 'server', 'lz4', 'encryption']) |
| 345 |
|
| 346 |
###SRP authentication (Advanced Profile) |
| 347 |
if have_srp |
| 348 |
test('Advanced profile SRP auth server mode AES128', test_send_receive, args: ['2', 'rist://@127.0.0.1:7070?secret=12345678&aes-type=128&username=testuser&password=testpassword', 'rist://127.0.0.1:7070?secret=12345678&aes-type=128&username=testuser&password=testpassword', '0'],suite: ['advanced', 'unicast', 'server', 'encryption', 'srp'], should_fail: false) |
| 349 |
test('Advanced profile SRP auth client mode AES128', test_send_receive, args: ['2', 'rist://127.0.0.1:7071?secret=12345678&aes-type=128&username=testuser&password=testpassword', 'rist://@127.0.0.1:7071?secret=12345678&aes-type=128&username=testuser&password=testpassword', '0'],suite: ['advanced', 'unicast', 'client', 'encryption', 'srp'], should_fail: false) |
| 350 |
test('Advanced profile SRP auth client no SRP (should fail)', test_send_receive, args: ['2', 'rist://127.0.0.1:7072?secret=12345678&aes-type=128', 'rist://@127.0.0.1:7072?secret=12345678&aes-type=128&username=testuser&password=testpassword', '0'], suite: ['advanced', 'unicast', 'server', 'encryption', 'srp'], should_fail: true) |
| 351 |
test('Advanced profile SRP auth password mismatch (should fail)', test_send_receive, args: ['2', 'rist://127.0.0.1:7073?secret=12345678&aes-type=128&username=testuser&password=wrongpassword', 'rist://@127.0.0.1:7073?secret=12345678&aes-type=128&username=testuser&password=testpassword', '0'],suite: ['advanced', 'unicast', 'server', 'encryption', 'srp'], should_fail: true) |
| 352 |
endif |
| 353 |
|
| 354 |
#Encryption tests where 1 side has enabled encryption these should fail |
| 355 |
test('Main profile encryption receive server mode unencrypted, sender client mode', test_send_receive, args: ['1', 'rist://@127.0.0.1:6003', 'rist://127.0.0.1:6003?secret=12345678&aes-type=128', '0'], should_fail: true) |
| 356 |
test('Main profile encryption receive server mode, sender client mode unencrypted', test_send_receive, args: ['1', 'rist://@127.0.0.1:6004?secret=12345678&aes-type=128', 'rist://127.0.0.1:6004', '0'], should_fail: true) |
| 357 |
test('Main profile encryption client mode unencrypted, sender server mode', test_send_receive, args: ['1', 'rist://127.0.0.1:6005', 'rist://@127.0.0.1:6005?secret=12345678&aes-type=128', '0'], should_fail: true) |
| 358 |
test('Main profile encryption client mode, sender server mode unencrypted', test_send_receive, args: ['1', 'rist://127.0.0.1:6006?secret=12345678&aes-type=128', 'rist://@127.0.0.1:6006', '0'], should_fail: true) |
| 359 |
#Test SRP Auth |
| 360 |
if have_srp |
| 361 |
test('Main profile encryption receive client mode, sender server mode, SRP auth', test_send_receive, args: ['1', 'rist://127.0.0.1:6008?secret=12345678&aes-type=128&username=testuser&password=testpassword', 'rist://@127.0.0.1:6008?secret=12345678&aes-type=128&username=testuser&password=testpassword', '0'],suite: ['main', 'unicast', 'server', 'encryption', 'srp'], should_fail: false) |
| 362 |
test('Main profile encryption receive client mode, sender server mode, SRP auth, client no SRP', test_send_receive, args: ['1', 'rist://127.0.0.1:6009?secret=12345678&aes-type=128', 'rist://@127.0.0.1:6009?secret=12345678&aes-type=128&username=testuser&password=testpassword', '0'], suite: ['main', 'unicast', 'server', 'encryption', 'srp'], should_fail: true) |
| 363 |
test('Main profile encryption receive client mode, sender server mode, SRP auth, server no SRP', test_send_receive, args: ['1', 'rist://127.0.0.1:6010?secret=12345678&aes-type=128&username=testuser&password=testpassword', 'rist://@127.0.0.1:6010?secret=12345678&aes-type=128', '0'], suite: ['main', 'unicast', 'server', 'encryption', 'srp'], should_fail: true) |
| 364 |
test('Main profile encryption receive client mode, sender server mode, SRP auth, password mismatch', test_send_receive, args: ['1', 'rist://127.0.0.1:6011?secret=12345678&aes-type=128&username=testuser&password=wrongpassword', 'rist://@127.0.0.1:6011?secret=12345678&aes-type=128&username=testuser&password=testpassword', '0'],suite: ['main', 'unicast', 'server', 'encryption', 'srp'], should_fail: true) |
| 365 |
endif |