summaryrefslogtreecommitdiffstats
path: root/tests/test_echo_tcp_writev_readv.c
diff options
context:
space:
mode:
authorJakub Hrozek <jakub.hrozek@gmail.com>2013-12-23 15:37:06 +0100
committerJakub Hrozek <jhrozek@redhat.com>2013-12-23 14:43:46 +0100
commit3c4759afc44b73484e99b130e931b2779b1f956c (patch)
treef445d188c1f08077a7e6700b5d9e9e73ef29bce8 /tests/test_echo_tcp_writev_readv.c
parent450f4f31c5afe4516a5db5fc071aa012dfb64202 (diff)
downloadsocket_wrapper-3c4759afc44b73484e99b130e931b2779b1f956c.tar.gz
socket_wrapper-3c4759afc44b73484e99b130e931b2779b1f956c.tar.xz
socket_wrapper-3c4759afc44b73484e99b130e931b2779b1f956c.zip
tests: writev/readv must have iovec > 0
writev/readv with iovec == 0 works on Linux, but that is not portable.
Diffstat (limited to 'tests/test_echo_tcp_writev_readv.c')
-rw-r--r--tests/test_echo_tcp_writev_readv.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/test_echo_tcp_writev_readv.c b/tests/test_echo_tcp_writev_readv.c
index 0aa1ae2..9f6703f 100644
--- a/tests/test_echo_tcp_writev_readv.c
+++ b/tests/test_echo_tcp_writev_readv.c
@@ -59,7 +59,7 @@ static void test_writev_readv_ipv4(void **state)
rc = connect(s, (struct sockaddr *)&sin, slen);
assert_int_equal(rc, 0);
- for (i = 0; i < 10; i++) {
+ for (i = 1; i < 10; i++) {
char send_buf[10][64];
char recv_buf[10][64];
struct iovec iov_send[10];
@@ -123,7 +123,7 @@ static void test_writev_readv_ipv6(void **state)
rc = connect(s, (struct sockaddr *)&sin6, slen);
assert_int_equal(rc, 0);
- for (i = 0; i < 10; i++) {
+ for (i = 1; i < 10; i++) {
char send_buf[10][64];
char recv_buf[10][64];
struct iovec iov_send[10];