Linux-HyperV List
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Sergio Lopez" <slp@redhat.com>
Cc: virtualization@lists.linux.dev, kvm@vger.kernel.org,
	bpf@vger.kernel.org, linux-hyperv@vger.kernel.org,
	"Michael S. Tsirkin" <mst@redhat.com>,
	"Eugenio Perez" <eperezma@redhat.com>
Subject: Re: [PATCH RFC 8/8] vsock: add datagram tests to vsock_test
Date: Wed, 28 Oct 2026 16:12:23 +0000	[thread overview]
Message-ID: <sashiko-outbox-188128@kernel.org> (raw)
In-Reply-To: <20261028-vsock-dgram-support-v1-8-e457cf7cee78@sinrega.org>

Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [Low] vsock/test: missing opening brace in test_cases[] breaks compilation
- [Low] vsock/test: outdated datagram test IDs documented in README
--

commit f2fbe86b3992eecc82537eceffe22f137e4055d3
Author: Sergio Lopez <slp@redhat.com>

vsock: add datagram tests to vsock_test

This commit adds datagram test cases to vsock_test covering local semantics,
host/guest transfers, routing, and queue accounting, along with capability
checks and documentation updates.

> diff --git a/tools/testing/vsock/README b/tools/testing/vsock/README
> index 680ce666ceb56..be34b032ef135 100644
> --- a/tools/testing/vsock/README
> +++ b/tools/testing/vsock/README

[ ... ]

> @@ -51,6 +51,25 @@ suite run, e.g.
>  
>  For more information see Documentation/dev-tools/kmemleak.rst.
>  
> +Datagram tests
> +--------------
> +vsock_test includes datagram cases in the client/server runs above. Unsupported
> +cases print a skip reason.
> +
> +Virtio/vhost datagrams require kernel support on both sides and a VMM that
> +negotiates VIRTIO_VSOCK_F_DGRAM. Load vsock_loopback on both host and guest for
> +the local cases, and make /dev/vsock available. VMCI's dedicated datagram
> +transport takes priority when loaded, causing virtio/vhost cases to skip.
> +
> +Run only the local datagram cases without a peer or TCP control connection:
> +
> +  ./vsock_test --local
> +
> +Use --list and --pick <test_id> to select individual cases. The BPF admission
> +test (48, requiring BPF privileges) and nested routing test (49, requiring both
> +virtio and vhost transports) need explicit selection. The VMCI queue-length
> +test (53) runs only with VMCI.

[Severity: Low]
Are these test IDs off by 3?

In tools/testing/vsock/vsock_test.c, there are 44 existing entries in
test_cases[] before the new datagram tests (indices 0 through 43, ending with
the three SO_INQ test cases). That places test_dgram_sockmap() at index 51,
test_dgram_nested_source() at index 52, and test_dgram_vmci_inq() at index 56,
while indices 48, 49, and 53 correspond to test_dgram_connect(),
test_dgram_source_cid(), and test_dgram_sizes().

> diff --git a/tools/testing/vsock/vsock_test.c b/tools/testing/vsock/vsock_test.c
> index 10b9074fb87f7..f4ff6a42a9cb1 100644
> --- a/tools/testing/vsock/vsock_test.c
> +++ b/tools/testing/vsock/vsock_test.c

[ ... ]

> @@ -2911,6 +2912,95 @@ static struct test_case test_cases[] = {
>  	{
>  		.name = "SO_INQ option validation",
>  		.run_client = test_so_inq_validation_client,
> +	},
> +		.name = "SOCK_DGRAM autobind, duplicate bind and wildcard destination",
> +		.run_client = test_dgram_bind,
> +		.run_server = test_dgram_bind,
> +		.check = vsock_dgram_check_local,
> +		.local = true,
>  	},

[Severity: Low]
Is there a missing opening brace before the first SOCK_DGRAM entry in
test_cases[]? Without it, compiling tools/testing/vsock/vsock_test.c fails
with a syntax error because .name is parsed at the top level of the array
initializer and the following closing brace terminates test_cases[] early.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261028-vsock-dgram-support-v1-0-e457cf7cee78@sinrega.org?part=8

  reply	other threads:[~2026-10-28 16:12 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-28 16:04 [PATCH RFC 0/8] vsock: add datagram support to virtio and vhost Sergio Lopez
2026-10-28 16:04 ` [PATCH RFC 1/8] vsock: expose the core port allocator to transports Sergio Lopez
2026-10-28 16:04 ` [PATCH RFC 2/8] vsock: report datagram receive and send queue state Sergio Lopez
2026-10-28 16:04 ` [PATCH RFC 3/8] vsock/virtio: implement the datagram data path Sergio Lopez
2026-10-28 16:04 ` [PATCH RFC 4/8] vsock/virtio: negotiate datagram support on the guest Sergio Lopez
2026-10-28 16:04 ` [PATCH RFC 5/8] vhost/vsock: negotiate datagram support with guests Sergio Lopez
2026-10-28 16:20   ` sashiko-bot
2026-10-28 16:04 ` [PATCH RFC 6/8] vsock: allow datagrams to use directional transports Sergio Lopez
2026-10-28 16:34   ` sashiko-bot
2026-10-28 16:04 ` [PATCH RFC 7/8] vsock: preserve host-to-guest datagram boundaries Sergio Lopez
2026-10-28 16:23   ` sashiko-bot
2026-10-28 16:04 ` [PATCH RFC 8/8] vsock: add datagram tests to vsock_test Sergio Lopez
2026-10-28 16:12   ` sashiko-bot [this message]
2026-10-28 17:25 ` [PATCH RFC 0/8] vsock: add datagram support to virtio and vhost Alexei Starovoitov

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=sashiko-outbox-188128@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=eperezma@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-hyperv@vger.kernel.org \
    --cc=mst@redhat.com \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=slp@redhat.com \
    --cc=virtualization@lists.linux.dev \
    /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