projects
/
linux-2.6-microblaze.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge tag 'char-misc-5.15-rc1-lkdtm' of git://git.kernel.org/pub/scm/linux/kernel...
[linux-2.6-microblaze.git]
/
tools
/
testing
/
vsock
/
vsock_test.c
diff --git
a/tools/testing/vsock/vsock_test.c
b/tools/testing/vsock/vsock_test.c
index
67766bf
..
2a3638c
100644
(file)
--- a/
tools/testing/vsock/vsock_test.c
+++ b/
tools/testing/vsock/vsock_test.c
@@
-282,6
+282,7
@@
static void test_stream_msg_peek_server(const struct test_opts *opts)
}
#define MESSAGES_CNT 7
}
#define MESSAGES_CNT 7
+#define MSG_EOR_IDX (MESSAGES_CNT / 2)
static void test_seqpacket_msg_bounds_client(const struct test_opts *opts)
{
int fd;
static void test_seqpacket_msg_bounds_client(const struct test_opts *opts)
{
int fd;
@@
-294,7
+295,7
@@
static void test_seqpacket_msg_bounds_client(const struct test_opts *opts)
/* Send several messages, one with MSG_EOR flag */
for (int i = 0; i < MESSAGES_CNT; i++)
/* Send several messages, one with MSG_EOR flag */
for (int i = 0; i < MESSAGES_CNT; i++)
- send_byte(fd, 1, 0);
+ send_byte(fd, 1,
(i == MSG_EOR_IDX) ? MSG_EOR :
0);
control_writeln("SENDDONE");
close(fd);
control_writeln("SENDDONE");
close(fd);
@@
-324,6
+325,11
@@
static void test_seqpacket_msg_bounds_server(const struct test_opts *opts)
perror("message bound violated");
exit(EXIT_FAILURE);
}
perror("message bound violated");
exit(EXIT_FAILURE);
}
+
+ if ((i == MSG_EOR_IDX) ^ !!(msg.msg_flags & MSG_EOR)) {
+ perror("MSG_EOR");
+ exit(EXIT_FAILURE);
+ }
}
close(fd);
}
close(fd);