Linux Test Project
 help / color / mirror / Atom feed
* [LTP] [PATCH v1] af_alg08: Allow EINVAL when calling recv()
@ 2026-05-19  6:57 Wei Gao via ltp
  2026-05-19  8:43 ` Andrea Cervesato via ltp
  0 siblings, 1 reply; 5+ messages in thread
From: Wei Gao via ltp @ 2026-05-19  6:57 UTC (permalink / raw)
  To: ltp

On older kernels (e.g. 4.4), recv() on AF_ALG AEAD sockets may return
EINVAL instead of EBADMSG. Since the primary goal of this test is to
detect page cache corruption (which is verified separately), allow both
error codes.

Signed-off-by: Wei Gao <wegao@suse.com>
---
 testcases/kernel/crypto/af_alg08.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/testcases/kernel/crypto/af_alg08.c b/testcases/kernel/crypto/af_alg08.c
index 5e04b579c..3de76b428 100644
--- a/testcases/kernel/crypto/af_alg08.c
+++ b/testcases/kernel/crypto/af_alg08.c
@@ -100,7 +100,10 @@ static void try_corrupt(void)
 	SAFE_SPLICE(pipefd[0], NULL, reqfd, NULL, OVERWRITE_SIZE, 0);
 
 	/* Expected to fail (invalid ciphertext); triggers the scratch write */
-	TST_EXP_FAIL_SILENT(recv(reqfd, recvbuf, sizeof(recvbuf), 0), EBADMSG);
+	const int exp_errs[] = {EBADMSG, EINVAL};
+
+	TST_EXP_FAIL_ARR(recv(reqfd, recvbuf, sizeof(recvbuf), 0),
+			 exp_errs, ARRAY_SIZE(exp_errs));
 
 	SAFE_CLOSE(pipefd[0]);
 	SAFE_CLOSE(pipefd[1]);
-- 
2.54.0


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [LTP] [PATCH v1] af_alg08: Allow EINVAL when calling recv()
  2026-05-19  6:57 [LTP] [PATCH v1] af_alg08: Allow EINVAL when calling recv() Wei Gao via ltp
@ 2026-05-19  8:43 ` Andrea Cervesato via ltp
  2026-05-19  8:53   ` Andrea Cervesato via ltp
  0 siblings, 1 reply; 5+ messages in thread
From: Andrea Cervesato via ltp @ 2026-05-19  8:43 UTC (permalink / raw)
  To: Wei Gao via ltp; +Cc: ltp

Reviewed-by: Andrea Cervesato <andrea.cervesato@suse.com>

--
Andrea Cervesato
SUSE QE Automation Engineer Linux
andrea.cervesato@suse.com

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [LTP] [PATCH v1] af_alg08: Allow EINVAL when calling recv()
  2026-05-19  8:43 ` Andrea Cervesato via ltp
@ 2026-05-19  8:53   ` Andrea Cervesato via ltp
  2026-05-19  8:55     ` Martin Doucha
  0 siblings, 1 reply; 5+ messages in thread
From: Andrea Cervesato via ltp @ 2026-05-19  8:53 UTC (permalink / raw)
  To: Andrea Cervesato; +Cc: Wei Gao via ltp

Sorry I didn't double check the CI. Can you please send a new
version fixing the patch applying issue?
https://github.com/linux-test-project/ltp/actions/runs/26086543445

--
Andrea Cervesato
SUSE QE Automation Engineer Linux
andrea.cervesato@suse.com

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [LTP] [PATCH v1] af_alg08: Allow EINVAL when calling recv()
  2026-05-19  8:53   ` Andrea Cervesato via ltp
@ 2026-05-19  8:55     ` Martin Doucha
  2026-05-19  9:35       ` Andrea Cervesato via ltp
  0 siblings, 1 reply; 5+ messages in thread
From: Martin Doucha @ 2026-05-19  8:55 UTC (permalink / raw)
  To: Andrea Cervesato; +Cc: Wei Gao via ltp

On 5/19/26 10:53, Andrea Cervesato via ltp wrote:
> Sorry I didn't double check the CI. Can you please send a new
> version fixing the patch applying issue?
> https://github.com/linux-test-project/ltp/actions/runs/26086543445

The patch fails to apply because the issue has already been fixed:
https://github.com/linux-test-project/ltp/commit/88b249e6bdf3086cb402c2aab324b200c3d0c2ea

-- 
Martin Doucha   mdoucha@suse.cz
SW Quality Engineer
SUSE LINUX, s.r.o.
CORSO IIa
Krizikova 148/34
186 00 Prague 8
Czech Republic

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [LTP] [PATCH v1] af_alg08: Allow EINVAL when calling recv()
  2026-05-19  8:55     ` Martin Doucha
@ 2026-05-19  9:35       ` Andrea Cervesato via ltp
  0 siblings, 0 replies; 5+ messages in thread
From: Andrea Cervesato via ltp @ 2026-05-19  9:35 UTC (permalink / raw)
  To: Martin Doucha; +Cc: Wei Gao via ltp

Hi Martin,

> On 5/19/26 10:53, Andrea Cervesato via ltp wrote:
> > Sorry I didn't double check the CI. Can you please send a new
> > version fixing the patch applying issue?
> > https://github.com/linux-test-project/ltp/actions/runs/26086543445
> 
> The patch fails to apply because the issue has already been fixed:
> https://github.com/linux-test-project/ltp/commit/88b249e6bdf3086cb402c2aab324b200c3d0c2ea

thanks for double checking.

Regards,
--
Andrea Cervesato
SUSE QE Automation Engineer Linux
andrea.cervesato@suse.com

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-05-19  9:36 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-19  6:57 [LTP] [PATCH v1] af_alg08: Allow EINVAL when calling recv() Wei Gao via ltp
2026-05-19  8:43 ` Andrea Cervesato via ltp
2026-05-19  8:53   ` Andrea Cervesato via ltp
2026-05-19  8:55     ` Martin Doucha
2026-05-19  9:35       ` Andrea Cervesato via ltp

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox