* [PATCH net] selftests: tls: swap the TX and RX sockets in some tests
@ 2023-09-12 14:16 Sabrina Dubroca
2023-09-15 6:50 ` patchwork-bot+netdevbpf
0 siblings, 1 reply; 2+ messages in thread
From: Sabrina Dubroca @ 2023-09-12 14:16 UTC (permalink / raw)
To: netdev
Cc: Sabrina Dubroca, Jakub Kicinski, Shuah Khan, Dave Watson,
linux-kselftest
tls.sendmsg_large and tls.sendmsg_multiple are trying to send through
the self->cfd socket (only configured with TLS_RX) and to receive through
the self->fd socket (only configured with TLS_TX), so they're not using
kTLS at all. Swap the sockets.
Fixes: 7f657d5bf507 ("selftests: tls: add selftests for TLS sockets")
Signed-off-by: Sabrina Dubroca <sd@queasysnail.net>
---
tools/testing/selftests/net/tls.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/tools/testing/selftests/net/tls.c b/tools/testing/selftests/net/tls.c
index 297d972558fb..464853a7f982 100644
--- a/tools/testing/selftests/net/tls.c
+++ b/tools/testing/selftests/net/tls.c
@@ -613,11 +613,11 @@ TEST_F(tls, sendmsg_large)
msg.msg_iov = &vec;
msg.msg_iovlen = 1;
- EXPECT_EQ(sendmsg(self->cfd, &msg, 0), send_len);
+ EXPECT_EQ(sendmsg(self->fd, &msg, 0), send_len);
}
while (recvs++ < sends) {
- EXPECT_NE(recv(self->fd, mem, send_len, 0), -1);
+ EXPECT_NE(recv(self->cfd, mem, send_len, 0), -1);
}
free(mem);
@@ -646,9 +646,9 @@ TEST_F(tls, sendmsg_multiple)
msg.msg_iov = vec;
msg.msg_iovlen = iov_len;
- EXPECT_EQ(sendmsg(self->cfd, &msg, 0), total_len);
+ EXPECT_EQ(sendmsg(self->fd, &msg, 0), total_len);
buf = malloc(total_len);
- EXPECT_NE(recv(self->fd, buf, total_len, 0), -1);
+ EXPECT_NE(recv(self->cfd, buf, total_len, 0), -1);
for (i = 0; i < iov_len; i++) {
EXPECT_EQ(memcmp(test_strs[i], buf + len_cmp,
strlen(test_strs[i])),
--
2.42.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net] selftests: tls: swap the TX and RX sockets in some tests
2023-09-12 14:16 [PATCH net] selftests: tls: swap the TX and RX sockets in some tests Sabrina Dubroca
@ 2023-09-15 6:50 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2023-09-15 6:50 UTC (permalink / raw)
To: Sabrina Dubroca; +Cc: netdev, kuba, shuah, davejwatson, linux-kselftest
Hello:
This patch was applied to netdev/net.git (main)
by David S. Miller <davem@davemloft.net>:
On Tue, 12 Sep 2023 16:16:25 +0200 you wrote:
> tls.sendmsg_large and tls.sendmsg_multiple are trying to send through
> the self->cfd socket (only configured with TLS_RX) and to receive through
> the self->fd socket (only configured with TLS_TX), so they're not using
> kTLS at all. Swap the sockets.
>
> Fixes: 7f657d5bf507 ("selftests: tls: add selftests for TLS sockets")
> Signed-off-by: Sabrina Dubroca <sd@queasysnail.net>
>
> [...]
Here is the summary with links:
- [net] selftests: tls: swap the TX and RX sockets in some tests
https://git.kernel.org/netdev/net/c/c326ca98446e
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-09-15 6:50 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-12 14:16 [PATCH net] selftests: tls: swap the TX and RX sockets in some tests Sabrina Dubroca
2023-09-15 6:50 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).