From: Petr Vorel <pvorel@suse.cz>
To: Wei Gao <wegao@suse.com>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH v1] recvmsg01: Refactor using new LTP API
Date: Thu, 30 Mar 2023 07:58:02 +0200 [thread overview]
Message-ID: <20230330055802.GB937278@pevik> (raw)
In-Reply-To: <20230329133828.24835-1-wegao@suse.com>
Hi Wei,
{
PF_INET, SOCK_STREAM, 0, iov, 1, (void *)buf, sizeof(buf),
&msgdat, -1, (struct sockaddr *)&from, -1, -1,
EINVAL, setup1, cleanup1, "invalid socket length"},
.flags is -1 here, it's unsigned int, please use UINT_MAX (the same value, but
more obvious).
> - for (lc = 0; TEST_LOOPING(lc); ++lc) {
> - tst_count = 0;
> - for (testno = 0; testno < TST_TOTAL; ++testno) {
> - if ((tst_kvercmp(3, 17, 0) < 0)
> - && (tdat[testno].flags & MSG_ERRQUEUE)
> - && (tdat[testno].type & SOCK_STREAM)) {
> - tst_resm(TCONF, "skip MSG_ERRQUEUE test, "
> - "it's supported from 3.17");
> - continue;
> - }
...
> + if ((tst_kvercmp(3, 17, 0) < 0)
> + && (tc->flags & MSG_ERRQUEUE)
> + && (tc->type & SOCK_STREAM)) {
> + tst_res(TCONF, "skip MSG_ERRQUEUE test, "
> + "it's supported from 3.17");
The reason for the MSG_ERRQUEUE on SOCK_STREAM was described in
e5fd512d8 ("skip MSG_ERRQUEUE+tcp test on kernels < 3.17")
The limitation for MSG_ERRQUEUE is only on SOCK_STREAM, but because MSG_ERRQUEUE
is tested only on SOCK_STREAM, it should be enough to check just MSG_ERRQUEUE.
Also, UINT_MAX & MSG_ERRQUEUE is always true (in "invalid socket length") and I
don't think that test should be skipped.
The check could be:
if (tc->flags != UINT_MAX && tc->flags & MSG_ERRQUEUE
&& tst_kvercmp(3, 17, 0) < 0) {
tst_res(TCONF, "MSG_ERRQUEUE support for TCP has been added in 3.17");
}
Kind regards,
Petr
--
Mailing list info: https://lists.linux.it/listinfo/ltp
next prev parent reply other threads:[~2023-03-30 5:58 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-29 13:38 [LTP] [PATCH v1] recvmsg01: Refactor using new LTP API Wei Gao via ltp
2023-03-30 5:17 ` Petr Vorel
2023-03-30 5:58 ` Petr Vorel [this message]
2023-04-24 10:30 ` [LTP] [PATCH v2] " Wei Gao via ltp
2023-04-28 12:46 ` Petr Vorel
2023-04-30 7:15 ` Wei Gao via ltp
2023-04-30 6:04 ` [LTP] [PATCH v3] " Wei Gao via ltp
2023-05-02 10:31 ` Petr Vorel
2023-05-02 10:32 ` Petr Vorel
2023-05-02 11:53 ` Wei Gao via ltp
2023-05-02 14:12 ` Petr Vorel
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=20230330055802.GB937278@pevik \
--to=pvorel@suse.cz \
--cc=ltp@lists.linux.it \
--cc=wegao@suse.com \
/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;
as well as URLs for NNTP newsgroup(s).