]> git.baikalelectronics.ru Git - kernel.git/commit
selftests/tls: Fix recv(MSG_PEEK) & splice() test cases
authorVakul Garg <vakul.garg@nxp.com>
Fri, 28 Sep 2018 16:18:08 +0000 (21:48 +0530)
committerDavid S. Miller <davem@davemloft.net>
Tue, 2 Oct 2018 06:18:15 +0000 (23:18 -0700)
commit2d286d5ec874644c8f7939a23dfda0f49f304f02
tree6ecfff81b7f9b77a4e9a9cf894e4448901ef0892
parentf491c1b33f3ec7dfc1e86b58c1bb47e306b8fe85
selftests/tls: Fix recv(MSG_PEEK) & splice() test cases

TLS test cases splice_from_pipe, send_and_splice &
recv_peek_multiple_records expect to receive a given nummber of bytes
and then compare them against the number of bytes which were sent.
Therefore, system call recv() must not return before receiving the
requested number of bytes, otherwise the subsequent memcmp() fails.
This patch passes MSG_WAITALL flag to recv() so that it does not return
prematurely before requested number of bytes are copied to receive
buffer.

Signed-off-by: Vakul Garg <vakul.garg@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
tools/testing/selftests/net/tls.c