From: Xuewei Niu <niuxuewei.nxw@antgroup.com>
To: Stefano Garzarella <sgarzare@redhat.com>, netdev@vger.kernel.org
Subject: Re: [PATCH net-next] vsock/test: fix vsock_ioctl_int() check for unsupported ioctl
Date: Tue, 15 Jul 2025 17:59:34 +0800 [thread overview]
Message-ID: <0334dc60-9c95-4e46-8af1-93d522a12ebf@antgroup.com> (raw)
In-Reply-To: <20250715093233.94108-1-sgarzare@redhat.com>
On 2025/7/15 17:32, Stefano Garzarella wrote:
> From: Stefano Garzarella <sgarzare@redhat.com>
>
> `vsock_do_ioctl` returns -ENOIOCTLCMD if an ioctl support is not
> implemented, like for SIOCINQ before commit f7c722659275 ("vsock: Add
> support for SIOCINQ ioctl"). In net/socket.c, -ENOIOCTLCMD is re-mapped
> to -ENOTTY for the user space. So, our test suite, without that commit
> applied, is failing in this way:
>
> 34 - SOCK_STREAM ioctl(SIOCINQ) functionality...ioctl(21531): Inappropriate ioctl for device
>
> Return false in vsock_ioctl_int() to skip the test in this case as well,
> instead of failing.
>
> Fixes: 53548d6bffac ("test/vsock: Add retry mechanism to ioctl wrapper")
> Cc: niuxuewei.nxw@antgroup.com
> Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
> ---
> tools/testing/vsock/util.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/testing/vsock/util.c b/tools/testing/vsock/util.c
> index 1e65c5abd85b..7b861a8e997a 100644
> --- a/tools/testing/vsock/util.c
> +++ b/tools/testing/vsock/util.c
> @@ -116,7 +116,7 @@ bool vsock_ioctl_int(int fd, unsigned long op, int expected)
> do {
> ret = ioctl(fd, op, &actual);
> if (ret < 0) {
> - if (errno == EOPNOTSUPP)
> + if (errno == EOPNOTSUPP || errno == ENOTTY)
> break;
>
> perror(name);
LGTM, thanks!
Reviewed-by: Xuewei Niu <niuxuewei.nxw@antgroup.com>
next prev parent reply other threads:[~2025-07-15 9:59 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-15 9:32 [PATCH net-next] vsock/test: fix vsock_ioctl_int() check for unsupported ioctl Stefano Garzarella
2025-07-15 9:59 ` Xuewei Niu [this message]
2025-07-16 23:20 ` patchwork-bot+netdevbpf
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=0334dc60-9c95-4e46-8af1-93d522a12ebf@antgroup.com \
--to=niuxuewei.nxw@antgroup.com \
--cc=netdev@vger.kernel.org \
--cc=sgarzare@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.