From: Xiao Yang <yangx.jy@cn.fujitsu.com>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH] lib/tst_af_alg.c: Fix wrong errno for unsupported AF_ALG
Date: Wed, 20 Mar 2019 09:49:05 +0800 [thread overview]
Message-ID: <5C919C11.3090305@cn.fujitsu.com> (raw)
In-Reply-To: <20190319164017.GA202956@gmail.com>
On 2019/03/20 0:40, Eric Biggers wrote:
> On Tue, Mar 19, 2019 at 11:25:02AM +0800, Xiao Yang wrote:
>> According to socket(2) manpage and source code, socket(2) actually
>> returns EAFNOSUPPORT instead of EPROTONOSUPPORT when AF_ALG is not
>> supported by kernel.
>>
>> Signed-off-by: Xiao Yang<yangx.jy@cn.fujitsu.com>
>> ---
>> lib/tst_af_alg.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/lib/tst_af_alg.c b/lib/tst_af_alg.c
>> index 9ce1ca4..97be548 100644
>> --- a/lib/tst_af_alg.c
>> +++ b/lib/tst_af_alg.c
>> @@ -16,7 +16,7 @@ int tst_alg_create(void)
>> TEST(socket(AF_ALG, SOCK_SEQPACKET, 0));
>> if (TST_RET>= 0)
>> return TST_RET;
>> - if (TST_ERR == EPROTONOSUPPORT)
>> + if (TST_ERR == EAFNOSUPPORT)
>> tst_brk(TCONF, "kernel doesn't support AF_ALG");
>> tst_brk(TBROK | TTERRNO, "unexpected error creating AF_ALG socket");
>> return -1;
>> --
>> 1.8.3.1
>>
>>
>>
>>
>> --
>> Mailing list info: https://lists.linux.it/listinfo/ltp
> Thanks, somehow I missed this.
>
> Reviewed-by: Eric Biggers<ebiggers@google.com>
Hi Eric,
Pushed, thanks for your review. :-)
Best Regards,
Xiao Yang
>
>
prev parent reply other threads:[~2019-03-20 1:49 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-19 3:25 [LTP] [PATCH] lib/tst_af_alg.c: Fix wrong errno for unsupported AF_ALG Xiao Yang
2019-03-19 16:40 ` Eric Biggers
2019-03-20 1:49 ` Xiao Yang [this message]
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=5C919C11.3090305@cn.fujitsu.com \
--to=yangx.jy@cn.fujitsu.com \
--cc=ltp@lists.linux.it \
/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