osmo-ttcn3-hacks/stp
Harald Welte 67881aef23 Avoid generating zero-length packets
I used the construct like f_rnd_octstring(f_rnd_int(100)) in a number
of places to generate random-length packets with randomized length.

The problem I didn't realize is that f_rnd_int() of course can also
return '0', which would generate zero-length packets.  This may be
permitted in some protocols, but it leads to problems e.g. when trying
to send a UDP packet of zero length (which the kernel will not do).

So let's introduce
* f_rnd_int_nonzero() for returning non-zero randomized integers
* f_rnd_octstring_rnd_len() for returning a random-length random payload
  octet string
* replace all f_rnd_octstring(f_rnd_int()) call sites with the new
  function.

Change-Id: I818a113ff8d2a2f7cab2ec7d9c8661607c6331d6
Closes: OS#5528
2022-04-12 22:52:47 +02:00
..
README.md Update README.md of several TTCN3 test suites 2019-11-15 18:49:09 +00:00
STP_Tests.cfg stp/STP_Test.cfg: Add M3UA and IPA tests 2020-08-06 16:48:38 +00:00
STP_Tests.default stp: Introduce STP_Tests*.ttcn for testing OsmoSTP 2019-11-12 13:05:41 +01:00
STP_Tests.ttcn Avoid generating zero-length packets 2022-04-12 22:52:47 +02:00
STP_Tests_Common.ttcn stp: Support testing multi-home SCTP features with IPv4+IPv6 2020-08-27 08:13:44 +00:00
STP_Tests_IPA.ttcn stp: wait until IPA handshake is done in f_connect_ipa 2020-10-03 08:16:56 +00:00
STP_Tests_M3UA.ttcn Avoid generating zero-length packets 2022-04-12 22:52:47 +02:00
gen_links.sh stp: Introduce STP_Tests*.ttcn for testing OsmoSTP 2019-11-12 13:05:41 +01:00
osmo-stp.cfg stp: Introduce TC_tmt_override 2019-11-12 13:06:24 +01:00
regen_makefile.sh regen_makefile.sh: set executable name explicitly 2021-10-13 11:12:22 +02:00

README.md

STP_Tests.ttcn

  • external interfaces
    • M3UA/SCTP (can emulate both client and server side)
    • IPA (can emulate both client and server side)
    • VTY

{% dot sip_tests.svg digraph G { rankdir=LR; STP [label="IUT\nosmo-stp",shape="box"]; ATS [label="ATS\nSTP_Tests.ttcn"];

ATS -> STP [label="M3UA", dir="both"]; ATS -> STP [label="IPA", dir="both"]; ATS -> STP [label="VTY"]; } %}