Thread (51 messages) 51 messages, 4 authors, 2025-07-29

Re: [RFC PATCH net-next v6 14/14] test/vsock: add vsock dgram tests

From: Amery Hung <hidden>
Date: 2024-07-28 22:06:26
Also in: bpf, kvm, linux-hyperv, lkml, virtualization

On Tue, Jul 23, 2024 at 7:43 AM Stefano Garzarella [off-list ref] wrote:
On Wed, Jul 10, 2024 at 09:25:55PM GMT, Amery Hung wrote:
quoted
From: Bobby Eshleman <redacted>

From: Jiang Wang <redacted>

This commit adds tests for vsock datagram.

Signed-off-by: Bobby Eshleman <redacted>
Signed-off-by: Jiang Wang <redacted>
Signed-off-by: Amery Hung <redacted>
---
tools/testing/vsock/util.c       |  177 ++++-
tools/testing/vsock/util.h       |   10 +
tools/testing/vsock/vsock_test.c | 1032 ++++++++++++++++++++++++++----
3 files changed, 1099 insertions(+), 120 deletions(-)
diff --git a/tools/testing/vsock/util.c b/tools/testing/vsock/util.c
index 554b290fefdc..14d6cd90ca15 100644
--- a/tools/testing/vsock/util.c
+++ b/tools/testing/vsock/util.c
@@ -154,7 +154,8 @@ static int vsock_connect(unsigned int cid, unsigned int port, int type)
      int ret;
      int fd;

-      control_expectln("LISTENING");
+      if (type != SOCK_DGRAM)
+              control_expectln("LISTENING");
Why it is not needed?
I think we actually need it. I will add control_write("LISTENING") in
vsock_dgram_bind().
BTW this patch is too big to be reviewed, please split it.
Will do.

Thank you,
Amery
Thanks,
Stefano
quoted
      fd = socket(AF_VSOCK, type, 0);
      if (fd < 0) {
@@ -189,6 +190,11 @@ int vsock_seqpacket_connect(unsigned int cid, unsigned int port)
      return vsock_connect(cid, port, SOCK_SEQPACKET);
}
[...]
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help