lib/tst_af_alg.c: Fix wrong errno for unsupported AF_ALG
PATCH 1/1 lib/tst_af_alg.c: Fix wrong errno for unsupported AF_ALG
According to socket(2) manpage and source code, socket(2) actually returns EAFNOSUPPORT instead of EPROTONOSUPPORT when AF_ALG is not supported by kernel.
--- lib/tst_af_alg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
lib/tst_af_alg.c +1 -1
@@ -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 ;
Signature · 1 line
1.8.3.1
PATCH 1/1 lib/tst_af_alg.c: Fix wrong errno for unsupported AF_ALG
Quoted 30 lines · Xiao Yang
According to socket(2) manpage and source code, socket(2) actually returns EAFNOSUPPORT instead of EPROTONOSUPPORT when
AF_ALGis not supported by kernel.Signed-off-by Xiao Yang <[email protected]>--- lib/tst_af_alg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)lib/tst_af_alg.c +1
-1@@ -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 ;Signature · 7 lines
1.8.3.1 -- Mailing list info: https://lists.linux.it/listinfo/ltp
Thanks, somehow I missed this.
PATCH 1/1 lib/tst_af_alg.c: Fix wrong errno for unsupported AF_ALG
Quoted 29 lines · Eric Biggers
Quoted 28 lines · Xiao Yang
According to socket(2) manpage and source code, socket(2) actually returns EAFNOSUPPORT instead of EPROTONOSUPPORT when
AF_ALGis not supported by kernel.Signed-off-by Xiao Yang<[email protected]>--- lib/tst_af_alg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)lib/tst_af_alg.c +1
-1@@ -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 ;Signature · 1 line
1.8.3.1
Quoted 5 lines
Quoted 2 lines
Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltpThanks, somehow I missed this.
Reviewed-by Eric Biggers<[email protected]>
Hi Eric,
Pushed, thanks for your review. :-)
Best Regards,
Xiao Yang