summaryrefslogtreecommitdiffstats
path: root/src/bench
diff options
context:
space:
mode:
authorSimon Rettberg2019-08-06 14:04:58 +0200
committerSimon Rettberg2019-08-06 14:04:58 +0200
commit9f5a61cc018831e33161d44ff940f59105b792e3 (patch)
tree45c7d3236f729d3554b02570ba05b57a35262212 /src/bench
parent[BENCH] Fix a couple bugs in stress tester (diff)
downloaddnbd3-9f5a61cc018831e33161d44ff940f59105b792e3.tar.gz
dnbd3-9f5a61cc018831e33161d44ff940f59105b792e3.tar.xz
dnbd3-9f5a61cc018831e33161d44ff940f59105b792e3.zip
[BENCH] Increase timeouts, fix block payload reading
Diffstat (limited to 'src/bench')
-rw-r--r--src/bench/connection.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/bench/connection.c b/src/bench/connection.c
index 2e40019..03ad9e5 100644
--- a/src/bench/connection.c
+++ b/src/bench/connection.c
@@ -82,10 +82,10 @@ bool connection_init_n_times(
continue;
// Try to connect
dnbd3_reply_t reply;
- sock = sock_connect( &altservers[i].host, 500, SOCKET_KEEPALIVE_TIMEOUT * 1000 );
+ sock = sock_connect( &altservers[i].host, 3500, 10000 );
if ( sock == -1 ) {
counters->fails++;
- logadd( LOG_ERROR, "Could not connect to host" );
+ logadd( LOG_ERROR, "Could not connect to host (errno=%d)", errno );
} else if ( !dnbd3_select_image( sock, lowerImage, rid, 0 ) ) {
counters->fails++;
logadd( LOG_ERROR, "Could not send select image" );
@@ -101,7 +101,7 @@ bool connection_init_n_times(
} else if ( !dnbd3_get_reply( sock, &reply ) ) {
counters->fails++;
logadd( LOG_ERROR, "recv: get block header failed" );
- } else if ( recv( sock, trash, sizeof(trash), 0 ) != sizeof(trash) ) {
+ } else if ( recv( sock, trash, sizeof(trash), MSG_WAITALL|MSG_NOSIGNAL ) != sizeof(trash) ) {
counters->fails++;
logadd( LOG_ERROR, "recv: get block payload failed" );
} else {