From: Sasha Levin <sashal@kernel.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Jakub Kicinski <kuba@kernel.org>, Simon Horman <horms@kernel.org>,
"David S . Miller" <davem@davemloft.net>,
Sasha Levin <sashal@kernel.org>,
edumazet@google.com, pabeni@redhat.com, shuah@kernel.org,
netdev@vger.kernel.org, linux-kselftest@vger.kernel.org
Subject: [PATCH AUTOSEL 6.6 11/21] selftests: tls: use exact comparison in recv_partial
Date: Thu, 29 Feb 2024 10:49:31 -0500 [thread overview]
Message-ID: <20240229154946.2850012-11-sashal@kernel.org> (raw)
In-Reply-To: <20240229154946.2850012-1-sashal@kernel.org>
From: Jakub Kicinski <kuba@kernel.org>
[ Upstream commit 49d821064c44cb5ffdf272905236012ea9ce50e3 ]
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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
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 464853a7f9829..ad993ab3ac181 100644
--- a/tools/testing/selftests/net/tls.c
+++ b/tools/testing/selftests/net/tls.c
@@ -988,12 +988,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);
}
--
2.43.0
next prev parent reply other threads:[~2024-02-29 15:50 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-29 15:49 [PATCH AUTOSEL 6.6 01/21] media: Revert "media: rkisp1: Drop IRQF_SHARED" Sasha Levin
2024-02-29 15:49 ` [PATCH AUTOSEL 6.6 02/21] media: rkisp1: Fix IRQ handling due to shared interrupts Sasha Levin
2024-02-29 15:49 ` [PATCH AUTOSEL 6.6 03/21] Revert "drm/msm/gpu: Push gpu lock down past runpm" Sasha Levin
2024-02-29 15:49 ` [PATCH AUTOSEL 6.6 04/21] ASoC: cs42l43: Handle error from devm_pm_runtime_enable Sasha Levin
2024-02-29 15:49 ` [PATCH AUTOSEL 6.6 05/21] wifi: iwlwifi: mvm: use correct address 3 in A-MSDU Sasha Levin
2024-02-29 15:49 ` [PATCH AUTOSEL 6.6 06/21] arm64: jump_label: use constraints "Si" instead of "i" Sasha Levin
2024-02-29 15:58 ` Mark Rutland
2024-02-29 15:49 ` [PATCH AUTOSEL 6.6 07/21] perf/arm-cmn: Workaround AmpereOneX errata AC04_MESH_1 (incorrect child count) Sasha Levin
2024-02-29 15:49 ` [PATCH AUTOSEL 6.6 08/21] btrfs: add and use helper to check if block group is used Sasha Levin
2024-02-29 15:49 ` [PATCH AUTOSEL 6.6 09/21] selftests: openvswitch: Add validation for the recursion test Sasha Levin
2024-02-29 15:49 ` [PATCH AUTOSEL 6.6 10/21] net: tls: factor out tls_*crypt_async_wait() Sasha Levin
2024-02-29 15:49 ` Sasha Levin [this message]
2024-02-29 15:49 ` [PATCH AUTOSEL 6.6 12/21] ASoC: rt5645: Make LattePanda board DMI match more precise Sasha Levin
2024-02-29 15:49 ` [PATCH AUTOSEL 6.6 13/21] spi: intel-pci: Add support for Lunar Lake-M SPI serial flash Sasha Levin
2024-02-29 15:49 ` [PATCH AUTOSEL 6.6 14/21] regmap: kunit: Ensure that changed bytes are actually different Sasha Levin
2024-02-29 15:49 ` [PATCH AUTOSEL 6.6 15/21] ASoC: amd: yc: Fix non-functional mic on Lenovo 82UU Sasha Levin
2024-02-29 15:49 ` [PATCH AUTOSEL 6.6 16/21] x86/xen: Add some null pointer checking to smp.c Sasha Levin
2024-02-29 15:49 ` [PATCH AUTOSEL 6.6 17/21] MIPS: Clear Cause.BD in instruction_pointer_set Sasha Levin
2024-02-29 15:49 ` [PATCH AUTOSEL 6.6 18/21] HID: multitouch: Add required quirk for Synaptics 0xcddc device Sasha Levin
2024-02-29 15:49 ` [PATCH AUTOSEL 6.6 19/21] ASoC: SOF: ipc4-pcm: Workaround for crashed firmware on system suspend Sasha Levin
2024-02-29 15:49 ` [PATCH AUTOSEL 6.6 20/21] gen_compile_commands: fix invalid escape sequence warning Sasha Levin
2024-02-29 15:49 ` [PATCH AUTOSEL 6.6 21/21] arm64/sve: Lower the maximum allocation for the SVE ptrace regset Sasha Levin
2024-02-29 16:51 ` Doug Anderson
2024-02-29 17:13 ` Mark Brown
2024-02-29 17:25 ` Doug Anderson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240229154946.2850012-11-sashal@kernel.org \
--to=sashal@kernel.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=shuah@kernel.org \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox