<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/tools/testing/vsock/util.h, branch v6.12.80</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.12.80</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.12.80'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2026-02-12T12:14:57+00:00</updated>
<entry>
<title>vsock/test: verify socket options after setting them</title>
<updated>2026-02-12T12:14:57+00:00</updated>
<author>
<name>Konstantin Shkolnyy</name>
<email>kshk@linux.ibm.com</email>
</author>
<published>2024-12-03T15:06:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=aa9f6f353bcc3eb0ae96ff1bbaf77ced08a9b932'/>
<id>urn:sha1:aa9f6f353bcc3eb0ae96ff1bbaf77ced08a9b932</id>
<content type='text'>
commit 86814d8ffd55fd4ad19c512eccd721522a370fb2 upstream.

Replace setsockopt() calls with calls to functions that follow
setsockopt() with getsockopt() and check that the returned value and its
size are the same as have been set. (Except in vsock_perf.)

Signed-off-by: Konstantin Shkolnyy &lt;kshk@linux.ibm.com&gt;
Reviewed-by: Stefano Garzarella &lt;sgarzare@redhat.com&gt;
Signed-off-by: Paolo Abeni &lt;pabeni@redhat.com&gt;
[Stefano: patch needed to avoid vsock test build failure reported by
 Johan Korsnes after backporting commit 0a98de8013696 ("vsock/test: fix
 seqpacket message bounds test") in 6.12-stable tree]
Signed-off-by: Stefano Garzarella &lt;sgarzare@redhat.com&gt;
Tested-by: Johan Korsnes &lt;johan.korsnes@remarkable.no&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>test/vsock: add ioctl unsent bytes test</title>
<updated>2024-08-02T08:20:28+00:00</updated>
<author>
<name>Luigi Leonardi</name>
<email>luigi.leonardi@outlook.com</email>
</author>
<published>2024-07-30T19:43:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=18ee44ce97c18ee72f5807140d07ff8cebe3cab5'/>
<id>urn:sha1:18ee44ce97c18ee72f5807140d07ff8cebe3cab5</id>
<content type='text'>
Introduce two tests, one for SOCK_STREAM and one for SOCK_SEQPACKET,
which use SIOCOUTQ ioctl to check that the number of unsent bytes is
zero after delivering a packet.

vsock_connect and vsock_accept are no longer static: this is to
create more generic tests, allowing code to be reused for SEQPACKET
and STREAM.

Signed-off-by: Luigi Leonardi &lt;luigi.leonardi@outlook.com&gt;
Reviewed-by: Stefano Garzarella &lt;sgarzare@redhat.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>vsock/test: add '--peer-port' input argument</title>
<updated>2024-01-25T01:47:35+00:00</updated>
<author>
<name>Arseniy Krasnov</name>
<email>avkrasnov@salutedevices.com</email>
</author>
<published>2024-01-23T07:27:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e18c709230cb05886fdcf6b90ef21a0a733079d7'/>
<id>urn:sha1:e18c709230cb05886fdcf6b90ef21a0a733079d7</id>
<content type='text'>
Implement port for given CID as input argument instead of using
hardcoded value '1234'. This allows to run different test instances
on a single CID. Port argument is not required parameter and if it is
not set, then default value will be '1234' - thus we preserve previous
behaviour.

Signed-off-by: Arseniy Krasnov &lt;avkrasnov@salutedevices.com&gt;
Reviewed-by: Stefano Garzarella &lt;sgarzare@redhat.com&gt;
Acked-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
Link: https://lore.kernel.org/r/20240123072750.4084181-1-avkrasnov@salutedevices.com
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>test/vsock: add dobule bind connect test</title>
<updated>2023-11-07T22:27:07+00:00</updated>
<author>
<name>Filippo Storniolo</name>
<email>f.storniolo95@gmail.com</email>
</author>
<published>2023-11-03T17:55:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=d80f63f690257b04b4fe3731b90dbf34a9ebb93f'/>
<id>urn:sha1:d80f63f690257b04b4fe3731b90dbf34a9ebb93f</id>
<content type='text'>
This add bind connect test which creates a listening server socket
and tries to connect a client with a bound local port to it twice.

Co-developed-by: Luigi Leonardi &lt;luigi.leonardi@outlook.com&gt;
Signed-off-by: Luigi Leonardi &lt;luigi.leonardi@outlook.com&gt;
Signed-off-by: Filippo Storniolo &lt;f.storniolo95@gmail.com&gt;
Reviewed-by: Stefano Garzarella &lt;sgarzare@redhat.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>test/vsock: MSG_ZEROCOPY flag tests</title>
<updated>2023-10-15T12:19:42+00:00</updated>
<author>
<name>Arseniy Krasnov</name>
<email>avkrasnov@salutedevices.com</email>
</author>
<published>2023-10-10T19:15:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=bc36442ef3b776ee6d5148a4e175c367af057ce1'/>
<id>urn:sha1:bc36442ef3b776ee6d5148a4e175c367af057ce1</id>
<content type='text'>
This adds three tests for MSG_ZEROCOPY feature:
1) SOCK_STREAM tx with different buffers.
2) SOCK_SEQPACKET tx with different buffers.
3) SOCK_STREAM test to read empty error queue of the socket.

Patch also works as preparation for the next patches for tools in this
patchset: vsock_perf and vsock_uring_test:
1) Adds several new functions to util.c - they will be also used by
   vsock_uring_test.
2) Adds two new functions for MSG_ZEROCOPY handling to a new source
   file - such source will be shared between vsock_test, vsock_perf and
   vsock_uring_test, thus avoiding code copy-pasting.

Signed-off-by: Arseniy Krasnov &lt;avkrasnov@salutedevices.com&gt;
Reviewed-by: Stefano Garzarella &lt;sgarzare@redhat.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>vsock/test: add send_buf() utility function</title>
<updated>2023-09-17T16:42:37+00:00</updated>
<author>
<name>Stefano Garzarella</name>
<email>sgarzare@redhat.com</email>
</author>
<published>2023-09-15T12:14:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=12329bd51fdcde211fd9c76015ded4db3458ba8a'/>
<id>urn:sha1:12329bd51fdcde211fd9c76015ded4db3458ba8a</id>
<content type='text'>
Move the code of send_byte() out in a new utility function that
can be used to send a generic buffer.

This new function can be used when we need to send a custom
buffer and not just a single 'A' byte.

Signed-off-by: Stefano Garzarella &lt;sgarzare@redhat.com&gt;
Reviewed-by: Arseniy Krasnov &lt;avkrasnov@salutedevices.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>vsock/test: add recv_buf() utility function</title>
<updated>2023-09-17T16:42:37+00:00</updated>
<author>
<name>Stefano Garzarella</name>
<email>sgarzare@redhat.com</email>
</author>
<published>2023-09-15T12:14:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a8ed71a27ef524c808b518031feac811ed3e741c'/>
<id>urn:sha1:a8ed71a27ef524c808b518031feac811ed3e741c</id>
<content type='text'>
Move the code of recv_byte() out in a new utility function that
can be used to receive a generic buffer.

This new function can be used when we need to receive a custom
buffer and not just a single 'A' byte.

Signed-off-by: Stefano Garzarella &lt;sgarzare@redhat.com&gt;
Reviewed-by: Arseniy Krasnov &lt;avkrasnov@salutedevices.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>test/vsock: rework message bounds test</title>
<updated>2023-01-12T11:53:54+00:00</updated>
<author>
<name>Arseniy Krasnov</name>
<email>AVKrasnov@sberdevices.ru</email>
</author>
<published>2023-01-10T10:15:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=5c338112e48ab1937f99e4a8990a82c999fda126'/>
<id>urn:sha1:5c338112e48ab1937f99e4a8990a82c999fda126</id>
<content type='text'>
This updates message bound test making it more complex. Instead of
sending 1 bytes messages with one MSG_EOR bit, it sends messages of
random length(one half of messages are smaller than page size, second
half are bigger) with random number of MSG_EOR bits set. Receiver
also don't know total number of messages.

Signed-off-by: Arseniy Krasnov &lt;AVKrasnov@sberdevices.ru&gt;
Reviewed-by: Stefano Garzarella &lt;sgarzare@redhat.com&gt;
Signed-off-by: Paolo Abeni &lt;pabeni@redhat.com&gt;
</content>
</entry>
<entry>
<title>vsock_test: add SOCK_SEQPACKET tests</title>
<updated>2021-06-11T20:32:47+00:00</updated>
<author>
<name>Arseny Krasnov</name>
<email>arseny.krasnov@kaspersky.com</email>
</author>
<published>2021-06-11T11:14:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=41b792d7a86dd7fc77d5877e814d322e9f7efa75'/>
<id>urn:sha1:41b792d7a86dd7fc77d5877e814d322e9f7efa75</id>
<content type='text'>
Implement two tests of SOCK_SEQPACKET socket: first sends data by
several 'write()'s and checks that number of 'read()' were same.
Second test checks MSG_TRUNC flag. Cases for connect(), bind(),
etc. are not tested, because it is same as for stream socket.

Signed-off-by: Arseny Krasnov &lt;arseny.krasnov@kaspersky.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>testing/vsock: add parameters to list and skip tests</title>
<updated>2019-12-21T05:09:21+00:00</updated>
<author>
<name>Stefano Garzarella</name>
<email>sgarzare@redhat.com</email>
</author>
<published>2019-12-18T18:07:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=5a2b2425634dd8d340d3889f2317a752a1a87618'/>
<id>urn:sha1:5a2b2425634dd8d340d3889f2317a752a1a87618</id>
<content type='text'>
Some tests can fail with transports that have a slightly
different behavior, so let's add the possibility to specify
which tests to skip.

Signed-off-by: Stefano Garzarella &lt;sgarzare@redhat.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
