From 8987957d95997d4b4be4d0680b015db1a382ac6a Mon Sep 17 00:00:00 2001 From: Paolo Abeni Date: Thu, 14 Jan 2021 13:10:52 +0100 Subject: [PATCH] mptcp: add regression test for disconnect() This simply trigger the in-kernel mptcp disconnect code path, so that we can have coverage for: https://marc.info/?l=linux-netdev&m=161053335929207&w=2 Signed-off-by: Paolo Abeni --- gtests/net/mptcp/regressions/disconnect.pkt | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 gtests/net/mptcp/regressions/disconnect.pkt diff --git a/gtests/net/mptcp/regressions/disconnect.pkt b/gtests/net/mptcp/regressions/disconnect.pkt new file mode 100644 index 00000000..5cf8bb43 --- /dev/null +++ b/gtests/net/mptcp/regressions/disconnect.pkt @@ -0,0 +1,13 @@ +// This test case covers the regression fixed by ("mptcp: be careful on MPTCP-level ack.") +// bad read on on unconnected socket +--tolerance_usecs=100000 +`../common/defaults.sh` + +0.0 socket(..., SOCK_STREAM, IPPROTO_MPTCP) = 3 ++0.0 fcntl(3, F_GETFL) = 0x2 (flags O_RDWR) ++0.0 fcntl(3, F_SETFL, O_RDWR|O_NONBLOCK) = 0 + ++0.0 connect(3, ..., ...) = -1 EINPROGRESS (Operation now in progress) ++0.0 > S 0:0(0) + ++0.0 shutdown(3, SHUT_WR) = 0