mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-09-18 22:14:16 +00:00
vsock/test: fix vsock_ioctl_int() check for unsupported ioctl
`vsock_do_ioctl` returns -ENOIOCTLCMD if an ioctl support is not implemented, like for SIOCINQ before commitf7c7226592
("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:53548d6bff
("test/vsock: Add retry mechanism to ioctl wrapper") Cc: niuxuewei.nxw@antgroup.com Signed-off-by: Stefano Garzarella <sgarzare@redhat.com> Reviewed-by: Xuewei Niu <niuxuewei.nxw@antgroup.com> Link: https://patch.msgid.link/20250715093233.94108-1-sgarzare@redhat.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
7eeabfb237
commit
47ee43e4bf
1 changed files with 1 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue