diff options
author | Craig Tiller <ctiller@google.com> | 2015-06-01 17:04:17 -0700 |
---|---|---|
committer | Craig Tiller <ctiller@google.com> | 2015-06-01 17:04:17 -0700 |
commit | 8e0b08a33d819d0a2523ec439d545296e1ad2086 (patch) | |
tree | 5613a61a51db9c5a5f7ecc5fec8cfd0eb0b2c436 /test | |
parent | 3c1331f920569ba3a182e13321db26796d6e920e (diff) | |
parent | fa275a97b968060383fe27c26b1d85f08d9582f9 (diff) |
Merge branch 'count-the-things' into we-dont-need-no-backup
Diffstat (limited to 'test')
-rw-r--r-- | test/core/bad_client/bad_client.c | 2 | ||||
-rw-r--r-- | test/core/end2end/fixtures/chttp2_socket_pair.c | 2 | ||||
-rw-r--r-- | test/core/end2end/fixtures/chttp2_socket_pair_one_byte_at_a_time.c | 2 | ||||
-rw-r--r-- | test/core/end2end/fixtures/chttp2_socket_pair_with_grpc_trace.c | 2 | ||||
-rw-r--r-- | test/core/iomgr/fd_posix_test.c | 8 | ||||
-rw-r--r-- | test/core/iomgr/tcp_posix_test.c | 18 | ||||
-rw-r--r-- | test/core/security/secure_endpoint_test.c | 2 |
7 files changed, 21 insertions, 15 deletions
diff --git a/test/core/bad_client/bad_client.c b/test/core/bad_client/bad_client.c index 862bbb7364..e81e0eb850 100644 --- a/test/core/bad_client/bad_client.c +++ b/test/core/bad_client/bad_client.c @@ -88,7 +88,7 @@ void grpc_run_bad_client_test(const char *name, const char *client_payload, grpc_init(); /* Create endpoints */ - sfd = grpc_iomgr_create_endpoint_pair(65536); + sfd = grpc_iomgr_create_endpoint_pair("fixture", 65536); /* Create server, completion events */ a.server = grpc_server_create_from_filters(NULL, 0, NULL); diff --git a/test/core/end2end/fixtures/chttp2_socket_pair.c b/test/core/end2end/fixtures/chttp2_socket_pair.c index a40f139442..d84405224b 100644 --- a/test/core/end2end/fixtures/chttp2_socket_pair.c +++ b/test/core/end2end/fixtures/chttp2_socket_pair.c @@ -97,7 +97,7 @@ static grpc_end2end_test_fixture chttp2_create_fixture_socketpair( f.fixture_data = sfd; f.cq = grpc_completion_queue_create(); - *sfd = grpc_iomgr_create_endpoint_pair(65536); + *sfd = grpc_iomgr_create_endpoint_pair("fixture", 65536); return f; } diff --git a/test/core/end2end/fixtures/chttp2_socket_pair_one_byte_at_a_time.c b/test/core/end2end/fixtures/chttp2_socket_pair_one_byte_at_a_time.c index 3d48b91af0..ac8b5eb86d 100644 --- a/test/core/end2end/fixtures/chttp2_socket_pair_one_byte_at_a_time.c +++ b/test/core/end2end/fixtures/chttp2_socket_pair_one_byte_at_a_time.c @@ -97,7 +97,7 @@ static grpc_end2end_test_fixture chttp2_create_fixture_socketpair( f.fixture_data = sfd; f.cq = grpc_completion_queue_create(); - *sfd = grpc_iomgr_create_endpoint_pair(1); + *sfd = grpc_iomgr_create_endpoint_pair("fixture", 1); return f; } diff --git a/test/core/end2end/fixtures/chttp2_socket_pair_with_grpc_trace.c b/test/core/end2end/fixtures/chttp2_socket_pair_with_grpc_trace.c index 907c61b4ae..fd4f533f6e 100644 --- a/test/core/end2end/fixtures/chttp2_socket_pair_with_grpc_trace.c +++ b/test/core/end2end/fixtures/chttp2_socket_pair_with_grpc_trace.c @@ -98,7 +98,7 @@ static grpc_end2end_test_fixture chttp2_create_fixture_socketpair( f.fixture_data = sfd; f.cq = grpc_completion_queue_create(); - *sfd = grpc_iomgr_create_endpoint_pair(65536); + *sfd = grpc_iomgr_create_endpoint_pair("fixture", 65536); return f; } diff --git a/test/core/iomgr/fd_posix_test.c b/test/core/iomgr/fd_posix_test.c index 207862bd8d..4faa888ca5 100644 --- a/test/core/iomgr/fd_posix_test.c +++ b/test/core/iomgr/fd_posix_test.c @@ -206,7 +206,7 @@ static void listen_cb(void *arg, /*=sv_arg*/ fcntl(fd, F_SETFL, flags | O_NONBLOCK); se = gpr_malloc(sizeof(*se)); se->sv = sv; - se->em_fd = grpc_fd_create(fd); + se->em_fd = grpc_fd_create(fd, "listener"); grpc_pollset_add_fd(&g_pollset, se->em_fd); se->session_read_closure.cb = session_read_cb; se->session_read_closure.cb_arg = se; @@ -235,7 +235,7 @@ static int server_start(server *sv) { port = ntohs(sin.sin_port); GPR_ASSERT(listen(fd, MAX_NUM_FD) == 0); - sv->em_fd = grpc_fd_create(fd); + sv->em_fd = grpc_fd_create(fd, "server"); grpc_pollset_add_fd(&g_pollset, sv->em_fd); /* Register to be interested in reading from listen_fd. */ sv->listen_closure.cb = listen_cb; @@ -346,7 +346,7 @@ static void client_start(client *cl, int port) { } } - cl->em_fd = grpc_fd_create(fd); + cl->em_fd = grpc_fd_create(fd, "client"); grpc_pollset_add_fd(&g_pollset, cl->em_fd); client_session_write(cl, 1); @@ -436,7 +436,7 @@ static void test_grpc_fd_change(void) { flags = fcntl(sv[1], F_GETFL, 0); GPR_ASSERT(fcntl(sv[1], F_SETFL, flags | O_NONBLOCK) == 0); - em_fd = grpc_fd_create(sv[0]); + em_fd = grpc_fd_create(sv[0], "test_grpc_fd_change"); grpc_pollset_add_fd(&g_pollset, em_fd); /* Register the first callback, then make its FD readable */ diff --git a/test/core/iomgr/tcp_posix_test.c b/test/core/iomgr/tcp_posix_test.c index 04aed132f4..23bcd19fef 100644 --- a/test/core/iomgr/tcp_posix_test.c +++ b/test/core/iomgr/tcp_posix_test.c @@ -172,7 +172,7 @@ static void read_test(ssize_t num_bytes, ssize_t slice_size) { create_sockets(sv); - ep = grpc_tcp_create(grpc_fd_create(sv[1]), slice_size); + ep = grpc_tcp_create(grpc_fd_create(sv[1], "read_test"), slice_size); grpc_endpoint_add_to_pollset(ep, &g_pollset); written_bytes = fill_socket_partial(sv[0], num_bytes); @@ -207,8 +207,9 @@ static void large_read_test(ssize_t slice_size) { create_sockets(sv); - ep = grpc_tcp_create(grpc_fd_create(sv[1]), slice_size); + ep = grpc_tcp_create(grpc_fd_create(sv[1], "large_read_test"), slice_size); grpc_endpoint_add_to_pollset(ep, &g_pollset); + written_bytes = fill_socket(sv[0]); gpr_log(GPR_INFO, "Wrote %d bytes", written_bytes); @@ -338,7 +339,8 @@ static void write_test(ssize_t num_bytes, ssize_t slice_size) { create_sockets(sv); - ep = grpc_tcp_create(grpc_fd_create(sv[1]), GRPC_TCP_DEFAULT_READ_SLICE_SIZE); + ep = grpc_tcp_create(grpc_fd_create(sv[1], "write_test"), + GRPC_TCP_DEFAULT_READ_SLICE_SIZE); grpc_endpoint_add_to_pollset(ep, &g_pollset); state.ep = ep; @@ -391,8 +393,10 @@ static void write_error_test(ssize_t num_bytes, ssize_t slice_size) { create_sockets(sv); - ep = grpc_tcp_create(grpc_fd_create(sv[1]), GRPC_TCP_DEFAULT_READ_SLICE_SIZE); + ep = grpc_tcp_create(grpc_fd_create(sv[1], "write_error_test"), + GRPC_TCP_DEFAULT_READ_SLICE_SIZE); grpc_endpoint_add_to_pollset(ep, &g_pollset); + close(sv[0]); state.ep = ep; @@ -455,8 +459,10 @@ static grpc_endpoint_test_fixture create_fixture_tcp_socketpair( grpc_endpoint_test_fixture f; create_sockets(sv); - f.client_ep = grpc_tcp_create(grpc_fd_create(sv[0]), slice_size); - f.server_ep = grpc_tcp_create(grpc_fd_create(sv[1]), slice_size); + f.client_ep = + grpc_tcp_create(grpc_fd_create(sv[0], "fixture:client"), slice_size); + f.server_ep = + grpc_tcp_create(grpc_fd_create(sv[1], "fixture:server"), slice_size); grpc_endpoint_add_to_pollset(f.client_ep, &g_pollset); grpc_endpoint_add_to_pollset(f.server_ep, &g_pollset); diff --git a/test/core/security/secure_endpoint_test.c b/test/core/security/secure_endpoint_test.c index 28c909f34d..9081e14a9b 100644 --- a/test/core/security/secure_endpoint_test.c +++ b/test/core/security/secure_endpoint_test.c @@ -53,7 +53,7 @@ static grpc_endpoint_test_fixture secure_endpoint_create_fixture_tcp_socketpair( grpc_endpoint_test_fixture f; grpc_endpoint_pair tcp; - tcp = grpc_iomgr_create_endpoint_pair(slice_size); + tcp = grpc_iomgr_create_endpoint_pair("fixture", slice_size); grpc_endpoint_add_to_pollset(tcp.client, &g_pollset); grpc_endpoint_add_to_pollset(tcp.server, &g_pollset); |