selftests: mptcp: add TCP_INQ support
authorFlorian Westphal <fw@strlen.de>
Fri, 3 Dec 2021 22:35:33 +0000 (14:35 -0800)
committerJakub Kicinski <kuba@kernel.org>
Tue, 7 Dec 2021 19:36:29 +0000 (11:36 -0800)
commit5cbd886ce2a9f4627ff9cdab1bc97a401a24b309
tree619fde493de9a64d011222dacf77843a652eb58e
parent2c9e77659a0c8d7ce96af3e420914ace1e3f7d21
selftests: mptcp: add TCP_INQ support

Do checks on the returned inq counter.

Fail on:
1. Huge value (> 1 kbyte, test case files are 1 kb)
2. last hint larger than returned bytes when read was short
3. erronenous indication of EOF.

3) happens when a hint of X bytes reads X-1 on next call
   but next recvmsg returns more data (instead of EOF).

Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
tools/testing/selftests/net/mptcp/mptcp_connect.c
tools/testing/selftests/net/mptcp/mptcp_sockopt.sh