xref: /linux/tools/testing/selftests/net/packetdrill/tcp_syscall_bad_arg_sendmsg-empty-iov.pkt (revision 0ad9617c78acbc71373fb341a6f75d4012b01d69)
1// SPDX-License-Identifier: GPL-2.0
2// Test that we correctly skip zero-length IOVs.
3`./defaults.sh`
4    0 socket(..., SOCK_STREAM, IPPROTO_TCP) = 3
5   +0 setsockopt(3, SOL_SOCKET, SO_ZEROCOPY, [1], 4) = 0
6   +0 setsockopt(3, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0
7   +0 bind(3, ..., ...) = 0
8   +0 listen(3, 1) = 0
9
10   +0 < S 0:0(0) win 32792 <mss 1000,nop,wscale 7>
11   +0 > S. 0:0(0) ack 1 <mss 1460,nop,wscale 8>
12 +.01 < . 1:1(0) ack 1 win 257
13   +0 accept(3, ..., ...) = 4
14   +0 setsockopt(4, SOL_TCP, TCP_NODELAY, [1], 4) = 0
15
16   +0 sendmsg(4, {msg_name(...)=...,
17                  msg_iov(4)=[{..., 0}, {..., 40}, {..., 0}, {..., 20}],
18                  msg_flags=0}, 0) = 60
19   +0 > P. 1:61(60) ack 1
20 +.01 < . 1:1(0) ack 61 win 257
21
22   +0 sendmsg(4, {msg_name(...)=...,
23                  msg_iov(4)=[{..., 0}, {..., 0}, {..., 0}, {..., 0}],
24                  msg_flags=0}, MSG_ZEROCOPY) = 0
25
26   +0 sendmsg(4, {msg_name(...)=...,
27                  msg_iov(4)=[{..., 0}, {..., 10}, {..., 0}, {..., 50}],
28                  msg_flags=0}, MSG_ZEROCOPY) = 60
29   +0 > P. 61:121(60) ack 1
30 +.01 < . 1:1(0) ack 121 win 257
31