testspdy fixes

This commit is contained in:
Andrey Uzunov
2013-09-19 09:52:52 +00:00
parent 89bdb4449f
commit f5d96db320
3 changed files with 18 additions and 11 deletions
+2 -2
View File
@@ -12,9 +12,9 @@ microspdy = microspdy
if HAVE_CURL
microspdy += spdy2http
endif
if HAVE_SPDYLAY
#if HAVE_SPDYLAY
microspdy += testspdy
endif
#endif
endif
endif
+12 -7
View File
@@ -21,19 +21,23 @@ if !HAVE_W32
PERF_GET_CONCURRENT=perf_get_concurrent
endif
if HAVE_SPDYLAY
SPDYLAY_CHECKS = test_new_connection test_request_response test_notls
endif
check_PROGRAMS = \
test_daemon_start_stop \
test_daemon_start_stop_many \
test_struct_namevalue \
test_struct_namevalue
if HAVE_SPDYLAY
check_PROGRAMS += \
test_new_connection \
test_request_response \
test_notls \
test_request_response_with_callback \
$(SPDYLAY_CHECKS)
#test_requests_with_assets \
test_misc \
test_session_timeout
#test_requests_with_assets
endif
TESTS = $(check_PROGRAMS)
@@ -81,7 +85,6 @@ test_notls_SOURCES = \
$(SPDY_SOURCES)
test_notls_LDADD = $(SPDY_LDADD) \
-lspdylay
endif
test_request_response_with_callback_SOURCES = \
test_request_response_with_callback.c \
@@ -112,3 +115,5 @@ test_proxies_SOURCES = \
$(SPDY_SOURCES)
test_proxies_LDADD = $(SPDY_LDADD)
endif
endif
+4 -2
View File
@@ -488,6 +488,7 @@ static int connect_to(const char *host, uint16_t port)
}
close(fd);
fd = -1;
dief("connect", strerror(errno));
}
freeaddrinfo(res);
return fd;
@@ -498,11 +499,11 @@ static void make_non_block(int fd)
int flags, rv;
while((flags = fcntl(fd, F_GETFL, 0)) == -1 && errno == EINTR);
if(flags == -1) {
dief("fcntl", strerror(errno));
dief("fcntl1", strerror(errno));
}
while((rv = fcntl(fd, F_SETFL, flags | O_NONBLOCK)) == -1 && errno == EINTR);
if(rv == -1) {
dief("fcntl", strerror(errno));
dief("fcntl2", strerror(errno));
}
}
@@ -843,6 +844,7 @@ childproc(int port)
act.sa_handler = SIG_IGN;
sigaction(SIGPIPE, &act, 0);
usleep(10000);
asprintf(&uristr, "https://127.0.0.1:%i/",port);
if(NULL == (rcvbuf = malloc(strlen(RESPONSE_BODY)+1)))
killparent(parent,"no memory");