Subject: [PATCH] selftests: net: tls: remove recv_rcvbuf test

This test only works when [1] is applied, which was rejected.

Basically, the errors are reported and cleared. In this particular case of
tls sockets, following reads will block.

The test case was originally submitted with the rejected patch, but, then,
was included as part of a different patchset, possibly by mistake.

[1] https://lore.kernel.org/netdev/[email protected]/#t

Thanks Paolo Pisati for pointing out the original patchset where this
appeared.

Cc: Jakub Kicinski <[email protected]>
Fixes: 65190f77424d (selftests/tls: add a test for fragmented messages)
Reported-by: Paolo Pisati <[email protected]>
Signed-off-by: Thadeu Lima de Souza Cascardo <[email protected]>
---
tools/testing/selftests/net/tls.c | 28 ----------------------------
1 file changed, 28 deletions(-)

diff --git a/tools/testing/selftests/net/tls.c b/tools/testing/selftests/net/tls.c
index 13e5ef615026..0ea44d975b6c 100644
--- a/tools/testing/selftests/net/tls.c
+++ b/tools/testing/selftests/net/tls.c
@@ -722,34 +722,6 @@ TEST_F(tls, recv_lowat)
EXPECT_EQ(memcmp(send_mem, recv_mem + 10, 5), 0);
}

-TEST_F(tls, recv_rcvbuf)
-{
- char send_mem[4096];
- char recv_mem[4096];
- int rcv_buf = 1024;
-
- memset(send_mem, 0x1c, sizeof(send_mem));
-
- EXPECT_EQ(setsockopt(self->cfd, SOL_SOCKET, SO_RCVBUF,
- &rcv_buf, sizeof(rcv_buf)), 0);
-
- EXPECT_EQ(send(self->fd, send_mem, 512, 0), 512);
- memset(recv_mem, 0, sizeof(recv_mem));
- EXPECT_EQ(recv(self->cfd, recv_mem, sizeof(recv_mem), 0), 512);
- EXPECT_EQ(memcmp(send_mem, recv_mem, 512), 0);
-
- if (self->notls)
- return;
-
- EXPECT_EQ(send(self->fd, send_mem, 4096, 0), 4096);
- memset(recv_mem, 0, sizeof(recv_mem));
- EXPECT_EQ(recv(self->cfd, recv_mem, sizeof(recv_mem), 0), -1);
- EXPECT_EQ(errno, EMSGSIZE);
-
- EXPECT_EQ(recv(self->cfd, recv_mem, sizeof(recv_mem), 0), -1);
- EXPECT_EQ(errno, EMSGSIZE);
-}
-
TEST_F(tls, bidir)
{
char const *test_str = "test_read";
--
2.24.0


2019-12-13 17:53:17

by Jakub Kicinski

[permalink] [raw]
Subject: Re: [PATCH] selftests: net: tls: remove recv_rcvbuf test

On Fri, 13 Dec 2019 07:39:02 -0300, Thadeu Lima de Souza Cascardo wrote:
> This test only works when [1] is applied, which was rejected.
>
> Basically, the errors are reported and cleared. In this particular case of
> tls sockets, following reads will block.
>
> The test case was originally submitted with the rejected patch, but, then,
> was included as part of a different patchset, possibly by mistake.
>
> [1] https://lore.kernel.org/netdev/[email protected]/#t

Ah, damn, you're right, sorry about that!

> Thanks Paolo Pisati for pointing out the original patchset where this
> appeared.
>
> Cc: Jakub Kicinski <[email protected]>
> Fixes: 65190f77424d (selftests/tls: add a test for fragmented messages)
> Reported-by: Paolo Pisati <[email protected]>
> Signed-off-by: Thadeu Lima de Souza Cascardo <[email protected]>

Acked-by: Jakub Kicinski <[email protected]>

2019-12-15 03:59:30

by Jakub Kicinski

[permalink] [raw]
Subject: Re: [PATCH] selftests: net: tls: remove recv_rcvbuf test

On Fri, 13 Dec 2019 07:39:02 -0300, Thadeu Lima de Souza Cascardo wrote:
> This test only works when [1] is applied, which was rejected.
>
> Basically, the errors are reported and cleared. In this particular case of
> tls sockets, following reads will block.
>
> The test case was originally submitted with the rejected patch, but, then,
> was included as part of a different patchset, possibly by mistake.
>
> [1] https://lore.kernel.org/netdev/[email protected]/#t
>
> Thanks Paolo Pisati for pointing out the original patchset where this
> appeared.
>
> Cc: Jakub Kicinski <[email protected]>
> Fixes: 65190f77424d (selftests/tls: add a test for fragmented messages)
> Reported-by: Paolo Pisati <[email protected]>
> Signed-off-by: Thadeu Lima de Souza Cascardo <[email protected]>

Applied to net and queued for stable, thank you!