lkml.org 
[lkml]   [2023]   [Mar]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC PATCH v1 2/2] vsock/test: update expected return values
On Sun, Mar 26, 2023 at 01:14:01AM +0300, Arseniy Krasnov wrote:
>This updates expected return values for invalid buffer test. Now such
>values are returned from transport, not from af_vsock.c.

Since only virtio transport supports it for now, it's okay.
In the future we should make sure that we have the same behavior between
transports.

Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>

>
>Signed-off-by: Arseniy Krasnov <AVKrasnov@sberdevices.ru>
>---
> tools/testing/vsock/vsock_test.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
>diff --git a/tools/testing/vsock/vsock_test.c b/tools/testing/vsock/vsock_test.c
>index 3de10dbb50f5..a91d0ef963be 100644
>--- a/tools/testing/vsock/vsock_test.c
>+++ b/tools/testing/vsock/vsock_test.c
>@@ -723,7 +723,7 @@ static void test_seqpacket_invalid_rec_buffer_server(const struct test_opts *opt
> exit(EXIT_FAILURE);
> }
>
>- if (errno != ENOMEM) {
>+ if (errno != EFAULT) {
> perror("unexpected errno of 'broken_buf'");
> exit(EXIT_FAILURE);
> }
>@@ -887,7 +887,7 @@ static void test_inv_buf_client(const struct test_opts *opts, bool stream)
> exit(EXIT_FAILURE);
> }
>
>- if (errno != ENOMEM) {
>+ if (errno != EFAULT) {
> fprintf(stderr, "unexpected recv(2) errno %d\n", errno);
> exit(EXIT_FAILURE);
> }
>--
>2.25.1
>

\
 
 \ /
  Last update: 2023-03-28 11:46    [W:0.383 / U:0.352 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site