[LTP] [PATCH 2/2] af_alg08: Allow recv() to return EINVAL

Petr Vorel pvorel@suse.cz
Tue May 12 20:00:37 CEST 2026


> Recent kernels return EBADMSG from recv() when the crypto operation
> fails. However, older kernels return EINVAL instead. Accept both
> errno values.

...
> +++ b/testcases/kernel/crypto/af_alg08.c
> @@ -60,6 +60,10 @@ static int algfd = -1;
>  static int reqfd = -1;
>  static int pipefd[2] = { -1, -1 };
>  static int file_fd = -1;
> +static const int exp_errnos[] = {
> +	EBADMSG,
> +	EINVAL

I'm also ok with not detecting kernel version because this is not a subject of
testing. I guess that's the rule for question "when to bother with kernel
version check for specific errno". Maybe we should mention it in the test macro
doc.

Anyway, merged.

Kind regards,
Petr


More information about the ltp mailing list