]> git.ipfire.org Git - thirdparty/linux.git/commit
test/vsock: Add retry mechanism to ioctl wrapper
authorXuewei Niu <niuxuewei.nxw@antgroup.com>
Tue, 8 Jul 2025 06:36:13 +0000 (14:36 +0800)
committerJakub Kicinski <kuba@kernel.org>
Thu, 10 Jul 2025 02:29:52 +0000 (19:29 -0700)
commit53548d6bffacc610ee883d3c0e99eb476fb606d3
tree0186f3b408c34a6aa75fb74854a1f557c0af9a25
parentf7c72265927540fb24c99fee8a54da7db537656c
test/vsock: Add retry mechanism to ioctl wrapper

Wrap the ioctl in `ioctl_int()`, which takes a pointer to the actual
int value and an expected int value. The function will not return until
either the ioctl returns the expected value or a timeout occurs, thus
avoiding immediate failure.

Signed-off-by: Xuewei Niu <niuxuewei.nxw@antgroup.com>
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
Reviewed-by: Luigi Leonardi <leonardi@redhat.com>
Link: https://patch.msgid.link/20250708-siocinq-v6-3-3775f9a9e359@antgroup.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
tools/testing/vsock/util.c
tools/testing/vsock/util.h