From 601b85dc1e4d51abdaa85d22ed4d64b31411f4fe Mon Sep 17 00:00:00 2001
From: Michael Tuexen <tuexen@fh-muenster.de>
Date: Mon, 12 Oct 2015 22:47:46 +0200
Subject: [PATCH] Add Linux specific test and use only single homed endpoints.

---
 .../tests/bsd/sctp/sctp_init_rtx.pkt          |  1 +
 .../tests/linux/sctp/sctp_init_rtx.pkt        | 20 +++++++++++++++++++
 2 files changed, 21 insertions(+)
 create mode 100644 gtests/net/packetdrill/tests/linux/sctp/sctp_init_rtx.pkt

diff --git a/gtests/net/packetdrill/tests/bsd/sctp/sctp_init_rtx.pkt b/gtests/net/packetdrill/tests/bsd/sctp/sctp_init_rtx.pkt
index 0733496a..ca3fd455 100644
--- a/gtests/net/packetdrill/tests/bsd/sctp/sctp_init_rtx.pkt
+++ b/gtests/net/packetdrill/tests/bsd/sctp/sctp_init_rtx.pkt
@@ -1,4 +1,5 @@
 +0.0 socket(..., SOCK_STREAM, IPPROTO_SCTP) = 3
++0.0 bind(3, ..., ...) = 0
 +0.0 fcntl(3, F_GETFL) = 0x2 (flags O_RDWR)
 +0.0 fcntl(3, F_SETFL, O_RDWR|O_NONBLOCK) = 0
 +0.0 setsockopt(3, IPPROTO_SCTP, SCTP_RTOINFO, {srto_initial=100, srto_max=200, srto_min=50}, 16) = 0
diff --git a/gtests/net/packetdrill/tests/linux/sctp/sctp_init_rtx.pkt b/gtests/net/packetdrill/tests/linux/sctp/sctp_init_rtx.pkt
new file mode 100644
index 00000000..ded26dcd
--- /dev/null
+++ b/gtests/net/packetdrill/tests/linux/sctp/sctp_init_rtx.pkt
@@ -0,0 +1,20 @@
++0.0 socket(..., SOCK_STREAM, IPPROTO_SCTP) = 3
++0.0 bind(3, ..., ...) = 0
++0.0 fcntl(3, F_GETFL) = 0x2 (flags O_RDWR)
++0.0 fcntl(3, F_SETFL, O_RDWR|O_NONBLOCK) = 0
++0.0 setsockopt(3, IPPROTO_SCTP, SCTP_RTOINFO, {srto_initial=100, srto_max=200, srto_min=50}, 16) = 0
++0.0 setsockopt(3, IPPROTO_SCTP, SCTP_INITMSG, {sinit_num_ostreams=0, sinit_max_instreams=0, sinit_max_attempts=0, sinit_max_init_timeo=200}, 8) = 0
++0.0 connect(3, ..., ...) = -1 EINPROGRESS (Operation now in progress)
+// Check the number and the timing of the restransmissions
++0.0 > sctp: INIT[flgs=0, tag=1, a_rwnd=..., os=..., is=..., tsn=0, ...]
++0.1 > sctp: INIT[flgs=0, tag=1, a_rwnd=..., os=..., is=..., tsn=0, ...]
++0.2 > sctp: INIT[flgs=0, tag=1, a_rwnd=..., os=..., is=..., tsn=0, ...]
++0.2 > sctp: INIT[flgs=0, tag=1, a_rwnd=..., os=..., is=..., tsn=0, ...]
++0.2 > sctp: INIT[flgs=0, tag=1, a_rwnd=..., os=..., is=..., tsn=0, ...]
++0.2 > sctp: INIT[flgs=0, tag=1, a_rwnd=..., os=..., is=..., tsn=0, ...]
++0.2 > sctp: INIT[flgs=0, tag=1, a_rwnd=..., os=..., is=..., tsn=0, ...]
++0.2 > sctp: INIT[flgs=0, tag=1, a_rwnd=..., os=..., is=..., tsn=0, ...]
++0.2 > sctp: INIT[flgs=0, tag=1, a_rwnd=..., os=..., is=..., tsn=0, ...]
+//+0.2 > sctp: ABORT[flgs=T]
++1.0 getsockopt(3, SOL_SOCKET, SO_ERROR, [ETIMEDOUT], [4]) = 0
++0.0 close(3) = 0
-- 
GitLab