Running generate_projects.sh and solving some uv build errors

reviewable/pr12692/r4
Yash Tibrewal 7 years ago
parent 4a91bf47d0
commit 4bf670793b
  1. 56
      CMakeLists.txt
  2. 56
      Makefile
  3. 56
      grpc.gyp
  4. 25
      src/core/lib/iomgr/resolve_address_uv.cc
  5. 28
      tools/run_tests/generated/sources_and_headers.json

@ -1607,20 +1607,20 @@ add_library(grpc_test_util
test/core/end2end/data/test_root_cert.c test/core/end2end/data/test_root_cert.c
test/core/security/oauth2_utils.c test/core/security/oauth2_utils.c
src/core/ext/filters/client_channel/resolver/fake/fake_resolver.cc src/core/ext/filters/client_channel/resolver/fake/fake_resolver.cc
test/core/end2end/cq_verifier.cc test/core/end2end/cq_verifier.c
test/core/end2end/fixtures/http_proxy_fixture.cc test/core/end2end/fixtures/http_proxy_fixture.c
test/core/end2end/fixtures/proxy.cc test/core/end2end/fixtures/proxy.c
test/core/iomgr/endpoint_tests.cc test/core/iomgr/endpoint_tests.c
test/core/util/debugger_macros.cc test/core/util/debugger_macros.c
test/core/util/grpc_profiler.cc test/core/util/grpc_profiler.c
test/core/util/memory_counters.cc test/core/util/memory_counters.c
test/core/util/mock_endpoint.cc test/core/util/mock_endpoint.c
test/core/util/parse_hexstring.cc test/core/util/parse_hexstring.c
test/core/util/passthru_endpoint.cc test/core/util/passthru_endpoint.c
test/core/util/port.cc test/core/util/port.c
test/core/util/port_server_client.cc test/core/util/port_server_client.c
test/core/util/slice_splitter.cc test/core/util/slice_splitter.c
test/core/util/trickle_endpoint.cc test/core/util/trickle_endpoint.c
src/core/lib/channel/channel_args.cc src/core/lib/channel/channel_args.cc
src/core/lib/channel/channel_stack.cc src/core/lib/channel/channel_stack.cc
src/core/lib/channel/channel_stack_builder.cc src/core/lib/channel/channel_stack_builder.cc
@ -1868,20 +1868,20 @@ if (gRPC_BUILD_TESTS)
add_library(grpc_test_util_unsecure add_library(grpc_test_util_unsecure
src/core/ext/filters/client_channel/resolver/fake/fake_resolver.cc src/core/ext/filters/client_channel/resolver/fake/fake_resolver.cc
test/core/end2end/cq_verifier.cc test/core/end2end/cq_verifier.c
test/core/end2end/fixtures/http_proxy_fixture.cc test/core/end2end/fixtures/http_proxy_fixture.c
test/core/end2end/fixtures/proxy.cc test/core/end2end/fixtures/proxy.c
test/core/iomgr/endpoint_tests.cc test/core/iomgr/endpoint_tests.c
test/core/util/debugger_macros.cc test/core/util/debugger_macros.c
test/core/util/grpc_profiler.cc test/core/util/grpc_profiler.c
test/core/util/memory_counters.cc test/core/util/memory_counters.c
test/core/util/mock_endpoint.cc test/core/util/mock_endpoint.c
test/core/util/parse_hexstring.cc test/core/util/parse_hexstring.c
test/core/util/passthru_endpoint.cc test/core/util/passthru_endpoint.c
test/core/util/port.cc test/core/util/port.c
test/core/util/port_server_client.cc test/core/util/port_server_client.c
test/core/util/slice_splitter.cc test/core/util/slice_splitter.c
test/core/util/trickle_endpoint.cc test/core/util/trickle_endpoint.c
src/core/lib/channel/channel_args.cc src/core/lib/channel/channel_args.cc
src/core/lib/channel/channel_stack.cc src/core/lib/channel/channel_stack.cc
src/core/lib/channel/channel_stack_builder.cc src/core/lib/channel/channel_stack_builder.cc

@ -3597,20 +3597,20 @@ LIBGRPC_TEST_UTIL_SRC = \
test/core/end2end/data/test_root_cert.c \ test/core/end2end/data/test_root_cert.c \
test/core/security/oauth2_utils.c \ test/core/security/oauth2_utils.c \
src/core/ext/filters/client_channel/resolver/fake/fake_resolver.cc \ src/core/ext/filters/client_channel/resolver/fake/fake_resolver.cc \
test/core/end2end/cq_verifier.cc \ test/core/end2end/cq_verifier.c \
test/core/end2end/fixtures/http_proxy_fixture.cc \ test/core/end2end/fixtures/http_proxy_fixture.c \
test/core/end2end/fixtures/proxy.cc \ test/core/end2end/fixtures/proxy.c \
test/core/iomgr/endpoint_tests.cc \ test/core/iomgr/endpoint_tests.c \
test/core/util/debugger_macros.cc \ test/core/util/debugger_macros.c \
test/core/util/grpc_profiler.cc \ test/core/util/grpc_profiler.c \
test/core/util/memory_counters.cc \ test/core/util/memory_counters.c \
test/core/util/mock_endpoint.cc \ test/core/util/mock_endpoint.c \
test/core/util/parse_hexstring.cc \ test/core/util/parse_hexstring.c \
test/core/util/passthru_endpoint.cc \ test/core/util/passthru_endpoint.c \
test/core/util/port.cc \ test/core/util/port.c \
test/core/util/port_server_client.cc \ test/core/util/port_server_client.c \
test/core/util/slice_splitter.cc \ test/core/util/slice_splitter.c \
test/core/util/trickle_endpoint.cc \ test/core/util/trickle_endpoint.c \
src/core/lib/channel/channel_args.cc \ src/core/lib/channel/channel_args.cc \
src/core/lib/channel/channel_stack.cc \ src/core/lib/channel/channel_stack.cc \
src/core/lib/channel/channel_stack_builder.cc \ src/core/lib/channel/channel_stack_builder.cc \
@ -3849,20 +3849,20 @@ endif
LIBGRPC_TEST_UTIL_UNSECURE_SRC = \ LIBGRPC_TEST_UTIL_UNSECURE_SRC = \
src/core/ext/filters/client_channel/resolver/fake/fake_resolver.cc \ src/core/ext/filters/client_channel/resolver/fake/fake_resolver.cc \
test/core/end2end/cq_verifier.cc \ test/core/end2end/cq_verifier.c \
test/core/end2end/fixtures/http_proxy_fixture.cc \ test/core/end2end/fixtures/http_proxy_fixture.c \
test/core/end2end/fixtures/proxy.cc \ test/core/end2end/fixtures/proxy.c \
test/core/iomgr/endpoint_tests.cc \ test/core/iomgr/endpoint_tests.c \
test/core/util/debugger_macros.cc \ test/core/util/debugger_macros.c \
test/core/util/grpc_profiler.cc \ test/core/util/grpc_profiler.c \
test/core/util/memory_counters.cc \ test/core/util/memory_counters.c \
test/core/util/mock_endpoint.cc \ test/core/util/mock_endpoint.c \
test/core/util/parse_hexstring.cc \ test/core/util/parse_hexstring.c \
test/core/util/passthru_endpoint.cc \ test/core/util/passthru_endpoint.c \
test/core/util/port.cc \ test/core/util/port.c \
test/core/util/port_server_client.cc \ test/core/util/port_server_client.c \
test/core/util/slice_splitter.cc \ test/core/util/slice_splitter.c \
test/core/util/trickle_endpoint.cc \ test/core/util/trickle_endpoint.c \
src/core/lib/channel/channel_args.cc \ src/core/lib/channel/channel_args.cc \
src/core/lib/channel/channel_stack.cc \ src/core/lib/channel/channel_stack.cc \
src/core/lib/channel/channel_stack_builder.cc \ src/core/lib/channel/channel_stack_builder.cc \

@ -508,20 +508,20 @@
'test/core/end2end/data/test_root_cert.c', 'test/core/end2end/data/test_root_cert.c',
'test/core/security/oauth2_utils.c', 'test/core/security/oauth2_utils.c',
'src/core/ext/filters/client_channel/resolver/fake/fake_resolver.cc', 'src/core/ext/filters/client_channel/resolver/fake/fake_resolver.cc',
'test/core/end2end/cq_verifier.cc', 'test/core/end2end/cq_verifier.c',
'test/core/end2end/fixtures/http_proxy_fixture.cc', 'test/core/end2end/fixtures/http_proxy_fixture.c',
'test/core/end2end/fixtures/proxy.cc', 'test/core/end2end/fixtures/proxy.c',
'test/core/iomgr/endpoint_tests.cc', 'test/core/iomgr/endpoint_tests.c',
'test/core/util/debugger_macros.cc', 'test/core/util/debugger_macros.c',
'test/core/util/grpc_profiler.cc', 'test/core/util/grpc_profiler.c',
'test/core/util/memory_counters.cc', 'test/core/util/memory_counters.c',
'test/core/util/mock_endpoint.cc', 'test/core/util/mock_endpoint.c',
'test/core/util/parse_hexstring.cc', 'test/core/util/parse_hexstring.c',
'test/core/util/passthru_endpoint.cc', 'test/core/util/passthru_endpoint.c',
'test/core/util/port.cc', 'test/core/util/port.c',
'test/core/util/port_server_client.cc', 'test/core/util/port_server_client.c',
'test/core/util/slice_splitter.cc', 'test/core/util/slice_splitter.c',
'test/core/util/trickle_endpoint.cc', 'test/core/util/trickle_endpoint.c',
'src/core/lib/channel/channel_args.cc', 'src/core/lib/channel/channel_args.cc',
'src/core/lib/channel/channel_stack.cc', 'src/core/lib/channel/channel_stack.cc',
'src/core/lib/channel/channel_stack_builder.cc', 'src/core/lib/channel/channel_stack_builder.cc',
@ -712,20 +712,20 @@
], ],
'sources': [ 'sources': [
'src/core/ext/filters/client_channel/resolver/fake/fake_resolver.cc', 'src/core/ext/filters/client_channel/resolver/fake/fake_resolver.cc',
'test/core/end2end/cq_verifier.cc', 'test/core/end2end/cq_verifier.c',
'test/core/end2end/fixtures/http_proxy_fixture.cc', 'test/core/end2end/fixtures/http_proxy_fixture.c',
'test/core/end2end/fixtures/proxy.cc', 'test/core/end2end/fixtures/proxy.c',
'test/core/iomgr/endpoint_tests.cc', 'test/core/iomgr/endpoint_tests.c',
'test/core/util/debugger_macros.cc', 'test/core/util/debugger_macros.c',
'test/core/util/grpc_profiler.cc', 'test/core/util/grpc_profiler.c',
'test/core/util/memory_counters.cc', 'test/core/util/memory_counters.c',
'test/core/util/mock_endpoint.cc', 'test/core/util/mock_endpoint.c',
'test/core/util/parse_hexstring.cc', 'test/core/util/parse_hexstring.c',
'test/core/util/passthru_endpoint.cc', 'test/core/util/passthru_endpoint.c',
'test/core/util/port.cc', 'test/core/util/port.c',
'test/core/util/port_server_client.cc', 'test/core/util/port_server_client.c',
'test/core/util/slice_splitter.cc', 'test/core/util/slice_splitter.c',
'test/core/util/trickle_endpoint.cc', 'test/core/util/trickle_endpoint.c',
'src/core/lib/channel/channel_args.cc', 'src/core/lib/channel/channel_args.cc',
'src/core/lib/channel/channel_stack.cc', 'src/core/lib/channel/channel_stack.cc',
'src/core/lib/channel/channel_stack_builder.cc', 'src/core/lib/channel/channel_stack_builder.cc',

@ -49,11 +49,12 @@ static int retry_named_port_failure(int status, request *r,
uv_getaddrinfo_cb getaddrinfo_cb) { uv_getaddrinfo_cb getaddrinfo_cb) {
if (status != 0) { if (status != 0) {
// This loop is copied from resolve_address_posix.c // This loop is copied from resolve_address_posix.c
char *svc[][2] = {{"http", "80"}, {"https", "443"}}; const char *svc[][2] = {{"http", "80"}, {"https", "443"}};
for (size_t i = 0; i < GPR_ARRAY_SIZE(svc); i++) { for (size_t i = 0; i < GPR_ARRAY_SIZE(svc); i++) {
if (strcmp(r->port, svc[i][0]) == 0) { if (strcmp(r->port, svc[i][0]) == 0) {
int retry_status; int retry_status;
uv_getaddrinfo_t *req = gpr_malloc(sizeof(uv_getaddrinfo_t)); uv_getaddrinfo_t *req =
(uv_getaddrinfo_t *)gpr_malloc(sizeof(uv_getaddrinfo_t));
req->data = r; req->data = r;
r->port = gpr_strdup(svc[i][1]); r->port = gpr_strdup(svc[i][1]);
retry_status = uv_getaddrinfo(uv_default_loop(), req, getaddrinfo_cb, retry_status = uv_getaddrinfo(uv_default_loop(), req, getaddrinfo_cb,
@ -85,13 +86,14 @@ static grpc_error *handle_addrinfo_result(int status, struct addrinfo *result,
grpc_slice_from_static_string(uv_strerror(status))); grpc_slice_from_static_string(uv_strerror(status)));
return error; return error;
} }
(*addresses) = gpr_malloc(sizeof(grpc_resolved_addresses)); (*addresses) =
(grpc_resolved_addresses *)gpr_malloc(sizeof(grpc_resolved_addresses));
(*addresses)->naddrs = 0; (*addresses)->naddrs = 0;
for (resp = result; resp != NULL; resp = resp->ai_next) { for (resp = result; resp != NULL; resp = resp->ai_next) {
(*addresses)->naddrs++; (*addresses)->naddrs++;
} }
(*addresses)->addrs = (*addresses)->addrs = (grpc_resolved_address *)gpr_malloc(
gpr_malloc(sizeof(grpc_resolved_address) * (*addresses)->naddrs); sizeof(grpc_resolved_address) * (*addresses)->naddrs);
i = 0; i = 0;
for (resp = result; resp != NULL; resp = resp->ai_next) { for (resp = result; resp != NULL; resp = resp->ai_next) {
memcpy(&(*addresses)->addrs[i].addr, resp->ai_addr, resp->ai_addrlen); memcpy(&(*addresses)->addrs[i].addr, resp->ai_addr, resp->ai_addrlen);
@ -174,6 +176,7 @@ static grpc_error *blocking_resolve_address_impl(
int s; int s;
grpc_error *err; grpc_error *err;
int retry_status; int retry_status;
request r;
GRPC_UV_ASSERT_SAME_THREAD(); GRPC_UV_ASSERT_SAME_THREAD();
@ -191,8 +194,10 @@ static grpc_error *blocking_resolve_address_impl(
hints.ai_flags = AI_PASSIVE; /* for wildcard IP address */ hints.ai_flags = AI_PASSIVE; /* for wildcard IP address */
s = uv_getaddrinfo(uv_default_loop(), &req, NULL, host, port, &hints); s = uv_getaddrinfo(uv_default_loop(), &req, NULL, host, port, &hints);
request r = { r.addresses = addresses;
.addresses = addresses, .hints = &hints, .host = host, .port = port}; r.hints = &hints;
r.host = host;
r.port = port;
retry_status = retry_named_port_failure(s, &r, NULL); retry_status = retry_named_port_failure(s, &r, NULL);
if (retry_status <= 0) { if (retry_status <= 0) {
s = retry_status; s = retry_status;
@ -239,16 +244,16 @@ static void resolve_address_impl(grpc_exec_ctx *exec_ctx, const char *name,
gpr_free(port); gpr_free(port);
return; return;
} }
r = gpr_malloc(sizeof(request)); r = (request *)gpr_malloc(sizeof(request));
r->on_done = on_done; r->on_done = on_done;
r->addresses = addrs; r->addresses = addrs;
r->host = host; r->host = host;
r->port = port; r->port = port;
req = gpr_malloc(sizeof(uv_getaddrinfo_t)); req = (uv_getaddrinfo_t *)gpr_malloc(sizeof(uv_getaddrinfo_t));
req->data = r; req->data = r;
/* Call getaddrinfo */ /* Call getaddrinfo */
hints = gpr_malloc(sizeof(struct addrinfo)); hints = (addrinfo *)gpr_malloc(sizeof(struct addrinfo));
memset(hints, 0, sizeof(struct addrinfo)); memset(hints, 0, sizeof(struct addrinfo));
hints->ai_family = AF_UNSPEC; /* ipv4 or ipv6 */ hints->ai_family = AF_UNSPEC; /* ipv4 or ipv6 */
hints->ai_socktype = SOCK_STREAM; /* stream socket */ hints->ai_socktype = SOCK_STREAM; /* stream socket */

@ -8916,33 +8916,33 @@
"src": [ "src": [
"src/core/ext/filters/client_channel/resolver/fake/fake_resolver.cc", "src/core/ext/filters/client_channel/resolver/fake/fake_resolver.cc",
"src/core/ext/filters/client_channel/resolver/fake/fake_resolver.h", "src/core/ext/filters/client_channel/resolver/fake/fake_resolver.h",
"test/core/end2end/cq_verifier.cc", "test/core/end2end/cq_verifier.c",
"test/core/end2end/cq_verifier.h", "test/core/end2end/cq_verifier.h",
"test/core/end2end/fixtures/http_proxy_fixture.cc", "test/core/end2end/fixtures/http_proxy_fixture.c",
"test/core/end2end/fixtures/http_proxy_fixture.h", "test/core/end2end/fixtures/http_proxy_fixture.h",
"test/core/end2end/fixtures/proxy.cc", "test/core/end2end/fixtures/proxy.c",
"test/core/end2end/fixtures/proxy.h", "test/core/end2end/fixtures/proxy.h",
"test/core/iomgr/endpoint_tests.cc", "test/core/iomgr/endpoint_tests.c",
"test/core/iomgr/endpoint_tests.h", "test/core/iomgr/endpoint_tests.h",
"test/core/util/debugger_macros.cc", "test/core/util/debugger_macros.c",
"test/core/util/debugger_macros.h", "test/core/util/debugger_macros.h",
"test/core/util/grpc_profiler.cc", "test/core/util/grpc_profiler.c",
"test/core/util/grpc_profiler.h", "test/core/util/grpc_profiler.h",
"test/core/util/memory_counters.cc", "test/core/util/memory_counters.c",
"test/core/util/memory_counters.h", "test/core/util/memory_counters.h",
"test/core/util/mock_endpoint.cc", "test/core/util/mock_endpoint.c",
"test/core/util/mock_endpoint.h", "test/core/util/mock_endpoint.h",
"test/core/util/parse_hexstring.cc", "test/core/util/parse_hexstring.c",
"test/core/util/parse_hexstring.h", "test/core/util/parse_hexstring.h",
"test/core/util/passthru_endpoint.cc", "test/core/util/passthru_endpoint.c",
"test/core/util/passthru_endpoint.h", "test/core/util/passthru_endpoint.h",
"test/core/util/port.cc", "test/core/util/port.c",
"test/core/util/port.h", "test/core/util/port.h",
"test/core/util/port_server_client.cc", "test/core/util/port_server_client.c",
"test/core/util/port_server_client.h", "test/core/util/port_server_client.h",
"test/core/util/slice_splitter.cc", "test/core/util/slice_splitter.c",
"test/core/util/slice_splitter.h", "test/core/util/slice_splitter.h",
"test/core/util/trickle_endpoint.cc", "test/core/util/trickle_endpoint.c",
"test/core/util/trickle_endpoint.h" "test/core/util/trickle_endpoint.h"
], ],
"third_party": false, "third_party": false,

Loading…
Cancel
Save