recvmsg01: Skip unsupported test
PATCH 1/1 recvmsg01: Skip unsupported test
Since it's already stated that MSQ_ERRQUEUE + SOCK_STREAM is not supported on kernels < 3.17, let's actually skip this test.
--- testcases/kernel/syscalls/recvmsg/recvmsg01.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
testcases/kernel/syscalls/recvmsg/recvmsg01.c +2 -2
@@ -220,14 +220,14 @@ static void run(unsigned int n)struct tcase *tc = &tcases[n];int ret = tc->exp_errno ?-1 :0 ; -setup_all (); -if ((tst_kvercmp (3 ,17 ,0 ) <0 ) && (tc->flags &MSG_ERRQUEUE ) && (tc->type &SOCK_STREAM )) {tst_res (TCONF ,"MSG_ERRQUEUE requires kernel >= 3.17" ); +return ; } +setup_all (); tc->setup (n); iov[0 ].iov_base = tc->recv_buf;
Signature · 5 lines
2.42.0 -- Mailing list info: https://lists.linux.it/listinfo/ltp
Quoted 16 lines · Takuya Wakazono
Since it's already stated that
MSQ_ERRQUEUE+SOCK_STREAMis not supported on kernels < 3.17, let's actually skip this test.Fixes 7d365d72ba71 ("recvmsg01: Refactor using new LTP API")Signed-off-by Takuya Wakazono <[email protected]>--- testcases/kernel/syscalls/recvmsg/recvmsg01.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)testcases/kernel/syscalls/recvmsg/recvmsg01.c +0
-0@@ -220,14 +220,14 @@ static void run(unsigned int n)struct tcase *tc = &tcases[n];
testcases/kernel/syscalls/recvmsg/recvmsg01.c static void run(unsigned int n) · line 228
Quoted 10 lines
testcases/kernel/syscalls/recvmsg/recvmsg01.c +1
-2int ret = tc->exp_errno ?-1 :0 ; -setup_all (); -if ((tst_kvercmp (3 ,17 ,0 ) <0 ) && (tc->flags &MSG_ERRQUEUE ) && (tc->type &SOCK_STREAM )) {tst_res (TCONF ,"MSG_ERRQUEUE requires kernel >= 3.17" ); +return ;
It'd be better to use tst_brk TCONF rather than tst_res + return.
The rest looks good.
Quoted 14 lines
testcases/kernel/syscalls/recvmsg/recvmsg01.c +1
-0} +setup_all (); tc->setup (n);iov[0].iov_base = tc->recv_buf;--
2.42.0--
Mailing list info: https://lists.linux.it/listinfo/ltp
Signature · 5 lines
Regards, Li Wang -- Mailing list info: https://lists.linux.it/listinfo/ltp
Hi Li,
Thanks for the review.
Quoted 8 lines
Quoted 6 lines
if ((tst_kvercmp(3, 17, 0) < 0) && (tc->flags & MSG_ERRQUEUE) && (tc->type & SOCK_STREAM)) { tst_res(TCONF, "MSG_ERRQUEUE requires kernel >= 3.17");+ return;
It'd be better to use
tst_brkTCONF rather thantst_res+ return.
Wouldn't that abort all subsequent test cases? We only want to skip the MSG_ERRQUEUE test cases.
Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp
Quoted 10 lines · Takuya Wakazono
Hi Li,
Thanks for the review.Quoted 7 lines
Quoted 6 lines
if ((tst_kvercmp(3, 17, 0) < 0) && (tc->flags & MSG_ERRQUEUE) && (tc->type & SOCK_STREAM)) { tst_res(TCONF, "MSG_ERRQUEUE requires kernel >= 3.17");+ return;
Quoted 5 lines
Quoted 1 line
It'd be better to use
tst_brkTCONF rather thantst_res+ return.Wouldn't that abort all subsequent test cases? We only want to skip the
MSG_ERRQUEUEtest cases.
Ah, yes, I overlooked that tcases traverse. Sorry~
Signature · 5 lines
Regards, Li Wang -- Mailing list info: https://lists.linux.it/listinfo/ltp