On Tue, Jul 23, 2024 at 7:43 AM Stefano Garzarella <[email protected]> wrote:
>
> On Wed, Jul 10, 2024 at 09:25:55PM GMT, Amery Hung wrote:
> >From: Bobby Eshleman <[email protected]>
> >
> >From: Jiang Wang <[email protected]>
> >
> >This commit adds tests for vsock datagram.
> >
> >Signed-off-by: Bobby Eshleman <[email protected]>
> >Signed-off-by: Jiang Wang <[email protected]>
> >Signed-off-by: Amery Hung <[email protected]>
> >---
> > 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
>
> >
> > 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);
> > }
> >
[...]