mirror of
https://github.com/torvalds/linux.git
synced 2024-11-25 21:51:40 +00:00
selftests: tls: use exact comparison in recv_partial
This exact case was fail for async crypto and we weren't catching it. Signed-off-by: Jakub Kicinski <kuba@kernel.org> Reviewed-by: Simon Horman <horms@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
32b55c5ff9
commit
49d821064c
@ -1002,12 +1002,12 @@ TEST_F(tls, recv_partial)
|
||||
|
||||
memset(recv_mem, 0, sizeof(recv_mem));
|
||||
EXPECT_EQ(send(self->fd, test_str, send_len, 0), send_len);
|
||||
EXPECT_NE(recv(self->cfd, recv_mem, strlen(test_str_first),
|
||||
MSG_WAITALL), -1);
|
||||
EXPECT_EQ(recv(self->cfd, recv_mem, strlen(test_str_first),
|
||||
MSG_WAITALL), strlen(test_str_first));
|
||||
EXPECT_EQ(memcmp(test_str_first, recv_mem, strlen(test_str_first)), 0);
|
||||
memset(recv_mem, 0, sizeof(recv_mem));
|
||||
EXPECT_NE(recv(self->cfd, recv_mem, strlen(test_str_second),
|
||||
MSG_WAITALL), -1);
|
||||
EXPECT_EQ(recv(self->cfd, recv_mem, strlen(test_str_second),
|
||||
MSG_WAITALL), strlen(test_str_second));
|
||||
EXPECT_EQ(memcmp(test_str_second, recv_mem, strlen(test_str_second)),
|
||||
0);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user