diff --git a/.clang_complete b/.clang_complete new file mode 100644 index 00000000000..79d0946b332 --- /dev/null +++ b/.clang_complete @@ -0,0 +1,8 @@ +-Ithird_party/googletest/include +-Ithird_party/googletest +-Iinclude +-Igens +-I. +-Ithird_party/boringssl/include +-Ithird_party/zlib +-Ithird_party/protobuf/src diff --git a/.gitmodules b/.gitmodules index c37d0abdf0b..c85a53943a7 100644 --- a/.gitmodules +++ b/.gitmodules @@ -13,7 +13,7 @@ url = https://github.com/google/googletest.git [submodule "third_party/boringssl"] path = third_party/boringssl - url = https://boringssl.googlesource.com/boringssl + url = https://github.com/google/boringssl.git [submodule "third_party/nanopb"] path = third_party/nanopb url = https://github.com/nanopb/nanopb.git diff --git a/BUILD b/BUILD index 0e9f37a0e3f..52d1d5a69f0 100644 --- a/BUILD +++ b/BUILD @@ -44,62 +44,78 @@ package(default_visibility = ["//visibility:public"]) cc_library( name = "gpr", srcs = [ - "src/core/profiling/timers.h", - "src/core/support/block_annotate.h", - "src/core/support/env.h", - "src/core/support/load_file.h", - "src/core/support/murmur_hash.h", - "src/core/support/stack_lockfree.h", - "src/core/support/string.h", - "src/core/support/string_win32.h", - "src/core/support/thd_internal.h", - "src/core/support/time_precise.h", - "src/core/support/tmpfile.h", - "src/core/profiling/basic_timers.c", - "src/core/profiling/stap_timers.c", - "src/core/support/alloc.c", - "src/core/support/avl.c", - "src/core/support/cmdline.c", - "src/core/support/cpu_iphone.c", - "src/core/support/cpu_linux.c", - "src/core/support/cpu_posix.c", - "src/core/support/cpu_windows.c", - "src/core/support/env_linux.c", - "src/core/support/env_posix.c", - "src/core/support/env_win32.c", - "src/core/support/histogram.c", - "src/core/support/host_port.c", - "src/core/support/load_file.c", - "src/core/support/log.c", - "src/core/support/log_android.c", - "src/core/support/log_linux.c", - "src/core/support/log_posix.c", - "src/core/support/log_win32.c", - "src/core/support/murmur_hash.c", - "src/core/support/slice.c", - "src/core/support/slice_buffer.c", - "src/core/support/stack_lockfree.c", - "src/core/support/string.c", - "src/core/support/string_posix.c", - "src/core/support/string_win32.c", - "src/core/support/subprocess_posix.c", - "src/core/support/subprocess_windows.c", - "src/core/support/sync.c", - "src/core/support/sync_posix.c", - "src/core/support/sync_win32.c", - "src/core/support/thd.c", - "src/core/support/thd_posix.c", - "src/core/support/thd_win32.c", - "src/core/support/time.c", - "src/core/support/time_posix.c", - "src/core/support/time_precise.c", - "src/core/support/time_win32.c", - "src/core/support/tls_pthread.c", - "src/core/support/tmpfile_posix.c", - "src/core/support/tmpfile_win32.c", - "src/core/support/wrap_memcpy.c", + "src/core/lib/profiling/timers.h", + "src/core/lib/support/backoff.h", + "src/core/lib/support/block_annotate.h", + "src/core/lib/support/env.h", + "src/core/lib/support/load_file.h", + "src/core/lib/support/murmur_hash.h", + "src/core/lib/support/stack_lockfree.h", + "src/core/lib/support/string.h", + "src/core/lib/support/string_win32.h", + "src/core/lib/support/thd_internal.h", + "src/core/lib/support/time_precise.h", + "src/core/lib/support/tmpfile.h", + "src/core/lib/profiling/basic_timers.c", + "src/core/lib/profiling/stap_timers.c", + "src/core/lib/support/alloc.c", + "src/core/lib/support/avl.c", + "src/core/lib/support/backoff.c", + "src/core/lib/support/cmdline.c", + "src/core/lib/support/cpu_iphone.c", + "src/core/lib/support/cpu_linux.c", + "src/core/lib/support/cpu_posix.c", + "src/core/lib/support/cpu_windows.c", + "src/core/lib/support/env_linux.c", + "src/core/lib/support/env_posix.c", + "src/core/lib/support/env_win32.c", + "src/core/lib/support/histogram.c", + "src/core/lib/support/host_port.c", + "src/core/lib/support/load_file.c", + "src/core/lib/support/log.c", + "src/core/lib/support/log_android.c", + "src/core/lib/support/log_linux.c", + "src/core/lib/support/log_posix.c", + "src/core/lib/support/log_win32.c", + "src/core/lib/support/murmur_hash.c", + "src/core/lib/support/slice.c", + "src/core/lib/support/slice_buffer.c", + "src/core/lib/support/stack_lockfree.c", + "src/core/lib/support/string.c", + "src/core/lib/support/string_posix.c", + "src/core/lib/support/string_win32.c", + "src/core/lib/support/subprocess_posix.c", + "src/core/lib/support/subprocess_windows.c", + "src/core/lib/support/sync.c", + "src/core/lib/support/sync_posix.c", + "src/core/lib/support/sync_win32.c", + "src/core/lib/support/thd.c", + "src/core/lib/support/thd_posix.c", + "src/core/lib/support/thd_win32.c", + "src/core/lib/support/time.c", + "src/core/lib/support/time_posix.c", + "src/core/lib/support/time_precise.c", + "src/core/lib/support/time_win32.c", + "src/core/lib/support/tls_pthread.c", + "src/core/lib/support/tmpfile_posix.c", + "src/core/lib/support/tmpfile_win32.c", + "src/core/lib/support/wrap_memcpy.c", ], hdrs = [ + "include/grpc/impl/codegen/alloc.h", + "include/grpc/impl/codegen/atm.h", + "include/grpc/impl/codegen/atm_gcc_atomic.h", + "include/grpc/impl/codegen/atm_gcc_sync.h", + "include/grpc/impl/codegen/atm_win32.h", + "include/grpc/impl/codegen/log.h", + "include/grpc/impl/codegen/port_platform.h", + "include/grpc/impl/codegen/slice.h", + "include/grpc/impl/codegen/slice_buffer.h", + "include/grpc/impl/codegen/sync.h", + "include/grpc/impl/codegen/sync_generic.h", + "include/grpc/impl/codegen/sync_posix.h", + "include/grpc/impl/codegen/sync_win32.h", + "include/grpc/impl/codegen/time.h", "include/grpc/support/alloc.h", "include/grpc/support/atm.h", "include/grpc/support/atm_gcc_atomic.h", @@ -128,20 +144,6 @@ cc_library( "include/grpc/support/tls_msvc.h", "include/grpc/support/tls_pthread.h", "include/grpc/support/useful.h", - "include/grpc/impl/codegen/alloc.h", - "include/grpc/impl/codegen/atm.h", - "include/grpc/impl/codegen/atm_gcc_atomic.h", - "include/grpc/impl/codegen/atm_gcc_sync.h", - "include/grpc/impl/codegen/atm_win32.h", - "include/grpc/impl/codegen/log.h", - "include/grpc/impl/codegen/port_platform.h", - "include/grpc/impl/codegen/slice.h", - "include/grpc/impl/codegen/slice_buffer.h", - "include/grpc/impl/codegen/sync.h", - "include/grpc/impl/codegen/sync_generic.h", - "include/grpc/impl/codegen/sync_posix.h", - "include/grpc/impl/codegen/sync_win32.h", - "include/grpc/impl/codegen/time.h", ], includes = [ "include", @@ -155,304 +157,318 @@ cc_library( cc_library( name = "grpc", srcs = [ - "src/core/census/grpc_filter.h", - "src/core/channel/channel_args.h", - "src/core/channel/channel_stack.h", - "src/core/channel/client_channel.h", - "src/core/channel/client_uchannel.h", - "src/core/channel/compress_filter.h", - "src/core/channel/connected_channel.h", - "src/core/channel/context.h", - "src/core/channel/http_client_filter.h", - "src/core/channel/http_server_filter.h", - "src/core/channel/subchannel_call_holder.h", - "src/core/client_config/client_config.h", - "src/core/client_config/connector.h", - "src/core/client_config/initial_connect_string.h", - "src/core/client_config/lb_policies/load_balancer_api.h", - "src/core/client_config/lb_policies/pick_first.h", - "src/core/client_config/lb_policies/round_robin.h", - "src/core/client_config/lb_policy.h", - "src/core/client_config/lb_policy_factory.h", - "src/core/client_config/lb_policy_registry.h", - "src/core/client_config/resolver.h", - "src/core/client_config/resolver_factory.h", - "src/core/client_config/resolver_registry.h", - "src/core/client_config/resolvers/dns_resolver.h", - "src/core/client_config/resolvers/sockaddr_resolver.h", - "src/core/client_config/subchannel.h", - "src/core/client_config/subchannel_factory.h", - "src/core/client_config/subchannel_index.h", - "src/core/client_config/uri_parser.h", - "src/core/compression/algorithm_metadata.h", - "src/core/compression/message_compress.h", - "src/core/debug/trace.h", - "src/core/httpcli/format_request.h", - "src/core/httpcli/httpcli.h", - "src/core/httpcli/parser.h", - "src/core/iomgr/closure.h", - "src/core/iomgr/endpoint.h", - "src/core/iomgr/endpoint_pair.h", - "src/core/iomgr/exec_ctx.h", - "src/core/iomgr/executor.h", - "src/core/iomgr/fd_posix.h", - "src/core/iomgr/iocp_windows.h", - "src/core/iomgr/iomgr.h", - "src/core/iomgr/iomgr_internal.h", - "src/core/iomgr/iomgr_posix.h", - "src/core/iomgr/pollset.h", - "src/core/iomgr/pollset_posix.h", - "src/core/iomgr/pollset_set.h", - "src/core/iomgr/pollset_set_posix.h", - "src/core/iomgr/pollset_set_windows.h", - "src/core/iomgr/pollset_windows.h", - "src/core/iomgr/resolve_address.h", - "src/core/iomgr/sockaddr.h", - "src/core/iomgr/sockaddr_posix.h", - "src/core/iomgr/sockaddr_utils.h", - "src/core/iomgr/sockaddr_win32.h", - "src/core/iomgr/socket_utils_posix.h", - "src/core/iomgr/socket_windows.h", - "src/core/iomgr/tcp_client.h", - "src/core/iomgr/tcp_posix.h", - "src/core/iomgr/tcp_server.h", - "src/core/iomgr/tcp_windows.h", - "src/core/iomgr/time_averaged_stats.h", - "src/core/iomgr/timer.h", - "src/core/iomgr/timer_heap.h", - "src/core/iomgr/udp_server.h", - "src/core/iomgr/wakeup_fd_pipe.h", - "src/core/iomgr/wakeup_fd_posix.h", - "src/core/iomgr/workqueue.h", - "src/core/iomgr/workqueue_posix.h", - "src/core/iomgr/workqueue_windows.h", - "src/core/json/json.h", - "src/core/json/json_common.h", - "src/core/json/json_reader.h", - "src/core/json/json_writer.h", - "src/core/proto/grpc/lb/v0/load_balancer.pb.h", - "src/core/statistics/census_interface.h", - "src/core/statistics/census_rpc_stats.h", - "src/core/surface/api_trace.h", - "src/core/surface/call.h", - "src/core/surface/call_test_only.h", - "src/core/surface/channel.h", - "src/core/surface/completion_queue.h", - "src/core/surface/event_string.h", - "src/core/surface/init.h", - "src/core/surface/server.h", - "src/core/surface/surface_trace.h", - "src/core/transport/byte_stream.h", - "src/core/transport/chttp2/alpn.h", - "src/core/transport/chttp2/bin_encoder.h", - "src/core/transport/chttp2/frame.h", - "src/core/transport/chttp2/frame_data.h", - "src/core/transport/chttp2/frame_goaway.h", - "src/core/transport/chttp2/frame_ping.h", - "src/core/transport/chttp2/frame_rst_stream.h", - "src/core/transport/chttp2/frame_settings.h", - "src/core/transport/chttp2/frame_window_update.h", - "src/core/transport/chttp2/hpack_encoder.h", - "src/core/transport/chttp2/hpack_parser.h", - "src/core/transport/chttp2/hpack_table.h", - "src/core/transport/chttp2/http2_errors.h", - "src/core/transport/chttp2/huffsyms.h", - "src/core/transport/chttp2/incoming_metadata.h", - "src/core/transport/chttp2/internal.h", - "src/core/transport/chttp2/status_conversion.h", - "src/core/transport/chttp2/stream_map.h", - "src/core/transport/chttp2/timeout_encoding.h", - "src/core/transport/chttp2/varint.h", - "src/core/transport/chttp2_transport.h", - "src/core/transport/connectivity_state.h", - "src/core/transport/metadata.h", - "src/core/transport/metadata_batch.h", - "src/core/transport/static_metadata.h", - "src/core/transport/transport.h", - "src/core/transport/transport_impl.h", - "src/core/security/auth_filters.h", - "src/core/security/b64.h", - "src/core/security/credentials.h", - "src/core/security/handshake.h", - "src/core/security/json_token.h", - "src/core/security/jwt_verifier.h", - "src/core/security/secure_endpoint.h", - "src/core/security/security_connector.h", - "src/core/security/security_context.h", - "src/core/tsi/fake_transport_security.h", - "src/core/tsi/ssl_transport_security.h", - "src/core/tsi/ssl_types.h", - "src/core/tsi/transport_security.h", - "src/core/tsi/transport_security_interface.h", - "src/core/census/aggregation.h", - "src/core/census/mlog.h", - "src/core/census/rpc_metric_id.h", + "src/core/ext/transport/chttp2/transport/alpn.h", + "src/core/ext/transport/chttp2/transport/bin_encoder.h", + "src/core/ext/transport/chttp2/transport/chttp2_transport.h", + "src/core/ext/transport/chttp2/transport/frame.h", + "src/core/ext/transport/chttp2/transport/frame_data.h", + "src/core/ext/transport/chttp2/transport/frame_goaway.h", + "src/core/ext/transport/chttp2/transport/frame_ping.h", + "src/core/ext/transport/chttp2/transport/frame_rst_stream.h", + "src/core/ext/transport/chttp2/transport/frame_settings.h", + "src/core/ext/transport/chttp2/transport/frame_window_update.h", + "src/core/ext/transport/chttp2/transport/hpack_encoder.h", + "src/core/ext/transport/chttp2/transport/hpack_parser.h", + "src/core/ext/transport/chttp2/transport/hpack_table.h", + "src/core/ext/transport/chttp2/transport/http2_errors.h", + "src/core/ext/transport/chttp2/transport/huffsyms.h", + "src/core/ext/transport/chttp2/transport/incoming_metadata.h", + "src/core/ext/transport/chttp2/transport/internal.h", + "src/core/ext/transport/chttp2/transport/status_conversion.h", + "src/core/ext/transport/chttp2/transport/stream_map.h", + "src/core/ext/transport/chttp2/transport/timeout_encoding.h", + "src/core/ext/transport/chttp2/transport/varint.h", + "src/core/lib/census/aggregation.h", + "src/core/lib/census/grpc_filter.h", + "src/core/lib/census/grpc_plugin.h", + "src/core/lib/census/mlog.h", + "src/core/lib/census/rpc_metric_id.h", + "src/core/lib/channel/channel_args.h", + "src/core/lib/channel/channel_stack.h", + "src/core/lib/channel/channel_stack_builder.h", + "src/core/lib/channel/client_channel.h", + "src/core/lib/channel/compress_filter.h", + "src/core/lib/channel/connected_channel.h", + "src/core/lib/channel/context.h", + "src/core/lib/channel/http_client_filter.h", + "src/core/lib/channel/http_server_filter.h", + "src/core/lib/channel/subchannel_call_holder.h", + "src/core/lib/client_config/client_config.h", + "src/core/lib/client_config/connector.h", + "src/core/lib/client_config/initial_connect_string.h", + "src/core/lib/client_config/lb_policies/load_balancer_api.h", + "src/core/lib/client_config/lb_policies/pick_first.h", + "src/core/lib/client_config/lb_policies/round_robin.h", + "src/core/lib/client_config/lb_policy.h", + "src/core/lib/client_config/lb_policy_factory.h", + "src/core/lib/client_config/lb_policy_registry.h", + "src/core/lib/client_config/resolver.h", + "src/core/lib/client_config/resolver_factory.h", + "src/core/lib/client_config/resolver_registry.h", + "src/core/lib/client_config/resolvers/dns_resolver.h", + "src/core/lib/client_config/resolvers/sockaddr_resolver.h", + "src/core/lib/client_config/subchannel.h", + "src/core/lib/client_config/subchannel_factory.h", + "src/core/lib/client_config/subchannel_index.h", + "src/core/lib/client_config/uri_parser.h", + "src/core/lib/compression/algorithm_metadata.h", + "src/core/lib/compression/message_compress.h", + "src/core/lib/debug/trace.h", + "src/core/lib/http/format_request.h", + "src/core/lib/http/httpcli.h", + "src/core/lib/http/parser.h", + "src/core/lib/iomgr/closure.h", + "src/core/lib/iomgr/endpoint.h", + "src/core/lib/iomgr/endpoint_pair.h", + "src/core/lib/iomgr/exec_ctx.h", + "src/core/lib/iomgr/executor.h", + "src/core/lib/iomgr/fd_posix.h", + "src/core/lib/iomgr/iocp_windows.h", + "src/core/lib/iomgr/iomgr.h", + "src/core/lib/iomgr/iomgr_internal.h", + "src/core/lib/iomgr/iomgr_posix.h", + "src/core/lib/iomgr/pollset.h", + "src/core/lib/iomgr/pollset_posix.h", + "src/core/lib/iomgr/pollset_set.h", + "src/core/lib/iomgr/pollset_set_posix.h", + "src/core/lib/iomgr/pollset_set_windows.h", + "src/core/lib/iomgr/pollset_windows.h", + "src/core/lib/iomgr/resolve_address.h", + "src/core/lib/iomgr/sockaddr.h", + "src/core/lib/iomgr/sockaddr_posix.h", + "src/core/lib/iomgr/sockaddr_utils.h", + "src/core/lib/iomgr/sockaddr_win32.h", + "src/core/lib/iomgr/socket_utils_posix.h", + "src/core/lib/iomgr/socket_windows.h", + "src/core/lib/iomgr/tcp_client.h", + "src/core/lib/iomgr/tcp_posix.h", + "src/core/lib/iomgr/tcp_server.h", + "src/core/lib/iomgr/tcp_windows.h", + "src/core/lib/iomgr/time_averaged_stats.h", + "src/core/lib/iomgr/timer.h", + "src/core/lib/iomgr/timer_heap.h", + "src/core/lib/iomgr/udp_server.h", + "src/core/lib/iomgr/unix_sockets_posix.h", + "src/core/lib/iomgr/wakeup_fd_pipe.h", + "src/core/lib/iomgr/wakeup_fd_posix.h", + "src/core/lib/iomgr/workqueue.h", + "src/core/lib/iomgr/workqueue_posix.h", + "src/core/lib/iomgr/workqueue_windows.h", + "src/core/lib/json/json.h", + "src/core/lib/json/json_common.h", + "src/core/lib/json/json_reader.h", + "src/core/lib/json/json_writer.h", + "src/core/lib/proto/grpc/lb/v0/load_balancer.pb.h", + "src/core/lib/security/auth_filters.h", + "src/core/lib/security/b64.h", + "src/core/lib/security/credentials.h", + "src/core/lib/security/handshake.h", + "src/core/lib/security/json_token.h", + "src/core/lib/security/jwt_verifier.h", + "src/core/lib/security/secure_endpoint.h", + "src/core/lib/security/security_connector.h", + "src/core/lib/security/security_context.h", + "src/core/lib/statistics/census_interface.h", + "src/core/lib/statistics/census_rpc_stats.h", + "src/core/lib/surface/api_trace.h", + "src/core/lib/surface/call.h", + "src/core/lib/surface/call_test_only.h", + "src/core/lib/surface/channel.h", + "src/core/lib/surface/channel_init.h", + "src/core/lib/surface/channel_stack_type.h", + "src/core/lib/surface/completion_queue.h", + "src/core/lib/surface/event_string.h", + "src/core/lib/surface/init.h", + "src/core/lib/surface/lame_client.h", + "src/core/lib/surface/server.h", + "src/core/lib/surface/surface_trace.h", + "src/core/lib/transport/byte_stream.h", + "src/core/lib/transport/connectivity_state.h", + "src/core/lib/transport/metadata.h", + "src/core/lib/transport/metadata_batch.h", + "src/core/lib/transport/static_metadata.h", + "src/core/lib/transport/transport.h", + "src/core/lib/transport/transport_impl.h", + "src/core/lib/tsi/fake_transport_security.h", + "src/core/lib/tsi/ssl_transport_security.h", + "src/core/lib/tsi/ssl_types.h", + "src/core/lib/tsi/transport_security.h", + "src/core/lib/tsi/transport_security_interface.h", "third_party/nanopb/pb.h", "third_party/nanopb/pb_common.h", "third_party/nanopb/pb_decode.h", "third_party/nanopb/pb_encode.h", - "src/core/census/grpc_context.c", - "src/core/census/grpc_filter.c", - "src/core/channel/channel_args.c", - "src/core/channel/channel_stack.c", - "src/core/channel/client_channel.c", - "src/core/channel/client_uchannel.c", - "src/core/channel/compress_filter.c", - "src/core/channel/connected_channel.c", - "src/core/channel/http_client_filter.c", - "src/core/channel/http_server_filter.c", - "src/core/channel/subchannel_call_holder.c", - "src/core/client_config/client_config.c", - "src/core/client_config/connector.c", - "src/core/client_config/default_initial_connect_string.c", - "src/core/client_config/initial_connect_string.c", - "src/core/client_config/lb_policies/load_balancer_api.c", - "src/core/client_config/lb_policies/pick_first.c", - "src/core/client_config/lb_policies/round_robin.c", - "src/core/client_config/lb_policy.c", - "src/core/client_config/lb_policy_factory.c", - "src/core/client_config/lb_policy_registry.c", - "src/core/client_config/resolver.c", - "src/core/client_config/resolver_factory.c", - "src/core/client_config/resolver_registry.c", - "src/core/client_config/resolvers/dns_resolver.c", - "src/core/client_config/resolvers/sockaddr_resolver.c", - "src/core/client_config/subchannel.c", - "src/core/client_config/subchannel_factory.c", - "src/core/client_config/subchannel_index.c", - "src/core/client_config/uri_parser.c", - "src/core/compression/compression_algorithm.c", - "src/core/compression/message_compress.c", - "src/core/debug/trace.c", - "src/core/httpcli/format_request.c", - "src/core/httpcli/httpcli.c", - "src/core/httpcli/parser.c", - "src/core/iomgr/closure.c", - "src/core/iomgr/endpoint.c", - "src/core/iomgr/endpoint_pair_posix.c", - "src/core/iomgr/endpoint_pair_windows.c", - "src/core/iomgr/exec_ctx.c", - "src/core/iomgr/executor.c", - "src/core/iomgr/fd_posix.c", - "src/core/iomgr/iocp_windows.c", - "src/core/iomgr/iomgr.c", - "src/core/iomgr/iomgr_posix.c", - "src/core/iomgr/iomgr_windows.c", - "src/core/iomgr/pollset_multipoller_with_epoll.c", - "src/core/iomgr/pollset_multipoller_with_poll_posix.c", - "src/core/iomgr/pollset_posix.c", - "src/core/iomgr/pollset_set_posix.c", - "src/core/iomgr/pollset_set_windows.c", - "src/core/iomgr/pollset_windows.c", - "src/core/iomgr/resolve_address_posix.c", - "src/core/iomgr/resolve_address_windows.c", - "src/core/iomgr/sockaddr_utils.c", - "src/core/iomgr/socket_utils_common_posix.c", - "src/core/iomgr/socket_utils_linux.c", - "src/core/iomgr/socket_utils_posix.c", - "src/core/iomgr/socket_windows.c", - "src/core/iomgr/tcp_client_posix.c", - "src/core/iomgr/tcp_client_windows.c", - "src/core/iomgr/tcp_posix.c", - "src/core/iomgr/tcp_server_posix.c", - "src/core/iomgr/tcp_server_windows.c", - "src/core/iomgr/tcp_windows.c", - "src/core/iomgr/time_averaged_stats.c", - "src/core/iomgr/timer.c", - "src/core/iomgr/timer_heap.c", - "src/core/iomgr/udp_server.c", - "src/core/iomgr/wakeup_fd_eventfd.c", - "src/core/iomgr/wakeup_fd_nospecial.c", - "src/core/iomgr/wakeup_fd_pipe.c", - "src/core/iomgr/wakeup_fd_posix.c", - "src/core/iomgr/workqueue_posix.c", - "src/core/iomgr/workqueue_windows.c", - "src/core/json/json.c", - "src/core/json/json_reader.c", - "src/core/json/json_string.c", - "src/core/json/json_writer.c", - "src/core/proto/grpc/lb/v0/load_balancer.pb.c", - "src/core/surface/alarm.c", - "src/core/surface/api_trace.c", - "src/core/surface/byte_buffer.c", - "src/core/surface/byte_buffer_reader.c", - "src/core/surface/call.c", - "src/core/surface/call_details.c", - "src/core/surface/call_log_batch.c", - "src/core/surface/channel.c", - "src/core/surface/channel_connectivity.c", - "src/core/surface/channel_create.c", - "src/core/surface/channel_ping.c", - "src/core/surface/completion_queue.c", - "src/core/surface/event_string.c", - "src/core/surface/init.c", - "src/core/surface/lame_client.c", - "src/core/surface/metadata_array.c", - "src/core/surface/server.c", - "src/core/surface/server_chttp2.c", - "src/core/surface/server_create.c", - "src/core/surface/validate_metadata.c", - "src/core/surface/version.c", - "src/core/transport/byte_stream.c", - "src/core/transport/chttp2/alpn.c", - "src/core/transport/chttp2/bin_encoder.c", - "src/core/transport/chttp2/frame_data.c", - "src/core/transport/chttp2/frame_goaway.c", - "src/core/transport/chttp2/frame_ping.c", - "src/core/transport/chttp2/frame_rst_stream.c", - "src/core/transport/chttp2/frame_settings.c", - "src/core/transport/chttp2/frame_window_update.c", - "src/core/transport/chttp2/hpack_encoder.c", - "src/core/transport/chttp2/hpack_parser.c", - "src/core/transport/chttp2/hpack_table.c", - "src/core/transport/chttp2/huffsyms.c", - "src/core/transport/chttp2/incoming_metadata.c", - "src/core/transport/chttp2/parsing.c", - "src/core/transport/chttp2/status_conversion.c", - "src/core/transport/chttp2/stream_lists.c", - "src/core/transport/chttp2/stream_map.c", - "src/core/transport/chttp2/timeout_encoding.c", - "src/core/transport/chttp2/varint.c", - "src/core/transport/chttp2/writing.c", - "src/core/transport/chttp2_transport.c", - "src/core/transport/connectivity_state.c", - "src/core/transport/metadata.c", - "src/core/transport/metadata_batch.c", - "src/core/transport/static_metadata.c", - "src/core/transport/transport.c", - "src/core/transport/transport_op_string.c", - "src/core/httpcli/httpcli_security_connector.c", - "src/core/security/b64.c", - "src/core/security/client_auth_filter.c", - "src/core/security/credentials.c", - "src/core/security/credentials_metadata.c", - "src/core/security/credentials_posix.c", - "src/core/security/credentials_win32.c", - "src/core/security/google_default_credentials.c", - "src/core/security/handshake.c", - "src/core/security/json_token.c", - "src/core/security/jwt_verifier.c", - "src/core/security/secure_endpoint.c", - "src/core/security/security_connector.c", - "src/core/security/security_context.c", - "src/core/security/server_auth_filter.c", - "src/core/security/server_secure_chttp2.c", - "src/core/surface/init_secure.c", - "src/core/surface/secure_channel_create.c", - "src/core/tsi/fake_transport_security.c", - "src/core/tsi/ssl_transport_security.c", - "src/core/tsi/transport_security.c", - "src/core/census/context.c", - "src/core/census/initialize.c", - "src/core/census/mlog.c", - "src/core/census/operation.c", - "src/core/census/placeholders.c", - "src/core/census/tracing.c", + "src/core/ext/transport/chttp2/client/insecure/channel_create.c", + "src/core/ext/transport/chttp2/client/secure/secure_channel_create.c", + "src/core/ext/transport/chttp2/server/insecure/server_chttp2.c", + "src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c", + "src/core/ext/transport/chttp2/transport/alpn.c", + "src/core/ext/transport/chttp2/transport/bin_encoder.c", + "src/core/ext/transport/chttp2/transport/chttp2_transport.c", + "src/core/ext/transport/chttp2/transport/frame_data.c", + "src/core/ext/transport/chttp2/transport/frame_goaway.c", + "src/core/ext/transport/chttp2/transport/frame_ping.c", + "src/core/ext/transport/chttp2/transport/frame_rst_stream.c", + "src/core/ext/transport/chttp2/transport/frame_settings.c", + "src/core/ext/transport/chttp2/transport/frame_window_update.c", + "src/core/ext/transport/chttp2/transport/hpack_encoder.c", + "src/core/ext/transport/chttp2/transport/hpack_parser.c", + "src/core/ext/transport/chttp2/transport/hpack_table.c", + "src/core/ext/transport/chttp2/transport/huffsyms.c", + "src/core/ext/transport/chttp2/transport/incoming_metadata.c", + "src/core/ext/transport/chttp2/transport/parsing.c", + "src/core/ext/transport/chttp2/transport/status_conversion.c", + "src/core/ext/transport/chttp2/transport/stream_lists.c", + "src/core/ext/transport/chttp2/transport/stream_map.c", + "src/core/ext/transport/chttp2/transport/timeout_encoding.c", + "src/core/ext/transport/chttp2/transport/varint.c", + "src/core/ext/transport/chttp2/transport/writing.c", + "src/core/lib/census/context.c", + "src/core/lib/census/grpc_context.c", + "src/core/lib/census/grpc_filter.c", + "src/core/lib/census/grpc_plugin.c", + "src/core/lib/census/initialize.c", + "src/core/lib/census/mlog.c", + "src/core/lib/census/operation.c", + "src/core/lib/census/placeholders.c", + "src/core/lib/census/tracing.c", + "src/core/lib/channel/channel_args.c", + "src/core/lib/channel/channel_stack.c", + "src/core/lib/channel/channel_stack_builder.c", + "src/core/lib/channel/client_channel.c", + "src/core/lib/channel/compress_filter.c", + "src/core/lib/channel/connected_channel.c", + "src/core/lib/channel/http_client_filter.c", + "src/core/lib/channel/http_server_filter.c", + "src/core/lib/channel/subchannel_call_holder.c", + "src/core/lib/client_config/client_config.c", + "src/core/lib/client_config/connector.c", + "src/core/lib/client_config/default_initial_connect_string.c", + "src/core/lib/client_config/initial_connect_string.c", + "src/core/lib/client_config/lb_policies/load_balancer_api.c", + "src/core/lib/client_config/lb_policies/pick_first.c", + "src/core/lib/client_config/lb_policies/round_robin.c", + "src/core/lib/client_config/lb_policy.c", + "src/core/lib/client_config/lb_policy_factory.c", + "src/core/lib/client_config/lb_policy_registry.c", + "src/core/lib/client_config/resolver.c", + "src/core/lib/client_config/resolver_factory.c", + "src/core/lib/client_config/resolver_registry.c", + "src/core/lib/client_config/resolvers/dns_resolver.c", + "src/core/lib/client_config/resolvers/sockaddr_resolver.c", + "src/core/lib/client_config/subchannel.c", + "src/core/lib/client_config/subchannel_factory.c", + "src/core/lib/client_config/subchannel_index.c", + "src/core/lib/client_config/uri_parser.c", + "src/core/lib/compression/compression_algorithm.c", + "src/core/lib/compression/message_compress.c", + "src/core/lib/debug/trace.c", + "src/core/lib/http/format_request.c", + "src/core/lib/http/httpcli.c", + "src/core/lib/http/httpcli_security_connector.c", + "src/core/lib/http/parser.c", + "src/core/lib/iomgr/closure.c", + "src/core/lib/iomgr/endpoint.c", + "src/core/lib/iomgr/endpoint_pair_posix.c", + "src/core/lib/iomgr/endpoint_pair_windows.c", + "src/core/lib/iomgr/exec_ctx.c", + "src/core/lib/iomgr/executor.c", + "src/core/lib/iomgr/fd_posix.c", + "src/core/lib/iomgr/iocp_windows.c", + "src/core/lib/iomgr/iomgr.c", + "src/core/lib/iomgr/iomgr_posix.c", + "src/core/lib/iomgr/iomgr_windows.c", + "src/core/lib/iomgr/pollset_multipoller_with_epoll.c", + "src/core/lib/iomgr/pollset_multipoller_with_poll_posix.c", + "src/core/lib/iomgr/pollset_posix.c", + "src/core/lib/iomgr/pollset_set_posix.c", + "src/core/lib/iomgr/pollset_set_windows.c", + "src/core/lib/iomgr/pollset_windows.c", + "src/core/lib/iomgr/resolve_address_posix.c", + "src/core/lib/iomgr/resolve_address_windows.c", + "src/core/lib/iomgr/sockaddr_utils.c", + "src/core/lib/iomgr/socket_utils_common_posix.c", + "src/core/lib/iomgr/socket_utils_linux.c", + "src/core/lib/iomgr/socket_utils_posix.c", + "src/core/lib/iomgr/socket_windows.c", + "src/core/lib/iomgr/tcp_client_posix.c", + "src/core/lib/iomgr/tcp_client_windows.c", + "src/core/lib/iomgr/tcp_posix.c", + "src/core/lib/iomgr/tcp_server_posix.c", + "src/core/lib/iomgr/tcp_server_windows.c", + "src/core/lib/iomgr/tcp_windows.c", + "src/core/lib/iomgr/time_averaged_stats.c", + "src/core/lib/iomgr/timer.c", + "src/core/lib/iomgr/timer_heap.c", + "src/core/lib/iomgr/udp_server.c", + "src/core/lib/iomgr/unix_sockets_posix.c", + "src/core/lib/iomgr/unix_sockets_posix_noop.c", + "src/core/lib/iomgr/wakeup_fd_eventfd.c", + "src/core/lib/iomgr/wakeup_fd_nospecial.c", + "src/core/lib/iomgr/wakeup_fd_pipe.c", + "src/core/lib/iomgr/wakeup_fd_posix.c", + "src/core/lib/iomgr/workqueue_posix.c", + "src/core/lib/iomgr/workqueue_windows.c", + "src/core/lib/json/json.c", + "src/core/lib/json/json_reader.c", + "src/core/lib/json/json_string.c", + "src/core/lib/json/json_writer.c", + "src/core/lib/proto/grpc/lb/v0/load_balancer.pb.c", + "src/core/lib/security/b64.c", + "src/core/lib/security/client_auth_filter.c", + "src/core/lib/security/credentials.c", + "src/core/lib/security/credentials_metadata.c", + "src/core/lib/security/credentials_posix.c", + "src/core/lib/security/credentials_win32.c", + "src/core/lib/security/google_default_credentials.c", + "src/core/lib/security/handshake.c", + "src/core/lib/security/json_token.c", + "src/core/lib/security/jwt_verifier.c", + "src/core/lib/security/secure_endpoint.c", + "src/core/lib/security/security_connector.c", + "src/core/lib/security/security_context.c", + "src/core/lib/security/server_auth_filter.c", + "src/core/lib/surface/alarm.c", + "src/core/lib/surface/api_trace.c", + "src/core/lib/surface/byte_buffer.c", + "src/core/lib/surface/byte_buffer_reader.c", + "src/core/lib/surface/call.c", + "src/core/lib/surface/call_details.c", + "src/core/lib/surface/call_log_batch.c", + "src/core/lib/surface/channel.c", + "src/core/lib/surface/channel_connectivity.c", + "src/core/lib/surface/channel_init.c", + "src/core/lib/surface/channel_ping.c", + "src/core/lib/surface/channel_stack_type.c", + "src/core/lib/surface/completion_queue.c", + "src/core/lib/surface/event_string.c", + "src/core/lib/surface/init.c", + "src/core/lib/surface/init_secure.c", + "src/core/lib/surface/lame_client.c", + "src/core/lib/surface/metadata_array.c", + "src/core/lib/surface/server.c", + "src/core/lib/surface/validate_metadata.c", + "src/core/lib/surface/version.c", + "src/core/lib/transport/byte_stream.c", + "src/core/lib/transport/connectivity_state.c", + "src/core/lib/transport/metadata.c", + "src/core/lib/transport/metadata_batch.c", + "src/core/lib/transport/static_metadata.c", + "src/core/lib/transport/transport.c", + "src/core/lib/transport/transport_op_string.c", + "src/core/lib/tsi/fake_transport_security.c", + "src/core/lib/tsi/ssl_transport_security.c", + "src/core/lib/tsi/transport_security.c", "third_party/nanopb/pb_common.c", "third_party/nanopb/pb_decode.c", "third_party/nanopb/pb_encode.c", ], hdrs = [ + "include/grpc/byte_buffer.h", + "include/grpc/byte_buffer_reader.h", + "include/grpc/census.h", + "include/grpc/compression.h", + "include/grpc/grpc.h", "include/grpc/grpc_security.h", "include/grpc/impl/codegen/byte_buffer.h", "include/grpc/impl/codegen/compression_types.h", @@ -460,12 +476,7 @@ cc_library( "include/grpc/impl/codegen/grpc_types.h", "include/grpc/impl/codegen/propagation_bits.h", "include/grpc/impl/codegen/status.h", - "include/grpc/byte_buffer.h", - "include/grpc/byte_buffer_reader.h", - "include/grpc/compression.h", - "include/grpc/grpc.h", "include/grpc/status.h", - "include/grpc/census.h", ], includes = [ "include", @@ -482,268 +493,313 @@ cc_library( ) +cc_library( + name = "grpc_codegen_lib", + srcs = [ + ], + hdrs = [ + "include/grpc/impl/codegen/alloc.h", + "include/grpc/impl/codegen/atm.h", + "include/grpc/impl/codegen/atm_gcc_atomic.h", + "include/grpc/impl/codegen/atm_gcc_sync.h", + "include/grpc/impl/codegen/atm_win32.h", + "include/grpc/impl/codegen/byte_buffer.h", + "include/grpc/impl/codegen/compression_types.h", + "include/grpc/impl/codegen/connectivity_state.h", + "include/grpc/impl/codegen/grpc_types.h", + "include/grpc/impl/codegen/log.h", + "include/grpc/impl/codegen/port_platform.h", + "include/grpc/impl/codegen/propagation_bits.h", + "include/grpc/impl/codegen/slice.h", + "include/grpc/impl/codegen/slice_buffer.h", + "include/grpc/impl/codegen/status.h", + "include/grpc/impl/codegen/sync.h", + "include/grpc/impl/codegen/sync_generic.h", + "include/grpc/impl/codegen/sync_posix.h", + "include/grpc/impl/codegen/sync_win32.h", + "include/grpc/impl/codegen/time.h", + ], + includes = [ + "include", + ".", + ], + deps = [ + "//external:protobuf_compiler", + ], +) + + cc_library( name = "grpc_unsecure", srcs = [ - "src/core/census/grpc_filter.h", - "src/core/channel/channel_args.h", - "src/core/channel/channel_stack.h", - "src/core/channel/client_channel.h", - "src/core/channel/client_uchannel.h", - "src/core/channel/compress_filter.h", - "src/core/channel/connected_channel.h", - "src/core/channel/context.h", - "src/core/channel/http_client_filter.h", - "src/core/channel/http_server_filter.h", - "src/core/channel/subchannel_call_holder.h", - "src/core/client_config/client_config.h", - "src/core/client_config/connector.h", - "src/core/client_config/initial_connect_string.h", - "src/core/client_config/lb_policies/load_balancer_api.h", - "src/core/client_config/lb_policies/pick_first.h", - "src/core/client_config/lb_policies/round_robin.h", - "src/core/client_config/lb_policy.h", - "src/core/client_config/lb_policy_factory.h", - "src/core/client_config/lb_policy_registry.h", - "src/core/client_config/resolver.h", - "src/core/client_config/resolver_factory.h", - "src/core/client_config/resolver_registry.h", - "src/core/client_config/resolvers/dns_resolver.h", - "src/core/client_config/resolvers/sockaddr_resolver.h", - "src/core/client_config/subchannel.h", - "src/core/client_config/subchannel_factory.h", - "src/core/client_config/subchannel_index.h", - "src/core/client_config/uri_parser.h", - "src/core/compression/algorithm_metadata.h", - "src/core/compression/message_compress.h", - "src/core/debug/trace.h", - "src/core/httpcli/format_request.h", - "src/core/httpcli/httpcli.h", - "src/core/httpcli/parser.h", - "src/core/iomgr/closure.h", - "src/core/iomgr/endpoint.h", - "src/core/iomgr/endpoint_pair.h", - "src/core/iomgr/exec_ctx.h", - "src/core/iomgr/executor.h", - "src/core/iomgr/fd_posix.h", - "src/core/iomgr/iocp_windows.h", - "src/core/iomgr/iomgr.h", - "src/core/iomgr/iomgr_internal.h", - "src/core/iomgr/iomgr_posix.h", - "src/core/iomgr/pollset.h", - "src/core/iomgr/pollset_posix.h", - "src/core/iomgr/pollset_set.h", - "src/core/iomgr/pollset_set_posix.h", - "src/core/iomgr/pollset_set_windows.h", - "src/core/iomgr/pollset_windows.h", - "src/core/iomgr/resolve_address.h", - "src/core/iomgr/sockaddr.h", - "src/core/iomgr/sockaddr_posix.h", - "src/core/iomgr/sockaddr_utils.h", - "src/core/iomgr/sockaddr_win32.h", - "src/core/iomgr/socket_utils_posix.h", - "src/core/iomgr/socket_windows.h", - "src/core/iomgr/tcp_client.h", - "src/core/iomgr/tcp_posix.h", - "src/core/iomgr/tcp_server.h", - "src/core/iomgr/tcp_windows.h", - "src/core/iomgr/time_averaged_stats.h", - "src/core/iomgr/timer.h", - "src/core/iomgr/timer_heap.h", - "src/core/iomgr/udp_server.h", - "src/core/iomgr/wakeup_fd_pipe.h", - "src/core/iomgr/wakeup_fd_posix.h", - "src/core/iomgr/workqueue.h", - "src/core/iomgr/workqueue_posix.h", - "src/core/iomgr/workqueue_windows.h", - "src/core/json/json.h", - "src/core/json/json_common.h", - "src/core/json/json_reader.h", - "src/core/json/json_writer.h", - "src/core/proto/grpc/lb/v0/load_balancer.pb.h", - "src/core/statistics/census_interface.h", - "src/core/statistics/census_rpc_stats.h", - "src/core/surface/api_trace.h", - "src/core/surface/call.h", - "src/core/surface/call_test_only.h", - "src/core/surface/channel.h", - "src/core/surface/completion_queue.h", - "src/core/surface/event_string.h", - "src/core/surface/init.h", - "src/core/surface/server.h", - "src/core/surface/surface_trace.h", - "src/core/transport/byte_stream.h", - "src/core/transport/chttp2/alpn.h", - "src/core/transport/chttp2/bin_encoder.h", - "src/core/transport/chttp2/frame.h", - "src/core/transport/chttp2/frame_data.h", - "src/core/transport/chttp2/frame_goaway.h", - "src/core/transport/chttp2/frame_ping.h", - "src/core/transport/chttp2/frame_rst_stream.h", - "src/core/transport/chttp2/frame_settings.h", - "src/core/transport/chttp2/frame_window_update.h", - "src/core/transport/chttp2/hpack_encoder.h", - "src/core/transport/chttp2/hpack_parser.h", - "src/core/transport/chttp2/hpack_table.h", - "src/core/transport/chttp2/http2_errors.h", - "src/core/transport/chttp2/huffsyms.h", - "src/core/transport/chttp2/incoming_metadata.h", - "src/core/transport/chttp2/internal.h", - "src/core/transport/chttp2/status_conversion.h", - "src/core/transport/chttp2/stream_map.h", - "src/core/transport/chttp2/timeout_encoding.h", - "src/core/transport/chttp2/varint.h", - "src/core/transport/chttp2_transport.h", - "src/core/transport/connectivity_state.h", - "src/core/transport/metadata.h", - "src/core/transport/metadata_batch.h", - "src/core/transport/static_metadata.h", - "src/core/transport/transport.h", - "src/core/transport/transport_impl.h", - "src/core/census/aggregation.h", - "src/core/census/mlog.h", - "src/core/census/rpc_metric_id.h", + "src/core/ext/transport/chttp2/transport/alpn.h", + "src/core/ext/transport/chttp2/transport/bin_encoder.h", + "src/core/ext/transport/chttp2/transport/chttp2_transport.h", + "src/core/ext/transport/chttp2/transport/frame.h", + "src/core/ext/transport/chttp2/transport/frame_data.h", + "src/core/ext/transport/chttp2/transport/frame_goaway.h", + "src/core/ext/transport/chttp2/transport/frame_ping.h", + "src/core/ext/transport/chttp2/transport/frame_rst_stream.h", + "src/core/ext/transport/chttp2/transport/frame_settings.h", + "src/core/ext/transport/chttp2/transport/frame_window_update.h", + "src/core/ext/transport/chttp2/transport/hpack_encoder.h", + "src/core/ext/transport/chttp2/transport/hpack_parser.h", + "src/core/ext/transport/chttp2/transport/hpack_table.h", + "src/core/ext/transport/chttp2/transport/http2_errors.h", + "src/core/ext/transport/chttp2/transport/huffsyms.h", + "src/core/ext/transport/chttp2/transport/incoming_metadata.h", + "src/core/ext/transport/chttp2/transport/internal.h", + "src/core/ext/transport/chttp2/transport/status_conversion.h", + "src/core/ext/transport/chttp2/transport/stream_map.h", + "src/core/ext/transport/chttp2/transport/timeout_encoding.h", + "src/core/ext/transport/chttp2/transport/varint.h", + "src/core/lib/census/aggregation.h", + "src/core/lib/census/grpc_filter.h", + "src/core/lib/census/grpc_plugin.h", + "src/core/lib/census/mlog.h", + "src/core/lib/census/rpc_metric_id.h", + "src/core/lib/channel/channel_args.h", + "src/core/lib/channel/channel_stack.h", + "src/core/lib/channel/channel_stack_builder.h", + "src/core/lib/channel/client_channel.h", + "src/core/lib/channel/compress_filter.h", + "src/core/lib/channel/connected_channel.h", + "src/core/lib/channel/context.h", + "src/core/lib/channel/http_client_filter.h", + "src/core/lib/channel/http_server_filter.h", + "src/core/lib/channel/subchannel_call_holder.h", + "src/core/lib/client_config/client_config.h", + "src/core/lib/client_config/connector.h", + "src/core/lib/client_config/initial_connect_string.h", + "src/core/lib/client_config/lb_policies/load_balancer_api.h", + "src/core/lib/client_config/lb_policies/pick_first.h", + "src/core/lib/client_config/lb_policies/round_robin.h", + "src/core/lib/client_config/lb_policy.h", + "src/core/lib/client_config/lb_policy_factory.h", + "src/core/lib/client_config/lb_policy_registry.h", + "src/core/lib/client_config/resolver.h", + "src/core/lib/client_config/resolver_factory.h", + "src/core/lib/client_config/resolver_registry.h", + "src/core/lib/client_config/resolvers/dns_resolver.h", + "src/core/lib/client_config/resolvers/sockaddr_resolver.h", + "src/core/lib/client_config/subchannel.h", + "src/core/lib/client_config/subchannel_factory.h", + "src/core/lib/client_config/subchannel_index.h", + "src/core/lib/client_config/uri_parser.h", + "src/core/lib/compression/algorithm_metadata.h", + "src/core/lib/compression/message_compress.h", + "src/core/lib/debug/trace.h", + "src/core/lib/http/format_request.h", + "src/core/lib/http/httpcli.h", + "src/core/lib/http/parser.h", + "src/core/lib/iomgr/closure.h", + "src/core/lib/iomgr/endpoint.h", + "src/core/lib/iomgr/endpoint_pair.h", + "src/core/lib/iomgr/exec_ctx.h", + "src/core/lib/iomgr/executor.h", + "src/core/lib/iomgr/fd_posix.h", + "src/core/lib/iomgr/iocp_windows.h", + "src/core/lib/iomgr/iomgr.h", + "src/core/lib/iomgr/iomgr_internal.h", + "src/core/lib/iomgr/iomgr_posix.h", + "src/core/lib/iomgr/pollset.h", + "src/core/lib/iomgr/pollset_posix.h", + "src/core/lib/iomgr/pollset_set.h", + "src/core/lib/iomgr/pollset_set_posix.h", + "src/core/lib/iomgr/pollset_set_windows.h", + "src/core/lib/iomgr/pollset_windows.h", + "src/core/lib/iomgr/resolve_address.h", + "src/core/lib/iomgr/sockaddr.h", + "src/core/lib/iomgr/sockaddr_posix.h", + "src/core/lib/iomgr/sockaddr_utils.h", + "src/core/lib/iomgr/sockaddr_win32.h", + "src/core/lib/iomgr/socket_utils_posix.h", + "src/core/lib/iomgr/socket_windows.h", + "src/core/lib/iomgr/tcp_client.h", + "src/core/lib/iomgr/tcp_posix.h", + "src/core/lib/iomgr/tcp_server.h", + "src/core/lib/iomgr/tcp_windows.h", + "src/core/lib/iomgr/time_averaged_stats.h", + "src/core/lib/iomgr/timer.h", + "src/core/lib/iomgr/timer_heap.h", + "src/core/lib/iomgr/udp_server.h", + "src/core/lib/iomgr/unix_sockets_posix.h", + "src/core/lib/iomgr/wakeup_fd_pipe.h", + "src/core/lib/iomgr/wakeup_fd_posix.h", + "src/core/lib/iomgr/workqueue.h", + "src/core/lib/iomgr/workqueue_posix.h", + "src/core/lib/iomgr/workqueue_windows.h", + "src/core/lib/json/json.h", + "src/core/lib/json/json_common.h", + "src/core/lib/json/json_reader.h", + "src/core/lib/json/json_writer.h", + "src/core/lib/proto/grpc/lb/v0/load_balancer.pb.h", + "src/core/lib/statistics/census_interface.h", + "src/core/lib/statistics/census_rpc_stats.h", + "src/core/lib/surface/api_trace.h", + "src/core/lib/surface/call.h", + "src/core/lib/surface/call_test_only.h", + "src/core/lib/surface/channel.h", + "src/core/lib/surface/channel_init.h", + "src/core/lib/surface/channel_stack_type.h", + "src/core/lib/surface/completion_queue.h", + "src/core/lib/surface/event_string.h", + "src/core/lib/surface/init.h", + "src/core/lib/surface/lame_client.h", + "src/core/lib/surface/server.h", + "src/core/lib/surface/surface_trace.h", + "src/core/lib/transport/byte_stream.h", + "src/core/lib/transport/connectivity_state.h", + "src/core/lib/transport/metadata.h", + "src/core/lib/transport/metadata_batch.h", + "src/core/lib/transport/static_metadata.h", + "src/core/lib/transport/transport.h", + "src/core/lib/transport/transport_impl.h", "third_party/nanopb/pb.h", "third_party/nanopb/pb_common.h", "third_party/nanopb/pb_decode.h", "third_party/nanopb/pb_encode.h", - "src/core/surface/init_unsecure.c", - "src/core/census/grpc_context.c", - "src/core/census/grpc_filter.c", - "src/core/channel/channel_args.c", - "src/core/channel/channel_stack.c", - "src/core/channel/client_channel.c", - "src/core/channel/client_uchannel.c", - "src/core/channel/compress_filter.c", - "src/core/channel/connected_channel.c", - "src/core/channel/http_client_filter.c", - "src/core/channel/http_server_filter.c", - "src/core/channel/subchannel_call_holder.c", - "src/core/client_config/client_config.c", - "src/core/client_config/connector.c", - "src/core/client_config/default_initial_connect_string.c", - "src/core/client_config/initial_connect_string.c", - "src/core/client_config/lb_policies/load_balancer_api.c", - "src/core/client_config/lb_policies/pick_first.c", - "src/core/client_config/lb_policies/round_robin.c", - "src/core/client_config/lb_policy.c", - "src/core/client_config/lb_policy_factory.c", - "src/core/client_config/lb_policy_registry.c", - "src/core/client_config/resolver.c", - "src/core/client_config/resolver_factory.c", - "src/core/client_config/resolver_registry.c", - "src/core/client_config/resolvers/dns_resolver.c", - "src/core/client_config/resolvers/sockaddr_resolver.c", - "src/core/client_config/subchannel.c", - "src/core/client_config/subchannel_factory.c", - "src/core/client_config/subchannel_index.c", - "src/core/client_config/uri_parser.c", - "src/core/compression/compression_algorithm.c", - "src/core/compression/message_compress.c", - "src/core/debug/trace.c", - "src/core/httpcli/format_request.c", - "src/core/httpcli/httpcli.c", - "src/core/httpcli/parser.c", - "src/core/iomgr/closure.c", - "src/core/iomgr/endpoint.c", - "src/core/iomgr/endpoint_pair_posix.c", - "src/core/iomgr/endpoint_pair_windows.c", - "src/core/iomgr/exec_ctx.c", - "src/core/iomgr/executor.c", - "src/core/iomgr/fd_posix.c", - "src/core/iomgr/iocp_windows.c", - "src/core/iomgr/iomgr.c", - "src/core/iomgr/iomgr_posix.c", - "src/core/iomgr/iomgr_windows.c", - "src/core/iomgr/pollset_multipoller_with_epoll.c", - "src/core/iomgr/pollset_multipoller_with_poll_posix.c", - "src/core/iomgr/pollset_posix.c", - "src/core/iomgr/pollset_set_posix.c", - "src/core/iomgr/pollset_set_windows.c", - "src/core/iomgr/pollset_windows.c", - "src/core/iomgr/resolve_address_posix.c", - "src/core/iomgr/resolve_address_windows.c", - "src/core/iomgr/sockaddr_utils.c", - "src/core/iomgr/socket_utils_common_posix.c", - "src/core/iomgr/socket_utils_linux.c", - "src/core/iomgr/socket_utils_posix.c", - "src/core/iomgr/socket_windows.c", - "src/core/iomgr/tcp_client_posix.c", - "src/core/iomgr/tcp_client_windows.c", - "src/core/iomgr/tcp_posix.c", - "src/core/iomgr/tcp_server_posix.c", - "src/core/iomgr/tcp_server_windows.c", - "src/core/iomgr/tcp_windows.c", - "src/core/iomgr/time_averaged_stats.c", - "src/core/iomgr/timer.c", - "src/core/iomgr/timer_heap.c", - "src/core/iomgr/udp_server.c", - "src/core/iomgr/wakeup_fd_eventfd.c", - "src/core/iomgr/wakeup_fd_nospecial.c", - "src/core/iomgr/wakeup_fd_pipe.c", - "src/core/iomgr/wakeup_fd_posix.c", - "src/core/iomgr/workqueue_posix.c", - "src/core/iomgr/workqueue_windows.c", - "src/core/json/json.c", - "src/core/json/json_reader.c", - "src/core/json/json_string.c", - "src/core/json/json_writer.c", - "src/core/proto/grpc/lb/v0/load_balancer.pb.c", - "src/core/surface/alarm.c", - "src/core/surface/api_trace.c", - "src/core/surface/byte_buffer.c", - "src/core/surface/byte_buffer_reader.c", - "src/core/surface/call.c", - "src/core/surface/call_details.c", - "src/core/surface/call_log_batch.c", - "src/core/surface/channel.c", - "src/core/surface/channel_connectivity.c", - "src/core/surface/channel_create.c", - "src/core/surface/channel_ping.c", - "src/core/surface/completion_queue.c", - "src/core/surface/event_string.c", - "src/core/surface/init.c", - "src/core/surface/lame_client.c", - "src/core/surface/metadata_array.c", - "src/core/surface/server.c", - "src/core/surface/server_chttp2.c", - "src/core/surface/server_create.c", - "src/core/surface/validate_metadata.c", - "src/core/surface/version.c", - "src/core/transport/byte_stream.c", - "src/core/transport/chttp2/alpn.c", - "src/core/transport/chttp2/bin_encoder.c", - "src/core/transport/chttp2/frame_data.c", - "src/core/transport/chttp2/frame_goaway.c", - "src/core/transport/chttp2/frame_ping.c", - "src/core/transport/chttp2/frame_rst_stream.c", - "src/core/transport/chttp2/frame_settings.c", - "src/core/transport/chttp2/frame_window_update.c", - "src/core/transport/chttp2/hpack_encoder.c", - "src/core/transport/chttp2/hpack_parser.c", - "src/core/transport/chttp2/hpack_table.c", - "src/core/transport/chttp2/huffsyms.c", - "src/core/transport/chttp2/incoming_metadata.c", - "src/core/transport/chttp2/parsing.c", - "src/core/transport/chttp2/status_conversion.c", - "src/core/transport/chttp2/stream_lists.c", - "src/core/transport/chttp2/stream_map.c", - "src/core/transport/chttp2/timeout_encoding.c", - "src/core/transport/chttp2/varint.c", - "src/core/transport/chttp2/writing.c", - "src/core/transport/chttp2_transport.c", - "src/core/transport/connectivity_state.c", - "src/core/transport/metadata.c", - "src/core/transport/metadata_batch.c", - "src/core/transport/static_metadata.c", - "src/core/transport/transport.c", - "src/core/transport/transport_op_string.c", - "src/core/census/context.c", - "src/core/census/initialize.c", - "src/core/census/mlog.c", - "src/core/census/operation.c", - "src/core/census/placeholders.c", - "src/core/census/tracing.c", + "src/core/ext/transport/chttp2/client/insecure/channel_create.c", + "src/core/ext/transport/chttp2/server/insecure/server_chttp2.c", + "src/core/ext/transport/chttp2/transport/alpn.c", + "src/core/ext/transport/chttp2/transport/bin_encoder.c", + "src/core/ext/transport/chttp2/transport/chttp2_transport.c", + "src/core/ext/transport/chttp2/transport/frame_data.c", + "src/core/ext/transport/chttp2/transport/frame_goaway.c", + "src/core/ext/transport/chttp2/transport/frame_ping.c", + "src/core/ext/transport/chttp2/transport/frame_rst_stream.c", + "src/core/ext/transport/chttp2/transport/frame_settings.c", + "src/core/ext/transport/chttp2/transport/frame_window_update.c", + "src/core/ext/transport/chttp2/transport/hpack_encoder.c", + "src/core/ext/transport/chttp2/transport/hpack_parser.c", + "src/core/ext/transport/chttp2/transport/hpack_table.c", + "src/core/ext/transport/chttp2/transport/huffsyms.c", + "src/core/ext/transport/chttp2/transport/incoming_metadata.c", + "src/core/ext/transport/chttp2/transport/parsing.c", + "src/core/ext/transport/chttp2/transport/status_conversion.c", + "src/core/ext/transport/chttp2/transport/stream_lists.c", + "src/core/ext/transport/chttp2/transport/stream_map.c", + "src/core/ext/transport/chttp2/transport/timeout_encoding.c", + "src/core/ext/transport/chttp2/transport/varint.c", + "src/core/ext/transport/chttp2/transport/writing.c", + "src/core/lib/census/context.c", + "src/core/lib/census/grpc_context.c", + "src/core/lib/census/grpc_filter.c", + "src/core/lib/census/grpc_plugin.c", + "src/core/lib/census/initialize.c", + "src/core/lib/census/mlog.c", + "src/core/lib/census/operation.c", + "src/core/lib/census/placeholders.c", + "src/core/lib/census/tracing.c", + "src/core/lib/channel/channel_args.c", + "src/core/lib/channel/channel_stack.c", + "src/core/lib/channel/channel_stack_builder.c", + "src/core/lib/channel/client_channel.c", + "src/core/lib/channel/compress_filter.c", + "src/core/lib/channel/connected_channel.c", + "src/core/lib/channel/http_client_filter.c", + "src/core/lib/channel/http_server_filter.c", + "src/core/lib/channel/subchannel_call_holder.c", + "src/core/lib/client_config/client_config.c", + "src/core/lib/client_config/connector.c", + "src/core/lib/client_config/default_initial_connect_string.c", + "src/core/lib/client_config/initial_connect_string.c", + "src/core/lib/client_config/lb_policies/load_balancer_api.c", + "src/core/lib/client_config/lb_policies/pick_first.c", + "src/core/lib/client_config/lb_policies/round_robin.c", + "src/core/lib/client_config/lb_policy.c", + "src/core/lib/client_config/lb_policy_factory.c", + "src/core/lib/client_config/lb_policy_registry.c", + "src/core/lib/client_config/resolver.c", + "src/core/lib/client_config/resolver_factory.c", + "src/core/lib/client_config/resolver_registry.c", + "src/core/lib/client_config/resolvers/dns_resolver.c", + "src/core/lib/client_config/resolvers/sockaddr_resolver.c", + "src/core/lib/client_config/subchannel.c", + "src/core/lib/client_config/subchannel_factory.c", + "src/core/lib/client_config/subchannel_index.c", + "src/core/lib/client_config/uri_parser.c", + "src/core/lib/compression/compression_algorithm.c", + "src/core/lib/compression/message_compress.c", + "src/core/lib/debug/trace.c", + "src/core/lib/http/format_request.c", + "src/core/lib/http/httpcli.c", + "src/core/lib/http/parser.c", + "src/core/lib/iomgr/closure.c", + "src/core/lib/iomgr/endpoint.c", + "src/core/lib/iomgr/endpoint_pair_posix.c", + "src/core/lib/iomgr/endpoint_pair_windows.c", + "src/core/lib/iomgr/exec_ctx.c", + "src/core/lib/iomgr/executor.c", + "src/core/lib/iomgr/fd_posix.c", + "src/core/lib/iomgr/iocp_windows.c", + "src/core/lib/iomgr/iomgr.c", + "src/core/lib/iomgr/iomgr_posix.c", + "src/core/lib/iomgr/iomgr_windows.c", + "src/core/lib/iomgr/pollset_multipoller_with_epoll.c", + "src/core/lib/iomgr/pollset_multipoller_with_poll_posix.c", + "src/core/lib/iomgr/pollset_posix.c", + "src/core/lib/iomgr/pollset_set_posix.c", + "src/core/lib/iomgr/pollset_set_windows.c", + "src/core/lib/iomgr/pollset_windows.c", + "src/core/lib/iomgr/resolve_address_posix.c", + "src/core/lib/iomgr/resolve_address_windows.c", + "src/core/lib/iomgr/sockaddr_utils.c", + "src/core/lib/iomgr/socket_utils_common_posix.c", + "src/core/lib/iomgr/socket_utils_linux.c", + "src/core/lib/iomgr/socket_utils_posix.c", + "src/core/lib/iomgr/socket_windows.c", + "src/core/lib/iomgr/tcp_client_posix.c", + "src/core/lib/iomgr/tcp_client_windows.c", + "src/core/lib/iomgr/tcp_posix.c", + "src/core/lib/iomgr/tcp_server_posix.c", + "src/core/lib/iomgr/tcp_server_windows.c", + "src/core/lib/iomgr/tcp_windows.c", + "src/core/lib/iomgr/time_averaged_stats.c", + "src/core/lib/iomgr/timer.c", + "src/core/lib/iomgr/timer_heap.c", + "src/core/lib/iomgr/udp_server.c", + "src/core/lib/iomgr/unix_sockets_posix.c", + "src/core/lib/iomgr/unix_sockets_posix_noop.c", + "src/core/lib/iomgr/wakeup_fd_eventfd.c", + "src/core/lib/iomgr/wakeup_fd_nospecial.c", + "src/core/lib/iomgr/wakeup_fd_pipe.c", + "src/core/lib/iomgr/wakeup_fd_posix.c", + "src/core/lib/iomgr/workqueue_posix.c", + "src/core/lib/iomgr/workqueue_windows.c", + "src/core/lib/json/json.c", + "src/core/lib/json/json_reader.c", + "src/core/lib/json/json_string.c", + "src/core/lib/json/json_writer.c", + "src/core/lib/proto/grpc/lb/v0/load_balancer.pb.c", + "src/core/lib/surface/alarm.c", + "src/core/lib/surface/api_trace.c", + "src/core/lib/surface/byte_buffer.c", + "src/core/lib/surface/byte_buffer_reader.c", + "src/core/lib/surface/call.c", + "src/core/lib/surface/call_details.c", + "src/core/lib/surface/call_log_batch.c", + "src/core/lib/surface/channel.c", + "src/core/lib/surface/channel_connectivity.c", + "src/core/lib/surface/channel_init.c", + "src/core/lib/surface/channel_ping.c", + "src/core/lib/surface/channel_stack_type.c", + "src/core/lib/surface/completion_queue.c", + "src/core/lib/surface/event_string.c", + "src/core/lib/surface/init.c", + "src/core/lib/surface/init_unsecure.c", + "src/core/lib/surface/lame_client.c", + "src/core/lib/surface/metadata_array.c", + "src/core/lib/surface/server.c", + "src/core/lib/surface/validate_metadata.c", + "src/core/lib/surface/version.c", + "src/core/lib/transport/byte_stream.c", + "src/core/lib/transport/connectivity_state.c", + "src/core/lib/transport/metadata.c", + "src/core/lib/transport/metadata_batch.c", + "src/core/lib/transport/static_metadata.c", + "src/core/lib/transport/transport.c", + "src/core/lib/transport/transport_op_string.c", "third_party/nanopb/pb_common.c", "third_party/nanopb/pb_decode.c", "third_party/nanopb/pb_encode.c", @@ -751,16 +807,16 @@ cc_library( hdrs = [ "include/grpc/byte_buffer.h", "include/grpc/byte_buffer_reader.h", + "include/grpc/census.h", "include/grpc/compression.h", "include/grpc/grpc.h", - "include/grpc/status.h", "include/grpc/impl/codegen/byte_buffer.h", "include/grpc/impl/codegen/compression_types.h", "include/grpc/impl/codegen/connectivity_state.h", "include/grpc/impl/codegen/grpc_types.h", "include/grpc/impl/codegen/propagation_bits.h", "include/grpc/impl/codegen/status.h", - "include/grpc/census.h", + "include/grpc/status.h", ], includes = [ "include", @@ -778,8 +834,8 @@ cc_library( cc_library( name = "grpc_zookeeper", srcs = [ - "src/core/client_config/resolvers/zookeeper_resolver.h", - "src/core/client_config/resolvers/zookeeper_resolver.c", + "src/core/lib/client_config/resolvers/zookeeper_resolver.h", + "src/core/lib/client_config/resolvers/zookeeper_resolver.c", ], hdrs = [ "include/grpc/grpc_zookeeper.h", @@ -798,19 +854,14 @@ cc_library( cc_library( name = "grpc++", srcs = [ - "src/cpp/client/secure_credentials.h", - "src/cpp/common/secure_auth_context.h", - "src/cpp/server/secure_server_credentials.h", "src/cpp/client/create_channel_internal.h", + "src/cpp/client/secure_credentials.h", + "src/cpp/common/core_codegen.h", "src/cpp/common/create_auth_context.h", + "src/cpp/common/secure_auth_context.h", "src/cpp/server/dynamic_thread_pool.h", + "src/cpp/server/secure_server_credentials.h", "src/cpp/server/thread_pool_interface.h", - "src/cpp/client/secure_credentials.cc", - "src/cpp/common/auth_property_iterator.cc", - "src/cpp/common/secure_auth_context.cc", - "src/cpp/common/secure_channel_arguments.cc", - "src/cpp/common/secure_create_auth_context.cc", - "src/cpp/server/secure_server_credentials.cc", "src/cpp/client/channel.cc", "src/cpp/client/client_context.cc", "src/cpp/client/create_channel.cc", @@ -818,15 +869,21 @@ cc_library( "src/cpp/client/credentials.cc", "src/cpp/client/generic_stub.cc", "src/cpp/client/insecure_credentials.cc", - "src/cpp/common/call.cc", + "src/cpp/client/secure_credentials.cc", + "src/cpp/codegen/codegen_init.cc", + "src/cpp/common/auth_property_iterator.cc", "src/cpp/common/channel_arguments.cc", "src/cpp/common/completion_queue.cc", + "src/cpp/common/core_codegen.cc", "src/cpp/common/rpc_method.cc", - "src/cpp/proto/proto_utils.cc", + "src/cpp/common/secure_auth_context.cc", + "src/cpp/common/secure_channel_arguments.cc", + "src/cpp/common/secure_create_auth_context.cc", "src/cpp/server/async_generic_service.cc", "src/cpp/server/create_default_thread_pool.cc", "src/cpp/server/dynamic_thread_pool.cc", "src/cpp/server/insecure_server_credentials.cc", + "src/cpp/server/secure_server_credentials.cc", "src/cpp/server/server.cc", "src/cpp/server/server_builder.cc", "src/cpp/server/server_context.cc", @@ -836,7 +893,6 @@ cc_library( "src/cpp/util/status.cc", "src/cpp/util/string_ref.cc", "src/cpp/util/time.cc", - "src/cpp/codegen/grpc_library.cc", ], hdrs = [ "include/grpc++/alarm.h", @@ -849,6 +905,37 @@ cc_library( "include/grpc++/grpc++.h", "include/grpc++/impl/call.h", "include/grpc++/impl/client_unary_call.h", + "include/grpc++/impl/codegen/async_stream.h", + "include/grpc++/impl/codegen/async_unary_call.h", + "include/grpc++/impl/codegen/call.h", + "include/grpc++/impl/codegen/call_hook.h", + "include/grpc++/impl/codegen/channel_interface.h", + "include/grpc++/impl/codegen/client_context.h", + "include/grpc++/impl/codegen/client_unary_call.h", + "include/grpc++/impl/codegen/completion_queue.h", + "include/grpc++/impl/codegen/completion_queue_tag.h", + "include/grpc++/impl/codegen/config.h", + "include/grpc++/impl/codegen/config_protobuf.h", + "include/grpc++/impl/codegen/core_codegen_interface.h", + "include/grpc++/impl/codegen/grpc_library.h", + "include/grpc++/impl/codegen/method_handler_impl.h", + "include/grpc++/impl/codegen/proto_utils.h", + "include/grpc++/impl/codegen/rpc_method.h", + "include/grpc++/impl/codegen/rpc_service_method.h", + "include/grpc++/impl/codegen/security/auth_context.h", + "include/grpc++/impl/codegen/serialization_traits.h", + "include/grpc++/impl/codegen/server_context.h", + "include/grpc++/impl/codegen/server_interface.h", + "include/grpc++/impl/codegen/service_type.h", + "include/grpc++/impl/codegen/status.h", + "include/grpc++/impl/codegen/status_code_enum.h", + "include/grpc++/impl/codegen/string_ref.h", + "include/grpc++/impl/codegen/stub_options.h", + "include/grpc++/impl/codegen/sync.h", + "include/grpc++/impl/codegen/sync_cxx11.h", + "include/grpc++/impl/codegen/sync_no_cxx11.h", + "include/grpc++/impl/codegen/sync_stream.h", + "include/grpc++/impl/codegen/time.h", "include/grpc++/impl/grpc_library.h", "include/grpc++/impl/method_handler_impl.h", "include/grpc++/impl/proto_utils.h", @@ -883,6 +970,25 @@ cc_library( "include/grpc++/support/stub_options.h", "include/grpc++/support/sync_stream.h", "include/grpc++/support/time.h", + ], + includes = [ + "include", + ".", + ], + deps = [ + "//external:libssl", + "//external:protobuf_clib", + ":grpc", + ], +) + + +cc_library( + name = "grpc++_codegen_lib", + srcs = [ + "src/cpp/codegen/codegen_init.cc", + ], + hdrs = [ "include/grpc++/impl/codegen/async_stream.h", "include/grpc++/impl/codegen/async_unary_call.h", "include/grpc++/impl/codegen/call.h", @@ -894,6 +1000,7 @@ cc_library( "include/grpc++/impl/codegen/completion_queue_tag.h", "include/grpc++/impl/codegen/config.h", "include/grpc++/impl/codegen/config_protobuf.h", + "include/grpc++/impl/codegen/core_codegen_interface.h", "include/grpc++/impl/codegen/grpc_library.h", "include/grpc++/impl/codegen/method_handler_impl.h", "include/grpc++/impl/codegen/proto_utils.h", @@ -913,15 +1020,32 @@ cc_library( "include/grpc++/impl/codegen/sync_no_cxx11.h", "include/grpc++/impl/codegen/sync_stream.h", "include/grpc++/impl/codegen/time.h", + "include/grpc/impl/codegen/alloc.h", + "include/grpc/impl/codegen/atm.h", + "include/grpc/impl/codegen/atm_gcc_atomic.h", + "include/grpc/impl/codegen/atm_gcc_sync.h", + "include/grpc/impl/codegen/atm_win32.h", + "include/grpc/impl/codegen/byte_buffer.h", + "include/grpc/impl/codegen/compression_types.h", + "include/grpc/impl/codegen/connectivity_state.h", + "include/grpc/impl/codegen/grpc_types.h", + "include/grpc/impl/codegen/log.h", + "include/grpc/impl/codegen/port_platform.h", + "include/grpc/impl/codegen/propagation_bits.h", + "include/grpc/impl/codegen/slice.h", + "include/grpc/impl/codegen/slice_buffer.h", + "include/grpc/impl/codegen/status.h", + "include/grpc/impl/codegen/sync.h", + "include/grpc/impl/codegen/sync_generic.h", + "include/grpc/impl/codegen/sync_posix.h", + "include/grpc/impl/codegen/sync_win32.h", + "include/grpc/impl/codegen/time.h", ], includes = [ "include", ".", ], deps = [ - "//external:libssl", - "//external:protobuf_clib", - ":grpc", ], ) @@ -930,10 +1054,10 @@ cc_library( name = "grpc++_unsecure", srcs = [ "src/cpp/client/create_channel_internal.h", + "src/cpp/common/core_codegen.h", "src/cpp/common/create_auth_context.h", "src/cpp/server/dynamic_thread_pool.h", "src/cpp/server/thread_pool_interface.h", - "src/cpp/common/insecure_create_auth_context.cc", "src/cpp/client/channel.cc", "src/cpp/client/client_context.cc", "src/cpp/client/create_channel.cc", @@ -941,11 +1065,12 @@ cc_library( "src/cpp/client/credentials.cc", "src/cpp/client/generic_stub.cc", "src/cpp/client/insecure_credentials.cc", - "src/cpp/common/call.cc", + "src/cpp/codegen/codegen_init.cc", "src/cpp/common/channel_arguments.cc", "src/cpp/common/completion_queue.cc", + "src/cpp/common/core_codegen.cc", + "src/cpp/common/insecure_create_auth_context.cc", "src/cpp/common/rpc_method.cc", - "src/cpp/proto/proto_utils.cc", "src/cpp/server/async_generic_service.cc", "src/cpp/server/create_default_thread_pool.cc", "src/cpp/server/dynamic_thread_pool.cc", @@ -959,7 +1084,6 @@ cc_library( "src/cpp/util/status.cc", "src/cpp/util/string_ref.cc", "src/cpp/util/time.cc", - "src/cpp/codegen/grpc_library.cc", ], hdrs = [ "include/grpc++/alarm.h", @@ -972,6 +1096,37 @@ cc_library( "include/grpc++/grpc++.h", "include/grpc++/impl/call.h", "include/grpc++/impl/client_unary_call.h", + "include/grpc++/impl/codegen/async_stream.h", + "include/grpc++/impl/codegen/async_unary_call.h", + "include/grpc++/impl/codegen/call.h", + "include/grpc++/impl/codegen/call_hook.h", + "include/grpc++/impl/codegen/channel_interface.h", + "include/grpc++/impl/codegen/client_context.h", + "include/grpc++/impl/codegen/client_unary_call.h", + "include/grpc++/impl/codegen/completion_queue.h", + "include/grpc++/impl/codegen/completion_queue_tag.h", + "include/grpc++/impl/codegen/config.h", + "include/grpc++/impl/codegen/config_protobuf.h", + "include/grpc++/impl/codegen/core_codegen_interface.h", + "include/grpc++/impl/codegen/grpc_library.h", + "include/grpc++/impl/codegen/method_handler_impl.h", + "include/grpc++/impl/codegen/proto_utils.h", + "include/grpc++/impl/codegen/rpc_method.h", + "include/grpc++/impl/codegen/rpc_service_method.h", + "include/grpc++/impl/codegen/security/auth_context.h", + "include/grpc++/impl/codegen/serialization_traits.h", + "include/grpc++/impl/codegen/server_context.h", + "include/grpc++/impl/codegen/server_interface.h", + "include/grpc++/impl/codegen/service_type.h", + "include/grpc++/impl/codegen/status.h", + "include/grpc++/impl/codegen/status_code_enum.h", + "include/grpc++/impl/codegen/string_ref.h", + "include/grpc++/impl/codegen/stub_options.h", + "include/grpc++/impl/codegen/sync.h", + "include/grpc++/impl/codegen/sync_cxx11.h", + "include/grpc++/impl/codegen/sync_no_cxx11.h", + "include/grpc++/impl/codegen/sync_stream.h", + "include/grpc++/impl/codegen/time.h", "include/grpc++/impl/grpc_library.h", "include/grpc++/impl/method_handler_impl.h", "include/grpc++/impl/proto_utils.h", @@ -1006,36 +1161,6 @@ cc_library( "include/grpc++/support/stub_options.h", "include/grpc++/support/sync_stream.h", "include/grpc++/support/time.h", - "include/grpc++/impl/codegen/async_stream.h", - "include/grpc++/impl/codegen/async_unary_call.h", - "include/grpc++/impl/codegen/call.h", - "include/grpc++/impl/codegen/call_hook.h", - "include/grpc++/impl/codegen/channel_interface.h", - "include/grpc++/impl/codegen/client_context.h", - "include/grpc++/impl/codegen/client_unary_call.h", - "include/grpc++/impl/codegen/completion_queue.h", - "include/grpc++/impl/codegen/completion_queue_tag.h", - "include/grpc++/impl/codegen/config.h", - "include/grpc++/impl/codegen/config_protobuf.h", - "include/grpc++/impl/codegen/grpc_library.h", - "include/grpc++/impl/codegen/method_handler_impl.h", - "include/grpc++/impl/codegen/proto_utils.h", - "include/grpc++/impl/codegen/rpc_method.h", - "include/grpc++/impl/codegen/rpc_service_method.h", - "include/grpc++/impl/codegen/security/auth_context.h", - "include/grpc++/impl/codegen/serialization_traits.h", - "include/grpc++/impl/codegen/server_context.h", - "include/grpc++/impl/codegen/server_interface.h", - "include/grpc++/impl/codegen/service_type.h", - "include/grpc++/impl/codegen/status.h", - "include/grpc++/impl/codegen/status_code_enum.h", - "include/grpc++/impl/codegen/string_ref.h", - "include/grpc++/impl/codegen/stub_options.h", - "include/grpc++/impl/codegen/sync.h", - "include/grpc++/impl/codegen/sync_cxx11.h", - "include/grpc++/impl/codegen/sync_no_cxx11.h", - "include/grpc++/impl/codegen/sync_stream.h", - "include/grpc++/impl/codegen/time.h", ], includes = [ "include", @@ -1072,45 +1197,8 @@ cc_library( "src/compiler/objective_c_generator.cc", "src/compiler/python_generator.cc", "src/compiler/ruby_generator.cc", - "src/cpp/codegen/grpc_library.cc", ], hdrs = [ - "include/grpc++/impl/codegen/async_stream.h", - "include/grpc++/impl/codegen/async_unary_call.h", - "include/grpc++/impl/codegen/call.h", - "include/grpc++/impl/codegen/call_hook.h", - "include/grpc++/impl/codegen/channel_interface.h", - "include/grpc++/impl/codegen/client_context.h", - "include/grpc++/impl/codegen/client_unary_call.h", - "include/grpc++/impl/codegen/completion_queue.h", - "include/grpc++/impl/codegen/completion_queue_tag.h", - "include/grpc++/impl/codegen/config.h", - "include/grpc++/impl/codegen/config_protobuf.h", - "include/grpc++/impl/codegen/grpc_library.h", - "include/grpc++/impl/codegen/method_handler_impl.h", - "include/grpc++/impl/codegen/proto_utils.h", - "include/grpc++/impl/codegen/rpc_method.h", - "include/grpc++/impl/codegen/rpc_service_method.h", - "include/grpc++/impl/codegen/security/auth_context.h", - "include/grpc++/impl/codegen/serialization_traits.h", - "include/grpc++/impl/codegen/server_context.h", - "include/grpc++/impl/codegen/server_interface.h", - "include/grpc++/impl/codegen/service_type.h", - "include/grpc++/impl/codegen/status.h", - "include/grpc++/impl/codegen/status_code_enum.h", - "include/grpc++/impl/codegen/string_ref.h", - "include/grpc++/impl/codegen/stub_options.h", - "include/grpc++/impl/codegen/sync.h", - "include/grpc++/impl/codegen/sync_cxx11.h", - "include/grpc++/impl/codegen/sync_no_cxx11.h", - "include/grpc++/impl/codegen/sync_stream.h", - "include/grpc++/impl/codegen/time.h", - "include/grpc/impl/codegen/byte_buffer.h", - "include/grpc/impl/codegen/compression_types.h", - "include/grpc/impl/codegen/connectivity_state.h", - "include/grpc/impl/codegen/grpc_types.h", - "include/grpc/impl/codegen/propagation_bits.h", - "include/grpc/impl/codegen/status.h", "include/grpc/impl/codegen/alloc.h", "include/grpc/impl/codegen/atm.h", "include/grpc/impl/codegen/atm_gcc_atomic.h", @@ -1132,6 +1220,7 @@ cc_library( ], deps = [ "//external:protobuf_compiler", + ":grpc++_codegen_lib", ], ) @@ -1158,51 +1247,66 @@ cc_library( objc_library( name = "gpr_objc", srcs = [ - "src/core/profiling/basic_timers.c", - "src/core/profiling/stap_timers.c", - "src/core/support/alloc.c", - "src/core/support/avl.c", - "src/core/support/cmdline.c", - "src/core/support/cpu_iphone.c", - "src/core/support/cpu_linux.c", - "src/core/support/cpu_posix.c", - "src/core/support/cpu_windows.c", - "src/core/support/env_linux.c", - "src/core/support/env_posix.c", - "src/core/support/env_win32.c", - "src/core/support/histogram.c", - "src/core/support/host_port.c", - "src/core/support/load_file.c", - "src/core/support/log.c", - "src/core/support/log_android.c", - "src/core/support/log_linux.c", - "src/core/support/log_posix.c", - "src/core/support/log_win32.c", - "src/core/support/murmur_hash.c", - "src/core/support/slice.c", - "src/core/support/slice_buffer.c", - "src/core/support/stack_lockfree.c", - "src/core/support/string.c", - "src/core/support/string_posix.c", - "src/core/support/string_win32.c", - "src/core/support/subprocess_posix.c", - "src/core/support/subprocess_windows.c", - "src/core/support/sync.c", - "src/core/support/sync_posix.c", - "src/core/support/sync_win32.c", - "src/core/support/thd.c", - "src/core/support/thd_posix.c", - "src/core/support/thd_win32.c", - "src/core/support/time.c", - "src/core/support/time_posix.c", - "src/core/support/time_precise.c", - "src/core/support/time_win32.c", - "src/core/support/tls_pthread.c", - "src/core/support/tmpfile_posix.c", - "src/core/support/tmpfile_win32.c", - "src/core/support/wrap_memcpy.c", + "src/core/lib/profiling/basic_timers.c", + "src/core/lib/profiling/stap_timers.c", + "src/core/lib/support/alloc.c", + "src/core/lib/support/avl.c", + "src/core/lib/support/backoff.c", + "src/core/lib/support/cmdline.c", + "src/core/lib/support/cpu_iphone.c", + "src/core/lib/support/cpu_linux.c", + "src/core/lib/support/cpu_posix.c", + "src/core/lib/support/cpu_windows.c", + "src/core/lib/support/env_linux.c", + "src/core/lib/support/env_posix.c", + "src/core/lib/support/env_win32.c", + "src/core/lib/support/histogram.c", + "src/core/lib/support/host_port.c", + "src/core/lib/support/load_file.c", + "src/core/lib/support/log.c", + "src/core/lib/support/log_android.c", + "src/core/lib/support/log_linux.c", + "src/core/lib/support/log_posix.c", + "src/core/lib/support/log_win32.c", + "src/core/lib/support/murmur_hash.c", + "src/core/lib/support/slice.c", + "src/core/lib/support/slice_buffer.c", + "src/core/lib/support/stack_lockfree.c", + "src/core/lib/support/string.c", + "src/core/lib/support/string_posix.c", + "src/core/lib/support/string_win32.c", + "src/core/lib/support/subprocess_posix.c", + "src/core/lib/support/subprocess_windows.c", + "src/core/lib/support/sync.c", + "src/core/lib/support/sync_posix.c", + "src/core/lib/support/sync_win32.c", + "src/core/lib/support/thd.c", + "src/core/lib/support/thd_posix.c", + "src/core/lib/support/thd_win32.c", + "src/core/lib/support/time.c", + "src/core/lib/support/time_posix.c", + "src/core/lib/support/time_precise.c", + "src/core/lib/support/time_win32.c", + "src/core/lib/support/tls_pthread.c", + "src/core/lib/support/tmpfile_posix.c", + "src/core/lib/support/tmpfile_win32.c", + "src/core/lib/support/wrap_memcpy.c", ], hdrs = [ + "include/grpc/impl/codegen/alloc.h", + "include/grpc/impl/codegen/atm.h", + "include/grpc/impl/codegen/atm_gcc_atomic.h", + "include/grpc/impl/codegen/atm_gcc_sync.h", + "include/grpc/impl/codegen/atm_win32.h", + "include/grpc/impl/codegen/log.h", + "include/grpc/impl/codegen/port_platform.h", + "include/grpc/impl/codegen/slice.h", + "include/grpc/impl/codegen/slice_buffer.h", + "include/grpc/impl/codegen/sync.h", + "include/grpc/impl/codegen/sync_generic.h", + "include/grpc/impl/codegen/sync_posix.h", + "include/grpc/impl/codegen/sync_win32.h", + "include/grpc/impl/codegen/time.h", "include/grpc/support/alloc.h", "include/grpc/support/atm.h", "include/grpc/support/atm_gcc_atomic.h", @@ -1231,31 +1335,18 @@ objc_library( "include/grpc/support/tls_msvc.h", "include/grpc/support/tls_pthread.h", "include/grpc/support/useful.h", - "include/grpc/impl/codegen/alloc.h", - "include/grpc/impl/codegen/atm.h", - "include/grpc/impl/codegen/atm_gcc_atomic.h", - "include/grpc/impl/codegen/atm_gcc_sync.h", - "include/grpc/impl/codegen/atm_win32.h", - "include/grpc/impl/codegen/log.h", - "include/grpc/impl/codegen/port_platform.h", - "include/grpc/impl/codegen/slice.h", - "include/grpc/impl/codegen/slice_buffer.h", - "include/grpc/impl/codegen/sync.h", - "include/grpc/impl/codegen/sync_generic.h", - "include/grpc/impl/codegen/sync_posix.h", - "include/grpc/impl/codegen/sync_win32.h", - "include/grpc/impl/codegen/time.h", - "src/core/profiling/timers.h", - "src/core/support/block_annotate.h", - "src/core/support/env.h", - "src/core/support/load_file.h", - "src/core/support/murmur_hash.h", - "src/core/support/stack_lockfree.h", - "src/core/support/string.h", - "src/core/support/string_win32.h", - "src/core/support/thd_internal.h", - "src/core/support/time_precise.h", - "src/core/support/tmpfile.h", + "src/core/lib/profiling/timers.h", + "src/core/lib/support/backoff.h", + "src/core/lib/support/block_annotate.h", + "src/core/lib/support/env.h", + "src/core/lib/support/load_file.h", + "src/core/lib/support/murmur_hash.h", + "src/core/lib/support/stack_lockfree.h", + "src/core/lib/support/string.h", + "src/core/lib/support/string_win32.h", + "src/core/lib/support/thd_internal.h", + "src/core/lib/support/time_precise.h", + "src/core/lib/support/tmpfile.h", ], includes = [ "include", @@ -1269,168 +1360,177 @@ objc_library( objc_library( name = "grpc_objc", srcs = [ - "src/core/census/grpc_context.c", - "src/core/census/grpc_filter.c", - "src/core/channel/channel_args.c", - "src/core/channel/channel_stack.c", - "src/core/channel/client_channel.c", - "src/core/channel/client_uchannel.c", - "src/core/channel/compress_filter.c", - "src/core/channel/connected_channel.c", - "src/core/channel/http_client_filter.c", - "src/core/channel/http_server_filter.c", - "src/core/channel/subchannel_call_holder.c", - "src/core/client_config/client_config.c", - "src/core/client_config/connector.c", - "src/core/client_config/default_initial_connect_string.c", - "src/core/client_config/initial_connect_string.c", - "src/core/client_config/lb_policies/load_balancer_api.c", - "src/core/client_config/lb_policies/pick_first.c", - "src/core/client_config/lb_policies/round_robin.c", - "src/core/client_config/lb_policy.c", - "src/core/client_config/lb_policy_factory.c", - "src/core/client_config/lb_policy_registry.c", - "src/core/client_config/resolver.c", - "src/core/client_config/resolver_factory.c", - "src/core/client_config/resolver_registry.c", - "src/core/client_config/resolvers/dns_resolver.c", - "src/core/client_config/resolvers/sockaddr_resolver.c", - "src/core/client_config/subchannel.c", - "src/core/client_config/subchannel_factory.c", - "src/core/client_config/subchannel_index.c", - "src/core/client_config/uri_parser.c", - "src/core/compression/compression_algorithm.c", - "src/core/compression/message_compress.c", - "src/core/debug/trace.c", - "src/core/httpcli/format_request.c", - "src/core/httpcli/httpcli.c", - "src/core/httpcli/parser.c", - "src/core/iomgr/closure.c", - "src/core/iomgr/endpoint.c", - "src/core/iomgr/endpoint_pair_posix.c", - "src/core/iomgr/endpoint_pair_windows.c", - "src/core/iomgr/exec_ctx.c", - "src/core/iomgr/executor.c", - "src/core/iomgr/fd_posix.c", - "src/core/iomgr/iocp_windows.c", - "src/core/iomgr/iomgr.c", - "src/core/iomgr/iomgr_posix.c", - "src/core/iomgr/iomgr_windows.c", - "src/core/iomgr/pollset_multipoller_with_epoll.c", - "src/core/iomgr/pollset_multipoller_with_poll_posix.c", - "src/core/iomgr/pollset_posix.c", - "src/core/iomgr/pollset_set_posix.c", - "src/core/iomgr/pollset_set_windows.c", - "src/core/iomgr/pollset_windows.c", - "src/core/iomgr/resolve_address_posix.c", - "src/core/iomgr/resolve_address_windows.c", - "src/core/iomgr/sockaddr_utils.c", - "src/core/iomgr/socket_utils_common_posix.c", - "src/core/iomgr/socket_utils_linux.c", - "src/core/iomgr/socket_utils_posix.c", - "src/core/iomgr/socket_windows.c", - "src/core/iomgr/tcp_client_posix.c", - "src/core/iomgr/tcp_client_windows.c", - "src/core/iomgr/tcp_posix.c", - "src/core/iomgr/tcp_server_posix.c", - "src/core/iomgr/tcp_server_windows.c", - "src/core/iomgr/tcp_windows.c", - "src/core/iomgr/time_averaged_stats.c", - "src/core/iomgr/timer.c", - "src/core/iomgr/timer_heap.c", - "src/core/iomgr/udp_server.c", - "src/core/iomgr/wakeup_fd_eventfd.c", - "src/core/iomgr/wakeup_fd_nospecial.c", - "src/core/iomgr/wakeup_fd_pipe.c", - "src/core/iomgr/wakeup_fd_posix.c", - "src/core/iomgr/workqueue_posix.c", - "src/core/iomgr/workqueue_windows.c", - "src/core/json/json.c", - "src/core/json/json_reader.c", - "src/core/json/json_string.c", - "src/core/json/json_writer.c", - "src/core/proto/grpc/lb/v0/load_balancer.pb.c", - "src/core/surface/alarm.c", - "src/core/surface/api_trace.c", - "src/core/surface/byte_buffer.c", - "src/core/surface/byte_buffer_reader.c", - "src/core/surface/call.c", - "src/core/surface/call_details.c", - "src/core/surface/call_log_batch.c", - "src/core/surface/channel.c", - "src/core/surface/channel_connectivity.c", - "src/core/surface/channel_create.c", - "src/core/surface/channel_ping.c", - "src/core/surface/completion_queue.c", - "src/core/surface/event_string.c", - "src/core/surface/init.c", - "src/core/surface/lame_client.c", - "src/core/surface/metadata_array.c", - "src/core/surface/server.c", - "src/core/surface/server_chttp2.c", - "src/core/surface/server_create.c", - "src/core/surface/validate_metadata.c", - "src/core/surface/version.c", - "src/core/transport/byte_stream.c", - "src/core/transport/chttp2/alpn.c", - "src/core/transport/chttp2/bin_encoder.c", - "src/core/transport/chttp2/frame_data.c", - "src/core/transport/chttp2/frame_goaway.c", - "src/core/transport/chttp2/frame_ping.c", - "src/core/transport/chttp2/frame_rst_stream.c", - "src/core/transport/chttp2/frame_settings.c", - "src/core/transport/chttp2/frame_window_update.c", - "src/core/transport/chttp2/hpack_encoder.c", - "src/core/transport/chttp2/hpack_parser.c", - "src/core/transport/chttp2/hpack_table.c", - "src/core/transport/chttp2/huffsyms.c", - "src/core/transport/chttp2/incoming_metadata.c", - "src/core/transport/chttp2/parsing.c", - "src/core/transport/chttp2/status_conversion.c", - "src/core/transport/chttp2/stream_lists.c", - "src/core/transport/chttp2/stream_map.c", - "src/core/transport/chttp2/timeout_encoding.c", - "src/core/transport/chttp2/varint.c", - "src/core/transport/chttp2/writing.c", - "src/core/transport/chttp2_transport.c", - "src/core/transport/connectivity_state.c", - "src/core/transport/metadata.c", - "src/core/transport/metadata_batch.c", - "src/core/transport/static_metadata.c", - "src/core/transport/transport.c", - "src/core/transport/transport_op_string.c", - "src/core/httpcli/httpcli_security_connector.c", - "src/core/security/b64.c", - "src/core/security/client_auth_filter.c", - "src/core/security/credentials.c", - "src/core/security/credentials_metadata.c", - "src/core/security/credentials_posix.c", - "src/core/security/credentials_win32.c", - "src/core/security/google_default_credentials.c", - "src/core/security/handshake.c", - "src/core/security/json_token.c", - "src/core/security/jwt_verifier.c", - "src/core/security/secure_endpoint.c", - "src/core/security/security_connector.c", - "src/core/security/security_context.c", - "src/core/security/server_auth_filter.c", - "src/core/security/server_secure_chttp2.c", - "src/core/surface/init_secure.c", - "src/core/surface/secure_channel_create.c", - "src/core/tsi/fake_transport_security.c", - "src/core/tsi/ssl_transport_security.c", - "src/core/tsi/transport_security.c", - "src/core/census/context.c", - "src/core/census/initialize.c", - "src/core/census/mlog.c", - "src/core/census/operation.c", - "src/core/census/placeholders.c", - "src/core/census/tracing.c", + "src/core/ext/transport/chttp2/client/insecure/channel_create.c", + "src/core/ext/transport/chttp2/client/secure/secure_channel_create.c", + "src/core/ext/transport/chttp2/server/insecure/server_chttp2.c", + "src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c", + "src/core/ext/transport/chttp2/transport/alpn.c", + "src/core/ext/transport/chttp2/transport/bin_encoder.c", + "src/core/ext/transport/chttp2/transport/chttp2_transport.c", + "src/core/ext/transport/chttp2/transport/frame_data.c", + "src/core/ext/transport/chttp2/transport/frame_goaway.c", + "src/core/ext/transport/chttp2/transport/frame_ping.c", + "src/core/ext/transport/chttp2/transport/frame_rst_stream.c", + "src/core/ext/transport/chttp2/transport/frame_settings.c", + "src/core/ext/transport/chttp2/transport/frame_window_update.c", + "src/core/ext/transport/chttp2/transport/hpack_encoder.c", + "src/core/ext/transport/chttp2/transport/hpack_parser.c", + "src/core/ext/transport/chttp2/transport/hpack_table.c", + "src/core/ext/transport/chttp2/transport/huffsyms.c", + "src/core/ext/transport/chttp2/transport/incoming_metadata.c", + "src/core/ext/transport/chttp2/transport/parsing.c", + "src/core/ext/transport/chttp2/transport/status_conversion.c", + "src/core/ext/transport/chttp2/transport/stream_lists.c", + "src/core/ext/transport/chttp2/transport/stream_map.c", + "src/core/ext/transport/chttp2/transport/timeout_encoding.c", + "src/core/ext/transport/chttp2/transport/varint.c", + "src/core/ext/transport/chttp2/transport/writing.c", + "src/core/lib/census/context.c", + "src/core/lib/census/grpc_context.c", + "src/core/lib/census/grpc_filter.c", + "src/core/lib/census/grpc_plugin.c", + "src/core/lib/census/initialize.c", + "src/core/lib/census/mlog.c", + "src/core/lib/census/operation.c", + "src/core/lib/census/placeholders.c", + "src/core/lib/census/tracing.c", + "src/core/lib/channel/channel_args.c", + "src/core/lib/channel/channel_stack.c", + "src/core/lib/channel/channel_stack_builder.c", + "src/core/lib/channel/client_channel.c", + "src/core/lib/channel/compress_filter.c", + "src/core/lib/channel/connected_channel.c", + "src/core/lib/channel/http_client_filter.c", + "src/core/lib/channel/http_server_filter.c", + "src/core/lib/channel/subchannel_call_holder.c", + "src/core/lib/client_config/client_config.c", + "src/core/lib/client_config/connector.c", + "src/core/lib/client_config/default_initial_connect_string.c", + "src/core/lib/client_config/initial_connect_string.c", + "src/core/lib/client_config/lb_policies/load_balancer_api.c", + "src/core/lib/client_config/lb_policies/pick_first.c", + "src/core/lib/client_config/lb_policies/round_robin.c", + "src/core/lib/client_config/lb_policy.c", + "src/core/lib/client_config/lb_policy_factory.c", + "src/core/lib/client_config/lb_policy_registry.c", + "src/core/lib/client_config/resolver.c", + "src/core/lib/client_config/resolver_factory.c", + "src/core/lib/client_config/resolver_registry.c", + "src/core/lib/client_config/resolvers/dns_resolver.c", + "src/core/lib/client_config/resolvers/sockaddr_resolver.c", + "src/core/lib/client_config/subchannel.c", + "src/core/lib/client_config/subchannel_factory.c", + "src/core/lib/client_config/subchannel_index.c", + "src/core/lib/client_config/uri_parser.c", + "src/core/lib/compression/compression_algorithm.c", + "src/core/lib/compression/message_compress.c", + "src/core/lib/debug/trace.c", + "src/core/lib/http/format_request.c", + "src/core/lib/http/httpcli.c", + "src/core/lib/http/httpcli_security_connector.c", + "src/core/lib/http/parser.c", + "src/core/lib/iomgr/closure.c", + "src/core/lib/iomgr/endpoint.c", + "src/core/lib/iomgr/endpoint_pair_posix.c", + "src/core/lib/iomgr/endpoint_pair_windows.c", + "src/core/lib/iomgr/exec_ctx.c", + "src/core/lib/iomgr/executor.c", + "src/core/lib/iomgr/fd_posix.c", + "src/core/lib/iomgr/iocp_windows.c", + "src/core/lib/iomgr/iomgr.c", + "src/core/lib/iomgr/iomgr_posix.c", + "src/core/lib/iomgr/iomgr_windows.c", + "src/core/lib/iomgr/pollset_multipoller_with_epoll.c", + "src/core/lib/iomgr/pollset_multipoller_with_poll_posix.c", + "src/core/lib/iomgr/pollset_posix.c", + "src/core/lib/iomgr/pollset_set_posix.c", + "src/core/lib/iomgr/pollset_set_windows.c", + "src/core/lib/iomgr/pollset_windows.c", + "src/core/lib/iomgr/resolve_address_posix.c", + "src/core/lib/iomgr/resolve_address_windows.c", + "src/core/lib/iomgr/sockaddr_utils.c", + "src/core/lib/iomgr/socket_utils_common_posix.c", + "src/core/lib/iomgr/socket_utils_linux.c", + "src/core/lib/iomgr/socket_utils_posix.c", + "src/core/lib/iomgr/socket_windows.c", + "src/core/lib/iomgr/tcp_client_posix.c", + "src/core/lib/iomgr/tcp_client_windows.c", + "src/core/lib/iomgr/tcp_posix.c", + "src/core/lib/iomgr/tcp_server_posix.c", + "src/core/lib/iomgr/tcp_server_windows.c", + "src/core/lib/iomgr/tcp_windows.c", + "src/core/lib/iomgr/time_averaged_stats.c", + "src/core/lib/iomgr/timer.c", + "src/core/lib/iomgr/timer_heap.c", + "src/core/lib/iomgr/udp_server.c", + "src/core/lib/iomgr/unix_sockets_posix.c", + "src/core/lib/iomgr/unix_sockets_posix_noop.c", + "src/core/lib/iomgr/wakeup_fd_eventfd.c", + "src/core/lib/iomgr/wakeup_fd_nospecial.c", + "src/core/lib/iomgr/wakeup_fd_pipe.c", + "src/core/lib/iomgr/wakeup_fd_posix.c", + "src/core/lib/iomgr/workqueue_posix.c", + "src/core/lib/iomgr/workqueue_windows.c", + "src/core/lib/json/json.c", + "src/core/lib/json/json_reader.c", + "src/core/lib/json/json_string.c", + "src/core/lib/json/json_writer.c", + "src/core/lib/proto/grpc/lb/v0/load_balancer.pb.c", + "src/core/lib/security/b64.c", + "src/core/lib/security/client_auth_filter.c", + "src/core/lib/security/credentials.c", + "src/core/lib/security/credentials_metadata.c", + "src/core/lib/security/credentials_posix.c", + "src/core/lib/security/credentials_win32.c", + "src/core/lib/security/google_default_credentials.c", + "src/core/lib/security/handshake.c", + "src/core/lib/security/json_token.c", + "src/core/lib/security/jwt_verifier.c", + "src/core/lib/security/secure_endpoint.c", + "src/core/lib/security/security_connector.c", + "src/core/lib/security/security_context.c", + "src/core/lib/security/server_auth_filter.c", + "src/core/lib/surface/alarm.c", + "src/core/lib/surface/api_trace.c", + "src/core/lib/surface/byte_buffer.c", + "src/core/lib/surface/byte_buffer_reader.c", + "src/core/lib/surface/call.c", + "src/core/lib/surface/call_details.c", + "src/core/lib/surface/call_log_batch.c", + "src/core/lib/surface/channel.c", + "src/core/lib/surface/channel_connectivity.c", + "src/core/lib/surface/channel_init.c", + "src/core/lib/surface/channel_ping.c", + "src/core/lib/surface/channel_stack_type.c", + "src/core/lib/surface/completion_queue.c", + "src/core/lib/surface/event_string.c", + "src/core/lib/surface/init.c", + "src/core/lib/surface/init_secure.c", + "src/core/lib/surface/lame_client.c", + "src/core/lib/surface/metadata_array.c", + "src/core/lib/surface/server.c", + "src/core/lib/surface/validate_metadata.c", + "src/core/lib/surface/version.c", + "src/core/lib/transport/byte_stream.c", + "src/core/lib/transport/connectivity_state.c", + "src/core/lib/transport/metadata.c", + "src/core/lib/transport/metadata_batch.c", + "src/core/lib/transport/static_metadata.c", + "src/core/lib/transport/transport.c", + "src/core/lib/transport/transport_op_string.c", + "src/core/lib/tsi/fake_transport_security.c", + "src/core/lib/tsi/ssl_transport_security.c", + "src/core/lib/tsi/transport_security.c", "third_party/nanopb/pb_common.c", "third_party/nanopb/pb_decode.c", "third_party/nanopb/pb_encode.c", ], hdrs = [ + "include/grpc/byte_buffer.h", + "include/grpc/byte_buffer_reader.h", + "include/grpc/census.h", + "include/grpc/compression.h", + "include/grpc/grpc.h", "include/grpc/grpc_security.h", "include/grpc/impl/codegen/byte_buffer.h", "include/grpc/impl/codegen/compression_types.h", @@ -1438,144 +1538,144 @@ objc_library( "include/grpc/impl/codegen/grpc_types.h", "include/grpc/impl/codegen/propagation_bits.h", "include/grpc/impl/codegen/status.h", - "include/grpc/byte_buffer.h", - "include/grpc/byte_buffer_reader.h", - "include/grpc/compression.h", - "include/grpc/grpc.h", "include/grpc/status.h", - "include/grpc/census.h", - "src/core/census/grpc_filter.h", - "src/core/channel/channel_args.h", - "src/core/channel/channel_stack.h", - "src/core/channel/client_channel.h", - "src/core/channel/client_uchannel.h", - "src/core/channel/compress_filter.h", - "src/core/channel/connected_channel.h", - "src/core/channel/context.h", - "src/core/channel/http_client_filter.h", - "src/core/channel/http_server_filter.h", - "src/core/channel/subchannel_call_holder.h", - "src/core/client_config/client_config.h", - "src/core/client_config/connector.h", - "src/core/client_config/initial_connect_string.h", - "src/core/client_config/lb_policies/load_balancer_api.h", - "src/core/client_config/lb_policies/pick_first.h", - "src/core/client_config/lb_policies/round_robin.h", - "src/core/client_config/lb_policy.h", - "src/core/client_config/lb_policy_factory.h", - "src/core/client_config/lb_policy_registry.h", - "src/core/client_config/resolver.h", - "src/core/client_config/resolver_factory.h", - "src/core/client_config/resolver_registry.h", - "src/core/client_config/resolvers/dns_resolver.h", - "src/core/client_config/resolvers/sockaddr_resolver.h", - "src/core/client_config/subchannel.h", - "src/core/client_config/subchannel_factory.h", - "src/core/client_config/subchannel_index.h", - "src/core/client_config/uri_parser.h", - "src/core/compression/algorithm_metadata.h", - "src/core/compression/message_compress.h", - "src/core/debug/trace.h", - "src/core/httpcli/format_request.h", - "src/core/httpcli/httpcli.h", - "src/core/httpcli/parser.h", - "src/core/iomgr/closure.h", - "src/core/iomgr/endpoint.h", - "src/core/iomgr/endpoint_pair.h", - "src/core/iomgr/exec_ctx.h", - "src/core/iomgr/executor.h", - "src/core/iomgr/fd_posix.h", - "src/core/iomgr/iocp_windows.h", - "src/core/iomgr/iomgr.h", - "src/core/iomgr/iomgr_internal.h", - "src/core/iomgr/iomgr_posix.h", - "src/core/iomgr/pollset.h", - "src/core/iomgr/pollset_posix.h", - "src/core/iomgr/pollset_set.h", - "src/core/iomgr/pollset_set_posix.h", - "src/core/iomgr/pollset_set_windows.h", - "src/core/iomgr/pollset_windows.h", - "src/core/iomgr/resolve_address.h", - "src/core/iomgr/sockaddr.h", - "src/core/iomgr/sockaddr_posix.h", - "src/core/iomgr/sockaddr_utils.h", - "src/core/iomgr/sockaddr_win32.h", - "src/core/iomgr/socket_utils_posix.h", - "src/core/iomgr/socket_windows.h", - "src/core/iomgr/tcp_client.h", - "src/core/iomgr/tcp_posix.h", - "src/core/iomgr/tcp_server.h", - "src/core/iomgr/tcp_windows.h", - "src/core/iomgr/time_averaged_stats.h", - "src/core/iomgr/timer.h", - "src/core/iomgr/timer_heap.h", - "src/core/iomgr/udp_server.h", - "src/core/iomgr/wakeup_fd_pipe.h", - "src/core/iomgr/wakeup_fd_posix.h", - "src/core/iomgr/workqueue.h", - "src/core/iomgr/workqueue_posix.h", - "src/core/iomgr/workqueue_windows.h", - "src/core/json/json.h", - "src/core/json/json_common.h", - "src/core/json/json_reader.h", - "src/core/json/json_writer.h", - "src/core/proto/grpc/lb/v0/load_balancer.pb.h", - "src/core/statistics/census_interface.h", - "src/core/statistics/census_rpc_stats.h", - "src/core/surface/api_trace.h", - "src/core/surface/call.h", - "src/core/surface/call_test_only.h", - "src/core/surface/channel.h", - "src/core/surface/completion_queue.h", - "src/core/surface/event_string.h", - "src/core/surface/init.h", - "src/core/surface/server.h", - "src/core/surface/surface_trace.h", - "src/core/transport/byte_stream.h", - "src/core/transport/chttp2/alpn.h", - "src/core/transport/chttp2/bin_encoder.h", - "src/core/transport/chttp2/frame.h", - "src/core/transport/chttp2/frame_data.h", - "src/core/transport/chttp2/frame_goaway.h", - "src/core/transport/chttp2/frame_ping.h", - "src/core/transport/chttp2/frame_rst_stream.h", - "src/core/transport/chttp2/frame_settings.h", - "src/core/transport/chttp2/frame_window_update.h", - "src/core/transport/chttp2/hpack_encoder.h", - "src/core/transport/chttp2/hpack_parser.h", - "src/core/transport/chttp2/hpack_table.h", - "src/core/transport/chttp2/http2_errors.h", - "src/core/transport/chttp2/huffsyms.h", - "src/core/transport/chttp2/incoming_metadata.h", - "src/core/transport/chttp2/internal.h", - "src/core/transport/chttp2/status_conversion.h", - "src/core/transport/chttp2/stream_map.h", - "src/core/transport/chttp2/timeout_encoding.h", - "src/core/transport/chttp2/varint.h", - "src/core/transport/chttp2_transport.h", - "src/core/transport/connectivity_state.h", - "src/core/transport/metadata.h", - "src/core/transport/metadata_batch.h", - "src/core/transport/static_metadata.h", - "src/core/transport/transport.h", - "src/core/transport/transport_impl.h", - "src/core/security/auth_filters.h", - "src/core/security/b64.h", - "src/core/security/credentials.h", - "src/core/security/handshake.h", - "src/core/security/json_token.h", - "src/core/security/jwt_verifier.h", - "src/core/security/secure_endpoint.h", - "src/core/security/security_connector.h", - "src/core/security/security_context.h", - "src/core/tsi/fake_transport_security.h", - "src/core/tsi/ssl_transport_security.h", - "src/core/tsi/ssl_types.h", - "src/core/tsi/transport_security.h", - "src/core/tsi/transport_security_interface.h", - "src/core/census/aggregation.h", - "src/core/census/mlog.h", - "src/core/census/rpc_metric_id.h", + "src/core/ext/transport/chttp2/transport/alpn.h", + "src/core/ext/transport/chttp2/transport/bin_encoder.h", + "src/core/ext/transport/chttp2/transport/chttp2_transport.h", + "src/core/ext/transport/chttp2/transport/frame.h", + "src/core/ext/transport/chttp2/transport/frame_data.h", + "src/core/ext/transport/chttp2/transport/frame_goaway.h", + "src/core/ext/transport/chttp2/transport/frame_ping.h", + "src/core/ext/transport/chttp2/transport/frame_rst_stream.h", + "src/core/ext/transport/chttp2/transport/frame_settings.h", + "src/core/ext/transport/chttp2/transport/frame_window_update.h", + "src/core/ext/transport/chttp2/transport/hpack_encoder.h", + "src/core/ext/transport/chttp2/transport/hpack_parser.h", + "src/core/ext/transport/chttp2/transport/hpack_table.h", + "src/core/ext/transport/chttp2/transport/http2_errors.h", + "src/core/ext/transport/chttp2/transport/huffsyms.h", + "src/core/ext/transport/chttp2/transport/incoming_metadata.h", + "src/core/ext/transport/chttp2/transport/internal.h", + "src/core/ext/transport/chttp2/transport/status_conversion.h", + "src/core/ext/transport/chttp2/transport/stream_map.h", + "src/core/ext/transport/chttp2/transport/timeout_encoding.h", + "src/core/ext/transport/chttp2/transport/varint.h", + "src/core/lib/census/aggregation.h", + "src/core/lib/census/grpc_filter.h", + "src/core/lib/census/grpc_plugin.h", + "src/core/lib/census/mlog.h", + "src/core/lib/census/rpc_metric_id.h", + "src/core/lib/channel/channel_args.h", + "src/core/lib/channel/channel_stack.h", + "src/core/lib/channel/channel_stack_builder.h", + "src/core/lib/channel/client_channel.h", + "src/core/lib/channel/compress_filter.h", + "src/core/lib/channel/connected_channel.h", + "src/core/lib/channel/context.h", + "src/core/lib/channel/http_client_filter.h", + "src/core/lib/channel/http_server_filter.h", + "src/core/lib/channel/subchannel_call_holder.h", + "src/core/lib/client_config/client_config.h", + "src/core/lib/client_config/connector.h", + "src/core/lib/client_config/initial_connect_string.h", + "src/core/lib/client_config/lb_policies/load_balancer_api.h", + "src/core/lib/client_config/lb_policies/pick_first.h", + "src/core/lib/client_config/lb_policies/round_robin.h", + "src/core/lib/client_config/lb_policy.h", + "src/core/lib/client_config/lb_policy_factory.h", + "src/core/lib/client_config/lb_policy_registry.h", + "src/core/lib/client_config/resolver.h", + "src/core/lib/client_config/resolver_factory.h", + "src/core/lib/client_config/resolver_registry.h", + "src/core/lib/client_config/resolvers/dns_resolver.h", + "src/core/lib/client_config/resolvers/sockaddr_resolver.h", + "src/core/lib/client_config/subchannel.h", + "src/core/lib/client_config/subchannel_factory.h", + "src/core/lib/client_config/subchannel_index.h", + "src/core/lib/client_config/uri_parser.h", + "src/core/lib/compression/algorithm_metadata.h", + "src/core/lib/compression/message_compress.h", + "src/core/lib/debug/trace.h", + "src/core/lib/http/format_request.h", + "src/core/lib/http/httpcli.h", + "src/core/lib/http/parser.h", + "src/core/lib/iomgr/closure.h", + "src/core/lib/iomgr/endpoint.h", + "src/core/lib/iomgr/endpoint_pair.h", + "src/core/lib/iomgr/exec_ctx.h", + "src/core/lib/iomgr/executor.h", + "src/core/lib/iomgr/fd_posix.h", + "src/core/lib/iomgr/iocp_windows.h", + "src/core/lib/iomgr/iomgr.h", + "src/core/lib/iomgr/iomgr_internal.h", + "src/core/lib/iomgr/iomgr_posix.h", + "src/core/lib/iomgr/pollset.h", + "src/core/lib/iomgr/pollset_posix.h", + "src/core/lib/iomgr/pollset_set.h", + "src/core/lib/iomgr/pollset_set_posix.h", + "src/core/lib/iomgr/pollset_set_windows.h", + "src/core/lib/iomgr/pollset_windows.h", + "src/core/lib/iomgr/resolve_address.h", + "src/core/lib/iomgr/sockaddr.h", + "src/core/lib/iomgr/sockaddr_posix.h", + "src/core/lib/iomgr/sockaddr_utils.h", + "src/core/lib/iomgr/sockaddr_win32.h", + "src/core/lib/iomgr/socket_utils_posix.h", + "src/core/lib/iomgr/socket_windows.h", + "src/core/lib/iomgr/tcp_client.h", + "src/core/lib/iomgr/tcp_posix.h", + "src/core/lib/iomgr/tcp_server.h", + "src/core/lib/iomgr/tcp_windows.h", + "src/core/lib/iomgr/time_averaged_stats.h", + "src/core/lib/iomgr/timer.h", + "src/core/lib/iomgr/timer_heap.h", + "src/core/lib/iomgr/udp_server.h", + "src/core/lib/iomgr/unix_sockets_posix.h", + "src/core/lib/iomgr/wakeup_fd_pipe.h", + "src/core/lib/iomgr/wakeup_fd_posix.h", + "src/core/lib/iomgr/workqueue.h", + "src/core/lib/iomgr/workqueue_posix.h", + "src/core/lib/iomgr/workqueue_windows.h", + "src/core/lib/json/json.h", + "src/core/lib/json/json_common.h", + "src/core/lib/json/json_reader.h", + "src/core/lib/json/json_writer.h", + "src/core/lib/proto/grpc/lb/v0/load_balancer.pb.h", + "src/core/lib/security/auth_filters.h", + "src/core/lib/security/b64.h", + "src/core/lib/security/credentials.h", + "src/core/lib/security/handshake.h", + "src/core/lib/security/json_token.h", + "src/core/lib/security/jwt_verifier.h", + "src/core/lib/security/secure_endpoint.h", + "src/core/lib/security/security_connector.h", + "src/core/lib/security/security_context.h", + "src/core/lib/statistics/census_interface.h", + "src/core/lib/statistics/census_rpc_stats.h", + "src/core/lib/surface/api_trace.h", + "src/core/lib/surface/call.h", + "src/core/lib/surface/call_test_only.h", + "src/core/lib/surface/channel.h", + "src/core/lib/surface/channel_init.h", + "src/core/lib/surface/channel_stack_type.h", + "src/core/lib/surface/completion_queue.h", + "src/core/lib/surface/event_string.h", + "src/core/lib/surface/init.h", + "src/core/lib/surface/lame_client.h", + "src/core/lib/surface/server.h", + "src/core/lib/surface/surface_trace.h", + "src/core/lib/transport/byte_stream.h", + "src/core/lib/transport/connectivity_state.h", + "src/core/lib/transport/metadata.h", + "src/core/lib/transport/metadata_batch.h", + "src/core/lib/transport/static_metadata.h", + "src/core/lib/transport/transport.h", + "src/core/lib/transport/transport_impl.h", + "src/core/lib/tsi/fake_transport_security.h", + "src/core/lib/tsi/ssl_transport_security.h", + "src/core/lib/tsi/ssl_types.h", + "src/core/lib/tsi/transport_security.h", + "src/core/lib/tsi/transport_security_interface.h", "third_party/nanopb/pb.h", "third_party/nanopb/pb_common.h", "third_party/nanopb/pb_decode.h", diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index b4e958d3b2a..35eb5e61389 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -59,7 +59,7 @@ Each language uses its own build system to work. Currently, the root's Makefile and the Visual Studio project files are building only the C and C++ source code. In order to ease the maintenance of these files, we have a template system. Please do not contribute manual changes to any of the generated -files. Instead, modify the template files, or the build.json file, and +files. Instead, modify the template files, or the build.yaml file, and re-generate the project files using the following command: `./tools/buildgen/generate_projects.sh` diff --git a/INSTALL.md b/INSTALL.md index 454a8b7b2fd..66e6c33a775 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -52,6 +52,6 @@ gRPC C Core library. $ git clone https://github.com/grpc/grpc.git $ cd grpc $ git submodule update --init - $ make + $ make $ [sudo] make install ``` diff --git a/MANIFEST.md b/MANIFEST.md index b523f8f6fa5..77e014002d9 100644 --- a/MANIFEST.md +++ b/MANIFEST.md @@ -1,14 +1,28 @@ # Top-level Items by language +## Bazel +* [grpc.bzl](grpc.bzl) + ## Node * [binding.gyp](binding.gyp) +* [package.json](package.json) ## Objective-C * [gRPC.podspec](gRPC.podspec) +## PHP +* [composer.json](composer.json) +* [config.m4](config.m4) +* [package.xml](package.xml) + ## Python * [requirements.txt](requirements.txt) * [setup.cfg](setup.cfg) * [setup.py](setup.py) * [tox.ini](tox.ini) * [PYTHON-MANIFEST.in](PYTHON-MANIFEST.in) + +## Ruby +* [Gemfile](Gemfile) +* [grpc.gemspec](grpc.gemspec) +* [Rakefile](Rakefile) diff --git a/Makefile b/Makefile index 01d8922f376..3773a8091cd 100644 --- a/Makefile +++ b/Makefile @@ -188,8 +188,8 @@ CC_tsan = clang CXX_tsan = clang++ LD_tsan = clang LDXX_tsan = clang++ -CPPFLAGS_tsan = -O0 -fsanitize=thread -fno-omit-frame-pointer -Wno-unused-command-line-argument -fPIE -pie -DGPR_NO_DIRECT_SYSCALLS -LDFLAGS_tsan = -fsanitize=thread -fPIE -pie $(if $(JENKINS_BUILD),-Wl$(comma)-Ttext-segment=0x7e0000000000,) +CPPFLAGS_tsan = -O0 -fsanitize=thread -fno-omit-frame-pointer -Wno-unused-command-line-argument -DGPR_NO_DIRECT_SYSCALLS +LDFLAGS_tsan = -fsanitize=thread DEFINES_tsan += GRPC_TEST_SLOWDOWN_BUILD_FACTOR=5 VALID_CONFIG_stapprof = 1 @@ -225,8 +225,8 @@ CC_etsan = clang CXX_etsan = clang++ LD_etsan = clang LDXX_etsan = clang++ -CPPFLAGS_etsan = -O0 -fsanitize=thread -fno-omit-frame-pointer -Wno-unused-command-line-argument -fPIE -pie -DGPR_NO_DIRECT_SYSCALLS -LDFLAGS_etsan = -fsanitize=thread -fPIE -pie $(if $(JENKINS_BUILD),-Wl$(comma)-Ttext-segment=0x7e0000000000,) +CPPFLAGS_etsan = -O0 -fsanitize=thread -fno-omit-frame-pointer -Wno-unused-command-line-argument -DGPR_NO_DIRECT_SYSCALLS +LDFLAGS_etsan = -fsanitize=thread DEFINES_etsan = _DEBUG DEBUG GRPC_EXECUTION_CONTEXT_SANITIZER DEFINES_etsan += GRPC_TEST_SLOWDOWN_BUILD_FACTOR=5 @@ -893,6 +893,7 @@ fling_test: $(BINDIR)/$(CONFIG)/fling_test gen_hpack_tables: $(BINDIR)/$(CONFIG)/gen_hpack_tables gen_legal_metadata_characters: $(BINDIR)/$(CONFIG)/gen_legal_metadata_characters gpr_avl_test: $(BINDIR)/$(CONFIG)/gpr_avl_test +gpr_backoff_test: $(BINDIR)/$(CONFIG)/gpr_backoff_test gpr_cmdline_test: $(BINDIR)/$(CONFIG)/gpr_cmdline_test gpr_cpu_test: $(BINDIR)/$(CONFIG)/gpr_cpu_test gpr_env_test: $(BINDIR)/$(CONFIG)/gpr_env_test @@ -926,8 +927,8 @@ grpc_security_connector_test: $(BINDIR)/$(CONFIG)/grpc_security_connector_test grpc_verify_jwt: $(BINDIR)/$(CONFIG)/grpc_verify_jwt hpack_parser_test: $(BINDIR)/$(CONFIG)/hpack_parser_test hpack_table_test: $(BINDIR)/$(CONFIG)/hpack_table_test +http_parser_test: $(BINDIR)/$(CONFIG)/http_parser_test httpcli_format_request_test: $(BINDIR)/$(CONFIG)/httpcli_format_request_test -httpcli_parser_test: $(BINDIR)/$(CONFIG)/httpcli_parser_test httpcli_test: $(BINDIR)/$(CONFIG)/httpcli_test httpscli_test: $(BINDIR)/$(CONFIG)/httpscli_test init_test: $(BINDIR)/$(CONFIG)/init_test @@ -976,6 +977,7 @@ channel_arguments_test: $(BINDIR)/$(CONFIG)/channel_arguments_test cli_call_test: $(BINDIR)/$(CONFIG)/cli_call_test client_crash_test: $(BINDIR)/$(CONFIG)/client_crash_test client_crash_test_server: $(BINDIR)/$(CONFIG)/client_crash_test_server +codegen_test: $(BINDIR)/$(CONFIG)/codegen_test credentials_test: $(BINDIR)/$(CONFIG)/credentials_test cxx_byte_buffer_test: $(BINDIR)/$(CONFIG)/cxx_byte_buffer_test cxx_slice_test: $(BINDIR)/$(CONFIG)/cxx_slice_test @@ -1018,6 +1020,7 @@ thread_stress_test: $(BINDIR)/$(CONFIG)/thread_stress_test zookeeper_test: $(BINDIR)/$(CONFIG)/zookeeper_test public_headers_must_be_c89: $(BINDIR)/$(CONFIG)/public_headers_must_be_c89 boringssl_aes_test: $(BINDIR)/$(CONFIG)/boringssl_aes_test +boringssl_asn1_test: $(BINDIR)/$(CONFIG)/boringssl_asn1_test boringssl_base64_test: $(BINDIR)/$(CONFIG)/boringssl_base64_test boringssl_bio_test: $(BINDIR)/$(CONFIG)/boringssl_bio_test boringssl_bn_test: $(BINDIR)/$(CONFIG)/boringssl_bn_test @@ -1072,6 +1075,7 @@ h2_full_test: $(BINDIR)/$(CONFIG)/h2_full_test h2_full+pipe_test: $(BINDIR)/$(CONFIG)/h2_full+pipe_test h2_full+poll_test: $(BINDIR)/$(CONFIG)/h2_full+poll_test h2_full+poll+pipe_test: $(BINDIR)/$(CONFIG)/h2_full+poll+pipe_test +h2_full+trace_test: $(BINDIR)/$(CONFIG)/h2_full+trace_test h2_oauth2_test: $(BINDIR)/$(CONFIG)/h2_oauth2_test h2_proxy_test: $(BINDIR)/$(CONFIG)/h2_proxy_test h2_sockpair_test: $(BINDIR)/$(CONFIG)/h2_sockpair_test @@ -1080,7 +1084,6 @@ h2_sockpair_1byte_test: $(BINDIR)/$(CONFIG)/h2_sockpair_1byte_test h2_ssl_test: $(BINDIR)/$(CONFIG)/h2_ssl_test h2_ssl+poll_test: $(BINDIR)/$(CONFIG)/h2_ssl+poll_test h2_ssl_proxy_test: $(BINDIR)/$(CONFIG)/h2_ssl_proxy_test -h2_uchannel_test: $(BINDIR)/$(CONFIG)/h2_uchannel_test h2_uds_test: $(BINDIR)/$(CONFIG)/h2_uds_test h2_uds+poll_test: $(BINDIR)/$(CONFIG)/h2_uds+poll_test h2_census_nosec_test: $(BINDIR)/$(CONFIG)/h2_census_nosec_test @@ -1089,11 +1092,11 @@ h2_full_nosec_test: $(BINDIR)/$(CONFIG)/h2_full_nosec_test h2_full+pipe_nosec_test: $(BINDIR)/$(CONFIG)/h2_full+pipe_nosec_test h2_full+poll_nosec_test: $(BINDIR)/$(CONFIG)/h2_full+poll_nosec_test h2_full+poll+pipe_nosec_test: $(BINDIR)/$(CONFIG)/h2_full+poll+pipe_nosec_test +h2_full+trace_nosec_test: $(BINDIR)/$(CONFIG)/h2_full+trace_nosec_test h2_proxy_nosec_test: $(BINDIR)/$(CONFIG)/h2_proxy_nosec_test h2_sockpair_nosec_test: $(BINDIR)/$(CONFIG)/h2_sockpair_nosec_test h2_sockpair+trace_nosec_test: $(BINDIR)/$(CONFIG)/h2_sockpair+trace_nosec_test h2_sockpair_1byte_nosec_test: $(BINDIR)/$(CONFIG)/h2_sockpair_1byte_nosec_test -h2_uchannel_nosec_test: $(BINDIR)/$(CONFIG)/h2_uchannel_nosec_test h2_uds_nosec_test: $(BINDIR)/$(CONFIG)/h2_uds_nosec_test h2_uds+poll_nosec_test: $(BINDIR)/$(CONFIG)/h2_uds+poll_nosec_test @@ -1126,13 +1129,13 @@ static: static_c static_cxx static_c: pc_c pc_c_unsecure cache.mk pc_c_zookeeper $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a static_zookeeper_libs -static_cxx: pc_cxx pc_cxx_unsecure cache.mk $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure.a +static_cxx: pc_cxx pc_cxx_unsecure cache.mk $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc++_codegen_lib.a $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure.a shared: shared_c shared_cxx shared_c: pc_c pc_c_unsecure cache.mk pc_c_zookeeper $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)gpr$(SHARED_VERSION).$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc$(SHARED_VERSION).$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc_unsecure$(SHARED_VERSION).$(SHARED_EXT) shared_zookeeper_libs -shared_cxx: pc_cxx pc_cxx_unsecure cache.mk $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc++$(SHARED_VERSION).$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc++_unsecure$(SHARED_VERSION).$(SHARED_EXT) +shared_cxx: pc_cxx pc_cxx_unsecure cache.mk $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc++$(SHARED_VERSION).$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc++_codegen_lib$(SHARED_VERSION).$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc++_unsecure$(SHARED_VERSION).$(SHARED_EXT) shared_csharp: shared_c $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc_csharp_ext$(SHARED_VERSION).$(SHARED_EXT) ifeq ($(HAS_ZOOKEEPER),true) @@ -1152,7 +1155,7 @@ plugins: $(PROTOC_PLUGINS) privatelibs: privatelibs_c privatelibs_cxx -privatelibs_c: $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libreconnect_server.a $(LIBDIR)/$(CONFIG)/libtest_tcp_server.a $(LIBDIR)/$(CONFIG)/libz.a $(LIBDIR)/$(CONFIG)/libbad_client_test.a $(LIBDIR)/$(CONFIG)/libbad_ssl_test_server.a $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libend2end_nosec_tests.a $(LIBDIR)/$(CONFIG)/libend2end_certs.a +privatelibs_c: $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libreconnect_server.a $(LIBDIR)/$(CONFIG)/libtest_tcp_server.a $(LIBDIR)/$(CONFIG)/libz.a $(LIBDIR)/$(CONFIG)/libbad_client_test.a $(LIBDIR)/$(CONFIG)/libbad_ssl_test_server.a $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libend2end_nosec_tests.a pc_c: $(LIBDIR)/$(CONFIG)/pkgconfig/grpc.pc pc_c_unsecure: $(LIBDIR)/$(CONFIG)/pkgconfig/grpc_unsecure.pc @@ -1167,7 +1170,7 @@ pc_cxx: $(LIBDIR)/$(CONFIG)/pkgconfig/grpc++.pc pc_cxx_unsecure: $(LIBDIR)/$(CONFIG)/pkgconfig/grpc++_unsecure.pc -privatelibs_cxx: $(LIBDIR)/$(CONFIG)/libgrpc++_test_config.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libinterop_client_helper.a $(LIBDIR)/$(CONFIG)/libinterop_client_main.a $(LIBDIR)/$(CONFIG)/libinterop_server_helper.a $(LIBDIR)/$(CONFIG)/libinterop_server_main.a $(LIBDIR)/$(CONFIG)/libqps.a $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl_aes_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_base64_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_bio_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_bn_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_bytestring_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_aead_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_cipher_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_cmac_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_ed25519_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_x25519_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_dh_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_digest_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_ec_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_ecdsa_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_err_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_evp_extra_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_evp_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_pbkdf_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_hmac_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_pkcs12_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_pkcs8_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_poly1305_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_rsa_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_ssl_test_lib.a +privatelibs_cxx: $(LIBDIR)/$(CONFIG)/libgrpc++_test_config.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libinterop_client_helper.a $(LIBDIR)/$(CONFIG)/libinterop_client_main.a $(LIBDIR)/$(CONFIG)/libinterop_server_helper.a $(LIBDIR)/$(CONFIG)/libinterop_server_main.a $(LIBDIR)/$(CONFIG)/libqps.a $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl_aes_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_asn1_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_base64_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_bio_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_bn_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_bytestring_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_aead_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_cipher_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_cmac_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_ed25519_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_x25519_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_dh_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_digest_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_ec_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_ecdsa_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_err_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_evp_extra_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_evp_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_pbkdf_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_hmac_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_pkcs12_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_pkcs8_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_poly1305_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_rsa_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_ssl_test_lib.a ifeq ($(HAS_ZOOKEEPER),true) privatelibs_zookeeper: @@ -1203,6 +1206,7 @@ buildtests_c: privatelibs_c \ $(BINDIR)/$(CONFIG)/fling_stream_test \ $(BINDIR)/$(CONFIG)/fling_test \ $(BINDIR)/$(CONFIG)/gpr_avl_test \ + $(BINDIR)/$(CONFIG)/gpr_backoff_test \ $(BINDIR)/$(CONFIG)/gpr_cmdline_test \ $(BINDIR)/$(CONFIG)/gpr_cpu_test \ $(BINDIR)/$(CONFIG)/gpr_env_test \ @@ -1232,8 +1236,8 @@ buildtests_c: privatelibs_c \ $(BINDIR)/$(CONFIG)/grpc_security_connector_test \ $(BINDIR)/$(CONFIG)/hpack_parser_test \ $(BINDIR)/$(CONFIG)/hpack_table_test \ + $(BINDIR)/$(CONFIG)/http_parser_test \ $(BINDIR)/$(CONFIG)/httpcli_format_request_test \ - $(BINDIR)/$(CONFIG)/httpcli_parser_test \ $(BINDIR)/$(CONFIG)/httpcli_test \ $(BINDIR)/$(CONFIG)/httpscli_test \ $(BINDIR)/$(CONFIG)/init_test \ @@ -1292,6 +1296,7 @@ buildtests_c: privatelibs_c \ $(BINDIR)/$(CONFIG)/h2_full+pipe_test \ $(BINDIR)/$(CONFIG)/h2_full+poll_test \ $(BINDIR)/$(CONFIG)/h2_full+poll+pipe_test \ + $(BINDIR)/$(CONFIG)/h2_full+trace_test \ $(BINDIR)/$(CONFIG)/h2_oauth2_test \ $(BINDIR)/$(CONFIG)/h2_proxy_test \ $(BINDIR)/$(CONFIG)/h2_sockpair_test \ @@ -1300,7 +1305,6 @@ buildtests_c: privatelibs_c \ $(BINDIR)/$(CONFIG)/h2_ssl_test \ $(BINDIR)/$(CONFIG)/h2_ssl+poll_test \ $(BINDIR)/$(CONFIG)/h2_ssl_proxy_test \ - $(BINDIR)/$(CONFIG)/h2_uchannel_test \ $(BINDIR)/$(CONFIG)/h2_uds_test \ $(BINDIR)/$(CONFIG)/h2_uds+poll_test \ $(BINDIR)/$(CONFIG)/h2_census_nosec_test \ @@ -1309,11 +1313,11 @@ buildtests_c: privatelibs_c \ $(BINDIR)/$(CONFIG)/h2_full+pipe_nosec_test \ $(BINDIR)/$(CONFIG)/h2_full+poll_nosec_test \ $(BINDIR)/$(CONFIG)/h2_full+poll+pipe_nosec_test \ + $(BINDIR)/$(CONFIG)/h2_full+trace_nosec_test \ $(BINDIR)/$(CONFIG)/h2_proxy_nosec_test \ $(BINDIR)/$(CONFIG)/h2_sockpair_nosec_test \ $(BINDIR)/$(CONFIG)/h2_sockpair+trace_nosec_test \ $(BINDIR)/$(CONFIG)/h2_sockpair_1byte_nosec_test \ - $(BINDIR)/$(CONFIG)/h2_uchannel_nosec_test \ $(BINDIR)/$(CONFIG)/h2_uds_nosec_test \ $(BINDIR)/$(CONFIG)/h2_uds+poll_nosec_test \ @@ -1328,6 +1332,7 @@ buildtests_cxx: buildtests_zookeeper privatelibs_cxx \ $(BINDIR)/$(CONFIG)/cli_call_test \ $(BINDIR)/$(CONFIG)/client_crash_test \ $(BINDIR)/$(CONFIG)/client_crash_test_server \ + $(BINDIR)/$(CONFIG)/codegen_test \ $(BINDIR)/$(CONFIG)/credentials_test \ $(BINDIR)/$(CONFIG)/cxx_byte_buffer_test \ $(BINDIR)/$(CONFIG)/cxx_slice_test \ @@ -1361,6 +1366,7 @@ buildtests_cxx: buildtests_zookeeper privatelibs_cxx \ $(BINDIR)/$(CONFIG)/sync_unary_ping_pong_test \ $(BINDIR)/$(CONFIG)/thread_stress_test \ $(BINDIR)/$(CONFIG)/boringssl_aes_test \ + $(BINDIR)/$(CONFIG)/boringssl_asn1_test \ $(BINDIR)/$(CONFIG)/boringssl_base64_test \ $(BINDIR)/$(CONFIG)/boringssl_bio_test \ $(BINDIR)/$(CONFIG)/boringssl_bn_test \ @@ -1456,6 +1462,8 @@ test_c: buildtests_c $(Q) $(BINDIR)/$(CONFIG)/fling_test || ( echo test fling_test failed ; exit 1 ) $(E) "[RUN] Testing gpr_avl_test" $(Q) $(BINDIR)/$(CONFIG)/gpr_avl_test || ( echo test gpr_avl_test failed ; exit 1 ) + $(E) "[RUN] Testing gpr_backoff_test" + $(Q) $(BINDIR)/$(CONFIG)/gpr_backoff_test || ( echo test gpr_backoff_test failed ; exit 1 ) $(E) "[RUN] Testing gpr_cmdline_test" $(Q) $(BINDIR)/$(CONFIG)/gpr_cmdline_test || ( echo test gpr_cmdline_test failed ; exit 1 ) $(E) "[RUN] Testing gpr_cpu_test" @@ -1514,10 +1522,10 @@ test_c: buildtests_c $(Q) $(BINDIR)/$(CONFIG)/hpack_parser_test || ( echo test hpack_parser_test failed ; exit 1 ) $(E) "[RUN] Testing hpack_table_test" $(Q) $(BINDIR)/$(CONFIG)/hpack_table_test || ( echo test hpack_table_test failed ; exit 1 ) + $(E) "[RUN] Testing http_parser_test" + $(Q) $(BINDIR)/$(CONFIG)/http_parser_test || ( echo test http_parser_test failed ; exit 1 ) $(E) "[RUN] Testing httpcli_format_request_test" $(Q) $(BINDIR)/$(CONFIG)/httpcli_format_request_test || ( echo test httpcli_format_request_test failed ; exit 1 ) - $(E) "[RUN] Testing httpcli_parser_test" - $(Q) $(BINDIR)/$(CONFIG)/httpcli_parser_test || ( echo test httpcli_parser_test failed ; exit 1 ) $(E) "[RUN] Testing httpcli_test" $(Q) $(BINDIR)/$(CONFIG)/httpcli_test || ( echo test httpcli_test failed ; exit 1 ) $(E) "[RUN] Testing httpscli_test" @@ -1534,12 +1542,8 @@ test_c: buildtests_c $(Q) $(BINDIR)/$(CONFIG)/json_test || ( echo test json_test failed ; exit 1 ) $(E) "[RUN] Testing lame_client_test" $(Q) $(BINDIR)/$(CONFIG)/lame_client_test || ( echo test lame_client_test failed ; exit 1 ) - $(E) "[RUN] Testing lb_policies_test" - $(Q) $(BINDIR)/$(CONFIG)/lb_policies_test || ( echo test lb_policies_test failed ; exit 1 ) $(E) "[RUN] Testing message_compress_test" $(Q) $(BINDIR)/$(CONFIG)/message_compress_test || ( echo test message_compress_test failed ; exit 1 ) - $(E) "[RUN] Testing mlog_test" - $(Q) $(BINDIR)/$(CONFIG)/mlog_test || ( echo test mlog_test failed ; exit 1 ) $(E) "[RUN] Testing multiple_server_queues_test" $(Q) $(BINDIR)/$(CONFIG)/multiple_server_queues_test || ( echo test multiple_server_queues_test failed ; exit 1 ) $(E) "[RUN] Testing murmur_hash_test" @@ -1617,6 +1621,10 @@ test_c: buildtests_c flaky_test_c: buildtests_c + $(E) "[RUN] Testing lb_policies_test" + $(Q) $(BINDIR)/$(CONFIG)/lb_policies_test || ( echo test lb_policies_test failed ; exit 1 ) + $(E) "[RUN] Testing mlog_test" + $(Q) $(BINDIR)/$(CONFIG)/mlog_test || ( echo test mlog_test failed ; exit 1 ) test_cxx: test_zookeeper buildtests_cxx @@ -1636,6 +1644,8 @@ test_cxx: test_zookeeper buildtests_cxx $(Q) $(BINDIR)/$(CONFIG)/cli_call_test || ( echo test cli_call_test failed ; exit 1 ) $(E) "[RUN] Testing client_crash_test" $(Q) $(BINDIR)/$(CONFIG)/client_crash_test || ( echo test client_crash_test failed ; exit 1 ) + $(E) "[RUN] Testing codegen_test" + $(Q) $(BINDIR)/$(CONFIG)/codegen_test || ( echo test codegen_test failed ; exit 1 ) $(E) "[RUN] Testing credentials_test" $(Q) $(BINDIR)/$(CONFIG)/credentials_test || ( echo test credentials_test failed ; exit 1 ) $(E) "[RUN] Testing cxx_byte_buffer_test" @@ -1744,6 +1754,8 @@ strip-static_cxx: static_cxx ifeq ($(CONFIG),opt) $(E) "[STRIP] Stripping libgrpc++.a" $(Q) $(STRIP) $(LIBDIR)/$(CONFIG)/libgrpc++.a + $(E) "[STRIP] Stripping libgrpc++_codegen_lib.a" + $(Q) $(STRIP) $(LIBDIR)/$(CONFIG)/libgrpc++_codegen_lib.a $(E) "[STRIP] Stripping libgrpc++_unsecure.a" $(Q) $(STRIP) $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure.a endif @@ -1766,6 +1778,8 @@ strip-shared_cxx: shared_cxx ifeq ($(CONFIG),opt) $(E) "[STRIP] Stripping $(SHARED_PREFIX)grpc++$(SHARED_VERSION).$(SHARED_EXT)" $(Q) $(STRIP) $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc++$(SHARED_VERSION).$(SHARED_EXT) + $(E) "[STRIP] Stripping $(SHARED_PREFIX)grpc++_codegen_lib$(SHARED_VERSION).$(SHARED_EXT)" + $(Q) $(STRIP) $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc++_codegen_lib$(SHARED_VERSION).$(SHARED_EXT) $(E) "[STRIP] Stripping $(SHARED_PREFIX)grpc++_unsecure$(SHARED_VERSION).$(SHARED_EXT)" $(Q) $(STRIP) $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc++_unsecure$(SHARED_VERSION).$(SHARED_EXT) endif @@ -2077,6 +2091,9 @@ install-static_cxx: static_cxx strip-static_cxx install-pkg-config_cxx $(E) "[INSTALL] Installing libgrpc++.a" $(Q) $(INSTALL) -d $(prefix)/lib $(Q) $(INSTALL) $(LIBDIR)/$(CONFIG)/libgrpc++.a $(prefix)/lib/libgrpc++.a + $(E) "[INSTALL] Installing libgrpc++_codegen_lib.a" + $(Q) $(INSTALL) -d $(prefix)/lib + $(Q) $(INSTALL) $(LIBDIR)/$(CONFIG)/libgrpc++_codegen_lib.a $(prefix)/lib/libgrpc++_codegen_lib.a $(E) "[INSTALL] Installing libgrpc++_unsecure.a" $(Q) $(INSTALL) -d $(prefix)/lib $(Q) $(INSTALL) $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure.a $(prefix)/lib/libgrpc++_unsecure.a @@ -2138,6 +2155,15 @@ ifeq ($(SYSTEM),MINGW32) else ifneq ($(SYSTEM),Darwin) $(Q) ln -sf $(SHARED_PREFIX)grpc++$(SHARED_VERSION).$(SHARED_EXT) $(prefix)/lib/libgrpc++.so.0 $(Q) ln -sf $(SHARED_PREFIX)grpc++$(SHARED_VERSION).$(SHARED_EXT) $(prefix)/lib/libgrpc++.so +endif + $(E) "[INSTALL] Installing $(SHARED_PREFIX)grpc++_codegen_lib$(SHARED_VERSION).$(SHARED_EXT)" + $(Q) $(INSTALL) -d $(prefix)/lib + $(Q) $(INSTALL) $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc++_codegen_lib$(SHARED_VERSION).$(SHARED_EXT) $(prefix)/lib/$(SHARED_PREFIX)grpc++_codegen_lib$(SHARED_VERSION).$(SHARED_EXT) +ifeq ($(SYSTEM),MINGW32) + $(Q) $(INSTALL) $(LIBDIR)/$(CONFIG)/libgrpc++_codegen_lib-imp.a $(prefix)/lib/libgrpc++_codegen_lib-imp.a +else ifneq ($(SYSTEM),Darwin) + $(Q) ln -sf $(SHARED_PREFIX)grpc++_codegen_lib$(SHARED_VERSION).$(SHARED_EXT) $(prefix)/lib/libgrpc++_codegen_lib.so.0 + $(Q) ln -sf $(SHARED_PREFIX)grpc++_codegen_lib$(SHARED_VERSION).$(SHARED_EXT) $(prefix)/lib/libgrpc++_codegen_lib.so endif $(E) "[INSTALL] Installing $(SHARED_PREFIX)grpc++_unsecure$(SHARED_VERSION).$(SHARED_EXT)" $(Q) $(INSTALL) -d $(prefix)/lib @@ -2242,51 +2268,66 @@ clean: LIBGPR_SRC = \ - src/core/profiling/basic_timers.c \ - src/core/profiling/stap_timers.c \ - src/core/support/alloc.c \ - src/core/support/avl.c \ - src/core/support/cmdline.c \ - src/core/support/cpu_iphone.c \ - src/core/support/cpu_linux.c \ - src/core/support/cpu_posix.c \ - src/core/support/cpu_windows.c \ - src/core/support/env_linux.c \ - src/core/support/env_posix.c \ - src/core/support/env_win32.c \ - src/core/support/histogram.c \ - src/core/support/host_port.c \ - src/core/support/load_file.c \ - src/core/support/log.c \ - src/core/support/log_android.c \ - src/core/support/log_linux.c \ - src/core/support/log_posix.c \ - src/core/support/log_win32.c \ - src/core/support/murmur_hash.c \ - src/core/support/slice.c \ - src/core/support/slice_buffer.c \ - src/core/support/stack_lockfree.c \ - src/core/support/string.c \ - src/core/support/string_posix.c \ - src/core/support/string_win32.c \ - src/core/support/subprocess_posix.c \ - src/core/support/subprocess_windows.c \ - src/core/support/sync.c \ - src/core/support/sync_posix.c \ - src/core/support/sync_win32.c \ - src/core/support/thd.c \ - src/core/support/thd_posix.c \ - src/core/support/thd_win32.c \ - src/core/support/time.c \ - src/core/support/time_posix.c \ - src/core/support/time_precise.c \ - src/core/support/time_win32.c \ - src/core/support/tls_pthread.c \ - src/core/support/tmpfile_posix.c \ - src/core/support/tmpfile_win32.c \ - src/core/support/wrap_memcpy.c \ + src/core/lib/profiling/basic_timers.c \ + src/core/lib/profiling/stap_timers.c \ + src/core/lib/support/alloc.c \ + src/core/lib/support/avl.c \ + src/core/lib/support/backoff.c \ + src/core/lib/support/cmdline.c \ + src/core/lib/support/cpu_iphone.c \ + src/core/lib/support/cpu_linux.c \ + src/core/lib/support/cpu_posix.c \ + src/core/lib/support/cpu_windows.c \ + src/core/lib/support/env_linux.c \ + src/core/lib/support/env_posix.c \ + src/core/lib/support/env_win32.c \ + src/core/lib/support/histogram.c \ + src/core/lib/support/host_port.c \ + src/core/lib/support/load_file.c \ + src/core/lib/support/log.c \ + src/core/lib/support/log_android.c \ + src/core/lib/support/log_linux.c \ + src/core/lib/support/log_posix.c \ + src/core/lib/support/log_win32.c \ + src/core/lib/support/murmur_hash.c \ + src/core/lib/support/slice.c \ + src/core/lib/support/slice_buffer.c \ + src/core/lib/support/stack_lockfree.c \ + src/core/lib/support/string.c \ + src/core/lib/support/string_posix.c \ + src/core/lib/support/string_win32.c \ + src/core/lib/support/subprocess_posix.c \ + src/core/lib/support/subprocess_windows.c \ + src/core/lib/support/sync.c \ + src/core/lib/support/sync_posix.c \ + src/core/lib/support/sync_win32.c \ + src/core/lib/support/thd.c \ + src/core/lib/support/thd_posix.c \ + src/core/lib/support/thd_win32.c \ + src/core/lib/support/time.c \ + src/core/lib/support/time_posix.c \ + src/core/lib/support/time_precise.c \ + src/core/lib/support/time_win32.c \ + src/core/lib/support/tls_pthread.c \ + src/core/lib/support/tmpfile_posix.c \ + src/core/lib/support/tmpfile_win32.c \ + src/core/lib/support/wrap_memcpy.c \ PUBLIC_HEADERS_C += \ + include/grpc/impl/codegen/alloc.h \ + include/grpc/impl/codegen/atm.h \ + include/grpc/impl/codegen/atm_gcc_atomic.h \ + include/grpc/impl/codegen/atm_gcc_sync.h \ + include/grpc/impl/codegen/atm_win32.h \ + include/grpc/impl/codegen/log.h \ + include/grpc/impl/codegen/port_platform.h \ + include/grpc/impl/codegen/slice.h \ + include/grpc/impl/codegen/slice_buffer.h \ + include/grpc/impl/codegen/sync.h \ + include/grpc/impl/codegen/sync_generic.h \ + include/grpc/impl/codegen/sync_posix.h \ + include/grpc/impl/codegen/sync_win32.h \ + include/grpc/impl/codegen/time.h \ include/grpc/support/alloc.h \ include/grpc/support/atm.h \ include/grpc/support/atm_gcc_atomic.h \ @@ -2315,20 +2356,6 @@ PUBLIC_HEADERS_C += \ include/grpc/support/tls_msvc.h \ include/grpc/support/tls_pthread.h \ include/grpc/support/useful.h \ - include/grpc/impl/codegen/alloc.h \ - include/grpc/impl/codegen/atm.h \ - include/grpc/impl/codegen/atm_gcc_atomic.h \ - include/grpc/impl/codegen/atm_gcc_sync.h \ - include/grpc/impl/codegen/atm_win32.h \ - include/grpc/impl/codegen/log.h \ - include/grpc/impl/codegen/port_platform.h \ - include/grpc/impl/codegen/slice.h \ - include/grpc/impl/codegen/slice_buffer.h \ - include/grpc/impl/codegen/sync.h \ - include/grpc/impl/codegen/sync_generic.h \ - include/grpc/impl/codegen/sync_posix.h \ - include/grpc/impl/codegen/sync_win32.h \ - include/grpc/impl/codegen/time.h \ LIBGPR_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBGPR_SRC)))) @@ -2370,6 +2397,7 @@ endif LIBGPR_TEST_UTIL_SRC = \ test/core/util/test_config.c \ +PUBLIC_HEADERS_C += \ LIBGPR_TEST_UTIL_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBGPR_TEST_UTIL_SRC)))) @@ -2392,168 +2420,177 @@ endif LIBGRPC_SRC = \ - src/core/census/grpc_context.c \ - src/core/census/grpc_filter.c \ - src/core/channel/channel_args.c \ - src/core/channel/channel_stack.c \ - src/core/channel/client_channel.c \ - src/core/channel/client_uchannel.c \ - src/core/channel/compress_filter.c \ - src/core/channel/connected_channel.c \ - src/core/channel/http_client_filter.c \ - src/core/channel/http_server_filter.c \ - src/core/channel/subchannel_call_holder.c \ - src/core/client_config/client_config.c \ - src/core/client_config/connector.c \ - src/core/client_config/default_initial_connect_string.c \ - src/core/client_config/initial_connect_string.c \ - src/core/client_config/lb_policies/load_balancer_api.c \ - src/core/client_config/lb_policies/pick_first.c \ - src/core/client_config/lb_policies/round_robin.c \ - src/core/client_config/lb_policy.c \ - src/core/client_config/lb_policy_factory.c \ - src/core/client_config/lb_policy_registry.c \ - src/core/client_config/resolver.c \ - src/core/client_config/resolver_factory.c \ - src/core/client_config/resolver_registry.c \ - src/core/client_config/resolvers/dns_resolver.c \ - src/core/client_config/resolvers/sockaddr_resolver.c \ - src/core/client_config/subchannel.c \ - src/core/client_config/subchannel_factory.c \ - src/core/client_config/subchannel_index.c \ - src/core/client_config/uri_parser.c \ - src/core/compression/compression_algorithm.c \ - src/core/compression/message_compress.c \ - src/core/debug/trace.c \ - src/core/httpcli/format_request.c \ - src/core/httpcli/httpcli.c \ - src/core/httpcli/parser.c \ - src/core/iomgr/closure.c \ - src/core/iomgr/endpoint.c \ - src/core/iomgr/endpoint_pair_posix.c \ - src/core/iomgr/endpoint_pair_windows.c \ - src/core/iomgr/exec_ctx.c \ - src/core/iomgr/executor.c \ - src/core/iomgr/fd_posix.c \ - src/core/iomgr/iocp_windows.c \ - src/core/iomgr/iomgr.c \ - src/core/iomgr/iomgr_posix.c \ - src/core/iomgr/iomgr_windows.c \ - src/core/iomgr/pollset_multipoller_with_epoll.c \ - src/core/iomgr/pollset_multipoller_with_poll_posix.c \ - src/core/iomgr/pollset_posix.c \ - src/core/iomgr/pollset_set_posix.c \ - src/core/iomgr/pollset_set_windows.c \ - src/core/iomgr/pollset_windows.c \ - src/core/iomgr/resolve_address_posix.c \ - src/core/iomgr/resolve_address_windows.c \ - src/core/iomgr/sockaddr_utils.c \ - src/core/iomgr/socket_utils_common_posix.c \ - src/core/iomgr/socket_utils_linux.c \ - src/core/iomgr/socket_utils_posix.c \ - src/core/iomgr/socket_windows.c \ - src/core/iomgr/tcp_client_posix.c \ - src/core/iomgr/tcp_client_windows.c \ - src/core/iomgr/tcp_posix.c \ - src/core/iomgr/tcp_server_posix.c \ - src/core/iomgr/tcp_server_windows.c \ - src/core/iomgr/tcp_windows.c \ - src/core/iomgr/time_averaged_stats.c \ - src/core/iomgr/timer.c \ - src/core/iomgr/timer_heap.c \ - src/core/iomgr/udp_server.c \ - src/core/iomgr/wakeup_fd_eventfd.c \ - src/core/iomgr/wakeup_fd_nospecial.c \ - src/core/iomgr/wakeup_fd_pipe.c \ - src/core/iomgr/wakeup_fd_posix.c \ - src/core/iomgr/workqueue_posix.c \ - src/core/iomgr/workqueue_windows.c \ - src/core/json/json.c \ - src/core/json/json_reader.c \ - src/core/json/json_string.c \ - src/core/json/json_writer.c \ - src/core/proto/grpc/lb/v0/load_balancer.pb.c \ - src/core/surface/alarm.c \ - src/core/surface/api_trace.c \ - src/core/surface/byte_buffer.c \ - src/core/surface/byte_buffer_reader.c \ - src/core/surface/call.c \ - src/core/surface/call_details.c \ - src/core/surface/call_log_batch.c \ - src/core/surface/channel.c \ - src/core/surface/channel_connectivity.c \ - src/core/surface/channel_create.c \ - src/core/surface/channel_ping.c \ - src/core/surface/completion_queue.c \ - src/core/surface/event_string.c \ - src/core/surface/init.c \ - src/core/surface/lame_client.c \ - src/core/surface/metadata_array.c \ - src/core/surface/server.c \ - src/core/surface/server_chttp2.c \ - src/core/surface/server_create.c \ - src/core/surface/validate_metadata.c \ - src/core/surface/version.c \ - src/core/transport/byte_stream.c \ - src/core/transport/chttp2/alpn.c \ - src/core/transport/chttp2/bin_encoder.c \ - src/core/transport/chttp2/frame_data.c \ - src/core/transport/chttp2/frame_goaway.c \ - src/core/transport/chttp2/frame_ping.c \ - src/core/transport/chttp2/frame_rst_stream.c \ - src/core/transport/chttp2/frame_settings.c \ - src/core/transport/chttp2/frame_window_update.c \ - src/core/transport/chttp2/hpack_encoder.c \ - src/core/transport/chttp2/hpack_parser.c \ - src/core/transport/chttp2/hpack_table.c \ - src/core/transport/chttp2/huffsyms.c \ - src/core/transport/chttp2/incoming_metadata.c \ - src/core/transport/chttp2/parsing.c \ - src/core/transport/chttp2/status_conversion.c \ - src/core/transport/chttp2/stream_lists.c \ - src/core/transport/chttp2/stream_map.c \ - src/core/transport/chttp2/timeout_encoding.c \ - src/core/transport/chttp2/varint.c \ - src/core/transport/chttp2/writing.c \ - src/core/transport/chttp2_transport.c \ - src/core/transport/connectivity_state.c \ - src/core/transport/metadata.c \ - src/core/transport/metadata_batch.c \ - src/core/transport/static_metadata.c \ - src/core/transport/transport.c \ - src/core/transport/transport_op_string.c \ - src/core/httpcli/httpcli_security_connector.c \ - src/core/security/b64.c \ - src/core/security/client_auth_filter.c \ - src/core/security/credentials.c \ - src/core/security/credentials_metadata.c \ - src/core/security/credentials_posix.c \ - src/core/security/credentials_win32.c \ - src/core/security/google_default_credentials.c \ - src/core/security/handshake.c \ - src/core/security/json_token.c \ - src/core/security/jwt_verifier.c \ - src/core/security/secure_endpoint.c \ - src/core/security/security_connector.c \ - src/core/security/security_context.c \ - src/core/security/server_auth_filter.c \ - src/core/security/server_secure_chttp2.c \ - src/core/surface/init_secure.c \ - src/core/surface/secure_channel_create.c \ - src/core/tsi/fake_transport_security.c \ - src/core/tsi/ssl_transport_security.c \ - src/core/tsi/transport_security.c \ - src/core/census/context.c \ - src/core/census/initialize.c \ - src/core/census/mlog.c \ - src/core/census/operation.c \ - src/core/census/placeholders.c \ - src/core/census/tracing.c \ + src/core/ext/transport/chttp2/client/insecure/channel_create.c \ + src/core/ext/transport/chttp2/client/secure/secure_channel_create.c \ + src/core/ext/transport/chttp2/server/insecure/server_chttp2.c \ + src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c \ + src/core/ext/transport/chttp2/transport/alpn.c \ + src/core/ext/transport/chttp2/transport/bin_encoder.c \ + src/core/ext/transport/chttp2/transport/chttp2_transport.c \ + src/core/ext/transport/chttp2/transport/frame_data.c \ + src/core/ext/transport/chttp2/transport/frame_goaway.c \ + src/core/ext/transport/chttp2/transport/frame_ping.c \ + src/core/ext/transport/chttp2/transport/frame_rst_stream.c \ + src/core/ext/transport/chttp2/transport/frame_settings.c \ + src/core/ext/transport/chttp2/transport/frame_window_update.c \ + src/core/ext/transport/chttp2/transport/hpack_encoder.c \ + src/core/ext/transport/chttp2/transport/hpack_parser.c \ + src/core/ext/transport/chttp2/transport/hpack_table.c \ + src/core/ext/transport/chttp2/transport/huffsyms.c \ + src/core/ext/transport/chttp2/transport/incoming_metadata.c \ + src/core/ext/transport/chttp2/transport/parsing.c \ + src/core/ext/transport/chttp2/transport/status_conversion.c \ + src/core/ext/transport/chttp2/transport/stream_lists.c \ + src/core/ext/transport/chttp2/transport/stream_map.c \ + src/core/ext/transport/chttp2/transport/timeout_encoding.c \ + src/core/ext/transport/chttp2/transport/varint.c \ + src/core/ext/transport/chttp2/transport/writing.c \ + src/core/lib/census/context.c \ + src/core/lib/census/grpc_context.c \ + src/core/lib/census/grpc_filter.c \ + src/core/lib/census/grpc_plugin.c \ + src/core/lib/census/initialize.c \ + src/core/lib/census/mlog.c \ + src/core/lib/census/operation.c \ + src/core/lib/census/placeholders.c \ + src/core/lib/census/tracing.c \ + src/core/lib/channel/channel_args.c \ + src/core/lib/channel/channel_stack.c \ + src/core/lib/channel/channel_stack_builder.c \ + src/core/lib/channel/client_channel.c \ + src/core/lib/channel/compress_filter.c \ + src/core/lib/channel/connected_channel.c \ + src/core/lib/channel/http_client_filter.c \ + src/core/lib/channel/http_server_filter.c \ + src/core/lib/channel/subchannel_call_holder.c \ + src/core/lib/client_config/client_config.c \ + src/core/lib/client_config/connector.c \ + src/core/lib/client_config/default_initial_connect_string.c \ + src/core/lib/client_config/initial_connect_string.c \ + src/core/lib/client_config/lb_policies/load_balancer_api.c \ + src/core/lib/client_config/lb_policies/pick_first.c \ + src/core/lib/client_config/lb_policies/round_robin.c \ + src/core/lib/client_config/lb_policy.c \ + src/core/lib/client_config/lb_policy_factory.c \ + src/core/lib/client_config/lb_policy_registry.c \ + src/core/lib/client_config/resolver.c \ + src/core/lib/client_config/resolver_factory.c \ + src/core/lib/client_config/resolver_registry.c \ + src/core/lib/client_config/resolvers/dns_resolver.c \ + src/core/lib/client_config/resolvers/sockaddr_resolver.c \ + src/core/lib/client_config/subchannel.c \ + src/core/lib/client_config/subchannel_factory.c \ + src/core/lib/client_config/subchannel_index.c \ + src/core/lib/client_config/uri_parser.c \ + src/core/lib/compression/compression_algorithm.c \ + src/core/lib/compression/message_compress.c \ + src/core/lib/debug/trace.c \ + src/core/lib/http/format_request.c \ + src/core/lib/http/httpcli.c \ + src/core/lib/http/httpcli_security_connector.c \ + src/core/lib/http/parser.c \ + src/core/lib/iomgr/closure.c \ + src/core/lib/iomgr/endpoint.c \ + src/core/lib/iomgr/endpoint_pair_posix.c \ + src/core/lib/iomgr/endpoint_pair_windows.c \ + src/core/lib/iomgr/exec_ctx.c \ + src/core/lib/iomgr/executor.c \ + src/core/lib/iomgr/fd_posix.c \ + src/core/lib/iomgr/iocp_windows.c \ + src/core/lib/iomgr/iomgr.c \ + src/core/lib/iomgr/iomgr_posix.c \ + src/core/lib/iomgr/iomgr_windows.c \ + src/core/lib/iomgr/pollset_multipoller_with_epoll.c \ + src/core/lib/iomgr/pollset_multipoller_with_poll_posix.c \ + src/core/lib/iomgr/pollset_posix.c \ + src/core/lib/iomgr/pollset_set_posix.c \ + src/core/lib/iomgr/pollset_set_windows.c \ + src/core/lib/iomgr/pollset_windows.c \ + src/core/lib/iomgr/resolve_address_posix.c \ + src/core/lib/iomgr/resolve_address_windows.c \ + src/core/lib/iomgr/sockaddr_utils.c \ + src/core/lib/iomgr/socket_utils_common_posix.c \ + src/core/lib/iomgr/socket_utils_linux.c \ + src/core/lib/iomgr/socket_utils_posix.c \ + src/core/lib/iomgr/socket_windows.c \ + src/core/lib/iomgr/tcp_client_posix.c \ + src/core/lib/iomgr/tcp_client_windows.c \ + src/core/lib/iomgr/tcp_posix.c \ + src/core/lib/iomgr/tcp_server_posix.c \ + src/core/lib/iomgr/tcp_server_windows.c \ + src/core/lib/iomgr/tcp_windows.c \ + src/core/lib/iomgr/time_averaged_stats.c \ + src/core/lib/iomgr/timer.c \ + src/core/lib/iomgr/timer_heap.c \ + src/core/lib/iomgr/udp_server.c \ + src/core/lib/iomgr/unix_sockets_posix.c \ + src/core/lib/iomgr/unix_sockets_posix_noop.c \ + src/core/lib/iomgr/wakeup_fd_eventfd.c \ + src/core/lib/iomgr/wakeup_fd_nospecial.c \ + src/core/lib/iomgr/wakeup_fd_pipe.c \ + src/core/lib/iomgr/wakeup_fd_posix.c \ + src/core/lib/iomgr/workqueue_posix.c \ + src/core/lib/iomgr/workqueue_windows.c \ + src/core/lib/json/json.c \ + src/core/lib/json/json_reader.c \ + src/core/lib/json/json_string.c \ + src/core/lib/json/json_writer.c \ + src/core/lib/proto/grpc/lb/v0/load_balancer.pb.c \ + src/core/lib/security/b64.c \ + src/core/lib/security/client_auth_filter.c \ + src/core/lib/security/credentials.c \ + src/core/lib/security/credentials_metadata.c \ + src/core/lib/security/credentials_posix.c \ + src/core/lib/security/credentials_win32.c \ + src/core/lib/security/google_default_credentials.c \ + src/core/lib/security/handshake.c \ + src/core/lib/security/json_token.c \ + src/core/lib/security/jwt_verifier.c \ + src/core/lib/security/secure_endpoint.c \ + src/core/lib/security/security_connector.c \ + src/core/lib/security/security_context.c \ + src/core/lib/security/server_auth_filter.c \ + src/core/lib/surface/alarm.c \ + src/core/lib/surface/api_trace.c \ + src/core/lib/surface/byte_buffer.c \ + src/core/lib/surface/byte_buffer_reader.c \ + src/core/lib/surface/call.c \ + src/core/lib/surface/call_details.c \ + src/core/lib/surface/call_log_batch.c \ + src/core/lib/surface/channel.c \ + src/core/lib/surface/channel_connectivity.c \ + src/core/lib/surface/channel_init.c \ + src/core/lib/surface/channel_ping.c \ + src/core/lib/surface/channel_stack_type.c \ + src/core/lib/surface/completion_queue.c \ + src/core/lib/surface/event_string.c \ + src/core/lib/surface/init.c \ + src/core/lib/surface/init_secure.c \ + src/core/lib/surface/lame_client.c \ + src/core/lib/surface/metadata_array.c \ + src/core/lib/surface/server.c \ + src/core/lib/surface/validate_metadata.c \ + src/core/lib/surface/version.c \ + src/core/lib/transport/byte_stream.c \ + src/core/lib/transport/connectivity_state.c \ + src/core/lib/transport/metadata.c \ + src/core/lib/transport/metadata_batch.c \ + src/core/lib/transport/static_metadata.c \ + src/core/lib/transport/transport.c \ + src/core/lib/transport/transport_op_string.c \ + src/core/lib/tsi/fake_transport_security.c \ + src/core/lib/tsi/ssl_transport_security.c \ + src/core/lib/tsi/transport_security.c \ third_party/nanopb/pb_common.c \ third_party/nanopb/pb_decode.c \ third_party/nanopb/pb_encode.c \ PUBLIC_HEADERS_C += \ + include/grpc/byte_buffer.h \ + include/grpc/byte_buffer_reader.h \ + include/grpc/census.h \ + include/grpc/compression.h \ + include/grpc/grpc.h \ include/grpc/grpc_security.h \ include/grpc/impl/codegen/byte_buffer.h \ include/grpc/impl/codegen/compression_types.h \ @@ -2561,12 +2598,7 @@ PUBLIC_HEADERS_C += \ include/grpc/impl/codegen/grpc_types.h \ include/grpc/impl/codegen/propagation_bits.h \ include/grpc/impl/codegen/status.h \ - include/grpc/byte_buffer.h \ - include/grpc/byte_buffer_reader.h \ - include/grpc/compression.h \ - include/grpc/grpc.h \ include/grpc/status.h \ - include/grpc/census.h \ LIBGRPC_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBGRPC_SRC)))) @@ -2620,17 +2652,62 @@ endif endif +LIBGRPC_CODEGEN_LIB_SRC = \ + +PUBLIC_HEADERS_C += \ + include/grpc/impl/codegen/alloc.h \ + include/grpc/impl/codegen/atm.h \ + include/grpc/impl/codegen/atm_gcc_atomic.h \ + include/grpc/impl/codegen/atm_gcc_sync.h \ + include/grpc/impl/codegen/atm_win32.h \ + include/grpc/impl/codegen/byte_buffer.h \ + include/grpc/impl/codegen/compression_types.h \ + include/grpc/impl/codegen/connectivity_state.h \ + include/grpc/impl/codegen/grpc_types.h \ + include/grpc/impl/codegen/log.h \ + include/grpc/impl/codegen/port_platform.h \ + include/grpc/impl/codegen/propagation_bits.h \ + include/grpc/impl/codegen/slice.h \ + include/grpc/impl/codegen/slice_buffer.h \ + include/grpc/impl/codegen/status.h \ + include/grpc/impl/codegen/sync.h \ + include/grpc/impl/codegen/sync_generic.h \ + include/grpc/impl/codegen/sync_posix.h \ + include/grpc/impl/codegen/sync_win32.h \ + include/grpc/impl/codegen/time.h \ + +LIBGRPC_CODEGEN_LIB_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBGRPC_CODEGEN_LIB_SRC)))) + + +$(LIBDIR)/$(CONFIG)/libgrpc_codegen_lib.a: $(ZLIB_DEP) $(LIBGRPC_CODEGEN_LIB_OBJS) + $(E) "[AR] Creating $@" + $(Q) mkdir -p `dirname $@` + $(Q) rm -f $(LIBDIR)/$(CONFIG)/libgrpc_codegen_lib.a + $(Q) $(AR) $(LIBDIR)/$(CONFIG)/libgrpc_codegen_lib.a $(LIBGRPC_CODEGEN_LIB_OBJS) +ifeq ($(SYSTEM),Darwin) + $(Q) ranlib -no_warning_for_no_symbols $(LIBDIR)/$(CONFIG)/libgrpc_codegen_lib.a +endif + + + + +ifneq ($(NO_DEPS),true) +-include $(LIBGRPC_CODEGEN_LIB_OBJS:.o=.dep) +endif + + LIBGRPC_TEST_UTIL_SRC = \ + test/core/end2end/cq_verifier.c \ test/core/end2end/data/server1_cert.c \ test/core/end2end/data/server1_key.c \ test/core/end2end/data/test_root_cert.c \ - test/core/security/oauth2_utils.c \ - test/core/end2end/cq_verifier.c \ test/core/end2end/fixtures/proxy.c \ test/core/iomgr/endpoint_tests.c \ + test/core/security/oauth2_utils.c \ test/core/util/grpc_profiler.c \ test/core/util/parse_hexstring.c \ test/core/util/port_posix.c \ + test/core/util/port_server_client.c \ test/core/util/port_windows.c \ test/core/util/slice_splitter.c \ @@ -2677,6 +2754,7 @@ LIBGRPC_TEST_UTIL_UNSECURE_SRC = \ test/core/util/grpc_profiler.c \ test/core/util/parse_hexstring.c \ test/core/util/port_posix.c \ + test/core/util/port_server_client.c \ test/core/util/port_windows.c \ test/core/util/slice_splitter.c \ @@ -2703,143 +2781,147 @@ endif LIBGRPC_UNSECURE_SRC = \ - src/core/surface/init_unsecure.c \ - src/core/census/grpc_context.c \ - src/core/census/grpc_filter.c \ - src/core/channel/channel_args.c \ - src/core/channel/channel_stack.c \ - src/core/channel/client_channel.c \ - src/core/channel/client_uchannel.c \ - src/core/channel/compress_filter.c \ - src/core/channel/connected_channel.c \ - src/core/channel/http_client_filter.c \ - src/core/channel/http_server_filter.c \ - src/core/channel/subchannel_call_holder.c \ - src/core/client_config/client_config.c \ - src/core/client_config/connector.c \ - src/core/client_config/default_initial_connect_string.c \ - src/core/client_config/initial_connect_string.c \ - src/core/client_config/lb_policies/load_balancer_api.c \ - src/core/client_config/lb_policies/pick_first.c \ - src/core/client_config/lb_policies/round_robin.c \ - src/core/client_config/lb_policy.c \ - src/core/client_config/lb_policy_factory.c \ - src/core/client_config/lb_policy_registry.c \ - src/core/client_config/resolver.c \ - src/core/client_config/resolver_factory.c \ - src/core/client_config/resolver_registry.c \ - src/core/client_config/resolvers/dns_resolver.c \ - src/core/client_config/resolvers/sockaddr_resolver.c \ - src/core/client_config/subchannel.c \ - src/core/client_config/subchannel_factory.c \ - src/core/client_config/subchannel_index.c \ - src/core/client_config/uri_parser.c \ - src/core/compression/compression_algorithm.c \ - src/core/compression/message_compress.c \ - src/core/debug/trace.c \ - src/core/httpcli/format_request.c \ - src/core/httpcli/httpcli.c \ - src/core/httpcli/parser.c \ - src/core/iomgr/closure.c \ - src/core/iomgr/endpoint.c \ - src/core/iomgr/endpoint_pair_posix.c \ - src/core/iomgr/endpoint_pair_windows.c \ - src/core/iomgr/exec_ctx.c \ - src/core/iomgr/executor.c \ - src/core/iomgr/fd_posix.c \ - src/core/iomgr/iocp_windows.c \ - src/core/iomgr/iomgr.c \ - src/core/iomgr/iomgr_posix.c \ - src/core/iomgr/iomgr_windows.c \ - src/core/iomgr/pollset_multipoller_with_epoll.c \ - src/core/iomgr/pollset_multipoller_with_poll_posix.c \ - src/core/iomgr/pollset_posix.c \ - src/core/iomgr/pollset_set_posix.c \ - src/core/iomgr/pollset_set_windows.c \ - src/core/iomgr/pollset_windows.c \ - src/core/iomgr/resolve_address_posix.c \ - src/core/iomgr/resolve_address_windows.c \ - src/core/iomgr/sockaddr_utils.c \ - src/core/iomgr/socket_utils_common_posix.c \ - src/core/iomgr/socket_utils_linux.c \ - src/core/iomgr/socket_utils_posix.c \ - src/core/iomgr/socket_windows.c \ - src/core/iomgr/tcp_client_posix.c \ - src/core/iomgr/tcp_client_windows.c \ - src/core/iomgr/tcp_posix.c \ - src/core/iomgr/tcp_server_posix.c \ - src/core/iomgr/tcp_server_windows.c \ - src/core/iomgr/tcp_windows.c \ - src/core/iomgr/time_averaged_stats.c \ - src/core/iomgr/timer.c \ - src/core/iomgr/timer_heap.c \ - src/core/iomgr/udp_server.c \ - src/core/iomgr/wakeup_fd_eventfd.c \ - src/core/iomgr/wakeup_fd_nospecial.c \ - src/core/iomgr/wakeup_fd_pipe.c \ - src/core/iomgr/wakeup_fd_posix.c \ - src/core/iomgr/workqueue_posix.c \ - src/core/iomgr/workqueue_windows.c \ - src/core/json/json.c \ - src/core/json/json_reader.c \ - src/core/json/json_string.c \ - src/core/json/json_writer.c \ - src/core/proto/grpc/lb/v0/load_balancer.pb.c \ - src/core/surface/alarm.c \ - src/core/surface/api_trace.c \ - src/core/surface/byte_buffer.c \ - src/core/surface/byte_buffer_reader.c \ - src/core/surface/call.c \ - src/core/surface/call_details.c \ - src/core/surface/call_log_batch.c \ - src/core/surface/channel.c \ - src/core/surface/channel_connectivity.c \ - src/core/surface/channel_create.c \ - src/core/surface/channel_ping.c \ - src/core/surface/completion_queue.c \ - src/core/surface/event_string.c \ - src/core/surface/init.c \ - src/core/surface/lame_client.c \ - src/core/surface/metadata_array.c \ - src/core/surface/server.c \ - src/core/surface/server_chttp2.c \ - src/core/surface/server_create.c \ - src/core/surface/validate_metadata.c \ - src/core/surface/version.c \ - src/core/transport/byte_stream.c \ - src/core/transport/chttp2/alpn.c \ - src/core/transport/chttp2/bin_encoder.c \ - src/core/transport/chttp2/frame_data.c \ - src/core/transport/chttp2/frame_goaway.c \ - src/core/transport/chttp2/frame_ping.c \ - src/core/transport/chttp2/frame_rst_stream.c \ - src/core/transport/chttp2/frame_settings.c \ - src/core/transport/chttp2/frame_window_update.c \ - src/core/transport/chttp2/hpack_encoder.c \ - src/core/transport/chttp2/hpack_parser.c \ - src/core/transport/chttp2/hpack_table.c \ - src/core/transport/chttp2/huffsyms.c \ - src/core/transport/chttp2/incoming_metadata.c \ - src/core/transport/chttp2/parsing.c \ - src/core/transport/chttp2/status_conversion.c \ - src/core/transport/chttp2/stream_lists.c \ - src/core/transport/chttp2/stream_map.c \ - src/core/transport/chttp2/timeout_encoding.c \ - src/core/transport/chttp2/varint.c \ - src/core/transport/chttp2/writing.c \ - src/core/transport/chttp2_transport.c \ - src/core/transport/connectivity_state.c \ - src/core/transport/metadata.c \ - src/core/transport/metadata_batch.c \ - src/core/transport/static_metadata.c \ - src/core/transport/transport.c \ - src/core/transport/transport_op_string.c \ - src/core/census/context.c \ - src/core/census/initialize.c \ - src/core/census/mlog.c \ - src/core/census/operation.c \ - src/core/census/placeholders.c \ - src/core/census/tracing.c \ + src/core/ext/transport/chttp2/client/insecure/channel_create.c \ + src/core/ext/transport/chttp2/server/insecure/server_chttp2.c \ + src/core/ext/transport/chttp2/transport/alpn.c \ + src/core/ext/transport/chttp2/transport/bin_encoder.c \ + src/core/ext/transport/chttp2/transport/chttp2_transport.c \ + src/core/ext/transport/chttp2/transport/frame_data.c \ + src/core/ext/transport/chttp2/transport/frame_goaway.c \ + src/core/ext/transport/chttp2/transport/frame_ping.c \ + src/core/ext/transport/chttp2/transport/frame_rst_stream.c \ + src/core/ext/transport/chttp2/transport/frame_settings.c \ + src/core/ext/transport/chttp2/transport/frame_window_update.c \ + src/core/ext/transport/chttp2/transport/hpack_encoder.c \ + src/core/ext/transport/chttp2/transport/hpack_parser.c \ + src/core/ext/transport/chttp2/transport/hpack_table.c \ + src/core/ext/transport/chttp2/transport/huffsyms.c \ + src/core/ext/transport/chttp2/transport/incoming_metadata.c \ + src/core/ext/transport/chttp2/transport/parsing.c \ + src/core/ext/transport/chttp2/transport/status_conversion.c \ + src/core/ext/transport/chttp2/transport/stream_lists.c \ + src/core/ext/transport/chttp2/transport/stream_map.c \ + src/core/ext/transport/chttp2/transport/timeout_encoding.c \ + src/core/ext/transport/chttp2/transport/varint.c \ + src/core/ext/transport/chttp2/transport/writing.c \ + src/core/lib/census/context.c \ + src/core/lib/census/grpc_context.c \ + src/core/lib/census/grpc_filter.c \ + src/core/lib/census/grpc_plugin.c \ + src/core/lib/census/initialize.c \ + src/core/lib/census/mlog.c \ + src/core/lib/census/operation.c \ + src/core/lib/census/placeholders.c \ + src/core/lib/census/tracing.c \ + src/core/lib/channel/channel_args.c \ + src/core/lib/channel/channel_stack.c \ + src/core/lib/channel/channel_stack_builder.c \ + src/core/lib/channel/client_channel.c \ + src/core/lib/channel/compress_filter.c \ + src/core/lib/channel/connected_channel.c \ + src/core/lib/channel/http_client_filter.c \ + src/core/lib/channel/http_server_filter.c \ + src/core/lib/channel/subchannel_call_holder.c \ + src/core/lib/client_config/client_config.c \ + src/core/lib/client_config/connector.c \ + src/core/lib/client_config/default_initial_connect_string.c \ + src/core/lib/client_config/initial_connect_string.c \ + src/core/lib/client_config/lb_policies/load_balancer_api.c \ + src/core/lib/client_config/lb_policies/pick_first.c \ + src/core/lib/client_config/lb_policies/round_robin.c \ + src/core/lib/client_config/lb_policy.c \ + src/core/lib/client_config/lb_policy_factory.c \ + src/core/lib/client_config/lb_policy_registry.c \ + src/core/lib/client_config/resolver.c \ + src/core/lib/client_config/resolver_factory.c \ + src/core/lib/client_config/resolver_registry.c \ + src/core/lib/client_config/resolvers/dns_resolver.c \ + src/core/lib/client_config/resolvers/sockaddr_resolver.c \ + src/core/lib/client_config/subchannel.c \ + src/core/lib/client_config/subchannel_factory.c \ + src/core/lib/client_config/subchannel_index.c \ + src/core/lib/client_config/uri_parser.c \ + src/core/lib/compression/compression_algorithm.c \ + src/core/lib/compression/message_compress.c \ + src/core/lib/debug/trace.c \ + src/core/lib/http/format_request.c \ + src/core/lib/http/httpcli.c \ + src/core/lib/http/parser.c \ + src/core/lib/iomgr/closure.c \ + src/core/lib/iomgr/endpoint.c \ + src/core/lib/iomgr/endpoint_pair_posix.c \ + src/core/lib/iomgr/endpoint_pair_windows.c \ + src/core/lib/iomgr/exec_ctx.c \ + src/core/lib/iomgr/executor.c \ + src/core/lib/iomgr/fd_posix.c \ + src/core/lib/iomgr/iocp_windows.c \ + src/core/lib/iomgr/iomgr.c \ + src/core/lib/iomgr/iomgr_posix.c \ + src/core/lib/iomgr/iomgr_windows.c \ + src/core/lib/iomgr/pollset_multipoller_with_epoll.c \ + src/core/lib/iomgr/pollset_multipoller_with_poll_posix.c \ + src/core/lib/iomgr/pollset_posix.c \ + src/core/lib/iomgr/pollset_set_posix.c \ + src/core/lib/iomgr/pollset_set_windows.c \ + src/core/lib/iomgr/pollset_windows.c \ + src/core/lib/iomgr/resolve_address_posix.c \ + src/core/lib/iomgr/resolve_address_windows.c \ + src/core/lib/iomgr/sockaddr_utils.c \ + src/core/lib/iomgr/socket_utils_common_posix.c \ + src/core/lib/iomgr/socket_utils_linux.c \ + src/core/lib/iomgr/socket_utils_posix.c \ + src/core/lib/iomgr/socket_windows.c \ + src/core/lib/iomgr/tcp_client_posix.c \ + src/core/lib/iomgr/tcp_client_windows.c \ + src/core/lib/iomgr/tcp_posix.c \ + src/core/lib/iomgr/tcp_server_posix.c \ + src/core/lib/iomgr/tcp_server_windows.c \ + src/core/lib/iomgr/tcp_windows.c \ + src/core/lib/iomgr/time_averaged_stats.c \ + src/core/lib/iomgr/timer.c \ + src/core/lib/iomgr/timer_heap.c \ + src/core/lib/iomgr/udp_server.c \ + src/core/lib/iomgr/unix_sockets_posix.c \ + src/core/lib/iomgr/unix_sockets_posix_noop.c \ + src/core/lib/iomgr/wakeup_fd_eventfd.c \ + src/core/lib/iomgr/wakeup_fd_nospecial.c \ + src/core/lib/iomgr/wakeup_fd_pipe.c \ + src/core/lib/iomgr/wakeup_fd_posix.c \ + src/core/lib/iomgr/workqueue_posix.c \ + src/core/lib/iomgr/workqueue_windows.c \ + src/core/lib/json/json.c \ + src/core/lib/json/json_reader.c \ + src/core/lib/json/json_string.c \ + src/core/lib/json/json_writer.c \ + src/core/lib/proto/grpc/lb/v0/load_balancer.pb.c \ + src/core/lib/surface/alarm.c \ + src/core/lib/surface/api_trace.c \ + src/core/lib/surface/byte_buffer.c \ + src/core/lib/surface/byte_buffer_reader.c \ + src/core/lib/surface/call.c \ + src/core/lib/surface/call_details.c \ + src/core/lib/surface/call_log_batch.c \ + src/core/lib/surface/channel.c \ + src/core/lib/surface/channel_connectivity.c \ + src/core/lib/surface/channel_init.c \ + src/core/lib/surface/channel_ping.c \ + src/core/lib/surface/channel_stack_type.c \ + src/core/lib/surface/completion_queue.c \ + src/core/lib/surface/event_string.c \ + src/core/lib/surface/init.c \ + src/core/lib/surface/init_unsecure.c \ + src/core/lib/surface/lame_client.c \ + src/core/lib/surface/metadata_array.c \ + src/core/lib/surface/server.c \ + src/core/lib/surface/validate_metadata.c \ + src/core/lib/surface/version.c \ + src/core/lib/transport/byte_stream.c \ + src/core/lib/transport/connectivity_state.c \ + src/core/lib/transport/metadata.c \ + src/core/lib/transport/metadata_batch.c \ + src/core/lib/transport/static_metadata.c \ + src/core/lib/transport/transport.c \ + src/core/lib/transport/transport_op_string.c \ third_party/nanopb/pb_common.c \ third_party/nanopb/pb_decode.c \ third_party/nanopb/pb_encode.c \ @@ -2847,16 +2929,16 @@ LIBGRPC_UNSECURE_SRC = \ PUBLIC_HEADERS_C += \ include/grpc/byte_buffer.h \ include/grpc/byte_buffer_reader.h \ + include/grpc/census.h \ include/grpc/compression.h \ include/grpc/grpc.h \ - include/grpc/status.h \ include/grpc/impl/codegen/byte_buffer.h \ include/grpc/impl/codegen/compression_types.h \ include/grpc/impl/codegen/connectivity_state.h \ include/grpc/impl/codegen/grpc_types.h \ include/grpc/impl/codegen/propagation_bits.h \ include/grpc/impl/codegen/status.h \ - include/grpc/census.h \ + include/grpc/status.h \ LIBGRPC_UNSECURE_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBGRPC_UNSECURE_SRC)))) @@ -2896,7 +2978,7 @@ endif LIBGRPC_ZOOKEEPER_SRC = \ - src/core/client_config/resolvers/zookeeper_resolver.c \ + src/core/lib/client_config/resolvers/zookeeper_resolver.c \ PUBLIC_HEADERS_C += \ include/grpc/grpc_zookeeper.h \ @@ -2941,6 +3023,7 @@ endif LIBRECONNECT_SERVER_SRC = \ test/core/util/reconnect_server.c \ +PUBLIC_HEADERS_C += \ LIBRECONNECT_SERVER_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBRECONNECT_SERVER_SRC)))) @@ -2979,6 +3062,7 @@ endif LIBTEST_TCP_SERVER_SRC = \ test/core/util/test_tcp_server.c \ +PUBLIC_HEADERS_C += \ LIBTEST_TCP_SERVER_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBTEST_TCP_SERVER_SRC)))) @@ -3015,12 +3099,6 @@ endif LIBGRPC++_SRC = \ - src/cpp/client/secure_credentials.cc \ - src/cpp/common/auth_property_iterator.cc \ - src/cpp/common/secure_auth_context.cc \ - src/cpp/common/secure_channel_arguments.cc \ - src/cpp/common/secure_create_auth_context.cc \ - src/cpp/server/secure_server_credentials.cc \ src/cpp/client/channel.cc \ src/cpp/client/client_context.cc \ src/cpp/client/create_channel.cc \ @@ -3028,15 +3106,21 @@ LIBGRPC++_SRC = \ src/cpp/client/credentials.cc \ src/cpp/client/generic_stub.cc \ src/cpp/client/insecure_credentials.cc \ - src/cpp/common/call.cc \ + src/cpp/client/secure_credentials.cc \ + src/cpp/codegen/codegen_init.cc \ + src/cpp/common/auth_property_iterator.cc \ src/cpp/common/channel_arguments.cc \ src/cpp/common/completion_queue.cc \ + src/cpp/common/core_codegen.cc \ src/cpp/common/rpc_method.cc \ - src/cpp/proto/proto_utils.cc \ + src/cpp/common/secure_auth_context.cc \ + src/cpp/common/secure_channel_arguments.cc \ + src/cpp/common/secure_create_auth_context.cc \ src/cpp/server/async_generic_service.cc \ src/cpp/server/create_default_thread_pool.cc \ src/cpp/server/dynamic_thread_pool.cc \ src/cpp/server/insecure_server_credentials.cc \ + src/cpp/server/secure_server_credentials.cc \ src/cpp/server/server.cc \ src/cpp/server/server_builder.cc \ src/cpp/server/server_context.cc \ @@ -3046,7 +3130,6 @@ LIBGRPC++_SRC = \ src/cpp/util/status.cc \ src/cpp/util/string_ref.cc \ src/cpp/util/time.cc \ - src/cpp/codegen/grpc_library.cc \ PUBLIC_HEADERS_CXX += \ include/grpc++/alarm.h \ @@ -3059,6 +3142,37 @@ PUBLIC_HEADERS_CXX += \ include/grpc++/grpc++.h \ include/grpc++/impl/call.h \ include/grpc++/impl/client_unary_call.h \ + include/grpc++/impl/codegen/async_stream.h \ + include/grpc++/impl/codegen/async_unary_call.h \ + include/grpc++/impl/codegen/call.h \ + include/grpc++/impl/codegen/call_hook.h \ + include/grpc++/impl/codegen/channel_interface.h \ + include/grpc++/impl/codegen/client_context.h \ + include/grpc++/impl/codegen/client_unary_call.h \ + include/grpc++/impl/codegen/completion_queue.h \ + include/grpc++/impl/codegen/completion_queue_tag.h \ + include/grpc++/impl/codegen/config.h \ + include/grpc++/impl/codegen/config_protobuf.h \ + include/grpc++/impl/codegen/core_codegen_interface.h \ + include/grpc++/impl/codegen/grpc_library.h \ + include/grpc++/impl/codegen/method_handler_impl.h \ + include/grpc++/impl/codegen/proto_utils.h \ + include/grpc++/impl/codegen/rpc_method.h \ + include/grpc++/impl/codegen/rpc_service_method.h \ + include/grpc++/impl/codegen/security/auth_context.h \ + include/grpc++/impl/codegen/serialization_traits.h \ + include/grpc++/impl/codegen/server_context.h \ + include/grpc++/impl/codegen/server_interface.h \ + include/grpc++/impl/codegen/service_type.h \ + include/grpc++/impl/codegen/status.h \ + include/grpc++/impl/codegen/status_code_enum.h \ + include/grpc++/impl/codegen/string_ref.h \ + include/grpc++/impl/codegen/stub_options.h \ + include/grpc++/impl/codegen/sync.h \ + include/grpc++/impl/codegen/sync_cxx11.h \ + include/grpc++/impl/codegen/sync_no_cxx11.h \ + include/grpc++/impl/codegen/sync_stream.h \ + include/grpc++/impl/codegen/time.h \ include/grpc++/impl/grpc_library.h \ include/grpc++/impl/method_handler_impl.h \ include/grpc++/impl/proto_utils.h \ @@ -3093,6 +3207,74 @@ PUBLIC_HEADERS_CXX += \ include/grpc++/support/stub_options.h \ include/grpc++/support/sync_stream.h \ include/grpc++/support/time.h \ + +LIBGRPC++_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBGRPC++_SRC)))) + + +ifeq ($(NO_SECURE),true) + +# You can't build secure libraries if you don't have OpenSSL. + +$(LIBDIR)/$(CONFIG)/libgrpc++.a: openssl_dep_error + +$(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc++$(SHARED_VERSION).$(SHARED_EXT): openssl_dep_error + +else + +ifeq ($(NO_PROTOBUF),true) + +# You can't build a C++ library if you don't have protobuf - a bit overreached, but still okay. + +$(LIBDIR)/$(CONFIG)/libgrpc++.a: protobuf_dep_error + +$(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc++$(SHARED_VERSION).$(SHARED_EXT): protobuf_dep_error + +else + +$(LIBDIR)/$(CONFIG)/libgrpc++.a: $(ZLIB_DEP) $(OPENSSL_DEP) $(PROTOBUF_DEP) $(LIBGRPC++_OBJS) $(LIBGPR_OBJS) $(ZLIB_MERGE_OBJS) + $(E) "[AR] Creating $@" + $(Q) mkdir -p `dirname $@` + $(Q) rm -f $(LIBDIR)/$(CONFIG)/libgrpc++.a + $(Q) $(AR) $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBGRPC++_OBJS) $(LIBGPR_OBJS) $(ZLIB_MERGE_OBJS) +ifeq ($(SYSTEM),Darwin) + $(Q) ranlib -no_warning_for_no_symbols $(LIBDIR)/$(CONFIG)/libgrpc++.a +endif + + + +ifeq ($(SYSTEM),MINGW32) +$(LIBDIR)/$(CONFIG)/grpc++$(SHARED_VERSION).$(SHARED_EXT): $(LIBGRPC++_OBJS) $(ZLIB_DEP) $(PROTOBUF_DEP) $(LIBDIR)/$(CONFIG)/grpc.$(SHARED_EXT) $(OPENSSL_DEP) + $(E) "[LD] Linking $@" + $(Q) mkdir -p `dirname $@` + $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared grpc++.def -Wl,--output-def=$(LIBDIR)/$(CONFIG)/grpc++$(SHARED_VERSION).def -Wl,--out-implib=$(LIBDIR)/$(CONFIG)/libgrpc++$(SHARED_VERSION)-dll.a -o $(LIBDIR)/$(CONFIG)/grpc++$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC++_OBJS) $(LDLIBS) $(ZLIB_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) -lgrpc-imp +else +$(LIBDIR)/$(CONFIG)/libgrpc++$(SHARED_VERSION).$(SHARED_EXT): $(LIBGRPC++_OBJS) $(ZLIB_DEP) $(PROTOBUF_DEP) $(LIBDIR)/$(CONFIG)/libgrpc.$(SHARED_EXT) $(OPENSSL_DEP) + $(E) "[LD] Linking $@" + $(Q) mkdir -p `dirname $@` +ifeq ($(SYSTEM),Darwin) + $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -install_name $(SHARED_PREFIX)grpc++$(SHARED_VERSION).$(SHARED_EXT) -dynamiclib -o $(LIBDIR)/$(CONFIG)/libgrpc++$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC++_OBJS) $(LDLIBS) $(ZLIB_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) -lgrpc +else + $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libgrpc++.so.0 -o $(LIBDIR)/$(CONFIG)/libgrpc++$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC++_OBJS) $(LDLIBS) $(ZLIB_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) -lgrpc + $(Q) ln -sf $(SHARED_PREFIX)grpc++$(SHARED_VERSION).$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/libgrpc++$(SHARED_VERSION).so.0 + $(Q) ln -sf $(SHARED_PREFIX)grpc++$(SHARED_VERSION).$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/libgrpc++$(SHARED_VERSION).so +endif +endif + +endif + +endif + +ifneq ($(NO_SECURE),true) +ifneq ($(NO_DEPS),true) +-include $(LIBGRPC++_OBJS:.o=.dep) +endif +endif + + +LIBGRPC++_CODEGEN_LIB_SRC = \ + src/cpp/codegen/codegen_init.cc \ + +PUBLIC_HEADERS_CXX += \ include/grpc++/impl/codegen/async_stream.h \ include/grpc++/impl/codegen/async_unary_call.h \ include/grpc++/impl/codegen/call.h \ @@ -3104,6 +3286,7 @@ PUBLIC_HEADERS_CXX += \ include/grpc++/impl/codegen/completion_queue_tag.h \ include/grpc++/impl/codegen/config.h \ include/grpc++/impl/codegen/config_protobuf.h \ + include/grpc++/impl/codegen/core_codegen_interface.h \ include/grpc++/impl/codegen/grpc_library.h \ include/grpc++/impl/codegen/method_handler_impl.h \ include/grpc++/impl/codegen/proto_utils.h \ @@ -3123,73 +3306,80 @@ PUBLIC_HEADERS_CXX += \ include/grpc++/impl/codegen/sync_no_cxx11.h \ include/grpc++/impl/codegen/sync_stream.h \ include/grpc++/impl/codegen/time.h \ + include/grpc/impl/codegen/alloc.h \ + include/grpc/impl/codegen/atm.h \ + include/grpc/impl/codegen/atm_gcc_atomic.h \ + include/grpc/impl/codegen/atm_gcc_sync.h \ + include/grpc/impl/codegen/atm_win32.h \ + include/grpc/impl/codegen/byte_buffer.h \ + include/grpc/impl/codegen/compression_types.h \ + include/grpc/impl/codegen/connectivity_state.h \ + include/grpc/impl/codegen/grpc_types.h \ + include/grpc/impl/codegen/log.h \ + include/grpc/impl/codegen/port_platform.h \ + include/grpc/impl/codegen/propagation_bits.h \ + include/grpc/impl/codegen/slice.h \ + include/grpc/impl/codegen/slice_buffer.h \ + include/grpc/impl/codegen/status.h \ + include/grpc/impl/codegen/sync.h \ + include/grpc/impl/codegen/sync_generic.h \ + include/grpc/impl/codegen/sync_posix.h \ + include/grpc/impl/codegen/sync_win32.h \ + include/grpc/impl/codegen/time.h \ -LIBGRPC++_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBGRPC++_SRC)))) - - -ifeq ($(NO_SECURE),true) - -# You can't build secure libraries if you don't have OpenSSL. - -$(LIBDIR)/$(CONFIG)/libgrpc++.a: openssl_dep_error - -$(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc++$(SHARED_VERSION).$(SHARED_EXT): openssl_dep_error +LIBGRPC++_CODEGEN_LIB_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBGRPC++_CODEGEN_LIB_SRC)))) -else ifeq ($(NO_PROTOBUF),true) # You can't build a C++ library if you don't have protobuf - a bit overreached, but still okay. -$(LIBDIR)/$(CONFIG)/libgrpc++.a: protobuf_dep_error +$(LIBDIR)/$(CONFIG)/libgrpc++_codegen_lib.a: protobuf_dep_error -$(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc++$(SHARED_VERSION).$(SHARED_EXT): protobuf_dep_error +$(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc++_codegen_lib$(SHARED_VERSION).$(SHARED_EXT): protobuf_dep_error else -$(LIBDIR)/$(CONFIG)/libgrpc++.a: $(ZLIB_DEP) $(OPENSSL_DEP) $(PROTOBUF_DEP) $(LIBGRPC++_OBJS) $(LIBGPR_OBJS) $(ZLIB_MERGE_OBJS) +$(LIBDIR)/$(CONFIG)/libgrpc++_codegen_lib.a: $(ZLIB_DEP) $(PROTOBUF_DEP) $(LIBGRPC++_CODEGEN_LIB_OBJS) $(E) "[AR] Creating $@" $(Q) mkdir -p `dirname $@` - $(Q) rm -f $(LIBDIR)/$(CONFIG)/libgrpc++.a - $(Q) $(AR) $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBGRPC++_OBJS) $(LIBGPR_OBJS) $(ZLIB_MERGE_OBJS) + $(Q) rm -f $(LIBDIR)/$(CONFIG)/libgrpc++_codegen_lib.a + $(Q) $(AR) $(LIBDIR)/$(CONFIG)/libgrpc++_codegen_lib.a $(LIBGRPC++_CODEGEN_LIB_OBJS) ifeq ($(SYSTEM),Darwin) - $(Q) ranlib -no_warning_for_no_symbols $(LIBDIR)/$(CONFIG)/libgrpc++.a + $(Q) ranlib -no_warning_for_no_symbols $(LIBDIR)/$(CONFIG)/libgrpc++_codegen_lib.a endif ifeq ($(SYSTEM),MINGW32) -$(LIBDIR)/$(CONFIG)/grpc++$(SHARED_VERSION).$(SHARED_EXT): $(LIBGRPC++_OBJS) $(ZLIB_DEP) $(PROTOBUF_DEP) $(LIBDIR)/$(CONFIG)/grpc.$(SHARED_EXT) $(OPENSSL_DEP) +$(LIBDIR)/$(CONFIG)/grpc++_codegen_lib$(SHARED_VERSION).$(SHARED_EXT): $(LIBGRPC++_CODEGEN_LIB_OBJS) $(ZLIB_DEP) $(PROTOBUF_DEP) $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared grpc++.def -Wl,--output-def=$(LIBDIR)/$(CONFIG)/grpc++$(SHARED_VERSION).def -Wl,--out-implib=$(LIBDIR)/$(CONFIG)/libgrpc++$(SHARED_VERSION)-dll.a -o $(LIBDIR)/$(CONFIG)/grpc++$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC++_OBJS) $(LDLIBS) $(ZLIB_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) -lgrpc-imp + $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared grpc++_codegen_lib.def -Wl,--output-def=$(LIBDIR)/$(CONFIG)/grpc++_codegen_lib$(SHARED_VERSION).def -Wl,--out-implib=$(LIBDIR)/$(CONFIG)/libgrpc++_codegen_lib$(SHARED_VERSION)-dll.a -o $(LIBDIR)/$(CONFIG)/grpc++_codegen_lib$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC++_CODEGEN_LIB_OBJS) $(LDLIBS) $(ZLIB_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) else -$(LIBDIR)/$(CONFIG)/libgrpc++$(SHARED_VERSION).$(SHARED_EXT): $(LIBGRPC++_OBJS) $(ZLIB_DEP) $(PROTOBUF_DEP) $(LIBDIR)/$(CONFIG)/libgrpc.$(SHARED_EXT) $(OPENSSL_DEP) +$(LIBDIR)/$(CONFIG)/libgrpc++_codegen_lib$(SHARED_VERSION).$(SHARED_EXT): $(LIBGRPC++_CODEGEN_LIB_OBJS) $(ZLIB_DEP) $(PROTOBUF_DEP) $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` ifeq ($(SYSTEM),Darwin) - $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -install_name $(SHARED_PREFIX)grpc++$(SHARED_VERSION).$(SHARED_EXT) -dynamiclib -o $(LIBDIR)/$(CONFIG)/libgrpc++$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC++_OBJS) $(LDLIBS) $(ZLIB_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) -lgrpc + $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -install_name $(SHARED_PREFIX)grpc++_codegen_lib$(SHARED_VERSION).$(SHARED_EXT) -dynamiclib -o $(LIBDIR)/$(CONFIG)/libgrpc++_codegen_lib$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC++_CODEGEN_LIB_OBJS) $(LDLIBS) $(ZLIB_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) else - $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libgrpc++.so.0 -o $(LIBDIR)/$(CONFIG)/libgrpc++$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC++_OBJS) $(LDLIBS) $(ZLIB_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) -lgrpc - $(Q) ln -sf $(SHARED_PREFIX)grpc++$(SHARED_VERSION).$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/libgrpc++$(SHARED_VERSION).so.0 - $(Q) ln -sf $(SHARED_PREFIX)grpc++$(SHARED_VERSION).$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/libgrpc++$(SHARED_VERSION).so -endif + $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libgrpc++_codegen_lib.so.0 -o $(LIBDIR)/$(CONFIG)/libgrpc++_codegen_lib$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC++_CODEGEN_LIB_OBJS) $(LDLIBS) $(ZLIB_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) + $(Q) ln -sf $(SHARED_PREFIX)grpc++_codegen_lib$(SHARED_VERSION).$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/libgrpc++_codegen_lib$(SHARED_VERSION).so.0 + $(Q) ln -sf $(SHARED_PREFIX)grpc++_codegen_lib$(SHARED_VERSION).$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/libgrpc++_codegen_lib$(SHARED_VERSION).so endif - endif endif -ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(LIBGRPC++_OBJS:.o=.dep) -endif +-include $(LIBGRPC++_CODEGEN_LIB_OBJS:.o=.dep) endif LIBGRPC++_TEST_CONFIG_SRC = \ test/cpp/util/test_config.cc \ +PUBLIC_HEADERS_CXX += \ LIBGRPC++_TEST_CONFIG_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBGRPC++_TEST_CONFIG_SRC)))) @@ -3236,9 +3426,9 @@ endif LIBGRPC++_TEST_UTIL_SRC = \ - $(GENDIR)/src/proto/grpc/testing/echo_messages.pb.cc $(GENDIR)/src/proto/grpc/testing/echo_messages.grpc.pb.cc \ - $(GENDIR)/src/proto/grpc/testing/echo.pb.cc $(GENDIR)/src/proto/grpc/testing/echo.grpc.pb.cc \ $(GENDIR)/src/proto/grpc/testing/duplicate/echo_duplicate.pb.cc $(GENDIR)/src/proto/grpc/testing/duplicate/echo_duplicate.grpc.pb.cc \ + $(GENDIR)/src/proto/grpc/testing/echo.pb.cc $(GENDIR)/src/proto/grpc/testing/echo.grpc.pb.cc \ + $(GENDIR)/src/proto/grpc/testing/echo_messages.pb.cc $(GENDIR)/src/proto/grpc/testing/echo_messages.grpc.pb.cc \ test/cpp/end2end/test_service_impl.cc \ test/cpp/util/byte_buffer_proto_helper.cc \ test/cpp/util/cli_call.cc \ @@ -3247,6 +3437,7 @@ LIBGRPC++_TEST_UTIL_SRC = \ test/cpp/util/subprocess.cc \ test/cpp/util/test_credentials_provider.cc \ +PUBLIC_HEADERS_CXX += \ LIBGRPC++_TEST_UTIL_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBGRPC++_TEST_UTIL_SRC)))) @@ -3290,17 +3481,16 @@ ifneq ($(NO_DEPS),true) -include $(LIBGRPC++_TEST_UTIL_OBJS:.o=.dep) endif endif -$(OBJDIR)/$(CONFIG)/test/cpp/end2end/test_service_impl.o: $(GENDIR)/src/proto/grpc/testing/echo_messages.pb.cc $(GENDIR)/src/proto/grpc/testing/echo_messages.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/echo.pb.cc $(GENDIR)/src/proto/grpc/testing/echo.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/duplicate/echo_duplicate.pb.cc $(GENDIR)/src/proto/grpc/testing/duplicate/echo_duplicate.grpc.pb.cc -$(OBJDIR)/$(CONFIG)/test/cpp/util/byte_buffer_proto_helper.o: $(GENDIR)/src/proto/grpc/testing/echo_messages.pb.cc $(GENDIR)/src/proto/grpc/testing/echo_messages.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/echo.pb.cc $(GENDIR)/src/proto/grpc/testing/echo.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/duplicate/echo_duplicate.pb.cc $(GENDIR)/src/proto/grpc/testing/duplicate/echo_duplicate.grpc.pb.cc -$(OBJDIR)/$(CONFIG)/test/cpp/util/cli_call.o: $(GENDIR)/src/proto/grpc/testing/echo_messages.pb.cc $(GENDIR)/src/proto/grpc/testing/echo_messages.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/echo.pb.cc $(GENDIR)/src/proto/grpc/testing/echo.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/duplicate/echo_duplicate.pb.cc $(GENDIR)/src/proto/grpc/testing/duplicate/echo_duplicate.grpc.pb.cc -$(OBJDIR)/$(CONFIG)/test/cpp/util/create_test_channel.o: $(GENDIR)/src/proto/grpc/testing/echo_messages.pb.cc $(GENDIR)/src/proto/grpc/testing/echo_messages.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/echo.pb.cc $(GENDIR)/src/proto/grpc/testing/echo.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/duplicate/echo_duplicate.pb.cc $(GENDIR)/src/proto/grpc/testing/duplicate/echo_duplicate.grpc.pb.cc -$(OBJDIR)/$(CONFIG)/test/cpp/util/string_ref_helper.o: $(GENDIR)/src/proto/grpc/testing/echo_messages.pb.cc $(GENDIR)/src/proto/grpc/testing/echo_messages.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/echo.pb.cc $(GENDIR)/src/proto/grpc/testing/echo.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/duplicate/echo_duplicate.pb.cc $(GENDIR)/src/proto/grpc/testing/duplicate/echo_duplicate.grpc.pb.cc -$(OBJDIR)/$(CONFIG)/test/cpp/util/subprocess.o: $(GENDIR)/src/proto/grpc/testing/echo_messages.pb.cc $(GENDIR)/src/proto/grpc/testing/echo_messages.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/echo.pb.cc $(GENDIR)/src/proto/grpc/testing/echo.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/duplicate/echo_duplicate.pb.cc $(GENDIR)/src/proto/grpc/testing/duplicate/echo_duplicate.grpc.pb.cc -$(OBJDIR)/$(CONFIG)/test/cpp/util/test_credentials_provider.o: $(GENDIR)/src/proto/grpc/testing/echo_messages.pb.cc $(GENDIR)/src/proto/grpc/testing/echo_messages.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/echo.pb.cc $(GENDIR)/src/proto/grpc/testing/echo.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/duplicate/echo_duplicate.pb.cc $(GENDIR)/src/proto/grpc/testing/duplicate/echo_duplicate.grpc.pb.cc +$(OBJDIR)/$(CONFIG)/test/cpp/end2end/test_service_impl.o: $(GENDIR)/src/proto/grpc/testing/duplicate/echo_duplicate.pb.cc $(GENDIR)/src/proto/grpc/testing/duplicate/echo_duplicate.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/echo.pb.cc $(GENDIR)/src/proto/grpc/testing/echo.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/echo_messages.pb.cc $(GENDIR)/src/proto/grpc/testing/echo_messages.grpc.pb.cc +$(OBJDIR)/$(CONFIG)/test/cpp/util/byte_buffer_proto_helper.o: $(GENDIR)/src/proto/grpc/testing/duplicate/echo_duplicate.pb.cc $(GENDIR)/src/proto/grpc/testing/duplicate/echo_duplicate.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/echo.pb.cc $(GENDIR)/src/proto/grpc/testing/echo.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/echo_messages.pb.cc $(GENDIR)/src/proto/grpc/testing/echo_messages.grpc.pb.cc +$(OBJDIR)/$(CONFIG)/test/cpp/util/cli_call.o: $(GENDIR)/src/proto/grpc/testing/duplicate/echo_duplicate.pb.cc $(GENDIR)/src/proto/grpc/testing/duplicate/echo_duplicate.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/echo.pb.cc $(GENDIR)/src/proto/grpc/testing/echo.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/echo_messages.pb.cc $(GENDIR)/src/proto/grpc/testing/echo_messages.grpc.pb.cc +$(OBJDIR)/$(CONFIG)/test/cpp/util/create_test_channel.o: $(GENDIR)/src/proto/grpc/testing/duplicate/echo_duplicate.pb.cc $(GENDIR)/src/proto/grpc/testing/duplicate/echo_duplicate.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/echo.pb.cc $(GENDIR)/src/proto/grpc/testing/echo.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/echo_messages.pb.cc $(GENDIR)/src/proto/grpc/testing/echo_messages.grpc.pb.cc +$(OBJDIR)/$(CONFIG)/test/cpp/util/string_ref_helper.o: $(GENDIR)/src/proto/grpc/testing/duplicate/echo_duplicate.pb.cc $(GENDIR)/src/proto/grpc/testing/duplicate/echo_duplicate.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/echo.pb.cc $(GENDIR)/src/proto/grpc/testing/echo.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/echo_messages.pb.cc $(GENDIR)/src/proto/grpc/testing/echo_messages.grpc.pb.cc +$(OBJDIR)/$(CONFIG)/test/cpp/util/subprocess.o: $(GENDIR)/src/proto/grpc/testing/duplicate/echo_duplicate.pb.cc $(GENDIR)/src/proto/grpc/testing/duplicate/echo_duplicate.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/echo.pb.cc $(GENDIR)/src/proto/grpc/testing/echo.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/echo_messages.pb.cc $(GENDIR)/src/proto/grpc/testing/echo_messages.grpc.pb.cc +$(OBJDIR)/$(CONFIG)/test/cpp/util/test_credentials_provider.o: $(GENDIR)/src/proto/grpc/testing/duplicate/echo_duplicate.pb.cc $(GENDIR)/src/proto/grpc/testing/duplicate/echo_duplicate.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/echo.pb.cc $(GENDIR)/src/proto/grpc/testing/echo.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/echo_messages.pb.cc $(GENDIR)/src/proto/grpc/testing/echo_messages.grpc.pb.cc LIBGRPC++_UNSECURE_SRC = \ - src/cpp/common/insecure_create_auth_context.cc \ src/cpp/client/channel.cc \ src/cpp/client/client_context.cc \ src/cpp/client/create_channel.cc \ @@ -3308,11 +3498,12 @@ LIBGRPC++_UNSECURE_SRC = \ src/cpp/client/credentials.cc \ src/cpp/client/generic_stub.cc \ src/cpp/client/insecure_credentials.cc \ - src/cpp/common/call.cc \ + src/cpp/codegen/codegen_init.cc \ src/cpp/common/channel_arguments.cc \ src/cpp/common/completion_queue.cc \ + src/cpp/common/core_codegen.cc \ + src/cpp/common/insecure_create_auth_context.cc \ src/cpp/common/rpc_method.cc \ - src/cpp/proto/proto_utils.cc \ src/cpp/server/async_generic_service.cc \ src/cpp/server/create_default_thread_pool.cc \ src/cpp/server/dynamic_thread_pool.cc \ @@ -3326,7 +3517,6 @@ LIBGRPC++_UNSECURE_SRC = \ src/cpp/util/status.cc \ src/cpp/util/string_ref.cc \ src/cpp/util/time.cc \ - src/cpp/codegen/grpc_library.cc \ PUBLIC_HEADERS_CXX += \ include/grpc++/alarm.h \ @@ -3339,6 +3529,37 @@ PUBLIC_HEADERS_CXX += \ include/grpc++/grpc++.h \ include/grpc++/impl/call.h \ include/grpc++/impl/client_unary_call.h \ + include/grpc++/impl/codegen/async_stream.h \ + include/grpc++/impl/codegen/async_unary_call.h \ + include/grpc++/impl/codegen/call.h \ + include/grpc++/impl/codegen/call_hook.h \ + include/grpc++/impl/codegen/channel_interface.h \ + include/grpc++/impl/codegen/client_context.h \ + include/grpc++/impl/codegen/client_unary_call.h \ + include/grpc++/impl/codegen/completion_queue.h \ + include/grpc++/impl/codegen/completion_queue_tag.h \ + include/grpc++/impl/codegen/config.h \ + include/grpc++/impl/codegen/config_protobuf.h \ + include/grpc++/impl/codegen/core_codegen_interface.h \ + include/grpc++/impl/codegen/grpc_library.h \ + include/grpc++/impl/codegen/method_handler_impl.h \ + include/grpc++/impl/codegen/proto_utils.h \ + include/grpc++/impl/codegen/rpc_method.h \ + include/grpc++/impl/codegen/rpc_service_method.h \ + include/grpc++/impl/codegen/security/auth_context.h \ + include/grpc++/impl/codegen/serialization_traits.h \ + include/grpc++/impl/codegen/server_context.h \ + include/grpc++/impl/codegen/server_interface.h \ + include/grpc++/impl/codegen/service_type.h \ + include/grpc++/impl/codegen/status.h \ + include/grpc++/impl/codegen/status_code_enum.h \ + include/grpc++/impl/codegen/string_ref.h \ + include/grpc++/impl/codegen/stub_options.h \ + include/grpc++/impl/codegen/sync.h \ + include/grpc++/impl/codegen/sync_cxx11.h \ + include/grpc++/impl/codegen/sync_no_cxx11.h \ + include/grpc++/impl/codegen/sync_stream.h \ + include/grpc++/impl/codegen/time.h \ include/grpc++/impl/grpc_library.h \ include/grpc++/impl/method_handler_impl.h \ include/grpc++/impl/proto_utils.h \ @@ -3373,36 +3594,6 @@ PUBLIC_HEADERS_CXX += \ include/grpc++/support/stub_options.h \ include/grpc++/support/sync_stream.h \ include/grpc++/support/time.h \ - include/grpc++/impl/codegen/async_stream.h \ - include/grpc++/impl/codegen/async_unary_call.h \ - include/grpc++/impl/codegen/call.h \ - include/grpc++/impl/codegen/call_hook.h \ - include/grpc++/impl/codegen/channel_interface.h \ - include/grpc++/impl/codegen/client_context.h \ - include/grpc++/impl/codegen/client_unary_call.h \ - include/grpc++/impl/codegen/completion_queue.h \ - include/grpc++/impl/codegen/completion_queue_tag.h \ - include/grpc++/impl/codegen/config.h \ - include/grpc++/impl/codegen/config_protobuf.h \ - include/grpc++/impl/codegen/grpc_library.h \ - include/grpc++/impl/codegen/method_handler_impl.h \ - include/grpc++/impl/codegen/proto_utils.h \ - include/grpc++/impl/codegen/rpc_method.h \ - include/grpc++/impl/codegen/rpc_service_method.h \ - include/grpc++/impl/codegen/security/auth_context.h \ - include/grpc++/impl/codegen/serialization_traits.h \ - include/grpc++/impl/codegen/server_context.h \ - include/grpc++/impl/codegen/server_interface.h \ - include/grpc++/impl/codegen/service_type.h \ - include/grpc++/impl/codegen/status.h \ - include/grpc++/impl/codegen/status_code_enum.h \ - include/grpc++/impl/codegen/string_ref.h \ - include/grpc++/impl/codegen/stub_options.h \ - include/grpc++/impl/codegen/sync.h \ - include/grpc++/impl/codegen/sync_cxx11.h \ - include/grpc++/impl/codegen/sync_no_cxx11.h \ - include/grpc++/impl/codegen/sync_stream.h \ - include/grpc++/impl/codegen/time.h \ LIBGRPC++_UNSECURE_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBGRPC++_UNSECURE_SRC)))) @@ -3459,45 +3650,8 @@ LIBGRPC_PLUGIN_SUPPORT_SRC = \ src/compiler/objective_c_generator.cc \ src/compiler/python_generator.cc \ src/compiler/ruby_generator.cc \ - src/cpp/codegen/grpc_library.cc \ PUBLIC_HEADERS_CXX += \ - include/grpc++/impl/codegen/async_stream.h \ - include/grpc++/impl/codegen/async_unary_call.h \ - include/grpc++/impl/codegen/call.h \ - include/grpc++/impl/codegen/call_hook.h \ - include/grpc++/impl/codegen/channel_interface.h \ - include/grpc++/impl/codegen/client_context.h \ - include/grpc++/impl/codegen/client_unary_call.h \ - include/grpc++/impl/codegen/completion_queue.h \ - include/grpc++/impl/codegen/completion_queue_tag.h \ - include/grpc++/impl/codegen/config.h \ - include/grpc++/impl/codegen/config_protobuf.h \ - include/grpc++/impl/codegen/grpc_library.h \ - include/grpc++/impl/codegen/method_handler_impl.h \ - include/grpc++/impl/codegen/proto_utils.h \ - include/grpc++/impl/codegen/rpc_method.h \ - include/grpc++/impl/codegen/rpc_service_method.h \ - include/grpc++/impl/codegen/security/auth_context.h \ - include/grpc++/impl/codegen/serialization_traits.h \ - include/grpc++/impl/codegen/server_context.h \ - include/grpc++/impl/codegen/server_interface.h \ - include/grpc++/impl/codegen/service_type.h \ - include/grpc++/impl/codegen/status.h \ - include/grpc++/impl/codegen/status_code_enum.h \ - include/grpc++/impl/codegen/string_ref.h \ - include/grpc++/impl/codegen/stub_options.h \ - include/grpc++/impl/codegen/sync.h \ - include/grpc++/impl/codegen/sync_cxx11.h \ - include/grpc++/impl/codegen/sync_no_cxx11.h \ - include/grpc++/impl/codegen/sync_stream.h \ - include/grpc++/impl/codegen/time.h \ - include/grpc/impl/codegen/byte_buffer.h \ - include/grpc/impl/codegen/compression_types.h \ - include/grpc/impl/codegen/connectivity_state.h \ - include/grpc/impl/codegen/grpc_types.h \ - include/grpc/impl/codegen/propagation_bits.h \ - include/grpc/impl/codegen/status.h \ include/grpc/impl/codegen/alloc.h \ include/grpc/impl/codegen/atm.h \ include/grpc/impl/codegen/atm_gcc_atomic.h \ @@ -3548,6 +3702,7 @@ LIBINTEROP_CLIENT_HELPER_SRC = \ $(GENDIR)/src/proto/grpc/testing/messages.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.grpc.pb.cc \ test/cpp/interop/client_helper.cc \ +PUBLIC_HEADERS_CXX += \ LIBINTEROP_CLIENT_HELPER_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBINTEROP_CLIENT_HELPER_SRC)))) @@ -3601,6 +3756,7 @@ LIBINTEROP_CLIENT_MAIN_SRC = \ test/cpp/interop/client.cc \ test/cpp/interop/interop_client.cc \ +PUBLIC_HEADERS_CXX += \ LIBINTEROP_CLIENT_MAIN_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBINTEROP_CLIENT_MAIN_SRC)))) @@ -3651,6 +3807,7 @@ $(OBJDIR)/$(CONFIG)/test/cpp/interop/interop_client.o: $(GENDIR)/src/proto/grpc/ LIBINTEROP_SERVER_HELPER_SRC = \ test/cpp/interop/server_helper.cc \ +PUBLIC_HEADERS_CXX += \ LIBINTEROP_SERVER_HELPER_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBINTEROP_SERVER_HELPER_SRC)))) @@ -3702,6 +3859,7 @@ LIBINTEROP_SERVER_MAIN_SRC = \ $(GENDIR)/src/proto/grpc/testing/test.pb.cc $(GENDIR)/src/proto/grpc/testing/test.grpc.pb.cc \ test/cpp/interop/server_main.cc \ +PUBLIC_HEADERS_CXX += \ LIBINTEROP_SERVER_MAIN_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBINTEROP_SERVER_MAIN_SRC)))) @@ -3749,12 +3907,12 @@ $(OBJDIR)/$(CONFIG)/test/cpp/interop/server_main.o: $(GENDIR)/src/proto/grpc/tes LIBQPS_SRC = \ + $(GENDIR)/src/proto/grpc/testing/control.pb.cc $(GENDIR)/src/proto/grpc/testing/control.grpc.pb.cc \ $(GENDIR)/src/proto/grpc/testing/messages.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.grpc.pb.cc \ $(GENDIR)/src/proto/grpc/testing/payloads.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.grpc.pb.cc \ - $(GENDIR)/src/proto/grpc/testing/stats.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.grpc.pb.cc \ - $(GENDIR)/src/proto/grpc/testing/control.pb.cc $(GENDIR)/src/proto/grpc/testing/control.grpc.pb.cc \ - $(GENDIR)/src/proto/grpc/testing/services.pb.cc $(GENDIR)/src/proto/grpc/testing/services.grpc.pb.cc \ $(GENDIR)/src/proto/grpc/testing/perf_db.pb.cc $(GENDIR)/src/proto/grpc/testing/perf_db.grpc.pb.cc \ + $(GENDIR)/src/proto/grpc/testing/services.pb.cc $(GENDIR)/src/proto/grpc/testing/services.grpc.pb.cc \ + $(GENDIR)/src/proto/grpc/testing/stats.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.grpc.pb.cc \ test/cpp/qps/client_async.cc \ test/cpp/qps/client_sync.cc \ test/cpp/qps/driver.cc \ @@ -3767,6 +3925,7 @@ LIBQPS_SRC = \ test/cpp/qps/usage_timer.cc \ test/cpp/util/benchmark_config.cc \ +PUBLIC_HEADERS_CXX += \ LIBQPS_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBQPS_SRC)))) @@ -3810,22 +3969,23 @@ ifneq ($(NO_DEPS),true) -include $(LIBQPS_OBJS:.o=.dep) endif endif -$(OBJDIR)/$(CONFIG)/test/cpp/qps/client_async.o: $(GENDIR)/src/proto/grpc/testing/messages.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/control.pb.cc $(GENDIR)/src/proto/grpc/testing/control.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/services.pb.cc $(GENDIR)/src/proto/grpc/testing/services.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/perf_db.pb.cc $(GENDIR)/src/proto/grpc/testing/perf_db.grpc.pb.cc -$(OBJDIR)/$(CONFIG)/test/cpp/qps/client_sync.o: $(GENDIR)/src/proto/grpc/testing/messages.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/control.pb.cc $(GENDIR)/src/proto/grpc/testing/control.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/services.pb.cc $(GENDIR)/src/proto/grpc/testing/services.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/perf_db.pb.cc $(GENDIR)/src/proto/grpc/testing/perf_db.grpc.pb.cc -$(OBJDIR)/$(CONFIG)/test/cpp/qps/driver.o: $(GENDIR)/src/proto/grpc/testing/messages.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/control.pb.cc $(GENDIR)/src/proto/grpc/testing/control.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/services.pb.cc $(GENDIR)/src/proto/grpc/testing/services.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/perf_db.pb.cc $(GENDIR)/src/proto/grpc/testing/perf_db.grpc.pb.cc -$(OBJDIR)/$(CONFIG)/test/cpp/qps/limit_cores.o: $(GENDIR)/src/proto/grpc/testing/messages.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/control.pb.cc $(GENDIR)/src/proto/grpc/testing/control.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/services.pb.cc $(GENDIR)/src/proto/grpc/testing/services.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/perf_db.pb.cc $(GENDIR)/src/proto/grpc/testing/perf_db.grpc.pb.cc -$(OBJDIR)/$(CONFIG)/test/cpp/qps/perf_db_client.o: $(GENDIR)/src/proto/grpc/testing/messages.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/control.pb.cc $(GENDIR)/src/proto/grpc/testing/control.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/services.pb.cc $(GENDIR)/src/proto/grpc/testing/services.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/perf_db.pb.cc $(GENDIR)/src/proto/grpc/testing/perf_db.grpc.pb.cc -$(OBJDIR)/$(CONFIG)/test/cpp/qps/qps_worker.o: $(GENDIR)/src/proto/grpc/testing/messages.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/control.pb.cc $(GENDIR)/src/proto/grpc/testing/control.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/services.pb.cc $(GENDIR)/src/proto/grpc/testing/services.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/perf_db.pb.cc $(GENDIR)/src/proto/grpc/testing/perf_db.grpc.pb.cc -$(OBJDIR)/$(CONFIG)/test/cpp/qps/report.o: $(GENDIR)/src/proto/grpc/testing/messages.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/control.pb.cc $(GENDIR)/src/proto/grpc/testing/control.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/services.pb.cc $(GENDIR)/src/proto/grpc/testing/services.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/perf_db.pb.cc $(GENDIR)/src/proto/grpc/testing/perf_db.grpc.pb.cc -$(OBJDIR)/$(CONFIG)/test/cpp/qps/server_async.o: $(GENDIR)/src/proto/grpc/testing/messages.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/control.pb.cc $(GENDIR)/src/proto/grpc/testing/control.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/services.pb.cc $(GENDIR)/src/proto/grpc/testing/services.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/perf_db.pb.cc $(GENDIR)/src/proto/grpc/testing/perf_db.grpc.pb.cc -$(OBJDIR)/$(CONFIG)/test/cpp/qps/server_sync.o: $(GENDIR)/src/proto/grpc/testing/messages.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/control.pb.cc $(GENDIR)/src/proto/grpc/testing/control.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/services.pb.cc $(GENDIR)/src/proto/grpc/testing/services.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/perf_db.pb.cc $(GENDIR)/src/proto/grpc/testing/perf_db.grpc.pb.cc -$(OBJDIR)/$(CONFIG)/test/cpp/qps/usage_timer.o: $(GENDIR)/src/proto/grpc/testing/messages.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/control.pb.cc $(GENDIR)/src/proto/grpc/testing/control.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/services.pb.cc $(GENDIR)/src/proto/grpc/testing/services.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/perf_db.pb.cc $(GENDIR)/src/proto/grpc/testing/perf_db.grpc.pb.cc -$(OBJDIR)/$(CONFIG)/test/cpp/util/benchmark_config.o: $(GENDIR)/src/proto/grpc/testing/messages.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/control.pb.cc $(GENDIR)/src/proto/grpc/testing/control.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/services.pb.cc $(GENDIR)/src/proto/grpc/testing/services.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/perf_db.pb.cc $(GENDIR)/src/proto/grpc/testing/perf_db.grpc.pb.cc +$(OBJDIR)/$(CONFIG)/test/cpp/qps/client_async.o: $(GENDIR)/src/proto/grpc/testing/control.pb.cc $(GENDIR)/src/proto/grpc/testing/control.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/perf_db.pb.cc $(GENDIR)/src/proto/grpc/testing/perf_db.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/services.pb.cc $(GENDIR)/src/proto/grpc/testing/services.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.grpc.pb.cc +$(OBJDIR)/$(CONFIG)/test/cpp/qps/client_sync.o: $(GENDIR)/src/proto/grpc/testing/control.pb.cc $(GENDIR)/src/proto/grpc/testing/control.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/perf_db.pb.cc $(GENDIR)/src/proto/grpc/testing/perf_db.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/services.pb.cc $(GENDIR)/src/proto/grpc/testing/services.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.grpc.pb.cc +$(OBJDIR)/$(CONFIG)/test/cpp/qps/driver.o: $(GENDIR)/src/proto/grpc/testing/control.pb.cc $(GENDIR)/src/proto/grpc/testing/control.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/perf_db.pb.cc $(GENDIR)/src/proto/grpc/testing/perf_db.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/services.pb.cc $(GENDIR)/src/proto/grpc/testing/services.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.grpc.pb.cc +$(OBJDIR)/$(CONFIG)/test/cpp/qps/limit_cores.o: $(GENDIR)/src/proto/grpc/testing/control.pb.cc $(GENDIR)/src/proto/grpc/testing/control.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/perf_db.pb.cc $(GENDIR)/src/proto/grpc/testing/perf_db.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/services.pb.cc $(GENDIR)/src/proto/grpc/testing/services.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.grpc.pb.cc +$(OBJDIR)/$(CONFIG)/test/cpp/qps/perf_db_client.o: $(GENDIR)/src/proto/grpc/testing/control.pb.cc $(GENDIR)/src/proto/grpc/testing/control.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/perf_db.pb.cc $(GENDIR)/src/proto/grpc/testing/perf_db.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/services.pb.cc $(GENDIR)/src/proto/grpc/testing/services.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.grpc.pb.cc +$(OBJDIR)/$(CONFIG)/test/cpp/qps/qps_worker.o: $(GENDIR)/src/proto/grpc/testing/control.pb.cc $(GENDIR)/src/proto/grpc/testing/control.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/perf_db.pb.cc $(GENDIR)/src/proto/grpc/testing/perf_db.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/services.pb.cc $(GENDIR)/src/proto/grpc/testing/services.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.grpc.pb.cc +$(OBJDIR)/$(CONFIG)/test/cpp/qps/report.o: $(GENDIR)/src/proto/grpc/testing/control.pb.cc $(GENDIR)/src/proto/grpc/testing/control.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/perf_db.pb.cc $(GENDIR)/src/proto/grpc/testing/perf_db.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/services.pb.cc $(GENDIR)/src/proto/grpc/testing/services.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.grpc.pb.cc +$(OBJDIR)/$(CONFIG)/test/cpp/qps/server_async.o: $(GENDIR)/src/proto/grpc/testing/control.pb.cc $(GENDIR)/src/proto/grpc/testing/control.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/perf_db.pb.cc $(GENDIR)/src/proto/grpc/testing/perf_db.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/services.pb.cc $(GENDIR)/src/proto/grpc/testing/services.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.grpc.pb.cc +$(OBJDIR)/$(CONFIG)/test/cpp/qps/server_sync.o: $(GENDIR)/src/proto/grpc/testing/control.pb.cc $(GENDIR)/src/proto/grpc/testing/control.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/perf_db.pb.cc $(GENDIR)/src/proto/grpc/testing/perf_db.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/services.pb.cc $(GENDIR)/src/proto/grpc/testing/services.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.grpc.pb.cc +$(OBJDIR)/$(CONFIG)/test/cpp/qps/usage_timer.o: $(GENDIR)/src/proto/grpc/testing/control.pb.cc $(GENDIR)/src/proto/grpc/testing/control.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/perf_db.pb.cc $(GENDIR)/src/proto/grpc/testing/perf_db.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/services.pb.cc $(GENDIR)/src/proto/grpc/testing/services.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.grpc.pb.cc +$(OBJDIR)/$(CONFIG)/test/cpp/util/benchmark_config.o: $(GENDIR)/src/proto/grpc/testing/control.pb.cc $(GENDIR)/src/proto/grpc/testing/control.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/perf_db.pb.cc $(GENDIR)/src/proto/grpc/testing/perf_db.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/services.pb.cc $(GENDIR)/src/proto/grpc/testing/services.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.grpc.pb.cc LIBGRPC_CSHARP_EXT_SRC = \ src/csharp/ext/grpc_csharp_ext.c \ +PUBLIC_HEADERS_C += \ LIBGRPC_CSHARP_EXT_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBGRPC_CSHARP_EXT_SRC)))) @@ -4175,6 +4335,7 @@ LIBBORINGSSL_SRC = \ third_party/boringssl/ssl/t1_lib.c \ third_party/boringssl/ssl/tls_record.c \ +PUBLIC_HEADERS_C += \ LIBBORINGSSL_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBBORINGSSL_SRC)))) @@ -4203,6 +4364,7 @@ LIBBORINGSSL_TEST_UTIL_SRC = \ third_party/boringssl/crypto/test/malloc.cc \ third_party/boringssl/crypto/test/test_util.cc \ +PUBLIC_HEADERS_CXX += \ LIBBORINGSSL_TEST_UTIL_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBBORINGSSL_TEST_UTIL_SRC)))) @@ -4240,28 +4402,67 @@ endif LIBBORINGSSL_AES_TEST_LIB_SRC = \ third_party/boringssl/crypto/aes/aes_test.cc \ +PUBLIC_HEADERS_CXX += \ + +LIBBORINGSSL_AES_TEST_LIB_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBBORINGSSL_AES_TEST_LIB_SRC)))) + +$(LIBBORINGSSL_AES_TEST_LIB_OBJS): CPPFLAGS += -Ithird_party/boringssl/include -fvisibility=hidden -DOPENSSL_NO_ASM -D_GNU_SOURCE -DWIN32_LEAN_AND_MEAN -D_HAS_EXCEPTIONS=0 -DNOMINMAX +$(LIBBORINGSSL_AES_TEST_LIB_OBJS): CFLAGS += -Wno-sign-conversion -Wno-conversion -Wno-unused-value -Wno-unknown-pragmas -Wno-implicit-function-declaration -Wno-unused-variable -Wno-sign-compare + +ifeq ($(NO_PROTOBUF),true) + +# You can't build a C++ library if you don't have protobuf - a bit overreached, but still okay. + +$(LIBDIR)/$(CONFIG)/libboringssl_aes_test_lib.a: protobuf_dep_error + + +else + +$(LIBDIR)/$(CONFIG)/libboringssl_aes_test_lib.a: $(ZLIB_DEP) $(PROTOBUF_DEP) $(LIBBORINGSSL_AES_TEST_LIB_OBJS) + $(E) "[AR] Creating $@" + $(Q) mkdir -p `dirname $@` + $(Q) rm -f $(LIBDIR)/$(CONFIG)/libboringssl_aes_test_lib.a + $(Q) $(AR) $(LIBDIR)/$(CONFIG)/libboringssl_aes_test_lib.a $(LIBBORINGSSL_AES_TEST_LIB_OBJS) +ifeq ($(SYSTEM),Darwin) + $(Q) ranlib -no_warning_for_no_symbols $(LIBDIR)/$(CONFIG)/libboringssl_aes_test_lib.a +endif + + + + +endif + +ifneq ($(NO_DEPS),true) +-include $(LIBBORINGSSL_AES_TEST_LIB_OBJS:.o=.dep) +endif + + +LIBBORINGSSL_ASN1_TEST_LIB_SRC = \ + third_party/boringssl/crypto/asn1/asn1_test.cc \ -LIBBORINGSSL_AES_TEST_LIB_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBBORINGSSL_AES_TEST_LIB_SRC)))) +PUBLIC_HEADERS_CXX += \ -$(LIBBORINGSSL_AES_TEST_LIB_OBJS): CPPFLAGS += -Ithird_party/boringssl/include -fvisibility=hidden -DOPENSSL_NO_ASM -D_GNU_SOURCE -DWIN32_LEAN_AND_MEAN -D_HAS_EXCEPTIONS=0 -DNOMINMAX -$(LIBBORINGSSL_AES_TEST_LIB_OBJS): CFLAGS += -Wno-sign-conversion -Wno-conversion -Wno-unused-value -Wno-unknown-pragmas -Wno-implicit-function-declaration -Wno-unused-variable -Wno-sign-compare +LIBBORINGSSL_ASN1_TEST_LIB_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBBORINGSSL_ASN1_TEST_LIB_SRC)))) + +$(LIBBORINGSSL_ASN1_TEST_LIB_OBJS): CPPFLAGS += -Ithird_party/boringssl/include -fvisibility=hidden -DOPENSSL_NO_ASM -D_GNU_SOURCE -DWIN32_LEAN_AND_MEAN -D_HAS_EXCEPTIONS=0 -DNOMINMAX +$(LIBBORINGSSL_ASN1_TEST_LIB_OBJS): CFLAGS += -Wno-sign-conversion -Wno-conversion -Wno-unused-value -Wno-unknown-pragmas -Wno-implicit-function-declaration -Wno-unused-variable -Wno-sign-compare ifeq ($(NO_PROTOBUF),true) # You can't build a C++ library if you don't have protobuf - a bit overreached, but still okay. -$(LIBDIR)/$(CONFIG)/libboringssl_aes_test_lib.a: protobuf_dep_error +$(LIBDIR)/$(CONFIG)/libboringssl_asn1_test_lib.a: protobuf_dep_error else -$(LIBDIR)/$(CONFIG)/libboringssl_aes_test_lib.a: $(ZLIB_DEP) $(PROTOBUF_DEP) $(LIBBORINGSSL_AES_TEST_LIB_OBJS) +$(LIBDIR)/$(CONFIG)/libboringssl_asn1_test_lib.a: $(ZLIB_DEP) $(PROTOBUF_DEP) $(LIBBORINGSSL_ASN1_TEST_LIB_OBJS) $(E) "[AR] Creating $@" $(Q) mkdir -p `dirname $@` - $(Q) rm -f $(LIBDIR)/$(CONFIG)/libboringssl_aes_test_lib.a - $(Q) $(AR) $(LIBDIR)/$(CONFIG)/libboringssl_aes_test_lib.a $(LIBBORINGSSL_AES_TEST_LIB_OBJS) + $(Q) rm -f $(LIBDIR)/$(CONFIG)/libboringssl_asn1_test_lib.a + $(Q) $(AR) $(LIBDIR)/$(CONFIG)/libboringssl_asn1_test_lib.a $(LIBBORINGSSL_ASN1_TEST_LIB_OBJS) ifeq ($(SYSTEM),Darwin) - $(Q) ranlib -no_warning_for_no_symbols $(LIBDIR)/$(CONFIG)/libboringssl_aes_test_lib.a + $(Q) ranlib -no_warning_for_no_symbols $(LIBDIR)/$(CONFIG)/libboringssl_asn1_test_lib.a endif @@ -4270,13 +4471,14 @@ endif endif ifneq ($(NO_DEPS),true) --include $(LIBBORINGSSL_AES_TEST_LIB_OBJS:.o=.dep) +-include $(LIBBORINGSSL_ASN1_TEST_LIB_OBJS:.o=.dep) endif LIBBORINGSSL_BASE64_TEST_LIB_SRC = \ third_party/boringssl/crypto/base64/base64_test.cc \ +PUBLIC_HEADERS_CXX += \ LIBBORINGSSL_BASE64_TEST_LIB_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBBORINGSSL_BASE64_TEST_LIB_SRC)))) @@ -4314,6 +4516,7 @@ endif LIBBORINGSSL_BIO_TEST_LIB_SRC = \ third_party/boringssl/crypto/bio/bio_test.cc \ +PUBLIC_HEADERS_CXX += \ LIBBORINGSSL_BIO_TEST_LIB_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBBORINGSSL_BIO_TEST_LIB_SRC)))) @@ -4351,6 +4554,7 @@ endif LIBBORINGSSL_BN_TEST_LIB_SRC = \ third_party/boringssl/crypto/bn/bn_test.cc \ +PUBLIC_HEADERS_CXX += \ LIBBORINGSSL_BN_TEST_LIB_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBBORINGSSL_BN_TEST_LIB_SRC)))) @@ -4388,6 +4592,7 @@ endif LIBBORINGSSL_BYTESTRING_TEST_LIB_SRC = \ third_party/boringssl/crypto/bytestring/bytestring_test.cc \ +PUBLIC_HEADERS_CXX += \ LIBBORINGSSL_BYTESTRING_TEST_LIB_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBBORINGSSL_BYTESTRING_TEST_LIB_SRC)))) @@ -4425,6 +4630,7 @@ endif LIBBORINGSSL_AEAD_TEST_LIB_SRC = \ third_party/boringssl/crypto/cipher/aead_test.cc \ +PUBLIC_HEADERS_CXX += \ LIBBORINGSSL_AEAD_TEST_LIB_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBBORINGSSL_AEAD_TEST_LIB_SRC)))) @@ -4462,6 +4668,7 @@ endif LIBBORINGSSL_CIPHER_TEST_LIB_SRC = \ third_party/boringssl/crypto/cipher/cipher_test.cc \ +PUBLIC_HEADERS_CXX += \ LIBBORINGSSL_CIPHER_TEST_LIB_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBBORINGSSL_CIPHER_TEST_LIB_SRC)))) @@ -4499,6 +4706,7 @@ endif LIBBORINGSSL_CMAC_TEST_LIB_SRC = \ third_party/boringssl/crypto/cmac/cmac_test.cc \ +PUBLIC_HEADERS_CXX += \ LIBBORINGSSL_CMAC_TEST_LIB_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBBORINGSSL_CMAC_TEST_LIB_SRC)))) @@ -4536,6 +4744,7 @@ endif LIBBORINGSSL_CONSTANT_TIME_TEST_LIB_SRC = \ third_party/boringssl/crypto/constant_time_test.c \ +PUBLIC_HEADERS_C += \ LIBBORINGSSL_CONSTANT_TIME_TEST_LIB_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBBORINGSSL_CONSTANT_TIME_TEST_LIB_SRC)))) @@ -4562,6 +4771,7 @@ endif LIBBORINGSSL_ED25519_TEST_LIB_SRC = \ third_party/boringssl/crypto/curve25519/ed25519_test.cc \ +PUBLIC_HEADERS_CXX += \ LIBBORINGSSL_ED25519_TEST_LIB_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBBORINGSSL_ED25519_TEST_LIB_SRC)))) @@ -4599,6 +4809,7 @@ endif LIBBORINGSSL_X25519_TEST_LIB_SRC = \ third_party/boringssl/crypto/curve25519/x25519_test.cc \ +PUBLIC_HEADERS_CXX += \ LIBBORINGSSL_X25519_TEST_LIB_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBBORINGSSL_X25519_TEST_LIB_SRC)))) @@ -4636,6 +4847,7 @@ endif LIBBORINGSSL_DH_TEST_LIB_SRC = \ third_party/boringssl/crypto/dh/dh_test.cc \ +PUBLIC_HEADERS_CXX += \ LIBBORINGSSL_DH_TEST_LIB_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBBORINGSSL_DH_TEST_LIB_SRC)))) @@ -4673,6 +4885,7 @@ endif LIBBORINGSSL_DIGEST_TEST_LIB_SRC = \ third_party/boringssl/crypto/digest/digest_test.cc \ +PUBLIC_HEADERS_CXX += \ LIBBORINGSSL_DIGEST_TEST_LIB_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBBORINGSSL_DIGEST_TEST_LIB_SRC)))) @@ -4710,6 +4923,7 @@ endif LIBBORINGSSL_DSA_TEST_LIB_SRC = \ third_party/boringssl/crypto/dsa/dsa_test.c \ +PUBLIC_HEADERS_C += \ LIBBORINGSSL_DSA_TEST_LIB_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBBORINGSSL_DSA_TEST_LIB_SRC)))) @@ -4736,6 +4950,7 @@ endif LIBBORINGSSL_EC_TEST_LIB_SRC = \ third_party/boringssl/crypto/ec/ec_test.cc \ +PUBLIC_HEADERS_CXX += \ LIBBORINGSSL_EC_TEST_LIB_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBBORINGSSL_EC_TEST_LIB_SRC)))) @@ -4773,6 +4988,7 @@ endif LIBBORINGSSL_EXAMPLE_MUL_LIB_SRC = \ third_party/boringssl/crypto/ec/example_mul.c \ +PUBLIC_HEADERS_C += \ LIBBORINGSSL_EXAMPLE_MUL_LIB_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBBORINGSSL_EXAMPLE_MUL_LIB_SRC)))) @@ -4799,6 +5015,7 @@ endif LIBBORINGSSL_ECDSA_TEST_LIB_SRC = \ third_party/boringssl/crypto/ecdsa/ecdsa_test.cc \ +PUBLIC_HEADERS_CXX += \ LIBBORINGSSL_ECDSA_TEST_LIB_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBBORINGSSL_ECDSA_TEST_LIB_SRC)))) @@ -4836,6 +5053,7 @@ endif LIBBORINGSSL_ERR_TEST_LIB_SRC = \ third_party/boringssl/crypto/err/err_test.cc \ +PUBLIC_HEADERS_CXX += \ LIBBORINGSSL_ERR_TEST_LIB_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBBORINGSSL_ERR_TEST_LIB_SRC)))) @@ -4873,6 +5091,7 @@ endif LIBBORINGSSL_EVP_EXTRA_TEST_LIB_SRC = \ third_party/boringssl/crypto/evp/evp_extra_test.cc \ +PUBLIC_HEADERS_CXX += \ LIBBORINGSSL_EVP_EXTRA_TEST_LIB_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBBORINGSSL_EVP_EXTRA_TEST_LIB_SRC)))) @@ -4910,6 +5129,7 @@ endif LIBBORINGSSL_EVP_TEST_LIB_SRC = \ third_party/boringssl/crypto/evp/evp_test.cc \ +PUBLIC_HEADERS_CXX += \ LIBBORINGSSL_EVP_TEST_LIB_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBBORINGSSL_EVP_TEST_LIB_SRC)))) @@ -4947,6 +5167,7 @@ endif LIBBORINGSSL_PBKDF_TEST_LIB_SRC = \ third_party/boringssl/crypto/evp/pbkdf_test.cc \ +PUBLIC_HEADERS_CXX += \ LIBBORINGSSL_PBKDF_TEST_LIB_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBBORINGSSL_PBKDF_TEST_LIB_SRC)))) @@ -4984,6 +5205,7 @@ endif LIBBORINGSSL_HKDF_TEST_LIB_SRC = \ third_party/boringssl/crypto/hkdf/hkdf_test.c \ +PUBLIC_HEADERS_C += \ LIBBORINGSSL_HKDF_TEST_LIB_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBBORINGSSL_HKDF_TEST_LIB_SRC)))) @@ -5010,6 +5232,7 @@ endif LIBBORINGSSL_HMAC_TEST_LIB_SRC = \ third_party/boringssl/crypto/hmac/hmac_test.cc \ +PUBLIC_HEADERS_CXX += \ LIBBORINGSSL_HMAC_TEST_LIB_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBBORINGSSL_HMAC_TEST_LIB_SRC)))) @@ -5047,6 +5270,7 @@ endif LIBBORINGSSL_LHASH_TEST_LIB_SRC = \ third_party/boringssl/crypto/lhash/lhash_test.c \ +PUBLIC_HEADERS_C += \ LIBBORINGSSL_LHASH_TEST_LIB_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBBORINGSSL_LHASH_TEST_LIB_SRC)))) @@ -5073,6 +5297,7 @@ endif LIBBORINGSSL_GCM_TEST_LIB_SRC = \ third_party/boringssl/crypto/modes/gcm_test.c \ +PUBLIC_HEADERS_C += \ LIBBORINGSSL_GCM_TEST_LIB_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBBORINGSSL_GCM_TEST_LIB_SRC)))) @@ -5099,6 +5324,7 @@ endif LIBBORINGSSL_PKCS12_TEST_LIB_SRC = \ third_party/boringssl/crypto/pkcs8/pkcs12_test.cc \ +PUBLIC_HEADERS_CXX += \ LIBBORINGSSL_PKCS12_TEST_LIB_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBBORINGSSL_PKCS12_TEST_LIB_SRC)))) @@ -5136,6 +5362,7 @@ endif LIBBORINGSSL_PKCS8_TEST_LIB_SRC = \ third_party/boringssl/crypto/pkcs8/pkcs8_test.cc \ +PUBLIC_HEADERS_CXX += \ LIBBORINGSSL_PKCS8_TEST_LIB_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBBORINGSSL_PKCS8_TEST_LIB_SRC)))) @@ -5173,6 +5400,7 @@ endif LIBBORINGSSL_POLY1305_TEST_LIB_SRC = \ third_party/boringssl/crypto/poly1305/poly1305_test.cc \ +PUBLIC_HEADERS_CXX += \ LIBBORINGSSL_POLY1305_TEST_LIB_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBBORINGSSL_POLY1305_TEST_LIB_SRC)))) @@ -5210,6 +5438,7 @@ endif LIBBORINGSSL_REFCOUNT_TEST_LIB_SRC = \ third_party/boringssl/crypto/refcount_test.c \ +PUBLIC_HEADERS_C += \ LIBBORINGSSL_REFCOUNT_TEST_LIB_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBBORINGSSL_REFCOUNT_TEST_LIB_SRC)))) @@ -5236,6 +5465,7 @@ endif LIBBORINGSSL_RSA_TEST_LIB_SRC = \ third_party/boringssl/crypto/rsa/rsa_test.cc \ +PUBLIC_HEADERS_CXX += \ LIBBORINGSSL_RSA_TEST_LIB_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBBORINGSSL_RSA_TEST_LIB_SRC)))) @@ -5273,6 +5503,7 @@ endif LIBBORINGSSL_THREAD_TEST_LIB_SRC = \ third_party/boringssl/crypto/thread_test.c \ +PUBLIC_HEADERS_C += \ LIBBORINGSSL_THREAD_TEST_LIB_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBBORINGSSL_THREAD_TEST_LIB_SRC)))) @@ -5299,6 +5530,7 @@ endif LIBBORINGSSL_PKCS7_TEST_LIB_SRC = \ third_party/boringssl/crypto/x509/pkcs7_test.c \ +PUBLIC_HEADERS_C += \ LIBBORINGSSL_PKCS7_TEST_LIB_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBBORINGSSL_PKCS7_TEST_LIB_SRC)))) @@ -5325,6 +5557,7 @@ endif LIBBORINGSSL_TAB_TEST_LIB_SRC = \ third_party/boringssl/crypto/x509v3/tab_test.c \ +PUBLIC_HEADERS_C += \ LIBBORINGSSL_TAB_TEST_LIB_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBBORINGSSL_TAB_TEST_LIB_SRC)))) @@ -5351,6 +5584,7 @@ endif LIBBORINGSSL_V3NAME_TEST_LIB_SRC = \ third_party/boringssl/crypto/x509v3/v3name_test.c \ +PUBLIC_HEADERS_C += \ LIBBORINGSSL_V3NAME_TEST_LIB_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBBORINGSSL_V3NAME_TEST_LIB_SRC)))) @@ -5377,6 +5611,7 @@ endif LIBBORINGSSL_PQUEUE_TEST_LIB_SRC = \ third_party/boringssl/ssl/pqueue/pqueue_test.c \ +PUBLIC_HEADERS_C += \ LIBBORINGSSL_PQUEUE_TEST_LIB_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBBORINGSSL_PQUEUE_TEST_LIB_SRC)))) @@ -5403,6 +5638,7 @@ endif LIBBORINGSSL_SSL_TEST_LIB_SRC = \ third_party/boringssl/ssl/ssl_test.cc \ +PUBLIC_HEADERS_CXX += \ LIBBORINGSSL_SSL_TEST_LIB_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBBORINGSSL_SSL_TEST_LIB_SRC)))) @@ -5454,6 +5690,7 @@ LIBZ_SRC = \ third_party/zlib/uncompr.c \ third_party/zlib/zutil.c \ +PUBLIC_HEADERS_C += \ LIBZ_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBZ_SRC)))) @@ -5479,6 +5716,7 @@ endif LIBBAD_CLIENT_TEST_SRC = \ test/core/bad_client/bad_client.c \ +PUBLIC_HEADERS_C += \ LIBBAD_CLIENT_TEST_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBBAD_CLIENT_TEST_SRC)))) @@ -5517,6 +5755,7 @@ endif LIBBAD_SSL_TEST_SERVER_SRC = \ test/core/bad_ssl/server_common.c \ +PUBLIC_HEADERS_C += \ LIBBAD_SSL_TEST_SERVER_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBBAD_SSL_TEST_SERVER_SRC)))) @@ -5591,6 +5830,7 @@ LIBEND2END_TESTS_SRC = \ test/core/end2end/tests/simple_request.c \ test/core/end2end/tests/trailing_metadata.c \ +PUBLIC_HEADERS_C += \ LIBEND2END_TESTS_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBEND2END_TESTS_SRC)))) @@ -5664,6 +5904,7 @@ LIBEND2END_NOSEC_TESTS_SRC = \ test/core/end2end/tests/simple_request.c \ test/core/end2end/tests/trailing_metadata.c \ +PUBLIC_HEADERS_C += \ LIBEND2END_NOSEC_TESTS_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBEND2END_NOSEC_TESTS_SRC)))) @@ -5685,46 +5926,6 @@ ifneq ($(NO_DEPS),true) endif -LIBEND2END_CERTS_SRC = \ - test/core/end2end/data/test_root_cert.c \ - test/core/end2end/data/server1_cert.c \ - test/core/end2end/data/server1_key.c \ - - -LIBEND2END_CERTS_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBEND2END_CERTS_SRC)))) - - -ifeq ($(NO_SECURE),true) - -# You can't build secure libraries if you don't have OpenSSL. - -$(LIBDIR)/$(CONFIG)/libend2end_certs.a: openssl_dep_error - - -else - - -$(LIBDIR)/$(CONFIG)/libend2end_certs.a: $(ZLIB_DEP) $(OPENSSL_DEP) $(LIBEND2END_CERTS_OBJS) - $(E) "[AR] Creating $@" - $(Q) mkdir -p `dirname $@` - $(Q) rm -f $(LIBDIR)/$(CONFIG)/libend2end_certs.a - $(Q) $(AR) $(LIBDIR)/$(CONFIG)/libend2end_certs.a $(LIBEND2END_CERTS_OBJS) -ifeq ($(SYSTEM),Darwin) - $(Q) ranlib -no_warning_for_no_symbols $(LIBDIR)/$(CONFIG)/libend2end_certs.a -endif - - - - -endif - -ifneq ($(NO_SECURE),true) -ifneq ($(NO_DEPS),true) --include $(LIBEND2END_CERTS_OBJS:.o=.dep) -endif -endif - - # All of the test targets, and protoc plugins @@ -6561,6 +6762,38 @@ endif endif +GPR_BACKOFF_TEST_SRC = \ + test/core/support/backoff_test.c \ + +GPR_BACKOFF_TEST_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(GPR_BACKOFF_TEST_SRC)))) +ifeq ($(NO_SECURE),true) + +# You can't build secure targets if you don't have OpenSSL. + +$(BINDIR)/$(CONFIG)/gpr_backoff_test: openssl_dep_error + +else + + + +$(BINDIR)/$(CONFIG)/gpr_backoff_test: $(GPR_BACKOFF_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a + $(E) "[LD] Linking $@" + $(Q) mkdir -p `dirname $@` + $(Q) $(LD) $(LDFLAGS) $(GPR_BACKOFF_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/gpr_backoff_test + +endif + +$(OBJDIR)/$(CONFIG)/test/core/support/backoff_test.o: $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a + +deps_gpr_backoff_test: $(GPR_BACKOFF_TEST_OBJS:.o=.dep) + +ifneq ($(NO_SECURE),true) +ifneq ($(NO_DEPS),true) +-include $(GPR_BACKOFF_TEST_OBJS:.o=.dep) +endif +endif + + GPR_CMDLINE_TEST_SRC = \ test/core/support/cmdline_test.c \ @@ -7617,72 +7850,72 @@ endif endif -HTTPCLI_FORMAT_REQUEST_TEST_SRC = \ - test/core/httpcli/format_request_test.c \ +HTTP_PARSER_TEST_SRC = \ + test/core/http/parser_test.c \ -HTTPCLI_FORMAT_REQUEST_TEST_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(HTTPCLI_FORMAT_REQUEST_TEST_SRC)))) +HTTP_PARSER_TEST_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(HTTP_PARSER_TEST_SRC)))) ifeq ($(NO_SECURE),true) # You can't build secure targets if you don't have OpenSSL. -$(BINDIR)/$(CONFIG)/httpcli_format_request_test: openssl_dep_error +$(BINDIR)/$(CONFIG)/http_parser_test: openssl_dep_error else -$(BINDIR)/$(CONFIG)/httpcli_format_request_test: $(HTTPCLI_FORMAT_REQUEST_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a +$(BINDIR)/$(CONFIG)/http_parser_test: $(HTTP_PARSER_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(HTTPCLI_FORMAT_REQUEST_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/httpcli_format_request_test + $(Q) $(LD) $(LDFLAGS) $(HTTP_PARSER_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/http_parser_test endif -$(OBJDIR)/$(CONFIG)/test/core/httpcli/format_request_test.o: $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a +$(OBJDIR)/$(CONFIG)/test/core/http/parser_test.o: $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a -deps_httpcli_format_request_test: $(HTTPCLI_FORMAT_REQUEST_TEST_OBJS:.o=.dep) +deps_http_parser_test: $(HTTP_PARSER_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(HTTPCLI_FORMAT_REQUEST_TEST_OBJS:.o=.dep) +-include $(HTTP_PARSER_TEST_OBJS:.o=.dep) endif endif -HTTPCLI_PARSER_TEST_SRC = \ - test/core/httpcli/parser_test.c \ +HTTPCLI_FORMAT_REQUEST_TEST_SRC = \ + test/core/http/format_request_test.c \ -HTTPCLI_PARSER_TEST_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(HTTPCLI_PARSER_TEST_SRC)))) +HTTPCLI_FORMAT_REQUEST_TEST_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(HTTPCLI_FORMAT_REQUEST_TEST_SRC)))) ifeq ($(NO_SECURE),true) # You can't build secure targets if you don't have OpenSSL. -$(BINDIR)/$(CONFIG)/httpcli_parser_test: openssl_dep_error +$(BINDIR)/$(CONFIG)/httpcli_format_request_test: openssl_dep_error else -$(BINDIR)/$(CONFIG)/httpcli_parser_test: $(HTTPCLI_PARSER_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a +$(BINDIR)/$(CONFIG)/httpcli_format_request_test: $(HTTPCLI_FORMAT_REQUEST_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(HTTPCLI_PARSER_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/httpcli_parser_test + $(Q) $(LD) $(LDFLAGS) $(HTTPCLI_FORMAT_REQUEST_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/httpcli_format_request_test endif -$(OBJDIR)/$(CONFIG)/test/core/httpcli/parser_test.o: $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a +$(OBJDIR)/$(CONFIG)/test/core/http/format_request_test.o: $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a -deps_httpcli_parser_test: $(HTTPCLI_PARSER_TEST_OBJS:.o=.dep) +deps_httpcli_format_request_test: $(HTTPCLI_FORMAT_REQUEST_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(HTTPCLI_PARSER_TEST_OBJS:.o=.dep) +-include $(HTTPCLI_FORMAT_REQUEST_TEST_OBJS:.o=.dep) endif endif HTTPCLI_TEST_SRC = \ - test/core/httpcli/httpcli_test.c \ + test/core/http/httpcli_test.c \ HTTPCLI_TEST_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(HTTPCLI_TEST_SRC)))) ifeq ($(NO_SECURE),true) @@ -7702,7 +7935,7 @@ $(BINDIR)/$(CONFIG)/httpcli_test: $(HTTPCLI_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgr endif -$(OBJDIR)/$(CONFIG)/test/core/httpcli/httpcli_test.o: $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a +$(OBJDIR)/$(CONFIG)/test/core/http/httpcli_test.o: $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a deps_httpcli_test: $(HTTPCLI_TEST_OBJS:.o=.dep) @@ -7714,7 +7947,7 @@ endif HTTPSCLI_TEST_SRC = \ - test/core/httpcli/httpscli_test.c \ + test/core/http/httpscli_test.c \ HTTPSCLI_TEST_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(HTTPSCLI_TEST_SRC)))) ifeq ($(NO_SECURE),true) @@ -7734,7 +7967,7 @@ $(BINDIR)/$(CONFIG)/httpscli_test: $(HTTPSCLI_TEST_OBJS) $(LIBDIR)/$(CONFIG)/lib endif -$(OBJDIR)/$(CONFIG)/test/core/httpcli/httpscli_test.o: $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a +$(OBJDIR)/$(CONFIG)/test/core/http/httpscli_test.o: $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a deps_httpscli_test: $(HTTPSCLI_TEST_OBJS:.o=.dep) @@ -9316,6 +9549,68 @@ endif endif +CODEGEN_TEST_SRC = \ + $(GENDIR)/src/proto/grpc/testing/control.pb.cc $(GENDIR)/src/proto/grpc/testing/control.grpc.pb.cc \ + $(GENDIR)/src/proto/grpc/testing/messages.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.grpc.pb.cc \ + $(GENDIR)/src/proto/grpc/testing/payloads.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.grpc.pb.cc \ + $(GENDIR)/src/proto/grpc/testing/perf_db.pb.cc $(GENDIR)/src/proto/grpc/testing/perf_db.grpc.pb.cc \ + $(GENDIR)/src/proto/grpc/testing/services.pb.cc $(GENDIR)/src/proto/grpc/testing/services.grpc.pb.cc \ + $(GENDIR)/src/proto/grpc/testing/stats.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.grpc.pb.cc \ + test/cpp/codegen/codegen_test.cc \ + +CODEGEN_TEST_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(CODEGEN_TEST_SRC)))) +ifeq ($(NO_SECURE),true) + +# You can't build secure targets if you don't have OpenSSL. + +$(BINDIR)/$(CONFIG)/codegen_test: openssl_dep_error + +else + + + + +ifeq ($(NO_PROTOBUF),true) + +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.0.0+. + +$(BINDIR)/$(CONFIG)/codegen_test: protobuf_dep_error + +else + +$(BINDIR)/$(CONFIG)/codegen_test: $(PROTOBUF_DEP) $(CODEGEN_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc++_codegen_lib.a + $(E) "[LD] Linking $@" + $(Q) mkdir -p `dirname $@` + $(Q) $(LDXX) $(LDFLAGS) $(CODEGEN_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc++_codegen_lib.a $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) $(LDLIBS_SECURE) $(GTEST_LIB) -o $(BINDIR)/$(CONFIG)/codegen_test + +endif + +endif + +$(OBJDIR)/$(CONFIG)/src/proto/grpc/testing/control.o: $(LIBDIR)/$(CONFIG)/libgrpc++_codegen_lib.a + +$(OBJDIR)/$(CONFIG)/src/proto/grpc/testing/messages.o: $(LIBDIR)/$(CONFIG)/libgrpc++_codegen_lib.a + +$(OBJDIR)/$(CONFIG)/src/proto/grpc/testing/payloads.o: $(LIBDIR)/$(CONFIG)/libgrpc++_codegen_lib.a + +$(OBJDIR)/$(CONFIG)/src/proto/grpc/testing/perf_db.o: $(LIBDIR)/$(CONFIG)/libgrpc++_codegen_lib.a + +$(OBJDIR)/$(CONFIG)/src/proto/grpc/testing/services.o: $(LIBDIR)/$(CONFIG)/libgrpc++_codegen_lib.a + +$(OBJDIR)/$(CONFIG)/src/proto/grpc/testing/stats.o: $(LIBDIR)/$(CONFIG)/libgrpc++_codegen_lib.a + +$(OBJDIR)/$(CONFIG)/test/cpp/codegen/codegen_test.o: $(LIBDIR)/$(CONFIG)/libgrpc++_codegen_lib.a + +deps_codegen_test: $(CODEGEN_TEST_OBJS:.o=.dep) + +ifneq ($(NO_SECURE),true) +ifneq ($(NO_DEPS),true) +-include $(CODEGEN_TEST_OBJS:.o=.dep) +endif +endif +$(OBJDIR)/$(CONFIG)/test/cpp/codegen/codegen_test.o: $(GENDIR)/src/proto/grpc/testing/control.pb.cc $(GENDIR)/src/proto/grpc/testing/control.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/perf_db.pb.cc $(GENDIR)/src/proto/grpc/testing/perf_db.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/services.pb.cc $(GENDIR)/src/proto/grpc/testing/services.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.grpc.pb.cc + + CREDENTIALS_TEST_SRC = \ test/cpp/client/credentials_test.cc \ @@ -11073,6 +11368,33 @@ endif +# boringssl needs an override to ensure that it does not include +# system openssl headers regardless of other configuration +# we do so here with a target specific variable assignment +$(BORINGSSL_ASN1_TEST_OBJS): CFLAGS := -Ithird_party/boringssl/include $(CFLAGS) -Wno-sign-conversion -Wno-conversion -Wno-unused-value +$(BORINGSSL_ASN1_TEST_OBJS): CXXFLAGS := -Ithird_party/boringssl/include $(CXXFLAGS) +$(BORINGSSL_ASN1_TEST_OBJS): CPPFLAGS += -DOPENSSL_NO_ASM -D_GNU_SOURCE + + +ifeq ($(NO_PROTOBUF),true) + +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.0.0+. + +$(BINDIR)/$(CONFIG)/boringssl_asn1_test: protobuf_dep_error + +else + +$(BINDIR)/$(CONFIG)/boringssl_asn1_test: $(LIBDIR)/$(CONFIG)/libboringssl_asn1_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl.a + $(E) "[LD] Linking $@" + $(Q) mkdir -p `dirname $@` + $(Q) $(LDXX) $(LDFLAGS) $(LIBDIR)/$(CONFIG)/libboringssl_asn1_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl.a $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) $(GTEST_LIB) -o $(BINDIR)/$(CONFIG)/boringssl_asn1_test + +endif + + + + + # boringssl needs an override to ensure that it does not include # system openssl headers regardless of other configuration # we do so here with a target specific variable assignment @@ -12319,14 +12641,14 @@ else -$(BINDIR)/$(CONFIG)/h2_census_test: $(H2_CENSUS_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libend2end_certs.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a +$(BINDIR)/$(CONFIG)/h2_census_test: $(H2_CENSUS_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(H2_CENSUS_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libend2end_certs.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/h2_census_test + $(Q) $(LD) $(LDFLAGS) $(H2_CENSUS_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/h2_census_test endif -$(OBJDIR)/$(CONFIG)/test/core/end2end/fixtures/h2_census.o: $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libend2end_certs.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a +$(OBJDIR)/$(CONFIG)/test/core/end2end/fixtures/h2_census.o: $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a deps_h2_census_test: $(H2_CENSUS_TEST_OBJS:.o=.dep) @@ -12351,14 +12673,14 @@ else -$(BINDIR)/$(CONFIG)/h2_compress_test: $(H2_COMPRESS_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libend2end_certs.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a +$(BINDIR)/$(CONFIG)/h2_compress_test: $(H2_COMPRESS_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(H2_COMPRESS_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libend2end_certs.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/h2_compress_test + $(Q) $(LD) $(LDFLAGS) $(H2_COMPRESS_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/h2_compress_test endif -$(OBJDIR)/$(CONFIG)/test/core/end2end/fixtures/h2_compress.o: $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libend2end_certs.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a +$(OBJDIR)/$(CONFIG)/test/core/end2end/fixtures/h2_compress.o: $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a deps_h2_compress_test: $(H2_COMPRESS_TEST_OBJS:.o=.dep) @@ -12383,14 +12705,14 @@ else -$(BINDIR)/$(CONFIG)/h2_fakesec_test: $(H2_FAKESEC_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libend2end_certs.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a +$(BINDIR)/$(CONFIG)/h2_fakesec_test: $(H2_FAKESEC_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(H2_FAKESEC_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libend2end_certs.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/h2_fakesec_test + $(Q) $(LD) $(LDFLAGS) $(H2_FAKESEC_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/h2_fakesec_test endif -$(OBJDIR)/$(CONFIG)/test/core/end2end/fixtures/h2_fakesec.o: $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libend2end_certs.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a +$(OBJDIR)/$(CONFIG)/test/core/end2end/fixtures/h2_fakesec.o: $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a deps_h2_fakesec_test: $(H2_FAKESEC_TEST_OBJS:.o=.dep) @@ -12415,14 +12737,14 @@ else -$(BINDIR)/$(CONFIG)/h2_full_test: $(H2_FULL_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libend2end_certs.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a +$(BINDIR)/$(CONFIG)/h2_full_test: $(H2_FULL_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(H2_FULL_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libend2end_certs.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/h2_full_test + $(Q) $(LD) $(LDFLAGS) $(H2_FULL_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/h2_full_test endif -$(OBJDIR)/$(CONFIG)/test/core/end2end/fixtures/h2_full.o: $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libend2end_certs.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a +$(OBJDIR)/$(CONFIG)/test/core/end2end/fixtures/h2_full.o: $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a deps_h2_full_test: $(H2_FULL_TEST_OBJS:.o=.dep) @@ -12447,14 +12769,14 @@ else -$(BINDIR)/$(CONFIG)/h2_full+pipe_test: $(H2_FULL+PIPE_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libend2end_certs.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a +$(BINDIR)/$(CONFIG)/h2_full+pipe_test: $(H2_FULL+PIPE_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(H2_FULL+PIPE_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libend2end_certs.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/h2_full+pipe_test + $(Q) $(LD) $(LDFLAGS) $(H2_FULL+PIPE_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/h2_full+pipe_test endif -$(OBJDIR)/$(CONFIG)/test/core/end2end/fixtures/h2_full+pipe.o: $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libend2end_certs.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a +$(OBJDIR)/$(CONFIG)/test/core/end2end/fixtures/h2_full+pipe.o: $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a deps_h2_full+pipe_test: $(H2_FULL+PIPE_TEST_OBJS:.o=.dep) @@ -12479,14 +12801,14 @@ else -$(BINDIR)/$(CONFIG)/h2_full+poll_test: $(H2_FULL+POLL_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libend2end_certs.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a +$(BINDIR)/$(CONFIG)/h2_full+poll_test: $(H2_FULL+POLL_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(H2_FULL+POLL_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libend2end_certs.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/h2_full+poll_test + $(Q) $(LD) $(LDFLAGS) $(H2_FULL+POLL_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/h2_full+poll_test endif -$(OBJDIR)/$(CONFIG)/test/core/end2end/fixtures/h2_full+poll.o: $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libend2end_certs.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a +$(OBJDIR)/$(CONFIG)/test/core/end2end/fixtures/h2_full+poll.o: $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a deps_h2_full+poll_test: $(H2_FULL+POLL_TEST_OBJS:.o=.dep) @@ -12511,14 +12833,14 @@ else -$(BINDIR)/$(CONFIG)/h2_full+poll+pipe_test: $(H2_FULL+POLL+PIPE_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libend2end_certs.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a +$(BINDIR)/$(CONFIG)/h2_full+poll+pipe_test: $(H2_FULL+POLL+PIPE_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(H2_FULL+POLL+PIPE_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libend2end_certs.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/h2_full+poll+pipe_test + $(Q) $(LD) $(LDFLAGS) $(H2_FULL+POLL+PIPE_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/h2_full+poll+pipe_test endif -$(OBJDIR)/$(CONFIG)/test/core/end2end/fixtures/h2_full+poll+pipe.o: $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libend2end_certs.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a +$(OBJDIR)/$(CONFIG)/test/core/end2end/fixtures/h2_full+poll+pipe.o: $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a deps_h2_full+poll+pipe_test: $(H2_FULL+POLL+PIPE_TEST_OBJS:.o=.dep) @@ -12529,6 +12851,38 @@ endif endif +H2_FULL+TRACE_TEST_SRC = \ + test/core/end2end/fixtures/h2_full+trace.c \ + +H2_FULL+TRACE_TEST_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(H2_FULL+TRACE_TEST_SRC)))) +ifeq ($(NO_SECURE),true) + +# You can't build secure targets if you don't have OpenSSL. + +$(BINDIR)/$(CONFIG)/h2_full+trace_test: openssl_dep_error + +else + + + +$(BINDIR)/$(CONFIG)/h2_full+trace_test: $(H2_FULL+TRACE_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a + $(E) "[LD] Linking $@" + $(Q) mkdir -p `dirname $@` + $(Q) $(LD) $(LDFLAGS) $(H2_FULL+TRACE_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/h2_full+trace_test + +endif + +$(OBJDIR)/$(CONFIG)/test/core/end2end/fixtures/h2_full+trace.o: $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a + +deps_h2_full+trace_test: $(H2_FULL+TRACE_TEST_OBJS:.o=.dep) + +ifneq ($(NO_SECURE),true) +ifneq ($(NO_DEPS),true) +-include $(H2_FULL+TRACE_TEST_OBJS:.o=.dep) +endif +endif + + H2_OAUTH2_TEST_SRC = \ test/core/end2end/fixtures/h2_oauth2.c \ @@ -12543,14 +12897,14 @@ else -$(BINDIR)/$(CONFIG)/h2_oauth2_test: $(H2_OAUTH2_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libend2end_certs.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a +$(BINDIR)/$(CONFIG)/h2_oauth2_test: $(H2_OAUTH2_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(H2_OAUTH2_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libend2end_certs.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/h2_oauth2_test + $(Q) $(LD) $(LDFLAGS) $(H2_OAUTH2_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/h2_oauth2_test endif -$(OBJDIR)/$(CONFIG)/test/core/end2end/fixtures/h2_oauth2.o: $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libend2end_certs.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a +$(OBJDIR)/$(CONFIG)/test/core/end2end/fixtures/h2_oauth2.o: $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a deps_h2_oauth2_test: $(H2_OAUTH2_TEST_OBJS:.o=.dep) @@ -12575,14 +12929,14 @@ else -$(BINDIR)/$(CONFIG)/h2_proxy_test: $(H2_PROXY_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libend2end_certs.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a +$(BINDIR)/$(CONFIG)/h2_proxy_test: $(H2_PROXY_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(H2_PROXY_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libend2end_certs.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/h2_proxy_test + $(Q) $(LD) $(LDFLAGS) $(H2_PROXY_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/h2_proxy_test endif -$(OBJDIR)/$(CONFIG)/test/core/end2end/fixtures/h2_proxy.o: $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libend2end_certs.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a +$(OBJDIR)/$(CONFIG)/test/core/end2end/fixtures/h2_proxy.o: $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a deps_h2_proxy_test: $(H2_PROXY_TEST_OBJS:.o=.dep) @@ -12607,14 +12961,14 @@ else -$(BINDIR)/$(CONFIG)/h2_sockpair_test: $(H2_SOCKPAIR_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libend2end_certs.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a +$(BINDIR)/$(CONFIG)/h2_sockpair_test: $(H2_SOCKPAIR_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(H2_SOCKPAIR_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libend2end_certs.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/h2_sockpair_test + $(Q) $(LD) $(LDFLAGS) $(H2_SOCKPAIR_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/h2_sockpair_test endif -$(OBJDIR)/$(CONFIG)/test/core/end2end/fixtures/h2_sockpair.o: $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libend2end_certs.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a +$(OBJDIR)/$(CONFIG)/test/core/end2end/fixtures/h2_sockpair.o: $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a deps_h2_sockpair_test: $(H2_SOCKPAIR_TEST_OBJS:.o=.dep) @@ -12639,14 +12993,14 @@ else -$(BINDIR)/$(CONFIG)/h2_sockpair+trace_test: $(H2_SOCKPAIR+TRACE_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libend2end_certs.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a +$(BINDIR)/$(CONFIG)/h2_sockpair+trace_test: $(H2_SOCKPAIR+TRACE_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(H2_SOCKPAIR+TRACE_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libend2end_certs.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/h2_sockpair+trace_test + $(Q) $(LD) $(LDFLAGS) $(H2_SOCKPAIR+TRACE_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/h2_sockpair+trace_test endif -$(OBJDIR)/$(CONFIG)/test/core/end2end/fixtures/h2_sockpair+trace.o: $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libend2end_certs.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a +$(OBJDIR)/$(CONFIG)/test/core/end2end/fixtures/h2_sockpair+trace.o: $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a deps_h2_sockpair+trace_test: $(H2_SOCKPAIR+TRACE_TEST_OBJS:.o=.dep) @@ -12671,14 +13025,14 @@ else -$(BINDIR)/$(CONFIG)/h2_sockpair_1byte_test: $(H2_SOCKPAIR_1BYTE_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libend2end_certs.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a +$(BINDIR)/$(CONFIG)/h2_sockpair_1byte_test: $(H2_SOCKPAIR_1BYTE_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(H2_SOCKPAIR_1BYTE_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libend2end_certs.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/h2_sockpair_1byte_test + $(Q) $(LD) $(LDFLAGS) $(H2_SOCKPAIR_1BYTE_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/h2_sockpair_1byte_test endif -$(OBJDIR)/$(CONFIG)/test/core/end2end/fixtures/h2_sockpair_1byte.o: $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libend2end_certs.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a +$(OBJDIR)/$(CONFIG)/test/core/end2end/fixtures/h2_sockpair_1byte.o: $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a deps_h2_sockpair_1byte_test: $(H2_SOCKPAIR_1BYTE_TEST_OBJS:.o=.dep) @@ -12703,14 +13057,14 @@ else -$(BINDIR)/$(CONFIG)/h2_ssl_test: $(H2_SSL_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libend2end_certs.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a +$(BINDIR)/$(CONFIG)/h2_ssl_test: $(H2_SSL_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(H2_SSL_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libend2end_certs.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/h2_ssl_test + $(Q) $(LD) $(LDFLAGS) $(H2_SSL_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/h2_ssl_test endif -$(OBJDIR)/$(CONFIG)/test/core/end2end/fixtures/h2_ssl.o: $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libend2end_certs.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a +$(OBJDIR)/$(CONFIG)/test/core/end2end/fixtures/h2_ssl.o: $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a deps_h2_ssl_test: $(H2_SSL_TEST_OBJS:.o=.dep) @@ -12735,14 +13089,14 @@ else -$(BINDIR)/$(CONFIG)/h2_ssl+poll_test: $(H2_SSL+POLL_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libend2end_certs.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a +$(BINDIR)/$(CONFIG)/h2_ssl+poll_test: $(H2_SSL+POLL_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(H2_SSL+POLL_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libend2end_certs.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/h2_ssl+poll_test + $(Q) $(LD) $(LDFLAGS) $(H2_SSL+POLL_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/h2_ssl+poll_test endif -$(OBJDIR)/$(CONFIG)/test/core/end2end/fixtures/h2_ssl+poll.o: $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libend2end_certs.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a +$(OBJDIR)/$(CONFIG)/test/core/end2end/fixtures/h2_ssl+poll.o: $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a deps_h2_ssl+poll_test: $(H2_SSL+POLL_TEST_OBJS:.o=.dep) @@ -12767,14 +13121,14 @@ else -$(BINDIR)/$(CONFIG)/h2_ssl_proxy_test: $(H2_SSL_PROXY_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libend2end_certs.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a +$(BINDIR)/$(CONFIG)/h2_ssl_proxy_test: $(H2_SSL_PROXY_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(H2_SSL_PROXY_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libend2end_certs.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/h2_ssl_proxy_test + $(Q) $(LD) $(LDFLAGS) $(H2_SSL_PROXY_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/h2_ssl_proxy_test endif -$(OBJDIR)/$(CONFIG)/test/core/end2end/fixtures/h2_ssl_proxy.o: $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libend2end_certs.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a +$(OBJDIR)/$(CONFIG)/test/core/end2end/fixtures/h2_ssl_proxy.o: $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a deps_h2_ssl_proxy_test: $(H2_SSL_PROXY_TEST_OBJS:.o=.dep) @@ -12785,38 +13139,6 @@ endif endif -H2_UCHANNEL_TEST_SRC = \ - test/core/end2end/fixtures/h2_uchannel.c \ - -H2_UCHANNEL_TEST_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(H2_UCHANNEL_TEST_SRC)))) -ifeq ($(NO_SECURE),true) - -# You can't build secure targets if you don't have OpenSSL. - -$(BINDIR)/$(CONFIG)/h2_uchannel_test: openssl_dep_error - -else - - - -$(BINDIR)/$(CONFIG)/h2_uchannel_test: $(H2_UCHANNEL_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libend2end_certs.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a - $(E) "[LD] Linking $@" - $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(H2_UCHANNEL_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libend2end_certs.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/h2_uchannel_test - -endif - -$(OBJDIR)/$(CONFIG)/test/core/end2end/fixtures/h2_uchannel.o: $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libend2end_certs.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a - -deps_h2_uchannel_test: $(H2_UCHANNEL_TEST_OBJS:.o=.dep) - -ifneq ($(NO_SECURE),true) -ifneq ($(NO_DEPS),true) --include $(H2_UCHANNEL_TEST_OBJS:.o=.dep) -endif -endif - - H2_UDS_TEST_SRC = \ test/core/end2end/fixtures/h2_uds.c \ @@ -12831,14 +13153,14 @@ else -$(BINDIR)/$(CONFIG)/h2_uds_test: $(H2_UDS_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libend2end_certs.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a +$(BINDIR)/$(CONFIG)/h2_uds_test: $(H2_UDS_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(H2_UDS_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libend2end_certs.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/h2_uds_test + $(Q) $(LD) $(LDFLAGS) $(H2_UDS_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/h2_uds_test endif -$(OBJDIR)/$(CONFIG)/test/core/end2end/fixtures/h2_uds.o: $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libend2end_certs.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a +$(OBJDIR)/$(CONFIG)/test/core/end2end/fixtures/h2_uds.o: $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a deps_h2_uds_test: $(H2_UDS_TEST_OBJS:.o=.dep) @@ -12863,14 +13185,14 @@ else -$(BINDIR)/$(CONFIG)/h2_uds+poll_test: $(H2_UDS+POLL_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libend2end_certs.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a +$(BINDIR)/$(CONFIG)/h2_uds+poll_test: $(H2_UDS+POLL_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(H2_UDS+POLL_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libend2end_certs.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/h2_uds+poll_test + $(Q) $(LD) $(LDFLAGS) $(H2_UDS+POLL_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/h2_uds+poll_test endif -$(OBJDIR)/$(CONFIG)/test/core/end2end/fixtures/h2_uds+poll.o: $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libend2end_certs.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a +$(OBJDIR)/$(CONFIG)/test/core/end2end/fixtures/h2_uds+poll.o: $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a deps_h2_uds+poll_test: $(H2_UDS+POLL_TEST_OBJS:.o=.dep) @@ -13001,6 +13323,26 @@ ifneq ($(NO_DEPS),true) endif +H2_FULL+TRACE_NOSEC_TEST_SRC = \ + test/core/end2end/fixtures/h2_full+trace.c \ + +H2_FULL+TRACE_NOSEC_TEST_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(H2_FULL+TRACE_NOSEC_TEST_SRC)))) + + +$(BINDIR)/$(CONFIG)/h2_full+trace_nosec_test: $(H2_FULL+TRACE_NOSEC_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_nosec_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a + $(E) "[LD] Linking $@" + $(Q) mkdir -p `dirname $@` + $(Q) $(LD) $(LDFLAGS) $(H2_FULL+TRACE_NOSEC_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_nosec_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) -o $(BINDIR)/$(CONFIG)/h2_full+trace_nosec_test + +$(OBJDIR)/$(CONFIG)/test/core/end2end/fixtures/h2_full+trace.o: $(LIBDIR)/$(CONFIG)/libend2end_nosec_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a + +deps_h2_full+trace_nosec_test: $(H2_FULL+TRACE_NOSEC_TEST_OBJS:.o=.dep) + +ifneq ($(NO_DEPS),true) +-include $(H2_FULL+TRACE_NOSEC_TEST_OBJS:.o=.dep) +endif + + H2_PROXY_NOSEC_TEST_SRC = \ test/core/end2end/fixtures/h2_proxy.c \ @@ -13081,26 +13423,6 @@ ifneq ($(NO_DEPS),true) endif -H2_UCHANNEL_NOSEC_TEST_SRC = \ - test/core/end2end/fixtures/h2_uchannel.c \ - -H2_UCHANNEL_NOSEC_TEST_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(H2_UCHANNEL_NOSEC_TEST_SRC)))) - - -$(BINDIR)/$(CONFIG)/h2_uchannel_nosec_test: $(H2_UCHANNEL_NOSEC_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_nosec_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a - $(E) "[LD] Linking $@" - $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(H2_UCHANNEL_NOSEC_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_nosec_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) -o $(BINDIR)/$(CONFIG)/h2_uchannel_nosec_test - -$(OBJDIR)/$(CONFIG)/test/core/end2end/fixtures/h2_uchannel.o: $(LIBDIR)/$(CONFIG)/libend2end_nosec_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a - -deps_h2_uchannel_nosec_test: $(H2_UCHANNEL_NOSEC_TEST_OBJS:.o=.dep) - -ifneq ($(NO_DEPS),true) --include $(H2_UCHANNEL_NOSEC_TEST_OBJS:.o=.dep) -endif - - H2_UDS_NOSEC_TEST_SRC = \ test/core/end2end/fixtures/h2_uds.c \ @@ -13149,27 +13471,27 @@ ifneq ($(OPENSSL_DEP),) # This is to ensure the embedded OpenSSL is built beforehand, properly # installing headers to their final destination on the drive. We need this # otherwise parallel compilation will fail if a source is compiled first. -src/core/httpcli/httpcli_security_connector.c: $(OPENSSL_DEP) -src/core/security/b64.c: $(OPENSSL_DEP) -src/core/security/client_auth_filter.c: $(OPENSSL_DEP) -src/core/security/credentials.c: $(OPENSSL_DEP) -src/core/security/credentials_metadata.c: $(OPENSSL_DEP) -src/core/security/credentials_posix.c: $(OPENSSL_DEP) -src/core/security/credentials_win32.c: $(OPENSSL_DEP) -src/core/security/google_default_credentials.c: $(OPENSSL_DEP) -src/core/security/handshake.c: $(OPENSSL_DEP) -src/core/security/json_token.c: $(OPENSSL_DEP) -src/core/security/jwt_verifier.c: $(OPENSSL_DEP) -src/core/security/secure_endpoint.c: $(OPENSSL_DEP) -src/core/security/security_connector.c: $(OPENSSL_DEP) -src/core/security/security_context.c: $(OPENSSL_DEP) -src/core/security/server_auth_filter.c: $(OPENSSL_DEP) -src/core/security/server_secure_chttp2.c: $(OPENSSL_DEP) -src/core/surface/init_secure.c: $(OPENSSL_DEP) -src/core/surface/secure_channel_create.c: $(OPENSSL_DEP) -src/core/tsi/fake_transport_security.c: $(OPENSSL_DEP) -src/core/tsi/ssl_transport_security.c: $(OPENSSL_DEP) -src/core/tsi/transport_security.c: $(OPENSSL_DEP) +src/core/ext/transport/chttp2/client/secure/secure_channel_create.c: $(OPENSSL_DEP) +src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c: $(OPENSSL_DEP) +src/core/lib/http/httpcli_security_connector.c: $(OPENSSL_DEP) +src/core/lib/security/b64.c: $(OPENSSL_DEP) +src/core/lib/security/client_auth_filter.c: $(OPENSSL_DEP) +src/core/lib/security/credentials.c: $(OPENSSL_DEP) +src/core/lib/security/credentials_metadata.c: $(OPENSSL_DEP) +src/core/lib/security/credentials_posix.c: $(OPENSSL_DEP) +src/core/lib/security/credentials_win32.c: $(OPENSSL_DEP) +src/core/lib/security/google_default_credentials.c: $(OPENSSL_DEP) +src/core/lib/security/handshake.c: $(OPENSSL_DEP) +src/core/lib/security/json_token.c: $(OPENSSL_DEP) +src/core/lib/security/jwt_verifier.c: $(OPENSSL_DEP) +src/core/lib/security/secure_endpoint.c: $(OPENSSL_DEP) +src/core/lib/security/security_connector.c: $(OPENSSL_DEP) +src/core/lib/security/security_context.c: $(OPENSSL_DEP) +src/core/lib/security/server_auth_filter.c: $(OPENSSL_DEP) +src/core/lib/surface/init_secure.c: $(OPENSSL_DEP) +src/core/lib/tsi/fake_transport_security.c: $(OPENSSL_DEP) +src/core/lib/tsi/ssl_transport_security.c: $(OPENSSL_DEP) +src/core/lib/tsi/transport_security.c: $(OPENSSL_DEP) src/cpp/client/secure_credentials.cc: $(OPENSSL_DEP) src/cpp/common/auth_property_iterator.cc: $(OPENSSL_DEP) src/cpp/common/secure_auth_context.cc: $(OPENSSL_DEP) diff --git a/binding.gyp b/binding.gyp index d1e086cfa08..a1cdf2ec366 100644 --- a/binding.gyp +++ b/binding.gyp @@ -492,49 +492,50 @@ 'dependencies': [ ], 'sources': [ - 'src/core/profiling/basic_timers.c', - 'src/core/profiling/stap_timers.c', - 'src/core/support/alloc.c', - 'src/core/support/avl.c', - 'src/core/support/cmdline.c', - 'src/core/support/cpu_iphone.c', - 'src/core/support/cpu_linux.c', - 'src/core/support/cpu_posix.c', - 'src/core/support/cpu_windows.c', - 'src/core/support/env_linux.c', - 'src/core/support/env_posix.c', - 'src/core/support/env_win32.c', - 'src/core/support/histogram.c', - 'src/core/support/host_port.c', - 'src/core/support/load_file.c', - 'src/core/support/log.c', - 'src/core/support/log_android.c', - 'src/core/support/log_linux.c', - 'src/core/support/log_posix.c', - 'src/core/support/log_win32.c', - 'src/core/support/murmur_hash.c', - 'src/core/support/slice.c', - 'src/core/support/slice_buffer.c', - 'src/core/support/stack_lockfree.c', - 'src/core/support/string.c', - 'src/core/support/string_posix.c', - 'src/core/support/string_win32.c', - 'src/core/support/subprocess_posix.c', - 'src/core/support/subprocess_windows.c', - 'src/core/support/sync.c', - 'src/core/support/sync_posix.c', - 'src/core/support/sync_win32.c', - 'src/core/support/thd.c', - 'src/core/support/thd_posix.c', - 'src/core/support/thd_win32.c', - 'src/core/support/time.c', - 'src/core/support/time_posix.c', - 'src/core/support/time_precise.c', - 'src/core/support/time_win32.c', - 'src/core/support/tls_pthread.c', - 'src/core/support/tmpfile_posix.c', - 'src/core/support/tmpfile_win32.c', - 'src/core/support/wrap_memcpy.c', + 'src/core/lib/profiling/basic_timers.c', + 'src/core/lib/profiling/stap_timers.c', + 'src/core/lib/support/alloc.c', + 'src/core/lib/support/avl.c', + 'src/core/lib/support/backoff.c', + 'src/core/lib/support/cmdline.c', + 'src/core/lib/support/cpu_iphone.c', + 'src/core/lib/support/cpu_linux.c', + 'src/core/lib/support/cpu_posix.c', + 'src/core/lib/support/cpu_windows.c', + 'src/core/lib/support/env_linux.c', + 'src/core/lib/support/env_posix.c', + 'src/core/lib/support/env_win32.c', + 'src/core/lib/support/histogram.c', + 'src/core/lib/support/host_port.c', + 'src/core/lib/support/load_file.c', + 'src/core/lib/support/log.c', + 'src/core/lib/support/log_android.c', + 'src/core/lib/support/log_linux.c', + 'src/core/lib/support/log_posix.c', + 'src/core/lib/support/log_win32.c', + 'src/core/lib/support/murmur_hash.c', + 'src/core/lib/support/slice.c', + 'src/core/lib/support/slice_buffer.c', + 'src/core/lib/support/stack_lockfree.c', + 'src/core/lib/support/string.c', + 'src/core/lib/support/string_posix.c', + 'src/core/lib/support/string_win32.c', + 'src/core/lib/support/subprocess_posix.c', + 'src/core/lib/support/subprocess_windows.c', + 'src/core/lib/support/sync.c', + 'src/core/lib/support/sync_posix.c', + 'src/core/lib/support/sync_win32.c', + 'src/core/lib/support/thd.c', + 'src/core/lib/support/thd_posix.c', + 'src/core/lib/support/thd_win32.c', + 'src/core/lib/support/time.c', + 'src/core/lib/support/time_posix.c', + 'src/core/lib/support/time_precise.c', + 'src/core/lib/support/time_win32.c', + 'src/core/lib/support/tls_pthread.c', + 'src/core/lib/support/tmpfile_posix.c', + 'src/core/lib/support/tmpfile_win32.c', + 'src/core/lib/support/wrap_memcpy.c', ], "conditions": [ ['OS == "mac"', { @@ -557,163 +558,167 @@ 'gpr', ], 'sources': [ - 'src/core/census/grpc_context.c', - 'src/core/census/grpc_filter.c', - 'src/core/channel/channel_args.c', - 'src/core/channel/channel_stack.c', - 'src/core/channel/client_channel.c', - 'src/core/channel/client_uchannel.c', - 'src/core/channel/compress_filter.c', - 'src/core/channel/connected_channel.c', - 'src/core/channel/http_client_filter.c', - 'src/core/channel/http_server_filter.c', - 'src/core/channel/subchannel_call_holder.c', - 'src/core/client_config/client_config.c', - 'src/core/client_config/connector.c', - 'src/core/client_config/default_initial_connect_string.c', - 'src/core/client_config/initial_connect_string.c', - 'src/core/client_config/lb_policies/load_balancer_api.c', - 'src/core/client_config/lb_policies/pick_first.c', - 'src/core/client_config/lb_policies/round_robin.c', - 'src/core/client_config/lb_policy.c', - 'src/core/client_config/lb_policy_factory.c', - 'src/core/client_config/lb_policy_registry.c', - 'src/core/client_config/resolver.c', - 'src/core/client_config/resolver_factory.c', - 'src/core/client_config/resolver_registry.c', - 'src/core/client_config/resolvers/dns_resolver.c', - 'src/core/client_config/resolvers/sockaddr_resolver.c', - 'src/core/client_config/subchannel.c', - 'src/core/client_config/subchannel_factory.c', - 'src/core/client_config/subchannel_index.c', - 'src/core/client_config/uri_parser.c', - 'src/core/compression/compression_algorithm.c', - 'src/core/compression/message_compress.c', - 'src/core/debug/trace.c', - 'src/core/httpcli/format_request.c', - 'src/core/httpcli/httpcli.c', - 'src/core/httpcli/parser.c', - 'src/core/iomgr/closure.c', - 'src/core/iomgr/endpoint.c', - 'src/core/iomgr/endpoint_pair_posix.c', - 'src/core/iomgr/endpoint_pair_windows.c', - 'src/core/iomgr/exec_ctx.c', - 'src/core/iomgr/executor.c', - 'src/core/iomgr/fd_posix.c', - 'src/core/iomgr/iocp_windows.c', - 'src/core/iomgr/iomgr.c', - 'src/core/iomgr/iomgr_posix.c', - 'src/core/iomgr/iomgr_windows.c', - 'src/core/iomgr/pollset_multipoller_with_epoll.c', - 'src/core/iomgr/pollset_multipoller_with_poll_posix.c', - 'src/core/iomgr/pollset_posix.c', - 'src/core/iomgr/pollset_set_posix.c', - 'src/core/iomgr/pollset_set_windows.c', - 'src/core/iomgr/pollset_windows.c', - 'src/core/iomgr/resolve_address_posix.c', - 'src/core/iomgr/resolve_address_windows.c', - 'src/core/iomgr/sockaddr_utils.c', - 'src/core/iomgr/socket_utils_common_posix.c', - 'src/core/iomgr/socket_utils_linux.c', - 'src/core/iomgr/socket_utils_posix.c', - 'src/core/iomgr/socket_windows.c', - 'src/core/iomgr/tcp_client_posix.c', - 'src/core/iomgr/tcp_client_windows.c', - 'src/core/iomgr/tcp_posix.c', - 'src/core/iomgr/tcp_server_posix.c', - 'src/core/iomgr/tcp_server_windows.c', - 'src/core/iomgr/tcp_windows.c', - 'src/core/iomgr/time_averaged_stats.c', - 'src/core/iomgr/timer.c', - 'src/core/iomgr/timer_heap.c', - 'src/core/iomgr/udp_server.c', - 'src/core/iomgr/wakeup_fd_eventfd.c', - 'src/core/iomgr/wakeup_fd_nospecial.c', - 'src/core/iomgr/wakeup_fd_pipe.c', - 'src/core/iomgr/wakeup_fd_posix.c', - 'src/core/iomgr/workqueue_posix.c', - 'src/core/iomgr/workqueue_windows.c', - 'src/core/json/json.c', - 'src/core/json/json_reader.c', - 'src/core/json/json_string.c', - 'src/core/json/json_writer.c', - 'src/core/proto/grpc/lb/v0/load_balancer.pb.c', - 'src/core/surface/alarm.c', - 'src/core/surface/api_trace.c', - 'src/core/surface/byte_buffer.c', - 'src/core/surface/byte_buffer_reader.c', - 'src/core/surface/call.c', - 'src/core/surface/call_details.c', - 'src/core/surface/call_log_batch.c', - 'src/core/surface/channel.c', - 'src/core/surface/channel_connectivity.c', - 'src/core/surface/channel_create.c', - 'src/core/surface/channel_ping.c', - 'src/core/surface/completion_queue.c', - 'src/core/surface/event_string.c', - 'src/core/surface/init.c', - 'src/core/surface/lame_client.c', - 'src/core/surface/metadata_array.c', - 'src/core/surface/server.c', - 'src/core/surface/server_chttp2.c', - 'src/core/surface/server_create.c', - 'src/core/surface/validate_metadata.c', - 'src/core/surface/version.c', - 'src/core/transport/byte_stream.c', - 'src/core/transport/chttp2/alpn.c', - 'src/core/transport/chttp2/bin_encoder.c', - 'src/core/transport/chttp2/frame_data.c', - 'src/core/transport/chttp2/frame_goaway.c', - 'src/core/transport/chttp2/frame_ping.c', - 'src/core/transport/chttp2/frame_rst_stream.c', - 'src/core/transport/chttp2/frame_settings.c', - 'src/core/transport/chttp2/frame_window_update.c', - 'src/core/transport/chttp2/hpack_encoder.c', - 'src/core/transport/chttp2/hpack_parser.c', - 'src/core/transport/chttp2/hpack_table.c', - 'src/core/transport/chttp2/huffsyms.c', - 'src/core/transport/chttp2/incoming_metadata.c', - 'src/core/transport/chttp2/parsing.c', - 'src/core/transport/chttp2/status_conversion.c', - 'src/core/transport/chttp2/stream_lists.c', - 'src/core/transport/chttp2/stream_map.c', - 'src/core/transport/chttp2/timeout_encoding.c', - 'src/core/transport/chttp2/varint.c', - 'src/core/transport/chttp2/writing.c', - 'src/core/transport/chttp2_transport.c', - 'src/core/transport/connectivity_state.c', - 'src/core/transport/metadata.c', - 'src/core/transport/metadata_batch.c', - 'src/core/transport/static_metadata.c', - 'src/core/transport/transport.c', - 'src/core/transport/transport_op_string.c', - 'src/core/httpcli/httpcli_security_connector.c', - 'src/core/security/b64.c', - 'src/core/security/client_auth_filter.c', - 'src/core/security/credentials.c', - 'src/core/security/credentials_metadata.c', - 'src/core/security/credentials_posix.c', - 'src/core/security/credentials_win32.c', - 'src/core/security/google_default_credentials.c', - 'src/core/security/handshake.c', - 'src/core/security/json_token.c', - 'src/core/security/jwt_verifier.c', - 'src/core/security/secure_endpoint.c', - 'src/core/security/security_connector.c', - 'src/core/security/security_context.c', - 'src/core/security/server_auth_filter.c', - 'src/core/security/server_secure_chttp2.c', - 'src/core/surface/init_secure.c', - 'src/core/surface/secure_channel_create.c', - 'src/core/tsi/fake_transport_security.c', - 'src/core/tsi/ssl_transport_security.c', - 'src/core/tsi/transport_security.c', - 'src/core/census/context.c', - 'src/core/census/initialize.c', - 'src/core/census/mlog.c', - 'src/core/census/operation.c', - 'src/core/census/placeholders.c', - 'src/core/census/tracing.c', + 'src/core/ext/transport/chttp2/client/insecure/channel_create.c', + 'src/core/ext/transport/chttp2/client/secure/secure_channel_create.c', + 'src/core/ext/transport/chttp2/server/insecure/server_chttp2.c', + 'src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c', + 'src/core/ext/transport/chttp2/transport/alpn.c', + 'src/core/ext/transport/chttp2/transport/bin_encoder.c', + 'src/core/ext/transport/chttp2/transport/chttp2_transport.c', + 'src/core/ext/transport/chttp2/transport/frame_data.c', + 'src/core/ext/transport/chttp2/transport/frame_goaway.c', + 'src/core/ext/transport/chttp2/transport/frame_ping.c', + 'src/core/ext/transport/chttp2/transport/frame_rst_stream.c', + 'src/core/ext/transport/chttp2/transport/frame_settings.c', + 'src/core/ext/transport/chttp2/transport/frame_window_update.c', + 'src/core/ext/transport/chttp2/transport/hpack_encoder.c', + 'src/core/ext/transport/chttp2/transport/hpack_parser.c', + 'src/core/ext/transport/chttp2/transport/hpack_table.c', + 'src/core/ext/transport/chttp2/transport/huffsyms.c', + 'src/core/ext/transport/chttp2/transport/incoming_metadata.c', + 'src/core/ext/transport/chttp2/transport/parsing.c', + 'src/core/ext/transport/chttp2/transport/status_conversion.c', + 'src/core/ext/transport/chttp2/transport/stream_lists.c', + 'src/core/ext/transport/chttp2/transport/stream_map.c', + 'src/core/ext/transport/chttp2/transport/timeout_encoding.c', + 'src/core/ext/transport/chttp2/transport/varint.c', + 'src/core/ext/transport/chttp2/transport/writing.c', + 'src/core/lib/census/context.c', + 'src/core/lib/census/grpc_context.c', + 'src/core/lib/census/grpc_filter.c', + 'src/core/lib/census/grpc_plugin.c', + 'src/core/lib/census/initialize.c', + 'src/core/lib/census/mlog.c', + 'src/core/lib/census/operation.c', + 'src/core/lib/census/placeholders.c', + 'src/core/lib/census/tracing.c', + 'src/core/lib/channel/channel_args.c', + 'src/core/lib/channel/channel_stack.c', + 'src/core/lib/channel/channel_stack_builder.c', + 'src/core/lib/channel/client_channel.c', + 'src/core/lib/channel/compress_filter.c', + 'src/core/lib/channel/connected_channel.c', + 'src/core/lib/channel/http_client_filter.c', + 'src/core/lib/channel/http_server_filter.c', + 'src/core/lib/channel/subchannel_call_holder.c', + 'src/core/lib/client_config/client_config.c', + 'src/core/lib/client_config/connector.c', + 'src/core/lib/client_config/default_initial_connect_string.c', + 'src/core/lib/client_config/initial_connect_string.c', + 'src/core/lib/client_config/lb_policies/load_balancer_api.c', + 'src/core/lib/client_config/lb_policies/pick_first.c', + 'src/core/lib/client_config/lb_policies/round_robin.c', + 'src/core/lib/client_config/lb_policy.c', + 'src/core/lib/client_config/lb_policy_factory.c', + 'src/core/lib/client_config/lb_policy_registry.c', + 'src/core/lib/client_config/resolver.c', + 'src/core/lib/client_config/resolver_factory.c', + 'src/core/lib/client_config/resolver_registry.c', + 'src/core/lib/client_config/resolvers/dns_resolver.c', + 'src/core/lib/client_config/resolvers/sockaddr_resolver.c', + 'src/core/lib/client_config/subchannel.c', + 'src/core/lib/client_config/subchannel_factory.c', + 'src/core/lib/client_config/subchannel_index.c', + 'src/core/lib/client_config/uri_parser.c', + 'src/core/lib/compression/compression_algorithm.c', + 'src/core/lib/compression/message_compress.c', + 'src/core/lib/debug/trace.c', + 'src/core/lib/http/format_request.c', + 'src/core/lib/http/httpcli.c', + 'src/core/lib/http/httpcli_security_connector.c', + 'src/core/lib/http/parser.c', + 'src/core/lib/iomgr/closure.c', + 'src/core/lib/iomgr/endpoint.c', + 'src/core/lib/iomgr/endpoint_pair_posix.c', + 'src/core/lib/iomgr/endpoint_pair_windows.c', + 'src/core/lib/iomgr/exec_ctx.c', + 'src/core/lib/iomgr/executor.c', + 'src/core/lib/iomgr/fd_posix.c', + 'src/core/lib/iomgr/iocp_windows.c', + 'src/core/lib/iomgr/iomgr.c', + 'src/core/lib/iomgr/iomgr_posix.c', + 'src/core/lib/iomgr/iomgr_windows.c', + 'src/core/lib/iomgr/pollset_multipoller_with_epoll.c', + 'src/core/lib/iomgr/pollset_multipoller_with_poll_posix.c', + 'src/core/lib/iomgr/pollset_posix.c', + 'src/core/lib/iomgr/pollset_set_posix.c', + 'src/core/lib/iomgr/pollset_set_windows.c', + 'src/core/lib/iomgr/pollset_windows.c', + 'src/core/lib/iomgr/resolve_address_posix.c', + 'src/core/lib/iomgr/resolve_address_windows.c', + 'src/core/lib/iomgr/sockaddr_utils.c', + 'src/core/lib/iomgr/socket_utils_common_posix.c', + 'src/core/lib/iomgr/socket_utils_linux.c', + 'src/core/lib/iomgr/socket_utils_posix.c', + 'src/core/lib/iomgr/socket_windows.c', + 'src/core/lib/iomgr/tcp_client_posix.c', + 'src/core/lib/iomgr/tcp_client_windows.c', + 'src/core/lib/iomgr/tcp_posix.c', + 'src/core/lib/iomgr/tcp_server_posix.c', + 'src/core/lib/iomgr/tcp_server_windows.c', + 'src/core/lib/iomgr/tcp_windows.c', + 'src/core/lib/iomgr/time_averaged_stats.c', + 'src/core/lib/iomgr/timer.c', + 'src/core/lib/iomgr/timer_heap.c', + 'src/core/lib/iomgr/udp_server.c', + 'src/core/lib/iomgr/unix_sockets_posix.c', + 'src/core/lib/iomgr/unix_sockets_posix_noop.c', + 'src/core/lib/iomgr/wakeup_fd_eventfd.c', + 'src/core/lib/iomgr/wakeup_fd_nospecial.c', + 'src/core/lib/iomgr/wakeup_fd_pipe.c', + 'src/core/lib/iomgr/wakeup_fd_posix.c', + 'src/core/lib/iomgr/workqueue_posix.c', + 'src/core/lib/iomgr/workqueue_windows.c', + 'src/core/lib/json/json.c', + 'src/core/lib/json/json_reader.c', + 'src/core/lib/json/json_string.c', + 'src/core/lib/json/json_writer.c', + 'src/core/lib/proto/grpc/lb/v0/load_balancer.pb.c', + 'src/core/lib/security/b64.c', + 'src/core/lib/security/client_auth_filter.c', + 'src/core/lib/security/credentials.c', + 'src/core/lib/security/credentials_metadata.c', + 'src/core/lib/security/credentials_posix.c', + 'src/core/lib/security/credentials_win32.c', + 'src/core/lib/security/google_default_credentials.c', + 'src/core/lib/security/handshake.c', + 'src/core/lib/security/json_token.c', + 'src/core/lib/security/jwt_verifier.c', + 'src/core/lib/security/secure_endpoint.c', + 'src/core/lib/security/security_connector.c', + 'src/core/lib/security/security_context.c', + 'src/core/lib/security/server_auth_filter.c', + 'src/core/lib/surface/alarm.c', + 'src/core/lib/surface/api_trace.c', + 'src/core/lib/surface/byte_buffer.c', + 'src/core/lib/surface/byte_buffer_reader.c', + 'src/core/lib/surface/call.c', + 'src/core/lib/surface/call_details.c', + 'src/core/lib/surface/call_log_batch.c', + 'src/core/lib/surface/channel.c', + 'src/core/lib/surface/channel_connectivity.c', + 'src/core/lib/surface/channel_init.c', + 'src/core/lib/surface/channel_ping.c', + 'src/core/lib/surface/channel_stack_type.c', + 'src/core/lib/surface/completion_queue.c', + 'src/core/lib/surface/event_string.c', + 'src/core/lib/surface/init.c', + 'src/core/lib/surface/init_secure.c', + 'src/core/lib/surface/lame_client.c', + 'src/core/lib/surface/metadata_array.c', + 'src/core/lib/surface/server.c', + 'src/core/lib/surface/validate_metadata.c', + 'src/core/lib/surface/version.c', + 'src/core/lib/transport/byte_stream.c', + 'src/core/lib/transport/connectivity_state.c', + 'src/core/lib/transport/metadata.c', + 'src/core/lib/transport/metadata_batch.c', + 'src/core/lib/transport/static_metadata.c', + 'src/core/lib/transport/transport.c', + 'src/core/lib/transport/transport_op_string.c', + 'src/core/lib/tsi/fake_transport_security.c', + 'src/core/lib/tsi/ssl_transport_security.c', + 'src/core/lib/tsi/transport_security.c', 'third_party/nanopb/pb_common.c', 'third_party/nanopb/pb_decode.c', 'third_party/nanopb/pb_encode.c', diff --git a/build.yaml b/build.yaml index 1f010244134..c16712ea5a8 100644 --- a/build.yaml +++ b/build.yaml @@ -13,16 +13,16 @@ filegroups: public_headers: - include/grpc/census.h headers: - - src/core/census/aggregation.h - - src/core/census/mlog.h - - src/core/census/rpc_metric_id.h - src: - - src/core/census/context.c - - src/core/census/initialize.c - - src/core/census/mlog.c - - src/core/census/operation.c - - src/core/census/placeholders.c - - src/core/census/tracing.c + - src/core/lib/census/aggregation.h + - src/core/lib/census/mlog.h + - src/core/lib/census/rpc_metric_id.h + src: + - src/core/lib/census/context.c + - src/core/lib/census/initialize.c + - src/core/lib/census/mlog.c + - src/core/lib/census/operation.c + - src/core/lib/census/placeholders.c + - src/core/lib/census/tracing.c - name: gpr public_headers: - include/grpc/support/alloc.h @@ -54,61 +54,63 @@ filegroups: - include/grpc/support/tls_pthread.h - include/grpc/support/useful.h headers: - - src/core/profiling/timers.h - - src/core/support/block_annotate.h - - src/core/support/env.h - - src/core/support/load_file.h - - src/core/support/murmur_hash.h - - src/core/support/stack_lockfree.h - - src/core/support/string.h - - src/core/support/string_win32.h - - src/core/support/thd_internal.h - - src/core/support/time_precise.h - - src/core/support/tmpfile.h - src: - - src/core/profiling/basic_timers.c - - src/core/profiling/stap_timers.c - - src/core/support/alloc.c - - src/core/support/avl.c - - src/core/support/cmdline.c - - src/core/support/cpu_iphone.c - - src/core/support/cpu_linux.c - - src/core/support/cpu_posix.c - - src/core/support/cpu_windows.c - - src/core/support/env_linux.c - - src/core/support/env_posix.c - - src/core/support/env_win32.c - - src/core/support/histogram.c - - src/core/support/host_port.c - - src/core/support/load_file.c - - src/core/support/log.c - - src/core/support/log_android.c - - src/core/support/log_linux.c - - src/core/support/log_posix.c - - src/core/support/log_win32.c - - src/core/support/murmur_hash.c - - src/core/support/slice.c - - src/core/support/slice_buffer.c - - src/core/support/stack_lockfree.c - - src/core/support/string.c - - src/core/support/string_posix.c - - src/core/support/string_win32.c - - src/core/support/subprocess_posix.c - - src/core/support/subprocess_windows.c - - src/core/support/sync.c - - src/core/support/sync_posix.c - - src/core/support/sync_win32.c - - src/core/support/thd.c - - src/core/support/thd_posix.c - - src/core/support/thd_win32.c - - src/core/support/time.c - - src/core/support/time_posix.c - - src/core/support/time_precise.c - - src/core/support/time_win32.c - - src/core/support/tls_pthread.c - - src/core/support/tmpfile_posix.c - - src/core/support/tmpfile_win32.c - - src/core/support/wrap_memcpy.c + - src/core/lib/profiling/timers.h + - src/core/lib/support/backoff.h + - src/core/lib/support/block_annotate.h + - src/core/lib/support/env.h + - src/core/lib/support/load_file.h + - src/core/lib/support/murmur_hash.h + - src/core/lib/support/stack_lockfree.h + - src/core/lib/support/string.h + - src/core/lib/support/string_win32.h + - src/core/lib/support/thd_internal.h + - src/core/lib/support/time_precise.h + - src/core/lib/support/tmpfile.h + src: + - src/core/lib/profiling/basic_timers.c + - src/core/lib/profiling/stap_timers.c + - src/core/lib/support/alloc.c + - src/core/lib/support/avl.c + - src/core/lib/support/backoff.c + - src/core/lib/support/cmdline.c + - src/core/lib/support/cpu_iphone.c + - src/core/lib/support/cpu_linux.c + - src/core/lib/support/cpu_posix.c + - src/core/lib/support/cpu_windows.c + - src/core/lib/support/env_linux.c + - src/core/lib/support/env_posix.c + - src/core/lib/support/env_win32.c + - src/core/lib/support/histogram.c + - src/core/lib/support/host_port.c + - src/core/lib/support/load_file.c + - src/core/lib/support/log.c + - src/core/lib/support/log_android.c + - src/core/lib/support/log_linux.c + - src/core/lib/support/log_posix.c + - src/core/lib/support/log_win32.c + - src/core/lib/support/murmur_hash.c + - src/core/lib/support/slice.c + - src/core/lib/support/slice_buffer.c + - src/core/lib/support/stack_lockfree.c + - src/core/lib/support/string.c + - src/core/lib/support/string_posix.c + - src/core/lib/support/string_win32.c + - src/core/lib/support/subprocess_posix.c + - src/core/lib/support/subprocess_windows.c + - src/core/lib/support/sync.c + - src/core/lib/support/sync_posix.c + - src/core/lib/support/sync_win32.c + - src/core/lib/support/thd.c + - src/core/lib/support/thd_posix.c + - src/core/lib/support/thd_win32.c + - src/core/lib/support/time.c + - src/core/lib/support/time_posix.c + - src/core/lib/support/time_precise.c + - src/core/lib/support/time_win32.c + - src/core/lib/support/tls_pthread.c + - src/core/lib/support/tmpfile_posix.c + - src/core/lib/support/tmpfile_win32.c + - src/core/lib/support/wrap_memcpy.c - name: gpr_codegen public_headers: - include/grpc/impl/codegen/alloc.h @@ -173,6 +175,7 @@ filegroups: - include/grpc++/support/time.h headers: - src/cpp/client/create_channel_internal.h + - src/cpp/common/core_codegen.h - src/cpp/common/create_auth_context.h - src/cpp/server/dynamic_thread_pool.h - src/cpp/server/thread_pool_interface.h @@ -184,11 +187,10 @@ filegroups: - src/cpp/client/credentials.cc - src/cpp/client/generic_stub.cc - src/cpp/client/insecure_credentials.cc - - src/cpp/common/call.cc - src/cpp/common/channel_arguments.cc - src/cpp/common/completion_queue.cc + - src/cpp/common/core_codegen.cc - src/cpp/common/rpc_method.cc - - src/cpp/proto/proto_utils.cc - src/cpp/server/async_generic_service.cc - src/cpp/server/create_default_thread_pool.cc - src/cpp/server/dynamic_thread_pool.cc @@ -215,6 +217,7 @@ filegroups: - include/grpc++/impl/codegen/completion_queue_tag.h - include/grpc++/impl/codegen/config.h - include/grpc++/impl/codegen/config_protobuf.h + - include/grpc++/impl/codegen/core_codegen_interface.h - include/grpc++/impl/codegen/grpc_library.h - include/grpc++/impl/codegen/method_handler_impl.h - include/grpc++/impl/codegen/proto_utils.h @@ -235,7 +238,7 @@ filegroups: - include/grpc++/impl/codegen/sync_stream.h - include/grpc++/impl/codegen/time.h src: - - src/cpp/codegen/grpc_library.cc + - src/cpp/codegen/codegen_init.cc - name: grpc_base public_headers: - include/grpc/byte_buffer.h @@ -244,252 +247,217 @@ filegroups: - include/grpc/grpc.h - include/grpc/status.h headers: - - src/core/census/grpc_filter.h - - src/core/channel/channel_args.h - - src/core/channel/channel_stack.h - - src/core/channel/client_channel.h - - src/core/channel/client_uchannel.h - - src/core/channel/compress_filter.h - - src/core/channel/connected_channel.h - - src/core/channel/context.h - - src/core/channel/http_client_filter.h - - src/core/channel/http_server_filter.h - - src/core/channel/subchannel_call_holder.h - - src/core/client_config/client_config.h - - src/core/client_config/connector.h - - src/core/client_config/initial_connect_string.h - - src/core/client_config/lb_policies/load_balancer_api.h - - src/core/client_config/lb_policies/pick_first.h - - src/core/client_config/lb_policies/round_robin.h - - src/core/client_config/lb_policy.h - - src/core/client_config/lb_policy_factory.h - - src/core/client_config/lb_policy_registry.h - - src/core/client_config/resolver.h - - src/core/client_config/resolver_factory.h - - src/core/client_config/resolver_registry.h - - src/core/client_config/resolvers/dns_resolver.h - - src/core/client_config/resolvers/sockaddr_resolver.h - - src/core/client_config/subchannel.h - - src/core/client_config/subchannel_factory.h - - src/core/client_config/subchannel_index.h - - src/core/client_config/uri_parser.h - - src/core/compression/algorithm_metadata.h - - src/core/compression/message_compress.h - - src/core/debug/trace.h - - src/core/httpcli/format_request.h - - src/core/httpcli/httpcli.h - - src/core/httpcli/parser.h - - src/core/iomgr/closure.h - - src/core/iomgr/endpoint.h - - src/core/iomgr/endpoint_pair.h - - src/core/iomgr/exec_ctx.h - - src/core/iomgr/executor.h - - src/core/iomgr/fd_posix.h - - src/core/iomgr/iocp_windows.h - - src/core/iomgr/iomgr.h - - src/core/iomgr/iomgr_internal.h - - src/core/iomgr/iomgr_posix.h - - src/core/iomgr/pollset.h - - src/core/iomgr/pollset_posix.h - - src/core/iomgr/pollset_set.h - - src/core/iomgr/pollset_set_posix.h - - src/core/iomgr/pollset_set_windows.h - - src/core/iomgr/pollset_windows.h - - src/core/iomgr/resolve_address.h - - src/core/iomgr/sockaddr.h - - src/core/iomgr/sockaddr_posix.h - - src/core/iomgr/sockaddr_utils.h - - src/core/iomgr/sockaddr_win32.h - - src/core/iomgr/socket_utils_posix.h - - src/core/iomgr/socket_windows.h - - src/core/iomgr/tcp_client.h - - src/core/iomgr/tcp_posix.h - - src/core/iomgr/tcp_server.h - - src/core/iomgr/tcp_windows.h - - src/core/iomgr/time_averaged_stats.h - - src/core/iomgr/timer.h - - src/core/iomgr/timer_heap.h - - src/core/iomgr/udp_server.h - - src/core/iomgr/wakeup_fd_pipe.h - - src/core/iomgr/wakeup_fd_posix.h - - src/core/iomgr/workqueue.h - - src/core/iomgr/workqueue_posix.h - - src/core/iomgr/workqueue_windows.h - - src/core/json/json.h - - src/core/json/json_common.h - - src/core/json/json_reader.h - - src/core/json/json_writer.h - - src/core/proto/grpc/lb/v0/load_balancer.pb.h - - src/core/statistics/census_interface.h - - src/core/statistics/census_rpc_stats.h - - src/core/surface/api_trace.h - - src/core/surface/call.h - - src/core/surface/call_test_only.h - - src/core/surface/channel.h - - src/core/surface/completion_queue.h - - src/core/surface/event_string.h - - src/core/surface/init.h - - src/core/surface/server.h - - src/core/surface/surface_trace.h - - src/core/transport/byte_stream.h - - src/core/transport/chttp2/alpn.h - - src/core/transport/chttp2/bin_encoder.h - - src/core/transport/chttp2/frame.h - - src/core/transport/chttp2/frame_data.h - - src/core/transport/chttp2/frame_goaway.h - - src/core/transport/chttp2/frame_ping.h - - src/core/transport/chttp2/frame_rst_stream.h - - src/core/transport/chttp2/frame_settings.h - - src/core/transport/chttp2/frame_window_update.h - - src/core/transport/chttp2/hpack_encoder.h - - src/core/transport/chttp2/hpack_parser.h - - src/core/transport/chttp2/hpack_table.h - - src/core/transport/chttp2/http2_errors.h - - src/core/transport/chttp2/huffsyms.h - - src/core/transport/chttp2/incoming_metadata.h - - src/core/transport/chttp2/internal.h - - src/core/transport/chttp2/status_conversion.h - - src/core/transport/chttp2/stream_map.h - - src/core/transport/chttp2/timeout_encoding.h - - src/core/transport/chttp2/varint.h - - src/core/transport/chttp2_transport.h - - src/core/transport/connectivity_state.h - - src/core/transport/metadata.h - - src/core/transport/metadata_batch.h - - src/core/transport/static_metadata.h - - src/core/transport/transport.h - - src/core/transport/transport_impl.h - src: - - src/core/census/grpc_context.c - - src/core/census/grpc_filter.c - - src/core/channel/channel_args.c - - src/core/channel/channel_stack.c - - src/core/channel/client_channel.c - - src/core/channel/client_uchannel.c - - src/core/channel/compress_filter.c - - src/core/channel/connected_channel.c - - src/core/channel/http_client_filter.c - - src/core/channel/http_server_filter.c - - src/core/channel/subchannel_call_holder.c - - src/core/client_config/client_config.c - - src/core/client_config/connector.c - - src/core/client_config/default_initial_connect_string.c - - src/core/client_config/initial_connect_string.c - - src/core/client_config/lb_policies/load_balancer_api.c - - src/core/client_config/lb_policies/pick_first.c - - src/core/client_config/lb_policies/round_robin.c - - src/core/client_config/lb_policy.c - - src/core/client_config/lb_policy_factory.c - - src/core/client_config/lb_policy_registry.c - - src/core/client_config/resolver.c - - src/core/client_config/resolver_factory.c - - src/core/client_config/resolver_registry.c - - src/core/client_config/resolvers/dns_resolver.c - - src/core/client_config/resolvers/sockaddr_resolver.c - - src/core/client_config/subchannel.c - - src/core/client_config/subchannel_factory.c - - src/core/client_config/subchannel_index.c - - src/core/client_config/uri_parser.c - - src/core/compression/compression_algorithm.c - - src/core/compression/message_compress.c - - src/core/debug/trace.c - - src/core/httpcli/format_request.c - - src/core/httpcli/httpcli.c - - src/core/httpcli/parser.c - - src/core/iomgr/closure.c - - src/core/iomgr/endpoint.c - - src/core/iomgr/endpoint_pair_posix.c - - src/core/iomgr/endpoint_pair_windows.c - - src/core/iomgr/exec_ctx.c - - src/core/iomgr/executor.c - - src/core/iomgr/fd_posix.c - - src/core/iomgr/iocp_windows.c - - src/core/iomgr/iomgr.c - - src/core/iomgr/iomgr_posix.c - - src/core/iomgr/iomgr_windows.c - - src/core/iomgr/pollset_multipoller_with_epoll.c - - src/core/iomgr/pollset_multipoller_with_poll_posix.c - - src/core/iomgr/pollset_posix.c - - src/core/iomgr/pollset_set_posix.c - - src/core/iomgr/pollset_set_windows.c - - src/core/iomgr/pollset_windows.c - - src/core/iomgr/resolve_address_posix.c - - src/core/iomgr/resolve_address_windows.c - - src/core/iomgr/sockaddr_utils.c - - src/core/iomgr/socket_utils_common_posix.c - - src/core/iomgr/socket_utils_linux.c - - src/core/iomgr/socket_utils_posix.c - - src/core/iomgr/socket_windows.c - - src/core/iomgr/tcp_client_posix.c - - src/core/iomgr/tcp_client_windows.c - - src/core/iomgr/tcp_posix.c - - src/core/iomgr/tcp_server_posix.c - - src/core/iomgr/tcp_server_windows.c - - src/core/iomgr/tcp_windows.c - - src/core/iomgr/time_averaged_stats.c - - src/core/iomgr/timer.c - - src/core/iomgr/timer_heap.c - - src/core/iomgr/udp_server.c - - src/core/iomgr/wakeup_fd_eventfd.c - - src/core/iomgr/wakeup_fd_nospecial.c - - src/core/iomgr/wakeup_fd_pipe.c - - src/core/iomgr/wakeup_fd_posix.c - - src/core/iomgr/workqueue_posix.c - - src/core/iomgr/workqueue_windows.c - - src/core/json/json.c - - src/core/json/json_reader.c - - src/core/json/json_string.c - - src/core/json/json_writer.c - - src/core/proto/grpc/lb/v0/load_balancer.pb.c - - src/core/surface/alarm.c - - src/core/surface/api_trace.c - - src/core/surface/byte_buffer.c - - src/core/surface/byte_buffer_reader.c - - src/core/surface/call.c - - src/core/surface/call_details.c - - src/core/surface/call_log_batch.c - - src/core/surface/channel.c - - src/core/surface/channel_connectivity.c - - src/core/surface/channel_create.c - - src/core/surface/channel_ping.c - - src/core/surface/completion_queue.c - - src/core/surface/event_string.c - - src/core/surface/init.c - - src/core/surface/lame_client.c - - src/core/surface/metadata_array.c - - src/core/surface/server.c - - src/core/surface/server_chttp2.c - - src/core/surface/server_create.c - - src/core/surface/validate_metadata.c - - src/core/surface/version.c - - src/core/transport/byte_stream.c - - src/core/transport/chttp2/alpn.c - - src/core/transport/chttp2/bin_encoder.c - - src/core/transport/chttp2/frame_data.c - - src/core/transport/chttp2/frame_goaway.c - - src/core/transport/chttp2/frame_ping.c - - src/core/transport/chttp2/frame_rst_stream.c - - src/core/transport/chttp2/frame_settings.c - - src/core/transport/chttp2/frame_window_update.c - - src/core/transport/chttp2/hpack_encoder.c - - src/core/transport/chttp2/hpack_parser.c - - src/core/transport/chttp2/hpack_table.c - - src/core/transport/chttp2/huffsyms.c - - src/core/transport/chttp2/incoming_metadata.c - - src/core/transport/chttp2/parsing.c - - src/core/transport/chttp2/status_conversion.c - - src/core/transport/chttp2/stream_lists.c - - src/core/transport/chttp2/stream_map.c - - src/core/transport/chttp2/timeout_encoding.c - - src/core/transport/chttp2/varint.c - - src/core/transport/chttp2/writing.c - - src/core/transport/chttp2_transport.c - - src/core/transport/connectivity_state.c - - src/core/transport/metadata.c - - src/core/transport/metadata_batch.c - - src/core/transport/static_metadata.c - - src/core/transport/transport.c - - src/core/transport/transport_op_string.c + - src/core/lib/census/grpc_filter.h + - src/core/lib/census/grpc_plugin.h + - src/core/lib/channel/channel_args.h + - src/core/lib/channel/channel_stack.h + - src/core/lib/channel/channel_stack_builder.h + - src/core/lib/channel/client_channel.h + - src/core/lib/channel/compress_filter.h + - src/core/lib/channel/connected_channel.h + - src/core/lib/channel/context.h + - src/core/lib/channel/http_client_filter.h + - src/core/lib/channel/http_server_filter.h + - src/core/lib/channel/subchannel_call_holder.h + - src/core/lib/client_config/client_config.h + - src/core/lib/client_config/connector.h + - src/core/lib/client_config/initial_connect_string.h + - src/core/lib/client_config/lb_policies/load_balancer_api.h + - src/core/lib/client_config/lb_policies/pick_first.h + - src/core/lib/client_config/lb_policies/round_robin.h + - src/core/lib/client_config/lb_policy.h + - src/core/lib/client_config/lb_policy_factory.h + - src/core/lib/client_config/lb_policy_registry.h + - src/core/lib/client_config/resolver.h + - src/core/lib/client_config/resolver_factory.h + - src/core/lib/client_config/resolver_registry.h + - src/core/lib/client_config/resolvers/dns_resolver.h + - src/core/lib/client_config/resolvers/sockaddr_resolver.h + - src/core/lib/client_config/subchannel.h + - src/core/lib/client_config/subchannel_factory.h + - src/core/lib/client_config/subchannel_index.h + - src/core/lib/client_config/uri_parser.h + - src/core/lib/compression/algorithm_metadata.h + - src/core/lib/compression/message_compress.h + - src/core/lib/debug/trace.h + - src/core/lib/http/format_request.h + - src/core/lib/http/httpcli.h + - src/core/lib/http/parser.h + - src/core/lib/iomgr/closure.h + - src/core/lib/iomgr/endpoint.h + - src/core/lib/iomgr/endpoint_pair.h + - src/core/lib/iomgr/exec_ctx.h + - src/core/lib/iomgr/executor.h + - src/core/lib/iomgr/fd_posix.h + - src/core/lib/iomgr/iocp_windows.h + - src/core/lib/iomgr/iomgr.h + - src/core/lib/iomgr/iomgr_internal.h + - src/core/lib/iomgr/iomgr_posix.h + - src/core/lib/iomgr/pollset.h + - src/core/lib/iomgr/pollset_posix.h + - src/core/lib/iomgr/pollset_set.h + - src/core/lib/iomgr/pollset_set_posix.h + - src/core/lib/iomgr/pollset_set_windows.h + - src/core/lib/iomgr/pollset_windows.h + - src/core/lib/iomgr/resolve_address.h + - src/core/lib/iomgr/sockaddr.h + - src/core/lib/iomgr/sockaddr_posix.h + - src/core/lib/iomgr/sockaddr_utils.h + - src/core/lib/iomgr/sockaddr_win32.h + - src/core/lib/iomgr/socket_utils_posix.h + - src/core/lib/iomgr/socket_windows.h + - src/core/lib/iomgr/tcp_client.h + - src/core/lib/iomgr/tcp_posix.h + - src/core/lib/iomgr/tcp_server.h + - src/core/lib/iomgr/tcp_windows.h + - src/core/lib/iomgr/time_averaged_stats.h + - src/core/lib/iomgr/timer.h + - src/core/lib/iomgr/timer_heap.h + - src/core/lib/iomgr/udp_server.h + - src/core/lib/iomgr/unix_sockets_posix.h + - src/core/lib/iomgr/wakeup_fd_pipe.h + - src/core/lib/iomgr/wakeup_fd_posix.h + - src/core/lib/iomgr/workqueue.h + - src/core/lib/iomgr/workqueue_posix.h + - src/core/lib/iomgr/workqueue_windows.h + - src/core/lib/json/json.h + - src/core/lib/json/json_common.h + - src/core/lib/json/json_reader.h + - src/core/lib/json/json_writer.h + - src/core/lib/proto/grpc/lb/v0/load_balancer.pb.h + - src/core/lib/statistics/census_interface.h + - src/core/lib/statistics/census_rpc_stats.h + - src/core/lib/surface/api_trace.h + - src/core/lib/surface/call.h + - src/core/lib/surface/call_test_only.h + - src/core/lib/surface/channel.h + - src/core/lib/surface/channel_init.h + - src/core/lib/surface/channel_stack_type.h + - src/core/lib/surface/completion_queue.h + - src/core/lib/surface/event_string.h + - src/core/lib/surface/init.h + - src/core/lib/surface/lame_client.h + - src/core/lib/surface/server.h + - src/core/lib/surface/surface_trace.h + - src/core/lib/transport/byte_stream.h + - src/core/lib/transport/connectivity_state.h + - src/core/lib/transport/metadata.h + - src/core/lib/transport/metadata_batch.h + - src/core/lib/transport/static_metadata.h + - src/core/lib/transport/transport.h + - src/core/lib/transport/transport_impl.h + src: + - src/core/lib/census/grpc_context.c + - src/core/lib/census/grpc_filter.c + - src/core/lib/census/grpc_plugin.c + - src/core/lib/channel/channel_args.c + - src/core/lib/channel/channel_stack.c + - src/core/lib/channel/channel_stack_builder.c + - src/core/lib/channel/client_channel.c + - src/core/lib/channel/compress_filter.c + - src/core/lib/channel/connected_channel.c + - src/core/lib/channel/http_client_filter.c + - src/core/lib/channel/http_server_filter.c + - src/core/lib/channel/subchannel_call_holder.c + - src/core/lib/client_config/client_config.c + - src/core/lib/client_config/connector.c + - src/core/lib/client_config/default_initial_connect_string.c + - src/core/lib/client_config/initial_connect_string.c + - src/core/lib/client_config/lb_policies/load_balancer_api.c + - src/core/lib/client_config/lb_policies/pick_first.c + - src/core/lib/client_config/lb_policies/round_robin.c + - src/core/lib/client_config/lb_policy.c + - src/core/lib/client_config/lb_policy_factory.c + - src/core/lib/client_config/lb_policy_registry.c + - src/core/lib/client_config/resolver.c + - src/core/lib/client_config/resolver_factory.c + - src/core/lib/client_config/resolver_registry.c + - src/core/lib/client_config/resolvers/dns_resolver.c + - src/core/lib/client_config/resolvers/sockaddr_resolver.c + - src/core/lib/client_config/subchannel.c + - src/core/lib/client_config/subchannel_factory.c + - src/core/lib/client_config/subchannel_index.c + - src/core/lib/client_config/uri_parser.c + - src/core/lib/compression/compression_algorithm.c + - src/core/lib/compression/message_compress.c + - src/core/lib/debug/trace.c + - src/core/lib/http/format_request.c + - src/core/lib/http/httpcli.c + - src/core/lib/http/parser.c + - src/core/lib/iomgr/closure.c + - src/core/lib/iomgr/endpoint.c + - src/core/lib/iomgr/endpoint_pair_posix.c + - src/core/lib/iomgr/endpoint_pair_windows.c + - src/core/lib/iomgr/exec_ctx.c + - src/core/lib/iomgr/executor.c + - src/core/lib/iomgr/fd_posix.c + - src/core/lib/iomgr/iocp_windows.c + - src/core/lib/iomgr/iomgr.c + - src/core/lib/iomgr/iomgr_posix.c + - src/core/lib/iomgr/iomgr_windows.c + - src/core/lib/iomgr/pollset_multipoller_with_epoll.c + - src/core/lib/iomgr/pollset_multipoller_with_poll_posix.c + - src/core/lib/iomgr/pollset_posix.c + - src/core/lib/iomgr/pollset_set_posix.c + - src/core/lib/iomgr/pollset_set_windows.c + - src/core/lib/iomgr/pollset_windows.c + - src/core/lib/iomgr/resolve_address_posix.c + - src/core/lib/iomgr/resolve_address_windows.c + - src/core/lib/iomgr/sockaddr_utils.c + - src/core/lib/iomgr/socket_utils_common_posix.c + - src/core/lib/iomgr/socket_utils_linux.c + - src/core/lib/iomgr/socket_utils_posix.c + - src/core/lib/iomgr/socket_windows.c + - src/core/lib/iomgr/tcp_client_posix.c + - src/core/lib/iomgr/tcp_client_windows.c + - src/core/lib/iomgr/tcp_posix.c + - src/core/lib/iomgr/tcp_server_posix.c + - src/core/lib/iomgr/tcp_server_windows.c + - src/core/lib/iomgr/tcp_windows.c + - src/core/lib/iomgr/time_averaged_stats.c + - src/core/lib/iomgr/timer.c + - src/core/lib/iomgr/timer_heap.c + - src/core/lib/iomgr/udp_server.c + - src/core/lib/iomgr/unix_sockets_posix.c + - src/core/lib/iomgr/unix_sockets_posix_noop.c + - src/core/lib/iomgr/wakeup_fd_eventfd.c + - src/core/lib/iomgr/wakeup_fd_nospecial.c + - src/core/lib/iomgr/wakeup_fd_pipe.c + - src/core/lib/iomgr/wakeup_fd_posix.c + - src/core/lib/iomgr/workqueue_posix.c + - src/core/lib/iomgr/workqueue_windows.c + - src/core/lib/json/json.c + - src/core/lib/json/json_reader.c + - src/core/lib/json/json_string.c + - src/core/lib/json/json_writer.c + - src/core/lib/proto/grpc/lb/v0/load_balancer.pb.c + - src/core/lib/surface/alarm.c + - src/core/lib/surface/api_trace.c + - src/core/lib/surface/byte_buffer.c + - src/core/lib/surface/byte_buffer_reader.c + - src/core/lib/surface/call.c + - src/core/lib/surface/call_details.c + - src/core/lib/surface/call_log_batch.c + - src/core/lib/surface/channel.c + - src/core/lib/surface/channel_connectivity.c + - src/core/lib/surface/channel_init.c + - src/core/lib/surface/channel_ping.c + - src/core/lib/surface/channel_stack_type.c + - src/core/lib/surface/completion_queue.c + - src/core/lib/surface/event_string.c + - src/core/lib/surface/init.c + - src/core/lib/surface/lame_client.c + - src/core/lib/surface/metadata_array.c + - src/core/lib/surface/server.c + - src/core/lib/surface/validate_metadata.c + - src/core/lib/surface/version.c + - src/core/lib/transport/byte_stream.c + - src/core/lib/transport/connectivity_state.c + - src/core/lib/transport/metadata.c + - src/core/lib/transport/metadata_batch.c + - src/core/lib/transport/static_metadata.c + - src/core/lib/transport/transport.c + - src/core/lib/transport/transport_op_string.c - name: grpc_codegen public_headers: - include/grpc/impl/codegen/byte_buffer.h @@ -500,42 +468,40 @@ filegroups: - include/grpc/impl/codegen/status.h - name: grpc_secure headers: - - src/core/security/auth_filters.h - - src/core/security/b64.h - - src/core/security/credentials.h - - src/core/security/handshake.h - - src/core/security/json_token.h - - src/core/security/jwt_verifier.h - - src/core/security/secure_endpoint.h - - src/core/security/security_connector.h - - src/core/security/security_context.h - - src/core/tsi/fake_transport_security.h - - src/core/tsi/ssl_transport_security.h - - src/core/tsi/ssl_types.h - - src/core/tsi/transport_security.h - - src/core/tsi/transport_security_interface.h - src: - - src/core/httpcli/httpcli_security_connector.c - - src/core/security/b64.c - - src/core/security/client_auth_filter.c - - src/core/security/credentials.c - - src/core/security/credentials_metadata.c - - src/core/security/credentials_posix.c - - src/core/security/credentials_win32.c - - src/core/security/google_default_credentials.c - - src/core/security/handshake.c - - src/core/security/json_token.c - - src/core/security/jwt_verifier.c - - src/core/security/secure_endpoint.c - - src/core/security/security_connector.c - - src/core/security/security_context.c - - src/core/security/server_auth_filter.c - - src/core/security/server_secure_chttp2.c - - src/core/surface/init_secure.c - - src/core/surface/secure_channel_create.c - - src/core/tsi/fake_transport_security.c - - src/core/tsi/ssl_transport_security.c - - src/core/tsi/transport_security.c + - src/core/lib/security/auth_filters.h + - src/core/lib/security/b64.h + - src/core/lib/security/credentials.h + - src/core/lib/security/handshake.h + - src/core/lib/security/json_token.h + - src/core/lib/security/jwt_verifier.h + - src/core/lib/security/secure_endpoint.h + - src/core/lib/security/security_connector.h + - src/core/lib/security/security_context.h + - src/core/lib/tsi/fake_transport_security.h + - src/core/lib/tsi/ssl_transport_security.h + - src/core/lib/tsi/ssl_types.h + - src/core/lib/tsi/transport_security.h + - src/core/lib/tsi/transport_security_interface.h + src: + - src/core/lib/http/httpcli_security_connector.c + - src/core/lib/security/b64.c + - src/core/lib/security/client_auth_filter.c + - src/core/lib/security/credentials.c + - src/core/lib/security/credentials_metadata.c + - src/core/lib/security/credentials_posix.c + - src/core/lib/security/credentials_win32.c + - src/core/lib/security/google_default_credentials.c + - src/core/lib/security/handshake.c + - src/core/lib/security/json_token.c + - src/core/lib/security/jwt_verifier.c + - src/core/lib/security/secure_endpoint.c + - src/core/lib/security/security_connector.c + - src/core/lib/security/security_context.c + - src/core/lib/security/server_auth_filter.c + - src/core/lib/surface/init_secure.c + - src/core/lib/tsi/fake_transport_security.c + - src/core/lib/tsi/ssl_transport_security.c + - src/core/lib/tsi/transport_security.c - name: grpc_test_util_base headers: - test/core/end2end/cq_verifier.h @@ -544,6 +510,7 @@ filegroups: - test/core/util/grpc_profiler.h - test/core/util/parse_hexstring.h - test/core/util/port.h + - test/core/util/port_server_client.h - test/core/util/slice_splitter.h src: - test/core/end2end/cq_verifier.c @@ -552,8 +519,80 @@ filegroups: - test/core/util/grpc_profiler.c - test/core/util/parse_hexstring.c - test/core/util/port_posix.c + - test/core/util/port_server_client.c - test/core/util/port_windows.c - test/core/util/slice_splitter.c +- name: grpc_transport_chttp2 + headers: + - src/core/ext/transport/chttp2/transport/alpn.h + - src/core/ext/transport/chttp2/transport/bin_encoder.h + - src/core/ext/transport/chttp2/transport/chttp2_transport.h + - src/core/ext/transport/chttp2/transport/frame.h + - src/core/ext/transport/chttp2/transport/frame_data.h + - src/core/ext/transport/chttp2/transport/frame_goaway.h + - src/core/ext/transport/chttp2/transport/frame_ping.h + - src/core/ext/transport/chttp2/transport/frame_rst_stream.h + - src/core/ext/transport/chttp2/transport/frame_settings.h + - src/core/ext/transport/chttp2/transport/frame_window_update.h + - src/core/ext/transport/chttp2/transport/hpack_encoder.h + - src/core/ext/transport/chttp2/transport/hpack_parser.h + - src/core/ext/transport/chttp2/transport/hpack_table.h + - src/core/ext/transport/chttp2/transport/http2_errors.h + - src/core/ext/transport/chttp2/transport/huffsyms.h + - src/core/ext/transport/chttp2/transport/incoming_metadata.h + - src/core/ext/transport/chttp2/transport/internal.h + - src/core/ext/transport/chttp2/transport/status_conversion.h + - src/core/ext/transport/chttp2/transport/stream_map.h + - src/core/ext/transport/chttp2/transport/timeout_encoding.h + - src/core/ext/transport/chttp2/transport/varint.h + src: + - src/core/ext/transport/chttp2/transport/alpn.c + - src/core/ext/transport/chttp2/transport/bin_encoder.c + - src/core/ext/transport/chttp2/transport/chttp2_transport.c + - src/core/ext/transport/chttp2/transport/frame_data.c + - src/core/ext/transport/chttp2/transport/frame_goaway.c + - src/core/ext/transport/chttp2/transport/frame_ping.c + - src/core/ext/transport/chttp2/transport/frame_rst_stream.c + - src/core/ext/transport/chttp2/transport/frame_settings.c + - src/core/ext/transport/chttp2/transport/frame_window_update.c + - src/core/ext/transport/chttp2/transport/hpack_encoder.c + - src/core/ext/transport/chttp2/transport/hpack_parser.c + - src/core/ext/transport/chttp2/transport/hpack_table.c + - src/core/ext/transport/chttp2/transport/huffsyms.c + - src/core/ext/transport/chttp2/transport/incoming_metadata.c + - src/core/ext/transport/chttp2/transport/parsing.c + - src/core/ext/transport/chttp2/transport/status_conversion.c + - src/core/ext/transport/chttp2/transport/stream_lists.c + - src/core/ext/transport/chttp2/transport/stream_map.c + - src/core/ext/transport/chttp2/transport/timeout_encoding.c + - src/core/ext/transport/chttp2/transport/varint.c + - src/core/ext/transport/chttp2/transport/writing.c + uses: + - grpc_base +- name: grpc_transport_chttp2_client_insecure + src: + - src/core/ext/transport/chttp2/client/insecure/channel_create.c + uses: + - grpc_transport_chttp2 + - grpc_base +- name: grpc_transport_chttp2_client_secure + src: + - src/core/ext/transport/chttp2/client/secure/secure_channel_create.c + uses: + - grpc_transport_chttp2 + - grpc_base +- name: grpc_transport_chttp2_server_insecure + src: + - src/core/ext/transport/chttp2/server/insecure/server_chttp2.c + uses: + - grpc_transport_chttp2 + - grpc_base +- name: grpc_transport_chttp2_server_secure + src: + - src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c + uses: + - grpc_transport_chttp2 + - grpc_base - name: nanopb headers: - third_party/nanopb/pb.h @@ -595,9 +634,13 @@ libs: deps_linkage: static dll: true filegroups: - - grpc_codegen - grpc_base + - grpc_transport_chttp2_server_secure + - grpc_transport_chttp2_client_secure + - grpc_transport_chttp2_server_insecure + - grpc_transport_chttp2_client_insecure - grpc_secure + - grpc_codegen - census - nanopb secure: true @@ -605,6 +648,16 @@ libs: - grpc.dependencies.openssl - grpc.dependencies.zlib vs_project_guid: '{29D16885-7228-4C31-81ED-5F9187C7F2A9}' +- name: grpc_codegen_lib + build: protoc + language: c + headers: [] + src: [] + filegroups: + - gpr_codegen + - grpc_codegen + secure: false + vs_project_guid: '{A828FD72-44CE-4EA5-8966-6E4624458D58}' - name: grpc_dll build: private language: c @@ -659,7 +712,7 @@ libs: build: all language: c src: - - src/core/surface/init_unsecure.c + - src/core/lib/surface/init_unsecure.c deps: - gpr baselib: true @@ -667,6 +720,8 @@ libs: dll: true filegroups: - grpc_base + - grpc_transport_chttp2_server_insecure + - grpc_transport_chttp2_client_insecure - grpc_codegen - census - nanopb @@ -678,9 +733,9 @@ libs: public_headers: - include/grpc/grpc_zookeeper.h headers: - - src/core/client_config/resolvers/zookeeper_resolver.h + - src/core/lib/client_config/resolvers/zookeeper_resolver.h src: - - src/core/client_config/resolvers/zookeeper_resolver.c + - src/core/lib/client_config/resolvers/zookeeper_resolver.c deps: - gpr - grpc @@ -719,6 +774,7 @@ libs: language: c++ headers: - src/cpp/client/secure_credentials.h + - src/cpp/common/core_codegen.h - src/cpp/common/secure_auth_context.h - src/cpp/server/secure_server_credentials.h src: @@ -737,6 +793,17 @@ libs: - grpc++_codegen secure: check vs_project_guid: '{C187A093-A0FE-489D-A40A-6E33DE0F9FEB}' +- name: grpc++_codegen_lib + build: all + language: c++ + headers: [] + src: [] + filegroups: + - gpr_codegen + - grpc_codegen + - grpc++_codegen + secure: false + vs_project_guid: '{AAC6AF12-94C8-4A3C-A1BF-DAA4738F4500}' - name: grpc++_test_config build: private language: c++ @@ -809,10 +876,9 @@ libs: - src/compiler/objective_c_generator.cc - src/compiler/python_generator.cc - src/compiler/ruby_generator.cc - deps: [] + deps: + - grpc++_codegen_lib filegroups: - - grpc++_codegen - - grpc_codegen - gpr_codegen secure: false vs_project_guid: '{B6E81D84-2ACB-41B8-8781-493A944C7817}' @@ -1215,6 +1281,14 @@ targets: deps: - gpr_test_util - gpr +- name: gpr_backoff_test + build: test + language: c + src: + - test/core/support/backoff_test.c + deps: + - gpr_test_util + - gpr - name: gpr_cmdline_test build: test language: c @@ -1520,21 +1594,21 @@ targets: - grpc - gpr_test_util - gpr -- name: httpcli_format_request_test +- name: http_parser_test build: test language: c src: - - test/core/httpcli/format_request_test.c + - test/core/http/parser_test.c deps: - grpc_test_util - grpc - gpr_test_util - gpr -- name: httpcli_parser_test +- name: httpcli_format_request_test build: test language: c src: - - test/core/httpcli/parser_test.c + - test/core/http/format_request_test.c deps: - grpc_test_util - grpc @@ -1545,7 +1619,7 @@ targets: build: test language: c src: - - test/core/httpcli/httpcli_test.c + - test/core/http/httpcli_test.c deps: - grpc_test_util - grpc @@ -1560,7 +1634,7 @@ targets: build: test language: c src: - - test/core/httpcli/httpscli_test.c + - test/core/http/httpscli_test.c deps: - grpc_test_util - grpc @@ -1639,6 +1713,7 @@ targets: - gpr - name: lb_policies_test cpu_cost: 0.1 + flaky: true build: test language: c src: @@ -1673,6 +1748,7 @@ targets: - gpr_test_util - gpr - name: mlog_test + flaky: true build: test language: c src: @@ -2100,6 +2176,20 @@ targets: - grpc - gpr_test_util - gpr +- name: codegen_test + gtest: true + build: test + language: c++ + src: + - src/proto/grpc/testing/control.proto + - src/proto/grpc/testing/messages.proto + - src/proto/grpc/testing/payloads.proto + - src/proto/grpc/testing/perf_db.proto + - src/proto/grpc/testing/services.proto + - src/proto/grpc/testing/stats.proto + - test/cpp/codegen/codegen_test.cc + deps: + - grpc++_codegen_lib - name: credentials_test gtest: true build: test @@ -2400,7 +2490,7 @@ targets: - linux - posix - name: qps_openloop_test - cpu_cost: 10 + cpu_cost: 0.5 build: test language: c++ src: @@ -2765,11 +2855,11 @@ configs: etsan: CC: clang CPPFLAGS: -O0 -fsanitize=thread -fno-omit-frame-pointer -Wno-unused-command-line-argument - -fPIE -pie -DGPR_NO_DIRECT_SYSCALLS + -DGPR_NO_DIRECT_SYSCALLS CXX: clang++ DEFINES: _DEBUG DEBUG GRPC_EXECUTION_CONTEXT_SANITIZER LD: clang - LDFLAGS: -fsanitize=thread -fPIE -pie $(if $(JENKINS_BUILD),-Wl$(comma)-Ttext-segment=0x7e0000000000,) + LDFLAGS: -fsanitize=thread LDXX: clang++ compile_the_world: true test_environ: @@ -2821,10 +2911,10 @@ configs: tsan: CC: clang CPPFLAGS: -O0 -fsanitize=thread -fno-omit-frame-pointer -Wno-unused-command-line-argument - -fPIE -pie -DGPR_NO_DIRECT_SYSCALLS + -DGPR_NO_DIRECT_SYSCALLS CXX: clang++ LD: clang - LDFLAGS: -fsanitize=thread -fPIE -pie $(if $(JENKINS_BUILD),-Wl$(comma)-Ttext-segment=0x7e0000000000,) + LDFLAGS: -fsanitize=thread LDXX: clang++ compile_the_world: true test_environ: @@ -2889,7 +2979,7 @@ node_modules: - src/node/ext/server_credentials.cc - src/node/ext/timeval.cc openssl_fallback: - base_uri: http://openssl.org/source/ + base_uri: https://openssl.org/source/old/1.0.2/ extraction_dir: openssl-1.0.2f tarball: openssl-1.0.2f.tar.gz php_config_m4: diff --git a/config.m4 b/config.m4 index 8ab45e66037..653b2870677 100644 --- a/config.m4 +++ b/config.m4 @@ -36,206 +36,211 @@ if test "$PHP_GRPC" != "no"; then src/php/ext/grpc/server.c \ src/php/ext/grpc/server_credentials.c \ src/php/ext/grpc/timeval.c \ - src/core/profiling/basic_timers.c \ - src/core/profiling/stap_timers.c \ - src/core/support/alloc.c \ - src/core/support/avl.c \ - src/core/support/cmdline.c \ - src/core/support/cpu_iphone.c \ - src/core/support/cpu_linux.c \ - src/core/support/cpu_posix.c \ - src/core/support/cpu_windows.c \ - src/core/support/env_linux.c \ - src/core/support/env_posix.c \ - src/core/support/env_win32.c \ - src/core/support/histogram.c \ - src/core/support/host_port.c \ - src/core/support/load_file.c \ - src/core/support/log.c \ - src/core/support/log_android.c \ - src/core/support/log_linux.c \ - src/core/support/log_posix.c \ - src/core/support/log_win32.c \ - src/core/support/murmur_hash.c \ - src/core/support/slice.c \ - src/core/support/slice_buffer.c \ - src/core/support/stack_lockfree.c \ - src/core/support/string.c \ - src/core/support/string_posix.c \ - src/core/support/string_win32.c \ - src/core/support/subprocess_posix.c \ - src/core/support/subprocess_windows.c \ - src/core/support/sync.c \ - src/core/support/sync_posix.c \ - src/core/support/sync_win32.c \ - src/core/support/thd.c \ - src/core/support/thd_posix.c \ - src/core/support/thd_win32.c \ - src/core/support/time.c \ - src/core/support/time_posix.c \ - src/core/support/time_precise.c \ - src/core/support/time_win32.c \ - src/core/support/tls_pthread.c \ - src/core/support/tmpfile_posix.c \ - src/core/support/tmpfile_win32.c \ - src/core/support/wrap_memcpy.c \ - src/core/census/grpc_context.c \ - src/core/census/grpc_filter.c \ - src/core/channel/channel_args.c \ - src/core/channel/channel_stack.c \ - src/core/channel/client_channel.c \ - src/core/channel/client_uchannel.c \ - src/core/channel/compress_filter.c \ - src/core/channel/connected_channel.c \ - src/core/channel/http_client_filter.c \ - src/core/channel/http_server_filter.c \ - src/core/channel/subchannel_call_holder.c \ - src/core/client_config/client_config.c \ - src/core/client_config/connector.c \ - src/core/client_config/default_initial_connect_string.c \ - src/core/client_config/initial_connect_string.c \ - src/core/client_config/lb_policies/load_balancer_api.c \ - src/core/client_config/lb_policies/pick_first.c \ - src/core/client_config/lb_policies/round_robin.c \ - src/core/client_config/lb_policy.c \ - src/core/client_config/lb_policy_factory.c \ - src/core/client_config/lb_policy_registry.c \ - src/core/client_config/resolver.c \ - src/core/client_config/resolver_factory.c \ - src/core/client_config/resolver_registry.c \ - src/core/client_config/resolvers/dns_resolver.c \ - src/core/client_config/resolvers/sockaddr_resolver.c \ - src/core/client_config/subchannel.c \ - src/core/client_config/subchannel_factory.c \ - src/core/client_config/subchannel_index.c \ - src/core/client_config/uri_parser.c \ - src/core/compression/compression_algorithm.c \ - src/core/compression/message_compress.c \ - src/core/debug/trace.c \ - src/core/httpcli/format_request.c \ - src/core/httpcli/httpcli.c \ - src/core/httpcli/parser.c \ - src/core/iomgr/closure.c \ - src/core/iomgr/endpoint.c \ - src/core/iomgr/endpoint_pair_posix.c \ - src/core/iomgr/endpoint_pair_windows.c \ - src/core/iomgr/exec_ctx.c \ - src/core/iomgr/executor.c \ - src/core/iomgr/fd_posix.c \ - src/core/iomgr/iocp_windows.c \ - src/core/iomgr/iomgr.c \ - src/core/iomgr/iomgr_posix.c \ - src/core/iomgr/iomgr_windows.c \ - src/core/iomgr/pollset_multipoller_with_epoll.c \ - src/core/iomgr/pollset_multipoller_with_poll_posix.c \ - src/core/iomgr/pollset_posix.c \ - src/core/iomgr/pollset_set_posix.c \ - src/core/iomgr/pollset_set_windows.c \ - src/core/iomgr/pollset_windows.c \ - src/core/iomgr/resolve_address_posix.c \ - src/core/iomgr/resolve_address_windows.c \ - src/core/iomgr/sockaddr_utils.c \ - src/core/iomgr/socket_utils_common_posix.c \ - src/core/iomgr/socket_utils_linux.c \ - src/core/iomgr/socket_utils_posix.c \ - src/core/iomgr/socket_windows.c \ - src/core/iomgr/tcp_client_posix.c \ - src/core/iomgr/tcp_client_windows.c \ - src/core/iomgr/tcp_posix.c \ - src/core/iomgr/tcp_server_posix.c \ - src/core/iomgr/tcp_server_windows.c \ - src/core/iomgr/tcp_windows.c \ - src/core/iomgr/time_averaged_stats.c \ - src/core/iomgr/timer.c \ - src/core/iomgr/timer_heap.c \ - src/core/iomgr/udp_server.c \ - src/core/iomgr/wakeup_fd_eventfd.c \ - src/core/iomgr/wakeup_fd_nospecial.c \ - src/core/iomgr/wakeup_fd_pipe.c \ - src/core/iomgr/wakeup_fd_posix.c \ - src/core/iomgr/workqueue_posix.c \ - src/core/iomgr/workqueue_windows.c \ - src/core/json/json.c \ - src/core/json/json_reader.c \ - src/core/json/json_string.c \ - src/core/json/json_writer.c \ - src/core/proto/grpc/lb/v0/load_balancer.pb.c \ - src/core/surface/alarm.c \ - src/core/surface/api_trace.c \ - src/core/surface/byte_buffer.c \ - src/core/surface/byte_buffer_reader.c \ - src/core/surface/call.c \ - src/core/surface/call_details.c \ - src/core/surface/call_log_batch.c \ - src/core/surface/channel.c \ - src/core/surface/channel_connectivity.c \ - src/core/surface/channel_create.c \ - src/core/surface/channel_ping.c \ - src/core/surface/completion_queue.c \ - src/core/surface/event_string.c \ - src/core/surface/init.c \ - src/core/surface/lame_client.c \ - src/core/surface/metadata_array.c \ - src/core/surface/server.c \ - src/core/surface/server_chttp2.c \ - src/core/surface/server_create.c \ - src/core/surface/validate_metadata.c \ - src/core/surface/version.c \ - src/core/transport/byte_stream.c \ - src/core/transport/chttp2/alpn.c \ - src/core/transport/chttp2/bin_encoder.c \ - src/core/transport/chttp2/frame_data.c \ - src/core/transport/chttp2/frame_goaway.c \ - src/core/transport/chttp2/frame_ping.c \ - src/core/transport/chttp2/frame_rst_stream.c \ - src/core/transport/chttp2/frame_settings.c \ - src/core/transport/chttp2/frame_window_update.c \ - src/core/transport/chttp2/hpack_encoder.c \ - src/core/transport/chttp2/hpack_parser.c \ - src/core/transport/chttp2/hpack_table.c \ - src/core/transport/chttp2/huffsyms.c \ - src/core/transport/chttp2/incoming_metadata.c \ - src/core/transport/chttp2/parsing.c \ - src/core/transport/chttp2/status_conversion.c \ - src/core/transport/chttp2/stream_lists.c \ - src/core/transport/chttp2/stream_map.c \ - src/core/transport/chttp2/timeout_encoding.c \ - src/core/transport/chttp2/varint.c \ - src/core/transport/chttp2/writing.c \ - src/core/transport/chttp2_transport.c \ - src/core/transport/connectivity_state.c \ - src/core/transport/metadata.c \ - src/core/transport/metadata_batch.c \ - src/core/transport/static_metadata.c \ - src/core/transport/transport.c \ - src/core/transport/transport_op_string.c \ - src/core/httpcli/httpcli_security_connector.c \ - src/core/security/b64.c \ - src/core/security/client_auth_filter.c \ - src/core/security/credentials.c \ - src/core/security/credentials_metadata.c \ - src/core/security/credentials_posix.c \ - src/core/security/credentials_win32.c \ - src/core/security/google_default_credentials.c \ - src/core/security/handshake.c \ - src/core/security/json_token.c \ - src/core/security/jwt_verifier.c \ - src/core/security/secure_endpoint.c \ - src/core/security/security_connector.c \ - src/core/security/security_context.c \ - src/core/security/server_auth_filter.c \ - src/core/security/server_secure_chttp2.c \ - src/core/surface/init_secure.c \ - src/core/surface/secure_channel_create.c \ - src/core/tsi/fake_transport_security.c \ - src/core/tsi/ssl_transport_security.c \ - src/core/tsi/transport_security.c \ - src/core/census/context.c \ - src/core/census/initialize.c \ - src/core/census/mlog.c \ - src/core/census/operation.c \ - src/core/census/placeholders.c \ - src/core/census/tracing.c \ + src/core/lib/profiling/basic_timers.c \ + src/core/lib/profiling/stap_timers.c \ + src/core/lib/support/alloc.c \ + src/core/lib/support/avl.c \ + src/core/lib/support/backoff.c \ + src/core/lib/support/cmdline.c \ + src/core/lib/support/cpu_iphone.c \ + src/core/lib/support/cpu_linux.c \ + src/core/lib/support/cpu_posix.c \ + src/core/lib/support/cpu_windows.c \ + src/core/lib/support/env_linux.c \ + src/core/lib/support/env_posix.c \ + src/core/lib/support/env_win32.c \ + src/core/lib/support/histogram.c \ + src/core/lib/support/host_port.c \ + src/core/lib/support/load_file.c \ + src/core/lib/support/log.c \ + src/core/lib/support/log_android.c \ + src/core/lib/support/log_linux.c \ + src/core/lib/support/log_posix.c \ + src/core/lib/support/log_win32.c \ + src/core/lib/support/murmur_hash.c \ + src/core/lib/support/slice.c \ + src/core/lib/support/slice_buffer.c \ + src/core/lib/support/stack_lockfree.c \ + src/core/lib/support/string.c \ + src/core/lib/support/string_posix.c \ + src/core/lib/support/string_win32.c \ + src/core/lib/support/subprocess_posix.c \ + src/core/lib/support/subprocess_windows.c \ + src/core/lib/support/sync.c \ + src/core/lib/support/sync_posix.c \ + src/core/lib/support/sync_win32.c \ + src/core/lib/support/thd.c \ + src/core/lib/support/thd_posix.c \ + src/core/lib/support/thd_win32.c \ + src/core/lib/support/time.c \ + src/core/lib/support/time_posix.c \ + src/core/lib/support/time_precise.c \ + src/core/lib/support/time_win32.c \ + src/core/lib/support/tls_pthread.c \ + src/core/lib/support/tmpfile_posix.c \ + src/core/lib/support/tmpfile_win32.c \ + src/core/lib/support/wrap_memcpy.c \ + src/core/ext/transport/chttp2/client/insecure/channel_create.c \ + src/core/ext/transport/chttp2/client/secure/secure_channel_create.c \ + src/core/ext/transport/chttp2/server/insecure/server_chttp2.c \ + src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c \ + src/core/ext/transport/chttp2/transport/alpn.c \ + src/core/ext/transport/chttp2/transport/bin_encoder.c \ + src/core/ext/transport/chttp2/transport/chttp2_transport.c \ + src/core/ext/transport/chttp2/transport/frame_data.c \ + src/core/ext/transport/chttp2/transport/frame_goaway.c \ + src/core/ext/transport/chttp2/transport/frame_ping.c \ + src/core/ext/transport/chttp2/transport/frame_rst_stream.c \ + src/core/ext/transport/chttp2/transport/frame_settings.c \ + src/core/ext/transport/chttp2/transport/frame_window_update.c \ + src/core/ext/transport/chttp2/transport/hpack_encoder.c \ + src/core/ext/transport/chttp2/transport/hpack_parser.c \ + src/core/ext/transport/chttp2/transport/hpack_table.c \ + src/core/ext/transport/chttp2/transport/huffsyms.c \ + src/core/ext/transport/chttp2/transport/incoming_metadata.c \ + src/core/ext/transport/chttp2/transport/parsing.c \ + src/core/ext/transport/chttp2/transport/status_conversion.c \ + src/core/ext/transport/chttp2/transport/stream_lists.c \ + src/core/ext/transport/chttp2/transport/stream_map.c \ + src/core/ext/transport/chttp2/transport/timeout_encoding.c \ + src/core/ext/transport/chttp2/transport/varint.c \ + src/core/ext/transport/chttp2/transport/writing.c \ + src/core/lib/census/context.c \ + src/core/lib/census/grpc_context.c \ + src/core/lib/census/grpc_filter.c \ + src/core/lib/census/grpc_plugin.c \ + src/core/lib/census/initialize.c \ + src/core/lib/census/mlog.c \ + src/core/lib/census/operation.c \ + src/core/lib/census/placeholders.c \ + src/core/lib/census/tracing.c \ + src/core/lib/channel/channel_args.c \ + src/core/lib/channel/channel_stack.c \ + src/core/lib/channel/channel_stack_builder.c \ + src/core/lib/channel/client_channel.c \ + src/core/lib/channel/compress_filter.c \ + src/core/lib/channel/connected_channel.c \ + src/core/lib/channel/http_client_filter.c \ + src/core/lib/channel/http_server_filter.c \ + src/core/lib/channel/subchannel_call_holder.c \ + src/core/lib/client_config/client_config.c \ + src/core/lib/client_config/connector.c \ + src/core/lib/client_config/default_initial_connect_string.c \ + src/core/lib/client_config/initial_connect_string.c \ + src/core/lib/client_config/lb_policies/load_balancer_api.c \ + src/core/lib/client_config/lb_policies/pick_first.c \ + src/core/lib/client_config/lb_policies/round_robin.c \ + src/core/lib/client_config/lb_policy.c \ + src/core/lib/client_config/lb_policy_factory.c \ + src/core/lib/client_config/lb_policy_registry.c \ + src/core/lib/client_config/resolver.c \ + src/core/lib/client_config/resolver_factory.c \ + src/core/lib/client_config/resolver_registry.c \ + src/core/lib/client_config/resolvers/dns_resolver.c \ + src/core/lib/client_config/resolvers/sockaddr_resolver.c \ + src/core/lib/client_config/subchannel.c \ + src/core/lib/client_config/subchannel_factory.c \ + src/core/lib/client_config/subchannel_index.c \ + src/core/lib/client_config/uri_parser.c \ + src/core/lib/compression/compression_algorithm.c \ + src/core/lib/compression/message_compress.c \ + src/core/lib/debug/trace.c \ + src/core/lib/http/format_request.c \ + src/core/lib/http/httpcli.c \ + src/core/lib/http/httpcli_security_connector.c \ + src/core/lib/http/parser.c \ + src/core/lib/iomgr/closure.c \ + src/core/lib/iomgr/endpoint.c \ + src/core/lib/iomgr/endpoint_pair_posix.c \ + src/core/lib/iomgr/endpoint_pair_windows.c \ + src/core/lib/iomgr/exec_ctx.c \ + src/core/lib/iomgr/executor.c \ + src/core/lib/iomgr/fd_posix.c \ + src/core/lib/iomgr/iocp_windows.c \ + src/core/lib/iomgr/iomgr.c \ + src/core/lib/iomgr/iomgr_posix.c \ + src/core/lib/iomgr/iomgr_windows.c \ + src/core/lib/iomgr/pollset_multipoller_with_epoll.c \ + src/core/lib/iomgr/pollset_multipoller_with_poll_posix.c \ + src/core/lib/iomgr/pollset_posix.c \ + src/core/lib/iomgr/pollset_set_posix.c \ + src/core/lib/iomgr/pollset_set_windows.c \ + src/core/lib/iomgr/pollset_windows.c \ + src/core/lib/iomgr/resolve_address_posix.c \ + src/core/lib/iomgr/resolve_address_windows.c \ + src/core/lib/iomgr/sockaddr_utils.c \ + src/core/lib/iomgr/socket_utils_common_posix.c \ + src/core/lib/iomgr/socket_utils_linux.c \ + src/core/lib/iomgr/socket_utils_posix.c \ + src/core/lib/iomgr/socket_windows.c \ + src/core/lib/iomgr/tcp_client_posix.c \ + src/core/lib/iomgr/tcp_client_windows.c \ + src/core/lib/iomgr/tcp_posix.c \ + src/core/lib/iomgr/tcp_server_posix.c \ + src/core/lib/iomgr/tcp_server_windows.c \ + src/core/lib/iomgr/tcp_windows.c \ + src/core/lib/iomgr/time_averaged_stats.c \ + src/core/lib/iomgr/timer.c \ + src/core/lib/iomgr/timer_heap.c \ + src/core/lib/iomgr/udp_server.c \ + src/core/lib/iomgr/unix_sockets_posix.c \ + src/core/lib/iomgr/unix_sockets_posix_noop.c \ + src/core/lib/iomgr/wakeup_fd_eventfd.c \ + src/core/lib/iomgr/wakeup_fd_nospecial.c \ + src/core/lib/iomgr/wakeup_fd_pipe.c \ + src/core/lib/iomgr/wakeup_fd_posix.c \ + src/core/lib/iomgr/workqueue_posix.c \ + src/core/lib/iomgr/workqueue_windows.c \ + src/core/lib/json/json.c \ + src/core/lib/json/json_reader.c \ + src/core/lib/json/json_string.c \ + src/core/lib/json/json_writer.c \ + src/core/lib/proto/grpc/lb/v0/load_balancer.pb.c \ + src/core/lib/security/b64.c \ + src/core/lib/security/client_auth_filter.c \ + src/core/lib/security/credentials.c \ + src/core/lib/security/credentials_metadata.c \ + src/core/lib/security/credentials_posix.c \ + src/core/lib/security/credentials_win32.c \ + src/core/lib/security/google_default_credentials.c \ + src/core/lib/security/handshake.c \ + src/core/lib/security/json_token.c \ + src/core/lib/security/jwt_verifier.c \ + src/core/lib/security/secure_endpoint.c \ + src/core/lib/security/security_connector.c \ + src/core/lib/security/security_context.c \ + src/core/lib/security/server_auth_filter.c \ + src/core/lib/surface/alarm.c \ + src/core/lib/surface/api_trace.c \ + src/core/lib/surface/byte_buffer.c \ + src/core/lib/surface/byte_buffer_reader.c \ + src/core/lib/surface/call.c \ + src/core/lib/surface/call_details.c \ + src/core/lib/surface/call_log_batch.c \ + src/core/lib/surface/channel.c \ + src/core/lib/surface/channel_connectivity.c \ + src/core/lib/surface/channel_init.c \ + src/core/lib/surface/channel_ping.c \ + src/core/lib/surface/channel_stack_type.c \ + src/core/lib/surface/completion_queue.c \ + src/core/lib/surface/event_string.c \ + src/core/lib/surface/init.c \ + src/core/lib/surface/init_secure.c \ + src/core/lib/surface/lame_client.c \ + src/core/lib/surface/metadata_array.c \ + src/core/lib/surface/server.c \ + src/core/lib/surface/validate_metadata.c \ + src/core/lib/surface/version.c \ + src/core/lib/transport/byte_stream.c \ + src/core/lib/transport/connectivity_state.c \ + src/core/lib/transport/metadata.c \ + src/core/lib/transport/metadata_batch.c \ + src/core/lib/transport/static_metadata.c \ + src/core/lib/transport/transport.c \ + src/core/lib/transport/transport_op_string.c \ + src/core/lib/tsi/fake_transport_security.c \ + src/core/lib/tsi/ssl_transport_security.c \ + src/core/lib/tsi/transport_security.c \ third_party/nanopb/pb_common.c \ third_party/nanopb/pb_decode.c \ third_party/nanopb/pb_encode.c \ @@ -541,24 +546,28 @@ if test "$PHP_GRPC" != "no"; then PHP_ADD_BUILD_DIR($ext_builddir/src/php/ext/grpc) PHP_ADD_BUILD_DIR($ext_builddir/src/boringssl) - PHP_ADD_BUILD_DIR($ext_builddir/src/core/census) - PHP_ADD_BUILD_DIR($ext_builddir/src/core/channel) - PHP_ADD_BUILD_DIR($ext_builddir/src/core/client_config) - PHP_ADD_BUILD_DIR($ext_builddir/src/core/client_config/lb_policies) - PHP_ADD_BUILD_DIR($ext_builddir/src/core/client_config/resolvers) - PHP_ADD_BUILD_DIR($ext_builddir/src/core/compression) - PHP_ADD_BUILD_DIR($ext_builddir/src/core/debug) - PHP_ADD_BUILD_DIR($ext_builddir/src/core/httpcli) - PHP_ADD_BUILD_DIR($ext_builddir/src/core/iomgr) - PHP_ADD_BUILD_DIR($ext_builddir/src/core/json) - PHP_ADD_BUILD_DIR($ext_builddir/src/core/profiling) - PHP_ADD_BUILD_DIR($ext_builddir/src/core/proto/grpc/lb/v0) - PHP_ADD_BUILD_DIR($ext_builddir/src/core/security) - PHP_ADD_BUILD_DIR($ext_builddir/src/core/support) - PHP_ADD_BUILD_DIR($ext_builddir/src/core/surface) - PHP_ADD_BUILD_DIR($ext_builddir/src/core/transport) - PHP_ADD_BUILD_DIR($ext_builddir/src/core/transport/chttp2) - PHP_ADD_BUILD_DIR($ext_builddir/src/core/tsi) + PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/transport/chttp2/client/insecure) + PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/transport/chttp2/client/secure) + PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/transport/chttp2/server/insecure) + PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/transport/chttp2/server/secure) + PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/transport/chttp2/transport) + PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/census) + PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/channel) + PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/client_config) + PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/client_config/lb_policies) + PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/client_config/resolvers) + PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/compression) + PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/debug) + PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/http) + PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/iomgr) + PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/json) + PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/profiling) + PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/proto/grpc/lb/v0) + PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/security) + PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/support) + PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/surface) + PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/transport) + PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/tsi) PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl/crypto) PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl/crypto/aes) PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl/crypto/asn1) diff --git a/doc/interop-test-descriptions.md b/doc/interop-test-descriptions.md index 3beb1d11f4a..6297b5cc3ef 100644 --- a/doc/interop-test-descriptions.md +++ b/doc/interop-test-descriptions.md @@ -27,7 +27,7 @@ Clients should accept these arguments: * Whether to use a plaintext or encrypted connection * --use_test_ca=BOOLEAN * Whether to replace platform root CAs with - [ca.pem](https://github.com/grpc/grpc/blob/master/src/core/tsi/test_creds/ca.pem) + [ca.pem](https://github.com/grpc/grpc/blob/master/src/core/lib/tsi/test_creds/ca.pem) as the CA root * --default_service_account=ACCOUNT_EMAIL * Email of the GCE default service account. Only applicable @@ -920,7 +920,7 @@ Servers should accept these arguments: * Whether to use a plaintext or encrypted connection Servers must support TLS with ALPN. They should use -[server1.pem](https://github.com/grpc/grpc/blob/master/src/core/tsi/test_creds/server1.pem) +[server1.pem](https://github.com/grpc/grpc/blob/master/src/core/lib/tsi/test_creds/server1.pem) for their certificate. ### EmptyCall diff --git a/examples/cpp/helloworld/README.md b/examples/cpp/helloworld/README.md index 8e11f7cdf3e..04283eabc35 100644 --- a/examples/cpp/helloworld/README.md +++ b/examples/cpp/helloworld/README.md @@ -207,7 +207,7 @@ completion queue to return the tag. The basic flow is helloworld::Greeter::AsyncService service; ServerBuilder builder; builder.AddListeningPort("0.0.0.0:50051", InsecureServerCredentials()); - builder.RegisterAsyncService(&service); + builder.RegisterService(&service); auto cq = builder.AddCompletionQueue(); auto server = builder.BuildAndStart(); ``` diff --git a/examples/node/README.md b/examples/node/README.md index c1ef6b05ab0..28878833ce6 100644 --- a/examples/node/README.md +++ b/examples/node/README.md @@ -10,6 +10,11 @@ INSTALL ------- ```sh + $ # Get the gRPC repository + $ export REPO_ROOT=grpc # REPO root can be any directory of your choice + $ git clone https://github.com/grpc/grpc.git $REPO_ROOT + $ cd $REPO_ROOT + $ cd examples/node $ npm install ``` diff --git a/examples/node/package.json b/examples/node/package.json index 00ba428d966..d135df2464b 100644 --- a/examples/node/package.json +++ b/examples/node/package.json @@ -2,6 +2,9 @@ "name": "grpc-examples", "version": "0.1.0", "dependencies": { - "grpc": "0.13.0" + "async": "^1.5.2", + "grpc": "0.13.0", + "lodash": "^4.6.1", + "minimist": "^1.2.0" } } diff --git a/examples/python/helloworld/greeter_client.py b/examples/python/helloworld/greeter_client.py index 561b25bcb2e..9c18b41d25c 100644 --- a/examples/python/helloworld/greeter_client.py +++ b/examples/python/helloworld/greeter_client.py @@ -1,4 +1,4 @@ -# Copyright 2015, Google Inc. +# Copyright 2015-2016, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -29,6 +29,8 @@ """The Python implementation of the GRPC helloworld.Greeter client.""" +from __future__ import print_function + from grpc.beta import implementations import helloworld_pb2 @@ -40,7 +42,7 @@ def run(): channel = implementations.insecure_channel('localhost', 50051) stub = helloworld_pb2.beta_create_Greeter_stub(channel) response = stub.SayHello(helloworld_pb2.HelloRequest(name='you'), _TIMEOUT_SECONDS) - print "Greeter client received: " + response.message + print("Greeter client received: " + response.message) if __name__ == '__main__': diff --git a/examples/python/route_guide/route_guide_client.py b/examples/python/route_guide/route_guide_client.py index b1dfad551dc..9d6f865a331 100644 --- a/examples/python/route_guide/route_guide_client.py +++ b/examples/python/route_guide/route_guide_client.py @@ -1,4 +1,4 @@ -# Copyright 2015, Google Inc. +# Copyright 2015-2016, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -29,6 +29,8 @@ """The Python implementation of the gRPC route guide client.""" +from __future__ import print_function + import random import time @@ -49,13 +51,13 @@ def make_route_note(message, latitude, longitude): def guide_get_one_feature(stub, point): feature = stub.GetFeature(point, _TIMEOUT_SECONDS) if not feature.location: - print "Server returned incomplete feature" + print("Server returned incomplete feature") return if feature.name: - print "Feature called %s at %s" % (feature.name, feature.location) + print("Feature called %s at %s" % (feature.name, feature.location)) else: - print "Found no feature at %s" % feature.location + print("Found no feature at %s" % feature.location) def guide_get_feature(stub): @@ -69,18 +71,18 @@ def guide_list_features(stub): latitude=400000000, longitude = -750000000), hi=route_guide_pb2.Point( latitude = 420000000, longitude = -730000000)) - print "Looking for features between 40, -75 and 42, -73" + print("Looking for features between 40, -75 and 42, -73") features = stub.ListFeatures(rect, _TIMEOUT_SECONDS) for feature in features: - print "Feature called %s at %s" % (feature.name, feature.location) + print("Feature called %s at %s" % (feature.name, feature.location)) def generate_route(feature_list): for _ in range(0, 10): random_feature = feature_list[random.randint(0, len(feature_list) - 1)] - print "Visiting point %s" % random_feature.location + print("Visiting point %s" % random_feature.location) yield random_feature.location time.sleep(random.uniform(0.5, 1.5)) @@ -90,10 +92,10 @@ def guide_record_route(stub): route_iter = generate_route(feature_list) route_summary = stub.RecordRoute(route_iter, _TIMEOUT_SECONDS) - print "Finished trip with %s points " % route_summary.point_count - print "Passed %s features " % route_summary.feature_count - print "Travelled %s meters " % route_summary.distance - print "It took %s seconds " % route_summary.elapsed_time + print("Finished trip with %s points " % route_summary.point_count) + print("Passed %s features " % route_summary.feature_count) + print("Travelled %s meters " % route_summary.distance) + print("It took %s seconds " % route_summary.elapsed_time) def generate_messages(): @@ -105,7 +107,7 @@ def generate_messages(): make_route_note("Fifth message", 1, 0), ] for msg in messages: - print "Sending %s at %s" % (msg.message, msg.location) + print("Sending %s at %s" % (msg.message, msg.location)) yield msg time.sleep(random.uniform(0.5, 1.0)) @@ -113,19 +115,19 @@ def generate_messages(): def guide_route_chat(stub): responses = stub.RouteChat(generate_messages(), _TIMEOUT_SECONDS) for response in responses: - print "Received message %s at %s" % (response.message, response.location) + print("Received message %s at %s" % (response.message, response.location)) def run(): channel = implementations.insecure_channel('localhost', 50051) stub = route_guide_pb2.beta_create_RouteGuide_stub(channel) - print "-------------- GetFeature --------------" + print("-------------- GetFeature --------------") guide_get_feature(stub) - print "-------------- ListFeatures --------------" + print("-------------- ListFeatures --------------") guide_list_features(stub) - print "-------------- RecordRoute --------------" + print("-------------- RecordRoute --------------") guide_record_route(stub) - print "-------------- RouteChat --------------" + print("-------------- RouteChat --------------") guide_route_chat(stub) diff --git a/examples/ruby/route_guide/route_guide_client.rb b/examples/ruby/route_guide/route_guide_client.rb index 715a3c08c58..86dd1fe6caf 100755 --- a/examples/ruby/route_guide/route_guide_client.rb +++ b/examples/ruby/route_guide/route_guide_client.rb @@ -38,6 +38,7 @@ lib_dir = File.join(File.dirname(this_dir), 'lib') $LOAD_PATH.unshift(lib_dir) unless $LOAD_PATH.include?(lib_dir) require 'grpc' +require 'multi_json' require 'route_guide_services' include Routeguide @@ -115,9 +116,8 @@ def run_record_route(stub, features) p 'RecordRoute' p '-----------' points_on_route = 10 # arbitrary - deadline = points_on_route # as delay b/w each is max 1 second reqs = RandomRoute.new(features, points_on_route) - resp = stub.record_route(reqs.each, deadline) + resp = stub.record_route(reqs.each) p "summary: #{resp.inspect}" end diff --git a/gRPC.podspec b/gRPC.podspec index f3103ea79ad..08330eb8e18 100644 --- a/gRPC.podspec +++ b/gRPC.podspec @@ -63,17 +63,32 @@ Pod::Spec.new do |s| # Core cross-platform gRPC library, written in C. s.subspec 'C-Core' do |ss| - ss.source_files = 'src/core/profiling/timers.h', - 'src/core/support/block_annotate.h', - 'src/core/support/env.h', - 'src/core/support/load_file.h', - 'src/core/support/murmur_hash.h', - 'src/core/support/stack_lockfree.h', - 'src/core/support/string.h', - 'src/core/support/string_win32.h', - 'src/core/support/thd_internal.h', - 'src/core/support/time_precise.h', - 'src/core/support/tmpfile.h', + ss.source_files = 'src/core/lib/profiling/timers.h', + 'src/core/lib/support/backoff.h', + 'src/core/lib/support/block_annotate.h', + 'src/core/lib/support/env.h', + 'src/core/lib/support/load_file.h', + 'src/core/lib/support/murmur_hash.h', + 'src/core/lib/support/stack_lockfree.h', + 'src/core/lib/support/string.h', + 'src/core/lib/support/string_win32.h', + 'src/core/lib/support/thd_internal.h', + 'src/core/lib/support/time_precise.h', + 'src/core/lib/support/tmpfile.h', + 'include/grpc/impl/codegen/alloc.h', + 'include/grpc/impl/codegen/atm.h', + 'include/grpc/impl/codegen/atm_gcc_atomic.h', + 'include/grpc/impl/codegen/atm_gcc_sync.h', + 'include/grpc/impl/codegen/atm_win32.h', + 'include/grpc/impl/codegen/log.h', + 'include/grpc/impl/codegen/port_platform.h', + 'include/grpc/impl/codegen/slice.h', + 'include/grpc/impl/codegen/slice_buffer.h', + 'include/grpc/impl/codegen/sync.h', + 'include/grpc/impl/codegen/sync_generic.h', + 'include/grpc/impl/codegen/sync_posix.h', + 'include/grpc/impl/codegen/sync_win32.h', + 'include/grpc/impl/codegen/time.h', 'include/grpc/support/alloc.h', 'include/grpc/support/atm.h', 'include/grpc/support/atm_gcc_atomic.h', @@ -102,199 +117,196 @@ Pod::Spec.new do |s| 'include/grpc/support/tls_msvc.h', 'include/grpc/support/tls_pthread.h', 'include/grpc/support/useful.h', - 'include/grpc/impl/codegen/alloc.h', - 'include/grpc/impl/codegen/atm.h', - 'include/grpc/impl/codegen/atm_gcc_atomic.h', - 'include/grpc/impl/codegen/atm_gcc_sync.h', - 'include/grpc/impl/codegen/atm_win32.h', - 'include/grpc/impl/codegen/log.h', - 'include/grpc/impl/codegen/port_platform.h', - 'include/grpc/impl/codegen/slice.h', - 'include/grpc/impl/codegen/slice_buffer.h', - 'include/grpc/impl/codegen/sync.h', - 'include/grpc/impl/codegen/sync_generic.h', - 'include/grpc/impl/codegen/sync_posix.h', - 'include/grpc/impl/codegen/sync_win32.h', - 'include/grpc/impl/codegen/time.h', - 'src/core/profiling/basic_timers.c', - 'src/core/profiling/stap_timers.c', - 'src/core/support/alloc.c', - 'src/core/support/avl.c', - 'src/core/support/cmdline.c', - 'src/core/support/cpu_iphone.c', - 'src/core/support/cpu_linux.c', - 'src/core/support/cpu_posix.c', - 'src/core/support/cpu_windows.c', - 'src/core/support/env_linux.c', - 'src/core/support/env_posix.c', - 'src/core/support/env_win32.c', - 'src/core/support/histogram.c', - 'src/core/support/host_port.c', - 'src/core/support/load_file.c', - 'src/core/support/log.c', - 'src/core/support/log_android.c', - 'src/core/support/log_linux.c', - 'src/core/support/log_posix.c', - 'src/core/support/log_win32.c', - 'src/core/support/murmur_hash.c', - 'src/core/support/slice.c', - 'src/core/support/slice_buffer.c', - 'src/core/support/stack_lockfree.c', - 'src/core/support/string.c', - 'src/core/support/string_posix.c', - 'src/core/support/string_win32.c', - 'src/core/support/subprocess_posix.c', - 'src/core/support/subprocess_windows.c', - 'src/core/support/sync.c', - 'src/core/support/sync_posix.c', - 'src/core/support/sync_win32.c', - 'src/core/support/thd.c', - 'src/core/support/thd_posix.c', - 'src/core/support/thd_win32.c', - 'src/core/support/time.c', - 'src/core/support/time_posix.c', - 'src/core/support/time_precise.c', - 'src/core/support/time_win32.c', - 'src/core/support/tls_pthread.c', - 'src/core/support/tmpfile_posix.c', - 'src/core/support/tmpfile_win32.c', - 'src/core/support/wrap_memcpy.c', - 'src/core/census/grpc_filter.h', - 'src/core/channel/channel_args.h', - 'src/core/channel/channel_stack.h', - 'src/core/channel/client_channel.h', - 'src/core/channel/client_uchannel.h', - 'src/core/channel/compress_filter.h', - 'src/core/channel/connected_channel.h', - 'src/core/channel/context.h', - 'src/core/channel/http_client_filter.h', - 'src/core/channel/http_server_filter.h', - 'src/core/channel/subchannel_call_holder.h', - 'src/core/client_config/client_config.h', - 'src/core/client_config/connector.h', - 'src/core/client_config/initial_connect_string.h', - 'src/core/client_config/lb_policies/load_balancer_api.h', - 'src/core/client_config/lb_policies/pick_first.h', - 'src/core/client_config/lb_policies/round_robin.h', - 'src/core/client_config/lb_policy.h', - 'src/core/client_config/lb_policy_factory.h', - 'src/core/client_config/lb_policy_registry.h', - 'src/core/client_config/resolver.h', - 'src/core/client_config/resolver_factory.h', - 'src/core/client_config/resolver_registry.h', - 'src/core/client_config/resolvers/dns_resolver.h', - 'src/core/client_config/resolvers/sockaddr_resolver.h', - 'src/core/client_config/subchannel.h', - 'src/core/client_config/subchannel_factory.h', - 'src/core/client_config/subchannel_index.h', - 'src/core/client_config/uri_parser.h', - 'src/core/compression/algorithm_metadata.h', - 'src/core/compression/message_compress.h', - 'src/core/debug/trace.h', - 'src/core/httpcli/format_request.h', - 'src/core/httpcli/httpcli.h', - 'src/core/httpcli/parser.h', - 'src/core/iomgr/closure.h', - 'src/core/iomgr/endpoint.h', - 'src/core/iomgr/endpoint_pair.h', - 'src/core/iomgr/exec_ctx.h', - 'src/core/iomgr/executor.h', - 'src/core/iomgr/fd_posix.h', - 'src/core/iomgr/iocp_windows.h', - 'src/core/iomgr/iomgr.h', - 'src/core/iomgr/iomgr_internal.h', - 'src/core/iomgr/iomgr_posix.h', - 'src/core/iomgr/pollset.h', - 'src/core/iomgr/pollset_posix.h', - 'src/core/iomgr/pollset_set.h', - 'src/core/iomgr/pollset_set_posix.h', - 'src/core/iomgr/pollset_set_windows.h', - 'src/core/iomgr/pollset_windows.h', - 'src/core/iomgr/resolve_address.h', - 'src/core/iomgr/sockaddr.h', - 'src/core/iomgr/sockaddr_posix.h', - 'src/core/iomgr/sockaddr_utils.h', - 'src/core/iomgr/sockaddr_win32.h', - 'src/core/iomgr/socket_utils_posix.h', - 'src/core/iomgr/socket_windows.h', - 'src/core/iomgr/tcp_client.h', - 'src/core/iomgr/tcp_posix.h', - 'src/core/iomgr/tcp_server.h', - 'src/core/iomgr/tcp_windows.h', - 'src/core/iomgr/time_averaged_stats.h', - 'src/core/iomgr/timer.h', - 'src/core/iomgr/timer_heap.h', - 'src/core/iomgr/udp_server.h', - 'src/core/iomgr/wakeup_fd_pipe.h', - 'src/core/iomgr/wakeup_fd_posix.h', - 'src/core/iomgr/workqueue.h', - 'src/core/iomgr/workqueue_posix.h', - 'src/core/iomgr/workqueue_windows.h', - 'src/core/json/json.h', - 'src/core/json/json_common.h', - 'src/core/json/json_reader.h', - 'src/core/json/json_writer.h', - 'src/core/proto/grpc/lb/v0/load_balancer.pb.h', - 'src/core/statistics/census_interface.h', - 'src/core/statistics/census_rpc_stats.h', - 'src/core/surface/api_trace.h', - 'src/core/surface/call.h', - 'src/core/surface/call_test_only.h', - 'src/core/surface/channel.h', - 'src/core/surface/completion_queue.h', - 'src/core/surface/event_string.h', - 'src/core/surface/init.h', - 'src/core/surface/server.h', - 'src/core/surface/surface_trace.h', - 'src/core/transport/byte_stream.h', - 'src/core/transport/chttp2/alpn.h', - 'src/core/transport/chttp2/bin_encoder.h', - 'src/core/transport/chttp2/frame.h', - 'src/core/transport/chttp2/frame_data.h', - 'src/core/transport/chttp2/frame_goaway.h', - 'src/core/transport/chttp2/frame_ping.h', - 'src/core/transport/chttp2/frame_rst_stream.h', - 'src/core/transport/chttp2/frame_settings.h', - 'src/core/transport/chttp2/frame_window_update.h', - 'src/core/transport/chttp2/hpack_encoder.h', - 'src/core/transport/chttp2/hpack_parser.h', - 'src/core/transport/chttp2/hpack_table.h', - 'src/core/transport/chttp2/http2_errors.h', - 'src/core/transport/chttp2/huffsyms.h', - 'src/core/transport/chttp2/incoming_metadata.h', - 'src/core/transport/chttp2/internal.h', - 'src/core/transport/chttp2/status_conversion.h', - 'src/core/transport/chttp2/stream_map.h', - 'src/core/transport/chttp2/timeout_encoding.h', - 'src/core/transport/chttp2/varint.h', - 'src/core/transport/chttp2_transport.h', - 'src/core/transport/connectivity_state.h', - 'src/core/transport/metadata.h', - 'src/core/transport/metadata_batch.h', - 'src/core/transport/static_metadata.h', - 'src/core/transport/transport.h', - 'src/core/transport/transport_impl.h', - 'src/core/security/auth_filters.h', - 'src/core/security/b64.h', - 'src/core/security/credentials.h', - 'src/core/security/handshake.h', - 'src/core/security/json_token.h', - 'src/core/security/jwt_verifier.h', - 'src/core/security/secure_endpoint.h', - 'src/core/security/security_connector.h', - 'src/core/security/security_context.h', - 'src/core/tsi/fake_transport_security.h', - 'src/core/tsi/ssl_transport_security.h', - 'src/core/tsi/ssl_types.h', - 'src/core/tsi/transport_security.h', - 'src/core/tsi/transport_security_interface.h', - 'src/core/census/aggregation.h', - 'src/core/census/mlog.h', - 'src/core/census/rpc_metric_id.h', + 'src/core/lib/profiling/basic_timers.c', + 'src/core/lib/profiling/stap_timers.c', + 'src/core/lib/support/alloc.c', + 'src/core/lib/support/avl.c', + 'src/core/lib/support/backoff.c', + 'src/core/lib/support/cmdline.c', + 'src/core/lib/support/cpu_iphone.c', + 'src/core/lib/support/cpu_linux.c', + 'src/core/lib/support/cpu_posix.c', + 'src/core/lib/support/cpu_windows.c', + 'src/core/lib/support/env_linux.c', + 'src/core/lib/support/env_posix.c', + 'src/core/lib/support/env_win32.c', + 'src/core/lib/support/histogram.c', + 'src/core/lib/support/host_port.c', + 'src/core/lib/support/load_file.c', + 'src/core/lib/support/log.c', + 'src/core/lib/support/log_android.c', + 'src/core/lib/support/log_linux.c', + 'src/core/lib/support/log_posix.c', + 'src/core/lib/support/log_win32.c', + 'src/core/lib/support/murmur_hash.c', + 'src/core/lib/support/slice.c', + 'src/core/lib/support/slice_buffer.c', + 'src/core/lib/support/stack_lockfree.c', + 'src/core/lib/support/string.c', + 'src/core/lib/support/string_posix.c', + 'src/core/lib/support/string_win32.c', + 'src/core/lib/support/subprocess_posix.c', + 'src/core/lib/support/subprocess_windows.c', + 'src/core/lib/support/sync.c', + 'src/core/lib/support/sync_posix.c', + 'src/core/lib/support/sync_win32.c', + 'src/core/lib/support/thd.c', + 'src/core/lib/support/thd_posix.c', + 'src/core/lib/support/thd_win32.c', + 'src/core/lib/support/time.c', + 'src/core/lib/support/time_posix.c', + 'src/core/lib/support/time_precise.c', + 'src/core/lib/support/time_win32.c', + 'src/core/lib/support/tls_pthread.c', + 'src/core/lib/support/tmpfile_posix.c', + 'src/core/lib/support/tmpfile_win32.c', + 'src/core/lib/support/wrap_memcpy.c', + 'src/core/ext/transport/chttp2/transport/alpn.h', + 'src/core/ext/transport/chttp2/transport/bin_encoder.h', + 'src/core/ext/transport/chttp2/transport/chttp2_transport.h', + 'src/core/ext/transport/chttp2/transport/frame.h', + 'src/core/ext/transport/chttp2/transport/frame_data.h', + 'src/core/ext/transport/chttp2/transport/frame_goaway.h', + 'src/core/ext/transport/chttp2/transport/frame_ping.h', + 'src/core/ext/transport/chttp2/transport/frame_rst_stream.h', + 'src/core/ext/transport/chttp2/transport/frame_settings.h', + 'src/core/ext/transport/chttp2/transport/frame_window_update.h', + 'src/core/ext/transport/chttp2/transport/hpack_encoder.h', + 'src/core/ext/transport/chttp2/transport/hpack_parser.h', + 'src/core/ext/transport/chttp2/transport/hpack_table.h', + 'src/core/ext/transport/chttp2/transport/http2_errors.h', + 'src/core/ext/transport/chttp2/transport/huffsyms.h', + 'src/core/ext/transport/chttp2/transport/incoming_metadata.h', + 'src/core/ext/transport/chttp2/transport/internal.h', + 'src/core/ext/transport/chttp2/transport/status_conversion.h', + 'src/core/ext/transport/chttp2/transport/stream_map.h', + 'src/core/ext/transport/chttp2/transport/timeout_encoding.h', + 'src/core/ext/transport/chttp2/transport/varint.h', + 'src/core/lib/census/aggregation.h', + 'src/core/lib/census/grpc_filter.h', + 'src/core/lib/census/grpc_plugin.h', + 'src/core/lib/census/mlog.h', + 'src/core/lib/census/rpc_metric_id.h', + 'src/core/lib/channel/channel_args.h', + 'src/core/lib/channel/channel_stack.h', + 'src/core/lib/channel/channel_stack_builder.h', + 'src/core/lib/channel/client_channel.h', + 'src/core/lib/channel/compress_filter.h', + 'src/core/lib/channel/connected_channel.h', + 'src/core/lib/channel/context.h', + 'src/core/lib/channel/http_client_filter.h', + 'src/core/lib/channel/http_server_filter.h', + 'src/core/lib/channel/subchannel_call_holder.h', + 'src/core/lib/client_config/client_config.h', + 'src/core/lib/client_config/connector.h', + 'src/core/lib/client_config/initial_connect_string.h', + 'src/core/lib/client_config/lb_policies/load_balancer_api.h', + 'src/core/lib/client_config/lb_policies/pick_first.h', + 'src/core/lib/client_config/lb_policies/round_robin.h', + 'src/core/lib/client_config/lb_policy.h', + 'src/core/lib/client_config/lb_policy_factory.h', + 'src/core/lib/client_config/lb_policy_registry.h', + 'src/core/lib/client_config/resolver.h', + 'src/core/lib/client_config/resolver_factory.h', + 'src/core/lib/client_config/resolver_registry.h', + 'src/core/lib/client_config/resolvers/dns_resolver.h', + 'src/core/lib/client_config/resolvers/sockaddr_resolver.h', + 'src/core/lib/client_config/subchannel.h', + 'src/core/lib/client_config/subchannel_factory.h', + 'src/core/lib/client_config/subchannel_index.h', + 'src/core/lib/client_config/uri_parser.h', + 'src/core/lib/compression/algorithm_metadata.h', + 'src/core/lib/compression/message_compress.h', + 'src/core/lib/debug/trace.h', + 'src/core/lib/http/format_request.h', + 'src/core/lib/http/httpcli.h', + 'src/core/lib/http/parser.h', + 'src/core/lib/iomgr/closure.h', + 'src/core/lib/iomgr/endpoint.h', + 'src/core/lib/iomgr/endpoint_pair.h', + 'src/core/lib/iomgr/exec_ctx.h', + 'src/core/lib/iomgr/executor.h', + 'src/core/lib/iomgr/fd_posix.h', + 'src/core/lib/iomgr/iocp_windows.h', + 'src/core/lib/iomgr/iomgr.h', + 'src/core/lib/iomgr/iomgr_internal.h', + 'src/core/lib/iomgr/iomgr_posix.h', + 'src/core/lib/iomgr/pollset.h', + 'src/core/lib/iomgr/pollset_posix.h', + 'src/core/lib/iomgr/pollset_set.h', + 'src/core/lib/iomgr/pollset_set_posix.h', + 'src/core/lib/iomgr/pollset_set_windows.h', + 'src/core/lib/iomgr/pollset_windows.h', + 'src/core/lib/iomgr/resolve_address.h', + 'src/core/lib/iomgr/sockaddr.h', + 'src/core/lib/iomgr/sockaddr_posix.h', + 'src/core/lib/iomgr/sockaddr_utils.h', + 'src/core/lib/iomgr/sockaddr_win32.h', + 'src/core/lib/iomgr/socket_utils_posix.h', + 'src/core/lib/iomgr/socket_windows.h', + 'src/core/lib/iomgr/tcp_client.h', + 'src/core/lib/iomgr/tcp_posix.h', + 'src/core/lib/iomgr/tcp_server.h', + 'src/core/lib/iomgr/tcp_windows.h', + 'src/core/lib/iomgr/time_averaged_stats.h', + 'src/core/lib/iomgr/timer.h', + 'src/core/lib/iomgr/timer_heap.h', + 'src/core/lib/iomgr/udp_server.h', + 'src/core/lib/iomgr/unix_sockets_posix.h', + 'src/core/lib/iomgr/wakeup_fd_pipe.h', + 'src/core/lib/iomgr/wakeup_fd_posix.h', + 'src/core/lib/iomgr/workqueue.h', + 'src/core/lib/iomgr/workqueue_posix.h', + 'src/core/lib/iomgr/workqueue_windows.h', + 'src/core/lib/json/json.h', + 'src/core/lib/json/json_common.h', + 'src/core/lib/json/json_reader.h', + 'src/core/lib/json/json_writer.h', + 'src/core/lib/proto/grpc/lb/v0/load_balancer.pb.h', + 'src/core/lib/security/auth_filters.h', + 'src/core/lib/security/b64.h', + 'src/core/lib/security/credentials.h', + 'src/core/lib/security/handshake.h', + 'src/core/lib/security/json_token.h', + 'src/core/lib/security/jwt_verifier.h', + 'src/core/lib/security/secure_endpoint.h', + 'src/core/lib/security/security_connector.h', + 'src/core/lib/security/security_context.h', + 'src/core/lib/statistics/census_interface.h', + 'src/core/lib/statistics/census_rpc_stats.h', + 'src/core/lib/surface/api_trace.h', + 'src/core/lib/surface/call.h', + 'src/core/lib/surface/call_test_only.h', + 'src/core/lib/surface/channel.h', + 'src/core/lib/surface/channel_init.h', + 'src/core/lib/surface/channel_stack_type.h', + 'src/core/lib/surface/completion_queue.h', + 'src/core/lib/surface/event_string.h', + 'src/core/lib/surface/init.h', + 'src/core/lib/surface/lame_client.h', + 'src/core/lib/surface/server.h', + 'src/core/lib/surface/surface_trace.h', + 'src/core/lib/transport/byte_stream.h', + 'src/core/lib/transport/connectivity_state.h', + 'src/core/lib/transport/metadata.h', + 'src/core/lib/transport/metadata_batch.h', + 'src/core/lib/transport/static_metadata.h', + 'src/core/lib/transport/transport.h', + 'src/core/lib/transport/transport_impl.h', + 'src/core/lib/tsi/fake_transport_security.h', + 'src/core/lib/tsi/ssl_transport_security.h', + 'src/core/lib/tsi/ssl_types.h', + 'src/core/lib/tsi/transport_security.h', + 'src/core/lib/tsi/transport_security_interface.h', 'third_party/nanopb/pb.h', 'third_party/nanopb/pb_common.h', 'third_party/nanopb/pb_decode.h', 'third_party/nanopb/pb_encode.h', + 'include/grpc/byte_buffer.h', + 'include/grpc/byte_buffer_reader.h', + 'include/grpc/census.h', + 'include/grpc/compression.h', + 'include/grpc/grpc.h', 'include/grpc/grpc_security.h', 'include/grpc/impl/codegen/byte_buffer.h', 'include/grpc/impl/codegen/compression_types.h', @@ -302,316 +314,321 @@ Pod::Spec.new do |s| 'include/grpc/impl/codegen/grpc_types.h', 'include/grpc/impl/codegen/propagation_bits.h', 'include/grpc/impl/codegen/status.h', - 'include/grpc/byte_buffer.h', - 'include/grpc/byte_buffer_reader.h', - 'include/grpc/compression.h', - 'include/grpc/grpc.h', 'include/grpc/status.h', - 'include/grpc/census.h', - 'src/core/census/grpc_context.c', - 'src/core/census/grpc_filter.c', - 'src/core/channel/channel_args.c', - 'src/core/channel/channel_stack.c', - 'src/core/channel/client_channel.c', - 'src/core/channel/client_uchannel.c', - 'src/core/channel/compress_filter.c', - 'src/core/channel/connected_channel.c', - 'src/core/channel/http_client_filter.c', - 'src/core/channel/http_server_filter.c', - 'src/core/channel/subchannel_call_holder.c', - 'src/core/client_config/client_config.c', - 'src/core/client_config/connector.c', - 'src/core/client_config/default_initial_connect_string.c', - 'src/core/client_config/initial_connect_string.c', - 'src/core/client_config/lb_policies/load_balancer_api.c', - 'src/core/client_config/lb_policies/pick_first.c', - 'src/core/client_config/lb_policies/round_robin.c', - 'src/core/client_config/lb_policy.c', - 'src/core/client_config/lb_policy_factory.c', - 'src/core/client_config/lb_policy_registry.c', - 'src/core/client_config/resolver.c', - 'src/core/client_config/resolver_factory.c', - 'src/core/client_config/resolver_registry.c', - 'src/core/client_config/resolvers/dns_resolver.c', - 'src/core/client_config/resolvers/sockaddr_resolver.c', - 'src/core/client_config/subchannel.c', - 'src/core/client_config/subchannel_factory.c', - 'src/core/client_config/subchannel_index.c', - 'src/core/client_config/uri_parser.c', - 'src/core/compression/compression_algorithm.c', - 'src/core/compression/message_compress.c', - 'src/core/debug/trace.c', - 'src/core/httpcli/format_request.c', - 'src/core/httpcli/httpcli.c', - 'src/core/httpcli/parser.c', - 'src/core/iomgr/closure.c', - 'src/core/iomgr/endpoint.c', - 'src/core/iomgr/endpoint_pair_posix.c', - 'src/core/iomgr/endpoint_pair_windows.c', - 'src/core/iomgr/exec_ctx.c', - 'src/core/iomgr/executor.c', - 'src/core/iomgr/fd_posix.c', - 'src/core/iomgr/iocp_windows.c', - 'src/core/iomgr/iomgr.c', - 'src/core/iomgr/iomgr_posix.c', - 'src/core/iomgr/iomgr_windows.c', - 'src/core/iomgr/pollset_multipoller_with_epoll.c', - 'src/core/iomgr/pollset_multipoller_with_poll_posix.c', - 'src/core/iomgr/pollset_posix.c', - 'src/core/iomgr/pollset_set_posix.c', - 'src/core/iomgr/pollset_set_windows.c', - 'src/core/iomgr/pollset_windows.c', - 'src/core/iomgr/resolve_address_posix.c', - 'src/core/iomgr/resolve_address_windows.c', - 'src/core/iomgr/sockaddr_utils.c', - 'src/core/iomgr/socket_utils_common_posix.c', - 'src/core/iomgr/socket_utils_linux.c', - 'src/core/iomgr/socket_utils_posix.c', - 'src/core/iomgr/socket_windows.c', - 'src/core/iomgr/tcp_client_posix.c', - 'src/core/iomgr/tcp_client_windows.c', - 'src/core/iomgr/tcp_posix.c', - 'src/core/iomgr/tcp_server_posix.c', - 'src/core/iomgr/tcp_server_windows.c', - 'src/core/iomgr/tcp_windows.c', - 'src/core/iomgr/time_averaged_stats.c', - 'src/core/iomgr/timer.c', - 'src/core/iomgr/timer_heap.c', - 'src/core/iomgr/udp_server.c', - 'src/core/iomgr/wakeup_fd_eventfd.c', - 'src/core/iomgr/wakeup_fd_nospecial.c', - 'src/core/iomgr/wakeup_fd_pipe.c', - 'src/core/iomgr/wakeup_fd_posix.c', - 'src/core/iomgr/workqueue_posix.c', - 'src/core/iomgr/workqueue_windows.c', - 'src/core/json/json.c', - 'src/core/json/json_reader.c', - 'src/core/json/json_string.c', - 'src/core/json/json_writer.c', - 'src/core/proto/grpc/lb/v0/load_balancer.pb.c', - 'src/core/surface/alarm.c', - 'src/core/surface/api_trace.c', - 'src/core/surface/byte_buffer.c', - 'src/core/surface/byte_buffer_reader.c', - 'src/core/surface/call.c', - 'src/core/surface/call_details.c', - 'src/core/surface/call_log_batch.c', - 'src/core/surface/channel.c', - 'src/core/surface/channel_connectivity.c', - 'src/core/surface/channel_create.c', - 'src/core/surface/channel_ping.c', - 'src/core/surface/completion_queue.c', - 'src/core/surface/event_string.c', - 'src/core/surface/init.c', - 'src/core/surface/lame_client.c', - 'src/core/surface/metadata_array.c', - 'src/core/surface/server.c', - 'src/core/surface/server_chttp2.c', - 'src/core/surface/server_create.c', - 'src/core/surface/validate_metadata.c', - 'src/core/surface/version.c', - 'src/core/transport/byte_stream.c', - 'src/core/transport/chttp2/alpn.c', - 'src/core/transport/chttp2/bin_encoder.c', - 'src/core/transport/chttp2/frame_data.c', - 'src/core/transport/chttp2/frame_goaway.c', - 'src/core/transport/chttp2/frame_ping.c', - 'src/core/transport/chttp2/frame_rst_stream.c', - 'src/core/transport/chttp2/frame_settings.c', - 'src/core/transport/chttp2/frame_window_update.c', - 'src/core/transport/chttp2/hpack_encoder.c', - 'src/core/transport/chttp2/hpack_parser.c', - 'src/core/transport/chttp2/hpack_table.c', - 'src/core/transport/chttp2/huffsyms.c', - 'src/core/transport/chttp2/incoming_metadata.c', - 'src/core/transport/chttp2/parsing.c', - 'src/core/transport/chttp2/status_conversion.c', - 'src/core/transport/chttp2/stream_lists.c', - 'src/core/transport/chttp2/stream_map.c', - 'src/core/transport/chttp2/timeout_encoding.c', - 'src/core/transport/chttp2/varint.c', - 'src/core/transport/chttp2/writing.c', - 'src/core/transport/chttp2_transport.c', - 'src/core/transport/connectivity_state.c', - 'src/core/transport/metadata.c', - 'src/core/transport/metadata_batch.c', - 'src/core/transport/static_metadata.c', - 'src/core/transport/transport.c', - 'src/core/transport/transport_op_string.c', - 'src/core/httpcli/httpcli_security_connector.c', - 'src/core/security/b64.c', - 'src/core/security/client_auth_filter.c', - 'src/core/security/credentials.c', - 'src/core/security/credentials_metadata.c', - 'src/core/security/credentials_posix.c', - 'src/core/security/credentials_win32.c', - 'src/core/security/google_default_credentials.c', - 'src/core/security/handshake.c', - 'src/core/security/json_token.c', - 'src/core/security/jwt_verifier.c', - 'src/core/security/secure_endpoint.c', - 'src/core/security/security_connector.c', - 'src/core/security/security_context.c', - 'src/core/security/server_auth_filter.c', - 'src/core/security/server_secure_chttp2.c', - 'src/core/surface/init_secure.c', - 'src/core/surface/secure_channel_create.c', - 'src/core/tsi/fake_transport_security.c', - 'src/core/tsi/ssl_transport_security.c', - 'src/core/tsi/transport_security.c', - 'src/core/census/context.c', - 'src/core/census/initialize.c', - 'src/core/census/mlog.c', - 'src/core/census/operation.c', - 'src/core/census/placeholders.c', - 'src/core/census/tracing.c', + 'src/core/ext/transport/chttp2/client/insecure/channel_create.c', + 'src/core/ext/transport/chttp2/client/secure/secure_channel_create.c', + 'src/core/ext/transport/chttp2/server/insecure/server_chttp2.c', + 'src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c', + 'src/core/ext/transport/chttp2/transport/alpn.c', + 'src/core/ext/transport/chttp2/transport/bin_encoder.c', + 'src/core/ext/transport/chttp2/transport/chttp2_transport.c', + 'src/core/ext/transport/chttp2/transport/frame_data.c', + 'src/core/ext/transport/chttp2/transport/frame_goaway.c', + 'src/core/ext/transport/chttp2/transport/frame_ping.c', + 'src/core/ext/transport/chttp2/transport/frame_rst_stream.c', + 'src/core/ext/transport/chttp2/transport/frame_settings.c', + 'src/core/ext/transport/chttp2/transport/frame_window_update.c', + 'src/core/ext/transport/chttp2/transport/hpack_encoder.c', + 'src/core/ext/transport/chttp2/transport/hpack_parser.c', + 'src/core/ext/transport/chttp2/transport/hpack_table.c', + 'src/core/ext/transport/chttp2/transport/huffsyms.c', + 'src/core/ext/transport/chttp2/transport/incoming_metadata.c', + 'src/core/ext/transport/chttp2/transport/parsing.c', + 'src/core/ext/transport/chttp2/transport/status_conversion.c', + 'src/core/ext/transport/chttp2/transport/stream_lists.c', + 'src/core/ext/transport/chttp2/transport/stream_map.c', + 'src/core/ext/transport/chttp2/transport/timeout_encoding.c', + 'src/core/ext/transport/chttp2/transport/varint.c', + 'src/core/ext/transport/chttp2/transport/writing.c', + 'src/core/lib/census/context.c', + 'src/core/lib/census/grpc_context.c', + 'src/core/lib/census/grpc_filter.c', + 'src/core/lib/census/grpc_plugin.c', + 'src/core/lib/census/initialize.c', + 'src/core/lib/census/mlog.c', + 'src/core/lib/census/operation.c', + 'src/core/lib/census/placeholders.c', + 'src/core/lib/census/tracing.c', + 'src/core/lib/channel/channel_args.c', + 'src/core/lib/channel/channel_stack.c', + 'src/core/lib/channel/channel_stack_builder.c', + 'src/core/lib/channel/client_channel.c', + 'src/core/lib/channel/compress_filter.c', + 'src/core/lib/channel/connected_channel.c', + 'src/core/lib/channel/http_client_filter.c', + 'src/core/lib/channel/http_server_filter.c', + 'src/core/lib/channel/subchannel_call_holder.c', + 'src/core/lib/client_config/client_config.c', + 'src/core/lib/client_config/connector.c', + 'src/core/lib/client_config/default_initial_connect_string.c', + 'src/core/lib/client_config/initial_connect_string.c', + 'src/core/lib/client_config/lb_policies/load_balancer_api.c', + 'src/core/lib/client_config/lb_policies/pick_first.c', + 'src/core/lib/client_config/lb_policies/round_robin.c', + 'src/core/lib/client_config/lb_policy.c', + 'src/core/lib/client_config/lb_policy_factory.c', + 'src/core/lib/client_config/lb_policy_registry.c', + 'src/core/lib/client_config/resolver.c', + 'src/core/lib/client_config/resolver_factory.c', + 'src/core/lib/client_config/resolver_registry.c', + 'src/core/lib/client_config/resolvers/dns_resolver.c', + 'src/core/lib/client_config/resolvers/sockaddr_resolver.c', + 'src/core/lib/client_config/subchannel.c', + 'src/core/lib/client_config/subchannel_factory.c', + 'src/core/lib/client_config/subchannel_index.c', + 'src/core/lib/client_config/uri_parser.c', + 'src/core/lib/compression/compression_algorithm.c', + 'src/core/lib/compression/message_compress.c', + 'src/core/lib/debug/trace.c', + 'src/core/lib/http/format_request.c', + 'src/core/lib/http/httpcli.c', + 'src/core/lib/http/httpcli_security_connector.c', + 'src/core/lib/http/parser.c', + 'src/core/lib/iomgr/closure.c', + 'src/core/lib/iomgr/endpoint.c', + 'src/core/lib/iomgr/endpoint_pair_posix.c', + 'src/core/lib/iomgr/endpoint_pair_windows.c', + 'src/core/lib/iomgr/exec_ctx.c', + 'src/core/lib/iomgr/executor.c', + 'src/core/lib/iomgr/fd_posix.c', + 'src/core/lib/iomgr/iocp_windows.c', + 'src/core/lib/iomgr/iomgr.c', + 'src/core/lib/iomgr/iomgr_posix.c', + 'src/core/lib/iomgr/iomgr_windows.c', + 'src/core/lib/iomgr/pollset_multipoller_with_epoll.c', + 'src/core/lib/iomgr/pollset_multipoller_with_poll_posix.c', + 'src/core/lib/iomgr/pollset_posix.c', + 'src/core/lib/iomgr/pollset_set_posix.c', + 'src/core/lib/iomgr/pollset_set_windows.c', + 'src/core/lib/iomgr/pollset_windows.c', + 'src/core/lib/iomgr/resolve_address_posix.c', + 'src/core/lib/iomgr/resolve_address_windows.c', + 'src/core/lib/iomgr/sockaddr_utils.c', + 'src/core/lib/iomgr/socket_utils_common_posix.c', + 'src/core/lib/iomgr/socket_utils_linux.c', + 'src/core/lib/iomgr/socket_utils_posix.c', + 'src/core/lib/iomgr/socket_windows.c', + 'src/core/lib/iomgr/tcp_client_posix.c', + 'src/core/lib/iomgr/tcp_client_windows.c', + 'src/core/lib/iomgr/tcp_posix.c', + 'src/core/lib/iomgr/tcp_server_posix.c', + 'src/core/lib/iomgr/tcp_server_windows.c', + 'src/core/lib/iomgr/tcp_windows.c', + 'src/core/lib/iomgr/time_averaged_stats.c', + 'src/core/lib/iomgr/timer.c', + 'src/core/lib/iomgr/timer_heap.c', + 'src/core/lib/iomgr/udp_server.c', + 'src/core/lib/iomgr/unix_sockets_posix.c', + 'src/core/lib/iomgr/unix_sockets_posix_noop.c', + 'src/core/lib/iomgr/wakeup_fd_eventfd.c', + 'src/core/lib/iomgr/wakeup_fd_nospecial.c', + 'src/core/lib/iomgr/wakeup_fd_pipe.c', + 'src/core/lib/iomgr/wakeup_fd_posix.c', + 'src/core/lib/iomgr/workqueue_posix.c', + 'src/core/lib/iomgr/workqueue_windows.c', + 'src/core/lib/json/json.c', + 'src/core/lib/json/json_reader.c', + 'src/core/lib/json/json_string.c', + 'src/core/lib/json/json_writer.c', + 'src/core/lib/proto/grpc/lb/v0/load_balancer.pb.c', + 'src/core/lib/security/b64.c', + 'src/core/lib/security/client_auth_filter.c', + 'src/core/lib/security/credentials.c', + 'src/core/lib/security/credentials_metadata.c', + 'src/core/lib/security/credentials_posix.c', + 'src/core/lib/security/credentials_win32.c', + 'src/core/lib/security/google_default_credentials.c', + 'src/core/lib/security/handshake.c', + 'src/core/lib/security/json_token.c', + 'src/core/lib/security/jwt_verifier.c', + 'src/core/lib/security/secure_endpoint.c', + 'src/core/lib/security/security_connector.c', + 'src/core/lib/security/security_context.c', + 'src/core/lib/security/server_auth_filter.c', + 'src/core/lib/surface/alarm.c', + 'src/core/lib/surface/api_trace.c', + 'src/core/lib/surface/byte_buffer.c', + 'src/core/lib/surface/byte_buffer_reader.c', + 'src/core/lib/surface/call.c', + 'src/core/lib/surface/call_details.c', + 'src/core/lib/surface/call_log_batch.c', + 'src/core/lib/surface/channel.c', + 'src/core/lib/surface/channel_connectivity.c', + 'src/core/lib/surface/channel_init.c', + 'src/core/lib/surface/channel_ping.c', + 'src/core/lib/surface/channel_stack_type.c', + 'src/core/lib/surface/completion_queue.c', + 'src/core/lib/surface/event_string.c', + 'src/core/lib/surface/init.c', + 'src/core/lib/surface/init_secure.c', + 'src/core/lib/surface/lame_client.c', + 'src/core/lib/surface/metadata_array.c', + 'src/core/lib/surface/server.c', + 'src/core/lib/surface/validate_metadata.c', + 'src/core/lib/surface/version.c', + 'src/core/lib/transport/byte_stream.c', + 'src/core/lib/transport/connectivity_state.c', + 'src/core/lib/transport/metadata.c', + 'src/core/lib/transport/metadata_batch.c', + 'src/core/lib/transport/static_metadata.c', + 'src/core/lib/transport/transport.c', + 'src/core/lib/transport/transport_op_string.c', + 'src/core/lib/tsi/fake_transport_security.c', + 'src/core/lib/tsi/ssl_transport_security.c', + 'src/core/lib/tsi/transport_security.c', 'third_party/nanopb/pb_common.c', 'third_party/nanopb/pb_decode.c', 'third_party/nanopb/pb_encode.c' - ss.private_header_files = 'src/core/profiling/timers.h', - 'src/core/support/block_annotate.h', - 'src/core/support/env.h', - 'src/core/support/load_file.h', - 'src/core/support/murmur_hash.h', - 'src/core/support/stack_lockfree.h', - 'src/core/support/string.h', - 'src/core/support/string_win32.h', - 'src/core/support/thd_internal.h', - 'src/core/support/time_precise.h', - 'src/core/support/tmpfile.h', - 'src/core/census/grpc_filter.h', - 'src/core/channel/channel_args.h', - 'src/core/channel/channel_stack.h', - 'src/core/channel/client_channel.h', - 'src/core/channel/client_uchannel.h', - 'src/core/channel/compress_filter.h', - 'src/core/channel/connected_channel.h', - 'src/core/channel/context.h', - 'src/core/channel/http_client_filter.h', - 'src/core/channel/http_server_filter.h', - 'src/core/channel/subchannel_call_holder.h', - 'src/core/client_config/client_config.h', - 'src/core/client_config/connector.h', - 'src/core/client_config/initial_connect_string.h', - 'src/core/client_config/lb_policies/load_balancer_api.h', - 'src/core/client_config/lb_policies/pick_first.h', - 'src/core/client_config/lb_policies/round_robin.h', - 'src/core/client_config/lb_policy.h', - 'src/core/client_config/lb_policy_factory.h', - 'src/core/client_config/lb_policy_registry.h', - 'src/core/client_config/resolver.h', - 'src/core/client_config/resolver_factory.h', - 'src/core/client_config/resolver_registry.h', - 'src/core/client_config/resolvers/dns_resolver.h', - 'src/core/client_config/resolvers/sockaddr_resolver.h', - 'src/core/client_config/subchannel.h', - 'src/core/client_config/subchannel_factory.h', - 'src/core/client_config/subchannel_index.h', - 'src/core/client_config/uri_parser.h', - 'src/core/compression/algorithm_metadata.h', - 'src/core/compression/message_compress.h', - 'src/core/debug/trace.h', - 'src/core/httpcli/format_request.h', - 'src/core/httpcli/httpcli.h', - 'src/core/httpcli/parser.h', - 'src/core/iomgr/closure.h', - 'src/core/iomgr/endpoint.h', - 'src/core/iomgr/endpoint_pair.h', - 'src/core/iomgr/exec_ctx.h', - 'src/core/iomgr/executor.h', - 'src/core/iomgr/fd_posix.h', - 'src/core/iomgr/iocp_windows.h', - 'src/core/iomgr/iomgr.h', - 'src/core/iomgr/iomgr_internal.h', - 'src/core/iomgr/iomgr_posix.h', - 'src/core/iomgr/pollset.h', - 'src/core/iomgr/pollset_posix.h', - 'src/core/iomgr/pollset_set.h', - 'src/core/iomgr/pollset_set_posix.h', - 'src/core/iomgr/pollset_set_windows.h', - 'src/core/iomgr/pollset_windows.h', - 'src/core/iomgr/resolve_address.h', - 'src/core/iomgr/sockaddr.h', - 'src/core/iomgr/sockaddr_posix.h', - 'src/core/iomgr/sockaddr_utils.h', - 'src/core/iomgr/sockaddr_win32.h', - 'src/core/iomgr/socket_utils_posix.h', - 'src/core/iomgr/socket_windows.h', - 'src/core/iomgr/tcp_client.h', - 'src/core/iomgr/tcp_posix.h', - 'src/core/iomgr/tcp_server.h', - 'src/core/iomgr/tcp_windows.h', - 'src/core/iomgr/time_averaged_stats.h', - 'src/core/iomgr/timer.h', - 'src/core/iomgr/timer_heap.h', - 'src/core/iomgr/udp_server.h', - 'src/core/iomgr/wakeup_fd_pipe.h', - 'src/core/iomgr/wakeup_fd_posix.h', - 'src/core/iomgr/workqueue.h', - 'src/core/iomgr/workqueue_posix.h', - 'src/core/iomgr/workqueue_windows.h', - 'src/core/json/json.h', - 'src/core/json/json_common.h', - 'src/core/json/json_reader.h', - 'src/core/json/json_writer.h', - 'src/core/proto/grpc/lb/v0/load_balancer.pb.h', - 'src/core/statistics/census_interface.h', - 'src/core/statistics/census_rpc_stats.h', - 'src/core/surface/api_trace.h', - 'src/core/surface/call.h', - 'src/core/surface/call_test_only.h', - 'src/core/surface/channel.h', - 'src/core/surface/completion_queue.h', - 'src/core/surface/event_string.h', - 'src/core/surface/init.h', - 'src/core/surface/server.h', - 'src/core/surface/surface_trace.h', - 'src/core/transport/byte_stream.h', - 'src/core/transport/chttp2/alpn.h', - 'src/core/transport/chttp2/bin_encoder.h', - 'src/core/transport/chttp2/frame.h', - 'src/core/transport/chttp2/frame_data.h', - 'src/core/transport/chttp2/frame_goaway.h', - 'src/core/transport/chttp2/frame_ping.h', - 'src/core/transport/chttp2/frame_rst_stream.h', - 'src/core/transport/chttp2/frame_settings.h', - 'src/core/transport/chttp2/frame_window_update.h', - 'src/core/transport/chttp2/hpack_encoder.h', - 'src/core/transport/chttp2/hpack_parser.h', - 'src/core/transport/chttp2/hpack_table.h', - 'src/core/transport/chttp2/http2_errors.h', - 'src/core/transport/chttp2/huffsyms.h', - 'src/core/transport/chttp2/incoming_metadata.h', - 'src/core/transport/chttp2/internal.h', - 'src/core/transport/chttp2/status_conversion.h', - 'src/core/transport/chttp2/stream_map.h', - 'src/core/transport/chttp2/timeout_encoding.h', - 'src/core/transport/chttp2/varint.h', - 'src/core/transport/chttp2_transport.h', - 'src/core/transport/connectivity_state.h', - 'src/core/transport/metadata.h', - 'src/core/transport/metadata_batch.h', - 'src/core/transport/static_metadata.h', - 'src/core/transport/transport.h', - 'src/core/transport/transport_impl.h', - 'src/core/security/auth_filters.h', - 'src/core/security/b64.h', - 'src/core/security/credentials.h', - 'src/core/security/handshake.h', - 'src/core/security/json_token.h', - 'src/core/security/jwt_verifier.h', - 'src/core/security/secure_endpoint.h', - 'src/core/security/security_connector.h', - 'src/core/security/security_context.h', - 'src/core/tsi/fake_transport_security.h', - 'src/core/tsi/ssl_transport_security.h', - 'src/core/tsi/ssl_types.h', - 'src/core/tsi/transport_security.h', - 'src/core/tsi/transport_security_interface.h', - 'src/core/census/aggregation.h', - 'src/core/census/mlog.h', - 'src/core/census/rpc_metric_id.h', + ss.private_header_files = 'src/core/lib/profiling/timers.h', + 'src/core/lib/support/backoff.h', + 'src/core/lib/support/block_annotate.h', + 'src/core/lib/support/env.h', + 'src/core/lib/support/load_file.h', + 'src/core/lib/support/murmur_hash.h', + 'src/core/lib/support/stack_lockfree.h', + 'src/core/lib/support/string.h', + 'src/core/lib/support/string_win32.h', + 'src/core/lib/support/thd_internal.h', + 'src/core/lib/support/time_precise.h', + 'src/core/lib/support/tmpfile.h', + 'src/core/ext/transport/chttp2/transport/alpn.h', + 'src/core/ext/transport/chttp2/transport/bin_encoder.h', + 'src/core/ext/transport/chttp2/transport/chttp2_transport.h', + 'src/core/ext/transport/chttp2/transport/frame.h', + 'src/core/ext/transport/chttp2/transport/frame_data.h', + 'src/core/ext/transport/chttp2/transport/frame_goaway.h', + 'src/core/ext/transport/chttp2/transport/frame_ping.h', + 'src/core/ext/transport/chttp2/transport/frame_rst_stream.h', + 'src/core/ext/transport/chttp2/transport/frame_settings.h', + 'src/core/ext/transport/chttp2/transport/frame_window_update.h', + 'src/core/ext/transport/chttp2/transport/hpack_encoder.h', + 'src/core/ext/transport/chttp2/transport/hpack_parser.h', + 'src/core/ext/transport/chttp2/transport/hpack_table.h', + 'src/core/ext/transport/chttp2/transport/http2_errors.h', + 'src/core/ext/transport/chttp2/transport/huffsyms.h', + 'src/core/ext/transport/chttp2/transport/incoming_metadata.h', + 'src/core/ext/transport/chttp2/transport/internal.h', + 'src/core/ext/transport/chttp2/transport/status_conversion.h', + 'src/core/ext/transport/chttp2/transport/stream_map.h', + 'src/core/ext/transport/chttp2/transport/timeout_encoding.h', + 'src/core/ext/transport/chttp2/transport/varint.h', + 'src/core/lib/census/aggregation.h', + 'src/core/lib/census/grpc_filter.h', + 'src/core/lib/census/grpc_plugin.h', + 'src/core/lib/census/mlog.h', + 'src/core/lib/census/rpc_metric_id.h', + 'src/core/lib/channel/channel_args.h', + 'src/core/lib/channel/channel_stack.h', + 'src/core/lib/channel/channel_stack_builder.h', + 'src/core/lib/channel/client_channel.h', + 'src/core/lib/channel/compress_filter.h', + 'src/core/lib/channel/connected_channel.h', + 'src/core/lib/channel/context.h', + 'src/core/lib/channel/http_client_filter.h', + 'src/core/lib/channel/http_server_filter.h', + 'src/core/lib/channel/subchannel_call_holder.h', + 'src/core/lib/client_config/client_config.h', + 'src/core/lib/client_config/connector.h', + 'src/core/lib/client_config/initial_connect_string.h', + 'src/core/lib/client_config/lb_policies/load_balancer_api.h', + 'src/core/lib/client_config/lb_policies/pick_first.h', + 'src/core/lib/client_config/lb_policies/round_robin.h', + 'src/core/lib/client_config/lb_policy.h', + 'src/core/lib/client_config/lb_policy_factory.h', + 'src/core/lib/client_config/lb_policy_registry.h', + 'src/core/lib/client_config/resolver.h', + 'src/core/lib/client_config/resolver_factory.h', + 'src/core/lib/client_config/resolver_registry.h', + 'src/core/lib/client_config/resolvers/dns_resolver.h', + 'src/core/lib/client_config/resolvers/sockaddr_resolver.h', + 'src/core/lib/client_config/subchannel.h', + 'src/core/lib/client_config/subchannel_factory.h', + 'src/core/lib/client_config/subchannel_index.h', + 'src/core/lib/client_config/uri_parser.h', + 'src/core/lib/compression/algorithm_metadata.h', + 'src/core/lib/compression/message_compress.h', + 'src/core/lib/debug/trace.h', + 'src/core/lib/http/format_request.h', + 'src/core/lib/http/httpcli.h', + 'src/core/lib/http/parser.h', + 'src/core/lib/iomgr/closure.h', + 'src/core/lib/iomgr/endpoint.h', + 'src/core/lib/iomgr/endpoint_pair.h', + 'src/core/lib/iomgr/exec_ctx.h', + 'src/core/lib/iomgr/executor.h', + 'src/core/lib/iomgr/fd_posix.h', + 'src/core/lib/iomgr/iocp_windows.h', + 'src/core/lib/iomgr/iomgr.h', + 'src/core/lib/iomgr/iomgr_internal.h', + 'src/core/lib/iomgr/iomgr_posix.h', + 'src/core/lib/iomgr/pollset.h', + 'src/core/lib/iomgr/pollset_posix.h', + 'src/core/lib/iomgr/pollset_set.h', + 'src/core/lib/iomgr/pollset_set_posix.h', + 'src/core/lib/iomgr/pollset_set_windows.h', + 'src/core/lib/iomgr/pollset_windows.h', + 'src/core/lib/iomgr/resolve_address.h', + 'src/core/lib/iomgr/sockaddr.h', + 'src/core/lib/iomgr/sockaddr_posix.h', + 'src/core/lib/iomgr/sockaddr_utils.h', + 'src/core/lib/iomgr/sockaddr_win32.h', + 'src/core/lib/iomgr/socket_utils_posix.h', + 'src/core/lib/iomgr/socket_windows.h', + 'src/core/lib/iomgr/tcp_client.h', + 'src/core/lib/iomgr/tcp_posix.h', + 'src/core/lib/iomgr/tcp_server.h', + 'src/core/lib/iomgr/tcp_windows.h', + 'src/core/lib/iomgr/time_averaged_stats.h', + 'src/core/lib/iomgr/timer.h', + 'src/core/lib/iomgr/timer_heap.h', + 'src/core/lib/iomgr/udp_server.h', + 'src/core/lib/iomgr/unix_sockets_posix.h', + 'src/core/lib/iomgr/wakeup_fd_pipe.h', + 'src/core/lib/iomgr/wakeup_fd_posix.h', + 'src/core/lib/iomgr/workqueue.h', + 'src/core/lib/iomgr/workqueue_posix.h', + 'src/core/lib/iomgr/workqueue_windows.h', + 'src/core/lib/json/json.h', + 'src/core/lib/json/json_common.h', + 'src/core/lib/json/json_reader.h', + 'src/core/lib/json/json_writer.h', + 'src/core/lib/proto/grpc/lb/v0/load_balancer.pb.h', + 'src/core/lib/security/auth_filters.h', + 'src/core/lib/security/b64.h', + 'src/core/lib/security/credentials.h', + 'src/core/lib/security/handshake.h', + 'src/core/lib/security/json_token.h', + 'src/core/lib/security/jwt_verifier.h', + 'src/core/lib/security/secure_endpoint.h', + 'src/core/lib/security/security_connector.h', + 'src/core/lib/security/security_context.h', + 'src/core/lib/statistics/census_interface.h', + 'src/core/lib/statistics/census_rpc_stats.h', + 'src/core/lib/surface/api_trace.h', + 'src/core/lib/surface/call.h', + 'src/core/lib/surface/call_test_only.h', + 'src/core/lib/surface/channel.h', + 'src/core/lib/surface/channel_init.h', + 'src/core/lib/surface/channel_stack_type.h', + 'src/core/lib/surface/completion_queue.h', + 'src/core/lib/surface/event_string.h', + 'src/core/lib/surface/init.h', + 'src/core/lib/surface/lame_client.h', + 'src/core/lib/surface/server.h', + 'src/core/lib/surface/surface_trace.h', + 'src/core/lib/transport/byte_stream.h', + 'src/core/lib/transport/connectivity_state.h', + 'src/core/lib/transport/metadata.h', + 'src/core/lib/transport/metadata_batch.h', + 'src/core/lib/transport/static_metadata.h', + 'src/core/lib/transport/transport.h', + 'src/core/lib/transport/transport_impl.h', + 'src/core/lib/tsi/fake_transport_security.h', + 'src/core/lib/tsi/ssl_transport_security.h', + 'src/core/lib/tsi/ssl_types.h', + 'src/core/lib/tsi/transport_security.h', + 'src/core/lib/tsi/transport_security_interface.h', 'third_party/nanopb/pb.h', 'third_party/nanopb/pb_common.h', 'third_party/nanopb/pb_decode.h', diff --git a/grpc.gemspec b/grpc.gemspec index 1b3f15ecf36..c516f5278f2 100755 --- a/grpc.gemspec +++ b/grpc.gemspec @@ -46,6 +46,20 @@ Gem::Specification.new do |s| s.extensions = %w(src/ruby/ext/grpc/extconf.rb) + s.files += %w( include/grpc/impl/codegen/alloc.h ) + s.files += %w( include/grpc/impl/codegen/atm.h ) + s.files += %w( include/grpc/impl/codegen/atm_gcc_atomic.h ) + s.files += %w( include/grpc/impl/codegen/atm_gcc_sync.h ) + s.files += %w( include/grpc/impl/codegen/atm_win32.h ) + s.files += %w( include/grpc/impl/codegen/log.h ) + s.files += %w( include/grpc/impl/codegen/port_platform.h ) + s.files += %w( include/grpc/impl/codegen/slice.h ) + s.files += %w( include/grpc/impl/codegen/slice_buffer.h ) + s.files += %w( include/grpc/impl/codegen/sync.h ) + s.files += %w( include/grpc/impl/codegen/sync_generic.h ) + s.files += %w( include/grpc/impl/codegen/sync_posix.h ) + s.files += %w( include/grpc/impl/codegen/sync_win32.h ) + s.files += %w( include/grpc/impl/codegen/time.h ) s.files += %w( include/grpc/support/alloc.h ) s.files += %w( include/grpc/support/atm.h ) s.files += %w( include/grpc/support/atm_gcc_atomic.h ) @@ -74,74 +88,67 @@ Gem::Specification.new do |s| s.files += %w( include/grpc/support/tls_msvc.h ) s.files += %w( include/grpc/support/tls_pthread.h ) s.files += %w( include/grpc/support/useful.h ) - s.files += %w( include/grpc/impl/codegen/alloc.h ) - s.files += %w( include/grpc/impl/codegen/atm.h ) - s.files += %w( include/grpc/impl/codegen/atm_gcc_atomic.h ) - s.files += %w( include/grpc/impl/codegen/atm_gcc_sync.h ) - s.files += %w( include/grpc/impl/codegen/atm_win32.h ) - s.files += %w( include/grpc/impl/codegen/log.h ) - s.files += %w( include/grpc/impl/codegen/port_platform.h ) - s.files += %w( include/grpc/impl/codegen/slice.h ) - s.files += %w( include/grpc/impl/codegen/slice_buffer.h ) - s.files += %w( include/grpc/impl/codegen/sync.h ) - s.files += %w( include/grpc/impl/codegen/sync_generic.h ) - s.files += %w( include/grpc/impl/codegen/sync_posix.h ) - s.files += %w( include/grpc/impl/codegen/sync_win32.h ) - s.files += %w( include/grpc/impl/codegen/time.h ) - s.files += %w( src/core/profiling/timers.h ) - s.files += %w( src/core/support/block_annotate.h ) - s.files += %w( src/core/support/env.h ) - s.files += %w( src/core/support/load_file.h ) - s.files += %w( src/core/support/murmur_hash.h ) - s.files += %w( src/core/support/stack_lockfree.h ) - s.files += %w( src/core/support/string.h ) - s.files += %w( src/core/support/string_win32.h ) - s.files += %w( src/core/support/thd_internal.h ) - s.files += %w( src/core/support/time_precise.h ) - s.files += %w( src/core/support/tmpfile.h ) - s.files += %w( src/core/profiling/basic_timers.c ) - s.files += %w( src/core/profiling/stap_timers.c ) - s.files += %w( src/core/support/alloc.c ) - s.files += %w( src/core/support/avl.c ) - s.files += %w( src/core/support/cmdline.c ) - s.files += %w( src/core/support/cpu_iphone.c ) - s.files += %w( src/core/support/cpu_linux.c ) - s.files += %w( src/core/support/cpu_posix.c ) - s.files += %w( src/core/support/cpu_windows.c ) - s.files += %w( src/core/support/env_linux.c ) - s.files += %w( src/core/support/env_posix.c ) - s.files += %w( src/core/support/env_win32.c ) - s.files += %w( src/core/support/histogram.c ) - s.files += %w( src/core/support/host_port.c ) - s.files += %w( src/core/support/load_file.c ) - s.files += %w( src/core/support/log.c ) - s.files += %w( src/core/support/log_android.c ) - s.files += %w( src/core/support/log_linux.c ) - s.files += %w( src/core/support/log_posix.c ) - s.files += %w( src/core/support/log_win32.c ) - s.files += %w( src/core/support/murmur_hash.c ) - s.files += %w( src/core/support/slice.c ) - s.files += %w( src/core/support/slice_buffer.c ) - s.files += %w( src/core/support/stack_lockfree.c ) - s.files += %w( src/core/support/string.c ) - s.files += %w( src/core/support/string_posix.c ) - s.files += %w( src/core/support/string_win32.c ) - s.files += %w( src/core/support/subprocess_posix.c ) - s.files += %w( src/core/support/subprocess_windows.c ) - s.files += %w( src/core/support/sync.c ) - s.files += %w( src/core/support/sync_posix.c ) - s.files += %w( src/core/support/sync_win32.c ) - s.files += %w( src/core/support/thd.c ) - s.files += %w( src/core/support/thd_posix.c ) - s.files += %w( src/core/support/thd_win32.c ) - s.files += %w( src/core/support/time.c ) - s.files += %w( src/core/support/time_posix.c ) - s.files += %w( src/core/support/time_precise.c ) - s.files += %w( src/core/support/time_win32.c ) - s.files += %w( src/core/support/tls_pthread.c ) - s.files += %w( src/core/support/tmpfile_posix.c ) - s.files += %w( src/core/support/tmpfile_win32.c ) - s.files += %w( src/core/support/wrap_memcpy.c ) + s.files += %w( src/core/lib/profiling/timers.h ) + s.files += %w( src/core/lib/support/backoff.h ) + s.files += %w( src/core/lib/support/block_annotate.h ) + s.files += %w( src/core/lib/support/env.h ) + s.files += %w( src/core/lib/support/load_file.h ) + s.files += %w( src/core/lib/support/murmur_hash.h ) + s.files += %w( src/core/lib/support/stack_lockfree.h ) + s.files += %w( src/core/lib/support/string.h ) + s.files += %w( src/core/lib/support/string_win32.h ) + s.files += %w( src/core/lib/support/thd_internal.h ) + s.files += %w( src/core/lib/support/time_precise.h ) + s.files += %w( src/core/lib/support/tmpfile.h ) + s.files += %w( src/core/lib/profiling/basic_timers.c ) + s.files += %w( src/core/lib/profiling/stap_timers.c ) + s.files += %w( src/core/lib/support/alloc.c ) + s.files += %w( src/core/lib/support/avl.c ) + s.files += %w( src/core/lib/support/backoff.c ) + s.files += %w( src/core/lib/support/cmdline.c ) + s.files += %w( src/core/lib/support/cpu_iphone.c ) + s.files += %w( src/core/lib/support/cpu_linux.c ) + s.files += %w( src/core/lib/support/cpu_posix.c ) + s.files += %w( src/core/lib/support/cpu_windows.c ) + s.files += %w( src/core/lib/support/env_linux.c ) + s.files += %w( src/core/lib/support/env_posix.c ) + s.files += %w( src/core/lib/support/env_win32.c ) + s.files += %w( src/core/lib/support/histogram.c ) + s.files += %w( src/core/lib/support/host_port.c ) + s.files += %w( src/core/lib/support/load_file.c ) + s.files += %w( src/core/lib/support/log.c ) + s.files += %w( src/core/lib/support/log_android.c ) + s.files += %w( src/core/lib/support/log_linux.c ) + s.files += %w( src/core/lib/support/log_posix.c ) + s.files += %w( src/core/lib/support/log_win32.c ) + s.files += %w( src/core/lib/support/murmur_hash.c ) + s.files += %w( src/core/lib/support/slice.c ) + s.files += %w( src/core/lib/support/slice_buffer.c ) + s.files += %w( src/core/lib/support/stack_lockfree.c ) + s.files += %w( src/core/lib/support/string.c ) + s.files += %w( src/core/lib/support/string_posix.c ) + s.files += %w( src/core/lib/support/string_win32.c ) + s.files += %w( src/core/lib/support/subprocess_posix.c ) + s.files += %w( src/core/lib/support/subprocess_windows.c ) + s.files += %w( src/core/lib/support/sync.c ) + s.files += %w( src/core/lib/support/sync_posix.c ) + s.files += %w( src/core/lib/support/sync_win32.c ) + s.files += %w( src/core/lib/support/thd.c ) + s.files += %w( src/core/lib/support/thd_posix.c ) + s.files += %w( src/core/lib/support/thd_win32.c ) + s.files += %w( src/core/lib/support/time.c ) + s.files += %w( src/core/lib/support/time_posix.c ) + s.files += %w( src/core/lib/support/time_precise.c ) + s.files += %w( src/core/lib/support/time_win32.c ) + s.files += %w( src/core/lib/support/tls_pthread.c ) + s.files += %w( src/core/lib/support/tmpfile_posix.c ) + s.files += %w( src/core/lib/support/tmpfile_win32.c ) + s.files += %w( src/core/lib/support/wrap_memcpy.c ) + s.files += %w( include/grpc/byte_buffer.h ) + s.files += %w( include/grpc/byte_buffer_reader.h ) + s.files += %w( include/grpc/census.h ) + s.files += %w( include/grpc/compression.h ) + s.files += %w( include/grpc/grpc.h ) s.files += %w( include/grpc/grpc_security.h ) s.files += %w( include/grpc/impl/codegen/byte_buffer.h ) s.files += %w( include/grpc/impl/codegen/compression_types.h ) @@ -149,305 +156,309 @@ Gem::Specification.new do |s| s.files += %w( include/grpc/impl/codegen/grpc_types.h ) s.files += %w( include/grpc/impl/codegen/propagation_bits.h ) s.files += %w( include/grpc/impl/codegen/status.h ) - s.files += %w( include/grpc/byte_buffer.h ) - s.files += %w( include/grpc/byte_buffer_reader.h ) - s.files += %w( include/grpc/compression.h ) - s.files += %w( include/grpc/grpc.h ) s.files += %w( include/grpc/status.h ) - s.files += %w( include/grpc/census.h ) - s.files += %w( src/core/census/grpc_filter.h ) - s.files += %w( src/core/channel/channel_args.h ) - s.files += %w( src/core/channel/channel_stack.h ) - s.files += %w( src/core/channel/client_channel.h ) - s.files += %w( src/core/channel/client_uchannel.h ) - s.files += %w( src/core/channel/compress_filter.h ) - s.files += %w( src/core/channel/connected_channel.h ) - s.files += %w( src/core/channel/context.h ) - s.files += %w( src/core/channel/http_client_filter.h ) - s.files += %w( src/core/channel/http_server_filter.h ) - s.files += %w( src/core/channel/subchannel_call_holder.h ) - s.files += %w( src/core/client_config/client_config.h ) - s.files += %w( src/core/client_config/connector.h ) - s.files += %w( src/core/client_config/initial_connect_string.h ) - s.files += %w( src/core/client_config/lb_policies/load_balancer_api.h ) - s.files += %w( src/core/client_config/lb_policies/pick_first.h ) - s.files += %w( src/core/client_config/lb_policies/round_robin.h ) - s.files += %w( src/core/client_config/lb_policy.h ) - s.files += %w( src/core/client_config/lb_policy_factory.h ) - s.files += %w( src/core/client_config/lb_policy_registry.h ) - s.files += %w( src/core/client_config/resolver.h ) - s.files += %w( src/core/client_config/resolver_factory.h ) - s.files += %w( src/core/client_config/resolver_registry.h ) - s.files += %w( src/core/client_config/resolvers/dns_resolver.h ) - s.files += %w( src/core/client_config/resolvers/sockaddr_resolver.h ) - s.files += %w( src/core/client_config/subchannel.h ) - s.files += %w( src/core/client_config/subchannel_factory.h ) - s.files += %w( src/core/client_config/subchannel_index.h ) - s.files += %w( src/core/client_config/uri_parser.h ) - s.files += %w( src/core/compression/algorithm_metadata.h ) - s.files += %w( src/core/compression/message_compress.h ) - s.files += %w( src/core/debug/trace.h ) - s.files += %w( src/core/httpcli/format_request.h ) - s.files += %w( src/core/httpcli/httpcli.h ) - s.files += %w( src/core/httpcli/parser.h ) - s.files += %w( src/core/iomgr/closure.h ) - s.files += %w( src/core/iomgr/endpoint.h ) - s.files += %w( src/core/iomgr/endpoint_pair.h ) - s.files += %w( src/core/iomgr/exec_ctx.h ) - s.files += %w( src/core/iomgr/executor.h ) - s.files += %w( src/core/iomgr/fd_posix.h ) - s.files += %w( src/core/iomgr/iocp_windows.h ) - s.files += %w( src/core/iomgr/iomgr.h ) - s.files += %w( src/core/iomgr/iomgr_internal.h ) - s.files += %w( src/core/iomgr/iomgr_posix.h ) - s.files += %w( src/core/iomgr/pollset.h ) - s.files += %w( src/core/iomgr/pollset_posix.h ) - s.files += %w( src/core/iomgr/pollset_set.h ) - s.files += %w( src/core/iomgr/pollset_set_posix.h ) - s.files += %w( src/core/iomgr/pollset_set_windows.h ) - s.files += %w( src/core/iomgr/pollset_windows.h ) - s.files += %w( src/core/iomgr/resolve_address.h ) - s.files += %w( src/core/iomgr/sockaddr.h ) - s.files += %w( src/core/iomgr/sockaddr_posix.h ) - s.files += %w( src/core/iomgr/sockaddr_utils.h ) - s.files += %w( src/core/iomgr/sockaddr_win32.h ) - s.files += %w( src/core/iomgr/socket_utils_posix.h ) - s.files += %w( src/core/iomgr/socket_windows.h ) - s.files += %w( src/core/iomgr/tcp_client.h ) - s.files += %w( src/core/iomgr/tcp_posix.h ) - s.files += %w( src/core/iomgr/tcp_server.h ) - s.files += %w( src/core/iomgr/tcp_windows.h ) - s.files += %w( src/core/iomgr/time_averaged_stats.h ) - s.files += %w( src/core/iomgr/timer.h ) - s.files += %w( src/core/iomgr/timer_heap.h ) - s.files += %w( src/core/iomgr/udp_server.h ) - s.files += %w( src/core/iomgr/wakeup_fd_pipe.h ) - s.files += %w( src/core/iomgr/wakeup_fd_posix.h ) - s.files += %w( src/core/iomgr/workqueue.h ) - s.files += %w( src/core/iomgr/workqueue_posix.h ) - s.files += %w( src/core/iomgr/workqueue_windows.h ) - s.files += %w( src/core/json/json.h ) - s.files += %w( src/core/json/json_common.h ) - s.files += %w( src/core/json/json_reader.h ) - s.files += %w( src/core/json/json_writer.h ) - s.files += %w( src/core/proto/grpc/lb/v0/load_balancer.pb.h ) - s.files += %w( src/core/statistics/census_interface.h ) - s.files += %w( src/core/statistics/census_rpc_stats.h ) - s.files += %w( src/core/surface/api_trace.h ) - s.files += %w( src/core/surface/call.h ) - s.files += %w( src/core/surface/call_test_only.h ) - s.files += %w( src/core/surface/channel.h ) - s.files += %w( src/core/surface/completion_queue.h ) - s.files += %w( src/core/surface/event_string.h ) - s.files += %w( src/core/surface/init.h ) - s.files += %w( src/core/surface/server.h ) - s.files += %w( src/core/surface/surface_trace.h ) - s.files += %w( src/core/transport/byte_stream.h ) - s.files += %w( src/core/transport/chttp2/alpn.h ) - s.files += %w( src/core/transport/chttp2/bin_encoder.h ) - s.files += %w( src/core/transport/chttp2/frame.h ) - s.files += %w( src/core/transport/chttp2/frame_data.h ) - s.files += %w( src/core/transport/chttp2/frame_goaway.h ) - s.files += %w( src/core/transport/chttp2/frame_ping.h ) - s.files += %w( src/core/transport/chttp2/frame_rst_stream.h ) - s.files += %w( src/core/transport/chttp2/frame_settings.h ) - s.files += %w( src/core/transport/chttp2/frame_window_update.h ) - s.files += %w( src/core/transport/chttp2/hpack_encoder.h ) - s.files += %w( src/core/transport/chttp2/hpack_parser.h ) - s.files += %w( src/core/transport/chttp2/hpack_table.h ) - s.files += %w( src/core/transport/chttp2/http2_errors.h ) - s.files += %w( src/core/transport/chttp2/huffsyms.h ) - s.files += %w( src/core/transport/chttp2/incoming_metadata.h ) - s.files += %w( src/core/transport/chttp2/internal.h ) - s.files += %w( src/core/transport/chttp2/status_conversion.h ) - s.files += %w( src/core/transport/chttp2/stream_map.h ) - s.files += %w( src/core/transport/chttp2/timeout_encoding.h ) - s.files += %w( src/core/transport/chttp2/varint.h ) - s.files += %w( src/core/transport/chttp2_transport.h ) - s.files += %w( src/core/transport/connectivity_state.h ) - s.files += %w( src/core/transport/metadata.h ) - s.files += %w( src/core/transport/metadata_batch.h ) - s.files += %w( src/core/transport/static_metadata.h ) - s.files += %w( src/core/transport/transport.h ) - s.files += %w( src/core/transport/transport_impl.h ) - s.files += %w( src/core/security/auth_filters.h ) - s.files += %w( src/core/security/b64.h ) - s.files += %w( src/core/security/credentials.h ) - s.files += %w( src/core/security/handshake.h ) - s.files += %w( src/core/security/json_token.h ) - s.files += %w( src/core/security/jwt_verifier.h ) - s.files += %w( src/core/security/secure_endpoint.h ) - s.files += %w( src/core/security/security_connector.h ) - s.files += %w( src/core/security/security_context.h ) - s.files += %w( src/core/tsi/fake_transport_security.h ) - s.files += %w( src/core/tsi/ssl_transport_security.h ) - s.files += %w( src/core/tsi/ssl_types.h ) - s.files += %w( src/core/tsi/transport_security.h ) - s.files += %w( src/core/tsi/transport_security_interface.h ) - s.files += %w( src/core/census/aggregation.h ) - s.files += %w( src/core/census/mlog.h ) - s.files += %w( src/core/census/rpc_metric_id.h ) + s.files += %w( src/core/ext/transport/chttp2/transport/alpn.h ) + s.files += %w( src/core/ext/transport/chttp2/transport/bin_encoder.h ) + s.files += %w( src/core/ext/transport/chttp2/transport/chttp2_transport.h ) + s.files += %w( src/core/ext/transport/chttp2/transport/frame.h ) + s.files += %w( src/core/ext/transport/chttp2/transport/frame_data.h ) + s.files += %w( src/core/ext/transport/chttp2/transport/frame_goaway.h ) + s.files += %w( src/core/ext/transport/chttp2/transport/frame_ping.h ) + s.files += %w( src/core/ext/transport/chttp2/transport/frame_rst_stream.h ) + s.files += %w( src/core/ext/transport/chttp2/transport/frame_settings.h ) + s.files += %w( src/core/ext/transport/chttp2/transport/frame_window_update.h ) + s.files += %w( src/core/ext/transport/chttp2/transport/hpack_encoder.h ) + s.files += %w( src/core/ext/transport/chttp2/transport/hpack_parser.h ) + s.files += %w( src/core/ext/transport/chttp2/transport/hpack_table.h ) + s.files += %w( src/core/ext/transport/chttp2/transport/http2_errors.h ) + s.files += %w( src/core/ext/transport/chttp2/transport/huffsyms.h ) + s.files += %w( src/core/ext/transport/chttp2/transport/incoming_metadata.h ) + s.files += %w( src/core/ext/transport/chttp2/transport/internal.h ) + s.files += %w( src/core/ext/transport/chttp2/transport/status_conversion.h ) + s.files += %w( src/core/ext/transport/chttp2/transport/stream_map.h ) + s.files += %w( src/core/ext/transport/chttp2/transport/timeout_encoding.h ) + s.files += %w( src/core/ext/transport/chttp2/transport/varint.h ) + s.files += %w( src/core/lib/census/aggregation.h ) + s.files += %w( src/core/lib/census/grpc_filter.h ) + s.files += %w( src/core/lib/census/grpc_plugin.h ) + s.files += %w( src/core/lib/census/mlog.h ) + s.files += %w( src/core/lib/census/rpc_metric_id.h ) + s.files += %w( src/core/lib/channel/channel_args.h ) + s.files += %w( src/core/lib/channel/channel_stack.h ) + s.files += %w( src/core/lib/channel/channel_stack_builder.h ) + s.files += %w( src/core/lib/channel/client_channel.h ) + s.files += %w( src/core/lib/channel/compress_filter.h ) + s.files += %w( src/core/lib/channel/connected_channel.h ) + s.files += %w( src/core/lib/channel/context.h ) + s.files += %w( src/core/lib/channel/http_client_filter.h ) + s.files += %w( src/core/lib/channel/http_server_filter.h ) + s.files += %w( src/core/lib/channel/subchannel_call_holder.h ) + s.files += %w( src/core/lib/client_config/client_config.h ) + s.files += %w( src/core/lib/client_config/connector.h ) + s.files += %w( src/core/lib/client_config/initial_connect_string.h ) + s.files += %w( src/core/lib/client_config/lb_policies/load_balancer_api.h ) + s.files += %w( src/core/lib/client_config/lb_policies/pick_first.h ) + s.files += %w( src/core/lib/client_config/lb_policies/round_robin.h ) + s.files += %w( src/core/lib/client_config/lb_policy.h ) + s.files += %w( src/core/lib/client_config/lb_policy_factory.h ) + s.files += %w( src/core/lib/client_config/lb_policy_registry.h ) + s.files += %w( src/core/lib/client_config/resolver.h ) + s.files += %w( src/core/lib/client_config/resolver_factory.h ) + s.files += %w( src/core/lib/client_config/resolver_registry.h ) + s.files += %w( src/core/lib/client_config/resolvers/dns_resolver.h ) + s.files += %w( src/core/lib/client_config/resolvers/sockaddr_resolver.h ) + s.files += %w( src/core/lib/client_config/subchannel.h ) + s.files += %w( src/core/lib/client_config/subchannel_factory.h ) + s.files += %w( src/core/lib/client_config/subchannel_index.h ) + s.files += %w( src/core/lib/client_config/uri_parser.h ) + s.files += %w( src/core/lib/compression/algorithm_metadata.h ) + s.files += %w( src/core/lib/compression/message_compress.h ) + s.files += %w( src/core/lib/debug/trace.h ) + s.files += %w( src/core/lib/http/format_request.h ) + s.files += %w( src/core/lib/http/httpcli.h ) + s.files += %w( src/core/lib/http/parser.h ) + s.files += %w( src/core/lib/iomgr/closure.h ) + s.files += %w( src/core/lib/iomgr/endpoint.h ) + s.files += %w( src/core/lib/iomgr/endpoint_pair.h ) + s.files += %w( src/core/lib/iomgr/exec_ctx.h ) + s.files += %w( src/core/lib/iomgr/executor.h ) + s.files += %w( src/core/lib/iomgr/fd_posix.h ) + s.files += %w( src/core/lib/iomgr/iocp_windows.h ) + s.files += %w( src/core/lib/iomgr/iomgr.h ) + s.files += %w( src/core/lib/iomgr/iomgr_internal.h ) + s.files += %w( src/core/lib/iomgr/iomgr_posix.h ) + s.files += %w( src/core/lib/iomgr/pollset.h ) + s.files += %w( src/core/lib/iomgr/pollset_posix.h ) + s.files += %w( src/core/lib/iomgr/pollset_set.h ) + s.files += %w( src/core/lib/iomgr/pollset_set_posix.h ) + s.files += %w( src/core/lib/iomgr/pollset_set_windows.h ) + s.files += %w( src/core/lib/iomgr/pollset_windows.h ) + s.files += %w( src/core/lib/iomgr/resolve_address.h ) + s.files += %w( src/core/lib/iomgr/sockaddr.h ) + s.files += %w( src/core/lib/iomgr/sockaddr_posix.h ) + s.files += %w( src/core/lib/iomgr/sockaddr_utils.h ) + s.files += %w( src/core/lib/iomgr/sockaddr_win32.h ) + s.files += %w( src/core/lib/iomgr/socket_utils_posix.h ) + s.files += %w( src/core/lib/iomgr/socket_windows.h ) + s.files += %w( src/core/lib/iomgr/tcp_client.h ) + s.files += %w( src/core/lib/iomgr/tcp_posix.h ) + s.files += %w( src/core/lib/iomgr/tcp_server.h ) + s.files += %w( src/core/lib/iomgr/tcp_windows.h ) + s.files += %w( src/core/lib/iomgr/time_averaged_stats.h ) + s.files += %w( src/core/lib/iomgr/timer.h ) + s.files += %w( src/core/lib/iomgr/timer_heap.h ) + s.files += %w( src/core/lib/iomgr/udp_server.h ) + s.files += %w( src/core/lib/iomgr/unix_sockets_posix.h ) + s.files += %w( src/core/lib/iomgr/wakeup_fd_pipe.h ) + s.files += %w( src/core/lib/iomgr/wakeup_fd_posix.h ) + s.files += %w( src/core/lib/iomgr/workqueue.h ) + s.files += %w( src/core/lib/iomgr/workqueue_posix.h ) + s.files += %w( src/core/lib/iomgr/workqueue_windows.h ) + s.files += %w( src/core/lib/json/json.h ) + s.files += %w( src/core/lib/json/json_common.h ) + s.files += %w( src/core/lib/json/json_reader.h ) + s.files += %w( src/core/lib/json/json_writer.h ) + s.files += %w( src/core/lib/proto/grpc/lb/v0/load_balancer.pb.h ) + s.files += %w( src/core/lib/security/auth_filters.h ) + s.files += %w( src/core/lib/security/b64.h ) + s.files += %w( src/core/lib/security/credentials.h ) + s.files += %w( src/core/lib/security/handshake.h ) + s.files += %w( src/core/lib/security/json_token.h ) + s.files += %w( src/core/lib/security/jwt_verifier.h ) + s.files += %w( src/core/lib/security/secure_endpoint.h ) + s.files += %w( src/core/lib/security/security_connector.h ) + s.files += %w( src/core/lib/security/security_context.h ) + s.files += %w( src/core/lib/statistics/census_interface.h ) + s.files += %w( src/core/lib/statistics/census_rpc_stats.h ) + s.files += %w( src/core/lib/surface/api_trace.h ) + s.files += %w( src/core/lib/surface/call.h ) + s.files += %w( src/core/lib/surface/call_test_only.h ) + s.files += %w( src/core/lib/surface/channel.h ) + s.files += %w( src/core/lib/surface/channel_init.h ) + s.files += %w( src/core/lib/surface/channel_stack_type.h ) + s.files += %w( src/core/lib/surface/completion_queue.h ) + s.files += %w( src/core/lib/surface/event_string.h ) + s.files += %w( src/core/lib/surface/init.h ) + s.files += %w( src/core/lib/surface/lame_client.h ) + s.files += %w( src/core/lib/surface/server.h ) + s.files += %w( src/core/lib/surface/surface_trace.h ) + s.files += %w( src/core/lib/transport/byte_stream.h ) + s.files += %w( src/core/lib/transport/connectivity_state.h ) + s.files += %w( src/core/lib/transport/metadata.h ) + s.files += %w( src/core/lib/transport/metadata_batch.h ) + s.files += %w( src/core/lib/transport/static_metadata.h ) + s.files += %w( src/core/lib/transport/transport.h ) + s.files += %w( src/core/lib/transport/transport_impl.h ) + s.files += %w( src/core/lib/tsi/fake_transport_security.h ) + s.files += %w( src/core/lib/tsi/ssl_transport_security.h ) + s.files += %w( src/core/lib/tsi/ssl_types.h ) + s.files += %w( src/core/lib/tsi/transport_security.h ) + s.files += %w( src/core/lib/tsi/transport_security_interface.h ) s.files += %w( third_party/nanopb/pb.h ) s.files += %w( third_party/nanopb/pb_common.h ) s.files += %w( third_party/nanopb/pb_decode.h ) s.files += %w( third_party/nanopb/pb_encode.h ) - s.files += %w( src/core/census/grpc_context.c ) - s.files += %w( src/core/census/grpc_filter.c ) - s.files += %w( src/core/channel/channel_args.c ) - s.files += %w( src/core/channel/channel_stack.c ) - s.files += %w( src/core/channel/client_channel.c ) - s.files += %w( src/core/channel/client_uchannel.c ) - s.files += %w( src/core/channel/compress_filter.c ) - s.files += %w( src/core/channel/connected_channel.c ) - s.files += %w( src/core/channel/http_client_filter.c ) - s.files += %w( src/core/channel/http_server_filter.c ) - s.files += %w( src/core/channel/subchannel_call_holder.c ) - s.files += %w( src/core/client_config/client_config.c ) - s.files += %w( src/core/client_config/connector.c ) - s.files += %w( src/core/client_config/default_initial_connect_string.c ) - s.files += %w( src/core/client_config/initial_connect_string.c ) - s.files += %w( src/core/client_config/lb_policies/load_balancer_api.c ) - s.files += %w( src/core/client_config/lb_policies/pick_first.c ) - s.files += %w( src/core/client_config/lb_policies/round_robin.c ) - s.files += %w( src/core/client_config/lb_policy.c ) - s.files += %w( src/core/client_config/lb_policy_factory.c ) - s.files += %w( src/core/client_config/lb_policy_registry.c ) - s.files += %w( src/core/client_config/resolver.c ) - s.files += %w( src/core/client_config/resolver_factory.c ) - s.files += %w( src/core/client_config/resolver_registry.c ) - s.files += %w( src/core/client_config/resolvers/dns_resolver.c ) - s.files += %w( src/core/client_config/resolvers/sockaddr_resolver.c ) - s.files += %w( src/core/client_config/subchannel.c ) - s.files += %w( src/core/client_config/subchannel_factory.c ) - s.files += %w( src/core/client_config/subchannel_index.c ) - s.files += %w( src/core/client_config/uri_parser.c ) - s.files += %w( src/core/compression/compression_algorithm.c ) - s.files += %w( src/core/compression/message_compress.c ) - s.files += %w( src/core/debug/trace.c ) - s.files += %w( src/core/httpcli/format_request.c ) - s.files += %w( src/core/httpcli/httpcli.c ) - s.files += %w( src/core/httpcli/parser.c ) - s.files += %w( src/core/iomgr/closure.c ) - s.files += %w( src/core/iomgr/endpoint.c ) - s.files += %w( src/core/iomgr/endpoint_pair_posix.c ) - s.files += %w( src/core/iomgr/endpoint_pair_windows.c ) - s.files += %w( src/core/iomgr/exec_ctx.c ) - s.files += %w( src/core/iomgr/executor.c ) - s.files += %w( src/core/iomgr/fd_posix.c ) - s.files += %w( src/core/iomgr/iocp_windows.c ) - s.files += %w( src/core/iomgr/iomgr.c ) - s.files += %w( src/core/iomgr/iomgr_posix.c ) - s.files += %w( src/core/iomgr/iomgr_windows.c ) - s.files += %w( src/core/iomgr/pollset_multipoller_with_epoll.c ) - s.files += %w( src/core/iomgr/pollset_multipoller_with_poll_posix.c ) - s.files += %w( src/core/iomgr/pollset_posix.c ) - s.files += %w( src/core/iomgr/pollset_set_posix.c ) - s.files += %w( src/core/iomgr/pollset_set_windows.c ) - s.files += %w( src/core/iomgr/pollset_windows.c ) - s.files += %w( src/core/iomgr/resolve_address_posix.c ) - s.files += %w( src/core/iomgr/resolve_address_windows.c ) - s.files += %w( src/core/iomgr/sockaddr_utils.c ) - s.files += %w( src/core/iomgr/socket_utils_common_posix.c ) - s.files += %w( src/core/iomgr/socket_utils_linux.c ) - s.files += %w( src/core/iomgr/socket_utils_posix.c ) - s.files += %w( src/core/iomgr/socket_windows.c ) - s.files += %w( src/core/iomgr/tcp_client_posix.c ) - s.files += %w( src/core/iomgr/tcp_client_windows.c ) - s.files += %w( src/core/iomgr/tcp_posix.c ) - s.files += %w( src/core/iomgr/tcp_server_posix.c ) - s.files += %w( src/core/iomgr/tcp_server_windows.c ) - s.files += %w( src/core/iomgr/tcp_windows.c ) - s.files += %w( src/core/iomgr/time_averaged_stats.c ) - s.files += %w( src/core/iomgr/timer.c ) - s.files += %w( src/core/iomgr/timer_heap.c ) - s.files += %w( src/core/iomgr/udp_server.c ) - s.files += %w( src/core/iomgr/wakeup_fd_eventfd.c ) - s.files += %w( src/core/iomgr/wakeup_fd_nospecial.c ) - s.files += %w( src/core/iomgr/wakeup_fd_pipe.c ) - s.files += %w( src/core/iomgr/wakeup_fd_posix.c ) - s.files += %w( src/core/iomgr/workqueue_posix.c ) - s.files += %w( src/core/iomgr/workqueue_windows.c ) - s.files += %w( src/core/json/json.c ) - s.files += %w( src/core/json/json_reader.c ) - s.files += %w( src/core/json/json_string.c ) - s.files += %w( src/core/json/json_writer.c ) - s.files += %w( src/core/proto/grpc/lb/v0/load_balancer.pb.c ) - s.files += %w( src/core/surface/alarm.c ) - s.files += %w( src/core/surface/api_trace.c ) - s.files += %w( src/core/surface/byte_buffer.c ) - s.files += %w( src/core/surface/byte_buffer_reader.c ) - s.files += %w( src/core/surface/call.c ) - s.files += %w( src/core/surface/call_details.c ) - s.files += %w( src/core/surface/call_log_batch.c ) - s.files += %w( src/core/surface/channel.c ) - s.files += %w( src/core/surface/channel_connectivity.c ) - s.files += %w( src/core/surface/channel_create.c ) - s.files += %w( src/core/surface/channel_ping.c ) - s.files += %w( src/core/surface/completion_queue.c ) - s.files += %w( src/core/surface/event_string.c ) - s.files += %w( src/core/surface/init.c ) - s.files += %w( src/core/surface/lame_client.c ) - s.files += %w( src/core/surface/metadata_array.c ) - s.files += %w( src/core/surface/server.c ) - s.files += %w( src/core/surface/server_chttp2.c ) - s.files += %w( src/core/surface/server_create.c ) - s.files += %w( src/core/surface/validate_metadata.c ) - s.files += %w( src/core/surface/version.c ) - s.files += %w( src/core/transport/byte_stream.c ) - s.files += %w( src/core/transport/chttp2/alpn.c ) - s.files += %w( src/core/transport/chttp2/bin_encoder.c ) - s.files += %w( src/core/transport/chttp2/frame_data.c ) - s.files += %w( src/core/transport/chttp2/frame_goaway.c ) - s.files += %w( src/core/transport/chttp2/frame_ping.c ) - s.files += %w( src/core/transport/chttp2/frame_rst_stream.c ) - s.files += %w( src/core/transport/chttp2/frame_settings.c ) - s.files += %w( src/core/transport/chttp2/frame_window_update.c ) - s.files += %w( src/core/transport/chttp2/hpack_encoder.c ) - s.files += %w( src/core/transport/chttp2/hpack_parser.c ) - s.files += %w( src/core/transport/chttp2/hpack_table.c ) - s.files += %w( src/core/transport/chttp2/huffsyms.c ) - s.files += %w( src/core/transport/chttp2/incoming_metadata.c ) - s.files += %w( src/core/transport/chttp2/parsing.c ) - s.files += %w( src/core/transport/chttp2/status_conversion.c ) - s.files += %w( src/core/transport/chttp2/stream_lists.c ) - s.files += %w( src/core/transport/chttp2/stream_map.c ) - s.files += %w( src/core/transport/chttp2/timeout_encoding.c ) - s.files += %w( src/core/transport/chttp2/varint.c ) - s.files += %w( src/core/transport/chttp2/writing.c ) - s.files += %w( src/core/transport/chttp2_transport.c ) - s.files += %w( src/core/transport/connectivity_state.c ) - s.files += %w( src/core/transport/metadata.c ) - s.files += %w( src/core/transport/metadata_batch.c ) - s.files += %w( src/core/transport/static_metadata.c ) - s.files += %w( src/core/transport/transport.c ) - s.files += %w( src/core/transport/transport_op_string.c ) - s.files += %w( src/core/httpcli/httpcli_security_connector.c ) - s.files += %w( src/core/security/b64.c ) - s.files += %w( src/core/security/client_auth_filter.c ) - s.files += %w( src/core/security/credentials.c ) - s.files += %w( src/core/security/credentials_metadata.c ) - s.files += %w( src/core/security/credentials_posix.c ) - s.files += %w( src/core/security/credentials_win32.c ) - s.files += %w( src/core/security/google_default_credentials.c ) - s.files += %w( src/core/security/handshake.c ) - s.files += %w( src/core/security/json_token.c ) - s.files += %w( src/core/security/jwt_verifier.c ) - s.files += %w( src/core/security/secure_endpoint.c ) - s.files += %w( src/core/security/security_connector.c ) - s.files += %w( src/core/security/security_context.c ) - s.files += %w( src/core/security/server_auth_filter.c ) - s.files += %w( src/core/security/server_secure_chttp2.c ) - s.files += %w( src/core/surface/init_secure.c ) - s.files += %w( src/core/surface/secure_channel_create.c ) - s.files += %w( src/core/tsi/fake_transport_security.c ) - s.files += %w( src/core/tsi/ssl_transport_security.c ) - s.files += %w( src/core/tsi/transport_security.c ) - s.files += %w( src/core/census/context.c ) - s.files += %w( src/core/census/initialize.c ) - s.files += %w( src/core/census/mlog.c ) - s.files += %w( src/core/census/operation.c ) - s.files += %w( src/core/census/placeholders.c ) - s.files += %w( src/core/census/tracing.c ) + s.files += %w( src/core/ext/transport/chttp2/client/insecure/channel_create.c ) + s.files += %w( src/core/ext/transport/chttp2/client/secure/secure_channel_create.c ) + s.files += %w( src/core/ext/transport/chttp2/server/insecure/server_chttp2.c ) + s.files += %w( src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c ) + s.files += %w( src/core/ext/transport/chttp2/transport/alpn.c ) + s.files += %w( src/core/ext/transport/chttp2/transport/bin_encoder.c ) + s.files += %w( src/core/ext/transport/chttp2/transport/chttp2_transport.c ) + s.files += %w( src/core/ext/transport/chttp2/transport/frame_data.c ) + s.files += %w( src/core/ext/transport/chttp2/transport/frame_goaway.c ) + s.files += %w( src/core/ext/transport/chttp2/transport/frame_ping.c ) + s.files += %w( src/core/ext/transport/chttp2/transport/frame_rst_stream.c ) + s.files += %w( src/core/ext/transport/chttp2/transport/frame_settings.c ) + s.files += %w( src/core/ext/transport/chttp2/transport/frame_window_update.c ) + s.files += %w( src/core/ext/transport/chttp2/transport/hpack_encoder.c ) + s.files += %w( src/core/ext/transport/chttp2/transport/hpack_parser.c ) + s.files += %w( src/core/ext/transport/chttp2/transport/hpack_table.c ) + s.files += %w( src/core/ext/transport/chttp2/transport/huffsyms.c ) + s.files += %w( src/core/ext/transport/chttp2/transport/incoming_metadata.c ) + s.files += %w( src/core/ext/transport/chttp2/transport/parsing.c ) + s.files += %w( src/core/ext/transport/chttp2/transport/status_conversion.c ) + s.files += %w( src/core/ext/transport/chttp2/transport/stream_lists.c ) + s.files += %w( src/core/ext/transport/chttp2/transport/stream_map.c ) + s.files += %w( src/core/ext/transport/chttp2/transport/timeout_encoding.c ) + s.files += %w( src/core/ext/transport/chttp2/transport/varint.c ) + s.files += %w( src/core/ext/transport/chttp2/transport/writing.c ) + s.files += %w( src/core/lib/census/context.c ) + s.files += %w( src/core/lib/census/grpc_context.c ) + s.files += %w( src/core/lib/census/grpc_filter.c ) + s.files += %w( src/core/lib/census/grpc_plugin.c ) + s.files += %w( src/core/lib/census/initialize.c ) + s.files += %w( src/core/lib/census/mlog.c ) + s.files += %w( src/core/lib/census/operation.c ) + s.files += %w( src/core/lib/census/placeholders.c ) + s.files += %w( src/core/lib/census/tracing.c ) + s.files += %w( src/core/lib/channel/channel_args.c ) + s.files += %w( src/core/lib/channel/channel_stack.c ) + s.files += %w( src/core/lib/channel/channel_stack_builder.c ) + s.files += %w( src/core/lib/channel/client_channel.c ) + s.files += %w( src/core/lib/channel/compress_filter.c ) + s.files += %w( src/core/lib/channel/connected_channel.c ) + s.files += %w( src/core/lib/channel/http_client_filter.c ) + s.files += %w( src/core/lib/channel/http_server_filter.c ) + s.files += %w( src/core/lib/channel/subchannel_call_holder.c ) + s.files += %w( src/core/lib/client_config/client_config.c ) + s.files += %w( src/core/lib/client_config/connector.c ) + s.files += %w( src/core/lib/client_config/default_initial_connect_string.c ) + s.files += %w( src/core/lib/client_config/initial_connect_string.c ) + s.files += %w( src/core/lib/client_config/lb_policies/load_balancer_api.c ) + s.files += %w( src/core/lib/client_config/lb_policies/pick_first.c ) + s.files += %w( src/core/lib/client_config/lb_policies/round_robin.c ) + s.files += %w( src/core/lib/client_config/lb_policy.c ) + s.files += %w( src/core/lib/client_config/lb_policy_factory.c ) + s.files += %w( src/core/lib/client_config/lb_policy_registry.c ) + s.files += %w( src/core/lib/client_config/resolver.c ) + s.files += %w( src/core/lib/client_config/resolver_factory.c ) + s.files += %w( src/core/lib/client_config/resolver_registry.c ) + s.files += %w( src/core/lib/client_config/resolvers/dns_resolver.c ) + s.files += %w( src/core/lib/client_config/resolvers/sockaddr_resolver.c ) + s.files += %w( src/core/lib/client_config/subchannel.c ) + s.files += %w( src/core/lib/client_config/subchannel_factory.c ) + s.files += %w( src/core/lib/client_config/subchannel_index.c ) + s.files += %w( src/core/lib/client_config/uri_parser.c ) + s.files += %w( src/core/lib/compression/compression_algorithm.c ) + s.files += %w( src/core/lib/compression/message_compress.c ) + s.files += %w( src/core/lib/debug/trace.c ) + s.files += %w( src/core/lib/http/format_request.c ) + s.files += %w( src/core/lib/http/httpcli.c ) + s.files += %w( src/core/lib/http/httpcli_security_connector.c ) + s.files += %w( src/core/lib/http/parser.c ) + s.files += %w( src/core/lib/iomgr/closure.c ) + s.files += %w( src/core/lib/iomgr/endpoint.c ) + s.files += %w( src/core/lib/iomgr/endpoint_pair_posix.c ) + s.files += %w( src/core/lib/iomgr/endpoint_pair_windows.c ) + s.files += %w( src/core/lib/iomgr/exec_ctx.c ) + s.files += %w( src/core/lib/iomgr/executor.c ) + s.files += %w( src/core/lib/iomgr/fd_posix.c ) + s.files += %w( src/core/lib/iomgr/iocp_windows.c ) + s.files += %w( src/core/lib/iomgr/iomgr.c ) + s.files += %w( src/core/lib/iomgr/iomgr_posix.c ) + s.files += %w( src/core/lib/iomgr/iomgr_windows.c ) + s.files += %w( src/core/lib/iomgr/pollset_multipoller_with_epoll.c ) + s.files += %w( src/core/lib/iomgr/pollset_multipoller_with_poll_posix.c ) + s.files += %w( src/core/lib/iomgr/pollset_posix.c ) + s.files += %w( src/core/lib/iomgr/pollset_set_posix.c ) + s.files += %w( src/core/lib/iomgr/pollset_set_windows.c ) + s.files += %w( src/core/lib/iomgr/pollset_windows.c ) + s.files += %w( src/core/lib/iomgr/resolve_address_posix.c ) + s.files += %w( src/core/lib/iomgr/resolve_address_windows.c ) + s.files += %w( src/core/lib/iomgr/sockaddr_utils.c ) + s.files += %w( src/core/lib/iomgr/socket_utils_common_posix.c ) + s.files += %w( src/core/lib/iomgr/socket_utils_linux.c ) + s.files += %w( src/core/lib/iomgr/socket_utils_posix.c ) + s.files += %w( src/core/lib/iomgr/socket_windows.c ) + s.files += %w( src/core/lib/iomgr/tcp_client_posix.c ) + s.files += %w( src/core/lib/iomgr/tcp_client_windows.c ) + s.files += %w( src/core/lib/iomgr/tcp_posix.c ) + s.files += %w( src/core/lib/iomgr/tcp_server_posix.c ) + s.files += %w( src/core/lib/iomgr/tcp_server_windows.c ) + s.files += %w( src/core/lib/iomgr/tcp_windows.c ) + s.files += %w( src/core/lib/iomgr/time_averaged_stats.c ) + s.files += %w( src/core/lib/iomgr/timer.c ) + s.files += %w( src/core/lib/iomgr/timer_heap.c ) + s.files += %w( src/core/lib/iomgr/udp_server.c ) + s.files += %w( src/core/lib/iomgr/unix_sockets_posix.c ) + s.files += %w( src/core/lib/iomgr/unix_sockets_posix_noop.c ) + s.files += %w( src/core/lib/iomgr/wakeup_fd_eventfd.c ) + s.files += %w( src/core/lib/iomgr/wakeup_fd_nospecial.c ) + s.files += %w( src/core/lib/iomgr/wakeup_fd_pipe.c ) + s.files += %w( src/core/lib/iomgr/wakeup_fd_posix.c ) + s.files += %w( src/core/lib/iomgr/workqueue_posix.c ) + s.files += %w( src/core/lib/iomgr/workqueue_windows.c ) + s.files += %w( src/core/lib/json/json.c ) + s.files += %w( src/core/lib/json/json_reader.c ) + s.files += %w( src/core/lib/json/json_string.c ) + s.files += %w( src/core/lib/json/json_writer.c ) + s.files += %w( src/core/lib/proto/grpc/lb/v0/load_balancer.pb.c ) + s.files += %w( src/core/lib/security/b64.c ) + s.files += %w( src/core/lib/security/client_auth_filter.c ) + s.files += %w( src/core/lib/security/credentials.c ) + s.files += %w( src/core/lib/security/credentials_metadata.c ) + s.files += %w( src/core/lib/security/credentials_posix.c ) + s.files += %w( src/core/lib/security/credentials_win32.c ) + s.files += %w( src/core/lib/security/google_default_credentials.c ) + s.files += %w( src/core/lib/security/handshake.c ) + s.files += %w( src/core/lib/security/json_token.c ) + s.files += %w( src/core/lib/security/jwt_verifier.c ) + s.files += %w( src/core/lib/security/secure_endpoint.c ) + s.files += %w( src/core/lib/security/security_connector.c ) + s.files += %w( src/core/lib/security/security_context.c ) + s.files += %w( src/core/lib/security/server_auth_filter.c ) + s.files += %w( src/core/lib/surface/alarm.c ) + s.files += %w( src/core/lib/surface/api_trace.c ) + s.files += %w( src/core/lib/surface/byte_buffer.c ) + s.files += %w( src/core/lib/surface/byte_buffer_reader.c ) + s.files += %w( src/core/lib/surface/call.c ) + s.files += %w( src/core/lib/surface/call_details.c ) + s.files += %w( src/core/lib/surface/call_log_batch.c ) + s.files += %w( src/core/lib/surface/channel.c ) + s.files += %w( src/core/lib/surface/channel_connectivity.c ) + s.files += %w( src/core/lib/surface/channel_init.c ) + s.files += %w( src/core/lib/surface/channel_ping.c ) + s.files += %w( src/core/lib/surface/channel_stack_type.c ) + s.files += %w( src/core/lib/surface/completion_queue.c ) + s.files += %w( src/core/lib/surface/event_string.c ) + s.files += %w( src/core/lib/surface/init.c ) + s.files += %w( src/core/lib/surface/init_secure.c ) + s.files += %w( src/core/lib/surface/lame_client.c ) + s.files += %w( src/core/lib/surface/metadata_array.c ) + s.files += %w( src/core/lib/surface/server.c ) + s.files += %w( src/core/lib/surface/validate_metadata.c ) + s.files += %w( src/core/lib/surface/version.c ) + s.files += %w( src/core/lib/transport/byte_stream.c ) + s.files += %w( src/core/lib/transport/connectivity_state.c ) + s.files += %w( src/core/lib/transport/metadata.c ) + s.files += %w( src/core/lib/transport/metadata_batch.c ) + s.files += %w( src/core/lib/transport/static_metadata.c ) + s.files += %w( src/core/lib/transport/transport.c ) + s.files += %w( src/core/lib/transport/transport_op_string.c ) + s.files += %w( src/core/lib/tsi/fake_transport_security.c ) + s.files += %w( src/core/lib/tsi/ssl_transport_security.c ) + s.files += %w( src/core/lib/tsi/transport_security.c ) s.files += %w( third_party/nanopb/pb_common.c ) s.files += %w( third_party/nanopb/pb_decode.c ) s.files += %w( third_party/nanopb/pb_encode.c ) diff --git a/include/grpc++/alarm.h b/include/grpc++/alarm.h index 3b8104d1357..764837a9589 100644 --- a/include/grpc++/alarm.h +++ b/include/grpc++/alarm.h @@ -50,7 +50,7 @@ namespace grpc { class CompletionQueue; /// A thin wrapper around \a grpc_alarm (see / \a / src/core/surface/alarm.h). -class Alarm : private GrpcLibrary { +class Alarm : private GrpcLibraryCodegen { public: /// Create a completion queue alarm instance associated to \a cq. /// diff --git a/include/grpc++/channel.h b/include/grpc++/channel.h index 80547f7ab8a..679d473204d 100644 --- a/include/grpc++/channel.h +++ b/include/grpc++/channel.h @@ -49,7 +49,7 @@ namespace grpc { class Channel GRPC_FINAL : public ChannelInterface, public CallHook, public std::enable_shared_from_this, - private GrpcLibrary { + private GrpcLibraryCodegen { public: ~Channel(); diff --git a/include/grpc++/generic/async_generic_service.h b/include/grpc++/generic/async_generic_service.h index 9ae8391dc4c..b87b17ee0de 100644 --- a/include/grpc++/generic/async_generic_service.h +++ b/include/grpc++/generic/async_generic_service.h @@ -34,8 +34,8 @@ #ifndef GRPCXX_GENERIC_ASYNC_GENERIC_SERVICE_H #define GRPCXX_GENERIC_ASYNC_GENERIC_SERVICE_H -#include #include +#include struct grpc_server; diff --git a/include/grpc++/impl/codegen/async_stream.h b/include/grpc++/impl/codegen/async_stream.h index b0410485f85..cac345e0dc4 100644 --- a/include/grpc++/impl/codegen/async_stream.h +++ b/include/grpc++/impl/codegen/async_stream.h @@ -34,10 +34,11 @@ #ifndef GRPCXX_IMPL_CODEGEN_ASYNC_STREAM_H #define GRPCXX_IMPL_CODEGEN_ASYNC_STREAM_H -#include #include -#include +#include +#include #include +#include #include namespace grpc { @@ -109,13 +110,13 @@ class ClientAsyncReader GRPC_FINAL : public ClientAsyncReaderInterface { init_ops_.set_output_tag(tag); init_ops_.SendInitialMetadata(context->send_initial_metadata_); // TODO(ctiller): don't assert - GPR_ASSERT(init_ops_.SendMessage(request).ok()); + GPR_CODEGEN_ASSERT(init_ops_.SendMessage(request).ok()); init_ops_.ClientSendClose(); call_.PerformOps(&init_ops_); } void ReadInitialMetadata(void* tag) GRPC_OVERRIDE { - GPR_ASSERT(!context_->initial_metadata_received_); + GPR_CODEGEN_ASSERT(!context_->initial_metadata_received_); meta_ops_.set_output_tag(tag); meta_ops_.RecvInitialMetadata(context_); @@ -177,7 +178,7 @@ class ClientAsyncWriter GRPC_FINAL : public ClientAsyncWriterInterface { } void ReadInitialMetadata(void* tag) GRPC_OVERRIDE { - GPR_ASSERT(!context_->initial_metadata_received_); + GPR_CODEGEN_ASSERT(!context_->initial_metadata_received_); meta_ops_.set_output_tag(tag); meta_ops_.RecvInitialMetadata(context_); @@ -187,7 +188,7 @@ class ClientAsyncWriter GRPC_FINAL : public ClientAsyncWriterInterface { void Write(const W& msg, void* tag) GRPC_OVERRIDE { write_ops_.set_output_tag(tag); // TODO(ctiller): don't assert - GPR_ASSERT(write_ops_.SendMessage(msg).ok()); + GPR_CODEGEN_ASSERT(write_ops_.SendMessage(msg).ok()); call_.PerformOps(&write_ops_); } @@ -214,7 +215,8 @@ class ClientAsyncWriter GRPC_FINAL : public ClientAsyncWriterInterface { CallOpSet write_ops_; CallOpSet writes_done_ops_; CallOpSet finish_ops_; + CallOpClientRecvStatus> + finish_ops_; }; /// Client-side interface for asynchronous bi-directional streaming. @@ -243,7 +245,7 @@ class ClientAsyncReaderWriter GRPC_FINAL } void ReadInitialMetadata(void* tag) GRPC_OVERRIDE { - GPR_ASSERT(!context_->initial_metadata_received_); + GPR_CODEGEN_ASSERT(!context_->initial_metadata_received_); meta_ops_.set_output_tag(tag); meta_ops_.RecvInitialMetadata(context_); @@ -262,7 +264,7 @@ class ClientAsyncReaderWriter GRPC_FINAL void Write(const W& msg, void* tag) GRPC_OVERRIDE { write_ops_.set_output_tag(tag); // TODO(ctiller): don't assert - GPR_ASSERT(write_ops_.SendMessage(msg).ok()); + GPR_CODEGEN_ASSERT(write_ops_.SendMessage(msg).ok()); call_.PerformOps(&write_ops_); } @@ -300,7 +302,7 @@ class ServerAsyncReader GRPC_FINAL : public ServerAsyncStreamingInterface, : call_(nullptr, nullptr, nullptr), ctx_(ctx) {} void SendInitialMetadata(void* tag) GRPC_OVERRIDE { - GPR_ASSERT(!ctx_->sent_initial_metadata_); + GPR_CODEGEN_ASSERT(!ctx_->sent_initial_metadata_); meta_ops_.set_output_tag(tag); meta_ops_.SendInitialMetadata(ctx_->initial_metadata_); @@ -331,7 +333,7 @@ class ServerAsyncReader GRPC_FINAL : public ServerAsyncStreamingInterface, } void FinishWithError(const Status& status, void* tag) { - GPR_ASSERT(!status.ok()); + GPR_CODEGEN_ASSERT(!status.ok()); finish_ops_.set_output_tag(tag); if (!ctx_->sent_initial_metadata_) { finish_ops_.SendInitialMetadata(ctx_->initial_metadata_); @@ -349,7 +351,8 @@ class ServerAsyncReader GRPC_FINAL : public ServerAsyncStreamingInterface, CallOpSet meta_ops_; CallOpSet> read_ops_; CallOpSet finish_ops_; + CallOpServerSendStatus> + finish_ops_; }; template @@ -360,7 +363,7 @@ class ServerAsyncWriter GRPC_FINAL : public ServerAsyncStreamingInterface, : call_(nullptr, nullptr, nullptr), ctx_(ctx) {} void SendInitialMetadata(void* tag) GRPC_OVERRIDE { - GPR_ASSERT(!ctx_->sent_initial_metadata_); + GPR_CODEGEN_ASSERT(!ctx_->sent_initial_metadata_); meta_ops_.set_output_tag(tag); meta_ops_.SendInitialMetadata(ctx_->initial_metadata_); @@ -375,7 +378,7 @@ class ServerAsyncWriter GRPC_FINAL : public ServerAsyncStreamingInterface, ctx_->sent_initial_metadata_ = true; } // TODO(ctiller): don't assert - GPR_ASSERT(write_ops_.SendMessage(msg).ok()); + GPR_CODEGEN_ASSERT(write_ops_.SendMessage(msg).ok()); call_.PerformOps(&write_ops_); } @@ -409,7 +412,7 @@ class ServerAsyncReaderWriter GRPC_FINAL : public ServerAsyncStreamingInterface, : call_(nullptr, nullptr, nullptr), ctx_(ctx) {} void SendInitialMetadata(void* tag) GRPC_OVERRIDE { - GPR_ASSERT(!ctx_->sent_initial_metadata_); + GPR_CODEGEN_ASSERT(!ctx_->sent_initial_metadata_); meta_ops_.set_output_tag(tag); meta_ops_.SendInitialMetadata(ctx_->initial_metadata_); @@ -430,7 +433,7 @@ class ServerAsyncReaderWriter GRPC_FINAL : public ServerAsyncStreamingInterface, ctx_->sent_initial_metadata_ = true; } // TODO(ctiller): don't assert - GPR_ASSERT(write_ops_.SendMessage(msg).ok()); + GPR_CODEGEN_ASSERT(write_ops_.SendMessage(msg).ok()); call_.PerformOps(&write_ops_); } diff --git a/include/grpc++/impl/codegen/async_unary_call.h b/include/grpc++/impl/codegen/async_unary_call.h index f3c75dc3b1d..1526debf545 100644 --- a/include/grpc++/impl/codegen/async_unary_call.h +++ b/include/grpc++/impl/codegen/async_unary_call.h @@ -45,6 +45,7 @@ namespace grpc { class CompletionQueue; +extern CoreCodegenInterface* g_core_codegen_interface; template class ClientAsyncResponseReaderInterface { @@ -68,13 +69,13 @@ class ClientAsyncResponseReader GRPC_FINAL collection_->init_buf_.SetCollection(collection_); collection_->init_buf_.SendInitialMetadata(context->send_initial_metadata_); // TODO(ctiller): don't assert - GPR_ASSERT(collection_->init_buf_.SendMessage(request).ok()); + GPR_CODEGEN_ASSERT(collection_->init_buf_.SendMessage(request).ok()); collection_->init_buf_.ClientSendClose(); call_.PerformOps(&collection_->init_buf_); } void ReadInitialMetadata(void* tag) { - GPR_ASSERT(!context_->initial_metadata_received_); + GPR_CODEGEN_ASSERT(!context_->initial_metadata_received_); collection_->meta_buf_.SetCollection(collection_); collection_->meta_buf_.set_output_tag(tag); @@ -100,10 +101,12 @@ class ClientAsyncResponseReader GRPC_FINAL class CallOpSetCollection : public CallOpSetCollectionInterface { public: SneakyCallOpSet init_buf_; + CallOpClientSendClose> + init_buf_; CallOpSet meta_buf_; CallOpSet, - CallOpClientRecvStatus> finish_buf_; + CallOpClientRecvStatus> + finish_buf_; }; std::shared_ptr collection_; }; @@ -116,7 +119,7 @@ class ServerAsyncResponseWriter GRPC_FINAL : call_(nullptr, nullptr, nullptr), ctx_(ctx) {} void SendInitialMetadata(void* tag) GRPC_OVERRIDE { - GPR_ASSERT(!ctx_->sent_initial_metadata_); + GPR_CODEGEN_ASSERT(!ctx_->sent_initial_metadata_); meta_buf_.set_output_tag(tag); meta_buf_.SendInitialMetadata(ctx_->initial_metadata_); @@ -141,7 +144,7 @@ class ServerAsyncResponseWriter GRPC_FINAL } void FinishWithError(const Status& status, void* tag) { - GPR_ASSERT(!status.ok()); + GPR_CODEGEN_ASSERT(!status.ok()); finish_buf_.set_output_tag(tag); if (!ctx_->sent_initial_metadata_) { finish_buf_.SendInitialMetadata(ctx_->initial_metadata_); @@ -158,7 +161,8 @@ class ServerAsyncResponseWriter GRPC_FINAL ServerContext* ctx_; CallOpSet meta_buf_; CallOpSet finish_buf_; + CallOpServerSendStatus> + finish_buf_; }; } // namespace grpc diff --git a/include/grpc++/impl/codegen/call.h b/include/grpc++/impl/codegen/call.h index 5e450b0d248..50f5a751919 100644 --- a/include/grpc++/impl/codegen/call.h +++ b/include/grpc++/impl/codegen/call.h @@ -34,19 +34,21 @@ #ifndef GRPCXX_IMPL_CODEGEN_CALL_H #define GRPCXX_IMPL_CODEGEN_CALL_H +#include #include -#include #include -#include +#include -#include -#include -#include #include +#include #include -#include #include +#include +#include #include +#include +#include +#include struct grpc_byte_buffer; @@ -56,12 +58,39 @@ class ByteBuffer; class Call; class CallHook; class CompletionQueue; +extern CoreCodegenInterface* g_core_codegen_interface; -void FillMetadataMap( +inline void FillMetadataMap( grpc_metadata_array* arr, - std::multimap* metadata); -grpc_metadata* FillMetadataArray( - const std::multimap& metadata); + std::multimap* metadata) { + for (size_t i = 0; i < arr->count; i++) { + // TODO(yangg) handle duplicates? + metadata->insert(std::pair( + arr->metadata[i].key, grpc::string_ref(arr->metadata[i].value, + arr->metadata[i].value_length))); + } + g_core_codegen_interface->grpc_metadata_array_destroy(arr); + g_core_codegen_interface->grpc_metadata_array_init(arr); +} + +// TODO(yangg) if the map is changed before we send, the pointers will be a +// mess. Make sure it does not happen. +inline grpc_metadata* FillMetadataArray( + const std::multimap& metadata) { + if (metadata.empty()) { + return nullptr; + } + grpc_metadata* metadata_array = + (grpc_metadata*)(g_core_codegen_interface->gpr_malloc( + metadata.size() * sizeof(grpc_metadata))); + size_t i = 0; + for (auto iter = metadata.cbegin(); iter != metadata.cend(); ++iter, ++i) { + metadata_array[i].key = iter->first.c_str(); + metadata_array[i].value = iter->second.c_str(); + metadata_array[i].value_length = iter->second.size(); + } + return metadata_array; +} /// Per-message write options. class WriteOptions { @@ -170,7 +199,7 @@ class CallOpSendInitialMetadata { } void FinishOp(bool* status, int max_message_size) { if (!send_) return; - gpr_free(initial_metadata_); + g_core_codegen_interface->gpr_free(initial_metadata_); send_ = false; } @@ -204,7 +233,7 @@ class CallOpSendMessage { write_options_.Clear(); } void FinishOp(bool* status, int max_message_size) { - if (own_buf_) grpc_byte_buffer_destroy(send_buf_); + if (own_buf_) g_core_codegen_interface->grpc_byte_buffer_destroy(send_buf_); send_buf_ = nullptr; } @@ -251,10 +280,11 @@ class CallOpRecvMessage { if (*status) { got_message = true; *status = SerializationTraits::Deserialize(recv_buf_, message_, - max_message_size).ok(); + max_message_size) + .ok(); } else { got_message = false; - grpc_byte_buffer_destroy(recv_buf_); + g_core_codegen_interface->grpc_byte_buffer_destroy(recv_buf_); } } else { got_message = false; @@ -321,7 +351,7 @@ class CallOpGenericRecvMessage { *status = deserialize_->Deserialize(recv_buf_, max_message_size).ok(); } else { got_message = false; - grpc_byte_buffer_destroy(recv_buf_); + g_core_codegen_interface->grpc_byte_buffer_destroy(recv_buf_); } } else { got_message = false; @@ -386,7 +416,7 @@ class CallOpServerSendStatus { void FinishOp(bool* status, int max_message_size) { if (!send_status_available_) return; - gpr_free(trailing_metadata_); + g_core_codegen_interface->gpr_free(trailing_metadata_); send_status_available_ = false; } @@ -462,7 +492,7 @@ class CallOpClientRecvStatus { *recv_status_ = Status( static_cast(status_code_), status_details_ ? grpc::string(status_details_) : grpc::string()); - gpr_free(status_details_); + g_core_codegen_interface->gpr_free(status_details_); recv_status_ = nullptr; } @@ -576,11 +606,22 @@ class SneakyCallOpSet : public CallOpSet { class Call GRPC_FINAL { public: /* call is owned by the caller */ - Call(grpc_call* call, CallHook* call_hook_, CompletionQueue* cq); - Call(grpc_call* call, CallHook* call_hook_, CompletionQueue* cq, - int max_message_size); - - void PerformOps(CallOpSetInterface* ops); + Call(grpc_call* call, CallHook* call_hook, CompletionQueue* cq) + : call_hook_(call_hook), cq_(cq), call_(call), max_message_size_(-1) {} + + Call(grpc_call* call, CallHook* call_hook, CompletionQueue* cq, + int max_message_size) + : call_hook_(call_hook), + cq_(cq), + call_(call), + max_message_size_(max_message_size) {} + + void PerformOps(CallOpSetInterface* ops) { + if (max_message_size_ > 0) { + ops->set_max_message_size(max_message_size_); + } + call_hook_->PerformOpsOnCall(ops, this); + } grpc_call* call() { return call_; } CompletionQueue* cq() { return cq_; } diff --git a/include/grpc++/impl/codegen/client_context.h b/include/grpc++/impl/codegen/client_context.h index db2afe930c6..271d464583f 100644 --- a/include/grpc++/impl/codegen/client_context.h +++ b/include/grpc++/impl/codegen/client_context.h @@ -54,6 +54,7 @@ #include #include +#include #include #include #include @@ -192,7 +193,7 @@ class ClientContext { /// \return A multimap of initial metadata key-value pairs from the server. const std::multimap& GetServerInitialMetadata() { - GPR_ASSERT(initial_metadata_received_); + GPR_CODEGEN_ASSERT(initial_metadata_received_); return recv_initial_metadata_; } diff --git a/include/grpc++/impl/codegen/client_unary_call.h b/include/grpc++/impl/codegen/client_unary_call.h index 0134dec800c..6c35a957651 100644 --- a/include/grpc++/impl/codegen/client_unary_call.h +++ b/include/grpc++/impl/codegen/client_unary_call.h @@ -37,6 +37,7 @@ #include #include #include +#include #include namespace grpc { @@ -55,7 +56,8 @@ Status BlockingUnaryCall(ChannelInterface* channel, const RpcMethod& method, Call call(channel->CreateCall(method, context, &cq)); CallOpSet, - CallOpClientSendClose, CallOpClientRecvStatus> ops; + CallOpClientSendClose, CallOpClientRecvStatus> + ops; Status status = ops.SendMessage(request); if (!status.ok()) { return status; @@ -66,7 +68,7 @@ Status BlockingUnaryCall(ChannelInterface* channel, const RpcMethod& method, ops.ClientSendClose(); ops.ClientRecvStatus(context, &status); call.PerformOps(&ops); - GPR_ASSERT((cq.Pluck(&ops) && ops.got_message) || !status.ok()); + GPR_CODEGEN_ASSERT((cq.Pluck(&ops) && ops.got_message) || !status.ok()); return status; } diff --git a/include/grpc++/impl/codegen/completion_queue.h b/include/grpc++/impl/codegen/completion_queue.h index 928ab2db317..42ec287e65e 100644 --- a/include/grpc++/impl/codegen/completion_queue.h +++ b/include/grpc++/impl/codegen/completion_queue.h @@ -36,9 +36,12 @@ #ifndef GRPCXX_IMPL_CODEGEN_COMPLETION_QUEUE_H #define GRPCXX_IMPL_CODEGEN_COMPLETION_QUEUE_H +#include +#include #include #include #include +#include struct grpc_completion_queue; @@ -76,13 +79,17 @@ class Server; class ServerBuilder; class ServerContext; +extern CoreCodegenInterface* g_core_codegen_interface; + /// A thin wrapper around \a grpc_completion_queue (see / \a /// src/core/surface/completion_queue.h). -class CompletionQueue : private GrpcLibrary { +class CompletionQueue : private GrpcLibraryCodegen { public: /// Default constructor. Implicitly creates a \a grpc_completion_queue /// instance. - CompletionQueue(); + CompletionQueue() { + cq_ = g_core_codegen_interface->grpc_completion_queue_create(nullptr); + } /// Wrap \a take, taking ownership of the instance. /// @@ -90,7 +97,9 @@ class CompletionQueue : private GrpcLibrary { explicit CompletionQueue(grpc_completion_queue* take); /// Destructor. Destroys the owned wrapped completion queue / instance. - ~CompletionQueue(); + ~CompletionQueue() { + g_core_codegen_interface->grpc_completion_queue_destroy(cq_); + } /// Tri-state return for AsyncNext: SHUTDOWN, GOT_EVENT, TIMEOUT. enum NextStatus { @@ -124,8 +133,8 @@ class CompletionQueue : private GrpcLibrary { /// /// \return true if read a regular event, false if the queue is shutting down. bool Next(void** tag, bool* ok) { - return (AsyncNextInternal(tag, ok, gpr_inf_future(GPR_CLOCK_REALTIME)) != - SHUTDOWN); + return (AsyncNextInternal(tag, ok, g_core_codegen_interface->gpr_inf_future( + GPR_CLOCK_REALTIME)) != SHUTDOWN); } /// Request the shutdown of the queue. @@ -181,11 +190,31 @@ class CompletionQueue : private GrpcLibrary { /// Wraps \a grpc_completion_queue_pluck. /// \warning Must not be mixed with calls to \a Next. - bool Pluck(CompletionQueueTag* tag); + bool Pluck(CompletionQueueTag* tag) { + auto deadline = + g_core_codegen_interface->gpr_inf_future(GPR_CLOCK_REALTIME); + auto ev = g_core_codegen_interface->grpc_completion_queue_pluck( + cq_, tag, deadline, nullptr); + bool ok = ev.success != 0; + void* ignored = tag; + GPR_CODEGEN_ASSERT(tag->FinalizeResult(&ignored, &ok)); + GPR_CODEGEN_ASSERT(ignored == tag); + // Ignore mutations by FinalizeResult: Pluck returns the C API status + return ev.success != 0; + } /// Performs a single polling pluck on \a tag. /// \warning Must not be mixed with calls to \a Next. - void TryPluck(CompletionQueueTag* tag); + void TryPluck(CompletionQueueTag* tag) { + auto deadline = gpr_time_0(GPR_CLOCK_REALTIME); + auto ev = g_core_codegen_interface->grpc_completion_queue_pluck( + cq_, tag, deadline, nullptr); + if (ev.type == GRPC_QUEUE_TIMEOUT) return; + bool ok = ev.success != 0; + void* ignored = tag; + // the tag must be swallowed if using TryPluck + GPR_CODEGEN_ASSERT(!tag->FinalizeResult(&ignored, &ok)); + } grpc_completion_queue* cq_; // owned }; diff --git a/include/grpc++/impl/codegen/completion_queue_tag.h b/include/grpc++/impl/codegen/completion_queue_tag.h index 8be2ac36d6e..e904f73e962 100644 --- a/include/grpc++/impl/codegen/completion_queue_tag.h +++ b/include/grpc++/impl/codegen/completion_queue_tag.h @@ -31,8 +31,8 @@ * */ -#ifndef GRPCXX_COMPLETION_QUEUE_TAG_H -#define GRPCXX_COMPLETION_QUEUE_TAG_H +#ifndef GRPCXX_IMPL_CODEGEN_COMPLETION_QUEUE_TAG_H +#define GRPCXX_IMPL_CODEGEN_COMPLETION_QUEUE_TAG_H namespace grpc { @@ -49,4 +49,4 @@ class CompletionQueueTag { } // namespace grpc -#endif // GRPCXX_COMPLETION_QUEUE_TAG_H +#endif // GRPCXX_IMPL_CODEGEN_COMPLETION_QUEUE_TAG_H diff --git a/include/grpc++/impl/codegen/core_codegen_interface.h b/include/grpc++/impl/codegen/core_codegen_interface.h new file mode 100644 index 00000000000..a23031fe651 --- /dev/null +++ b/include/grpc++/impl/codegen/core_codegen_interface.h @@ -0,0 +1,97 @@ +/* + * + * Copyright 2015-2016, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#ifndef GRPCXX_IMPL_CODEGEN_CORE_CODEGEN_INTERFACE_H +#define GRPCXX_IMPL_CODEGEN_CORE_CODEGEN_INTERFACE_H + +#include +#include +#include + +namespace grpc { + +/// Interface between the codegen library and the minimal subset of core +/// features required by the generated code. +/// +/// All undocumented methods are simply forwarding the call to their namesakes. +/// Please refer to their corresponding documentation for details. +/// +/// \warning This interface should be considered internal and private. +class CoreCodegenInterface { + public: + // Serialize the msg into a buffer created inside the function. The caller + // should destroy the returned buffer when done with it. If serialization + // fails, + // false is returned and buffer is left unchanged. + virtual Status SerializeProto(const grpc::protobuf::Message& msg, + grpc_byte_buffer** buffer) = 0; + + // The caller keeps ownership of buffer and msg. + virtual Status DeserializeProto(grpc_byte_buffer* buffer, + grpc::protobuf::Message* msg, + int max_message_size) = 0; + + /// Upon a failed assertion, log the error. + virtual void assert_fail(const char* failed_assertion) = 0; + + virtual grpc_completion_queue* grpc_completion_queue_create( + void* reserved) = 0; + virtual void grpc_completion_queue_destroy(grpc_completion_queue* cq) = 0; + virtual grpc_event grpc_completion_queue_pluck(grpc_completion_queue* cq, + void* tag, + gpr_timespec deadline, + void* reserved) = 0; + + virtual void* gpr_malloc(size_t size) = 0; + virtual void gpr_free(void* p) = 0; + + virtual void grpc_byte_buffer_destroy(grpc_byte_buffer* bb) = 0; + virtual void grpc_metadata_array_init(grpc_metadata_array* array) = 0; + virtual void grpc_metadata_array_destroy(grpc_metadata_array* array) = 0; + + virtual gpr_timespec gpr_inf_future(gpr_clock_type type) = 0; +}; + +extern CoreCodegenInterface* g_core_codegen_interface; + +/// Codegen specific version of \a GPR_ASSERT. +#define GPR_CODEGEN_ASSERT(x) \ + do { \ + if (!(x)) { \ + grpc::g_core_codegen_interface->assert_fail(#x); \ + } \ + } while (0) + +} // namespace grpc + +#endif // GRPCXX_IMPL_CODEGEN_CORE_CODEGEN_INTERFACE_H diff --git a/include/grpc++/impl/codegen/grpc_library.h b/include/grpc++/impl/codegen/grpc_library.h index eb7152a2c60..3cdc6f3f7c4 100644 --- a/include/grpc++/impl/codegen/grpc_library.h +++ b/include/grpc++/impl/codegen/grpc_library.h @@ -34,6 +34,7 @@ #ifndef GRPCXX_IMPL_CODEGEN_GRPC_LIBRARY_H #define GRPCXX_IMPL_CODEGEN_GRPC_LIBRARY_H +#include #include namespace grpc { @@ -44,24 +45,27 @@ class GrpcLibraryInterface { virtual void shutdown() = 0; }; +/// Initialized by \a grpc::GrpcLibraryInitializer from +/// extern GrpcLibraryInterface* g_glip; -class GrpcLibrary { +/// Classes that require gRPC to be initialized should inherit from this class. +class GrpcLibraryCodegen { public: - GrpcLibrary() { - GPR_ASSERT(g_glip && - "gRPC library not initialized. See " - "grpc::internal::GrpcLibraryInitializer."); + GrpcLibraryCodegen() { + GPR_CODEGEN_ASSERT(g_glip && + "gRPC library not initialized. See " + "grpc::internal::GrpcLibraryInitializer."); g_glip->init(); } - virtual ~GrpcLibrary() { - GPR_ASSERT(g_glip && - "gRPC library not initialized. See " - "grpc::internal::GrpcLibraryInitializer."); + virtual ~GrpcLibraryCodegen() { + GPR_CODEGEN_ASSERT(g_glip && + "gRPC library not initialized. See " + "grpc::internal::GrpcLibraryInitializer."); g_glip->shutdown(); } }; } // namespace grpc -#endif // GRPCXX_IMPL_GRPC_LIBRARY_H +#endif // GRPCXX_IMPL_CODEGEN_GRPC_LIBRARY_H diff --git a/include/grpc++/impl/codegen/impl/async_stream.h b/include/grpc++/impl/codegen/impl/async_stream.h new file mode 100644 index 00000000000..95c844723ab --- /dev/null +++ b/include/grpc++/impl/codegen/impl/async_stream.h @@ -0,0 +1,465 @@ +/* + * + * Copyright 2015-2016, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#ifndef GRPCXX_IMPL_CODEGEN_IMPL_ASYNC_STREAM_H +#define GRPCXX_IMPL_CODEGEN_IMPL_ASYNC_STREAM_H + +#include +#include +#include +#include +#include +#include + +namespace grpc { + +class CompletionQueue; + +/// Common interface for all client side asynchronous streaming. +class ClientAsyncStreamingInterface { + public: + virtual ~ClientAsyncStreamingInterface() {} + + /// Request notification of the reading of the initial metadata. Completion + /// will be notified by \a tag on the associated completion queue. + /// + /// \param[in] tag Tag identifying this request. + virtual void ReadInitialMetadata(void* tag) = 0; + + /// Request notification completion. + /// + /// \param[out] status To be updated with the operation status. + /// \param[in] tag Tag identifying this request. + virtual void Finish(Status* status, void* tag) = 0; +}; + +/// An interface that yields a sequence of messages of type \a R. +template +class AsyncReaderInterface { + public: + virtual ~AsyncReaderInterface() {} + + /// Read a message of type \a R into \a msg. Completion will be notified by \a + /// tag on the associated completion queue. + /// + /// \param[out] msg Where to eventually store the read message. + /// \param[in] tag The tag identifying the operation. + virtual void Read(R* msg, void* tag) = 0; +}; + +/// An interface that can be fed a sequence of messages of type \a W. +template +class AsyncWriterInterface { + public: + virtual ~AsyncWriterInterface() {} + + /// Request the writing of \a msg with identifying tag \a tag. + /// + /// Only one write may be outstanding at any given time. This means that + /// after calling Write, one must wait to receive \a tag from the completion + /// queue BEFORE calling Write again. + /// + /// \param[in] msg The message to be written. + /// \param[in] tag The tag identifying the operation. + virtual void Write(const W& msg, void* tag) = 0; +}; + +template +class ClientAsyncReaderInterface : public ClientAsyncStreamingInterface, + public AsyncReaderInterface {}; + +template +class ClientAsyncReader GRPC_FINAL : public ClientAsyncReaderInterface { + public: + /// Create a stream and write the first request out. + template + ClientAsyncReader(ChannelInterface* channel, CompletionQueue* cq, + const RpcMethod& method, ClientContext* context, + const W& request, void* tag) + : context_(context), call_(channel->CreateCall(method, context, cq)) { + init_ops_.set_output_tag(tag); + init_ops_.SendInitialMetadata(context->send_initial_metadata_); + // TODO(ctiller): don't assert + GPR_CODEGEN_ASSERT(init_ops_.SendMessage(request).ok()); + init_ops_.ClientSendClose(); + call_.PerformOps(&init_ops_); + } + + void ReadInitialMetadata(void* tag) GRPC_OVERRIDE { + GPR_CODEGEN_ASSERT(!context_->initial_metadata_received_); + + meta_ops_.set_output_tag(tag); + meta_ops_.RecvInitialMetadata(context_); + call_.PerformOps(&meta_ops_); + } + + void Read(R* msg, void* tag) GRPC_OVERRIDE { + read_ops_.set_output_tag(tag); + if (!context_->initial_metadata_received_) { + read_ops_.RecvInitialMetadata(context_); + } + read_ops_.RecvMessage(msg); + call_.PerformOps(&read_ops_); + } + + void Finish(Status* status, void* tag) GRPC_OVERRIDE { + finish_ops_.set_output_tag(tag); + if (!context_->initial_metadata_received_) { + finish_ops_.RecvInitialMetadata(context_); + } + finish_ops_.ClientRecvStatus(context_, status); + call_.PerformOps(&finish_ops_); + } + + private: + ClientContext* context_; + Call call_; + CallOpSet + init_ops_; + CallOpSet meta_ops_; + CallOpSet> read_ops_; + CallOpSet finish_ops_; +}; + +/// Common interface for client side asynchronous writing. +template +class ClientAsyncWriterInterface : public ClientAsyncStreamingInterface, + public AsyncWriterInterface { + public: + /// Signal the client is done with the writes. + /// + /// \param[in] tag The tag identifying the operation. + virtual void WritesDone(void* tag) = 0; +}; + +template +class ClientAsyncWriter GRPC_FINAL : public ClientAsyncWriterInterface { + public: + template + ClientAsyncWriter(ChannelInterface* channel, CompletionQueue* cq, + const RpcMethod& method, ClientContext* context, + R* response, void* tag) + : context_(context), call_(channel->CreateCall(method, context, cq)) { + finish_ops_.RecvMessage(response); + + init_ops_.set_output_tag(tag); + init_ops_.SendInitialMetadata(context->send_initial_metadata_); + call_.PerformOps(&init_ops_); + } + + void ReadInitialMetadata(void* tag) GRPC_OVERRIDE { + GPR_CODEGEN_ASSERT(!context_->initial_metadata_received_); + + meta_ops_.set_output_tag(tag); + meta_ops_.RecvInitialMetadata(context_); + call_.PerformOps(&meta_ops_); + } + + void Write(const W& msg, void* tag) GRPC_OVERRIDE { + write_ops_.set_output_tag(tag); + // TODO(ctiller): don't assert + GPR_CODEGEN_ASSERT(write_ops_.SendMessage(msg).ok()); + call_.PerformOps(&write_ops_); + } + + void WritesDone(void* tag) GRPC_OVERRIDE { + writes_done_ops_.set_output_tag(tag); + writes_done_ops_.ClientSendClose(); + call_.PerformOps(&writes_done_ops_); + } + + void Finish(Status* status, void* tag) GRPC_OVERRIDE { + finish_ops_.set_output_tag(tag); + if (!context_->initial_metadata_received_) { + finish_ops_.RecvInitialMetadata(context_); + } + finish_ops_.ClientRecvStatus(context_, status); + call_.PerformOps(&finish_ops_); + } + + private: + ClientContext* context_; + Call call_; + CallOpSet init_ops_; + CallOpSet meta_ops_; + CallOpSet write_ops_; + CallOpSet writes_done_ops_; + CallOpSet + finish_ops_; +}; + +/// Client-side interface for asynchronous bi-directional streaming. +template +class ClientAsyncReaderWriterInterface : public ClientAsyncStreamingInterface, + public AsyncWriterInterface, + public AsyncReaderInterface { + public: + /// Signal the client is done with the writes. + /// + /// \param[in] tag The tag identifying the operation. + virtual void WritesDone(void* tag) = 0; +}; + +template +class ClientAsyncReaderWriter GRPC_FINAL + : public ClientAsyncReaderWriterInterface { + public: + ClientAsyncReaderWriter(ChannelInterface* channel, CompletionQueue* cq, + const RpcMethod& method, ClientContext* context, + void* tag) + : context_(context), call_(channel->CreateCall(method, context, cq)) { + init_ops_.set_output_tag(tag); + init_ops_.SendInitialMetadata(context->send_initial_metadata_); + call_.PerformOps(&init_ops_); + } + + void ReadInitialMetadata(void* tag) GRPC_OVERRIDE { + GPR_CODEGEN_ASSERT(!context_->initial_metadata_received_); + + meta_ops_.set_output_tag(tag); + meta_ops_.RecvInitialMetadata(context_); + call_.PerformOps(&meta_ops_); + } + + void Read(R* msg, void* tag) GRPC_OVERRIDE { + read_ops_.set_output_tag(tag); + if (!context_->initial_metadata_received_) { + read_ops_.RecvInitialMetadata(context_); + } + read_ops_.RecvMessage(msg); + call_.PerformOps(&read_ops_); + } + + void Write(const W& msg, void* tag) GRPC_OVERRIDE { + write_ops_.set_output_tag(tag); + // TODO(ctiller): don't assert + GPR_CODEGEN_ASSERT(write_ops_.SendMessage(msg).ok()); + call_.PerformOps(&write_ops_); + } + + void WritesDone(void* tag) GRPC_OVERRIDE { + writes_done_ops_.set_output_tag(tag); + writes_done_ops_.ClientSendClose(); + call_.PerformOps(&writes_done_ops_); + } + + void Finish(Status* status, void* tag) GRPC_OVERRIDE { + finish_ops_.set_output_tag(tag); + if (!context_->initial_metadata_received_) { + finish_ops_.RecvInitialMetadata(context_); + } + finish_ops_.ClientRecvStatus(context_, status); + call_.PerformOps(&finish_ops_); + } + + private: + ClientContext* context_; + Call call_; + CallOpSet init_ops_; + CallOpSet meta_ops_; + CallOpSet> read_ops_; + CallOpSet write_ops_; + CallOpSet writes_done_ops_; + CallOpSet finish_ops_; +}; + +template +class ServerAsyncReader GRPC_FINAL : public ServerAsyncStreamingInterface, + public AsyncReaderInterface { + public: + explicit ServerAsyncReader(ServerContext* ctx) + : call_(nullptr, nullptr, nullptr), ctx_(ctx) {} + + void SendInitialMetadata(void* tag) GRPC_OVERRIDE { + GPR_CODEGEN_ASSERT(!ctx_->sent_initial_metadata_); + + meta_ops_.set_output_tag(tag); + meta_ops_.SendInitialMetadata(ctx_->initial_metadata_); + ctx_->sent_initial_metadata_ = true; + call_.PerformOps(&meta_ops_); + } + + void Read(R* msg, void* tag) GRPC_OVERRIDE { + read_ops_.set_output_tag(tag); + read_ops_.RecvMessage(msg); + call_.PerformOps(&read_ops_); + } + + void Finish(const W& msg, const Status& status, void* tag) { + finish_ops_.set_output_tag(tag); + if (!ctx_->sent_initial_metadata_) { + finish_ops_.SendInitialMetadata(ctx_->initial_metadata_); + ctx_->sent_initial_metadata_ = true; + } + // The response is dropped if the status is not OK. + if (status.ok()) { + finish_ops_.ServerSendStatus(ctx_->trailing_metadata_, + finish_ops_.SendMessage(msg)); + } else { + finish_ops_.ServerSendStatus(ctx_->trailing_metadata_, status); + } + call_.PerformOps(&finish_ops_); + } + + void FinishWithError(const Status& status, void* tag) { + GPR_CODEGEN_ASSERT(!status.ok()); + finish_ops_.set_output_tag(tag); + if (!ctx_->sent_initial_metadata_) { + finish_ops_.SendInitialMetadata(ctx_->initial_metadata_); + ctx_->sent_initial_metadata_ = true; + } + finish_ops_.ServerSendStatus(ctx_->trailing_metadata_, status); + call_.PerformOps(&finish_ops_); + } + + private: + void BindCall(Call* call) GRPC_OVERRIDE { call_ = *call; } + + Call call_; + ServerContext* ctx_; + CallOpSet meta_ops_; + CallOpSet> read_ops_; + CallOpSet + finish_ops_; +}; + +template +class ServerAsyncWriter GRPC_FINAL : public ServerAsyncStreamingInterface, + public AsyncWriterInterface { + public: + explicit ServerAsyncWriter(ServerContext* ctx) + : call_(nullptr, nullptr, nullptr), ctx_(ctx) {} + + void SendInitialMetadata(void* tag) GRPC_OVERRIDE { + GPR_CODEGEN_ASSERT(!ctx_->sent_initial_metadata_); + + meta_ops_.set_output_tag(tag); + meta_ops_.SendInitialMetadata(ctx_->initial_metadata_); + ctx_->sent_initial_metadata_ = true; + call_.PerformOps(&meta_ops_); + } + + void Write(const W& msg, void* tag) GRPC_OVERRIDE { + write_ops_.set_output_tag(tag); + if (!ctx_->sent_initial_metadata_) { + write_ops_.SendInitialMetadata(ctx_->initial_metadata_); + ctx_->sent_initial_metadata_ = true; + } + // TODO(ctiller): don't assert + GPR_CODEGEN_ASSERT(write_ops_.SendMessage(msg).ok()); + call_.PerformOps(&write_ops_); + } + + void Finish(const Status& status, void* tag) { + finish_ops_.set_output_tag(tag); + if (!ctx_->sent_initial_metadata_) { + finish_ops_.SendInitialMetadata(ctx_->initial_metadata_); + ctx_->sent_initial_metadata_ = true; + } + finish_ops_.ServerSendStatus(ctx_->trailing_metadata_, status); + call_.PerformOps(&finish_ops_); + } + + private: + void BindCall(Call* call) GRPC_OVERRIDE { call_ = *call; } + + Call call_; + ServerContext* ctx_; + CallOpSet meta_ops_; + CallOpSet write_ops_; + CallOpSet finish_ops_; +}; + +/// Server-side interface for asynchronous bi-directional streaming. +template +class ServerAsyncReaderWriter GRPC_FINAL : public ServerAsyncStreamingInterface, + public AsyncWriterInterface, + public AsyncReaderInterface { + public: + explicit ServerAsyncReaderWriter(ServerContext* ctx) + : call_(nullptr, nullptr, nullptr), ctx_(ctx) {} + + void SendInitialMetadata(void* tag) GRPC_OVERRIDE { + GPR_CODEGEN_ASSERT(!ctx_->sent_initial_metadata_); + + meta_ops_.set_output_tag(tag); + meta_ops_.SendInitialMetadata(ctx_->initial_metadata_); + ctx_->sent_initial_metadata_ = true; + call_.PerformOps(&meta_ops_); + } + + void Read(R* msg, void* tag) GRPC_OVERRIDE { + read_ops_.set_output_tag(tag); + read_ops_.RecvMessage(msg); + call_.PerformOps(&read_ops_); + } + + void Write(const W& msg, void* tag) GRPC_OVERRIDE { + write_ops_.set_output_tag(tag); + if (!ctx_->sent_initial_metadata_) { + write_ops_.SendInitialMetadata(ctx_->initial_metadata_); + ctx_->sent_initial_metadata_ = true; + } + // TODO(ctiller): don't assert + GPR_CODEGEN_ASSERT(write_ops_.SendMessage(msg).ok()); + call_.PerformOps(&write_ops_); + } + + void Finish(const Status& status, void* tag) { + finish_ops_.set_output_tag(tag); + if (!ctx_->sent_initial_metadata_) { + finish_ops_.SendInitialMetadata(ctx_->initial_metadata_); + ctx_->sent_initial_metadata_ = true; + } + finish_ops_.ServerSendStatus(ctx_->trailing_metadata_, status); + call_.PerformOps(&finish_ops_); + } + + private: + friend class ::grpc::Server; + + void BindCall(Call* call) GRPC_OVERRIDE { call_ = *call; } + + Call call_; + ServerContext* ctx_; + CallOpSet meta_ops_; + CallOpSet> read_ops_; + CallOpSet write_ops_; + CallOpSet finish_ops_; +}; + +} // namespace grpc + +#endif // GRPCXX_IMPL_CODEGEN_IMPL_ASYNC_STREAM_H diff --git a/include/grpc++/impl/codegen/impl/status_code_enum.h b/include/grpc++/impl/codegen/impl/status_code_enum.h new file mode 100644 index 00000000000..f8caec0c119 --- /dev/null +++ b/include/grpc++/impl/codegen/impl/status_code_enum.h @@ -0,0 +1,152 @@ +/* + * + * Copyright 2016, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#ifndef GRPCXX_IMPL_CODEGEN_IMPL_STATUS_CODE_ENUM_H +#define GRPCXX_IMPL_CODEGEN_IMPL_STATUS_CODE_ENUM_H + +namespace grpc { + +enum StatusCode { + /// Not an error; returned on success. + OK = 0, + + /// The operation was cancelled (typically by the caller). + CANCELLED = 1, + + /// Unknown error. An example of where this error may be returned is if a + /// Status value received from another address space belongs to an error-space + /// that is not known in this address space. Also errors raised by APIs that + /// do not return enough error information may be converted to this error. + UNKNOWN = 2, + + /// Client specified an invalid argument. Note that this differs from + /// FAILED_PRECONDITION. INVALID_ARGUMENT indicates arguments that are + /// problematic regardless of the state of the system (e.g., a malformed file + /// name). + INVALID_ARGUMENT = 3, + + /// Deadline expired before operation could complete. For operations that + /// change the state of the system, this error may be returned even if the + /// operation has completed successfully. For example, a successful response + /// from a server could have been delayed long enough for the deadline to + /// expire. + DEADLINE_EXCEEDED = 4, + + /// Some requested entity (e.g., file or directory) was not found. + NOT_FOUND = 5, + + /// Some entity that we attempted to create (e.g., file or directory) already + /// exists. + ALREADY_EXISTS = 6, + + /// The caller does not have permission to execute the specified operation. + /// PERMISSION_DENIED must not be used for rejections caused by exhausting + /// some resource (use RESOURCE_EXHAUSTED instead for those errors). + /// PERMISSION_DENIED must not be used if the caller can not be identified + /// (use UNAUTHENTICATED instead for those errors). + PERMISSION_DENIED = 7, + + /// The request does not have valid authentication credentials for the + /// operation. + UNAUTHENTICATED = 16, + + /// Some resource has been exhausted, perhaps a per-user quota, or perhaps the + /// entire file system is out of space. + RESOURCE_EXHAUSTED = 8, + + /// Operation was rejected because the system is not in a state required for + /// the operation's execution. For example, directory to be deleted may be + /// non-empty, an rmdir operation is applied to a non-directory, etc. + /// + /// A litmus test that may help a service implementor in deciding + /// between FAILED_PRECONDITION, ABORTED, and UNAVAILABLE: + /// (a) Use UNAVAILABLE if the client can retry just the failing call. + /// (b) Use ABORTED if the client should retry at a higher-level + /// (e.g., restarting a read-modify-write sequence). + /// (c) Use FAILED_PRECONDITION if the client should not retry until + /// the system state has been explicitly fixed. E.g., if an "rmdir" + /// fails because the directory is non-empty, FAILED_PRECONDITION + /// should be returned since the client should not retry unless + /// they have first fixed up the directory by deleting files from it. + /// (d) Use FAILED_PRECONDITION if the client performs conditional + /// REST Get/Update/Delete on a resource and the resource on the + /// server does not match the condition. E.g., conflicting + /// read-modify-write on the same resource. + FAILED_PRECONDITION = 9, + + /// The operation was aborted, typically due to a concurrency issue like + /// sequencer check failures, transaction aborts, etc. + /// + /// See litmus test above for deciding between FAILED_PRECONDITION, ABORTED, + /// and UNAVAILABLE. + ABORTED = 10, + + /// Operation was attempted past the valid range. E.g., seeking or reading + /// past end of file. + /// + /// Unlike INVALID_ARGUMENT, this error indicates a problem that may be fixed + /// if the system state changes. For example, a 32-bit file system will + /// generate INVALID_ARGUMENT if asked to read at an offset that is not in the + /// range [0,2^32-1], but it will generate OUT_OF_RANGE if asked to read from + /// an offset past the current file size. + /// + /// There is a fair bit of overlap between FAILED_PRECONDITION and + /// OUT_OF_RANGE. We recommend using OUT_OF_RANGE (the more specific error) + /// when it applies so that callers who are iterating through a space can + /// easily look for an OUT_OF_RANGE error to detect when they are done. + OUT_OF_RANGE = 11, + + /// Operation is not implemented or not supported/enabled in this service. + UNIMPLEMENTED = 12, + + /// Internal errors. Means some invariants expected by underlying System has + /// been broken. If you see one of these errors, Something is very broken. + INTERNAL = 13, + + /// The service is currently unavailable. This is a most likely a transient + /// condition and may be corrected by retrying with a backoff. + /// + /// See litmus test above for deciding between FAILED_PRECONDITION, ABORTED, + /// and UNAVAILABLE. + UNAVAILABLE = 14, + + /// Unrecoverable data loss or corruption. + DATA_LOSS = 15, + + /// Force users to include a default branch: + DO_NOT_USE = -1 +}; + +} // namespace grpc + +#endif // GRPCXX_IMPL_CODEGEN_IMPL_STATUS_CODE_ENUM_H diff --git a/src/core/surface/init_secure.c b/include/grpc++/impl/codegen/impl/sync.h similarity index 80% rename from src/core/surface/init_secure.c rename to include/grpc++/impl/codegen/impl/sync.h index fa20e91583c..68fd0c4f2dc 100644 --- a/src/core/surface/init_secure.c +++ b/include/grpc++/impl/codegen/impl/sync.h @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,12 +31,15 @@ * */ -#include "src/core/surface/init.h" -#include "src/core/debug/trace.h" -#include "src/core/security/secure_endpoint.h" -#include "src/core/tsi/transport_security_interface.h" +#ifndef GRPCXX_IMPL_CODEGEN_IMPL_SYNC_H +#define GRPCXX_IMPL_CODEGEN_IMPL_SYNC_H -void grpc_security_pre_init(void) { - grpc_register_tracer("secure_endpoint", &grpc_trace_secure_endpoint); - grpc_register_tracer("transport_security", &tsi_tracing_enabled); -} +#include + +#ifdef GRPC_CXX0X_NO_THREAD +#include +#else +#include +#endif + +#endif // GRPCXX_IMPL_CODEGEN_IMPL_SYNC_H diff --git a/include/grpc++/impl/codegen/method_handler_impl.h b/include/grpc++/impl/codegen/method_handler_impl.h index 1bf9bf05499..0ab2ae466ad 100644 --- a/include/grpc++/impl/codegen/method_handler_impl.h +++ b/include/grpc++/impl/codegen/method_handler_impl.h @@ -34,6 +34,7 @@ #ifndef GRPCXX_IMPL_CODEGEN_METHOD_HANDLER_IMPL_H #define GRPCXX_IMPL_CODEGEN_METHOD_HANDLER_IMPL_H +#include #include #include @@ -58,9 +59,10 @@ class RpcMethodHandler : public MethodHandler { status = func_(service_, param.server_context, &req, &rsp); } - GPR_ASSERT(!param.server_context->sent_initial_metadata_); + GPR_CODEGEN_ASSERT(!param.server_context->sent_initial_metadata_); CallOpSet ops; + CallOpServerSendStatus> + ops; ops.SendInitialMetadata(param.server_context->initial_metadata_); if (status.ok()) { status = ops.SendMessage(rsp); @@ -73,7 +75,8 @@ class RpcMethodHandler : public MethodHandler { private: // Application provided rpc handler function. std::function func_; + ResponseType*)> + func_; // The class the above handler function lives in. ServiceType* service_; }; @@ -93,9 +96,10 @@ class ClientStreamingHandler : public MethodHandler { ResponseType rsp; Status status = func_(service_, param.server_context, &reader, &rsp); - GPR_ASSERT(!param.server_context->sent_initial_metadata_); + GPR_CODEGEN_ASSERT(!param.server_context->sent_initial_metadata_); CallOpSet ops; + CallOpServerSendStatus> + ops; ops.SendInitialMetadata(param.server_context->initial_metadata_); if (status.ok()) { status = ops.SendMessage(rsp); @@ -107,7 +111,8 @@ class ClientStreamingHandler : public MethodHandler { private: std::function*, - ResponseType*)> func_; + ResponseType*)> + func_; ServiceType* service_; }; @@ -142,7 +147,8 @@ class ServerStreamingHandler : public MethodHandler { private: std::function*)> func_; + ServerWriter*)> + func_; ServiceType* service_; }; @@ -173,7 +179,8 @@ class BidiStreamingHandler : public MethodHandler { private: std::function*)> func_; + ServerReaderWriter*)> + func_; ServiceType* service_; }; diff --git a/include/grpc++/impl/codegen/proto_utils.h b/include/grpc++/impl/codegen/proto_utils.h index ce177104e00..f77f8eebb37 100644 --- a/include/grpc++/impl/codegen/proto_utils.h +++ b/include/grpc++/impl/codegen/proto_utils.h @@ -36,22 +36,16 @@ #include -#include -#include #include +#include +#include #include +#include +#include namespace grpc { -// Serialize the msg into a buffer created inside the function. The caller -// should destroy the returned buffer when done with it. If serialization fails, -// false is returned and buffer is left unchanged. -Status SerializeProto(const grpc::protobuf::Message& msg, - grpc_byte_buffer** buffer); - -// The caller keeps ownership of buffer and msg. -Status DeserializeProto(grpc_byte_buffer* buffer, grpc::protobuf::Message* msg, - int max_message_size); +extern CoreCodegenInterface* g_core_codegen_interface; template class SerializationTraitsSerializeProto(msg, buffer); } static Status Deserialize(grpc_byte_buffer* buffer, grpc::protobuf::Message* msg, int max_message_size) { - auto status = DeserializeProto(buffer, msg, max_message_size); - grpc_byte_buffer_destroy(buffer); - return status; + return g_core_codegen_interface->DeserializeProto(buffer, msg, + max_message_size); } }; diff --git a/include/grpc++/impl/codegen/rpc_service_method.h b/include/grpc++/impl/codegen/rpc_service_method.h index 62563016775..8b1f026c912 100644 --- a/include/grpc++/impl/codegen/rpc_service_method.h +++ b/include/grpc++/impl/codegen/rpc_service_method.h @@ -40,10 +40,10 @@ #include #include -#include #include #include #include +#include namespace grpc { class ServerContext; diff --git a/include/grpc++/impl/codegen/server_context.h b/include/grpc++/impl/codegen/server_context.h index 91ebe574b14..f8326bc44bc 100644 --- a/include/grpc++/impl/codegen/server_context.h +++ b/include/grpc++/impl/codegen/server_context.h @@ -37,12 +37,12 @@ #include #include -#include -#include -#include #include +#include #include #include +#include +#include struct gpr_timespec; struct grpc_metadata; diff --git a/include/grpc++/impl/codegen/server_interface.h b/include/grpc++/impl/codegen/server_interface.h index f934619c20b..908d124df18 100644 --- a/include/grpc++/impl/codegen/server_interface.h +++ b/include/grpc++/impl/codegen/server_interface.h @@ -34,10 +34,11 @@ #ifndef GRPCXX_IMPL_CODEGEN_SERVER_INTERFACE_H #define GRPCXX_IMPL_CODEGEN_SERVER_INTERFACE_H -#include #include #include +#include #include +#include namespace grpc { @@ -191,10 +192,11 @@ class ServerInterface : public CallHook { bool FinalizeResult(void** tag, bool* status) GRPC_OVERRIDE { bool serialization_status = *status && payload_ && - SerializationTraits::Deserialize( - payload_, request_, server_->max_message_size()).ok(); + SerializationTraits::Deserialize(payload_, request_, + server_->max_message_size()) + .ok(); bool ret = RegisteredAsyncRequest::FinalizeResult(tag, status); - *status = serialization_status&&* status; + *status = serialization_status && *status; return ret; } @@ -223,7 +225,7 @@ class ServerInterface : public CallHook { CompletionQueue* call_cq, ServerCompletionQueue* notification_cq, void* tag, Message* message) { - GPR_ASSERT(method); + GPR_CODEGEN_ASSERT(method); new PayloadAsyncRequest(method->server_tag(), this, context, stream, call_cq, notification_cq, tag, message); @@ -233,7 +235,7 @@ class ServerInterface : public CallHook { ServerAsyncStreamingInterface* stream, CompletionQueue* call_cq, ServerCompletionQueue* notification_cq, void* tag) { - GPR_ASSERT(method); + GPR_CODEGEN_ASSERT(method); new NoPayloadAsyncRequest(method->server_tag(), this, context, stream, call_cq, notification_cq, tag); } diff --git a/include/grpc++/impl/codegen/service_type.h b/include/grpc++/impl/codegen/service_type.h index deb91a41d96..faf189314c2 100644 --- a/include/grpc++/impl/codegen/service_type.h +++ b/include/grpc++/impl/codegen/service_type.h @@ -35,6 +35,7 @@ #define GRPCXX_IMPL_CODEGEN_SERVICE_TYPE_H #include +#include #include #include #include @@ -131,21 +132,18 @@ class Service { void AddMethod(RpcServiceMethod* method) { methods_.emplace_back(method); } void MarkMethodAsync(int index) { - if (methods_[index].get() == nullptr) { - gpr_log(GPR_ERROR, - "Cannot mark the method as 'async' because it has already been " - "marked as 'generic'."); - return; - } + GPR_CODEGEN_ASSERT( + methods_[index].get() != nullptr && + "Cannot mark the method as 'async' because it has already been " + "marked as 'generic'."); methods_[index]->ResetHandler(); } void MarkMethodGeneric(int index) { - if (methods_[index]->handler() == nullptr) { - gpr_log(GPR_ERROR, - "Cannot mark the method as 'generic' because it has already been " - "marked as 'async'."); - } + GPR_CODEGEN_ASSERT( + methods_[index]->handler() != nullptr && + "Cannot mark the method as 'generic' because it has already been " + "marked as 'async'."); methods_[index].reset(); } diff --git a/include/grpc++/impl/codegen/string_ref.h b/include/grpc++/impl/codegen/string_ref.h index e3af37e0c2a..4af2000ffdb 100644 --- a/include/grpc++/impl/codegen/string_ref.h +++ b/include/grpc++/impl/codegen/string_ref.h @@ -34,8 +34,12 @@ #ifndef GRPCXX_IMPL_CODEGEN_STRING_REF_H #define GRPCXX_IMPL_CODEGEN_STRING_REF_H -#include +#include + +#include #include +#include +#include #include @@ -62,8 +66,13 @@ class string_ref { string_ref() : data_(nullptr), length_(0) {} string_ref(const string_ref& other) : data_(other.data_), length_(other.length_) {} - string_ref& operator=(const string_ref& rhs); - string_ref(const char* s); + string_ref& operator=(const string_ref& rhs) { + data_ = rhs.data_; + length_ = rhs.length_; + return *this; + } + + string_ref(const char* s) : data_(s), length_(strlen(s)) {} string_ref(const char* s, size_t l) : data_(s), length_(l) {} string_ref(const grpc::string& s) : data_(s.data()), length_(s.length()) {} @@ -95,13 +104,40 @@ class string_ref { const char* data() const { return data_; } // string operations - int compare(string_ref x) const; - bool starts_with(string_ref x) const; - bool ends_with(string_ref x) const; - size_t find(string_ref s) const; - size_t find(char c) const; + int compare(string_ref x) const { + size_t min_size = length_ < x.length_ ? length_ : x.length_; + int r = memcmp(data_, x.data_, min_size); + if (r < 0) return -1; + if (r > 0) return 1; + if (length_ < x.length_) return -1; + if (length_ > x.length_) return 1; + return 0; + } + + bool starts_with(string_ref x) const { + return length_ >= x.length_ && (memcmp(data_, x.data_, x.length_) == 0); + } - string_ref substr(size_t pos, size_t n = npos) const; + bool ends_with(string_ref x) const { + return length_ >= x.length_ && + (memcmp(data_ + (length_ - x.length_), x.data_, x.length_) == 0); + } + + size_t find(string_ref s) const { + auto it = std::search(cbegin(), cend(), s.cbegin(), s.cend()); + return it == cend() ? npos : std::distance(cbegin(), it); + } + + size_t find(char c) const { + auto it = std::find(cbegin(), cend(), c); + return it == cend() ? npos : std::distance(cbegin(), it); + } + + string_ref substr(size_t pos, size_t n = npos) const { + if (pos > length_) pos = length_; + if (n > (length_ - pos)) n = length_ - pos; + return string_ref(data_ + pos, n); + } private: const char* data_; @@ -109,14 +145,16 @@ class string_ref { }; // Comparison operators -bool operator==(string_ref x, string_ref y); -bool operator!=(string_ref x, string_ref y); -bool operator<(string_ref x, string_ref y); -bool operator>(string_ref x, string_ref y); -bool operator<=(string_ref x, string_ref y); -bool operator>=(string_ref x, string_ref y); - -std::ostream& operator<<(std::ostream& stream, const string_ref& string); +inline bool operator==(string_ref x, string_ref y) { return x.compare(y) == 0; } +inline bool operator!=(string_ref x, string_ref y) { return x.compare(y) != 0; } +inline bool operator<(string_ref x, string_ref y) { return x.compare(y) < 0; } +inline bool operator<=(string_ref x, string_ref y) { return x.compare(y) <= 0; } +inline bool operator>(string_ref x, string_ref y) { return x.compare(y) > 0; } +inline bool operator>=(string_ref x, string_ref y) { return x.compare(y) >= 0; } + +inline std::ostream& operator<<(std::ostream& out, const string_ref& string) { + return out << grpc::string(string.begin(), string.end()); +} } // namespace grpc diff --git a/include/grpc++/impl/codegen/sync_stream.h b/include/grpc++/impl/codegen/sync_stream.h index 9ae48bd23d6..0eabc5fc0f8 100644 --- a/include/grpc++/impl/codegen/sync_stream.h +++ b/include/grpc++/impl/codegen/sync_stream.h @@ -38,6 +38,7 @@ #include #include #include +#include #include #include #include @@ -122,17 +123,18 @@ class ClientReader GRPC_FINAL : public ClientReaderInterface { ClientContext* context, const W& request) : context_(context), call_(channel->CreateCall(method, context, &cq_)) { CallOpSet ops; + CallOpClientSendClose> + ops; ops.SendInitialMetadata(context->send_initial_metadata_); // TODO(ctiller): don't assert - GPR_ASSERT(ops.SendMessage(request).ok()); + GPR_CODEGEN_ASSERT(ops.SendMessage(request).ok()); ops.ClientSendClose(); call_.PerformOps(&ops); cq_.Pluck(&ops); } void WaitForInitialMetadata() GRPC_OVERRIDE { - GPR_ASSERT(!context_->initial_metadata_received_); + GPR_CODEGEN_ASSERT(!context_->initial_metadata_received_); CallOpSet ops; ops.RecvInitialMetadata(context_); @@ -155,7 +157,7 @@ class ClientReader GRPC_FINAL : public ClientReaderInterface { Status status; ops.ClientRecvStatus(context_, &status); call_.PerformOps(&ops); - GPR_ASSERT(cq_.Pluck(&ops)); + GPR_CODEGEN_ASSERT(cq_.Pluck(&ops)); return status; } @@ -194,7 +196,7 @@ class ClientWriter : public ClientWriterInterface { } void WaitForInitialMetadata() { - GPR_ASSERT(!context_->initial_metadata_received_); + GPR_CODEGEN_ASSERT(!context_->initial_metadata_received_); CallOpSet ops; ops.RecvInitialMetadata(context_); @@ -227,14 +229,15 @@ class ClientWriter : public ClientWriterInterface { } finish_ops_.ClientRecvStatus(context_, &status); call_.PerformOps(&finish_ops_); - GPR_ASSERT(cq_.Pluck(&finish_ops_)); + GPR_CODEGEN_ASSERT(cq_.Pluck(&finish_ops_)); return status; } private: ClientContext* context_; CallOpSet finish_ops_; + CallOpClientRecvStatus> + finish_ops_; CompletionQueue cq_; Call call_; }; @@ -271,7 +274,7 @@ class ClientReaderWriter GRPC_FINAL : public ClientReaderWriterInterface { } void WaitForInitialMetadata() GRPC_OVERRIDE { - GPR_ASSERT(!context_->initial_metadata_received_); + GPR_CODEGEN_ASSERT(!context_->initial_metadata_received_); CallOpSet ops; ops.RecvInitialMetadata(context_); @@ -312,7 +315,7 @@ class ClientReaderWriter GRPC_FINAL : public ClientReaderWriterInterface { Status status; ops.ClientRecvStatus(context_, &status); call_.PerformOps(&ops); - GPR_ASSERT(cq_.Pluck(&ops)); + GPR_CODEGEN_ASSERT(cq_.Pluck(&ops)); return status; } @@ -328,7 +331,7 @@ class ServerReader GRPC_FINAL : public ReaderInterface { ServerReader(Call* call, ServerContext* ctx) : call_(call), ctx_(ctx) {} void SendInitialMetadata() { - GPR_ASSERT(!ctx_->sent_initial_metadata_); + GPR_CODEGEN_ASSERT(!ctx_->sent_initial_metadata_); CallOpSet ops; ops.SendInitialMetadata(ctx_->initial_metadata_); @@ -355,7 +358,7 @@ class ServerWriter GRPC_FINAL : public WriterInterface { ServerWriter(Call* call, ServerContext* ctx) : call_(call), ctx_(ctx) {} void SendInitialMetadata() { - GPR_ASSERT(!ctx_->sent_initial_metadata_); + GPR_CODEGEN_ASSERT(!ctx_->sent_initial_metadata_); CallOpSet ops; ops.SendInitialMetadata(ctx_->initial_metadata_); @@ -391,7 +394,7 @@ class ServerReaderWriter GRPC_FINAL : public WriterInterface, ServerReaderWriter(Call* call, ServerContext* ctx) : call_(call), ctx_(ctx) {} void SendInitialMetadata() { - GPR_ASSERT(!ctx_->sent_initial_metadata_); + GPR_CODEGEN_ASSERT(!ctx_->sent_initial_metadata_); CallOpSet ops; ops.SendInitialMetadata(ctx_->initial_metadata_); diff --git a/include/grpc++/impl/grpc_library.h b/include/grpc++/impl/grpc_library.h index e8a075f5ebb..ecb5a4d64d2 100644 --- a/include/grpc++/impl/grpc_library.h +++ b/include/grpc++/impl/grpc_library.h @@ -40,21 +40,31 @@ #include #include +#include "src/cpp/common/core_codegen.h" + namespace grpc { namespace internal { class GrpcLibrary GRPC_FINAL : public GrpcLibraryInterface { public: void init() GRPC_OVERRIDE { grpc_init(); } - void shutdown() GRPC_OVERRIDE { grpc_shutdown(); } }; static GrpcLibrary g_gli; +static CoreCodegen g_core_codegen; +/// Instantiating this class ensures the proper initialization of gRPC. class GrpcLibraryInitializer GRPC_FINAL { public: - GrpcLibraryInitializer() { grpc::g_glip = &g_gli; } + GrpcLibraryInitializer() { + if (grpc::g_glip == nullptr) { + grpc::g_glip = &g_gli; + } + if (grpc::g_core_codegen_interface == nullptr) { + grpc::g_core_codegen_interface = &g_core_codegen; + } + } /// A no-op method to force the linker to reference this class, which will /// take care of initializing and shutting down the gRPC runtime. diff --git a/include/grpc++/impl/proto_utils.h b/include/grpc++/impl/proto_utils.h index 9124001e207..36acabba799 100644 --- a/include/grpc++/impl/proto_utils.h +++ b/include/grpc++/impl/proto_utils.h @@ -31,9 +31,9 @@ * */ -#ifndef GRPC_INTERNAL_CPP_PROTO_PROTO_UTILS_H -#define GRPC_INTERNAL_CPP_PROTO_PROTO_UTILS_H +#ifndef GRPCXX_IMPL_PROTO_UTILS_H +#define GRPCXX_IMPL_PROTO_UTILS_H #include -#endif // GRPC_INTERNAL_CPP_PROTO_PROTO_UTILS_H +#endif // GRPCXX_IMPL_PROTO_UTILS_H diff --git a/include/grpc++/security/auth_context.h b/include/grpc++/security/auth_context.h index bca8fa7c0cc..548f9a236c5 100644 --- a/include/grpc++/security/auth_context.h +++ b/include/grpc++/security/auth_context.h @@ -31,9 +31,9 @@ * */ -#ifndef GRPCXX_SUPPORT_AUTH_CONTEXT_H -#define GRPCXX_SUPPORT_AUTH_CONTEXT_H +#ifndef GRPCXX_SECURITY_AUTH_CONTEXT_H +#define GRPCXX_SECURITY_AUTH_CONTEXT_H #include -#endif // GRPCXX_SUPPORT_AUTH_CONTEXT_H +#endif // GRPCXX_SECURITY_AUTH_CONTEXT_H diff --git a/include/grpc++/security/auth_metadata_processor.h b/include/grpc++/security/auth_metadata_processor.h index 25011f33baf..b39451f83e3 100644 --- a/include/grpc++/security/auth_metadata_processor.h +++ b/include/grpc++/security/auth_metadata_processor.h @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,8 +31,8 @@ * */ -#ifndef GRPCXX_AUTH_METADATA_PROCESSOR_H_ -#define GRPCXX_AUTH_METADATA_PROCESSOR_H_ +#ifndef GRPCXX_SECURITY_AUTH_METADATA_PROCESSOR_H +#define GRPCXX_SECURITY_AUTH_METADATA_PROCESSOR_H #include @@ -70,4 +70,4 @@ class AuthMetadataProcessor { } // namespace grpc -#endif // GRPCXX_AUTH_METADATA_PROCESSOR_H_ +#endif // GRPCXX_SECURITY_AUTH_METADATA_PROCESSOR_H diff --git a/include/grpc++/security/credentials.h b/include/grpc++/security/credentials.h index e0806c0b7b4..bedfc9c2a22 100644 --- a/include/grpc++/security/credentials.h +++ b/include/grpc++/security/credentials.h @@ -31,8 +31,8 @@ * */ -#ifndef GRPCXX_CREDENTIALS_H -#define GRPCXX_CREDENTIALS_H +#ifndef GRPCXX_SECURITY_CREDENTIALS_H +#define GRPCXX_SECURITY_CREDENTIALS_H #include #include @@ -57,7 +57,7 @@ class SecureCallCredentials; /// for all the calls on that channel. /// /// \see http://www.grpc.io/docs/guides/auth.html -class ChannelCredentials : private GrpcLibrary { +class ChannelCredentials : private GrpcLibraryCodegen { public: ChannelCredentials(); ~ChannelCredentials(); @@ -83,7 +83,7 @@ class ChannelCredentials : private GrpcLibrary { /// authenticate with a server for a given call on a channel. /// /// \see http://www.grpc.io/docs/guides/auth.html -class CallCredentials : private GrpcLibrary { +class CallCredentials : private GrpcLibraryCodegen { public: CallCredentials(); ~CallCredentials(); @@ -229,4 +229,4 @@ std::shared_ptr MetadataCredentialsFromPlugin( } // namespace grpc -#endif // GRPCXX_CREDENTIALS_H +#endif // GRPCXX_SECURITY_CREDENTIALS_H diff --git a/include/grpc++/security/server_credentials.h b/include/grpc++/security/server_credentials.h index e933825ec37..addb11ccb46 100644 --- a/include/grpc++/security/server_credentials.h +++ b/include/grpc++/security/server_credentials.h @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,8 +31,8 @@ * */ -#ifndef GRPCXX_SERVER_CREDENTIALS_H -#define GRPCXX_SERVER_CREDENTIALS_H +#ifndef GRPCXX_SECURITY_SERVER_CREDENTIALS_H +#define GRPCXX_SECURITY_SERVER_CREDENTIALS_H #include #include @@ -89,4 +89,4 @@ std::shared_ptr InsecureServerCredentials(); } // namespace grpc -#endif // GRPCXX_SERVER_CREDENTIALS_H +#endif // GRPCXX_SECURITY_SERVER_CREDENTIALS_H diff --git a/include/grpc++/server.h b/include/grpc++/server.h index c177805236b..9eb8c287e19 100644 --- a/include/grpc++/server.h +++ b/include/grpc++/server.h @@ -62,7 +62,7 @@ class ThreadPoolInterface; /// Models a gRPC server. /// /// Servers are configured and started via \a grpc::ServerBuilder. -class Server GRPC_FINAL : public ServerInterface, private GrpcLibrary { +class Server GRPC_FINAL : public ServerInterface, private GrpcLibraryCodegen { public: ~Server(); diff --git a/include/grpc++/support/byte_buffer.h b/include/grpc++/support/byte_buffer.h index 82591a88ef2..3825518de1f 100644 --- a/include/grpc++/support/byte_buffer.h +++ b/include/grpc++/support/byte_buffer.h @@ -34,13 +34,13 @@ #ifndef GRPCXX_SUPPORT_BYTE_BUFFER_H #define GRPCXX_SUPPORT_BYTE_BUFFER_H -#include -#include -#include #include #include #include #include +#include +#include +#include #include @@ -99,8 +99,8 @@ class SerializationTraits { } static Status Serialize(const ByteBuffer& source, grpc_byte_buffer** buffer, bool* own_buffer) { - *buffer = source.buffer(); - *own_buffer = false; + *buffer = grpc_byte_buffer_copy(source.buffer()); + *own_buffer = true; return Status::OK; } }; diff --git a/include/grpc++/support/channel_arguments.h b/include/grpc++/support/channel_arguments.h index a9ede35f903..8c2f7c71eb9 100644 --- a/include/grpc++/support/channel_arguments.h +++ b/include/grpc++/support/channel_arguments.h @@ -34,12 +34,12 @@ #ifndef GRPCXX_SUPPORT_CHANNEL_ARGUMENTS_H #define GRPCXX_SUPPORT_CHANNEL_ARGUMENTS_H -#include #include +#include +#include #include #include -#include namespace grpc { namespace testing { diff --git a/include/grpc++/support/slice.h b/include/grpc++/support/slice.h index 724691a0333..6251a8bcde1 100644 --- a/include/grpc++/support/slice.h +++ b/include/grpc++/support/slice.h @@ -34,8 +34,8 @@ #ifndef GRPCXX_SUPPORT_SLICE_H #define GRPCXX_SUPPORT_SLICE_H -#include #include +#include namespace grpc { diff --git a/include/grpc/byte_buffer_reader.h b/include/grpc/byte_buffer_reader.h index b0e63a6da2b..600bd3810a3 100644 --- a/include/grpc/byte_buffer_reader.h +++ b/include/grpc/byte_buffer_reader.h @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -34,8 +34,8 @@ #ifndef GRPC_BYTE_BUFFER_READER_H #define GRPC_BYTE_BUFFER_READER_H -#include #include +#include #ifdef __cplusplus extern "C" { diff --git a/include/grpc/census.h b/include/grpc/census.h index 442a754f0a4..4ccf4af5fe5 100644 --- a/include/grpc/census.h +++ b/include/grpc/census.h @@ -35,8 +35,8 @@ * they can (ultimately) be used in many different RPC systems (with differing * implementations). */ -#ifndef CENSUS_CENSUS_H -#define CENSUS_CENSUS_H +#ifndef GRPC_CENSUS_H +#define GRPC_CENSUS_H #include @@ -537,4 +537,4 @@ CENSUSAPI void census_view_reset(census_view *view); } #endif -#endif /* CENSUS_CENSUS_H */ +#endif /* GRPC_CENSUS_H */ diff --git a/include/grpc/compression.h b/include/grpc/compression.h index acc168a6eef..39023ded349 100644 --- a/include/grpc/compression.h +++ b/include/grpc/compression.h @@ -36,8 +36,8 @@ #include -#include #include +#include #ifdef __cplusplus extern "C" { @@ -55,11 +55,12 @@ GRPCAPI int grpc_compression_algorithm_parse( GRPCAPI int grpc_compression_algorithm_name( grpc_compression_algorithm algorithm, char **name); -/** Returns the compression algorithm corresponding to \a level. +/** Returns the compression algorithm corresponding to \a level for the + * compression algorithms encoded in the \a accepted_encodings bitset. * * It abort()s for unknown levels . */ -GRPCAPI grpc_compression_algorithm -grpc_compression_algorithm_for_level(grpc_compression_level level); +GRPCAPI grpc_compression_algorithm grpc_compression_algorithm_for_level( + grpc_compression_level level, uint32_t accepted_encodings); GRPCAPI void grpc_compression_options_init(grpc_compression_options *opts); diff --git a/include/grpc/grpc.h b/include/grpc/grpc.h index 5113645daf9..fe0cf28b3b3 100644 --- a/include/grpc/grpc.h +++ b/include/grpc/grpc.h @@ -36,13 +36,13 @@ #include -#include #include -#include -#include #include -#include #include +#include +#include +#include +#include #ifdef __cplusplus extern "C" { @@ -154,9 +154,8 @@ GRPCAPI void grpc_alarm_cancel(grpc_alarm *alarm); GRPCAPI void grpc_alarm_destroy(grpc_alarm *alarm); /** Check the connectivity state of a channel. */ -GRPCAPI grpc_connectivity_state -grpc_channel_check_connectivity_state(grpc_channel *channel, - int try_to_connect); +GRPCAPI grpc_connectivity_state grpc_channel_check_connectivity_state( + grpc_channel *channel, int try_to_connect); /** Watch for a change in connectivity state. Once the channel connectivity state is different from last_observed_state, @@ -267,9 +266,10 @@ GRPCAPI grpc_call_error grpc_call_cancel(grpc_call *call, void *reserved); and description passed in. Importantly, this function does not send status nor description to the remote endpoint. */ -GRPCAPI grpc_call_error -grpc_call_cancel_with_status(grpc_call *call, grpc_status_code status, - const char *description, void *reserved); +GRPCAPI grpc_call_error grpc_call_cancel_with_status(grpc_call *call, + grpc_status_code status, + const char *description, + void *reserved); /** Destroy a call. THREAD SAFETY: grpc_call_destroy is thread-compatible */ @@ -283,13 +283,11 @@ GRPCAPI void grpc_call_destroy(grpc_call *call); to \a cq_bound_to_call. Note that \a cq_for_notification must have been registered to the server via \a grpc_server_register_completion_queue. */ -GRPCAPI grpc_call_error -grpc_server_request_call(grpc_server *server, grpc_call **call, - grpc_call_details *details, - grpc_metadata_array *request_metadata, - grpc_completion_queue *cq_bound_to_call, - grpc_completion_queue *cq_for_notification, - void *tag_new); +GRPCAPI grpc_call_error grpc_server_request_call( + grpc_server *server, grpc_call **call, grpc_call_details *details, + grpc_metadata_array *request_metadata, + grpc_completion_queue *cq_bound_to_call, + grpc_completion_queue *cq_for_notification, void *tag_new); /** Registers a method in the server. Methods to this (host, method) pair will not be reported by diff --git a/include/grpc/grpc_security.h b/include/grpc/grpc_security.h index ef7205ded8b..f2d04e551ad 100644 --- a/include/grpc/grpc_security.h +++ b/include/grpc/grpc_security.h @@ -48,6 +48,7 @@ extern "C" { #define GRPC_X509_CN_PROPERTY_NAME "x509_common_name" #define GRPC_X509_SAN_PROPERTY_NAME "x509_subject_alternative_name" +#define GRPC_X509_PEM_CERT_PROPERTY_NAME "x509_pem_cert" typedef struct grpc_auth_context grpc_auth_context; @@ -79,9 +80,8 @@ grpc_auth_context_peer_identity(const grpc_auth_context *ctx); /* Finds a property in the context. May return an empty iterator (first _next will return NULL) if no property with this name was found in the context. */ -GRPCAPI grpc_auth_property_iterator -grpc_auth_context_find_properties_by_name(const grpc_auth_context *ctx, - const char *name); +GRPCAPI grpc_auth_property_iterator grpc_auth_context_find_properties_by_name( + const grpc_auth_context *ctx, const char *name); /* Gets the name of the property that indicates the peer identity. Will return NULL if the peer is not authenticated. */ @@ -362,8 +362,8 @@ GRPCAPI int grpc_server_add_secure_http2_port(grpc_server *server, /* Sets a credentials to a call. Can only be called on the client side before grpc_call_start_batch. */ -GRPCAPI grpc_call_error -grpc_call_set_credentials(grpc_call *call, grpc_call_credentials *creds); +GRPCAPI grpc_call_error grpc_call_set_credentials(grpc_call *call, + grpc_call_credentials *creds); /* --- Auth Metadata Processing --- */ diff --git a/include/grpc/impl/codegen/log.h b/include/grpc/impl/codegen/log.h index d6e18e9ca5f..afd8c5d4cf9 100644 --- a/include/grpc/impl/codegen/log.h +++ b/include/grpc/impl/codegen/log.h @@ -34,8 +34,8 @@ #ifndef GRPC_IMPL_CODEGEN_LOG_H #define GRPC_IMPL_CODEGEN_LOG_H -#include /* for abort() */ #include +#include /* for abort() */ #include diff --git a/include/grpc/impl/codegen/port_platform.h b/include/grpc/impl/codegen/port_platform.h index 92569043fcc..607511edc88 100644 --- a/include/grpc/impl/codegen/port_platform.h +++ b/include/grpc/impl/codegen/port_platform.h @@ -133,6 +133,9 @@ #define GPR_POSIX_TIME 1 #define GPR_GETPID_IN_UNISTD_H 1 #define GPR_HAVE_MSG_NOSIGNAL 1 +#define GPR_HAVE_UNIX_SOCKET 1 +#define GPR_HAVE_IP_PKTINFO 1 +#define GPR_HAVE_IPV6_RECVPKTINFO 1 #elif defined(__linux__) #define GPR_POSIX_CRASH_HANDLER 1 #define GPR_PLATFORM_STRING "linux" @@ -154,6 +157,9 @@ #define GPR_POSIX_WAKEUP_FD 1 #define GPR_POSIX_SOCKET 1 #define GPR_POSIX_SOCKETADDR 1 +#define GPR_HAVE_UNIX_SOCKET 1 +#define GPR_HAVE_IP_PKTINFO 1 +#define GPR_HAVE_IPV6_RECVPKTINFO 1 #ifdef __GLIBC_PREREQ #if __GLIBC_PREREQ(2, 9) #define GPR_LINUX_EVENTFD 1 @@ -214,6 +220,8 @@ #define GPR_POSIX_TIME 1 #define GPR_GETPID_IN_UNISTD_H 1 #define GPR_HAVE_SO_NOSIGPIPE 1 +#define GPR_HAVE_UNIX_SOCKET 1 +#define GPR_HAVE_IP_PKTINFO 1 #ifdef _LP64 #define GPR_ARCH_64 1 #else /* _LP64 */ @@ -242,13 +250,49 @@ #define GPR_POSIX_TIME 1 #define GPR_GETPID_IN_UNISTD_H 1 #define GPR_HAVE_SO_NOSIGPIPE 1 +#define GPR_HAVE_UNIX_SOCKET 1 +#define GPR_HAVE_IP_PKTINFO 1 +#define GPR_HAVE_IPV6_RECVPKTINFO 1 +#ifdef _LP64 +#define GPR_ARCH_64 1 +#else /* _LP64 */ +#define GPR_ARCH_32 1 +#endif /* _LP64 */ +#elif defined(__native_client__) +#define GPR_PLATFORM_STRING "nacl" +#ifndef _BSD_SOURCE +#define _BSD_SOURCE +#endif +#ifndef _DEFAULT_SOURCE +#define _DEFAULT_SOURCE +#endif +#ifndef _GNU_SOURCE +#define _GNU_SOURCE +#endif +#define GPR_CPU_POSIX 1 +#define GPR_GCC_ATOMIC 1 +#define GPR_GCC_TLS 1 +#define GPR_POSIX_LOG 1 +#define GPR_POSIX_MULTIPOLL_WITH_POLL 1 +#define GPR_POSIX_WAKEUP_FD 1 +#define GPR_POSIX_NO_SPECIAL_WAKEUP_FD 1 +#define GPR_POSIX_SOCKET 1 +#define GPR_POSIX_SOCKETADDR 1 +#define GPR_POSIX_SOCKETUTILS 1 +#define GPR_POSIX_ENV 1 +#define GPR_POSIX_FILE 1 +#define GPR_POSIX_STRING 1 +#define GPR_POSIX_SUBPROCESS 1 +#define GPR_POSIX_SYNC 1 +#define GPR_POSIX_TIME 1 +#define GPR_GETPID_IN_UNISTD_H 1 #ifdef _LP64 #define GPR_ARCH_64 1 #else /* _LP64 */ #define GPR_ARCH_32 1 #endif /* _LP64 */ #else -#error Could not auto-detect platform +#error "Could not auto-detect platform" #endif #endif /* GPR_NO_AUTODETECT_PLATFORM */ diff --git a/include/grpc/impl/codegen/propagation_bits.h b/include/grpc/impl/codegen/propagation_bits.h index cdd699710c2..4b645587648 100644 --- a/include/grpc/impl/codegen/propagation_bits.h +++ b/include/grpc/impl/codegen/propagation_bits.h @@ -31,8 +31,8 @@ * */ -#ifndef GRPC_IMPL_CODEGEN_H -#define GRPC_IMPL_CODEGEN_H +#ifndef GRPC_IMPL_CODEGEN_PROPAGATION_BITS_H +#define GRPC_IMPL_CODEGEN_PROPAGATION_BITS_H #include @@ -64,4 +64,4 @@ extern "C" { } #endif -#endif /* GRPC_IMPL_CODEGEN_H */ +#endif /* GRPC_IMPL_CODEGEN_PROPAGATION_BITS_H */ diff --git a/include/grpc/impl/codegen/slice.h b/include/grpc/impl/codegen/slice.h index a62fdd087bc..03c59e72a0f 100644 --- a/include/grpc/impl/codegen/slice.h +++ b/include/grpc/impl/codegen/slice.h @@ -122,8 +122,8 @@ GPRAPI gpr_slice gpr_slice_new(void *p, size_t len, void (*destroy)(void *)); /* Equivalent to gpr_slice_new, but with a two argument destroy function that also takes the slice length. */ -GPRAPI gpr_slice -gpr_slice_new_with_len(void *p, size_t len, void (*destroy)(void *, size_t)); +GPRAPI gpr_slice gpr_slice_new_with_len(void *p, size_t len, + void (*destroy)(void *, size_t)); /* Equivalent to gpr_slice_new(malloc(len), len, free), but saves one malloc() call. diff --git a/include/grpc/impl/codegen/slice_buffer.h b/include/grpc/impl/codegen/slice_buffer.h index 4fe909ee82a..71918784963 100644 --- a/include/grpc/impl/codegen/slice_buffer.h +++ b/include/grpc/impl/codegen/slice_buffer.h @@ -73,8 +73,8 @@ GPRAPI void gpr_slice_buffer_add(gpr_slice_buffer *sb, gpr_slice slice); slice at the returned index in sb->slices) The implementation MAY decide to concatenate data at the end of a small slice added in this fashion. */ -GPRAPI size_t -gpr_slice_buffer_add_indexed(gpr_slice_buffer *sb, gpr_slice slice); +GPRAPI size_t gpr_slice_buffer_add_indexed(gpr_slice_buffer *sb, + gpr_slice slice); GPRAPI void gpr_slice_buffer_addn(gpr_slice_buffer *sb, gpr_slice *slices, size_t n); /* add a very small (less than 8 bytes) amount of data to the end of a slice diff --git a/include/grpc/impl/codegen/time.h b/include/grpc/impl/codegen/time.h index c22bedfe77c..b4f45097c7c 100644 --- a/include/grpc/impl/codegen/time.h +++ b/include/grpc/impl/codegen/time.h @@ -88,8 +88,8 @@ GPRAPI void gpr_time_init(void); GPRAPI gpr_timespec gpr_now(gpr_clock_type clock); /* Convert a timespec from one clock to another */ -GPRAPI gpr_timespec -gpr_convert_clock_type(gpr_timespec t, gpr_clock_type target_clock); +GPRAPI gpr_timespec gpr_convert_clock_type(gpr_timespec t, + gpr_clock_type target_clock); /* Return -ve, 0, or +ve according to whether a < b, a == b, or a > b respectively. */ diff --git a/include/grpc/support/atm_gcc_atomic.h b/include/grpc/support/atm_gcc_atomic.h index 7e1f7fd55a5..2fc8f609a5a 100644 --- a/include/grpc/support/atm_gcc_atomic.h +++ b/include/grpc/support/atm_gcc_atomic.h @@ -31,9 +31,9 @@ * */ -#ifndef GRPC_IMPL_CODEGEN_ATM_GCC_ATOMIC_H -#define GRPC_IMPL_CODEGEN_ATM_GCC_ATOMIC_H +#ifndef GRPC_SUPPORT_ATM_GCC_ATOMIC_H +#define GRPC_SUPPORT_ATM_GCC_ATOMIC_H #include -#endif /* GRPC_IMPL_CODEGEN_ATM_GCC_ATOMIC_H */ +#endif /* GRPC_SUPPORT_ATM_GCC_ATOMIC_H */ diff --git a/include/grpc/support/subprocess.h b/include/grpc/support/subprocess.h index 6a4946014be..e013b706ec0 100644 --- a/include/grpc/support/subprocess.h +++ b/include/grpc/support/subprocess.h @@ -56,4 +56,4 @@ GPRAPI void gpr_subprocess_interrupt(gpr_subprocess *p); } // extern "C" #endif -#endif +#endif /* GRPC_SUPPORT_SUBPROCESS_H */ diff --git a/include/grpc/support/tls.h b/include/grpc/support/tls.h index 43addc7f145..0ff19bbaddd 100644 --- a/include/grpc/support/tls.h +++ b/include/grpc/support/tls.h @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -74,4 +74,4 @@ #include #endif -#endif +#endif /* GRPC_SUPPORT_TLS_H */ diff --git a/include/grpc/support/tls_gcc.h b/include/grpc/support/tls_gcc.h index a697ad05b0b..21269e4b141 100644 --- a/include/grpc/support/tls_gcc.h +++ b/include/grpc/support/tls_gcc.h @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -34,9 +34,51 @@ #ifndef GRPC_SUPPORT_TLS_GCC_H #define GRPC_SUPPORT_TLS_GCC_H +#include + +#include + /* Thread local storage based on gcc compiler primitives. #include tls.h to use this - and see that file for documentation */ +#ifndef NDEBUG + +struct gpr_gcc_thread_local { + intptr_t value; + bool *inited; +}; + +#define GPR_TLS_DECL(name) \ + static bool name##_inited = false; \ + static __thread struct gpr_gcc_thread_local name = {0, &(name##_inited)} + +#define gpr_tls_init(tls) \ + do { \ + GPR_ASSERT(*((tls)->inited) == false); \ + *((tls)->inited) = true; \ + } while (0) + +/* It is allowed to call gpr_tls_init after gpr_tls_destroy is called. */ +#define gpr_tls_destroy(tls) \ + do { \ + GPR_ASSERT(*((tls)->inited)); \ + *((tls)->inited) = false; \ + } while (0) + +#define gpr_tls_set(tls, new_value) \ + do { \ + GPR_ASSERT(*((tls)->inited)); \ + (tls)->value = (new_value); \ + } while (0) + +#define gpr_tls_get(tls) \ + ({ \ + GPR_ASSERT(*((tls)->inited)); \ + (tls)->value; \ + }) + +#else /* NDEBUG */ + struct gpr_gcc_thread_local { intptr_t value; }; @@ -53,4 +95,6 @@ struct gpr_gcc_thread_local { #define gpr_tls_set(tls, new_value) (((tls)->value) = (new_value)) #define gpr_tls_get(tls) ((tls)->value) -#endif +#endif /* NDEBUG */ + +#endif /* GRPC_SUPPORT_TLS_GCC_H */ diff --git a/include/grpc/support/tls_msvc.h b/include/grpc/support/tls_msvc.h index 987a514f037..751ec35f73b 100644 --- a/include/grpc/support/tls_msvc.h +++ b/include/grpc/support/tls_msvc.h @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,8 +31,8 @@ * */ -#ifndef GRPC_SUPPORT_TLS_GCC_H -#define GRPC_SUPPORT_TLS_GCC_H +#ifndef GRPC_SUPPORT_TLS_MSVC_H +#define GRPC_SUPPORT_TLS_MSVC_H /* Thread local storage based on ms visual c compiler primitives. #include tls.h to use this - and see that file for documentation */ @@ -53,4 +53,4 @@ struct gpr_msvc_thread_local { #define gpr_tls_set(tls, new_value) (((tls)->value) = (new_value)) #define gpr_tls_get(tls) ((tls)->value) -#endif +#endif /* GRPC_SUPPORT_TLS_MSVC_H */ diff --git a/include/grpc/support/tls_pthread.h b/include/grpc/support/tls_pthread.h index 699ee6b1d38..93ba7822c3a 100644 --- a/include/grpc/support/tls_pthread.h +++ b/include/grpc/support/tls_pthread.h @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -57,4 +57,4 @@ intptr_t gpr_tls_set(struct gpr_pthread_thread_local *tls, intptr_t value); } #endif -#endif +#endif /* GRPC_SUPPORT_TLS_PTHREAD_H */ diff --git a/package.json b/package.json index db7f299e136..4da7c708f0b 100644 --- a/package.json +++ b/package.json @@ -27,6 +27,7 @@ }, "bundledDependencies": ["node-pre-gyp"], "dependencies": { + "arguejs": "^0.2.3", "lodash": "^3.9.3", "nan": "^2.0.0", "protobufjs": "^4.0.0" @@ -86,6 +87,11 @@ "src/node/src/grpc_extension.js", "src/node/src/metadata.js", "src/node/src/server.js", + "include/grpc/byte_buffer.h", + "include/grpc/byte_buffer_reader.h", + "include/grpc/census.h", + "include/grpc/compression.h", + "include/grpc/grpc.h", "include/grpc/grpc_security.h", "include/grpc/impl/codegen/byte_buffer.h", "include/grpc/impl/codegen/compression_types.h", @@ -93,305 +99,309 @@ "include/grpc/impl/codegen/grpc_types.h", "include/grpc/impl/codegen/propagation_bits.h", "include/grpc/impl/codegen/status.h", - "include/grpc/byte_buffer.h", - "include/grpc/byte_buffer_reader.h", - "include/grpc/compression.h", - "include/grpc/grpc.h", "include/grpc/status.h", - "include/grpc/census.h", - "src/core/census/grpc_filter.h", - "src/core/channel/channel_args.h", - "src/core/channel/channel_stack.h", - "src/core/channel/client_channel.h", - "src/core/channel/client_uchannel.h", - "src/core/channel/compress_filter.h", - "src/core/channel/connected_channel.h", - "src/core/channel/context.h", - "src/core/channel/http_client_filter.h", - "src/core/channel/http_server_filter.h", - "src/core/channel/subchannel_call_holder.h", - "src/core/client_config/client_config.h", - "src/core/client_config/connector.h", - "src/core/client_config/initial_connect_string.h", - "src/core/client_config/lb_policies/load_balancer_api.h", - "src/core/client_config/lb_policies/pick_first.h", - "src/core/client_config/lb_policies/round_robin.h", - "src/core/client_config/lb_policy.h", - "src/core/client_config/lb_policy_factory.h", - "src/core/client_config/lb_policy_registry.h", - "src/core/client_config/resolver.h", - "src/core/client_config/resolver_factory.h", - "src/core/client_config/resolver_registry.h", - "src/core/client_config/resolvers/dns_resolver.h", - "src/core/client_config/resolvers/sockaddr_resolver.h", - "src/core/client_config/subchannel.h", - "src/core/client_config/subchannel_factory.h", - "src/core/client_config/subchannel_index.h", - "src/core/client_config/uri_parser.h", - "src/core/compression/algorithm_metadata.h", - "src/core/compression/message_compress.h", - "src/core/debug/trace.h", - "src/core/httpcli/format_request.h", - "src/core/httpcli/httpcli.h", - "src/core/httpcli/parser.h", - "src/core/iomgr/closure.h", - "src/core/iomgr/endpoint.h", - "src/core/iomgr/endpoint_pair.h", - "src/core/iomgr/exec_ctx.h", - "src/core/iomgr/executor.h", - "src/core/iomgr/fd_posix.h", - "src/core/iomgr/iocp_windows.h", - "src/core/iomgr/iomgr.h", - "src/core/iomgr/iomgr_internal.h", - "src/core/iomgr/iomgr_posix.h", - "src/core/iomgr/pollset.h", - "src/core/iomgr/pollset_posix.h", - "src/core/iomgr/pollset_set.h", - "src/core/iomgr/pollset_set_posix.h", - "src/core/iomgr/pollset_set_windows.h", - "src/core/iomgr/pollset_windows.h", - "src/core/iomgr/resolve_address.h", - "src/core/iomgr/sockaddr.h", - "src/core/iomgr/sockaddr_posix.h", - "src/core/iomgr/sockaddr_utils.h", - "src/core/iomgr/sockaddr_win32.h", - "src/core/iomgr/socket_utils_posix.h", - "src/core/iomgr/socket_windows.h", - "src/core/iomgr/tcp_client.h", - "src/core/iomgr/tcp_posix.h", - "src/core/iomgr/tcp_server.h", - "src/core/iomgr/tcp_windows.h", - "src/core/iomgr/time_averaged_stats.h", - "src/core/iomgr/timer.h", - "src/core/iomgr/timer_heap.h", - "src/core/iomgr/udp_server.h", - "src/core/iomgr/wakeup_fd_pipe.h", - "src/core/iomgr/wakeup_fd_posix.h", - "src/core/iomgr/workqueue.h", - "src/core/iomgr/workqueue_posix.h", - "src/core/iomgr/workqueue_windows.h", - "src/core/json/json.h", - "src/core/json/json_common.h", - "src/core/json/json_reader.h", - "src/core/json/json_writer.h", - "src/core/proto/grpc/lb/v0/load_balancer.pb.h", - "src/core/statistics/census_interface.h", - "src/core/statistics/census_rpc_stats.h", - "src/core/surface/api_trace.h", - "src/core/surface/call.h", - "src/core/surface/call_test_only.h", - "src/core/surface/channel.h", - "src/core/surface/completion_queue.h", - "src/core/surface/event_string.h", - "src/core/surface/init.h", - "src/core/surface/server.h", - "src/core/surface/surface_trace.h", - "src/core/transport/byte_stream.h", - "src/core/transport/chttp2/alpn.h", - "src/core/transport/chttp2/bin_encoder.h", - "src/core/transport/chttp2/frame.h", - "src/core/transport/chttp2/frame_data.h", - "src/core/transport/chttp2/frame_goaway.h", - "src/core/transport/chttp2/frame_ping.h", - "src/core/transport/chttp2/frame_rst_stream.h", - "src/core/transport/chttp2/frame_settings.h", - "src/core/transport/chttp2/frame_window_update.h", - "src/core/transport/chttp2/hpack_encoder.h", - "src/core/transport/chttp2/hpack_parser.h", - "src/core/transport/chttp2/hpack_table.h", - "src/core/transport/chttp2/http2_errors.h", - "src/core/transport/chttp2/huffsyms.h", - "src/core/transport/chttp2/incoming_metadata.h", - "src/core/transport/chttp2/internal.h", - "src/core/transport/chttp2/status_conversion.h", - "src/core/transport/chttp2/stream_map.h", - "src/core/transport/chttp2/timeout_encoding.h", - "src/core/transport/chttp2/varint.h", - "src/core/transport/chttp2_transport.h", - "src/core/transport/connectivity_state.h", - "src/core/transport/metadata.h", - "src/core/transport/metadata_batch.h", - "src/core/transport/static_metadata.h", - "src/core/transport/transport.h", - "src/core/transport/transport_impl.h", - "src/core/security/auth_filters.h", - "src/core/security/b64.h", - "src/core/security/credentials.h", - "src/core/security/handshake.h", - "src/core/security/json_token.h", - "src/core/security/jwt_verifier.h", - "src/core/security/secure_endpoint.h", - "src/core/security/security_connector.h", - "src/core/security/security_context.h", - "src/core/tsi/fake_transport_security.h", - "src/core/tsi/ssl_transport_security.h", - "src/core/tsi/ssl_types.h", - "src/core/tsi/transport_security.h", - "src/core/tsi/transport_security_interface.h", - "src/core/census/aggregation.h", - "src/core/census/mlog.h", - "src/core/census/rpc_metric_id.h", + "src/core/ext/transport/chttp2/transport/alpn.h", + "src/core/ext/transport/chttp2/transport/bin_encoder.h", + "src/core/ext/transport/chttp2/transport/chttp2_transport.h", + "src/core/ext/transport/chttp2/transport/frame.h", + "src/core/ext/transport/chttp2/transport/frame_data.h", + "src/core/ext/transport/chttp2/transport/frame_goaway.h", + "src/core/ext/transport/chttp2/transport/frame_ping.h", + "src/core/ext/transport/chttp2/transport/frame_rst_stream.h", + "src/core/ext/transport/chttp2/transport/frame_settings.h", + "src/core/ext/transport/chttp2/transport/frame_window_update.h", + "src/core/ext/transport/chttp2/transport/hpack_encoder.h", + "src/core/ext/transport/chttp2/transport/hpack_parser.h", + "src/core/ext/transport/chttp2/transport/hpack_table.h", + "src/core/ext/transport/chttp2/transport/http2_errors.h", + "src/core/ext/transport/chttp2/transport/huffsyms.h", + "src/core/ext/transport/chttp2/transport/incoming_metadata.h", + "src/core/ext/transport/chttp2/transport/internal.h", + "src/core/ext/transport/chttp2/transport/status_conversion.h", + "src/core/ext/transport/chttp2/transport/stream_map.h", + "src/core/ext/transport/chttp2/transport/timeout_encoding.h", + "src/core/ext/transport/chttp2/transport/varint.h", + "src/core/lib/census/aggregation.h", + "src/core/lib/census/grpc_filter.h", + "src/core/lib/census/grpc_plugin.h", + "src/core/lib/census/mlog.h", + "src/core/lib/census/rpc_metric_id.h", + "src/core/lib/channel/channel_args.h", + "src/core/lib/channel/channel_stack.h", + "src/core/lib/channel/channel_stack_builder.h", + "src/core/lib/channel/client_channel.h", + "src/core/lib/channel/compress_filter.h", + "src/core/lib/channel/connected_channel.h", + "src/core/lib/channel/context.h", + "src/core/lib/channel/http_client_filter.h", + "src/core/lib/channel/http_server_filter.h", + "src/core/lib/channel/subchannel_call_holder.h", + "src/core/lib/client_config/client_config.h", + "src/core/lib/client_config/connector.h", + "src/core/lib/client_config/initial_connect_string.h", + "src/core/lib/client_config/lb_policies/load_balancer_api.h", + "src/core/lib/client_config/lb_policies/pick_first.h", + "src/core/lib/client_config/lb_policies/round_robin.h", + "src/core/lib/client_config/lb_policy.h", + "src/core/lib/client_config/lb_policy_factory.h", + "src/core/lib/client_config/lb_policy_registry.h", + "src/core/lib/client_config/resolver.h", + "src/core/lib/client_config/resolver_factory.h", + "src/core/lib/client_config/resolver_registry.h", + "src/core/lib/client_config/resolvers/dns_resolver.h", + "src/core/lib/client_config/resolvers/sockaddr_resolver.h", + "src/core/lib/client_config/subchannel.h", + "src/core/lib/client_config/subchannel_factory.h", + "src/core/lib/client_config/subchannel_index.h", + "src/core/lib/client_config/uri_parser.h", + "src/core/lib/compression/algorithm_metadata.h", + "src/core/lib/compression/message_compress.h", + "src/core/lib/debug/trace.h", + "src/core/lib/http/format_request.h", + "src/core/lib/http/httpcli.h", + "src/core/lib/http/parser.h", + "src/core/lib/iomgr/closure.h", + "src/core/lib/iomgr/endpoint.h", + "src/core/lib/iomgr/endpoint_pair.h", + "src/core/lib/iomgr/exec_ctx.h", + "src/core/lib/iomgr/executor.h", + "src/core/lib/iomgr/fd_posix.h", + "src/core/lib/iomgr/iocp_windows.h", + "src/core/lib/iomgr/iomgr.h", + "src/core/lib/iomgr/iomgr_internal.h", + "src/core/lib/iomgr/iomgr_posix.h", + "src/core/lib/iomgr/pollset.h", + "src/core/lib/iomgr/pollset_posix.h", + "src/core/lib/iomgr/pollset_set.h", + "src/core/lib/iomgr/pollset_set_posix.h", + "src/core/lib/iomgr/pollset_set_windows.h", + "src/core/lib/iomgr/pollset_windows.h", + "src/core/lib/iomgr/resolve_address.h", + "src/core/lib/iomgr/sockaddr.h", + "src/core/lib/iomgr/sockaddr_posix.h", + "src/core/lib/iomgr/sockaddr_utils.h", + "src/core/lib/iomgr/sockaddr_win32.h", + "src/core/lib/iomgr/socket_utils_posix.h", + "src/core/lib/iomgr/socket_windows.h", + "src/core/lib/iomgr/tcp_client.h", + "src/core/lib/iomgr/tcp_posix.h", + "src/core/lib/iomgr/tcp_server.h", + "src/core/lib/iomgr/tcp_windows.h", + "src/core/lib/iomgr/time_averaged_stats.h", + "src/core/lib/iomgr/timer.h", + "src/core/lib/iomgr/timer_heap.h", + "src/core/lib/iomgr/udp_server.h", + "src/core/lib/iomgr/unix_sockets_posix.h", + "src/core/lib/iomgr/wakeup_fd_pipe.h", + "src/core/lib/iomgr/wakeup_fd_posix.h", + "src/core/lib/iomgr/workqueue.h", + "src/core/lib/iomgr/workqueue_posix.h", + "src/core/lib/iomgr/workqueue_windows.h", + "src/core/lib/json/json.h", + "src/core/lib/json/json_common.h", + "src/core/lib/json/json_reader.h", + "src/core/lib/json/json_writer.h", + "src/core/lib/proto/grpc/lb/v0/load_balancer.pb.h", + "src/core/lib/security/auth_filters.h", + "src/core/lib/security/b64.h", + "src/core/lib/security/credentials.h", + "src/core/lib/security/handshake.h", + "src/core/lib/security/json_token.h", + "src/core/lib/security/jwt_verifier.h", + "src/core/lib/security/secure_endpoint.h", + "src/core/lib/security/security_connector.h", + "src/core/lib/security/security_context.h", + "src/core/lib/statistics/census_interface.h", + "src/core/lib/statistics/census_rpc_stats.h", + "src/core/lib/surface/api_trace.h", + "src/core/lib/surface/call.h", + "src/core/lib/surface/call_test_only.h", + "src/core/lib/surface/channel.h", + "src/core/lib/surface/channel_init.h", + "src/core/lib/surface/channel_stack_type.h", + "src/core/lib/surface/completion_queue.h", + "src/core/lib/surface/event_string.h", + "src/core/lib/surface/init.h", + "src/core/lib/surface/lame_client.h", + "src/core/lib/surface/server.h", + "src/core/lib/surface/surface_trace.h", + "src/core/lib/transport/byte_stream.h", + "src/core/lib/transport/connectivity_state.h", + "src/core/lib/transport/metadata.h", + "src/core/lib/transport/metadata_batch.h", + "src/core/lib/transport/static_metadata.h", + "src/core/lib/transport/transport.h", + "src/core/lib/transport/transport_impl.h", + "src/core/lib/tsi/fake_transport_security.h", + "src/core/lib/tsi/ssl_transport_security.h", + "src/core/lib/tsi/ssl_types.h", + "src/core/lib/tsi/transport_security.h", + "src/core/lib/tsi/transport_security_interface.h", "third_party/nanopb/pb.h", "third_party/nanopb/pb_common.h", "third_party/nanopb/pb_decode.h", "third_party/nanopb/pb_encode.h", - "src/core/census/grpc_context.c", - "src/core/census/grpc_filter.c", - "src/core/channel/channel_args.c", - "src/core/channel/channel_stack.c", - "src/core/channel/client_channel.c", - "src/core/channel/client_uchannel.c", - "src/core/channel/compress_filter.c", - "src/core/channel/connected_channel.c", - "src/core/channel/http_client_filter.c", - "src/core/channel/http_server_filter.c", - "src/core/channel/subchannel_call_holder.c", - "src/core/client_config/client_config.c", - "src/core/client_config/connector.c", - "src/core/client_config/default_initial_connect_string.c", - "src/core/client_config/initial_connect_string.c", - "src/core/client_config/lb_policies/load_balancer_api.c", - "src/core/client_config/lb_policies/pick_first.c", - "src/core/client_config/lb_policies/round_robin.c", - "src/core/client_config/lb_policy.c", - "src/core/client_config/lb_policy_factory.c", - "src/core/client_config/lb_policy_registry.c", - "src/core/client_config/resolver.c", - "src/core/client_config/resolver_factory.c", - "src/core/client_config/resolver_registry.c", - "src/core/client_config/resolvers/dns_resolver.c", - "src/core/client_config/resolvers/sockaddr_resolver.c", - "src/core/client_config/subchannel.c", - "src/core/client_config/subchannel_factory.c", - "src/core/client_config/subchannel_index.c", - "src/core/client_config/uri_parser.c", - "src/core/compression/compression_algorithm.c", - "src/core/compression/message_compress.c", - "src/core/debug/trace.c", - "src/core/httpcli/format_request.c", - "src/core/httpcli/httpcli.c", - "src/core/httpcli/parser.c", - "src/core/iomgr/closure.c", - "src/core/iomgr/endpoint.c", - "src/core/iomgr/endpoint_pair_posix.c", - "src/core/iomgr/endpoint_pair_windows.c", - "src/core/iomgr/exec_ctx.c", - "src/core/iomgr/executor.c", - "src/core/iomgr/fd_posix.c", - "src/core/iomgr/iocp_windows.c", - "src/core/iomgr/iomgr.c", - "src/core/iomgr/iomgr_posix.c", - "src/core/iomgr/iomgr_windows.c", - "src/core/iomgr/pollset_multipoller_with_epoll.c", - "src/core/iomgr/pollset_multipoller_with_poll_posix.c", - "src/core/iomgr/pollset_posix.c", - "src/core/iomgr/pollset_set_posix.c", - "src/core/iomgr/pollset_set_windows.c", - "src/core/iomgr/pollset_windows.c", - "src/core/iomgr/resolve_address_posix.c", - "src/core/iomgr/resolve_address_windows.c", - "src/core/iomgr/sockaddr_utils.c", - "src/core/iomgr/socket_utils_common_posix.c", - "src/core/iomgr/socket_utils_linux.c", - "src/core/iomgr/socket_utils_posix.c", - "src/core/iomgr/socket_windows.c", - "src/core/iomgr/tcp_client_posix.c", - "src/core/iomgr/tcp_client_windows.c", - "src/core/iomgr/tcp_posix.c", - "src/core/iomgr/tcp_server_posix.c", - "src/core/iomgr/tcp_server_windows.c", - "src/core/iomgr/tcp_windows.c", - "src/core/iomgr/time_averaged_stats.c", - "src/core/iomgr/timer.c", - "src/core/iomgr/timer_heap.c", - "src/core/iomgr/udp_server.c", - "src/core/iomgr/wakeup_fd_eventfd.c", - "src/core/iomgr/wakeup_fd_nospecial.c", - "src/core/iomgr/wakeup_fd_pipe.c", - "src/core/iomgr/wakeup_fd_posix.c", - "src/core/iomgr/workqueue_posix.c", - "src/core/iomgr/workqueue_windows.c", - "src/core/json/json.c", - "src/core/json/json_reader.c", - "src/core/json/json_string.c", - "src/core/json/json_writer.c", - "src/core/proto/grpc/lb/v0/load_balancer.pb.c", - "src/core/surface/alarm.c", - "src/core/surface/api_trace.c", - "src/core/surface/byte_buffer.c", - "src/core/surface/byte_buffer_reader.c", - "src/core/surface/call.c", - "src/core/surface/call_details.c", - "src/core/surface/call_log_batch.c", - "src/core/surface/channel.c", - "src/core/surface/channel_connectivity.c", - "src/core/surface/channel_create.c", - "src/core/surface/channel_ping.c", - "src/core/surface/completion_queue.c", - "src/core/surface/event_string.c", - "src/core/surface/init.c", - "src/core/surface/lame_client.c", - "src/core/surface/metadata_array.c", - "src/core/surface/server.c", - "src/core/surface/server_chttp2.c", - "src/core/surface/server_create.c", - "src/core/surface/validate_metadata.c", - "src/core/surface/version.c", - "src/core/transport/byte_stream.c", - "src/core/transport/chttp2/alpn.c", - "src/core/transport/chttp2/bin_encoder.c", - "src/core/transport/chttp2/frame_data.c", - "src/core/transport/chttp2/frame_goaway.c", - "src/core/transport/chttp2/frame_ping.c", - "src/core/transport/chttp2/frame_rst_stream.c", - "src/core/transport/chttp2/frame_settings.c", - "src/core/transport/chttp2/frame_window_update.c", - "src/core/transport/chttp2/hpack_encoder.c", - "src/core/transport/chttp2/hpack_parser.c", - "src/core/transport/chttp2/hpack_table.c", - "src/core/transport/chttp2/huffsyms.c", - "src/core/transport/chttp2/incoming_metadata.c", - "src/core/transport/chttp2/parsing.c", - "src/core/transport/chttp2/status_conversion.c", - "src/core/transport/chttp2/stream_lists.c", - "src/core/transport/chttp2/stream_map.c", - "src/core/transport/chttp2/timeout_encoding.c", - "src/core/transport/chttp2/varint.c", - "src/core/transport/chttp2/writing.c", - "src/core/transport/chttp2_transport.c", - "src/core/transport/connectivity_state.c", - "src/core/transport/metadata.c", - "src/core/transport/metadata_batch.c", - "src/core/transport/static_metadata.c", - "src/core/transport/transport.c", - "src/core/transport/transport_op_string.c", - "src/core/httpcli/httpcli_security_connector.c", - "src/core/security/b64.c", - "src/core/security/client_auth_filter.c", - "src/core/security/credentials.c", - "src/core/security/credentials_metadata.c", - "src/core/security/credentials_posix.c", - "src/core/security/credentials_win32.c", - "src/core/security/google_default_credentials.c", - "src/core/security/handshake.c", - "src/core/security/json_token.c", - "src/core/security/jwt_verifier.c", - "src/core/security/secure_endpoint.c", - "src/core/security/security_connector.c", - "src/core/security/security_context.c", - "src/core/security/server_auth_filter.c", - "src/core/security/server_secure_chttp2.c", - "src/core/surface/init_secure.c", - "src/core/surface/secure_channel_create.c", - "src/core/tsi/fake_transport_security.c", - "src/core/tsi/ssl_transport_security.c", - "src/core/tsi/transport_security.c", - "src/core/census/context.c", - "src/core/census/initialize.c", - "src/core/census/mlog.c", - "src/core/census/operation.c", - "src/core/census/placeholders.c", - "src/core/census/tracing.c", + "src/core/ext/transport/chttp2/client/insecure/channel_create.c", + "src/core/ext/transport/chttp2/client/secure/secure_channel_create.c", + "src/core/ext/transport/chttp2/server/insecure/server_chttp2.c", + "src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c", + "src/core/ext/transport/chttp2/transport/alpn.c", + "src/core/ext/transport/chttp2/transport/bin_encoder.c", + "src/core/ext/transport/chttp2/transport/chttp2_transport.c", + "src/core/ext/transport/chttp2/transport/frame_data.c", + "src/core/ext/transport/chttp2/transport/frame_goaway.c", + "src/core/ext/transport/chttp2/transport/frame_ping.c", + "src/core/ext/transport/chttp2/transport/frame_rst_stream.c", + "src/core/ext/transport/chttp2/transport/frame_settings.c", + "src/core/ext/transport/chttp2/transport/frame_window_update.c", + "src/core/ext/transport/chttp2/transport/hpack_encoder.c", + "src/core/ext/transport/chttp2/transport/hpack_parser.c", + "src/core/ext/transport/chttp2/transport/hpack_table.c", + "src/core/ext/transport/chttp2/transport/huffsyms.c", + "src/core/ext/transport/chttp2/transport/incoming_metadata.c", + "src/core/ext/transport/chttp2/transport/parsing.c", + "src/core/ext/transport/chttp2/transport/status_conversion.c", + "src/core/ext/transport/chttp2/transport/stream_lists.c", + "src/core/ext/transport/chttp2/transport/stream_map.c", + "src/core/ext/transport/chttp2/transport/timeout_encoding.c", + "src/core/ext/transport/chttp2/transport/varint.c", + "src/core/ext/transport/chttp2/transport/writing.c", + "src/core/lib/census/context.c", + "src/core/lib/census/grpc_context.c", + "src/core/lib/census/grpc_filter.c", + "src/core/lib/census/grpc_plugin.c", + "src/core/lib/census/initialize.c", + "src/core/lib/census/mlog.c", + "src/core/lib/census/operation.c", + "src/core/lib/census/placeholders.c", + "src/core/lib/census/tracing.c", + "src/core/lib/channel/channel_args.c", + "src/core/lib/channel/channel_stack.c", + "src/core/lib/channel/channel_stack_builder.c", + "src/core/lib/channel/client_channel.c", + "src/core/lib/channel/compress_filter.c", + "src/core/lib/channel/connected_channel.c", + "src/core/lib/channel/http_client_filter.c", + "src/core/lib/channel/http_server_filter.c", + "src/core/lib/channel/subchannel_call_holder.c", + "src/core/lib/client_config/client_config.c", + "src/core/lib/client_config/connector.c", + "src/core/lib/client_config/default_initial_connect_string.c", + "src/core/lib/client_config/initial_connect_string.c", + "src/core/lib/client_config/lb_policies/load_balancer_api.c", + "src/core/lib/client_config/lb_policies/pick_first.c", + "src/core/lib/client_config/lb_policies/round_robin.c", + "src/core/lib/client_config/lb_policy.c", + "src/core/lib/client_config/lb_policy_factory.c", + "src/core/lib/client_config/lb_policy_registry.c", + "src/core/lib/client_config/resolver.c", + "src/core/lib/client_config/resolver_factory.c", + "src/core/lib/client_config/resolver_registry.c", + "src/core/lib/client_config/resolvers/dns_resolver.c", + "src/core/lib/client_config/resolvers/sockaddr_resolver.c", + "src/core/lib/client_config/subchannel.c", + "src/core/lib/client_config/subchannel_factory.c", + "src/core/lib/client_config/subchannel_index.c", + "src/core/lib/client_config/uri_parser.c", + "src/core/lib/compression/compression_algorithm.c", + "src/core/lib/compression/message_compress.c", + "src/core/lib/debug/trace.c", + "src/core/lib/http/format_request.c", + "src/core/lib/http/httpcli.c", + "src/core/lib/http/httpcli_security_connector.c", + "src/core/lib/http/parser.c", + "src/core/lib/iomgr/closure.c", + "src/core/lib/iomgr/endpoint.c", + "src/core/lib/iomgr/endpoint_pair_posix.c", + "src/core/lib/iomgr/endpoint_pair_windows.c", + "src/core/lib/iomgr/exec_ctx.c", + "src/core/lib/iomgr/executor.c", + "src/core/lib/iomgr/fd_posix.c", + "src/core/lib/iomgr/iocp_windows.c", + "src/core/lib/iomgr/iomgr.c", + "src/core/lib/iomgr/iomgr_posix.c", + "src/core/lib/iomgr/iomgr_windows.c", + "src/core/lib/iomgr/pollset_multipoller_with_epoll.c", + "src/core/lib/iomgr/pollset_multipoller_with_poll_posix.c", + "src/core/lib/iomgr/pollset_posix.c", + "src/core/lib/iomgr/pollset_set_posix.c", + "src/core/lib/iomgr/pollset_set_windows.c", + "src/core/lib/iomgr/pollset_windows.c", + "src/core/lib/iomgr/resolve_address_posix.c", + "src/core/lib/iomgr/resolve_address_windows.c", + "src/core/lib/iomgr/sockaddr_utils.c", + "src/core/lib/iomgr/socket_utils_common_posix.c", + "src/core/lib/iomgr/socket_utils_linux.c", + "src/core/lib/iomgr/socket_utils_posix.c", + "src/core/lib/iomgr/socket_windows.c", + "src/core/lib/iomgr/tcp_client_posix.c", + "src/core/lib/iomgr/tcp_client_windows.c", + "src/core/lib/iomgr/tcp_posix.c", + "src/core/lib/iomgr/tcp_server_posix.c", + "src/core/lib/iomgr/tcp_server_windows.c", + "src/core/lib/iomgr/tcp_windows.c", + "src/core/lib/iomgr/time_averaged_stats.c", + "src/core/lib/iomgr/timer.c", + "src/core/lib/iomgr/timer_heap.c", + "src/core/lib/iomgr/udp_server.c", + "src/core/lib/iomgr/unix_sockets_posix.c", + "src/core/lib/iomgr/unix_sockets_posix_noop.c", + "src/core/lib/iomgr/wakeup_fd_eventfd.c", + "src/core/lib/iomgr/wakeup_fd_nospecial.c", + "src/core/lib/iomgr/wakeup_fd_pipe.c", + "src/core/lib/iomgr/wakeup_fd_posix.c", + "src/core/lib/iomgr/workqueue_posix.c", + "src/core/lib/iomgr/workqueue_windows.c", + "src/core/lib/json/json.c", + "src/core/lib/json/json_reader.c", + "src/core/lib/json/json_string.c", + "src/core/lib/json/json_writer.c", + "src/core/lib/proto/grpc/lb/v0/load_balancer.pb.c", + "src/core/lib/security/b64.c", + "src/core/lib/security/client_auth_filter.c", + "src/core/lib/security/credentials.c", + "src/core/lib/security/credentials_metadata.c", + "src/core/lib/security/credentials_posix.c", + "src/core/lib/security/credentials_win32.c", + "src/core/lib/security/google_default_credentials.c", + "src/core/lib/security/handshake.c", + "src/core/lib/security/json_token.c", + "src/core/lib/security/jwt_verifier.c", + "src/core/lib/security/secure_endpoint.c", + "src/core/lib/security/security_connector.c", + "src/core/lib/security/security_context.c", + "src/core/lib/security/server_auth_filter.c", + "src/core/lib/surface/alarm.c", + "src/core/lib/surface/api_trace.c", + "src/core/lib/surface/byte_buffer.c", + "src/core/lib/surface/byte_buffer_reader.c", + "src/core/lib/surface/call.c", + "src/core/lib/surface/call_details.c", + "src/core/lib/surface/call_log_batch.c", + "src/core/lib/surface/channel.c", + "src/core/lib/surface/channel_connectivity.c", + "src/core/lib/surface/channel_init.c", + "src/core/lib/surface/channel_ping.c", + "src/core/lib/surface/channel_stack_type.c", + "src/core/lib/surface/completion_queue.c", + "src/core/lib/surface/event_string.c", + "src/core/lib/surface/init.c", + "src/core/lib/surface/init_secure.c", + "src/core/lib/surface/lame_client.c", + "src/core/lib/surface/metadata_array.c", + "src/core/lib/surface/server.c", + "src/core/lib/surface/validate_metadata.c", + "src/core/lib/surface/version.c", + "src/core/lib/transport/byte_stream.c", + "src/core/lib/transport/connectivity_state.c", + "src/core/lib/transport/metadata.c", + "src/core/lib/transport/metadata_batch.c", + "src/core/lib/transport/static_metadata.c", + "src/core/lib/transport/transport.c", + "src/core/lib/transport/transport_op_string.c", + "src/core/lib/tsi/fake_transport_security.c", + "src/core/lib/tsi/ssl_transport_security.c", + "src/core/lib/tsi/transport_security.c", "third_party/nanopb/pb_common.c", "third_party/nanopb/pb_decode.c", "third_party/nanopb/pb_encode.c", @@ -822,6 +832,20 @@ "third_party/boringssl/ssl/t1_enc.c", "third_party/boringssl/ssl/t1_lib.c", "third_party/boringssl/ssl/tls_record.c", + "include/grpc/impl/codegen/alloc.h", + "include/grpc/impl/codegen/atm.h", + "include/grpc/impl/codegen/atm_gcc_atomic.h", + "include/grpc/impl/codegen/atm_gcc_sync.h", + "include/grpc/impl/codegen/atm_win32.h", + "include/grpc/impl/codegen/log.h", + "include/grpc/impl/codegen/port_platform.h", + "include/grpc/impl/codegen/slice.h", + "include/grpc/impl/codegen/slice_buffer.h", + "include/grpc/impl/codegen/sync.h", + "include/grpc/impl/codegen/sync_generic.h", + "include/grpc/impl/codegen/sync_posix.h", + "include/grpc/impl/codegen/sync_win32.h", + "include/grpc/impl/codegen/time.h", "include/grpc/support/alloc.h", "include/grpc/support/atm.h", "include/grpc/support/atm_gcc_atomic.h", @@ -850,74 +874,62 @@ "include/grpc/support/tls_msvc.h", "include/grpc/support/tls_pthread.h", "include/grpc/support/useful.h", - "include/grpc/impl/codegen/alloc.h", - "include/grpc/impl/codegen/atm.h", - "include/grpc/impl/codegen/atm_gcc_atomic.h", - "include/grpc/impl/codegen/atm_gcc_sync.h", - "include/grpc/impl/codegen/atm_win32.h", - "include/grpc/impl/codegen/log.h", - "include/grpc/impl/codegen/port_platform.h", - "include/grpc/impl/codegen/slice.h", - "include/grpc/impl/codegen/slice_buffer.h", - "include/grpc/impl/codegen/sync.h", - "include/grpc/impl/codegen/sync_generic.h", - "include/grpc/impl/codegen/sync_posix.h", - "include/grpc/impl/codegen/sync_win32.h", - "include/grpc/impl/codegen/time.h", - "src/core/profiling/timers.h", - "src/core/support/block_annotate.h", - "src/core/support/env.h", - "src/core/support/load_file.h", - "src/core/support/murmur_hash.h", - "src/core/support/stack_lockfree.h", - "src/core/support/string.h", - "src/core/support/string_win32.h", - "src/core/support/thd_internal.h", - "src/core/support/time_precise.h", - "src/core/support/tmpfile.h", - "src/core/profiling/basic_timers.c", - "src/core/profiling/stap_timers.c", - "src/core/support/alloc.c", - "src/core/support/avl.c", - "src/core/support/cmdline.c", - "src/core/support/cpu_iphone.c", - "src/core/support/cpu_linux.c", - "src/core/support/cpu_posix.c", - "src/core/support/cpu_windows.c", - "src/core/support/env_linux.c", - "src/core/support/env_posix.c", - "src/core/support/env_win32.c", - "src/core/support/histogram.c", - "src/core/support/host_port.c", - "src/core/support/load_file.c", - "src/core/support/log.c", - "src/core/support/log_android.c", - "src/core/support/log_linux.c", - "src/core/support/log_posix.c", - "src/core/support/log_win32.c", - "src/core/support/murmur_hash.c", - "src/core/support/slice.c", - "src/core/support/slice_buffer.c", - "src/core/support/stack_lockfree.c", - "src/core/support/string.c", - "src/core/support/string_posix.c", - "src/core/support/string_win32.c", - "src/core/support/subprocess_posix.c", - "src/core/support/subprocess_windows.c", - "src/core/support/sync.c", - "src/core/support/sync_posix.c", - "src/core/support/sync_win32.c", - "src/core/support/thd.c", - "src/core/support/thd_posix.c", - "src/core/support/thd_win32.c", - "src/core/support/time.c", - "src/core/support/time_posix.c", - "src/core/support/time_precise.c", - "src/core/support/time_win32.c", - "src/core/support/tls_pthread.c", - "src/core/support/tmpfile_posix.c", - "src/core/support/tmpfile_win32.c", - "src/core/support/wrap_memcpy.c", + "src/core/lib/profiling/timers.h", + "src/core/lib/support/backoff.h", + "src/core/lib/support/block_annotate.h", + "src/core/lib/support/env.h", + "src/core/lib/support/load_file.h", + "src/core/lib/support/murmur_hash.h", + "src/core/lib/support/stack_lockfree.h", + "src/core/lib/support/string.h", + "src/core/lib/support/string_win32.h", + "src/core/lib/support/thd_internal.h", + "src/core/lib/support/time_precise.h", + "src/core/lib/support/tmpfile.h", + "src/core/lib/profiling/basic_timers.c", + "src/core/lib/profiling/stap_timers.c", + "src/core/lib/support/alloc.c", + "src/core/lib/support/avl.c", + "src/core/lib/support/backoff.c", + "src/core/lib/support/cmdline.c", + "src/core/lib/support/cpu_iphone.c", + "src/core/lib/support/cpu_linux.c", + "src/core/lib/support/cpu_posix.c", + "src/core/lib/support/cpu_windows.c", + "src/core/lib/support/env_linux.c", + "src/core/lib/support/env_posix.c", + "src/core/lib/support/env_win32.c", + "src/core/lib/support/histogram.c", + "src/core/lib/support/host_port.c", + "src/core/lib/support/load_file.c", + "src/core/lib/support/log.c", + "src/core/lib/support/log_android.c", + "src/core/lib/support/log_linux.c", + "src/core/lib/support/log_posix.c", + "src/core/lib/support/log_win32.c", + "src/core/lib/support/murmur_hash.c", + "src/core/lib/support/slice.c", + "src/core/lib/support/slice_buffer.c", + "src/core/lib/support/stack_lockfree.c", + "src/core/lib/support/string.c", + "src/core/lib/support/string_posix.c", + "src/core/lib/support/string_win32.c", + "src/core/lib/support/subprocess_posix.c", + "src/core/lib/support/subprocess_windows.c", + "src/core/lib/support/sync.c", + "src/core/lib/support/sync_posix.c", + "src/core/lib/support/sync_win32.c", + "src/core/lib/support/thd.c", + "src/core/lib/support/thd_posix.c", + "src/core/lib/support/thd_win32.c", + "src/core/lib/support/time.c", + "src/core/lib/support/time_posix.c", + "src/core/lib/support/time_precise.c", + "src/core/lib/support/time_win32.c", + "src/core/lib/support/tls_pthread.c", + "src/core/lib/support/tmpfile_posix.c", + "src/core/lib/support/tmpfile_win32.c", + "src/core/lib/support/wrap_memcpy.c", "binding.gyp" ], "main": "src/node/index.js", diff --git a/package.xml b/package.xml index bb4dcc2037a..a40cd160ae5 100644 --- a/package.xml +++ b/package.xml @@ -50,6 +50,20 @@ + + + + + + + + + + + + + + @@ -78,74 +92,67 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -153,305 +160,309 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/setup.py b/setup.py index 45ff2cec89b..9634de0f831 100644 --- a/setup.py +++ b/setup.py @@ -42,6 +42,7 @@ from setuptools.command import egg_info # Redirect the manifest template from MANIFEST.in to PYTHON-MANIFEST.in. egg_info.manifest_maker.template = 'PYTHON-MANIFEST.in' +PY3 = sys.version_info.major == 3 PYTHON_STEM = './src/python/grpcio' CORE_INCLUDE = ('./include', '.',) BORINGSSL_INCLUDE = ('./third_party/boringssl/include',) @@ -103,10 +104,14 @@ if "linux" in sys.platform: LDFLAGS += ('-Wl,-wrap,memcpy',) if "linux" in sys.platform or "darwin" in sys.platform: CFLAGS += ('-fvisibility=hidden',) - DEFINE_MACROS += (('PyMODINIT_FUNC', '__attribute__((visibility ("default"))) void'),) + pymodinit_type = 'PyObject*' if PY3 else 'void' -def cython_extensions(package_names, module_names, extra_sources, include_dirs, + pymodinit = '__attribute__((visibility ("default"))) {}'.format(pymodinit_type) + DEFINE_MACROS += (('PyMODINIT_FUNC', pymodinit),) + + +def cython_extensions(module_names, extra_sources, include_dirs, libraries, define_macros, build_with_cython=False): # Set compiler directives linetrace argument only if we care about tracing; # this is due to Cython having different behavior between linetrace being @@ -139,7 +144,7 @@ def cython_extensions(package_names, module_names, extra_sources, include_dirs, return extensions CYTHON_EXTENSION_MODULES = cython_extensions( - list(CYTHON_EXTENSION_PACKAGE_NAMES), list(CYTHON_EXTENSION_MODULE_NAMES), + list(CYTHON_EXTENSION_MODULE_NAMES), list(CYTHON_HELPER_C_FILES) + list(CORE_C_FILES), list(EXTENSION_INCLUDE_DIRECTORIES), list(EXTENSION_LIBRARIES), list(DEFINE_MACROS), bool(BUILD_WITH_CYTHON)) diff --git a/src/compiler/cpp_generator.cc b/src/compiler/cpp_generator.cc index 97295bed451..206a6e1fe51 100644 --- a/src/compiler/cpp_generator.cc +++ b/src/compiler/cpp_generator.cc @@ -83,6 +83,28 @@ grpc::string FilenameIdentifier(const grpc::string &filename) { } } // namespace +template +T *array_end(T (&array)[N]) { return array + N; } + +void PrintIncludes(grpc::protobuf::io::Printer *printer, const std::vector& headers, const Parameters ¶ms) { + std::map vars; + + vars["l"] = params.use_system_headers ? '<' : '"'; + vars["r"] = params.use_system_headers ? '>' : '"'; + + if (!params.grpc_search_path.empty()) { + vars["l"] += params.grpc_search_path; + if (params.grpc_search_path.back() != '/') { + vars["l"] += '/'; + } + } + + for (auto i = headers.begin(); i != headers.end(); i++) { + vars["h"] = *i; + printer->Print(vars, "#include $l$$h$$r$\n"); + } +} + grpc::string GetHeaderPrologue(const grpc::protobuf::FileDescriptor *file, const Parameters ¶ms) { grpc::string output; @@ -111,36 +133,46 @@ grpc::string GetHeaderPrologue(const grpc::protobuf::FileDescriptor *file, grpc::string GetHeaderIncludes(const grpc::protobuf::FileDescriptor *file, const Parameters ¶ms) { - grpc::string temp = - "#include \n" - "#include \n" - "#include \n" - "#include \n" - "#include \n" - "#include \n" - "#include \n" - "#include \n" - "\n" - "namespace grpc {\n" - "class CompletionQueue;\n" - "class RpcService;\n" - "class ServerCompletionQueue;\n" - "class ServerContext;\n" - "} // namespace grpc\n\n"; + grpc::string output; + { + // Scope the output stream so it closes and finalizes output to the string. + grpc::protobuf::io::StringOutputStream output_stream(&output); + grpc::protobuf::io::Printer printer(&output_stream, '$'); + std::map vars; - if (!file->package().empty()) { - std::vector parts = - grpc_generator::tokenize(file->package(), "."); + static const char *headers_strs[] = { + "grpc++/impl/codegen/async_stream.h", + "grpc++/impl/codegen/async_unary_call.h", + "grpc++/impl/codegen/proto_utils.h", + "grpc++/impl/codegen/rpc_method.h", + "grpc++/impl/codegen/service_type.h", + "grpc++/impl/codegen/status.h", + "grpc++/impl/codegen/stub_options.h", + "grpc++/impl/codegen/sync_stream.h" + }; + std::vector headers(headers_strs, array_end(headers_strs)); + PrintIncludes(&printer, headers, params); + printer.Print(vars, "\n"); + printer.Print(vars, "namespace grpc {\n"); + printer.Print(vars, "class CompletionQueue;\n"); + printer.Print(vars, "class Channel;\n"); + printer.Print(vars, "class RpcService;\n"); + printer.Print(vars, "class ServerCompletionQueue;\n"); + printer.Print(vars, "class ServerContext;\n"); + printer.Print(vars, "} // namespace grpc\n\n"); - for (auto part = parts.begin(); part != parts.end(); part++) { - temp.append("namespace "); - temp.append(*part); - temp.append(" {\n"); + if (!file->package().empty()) { + std::vector parts = + grpc_generator::tokenize(file->package(), "."); + + for (auto part = parts.begin(); part != parts.end(); part++) { + vars["part"] = *part; + printer.Print(vars, "namespace $part$ {\n"); + } + printer.Print(vars, "\n"); } - temp.append("\n"); } - - return temp; + return output; } void PrintHeaderClientMethodInterfaces( @@ -852,7 +884,7 @@ grpc::string GetSourcePrologue(const grpc::protobuf::FileDescriptor *file, } grpc::string GetSourceIncludes(const grpc::protobuf::FileDescriptor *file, - const Parameters ¶m) { + const Parameters ¶ms) { grpc::string output; { // Scope the output stream so it closes and finalizes output to the string. @@ -860,16 +892,18 @@ grpc::string GetSourceIncludes(const grpc::protobuf::FileDescriptor *file, grpc::protobuf::io::Printer printer(&output_stream, '$'); std::map vars; - printer.Print(vars, "#include \n"); - printer.Print(vars, "#include \n"); - printer.Print(vars, "#include \n"); - printer.Print(vars, "#include \n"); - printer.Print(vars, - "#include \n"); - printer.Print(vars, - "#include \n"); - printer.Print(vars, "#include \n"); - printer.Print(vars, "#include \n"); + static const char *headers_strs[] = { + "grpc++/impl/codegen/async_stream.h", + "grpc++/impl/codegen/async_unary_call.h", + "grpc++/impl/codegen/channel_interface.h", + "grpc++/impl/codegen/client_unary_call.h", + "grpc++/impl/codegen/method_handler_impl.h", + "grpc++/impl/codegen/rpc_service_method.h", + "grpc++/impl/codegen/service_type.h", + "grpc++/impl/codegen/sync_stream.h" + }; + std::vector headers(headers_strs, array_end(headers_strs)); + PrintIncludes(&printer, headers, params); if (!file->package().empty()) { std::vector parts = diff --git a/src/compiler/cpp_generator.h b/src/compiler/cpp_generator.h index 70c2e985f6b..4f9de9d11a2 100644 --- a/src/compiler/cpp_generator.h +++ b/src/compiler/cpp_generator.h @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -42,6 +42,10 @@ namespace grpc_cpp_generator { struct Parameters { // Puts the service into a namespace grpc::string services_namespace; + // Use system includes (<>) or local includes ("") + bool use_system_headers; + // Prefix to any grpc include + grpc::string grpc_search_path; }; // Return the prologue of the generated header file. diff --git a/src/compiler/cpp_plugin.cc b/src/compiler/cpp_plugin.cc index 88c704948ec..d8ada4835c5 100644 --- a/src/compiler/cpp_plugin.cc +++ b/src/compiler/cpp_plugin.cc @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -59,6 +59,7 @@ class CppGrpcGenerator : public grpc::protobuf::compiler::CodeGenerator { } grpc_cpp_generator::Parameters generator_parameters; + generator_parameters.use_system_headers = true; if (!parameter.empty()) { std::vector parameters_list = @@ -70,6 +71,17 @@ class CppGrpcGenerator : public grpc::protobuf::compiler::CodeGenerator { grpc_generator::tokenize(*parameter_string, "="); if (param[0] == "services_namespace") { generator_parameters.services_namespace = param[1]; + } else if (param[0] == "use_system_headers") { + if (param[1] == "true") { + generator_parameters.use_system_headers = true; + } else if (param[1] == "false") { + generator_parameters.use_system_headers = false; + } else { + *error = grpc::string("Invalid parameter: ") + *parameter_string; + return false; + } + } else if (param[0] == "grpc_search_path") { + generator_parameters.grpc_search_path = param[1]; } else { *error = grpc::string("Unknown parameter: ") + *parameter_string; return false; diff --git a/src/compiler/python_generator.cc b/src/compiler/python_generator.cc index 4fd5dfbecb1..5a2ecce1d4f 100644 --- a/src/compiler/python_generator.cc +++ b/src/compiler/python_generator.cc @@ -190,11 +190,10 @@ bool PrintBetaServicer(const ServiceDescriptor* service, "Documentation", doc, }); out->Print("\n"); - out->Print(dict, "class Beta$Service$Servicer(object):\n"); + out->Print(dict, "class Beta$Service$Servicer(six.with_metaclass(abc.ABCMeta, object)):\n"); { IndentScope raii_class_indent(out); out->Print(dict, "\"\"\"$Documentation$\"\"\"\n"); - out->Print("__metaclass__ = abc.ABCMeta\n"); for (int i = 0; i < service->method_count(); ++i) { auto meth = service->method(i); grpc::string arg_name = meth->client_streaming() ? @@ -219,11 +218,10 @@ bool PrintBetaStub(const ServiceDescriptor* service, "Documentation", doc, }); out->Print("\n"); - out->Print(dict, "class Beta$Service$Stub(object):\n"); + out->Print(dict, "class Beta$Service$Stub(six.with_metaclass(abc.ABCMeta, object)):\n"); { IndentScope raii_class_indent(out); out->Print(dict, "\"\"\"$Documentation$\"\"\"\n"); - out->Print("__metaclass__ = abc.ABCMeta\n"); for (int i = 0; i < service->method_count(); ++i) { const MethodDescriptor* meth = service->method(i); grpc::string arg_name = meth->client_streaming() ? @@ -449,6 +447,7 @@ bool PrintBetaStubFactory(const grpc::string& package_qualified_service_name, bool PrintPreamble(const FileDescriptor* file, const GeneratorConfiguration& config, Printer* out) { out->Print("import abc\n"); + out->Print("import six\n"); out->Print("from $Package$ import implementations as beta_implementations\n", "Package", config.beta_package_root); out->Print("from grpc.framework.common import cardinality\n"); diff --git a/src/core/channel/client_uchannel.c b/src/core/channel/client_uchannel.c deleted file mode 100644 index 83fcc3a87f5..00000000000 --- a/src/core/channel/client_uchannel.c +++ /dev/null @@ -1,243 +0,0 @@ -/* - * - * Copyright 2015-2016, Google Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -#include "src/core/channel/client_uchannel.h" - -#include - -#include "src/core/census/grpc_filter.h" -#include "src/core/channel/channel_args.h" -#include "src/core/channel/client_channel.h" -#include "src/core/channel/compress_filter.h" -#include "src/core/channel/subchannel_call_holder.h" -#include "src/core/iomgr/iomgr.h" -#include "src/core/support/string.h" -#include "src/core/surface/channel.h" -#include "src/core/transport/connectivity_state.h" - -#include -#include -#include -#include - -/** Microchannel (uchannel) implementation: a lightweight channel without any - * load-balancing mechanisms meant for communication from within the core. */ - -typedef struct client_uchannel_channel_data { - /** master channel - the grpc_channel instance that ultimately owns - this channel_data via its channel stack. - We occasionally use this to bump the refcount on the master channel - to keep ourselves alive through an asynchronous operation. */ - grpc_channel_stack *owning_stack; - - /** connectivity state being tracked */ - grpc_connectivity_state_tracker state_tracker; - - /** the subchannel wrapped by the microchannel */ - grpc_connected_subchannel *connected_subchannel; - - /** the callback used to stay subscribed to subchannel connectivity - * notifications */ - grpc_closure connectivity_cb; - - /** the current connectivity state of the wrapped subchannel */ - grpc_connectivity_state subchannel_connectivity; - - gpr_mu mu_state; -} channel_data; - -typedef grpc_subchannel_call_holder call_data; - -static void monitor_subchannel(grpc_exec_ctx *exec_ctx, void *arg, - bool iomgr_success) { - channel_data *chand = arg; - grpc_connectivity_state_set(exec_ctx, &chand->state_tracker, - chand->subchannel_connectivity, - "uchannel_monitor_subchannel"); - grpc_connected_subchannel_notify_on_state_change( - exec_ctx, chand->connected_subchannel, NULL, - &chand->subchannel_connectivity, &chand->connectivity_cb); -} - -static char *cuc_get_peer(grpc_exec_ctx *exec_ctx, grpc_call_element *elem) { - return grpc_subchannel_call_holder_get_peer(exec_ctx, elem->call_data); -} - -static void cuc_start_transport_stream_op(grpc_exec_ctx *exec_ctx, - grpc_call_element *elem, - grpc_transport_stream_op *op) { - GRPC_CALL_LOG_OP(GPR_INFO, elem, op); - grpc_subchannel_call_holder_perform_op(exec_ctx, elem->call_data, op); -} - -static void cuc_start_transport_op(grpc_exec_ctx *exec_ctx, - grpc_channel_element *elem, - grpc_transport_op *op) { - channel_data *chand = elem->channel_data; - - grpc_exec_ctx_enqueue(exec_ctx, op->on_consumed, true, NULL); - - GPR_ASSERT(op->set_accept_stream == false); - GPR_ASSERT(op->bind_pollset == NULL); - - if (op->on_connectivity_state_change != NULL) { - grpc_connectivity_state_notify_on_state_change( - exec_ctx, &chand->state_tracker, op->connectivity_state, - op->on_connectivity_state_change); - op->on_connectivity_state_change = NULL; - op->connectivity_state = NULL; - } - - if (op->disconnect) { - grpc_connectivity_state_set(exec_ctx, &chand->state_tracker, - GRPC_CHANNEL_FATAL_FAILURE, "disconnect"); - } -} - -static int cuc_pick_subchannel(grpc_exec_ctx *exec_ctx, void *arg, - grpc_metadata_batch *initial_metadata, - grpc_connected_subchannel **connected_subchannel, - grpc_closure *on_ready) { - channel_data *chand = arg; - GPR_ASSERT(initial_metadata != NULL); - *connected_subchannel = chand->connected_subchannel; - return 1; -} - -/* Constructor for call_data */ -static void cuc_init_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, - grpc_call_element_args *args) { - grpc_subchannel_call_holder_init(elem->call_data, cuc_pick_subchannel, - elem->channel_data, args->call_stack); -} - -/* Destructor for call_data */ -static void cuc_destroy_call_elem(grpc_exec_ctx *exec_ctx, - grpc_call_element *elem) { - grpc_subchannel_call_holder_destroy(exec_ctx, elem->call_data); -} - -/* Constructor for channel_data */ -static void cuc_init_channel_elem(grpc_exec_ctx *exec_ctx, - grpc_channel_element *elem, - grpc_channel_element_args *args) { - channel_data *chand = elem->channel_data; - memset(chand, 0, sizeof(*chand)); - grpc_closure_init(&chand->connectivity_cb, monitor_subchannel, chand); - GPR_ASSERT(args->is_last); - GPR_ASSERT(elem->filter == &grpc_client_uchannel_filter); - chand->owning_stack = args->channel_stack; - grpc_connectivity_state_init(&chand->state_tracker, GRPC_CHANNEL_IDLE, - "client_uchannel"); - gpr_mu_init(&chand->mu_state); -} - -/* Destructor for channel_data */ -static void cuc_destroy_channel_elem(grpc_exec_ctx *exec_ctx, - grpc_channel_element *elem) { - channel_data *chand = elem->channel_data; - /* cancel subscription */ - grpc_connected_subchannel_notify_on_state_change( - exec_ctx, chand->connected_subchannel, NULL, NULL, - &chand->connectivity_cb); - grpc_connectivity_state_destroy(exec_ctx, &chand->state_tracker); - gpr_mu_destroy(&chand->mu_state); - GRPC_CONNECTED_SUBCHANNEL_UNREF(exec_ctx, chand->connected_subchannel, - "uchannel"); -} - -static void cuc_set_pollset(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, - grpc_pollset *pollset) { - call_data *calld = elem->call_data; - calld->pollset = pollset; -} - -const grpc_channel_filter grpc_client_uchannel_filter = { - cuc_start_transport_stream_op, cuc_start_transport_op, sizeof(call_data), - cuc_init_call_elem, cuc_set_pollset, cuc_destroy_call_elem, - sizeof(channel_data), cuc_init_channel_elem, cuc_destroy_channel_elem, - cuc_get_peer, "client-uchannel", -}; - -grpc_connectivity_state grpc_client_uchannel_check_connectivity_state( - grpc_exec_ctx *exec_ctx, grpc_channel_element *elem, int try_to_connect) { - channel_data *chand = elem->channel_data; - grpc_connectivity_state out; - gpr_mu_lock(&chand->mu_state); - out = grpc_connectivity_state_check(&chand->state_tracker); - gpr_mu_unlock(&chand->mu_state); - return out; -} - -void grpc_client_uchannel_watch_connectivity_state( - grpc_exec_ctx *exec_ctx, grpc_channel_element *elem, grpc_pollset *pollset, - grpc_connectivity_state *state, grpc_closure *on_complete) { - channel_data *chand = elem->channel_data; - gpr_mu_lock(&chand->mu_state); - grpc_connectivity_state_notify_on_state_change( - exec_ctx, &chand->state_tracker, state, on_complete); - gpr_mu_unlock(&chand->mu_state); -} - -grpc_channel *grpc_client_uchannel_create(grpc_subchannel *subchannel, - grpc_channel_args *args) { - grpc_channel *channel = NULL; -#define MAX_FILTERS 3 - const grpc_channel_filter *filters[MAX_FILTERS]; - grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - size_t n = 0; - - if (grpc_channel_args_is_census_enabled(args)) { - filters[n++] = &grpc_client_census_filter; - } - filters[n++] = &grpc_compress_filter; - filters[n++] = &grpc_client_uchannel_filter; - GPR_ASSERT(n <= MAX_FILTERS); - - channel = - grpc_channel_create_from_filters(&exec_ctx, NULL, filters, n, args, 1); - - return channel; -} - -void grpc_client_uchannel_set_connected_subchannel( - grpc_channel *uchannel, grpc_connected_subchannel *connected_subchannel) { - grpc_channel_element *elem = - grpc_channel_stack_last_element(grpc_channel_get_channel_stack(uchannel)); - channel_data *chand = elem->channel_data; - GPR_ASSERT(elem->filter == &grpc_client_uchannel_filter); - gpr_mu_lock(&chand->mu_state); - chand->connected_subchannel = connected_subchannel; - GRPC_CONNECTED_SUBCHANNEL_REF(connected_subchannel, "uchannel"); - gpr_mu_unlock(&chand->mu_state); -} diff --git a/src/core/ext/transport/chttp2/client/insecure/README.md b/src/core/ext/transport/chttp2/client/insecure/README.md new file mode 100644 index 00000000000..fa114633889 --- /dev/null +++ b/src/core/ext/transport/chttp2/client/insecure/README.md @@ -0,0 +1 @@ +Plugin for creating insecure channels using chttp2 diff --git a/src/core/surface/channel_create.c b/src/core/ext/transport/chttp2/client/insecure/channel_create.c similarity index 88% rename from src/core/surface/channel_create.c rename to src/core/ext/transport/chttp2/client/insecure/channel_create.c index fd7e20e9cce..cf987a02e01 100644 --- a/src/core/surface/channel_create.c +++ b/src/core/ext/transport/chttp2/client/insecure/channel_create.c @@ -40,16 +40,16 @@ #include #include -#include "src/core/census/grpc_filter.h" -#include "src/core/channel/channel_args.h" -#include "src/core/channel/client_channel.h" -#include "src/core/channel/compress_filter.h" -#include "src/core/channel/http_client_filter.h" -#include "src/core/client_config/resolver_registry.h" -#include "src/core/iomgr/tcp_client.h" -#include "src/core/surface/api_trace.h" -#include "src/core/surface/channel.h" -#include "src/core/transport/chttp2_transport.h" +#include "src/core/ext/transport/chttp2/transport/chttp2_transport.h" +#include "src/core/lib/census/grpc_filter.h" +#include "src/core/lib/channel/channel_args.h" +#include "src/core/lib/channel/client_channel.h" +#include "src/core/lib/channel/compress_filter.h" +#include "src/core/lib/channel/http_client_filter.h" +#include "src/core/lib/client_config/resolver_registry.h" +#include "src/core/lib/iomgr/tcp_client.h" +#include "src/core/lib/surface/api_trace.h" +#include "src/core/lib/surface/channel.h" typedef struct { grpc_connector base; @@ -105,9 +105,6 @@ static void connected(grpc_exec_ctx *exec_ctx, void *arg, bool success) { 0); GPR_ASSERT(c->result->transport); c->result->channel_args = c->args.channel_args; - c->result->filters = gpr_malloc(sizeof(grpc_channel_filter *)); - c->result->filters[0] = &grpc_http_client_filter; - c->result->num_filters = 1; } else { memset(c->result, 0, sizeof(*c->result)); } @@ -190,25 +187,16 @@ grpc_channel *grpc_insecure_channel_create(const char *target, const grpc_channel_args *args, void *reserved) { grpc_channel *channel = NULL; -#define MAX_FILTERS 3 - const grpc_channel_filter *filters[MAX_FILTERS]; grpc_resolver *resolver; subchannel_factory *f; grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - size_t n = 0; GRPC_API_TRACE( "grpc_insecure_channel_create(target=%p, args=%p, reserved=%p)", 3, (target, args, reserved)); GPR_ASSERT(!reserved); - if (grpc_channel_args_is_census_enabled(args)) { - filters[n++] = &grpc_client_census_filter; - } - filters[n++] = &grpc_compress_filter; - filters[n++] = &grpc_client_channel_filter; - GPR_ASSERT(n <= MAX_FILTERS); channel = - grpc_channel_create_from_filters(&exec_ctx, target, filters, n, args, 1); + grpc_channel_create(&exec_ctx, target, args, GRPC_CLIENT_CHANNEL, NULL); f = gpr_malloc(sizeof(*f)); f->base.vtable = &subchannel_factory_vtable; diff --git a/src/core/ext/transport/chttp2/client/secure/README.md b/src/core/ext/transport/chttp2/client/secure/README.md new file mode 100644 index 00000000000..405a86e5db1 --- /dev/null +++ b/src/core/ext/transport/chttp2/client/secure/README.md @@ -0,0 +1 @@ +Plugin for creating secure channels using chttp2 diff --git a/src/core/surface/secure_channel_create.c b/src/core/ext/transport/chttp2/client/secure/secure_channel_create.c similarity index 88% rename from src/core/surface/secure_channel_create.c rename to src/core/ext/transport/chttp2/client/secure/secure_channel_create.c index aadfac4c91f..203475ba527 100644 --- a/src/core/surface/secure_channel_create.c +++ b/src/core/ext/transport/chttp2/client/secure/secure_channel_create.c @@ -40,20 +40,17 @@ #include #include -#include "src/core/census/grpc_filter.h" -#include "src/core/channel/channel_args.h" -#include "src/core/channel/client_channel.h" -#include "src/core/channel/compress_filter.h" -#include "src/core/channel/http_client_filter.h" -#include "src/core/client_config/resolver_registry.h" -#include "src/core/iomgr/tcp_client.h" -#include "src/core/security/auth_filters.h" -#include "src/core/security/credentials.h" -#include "src/core/security/security_context.h" -#include "src/core/surface/api_trace.h" -#include "src/core/surface/channel.h" -#include "src/core/transport/chttp2_transport.h" -#include "src/core/tsi/transport_security_interface.h" +#include "src/core/ext/transport/chttp2/transport/chttp2_transport.h" +#include "src/core/lib/channel/channel_args.h" +#include "src/core/lib/channel/client_channel.h" +#include "src/core/lib/client_config/resolver_registry.h" +#include "src/core/lib/iomgr/tcp_client.h" +#include "src/core/lib/security/auth_filters.h" +#include "src/core/lib/security/credentials.h" +#include "src/core/lib/security/security_context.h" +#include "src/core/lib/surface/api_trace.h" +#include "src/core/lib/surface/channel.h" +#include "src/core/lib/tsi/transport_security_interface.h" typedef struct { grpc_connector base; @@ -115,10 +112,6 @@ static void on_secure_handshake_done(grpc_exec_ctx *exec_ctx, void *arg, args_copy = grpc_channel_args_copy_and_add(c->args.channel_args, &auth_context_arg, 1); c->result->channel_args = args_copy; - c->result->filters = gpr_malloc(sizeof(grpc_channel_filter *) * 2); - c->result->filters[0] = &grpc_http_client_filter; - c->result->filters[1] = &grpc_client_auth_filter; - c->result->num_filters = 2; } notify = c->notify; c->notify = NULL; @@ -262,10 +255,7 @@ grpc_channel *grpc_secure_channel_create(grpc_channel_credentials *creds, grpc_channel_security_connector *security_connector; grpc_resolver *resolver; subchannel_factory *f; -#define MAX_FILTERS 3 - const grpc_channel_filter *filters[MAX_FILTERS]; grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - size_t n = 0; GRPC_API_TRACE( "grpc_secure_channel_create(creds=%p, target=%s, args=%p, " @@ -277,7 +267,7 @@ grpc_channel *grpc_secure_channel_create(grpc_channel_credentials *creds, gpr_log(GPR_ERROR, "Cannot set security context in channel args."); grpc_exec_ctx_finish(&exec_ctx); return grpc_lame_client_channel_create( - target, GRPC_STATUS_INVALID_ARGUMENT, + target, GRPC_STATUS_INTERNAL, "Security connector exists in channel args."); } @@ -286,23 +276,16 @@ grpc_channel *grpc_secure_channel_create(grpc_channel_credentials *creds, GRPC_SECURITY_OK) { grpc_exec_ctx_finish(&exec_ctx); return grpc_lame_client_channel_create( - target, GRPC_STATUS_INVALID_ARGUMENT, - "Failed to create security connector."); + target, GRPC_STATUS_INTERNAL, "Failed to create security connector."); } connector_arg = grpc_security_connector_to_arg(&security_connector->base); args_copy = grpc_channel_args_copy_and_add( new_args_from_connector != NULL ? new_args_from_connector : args, &connector_arg, 1); - if (grpc_channel_args_is_census_enabled(args)) { - filters[n++] = &grpc_client_census_filter; - } - filters[n++] = &grpc_compress_filter; - filters[n++] = &grpc_client_channel_filter; - GPR_ASSERT(n <= MAX_FILTERS); - channel = grpc_channel_create_from_filters(&exec_ctx, target, filters, n, - args_copy, 1); + channel = grpc_channel_create(&exec_ctx, target, args_copy, + GRPC_CLIENT_CHANNEL, NULL); f = gpr_malloc(sizeof(*f)); f->base.vtable = &subchannel_factory_vtable; diff --git a/src/core/ext/transport/chttp2/server/insecure/README.md b/src/core/ext/transport/chttp2/server/insecure/README.md new file mode 100644 index 00000000000..fc0bc14ed7a --- /dev/null +++ b/src/core/ext/transport/chttp2/server/insecure/README.md @@ -0,0 +1 @@ +Plugin for creating insecure servers using chttp2 diff --git a/src/core/surface/server_chttp2.c b/src/core/ext/transport/chttp2/server/insecure/server_chttp2.c similarity index 91% rename from src/core/surface/server_chttp2.c rename to src/core/ext/transport/chttp2/server/insecure/server_chttp2.c index ce970dfe737..c1ccfbf6390 100644 --- a/src/core/surface/server_chttp2.c +++ b/src/core/ext/transport/chttp2/server/insecure/server_chttp2.c @@ -33,22 +33,19 @@ #include -#include "src/core/channel/http_server_filter.h" -#include "src/core/iomgr/resolve_address.h" -#include "src/core/iomgr/tcp_server.h" -#include "src/core/surface/api_trace.h" -#include "src/core/surface/server.h" -#include "src/core/transport/chttp2_transport.h" #include #include #include +#include "src/core/ext/transport/chttp2/transport/chttp2_transport.h" +#include "src/core/lib/channel/http_server_filter.h" +#include "src/core/lib/iomgr/resolve_address.h" +#include "src/core/lib/iomgr/tcp_server.h" +#include "src/core/lib/surface/api_trace.h" +#include "src/core/lib/surface/server.h" static void setup_transport(grpc_exec_ctx *exec_ctx, void *server, grpc_transport *transport) { - static grpc_channel_filter const *extra_filters[] = { - &grpc_http_server_filter}; - grpc_server_setup_transport(exec_ctx, server, transport, extra_filters, - GPR_ARRAY_SIZE(extra_filters), + grpc_server_setup_transport(exec_ctx, server, transport, grpc_server_get_channel_args(server)); } diff --git a/src/core/ext/transport/chttp2/server/secure/README.md b/src/core/ext/transport/chttp2/server/secure/README.md new file mode 100644 index 00000000000..6bda696a9a4 --- /dev/null +++ b/src/core/ext/transport/chttp2/server/secure/README.md @@ -0,0 +1 @@ +Plugin for creating secure servers using chttp2 diff --git a/src/core/security/server_secure_chttp2.c b/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c similarity index 92% rename from src/core/security/server_secure_chttp2.c rename to src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c index 91547eb26e9..80834f4e885 100644 --- a/src/core/security/server_secure_chttp2.c +++ b/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c @@ -35,22 +35,22 @@ #include -#include "src/core/channel/channel_args.h" -#include "src/core/channel/http_server_filter.h" -#include "src/core/iomgr/endpoint.h" -#include "src/core/iomgr/resolve_address.h" -#include "src/core/iomgr/tcp_server.h" -#include "src/core/security/auth_filters.h" -#include "src/core/security/credentials.h" -#include "src/core/security/security_connector.h" -#include "src/core/security/security_context.h" -#include "src/core/surface/api_trace.h" -#include "src/core/surface/server.h" -#include "src/core/transport/chttp2_transport.h" #include #include #include #include +#include "src/core/ext/transport/chttp2/transport/chttp2_transport.h" +#include "src/core/lib/channel/channel_args.h" +#include "src/core/lib/channel/http_server_filter.h" +#include "src/core/lib/iomgr/endpoint.h" +#include "src/core/lib/iomgr/resolve_address.h" +#include "src/core/lib/iomgr/tcp_server.h" +#include "src/core/lib/security/auth_filters.h" +#include "src/core/lib/security/credentials.h" +#include "src/core/lib/security/security_connector.h" +#include "src/core/lib/security/security_context.h" +#include "src/core/lib/surface/api_trace.h" +#include "src/core/lib/surface/server.h" typedef struct grpc_server_secure_state { grpc_server *server; @@ -83,8 +83,6 @@ static void state_unref(grpc_server_secure_state *state) { static void setup_transport(grpc_exec_ctx *exec_ctx, void *statep, grpc_transport *transport, grpc_auth_context *auth_context) { - static grpc_channel_filter const *extra_filters[] = { - &grpc_server_auth_filter, &grpc_http_server_filter}; grpc_server_secure_state *state = statep; grpc_channel_args *args_copy; grpc_arg args_to_add[2]; @@ -93,8 +91,7 @@ static void setup_transport(grpc_exec_ctx *exec_ctx, void *statep, args_copy = grpc_channel_args_copy_and_add( grpc_server_get_channel_args(state->server), args_to_add, GPR_ARRAY_SIZE(args_to_add)); - grpc_server_setup_transport(exec_ctx, state->server, transport, extra_filters, - GPR_ARRAY_SIZE(extra_filters), args_copy); + grpc_server_setup_transport(exec_ctx, state->server, transport, args_copy); grpc_channel_args_destroy(args_copy); } diff --git a/src/core/ext/transport/chttp2/transport/README.md b/src/core/ext/transport/chttp2/transport/README.md new file mode 100644 index 00000000000..4684e587593 --- /dev/null +++ b/src/core/ext/transport/chttp2/transport/README.md @@ -0,0 +1,4 @@ +chttp2 transport plugin - implements grpc over http2 + +Used by chttp2/{client,server}/{insecure,secure} plugins to implement most of +their functionality diff --git a/src/core/transport/chttp2/alpn.c b/src/core/ext/transport/chttp2/transport/alpn.c similarity index 95% rename from src/core/transport/chttp2/alpn.c rename to src/core/ext/transport/chttp2/transport/alpn.c index 69da4e6718e..c901905d025 100644 --- a/src/core/transport/chttp2/alpn.c +++ b/src/core/ext/transport/chttp2/transport/alpn.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,7 +31,7 @@ * */ -#include "src/core/transport/chttp2/alpn.h" +#include "src/core/ext/transport/chttp2/transport/alpn.h" #include #include diff --git a/src/core/transport/chttp2/alpn.h b/src/core/ext/transport/chttp2/transport/alpn.h similarity index 90% rename from src/core/transport/chttp2/alpn.h rename to src/core/ext/transport/chttp2/transport/alpn.h index f38b4c3167e..94843a14568 100644 --- a/src/core/transport/chttp2/alpn.h +++ b/src/core/ext/transport/chttp2/transport/alpn.h @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,8 +31,8 @@ * */ -#ifndef GRPC_INTERNAL_CORE_TRANSPORT_CHTTP2_ALPN_H -#define GRPC_INTERNAL_CORE_TRANSPORT_CHTTP2_ALPN_H +#ifndef GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_ALPN_H +#define GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_ALPN_H #include @@ -46,4 +46,4 @@ size_t grpc_chttp2_num_alpn_versions(void); * grpc_chttp2_num_alpn_versions()) */ const char *grpc_chttp2_get_alpn_version_index(size_t i); -#endif /* GRPC_INTERNAL_CORE_TRANSPORT_CHTTP2_ALPN_H */ +#endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_ALPN_H */ diff --git a/src/core/transport/chttp2/bin_encoder.c b/src/core/ext/transport/chttp2/transport/bin_encoder.c similarity index 65% rename from src/core/transport/chttp2/bin_encoder.c rename to src/core/ext/transport/chttp2/transport/bin_encoder.c index f26bc7e29b1..d39f99c2710 100644 --- a/src/core/transport/chttp2/bin_encoder.c +++ b/src/core/ext/transport/chttp2/transport/bin_encoder.c @@ -31,12 +31,12 @@ * */ -#include "src/core/transport/chttp2/bin_encoder.h" +#include "src/core/ext/transport/chttp2/transport/bin_encoder.h" #include -#include "src/core/transport/chttp2/huffsyms.h" #include +#include "src/core/ext/transport/chttp2/transport/huffsyms.h" static const char alphabet[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; @@ -46,70 +46,18 @@ typedef struct { uint8_t length; } b64_huff_sym; -static const b64_huff_sym huff_alphabet[64] = {{0x21, 6}, - {0x5d, 7}, - {0x5e, 7}, - {0x5f, 7}, - {0x60, 7}, - {0x61, 7}, - {0x62, 7}, - {0x63, 7}, - {0x64, 7}, - {0x65, 7}, - {0x66, 7}, - {0x67, 7}, - {0x68, 7}, - {0x69, 7}, - {0x6a, 7}, - {0x6b, 7}, - {0x6c, 7}, - {0x6d, 7}, - {0x6e, 7}, - {0x6f, 7}, - {0x70, 7}, - {0x71, 7}, - {0x72, 7}, - {0xfc, 8}, - {0x73, 7}, - {0xfd, 8}, - {0x3, 5}, - {0x23, 6}, - {0x4, 5}, - {0x24, 6}, - {0x5, 5}, - {0x25, 6}, - {0x26, 6}, - {0x27, 6}, - {0x6, 5}, - {0x74, 7}, - {0x75, 7}, - {0x28, 6}, - {0x29, 6}, - {0x2a, 6}, - {0x7, 5}, - {0x2b, 6}, - {0x76, 7}, - {0x2c, 6}, - {0x8, 5}, - {0x9, 5}, - {0x2d, 6}, - {0x77, 7}, - {0x78, 7}, - {0x79, 7}, - {0x7a, 7}, - {0x7b, 7}, - {0x0, 5}, - {0x1, 5}, - {0x2, 5}, - {0x19, 6}, - {0x1a, 6}, - {0x1b, 6}, - {0x1c, 6}, - {0x1d, 6}, - {0x1e, 6}, - {0x1f, 6}, - {0x7fb, 11}, - {0x18, 6}}; +static const b64_huff_sym huff_alphabet[64] = { + {0x21, 6}, {0x5d, 7}, {0x5e, 7}, {0x5f, 7}, {0x60, 7}, {0x61, 7}, + {0x62, 7}, {0x63, 7}, {0x64, 7}, {0x65, 7}, {0x66, 7}, {0x67, 7}, + {0x68, 7}, {0x69, 7}, {0x6a, 7}, {0x6b, 7}, {0x6c, 7}, {0x6d, 7}, + {0x6e, 7}, {0x6f, 7}, {0x70, 7}, {0x71, 7}, {0x72, 7}, {0xfc, 8}, + {0x73, 7}, {0xfd, 8}, {0x3, 5}, {0x23, 6}, {0x4, 5}, {0x24, 6}, + {0x5, 5}, {0x25, 6}, {0x26, 6}, {0x27, 6}, {0x6, 5}, {0x74, 7}, + {0x75, 7}, {0x28, 6}, {0x29, 6}, {0x2a, 6}, {0x7, 5}, {0x2b, 6}, + {0x76, 7}, {0x2c, 6}, {0x8, 5}, {0x9, 5}, {0x2d, 6}, {0x77, 7}, + {0x78, 7}, {0x79, 7}, {0x7a, 7}, {0x7b, 7}, {0x0, 5}, {0x1, 5}, + {0x2, 5}, {0x19, 6}, {0x1a, 6}, {0x1b, 6}, {0x1c, 6}, {0x1d, 6}, + {0x1e, 6}, {0x1f, 6}, {0x7fb, 11}, {0x18, 6}}; static const uint8_t tail_xtra[3] = {0, 2, 3}; diff --git a/src/core/transport/chttp2/bin_encoder.h b/src/core/ext/transport/chttp2/transport/bin_encoder.h similarity index 91% rename from src/core/transport/chttp2/bin_encoder.h rename to src/core/ext/transport/chttp2/transport/bin_encoder.h index 036fddf9981..39dae973c9d 100644 --- a/src/core/transport/chttp2/bin_encoder.h +++ b/src/core/ext/transport/chttp2/transport/bin_encoder.h @@ -31,8 +31,8 @@ * */ -#ifndef GRPC_INTERNAL_CORE_TRANSPORT_CHTTP2_BIN_ENCODER_H -#define GRPC_INTERNAL_CORE_TRANSPORT_CHTTP2_BIN_ENCODER_H +#ifndef GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_BIN_ENCODER_H +#define GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_BIN_ENCODER_H #include @@ -51,4 +51,4 @@ gpr_slice grpc_chttp2_huffman_compress(gpr_slice input); return y; */ gpr_slice grpc_chttp2_base64_encode_and_huffman_compress(gpr_slice input); -#endif /* GRPC_INTERNAL_CORE_TRANSPORT_CHTTP2_BIN_ENCODER_H */ +#endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_BIN_ENCODER_H */ diff --git a/src/core/transport/chttp2_transport.c b/src/core/ext/transport/chttp2/transport/chttp2_transport.c similarity index 98% rename from src/core/transport/chttp2_transport.c rename to src/core/ext/transport/chttp2/transport/chttp2_transport.c index 03444fd4c24..0a307a73a64 100644 --- a/src/core/transport/chttp2_transport.c +++ b/src/core/ext/transport/chttp2/transport/chttp2_transport.c @@ -31,7 +31,7 @@ * */ -#include "src/core/transport/chttp2_transport.h" +#include "src/core/ext/transport/chttp2/transport/chttp2_transport.h" #include #include @@ -43,14 +43,14 @@ #include #include -#include "src/core/profiling/timers.h" -#include "src/core/support/string.h" -#include "src/core/transport/chttp2/http2_errors.h" -#include "src/core/transport/chttp2/internal.h" -#include "src/core/transport/chttp2/status_conversion.h" -#include "src/core/transport/chttp2/timeout_encoding.h" -#include "src/core/transport/static_metadata.h" -#include "src/core/transport/transport_impl.h" +#include "src/core/ext/transport/chttp2/transport/http2_errors.h" +#include "src/core/ext/transport/chttp2/transport/internal.h" +#include "src/core/ext/transport/chttp2/transport/status_conversion.h" +#include "src/core/ext/transport/chttp2/transport/timeout_encoding.h" +#include "src/core/lib/profiling/timers.h" +#include "src/core/lib/support/string.h" +#include "src/core/lib/transport/static_metadata.h" +#include "src/core/lib/transport/transport_impl.h" #define DEFAULT_WINDOW 65535 #define DEFAULT_CONNECTION_WINDOW_TARGET (1024 * 1024) @@ -1398,8 +1398,8 @@ static void recv_data(grpc_exec_ctx *exec_ctx, void *tp, bool success) { gpr_mu_unlock(&t->mu); GPR_TIMER_BEGIN("recv_data.parse", 0); for (; i < t->read_buffer.count && - grpc_chttp2_perform_read(exec_ctx, transport_parsing, - t->read_buffer.slices[i]); + grpc_chttp2_perform_read(exec_ctx, transport_parsing, + t->read_buffer.slices[i]); i++) ; GPR_TIMER_END("recv_data.parse", 0); @@ -1474,9 +1474,10 @@ static void connectivity_state_set( grpc_connectivity_state state, const char *reason) { GRPC_CHTTP2_IF_TRACING( gpr_log(GPR_DEBUG, "set connectivity_state=%d", state)); - grpc_connectivity_state_set(exec_ctx, &TRANSPORT_FROM_GLOBAL(transport_global) - ->channel_callback.state_tracker, - state, reason); + grpc_connectivity_state_set( + exec_ctx, + &TRANSPORT_FROM_GLOBAL(transport_global)->channel_callback.state_tracker, + state, reason); } /******************************************************************************* @@ -1756,9 +1757,15 @@ static char *chttp2_get_peer(grpc_exec_ctx *exec_ctx, grpc_transport *t) { return gpr_strdup(((grpc_chttp2_transport *)t)->peer_string); } -static const grpc_transport_vtable vtable = { - sizeof(grpc_chttp2_stream), init_stream, set_pollset, perform_stream_op, - perform_transport_op, destroy_stream, destroy_transport, chttp2_get_peer}; +static const grpc_transport_vtable vtable = {sizeof(grpc_chttp2_stream), + "chttp2", + init_stream, + set_pollset, + perform_stream_op, + perform_transport_op, + destroy_stream, + destroy_transport, + chttp2_get_peer}; grpc_transport *grpc_create_chttp2_transport( grpc_exec_ctx *exec_ctx, const grpc_channel_args *channel_args, diff --git a/src/core/transport/chttp2_transport.h b/src/core/ext/transport/chttp2/transport/chttp2_transport.h similarity index 85% rename from src/core/transport/chttp2_transport.h rename to src/core/ext/transport/chttp2/transport/chttp2_transport.h index 95520501edd..8ebf9fced62 100644 --- a/src/core/transport/chttp2_transport.h +++ b/src/core/ext/transport/chttp2/transport/chttp2_transport.h @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,11 +31,11 @@ * */ -#ifndef GRPC_INTERNAL_CORE_TRANSPORT_CHTTP2_TRANSPORT_H -#define GRPC_INTERNAL_CORE_TRANSPORT_CHTTP2_TRANSPORT_H +#ifndef GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_CHTTP2_TRANSPORT_H +#define GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_CHTTP2_TRANSPORT_H -#include "src/core/iomgr/endpoint.h" -#include "src/core/transport/transport.h" +#include "src/core/lib/iomgr/endpoint.h" +#include "src/core/lib/transport/transport.h" extern int grpc_http_trace; extern int grpc_flowctl_trace; @@ -48,4 +48,4 @@ void grpc_chttp2_transport_start_reading(grpc_exec_ctx *exec_ctx, grpc_transport *transport, gpr_slice *slices, size_t nslices); -#endif /* GRPC_INTERNAL_CORE_TRANSPORT_CHTTP2_TRANSPORT_H */ +#endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_CHTTP2_TRANSPORT_H */ diff --git a/src/core/transport/chttp2/frame.h b/src/core/ext/transport/chttp2/transport/frame.h similarity index 92% rename from src/core/transport/chttp2/frame.h rename to src/core/ext/transport/chttp2/transport/frame.h index 879ee036fac..e1311a18055 100644 --- a/src/core/transport/chttp2/frame.h +++ b/src/core/ext/transport/chttp2/transport/frame.h @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,8 +31,8 @@ * */ -#ifndef GRPC_INTERNAL_CORE_TRANSPORT_CHTTP2_FRAME_H -#define GRPC_INTERNAL_CORE_TRANSPORT_CHTTP2_FRAME_H +#ifndef GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_FRAME_H +#define GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_FRAME_H #include #include @@ -66,4 +66,4 @@ typedef struct grpc_chttp2_transport_parsing grpc_chttp2_transport_parsing; #define GRPC_CHTTP2_DATA_FLAG_PADDED 8 #define GRPC_CHTTP2_FLAG_HAS_PRIORITY 0x20 -#endif /* GRPC_INTERNAL_CORE_TRANSPORT_CHTTP2_FRAME_H */ +#endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_FRAME_H */ diff --git a/src/core/transport/chttp2/frame_data.c b/src/core/ext/transport/chttp2/transport/frame_data.c similarity index 97% rename from src/core/transport/chttp2/frame_data.c rename to src/core/ext/transport/chttp2/transport/frame_data.c index f9a1af88736..cdd624647c8 100644 --- a/src/core/transport/chttp2/frame_data.c +++ b/src/core/ext/transport/chttp2/transport/frame_data.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,16 +31,16 @@ * */ -#include "src/core/transport/chttp2/frame_data.h" +#include "src/core/ext/transport/chttp2/transport/frame_data.h" #include -#include "src/core/transport/chttp2/internal.h" -#include "src/core/support/string.h" #include #include #include -#include "src/core/transport/transport.h" +#include "src/core/ext/transport/chttp2/transport/internal.h" +#include "src/core/lib/support/string.h" +#include "src/core/lib/transport/transport.h" grpc_chttp2_parse_error grpc_chttp2_data_parser_init( grpc_chttp2_data_parser *parser) { diff --git a/src/core/transport/chttp2/frame_data.h b/src/core/ext/transport/chttp2/transport/frame_data.h similarity index 90% rename from src/core/transport/chttp2/frame_data.h rename to src/core/ext/transport/chttp2/transport/frame_data.h index 936b7a25899..f2762ed9de8 100644 --- a/src/core/transport/chttp2/frame_data.h +++ b/src/core/ext/transport/chttp2/transport/frame_data.h @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,16 +31,16 @@ * */ -#ifndef GRPC_INTERNAL_CORE_TRANSPORT_CHTTP2_FRAME_DATA_H -#define GRPC_INTERNAL_CORE_TRANSPORT_CHTTP2_FRAME_DATA_H +#ifndef GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_FRAME_DATA_H +#define GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_FRAME_DATA_H /* Parser for GRPC streams embedded in DATA frames */ -#include "src/core/iomgr/exec_ctx.h" #include #include -#include "src/core/transport/byte_stream.h" -#include "src/core/transport/chttp2/frame.h" +#include "src/core/ext/transport/chttp2/transport/frame.h" +#include "src/core/lib/iomgr/exec_ctx.h" +#include "src/core/lib/transport/byte_stream.h" typedef enum { GRPC_CHTTP2_DATA_FH_0, @@ -98,4 +98,4 @@ void grpc_chttp2_encode_data(uint32_t id, gpr_slice_buffer *inbuf, uint32_t write_bytes, int is_eof, gpr_slice_buffer *outbuf); -#endif /* GRPC_INTERNAL_CORE_TRANSPORT_CHTTP2_FRAME_DATA_H */ +#endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_FRAME_DATA_H */ diff --git a/src/core/transport/chttp2/frame_goaway.c b/src/core/ext/transport/chttp2/transport/frame_goaway.c similarity index 97% rename from src/core/transport/chttp2/frame_goaway.c rename to src/core/ext/transport/chttp2/transport/frame_goaway.c index 2fa525e989e..3697fdef418 100644 --- a/src/core/transport/chttp2/frame_goaway.c +++ b/src/core/ext/transport/chttp2/transport/frame_goaway.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,8 +31,8 @@ * */ -#include "src/core/transport/chttp2/frame_goaway.h" -#include "src/core/transport/chttp2/internal.h" +#include "src/core/ext/transport/chttp2/transport/frame_goaway.h" +#include "src/core/ext/transport/chttp2/transport/internal.h" #include diff --git a/src/core/transport/chttp2/frame_goaway.h b/src/core/ext/transport/chttp2/transport/frame_goaway.h similarity index 89% rename from src/core/transport/chttp2/frame_goaway.h rename to src/core/ext/transport/chttp2/transport/frame_goaway.h index e1a72b40134..e6551344349 100644 --- a/src/core/transport/chttp2/frame_goaway.h +++ b/src/core/ext/transport/chttp2/transport/frame_goaway.h @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,14 +31,14 @@ * */ -#ifndef GRPC_INTERNAL_CORE_TRANSPORT_CHTTP2_FRAME_GOAWAY_H -#define GRPC_INTERNAL_CORE_TRANSPORT_CHTTP2_FRAME_GOAWAY_H +#ifndef GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_FRAME_GOAWAY_H +#define GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_FRAME_GOAWAY_H -#include "src/core/iomgr/exec_ctx.h" -#include "src/core/transport/chttp2/frame.h" #include #include #include +#include "src/core/ext/transport/chttp2/transport/frame.h" +#include "src/core/lib/iomgr/exec_ctx.h" typedef enum { GRPC_CHTTP2_GOAWAY_LSI0, @@ -74,4 +74,4 @@ void grpc_chttp2_goaway_append(uint32_t last_stream_id, uint32_t error_code, gpr_slice debug_data, gpr_slice_buffer *slice_buffer); -#endif /* GRPC_INTERNAL_CORE_TRANSPORT_CHTTP2_FRAME_GOAWAY_H */ +#endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_FRAME_GOAWAY_H */ diff --git a/src/core/transport/chttp2/frame_ping.c b/src/core/ext/transport/chttp2/transport/frame_ping.c similarity index 95% rename from src/core/transport/chttp2/frame_ping.c rename to src/core/ext/transport/chttp2/transport/frame_ping.c index c6ab522283d..c0192a734d7 100644 --- a/src/core/transport/chttp2/frame_ping.c +++ b/src/core/ext/transport/chttp2/transport/frame_ping.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,8 +31,8 @@ * */ -#include "src/core/transport/chttp2/frame_ping.h" -#include "src/core/transport/chttp2/internal.h" +#include "src/core/ext/transport/chttp2/transport/frame_ping.h" +#include "src/core/ext/transport/chttp2/transport/internal.h" #include diff --git a/src/core/transport/chttp2/frame_ping.h b/src/core/ext/transport/chttp2/transport/frame_ping.h similarity index 86% rename from src/core/transport/chttp2/frame_ping.h rename to src/core/ext/transport/chttp2/transport/frame_ping.h index 16d7a726186..1c1d513c993 100644 --- a/src/core/transport/chttp2/frame_ping.h +++ b/src/core/ext/transport/chttp2/transport/frame_ping.h @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,12 +31,12 @@ * */ -#ifndef GRPC_INTERNAL_CORE_TRANSPORT_CHTTP2_FRAME_PING_H -#define GRPC_INTERNAL_CORE_TRANSPORT_CHTTP2_FRAME_PING_H +#ifndef GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_FRAME_PING_H +#define GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_FRAME_PING_H -#include "src/core/iomgr/exec_ctx.h" #include -#include "src/core/transport/chttp2/frame.h" +#include "src/core/ext/transport/chttp2/transport/frame.h" +#include "src/core/lib/iomgr/exec_ctx.h" typedef struct { uint8_t byte; @@ -53,4 +53,4 @@ grpc_chttp2_parse_error grpc_chttp2_ping_parser_parse( grpc_chttp2_transport_parsing *transport_parsing, grpc_chttp2_stream_parsing *stream_parsing, gpr_slice slice, int is_last); -#endif /* GRPC_INTERNAL_CORE_TRANSPORT_CHTTP2_FRAME_PING_H */ +#endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_FRAME_PING_H */ diff --git a/src/core/transport/chttp2/frame_rst_stream.c b/src/core/ext/transport/chttp2/transport/frame_rst_stream.c similarity index 93% rename from src/core/transport/chttp2/frame_rst_stream.c rename to src/core/ext/transport/chttp2/transport/frame_rst_stream.c index 754529e4b92..acfc3627e85 100644 --- a/src/core/transport/chttp2/frame_rst_stream.c +++ b/src/core/ext/transport/chttp2/transport/frame_rst_stream.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,12 +31,12 @@ * */ -#include "src/core/transport/chttp2/frame_rst_stream.h" -#include "src/core/transport/chttp2/internal.h" +#include "src/core/ext/transport/chttp2/transport/frame_rst_stream.h" +#include "src/core/ext/transport/chttp2/transport/internal.h" #include -#include "src/core/transport/chttp2/frame.h" +#include "src/core/ext/transport/chttp2/transport/frame.h" gpr_slice grpc_chttp2_rst_stream_create(uint32_t id, uint32_t code) { gpr_slice slice = gpr_slice_malloc(13); diff --git a/src/core/transport/chttp2/frame_rst_stream.h b/src/core/ext/transport/chttp2/transport/frame_rst_stream.h similarity index 86% rename from src/core/transport/chttp2/frame_rst_stream.h rename to src/core/ext/transport/chttp2/transport/frame_rst_stream.h index 72ca654c324..134f1368a01 100644 --- a/src/core/transport/chttp2/frame_rst_stream.h +++ b/src/core/ext/transport/chttp2/transport/frame_rst_stream.h @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,12 +31,12 @@ * */ -#ifndef GRPC_INTERNAL_CORE_TRANSPORT_CHTTP2_FRAME_RST_STREAM_H -#define GRPC_INTERNAL_CORE_TRANSPORT_CHTTP2_FRAME_RST_STREAM_H +#ifndef GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_FRAME_RST_STREAM_H +#define GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_FRAME_RST_STREAM_H #include -#include "src/core/transport/chttp2/frame.h" -#include "src/core/iomgr/exec_ctx.h" +#include "src/core/ext/transport/chttp2/transport/frame.h" +#include "src/core/lib/iomgr/exec_ctx.h" typedef struct { uint8_t byte; @@ -52,4 +52,4 @@ grpc_chttp2_parse_error grpc_chttp2_rst_stream_parser_parse( grpc_chttp2_transport_parsing *transport_parsing, grpc_chttp2_stream_parsing *stream_parsing, gpr_slice slice, int is_last); -#endif /* GRPC_INTERNAL_CORE_TRANSPORT_CHTTP2_FRAME_RST_STREAM_H */ +#endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_FRAME_RST_STREAM_H */ diff --git a/src/core/transport/chttp2/frame_settings.c b/src/core/ext/transport/chttp2/transport/frame_settings.c similarity index 95% rename from src/core/transport/chttp2/frame_settings.c rename to src/core/ext/transport/chttp2/transport/frame_settings.c index cc49dd4f692..799d87b87d0 100644 --- a/src/core/transport/chttp2/frame_settings.c +++ b/src/core/ext/transport/chttp2/transport/frame_settings.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,18 +31,18 @@ * */ -#include "src/core/transport/chttp2/frame_settings.h" -#include "src/core/transport/chttp2/internal.h" +#include "src/core/ext/transport/chttp2/transport/frame_settings.h" +#include "src/core/ext/transport/chttp2/transport/internal.h" #include #include #include -#include "src/core/debug/trace.h" -#include "src/core/transport/chttp2/frame.h" -#include "src/core/transport/chttp2/http2_errors.h" -#include "src/core/transport/chttp2_transport.h" +#include "src/core/ext/transport/chttp2/transport/chttp2_transport.h" +#include "src/core/ext/transport/chttp2/transport/frame.h" +#include "src/core/ext/transport/chttp2/transport/http2_errors.h" +#include "src/core/lib/debug/trace.h" #define MAX_MAX_HEADER_LIST_SIZE (1024 * 1024 * 1024) diff --git a/src/core/transport/chttp2/frame_settings.h b/src/core/ext/transport/chttp2/transport/frame_settings.h similarity index 91% rename from src/core/transport/chttp2/frame_settings.h rename to src/core/ext/transport/chttp2/transport/frame_settings.h index 3c918e3a2a9..73524addf0e 100644 --- a/src/core/transport/chttp2/frame_settings.h +++ b/src/core/ext/transport/chttp2/transport/frame_settings.h @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,13 +31,13 @@ * */ -#ifndef GRPC_INTERNAL_CORE_TRANSPORT_CHTTP2_FRAME_SETTINGS_H -#define GRPC_INTERNAL_CORE_TRANSPORT_CHTTP2_FRAME_SETTINGS_H +#ifndef GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_FRAME_SETTINGS_H +#define GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_FRAME_SETTINGS_H #include #include -#include "src/core/transport/chttp2/frame.h" -#include "src/core/iomgr/exec_ctx.h" +#include "src/core/ext/transport/chttp2/transport/frame.h" +#include "src/core/lib/iomgr/exec_ctx.h" typedef enum { GRPC_CHTTP2_SPS_ID0, @@ -100,4 +100,4 @@ grpc_chttp2_parse_error grpc_chttp2_settings_parser_parse( grpc_chttp2_transport_parsing *transport_parsing, grpc_chttp2_stream_parsing *stream_parsing, gpr_slice slice, int is_last); -#endif /* GRPC_INTERNAL_CORE_TRANSPORT_CHTTP2_FRAME_SETTINGS_H */ +#endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_FRAME_SETTINGS_H */ diff --git a/src/core/transport/chttp2/frame_window_update.c b/src/core/ext/transport/chttp2/transport/frame_window_update.c similarity index 95% rename from src/core/transport/chttp2/frame_window_update.c rename to src/core/ext/transport/chttp2/transport/frame_window_update.c index 62d9bac1179..1a561cebafb 100644 --- a/src/core/transport/chttp2/frame_window_update.c +++ b/src/core/ext/transport/chttp2/transport/frame_window_update.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,8 +31,8 @@ * */ -#include "src/core/transport/chttp2/frame_window_update.h" -#include "src/core/transport/chttp2/internal.h" +#include "src/core/ext/transport/chttp2/transport/frame_window_update.h" +#include "src/core/ext/transport/chttp2/transport/internal.h" #include diff --git a/src/core/transport/chttp2/frame_window_update.h b/src/core/ext/transport/chttp2/transport/frame_window_update.h similarity index 85% rename from src/core/transport/chttp2/frame_window_update.h rename to src/core/ext/transport/chttp2/transport/frame_window_update.h index 89d835c0797..f9f670b6f14 100644 --- a/src/core/transport/chttp2/frame_window_update.h +++ b/src/core/ext/transport/chttp2/transport/frame_window_update.h @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,12 +31,12 @@ * */ -#ifndef GRPC_INTERNAL_CORE_TRANSPORT_CHTTP2_FRAME_WINDOW_UPDATE_H -#define GRPC_INTERNAL_CORE_TRANSPORT_CHTTP2_FRAME_WINDOW_UPDATE_H +#ifndef GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_FRAME_WINDOW_UPDATE_H +#define GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_FRAME_WINDOW_UPDATE_H -#include "src/core/iomgr/exec_ctx.h" #include -#include "src/core/transport/chttp2/frame.h" +#include "src/core/ext/transport/chttp2/transport/frame.h" +#include "src/core/lib/iomgr/exec_ctx.h" typedef struct { uint8_t byte; @@ -53,4 +53,4 @@ grpc_chttp2_parse_error grpc_chttp2_window_update_parser_parse( grpc_chttp2_transport_parsing *transport_parsing, grpc_chttp2_stream_parsing *stream_parsing, gpr_slice slice, int is_last); -#endif /* GRPC_INTERNAL_CORE_TRANSPORT_CHTTP2_FRAME_WINDOW_UPDATE_H */ +#endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_FRAME_WINDOW_UPDATE_H */ diff --git a/src/core/transport/chttp2/hpack_encoder.c b/src/core/ext/transport/chttp2/transport/hpack_encoder.c similarity index 98% rename from src/core/transport/chttp2/hpack_encoder.c rename to src/core/ext/transport/chttp2/transport/hpack_encoder.c index f30f574d063..819addd9e30 100644 --- a/src/core/transport/chttp2/hpack_encoder.c +++ b/src/core/ext/transport/chttp2/transport/hpack_encoder.c @@ -31,7 +31,7 @@ * */ -#include "src/core/transport/chttp2/hpack_encoder.h" +#include "src/core/ext/transport/chttp2/transport/hpack_encoder.h" #include #include @@ -45,11 +45,11 @@ #include #include -#include "src/core/transport/chttp2/bin_encoder.h" -#include "src/core/transport/chttp2/hpack_table.h" -#include "src/core/transport/chttp2/timeout_encoding.h" -#include "src/core/transport/chttp2/varint.h" -#include "src/core/transport/static_metadata.h" +#include "src/core/ext/transport/chttp2/transport/bin_encoder.h" +#include "src/core/ext/transport/chttp2/transport/hpack_table.h" +#include "src/core/ext/transport/chttp2/transport/timeout_encoding.h" +#include "src/core/ext/transport/chttp2/transport/varint.h" +#include "src/core/lib/transport/static_metadata.h" #define HASH_FRAGMENT_1(x) ((x)&255) #define HASH_FRAGMENT_2(x) ((x >> 8) & 255) diff --git a/src/core/transport/chttp2/hpack_encoder.h b/src/core/ext/transport/chttp2/transport/hpack_encoder.h similarity index 90% rename from src/core/transport/chttp2/hpack_encoder.h rename to src/core/ext/transport/chttp2/transport/hpack_encoder.h index 19b5cb72ae1..d79de35979c 100644 --- a/src/core/transport/chttp2/hpack_encoder.h +++ b/src/core/ext/transport/chttp2/transport/hpack_encoder.h @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,15 +31,15 @@ * */ -#ifndef GRPC_INTERNAL_CORE_TRANSPORT_CHTTP2_HPACK_ENCODER_H -#define GRPC_INTERNAL_CORE_TRANSPORT_CHTTP2_HPACK_ENCODER_H +#ifndef GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_HPACK_ENCODER_H +#define GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_HPACK_ENCODER_H -#include "src/core/transport/chttp2/frame.h" -#include "src/core/transport/metadata.h" -#include "src/core/transport/metadata_batch.h" #include #include #include +#include "src/core/ext/transport/chttp2/transport/frame.h" +#include "src/core/lib/transport/metadata.h" +#include "src/core/lib/transport/metadata_batch.h" #define GRPC_CHTTP2_HPACKC_NUM_FILTERS 256 #define GRPC_CHTTP2_HPACKC_NUM_VALUES 256 @@ -92,4 +92,4 @@ void grpc_chttp2_encode_header(grpc_chttp2_hpack_compressor *c, uint32_t id, grpc_metadata_batch *metadata, int is_eof, gpr_slice_buffer *outbuf); -#endif /* GRPC_INTERNAL_CORE_TRANSPORT_CHTTP2_HPACK_ENCODER_H */ +#endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_HPACK_ENCODER_H */ diff --git a/src/core/transport/chttp2/hpack_parser.c b/src/core/ext/transport/chttp2/transport/hpack_parser.c similarity index 99% rename from src/core/transport/chttp2/hpack_parser.c rename to src/core/ext/transport/chttp2/transport/hpack_parser.c index a63c7db1f61..58e90f98f2c 100644 --- a/src/core/transport/chttp2/hpack_parser.c +++ b/src/core/ext/transport/chttp2/transport/hpack_parser.c @@ -31,12 +31,12 @@ * */ -#include "src/core/transport/chttp2/hpack_parser.h" -#include "src/core/transport/chttp2/internal.h" +#include "src/core/ext/transport/chttp2/transport/hpack_parser.h" +#include "src/core/ext/transport/chttp2/transport/internal.h" +#include #include #include -#include /* This is here for grpc_is_binary_header * TODO(murgatroid99): Remove this @@ -48,9 +48,9 @@ #include #include -#include "src/core/profiling/timers.h" -#include "src/core/support/string.h" -#include "src/core/transport/chttp2/bin_encoder.h" +#include "src/core/ext/transport/chttp2/transport/bin_encoder.h" +#include "src/core/lib/profiling/timers.h" +#include "src/core/lib/support/string.h" typedef enum { NOT_BINARY, diff --git a/src/core/transport/chttp2/hpack_parser.h b/src/core/ext/transport/chttp2/transport/hpack_parser.h similarity index 90% rename from src/core/transport/chttp2/hpack_parser.h rename to src/core/ext/transport/chttp2/transport/hpack_parser.h index 1ad0c64fb9c..0aaddc8b9c7 100644 --- a/src/core/transport/chttp2/hpack_parser.h +++ b/src/core/ext/transport/chttp2/transport/hpack_parser.h @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,16 +31,16 @@ * */ -#ifndef GRPC_INTERNAL_CORE_TRANSPORT_CHTTP2_HPACK_PARSER_H -#define GRPC_INTERNAL_CORE_TRANSPORT_CHTTP2_HPACK_PARSER_H +#ifndef GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_HPACK_PARSER_H +#define GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_HPACK_PARSER_H #include #include -#include "src/core/iomgr/exec_ctx.h" -#include "src/core/transport/chttp2/frame.h" -#include "src/core/transport/chttp2/hpack_table.h" -#include "src/core/transport/metadata.h" +#include "src/core/ext/transport/chttp2/transport/frame.h" +#include "src/core/ext/transport/chttp2/transport/hpack_table.h" +#include "src/core/lib/iomgr/exec_ctx.h" +#include "src/core/lib/transport/metadata.h" typedef struct grpc_chttp2_hpack_parser grpc_chttp2_hpack_parser; @@ -113,4 +113,4 @@ grpc_chttp2_parse_error grpc_chttp2_header_parser_parse( grpc_chttp2_transport_parsing *transport_parsing, grpc_chttp2_stream_parsing *stream_parsing, gpr_slice slice, int is_last); -#endif /* GRPC_INTERNAL_CORE_TRANSPORT_CHTTP2_HPACK_PARSER_H */ +#endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_HPACK_PARSER_H */ diff --git a/src/core/transport/chttp2/hpack_table.c b/src/core/ext/transport/chttp2/transport/hpack_table.c similarity index 98% rename from src/core/transport/chttp2/hpack_table.c rename to src/core/ext/transport/chttp2/transport/hpack_table.c index f1ce3b84fdc..d02f4ddc61d 100644 --- a/src/core/transport/chttp2/hpack_table.c +++ b/src/core/ext/transport/chttp2/transport/hpack_table.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,7 +31,7 @@ * */ -#include "src/core/transport/chttp2/hpack_table.h" +#include "src/core/ext/transport/chttp2/transport/hpack_table.h" #include #include @@ -39,7 +39,7 @@ #include #include -#include "src/core/support/murmur_hash.h" +#include "src/core/lib/support/murmur_hash.h" static struct { const char *key; diff --git a/src/core/transport/chttp2/hpack_table.h b/src/core/ext/transport/chttp2/transport/hpack_table.h similarity index 94% rename from src/core/transport/chttp2/hpack_table.h rename to src/core/ext/transport/chttp2/transport/hpack_table.h index e7431255fc7..b3475c8f5c3 100644 --- a/src/core/transport/chttp2/hpack_table.h +++ b/src/core/ext/transport/chttp2/transport/hpack_table.h @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,12 +31,12 @@ * */ -#ifndef GRPC_INTERNAL_CORE_TRANSPORT_CHTTP2_HPACK_TABLE_H -#define GRPC_INTERNAL_CORE_TRANSPORT_CHTTP2_HPACK_TABLE_H +#ifndef GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_HPACK_TABLE_H +#define GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_HPACK_TABLE_H -#include "src/core/transport/metadata.h" #include #include +#include "src/core/lib/transport/metadata.h" /* HPACK header table */ @@ -105,4 +105,4 @@ typedef struct { grpc_chttp2_hptbl_find_result grpc_chttp2_hptbl_find( const grpc_chttp2_hptbl *tbl, grpc_mdelem *md); -#endif /* GRPC_INTERNAL_CORE_TRANSPORT_CHTTP2_HPACK_TABLE_H */ +#endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_HPACK_TABLE_H */ diff --git a/src/core/transport/chttp2/hpack_tables.txt b/src/core/ext/transport/chttp2/transport/hpack_tables.txt similarity index 100% rename from src/core/transport/chttp2/hpack_tables.txt rename to src/core/ext/transport/chttp2/transport/hpack_tables.txt diff --git a/src/core/transport/chttp2/http2_errors.h b/src/core/ext/transport/chttp2/transport/http2_errors.h similarity index 90% rename from src/core/transport/chttp2/http2_errors.h rename to src/core/ext/transport/chttp2/transport/http2_errors.h index a4f309e0565..85542e23370 100644 --- a/src/core/transport/chttp2/http2_errors.h +++ b/src/core/ext/transport/chttp2/transport/http2_errors.h @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,8 +31,8 @@ * */ -#ifndef GRPC_INTERNAL_CORE_TRANSPORT_CHTTP2_HTTP2_ERRORS_H -#define GRPC_INTERNAL_CORE_TRANSPORT_CHTTP2_HTTP2_ERRORS_H +#ifndef GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_HTTP2_ERRORS_H +#define GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_HTTP2_ERRORS_H /* error codes for RST_STREAM from http2 draft 14 section 7 */ typedef enum { @@ -53,4 +53,4 @@ typedef enum { GRPC_CHTTP2__ERROR_DO_NOT_USE = -1 } grpc_chttp2_error_code; -#endif /* GRPC_INTERNAL_CORE_TRANSPORT_CHTTP2_HTTP2_ERRORS_H */ +#endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_HTTP2_ERRORS_H */ diff --git a/src/core/ext/transport/chttp2/transport/huffsyms.c b/src/core/ext/transport/chttp2/transport/huffsyms.c new file mode 100644 index 00000000000..91f62bf34b8 --- /dev/null +++ b/src/core/ext/transport/chttp2/transport/huffsyms.c @@ -0,0 +1,105 @@ +/* + * + * Copyright 2015-2016, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include "src/core/ext/transport/chttp2/transport/huffsyms.h" + +/* Constants pulled from the HPACK spec, and converted to C using the vim + command: + :%s/.* \([0-9a-f]\+\) \[ *\([0-9]\+\)\]/{0x\1, \2},/g */ +const grpc_chttp2_huffsym grpc_chttp2_huffsyms[GRPC_CHTTP2_NUM_HUFFSYMS] = { + {0x1ff8, 13}, {0x7fffd8, 23}, {0xfffffe2, 28}, {0xfffffe3, 28}, + {0xfffffe4, 28}, {0xfffffe5, 28}, {0xfffffe6, 28}, {0xfffffe7, 28}, + {0xfffffe8, 28}, {0xffffea, 24}, {0x3ffffffc, 30}, {0xfffffe9, 28}, + {0xfffffea, 28}, {0x3ffffffd, 30}, {0xfffffeb, 28}, {0xfffffec, 28}, + {0xfffffed, 28}, {0xfffffee, 28}, {0xfffffef, 28}, {0xffffff0, 28}, + {0xffffff1, 28}, {0xffffff2, 28}, {0x3ffffffe, 30}, {0xffffff3, 28}, + {0xffffff4, 28}, {0xffffff5, 28}, {0xffffff6, 28}, {0xffffff7, 28}, + {0xffffff8, 28}, {0xffffff9, 28}, {0xffffffa, 28}, {0xffffffb, 28}, + {0x14, 6}, {0x3f8, 10}, {0x3f9, 10}, {0xffa, 12}, + {0x1ff9, 13}, {0x15, 6}, {0xf8, 8}, {0x7fa, 11}, + {0x3fa, 10}, {0x3fb, 10}, {0xf9, 8}, {0x7fb, 11}, + {0xfa, 8}, {0x16, 6}, {0x17, 6}, {0x18, 6}, + {0x0, 5}, {0x1, 5}, {0x2, 5}, {0x19, 6}, + {0x1a, 6}, {0x1b, 6}, {0x1c, 6}, {0x1d, 6}, + {0x1e, 6}, {0x1f, 6}, {0x5c, 7}, {0xfb, 8}, + {0x7ffc, 15}, {0x20, 6}, {0xffb, 12}, {0x3fc, 10}, + {0x1ffa, 13}, {0x21, 6}, {0x5d, 7}, {0x5e, 7}, + {0x5f, 7}, {0x60, 7}, {0x61, 7}, {0x62, 7}, + {0x63, 7}, {0x64, 7}, {0x65, 7}, {0x66, 7}, + {0x67, 7}, {0x68, 7}, {0x69, 7}, {0x6a, 7}, + {0x6b, 7}, {0x6c, 7}, {0x6d, 7}, {0x6e, 7}, + {0x6f, 7}, {0x70, 7}, {0x71, 7}, {0x72, 7}, + {0xfc, 8}, {0x73, 7}, {0xfd, 8}, {0x1ffb, 13}, + {0x7fff0, 19}, {0x1ffc, 13}, {0x3ffc, 14}, {0x22, 6}, + {0x7ffd, 15}, {0x3, 5}, {0x23, 6}, {0x4, 5}, + {0x24, 6}, {0x5, 5}, {0x25, 6}, {0x26, 6}, + {0x27, 6}, {0x6, 5}, {0x74, 7}, {0x75, 7}, + {0x28, 6}, {0x29, 6}, {0x2a, 6}, {0x7, 5}, + {0x2b, 6}, {0x76, 7}, {0x2c, 6}, {0x8, 5}, + {0x9, 5}, {0x2d, 6}, {0x77, 7}, {0x78, 7}, + {0x79, 7}, {0x7a, 7}, {0x7b, 7}, {0x7ffe, 15}, + {0x7fc, 11}, {0x3ffd, 14}, {0x1ffd, 13}, {0xffffffc, 28}, + {0xfffe6, 20}, {0x3fffd2, 22}, {0xfffe7, 20}, {0xfffe8, 20}, + {0x3fffd3, 22}, {0x3fffd4, 22}, {0x3fffd5, 22}, {0x7fffd9, 23}, + {0x3fffd6, 22}, {0x7fffda, 23}, {0x7fffdb, 23}, {0x7fffdc, 23}, + {0x7fffdd, 23}, {0x7fffde, 23}, {0xffffeb, 24}, {0x7fffdf, 23}, + {0xffffec, 24}, {0xffffed, 24}, {0x3fffd7, 22}, {0x7fffe0, 23}, + {0xffffee, 24}, {0x7fffe1, 23}, {0x7fffe2, 23}, {0x7fffe3, 23}, + {0x7fffe4, 23}, {0x1fffdc, 21}, {0x3fffd8, 22}, {0x7fffe5, 23}, + {0x3fffd9, 22}, {0x7fffe6, 23}, {0x7fffe7, 23}, {0xffffef, 24}, + {0x3fffda, 22}, {0x1fffdd, 21}, {0xfffe9, 20}, {0x3fffdb, 22}, + {0x3fffdc, 22}, {0x7fffe8, 23}, {0x7fffe9, 23}, {0x1fffde, 21}, + {0x7fffea, 23}, {0x3fffdd, 22}, {0x3fffde, 22}, {0xfffff0, 24}, + {0x1fffdf, 21}, {0x3fffdf, 22}, {0x7fffeb, 23}, {0x7fffec, 23}, + {0x1fffe0, 21}, {0x1fffe1, 21}, {0x3fffe0, 22}, {0x1fffe2, 21}, + {0x7fffed, 23}, {0x3fffe1, 22}, {0x7fffee, 23}, {0x7fffef, 23}, + {0xfffea, 20}, {0x3fffe2, 22}, {0x3fffe3, 22}, {0x3fffe4, 22}, + {0x7ffff0, 23}, {0x3fffe5, 22}, {0x3fffe6, 22}, {0x7ffff1, 23}, + {0x3ffffe0, 26}, {0x3ffffe1, 26}, {0xfffeb, 20}, {0x7fff1, 19}, + {0x3fffe7, 22}, {0x7ffff2, 23}, {0x3fffe8, 22}, {0x1ffffec, 25}, + {0x3ffffe2, 26}, {0x3ffffe3, 26}, {0x3ffffe4, 26}, {0x7ffffde, 27}, + {0x7ffffdf, 27}, {0x3ffffe5, 26}, {0xfffff1, 24}, {0x1ffffed, 25}, + {0x7fff2, 19}, {0x1fffe3, 21}, {0x3ffffe6, 26}, {0x7ffffe0, 27}, + {0x7ffffe1, 27}, {0x3ffffe7, 26}, {0x7ffffe2, 27}, {0xfffff2, 24}, + {0x1fffe4, 21}, {0x1fffe5, 21}, {0x3ffffe8, 26}, {0x3ffffe9, 26}, + {0xffffffd, 28}, {0x7ffffe3, 27}, {0x7ffffe4, 27}, {0x7ffffe5, 27}, + {0xfffec, 20}, {0xfffff3, 24}, {0xfffed, 20}, {0x1fffe6, 21}, + {0x3fffe9, 22}, {0x1fffe7, 21}, {0x1fffe8, 21}, {0x7ffff3, 23}, + {0x3fffea, 22}, {0x3fffeb, 22}, {0x1ffffee, 25}, {0x1ffffef, 25}, + {0xfffff4, 24}, {0xfffff5, 24}, {0x3ffffea, 26}, {0x7ffff4, 23}, + {0x3ffffeb, 26}, {0x7ffffe6, 27}, {0x3ffffec, 26}, {0x3ffffed, 26}, + {0x7ffffe7, 27}, {0x7ffffe8, 27}, {0x7ffffe9, 27}, {0x7ffffea, 27}, + {0x7ffffeb, 27}, {0xffffffe, 28}, {0x7ffffec, 27}, {0x7ffffed, 27}, + {0x7ffffee, 27}, {0x7ffffef, 27}, {0x7fffff0, 27}, {0x3ffffee, 26}, + {0x3fffffff, 30}, +}; diff --git a/src/core/transport/chttp2/huffsyms.h b/src/core/ext/transport/chttp2/transport/huffsyms.h similarity index 88% rename from src/core/transport/chttp2/huffsyms.h rename to src/core/ext/transport/chttp2/transport/huffsyms.h index a3cdba8235a..780baeaf55a 100644 --- a/src/core/transport/chttp2/huffsyms.h +++ b/src/core/ext/transport/chttp2/transport/huffsyms.h @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,8 +31,8 @@ * */ -#ifndef GRPC_INTERNAL_CORE_TRANSPORT_CHTTP2_HUFFSYMS_H -#define GRPC_INTERNAL_CORE_TRANSPORT_CHTTP2_HUFFSYMS_H +#ifndef GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_HUFFSYMS_H +#define GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_HUFFSYMS_H /* HPACK static huffman table */ @@ -45,4 +45,4 @@ typedef struct { extern const grpc_chttp2_huffsym grpc_chttp2_huffsyms[GRPC_CHTTP2_NUM_HUFFSYMS]; -#endif /* GRPC_INTERNAL_CORE_TRANSPORT_CHTTP2_HUFFSYMS_H */ +#endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_HUFFSYMS_H */ diff --git a/src/core/transport/chttp2/incoming_metadata.c b/src/core/ext/transport/chttp2/transport/incoming_metadata.c similarity index 95% rename from src/core/transport/chttp2/incoming_metadata.c rename to src/core/ext/transport/chttp2/transport/incoming_metadata.c index 315bc2faa19..ef5fd4fe032 100644 --- a/src/core/transport/chttp2/incoming_metadata.c +++ b/src/core/ext/transport/chttp2/transport/incoming_metadata.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,11 +31,11 @@ * */ -#include "src/core/transport/chttp2/incoming_metadata.h" +#include "src/core/ext/transport/chttp2/transport/incoming_metadata.h" #include -#include "src/core/transport/chttp2/internal.h" +#include "src/core/ext/transport/chttp2/transport/internal.h" #include #include diff --git a/src/core/transport/chttp2/incoming_metadata.h b/src/core/ext/transport/chttp2/transport/incoming_metadata.h similarity index 88% rename from src/core/transport/chttp2/incoming_metadata.h rename to src/core/ext/transport/chttp2/transport/incoming_metadata.h index ea74cfc64b2..5e1dc723897 100644 --- a/src/core/transport/chttp2/incoming_metadata.h +++ b/src/core/ext/transport/chttp2/transport/incoming_metadata.h @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,10 +31,10 @@ * */ -#ifndef GRPC_INTERNAL_CORE_CHTTP2_INCOMING_METADATA_H -#define GRPC_INTERNAL_CORE_CHTTP2_INCOMING_METADATA_H +#ifndef GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_INCOMING_METADATA_H +#define GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_INCOMING_METADATA_H -#include "src/core/transport/transport.h" +#include "src/core/lib/transport/transport.h" typedef struct { grpc_linked_mdelem *elems; @@ -57,4 +57,4 @@ void grpc_chttp2_incoming_metadata_buffer_add( void grpc_chttp2_incoming_metadata_buffer_set_deadline( grpc_chttp2_incoming_metadata_buffer *buffer, gpr_timespec deadline); -#endif /* GRPC_INTERNAL_CORE_CHTTP2_INCOMING_METADATA_H */ +#endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_INCOMING_METADATA_H */ diff --git a/src/core/transport/chttp2/internal.h b/src/core/ext/transport/chttp2/transport/internal.h similarity index 96% rename from src/core/transport/chttp2/internal.h rename to src/core/ext/transport/chttp2/transport/internal.h index b720d1ab3e5..2fae6536232 100644 --- a/src/core/transport/chttp2/internal.h +++ b/src/core/ext/transport/chttp2/transport/internal.h @@ -31,26 +31,26 @@ * */ -#ifndef GRPC_INTERNAL_CORE_CHTTP2_INTERNAL_H -#define GRPC_INTERNAL_CORE_CHTTP2_INTERNAL_H +#ifndef GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_INTERNAL_H +#define GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_INTERNAL_H #include #include -#include "src/core/iomgr/endpoint.h" -#include "src/core/transport/chttp2/frame.h" -#include "src/core/transport/chttp2/frame_data.h" -#include "src/core/transport/chttp2/frame_goaway.h" -#include "src/core/transport/chttp2/frame_ping.h" -#include "src/core/transport/chttp2/frame_rst_stream.h" -#include "src/core/transport/chttp2/frame_settings.h" -#include "src/core/transport/chttp2/frame_window_update.h" -#include "src/core/transport/chttp2/hpack_encoder.h" -#include "src/core/transport/chttp2/hpack_parser.h" -#include "src/core/transport/chttp2/incoming_metadata.h" -#include "src/core/transport/chttp2/stream_map.h" -#include "src/core/transport/connectivity_state.h" -#include "src/core/transport/transport_impl.h" +#include "src/core/ext/transport/chttp2/transport/frame.h" +#include "src/core/ext/transport/chttp2/transport/frame_data.h" +#include "src/core/ext/transport/chttp2/transport/frame_goaway.h" +#include "src/core/ext/transport/chttp2/transport/frame_ping.h" +#include "src/core/ext/transport/chttp2/transport/frame_rst_stream.h" +#include "src/core/ext/transport/chttp2/transport/frame_settings.h" +#include "src/core/ext/transport/chttp2/transport/frame_window_update.h" +#include "src/core/ext/transport/chttp2/transport/hpack_encoder.h" +#include "src/core/ext/transport/chttp2/transport/hpack_parser.h" +#include "src/core/ext/transport/chttp2/transport/incoming_metadata.h" +#include "src/core/ext/transport/chttp2/transport/stream_map.h" +#include "src/core/lib/iomgr/endpoint.h" +#include "src/core/lib/transport/connectivity_state.h" +#include "src/core/lib/transport/transport_impl.h" typedef struct grpc_chttp2_transport grpc_chttp2_transport; typedef struct grpc_chttp2_stream grpc_chttp2_stream; @@ -777,4 +777,4 @@ void grpc_chttp2_ack_ping(grpc_exec_ctx *exec_ctx, void grpc_chttp2_become_writable(grpc_chttp2_transport_global *transport_global, grpc_chttp2_stream_global *stream_global); -#endif +#endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_INTERNAL_H */ diff --git a/src/core/transport/chttp2/parsing.c b/src/core/ext/transport/chttp2/transport/parsing.c similarity index 98% rename from src/core/transport/chttp2/parsing.c rename to src/core/ext/transport/chttp2/transport/parsing.c index 0516f39fa9e..a9f043cee39 100644 --- a/src/core/transport/chttp2/parsing.c +++ b/src/core/ext/transport/chttp2/transport/parsing.c @@ -31,7 +31,7 @@ * */ -#include "src/core/transport/chttp2/internal.h" +#include "src/core/ext/transport/chttp2/transport/internal.h" #include @@ -39,11 +39,11 @@ #include #include -#include "src/core/profiling/timers.h" -#include "src/core/transport/chttp2/http2_errors.h" -#include "src/core/transport/chttp2/status_conversion.h" -#include "src/core/transport/chttp2/timeout_encoding.h" -#include "src/core/transport/static_metadata.h" +#include "src/core/ext/transport/chttp2/transport/http2_errors.h" +#include "src/core/ext/transport/chttp2/transport/status_conversion.h" +#include "src/core/ext/transport/chttp2/transport/timeout_encoding.h" +#include "src/core/lib/profiling/timers.h" +#include "src/core/lib/transport/static_metadata.h" static int init_frame_parser(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport_parsing *transport_parsing); diff --git a/src/core/transport/chttp2/status_conversion.c b/src/core/ext/transport/chttp2/transport/status_conversion.c similarity index 97% rename from src/core/transport/chttp2/status_conversion.c rename to src/core/ext/transport/chttp2/transport/status_conversion.c index bf214b017a2..5a795799898 100644 --- a/src/core/transport/chttp2/status_conversion.c +++ b/src/core/ext/transport/chttp2/transport/status_conversion.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,7 +31,7 @@ * */ -#include "src/core/transport/chttp2/status_conversion.h" +#include "src/core/ext/transport/chttp2/transport/status_conversion.h" int grpc_chttp2_grpc_status_to_http2_error(grpc_status_code status) { switch (status) { diff --git a/src/core/transport/chttp2/status_conversion.h b/src/core/ext/transport/chttp2/transport/status_conversion.h similarity index 86% rename from src/core/transport/chttp2/status_conversion.h rename to src/core/ext/transport/chttp2/transport/status_conversion.h index 0ec5b560b8e..e92a5f67026 100644 --- a/src/core/transport/chttp2/status_conversion.h +++ b/src/core/ext/transport/chttp2/transport/status_conversion.h @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,11 +31,11 @@ * */ -#ifndef GRPC_INTERNAL_CORE_TRANSPORT_CHTTP2_STATUS_CONVERSION_H -#define GRPC_INTERNAL_CORE_TRANSPORT_CHTTP2_STATUS_CONVERSION_H +#ifndef GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_STATUS_CONVERSION_H +#define GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_STATUS_CONVERSION_H #include -#include "src/core/transport/chttp2/http2_errors.h" +#include "src/core/ext/transport/chttp2/transport/http2_errors.h" /* Conversion of grpc status codes to http2 error codes (for RST_STREAM) */ grpc_chttp2_error_code grpc_chttp2_grpc_status_to_http2_error( @@ -47,4 +47,4 @@ grpc_status_code grpc_chttp2_http2_error_to_grpc_status( grpc_status_code grpc_chttp2_http2_status_to_grpc_status(int status); int grpc_chttp2_grpc_status_to_http2_status(grpc_status_code status); -#endif /* GRPC_INTERNAL_CORE_TRANSPORT_CHTTP2_STATUS_CONVERSION_H */ +#endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_STATUS_CONVERSION_H */ diff --git a/src/core/transport/chttp2/stream_lists.c b/src/core/ext/transport/chttp2/transport/stream_lists.c similarity index 99% rename from src/core/transport/chttp2/stream_lists.c rename to src/core/ext/transport/chttp2/transport/stream_lists.c index 60fe735cfce..01ed49b1ec3 100644 --- a/src/core/transport/chttp2/stream_lists.c +++ b/src/core/ext/transport/chttp2/transport/stream_lists.c @@ -31,7 +31,7 @@ * */ -#include "src/core/transport/chttp2/internal.h" +#include "src/core/ext/transport/chttp2/transport/internal.h" #include diff --git a/src/core/transport/chttp2/stream_map.c b/src/core/ext/transport/chttp2/transport/stream_map.c similarity index 98% rename from src/core/transport/chttp2/stream_map.c rename to src/core/ext/transport/chttp2/transport/stream_map.c index 555a16fb72b..3fb13896505 100644 --- a/src/core/transport/chttp2/stream_map.c +++ b/src/core/ext/transport/chttp2/transport/stream_map.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,7 +31,7 @@ * */ -#include "src/core/transport/chttp2/stream_map.h" +#include "src/core/ext/transport/chttp2/transport/stream_map.h" #include diff --git a/src/core/transport/chttp2/stream_map.h b/src/core/ext/transport/chttp2/transport/stream_map.h similarity index 93% rename from src/core/transport/chttp2/stream_map.h rename to src/core/ext/transport/chttp2/transport/stream_map.h index 7a0e45fab2c..4e8586fe46a 100644 --- a/src/core/transport/chttp2/stream_map.h +++ b/src/core/ext/transport/chttp2/transport/stream_map.h @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,8 +31,8 @@ * */ -#ifndef GRPC_INTERNAL_CORE_TRANSPORT_CHTTP2_STREAM_MAP_H -#define GRPC_INTERNAL_CORE_TRANSPORT_CHTTP2_STREAM_MAP_H +#ifndef GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_STREAM_MAP_H +#define GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_STREAM_MAP_H #include @@ -81,4 +81,4 @@ void grpc_chttp2_stream_map_for_each(grpc_chttp2_stream_map *map, void *value), void *user_data); -#endif /* GRPC_INTERNAL_CORE_TRANSPORT_CHTTP2_STREAM_MAP_H */ +#endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_STREAM_MAP_H */ diff --git a/src/core/transport/chttp2/timeout_encoding.c b/src/core/ext/transport/chttp2/transport/timeout_encoding.c similarity index 97% rename from src/core/transport/chttp2/timeout_encoding.c rename to src/core/ext/transport/chttp2/transport/timeout_encoding.c index a6f7081d21b..d5b9da92528 100644 --- a/src/core/transport/chttp2/timeout_encoding.c +++ b/src/core/ext/transport/chttp2/transport/timeout_encoding.c @@ -31,13 +31,13 @@ * */ -#include "src/core/transport/chttp2/timeout_encoding.h" +#include "src/core/ext/transport/chttp2/transport/timeout_encoding.h" #include #include #include -#include "src/core/support/string.h" +#include "src/core/lib/support/string.h" static int64_t round_up(int64_t x, int64_t divisor) { return (x / divisor + (x % divisor != 0)) * divisor; @@ -150,7 +150,7 @@ int grpc_chttp2_decode_timeout(const char *buffer, gpr_timespec *timeout) { /* spec allows max. 8 digits, but we allow values up to 1,000,000,000 */ if (x >= (100 * 1000 * 1000)) { if (x != (100 * 1000 * 1000) || digit != 0) { - *timeout = gpr_inf_future(GPR_CLOCK_REALTIME); + *timeout = gpr_inf_future(GPR_TIMESPAN); return 1; } } diff --git a/src/core/transport/chttp2/timeout_encoding.h b/src/core/ext/transport/chttp2/transport/timeout_encoding.h similarity index 86% rename from src/core/transport/chttp2/timeout_encoding.h rename to src/core/ext/transport/chttp2/transport/timeout_encoding.h index 9d8756e799d..dc64f9cc3f5 100644 --- a/src/core/transport/chttp2/timeout_encoding.h +++ b/src/core/ext/transport/chttp2/transport/timeout_encoding.h @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,11 +31,11 @@ * */ -#ifndef GRPC_INTERNAL_CORE_TRANSPORT_CHTTP2_TIMEOUT_ENCODING_H -#define GRPC_INTERNAL_CORE_TRANSPORT_CHTTP2_TIMEOUT_ENCODING_H +#ifndef GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_TIMEOUT_ENCODING_H +#define GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_TIMEOUT_ENCODING_H -#include "src/core/support/string.h" #include +#include "src/core/lib/support/string.h" #define GRPC_CHTTP2_TIMEOUT_ENCODE_MIN_BUFSIZE (GPR_LTOA_MIN_BUFSIZE + 1) @@ -44,4 +44,4 @@ void grpc_chttp2_encode_timeout(gpr_timespec timeout, char *buffer); int grpc_chttp2_decode_timeout(const char *buffer, gpr_timespec *timeout); -#endif /* GRPC_INTERNAL_CORE_TRANSPORT_CHTTP2_TIMEOUT_ENCODING_H */ +#endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_TIMEOUT_ENCODING_H */ diff --git a/src/core/transport/chttp2/varint.c b/src/core/ext/transport/chttp2/transport/varint.c similarity index 96% rename from src/core/transport/chttp2/varint.c rename to src/core/ext/transport/chttp2/transport/varint.c index 1cc235e9899..6721d042a25 100644 --- a/src/core/transport/chttp2/varint.c +++ b/src/core/ext/transport/chttp2/transport/varint.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,7 +31,7 @@ * */ -#include "src/core/transport/chttp2/varint.h" +#include "src/core/ext/transport/chttp2/transport/varint.h" uint32_t grpc_chttp2_hpack_varint_length(uint32_t tail_value) { if (tail_value < (1 << 7)) { diff --git a/src/core/transport/chttp2/varint.h b/src/core/ext/transport/chttp2/transport/varint.h similarity index 94% rename from src/core/transport/chttp2/varint.h rename to src/core/ext/transport/chttp2/transport/varint.h index 2d92b6693e9..6442ea3c5a5 100644 --- a/src/core/transport/chttp2/varint.h +++ b/src/core/ext/transport/chttp2/transport/varint.h @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,8 +31,8 @@ * */ -#ifndef GRPC_INTERNAL_CORE_TRANSPORT_CHTTP2_VARINT_H -#define GRPC_INTERNAL_CORE_TRANSPORT_CHTTP2_VARINT_H +#ifndef GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_VARINT_H +#define GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_VARINT_H #include @@ -72,4 +72,4 @@ void grpc_chttp2_hpack_write_varint_tail(uint32_t tail_value, uint8_t* target, } \ } while (0) -#endif /* GRPC_INTERNAL_CORE_TRANSPORT_CHTTP2_VARINT_H */ +#endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_VARINT_H */ diff --git a/src/core/transport/chttp2/writing.c b/src/core/ext/transport/chttp2/transport/writing.c similarity index 98% rename from src/core/transport/chttp2/writing.c rename to src/core/ext/transport/chttp2/transport/writing.c index 107725cbc79..8d5886f2255 100644 --- a/src/core/transport/chttp2/writing.c +++ b/src/core/ext/transport/chttp2/transport/writing.c @@ -31,14 +31,14 @@ * */ -#include "src/core/transport/chttp2/internal.h" +#include "src/core/ext/transport/chttp2/transport/internal.h" #include #include -#include "src/core/profiling/timers.h" -#include "src/core/transport/chttp2/http2_errors.h" +#include "src/core/ext/transport/chttp2/transport/http2_errors.h" +#include "src/core/lib/profiling/timers.h" static void finalize_outbuf(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport_writing *transport_writing); diff --git a/src/core/httpcli/parser.c b/src/core/httpcli/parser.c deleted file mode 100644 index c314f025a00..00000000000 --- a/src/core/httpcli/parser.c +++ /dev/null @@ -1,211 +0,0 @@ -/* - * - * Copyright 2015, Google Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -#include "src/core/httpcli/parser.h" - -#include - -#include -#include -#include - -static int handle_response_line(grpc_httpcli_parser *parser) { - uint8_t *beg = parser->cur_line; - uint8_t *cur = beg; - uint8_t *end = beg + parser->cur_line_length; - - if (cur == end || *cur++ != 'H') goto error; - if (cur == end || *cur++ != 'T') goto error; - if (cur == end || *cur++ != 'T') goto error; - if (cur == end || *cur++ != 'P') goto error; - if (cur == end || *cur++ != '/') goto error; - if (cur == end || *cur++ != '1') goto error; - if (cur == end || *cur++ != '.') goto error; - if (cur == end || *cur < '0' || *cur++ > '1') goto error; - if (cur == end || *cur++ != ' ') goto error; - if (cur == end || *cur < '1' || *cur++ > '9') goto error; - if (cur == end || *cur < '0' || *cur++ > '9') goto error; - if (cur == end || *cur < '0' || *cur++ > '9') goto error; - parser->r.status = - (cur[-3] - '0') * 100 + (cur[-2] - '0') * 10 + (cur[-1] - '0'); - if (cur == end || *cur++ != ' ') goto error; - - /* we don't really care about the status code message */ - - return 1; - -error: - gpr_log(GPR_ERROR, "Failed parsing response line"); - return 0; -} - -static char *buf2str(void *buffer, size_t length) { - char *out = gpr_malloc(length + 1); - memcpy(out, buffer, length); - out[length] = 0; - return out; -} - -static int add_header(grpc_httpcli_parser *parser) { - uint8_t *beg = parser->cur_line; - uint8_t *cur = beg; - uint8_t *end = beg + parser->cur_line_length; - grpc_httpcli_header hdr = {NULL, NULL}; - - GPR_ASSERT(cur != end); - - if (*cur == ' ' || *cur == '\t') { - gpr_log(GPR_ERROR, "Continued header lines not supported yet"); - goto error; - } - - while (cur != end && *cur != ':') { - cur++; - } - if (cur == end) { - gpr_log(GPR_ERROR, "Didn't find ':' in header string"); - goto error; - } - GPR_ASSERT(cur >= beg); - hdr.key = buf2str(beg, (size_t)(cur - beg)); - cur++; /* skip : */ - - while (cur != end && (*cur == ' ' || *cur == '\t')) { - cur++; - } - GPR_ASSERT(end - cur >= 2); - hdr.value = buf2str(cur, (size_t)(end - cur) - 2); - - if (parser->r.hdr_count == parser->hdr_capacity) { - parser->hdr_capacity = - GPR_MAX(parser->hdr_capacity + 1, parser->hdr_capacity * 3 / 2); - parser->r.hdrs = gpr_realloc( - parser->r.hdrs, parser->hdr_capacity * sizeof(*parser->r.hdrs)); - } - parser->r.hdrs[parser->r.hdr_count++] = hdr; - return 1; - -error: - gpr_free(hdr.key); - gpr_free(hdr.value); - return 0; -} - -static int finish_line(grpc_httpcli_parser *parser) { - switch (parser->state) { - case GRPC_HTTPCLI_INITIAL_RESPONSE: - if (!handle_response_line(parser)) { - return 0; - } - parser->state = GRPC_HTTPCLI_HEADERS; - break; - case GRPC_HTTPCLI_HEADERS: - if (parser->cur_line_length == 2) { - parser->state = GRPC_HTTPCLI_BODY; - break; - } - if (!add_header(parser)) { - return 0; - } - break; - case GRPC_HTTPCLI_BODY: - GPR_UNREACHABLE_CODE(return 0); - } - - parser->cur_line_length = 0; - return 1; -} - -static int addbyte(grpc_httpcli_parser *parser, uint8_t byte) { - switch (parser->state) { - case GRPC_HTTPCLI_INITIAL_RESPONSE: - case GRPC_HTTPCLI_HEADERS: - if (parser->cur_line_length >= GRPC_HTTPCLI_MAX_HEADER_LENGTH) { - gpr_log(GPR_ERROR, "HTTP client max line length (%d) exceeded", - GRPC_HTTPCLI_MAX_HEADER_LENGTH); - return 0; - } - parser->cur_line[parser->cur_line_length] = byte; - parser->cur_line_length++; - if (parser->cur_line_length >= 2 && - parser->cur_line[parser->cur_line_length - 2] == '\r' && - parser->cur_line[parser->cur_line_length - 1] == '\n') { - return finish_line(parser); - } else { - return 1; - } - GPR_UNREACHABLE_CODE(return 0); - case GRPC_HTTPCLI_BODY: - if (parser->r.body_length == parser->body_capacity) { - parser->body_capacity = GPR_MAX(8, parser->body_capacity * 3 / 2); - parser->r.body = - gpr_realloc((void *)parser->r.body, parser->body_capacity); - } - parser->r.body[parser->r.body_length] = (char)byte; - parser->r.body_length++; - return 1; - } - GPR_UNREACHABLE_CODE(return 0); -} - -void grpc_httpcli_parser_init(grpc_httpcli_parser *parser) { - memset(parser, 0, sizeof(*parser)); - parser->state = GRPC_HTTPCLI_INITIAL_RESPONSE; - parser->r.status = 500; -} - -void grpc_httpcli_parser_destroy(grpc_httpcli_parser *parser) { - size_t i; - gpr_free(parser->r.body); - for (i = 0; i < parser->r.hdr_count; i++) { - gpr_free(parser->r.hdrs[i].key); - gpr_free(parser->r.hdrs[i].value); - } - gpr_free(parser->r.hdrs); -} - -int grpc_httpcli_parser_parse(grpc_httpcli_parser *parser, gpr_slice slice) { - size_t i; - - for (i = 0; i < GPR_SLICE_LENGTH(slice); i++) { - if (!addbyte(parser, GPR_SLICE_START_PTR(slice)[i])) { - return 0; - } - } - - return 1; -} - -int grpc_httpcli_parser_eof(grpc_httpcli_parser *parser) { - return parser->state == GRPC_HTTPCLI_BODY; -} diff --git a/src/core/census/README.md b/src/core/lib/census/README.md similarity index 100% rename from src/core/census/README.md rename to src/core/lib/census/README.md diff --git a/src/core/census/aggregation.h b/src/core/lib/census/aggregation.h similarity index 94% rename from src/core/census/aggregation.h rename to src/core/lib/census/aggregation.h index e9bc6ada960..f353368b970 100644 --- a/src/core/census/aggregation.h +++ b/src/core/lib/census/aggregation.h @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -33,8 +33,8 @@ #include -#ifndef GRPC_INTERNAL_CORE_CENSUS_AGGREGATION_H -#define GRPC_INTERNAL_CORE_CENSUS_AGGREGATION_H +#ifndef GRPC_CORE_LIB_CENSUS_AGGREGATION_H +#define GRPC_CORE_LIB_CENSUS_AGGREGATION_H /** Structure used to describe an aggregation type. */ struct census_aggregation_ops { @@ -63,4 +63,4 @@ struct census_aggregation_ops { size_t (*print)(const void *aggregation, char *buffer, size_t n); }; -#endif /* GRPC_INTERNAL_CORE_CENSUS_AGGREGATION_H */ +#endif /* GRPC_CORE_LIB_CENSUS_AGGREGATION_H */ diff --git a/src/core/census/context.c b/src/core/lib/census/context.c similarity index 99% rename from src/core/census/context.c rename to src/core/lib/census/context.c index 89b8ee0b399..5a118f46a92 100644 --- a/src/core/census/context.c +++ b/src/core/lib/census/context.c @@ -38,7 +38,7 @@ #include #include #include -#include "src/core/support/string.h" +#include "src/core/lib/support/string.h" // Functions in this file support the public context API, including // encoding/decoding as part of context propagation across RPC's. The overall diff --git a/src/core/census/grpc_context.c b/src/core/lib/census/grpc_context.c similarity index 94% rename from src/core/census/grpc_context.c rename to src/core/lib/census/grpc_context.c index 4b61382a2c2..457c1763551 100644 --- a/src/core/census/grpc_context.c +++ b/src/core/lib/census/grpc_context.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -33,8 +33,8 @@ #include #include -#include "src/core/surface/api_trace.h" -#include "src/core/surface/call.h" +#include "src/core/lib/surface/api_trace.h" +#include "src/core/lib/surface/call.h" void grpc_census_call_set_context(grpc_call *call, census_context *context) { GRPC_API_TRACE("grpc_census_call_set_context(call=%p, census_context=%p)", 2, diff --git a/src/core/census/grpc_filter.c b/src/core/lib/census/grpc_filter.c similarity index 88% rename from src/core/census/grpc_filter.c rename to src/core/lib/census/grpc_filter.c index c8aaf31e2d3..d27d789aa1c 100644 --- a/src/core/census/grpc_filter.c +++ b/src/core/lib/census/grpc_filter.c @@ -31,7 +31,7 @@ * */ -#include "src/core/census/grpc_filter.h" +#include "src/core/lib/census/grpc_filter.h" #include #include @@ -42,10 +42,10 @@ #include #include -#include "src/core/channel/channel_stack.h" -#include "src/core/statistics/census_interface.h" -#include "src/core/statistics/census_rpc_stats.h" -#include "src/core/transport/static_metadata.h" +#include "src/core/lib/channel/channel_stack.h" +#include "src/core/lib/statistics/census_interface.h" +#include "src/core/lib/statistics/census_rpc_stats.h" +#include "src/core/lib/transport/static_metadata.h" typedef struct call_data { census_op_id op_id; @@ -172,13 +172,27 @@ static void destroy_channel_elem(grpc_exec_ctx *exec_ctx, } const grpc_channel_filter grpc_client_census_filter = { - client_start_transport_op, grpc_channel_next_op, sizeof(call_data), - client_init_call_elem, grpc_call_stack_ignore_set_pollset, - client_destroy_call_elem, sizeof(channel_data), init_channel_elem, - destroy_channel_elem, grpc_call_next_get_peer, "census-client"}; + client_start_transport_op, + grpc_channel_next_op, + sizeof(call_data), + client_init_call_elem, + grpc_call_stack_ignore_set_pollset, + client_destroy_call_elem, + sizeof(channel_data), + init_channel_elem, + destroy_channel_elem, + grpc_call_next_get_peer, + "census-client"}; const grpc_channel_filter grpc_server_census_filter = { - server_start_transport_op, grpc_channel_next_op, sizeof(call_data), - server_init_call_elem, grpc_call_stack_ignore_set_pollset, - server_destroy_call_elem, sizeof(channel_data), init_channel_elem, - destroy_channel_elem, grpc_call_next_get_peer, "census-server"}; + server_start_transport_op, + grpc_channel_next_op, + sizeof(call_data), + server_init_call_elem, + grpc_call_stack_ignore_set_pollset, + server_destroy_call_elem, + sizeof(channel_data), + init_channel_elem, + destroy_channel_elem, + grpc_call_next_get_peer, + "census-server"}; diff --git a/src/core/census/grpc_filter.h b/src/core/lib/census/grpc_filter.h similarity index 89% rename from src/core/census/grpc_filter.h rename to src/core/lib/census/grpc_filter.h index b3de3adc947..7ceafe56e48 100644 --- a/src/core/census/grpc_filter.h +++ b/src/core/lib/census/grpc_filter.h @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,14 +31,14 @@ * */ -#ifndef GRPC_INTERNAL_CORE_CENSUS_GRPC_FILTER_H -#define GRPC_INTERNAL_CORE_CENSUS_GRPC_FILTER_H +#ifndef GRPC_CORE_LIB_CENSUS_GRPC_FILTER_H +#define GRPC_CORE_LIB_CENSUS_GRPC_FILTER_H -#include "src/core/channel/channel_stack.h" +#include "src/core/lib/channel/channel_stack.h" /* Census filters: provides tracing and stats collection functionalities. It needs to reside right below the surface filter in the channel stack. */ extern const grpc_channel_filter grpc_client_census_filter; extern const grpc_channel_filter grpc_server_census_filter; -#endif /* GRPC_INTERNAL_CORE_CENSUS_GRPC_FILTER_H */ +#endif /* GRPC_CORE_LIB_CENSUS_GRPC_FILTER_H */ diff --git a/src/core/lib/census/grpc_plugin.c b/src/core/lib/census/grpc_plugin.c new file mode 100644 index 00000000000..12aca76745f --- /dev/null +++ b/src/core/lib/census/grpc_plugin.c @@ -0,0 +1,70 @@ +/* + * + * Copyright 2015-2016, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include "src/core/lib/census/grpc_plugin.h" + +#include + +#include + +#include "src/core/lib/census/grpc_filter.h" +#include "src/core/lib/channel/channel_stack_builder.h" +#include "src/core/lib/surface/channel_init.h" + +static bool maybe_add_census_filter(grpc_channel_stack_builder *builder, + void *arg_must_be_null) { + const grpc_channel_args *args = + grpc_channel_stack_builder_get_channel_arguments(builder); + if (grpc_channel_args_is_census_enabled(args)) { + return grpc_channel_stack_builder_prepend_filter( + builder, &grpc_client_census_filter, NULL, NULL); + } + return true; +} + +void census_grpc_plugin_init(void) { + /* Only initialize census if no one else has and some features are + * available. */ + if (census_enabled() == CENSUS_FEATURE_NONE && + census_supported() != CENSUS_FEATURE_NONE) { + if (census_initialize(census_supported())) { /* enable all features. */ + gpr_log(GPR_ERROR, "Could not initialize census."); + } + } + grpc_channel_init_register_stage(GRPC_CLIENT_CHANNEL, INT_MAX, + maybe_add_census_filter, NULL); + grpc_channel_init_register_stage(GRPC_SERVER_CHANNEL, INT_MAX, + maybe_add_census_filter, NULL); +} + +void census_grpc_plugin_destroy(void) { census_shutdown(); } diff --git a/src/core/surface/server_create.c b/src/core/lib/census/grpc_plugin.h similarity index 71% rename from src/core/surface/server_create.c rename to src/core/lib/census/grpc_plugin.h index 5e37e80948e..33e5f0b701d 100644 --- a/src/core/surface/server_create.c +++ b/src/core/lib/census/grpc_plugin.h @@ -31,18 +31,10 @@ * */ -#include -#include "src/core/census/grpc_filter.h" -#include "src/core/channel/channel_args.h" -#include "src/core/channel/compress_filter.h" -#include "src/core/surface/api_trace.h" -#include "src/core/surface/completion_queue.h" -#include "src/core/surface/server.h" +#ifndef GRPC_CORE_LIB_CENSUS_GRPC_PLUGIN_H +#define GRPC_CORE_LIB_CENSUS_GRPC_PLUGIN_H -grpc_server *grpc_server_create(const grpc_channel_args *args, void *reserved) { - const grpc_channel_filter *filters[3]; - size_t num_filters = 0; - filters[num_filters++] = &grpc_compress_filter; - GRPC_API_TRACE("grpc_server_create(%p, %p)", 2, (args, reserved)); - return grpc_server_create_from_filters(filters, num_filters, args); -} +void census_grpc_plugin_init(void); +void census_grpc_plugin_destroy(void); + +#endif /* GRPC_CORE_LIB_CENSUS_GRPC_PLUGIN_H */ diff --git a/src/core/census/initialize.c b/src/core/lib/census/initialize.c similarity index 100% rename from src/core/census/initialize.c rename to src/core/lib/census/initialize.c diff --git a/src/core/census/mlog.c b/src/core/lib/census/mlog.c similarity index 99% rename from src/core/census/mlog.c rename to src/core/lib/census/mlog.c index a2cc46d3f26..9d47e802972 100644 --- a/src/core/census/mlog.c +++ b/src/core/lib/census/mlog.c @@ -88,7 +88,7 @@ // include the name of the structure, which will be passed as the first // argument. E.g. cl_block_initialize() will initialize a cl_block. -#include "src/core/census/mlog.h" +#include "src/core/lib/census/mlog.h" #include #include #include diff --git a/src/core/census/mlog.h b/src/core/lib/census/mlog.h similarity index 96% rename from src/core/census/mlog.h rename to src/core/lib/census/mlog.h index aaba9e15356..7fbdeda986b 100644 --- a/src/core/census/mlog.h +++ b/src/core/lib/census/mlog.h @@ -33,8 +33,8 @@ /* A very fast in-memory log, optimized for multiple writers. */ -#ifndef GRPC_INTERNAL_CORE_CENSUS_MLOG_H -#define GRPC_INTERNAL_CORE_CENSUS_MLOG_H +#ifndef GRPC_CORE_LIB_CENSUS_MLOG_H +#define GRPC_CORE_LIB_CENSUS_MLOG_H #include #include @@ -92,4 +92,4 @@ size_t census_log_remaining_space(void); out-of-space. */ int64_t census_log_out_of_space_count(void); -#endif /* GRPC_INTERNAL_CORE_CENSUS_LOG_H */ +#endif /* GRPC_CORE_LIB_CENSUS_MLOG_H */ diff --git a/src/core/census/operation.c b/src/core/lib/census/operation.c similarity index 98% rename from src/core/census/operation.c rename to src/core/lib/census/operation.c index 5c587043721..315f9c3534d 100644 --- a/src/core/census/operation.c +++ b/src/core/lib/census/operation.c @@ -1,5 +1,5 @@ /* - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/src/core/census/placeholders.c b/src/core/lib/census/placeholders.c similarity index 100% rename from src/core/census/placeholders.c rename to src/core/lib/census/placeholders.c diff --git a/src/core/census/rpc_metric_id.h b/src/core/lib/census/rpc_metric_id.h similarity index 92% rename from src/core/census/rpc_metric_id.h rename to src/core/lib/census/rpc_metric_id.h index f199839511c..aad0588fb3c 100644 --- a/src/core/census/rpc_metric_id.h +++ b/src/core/lib/census/rpc_metric_id.h @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,8 +31,8 @@ * */ -#ifndef CENSUS_RPC_METRIC_ID_H -#define CENSUS_RPC_METRIC_ID_H +#ifndef GRPC_CORE_LIB_CENSUS_RPC_METRIC_ID_H +#define GRPC_CORE_LIB_CENSUS_RPC_METRIC_ID_H /* Metric ID's used for RPC measurements. */ /* Count of client requests sent. */ @@ -48,4 +48,4 @@ /* Server side request latency. */ #define CENSUS_METRIC_RPC_SERVER_LATENCY ((uint32_t)5) -#endif /* CENSUS_RPC_METRIC_ID_H */ +#endif /* GRPC_CORE_LIB_CENSUS_RPC_METRIC_ID_H */ diff --git a/src/core/census/tracing.c b/src/core/lib/census/tracing.c similarity index 98% rename from src/core/census/tracing.c rename to src/core/lib/census/tracing.c index 3b5d6dab2b8..e508996af38 100644 --- a/src/core/census/tracing.c +++ b/src/core/lib/census/tracing.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/src/core/channel/channel_args.c b/src/core/lib/channel/channel_args.c similarity index 99% rename from src/core/channel/channel_args.c rename to src/core/lib/channel/channel_args.c index bae7a90a015..1a02f1f4aa4 100644 --- a/src/core/channel/channel_args.c +++ b/src/core/lib/channel/channel_args.c @@ -31,9 +31,9 @@ * */ +#include "src/core/lib/channel/channel_args.h" #include -#include "src/core/channel/channel_args.h" -#include "src/core/support/string.h" +#include "src/core/lib/support/string.h" #include #include diff --git a/src/core/channel/channel_args.h b/src/core/lib/channel/channel_args.h similarity index 96% rename from src/core/channel/channel_args.h rename to src/core/lib/channel/channel_args.h index b3a7c9f4349..67d287ec6b1 100644 --- a/src/core/channel/channel_args.h +++ b/src/core/lib/channel/channel_args.h @@ -31,8 +31,8 @@ * */ -#ifndef GRPC_INTERNAL_CORE_CHANNEL_CHANNEL_ARGS_H -#define GRPC_INTERNAL_CORE_CHANNEL_CHANNEL_ARGS_H +#ifndef GRPC_CORE_LIB_CHANNEL_CHANNEL_ARGS_H +#define GRPC_CORE_LIB_CHANNEL_CHANNEL_ARGS_H #include #include @@ -91,4 +91,4 @@ int grpc_channel_args_compression_algorithm_get_states( int grpc_channel_args_compare(const grpc_channel_args *a, const grpc_channel_args *b); -#endif /* GRPC_INTERNAL_CORE_CHANNEL_CHANNEL_ARGS_H */ +#endif /* GRPC_CORE_LIB_CHANNEL_CHANNEL_ARGS_H */ diff --git a/src/core/channel/channel_stack.c b/src/core/lib/channel/channel_stack.c similarity index 99% rename from src/core/channel/channel_stack.c rename to src/core/lib/channel/channel_stack.c index 3e616883640..52283e35fad 100644 --- a/src/core/channel/channel_stack.c +++ b/src/core/lib/channel/channel_stack.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,7 +31,7 @@ * */ -#include "src/core/channel/channel_stack.h" +#include "src/core/lib/channel/channel_stack.h" #include #include diff --git a/src/core/channel/channel_stack.h b/src/core/lib/channel/channel_stack.h similarity index 97% rename from src/core/channel/channel_stack.h rename to src/core/lib/channel/channel_stack.h index c01050e7179..b29bee411d3 100644 --- a/src/core/channel/channel_stack.h +++ b/src/core/lib/channel/channel_stack.h @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,8 +31,8 @@ * */ -#ifndef GRPC_INTERNAL_CORE_CHANNEL_CHANNEL_STACK_H -#define GRPC_INTERNAL_CORE_CHANNEL_CHANNEL_STACK_H +#ifndef GRPC_CORE_LIB_CHANNEL_CHANNEL_STACK_H +#define GRPC_CORE_LIB_CHANNEL_CHANNEL_STACK_H /* A channel filter defines how operations on a channel are implemented. Channel filters are chained together to create full channels, and if those @@ -45,8 +45,8 @@ #include #include -#include "src/core/debug/trace.h" -#include "src/core/transport/transport.h" +#include "src/core/lib/debug/trace.h" +#include "src/core/lib/transport/transport.h" typedef struct grpc_channel_element grpc_channel_element; typedef struct grpc_call_element grpc_call_element; @@ -257,4 +257,4 @@ extern int grpc_trace_channel; #define GRPC_CALL_LOG_OP(sev, elem, op) \ if (grpc_trace_channel) grpc_call_log_op(sev, elem, op) -#endif /* GRPC_INTERNAL_CORE_CHANNEL_CHANNEL_STACK_H */ +#endif /* GRPC_CORE_LIB_CHANNEL_CHANNEL_STACK_H */ diff --git a/src/core/lib/channel/channel_stack_builder.c b/src/core/lib/channel/channel_stack_builder.c new file mode 100644 index 00000000000..1ce0c4e07ff --- /dev/null +++ b/src/core/lib/channel/channel_stack_builder.c @@ -0,0 +1,258 @@ +/* + * + * Copyright 2016, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include "src/core/lib/channel/channel_stack_builder.h" + +#include + +#include + +int grpc_trace_channel_stack_builder = 0; + +typedef struct filter_node { + struct filter_node *next; + struct filter_node *prev; + const grpc_channel_filter *filter; + grpc_post_filter_create_init_func init; + void *init_arg; +} filter_node; + +struct grpc_channel_stack_builder { + // sentinel nodes for filters that have been added + filter_node begin; + filter_node end; + // various set/get-able parameters + const grpc_channel_args *args; + grpc_transport *transport; + const char *name; +}; + +struct grpc_channel_stack_builder_iterator { + grpc_channel_stack_builder *builder; + filter_node *node; +}; + +grpc_channel_stack_builder *grpc_channel_stack_builder_create(void) { + grpc_channel_stack_builder *b = gpr_malloc(sizeof(*b)); + memset(b, 0, sizeof(*b)); + + b->begin.filter = NULL; + b->end.filter = NULL; + b->begin.next = &b->end; + b->begin.prev = &b->end; + b->end.next = &b->begin; + b->end.prev = &b->begin; + + return b; +} + +static grpc_channel_stack_builder_iterator *create_iterator_at_filter_node( + grpc_channel_stack_builder *builder, filter_node *node) { + grpc_channel_stack_builder_iterator *it = gpr_malloc(sizeof(*it)); + it->builder = builder; + it->node = node; + return it; +} + +void grpc_channel_stack_builder_iterator_destroy( + grpc_channel_stack_builder_iterator *it) { + gpr_free(it); +} + +grpc_channel_stack_builder_iterator * +grpc_channel_stack_builder_create_iterator_at_first( + grpc_channel_stack_builder *builder) { + return create_iterator_at_filter_node(builder, &builder->begin); +} + +grpc_channel_stack_builder_iterator * +grpc_channel_stack_builder_create_iterator_at_last( + grpc_channel_stack_builder *builder) { + return create_iterator_at_filter_node(builder, &builder->end); +} + +bool grpc_channel_stack_builder_move_next( + grpc_channel_stack_builder_iterator *iterator) { + if (iterator->node == &iterator->builder->end) return false; + iterator->node = iterator->node->next; + return true; +} + +bool grpc_channel_stack_builder_move_prev( + grpc_channel_stack_builder_iterator *iterator) { + if (iterator->node == &iterator->builder->begin) return false; + iterator->node = iterator->node->prev; + return true; +} + +bool grpc_channel_stack_builder_move_prev( + grpc_channel_stack_builder_iterator *iterator); + +void grpc_channel_stack_builder_set_name(grpc_channel_stack_builder *builder, + const char *name) { + GPR_ASSERT(builder->name == NULL); + builder->name = name; +} + +void grpc_channel_stack_builder_set_channel_arguments( + grpc_channel_stack_builder *builder, const grpc_channel_args *args) { + GPR_ASSERT(builder->args == NULL); + builder->args = args; +} + +void grpc_channel_stack_builder_set_transport( + grpc_channel_stack_builder *builder, grpc_transport *transport) { + GPR_ASSERT(builder->transport == NULL); + builder->transport = transport; +} + +grpc_transport *grpc_channel_stack_builder_get_transport( + grpc_channel_stack_builder *builder) { + return builder->transport; +} + +const grpc_channel_args *grpc_channel_stack_builder_get_channel_arguments( + grpc_channel_stack_builder *builder) { + return builder->args; +} + +bool grpc_channel_stack_builder_append_filter( + grpc_channel_stack_builder *builder, const grpc_channel_filter *filter, + grpc_post_filter_create_init_func post_init_func, void *user_data) { + grpc_channel_stack_builder_iterator *it = + grpc_channel_stack_builder_create_iterator_at_last(builder); + bool ok = grpc_channel_stack_builder_add_filter_before( + it, filter, post_init_func, user_data); + grpc_channel_stack_builder_iterator_destroy(it); + return ok; +} + +bool grpc_channel_stack_builder_prepend_filter( + grpc_channel_stack_builder *builder, const grpc_channel_filter *filter, + grpc_post_filter_create_init_func post_init_func, void *user_data) { + grpc_channel_stack_builder_iterator *it = + grpc_channel_stack_builder_create_iterator_at_first(builder); + bool ok = grpc_channel_stack_builder_add_filter_after( + it, filter, post_init_func, user_data); + grpc_channel_stack_builder_iterator_destroy(it); + return ok; +} + +static void add_after(filter_node *before, const grpc_channel_filter *filter, + grpc_post_filter_create_init_func post_init_func, + void *user_data) { + filter_node *new = gpr_malloc(sizeof(*new)); + new->next = before->next; + new->prev = before; + new->next->prev = new->prev->next = new; + new->filter = filter; + new->init = post_init_func; + new->init_arg = user_data; +} + +bool grpc_channel_stack_builder_add_filter_before( + grpc_channel_stack_builder_iterator *iterator, + const grpc_channel_filter *filter, + grpc_post_filter_create_init_func post_init_func, void *user_data) { + if (iterator->node == &iterator->builder->begin) return false; + add_after(iterator->node->prev, filter, post_init_func, user_data); + return true; +} + +bool grpc_channel_stack_builder_add_filter_after( + grpc_channel_stack_builder_iterator *iterator, + const grpc_channel_filter *filter, + grpc_post_filter_create_init_func post_init_func, void *user_data) { + if (iterator->node == &iterator->builder->end) return false; + add_after(iterator->node, filter, post_init_func, user_data); + return true; +} + +void grpc_channel_stack_builder_destroy(grpc_channel_stack_builder *builder) { + filter_node *p = builder->begin.next; + while (p != &builder->end) { + filter_node *next = p->next; + gpr_free(p); + p = next; + } + gpr_free(builder); +} + +void *grpc_channel_stack_builder_finish(grpc_exec_ctx *exec_ctx, + grpc_channel_stack_builder *builder, + size_t prefix_bytes, int initial_refs, + grpc_iomgr_cb_func destroy, + void *destroy_arg) { + // count the number of filters + size_t num_filters = 0; + for (filter_node *p = builder->begin.next; p != &builder->end; p = p->next) { + num_filters++; + } + + // create an array of filters + const grpc_channel_filter **filters = + gpr_malloc(sizeof(*filters) * num_filters); + size_t i = 0; + for (filter_node *p = builder->begin.next; p != &builder->end; p = p->next) { + filters[i++] = p->filter; + } + + // calculate the size of the channel stack + size_t channel_stack_size = grpc_channel_stack_size(filters, num_filters); + + // allocate memory, with prefix_bytes followed by channel_stack_size + char *result = gpr_malloc(prefix_bytes + channel_stack_size); + // fetch a pointer to the channel stack + grpc_channel_stack *channel_stack = + (grpc_channel_stack *)(result + prefix_bytes); + // and initialize it + grpc_channel_stack_init(exec_ctx, initial_refs, destroy, + destroy_arg == NULL ? result : destroy_arg, filters, + num_filters, builder->args, builder->name, + channel_stack); + + // run post-initialization functions + i = 0; + for (filter_node *p = builder->begin.next; p != &builder->end; p = p->next) { + if (p->init != NULL) { + p->init(channel_stack, grpc_channel_stack_element(channel_stack, i), + p->init_arg); + } + i++; + } + + grpc_channel_stack_builder_destroy(builder); + gpr_free((grpc_channel_filter **)filters); + + return result; +} diff --git a/src/core/lib/channel/channel_stack_builder.h b/src/core/lib/channel/channel_stack_builder.h new file mode 100644 index 00000000000..8532c4462a5 --- /dev/null +++ b/src/core/lib/channel/channel_stack_builder.h @@ -0,0 +1,155 @@ +/* + * + * Copyright 2016, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#ifndef GRPC_CORE_LIB_CHANNEL_CHANNEL_STACK_BUILDER_H +#define GRPC_CORE_LIB_CHANNEL_CHANNEL_STACK_BUILDER_H + +#include + +#include "src/core/lib/channel/channel_args.h" +#include "src/core/lib/channel/channel_stack.h" + +/// grpc_channel_stack_builder offers a programmatic interface to selected +/// and order channel filters +typedef struct grpc_channel_stack_builder grpc_channel_stack_builder; +typedef struct grpc_channel_stack_builder_iterator + grpc_channel_stack_builder_iterator; + +/// Create a new channel stack builder +grpc_channel_stack_builder *grpc_channel_stack_builder_create(void); + +/// Assign a name to the channel stack: \a name must be statically allocated +void grpc_channel_stack_builder_set_name(grpc_channel_stack_builder *builder, + const char *name); + +/// Attach \a transport to the builder (does not take ownership) +void grpc_channel_stack_builder_set_transport( + grpc_channel_stack_builder *builder, grpc_transport *transport); + +/// Fetch attached transport +grpc_transport *grpc_channel_stack_builder_get_transport( + grpc_channel_stack_builder *builder); + +/// Set channel arguments: \a args must continue to exist until after +/// grpc_channel_stack_builder_finish returns +void grpc_channel_stack_builder_set_channel_arguments( + grpc_channel_stack_builder *builder, const grpc_channel_args *args); + +/// Return a borrowed pointer to the channel arguments +const grpc_channel_args *grpc_channel_stack_builder_get_channel_arguments( + grpc_channel_stack_builder *builder); + +/// Begin iterating over already defined filters in the builder at the beginning +grpc_channel_stack_builder_iterator * +grpc_channel_stack_builder_create_iterator_at_first( + grpc_channel_stack_builder *builder); + +/// Begin iterating over already defined filters in the builder at the end +grpc_channel_stack_builder_iterator * +grpc_channel_stack_builder_create_iterator_at_last( + grpc_channel_stack_builder *builder); + +/// Is an iterator at the first element? +bool grpc_channel_stack_builder_iterator_is_first( + grpc_channel_stack_builder_iterator *iterator); + +/// Is an iterator at the end? +bool grpc_channel_stack_builder_iterator_is_end( + grpc_channel_stack_builder_iterator *iterator); + +/// Move an iterator to the next item +bool grpc_channel_stack_builder_move_next( + grpc_channel_stack_builder_iterator *iterator); + +/// Move an iterator to the previous item +bool grpc_channel_stack_builder_move_prev( + grpc_channel_stack_builder_iterator *iterator); + +typedef void (*grpc_post_filter_create_init_func)( + grpc_channel_stack *channel_stack, grpc_channel_element *elem, void *arg); + +/// Add \a filter to the stack, after \a iterator. +/// Call \a post_init_func(..., \a user_data) once the channel stack is +/// created. +bool grpc_channel_stack_builder_add_filter_after( + grpc_channel_stack_builder_iterator *iterator, + const grpc_channel_filter *filter, + grpc_post_filter_create_init_func post_init_func, + void *user_data) GRPC_MUST_USE_RESULT; + +/// Add \a filter to the stack, before \a iterator. +/// Call \a post_init_func(..., \a user_data) once the channel stack is +/// created. +bool grpc_channel_stack_builder_add_filter_before( + grpc_channel_stack_builder_iterator *iterator, + const grpc_channel_filter *filter, + grpc_post_filter_create_init_func post_init_func, + void *user_data) GRPC_MUST_USE_RESULT; + +/// Add \a filter to the beginning of the filter list. +/// Call \a post_init_func(..., \a user_data) once the channel stack is +/// created. +bool grpc_channel_stack_builder_prepend_filter( + grpc_channel_stack_builder *builder, const grpc_channel_filter *filter, + grpc_post_filter_create_init_func post_init_func, + void *user_data) GRPC_MUST_USE_RESULT; + +/// Add \a filter to the end of the filter list. +/// Call \a post_init_func(..., \a user_data) once the channel stack is +/// created. +bool grpc_channel_stack_builder_append_filter( + grpc_channel_stack_builder *builder, const grpc_channel_filter *filter, + grpc_post_filter_create_init_func post_init_func, + void *user_data) GRPC_MUST_USE_RESULT; + +/// Terminate iteration and destroy \a iterator +void grpc_channel_stack_builder_iterator_destroy( + grpc_channel_stack_builder_iterator *iterator); + +/// Destroy the builder, return the freshly minted channel stack +/// Allocates \a prefix_bytes bytes before the channel stack +/// Returns the base pointer of the allocated block +/// \a initial_refs, \a destroy, \a destroy_arg are as per +/// grpc_channel_stack_init +void *grpc_channel_stack_builder_finish(grpc_exec_ctx *exec_ctx, + grpc_channel_stack_builder *builder, + size_t prefix_bytes, int initial_refs, + grpc_iomgr_cb_func destroy, + void *destroy_arg); + +/// Destroy the builder without creating a channel stack +void grpc_channel_stack_builder_destroy(grpc_channel_stack_builder *builder); + +extern int grpc_trace_channel_stack_builder; + +#endif /* GRPC_CORE_LIB_CHANNEL_CHANNEL_STACK_BUILDER_H */ diff --git a/src/core/channel/client_channel.c b/src/core/lib/channel/client_channel.c similarity index 96% rename from src/core/channel/client_channel.c rename to src/core/lib/channel/client_channel.c index f021a8ae329..9fdf803ecf8 100644 --- a/src/core/channel/client_channel.c +++ b/src/core/lib/channel/client_channel.c @@ -31,7 +31,7 @@ * */ -#include "src/core/channel/client_channel.h" +#include "src/core/lib/channel/client_channel.h" #include #include @@ -41,14 +41,14 @@ #include #include -#include "src/core/channel/channel_args.h" -#include "src/core/channel/connected_channel.h" -#include "src/core/channel/subchannel_call_holder.h" -#include "src/core/iomgr/iomgr.h" -#include "src/core/profiling/timers.h" -#include "src/core/support/string.h" -#include "src/core/surface/channel.h" -#include "src/core/transport/connectivity_state.h" +#include "src/core/lib/channel/channel_args.h" +#include "src/core/lib/channel/connected_channel.h" +#include "src/core/lib/channel/subchannel_call_holder.h" +#include "src/core/lib/iomgr/iomgr.h" +#include "src/core/lib/profiling/timers.h" +#include "src/core/lib/support/string.h" +#include "src/core/lib/surface/channel.h" +#include "src/core/lib/transport/connectivity_state.h" /* Client channel implementation */ @@ -431,9 +431,17 @@ static void cc_set_pollset(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, } const grpc_channel_filter grpc_client_channel_filter = { - cc_start_transport_stream_op, cc_start_transport_op, sizeof(call_data), - init_call_elem, cc_set_pollset, destroy_call_elem, sizeof(channel_data), - init_channel_elem, destroy_channel_elem, cc_get_peer, "client-channel", + cc_start_transport_stream_op, + cc_start_transport_op, + sizeof(call_data), + init_call_elem, + cc_set_pollset, + destroy_call_elem, + sizeof(channel_data), + init_channel_elem, + destroy_channel_elem, + cc_get_peer, + "client-channel", }; void grpc_client_channel_set_resolver(grpc_exec_ctx *exec_ctx, diff --git a/src/core/channel/client_channel.h b/src/core/lib/channel/client_channel.h similarity index 90% rename from src/core/channel/client_channel.h rename to src/core/lib/channel/client_channel.h index d9bc4971f1a..8777796fb6d 100644 --- a/src/core/channel/client_channel.h +++ b/src/core/lib/channel/client_channel.h @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,11 +31,11 @@ * */ -#ifndef GRPC_INTERNAL_CORE_CHANNEL_CLIENT_CHANNEL_H -#define GRPC_INTERNAL_CORE_CHANNEL_CLIENT_CHANNEL_H +#ifndef GRPC_CORE_LIB_CHANNEL_CLIENT_CHANNEL_H +#define GRPC_CORE_LIB_CHANNEL_CLIENT_CHANNEL_H -#include "src/core/channel/channel_stack.h" -#include "src/core/client_config/resolver.h" +#include "src/core/lib/channel/channel_stack.h" +#include "src/core/lib/client_config/resolver.h" /* A client channel is a channel that begins disconnected, and can connect to some endpoint on demand. If that endpoint disconnects, it will be @@ -60,4 +60,4 @@ void grpc_client_channel_watch_connectivity_state( grpc_exec_ctx *exec_ctx, grpc_channel_element *elem, grpc_pollset *pollset, grpc_connectivity_state *state, grpc_closure *on_complete); -#endif /* GRPC_INTERNAL_CORE_CHANNEL_CLIENT_CHANNEL_H */ +#endif /* GRPC_CORE_LIB_CHANNEL_CLIENT_CHANNEL_H */ diff --git a/src/core/channel/compress_filter.c b/src/core/lib/channel/compress_filter.c similarity index 94% rename from src/core/channel/compress_filter.c rename to src/core/lib/channel/compress_filter.c index 3e7ca08fd29..04bb7cc76f1 100644 --- a/src/core/channel/compress_filter.c +++ b/src/core/lib/channel/compress_filter.c @@ -39,13 +39,13 @@ #include #include -#include "src/core/channel/channel_args.h" -#include "src/core/channel/compress_filter.h" -#include "src/core/compression/algorithm_metadata.h" -#include "src/core/compression/message_compress.h" -#include "src/core/profiling/timers.h" -#include "src/core/support/string.h" -#include "src/core/transport/static_metadata.h" +#include "src/core/lib/channel/channel_args.h" +#include "src/core/lib/channel/compress_filter.h" +#include "src/core/lib/compression/algorithm_metadata.h" +#include "src/core/lib/compression/message_compress.h" +#include "src/core/lib/profiling/timers.h" +#include "src/core/lib/support/string.h" +#include "src/core/lib/transport/static_metadata.h" typedef struct call_data { gpr_slice_buffer slices; /**< Buffers up input slices to be compressed */ @@ -291,7 +291,14 @@ static void destroy_channel_elem(grpc_exec_ctx *exec_ctx, grpc_channel_element *elem) {} const grpc_channel_filter grpc_compress_filter = { - compress_start_transport_stream_op, grpc_channel_next_op, sizeof(call_data), - init_call_elem, grpc_call_stack_ignore_set_pollset, destroy_call_elem, - sizeof(channel_data), init_channel_elem, destroy_channel_elem, - grpc_call_next_get_peer, "compress"}; + compress_start_transport_stream_op, + grpc_channel_next_op, + sizeof(call_data), + init_call_elem, + grpc_call_stack_ignore_set_pollset, + destroy_call_elem, + sizeof(channel_data), + init_channel_elem, + destroy_channel_elem, + grpc_call_next_get_peer, + "compress"}; diff --git a/src/core/channel/compress_filter.h b/src/core/lib/channel/compress_filter.h similarity index 91% rename from src/core/channel/compress_filter.h rename to src/core/lib/channel/compress_filter.h index 415459bca60..9010074335a 100644 --- a/src/core/channel/compress_filter.h +++ b/src/core/lib/channel/compress_filter.h @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,10 +31,10 @@ * */ -#ifndef GRPC_INTERNAL_CORE_CHANNEL_COMPRESS_FILTER_H -#define GRPC_INTERNAL_CORE_CHANNEL_COMPRESS_FILTER_H +#ifndef GRPC_CORE_LIB_CHANNEL_COMPRESS_FILTER_H +#define GRPC_CORE_LIB_CHANNEL_COMPRESS_FILTER_H -#include "src/core/channel/channel_stack.h" +#include "src/core/lib/channel/channel_stack.h" #define GRPC_COMPRESS_REQUEST_ALGORITHM_KEY "grpc-internal-encoding-request" @@ -62,4 +62,4 @@ extern const grpc_channel_filter grpc_compress_filter; -#endif /* GRPC_INTERNAL_CORE_CHANNEL_COMPRESS_FILTER_H */ +#endif /* GRPC_CORE_LIB_CHANNEL_COMPRESS_FILTER_H */ diff --git a/src/core/channel/connected_channel.c b/src/core/lib/channel/connected_channel.c similarity index 82% rename from src/core/channel/connected_channel.c rename to src/core/lib/channel/connected_channel.c index e8eb9dcfc5c..5e3a8974ce7 100644 --- a/src/core/channel/connected_channel.c +++ b/src/core/lib/channel/connected_channel.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,19 +31,19 @@ * */ -#include "src/core/channel/connected_channel.h" +#include "src/core/lib/channel/connected_channel.h" #include #include #include -#include "src/core/support/string.h" -#include "src/core/transport/transport.h" -#include "src/core/profiling/timers.h" #include #include #include #include +#include "src/core/lib/profiling/timers.h" +#include "src/core/lib/support/string.h" +#include "src/core/lib/transport/transport.h" #define MAX_BUFFER_LENGTH 8192 @@ -67,7 +67,6 @@ static void con_start_transport_stream_op(grpc_exec_ctx *exec_ctx, grpc_transport_stream_op *op) { call_data *calld = elem->call_data; channel_data *chand = elem->channel_data; - GPR_ASSERT(elem->filter == &grpc_connected_channel_filter); GRPC_CALL_LOG_OP(GPR_INFO, elem, op); grpc_transport_perform_stream_op(exec_ctx, chand->transport, @@ -88,7 +87,6 @@ static void init_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, channel_data *chand = elem->channel_data; int r; - GPR_ASSERT(elem->filter == &grpc_connected_channel_filter); r = grpc_transport_init_stream( exec_ctx, chand->transport, TRANSPORT_STREAM_FROM_CALL_DATA(calld), &args->call_stack->refcount, args->server_transport_data); @@ -108,7 +106,6 @@ static void destroy_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem) { call_data *calld = elem->call_data; channel_data *chand = elem->channel_data; - GPR_ASSERT(elem->filter == &grpc_connected_channel_filter); grpc_transport_destroy_stream(exec_ctx, chand->transport, TRANSPORT_STREAM_FROM_CALL_DATA(calld)); } @@ -119,7 +116,6 @@ static void init_channel_elem(grpc_exec_ctx *exec_ctx, grpc_channel_element_args *args) { channel_data *cd = (channel_data *)elem->channel_data; GPR_ASSERT(args->is_last); - GPR_ASSERT(elem->filter == &grpc_connected_channel_filter); cd->transport = NULL; } @@ -127,7 +123,6 @@ static void init_channel_elem(grpc_exec_ctx *exec_ctx, static void destroy_channel_elem(grpc_exec_ctx *exec_ctx, grpc_channel_element *elem) { channel_data *cd = (channel_data *)elem->channel_data; - GPR_ASSERT(elem->filter == &grpc_connected_channel_filter); grpc_transport_destroy(exec_ctx, cd->transport); } @@ -136,21 +131,26 @@ static char *con_get_peer(grpc_exec_ctx *exec_ctx, grpc_call_element *elem) { return grpc_transport_get_peer(exec_ctx, chand->transport); } -const grpc_channel_filter grpc_connected_channel_filter = { - con_start_transport_stream_op, con_start_transport_op, sizeof(call_data), - init_call_elem, set_pollset, destroy_call_elem, sizeof(channel_data), - init_channel_elem, destroy_channel_elem, con_get_peer, "connected", +static const grpc_channel_filter connected_channel_filter = { + con_start_transport_stream_op, + con_start_transport_op, + sizeof(call_data), + init_call_elem, + set_pollset, + destroy_call_elem, + sizeof(channel_data), + init_channel_elem, + destroy_channel_elem, + con_get_peer, + "connected", }; -void grpc_connected_channel_bind_transport(grpc_channel_stack *channel_stack, - grpc_transport *transport) { - /* Assumes that the connected channel filter is always the last filter - in a channel stack */ - grpc_channel_element *elem = grpc_channel_stack_last_element(channel_stack); +static void bind_transport(grpc_channel_stack *channel_stack, + grpc_channel_element *elem, void *t) { channel_data *cd = (channel_data *)elem->channel_data; - GPR_ASSERT(elem->filter == &grpc_connected_channel_filter); + GPR_ASSERT(elem->filter == &connected_channel_filter); GPR_ASSERT(cd->transport == NULL); - cd->transport = transport; + cd->transport = t; /* HACK(ctiller): increase call stack size for the channel to make space for channel data. We need a cleaner (but performant) way to do this, @@ -158,7 +158,16 @@ void grpc_connected_channel_bind_transport(grpc_channel_stack *channel_stack, This is only "safe" because call stacks place no additional data after the last call element, and the last call element MUST be the connected channel. */ - channel_stack->call_stack_size += grpc_transport_stream_size(transport); + channel_stack->call_stack_size += grpc_transport_stream_size(t); +} + +bool grpc_add_connected_filter(grpc_channel_stack_builder *builder, + void *arg_must_be_null) { + GPR_ASSERT(arg_must_be_null == NULL); + grpc_transport *t = grpc_channel_stack_builder_get_transport(builder); + GPR_ASSERT(t != NULL); + return grpc_channel_stack_builder_append_filter( + builder, &connected_channel_filter, bind_transport, t); } grpc_stream *grpc_connected_channel_get_stream(grpc_call_element *elem) { diff --git a/src/core/lib/channel/connected_channel.h b/src/core/lib/channel/connected_channel.h new file mode 100644 index 00000000000..4f20b751ccd --- /dev/null +++ b/src/core/lib/channel/connected_channel.h @@ -0,0 +1,42 @@ +/* + * + * Copyright 2015-2016, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#ifndef GRPC_CORE_LIB_CHANNEL_CONNECTED_CHANNEL_H +#define GRPC_CORE_LIB_CHANNEL_CONNECTED_CHANNEL_H + +#include "src/core/lib/channel/channel_stack_builder.h" + +bool grpc_add_connected_filter(grpc_channel_stack_builder *builder, + void *arg_must_be_null); + +#endif /* GRPC_CORE_LIB_CHANNEL_CONNECTED_CHANNEL_H */ diff --git a/src/core/channel/context.h b/src/core/lib/channel/context.h similarity index 91% rename from src/core/channel/context.h rename to src/core/lib/channel/context.h index ac5796b9ef1..bca102da9af 100644 --- a/src/core/channel/context.h +++ b/src/core/lib/channel/context.h @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,8 +31,8 @@ * */ -#ifndef GRPC_INTERNAL_CORE_CHANNEL_CONTEXT_H -#define GRPC_INTERNAL_CORE_CHANNEL_CONTEXT_H +#ifndef GRPC_CORE_LIB_CHANNEL_CONTEXT_H +#define GRPC_CORE_LIB_CHANNEL_CONTEXT_H /* Call object context pointers */ typedef enum { @@ -46,4 +46,4 @@ typedef struct { void (*destroy)(void *); } grpc_call_context_element; -#endif /* GRPC_INTERNAL_CORE_CHANNEL_CONTEXT_H */ +#endif /* GRPC_CORE_LIB_CHANNEL_CONTEXT_H */ diff --git a/src/core/channel/http_client_filter.c b/src/core/lib/channel/http_client_filter.c similarity index 94% rename from src/core/channel/http_client_filter.c rename to src/core/lib/channel/http_client_filter.c index 1aa27208c2e..7dbac384146 100644 --- a/src/core/channel/http_client_filter.c +++ b/src/core/lib/channel/http_client_filter.c @@ -30,14 +30,14 @@ * */ -#include "src/core/channel/http_client_filter.h" +#include "src/core/lib/channel/http_client_filter.h" #include #include #include #include -#include "src/core/profiling/timers.h" -#include "src/core/support/string.h" -#include "src/core/transport/static_metadata.h" +#include "src/core/lib/profiling/timers.h" +#include "src/core/lib/support/string.h" +#include "src/core/lib/transport/static_metadata.h" typedef struct call_data { grpc_linked_mdelem method; @@ -242,7 +242,14 @@ static void destroy_channel_elem(grpc_exec_ctx *exec_ctx, } const grpc_channel_filter grpc_http_client_filter = { - hc_start_transport_op, grpc_channel_next_op, sizeof(call_data), - init_call_elem, grpc_call_stack_ignore_set_pollset, destroy_call_elem, - sizeof(channel_data), init_channel_elem, destroy_channel_elem, - grpc_call_next_get_peer, "http-client"}; + hc_start_transport_op, + grpc_channel_next_op, + sizeof(call_data), + init_call_elem, + grpc_call_stack_ignore_set_pollset, + destroy_call_elem, + sizeof(channel_data), + init_channel_elem, + destroy_channel_elem, + grpc_call_next_get_peer, + "http-client"}; diff --git a/src/core/channel/http_client_filter.h b/src/core/lib/channel/http_client_filter.h similarity index 87% rename from src/core/channel/http_client_filter.h rename to src/core/lib/channel/http_client_filter.h index 21c66b9b8ee..418426e9ccb 100644 --- a/src/core/channel/http_client_filter.h +++ b/src/core/lib/channel/http_client_filter.h @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,14 +31,14 @@ * */ -#ifndef GRPC_INTERNAL_CORE_CHANNEL_HTTP_CLIENT_FILTER_H -#define GRPC_INTERNAL_CORE_CHANNEL_HTTP_CLIENT_FILTER_H +#ifndef GRPC_CORE_LIB_CHANNEL_HTTP_CLIENT_FILTER_H +#define GRPC_CORE_LIB_CHANNEL_HTTP_CLIENT_FILTER_H -#include "src/core/channel/channel_stack.h" +#include "src/core/lib/channel/channel_stack.h" /* Processes metadata on the client side for HTTP2 transports */ extern const grpc_channel_filter grpc_http_client_filter; #define GRPC_ARG_HTTP2_SCHEME "grpc.http2_scheme" -#endif /* GRPC_INTERNAL_CORE_CHANNEL_HTTP_CLIENT_FILTER_H */ +#endif /* GRPC_CORE_LIB_CHANNEL_HTTP_CLIENT_FILTER_H */ diff --git a/src/core/channel/http_server_filter.c b/src/core/lib/channel/http_server_filter.c similarity index 95% rename from src/core/channel/http_server_filter.c rename to src/core/lib/channel/http_server_filter.c index 370f8dbe423..df99b77ab31 100644 --- a/src/core/channel/http_server_filter.c +++ b/src/core/lib/channel/http_server_filter.c @@ -31,13 +31,13 @@ * */ -#include "src/core/channel/http_server_filter.h" +#include "src/core/lib/channel/http_server_filter.h" #include #include #include -#include "src/core/profiling/timers.h" -#include "src/core/transport/static_metadata.h" +#include "src/core/lib/profiling/timers.h" +#include "src/core/lib/transport/static_metadata.h" typedef struct call_data { uint8_t seen_path; @@ -227,7 +227,14 @@ static void destroy_channel_elem(grpc_exec_ctx *exec_ctx, grpc_channel_element *elem) {} const grpc_channel_filter grpc_http_server_filter = { - hs_start_transport_op, grpc_channel_next_op, sizeof(call_data), - init_call_elem, grpc_call_stack_ignore_set_pollset, destroy_call_elem, - sizeof(channel_data), init_channel_elem, destroy_channel_elem, - grpc_call_next_get_peer, "http-server"}; + hs_start_transport_op, + grpc_channel_next_op, + sizeof(call_data), + init_call_elem, + grpc_call_stack_ignore_set_pollset, + destroy_call_elem, + sizeof(channel_data), + init_channel_elem, + destroy_channel_elem, + grpc_call_next_get_peer, + "http-server"}; diff --git a/src/core/channel/http_server_filter.h b/src/core/lib/channel/http_server_filter.h similarity index 87% rename from src/core/channel/http_server_filter.h rename to src/core/lib/channel/http_server_filter.h index f219d4e66f3..c8cf920ded1 100644 --- a/src/core/channel/http_server_filter.h +++ b/src/core/lib/channel/http_server_filter.h @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,12 +31,12 @@ * */ -#ifndef GRPC_INTERNAL_CORE_CHANNEL_HTTP_SERVER_FILTER_H -#define GRPC_INTERNAL_CORE_CHANNEL_HTTP_SERVER_FILTER_H +#ifndef GRPC_CORE_LIB_CHANNEL_HTTP_SERVER_FILTER_H +#define GRPC_CORE_LIB_CHANNEL_HTTP_SERVER_FILTER_H -#include "src/core/channel/channel_stack.h" +#include "src/core/lib/channel/channel_stack.h" /* Processes metadata on the client side for HTTP2 transports */ extern const grpc_channel_filter grpc_http_server_filter; -#endif /* GRPC_INTERNAL_CORE_CHANNEL_HTTP_SERVER_FILTER_H */ +#endif /* GRPC_CORE_LIB_CHANNEL_HTTP_SERVER_FILTER_H */ diff --git a/src/core/channel/subchannel_call_holder.c b/src/core/lib/channel/subchannel_call_holder.c similarity index 99% rename from src/core/channel/subchannel_call_holder.c rename to src/core/lib/channel/subchannel_call_holder.c index 9c087dc2a1d..6c6d42dd73b 100644 --- a/src/core/channel/subchannel_call_holder.c +++ b/src/core/lib/channel/subchannel_call_holder.c @@ -31,11 +31,11 @@ * */ -#include "src/core/channel/subchannel_call_holder.h" +#include "src/core/lib/channel/subchannel_call_holder.h" #include -#include "src/core/profiling/timers.h" +#include "src/core/lib/profiling/timers.h" #define GET_CALL(holder) \ ((grpc_subchannel_call *)(gpr_atm_acq_load(&(holder)->subchannel_call))) diff --git a/src/core/channel/subchannel_call_holder.h b/src/core/lib/channel/subchannel_call_holder.h similarity index 91% rename from src/core/channel/subchannel_call_holder.h rename to src/core/lib/channel/subchannel_call_holder.h index 9cf72c6cf76..882f366792a 100644 --- a/src/core/channel/subchannel_call_holder.h +++ b/src/core/lib/channel/subchannel_call_holder.h @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,10 +31,10 @@ * */ -#ifndef GRPC_INTERNAL_CORE_CHANNEL_SUBCHANNEL_CALL_HOLDER_H -#define GRPC_INTERNAL_CORE_CHANNEL_SUBCHANNEL_CALL_HOLDER_H +#ifndef GRPC_CORE_LIB_CHANNEL_SUBCHANNEL_CALL_HOLDER_H +#define GRPC_CORE_LIB_CHANNEL_SUBCHANNEL_CALL_HOLDER_H -#include "src/core/client_config/subchannel.h" +#include "src/core/lib/client_config/subchannel.h" /** Pick a subchannel for grpc_subchannel_call_holder; Return 1 if subchannel is available immediately (in which case on_ready @@ -55,15 +55,14 @@ typedef enum { for initial metadata before trying to create a call object, and handling cancellation gracefully. - Both the channel and uchannel filter use this as their call_data. */ + The channel filter uses this as their call_data. */ typedef struct grpc_subchannel_call_holder { /** either 0 for no call, 1 for cancelled, or a pointer to a grpc_subchannel_call */ gpr_atm subchannel_call; /** Helper function to choose the subchannel on which to create the call object. Channel filter delegates to the load - balancing policy (once it's ready); uchannel returns - immediately */ + balancing policy (once it's ready). */ grpc_subchannel_call_holder_pick_subchannel pick_subchannel; void *pick_subchannel_arg; @@ -95,4 +94,4 @@ void grpc_subchannel_call_holder_perform_op(grpc_exec_ctx *exec_ctx, char *grpc_subchannel_call_holder_get_peer(grpc_exec_ctx *exec_ctx, grpc_subchannel_call_holder *holder); -#endif +#endif /* GRPC_CORE_LIB_CHANNEL_SUBCHANNEL_CALL_HOLDER_H */ diff --git a/src/core/client_config/README.md b/src/core/lib/client_config/README.md similarity index 100% rename from src/core/client_config/README.md rename to src/core/lib/client_config/README.md diff --git a/src/core/client_config/client_config.c b/src/core/lib/client_config/client_config.c similarity index 97% rename from src/core/client_config/client_config.c rename to src/core/lib/client_config/client_config.c index c500af25eec..82c8d680998 100644 --- a/src/core/client_config/client_config.c +++ b/src/core/lib/client_config/client_config.c @@ -31,7 +31,7 @@ * */ -#include "src/core/client_config/client_config.h" +#include "src/core/lib/client_config/client_config.h" #include diff --git a/src/core/client_config/client_config.h b/src/core/lib/client_config/client_config.h similarity index 89% rename from src/core/client_config/client_config.h rename to src/core/lib/client_config/client_config.h index 04bf036b00b..404ec0d3a57 100644 --- a/src/core/client_config/client_config.h +++ b/src/core/lib/client_config/client_config.h @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,10 +31,10 @@ * */ -#ifndef GRPC_INTERNAL_CORE_CLIENT_CONFIG_CLIENT_CONFIG_H -#define GRPC_INTERNAL_CORE_CLIENT_CONFIG_CLIENT_CONFIG_H +#ifndef GRPC_CORE_LIB_CLIENT_CONFIG_CLIENT_CONFIG_H +#define GRPC_CORE_LIB_CLIENT_CONFIG_CLIENT_CONFIG_H -#include "src/core/client_config/lb_policy.h" +#include "src/core/lib/client_config/lb_policy.h" /** Total configuration for a client. Provided, and updated, by grpc_resolver */ @@ -50,4 +50,4 @@ void grpc_client_config_set_lb_policy(grpc_client_config *client_config, grpc_lb_policy *grpc_client_config_get_lb_policy( grpc_client_config *client_config); -#endif /* GRPC_INTERNAL_CORE_CLIENT_CONFIG_CLIENT_CONFIG_H */ +#endif /* GRPC_CORE_LIB_CLIENT_CONFIG_CLIENT_CONFIG_H */ diff --git a/src/core/client_config/connector.c b/src/core/lib/client_config/connector.c similarity index 97% rename from src/core/client_config/connector.c rename to src/core/lib/client_config/connector.c index aa34aa7fab6..f51d862c6de 100644 --- a/src/core/client_config/connector.c +++ b/src/core/lib/client_config/connector.c @@ -31,7 +31,7 @@ * */ -#include "src/core/client_config/connector.h" +#include "src/core/lib/client_config/connector.h" grpc_connector* grpc_connector_ref(grpc_connector* connector) { connector->vtable->ref(connector); diff --git a/src/core/client_config/connector.h b/src/core/lib/client_config/connector.h similarity index 90% rename from src/core/client_config/connector.h rename to src/core/lib/client_config/connector.h index b91eb512c30..21b925aadea 100644 --- a/src/core/client_config/connector.h +++ b/src/core/lib/client_config/connector.h @@ -31,12 +31,12 @@ * */ -#ifndef GRPC_INTERNAL_CORE_CLIENT_CONFIG_CONNECTOR_H -#define GRPC_INTERNAL_CORE_CLIENT_CONFIG_CONNECTOR_H +#ifndef GRPC_CORE_LIB_CLIENT_CONFIG_CONNECTOR_H +#define GRPC_CORE_LIB_CLIENT_CONFIG_CONNECTOR_H -#include "src/core/channel/channel_stack.h" -#include "src/core/iomgr/sockaddr.h" -#include "src/core/transport/transport.h" +#include "src/core/lib/channel/channel_stack.h" +#include "src/core/lib/iomgr/sockaddr.h" +#include "src/core/lib/transport/transport.h" typedef struct grpc_connector grpc_connector; typedef struct grpc_connector_vtable grpc_connector_vtable; @@ -62,9 +62,6 @@ typedef struct { typedef struct { /** the connected transport */ grpc_transport *transport; - /** any additional filters (owned by the caller of connect) */ - const grpc_channel_filter **filters; - size_t num_filters; /** channel arguments (to be passed to the filters) */ const grpc_channel_args *channel_args; @@ -92,4 +89,4 @@ void grpc_connector_connect(grpc_exec_ctx *exec_ctx, grpc_connector *connector, void grpc_connector_shutdown(grpc_exec_ctx *exec_ctx, grpc_connector *connector); -#endif +#endif /* GRPC_CORE_LIB_CLIENT_CONFIG_CONNECTOR_H */ diff --git a/src/core/client_config/default_initial_connect_string.c b/src/core/lib/client_config/default_initial_connect_string.c similarity index 95% rename from src/core/client_config/default_initial_connect_string.c rename to src/core/lib/client_config/default_initial_connect_string.c index 6a4e23e6f29..86eb37de77f 100644 --- a/src/core/client_config/default_initial_connect_string.c +++ b/src/core/lib/client_config/default_initial_connect_string.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -32,7 +32,7 @@ */ #include -#include "src/core/iomgr/sockaddr.h" +#include "src/core/lib/iomgr/sockaddr.h" void grpc_set_default_initial_connect_string(struct sockaddr **addr, size_t *addr_len, diff --git a/src/core/client_config/initial_connect_string.c b/src/core/lib/client_config/initial_connect_string.c similarity index 95% rename from src/core/client_config/initial_connect_string.c rename to src/core/lib/client_config/initial_connect_string.c index 19afa1675a7..95ae7283167 100644 --- a/src/core/client_config/initial_connect_string.c +++ b/src/core/lib/client_config/initial_connect_string.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,7 +31,7 @@ * */ -#include "src/core/client_config/initial_connect_string.h" +#include "src/core/lib/client_config/initial_connect_string.h" #include diff --git a/src/core/client_config/initial_connect_string.h b/src/core/lib/client_config/initial_connect_string.h similarity index 88% rename from src/core/client_config/initial_connect_string.h rename to src/core/lib/client_config/initial_connect_string.h index b6dca7134a4..eec42fa2403 100644 --- a/src/core/client_config/initial_connect_string.h +++ b/src/core/lib/client_config/initial_connect_string.h @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,11 +31,11 @@ * */ -#ifndef GRPC_INTERNAL_CORE_CLIENT_CONFIG_INITIAL_CONNECT_STRING_H -#define GRPC_INTERNAL_CORE_CLIENT_CONFIG_INITIAL_CONNECT_STRING_H +#ifndef GRPC_CORE_LIB_CLIENT_CONFIG_INITIAL_CONNECT_STRING_H +#define GRPC_CORE_LIB_CLIENT_CONFIG_INITIAL_CONNECT_STRING_H #include -#include "src/core/iomgr/sockaddr.h" +#include "src/core/lib/iomgr/sockaddr.h" typedef void (*grpc_set_initial_connect_string_func)(struct sockaddr **addr, size_t *addr_len, @@ -47,4 +47,4 @@ void grpc_test_set_initial_connect_string_function( void grpc_set_initial_connect_string(struct sockaddr **addr, size_t *addr_len, gpr_slice *connect_string); -#endif /* GRPC_INTERNAL_CORE_CLIENT_CONFIG_INITIAL_CONNECT_STRING_H */ +#endif /* GRPC_CORE_LIB_CLIENT_CONFIG_INITIAL_CONNECT_STRING_H */ diff --git a/src/core/client_config/lb_policies/load_balancer_api.c b/src/core/lib/client_config/lb_policies/load_balancer_api.c similarity index 98% rename from src/core/client_config/lb_policies/load_balancer_api.c rename to src/core/lib/client_config/lb_policies/load_balancer_api.c index a6b5785fe4e..4cbed200df3 100644 --- a/src/core/client_config/lb_policies/load_balancer_api.c +++ b/src/core/lib/client_config/lb_policies/load_balancer_api.c @@ -31,7 +31,7 @@ * */ -#include "src/core/client_config/lb_policies/load_balancer_api.h" +#include "src/core/lib/client_config/lb_policies/load_balancer_api.h" #include "third_party/nanopb/pb_decode.h" #include "third_party/nanopb/pb_encode.h" diff --git a/src/core/client_config/lb_policies/load_balancer_api.h b/src/core/lib/client_config/lb_policies/load_balancer_api.h similarity index 90% rename from src/core/client_config/lb_policies/load_balancer_api.h rename to src/core/lib/client_config/lb_policies/load_balancer_api.h index 4dbe1d6c224..83299adfa9d 100644 --- a/src/core/client_config/lb_policies/load_balancer_api.h +++ b/src/core/lib/client_config/lb_policies/load_balancer_api.h @@ -31,13 +31,13 @@ * */ -#ifndef GRPC_INTERNAL_CORE_CLIENT_CONFIG_LB_POLICIES_LOAD_BALANCER_API_H -#define GRPC_INTERNAL_CORE_CLIENT_CONFIG_LB_POLICIES_LOAD_BALANCER_API_H +#ifndef GRPC_CORE_LIB_CLIENT_CONFIG_LB_POLICIES_LOAD_BALANCER_API_H +#define GRPC_CORE_LIB_CLIENT_CONFIG_LB_POLICIES_LOAD_BALANCER_API_H #include -#include "src/core/client_config/lb_policy_factory.h" -#include "src/core/proto/grpc/lb/v0/load_balancer.pb.h" +#include "src/core/lib/client_config/lb_policy_factory.h" +#include "src/core/lib/proto/grpc/lb/v0/load_balancer.pb.h" #ifdef __cplusplus extern "C" { @@ -82,4 +82,4 @@ void grpc_grpclb_response_destroy(grpc_grpclb_response *response); } #endif -#endif /* GRPC_INTERNAL_CORE_CLIENT_CONFIG_LB_POLICIES_LOAD_BALANCER_API_H */ +#endif /* GRPC_CORE_LIB_CLIENT_CONFIG_LB_POLICIES_LOAD_BALANCER_API_H */ diff --git a/src/core/client_config/lb_policies/pick_first.c b/src/core/lib/client_config/lb_policies/pick_first.c similarity index 97% rename from src/core/client_config/lb_policies/pick_first.c rename to src/core/lib/client_config/lb_policies/pick_first.c index 8ed1223d399..2e399b73f90 100644 --- a/src/core/client_config/lb_policies/pick_first.c +++ b/src/core/lib/client_config/lb_policies/pick_first.c @@ -31,13 +31,13 @@ * */ -#include "src/core/client_config/lb_policies/pick_first.h" -#include "src/core/client_config/lb_policy_factory.h" +#include "src/core/lib/client_config/lb_policies/pick_first.h" +#include "src/core/lib/client_config/lb_policy_factory.h" #include #include -#include "src/core/transport/connectivity_state.h" +#include "src/core/lib/transport/connectivity_state.h" typedef struct pending_pick { struct pending_pick *next; @@ -378,8 +378,14 @@ void pf_ping_one(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol, } static const grpc_lb_policy_vtable pick_first_lb_policy_vtable = { - pf_destroy, pf_shutdown, pf_pick, pf_cancel_pick, pf_ping_one, pf_exit_idle, - pf_check_connectivity, pf_notify_on_state_change}; + pf_destroy, + pf_shutdown, + pf_pick, + pf_cancel_pick, + pf_ping_one, + pf_exit_idle, + pf_check_connectivity, + pf_notify_on_state_change}; static void pick_first_factory_ref(grpc_lb_policy_factory *factory) {} diff --git a/src/core/client_config/lb_policies/pick_first.h b/src/core/lib/client_config/lb_policies/pick_first.h similarity index 86% rename from src/core/client_config/lb_policies/pick_first.h rename to src/core/lib/client_config/lb_policies/pick_first.h index 3ca53ad42af..dba86ea7ad3 100644 --- a/src/core/client_config/lb_policies/pick_first.h +++ b/src/core/lib/client_config/lb_policies/pick_first.h @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,13 +31,13 @@ * */ -#ifndef GRPC_INTERNAL_CORE_CLIENT_CONFIG_PICK_FIRST_H -#define GRPC_INTERNAL_CORE_CLIENT_CONFIG_PICK_FIRST_H +#ifndef GRPC_CORE_LIB_CLIENT_CONFIG_LB_POLICIES_PICK_FIRST_H +#define GRPC_CORE_LIB_CLIENT_CONFIG_LB_POLICIES_PICK_FIRST_H -#include "src/core/client_config/lb_policy_factory.h" +#include "src/core/lib/client_config/lb_policy_factory.h" /** Returns a load balancing factory for the pick first policy, which picks up * the first subchannel from \a subchannels to succesfully connect */ grpc_lb_policy_factory *grpc_pick_first_lb_factory_create(); -#endif +#endif /* GRPC_CORE_LIB_CLIENT_CONFIG_LB_POLICIES_PICK_FIRST_H */ diff --git a/src/core/client_config/lb_policies/round_robin.c b/src/core/lib/client_config/lb_policies/round_robin.c similarity index 98% rename from src/core/client_config/lb_policies/round_robin.c rename to src/core/lib/client_config/lb_policies/round_robin.c index 98d9acc75bf..c904c5f9215 100644 --- a/src/core/client_config/lb_policies/round_robin.c +++ b/src/core/lib/client_config/lb_policies/round_robin.c @@ -31,12 +31,12 @@ * */ -#include "src/core/client_config/lb_policies/round_robin.h" +#include "src/core/lib/client_config/lb_policies/round_robin.h" #include #include -#include "src/core/transport/connectivity_state.h" +#include "src/core/lib/transport/connectivity_state.h" typedef struct round_robin_lb_policy round_robin_lb_policy; @@ -483,8 +483,14 @@ static void rr_ping_one(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol, } static const grpc_lb_policy_vtable round_robin_lb_policy_vtable = { - rr_destroy, rr_shutdown, rr_pick, rr_cancel_pick, rr_ping_one, rr_exit_idle, - rr_check_connectivity, rr_notify_on_state_change}; + rr_destroy, + rr_shutdown, + rr_pick, + rr_cancel_pick, + rr_ping_one, + rr_exit_idle, + rr_check_connectivity, + rr_notify_on_state_change}; static void round_robin_factory_ref(grpc_lb_policy_factory *factory) {} diff --git a/src/core/client_config/lb_policies/round_robin.h b/src/core/lib/client_config/lb_policies/round_robin.h similarity index 83% rename from src/core/client_config/lb_policies/round_robin.h rename to src/core/lib/client_config/lb_policies/round_robin.h index cf1f69c85f6..52db1caa0c2 100644 --- a/src/core/client_config/lb_policies/round_robin.h +++ b/src/core/lib/client_config/lb_policies/round_robin.h @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,16 +31,16 @@ * */ -#ifndef GRPC_INTERNAL_CORE_CLIENT_CONFIG_ROUND_ROBIN_H -#define GRPC_INTERNAL_CORE_CLIENT_CONFIG_ROUND_ROBIN_H +#ifndef GRPC_CORE_LIB_CLIENT_CONFIG_LB_POLICIES_ROUND_ROBIN_H +#define GRPC_CORE_LIB_CLIENT_CONFIG_LB_POLICIES_ROUND_ROBIN_H -#include "src/core/client_config/lb_policy.h" +#include "src/core/lib/client_config/lb_policy.h" extern int grpc_lb_round_robin_trace; -#include "src/core/client_config/lb_policy_factory.h" +#include "src/core/lib/client_config/lb_policy_factory.h" /** Returns a load balancing factory for the round robin policy */ grpc_lb_policy_factory *grpc_round_robin_lb_factory_create(); -#endif +#endif /* GRPC_CORE_LIB_CLIENT_CONFIG_LB_POLICIES_ROUND_ROBIN_H */ diff --git a/src/core/client_config/lb_policy.c b/src/core/lib/client_config/lb_policy.c similarity index 99% rename from src/core/client_config/lb_policy.c rename to src/core/lib/client_config/lb_policy.c index 0d8b0073369..ee20ccd76a1 100644 --- a/src/core/client_config/lb_policy.c +++ b/src/core/lib/client_config/lb_policy.c @@ -31,7 +31,7 @@ * */ -#include "src/core/client_config/lb_policy.h" +#include "src/core/lib/client_config/lb_policy.h" #define WEAK_REF_BITS 16 diff --git a/src/core/client_config/lb_policy.h b/src/core/lib/client_config/lb_policy.h similarity index 96% rename from src/core/client_config/lb_policy.h rename to src/core/lib/client_config/lb_policy.h index 34573906068..58a0a04d852 100644 --- a/src/core/client_config/lb_policy.h +++ b/src/core/lib/client_config/lb_policy.h @@ -31,11 +31,11 @@ * */ -#ifndef GRPC_INTERNAL_CORE_CLIENT_CONFIG_LB_POLICY_H -#define GRPC_INTERNAL_CORE_CLIENT_CONFIG_LB_POLICY_H +#ifndef GRPC_CORE_LIB_CLIENT_CONFIG_LB_POLICY_H +#define GRPC_CORE_LIB_CLIENT_CONFIG_LB_POLICY_H -#include "src/core/client_config/subchannel.h" -#include "src/core/transport/connectivity_state.h" +#include "src/core/lib/client_config/subchannel.h" +#include "src/core/lib/transport/connectivity_state.h" /** A load balancing policy: specified by a vtable and a struct (which is expected to be extended to contain some parameters) */ @@ -141,4 +141,4 @@ void grpc_lb_policy_notify_on_state_change(grpc_exec_ctx *exec_ctx, grpc_connectivity_state grpc_lb_policy_check_connectivity( grpc_exec_ctx *exec_ctx, grpc_lb_policy *policy); -#endif /* GRPC_INTERNAL_CORE_CONFIG_LB_POLICY_H */ +#endif /* GRPC_CORE_LIB_CLIENT_CONFIG_LB_POLICY_H */ diff --git a/src/core/client_config/lb_policy_factory.c b/src/core/lib/client_config/lb_policy_factory.c similarity index 95% rename from src/core/client_config/lb_policy_factory.c rename to src/core/lib/client_config/lb_policy_factory.c index e49de544e3a..2ca6f42f899 100644 --- a/src/core/client_config/lb_policy_factory.c +++ b/src/core/lib/client_config/lb_policy_factory.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,7 +31,7 @@ * */ -#include "src/core/client_config/lb_policy_factory.h" +#include "src/core/lib/client_config/lb_policy_factory.h" void grpc_lb_policy_factory_ref(grpc_lb_policy_factory* factory) { factory->vtable->ref(factory); diff --git a/src/core/client_config/lb_policy_factory.h b/src/core/lib/client_config/lb_policy_factory.h similarity index 89% rename from src/core/client_config/lb_policy_factory.h rename to src/core/lib/client_config/lb_policy_factory.h index 04610316ee4..36eaf178d93 100644 --- a/src/core/client_config/lb_policy_factory.h +++ b/src/core/lib/client_config/lb_policy_factory.h @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,11 +31,11 @@ * */ -#ifndef GRPC_INTERNAL_CORE_CLIENT_CONFIG_LB_POLICY_FACTORY_H -#define GRPC_INTERNAL_CORE_CLIENT_CONFIG_LB_POLICY_FACTORY_H +#ifndef GRPC_CORE_LIB_CLIENT_CONFIG_LB_POLICY_FACTORY_H +#define GRPC_CORE_LIB_CLIENT_CONFIG_LB_POLICY_FACTORY_H -#include "src/core/client_config/lb_policy.h" -#include "src/core/client_config/subchannel.h" +#include "src/core/lib/client_config/lb_policy.h" +#include "src/core/lib/client_config/subchannel.h" typedef struct grpc_lb_policy_factory grpc_lb_policy_factory; typedef struct grpc_lb_policy_factory_vtable grpc_lb_policy_factory_vtable; @@ -70,4 +70,4 @@ void grpc_lb_policy_factory_unref(grpc_lb_policy_factory *factory); grpc_lb_policy *grpc_lb_policy_factory_create_lb_policy( grpc_lb_policy_factory *factory, grpc_lb_policy_args *args); -#endif /* GRPC_INTERNAL_CORE_CONFIG_LB_POLICY_FACTORY_H */ +#endif /* GRPC_CORE_LIB_CLIENT_CONFIG_LB_POLICY_FACTORY_H */ diff --git a/src/core/client_config/lb_policy_registry.c b/src/core/lib/client_config/lb_policy_registry.c similarity index 97% rename from src/core/client_config/lb_policy_registry.c rename to src/core/lib/client_config/lb_policy_registry.c index fc302e82d7e..13acfe78cda 100644 --- a/src/core/client_config/lb_policy_registry.c +++ b/src/core/lib/client_config/lb_policy_registry.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,7 +31,7 @@ * */ -#include "src/core/client_config/lb_policy_registry.h" +#include "src/core/lib/client_config/lb_policy_registry.h" #include diff --git a/src/core/client_config/lb_policy_registry.h b/src/core/lib/client_config/lb_policy_registry.h similarity index 88% rename from src/core/client_config/lb_policy_registry.h rename to src/core/lib/client_config/lb_policy_registry.h index 96fc2a16285..c251fd9f080 100644 --- a/src/core/client_config/lb_policy_registry.h +++ b/src/core/lib/client_config/lb_policy_registry.h @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,10 +31,10 @@ * */ -#ifndef GRPC_INTERNAL_CORE_CLIENT_CONFIG_LB_POLICY_REGISTRY_H -#define GRPC_INTERNAL_CORE_CLIENT_CONFIG_LB_POLICY_REGISTRY_H +#ifndef GRPC_CORE_LIB_CLIENT_CONFIG_LB_POLICY_REGISTRY_H +#define GRPC_CORE_LIB_CLIENT_CONFIG_LB_POLICY_REGISTRY_H -#include "src/core/client_config/lb_policy_factory.h" +#include "src/core/lib/client_config/lb_policy_factory.h" /** Initialize the registry and set \a default_factory as the factory to be * returned when no name is provided in a lookup */ @@ -51,4 +51,4 @@ void grpc_register_lb_policy(grpc_lb_policy_factory *factory); grpc_lb_policy *grpc_lb_policy_create(const char *name, grpc_lb_policy_args *args); -#endif /* GRPC_INTERNAL_CORE_CLIENT_CONFIG_LB_POLICY_REGISTRY_H */ +#endif /* GRPC_CORE_LIB_CLIENT_CONFIG_LB_POLICY_REGISTRY_H */ diff --git a/src/core/client_config/resolver.c b/src/core/lib/client_config/resolver.c similarity index 97% rename from src/core/client_config/resolver.c rename to src/core/lib/client_config/resolver.c index eda01e72ba7..32f0643adbe 100644 --- a/src/core/client_config/resolver.c +++ b/src/core/lib/client_config/resolver.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,7 +31,7 @@ * */ -#include "src/core/client_config/resolver.h" +#include "src/core/lib/client_config/resolver.h" void grpc_resolver_init(grpc_resolver *resolver, const grpc_resolver_vtable *vtable) { diff --git a/src/core/client_config/resolver.h b/src/core/lib/client_config/resolver.h similarity index 92% rename from src/core/client_config/resolver.h rename to src/core/lib/client_config/resolver.h index e612eaf3b3c..1ee879293ab 100644 --- a/src/core/client_config/resolver.h +++ b/src/core/lib/client_config/resolver.h @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,12 +31,12 @@ * */ -#ifndef GRPC_INTERNAL_CORE_CLIENT_CONFIG_RESOLVER_H -#define GRPC_INTERNAL_CORE_CLIENT_CONFIG_RESOLVER_H +#ifndef GRPC_CORE_LIB_CLIENT_CONFIG_RESOLVER_H +#define GRPC_CORE_LIB_CLIENT_CONFIG_RESOLVER_H -#include "src/core/client_config/client_config.h" -#include "src/core/client_config/subchannel.h" -#include "src/core/iomgr/iomgr.h" +#include "src/core/lib/client_config/client_config.h" +#include "src/core/lib/client_config/subchannel.h" +#include "src/core/lib/iomgr/iomgr.h" typedef struct grpc_resolver grpc_resolver; typedef struct grpc_resolver_vtable grpc_resolver_vtable; @@ -91,4 +91,4 @@ void grpc_resolver_next(grpc_exec_ctx *exec_ctx, grpc_resolver *resolver, grpc_client_config **target_config, grpc_closure *on_complete); -#endif /* GRPC_INTERNAL_CORE_CONFIG_RESOLVER_H */ +#endif /* GRPC_CORE_LIB_CLIENT_CONFIG_RESOLVER_H */ diff --git a/src/core/client_config/resolver_factory.c b/src/core/lib/client_config/resolver_factory.c similarity index 95% rename from src/core/client_config/resolver_factory.c rename to src/core/lib/client_config/resolver_factory.c index e7e9196ac4d..0f76c664fab 100644 --- a/src/core/client_config/resolver_factory.c +++ b/src/core/lib/client_config/resolver_factory.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,7 +31,7 @@ * */ -#include "src/core/client_config/resolver_factory.h" +#include "src/core/lib/client_config/resolver_factory.h" void grpc_resolver_factory_ref(grpc_resolver_factory* factory) { factory->vtable->ref(factory); diff --git a/src/core/client_config/resolver_factory.h b/src/core/lib/client_config/resolver_factory.h similarity index 89% rename from src/core/client_config/resolver_factory.h rename to src/core/lib/client_config/resolver_factory.h index 4c4df353f7c..7765c3c844d 100644 --- a/src/core/client_config/resolver_factory.h +++ b/src/core/lib/client_config/resolver_factory.h @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,12 +31,12 @@ * */ -#ifndef GRPC_INTERNAL_CORE_CLIENT_CONFIG_RESOLVER_FACTORY_H -#define GRPC_INTERNAL_CORE_CLIENT_CONFIG_RESOLVER_FACTORY_H +#ifndef GRPC_CORE_LIB_CLIENT_CONFIG_RESOLVER_FACTORY_H +#define GRPC_CORE_LIB_CLIENT_CONFIG_RESOLVER_FACTORY_H -#include "src/core/client_config/resolver.h" -#include "src/core/client_config/subchannel_factory.h" -#include "src/core/client_config/uri_parser.h" +#include "src/core/lib/client_config/resolver.h" +#include "src/core/lib/client_config/subchannel_factory.h" +#include "src/core/lib/client_config/uri_parser.h" typedef struct grpc_resolver_factory grpc_resolver_factory; typedef struct grpc_resolver_factory_vtable grpc_resolver_factory_vtable; @@ -79,4 +79,4 @@ grpc_resolver *grpc_resolver_factory_create_resolver( char *grpc_resolver_factory_get_default_authority( grpc_resolver_factory *factory, grpc_uri *uri); -#endif /* GRPC_INTERNAL_CORE_CONFIG_RESOLVER_FACTORY_H */ +#endif /* GRPC_CORE_LIB_CLIENT_CONFIG_RESOLVER_FACTORY_H */ diff --git a/src/core/client_config/resolver_registry.c b/src/core/lib/client_config/resolver_registry.c similarity index 98% rename from src/core/client_config/resolver_registry.c rename to src/core/lib/client_config/resolver_registry.c index 89a945c2d31..29bd00c2840 100644 --- a/src/core/client_config/resolver_registry.c +++ b/src/core/lib/client_config/resolver_registry.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,7 +31,7 @@ * */ -#include "src/core/client_config/resolver_registry.h" +#include "src/core/lib/client_config/resolver_registry.h" #include diff --git a/src/core/client_config/resolver_registry.h b/src/core/lib/client_config/resolver_registry.h similarity index 91% rename from src/core/client_config/resolver_registry.h rename to src/core/lib/client_config/resolver_registry.h index 5a7193b7ae2..22289ca6bd2 100644 --- a/src/core/client_config/resolver_registry.h +++ b/src/core/lib/client_config/resolver_registry.h @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,10 +31,10 @@ * */ -#ifndef GRPC_INTERNAL_CORE_CLIENT_CONFIG_RESOLVER_REGISTRY_H -#define GRPC_INTERNAL_CORE_CLIENT_CONFIG_RESOLVER_REGISTRY_H +#ifndef GRPC_CORE_LIB_CLIENT_CONFIG_RESOLVER_REGISTRY_H +#define GRPC_CORE_LIB_CLIENT_CONFIG_RESOLVER_REGISTRY_H -#include "src/core/client_config/resolver_factory.h" +#include "src/core/lib/client_config/resolver_factory.h" void grpc_resolver_registry_init(const char *default_prefix); void grpc_resolver_registry_shutdown(void); @@ -62,4 +62,4 @@ grpc_resolver *grpc_resolver_create( representing the default authority to pass from a client. */ char *grpc_get_default_authority(const char *target); -#endif /* GRPC_INTERNAL_CORE_CLIENT_CONFIG_RESOLVER_REGISTRY_H */ +#endif /* GRPC_CORE_LIB_CLIENT_CONFIG_RESOLVER_REGISTRY_H */ diff --git a/src/core/client_config/resolvers/dns_resolver.c b/src/core/lib/client_config/resolvers/dns_resolver.c similarity index 90% rename from src/core/client_config/resolvers/dns_resolver.c rename to src/core/lib/client_config/resolvers/dns_resolver.c index e28e4757a10..ab445730adb 100644 --- a/src/core/client_config/resolvers/dns_resolver.c +++ b/src/core/lib/client_config/resolvers/dns_resolver.c @@ -31,7 +31,7 @@ * */ -#include "src/core/client_config/resolvers/dns_resolver.h" +#include "src/core/lib/client_config/resolvers/dns_resolver.h" #include @@ -39,10 +39,16 @@ #include #include -#include "src/core/client_config/lb_policy_registry.h" -#include "src/core/iomgr/resolve_address.h" -#include "src/core/iomgr/timer.h" -#include "src/core/support/string.h" +#include "src/core/lib/client_config/lb_policy_registry.h" +#include "src/core/lib/iomgr/resolve_address.h" +#include "src/core/lib/iomgr/timer.h" +#include "src/core/lib/support/backoff.h" +#include "src/core/lib/support/string.h" + +#define BACKOFF_MULTIPLIER 1.6 +#define BACKOFF_JITTER 0.2 +#define BACKOFF_MIN_SECONDS 1 +#define BACKOFF_MAX_SECONDS 120 typedef struct { /** base class: must be first */ @@ -75,6 +81,8 @@ typedef struct { /** retry timer */ bool have_retry_timer; grpc_timer retry_timer; + /** retry backoff state */ + gpr_backoff backoff_state; } dns_resolver; static void dns_destroy(grpc_exec_ctx *exec_ctx, grpc_resolver *r); @@ -111,6 +119,7 @@ static void dns_channel_saw_error(grpc_exec_ctx *exec_ctx, dns_resolver *r = (dns_resolver *)resolver; gpr_mu_lock(&r->mu); if (!r->resolving) { + gpr_backoff_reset(&r->backoff_state); dns_start_resolving_locked(r); } gpr_mu_unlock(&r->mu); @@ -125,6 +134,7 @@ static void dns_next(grpc_exec_ctx *exec_ctx, grpc_resolver *resolver, r->next_completion = on_complete; r->target_config = target_config; if (r->resolved_version == 0 && !r->resolving) { + gpr_backoff_reset(&r->backoff_state); dns_start_resolving_locked(r); } else { dns_maybe_finish_next_locked(exec_ctx, r); @@ -185,17 +195,16 @@ static void dns_on_resolved(grpc_exec_ctx *exec_ctx, void *arg, grpc_resolved_addresses_destroy(addresses); gpr_free(subchannels); } else { - int retry_seconds = 15; - gpr_log(GPR_DEBUG, "dns resolution failed: retrying in %d seconds", - retry_seconds); + gpr_timespec now = gpr_now(GPR_CLOCK_MONOTONIC); + gpr_timespec next_try = gpr_backoff_step(&r->backoff_state, now); + gpr_timespec timeout = gpr_time_sub(next_try, now); + gpr_log(GPR_DEBUG, "dns resolution failed: retrying in %d.%09d seconds", + timeout.tv_sec, timeout.tv_nsec); GPR_ASSERT(!r->have_retry_timer); r->have_retry_timer = true; - gpr_timespec now = gpr_now(GPR_CLOCK_MONOTONIC); GRPC_RESOLVER_REF(&r->base, "retry-timer"); - grpc_timer_init( - exec_ctx, &r->retry_timer, - gpr_time_add(now, gpr_time_from_seconds(retry_seconds, GPR_TIMESPAN)), - dns_on_retry_timer, r, now); + grpc_timer_init(exec_ctx, &r->retry_timer, next_try, dns_on_retry_timer, r, + now); } if (r->resolved_config) { grpc_client_config_unref(exec_ctx, r->resolved_config); @@ -263,6 +272,8 @@ static grpc_resolver *dns_create(grpc_resolver_args *args, r->name = gpr_strdup(path); r->default_port = gpr_strdup(default_port); r->subchannel_factory = args->subchannel_factory; + gpr_backoff_init(&r->backoff_state, BACKOFF_MULTIPLIER, BACKOFF_JITTER, + BACKOFF_MIN_SECONDS * 1000, BACKOFF_MAX_SECONDS * 1000); grpc_subchannel_factory_ref(r->subchannel_factory); r->lb_policy_name = gpr_strdup(lb_policy_name); return &r->base; diff --git a/src/core/client_config/resolvers/dns_resolver.h b/src/core/lib/client_config/resolvers/dns_resolver.h similarity index 85% rename from src/core/client_config/resolvers/dns_resolver.h rename to src/core/lib/client_config/resolvers/dns_resolver.h index a3ef3161a63..eb46e41c776 100644 --- a/src/core/client_config/resolvers/dns_resolver.h +++ b/src/core/lib/client_config/resolvers/dns_resolver.h @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,12 +31,12 @@ * */ -#ifndef GRPC_INTERNAL_CORE_CLIENT_CONFIG_RESOLVERS_DNS_RESOLVER_H -#define GRPC_INTERNAL_CORE_CLIENT_CONFIG_RESOLVERS_DNS_RESOLVER_H +#ifndef GRPC_CORE_LIB_CLIENT_CONFIG_RESOLVERS_DNS_RESOLVER_H +#define GRPC_CORE_LIB_CLIENT_CONFIG_RESOLVERS_DNS_RESOLVER_H -#include "src/core/client_config/resolver_factory.h" +#include "src/core/lib/client_config/resolver_factory.h" /** Create a dns resolver factory */ grpc_resolver_factory *grpc_dns_resolver_factory_create(void); -#endif /* GRPC_INTERNAL_CORE_CLIENT_CONFIG_RESOLVERS_DNS_RESOLVER_H */ +#endif /* GRPC_CORE_LIB_CLIENT_CONFIG_RESOLVERS_DNS_RESOLVER_H */ diff --git a/src/core/client_config/resolvers/sockaddr_resolver.c b/src/core/lib/client_config/resolvers/sockaddr_resolver.c similarity index 91% rename from src/core/client_config/resolvers/sockaddr_resolver.c rename to src/core/lib/client_config/resolvers/sockaddr_resolver.c index 68910ad975b..66cddc3ed90 100644 --- a/src/core/client_config/resolvers/sockaddr_resolver.c +++ b/src/core/lib/client_config/resolvers/sockaddr_resolver.c @@ -33,21 +33,19 @@ #include -#include "src/core/client_config/resolvers/sockaddr_resolver.h" +#include "src/core/lib/client_config/resolvers/sockaddr_resolver.h" #include #include -#ifdef GPR_POSIX_SOCKET -#include -#endif #include #include #include -#include "src/core/client_config/lb_policy_registry.h" -#include "src/core/iomgr/resolve_address.h" -#include "src/core/support/string.h" +#include "src/core/lib/client_config/lb_policy_registry.h" +#include "src/core/lib/iomgr/resolve_address.h" +#include "src/core/lib/iomgr/unix_sockets_posix.h" +#include "src/core/lib/support/string.h" typedef struct { /** base class: must be first */ @@ -168,24 +166,6 @@ static void sockaddr_destroy(grpc_exec_ctx *exec_ctx, grpc_resolver *gr) { gpr_free(r); } -#ifdef GPR_POSIX_SOCKET -static int parse_unix(grpc_uri *uri, struct sockaddr_storage *addr, - size_t *len) { - struct sockaddr_un *un = (struct sockaddr_un *)addr; - - un->sun_family = AF_UNIX; - strcpy(un->sun_path, uri->path); - *len = strlen(un->sun_path) + sizeof(un->sun_family) + 1; - - return 1; -} - -static char *unix_get_default_authority(grpc_resolver_factory *factory, - grpc_uri *uri) { - return gpr_strdup("localhost"); -} -#endif - static char *ip_get_default_authority(grpc_uri *uri) { const char *path = uri->path; if (path[0] == '/') ++path; @@ -371,21 +351,22 @@ static void sockaddr_factory_ref(grpc_resolver_factory *factory) {} static void sockaddr_factory_unref(grpc_resolver_factory *factory) {} -#define DECL_FACTORY(name) \ +#define DECL_FACTORY(name, prefix) \ static grpc_resolver *name##_factory_create_resolver( \ grpc_resolver_factory *factory, grpc_resolver_args *args) { \ - return sockaddr_create(args, "pick_first", parse_##name); \ + return sockaddr_create(args, "pick_first", prefix##parse_##name); \ } \ static const grpc_resolver_factory_vtable name##_factory_vtable = { \ sockaddr_factory_ref, sockaddr_factory_unref, \ - name##_factory_create_resolver, name##_get_default_authority, #name}; \ + name##_factory_create_resolver, prefix##name##_get_default_authority, \ + #name}; \ static grpc_resolver_factory name##_resolver_factory = { \ &name##_factory_vtable}; \ grpc_resolver_factory *grpc_##name##_resolver_factory_create() { \ return &name##_resolver_factory; \ } -#ifdef GPR_POSIX_SOCKET -DECL_FACTORY(unix) +#ifdef GPR_HAVE_UNIX_SOCKET +DECL_FACTORY(unix, grpc_) #endif -DECL_FACTORY(ipv4) DECL_FACTORY(ipv6) +DECL_FACTORY(ipv4, ) DECL_FACTORY(ipv6, ) diff --git a/src/core/client_config/resolvers/sockaddr_resolver.h b/src/core/lib/client_config/resolvers/sockaddr_resolver.h similarity index 86% rename from src/core/client_config/resolvers/sockaddr_resolver.h rename to src/core/lib/client_config/resolvers/sockaddr_resolver.h index 1b7a18f9c2a..45c55bd1604 100644 --- a/src/core/client_config/resolvers/sockaddr_resolver.h +++ b/src/core/lib/client_config/resolvers/sockaddr_resolver.h @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,12 +31,12 @@ * */ -#ifndef GRPC_INTERNAL_CORE_CLIENT_CONFIG_RESOLVERS_UNIX_RESOLVER_H -#define GRPC_INTERNAL_CORE_CLIENT_CONFIG_RESOLVERS_UNIX_RESOLVER_H +#ifndef GRPC_CORE_LIB_CLIENT_CONFIG_RESOLVERS_SOCKADDR_RESOLVER_H +#define GRPC_CORE_LIB_CLIENT_CONFIG_RESOLVERS_SOCKADDR_RESOLVER_H #include -#include "src/core/client_config/resolver_factory.h" +#include "src/core/lib/client_config/resolver_factory.h" grpc_resolver_factory *grpc_ipv4_resolver_factory_create(void); @@ -47,4 +47,4 @@ grpc_resolver_factory *grpc_ipv6_resolver_factory_create(void); grpc_resolver_factory *grpc_unix_resolver_factory_create(void); #endif -#endif /* GRPC_INTERNAL_CORE_CLIENT_CONFIG_RESOLVERS_UNIX_RESOLVER_H */ +#endif /* GRPC_CORE_LIB_CLIENT_CONFIG_RESOLVERS_SOCKADDR_RESOLVER_H */ diff --git a/src/core/client_config/resolvers/zookeeper_resolver.c b/src/core/lib/client_config/resolvers/zookeeper_resolver.c similarity index 97% rename from src/core/client_config/resolvers/zookeeper_resolver.c rename to src/core/lib/client_config/resolvers/zookeeper_resolver.c index 166738e768e..3bb0bbdf5cd 100644 --- a/src/core/client_config/resolvers/zookeeper_resolver.c +++ b/src/core/lib/client_config/resolvers/zookeeper_resolver.c @@ -31,7 +31,7 @@ * */ -#include "src/core/client_config/resolvers/zookeeper_resolver.h" +#include "src/core/lib/client_config/resolvers/zookeeper_resolver.h" #include @@ -41,12 +41,12 @@ #include #include -#include "src/core/client_config/lb_policy_registry.h" -#include "src/core/client_config/resolver_registry.h" -#include "src/core/iomgr/resolve_address.h" -#include "src/core/support/string.h" -#include "src/core/surface/api_trace.h" -#include "src/core/json/json.h" +#include "src/core/lib/client_config/lb_policy_registry.h" +#include "src/core/lib/client_config/resolver_registry.h" +#include "src/core/lib/iomgr/resolve_address.h" +#include "src/core/lib/json/json.h" +#include "src/core/lib/support/string.h" +#include "src/core/lib/surface/api_trace.h" /** Zookeeper session expiration time in milliseconds */ #define GRPC_ZOOKEEPER_SESSION_TIMEOUT 15000 diff --git a/src/core/client_config/resolvers/zookeeper_resolver.h b/src/core/lib/client_config/resolvers/zookeeper_resolver.h similarity index 84% rename from src/core/client_config/resolvers/zookeeper_resolver.h rename to src/core/lib/client_config/resolvers/zookeeper_resolver.h index a6f002dd6d4..7ee7604360f 100644 --- a/src/core/client_config/resolvers/zookeeper_resolver.h +++ b/src/core/lib/client_config/resolvers/zookeeper_resolver.h @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,12 +31,12 @@ * */ -#ifndef GRPC_INTERNAL_CORE_CLIENT_CONFIG_RESOLVERS_ZOOKEEPER_RESOLVER_H -#define GRPC_INTERNAL_CORE_CLIENT_CONFIG_RESOLVERS_ZOOKEEPER_RESOLVER_H +#ifndef GRPC_CORE_LIB_CLIENT_CONFIG_RESOLVERS_ZOOKEEPER_RESOLVER_H +#define GRPC_CORE_LIB_CLIENT_CONFIG_RESOLVERS_ZOOKEEPER_RESOLVER_H -#include "src/core/client_config/resolver_factory.h" +#include "src/core/lib/client_config/resolver_factory.h" /** Create a zookeeper resolver factory */ grpc_resolver_factory *grpc_zookeeper_resolver_factory_create(void); -#endif /* GRPC_INTERNAL_CORE_CLIENT_CONFIG_RESOLVERS_ZOOKEEPER_RESOLVER_H */ +#endif /* GRPC_CORE_LIB_CLIENT_CONFIG_RESOLVERS_ZOOKEEPER_RESOLVER_H */ diff --git a/src/core/client_config/subchannel.c b/src/core/lib/client_config/subchannel.c similarity index 83% rename from src/core/client_config/subchannel.c rename to src/core/lib/client_config/subchannel.c index ec9e47a6ddb..41242f0dd75 100644 --- a/src/core/client_config/subchannel.c +++ b/src/core/lib/client_config/subchannel.c @@ -31,22 +31,24 @@ * */ -#include "src/core/client_config/subchannel.h" +#include "src/core/lib/client_config/subchannel.h" #include #include #include -#include "src/core/channel/channel_args.h" -#include "src/core/channel/client_channel.h" -#include "src/core/channel/connected_channel.h" -#include "src/core/client_config/initial_connect_string.h" -#include "src/core/client_config/subchannel_index.h" -#include "src/core/iomgr/timer.h" -#include "src/core/profiling/timers.h" -#include "src/core/surface/channel.h" -#include "src/core/transport/connectivity_state.h" +#include "src/core/lib/channel/channel_args.h" +#include "src/core/lib/channel/client_channel.h" +#include "src/core/lib/channel/connected_channel.h" +#include "src/core/lib/client_config/initial_connect_string.h" +#include "src/core/lib/client_config/subchannel_index.h" +#include "src/core/lib/iomgr/timer.h" +#include "src/core/lib/profiling/timers.h" +#include "src/core/lib/support/backoff.h" +#include "src/core/lib/surface/channel.h" +#include "src/core/lib/surface/channel_init.h" +#include "src/core/lib/transport/connectivity_state.h" #define INTERNAL_REF_BITS 16 #define STRONG_REF_MASK (~(gpr_atm)((1 << INTERNAL_REF_BITS) - 1)) @@ -127,8 +129,8 @@ struct grpc_subchannel { /** next connect attempt time */ gpr_timespec next_attempt; - /** amount to backoff each failure */ - gpr_timespec backoff_delta; + /** backoff state */ + gpr_backoff backoff_state; /** do we have an active alarm? */ int have_alarm; /** our alarm */ @@ -146,7 +148,6 @@ struct grpc_subchannel_call { #define CALLSTACK_TO_SUBCHANNEL_CALL(callstack) \ (((grpc_subchannel_call *)(callstack)) - 1) -static gpr_timespec compute_connect_deadline(grpc_subchannel *c); static void subchannel_connected(grpc_exec_ctx *exec_ctx, void *subchannel, bool iomgr_success); @@ -184,8 +185,8 @@ static void connection_destroy(grpc_exec_ctx *exec_ctx, void *arg, gpr_free(c); } -void grpc_connected_subchannel_ref(grpc_connected_subchannel *c - GRPC_SUBCHANNEL_REF_EXTRA_ARGS) { +void grpc_connected_subchannel_ref( + grpc_connected_subchannel *c GRPC_SUBCHANNEL_REF_EXTRA_ARGS) { GRPC_CHANNEL_STACK_REF(CHANNEL_STACK_FROM_CONNECTION(c), REF_REASON); } @@ -226,8 +227,8 @@ static gpr_atm ref_mutate(grpc_subchannel *c, gpr_atm delta, return old_val; } -grpc_subchannel *grpc_subchannel_ref(grpc_subchannel *c - GRPC_SUBCHANNEL_REF_EXTRA_ARGS) { +grpc_subchannel *grpc_subchannel_ref( + grpc_subchannel *c GRPC_SUBCHANNEL_REF_EXTRA_ARGS) { gpr_atm old_refs; old_refs = ref_mutate(c, (1 << INTERNAL_REF_BITS), 0 REF_MUTATE_PURPOSE("STRONG_REF")); @@ -235,8 +236,8 @@ grpc_subchannel *grpc_subchannel_ref(grpc_subchannel *c return c; } -grpc_subchannel *grpc_subchannel_weak_ref(grpc_subchannel *c - GRPC_SUBCHANNEL_REF_EXTRA_ARGS) { +grpc_subchannel *grpc_subchannel_weak_ref( + grpc_subchannel *c GRPC_SUBCHANNEL_REF_EXTRA_ARGS) { gpr_atm old_refs; old_refs = ref_mutate(c, 1, 0 REF_MUTATE_PURPOSE("WEAK_REF")); GPR_ASSERT(old_refs != 0); @@ -337,6 +338,22 @@ grpc_subchannel *grpc_subchannel_create(grpc_exec_ctx *exec_ctx, grpc_closure_init(&c->connected, subchannel_connected, c); grpc_connectivity_state_init(&c->state_tracker, GRPC_CHANNEL_IDLE, "subchannel"); + gpr_backoff_init(&c->backoff_state, + GRPC_SUBCHANNEL_RECONNECT_BACKOFF_MULTIPLIER, + GRPC_SUBCHANNEL_RECONNECT_JITTER, + GRPC_SUBCHANNEL_INITIAL_CONNECT_BACKOFF_SECONDS * 1000, + GRPC_SUBCHANNEL_RECONNECT_MAX_BACKOFF_SECONDS * 1000); + if (c->args) { + for (size_t i = 0; i < c->args->num_args; i++) { + if (0 == strcmp(c->args->args[i].key, + "grpc.testing.fixed_reconnect_backoff")) { + GPR_ASSERT(c->args->args[i].type == GRPC_ARG_INTEGER); + gpr_backoff_init(&c->backoff_state, 1.0, 0.0, + c->args->args[i].value.integer, + c->args->args[i].value.integer); + } + } + } gpr_mu_init(&c->mu); return grpc_subchannel_index_register(exec_ctx, key, c); @@ -348,7 +365,7 @@ static void continue_connect(grpc_exec_ctx *exec_ctx, grpc_subchannel *c) { args.interested_parties = c->pollset_set; args.addr = c->addr; args.addr_len = c->addr_len; - args.deadline = compute_connect_deadline(c); + args.deadline = c->next_attempt; args.channel_args = c->args; args.initial_connect_string = c->initial_connect_string; @@ -359,10 +376,8 @@ static void continue_connect(grpc_exec_ctx *exec_ctx, grpc_subchannel *c) { } static void start_connect(grpc_exec_ctx *exec_ctx, grpc_subchannel *c) { - c->backoff_delta = gpr_time_from_seconds( - GRPC_SUBCHANNEL_INITIAL_CONNECT_BACKOFF_SECONDS, GPR_TIMESPAN); c->next_attempt = - gpr_time_add(gpr_now(GPR_CLOCK_MONOTONIC), c->backoff_delta); + gpr_backoff_begin(&c->backoff_state, gpr_now(GPR_CLOCK_MONOTONIC)); continue_connect(exec_ctx, c); } @@ -507,32 +522,15 @@ void grpc_connected_subchannel_ping(grpc_exec_ctx *exec_ctx, static void publish_transport_locked(grpc_exec_ctx *exec_ctx, grpc_subchannel *c) { - size_t channel_stack_size; grpc_connected_subchannel *con; grpc_channel_stack *stk; - size_t num_filters; - const grpc_channel_filter **filters; state_watcher *sw_subchannel; - /* build final filter list */ - num_filters = c->num_filters + c->connecting_result.num_filters + 1; - filters = gpr_malloc(sizeof(*filters) * num_filters); - if (c->num_filters > 0) { - memcpy((void *)filters, c->filters, sizeof(*filters) * c->num_filters); - } - memcpy((void *)(filters + c->num_filters), c->connecting_result.filters, - sizeof(*filters) * c->connecting_result.num_filters); - filters[num_filters - 1] = &grpc_connected_channel_filter; - /* construct channel stack */ - channel_stack_size = grpc_channel_stack_size(filters, num_filters); - con = gpr_malloc(channel_stack_size); + con = grpc_channel_init_create_stack( + exec_ctx, GRPC_CLIENT_SUBCHANNEL, 0, c->connecting_result.channel_args, 1, + connection_destroy, NULL, c->connecting_result.transport); stk = CHANNEL_STACK_FROM_CONNECTION(con); - grpc_channel_stack_init(exec_ctx, 1, connection_destroy, con, filters, - num_filters, c->connecting_result.channel_args, - "CONNECTED_SUBCHANNEL", stk); - grpc_connected_channel_bind_transport(stk, c->connecting_result.transport); - gpr_free((void *)c->connecting_result.filters); memset(&c->connecting_result, 0, sizeof(c->connecting_result)); /* initialize state watcher */ @@ -543,9 +541,7 @@ static void publish_transport_locked(grpc_exec_ctx *exec_ctx, sw_subchannel); if (c->disconnected) { - gpr_mu_unlock(&c->mu); gpr_free(sw_subchannel); - gpr_free((void *)filters); grpc_channel_stack_destroy(exec_ctx, stk); gpr_free(con); GRPC_SUBCHANNEL_WEAK_UNREF(exec_ctx, c, "connecting"); @@ -573,52 +569,6 @@ static void publish_transport_locked(grpc_exec_ctx *exec_ctx, /* signal completion */ grpc_connectivity_state_set(exec_ctx, &c->state_tracker, GRPC_CHANNEL_READY, "connected"); - - gpr_free((void *)filters); -} - -/* Generate a random number between 0 and 1. */ -static double generate_uniform_random_number(grpc_subchannel *c) { - c->random = (1103515245 * c->random + 12345) % ((uint32_t)1 << 31); - return c->random / (double)((uint32_t)1 << 31); -} - -/* Update backoff_delta and next_attempt in subchannel */ -static void update_reconnect_parameters(grpc_subchannel *c) { - size_t i; - int32_t backoff_delta_millis, jitter; - int32_t max_backoff_millis = - GRPC_SUBCHANNEL_RECONNECT_MAX_BACKOFF_SECONDS * 1000; - double jitter_range; - - if (c->args) { - for (i = 0; i < c->args->num_args; i++) { - if (0 == strcmp(c->args->args[i].key, - "grpc.testing.fixed_reconnect_backoff")) { - GPR_ASSERT(c->args->args[i].type == GRPC_ARG_INTEGER); - c->next_attempt = gpr_time_add( - gpr_now(GPR_CLOCK_MONOTONIC), - gpr_time_from_millis(c->args->args[i].value.integer, GPR_TIMESPAN)); - return; - } - } - } - - backoff_delta_millis = - (int32_t)(gpr_time_to_millis(c->backoff_delta) * - GRPC_SUBCHANNEL_RECONNECT_BACKOFF_MULTIPLIER); - if (backoff_delta_millis > max_backoff_millis) { - backoff_delta_millis = max_backoff_millis; - } - c->backoff_delta = gpr_time_from_millis(backoff_delta_millis, GPR_TIMESPAN); - c->next_attempt = - gpr_time_add(gpr_now(GPR_CLOCK_MONOTONIC), c->backoff_delta); - - jitter_range = GRPC_SUBCHANNEL_RECONNECT_JITTER * backoff_delta_millis; - jitter = - (int32_t)((2 * generate_uniform_random_number(c) - 1) * jitter_range); - c->next_attempt = - gpr_time_add(c->next_attempt, gpr_time_from_millis(jitter, GPR_TIMESPAN)); } static void on_alarm(grpc_exec_ctx *exec_ctx, void *arg, bool iomgr_success) { @@ -629,7 +579,8 @@ static void on_alarm(grpc_exec_ctx *exec_ctx, void *arg, bool iomgr_success) { iomgr_success = 0; } if (iomgr_success) { - update_reconnect_parameters(c); + c->next_attempt = + gpr_backoff_step(&c->backoff_state, gpr_now(GPR_CLOCK_MONOTONIC)); continue_connect(exec_ctx, c); gpr_mu_unlock(&c->mu); } else { @@ -661,17 +612,6 @@ static void subchannel_connected(grpc_exec_ctx *exec_ctx, void *arg, GRPC_SUBCHANNEL_WEAK_UNREF(exec_ctx, c, "connecting"); } -static gpr_timespec compute_connect_deadline(grpc_subchannel *c) { - gpr_timespec current_deadline = - gpr_time_add(c->next_attempt, c->backoff_delta); - gpr_timespec min_deadline = gpr_time_add( - gpr_now(GPR_CLOCK_MONOTONIC), - gpr_time_from_seconds(GRPC_SUBCHANNEL_MIN_CONNECT_TIMEOUT_SECONDS, - GPR_TIMESPAN)); - return gpr_time_cmp(current_deadline, min_deadline) > 0 ? current_deadline - : min_deadline; -} - /* * grpc_subchannel_call implementation */ @@ -686,8 +626,8 @@ static void subchannel_call_destroy(grpc_exec_ctx *exec_ctx, void *call, GPR_TIMER_END("grpc_subchannel_call_unref.destroy", 0); } -void grpc_subchannel_call_ref(grpc_subchannel_call *c - GRPC_SUBCHANNEL_REF_EXTRA_ARGS) { +void grpc_subchannel_call_ref( + grpc_subchannel_call *c GRPC_SUBCHANNEL_REF_EXTRA_ARGS) { GRPC_CALL_STACK_REF(SUBCHANNEL_CALL_TO_CALL_STACK(c), REF_REASON); } diff --git a/src/core/client_config/subchannel.h b/src/core/lib/client_config/subchannel.h similarity index 89% rename from src/core/client_config/subchannel.h rename to src/core/lib/client_config/subchannel.h index 313e63c75c8..b4f545be521 100644 --- a/src/core/client_config/subchannel.h +++ b/src/core/lib/client_config/subchannel.h @@ -31,12 +31,12 @@ * */ -#ifndef GRPC_INTERNAL_CORE_CLIENT_CONFIG_SUBCHANNEL_H -#define GRPC_INTERNAL_CORE_CLIENT_CONFIG_SUBCHANNEL_H +#ifndef GRPC_CORE_LIB_CLIENT_CONFIG_SUBCHANNEL_H +#define GRPC_CORE_LIB_CLIENT_CONFIG_SUBCHANNEL_H -#include "src/core/channel/channel_stack.h" -#include "src/core/client_config/connector.h" -#include "src/core/transport/connectivity_state.h" +#include "src/core/lib/channel/channel_stack.h" +#include "src/core/lib/client_config/connector.h" +#include "src/core/lib/transport/connectivity_state.h" /** A (sub-)channel that knows how to connect to exactly one target address. Provides a target for load balancing. */ @@ -83,25 +83,25 @@ typedef struct grpc_subchannel_args grpc_subchannel_args; #define GRPC_SUBCHANNEL_REF_EXTRA_ARGS #endif -grpc_subchannel *grpc_subchannel_ref(grpc_subchannel *channel - GRPC_SUBCHANNEL_REF_EXTRA_ARGS); +grpc_subchannel *grpc_subchannel_ref( + grpc_subchannel *channel GRPC_SUBCHANNEL_REF_EXTRA_ARGS); grpc_subchannel *grpc_subchannel_ref_from_weak_ref( grpc_subchannel *channel GRPC_SUBCHANNEL_REF_EXTRA_ARGS); void grpc_subchannel_unref(grpc_exec_ctx *exec_ctx, grpc_subchannel *channel GRPC_SUBCHANNEL_REF_EXTRA_ARGS); -grpc_subchannel *grpc_subchannel_weak_ref(grpc_subchannel *channel - GRPC_SUBCHANNEL_REF_EXTRA_ARGS); +grpc_subchannel *grpc_subchannel_weak_ref( + grpc_subchannel *channel GRPC_SUBCHANNEL_REF_EXTRA_ARGS); void grpc_subchannel_weak_unref(grpc_exec_ctx *exec_ctx, grpc_subchannel *channel GRPC_SUBCHANNEL_REF_EXTRA_ARGS); -void grpc_connected_subchannel_ref(grpc_connected_subchannel *channel - GRPC_SUBCHANNEL_REF_EXTRA_ARGS); +void grpc_connected_subchannel_ref( + grpc_connected_subchannel *channel GRPC_SUBCHANNEL_REF_EXTRA_ARGS); void grpc_connected_subchannel_unref(grpc_exec_ctx *exec_ctx, grpc_connected_subchannel *channel GRPC_SUBCHANNEL_REF_EXTRA_ARGS); -void grpc_subchannel_call_ref(grpc_subchannel_call *call - GRPC_SUBCHANNEL_REF_EXTRA_ARGS); +void grpc_subchannel_call_ref( + grpc_subchannel_call *call GRPC_SUBCHANNEL_REF_EXTRA_ARGS); void grpc_subchannel_call_unref(grpc_exec_ctx *exec_ctx, grpc_subchannel_call *call GRPC_SUBCHANNEL_REF_EXTRA_ARGS); @@ -171,4 +171,4 @@ grpc_subchannel *grpc_subchannel_create(grpc_exec_ctx *exec_ctx, grpc_connector *connector, grpc_subchannel_args *args); -#endif /* GRPC_INTERNAL_CORE_CLIENT_CONFIG_SUBCHANNEL_H */ +#endif /* GRPC_CORE_LIB_CLIENT_CONFIG_SUBCHANNEL_H */ diff --git a/src/core/client_config/subchannel_factory.c b/src/core/lib/client_config/subchannel_factory.c similarity index 95% rename from src/core/client_config/subchannel_factory.c rename to src/core/lib/client_config/subchannel_factory.c index 2c64219e8b0..727a48a6c8c 100644 --- a/src/core/client_config/subchannel_factory.c +++ b/src/core/lib/client_config/subchannel_factory.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,7 +31,7 @@ * */ -#include "src/core/client_config/subchannel_factory.h" +#include "src/core/lib/client_config/subchannel_factory.h" void grpc_subchannel_factory_ref(grpc_subchannel_factory* factory) { factory->vtable->ref(factory); diff --git a/src/core/client_config/subchannel_factory.h b/src/core/lib/client_config/subchannel_factory.h similarity index 89% rename from src/core/client_config/subchannel_factory.h rename to src/core/lib/client_config/subchannel_factory.h index c6d8cc90bed..3ba2f860fe2 100644 --- a/src/core/client_config/subchannel_factory.h +++ b/src/core/lib/client_config/subchannel_factory.h @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,11 +31,11 @@ * */ -#ifndef GRPC_INTERNAL_CORE_CLIENT_CONFIG_SUBCHANNEL_FACTORY_H -#define GRPC_INTERNAL_CORE_CLIENT_CONFIG_SUBCHANNEL_FACTORY_H +#ifndef GRPC_CORE_LIB_CLIENT_CONFIG_SUBCHANNEL_FACTORY_H +#define GRPC_CORE_LIB_CLIENT_CONFIG_SUBCHANNEL_FACTORY_H -#include "src/core/channel/channel_stack.h" -#include "src/core/client_config/subchannel.h" +#include "src/core/lib/channel/channel_stack.h" +#include "src/core/lib/client_config/subchannel.h" typedef struct grpc_subchannel_factory grpc_subchannel_factory; typedef struct grpc_subchannel_factory_vtable grpc_subchannel_factory_vtable; @@ -63,4 +63,4 @@ grpc_subchannel *grpc_subchannel_factory_create_subchannel( grpc_exec_ctx *exec_ctx, grpc_subchannel_factory *factory, grpc_subchannel_args *args); -#endif /* GRPC_INTERNAL_CORE_CLIENT_CONFIG_SUBCHANNEL_FACTORY_H */ +#endif /* GRPC_CORE_LIB_CLIENT_CONFIG_SUBCHANNEL_FACTORY_H */ diff --git a/src/core/client_config/subchannel_index.c b/src/core/lib/client_config/subchannel_index.c similarity index 98% rename from src/core/client_config/subchannel_index.c rename to src/core/lib/client_config/subchannel_index.c index 3f948998f9c..2c545002a28 100644 --- a/src/core/client_config/subchannel_index.c +++ b/src/core/lib/client_config/subchannel_index.c @@ -31,7 +31,7 @@ // // -#include "src/core/client_config/subchannel_index.h" +#include "src/core/lib/client_config/subchannel_index.h" #include #include @@ -40,7 +40,7 @@ #include #include -#include "src/core/channel/channel_args.h" +#include "src/core/lib/channel/channel_args.h" // a map of subchannel_key --> subchannel, used for detecting connections // to the same destination in order to share them @@ -108,6 +108,7 @@ static int subchannel_key_compare(grpc_subchannel_key *a, if (c != 0) return c; c = memcmp(a->args.filters, b->args.filters, a->args.filter_count * sizeof(*a->args.filters)); + if (c != 0) return c; return grpc_channel_args_compare(a->args.args, b->args.args); } diff --git a/src/core/client_config/subchannel_index.h b/src/core/lib/client_config/subchannel_index.h similarity index 92% rename from src/core/client_config/subchannel_index.h rename to src/core/lib/client_config/subchannel_index.h index 095ef178194..bc5f03beb42 100644 --- a/src/core/client_config/subchannel_index.h +++ b/src/core/lib/client_config/subchannel_index.h @@ -31,11 +31,11 @@ * */ -#ifndef GRPC_INTERNAL_CORE_CLIENT_CONFIG_SUBCHANNEL_INDEX_H -#define GRPC_INTERNAL_CORE_CLIENT_CONFIG_SUBCHANNEL_INDEX_H +#ifndef GRPC_CORE_LIB_CLIENT_CONFIG_SUBCHANNEL_INDEX_H +#define GRPC_CORE_LIB_CLIENT_CONFIG_SUBCHANNEL_INDEX_H -#include "src/core/client_config/connector.h" -#include "src/core/client_config/subchannel.h" +#include "src/core/lib/client_config/connector.h" +#include "src/core/lib/client_config/subchannel.h" /** \file Provides an index of active subchannels so that they can be shared amongst channels */ @@ -74,4 +74,4 @@ void grpc_subchannel_index_init(void); /** Shutdown the subchannel index (global) */ void grpc_subchannel_index_shutdown(void); -#endif /* GRPC_INTERNAL_CORE_CLIENT_CONFIG_SUBCHANNEL_INDEX_H */ +#endif /* GRPC_CORE_LIB_CLIENT_CONFIG_SUBCHANNEL_INDEX_H */ diff --git a/src/core/client_config/uri_parser.c b/src/core/lib/client_config/uri_parser.c similarity index 98% rename from src/core/client_config/uri_parser.c rename to src/core/lib/client_config/uri_parser.c index cbdfffcf8e8..d3228dec5fa 100644 --- a/src/core/client_config/uri_parser.c +++ b/src/core/lib/client_config/uri_parser.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,7 +31,7 @@ * */ -#include "src/core/client_config/uri_parser.h" +#include "src/core/lib/client_config/uri_parser.h" #include diff --git a/src/core/client_config/uri_parser.h b/src/core/lib/client_config/uri_parser.h similarity index 90% rename from src/core/client_config/uri_parser.h rename to src/core/lib/client_config/uri_parser.h index b8daa13bd4f..d70d451e60f 100644 --- a/src/core/client_config/uri_parser.h +++ b/src/core/lib/client_config/uri_parser.h @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,8 +31,8 @@ * */ -#ifndef GRPC_INTERNAL_CORE_CLIENT_CONFIG_URI_PARSER_H -#define GRPC_INTERNAL_CORE_CLIENT_CONFIG_URI_PARSER_H +#ifndef GRPC_CORE_LIB_CLIENT_CONFIG_URI_PARSER_H +#define GRPC_CORE_LIB_CLIENT_CONFIG_URI_PARSER_H typedef struct { char *scheme; @@ -48,4 +48,4 @@ grpc_uri *grpc_uri_parse(const char *uri_text, int suppress_errors); /** destroy a uri */ void grpc_uri_destroy(grpc_uri *uri); -#endif +#endif /* GRPC_CORE_LIB_CLIENT_CONFIG_URI_PARSER_H */ diff --git a/src/core/compression/algorithm_metadata.h b/src/core/lib/compression/algorithm_metadata.h similarity index 89% rename from src/core/compression/algorithm_metadata.h rename to src/core/lib/compression/algorithm_metadata.h index 882633c3074..47f33abdc7e 100644 --- a/src/core/compression/algorithm_metadata.h +++ b/src/core/lib/compression/algorithm_metadata.h @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,11 +31,11 @@ * */ -#ifndef GRPC_INTERNAL_CORE_COMPRESSION_ALGORITHM_METADATA_H -#define GRPC_INTERNAL_CORE_COMPRESSION_ALGORITHM_METADATA_H +#ifndef GRPC_CORE_LIB_COMPRESSION_ALGORITHM_METADATA_H +#define GRPC_CORE_LIB_COMPRESSION_ALGORITHM_METADATA_H #include -#include "src/core/transport/metadata.h" +#include "src/core/lib/transport/metadata.h" /** Return compression algorithm based metadata value */ grpc_mdstr *grpc_compression_algorithm_mdstr( @@ -50,4 +50,4 @@ grpc_mdelem *grpc_compression_encoding_mdelem( grpc_compression_algorithm grpc_compression_algorithm_from_mdstr( grpc_mdstr *str); -#endif /* GRPC_INTERNAL_CORE_COMPRESSION_ALGORITHM_METADATA_H */ +#endif /* GRPC_CORE_LIB_COMPRESSION_ALGORITHM_METADATA_H */ diff --git a/src/core/compression/compression_algorithm.c b/src/core/lib/compression/compression_algorithm.c similarity index 75% rename from src/core/compression/compression_algorithm.c rename to src/core/lib/compression/compression_algorithm.c index 6f3a8eb28e6..f781b45042e 100644 --- a/src/core/compression/compression_algorithm.c +++ b/src/core/lib/compression/compression_algorithm.c @@ -37,9 +37,9 @@ #include #include -#include "src/core/compression/algorithm_metadata.h" -#include "src/core/surface/api_trace.h" -#include "src/core/transport/static_metadata.h" +#include "src/core/lib/compression/algorithm_metadata.h" +#include "src/core/lib/surface/api_trace.h" +#include "src/core/lib/transport/static_metadata.h" int grpc_compression_algorithm_parse(const char *name, size_t name_length, grpc_compression_algorithm *algorithm) { @@ -128,20 +128,57 @@ grpc_mdelem *grpc_compression_encoding_mdelem( /* TODO(dgq): Add the ability to specify parameters to the individual * compression algorithms */ grpc_compression_algorithm grpc_compression_algorithm_for_level( - grpc_compression_level level) { + grpc_compression_level level, uint32_t accepted_encodings) { GRPC_API_TRACE("grpc_compression_algorithm_for_level(level=%d)", 1, ((int)level)); + if (level > GRPC_COMPRESS_LEVEL_HIGH) { + gpr_log(GPR_ERROR, "Unknown compression level %d.", (int)level); + abort(); + } + + const size_t num_supported = + GPR_BITCOUNT(accepted_encodings) - 1; /* discard NONE */ + if (level == GRPC_COMPRESS_LEVEL_NONE || num_supported == 0) { + return GRPC_COMPRESS_NONE; + } + + GPR_ASSERT(level > 0); + + /* Establish a "ranking" or compression algorithms in increasing order of + * compression. + * This is simplistic and we will probably want to introduce other dimensions + * in the future (cpu/memory cost, etc). */ + const grpc_compression_algorithm algos_ranking[] = {GRPC_COMPRESS_GZIP, + GRPC_COMPRESS_DEFLATE}; + + /* intersect algos_ranking with the supported ones keeping the ranked order */ + grpc_compression_algorithm + sorted_supported_algos[GRPC_COMPRESS_ALGORITHMS_COUNT]; + size_t algos_supported_idx = 0; + for (size_t i = 0; i < GPR_ARRAY_SIZE(algos_ranking); i++) { + const grpc_compression_algorithm alg = algos_ranking[i]; + for (size_t j = 0; j < num_supported; j++) { + if (GPR_BITGET(accepted_encodings, alg) == 1) { + /* if \a alg in supported */ + sorted_supported_algos[algos_supported_idx++] = alg; + break; + } + } + if (algos_supported_idx == num_supported) break; + } + switch (level) { case GRPC_COMPRESS_LEVEL_NONE: - return GRPC_COMPRESS_NONE; + abort(); /* should have been handled already */ case GRPC_COMPRESS_LEVEL_LOW: + return sorted_supported_algos[0]; case GRPC_COMPRESS_LEVEL_MED: + return sorted_supported_algos[num_supported / 2]; case GRPC_COMPRESS_LEVEL_HIGH: - return GRPC_COMPRESS_DEFLATE; + return sorted_supported_algos[num_supported - 1]; default: - gpr_log(GPR_ERROR, "Unknown compression level %d.", (int)level); abort(); - } + }; } void grpc_compression_options_init(grpc_compression_options *opts) { diff --git a/src/core/compression/message_compress.c b/src/core/lib/compression/message_compress.c similarity index 98% rename from src/core/compression/message_compress.c rename to src/core/lib/compression/message_compress.c index edc21a9eb7d..b4b6a2d75e0 100644 --- a/src/core/compression/message_compress.c +++ b/src/core/lib/compression/message_compress.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,7 +31,7 @@ * */ -#include "src/core/compression/message_compress.h" +#include "src/core/lib/compression/message_compress.h" #include diff --git a/src/core/compression/message_compress.h b/src/core/lib/compression/message_compress.h similarity index 91% rename from src/core/compression/message_compress.h rename to src/core/lib/compression/message_compress.h index 14652004b86..b71608139eb 100644 --- a/src/core/compression/message_compress.h +++ b/src/core/lib/compression/message_compress.h @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,8 +31,8 @@ * */ -#ifndef GRPC_INTERNAL_CORE_COMPRESSION_MESSAGE_COMPRESS_H -#define GRPC_INTERNAL_CORE_COMPRESSION_MESSAGE_COMPRESS_H +#ifndef GRPC_CORE_LIB_COMPRESSION_MESSAGE_COMPRESS_H +#define GRPC_CORE_LIB_COMPRESSION_MESSAGE_COMPRESS_H #include #include @@ -49,4 +49,4 @@ int grpc_msg_compress(grpc_compression_algorithm algorithm, int grpc_msg_decompress(grpc_compression_algorithm algorithm, gpr_slice_buffer* input, gpr_slice_buffer* output); -#endif /* GRPC_INTERNAL_CORE_COMPRESSION_MESSAGE_COMPRESS_H */ +#endif /* GRPC_CORE_LIB_COMPRESSION_MESSAGE_COMPRESS_H */ diff --git a/src/core/debug/trace.c b/src/core/lib/debug/trace.c similarity index 96% rename from src/core/debug/trace.c rename to src/core/lib/debug/trace.c index 3b35d81cd84..786dd9324fb 100644 --- a/src/core/debug/trace.c +++ b/src/core/lib/debug/trace.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,14 +31,14 @@ * */ -#include "src/core/debug/trace.h" +#include "src/core/lib/debug/trace.h" #include #include #include #include -#include "src/core/support/env.h" +#include "src/core/lib/support/env.h" typedef struct tracer { const char *name; diff --git a/src/core/debug/trace.h b/src/core/lib/debug/trace.h similarity index 91% rename from src/core/debug/trace.h rename to src/core/lib/debug/trace.h index dc5875976e2..76ea5a7c64e 100644 --- a/src/core/debug/trace.h +++ b/src/core/lib/debug/trace.h @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,8 +31,8 @@ * */ -#ifndef GRPC_INTERNAL_CORE_DEBUG_TRACE_H -#define GRPC_INTERNAL_CORE_DEBUG_TRACE_H +#ifndef GRPC_CORE_LIB_DEBUG_TRACE_H +#define GRPC_CORE_LIB_DEBUG_TRACE_H #include @@ -40,4 +40,4 @@ void grpc_register_tracer(const char *name, int *flag); void grpc_tracer_init(const char *env_var_name); void grpc_tracer_shutdown(void); -#endif /* GRPC_INTERNAL_CORE_DEBUG_TRACE_H */ +#endif /* GRPC_CORE_LIB_DEBUG_TRACE_H */ diff --git a/src/core/httpcli/format_request.c b/src/core/lib/http/format_request.c similarity index 88% rename from src/core/httpcli/format_request.c rename to src/core/lib/http/format_request.c index 04f2a2d99a7..95b39186460 100644 --- a/src/core/httpcli/format_request.c +++ b/src/core/lib/http/format_request.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,22 +31,22 @@ * */ -#include "src/core/httpcli/format_request.h" +#include "src/core/lib/http/format_request.h" #include #include #include -#include "src/core/support/string.h" #include #include #include #include +#include "src/core/lib/support/string.h" static void fill_common_header(const grpc_httpcli_request *request, gpr_strvec *buf) { size_t i; - gpr_strvec_add(buf, gpr_strdup(request->path)); + gpr_strvec_add(buf, gpr_strdup(request->http.path)); gpr_strvec_add(buf, gpr_strdup(" HTTP/1.0\r\n")); /* just in case some crazy server really expects HTTP/1.1 */ gpr_strvec_add(buf, gpr_strdup("Host: ")); @@ -56,10 +56,10 @@ static void fill_common_header(const grpc_httpcli_request *request, gpr_strvec_add(buf, gpr_strdup("User-Agent: " GRPC_HTTPCLI_USER_AGENT "\r\n")); /* user supplied headers */ - for (i = 0; i < request->hdr_count; i++) { - gpr_strvec_add(buf, gpr_strdup(request->hdrs[i].key)); + for (i = 0; i < request->http.hdr_count; i++) { + gpr_strvec_add(buf, gpr_strdup(request->http.hdrs[i].key)); gpr_strvec_add(buf, gpr_strdup(": ")); - gpr_strvec_add(buf, gpr_strdup(request->hdrs[i].value)); + gpr_strvec_add(buf, gpr_strdup(request->http.hdrs[i].value)); gpr_strvec_add(buf, gpr_strdup("\r\n")); } } @@ -94,8 +94,8 @@ gpr_slice grpc_httpcli_format_post_request(const grpc_httpcli_request *request, fill_common_header(request, &out); if (body_bytes) { uint8_t has_content_type = 0; - for (i = 0; i < request->hdr_count; i++) { - if (strcmp(request->hdrs[i].key, "Content-Type") == 0) { + for (i = 0; i < request->http.hdr_count; i++) { + if (strcmp(request->http.hdrs[i].key, "Content-Type") == 0) { has_content_type = 1; break; } diff --git a/src/core/httpcli/format_request.h b/src/core/lib/http/format_request.h similarity index 89% rename from src/core/httpcli/format_request.h rename to src/core/lib/http/format_request.h index c8dc8f7d4ee..2e933d804b0 100644 --- a/src/core/httpcli/format_request.h +++ b/src/core/lib/http/format_request.h @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,15 +31,15 @@ * */ -#ifndef GRPC_INTERNAL_CORE_HTTPCLI_FORMAT_REQUEST_H -#define GRPC_INTERNAL_CORE_HTTPCLI_FORMAT_REQUEST_H +#ifndef GRPC_CORE_LIB_HTTP_FORMAT_REQUEST_H +#define GRPC_CORE_LIB_HTTP_FORMAT_REQUEST_H -#include "src/core/httpcli/httpcli.h" #include +#include "src/core/lib/http/httpcli.h" gpr_slice grpc_httpcli_format_get_request(const grpc_httpcli_request *request); gpr_slice grpc_httpcli_format_post_request(const grpc_httpcli_request *request, const char *body_bytes, size_t body_size); -#endif /* GRPC_INTERNAL_CORE_HTTPCLI_FORMAT_REQUEST_H */ +#endif /* GRPC_CORE_LIB_HTTP_FORMAT_REQUEST_H */ diff --git a/src/core/httpcli/httpcli.c b/src/core/lib/http/httpcli.c similarity index 91% rename from src/core/httpcli/httpcli.c rename to src/core/lib/http/httpcli.c index 1219c444c71..aab28ad8b62 100644 --- a/src/core/httpcli/httpcli.c +++ b/src/core/lib/http/httpcli.c @@ -31,8 +31,8 @@ * */ -#include "src/core/httpcli/httpcli.h" -#include "src/core/iomgr/sockaddr.h" +#include "src/core/lib/http/httpcli.h" +#include "src/core/lib/iomgr/sockaddr.h" #include @@ -40,17 +40,17 @@ #include #include -#include "src/core/httpcli/format_request.h" -#include "src/core/httpcli/parser.h" -#include "src/core/iomgr/endpoint.h" -#include "src/core/iomgr/iomgr_internal.h" -#include "src/core/iomgr/resolve_address.h" -#include "src/core/iomgr/tcp_client.h" -#include "src/core/support/string.h" +#include "src/core/lib/http/format_request.h" +#include "src/core/lib/http/parser.h" +#include "src/core/lib/iomgr/endpoint.h" +#include "src/core/lib/iomgr/iomgr_internal.h" +#include "src/core/lib/iomgr/resolve_address.h" +#include "src/core/lib/iomgr/tcp_client.h" +#include "src/core/lib/support/string.h" typedef struct { gpr_slice request_text; - grpc_httpcli_parser parser; + grpc_http_parser parser; grpc_resolved_addresses *addresses; size_t next_address; grpc_endpoint *ep; @@ -99,8 +99,9 @@ static void finish(grpc_exec_ctx *exec_ctx, internal_request *req, int success) { grpc_pollset_set_del_pollset(exec_ctx, req->context->pollset_set, req->pollset); - req->on_response(exec_ctx, req->user_data, success ? &req->parser.r : NULL); - grpc_httpcli_parser_destroy(&req->parser); + req->on_response(exec_ctx, req->user_data, + success ? &req->parser.http.response : NULL); + grpc_http_parser_destroy(&req->parser); if (req->addresses != NULL) { grpc_resolved_addresses_destroy(req->addresses); } @@ -129,7 +130,7 @@ static void on_read(grpc_exec_ctx *exec_ctx, void *user_data, bool success) { for (i = 0; i < req->incoming.count; i++) { if (GPR_SLICE_LENGTH(req->incoming.slices[i])) { req->have_read_byte = 1; - if (!grpc_httpcli_parser_parse(&req->parser, req->incoming.slices[i])) { + if (!grpc_http_parser_parse(&req->parser, req->incoming.slices[i])) { finish(exec_ctx, req, 0); return; } @@ -141,7 +142,11 @@ static void on_read(grpc_exec_ctx *exec_ctx, void *user_data, bool success) { } else if (!req->have_read_byte) { next_address(exec_ctx, req); } else { - finish(exec_ctx, req, grpc_httpcli_parser_eof(&req->parser)); + int parse_success = grpc_http_parser_eof(&req->parser); + if (parse_success && (req->parser.type != GRPC_HTTP_RESPONSE)) { + parse_success = 0; + } + finish(exec_ctx, req, parse_success); } } @@ -223,7 +228,7 @@ static void internal_request_begin( internal_request *req = gpr_malloc(sizeof(internal_request)); memset(req, 0, sizeof(*req)); req->request_text = request_text; - grpc_httpcli_parser_init(&req->parser); + grpc_http_parser_init(&req->parser); req->on_response = on_response; req->user_data = user_data; req->deadline = deadline; @@ -255,7 +260,7 @@ void grpc_httpcli_get(grpc_exec_ctx *exec_ctx, grpc_httpcli_context *context, g_get_override(exec_ctx, request, deadline, on_response, user_data)) { return; } - gpr_asprintf(&name, "HTTP:GET:%s:%s", request->host, request->path); + gpr_asprintf(&name, "HTTP:GET:%s:%s", request->host, request->http.path); internal_request_begin(exec_ctx, context, pollset, request, deadline, on_response, user_data, name, grpc_httpcli_format_get_request(request)); @@ -274,7 +279,7 @@ void grpc_httpcli_post(grpc_exec_ctx *exec_ctx, grpc_httpcli_context *context, on_response, user_data)) { return; } - gpr_asprintf(&name, "HTTP:POST:%s:%s", request->host, request->path); + gpr_asprintf(&name, "HTTP:POST:%s:%s", request->host, request->http.path); internal_request_begin( exec_ctx, context, pollset, request, deadline, on_response, user_data, name, grpc_httpcli_format_post_request(request, body_bytes, body_size)); diff --git a/src/core/httpcli/httpcli.h b/src/core/lib/http/httpcli.h similarity index 84% rename from src/core/httpcli/httpcli.h rename to src/core/lib/http/httpcli.h index c9cd987c794..b8d54a85866 100644 --- a/src/core/httpcli/httpcli.h +++ b/src/core/lib/http/httpcli.h @@ -31,27 +31,20 @@ * */ -#ifndef GRPC_INTERNAL_CORE_HTTPCLI_HTTPCLI_H -#define GRPC_INTERNAL_CORE_HTTPCLI_HTTPCLI_H +#ifndef GRPC_CORE_LIB_HTTP_HTTPCLI_H +#define GRPC_CORE_LIB_HTTP_HTTPCLI_H #include #include -#include "src/core/iomgr/endpoint.h" -#include "src/core/iomgr/iomgr_internal.h" -#include "src/core/iomgr/pollset_set.h" +#include "src/core/lib/http/parser.h" +#include "src/core/lib/iomgr/endpoint.h" +#include "src/core/lib/iomgr/iomgr_internal.h" +#include "src/core/lib/iomgr/pollset_set.h" /* User agent this library reports */ #define GRPC_HTTPCLI_USER_AGENT "grpc-httpcli/0.0" -/* Maximum length of a header string of the form 'Key: Value\r\n' */ -#define GRPC_HTTPCLI_MAX_HEADER_LENGTH 4096 - -/* A single header to be passed in a request */ -typedef struct grpc_httpcli_header { - char *key; - char *value; -} grpc_httpcli_header; /* Tracks in-progress http requests TODO(ctiller): allow caching and capturing multiple requests for the @@ -77,33 +70,21 @@ typedef struct grpc_httpcli_request { char *host; /* The host to verify in the SSL handshake (or NULL) */ char *ssl_host_override; - /* The path of the resource to fetch */ - char *path; - /* Additional headers: count and key/values; the following are supplied - automatically and MUST NOT be set here: + /* The main part of the request + The following headers are supplied automatically and MUST NOT be set here: Host, Connection, User-Agent */ - size_t hdr_count; - grpc_httpcli_header *hdrs; + grpc_http_request http; /* handshaker to use ssl for the request */ const grpc_httpcli_handshaker *handshaker; } grpc_httpcli_request; -/* A response */ -typedef struct grpc_httpcli_response { - /* HTTP status code */ - int status; - /* Headers: count and key/values */ - size_t hdr_count; - grpc_httpcli_header *hdrs; - /* Body: length and contents; contents are NOT null-terminated */ - size_t body_length; - char *body; -} grpc_httpcli_response; +/* Expose the parser response type as a httpcli response too */ +typedef struct grpc_http_response grpc_httpcli_response; /* Callback for grpc_httpcli_get and grpc_httpcli_post. */ typedef void (*grpc_httpcli_response_cb)(grpc_exec_ctx *exec_ctx, void *user_data, - const grpc_httpcli_response *response); + const grpc_http_response *response); void grpc_httpcli_context_init(grpc_httpcli_context *context); void grpc_httpcli_context_destroy(grpc_httpcli_context *context); @@ -160,4 +141,4 @@ typedef int (*grpc_httpcli_post_override)( void grpc_httpcli_set_override(grpc_httpcli_get_override get, grpc_httpcli_post_override post); -#endif /* GRPC_INTERNAL_CORE_HTTPCLI_HTTPCLI_H */ +#endif /* GRPC_CORE_LIB_HTTP_HTTPCLI_H */ diff --git a/src/core/httpcli/httpcli_security_connector.c b/src/core/lib/http/httpcli_security_connector.c similarity index 97% rename from src/core/httpcli/httpcli_security_connector.c rename to src/core/lib/http/httpcli_security_connector.c index 156961a377a..6f1630ac1f1 100644 --- a/src/core/httpcli/httpcli_security_connector.c +++ b/src/core/lib/http/httpcli_security_connector.c @@ -31,16 +31,16 @@ * */ -#include "src/core/httpcli/httpcli.h" +#include "src/core/lib/http/httpcli.h" #include -#include "src/core/security/handshake.h" -#include "src/core/support/string.h" #include #include #include -#include "src/core/tsi/ssl_transport_security.h" +#include "src/core/lib/security/handshake.h" +#include "src/core/lib/support/string.h" +#include "src/core/lib/tsi/ssl_transport_security.h" typedef struct { grpc_channel_security_connector base; diff --git a/src/core/lib/http/parser.c b/src/core/lib/http/parser.c new file mode 100644 index 00000000000..5d4e304615b --- /dev/null +++ b/src/core/lib/http/parser.c @@ -0,0 +1,313 @@ +/* + * + * Copyright 2015-2016, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include "src/core/lib/http/parser.h" + +#include + +#include +#include +#include + +static char *buf2str(void *buffer, size_t length) { + char *out = gpr_malloc(length + 1); + memcpy(out, buffer, length); + out[length] = 0; + return out; +} + +static int handle_response_line(grpc_http_parser *parser) { + uint8_t *beg = parser->cur_line; + uint8_t *cur = beg; + uint8_t *end = beg + parser->cur_line_length; + + if (cur == end || *cur++ != 'H') goto error; + if (cur == end || *cur++ != 'T') goto error; + if (cur == end || *cur++ != 'T') goto error; + if (cur == end || *cur++ != 'P') goto error; + if (cur == end || *cur++ != '/') goto error; + if (cur == end || *cur++ != '1') goto error; + if (cur == end || *cur++ != '.') goto error; + if (cur == end || *cur < '0' || *cur++ > '1') goto error; + if (cur == end || *cur++ != ' ') goto error; + if (cur == end || *cur < '1' || *cur++ > '9') goto error; + if (cur == end || *cur < '0' || *cur++ > '9') goto error; + if (cur == end || *cur < '0' || *cur++ > '9') goto error; + parser->http.response.status = + (cur[-3] - '0') * 100 + (cur[-2] - '0') * 10 + (cur[-1] - '0'); + if (cur == end || *cur++ != ' ') goto error; + + /* we don't really care about the status code message */ + + return 1; + +error: + gpr_log(GPR_ERROR, "Failed parsing response line"); + return 0; +} + +static int handle_request_line(grpc_http_parser *parser) { + uint8_t *beg = parser->cur_line; + uint8_t *cur = beg; + uint8_t *end = beg + parser->cur_line_length; + uint8_t vers_major = 0; + uint8_t vers_minor = 0; + + while (cur != end && *cur++ != ' ') + ; + if (cur == end) goto error; + parser->http.request.method = buf2str(beg, (size_t)(cur - beg - 1)); + + beg = cur; + while (cur != end && *cur++ != ' ') + ; + if (cur == end) goto error; + parser->http.request.path = buf2str(beg, (size_t)(cur - beg - 1)); + + if (cur == end || *cur++ != 'H') goto error; + if (cur == end || *cur++ != 'T') goto error; + if (cur == end || *cur++ != 'T') goto error; + if (cur == end || *cur++ != 'P') goto error; + if (cur == end || *cur++ != '/') goto error; + vers_major = (uint8_t)(*cur++ - '1' + 1); + ++cur; + if (cur == end) goto error; + vers_minor = (uint8_t)(*cur++ - '1' + 1); + + if (vers_major == 1) { + if (vers_minor == 0) { + parser->http.request.version = GRPC_HTTP_HTTP10; + } else if (vers_minor == 1) { + parser->http.request.version = GRPC_HTTP_HTTP11; + } else { + goto error; + } + } else if (vers_major == 2) { + if (vers_minor == 0) { + parser->http.request.version = GRPC_HTTP_HTTP20; + } else { + goto error; + } + } else { + goto error; + } + + return 1; + +error: + gpr_log(GPR_ERROR, "Failed parsing request line"); + return 0; +} + +static int handle_first_line(grpc_http_parser *parser) { + if (parser->cur_line[0] == 'H') { + parser->type = GRPC_HTTP_RESPONSE; + return handle_response_line(parser); + } else { + parser->type = GRPC_HTTP_REQUEST; + return handle_request_line(parser); + } +} + +static int add_header(grpc_http_parser *parser) { + uint8_t *beg = parser->cur_line; + uint8_t *cur = beg; + uint8_t *end = beg + parser->cur_line_length; + size_t *hdr_count = NULL; + grpc_http_header **hdrs = NULL; + grpc_http_header hdr = {NULL, NULL}; + + GPR_ASSERT(cur != end); + + if (*cur == ' ' || *cur == '\t') { + gpr_log(GPR_ERROR, "Continued header lines not supported yet"); + goto error; + } + + while (cur != end && *cur != ':') { + cur++; + } + if (cur == end) { + gpr_log(GPR_ERROR, "Didn't find ':' in header string"); + goto error; + } + GPR_ASSERT(cur >= beg); + hdr.key = buf2str(beg, (size_t)(cur - beg)); + cur++; /* skip : */ + + while (cur != end && (*cur == ' ' || *cur == '\t')) { + cur++; + } + GPR_ASSERT(end - cur >= 2); + hdr.value = buf2str(cur, (size_t)(end - cur) - 2); + + if (parser->type == GRPC_HTTP_RESPONSE) { + hdr_count = &parser->http.response.hdr_count; + hdrs = &parser->http.response.hdrs; + } else if (parser->type == GRPC_HTTP_REQUEST) { + hdr_count = &parser->http.request.hdr_count; + hdrs = &parser->http.request.hdrs; + } else { + return 0; + } + + if (*hdr_count == parser->hdr_capacity) { + parser->hdr_capacity = + GPR_MAX(parser->hdr_capacity + 1, parser->hdr_capacity * 3 / 2); + *hdrs = gpr_realloc(*hdrs, parser->hdr_capacity * sizeof(**hdrs)); + } + (*hdrs)[(*hdr_count)++] = hdr; + return 1; + +error: + gpr_free(hdr.key); + gpr_free(hdr.value); + return 0; +} + +static int finish_line(grpc_http_parser *parser) { + switch (parser->state) { + case GRPC_HTTP_FIRST_LINE: + if (!handle_first_line(parser)) { + return 0; + } + parser->state = GRPC_HTTP_HEADERS; + break; + case GRPC_HTTP_HEADERS: + if (parser->cur_line_length == 2) { + parser->state = GRPC_HTTP_BODY; + break; + } + if (!add_header(parser)) { + return 0; + } + break; + case GRPC_HTTP_BODY: + GPR_UNREACHABLE_CODE(return 0); + } + + parser->cur_line_length = 0; + return 1; +} + +static int addbyte_body(grpc_http_parser *parser, uint8_t byte) { + size_t *body_length = NULL; + char **body = NULL; + + if (parser->type == GRPC_HTTP_RESPONSE) { + body_length = &parser->http.response.body_length; + body = &parser->http.response.body; + } else if (parser->type == GRPC_HTTP_REQUEST) { + body_length = &parser->http.request.body_length; + body = &parser->http.request.body; + } else { + return 0; + } + + if (*body_length == parser->body_capacity) { + parser->body_capacity = GPR_MAX(8, parser->body_capacity * 3 / 2); + *body = gpr_realloc((void *)*body, parser->body_capacity); + } + (*body)[*body_length] = (char)byte; + (*body_length)++; + + return 1; +} + +static int addbyte(grpc_http_parser *parser, uint8_t byte) { + switch (parser->state) { + case GRPC_HTTP_FIRST_LINE: + case GRPC_HTTP_HEADERS: + if (parser->cur_line_length >= GRPC_HTTP_PARSER_MAX_HEADER_LENGTH) { + gpr_log(GPR_ERROR, "HTTP client max line length (%d) exceeded", + GRPC_HTTP_PARSER_MAX_HEADER_LENGTH); + return 0; + } + parser->cur_line[parser->cur_line_length] = byte; + parser->cur_line_length++; + if (parser->cur_line_length >= 2 && + parser->cur_line[parser->cur_line_length - 2] == '\r' && + parser->cur_line[parser->cur_line_length - 1] == '\n') { + return finish_line(parser); + } else { + return 1; + } + GPR_UNREACHABLE_CODE(return 0); + case GRPC_HTTP_BODY: + return addbyte_body(parser, byte); + } + GPR_UNREACHABLE_CODE(return 0); +} + +void grpc_http_parser_init(grpc_http_parser *parser) { + memset(parser, 0, sizeof(*parser)); + parser->state = GRPC_HTTP_FIRST_LINE; + parser->type = GRPC_HTTP_UNKNOWN; +} + +void grpc_http_parser_destroy(grpc_http_parser *parser) { + size_t i; + if (parser->type == GRPC_HTTP_RESPONSE) { + gpr_free(parser->http.response.body); + for (i = 0; i < parser->http.response.hdr_count; i++) { + gpr_free(parser->http.response.hdrs[i].key); + gpr_free(parser->http.response.hdrs[i].value); + } + gpr_free(parser->http.response.hdrs); + } else if (parser->type == GRPC_HTTP_REQUEST) { + gpr_free(parser->http.request.body); + for (i = 0; i < parser->http.request.hdr_count; i++) { + gpr_free(parser->http.request.hdrs[i].key); + gpr_free(parser->http.request.hdrs[i].value); + } + gpr_free(parser->http.request.hdrs); + gpr_free(parser->http.request.method); + gpr_free(parser->http.request.path); + } +} + +int grpc_http_parser_parse(grpc_http_parser *parser, gpr_slice slice) { + size_t i; + + for (i = 0; i < GPR_SLICE_LENGTH(slice); i++) { + if (!addbyte(parser, GPR_SLICE_START_PTR(slice)[i])) { + return 0; + } + } + + return 1; +} + +int grpc_http_parser_eof(grpc_http_parser *parser) { + return parser->state == GRPC_HTTP_BODY; +} diff --git a/src/core/lib/http/parser.h b/src/core/lib/http/parser.h new file mode 100644 index 00000000000..6a72174aa60 --- /dev/null +++ b/src/core/lib/http/parser.h @@ -0,0 +1,116 @@ +/* + * + * Copyright 2015-2016, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#ifndef GRPC_CORE_LIB_HTTP_PARSER_H +#define GRPC_CORE_LIB_HTTP_PARSER_H + +#include +#include + +/* Maximum length of a header string of the form 'Key: Value\r\n' */ +#define GRPC_HTTP_PARSER_MAX_HEADER_LENGTH 4096 + +/* A single header to be passed in a request */ +typedef struct grpc_http_header { + char *key; + char *value; +} grpc_http_header; + +typedef enum { + GRPC_HTTP_FIRST_LINE, + GRPC_HTTP_HEADERS, + GRPC_HTTP_BODY +} grpc_http_parser_state; + +typedef enum { + GRPC_HTTP_HTTP10, + GRPC_HTTP_HTTP11, + GRPC_HTTP_HTTP20, +} grpc_http_version; + +typedef enum { + GRPC_HTTP_RESPONSE, + GRPC_HTTP_REQUEST, + GRPC_HTTP_UNKNOWN +} grpc_http_type; + +/* A request */ +typedef struct grpc_http_request { + /* Method of the request (e.g. GET, POST) */ + char *method; + /* The path of the resource to fetch */ + char *path; + /* HTTP version to use */ + grpc_http_version version; + /* Headers attached to the request */ + size_t hdr_count; + grpc_http_header *hdrs; + /* Body: length and contents; contents are NOT null-terminated */ + size_t body_length; + char *body; +} grpc_http_request; + +/* A response */ +typedef struct grpc_http_response { + /* HTTP status code */ + int status; + /* Headers: count and key/values */ + size_t hdr_count; + grpc_http_header *hdrs; + /* Body: length and contents; contents are NOT null-terminated */ + size_t body_length; + char *body; +} grpc_http_response; + +typedef struct { + grpc_http_parser_state state; + grpc_http_type type; + + union { + grpc_http_response response; + grpc_http_request request; + } http; + size_t body_capacity; + size_t hdr_capacity; + + uint8_t cur_line[GRPC_HTTP_PARSER_MAX_HEADER_LENGTH]; + size_t cur_line_length; +} grpc_http_parser; + +void grpc_http_parser_init(grpc_http_parser *parser); +void grpc_http_parser_destroy(grpc_http_parser *parser); + +int grpc_http_parser_parse(grpc_http_parser *parser, gpr_slice slice); +int grpc_http_parser_eof(grpc_http_parser *parser); + +#endif /* GRPC_CORE_LIB_HTTP_PARSER_H */ diff --git a/src/core/iomgr/closure.c b/src/core/lib/iomgr/closure.c similarity index 98% rename from src/core/iomgr/closure.c rename to src/core/lib/iomgr/closure.c index 3a96f7385f7..724ebc284a7 100644 --- a/src/core/iomgr/closure.c +++ b/src/core/lib/iomgr/closure.c @@ -31,7 +31,7 @@ * */ -#include "src/core/iomgr/closure.h" +#include "src/core/lib/iomgr/closure.h" #include diff --git a/src/core/iomgr/closure.h b/src/core/lib/iomgr/closure.h similarity index 96% rename from src/core/iomgr/closure.h rename to src/core/lib/iomgr/closure.h index ea96c19c71b..2597cf17068 100644 --- a/src/core/iomgr/closure.h +++ b/src/core/lib/iomgr/closure.h @@ -31,8 +31,8 @@ * */ -#ifndef GRPC_INTERNAL_CORE_IOMGR_CLOSURE_H -#define GRPC_INTERNAL_CORE_IOMGR_CLOSURE_H +#ifndef GRPC_CORE_LIB_IOMGR_CLOSURE_H +#define GRPC_CORE_LIB_IOMGR_CLOSURE_H #include #include @@ -95,4 +95,4 @@ bool grpc_closure_list_empty(grpc_closure_list list); /** return the next pointer for a queued closure list */ grpc_closure *grpc_closure_next(grpc_closure *closure); -#endif /* GRPC_INTERNAL_CORE_IOMGR_CLOSURE_H */ +#endif /* GRPC_CORE_LIB_IOMGR_CLOSURE_H */ diff --git a/src/core/iomgr/endpoint.c b/src/core/lib/iomgr/endpoint.c similarity index 97% rename from src/core/iomgr/endpoint.c rename to src/core/lib/iomgr/endpoint.c index bd64707669c..576b5a6e5c0 100644 --- a/src/core/iomgr/endpoint.c +++ b/src/core/lib/iomgr/endpoint.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,7 +31,7 @@ * */ -#include "src/core/iomgr/endpoint.h" +#include "src/core/lib/iomgr/endpoint.h" void grpc_endpoint_read(grpc_exec_ctx* exec_ctx, grpc_endpoint* ep, gpr_slice_buffer* slices, grpc_closure* cb) { diff --git a/src/core/iomgr/endpoint.h b/src/core/lib/iomgr/endpoint.h similarity index 94% rename from src/core/iomgr/endpoint.h rename to src/core/lib/iomgr/endpoint.h index cbdc947abbf..918e705fbd1 100644 --- a/src/core/iomgr/endpoint.h +++ b/src/core/lib/iomgr/endpoint.h @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,14 +31,14 @@ * */ -#ifndef GRPC_INTERNAL_CORE_IOMGR_ENDPOINT_H -#define GRPC_INTERNAL_CORE_IOMGR_ENDPOINT_H +#ifndef GRPC_CORE_LIB_IOMGR_ENDPOINT_H +#define GRPC_CORE_LIB_IOMGR_ENDPOINT_H -#include "src/core/iomgr/pollset.h" -#include "src/core/iomgr/pollset_set.h" #include #include #include +#include "src/core/lib/iomgr/pollset.h" +#include "src/core/lib/iomgr/pollset_set.h" /* An endpoint caps a streaming channel between two communicating processes. Examples may be: a tcp socket, , or some shared memory. */ @@ -99,4 +99,4 @@ struct grpc_endpoint { const grpc_endpoint_vtable *vtable; }; -#endif /* GRPC_INTERNAL_CORE_IOMGR_ENDPOINT_H */ +#endif /* GRPC_CORE_LIB_IOMGR_ENDPOINT_H */ diff --git a/src/core/iomgr/endpoint_pair.h b/src/core/lib/iomgr/endpoint_pair.h similarity index 88% rename from src/core/iomgr/endpoint_pair.h rename to src/core/lib/iomgr/endpoint_pair.h index 095ec5fcc9f..bef8bb35189 100644 --- a/src/core/iomgr/endpoint_pair.h +++ b/src/core/lib/iomgr/endpoint_pair.h @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,10 +31,10 @@ * */ -#ifndef GRPC_INTERNAL_CORE_IOMGR_ENDPOINT_PAIR_H -#define GRPC_INTERNAL_CORE_IOMGR_ENDPOINT_PAIR_H +#ifndef GRPC_CORE_LIB_IOMGR_ENDPOINT_PAIR_H +#define GRPC_CORE_LIB_IOMGR_ENDPOINT_PAIR_H -#include "src/core/iomgr/endpoint.h" +#include "src/core/lib/iomgr/endpoint.h" typedef struct { grpc_endpoint *client; @@ -44,4 +44,4 @@ typedef struct { grpc_endpoint_pair grpc_iomgr_create_endpoint_pair(const char *name, size_t read_slice_size); -#endif /* GRPC_INTERNAL_CORE_IOMGR_ENDPOINT_PAIR_H */ +#endif /* GRPC_CORE_LIB_IOMGR_ENDPOINT_PAIR_H */ diff --git a/src/core/iomgr/endpoint_pair_posix.c b/src/core/lib/iomgr/endpoint_pair_posix.c similarity index 90% rename from src/core/iomgr/endpoint_pair_posix.c rename to src/core/lib/iomgr/endpoint_pair_posix.c index 56f6f146fd3..e0ce47c7731 100644 --- a/src/core/iomgr/endpoint_pair_posix.c +++ b/src/core/lib/iomgr/endpoint_pair_posix.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -35,24 +35,25 @@ #ifdef GPR_POSIX_SOCKET -#include "src/core/iomgr/endpoint_pair.h" -#include "src/core/iomgr/socket_utils_posix.h" +#include "src/core/lib/iomgr/endpoint_pair.h" +#include "src/core/lib/iomgr/socket_utils_posix.h" +#include "src/core/lib/iomgr/unix_sockets_posix.h" #include #include #include -#include #include +#include -#include "src/core/iomgr/tcp_posix.h" -#include "src/core/support/string.h" #include #include #include +#include "src/core/lib/iomgr/tcp_posix.h" +#include "src/core/lib/support/string.h" static void create_sockets(int sv[2]) { int flags; - GPR_ASSERT(socketpair(AF_UNIX, SOCK_STREAM, 0, sv) == 0); + grpc_create_socketpair_if_unix(sv); flags = fcntl(sv[0], F_GETFL, 0); GPR_ASSERT(fcntl(sv[0], F_SETFL, flags | O_NONBLOCK) == 0); flags = fcntl(sv[1], F_GETFL, 0); diff --git a/src/core/iomgr/endpoint_pair_windows.c b/src/core/lib/iomgr/endpoint_pair_windows.c similarity index 94% rename from src/core/iomgr/endpoint_pair_windows.c rename to src/core/lib/iomgr/endpoint_pair_windows.c index db9d092dcab..cba18db81f2 100644 --- a/src/core/iomgr/endpoint_pair_windows.c +++ b/src/core/lib/iomgr/endpoint_pair_windows.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -34,16 +34,16 @@ #include #ifdef GPR_WINSOCK_SOCKET -#include "src/core/iomgr/sockaddr_utils.h" -#include "src/core/iomgr/endpoint_pair.h" +#include "src/core/lib/iomgr/endpoint_pair.h" +#include "src/core/lib/iomgr/sockaddr_utils.h" #include #include #include -#include "src/core/iomgr/tcp_windows.h" -#include "src/core/iomgr/socket_windows.h" #include +#include "src/core/lib/iomgr/socket_windows.h" +#include "src/core/lib/iomgr/tcp_windows.h" static void create_sockets(SOCKET sv[2]) { SOCKET svr_sock = INVALID_SOCKET; diff --git a/src/core/iomgr/exec_ctx.c b/src/core/lib/iomgr/exec_ctx.c similarity index 98% rename from src/core/iomgr/exec_ctx.c rename to src/core/lib/iomgr/exec_ctx.c index 893fe4515c7..1ed6da623a1 100644 --- a/src/core/iomgr/exec_ctx.c +++ b/src/core/lib/iomgr/exec_ctx.c @@ -31,13 +31,13 @@ * */ -#include "src/core/iomgr/exec_ctx.h" +#include "src/core/lib/iomgr/exec_ctx.h" #include #include #include -#include "src/core/profiling/timers.h" +#include "src/core/lib/profiling/timers.h" #ifndef GRPC_EXECUTION_CONTEXT_SANITIZER bool grpc_exec_ctx_flush(grpc_exec_ctx *exec_ctx) { diff --git a/src/core/iomgr/exec_ctx.h b/src/core/lib/iomgr/exec_ctx.h similarity index 96% rename from src/core/iomgr/exec_ctx.h rename to src/core/lib/iomgr/exec_ctx.h index 1b627a5dcf8..e62ea2dedf5 100644 --- a/src/core/iomgr/exec_ctx.h +++ b/src/core/lib/iomgr/exec_ctx.h @@ -31,10 +31,10 @@ * */ -#ifndef GRPC_INTERNAL_CORE_IOMGR_EXEC_CTX_H -#define GRPC_INTERNAL_CORE_IOMGR_EXEC_CTX_H +#ifndef GRPC_CORE_LIB_IOMGR_EXEC_CTX_H +#define GRPC_CORE_LIB_IOMGR_EXEC_CTX_H -#include "src/core/iomgr/closure.h" +#include "src/core/lib/iomgr/closure.h" /* #define GRPC_EXECUTION_CONTEXT_SANITIZER 1 */ @@ -95,4 +95,4 @@ void grpc_exec_ctx_enqueue_list(grpc_exec_ctx *exec_ctx, void grpc_exec_ctx_global_init(void); void grpc_exec_ctx_global_shutdown(void); -#endif +#endif /* GRPC_CORE_LIB_IOMGR_EXEC_CTX_H */ diff --git a/src/core/iomgr/executor.c b/src/core/lib/iomgr/executor.c similarity index 98% rename from src/core/iomgr/executor.c rename to src/core/lib/iomgr/executor.c index f22d8f30acf..42a9db3cbb5 100644 --- a/src/core/iomgr/executor.c +++ b/src/core/lib/iomgr/executor.c @@ -31,7 +31,7 @@ * */ -#include "src/core/iomgr/executor.h" +#include "src/core/lib/iomgr/executor.h" #include @@ -39,7 +39,7 @@ #include #include #include -#include "src/core/iomgr/exec_ctx.h" +#include "src/core/lib/iomgr/exec_ctx.h" typedef struct grpc_executor_data { int busy; /**< is the thread currently running? */ diff --git a/src/core/iomgr/executor.h b/src/core/lib/iomgr/executor.h similarity index 92% rename from src/core/iomgr/executor.h rename to src/core/lib/iomgr/executor.h index aac057ddf5f..f1871416a08 100644 --- a/src/core/iomgr/executor.h +++ b/src/core/lib/iomgr/executor.h @@ -31,10 +31,10 @@ * */ -#ifndef GRPC_INTERNAL_CORE_IOMGR_EXECUTOR_H -#define GRPC_INTERNAL_CORE_IOMGR_EXECUTOR_H +#ifndef GRPC_CORE_LIB_IOMGR_EXECUTOR_H +#define GRPC_CORE_LIB_IOMGR_EXECUTOR_H -#include "src/core/iomgr/closure.h" +#include "src/core/lib/iomgr/closure.h" /** Initialize the global executor. * @@ -50,4 +50,4 @@ void grpc_executor_enqueue(grpc_closure *closure, bool success); /** Shutdown the executor, running all pending work as part of the call */ void grpc_executor_shutdown(); -#endif /* GRPC_INTERNAL_CORE_IOMGR_EXECUTOR_H */ +#endif /* GRPC_CORE_LIB_IOMGR_EXECUTOR_H */ diff --git a/src/core/iomgr/fd_posix.c b/src/core/lib/iomgr/fd_posix.c similarity index 99% rename from src/core/iomgr/fd_posix.c rename to src/core/lib/iomgr/fd_posix.c index 4ba7c5df943..72c924bdcba 100644 --- a/src/core/iomgr/fd_posix.c +++ b/src/core/lib/iomgr/fd_posix.c @@ -35,7 +35,7 @@ #ifdef GPR_POSIX_SOCKET -#include "src/core/iomgr/fd_posix.h" +#include "src/core/lib/iomgr/fd_posix.h" #include #include @@ -46,7 +46,7 @@ #include #include -#include "src/core/iomgr/pollset_posix.h" +#include "src/core/lib/iomgr/pollset_posix.h" #define CLOSURE_NOT_READY ((grpc_closure *)0) #define CLOSURE_READY ((grpc_closure *)1) @@ -92,7 +92,7 @@ static grpc_fd *alloc_fd(int fd) { gpr_mu_init(&r->mu); } - gpr_atm_rel_store(&r->refst, 1); + gpr_mu_lock(&r->mu); r->shutdown = 0; r->read_closure = CLOSURE_NOT_READY; r->write_closure = CLOSURE_NOT_READY; @@ -104,6 +104,9 @@ static grpc_fd *alloc_fd(int fd) { r->on_done_closure = NULL; r->closed = 0; r->released = 0; + gpr_atm_rel_store(&r->refst, 1); + gpr_mu_unlock(&r->mu); + return r; } diff --git a/src/core/iomgr/fd_posix.h b/src/core/lib/iomgr/fd_posix.h similarity index 97% rename from src/core/iomgr/fd_posix.h rename to src/core/lib/iomgr/fd_posix.h index 17e7de88ffa..69d09ef5e3e 100644 --- a/src/core/iomgr/fd_posix.h +++ b/src/core/lib/iomgr/fd_posix.h @@ -31,14 +31,14 @@ * */ -#ifndef GRPC_INTERNAL_CORE_IOMGR_FD_POSIX_H -#define GRPC_INTERNAL_CORE_IOMGR_FD_POSIX_H +#ifndef GRPC_CORE_LIB_IOMGR_FD_POSIX_H +#define GRPC_CORE_LIB_IOMGR_FD_POSIX_H -#include "src/core/iomgr/iomgr_internal.h" -#include "src/core/iomgr/pollset.h" #include #include #include +#include "src/core/lib/iomgr/iomgr_internal.h" +#include "src/core/lib/iomgr/pollset.h" typedef struct grpc_fd grpc_fd; @@ -189,4 +189,4 @@ void grpc_fd_unref(grpc_fd *fd); void grpc_fd_global_init(void); void grpc_fd_global_shutdown(void); -#endif /* GRPC_INTERNAL_CORE_IOMGR_FD_POSIX_H */ +#endif /* GRPC_CORE_LIB_IOMGR_FD_POSIX_H */ diff --git a/src/core/iomgr/iocp_windows.c b/src/core/lib/iomgr/iocp_windows.c similarity index 97% rename from src/core/iomgr/iocp_windows.c rename to src/core/lib/iomgr/iocp_windows.c index fa87e5246b0..682a32c0dae 100644 --- a/src/core/iomgr/iocp_windows.c +++ b/src/core/lib/iomgr/iocp_windows.c @@ -37,15 +37,15 @@ #include +#include #include #include -#include #include -#include "src/core/iomgr/timer.h" -#include "src/core/iomgr/iocp_windows.h" -#include "src/core/iomgr/iomgr_internal.h" -#include "src/core/iomgr/socket_windows.h" +#include "src/core/lib/iomgr/iocp_windows.h" +#include "src/core/lib/iomgr/iomgr_internal.h" +#include "src/core/lib/iomgr/socket_windows.h" +#include "src/core/lib/iomgr/timer.h" static ULONG g_iocp_kick_token; static OVERLAPPED g_iocp_custom_overlap; diff --git a/src/core/iomgr/iocp_windows.h b/src/core/lib/iomgr/iocp_windows.h similarity index 92% rename from src/core/iomgr/iocp_windows.h rename to src/core/lib/iomgr/iocp_windows.h index 8b2b1aeb5c2..856c837fb44 100644 --- a/src/core/iomgr/iocp_windows.h +++ b/src/core/lib/iomgr/iocp_windows.h @@ -31,12 +31,12 @@ * */ -#ifndef GRPC_INTERNAL_CORE_IOMGR_IOCP_WINDOWS_H -#define GRPC_INTERNAL_CORE_IOMGR_IOCP_WINDOWS_H +#ifndef GRPC_CORE_LIB_IOMGR_IOCP_WINDOWS_H +#define GRPC_CORE_LIB_IOMGR_IOCP_WINDOWS_H #include -#include "src/core/iomgr/socket_windows.h" +#include "src/core/lib/iomgr/socket_windows.h" typedef enum { GRPC_IOCP_WORK_WORK, @@ -60,4 +60,4 @@ void grpc_socket_notify_on_read(grpc_exec_ctx *exec_ctx, grpc_winsocket *winsocket, grpc_closure *closure); -#endif /* GRPC_INTERNAL_CORE_IOMGR_IOCP_WINDOWS_H */ +#endif /* GRPC_CORE_LIB_IOMGR_IOCP_WINDOWS_H */ diff --git a/src/core/iomgr/iomgr.c b/src/core/lib/iomgr/iomgr.c similarity index 95% rename from src/core/iomgr/iomgr.c rename to src/core/lib/iomgr/iomgr.c index 3ab4430668e..bb544c82803 100644 --- a/src/core/iomgr/iomgr.c +++ b/src/core/lib/iomgr/iomgr.c @@ -31,7 +31,7 @@ * */ -#include "src/core/iomgr/iomgr.h" +#include "src/core/lib/iomgr/iomgr.h" #include #include @@ -43,11 +43,11 @@ #include #include -#include "src/core/iomgr/exec_ctx.h" -#include "src/core/iomgr/iomgr_internal.h" -#include "src/core/iomgr/timer.h" -#include "src/core/support/env.h" -#include "src/core/support/string.h" +#include "src/core/lib/iomgr/exec_ctx.h" +#include "src/core/lib/iomgr/iomgr_internal.h" +#include "src/core/lib/iomgr/timer.h" +#include "src/core/lib/support/env.h" +#include "src/core/lib/support/string.h" static gpr_mu g_mu; static gpr_cv g_rcv; diff --git a/src/core/iomgr/iomgr.h b/src/core/lib/iomgr/iomgr.h similarity index 91% rename from src/core/iomgr/iomgr.h rename to src/core/lib/iomgr/iomgr.h index c9ea84c6050..babf0a85b7f 100644 --- a/src/core/iomgr/iomgr.h +++ b/src/core/lib/iomgr/iomgr.h @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,8 +31,8 @@ * */ -#ifndef GRPC_INTERNAL_CORE_IOMGR_IOMGR_H -#define GRPC_INTERNAL_CORE_IOMGR_IOMGR_H +#ifndef GRPC_CORE_LIB_IOMGR_IOMGR_H +#define GRPC_CORE_LIB_IOMGR_IOMGR_H /** Initializes the iomgr. */ void grpc_iomgr_init(void); @@ -40,4 +40,4 @@ void grpc_iomgr_init(void); /** Signals the intention to shutdown the iomgr. */ void grpc_iomgr_shutdown(void); -#endif /* GRPC_INTERNAL_CORE_IOMGR_IOMGR_H */ +#endif /* GRPC_CORE_LIB_IOMGR_IOMGR_H */ diff --git a/src/core/iomgr/iomgr_internal.h b/src/core/lib/iomgr/iomgr_internal.h similarity index 92% rename from src/core/iomgr/iomgr_internal.h rename to src/core/lib/iomgr/iomgr_internal.h index ac2c46ebe62..0963630c614 100644 --- a/src/core/iomgr/iomgr_internal.h +++ b/src/core/lib/iomgr/iomgr_internal.h @@ -31,13 +31,13 @@ * */ -#ifndef GRPC_INTERNAL_CORE_IOMGR_IOMGR_INTERNAL_H -#define GRPC_INTERNAL_CORE_IOMGR_IOMGR_INTERNAL_H +#ifndef GRPC_CORE_LIB_IOMGR_IOMGR_INTERNAL_H +#define GRPC_CORE_LIB_IOMGR_IOMGR_INTERNAL_H #include -#include "src/core/iomgr/iomgr.h" #include +#include "src/core/lib/iomgr/iomgr.h" typedef struct grpc_iomgr_object { char *name; @@ -59,4 +59,4 @@ void grpc_iomgr_platform_shutdown(void); bool grpc_iomgr_abort_on_leaks(void); -#endif /* GRPC_INTERNAL_CORE_IOMGR_IOMGR_INTERNAL_H */ +#endif /* GRPC_CORE_LIB_IOMGR_IOMGR_INTERNAL_H */ diff --git a/src/core/iomgr/iomgr_posix.c b/src/core/lib/iomgr/iomgr_posix.c similarity index 90% rename from src/core/iomgr/iomgr_posix.c rename to src/core/lib/iomgr/iomgr_posix.c index fecb7b9760a..e4990f7bcef 100644 --- a/src/core/iomgr/iomgr_posix.c +++ b/src/core/lib/iomgr/iomgr_posix.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -35,10 +35,10 @@ #ifdef GPR_POSIX_SOCKET -#include "src/core/iomgr/iomgr_posix.h" -#include "src/core/debug/trace.h" -#include "src/core/iomgr/fd_posix.h" -#include "src/core/iomgr/tcp_posix.h" +#include "src/core/lib/debug/trace.h" +#include "src/core/lib/iomgr/fd_posix.h" +#include "src/core/lib/iomgr/iomgr_posix.h" +#include "src/core/lib/iomgr/tcp_posix.h" void grpc_iomgr_platform_init(void) { grpc_fd_global_init(); diff --git a/src/core/iomgr/iomgr_posix.h b/src/core/lib/iomgr/iomgr_posix.h similarity index 87% rename from src/core/iomgr/iomgr_posix.h rename to src/core/lib/iomgr/iomgr_posix.h index 068a5c6d7cf..6a8996e403c 100644 --- a/src/core/iomgr/iomgr_posix.h +++ b/src/core/lib/iomgr/iomgr_posix.h @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,9 +31,9 @@ * */ -#ifndef GRPC_INTERNAL_CORE_IOMGR_IOMGR_POSIX_H -#define GRPC_INTERNAL_CORE_IOMGR_IOMGR_POSIX_H +#ifndef GRPC_CORE_LIB_IOMGR_IOMGR_POSIX_H +#define GRPC_CORE_LIB_IOMGR_IOMGR_POSIX_H -#include "src/core/iomgr/iomgr_internal.h" +#include "src/core/lib/iomgr/iomgr_internal.h" -#endif /* GRPC_INTERNAL_CORE_IOMGR_IOMGR_POSIX_H */ +#endif /* GRPC_CORE_LIB_IOMGR_IOMGR_POSIX_H */ diff --git a/src/core/iomgr/iomgr_windows.c b/src/core/lib/iomgr/iomgr_windows.c similarity index 91% rename from src/core/iomgr/iomgr_windows.c rename to src/core/lib/iomgr/iomgr_windows.c index 14775516bb1..af7e6163949 100644 --- a/src/core/iomgr/iomgr_windows.c +++ b/src/core/lib/iomgr/iomgr_windows.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -35,13 +35,13 @@ #ifdef GPR_WINSOCK_SOCKET -#include "src/core/iomgr/sockaddr_win32.h" +#include "src/core/lib/iomgr/sockaddr_win32.h" #include -#include "src/core/iomgr/socket_windows.h" -#include "src/core/iomgr/iocp_windows.h" -#include "src/core/iomgr/iomgr.h" +#include "src/core/lib/iomgr/iocp_windows.h" +#include "src/core/lib/iomgr/iomgr.h" +#include "src/core/lib/iomgr/socket_windows.h" /* Windows' io manager is going to be fully designed using IO completion ports. All of what we're doing here is basically make sure that diff --git a/src/core/iomgr/pollset.h b/src/core/lib/iomgr/pollset.h similarity index 87% rename from src/core/iomgr/pollset.h rename to src/core/lib/iomgr/pollset.h index 92a0374ddd4..61561248623 100644 --- a/src/core/iomgr/pollset.h +++ b/src/core/lib/iomgr/pollset.h @@ -31,14 +31,14 @@ * */ -#ifndef GRPC_INTERNAL_CORE_IOMGR_POLLSET_H -#define GRPC_INTERNAL_CORE_IOMGR_POLLSET_H +#ifndef GRPC_CORE_LIB_IOMGR_POLLSET_H +#define GRPC_CORE_LIB_IOMGR_POLLSET_H #include #include #include -#include "src/core/iomgr/exec_ctx.h" +#include "src/core/lib/iomgr/exec_ctx.h" #define GRPC_POLLSET_KICK_BROADCAST ((grpc_pollset_worker *)1) @@ -55,7 +55,7 @@ typedef struct grpc_pollset_worker grpc_pollset_worker; size_t grpc_pollset_size(void); void grpc_pollset_init(grpc_pollset *pollset, gpr_mu **mu); /* Begin shutting down the pollset, and call closure when done. - * GRPC_POLLSET_MU(pollset) must be held */ + * pollset's mutex must be held */ void grpc_pollset_shutdown(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, grpc_closure *closure); /** Reset the pollset to its initial state (perhaps with some cached objects); @@ -66,16 +66,16 @@ void grpc_pollset_destroy(grpc_pollset *pollset); /* Do some work on a pollset. May involve invoking asynchronous callbacks, or actually polling file descriptors. - Requires GRPC_POLLSET_MU(pollset) locked. - May unlock GRPC_POLLSET_MU(pollset) during its execution. + Requires pollset's mutex locked. + May unlock its mutex during its execution. worker is a (platform-specific) handle that can be used to wake up from grpc_pollset_work before any events are received and before the timeout has expired. It is both initialized and destroyed by grpc_pollset_work. Initialization of worker is guaranteed to occur BEFORE the - GRPC_POLLSET_MU(pollset) is released for the first time by - grpc_pollset_work, and it is guaranteed that GRPC_POLLSET_MU(pollset) will - not be released by grpc_pollset_work AFTER worker has been destroyed. + pollset's mutex is released for the first time by grpc_pollset_work + and it is guaranteed that it will not be released by grpc_pollset_work + AFTER worker has been destroyed. Tries not to block past deadline. May call grpc_closure_list_run on grpc_closure_list, without holding the @@ -91,4 +91,4 @@ void grpc_pollset_work(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, void grpc_pollset_kick(grpc_pollset *pollset, grpc_pollset_worker *specific_worker); -#endif /* GRPC_INTERNAL_CORE_IOMGR_POLLSET_H */ +#endif /* GRPC_CORE_LIB_IOMGR_POLLSET_H */ diff --git a/src/core/iomgr/pollset_multipoller_with_epoll.c b/src/core/lib/iomgr/pollset_multipoller_with_epoll.c similarity index 98% rename from src/core/iomgr/pollset_multipoller_with_epoll.c rename to src/core/lib/iomgr/pollset_multipoller_with_epoll.c index 2e0f27fab86..fa1b0d2d845 100644 --- a/src/core/iomgr/pollset_multipoller_with_epoll.c +++ b/src/core/lib/iomgr/pollset_multipoller_with_epoll.c @@ -44,10 +44,10 @@ #include #include #include -#include "src/core/iomgr/fd_posix.h" -#include "src/core/iomgr/pollset_posix.h" -#include "src/core/profiling/timers.h" -#include "src/core/support/block_annotate.h" +#include "src/core/lib/iomgr/fd_posix.h" +#include "src/core/lib/iomgr/pollset_posix.h" +#include "src/core/lib/profiling/timers.h" +#include "src/core/lib/support/block_annotate.h" struct epoll_fd_list { int *epoll_fds; diff --git a/src/core/iomgr/pollset_multipoller_with_poll_posix.c b/src/core/lib/iomgr/pollset_multipoller_with_poll_posix.c similarity index 97% rename from src/core/iomgr/pollset_multipoller_with_poll_posix.c rename to src/core/lib/iomgr/pollset_multipoller_with_poll_posix.c index 92d6fb72414..9b33f6dbb22 100644 --- a/src/core/iomgr/pollset_multipoller_with_poll_posix.c +++ b/src/core/lib/iomgr/pollset_multipoller_with_poll_posix.c @@ -35,7 +35,7 @@ #ifdef GPR_POSIX_SOCKET -#include "src/core/iomgr/pollset_posix.h" +#include "src/core/lib/iomgr/pollset_posix.h" #include #include @@ -46,10 +46,10 @@ #include #include -#include "src/core/iomgr/fd_posix.h" -#include "src/core/iomgr/iomgr_internal.h" -#include "src/core/iomgr/pollset_posix.h" -#include "src/core/support/block_annotate.h" +#include "src/core/lib/iomgr/fd_posix.h" +#include "src/core/lib/iomgr/iomgr_internal.h" +#include "src/core/lib/iomgr/pollset_posix.h" +#include "src/core/lib/support/block_annotate.h" typedef struct { /* all polled fds */ diff --git a/src/core/iomgr/pollset_posix.c b/src/core/lib/iomgr/pollset_posix.c similarity index 98% rename from src/core/iomgr/pollset_posix.c rename to src/core/lib/iomgr/pollset_posix.c index e895a778849..259c7bc1946 100644 --- a/src/core/iomgr/pollset_posix.c +++ b/src/core/lib/iomgr/pollset_posix.c @@ -35,7 +35,7 @@ #ifdef GPR_POSIX_SOCKET -#include "src/core/iomgr/pollset_posix.h" +#include "src/core/lib/iomgr/pollset_posix.h" #include #include @@ -47,11 +47,11 @@ #include #include #include -#include "src/core/iomgr/fd_posix.h" -#include "src/core/iomgr/iomgr_internal.h" -#include "src/core/iomgr/socket_utils_posix.h" -#include "src/core/profiling/timers.h" -#include "src/core/support/block_annotate.h" +#include "src/core/lib/iomgr/fd_posix.h" +#include "src/core/lib/iomgr/iomgr_internal.h" +#include "src/core/lib/iomgr/socket_utils_posix.h" +#include "src/core/lib/profiling/timers.h" +#include "src/core/lib/support/block_annotate.h" GPR_TLS_DECL(g_current_thread_poller); GPR_TLS_DECL(g_current_thread_worker); diff --git a/src/core/iomgr/pollset_posix.h b/src/core/lib/iomgr/pollset_posix.h similarity index 95% rename from src/core/iomgr/pollset_posix.h rename to src/core/lib/iomgr/pollset_posix.h index bbedb66b007..7d8e9fc2794 100644 --- a/src/core/iomgr/pollset_posix.h +++ b/src/core/lib/iomgr/pollset_posix.h @@ -31,17 +31,17 @@ * */ -#ifndef GRPC_INTERNAL_CORE_IOMGR_POLLSET_POSIX_H -#define GRPC_INTERNAL_CORE_IOMGR_POLLSET_POSIX_H +#ifndef GRPC_CORE_LIB_IOMGR_POLLSET_POSIX_H +#define GRPC_CORE_LIB_IOMGR_POLLSET_POSIX_H #include #include -#include "src/core/iomgr/exec_ctx.h" -#include "src/core/iomgr/iomgr.h" -#include "src/core/iomgr/pollset.h" -#include "src/core/iomgr/wakeup_fd_posix.h" +#include "src/core/lib/iomgr/exec_ctx.h" +#include "src/core/lib/iomgr/iomgr.h" +#include "src/core/lib/iomgr/pollset.h" +#include "src/core/lib/iomgr/wakeup_fd_posix.h" typedef struct grpc_pollset_vtable grpc_pollset_vtable; @@ -150,4 +150,4 @@ typedef int (*grpc_poll_function_type)(struct pollfd *, nfds_t, int); extern grpc_poll_function_type grpc_poll_function; extern grpc_wakeup_fd grpc_global_wakeup_fd; -#endif /* GRPC_INTERNAL_CORE_IOMGR_POLLSET_POSIX_H */ +#endif /* GRPC_CORE_LIB_IOMGR_POLLSET_POSIX_H */ diff --git a/src/core/iomgr/pollset_set.h b/src/core/lib/iomgr/pollset_set.h similarity index 93% rename from src/core/iomgr/pollset_set.h rename to src/core/lib/iomgr/pollset_set.h index dddcd8313f2..fb29d692d75 100644 --- a/src/core/iomgr/pollset_set.h +++ b/src/core/lib/iomgr/pollset_set.h @@ -31,10 +31,10 @@ * */ -#ifndef GRPC_INTERNAL_CORE_IOMGR_POLLSET_SET_H -#define GRPC_INTERNAL_CORE_IOMGR_POLLSET_SET_H +#ifndef GRPC_CORE_LIB_IOMGR_POLLSET_SET_H +#define GRPC_CORE_LIB_IOMGR_POLLSET_SET_H -#include "src/core/iomgr/pollset.h" +#include "src/core/lib/iomgr/pollset.h" /* A grpc_pollset_set is a set of pollsets that are interested in an action. Adding a pollset to a pollset_set automatically adds any @@ -58,4 +58,4 @@ void grpc_pollset_set_del_pollset_set(grpc_exec_ctx *exec_ctx, grpc_pollset_set *bag, grpc_pollset_set *item); -#endif /* GRPC_INTERNAL_CORE_IOMGR_POLLSET_H */ +#endif /* GRPC_CORE_LIB_IOMGR_POLLSET_SET_H */ diff --git a/src/core/iomgr/pollset_set_posix.c b/src/core/lib/iomgr/pollset_set_posix.c similarity index 98% rename from src/core/iomgr/pollset_set_posix.c rename to src/core/lib/iomgr/pollset_set_posix.c index 9dc9aff4a8d..d6142f9b6b6 100644 --- a/src/core/iomgr/pollset_set_posix.c +++ b/src/core/lib/iomgr/pollset_set_posix.c @@ -41,8 +41,8 @@ #include #include -#include "src/core/iomgr/pollset_posix.h" -#include "src/core/iomgr/pollset_set_posix.h" +#include "src/core/lib/iomgr/pollset_posix.h" +#include "src/core/lib/iomgr/pollset_set_posix.h" struct grpc_pollset_set { gpr_mu mu; diff --git a/src/core/iomgr/pollset_set_posix.h b/src/core/lib/iomgr/pollset_set_posix.h similarity index 88% rename from src/core/iomgr/pollset_set_posix.h rename to src/core/lib/iomgr/pollset_set_posix.h index 7d1aaf41817..4e6b063c6f6 100644 --- a/src/core/iomgr/pollset_set_posix.h +++ b/src/core/lib/iomgr/pollset_set_posix.h @@ -31,15 +31,15 @@ * */ -#ifndef GRPC_INTERNAL_CORE_IOMGR_POLLSET_SET_POSIX_H -#define GRPC_INTERNAL_CORE_IOMGR_POLLSET_SET_POSIX_H +#ifndef GRPC_CORE_LIB_IOMGR_POLLSET_SET_POSIX_H +#define GRPC_CORE_LIB_IOMGR_POLLSET_SET_POSIX_H -#include "src/core/iomgr/fd_posix.h" -#include "src/core/iomgr/pollset_set.h" +#include "src/core/lib/iomgr/fd_posix.h" +#include "src/core/lib/iomgr/pollset_set.h" void grpc_pollset_set_add_fd(grpc_exec_ctx *exec_ctx, grpc_pollset_set *pollset_set, grpc_fd *fd); void grpc_pollset_set_del_fd(grpc_exec_ctx *exec_ctx, grpc_pollset_set *pollset_set, grpc_fd *fd); -#endif /* GRPC_INTERNAL_CORE_IOMGR_POLLSET_WINDOWS_H */ +#endif /* GRPC_CORE_LIB_IOMGR_POLLSET_SET_POSIX_H */ diff --git a/src/core/iomgr/pollset_set_windows.c b/src/core/lib/iomgr/pollset_set_windows.c similarity index 98% rename from src/core/iomgr/pollset_set_windows.c rename to src/core/lib/iomgr/pollset_set_windows.c index 3b8eca28e61..0b14e446ae6 100644 --- a/src/core/iomgr/pollset_set_windows.c +++ b/src/core/lib/iomgr/pollset_set_windows.c @@ -35,7 +35,7 @@ #ifdef GPR_WINSOCK_SOCKET -#include "src/core/iomgr/pollset_set_windows.h" +#include "src/core/lib/iomgr/pollset_set_windows.h" grpc_pollset_set* grpc_pollset_set_create(pollset_set) { return NULL; } diff --git a/src/core/iomgr/pollset_set_windows.h b/src/core/lib/iomgr/pollset_set_windows.h similarity index 88% rename from src/core/iomgr/pollset_set_windows.h rename to src/core/lib/iomgr/pollset_set_windows.h index 9661cd2c398..7c2cea23de2 100644 --- a/src/core/iomgr/pollset_set_windows.h +++ b/src/core/lib/iomgr/pollset_set_windows.h @@ -31,9 +31,9 @@ * */ -#ifndef GRPC_INTERNAL_CORE_IOMGR_POLLSET_SET_WINDOWS_H -#define GRPC_INTERNAL_CORE_IOMGR_POLLSET_SET_WINDOWS_H +#ifndef GRPC_CORE_LIB_IOMGR_POLLSET_SET_WINDOWS_H +#define GRPC_CORE_LIB_IOMGR_POLLSET_SET_WINDOWS_H -#include "src/core/iomgr/pollset_set.h" +#include "src/core/lib/iomgr/pollset_set.h" -#endif /* GRPC_INTERNAL_CORE_IOMGR_POLLSET_WINDOWS_H */ +#endif /* GRPC_CORE_LIB_IOMGR_POLLSET_SET_WINDOWS_H */ diff --git a/src/core/iomgr/pollset_windows.c b/src/core/lib/iomgr/pollset_windows.c similarity index 97% rename from src/core/iomgr/pollset_windows.c rename to src/core/lib/iomgr/pollset_windows.c index c7f30f435fa..6b339127a8f 100644 --- a/src/core/iomgr/pollset_windows.c +++ b/src/core/lib/iomgr/pollset_windows.c @@ -38,10 +38,10 @@ #include #include -#include "src/core/iomgr/iomgr_internal.h" -#include "src/core/iomgr/iocp_windows.h" -#include "src/core/iomgr/pollset.h" -#include "src/core/iomgr/pollset_windows.h" +#include "src/core/lib/iomgr/iocp_windows.h" +#include "src/core/lib/iomgr/iomgr_internal.h" +#include "src/core/lib/iomgr/pollset.h" +#include "src/core/lib/iomgr/pollset_windows.h" gpr_mu grpc_polling_mu; static grpc_pollset_worker *g_active_poller; diff --git a/src/core/iomgr/pollset_windows.h b/src/core/lib/iomgr/pollset_windows.h similarity index 92% rename from src/core/iomgr/pollset_windows.h rename to src/core/lib/iomgr/pollset_windows.h index dc0b7a4104b..fa9553ffea3 100644 --- a/src/core/iomgr/pollset_windows.h +++ b/src/core/lib/iomgr/pollset_windows.h @@ -31,12 +31,12 @@ * */ -#ifndef GRPC_INTERNAL_CORE_IOMGR_POLLSET_WINDOWS_H -#define GRPC_INTERNAL_CORE_IOMGR_POLLSET_WINDOWS_H +#ifndef GRPC_CORE_LIB_IOMGR_POLLSET_WINDOWS_H +#define GRPC_CORE_LIB_IOMGR_POLLSET_WINDOWS_H #include -#include "src/core/iomgr/socket_windows.h" +#include "src/core/lib/iomgr/socket_windows.h" /* There isn't really any such thing as a pollset under Windows, due to the nature of the IO completion ports. A Windows "pollset" is merely a mutex @@ -72,4 +72,4 @@ struct grpc_pollset { grpc_closure *on_shutdown; }; -#endif /* GRPC_INTERNAL_CORE_IOMGR_POLLSET_WINDOWS_H */ +#endif /* GRPC_CORE_LIB_IOMGR_POLLSET_WINDOWS_H */ diff --git a/src/core/iomgr/resolve_address.h b/src/core/lib/iomgr/resolve_address.h similarity index 92% rename from src/core/iomgr/resolve_address.h rename to src/core/lib/iomgr/resolve_address.h index b0596304576..f748288685c 100644 --- a/src/core/iomgr/resolve_address.h +++ b/src/core/lib/iomgr/resolve_address.h @@ -31,12 +31,12 @@ * */ -#ifndef GRPC_INTERNAL_CORE_IOMGR_RESOLVE_ADDRESS_H -#define GRPC_INTERNAL_CORE_IOMGR_RESOLVE_ADDRESS_H +#ifndef GRPC_CORE_LIB_IOMGR_RESOLVE_ADDRESS_H +#define GRPC_CORE_LIB_IOMGR_RESOLVE_ADDRESS_H #include -#include "src/core/iomgr/exec_ctx.h" -#include "src/core/iomgr/iomgr.h" +#include "src/core/lib/iomgr/exec_ctx.h" +#include "src/core/lib/iomgr/iomgr.h" #define GRPC_MAX_SOCKADDR_SIZE 128 @@ -69,4 +69,4 @@ void grpc_resolved_addresses_destroy(grpc_resolved_addresses *addresses); extern grpc_resolved_addresses *(*grpc_blocking_resolve_address)( const char *name, const char *default_port); -#endif /* GRPC_INTERNAL_CORE_IOMGR_RESOLVE_ADDRESS_H */ +#endif /* GRPC_CORE_LIB_IOMGR_RESOLVE_ADDRESS_H */ diff --git a/src/core/iomgr/resolve_address_posix.c b/src/core/lib/iomgr/resolve_address_posix.c similarity index 88% rename from src/core/iomgr/resolve_address_posix.c rename to src/core/lib/iomgr/resolve_address_posix.c index a6c9893f231..ebecb39c167 100644 --- a/src/core/iomgr/resolve_address_posix.c +++ b/src/core/lib/iomgr/resolve_address_posix.c @@ -34,12 +34,11 @@ #include #ifdef GPR_POSIX_SOCKET -#include "src/core/iomgr/resolve_address.h" -#include "src/core/iomgr/sockaddr.h" +#include "src/core/lib/iomgr/resolve_address.h" +#include "src/core/lib/iomgr/sockaddr.h" #include #include -#include #include #include @@ -48,11 +47,12 @@ #include #include #include -#include "src/core/iomgr/executor.h" -#include "src/core/iomgr/iomgr_internal.h" -#include "src/core/iomgr/sockaddr_utils.h" -#include "src/core/support/block_annotate.h" -#include "src/core/support/string.h" +#include "src/core/lib/iomgr/executor.h" +#include "src/core/lib/iomgr/iomgr_internal.h" +#include "src/core/lib/iomgr/sockaddr_utils.h" +#include "src/core/lib/iomgr/unix_sockets_posix.h" +#include "src/core/lib/support/block_annotate.h" +#include "src/core/lib/support/string.h" typedef struct { char *name; @@ -71,18 +71,10 @@ static grpc_resolved_addresses *blocking_resolve_address_impl( int s; size_t i; grpc_resolved_addresses *addrs = NULL; - struct sockaddr_un *un; if (name[0] == 'u' && name[1] == 'n' && name[2] == 'i' && name[3] == 'x' && name[4] == ':' && name[5] != 0) { - addrs = gpr_malloc(sizeof(grpc_resolved_addresses)); - addrs->naddrs = 1; - addrs->addrs = gpr_malloc(sizeof(grpc_resolved_address)); - un = (struct sockaddr_un *)addrs->addrs->addr; - un->sun_family = AF_UNIX; - strcpy(un->sun_path, name + 5); - addrs->addrs->len = strlen(un->sun_path) + sizeof(un->sun_family) + 1; - return addrs; + return grpc_resolve_unix_domain_address(name + 5); } /* parse name, splitting it into host and port parts */ diff --git a/src/core/iomgr/resolve_address_windows.c b/src/core/lib/iomgr/resolve_address_windows.c similarity index 94% rename from src/core/iomgr/resolve_address_windows.c rename to src/core/lib/iomgr/resolve_address_windows.c index 472e7971634..bde1f1b7f78 100644 --- a/src/core/iomgr/resolve_address_windows.c +++ b/src/core/lib/iomgr/resolve_address_windows.c @@ -34,8 +34,8 @@ #include #ifdef GPR_WINSOCK_SOCKET -#include "src/core/iomgr/resolve_address.h" -#include "src/core/iomgr/sockaddr.h" +#include "src/core/lib/iomgr/resolve_address.h" +#include "src/core/lib/iomgr/sockaddr.h" #include #include @@ -47,11 +47,11 @@ #include #include #include -#include "src/core/iomgr/executor.h" -#include "src/core/iomgr/iomgr_internal.h" -#include "src/core/iomgr/sockaddr_utils.h" -#include "src/core/support/block_annotate.h" -#include "src/core/support/string.h" +#include "src/core/lib/iomgr/executor.h" +#include "src/core/lib/iomgr/iomgr_internal.h" +#include "src/core/lib/iomgr/sockaddr_utils.h" +#include "src/core/lib/support/block_annotate.h" +#include "src/core/lib/support/string.h" typedef struct { char *name; diff --git a/src/core/iomgr/sockaddr.h b/src/core/lib/iomgr/sockaddr.h similarity index 86% rename from src/core/iomgr/sockaddr.h rename to src/core/lib/iomgr/sockaddr.h index e41e1ec6b48..66a930ee6ae 100644 --- a/src/core/iomgr/sockaddr.h +++ b/src/core/lib/iomgr/sockaddr.h @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,17 +31,17 @@ * */ -#ifndef GRPC_INTERNAL_CORE_IOMGR_SOCKADDR_H -#define GRPC_INTERNAL_CORE_IOMGR_SOCKADDR_H +#ifndef GRPC_CORE_LIB_IOMGR_SOCKADDR_H +#define GRPC_CORE_LIB_IOMGR_SOCKADDR_H #include #ifdef GPR_WIN32 -#include "src/core/iomgr/sockaddr_win32.h" +#include "src/core/lib/iomgr/sockaddr_win32.h" #endif #ifdef GPR_POSIX_SOCKETADDR -#include "src/core/iomgr/sockaddr_posix.h" +#include "src/core/lib/iomgr/sockaddr_posix.h" #endif -#endif /* GRPC_INTERNAL_CORE_IOMGR_SOCKADDR_H */ +#endif /* GRPC_CORE_LIB_IOMGR_SOCKADDR_H */ diff --git a/src/core/iomgr/sockaddr_posix.h b/src/core/lib/iomgr/sockaddr_posix.h similarity index 90% rename from src/core/iomgr/sockaddr_posix.h rename to src/core/lib/iomgr/sockaddr_posix.h index 388abb33066..79a7467c5d3 100644 --- a/src/core/iomgr/sockaddr_posix.h +++ b/src/core/lib/iomgr/sockaddr_posix.h @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,14 +31,14 @@ * */ -#ifndef GRPC_INTERNAL_CORE_IOMGR_SOCKADDR_POSIX_H -#define GRPC_INTERNAL_CORE_IOMGR_SOCKADDR_POSIX_H +#ifndef GRPC_CORE_LIB_IOMGR_SOCKADDR_POSIX_H +#define GRPC_CORE_LIB_IOMGR_SOCKADDR_POSIX_H #include +#include +#include #include #include -#include -#include #include -#endif /* GRPC_INTERNAL_CORE_IOMGR_SOCKADDR_POSIX_H */ +#endif /* GRPC_CORE_LIB_IOMGR_SOCKADDR_POSIX_H */ diff --git a/src/core/iomgr/sockaddr_utils.c b/src/core/lib/iomgr/sockaddr_utils.c similarity index 95% rename from src/core/iomgr/sockaddr_utils.c rename to src/core/lib/iomgr/sockaddr_utils.c index 61006d7a7aa..127d95c618a 100644 --- a/src/core/iomgr/sockaddr_utils.c +++ b/src/core/lib/iomgr/sockaddr_utils.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,22 +31,19 @@ * */ -#include "src/core/iomgr/sockaddr_utils.h" +#include "src/core/lib/iomgr/sockaddr_utils.h" #include #include -#ifdef GPR_POSIX_SOCKET -#include -#endif - #include #include #include #include #include -#include "src/core/support/string.h" +#include "src/core/lib/iomgr/unix_sockets_posix.h" +#include "src/core/lib/support/string.h" static const uint8_t kV4MappedPrefix[] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0xff, 0xff}; @@ -191,14 +188,9 @@ char *grpc_sockaddr_to_uri(const struct sockaddr *addr) { gpr_asprintf(&result, "ipv6:%s", temp); gpr_free(temp); return result; -#ifdef GPR_POSIX_SOCKET - case AF_UNIX: - gpr_asprintf(&result, "unix:%s", ((struct sockaddr_un *)addr)->sun_path); - return result; -#endif + default: + return grpc_sockaddr_to_uri_unix_if_possible(addr); } - - return NULL; } int grpc_sockaddr_get_port(const struct sockaddr *addr) { @@ -207,9 +199,10 @@ int grpc_sockaddr_get_port(const struct sockaddr *addr) { return ntohs(((struct sockaddr_in *)addr)->sin_port); case AF_INET6: return ntohs(((struct sockaddr_in6 *)addr)->sin6_port); - case AF_UNIX: - return 1; default: + if (grpc_is_unix_socket(addr)) { + return 1; + } gpr_log(GPR_ERROR, "Unknown socket family %d in grpc_sockaddr_get_port", addr->sa_family); return 0; diff --git a/src/core/iomgr/sockaddr_utils.h b/src/core/lib/iomgr/sockaddr_utils.h similarity index 94% rename from src/core/iomgr/sockaddr_utils.h rename to src/core/lib/iomgr/sockaddr_utils.h index 6f7a279900d..20a3e3bec31 100644 --- a/src/core/iomgr/sockaddr_utils.h +++ b/src/core/lib/iomgr/sockaddr_utils.h @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,10 +31,10 @@ * */ -#ifndef GRPC_INTERNAL_CORE_IOMGR_SOCKADDR_UTILS_H -#define GRPC_INTERNAL_CORE_IOMGR_SOCKADDR_UTILS_H +#ifndef GRPC_CORE_LIB_IOMGR_SOCKADDR_UTILS_H +#define GRPC_CORE_LIB_IOMGR_SOCKADDR_UTILS_H -#include "src/core/iomgr/sockaddr.h" +#include "src/core/lib/iomgr/sockaddr.h" /* Returns true if addr is an IPv4-mapped IPv6 address within the ::ffff:0.0.0.0/96 range, or false otherwise. @@ -86,4 +86,4 @@ int grpc_sockaddr_to_string(char **out, const struct sockaddr *addr, char *grpc_sockaddr_to_uri(const struct sockaddr *addr); -#endif /* GRPC_INTERNAL_CORE_IOMGR_SOCKADDR_UTILS_H */ +#endif /* GRPC_CORE_LIB_IOMGR_SOCKADDR_UTILS_H */ diff --git a/src/core/iomgr/sockaddr_win32.h b/src/core/lib/iomgr/sockaddr_win32.h similarity index 90% rename from src/core/iomgr/sockaddr_win32.h rename to src/core/lib/iomgr/sockaddr_win32.h index 8e3946a7d84..2dd7111240b 100644 --- a/src/core/iomgr/sockaddr_win32.h +++ b/src/core/lib/iomgr/sockaddr_win32.h @@ -31,11 +31,13 @@ * */ -#ifndef GRPC_INTERNAL_CORE_IOMGR_SOCKADDR_WIN32_H -#define GRPC_INTERNAL_CORE_IOMGR_SOCKADDR_WIN32_H +#ifndef GRPC_CORE_LIB_IOMGR_SOCKADDR_WIN32_H +#define GRPC_CORE_LIB_IOMGR_SOCKADDR_WIN32_H #include #include + +// must be included after the above #include -#endif /* GRPC_INTERNAL_CORE_IOMGR_SOCKADDR_WIN32_H */ +#endif /* GRPC_CORE_LIB_IOMGR_SOCKADDR_WIN32_H */ diff --git a/src/core/iomgr/socket_utils_common_posix.c b/src/core/lib/iomgr/socket_utils_common_posix.c similarity index 89% rename from src/core/iomgr/socket_utils_common_posix.c rename to src/core/lib/iomgr/socket_utils_common_posix.c index a9af5947009..b433aee7fa9 100644 --- a/src/core/iomgr/socket_utils_common_posix.c +++ b/src/core/lib/iomgr/socket_utils_common_posix.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -35,26 +35,26 @@ #ifdef GPR_POSIX_SOCKET -#include "src/core/iomgr/socket_utils_posix.h" +#include "src/core/lib/iomgr/socket_utils_posix.h" #include -#include +#include #include +#include #include #include #include -#include +#include #include +#include #include -#include -#include -#include "src/core/iomgr/sockaddr_utils.h" -#include "src/core/support/string.h" #include #include #include #include +#include "src/core/lib/iomgr/sockaddr_utils.h" +#include "src/core/lib/support/string.h" /* set a socket to non blocking mode */ int grpc_set_socket_nonblocking(int fd, int non_blocking) { @@ -89,6 +89,28 @@ int grpc_set_socket_no_sigpipe_if_possible(int fd) { #endif } +int grpc_set_socket_ip_pktinfo_if_possible(int fd) { +#ifdef GPR_HAVE_IP_PKTINFO + int get_local_ip = 1; + return 0 == setsockopt(fd, IPPROTO_IP, IP_PKTINFO, &get_local_ip, + sizeof(get_local_ip)); +#else + (void)fd; + return 1; +#endif +} + +int grpc_set_socket_ipv6_recvpktinfo_if_possible(int fd) { +#ifdef GPR_HAVE_IPV6_RECVPKTINFO + int get_local_ip = 1; + return 0 == setsockopt(fd, IPPROTO_IPV6, IPV6_RECVPKTINFO, &get_local_ip, + sizeof(get_local_ip)); +#else + (void)fd; + return 1; +#endif +} + /* set a socket to close on exec */ int grpc_set_socket_cloexec(int fd, int close_on_exec) { int oldflags = fcntl(fd, F_GETFD, 0); diff --git a/src/core/iomgr/socket_utils_linux.c b/src/core/lib/iomgr/socket_utils_linux.c similarity index 95% rename from src/core/iomgr/socket_utils_linux.c rename to src/core/lib/iomgr/socket_utils_linux.c index a87625262b2..e7dfe892cad 100644 --- a/src/core/iomgr/socket_utils_linux.c +++ b/src/core/lib/iomgr/socket_utils_linux.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -35,10 +35,10 @@ #ifdef GPR_LINUX_SOCKETUTILS -#include "src/core/iomgr/socket_utils_posix.h" +#include "src/core/lib/iomgr/socket_utils_posix.h" -#include #include +#include int grpc_accept4(int sockfd, struct sockaddr *addr, socklen_t *addrlen, int nonblock, int cloexec) { diff --git a/src/core/iomgr/socket_utils_posix.c b/src/core/lib/iomgr/socket_utils_posix.c similarity index 96% rename from src/core/iomgr/socket_utils_posix.c rename to src/core/lib/iomgr/socket_utils_posix.c index 3c56b467443..b2fa00c5c1d 100644 --- a/src/core/iomgr/socket_utils_posix.c +++ b/src/core/lib/iomgr/socket_utils_posix.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -35,7 +35,7 @@ #ifdef GPR_POSIX_SOCKETUTILS -#include "src/core/iomgr/socket_utils_posix.h" +#include "src/core/lib/iomgr/socket_utils_posix.h" #include #include diff --git a/src/core/iomgr/socket_utils_posix.h b/src/core/lib/iomgr/socket_utils_posix.h similarity index 88% rename from src/core/iomgr/socket_utils_posix.h rename to src/core/lib/iomgr/socket_utils_posix.h index d330d1986eb..f73ad6317db 100644 --- a/src/core/iomgr/socket_utils_posix.h +++ b/src/core/lib/iomgr/socket_utils_posix.h @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,11 +31,11 @@ * */ -#ifndef GRPC_INTERNAL_CORE_IOMGR_SOCKET_UTILS_POSIX_H -#define GRPC_INTERNAL_CORE_IOMGR_SOCKET_UTILS_POSIX_H +#ifndef GRPC_CORE_LIB_IOMGR_SOCKET_UTILS_POSIX_H +#define GRPC_CORE_LIB_IOMGR_SOCKET_UTILS_POSIX_H -#include #include +#include /* a wrapper for accept or accept4 */ int grpc_accept4(int sockfd, struct sockaddr *addr, socklen_t *addrlen, @@ -68,6 +68,16 @@ int grpc_ipv6_loopback_available(void); If SO_NO_SIGPIPE is not available, returns 1. */ int grpc_set_socket_no_sigpipe_if_possible(int fd); +/* Tries to set IP_PKTINFO if available on this platform. + Returns 1 on success, 0 on failure. + If IP_PKTINFO is not available, returns 1. */ +int grpc_set_socket_ip_pktinfo_if_possible(int fd); + +/* Tries to set IPV6_RECVPKTINFO if available on this platform. + Returns 1 on success, 0 on failure. + If IPV6_RECVPKTINFO is not available, returns 1. */ +int grpc_set_socket_ipv6_recvpktinfo_if_possible(int fd); + /* An enum to keep track of IPv4/IPv6 socket modes. Currently, this information is only used when a socket is first created, but @@ -110,4 +120,4 @@ extern int grpc_forbid_dualstack_sockets_for_testing; int grpc_create_dualstack_socket(const struct sockaddr *addr, int type, int protocol, grpc_dualstack_mode *dsmode); -#endif /* GRPC_INTERNAL_CORE_IOMGR_SOCKET_UTILS_POSIX_H */ +#endif /* GRPC_CORE_LIB_IOMGR_SOCKET_UTILS_POSIX_H */ diff --git a/src/core/iomgr/socket_windows.c b/src/core/lib/iomgr/socket_windows.c similarity index 92% rename from src/core/iomgr/socket_windows.c rename to src/core/lib/iomgr/socket_windows.c index fafb7b6622b..1023a6d4f89 100644 --- a/src/core/iomgr/socket_windows.c +++ b/src/core/lib/iomgr/socket_windows.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -36,6 +36,8 @@ #ifdef GPR_WINSOCK_SOCKET #include + +// must be included after winsock2.h #include #include @@ -43,11 +45,11 @@ #include #include -#include "src/core/iomgr/iocp_windows.h" -#include "src/core/iomgr/iomgr_internal.h" -#include "src/core/iomgr/pollset.h" -#include "src/core/iomgr/pollset_windows.h" -#include "src/core/iomgr/socket_windows.h" +#include "src/core/lib/iomgr/iocp_windows.h" +#include "src/core/lib/iomgr/iomgr_internal.h" +#include "src/core/lib/iomgr/pollset.h" +#include "src/core/lib/iomgr/pollset_windows.h" +#include "src/core/lib/iomgr/socket_windows.h" grpc_winsocket *grpc_winsocket_create(SOCKET socket, const char *name) { char *final_name; diff --git a/src/core/iomgr/socket_windows.h b/src/core/lib/iomgr/socket_windows.h similarity index 94% rename from src/core/iomgr/socket_windows.h rename to src/core/lib/iomgr/socket_windows.h index dfbfabe1f93..74447896c93 100644 --- a/src/core/iomgr/socket_windows.h +++ b/src/core/lib/iomgr/socket_windows.h @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,17 +31,17 @@ * */ -#ifndef GRPC_INTERNAL_CORE_IOMGR_SOCKET_WINDOWS_H -#define GRPC_INTERNAL_CORE_IOMGR_SOCKET_WINDOWS_H +#ifndef GRPC_CORE_LIB_IOMGR_SOCKET_WINDOWS_H +#define GRPC_CORE_LIB_IOMGR_SOCKET_WINDOWS_H #include #include -#include #include +#include -#include "src/core/iomgr/iomgr_internal.h" -#include "src/core/iomgr/exec_ctx.h" +#include "src/core/lib/iomgr/exec_ctx.h" +#include "src/core/lib/iomgr/iomgr_internal.h" /* This holds the data for an outstanding read or write on a socket. The mutex to protect the concurrent access to that data is the one @@ -108,4 +108,4 @@ void grpc_winsocket_shutdown(grpc_winsocket *socket); /* Destroy a socket. Should only be called if there's no pending operation. */ void grpc_winsocket_destroy(grpc_winsocket *socket); -#endif /* GRPC_INTERNAL_CORE_IOMGR_SOCKET_WINDOWS_H */ +#endif /* GRPC_CORE_LIB_IOMGR_SOCKET_WINDOWS_H */ diff --git a/src/core/iomgr/tcp_client.h b/src/core/lib/iomgr/tcp_client.h similarity index 88% rename from src/core/iomgr/tcp_client.h rename to src/core/lib/iomgr/tcp_client.h index 5e18e71ca2f..6bbe26445a0 100644 --- a/src/core/iomgr/tcp_client.h +++ b/src/core/lib/iomgr/tcp_client.h @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,13 +31,13 @@ * */ -#ifndef GRPC_INTERNAL_CORE_IOMGR_TCP_CLIENT_H -#define GRPC_INTERNAL_CORE_IOMGR_TCP_CLIENT_H +#ifndef GRPC_CORE_LIB_IOMGR_TCP_CLIENT_H +#define GRPC_CORE_LIB_IOMGR_TCP_CLIENT_H -#include "src/core/iomgr/endpoint.h" -#include "src/core/iomgr/pollset_set.h" -#include "src/core/iomgr/sockaddr.h" #include +#include "src/core/lib/iomgr/endpoint.h" +#include "src/core/lib/iomgr/pollset_set.h" +#include "src/core/lib/iomgr/sockaddr.h" /* Asynchronously connect to an address (specified as (addr, len)), and call cb with arg and the completed connection when done (or call cb with arg and @@ -50,4 +50,4 @@ void grpc_tcp_client_connect(grpc_exec_ctx *exec_ctx, grpc_closure *on_connect, const struct sockaddr *addr, size_t addr_len, gpr_timespec deadline); -#endif /* GRPC_INTERNAL_CORE_IOMGR_TCP_CLIENT_H */ +#endif /* GRPC_CORE_LIB_IOMGR_TCP_CLIENT_H */ diff --git a/src/core/iomgr/tcp_client_posix.c b/src/core/lib/iomgr/tcp_client_posix.c similarity index 94% rename from src/core/iomgr/tcp_client_posix.c rename to src/core/lib/iomgr/tcp_client_posix.c index 15727856abf..b8ef643298a 100644 --- a/src/core/iomgr/tcp_client_posix.c +++ b/src/core/lib/iomgr/tcp_client_posix.c @@ -35,7 +35,7 @@ #ifdef GPR_POSIX_SOCKET -#include "src/core/iomgr/tcp_client.h" +#include "src/core/lib/iomgr/tcp_client.h" #include #include @@ -47,14 +47,15 @@ #include #include -#include "src/core/iomgr/iomgr_posix.h" -#include "src/core/iomgr/pollset_posix.h" -#include "src/core/iomgr/pollset_set_posix.h" -#include "src/core/iomgr/sockaddr_utils.h" -#include "src/core/iomgr/socket_utils_posix.h" -#include "src/core/iomgr/tcp_posix.h" -#include "src/core/iomgr/timer.h" -#include "src/core/support/string.h" +#include "src/core/lib/iomgr/iomgr_posix.h" +#include "src/core/lib/iomgr/pollset_posix.h" +#include "src/core/lib/iomgr/pollset_set_posix.h" +#include "src/core/lib/iomgr/sockaddr_utils.h" +#include "src/core/lib/iomgr/socket_utils_posix.h" +#include "src/core/lib/iomgr/tcp_posix.h" +#include "src/core/lib/iomgr/timer.h" +#include "src/core/lib/iomgr/unix_sockets_posix.h" +#include "src/core/lib/support/string.h" extern int grpc_tcp_trace; @@ -77,13 +78,12 @@ static int prepare_socket(const struct sockaddr *addr, int fd) { } if (!grpc_set_socket_nonblocking(fd, 1) || !grpc_set_socket_cloexec(fd, 1) || - (addr->sa_family != AF_UNIX && !grpc_set_socket_low_latency(fd, 1)) || + (!grpc_is_unix_socket(addr) && !grpc_set_socket_low_latency(fd, 1)) || !grpc_set_socket_no_sigpipe_if_possible(fd)) { gpr_log(GPR_ERROR, "Unable to configure socket %d: %s", fd, strerror(errno)); goto error; } - return 1; error: diff --git a/src/core/iomgr/tcp_client_windows.c b/src/core/lib/iomgr/tcp_client_windows.c similarity index 95% rename from src/core/iomgr/tcp_client_windows.c rename to src/core/lib/iomgr/tcp_client_windows.c index 689c6f7b104..86b8d589759 100644 --- a/src/core/iomgr/tcp_client_windows.c +++ b/src/core/lib/iomgr/tcp_client_windows.c @@ -35,7 +35,7 @@ #ifdef GPR_WINSOCK_SOCKET -#include "src/core/iomgr/sockaddr_win32.h" +#include "src/core/lib/iomgr/sockaddr_win32.h" #include #include @@ -43,13 +43,13 @@ #include #include -#include "src/core/iomgr/timer.h" -#include "src/core/iomgr/iocp_windows.h" -#include "src/core/iomgr/tcp_client.h" -#include "src/core/iomgr/tcp_windows.h" -#include "src/core/iomgr/sockaddr.h" -#include "src/core/iomgr/sockaddr_utils.h" -#include "src/core/iomgr/socket_windows.h" +#include "src/core/lib/iomgr/iocp_windows.h" +#include "src/core/lib/iomgr/sockaddr.h" +#include "src/core/lib/iomgr/sockaddr_utils.h" +#include "src/core/lib/iomgr/socket_windows.h" +#include "src/core/lib/iomgr/tcp_client.h" +#include "src/core/lib/iomgr/tcp_windows.h" +#include "src/core/lib/iomgr/timer.h" typedef struct { grpc_closure *on_done; diff --git a/src/core/iomgr/tcp_posix.c b/src/core/lib/iomgr/tcp_posix.c similarity index 97% rename from src/core/iomgr/tcp_posix.c rename to src/core/lib/iomgr/tcp_posix.c index f74eb3fe511..1898d96901d 100644 --- a/src/core/iomgr/tcp_posix.c +++ b/src/core/lib/iomgr/tcp_posix.c @@ -35,7 +35,7 @@ #ifdef GPR_POSIX_SOCKET -#include "src/core/iomgr/tcp_posix.h" +#include "src/core/lib/iomgr/tcp_posix.h" #include #include @@ -51,11 +51,11 @@ #include #include -#include "src/core/debug/trace.h" -#include "src/core/iomgr/pollset_posix.h" -#include "src/core/iomgr/pollset_set_posix.h" -#include "src/core/profiling/timers.h" -#include "src/core/support/string.h" +#include "src/core/lib/debug/trace.h" +#include "src/core/lib/iomgr/pollset_posix.h" +#include "src/core/lib/iomgr/pollset_set_posix.h" +#include "src/core/lib/profiling/timers.h" +#include "src/core/lib/support/string.h" #ifdef GPR_HAVE_MSG_NOSIGNAL #define SENDMSG_FLAGS MSG_NOSIGNAL @@ -297,7 +297,7 @@ static flush_result tcp_flush(grpc_tcp *tcp) { unwind_slice_idx = tcp->outgoing_slice_idx; unwind_byte_idx = tcp->outgoing_byte_idx; for (iov_size = 0; tcp->outgoing_slice_idx != tcp->outgoing_buffer->count && - iov_size != MAX_WRITE_IOVEC; + iov_size != MAX_WRITE_IOVEC; iov_size++) { iov[iov_size].iov_base = GPR_SLICE_START_PTR( @@ -446,7 +446,7 @@ static char *tcp_get_peer(grpc_endpoint *ep) { } static const grpc_endpoint_vtable vtable = { - tcp_read, tcp_write, tcp_add_to_pollset, tcp_add_to_pollset_set, + tcp_read, tcp_write, tcp_add_to_pollset, tcp_add_to_pollset_set, tcp_shutdown, tcp_destroy, tcp_get_peer}; grpc_endpoint *grpc_tcp_create(grpc_fd *em_fd, size_t slice_size, diff --git a/src/core/iomgr/tcp_posix.h b/src/core/lib/iomgr/tcp_posix.h similarity index 92% rename from src/core/iomgr/tcp_posix.h rename to src/core/lib/iomgr/tcp_posix.h index 2a40cdd3859..09c4436f1ff 100644 --- a/src/core/iomgr/tcp_posix.h +++ b/src/core/lib/iomgr/tcp_posix.h @@ -31,8 +31,8 @@ * */ -#ifndef GRPC_INTERNAL_CORE_IOMGR_TCP_POSIX_H -#define GRPC_INTERNAL_CORE_IOMGR_TCP_POSIX_H +#ifndef GRPC_CORE_LIB_IOMGR_TCP_POSIX_H +#define GRPC_CORE_LIB_IOMGR_TCP_POSIX_H /* Low level TCP "bottom half" implementation, for use by transports built on top of a TCP connection. @@ -44,8 +44,8 @@ otherwise specified. */ -#include "src/core/iomgr/endpoint.h" -#include "src/core/iomgr/fd_posix.h" +#include "src/core/lib/iomgr/endpoint.h" +#include "src/core/lib/iomgr/fd_posix.h" #define GRPC_TCP_DEFAULT_READ_SLICE_SIZE 8192 @@ -68,4 +68,4 @@ int grpc_tcp_fd(grpc_endpoint *ep); void grpc_tcp_destroy_and_release_fd(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep, int *fd, grpc_closure *done); -#endif /* GRPC_INTERNAL_CORE_IOMGR_TCP_POSIX_H */ +#endif /* GRPC_CORE_LIB_IOMGR_TCP_POSIX_H */ diff --git a/src/core/iomgr/tcp_server.h b/src/core/lib/iomgr/tcp_server.h similarity index 95% rename from src/core/iomgr/tcp_server.h rename to src/core/lib/iomgr/tcp_server.h index a39dd3bafce..81edb61997e 100644 --- a/src/core/iomgr/tcp_server.h +++ b/src/core/lib/iomgr/tcp_server.h @@ -31,11 +31,11 @@ * */ -#ifndef GRPC_INTERNAL_CORE_IOMGR_TCP_SERVER_H -#define GRPC_INTERNAL_CORE_IOMGR_TCP_SERVER_H +#ifndef GRPC_CORE_LIB_IOMGR_TCP_SERVER_H +#define GRPC_CORE_LIB_IOMGR_TCP_SERVER_H -#include "src/core/iomgr/closure.h" -#include "src/core/iomgr/endpoint.h" +#include "src/core/lib/iomgr/closure.h" +#include "src/core/lib/iomgr/endpoint.h" /* Forward decl of grpc_tcp_server */ typedef struct grpc_tcp_server grpc_tcp_server; @@ -100,4 +100,4 @@ void grpc_tcp_server_shutdown_starting_add(grpc_tcp_server *s, a call (exec_ctx!=NULL) to shutdown_complete. */ void grpc_tcp_server_unref(grpc_exec_ctx *exec_ctx, grpc_tcp_server *s); -#endif /* GRPC_INTERNAL_CORE_IOMGR_TCP_SERVER_H */ +#endif /* GRPC_CORE_LIB_IOMGR_TCP_SERVER_H */ diff --git a/src/core/iomgr/tcp_server_posix.c b/src/core/lib/iomgr/tcp_server_posix.c similarity index 93% rename from src/core/iomgr/tcp_server_posix.c rename to src/core/lib/iomgr/tcp_server_posix.c index 5e07f8261c2..ef1bf9aa94e 100644 --- a/src/core/iomgr/tcp_server_posix.c +++ b/src/core/lib/iomgr/tcp_server_posix.c @@ -40,7 +40,7 @@ #ifdef GPR_POSIX_SOCKET -#include "src/core/iomgr/tcp_server.h" +#include "src/core/lib/iomgr/tcp_server.h" #include #include @@ -52,20 +52,20 @@ #include #include #include -#include #include -#include "src/core/iomgr/pollset_posix.h" -#include "src/core/iomgr/resolve_address.h" -#include "src/core/iomgr/sockaddr_utils.h" -#include "src/core/iomgr/socket_utils_posix.h" -#include "src/core/iomgr/tcp_posix.h" -#include "src/core/support/string.h" #include #include #include #include #include +#include "src/core/lib/iomgr/pollset_posix.h" +#include "src/core/lib/iomgr/resolve_address.h" +#include "src/core/lib/iomgr/sockaddr_utils.h" +#include "src/core/lib/iomgr/socket_utils_posix.h" +#include "src/core/lib/iomgr/tcp_posix.h" +#include "src/core/lib/iomgr/unix_sockets_posix.h" +#include "src/core/lib/support/string.h" #define MIN_SAFE_ACCEPT_QUEUE_SIZE 100 @@ -81,7 +81,6 @@ struct grpc_tcp_listener { union { uint8_t untyped[GRPC_MAX_SOCKADDR_SIZE]; struct sockaddr sockaddr; - struct sockaddr_un un; } addr; size_t addr_len; int port; @@ -98,14 +97,6 @@ struct grpc_tcp_listener { int is_sibling; }; -static void unlink_if_unix_domain_socket(const struct sockaddr_un *un) { - struct stat st; - - if (stat(un->sun_path, &st) == 0 && (st.st_mode & S_IFMT) == S_IFSOCK) { - unlink(un->sun_path); - } -} - /* the overall server */ struct grpc_tcp_server { gpr_refcount refs; @@ -203,9 +194,7 @@ static void deactivated_all_ports(grpc_exec_ctx *exec_ctx, grpc_tcp_server *s) { if (s->head) { grpc_tcp_listener *sp; for (sp = s->head; sp; sp = sp->next) { - if (sp->addr.sockaddr.sa_family == AF_UNIX) { - unlink_if_unix_domain_socket(&sp->addr.un); - } + grpc_unlink_if_unix_domain_socket(&sp->addr.sockaddr); sp->destroyed_closure.cb = destroyed_port; sp->destroyed_closure.cb_arg = s; grpc_fd_orphan(exec_ctx, sp->emfd, &sp->destroyed_closure, NULL, @@ -281,7 +270,7 @@ static int prepare_socket(int fd, const struct sockaddr *addr, } if (!grpc_set_socket_nonblocking(fd, 1) || !grpc_set_socket_cloexec(fd, 1) || - (addr->sa_family != AF_UNIX && (!grpc_set_socket_low_latency(fd, 1) || + (!grpc_is_unix_socket(addr) && (!grpc_set_socket_low_latency(fd, 1) || !grpc_set_socket_reuse_addr(fd, 1))) || !grpc_set_socket_no_sigpipe_if_possible(fd)) { gpr_log(GPR_ERROR, "Unable to configure socket %d: %s", fd, @@ -451,9 +440,7 @@ int grpc_tcp_server_add_port(grpc_tcp_server *s, const void *addr, if (s->tail != NULL) { port_index = s->tail->port_index + 1; } - if (((struct sockaddr *)addr)->sa_family == AF_UNIX) { - unlink_if_unix_domain_socket(addr); - } + grpc_unlink_if_unix_domain_socket((struct sockaddr *)addr); /* Check if this is a wildcard port, and if so, try to keep the port the same as some previously created listener. */ @@ -499,7 +486,6 @@ int grpc_tcp_server_add_port(grpc_tcp_server *s, const void *addr, /* If we didn't get a dualstack socket, also listen on 0.0.0.0. */ if (port == 0 && sp != NULL) { grpc_sockaddr_set_port((struct sockaddr *)&wild4, sp->port); - sp2 = sp; } addr = (struct sockaddr *)&wild4; addr_len = sizeof(wild4); @@ -508,16 +494,18 @@ int grpc_tcp_server_add_port(grpc_tcp_server *s, const void *addr, fd = grpc_create_dualstack_socket(addr, SOCK_STREAM, 0, &dsmode); if (fd < 0) { gpr_log(GPR_ERROR, "Unable to create socket: %s", strerror(errno)); - } - if (dsmode == GRPC_DSMODE_IPV4 && - grpc_sockaddr_is_v4mapped(addr, &addr4_copy)) { - addr = (struct sockaddr *)&addr4_copy; - addr_len = sizeof(addr4_copy); - } - sp = add_socket_to_server(s, fd, addr, addr_len, port_index, fd_index); - if (sp2 != NULL && sp != NULL) { - sp2->sibling = sp; - sp->is_sibling = 1; + } else { + if (dsmode == GRPC_DSMODE_IPV4 && + grpc_sockaddr_is_v4mapped(addr, &addr4_copy)) { + addr = (struct sockaddr *)&addr4_copy; + addr_len = sizeof(addr4_copy); + } + sp2 = sp; + sp = add_socket_to_server(s, fd, addr, addr_len, port_index, fd_index); + if (sp2 != NULL && sp != NULL) { + sp2->sibling = sp; + sp->is_sibling = 1; + } } done: diff --git a/src/core/iomgr/tcp_server_windows.c b/src/core/lib/iomgr/tcp_server_windows.c similarity index 98% rename from src/core/iomgr/tcp_server_windows.c rename to src/core/lib/iomgr/tcp_server_windows.c index a4abc5b9743..3d6a29b2e24 100644 --- a/src/core/iomgr/tcp_server_windows.c +++ b/src/core/lib/iomgr/tcp_server_windows.c @@ -37,7 +37,7 @@ #include -#include "src/core/iomgr/sockaddr_utils.h" +#include "src/core/lib/iomgr/sockaddr_utils.h" #include #include @@ -46,11 +46,11 @@ #include #include -#include "src/core/iomgr/iocp_windows.h" -#include "src/core/iomgr/pollset_windows.h" -#include "src/core/iomgr/socket_windows.h" -#include "src/core/iomgr/tcp_server.h" -#include "src/core/iomgr/tcp_windows.h" +#include "src/core/lib/iomgr/iocp_windows.h" +#include "src/core/lib/iomgr/pollset_windows.h" +#include "src/core/lib/iomgr/socket_windows.h" +#include "src/core/lib/iomgr/tcp_server.h" +#include "src/core/lib/iomgr/tcp_windows.h" #define MIN_SAFE_ACCEPT_QUEUE_SIZE 100 diff --git a/src/core/iomgr/tcp_windows.c b/src/core/lib/iomgr/tcp_windows.c similarity index 94% rename from src/core/iomgr/tcp_windows.c rename to src/core/lib/iomgr/tcp_windows.c index 038e4158c89..c1ce725f2c8 100644 --- a/src/core/iomgr/tcp_windows.c +++ b/src/core/lib/iomgr/tcp_windows.c @@ -35,7 +35,7 @@ #ifdef GPR_WINSOCK_SOCKET -#include "src/core/iomgr/sockaddr_win32.h" +#include "src/core/lib/iomgr/sockaddr_win32.h" #include #include @@ -44,12 +44,12 @@ #include #include -#include "src/core/iomgr/timer.h" -#include "src/core/iomgr/iocp_windows.h" -#include "src/core/iomgr/sockaddr.h" -#include "src/core/iomgr/sockaddr_utils.h" -#include "src/core/iomgr/socket_windows.h" -#include "src/core/iomgr/tcp_client.h" +#include "src/core/lib/iomgr/iocp_windows.h" +#include "src/core/lib/iomgr/sockaddr.h" +#include "src/core/lib/iomgr/sockaddr_utils.h" +#include "src/core/lib/iomgr/socket_windows.h" +#include "src/core/lib/iomgr/tcp_client.h" +#include "src/core/lib/iomgr/timer.h" static int set_non_block(SOCKET sock) { int status; @@ -146,8 +146,8 @@ static void on_read(grpc_exec_ctx *exec_ctx, void *tcpp, bool success) { grpc_winsocket_callback_info *info = &socket->read_info; if (success) { - if (socket->read_info.wsa_error != 0 && !tcp->shutting_down) { - if (socket->read_info.wsa_error != WSAECONNRESET) { + if (info->wsa_error != 0 && !tcp->shutting_down) { + if (info->wsa_error != WSAECONNRESET) { char *utf8_message = gpr_format_message(info->wsa_error); gpr_log(GPR_ERROR, "ReadFile overlapped error: %s", utf8_message); gpr_free(utf8_message); @@ -306,7 +306,7 @@ static void win_write(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep, ok = true; GPR_ASSERT(bytes_sent == tcp->write_slices->length); } else { - if (socket->read_info.wsa_error != WSAECONNRESET) { + if (info->wsa_error != WSAECONNRESET) { char *utf8_message = gpr_format_message(info->wsa_error); gpr_log(GPR_ERROR, "WSASend error: %s", utf8_message); gpr_free(utf8_message); @@ -382,9 +382,9 @@ static char *win_get_peer(grpc_endpoint *ep) { return gpr_strdup(tcp->peer_string); } -static grpc_endpoint_vtable vtable = {win_read, win_write, win_add_to_pollset, - win_add_to_pollset_set, win_shutdown, - win_destroy, win_get_peer}; +static grpc_endpoint_vtable vtable = { + win_read, win_write, win_add_to_pollset, win_add_to_pollset_set, + win_shutdown, win_destroy, win_get_peer}; grpc_endpoint *grpc_tcp_create(grpc_winsocket *socket, char *peer_string) { grpc_tcp *tcp = (grpc_tcp *)gpr_malloc(sizeof(grpc_tcp)); diff --git a/src/core/iomgr/tcp_windows.h b/src/core/lib/iomgr/tcp_windows.h similarity index 88% rename from src/core/iomgr/tcp_windows.h rename to src/core/lib/iomgr/tcp_windows.h index deb3e48293c..7a9ebd85eb6 100644 --- a/src/core/iomgr/tcp_windows.h +++ b/src/core/lib/iomgr/tcp_windows.h @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,8 +31,8 @@ * */ -#ifndef GRPC_INTERNAL_CORE_IOMGR_TCP_WINDOWS_H -#define GRPC_INTERNAL_CORE_IOMGR_TCP_WINDOWS_H +#ifndef GRPC_CORE_LIB_IOMGR_TCP_WINDOWS_H +#define GRPC_CORE_LIB_IOMGR_TCP_WINDOWS_H /* Low level TCP "bottom half" implementation, for use by transports built on top of a TCP connection. @@ -44,8 +44,8 @@ otherwise specified. */ -#include "src/core/iomgr/endpoint.h" -#include "src/core/iomgr/socket_windows.h" +#include "src/core/lib/iomgr/endpoint.h" +#include "src/core/lib/iomgr/socket_windows.h" /* Create a tcp endpoint given a winsock handle. * Takes ownership of the handle. @@ -54,4 +54,4 @@ grpc_endpoint *grpc_tcp_create(grpc_winsocket *socket, char *peer_string); int grpc_tcp_prepare_socket(SOCKET sock); -#endif /* GRPC_INTERNAL_CORE_IOMGR_TCP_WINDOWS_H */ +#endif /* GRPC_CORE_LIB_IOMGR_TCP_WINDOWS_H */ diff --git a/src/core/iomgr/time_averaged_stats.c b/src/core/lib/iomgr/time_averaged_stats.c similarity index 97% rename from src/core/iomgr/time_averaged_stats.c rename to src/core/lib/iomgr/time_averaged_stats.c index e075db43735..f24d68087ef 100644 --- a/src/core/iomgr/time_averaged_stats.c +++ b/src/core/lib/iomgr/time_averaged_stats.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,7 +31,7 @@ * */ -#include "src/core/iomgr/time_averaged_stats.h" +#include "src/core/lib/iomgr/time_averaged_stats.h" void grpc_time_averaged_stats_init(grpc_time_averaged_stats* stats, double init_avg, double regress_weight, diff --git a/src/core/iomgr/time_averaged_stats.h b/src/core/lib/iomgr/time_averaged_stats.h similarity index 95% rename from src/core/iomgr/time_averaged_stats.h rename to src/core/lib/iomgr/time_averaged_stats.h index 4e9e3956c28..4a662e17ec6 100644 --- a/src/core/iomgr/time_averaged_stats.h +++ b/src/core/lib/iomgr/time_averaged_stats.h @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,8 +31,8 @@ * */ -#ifndef GRPC_INTERNAL_CORE_IOMGR_TIME_AVERAGED_STATS_H -#define GRPC_INTERNAL_CORE_IOMGR_TIME_AVERAGED_STATS_H +#ifndef GRPC_CORE_LIB_IOMGR_TIME_AVERAGED_STATS_H +#define GRPC_CORE_LIB_IOMGR_TIME_AVERAGED_STATS_H /* This tracks a time-decaying weighted average. It works by collecting batches of samples and then mixing their average into a time-decaying @@ -85,4 +85,4 @@ void grpc_time_averaged_stats_add_sample(grpc_time_averaged_stats* stats, value. */ double grpc_time_averaged_stats_update_average(grpc_time_averaged_stats* stats); -#endif /* GRPC_INTERNAL_CORE_IOMGR_TIME_AVERAGED_STATS_H */ +#endif /* GRPC_CORE_LIB_IOMGR_TIME_AVERAGED_STATS_H */ diff --git a/src/core/iomgr/timer.c b/src/core/lib/iomgr/timer.c similarity index 98% rename from src/core/iomgr/timer.c rename to src/core/lib/iomgr/timer.c index f444643428d..4748f9b2702 100644 --- a/src/core/iomgr/timer.c +++ b/src/core/lib/iomgr/timer.c @@ -31,13 +31,13 @@ * */ -#include "src/core/iomgr/timer.h" +#include "src/core/lib/iomgr/timer.h" #include #include #include -#include "src/core/iomgr/time_averaged_stats.h" -#include "src/core/iomgr/timer_heap.h" +#include "src/core/lib/iomgr/time_averaged_stats.h" +#include "src/core/lib/iomgr/timer_heap.h" #define INVALID_HEAP_INDEX 0xffffffffu diff --git a/src/core/iomgr/timer.h b/src/core/lib/iomgr/timer.h similarity index 95% rename from src/core/iomgr/timer.h rename to src/core/lib/iomgr/timer.h index e239e884e7b..54f301c5ed0 100644 --- a/src/core/iomgr/timer.h +++ b/src/core/lib/iomgr/timer.h @@ -31,13 +31,13 @@ * */ -#ifndef GRPC_INTERNAL_CORE_IOMGR_TIMER_H -#define GRPC_INTERNAL_CORE_IOMGR_TIMER_H +#ifndef GRPC_CORE_LIB_IOMGR_TIMER_H +#define GRPC_CORE_LIB_IOMGR_TIMER_H -#include "src/core/iomgr/iomgr.h" -#include "src/core/iomgr/exec_ctx.h" #include #include +#include "src/core/lib/iomgr/exec_ctx.h" +#include "src/core/lib/iomgr/iomgr.h" typedef struct grpc_timer { gpr_timespec deadline; @@ -105,4 +105,4 @@ void grpc_timer_list_shutdown(grpc_exec_ctx *exec_ctx); void grpc_kick_poller(void); -#endif /* GRPC_INTERNAL_CORE_IOMGR_TIMER_H */ +#endif /* GRPC_CORE_LIB_IOMGR_TIMER_H */ diff --git a/src/core/iomgr/timer_heap.c b/src/core/lib/iomgr/timer_heap.c similarity index 99% rename from src/core/iomgr/timer_heap.c rename to src/core/lib/iomgr/timer_heap.c index b5df566c453..d43b6ccf75e 100644 --- a/src/core/iomgr/timer_heap.c +++ b/src/core/lib/iomgr/timer_heap.c @@ -31,7 +31,7 @@ * */ -#include "src/core/iomgr/timer_heap.h" +#include "src/core/lib/iomgr/timer_heap.h" #include diff --git a/src/core/iomgr/timer_heap.h b/src/core/lib/iomgr/timer_heap.h similarity index 91% rename from src/core/iomgr/timer_heap.h rename to src/core/lib/iomgr/timer_heap.h index 2d220f16774..d5112cf0dea 100644 --- a/src/core/iomgr/timer_heap.h +++ b/src/core/lib/iomgr/timer_heap.h @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,10 +31,10 @@ * */ -#ifndef GRPC_INTERNAL_CORE_IOMGR_TIMER_HEAP_H -#define GRPC_INTERNAL_CORE_IOMGR_TIMER_HEAP_H +#ifndef GRPC_CORE_LIB_IOMGR_TIMER_HEAP_H +#define GRPC_CORE_LIB_IOMGR_TIMER_HEAP_H -#include "src/core/iomgr/timer.h" +#include "src/core/lib/iomgr/timer.h" typedef struct { grpc_timer **timers; @@ -54,4 +54,4 @@ void grpc_timer_heap_pop(grpc_timer_heap *heap); int grpc_timer_heap_is_empty(grpc_timer_heap *heap); -#endif /* GRPC_INTERNAL_CORE_IOMGR_TIMER_HEAP_H */ +#endif /* GRPC_CORE_LIB_IOMGR_TIMER_HEAP_H */ diff --git a/src/core/iomgr/udp_server.c b/src/core/lib/iomgr/udp_server.c similarity index 91% rename from src/core/iomgr/udp_server.c rename to src/core/lib/iomgr/udp_server.c index ef548cfe4db..9068109c3a0 100644 --- a/src/core/iomgr/udp_server.c +++ b/src/core/lib/iomgr/udp_server.c @@ -41,7 +41,7 @@ #ifdef GRPC_NEED_UDP #ifdef GPR_POSIX_SOCKET -#include "src/core/iomgr/udp_server.h" +#include "src/core/lib/iomgr/udp_server.h" #include #include @@ -52,20 +52,21 @@ #include #include #include -#include #include -#include "src/core/iomgr/fd_posix.h" -#include "src/core/iomgr/pollset_posix.h" -#include "src/core/iomgr/resolve_address.h" -#include "src/core/iomgr/sockaddr_utils.h" -#include "src/core/iomgr/socket_utils_posix.h" -#include "src/core/support/string.h" +#include #include #include -#include #include +#include #include +#include "src/core/lib/iomgr/fd_posix.h" +#include "src/core/lib/iomgr/pollset_posix.h" +#include "src/core/lib/iomgr/resolve_address.h" +#include "src/core/lib/iomgr/sockaddr_utils.h" +#include "src/core/lib/iomgr/socket_utils_posix.h" +#include "src/core/lib/iomgr/unix_sockets_posix.h" +#include "src/core/lib/support/string.h" #define INIT_PORT_CAP 2 @@ -77,7 +78,6 @@ typedef struct { union { uint8_t untyped[GRPC_MAX_SOCKADDR_SIZE]; struct sockaddr sockaddr; - struct sockaddr_un un; } addr; size_t addr_len; grpc_closure read_closure; @@ -85,14 +85,6 @@ typedef struct { grpc_udp_server_read_cb read_cb; } server_port; -static void unlink_if_unix_domain_socket(const struct sockaddr_un *un) { - struct stat st; - - if (stat(un->sun_path, &st) == 0 && (st.st_mode & S_IFMT) == S_IFSOCK) { - unlink(un->sun_path); - } -} - /* the overall server */ struct grpc_udp_server { gpr_mu mu; @@ -176,9 +168,7 @@ static void deactivated_all_ports(grpc_exec_ctx *exec_ctx, grpc_udp_server *s) { if (s->nports) { for (i = 0; i < s->nports; i++) { server_port *sp = &s->ports[i]; - if (sp->addr.sockaddr.sa_family == AF_UNIX) { - unlink_if_unix_domain_socket(&sp->addr.un); - } + grpc_unlink_if_unix_domain_socket(&sp->addr.sockaddr); sp->destroyed_closure.cb = destroyed_port; sp->destroyed_closure.cb_arg = s; grpc_fd_orphan(exec_ctx, sp->emfd, &sp->destroyed_closure, NULL, @@ -218,8 +208,6 @@ static int prepare_socket(int fd, const struct sockaddr *addr, size_t addr_len) { struct sockaddr_storage sockname_temp; socklen_t sockname_len; - int get_local_ip; - int rc; if (fd < 0) { goto error; @@ -230,14 +218,9 @@ static int prepare_socket(int fd, const struct sockaddr *addr, strerror(errno)); } - get_local_ip = 1; - rc = setsockopt(fd, IPPROTO_IP, IP_PKTINFO, &get_local_ip, - sizeof(get_local_ip)); - if (rc == 0 && addr->sa_family == AF_INET6) { -#if !defined(__APPLE__) - rc = setsockopt(fd, IPPROTO_IPV6, IPV6_RECVPKTINFO, &get_local_ip, - sizeof(get_local_ip)); -#endif + if (grpc_set_socket_ip_pktinfo_if_possible(fd) && + addr->sa_family == AF_INET6) { + grpc_set_socket_ipv6_recvpktinfo_if_possible(fd); } GPR_ASSERT(addr_len < ~(socklen_t)0); @@ -336,9 +319,7 @@ int grpc_udp_server_add_port(grpc_udp_server *s, const void *addr, socklen_t sockname_len; int port; - if (((struct sockaddr *)addr)->sa_family == AF_UNIX) { - unlink_if_unix_domain_socket(addr); - } + grpc_unlink_if_unix_domain_socket((struct sockaddr *)addr); /* Check if this is a wildcard port, and if so, try to keep the port the same as some previously created listener. */ diff --git a/src/core/iomgr/udp_server.h b/src/core/lib/iomgr/udp_server.h similarity index 86% rename from src/core/iomgr/udp_server.h rename to src/core/lib/iomgr/udp_server.h index a9d0489edfd..316845ad660 100644 --- a/src/core/iomgr/udp_server.h +++ b/src/core/lib/iomgr/udp_server.h @@ -31,21 +31,22 @@ * */ -#ifndef GRPC_INTERNAL_CORE_IOMGR_UDP_SERVER_H -#define GRPC_INTERNAL_CORE_IOMGR_UDP_SERVER_H +#ifndef GRPC_CORE_LIB_IOMGR_UDP_SERVER_H +#define GRPC_CORE_LIB_IOMGR_UDP_SERVER_H -#include "src/core/iomgr/endpoint.h" -#include "src/core/iomgr/fd_posix.h" +#include "src/core/lib/iomgr/endpoint.h" +#include "src/core/lib/iomgr/fd_posix.h" -/* Forward decl of grpc_server */ -typedef struct grpc_server grpc_server; +/* Forward decl of struct grpc_server */ +/* This is not typedef'ed to avoid a typedef-redefinition error */ +struct grpc_server; /* Forward decl of grpc_udp_server */ typedef struct grpc_udp_server grpc_udp_server; /* Called when data is available to read from the socket. */ typedef void (*grpc_udp_server_read_cb)(grpc_exec_ctx *exec_ctx, grpc_fd *emfd, - grpc_server *server); + struct grpc_server *server); /* Create a server, initially not bound to any ports */ grpc_udp_server *grpc_udp_server_create(void); @@ -53,7 +54,7 @@ grpc_udp_server *grpc_udp_server_create(void); /* Start listening to bound ports */ void grpc_udp_server_start(grpc_exec_ctx *exec_ctx, grpc_udp_server *udp_server, grpc_pollset **pollsets, size_t pollset_count, - grpc_server *server); + struct grpc_server *server); int grpc_udp_server_get_fd(grpc_udp_server *s, unsigned index); @@ -73,4 +74,4 @@ int grpc_udp_server_add_port(grpc_udp_server *s, const void *addr, void grpc_udp_server_destroy(grpc_exec_ctx *exec_ctx, grpc_udp_server *server, grpc_closure *on_done); -#endif /* GRPC_INTERNAL_CORE_IOMGR_UDP_SERVER_H */ +#endif /* GRPC_CORE_LIB_IOMGR_UDP_SERVER_H */ diff --git a/src/core/lib/iomgr/unix_sockets_posix.c b/src/core/lib/iomgr/unix_sockets_posix.c new file mode 100644 index 00000000000..42e44989e0c --- /dev/null +++ b/src/core/lib/iomgr/unix_sockets_posix.c @@ -0,0 +1,103 @@ +/* + * + * Copyright 2016, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include "src/core/lib/iomgr/unix_sockets_posix.h" + +#ifdef GPR_HAVE_UNIX_SOCKET + +#include +#include +#include +#include + +#include + +void grpc_create_socketpair_if_unix(int sv[2]) { + GPR_ASSERT(socketpair(AF_UNIX, SOCK_STREAM, 0, sv) == 0); +} + +grpc_resolved_addresses *grpc_resolve_unix_domain_address(const char *name) { + struct sockaddr_un *un; + + grpc_resolved_addresses *addrs = gpr_malloc(sizeof(grpc_resolved_addresses)); + addrs->naddrs = 1; + addrs->addrs = gpr_malloc(sizeof(grpc_resolved_address)); + un = (struct sockaddr_un *)addrs->addrs->addr; + un->sun_family = AF_UNIX; + strcpy(un->sun_path, name); + addrs->addrs->len = strlen(un->sun_path) + sizeof(un->sun_family) + 1; + return addrs; +} + +int grpc_is_unix_socket(const struct sockaddr *addr) { + return addr->sa_family == AF_UNIX; +} + +void grpc_unlink_if_unix_domain_socket(const struct sockaddr *addr) { + if (addr->sa_family != AF_UNIX) { + return; + } + struct sockaddr_un *un = (struct sockaddr_un *)addr; + struct stat st; + + if (stat(un->sun_path, &st) == 0 && (st.st_mode & S_IFMT) == S_IFSOCK) { + unlink(un->sun_path); + } +} + +int grpc_parse_unix(grpc_uri *uri, struct sockaddr_storage *addr, size_t *len) { + struct sockaddr_un *un = (struct sockaddr_un *)addr; + + un->sun_family = AF_UNIX; + strcpy(un->sun_path, uri->path); + *len = strlen(un->sun_path) + sizeof(un->sun_family) + 1; + + return 1; +} + +char *grpc_unix_get_default_authority(grpc_resolver_factory *factory, + grpc_uri *uri) { + return gpr_strdup("localhost"); +} + +char *grpc_sockaddr_to_uri_unix_if_possible(const struct sockaddr *addr) { + if (addr->sa_family != AF_UNIX) { + return NULL; + } + + char *result; + gpr_asprintf(&result, "unix:%s", ((struct sockaddr_un *)addr)->sun_path); + return result; +} + +#endif diff --git a/src/core/lib/iomgr/unix_sockets_posix.h b/src/core/lib/iomgr/unix_sockets_posix.h new file mode 100644 index 00000000000..752cab85a53 --- /dev/null +++ b/src/core/lib/iomgr/unix_sockets_posix.h @@ -0,0 +1,61 @@ +/* + * + * Copyright 2016, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#ifndef GRPC_CORE_LIB_IOMGR_UNIX_SOCKETS_POSIX_H +#define GRPC_CORE_LIB_IOMGR_UNIX_SOCKETS_POSIX_H + +#include + +#include + +#include "src/core/lib/client_config/resolver_factory.h" +#include "src/core/lib/client_config/uri_parser.h" +#include "src/core/lib/iomgr/resolve_address.h" +#include "src/core/lib/iomgr/sockaddr.h" + +void grpc_create_socketpair_if_unix(int sv[2]); + +grpc_resolved_addresses *grpc_resolve_unix_domain_address(const char *name); + +int grpc_is_unix_socket(const struct sockaddr *addr); + +void grpc_unlink_if_unix_domain_socket(const struct sockaddr *addr); + +int grpc_parse_unix(grpc_uri *uri, struct sockaddr_storage *addr, size_t *len); + +char *grpc_unix_get_default_authority(grpc_resolver_factory *factory, + grpc_uri *uri); + +char *grpc_sockaddr_to_uri_unix_if_possible(const struct sockaddr *addr); + +#endif /* GRPC_CORE_LIB_IOMGR_UNIX_SOCKETS_POSIX_H */ diff --git a/src/core/channel/connected_channel.h b/src/core/lib/iomgr/unix_sockets_posix_noop.c similarity index 65% rename from src/core/channel/connected_channel.h rename to src/core/lib/iomgr/unix_sockets_posix_noop.c index 95c1834bfaa..06f6ee05e71 100644 --- a/src/core/channel/connected_channel.h +++ b/src/core/lib/iomgr/unix_sockets_posix_noop.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,21 +31,31 @@ * */ -#ifndef GRPC_INTERNAL_CORE_CHANNEL_CONNECTED_CHANNEL_H -#define GRPC_INTERNAL_CORE_CHANNEL_CONNECTED_CHANNEL_H +#include "src/core/lib/iomgr/unix_sockets_posix.h" -#include "src/core/channel/channel_stack.h" +#ifndef GPR_HAVE_UNIX_SOCKET -/* A channel filter representing a channel that is on a connected transport. - This filter performs actual sending and receiving of messages. */ +void grpc_create_socketpair_if_unix(int sv[2]) {} -extern const grpc_channel_filter grpc_connected_channel_filter; +grpc_resolved_addresses *grpc_resolve_unix_domain_address(const char *name) { + return NULL; +} -/* Post construction fixup: set the transport in the connected channel. - Must be called before any call stack using this filter is used. */ -void grpc_connected_channel_bind_transport(grpc_channel_stack* channel_stack, - grpc_transport* transport); +int grpc_is_unix_socket(const struct sockaddr *addr) { return false; } -grpc_stream* grpc_connected_channel_get_stream(grpc_call_element* elem); +void grpc_unlink_if_unix_domain_socket(const struct sockaddr *addr) {} -#endif /* GRPC_INTERNAL_CORE_CHANNEL_CONNECTED_CHANNEL_H */ +int grpc_parse_unix(grpc_uri *uri, struct sockaddr_storage *addr, size_t *len) { + return 0; +} + +char *grpc_unix_get_default_authority(grpc_resolver_factory *factory, + grpc_uri *uri) { + return NULL; +} + +char *grpc_sockaddr_to_uri_unix_if_possible(const struct sockaddr *addr) { + return NULL; +} + +#endif diff --git a/src/core/iomgr/wakeup_fd_eventfd.c b/src/core/lib/iomgr/wakeup_fd_eventfd.c similarity index 95% rename from src/core/iomgr/wakeup_fd_eventfd.c rename to src/core/lib/iomgr/wakeup_fd_eventfd.c index f67379e4fcf..41ded0ca4de 100644 --- a/src/core/iomgr/wakeup_fd_eventfd.c +++ b/src/core/lib/iomgr/wakeup_fd_eventfd.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -41,8 +41,8 @@ #include -#include "src/core/iomgr/wakeup_fd_posix.h" -#include "src/core/profiling/timers.h" +#include "src/core/lib/iomgr/wakeup_fd_posix.h" +#include "src/core/lib/profiling/timers.h" static void eventfd_create(grpc_wakeup_fd* fd_info) { int efd = eventfd(0, EFD_NONBLOCK | EFD_CLOEXEC); diff --git a/src/core/iomgr/wakeup_fd_nospecial.c b/src/core/lib/iomgr/wakeup_fd_nospecial.c similarity index 95% rename from src/core/iomgr/wakeup_fd_nospecial.c rename to src/core/lib/iomgr/wakeup_fd_nospecial.c index 78d763c103a..39defa65c66 100644 --- a/src/core/iomgr/wakeup_fd_nospecial.c +++ b/src/core/lib/iomgr/wakeup_fd_nospecial.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -40,8 +40,8 @@ #ifdef GPR_POSIX_NO_SPECIAL_WAKEUP_FD -#include "src/core/iomgr/wakeup_fd_posix.h" #include +#include "src/core/lib/iomgr/wakeup_fd_posix.h" static int check_availability_invalid(void) { return 0; } diff --git a/src/core/iomgr/wakeup_fd_pipe.c b/src/core/lib/iomgr/wakeup_fd_pipe.c similarity index 91% rename from src/core/iomgr/wakeup_fd_pipe.c rename to src/core/lib/iomgr/wakeup_fd_pipe.c index 80de181d9d1..820919e4dd2 100644 --- a/src/core/iomgr/wakeup_fd_pipe.c +++ b/src/core/lib/iomgr/wakeup_fd_pipe.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -35,19 +35,24 @@ #ifdef GPR_POSIX_WAKEUP_FD -#include "src/core/iomgr/wakeup_fd_posix.h" +#include "src/core/lib/iomgr/wakeup_fd_posix.h" #include #include #include -#include "src/core/iomgr/socket_utils_posix.h" #include +#include "src/core/lib/iomgr/socket_utils_posix.h" + static void pipe_init(grpc_wakeup_fd* fd_info) { int pipefd[2]; /* TODO(klempner): Make this nonfatal */ - GPR_ASSERT(0 == pipe(pipefd)); + int r = pipe(pipefd); + if (0 != r) { + gpr_log(GPR_ERROR, "pipe creation failed (%d): %s", errno, strerror(errno)); + abort(); + } GPR_ASSERT(grpc_set_socket_nonblocking(pipefd[0], 1)); GPR_ASSERT(grpc_set_socket_nonblocking(pipefd[1], 1)); fd_info->read_fd = pipefd[0]; diff --git a/src/core/iomgr/wakeup_fd_pipe.h b/src/core/lib/iomgr/wakeup_fd_pipe.h similarity index 87% rename from src/core/iomgr/wakeup_fd_pipe.h rename to src/core/lib/iomgr/wakeup_fd_pipe.h index 01a13a97c03..bbdb1fc4486 100644 --- a/src/core/iomgr/wakeup_fd_pipe.h +++ b/src/core/lib/iomgr/wakeup_fd_pipe.h @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,11 +31,11 @@ * */ -#ifndef GRPC_INTERNAL_CORE_IOMGR_WAKEUP_FD_PIPE_H -#define GRPC_INTERNAL_CORE_IOMGR_WAKEUP_FD_PIPE_H +#ifndef GRPC_CORE_LIB_IOMGR_WAKEUP_FD_PIPE_H +#define GRPC_CORE_LIB_IOMGR_WAKEUP_FD_PIPE_H -#include "src/core/iomgr/wakeup_fd_posix.h" +#include "src/core/lib/iomgr/wakeup_fd_posix.h" extern grpc_wakeup_fd_vtable grpc_pipe_wakeup_fd_vtable; -#endif /* GRPC_INTERNAL_CORE_IOMGR_WAKEUP_FD_PIPE_H */ +#endif /* GRPC_CORE_LIB_IOMGR_WAKEUP_FD_PIPE_H */ diff --git a/src/core/iomgr/wakeup_fd_posix.c b/src/core/lib/iomgr/wakeup_fd_posix.c similarity index 95% rename from src/core/iomgr/wakeup_fd_posix.c rename to src/core/lib/iomgr/wakeup_fd_posix.c index f40be081b05..c4d174fb348 100644 --- a/src/core/iomgr/wakeup_fd_posix.c +++ b/src/core/lib/iomgr/wakeup_fd_posix.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -35,9 +35,9 @@ #ifdef GPR_POSIX_WAKEUP_FD -#include "src/core/iomgr/wakeup_fd_posix.h" -#include "src/core/iomgr/wakeup_fd_pipe.h" #include +#include "src/core/lib/iomgr/wakeup_fd_pipe.h" +#include "src/core/lib/iomgr/wakeup_fd_posix.h" static const grpc_wakeup_fd_vtable *wakeup_fd_vtable = NULL; int grpc_allow_specialized_wakeup_fd = 1; diff --git a/src/core/iomgr/wakeup_fd_posix.h b/src/core/lib/iomgr/wakeup_fd_posix.h similarity index 95% rename from src/core/iomgr/wakeup_fd_posix.h rename to src/core/lib/iomgr/wakeup_fd_posix.h index ffd60d1d4e6..20988d5fd3c 100644 --- a/src/core/iomgr/wakeup_fd_posix.h +++ b/src/core/lib/iomgr/wakeup_fd_posix.h @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -59,8 +59,8 @@ * 2. If the polling thread was awakened by a wakeup_fd event, call * grpc_wakeup_fd_consume_wakeup() on it. */ -#ifndef GRPC_INTERNAL_CORE_IOMGR_WAKEUP_FD_POSIX_H -#define GRPC_INTERNAL_CORE_IOMGR_WAKEUP_FD_POSIX_H +#ifndef GRPC_CORE_LIB_IOMGR_WAKEUP_FD_POSIX_H +#define GRPC_CORE_LIB_IOMGR_WAKEUP_FD_POSIX_H void grpc_wakeup_fd_global_init(void); void grpc_wakeup_fd_global_destroy(void); @@ -98,4 +98,4 @@ void grpc_wakeup_fd_destroy(grpc_wakeup_fd* fd_info); * wakeup_fd_nospecial.c if no such implementation exists. */ extern const grpc_wakeup_fd_vtable grpc_specialized_wakeup_fd_vtable; -#endif /* GRPC_INTERNAL_CORE_IOMGR_WAKEUP_FD_POSIX_H */ +#endif /* GRPC_CORE_LIB_IOMGR_WAKEUP_FD_POSIX_H */ diff --git a/src/core/iomgr/workqueue.h b/src/core/lib/iomgr/workqueue.h similarity index 88% rename from src/core/iomgr/workqueue.h rename to src/core/lib/iomgr/workqueue.h index 36dd1334683..9c420c57de6 100644 --- a/src/core/iomgr/workqueue.h +++ b/src/core/lib/iomgr/workqueue.h @@ -31,20 +31,20 @@ * */ -#ifndef GRPC_INTERNAL_CORE_IOMGR_WORKQUEUE_H -#define GRPC_INTERNAL_CORE_IOMGR_WORKQUEUE_H +#ifndef GRPC_CORE_LIB_IOMGR_WORKQUEUE_H +#define GRPC_CORE_LIB_IOMGR_WORKQUEUE_H -#include "src/core/iomgr/iomgr.h" -#include "src/core/iomgr/pollset.h" -#include "src/core/iomgr/closure.h" -#include "src/core/iomgr/exec_ctx.h" +#include "src/core/lib/iomgr/closure.h" +#include "src/core/lib/iomgr/exec_ctx.h" +#include "src/core/lib/iomgr/iomgr.h" +#include "src/core/lib/iomgr/pollset.h" #ifdef GPR_POSIX_SOCKET -#include "src/core/iomgr/workqueue_posix.h" +#include "src/core/lib/iomgr/workqueue_posix.h" #endif #ifdef GPR_WIN32 -#include "src/core/iomgr/workqueue_windows.h" +#include "src/core/lib/iomgr/workqueue_windows.h" #endif /* grpc_workqueue is forward declared in exec_ctx.h */ @@ -80,4 +80,4 @@ void grpc_workqueue_add_to_pollset(grpc_exec_ctx *exec_ctx, void grpc_workqueue_push(grpc_workqueue *workqueue, grpc_closure *closure, int success); -#endif +#endif /* GRPC_CORE_LIB_IOMGR_WORKQUEUE_H */ diff --git a/src/core/iomgr/workqueue_posix.c b/src/core/lib/iomgr/workqueue_posix.c similarity index 97% rename from src/core/iomgr/workqueue_posix.c rename to src/core/lib/iomgr/workqueue_posix.c index 2b42e6d4fbf..76830ef12d2 100644 --- a/src/core/iomgr/workqueue_posix.c +++ b/src/core/lib/iomgr/workqueue_posix.c @@ -35,7 +35,7 @@ #ifdef GPR_POSIX_SOCKET -#include "src/core/iomgr/workqueue.h" +#include "src/core/lib/iomgr/workqueue.h" #include @@ -43,8 +43,8 @@ #include #include -#include "src/core/iomgr/fd_posix.h" -#include "src/core/iomgr/pollset_posix.h" +#include "src/core/lib/iomgr/fd_posix.h" +#include "src/core/lib/iomgr/pollset_posix.h" static void on_readable(grpc_exec_ctx *exec_ctx, void *arg, bool success); diff --git a/src/core/iomgr/workqueue_posix.h b/src/core/lib/iomgr/workqueue_posix.h similarity index 89% rename from src/core/iomgr/workqueue_posix.h rename to src/core/lib/iomgr/workqueue_posix.h index 68f195ee0d2..956de8fb273 100644 --- a/src/core/iomgr/workqueue_posix.h +++ b/src/core/lib/iomgr/workqueue_posix.h @@ -31,10 +31,10 @@ * */ -#ifndef GRPC_INTERNAL_CORE_IOMGR_WORKQUEUE_POSIX_H -#define GRPC_INTERNAL_CORE_IOMGR_WORKQUEUE_POSIX_H +#ifndef GRPC_CORE_LIB_IOMGR_WORKQUEUE_POSIX_H +#define GRPC_CORE_LIB_IOMGR_WORKQUEUE_POSIX_H -#include "src/core/iomgr/wakeup_fd_posix.h" +#include "src/core/lib/iomgr/wakeup_fd_posix.h" struct grpc_fd; @@ -50,4 +50,4 @@ struct grpc_workqueue { grpc_closure read_closure; }; -#endif /* GRPC_INTERNAL_CORE_IOMGR_WORKQUEUE_POSIX_H */ +#endif /* GRPC_CORE_LIB_IOMGR_WORKQUEUE_POSIX_H */ diff --git a/src/core/iomgr/workqueue_windows.c b/src/core/lib/iomgr/workqueue_windows.c similarity index 95% rename from src/core/iomgr/workqueue_windows.c rename to src/core/lib/iomgr/workqueue_windows.c index f9ca57557b5..6697f93498a 100644 --- a/src/core/iomgr/workqueue_windows.c +++ b/src/core/lib/iomgr/workqueue_windows.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -35,6 +35,6 @@ #ifdef GPR_WIN32 -#include "src/core/iomgr/workqueue.h" +#include "src/core/lib/iomgr/workqueue.h" #endif /* GPR_WIN32 */ diff --git a/src/core/iomgr/workqueue_windows.h b/src/core/lib/iomgr/workqueue_windows.h similarity index 88% rename from src/core/iomgr/workqueue_windows.h rename to src/core/lib/iomgr/workqueue_windows.h index 941f195f514..8e6980b6d9f 100644 --- a/src/core/iomgr/workqueue_windows.h +++ b/src/core/lib/iomgr/workqueue_windows.h @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,7 +31,7 @@ * */ -#ifndef GRPC_INTERNAL_CORE_IOMGR_WORKQUEUE_WINDOWS_H -#define GRPC_INTERNAL_CORE_IOMGR_WORKQUEUE_WINDOWS_H +#ifndef GRPC_CORE_LIB_IOMGR_WORKQUEUE_WINDOWS_H +#define GRPC_CORE_LIB_IOMGR_WORKQUEUE_WINDOWS_H -#endif /* GRPC_INTERNAL_CORE_IOMGR_WORKQUEUE_WINDOWS_H */ +#endif /* GRPC_CORE_LIB_IOMGR_WORKQUEUE_WINDOWS_H */ diff --git a/src/core/json/json.c b/src/core/lib/json/json.c similarity index 96% rename from src/core/json/json.c rename to src/core/lib/json/json.c index 96e11eebb11..9793045d916 100644 --- a/src/core/json/json.c +++ b/src/core/lib/json/json.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -35,7 +35,7 @@ #include -#include "src/core/json/json.h" +#include "src/core/lib/json/json.h" grpc_json *grpc_json_create(grpc_json_type type) { grpc_json *json = gpr_malloc(sizeof(*json)); diff --git a/src/core/json/json.h b/src/core/lib/json/json.h similarity index 94% rename from src/core/json/json.h rename to src/core/lib/json/json.h index c4df2998c3a..41d87dd5ceb 100644 --- a/src/core/json/json.h +++ b/src/core/lib/json/json.h @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,12 +31,12 @@ * */ -#ifndef GRPC_INTERNAL_CORE_JSON_JSON_H -#define GRPC_INTERNAL_CORE_JSON_JSON_H +#ifndef GRPC_CORE_LIB_JSON_JSON_H +#define GRPC_CORE_LIB_JSON_JSON_H #include -#include "src/core/json/json_common.h" +#include "src/core/lib/json/json_common.h" /* A tree-like structure to hold json values. The key and value pointers * are not owned by it. @@ -85,4 +85,4 @@ char *grpc_json_dump_to_string(grpc_json *json, int indent); grpc_json *grpc_json_create(grpc_json_type type); void grpc_json_destroy(grpc_json *json); -#endif /* GRPC_INTERNAL_CORE_JSON_JSON_H */ +#endif /* GRPC_CORE_LIB_JSON_JSON_H */ diff --git a/src/core/json/json_common.h b/src/core/lib/json/json_common.h similarity index 91% rename from src/core/json/json_common.h rename to src/core/lib/json/json_common.h index 481695b38b8..ce980040f8c 100644 --- a/src/core/json/json_common.h +++ b/src/core/lib/json/json_common.h @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,8 +31,8 @@ * */ -#ifndef GRPC_INTERNAL_CORE_JSON_JSON_COMMON_H -#define GRPC_INTERNAL_CORE_JSON_JSON_COMMON_H +#ifndef GRPC_CORE_LIB_JSON_JSON_COMMON_H +#define GRPC_CORE_LIB_JSON_JSON_COMMON_H /* The various json types. */ typedef enum { @@ -46,4 +46,4 @@ typedef enum { GRPC_JSON_TOP_LEVEL } grpc_json_type; -#endif /* GRPC_INTERNAL_CORE_JSON_JSON_COMMON_H */ +#endif /* GRPC_CORE_LIB_JSON_JSON_COMMON_H */ diff --git a/src/core/json/json_reader.c b/src/core/lib/json/json_reader.c similarity index 99% rename from src/core/json/json_reader.c rename to src/core/lib/json/json_reader.c index 30da6f28f39..0807f029ce2 100644 --- a/src/core/json/json_reader.c +++ b/src/core/lib/json/json_reader.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -37,7 +37,7 @@ #include -#include "src/core/json/json_reader.h" +#include "src/core/lib/json/json_reader.h" static void json_reader_string_clear(grpc_json_reader *reader) { reader->vtable->string_clear(reader->userdata); diff --git a/src/core/json/json_reader.h b/src/core/lib/json/json_reader.h similarity index 96% rename from src/core/json/json_reader.h rename to src/core/lib/json/json_reader.h index 90b9f1f9fea..37a838889da 100644 --- a/src/core/json/json_reader.h +++ b/src/core/lib/json/json_reader.h @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,11 +31,11 @@ * */ -#ifndef GRPC_INTERNAL_CORE_JSON_JSON_READER_H -#define GRPC_INTERNAL_CORE_JSON_JSON_READER_H +#ifndef GRPC_CORE_LIB_JSON_JSON_READER_H +#define GRPC_CORE_LIB_JSON_JSON_READER_H #include -#include "src/core/json/json_common.h" +#include "src/core/lib/json/json_common.h" typedef enum { GRPC_JSON_STATE_OBJECT_KEY_BEGIN, @@ -157,4 +157,4 @@ void grpc_json_reader_init(grpc_json_reader *reader, */ int grpc_json_reader_is_complete(grpc_json_reader *reader); -#endif /* GRPC_INTERNAL_CORE_JSON_JSON_READER_H */ +#endif /* GRPC_CORE_LIB_JSON_JSON_READER_H */ diff --git a/src/core/json/json_string.c b/src/core/lib/json/json_string.c similarity index 98% rename from src/core/json/json_string.c rename to src/core/lib/json/json_string.c index 2bc0b513d5c..8e6f1253dc3 100644 --- a/src/core/json/json_string.c +++ b/src/core/lib/json/json_string.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,15 +31,15 @@ * */ -#include #include +#include #include #include -#include "src/core/json/json.h" -#include "src/core/json/json_reader.h" -#include "src/core/json/json_writer.h" +#include "src/core/lib/json/json.h" +#include "src/core/lib/json/json_reader.h" +#include "src/core/lib/json/json_writer.h" /* The json reader will construct a bunch of grpc_json objects and * link them all up together in a tree-like structure that will represent diff --git a/src/core/json/json_writer.c b/src/core/lib/json/json_writer.c similarity index 99% rename from src/core/json/json_writer.c rename to src/core/lib/json/json_writer.c index 326ec2d431f..d614a72fc47 100644 --- a/src/core/json/json_writer.c +++ b/src/core/lib/json/json_writer.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -35,7 +35,7 @@ #include -#include "src/core/json/json_writer.h" +#include "src/core/lib/json/json_writer.h" static void json_writer_output_char(grpc_json_writer *writer, char c) { writer->vtable->output_char(writer->userdata, c); diff --git a/src/core/json/json_writer.h b/src/core/lib/json/json_writer.h similarity index 95% rename from src/core/json/json_writer.h rename to src/core/lib/json/json_writer.h index 9ef04aab012..f90e79cd74b 100644 --- a/src/core/json/json_writer.h +++ b/src/core/lib/json/json_writer.h @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -43,12 +43,12 @@ * a valid UTF-8 string overall. */ -#ifndef GRPC_INTERNAL_CORE_JSON_JSON_WRITER_H -#define GRPC_INTERNAL_CORE_JSON_JSON_WRITER_H +#ifndef GRPC_CORE_LIB_JSON_JSON_WRITER_H +#define GRPC_CORE_LIB_JSON_JSON_WRITER_H #include -#include "src/core/json/json_common.h" +#include "src/core/lib/json/json_common.h" typedef struct grpc_json_writer_vtable { /* Adds a character to the output stream. */ @@ -94,4 +94,4 @@ void grpc_json_writer_value_raw_with_len(grpc_json_writer *writer, void grpc_json_writer_value_string(grpc_json_writer *writer, const char *string); -#endif /* GRPC_INTERNAL_CORE_JSON_JSON_WRITER_H */ +#endif /* GRPC_CORE_LIB_JSON_JSON_WRITER_H */ diff --git a/src/core/profiling/basic_timers.c b/src/core/lib/profiling/basic_timers.c similarity index 98% rename from src/core/profiling/basic_timers.c rename to src/core/lib/profiling/basic_timers.c index df32472d1c7..15a95849810 100644 --- a/src/core/profiling/basic_timers.c +++ b/src/core/lib/profiling/basic_timers.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -35,13 +35,13 @@ #ifdef GRPC_BASIC_PROFILER -#include "src/core/profiling/timers.h" +#include "src/core/lib/profiling/timers.h" #include #include -#include #include #include +#include #include typedef enum { BEGIN = '{', END = '}', MARK = '.' } marker_type; diff --git a/src/core/profiling/stap_probes.d b/src/core/lib/profiling/stap_probes.d similarity index 100% rename from src/core/profiling/stap_probes.d rename to src/core/lib/profiling/stap_probes.d diff --git a/src/core/profiling/stap_timers.c b/src/core/lib/profiling/stap_timers.c similarity index 94% rename from src/core/profiling/stap_timers.c rename to src/core/lib/profiling/stap_timers.c index efcd1af4a1c..f55c1a569ad 100644 --- a/src/core/profiling/stap_timers.c +++ b/src/core/lib/profiling/stap_timers.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -35,11 +35,11 @@ #ifdef GRPC_STAP_PROFILER -#include "src/core/profiling/timers.h" +#include "src/core/lib/profiling/timers.h" #include /* Generated from src/core/profiling/stap_probes.d */ -#include "src/core/profiling/stap_probes.h" +#include "src/core/lib/profiling/stap_probes.h" /* Latency profiler API implementation. */ void gpr_timer_add_mark(int tag, const char *tagstr, void *id, const char *file, diff --git a/src/core/profiling/timers.h b/src/core/lib/profiling/timers.h similarity index 95% rename from src/core/profiling/timers.h rename to src/core/lib/profiling/timers.h index 6a188dc5664..1303593ffbf 100644 --- a/src/core/profiling/timers.h +++ b/src/core/lib/profiling/timers.h @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,8 +31,8 @@ * */ -#ifndef GRPC_CORE_PROFILING_TIMERS_H -#define GRPC_CORE_PROFILING_TIMERS_H +#ifndef GRPC_CORE_LIB_PROFILING_TIMERS_H +#define GRPC_CORE_LIB_PROFILING_TIMERS_H #ifdef __cplusplus extern "C" { @@ -116,4 +116,4 @@ class ProfileScope { #endif #endif -#endif /* GRPC_CORE_PROFILING_TIMERS_H */ +#endif /* GRPC_CORE_LIB_PROFILING_TIMERS_H */ diff --git a/src/core/proto/grpc/lb/v0/load_balancer.pb.c b/src/core/lib/proto/grpc/lb/v0/load_balancer.pb.c similarity index 99% rename from src/core/proto/grpc/lb/v0/load_balancer.pb.c rename to src/core/lib/proto/grpc/lb/v0/load_balancer.pb.c index 59aae30cff9..8f82141f96d 100644 --- a/src/core/proto/grpc/lb/v0/load_balancer.pb.c +++ b/src/core/lib/proto/grpc/lb/v0/load_balancer.pb.c @@ -33,7 +33,7 @@ /* Automatically generated nanopb constant definitions */ /* Generated by nanopb-0.3.5-dev */ -#include "src/core/proto/grpc/lb/v0/load_balancer.pb.h" +#include "src/core/lib/proto/grpc/lb/v0/load_balancer.pb.h" #if PB_PROTO_HEADER_VERSION != 30 #error Regenerate this file with the current version of nanopb generator. diff --git a/src/core/proto/grpc/lb/v0/load_balancer.pb.h b/src/core/lib/proto/grpc/lb/v0/load_balancer.pb.h similarity index 100% rename from src/core/proto/grpc/lb/v0/load_balancer.pb.h rename to src/core/lib/proto/grpc/lb/v0/load_balancer.pb.h diff --git a/src/core/security/auth_filters.h b/src/core/lib/security/auth_filters.h similarity index 87% rename from src/core/security/auth_filters.h rename to src/core/lib/security/auth_filters.h index c179b54bec2..162b60e2c85 100644 --- a/src/core/security/auth_filters.h +++ b/src/core/lib/security/auth_filters.h @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,12 +31,12 @@ * */ -#ifndef GRPC_INTERNAL_CORE_SECURITY_AUTH_FILTERS_H -#define GRPC_INTERNAL_CORE_SECURITY_AUTH_FILTERS_H +#ifndef GRPC_CORE_LIB_SECURITY_AUTH_FILTERS_H +#define GRPC_CORE_LIB_SECURITY_AUTH_FILTERS_H -#include "src/core/channel/channel_stack.h" +#include "src/core/lib/channel/channel_stack.h" extern const grpc_channel_filter grpc_client_auth_filter; extern const grpc_channel_filter grpc_server_auth_filter; -#endif /* GRPC_INTERNAL_CORE_SECURITY_AUTH_FILTERS_H */ +#endif /* GRPC_CORE_LIB_SECURITY_AUTH_FILTERS_H */ diff --git a/src/core/security/b64.c b/src/core/lib/security/b64.c similarity index 99% rename from src/core/security/b64.c rename to src/core/lib/security/b64.c index c40b528e2f5..1d3879534c6 100644 --- a/src/core/security/b64.c +++ b/src/core/lib/security/b64.c @@ -31,7 +31,7 @@ * */ -#include "src/core/security/b64.h" +#include "src/core/lib/security/b64.h" #include #include diff --git a/src/core/security/b64.h b/src/core/lib/security/b64.h similarity index 94% rename from src/core/security/b64.h rename to src/core/lib/security/b64.h index 3e3b5211209..0bf372a1e7e 100644 --- a/src/core/security/b64.h +++ b/src/core/lib/security/b64.h @@ -31,8 +31,8 @@ * */ -#ifndef GRPC_INTERNAL_CORE_SECURITY_BASE64_H -#define GRPC_INTERNAL_CORE_SECURITY_BASE64_H +#ifndef GRPC_CORE_LIB_SECURITY_B64_H +#define GRPC_CORE_LIB_SECURITY_B64_H #include @@ -49,4 +49,4 @@ gpr_slice grpc_base64_decode(const char *b64, int url_safe); gpr_slice grpc_base64_decode_with_len(const char *b64, size_t b64_len, int url_safe); -#endif /* GRPC_INTERNAL_CORE_SECURITY_BASE64_H */ +#endif /* GRPC_CORE_LIB_SECURITY_B64_H */ diff --git a/src/core/security/client_auth_filter.c b/src/core/lib/security/client_auth_filter.c similarity index 94% rename from src/core/security/client_auth_filter.c rename to src/core/lib/security/client_auth_filter.c index 332d4259d28..af6073e5604 100644 --- a/src/core/security/client_auth_filter.c +++ b/src/core/lib/security/client_auth_filter.c @@ -31,7 +31,7 @@ * */ -#include "src/core/security/auth_filters.h" +#include "src/core/lib/security/auth_filters.h" #include @@ -39,13 +39,13 @@ #include #include -#include "src/core/channel/channel_stack.h" -#include "src/core/security/credentials.h" -#include "src/core/security/security_connector.h" -#include "src/core/security/security_context.h" -#include "src/core/support/string.h" -#include "src/core/surface/call.h" -#include "src/core/transport/static_metadata.h" +#include "src/core/lib/channel/channel_stack.h" +#include "src/core/lib/security/credentials.h" +#include "src/core/lib/security/security_connector.h" +#include "src/core/lib/security/security_context.h" +#include "src/core/lib/support/string.h" +#include "src/core/lib/surface/call.h" +#include "src/core/lib/transport/static_metadata.h" #define MAX_CREDENTIALS_METADATA_COUNT 4 @@ -172,7 +172,7 @@ static void send_security_metadata(grpc_exec_ctx *exec_ctx, calld->creds = grpc_composite_call_credentials_create(channel_call_creds, ctx->creds, NULL); if (calld->creds == NULL) { - bubble_up_error(exec_ctx, elem, GRPC_STATUS_INVALID_ARGUMENT, + bubble_up_error(exec_ctx, elem, GRPC_STATUS_INTERNAL, "Incompatible credentials set on channel and call."); return; } @@ -201,7 +201,7 @@ static void on_host_checked(grpc_exec_ctx *exec_ctx, void *user_data, char *error_msg; gpr_asprintf(&error_msg, "Invalid host %s set in :authority metadata.", grpc_mdstr_as_c_string(calld->host)); - bubble_up_error(exec_ctx, elem, GRPC_STATUS_INVALID_ARGUMENT, error_msg); + bubble_up_error(exec_ctx, elem, GRPC_STATUS_INTERNAL, error_msg); gpr_free(error_msg); } } @@ -331,6 +331,6 @@ static void destroy_channel_elem(grpc_exec_ctx *exec_ctx, const grpc_channel_filter grpc_client_auth_filter = { auth_start_transport_op, grpc_channel_next_op, sizeof(call_data), - init_call_elem, set_pollset, destroy_call_elem, sizeof(channel_data), - init_channel_elem, destroy_channel_elem, grpc_call_next_get_peer, - "client-auth"}; + init_call_elem, set_pollset, destroy_call_elem, + sizeof(channel_data), init_channel_elem, destroy_channel_elem, + grpc_call_next_get_peer, "client-auth"}; diff --git a/src/core/security/credentials.c b/src/core/lib/security/credentials.c similarity index 98% rename from src/core/security/credentials.c rename to src/core/lib/security/credentials.c index b4fa616fa7e..99a07e5c132 100644 --- a/src/core/security/credentials.c +++ b/src/core/lib/security/credentials.c @@ -31,18 +31,19 @@ * */ -#include "src/core/security/credentials.h" +#include "src/core/lib/security/credentials.h" #include #include -#include "src/core/channel/channel_args.h" -#include "src/core/channel/http_client_filter.h" -#include "src/core/httpcli/httpcli.h" -#include "src/core/iomgr/executor.h" -#include "src/core/json/json.h" -#include "src/core/support/string.h" -#include "src/core/surface/api_trace.h" +#include "src/core/lib/channel/channel_args.h" +#include "src/core/lib/channel/http_client_filter.h" +#include "src/core/lib/http/httpcli.h" +#include "src/core/lib/http/parser.h" +#include "src/core/lib/iomgr/executor.h" +#include "src/core/lib/json/json.h" +#include "src/core/lib/support/string.h" +#include "src/core/lib/surface/api_trace.h" #include #include @@ -539,7 +540,7 @@ static void oauth2_token_fetcher_destruct(grpc_call_credentials *creds) { grpc_credentials_status grpc_oauth2_token_fetcher_credentials_parse_server_response( - const grpc_httpcli_response *response, grpc_credentials_md_store **token_md, + const grpc_http_response *response, grpc_credentials_md_store **token_md, gpr_timespec *token_lifetime) { char *null_terminated_body = NULL; char *new_access_token = NULL; @@ -629,7 +630,7 @@ end: static void on_oauth2_token_fetcher_http_response( grpc_exec_ctx *exec_ctx, void *user_data, - const grpc_httpcli_response *response) { + const grpc_http_response *response) { grpc_credentials_metadata_request *r = (grpc_credentials_metadata_request *)user_data; grpc_oauth2_token_fetcher_credentials *c = @@ -706,13 +707,13 @@ static void compute_engine_fetch_oauth2( grpc_exec_ctx *exec_ctx, grpc_credentials_metadata_request *metadata_req, grpc_httpcli_context *httpcli_context, grpc_pollset *pollset, grpc_httpcli_response_cb response_cb, gpr_timespec deadline) { - grpc_httpcli_header header = {"Metadata-Flavor", "Google"}; + grpc_http_header header = {"Metadata-Flavor", "Google"}; grpc_httpcli_request request; memset(&request, 0, sizeof(grpc_httpcli_request)); request.host = GRPC_COMPUTE_ENGINE_METADATA_HOST; - request.path = GRPC_COMPUTE_ENGINE_METADATA_TOKEN_PATH; - request.hdr_count = 1; - request.hdrs = &header; + request.http.path = GRPC_COMPUTE_ENGINE_METADATA_TOKEN_PATH; + request.http.hdr_count = 1; + request.http.hdrs = &header; grpc_httpcli_get(exec_ctx, httpcli_context, pollset, &request, deadline, response_cb, metadata_req); } @@ -747,8 +748,8 @@ static void refresh_token_fetch_oauth2( grpc_httpcli_response_cb response_cb, gpr_timespec deadline) { grpc_google_refresh_token_credentials *c = (grpc_google_refresh_token_credentials *)metadata_req->creds; - grpc_httpcli_header header = {"Content-Type", - "application/x-www-form-urlencoded"}; + grpc_http_header header = {"Content-Type", + "application/x-www-form-urlencoded"}; grpc_httpcli_request request; char *body = NULL; gpr_asprintf(&body, GRPC_REFRESH_TOKEN_POST_BODY_FORMAT_STRING, @@ -756,9 +757,9 @@ static void refresh_token_fetch_oauth2( c->refresh_token.refresh_token); memset(&request, 0, sizeof(grpc_httpcli_request)); request.host = GRPC_GOOGLE_OAUTH2_SERVICE_HOST; - request.path = GRPC_GOOGLE_OAUTH2_SERVICE_TOKEN_PATH; - request.hdr_count = 1; - request.hdrs = &header; + request.http.path = GRPC_GOOGLE_OAUTH2_SERVICE_TOKEN_PATH; + request.http.hdr_count = 1; + request.http.hdrs = &header; request.handshaker = &grpc_httpcli_ssl; grpc_httpcli_post(exec_ctx, httpcli_context, pollset, &request, body, strlen(body), deadline, response_cb, metadata_req); diff --git a/src/core/security/credentials.h b/src/core/lib/security/credentials.h similarity index 96% rename from src/core/security/credentials.h rename to src/core/lib/security/credentials.h index 0de4cd94689..7168b98942d 100644 --- a/src/core/security/credentials.h +++ b/src/core/lib/security/credentials.h @@ -31,19 +31,20 @@ * */ -#ifndef GRPC_INTERNAL_CORE_SECURITY_CREDENTIALS_H -#define GRPC_INTERNAL_CORE_SECURITY_CREDENTIALS_H +#ifndef GRPC_CORE_LIB_SECURITY_CREDENTIALS_H +#define GRPC_CORE_LIB_SECURITY_CREDENTIALS_H -#include "src/core/transport/metadata_batch.h" #include #include #include +#include "src/core/lib/transport/metadata_batch.h" -#include "src/core/httpcli/httpcli.h" -#include "src/core/security/json_token.h" -#include "src/core/security/security_connector.h" +#include "src/core/lib/http/httpcli.h" +#include "src/core/lib/http/parser.h" +#include "src/core/lib/security/json_token.h" +#include "src/core/lib/security/security_connector.h" -struct grpc_httpcli_response; +struct grpc_http_response; /* --- Constants. --- */ @@ -207,7 +208,7 @@ grpc_call_credentials *grpc_credentials_contains_type( /* Exposed for testing only. */ grpc_credentials_status grpc_oauth2_token_fetcher_credentials_parse_server_response( - const struct grpc_httpcli_response *response, + const struct grpc_http_response *response, grpc_credentials_md_store **token_md, gpr_timespec *token_lifetime); void grpc_flush_cached_google_default_credentials(void); @@ -373,4 +374,4 @@ typedef struct { grpc_credentials_md_store *plugin_md; } grpc_plugin_credentials; -#endif /* GRPC_INTERNAL_CORE_SECURITY_CREDENTIALS_H */ +#endif /* GRPC_CORE_LIB_SECURITY_CREDENTIALS_H */ diff --git a/src/core/security/credentials_metadata.c b/src/core/lib/security/credentials_metadata.c similarity index 97% rename from src/core/security/credentials_metadata.c rename to src/core/lib/security/credentials_metadata.c index b8a132f1eaf..c3bfcb11b51 100644 --- a/src/core/security/credentials_metadata.c +++ b/src/core/lib/security/credentials_metadata.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,7 +31,7 @@ * */ -#include "src/core/security/credentials.h" +#include "src/core/lib/security/credentials.h" #include diff --git a/src/core/security/credentials_posix.c b/src/core/lib/security/credentials_posix.c similarity index 93% rename from src/core/security/credentials_posix.c rename to src/core/lib/security/credentials_posix.c index 0c92bd4a96b..b758cd0a1ad 100644 --- a/src/core/security/credentials_posix.c +++ b/src/core/lib/security/credentials_posix.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -35,14 +35,14 @@ #ifdef GPR_POSIX_FILE -#include "src/core/security/credentials.h" +#include "src/core/lib/security/credentials.h" #include #include #include -#include "src/core/support/env.h" -#include "src/core/support/string.h" +#include "src/core/lib/support/env.h" +#include "src/core/lib/support/string.h" char *grpc_get_well_known_google_credentials_file_path_impl(void) { char *result = NULL; diff --git a/src/core/security/credentials_win32.c b/src/core/lib/security/credentials_win32.c similarity index 93% rename from src/core/security/credentials_win32.c rename to src/core/lib/security/credentials_win32.c index 8ee9f706a1f..a225ab0d7d4 100644 --- a/src/core/security/credentials_win32.c +++ b/src/core/lib/security/credentials_win32.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -35,14 +35,14 @@ #ifdef GPR_WIN32 -#include "src/core/security/credentials.h" +#include "src/core/lib/security/credentials.h" #include #include #include -#include "src/core/support/env.h" -#include "src/core/support/string.h" +#include "src/core/lib/support/env.h" +#include "src/core/lib/support/string.h" char *grpc_get_well_known_google_credentials_file_path_impl(void) { char *result = NULL; diff --git a/src/core/security/google_default_credentials.c b/src/core/lib/security/google_default_credentials.c similarity index 95% rename from src/core/security/google_default_credentials.c rename to src/core/lib/security/google_default_credentials.c index 1f4f3e4aa52..5c342288cc6 100644 --- a/src/core/security/google_default_credentials.c +++ b/src/core/lib/security/google_default_credentials.c @@ -31,7 +31,7 @@ * */ -#include "src/core/security/credentials.h" +#include "src/core/lib/security/credentials.h" #include @@ -39,10 +39,11 @@ #include #include -#include "src/core/httpcli/httpcli.h" -#include "src/core/support/env.h" -#include "src/core/support/load_file.h" -#include "src/core/surface/api_trace.h" +#include "src/core/lib/http/httpcli.h" +#include "src/core/lib/http/parser.h" +#include "src/core/lib/support/env.h" +#include "src/core/lib/support/load_file.h" +#include "src/core/lib/surface/api_trace.h" /* -- Constants. -- */ @@ -66,14 +67,14 @@ typedef struct { static void on_compute_engine_detection_http_response( grpc_exec_ctx *exec_ctx, void *user_data, - const grpc_httpcli_response *response) { + const grpc_http_response *response) { compute_engine_detector *detector = (compute_engine_detector *)user_data; if (response != NULL && response->status == 200 && response->hdr_count > 0) { /* Internet providers can return a generic response to all requests, so it is necessary to check that metadata header is present also. */ size_t i; for (i = 0; i < response->hdr_count; i++) { - grpc_httpcli_header *header = &response->hdrs[i]; + grpc_http_header *header = &response->hdrs[i]; if (strcmp(header->key, "Metadata-Flavor") == 0 && strcmp(header->value, "Google") == 0) { detector->success = 1; @@ -109,7 +110,7 @@ static int is_stack_running_on_compute_engine(void) { memset(&request, 0, sizeof(grpc_httpcli_request)); request.host = GRPC_COMPUTE_ENGINE_DETECTION_HOST; - request.path = "/"; + request.http.path = "/"; grpc_httpcli_context_init(&context); diff --git a/src/core/security/handshake.c b/src/core/lib/security/handshake.c similarity index 98% rename from src/core/security/handshake.c rename to src/core/lib/security/handshake.c index b5bb6667a71..adb6d7fe4ed 100644 --- a/src/core/security/handshake.c +++ b/src/core/lib/security/handshake.c @@ -31,16 +31,16 @@ * */ -#include "src/core/security/handshake.h" +#include "src/core/lib/security/handshake.h" #include #include -#include "src/core/security/security_context.h" -#include "src/core/security/secure_endpoint.h" #include #include #include +#include "src/core/lib/security/secure_endpoint.h" +#include "src/core/lib/security/security_context.h" #define GRPC_INITIAL_HANDSHAKE_BUFFER_SIZE 256 diff --git a/src/core/security/handshake.h b/src/core/lib/security/handshake.h similarity index 90% rename from src/core/security/handshake.h rename to src/core/lib/security/handshake.h index db8b3749215..b5d7bb32826 100644 --- a/src/core/security/handshake.h +++ b/src/core/lib/security/handshake.h @@ -31,11 +31,11 @@ * */ -#ifndef GRPC_INTERNAL_CORE_SECURITY_HANDSHAKE_H -#define GRPC_INTERNAL_CORE_SECURITY_HANDSHAKE_H +#ifndef GRPC_CORE_LIB_SECURITY_HANDSHAKE_H +#define GRPC_CORE_LIB_SECURITY_HANDSHAKE_H -#include "src/core/iomgr/endpoint.h" -#include "src/core/security/security_connector.h" +#include "src/core/lib/iomgr/endpoint.h" +#include "src/core/lib/security/security_connector.h" /* Calls the callback upon completion. Takes owership of handshaker. */ void grpc_do_security_handshake(grpc_exec_ctx *exec_ctx, @@ -48,4 +48,4 @@ void grpc_do_security_handshake(grpc_exec_ctx *exec_ctx, void grpc_security_handshake_shutdown(grpc_exec_ctx *exec_ctx, void *handshake); -#endif /* GRPC_INTERNAL_CORE_SECURITY_HANDSHAKE_H */ +#endif /* GRPC_CORE_LIB_SECURITY_HANDSHAKE_H */ diff --git a/src/core/security/json_token.c b/src/core/lib/security/json_token.c similarity index 99% rename from src/core/security/json_token.c rename to src/core/lib/security/json_token.c index 372e5bfc5ab..97054286d9a 100644 --- a/src/core/security/json_token.c +++ b/src/core/lib/security/json_token.c @@ -31,7 +31,7 @@ * */ -#include "src/core/security/json_token.h" +#include "src/core/lib/security/json_token.h" #include @@ -39,8 +39,8 @@ #include #include -#include "src/core/security/b64.h" -#include "src/core/support/string.h" +#include "src/core/lib/security/b64.h" +#include "src/core/lib/support/string.h" #include #include diff --git a/src/core/security/json_token.h b/src/core/lib/security/json_token.h similarity index 95% rename from src/core/security/json_token.h rename to src/core/lib/security/json_token.h index 7e06864ff3a..376fb038750 100644 --- a/src/core/security/json_token.h +++ b/src/core/lib/security/json_token.h @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,13 +31,13 @@ * */ -#ifndef GRPC_INTERNAL_CORE_SECURITY_JSON_TOKEN_H -#define GRPC_INTERNAL_CORE_SECURITY_JSON_TOKEN_H +#ifndef GRPC_CORE_LIB_SECURITY_JSON_TOKEN_H +#define GRPC_CORE_LIB_SECURITY_JSON_TOKEN_H #include #include -#include "src/core/json/json.h" +#include "src/core/lib/json/json.h" /* --- Constants. --- */ @@ -115,4 +115,4 @@ grpc_auth_refresh_token grpc_auth_refresh_token_create_from_json( /* Destructs the object. */ void grpc_auth_refresh_token_destruct(grpc_auth_refresh_token *refresh_token); -#endif /* GRPC_INTERNAL_CORE_SECURITY_JSON_TOKEN_H */ +#endif /* GRPC_CORE_LIB_SECURITY_JSON_TOKEN_H */ diff --git a/src/core/security/jwt_verifier.c b/src/core/lib/security/jwt_verifier.c similarity index 97% rename from src/core/security/jwt_verifier.c rename to src/core/lib/security/jwt_verifier.c index 928c6c148de..460b92f9a01 100644 --- a/src/core/security/jwt_verifier.c +++ b/src/core/lib/security/jwt_verifier.c @@ -31,14 +31,14 @@ * */ -#include "src/core/security/jwt_verifier.h" +#include "src/core/lib/security/jwt_verifier.h" #include #include -#include "src/core/httpcli/httpcli.h" -#include "src/core/security/b64.h" -#include "src/core/tsi/ssl_types.h" +#include "src/core/lib/http/httpcli.h" +#include "src/core/lib/security/b64.h" +#include "src/core/lib/tsi/ssl_types.h" #include #include @@ -635,11 +635,11 @@ static void on_openid_config_retrieved(grpc_exec_ctx *exec_ctx, void *user_data, jwks_uri += 8; req.handshaker = &grpc_httpcli_ssl; req.host = gpr_strdup(jwks_uri); - req.path = strchr(jwks_uri, '/'); - if (req.path == NULL) { - req.path = ""; + req.http.path = strchr(jwks_uri, '/'); + if (req.http.path == NULL) { + req.http.path = ""; } else { - *(req.host + (req.path - jwks_uri)) = '\0'; + *(req.host + (req.http.path - jwks_uri)) = '\0'; } grpc_httpcli_get( exec_ctx, &ctx->verifier->http_ctx, ctx->pollset, &req, @@ -725,20 +725,20 @@ static void retrieve_key_and_verify(grpc_exec_ctx *exec_ctx, req.host = gpr_strdup(mapping->key_url_prefix); path_prefix = strchr(req.host, '/'); if (path_prefix == NULL) { - gpr_asprintf(&req.path, "/%s", iss); + gpr_asprintf(&req.http.path, "/%s", iss); } else { *(path_prefix++) = '\0'; - gpr_asprintf(&req.path, "/%s/%s", path_prefix, iss); + gpr_asprintf(&req.http.path, "/%s/%s", path_prefix, iss); } http_cb = on_keys_retrieved; } else { req.host = gpr_strdup(strstr(iss, "https://") == iss ? iss + 8 : iss); path_prefix = strchr(req.host, '/'); if (path_prefix == NULL) { - req.path = gpr_strdup(GRPC_OPENID_CONFIG_URL_SUFFIX); + req.http.path = gpr_strdup(GRPC_OPENID_CONFIG_URL_SUFFIX); } else { *(path_prefix++) = 0; - gpr_asprintf(&req.path, "/%s%s", path_prefix, + gpr_asprintf(&req.http.path, "/%s%s", path_prefix, GRPC_OPENID_CONFIG_URL_SUFFIX); } http_cb = on_openid_config_retrieved; @@ -749,7 +749,7 @@ static void retrieve_key_and_verify(grpc_exec_ctx *exec_ctx, gpr_time_add(gpr_now(GPR_CLOCK_REALTIME), grpc_jwt_verifier_max_delay), http_cb, ctx); gpr_free(req.host); - gpr_free(req.path); + gpr_free(req.http.path); return; error: diff --git a/src/core/security/jwt_verifier.h b/src/core/lib/security/jwt_verifier.h similarity index 95% rename from src/core/security/jwt_verifier.h rename to src/core/lib/security/jwt_verifier.h index 25613f03a07..28a9eff048c 100644 --- a/src/core/security/jwt_verifier.h +++ b/src/core/lib/security/jwt_verifier.h @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,11 +31,11 @@ * */ -#ifndef GRPC_INTERNAL_CORE_SECURITY_JWT_VERIFIER_H -#define GRPC_INTERNAL_CORE_SECURITY_JWT_VERIFIER_H +#ifndef GRPC_CORE_LIB_SECURITY_JWT_VERIFIER_H +#define GRPC_CORE_LIB_SECURITY_JWT_VERIFIER_H -#include "src/core/iomgr/pollset.h" -#include "src/core/json/json.h" +#include "src/core/lib/iomgr/pollset.h" +#include "src/core/lib/json/json.h" #include #include @@ -133,4 +133,4 @@ grpc_jwt_claims *grpc_jwt_claims_from_json(grpc_json *json, gpr_slice buffer); grpc_jwt_verifier_status grpc_jwt_claims_check(const grpc_jwt_claims *claims, const char *audience); -#endif /* GRPC_INTERNAL_CORE_SECURITY_JWT_VERIFIER_H */ +#endif /* GRPC_CORE_LIB_SECURITY_JWT_VERIFIER_H */ diff --git a/src/core/security/secure_endpoint.c b/src/core/lib/security/secure_endpoint.c similarity index 97% rename from src/core/security/secure_endpoint.c rename to src/core/lib/security/secure_endpoint.c index d11c43be203..e233b081ef2 100644 --- a/src/core/security/secure_endpoint.c +++ b/src/core/lib/security/secure_endpoint.c @@ -31,15 +31,15 @@ * */ -#include "src/core/security/secure_endpoint.h" -#include "src/core/support/string.h" +#include "src/core/lib/security/secure_endpoint.h" #include #include -#include #include +#include #include -#include "src/core/tsi/transport_security_interface.h" -#include "src/core/debug/trace.h" +#include "src/core/lib/debug/trace.h" +#include "src/core/lib/support/string.h" +#include "src/core/lib/tsi/transport_security_interface.h" #define STAGING_BUFFER_SIZE 8192 @@ -354,8 +354,9 @@ static char *endpoint_get_peer(grpc_endpoint *secure_ep) { } static const grpc_endpoint_vtable vtable = { - endpoint_read, endpoint_write, endpoint_add_to_pollset, - endpoint_add_to_pollset_set, endpoint_shutdown, endpoint_destroy, + endpoint_read, endpoint_write, + endpoint_add_to_pollset, endpoint_add_to_pollset_set, + endpoint_shutdown, endpoint_destroy, endpoint_get_peer}; grpc_endpoint *grpc_secure_endpoint_create( diff --git a/src/core/security/secure_endpoint.h b/src/core/lib/security/secure_endpoint.h similarity index 88% rename from src/core/security/secure_endpoint.h rename to src/core/lib/security/secure_endpoint.h index c563bdd9c50..57bd160a524 100644 --- a/src/core/security/secure_endpoint.h +++ b/src/core/lib/security/secure_endpoint.h @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,11 +31,11 @@ * */ -#ifndef GRPC_INTERNAL_CORE_SECURITY_SECURE_ENDPOINT_H -#define GRPC_INTERNAL_CORE_SECURITY_SECURE_ENDPOINT_H +#ifndef GRPC_CORE_LIB_SECURITY_SECURE_ENDPOINT_H +#define GRPC_CORE_LIB_SECURITY_SECURE_ENDPOINT_H -#include "src/core/iomgr/endpoint.h" #include +#include "src/core/lib/iomgr/endpoint.h" struct tsi_frame_protector; @@ -46,4 +46,4 @@ grpc_endpoint *grpc_secure_endpoint_create( struct tsi_frame_protector *protector, grpc_endpoint *to_wrap, gpr_slice *leftover_slices, size_t leftover_nslices); -#endif /* GRPC_INTERNAL_CORE_SECURITY_SECURE_ENDPOINT_H */ +#endif /* GRPC_CORE_LIB_SECURITY_SECURE_ENDPOINT_H */ diff --git a/src/core/security/security_connector.c b/src/core/lib/security/security_connector.c similarity index 96% rename from src/core/security/security_connector.c rename to src/core/lib/security/security_connector.c index 33c62a20c20..48b23a9dcfe 100644 --- a/src/core/security/security_connector.c +++ b/src/core/lib/security/security_connector.c @@ -31,7 +31,7 @@ * */ -#include "src/core/security/security_connector.h" +#include "src/core/lib/security/security_connector.h" #include #include @@ -42,16 +42,16 @@ #include #include -#include "src/core/security/credentials.h" -#include "src/core/security/handshake.h" -#include "src/core/security/secure_endpoint.h" -#include "src/core/security/security_context.h" -#include "src/core/support/env.h" -#include "src/core/support/load_file.h" -#include "src/core/support/string.h" -#include "src/core/transport/chttp2/alpn.h" -#include "src/core/tsi/fake_transport_security.h" -#include "src/core/tsi/ssl_transport_security.h" +#include "src/core/ext/transport/chttp2/transport/alpn.h" +#include "src/core/lib/security/credentials.h" +#include "src/core/lib/security/handshake.h" +#include "src/core/lib/security/secure_endpoint.h" +#include "src/core/lib/security/security_context.h" +#include "src/core/lib/support/env.h" +#include "src/core/lib/support/load_file.h" +#include "src/core/lib/support/string.h" +#include "src/core/lib/tsi/fake_transport_security.h" +#include "src/core/lib/tsi/ssl_transport_security.h" /* -- Constants. -- */ @@ -492,6 +492,9 @@ grpc_auth_context *tsi_ssl_peer_to_auth_context(const tsi_peer *peer) { peer_identity_property_name = GRPC_X509_SAN_PROPERTY_NAME; grpc_auth_context_add_property(ctx, GRPC_X509_SAN_PROPERTY_NAME, prop->value.data, prop->value.length); + } else if (strcmp(prop->name, TSI_X509_PEM_CERT_PROPERTY) == 0) { + grpc_auth_context_add_property(ctx, GRPC_X509_PEM_CERT_PROPERTY_NAME, + prop->value.data, prop->value.length); } } if (peer_identity_property_name != NULL) { @@ -554,9 +557,9 @@ static void ssl_server_check_peer(grpc_exec_ctx *exec_ctx, grpc_auth_context_unref(auth_context); } -static void add_shalow_auth_property_to_peer(tsi_peer *peer, - const grpc_auth_property *prop, - const char *tsi_prop_name) { +static void add_shallow_auth_property_to_peer(tsi_peer *peer, + const grpc_auth_property *prop, + const char *tsi_prop_name) { tsi_peer_property *tsi_prop = &peer->properties[peer->property_count++]; tsi_prop->name = (char *)tsi_prop_name; tsi_prop->value.data = prop->value; @@ -579,11 +582,14 @@ tsi_peer tsi_shallow_peer_from_ssl_auth_context( it = grpc_auth_context_property_iterator(auth_context); while ((prop = grpc_auth_property_iterator_next(&it)) != NULL) { if (strcmp(prop->name, GRPC_X509_SAN_PROPERTY_NAME) == 0) { - add_shalow_auth_property_to_peer( + add_shallow_auth_property_to_peer( &peer, prop, TSI_X509_SUBJECT_ALTERNATIVE_NAME_PEER_PROPERTY); } else if (strcmp(prop->name, GRPC_X509_CN_PROPERTY_NAME) == 0) { - add_shalow_auth_property_to_peer( + add_shallow_auth_property_to_peer( &peer, prop, TSI_X509_SUBJECT_COMMON_NAME_PEER_PROPERTY); + } else if (strcmp(prop->name, GRPC_X509_PEM_CERT_PROPERTY_NAME) == 0) { + add_shallow_auth_property_to_peer(&peer, prop, + TSI_X509_PEM_CERT_PROPERTY); } } } diff --git a/src/core/security/security_connector.h b/src/core/lib/security/security_connector.h similarity index 97% rename from src/core/security/security_connector.h rename to src/core/lib/security/security_connector.h index 1e35d3f9b7c..d50091c6287 100644 --- a/src/core/security/security_connector.h +++ b/src/core/lib/security/security_connector.h @@ -31,13 +31,13 @@ * */ -#ifndef GRPC_INTERNAL_CORE_SECURITY_SECURITY_CONNECTOR_H -#define GRPC_INTERNAL_CORE_SECURITY_SECURITY_CONNECTOR_H +#ifndef GRPC_CORE_LIB_SECURITY_SECURITY_CONNECTOR_H +#define GRPC_CORE_LIB_SECURITY_SECURITY_CONNECTOR_H #include -#include "src/core/iomgr/endpoint.h" -#include "src/core/iomgr/tcp_server.h" -#include "src/core/tsi/transport_security_interface.h" +#include "src/core/lib/iomgr/endpoint.h" +#include "src/core/lib/iomgr/tcp_server.h" +#include "src/core/lib/tsi/transport_security_interface.h" /* --- status enum. --- */ @@ -263,4 +263,4 @@ tsi_peer tsi_shallow_peer_from_ssl_auth_context( const grpc_auth_context *auth_context); void tsi_shallow_peer_destruct(tsi_peer *peer); -#endif /* GRPC_INTERNAL_CORE_SECURITY_SECURITY_CONNECTOR_H */ +#endif /* GRPC_CORE_LIB_SECURITY_SECURITY_CONNECTOR_H */ diff --git a/src/core/security/security_context.c b/src/core/lib/security/security_context.c similarity index 98% rename from src/core/security/security_context.c rename to src/core/lib/security/security_context.c index a71b3bc9153..0e66373bd80 100644 --- a/src/core/security/security_context.c +++ b/src/core/lib/security/security_context.c @@ -33,10 +33,10 @@ #include -#include "src/core/security/security_context.h" -#include "src/core/surface/api_trace.h" -#include "src/core/surface/call.h" -#include "src/core/support/string.h" +#include "src/core/lib/security/security_context.h" +#include "src/core/lib/support/string.h" +#include "src/core/lib/surface/api_trace.h" +#include "src/core/lib/surface/call.h" #include #include diff --git a/src/core/security/security_context.h b/src/core/lib/security/security_context.h similarity index 93% rename from src/core/security/security_context.h rename to src/core/lib/security/security_context.h index 794258edbcb..e9e4e503bc0 100644 --- a/src/core/security/security_context.h +++ b/src/core/lib/security/security_context.h @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,11 +31,11 @@ * */ -#ifndef GRPC_INTERNAL_CORE_SECURITY_SECURITY_CONTEXT_H -#define GRPC_INTERNAL_CORE_SECURITY_SECURITY_CONTEXT_H +#ifndef GRPC_CORE_LIB_SECURITY_SECURITY_CONTEXT_H +#define GRPC_CORE_LIB_SECURITY_SECURITY_CONTEXT_H -#include "src/core/iomgr/pollset.h" -#include "src/core/security/credentials.h" +#include "src/core/lib/iomgr/pollset.h" +#include "src/core/lib/security/credentials.h" /* --- grpc_auth_context --- @@ -111,4 +111,4 @@ grpc_auth_context *grpc_auth_context_from_arg(const grpc_arg *arg); grpc_auth_context *grpc_find_auth_context_in_args( const grpc_channel_args *args); -#endif /* GRPC_INTERNAL_CORE_SECURITY_SECURITY_CONTEXT_H */ +#endif /* GRPC_CORE_LIB_SECURITY_SECURITY_CONTEXT_H */ diff --git a/src/core/security/server_auth_filter.c b/src/core/lib/security/server_auth_filter.c similarity index 96% rename from src/core/security/server_auth_filter.c rename to src/core/lib/security/server_auth_filter.c index 3d8e5e8d35d..158cde0e2cb 100644 --- a/src/core/security/server_auth_filter.c +++ b/src/core/lib/security/server_auth_filter.c @@ -33,9 +33,9 @@ #include -#include "src/core/security/auth_filters.h" -#include "src/core/security/credentials.h" -#include "src/core/security/security_context.h" +#include "src/core/lib/security/auth_filters.h" +#include "src/core/lib/security/credentials.h" +#include "src/core/lib/security/security_context.h" #include #include @@ -259,6 +259,6 @@ static void destroy_channel_elem(grpc_exec_ctx *exec_ctx, const grpc_channel_filter grpc_server_auth_filter = { auth_start_transport_op, grpc_channel_next_op, sizeof(call_data), - init_call_elem, set_pollset, destroy_call_elem, sizeof(channel_data), - init_channel_elem, destroy_channel_elem, grpc_call_next_get_peer, - "server-auth"}; + init_call_elem, set_pollset, destroy_call_elem, + sizeof(channel_data), init_channel_elem, destroy_channel_elem, + grpc_call_next_get_peer, "server-auth"}; diff --git a/src/core/statistics/census_init.c b/src/core/lib/statistics/census_init.c similarity index 91% rename from src/core/statistics/census_init.c rename to src/core/lib/statistics/census_init.c index b6a962f228f..bbecd627641 100644 --- a/src/core/statistics/census_init.c +++ b/src/core/lib/statistics/census_init.c @@ -31,11 +31,11 @@ * */ -#include "src/core/statistics/census_interface.h" +#include "src/core/lib/statistics/census_interface.h" #include -#include "src/core/statistics/census_rpc_stats.h" -#include "src/core/statistics/census_tracing.h" +#include "src/core/lib/statistics/census_rpc_stats.h" +#include "src/core/lib/statistics/census_tracing.h" void census_init(void) { census_tracing_init(); diff --git a/src/core/statistics/census_interface.h b/src/core/lib/statistics/census_interface.h similarity index 93% rename from src/core/statistics/census_interface.h rename to src/core/lib/statistics/census_interface.h index c43acbd317f..b3b3439072e 100644 --- a/src/core/statistics/census_interface.h +++ b/src/core/lib/statistics/census_interface.h @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,8 +31,8 @@ * */ -#ifndef GRPC_INTERNAL_CORE_STATISTICS_CENSUS_INTERFACE_H -#define GRPC_INTERNAL_CORE_STATISTICS_CENSUS_INTERFACE_H +#ifndef GRPC_CORE_LIB_STATISTICS_CENSUS_INTERFACE_H +#define GRPC_CORE_LIB_STATISTICS_CENSUS_INTERFACE_H #include @@ -73,4 +73,4 @@ census_op_id census_tracing_start_op(void); /* Ends tracing. Calling this function will invalidate the input op_id. */ void census_tracing_end_op(census_op_id op_id); -#endif /* GRPC_INTERNAL_CORE_STATISTICS_CENSUS_INTERFACE_H */ +#endif /* GRPC_CORE_LIB_STATISTICS_CENSUS_INTERFACE_H */ diff --git a/src/core/statistics/census_log.c b/src/core/lib/statistics/census_log.c similarity index 99% rename from src/core/statistics/census_log.c rename to src/core/lib/statistics/census_log.c index 257ba586a32..1fb942a78a6 100644 --- a/src/core/statistics/census_log.c +++ b/src/core/lib/statistics/census_log.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -89,8 +89,7 @@ include the name of the structure, which will be passed as the first argument. E.g. cl_block_initialize() will initialize a cl_block. */ -#include "src/core/statistics/census_log.h" -#include +#include "src/core/lib/statistics/census_log.h" #include #include #include @@ -98,6 +97,7 @@ #include #include #include +#include /* End of platform specific code */ diff --git a/src/core/statistics/census_log.h b/src/core/lib/statistics/census_log.h similarity index 95% rename from src/core/statistics/census_log.h rename to src/core/lib/statistics/census_log.h index 356437c346e..c3fbd555ba2 100644 --- a/src/core/statistics/census_log.h +++ b/src/core/lib/statistics/census_log.h @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,8 +31,8 @@ * */ -#ifndef GRPC_INTERNAL_CORE_STATISTICS_CENSUS_LOG_H -#define GRPC_INTERNAL_CORE_STATISTICS_CENSUS_LOG_H +#ifndef GRPC_CORE_LIB_STATISTICS_CENSUS_LOG_H +#define GRPC_CORE_LIB_STATISTICS_CENSUS_LOG_H #include @@ -88,4 +88,4 @@ size_t census_log_remaining_space(void); out-of-space. */ int census_log_out_of_space_count(void); -#endif /* GRPC_INTERNAL_CORE_STATISTICS_CENSUS_LOG_H */ +#endif /* GRPC_CORE_LIB_STATISTICS_CENSUS_LOG_H */ diff --git a/src/core/statistics/census_rpc_stats.c b/src/core/lib/statistics/census_rpc_stats.c similarity index 94% rename from src/core/statistics/census_rpc_stats.c rename to src/core/lib/statistics/census_rpc_stats.c index 524a60793ae..21825616680 100644 --- a/src/core/statistics/census_rpc_stats.c +++ b/src/core/lib/statistics/census_rpc_stats.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -33,16 +33,16 @@ #include -#include "src/core/statistics/census_interface.h" -#include "src/core/statistics/census_rpc_stats.h" -#include "src/core/statistics/hash_table.h" -#include "src/core/statistics/census_tracing.h" -#include "src/core/statistics/window_stats.h" -#include "src/core/support/murmur_hash.h" -#include "src/core/support/string.h" #include #include #include +#include "src/core/lib/statistics/census_interface.h" +#include "src/core/lib/statistics/census_rpc_stats.h" +#include "src/core/lib/statistics/census_tracing.h" +#include "src/core/lib/statistics/hash_table.h" +#include "src/core/lib/statistics/window_stats.h" +#include "src/core/lib/support/murmur_hash.h" +#include "src/core/lib/support/string.h" #define NUM_INTERVALS 3 #define MINUTE_INTERVAL 0 @@ -85,8 +85,8 @@ static void delete_key(void *key) { gpr_free(key); } static const census_ht_option ht_opt = { CENSUS_HT_POINTER /* key type */, 1999 /* n_of_buckets */, - simple_hash /* hash function */, cmp_str_keys /* key comparator */, - delete_stats /* data deleter */, delete_key /* key deleter */ + simple_hash /* hash function */, cmp_str_keys /* key comparator */, + delete_stats /* data deleter */, delete_key /* key deleter */ }; static void init_rpc_stats(void *stats) { diff --git a/src/core/statistics/census_rpc_stats.h b/src/core/lib/statistics/census_rpc_stats.h similarity index 93% rename from src/core/statistics/census_rpc_stats.h rename to src/core/lib/statistics/census_rpc_stats.h index 8bdbc494903..00bb48205ea 100644 --- a/src/core/statistics/census_rpc_stats.h +++ b/src/core/lib/statistics/census_rpc_stats.h @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,11 +31,11 @@ * */ -#ifndef GRPC_INTERNAL_CORE_STATISTICS_CENSUS_RPC_STATS_H -#define GRPC_INTERNAL_CORE_STATISTICS_CENSUS_RPC_STATS_H +#ifndef GRPC_CORE_LIB_STATISTICS_CENSUS_RPC_STATS_H +#define GRPC_CORE_LIB_STATISTICS_CENSUS_RPC_STATS_H -#include "src/core/statistics/census_interface.h" #include +#include "src/core/lib/statistics/census_interface.h" #ifdef __cplusplus extern "C" { @@ -98,4 +98,4 @@ void census_stats_store_shutdown(void); } #endif -#endif /* GRPC_INTERNAL_CORE_STATISTICS_CENSUS_RPC_STATS_H */ +#endif /* GRPC_CORE_LIB_STATISTICS_CENSUS_RPC_STATS_H */ diff --git a/src/core/statistics/census_tracing.c b/src/core/lib/statistics/census_tracing.c similarity index 94% rename from src/core/statistics/census_tracing.c rename to src/core/lib/statistics/census_tracing.c index dc0f8a26f51..b58ae733fce 100644 --- a/src/core/statistics/census_tracing.c +++ b/src/core/lib/statistics/census_tracing.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,18 +31,18 @@ * */ -#include "src/core/statistics/census_interface.h" -#include "src/core/statistics/census_tracing.h" +#include "src/core/lib/statistics/census_tracing.h" +#include "src/core/lib/statistics/census_interface.h" #include #include -#include "src/core/statistics/hash_table.h" -#include "src/core/support/string.h" #include #include #include #include +#include "src/core/lib/statistics/hash_table.h" +#include "src/core/lib/support/string.h" void census_trace_obj_destroy(census_trace_obj *obj) { census_trace_annotation *p = obj->annotations; @@ -60,8 +60,11 @@ static void delete_trace_obj(void *obj) { } static const census_ht_option ht_opt = { - CENSUS_HT_UINT64 /* key type */, 571 /* n_of_buckets */, NULL /* hash */, - NULL /* compare_keys */, delete_trace_obj /* delete data */, + CENSUS_HT_UINT64 /* key type */, + 571 /* n_of_buckets */, + NULL /* hash */, + NULL /* compare_keys */, + delete_trace_obj /* delete data */, NULL /* delete key */ }; diff --git a/src/core/statistics/census_tracing.h b/src/core/lib/statistics/census_tracing.h similarity index 93% rename from src/core/statistics/census_tracing.h rename to src/core/lib/statistics/census_tracing.h index bb3f2556d20..a101abf3cb9 100644 --- a/src/core/statistics/census_tracing.h +++ b/src/core/lib/statistics/census_tracing.h @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,11 +31,11 @@ * */ -#ifndef GRPC_INTERNAL_CORE_STATISTICS_CENSUS_TRACING_H -#define GRPC_INTERNAL_CORE_STATISTICS_CENSUS_TRACING_H +#ifndef GRPC_CORE_LIB_STATISTICS_CENSUS_TRACING_H +#define GRPC_CORE_LIB_STATISTICS_CENSUS_TRACING_H #include -#include "src/core/statistics/census_rpc_stats.h" +#include "src/core/lib/statistics/census_rpc_stats.h" /* WARNING: The data structures and APIs provided by this file are for GRPC library's internal use ONLY. They might be changed in backward-incompatible @@ -93,4 +93,4 @@ census_trace_obj **census_get_active_ops(int *num_active_ops); } #endif -#endif /* GRPC_INTERNAL_CORE_STATISTICS_CENSUS_TRACING_H */ +#endif /* GRPC_CORE_LIB_STATISTICS_CENSUS_TRACING_H */ diff --git a/src/core/statistics/hash_table.c b/src/core/lib/statistics/hash_table.c similarity index 99% rename from src/core/statistics/hash_table.c rename to src/core/lib/statistics/hash_table.c index 0cadcd47402..18b7442a0ce 100644 --- a/src/core/statistics/hash_table.c +++ b/src/core/lib/statistics/hash_table.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,13 +31,13 @@ * */ -#include "src/core/statistics/hash_table.h" +#include "src/core/lib/statistics/hash_table.h" -#include #include +#include -#include #include +#include #include #define CENSUS_HT_NUM_BUCKETS 1999 diff --git a/src/core/statistics/hash_table.h b/src/core/lib/statistics/hash_table.h similarity index 96% rename from src/core/statistics/hash_table.h rename to src/core/lib/statistics/hash_table.h index d9860a909f0..8f74ec82aad 100644 --- a/src/core/statistics/hash_table.h +++ b/src/core/lib/statistics/hash_table.h @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,8 +31,8 @@ * */ -#ifndef GRPC_INTERNAL_CORE_STATISTICS_HASH_TABLE_H -#define GRPC_INTERNAL_CORE_STATISTICS_HASH_TABLE_H +#ifndef GRPC_CORE_LIB_STATISTICS_HASH_TABLE_H +#define GRPC_CORE_LIB_STATISTICS_HASH_TABLE_H #include @@ -128,4 +128,4 @@ typedef void (*census_ht_itr_cb)(census_ht_key key, const void *val_ptr, should not invalidate data entries. */ uint64_t census_ht_for_all(const census_ht *ht, census_ht_itr_cb); -#endif /* GRPC_INTERNAL_CORE_STATISTICS_HASH_TABLE_H */ +#endif /* GRPC_CORE_LIB_STATISTICS_HASH_TABLE_H */ diff --git a/src/core/statistics/window_stats.c b/src/core/lib/statistics/window_stats.c similarity index 99% rename from src/core/statistics/window_stats.c rename to src/core/lib/statistics/window_stats.c index 3f2940853aa..53427a24bc4 100644 --- a/src/core/statistics/window_stats.c +++ b/src/core/lib/statistics/window_stats.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,14 +31,14 @@ * */ -#include "src/core/statistics/window_stats.h" -#include -#include -#include +#include "src/core/lib/statistics/window_stats.h" #include #include #include #include +#include +#include +#include /* typedefs make typing long names easier. Use cws (for census_window_stats) */ typedef census_window_stats_stat_info cws_stat_info; diff --git a/src/core/statistics/window_stats.h b/src/core/lib/statistics/window_stats.h similarity index 97% rename from src/core/statistics/window_stats.h rename to src/core/lib/statistics/window_stats.h index f4732e96a02..8dec50d620d 100644 --- a/src/core/statistics/window_stats.h +++ b/src/core/lib/statistics/window_stats.h @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,8 +31,8 @@ * */ -#ifndef GRPC_INTERNAL_CORE_STATISTICS_WINDOW_STATS_H -#define GRPC_INTERNAL_CORE_STATISTICS_WINDOW_STATS_H +#ifndef GRPC_CORE_LIB_STATISTICS_WINDOW_STATS_H +#define GRPC_CORE_LIB_STATISTICS_WINDOW_STATS_H #include @@ -170,4 +170,4 @@ void census_window_stats_get_sums(const struct census_window_stats *wstats, assertion failure). This function is thread-compatible. */ void census_window_stats_destroy(struct census_window_stats *wstats); -#endif /* GRPC_INTERNAL_CORE_STATISTICS_WINDOW_STATS_H */ +#endif /* GRPC_CORE_LIB_STATISTICS_WINDOW_STATS_H */ diff --git a/src/core/support/alloc.c b/src/core/lib/support/alloc.c similarity index 98% rename from src/core/support/alloc.c rename to src/core/lib/support/alloc.c index b99584bd200..27fa6a95ed1 100644 --- a/src/core/support/alloc.c +++ b/src/core/lib/support/alloc.c @@ -33,10 +33,10 @@ #include -#include #include #include -#include "src/core/profiling/timers.h" +#include +#include "src/core/lib/profiling/timers.h" static gpr_allocation_functions g_alloc_functions = {malloc, realloc, free}; diff --git a/src/core/support/avl.c b/src/core/lib/support/avl.c similarity index 100% rename from src/core/support/avl.c rename to src/core/lib/support/avl.c diff --git a/src/core/lib/support/backoff.c b/src/core/lib/support/backoff.c new file mode 100644 index 00000000000..e89ef472207 --- /dev/null +++ b/src/core/lib/support/backoff.c @@ -0,0 +1,76 @@ +/* + * + * Copyright 2016, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include "src/core/lib/support/backoff.h" + +#include + +void gpr_backoff_init(gpr_backoff *backoff, double multiplier, double jitter, + int64_t min_timeout_millis, int64_t max_timeout_millis) { + backoff->multiplier = multiplier; + backoff->jitter = jitter; + backoff->min_timeout_millis = min_timeout_millis; + backoff->max_timeout_millis = max_timeout_millis; + backoff->rng_state = (uint32_t)gpr_now(GPR_CLOCK_REALTIME).tv_nsec; +} + +gpr_timespec gpr_backoff_begin(gpr_backoff *backoff, gpr_timespec now) { + backoff->current_timeout_millis = backoff->min_timeout_millis; + return gpr_time_add( + now, gpr_time_from_millis(backoff->current_timeout_millis, GPR_TIMESPAN)); +} + +/* Generate a random number between 0 and 1. */ +static double generate_uniform_random_number(uint32_t *rng_state) { + *rng_state = (1103515245 * *rng_state + 12345) % ((uint32_t)1 << 31); + return *rng_state / (double)((uint32_t)1 << 31); +} + +gpr_timespec gpr_backoff_step(gpr_backoff *backoff, gpr_timespec now) { + double new_timeout_millis = + backoff->multiplier * (double)backoff->current_timeout_millis; + double jitter_range = backoff->jitter * new_timeout_millis; + double jitter = + (2 * generate_uniform_random_number(&backoff->rng_state) - 1) * + jitter_range; + backoff->current_timeout_millis = + GPR_CLAMP((int64_t)(new_timeout_millis + jitter), + backoff->min_timeout_millis, backoff->max_timeout_millis); + return gpr_time_add( + now, gpr_time_from_millis(backoff->current_timeout_millis, GPR_TIMESPAN)); +} + +void gpr_backoff_reset(gpr_backoff *backoff) { + // forces step() to return a timeout of min_timeout_millis + backoff->current_timeout_millis = 0; +} diff --git a/src/core/channel/client_uchannel.h b/src/core/lib/support/backoff.h similarity index 54% rename from src/core/channel/client_uchannel.h rename to src/core/lib/support/backoff.h index 92a831493cf..6d40c155465 100644 --- a/src/core/channel/client_uchannel.h +++ b/src/core/lib/support/backoff.h @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,30 +31,38 @@ * */ -#ifndef GRPC_INTERNAL_CORE_CHANNEL_CLIENT_MICROCHANNEL_H -#define GRPC_INTERNAL_CORE_CHANNEL_CLIENT_MICROCHANNEL_H +#ifndef GRPC_CORE_LIB_SUPPORT_BACKOFF_H +#define GRPC_CORE_LIB_SUPPORT_BACKOFF_H -#include "src/core/channel/channel_stack.h" -#include "src/core/client_config/resolver.h" +#include -#define GRPC_MICROCHANNEL_SUBCHANNEL_ARG "grpc.microchannel_subchannel_key" +typedef struct { + /// const: multiplier between retry attempts + double multiplier; + /// const: amount to randomize backoffs + double jitter; + /// const: minimum time between retries in milliseconds + int64_t min_timeout_millis; + /// const: maximum time between retries in milliseconds + int64_t max_timeout_millis; -/* A client microchannel (aka uchannel) is a channel wrapping a subchannel, for - * the purposes of lightweight RPC communications from within the core.*/ + /// random number generator + uint32_t rng_state; -extern const grpc_channel_filter grpc_client_uchannel_filter; + /// current retry timeout in milliseconds + int64_t current_timeout_millis; +} gpr_backoff; -grpc_connectivity_state grpc_client_uchannel_check_connectivity_state( - grpc_exec_ctx *exec_ctx, grpc_channel_element *elem, int try_to_connect); +/// Initialize backoff machinery - does not need to be destroyed +void gpr_backoff_init(gpr_backoff *backoff, double multiplier, double jitter, + int64_t min_timeout_millis, int64_t max_timeout_millis); -void grpc_client_uchannel_watch_connectivity_state( - grpc_exec_ctx *exec_ctx, grpc_channel_element *elem, grpc_pollset *pollset, - grpc_connectivity_state *state, grpc_closure *on_complete); +/// Begin retry loop: returns a timespec for the NEXT retry +gpr_timespec gpr_backoff_begin(gpr_backoff *backoff, gpr_timespec now); +/// Step a retry loop: returns a timespec for the NEXT retry +gpr_timespec gpr_backoff_step(gpr_backoff *backoff, gpr_timespec now); +/// Reset the backoff, so the next gpr_backoff_step will be a gpr_backoff_begin +/// instead +void gpr_backoff_reset(gpr_backoff *backoff); -grpc_channel *grpc_client_uchannel_create(grpc_subchannel *subchannel, - grpc_channel_args *args); - -void grpc_client_uchannel_set_connected_subchannel( - grpc_channel *uchannel, grpc_connected_subchannel *connected_subchannel); - -#endif /* GRPC_INTERNAL_CORE_CHANNEL_CLIENT_MICROCHANNEL_H */ +#endif /* GRPC_CORE_LIB_SUPPORT_BACKOFF_H */ diff --git a/src/core/support/block_annotate.h b/src/core/lib/support/block_annotate.h similarity index 91% rename from src/core/support/block_annotate.h rename to src/core/lib/support/block_annotate.h index 3cd8eee272d..bd3071655ef 100644 --- a/src/core/support/block_annotate.h +++ b/src/core/lib/support/block_annotate.h @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,8 +31,8 @@ * */ -#ifndef GRPC_INTERNAL_CORE_SUPPORT_BLOCK_ANNOTATE_H -#define GRPC_INTERNAL_CORE_SUPPORT_BLOCK_ANNOTATE_H +#ifndef GRPC_CORE_LIB_SUPPORT_BLOCK_ANNOTATE_H +#define GRPC_CORE_LIB_SUPPORT_BLOCK_ANNOTATE_H /* These annotations identify the beginning and end of regions where the code may block for reasons other than synchronization functions. @@ -45,4 +45,4 @@ do { \ } while (0) -#endif /* GRPC_INTERNAL_CORE_SUPPORT_BLOCK_ANNOTATE_H */ +#endif /* GRPC_CORE_LIB_SUPPORT_BLOCK_ANNOTATE_H */ diff --git a/src/core/support/cmdline.c b/src/core/lib/support/cmdline.c similarity index 99% rename from src/core/support/cmdline.c rename to src/core/lib/support/cmdline.c index b517f30b2d3..35c4990b22f 100644 --- a/src/core/support/cmdline.c +++ b/src/core/lib/support/cmdline.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -37,10 +37,10 @@ #include #include -#include "src/core/support/string.h" #include #include #include +#include "src/core/lib/support/string.h" typedef enum { ARGTYPE_INT, ARGTYPE_BOOL, ARGTYPE_STRING } argtype; diff --git a/src/core/support/cpu_iphone.c b/src/core/lib/support/cpu_iphone.c similarity index 98% rename from src/core/support/cpu_iphone.c rename to src/core/lib/support/cpu_iphone.c index 82b49b47bc0..e83191badae 100644 --- a/src/core/support/cpu_iphone.c +++ b/src/core/lib/support/cpu_iphone.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/src/core/support/cpu_linux.c b/src/core/lib/support/cpu_linux.c similarity index 98% rename from src/core/support/cpu_linux.c rename to src/core/lib/support/cpu_linux.c index 7af6a8f0090..5597df2d033 100644 --- a/src/core/support/cpu_linux.c +++ b/src/core/lib/support/cpu_linux.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -39,10 +39,10 @@ #ifdef GPR_CPU_LINUX -#include #include -#include +#include #include +#include #include #include diff --git a/src/core/support/cpu_posix.c b/src/core/lib/support/cpu_posix.c similarity index 100% rename from src/core/support/cpu_posix.c rename to src/core/lib/support/cpu_posix.c index 8f01c284ca4..e508ddd8ca1 100644 --- a/src/core/support/cpu_posix.c +++ b/src/core/lib/support/cpu_posix.c @@ -36,8 +36,8 @@ #ifdef GPR_CPU_POSIX #include -#include #include +#include #include #include diff --git a/src/core/support/cpu_windows.c b/src/core/lib/support/cpu_windows.c similarity index 98% rename from src/core/support/cpu_windows.c rename to src/core/lib/support/cpu_windows.c index ce32eb0a9d6..0f84a9e5ea2 100644 --- a/src/core/support/cpu_windows.c +++ b/src/core/lib/support/cpu_windows.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/src/core/support/env.h b/src/core/lib/support/env.h similarity index 92% rename from src/core/support/env.h rename to src/core/lib/support/env.h index 24172d86737..ddc4ee3c6d1 100644 --- a/src/core/support/env.h +++ b/src/core/lib/support/env.h @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,8 +31,8 @@ * */ -#ifndef GRPC_INTERNAL_CORE_SUPPORT_ENV_H -#define GRPC_INTERNAL_CORE_SUPPORT_ENV_H +#ifndef GRPC_CORE_LIB_SUPPORT_ENV_H +#define GRPC_CORE_LIB_SUPPORT_ENV_H #include @@ -57,4 +57,4 @@ void gpr_setenv(const char *name, const char *value); } #endif -#endif /* GRPC_INTERNAL_CORE_SUPPORT_ENV_H */ +#endif /* GRPC_CORE_LIB_SUPPORT_ENV_H */ diff --git a/src/core/support/env_linux.c b/src/core/lib/support/env_linux.c similarity index 97% rename from src/core/support/env_linux.c rename to src/core/lib/support/env_linux.c index fe51f846b71..a86133e6c3b 100644 --- a/src/core/support/env_linux.c +++ b/src/core/lib/support/env_linux.c @@ -40,7 +40,7 @@ #ifdef GPR_LINUX_ENV -#include "src/core/support/env.h" +#include "src/core/lib/support/env.h" #include #include @@ -51,7 +51,7 @@ #include #include -#include "src/core/support/string.h" +#include "src/core/lib/support/string.h" char *gpr_getenv(const char *name) { #if defined(GPR_BACKWARDS_COMPATIBILITY_MODE) diff --git a/src/core/support/env_posix.c b/src/core/lib/support/env_posix.c similarity index 94% rename from src/core/support/env_posix.c rename to src/core/lib/support/env_posix.c index 1dd2af56bcb..1b57b094a99 100644 --- a/src/core/support/env_posix.c +++ b/src/core/lib/support/env_posix.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -35,14 +35,14 @@ #ifdef GPR_POSIX_ENV -#include "src/core/support/env.h" +#include "src/core/lib/support/env.h" #include #include -#include "src/core/support/string.h" #include +#include "src/core/lib/support/string.h" char *gpr_getenv(const char *name) { char *result = getenv(name); diff --git a/src/core/support/env_win32.c b/src/core/lib/support/env_win32.c similarity index 96% rename from src/core/support/env_win32.c rename to src/core/lib/support/env_win32.c index 10258283baf..566feee49e1 100644 --- a/src/core/support/env_win32.c +++ b/src/core/lib/support/env_win32.c @@ -35,8 +35,8 @@ #ifdef GPR_WIN32 -#include "src/core/support/env.h" -#include "src/core/support/string.h" +#include "src/core/lib/support/env.h" +#include "src/core/lib/support/string.h" #ifdef __MINGW32__ errno_t getenv_s(size_t *size_needed, char *buffer, size_t size, diff --git a/src/core/support/histogram.c b/src/core/lib/support/histogram.c similarity index 99% rename from src/core/support/histogram.c rename to src/core/lib/support/histogram.c index 20ed2b14b14..62227be1a67 100644 --- a/src/core/support/histogram.c +++ b/src/core/lib/support/histogram.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -38,8 +38,8 @@ #include #include -#include #include +#include #include /* Histograms are stored with exponentially increasing bucket sizes. diff --git a/src/core/support/host_port.c b/src/core/lib/support/host_port.c similarity index 97% rename from src/core/support/host_port.c rename to src/core/lib/support/host_port.c index 23f65b15812..e03f6241ff5 100644 --- a/src/core/support/host_port.c +++ b/src/core/lib/support/host_port.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -35,10 +35,10 @@ #include -#include "src/core/support/string.h" #include #include #include +#include "src/core/lib/support/string.h" int gpr_join_host_port(char **out, const char *host, int port) { if (host[0] != '[' && strchr(host, ':') != NULL) { diff --git a/src/core/support/load_file.c b/src/core/lib/support/load_file.c similarity index 95% rename from src/core/support/load_file.c rename to src/core/lib/support/load_file.c index 650bd62ccbe..0cecd5edd5e 100644 --- a/src/core/support/load_file.c +++ b/src/core/lib/support/load_file.c @@ -31,7 +31,7 @@ * */ -#include "src/core/support/load_file.h" +#include "src/core/lib/support/load_file.h" #include #include @@ -40,8 +40,8 @@ #include #include -#include "src/core/support/block_annotate.h" -#include "src/core/support/string.h" +#include "src/core/lib/support/block_annotate.h" +#include "src/core/lib/support/string.h" gpr_slice gpr_load_file(const char *filename, int add_null_terminator, int *success) { diff --git a/src/core/support/load_file.h b/src/core/lib/support/load_file.h similarity index 93% rename from src/core/support/load_file.h rename to src/core/lib/support/load_file.h index 746319a50d2..fe030c967e8 100644 --- a/src/core/support/load_file.h +++ b/src/core/lib/support/load_file.h @@ -31,8 +31,8 @@ * */ -#ifndef GRPC_INTERNAL_CORE_SUPPORT_LOAD_FILE_H -#define GRPC_INTERNAL_CORE_SUPPORT_LOAD_FILE_H +#ifndef GRPC_CORE_LIB_SUPPORT_LOAD_FILE_H +#define GRPC_CORE_LIB_SUPPORT_LOAD_FILE_H #include @@ -52,4 +52,4 @@ gpr_slice gpr_load_file(const char *filename, int add_null_terminator, } #endif -#endif /* GRPC_INTERNAL_CORE_SUPPORT_LOAD_FILE_H */ +#endif /* GRPC_CORE_LIB_SUPPORT_LOAD_FILE_H */ diff --git a/src/core/support/log.c b/src/core/lib/support/log.c similarity index 98% rename from src/core/support/log.c rename to src/core/lib/support/log.c index 04156a5b1fc..cd6a0726cf3 100644 --- a/src/core/support/log.c +++ b/src/core/lib/support/log.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/src/core/support/log_android.c b/src/core/lib/support/log_android.c similarity index 98% rename from src/core/support/log_android.c rename to src/core/lib/support/log_android.c index 5d0c7d820d8..640c9d7099a 100644 --- a/src/core/support/log_android.c +++ b/src/core/lib/support/log_android.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -35,12 +35,12 @@ #ifdef GPR_ANDROID +#include #include #include -#include #include +#include #include -#include static android_LogPriority severity_to_log_priority(gpr_log_severity severity) { switch (severity) { diff --git a/src/core/support/log_linux.c b/src/core/lib/support/log_linux.c similarity index 98% rename from src/core/support/log_linux.c rename to src/core/lib/support/log_linux.c index d66b7a3cc00..e60512c526e 100644 --- a/src/core/support/log_linux.c +++ b/src/core/lib/support/log_linux.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -47,12 +47,12 @@ #include #include #include -#include +#include #include +#include #include -#include -#include #include +#include #include static long gettid(void) { return syscall(__NR_gettid); } diff --git a/src/core/support/log_posix.c b/src/core/lib/support/log_posix.c similarity index 98% rename from src/core/support/log_posix.c rename to src/core/lib/support/log_posix.c index 3ff171f99cb..7429dd0a2c2 100644 --- a/src/core/support/log_posix.c +++ b/src/core/lib/support/log_posix.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -38,12 +38,12 @@ #include #include #include -#include +#include #include -#include #include +#include +#include #include -#include static intptr_t gettid(void) { return (intptr_t)pthread_self(); } diff --git a/src/core/support/log_win32.c b/src/core/lib/support/log_win32.c similarity index 97% rename from src/core/support/log_win32.c rename to src/core/lib/support/log_win32.c index e18e667fe5f..cec99440a5c 100644 --- a/src/core/support/log_win32.c +++ b/src/core/lib/support/log_win32.c @@ -35,17 +35,17 @@ #ifdef GPR_WIN32 -#include #include +#include #include -#include #include -#include +#include #include +#include -#include "src/core/support/string.h" -#include "src/core/support/string_win32.h" +#include "src/core/lib/support/string.h" +#include "src/core/lib/support/string_win32.h" void gpr_log(const char *file, int line, gpr_log_severity severity, const char *format, ...) { diff --git a/src/core/support/murmur_hash.c b/src/core/lib/support/murmur_hash.c similarity index 97% rename from src/core/support/murmur_hash.c rename to src/core/lib/support/murmur_hash.c index a5261c0cc04..97832f15101 100644 --- a/src/core/support/murmur_hash.c +++ b/src/core/lib/support/murmur_hash.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,7 +31,7 @@ * */ -#include "src/core/support/murmur_hash.h" +#include "src/core/lib/support/murmur_hash.h" #define ROTL32(x, r) ((x) << (r)) | ((x) >> (32 - (r))) diff --git a/src/core/support/murmur_hash.h b/src/core/lib/support/murmur_hash.h similarity index 90% rename from src/core/support/murmur_hash.h rename to src/core/lib/support/murmur_hash.h index 0bf04f731ad..e54cdf25920 100644 --- a/src/core/support/murmur_hash.h +++ b/src/core/lib/support/murmur_hash.h @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,8 +31,8 @@ * */ -#ifndef GRPC_INTERNAL_CORE_SUPPORT_MURMUR_HASH_H -#define GRPC_INTERNAL_CORE_SUPPORT_MURMUR_HASH_H +#ifndef GRPC_CORE_LIB_SUPPORT_MURMUR_HASH_H +#define GRPC_CORE_LIB_SUPPORT_MURMUR_HASH_H #include @@ -41,4 +41,4 @@ /* compute the hash of key (length len) */ uint32_t gpr_murmur_hash3(const void *key, size_t len, uint32_t seed); -#endif /* GRPC_INTERNAL_CORE_SUPPORT_MURMUR_HASH_H */ +#endif /* GRPC_CORE_LIB_SUPPORT_MURMUR_HASH_H */ diff --git a/src/core/support/slice.c b/src/core/lib/support/slice.c similarity index 99% rename from src/core/support/slice.c rename to src/core/lib/support/slice.c index b9a7c77bda6..cf3953ce4ea 100644 --- a/src/core/support/slice.c +++ b/src/core/lib/support/slice.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/src/core/support/slice_buffer.c b/src/core/lib/support/slice_buffer.c similarity index 99% rename from src/core/support/slice_buffer.c rename to src/core/lib/support/slice_buffer.c index 66f111d767c..563e659dd74 100644 --- a/src/core/support/slice_buffer.c +++ b/src/core/lib/support/slice_buffer.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/src/core/support/stack_lockfree.c b/src/core/lib/support/stack_lockfree.c similarity index 96% rename from src/core/support/stack_lockfree.c rename to src/core/lib/support/stack_lockfree.c index 9daecd2e18a..de80486132d 100644 --- a/src/core/support/stack_lockfree.c +++ b/src/core/lib/support/stack_lockfree.c @@ -31,15 +31,15 @@ * */ -#include "src/core/support/stack_lockfree.h" +#include "src/core/lib/support/stack_lockfree.h" #include #include -#include #include #include #include +#include /* The lockfree node structure is a single architecture-level word that allows for an atomic CAS to set it up. */ @@ -64,10 +64,10 @@ typedef union lockfree_node { struct lockfree_node_contents contents; } lockfree_node; -#define ENTRY_ALIGNMENT_BITS 3 /* make sure that entries aligned to 8-bytes */ -#define INVALID_ENTRY_INDEX \ - ((1 << 16) - 1) /* reserve this entry as invalid \ - */ +/* make sure that entries aligned to 8-bytes */ +#define ENTRY_ALIGNMENT_BITS 3 +/* reserve this entry as invalid */ +#define INVALID_ENTRY_INDEX ((1 << 16) - 1) struct gpr_stack_lockfree { lockfree_node *entries; diff --git a/src/core/support/stack_lockfree.h b/src/core/lib/support/stack_lockfree.h similarity index 91% rename from src/core/support/stack_lockfree.h rename to src/core/lib/support/stack_lockfree.h index ca58dd007a2..a030a01d1f1 100644 --- a/src/core/support/stack_lockfree.h +++ b/src/core/lib/support/stack_lockfree.h @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,8 +31,8 @@ * */ -#ifndef GRPC_INTERNAL_CORE_SUPPORT_STACK_LOCKFREE_H -#define GRPC_INTERNAL_CORE_SUPPORT_STACK_LOCKFREE_H +#ifndef GRPC_CORE_LIB_SUPPORT_STACK_LOCKFREE_H +#define GRPC_CORE_LIB_SUPPORT_STACK_LOCKFREE_H #include @@ -50,4 +50,4 @@ int gpr_stack_lockfree_push(gpr_stack_lockfree *, int entry); /* Returns -1 on empty or the actual entry number */ int gpr_stack_lockfree_pop(gpr_stack_lockfree *stack); -#endif /* GRPC_INTERNAL_CORE_SUPPORT_STACK_LOCKFREE_H */ +#endif /* GRPC_CORE_LIB_SUPPORT_STACK_LOCKFREE_H */ diff --git a/src/core/support/string.c b/src/core/lib/support/string.c similarity index 99% rename from src/core/support/string.c rename to src/core/lib/support/string.c index 1f541de40f1..365d861de3f 100644 --- a/src/core/support/string.c +++ b/src/core/lib/support/string.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,7 +31,7 @@ * */ -#include "src/core/support/string.h" +#include "src/core/lib/support/string.h" #include #include diff --git a/src/core/support/string.h b/src/core/lib/support/string.h similarity index 96% rename from src/core/support/string.h rename to src/core/lib/support/string.h index e6755de106c..68c02878e08 100644 --- a/src/core/support/string.h +++ b/src/core/lib/support/string.h @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,14 +31,14 @@ * */ -#ifndef GRPC_INTERNAL_CORE_SUPPORT_STRING_H -#define GRPC_INTERNAL_CORE_SUPPORT_STRING_H +#ifndef GRPC_CORE_LIB_SUPPORT_STRING_H +#define GRPC_CORE_LIB_SUPPORT_STRING_H #include #include -#include #include +#include #ifdef __cplusplus extern "C" { @@ -118,4 +118,4 @@ char *gpr_strvec_flatten(gpr_strvec *strs, size_t *total_length); } #endif -#endif /* GRPC_INTERNAL_CORE_SUPPORT_STRING_H */ +#endif /* GRPC_CORE_LIB_SUPPORT_STRING_H */ diff --git a/src/core/support/string_posix.c b/src/core/lib/support/string_posix.c similarity index 98% rename from src/core/support/string_posix.c rename to src/core/lib/support/string_posix.c index 25c333db4ed..a73b3106a5f 100644 --- a/src/core/support/string_posix.c +++ b/src/core/lib/support/string_posix.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -35,8 +35,8 @@ #ifdef GPR_POSIX_STRING -#include #include +#include #include #include diff --git a/src/core/support/string_win32.c b/src/core/lib/support/string_win32.c similarity index 98% rename from src/core/support/string_win32.c rename to src/core/lib/support/string_win32.c index 3b1f702cf1b..16b7e37f2a3 100644 --- a/src/core/support/string_win32.c +++ b/src/core/lib/support/string_win32.c @@ -37,13 +37,13 @@ #ifdef GPR_WIN32 -#include #include +#include #include #include -#include "src/core/support/string.h" +#include "src/core/lib/support/string.h" int gpr_asprintf(char **strp, const char *format, ...) { va_list args; diff --git a/src/core/support/string_win32.h b/src/core/lib/support/string_win32.h similarity index 90% rename from src/core/support/string_win32.h rename to src/core/lib/support/string_win32.h index e3043656fba..f47d567715b 100644 --- a/src/core/support/string_win32.h +++ b/src/core/lib/support/string_win32.h @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,8 +31,8 @@ * */ -#ifndef GRPC_INTERNAL_CORE_SUPPORT_STRING_WIN32_H -#define GRPC_INTERNAL_CORE_SUPPORT_STRING_WIN32_H +#ifndef GRPC_CORE_LIB_SUPPORT_STRING_WIN32_H +#define GRPC_CORE_LIB_SUPPORT_STRING_WIN32_H #include @@ -44,4 +44,4 @@ LPSTR gpr_tchar_to_char(LPCTSTR input); #endif /* GPR_WIN32 */ -#endif /* GRPC_INTERNAL_CORE_SUPPORT_STRING_WIN32_H */ +#endif /* GRPC_CORE_LIB_SUPPORT_STRING_WIN32_H */ diff --git a/src/core/support/subprocess_posix.c b/src/core/lib/support/subprocess_posix.c similarity index 98% rename from src/core/support/subprocess_posix.c rename to src/core/lib/support/subprocess_posix.c index 171054e4da6..662e7dd9991 100644 --- a/src/core/support/subprocess_posix.c +++ b/src/core/lib/support/subprocess_posix.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -37,15 +37,15 @@ #include -#include #include #include -#include -#include #include +#include #include +#include #include #include +#include #include #include diff --git a/src/core/support/subprocess_windows.c b/src/core/lib/support/subprocess_windows.c similarity index 97% rename from src/core/support/subprocess_windows.c rename to src/core/lib/support/subprocess_windows.c index 2b25ef063a9..264306f1bda 100644 --- a/src/core/support/subprocess_windows.c +++ b/src/core/lib/support/subprocess_windows.c @@ -35,15 +35,15 @@ #ifdef GPR_WINDOWS_SUBPROCESS -#include #include #include +#include #include #include #include -#include "src/core/support/string.h" -#include "src/core/support/string_win32.h" +#include "src/core/lib/support/string.h" +#include "src/core/lib/support/string_win32.h" struct gpr_subprocess { PROCESS_INFORMATION pi; diff --git a/src/core/support/sync.c b/src/core/lib/support/sync.c similarity index 100% rename from src/core/support/sync.c rename to src/core/lib/support/sync.c index 69e3e39c5ce..800cf20287a 100644 --- a/src/core/support/sync.c +++ b/src/core/lib/support/sync.c @@ -33,9 +33,9 @@ /* Generic implementation of synchronization primitives. */ +#include #include #include -#include /* Number of mutexes to allocate for events, to avoid lock contention. Should be a prime. */ diff --git a/src/core/support/sync_posix.c b/src/core/lib/support/sync_posix.c similarity index 98% rename from src/core/support/sync_posix.c rename to src/core/lib/support/sync_posix.c index d3c483f1b53..a5e59db8c7e 100644 --- a/src/core/support/sync_posix.c +++ b/src/core/lib/support/sync_posix.c @@ -36,11 +36,11 @@ #ifdef GPR_POSIX_SYNC #include -#include #include #include #include -#include "src/core/profiling/timers.h" +#include +#include "src/core/lib/profiling/timers.h" void gpr_mu_init(gpr_mu* mu) { GPR_ASSERT(pthread_mutex_init(mu, NULL) == 0); } diff --git a/src/core/support/sync_win32.c b/src/core/lib/support/sync_win32.c similarity index 100% rename from src/core/support/sync_win32.c rename to src/core/lib/support/sync_win32.c diff --git a/src/core/support/thd.c b/src/core/lib/support/thd.c similarity index 98% rename from src/core/support/thd.c rename to src/core/lib/support/thd.c index 41daeb5d0e5..d59aace38d0 100644 --- a/src/core/support/thd.c +++ b/src/core/lib/support/thd.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/src/core/support/thd_internal.h b/src/core/lib/support/thd_internal.h similarity index 89% rename from src/core/support/thd_internal.h rename to src/core/lib/support/thd_internal.h index 1508c4691f2..f269a3249e3 100644 --- a/src/core/support/thd_internal.h +++ b/src/core/lib/support/thd_internal.h @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,9 +31,9 @@ * */ -#ifndef GRPC_INTERNAL_CORE_SUPPORT_THD_INTERNAL_H -#define GRPC_INTERNAL_CORE_SUPPORT_THD_INTERNAL_H +#ifndef GRPC_CORE_LIB_SUPPORT_THD_INTERNAL_H +#define GRPC_CORE_LIB_SUPPORT_THD_INTERNAL_H /* Internal interfaces between modules within the gpr support library. */ -#endif /* GRPC_INTERNAL_CORE_SUPPORT_THD_INTERNAL_H */ +#endif /* GRPC_CORE_LIB_SUPPORT_THD_INTERNAL_H */ diff --git a/src/core/support/thd_posix.c b/src/core/lib/support/thd_posix.c similarity index 98% rename from src/core/support/thd_posix.c rename to src/core/lib/support/thd_posix.c index 653a1c88c13..4d874d36566 100644 --- a/src/core/support/thd_posix.c +++ b/src/core/lib/support/thd_posix.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -37,13 +37,13 @@ #ifdef GPR_POSIX_SYNC -#include -#include -#include #include #include #include #include +#include +#include +#include struct thd_arg { void (*body)(void *arg); /* body of a thread */ diff --git a/src/core/support/thd_win32.c b/src/core/lib/support/thd_win32.c similarity index 99% rename from src/core/support/thd_win32.c rename to src/core/lib/support/thd_win32.c index a9db180c1b0..630eb7f6256 100644 --- a/src/core/support/thd_win32.c +++ b/src/core/lib/support/thd_win32.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -37,10 +37,10 @@ #ifdef GPR_WIN32 -#include #include #include #include +#include #if defined(_MSC_VER) #define thread_local __declspec(thread) diff --git a/src/core/support/time.c b/src/core/lib/support/time.c similarity index 100% rename from src/core/support/time.c rename to src/core/lib/support/time.c index 423d12ffc0f..0e2c8fcf1a5 100644 --- a/src/core/support/time.c +++ b/src/core/lib/support/time.c @@ -33,11 +33,11 @@ /* Generic implementation of time calls. */ +#include #include #include #include #include -#include int gpr_time_cmp(gpr_timespec a, gpr_timespec b) { int cmp = (a.tv_sec > b.tv_sec) - (a.tv_sec < b.tv_sec); diff --git a/src/core/support/time_posix.c b/src/core/lib/support/time_posix.c similarity index 98% rename from src/core/support/time_posix.c rename to src/core/lib/support/time_posix.c index 36d75e7da2f..fcfab2f2fab 100644 --- a/src/core/support/time_posix.c +++ b/src/core/lib/support/time_posix.c @@ -32,7 +32,7 @@ */ #include -#include +#include "src/core/lib/support/time_precise.h" #ifdef GPR_POSIX_TIME @@ -44,7 +44,7 @@ #endif #include #include -#include "src/core/support/block_annotate.h" +#include "src/core/lib/support/block_annotate.h" static struct timespec timespec_from_gpr(gpr_timespec gts) { struct timespec rv; @@ -98,9 +98,9 @@ gpr_timespec gpr_now(gpr_clock_type clock_type) { #else /* For some reason Apple's OSes haven't implemented clock_gettime. */ -#include #include #include +#include static double g_time_scale; static uint64_t g_time_start; diff --git a/src/core/support/time_precise.c b/src/core/lib/support/time_precise.c similarity index 98% rename from src/core/support/time_precise.c rename to src/core/lib/support/time_precise.c index a2cf74bc847..31ac47e0f8d 100644 --- a/src/core/support/time_precise.c +++ b/src/core/lib/support/time_precise.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/src/core/support/time_precise.h b/src/core/lib/support/time_precise.h similarity index 90% rename from src/core/support/time_precise.h rename to src/core/lib/support/time_precise.h index 80c5000123d..e1faee1f9fe 100644 --- a/src/core/support/time_precise.h +++ b/src/core/lib/support/time_precise.h @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,12 +31,12 @@ * */ -#ifndef GRPC_CORE_SUPPORT_TIME_PRECISE_H_ -#define GRPC_CORE_SUPPORT_TIME_PRECISE_H_ +#ifndef GRPC_CORE_LIB_SUPPORT_TIME_PRECISE_H +#define GRPC_CORE_LIB_SUPPORT_TIME_PRECISE_H #include void gpr_precise_clock_init(void); void gpr_precise_clock_now(gpr_timespec *clk); -#endif /* GRPC_CORE_SUPPORT_TIME_PRECISE_ */ +#endif /* GRPC_CORE_LIB_SUPPORT_TIME_PRECISE_H */ diff --git a/src/core/support/time_win32.c b/src/core/lib/support/time_win32.c similarity index 97% rename from src/core/support/time_win32.c rename to src/core/lib/support/time_win32.c index 8af957e6f4f..a6ac003fb8e 100644 --- a/src/core/support/time_win32.c +++ b/src/core/lib/support/time_win32.c @@ -39,12 +39,12 @@ #include #include -#include -#include -#include #include +#include +#include -#include "src/core/support/block_annotate.h" +#include "src/core/lib/support/block_annotate.h" +#include "src/core/lib/support/time_precise.h" static LARGE_INTEGER g_start_time; static double g_time_scale; diff --git a/src/core/support/tls_pthread.c b/src/core/lib/support/tls_pthread.c similarity index 98% rename from src/core/support/tls_pthread.c rename to src/core/lib/support/tls_pthread.c index 9683a6e547d..bdc7ed14ae5 100644 --- a/src/core/support/tls_pthread.c +++ b/src/core/lib/support/tls_pthread.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/src/core/support/tmpfile.h b/src/core/lib/support/tmpfile.h similarity index 93% rename from src/core/support/tmpfile.h rename to src/core/lib/support/tmpfile.h index cecc71e2429..4fec2076e35 100644 --- a/src/core/support/tmpfile.h +++ b/src/core/lib/support/tmpfile.h @@ -31,8 +31,8 @@ * */ -#ifndef GRPC_INTERNAL_CORE_SUPPORT_TMPFILE_H -#define GRPC_INTERNAL_CORE_SUPPORT_TMPFILE_H +#ifndef GRPC_CORE_LIB_SUPPORT_TMPFILE_H +#define GRPC_CORE_LIB_SUPPORT_TMPFILE_H #include @@ -52,4 +52,4 @@ FILE *gpr_tmpfile(const char *prefix, char **tmp_filename); } #endif -#endif /* GRPC_INTERNAL_CORE_SUPPORT_TMPFILE_H */ +#endif /* GRPC_CORE_LIB_SUPPORT_TMPFILE_H */ diff --git a/src/core/support/tmpfile_posix.c b/src/core/lib/support/tmpfile_posix.c similarity index 96% rename from src/core/support/tmpfile_posix.c rename to src/core/lib/support/tmpfile_posix.c index b16eeacf9d4..743f45e1bc8 100644 --- a/src/core/support/tmpfile_posix.c +++ b/src/core/lib/support/tmpfile_posix.c @@ -35,7 +35,7 @@ #ifdef GPR_POSIX_FILE -#include "src/core/support/tmpfile.h" +#include "src/core/lib/support/tmpfile.h" #include #include @@ -46,7 +46,7 @@ #include #include -#include "src/core/support/string.h" +#include "src/core/lib/support/string.h" FILE *gpr_tmpfile(const char *prefix, char **tmp_filename) { FILE *result = NULL; diff --git a/src/core/support/tmpfile_win32.c b/src/core/lib/support/tmpfile_win32.c similarity index 96% rename from src/core/support/tmpfile_win32.c rename to src/core/lib/support/tmpfile_win32.c index 3000f0029fe..05d92b60367 100644 --- a/src/core/support/tmpfile_win32.c +++ b/src/core/lib/support/tmpfile_win32.c @@ -44,8 +44,8 @@ #include #include -#include "src/core/support/string_win32.h" -#include "src/core/support/tmpfile.h" +#include "src/core/lib/support/string_win32.h" +#include "src/core/lib/support/tmpfile.h" FILE *gpr_tmpfile(const char *prefix, char **tmp_filename_out) { FILE *result = NULL; diff --git a/src/core/support/wrap_memcpy.c b/src/core/lib/support/wrap_memcpy.c similarity index 100% rename from src/core/support/wrap_memcpy.c rename to src/core/lib/support/wrap_memcpy.c diff --git a/src/core/surface/alarm.c b/src/core/lib/surface/alarm.c similarity index 97% rename from src/core/surface/alarm.c rename to src/core/lib/surface/alarm.c index 8169ede0655..368683378ed 100644 --- a/src/core/surface/alarm.c +++ b/src/core/lib/surface/alarm.c @@ -31,10 +31,10 @@ * */ -#include "src/core/iomgr/timer.h" -#include "src/core/surface/completion_queue.h" #include #include +#include "src/core/lib/iomgr/timer.h" +#include "src/core/lib/surface/completion_queue.h" struct grpc_alarm { grpc_timer alarm; diff --git a/src/core/surface/api_trace.c b/src/core/lib/surface/api_trace.c similarity index 95% rename from src/core/surface/api_trace.c rename to src/core/lib/surface/api_trace.c index 9f0b900d467..3702c024dbd 100644 --- a/src/core/surface/api_trace.c +++ b/src/core/lib/surface/api_trace.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,6 +31,6 @@ * */ -#include "src/core/surface/api_trace.h" +#include "src/core/lib/surface/api_trace.h" int grpc_api_trace = 0; diff --git a/src/core/surface/api_trace.h b/src/core/lib/surface/api_trace.h similarity index 92% rename from src/core/surface/api_trace.h rename to src/core/lib/surface/api_trace.h index 82bbf3b62b3..b50011c9e54 100644 --- a/src/core/surface/api_trace.h +++ b/src/core/lib/surface/api_trace.h @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,11 +31,11 @@ * */ -#ifndef GRPC_INTERNAL_CORE_SURFACE_API_TRACE_H -#define GRPC_INTERNAL_CORE_SURFACE_API_TRACE_H +#ifndef GRPC_CORE_LIB_SURFACE_API_TRACE_H +#define GRPC_CORE_LIB_SURFACE_API_TRACE_H -#include "src/core/debug/trace.h" #include +#include "src/core/lib/debug/trace.h" extern int grpc_api_trace; @@ -62,4 +62,4 @@ extern int grpc_api_trace; gpr_log(GPR_INFO, fmt GRPC_API_TRACE_UNWRAP##nargs args); \ } -#endif /* GRPC_INTERNAL_CORE_SURFACE_API_TRACE_H */ +#endif /* GRPC_CORE_LIB_SURFACE_API_TRACE_H */ diff --git a/src/core/surface/byte_buffer.c b/src/core/lib/surface/byte_buffer.c similarity index 98% rename from src/core/surface/byte_buffer.c rename to src/core/lib/surface/byte_buffer.c index fb39c4531d9..03071ef92c6 100644 --- a/src/core/surface/byte_buffer.c +++ b/src/core/lib/surface/byte_buffer.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/src/core/surface/byte_buffer_reader.c b/src/core/lib/surface/byte_buffer_reader.c similarity index 98% rename from src/core/surface/byte_buffer_reader.c rename to src/core/lib/surface/byte_buffer_reader.c index 46798542273..7248f5fe718 100644 --- a/src/core/surface/byte_buffer_reader.c +++ b/src/core/lib/surface/byte_buffer_reader.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,17 +31,17 @@ * */ -#include #include +#include +#include #include #include #include #include #include -#include -#include "src/core/compression/message_compress.h" +#include "src/core/lib/compression/message_compress.h" static int is_compressed(grpc_byte_buffer *buffer) { switch (buffer->type) { diff --git a/src/core/surface/call.c b/src/core/lib/surface/call.c similarity index 98% rename from src/core/surface/call.c rename to src/core/lib/surface/call.c index 1b117aa6b8c..d63a4a7401e 100644 --- a/src/core/surface/call.c +++ b/src/core/lib/surface/call.c @@ -43,16 +43,16 @@ #include #include -#include "src/core/channel/channel_stack.h" -#include "src/core/compression/algorithm_metadata.h" -#include "src/core/iomgr/timer.h" -#include "src/core/profiling/timers.h" -#include "src/core/support/string.h" -#include "src/core/surface/api_trace.h" -#include "src/core/surface/call.h" -#include "src/core/surface/channel.h" -#include "src/core/surface/completion_queue.h" -#include "src/core/transport/static_metadata.h" +#include "src/core/lib/channel/channel_stack.h" +#include "src/core/lib/compression/algorithm_metadata.h" +#include "src/core/lib/iomgr/timer.h" +#include "src/core/lib/profiling/timers.h" +#include "src/core/lib/support/string.h" +#include "src/core/lib/surface/api_trace.h" +#include "src/core/lib/surface/call.h" +#include "src/core/lib/surface/channel.h" +#include "src/core/lib/surface/completion_queue.h" +#include "src/core/lib/transport/static_metadata.h" /** The maximum number of concurrent batches possible. Based upon the maximum number of individually queueable ops in the batch @@ -1481,3 +1481,11 @@ void *grpc_call_context_get(grpc_call *call, grpc_context_index elem) { } uint8_t grpc_call_is_client(grpc_call *call) { return call->is_client; } + +grpc_compression_algorithm grpc_call_compression_for_level( + grpc_call *call, grpc_compression_level level) { + gpr_mu_lock(&call->mu); + const uint32_t accepted_encodings = call->encodings_accepted_by_peer; + gpr_mu_unlock(&call->mu); + return grpc_compression_algorithm_for_level(level, accepted_encodings); +} diff --git a/src/core/surface/call.h b/src/core/lib/surface/call.h similarity index 87% rename from src/core/surface/call.h rename to src/core/lib/surface/call.h index 0bbffb98ae0..e2e75865be4 100644 --- a/src/core/surface/call.h +++ b/src/core/lib/surface/call.h @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,14 +31,16 @@ * */ -#ifndef GRPC_INTERNAL_CORE_SURFACE_CALL_H -#define GRPC_INTERNAL_CORE_SURFACE_CALL_H +#ifndef GRPC_CORE_LIB_SURFACE_CALL_H +#define GRPC_CORE_LIB_SURFACE_CALL_H + +#include "src/core/lib/channel/channel_stack.h" +#include "src/core/lib/channel/context.h" +#include "src/core/lib/surface/api_trace.h" +#include "src/core/lib/surface/surface_trace.h" -#include "src/core/channel/channel_stack.h" -#include "src/core/channel/context.h" -#include "src/core/surface/api_trace.h" -#include "src/core/surface/surface_trace.h" #include +#include #ifdef __cplusplus extern "C" { @@ -102,8 +104,13 @@ void *grpc_call_context_get(grpc_call *call, grpc_context_index elem); uint8_t grpc_call_is_client(grpc_call *call); +/* Return an appropriate compression algorithm for the requested compression \a + * level in the context of \a call. */ +grpc_compression_algorithm grpc_call_compression_for_level( + grpc_call *call, grpc_compression_level level); + #ifdef __cplusplus } #endif -#endif /* GRPC_INTERNAL_CORE_SURFACE_CALL_H */ +#endif /* GRPC_CORE_LIB_SURFACE_CALL_H */ diff --git a/src/core/surface/call_details.c b/src/core/lib/surface/call_details.c similarity index 96% rename from src/core/surface/call_details.c rename to src/core/lib/surface/call_details.c index 60f0029819c..08f606d84a0 100644 --- a/src/core/surface/call_details.c +++ b/src/core/lib/surface/call_details.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -36,7 +36,7 @@ #include -#include "src/core/surface/api_trace.h" +#include "src/core/lib/surface/api_trace.h" void grpc_call_details_init(grpc_call_details* cd) { GRPC_API_TRACE("grpc_call_details_init(cd=%p)", 1, (cd)); diff --git a/src/core/surface/call_log_batch.c b/src/core/lib/surface/call_log_batch.c similarity index 97% rename from src/core/surface/call_log_batch.c rename to src/core/lib/surface/call_log_batch.c index 46756f418b4..bc5a2ffb655 100644 --- a/src/core/surface/call_log_batch.c +++ b/src/core/lib/surface/call_log_batch.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,11 +31,11 @@ * */ -#include "src/core/surface/call.h" +#include "src/core/lib/surface/call.h" -#include "src/core/support/string.h" #include #include +#include "src/core/lib/support/string.h" static void add_metadata(gpr_strvec *b, const grpc_metadata *md, size_t count) { size_t i; diff --git a/src/core/surface/call_test_only.h b/src/core/lib/surface/call_test_only.h similarity index 92% rename from src/core/surface/call_test_only.h rename to src/core/lib/surface/call_test_only.h index b57c95c64a5..400214189e2 100644 --- a/src/core/surface/call_test_only.h +++ b/src/core/lib/surface/call_test_only.h @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,8 +31,8 @@ * */ -#ifndef GRPC_INTERNAL_CORE_SURFACE_CALL_TEST_ONLY_H -#define GRPC_INTERNAL_CORE_SURFACE_CALL_TEST_ONLY_H +#ifndef GRPC_CORE_LIB_SURFACE_CALL_TEST_ONLY_H +#define GRPC_CORE_LIB_SURFACE_CALL_TEST_ONLY_H #include @@ -61,4 +61,4 @@ uint32_t grpc_call_test_only_get_encodings_accepted_by_peer(grpc_call *call); } #endif -#endif /* GRPC_INTERNAL_CORE_SURFACE_CALL_TEST_ONLY_H */ +#endif /* GRPC_CORE_LIB_SURFACE_CALL_TEST_ONLY_H */ diff --git a/src/core/surface/channel.c b/src/core/lib/surface/channel.c similarity index 91% rename from src/core/surface/channel.c rename to src/core/lib/surface/channel.c index 12d8ebceb90..d815daa70c9 100644 --- a/src/core/surface/channel.c +++ b/src/core/lib/surface/channel.c @@ -31,7 +31,7 @@ * */ -#include "src/core/surface/channel.h" +#include "src/core/lib/surface/channel.h" #include #include @@ -40,13 +40,14 @@ #include #include -#include "src/core/client_config/resolver_registry.h" -#include "src/core/iomgr/iomgr.h" -#include "src/core/support/string.h" -#include "src/core/surface/api_trace.h" -#include "src/core/surface/call.h" -#include "src/core/surface/init.h" -#include "src/core/transport/static_metadata.h" +#include "src/core/lib/client_config/resolver_registry.h" +#include "src/core/lib/iomgr/iomgr.h" +#include "src/core/lib/support/string.h" +#include "src/core/lib/surface/api_trace.h" +#include "src/core/lib/surface/call.h" +#include "src/core/lib/surface/channel_init.h" +#include "src/core/lib/surface/init.h" +#include "src/core/lib/transport/static_metadata.h" /** Cache grpc-status: X mdelems for X = 0..NUM_CACHED_STATUS_ELEMS. * Avoids needing to take a metadata context lock for sending status @@ -82,24 +83,25 @@ struct grpc_channel { static void destroy_channel(grpc_exec_ctx *exec_ctx, void *arg, bool success); -grpc_channel *grpc_channel_create_from_filters( - grpc_exec_ctx *exec_ctx, const char *target, - const grpc_channel_filter **filters, size_t num_filters, - const grpc_channel_args *args, int is_client) { - size_t i; - size_t size = - sizeof(grpc_channel) + grpc_channel_stack_size(filters, num_filters); - grpc_channel *channel = gpr_malloc(size); +grpc_channel *grpc_channel_create(grpc_exec_ctx *exec_ctx, const char *target, + const grpc_channel_args *args, + grpc_channel_stack_type channel_stack_type, + grpc_transport *optional_transport) { + bool is_client = grpc_channel_stack_type_is_client(channel_stack_type); + + grpc_channel *channel = grpc_channel_init_create_stack( + exec_ctx, channel_stack_type, sizeof(grpc_channel), args, 1, + destroy_channel, NULL, optional_transport); + memset(channel, 0, sizeof(*channel)); channel->target = gpr_strdup(target); - GPR_ASSERT(grpc_is_initialized() && "call grpc_init()"); channel->is_client = is_client; gpr_mu_init(&channel->registered_call_mu); channel->registered_calls = NULL; channel->max_message_length = DEFAULT_MAX_MESSAGE_LENGTH; if (args) { - for (i = 0; i < args->num_args; i++) { + for (size_t i = 0; i < args->num_args; i++) { if (0 == strcmp(args->args[i].key, GRPC_ARG_MAX_MESSAGE_LENGTH)) { if (args->args[i].type != GRPC_ARG_INTEGER) { gpr_log(GPR_ERROR, "%s ignored: it must be an integer", @@ -152,11 +154,6 @@ grpc_channel *grpc_channel_create_from_filters( gpr_free(default_authority); } - grpc_channel_stack_init(exec_ctx, 1, destroy_channel, channel, filters, - num_filters, args, - is_client ? "CLIENT_CHANNEL" : "SERVER_CHANNEL", - CHANNEL_STACK_FROM_CHANNEL(channel)); - return channel; } diff --git a/src/core/surface/channel.h b/src/core/lib/surface/channel.h similarity index 82% rename from src/core/surface/channel.h rename to src/core/lib/surface/channel.h index 00240c637fd..09de0fccc93 100644 --- a/src/core/surface/channel.h +++ b/src/core/lib/surface/channel.h @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,16 +31,17 @@ * */ -#ifndef GRPC_INTERNAL_CORE_SURFACE_CHANNEL_H -#define GRPC_INTERNAL_CORE_SURFACE_CHANNEL_H +#ifndef GRPC_CORE_LIB_SURFACE_CHANNEL_H +#define GRPC_CORE_LIB_SURFACE_CHANNEL_H -#include "src/core/channel/channel_stack.h" -#include "src/core/client_config/subchannel_factory.h" +#include "src/core/lib/channel/channel_stack.h" +#include "src/core/lib/client_config/subchannel_factory.h" +#include "src/core/lib/surface/channel_stack_type.h" -grpc_channel *grpc_channel_create_from_filters( - grpc_exec_ctx *exec_ctx, const char *target, - const grpc_channel_filter **filters, size_t count, - const grpc_channel_args *args, int is_client); +grpc_channel *grpc_channel_create(grpc_exec_ctx *exec_ctx, const char *target, + const grpc_channel_args *args, + grpc_channel_stack_type channel_stack_type, + grpc_transport *optional_transport); /** Get a (borrowed) pointer to this channels underlying channel stack */ grpc_channel_stack *grpc_channel_get_channel_stack(grpc_channel *channel); @@ -71,4 +72,4 @@ void grpc_channel_internal_unref(grpc_exec_ctx *exec_ctx, grpc_channel_internal_unref(exec_ctx, channel) #endif -#endif /* GRPC_INTERNAL_CORE_SURFACE_CHANNEL_H */ +#endif /* GRPC_CORE_LIB_SURFACE_CHANNEL_H */ diff --git a/src/core/surface/channel_connectivity.c b/src/core/lib/surface/channel_connectivity.c similarity index 87% rename from src/core/surface/channel_connectivity.c rename to src/core/lib/surface/channel_connectivity.c index 2dd4fce26b2..2f5d763e703 100644 --- a/src/core/surface/channel_connectivity.c +++ b/src/core/lib/surface/channel_connectivity.c @@ -31,16 +31,15 @@ * */ -#include "src/core/surface/channel.h" +#include "src/core/lib/surface/channel.h" #include #include -#include "src/core/channel/client_channel.h" -#include "src/core/channel/client_uchannel.h" -#include "src/core/iomgr/timer.h" -#include "src/core/surface/api_trace.h" -#include "src/core/surface/completion_queue.h" +#include "src/core/lib/channel/client_channel.h" +#include "src/core/lib/iomgr/timer.h" +#include "src/core/lib/surface/api_trace.h" +#include "src/core/lib/surface/completion_queue.h" grpc_connectivity_state grpc_channel_check_connectivity_state( grpc_channel *channel, int try_to_connect) { @@ -58,12 +57,6 @@ grpc_connectivity_state grpc_channel_check_connectivity_state( grpc_exec_ctx_finish(&exec_ctx); return state; } - if (client_channel_elem->filter == &grpc_client_uchannel_filter) { - state = grpc_client_uchannel_check_connectivity_state( - &exec_ctx, client_channel_elem, try_to_connect); - grpc_exec_ctx_finish(&exec_ctx); - return state; - } gpr_log(GPR_ERROR, "grpc_channel_check_connectivity_state called on something that is " "not a (u)client channel, but '%s'", @@ -98,9 +91,6 @@ static void delete_state_watcher(grpc_exec_ctx *exec_ctx, state_watcher *w) { if (client_channel_elem->filter == &grpc_client_channel_filter) { GRPC_CHANNEL_INTERNAL_UNREF(exec_ctx, w->channel, "watch_channel_connectivity"); - } else if (client_channel_elem->filter == &grpc_client_uchannel_filter) { - GRPC_CHANNEL_INTERNAL_UNREF(exec_ctx, w->channel, - "watch_uchannel_connectivity"); } else { abort(); } @@ -209,11 +199,8 @@ void grpc_channel_watch_connectivity_state( grpc_client_channel_watch_connectivity_state(&exec_ctx, client_channel_elem, grpc_cq_pollset(cq), &w->state, &w->on_complete); - } else if (client_channel_elem->filter == &grpc_client_uchannel_filter) { - GRPC_CHANNEL_INTERNAL_REF(channel, "watch_uchannel_connectivity"); - grpc_client_uchannel_watch_connectivity_state( - &exec_ctx, client_channel_elem, grpc_cq_pollset(cq), &w->state, - &w->on_complete); + } else { + abort(); } grpc_exec_ctx_finish(&exec_ctx); diff --git a/src/core/lib/surface/channel_init.c b/src/core/lib/surface/channel_init.c new file mode 100644 index 00000000000..fc69f61f772 --- /dev/null +++ b/src/core/lib/surface/channel_init.c @@ -0,0 +1,146 @@ +/* + * + * Copyright 2016, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include "src/core/lib/surface/channel_init.h" + +#include +#include + +typedef struct stage_slot { + grpc_channel_init_stage fn; + void *arg; + int priority; + size_t insertion_order; +} stage_slot; + +typedef struct stage_slots { + stage_slot *slots; + size_t num_slots; + size_t cap_slots; +} stage_slots; + +static stage_slots g_slots[GRPC_NUM_CHANNEL_STACK_TYPES]; +static bool g_finalized; + +void grpc_channel_init_init(void) { + for (int i = 0; i < GRPC_NUM_CHANNEL_STACK_TYPES; i++) { + g_slots[i].slots = NULL; + g_slots[i].num_slots = 0; + g_slots[i].cap_slots = 0; + } + g_finalized = false; +} + +void grpc_channel_init_register_stage(grpc_channel_stack_type type, + int priority, + grpc_channel_init_stage stage, + void *stage_arg) { + GPR_ASSERT(!g_finalized); + if (g_slots[type].cap_slots == g_slots[type].num_slots) { + g_slots[type].cap_slots = GPR_MAX(8, 3 * g_slots[type].cap_slots / 2); + g_slots[type].slots = + gpr_realloc(g_slots[type].slots, + g_slots[type].cap_slots * sizeof(*g_slots[type].slots)); + } + stage_slot *s = &g_slots[type].slots[g_slots[type].num_slots++]; + s->insertion_order = g_slots[type].num_slots; + s->priority = priority; + s->fn = stage; + s->arg = stage_arg; +} + +static int compare_slots(const void *a, const void *b) { + const stage_slot *sa = a; + const stage_slot *sb = b; + + int c = GPR_ICMP(sa->priority, sb->priority); + if (c != 0) return c; + return GPR_ICMP(sa->insertion_order, sb->insertion_order); +} + +void grpc_channel_init_finalize(void) { + GPR_ASSERT(!g_finalized); + for (int i = 0; i < GRPC_NUM_CHANNEL_STACK_TYPES; i++) { + qsort(g_slots[i].slots, g_slots[i].num_slots, sizeof(*g_slots[i].slots), + compare_slots); + } + g_finalized = true; +} + +void grpc_channel_init_shutdown(void) { + for (int i = 0; i < GRPC_NUM_CHANNEL_STACK_TYPES; i++) { + gpr_free(g_slots[i].slots); + g_slots[i].slots = (void *)(uintptr_t)0xdeadbeef; + } +} + +static const char *name_for_type(grpc_channel_stack_type type) { + switch (type) { + case GRPC_CLIENT_CHANNEL: + return "CLIENT_CHANNEL"; + case GRPC_CLIENT_SUBCHANNEL: + return "CLIENT_SUBCHANNEL"; + case GRPC_SERVER_CHANNEL: + return "SERVER_CHANNEL"; + case GRPC_CLIENT_LAME_CHANNEL: + return "CLIENT_LAME_CHANNEL"; + case GRPC_CLIENT_DIRECT_CHANNEL: + return "CLIENT_DIRECT_CHANNEL"; + case GRPC_NUM_CHANNEL_STACK_TYPES: + break; + } + GPR_UNREACHABLE_CODE(return "UNKNOWN"); +} + +void *grpc_channel_init_create_stack( + grpc_exec_ctx *exec_ctx, grpc_channel_stack_type type, size_t prefix_bytes, + const grpc_channel_args *args, int initial_refs, grpc_iomgr_cb_func destroy, + void *destroy_arg, grpc_transport *transport) { + GPR_ASSERT(g_finalized); + + grpc_channel_stack_builder *builder = grpc_channel_stack_builder_create(); + grpc_channel_stack_builder_set_name(builder, name_for_type(type)); + grpc_channel_stack_builder_set_channel_arguments(builder, args); + grpc_channel_stack_builder_set_transport(builder, transport); + + for (size_t i = 0; i < g_slots[type].num_slots; i++) { + const stage_slot *slot = &g_slots[type].slots[i]; + if (!slot->fn(builder, slot->arg)) { + grpc_channel_stack_builder_destroy(builder); + return NULL; + } + } + + return grpc_channel_stack_builder_finish(exec_ctx, builder, prefix_bytes, + initial_refs, destroy, destroy_arg); +} diff --git a/src/core/lib/surface/channel_init.h b/src/core/lib/surface/channel_init.h new file mode 100644 index 00000000000..a4d8271ca6a --- /dev/null +++ b/src/core/lib/surface/channel_init.h @@ -0,0 +1,86 @@ +/* + * + * Copyright 2016, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#ifndef GRPC_CORE_LIB_SURFACE_CHANNEL_INIT_H +#define GRPC_CORE_LIB_SURFACE_CHANNEL_INIT_H + +#include "src/core/lib/channel/channel_stack_builder.h" +#include "src/core/lib/surface/channel_stack_type.h" +#include "src/core/lib/transport/transport.h" + +/// This module provides a way for plugins (and the grpc core library itself) +/// to register mutators for channel stacks. +/// It also provides a universal entry path to run those mutators to build +/// a channel stack for various subsystems. + +/// One stage of mutation: call functions against \a builder to influence the +/// finally constructed channel stack +typedef bool (*grpc_channel_init_stage)(grpc_channel_stack_builder *builder, + void *arg); + +/// Global initialization of the system +void grpc_channel_init_init(void); + +/// Register one stage of mutators. +/// Stages are run in priority order (lowest to highest), and then in +/// registration order (in the case of a tie). +/// Stages are registered against one of the pre-determined channel stack +/// types. +void grpc_channel_init_register_stage(grpc_channel_stack_type type, + int priority, + grpc_channel_init_stage stage_fn, + void *stage_arg); + +/// Finalize registration. No more calls to grpc_channel_init_register_stage are +/// allowed. +void grpc_channel_init_finalize(void); +/// Shutdown the channel init system +void grpc_channel_init_shutdown(void); + +/// Construct a channel stack of some sort: see channel_stack.h for details +/// \a type is the type of channel stack to create +/// \a prefix_bytes is the number of bytes before the channel stack to allocate +/// \a args are configuration arguments for the channel stack +/// \a initial_refs is the initial refcount to give the channel stack +/// \a destroy and \a destroy_arg specify how to destroy the channel stack +/// if destroy_arg is NULL, the returned value from this function will be +/// substituted +/// \a optional_transport is either NULL or a constructed transport object +/// Returns a pointer to the base of the memory allocated (the actual channel +/// stack object will be prefix_bytes past that pointer) +void *grpc_channel_init_create_stack( + grpc_exec_ctx *exec_ctx, grpc_channel_stack_type type, size_t prefix_bytes, + const grpc_channel_args *args, int initial_refs, grpc_iomgr_cb_func destroy, + void *destroy_arg, grpc_transport *optional_transport); + +#endif /* GRPC_CORE_LIB_SURFACE_CHANNEL_INIT_H */ diff --git a/src/core/surface/channel_ping.c b/src/core/lib/surface/channel_ping.c similarity index 95% rename from src/core/surface/channel_ping.c rename to src/core/lib/surface/channel_ping.c index 983f1c8a66d..dd862cdadde 100644 --- a/src/core/surface/channel_ping.c +++ b/src/core/lib/surface/channel_ping.c @@ -31,15 +31,15 @@ * */ -#include "src/core/surface/channel.h" +#include "src/core/lib/surface/channel.h" #include #include #include -#include "src/core/surface/api_trace.h" -#include "src/core/surface/completion_queue.h" +#include "src/core/lib/surface/api_trace.h" +#include "src/core/lib/surface/completion_queue.h" typedef struct { grpc_closure closure; diff --git a/src/core/lib/surface/channel_stack_type.c b/src/core/lib/surface/channel_stack_type.c new file mode 100644 index 00000000000..c35d603ca3a --- /dev/null +++ b/src/core/lib/surface/channel_stack_type.c @@ -0,0 +1,54 @@ +/* + * + * Copyright 2016, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include "src/core/lib/surface/channel_stack_type.h" +#include +#include + +bool grpc_channel_stack_type_is_client(grpc_channel_stack_type type) { + switch (type) { + case GRPC_CLIENT_CHANNEL: + return true; + case GRPC_CLIENT_SUBCHANNEL: + return true; + case GRPC_CLIENT_LAME_CHANNEL: + return true; + case GRPC_CLIENT_DIRECT_CHANNEL: + return true; + case GRPC_SERVER_CHANNEL: + return false; + case GRPC_NUM_CHANNEL_STACK_TYPES: + break; + } + GPR_UNREACHABLE_CODE(return true;); +} diff --git a/src/core/httpcli/parser.h b/src/core/lib/surface/channel_stack_type.h similarity index 64% rename from src/core/httpcli/parser.h rename to src/core/lib/surface/channel_stack_type.h index cd0383637ff..16608fa3863 100644 --- a/src/core/httpcli/parser.h +++ b/src/core/lib/surface/channel_stack_type.h @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,34 +31,28 @@ * */ -#ifndef GRPC_INTERNAL_CORE_HTTPCLI_PARSER_H -#define GRPC_INTERNAL_CORE_HTTPCLI_PARSER_H +#ifndef GRPC_CORE_LIB_SURFACE_CHANNEL_STACK_TYPE_H +#define GRPC_CORE_LIB_SURFACE_CHANNEL_STACK_TYPE_H -#include "src/core/httpcli/httpcli.h" -#include -#include +#include typedef enum { - GRPC_HTTPCLI_INITIAL_RESPONSE, - GRPC_HTTPCLI_HEADERS, - GRPC_HTTPCLI_BODY -} grpc_httpcli_parser_state; - -typedef struct { - grpc_httpcli_parser_state state; - - grpc_httpcli_response r; - size_t body_capacity; - size_t hdr_capacity; - - uint8_t cur_line[GRPC_HTTPCLI_MAX_HEADER_LENGTH]; - size_t cur_line_length; -} grpc_httpcli_parser; - -void grpc_httpcli_parser_init(grpc_httpcli_parser* parser); -void grpc_httpcli_parser_destroy(grpc_httpcli_parser* parser); - -int grpc_httpcli_parser_parse(grpc_httpcli_parser* parser, gpr_slice slice); -int grpc_httpcli_parser_eof(grpc_httpcli_parser* parser); - -#endif /* GRPC_INTERNAL_CORE_HTTPCLI_PARSER_H */ + // normal top-half client channel with load-balancing, connection management + GRPC_CLIENT_CHANNEL, + // bottom-half of a client channel: everything that happens post-load + // balancing (bound to a specific transport) + GRPC_CLIENT_SUBCHANNEL, + // a permanently broken client channel + GRPC_CLIENT_LAME_CHANNEL, + // a directly connected client channel (without load-balancing, directly talks + // to a transport) + GRPC_CLIENT_DIRECT_CHANNEL, + // server side channel + GRPC_SERVER_CHANNEL, + // must be last + GRPC_NUM_CHANNEL_STACK_TYPES +} grpc_channel_stack_type; + +bool grpc_channel_stack_type_is_client(grpc_channel_stack_type type); + +#endif /* GRPC_CORE_LIB_SURFACE_CHANNEL_STACK_TYPE_H */ diff --git a/src/core/surface/completion_queue.c b/src/core/lib/surface/completion_queue.c similarity index 97% rename from src/core/surface/completion_queue.c rename to src/core/lib/surface/completion_queue.c index b22818ea87d..a0d7002053d 100644 --- a/src/core/surface/completion_queue.c +++ b/src/core/lib/surface/completion_queue.c @@ -31,7 +31,7 @@ * */ -#include "src/core/surface/completion_queue.h" +#include "src/core/lib/surface/completion_queue.h" #include #include @@ -41,14 +41,14 @@ #include #include -#include "src/core/iomgr/pollset.h" -#include "src/core/iomgr/timer.h" -#include "src/core/profiling/timers.h" -#include "src/core/support/string.h" -#include "src/core/surface/api_trace.h" -#include "src/core/surface/call.h" -#include "src/core/surface/event_string.h" -#include "src/core/surface/surface_trace.h" +#include "src/core/lib/iomgr/pollset.h" +#include "src/core/lib/iomgr/timer.h" +#include "src/core/lib/profiling/timers.h" +#include "src/core/lib/support/string.h" +#include "src/core/lib/surface/api_trace.h" +#include "src/core/lib/surface/call.h" +#include "src/core/lib/surface/event_string.h" +#include "src/core/lib/surface/surface_trace.h" typedef struct { grpc_pollset_worker **worker; diff --git a/src/core/surface/completion_queue.h b/src/core/lib/surface/completion_queue.h similarity index 94% rename from src/core/surface/completion_queue.h rename to src/core/lib/surface/completion_queue.h index 27ef90f2d58..35591cb6f42 100644 --- a/src/core/surface/completion_queue.h +++ b/src/core/lib/surface/completion_queue.h @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,13 +31,13 @@ * */ -#ifndef GRPC_INTERNAL_CORE_SURFACE_COMPLETION_QUEUE_H -#define GRPC_INTERNAL_CORE_SURFACE_COMPLETION_QUEUE_H +#ifndef GRPC_CORE_LIB_SURFACE_COMPLETION_QUEUE_H +#define GRPC_CORE_LIB_SURFACE_COMPLETION_QUEUE_H /* Internal API for completion queues */ -#include "src/core/iomgr/pollset.h" #include +#include "src/core/lib/iomgr/pollset.h" typedef struct grpc_cq_completion { /** user supplied tag */ @@ -88,4 +88,4 @@ int grpc_cq_is_server_cq(grpc_completion_queue *cc); void grpc_cq_global_init(void); void grpc_cq_global_shutdown(void); -#endif /* GRPC_INTERNAL_CORE_SURFACE_COMPLETION_QUEUE_H */ +#endif /* GRPC_CORE_LIB_SURFACE_COMPLETION_QUEUE_H */ diff --git a/src/core/surface/event_string.c b/src/core/lib/surface/event_string.c similarity index 95% rename from src/core/surface/event_string.c rename to src/core/lib/surface/event_string.c index 33cd4a43aa0..360c718a171 100644 --- a/src/core/surface/event_string.c +++ b/src/core/lib/surface/event_string.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,13 +31,13 @@ * */ -#include "src/core/surface/event_string.h" +#include "src/core/lib/surface/event_string.h" #include -#include "src/core/support/string.h" #include #include +#include "src/core/lib/support/string.h" static void addhdr(gpr_strvec *buf, grpc_event *ev) { char *tmp; diff --git a/src/core/surface/event_string.h b/src/core/lib/surface/event_string.h similarity index 90% rename from src/core/surface/event_string.h rename to src/core/lib/surface/event_string.h index 07c474e3a02..577e9c718f2 100644 --- a/src/core/surface/event_string.h +++ b/src/core/lib/surface/event_string.h @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,12 +31,12 @@ * */ -#ifndef GRPC_INTERNAL_CORE_SURFACE_EVENT_STRING_H -#define GRPC_INTERNAL_CORE_SURFACE_EVENT_STRING_H +#ifndef GRPC_CORE_LIB_SURFACE_EVENT_STRING_H +#define GRPC_CORE_LIB_SURFACE_EVENT_STRING_H #include /* Returns a string describing an event. Must be later freed with gpr_free() */ char *grpc_event_string(grpc_event *ev); -#endif /* GRPC_INTERNAL_CORE_SURFACE_EVENT_STRING_H */ +#endif /* GRPC_CORE_LIB_SURFACE_EVENT_STRING_H */ diff --git a/src/core/lib/surface/init.c b/src/core/lib/surface/init.c new file mode 100644 index 00000000000..dbfc8a9336e --- /dev/null +++ b/src/core/lib/surface/init.c @@ -0,0 +1,239 @@ +/* + * + * Copyright 2015-2016, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include + +#include +#include + +#include +#include +#include +/* TODO(ctiller): find another way? - better not to include census here */ +#include "src/core/ext/transport/chttp2/transport/chttp2_transport.h" +#include "src/core/lib/census/grpc_plugin.h" +#include "src/core/lib/channel/channel_stack.h" +#include "src/core/lib/channel/client_channel.h" +#include "src/core/lib/channel/compress_filter.h" +#include "src/core/lib/channel/connected_channel.h" +#include "src/core/lib/channel/http_client_filter.h" +#include "src/core/lib/channel/http_server_filter.h" +#include "src/core/lib/client_config/lb_policies/pick_first.h" +#include "src/core/lib/client_config/lb_policies/round_robin.h" +#include "src/core/lib/client_config/lb_policy_registry.h" +#include "src/core/lib/client_config/resolver_registry.h" +#include "src/core/lib/client_config/resolvers/dns_resolver.h" +#include "src/core/lib/client_config/resolvers/sockaddr_resolver.h" +#include "src/core/lib/client_config/subchannel.h" +#include "src/core/lib/client_config/subchannel_index.h" +#include "src/core/lib/debug/trace.h" +#include "src/core/lib/iomgr/executor.h" +#include "src/core/lib/iomgr/iomgr.h" +#include "src/core/lib/profiling/timers.h" +#include "src/core/lib/surface/api_trace.h" +#include "src/core/lib/surface/call.h" +#include "src/core/lib/surface/channel_init.h" +#include "src/core/lib/surface/completion_queue.h" +#include "src/core/lib/surface/init.h" +#include "src/core/lib/surface/lame_client.h" +#include "src/core/lib/surface/server.h" +#include "src/core/lib/surface/surface_trace.h" +#include "src/core/lib/transport/connectivity_state.h" +#include "src/core/lib/transport/transport_impl.h" + +#ifndef GRPC_DEFAULT_NAME_PREFIX +#define GRPC_DEFAULT_NAME_PREFIX "dns:///" +#endif + +#define MAX_PLUGINS 128 + +static gpr_once g_basic_init = GPR_ONCE_INIT; +static gpr_mu g_init_mu; +static int g_initializations; + +static void do_basic_init(void) { + gpr_mu_init(&g_init_mu); + /* TODO(ctiller): ideally remove this strict linkage */ + grpc_register_plugin(census_grpc_plugin_init, census_grpc_plugin_destroy); + g_initializations = 0; +} + +static bool append_filter(grpc_channel_stack_builder *builder, void *arg) { + return grpc_channel_stack_builder_append_filter( + builder, (const grpc_channel_filter *)arg, NULL, NULL); +} + +static bool prepend_filter(grpc_channel_stack_builder *builder, void *arg) { + return grpc_channel_stack_builder_prepend_filter( + builder, (const grpc_channel_filter *)arg, NULL, NULL); +} + +static bool maybe_add_http_filter(grpc_channel_stack_builder *builder, + void *arg) { + grpc_transport *t = grpc_channel_stack_builder_get_transport(builder); + if (t && strstr(t->vtable->name, "http")) { + return grpc_channel_stack_builder_prepend_filter( + builder, (const grpc_channel_filter *)arg, NULL, NULL); + } + return true; +} + +static void register_builtin_channel_init() { + grpc_channel_init_register_stage(GRPC_CLIENT_CHANNEL, INT_MAX, prepend_filter, + (void *)&grpc_compress_filter); + grpc_channel_init_register_stage(GRPC_CLIENT_DIRECT_CHANNEL, INT_MAX, + prepend_filter, + (void *)&grpc_compress_filter); + grpc_channel_init_register_stage(GRPC_SERVER_CHANNEL, INT_MAX, prepend_filter, + (void *)&grpc_compress_filter); + grpc_channel_init_register_stage(GRPC_CLIENT_SUBCHANNEL, INT_MAX, + maybe_add_http_filter, + (void *)&grpc_http_client_filter); + grpc_channel_init_register_stage(GRPC_CLIENT_SUBCHANNEL, INT_MAX, + grpc_add_connected_filter, NULL); + grpc_channel_init_register_stage(GRPC_CLIENT_DIRECT_CHANNEL, INT_MAX, + maybe_add_http_filter, + (void *)&grpc_http_client_filter); + grpc_channel_init_register_stage(GRPC_CLIENT_DIRECT_CHANNEL, INT_MAX, + grpc_add_connected_filter, NULL); + grpc_channel_init_register_stage(GRPC_SERVER_CHANNEL, INT_MAX, + maybe_add_http_filter, + (void *)&grpc_http_server_filter); + grpc_channel_init_register_stage(GRPC_SERVER_CHANNEL, INT_MAX, + grpc_add_connected_filter, NULL); + grpc_channel_init_register_stage(GRPC_CLIENT_CHANNEL, INT_MAX, append_filter, + (void *)&grpc_client_channel_filter); + grpc_channel_init_register_stage(GRPC_CLIENT_LAME_CHANNEL, INT_MAX, + append_filter, (void *)&grpc_lame_filter); + grpc_channel_init_register_stage(GRPC_SERVER_CHANNEL, INT_MAX, prepend_filter, + (void *)&grpc_server_top_filter); +} + +typedef struct grpc_plugin { + void (*init)(); + void (*destroy)(); +} grpc_plugin; + +static grpc_plugin g_all_of_the_plugins[MAX_PLUGINS]; +static int g_number_of_plugins = 0; + +void grpc_register_plugin(void (*init)(void), void (*destroy)(void)) { + GRPC_API_TRACE("grpc_register_plugin(init=%p, destroy=%p)", 2, + ((void *)(intptr_t)init, (void *)(intptr_t)destroy)); + GPR_ASSERT(g_number_of_plugins != MAX_PLUGINS); + g_all_of_the_plugins[g_number_of_plugins].init = init; + g_all_of_the_plugins[g_number_of_plugins].destroy = destroy; + g_number_of_plugins++; +} + +void grpc_init(void) { + int i; + gpr_once_init(&g_basic_init, do_basic_init); + + gpr_mu_lock(&g_init_mu); + if (++g_initializations == 1) { + gpr_time_init(); + grpc_mdctx_global_init(); + grpc_channel_init_init(); + grpc_lb_policy_registry_init(grpc_pick_first_lb_factory_create()); + grpc_register_lb_policy(grpc_pick_first_lb_factory_create()); + grpc_register_lb_policy(grpc_round_robin_lb_factory_create()); + grpc_resolver_registry_init(GRPC_DEFAULT_NAME_PREFIX); + grpc_register_resolver_type(grpc_dns_resolver_factory_create()); + grpc_register_resolver_type(grpc_ipv4_resolver_factory_create()); + grpc_register_resolver_type(grpc_ipv6_resolver_factory_create()); +#ifdef GPR_POSIX_SOCKET + grpc_register_resolver_type(grpc_unix_resolver_factory_create()); +#endif + grpc_register_tracer("api", &grpc_api_trace); + grpc_register_tracer("channel", &grpc_trace_channel); + grpc_register_tracer("http", &grpc_http_trace); + grpc_register_tracer("flowctl", &grpc_flowctl_trace); + grpc_register_tracer("connectivity_state", &grpc_connectivity_state_trace); + grpc_register_tracer("channel_stack_builder", + &grpc_trace_channel_stack_builder); + grpc_security_pre_init(); + grpc_iomgr_init(); + grpc_executor_init(); + grpc_tracer_init("GRPC_TRACE"); + gpr_timers_global_init(); + grpc_cq_global_init(); + grpc_subchannel_index_init(); + for (i = 0; i < g_number_of_plugins; i++) { + if (g_all_of_the_plugins[i].init != NULL) { + g_all_of_the_plugins[i].init(); + } + } + /* register channel finalization AFTER all plugins, to ensure that it's run + * at the appropriate time */ + grpc_register_security_filters(); + register_builtin_channel_init(); + /* no more changes to channel init pipelines */ + grpc_channel_init_finalize(); + } + gpr_mu_unlock(&g_init_mu); + GRPC_API_TRACE("grpc_init(void)", 0, ()); +} + +void grpc_shutdown(void) { + int i; + GRPC_API_TRACE("grpc_shutdown(void)", 0, ()); + gpr_mu_lock(&g_init_mu); + if (--g_initializations == 0) { + grpc_executor_shutdown(); + grpc_cq_global_shutdown(); + grpc_iomgr_shutdown(); + grpc_subchannel_index_shutdown(); + gpr_timers_global_destroy(); + grpc_tracer_shutdown(); + grpc_resolver_registry_shutdown(); + grpc_lb_policy_registry_shutdown(); + for (i = 0; i < g_number_of_plugins; i++) { + if (g_all_of_the_plugins[i].destroy != NULL) { + g_all_of_the_plugins[i].destroy(); + } + } + grpc_channel_init_shutdown(); + grpc_mdctx_global_shutdown(); + } + gpr_mu_unlock(&g_init_mu); +} + +int grpc_is_initialized(void) { + int r; + gpr_once_init(&g_basic_init, do_basic_init); + gpr_mu_lock(&g_init_mu); + r = g_initializations > 0; + gpr_mu_unlock(&g_init_mu); + return r; +} diff --git a/src/core/surface/init.h b/src/core/lib/surface/init.h similarity index 89% rename from src/core/surface/init.h rename to src/core/lib/surface/init.h index 771c30f4125..10e2a5896e3 100644 --- a/src/core/surface/init.h +++ b/src/core/lib/surface/init.h @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,10 +31,11 @@ * */ -#ifndef GRPC_INTERNAL_CORE_SURFACE_INIT_H -#define GRPC_INTERNAL_CORE_SURFACE_INIT_H +#ifndef GRPC_CORE_LIB_SURFACE_INIT_H +#define GRPC_CORE_LIB_SURFACE_INIT_H +void grpc_register_security_filters(void); void grpc_security_pre_init(void); int grpc_is_initialized(void); -#endif /* GRPC_INTERNAL_CORE_SURFACE_INIT_H */ +#endif /* GRPC_CORE_LIB_SURFACE_INIT_H */ diff --git a/src/core/lib/surface/init_secure.c b/src/core/lib/surface/init_secure.c new file mode 100644 index 00000000000..d3c2f645a76 --- /dev/null +++ b/src/core/lib/surface/init_secure.c @@ -0,0 +1,89 @@ +/* + * + * Copyright 2015-2016, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include "src/core/lib/surface/init.h" + +#include +#include + +#include "src/core/lib/debug/trace.h" +#include "src/core/lib/security/auth_filters.h" +#include "src/core/lib/security/credentials.h" +#include "src/core/lib/security/secure_endpoint.h" +#include "src/core/lib/security/security_connector.h" +#include "src/core/lib/surface/channel_init.h" +#include "src/core/lib/tsi/transport_security_interface.h" + +void grpc_security_pre_init(void) { + grpc_register_tracer("secure_endpoint", &grpc_trace_secure_endpoint); + grpc_register_tracer("transport_security", &tsi_tracing_enabled); +} + +static bool maybe_prepend_client_auth_filter( + grpc_channel_stack_builder *builder, void *arg) { + const grpc_channel_args *args = + grpc_channel_stack_builder_get_channel_arguments(builder); + if (args) { + for (size_t i = 0; i < args->num_args; i++) { + if (0 == strcmp(GRPC_SECURITY_CONNECTOR_ARG, args->args[i].key)) { + return grpc_channel_stack_builder_prepend_filter( + builder, &grpc_client_auth_filter, NULL, NULL); + } + } + } + return true; +} + +static bool maybe_prepend_server_auth_filter( + grpc_channel_stack_builder *builder, void *arg) { + const grpc_channel_args *args = + grpc_channel_stack_builder_get_channel_arguments(builder); + if (args) { + for (size_t i = 0; i < args->num_args; i++) { + if (0 == strcmp(GRPC_SERVER_CREDENTIALS_ARG, args->args[i].key)) { + return grpc_channel_stack_builder_prepend_filter( + builder, &grpc_server_auth_filter, NULL, NULL); + } + } + } + return true; +} + +void grpc_register_security_filters(void) { + grpc_channel_init_register_stage(GRPC_CLIENT_SUBCHANNEL, INT_MAX, + maybe_prepend_client_auth_filter, NULL); + grpc_channel_init_register_stage(GRPC_CLIENT_DIRECT_CHANNEL, INT_MAX, + maybe_prepend_client_auth_filter, NULL); + grpc_channel_init_register_stage(GRPC_SERVER_CHANNEL, INT_MAX, + maybe_prepend_server_auth_filter, NULL); +} diff --git a/src/core/surface/init_unsecure.c b/src/core/lib/surface/init_unsecure.c similarity index 92% rename from src/core/surface/init_unsecure.c rename to src/core/lib/surface/init_unsecure.c index 630d564a7d8..243c005d863 100644 --- a/src/core/surface/init_unsecure.c +++ b/src/core/lib/surface/init_unsecure.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,6 +31,8 @@ * */ -#include "src/core/surface/init.h" +#include "src/core/lib/surface/init.h" void grpc_security_pre_init(void) {} + +void grpc_register_security_filters(void) {} diff --git a/src/core/surface/lame_client.c b/src/core/lib/surface/lame_client.c similarity index 86% rename from src/core/surface/lame_client.c rename to src/core/lib/surface/lame_client.c index 537069e9848..95ec4b06c3f 100644 --- a/src/core/surface/lame_client.c +++ b/src/core/lib/surface/lame_client.c @@ -31,17 +31,19 @@ * */ +#include "src/core/lib/surface/lame_client.h" + #include #include -#include "src/core/channel/channel_stack.h" -#include "src/core/support/string.h" -#include "src/core/surface/api_trace.h" -#include "src/core/surface/channel.h" -#include "src/core/surface/call.h" #include #include +#include "src/core/lib/channel/channel_stack.h" +#include "src/core/lib/support/string.h" +#include "src/core/lib/surface/api_trace.h" +#include "src/core/lib/surface/call.h" +#include "src/core/lib/surface/channel.h" typedef struct { grpc_linked_mdelem status; @@ -115,11 +117,18 @@ static void init_channel_elem(grpc_exec_ctx *exec_ctx, static void destroy_channel_elem(grpc_exec_ctx *exec_ctx, grpc_channel_element *elem) {} -static const grpc_channel_filter lame_filter = { - lame_start_transport_stream_op, lame_start_transport_op, sizeof(call_data), - init_call_elem, grpc_call_stack_ignore_set_pollset, destroy_call_elem, - sizeof(channel_data), init_channel_elem, destroy_channel_elem, - lame_get_peer, "lame-client", +const grpc_channel_filter grpc_lame_filter = { + lame_start_transport_stream_op, + lame_start_transport_op, + sizeof(call_data), + init_call_elem, + grpc_call_stack_ignore_set_pollset, + destroy_call_elem, + sizeof(channel_data), + init_channel_elem, + destroy_channel_elem, + lame_get_peer, + "lame-client", }; #define CHANNEL_STACK_FROM_CHANNEL(c) ((grpc_channel_stack *)((c) + 1)) @@ -127,19 +136,17 @@ static const grpc_channel_filter lame_filter = { grpc_channel *grpc_lame_client_channel_create(const char *target, grpc_status_code error_code, const char *error_message) { - grpc_channel *channel; + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; grpc_channel_element *elem; channel_data *chand; - grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - static const grpc_channel_filter *filters[] = {&lame_filter}; - channel = - grpc_channel_create_from_filters(&exec_ctx, target, filters, 1, NULL, 1); + grpc_channel *channel = grpc_channel_create(&exec_ctx, target, NULL, + GRPC_CLIENT_LAME_CHANNEL, NULL); elem = grpc_channel_stack_element(grpc_channel_get_channel_stack(channel), 0); GRPC_API_TRACE( "grpc_lame_client_channel_create(target=%s, error_code=%d, " "error_message=%s)", 3, (target, (int)error_code, error_message)); - GPR_ASSERT(elem->filter == &lame_filter); + GPR_ASSERT(elem->filter == &grpc_lame_filter); chand = (channel_data *)elem->channel_data; chand->error_code = error_code; chand->error_message = error_message; diff --git a/src/core/lib/surface/lame_client.h b/src/core/lib/surface/lame_client.h new file mode 100644 index 00000000000..5f6ea34d4be --- /dev/null +++ b/src/core/lib/surface/lame_client.h @@ -0,0 +1,41 @@ +/* + * + * Copyright 2016, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#ifndef GRPC_CORE_LIB_SURFACE_LAME_CLIENT_H +#define GRPC_CORE_LIB_SURFACE_LAME_CLIENT_H + +#include "src/core/lib/channel/channel_stack.h" + +extern const grpc_channel_filter grpc_lame_filter; + +#endif /* GRPC_CORE_LIB_SURFACE_LAME_CLIENT_H */ diff --git a/src/core/surface/metadata_array.c b/src/core/lib/surface/metadata_array.c similarity index 96% rename from src/core/surface/metadata_array.c rename to src/core/lib/surface/metadata_array.c index 4c7bf17835a..4436f2da87c 100644 --- a/src/core/surface/metadata_array.c +++ b/src/core/lib/surface/metadata_array.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -36,7 +36,7 @@ #include -#include "src/core/surface/api_trace.h" +#include "src/core/lib/surface/api_trace.h" void grpc_metadata_array_init(grpc_metadata_array* array) { GRPC_API_TRACE("grpc_metadata_array_init(array=%p)", 1, (array)); diff --git a/src/core/surface/server.c b/src/core/lib/surface/server.c similarity index 93% rename from src/core/surface/server.c rename to src/core/lib/surface/server.c index 5b13d4ba526..080734e9d59 100644 --- a/src/core/surface/server.c +++ b/src/core/lib/surface/server.c @@ -31,7 +31,7 @@ * */ -#include "src/core/surface/server.h" +#include "src/core/lib/surface/server.h" #include #include @@ -42,19 +42,18 @@ #include #include -#include "src/core/census/grpc_filter.h" -#include "src/core/channel/channel_args.h" -#include "src/core/channel/connected_channel.h" -#include "src/core/iomgr/iomgr.h" -#include "src/core/support/stack_lockfree.h" -#include "src/core/support/string.h" -#include "src/core/surface/api_trace.h" -#include "src/core/surface/call.h" -#include "src/core/surface/channel.h" -#include "src/core/surface/completion_queue.h" -#include "src/core/surface/init.h" -#include "src/core/transport/metadata.h" -#include "src/core/transport/static_metadata.h" +#include "src/core/lib/channel/channel_args.h" +#include "src/core/lib/channel/connected_channel.h" +#include "src/core/lib/iomgr/iomgr.h" +#include "src/core/lib/support/stack_lockfree.h" +#include "src/core/lib/support/string.h" +#include "src/core/lib/surface/api_trace.h" +#include "src/core/lib/surface/call.h" +#include "src/core/lib/surface/channel.h" +#include "src/core/lib/surface/completion_queue.h" +#include "src/core/lib/surface/init.h" +#include "src/core/lib/transport/metadata.h" +#include "src/core/lib/transport/static_metadata.h" typedef struct listener { void *arg; @@ -182,8 +181,6 @@ typedef struct { } channel_broadcaster; struct grpc_server { - size_t channel_filter_count; - grpc_channel_filter const **channel_filters; grpc_channel_args *channel_args; grpc_completion_queue **cqs; @@ -355,7 +352,6 @@ static void server_delete(grpc_exec_ctx *exec_ctx, grpc_server *server) { grpc_channel_args_destroy(server->channel_args); gpr_mu_destroy(&server->mu_global); gpr_mu_destroy(&server->mu_call); - gpr_free((void *)server->channel_filters); while ((rm = server->registered_methods) != NULL) { server->registered_methods = rm->next; request_matcher_destroy(&rm->request_matcher); @@ -757,11 +753,18 @@ static void destroy_channel_elem(grpc_exec_ctx *exec_ctx, } } -static const grpc_channel_filter server_surface_filter = { - server_start_transport_stream_op, grpc_channel_next_op, sizeof(call_data), - init_call_elem, grpc_call_stack_ignore_set_pollset, destroy_call_elem, - sizeof(channel_data), init_channel_elem, destroy_channel_elem, - grpc_call_next_get_peer, "server", +const grpc_channel_filter grpc_server_top_filter = { + server_start_transport_stream_op, + grpc_channel_next_op, + sizeof(call_data), + init_call_elem, + grpc_call_stack_ignore_set_pollset, + destroy_call_elem, + sizeof(channel_data), + init_channel_elem, + destroy_channel_elem, + grpc_call_next_get_peer, + "server", }; void grpc_server_register_completion_queue(grpc_server *server, @@ -783,11 +786,10 @@ void grpc_server_register_completion_queue(grpc_server *server, server->cqs[n] = cq; } -grpc_server *grpc_server_create_from_filters( - const grpc_channel_filter **filters, size_t filter_count, - const grpc_channel_args *args) { +grpc_server *grpc_server_create(const grpc_channel_args *args, void *reserved) { size_t i; - int census_enabled = grpc_channel_args_is_census_enabled(args); + + GRPC_API_TRACE("grpc_server_create(%p, %p)", 2, (args, reserved)); grpc_server *server = gpr_malloc(sizeof(grpc_server)); @@ -815,23 +817,6 @@ grpc_server *grpc_server_create_from_filters( server->requested_calls = gpr_malloc(server->max_requested_calls * sizeof(*server->requested_calls)); - /* Server filter stack is: - - server_surface_filter - for making surface API calls - grpc_server_census_filter (optional) - for stats collection and tracing - {passed in filter stack} - grpc_connected_channel_filter - for interfacing with transports */ - server->channel_filter_count = filter_count + 1u + (census_enabled ? 1u : 0u); - server->channel_filters = - gpr_malloc(server->channel_filter_count * sizeof(grpc_channel_filter *)); - server->channel_filters[0] = &server_surface_filter; - if (census_enabled) { - server->channel_filters[1] = &grpc_server_census_filter; - } - for (i = 0; i < filter_count; i++) { - server->channel_filters[i + 1u + (census_enabled ? 1u : 0u)] = filters[i]; - } - server->channel_args = grpc_channel_args_copy(args); return server; @@ -892,12 +877,7 @@ void grpc_server_start(grpc_server *server) { void grpc_server_setup_transport(grpc_exec_ctx *exec_ctx, grpc_server *s, grpc_transport *transport, - grpc_channel_filter const **extra_filters, - size_t num_extra_filters, const grpc_channel_args *args) { - size_t num_filters = s->channel_filter_count + num_extra_filters + 1; - grpc_channel_filter const **filters = - gpr_malloc(sizeof(grpc_channel_filter *) * num_filters); size_t i; size_t num_registered_methods; size_t alloc; @@ -913,24 +893,17 @@ void grpc_server_setup_transport(grpc_exec_ctx *exec_ctx, grpc_server *s, uint32_t max_probes = 0; grpc_transport_op op; - for (i = 0; i < s->channel_filter_count; i++) { - filters[i] = s->channel_filters[i]; - } - for (; i < s->channel_filter_count + num_extra_filters; i++) { - filters[i] = extra_filters[i - s->channel_filter_count]; - } - filters[i] = &grpc_connected_channel_filter; - for (i = 0; i < s->cq_count; i++) { memset(&op, 0, sizeof(op)); op.bind_pollset = grpc_cq_pollset(s->cqs[i]); grpc_transport_perform_op(exec_ctx, transport, &op); } - channel = grpc_channel_create_from_filters(exec_ctx, NULL, filters, - num_filters, args, 0); + channel = + grpc_channel_create(exec_ctx, NULL, args, GRPC_SERVER_CHANNEL, transport); chand = (channel_data *)grpc_channel_stack_element( - grpc_channel_get_channel_stack(channel), 0)->channel_data; + grpc_channel_get_channel_stack(channel), 0) + ->channel_data; chand->server = s; server_ref(s); chand->channel = channel; @@ -951,7 +924,7 @@ void grpc_server_setup_transport(grpc_exec_ctx *exec_ctx, grpc_server *s, method = grpc_mdstr_from_string(rm->method); hash = GRPC_MDSTR_KV_HASH(host ? host->hash : 0, method->hash); for (probes = 0; chand->registered_methods[(hash + probes) % slots] - .server_registered_method != NULL; + .server_registered_method != NULL; probes++) ; if (probes > max_probes) max_probes = probes; @@ -965,17 +938,12 @@ void grpc_server_setup_transport(grpc_exec_ctx *exec_ctx, grpc_server *s, chand->registered_method_max_probes = max_probes; } - grpc_connected_channel_bind_transport(grpc_channel_get_channel_stack(channel), - transport); - gpr_mu_lock(&s->mu_global); chand->next = &s->root_channel_data; chand->prev = chand->next->prev; chand->next->prev = chand->prev->next = chand; gpr_mu_unlock(&s->mu_global); - gpr_free((void *)filters); - GRPC_CHANNEL_INTERNAL_REF(channel, "connectivity"); memset(&op, 0, sizeof(op)); op.set_accept_stream = true; diff --git a/src/core/surface/server.h b/src/core/lib/surface/server.h similarity index 81% rename from src/core/surface/server.h rename to src/core/lib/surface/server.h index a957fdb3605..3845eb29819 100644 --- a/src/core/surface/server.h +++ b/src/core/lib/surface/server.h @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,17 +31,14 @@ * */ -#ifndef GRPC_INTERNAL_CORE_SURFACE_SERVER_H -#define GRPC_INTERNAL_CORE_SURFACE_SERVER_H +#ifndef GRPC_CORE_LIB_SURFACE_SERVER_H +#define GRPC_CORE_LIB_SURFACE_SERVER_H -#include "src/core/channel/channel_stack.h" #include -#include "src/core/transport/transport.h" +#include "src/core/lib/channel/channel_stack.h" +#include "src/core/lib/transport/transport.h" -/* Create a server */ -grpc_server *grpc_server_create_from_filters( - const grpc_channel_filter **filters, size_t filter_count, - const grpc_channel_args *args); +extern const grpc_channel_filter grpc_server_top_filter; /* Add a listener to the server: when the server starts, it will call start, and when it shuts down, it will call destroy */ @@ -56,12 +53,10 @@ void grpc_server_add_listener( server */ void grpc_server_setup_transport(grpc_exec_ctx *exec_ctx, grpc_server *server, grpc_transport *transport, - grpc_channel_filter const **extra_filters, - size_t num_extra_filters, const grpc_channel_args *args); const grpc_channel_args *grpc_server_get_channel_args(grpc_server *server); int grpc_server_has_open_connections(grpc_server *server); -#endif /* GRPC_INTERNAL_CORE_SURFACE_SERVER_H */ +#endif /* GRPC_CORE_LIB_SURFACE_SERVER_H */ diff --git a/src/core/surface/surface_trace.h b/src/core/lib/surface/surface_trace.h similarity index 87% rename from src/core/surface/surface_trace.h rename to src/core/lib/surface/surface_trace.h index 93b2859ac5b..6b3f673924b 100644 --- a/src/core/surface/surface_trace.h +++ b/src/core/lib/surface/surface_trace.h @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,12 +31,12 @@ * */ -#ifndef GRPC_INTERNAL_CORE_SURFACE_SURFACE_TRACE_H -#define GRPC_INTERNAL_CORE_SURFACE_SURFACE_TRACE_H +#ifndef GRPC_CORE_LIB_SURFACE_SURFACE_TRACE_H +#define GRPC_CORE_LIB_SURFACE_SURFACE_TRACE_H -#include "src/core/debug/trace.h" -#include "src/core/surface/api_trace.h" #include +#include "src/core/lib/debug/trace.h" +#include "src/core/lib/surface/api_trace.h" #define GRPC_SURFACE_TRACE_RETURNED_EVENT(cq, event) \ if (grpc_api_trace) { \ @@ -45,4 +45,4 @@ gpr_free(_ev); \ } -#endif /* GRPC_INTERNAL_CORE_SURFACE_SURFACE_TRACE_H */ +#endif /* GRPC_CORE_LIB_SURFACE_SURFACE_TRACE_H */ diff --git a/src/core/surface/validate_metadata.c b/src/core/lib/surface/validate_metadata.c similarity index 100% rename from src/core/surface/validate_metadata.c rename to src/core/lib/surface/validate_metadata.c diff --git a/src/core/surface/version.c b/src/core/lib/surface/version.c similarity index 100% rename from src/core/surface/version.c rename to src/core/lib/surface/version.c diff --git a/src/core/transport/byte_stream.c b/src/core/lib/transport/byte_stream.c similarity index 97% rename from src/core/transport/byte_stream.c rename to src/core/lib/transport/byte_stream.c index 8e6fb2cbefd..79981aa1548 100644 --- a/src/core/transport/byte_stream.c +++ b/src/core/lib/transport/byte_stream.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,7 +31,7 @@ * */ -#include "src/core/transport/byte_stream.h" +#include "src/core/lib/transport/byte_stream.h" #include diff --git a/src/core/transport/byte_stream.h b/src/core/lib/transport/byte_stream.h similarity index 93% rename from src/core/transport/byte_stream.h rename to src/core/lib/transport/byte_stream.h index d2e51e7b45e..e7346dafc3f 100644 --- a/src/core/transport/byte_stream.h +++ b/src/core/lib/transport/byte_stream.h @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,11 +31,11 @@ * */ -#ifndef GRPC_INTERNAL_CORE_TRANSPORT_BYTE_STREAM_H -#define GRPC_INTERNAL_CORE_TRANSPORT_BYTE_STREAM_H +#ifndef GRPC_CORE_LIB_TRANSPORT_BYTE_STREAM_H +#define GRPC_CORE_LIB_TRANSPORT_BYTE_STREAM_H -#include "src/core/iomgr/exec_ctx.h" #include +#include "src/core/lib/iomgr/exec_ctx.h" /** Internal bit flag for grpc_begin_message's \a flags signaling the use of * compression for the message */ @@ -86,4 +86,4 @@ void grpc_slice_buffer_stream_init(grpc_slice_buffer_stream *stream, gpr_slice_buffer *slice_buffer, uint32_t flags); -#endif /* GRPC_INTERNAL_CORE_TRANSPORT_BYTE_STREAM_H */ +#endif /* GRPC_CORE_LIB_TRANSPORT_BYTE_STREAM_H */ diff --git a/src/core/transport/connectivity_state.c b/src/core/lib/transport/connectivity_state.c similarity index 99% rename from src/core/transport/connectivity_state.c rename to src/core/lib/transport/connectivity_state.c index 87765b9799d..123eab8b361 100644 --- a/src/core/transport/connectivity_state.c +++ b/src/core/lib/transport/connectivity_state.c @@ -31,7 +31,7 @@ * */ -#include "src/core/transport/connectivity_state.h" +#include "src/core/lib/transport/connectivity_state.h" #include diff --git a/src/core/transport/connectivity_state.h b/src/core/lib/transport/connectivity_state.h similarity index 93% rename from src/core/transport/connectivity_state.h rename to src/core/lib/transport/connectivity_state.h index a4eb6652e55..6f921324387 100644 --- a/src/core/transport/connectivity_state.h +++ b/src/core/lib/transport/connectivity_state.h @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,11 +31,11 @@ * */ -#ifndef GRPC_INTERNAL_CORE_TRANSPORT_CONNECTIVITY_STATE_H -#define GRPC_INTERNAL_CORE_TRANSPORT_CONNECTIVITY_STATE_H +#ifndef GRPC_CORE_LIB_TRANSPORT_CONNECTIVITY_STATE_H +#define GRPC_CORE_LIB_TRANSPORT_CONNECTIVITY_STATE_H #include -#include "src/core/iomgr/exec_ctx.h" +#include "src/core/lib/iomgr/exec_ctx.h" typedef struct grpc_connectivity_state_watcher { /** we keep watchers in a linked list */ @@ -82,4 +82,4 @@ int grpc_connectivity_state_notify_on_state_change( grpc_exec_ctx *exec_ctx, grpc_connectivity_state_tracker *tracker, grpc_connectivity_state *current, grpc_closure *notify); -#endif /* GRPC_INTERNAL_CORE_TRANSPORT_CONNECTIVITY_STATE_H */ +#endif /* GRPC_CORE_LIB_TRANSPORT_CONNECTIVITY_STATE_H */ diff --git a/src/core/transport/metadata.c b/src/core/lib/transport/metadata.c similarity index 98% rename from src/core/transport/metadata.c rename to src/core/lib/transport/metadata.c index 807ae071a30..451c8d1cd3e 100644 --- a/src/core/transport/metadata.c +++ b/src/core/lib/transport/metadata.c @@ -31,7 +31,7 @@ * */ -#include "src/core/transport/metadata.h" +#include "src/core/lib/transport/metadata.h" #include #include @@ -44,12 +44,12 @@ #include #include -#include "src/core/profiling/timers.h" -#include "src/core/support/murmur_hash.h" -#include "src/core/support/string.h" -#include "src/core/transport/chttp2/bin_encoder.h" -#include "src/core/transport/static_metadata.h" -#include "src/core/iomgr/iomgr_internal.h" +#include "src/core/ext/transport/chttp2/transport/bin_encoder.h" +#include "src/core/lib/iomgr/iomgr_internal.h" +#include "src/core/lib/profiling/timers.h" +#include "src/core/lib/support/murmur_hash.h" +#include "src/core/lib/support/string.h" +#include "src/core/lib/transport/static_metadata.h" /* There are two kinds of mdelem and mdstr instances. * Static instances are declared in static_metadata.{h,c} and diff --git a/src/core/transport/metadata.h b/src/core/lib/transport/metadata.h similarity index 97% rename from src/core/transport/metadata.h rename to src/core/lib/transport/metadata.h index 8742846be7e..d72ec9accc1 100644 --- a/src/core/transport/metadata.h +++ b/src/core/lib/transport/metadata.h @@ -31,8 +31,8 @@ * */ -#ifndef GRPC_INTERNAL_CORE_TRANSPORT_METADATA_H -#define GRPC_INTERNAL_CORE_TRANSPORT_METADATA_H +#ifndef GRPC_CORE_LIB_TRANSPORT_METADATA_H +#define GRPC_CORE_LIB_TRANSPORT_METADATA_H #include #include @@ -153,4 +153,4 @@ int grpc_mdstr_is_bin_suffixed(grpc_mdstr *s); void grpc_mdctx_global_init(void); void grpc_mdctx_global_shutdown(void); -#endif /* GRPC_INTERNAL_CORE_TRANSPORT_METADATA_H */ +#endif /* GRPC_CORE_LIB_TRANSPORT_METADATA_H */ diff --git a/src/core/transport/metadata_batch.c b/src/core/lib/transport/metadata_batch.c similarity index 97% rename from src/core/transport/metadata_batch.c rename to src/core/lib/transport/metadata_batch.c index 1266862f827..bb79b8fa967 100644 --- a/src/core/transport/metadata_batch.c +++ b/src/core/lib/transport/metadata_batch.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,14 +31,14 @@ * */ -#include "src/core/transport/metadata_batch.h" +#include "src/core/lib/transport/metadata_batch.h" #include #include #include -#include "src/core/profiling/timers.h" +#include "src/core/lib/profiling/timers.h" static void assert_valid_list(grpc_mdelem_list *list) { #ifndef NDEBUG diff --git a/src/core/transport/metadata_batch.h b/src/core/lib/transport/metadata_batch.h similarity index 95% rename from src/core/transport/metadata_batch.h rename to src/core/lib/transport/metadata_batch.h index 1b0d1fda3e2..f1d47269893 100644 --- a/src/core/transport/metadata_batch.h +++ b/src/core/lib/transport/metadata_batch.h @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,14 +31,14 @@ * */ -#ifndef GRPC_INTERNAL_CORE_TRANSPORT_STREAM_OP_H -#define GRPC_INTERNAL_CORE_TRANSPORT_STREAM_OP_H +#ifndef GRPC_CORE_LIB_TRANSPORT_METADATA_BATCH_H +#define GRPC_CORE_LIB_TRANSPORT_METADATA_BATCH_H #include #include #include #include -#include "src/core/transport/metadata.h" +#include "src/core/lib/transport/metadata.h" typedef struct grpc_linked_mdelem { grpc_mdelem *md; @@ -122,4 +122,4 @@ void grpc_metadata_batch_assert_ok(grpc_metadata_batch *comd); } while (0) #endif -#endif /* GRPC_INTERNAL_CORE_TRANSPORT_STREAM_OP_H */ +#endif /* GRPC_CORE_LIB_TRANSPORT_METADATA_BATCH_H */ diff --git a/src/core/transport/static_metadata.c b/src/core/lib/transport/static_metadata.c similarity index 65% rename from src/core/transport/static_metadata.c rename to src/core/lib/transport/static_metadata.c index eeedae06199..eda277b3dc9 100644 --- a/src/core/transport/static_metadata.c +++ b/src/core/lib/transport/static_metadata.c @@ -43,14 +43,14 @@ * explanation of what's going on. */ -#include "src/core/transport/static_metadata.h" +#include "src/core/lib/transport/static_metadata.h" grpc_mdstr grpc_static_mdstr_table[GRPC_STATIC_MDSTR_COUNT]; grpc_mdelem grpc_static_mdelem_table[GRPC_STATIC_MDELEM_COUNT]; uintptr_t grpc_static_mdelem_user_data[GRPC_STATIC_MDELEM_COUNT] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 3, 7, 5, 2, 4, 8, 6, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 4, 8, 6, 2, 4, 8, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; @@ -66,24 +66,95 @@ const uint8_t grpc_static_metadata_elem_indices[GRPC_STATIC_MDELEM_COUNT * 2] = 82, 83, 84, 35, 85, 35, 86, 35, 87, 35, 88, 35}; const char *const grpc_static_metadata_strings[GRPC_STATIC_MDSTR_COUNT] = { - "0", "1", "2", "200", "204", "206", "304", "400", "404", "500", "accept", - "accept-charset", "accept-encoding", "accept-language", "accept-ranges", - "access-control-allow-origin", "age", "allow", "application/grpc", - ":authority", "authorization", "cache-control", "census-bin", - "census-binary-bin", "content-disposition", "content-encoding", - "content-language", "content-length", "content-location", "content-range", - "content-type", "cookie", "date", "deflate", "deflate,gzip", "", "etag", - "expect", "expires", "from", "GET", "grpc", "grpc-accept-encoding", - "grpc-encoding", "grpc-internal-encoding-request", "grpc-message", - "grpc-status", "grpc-timeout", "gzip", "gzip, deflate", "host", "http", - "https", "identity", "identity,deflate", "identity,deflate,gzip", - "identity,gzip", "if-match", "if-modified-since", "if-none-match", - "if-range", "if-unmodified-since", "last-modified", "link", "location", - "max-forwards", ":method", ":path", "POST", "proxy-authenticate", - "proxy-authorization", "range", "referer", "refresh", "retry-after", - ":scheme", "server", "set-cookie", "/", "/index.html", ":status", - "strict-transport-security", "te", "trailers", "transfer-encoding", - "user-agent", "vary", "via", "www-authenticate"}; + "0", + "1", + "2", + "200", + "204", + "206", + "304", + "400", + "404", + "500", + "accept", + "accept-charset", + "accept-encoding", + "accept-language", + "accept-ranges", + "access-control-allow-origin", + "age", + "allow", + "application/grpc", + ":authority", + "authorization", + "cache-control", + "census-bin", + "census-binary-bin", + "content-disposition", + "content-encoding", + "content-language", + "content-length", + "content-location", + "content-range", + "content-type", + "cookie", + "date", + "deflate", + "deflate,gzip", + "", + "etag", + "expect", + "expires", + "from", + "GET", + "grpc", + "grpc-accept-encoding", + "grpc-encoding", + "grpc-internal-encoding-request", + "grpc-message", + "grpc-status", + "grpc-timeout", + "gzip", + "gzip, deflate", + "host", + "http", + "https", + "identity", + "identity,deflate", + "identity,deflate,gzip", + "identity,gzip", + "if-match", + "if-modified-since", + "if-none-match", + "if-range", + "if-unmodified-since", + "last-modified", + "link", + "location", + "max-forwards", + ":method", + ":path", + "POST", + "proxy-authenticate", + "proxy-authorization", + "range", + "referer", + "refresh", + "retry-after", + ":scheme", + "server", + "set-cookie", + "/", + "/index.html", + ":status", + "strict-transport-security", + "te", + "trailers", + "transfer-encoding", + "user-agent", + "vary", + "via", + "www-authenticate"}; const uint8_t grpc_static_accept_encoding_metadata[8] = {0, 29, 26, 30, 28, 32, 27, 31}; diff --git a/src/core/transport/static_metadata.h b/src/core/lib/transport/static_metadata.h similarity index 98% rename from src/core/transport/static_metadata.h rename to src/core/lib/transport/static_metadata.h index ef72b802b51..aff136a6d21 100644 --- a/src/core/transport/static_metadata.h +++ b/src/core/lib/transport/static_metadata.h @@ -43,10 +43,10 @@ * explanation of what's going on. */ -#ifndef GRPC_INTERNAL_CORE_TRANSPORT_STATIC_METADATA_H -#define GRPC_INTERNAL_CORE_TRANSPORT_STATIC_METADATA_H +#ifndef GRPC_CORE_LIB_TRANSPORT_STATIC_METADATA_H +#define GRPC_CORE_LIB_TRANSPORT_STATIC_METADATA_H -#include "src/core/transport/metadata.h" +#include "src/core/lib/transport/metadata.h" #define GRPC_STATIC_MDSTR_COUNT 89 extern grpc_mdstr grpc_static_mdstr_table[GRPC_STATIC_MDSTR_COUNT]; @@ -405,4 +405,4 @@ extern const char *const grpc_static_metadata_strings[GRPC_STATIC_MDSTR_COUNT]; extern const uint8_t grpc_static_accept_encoding_metadata[8]; #define GRPC_MDELEM_ACCEPT_ENCODING_FOR_ALGORITHMS(algs) \ (&grpc_static_mdelem_table[grpc_static_accept_encoding_metadata[(algs)]]) -#endif /* GRPC_INTERNAL_CORE_TRANSPORT_STATIC_METADATA_H */ +#endif /* GRPC_CORE_LIB_TRANSPORT_STATIC_METADATA_H */ diff --git a/src/core/transport/transport.c b/src/core/lib/transport/transport.c similarity index 98% rename from src/core/transport/transport.c rename to src/core/lib/transport/transport.c index 3b555fa9338..18256aae5e4 100644 --- a/src/core/transport/transport.c +++ b/src/core/lib/transport/transport.c @@ -31,11 +31,11 @@ * */ -#include "src/core/transport/transport.h" +#include "src/core/lib/transport/transport.h" #include #include #include -#include "src/core/transport/transport_impl.h" +#include "src/core/lib/transport/transport_impl.h" #ifdef GRPC_STREAM_REFCOUNT_DEBUG void grpc_stream_ref(grpc_stream_refcount *refcount, const char *reason) { diff --git a/src/core/transport/transport.h b/src/core/lib/transport/transport.h similarity index 96% rename from src/core/transport/transport.h rename to src/core/lib/transport/transport.h index ed6e121c9cb..e98cfe9515c 100644 --- a/src/core/transport/transport.h +++ b/src/core/lib/transport/transport.h @@ -31,16 +31,16 @@ * */ -#ifndef GRPC_INTERNAL_CORE_TRANSPORT_TRANSPORT_H -#define GRPC_INTERNAL_CORE_TRANSPORT_TRANSPORT_H +#ifndef GRPC_CORE_LIB_TRANSPORT_TRANSPORT_H +#define GRPC_CORE_LIB_TRANSPORT_TRANSPORT_H #include -#include "src/core/iomgr/pollset.h" -#include "src/core/iomgr/pollset_set.h" -#include "src/core/transport/metadata_batch.h" -#include "src/core/transport/byte_stream.h" -#include "src/core/channel/context.h" +#include "src/core/lib/channel/context.h" +#include "src/core/lib/iomgr/pollset.h" +#include "src/core/lib/iomgr/pollset_set.h" +#include "src/core/lib/transport/byte_stream.h" +#include "src/core/lib/transport/metadata_batch.h" /* forward declarations */ typedef struct grpc_transport grpc_transport; @@ -239,4 +239,4 @@ void grpc_transport_destroy(grpc_exec_ctx *exec_ctx, grpc_transport *transport); char *grpc_transport_get_peer(grpc_exec_ctx *exec_ctx, grpc_transport *transport); -#endif /* GRPC_INTERNAL_CORE_TRANSPORT_TRANSPORT_H */ +#endif /* GRPC_CORE_LIB_TRANSPORT_TRANSPORT_H */ diff --git a/src/core/transport/transport_impl.h b/src/core/lib/transport/transport_impl.h similarity index 91% rename from src/core/transport/transport_impl.h rename to src/core/lib/transport/transport_impl.h index 40bfb4b13ac..92fa5d519d7 100644 --- a/src/core/transport/transport_impl.h +++ b/src/core/lib/transport/transport_impl.h @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,16 +31,19 @@ * */ -#ifndef GRPC_INTERNAL_CORE_TRANSPORT_TRANSPORT_IMPL_H -#define GRPC_INTERNAL_CORE_TRANSPORT_TRANSPORT_IMPL_H +#ifndef GRPC_CORE_LIB_TRANSPORT_TRANSPORT_IMPL_H +#define GRPC_CORE_LIB_TRANSPORT_TRANSPORT_IMPL_H -#include "src/core/transport/transport.h" +#include "src/core/lib/transport/transport.h" typedef struct grpc_transport_vtable { /* Memory required for a single stream element - this is allocated by upper layers and initialized by the transport */ size_t sizeof_stream; /* = sizeof(transport stream) */ + /* name of this transport implementation */ + const char *name; + /* implementation of grpc_transport_init_stream */ int (*init_stream)(grpc_exec_ctx *exec_ctx, grpc_transport *self, grpc_stream *stream, grpc_stream_refcount *refcount, @@ -75,4 +78,4 @@ struct grpc_transport { const grpc_transport_vtable *vtable; }; -#endif /* GRPC_INTERNAL_CORE_TRANSPORT_TRANSPORT_IMPL_H */ +#endif /* GRPC_CORE_LIB_TRANSPORT_TRANSPORT_IMPL_H */ diff --git a/src/core/transport/transport_op_string.c b/src/core/lib/transport/transport_op_string.c similarity index 97% rename from src/core/transport/transport_op_string.c rename to src/core/lib/transport/transport_op_string.c index 98b51afc881..1fa8fa5d4f5 100644 --- a/src/core/transport/transport_op_string.c +++ b/src/core/lib/transport/transport_op_string.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,16 +31,16 @@ * */ -#include "src/core/channel/channel_stack.h" +#include "src/core/lib/channel/channel_stack.h" #include #include #include -#include "src/core/support/string.h" #include #include #include +#include "src/core/lib/support/string.h" /* These routines are here to facilitate debugging - they produce string representations of various transport data structures */ diff --git a/src/core/tsi/fake_transport_security.c b/src/core/lib/tsi/fake_transport_security.c similarity index 98% rename from src/core/tsi/fake_transport_security.c rename to src/core/lib/tsi/fake_transport_security.c index 72ac32a1716..4b812f4803f 100644 --- a/src/core/tsi/fake_transport_security.c +++ b/src/core/lib/tsi/fake_transport_security.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,7 +31,7 @@ * */ -#include "src/core/tsi/fake_transport_security.h" +#include "src/core/lib/tsi/fake_transport_security.h" #include #include @@ -39,7 +39,7 @@ #include #include #include -#include "src/core/tsi/transport_security.h" +#include "src/core/lib/tsi/transport_security.h" /* --- Constants. ---*/ #define TSI_FAKE_FRAME_HEADER_SIZE 4 @@ -493,8 +493,10 @@ static void fake_handshaker_destroy(tsi_handshaker *self) { static const tsi_handshaker_vtable handshaker_vtable = { fake_handshaker_get_bytes_to_send_to_peer, - fake_handshaker_process_bytes_from_peer, fake_handshaker_get_result, - fake_handshaker_extract_peer, fake_handshaker_create_frame_protector, + fake_handshaker_process_bytes_from_peer, + fake_handshaker_get_result, + fake_handshaker_extract_peer, + fake_handshaker_create_frame_protector, fake_handshaker_destroy, }; diff --git a/src/core/tsi/fake_transport_security.h b/src/core/lib/tsi/fake_transport_security.h similarity index 89% rename from src/core/tsi/fake_transport_security.h rename to src/core/lib/tsi/fake_transport_security.h index fe295aa5360..b887dfcb099 100644 --- a/src/core/tsi/fake_transport_security.h +++ b/src/core/lib/tsi/fake_transport_security.h @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,10 +31,10 @@ * */ -#ifndef GRPC_INTERNAL_CORE_TSI_FAKE_TRANSPORT_SECURITY_H -#define GRPC_INTERNAL_CORE_TSI_FAKE_TRANSPORT_SECURITY_H +#ifndef GRPC_CORE_LIB_TSI_FAKE_TRANSPORT_SECURITY_H +#define GRPC_CORE_LIB_TSI_FAKE_TRANSPORT_SECURITY_H -#include "src/core/tsi/transport_security_interface.h" +#include "src/core/lib/tsi/transport_security_interface.h" #ifdef __cplusplus extern "C" { @@ -58,4 +58,4 @@ tsi_frame_protector *tsi_create_fake_protector( } #endif -#endif /* GRPC_INTERNAL_CORE_TSI_FAKE_TRANSPORT_SECURITY_H */ +#endif /* GRPC_CORE_LIB_TSI_FAKE_TRANSPORT_SECURITY_H */ diff --git a/src/core/tsi/ssl_transport_security.c b/src/core/lib/tsi/ssl_transport_security.c similarity index 97% rename from src/core/tsi/ssl_transport_security.c rename to src/core/lib/tsi/ssl_transport_security.c index fcbd910f07f..d03201eec68 100644 --- a/src/core/tsi/ssl_transport_security.c +++ b/src/core/lib/tsi/ssl_transport_security.c @@ -31,7 +31,7 @@ * */ -#include "src/core/tsi/ssl_transport_security.h" +#include "src/core/lib/tsi/ssl_transport_security.h" #include @@ -57,8 +57,8 @@ #include #include -#include "src/core/tsi/ssl_types.h" -#include "src/core/tsi/transport_security.h" +#include "src/core/lib/tsi/ssl_types.h" +#include "src/core/lib/tsi/transport_security.h" /* --- Constants. ---*/ @@ -293,6 +293,26 @@ static tsi_result peer_property_from_x509_common_name( return result; } +/* Gets the X509 cert in PEM format as a tsi_peer_property. */ +static tsi_result add_pem_certificate(X509 *cert, tsi_peer_property *property) { + BIO *bio = BIO_new(BIO_s_mem()); + if (!PEM_write_bio_X509(bio, cert)) { + BIO_free(bio); + return TSI_INTERNAL_ERROR; + } + char *contents; + long len = BIO_get_mem_data(bio, &contents); + if (len <= 0) { + BIO_free(bio); + return TSI_INTERNAL_ERROR; + } + tsi_result result = tsi_construct_string_peer_property( + TSI_X509_PEM_CERT_PROPERTY, (const char *)contents, (size_t)len, + property); + BIO_free(bio); + return result; +} + /* Gets the subject SANs from an X509 cert as a tsi_peer_property. */ static tsi_result add_subject_alt_names_properties_to_peer( tsi_peer *peer, GENERAL_NAMES *subject_alt_names, @@ -363,7 +383,8 @@ static tsi_result peer_from_x509(X509 *cert, int include_certificate_type, tsi_result result; GPR_ASSERT(subject_alt_name_count >= 0); property_count = (include_certificate_type ? (size_t)1 : 0) + - 1 /* common name */ + (size_t)subject_alt_name_count; + 2 /* common name, certificate */ + + (size_t)subject_alt_name_count; result = tsi_construct_peer(property_count, peer); if (result != TSI_OK) return result; do { @@ -377,6 +398,10 @@ static tsi_result peer_from_x509(X509 *cert, int include_certificate_type, cert, &peer->properties[include_certificate_type ? 1 : 0]); if (result != TSI_OK) break; + result = add_pem_certificate( + cert, &peer->properties[include_certificate_type ? 2 : 1]); + if (result != TSI_OK) break; + if (subject_alt_name_count != 0) { result = add_subject_alt_names_properties_to_peer( peer, subject_alt_names, (size_t)subject_alt_name_count); @@ -1014,8 +1039,10 @@ static void ssl_handshaker_destroy(tsi_handshaker *self) { static const tsi_handshaker_vtable handshaker_vtable = { ssl_handshaker_get_bytes_to_send_to_peer, - ssl_handshaker_process_bytes_from_peer, ssl_handshaker_get_result, - ssl_handshaker_extract_peer, ssl_handshaker_create_frame_protector, + ssl_handshaker_process_bytes_from_peer, + ssl_handshaker_get_result, + ssl_handshaker_extract_peer, + ssl_handshaker_create_frame_protector, ssl_handshaker_destroy, }; diff --git a/src/core/tsi/ssl_transport_security.h b/src/core/lib/tsi/ssl_transport_security.h similarity index 96% rename from src/core/tsi/ssl_transport_security.h rename to src/core/lib/tsi/ssl_transport_security.h index 4909af4c470..c9b9e8f54be 100644 --- a/src/core/tsi/ssl_transport_security.h +++ b/src/core/lib/tsi/ssl_transport_security.h @@ -31,10 +31,10 @@ * */ -#ifndef GRPC_INTERNAL_CORE_TSI_SSL_TRANSPORT_SECURITY_H -#define GRPC_INTERNAL_CORE_TSI_SSL_TRANSPORT_SECURITY_H +#ifndef GRPC_CORE_LIB_TSI_SSL_TRANSPORT_SECURITY_H +#define GRPC_CORE_LIB_TSI_SSL_TRANSPORT_SECURITY_H -#include "src/core/tsi/transport_security_interface.h" +#include "src/core/lib/tsi/transport_security_interface.h" #ifdef __cplusplus extern "C" { @@ -48,6 +48,8 @@ extern "C" { #define TSI_X509_SUBJECT_ALTERNATIVE_NAME_PEER_PROPERTY \ "x509_subject_alternative_name" +#define TSI_X509_PEM_CERT_PROPERTY "x509_pem_cert" + #define TSI_SSL_ALPN_SELECTED_PROTOCOL "ssl_alpn_selected_protocol" /* --- tsi_ssl_handshaker_factory object --- @@ -169,4 +171,4 @@ int tsi_ssl_peer_matches_name(const tsi_peer *peer, const char *name); } #endif -#endif /* GRPC_INTERNAL_CORE_TSI_SSL_TRANSPORT_SECURITY_H */ +#endif /* GRPC_CORE_LIB_TSI_SSL_TRANSPORT_SECURITY_H */ diff --git a/src/core/tsi/ssl_types.h b/src/core/lib/tsi/ssl_types.h similarity index 93% rename from src/core/tsi/ssl_types.h rename to src/core/lib/tsi/ssl_types.h index 0d0225e9c7b..c6e68c01ad3 100644 --- a/src/core/tsi/ssl_types.h +++ b/src/core/lib/tsi/ssl_types.h @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,8 +31,8 @@ * */ -#ifndef GRPC_INTERNAL_CORE_TSI_SSL_TYPES_H -#define GRPC_INTERNAL_CORE_TSI_SSL_TYPES_H +#ifndef GRPC_CORE_LIB_TSI_SSL_TYPES_H +#define GRPC_CORE_LIB_TSI_SSL_TYPES_H /* A collection of macros to cast between various integer types that are * used differently between BoringSSL and OpenSSL: @@ -52,4 +52,4 @@ #define TSI_SIZE_AS_SIZE(x) ((int)(x)) #endif -#endif +#endif /* GRPC_CORE_LIB_TSI_SSL_TYPES_H */ diff --git a/src/core/tsi/test_creds/README b/src/core/lib/tsi/test_creds/README similarity index 100% rename from src/core/tsi/test_creds/README rename to src/core/lib/tsi/test_creds/README diff --git a/src/core/tsi/test_creds/badclient.key b/src/core/lib/tsi/test_creds/badclient.key similarity index 100% rename from src/core/tsi/test_creds/badclient.key rename to src/core/lib/tsi/test_creds/badclient.key diff --git a/src/core/tsi/test_creds/badclient.pem b/src/core/lib/tsi/test_creds/badclient.pem similarity index 100% rename from src/core/tsi/test_creds/badclient.pem rename to src/core/lib/tsi/test_creds/badclient.pem diff --git a/src/core/tsi/test_creds/badserver.key b/src/core/lib/tsi/test_creds/badserver.key similarity index 100% rename from src/core/tsi/test_creds/badserver.key rename to src/core/lib/tsi/test_creds/badserver.key diff --git a/src/core/tsi/test_creds/badserver.pem b/src/core/lib/tsi/test_creds/badserver.pem similarity index 100% rename from src/core/tsi/test_creds/badserver.pem rename to src/core/lib/tsi/test_creds/badserver.pem diff --git a/src/core/tsi/test_creds/ca-openssl.cnf b/src/core/lib/tsi/test_creds/ca-openssl.cnf similarity index 100% rename from src/core/tsi/test_creds/ca-openssl.cnf rename to src/core/lib/tsi/test_creds/ca-openssl.cnf diff --git a/src/core/tsi/test_creds/ca.key b/src/core/lib/tsi/test_creds/ca.key similarity index 100% rename from src/core/tsi/test_creds/ca.key rename to src/core/lib/tsi/test_creds/ca.key diff --git a/src/core/tsi/test_creds/ca.pem b/src/core/lib/tsi/test_creds/ca.pem similarity index 100% rename from src/core/tsi/test_creds/ca.pem rename to src/core/lib/tsi/test_creds/ca.pem diff --git a/src/core/tsi/test_creds/client.key b/src/core/lib/tsi/test_creds/client.key similarity index 100% rename from src/core/tsi/test_creds/client.key rename to src/core/lib/tsi/test_creds/client.key diff --git a/src/core/tsi/test_creds/client.pem b/src/core/lib/tsi/test_creds/client.pem similarity index 100% rename from src/core/tsi/test_creds/client.pem rename to src/core/lib/tsi/test_creds/client.pem diff --git a/src/core/tsi/test_creds/server0.key b/src/core/lib/tsi/test_creds/server0.key similarity index 100% rename from src/core/tsi/test_creds/server0.key rename to src/core/lib/tsi/test_creds/server0.key diff --git a/src/core/tsi/test_creds/server0.pem b/src/core/lib/tsi/test_creds/server0.pem similarity index 100% rename from src/core/tsi/test_creds/server0.pem rename to src/core/lib/tsi/test_creds/server0.pem diff --git a/src/core/tsi/test_creds/server1-openssl.cnf b/src/core/lib/tsi/test_creds/server1-openssl.cnf similarity index 100% rename from src/core/tsi/test_creds/server1-openssl.cnf rename to src/core/lib/tsi/test_creds/server1-openssl.cnf diff --git a/src/core/tsi/test_creds/server1.key b/src/core/lib/tsi/test_creds/server1.key similarity index 100% rename from src/core/tsi/test_creds/server1.key rename to src/core/lib/tsi/test_creds/server1.key diff --git a/src/core/tsi/test_creds/server1.pem b/src/core/lib/tsi/test_creds/server1.pem similarity index 100% rename from src/core/tsi/test_creds/server1.pem rename to src/core/lib/tsi/test_creds/server1.pem diff --git a/src/core/tsi/transport_security.c b/src/core/lib/tsi/transport_security.c similarity index 99% rename from src/core/tsi/transport_security.c rename to src/core/lib/tsi/transport_security.c index db219a50a67..a2c0d461969 100644 --- a/src/core/tsi/transport_security.c +++ b/src/core/lib/tsi/transport_security.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,7 +31,7 @@ * */ -#include "src/core/tsi/transport_security.h" +#include "src/core/lib/tsi/transport_security.h" #include #include diff --git a/src/core/tsi/transport_security.h b/src/core/lib/tsi/transport_security.h similarity index 94% rename from src/core/tsi/transport_security.h rename to src/core/lib/tsi/transport_security.h index 4077737473a..349dd0ae9cb 100644 --- a/src/core/tsi/transport_security.h +++ b/src/core/lib/tsi/transport_security.h @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,10 +31,10 @@ * */ -#ifndef GRPC_INTERNAL_CORE_TSI_TRANSPORT_SECURITY_H -#define GRPC_INTERNAL_CORE_TSI_TRANSPORT_SECURITY_H +#ifndef GRPC_CORE_LIB_TSI_TRANSPORT_SECURITY_H +#define GRPC_CORE_LIB_TSI_TRANSPORT_SECURITY_H -#include "src/core/tsi/transport_security_interface.h" +#include "src/core/lib/tsi/transport_security_interface.h" #ifdef __cplusplus extern "C" { @@ -108,4 +108,4 @@ char *tsi_strdup(const char *src); /* Sadly, no strdup in C89. */ } #endif -#endif /* GRPC_INTERNAL_CORE_TSI_TRANSPORT_SECURITY_H */ +#endif /* GRPC_CORE_LIB_TSI_TRANSPORT_SECURITY_H */ diff --git a/src/core/tsi/transport_security_interface.h b/src/core/lib/tsi/transport_security_interface.h similarity index 98% rename from src/core/tsi/transport_security_interface.h rename to src/core/lib/tsi/transport_security_interface.h index 69ee17ae917..f88f1516a96 100644 --- a/src/core/tsi/transport_security_interface.h +++ b/src/core/lib/tsi/transport_security_interface.h @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,8 +31,8 @@ * */ -#ifndef GRPC_INTERNAL_CORE_TSI_TRANSPORT_SECURITY_INTERFACE_H -#define GRPC_INTERNAL_CORE_TSI_TRANSPORT_SECURITY_INTERFACE_H +#ifndef GRPC_CORE_LIB_TSI_TRANSPORT_SECURITY_INTERFACE_H +#define GRPC_CORE_LIB_TSI_TRANSPORT_SECURITY_INTERFACE_H #include #include @@ -341,4 +341,4 @@ void tsi_handshaker_destroy(tsi_handshaker *self); } #endif -#endif /* GRPC_INTERNAL_CORE_TSI_TRANSPORT_SECURITY_INTERFACE_H */ +#endif /* GRPC_CORE_LIB_TSI_TRANSPORT_SECURITY_INTERFACE_H */ diff --git a/src/core/surface/init.c b/src/core/surface/init.c deleted file mode 100644 index a4a53d3ec1a..00000000000 --- a/src/core/surface/init.c +++ /dev/null @@ -1,174 +0,0 @@ -/* - * - * Copyright 2015-2016, Google Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -#include - -#include - -#include -#include -#include -#include -#include "src/core/channel/channel_stack.h" -#include "src/core/client_config/lb_policy_registry.h" -#include "src/core/client_config/lb_policies/pick_first.h" -#include "src/core/client_config/lb_policies/round_robin.h" -#include "src/core/client_config/resolver_registry.h" -#include "src/core/client_config/resolvers/dns_resolver.h" -#include "src/core/client_config/resolvers/sockaddr_resolver.h" -#include "src/core/client_config/subchannel.h" -#include "src/core/client_config/subchannel_index.h" -#include "src/core/debug/trace.h" -#include "src/core/iomgr/executor.h" -#include "src/core/iomgr/iomgr.h" -#include "src/core/profiling/timers.h" -#include "src/core/surface/api_trace.h" -#include "src/core/surface/call.h" -#include "src/core/surface/completion_queue.h" -#include "src/core/surface/init.h" -#include "src/core/surface/surface_trace.h" -#include "src/core/transport/chttp2_transport.h" -#include "src/core/transport/connectivity_state.h" - -#ifndef GRPC_DEFAULT_NAME_PREFIX -#define GRPC_DEFAULT_NAME_PREFIX "dns:///" -#endif - -#define MAX_PLUGINS 128 - -static gpr_once g_basic_init = GPR_ONCE_INIT; -static gpr_mu g_init_mu; -static int g_initializations; - -static void do_basic_init(void) { - gpr_mu_init(&g_init_mu); - g_initializations = 0; -} - -typedef struct grpc_plugin { - void (*init)(); - void (*destroy)(); -} grpc_plugin; - -static grpc_plugin g_all_of_the_plugins[MAX_PLUGINS]; -static int g_number_of_plugins = 0; - -void grpc_register_plugin(void (*init)(void), void (*destroy)(void)) { - GRPC_API_TRACE("grpc_register_plugin(init=%p, destroy=%p)", 2, - ((void*)(intptr_t)init, (void*)(intptr_t)destroy)); - GPR_ASSERT(g_number_of_plugins != MAX_PLUGINS); - g_all_of_the_plugins[g_number_of_plugins].init = init; - g_all_of_the_plugins[g_number_of_plugins].destroy = destroy; - g_number_of_plugins++; -} - -void grpc_init(void) { - int i; - gpr_once_init(&g_basic_init, do_basic_init); - - gpr_mu_lock(&g_init_mu); - if (++g_initializations == 1) { - gpr_time_init(); - grpc_mdctx_global_init(); - grpc_lb_policy_registry_init(grpc_pick_first_lb_factory_create()); - grpc_register_lb_policy(grpc_pick_first_lb_factory_create()); - grpc_register_lb_policy(grpc_round_robin_lb_factory_create()); - grpc_resolver_registry_init(GRPC_DEFAULT_NAME_PREFIX); - grpc_register_resolver_type(grpc_dns_resolver_factory_create()); - grpc_register_resolver_type(grpc_ipv4_resolver_factory_create()); - grpc_register_resolver_type(grpc_ipv6_resolver_factory_create()); -#ifdef GPR_POSIX_SOCKET - grpc_register_resolver_type(grpc_unix_resolver_factory_create()); -#endif - grpc_register_tracer("api", &grpc_api_trace); - grpc_register_tracer("channel", &grpc_trace_channel); - grpc_register_tracer("http", &grpc_http_trace); - grpc_register_tracer("flowctl", &grpc_flowctl_trace); - grpc_register_tracer("connectivity_state", &grpc_connectivity_state_trace); - grpc_security_pre_init(); - grpc_iomgr_init(); - grpc_executor_init(); - grpc_tracer_init("GRPC_TRACE"); - /* Only initialize census if no one else has and some features are - * available. */ - if (census_enabled() == CENSUS_FEATURE_NONE && - census_supported() != CENSUS_FEATURE_NONE) { - if (census_initialize(census_supported())) { /* enable all features. */ - gpr_log(GPR_ERROR, "Could not initialize census."); - } - } - gpr_timers_global_init(); - grpc_cq_global_init(); - grpc_subchannel_index_init(); - for (i = 0; i < g_number_of_plugins; i++) { - if (g_all_of_the_plugins[i].init != NULL) { - g_all_of_the_plugins[i].init(); - } - } - } - gpr_mu_unlock(&g_init_mu); - GRPC_API_TRACE("grpc_init(void)", 0, ()); -} - -void grpc_shutdown(void) { - int i; - GRPC_API_TRACE("grpc_shutdown(void)", 0, ()); - gpr_mu_lock(&g_init_mu); - if (--g_initializations == 0) { - grpc_executor_shutdown(); - grpc_cq_global_shutdown(); - grpc_iomgr_shutdown(); - grpc_subchannel_index_shutdown(); - census_shutdown(); - gpr_timers_global_destroy(); - grpc_tracer_shutdown(); - grpc_resolver_registry_shutdown(); - grpc_lb_policy_registry_shutdown(); - for (i = 0; i < g_number_of_plugins; i++) { - if (g_all_of_the_plugins[i].destroy != NULL) { - g_all_of_the_plugins[i].destroy(); - } - } - grpc_mdctx_global_shutdown(); - } - gpr_mu_unlock(&g_init_mu); -} - -int grpc_is_initialized(void) { - int r; - gpr_once_init(&g_basic_init, do_basic_init); - gpr_mu_lock(&g_init_mu); - r = g_initializations > 0; - gpr_mu_unlock(&g_init_mu); - return r; -} diff --git a/src/core/transport/chttp2/huffsyms.c b/src/core/transport/chttp2/huffsyms.c deleted file mode 100644 index 7b138e9b5db..00000000000 --- a/src/core/transport/chttp2/huffsyms.c +++ /dev/null @@ -1,297 +0,0 @@ -/* - * - * Copyright 2015, Google Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -#include "src/core/transport/chttp2/huffsyms.h" - -/* Constants pulled from the HPACK spec, and converted to C using the vim - command: - :%s/.* \([0-9a-f]\+\) \[ *\([0-9]\+\)\]/{0x\1, \2},/g */ -const grpc_chttp2_huffsym grpc_chttp2_huffsyms[GRPC_CHTTP2_NUM_HUFFSYMS] = { - {0x1ff8, 13}, - {0x7fffd8, 23}, - {0xfffffe2, 28}, - {0xfffffe3, 28}, - {0xfffffe4, 28}, - {0xfffffe5, 28}, - {0xfffffe6, 28}, - {0xfffffe7, 28}, - {0xfffffe8, 28}, - {0xffffea, 24}, - {0x3ffffffc, 30}, - {0xfffffe9, 28}, - {0xfffffea, 28}, - {0x3ffffffd, 30}, - {0xfffffeb, 28}, - {0xfffffec, 28}, - {0xfffffed, 28}, - {0xfffffee, 28}, - {0xfffffef, 28}, - {0xffffff0, 28}, - {0xffffff1, 28}, - {0xffffff2, 28}, - {0x3ffffffe, 30}, - {0xffffff3, 28}, - {0xffffff4, 28}, - {0xffffff5, 28}, - {0xffffff6, 28}, - {0xffffff7, 28}, - {0xffffff8, 28}, - {0xffffff9, 28}, - {0xffffffa, 28}, - {0xffffffb, 28}, - {0x14, 6}, - {0x3f8, 10}, - {0x3f9, 10}, - {0xffa, 12}, - {0x1ff9, 13}, - {0x15, 6}, - {0xf8, 8}, - {0x7fa, 11}, - {0x3fa, 10}, - {0x3fb, 10}, - {0xf9, 8}, - {0x7fb, 11}, - {0xfa, 8}, - {0x16, 6}, - {0x17, 6}, - {0x18, 6}, - {0x0, 5}, - {0x1, 5}, - {0x2, 5}, - {0x19, 6}, - {0x1a, 6}, - {0x1b, 6}, - {0x1c, 6}, - {0x1d, 6}, - {0x1e, 6}, - {0x1f, 6}, - {0x5c, 7}, - {0xfb, 8}, - {0x7ffc, 15}, - {0x20, 6}, - {0xffb, 12}, - {0x3fc, 10}, - {0x1ffa, 13}, - {0x21, 6}, - {0x5d, 7}, - {0x5e, 7}, - {0x5f, 7}, - {0x60, 7}, - {0x61, 7}, - {0x62, 7}, - {0x63, 7}, - {0x64, 7}, - {0x65, 7}, - {0x66, 7}, - {0x67, 7}, - {0x68, 7}, - {0x69, 7}, - {0x6a, 7}, - {0x6b, 7}, - {0x6c, 7}, - {0x6d, 7}, - {0x6e, 7}, - {0x6f, 7}, - {0x70, 7}, - {0x71, 7}, - {0x72, 7}, - {0xfc, 8}, - {0x73, 7}, - {0xfd, 8}, - {0x1ffb, 13}, - {0x7fff0, 19}, - {0x1ffc, 13}, - {0x3ffc, 14}, - {0x22, 6}, - {0x7ffd, 15}, - {0x3, 5}, - {0x23, 6}, - {0x4, 5}, - {0x24, 6}, - {0x5, 5}, - {0x25, 6}, - {0x26, 6}, - {0x27, 6}, - {0x6, 5}, - {0x74, 7}, - {0x75, 7}, - {0x28, 6}, - {0x29, 6}, - {0x2a, 6}, - {0x7, 5}, - {0x2b, 6}, - {0x76, 7}, - {0x2c, 6}, - {0x8, 5}, - {0x9, 5}, - {0x2d, 6}, - {0x77, 7}, - {0x78, 7}, - {0x79, 7}, - {0x7a, 7}, - {0x7b, 7}, - {0x7ffe, 15}, - {0x7fc, 11}, - {0x3ffd, 14}, - {0x1ffd, 13}, - {0xffffffc, 28}, - {0xfffe6, 20}, - {0x3fffd2, 22}, - {0xfffe7, 20}, - {0xfffe8, 20}, - {0x3fffd3, 22}, - {0x3fffd4, 22}, - {0x3fffd5, 22}, - {0x7fffd9, 23}, - {0x3fffd6, 22}, - {0x7fffda, 23}, - {0x7fffdb, 23}, - {0x7fffdc, 23}, - {0x7fffdd, 23}, - {0x7fffde, 23}, - {0xffffeb, 24}, - {0x7fffdf, 23}, - {0xffffec, 24}, - {0xffffed, 24}, - {0x3fffd7, 22}, - {0x7fffe0, 23}, - {0xffffee, 24}, - {0x7fffe1, 23}, - {0x7fffe2, 23}, - {0x7fffe3, 23}, - {0x7fffe4, 23}, - {0x1fffdc, 21}, - {0x3fffd8, 22}, - {0x7fffe5, 23}, - {0x3fffd9, 22}, - {0x7fffe6, 23}, - {0x7fffe7, 23}, - {0xffffef, 24}, - {0x3fffda, 22}, - {0x1fffdd, 21}, - {0xfffe9, 20}, - {0x3fffdb, 22}, - {0x3fffdc, 22}, - {0x7fffe8, 23}, - {0x7fffe9, 23}, - {0x1fffde, 21}, - {0x7fffea, 23}, - {0x3fffdd, 22}, - {0x3fffde, 22}, - {0xfffff0, 24}, - {0x1fffdf, 21}, - {0x3fffdf, 22}, - {0x7fffeb, 23}, - {0x7fffec, 23}, - {0x1fffe0, 21}, - {0x1fffe1, 21}, - {0x3fffe0, 22}, - {0x1fffe2, 21}, - {0x7fffed, 23}, - {0x3fffe1, 22}, - {0x7fffee, 23}, - {0x7fffef, 23}, - {0xfffea, 20}, - {0x3fffe2, 22}, - {0x3fffe3, 22}, - {0x3fffe4, 22}, - {0x7ffff0, 23}, - {0x3fffe5, 22}, - {0x3fffe6, 22}, - {0x7ffff1, 23}, - {0x3ffffe0, 26}, - {0x3ffffe1, 26}, - {0xfffeb, 20}, - {0x7fff1, 19}, - {0x3fffe7, 22}, - {0x7ffff2, 23}, - {0x3fffe8, 22}, - {0x1ffffec, 25}, - {0x3ffffe2, 26}, - {0x3ffffe3, 26}, - {0x3ffffe4, 26}, - {0x7ffffde, 27}, - {0x7ffffdf, 27}, - {0x3ffffe5, 26}, - {0xfffff1, 24}, - {0x1ffffed, 25}, - {0x7fff2, 19}, - {0x1fffe3, 21}, - {0x3ffffe6, 26}, - {0x7ffffe0, 27}, - {0x7ffffe1, 27}, - {0x3ffffe7, 26}, - {0x7ffffe2, 27}, - {0xfffff2, 24}, - {0x1fffe4, 21}, - {0x1fffe5, 21}, - {0x3ffffe8, 26}, - {0x3ffffe9, 26}, - {0xffffffd, 28}, - {0x7ffffe3, 27}, - {0x7ffffe4, 27}, - {0x7ffffe5, 27}, - {0xfffec, 20}, - {0xfffff3, 24}, - {0xfffed, 20}, - {0x1fffe6, 21}, - {0x3fffe9, 22}, - {0x1fffe7, 21}, - {0x1fffe8, 21}, - {0x7ffff3, 23}, - {0x3fffea, 22}, - {0x3fffeb, 22}, - {0x1ffffee, 25}, - {0x1ffffef, 25}, - {0xfffff4, 24}, - {0xfffff5, 24}, - {0x3ffffea, 26}, - {0x7ffff4, 23}, - {0x3ffffeb, 26}, - {0x7ffffe6, 27}, - {0x3ffffec, 26}, - {0x3ffffed, 26}, - {0x7ffffe7, 27}, - {0x7ffffe8, 27}, - {0x7ffffe9, 27}, - {0x7ffffea, 27}, - {0x7ffffeb, 27}, - {0xffffffe, 28}, - {0x7ffffec, 27}, - {0x7ffffed, 27}, - {0x7ffffee, 27}, - {0x7ffffef, 27}, - {0x7fffff0, 27}, - {0x3ffffee, 26}, - {0x3fffffff, 30}, -}; diff --git a/src/cpp/README.md b/src/cpp/README.md index 83d37aa2ed8..f2935e52d9e 100644 --- a/src/cpp/README.md +++ b/src/cpp/README.md @@ -61,7 +61,7 @@ below. #Documentation You can find out how to build and run our simplest gRPC C++ example in our -[C++ quick start](https://github.com/grpc/grpc/tree/{{ site.data.config.grpc_release_branch }}/examples/cpp). +[C++ quick start](../../examples/cpp). For more detailed documentation on using gRPC in C++ , see our main documentation site at [grpc.io](http://grpc.io), specifically: @@ -79,4 +79,4 @@ documentation site at [grpc.io](http://grpc.io), specifically: # Examples Code examples for gRPC C++ live in this repository's -[examples/cpp](https://github.com/grpc/grpc/tree/{{ site.data.config.grpc_release_branch }}/examples/cpp) directory. +[examples/cpp](../../examples/cpp) directory. diff --git a/src/cpp/client/channel.cc b/src/cpp/client/channel.cc index ae20392d116..f1746761729 100644 --- a/src/cpp/client/channel.cc +++ b/src/cpp/client/channel.cc @@ -49,7 +49,7 @@ #include #include #include -#include "src/core/profiling/timers.h" +#include "src/core/lib/profiling/timers.h" namespace grpc { diff --git a/src/cpp/client/client_context.cc b/src/cpp/client/client_context.cc index 73147fd7bb2..de8b2db6e39 100644 --- a/src/cpp/client/client_context.cc +++ b/src/cpp/client/client_context.cc @@ -33,15 +33,15 @@ #include +#include +#include +#include #include #include #include #include -#include -#include -#include -#include "src/core/channel/compress_filter.h" +#include "src/core/lib/channel/compress_filter.h" #include "src/cpp/common/create_auth_context.h" namespace grpc { diff --git a/src/cpp/client/insecure_credentials.cc b/src/cpp/client/insecure_credentials.cc index 1293203b932..efea02995a3 100644 --- a/src/cpp/client/insecure_credentials.cc +++ b/src/cpp/client/insecure_credentials.cc @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -33,11 +33,11 @@ #include -#include -#include #include #include #include +#include +#include #include "src/cpp/client/create_channel_internal.h" namespace grpc { diff --git a/src/cpp/client/secure_credentials.cc b/src/cpp/client/secure_credentials.cc index 074dae7ca79..cdc8406f245 100644 --- a/src/cpp/client/secure_credentials.cc +++ b/src/cpp/client/secure_credentials.cc @@ -31,12 +31,12 @@ * */ +#include "src/cpp/client/secure_credentials.h" #include #include #include #include #include "src/cpp/client/create_channel_internal.h" -#include "src/cpp/client/secure_credentials.h" #include "src/cpp/common/secure_auth_context.h" namespace grpc { @@ -60,8 +60,7 @@ std::shared_ptr SecureChannelCredentials::CreateChannel( SecureCallCredentials::SecureCallCredentials(grpc_call_credentials* c_creds) : c_creds_(c_creds) { - internal::GrpcLibraryInitializer gli_initializer; - gli_initializer.summon(); + g_gli_initializer.summon(); } bool SecureCallCredentials::ApplyToCall(grpc_call* call) { @@ -83,14 +82,14 @@ std::shared_ptr WrapCallCredentials( } // namespace std::shared_ptr GoogleDefaultCredentials() { - GrpcLibrary init; // To call grpc_init(). + GrpcLibraryCodegen init; // To call grpc_init(). return WrapChannelCredentials(grpc_google_default_credentials_create()); } // Builds SSL Credentials given SSL specific options std::shared_ptr SslCredentials( const SslCredentialsOptions& options) { - GrpcLibrary init; // To call grpc_init(). + GrpcLibraryCodegen init; // To call grpc_init(). grpc_ssl_pem_key_cert_pair pem_key_cert_pair = { options.pem_private_key.c_str(), options.pem_cert_chain.c_str()}; @@ -102,7 +101,7 @@ std::shared_ptr SslCredentials( // Builds credentials for use when running in GCE std::shared_ptr GoogleComputeEngineCredentials() { - GrpcLibrary init; // To call grpc_init(). + GrpcLibraryCodegen init; // To call grpc_init(). return WrapCallCredentials( grpc_google_compute_engine_credentials_create(nullptr)); } @@ -110,7 +109,7 @@ std::shared_ptr GoogleComputeEngineCredentials() { // Builds JWT credentials. std::shared_ptr ServiceAccountJWTAccessCredentials( const grpc::string& json_key, long token_lifetime_seconds) { - GrpcLibrary init; // To call grpc_init(). + GrpcLibraryCodegen init; // To call grpc_init(). if (token_lifetime_seconds <= 0) { gpr_log(GPR_ERROR, "Trying to create JWTCredentials with non-positive lifetime"); @@ -125,7 +124,7 @@ std::shared_ptr ServiceAccountJWTAccessCredentials( // Builds refresh token credentials. std::shared_ptr GoogleRefreshTokenCredentials( const grpc::string& json_refresh_token) { - GrpcLibrary init; // To call grpc_init(). + GrpcLibraryCodegen init; // To call grpc_init(). return WrapCallCredentials(grpc_google_refresh_token_credentials_create( json_refresh_token.c_str(), nullptr)); } @@ -133,7 +132,7 @@ std::shared_ptr GoogleRefreshTokenCredentials( // Builds access token credentials. std::shared_ptr AccessTokenCredentials( const grpc::string& access_token) { - GrpcLibrary init; // To call grpc_init(). + GrpcLibraryCodegen init; // To call grpc_init(). return WrapCallCredentials( grpc_access_token_credentials_create(access_token.c_str(), nullptr)); } @@ -142,7 +141,7 @@ std::shared_ptr AccessTokenCredentials( std::shared_ptr GoogleIAMCredentials( const grpc::string& authorization_token, const grpc::string& authority_selector) { - GrpcLibrary init; // To call grpc_init(). + GrpcLibraryCodegen init; // To call grpc_init(). return WrapCallCredentials(grpc_google_iam_credentials_create( authorization_token.c_str(), authority_selector.c_str(), nullptr)); } @@ -224,7 +223,7 @@ MetadataCredentialsPluginWrapper::MetadataCredentialsPluginWrapper( std::shared_ptr MetadataCredentialsFromPlugin( std::unique_ptr plugin) { - GrpcLibrary init; // To call grpc_init(). + GrpcLibraryCodegen init; // To call grpc_init(). const char* type = plugin->GetType(); MetadataCredentialsPluginWrapper* wrapper = new MetadataCredentialsPluginWrapper(std::move(plugin)); diff --git a/src/cpp/client/secure_credentials.h b/src/cpp/client/secure_credentials.h index 9e841021543..fd82331a440 100644 --- a/src/cpp/client/secure_credentials.h +++ b/src/cpp/client/secure_credentials.h @@ -36,8 +36,8 @@ #include -#include #include +#include #include "src/cpp/server/thread_pool_interface.h" diff --git a/src/cpp/codegen/codegen_init.cc b/src/cpp/codegen/codegen_init.cc new file mode 100644 index 00000000000..c5d22124b71 --- /dev/null +++ b/src/cpp/codegen/codegen_init.cc @@ -0,0 +1,45 @@ +/* + * + * Copyright 2016, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include +#include + +/// Initializes the global gRPC variables for the codegen library. These will +/// stay null in the absence of of grpc++ library. In this case, no gRPC +/// features such as the ability to perform calls will be available. Trying to +/// perform them would result in a segmentation fault when trying to deference +/// the following nulled globals. These should be associated with actual +/// as part of the instantiation of a \a grpc::GrpcLibraryInitializer variable. + +grpc::CoreCodegenInterface* grpc::g_core_codegen_interface = nullptr; +grpc::GrpcLibraryInterface* grpc::g_glip = nullptr; diff --git a/src/cpp/common/call.cc b/src/cpp/common/call.cc deleted file mode 100644 index 5b87c2a8067..00000000000 --- a/src/cpp/common/call.cc +++ /dev/null @@ -1,92 +0,0 @@ -/* - * - * Copyright 2015, Google Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -#include - -#include -#include -#include -#include -#include "src/core/profiling/timers.h" - -namespace grpc { - -void FillMetadataMap( - grpc_metadata_array* arr, - std::multimap* metadata) { - for (size_t i = 0; i < arr->count; i++) { - // TODO(yangg) handle duplicates? - metadata->insert(std::pair( - arr->metadata[i].key, grpc::string_ref(arr->metadata[i].value, - arr->metadata[i].value_length))); - } - grpc_metadata_array_destroy(arr); - grpc_metadata_array_init(arr); -} - -// TODO(yangg) if the map is changed before we send, the pointers will be a -// mess. Make sure it does not happen. -grpc_metadata* FillMetadataArray( - const std::multimap& metadata) { - if (metadata.empty()) { - return nullptr; - } - grpc_metadata* metadata_array = - (grpc_metadata*)gpr_malloc(metadata.size() * sizeof(grpc_metadata)); - size_t i = 0; - for (auto iter = metadata.cbegin(); iter != metadata.cend(); ++iter, ++i) { - metadata_array[i].key = iter->first.c_str(); - metadata_array[i].value = iter->second.c_str(); - metadata_array[i].value_length = iter->second.size(); - } - return metadata_array; -} - -Call::Call(grpc_call* call, CallHook* call_hook, CompletionQueue* cq) - : call_hook_(call_hook), cq_(cq), call_(call), max_message_size_(-1) {} - -Call::Call(grpc_call* call, CallHook* call_hook, CompletionQueue* cq, - int max_message_size) - : call_hook_(call_hook), - cq_(cq), - call_(call), - max_message_size_(max_message_size) {} - -void Call::PerformOps(CallOpSetInterface* ops) { - if (max_message_size_ > 0) { - ops->set_max_message_size(max_message_size_); - } - call_hook_->PerformOpsOnCall(ops, this); -} - -} // namespace grpc diff --git a/src/cpp/common/channel_arguments.cc b/src/cpp/common/channel_arguments.cc index d7faa5e173d..3bdb4398abc 100644 --- a/src/cpp/common/channel_arguments.cc +++ b/src/cpp/common/channel_arguments.cc @@ -36,7 +36,7 @@ #include #include -#include "src/core/channel/channel_args.h" +#include "src/core/lib/channel/channel_args.h" namespace grpc { diff --git a/src/cpp/common/completion_queue.cc b/src/cpp/common/completion_queue.cc index 4f76dfff1d7..729dc33749a 100644 --- a/src/cpp/common/completion_queue.cc +++ b/src/cpp/common/completion_queue.cc @@ -34,7 +34,6 @@ #include -#include #include #include #include @@ -43,16 +42,13 @@ namespace grpc { static internal::GrpcLibraryInitializer g_gli_initializer; -CompletionQueue::CompletionQueue() { - g_gli_initializer.summon(); - cq_ = grpc_completion_queue_create(nullptr); -} CompletionQueue::CompletionQueue(grpc_completion_queue* take) : cq_(take) {} -CompletionQueue::~CompletionQueue() { grpc_completion_queue_destroy(cq_); } - -void CompletionQueue::Shutdown() { grpc_completion_queue_shutdown(cq_); } +void CompletionQueue::Shutdown() { + g_gli_initializer.summon(); + grpc_completion_queue_shutdown(cq_); +} CompletionQueue::NextStatus CompletionQueue::AsyncNextInternal( void** tag, bool* ok, gpr_timespec deadline) { @@ -75,25 +71,4 @@ CompletionQueue::NextStatus CompletionQueue::AsyncNextInternal( } } -bool CompletionQueue::Pluck(CompletionQueueTag* tag) { - auto deadline = gpr_inf_future(GPR_CLOCK_REALTIME); - auto ev = grpc_completion_queue_pluck(cq_, tag, deadline, nullptr); - bool ok = ev.success != 0; - void* ignored = tag; - GPR_ASSERT(tag->FinalizeResult(&ignored, &ok)); - GPR_ASSERT(ignored == tag); - // Ignore mutations by FinalizeResult: Pluck returns the C API status - return ev.success != 0; -} - -void CompletionQueue::TryPluck(CompletionQueueTag* tag) { - auto deadline = gpr_time_0(GPR_CLOCK_REALTIME); - auto ev = grpc_completion_queue_pluck(cq_, tag, deadline, nullptr); - if (ev.type == GRPC_QUEUE_TIMEOUT) return; - bool ok = ev.success != 0; - void* ignored = tag; - // the tag must be swallowed if using TryPluck - GPR_ASSERT(!tag->FinalizeResult(&ignored, &ok)); -} - } // namespace grpc diff --git a/src/cpp/proto/proto_utils.cc b/src/cpp/common/core_codegen.cc similarity index 66% rename from src/cpp/proto/proto_utils.cc rename to src/cpp/common/core_codegen.cc index 79e7bf1801d..33a8f755e69 100644 --- a/src/cpp/proto/proto_utils.cc +++ b/src/cpp/common/core_codegen.cc @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,28 +31,31 @@ * */ -#include +#include "src/cpp/common/core_codegen.h" -#include +#include -#include +#include #include #include -#include +#include +#include +#include +#include +#include #include #include -#include -#include -#include "src/core/profiling/timers.h" +#include "src/core/lib/profiling/timers.h" -const int kMaxBufferLength = 8192; +namespace { + +const int kGrpcBufferWriterMaxBufferLength = 8192; class GrpcBufferWriter GRPC_FINAL : public ::grpc::protobuf::io::ZeroCopyOutputStream { public: - explicit GrpcBufferWriter(grpc_byte_buffer** bp, - int block_size = kMaxBufferLength) + explicit GrpcBufferWriter(grpc_byte_buffer** bp, int block_size) : block_size_(block_size), byte_count_(0), have_backup_(false) { *bp = grpc_raw_byte_buffer_create(NULL, 0); slice_buffer_ = &(*bp)->data.raw.slice_buffer; @@ -161,14 +164,56 @@ class GrpcBufferReader GRPC_FINAL grpc_byte_buffer_reader reader_; gpr_slice slice_; }; +} // namespace namespace grpc { -Status SerializeProto(const grpc::protobuf::Message& msg, - grpc_byte_buffer** bp) { +grpc_completion_queue* CoreCodegen::grpc_completion_queue_create( + void* reserved) { + return ::grpc_completion_queue_create(reserved); +} + +void CoreCodegen::grpc_completion_queue_destroy(grpc_completion_queue* cq) { + ::grpc_completion_queue_destroy(cq); +} + +grpc_event CoreCodegen::grpc_completion_queue_pluck(grpc_completion_queue* cq, + void* tag, + gpr_timespec deadline, + void* reserved) { + return ::grpc_completion_queue_pluck(cq, tag, deadline, reserved); +} + +void* CoreCodegen::gpr_malloc(size_t size) { return ::gpr_malloc(size); } + +void CoreCodegen::gpr_free(void* p) { return ::gpr_free(p); } + +void CoreCodegen::grpc_byte_buffer_destroy(grpc_byte_buffer* bb) { + ::grpc_byte_buffer_destroy(bb); +} + +void CoreCodegen::grpc_metadata_array_init(grpc_metadata_array* array) { + ::grpc_metadata_array_init(array); +} + +void CoreCodegen::grpc_metadata_array_destroy(grpc_metadata_array* array) { + ::grpc_metadata_array_destroy(array); +} + +gpr_timespec CoreCodegen::gpr_inf_future(gpr_clock_type type) { + return ::gpr_inf_future(type); +} + +void CoreCodegen::assert_fail(const char* failed_assertion) { + gpr_log(GPR_ERROR, "assertion failed: %s", failed_assertion); + abort(); +} + +Status CoreCodegen::SerializeProto(const grpc::protobuf::Message& msg, + grpc_byte_buffer** bp) { GPR_TIMER_SCOPE("SerializeProto", 0); int byte_size = msg.ByteSize(); - if (byte_size <= kMaxBufferLength) { + if (byte_size <= kGrpcBufferWriterMaxBufferLength) { gpr_slice slice = gpr_slice_malloc(byte_size); GPR_ASSERT(GPR_SLICE_END_PTR(slice) == msg.SerializeWithCachedSizesToArray(GPR_SLICE_START_PTR(slice))); @@ -176,31 +221,36 @@ Status SerializeProto(const grpc::protobuf::Message& msg, gpr_slice_unref(slice); return Status::OK; } else { - GrpcBufferWriter writer(bp); + GrpcBufferWriter writer(bp, kGrpcBufferWriterMaxBufferLength); return msg.SerializeToZeroCopyStream(&writer) ? Status::OK : Status(StatusCode::INTERNAL, "Failed to serialize message"); } } -Status DeserializeProto(grpc_byte_buffer* buffer, grpc::protobuf::Message* msg, - int max_message_size) { +Status CoreCodegen::DeserializeProto(grpc_byte_buffer* buffer, + grpc::protobuf::Message* msg, + int max_message_size) { GPR_TIMER_SCOPE("DeserializeProto", 0); - if (!buffer) { + if (buffer == nullptr) { return Status(StatusCode::INTERNAL, "No payload"); } - GrpcBufferReader reader(buffer); - ::grpc::protobuf::io::CodedInputStream decoder(&reader); - if (max_message_size > 0) { - decoder.SetTotalBytesLimit(max_message_size, max_message_size); - } - if (!msg->ParseFromCodedStream(&decoder)) { - return Status(StatusCode::INTERNAL, msg->InitializationErrorString()); - } - if (!decoder.ConsumedEntireMessage()) { - return Status(StatusCode::INTERNAL, "Did not read entire message"); + Status result = Status::OK; + { + GrpcBufferReader reader(buffer); + ::grpc::protobuf::io::CodedInputStream decoder(&reader); + if (max_message_size > 0) { + decoder.SetTotalBytesLimit(max_message_size, max_message_size); + } + if (!msg->ParseFromCodedStream(&decoder)) { + result = Status(StatusCode::INTERNAL, msg->InitializationErrorString()); + } + if (!decoder.ConsumedEntireMessage()) { + result = Status(StatusCode::INTERNAL, "Did not read entire message"); + } } - return Status::OK; + grpc_byte_buffer_destroy(buffer); + return result; } } // namespace grpc diff --git a/src/cpp/common/core_codegen.h b/src/cpp/common/core_codegen.h new file mode 100644 index 00000000000..e15cb4c34aa --- /dev/null +++ b/src/cpp/common/core_codegen.h @@ -0,0 +1,71 @@ +/* + * + * Copyright 2016, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +// This file should be compiled as part of grpc++. + +#include +#include +#include + +namespace grpc { + +/// Implementation of the core codegen interface. +class CoreCodegen : public CoreCodegenInterface { + private: + Status SerializeProto(const grpc::protobuf::Message& msg, + grpc_byte_buffer** bp) override; + + Status DeserializeProto(grpc_byte_buffer* buffer, + grpc::protobuf::Message* msg, + int max_message_size) override; + + grpc_completion_queue* grpc_completion_queue_create(void* reserved) override; + void grpc_completion_queue_destroy(grpc_completion_queue* cq) override; + grpc_event grpc_completion_queue_pluck(grpc_completion_queue* cq, void* tag, + gpr_timespec deadline, + void* reserved) override; + + void* gpr_malloc(size_t size) override; + void gpr_free(void* p) override; + + void grpc_byte_buffer_destroy(grpc_byte_buffer* bb) override; + + void grpc_metadata_array_init(grpc_metadata_array* array) override; + void grpc_metadata_array_destroy(grpc_metadata_array* array) override; + + gpr_timespec gpr_inf_future(gpr_clock_type type) override; + + void assert_fail(const char* failed_assertion) override; +}; + +} // namespace grpc diff --git a/src/cpp/common/create_auth_context.h b/src/cpp/common/create_auth_context.h index 4f3da397bad..c53055503f5 100644 --- a/src/cpp/common/create_auth_context.h +++ b/src/cpp/common/create_auth_context.h @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -32,8 +32,8 @@ */ #include -#include #include +#include namespace grpc { diff --git a/src/cpp/common/insecure_create_auth_context.cc b/src/cpp/common/insecure_create_auth_context.cc index b2e153229a9..7ec5d9bd128 100644 --- a/src/cpp/common/insecure_create_auth_context.cc +++ b/src/cpp/common/insecure_create_auth_context.cc @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -32,8 +32,8 @@ */ #include -#include #include +#include namespace grpc { diff --git a/src/cpp/common/secure_channel_arguments.cc b/src/cpp/common/secure_channel_arguments.cc index e17d3b58b06..82e02f0238a 100644 --- a/src/cpp/common/secure_channel_arguments.cc +++ b/src/cpp/common/secure_channel_arguments.cc @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -34,7 +34,7 @@ #include #include -#include "src/core/channel/channel_args.h" +#include "src/core/lib/channel/channel_args.h" namespace grpc { diff --git a/src/cpp/common/secure_create_auth_context.cc b/src/cpp/common/secure_create_auth_context.cc index 40bc298b642..d7cf803fde0 100644 --- a/src/cpp/common/secure_create_auth_context.cc +++ b/src/cpp/common/secure_create_auth_context.cc @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -32,9 +32,9 @@ */ #include +#include #include #include -#include #include "src/cpp/common/secure_auth_context.h" namespace grpc { diff --git a/src/cpp/server/server.cc b/src/cpp/server/server.cc index 6d31a608c80..7e5f557ffaf 100644 --- a/src/cpp/server/server.cc +++ b/src/cpp/server/server.cc @@ -49,7 +49,7 @@ #include #include -#include "src/core/profiling/timers.h" +#include "src/core/lib/profiling/timers.h" #include "src/cpp/server/thread_pool_interface.h" namespace grpc { diff --git a/src/cpp/server/server_builder.cc b/src/cpp/server/server_builder.cc index 134e5f1d5ff..1947d68e3e8 100644 --- a/src/cpp/server/server_builder.cc +++ b/src/cpp/server/server_builder.cc @@ -33,10 +33,10 @@ #include -#include -#include #include #include +#include +#include #include "src/cpp/server/thread_pool_interface.h" namespace grpc { diff --git a/src/cpp/server/server_context.cc b/src/cpp/server/server_context.cc index eb49b210379..04226509539 100644 --- a/src/cpp/server/server_context.cc +++ b/src/cpp/server/server_context.cc @@ -42,7 +42,8 @@ #include #include -#include "src/core/channel/compress_filter.h" +#include "src/core/lib/channel/compress_filter.h" +#include "src/core/lib/surface/call.h" #include "src/cpp/common/create_auth_context.h" namespace grpc { @@ -197,7 +198,7 @@ bool ServerContext::IsCancelled() const { void ServerContext::set_compression_level(grpc_compression_level level) { const grpc_compression_algorithm algorithm_for_level = - grpc_compression_algorithm_for_level(level); + grpc_call_compression_for_level(call_, level); set_compression_algorithm(algorithm_for_level); } diff --git a/src/cpp/util/string_ref.cc b/src/cpp/util/string_ref.cc index 66c79a18184..b55019b5f2c 100644 --- a/src/cpp/util/string_ref.cc +++ b/src/cpp/util/string_ref.cc @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -33,72 +33,8 @@ #include -#include - -#include -#include - namespace grpc { const size_t string_ref::npos = size_t(-1); -string_ref& string_ref::operator=(const string_ref& rhs) { - data_ = rhs.data_; - length_ = rhs.length_; - return *this; -} - -string_ref::string_ref(const char* s) : data_(s), length_(strlen(s)) {} - -string_ref string_ref::substr(size_t pos, size_t n) const { - if (pos > length_) pos = length_; - if (n > (length_ - pos)) n = length_ - pos; - return string_ref(data_ + pos, n); -} - -int string_ref::compare(string_ref x) const { - size_t min_size = length_ < x.length_ ? length_ : x.length_; - int r = memcmp(data_, x.data_, min_size); - if (r < 0) return -1; - if (r > 0) return 1; - if (length_ < x.length_) return -1; - if (length_ > x.length_) return 1; - return 0; -} - -bool string_ref::starts_with(string_ref x) const { - return length_ >= x.length_ && (memcmp(data_, x.data_, x.length_) == 0); -} - -bool string_ref::ends_with(string_ref x) const { - return length_ >= x.length_ && - (memcmp(data_ + (length_ - x.length_), x.data_, x.length_) == 0); -} - -size_t string_ref::find(string_ref s) const { - auto it = std::search(cbegin(), cend(), s.cbegin(), s.cend()); - return it == cend() ? npos : std::distance(cbegin(), it); -} - -size_t string_ref::find(char c) const { - auto it = std::find(cbegin(), cend(), c); - return it == cend() ? npos : std::distance(cbegin(), it); -} - -bool operator==(string_ref x, string_ref y) { return x.compare(y) == 0; } - -bool operator!=(string_ref x, string_ref y) { return x.compare(y) != 0; } - -bool operator<(string_ref x, string_ref y) { return x.compare(y) < 0; } - -bool operator<=(string_ref x, string_ref y) { return x.compare(y) <= 0; } - -bool operator>(string_ref x, string_ref y) { return x.compare(y) > 0; } - -bool operator>=(string_ref x, string_ref y) { return x.compare(y) >= 0; } - -std::ostream& operator<<(std::ostream& out, const string_ref& string) { - return out << grpc::string(string.begin(), string.end()); -} - } // namespace grpc diff --git a/src/cpp/util/time.cc b/src/cpp/util/time.cc index 2685e31ee60..bb5fce389d9 100644 --- a/src/cpp/util/time.cc +++ b/src/cpp/util/time.cc @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -35,8 +35,8 @@ #ifndef GRPC_CXX0X_NO_CHRONO -#include #include +#include using std::chrono::duration_cast; using std::chrono::nanoseconds; diff --git a/src/csharp/Grpc.Core/Internal/NativeExtension.cs b/src/csharp/Grpc.Core/Internal/NativeExtension.cs index 4c742ab6c3d..282816d51e0 100644 --- a/src/csharp/Grpc.Core/Internal/NativeExtension.cs +++ b/src/csharp/Grpc.Core/Internal/NativeExtension.cs @@ -32,6 +32,7 @@ #endregion using System; +using System.Globalization; using System.IO; using System.Reflection; @@ -99,14 +100,30 @@ namespace Grpc.Core.Internal // TODO: allow customizing path to native extension (possibly through exposing a GrpcEnvironment property). var libraryFlavor = string.Format("{0}_{1}", GetPlatformString(), GetArchitectureString()); - var fullPath = Path.Combine(GetExecutingAssemblyDirectory(), + var fullPath = Path.Combine(Path.GetDirectoryName(GetAssemblyPath()), NativeLibrariesDir, libraryFlavor, GetNativeLibraryFilename()); return new UnmanagedLibrary(fullPath); } - private static string GetExecutingAssemblyDirectory() + private static string GetAssemblyPath() { - return Path.GetDirectoryName(typeof(NativeExtension).GetTypeInfo().Assembly.Location); + var assembly = typeof(NativeExtension).GetTypeInfo().Assembly; + + // If assembly is shadowed (e.g. in a webapp), EscapedCodeBase is pointing + // to the original location of the assembly, and Location is pointing + // to the shadow copy. We care about the original location because + // the native dlls don't get shadowed. + var escapedCodeBase = assembly.EscapedCodeBase; + if (IsFileUri(escapedCodeBase)) + { + return new Uri(escapedCodeBase).LocalPath; + } + return assembly.Location; + } + + private static bool IsFileUri(string uri) + { + return uri.ToLowerInvariant().StartsWith(Uri.UriSchemeFile); } private static string GetPlatformString() diff --git a/src/csharp/Grpc.Core/Logging/ConsoleLogger.cs b/src/csharp/Grpc.Core/Logging/ConsoleLogger.cs index 5c5b8021641..d41b1b9f269 100644 --- a/src/csharp/Grpc.Core/Logging/ConsoleLogger.cs +++ b/src/csharp/Grpc.Core/Logging/ConsoleLogger.cs @@ -1,6 +1,6 @@ #region Copyright notice and license -// Copyright 2015, Google Inc. +// Copyright 2015-2016, Google Inc. // All rights reserved. // // Redistribution and use in source and binary forms, with or without @@ -33,12 +33,16 @@ using System; using System.Collections.Generic; +using System.Globalization; namespace Grpc.Core.Logging { /// Logger that logs to System.Console. public class ConsoleLogger : ILogger { + // Format similar enough to C core log format except nanosecond precision is not supported. + const string DateTimeFormatString = "MMdd HH:mm:ss.ffffff"; + readonly Type forType; readonly string forTypeString; @@ -142,7 +146,7 @@ namespace Grpc.Core.Logging { Console.Error.WriteLine("{0}{1} {2}{3}", severityString, - DateTime.Now, + DateTime.Now.ToString(DateTimeFormatString, CultureInfo.InvariantCulture), forTypeString, message); } diff --git a/src/csharp/Grpc.IntegrationTesting/BenchmarkServiceImpl.cs b/src/csharp/Grpc.IntegrationTesting/BenchmarkServiceImpl.cs index 47a15224f16..1edeedae2fa 100644 --- a/src/csharp/Grpc.IntegrationTesting/BenchmarkServiceImpl.cs +++ b/src/csharp/Grpc.IntegrationTesting/BenchmarkServiceImpl.cs @@ -1,6 +1,6 @@ #region Copyright notice and license -// Copyright 2015, Google Inc. +// Copyright 2015-2016, Google Inc. // All rights reserved. // // Redistribution and use in source and binary forms, with or without @@ -46,16 +46,13 @@ namespace Grpc.Testing /// public class BenchmarkServiceImpl : BenchmarkService.IBenchmarkService { - private readonly int responseSize; - - public BenchmarkServiceImpl(int responseSize) + public BenchmarkServiceImpl() { - this.responseSize = responseSize; } public Task UnaryCall(SimpleRequest request, ServerCallContext context) { - var response = new SimpleResponse { Payload = CreateZerosPayload(responseSize) }; + var response = new SimpleResponse { Payload = CreateZerosPayload(request.ResponseSize) }; return Task.FromResult(response); } @@ -63,7 +60,7 @@ namespace Grpc.Testing { await requestStream.ForEachAsync(async request => { - var response = new SimpleResponse { Payload = CreateZerosPayload(responseSize) }; + var response = new SimpleResponse { Payload = CreateZerosPayload(request.ResponseSize) }; await responseStream.WriteAsync(response); }); } diff --git a/src/csharp/Grpc.IntegrationTesting/ClientRunners.cs b/src/csharp/Grpc.IntegrationTesting/ClientRunners.cs index c4016012cbb..e6dc2321c4c 100644 --- a/src/csharp/Grpc.IntegrationTesting/ClientRunners.cs +++ b/src/csharp/Grpc.IntegrationTesting/ClientRunners.cs @@ -41,6 +41,7 @@ using System.Threading; using System.Threading.Tasks; using Google.Protobuf; using Grpc.Core; +using Grpc.Core.Logging; using Grpc.Core.Utils; using NUnit.Framework; using Grpc.Testing; @@ -50,42 +51,65 @@ namespace Grpc.IntegrationTesting /// /// Helper methods to start client runners for performance testing. /// - public static class ClientRunners + public class ClientRunners { + static readonly ILogger Logger = GrpcEnvironment.Logger.ForType(); + /// /// Creates a started client runner. /// public static IClientRunner CreateStarted(ClientConfig config) { + Logger.Debug("ClientConfig: {0}", config); string target = config.ServerTargets.Single(); - GrpcPreconditions.CheckArgument(config.LoadParams.LoadCase == LoadParams.LoadOneofCase.ClosedLoop); + GrpcPreconditions.CheckArgument(config.LoadParams.LoadCase == LoadParams.LoadOneofCase.ClosedLoop, + "Only closed loop scenario supported for C#"); + GrpcPreconditions.CheckArgument(config.ClientChannels == 1, "ClientConfig.ClientChannels needs to be 1"); - var credentials = config.SecurityParams != null ? TestCredentials.CreateSslCredentials() : ChannelCredentials.Insecure; - var channel = new Channel(target, credentials); + if (config.OutstandingRpcsPerChannel != 0) + { + Logger.Warning("ClientConfig.OutstandingRpcsPerChannel is not supported for C#. Ignoring the value"); + } + if (config.AsyncClientThreads != 0) + { + Logger.Warning("ClientConfig.AsyncClientThreads is not supported for C#. Ignoring the value"); + } + if (config.CoreLimit != 0) + { + Logger.Warning("ClientConfig.CoreLimit is not supported for C#. Ignoring the value"); + } + if (config.CoreList.Count > 0) + { + Logger.Warning("ClientConfig.CoreList is not supported for C#. Ignoring the value"); + } - switch (config.RpcType) + var credentials = config.SecurityParams != null ? TestCredentials.CreateSslCredentials() : ChannelCredentials.Insecure; + List channelOptions = null; + if (config.SecurityParams != null && config.SecurityParams.ServerHostOverride != "") { - case RpcType.UNARY: - return new SyncUnaryClientRunner(channel, - config.PayloadConfig.SimpleParams.ReqSize, - config.HistogramParams); - - case RpcType.STREAMING: - default: - throw new ArgumentException("Unsupported RpcType."); + channelOptions = new List + { + new ChannelOption(ChannelOptions.SslTargetNameOverride, config.SecurityParams.ServerHostOverride) + }; } + var channel = new Channel(target, credentials, channelOptions); + + return new ClientRunnerImpl(channel, + config.ClientType, + config.RpcType, + config.PayloadConfig, + config.HistogramParams); } } - /// - /// Client that starts synchronous unary calls in a closed loop. - /// - public class SyncUnaryClientRunner : IClientRunner + public class ClientRunnerImpl : IClientRunner { const double SecondsToNanos = 1e9; readonly Channel channel; - readonly int payloadSize; + readonly ClientType clientType; + readonly RpcType rpcType; + readonly PayloadConfig payloadConfig; readonly Histogram histogram; readonly BenchmarkService.IBenchmarkServiceClient client; @@ -93,15 +117,19 @@ namespace Grpc.IntegrationTesting readonly CancellationTokenSource stoppedCts; readonly WallClockStopwatch wallClockStopwatch = new WallClockStopwatch(); - public SyncUnaryClientRunner(Channel channel, int payloadSize, HistogramParams histogramParams) + public ClientRunnerImpl(Channel channel, ClientType clientType, RpcType rpcType, PayloadConfig payloadConfig, HistogramParams histogramParams) { this.channel = GrpcPreconditions.CheckNotNull(channel); - this.payloadSize = payloadSize; + this.clientType = clientType; + this.rpcType = rpcType; + this.payloadConfig = payloadConfig; this.histogram = new Histogram(histogramParams.Resolution, histogramParams.MaxPossible); this.stoppedCts = new CancellationTokenSource(); this.client = BenchmarkService.NewClient(channel); - this.runnerTask = Task.Factory.StartNew(Run, TaskCreationOptions.LongRunning); + + var threadBody = GetThreadBody(); + this.runnerTask = Task.Factory.StartNew(threadBody, TaskCreationOptions.LongRunning); } public ClientStats GetStats(bool reset) @@ -126,12 +154,9 @@ namespace Grpc.IntegrationTesting await channel.ShutdownAsync(); } - private void Run() + private void RunClosedLoopUnary() { - var request = new SimpleRequest - { - Payload = CreateZerosPayload(payloadSize) - }; + var request = CreateSimpleRequest(); var stopwatch = new Stopwatch(); while (!stoppedCts.Token.IsCancellationRequested) @@ -145,6 +170,124 @@ namespace Grpc.IntegrationTesting } } + private async Task RunClosedLoopUnaryAsync() + { + var request = CreateSimpleRequest(); + var stopwatch = new Stopwatch(); + + while (!stoppedCts.Token.IsCancellationRequested) + { + stopwatch.Restart(); + await client.UnaryCallAsync(request); + stopwatch.Stop(); + + // spec requires data point in nanoseconds. + histogram.AddObservation(stopwatch.Elapsed.TotalSeconds * SecondsToNanos); + } + } + + private async Task RunClosedLoopStreamingAsync() + { + var request = CreateSimpleRequest(); + var stopwatch = new Stopwatch(); + + using (var call = client.StreamingCall()) + { + while (!stoppedCts.Token.IsCancellationRequested) + { + stopwatch.Restart(); + await call.RequestStream.WriteAsync(request); + await call.ResponseStream.MoveNext(); + stopwatch.Stop(); + + // spec requires data point in nanoseconds. + histogram.AddObservation(stopwatch.Elapsed.TotalSeconds * SecondsToNanos); + } + + // finish the streaming call + await call.RequestStream.CompleteAsync(); + Assert.IsFalse(await call.ResponseStream.MoveNext()); + } + } + + private async Task RunGenericClosedLoopStreamingAsync() + { + var request = CreateByteBufferRequest(); + var stopwatch = new Stopwatch(); + + var callDetails = new CallInvocationDetails(channel, GenericService.StreamingCallMethod, new CallOptions()); + + using (var call = Calls.AsyncDuplexStreamingCall(callDetails)) + { + while (!stoppedCts.Token.IsCancellationRequested) + { + stopwatch.Restart(); + await call.RequestStream.WriteAsync(request); + await call.ResponseStream.MoveNext(); + stopwatch.Stop(); + + // spec requires data point in nanoseconds. + histogram.AddObservation(stopwatch.Elapsed.TotalSeconds * SecondsToNanos); + } + + // finish the streaming call + await call.RequestStream.CompleteAsync(); + Assert.IsFalse(await call.ResponseStream.MoveNext()); + } + } + + private Action GetThreadBody() + { + if (payloadConfig.PayloadCase == PayloadConfig.PayloadOneofCase.BytebufParams) + { + GrpcPreconditions.CheckArgument(clientType == ClientType.ASYNC_CLIENT, "Generic client only supports async API"); + GrpcPreconditions.CheckArgument(rpcType == RpcType.STREAMING, "Generic client only supports streaming calls"); + return () => + { + RunGenericClosedLoopStreamingAsync().Wait(); + }; + } + + GrpcPreconditions.CheckNotNull(payloadConfig.SimpleParams); + if (clientType == ClientType.SYNC_CLIENT) + { + GrpcPreconditions.CheckArgument(rpcType == RpcType.UNARY, "Sync client can only be used for Unary calls in C#"); + return RunClosedLoopUnary; + } + else if (clientType == ClientType.ASYNC_CLIENT) + { + switch (rpcType) + { + case RpcType.UNARY: + return () => + { + RunClosedLoopUnaryAsync().Wait(); + }; + case RpcType.STREAMING: + return () => + { + RunClosedLoopStreamingAsync().Wait(); + }; + } + } + throw new ArgumentException("Unsupported configuration."); + } + + private SimpleRequest CreateSimpleRequest() + { + GrpcPreconditions.CheckNotNull(payloadConfig.SimpleParams); + return new SimpleRequest + { + Payload = CreateZerosPayload(payloadConfig.SimpleParams.ReqSize), + ResponseSize = payloadConfig.SimpleParams.RespSize + }; + } + + private byte[] CreateByteBufferRequest() + { + return new byte[payloadConfig.BytebufParams.ReqSize]; + } + private static Payload CreateZerosPayload(int size) { return new Payload { Body = ByteString.CopyFrom(new byte[size]) }; diff --git a/src/csharp/Grpc.IntegrationTesting/GenericService.cs b/src/csharp/Grpc.IntegrationTesting/GenericService.cs new file mode 100644 index 00000000000..c6128264ac5 --- /dev/null +++ b/src/csharp/Grpc.IntegrationTesting/GenericService.cs @@ -0,0 +1,71 @@ +#region Copyright notice and license + +// Copyright 2016, Google Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +#endregion + +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.IO; +using System.Linq; +using System.Text.RegularExpressions; +using System.Threading.Tasks; +using Google.Protobuf; +using Grpc.Core; +using Grpc.Core.Utils; +using NUnit.Framework; +using Grpc.Testing; + +namespace Grpc.IntegrationTesting +{ + /// + /// Utility methods for defining and calling a service that doesn't use protobufs + /// for serialization/deserialization. + /// + public static class GenericService + { + readonly static Marshaller ByteArrayMarshaller = new Marshaller((b) => b, (b) => b); + + public readonly static Method StreamingCallMethod = new Method( + MethodType.DuplexStreaming, + "grpc.testing.BenchmarkService", + "StreamingCall", + ByteArrayMarshaller, + ByteArrayMarshaller + ); + + public static ServerServiceDefinition BindHandler(DuplexStreamingServerMethod handler) + { + return ServerServiceDefinition.CreateBuilder(StreamingCallMethod.ServiceName) + .AddMethod(StreamingCallMethod, handler).Build(); + } + } +} diff --git a/src/csharp/Grpc.IntegrationTesting/Grpc.IntegrationTesting.csproj b/src/csharp/Grpc.IntegrationTesting/Grpc.IntegrationTesting.csproj index 372991374ee..4c049944eaf 100644 --- a/src/csharp/Grpc.IntegrationTesting/Grpc.IntegrationTesting.csproj +++ b/src/csharp/Grpc.IntegrationTesting/Grpc.IntegrationTesting.csproj @@ -120,6 +120,7 @@ + diff --git a/src/csharp/Grpc.IntegrationTesting/RunnerClientServerTest.cs b/src/csharp/Grpc.IntegrationTesting/RunnerClientServerTest.cs index 06d5ee93d88..a8cf75bd819 100644 --- a/src/csharp/Grpc.IntegrationTesting/RunnerClientServerTest.cs +++ b/src/csharp/Grpc.IntegrationTesting/RunnerClientServerTest.cs @@ -55,14 +55,7 @@ namespace Grpc.IntegrationTesting { var serverConfig = new ServerConfig { - ServerType = ServerType.ASYNC_SERVER, - PayloadConfig = new PayloadConfig - { - SimpleParams = new SimpleProtoParams - { - RespSize = 100 - } - } + ServerType = ServerType.ASYNC_SERVER }; serverRunner = ServerRunners.CreateStarted(serverConfig); } @@ -88,7 +81,8 @@ namespace Grpc.IntegrationTesting { SimpleParams = new SimpleProtoParams { - ReqSize = 100 + ReqSize = 100, + RespSize = 100 } }, HistogramParams = new HistogramParams diff --git a/src/csharp/Grpc.IntegrationTesting/ServerRunners.cs b/src/csharp/Grpc.IntegrationTesting/ServerRunners.cs index 4a73645e6ca..c326378cfac 100644 --- a/src/csharp/Grpc.IntegrationTesting/ServerRunners.cs +++ b/src/csharp/Grpc.IntegrationTesting/ServerRunners.cs @@ -41,6 +41,7 @@ using System.Threading; using System.Threading.Tasks; using Google.Protobuf; using Grpc.Core; +using Grpc.Core.Logging; using Grpc.Core.Utils; using NUnit.Framework; using Grpc.Testing; @@ -50,27 +51,78 @@ namespace Grpc.IntegrationTesting /// /// Helper methods to start server runners for performance testing. /// - public static class ServerRunners + public class ServerRunners { + static readonly ILogger Logger = GrpcEnvironment.Logger.ForType(); + /// /// Creates a started server runner. /// public static IServerRunner CreateStarted(ServerConfig config) { - GrpcPreconditions.CheckArgument(config.ServerType == ServerType.ASYNC_SERVER); + Logger.Debug("ServerConfig: {0}", config); var credentials = config.SecurityParams != null ? TestCredentials.CreateSslServerCredentials() : ServerCredentials.Insecure; - // TODO: qps_driver needs to setup payload properly... - int responseSize = config.PayloadConfig != null ? config.PayloadConfig.SimpleParams.RespSize : 0; + if (config.AsyncServerThreads != 0) + { + Logger.Warning("ServerConfig.AsyncServerThreads is not supported for C#. Ignoring the value"); + } + if (config.CoreLimit != 0) + { + Logger.Warning("ServerConfig.CoreLimit is not supported for C#. Ignoring the value"); + } + if (config.CoreList.Count > 0) + { + Logger.Warning("ServerConfig.CoreList is not supported for C#. Ignoring the value"); + } + + ServerServiceDefinition service = null; + if (config.ServerType == ServerType.ASYNC_SERVER) + { + GrpcPreconditions.CheckArgument(config.PayloadConfig == null, + "ServerConfig.PayloadConfig shouldn't be set for BenchmarkService based server."); + service = BenchmarkService.BindService(new BenchmarkServiceImpl()); + } + else if (config.ServerType == ServerType.ASYNC_GENERIC_SERVER) + { + var genericService = new GenericServiceImpl(config.PayloadConfig.BytebufParams.RespSize); + service = GenericService.BindHandler(genericService.StreamingCall); + } + else + { + throw new ArgumentException("Unsupported ServerType"); + } + var server = new Server { - Services = { BenchmarkService.BindService(new BenchmarkServiceImpl(responseSize)) }, + Services = { service }, Ports = { new ServerPort("[::]", config.Port, credentials) } }; server.Start(); return new ServerRunnerImpl(server); } + + private class GenericServiceImpl + { + readonly byte[] response; + + public GenericServiceImpl(int responseSize) + { + this.response = new byte[responseSize]; + } + + /// + /// Generic streaming call handler. + /// + public async Task StreamingCall(IAsyncStreamReader requestStream, IServerStreamWriter responseStream, ServerCallContext context) + { + await requestStream.ForEachAsync(async request => + { + await responseStream.WriteAsync(response); + }); + } + } } /// @@ -119,6 +171,5 @@ namespace Grpc.IntegrationTesting { return server.ShutdownAsync(); } - } - + } } diff --git a/src/csharp/README.md b/src/csharp/README.md index b4fa945ac98..201c5ab0b56 100644 --- a/src/csharp/README.md +++ b/src/csharp/README.md @@ -55,16 +55,11 @@ If you are a user of gRPC C#, go to Usage section above. **Windows** -- The grpc_csharp_ext native library needs to be built so you can build the gRPC C# solution. You can - either build the native solution in `vsprojects/grpc_csharp_ext.sln` from Visual Studio manually, or you can use - a convenience batch script that builds everything for you. +- The grpc_csharp_ext native library needs to be built so you can build the gRPC C# solution. Open the + solution `vsprojects/grpc_csharp_ext.sln` in Visual Studio and build it. - ``` - > REM From src/csharp directory - > buildall.bat - ``` - -- Open Grpc.sln using Visual Studio. +- Open `src\csharp\Grpc.sln` (path is relative to gRPC repository root) + using Visual Studio **Linux** @@ -79,7 +74,7 @@ If you are a user of gRPC C#, go to Usage section above. **Mac OS X** - The grpc_csharp_ext native library needs to be built so you can build the gRPC C# solution. - + ```sh # from the gRPC repository root $ tools/run_tests/run_tests.py -c dbg -l csharp --build_only diff --git a/src/csharp/ext/grpc_csharp_ext.c b/src/csharp/ext/grpc_csharp_ext.c index 1df74a09937..642dc9ef426 100644 --- a/src/csharp/ext/grpc_csharp_ext.c +++ b/src/csharp/ext/grpc_csharp_ext.c @@ -31,7 +31,7 @@ * */ -#include "src/core/support/string.h" +#include "src/core/lib/support/string.h" #include #include diff --git a/src/node/README.md b/src/node/README.md index 3501b54a665..15d4c6d02f7 100644 --- a/src/node/README.md +++ b/src/node/README.md @@ -7,6 +7,8 @@ Beta ## PREREQUISITES - `node`: This requires `node` to be installed, version `0.12` or above. If you instead have the `nodejs` executable on Debian, you should install the [`nodejs-legacy`](https://packages.debian.org/sid/nodejs-legacy) package. +- **Note:** If you installed `node` via a package manager and the version is still less than `0.12`, try directly installing it from [nodejs.org](https://nodejs.org). + ## INSTALLATION Install the gRPC NPM package @@ -17,7 +19,21 @@ npm install grpc ## BUILD FROM SOURCE 1. Clone [the grpc Git Repository](https://github.com/grpc/grpc). - 3. Run `npm install`. + 2. Run `npm install` from the repository root. + + - **Note:** On Windows, this might fail due to [nodejs issue #4932](https://github.com/nodejs/node/issues/4932) in which case, you will see something like the following in `npm install`'s output (towards the very beginning): + + ``` + .. + Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch. + WINDOWS_BUILD_WARNING + "..\IMPORTANT: Due to https:\github.com\nodejs\node\issues\4932, to build this library on Windows, you must first remove C:\Users\jenkins\.node-gyp\4.4.0\include\node\openssl" + ... + .. + ``` + + To fix this, you will have to delete the folder `C:\Users\\.node-gyp\\include\node\openssl` and retry `npm install` + ## TESTING To run the test suite, simply run `npm test` in the install location. diff --git a/src/node/ext/call_credentials.cc b/src/node/ext/call_credentials.cc index 98696db2325..bd2d146bbc7 100644 --- a/src/node/ext/call_credentials.cc +++ b/src/node/ext/call_credentials.cc @@ -35,6 +35,8 @@ #include #include +#include + #include "grpc/grpc.h" #include "grpc/grpc_security.h" #include "grpc/support/log.h" @@ -161,6 +163,15 @@ NAN_METHOD(CallCredentials::CreateFromPlugin) { grpc_metadata_credentials_plugin plugin; plugin_state *state = new plugin_state; state->callback = new Nan::Callback(info[0].As()); + state->pending_callbacks = new std::list(); + uv_mutex_init(&state->plugin_mutex); + uv_async_init(uv_default_loop(), + &state->plugin_async, + SendPluginCallback); + uv_unref((uv_handle_t*)&state->plugin_async); + + state->plugin_async.data = state; + plugin.get_metadata = plugin_get_metadata; plugin.destroy = plugin_destroy_state; plugin.state = reinterpret_cast(state); @@ -208,48 +219,60 @@ NAN_METHOD(PluginCallback) { NAUV_WORK_CB(SendPluginCallback) { Nan::HandleScope scope; - plugin_callback_data *data = reinterpret_cast( - async->data); - // Attach cb and user_data to plugin_callback so that it can access them later - v8::Local plugin_callback = Nan::GetFunction( - Nan::New(PluginCallback)).ToLocalChecked(); - Nan::Set(plugin_callback, Nan::New("cb").ToLocalChecked(), - Nan::New(reinterpret_cast(data->cb))); - Nan::Set(plugin_callback, Nan::New("user_data").ToLocalChecked(), - Nan::New(data->user_data)); - const int argc = 2; - v8::Local argv[argc] = { - Nan::New(data->service_url).ToLocalChecked(), - plugin_callback - }; - Nan::Callback *callback = data->state->callback; - callback->Call(argc, argv); - delete data; - uv_unref((uv_handle_t *)async); - uv_close((uv_handle_t *)async, (uv_close_cb)free); + plugin_state *state = reinterpret_cast(async->data); + std::list callbacks; + uv_mutex_lock(&state->plugin_mutex); + callbacks.splice(callbacks.begin(), *state->pending_callbacks); + uv_mutex_unlock(&state->plugin_mutex); + while (!callbacks.empty()) { + plugin_callback_data *data = callbacks.front(); + callbacks.pop_front(); + // Attach cb and user_data to plugin_callback so that it can access them later + v8::Local plugin_callback = Nan::GetFunction( + Nan::New(PluginCallback)).ToLocalChecked(); + Nan::Set(plugin_callback, Nan::New("cb").ToLocalChecked(), + Nan::New(reinterpret_cast(data->cb))); + Nan::Set(plugin_callback, Nan::New("user_data").ToLocalChecked(), + Nan::New(data->user_data)); + const int argc = 2; + v8::Local argv[argc] = { + Nan::New(data->service_url).ToLocalChecked(), + plugin_callback + }; + Nan::Callback *callback = state->callback; + callback->Call(argc, argv); + delete data; + } } void plugin_get_metadata(void *state, grpc_auth_metadata_context context, grpc_credentials_plugin_metadata_cb cb, void *user_data) { - uv_async_t *async = static_cast(malloc(sizeof(uv_async_t))); - uv_async_init(uv_default_loop(), - async, - SendPluginCallback); + plugin_state *p_state = reinterpret_cast(state); plugin_callback_data *data = new plugin_callback_data; - data->state = reinterpret_cast(state); data->service_url = context.service_url; data->cb = cb; data->user_data = user_data; - async->data = data; - /* libuv says that it will coalesce calls to uv_async_send. If there is ever a - * problem with a callback not getting called, that is probably the reason */ - uv_async_send(async); + + uv_mutex_lock(&p_state->plugin_mutex); + p_state->pending_callbacks->push_back(data); + uv_mutex_unlock(&p_state->plugin_mutex); + + uv_async_send(&p_state->plugin_async); +} + +void plugin_uv_close_cb(uv_handle_t *handle) { + uv_async_t *async = reinterpret_cast(handle); + plugin_state *state = reinterpret_cast(async->data); + uv_mutex_destroy(&state->plugin_mutex); + delete state->pending_callbacks; + delete state->callback; + delete state; } void plugin_destroy_state(void *ptr) { plugin_state *state = reinterpret_cast(ptr); - delete state->callback; + uv_close((uv_handle_t*)&state->plugin_async, plugin_uv_close_cb); } } // namespace node diff --git a/src/node/ext/call_credentials.h b/src/node/ext/call_credentials.h index a9bfe30f940..1f35595f3d3 100644 --- a/src/node/ext/call_credentials.h +++ b/src/node/ext/call_credentials.h @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -34,8 +34,11 @@ #ifndef GRPC_NODE_CALL_CREDENTIALS_H_ #define GRPC_NODE_CALL_CREDENTIALS_H_ +#include + #include #include +#include #include "grpc/grpc_security.h" namespace grpc { @@ -73,17 +76,20 @@ class CallCredentials : public Nan::ObjectWrap { /* Auth metadata plugin functionality */ -typedef struct plugin_state { - Nan::Callback *callback; -} plugin_state; - typedef struct plugin_callback_data { - plugin_state *state; const char *service_url; grpc_credentials_plugin_metadata_cb cb; void *user_data; } plugin_callback_data; +typedef struct plugin_state { + Nan::Callback *callback; + std::list *pending_callbacks; + uv_mutex_t plugin_mutex; + // async.data == this + uv_async_t plugin_async; +} plugin_state; + void plugin_get_metadata(void *state, grpc_auth_metadata_context context, grpc_credentials_plugin_metadata_cb cb, void *user_data); diff --git a/src/node/index.js b/src/node/index.js index 1c197729d77..6567d56260c 100644 --- a/src/node/index.js +++ b/src/node/index.js @@ -87,6 +87,10 @@ var loadObject = exports.loadObject; * Buffers. Defaults to false * - longsAsStrings: deserialize long values as strings instead of objects. * Defaults to true + * - deprecatedArgumentOrder: Use the beta method argument order for client + * methods, with optional arguments after the callback. Defaults to false. + * This option is only a temporary stopgap measure to smooth an API breakage. + * It is deprecated, and new code should not use it. * @param {string|{root: string, file: string}} filename The file to load * @param {string=} format The file format to expect. Must be either 'proto' or * 'json'. Defaults to 'proto' diff --git a/src/node/interop/interop_client.js b/src/node/interop/interop_client.js index 5602011a8e0..ac0eddcf453 100644 --- a/src/node/interop/interop_client.js +++ b/src/node/interop/interop_client.js @@ -286,7 +286,7 @@ function cancelAfterFirstResponse(client, done) { function timeoutOnSleepingServer(client, done) { var deadline = new Date(); deadline.setMilliseconds(deadline.getMilliseconds() + 1); - var call = client.fullDuplexCall(null, {deadline: deadline}); + var call = client.fullDuplexCall({deadline: deadline}); call.write({ payload: {body: zeroBuffer(27182)} }); @@ -316,10 +316,10 @@ function customMetadata(client, done) { body: zeroBuffer(271828) } }; - var unary = client.unaryCall(arg, function(err, resp) { + var unary = client.unaryCall(arg, metadata, function(err, resp) { assert.ifError(err); done(); - }, metadata); + }); unary.on('metadata', function(metadata) { assert.deepEqual(metadata.get(ECHO_INITIAL_KEY), ['test_initial_metadata_value']); @@ -455,14 +455,14 @@ function perRpcAuthTest(client, done, extra) { credential = credential.createScoped(scope); } var creds = grpc.credentials.createFromGoogleCredential(credential); - client.unaryCall(arg, function(err, resp) { + client.unaryCall(arg, {credentials: creds}, function(err, resp) { assert.ifError(err); assert.strictEqual(resp.username, SERVICE_ACCOUNT_EMAIL); assert(extra.oauth_scope.indexOf(resp.oauth_scope) > -1); if (done) { done(); } - }, null, {credentials: creds}); + }); }); } diff --git a/src/node/performance/benchmark_client.js b/src/node/performance/benchmark_client.js index 620aecde97b..80bec0b73e0 100644 --- a/src/node/performance/benchmark_client.js +++ b/src/node/performance/benchmark_client.js @@ -45,6 +45,9 @@ var EventEmitter = require('events'); var _ = require('lodash'); var PoissonProcess = require('poisson-process'); var Histogram = require('./histogram'); + +var genericService = require('./generic_service'); + var grpc = require('../../../'); var serviceProto = grpc.load({ root: __dirname + '/../../..', @@ -104,10 +107,14 @@ function BenchmarkClient(server_targets, channels, histogram_params, } this.clients = []; + var GenericClient = grpc.makeGenericClientConstructor(genericService); + this.genericClients = []; for (var i = 0; i < channels; i++) { this.clients[i] = new serviceProto.BenchmarkService( server_targets[i % server_targets.length], creds, options); + this.genericClients[i] = new GenericClient( + server_targets[i % server_targets.length], creds, options); } this.histogram = new Histogram(histogram_params.resolution, @@ -130,9 +137,11 @@ util.inherits(BenchmarkClient, EventEmitter); * 'STREAMING' * @param {number} req_size The size of the payload to send with each request * @param {number} resp_size The size of payload to request be sent in responses + * @param {boolean} generic Indicates that the generic (non-proto) clients + * should be used */ BenchmarkClient.prototype.startClosedLoop = function( - outstanding_rpcs_per_channel, rpc_type, req_size, resp_size) { + outstanding_rpcs_per_channel, rpc_type, req_size, resp_size, generic) { var self = this; self.running = true; @@ -141,12 +150,20 @@ BenchmarkClient.prototype.startClosedLoop = function( var makeCall; - var argument = { - response_size: resp_size, - payload: { - body: zeroBuffer(req_size) - } - }; + var argument; + var client_list; + if (generic) { + argument = zeroBuffer(req_size); + client_list = self.genericClients; + } else { + argument = { + response_size: resp_size, + payload: { + body: zeroBuffer(req_size) + } + }; + client_list = self.clients; + } if (rpc_type == 'UNARY') { makeCall = function(client) { @@ -195,7 +212,7 @@ BenchmarkClient.prototype.startClosedLoop = function( }; } - _.each(self.clients, function(client) { + _.each(client_list, function(client) { _.times(outstanding_rpcs_per_channel, function() { makeCall(client); }); @@ -213,9 +230,12 @@ BenchmarkClient.prototype.startClosedLoop = function( * @param {number} req_size The size of the payload to send with each request * @param {number} resp_size The size of payload to request be sent in responses * @param {number} offered_load The load parameter for the Poisson process + * @param {boolean} generic Indicates that the generic (non-proto) clients + * should be used */ BenchmarkClient.prototype.startPoisson = function( - outstanding_rpcs_per_channel, rpc_type, req_size, resp_size, offered_load) { + outstanding_rpcs_per_channel, rpc_type, req_size, resp_size, offered_load, + generic) { var self = this; self.running = true; @@ -224,12 +244,20 @@ BenchmarkClient.prototype.startPoisson = function( var makeCall; - var argument = { - response_size: resp_size, - payload: { - body: zeroBuffer(req_size) - } - }; + var argument; + var client_list; + if (generic) { + argument = zeroBuffer(req_size); + client_list = self.genericClients; + } else { + argument = { + response_size: resp_size, + payload: { + body: zeroBuffer(req_size) + } + }; + client_list = self.clients; + } if (rpc_type == 'UNARY') { makeCall = function(client, poisson) { @@ -282,7 +310,7 @@ BenchmarkClient.prototype.startPoisson = function( var averageIntervalMs = (1 / offered_load) * 1000; - _.each(self.clients, function(client) { + _.each(client_list, function(client) { _.times(outstanding_rpcs_per_channel, function() { var p = PoissonProcess.create(averageIntervalMs, function() { makeCall(client, p); diff --git a/src/node/performance/benchmark_server.js b/src/node/performance/benchmark_server.js index e48acd48f5d..b1b0bd12abb 100644 --- a/src/node/performance/benchmark_server.js +++ b/src/node/performance/benchmark_server.js @@ -41,6 +41,8 @@ var fs = require('fs'); var path = require('path'); +var genericService = require('./generic_service'); + var grpc = require('../../../'); var serviceProto = grpc.load({ root: __dirname + '/../../..', @@ -84,14 +86,28 @@ function streamingCall(call) { }); } +function makeStreamingGenericCall(response_size) { + var response = zeroBuffer(response_size); + return function streamingGenericCall(call) { + call.on('data', function(value) { + call.write(response); + }); + call.on('end', function() { + call.end(); + }); + }; +} + /** * BenchmarkServer class. Constructed based on parameters from the driver and * stores statistics. * @param {string} host The host to serve on * @param {number} port The port to listen to - * @param {tls} Indicates whether TLS should be used + * @param {boolean} tls Indicates whether TLS should be used + * @param {boolean} generic Indicates whether to use the generic service + * @param {number=} response_size The response size for the generic service */ -function BenchmarkServer(host, port, tls) { +function BenchmarkServer(host, port, tls, generic, response_size) { var server_creds; var host_override; if (tls) { @@ -109,10 +125,16 @@ function BenchmarkServer(host, port, tls) { var server = new grpc.Server(); this.port = server.bind(host + ':' + port, server_creds); - server.addProtoService(serviceProto.BenchmarkService.service, { - unaryCall: unaryCall, - streamingCall: streamingCall - }); + if (generic) { + server.addService(genericService, { + streamingCall: makeStreamingGenericCall(response_size) + }); + } else { + server.addProtoService(serviceProto.BenchmarkService.service, { + unaryCall: unaryCall, + streamingCall: streamingCall + }); + } this.server = server; } diff --git a/src/node/performance/generic_service.js b/src/node/performance/generic_service.js new file mode 100644 index 00000000000..ce09cc4336c --- /dev/null +++ b/src/node/performance/generic_service.js @@ -0,0 +1,46 @@ +/* + * + * Copyright 2016, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +var _ = require('lodash'); + +module.exports = { + 'streamingCall' : { + path: '/grpc.testing/BenchmarkService', + requestStream: true, + responseStream: true, + requestSerialize: _.identity, + requestDeserialize: _.identity, + responseSerialize: _.identity, + responseDeserialize: _.identity + } +}; diff --git a/src/node/performance/worker_service_impl.js b/src/node/performance/worker_service_impl.js index 14392498784..2c4651370f2 100644 --- a/src/node/performance/worker_service_impl.js +++ b/src/node/performance/worker_service_impl.js @@ -56,18 +56,31 @@ exports.runClient = function runClient(call) { client.on('error', function(error) { call.emit('error', error); }); + var req_size, resp_size, generic; + switch (setup.payload_config.payload) { + case 'bytebuf_params': + req_size = setup.payload_config.bytebuf_params.req_size; + resp_size = setup.payload_config.bytebuf_params.resp_size; + generic = true; + break; + case 'simple_params': + req_size = setup.payload_config.simple_params.req_size; + resp_size = setup.payload_config.simple_params.resp_size; + generic = false; + break; + default: + call.emit('error', new Error('Unsupported PayloadConfig type' + + setup.payload_config.payload)); + } switch (setup.load_params.load) { case 'closed_loop': client.startClosedLoop(setup.outstanding_rpcs_per_channel, - setup.rpc_type, - setup.payload_config.simple_params.req_size, - setup.payload_config.simple_params.resp_size); + setup.rpc_type, req_size, resp_size, generic); break; case 'poisson': client.startPoisson(setup.outstanding_rpcs_per_channel, - setup.rpc_type, setup.payload_config.req_size, - setup.payload_config.resp_size, - setup.load_params.poisson.offered_load); + setup.rpc_type, req_size, resp_size, + setup.load_params.poisson.offered_load, generic); break; default: call.emit('error', new Error('Unsupported LoadParams type' + diff --git a/src/node/src/client.js b/src/node/src/client.js index 2459e283214..82142379da8 100644 --- a/src/node/src/client.js +++ b/src/node/src/client.js @@ -50,6 +50,7 @@ 'use strict'; var _ = require('lodash'); +var arguejs = require('arguejs'); var grpc = require('./grpc_extension'); @@ -353,21 +354,23 @@ function makeUnaryRequestFunction(method, serialize, deserialize) { * @this {Client} Client object. Must have a channel member. * @param {*} argument The argument to the call. Should be serializable with * serialize - * @param {function(?Error, value=)} callback The callback to for when the - * response is received * @param {Metadata=} metadata Metadata to add to the call * @param {Object=} options Options map + * @param {function(?Error, value=)} callback The callback to for when the + * response is received * @return {EventEmitter} An event emitter for stream related events */ - function makeUnaryRequest(argument, callback, metadata, options) { + function makeUnaryRequest(argument, metadata, options, callback) { /* jshint validthis: true */ + /* While the arguments are listed in the function signature, those variables + * are not used directly. Instead, ArgueJS processes the arguments + * object. This allows for simple handling of optional arguments in the + * middle of the argument list, and also provides type checking. */ + var args = arguejs({argument: null, metadata: [Metadata, new Metadata()], + options: [Object], callback: Function}, arguments); var emitter = new EventEmitter(); - var call = getCall(this.$channel, method, options); - if (metadata === null || metadata === undefined) { - metadata = new Metadata(); - } else { - metadata = metadata.clone(); - } + var call = getCall(this.$channel, method, args.options); + metadata = args.metadata.clone(); emitter.cancel = function cancel() { call.cancel(); }; @@ -375,9 +378,9 @@ function makeUnaryRequestFunction(method, serialize, deserialize) { return call.getPeer(); }; var client_batch = {}; - var message = serialize(argument); - if (options) { - message.grpcWriteFlags = options.flags; + var message = serialize(args.argument); + if (args.options) { + message.grpcWriteFlags = args.options.flags; } client_batch[grpc.opType.SEND_INITIAL_METADATA] = metadata._getCoreRepresentation(); @@ -395,7 +398,7 @@ function makeUnaryRequestFunction(method, serialize, deserialize) { if (status.code === grpc.status.OK) { if (err) { // Got a batch error, but OK status. Something went wrong - callback(err); + args.callback(err); return; } else { try { @@ -414,9 +417,9 @@ function makeUnaryRequestFunction(method, serialize, deserialize) { error = new Error(status.details); error.code = status.code; error.metadata = status.metadata; - callback(error); + args.callback(error); } else { - callback(null, deserialized); + args.callback(null, deserialized); } emitter.emit('status', status); emitter.emit('metadata', Metadata._fromCoreRepresentation( @@ -440,21 +443,23 @@ function makeClientStreamRequestFunction(method, serialize, deserialize) { * Make a client stream request with this method on the given channel with the * given callback, etc. * @this {Client} Client object. Must have a channel member. - * @param {function(?Error, value=)} callback The callback to for when the - * response is received * @param {Metadata=} metadata Array of metadata key/value pairs to add to the * call * @param {Object=} options Options map + * @param {function(?Error, value=)} callback The callback to for when the + * response is received * @return {EventEmitter} An event emitter for stream related events */ - function makeClientStreamRequest(callback, metadata, options) { + function makeClientStreamRequest(metadata, options, callback) { /* jshint validthis: true */ - var call = getCall(this.$channel, method, options); - if (metadata === null || metadata === undefined) { - metadata = new Metadata(); - } else { - metadata = metadata.clone(); - } + /* While the arguments are listed in the function signature, those variables + * are not used directly. Instead, ArgueJS processes the arguments + * object. This allows for simple handling of optional arguments in the + * middle of the argument list, and also provides type checking. */ + var args = arguejs({metadata: [Metadata, new Metadata()], + options: [Object], callback: Function}, arguments); + var call = getCall(this.$channel, method, args.options); + metadata = args.metadata.clone(); var stream = new ClientWritableStream(call, serialize); var metadata_batch = {}; metadata_batch[grpc.opType.SEND_INITIAL_METADATA] = @@ -481,7 +486,7 @@ function makeClientStreamRequestFunction(method, serialize, deserialize) { if (status.code === grpc.status.OK) { if (err) { // Got a batch error, but OK status. Something went wrong - callback(err); + args.callback(err); return; } else { try { @@ -500,9 +505,9 @@ function makeClientStreamRequestFunction(method, serialize, deserialize) { error = new Error(response.status.details); error.code = status.code; error.metadata = status.metadata; - callback(error); + args.callback(error); } else { - callback(null, deserialized); + args.callback(null, deserialized); } stream.emit('status', status); }); @@ -533,17 +538,18 @@ function makeServerStreamRequestFunction(method, serialize, deserialize) { */ function makeServerStreamRequest(argument, metadata, options) { /* jshint validthis: true */ - var call = getCall(this.$channel, method, options); - if (metadata === null || metadata === undefined) { - metadata = new Metadata(); - } else { - metadata = metadata.clone(); - } + /* While the arguments are listed in the function signature, those variables + * are not used directly. Instead, ArgueJS processes the arguments + * object. */ + var args = arguejs({argument: null, metadata: [Metadata, new Metadata()], + options: [Object]}, arguments); + var call = getCall(this.$channel, method, args.options); + metadata = args.metadata.clone(); var stream = new ClientReadableStream(call, deserialize); var start_batch = {}; - var message = serialize(argument); - if (options) { - message.grpcWriteFlags = options.flags; + var message = serialize(args.argument); + if (args.options) { + message.grpcWriteFlags = args.options.flags; } start_batch[grpc.opType.SEND_INITIAL_METADATA] = metadata._getCoreRepresentation(); @@ -595,12 +601,13 @@ function makeBidiStreamRequestFunction(method, serialize, deserialize) { */ function makeBidiStreamRequest(metadata, options) { /* jshint validthis: true */ - var call = getCall(this.$channel, method, options); - if (metadata === null || metadata === undefined) { - metadata = new Metadata(); - } else { - metadata = metadata.clone(); - } + /* While the arguments are listed in the function signature, those variables + * are not used directly. Instead, ArgueJS processes the arguments + * object. */ + var args = arguejs({metadata: [Metadata, new Metadata()], + options: [Object]}, arguments); + var call = getCall(this.$channel, method, args.options); + metadata = args.metadata.clone(); var stream = new ClientDuplexStream(call, serialize, deserialize); var start_batch = {}; start_batch[grpc.opType.SEND_INITIAL_METADATA] = @@ -643,6 +650,40 @@ var requester_makers = { bidi: makeBidiStreamRequestFunction }; +function getDefaultValues(metadata, options) { + var res = {}; + res.metadata = metadata || new Metadata(); + res.options = options || {}; + return res; +} + +/** + * Map with wrappers for each type of requester function to make it use the old + * argument order with optional arguments after the callback. + */ +var deprecated_request_wrap = { + unary: function(makeUnaryRequest) { + return function makeWrappedUnaryRequest(argument, callback, + metadata, options) { + /* jshint validthis: true */ + var opt_args = getDefaultValues(metadata, metadata); + return makeUnaryRequest.call(this, argument, opt_args.metadata, + opt_args.options, callback); + }; + }, + client_stream: function(makeServerStreamRequest) { + return function makeWrappedClientStreamRequest(callback, metadata, + options) { + /* jshint validthis: true */ + var opt_args = getDefaultValues(metadata, options); + return makeServerStreamRequest.call(this, opt_args.metadata, + opt_args.options, callback); + }; + }, + server_stream: _.identity, + bidi: _.identity +}; + /** * Creates a constructor for a client with the given methods. The methods object * maps method name to an object with the following keys: @@ -654,9 +695,19 @@ var requester_makers = { * responseDeserialize: function to deserialize response objects * @param {Object} methods An object mapping method names to method attributes * @param {string} serviceName The fully qualified name of the service + * @param {Object} class_options An options object. Currently only uses the key + * deprecatedArgumentOrder, a boolean that Indicates that the old argument + * order should be used for methods, with optional arguments at the end + * instead of the callback at the end. Defaults to false. This option is + * only a temporary stopgap measure to smooth an API breakage. + * It is deprecated, and new code should not use it. * @return {function(string, Object)} New client constructor */ -exports.makeClientConstructor = function(methods, serviceName) { +exports.makeClientConstructor = function(methods, serviceName, + class_options) { + if (!class_options) { + class_options = {}; + } /** * Create a client with the given methods * @constructor @@ -703,8 +754,13 @@ exports.makeClientConstructor = function(methods, serviceName) { } var serialize = attrs.requestSerialize; var deserialize = attrs.responseDeserialize; - Client.prototype[name] = requester_makers[method_type]( + var method_func = requester_makers[method_type]( attrs.path, serialize, deserialize); + if (class_options.deprecatedArgumentOrder) { + Client.prototype[name] = deprecated_request_wrap(method_func); + } else { + Client.prototype[name] = method_func; + } // Associate all provided attributes with the method _.assign(Client.prototype[name], attrs); }); @@ -761,8 +817,13 @@ exports.waitForClientReady = function(client, deadline, callback) { exports.makeProtobufClientConstructor = function(service, options) { var method_attrs = common.getProtobufServiceAttrs(service, service.name, options); + var deprecatedArgumentOrder = false; + if (options) { + deprecatedArgumentOrder = options.deprecatedArgumentOrder; + } var Client = exports.makeClientConstructor( - method_attrs, common.fullyQualifiedName(service)); + method_attrs, common.fullyQualifiedName(service), + deprecatedArgumentOrder); Client.service = service; Client.service.grpc_options = options; return Client; diff --git a/src/node/src/credentials.js b/src/node/src/credentials.js index 1d73723cc06..97c4bd73ac4 100644 --- a/src/node/src/credentials.js +++ b/src/node/src/credentials.js @@ -118,7 +118,6 @@ exports.createFromMetadataGenerator = function(metadata_generator) { exports.createFromGoogleCredential = function(google_credential) { return exports.createFromMetadataGenerator(function(auth_context, callback) { var service_url = auth_context.service_url; - console.log('Service URL:', service_url); google_credential.getRequestMetadata(service_url, function(err, header) { if (err) { console.log('Auth error:', err); @@ -127,7 +126,6 @@ exports.createFromGoogleCredential = function(google_credential) { } var metadata = new Metadata(); metadata.add('authorization', header.Authorization); - console.log(header.Authorization); callback(null, metadata); }); }); diff --git a/src/node/src/server.js b/src/node/src/server.js index 0cf7ba34246..dd0bc12bc93 100644 --- a/src/node/src/server.js +++ b/src/node/src/server.js @@ -339,7 +339,7 @@ function _read(size) { try { deserialized = self.deserialize(data); } catch (e) { - e.code = grpc.status.INVALID_ARGUMENT; + e.code = grpc.status.INTERNAL; self.emit('error', e); return; } @@ -475,7 +475,7 @@ function handleUnary(call, handler, metadata) { try { emitter.request = handler.deserialize(result.read); } catch (e) { - e.code = grpc.status.INVALID_ARGUMENT; + e.code = grpc.status.INTERNAL; handleError(call, e); return; } @@ -516,7 +516,7 @@ function handleServerStreaming(call, handler, metadata) { try { stream.request = handler.deserialize(result.read); } catch (e) { - e.code = grpc.status.INVALID_ARGUMENT; + e.code = grpc.status.INTERNAL; stream.emit('error', e); return; } diff --git a/src/node/test/credentials_test.js b/src/node/test/credentials_test.js index 294600c85a9..73eadfab2c7 100644 --- a/src/node/test/credentials_test.js +++ b/src/node/test/credentials_test.js @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -398,18 +398,20 @@ describe('client credentials', function() { metadataUpdater); }); it('Should update metadata on a unary call', function(done) { - var call = client.unary({}, function(err, data) { - assert.ifError(err); - }, null, {credentials: updater_creds}); + var call = client.unary({}, {credentials: updater_creds}, + function(err, data) { + assert.ifError(err); + }); call.on('metadata', function(metadata) { assert.deepEqual(metadata.get('plugin_key'), ['plugin_value']); done(); }); }); it('should update metadata on a client streaming call', function(done) { - var call = client.clientStream(function(err, data) { - assert.ifError(err); - }, null, {credentials: updater_creds}); + var call = client.clientStream({credentials: updater_creds}, + function(err, data) { + assert.ifError(err); + }); call.on('metadata', function(metadata) { assert.deepEqual(metadata.get('plugin_key'), ['plugin_value']); done(); @@ -417,7 +419,7 @@ describe('client credentials', function() { call.end(); }); it('should update metadata on a server streaming call', function(done) { - var call = client.serverStream({}, null, {credentials: updater_creds}); + var call = client.serverStream({}, {credentials: updater_creds}); call.on('data', function() {}); call.on('metadata', function(metadata) { assert.deepEqual(metadata.get('plugin_key'), ['plugin_value']); @@ -425,7 +427,7 @@ describe('client credentials', function() { }); }); it('should update metadata on a bidi streaming call', function(done) { - var call = client.bidiStream(null, {credentials: updater_creds}); + var call = client.bidiStream({credentials: updater_creds}); call.on('data', function() {}); call.on('metadata', function(metadata) { assert.deepEqual(metadata.get('plugin_key'), ['plugin_value']); @@ -443,9 +445,10 @@ describe('client credentials', function() { altMetadataUpdater); var combined_updater = grpc.credentials.combineCallCredentials( updater_creds, alt_updater_creds); - var call = client.unary({}, function(err, data) { - assert.ifError(err); - }, null, {credentials: combined_updater}); + var call = client.unary({}, {credentials: combined_updater}, + function(err, data) { + assert.ifError(err); + }); call.on('metadata', function(metadata) { assert.deepEqual(metadata.get('plugin_key'), ['plugin_value']); assert.deepEqual(metadata.get('other_plugin_key'), diff --git a/src/node/test/surface_test.js b/src/node/test/surface_test.js index 8a232d6fc44..5a704ee1338 100644 --- a/src/node/test/surface_test.js +++ b/src/node/test/surface_test.js @@ -404,18 +404,18 @@ describe('Echo metadata', function() { server.forceShutdown(); }); it('with unary call', function(done) { - var call = client.unary({}, function(err, data) { + var call = client.unary({}, metadata, function(err, data) { assert.ifError(err); - }, metadata); + }); call.on('metadata', function(metadata) { assert.deepEqual(metadata.get('key'), ['value']); done(); }); }); it('with client stream call', function(done) { - var call = client.clientStream(function(err, data) { + var call = client.clientStream(metadata, function(err, data) { assert.ifError(err); - }, metadata); + }); call.on('metadata', function(metadata) { assert.deepEqual(metadata.get('key'), ['value']); done(); @@ -441,8 +441,8 @@ describe('Echo metadata', function() { }); it('shows the correct user-agent string', function(done) { var version = require('../../../package.json').version; - var call = client.unary({}, function(err, data) { assert.ifError(err); }, - metadata); + var call = client.unary({}, metadata, + function(err, data) { assert.ifError(err); }); call.on('metadata', function(metadata) { assert(_.startsWith(metadata.get('user-agent')[0], 'grpc-node/' + version)); @@ -452,8 +452,8 @@ describe('Echo metadata', function() { it('properly handles duplicate values', function(done) { var dup_metadata = metadata.clone(); dup_metadata.add('key', 'value2'); - var call = client.unary({}, function(err, data) {assert.ifError(err); }, - dup_metadata); + var call = client.unary({}, dup_metadata, + function(err, data) {assert.ifError(err); }); call.on('metadata', function(resp_metadata) { // Two arrays are equal iff their symmetric difference is empty assert.deepEqual(_.xor(dup_metadata.get('key'), resp_metadata.get('key')), @@ -709,14 +709,14 @@ describe('Other conditions', function() { it('should respond correctly to a unary call', function(done) { misbehavingClient.unary(badArg, function(err, data) { assert(err); - assert.strictEqual(err.code, grpc.status.INVALID_ARGUMENT); + assert.strictEqual(err.code, grpc.status.INTERNAL); done(); }); }); it('should respond correctly to a client stream', function(done) { var call = misbehavingClient.clientStream(function(err, data) { assert(err); - assert.strictEqual(err.code, grpc.status.INVALID_ARGUMENT); + assert.strictEqual(err.code, grpc.status.INTERNAL); done(); }); call.write(badArg); @@ -729,7 +729,7 @@ describe('Other conditions', function() { assert.fail(data, null, 'Unexpected data', '==='); }); call.on('error', function(err) { - assert.strictEqual(err.code, grpc.status.INVALID_ARGUMENT); + assert.strictEqual(err.code, grpc.status.INTERNAL); done(); }); }); @@ -739,7 +739,7 @@ describe('Other conditions', function() { assert.fail(data, null, 'Unexpected data', '==='); }); call.on('error', function(err) { - assert.strictEqual(err.code, grpc.status.INVALID_ARGUMENT); + assert.strictEqual(err.code, grpc.status.INTERNAL); done(); }); call.write(badArg); @@ -954,7 +954,7 @@ describe('Call propagation', function() { done = multiDone(done, 2); var call; proxy_impl.unary = function(parent, callback) { - client.unary(parent.request, function(err, value) { + client.unary(parent.request, {parent: parent}, function(err, value) { try { assert(err); assert.strictEqual(err.code, grpc.status.CANCELLED); @@ -962,7 +962,7 @@ describe('Call propagation', function() { callback(err, value); done(); } - }, null, {parent: parent}); + }); call.cancel(); }; proxy.addProtoService(test_service, proxy_impl); @@ -976,7 +976,7 @@ describe('Call propagation', function() { done = multiDone(done, 2); var call; proxy_impl.clientStream = function(parent, callback) { - client.clientStream(function(err, value) { + client.clientStream({parent: parent}, function(err, value) { try { assert(err); assert.strictEqual(err.code, grpc.status.CANCELLED); @@ -984,7 +984,7 @@ describe('Call propagation', function() { callback(err, value); done(); } - }, null, {parent: parent}); + }); call.cancel(); }; proxy.addProtoService(test_service, proxy_impl); @@ -998,8 +998,7 @@ describe('Call propagation', function() { done = multiDone(done, 2); var call; proxy_impl.serverStream = function(parent) { - var child = client.serverStream(parent.request, null, - {parent: parent}); + var child = client.serverStream(parent.request, {parent: parent}); child.on('data', function() {}); child.on('error', function(err) { assert(err); @@ -1023,7 +1022,7 @@ describe('Call propagation', function() { done = multiDone(done, 2); var call; proxy_impl.bidiStream = function(parent) { - var child = client.bidiStream(null, {parent: parent}); + var child = client.bidiStream({parent: parent}); child.on('data', function() {}); child.on('error', function(err) { assert(err); @@ -1051,7 +1050,8 @@ describe('Call propagation', function() { it('With a client stream call', function(done) { done = multiDone(done, 2); proxy_impl.clientStream = function(parent, callback) { - client.clientStream(function(err, value) { + var options = {parent: parent, propagate_flags: deadline_flags}; + client.clientStream(options, function(err, value) { try { assert(err); assert(err.code === grpc.status.DEADLINE_EXCEEDED || @@ -1060,7 +1060,7 @@ describe('Call propagation', function() { callback(err, value); done(); } - }, null, {parent: parent, propagate_flags: deadline_flags}); + }); }; proxy.addProtoService(test_service, proxy_impl); var proxy_port = proxy.bind('localhost:0', server_insecure_creds); @@ -1069,15 +1069,15 @@ describe('Call propagation', function() { grpc.credentials.createInsecure()); var deadline = new Date(); deadline.setSeconds(deadline.getSeconds() + 1); - proxy_client.clientStream(function(err, value) { + proxy_client.clientStream({deadline: deadline}, function(err, value) { done(); - }, null, {deadline: deadline}); + }); }); it('With a bidi stream call', function(done) { done = multiDone(done, 2); proxy_impl.bidiStream = function(parent) { var child = client.bidiStream( - null, {parent: parent, propagate_flags: deadline_flags}); + {parent: parent, propagate_flags: deadline_flags}); child.on('data', function() {}); child.on('error', function(err) { assert(err); @@ -1093,7 +1093,7 @@ describe('Call propagation', function() { grpc.credentials.createInsecure()); var deadline = new Date(); deadline.setSeconds(deadline.getSeconds() + 1); - var call = proxy_client.bidiStream(null, {deadline: deadline}); + var call = proxy_client.bidiStream({deadline: deadline}); call.on('data', function() {}); call.on('error', function(err) { done(); diff --git a/src/objective-c/GRPCClient/GRPCCall.m b/src/objective-c/GRPCClient/GRPCCall.m index 2d45818b6e9..51263b073ca 100644 --- a/src/objective-c/GRPCClient/GRPCCall.m +++ b/src/objective-c/GRPCClient/GRPCCall.m @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -308,37 +308,30 @@ NSString * const kGRPCTrailersKey = @"io.grpc.TrailersKey"; } - (void)invokeCall { - __weak GRPCCall *weakSelf = self; [self invokeCallWithHeadersHandler:^(NSDictionary *headers) { // Response headers received. - GRPCCall *strongSelf = weakSelf; - if (strongSelf) { - strongSelf.responseHeaders = headers; - [strongSelf startNextRead]; - } + self.responseHeaders = headers; + [self startNextRead]; } completionHandler:^(NSError *error, NSDictionary *trailers) { - GRPCCall *strongSelf = weakSelf; - if (strongSelf) { - strongSelf.responseTrailers = trailers; - - if (error) { - NSMutableDictionary *userInfo = [NSMutableDictionary dictionary]; - if (error.userInfo) { - [userInfo addEntriesFromDictionary:error.userInfo]; - } - userInfo[kGRPCTrailersKey] = strongSelf.responseTrailers; - // TODO(jcanizales): The C gRPC library doesn't guarantee that the headers block will be - // called before this one, so an error might end up with trailers but no headers. We - // shouldn't call finishWithError until ater both blocks are called. It is also when this is - // done that we can provide a merged view of response headers and trailers in a thread-safe - // way. - if (strongSelf.responseHeaders) { - userInfo[kGRPCHeadersKey] = strongSelf.responseHeaders; - } - error = [NSError errorWithDomain:error.domain code:error.code userInfo:userInfo]; + self.responseTrailers = trailers; + + if (error) { + NSMutableDictionary *userInfo = [NSMutableDictionary dictionary]; + if (error.userInfo) { + [userInfo addEntriesFromDictionary:error.userInfo]; + } + userInfo[kGRPCTrailersKey] = self.responseTrailers; + // TODO(jcanizales): The C gRPC library doesn't guarantee that the headers block will be + // called before this one, so an error might end up with trailers but no headers. We + // shouldn't call finishWithError until ater both blocks are called. It is also when this is + // done that we can provide a merged view of response headers and trailers in a thread-safe + // way. + if (self.responseHeaders) { + userInfo[kGRPCHeadersKey] = self.responseHeaders; } - [strongSelf finishWithError:error]; + error = [NSError errorWithDomain:error.domain code:error.code userInfo:userInfo]; } + [self finishWithError:error]; }]; // Now that the RPC has been initiated, request writes can start. @synchronized(_requestWriter) { @@ -377,7 +370,6 @@ NSString * const kGRPCTrailersKey = @"io.grpc.TrailersKey"; [strongSelf finishWithError:[NSError errorWithDomain:kGRPCErrorDomain code:GRPCErrorCodeUnavailable userInfo:@{NSLocalizedDescriptionKey: @"Connectivity lost."}]]; - [[GRPCHost hostWithAddress:strongSelf->_host] disconnect]; } }]; } diff --git a/src/objective-c/GRPCClient/private/GRPCCompletionQueue.h b/src/objective-c/GRPCClient/private/GRPCCompletionQueue.h index a52095dd011..7b66cd4c329 100644 --- a/src/objective-c/GRPCClient/private/GRPCCompletionQueue.h +++ b/src/objective-c/GRPCClient/private/GRPCCompletionQueue.h @@ -36,8 +36,6 @@ typedef void(^GRPCQueueCompletionHandler)(bool success); -extern const int64_t kGRPCCompletionQueueDefaultTimeoutSecs; - /** * This class lets one more easily use |grpc_completion_queue|. To use it, pass the value of the * |unmanagedQueue| property of an instance of this class to |grpc_channel_create_call|. Then for @@ -51,11 +49,6 @@ extern const int64_t kGRPCCompletionQueueDefaultTimeoutSecs; */ @interface GRPCCompletionQueue : NSObject @property(nonatomic, readonly) grpc_completion_queue *unmanagedQueue; -@property(nonatomic, readonly) int64_t timeoutSecs; + (instancetype)completionQueue; - -- (instancetype)init; -- (instancetype)initWithTimeout:(int64_t)timeoutSecs NS_DESIGNATED_INITIALIZER; - @end diff --git a/src/objective-c/GRPCClient/private/GRPCCompletionQueue.m b/src/objective-c/GRPCClient/private/GRPCCompletionQueue.m index be214d4d36b..d89602f7cbe 100644 --- a/src/objective-c/GRPCClient/private/GRPCCompletionQueue.m +++ b/src/objective-c/GRPCClient/private/GRPCCompletionQueue.m @@ -35,9 +35,6 @@ #import - -const int64_t kGRPCCompletionQueueDefaultTimeoutSecs = 60; - @implementation GRPCCompletionQueue + (instancetype)completionQueue { @@ -50,13 +47,8 @@ const int64_t kGRPCCompletionQueueDefaultTimeoutSecs = 60; } - (instancetype)init { - return [self initWithTimeout:kGRPCCompletionQueueDefaultTimeoutSecs]; -} - -- (instancetype)initWithTimeout:(int64_t)timeoutSecs { if ((self = [super init])) { _unmanagedQueue = grpc_completion_queue_create(NULL); - _timeoutSecs = timeoutSecs; // This is for the following block to capture the pointer by value (instead // of retaining self and doing self->_unmanagedQueue). This is essential @@ -74,28 +66,22 @@ const int64_t kGRPCCompletionQueueDefaultTimeoutSecs = 60; gDefaultConcurrentQueue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0); }); dispatch_async(gDefaultConcurrentQueue, ^{ - // Using a non-infinite deadline to re-enter grpc_completion_queue_next() - // alleviates https://github.com/grpc/grpc/issues/5593 - gpr_timespec deadline = (timeoutSecs < 0) - ? gpr_inf_future(GPR_CLOCK_REALTIME) - : gpr_time_from_seconds(timeoutSecs, GPR_CLOCK_REALTIME); while (YES) { - // The following call blocks until an event is available or the deadline elapses. - grpc_event event = grpc_completion_queue_next(unmanagedQueue, deadline, NULL); + // The following call blocks until an event is available. + grpc_event event = grpc_completion_queue_next(unmanagedQueue, + gpr_inf_future(GPR_CLOCK_REALTIME), + NULL); GRPCQueueCompletionHandler handler; switch (event.type) { case GRPC_OP_COMPLETE: handler = (__bridge_transfer GRPCQueueCompletionHandler)event.tag; handler(event.success); break; - case GRPC_QUEUE_TIMEOUT: - // Nothing to do here - break; case GRPC_QUEUE_SHUTDOWN: grpc_completion_queue_destroy(unmanagedQueue); return; default: - [NSException raise:@"Unrecognized completion type" format:@"type=%d", event.type]; + [NSException raise:@"Unrecognized completion type" format:@""]; } }; }); diff --git a/src/objective-c/GRPCClient/private/GRPCReachabilityFlagNames.xmacro.h b/src/objective-c/GRPCClient/private/GRPCReachabilityFlagNames.xmacro.h index 02871d5d028..4b92504b555 100644 --- a/src/objective-c/GRPCClient/private/GRPCReachabilityFlagNames.xmacro.h +++ b/src/objective-c/GRPCClient/private/GRPCReachabilityFlagNames.xmacro.h @@ -54,7 +54,9 @@ GRPC_XMACRO_ITEM. #endif +#if TARGET_OS_IPHONE GRPC_XMACRO_ITEM(isCell, IsWWAN) +#endif GRPC_XMACRO_ITEM(reachable, Reachable) GRPC_XMACRO_ITEM(transientConnection, TransientConnection) GRPC_XMACRO_ITEM(connectionRequired, ConnectionRequired) diff --git a/src/objective-c/GRPCClient/private/GRPCWrappedCall.m b/src/objective-c/GRPCClient/private/GRPCWrappedCall.m index fe3d51da53a..f6527e283cf 100644 --- a/src/objective-c/GRPCClient/private/GRPCWrappedCall.m +++ b/src/objective-c/GRPCClient/private/GRPCWrappedCall.m @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -54,7 +54,9 @@ - (void)finish { if (_handler) { - _handler(); + void(^handler)() = _handler; + _handler = nil; + handler(); } } @end diff --git a/src/php/ext/grpc/channel.c b/src/php/ext/grpc/channel.c index f0bc7340ba9..b7e7c26c109 100644 --- a/src/php/ext/grpc/channel.c +++ b/src/php/ext/grpc/channel.c @@ -110,9 +110,11 @@ void php_grpc_read_args_array(zval *args_array, grpc_channel_args *args) { switch (Z_TYPE_P(*data)) { case IS_LONG: args->args[args_index].value.integer = (int)Z_LVAL_P(*data); + args->args[args_index].type = GRPC_ARG_INTEGER; break; case IS_STRING: args->args[args_index].value.string = Z_STRVAL_P(*data); + args->args[args_index].type = GRPC_ARG_STRING; break; default: zend_throw_exception(spl_ce_InvalidArgumentException, diff --git a/src/proto/grpc/testing/metrics.proto b/src/proto/grpc/testing/metrics.proto index 4485d3a53b5..df719afd99e 100644 --- a/src/proto/grpc/testing/metrics.proto +++ b/src/proto/grpc/testing/metrics.proto @@ -1,5 +1,4 @@ - -// Copyright 2015, Google Inc. +// Copyright 2015-2016, Google Inc. // All rights reserved. // // Redistribution and use in source and binary forms, with or without @@ -28,12 +27,17 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// An integration test service that covers all the method signature permutations -// of unary/streaming requests/responses. +// Contains the definitions for a metrics service and the type of metrics +// exposed by the service. +// +// Currently, 'Gauge' (i.e a metric that represents the measured value of +// something at an instant of time) is the only metric type supported by the +// service. syntax = "proto3"; package grpc.testing; +// Reponse message containing the gauge name and value message GaugeResponse { string name = 1; oneof value { @@ -43,11 +47,18 @@ message GaugeResponse { } } -message GaugeRequest { string name = 1; } +// Request message containing the gauge name +message GaugeRequest { + string name = 1; +} message EmptyMessage {} service MetricsService { + // Returns the values of all the gauges that are currently being maintained by + // the service rpc GetAllGauges(EmptyMessage) returns (stream GaugeResponse); + + // Returns the value of one gauge rpc GetGauge(GaugeRequest) returns (GaugeResponse); } diff --git a/src/python/grpcio/README.rst b/src/python/grpcio/README.rst index 3dfae50b4bc..33a462b66f8 100644 --- a/src/python/grpcio/README.rst +++ b/src/python/grpcio/README.rst @@ -35,13 +35,14 @@ package named :code:`python-dev`). :: - $ export REPO_ROOT=grpc + $ export REPO_ROOT=grpc # REPO_ROOT can be any directory of your choice $ git clone https://github.com/grpc/grpc.git $REPO_ROOT $ cd $REPO_ROOT - $ pip install . -Note that :code:`$REPO_ROOT` can be assigned to whatever directory name floats -your fancy. + # For the next two commands do `sudo pip install` if you get permission-denied errors + $ pip install -rrequirements.txt + $ GRPC_PYTHON_BUILD_WITH_CYTHON=1 pip install . + Troubleshooting ~~~~~~~~~~~~~~~ @@ -49,10 +50,43 @@ Troubleshooting Help, I ... * **... see a** :code:`pkg_resources.VersionConflict` **when I try to install - grpc!** + grpc** This is likely because :code:`pip` doesn't own the offending dependency, which in turn is likely because your operating system's package manager owns it. You'll need to force the installation of the dependency: :code:`pip install --ignore-installed $OFFENDING_DEPENDENCY` + + For example, if you get an error like the following: + + :: + + Traceback (most recent call last): + File "", line 17, in + ... + File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 509, in find + raise VersionConflict(dist, req) + pkg_resources.VersionConflict: (six 1.8.0 (/usr/lib/python2.7/dist-packages), Requirement.parse('six>=1.10')) + + You can fix it by doing: + + :: + + sudo pip install --ignore-installed six + +* **... see the following error on some platforms** + + :: + + /tmp/pip-build-U8pSsr/cython/Cython/Plex/Scanners.c:4:20: fatal error: Python.h: No such file or directory + #include "Python.h" + ^ + compilation terminated. + + You can fix it by installing `python-dev` package. i.e + + :: + + sudo apt-get install python-dev + diff --git a/src/python/grpcio/commands.py b/src/python/grpcio/commands.py index c1f444f6f1f..1d435474198 100644 --- a/src/python/grpcio/commands.py +++ b/src/python/grpcio/commands.py @@ -288,15 +288,9 @@ class TestLite(setuptools.Command): sys.exit('Test failure') def _add_eggs_to_path(self): - """Adds all egg files under .eggs to sys.path""" - # TODO(jtattemusch): there has to be a cleaner way to do this - import pkg_resources - eggs_dir = os.path.join(PYTHON_STEM, '../../../.eggs') - eggs = [os.path.join(eggs_dir, filename) - for filename in os.listdir(eggs_dir) - if filename.endswith('.egg')] - for egg in eggs: - sys.path.insert(0, pkg_resources.normalize_path(egg)) + """Fetch install and test requirements""" + self.distribution.fetch_build_eggs(self.distribution.install_requires) + self.distribution.fetch_build_eggs(self.distribution.tests_require) class RunInterop(test.test): diff --git a/src/python/grpcio/grpc/_adapter/_types.py b/src/python/grpcio/grpc/_adapter/_types.py index 3d5ab33d008..f9e18f0bb3f 100644 --- a/src/python/grpcio/grpc/_adapter/_types.py +++ b/src/python/grpcio/grpc/_adapter/_types.py @@ -1,4 +1,4 @@ -# Copyright 2015, Google Inc. +# Copyright 2015-2016, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -31,6 +31,8 @@ import abc import collections import enum +import six + from grpc._cython import cygrpc @@ -247,8 +249,7 @@ class Event(collections.namedtuple( """ -class CompletionQueue: - __metaclass__ = abc.ABCMeta +class CompletionQueue(six.with_metaclass(abc.ABCMeta)): @abc.abstractmethod def __init__(self): @@ -262,6 +263,9 @@ class CompletionQueue: """ return self + def __next__(self): + return self.next() + @abc.abstractmethod def next(self, deadline=float('+inf')): """Get the next event on this completion queue. @@ -285,8 +289,7 @@ class CompletionQueue: return None -class Call: - __metaclass__ = abc.ABCMeta +class Call(six.with_metaclass(abc.ABCMeta)): @abc.abstractmethod def start_batch(self, ops, tag): @@ -334,8 +337,7 @@ class Call: return None -class Channel: - __metaclass__ = abc.ABCMeta +class Channel(six.with_metaclass(abc.ABCMeta)): @abc.abstractmethod def __init__(self, target, args, credentials=None): @@ -399,8 +401,7 @@ class Channel: return None -class Server: - __metaclass__ = abc.ABCMeta +class Server(six.with_metaclass(abc.ABCMeta)): @abc.abstractmethod def __init__(self, completion_queue, args): diff --git a/src/python/grpcio/grpc/_cython/_cygrpc/call.pyx.pxi b/src/python/grpcio/grpc/_cython/_cygrpc/call.pyx.pxi index 80f4da51e8c..d1b9c98ffc2 100644 --- a/src/python/grpcio/grpc/_cython/_cygrpc/call.pyx.pxi +++ b/src/python/grpcio/grpc/_cython/_cygrpc/call.pyx.pxi @@ -1,4 +1,4 @@ -# Copyright 2015, Google Inc. +# Copyright 2015-2016, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -40,14 +40,17 @@ cdef class Call: def start_batch(self, operations, tag): if not self.is_valid: raise ValueError("invalid call object cannot be used from Python") + cdef grpc_call_error result cdef Operations cy_operations = Operations(operations) cdef OperationTag operation_tag = OperationTag(tag) operation_tag.operation_call = self operation_tag.batch_operations = cy_operations cpython.Py_INCREF(operation_tag) - return grpc_call_start_batch( - self.c_call, cy_operations.c_ops, cy_operations.c_nops, - operation_tag, NULL) + with nogil: + result = grpc_call_start_batch( + self.c_call, cy_operations.c_ops, cy_operations.c_nops, + operation_tag, NULL) + return result def cancel( self, grpc_status_code error_code=GRPC_STATUS__DO_NOT_USE, @@ -57,6 +60,8 @@ cdef class Call: if (details is None) != (error_code == GRPC_STATUS__DO_NOT_USE): raise ValueError("if error_code is specified, so must details " "(and vice-versa)") + cdef grpc_call_error result + cdef char *c_details = NULL if error_code != GRPC_STATUS__DO_NOT_USE: if isinstance(details, bytes): pass @@ -65,25 +70,37 @@ cdef class Call: else: raise TypeError("expected details to be str or bytes") self.references.append(details) - return grpc_call_cancel_with_status( - self.c_call, error_code, details, NULL) + c_details = details + with nogil: + result = grpc_call_cancel_with_status( + self.c_call, error_code, c_details, NULL) + return result else: - return grpc_call_cancel(self.c_call, NULL) + with nogil: + result = grpc_call_cancel(self.c_call, NULL) + return result def set_credentials( self, CallCredentials call_credentials not None): - return grpc_call_set_credentials( - self.c_call, call_credentials.c_credentials) + cdef grpc_call_error result + with nogil: + result = grpc_call_set_credentials( + self.c_call, call_credentials.c_credentials) + return result def peer(self): - cdef char *peer = grpc_call_get_peer(self.c_call) + cdef char *peer = NULL + with nogil: + peer = grpc_call_get_peer(self.c_call) result = peer - gpr_free(peer) + with nogil: + gpr_free(peer) return result def __dealloc__(self): if self.c_call != NULL: - grpc_call_destroy(self.c_call) + with nogil: + grpc_call_destroy(self.c_call) # The object *should* always be valid from Python. Used for debugging. @property diff --git a/src/python/grpcio/grpc/_cython/_cygrpc/channel.pyx.pxi b/src/python/grpcio/grpc/_cython/_cygrpc/channel.pyx.pxi index bc03c4dcf19..d612c907918 100644 --- a/src/python/grpcio/grpc/_cython/_cygrpc/channel.pyx.pxi +++ b/src/python/grpcio/grpc/_cython/_cygrpc/channel.pyx.pxi @@ -35,6 +35,7 @@ cdef class Channel: def __cinit__(self, target, ChannelArgs arguments=None, ChannelCredentials channel_credentials=None): cdef grpc_channel_args *c_arguments = NULL + cdef char *c_target = NULL self.c_channel = NULL self.references = [] if arguments is not None: @@ -45,12 +46,15 @@ cdef class Channel: target = target.encode() else: raise TypeError("expected target to be str or bytes") + c_target = target if channel_credentials is None: - self.c_channel = grpc_insecure_channel_create(target, c_arguments, - NULL) + with nogil: + self.c_channel = grpc_insecure_channel_create(c_target, c_arguments, + NULL) else: - self.c_channel = grpc_secure_channel_create( - channel_credentials.c_credentials, target, c_arguments, NULL) + with nogil: + self.c_channel = grpc_secure_channel_create( + channel_credentials.c_credentials, c_target, c_arguments, NULL) self.references.append(channel_credentials) self.references.append(target) self.references.append(arguments) @@ -66,6 +70,7 @@ cdef class Channel: method = method.encode() else: raise TypeError("expected method to be str or bytes") + cdef char *method_c_string = method cdef char *host_c_string = NULL if host is None: pass @@ -81,31 +86,40 @@ cdef class Channel: cdef grpc_call *parent_call = NULL if parent is not None: parent_call = parent.c_call - operation_call.c_call = grpc_channel_create_call( - self.c_channel, parent_call, flags, - queue.c_completion_queue, method, host_c_string, deadline.c_time, - NULL) + with nogil: + operation_call.c_call = grpc_channel_create_call( + self.c_channel, parent_call, flags, + queue.c_completion_queue, method_c_string, host_c_string, + deadline.c_time, NULL) return operation_call def check_connectivity_state(self, bint try_to_connect): - return grpc_channel_check_connectivity_state(self.c_channel, - try_to_connect) + cdef grpc_connectivity_state result + with nogil: + result = grpc_channel_check_connectivity_state(self.c_channel, + try_to_connect) + return result def watch_connectivity_state( self, grpc_connectivity_state last_observed_state, Timespec deadline not None, CompletionQueue queue not None, tag): cdef OperationTag operation_tag = OperationTag(tag) cpython.Py_INCREF(operation_tag) - grpc_channel_watch_connectivity_state( - self.c_channel, last_observed_state, deadline.c_time, - queue.c_completion_queue, operation_tag) + with nogil: + grpc_channel_watch_connectivity_state( + self.c_channel, last_observed_state, deadline.c_time, + queue.c_completion_queue, operation_tag) def target(self): - cdef char * target = grpc_channel_get_target(self.c_channel) + cdef char *target = NULL + with nogil: + target = grpc_channel_get_target(self.c_channel) result = target - gpr_free(target) + with nogil: + gpr_free(target) return result def __dealloc__(self): if self.c_channel != NULL: - grpc_channel_destroy(self.c_channel) + with nogil: + grpc_channel_destroy(self.c_channel) diff --git a/src/python/grpcio/grpc/_cython/_cygrpc/completion_queue.pyx.pxi b/src/python/grpcio/grpc/_cython/_cygrpc/completion_queue.pyx.pxi index e11138b1cd8..09e47d42221 100644 --- a/src/python/grpcio/grpc/_cython/_cygrpc/completion_queue.pyx.pxi +++ b/src/python/grpcio/grpc/_cython/_cygrpc/completion_queue.pyx.pxi @@ -36,7 +36,8 @@ import time cdef class CompletionQueue: def __cinit__(self): - self.c_completion_queue = grpc_completion_queue_create(NULL) + with nogil: + self.c_completion_queue = grpc_completion_queue_create(NULL) self.is_shutting_down = False self.is_shutdown = False self.pluck_condition = threading.Condition() @@ -82,8 +83,9 @@ cdef class CompletionQueue: def poll(self, Timespec deadline=None): # We name this 'poll' to avoid problems with CPython's expectations for # 'special' methods (like next and __next__). - cdef gpr_timespec c_deadline = gpr_inf_future( - GPR_CLOCK_REALTIME) + cdef gpr_timespec c_deadline + with nogil: + c_deadline = gpr_inf_future(GPR_CLOCK_REALTIME) if deadline is not None: c_deadline = deadline.c_time cdef grpc_event event @@ -123,7 +125,8 @@ cdef class CompletionQueue: return self._interpret_event(event) def shutdown(self): - grpc_completion_queue_shutdown(self.c_completion_queue) + with nogil: + grpc_completion_queue_shutdown(self.c_completion_queue) self.is_shutting_down = True def clear(self): @@ -133,15 +136,19 @@ cdef class CompletionQueue: pass def __dealloc__(self): - cdef gpr_timespec c_deadline = gpr_inf_future(GPR_CLOCK_REALTIME) + cdef gpr_timespec c_deadline + with nogil: + c_deadline = gpr_inf_future(GPR_CLOCK_REALTIME) if self.c_completion_queue != NULL: # Ensure shutdown if not self.is_shutting_down: - grpc_completion_queue_shutdown(self.c_completion_queue) + with nogil: + grpc_completion_queue_shutdown(self.c_completion_queue) # Pump the queue while not self.is_shutdown: with nogil: event = grpc_completion_queue_next( self.c_completion_queue, c_deadline, NULL) self._interpret_event(event) - grpc_completion_queue_destroy(self.c_completion_queue) + with nogil: + grpc_completion_queue_destroy(self.c_completion_queue) diff --git a/src/python/grpcio/grpc/_cython/_cygrpc/credentials.pyx.pxi b/src/python/grpcio/grpc/_cython/_cygrpc/credentials.pyx.pxi index 3f439c8900f..1d7adca23ef 100644 --- a/src/python/grpcio/grpc/_cython/_cygrpc/credentials.pyx.pxi +++ b/src/python/grpcio/grpc/_cython/_cygrpc/credentials.pyx.pxi @@ -1,4 +1,4 @@ -# Copyright 2015, Google Inc. +# Copyright 2015-2016, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -46,7 +46,8 @@ cdef class ChannelCredentials: def __dealloc__(self): if self.c_credentials != NULL: - grpc_channel_credentials_release(self.c_credentials) + with nogil: + grpc_channel_credentials_release(self.c_credentials) cdef class CallCredentials: @@ -63,7 +64,8 @@ cdef class CallCredentials: def __dealloc__(self): if self.c_credentials != NULL: - grpc_call_credentials_release(self.c_credentials) + with nogil: + grpc_call_credentials_release(self.c_credentials) cdef class ServerCredentials: @@ -74,7 +76,8 @@ cdef class ServerCredentials: def __dealloc__(self): if self.c_credentials != NULL: - grpc_server_credentials_release(self.c_credentials) + with nogil: + grpc_server_credentials_release(self.c_credentials) cdef class CredentialsMetadataPlugin: @@ -139,7 +142,8 @@ cdef void plugin_destroy_c_plugin_state(void *state): def channel_credentials_google_default(): cdef ChannelCredentials credentials = ChannelCredentials(); - credentials.c_credentials = grpc_google_default_credentials_create() + with nogil: + credentials.c_credentials = grpc_google_default_credentials_create() return credentials def channel_credentials_ssl(pem_root_certificates, @@ -158,12 +162,14 @@ def channel_credentials_ssl(pem_root_certificates, c_pem_root_certificates = pem_root_certificates credentials.references.append(pem_root_certificates) if ssl_pem_key_cert_pair is not None: - credentials.c_credentials = grpc_ssl_credentials_create( - c_pem_root_certificates, &ssl_pem_key_cert_pair.c_pair, NULL) + with nogil: + credentials.c_credentials = grpc_ssl_credentials_create( + c_pem_root_certificates, &ssl_pem_key_cert_pair.c_pair, NULL) credentials.references.append(ssl_pem_key_cert_pair) else: - credentials.c_credentials = grpc_ssl_credentials_create( - c_pem_root_certificates, NULL, NULL) + with nogil: + credentials.c_credentials = grpc_ssl_credentials_create( + c_pem_root_certificates, NULL, NULL) return credentials def channel_credentials_composite( @@ -172,8 +178,9 @@ def channel_credentials_composite( if not credentials_1.is_valid or not credentials_2.is_valid: raise ValueError("passed credentials must both be valid") cdef ChannelCredentials credentials = ChannelCredentials() - credentials.c_credentials = grpc_composite_channel_credentials_create( - credentials_1.c_credentials, credentials_2.c_credentials, NULL) + with nogil: + credentials.c_credentials = grpc_composite_channel_credentials_create( + credentials_1.c_credentials, credentials_2.c_credentials, NULL) credentials.references.append(credentials_1) credentials.references.append(credentials_2) return credentials @@ -184,16 +191,18 @@ def call_credentials_composite( if not credentials_1.is_valid or not credentials_2.is_valid: raise ValueError("passed credentials must both be valid") cdef CallCredentials credentials = CallCredentials() - credentials.c_credentials = grpc_composite_call_credentials_create( - credentials_1.c_credentials, credentials_2.c_credentials, NULL) + with nogil: + credentials.c_credentials = grpc_composite_call_credentials_create( + credentials_1.c_credentials, credentials_2.c_credentials, NULL) credentials.references.append(credentials_1) credentials.references.append(credentials_2) return credentials def call_credentials_google_compute_engine(): cdef CallCredentials credentials = CallCredentials() - credentials.c_credentials = ( - grpc_google_compute_engine_credentials_create(NULL)) + with nogil: + credentials.c_credentials = ( + grpc_google_compute_engine_credentials_create(NULL)) return credentials def call_credentials_service_account_jwt_access( @@ -205,9 +214,11 @@ def call_credentials_service_account_jwt_access( else: raise TypeError("expected json_key to be str or bytes") cdef CallCredentials credentials = CallCredentials() - credentials.c_credentials = ( - grpc_service_account_jwt_access_credentials_create( - json_key, token_lifetime.c_time, NULL)) + cdef char *json_key_c_string = json_key + with nogil: + credentials.c_credentials = ( + grpc_service_account_jwt_access_credentials_create( + json_key_c_string, token_lifetime.c_time, NULL)) credentials.references.append(json_key) return credentials @@ -219,8 +230,10 @@ def call_credentials_google_refresh_token(json_refresh_token): else: raise TypeError("expected json_refresh_token to be str or bytes") cdef CallCredentials credentials = CallCredentials() - credentials.c_credentials = grpc_google_refresh_token_credentials_create( - json_refresh_token, NULL) + cdef char *json_refresh_token_c_string = json_refresh_token + with nogil: + credentials.c_credentials = grpc_google_refresh_token_credentials_create( + json_refresh_token_c_string, NULL) credentials.references.append(json_refresh_token) return credentials @@ -238,17 +251,21 @@ def call_credentials_google_iam(authorization_token, authority_selector): else: raise TypeError("expected authority_selector to be str or bytes") cdef CallCredentials credentials = CallCredentials() - credentials.c_credentials = grpc_google_iam_credentials_create( - authorization_token, authority_selector, NULL) + cdef char *authorization_token_c_string = authorization_token + cdef char *authority_selector_c_string = authority_selector + with nogil: + credentials.c_credentials = grpc_google_iam_credentials_create( + authorization_token_c_string, authority_selector_c_string, NULL) credentials.references.append(authorization_token) credentials.references.append(authority_selector) return credentials def call_credentials_metadata_plugin(CredentialsMetadataPlugin plugin): cdef CallCredentials credentials = CallCredentials() - credentials.c_credentials = ( - grpc_metadata_credentials_create_from_plugin(plugin.make_c_plugin(), - NULL)) + cdef grpc_metadata_credentials_plugin c_plugin = plugin.make_c_plugin() + with nogil: + credentials.c_credentials = ( + grpc_metadata_credentials_create_from_plugin(c_plugin, NULL)) # TODO(atash): the following held reference is *probably* never necessary credentials.references.append(plugin) return credentials @@ -274,11 +291,12 @@ def server_credentials_ssl(pem_root_certs, pem_key_cert_pairs, credentials.references.append(pem_key_cert_pairs) credentials.references.append(pem_root_certs) credentials.c_ssl_pem_key_cert_pairs_count = len(pem_key_cert_pairs) - credentials.c_ssl_pem_key_cert_pairs = ( - gpr_malloc( - sizeof(grpc_ssl_pem_key_cert_pair) * - credentials.c_ssl_pem_key_cert_pairs_count - )) + with nogil: + credentials.c_ssl_pem_key_cert_pairs = ( + gpr_malloc( + sizeof(grpc_ssl_pem_key_cert_pair) * + credentials.c_ssl_pem_key_cert_pairs_count + )) for i in range(credentials.c_ssl_pem_key_cert_pairs_count): credentials.c_ssl_pem_key_cert_pairs[i] = ( (pem_key_cert_pairs[i]).c_pair) diff --git a/src/python/grpcio/grpc/_cython/_cygrpc/grpc.pxi b/src/python/grpcio/grpc/_cython/_cygrpc/grpc.pxi index dbf0045710e..61165cb0213 100644 --- a/src/python/grpcio/grpc/_cython/_cygrpc/grpc.pxi +++ b/src/python/grpcio/grpc/_cython/_cygrpc/grpc.pxi @@ -38,27 +38,27 @@ cdef extern from "grpc/_cython/loader.h": int pygrpc_load_core(char*) - void *gpr_malloc(size_t size) - void gpr_free(void *ptr) - void *gpr_realloc(void *p, size_t size) + void *gpr_malloc(size_t size) nogil + void gpr_free(void *ptr) nogil + void *gpr_realloc(void *p, size_t size) nogil ctypedef struct gpr_slice: # don't worry about writing out the members of gpr_slice; we never access # them directly. pass - gpr_slice gpr_slice_ref(gpr_slice s) - void gpr_slice_unref(gpr_slice s) - gpr_slice gpr_slice_new(void *p, size_t len, void (*destroy)(void *)) + gpr_slice gpr_slice_ref(gpr_slice s) nogil + void gpr_slice_unref(gpr_slice s) nogil + gpr_slice gpr_slice_new(void *p, size_t len, void (*destroy)(void *)) nogil gpr_slice gpr_slice_new_with_len( - void *p, size_t len, void (*destroy)(void *, size_t)) - gpr_slice gpr_slice_malloc(size_t length) - gpr_slice gpr_slice_from_copied_string(const char *source) - gpr_slice gpr_slice_from_copied_buffer(const char *source, size_t len) + void *p, size_t len, void (*destroy)(void *, size_t)) nogil + gpr_slice gpr_slice_malloc(size_t length) nogil + gpr_slice gpr_slice_from_copied_string(const char *source) nogil + gpr_slice gpr_slice_from_copied_buffer(const char *source, size_t len) nogil # Declare functions for function-like macros (because Cython)... - void *gpr_slice_start_ptr "GPR_SLICE_START_PTR" (gpr_slice s) - size_t gpr_slice_length "GPR_SLICE_LENGTH" (gpr_slice s) + void *gpr_slice_start_ptr "GPR_SLICE_START_PTR" (gpr_slice s) nogil + size_t gpr_slice_length "GPR_SLICE_LENGTH" (gpr_slice s) nogil ctypedef enum gpr_clock_type: GPR_CLOCK_MONOTONIC @@ -71,14 +71,14 @@ cdef extern from "grpc/_cython/loader.h": int32_t nanoseconds "tv_nsec" gpr_clock_type clock_type - gpr_timespec gpr_time_0(gpr_clock_type type) - gpr_timespec gpr_inf_future(gpr_clock_type type) - gpr_timespec gpr_inf_past(gpr_clock_type type) + gpr_timespec gpr_time_0(gpr_clock_type type) nogil + gpr_timespec gpr_inf_future(gpr_clock_type type) nogil + gpr_timespec gpr_inf_past(gpr_clock_type type) nogil - gpr_timespec gpr_now(gpr_clock_type clock) + gpr_timespec gpr_now(gpr_clock_type clock) nogil gpr_timespec gpr_convert_clock_type(gpr_timespec t, - gpr_clock_type target_clock) + gpr_clock_type target_clock) nogil ctypedef enum grpc_status_code: GRPC_STATUS_OK @@ -114,15 +114,15 @@ cdef extern from "grpc/_cython/loader.h": pass grpc_byte_buffer *grpc_raw_byte_buffer_create(gpr_slice *slices, - size_t nslices) - size_t grpc_byte_buffer_length(grpc_byte_buffer *bb) - void grpc_byte_buffer_destroy(grpc_byte_buffer *byte_buffer) + size_t nslices) nogil + size_t grpc_byte_buffer_length(grpc_byte_buffer *bb) nogil + void grpc_byte_buffer_destroy(grpc_byte_buffer *byte_buffer) nogil void grpc_byte_buffer_reader_init(grpc_byte_buffer_reader *reader, - grpc_byte_buffer *buffer) + grpc_byte_buffer *buffer) nogil int grpc_byte_buffer_reader_next(grpc_byte_buffer_reader *reader, - gpr_slice *slice) - void grpc_byte_buffer_reader_destroy(grpc_byte_buffer_reader *reader) + gpr_slice *slice) nogil + void grpc_byte_buffer_reader_destroy(grpc_byte_buffer_reader *reader) nogil const char *GRPC_ARG_PRIMARY_USER_AGENT_STRING const char *GRPC_ARG_ENABLE_CENSUS @@ -221,8 +221,8 @@ cdef extern from "grpc/_cython/loader.h": size_t capacity grpc_metadata *metadata - void grpc_metadata_array_init(grpc_metadata_array *array) - void grpc_metadata_array_destroy(grpc_metadata_array *array) + void grpc_metadata_array_init(grpc_metadata_array *array) nogil + void grpc_metadata_array_destroy(grpc_metadata_array *array) nogil ctypedef struct grpc_call_details: char *method @@ -231,8 +231,8 @@ cdef extern from "grpc/_cython/loader.h": size_t host_capacity gpr_timespec deadline - void grpc_call_details_init(grpc_call_details *details) - void grpc_call_details_destroy(grpc_call_details *details) + void grpc_call_details_init(grpc_call_details *details) nogil + void grpc_call_details_destroy(grpc_call_details *details) nogil ctypedef enum grpc_op_type: GRPC_OP_SEND_INITIAL_METADATA @@ -277,61 +277,62 @@ cdef extern from "grpc/_cython/loader.h": uint32_t flags grpc_op_data data - void grpc_init() - void grpc_shutdown() + void grpc_init() nogil + void grpc_shutdown() nogil - grpc_completion_queue *grpc_completion_queue_create(void *reserved) + grpc_completion_queue *grpc_completion_queue_create(void *reserved) nogil grpc_event grpc_completion_queue_next(grpc_completion_queue *cq, gpr_timespec deadline, void *reserved) nogil grpc_event grpc_completion_queue_pluck(grpc_completion_queue *cq, void *tag, gpr_timespec deadline, void *reserved) nogil - void grpc_completion_queue_shutdown(grpc_completion_queue *cq) - void grpc_completion_queue_destroy(grpc_completion_queue *cq) + void grpc_completion_queue_shutdown(grpc_completion_queue *cq) nogil + void grpc_completion_queue_destroy(grpc_completion_queue *cq) nogil - grpc_call_error grpc_call_start_batch(grpc_call *call, const grpc_op *ops, - size_t nops, void *tag, void *reserved) - grpc_call_error grpc_call_cancel(grpc_call *call, void *reserved) + grpc_call_error grpc_call_start_batch( + grpc_call *call, const grpc_op *ops, size_t nops, void *tag, + void *reserved) nogil + grpc_call_error grpc_call_cancel(grpc_call *call, void *reserved) nogil grpc_call_error grpc_call_cancel_with_status(grpc_call *call, grpc_status_code status, const char *description, - void *reserved) - char *grpc_call_get_peer(grpc_call *call) - void grpc_call_destroy(grpc_call *call) + void *reserved) nogil + char *grpc_call_get_peer(grpc_call *call) nogil + void grpc_call_destroy(grpc_call *call) nogil grpc_channel *grpc_insecure_channel_create(const char *target, const grpc_channel_args *args, - void *reserved) - grpc_call *grpc_channel_create_call(grpc_channel *channel, - grpc_call *parent_call, - uint32_t propagation_mask, - grpc_completion_queue *completion_queue, - const char *method, const char *host, - gpr_timespec deadline, void *reserved) + void *reserved) nogil + grpc_call *grpc_channel_create_call( + grpc_channel *channel, grpc_call *parent_call, uint32_t propagation_mask, + grpc_completion_queue *completion_queue, const char *method, + const char *host, gpr_timespec deadline, void *reserved) nogil grpc_connectivity_state grpc_channel_check_connectivity_state( - grpc_channel *channel, int try_to_connect) + grpc_channel *channel, int try_to_connect) nogil void grpc_channel_watch_connectivity_state( grpc_channel *channel, grpc_connectivity_state last_observed_state, - gpr_timespec deadline, grpc_completion_queue *cq, void *tag) - char *grpc_channel_get_target(grpc_channel *channel) - void grpc_channel_destroy(grpc_channel *channel) + gpr_timespec deadline, grpc_completion_queue *cq, void *tag) nogil + char *grpc_channel_get_target(grpc_channel *channel) nogil + void grpc_channel_destroy(grpc_channel *channel) nogil - grpc_server *grpc_server_create(const grpc_channel_args *args, void *reserved) + grpc_server *grpc_server_create( + const grpc_channel_args *args, void *reserved) nogil grpc_call_error grpc_server_request_call( grpc_server *server, grpc_call **call, grpc_call_details *details, grpc_metadata_array *request_metadata, grpc_completion_queue *cq_bound_to_call, grpc_completion_queue *cq_for_notification, void - *tag_new) + *tag_new) nogil void grpc_server_register_completion_queue(grpc_server *server, grpc_completion_queue *cq, - void *reserved) - int grpc_server_add_insecure_http2_port(grpc_server *server, const char *addr) - void grpc_server_start(grpc_server *server) + void *reserved) nogil + int grpc_server_add_insecure_http2_port( + grpc_server *server, const char *addr) nogil + void grpc_server_start(grpc_server *server) nogil void grpc_server_shutdown_and_notify( - grpc_server *server, grpc_completion_queue *cq, void *tag) - void grpc_server_cancel_all_calls(grpc_server *server) - void grpc_server_destroy(grpc_server *server) + grpc_server *server, grpc_completion_queue *cq, void *tag) nogil + void grpc_server_cancel_all_calls(grpc_server *server) nogil + void grpc_server_destroy(grpc_server *server) nogil ctypedef struct grpc_ssl_pem_key_cert_pair: const char *private_key @@ -347,35 +348,36 @@ cdef extern from "grpc/_cython/loader.h": ctypedef void (*grpc_ssl_roots_override_callback)(char **pem_root_certs) - void grpc_set_ssl_roots_override_callback(grpc_ssl_roots_override_callback cb) + void grpc_set_ssl_roots_override_callback( + grpc_ssl_roots_override_callback cb) nogil - grpc_channel_credentials *grpc_google_default_credentials_create() + grpc_channel_credentials *grpc_google_default_credentials_create() nogil grpc_channel_credentials *grpc_ssl_credentials_create( const char *pem_root_certs, grpc_ssl_pem_key_cert_pair *pem_key_cert_pair, - void *reserved) + void *reserved) nogil grpc_channel_credentials *grpc_composite_channel_credentials_create( grpc_channel_credentials *creds1, grpc_call_credentials *creds2, - void *reserved) - void grpc_channel_credentials_release(grpc_channel_credentials *creds) + void *reserved) nogil + void grpc_channel_credentials_release(grpc_channel_credentials *creds) nogil grpc_call_credentials *grpc_composite_call_credentials_create( grpc_call_credentials *creds1, grpc_call_credentials *creds2, - void *reserved) + void *reserved) nogil grpc_call_credentials *grpc_google_compute_engine_credentials_create( - void *reserved) + void *reserved) nogil grpc_call_credentials *grpc_service_account_jwt_access_credentials_create( const char *json_key, - gpr_timespec token_lifetime, void *reserved) + gpr_timespec token_lifetime, void *reserved) nogil grpc_call_credentials *grpc_google_refresh_token_credentials_create( - const char *json_refresh_token, void *reserved) + const char *json_refresh_token, void *reserved) nogil grpc_call_credentials *grpc_google_iam_credentials_create( const char *authorization_token, const char *authority_selector, - void *reserved) - void grpc_call_credentials_release(grpc_call_credentials *creds) + void *reserved) nogil + void grpc_call_credentials_release(grpc_call_credentials *creds) nogil grpc_channel *grpc_secure_channel_create( grpc_channel_credentials *creds, const char *target, - const grpc_channel_args *args, void *reserved) + const grpc_channel_args *args, void *reserved) nogil ctypedef struct grpc_server_credentials: # We don't care about the internals (and in fact don't know them) @@ -385,13 +387,13 @@ cdef extern from "grpc/_cython/loader.h": const char *pem_root_certs, grpc_ssl_pem_key_cert_pair *pem_key_cert_pairs, size_t num_key_cert_pairs, int force_client_auth, void *reserved) - void grpc_server_credentials_release(grpc_server_credentials *creds) + void grpc_server_credentials_release(grpc_server_credentials *creds) nogil int grpc_server_add_secure_http2_port(grpc_server *server, const char *addr, - grpc_server_credentials *creds) + grpc_server_credentials *creds) nogil grpc_call_error grpc_call_set_credentials(grpc_call *call, - grpc_call_credentials *creds) + grpc_call_credentials *creds) nogil ctypedef struct grpc_auth_context: # We don't care about the internals (and in fact don't know them) @@ -415,4 +417,4 @@ cdef extern from "grpc/_cython/loader.h": const char *type grpc_call_credentials *grpc_metadata_credentials_create_from_plugin( - grpc_metadata_credentials_plugin plugin, void *reserved) + grpc_metadata_credentials_plugin plugin, void *reserved) nogil diff --git a/src/python/grpcio/grpc/_cython/_cygrpc/records.pyx.pxi b/src/python/grpcio/grpc/_cython/_cygrpc/records.pyx.pxi index fa4ea99ea9e..6ecdcf7222b 100644 --- a/src/python/grpcio/grpc/_cython/_cygrpc/records.pyx.pxi +++ b/src/python/grpcio/grpc/_cython/_cygrpc/records.pyx.pxi @@ -107,15 +107,18 @@ cdef class Timespec: def __cinit__(self, time): if time is None: - self.c_time = gpr_now(GPR_CLOCK_REALTIME) + with nogil: + self.c_time = gpr_now(GPR_CLOCK_REALTIME) return if isinstance(time, int): time = float(time) if isinstance(time, float): if time == float("+inf"): - self.c_time = gpr_inf_future(GPR_CLOCK_REALTIME) + with nogil: + self.c_time = gpr_inf_future(GPR_CLOCK_REALTIME) elif time == float("-inf"): - self.c_time = gpr_inf_past(GPR_CLOCK_REALTIME) + with nogil: + self.c_time = gpr_inf_past(GPR_CLOCK_REALTIME) else: self.c_time.seconds = time self.c_time.nanoseconds = (time - float(self.c_time.seconds)) * 1e9 @@ -131,8 +134,10 @@ cdef class Timespec: # TODO(atash) ensure that everywhere a Timespec is created that it's # converted to GPR_CLOCK_REALTIME then and not every time someone wants to # read values off in Python. - cdef gpr_timespec real_time = ( - gpr_convert_clock_type(self.c_time, GPR_CLOCK_REALTIME)) + cdef gpr_timespec real_time + with nogil: + real_time = ( + gpr_convert_clock_type(self.c_time, GPR_CLOCK_REALTIME)) return real_time.seconds @property @@ -158,10 +163,12 @@ cdef class Timespec: cdef class CallDetails: def __cinit__(self): - grpc_call_details_init(&self.c_details) + with nogil: + grpc_call_details_init(&self.c_details) def __dealloc__(self): - grpc_call_details_destroy(&self.c_details) + with nogil: + grpc_call_details_destroy(&self.c_details) @property def method(self): @@ -229,10 +236,15 @@ cdef class ByteBuffer: "ByteBuffer, not {}".format(type(data))) cdef char *c_data = data - data_slice = gpr_slice_from_copied_buffer(c_data, len(data)) - self.c_byte_buffer = grpc_raw_byte_buffer_create( - &data_slice, 1) - gpr_slice_unref(data_slice) + cdef gpr_slice data_slice + cdef size_t data_length = len(data) + with nogil: + data_slice = gpr_slice_from_copied_buffer(c_data, data_length) + with nogil: + self.c_byte_buffer = grpc_raw_byte_buffer_create( + &data_slice, 1) + with nogil: + gpr_slice_unref(data_slice) def bytes(self): cdef grpc_byte_buffer_reader reader @@ -240,20 +252,27 @@ cdef class ByteBuffer: cdef size_t data_slice_length cdef void *data_slice_pointer if self.c_byte_buffer != NULL: - grpc_byte_buffer_reader_init(&reader, self.c_byte_buffer) - result = b"" - while grpc_byte_buffer_reader_next(&reader, &data_slice): - data_slice_pointer = gpr_slice_start_ptr(data_slice) - data_slice_length = gpr_slice_length(data_slice) - result += (data_slice_pointer)[:data_slice_length] - grpc_byte_buffer_reader_destroy(&reader) - return result + with nogil: + grpc_byte_buffer_reader_init(&reader, self.c_byte_buffer) + result = bytearray() + with nogil: + while grpc_byte_buffer_reader_next(&reader, &data_slice): + data_slice_pointer = gpr_slice_start_ptr(data_slice) + data_slice_length = gpr_slice_length(data_slice) + with gil: + result += (data_slice_pointer)[:data_slice_length] + with nogil: + grpc_byte_buffer_reader_destroy(&reader) + return bytes(result) else: return None def __len__(self): + cdef size_t result if self.c_byte_buffer != NULL: - return grpc_byte_buffer_length(self.c_byte_buffer) + with nogil: + result = grpc_byte_buffer_length(self.c_byte_buffer) + return result else: return 0 @@ -262,7 +281,8 @@ cdef class ByteBuffer: def __dealloc__(self): if self.c_byte_buffer != NULL: - grpc_byte_buffer_destroy(self.c_byte_buffer) + with nogil: + grpc_byte_buffer_destroy(self.c_byte_buffer) cdef class SslPemKeyCertPair: @@ -319,14 +339,15 @@ cdef class ChannelArgs: if not isinstance(arg, ChannelArg): raise TypeError("expected list of ChannelArg") self.c_args.arguments_length = len(self.args) - self.c_args.arguments = gpr_malloc( - self.c_args.arguments_length*sizeof(grpc_arg) - ) + with nogil: + self.c_args.arguments = gpr_malloc( + self.c_args.arguments_length*sizeof(grpc_arg)) for i in range(self.c_args.arguments_length): self.c_args.arguments[i] = (self.args[i]).c_arg def __dealloc__(self): - gpr_free(self.c_args.arguments) + with nogil: + gpr_free(self.c_args.arguments) def __len__(self): # self.args is never stale; it's only updated from this file @@ -407,21 +428,24 @@ cdef class Metadata: for metadatum in metadata: if not isinstance(metadatum, Metadatum): raise TypeError("expected list of Metadatum") - grpc_metadata_array_init(&self.c_metadata_array) + with nogil: + grpc_metadata_array_init(&self.c_metadata_array) self.c_metadata_array.count = len(self.metadata) self.c_metadata_array.capacity = len(self.metadata) - self.c_metadata_array.metadata = gpr_malloc( - self.c_metadata_array.count*sizeof(grpc_metadata) - ) + with nogil: + self.c_metadata_array.metadata = gpr_malloc( + self.c_metadata_array.count*sizeof(grpc_metadata) + ) for i in range(self.c_metadata_array.count): self.c_metadata_array.metadata[i] = ( (self.metadata[i]).c_metadata) def __dealloc__(self): # this frees the allocated memory for the grpc_metadata_array (although - # it'd be nice if that were documented somewhere...) TODO(atash): document - # this in the C core - grpc_metadata_array_destroy(&self.c_metadata_array) + # it'd be nice if that were documented somewhere...) + # TODO(atash): document this in the C core + with nogil: + grpc_metadata_array_destroy(&self.c_metadata_array) def __len__(self): return self.c_metadata_array.count @@ -526,7 +550,8 @@ cdef class Operation: # Python. The remaining one(s) are primitive fields filled in by GRPC core. # This means that we need to clean up after receive_status_on_client. if self.c_op.type == GRPC_OP_RECV_STATUS_ON_CLIENT: - gpr_free(self._received_status_details) + with nogil: + gpr_free(self._received_status_details) def operation_send_initial_metadata(Metadata metadata): cdef Operation op = Operation() @@ -648,8 +673,8 @@ cdef class Operations: if not isinstance(operation, Operation): raise TypeError("expected operations to be iterable of Operation") self.c_nops = len(self.operations) - self.c_ops = gpr_malloc( - sizeof(grpc_op)*self.c_nops) + with nogil: + self.c_ops = gpr_malloc(sizeof(grpc_op)*self.c_nops) for i in range(self.c_nops): self.c_ops[i] = ((self.operations[i])).c_op @@ -661,7 +686,8 @@ cdef class Operations: return self.operations[i] def __dealloc__(self): - gpr_free(self.c_ops) + with nogil: + gpr_free(self.c_ops) def __iter__(self): return _OperationsIterator(self) diff --git a/src/python/grpcio/grpc/_cython/_cygrpc/server.pyx.pxi b/src/python/grpcio/grpc/_cython/_cygrpc/server.pyx.pxi index 5f859235246..a098f11da24 100644 --- a/src/python/grpcio/grpc/_cython/_cygrpc/server.pyx.pxi +++ b/src/python/grpcio/grpc/_cython/_cygrpc/server.pyx.pxi @@ -41,7 +41,8 @@ cdef class Server: if arguments is not None: c_arguments = &arguments.c_args self.references.append(arguments) - self.c_server = grpc_server_create(c_arguments, NULL) + with nogil: + self.c_server = grpc_server_create(c_arguments, NULL) self.is_started = False self.is_shutting_down = False self.is_shutdown = False @@ -53,6 +54,7 @@ cdef class Server: raise ValueError("server must be started and not shutting down") if server_queue not in self.registered_completion_queues: raise ValueError("server_queue must be a registered completion queue") + cdef grpc_call_error result cdef OperationTag operation_tag = OperationTag(tag) operation_tag.operation_call = Call() operation_tag.request_call_details = CallDetails() @@ -61,19 +63,22 @@ cdef class Server: operation_tag.is_new_request = True operation_tag.batch_operations = Operations([]) cpython.Py_INCREF(operation_tag) - return grpc_server_request_call( - self.c_server, &operation_tag.operation_call.c_call, - &operation_tag.request_call_details.c_details, - &operation_tag.request_metadata.c_metadata_array, - call_queue.c_completion_queue, server_queue.c_completion_queue, - operation_tag) + with nogil: + result = grpc_server_request_call( + self.c_server, &operation_tag.operation_call.c_call, + &operation_tag.request_call_details.c_details, + &operation_tag.request_metadata.c_metadata_array, + call_queue.c_completion_queue, server_queue.c_completion_queue, + operation_tag) + return result def register_completion_queue( self, CompletionQueue queue not None): if self.is_started: raise ValueError("cannot register completion queues after start") - grpc_server_register_completion_queue( - self.c_server, queue.c_completion_queue, NULL) + with nogil: + grpc_server_register_completion_queue( + self.c_server, queue.c_completion_queue, NULL) self.registered_completion_queues.append(queue) def start(self): @@ -82,7 +87,8 @@ cdef class Server: self.backup_shutdown_queue = CompletionQueue() self.register_completion_queue(self.backup_shutdown_queue) self.is_started = True - grpc_server_start(self.c_server) + with nogil: + grpc_server_start(self.c_server) # Ensure the core has gotten a chance to do the start-up work self.backup_shutdown_queue.pluck(None, Timespec(None)) @@ -95,21 +101,28 @@ cdef class Server: else: raise TypeError("expected address to be a str or bytes") self.references.append(address) + cdef int result + cdef char *address_c_string = address if server_credentials is not None: self.references.append(server_credentials) - return grpc_server_add_secure_http2_port( - self.c_server, address, server_credentials.c_credentials) + with nogil: + result = grpc_server_add_secure_http2_port( + self.c_server, address_c_string, server_credentials.c_credentials) else: - return grpc_server_add_insecure_http2_port(self.c_server, address) + with nogil: + result = grpc_server_add_insecure_http2_port(self.c_server, + address_c_string) + return result cdef _c_shutdown(self, CompletionQueue queue, tag): self.is_shutting_down = True operation_tag = OperationTag(tag) operation_tag.shutting_down_server = self cpython.Py_INCREF(operation_tag) - grpc_server_shutdown_and_notify( - self.c_server, queue.c_completion_queue, - operation_tag) + with nogil: + grpc_server_shutdown_and_notify( + self.c_server, queue.c_completion_queue, + operation_tag) def shutdown(self, CompletionQueue queue not None, tag): cdef OperationTag operation_tag @@ -134,7 +147,8 @@ cdef class Server: elif self.is_shutdown: return else: - grpc_server_cancel_all_calls(self.c_server) + with nogil: + grpc_server_cancel_all_calls(self.c_server) def __dealloc__(self): if self.c_server != NULL: @@ -153,5 +167,6 @@ cdef class Server: # much but repeatedly release the GIL and wait while not self.is_shutdown: time.sleep(0) - grpc_server_destroy(self.c_server) + with nogil: + grpc_server_destroy(self.c_server) diff --git a/src/python/grpcio/grpc/_cython/cygrpc.pyx b/src/python/grpcio/grpc/_cython/cygrpc.pyx index 30cc7a132b0..8a0f171ee75 100644 --- a/src/python/grpcio/grpc/_cython/cygrpc.pyx +++ b/src/python/grpcio/grpc/_cython/cygrpc.pyx @@ -57,14 +57,17 @@ cdef class _ModuleState: 'grpc._cython', '_windows/grpc_c.64.python') if not pygrpc_load_core(filename): raise ImportError('failed to load core gRPC library') - grpc_init() + with nogil: + grpc_init() self.is_loaded = True - grpc_set_ssl_roots_override_callback( - ssl_roots_override_callback) + with nogil: + grpc_set_ssl_roots_override_callback( + ssl_roots_override_callback) def __dealloc__(self): if self.is_loaded: - grpc_shutdown() + with nogil: + grpc_shutdown() _module_state = _ModuleState() diff --git a/src/python/grpcio/grpc/_cython/imports.generated.h b/src/python/grpcio/grpc/_cython/imports.generated.h index b70dcccd17a..4d18369e1f4 100644 --- a/src/python/grpcio/grpc/_cython/imports.generated.h +++ b/src/python/grpcio/grpc/_cython/imports.generated.h @@ -166,7 +166,7 @@ extern grpc_compression_algorithm_parse_type grpc_compression_algorithm_parse_im typedef int(*grpc_compression_algorithm_name_type)(grpc_compression_algorithm algorithm, char **name); extern grpc_compression_algorithm_name_type grpc_compression_algorithm_name_import; #define grpc_compression_algorithm_name grpc_compression_algorithm_name_import -typedef grpc_compression_algorithm(*grpc_compression_algorithm_for_level_type)(grpc_compression_level level); +typedef grpc_compression_algorithm(*grpc_compression_algorithm_for_level_type)(grpc_compression_level level, uint32_t accepted_encodings); extern grpc_compression_algorithm_for_level_type grpc_compression_algorithm_for_level_import; #define grpc_compression_algorithm_for_level grpc_compression_algorithm_for_level_import typedef void(*grpc_compression_options_init_type)(grpc_compression_options *opts); diff --git a/src/python/grpcio/grpc/_links/invocation.py b/src/python/grpcio/grpc/_links/invocation.py index 5ca0a0ee606..672e3e4cc86 100644 --- a/src/python/grpcio/grpc/_links/invocation.py +++ b/src/python/grpcio/grpc/_links/invocation.py @@ -1,4 +1,4 @@ -# Copyright 2015, Google Inc. +# Copyright 2015-2016, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -35,6 +35,8 @@ import logging import threading import time +import six + from grpc._adapter import _intermediary_low from grpc._links import _constants from grpc.beta import interfaces as beta_interfaces @@ -372,12 +374,11 @@ class _Kernel(object): pool.shutdown(wait=True) -class InvocationLink(links.Link, activated.Activated): +class InvocationLink(six.with_metaclass(abc.ABCMeta, links.Link, activated.Activated)): """A links.Link for use on the invocation-side of a gRPC connection. Implementations of this interface are only valid for use when activated. """ - __metaclass__ = abc.ABCMeta class _InvocationLink(InvocationLink): diff --git a/src/python/grpcio/grpc/_links/service.py b/src/python/grpcio/grpc/_links/service.py index 01edee68961..e0f26a5b0f9 100644 --- a/src/python/grpcio/grpc/_links/service.py +++ b/src/python/grpcio/grpc/_links/service.py @@ -1,4 +1,4 @@ -# Copyright 2015, Google Inc. +# Copyright 2015-2016, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -177,7 +177,7 @@ class _Kernel(object): call = service_acceptance.call call.accept(self._completion_queue, call) try: - group, method = service_acceptance.method.split('/')[1:3] + group, method = service_acceptance.method.split(b'/')[1:3] except ValueError: logging.info('Illegal path "%s"!', service_acceptance.method) return diff --git a/src/python/grpcio/grpc/beta/_server.py b/src/python/grpcio/grpc/beta/_server.py index 2b520cc7e5f..12d16e6c186 100644 --- a/src/python/grpcio/grpc/beta/_server.py +++ b/src/python/grpcio/grpc/beta/_server.py @@ -1,4 +1,4 @@ -# Copyright 2015, Google Inc. +# Copyright 2015-2016, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -62,7 +62,7 @@ class _GRPCServicer(base.Servicer): if e.code is None and e.details is None: raise base.NoSuchMethodError( interfaces.StatusCode.UNIMPLEMENTED, - b'Method "%s" of service "%s" not implemented!' % (method, group)) + 'Method "%s" of service "%s" not implemented!' % (method, group)) else: raise diff --git a/src/python/grpcio/grpc/beta/interfaces.py b/src/python/grpcio/grpc/beta/interfaces.py index 0663119163f..e29a5b33792 100644 --- a/src/python/grpcio/grpc/beta/interfaces.py +++ b/src/python/grpcio/grpc/beta/interfaces.py @@ -1,4 +1,4 @@ -# Copyright 2015, Google Inc. +# Copyright 2015-2016, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -32,6 +32,8 @@ import abc import enum +import six + from grpc._adapter import _types @@ -105,19 +107,17 @@ def grpc_call_options(disable_compression=False, credentials=None): return GRPCCallOptions(disable_compression, None, credentials) -class GRPCAuthMetadataContext(object): +class GRPCAuthMetadataContext(six.with_metaclass(abc.ABCMeta)): """Provides information to call credentials metadata plugins. Attributes: service_url: A string URL of the service being called into. method_name: A string of the fully qualified method name being called. """ - __metaclass__ = abc.ABCMeta -class GRPCAuthMetadataPluginCallback(object): +class GRPCAuthMetadataPluginCallback(six.with_metaclass(abc.ABCMeta)): """Callback object received by a metadata plugin.""" - __metaclass__ = abc.ABCMeta def __call__(self, metadata, error): """Inform the gRPC runtime of the metadata to construct a CallCredentials. @@ -130,10 +130,9 @@ class GRPCAuthMetadataPluginCallback(object): raise NotImplementedError() -class GRPCAuthMetadataPlugin(object): +class GRPCAuthMetadataPlugin(six.with_metaclass(abc.ABCMeta)): """ """ - __metaclass__ = abc.ABCMeta def __call__(self, context, callback): """Invoke the plugin. @@ -149,9 +148,8 @@ class GRPCAuthMetadataPlugin(object): raise NotImplementedError() -class GRPCServicerContext(object): +class GRPCServicerContext(six.with_metaclass(abc.ABCMeta)): """Exposes gRPC-specific options and behaviors to code servicing RPCs.""" - __metaclass__ = abc.ABCMeta @abc.abstractmethod def peer(self): @@ -168,9 +166,8 @@ class GRPCServicerContext(object): raise NotImplementedError() -class GRPCInvocationContext(object): +class GRPCInvocationContext(six.with_metaclass(abc.ABCMeta)): """Exposes gRPC-specific options and behaviors to code invoking RPCs.""" - __metaclass__ = abc.ABCMeta @abc.abstractmethod def disable_next_request_compression(self): @@ -178,9 +175,8 @@ class GRPCInvocationContext(object): raise NotImplementedError() -class Server(object): +class Server(six.with_metaclass(abc.ABCMeta)): """Services RPCs.""" - __metaclass__ = abc.ABCMeta @abc.abstractmethod def add_insecure_port(self, address): diff --git a/src/python/grpcio/grpc/framework/alpha/_face_utilities.py b/src/python/grpcio/grpc/framework/alpha/_face_utilities.py index fb0cfe426d0..b5e4133cade 100644 --- a/src/python/grpcio/grpc/framework/alpha/_face_utilities.py +++ b/src/python/grpcio/grpc/framework/alpha/_face_utilities.py @@ -1,4 +1,4 @@ -# Copyright 2015, Google Inc. +# Copyright 2015-2016, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -30,6 +30,8 @@ import abc import collections +import six + # face_interfaces is referenced from specification in this module. from grpc.framework.common import cardinality from grpc.framework.face import interfaces as face_interfaces # pylint: disable=unused-import @@ -45,7 +47,7 @@ def _qualified_name(service_name, method_name): # TODO(nathaniel): This structure is getting bloated; it could be shrunk if # implementations._Stub used a generic rather than a dynamic underlying # face-layer stub. -class InvocationBreakdown(object): +class InvocationBreakdown(six.with_metaclass(abc.ABCMeta)): """An intermediate representation of invocation-side views of RPC methods. Attributes: @@ -61,7 +63,6 @@ class InvocationBreakdown(object): to callable behavior to be used deserializing response values for the RPC. """ - __metaclass__ = abc.ABCMeta class _EasyInvocationBreakdown( @@ -73,7 +74,7 @@ class _EasyInvocationBreakdown( pass -class ServiceBreakdown(object): +class ServiceBreakdown(six.with_metaclass(abc.ABCMeta)): """An intermediate representation of service-side views of RPC methods. Attributes: @@ -84,7 +85,6 @@ class ServiceBreakdown(object): response_serializers: A dictionary from service-qualified RPC method name to callable behavior to be used serializing response values for the RPC. """ - __metaclass__ = abc.ABCMeta class _EasyServiceBreakdown( @@ -111,7 +111,7 @@ def break_down_invocation(service_name, method_descriptions): face_cardinalities = {} request_serializers = {} response_deserializers = {} - for name, method_description in method_descriptions.iteritems(): + for name, method_description in six.iteritems(method_descriptions): qualified_name = _qualified_name(service_name, name) method_cardinality = method_description.cardinality() cardinalities[name] = method_description.cardinality() @@ -139,7 +139,7 @@ def break_down_service(service_name, method_descriptions): implementations = {} request_deserializers = {} response_serializers = {} - for name, method_description in method_descriptions.iteritems(): + for name, method_description in six.iteritems(method_descriptions): qualified_name = _qualified_name(service_name, name) method_cardinality = method_description.cardinality() if method_cardinality is interfaces.Cardinality.UNARY_UNARY: diff --git a/src/python/grpcio/grpc/framework/alpha/_reexport.py b/src/python/grpcio/grpc/framework/alpha/_reexport.py index 198cb95ad5c..4ea0e94d805 100644 --- a/src/python/grpcio/grpc/framework/alpha/_reexport.py +++ b/src/python/grpcio/grpc/framework/alpha/_reexport.py @@ -1,4 +1,4 @@ -# Copyright 2015, Google Inc. +# Copyright 2015-2016, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -27,6 +27,8 @@ # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +import six + from grpc.framework.common import cardinality from grpc.framework.face import exceptions as face_exceptions from grpc.framework.face import interfaces as face_interfaces @@ -181,7 +183,7 @@ def common_cardinality(early_adopter_cardinality): def common_cardinalities(early_adopter_cardinalities): common_cardinalities = {} - for name, early_adopter_cardinality in early_adopter_cardinalities.iteritems(): + for name, early_adopter_cardinality in six.iteritems(early_adopter_cardinalities): common_cardinalities[name] = _EARLY_ADOPTER_CARDINALITY_TO_COMMON_CARDINALITY[ early_adopter_cardinality] return common_cardinalities diff --git a/src/python/grpcio/grpc/framework/alpha/exceptions.py b/src/python/grpcio/grpc/framework/alpha/exceptions.py index 5234d3b91ce..8ec260488e8 100644 --- a/src/python/grpcio/grpc/framework/alpha/exceptions.py +++ b/src/python/grpcio/grpc/framework/alpha/exceptions.py @@ -1,4 +1,4 @@ -# Copyright 2015, Google Inc. +# Copyright 2015-2016, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -31,13 +31,12 @@ Only GRPC should instantiate and raise these exceptions. """ - import abc +import six -class RpcError(Exception): +class RpcError(six.with_metaclass(abc.ABCMeta, Exception)): """Common super type for all exceptions raised by GRPC.""" - __metaclass__ = abc.ABCMeta class CancellationError(RpcError): diff --git a/src/python/grpcio/grpc/framework/alpha/interfaces.py b/src/python/grpcio/grpc/framework/alpha/interfaces.py index 8380567c972..cb6d58bb2ec 100644 --- a/src/python/grpcio/grpc/framework/alpha/interfaces.py +++ b/src/python/grpcio/grpc/framework/alpha/interfaces.py @@ -1,4 +1,4 @@ -# Copyright 2015, Google Inc. +# Copyright 2015-2016, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -32,6 +32,8 @@ import abc import enum +import six + # exceptions is referenced from specification in this module. from grpc.framework.alpha import exceptions # pylint: disable=unused-import from grpc.framework.foundation import activated @@ -59,15 +61,17 @@ class Abortion(enum.Enum): SERVICER_FAILURE = 'servicer failure' -class CancellableIterator(object): +class CancellableIterator(six.with_metaclass(abc.ABCMeta)): """Implements the Iterator protocol and affords a cancel method.""" - __metaclass__ = abc.ABCMeta @abc.abstractmethod def __iter__(self): """Returns the self object in accordance with the Iterator protocol.""" raise NotImplementedError() + def __next__(self): + return self.next() + @abc.abstractmethod def next(self): """Returns a value or raises StopIteration per the Iterator protocol.""" @@ -79,9 +83,8 @@ class CancellableIterator(object): raise NotImplementedError() -class RpcContext(object): +class RpcContext(six.with_metaclass(abc.ABCMeta)): """Provides RPC-related information and action.""" - __metaclass__ = abc.ABCMeta @abc.abstractmethod def is_active(self): @@ -108,7 +111,7 @@ class RpcContext(object): raise NotImplementedError() -class UnaryUnarySyncAsync(object): +class UnaryUnarySyncAsync(six.with_metaclass(abc.ABCMeta)): """Affords invoking a unary-unary RPC synchronously or asynchronously. Values implementing this interface are directly callable and present an "async" method. Both calls take a request value and a numeric timeout. @@ -117,7 +120,6 @@ class UnaryUnarySyncAsync(object): of a value of this type invokes its associated RPC and immediately returns a future.Future bound to the asynchronous execution of the RPC. """ - __metaclass__ = abc.ABCMeta @abc.abstractmethod def __call__(self, request, timeout): @@ -147,7 +149,7 @@ class UnaryUnarySyncAsync(object): raise NotImplementedError() -class StreamUnarySyncAsync(object): +class StreamUnarySyncAsync(six.with_metaclass(abc.ABCMeta)): """Affords invoking a stream-unary RPC synchronously or asynchronously. Values implementing this interface are directly callable and present an "async" method. Both calls take an iterator of request values and a numeric @@ -156,7 +158,6 @@ class StreamUnarySyncAsync(object): of a value of this type invokes its associated RPC and immediately returns a future.Future bound to the asynchronous execution of the RPC. """ - __metaclass__ = abc.ABCMeta @abc.abstractmethod def __call__(self, request_iterator, timeout): @@ -191,9 +192,8 @@ class StreamUnarySyncAsync(object): raise NotImplementedError() -class RpcMethodDescription(object): +class RpcMethodDescription(six.with_metaclass(abc.ABCMeta)): """A type for the common aspects of RPC method descriptions.""" - __metaclass__ = abc.ABCMeta @abc.abstractmethod def cardinality(self): @@ -207,9 +207,8 @@ class RpcMethodDescription(object): raise NotImplementedError() -class RpcMethodInvocationDescription(RpcMethodDescription): +class RpcMethodInvocationDescription(six.with_metaclass(abc.ABCMeta, RpcMethodDescription)): """Invocation-side description of an RPC method.""" - __metaclass__ = abc.ABCMeta @abc.abstractmethod def serialize_request(self, request): @@ -240,9 +239,8 @@ class RpcMethodInvocationDescription(RpcMethodDescription): raise NotImplementedError() -class RpcMethodServiceDescription(RpcMethodDescription): +class RpcMethodServiceDescription(six.with_metaclass(abc.ABCMeta, RpcMethodDescription)): """Service-side description of an RPC method.""" - __metaclass__ = abc.ABCMeta @abc.abstractmethod def deserialize_request(self, serialized_request): @@ -345,7 +343,7 @@ class RpcMethodServiceDescription(RpcMethodDescription): raise NotImplementedError() -class Stub(object): +class Stub(six.with_metaclass(abc.ABCMeta)): """A stub with callable RPC method names for attributes. Instances of this type are context managers and only afford RPC invocation @@ -369,12 +367,10 @@ class Stub(object): exceptions.RpcError, exceptions.CancellationError, and exceptions.ExpirationError. """ - __metaclass__ = abc.ABCMeta -class Server(activated.Activated): +class Server(six.with_metaclass(abc.ABCMeta, activated.Activated)): """A GRPC Server.""" - __metaclass__ = abc.ABCMeta @abc.abstractmethod def port(self): diff --git a/src/python/grpcio/grpc/framework/base/_ingestion.py b/src/python/grpcio/grpc/framework/base/_ingestion.py index 06d5b92f0b3..090cb158c94 100644 --- a/src/python/grpcio/grpc/framework/base/_ingestion.py +++ b/src/python/grpcio/grpc/framework/base/_ingestion.py @@ -1,4 +1,4 @@ -# Copyright 2015, Google Inc. +# Copyright 2015-2016, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -32,6 +32,8 @@ import abc import collections +import six + from grpc.framework.base import _constants from grpc.framework.base import _interfaces from grpc.framework.base import exceptions @@ -72,9 +74,8 @@ class _EmptyConsumer(stream.Consumer): """See stream.Consumer.consume_and_terminate for specification.""" -class _ConsumerCreator(object): +class _ConsumerCreator(six.with_metaclass(abc.ABCMeta)): """Common specification of different consumer-creating behavior.""" - __metaclass__ = abc.ABCMeta @abc.abstractmethod def create_consumer(self, requirement): diff --git a/src/python/grpcio/grpc/framework/base/_interfaces.py b/src/python/grpcio/grpc/framework/base/_interfaces.py index d88cf76590e..c0cc866cad4 100644 --- a/src/python/grpcio/grpc/framework/base/_interfaces.py +++ b/src/python/grpcio/grpc/framework/base/_interfaces.py @@ -1,4 +1,4 @@ -# Copyright 2015, Google Inc. +# Copyright 2015-2016, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -31,14 +31,15 @@ import abc +import six + # interfaces is referenced from specification in this module. from grpc.framework.base import interfaces # pylint: disable=unused-import from grpc.framework.foundation import stream -class TerminationManager(object): +class TerminationManager(six.with_metaclass(abc.ABCMeta)): """An object responsible for handling the termination of an operation.""" - __metaclass__ = abc.ABCMeta @abc.abstractmethod def set_expiration_manager(self, expiration_manager): @@ -91,9 +92,8 @@ class TerminationManager(object): raise NotImplementedError() -class TransmissionManager(object): +class TransmissionManager(six.with_metaclass(abc.ABCMeta)): """A manager responsible for transmitting to the other end of an operation.""" - __metaclass__ = abc.ABCMeta @abc.abstractmethod def inmit(self, emission, complete): @@ -117,9 +117,8 @@ class TransmissionManager(object): raise NotImplementedError() -class EmissionManager(stream.Consumer): +class EmissionManager(six.with_metaclass(abc.ABCMeta, stream.Consumer)): """A manager of values emitted by customer code.""" - __metaclass__ = abc.ABCMeta @abc.abstractmethod def set_ingestion_manager_and_expiration_manager( @@ -166,9 +165,8 @@ class EmissionManager(stream.Consumer): raise NotImplementedError() -class IngestionManager(stream.Consumer): +class IngestionManager(six.with_metaclass(abc.ABCMeta, stream.Consumer)): """A manager responsible for executing customer code.""" - __metaclass__ = abc.ABCMeta @abc.abstractmethod def set_expiration_manager(self, expiration_manager): @@ -214,9 +212,8 @@ class IngestionManager(stream.Consumer): raise NotImplementedError() -class ExpirationManager(object): +class ExpirationManager(six.with_metaclass(abc.ABCMeta)): """A manager responsible for aborting the operation if it runs out of time.""" - __metaclass__ = abc.ABCMeta @abc.abstractmethod def change_timeout(self, timeout): @@ -246,9 +243,8 @@ class ExpirationManager(object): raise NotImplementedError() -class ReceptionManager(object): +class ReceptionManager(six.with_metaclass(abc.ABCMeta)): """A manager responsible for receiving tickets from the other end.""" - __metaclass__ = abc.ABCMeta @abc.abstractmethod def receive_ticket(self, ticket): @@ -261,9 +257,8 @@ class ReceptionManager(object): raise NotImplementedError() -class CancellationManager(object): +class CancellationManager(six.with_metaclass(abc.ABCMeta)): """A manager of operation cancellation.""" - __metaclass__ = abc.ABCMeta @abc.abstractmethod def cancel(self): diff --git a/src/python/grpcio/grpc/framework/base/_reception.py b/src/python/grpcio/grpc/framework/base/_reception.py index dd428964f15..2bee3947f0a 100644 --- a/src/python/grpcio/grpc/framework/base/_reception.py +++ b/src/python/grpcio/grpc/framework/base/_reception.py @@ -1,4 +1,4 @@ -# Copyright 2015, Google Inc. +# Copyright 2015-2016, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -31,6 +31,8 @@ import abc +import six + from grpc.framework.base import interfaces from grpc.framework.base import _interfaces @@ -40,9 +42,8 @@ _INITIAL_FRONT_TO_BACK_TICKET_KINDS = ( ) -class _Receiver(object): +class _Receiver(six.with_metaclass(abc.ABCMeta)): """Common specification of different ticket-handling behavior.""" - __metaclass__ = abc.ABCMeta @abc.abstractmethod def abort_if_abortive(self, ticket): diff --git a/src/python/grpcio/grpc/framework/base/_transmission.py b/src/python/grpcio/grpc/framework/base/_transmission.py index 68451292344..398faaf3146 100644 --- a/src/python/grpcio/grpc/framework/base/_transmission.py +++ b/src/python/grpcio/grpc/framework/base/_transmission.py @@ -1,4 +1,4 @@ -# Copyright 2015, Google Inc. +# Copyright 2015-2016, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -31,6 +31,8 @@ import abc +import six + from grpc.framework.base import _constants from grpc.framework.base import _interfaces from grpc.framework.base import interfaces @@ -77,9 +79,8 @@ _ABORTION_OUTCOME_TO_BACK_TO_FRONT_TICKET_KIND = { } -class _Ticketizer(object): +class _Ticketizer(six.with_metaclass(abc.ABCMeta)): """Common specification of different ticket-creating behavior.""" - __metaclass__ = abc.ABCMeta @abc.abstractmethod def ticketize(self, operation_id, sequence_number, payload, complete): @@ -187,9 +188,8 @@ class _BackTicketizer(_Ticketizer): operation_id, sequence_number, kind, None) -class TransmissionManager(_interfaces.TransmissionManager): +class TransmissionManager(six.with_metaclass(abc.ABCMeta, _interfaces.TransmissionManager)): """A _interfaces.TransmissionManager on which other managers may be set.""" - __metaclass__ = abc.ABCMeta @abc.abstractmethod def set_ingestion_and_expiration_managers( diff --git a/src/python/grpcio/grpc/framework/base/interfaces.py b/src/python/grpcio/grpc/framework/base/interfaces.py index e22c10d9750..7c58a23ce05 100644 --- a/src/python/grpcio/grpc/framework/base/interfaces.py +++ b/src/python/grpcio/grpc/framework/base/interfaces.py @@ -1,4 +1,4 @@ -# Copyright 2015, Google Inc. +# Copyright 2015-2016, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -33,6 +33,8 @@ import abc import collections import enum +import six + # stream is referenced from specification in this module. from grpc.framework.foundation import stream # pylint: disable=unused-import @@ -50,13 +52,12 @@ class Outcome(enum.Enum): SERVICED_FAILURE = 'serviced failure' -class OperationContext(object): +class OperationContext(six.with_metaclass(abc.ABCMeta)): """Provides operation-related information and action. Attributes: trace_id: A uuid.UUID identifying a particular set of related operations. """ - __metaclass__ = abc.ABCMeta @abc.abstractmethod def is_active(self): @@ -93,9 +94,8 @@ class OperationContext(object): raise NotImplementedError() -class Servicer(object): +class Servicer(six.with_metaclass(abc.ABCMeta)): """Interface for service implementations.""" - __metaclass__ = abc.ABCMeta @abc.abstractmethod def service(self, name, context, output_consumer): @@ -120,7 +120,7 @@ class Servicer(object): raise NotImplementedError() -class Operation(object): +class Operation(six.with_metaclass(abc.ABCMeta)): """Representation of an in-progress operation. Attributes: @@ -129,7 +129,6 @@ class Operation(object): context: An OperationContext affording information and action about the operation. """ - __metaclass__ = abc.ABCMeta @abc.abstractmethod def cancel(self): @@ -137,9 +136,8 @@ class Operation(object): raise NotImplementedError() -class ServicedIngestor(object): +class ServicedIngestor(six.with_metaclass(abc.ABCMeta)): """Responsible for accepting the result of an operation.""" - __metaclass__ = abc.ABCMeta @abc.abstractmethod def consumer(self, operation_context): @@ -159,7 +157,7 @@ class ServicedIngestor(object): raise NotImplementedError() -class ServicedSubscription(object): +class ServicedSubscription(six.with_metaclass(abc.ABCMeta)): """A sum type representing a serviced's interest in an operation. Attributes: @@ -167,7 +165,6 @@ class ServicedSubscription(object): ingestor: A ServicedIngestor. Must be present if kind is Kind.FULL. Must be None if kind is Kind.TERMINATION_ONLY or Kind.NONE. """ - __metaclass__ = abc.ABCMeta @enum.unique class Kind(enum.Enum): @@ -178,9 +175,8 @@ class ServicedSubscription(object): NONE = 'none' -class End(object): +class End(six.with_metaclass(abc.ABCMeta)): """Common type for entry-point objects on both sides of an operation.""" - __metaclass__ = abc.ABCMeta @abc.abstractmethod def operation_stats(self): @@ -202,9 +198,8 @@ class End(object): raise NotImplementedError() -class Front(End): +class Front(six.with_metaclass(abc.ABCMeta, End)): """Clientish objects that afford the invocation of operations.""" - __metaclass__ = abc.ABCMeta @abc.abstractmethod def operate( @@ -228,9 +223,8 @@ class Front(End): raise NotImplementedError() -class Back(End): +class Back(six.with_metaclass(abc.ABCMeta, End)): """Serverish objects that perform the work of operations.""" - __metaclass__ = abc.ABCMeta class FrontToBackTicket( @@ -315,9 +309,8 @@ class BackToFrontTicket( TRANSMISSION_FAILURE = 'transmission failure' -class ForeLink(object): +class ForeLink(six.with_metaclass(abc.ABCMeta)): """Accepts back-to-front tickets and emits front-to-back tickets.""" - __metaclass__ = abc.ABCMeta @abc.abstractmethod def accept_back_to_front_ticket(self, ticket): @@ -334,9 +327,8 @@ class ForeLink(object): raise NotImplementedError() -class RearLink(object): +class RearLink(six.with_metaclass(abc.ABCMeta)): """Accepts front-to-back tickets and emits back-to-front tickets.""" - __metaclass__ = abc.ABCMeta @abc.abstractmethod def accept_front_to_back_ticket(self, ticket): @@ -353,11 +345,9 @@ class RearLink(object): raise NotImplementedError() -class FrontLink(Front, ForeLink): +class FrontLink(six.with_metaclass(abc.ABCMeta, Front, ForeLink)): """Clientish objects that operate by sending and receiving tickets.""" - __metaclass__ = abc.ABCMeta -class BackLink(Back, RearLink): +class BackLink(six.with_metaclass(abc.ABCMeta, Back, RearLink)): """Serverish objects that operate by sending and receiving tickets.""" - __metaclass__ = abc.ABCMeta diff --git a/src/python/grpcio/grpc/framework/core/_end.py b/src/python/grpcio/grpc/framework/core/_end.py index 9c615672aa7..dc2f48589ad 100644 --- a/src/python/grpcio/grpc/framework/core/_end.py +++ b/src/python/grpcio/grpc/framework/core/_end.py @@ -1,4 +1,4 @@ -# Copyright 2015, Google Inc. +# Copyright 2015-2016, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -33,6 +33,8 @@ import abc import threading import uuid +import six + from grpc.framework.core import _operation from grpc.framework.core import _utilities from grpc.framework.foundation import callable_util @@ -45,7 +47,7 @@ from grpc.framework.interfaces.links import utilities _IDLE_ACTION_EXCEPTION_LOG_MESSAGE = 'Exception calling idle action!' -class End(base.End, links.Link): +class End(six.with_metaclass(abc.ABCMeta, base.End, links.Link)): """A bridge between base.End and links.Link. Implementations of this interface translate arriving tickets into @@ -53,7 +55,6 @@ class End(base.End, links.Link): translate calls from application objects implementing base interfaces into tickets sent to a joined link. """ - __metaclass__ = abc.ABCMeta class _Cycle(object): diff --git a/src/python/grpcio/grpc/framework/core/_ingestion.py b/src/python/grpcio/grpc/framework/core/_ingestion.py index 4129a8ce43e..1e1fd73ce43 100644 --- a/src/python/grpcio/grpc/framework/core/_ingestion.py +++ b/src/python/grpcio/grpc/framework/core/_ingestion.py @@ -1,4 +1,4 @@ -# Copyright 2015, Google Inc. +# Copyright 2015-2016, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -33,6 +33,8 @@ import abc import collections import enum +import six + from grpc.framework.core import _constants from grpc.framework.core import _interfaces from grpc.framework.core import _utilities @@ -70,9 +72,8 @@ class _SubscriptionCreation( ABANDONED = 'abandoned' -class _SubscriptionCreator(object): +class _SubscriptionCreator(six.with_metaclass(abc.ABCMeta)): """Common specification of subscription-creating behavior.""" - __metaclass__ = abc.ABCMeta @abc.abstractmethod def create(self, group, method): diff --git a/src/python/grpcio/grpc/framework/core/_interfaces.py b/src/python/grpcio/grpc/framework/core/_interfaces.py index ffa686b2b79..985e5e8550a 100644 --- a/src/python/grpcio/grpc/framework/core/_interfaces.py +++ b/src/python/grpcio/grpc/framework/core/_interfaces.py @@ -1,4 +1,4 @@ -# Copyright 2015, Google Inc. +# Copyright 2015-2016, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -31,17 +31,18 @@ import abc +import six + from grpc.framework.interfaces.base import base -class TerminationManager(object): +class TerminationManager(six.with_metaclass(abc.ABCMeta)): """An object responsible for handling the termination of an operation. Attributes: outcome: None if the operation is active or a base.Outcome value if it has terminated. """ - __metaclass__ = abc.ABCMeta @abc.abstractmethod def add_callback(self, callback): @@ -105,9 +106,8 @@ class TerminationManager(object): raise NotImplementedError() -class TransmissionManager(object): +class TransmissionManager(six.with_metaclass(abc.ABCMeta)): """A manager responsible for transmitting to the other end of an operation.""" - __metaclass__ = abc.ABCMeta @abc.abstractmethod def kick_off( @@ -171,9 +171,8 @@ class TransmissionManager(object): raise NotImplementedError() -class ExpirationManager(object): +class ExpirationManager(six.with_metaclass(abc.ABCMeta)): """A manager responsible for aborting the operation if it runs out of time.""" - __metaclass__ = abc.ABCMeta @abc.abstractmethod def change_timeout(self, timeout): @@ -203,9 +202,8 @@ class ExpirationManager(object): raise NotImplementedError() -class ProtocolManager(object): +class ProtocolManager(six.with_metaclass(abc.ABCMeta)): """A manager of protocol-specific values passing through an operation.""" - __metaclass__ = abc.ABCMeta @abc.abstractmethod def set_protocol_receiver(self, protocol_receiver): @@ -228,9 +226,8 @@ class ProtocolManager(object): raise NotImplementedError() -class EmissionManager(base.Operator): +class EmissionManager(six.with_metaclass(abc.ABCMeta, base.Operator)): """A manager of values emitted by customer code.""" - __metaclass__ = abc.ABCMeta @abc.abstractmethod def advance( @@ -254,14 +251,13 @@ class EmissionManager(base.Operator): raise NotImplementedError() -class IngestionManager(object): +class IngestionManager(six.with_metaclass(abc.ABCMeta)): """A manager responsible for executing customer code. This name of this manager comes from its responsibility to pass successive values from the other side of the operation into the code of the local customer. """ - __metaclass__ = abc.ABCMeta @abc.abstractmethod def set_group_and_method(self, group, method): @@ -294,9 +290,8 @@ class IngestionManager(object): raise NotImplementedError() -class ReceptionManager(object): +class ReceptionManager(six.with_metaclass(abc.ABCMeta)): """A manager responsible for receiving tickets from the other end.""" - __metaclass__ = abc.ABCMeta @abc.abstractmethod def receive_ticket(self, ticket): @@ -308,7 +303,7 @@ class ReceptionManager(object): raise NotImplementedError() -class Operation(object): +class Operation(six.with_metaclass(abc.ABCMeta)): """An ongoing operation. Attributes: @@ -316,7 +311,6 @@ class Operation(object): operator: A base.Operator object for the operation for use by the customer of the operation. """ - __metaclass__ = abc.ABCMeta @abc.abstractmethod def handle_ticket(self, ticket): diff --git a/src/python/grpcio/grpc/framework/core/_termination.py b/src/python/grpcio/grpc/framework/core/_termination.py index 364158b2b87..e8c4ec60a32 100644 --- a/src/python/grpcio/grpc/framework/core/_termination.py +++ b/src/python/grpcio/grpc/framework/core/_termination.py @@ -31,6 +31,8 @@ import abc +import six + from grpc.framework.core import _constants from grpc.framework.core import _interfaces from grpc.framework.core import _utilities @@ -50,9 +52,8 @@ def _service_completion_predicate( return transmission_complete and ingestion_complete -class TerminationManager(_interfaces.TerminationManager): +class TerminationManager(six.with_metaclass(abc.ABCMeta, _interfaces.TerminationManager)): """A _interfaces.TransmissionManager on which another manager may be set.""" - __metaclass__ = abc.ABCMeta @abc.abstractmethod def set_expiration_manager(self, expiration_manager): diff --git a/src/python/grpcio/grpc/framework/crust/_control.py b/src/python/grpcio/grpc/framework/crust/_control.py index 5e9efdf7322..c27fc9106d5 100644 --- a/src/python/grpcio/grpc/framework/crust/_control.py +++ b/src/python/grpcio/grpc/framework/crust/_control.py @@ -1,4 +1,4 @@ -# Copyright 2015, Google Inc. +# Copyright 2015-2016, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -405,6 +405,9 @@ class Rendezvous(base.Operator, future.Future, stream.Consumer, face.Call): def __iter__(self): return self + def __next__(self): + return self.next() + def next(self): with self._condition: while True: diff --git a/src/python/grpcio/grpc/framework/crust/implementations.py b/src/python/grpcio/grpc/framework/crust/implementations.py index 4ebc4e9ae85..d0ecafcaf68 100644 --- a/src/python/grpcio/grpc/framework/crust/implementations.py +++ b/src/python/grpcio/grpc/framework/crust/implementations.py @@ -1,4 +1,4 @@ -# Copyright 2015, Google Inc. +# Copyright 2015-2016, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -29,6 +29,8 @@ """Entry points into the Crust layer of RPC Framework.""" +import six + from grpc.framework.common import cardinality from grpc.framework.common import style from grpc.framework.crust import _calls @@ -271,7 +273,7 @@ class _DynamicStub(face.DynamicStub): def _adapt_method_implementations(method_implementations, pool): adapted_implementations = {} - for name, method_implementation in method_implementations.iteritems(): + for name, method_implementation in six.iteritems(method_implementations): if method_implementation.style is style.Service.INLINE: if method_implementation.cardinality is cardinality.Cardinality.UNARY_UNARY: adapted_implementations[name] = _service.adapt_inline_unary_unary( diff --git a/src/python/grpcio/grpc/framework/face/_control.py b/src/python/grpcio/grpc/framework/face/_control.py index e918907b749..ec43203a25e 100644 --- a/src/python/grpcio/grpc/framework/face/_control.py +++ b/src/python/grpcio/grpc/framework/face/_control.py @@ -1,4 +1,4 @@ -# Copyright 2015, Google Inc. +# Copyright 2015-2016, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -120,6 +120,9 @@ class Rendezvous(stream.Consumer): def __iter__(self): return self + def __next__(self): + return self.next() + def next(self): with self._condition: while ((self._abortion is None) and diff --git a/src/python/grpcio/grpc/framework/face/exceptions.py b/src/python/grpcio/grpc/framework/face/exceptions.py index f112df70bc6..c272ac75ab9 100644 --- a/src/python/grpcio/grpc/framework/face/exceptions.py +++ b/src/python/grpcio/grpc/framework/face/exceptions.py @@ -1,4 +1,4 @@ -# Copyright 2015, Google Inc. +# Copyright 2015-2016, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -31,6 +31,8 @@ import abc +import six + class NoSuchMethodError(Exception): """Raised by customer code to indicate an unrecognized RPC method name. @@ -49,12 +51,11 @@ class NoSuchMethodError(Exception): self.name = name -class RpcError(Exception): +class RpcError(six.with_metaclass(abc.ABCMeta, Exception)): """Common super type for all exceptions raised by the Face layer. Only RPC Framework should instantiate and raise these exceptions. """ - __metaclass__ = abc.ABCMeta class CancellationError(RpcError): diff --git a/src/python/grpcio/grpc/framework/face/implementations.py b/src/python/grpcio/grpc/framework/face/implementations.py index 4a6de52974e..9c75a5faf4b 100644 --- a/src/python/grpcio/grpc/framework/face/implementations.py +++ b/src/python/grpcio/grpc/framework/face/implementations.py @@ -1,4 +1,4 @@ -# Copyright 2015, Google Inc. +# Copyright 2015-2016, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -29,6 +29,8 @@ """Entry points into the Face layer of RPC Framework.""" +import six + from grpc.framework.common import cardinality from grpc.framework.common import style from grpc.framework.base import exceptions as _base_exceptions @@ -228,7 +230,7 @@ class _DynamicStub(interfaces.DynamicStub): def _adapt_method_implementations(method_implementations, pool): adapted_implementations = {} - for name, method_implementation in method_implementations.iteritems(): + for name, method_implementation in six.iteritems(method_implementations): if method_implementation.style is style.Service.INLINE: if method_implementation.cardinality is cardinality.Cardinality.UNARY_UNARY: adapted_implementations[name] = _service.adapt_inline_value_in_value_out( diff --git a/src/python/grpcio/grpc/framework/face/interfaces.py b/src/python/grpcio/grpc/framework/face/interfaces.py index b7cc4c1169a..9fc18d73bc4 100644 --- a/src/python/grpcio/grpc/framework/face/interfaces.py +++ b/src/python/grpcio/grpc/framework/face/interfaces.py @@ -1,4 +1,4 @@ -# Copyright 2015, Google Inc. +# Copyright 2015-2016, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -32,6 +32,8 @@ import abc import enum +import six + # cardinality, style, exceptions, abandonment, future, and stream are # referenced from specification in this module. from grpc.framework.common import cardinality # pylint: disable=unused-import @@ -52,15 +54,17 @@ class Abortion(enum.Enum): SERVICER_FAILURE = 'servicer failure' -class CancellableIterator(object): +class CancellableIterator(six.with_metaclass(abc.ABCMeta)): """Implements the Iterator protocol and affords a cancel method.""" - __metaclass__ = abc.ABCMeta @abc.abstractmethod def __iter__(self): """Returns the self object in accordance with the Iterator protocol.""" raise NotImplementedError() + def __next__(self): + return self.next() + @abc.abstractmethod def next(self): """Returns a value or raises StopIteration per the Iterator protocol.""" @@ -72,9 +76,8 @@ class CancellableIterator(object): raise NotImplementedError() -class RpcContext(object): +class RpcContext(six.with_metaclass(abc.ABCMeta)): """Provides RPC-related information and action.""" - __metaclass__ = abc.ABCMeta @abc.abstractmethod def is_active(self): @@ -103,13 +106,12 @@ class RpcContext(object): raise NotImplementedError() -class Call(object): +class Call(six.with_metaclass(abc.ABCMeta)): """Invocation-side representation of an RPC. Attributes: context: An RpcContext affording information about the RPC. """ - __metaclass__ = abc.ABCMeta @abc.abstractmethod def cancel(self): @@ -117,9 +119,8 @@ class Call(object): raise NotImplementedError() -class UnaryUnaryMultiCallable(object): +class UnaryUnaryMultiCallable(six.with_metaclass(abc.ABCMeta)): """Affords invoking a unary-unary RPC in any call style.""" - __metaclass__ = abc.ABCMeta @abc.abstractmethod def __call__(self, request, timeout): @@ -171,9 +172,8 @@ class UnaryUnaryMultiCallable(object): raise NotImplementedError() -class UnaryStreamMultiCallable(object): +class UnaryStreamMultiCallable(six.with_metaclass(abc.ABCMeta)): """Affords invoking a unary-stream RPC in any call style.""" - __metaclass__ = abc.ABCMeta @abc.abstractmethod def __call__(self, request, timeout): @@ -209,9 +209,8 @@ class UnaryStreamMultiCallable(object): raise NotImplementedError() -class StreamUnaryMultiCallable(object): +class StreamUnaryMultiCallable(six.with_metaclass(abc.ABCMeta)): """Affords invoking a stream-unary RPC in any call style.""" - __metaclass__ = abc.ABCMeta @abc.abstractmethod def __call__(self, request_iterator, timeout): @@ -264,9 +263,8 @@ class StreamUnaryMultiCallable(object): raise NotImplementedError() -class StreamStreamMultiCallable(object): +class StreamStreamMultiCallable(six.with_metaclass(abc.ABCMeta)): """Affords invoking a stream-stream RPC in any call style.""" - __metaclass__ = abc.ABCMeta @abc.abstractmethod def __call__(self, request_iterator, timeout): @@ -302,7 +300,7 @@ l Args: raise NotImplementedError() -class MethodImplementation(object): +class MethodImplementation(six.with_metaclass(abc.ABCMeta)): """A sum type that describes an RPC method implementation. Attributes: @@ -347,12 +345,10 @@ class MethodImplementation(object): is cardinality.Cardinality.STREAM_STREAM and style is style.Service.EVENT. """ - __metaclass__ = abc.ABCMeta -class MultiMethodImplementation(object): +class MultiMethodImplementation(six.with_metaclass(abc.ABCMeta)): """A general type able to service many RPC methods.""" - __metaclass__ = abc.ABCMeta @abc.abstractmethod def service(self, name, response_consumer, context): @@ -381,9 +377,8 @@ class MultiMethodImplementation(object): raise NotImplementedError() -class GenericStub(object): +class GenericStub(six.with_metaclass(abc.ABCMeta)): """Affords RPC methods to callers.""" - __metaclass__ = abc.ABCMeta @abc.abstractmethod def blocking_value_in_value_out(self, name, request, timeout): @@ -622,7 +617,7 @@ class GenericStub(object): raise NotImplementedError() -class DynamicStub(object): +class DynamicStub(six.with_metaclass(abc.ABCMeta)): """A stub with RPC-method-bound multi-callable attributes. Instances of this type responsd to attribute access as follows: if the @@ -637,4 +632,3 @@ class DynamicStub(object): the attribute will be a StreamStreamMultiCallable with which to invoke the RPC method. """ - __metaclass__ = abc.ABCMeta diff --git a/src/python/grpcio/grpc/framework/foundation/activated.py b/src/python/grpcio/grpc/framework/foundation/activated.py index 426a71c7059..9b49b6363c1 100644 --- a/src/python/grpcio/grpc/framework/foundation/activated.py +++ b/src/python/grpcio/grpc/framework/foundation/activated.py @@ -1,4 +1,4 @@ -# Copyright 2015, Google Inc. +# Copyright 2015-2016, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -31,14 +31,14 @@ import abc +import six -class Activated(object): +class Activated(six.with_metaclass(abc.ABCMeta)): """Interface for objects that may be started and stopped. Values implementing this type must also implement the context manager protocol. """ - __metaclass__ = abc.ABCMeta @abc.abstractmethod def __enter__(self): diff --git a/src/python/grpcio/grpc/framework/foundation/callable_util.py b/src/python/grpcio/grpc/framework/foundation/callable_util.py index 32b0751a01c..e0a4cab7381 100644 --- a/src/python/grpcio/grpc/framework/foundation/callable_util.py +++ b/src/python/grpcio/grpc/framework/foundation/callable_util.py @@ -1,4 +1,4 @@ -# Copyright 2015, Google Inc. +# Copyright 2015-2016, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -35,8 +35,10 @@ import enum import functools import logging +import six -class Outcome(object): + +class Outcome(six.with_metaclass(abc.ABCMeta)): """A sum type describing the outcome of some call. Attributes: @@ -47,7 +49,6 @@ class Outcome(object): exception: The exception raised by the call. Must be present if kind is Kind.RAISED. """ - __metaclass__ = abc.ABCMeta @enum.unique class Kind(enum.Enum): diff --git a/src/python/grpcio/grpc/framework/foundation/future.py b/src/python/grpcio/grpc/framework/foundation/future.py index bfc16fc1eaa..bb8ee3ad871 100644 --- a/src/python/grpcio/grpc/framework/foundation/future.py +++ b/src/python/grpcio/grpc/framework/foundation/future.py @@ -1,4 +1,4 @@ -# Copyright 2015, Google Inc. +# Copyright 2015-2016, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -49,6 +49,8 @@ built-in-but-only-in-3.3-and-later TimeoutError. import abc +import six + class TimeoutError(Exception): """Indicates that a particular call timed out.""" @@ -58,13 +60,12 @@ class CancelledError(Exception): """Indicates that the computation underlying a Future was cancelled.""" -class Future(object): +class Future(six.with_metaclass(abc.ABCMeta)): """A representation of a computation in another control flow. Computations represented by a Future may be yet to be begun, may be ongoing, or may have already completed. """ - __metaclass__ = abc.ABCMeta # NOTE(nathaniel): This isn't the return type that I would want to have if it # were up to me. Were this interface being written from scratch, the return diff --git a/src/python/grpcio/grpc/framework/foundation/relay.py b/src/python/grpcio/grpc/framework/foundation/relay.py index 9c239465520..ff4e2275aef 100644 --- a/src/python/grpcio/grpc/framework/foundation/relay.py +++ b/src/python/grpcio/grpc/framework/foundation/relay.py @@ -1,4 +1,4 @@ -# Copyright 2015, Google Inc. +# Copyright 2015-2016, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -46,7 +46,6 @@ class Relay(object): would be no reason to use an implementation of this interface instead of a thread pool. """ - __metaclass__ = abc.ABCMeta @abc.abstractmethod def add_value(self, value): diff --git a/src/python/grpcio/grpc/framework/foundation/stream.py b/src/python/grpcio/grpc/framework/foundation/stream.py index 75c0cf145b4..32a2e52aed9 100644 --- a/src/python/grpcio/grpc/framework/foundation/stream.py +++ b/src/python/grpcio/grpc/framework/foundation/stream.py @@ -1,4 +1,4 @@ -# Copyright 2015, Google Inc. +# Copyright 2015-2016, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -31,10 +31,10 @@ import abc +import six -class Consumer(object): +class Consumer(six.with_metaclass(abc.ABCMeta)): """Interface for consumers of finite streams of values or objects.""" - __metaclass__ = abc.ABCMeta @abc.abstractmethod def consume(self, value): diff --git a/src/python/grpcio/grpc/framework/foundation/stream_util.py b/src/python/grpcio/grpc/framework/foundation/stream_util.py index 2210e4efcf0..7d5977fbbda 100644 --- a/src/python/grpcio/grpc/framework/foundation/stream_util.py +++ b/src/python/grpcio/grpc/framework/foundation/stream_util.py @@ -1,4 +1,4 @@ -# Copyright 2015, Google Inc. +# Copyright 2015-2016, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -83,6 +83,9 @@ class IterableConsumer(stream.Consumer): def __iter__(self): return self + def __next__(self): + return self.next() + def next(self): with self._condition: while self._active and not self._values: diff --git a/src/python/grpcio/grpc/framework/interfaces/base/base.py b/src/python/grpcio/grpc/framework/interfaces/base/base.py index a1e70be5e8d..69be37e7abf 100644 --- a/src/python/grpcio/grpc/framework/interfaces/base/base.py +++ b/src/python/grpcio/grpc/framework/interfaces/base/base.py @@ -1,4 +1,4 @@ -# Copyright 2015, Google Inc. +# Copyright 2015-2016, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -42,6 +42,8 @@ import abc import enum import threading # pylint: disable=unused-import +import six + # abandonment is referenced from specification in this module. from grpc.framework.foundation import abandonment # pylint: disable=unused-import @@ -95,7 +97,7 @@ class Outcome(object): REMOTE_FAILURE = 'remote failure' -class Completion(object): +class Completion(six.with_metaclass(abc.ABCMeta)): """An aggregate of the values exchanged upon operation completion. Attributes: @@ -103,12 +105,10 @@ class Completion(object): code: A code value for the operation. message: A message value for the operation. """ - __metaclass__ = abc.ABCMeta -class OperationContext(object): +class OperationContext(six.with_metaclass(abc.ABCMeta)): """Provides operation-related information and action.""" - __metaclass__ = abc.ABCMeta @abc.abstractmethod def outcome(self): @@ -162,9 +162,8 @@ class OperationContext(object): raise NotImplementedError() -class Operator(object): +class Operator(six.with_metaclass(abc.ABCMeta)): """An interface through which to participate in an operation.""" - __metaclass__ = abc.ABCMeta @abc.abstractmethod def advance( @@ -184,9 +183,8 @@ class Operator(object): """ raise NotImplementedError() -class ProtocolReceiver(object): +class ProtocolReceiver(six.with_metaclass(abc.ABCMeta)): """A means of receiving protocol values during an operation.""" - __metaclass__ = abc.ABCMeta @abc.abstractmethod def context(self, protocol_context): @@ -198,7 +196,7 @@ class ProtocolReceiver(object): raise NotImplementedError() -class Subscription(object): +class Subscription(six.with_metaclass(abc.ABCMeta)): """Describes customer code's interest in values from the other side. Attributes: @@ -216,7 +214,6 @@ class Subscription(object): become available during the operation. Must be non-None if kind is Kind.FULL. """ - __metaclass__ = abc.ABCMeta @enum.unique class Kind(enum.Enum): @@ -226,9 +223,8 @@ class Subscription(object): FULL = 'full' -class Servicer(object): +class Servicer(six.with_metaclass(abc.ABCMeta)): """Interface for service implementations.""" - __metaclass__ = abc.ABCMeta @abc.abstractmethod def service(self, group, method, context, output_operator): @@ -255,9 +251,8 @@ class Servicer(object): raise NotImplementedError() -class End(object): +class End(six.with_metaclass(abc.ABCMeta)): """Common type for entry-point objects on both sides of an operation.""" - __metaclass__ = abc.ABCMeta @abc.abstractmethod def start(self): diff --git a/src/python/grpcio/grpc/framework/interfaces/face/face.py b/src/python/grpcio/grpc/framework/interfaces/face/face.py index 404c3a7937a..b994acecac6 100644 --- a/src/python/grpcio/grpc/framework/interfaces/face/face.py +++ b/src/python/grpcio/grpc/framework/interfaces/face/face.py @@ -33,6 +33,8 @@ import abc import collections import enum +import six + # cardinality, style, abandonment, future, and stream are # referenced from specification in this module. from grpc.framework.common import cardinality # pylint: disable=unused-import @@ -96,7 +98,7 @@ class Abortion( REMOTE_FAILURE = 'remote failure' -class AbortionError(Exception): +class AbortionError(six.with_metaclass(abc.ABCMeta, Exception)): """Common super type for exceptions indicating RPC abortion. initial_metadata: The initial metadata from the other side of the RPC or @@ -108,7 +110,6 @@ class AbortionError(Exception): details: The details value from the other side of the RPC or None if no details value was received. """ - __metaclass__ = abc.ABCMeta def __init__(self, initial_metadata, terminal_metadata, code, details): super(AbortionError, self).__init__() @@ -150,9 +151,8 @@ class RemoteError(AbortionError): """Indicates that an RPC has terminated due to a remote defect.""" -class RpcContext(object): +class RpcContext(six.with_metaclass(abc.ABCMeta)): """Provides RPC-related information and action.""" - __metaclass__ = abc.ABCMeta @abc.abstractmethod def is_active(self): @@ -199,9 +199,8 @@ class RpcContext(object): raise NotImplementedError() -class Call(RpcContext): +class Call(six.with_metaclass(abc.ABCMeta, RpcContext)): """Invocation-side utility object for an RPC.""" - __metaclass__ = abc.ABCMeta @abc.abstractmethod def initial_metadata(self): @@ -256,9 +255,8 @@ class Call(RpcContext): raise NotImplementedError() -class ServicerContext(RpcContext): +class ServicerContext(six.with_metaclass(abc.ABCMeta, RpcContext)): """A context object passed to method implementations.""" - __metaclass__ = abc.ABCMeta @abc.abstractmethod def invocation_metadata(self): @@ -326,9 +324,8 @@ class ServicerContext(RpcContext): raise NotImplementedError() -class ResponseReceiver(object): +class ResponseReceiver(six.with_metaclass(abc.ABCMeta)): """Invocation-side object used to accept the output of an RPC.""" - __metaclass__ = abc.ABCMeta @abc.abstractmethod def initial_metadata(self, initial_metadata): @@ -362,9 +359,8 @@ class ResponseReceiver(object): raise NotImplementedError() -class UnaryUnaryMultiCallable(object): +class UnaryUnaryMultiCallable(six.with_metaclass(abc.ABCMeta)): """Affords invoking a unary-unary RPC in any call style.""" - __metaclass__ = abc.ABCMeta @abc.abstractmethod def __call__( @@ -434,9 +430,8 @@ class UnaryUnaryMultiCallable(object): raise NotImplementedError() -class UnaryStreamMultiCallable(object): +class UnaryStreamMultiCallable(six.with_metaclass(abc.ABCMeta)): """Affords invoking a unary-stream RPC in any call style.""" - __metaclass__ = abc.ABCMeta @abc.abstractmethod def __call__(self, request, timeout, metadata=None, protocol_options=None): @@ -480,9 +475,8 @@ class UnaryStreamMultiCallable(object): raise NotImplementedError() -class StreamUnaryMultiCallable(object): +class StreamUnaryMultiCallable(six.with_metaclass(abc.ABCMeta)): """Affords invoking a stream-unary RPC in any call style.""" - __metaclass__ = abc.ABCMeta @abc.abstractmethod def __call__( @@ -553,9 +547,8 @@ class StreamUnaryMultiCallable(object): raise NotImplementedError() -class StreamStreamMultiCallable(object): +class StreamStreamMultiCallable(six.with_metaclass(abc.ABCMeta)): """Affords invoking a stream-stream RPC in any call style.""" - __metaclass__ = abc.ABCMeta @abc.abstractmethod def __call__( @@ -600,7 +593,7 @@ class StreamStreamMultiCallable(object): raise NotImplementedError() -class MethodImplementation(object): +class MethodImplementation(six.with_metaclass(abc.ABCMeta)): """A sum type that describes a method implementation. Attributes: @@ -643,12 +636,10 @@ class MethodImplementation(object): is cardinality.Cardinality.STREAM_STREAM and style is style.Service.EVENT. """ - __metaclass__ = abc.ABCMeta -class MultiMethodImplementation(object): +class MultiMethodImplementation(six.with_metaclass(abc.ABCMeta)): """A general type able to service many methods.""" - __metaclass__ = abc.ABCMeta @abc.abstractmethod def service(self, group, method, response_consumer, context): @@ -678,9 +669,8 @@ class MultiMethodImplementation(object): raise NotImplementedError() -class GenericStub(object): +class GenericStub(six.with_metaclass(abc.ABCMeta)): """Affords RPC invocation via generic methods.""" - __metaclass__ = abc.ABCMeta @abc.abstractmethod def blocking_unary_unary( @@ -977,7 +967,7 @@ class GenericStub(object): raise NotImplementedError() -class DynamicStub(object): +class DynamicStub(six.with_metaclass(abc.ABCMeta)): """Affords RPC invocation via attributes corresponding to afforded methods. Instances of this type may be scoped to a single group so that attribute @@ -993,4 +983,3 @@ class DynamicStub(object): if the requested attribute is the name of a stream-stream method, the value of the attribute will be a StreamStreamMultiCallable with which to invoke an RPC. """ - __metaclass__ = abc.ABCMeta diff --git a/src/python/grpcio/grpc/framework/interfaces/links/links.py b/src/python/grpcio/grpc/framework/interfaces/links/links.py index 24f0e3b3545..808167935fb 100644 --- a/src/python/grpcio/grpc/framework/interfaces/links/links.py +++ b/src/python/grpcio/grpc/framework/interfaces/links/links.py @@ -1,4 +1,4 @@ -# Copyright 2015, Google Inc. +# Copyright 2015-2016, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -33,6 +33,8 @@ import abc import collections import enum +import six + class Protocol(collections.namedtuple('Protocol', ('kind', 'value',))): """A sum type for handles to a system that transmits tickets. @@ -123,9 +125,8 @@ class Ticket( REMOTE_FAILURE = 'remote failure' -class Link(object): +class Link(six.with_metaclass(abc.ABCMeta)): """Accepts and emits tickets.""" - __metaclass__ = abc.ABCMeta @abc.abstractmethod def accept_ticket(self, ticket): diff --git a/src/python/grpcio/grpc_core_dependencies.py b/src/python/grpcio/grpc_core_dependencies.py index a543791f5ce..3c57ad71daa 100644 --- a/src/python/grpcio/grpc_core_dependencies.py +++ b/src/python/grpcio/grpc_core_dependencies.py @@ -30,206 +30,211 @@ # AUTO-GENERATED FROM `$REPO_ROOT/templates/src/python/grpcio/grpc_core_dependencies.py.template`!!! CORE_SOURCE_FILES = [ - 'src/core/profiling/basic_timers.c', - 'src/core/profiling/stap_timers.c', - 'src/core/support/alloc.c', - 'src/core/support/avl.c', - 'src/core/support/cmdline.c', - 'src/core/support/cpu_iphone.c', - 'src/core/support/cpu_linux.c', - 'src/core/support/cpu_posix.c', - 'src/core/support/cpu_windows.c', - 'src/core/support/env_linux.c', - 'src/core/support/env_posix.c', - 'src/core/support/env_win32.c', - 'src/core/support/histogram.c', - 'src/core/support/host_port.c', - 'src/core/support/load_file.c', - 'src/core/support/log.c', - 'src/core/support/log_android.c', - 'src/core/support/log_linux.c', - 'src/core/support/log_posix.c', - 'src/core/support/log_win32.c', - 'src/core/support/murmur_hash.c', - 'src/core/support/slice.c', - 'src/core/support/slice_buffer.c', - 'src/core/support/stack_lockfree.c', - 'src/core/support/string.c', - 'src/core/support/string_posix.c', - 'src/core/support/string_win32.c', - 'src/core/support/subprocess_posix.c', - 'src/core/support/subprocess_windows.c', - 'src/core/support/sync.c', - 'src/core/support/sync_posix.c', - 'src/core/support/sync_win32.c', - 'src/core/support/thd.c', - 'src/core/support/thd_posix.c', - 'src/core/support/thd_win32.c', - 'src/core/support/time.c', - 'src/core/support/time_posix.c', - 'src/core/support/time_precise.c', - 'src/core/support/time_win32.c', - 'src/core/support/tls_pthread.c', - 'src/core/support/tmpfile_posix.c', - 'src/core/support/tmpfile_win32.c', - 'src/core/support/wrap_memcpy.c', - 'src/core/census/grpc_context.c', - 'src/core/census/grpc_filter.c', - 'src/core/channel/channel_args.c', - 'src/core/channel/channel_stack.c', - 'src/core/channel/client_channel.c', - 'src/core/channel/client_uchannel.c', - 'src/core/channel/compress_filter.c', - 'src/core/channel/connected_channel.c', - 'src/core/channel/http_client_filter.c', - 'src/core/channel/http_server_filter.c', - 'src/core/channel/subchannel_call_holder.c', - 'src/core/client_config/client_config.c', - 'src/core/client_config/connector.c', - 'src/core/client_config/default_initial_connect_string.c', - 'src/core/client_config/initial_connect_string.c', - 'src/core/client_config/lb_policies/load_balancer_api.c', - 'src/core/client_config/lb_policies/pick_first.c', - 'src/core/client_config/lb_policies/round_robin.c', - 'src/core/client_config/lb_policy.c', - 'src/core/client_config/lb_policy_factory.c', - 'src/core/client_config/lb_policy_registry.c', - 'src/core/client_config/resolver.c', - 'src/core/client_config/resolver_factory.c', - 'src/core/client_config/resolver_registry.c', - 'src/core/client_config/resolvers/dns_resolver.c', - 'src/core/client_config/resolvers/sockaddr_resolver.c', - 'src/core/client_config/subchannel.c', - 'src/core/client_config/subchannel_factory.c', - 'src/core/client_config/subchannel_index.c', - 'src/core/client_config/uri_parser.c', - 'src/core/compression/compression_algorithm.c', - 'src/core/compression/message_compress.c', - 'src/core/debug/trace.c', - 'src/core/httpcli/format_request.c', - 'src/core/httpcli/httpcli.c', - 'src/core/httpcli/parser.c', - 'src/core/iomgr/closure.c', - 'src/core/iomgr/endpoint.c', - 'src/core/iomgr/endpoint_pair_posix.c', - 'src/core/iomgr/endpoint_pair_windows.c', - 'src/core/iomgr/exec_ctx.c', - 'src/core/iomgr/executor.c', - 'src/core/iomgr/fd_posix.c', - 'src/core/iomgr/iocp_windows.c', - 'src/core/iomgr/iomgr.c', - 'src/core/iomgr/iomgr_posix.c', - 'src/core/iomgr/iomgr_windows.c', - 'src/core/iomgr/pollset_multipoller_with_epoll.c', - 'src/core/iomgr/pollset_multipoller_with_poll_posix.c', - 'src/core/iomgr/pollset_posix.c', - 'src/core/iomgr/pollset_set_posix.c', - 'src/core/iomgr/pollset_set_windows.c', - 'src/core/iomgr/pollset_windows.c', - 'src/core/iomgr/resolve_address_posix.c', - 'src/core/iomgr/resolve_address_windows.c', - 'src/core/iomgr/sockaddr_utils.c', - 'src/core/iomgr/socket_utils_common_posix.c', - 'src/core/iomgr/socket_utils_linux.c', - 'src/core/iomgr/socket_utils_posix.c', - 'src/core/iomgr/socket_windows.c', - 'src/core/iomgr/tcp_client_posix.c', - 'src/core/iomgr/tcp_client_windows.c', - 'src/core/iomgr/tcp_posix.c', - 'src/core/iomgr/tcp_server_posix.c', - 'src/core/iomgr/tcp_server_windows.c', - 'src/core/iomgr/tcp_windows.c', - 'src/core/iomgr/time_averaged_stats.c', - 'src/core/iomgr/timer.c', - 'src/core/iomgr/timer_heap.c', - 'src/core/iomgr/udp_server.c', - 'src/core/iomgr/wakeup_fd_eventfd.c', - 'src/core/iomgr/wakeup_fd_nospecial.c', - 'src/core/iomgr/wakeup_fd_pipe.c', - 'src/core/iomgr/wakeup_fd_posix.c', - 'src/core/iomgr/workqueue_posix.c', - 'src/core/iomgr/workqueue_windows.c', - 'src/core/json/json.c', - 'src/core/json/json_reader.c', - 'src/core/json/json_string.c', - 'src/core/json/json_writer.c', - 'src/core/proto/grpc/lb/v0/load_balancer.pb.c', - 'src/core/surface/alarm.c', - 'src/core/surface/api_trace.c', - 'src/core/surface/byte_buffer.c', - 'src/core/surface/byte_buffer_reader.c', - 'src/core/surface/call.c', - 'src/core/surface/call_details.c', - 'src/core/surface/call_log_batch.c', - 'src/core/surface/channel.c', - 'src/core/surface/channel_connectivity.c', - 'src/core/surface/channel_create.c', - 'src/core/surface/channel_ping.c', - 'src/core/surface/completion_queue.c', - 'src/core/surface/event_string.c', - 'src/core/surface/init.c', - 'src/core/surface/lame_client.c', - 'src/core/surface/metadata_array.c', - 'src/core/surface/server.c', - 'src/core/surface/server_chttp2.c', - 'src/core/surface/server_create.c', - 'src/core/surface/validate_metadata.c', - 'src/core/surface/version.c', - 'src/core/transport/byte_stream.c', - 'src/core/transport/chttp2/alpn.c', - 'src/core/transport/chttp2/bin_encoder.c', - 'src/core/transport/chttp2/frame_data.c', - 'src/core/transport/chttp2/frame_goaway.c', - 'src/core/transport/chttp2/frame_ping.c', - 'src/core/transport/chttp2/frame_rst_stream.c', - 'src/core/transport/chttp2/frame_settings.c', - 'src/core/transport/chttp2/frame_window_update.c', - 'src/core/transport/chttp2/hpack_encoder.c', - 'src/core/transport/chttp2/hpack_parser.c', - 'src/core/transport/chttp2/hpack_table.c', - 'src/core/transport/chttp2/huffsyms.c', - 'src/core/transport/chttp2/incoming_metadata.c', - 'src/core/transport/chttp2/parsing.c', - 'src/core/transport/chttp2/status_conversion.c', - 'src/core/transport/chttp2/stream_lists.c', - 'src/core/transport/chttp2/stream_map.c', - 'src/core/transport/chttp2/timeout_encoding.c', - 'src/core/transport/chttp2/varint.c', - 'src/core/transport/chttp2/writing.c', - 'src/core/transport/chttp2_transport.c', - 'src/core/transport/connectivity_state.c', - 'src/core/transport/metadata.c', - 'src/core/transport/metadata_batch.c', - 'src/core/transport/static_metadata.c', - 'src/core/transport/transport.c', - 'src/core/transport/transport_op_string.c', - 'src/core/httpcli/httpcli_security_connector.c', - 'src/core/security/b64.c', - 'src/core/security/client_auth_filter.c', - 'src/core/security/credentials.c', - 'src/core/security/credentials_metadata.c', - 'src/core/security/credentials_posix.c', - 'src/core/security/credentials_win32.c', - 'src/core/security/google_default_credentials.c', - 'src/core/security/handshake.c', - 'src/core/security/json_token.c', - 'src/core/security/jwt_verifier.c', - 'src/core/security/secure_endpoint.c', - 'src/core/security/security_connector.c', - 'src/core/security/security_context.c', - 'src/core/security/server_auth_filter.c', - 'src/core/security/server_secure_chttp2.c', - 'src/core/surface/init_secure.c', - 'src/core/surface/secure_channel_create.c', - 'src/core/tsi/fake_transport_security.c', - 'src/core/tsi/ssl_transport_security.c', - 'src/core/tsi/transport_security.c', - 'src/core/census/context.c', - 'src/core/census/initialize.c', - 'src/core/census/mlog.c', - 'src/core/census/operation.c', - 'src/core/census/placeholders.c', - 'src/core/census/tracing.c', + 'src/core/lib/profiling/basic_timers.c', + 'src/core/lib/profiling/stap_timers.c', + 'src/core/lib/support/alloc.c', + 'src/core/lib/support/avl.c', + 'src/core/lib/support/backoff.c', + 'src/core/lib/support/cmdline.c', + 'src/core/lib/support/cpu_iphone.c', + 'src/core/lib/support/cpu_linux.c', + 'src/core/lib/support/cpu_posix.c', + 'src/core/lib/support/cpu_windows.c', + 'src/core/lib/support/env_linux.c', + 'src/core/lib/support/env_posix.c', + 'src/core/lib/support/env_win32.c', + 'src/core/lib/support/histogram.c', + 'src/core/lib/support/host_port.c', + 'src/core/lib/support/load_file.c', + 'src/core/lib/support/log.c', + 'src/core/lib/support/log_android.c', + 'src/core/lib/support/log_linux.c', + 'src/core/lib/support/log_posix.c', + 'src/core/lib/support/log_win32.c', + 'src/core/lib/support/murmur_hash.c', + 'src/core/lib/support/slice.c', + 'src/core/lib/support/slice_buffer.c', + 'src/core/lib/support/stack_lockfree.c', + 'src/core/lib/support/string.c', + 'src/core/lib/support/string_posix.c', + 'src/core/lib/support/string_win32.c', + 'src/core/lib/support/subprocess_posix.c', + 'src/core/lib/support/subprocess_windows.c', + 'src/core/lib/support/sync.c', + 'src/core/lib/support/sync_posix.c', + 'src/core/lib/support/sync_win32.c', + 'src/core/lib/support/thd.c', + 'src/core/lib/support/thd_posix.c', + 'src/core/lib/support/thd_win32.c', + 'src/core/lib/support/time.c', + 'src/core/lib/support/time_posix.c', + 'src/core/lib/support/time_precise.c', + 'src/core/lib/support/time_win32.c', + 'src/core/lib/support/tls_pthread.c', + 'src/core/lib/support/tmpfile_posix.c', + 'src/core/lib/support/tmpfile_win32.c', + 'src/core/lib/support/wrap_memcpy.c', + 'src/core/ext/transport/chttp2/client/insecure/channel_create.c', + 'src/core/ext/transport/chttp2/client/secure/secure_channel_create.c', + 'src/core/ext/transport/chttp2/server/insecure/server_chttp2.c', + 'src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c', + 'src/core/ext/transport/chttp2/transport/alpn.c', + 'src/core/ext/transport/chttp2/transport/bin_encoder.c', + 'src/core/ext/transport/chttp2/transport/chttp2_transport.c', + 'src/core/ext/transport/chttp2/transport/frame_data.c', + 'src/core/ext/transport/chttp2/transport/frame_goaway.c', + 'src/core/ext/transport/chttp2/transport/frame_ping.c', + 'src/core/ext/transport/chttp2/transport/frame_rst_stream.c', + 'src/core/ext/transport/chttp2/transport/frame_settings.c', + 'src/core/ext/transport/chttp2/transport/frame_window_update.c', + 'src/core/ext/transport/chttp2/transport/hpack_encoder.c', + 'src/core/ext/transport/chttp2/transport/hpack_parser.c', + 'src/core/ext/transport/chttp2/transport/hpack_table.c', + 'src/core/ext/transport/chttp2/transport/huffsyms.c', + 'src/core/ext/transport/chttp2/transport/incoming_metadata.c', + 'src/core/ext/transport/chttp2/transport/parsing.c', + 'src/core/ext/transport/chttp2/transport/status_conversion.c', + 'src/core/ext/transport/chttp2/transport/stream_lists.c', + 'src/core/ext/transport/chttp2/transport/stream_map.c', + 'src/core/ext/transport/chttp2/transport/timeout_encoding.c', + 'src/core/ext/transport/chttp2/transport/varint.c', + 'src/core/ext/transport/chttp2/transport/writing.c', + 'src/core/lib/census/context.c', + 'src/core/lib/census/grpc_context.c', + 'src/core/lib/census/grpc_filter.c', + 'src/core/lib/census/grpc_plugin.c', + 'src/core/lib/census/initialize.c', + 'src/core/lib/census/mlog.c', + 'src/core/lib/census/operation.c', + 'src/core/lib/census/placeholders.c', + 'src/core/lib/census/tracing.c', + 'src/core/lib/channel/channel_args.c', + 'src/core/lib/channel/channel_stack.c', + 'src/core/lib/channel/channel_stack_builder.c', + 'src/core/lib/channel/client_channel.c', + 'src/core/lib/channel/compress_filter.c', + 'src/core/lib/channel/connected_channel.c', + 'src/core/lib/channel/http_client_filter.c', + 'src/core/lib/channel/http_server_filter.c', + 'src/core/lib/channel/subchannel_call_holder.c', + 'src/core/lib/client_config/client_config.c', + 'src/core/lib/client_config/connector.c', + 'src/core/lib/client_config/default_initial_connect_string.c', + 'src/core/lib/client_config/initial_connect_string.c', + 'src/core/lib/client_config/lb_policies/load_balancer_api.c', + 'src/core/lib/client_config/lb_policies/pick_first.c', + 'src/core/lib/client_config/lb_policies/round_robin.c', + 'src/core/lib/client_config/lb_policy.c', + 'src/core/lib/client_config/lb_policy_factory.c', + 'src/core/lib/client_config/lb_policy_registry.c', + 'src/core/lib/client_config/resolver.c', + 'src/core/lib/client_config/resolver_factory.c', + 'src/core/lib/client_config/resolver_registry.c', + 'src/core/lib/client_config/resolvers/dns_resolver.c', + 'src/core/lib/client_config/resolvers/sockaddr_resolver.c', + 'src/core/lib/client_config/subchannel.c', + 'src/core/lib/client_config/subchannel_factory.c', + 'src/core/lib/client_config/subchannel_index.c', + 'src/core/lib/client_config/uri_parser.c', + 'src/core/lib/compression/compression_algorithm.c', + 'src/core/lib/compression/message_compress.c', + 'src/core/lib/debug/trace.c', + 'src/core/lib/http/format_request.c', + 'src/core/lib/http/httpcli.c', + 'src/core/lib/http/httpcli_security_connector.c', + 'src/core/lib/http/parser.c', + 'src/core/lib/iomgr/closure.c', + 'src/core/lib/iomgr/endpoint.c', + 'src/core/lib/iomgr/endpoint_pair_posix.c', + 'src/core/lib/iomgr/endpoint_pair_windows.c', + 'src/core/lib/iomgr/exec_ctx.c', + 'src/core/lib/iomgr/executor.c', + 'src/core/lib/iomgr/fd_posix.c', + 'src/core/lib/iomgr/iocp_windows.c', + 'src/core/lib/iomgr/iomgr.c', + 'src/core/lib/iomgr/iomgr_posix.c', + 'src/core/lib/iomgr/iomgr_windows.c', + 'src/core/lib/iomgr/pollset_multipoller_with_epoll.c', + 'src/core/lib/iomgr/pollset_multipoller_with_poll_posix.c', + 'src/core/lib/iomgr/pollset_posix.c', + 'src/core/lib/iomgr/pollset_set_posix.c', + 'src/core/lib/iomgr/pollset_set_windows.c', + 'src/core/lib/iomgr/pollset_windows.c', + 'src/core/lib/iomgr/resolve_address_posix.c', + 'src/core/lib/iomgr/resolve_address_windows.c', + 'src/core/lib/iomgr/sockaddr_utils.c', + 'src/core/lib/iomgr/socket_utils_common_posix.c', + 'src/core/lib/iomgr/socket_utils_linux.c', + 'src/core/lib/iomgr/socket_utils_posix.c', + 'src/core/lib/iomgr/socket_windows.c', + 'src/core/lib/iomgr/tcp_client_posix.c', + 'src/core/lib/iomgr/tcp_client_windows.c', + 'src/core/lib/iomgr/tcp_posix.c', + 'src/core/lib/iomgr/tcp_server_posix.c', + 'src/core/lib/iomgr/tcp_server_windows.c', + 'src/core/lib/iomgr/tcp_windows.c', + 'src/core/lib/iomgr/time_averaged_stats.c', + 'src/core/lib/iomgr/timer.c', + 'src/core/lib/iomgr/timer_heap.c', + 'src/core/lib/iomgr/udp_server.c', + 'src/core/lib/iomgr/unix_sockets_posix.c', + 'src/core/lib/iomgr/unix_sockets_posix_noop.c', + 'src/core/lib/iomgr/wakeup_fd_eventfd.c', + 'src/core/lib/iomgr/wakeup_fd_nospecial.c', + 'src/core/lib/iomgr/wakeup_fd_pipe.c', + 'src/core/lib/iomgr/wakeup_fd_posix.c', + 'src/core/lib/iomgr/workqueue_posix.c', + 'src/core/lib/iomgr/workqueue_windows.c', + 'src/core/lib/json/json.c', + 'src/core/lib/json/json_reader.c', + 'src/core/lib/json/json_string.c', + 'src/core/lib/json/json_writer.c', + 'src/core/lib/proto/grpc/lb/v0/load_balancer.pb.c', + 'src/core/lib/security/b64.c', + 'src/core/lib/security/client_auth_filter.c', + 'src/core/lib/security/credentials.c', + 'src/core/lib/security/credentials_metadata.c', + 'src/core/lib/security/credentials_posix.c', + 'src/core/lib/security/credentials_win32.c', + 'src/core/lib/security/google_default_credentials.c', + 'src/core/lib/security/handshake.c', + 'src/core/lib/security/json_token.c', + 'src/core/lib/security/jwt_verifier.c', + 'src/core/lib/security/secure_endpoint.c', + 'src/core/lib/security/security_connector.c', + 'src/core/lib/security/security_context.c', + 'src/core/lib/security/server_auth_filter.c', + 'src/core/lib/surface/alarm.c', + 'src/core/lib/surface/api_trace.c', + 'src/core/lib/surface/byte_buffer.c', + 'src/core/lib/surface/byte_buffer_reader.c', + 'src/core/lib/surface/call.c', + 'src/core/lib/surface/call_details.c', + 'src/core/lib/surface/call_log_batch.c', + 'src/core/lib/surface/channel.c', + 'src/core/lib/surface/channel_connectivity.c', + 'src/core/lib/surface/channel_init.c', + 'src/core/lib/surface/channel_ping.c', + 'src/core/lib/surface/channel_stack_type.c', + 'src/core/lib/surface/completion_queue.c', + 'src/core/lib/surface/event_string.c', + 'src/core/lib/surface/init.c', + 'src/core/lib/surface/init_secure.c', + 'src/core/lib/surface/lame_client.c', + 'src/core/lib/surface/metadata_array.c', + 'src/core/lib/surface/server.c', + 'src/core/lib/surface/validate_metadata.c', + 'src/core/lib/surface/version.c', + 'src/core/lib/transport/byte_stream.c', + 'src/core/lib/transport/connectivity_state.c', + 'src/core/lib/transport/metadata.c', + 'src/core/lib/transport/metadata_batch.c', + 'src/core/lib/transport/static_metadata.c', + 'src/core/lib/transport/transport.c', + 'src/core/lib/transport/transport_op_string.c', + 'src/core/lib/tsi/fake_transport_security.c', + 'src/core/lib/tsi/ssl_transport_security.c', + 'src/core/lib/tsi/transport_security.c', 'third_party/nanopb/pb_common.c', 'third_party/nanopb/pb_decode.c', 'third_party/nanopb/pb_encode.c', diff --git a/src/python/grpcio/tests/__init__.py b/src/python/grpcio/tests/__init__.py index b76b3985a19..c3b80d766d8 100644 --- a/src/python/grpcio/tests/__init__.py +++ b/src/python/grpcio/tests/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2015, Google Inc. +# Copyright 2015-2016, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -27,6 +27,8 @@ # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +from __future__ import absolute_import + from tests import _loader from tests import _runner diff --git a/src/python/grpcio/tests/_loader.py b/src/python/grpcio/tests/_loader.py index 6992029b5e8..2f9e5c660ec 100644 --- a/src/python/grpcio/tests/_loader.py +++ b/src/python/grpcio/tests/_loader.py @@ -1,4 +1,4 @@ -# Copyright 2015, Google Inc. +# Copyright 2015-2016, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -27,6 +27,8 @@ # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +from __future__ import absolute_import + import importlib import pkgutil import re diff --git a/src/python/grpcio/tests/_result.py b/src/python/grpcio/tests/_result.py index 0670be921f8..18b0f439636 100644 --- a/src/python/grpcio/tests/_result.py +++ b/src/python/grpcio/tests/_result.py @@ -1,4 +1,4 @@ -# Copyright 2015, Google Inc. +# Copyright 2015-2016, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -27,7 +27,8 @@ # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -import cStringIO as StringIO +from __future__ import absolute_import + import collections import itertools import traceback @@ -35,6 +36,7 @@ import unittest from xml.etree import ElementTree import coverage +from six import moves from tests import _loader @@ -202,7 +204,7 @@ class AugmentedResult(unittest.TestResult): """ case_id = self.id_map(test) self.cases[case_id] = self.cases[case_id].updated( - stdout=stdout, stderr=stderr) + stdout=stdout.decode(), stderr=stderr.decode()) def augmented_results(self, filter): """Convenience method to retrieve filtered case results. @@ -356,7 +358,7 @@ def _traceback_string(type, value, trace): Returns: str: Formatted exception descriptive string. """ - buffer = StringIO.StringIO() + buffer = moves.cStringIO() traceback.print_exception(type, value, trace, file=buffer) return buffer.getvalue() diff --git a/src/python/grpcio/tests/_runner.py b/src/python/grpcio/tests/_runner.py index 32a31ce00e1..173a170409b 100644 --- a/src/python/grpcio/tests/_runner.py +++ b/src/python/grpcio/tests/_runner.py @@ -27,7 +27,8 @@ # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -import cStringIO as StringIO +from __future__ import absolute_import + import collections import fcntl import multiprocessing @@ -35,80 +36,59 @@ import os import select import signal import sys +import tempfile import threading import time import unittest import uuid +import six +from six import moves + from tests import _loader from tests import _result -# This number needs to be large enough to outpace output on stdout and stderr -# from the gRPC core, otherwise we could end up in a potential deadlock. This -# stems from the OS waiting on someone to clear a filled pipe buffer while the -# GIL is held from a write to stderr from gRPC core, but said someone is in -# Python code thus necessitating GIL acquisition. -_READ_BYTES = 2**20 +class CaptureFile(object): + """A context-managed file to redirect output to a byte array. -class CapturePipe(object): - """A context-manager pipe to redirect output to a byte array. + Use by invoking `start` (`__enter__`) and at some point invoking `stop` + (`__exit__`). At any point after the initial call to `start` call `output` to + get the current redirected output. Note that we don't currently use file + locking, so calling `output` between calls to `start` and `stop` may muddle + the result (you should only be doing this during a Python-handled interrupt as + a last ditch effort to provide output to the user). Attributes: - _redirect_fd (int): File descriptor of file to redirect writes from. + _redirected_fd (int): File descriptor of file to redirect writes from. _saved_fd (int): A copy of the original value of the redirected file descriptor. - _read_thread (threading.Thread or None): Thread upon which reads through the - pipe are performed. Only non-None when self is started. - _read_fd (int or None): File descriptor of the read end of the redirect - pipe. Only non-None when self is started. - _write_fd (int or None): File descriptor of the write end of the redirect - pipe. Only non-None when self is started. - output (bytearray or None): Redirected output from writes to the redirected - file descriptor. Only valid during and after self has started. + _into_file (TemporaryFile or None): File to which writes are redirected. + Only non-None when self is started. """ def __init__(self, fd): - self._redirect_fd = fd - self._saved_fd = os.dup(self._redirect_fd) - self._read_thread = None - self._read_fd = None - self._write_fd = None - self.output = None + self._redirected_fd = fd + self._saved_fd = os.dup(self._redirected_fd) + self._into_file = None + + def output(self): + """Get all output from the redirected-to file if it exists.""" + if self._into_file: + self._into_file.seek(0) + return bytes(self._into_file.read()) + else: + return bytes() def start(self): """Start redirection of writes to the file descriptor.""" - self._read_fd, self._write_fd = os.pipe() - os.dup2(self._write_fd, self._redirect_fd) - flags = fcntl.fcntl(self._read_fd, fcntl.F_GETFL) - fcntl.fcntl(self._read_fd, fcntl.F_SETFL, flags | os.O_NONBLOCK) - self._read_thread = threading.Thread(target=self._read) - # If the user wants to exit from the Python program and hits ctrl-C and the - # read thread is somehow deadlocked with something else, the Python code may - # refuse to exit. This prevents that by making the read thread second-class. - self._read_thread.daemon = True - self._read_thread.start() + self._into_file = tempfile.TemporaryFile() + os.dup2(self._into_file.fileno(), self._redirected_fd) def stop(self): """Stop redirection of writes to the file descriptor.""" - os.close(self._write_fd) - os.dup2(self._saved_fd, self._redirect_fd) # auto-close self._redirect_fd - self._read_thread.join() - self._read_thread = None - # we waited for the read thread to finish, so _read_fd has been read and we - # can close it. - os.close(self._read_fd) - - def _read(self): - """Read-thread target for self.""" - self.output = bytearray() - while True: - select.select([self._read_fd], [], []) - read_bytes = os.read(self._read_fd, _READ_BYTES) - if read_bytes: - self.output.extend(read_bytes) - else: - break + # n.b. this dup2 call auto-closes self._redirected_fd + os.dup2(self._saved_fd, self._redirected_fd) def write_bypass(self, value): """Bypass the redirection and write directly to the original file. @@ -116,6 +96,8 @@ class CapturePipe(object): Arguments: value (str): What to write to the original file. """ + if six.PY3 and not isinstance(value, six.binary_type): + value = bytes(value, 'ascii') if self._saved_fd is None: os.write(self._redirect_fd, value) else: @@ -167,11 +149,11 @@ class Runner(object): for case in filtered_cases] case_id_by_case = dict((augmented_case.case, augmented_case.id) for augmented_case in augmented_cases) - result_out = StringIO.StringIO() + result_out = moves.cStringIO() result = _result.TerminalResult( result_out, id_map=lambda case: case_id_by_case[case]) - stdout_pipe = CapturePipe(sys.stdout.fileno()) - stderr_pipe = CapturePipe(sys.stderr.fileno()) + stdout_pipe = CaptureFile(sys.stdout.fileno()) + stderr_pipe = CaptureFile(sys.stderr.fileno()) kill_flag = [False] def sigint_handler(signal_number, frame): @@ -182,7 +164,8 @@ class Runner(object): def fault_handler(signal_number, frame): stdout_pipe.write_bypass( 'Received fault signal {}\nstdout:\n{}\n\nstderr:{}\n' - .format(signal_number, stdout_pipe.output, stderr_pipe.output)) + .format(signal_number, stdout_pipe.output(), + stderr_pipe.output())) os._exit(1) def check_kill_self(): @@ -191,9 +174,9 @@ class Runner(object): result.stopTestRun() stdout_pipe.write_bypass(result_out.getvalue()) stdout_pipe.write_bypass( - '\ninterrupted stdout:\n{}\n'.format(stdout_pipe.output)) + '\ninterrupted stdout:\n{}\n'.format(stdout_pipe.output().decode())) stderr_pipe.write_bypass( - '\ninterrupted stderr:\n{}\n'.format(stderr_pipe.output)) + '\ninterrupted stderr:\n{}\n'.format(stderr_pipe.output().decode())) os._exit(1) signal.signal(signal.SIGINT, sigint_handler) signal.signal(signal.SIGSEGV, fault_handler) @@ -223,7 +206,7 @@ class Runner(object): # re-raise the exception after forcing the with-block to end raise result.set_output( - augmented_case.case, stdout_pipe.output, stderr_pipe.output) + augmented_case.case, stdout_pipe.output(), stderr_pipe.output()) sys.stdout.write(result_out.getvalue()) sys.stdout.flush() result_out.truncate(0) @@ -236,7 +219,7 @@ class Runner(object): sys.stdout.write(result_out.getvalue()) sys.stdout.flush() signal.signal(signal.SIGINT, signal.SIG_DFL) - with open('report.xml', 'w') as report_xml_file: + with open('report.xml', 'wb') as report_xml_file: _result.jenkins_junit_xml(result).write(report_xml_file) return result diff --git a/src/python/grpcio/tests/interop/methods.py b/src/python/grpcio/tests/interop/methods.py index b3591aef7bc..7f42b4a005e 100644 --- a/src/python/grpcio/tests/interop/methods.py +++ b/src/python/grpcio/tests/interop/methods.py @@ -1,4 +1,4 @@ -# Copyright 2015, Google Inc. +# Copyright 2015-2016, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -29,6 +29,8 @@ """Implementations of interoperability test methods.""" +from __future__ import print_function + import enum import json import os @@ -173,6 +175,9 @@ class _Pipe(object): def __iter__(self): return self + def __next__(self): + return self.next() + def next(self): with self._condition: while not self._values and self._open: @@ -205,7 +210,7 @@ def _ping_pong(stub): with stub, _Pipe() as pipe: response_iterator = stub.FullDuplexCall(pipe, _TIMEOUT) - print 'Starting ping-pong with response iterator %s' % response_iterator + print('Starting ping-pong with response iterator %s' % response_iterator) for response_size, payload_size in zip( request_response_sizes, request_payload_sizes): request = messages_pb2.StreamingOutputCallRequest( diff --git a/src/python/grpcio/tests/protoc_plugin/beta_python_plugin_test.py b/src/python/grpcio/tests/protoc_plugin/beta_python_plugin_test.py index ba5b219a88e..230ec6487d2 100644 --- a/src/python/grpcio/tests/protoc_plugin/beta_python_plugin_test.py +++ b/src/python/grpcio/tests/protoc_plugin/beta_python_plugin_test.py @@ -1,4 +1,4 @@ -# Copyright 2015, Google Inc. +# Copyright 2015-2016, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -42,6 +42,8 @@ import threading import time import unittest +from six import moves + from grpc.beta import implementations from grpc.framework.foundation import future from grpc.framework.interfaces.face import face @@ -250,7 +252,7 @@ class PythonPluginTest(unittest.TestCase): def testImportAttributes(self): # check that we can access the generated module and its members. import protoc_plugin_test_pb2 as test_pb2 # pylint: disable=g-import-not-at-top - reload(test_pb2) + moves.reload_module(test_pb2) self.assertIsNotNone(getattr(test_pb2, SERVICER_IDENTIFIER, None)) self.assertIsNotNone(getattr(test_pb2, STUB_IDENTIFIER, None)) self.assertIsNotNone(getattr(test_pb2, SERVER_FACTORY_IDENTIFIER, None)) @@ -258,13 +260,13 @@ class PythonPluginTest(unittest.TestCase): def testUpDown(self): import protoc_plugin_test_pb2 as test_pb2 - reload(test_pb2) + moves.reload_module(test_pb2) with _CreateService(test_pb2) as (servicer, stub): request = test_pb2.SimpleRequest(response_size=13) def testUnaryCall(self): import protoc_plugin_test_pb2 as test_pb2 # pylint: disable=g-import-not-at-top - reload(test_pb2) + moves.reload_module(test_pb2) with _CreateService(test_pb2) as (methods, stub): request = test_pb2.SimpleRequest(response_size=13) response = stub.UnaryCall(request, test_constants.LONG_TIMEOUT) @@ -273,7 +275,7 @@ class PythonPluginTest(unittest.TestCase): def testUnaryCallFuture(self): import protoc_plugin_test_pb2 as test_pb2 # pylint: disable=g-import-not-at-top - reload(test_pb2) + moves.reload_module(test_pb2) request = test_pb2.SimpleRequest(response_size=13) with _CreateService(test_pb2) as (methods, stub): # Check that the call does not block waiting for the server to respond. @@ -286,7 +288,7 @@ class PythonPluginTest(unittest.TestCase): def testUnaryCallFutureExpired(self): import protoc_plugin_test_pb2 as test_pb2 # pylint: disable=g-import-not-at-top - reload(test_pb2) + moves.reload_module(test_pb2) with _CreateService(test_pb2) as (methods, stub): request = test_pb2.SimpleRequest(response_size=13) with methods.pause(): @@ -297,7 +299,7 @@ class PythonPluginTest(unittest.TestCase): def testUnaryCallFutureCancelled(self): import protoc_plugin_test_pb2 as test_pb2 # pylint: disable=g-import-not-at-top - reload(test_pb2) + moves.reload_module(test_pb2) request = test_pb2.SimpleRequest(response_size=13) with _CreateService(test_pb2) as (methods, stub): with methods.pause(): @@ -307,7 +309,7 @@ class PythonPluginTest(unittest.TestCase): def testUnaryCallFutureFailed(self): import protoc_plugin_test_pb2 as test_pb2 # pylint: disable=g-import-not-at-top - reload(test_pb2) + moves.reload_module(test_pb2) request = test_pb2.SimpleRequest(response_size=13) with _CreateService(test_pb2) as (methods, stub): with methods.fail(): @@ -317,20 +319,20 @@ class PythonPluginTest(unittest.TestCase): def testStreamingOutputCall(self): import protoc_plugin_test_pb2 as test_pb2 # pylint: disable=g-import-not-at-top - reload(test_pb2) + moves.reload_module(test_pb2) request = _streaming_output_request(test_pb2) with _CreateService(test_pb2) as (methods, stub): responses = stub.StreamingOutputCall( request, test_constants.LONG_TIMEOUT) expected_responses = methods.StreamingOutputCall( request, 'not a real RpcContext!') - for expected_response, response in itertools.izip_longest( + for expected_response, response in moves.zip_longest( expected_responses, responses): self.assertEqual(expected_response, response) def testStreamingOutputCallExpired(self): import protoc_plugin_test_pb2 as test_pb2 # pylint: disable=g-import-not-at-top - reload(test_pb2) + moves.reload_module(test_pb2) request = _streaming_output_request(test_pb2) with _CreateService(test_pb2) as (methods, stub): with methods.pause(): @@ -341,7 +343,7 @@ class PythonPluginTest(unittest.TestCase): def testStreamingOutputCallCancelled(self): import protoc_plugin_test_pb2 as test_pb2 # pylint: disable=g-import-not-at-top - reload(test_pb2) + moves.reload_module(test_pb2) request = _streaming_output_request(test_pb2) with _CreateService(test_pb2) as (unused_methods, stub): responses = stub.StreamingOutputCall( @@ -353,7 +355,7 @@ class PythonPluginTest(unittest.TestCase): def testStreamingOutputCallFailed(self): import protoc_plugin_test_pb2 as test_pb2 # pylint: disable=g-import-not-at-top - reload(test_pb2) + moves.reload_module(test_pb2) request = _streaming_output_request(test_pb2) with _CreateService(test_pb2) as (methods, stub): with methods.fail(): @@ -364,7 +366,7 @@ class PythonPluginTest(unittest.TestCase): def testStreamingInputCall(self): import protoc_plugin_test_pb2 as test_pb2 # pylint: disable=g-import-not-at-top - reload(test_pb2) + moves.reload_module(test_pb2) with _CreateService(test_pb2) as (methods, stub): response = stub.StreamingInputCall( _streaming_input_request_iterator(test_pb2), @@ -375,7 +377,7 @@ class PythonPluginTest(unittest.TestCase): def testStreamingInputCallFuture(self): import protoc_plugin_test_pb2 as test_pb2 # pylint: disable=g-import-not-at-top - reload(test_pb2) + moves.reload_module(test_pb2) with _CreateService(test_pb2) as (methods, stub): with methods.pause(): response_future = stub.StreamingInputCall.future( @@ -388,7 +390,7 @@ class PythonPluginTest(unittest.TestCase): def testStreamingInputCallFutureExpired(self): import protoc_plugin_test_pb2 as test_pb2 # pylint: disable=g-import-not-at-top - reload(test_pb2) + moves.reload_module(test_pb2) with _CreateService(test_pb2) as (methods, stub): with methods.pause(): response_future = stub.StreamingInputCall.future( @@ -401,7 +403,7 @@ class PythonPluginTest(unittest.TestCase): def testStreamingInputCallFutureCancelled(self): import protoc_plugin_test_pb2 as test_pb2 # pylint: disable=g-import-not-at-top - reload(test_pb2) + moves.reload_module(test_pb2) with _CreateService(test_pb2) as (methods, stub): with methods.pause(): response_future = stub.StreamingInputCall.future( @@ -414,7 +416,7 @@ class PythonPluginTest(unittest.TestCase): def testStreamingInputCallFutureFailed(self): import protoc_plugin_test_pb2 as test_pb2 # pylint: disable=g-import-not-at-top - reload(test_pb2) + moves.reload_module(test_pb2) with _CreateService(test_pb2) as (methods, stub): with methods.fail(): response_future = stub.StreamingInputCall.future( @@ -424,19 +426,19 @@ class PythonPluginTest(unittest.TestCase): def testFullDuplexCall(self): import protoc_plugin_test_pb2 as test_pb2 # pylint: disable=g-import-not-at-top - reload(test_pb2) + moves.reload_module(test_pb2) with _CreateService(test_pb2) as (methods, stub): responses = stub.FullDuplexCall( _full_duplex_request_iterator(test_pb2), test_constants.LONG_TIMEOUT) expected_responses = methods.FullDuplexCall( _full_duplex_request_iterator(test_pb2), 'not a real RpcContext!') - for expected_response, response in itertools.izip_longest( + for expected_response, response in moves.zip_longest( expected_responses, responses): self.assertEqual(expected_response, response) def testFullDuplexCallExpired(self): import protoc_plugin_test_pb2 as test_pb2 # pylint: disable=g-import-not-at-top - reload(test_pb2) + moves.reload_module(test_pb2) request_iterator = _full_duplex_request_iterator(test_pb2) with _CreateService(test_pb2) as (methods, stub): with methods.pause(): @@ -447,7 +449,7 @@ class PythonPluginTest(unittest.TestCase): def testFullDuplexCallCancelled(self): import protoc_plugin_test_pb2 as test_pb2 # pylint: disable=g-import-not-at-top - reload(test_pb2) + moves.reload_module(test_pb2) with _CreateService(test_pb2) as (methods, stub): request_iterator = _full_duplex_request_iterator(test_pb2) responses = stub.FullDuplexCall( @@ -459,7 +461,7 @@ class PythonPluginTest(unittest.TestCase): def testFullDuplexCallFailed(self): import protoc_plugin_test_pb2 as test_pb2 # pylint: disable=g-import-not-at-top - reload(test_pb2) + moves.reload_module(test_pb2) request_iterator = _full_duplex_request_iterator(test_pb2) with _CreateService(test_pb2) as (methods, stub): with methods.fail(): @@ -471,7 +473,7 @@ class PythonPluginTest(unittest.TestCase): def testHalfDuplexCall(self): import protoc_plugin_test_pb2 as test_pb2 # pylint: disable=g-import-not-at-top - reload(test_pb2) + moves.reload_module(test_pb2) with _CreateService(test_pb2) as (methods, stub): def half_duplex_request_iterator(): request = test_pb2.StreamingOutputCallRequest() @@ -485,13 +487,13 @@ class PythonPluginTest(unittest.TestCase): half_duplex_request_iterator(), test_constants.LONG_TIMEOUT) expected_responses = methods.HalfDuplexCall( half_duplex_request_iterator(), 'not a real RpcContext!') - for check in itertools.izip_longest(expected_responses, responses): + for check in moves.zip_longest(expected_responses, responses): expected_response, response = check self.assertEqual(expected_response, response) def testHalfDuplexCallWedged(self): import protoc_plugin_test_pb2 as test_pb2 # pylint: disable=g-import-not-at-top - reload(test_pb2) + moves.reload_module(test_pb2) condition = threading.Condition() wait_cell = [False] @contextlib.contextmanager diff --git a/src/python/grpcio/tests/unit/_adapter/_intermediary_low_test.py b/src/python/grpcio/tests/unit/_adapter/_intermediary_low_test.py index a6fd82388c0..06bfc34977c 100644 --- a/src/python/grpcio/tests/unit/_adapter/_intermediary_low_test.py +++ b/src/python/grpcio/tests/unit/_adapter/_intermediary_low_test.py @@ -1,4 +1,4 @@ -# Copyright 2015, Google Inc. +# Copyright 2015-2016, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -29,11 +29,13 @@ """Tests for the old '_low'.""" -import Queue import threading import time import unittest +import six +from six.moves import queue + from grpc._adapter import _intermediary_low as _low _STREAM_LENGTH = 300 @@ -67,7 +69,7 @@ class LonelyClientTest(unittest.TestCase): second_event = completion_queue.get(after_deadline) self.assertIsNotNone(second_event) kinds = [event.kind for event in (first_event, second_event)] - self.assertItemsEqual( + six.assertCountEqual(self, (_low.Event.Kind.METADATA_ACCEPTED, _low.Event.Kind.FINISH), kinds) @@ -99,7 +101,7 @@ class EchoTest(unittest.TestCase): self.server = _low.Server(self.server_completion_queue) port = self.server.add_http2_addr('[::]:0') self.server.start() - self.server_events = Queue.Queue() + self.server_events = queue.Queue() self.server_completion_queue_thread = threading.Thread( target=_drive_completion_queue, args=(self.server_completion_queue, self.server_events)) @@ -107,7 +109,7 @@ class EchoTest(unittest.TestCase): self.client_completion_queue = _low.CompletionQueue() self.channel = _low.Channel('%s:%d' % (self.host, port), None) - self.client_events = Queue.Queue() + self.client_events = queue.Queue() self.client_completion_queue_thread = threading.Thread( target=_drive_completion_queue, args=(self.client_completion_queue, self.client_events)) @@ -315,7 +317,7 @@ class CancellationTest(unittest.TestCase): self.server = _low.Server(self.server_completion_queue) port = self.server.add_http2_addr('[::]:0') self.server.start() - self.server_events = Queue.Queue() + self.server_events = queue.Queue() self.server_completion_queue_thread = threading.Thread( target=_drive_completion_queue, args=(self.server_completion_queue, self.server_events)) @@ -323,7 +325,7 @@ class CancellationTest(unittest.TestCase): self.client_completion_queue = _low.CompletionQueue() self.channel = _low.Channel('%s:%d' % (self.host, port), None) - self.client_events = Queue.Queue() + self.client_events = queue.Queue() self.client_completion_queue_thread = threading.Thread( target=_drive_completion_queue, args=(self.client_completion_queue, self.client_events)) diff --git a/src/python/grpcio/tests/unit/_adapter/_proto_scenarios.py b/src/python/grpcio/tests/unit/_adapter/_proto_scenarios.py index f55a7a23eae..c9f36636b5c 100644 --- a/src/python/grpcio/tests/unit/_adapter/_proto_scenarios.py +++ b/src/python/grpcio/tests/unit/_adapter/_proto_scenarios.py @@ -1,4 +1,4 @@ -# Copyright 2015, Google Inc. +# Copyright 2015-2016, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -32,12 +32,13 @@ import abc import threading +import six + from tests.unit._junkdrawer import math_pb2 -class ProtoScenario(object): +class ProtoScenario(six.with_metaclass(abc.ABCMeta)): """An RPC test scenario using protocol buffers.""" - __metaclass__ = abc.ABCMeta @abc.abstractmethod def method(self): diff --git a/src/python/grpcio/tests/unit/_core_over_links_base_interface_test.py b/src/python/grpcio/tests/unit/_core_over_links_base_interface_test.py index efc990421a3..881633754c1 100644 --- a/src/python/grpcio/tests/unit/_core_over_links_base_interface_test.py +++ b/src/python/grpcio/tests/unit/_core_over_links_base_interface_test.py @@ -1,4 +1,4 @@ -# Copyright 2015, Google Inc. +# Copyright 2015-2016, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -35,6 +35,8 @@ import random import time import unittest +import six + from grpc._adapter import _intermediary_low from grpc._links import invocation from grpc._links import service @@ -68,7 +70,7 @@ def _serialization_behaviors_from_serializations(serializations): request_deserializers = {} response_serializers = {} response_deserializers = {} - for (group, method), serialization in serializations.iteritems(): + for (group, method), serialization in six.iteritems(serializations): request_serializers[group, method] = serialization.serialize_request request_deserializers[group, method] = serialization.deserialize_request response_serializers[group, method] = serialization.serialize_response diff --git a/src/python/grpcio/tests/unit/_crust_over_core_over_links_face_interface_test.py b/src/python/grpcio/tests/unit/_crust_over_core_over_links_face_interface_test.py index 4faaaadc2b5..3be3b051fbd 100644 --- a/src/python/grpcio/tests/unit/_crust_over_core_over_links_face_interface_test.py +++ b/src/python/grpcio/tests/unit/_crust_over_core_over_links_face_interface_test.py @@ -1,4 +1,4 @@ -# Copyright 2015, Google Inc. +# Copyright 2015-2016, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -32,6 +32,8 @@ import collections import unittest +import six + from grpc._adapter import _intermediary_low from grpc._links import invocation from grpc._links import service @@ -59,7 +61,7 @@ def _serialization_behaviors_from_test_methods(test_methods): request_deserializers = {} response_serializers = {} response_deserializers = {} - for (group, method), test_method in test_methods.iteritems(): + for (group, method), test_method in six.iteritems(test_methods): request_serializers[group, method] = test_method.serialize_request request_deserializers[group, method] = test_method.deserialize_request response_serializers[group, method] = test_method.serialize_response @@ -108,7 +110,7 @@ class _Implementation(test_interfaces.Implementation): # _digest.TestServiceDigest. cardinalities = { method: method_object.cardinality() - for (group, method), method_object in methods.iteritems()} + for (group, method), method_object in six.iteritems(methods)} dynamic_stub = crust_implementations.dynamic_stub( invocation_end_link, group, cardinalities, pool) diff --git a/src/python/grpcio/tests/unit/_links/_proto_scenarios.py b/src/python/grpcio/tests/unit/_links/_proto_scenarios.py index f69ff51b167..acd4891390d 100644 --- a/src/python/grpcio/tests/unit/_links/_proto_scenarios.py +++ b/src/python/grpcio/tests/unit/_links/_proto_scenarios.py @@ -1,4 +1,4 @@ -# Copyright 2015, Google Inc. +# Copyright 2015-2016, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -32,13 +32,14 @@ import abc import threading +import six + from tests.unit._junkdrawer import math_pb2 from tests.unit.framework.common import test_constants -class ProtoScenario(object): +class ProtoScenario(six.with_metaclass(abc.ABCMeta)): """An RPC test scenario using protocol buffers.""" - __metaclass__ = abc.ABCMeta @abc.abstractmethod def group_and_method(self): diff --git a/src/python/grpcio/tests/unit/beta/_beta_features_test.py b/src/python/grpcio/tests/unit/beta/_beta_features_test.py index ea44177b499..ebdedcc11eb 100644 --- a/src/python/grpcio/tests/unit/beta/_beta_features_test.py +++ b/src/python/grpcio/tests/unit/beta/_beta_features_test.py @@ -1,4 +1,4 @@ -# Copyright 2015, Google Inc. +# Copyright 2015-2016, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -125,6 +125,9 @@ class _BlockingIterator(object): def __iter__(self): return self + def __next__(self): + return self.next() + def next(self): with self._condition: while True: diff --git a/src/python/grpcio/tests/unit/beta/_face_interface_test.py b/src/python/grpcio/tests/unit/beta/_face_interface_test.py index 1c21dfd03d5..cb302bbf684 100644 --- a/src/python/grpcio/tests/unit/beta/_face_interface_test.py +++ b/src/python/grpcio/tests/unit/beta/_face_interface_test.py @@ -1,4 +1,4 @@ -# Copyright 2015, Google Inc. +# Copyright 2015-2016, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -32,6 +32,8 @@ import collections import unittest +import six + from grpc.beta import implementations from grpc.beta import interfaces from tests.unit import resources @@ -57,7 +59,7 @@ def _serialization_behaviors_from_test_methods(test_methods): request_deserializers = {} response_serializers = {} response_deserializers = {} - for (group, method), test_method in test_methods.iteritems(): + for (group, method), test_method in six.iteritems(test_methods): request_serializers[group, method] = test_method.serialize_request request_deserializers[group, method] = test_method.deserialize_request response_serializers[group, method] = test_method.serialize_response @@ -79,7 +81,7 @@ class _Implementation(test_interfaces.Implementation): # _digest.TestServiceDigest. cardinalities = { method: method_object.cardinality() - for (group, method), method_object in methods.iteritems()} + for (group, method), method_object in six.iteritems(methods)} server_options = implementations.server_options( request_deserializers=serialization_behaviors.request_deserializers, diff --git a/src/python/grpcio/tests/unit/framework/_crust_over_core_face_interface_test.py b/src/python/grpcio/tests/unit/framework/_crust_over_core_face_interface_test.py index 360ecc95d5d..fd2d4298f9a 100644 --- a/src/python/grpcio/tests/unit/framework/_crust_over_core_face_interface_test.py +++ b/src/python/grpcio/tests/unit/framework/_crust_over_core_face_interface_test.py @@ -1,4 +1,4 @@ -# Copyright 2015, Google Inc. +# Copyright 2015-2016, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -32,6 +32,8 @@ import collections import unittest +import six + from grpc.framework.core import implementations as core_implementations from grpc.framework.crust import implementations as crust_implementations from grpc.framework.foundation import logging_pool @@ -66,7 +68,7 @@ class _Implementation(test_interfaces.Implementation): # _digest.TestServiceDigest. cardinalities = { method: method_object.cardinality() - for (group, method), method_object in methods.iteritems()} + for (group, method), method_object in six.iteritems(methods)} dynamic_stub = crust_implementations.dynamic_stub( invocation_end_link, group, cardinalities, pool) diff --git a/src/python/grpcio/tests/unit/framework/common/test_control.py b/src/python/grpcio/tests/unit/framework/common/test_control.py index 8d6eba5c2ca..0387668b112 100644 --- a/src/python/grpcio/tests/unit/framework/common/test_control.py +++ b/src/python/grpcio/tests/unit/framework/common/test_control.py @@ -1,4 +1,4 @@ -# Copyright 2015, Google Inc. +# Copyright 2015-2016, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -33,6 +33,8 @@ import abc import contextlib import threading +import six + class Defect(Exception): """Simulates a programming defect raised into in a system under test. @@ -42,7 +44,7 @@ class Defect(Exception): """ -class Control(object): +class Control(six.with_metaclass(abc.ABCMeta)): """An object that accepts program control from a system under test. Systems under test passed a Control should call its control() method @@ -51,8 +53,6 @@ class Control(object): the system under test to simulate hanging, failing, or functioning. """ - __metaclass__ = abc.ABCMeta - @abc.abstractmethod def control(self): """Potentially does anything.""" diff --git a/src/python/grpcio/tests/unit/framework/common/test_coverage.py b/src/python/grpcio/tests/unit/framework/common/test_coverage.py index a7ed3582c40..184621fb5c4 100644 --- a/src/python/grpcio/tests/unit/framework/common/test_coverage.py +++ b/src/python/grpcio/tests/unit/framework/common/test_coverage.py @@ -1,4 +1,4 @@ -# Copyright 2015, Google Inc. +# Copyright 2015-2016, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -31,13 +31,14 @@ import abc +import six + # This code is designed for use with the unittest module. # pylint: disable=invalid-name -class Coverage(object): +class Coverage(six.with_metaclass(abc.ABCMeta)): """Specification of test coverage.""" - __metaclass__ = abc.ABCMeta @abc.abstractmethod def testSuccessfulUnaryRequestUnaryResponse(self): diff --git a/src/python/grpcio/tests/unit/framework/face/testing/base_util.py b/src/python/grpcio/tests/unit/framework/face/testing/base_util.py index 1df1529b27c..60ab5bc0fe7 100644 --- a/src/python/grpcio/tests/unit/framework/face/testing/base_util.py +++ b/src/python/grpcio/tests/unit/framework/face/testing/base_util.py @@ -1,4 +1,4 @@ -# Copyright 2015, Google Inc. +# Copyright 2015-2016, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -31,6 +31,8 @@ import abc +import six + # interfaces is referenced from specification in this module. from grpc.framework.base import util as _base_util from grpc.framework.base import implementations @@ -43,7 +45,7 @@ _POOL_SIZE_LIMIT = 5 _MAXIMUM_TIMEOUT = 90 -class LinkedPair(object): +class LinkedPair(six.with_metaclass(abc.ABCMeta)): """A Front and Back that are linked to one another. Attributes: @@ -51,8 +53,6 @@ class LinkedPair(object): back: An interfaces.Back. """ - __metaclass__ = abc.ABCMeta - @abc.abstractmethod def shut_down(self): """Shuts down this object and releases its resources.""" diff --git a/src/python/grpcio/tests/unit/framework/face/testing/blocking_invocation_inline_service_test_case.py b/src/python/grpcio/tests/unit/framework/face/testing/blocking_invocation_inline_service_test_case.py index 06135164215..b0b00bfa81a 100644 --- a/src/python/grpcio/tests/unit/framework/face/testing/blocking_invocation_inline_service_test_case.py +++ b/src/python/grpcio/tests/unit/framework/face/testing/blocking_invocation_inline_service_test_case.py @@ -1,4 +1,4 @@ -# Copyright 2015, Google Inc. +# Copyright 2015-2016, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -33,6 +33,8 @@ import abc import unittest # pylint: disable=unused-import +import six + from grpc.framework.face import exceptions from tests.unit.framework.common import test_constants from tests.unit.framework.face.testing import control @@ -43,12 +45,12 @@ from tests.unit.framework.face.testing import test_case class BlockingInvocationInlineServiceTestCase( - test_case.FaceTestCase, coverage.BlockingCoverage): + six.with_metaclass(abc.ABCMeta, + test_case.FaceTestCase, coverage.BlockingCoverage)): """A test of the Face layer of RPC Framework. Concrete subclasses must also extend unittest.TestCase. """ - __metaclass__ = abc.ABCMeta def setUp(self): """See unittest.TestCase.setUp for full specification. @@ -72,7 +74,7 @@ class BlockingInvocationInlineServiceTestCase( def testSuccessfulUnaryRequestUnaryResponse(self): for name, test_messages_sequence in ( - self.digest.unary_unary_messages_sequences.iteritems()): + six.iteritems(self.digest.unary_unary_messages_sequences)): for test_messages in test_messages_sequence: request = test_messages.request() @@ -83,7 +85,7 @@ class BlockingInvocationInlineServiceTestCase( def testSuccessfulUnaryRequestStreamResponse(self): for name, test_messages_sequence in ( - self.digest.unary_stream_messages_sequences.iteritems()): + six.iteritems(self.digest.unary_stream_messages_sequences)): for test_messages in test_messages_sequence: request = test_messages.request() @@ -95,7 +97,7 @@ class BlockingInvocationInlineServiceTestCase( def testSuccessfulStreamRequestUnaryResponse(self): for name, test_messages_sequence in ( - self.digest.stream_unary_messages_sequences.iteritems()): + six.iteritems(self.digest.stream_unary_messages_sequences)): for test_messages in test_messages_sequence: requests = test_messages.requests() @@ -106,7 +108,7 @@ class BlockingInvocationInlineServiceTestCase( def testSuccessfulStreamRequestStreamResponse(self): for name, test_messages_sequence in ( - self.digest.stream_stream_messages_sequences.iteritems()): + six.iteritems(self.digest.stream_stream_messages_sequences)): for test_messages in test_messages_sequence: requests = test_messages.requests() @@ -118,7 +120,7 @@ class BlockingInvocationInlineServiceTestCase( def testSequentialInvocations(self): for name, test_messages_sequence in ( - self.digest.unary_unary_messages_sequences.iteritems()): + six.iteritems(self.digest.unary_unary_messages_sequences)): for test_messages in test_messages_sequence: first_request = test_messages.request() second_request = test_messages.request() @@ -135,7 +137,7 @@ class BlockingInvocationInlineServiceTestCase( def testExpiredUnaryRequestUnaryResponse(self): for name, test_messages_sequence in ( - self.digest.unary_unary_messages_sequences.iteritems()): + six.iteritems(self.digest.unary_unary_messages_sequences)): for test_messages in test_messages_sequence: request = test_messages.request() @@ -146,7 +148,7 @@ class BlockingInvocationInlineServiceTestCase( def testExpiredUnaryRequestStreamResponse(self): for name, test_messages_sequence in ( - self.digest.unary_stream_messages_sequences.iteritems()): + six.iteritems(self.digest.unary_stream_messages_sequences)): for test_messages in test_messages_sequence: request = test_messages.request() @@ -158,7 +160,7 @@ class BlockingInvocationInlineServiceTestCase( def testExpiredStreamRequestUnaryResponse(self): for name, test_messages_sequence in ( - self.digest.stream_unary_messages_sequences.iteritems()): + six.iteritems(self.digest.stream_unary_messages_sequences)): for test_messages in test_messages_sequence: requests = test_messages.requests() @@ -169,7 +171,7 @@ class BlockingInvocationInlineServiceTestCase( def testExpiredStreamRequestStreamResponse(self): for name, test_messages_sequence in ( - self.digest.stream_stream_messages_sequences.iteritems()): + six.iteritems(self.digest.stream_stream_messages_sequences)): for test_messages in test_messages_sequence: requests = test_messages.requests() @@ -181,7 +183,7 @@ class BlockingInvocationInlineServiceTestCase( def testFailedUnaryRequestUnaryResponse(self): for name, test_messages_sequence in ( - self.digest.unary_unary_messages_sequences.iteritems()): + six.iteritems(self.digest.unary_unary_messages_sequences)): for test_messages in test_messages_sequence: request = test_messages.request() @@ -191,7 +193,7 @@ class BlockingInvocationInlineServiceTestCase( def testFailedUnaryRequestStreamResponse(self): for name, test_messages_sequence in ( - self.digest.unary_stream_messages_sequences.iteritems()): + six.iteritems(self.digest.unary_stream_messages_sequences)): for test_messages in test_messages_sequence: request = test_messages.request() @@ -202,7 +204,7 @@ class BlockingInvocationInlineServiceTestCase( def testFailedStreamRequestUnaryResponse(self): for name, test_messages_sequence in ( - self.digest.stream_unary_messages_sequences.iteritems()): + six.iteritems(self.digest.stream_unary_messages_sequences)): for test_messages in test_messages_sequence: requests = test_messages.requests() @@ -212,7 +214,7 @@ class BlockingInvocationInlineServiceTestCase( def testFailedStreamRequestStreamResponse(self): for name, test_messages_sequence in ( - self.digest.stream_stream_messages_sequences.iteritems()): + six.iteritems(self.digest.stream_stream_messages_sequences)): for test_messages in test_messages_sequence: requests = test_messages.requests() diff --git a/src/python/grpcio/tests/unit/framework/face/testing/control.py b/src/python/grpcio/tests/unit/framework/face/testing/control.py index 3960c4e6495..0d40331e197 100644 --- a/src/python/grpcio/tests/unit/framework/face/testing/control.py +++ b/src/python/grpcio/tests/unit/framework/face/testing/control.py @@ -1,4 +1,4 @@ -# Copyright 2015, Google Inc. +# Copyright 2015-2016, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -33,8 +33,10 @@ import abc import contextlib import threading +import six -class Control(object): + +class Control(six.with_metaclass(abc.ABCMeta)): """An object that accepts program control from a system under test. Systems under test passed a Control should call its control() method @@ -43,8 +45,6 @@ class Control(object): the system under test to simulate hanging, failing, or functioning. """ - __metaclass__ = abc.ABCMeta - @abc.abstractmethod def control(self): """Potentially does anything.""" diff --git a/src/python/grpcio/tests/unit/framework/face/testing/coverage.py b/src/python/grpcio/tests/unit/framework/face/testing/coverage.py index f3aca113fe7..9f5381069d4 100644 --- a/src/python/grpcio/tests/unit/framework/face/testing/coverage.py +++ b/src/python/grpcio/tests/unit/framework/face/testing/coverage.py @@ -1,4 +1,4 @@ -# Copyright 2015, Google Inc. +# Copyright 2015-2016, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -31,15 +31,15 @@ import abc +import six + # These classes are only valid when inherited by unittest.TestCases. # pylint: disable=invalid-name -class BlockingCoverage(object): +class BlockingCoverage(six.with_metaclass(abc.ABCMeta)): """Specification of test coverage for blocking behaviors.""" - __metaclass__ = abc.ABCMeta - @abc.abstractmethod def testSuccessfulUnaryRequestUnaryResponse(self): raise NotImplementedError() @@ -93,11 +93,9 @@ class BlockingCoverage(object): raise NotImplementedError() -class FullCoverage(BlockingCoverage): +class FullCoverage(six.with_metaclass(abc.ABCMeta, BlockingCoverage)): """Specification of test coverage for non-blocking behaviors.""" - __metaclass__ = abc.ABCMeta - @abc.abstractmethod def testParallelInvocations(self): raise NotImplementedError() diff --git a/src/python/grpcio/tests/unit/framework/face/testing/digest.py b/src/python/grpcio/tests/unit/framework/face/testing/digest.py index 39f28b9657f..100067cc833 100644 --- a/src/python/grpcio/tests/unit/framework/face/testing/digest.py +++ b/src/python/grpcio/tests/unit/framework/face/testing/digest.py @@ -1,4 +1,4 @@ -# Copyright 2015, Google Inc. +# Copyright 2015-2016, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -32,6 +32,8 @@ import collections import threading +import six + # testing_control, interfaces, and testing_service are referenced from # specification in this module. from grpc.framework.common import cardinality @@ -368,7 +370,7 @@ def _assemble( events = {} adaptations = {} messages = {} - for name, scenario in scenarios.iteritems(): + for name, scenario in six.iteritems(scenarios): if name in names: raise ValueError('Repeated name "%s"!' % name) diff --git a/src/python/grpcio/tests/unit/framework/face/testing/event_invocation_synchronous_event_service_test_case.py b/src/python/grpcio/tests/unit/framework/face/testing/event_invocation_synchronous_event_service_test_case.py index 179f3a2f67c..db901cfe4ef 100644 --- a/src/python/grpcio/tests/unit/framework/face/testing/event_invocation_synchronous_event_service_test_case.py +++ b/src/python/grpcio/tests/unit/framework/face/testing/event_invocation_synchronous_event_service_test_case.py @@ -1,4 +1,4 @@ -# Copyright 2015, Google Inc. +# Copyright 2015-2016, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -32,6 +32,8 @@ import abc import unittest +import six + from grpc.framework.face import interfaces from tests.unit.framework.common import test_constants from tests.unit.framework.face.testing import callback as testing_callback @@ -43,12 +45,12 @@ from tests.unit.framework.face.testing import test_case class EventInvocationSynchronousEventServiceTestCase( - test_case.FaceTestCase, coverage.FullCoverage): + six.with_metaclass(abc.ABCMeta, + test_case.FaceTestCase, coverage.FullCoverage)): """A test of the Face layer of RPC Framework. Concrete subclasses must also extend unittest.TestCase. """ - __metaclass__ = abc.ABCMeta def setUp(self): """See unittest.TestCase.setUp for full specification. @@ -72,7 +74,7 @@ class EventInvocationSynchronousEventServiceTestCase( def testSuccessfulUnaryRequestUnaryResponse(self): for name, test_messages_sequence in ( - self.digest.unary_unary_messages_sequences.iteritems()): + six.iteritems(self.digest.unary_unary_messages_sequences)): for test_messages in test_messages_sequence: request = test_messages.request() callback = testing_callback.Callback() @@ -87,7 +89,7 @@ class EventInvocationSynchronousEventServiceTestCase( def testSuccessfulUnaryRequestStreamResponse(self): for name, test_messages_sequence in ( - self.digest.unary_stream_messages_sequences.iteritems()): + six.iteritems(self.digest.unary_stream_messages_sequences)): for test_messages in test_messages_sequence: request = test_messages.request() callback = testing_callback.Callback() @@ -102,7 +104,7 @@ class EventInvocationSynchronousEventServiceTestCase( def testSuccessfulStreamRequestUnaryResponse(self): for name, test_messages_sequence in ( - self.digest.stream_unary_messages_sequences.iteritems()): + six.iteritems(self.digest.stream_unary_messages_sequences)): for test_messages in test_messages_sequence: requests = test_messages.requests() callback = testing_callback.Callback() @@ -120,7 +122,7 @@ class EventInvocationSynchronousEventServiceTestCase( def testSuccessfulStreamRequestStreamResponse(self): for name, test_messages_sequence in ( - self.digest.stream_stream_messages_sequences.iteritems()): + six.iteritems(self.digest.stream_stream_messages_sequences)): for test_messages in test_messages_sequence: requests = test_messages.requests() callback = testing_callback.Callback() @@ -138,7 +140,7 @@ class EventInvocationSynchronousEventServiceTestCase( def testSequentialInvocations(self): # pylint: disable=cell-var-from-loop for name, test_messages_sequence in ( - self.digest.unary_unary_messages_sequences.iteritems()): + six.iteritems(self.digest.unary_unary_messages_sequences)): for test_messages in test_messages_sequence: first_request = test_messages.request() second_request = test_messages.request() @@ -163,7 +165,7 @@ class EventInvocationSynchronousEventServiceTestCase( def testExpiredUnaryRequestUnaryResponse(self): for name, test_messages_sequence in ( - self.digest.unary_unary_messages_sequences.iteritems()): + six.iteritems(self.digest.unary_unary_messages_sequences)): for test_messages in test_messages_sequence: request = test_messages.request() callback = testing_callback.Callback() @@ -178,7 +180,7 @@ class EventInvocationSynchronousEventServiceTestCase( def testExpiredUnaryRequestStreamResponse(self): for name, test_messages_sequence in ( - self.digest.unary_stream_messages_sequences.iteritems()): + six.iteritems(self.digest.unary_stream_messages_sequences)): for test_messages in test_messages_sequence: request = test_messages.request() callback = testing_callback.Callback() @@ -193,7 +195,7 @@ class EventInvocationSynchronousEventServiceTestCase( def testExpiredStreamRequestUnaryResponse(self): for name, test_messages_sequence in ( - self.digest.stream_unary_messages_sequences.iteritems()): + six.iteritems(self.digest.stream_unary_messages_sequences)): for unused_test_messages in test_messages_sequence: callback = testing_callback.Callback() @@ -206,7 +208,7 @@ class EventInvocationSynchronousEventServiceTestCase( def testExpiredStreamRequestStreamResponse(self): for name, test_messages_sequence in ( - self.digest.stream_stream_messages_sequences.iteritems()): + six.iteritems(self.digest.stream_stream_messages_sequences)): for test_messages in test_messages_sequence: requests = test_messages.requests() callback = testing_callback.Callback() @@ -221,7 +223,7 @@ class EventInvocationSynchronousEventServiceTestCase( def testFailedUnaryRequestUnaryResponse(self): for name, test_messages_sequence in ( - self.digest.unary_unary_messages_sequences.iteritems()): + six.iteritems(self.digest.unary_unary_messages_sequences)): for test_messages in test_messages_sequence: request = test_messages.request() callback = testing_callback.Callback() @@ -237,7 +239,7 @@ class EventInvocationSynchronousEventServiceTestCase( def testFailedUnaryRequestStreamResponse(self): for name, test_messages_sequence in ( - self.digest.unary_stream_messages_sequences.iteritems()): + six.iteritems(self.digest.unary_stream_messages_sequences)): for test_messages in test_messages_sequence: request = test_messages.request() callback = testing_callback.Callback() @@ -253,7 +255,7 @@ class EventInvocationSynchronousEventServiceTestCase( def testFailedStreamRequestUnaryResponse(self): for name, test_messages_sequence in ( - self.digest.stream_unary_messages_sequences.iteritems()): + six.iteritems(self.digest.stream_unary_messages_sequences)): for test_messages in test_messages_sequence: requests = test_messages.requests() callback = testing_callback.Callback() @@ -272,7 +274,7 @@ class EventInvocationSynchronousEventServiceTestCase( def testFailedStreamRequestStreamResponse(self): for name, test_messages_sequence in ( - self.digest.stream_stream_messages_sequences.iteritems()): + six.iteritems(self.digest.stream_stream_messages_sequences)): for test_messages in test_messages_sequence: requests = test_messages.requests() callback = testing_callback.Callback() @@ -289,7 +291,7 @@ class EventInvocationSynchronousEventServiceTestCase( def testParallelInvocations(self): for name, test_messages_sequence in ( - self.digest.unary_unary_messages_sequences.iteritems()): + six.iteritems(self.digest.unary_unary_messages_sequences)): for test_messages in test_messages_sequence: first_request = test_messages.request() first_callback = testing_callback.Callback() @@ -316,7 +318,7 @@ class EventInvocationSynchronousEventServiceTestCase( def testCancelledUnaryRequestUnaryResponse(self): for name, test_messages_sequence in ( - self.digest.unary_unary_messages_sequences.iteritems()): + six.iteritems(self.digest.unary_unary_messages_sequences)): for test_messages in test_messages_sequence: request = test_messages.request() callback = testing_callback.Callback() @@ -332,7 +334,7 @@ class EventInvocationSynchronousEventServiceTestCase( def testCancelledUnaryRequestStreamResponse(self): for name, test_messages_sequence in ( - self.digest.unary_stream_messages_sequences.iteritems()): + six.iteritems(self.digest.unary_stream_messages_sequences)): for test_messages in test_messages_sequence: request = test_messages.request() callback = testing_callback.Callback() @@ -347,7 +349,7 @@ class EventInvocationSynchronousEventServiceTestCase( def testCancelledStreamRequestUnaryResponse(self): for name, test_messages_sequence in ( - self.digest.stream_unary_messages_sequences.iteritems()): + six.iteritems(self.digest.stream_unary_messages_sequences)): for test_messages in test_messages_sequence: requests = test_messages.requests() callback = testing_callback.Callback() @@ -364,7 +366,7 @@ class EventInvocationSynchronousEventServiceTestCase( def testCancelledStreamRequestStreamResponse(self): for name, test_messages_sequence in ( - self.digest.stream_stream_messages_sequences.iteritems()): + six.iteritems(self.digest.stream_stream_messages_sequences)): for unused_test_messages in test_messages_sequence: callback = testing_callback.Callback() diff --git a/src/python/grpcio/tests/unit/framework/face/testing/future_invocation_asynchronous_event_service_test_case.py b/src/python/grpcio/tests/unit/framework/face/testing/future_invocation_asynchronous_event_service_test_case.py index 485524a3563..d8706aa39ec 100644 --- a/src/python/grpcio/tests/unit/framework/face/testing/future_invocation_asynchronous_event_service_test_case.py +++ b/src/python/grpcio/tests/unit/framework/face/testing/future_invocation_asynchronous_event_service_test_case.py @@ -1,4 +1,4 @@ -# Copyright 2015, Google Inc. +# Copyright 2015-2016, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -34,6 +34,8 @@ import contextlib import threading import unittest +import six + from grpc.framework.face import exceptions from grpc.framework.foundation import future from grpc.framework.foundation import logging_pool @@ -66,6 +68,9 @@ class _PauseableIterator(object): def __iter__(self): return self + def __next__(self): + return self.next() + def next(self): with self._condition: while self._paused: @@ -74,12 +79,12 @@ class _PauseableIterator(object): class FutureInvocationAsynchronousEventServiceTestCase( - test_case.FaceTestCase, coverage.FullCoverage): + six.with_metaclass(abc.ABCMeta, + test_case.FaceTestCase, coverage.FullCoverage)): """A test of the Face layer of RPC Framework. Concrete subclasses must also extend unittest.TestCase. """ - __metaclass__ = abc.ABCMeta def setUp(self): """See unittest.TestCase.setUp for full specification. @@ -105,7 +110,7 @@ class FutureInvocationAsynchronousEventServiceTestCase( def testSuccessfulUnaryRequestUnaryResponse(self): for name, test_messages_sequence in ( - self.digest.unary_unary_messages_sequences.iteritems()): + six.iteritems(self.digest.unary_unary_messages_sequences)): for test_messages in test_messages_sequence: request = test_messages.request() @@ -117,7 +122,7 @@ class FutureInvocationAsynchronousEventServiceTestCase( def testSuccessfulUnaryRequestStreamResponse(self): for name, test_messages_sequence in ( - self.digest.unary_stream_messages_sequences.iteritems()): + six.iteritems(self.digest.unary_stream_messages_sequences)): for test_messages in test_messages_sequence: request = test_messages.request() @@ -129,7 +134,7 @@ class FutureInvocationAsynchronousEventServiceTestCase( def testSuccessfulStreamRequestUnaryResponse(self): for name, test_messages_sequence in ( - self.digest.stream_unary_messages_sequences.iteritems()): + six.iteritems(self.digest.stream_unary_messages_sequences)): for test_messages in test_messages_sequence: requests = test_messages.requests() request_iterator = _PauseableIterator(iter(requests)) @@ -145,7 +150,7 @@ class FutureInvocationAsynchronousEventServiceTestCase( def testSuccessfulStreamRequestStreamResponse(self): for name, test_messages_sequence in ( - self.digest.stream_stream_messages_sequences.iteritems()): + six.iteritems(self.digest.stream_stream_messages_sequences)): for test_messages in test_messages_sequence: requests = test_messages.requests() request_iterator = _PauseableIterator(iter(requests)) @@ -161,7 +166,7 @@ class FutureInvocationAsynchronousEventServiceTestCase( def testSequentialInvocations(self): for name, test_messages_sequence in ( - self.digest.unary_unary_messages_sequences.iteritems()): + six.iteritems(self.digest.unary_unary_messages_sequences)): for test_messages in test_messages_sequence: first_request = test_messages.request() second_request = test_messages.request() @@ -180,7 +185,7 @@ class FutureInvocationAsynchronousEventServiceTestCase( def testExpiredUnaryRequestUnaryResponse(self): for name, test_messages_sequence in ( - self.digest.unary_unary_messages_sequences.iteritems()): + six.iteritems(self.digest.unary_unary_messages_sequences)): for test_messages in test_messages_sequence: request = test_messages.request() @@ -195,7 +200,7 @@ class FutureInvocationAsynchronousEventServiceTestCase( def testExpiredUnaryRequestStreamResponse(self): for name, test_messages_sequence in ( - self.digest.unary_stream_messages_sequences.iteritems()): + six.iteritems(self.digest.unary_stream_messages_sequences)): for test_messages in test_messages_sequence: request = test_messages.request() @@ -207,7 +212,7 @@ class FutureInvocationAsynchronousEventServiceTestCase( def testExpiredStreamRequestUnaryResponse(self): for name, test_messages_sequence in ( - self.digest.stream_unary_messages_sequences.iteritems()): + six.iteritems(self.digest.stream_unary_messages_sequences)): for test_messages in test_messages_sequence: requests = test_messages.requests() @@ -222,7 +227,7 @@ class FutureInvocationAsynchronousEventServiceTestCase( def testExpiredStreamRequestStreamResponse(self): for name, test_messages_sequence in ( - self.digest.stream_stream_messages_sequences.iteritems()): + six.iteritems(self.digest.stream_stream_messages_sequences)): for test_messages in test_messages_sequence: requests = test_messages.requests() @@ -234,7 +239,7 @@ class FutureInvocationAsynchronousEventServiceTestCase( def testFailedUnaryRequestUnaryResponse(self): for name, test_messages_sequence in ( - self.digest.unary_unary_messages_sequences.iteritems()): + six.iteritems(self.digest.unary_unary_messages_sequences)): for test_messages in test_messages_sequence: request = test_messages.request() @@ -253,7 +258,7 @@ class FutureInvocationAsynchronousEventServiceTestCase( def testFailedUnaryRequestStreamResponse(self): for name, test_messages_sequence in ( - self.digest.unary_stream_messages_sequences.iteritems()): + six.iteritems(self.digest.unary_stream_messages_sequences)): for test_messages in test_messages_sequence: request = test_messages.request() @@ -268,7 +273,7 @@ class FutureInvocationAsynchronousEventServiceTestCase( def testFailedStreamRequestUnaryResponse(self): for name, test_messages_sequence in ( - self.digest.stream_unary_messages_sequences.iteritems()): + six.iteritems(self.digest.stream_unary_messages_sequences)): for test_messages in test_messages_sequence: requests = test_messages.requests() @@ -287,7 +292,7 @@ class FutureInvocationAsynchronousEventServiceTestCase( def testFailedStreamRequestStreamResponse(self): for name, test_messages_sequence in ( - self.digest.stream_stream_messages_sequences.iteritems()): + six.iteritems(self.digest.stream_stream_messages_sequences)): for test_messages in test_messages_sequence: requests = test_messages.requests() @@ -302,7 +307,7 @@ class FutureInvocationAsynchronousEventServiceTestCase( def testParallelInvocations(self): for name, test_messages_sequence in ( - self.digest.unary_unary_messages_sequences.iteritems()): + six.iteritems(self.digest.unary_unary_messages_sequences)): for test_messages in test_messages_sequence: first_request = test_messages.request() second_request = test_messages.request() @@ -324,7 +329,7 @@ class FutureInvocationAsynchronousEventServiceTestCase( def testCancelledUnaryRequestUnaryResponse(self): for name, test_messages_sequence in ( - self.digest.unary_unary_messages_sequences.iteritems()): + six.iteritems(self.digest.unary_unary_messages_sequences)): for test_messages in test_messages_sequence: request = test_messages.request() @@ -338,7 +343,7 @@ class FutureInvocationAsynchronousEventServiceTestCase( def testCancelledUnaryRequestStreamResponse(self): for name, test_messages_sequence in ( - self.digest.unary_stream_messages_sequences.iteritems()): + six.iteritems(self.digest.unary_stream_messages_sequences)): for test_messages in test_messages_sequence: request = test_messages.request() @@ -352,7 +357,7 @@ class FutureInvocationAsynchronousEventServiceTestCase( def testCancelledStreamRequestUnaryResponse(self): for name, test_messages_sequence in ( - self.digest.stream_unary_messages_sequences.iteritems()): + six.iteritems(self.digest.stream_unary_messages_sequences)): for test_messages in test_messages_sequence: requests = test_messages.requests() @@ -366,7 +371,7 @@ class FutureInvocationAsynchronousEventServiceTestCase( def testCancelledStreamRequestStreamResponse(self): for name, test_messages_sequence in ( - self.digest.stream_stream_messages_sequences.iteritems()): + six.iteritems(self.digest.stream_stream_messages_sequences)): for test_messages in test_messages_sequence: requests = test_messages.requests() diff --git a/src/python/grpcio/tests/unit/framework/face/testing/interfaces.py b/src/python/grpcio/tests/unit/framework/face/testing/interfaces.py index 5932dabf1eb..87be836e2d0 100644 --- a/src/python/grpcio/tests/unit/framework/face/testing/interfaces.py +++ b/src/python/grpcio/tests/unit/framework/face/testing/interfaces.py @@ -1,4 +1,4 @@ -# Copyright 2015, Google Inc. +# Copyright 2015-2016, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -31,13 +31,14 @@ import abc +import six + # cardinality is referenced from specification in this module. from grpc.framework.common import cardinality # pylint: disable=unused-import -class Method(object): +class Method(six.with_metaclass(abc.ABCMeta)): """An RPC method to be used in tests of RPC implementations.""" - __metaclass__ = abc.ABCMeta @abc.abstractmethod def name(self): diff --git a/src/python/grpcio/tests/unit/framework/face/testing/service.py b/src/python/grpcio/tests/unit/framework/face/testing/service.py index ac0b89b6eef..dc0f204c04b 100644 --- a/src/python/grpcio/tests/unit/framework/face/testing/service.py +++ b/src/python/grpcio/tests/unit/framework/face/testing/service.py @@ -1,4 +1,4 @@ -# Copyright 2015, Google Inc. +# Copyright 2015-2016, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -31,16 +31,16 @@ import abc +import six + # interfaces is referenced from specification in this module. from grpc.framework.face import interfaces as face_interfaces # pylint: disable=unused-import from tests.unit.framework.face.testing import interfaces -class UnaryUnaryTestMethodImplementation(interfaces.Method): +class UnaryUnaryTestMethodImplementation(six.with_metaclass(abc.ABCMeta, interfaces.Method)): """A controllable implementation of a unary-unary RPC method.""" - __metaclass__ = abc.ABCMeta - @abc.abstractmethod def service(self, request, response_callback, context, control): """Services an RPC that accepts one message and produces one message. @@ -59,11 +59,9 @@ class UnaryUnaryTestMethodImplementation(interfaces.Method): raise NotImplementedError() -class UnaryUnaryTestMessages(object): +class UnaryUnaryTestMessages(six.with_metaclass(abc.ABCMeta)): """A type for unary-request-unary-response message pairings.""" - __metaclass__ = abc.ABCMeta - @abc.abstractmethod def request(self): """Affords a request message. @@ -93,11 +91,9 @@ class UnaryUnaryTestMessages(object): raise NotImplementedError() -class UnaryStreamTestMethodImplementation(interfaces.Method): +class UnaryStreamTestMethodImplementation(six.with_metaclass(abc.ABCMeta, interfaces.Method)): """A controllable implementation of a unary-stream RPC method.""" - __metaclass__ = abc.ABCMeta - @abc.abstractmethod def service(self, request, response_consumer, context, control): """Services an RPC that takes one message and produces a stream of messages. @@ -116,11 +112,9 @@ class UnaryStreamTestMethodImplementation(interfaces.Method): raise NotImplementedError() -class UnaryStreamTestMessages(object): +class UnaryStreamTestMessages(six.with_metaclass(abc.ABCMeta)): """A type for unary-request-stream-response message pairings.""" - __metaclass__ = abc.ABCMeta - @abc.abstractmethod def request(self): """Affords a request message. @@ -150,11 +144,9 @@ class UnaryStreamTestMessages(object): raise NotImplementedError() -class StreamUnaryTestMethodImplementation(interfaces.Method): +class StreamUnaryTestMethodImplementation(six.with_metaclass(abc.ABCMeta, interfaces.Method)): """A controllable implementation of a stream-unary RPC method.""" - __metaclass__ = abc.ABCMeta - @abc.abstractmethod def service(self, response_callback, context, control): """Services an RPC that takes a stream of messages and produces one message. @@ -180,11 +172,9 @@ class StreamUnaryTestMethodImplementation(interfaces.Method): raise NotImplementedError() -class StreamUnaryTestMessages(object): +class StreamUnaryTestMessages(six.with_metaclass(abc.ABCMeta)): """A type for stream-request-unary-response message pairings.""" - __metaclass__ = abc.ABCMeta - @abc.abstractmethod def requests(self): """Affords a sequence of request messages. @@ -214,11 +204,9 @@ class StreamUnaryTestMessages(object): raise NotImplementedError() -class StreamStreamTestMethodImplementation(interfaces.Method): +class StreamStreamTestMethodImplementation(six.with_metaclass(abc.ABCMeta, interfaces.Method)): """A controllable implementation of a stream-stream RPC method.""" - __metaclass__ = abc.ABCMeta - @abc.abstractmethod def service(self, response_consumer, context, control): """Services an RPC that accepts and produces streams of messages. @@ -244,11 +232,9 @@ class StreamStreamTestMethodImplementation(interfaces.Method): raise NotImplementedError() -class StreamStreamTestMessages(object): +class StreamStreamTestMessages(six.with_metaclass(abc.ABCMeta)): """A type for stream-request-stream-response message pairings.""" - __metaclass__ = abc.ABCMeta - @abc.abstractmethod def requests(self): """Affords a sequence of request messages. @@ -278,11 +264,9 @@ class StreamStreamTestMessages(object): raise NotImplementedError() -class TestService(object): +class TestService(six.with_metaclass(abc.ABCMeta)): """A specification of implemented RPC methods to use in tests.""" - __metaclass__ = abc.ABCMeta - @abc.abstractmethod def name(self): """Identifies the RPC service name used during the test. diff --git a/src/python/grpcio/tests/unit/framework/face/testing/test_case.py b/src/python/grpcio/tests/unit/framework/face/testing/test_case.py index 23d4d919c23..5be9330a774 100644 --- a/src/python/grpcio/tests/unit/framework/face/testing/test_case.py +++ b/src/python/grpcio/tests/unit/framework/face/testing/test_case.py @@ -1,4 +1,4 @@ -# Copyright 2015, Google Inc. +# Copyright 2015-2016, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -31,18 +31,19 @@ import abc +import six + # face_interfaces and interfaces are referenced in specification in this module. from grpc.framework.face import interfaces as face_interfaces # pylint: disable=unused-import from tests.unit.framework.face.testing import interfaces # pylint: disable=unused-import -class FaceTestCase(object): +class FaceTestCase(six.with_metaclass(abc.ABCMeta)): """Describes a test of the Face Layer of RPC Framework. Concrete subclasses must also inherit from unittest.TestCase and from at least one class that defines test methods. """ - __metaclass__ = abc.ABCMeta @abc.abstractmethod def set_up_implementation( diff --git a/src/python/grpcio/tests/unit/framework/interfaces/base/_control.py b/src/python/grpcio/tests/unit/framework/interfaces/base/_control.py index 38102b198a7..94bcc1428e2 100644 --- a/src/python/grpcio/tests/unit/framework/interfaces/base/_control.py +++ b/src/python/grpcio/tests/unit/framework/interfaces/base/_control.py @@ -1,4 +1,4 @@ -# Copyright 2015, Google Inc. +# Copyright 2015-2016, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -29,6 +29,8 @@ """Part of the tests of the base interface of RPC Framework.""" +from __future__ import division + import abc import collections import enum @@ -36,6 +38,8 @@ import random # pylint: disable=unused-import import threading import time +import six + from grpc.framework.interfaces.base import base from tests.unit.framework.common import test_constants from tests.unit.framework.interfaces.base import _sequence @@ -45,8 +49,8 @@ from tests.unit.framework.interfaces.base import test_interfaces # pylint: disa _GROUP = 'base test cases test group' _METHOD = 'base test cases test method' -_PAYLOAD_RANDOM_SECTION_MAXIMUM_SIZE = test_constants.PAYLOAD_SIZE / 20 -_MINIMUM_PAYLOAD_SIZE = test_constants.PAYLOAD_SIZE / 600 +_PAYLOAD_RANDOM_SECTION_MAXIMUM_SIZE = test_constants.PAYLOAD_SIZE // 20 +_MINIMUM_PAYLOAD_SIZE = test_constants.PAYLOAD_SIZE // 600 def _create_payload(randomness): @@ -57,7 +61,7 @@ def _create_payload(randomness): random_section = bytes( bytearray( randomness.getrandbits(8) for _ in range(random_section_length))) - sevens_section = '\x07' * (length - random_section_length) + sevens_section = b'\x07' * (length - random_section_length) return b''.join(randomness.sample((random_section, sevens_section), 2)) @@ -247,8 +251,7 @@ class Instruction( CONCLUDE = 'CONCLUDE' -class Controller(object): - __metaclass__ = abc.ABCMeta +class Controller(six.with_metaclass(abc.ABCMeta)): @abc.abstractmethod def failed(self, message): @@ -308,8 +311,7 @@ class Controller(object): raise NotImplementedError() -class ControllerCreator(object): - __metaclass__ = abc.ABCMeta +class ControllerCreator(six.with_metaclass(abc.ABCMeta)): @abc.abstractmethod def name(self): @@ -385,13 +387,13 @@ class _SequenceController(Controller): return request + request def deserialize_request(self, serialized_request): - return serialized_request[:len(serialized_request) / 2] + return serialized_request[:len(serialized_request) // 2] def serialize_response(self, response): return response * 3 def deserialize_response(self, serialized_response): - return serialized_response[2 * len(serialized_response) / 3:] + return serialized_response[2 * len(serialized_response) // 3:] def invocation(self): with self._condition: diff --git a/src/python/grpcio/tests/unit/framework/interfaces/base/test_interfaces.py b/src/python/grpcio/tests/unit/framework/interfaces/base/test_interfaces.py index 84afd24d478..0594cfeb314 100644 --- a/src/python/grpcio/tests/unit/framework/interfaces/base/test_interfaces.py +++ b/src/python/grpcio/tests/unit/framework/interfaces/base/test_interfaces.py @@ -1,4 +1,4 @@ -# Copyright 2015, Google Inc. +# Copyright 2015-2016, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -31,12 +31,13 @@ import abc +import six + from grpc.framework.interfaces.base import base # pylint: disable=unused-import -class Serialization(object): +class Serialization(six.with_metaclass(abc.ABCMeta)): """Specifies serialization and deserialization of test payloads.""" - __metaclass__ = abc.ABCMeta def serialize_request(self, request): """Serializes a request value used in a test. @@ -85,9 +86,8 @@ class Serialization(object): raise NotImplementedError() -class Implementation(object): +class Implementation(six.with_metaclass(abc.ABCMeta)): """Specifies an implementation of the Base layer.""" - __metaclass__ = abc.ABCMeta @abc.abstractmethod def instantiate(self, serializations, servicer): diff --git a/src/python/grpcio/tests/unit/framework/interfaces/face/_blocking_invocation_inline_service.py b/src/python/grpcio/tests/unit/framework/interfaces/face/_blocking_invocation_inline_service.py index c8a3a1bc749..936b87f5976 100644 --- a/src/python/grpcio/tests/unit/framework/interfaces/face/_blocking_invocation_inline_service.py +++ b/src/python/grpcio/tests/unit/framework/interfaces/face/_blocking_invocation_inline_service.py @@ -29,11 +29,15 @@ """Test code for the Face layer of RPC Framework.""" +from __future__ import division + import abc import itertools import unittest from concurrent import futures +import six + # test_interfaces is referenced from specification in this module. from grpc.framework.foundation import logging_pool from grpc.framework.interfaces.face import face @@ -46,14 +50,13 @@ from tests.unit.framework.interfaces.face import _stock_service from tests.unit.framework.interfaces.face import test_interfaces # pylint: disable=unused-import -class TestCase(test_coverage.Coverage, unittest.TestCase): +class TestCase(six.with_metaclass(abc.ABCMeta, test_coverage.Coverage, unittest.TestCase)): """A test of the Face layer of RPC Framework. Concrete subclasses must have an "implementation" attribute of type test_interfaces.Implementation and an "invoker_constructor" attribute of type _invocation.InvokerConstructor. """ - __metaclass__ = abc.ABCMeta NAME = 'BlockingInvocationInlineServiceTest' @@ -81,7 +84,7 @@ class TestCase(test_coverage.Coverage, unittest.TestCase): def testSuccessfulUnaryRequestUnaryResponse(self): for (group, method), test_messages_sequence in ( - self._digest.unary_unary_messages_sequences.iteritems()): + six.iteritems(self._digest.unary_unary_messages_sequences)): for test_messages in test_messages_sequence: request = test_messages.request() @@ -92,7 +95,7 @@ class TestCase(test_coverage.Coverage, unittest.TestCase): def testSuccessfulUnaryRequestStreamResponse(self): for (group, method), test_messages_sequence in ( - self._digest.unary_stream_messages_sequences.iteritems()): + six.iteritems(self._digest.unary_stream_messages_sequences)): for test_messages in test_messages_sequence: request = test_messages.request() @@ -104,7 +107,7 @@ class TestCase(test_coverage.Coverage, unittest.TestCase): def testSuccessfulStreamRequestUnaryResponse(self): for (group, method), test_messages_sequence in ( - self._digest.stream_unary_messages_sequences.iteritems()): + six.iteritems(self._digest.stream_unary_messages_sequences)): for test_messages in test_messages_sequence: requests = test_messages.requests() @@ -115,7 +118,7 @@ class TestCase(test_coverage.Coverage, unittest.TestCase): def testSuccessfulStreamRequestStreamResponse(self): for (group, method), test_messages_sequence in ( - self._digest.stream_stream_messages_sequences.iteritems()): + six.iteritems(self._digest.stream_stream_messages_sequences)): for test_messages in test_messages_sequence: requests = test_messages.requests() @@ -127,7 +130,7 @@ class TestCase(test_coverage.Coverage, unittest.TestCase): def testSequentialInvocations(self): for (group, method), test_messages_sequence in ( - self._digest.unary_unary_messages_sequences.iteritems()): + six.iteritems(self._digest.unary_unary_messages_sequences)): for test_messages in test_messages_sequence: first_request = test_messages.request() second_request = test_messages.request() @@ -145,7 +148,7 @@ class TestCase(test_coverage.Coverage, unittest.TestCase): def testParallelInvocations(self): pool = logging_pool.pool(test_constants.PARALLELISM) for (group, method), test_messages_sequence in ( - self._digest.unary_unary_messages_sequences.iteritems()): + six.iteritems(self._digest.unary_unary_messages_sequences)): for test_messages in test_messages_sequence: requests = [] response_futures = [] @@ -167,7 +170,7 @@ class TestCase(test_coverage.Coverage, unittest.TestCase): def testWaitingForSomeButNotAllParallelInvocations(self): pool = logging_pool.pool(test_constants.PARALLELISM) for (group, method), test_messages_sequence in ( - self._digest.unary_unary_messages_sequences.iteritems()): + six.iteritems(self._digest.unary_unary_messages_sequences)): for test_messages in test_messages_sequence: requests = [] response_futures_to_indices = {} @@ -181,7 +184,7 @@ class TestCase(test_coverage.Coverage, unittest.TestCase): some_completed_response_futures_iterator = itertools.islice( futures.as_completed(response_futures_to_indices), - test_constants.PARALLELISM / 2) + test_constants.PARALLELISM // 2) for response_future in some_completed_response_futures_iterator: index = response_futures_to_indices[response_future] test_messages.verify(requests[index], response_future.result(), self) @@ -205,7 +208,7 @@ class TestCase(test_coverage.Coverage, unittest.TestCase): def testExpiredUnaryRequestUnaryResponse(self): for (group, method), test_messages_sequence in ( - self._digest.unary_unary_messages_sequences.iteritems()): + six.iteritems(self._digest.unary_unary_messages_sequences)): for test_messages in test_messages_sequence: request = test_messages.request() @@ -216,7 +219,7 @@ class TestCase(test_coverage.Coverage, unittest.TestCase): def testExpiredUnaryRequestStreamResponse(self): for (group, method), test_messages_sequence in ( - self._digest.unary_stream_messages_sequences.iteritems()): + six.iteritems(self._digest.unary_stream_messages_sequences)): for test_messages in test_messages_sequence: request = test_messages.request() @@ -228,7 +231,7 @@ class TestCase(test_coverage.Coverage, unittest.TestCase): def testExpiredStreamRequestUnaryResponse(self): for (group, method), test_messages_sequence in ( - self._digest.stream_unary_messages_sequences.iteritems()): + six.iteritems(self._digest.stream_unary_messages_sequences)): for test_messages in test_messages_sequence: requests = test_messages.requests() @@ -239,7 +242,7 @@ class TestCase(test_coverage.Coverage, unittest.TestCase): def testExpiredStreamRequestStreamResponse(self): for (group, method), test_messages_sequence in ( - self._digest.stream_stream_messages_sequences.iteritems()): + six.iteritems(self._digest.stream_stream_messages_sequences)): for test_messages in test_messages_sequence: requests = test_messages.requests() @@ -251,7 +254,7 @@ class TestCase(test_coverage.Coverage, unittest.TestCase): def testFailedUnaryRequestUnaryResponse(self): for (group, method), test_messages_sequence in ( - self._digest.unary_unary_messages_sequences.iteritems()): + six.iteritems(self._digest.unary_unary_messages_sequences)): for test_messages in test_messages_sequence: request = test_messages.request() @@ -261,7 +264,7 @@ class TestCase(test_coverage.Coverage, unittest.TestCase): def testFailedUnaryRequestStreamResponse(self): for (group, method), test_messages_sequence in ( - self._digest.unary_stream_messages_sequences.iteritems()): + six.iteritems(self._digest.unary_stream_messages_sequences)): for test_messages in test_messages_sequence: request = test_messages.request() @@ -272,7 +275,7 @@ class TestCase(test_coverage.Coverage, unittest.TestCase): def testFailedStreamRequestUnaryResponse(self): for (group, method), test_messages_sequence in ( - self._digest.stream_unary_messages_sequences.iteritems()): + six.iteritems(self._digest.stream_unary_messages_sequences)): for test_messages in test_messages_sequence: requests = test_messages.requests() @@ -282,7 +285,7 @@ class TestCase(test_coverage.Coverage, unittest.TestCase): def testFailedStreamRequestStreamResponse(self): for (group, method), test_messages_sequence in ( - self._digest.stream_stream_messages_sequences.iteritems()): + six.iteritems(self._digest.stream_stream_messages_sequences)): for test_messages in test_messages_sequence: requests = test_messages.requests() diff --git a/src/python/grpcio/tests/unit/framework/interfaces/face/_digest.py b/src/python/grpcio/tests/unit/framework/interfaces/face/_digest.py index 9304b6b1db1..40c03f9e714 100644 --- a/src/python/grpcio/tests/unit/framework/interfaces/face/_digest.py +++ b/src/python/grpcio/tests/unit/framework/interfaces/face/_digest.py @@ -1,4 +1,4 @@ -# Copyright 2015, Google Inc. +# Copyright 2015-2016, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -32,6 +32,8 @@ import collections import threading +import six + # test_control, _service, and test_interfaces are referenced from specification # in this module. from grpc.framework.common import cardinality @@ -363,7 +365,7 @@ def _assemble( events = {} adaptations = {} messages = {} - for identifier, scenario in scenarios.iteritems(): + for identifier, scenario in six.iteritems(scenarios): if identifier in identifiers: raise ValueError('Repeated identifier "(%s, %s)"!' % identifier) diff --git a/src/python/grpcio/tests/unit/framework/interfaces/face/_future_invocation_asynchronous_event_service.py b/src/python/grpcio/tests/unit/framework/interfaces/face/_future_invocation_asynchronous_event_service.py index 1d36a931e8c..401b52f6143 100644 --- a/src/python/grpcio/tests/unit/framework/interfaces/face/_future_invocation_asynchronous_event_service.py +++ b/src/python/grpcio/tests/unit/framework/interfaces/face/_future_invocation_asynchronous_event_service.py @@ -29,6 +29,8 @@ """Test code for the Face layer of RPC Framework.""" +from __future__ import division + import abc import contextlib import itertools @@ -36,6 +38,8 @@ import threading import unittest from concurrent import futures +import six + # test_interfaces is referenced from specification in this module. from grpc.framework.foundation import logging_pool from grpc.framework.interfaces.face import face @@ -67,6 +71,9 @@ class _PauseableIterator(object): def __iter__(self): return self + def __next__(self): + return self.next() + def next(self): with self._condition: while self._paused: @@ -104,14 +111,13 @@ class _Callback(object): self._condition.wait() -class TestCase(test_coverage.Coverage, unittest.TestCase): +class TestCase(six.with_metaclass(abc.ABCMeta, test_coverage.Coverage, unittest.TestCase)): """A test of the Face layer of RPC Framework. Concrete subclasses must have an "implementation" attribute of type test_interfaces.Implementation and an "invoker_constructor" attribute of type _invocation.InvokerConstructor. """ - __metaclass__ = abc.ABCMeta NAME = 'FutureInvocationAsynchronousEventServiceTest' @@ -141,7 +147,7 @@ class TestCase(test_coverage.Coverage, unittest.TestCase): def testSuccessfulUnaryRequestUnaryResponse(self): for (group, method), test_messages_sequence in ( - self._digest.unary_unary_messages_sequences.iteritems()): + six.iteritems(self._digest.unary_unary_messages_sequences)): for test_messages in test_messages_sequence: request = test_messages.request() callback = _Callback() @@ -156,7 +162,7 @@ class TestCase(test_coverage.Coverage, unittest.TestCase): def testSuccessfulUnaryRequestStreamResponse(self): for (group, method), test_messages_sequence in ( - self._digest.unary_stream_messages_sequences.iteritems()): + six.iteritems(self._digest.unary_stream_messages_sequences)): for test_messages in test_messages_sequence: request = test_messages.request() @@ -168,7 +174,7 @@ class TestCase(test_coverage.Coverage, unittest.TestCase): def testSuccessfulStreamRequestUnaryResponse(self): for (group, method), test_messages_sequence in ( - self._digest.stream_unary_messages_sequences.iteritems()): + six.iteritems(self._digest.stream_unary_messages_sequences)): for test_messages in test_messages_sequence: requests = test_messages.requests() request_iterator = _PauseableIterator(iter(requests)) @@ -188,7 +194,7 @@ class TestCase(test_coverage.Coverage, unittest.TestCase): def testSuccessfulStreamRequestStreamResponse(self): for (group, method), test_messages_sequence in ( - self._digest.stream_stream_messages_sequences.iteritems()): + six.iteritems(self._digest.stream_stream_messages_sequences)): for test_messages in test_messages_sequence: requests = test_messages.requests() request_iterator = _PauseableIterator(iter(requests)) @@ -204,7 +210,7 @@ class TestCase(test_coverage.Coverage, unittest.TestCase): def testSequentialInvocations(self): for (group, method), test_messages_sequence in ( - self._digest.unary_unary_messages_sequences.iteritems()): + six.iteritems(self._digest.unary_unary_messages_sequences)): for test_messages in test_messages_sequence: first_request = test_messages.request() second_request = test_messages.request() @@ -223,7 +229,7 @@ class TestCase(test_coverage.Coverage, unittest.TestCase): def testParallelInvocations(self): for (group, method), test_messages_sequence in ( - self._digest.unary_unary_messages_sequences.iteritems()): + six.iteritems(self._digest.unary_unary_messages_sequences)): for test_messages in test_messages_sequence: first_request = test_messages.request() second_request = test_messages.request() @@ -239,7 +245,7 @@ class TestCase(test_coverage.Coverage, unittest.TestCase): test_messages.verify(second_request, second_response, self) for (group, method), test_messages_sequence in ( - self._digest.unary_unary_messages_sequences.iteritems()): + six.iteritems(self._digest.unary_unary_messages_sequences)): for test_messages in test_messages_sequence: requests = [] response_futures = [] @@ -259,7 +265,7 @@ class TestCase(test_coverage.Coverage, unittest.TestCase): def testWaitingForSomeButNotAllParallelInvocations(self): pool = logging_pool.pool(test_constants.PARALLELISM) for (group, method), test_messages_sequence in ( - self._digest.unary_unary_messages_sequences.iteritems()): + six.iteritems(self._digest.unary_unary_messages_sequences)): for test_messages in test_messages_sequence: requests = [] response_futures_to_indices = {} @@ -273,7 +279,7 @@ class TestCase(test_coverage.Coverage, unittest.TestCase): some_completed_response_futures_iterator = itertools.islice( futures.as_completed(response_futures_to_indices), - test_constants.PARALLELISM / 2) + test_constants.PARALLELISM // 2) for response_future in some_completed_response_futures_iterator: index = response_futures_to_indices[response_future] test_messages.verify(requests[index], response_future.result(), self) @@ -281,7 +287,7 @@ class TestCase(test_coverage.Coverage, unittest.TestCase): def testCancelledUnaryRequestUnaryResponse(self): for (group, method), test_messages_sequence in ( - self._digest.unary_unary_messages_sequences.iteritems()): + six.iteritems(self._digest.unary_unary_messages_sequences)): for test_messages in test_messages_sequence: request = test_messages.request() callback = _Callback() @@ -298,7 +304,7 @@ class TestCase(test_coverage.Coverage, unittest.TestCase): def testCancelledUnaryRequestStreamResponse(self): for (group, method), test_messages_sequence in ( - self._digest.unary_stream_messages_sequences.iteritems()): + six.iteritems(self._digest.unary_stream_messages_sequences)): for test_messages in test_messages_sequence: request = test_messages.request() @@ -312,7 +318,7 @@ class TestCase(test_coverage.Coverage, unittest.TestCase): def testCancelledStreamRequestUnaryResponse(self): for (group, method), test_messages_sequence in ( - self._digest.stream_unary_messages_sequences.iteritems()): + six.iteritems(self._digest.stream_unary_messages_sequences)): for test_messages in test_messages_sequence: requests = test_messages.requests() callback = _Callback() @@ -329,7 +335,7 @@ class TestCase(test_coverage.Coverage, unittest.TestCase): def testCancelledStreamRequestStreamResponse(self): for (group, method), test_messages_sequence in ( - self._digest.stream_stream_messages_sequences.iteritems()): + six.iteritems(self._digest.stream_stream_messages_sequences)): for test_messages in test_messages_sequence: requests = test_messages.requests() @@ -343,7 +349,7 @@ class TestCase(test_coverage.Coverage, unittest.TestCase): def testExpiredUnaryRequestUnaryResponse(self): for (group, method), test_messages_sequence in ( - self._digest.unary_unary_messages_sequences.iteritems()): + six.iteritems(self._digest.unary_unary_messages_sequences)): for test_messages in test_messages_sequence: request = test_messages.request() callback = _Callback() @@ -360,7 +366,7 @@ class TestCase(test_coverage.Coverage, unittest.TestCase): def testExpiredUnaryRequestStreamResponse(self): for (group, method), test_messages_sequence in ( - self._digest.unary_stream_messages_sequences.iteritems()): + six.iteritems(self._digest.unary_stream_messages_sequences)): for test_messages in test_messages_sequence: request = test_messages.request() @@ -372,7 +378,7 @@ class TestCase(test_coverage.Coverage, unittest.TestCase): def testExpiredStreamRequestUnaryResponse(self): for (group, method), test_messages_sequence in ( - self._digest.stream_unary_messages_sequences.iteritems()): + six.iteritems(self._digest.stream_unary_messages_sequences)): for test_messages in test_messages_sequence: requests = test_messages.requests() callback = _Callback() @@ -389,7 +395,7 @@ class TestCase(test_coverage.Coverage, unittest.TestCase): def testExpiredStreamRequestStreamResponse(self): for (group, method), test_messages_sequence in ( - self._digest.stream_stream_messages_sequences.iteritems()): + six.iteritems(self._digest.stream_stream_messages_sequences)): for test_messages in test_messages_sequence: requests = test_messages.requests() @@ -401,7 +407,7 @@ class TestCase(test_coverage.Coverage, unittest.TestCase): def testFailedUnaryRequestUnaryResponse(self): for (group, method), test_messages_sequence in ( - self._digest.unary_unary_messages_sequences.iteritems()): + six.iteritems(self._digest.unary_unary_messages_sequences)): for test_messages in test_messages_sequence: request = test_messages.request() callback = _Callback() @@ -423,7 +429,7 @@ class TestCase(test_coverage.Coverage, unittest.TestCase): def testFailedUnaryRequestStreamResponse(self): for (group, method), test_messages_sequence in ( - self._digest.unary_stream_messages_sequences.iteritems()): + six.iteritems(self._digest.unary_stream_messages_sequences)): for test_messages in test_messages_sequence: request = test_messages.request() @@ -438,7 +444,7 @@ class TestCase(test_coverage.Coverage, unittest.TestCase): def testFailedStreamRequestUnaryResponse(self): for (group, method), test_messages_sequence in ( - self._digest.stream_unary_messages_sequences.iteritems()): + six.iteritems(self._digest.stream_unary_messages_sequences)): for test_messages in test_messages_sequence: requests = test_messages.requests() callback = _Callback() @@ -460,7 +466,7 @@ class TestCase(test_coverage.Coverage, unittest.TestCase): def testFailedStreamRequestStreamResponse(self): for (group, method), test_messages_sequence in ( - self._digest.stream_stream_messages_sequences.iteritems()): + six.iteritems(self._digest.stream_stream_messages_sequences)): for test_messages in test_messages_sequence: requests = test_messages.requests() diff --git a/src/python/grpcio/tests/unit/framework/interfaces/face/_invocation.py b/src/python/grpcio/tests/unit/framework/interfaces/face/_invocation.py index 448e845a08d..ff38dc2ece3 100644 --- a/src/python/grpcio/tests/unit/framework/interfaces/face/_invocation.py +++ b/src/python/grpcio/tests/unit/framework/interfaces/face/_invocation.py @@ -1,4 +1,4 @@ -# Copyright 2015, Google Inc. +# Copyright 2015-2016, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -31,6 +31,8 @@ import abc +import six + from grpc.framework.common import cardinality _CARDINALITY_TO_GENERIC_BLOCKING_BEHAVIOR = { @@ -62,9 +64,8 @@ _CARDINALITY_TO_MULTI_CALLABLE_ATTRIBUTE = { } -class Invoker(object): +class Invoker(six.with_metaclass(abc.ABCMeta)): """A type used to invoke test RPCs.""" - __metaclass__ = abc.ABCMeta @abc.abstractmethod def blocking(self, group, name): @@ -82,9 +83,8 @@ class Invoker(object): raise NotImplementedError() -class InvokerConstructor(object): +class InvokerConstructor(six.with_metaclass(abc.ABCMeta)): """A type used to create Invokers.""" - __metaclass__ = abc.ABCMeta @abc.abstractmethod def name(self): diff --git a/src/python/grpcio/tests/unit/framework/interfaces/face/_service.py b/src/python/grpcio/tests/unit/framework/interfaces/face/_service.py index 28941e2ad03..bec8d5113c1 100644 --- a/src/python/grpcio/tests/unit/framework/interfaces/face/_service.py +++ b/src/python/grpcio/tests/unit/framework/interfaces/face/_service.py @@ -1,4 +1,4 @@ -# Copyright 2015, Google Inc. +# Copyright 2015-2016, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -31,16 +31,16 @@ import abc +import six + # face is referenced from specification in this module. from grpc.framework.interfaces.face import face # pylint: disable=unused-import from tests.unit.framework.interfaces.face import test_interfaces -class UnaryUnaryTestMethodImplementation(test_interfaces.Method): +class UnaryUnaryTestMethodImplementation(six.with_metaclass(abc.ABCMeta, test_interfaces.Method)): """A controllable implementation of a unary-unary method.""" - __metaclass__ = abc.ABCMeta - @abc.abstractmethod def service(self, request, response_callback, context, control): """Services an RPC that accepts one message and produces one message. @@ -59,11 +59,9 @@ class UnaryUnaryTestMethodImplementation(test_interfaces.Method): raise NotImplementedError() -class UnaryUnaryTestMessages(object): +class UnaryUnaryTestMessages(six.with_metaclass(abc.ABCMeta)): """A type for unary-request-unary-response message pairings.""" - __metaclass__ = abc.ABCMeta - @abc.abstractmethod def request(self): """Affords a request message. @@ -93,11 +91,9 @@ class UnaryUnaryTestMessages(object): raise NotImplementedError() -class UnaryStreamTestMethodImplementation(test_interfaces.Method): +class UnaryStreamTestMethodImplementation(six.with_metaclass(abc.ABCMeta, test_interfaces.Method)): """A controllable implementation of a unary-stream method.""" - __metaclass__ = abc.ABCMeta - @abc.abstractmethod def service(self, request, response_consumer, context, control): """Services an RPC that takes one message and produces a stream of messages. @@ -116,11 +112,9 @@ class UnaryStreamTestMethodImplementation(test_interfaces.Method): raise NotImplementedError() -class UnaryStreamTestMessages(object): +class UnaryStreamTestMessages(six.with_metaclass(abc.ABCMeta)): """A type for unary-request-stream-response message pairings.""" - __metaclass__ = abc.ABCMeta - @abc.abstractmethod def request(self): """Affords a request message. @@ -150,11 +144,9 @@ class UnaryStreamTestMessages(object): raise NotImplementedError() -class StreamUnaryTestMethodImplementation(test_interfaces.Method): +class StreamUnaryTestMethodImplementation(six.with_metaclass(abc.ABCMeta, test_interfaces.Method)): """A controllable implementation of a stream-unary method.""" - __metaclass__ = abc.ABCMeta - @abc.abstractmethod def service(self, response_callback, context, control): """Services an RPC that takes a stream of messages and produces one message. @@ -180,11 +172,9 @@ class StreamUnaryTestMethodImplementation(test_interfaces.Method): raise NotImplementedError() -class StreamUnaryTestMessages(object): +class StreamUnaryTestMessages(six.with_metaclass(abc.ABCMeta)): """A type for stream-request-unary-response message pairings.""" - __metaclass__ = abc.ABCMeta - @abc.abstractmethod def requests(self): """Affords a sequence of request messages. @@ -214,11 +204,9 @@ class StreamUnaryTestMessages(object): raise NotImplementedError() -class StreamStreamTestMethodImplementation(test_interfaces.Method): +class StreamStreamTestMethodImplementation(six.with_metaclass(abc.ABCMeta, test_interfaces.Method)): """A controllable implementation of a stream-stream method.""" - __metaclass__ = abc.ABCMeta - @abc.abstractmethod def service(self, response_consumer, context, control): """Services an RPC that accepts and produces streams of messages. @@ -244,11 +232,9 @@ class StreamStreamTestMethodImplementation(test_interfaces.Method): raise NotImplementedError() -class StreamStreamTestMessages(object): +class StreamStreamTestMessages(six.with_metaclass(abc.ABCMeta)): """A type for stream-request-stream-response message pairings.""" - __metaclass__ = abc.ABCMeta - @abc.abstractmethod def requests(self): """Affords a sequence of request messages. @@ -278,11 +264,9 @@ class StreamStreamTestMessages(object): raise NotImplementedError() -class TestService(object): +class TestService(six.with_metaclass(abc.ABCMeta)): """A specification of implemented methods to use in tests.""" - __metaclass__ = abc.ABCMeta - @abc.abstractmethod def unary_unary_scenarios(self): """Affords unary-request-unary-response test methods and their messages. diff --git a/src/python/grpcio/tests/unit/framework/interfaces/face/test_interfaces.py b/src/python/grpcio/tests/unit/framework/interfaces/face/test_interfaces.py index b2b5c10fa6f..a5e28b79425 100644 --- a/src/python/grpcio/tests/unit/framework/interfaces/face/test_interfaces.py +++ b/src/python/grpcio/tests/unit/framework/interfaces/face/test_interfaces.py @@ -1,4 +1,4 @@ -# Copyright 2015, Google Inc. +# Copyright 2015-2016, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -31,13 +31,14 @@ import abc +import six + from grpc.framework.common import cardinality # pylint: disable=unused-import from grpc.framework.interfaces.face import face # pylint: disable=unused-import -class Method(object): +class Method(six.with_metaclass(abc.ABCMeta)): """Specifies a method to be used in tests.""" - __metaclass__ = abc.ABCMeta @abc.abstractmethod def group(self): @@ -126,9 +127,8 @@ class Method(object): raise NotImplementedError() -class Implementation(object): +class Implementation(six.with_metaclass(abc.ABCMeta)): """Specifies an implementation of the Face layer.""" - __metaclass__ = abc.ABCMeta @abc.abstractmethod def instantiate( diff --git a/src/python/grpcio/tests/unit/framework/interfaces/links/test_cases.py b/src/python/grpcio/tests/unit/framework/interfaces/links/test_cases.py index dace6c23f3f..2283e79f0ab 100644 --- a/src/python/grpcio/tests/unit/framework/interfaces/links/test_cases.py +++ b/src/python/grpcio/tests/unit/framework/interfaces/links/test_cases.py @@ -1,4 +1,4 @@ -# Copyright 2015, Google Inc. +# Copyright 2015-2016, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -33,6 +33,8 @@ import abc import unittest # pylint: disable=unused-import +import six + from grpc.framework.interfaces.links import links from tests.unit.framework.common import test_constants from tests.unit.framework.interfaces.links import test_utilities @@ -58,13 +60,12 @@ _TRANSMISSION_GROUP = 'test.Group' _TRANSMISSION_METHOD = 'TestMethod' -class TransmissionTest(object): +class TransmissionTest(six.with_metaclass(abc.ABCMeta)): """Tests ticket transmission between two connected links. This class must be mixed into a unittest.TestCase that implements the abstract methods it provides. """ - __metaclass__ = abc.ABCMeta # This is a unittest.TestCase mix-in. # pylint: disable=invalid-name diff --git a/src/python/grpcio/tests/unit/test_common.py b/src/python/grpcio/tests/unit/test_common.py index 29431bfb9dd..824f1cbd160 100644 --- a/src/python/grpcio/tests/unit/test_common.py +++ b/src/python/grpcio/tests/unit/test_common.py @@ -1,4 +1,4 @@ -# Copyright 2015, Google Inc. +# Copyright 2015-2016, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -31,6 +31,8 @@ import collections +import six + INVOCATION_INITIAL_METADATA = ((b'0', b'abc'), (b'1', b'def'), (b'2', b'ghi'),) SERVICE_INITIAL_METADATA = ((b'3', b'jkl'), (b'4', b'mno'), (b'5', b'pqr'),) SERVICE_TERMINAL_METADATA = ((b'6', b'stu'), (b'7', b'vwx'), (b'8', b'yza'),) @@ -65,7 +67,7 @@ def metadata_transmitted(original_metadata, transmitted_metadata): key, value = tuple(key_value_pair) transmitted[key].append(value) - for key, values in original.iteritems(): + for key, values in six.iteritems(original): transmitted_values = transmitted[key] transmitted_iterator = iter(transmitted_values) try: diff --git a/src/ruby/ext/grpc/rb_call.c b/src/ruby/ext/grpc/rb_call.c index af05ddf6e78..cd0aa6aaf20 100644 --- a/src/ruby/ext/grpc/rb_call.c +++ b/src/ruby/ext/grpc/rb_call.c @@ -72,6 +72,10 @@ static ID id_cq; * the flags used to create metadata from a Hash */ static ID id_flags; +/* id_credentials is the name of the hidden ivar that preserves the value + * of the credentials added to the call */ +static ID id_credentials; + /* id_input_md is the name of the hidden ivar that preserves the hash used to * create metadata, so that references to the strings it contains last as long * as the call the metadata is added to. */ @@ -299,6 +303,7 @@ static VALUE grpc_rb_call_set_credentials(VALUE self, VALUE credentials) { "grpc_call_set_credentials failed with %s (code=%d)", grpc_call_error_detail_of(err), err); } + rb_ivar_set(self, id_credentials, credentials); return Qnil; } @@ -859,6 +864,7 @@ void Init_grpc_call() { id_cq = rb_intern("__cq"); id_flags = rb_intern("__flags"); id_input_md = rb_intern("__input_md"); + id_credentials = rb_intern("__credentials"); /* Ids used in constructing the batch result. */ sym_send_message = ID2SYM(rb_intern("send_message")); diff --git a/src/ruby/ext/grpc/rb_call_credentials.c b/src/ruby/ext/grpc/rb_call_credentials.c index 2426f106a99..2b978fcdd0c 100644 --- a/src/ruby/ext/grpc/rb_call_credentials.c +++ b/src/ruby/ext/grpc/rb_call_credentials.c @@ -41,6 +41,7 @@ #include #include #include +#include #include "rb_call.h" #include "rb_event_thread.h" @@ -50,9 +51,9 @@ * grpc_call_credentials */ static VALUE grpc_rb_cCallCredentials = Qnil; -/* grpc_rb_call_credentials wraps a grpc_call_credentials. It provides a peer - * ruby object, 'mark' to minimize copying when a credential is created from - * ruby. */ +/* grpc_rb_call_credentials wraps a grpc_call_credentials. It provides a mark + * object that is used to hold references to any objects used to create the + * credentials. */ typedef struct grpc_rb_call_credentials { /* Holder of ruby objects involved in contructing the credentials */ VALUE mark; @@ -81,14 +82,23 @@ static VALUE grpc_rb_call_credentials_callback(VALUE callback_args) { static VALUE grpc_rb_call_credentials_callback_rescue(VALUE args, VALUE exception_object) { VALUE result = rb_hash_new(); + VALUE backtrace = rb_funcall( + rb_funcall(exception_object, rb_intern("backtrace"), 0), + rb_intern("join"), + 1, rb_str_new2("\n\tfrom ")); + VALUE exception_info = rb_funcall(exception_object, rb_intern("to_s"), 0); + const char *exception_classname = rb_obj_classname(exception_object); (void)args; + gpr_log(GPR_INFO, "Call credentials callback failed: %s: %s\n%s", + exception_classname, StringValueCStr(exception_info), + StringValueCStr(backtrace)); rb_hash_aset(result, rb_str_new2("metadata"), Qnil); /* Currently only gives the exception class name. It should be possible get more details */ rb_hash_aset(result, rb_str_new2("status"), INT2NUM(GRPC_STATUS_PERMISSION_DENIED)); rb_hash_aset(result, rb_str_new2("details"), - rb_str_new2(rb_obj_classname(exception_object))); + rb_str_new2(exception_classname)); return result; } @@ -146,13 +156,8 @@ static void grpc_rb_call_credentials_free(void *p) { return; } wrapper = (grpc_rb_call_credentials *)p; - - /* Delete the wrapped object if the mark object is Qnil, which indicates that - * no other object is the actual owner. */ - if (wrapper->wrapped != NULL && wrapper->mark == Qnil) { - grpc_call_credentials_release(wrapper->wrapped); - wrapper->wrapped = NULL; - } + grpc_call_credentials_release(wrapper->wrapped); + wrapper->wrapped = NULL; xfree(p); } @@ -164,8 +169,6 @@ static void grpc_rb_call_credentials_mark(void *p) { return; } wrapper = (grpc_rb_call_credentials *)p; - - /* If it's not already cleaned up, mark the mark object */ if (wrapper->mark != Qnil) { rb_gc_mark(wrapper->mark); } @@ -194,7 +197,7 @@ static VALUE grpc_rb_call_credentials_alloc(VALUE cls) { /* Creates a wrapping object for a given call credentials. This should only be * called with grpc_call_credentials objects that are not already associated * with any Ruby object */ -VALUE grpc_rb_wrap_call_credentials(grpc_call_credentials *c) { +VALUE grpc_rb_wrap_call_credentials(grpc_call_credentials *c, VALUE mark) { VALUE rb_wrapper; grpc_rb_call_credentials *wrapper; if (c == NULL) { @@ -204,6 +207,7 @@ VALUE grpc_rb_wrap_call_credentials(grpc_call_credentials *c) { TypedData_Get_Struct(rb_wrapper, grpc_rb_call_credentials, &grpc_rb_call_credentials_data_type, wrapper); wrapper->wrapped = c; + wrapper->mark = mark; return rb_wrapper; } @@ -267,6 +271,7 @@ static VALUE grpc_rb_call_credentials_init(VALUE self, VALUE proc) { return Qnil; } + wrapper->mark = proc; wrapper->wrapped = creds; rb_ivar_set(self, id_callback, proc); @@ -277,15 +282,18 @@ static VALUE grpc_rb_call_credentials_compose(int argc, VALUE *argv, VALUE self) { grpc_call_credentials *creds; grpc_call_credentials *other; + VALUE mark; if (argc == 0) { return self; } + mark = rb_ary_new(); creds = grpc_rb_get_wrapped_call_credentials(self); for (int i = 0; i < argc; i++) { + rb_ary_push(mark, argv[i]); other = grpc_rb_get_wrapped_call_credentials(argv[i]); creds = grpc_composite_call_credentials_create(creds, other, NULL); } - return grpc_rb_wrap_call_credentials(creds); + return grpc_rb_wrap_call_credentials(creds, mark); } void Init_grpc_call_credentials() { diff --git a/src/ruby/ext/grpc/rb_channel.c b/src/ruby/ext/grpc/rb_channel.c index 0e6badbdaf0..e1aaa539db3 100644 --- a/src/ruby/ext/grpc/rb_channel.c +++ b/src/ruby/ext/grpc/rb_channel.c @@ -70,11 +70,10 @@ static VALUE grpc_rb_cChannel = Qnil; /* Used during the conversion of a hash to channel args during channel setup */ static VALUE grpc_rb_cChannelArgs; -/* grpc_rb_channel wraps a grpc_channel. It provides a peer ruby object, - * 'mark' to minimize copying when a channel is created from ruby. */ +/* grpc_rb_channel wraps a grpc_channel. */ typedef struct grpc_rb_channel { - /* Holder of ruby objects involved in constructing the channel */ - VALUE mark; + VALUE credentials; + /* The actual channel */ grpc_channel *wrapped; } grpc_rb_channel; @@ -87,13 +86,8 @@ static void grpc_rb_channel_free(void *p) { }; ch = (grpc_rb_channel *)p; - /* Deletes the wrapped object if the mark object is Qnil, which indicates - * that no other object is the actual owner. */ - if (ch->wrapped != NULL && ch->mark == Qnil) { + if (ch->wrapped != NULL) { grpc_channel_destroy(ch->wrapped); - rb_warning("channel gc: destroyed the c channel"); - } else { - rb_warning("channel gc: did not destroy the c channel"); } xfree(p); @@ -106,8 +100,8 @@ static void grpc_rb_channel_mark(void *p) { return; } channel = (grpc_rb_channel *)p; - if (channel->mark != Qnil) { - rb_gc_mark(channel->mark); + if (channel->credentials != Qnil) { + rb_gc_mark(channel->credentials); } } @@ -125,7 +119,7 @@ static rb_data_type_t grpc_channel_data_type = { static VALUE grpc_rb_channel_alloc(VALUE cls) { grpc_rb_channel *wrapper = ALLOC(grpc_rb_channel); wrapper->wrapped = NULL; - wrapper->mark = Qnil; + wrapper->credentials = Qnil; return TypedData_Wrap_Struct(cls, &grpc_channel_data_type, wrapper); } @@ -162,6 +156,7 @@ static VALUE grpc_rb_channel_init(int argc, VALUE *argv, VALUE self) { } ch = grpc_insecure_channel_create(target_chars, &args, NULL); } else { + wrapper->credentials = credentials; creds = grpc_rb_get_wrapped_channel_credentials(credentials); ch = grpc_secure_channel_create(creds, target_chars, &args, NULL); } @@ -330,7 +325,6 @@ static VALUE grpc_rb_channel_destroy(VALUE self) { if (ch != NULL) { grpc_channel_destroy(ch); wrapper->wrapped = NULL; - wrapper->mark = Qnil; } return Qnil; diff --git a/src/ruby/ext/grpc/rb_channel_credentials.c b/src/ruby/ext/grpc/rb_channel_credentials.c index 8c6fc3b7eb6..f6490843113 100644 --- a/src/ruby/ext/grpc/rb_channel_credentials.c +++ b/src/ruby/ext/grpc/rb_channel_credentials.c @@ -49,8 +49,8 @@ static VALUE grpc_rb_cChannelCredentials = Qnil; /* grpc_rb_channel_credentials wraps a grpc_channel_credentials. It provides a - * peer ruby object, 'mark' to minimize copying when a credential is - * created from ruby. */ + * mark object that is used to hold references to any objects used to create + * the credentials. */ typedef struct grpc_rb_channel_credentials { /* Holder of ruby objects involved in constructing the credentials */ VALUE mark; @@ -66,13 +66,8 @@ static void grpc_rb_channel_credentials_free(void *p) { return; }; wrapper = (grpc_rb_channel_credentials *)p; - - /* Delete the wrapped object if the mark object is Qnil, which indicates that - * no other object is the actual owner. */ - if (wrapper->wrapped != NULL && wrapper->mark == Qnil) { - grpc_channel_credentials_release(wrapper->wrapped); - wrapper->wrapped = NULL; - } + grpc_channel_credentials_release(wrapper->wrapped); + wrapper->wrapped = NULL; xfree(p); } @@ -85,7 +80,6 @@ static void grpc_rb_channel_credentials_mark(void *p) { } wrapper = (grpc_rb_channel_credentials *)p; - /* If it's not already cleaned up, mark the mark object */ if (wrapper->mark != Qnil) { rb_gc_mark(wrapper->mark); } @@ -114,7 +108,7 @@ static VALUE grpc_rb_channel_credentials_alloc(VALUE cls) { /* Creates a wrapping object for a given channel credentials. This should only * be called with grpc_channel_credentials objects that are not already * associated with any Ruby object. */ -VALUE grpc_rb_wrap_channel_credentials(grpc_channel_credentials *c) { +VALUE grpc_rb_wrap_channel_credentials(grpc_channel_credentials *c, VALUE mark) { VALUE rb_wrapper; grpc_rb_channel_credentials *wrapper; if (c == NULL) { @@ -124,6 +118,7 @@ VALUE grpc_rb_wrap_channel_credentials(grpc_channel_credentials *c) { TypedData_Get_Struct(rb_wrapper, grpc_rb_channel_credentials, &grpc_rb_channel_credentials_data_type, wrapper); wrapper->wrapped = c; + wrapper->mark = mark; return rb_wrapper; } @@ -222,11 +217,15 @@ static VALUE grpc_rb_channel_credentials_compose(int argc, VALUE *argv, VALUE self) { grpc_channel_credentials *creds; grpc_call_credentials *other; + VALUE mark; if (argc == 0) { return self; } + mark = rb_ary_new(); + rb_ary_push(mark, self); creds = grpc_rb_get_wrapped_channel_credentials(self); for (int i = 0; i < argc; i++) { + rb_ary_push(mark, argv[i]); other = grpc_rb_get_wrapped_call_credentials(argv[i]); creds = grpc_composite_channel_credentials_create(creds, other, NULL); if (creds == NULL) { @@ -234,7 +233,7 @@ static VALUE grpc_rb_channel_credentials_compose(int argc, VALUE *argv, "Failed to compose channel and call credentials"); } } - return grpc_rb_wrap_channel_credentials(creds); + return grpc_rb_wrap_channel_credentials(creds, mark); } void Init_grpc_channel_credentials() { diff --git a/src/ruby/ext/grpc/rb_grpc_imports.generated.h b/src/ruby/ext/grpc/rb_grpc_imports.generated.h index b972f60fc35..3bf81af8fbc 100644 --- a/src/ruby/ext/grpc/rb_grpc_imports.generated.h +++ b/src/ruby/ext/grpc/rb_grpc_imports.generated.h @@ -166,7 +166,7 @@ extern grpc_compression_algorithm_parse_type grpc_compression_algorithm_parse_im typedef int(*grpc_compression_algorithm_name_type)(grpc_compression_algorithm algorithm, char **name); extern grpc_compression_algorithm_name_type grpc_compression_algorithm_name_import; #define grpc_compression_algorithm_name grpc_compression_algorithm_name_import -typedef grpc_compression_algorithm(*grpc_compression_algorithm_for_level_type)(grpc_compression_level level); +typedef grpc_compression_algorithm(*grpc_compression_algorithm_for_level_type)(grpc_compression_level level, uint32_t accepted_encodings); extern grpc_compression_algorithm_for_level_type grpc_compression_algorithm_for_level_import; #define grpc_compression_algorithm_for_level grpc_compression_algorithm_for_level_import typedef void(*grpc_compression_options_init_type)(grpc_compression_options *opts); diff --git a/summerofcode/ideas.md b/summerofcode/ideas.md index 83f2cecd48c..d87cf1b8fa3 100644 --- a/summerofcode/ideas.md +++ b/summerofcode/ideas.md @@ -36,7 +36,7 @@ gRPC Python: * **Required skills:** Python programming language, PyPy Python interpreter. * **Likely mentors:** [Nathaniel Manista](https://github.com/nathanielmanistaatgoogle), [Masood Malekghassemi](https://github.com/soltanmm). 1. Develop and test Python 3.5 Support for gRPC. Make necessary changes to port gRPC and package it for supported platforms. - * **Required skills:** Python programming language, PyPy Python interpreter. + * **Required skills:** Python programming language, Python 3.5 interpreter. * **Likely mentors:** [Nathaniel Manista](https://github.com/nathanielmanistaatgoogle), [Masood Malekghassemi](https://github.com/soltanmm). gRPC Ruby/Java: diff --git a/templates/composer.json.template b/templates/composer.json.template new file mode 100644 index 00000000000..275b4655ced --- /dev/null +++ b/templates/composer.json.template @@ -0,0 +1,27 @@ +%YAML 1.2 +--- | + { + "name": "grpc/grpc", + "type": "library", + "description": "gRPC library for PHP", + "version": "${settings.php_version.php()}", + "keywords": ["rpc"], + "homepage": "http://grpc.io", + "license": "BSD-3-Clause", + "repositories": [ + { + "type": "vcs", + "url": "https://github.com/stanley-cheung/Protobuf-PHP" + } + ], + "require": { + "php": ">=5.5.0", + "datto/protobuf-php": "dev-master", + "google/auth": "v0.7" + }, + "autoload": { + "psr-4": { + "Grpc\\": "src/php/lib/Grpc/" + } + } + } diff --git a/templates/package.json.template b/templates/package.json.template index 99e8287b357..9085740f98b 100644 --- a/templates/package.json.template +++ b/templates/package.json.template @@ -29,6 +29,7 @@ }, "bundledDependencies": ["node-pre-gyp"], "dependencies": { + "arguejs": "^0.2.3", "lodash": "^3.9.3", "nan": "^2.0.0", "protobufjs": "^4.0.0" diff --git a/templates/package.xml.template b/templates/package.xml.template index 8f757401e4c..2f498c02f45 100644 --- a/templates/package.xml.template +++ b/templates/package.xml.template @@ -15,8 +15,8 @@ 2016-03-01 - 0.14.0 - 0.14.0 + ${settings.php_version.php()} + ${settings.php_version.php()} beta @@ -157,8 +157,8 @@ - 0.14.0 - 0.14.0 + ${settings.php_version.php()} + ${settings.php_version.php()} beta diff --git a/templates/src/core/surface/version.c.template b/templates/src/core/lib/surface/version.c.template similarity index 100% rename from templates/src/core/surface/version.c.template rename to templates/src/core/lib/surface/version.c.template diff --git a/templates/test/core/end2end/end2end_defs.include b/templates/test/core/end2end/end2end_defs.include index 929827e1453..461c8eb698b 100644 --- a/templates/test/core/end2end/end2end_defs.include +++ b/templates/test/core/end2end/end2end_defs.include @@ -36,7 +36,9 @@ /* This file is auto-generated */ #include "test/core/end2end/end2end_tests.h" + #include + #include % for test in tests: @@ -64,4 +66,4 @@ void grpc_end2end_tests(int argc, char **argv, gpr_log(GPR_DEBUG, "not a test: '%s'", argv[i]); abort(); } -} \ No newline at end of file +} diff --git a/templates/tools/dockerfile/apt_get_basic.include b/templates/tools/dockerfile/apt_get_basic.include index 547ce01a300..9237e7dacef 100644 --- a/templates/tools/dockerfile/apt_get_basic.include +++ b/templates/tools/dockerfile/apt_get_basic.include @@ -1,4 +1,3 @@ -<%page args="skip_golang=False"/>\ # Install Git and basic packages. RUN apt-get update && apt-get install -y ${'\\'} autoconf ${'\\'} @@ -10,9 +9,7 @@ RUN apt-get update && apt-get install -y ${'\\'} gcc ${'\\'} gcc-multilib ${'\\'} git ${'\\'} -% if not skip_golang: golang ${'\\'} -% endif gyp ${'\\'} lcov ${'\\'} libc6 ${'\\'} diff --git a/templates/tools/dockerfile/clang_update.include b/templates/tools/dockerfile/clang_update.include new file mode 100644 index 00000000000..83ab3e0bbbf --- /dev/null +++ b/templates/tools/dockerfile/clang_update.include @@ -0,0 +1,32 @@ +#================= +# Update clang to a version with improved tsan + +RUN apt-get update && apt-get -y install python cmake && apt-get clean + +RUN git clone -n -b release_38 http://llvm.org/git/llvm.git && ${'\\'} + cd llvm && git checkout ad57503 && cd .. +RUN git clone -n -b release_38 http://llvm.org/git/clang.git && ${'\\'} + cd clang && git checkout ad2c56e && cd .. +RUN git clone -n -b release_38 http://llvm.org/git/compiler-rt.git && ${'\\'} + cd compiler-rt && git checkout 3176922 && cd .. +RUN git clone -n -b release_38 ${'\\'} + http://llvm.org/git/clang-tools-extra.git && cd clang-tools-extra && ${'\\'} + git checkout c288525 && cd .. +RUN git clone -n -b release_38 http://llvm.org/git/libcxx.git && ${'\\'} + cd libcxx && git checkout fda3549 && cd .. +RUN git clone -n -b release_38 http://llvm.org/git/libcxxabi.git && ${'\\'} + cd libcxxabi && git checkout 8d4e51d && cd .. + +RUN mv clang llvm/tools +RUN mv compiler-rt llvm/projects +RUN mv clang-tools-extra llvm/tools/clang/tools +RUN mv libcxx llvm/projects +RUN mv libcxxabi llvm/projects + +RUN mkdir llvm-build +RUN cd llvm-build && cmake ${'\\'} + -DCMAKE_BUILD_TYPE:STRING=Release ${'\\'} + -DCMAKE_INSTALL_PREFIX:STRING=/usr ${'\\'} + -DLLVM_TARGETS_TO_BUILD:STRING=X86 ${'\\'} + ../llvm +RUN make -C llvm-build && make -C llvm-build install && rm -rf llvm-build diff --git a/templates/tools/dockerfile/gcp_api_libraries.include b/templates/tools/dockerfile/gcp_api_libraries.include new file mode 100644 index 00000000000..669b0f887c8 --- /dev/null +++ b/templates/tools/dockerfile/gcp_api_libraries.include @@ -0,0 +1,4 @@ +# Google Cloud platform API libraries +RUN apt-get update && apt-get install -y python-pip && apt-get clean +RUN pip install --upgrade google-api-python-client + diff --git a/templates/tools/dockerfile/grpc_interop_stress_cxx/Dockerfile.template b/templates/tools/dockerfile/grpc_interop_stress_cxx/Dockerfile.template new file mode 100644 index 00000000000..b1049d0d7f2 --- /dev/null +++ b/templates/tools/dockerfile/grpc_interop_stress_cxx/Dockerfile.template @@ -0,0 +1,40 @@ +%YAML 1.2 +--- | + # Copyright 2015-2016, Google Inc. + # All rights reserved. + # + # Redistribution and use in source and binary forms, with or without + # modification, are permitted provided that the following conditions are + # met: + # + # * Redistributions of source code must retain the above copyright + # notice, this list of conditions and the following disclaimer. + # * Redistributions in binary form must reproduce the above + # copyright notice, this list of conditions and the following disclaimer + # in the documentation and/or other materials provided with the + # distribution. + # * Neither the name of Google Inc. nor the names of its + # contributors may be used to endorse or promote products derived from + # this software without specific prior written permission. + # + # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + FROM debian:jessie + + <%include file="../apt_get_basic.include"/> + <%include file="../ccache_setup.include"/> + <%include file="../cxx_deps.include"/> + <%include file="../gcp_api_libraries.include"/> + <%include file="../clang_update.include"/> + # Define the default command. + CMD ["bash"] diff --git a/templates/tools/dockerfile/run_tests_addons.include b/templates/tools/dockerfile/run_tests_addons.include index 30d22be2980..27ac67f5d8f 100644 --- a/templates/tools/dockerfile/run_tests_addons.include +++ b/templates/tools/dockerfile/run_tests_addons.include @@ -1,10 +1,7 @@ -<%page args="skip_zookeeper=False"/>\ <%include file="ccache_setup.include"/> -% if not skip_zookeeper: #====================== # Zookeeper dependencies # TODO(jtattermusch): is zookeeper still needed? RUN apt-get install -y libzookeeper-mt-dev -% endif RUN mkdir /var/local/jenkins diff --git a/templates/tools/dockerfile/test/cxx_jessie_x64/Dockerfile.template b/templates/tools/dockerfile/test/cxx_jessie_x64/Dockerfile.template index 842c5348050..eb11ce352c8 100644 --- a/templates/tools/dockerfile/test/cxx_jessie_x64/Dockerfile.template +++ b/templates/tools/dockerfile/test/cxx_jessie_x64/Dockerfile.template @@ -33,7 +33,7 @@ <%include file="../../apt_get_basic.include"/> <%include file="../../cxx_deps.include"/> + <%include file="../../clang_update.include"/> <%include file="../../run_tests_addons.include"/> # Define the default command. CMD ["bash"] - \ No newline at end of file diff --git a/templates/tools/dockerfile/test/cxx_squeeze_x64/Dockerfile.template b/templates/tools/dockerfile/test/cxx_wheezy_x64/Dockerfile.template similarity index 78% rename from templates/tools/dockerfile/test/cxx_squeeze_x64/Dockerfile.template rename to templates/tools/dockerfile/test/cxx_wheezy_x64/Dockerfile.template index 49371aaa3bb..79567987817 100644 --- a/templates/tools/dockerfile/test/cxx_squeeze_x64/Dockerfile.template +++ b/templates/tools/dockerfile/test/cxx_wheezy_x64/Dockerfile.template @@ -29,20 +29,19 @@ # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - FROM debian:squeeze + FROM debian:wheezy - <%include file="../../apt_get_basic.include" args="skip_golang=True"/> + <%include file="../../apt_get_basic.include"/> + <%include file="../../cxx_deps.include"/> - # libgflags-dev is not available on squeezy - RUN apt-get update && apt-get -y install libgtest-dev libc++-dev clang && apt-get clean - - RUN apt-get update && apt-get -y install python-pip && apt-get clean - RUN pip install argparse + RUN apt-get update && apt-get install -y ${'\\'} + gcc-4.4 ${'\\'} + gcc-4.4-multilib RUN wget ${openssl_fallback.base_uri + openssl_fallback.tarball} - ENV POST_GIT_STEP tools/dockerfile/test/cxx_squeeze_x64/post-git-setup.sh + ENV POST_GIT_STEP tools/dockerfile/test/cxx_wheezy_x64/post-git-setup.sh - <%include file="../../run_tests_addons.include" args="skip_zookeeper=True"/> + <%include file="../../run_tests_addons.include"/> # Define the default command. CMD ["bash"] diff --git a/templates/tools/dockerfile/test/cxx_squeeze_x64/post-git-setup.sh.template b/templates/tools/dockerfile/test/cxx_wheezy_x64/post-git-setup.sh.template similarity index 100% rename from templates/tools/dockerfile/test/cxx_squeeze_x64/post-git-setup.sh.template rename to templates/tools/dockerfile/test/cxx_wheezy_x64/post-git-setup.sh.template diff --git a/templates/tools/dockerfile/test/sanity/Dockerfile.template b/templates/tools/dockerfile/test/sanity/Dockerfile.template index ad1d92e7cbd..8265c09afc0 100644 --- a/templates/tools/dockerfile/test/sanity/Dockerfile.template +++ b/templates/tools/dockerfile/test/sanity/Dockerfile.template @@ -34,7 +34,13 @@ <%include file="../../apt_get_basic.include"/> #======================== # Sanity test dependencies - RUN apt-get update && apt-get install -y python-pip + RUN apt-get update && apt-get install -y ${"\\"} + python-pip ${"\\"} + autoconf ${"\\"} + automake ${"\\"} + libtool ${"\\"} + curl ${"\\"} + python-virtualenv RUN pip install simplejson mako #=================== diff --git a/templates/vsprojects/vcxproj_defs.include b/templates/vsprojects/vcxproj_defs.include index e598f1319b8..72a077f762e 100644 --- a/templates/vsprojects/vcxproj_defs.include +++ b/templates/vsprojects/vcxproj_defs.include @@ -227,7 +227,7 @@ ${gen_package_props(packages, repo_root)}\ % endif % endfor - % elif configuration_type != 'StaticLibrary': + % else: diff --git a/test/core/bad_client/bad_client.c b/test/core/bad_client/bad_client.c index 1a2ca6f0c09..7fd7a00c81f 100644 --- a/test/core/bad_client/bad_client.c +++ b/test/core/bad_client/bad_client.c @@ -33,13 +33,13 @@ #include "test/core/bad_client/bad_client.h" -#include "src/core/channel/channel_stack.h" -#include "src/core/channel/http_server_filter.h" -#include "src/core/iomgr/endpoint_pair.h" -#include "src/core/surface/completion_queue.h" -#include "src/core/surface/server.h" -#include "src/core/support/string.h" -#include "src/core/transport/chttp2_transport.h" +#include "src/core/ext/transport/chttp2/transport/chttp2_transport.h" +#include "src/core/lib/channel/channel_stack.h" +#include "src/core/lib/channel/http_server_filter.h" +#include "src/core/lib/iomgr/endpoint_pair.h" +#include "src/core/lib/support/string.h" +#include "src/core/lib/surface/completion_queue.h" +#include "src/core/lib/surface/server.h" #include #include @@ -67,11 +67,8 @@ static void done_write(grpc_exec_ctx *exec_ctx, void *arg, bool success) { static void server_setup_transport(void *ts, grpc_transport *transport) { thd_args *a = ts; - static grpc_channel_filter const *extra_filters[] = { - &grpc_http_server_filter}; grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_server_setup_transport(&exec_ctx, a->server, transport, extra_filters, - GPR_ARRAY_SIZE(extra_filters), + grpc_server_setup_transport(&exec_ctx, a->server, transport, grpc_server_get_channel_args(a->server)); grpc_exec_ctx_finish(&exec_ctx); } @@ -105,7 +102,7 @@ void grpc_run_bad_client_test(grpc_bad_client_server_side_validator validator, sfd = grpc_iomgr_create_endpoint_pair("fixture", 65536); /* Create server, completion events */ - a.server = grpc_server_create_from_filters(NULL, 0, NULL); + a.server = grpc_server_create(NULL, NULL); a.cq = grpc_completion_queue_create(NULL); gpr_event_init(&a.done_thd); gpr_event_init(&a.done_write); @@ -158,9 +155,9 @@ void grpc_run_bad_client_test(grpc_bad_client_server_side_validator validator, grpc_exec_ctx_finish(&exec_ctx); } grpc_server_shutdown_and_notify(a.server, a.cq, NULL); - GPR_ASSERT(grpc_completion_queue_pluck(a.cq, NULL, - GRPC_TIMEOUT_SECONDS_TO_DEADLINE(1), - NULL).type == GRPC_OP_COMPLETE); + GPR_ASSERT(grpc_completion_queue_pluck( + a.cq, NULL, GRPC_TIMEOUT_SECONDS_TO_DEADLINE(1), NULL) + .type == GRPC_OP_COMPLETE); grpc_server_destroy(a.server); grpc_completion_queue_destroy(a.cq); gpr_slice_buffer_destroy(&outgoing); diff --git a/test/core/bad_client/tests/badreq.c b/test/core/bad_client/tests/badreq.c index 6d59d25b922..fd3d13f908a 100644 --- a/test/core/bad_client/tests/badreq.c +++ b/test/core/bad_client/tests/badreq.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -35,8 +35,8 @@ #include +#include "src/core/lib/surface/server.h" #include "test/core/end2end/cq_verifier.h" -#include "src/core/surface/server.h" #define PFX_STR \ "PRI * HTTP/2.0\r\n\r\nSM\r\n\r\n" \ @@ -45,9 +45,9 @@ static void verifier(grpc_server *server, grpc_completion_queue *cq, void *registered_method) { while (grpc_server_has_open_connections(server)) { - GPR_ASSERT(grpc_completion_queue_next(cq, - GRPC_TIMEOUT_MILLIS_TO_DEADLINE(20), - NULL).type == GRPC_QUEUE_TIMEOUT); + GPR_ASSERT(grpc_completion_queue_next( + cq, GRPC_TIMEOUT_MILLIS_TO_DEADLINE(20), NULL) + .type == GRPC_QUEUE_TIMEOUT); } } diff --git a/test/core/bad_client/tests/connection_prefix.c b/test/core/bad_client/tests/connection_prefix.c index 66ff8c29367..87826afa2c0 100644 --- a/test/core/bad_client/tests/connection_prefix.c +++ b/test/core/bad_client/tests/connection_prefix.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,15 +31,15 @@ * */ +#include "src/core/lib/surface/server.h" #include "test/core/bad_client/bad_client.h" -#include "src/core/surface/server.h" static void verifier(grpc_server *server, grpc_completion_queue *cq, void *registered_method) { while (grpc_server_has_open_connections(server)) { - GPR_ASSERT(grpc_completion_queue_next(cq, - GRPC_TIMEOUT_MILLIS_TO_DEADLINE(20), - NULL).type == GRPC_QUEUE_TIMEOUT); + GPR_ASSERT(grpc_completion_queue_next( + cq, GRPC_TIMEOUT_MILLIS_TO_DEADLINE(20), NULL) + .type == GRPC_QUEUE_TIMEOUT); } } diff --git a/test/core/bad_client/tests/headers.c b/test/core/bad_client/tests/headers.c index 2186a4ffcb2..f66f14d8aa4 100644 --- a/test/core/bad_client/tests/headers.c +++ b/test/core/bad_client/tests/headers.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,8 +31,8 @@ * */ +#include "src/core/lib/surface/server.h" #include "test/core/bad_client/bad_client.h" -#include "src/core/surface/server.h" #define PFX_STR \ "PRI * HTTP/2.0\r\n\r\nSM\r\n\r\n" \ @@ -41,9 +41,9 @@ static void verifier(grpc_server *server, grpc_completion_queue *cq, void *registered_method) { while (grpc_server_has_open_connections(server)) { - GPR_ASSERT(grpc_completion_queue_next(cq, - GRPC_TIMEOUT_MILLIS_TO_DEADLINE(20), - NULL).type == GRPC_QUEUE_TIMEOUT); + GPR_ASSERT(grpc_completion_queue_next( + cq, GRPC_TIMEOUT_MILLIS_TO_DEADLINE(20), NULL) + .type == GRPC_QUEUE_TIMEOUT); } } diff --git a/test/core/bad_client/tests/initial_settings_frame.c b/test/core/bad_client/tests/initial_settings_frame.c index fb6149cc3ba..b303f033f10 100644 --- a/test/core/bad_client/tests/initial_settings_frame.c +++ b/test/core/bad_client/tests/initial_settings_frame.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,8 +31,8 @@ * */ +#include "src/core/lib/surface/server.h" #include "test/core/bad_client/bad_client.h" -#include "src/core/surface/server.h" #define PFX_STR "PRI * HTTP/2.0\r\n\r\nSM\r\n\r\n" #define ONE_SETTING_HDR "\x00\x00\x06\x04\x00\x00\x00\x00\x00" @@ -40,9 +40,9 @@ static void verifier(grpc_server *server, grpc_completion_queue *cq, void *registered_method) { while (grpc_server_has_open_connections(server)) { - GPR_ASSERT(grpc_completion_queue_next(cq, - GRPC_TIMEOUT_MILLIS_TO_DEADLINE(20), - NULL).type == GRPC_QUEUE_TIMEOUT); + GPR_ASSERT(grpc_completion_queue_next( + cq, GRPC_TIMEOUT_MILLIS_TO_DEADLINE(20), NULL) + .type == GRPC_QUEUE_TIMEOUT); } } diff --git a/test/core/bad_client/tests/server_registered_method.c b/test/core/bad_client/tests/server_registered_method.c index dc6ecc51f0f..c35457c3f8e 100644 --- a/test/core/bad_client/tests/server_registered_method.c +++ b/test/core/bad_client/tests/server_registered_method.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -35,8 +35,8 @@ #include +#include "src/core/lib/surface/server.h" #include "test/core/end2end/cq_verifier.h" -#include "src/core/surface/server.h" #define PFX_STR \ "PRI * HTTP/2.0\r\n\r\nSM\r\n\r\n" \ diff --git a/test/core/bad_client/tests/simple_request.c b/test/core/bad_client/tests/simple_request.c index c04319edc59..6cb44ee2732 100644 --- a/test/core/bad_client/tests/simple_request.c +++ b/test/core/bad_client/tests/simple_request.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -35,8 +35,8 @@ #include +#include "src/core/lib/surface/server.h" #include "test/core/end2end/cq_verifier.h" -#include "src/core/surface/server.h" #define PFX_STR \ "PRI * HTTP/2.0\r\n\r\nSM\r\n\r\n" \ @@ -108,9 +108,9 @@ static void verifier(grpc_server *server, grpc_completion_queue *cq, static void failure_verifier(grpc_server *server, grpc_completion_queue *cq, void *registered_method) { while (grpc_server_has_open_connections(server)) { - GPR_ASSERT(grpc_completion_queue_next(cq, - GRPC_TIMEOUT_MILLIS_TO_DEADLINE(20), - NULL).type == GRPC_QUEUE_TIMEOUT); + GPR_ASSERT(grpc_completion_queue_next( + cq, GRPC_TIMEOUT_MILLIS_TO_DEADLINE(20), NULL) + .type == GRPC_QUEUE_TIMEOUT); } } diff --git a/test/core/bad_client/tests/unknown_frame.c b/test/core/bad_client/tests/unknown_frame.c index 2ef340eeb5c..44d1e35299a 100644 --- a/test/core/bad_client/tests/unknown_frame.c +++ b/test/core/bad_client/tests/unknown_frame.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,8 +31,8 @@ * */ +#include "src/core/lib/surface/server.h" #include "test/core/bad_client/bad_client.h" -#include "src/core/surface/server.h" #define PFX_STR \ "PRI * HTTP/2.0\r\n\r\nSM\r\n\r\n" \ @@ -41,9 +41,9 @@ static void verifier(grpc_server *server, grpc_completion_queue *cq, void *registered_method) { while (grpc_server_has_open_connections(server)) { - GPR_ASSERT(grpc_completion_queue_next(cq, - GRPC_TIMEOUT_MILLIS_TO_DEADLINE(20), - NULL).type == GRPC_QUEUE_TIMEOUT); + GPR_ASSERT(grpc_completion_queue_next( + cq, GRPC_TIMEOUT_MILLIS_TO_DEADLINE(20), NULL) + .type == GRPC_QUEUE_TIMEOUT); } } diff --git a/test/core/bad_client/tests/window_overflow.c b/test/core/bad_client/tests/window_overflow.c index 646d5c5f4c8..b6d0101c80f 100644 --- a/test/core/bad_client/tests/window_overflow.c +++ b/test/core/bad_client/tests/window_overflow.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -37,7 +37,7 @@ #include -#include "src/core/surface/server.h" +#include "src/core/lib/surface/server.h" #define PFX_STR \ "PRI * HTTP/2.0\r\n\r\nSM\r\n\r\n" \ @@ -60,9 +60,9 @@ static void verifier(grpc_server *server, grpc_completion_queue *cq, void *registered_method) { while (grpc_server_has_open_connections(server)) { - GPR_ASSERT(grpc_completion_queue_next(cq, - GRPC_TIMEOUT_MILLIS_TO_DEADLINE(20), - NULL).type == GRPC_QUEUE_TIMEOUT); + GPR_ASSERT(grpc_completion_queue_next( + cq, GRPC_TIMEOUT_MILLIS_TO_DEADLINE(20), NULL) + .type == GRPC_QUEUE_TIMEOUT); } } @@ -90,8 +90,15 @@ int main(int argc, char **argv) { addbuf(PFX_STR, sizeof(PFX_STR) - 1); for (i = 0; i < NUM_FRAMES; i++) { - uint8_t hdr[9] = {(uint8_t)(FRAME_SIZE >> 16), (uint8_t)(FRAME_SIZE >> 8), - (uint8_t)FRAME_SIZE, 0, 0, 0, 0, 0, 1}; + uint8_t hdr[9] = {(uint8_t)(FRAME_SIZE >> 16), + (uint8_t)(FRAME_SIZE >> 8), + (uint8_t)FRAME_SIZE, + 0, + 0, + 0, + 0, + 0, + 1}; addbuf(hdr, sizeof(hdr)); for (j = 0; j < MESSAGES_PER_FRAME; j++) { uint8_t message[5] = {0, 0, 0, 0, 0}; diff --git a/test/core/bad_ssl/bad_ssl_test.c b/test/core/bad_ssl/bad_ssl_test.c index a78a0798aea..013b8eaf13a 100644 --- a/test/core/bad_ssl/bad_ssl_test.c +++ b/test/core/bad_ssl/bad_ssl_test.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,8 +31,8 @@ * */ -#include #include +#include #include #include @@ -41,9 +41,10 @@ #include #include #include -#include "src/core/support/string.h" -#include "test/core/util/port.h" +#include "src/core/lib/support/env.h" +#include "src/core/lib/support/string.h" #include "test/core/end2end/cq_verifier.h" +#include "test/core/util/port.h" #include "test/core/util/test_config.h" static void *tag(intptr_t t) { return (void *)t; } @@ -144,6 +145,9 @@ int main(int argc, char **argv) { } else { strcpy(root, "."); } + if (argc == 2) { + gpr_setenv("GRPC_DEFAULT_SSL_ROOTS_FILE_PATH", argv[1]); + } /* figure out our test name */ tmp = lunder - 1; while (*tmp != '_') tmp--; diff --git a/test/core/bad_ssl/servers/alpn.c b/test/core/bad_ssl/servers/alpn.c index c8cc83b134e..3225fd03150 100644 --- a/test/core/bad_ssl/servers/alpn.c +++ b/test/core/bad_ssl/servers/alpn.c @@ -38,7 +38,7 @@ #include #include -#include "src/core/transport/chttp2/alpn.h" +#include "src/core/ext/transport/chttp2/transport/alpn.h" #include "test/core/bad_ssl/server_common.h" #include "test/core/end2end/data/ssl_test_data.h" diff --git a/test/core/bad_ssl/servers/cert.c b/test/core/bad_ssl/servers/cert.c index 4edef50b67a..73076828217 100644 --- a/test/core/bad_ssl/servers/cert.c +++ b/test/core/bad_ssl/servers/cert.c @@ -38,7 +38,7 @@ #include #include -#include "src/core/support/load_file.h" +#include "src/core/lib/support/load_file.h" #include "test/core/bad_ssl/server_common.h" #include "test/core/end2end/data/ssl_test_data.h" @@ -56,9 +56,11 @@ int main(int argc, char **argv) { grpc_init(); - cert_slice = gpr_load_file("src/core/tsi/test_creds/badserver.pem", 1, &ok); + cert_slice = + gpr_load_file("src/core/lib/tsi/test_creds/badserver.pem", 1, &ok); GPR_ASSERT(ok); - key_slice = gpr_load_file("src/core/tsi/test_creds/badserver.key", 1, &ok); + key_slice = + gpr_load_file("src/core/lib/tsi/test_creds/badserver.key", 1, &ok); GPR_ASSERT(ok); pem_key_cert_pair.private_key = (const char *)GPR_SLICE_START_PTR(key_slice); pem_key_cert_pair.cert_chain = (const char *)GPR_SLICE_START_PTR(cert_slice); diff --git a/test/core/census/mlog_test.c b/test/core/census/mlog_test.c index 5b6c5946ab5..a1fadc2290a 100644 --- a/test/core/census/mlog_test.c +++ b/test/core/census/mlog_test.c @@ -31,7 +31,7 @@ * */ -#include "src/core/census/mlog.h" +#include "src/core/lib/census/mlog.h" #include #include #include @@ -332,7 +332,7 @@ static void multiple_writers_single_reader(int circular_log) { static void setup_test(int circular_log) { census_log_initialize(LOG_SIZE_IN_MB, circular_log); - GPR_ASSERT(census_log_remaining_space() == LOG_SIZE_IN_BYTES); + // GPR_ASSERT(census_log_remaining_space() == LOG_SIZE_IN_BYTES); } // Attempts to create a record of invalid size (size > @@ -352,8 +352,8 @@ void test_invalid_record_size(void) { // check can fail if the thread is context switched to a new CPU during the // start_write execution (multiple blocks get allocated), but this has not // been observed in practice. - GPR_ASSERT(LOG_SIZE_IN_BYTES - CENSUS_LOG_MAX_RECORD_SIZE == - census_log_remaining_space()); + // GPR_ASSERT(LOG_SIZE_IN_BYTES - CENSUS_LOG_MAX_RECORD_SIZE == + // census_log_remaining_space()); census_log_shutdown(); } diff --git a/test/core/channel/channel_args_test.c b/test/core/channel/channel_args_test.c index 0b74dee41ea..352dfa045ea 100644 --- a/test/core/channel/channel_args_test.c +++ b/test/core/channel/channel_args_test.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -36,7 +36,7 @@ #include #include -#include "src/core/channel/channel_args.h" +#include "src/core/lib/channel/channel_args.h" #include "test/core/util/test_config.h" diff --git a/test/core/channel/channel_stack_test.c b/test/core/channel/channel_stack_test.c index e19e9a57aed..49e9c7e969b 100644 --- a/test/core/channel/channel_stack_test.c +++ b/test/core/channel/channel_stack_test.c @@ -31,7 +31,7 @@ * */ -#include "src/core/channel/channel_stack.h" +#include "src/core/lib/channel/channel_stack.h" #include @@ -92,10 +92,17 @@ static void free_call(grpc_exec_ctx *exec_ctx, void *arg, bool success) { } static void test_create_channel_stack(void) { - const grpc_channel_filter filter = { - call_func, channel_func, sizeof(int), call_init_func, - grpc_call_stack_ignore_set_pollset, call_destroy_func, sizeof(int), - channel_init_func, channel_destroy_func, get_peer, "some_test_filter"}; + const grpc_channel_filter filter = {call_func, + channel_func, + sizeof(int), + call_init_func, + grpc_call_stack_ignore_set_pollset, + call_destroy_func, + sizeof(int), + channel_init_func, + channel_destroy_func, + get_peer, + "some_test_filter"}; const grpc_channel_filter *filters = &filter; grpc_channel_stack *channel_stack; grpc_call_stack *call_stack; diff --git a/test/core/client_config/lb_policies_test.c b/test/core/client_config/lb_policies_test.c index cb99b3da3e7..bae3e7d18cc 100644 --- a/test/core/client_config/lb_policies_test.c +++ b/test/core/client_config/lb_policies_test.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -41,17 +41,19 @@ #include #include -#include "src/core/channel/channel_stack.h" -#include "src/core/channel/client_channel.h" -#include "src/core/client_config/lb_policies/round_robin.h" -#include "src/core/client_config/lb_policy_registry.h" -#include "src/core/support/string.h" -#include "src/core/surface/channel.h" -#include "src/core/surface/server.h" +#include "src/core/lib/channel/channel_stack.h" +#include "src/core/lib/channel/client_channel.h" +#include "src/core/lib/client_config/lb_policies/round_robin.h" +#include "src/core/lib/client_config/lb_policy_registry.h" +#include "src/core/lib/support/string.h" +#include "src/core/lib/surface/channel.h" +#include "src/core/lib/surface/server.h" #include "test/core/end2end/cq_verifier.h" #include "test/core/util/port.h" #include "test/core/util/test_config.h" +#define RETRY_TIMEOUT 300 + typedef struct servers_fixture { size_t num_servers; grpc_server **servers; @@ -137,8 +139,9 @@ static void kill_server(const servers_fixture *f, size_t i) { gpr_log(GPR_INFO, "KILLING SERVER %d", i); GPR_ASSERT(f->servers[i] != NULL); grpc_server_shutdown_and_notify(f->servers[i], f->cq, tag(10000)); - GPR_ASSERT(grpc_completion_queue_pluck(f->cq, tag(10000), n_millis_time(5000), - NULL).type == GRPC_OP_COMPLETE); + GPR_ASSERT( + grpc_completion_queue_pluck(f->cq, tag(10000), n_millis_time(5000), NULL) + .type == GRPC_OP_COMPLETE); grpc_server_destroy(f->servers[i]); f->servers[i] = NULL; } @@ -204,8 +207,8 @@ static void teardown_servers(servers_fixture *f) { if (f->servers[i] == NULL) continue; grpc_server_shutdown_and_notify(f->servers[i], f->cq, tag(10000)); GPR_ASSERT(grpc_completion_queue_pluck(f->cq, tag(10000), - n_millis_time(5000), - NULL).type == GRPC_OP_COMPLETE); + n_millis_time(5000), NULL) + .type == GRPC_OP_COMPLETE); grpc_server_destroy(f->servers[i]); } grpc_completion_queue_shutdown(f->cq); @@ -302,9 +305,10 @@ static int *perform_request(servers_fixture *f, grpc_channel *client, grpc_call_start_batch(c, ops, (size_t)(op - ops), tag(1), NULL)); s_idx = -1; - while ((ev = grpc_completion_queue_next( - f->cq, GRPC_TIMEOUT_SECONDS_TO_DEADLINE(1), NULL)).type != - GRPC_QUEUE_TIMEOUT) { + while ( + (ev = grpc_completion_queue_next( + f->cq, GRPC_TIMEOUT_MILLIS_TO_DEADLINE(10 * RETRY_TIMEOUT), NULL)) + .type != GRPC_QUEUE_TIMEOUT) { GPR_ASSERT(ev.type == GRPC_OP_COMPLETE); read_tag = ((int)(intptr_t)ev.tag); gpr_log(GPR_DEBUG, "EVENT: success:%d, type:%d, tag:%d iter:%d", @@ -376,9 +380,10 @@ static int *perform_request(servers_fixture *f, grpc_channel *client, } } - GPR_ASSERT(grpc_completion_queue_next(f->cq, - GRPC_TIMEOUT_MILLIS_TO_DEADLINE(200), - NULL).type == GRPC_QUEUE_TIMEOUT); + GPR_ASSERT( + grpc_completion_queue_next( + f->cq, GRPC_TIMEOUT_MILLIS_TO_DEADLINE(2 * RETRY_TIMEOUT), NULL) + .type == GRPC_QUEUE_TIMEOUT); grpc_metadata_array_destroy(&rdata->initial_metadata_recv); grpc_metadata_array_destroy(&rdata->trailing_metadata_recv); @@ -506,7 +511,7 @@ void run_spec(const test_spec *spec) { arg.type = GRPC_ARG_INTEGER; arg.key = "grpc.testing.fixed_reconnect_backoff"; - arg.value.integer = 100; + arg.value.integer = RETRY_TIMEOUT; args.num_args = 1; args.args = &arg; @@ -542,7 +547,7 @@ static grpc_channel *create_client(const servers_fixture *f) { arg.type = GRPC_ARG_INTEGER; arg.key = "grpc.testing.fixed_reconnect_backoff"; - arg.value.integer = 100; + arg.value.integer = RETRY_TIMEOUT; args.num_args = 1; args.args = &arg; diff --git a/test/core/client_config/resolvers/dns_resolver_connectivity_test.c b/test/core/client_config/resolvers/dns_resolver_connectivity_test.c index 75d1eb674f6..dc6a614d555 100644 --- a/test/core/client_config/resolvers/dns_resolver_connectivity_test.c +++ b/test/core/client_config/resolvers/dns_resolver_connectivity_test.c @@ -31,15 +31,15 @@ * */ -#include "src/core/client_config/resolvers/dns_resolver.h" +#include "src/core/lib/client_config/resolvers/dns_resolver.h" #include #include #include -#include "src/core/iomgr/resolve_address.h" -#include "src/core/iomgr/timer.h" +#include "src/core/lib/iomgr/resolve_address.h" +#include "src/core/lib/iomgr/timer.h" #include "test/core/util/test_config.h" static void subchannel_factory_ref(grpc_subchannel_factory *scv) {} diff --git a/test/core/client_config/resolvers/dns_resolver_test.c b/test/core/client_config/resolvers/dns_resolver_test.c index 38e76d53424..6c7a6b27e4a 100644 --- a/test/core/client_config/resolvers/dns_resolver_test.c +++ b/test/core/client_config/resolvers/dns_resolver_test.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,13 +31,13 @@ * */ -#include "src/core/client_config/resolvers/dns_resolver.h" +#include "src/core/lib/client_config/resolvers/dns_resolver.h" #include #include -#include "src/core/client_config/resolver.h" +#include "src/core/lib/client_config/resolver.h" #include "test/core/util/test_config.h" static void subchannel_factory_ref(grpc_subchannel_factory *scv) {} diff --git a/test/core/client_config/resolvers/sockaddr_resolver_test.c b/test/core/client_config/resolvers/sockaddr_resolver_test.c index 8856c85449a..fafddfd166d 100644 --- a/test/core/client_config/resolvers/sockaddr_resolver_test.c +++ b/test/core/client_config/resolvers/sockaddr_resolver_test.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,13 +31,13 @@ * */ -#include "src/core/client_config/resolvers/sockaddr_resolver.h" +#include "src/core/lib/client_config/resolvers/sockaddr_resolver.h" #include #include -#include "src/core/client_config/resolver.h" +#include "src/core/lib/client_config/resolver.h" #include "test/core/util/test_config.h" static void subchannel_factory_ref(grpc_subchannel_factory *scv) {} diff --git a/test/core/client_config/set_initial_connect_string_test.c b/test/core/client_config/set_initial_connect_string_test.c index 3cf267fb3bd..7fd92a079e5 100644 --- a/test/core/client_config/set_initial_connect_string_test.c +++ b/test/core/client_config/set_initial_connect_string_test.c @@ -38,10 +38,10 @@ #include #include -#include "src/core/client_config/initial_connect_string.h" -#include "src/core/iomgr/sockaddr.h" -#include "src/core/security/credentials.h" -#include "src/core/support/string.h" +#include "src/core/lib/client_config/initial_connect_string.h" +#include "src/core/lib/iomgr/sockaddr.h" +#include "src/core/lib/security/credentials.h" +#include "src/core/lib/support/string.h" #include "test/core/util/port.h" #include "test/core/util/test_config.h" #include "test/core/util/test_tcp_server.h" diff --git a/test/core/client_config/uri_parser_test.c b/test/core/client_config/uri_parser_test.c index df12d6b4cb7..c7f77263804 100644 --- a/test/core/client_config/uri_parser_test.c +++ b/test/core/client_config/uri_parser_test.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,7 +31,7 @@ * */ -#include "src/core/client_config/uri_parser.h" +#include "src/core/lib/client_config/uri_parser.h" #include diff --git a/test/core/compression/algorithm_test.c b/test/core/compression/algorithm_test.c index 7de7e11a94d..937eb669031 100644 --- a/test/core/compression/algorithm_test.c +++ b/test/core/compression/algorithm_test.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,7 +31,7 @@ * */ -#include "src/core/compression/algorithm_metadata.h" +#include "src/core/lib/compression/algorithm_metadata.h" #include #include @@ -40,7 +40,7 @@ #include #include -#include "src/core/transport/static_metadata.h" +#include "src/core/lib/transport/static_metadata.h" #include "test/core/util/test_config.h" static void test_algorithm_mesh(void) { diff --git a/test/core/compression/compression_test.c b/test/core/compression/compression_test.c index 26d7b2b6ccd..5d8231fd7fe 100644 --- a/test/core/compression/compression_test.c +++ b/test/core/compression/compression_test.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -93,18 +93,98 @@ static void test_compression_algorithm_name(void) { } static void test_compression_algorithm_for_level(void) { - size_t i; - grpc_compression_level levels[] = { - GRPC_COMPRESS_LEVEL_NONE, GRPC_COMPRESS_LEVEL_LOW, - GRPC_COMPRESS_LEVEL_MED, GRPC_COMPRESS_LEVEL_HIGH}; - grpc_compression_algorithm algorithms[] = { - GRPC_COMPRESS_NONE, GRPC_COMPRESS_DEFLATE, GRPC_COMPRESS_DEFLATE, - GRPC_COMPRESS_DEFLATE}; gpr_log(GPR_DEBUG, "test_compression_algorithm_for_level"); - for (i = 0; i < GPR_ARRAY_SIZE(levels); i++) { - GPR_ASSERT(algorithms[i] == - grpc_compression_algorithm_for_level(levels[i])); + { + /* accept only identity (aka none) */ + uint32_t accepted_encodings = 0; + GPR_BITSET(&accepted_encodings, GRPC_COMPRESS_NONE); /* always */ + + GPR_ASSERT(GRPC_COMPRESS_NONE == + grpc_compression_algorithm_for_level(GRPC_COMPRESS_LEVEL_NONE, + accepted_encodings)); + + GPR_ASSERT(GRPC_COMPRESS_NONE == + grpc_compression_algorithm_for_level(GRPC_COMPRESS_LEVEL_LOW, + accepted_encodings)); + + GPR_ASSERT(GRPC_COMPRESS_NONE == + grpc_compression_algorithm_for_level(GRPC_COMPRESS_LEVEL_MED, + accepted_encodings)); + + GPR_ASSERT(GRPC_COMPRESS_NONE == + grpc_compression_algorithm_for_level(GRPC_COMPRESS_LEVEL_HIGH, + accepted_encodings)); + } + + { + /* accept only gzip */ + uint32_t accepted_encodings = 0; + GPR_BITSET(&accepted_encodings, GRPC_COMPRESS_NONE); /* always */ + GPR_BITSET(&accepted_encodings, GRPC_COMPRESS_GZIP); + + GPR_ASSERT(GRPC_COMPRESS_NONE == + grpc_compression_algorithm_for_level(GRPC_COMPRESS_LEVEL_NONE, + accepted_encodings)); + + GPR_ASSERT(GRPC_COMPRESS_GZIP == + grpc_compression_algorithm_for_level(GRPC_COMPRESS_LEVEL_LOW, + accepted_encodings)); + + GPR_ASSERT(GRPC_COMPRESS_GZIP == + grpc_compression_algorithm_for_level(GRPC_COMPRESS_LEVEL_MED, + accepted_encodings)); + + GPR_ASSERT(GRPC_COMPRESS_GZIP == + grpc_compression_algorithm_for_level(GRPC_COMPRESS_LEVEL_HIGH, + accepted_encodings)); + } + + { + /* accept only deflate */ + uint32_t accepted_encodings = 0; + GPR_BITSET(&accepted_encodings, GRPC_COMPRESS_NONE); /* always */ + GPR_BITSET(&accepted_encodings, GRPC_COMPRESS_DEFLATE); + + GPR_ASSERT(GRPC_COMPRESS_NONE == + grpc_compression_algorithm_for_level(GRPC_COMPRESS_LEVEL_NONE, + accepted_encodings)); + + GPR_ASSERT(GRPC_COMPRESS_DEFLATE == + grpc_compression_algorithm_for_level(GRPC_COMPRESS_LEVEL_LOW, + accepted_encodings)); + + GPR_ASSERT(GRPC_COMPRESS_DEFLATE == + grpc_compression_algorithm_for_level(GRPC_COMPRESS_LEVEL_MED, + accepted_encodings)); + + GPR_ASSERT(GRPC_COMPRESS_DEFLATE == + grpc_compression_algorithm_for_level(GRPC_COMPRESS_LEVEL_HIGH, + accepted_encodings)); + } + + { + /* accept gzip and deflate */ + uint32_t accepted_encodings = 0; + GPR_BITSET(&accepted_encodings, GRPC_COMPRESS_NONE); /* always */ + GPR_BITSET(&accepted_encodings, GRPC_COMPRESS_GZIP); + GPR_BITSET(&accepted_encodings, GRPC_COMPRESS_DEFLATE); + + GPR_ASSERT(GRPC_COMPRESS_NONE == + grpc_compression_algorithm_for_level(GRPC_COMPRESS_LEVEL_NONE, + accepted_encodings)); + + GPR_ASSERT(GRPC_COMPRESS_GZIP == + grpc_compression_algorithm_for_level(GRPC_COMPRESS_LEVEL_LOW, + accepted_encodings)); + + GPR_ASSERT(GRPC_COMPRESS_DEFLATE == + grpc_compression_algorithm_for_level(GRPC_COMPRESS_LEVEL_MED, + accepted_encodings)); + + GPR_ASSERT(GRPC_COMPRESS_DEFLATE == + grpc_compression_algorithm_for_level(GRPC_COMPRESS_LEVEL_HIGH, + accepted_encodings)); } } diff --git a/test/core/compression/message_compress_test.c b/test/core/compression/message_compress_test.c index 6d3d16128a8..378badca286 100644 --- a/test/core/compression/message_compress_test.c +++ b/test/core/compression/message_compress_test.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,7 +31,7 @@ * */ -#include "src/core/compression/message_compress.h" +#include "src/core/lib/compression/message_compress.h" #include #include @@ -40,7 +40,7 @@ #include #include -#include "src/core/support/murmur_hash.h" +#include "src/core/lib/support/murmur_hash.h" #include "test/core/util/slice_splitter.h" #include "test/core/util/test_config.h" diff --git a/test/core/end2end/cq_verifier.c b/test/core/end2end/cq_verifier.c index 724d419a7ab..baf8e8ed18b 100644 --- a/test/core/end2end/cq_verifier.c +++ b/test/core/end2end/cq_verifier.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -37,8 +37,6 @@ #include #include -#include "src/core/surface/event_string.h" -#include "src/core/support/string.h" #include #include #include @@ -46,6 +44,8 @@ #include #include #include +#include "src/core/lib/support/string.h" +#include "src/core/lib/surface/event_string.h" #define ROOT_EXPECTATION 1000 diff --git a/test/core/end2end/dualstack_socket_test.c b/test/core/end2end/dualstack_socket_test.c index 58e13a4098b..7501df98dc7 100644 --- a/test/core/end2end/dualstack_socket_test.c +++ b/test/core/end2end/dualstack_socket_test.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -39,9 +39,9 @@ #include #include -#include "src/core/support/string.h" -#include "src/core/iomgr/resolve_address.h" -#include "src/core/iomgr/socket_utils_posix.h" +#include "src/core/lib/iomgr/resolve_address.h" +#include "src/core/lib/iomgr/socket_utils_posix.h" +#include "src/core/lib/support/string.h" #include "test/core/end2end/cq_verifier.h" #include "test/core/util/port.h" @@ -249,9 +249,9 @@ void test_connect(const char *server_host, const char *client_host, int port, /* Destroy server. */ grpc_server_shutdown_and_notify(server, cq, tag(1000)); - GPR_ASSERT(grpc_completion_queue_pluck(cq, tag(1000), - GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5), - NULL).type == GRPC_OP_COMPLETE); + GPR_ASSERT(grpc_completion_queue_pluck( + cq, tag(1000), GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5), NULL) + .type == GRPC_OP_COMPLETE); grpc_server_destroy(server); grpc_completion_queue_shutdown(cq); drain_cq(cq); diff --git a/test/core/end2end/end2end_nosec_tests.c b/test/core/end2end/end2end_nosec_tests.c index 17dc190d14f..b8934512c67 100644 --- a/test/core/end2end/end2end_nosec_tests.c +++ b/test/core/end2end/end2end_nosec_tests.c @@ -35,7 +35,9 @@ /* This file is auto-generated */ #include "test/core/end2end/end2end_tests.h" + #include + #include extern void bad_hostname(grpc_end2end_test_config config); diff --git a/test/core/end2end/end2end_tests.c b/test/core/end2end/end2end_tests.c index 6f2f5aff78c..f0969794c60 100644 --- a/test/core/end2end/end2end_tests.c +++ b/test/core/end2end/end2end_tests.c @@ -35,7 +35,9 @@ /* This file is auto-generated */ #include "test/core/end2end/end2end_tests.h" + #include + #include extern void bad_hostname(grpc_end2end_test_config config); diff --git a/test/core/end2end/fixtures/h2_census.c b/test/core/end2end/fixtures/h2_census.c index e74c9ae243c..9d091d5dbea 100644 --- a/test/core/end2end/fixtures/h2_census.c +++ b/test/core/end2end/fixtures/h2_census.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -35,19 +35,19 @@ #include -#include "src/core/channel/channel_args.h" -#include "src/core/channel/client_channel.h" -#include "src/core/channel/connected_channel.h" -#include "src/core/channel/http_server_filter.h" -#include "src/core/surface/channel.h" -#include "src/core/surface/server.h" -#include "src/core/transport/chttp2_transport.h" #include #include #include #include #include #include +#include "src/core/ext/transport/chttp2/transport/chttp2_transport.h" +#include "src/core/lib/channel/channel_args.h" +#include "src/core/lib/channel/client_channel.h" +#include "src/core/lib/channel/connected_channel.h" +#include "src/core/lib/channel/http_server_filter.h" +#include "src/core/lib/surface/channel.h" +#include "src/core/lib/surface/server.h" #include "test/core/util/port.h" #include "test/core/util/test_config.h" diff --git a/test/core/end2end/fixtures/h2_compress.c b/test/core/end2end/fixtures/h2_compress.c index fea8a4f7511..8d8d5e7d6c4 100644 --- a/test/core/end2end/fixtures/h2_compress.c +++ b/test/core/end2end/fixtures/h2_compress.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -35,19 +35,19 @@ #include -#include "src/core/channel/channel_args.h" -#include "src/core/channel/client_channel.h" -#include "src/core/channel/connected_channel.h" -#include "src/core/channel/http_server_filter.h" -#include "src/core/surface/channel.h" -#include "src/core/surface/server.h" -#include "src/core/transport/chttp2_transport.h" #include #include #include #include #include #include +#include "src/core/ext/transport/chttp2/transport/chttp2_transport.h" +#include "src/core/lib/channel/channel_args.h" +#include "src/core/lib/channel/client_channel.h" +#include "src/core/lib/channel/connected_channel.h" +#include "src/core/lib/channel/http_server_filter.h" +#include "src/core/lib/surface/channel.h" +#include "src/core/lib/surface/server.h" #include "test/core/util/port.h" #include "test/core/util/test_config.h" diff --git a/test/core/end2end/fixtures/h2_fakesec.c b/test/core/end2end/fixtures/h2_fakesec.c index 2767f1df4a7..7386691bdcd 100644 --- a/test/core/end2end/fixtures/h2_fakesec.c +++ b/test/core/end2end/fixtures/h2_fakesec.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -36,14 +36,14 @@ #include #include -#include "src/core/channel/channel_args.h" -#include "src/core/security/credentials.h" #include #include #include -#include "test/core/util/test_config.h" -#include "test/core/util/port.h" +#include "src/core/lib/channel/channel_args.h" +#include "src/core/lib/security/credentials.h" #include "test/core/end2end/data/ssl_test_data.h" +#include "test/core/util/port.h" +#include "test/core/util/test_config.h" typedef struct fullstack_secure_fixture_data { char *localaddr; diff --git a/test/core/end2end/fixtures/h2_full+pipe.c b/test/core/end2end/fixtures/h2_full+pipe.c index 4b935818999..e23802379c0 100644 --- a/test/core/end2end/fixtures/h2_full+pipe.c +++ b/test/core/end2end/fixtures/h2_full+pipe.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -35,21 +35,21 @@ #include -#include "src/core/channel/client_channel.h" -#include "src/core/channel/connected_channel.h" -#include "src/core/channel/http_server_filter.h" -#include "src/core/surface/channel.h" -#include "src/core/surface/server.h" -#include "src/core/transport/chttp2_transport.h" #include #include #include #include #include #include +#include "src/core/ext/transport/chttp2/transport/chttp2_transport.h" +#include "src/core/lib/channel/client_channel.h" +#include "src/core/lib/channel/connected_channel.h" +#include "src/core/lib/channel/http_server_filter.h" +#include "src/core/lib/iomgr/wakeup_fd_posix.h" +#include "src/core/lib/surface/channel.h" +#include "src/core/lib/surface/server.h" #include "test/core/util/port.h" #include "test/core/util/test_config.h" -#include "src/core/iomgr/wakeup_fd_posix.h" typedef struct fullstack_fixture_data { char *localaddr; diff --git a/test/core/end2end/fixtures/h2_full+poll+pipe.c b/test/core/end2end/fixtures/h2_full+poll+pipe.c index 682598fbe2d..688686e3224 100644 --- a/test/core/end2end/fixtures/h2_full+poll+pipe.c +++ b/test/core/end2end/fixtures/h2_full+poll+pipe.c @@ -42,14 +42,14 @@ #include #include -#include "src/core/channel/client_channel.h" -#include "src/core/channel/connected_channel.h" -#include "src/core/channel/http_server_filter.h" -#include "src/core/iomgr/pollset_posix.h" -#include "src/core/iomgr/wakeup_fd_posix.h" -#include "src/core/surface/channel.h" -#include "src/core/surface/server.h" -#include "src/core/transport/chttp2_transport.h" +#include "src/core/ext/transport/chttp2/transport/chttp2_transport.h" +#include "src/core/lib/channel/client_channel.h" +#include "src/core/lib/channel/connected_channel.h" +#include "src/core/lib/channel/http_server_filter.h" +#include "src/core/lib/iomgr/pollset_posix.h" +#include "src/core/lib/iomgr/wakeup_fd_posix.h" +#include "src/core/lib/surface/channel.h" +#include "src/core/lib/surface/server.h" #include "test/core/util/port.h" #include "test/core/util/test_config.h" diff --git a/test/core/end2end/fixtures/h2_full+poll.c b/test/core/end2end/fixtures/h2_full+poll.c index 5a0b2ef4953..4bb1f808684 100644 --- a/test/core/end2end/fixtures/h2_full+poll.c +++ b/test/core/end2end/fixtures/h2_full+poll.c @@ -42,13 +42,13 @@ #include #include -#include "src/core/channel/client_channel.h" -#include "src/core/channel/connected_channel.h" -#include "src/core/channel/http_server_filter.h" -#include "src/core/iomgr/pollset_posix.h" -#include "src/core/surface/channel.h" -#include "src/core/surface/server.h" -#include "src/core/transport/chttp2_transport.h" +#include "src/core/ext/transport/chttp2/transport/chttp2_transport.h" +#include "src/core/lib/channel/client_channel.h" +#include "src/core/lib/channel/connected_channel.h" +#include "src/core/lib/channel/http_server_filter.h" +#include "src/core/lib/iomgr/pollset_posix.h" +#include "src/core/lib/surface/channel.h" +#include "src/core/lib/surface/server.h" #include "test/core/util/port.h" #include "test/core/util/test_config.h" diff --git a/test/core/end2end/fixtures/h2_full+trace.c b/test/core/end2end/fixtures/h2_full+trace.c new file mode 100644 index 00000000000..f1b4c5d43ae --- /dev/null +++ b/test/core/end2end/fixtures/h2_full+trace.c @@ -0,0 +1,132 @@ +/* + * + * Copyright 2015-2016, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include "test/core/end2end/end2end_tests.h" + +#include + +#include +#include +#include +#include +#include +#include +#include "src/core/ext/transport/chttp2/transport/chttp2_transport.h" +#include "src/core/lib/channel/client_channel.h" +#include "src/core/lib/channel/connected_channel.h" +#include "src/core/lib/channel/http_server_filter.h" +#include "src/core/lib/support/env.h" +#include "src/core/lib/surface/channel.h" +#include "src/core/lib/surface/server.h" +#include "test/core/util/port.h" +#include "test/core/util/test_config.h" + +typedef struct fullstack_fixture_data { + char *localaddr; +} fullstack_fixture_data; + +static grpc_end2end_test_fixture chttp2_create_fixture_fullstack( + grpc_channel_args *client_args, grpc_channel_args *server_args) { + grpc_end2end_test_fixture f; + int port = grpc_pick_unused_port_or_die(); + fullstack_fixture_data *ffd = gpr_malloc(sizeof(fullstack_fixture_data)); + memset(&f, 0, sizeof(f)); + + gpr_join_host_port(&ffd->localaddr, "localhost", port); + + f.fixture_data = ffd; + f.cq = grpc_completion_queue_create(NULL); + + return f; +} + +void chttp2_init_client_fullstack(grpc_end2end_test_fixture *f, + grpc_channel_args *client_args) { + fullstack_fixture_data *ffd = f->fixture_data; + f->client = grpc_insecure_channel_create(ffd->localaddr, client_args, NULL); + GPR_ASSERT(f->client); +} + +void chttp2_init_server_fullstack(grpc_end2end_test_fixture *f, + grpc_channel_args *server_args) { + fullstack_fixture_data *ffd = f->fixture_data; + if (f->server) { + grpc_server_destroy(f->server); + } + f->server = grpc_server_create(server_args, NULL); + grpc_server_register_completion_queue(f->server, f->cq, NULL); + GPR_ASSERT(grpc_server_add_insecure_http2_port(f->server, ffd->localaddr)); + grpc_server_start(f->server); +} + +void chttp2_tear_down_fullstack(grpc_end2end_test_fixture *f) { + fullstack_fixture_data *ffd = f->fixture_data; + gpr_free(ffd->localaddr); + gpr_free(ffd); +} + +/* All test configurations */ +static grpc_end2end_test_config configs[] = { + {"chttp2/fullstack", FEATURE_MASK_SUPPORTS_DELAYED_CONNECTION, + chttp2_create_fixture_fullstack, chttp2_init_client_fullstack, + chttp2_init_server_fullstack, chttp2_tear_down_fullstack}, +}; + +int main(int argc, char **argv) { + size_t i; + + /* force tracing on, with a value to force many + code paths in trace.c to be taken */ + gpr_setenv("GRPC_TRACE", "doesnt-exist,http,all"); + +#ifdef GPR_POSIX_SOCKET + g_fixture_slowdown_factor = isatty(STDOUT_FILENO) ? 10.0 : 1.0; +#else + g_fixture_slowdown_factor = 10.0; +#endif + + grpc_test_init(argc, argv); + grpc_init(); + + GPR_ASSERT(0 == grpc_tracer_set_enabled("also-doesnt-exist", 0)); + GPR_ASSERT(1 == grpc_tracer_set_enabled("http", 1)); + GPR_ASSERT(1 == grpc_tracer_set_enabled("all", 1)); + + for (i = 0; i < sizeof(configs) / sizeof(*configs); i++) { + grpc_end2end_tests(argc, argv, configs[i]); + } + + grpc_shutdown(); + + return 0; +} diff --git a/test/core/end2end/fixtures/h2_full.c b/test/core/end2end/fixtures/h2_full.c index ebaa1c6a2c4..cd88ed20692 100644 --- a/test/core/end2end/fixtures/h2_full.c +++ b/test/core/end2end/fixtures/h2_full.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -35,18 +35,18 @@ #include -#include "src/core/channel/client_channel.h" -#include "src/core/channel/connected_channel.h" -#include "src/core/channel/http_server_filter.h" -#include "src/core/surface/channel.h" -#include "src/core/surface/server.h" -#include "src/core/transport/chttp2_transport.h" #include #include #include #include #include #include +#include "src/core/ext/transport/chttp2/transport/chttp2_transport.h" +#include "src/core/lib/channel/client_channel.h" +#include "src/core/lib/channel/connected_channel.h" +#include "src/core/lib/channel/http_server_filter.h" +#include "src/core/lib/surface/channel.h" +#include "src/core/lib/surface/server.h" #include "test/core/util/port.h" #include "test/core/util/test_config.h" diff --git a/test/core/end2end/fixtures/h2_oauth2.c b/test/core/end2end/fixtures/h2_oauth2.c index e2c82917eff..ee188cc1748 100644 --- a/test/core/end2end/fixtures/h2_oauth2.c +++ b/test/core/end2end/fixtures/h2_oauth2.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -36,15 +36,15 @@ #include #include -#include "src/core/channel/channel_args.h" -#include "src/core/iomgr/iomgr.h" -#include "src/core/security/credentials.h" #include #include #include -#include "test/core/util/test_config.h" -#include "test/core/util/port.h" +#include "src/core/lib/channel/channel_args.h" +#include "src/core/lib/iomgr/iomgr.h" +#include "src/core/lib/security/credentials.h" #include "test/core/end2end/data/ssl_test_data.h" +#include "test/core/util/port.h" +#include "test/core/util/test_config.h" static const char oauth2_md[] = "Bearer aaslkfjs424535asdf"; static const char *client_identity_property_name = "smurf_name"; diff --git a/test/core/end2end/fixtures/h2_proxy.c b/test/core/end2end/fixtures/h2_proxy.c index 8bcc1b6ee01..299e44e2312 100644 --- a/test/core/end2end/fixtures/h2_proxy.c +++ b/test/core/end2end/fixtures/h2_proxy.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -35,18 +35,18 @@ #include -#include "src/core/channel/client_channel.h" -#include "src/core/channel/connected_channel.h" -#include "src/core/channel/http_server_filter.h" -#include "src/core/surface/channel.h" -#include "src/core/surface/server.h" -#include "src/core/transport/chttp2_transport.h" #include #include #include #include #include #include +#include "src/core/ext/transport/chttp2/transport/chttp2_transport.h" +#include "src/core/lib/channel/client_channel.h" +#include "src/core/lib/channel/connected_channel.h" +#include "src/core/lib/channel/http_server_filter.h" +#include "src/core/lib/surface/channel.h" +#include "src/core/lib/surface/server.h" #include "test/core/end2end/fixtures/proxy.h" #include "test/core/util/port.h" #include "test/core/util/test_config.h" diff --git a/test/core/end2end/fixtures/h2_sockpair+trace.c b/test/core/end2end/fixtures/h2_sockpair+trace.c index 511c8b1a46a..5fc8b325831 100644 --- a/test/core/end2end/fixtures/h2_sockpair+trace.c +++ b/test/core/end2end/fixtures/h2_sockpair+trace.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -35,22 +35,22 @@ #include -#include "src/core/channel/client_channel.h" -#include "src/core/channel/connected_channel.h" -#include "src/core/channel/http_client_filter.h" -#include "src/core/channel/http_server_filter.h" -#include "src/core/channel/compress_filter.h" -#include "src/core/iomgr/endpoint_pair.h" -#include "src/core/iomgr/iomgr.h" -#include "src/core/support/env.h" -#include "src/core/surface/channel.h" -#include "src/core/surface/server.h" -#include "src/core/transport/chttp2_transport.h" #include #include #include #include #include +#include "src/core/ext/transport/chttp2/transport/chttp2_transport.h" +#include "src/core/lib/channel/client_channel.h" +#include "src/core/lib/channel/compress_filter.h" +#include "src/core/lib/channel/connected_channel.h" +#include "src/core/lib/channel/http_client_filter.h" +#include "src/core/lib/channel/http_server_filter.h" +#include "src/core/lib/iomgr/endpoint_pair.h" +#include "src/core/lib/iomgr/iomgr.h" +#include "src/core/lib/support/env.h" +#include "src/core/lib/surface/channel.h" +#include "src/core/lib/surface/server.h" #include "test/core/util/port.h" #include "test/core/util/test_config.h" @@ -59,11 +59,8 @@ static void server_setup_transport(void *ts, grpc_transport *transport) { grpc_end2end_test_fixture *f = ts; - static grpc_channel_filter const *extra_filters[] = { - &grpc_http_server_filter}; grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_server_setup_transport(&exec_ctx, f->server, transport, extra_filters, - GPR_ARRAY_SIZE(extra_filters), + grpc_server_setup_transport(&exec_ctx, f->server, transport, grpc_server_get_channel_args(f->server)); grpc_exec_ctx_finish(&exec_ctx); } @@ -77,17 +74,9 @@ static void client_setup_transport(grpc_exec_ctx *exec_ctx, void *ts, grpc_transport *transport) { sp_client_setup *cs = ts; - const grpc_channel_filter *filters[] = {&grpc_http_client_filter, - &grpc_compress_filter, - &grpc_connected_channel_filter}; - size_t nfilters = sizeof(filters) / sizeof(*filters); - grpc_channel *channel = grpc_channel_create_from_filters( - exec_ctx, "socketpair-target", filters, nfilters, cs->client_args, 1); - - cs->f->client = channel; - - grpc_connected_channel_bind_transport(grpc_channel_get_channel_stack(channel), - transport); + cs->f->client = + grpc_channel_create(exec_ctx, "socketpair-target", cs->client_args, + GRPC_CLIENT_DIRECT_CHANNEL, transport); } static grpc_end2end_test_fixture chttp2_create_fixture_socketpair( @@ -126,7 +115,7 @@ static void chttp2_init_server_socketpair(grpc_end2end_test_fixture *f, grpc_endpoint_pair *sfd = f->fixture_data; grpc_transport *transport; GPR_ASSERT(!f->server); - f->server = grpc_server_create_from_filters(NULL, 0, server_args); + f->server = grpc_server_create(server_args, NULL); grpc_server_register_completion_queue(f->server, f->cq, NULL); grpc_server_start(f->server); transport = diff --git a/test/core/end2end/fixtures/h2_sockpair.c b/test/core/end2end/fixtures/h2_sockpair.c index 6b4787b1e52..739e553514d 100644 --- a/test/core/end2end/fixtures/h2_sockpair.c +++ b/test/core/end2end/fixtures/h2_sockpair.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -35,21 +35,21 @@ #include -#include "src/core/channel/client_channel.h" -#include "src/core/channel/compress_filter.h" -#include "src/core/channel/connected_channel.h" -#include "src/core/channel/http_client_filter.h" -#include "src/core/channel/http_server_filter.h" -#include "src/core/iomgr/endpoint_pair.h" -#include "src/core/iomgr/iomgr.h" -#include "src/core/surface/channel.h" -#include "src/core/surface/server.h" -#include "src/core/transport/chttp2_transport.h" #include #include #include #include #include +#include "src/core/ext/transport/chttp2/transport/chttp2_transport.h" +#include "src/core/lib/channel/client_channel.h" +#include "src/core/lib/channel/compress_filter.h" +#include "src/core/lib/channel/connected_channel.h" +#include "src/core/lib/channel/http_client_filter.h" +#include "src/core/lib/channel/http_server_filter.h" +#include "src/core/lib/iomgr/endpoint_pair.h" +#include "src/core/lib/iomgr/iomgr.h" +#include "src/core/lib/surface/channel.h" +#include "src/core/lib/surface/server.h" #include "test/core/util/port.h" #include "test/core/util/test_config.h" @@ -58,11 +58,8 @@ static void server_setup_transport(void *ts, grpc_transport *transport) { grpc_end2end_test_fixture *f = ts; - static grpc_channel_filter const *extra_filters[] = { - &grpc_http_server_filter}; grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_server_setup_transport(&exec_ctx, f->server, transport, extra_filters, - GPR_ARRAY_SIZE(extra_filters), + grpc_server_setup_transport(&exec_ctx, f->server, transport, grpc_server_get_channel_args(f->server)); grpc_exec_ctx_finish(&exec_ctx); } @@ -76,17 +73,9 @@ static void client_setup_transport(grpc_exec_ctx *exec_ctx, void *ts, grpc_transport *transport) { sp_client_setup *cs = ts; - const grpc_channel_filter *filters[] = {&grpc_http_client_filter, - &grpc_compress_filter, - &grpc_connected_channel_filter}; - size_t nfilters = sizeof(filters) / sizeof(*filters); - grpc_channel *channel = grpc_channel_create_from_filters( - exec_ctx, "socketpair-target", filters, nfilters, cs->client_args, 1); - - cs->f->client = channel; - - grpc_connected_channel_bind_transport(grpc_channel_get_channel_stack(channel), - transport); + cs->f->client = + grpc_channel_create(exec_ctx, "socketpair-target", cs->client_args, + GRPC_CLIENT_DIRECT_CHANNEL, transport); } static grpc_end2end_test_fixture chttp2_create_fixture_socketpair( @@ -125,7 +114,7 @@ static void chttp2_init_server_socketpair(grpc_end2end_test_fixture *f, grpc_endpoint_pair *sfd = f->fixture_data; grpc_transport *transport; GPR_ASSERT(!f->server); - f->server = grpc_server_create_from_filters(NULL, 0, server_args); + f->server = grpc_server_create(server_args, NULL); grpc_server_register_completion_queue(f->server, f->cq, NULL); grpc_server_start(f->server); transport = diff --git a/test/core/end2end/fixtures/h2_sockpair_1byte.c b/test/core/end2end/fixtures/h2_sockpair_1byte.c index 3ae8e966832..f5312cae831 100644 --- a/test/core/end2end/fixtures/h2_sockpair_1byte.c +++ b/test/core/end2end/fixtures/h2_sockpair_1byte.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -35,21 +35,21 @@ #include -#include "src/core/channel/client_channel.h" -#include "src/core/channel/connected_channel.h" -#include "src/core/channel/http_client_filter.h" -#include "src/core/channel/http_server_filter.h" -#include "src/core/channel/compress_filter.h" -#include "src/core/iomgr/endpoint_pair.h" -#include "src/core/iomgr/iomgr.h" -#include "src/core/surface/channel.h" -#include "src/core/surface/server.h" -#include "src/core/transport/chttp2_transport.h" #include #include #include #include #include +#include "src/core/ext/transport/chttp2/transport/chttp2_transport.h" +#include "src/core/lib/channel/client_channel.h" +#include "src/core/lib/channel/compress_filter.h" +#include "src/core/lib/channel/connected_channel.h" +#include "src/core/lib/channel/http_client_filter.h" +#include "src/core/lib/channel/http_server_filter.h" +#include "src/core/lib/iomgr/endpoint_pair.h" +#include "src/core/lib/iomgr/iomgr.h" +#include "src/core/lib/surface/channel.h" +#include "src/core/lib/surface/server.h" #include "test/core/util/port.h" #include "test/core/util/test_config.h" @@ -58,11 +58,8 @@ static void server_setup_transport(void *ts, grpc_transport *transport) { grpc_end2end_test_fixture *f = ts; - static grpc_channel_filter const *extra_filters[] = { - &grpc_http_server_filter}; grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_server_setup_transport(&exec_ctx, f->server, transport, extra_filters, - GPR_ARRAY_SIZE(extra_filters), + grpc_server_setup_transport(&exec_ctx, f->server, transport, grpc_server_get_channel_args(f->server)); grpc_exec_ctx_finish(&exec_ctx); } @@ -76,17 +73,9 @@ static void client_setup_transport(grpc_exec_ctx *exec_ctx, void *ts, grpc_transport *transport) { sp_client_setup *cs = ts; - const grpc_channel_filter *filters[] = {&grpc_http_client_filter, - &grpc_compress_filter, - &grpc_connected_channel_filter}; - size_t nfilters = sizeof(filters) / sizeof(*filters); - grpc_channel *channel = grpc_channel_create_from_filters( - exec_ctx, "socketpair-target", filters, nfilters, cs->client_args, 1); - - cs->f->client = channel; - - grpc_connected_channel_bind_transport(grpc_channel_get_channel_stack(channel), - transport); + cs->f->client = + grpc_channel_create(exec_ctx, "socketpair-target", cs->client_args, + GRPC_CLIENT_DIRECT_CHANNEL, transport); } static grpc_end2end_test_fixture chttp2_create_fixture_socketpair( @@ -125,7 +114,7 @@ static void chttp2_init_server_socketpair(grpc_end2end_test_fixture *f, grpc_endpoint_pair *sfd = f->fixture_data; grpc_transport *transport; GPR_ASSERT(!f->server); - f->server = grpc_server_create_from_filters(NULL, 0, server_args); + f->server = grpc_server_create(server_args, NULL); grpc_server_register_completion_queue(f->server, f->cq, NULL); grpc_server_start(f->server); transport = diff --git a/test/core/end2end/fixtures/h2_ssl+poll.c b/test/core/end2end/fixtures/h2_ssl+poll.c index 66268c77d58..e93b4361acc 100644 --- a/test/core/end2end/fixtures/h2_ssl+poll.c +++ b/test/core/end2end/fixtures/h2_ssl+poll.c @@ -40,12 +40,12 @@ #include #include -#include "src/core/channel/channel_args.h" -#include "src/core/iomgr/pollset_posix.h" -#include "src/core/security/credentials.h" -#include "src/core/support/env.h" -#include "src/core/support/tmpfile.h" -#include "src/core/support/string.h" +#include "src/core/lib/channel/channel_args.h" +#include "src/core/lib/iomgr/pollset_posix.h" +#include "src/core/lib/security/credentials.h" +#include "src/core/lib/support/env.h" +#include "src/core/lib/support/string.h" +#include "src/core/lib/support/tmpfile.h" #include "test/core/end2end/data/ssl_test_data.h" #include "test/core/util/port.h" #include "test/core/util/test_config.h" diff --git a/test/core/end2end/fixtures/h2_ssl.c b/test/core/end2end/fixtures/h2_ssl.c index e21a3477df2..fecd03f6a72 100644 --- a/test/core/end2end/fixtures/h2_ssl.c +++ b/test/core/end2end/fixtures/h2_ssl.c @@ -40,11 +40,11 @@ #include #include -#include "src/core/channel/channel_args.h" -#include "src/core/security/credentials.h" -#include "src/core/support/env.h" -#include "src/core/support/tmpfile.h" -#include "src/core/support/string.h" +#include "src/core/lib/channel/channel_args.h" +#include "src/core/lib/security/credentials.h" +#include "src/core/lib/support/env.h" +#include "src/core/lib/support/string.h" +#include "src/core/lib/support/tmpfile.h" #include "test/core/end2end/data/ssl_test_data.h" #include "test/core/util/port.h" #include "test/core/util/test_config.h" diff --git a/test/core/end2end/fixtures/h2_ssl_proxy.c b/test/core/end2end/fixtures/h2_ssl_proxy.c index 6340d3f4033..bfbc7357429 100644 --- a/test/core/end2end/fixtures/h2_ssl_proxy.c +++ b/test/core/end2end/fixtures/h2_ssl_proxy.c @@ -40,11 +40,11 @@ #include #include -#include "src/core/channel/channel_args.h" -#include "src/core/security/credentials.h" -#include "src/core/support/env.h" -#include "src/core/support/tmpfile.h" -#include "src/core/support/string.h" +#include "src/core/lib/channel/channel_args.h" +#include "src/core/lib/security/credentials.h" +#include "src/core/lib/support/env.h" +#include "src/core/lib/support/string.h" +#include "src/core/lib/support/tmpfile.h" #include "test/core/end2end/data/ssl_test_data.h" #include "test/core/end2end/fixtures/proxy.h" #include "test/core/util/port.h" diff --git a/test/core/end2end/fixtures/h2_uchannel.c b/test/core/end2end/fixtures/h2_uchannel.c deleted file mode 100644 index 87bbd64d09a..00000000000 --- a/test/core/end2end/fixtures/h2_uchannel.c +++ /dev/null @@ -1,358 +0,0 @@ -/* - * - * Copyright 2015-2016, Google Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -#include "test/core/end2end/end2end_tests.h" - -#include - -#include -#include -#include -#include -#include -#include -#include -#include "src/core/channel/channel_args.h" -#include "src/core/channel/client_channel.h" -#include "src/core/channel/client_uchannel.h" -#include "src/core/channel/connected_channel.h" -#include "src/core/channel/http_client_filter.h" -#include "src/core/channel/http_server_filter.h" -#include "src/core/client_config/resolver_registry.h" -#include "src/core/iomgr/tcp_client.h" -#include "src/core/surface/channel.h" -#include "src/core/surface/server.h" -#include "src/core/transport/chttp2_transport.h" -#include "test/core/util/port.h" -#include "test/core/util/test_config.h" - -typedef struct { - grpc_connector base; - gpr_refcount refs; - - grpc_closure *notify; - grpc_connect_in_args args; - grpc_connect_out_args *result; - - grpc_endpoint *tcp; - - grpc_closure connected; -} connector; - -static void connector_ref(grpc_connector *con) { - connector *c = (connector *)con; - gpr_ref(&c->refs); -} - -static void connector_unref(grpc_exec_ctx *exec_ctx, grpc_connector *con) { - connector *c = (connector *)con; - if (gpr_unref(&c->refs)) { - gpr_free(c); - } -} - -static void connected(grpc_exec_ctx *exec_ctx, void *arg, bool success) { - connector *c = arg; - grpc_closure *notify; - grpc_endpoint *tcp = c->tcp; - if (tcp != NULL) { - c->result->transport = - grpc_create_chttp2_transport(exec_ctx, c->args.channel_args, tcp, 1); - grpc_chttp2_transport_start_reading(exec_ctx, c->result->transport, NULL, - 0); - GPR_ASSERT(c->result->transport); - c->result->filters = gpr_malloc(sizeof(grpc_channel_filter *)); - c->result->filters[0] = &grpc_http_client_filter; - c->result->num_filters = 1; - } else { - memset(c->result, 0, sizeof(*c->result)); - } - notify = c->notify; - c->notify = NULL; - notify->cb(exec_ctx, notify->cb_arg, 1); -} - -static void connector_shutdown(grpc_exec_ctx *exec_ctx, grpc_connector *con) {} - -static void connector_connect(grpc_exec_ctx *exec_ctx, grpc_connector *con, - const grpc_connect_in_args *args, - grpc_connect_out_args *result, - grpc_closure *notify) { - connector *c = (connector *)con; - GPR_ASSERT(c->notify == NULL); - GPR_ASSERT(notify->cb); - c->notify = notify; - c->args = *args; - c->result = result; - c->tcp = NULL; - grpc_closure_init(&c->connected, connected, c); - grpc_tcp_client_connect(exec_ctx, &c->connected, &c->tcp, - args->interested_parties, args->addr, args->addr_len, - args->deadline); -} - -static const grpc_connector_vtable connector_vtable = { - connector_ref, connector_unref, connector_shutdown, connector_connect}; - -typedef struct { - grpc_subchannel_factory base; - gpr_refcount refs; - grpc_channel_args *merge_args; - grpc_channel *master; - grpc_subchannel **sniffed_subchannel; -} subchannel_factory; - -static void subchannel_factory_ref(grpc_subchannel_factory *scf) { - subchannel_factory *f = (subchannel_factory *)scf; - gpr_ref(&f->refs); -} - -static void subchannel_factory_unref(grpc_exec_ctx *exec_ctx, - grpc_subchannel_factory *scf) { - subchannel_factory *f = (subchannel_factory *)scf; - if (gpr_unref(&f->refs)) { - GRPC_CHANNEL_INTERNAL_UNREF(exec_ctx, f->master, "subchannel_factory"); - grpc_channel_args_destroy(f->merge_args); - gpr_free(f); - } -} - -static grpc_subchannel *subchannel_factory_create_subchannel( - grpc_exec_ctx *exec_ctx, grpc_subchannel_factory *scf, - grpc_subchannel_args *args) { - subchannel_factory *f = (subchannel_factory *)scf; - connector *c = gpr_malloc(sizeof(*c)); - grpc_channel_args *final_args = - grpc_channel_args_merge(args->args, f->merge_args); - grpc_subchannel *s; - memset(c, 0, sizeof(*c)); - c->base.vtable = &connector_vtable; - gpr_ref_init(&c->refs, 1); - args->args = final_args; - s = grpc_subchannel_create(exec_ctx, &c->base, args); - grpc_connector_unref(exec_ctx, &c->base); - grpc_channel_args_destroy(final_args); - if (*f->sniffed_subchannel) { - GRPC_SUBCHANNEL_UNREF(exec_ctx, *f->sniffed_subchannel, "sniffed"); - } - *f->sniffed_subchannel = s; - GRPC_SUBCHANNEL_REF(s, "sniffed"); - return s; -} - -static const grpc_subchannel_factory_vtable test_subchannel_factory_vtable = { - subchannel_factory_ref, subchannel_factory_unref, - subchannel_factory_create_subchannel}; - -/* The evil twin of grpc_insecure_channel_create. It allows the test to use the - * custom-built sniffing subchannel_factory */ -grpc_channel *channel_create(const char *target, const grpc_channel_args *args, - grpc_subchannel **sniffed_subchannel) { - grpc_channel *channel = NULL; -#define MAX_FILTERS 1 - const grpc_channel_filter *filters[MAX_FILTERS]; - grpc_resolver *resolver; - subchannel_factory *f; - grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - size_t n = 0; - - filters[n++] = &grpc_client_channel_filter; - GPR_ASSERT(n <= MAX_FILTERS); - - channel = - grpc_channel_create_from_filters(&exec_ctx, target, filters, n, args, 1); - - f = gpr_malloc(sizeof(*f)); - f->sniffed_subchannel = sniffed_subchannel; - f->base.vtable = &test_subchannel_factory_vtable; - gpr_ref_init(&f->refs, 1); - f->merge_args = grpc_channel_args_copy(args); - f->master = channel; - GRPC_CHANNEL_INTERNAL_REF(f->master, "test_subchannel_factory"); - resolver = grpc_resolver_create(target, &f->base); - if (!resolver) { - return NULL; - } - - grpc_client_channel_set_resolver( - &exec_ctx, grpc_channel_get_channel_stack(channel), resolver); - GRPC_RESOLVER_UNREF(&exec_ctx, resolver, "test_create"); - grpc_subchannel_factory_unref(&exec_ctx, &f->base); - - grpc_exec_ctx_finish(&exec_ctx); - - return channel; -} - -typedef struct micro_fullstack_fixture_data { - char *localaddr; - grpc_channel *master_channel; - grpc_subchannel *sniffed_subchannel; -} micro_fullstack_fixture_data; - -static grpc_end2end_test_fixture chttp2_create_fixture_micro_fullstack( - grpc_channel_args *client_args, grpc_channel_args *server_args) { - grpc_end2end_test_fixture f; - int port = grpc_pick_unused_port_or_die(); - micro_fullstack_fixture_data *ffd = - gpr_malloc(sizeof(micro_fullstack_fixture_data)); - memset(&f, 0, sizeof(f)); - memset(ffd, 0, sizeof(*ffd)); - - gpr_join_host_port(&ffd->localaddr, "127.0.0.1", port); - - f.fixture_data = ffd; - f.cq = grpc_completion_queue_create(NULL); - - return f; -} - -grpc_connectivity_state g_state = GRPC_CHANNEL_IDLE; -grpc_pollset_set *g_interested_parties; - -static void state_changed(grpc_exec_ctx *exec_ctx, void *arg, bool success) { - if (g_state != GRPC_CHANNEL_READY) { - grpc_subchannel_notify_on_state_change( - exec_ctx, arg, g_interested_parties, &g_state, - grpc_closure_create(state_changed, arg)); - } -} - -static void destroy_pollset(grpc_exec_ctx *exec_ctx, void *arg, bool success) { - grpc_pollset_destroy(arg); -} - -static grpc_connected_subchannel *connect_subchannel(grpc_subchannel *c) { - gpr_mu *mu; - grpc_pollset *pollset = gpr_malloc(grpc_pollset_size()); - grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_pollset_init(pollset, &mu); - g_interested_parties = grpc_pollset_set_create(); - grpc_pollset_set_add_pollset(&exec_ctx, g_interested_parties, pollset); - grpc_subchannel_notify_on_state_change(&exec_ctx, c, g_interested_parties, - &g_state, - grpc_closure_create(state_changed, c)); - grpc_exec_ctx_flush(&exec_ctx); - gpr_mu_lock(mu); - while (g_state != GRPC_CHANNEL_READY) { - grpc_pollset_worker *worker = NULL; - grpc_pollset_work(&exec_ctx, pollset, &worker, gpr_now(GPR_CLOCK_MONOTONIC), - GRPC_TIMEOUT_SECONDS_TO_DEADLINE(1)); - gpr_mu_unlock(mu); - grpc_exec_ctx_flush(&exec_ctx); - gpr_mu_lock(mu); - } - grpc_pollset_shutdown(&exec_ctx, pollset, - grpc_closure_create(destroy_pollset, pollset)); - grpc_pollset_set_destroy(g_interested_parties); - gpr_mu_unlock(mu); - grpc_exec_ctx_finish(&exec_ctx); - gpr_free(pollset); - return grpc_subchannel_get_connected_subchannel(c); -} - -static void chttp2_init_client_micro_fullstack(grpc_end2end_test_fixture *f, - grpc_channel_args *client_args) { - micro_fullstack_fixture_data *ffd = f->fixture_data; - grpc_connectivity_state conn_state; - grpc_connected_subchannel *connected; - char *ipv4_localaddr; - - gpr_asprintf(&ipv4_localaddr, "ipv4:%s", ffd->localaddr); - ffd->master_channel = - channel_create(ipv4_localaddr, client_args, &ffd->sniffed_subchannel); - gpr_free(ipv4_localaddr); - gpr_log(GPR_INFO, "MASTER CHANNEL %p ", ffd->master_channel); - /* the following will block. That's ok for this test */ - conn_state = grpc_channel_check_connectivity_state(ffd->master_channel, - 1 /* try to connect */); - GPR_ASSERT(conn_state == GRPC_CHANNEL_IDLE); - - /* here sniffed_subchannel should be ready to use */ - GPR_ASSERT(conn_state == GRPC_CHANNEL_IDLE); - GPR_ASSERT(ffd->sniffed_subchannel != NULL); - - connected = connect_subchannel(ffd->sniffed_subchannel); - f->client = grpc_client_uchannel_create(ffd->sniffed_subchannel, client_args); - grpc_client_uchannel_set_connected_subchannel(f->client, connected); - gpr_log(GPR_INFO, "CHANNEL WRAPPING SUBCHANNEL: %p(%p)", f->client, - ffd->sniffed_subchannel); - - GPR_ASSERT(f->client); -} - -static void chttp2_init_server_micro_fullstack(grpc_end2end_test_fixture *f, - grpc_channel_args *server_args) { - micro_fullstack_fixture_data *ffd = f->fixture_data; - if (f->server) { - grpc_server_destroy(f->server); - } - f->server = grpc_server_create(server_args, NULL); - grpc_server_register_completion_queue(f->server, f->cq, NULL); - GPR_ASSERT(grpc_server_add_insecure_http2_port(f->server, ffd->localaddr)); - grpc_server_start(f->server); -} - -static void chttp2_tear_down_micro_fullstack(grpc_end2end_test_fixture *f) { - grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - micro_fullstack_fixture_data *ffd = f->fixture_data; - grpc_channel_destroy(ffd->master_channel); - if (ffd->sniffed_subchannel) { - GRPC_SUBCHANNEL_UNREF(&exec_ctx, ffd->sniffed_subchannel, "sniffed"); - } - gpr_free(ffd->localaddr); - gpr_free(ffd); - grpc_exec_ctx_finish(&exec_ctx); -} - -/* All test configurations */ -static grpc_end2end_test_config configs[] = { - {"chttp2/micro_fullstack", 0, chttp2_create_fixture_micro_fullstack, - chttp2_init_client_micro_fullstack, chttp2_init_server_micro_fullstack, - chttp2_tear_down_micro_fullstack}, -}; - -int main(int argc, char **argv) { - size_t i; - - grpc_test_init(argc, argv); - grpc_init(); - - for (i = 0; i < sizeof(configs) / sizeof(*configs); i++) { - grpc_end2end_tests(argc, argv, configs[i]); - } - - grpc_shutdown(); - - return 0; -} diff --git a/test/core/end2end/fixtures/h2_uds+poll.c b/test/core/end2end/fixtures/h2_uds+poll.c index c3a855ff883..39ae34aa056 100644 --- a/test/core/end2end/fixtures/h2_uds+poll.c +++ b/test/core/end2end/fixtures/h2_uds+poll.c @@ -45,14 +45,14 @@ #include #include -#include "src/core/channel/client_channel.h" -#include "src/core/channel/connected_channel.h" -#include "src/core/channel/http_server_filter.h" -#include "src/core/iomgr/pollset_posix.h" -#include "src/core/support/string.h" -#include "src/core/surface/channel.h" -#include "src/core/surface/server.h" -#include "src/core/transport/chttp2_transport.h" +#include "src/core/ext/transport/chttp2/transport/chttp2_transport.h" +#include "src/core/lib/channel/client_channel.h" +#include "src/core/lib/channel/connected_channel.h" +#include "src/core/lib/channel/http_server_filter.h" +#include "src/core/lib/iomgr/pollset_posix.h" +#include "src/core/lib/support/string.h" +#include "src/core/lib/surface/channel.h" +#include "src/core/lib/surface/server.h" #include "test/core/util/port.h" #include "test/core/util/test_config.h" diff --git a/test/core/end2end/fixtures/h2_uds.c b/test/core/end2end/fixtures/h2_uds.c index 30928270e51..cc0d6bf9565 100644 --- a/test/core/end2end/fixtures/h2_uds.c +++ b/test/core/end2end/fixtures/h2_uds.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -37,13 +37,6 @@ #include #include -#include "src/core/channel/client_channel.h" -#include "src/core/channel/connected_channel.h" -#include "src/core/channel/http_server_filter.h" -#include "src/core/support/string.h" -#include "src/core/surface/channel.h" -#include "src/core/surface/server.h" -#include "src/core/transport/chttp2_transport.h" #include #include #include @@ -51,6 +44,13 @@ #include #include #include +#include "src/core/ext/transport/chttp2/transport/chttp2_transport.h" +#include "src/core/lib/channel/client_channel.h" +#include "src/core/lib/channel/connected_channel.h" +#include "src/core/lib/channel/http_server_filter.h" +#include "src/core/lib/support/string.h" +#include "src/core/lib/surface/channel.h" +#include "src/core/lib/surface/server.h" #include "test/core/util/port.h" #include "test/core/util/test_config.h" diff --git a/test/core/end2end/gen_build_yaml.py b/test/core/end2end/gen_build_yaml.py index 4dfafcea243..93b48c331c6 100755 --- a/test/core/end2end/gen_build_yaml.py +++ b/test/core/end2end/gen_build_yaml.py @@ -59,6 +59,7 @@ END2END_FIXTURES = { platforms=['linux']), 'h2_full+poll+pipe': default_unsecure_fixture_options._replace( platforms=['linux']), + 'h2_full+trace': default_unsecure_fixture_options._replace(tracing=True), 'h2_oauth2': default_secure_fixture_options._replace(ci_mac=False), 'h2_proxy': default_unsecure_fixture_options._replace(includes_proxy=True, ci_mac=False), @@ -66,12 +67,11 @@ END2END_FIXTURES = { ci_mac=False), 'h2_sockpair': socketpair_unsecure_fixture_options._replace(ci_mac=False), 'h2_sockpair+trace': socketpair_unsecure_fixture_options._replace( - tracing=True), + ci_mac=False, tracing=True), 'h2_ssl': default_secure_fixture_options, 'h2_ssl+poll': default_secure_fixture_options._replace(platforms=['linux']), 'h2_ssl_proxy': default_secure_fixture_options._replace(includes_proxy=True, ci_mac=False), - 'h2_uchannel': default_unsecure_fixture_options._replace(fullstack=False), 'h2_uds+poll': uds_fixture_options._replace(platforms=['linux']), 'h2_uds': uds_fixture_options, } @@ -150,7 +150,6 @@ def without(l, e): def main(): sec_deps = [ - 'end2end_certs', 'grpc_test_util', 'grpc', 'gpr_test_util', @@ -193,18 +192,6 @@ def main(): 'deps': unsec_deps, 'vs_proj_dir': 'test/end2end/tests', } - ] + [ - { - 'name': 'end2end_certs', - 'build': 'private', - 'language': 'c', - 'src': [ - "test/core/end2end/data/test_root_cert.c", - "test/core/end2end/data/server1_cert.c", - "test/core/end2end/data/server1_key.c" - ], - 'vs_proj_dir': 'test/end2end', - } ], 'targets': [ { diff --git a/test/core/end2end/invalid_call_argument_test.c b/test/core/end2end/invalid_call_argument_test.c index 4029e96a416..642b044ed8e 100644 --- a/test/core/end2end/invalid_call_argument_test.c +++ b/test/core/end2end/invalid_call_argument_test.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -63,7 +63,7 @@ struct test_state { static struct test_state g_state; static void prepare_test(int is_client) { - int port; + int port = grpc_pick_unused_port_or_die(); char *server_hostport; grpc_op *op; g_state.is_client = is_client; @@ -85,7 +85,6 @@ static void prepare_test(int is_client) { } else { g_state.server = grpc_server_create(NULL, NULL); grpc_server_register_completion_queue(g_state.server, g_state.cq, NULL); - port = grpc_pick_unused_port_or_die(); gpr_join_host_port(&server_hostport, "0.0.0.0", port); grpc_server_add_insecure_http2_port(g_state.server, server_hostport); grpc_server_start(g_state.server); @@ -131,20 +130,23 @@ static void cleanup_test() { grpc_server_shutdown_and_notify(g_state.server, g_state.cq, tag(1000)); GPR_ASSERT(grpc_completion_queue_pluck(g_state.cq, tag(1000), GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5), - NULL).type == GRPC_OP_COMPLETE); + NULL) + .type == GRPC_OP_COMPLETE); grpc_server_destroy(g_state.server); grpc_call_details_destroy(&g_state.call_details); grpc_metadata_array_destroy(&g_state.server_initial_metadata_recv); } grpc_completion_queue_shutdown(g_state.cq); while (grpc_completion_queue_next(g_state.cq, - gpr_inf_future(GPR_CLOCK_REALTIME), - NULL).type != GRPC_QUEUE_SHUTDOWN) + gpr_inf_future(GPR_CLOCK_REALTIME), NULL) + .type != GRPC_QUEUE_SHUTDOWN) ; grpc_completion_queue_destroy(g_state.cq); } static void test_non_null_reserved_on_start_batch() { + gpr_log(GPR_INFO, "test_non_null_reserved_on_start_batch"); + prepare_test(1); GPR_ASSERT(GRPC_CALL_ERROR == grpc_call_start_batch(g_state.call, NULL, 0, NULL, tag(1))); @@ -152,6 +154,8 @@ static void test_non_null_reserved_on_start_batch() { } static void test_non_null_reserved_on_op() { + gpr_log(GPR_INFO, "test_non_null_reserved_on_op"); + grpc_op *op; prepare_test(1); @@ -168,6 +172,8 @@ static void test_non_null_reserved_on_op() { } static void test_send_initial_metadata_more_than_once() { + gpr_log(GPR_INFO, "test_send_initial_metadata_more_than_once"); + grpc_op *op; prepare_test(1); @@ -196,6 +202,8 @@ static void test_send_initial_metadata_more_than_once() { } static void test_too_many_metadata() { + gpr_log(GPR_INFO, "test_too_many_metadata"); + grpc_op *op; prepare_test(1); @@ -212,6 +220,8 @@ static void test_too_many_metadata() { } static void test_send_null_message() { + gpr_log(GPR_INFO, "test_send_null_message"); + grpc_op *op; prepare_test(1); @@ -233,6 +243,8 @@ static void test_send_null_message() { } static void test_send_messages_at_the_same_time() { + gpr_log(GPR_INFO, "test_send_messages_at_the_same_time"); + grpc_op *op; gpr_slice request_payload_slice = gpr_slice_from_copied_string("hello world"); grpc_byte_buffer *request_payload = @@ -262,6 +274,8 @@ static void test_send_messages_at_the_same_time() { } static void test_send_server_status_from_client() { + gpr_log(GPR_INFO, "test_send_server_status_from_client"); + grpc_op *op; prepare_test(1); @@ -280,6 +294,8 @@ static void test_send_server_status_from_client() { } static void test_receive_initial_metadata_twice_at_client() { + gpr_log(GPR_INFO, "test_receive_initial_metadata_twice_at_client"); + grpc_op *op; prepare_test(1); op = g_state.ops; @@ -306,6 +322,8 @@ static void test_receive_initial_metadata_twice_at_client() { } static void test_receive_message_with_invalid_flags() { + gpr_log(GPR_INFO, "test_receive_message_with_invalid_flags"); + grpc_op *op; grpc_byte_buffer *payload = NULL; prepare_test(1); @@ -322,6 +340,8 @@ static void test_receive_message_with_invalid_flags() { } static void test_receive_two_messages_at_the_same_time() { + gpr_log(GPR_INFO, "test_receive_two_messages_at_the_same_time"); + grpc_op *op; grpc_byte_buffer *payload = NULL; prepare_test(1); @@ -343,6 +363,8 @@ static void test_receive_two_messages_at_the_same_time() { } static void test_recv_close_on_server_from_client() { + gpr_log(GPR_INFO, "test_recv_close_on_server_from_client"); + grpc_op *op; prepare_test(1); @@ -359,6 +381,8 @@ static void test_recv_close_on_server_from_client() { } static void test_recv_status_on_client_twice() { + gpr_log(GPR_INFO, "test_recv_status_on_client_twice"); + grpc_op *op; prepare_test(1); @@ -395,6 +419,8 @@ static void test_recv_status_on_client_twice() { } static void test_send_close_from_client_on_server() { + gpr_log(GPR_INFO, "test_send_close_from_client_on_server"); + grpc_op *op; prepare_test(0); @@ -410,6 +436,8 @@ static void test_send_close_from_client_on_server() { } static void test_recv_status_on_client_from_server() { + gpr_log(GPR_INFO, "test_recv_status_on_client_from_server"); + grpc_op *op; prepare_test(0); @@ -431,6 +459,8 @@ static void test_recv_status_on_client_from_server() { } static void test_send_status_from_server_with_invalid_flags() { + gpr_log(GPR_INFO, "test_send_status_from_server_with_invalid_flags"); + grpc_op *op; prepare_test(0); @@ -449,6 +479,8 @@ static void test_send_status_from_server_with_invalid_flags() { } static void test_too_many_trailing_metadata() { + gpr_log(GPR_INFO, "test_too_many_trailing_metadata"); + grpc_op *op; prepare_test(0); @@ -468,6 +500,8 @@ static void test_too_many_trailing_metadata() { } static void test_send_server_status_twice() { + gpr_log(GPR_INFO, "test_send_server_status_twice"); + grpc_op *op; prepare_test(0); @@ -493,6 +527,8 @@ static void test_send_server_status_twice() { } static void test_recv_close_on_server_with_invalid_flags() { + gpr_log(GPR_INFO, "test_recv_close_on_server_with_invalid_flags"); + grpc_op *op; prepare_test(0); @@ -509,6 +545,8 @@ static void test_recv_close_on_server_with_invalid_flags() { } static void test_recv_close_on_server_twice() { + gpr_log(GPR_INFO, "test_recv_close_on_server_twice"); + grpc_op *op; prepare_test(0); diff --git a/test/core/end2end/no_server_test.c b/test/core/end2end/no_server_test.c index 5c971eac6ae..c1be55df131 100644 --- a/test/core/end2end/no_server_test.c +++ b/test/core/end2end/no_server_test.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -88,8 +88,9 @@ int main(int argc, char **argv) { GPR_ASSERT(status == GRPC_STATUS_DEADLINE_EXCEEDED); grpc_completion_queue_shutdown(cq); - while (grpc_completion_queue_next(cq, gpr_inf_future(GPR_CLOCK_REALTIME), - NULL).type != GRPC_QUEUE_SHUTDOWN) + while ( + grpc_completion_queue_next(cq, gpr_inf_future(GPR_CLOCK_REALTIME), NULL) + .type != GRPC_QUEUE_SHUTDOWN) ; grpc_completion_queue_destroy(cq); grpc_call_destroy(call); diff --git a/test/core/end2end/tests/bad_hostname.c b/test/core/end2end/tests/bad_hostname.c index 14587389c7c..e8c07ac41c7 100644 --- a/test/core/end2end/tests/bad_hostname.c +++ b/test/core/end2end/tests/bad_hostname.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -36,13 +36,13 @@ #include #include -#include "src/core/support/string.h" #include #include #include #include #include #include +#include "src/core/lib/support/string.h" #include "test/core/end2end/cq_verifier.h" enum { TIMEOUT = 200000 }; @@ -77,9 +77,9 @@ static void drain_cq(grpc_completion_queue *cq) { static void shutdown_server(grpc_end2end_test_fixture *f) { if (!f->server) return; grpc_server_shutdown_and_notify(f->server, f->cq, tag(1000)); - GPR_ASSERT(grpc_completion_queue_pluck(f->cq, tag(1000), - GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5), - NULL).type == GRPC_OP_COMPLETE); + GPR_ASSERT(grpc_completion_queue_pluck( + f->cq, tag(1000), GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5), NULL) + .type == GRPC_OP_COMPLETE); grpc_server_destroy(f->server); f->server = NULL; } @@ -152,7 +152,7 @@ static void simple_request_body(grpc_end2end_test_fixture f) { cq_expect_completion(cqv, tag(1), 1); cq_verify(cqv); - GPR_ASSERT(status == GRPC_STATUS_INVALID_ARGUMENT); + GPR_ASSERT(status == GRPC_STATUS_INTERNAL); gpr_free(details); grpc_metadata_array_destroy(&initial_metadata_recv); diff --git a/test/core/end2end/tests/binary_metadata.c b/test/core/end2end/tests/binary_metadata.c index 4eccd16c4c2..a4f4afac659 100644 --- a/test/core/end2end/tests/binary_metadata.c +++ b/test/core/end2end/tests/binary_metadata.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -75,9 +75,9 @@ static void drain_cq(grpc_completion_queue *cq) { static void shutdown_server(grpc_end2end_test_fixture *f) { if (!f->server) return; grpc_server_shutdown_and_notify(f->server, f->cq, tag(1000)); - GPR_ASSERT(grpc_completion_queue_pluck(f->cq, tag(1000), - GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5), - NULL).type == GRPC_OP_COMPLETE); + GPR_ASSERT(grpc_completion_queue_pluck( + f->cq, tag(1000), GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5), NULL) + .type == GRPC_OP_COMPLETE); grpc_server_destroy(f->server); f->server = NULL; } diff --git a/test/core/end2end/tests/call_creds.c b/test/core/end2end/tests/call_creds.c index c9d4251b68a..f749a609793 100644 --- a/test/core/end2end/tests/call_creds.c +++ b/test/core/end2end/tests/call_creds.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -36,15 +36,15 @@ #include #include -#include #include +#include #include #include #include #include +#include "src/core/lib/security/credentials.h" +#include "src/core/lib/support/string.h" #include "test/core/end2end/cq_verifier.h" -#include "src/core/security/credentials.h" -#include "src/core/support/string.h" static const char iam_token[] = "token"; static const char iam_selector[] = "selector"; @@ -93,9 +93,9 @@ static void drain_cq(grpc_completion_queue *cq) { static void shutdown_server(grpc_end2end_test_fixture *f) { if (!f->server) return; grpc_server_shutdown_and_notify(f->server, f->cq, tag(1000)); - GPR_ASSERT(grpc_completion_queue_pluck(f->cq, tag(1000), - GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5), - NULL).type == GRPC_OP_COMPLETE); + GPR_ASSERT(grpc_completion_queue_pluck( + f->cq, tag(1000), GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5), NULL) + .type == GRPC_OP_COMPLETE); grpc_server_destroy(f->server); f->server = NULL; } diff --git a/test/core/end2end/tests/cancel_after_accept.c b/test/core/end2end/tests/cancel_after_accept.c index 4646bf7bcac..2025f1191f7 100644 --- a/test/core/end2end/tests/cancel_after_accept.c +++ b/test/core/end2end/tests/cancel_after_accept.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -76,9 +76,9 @@ static void drain_cq(grpc_completion_queue *cq) { static void shutdown_server(grpc_end2end_test_fixture *f) { if (!f->server) return; grpc_server_shutdown_and_notify(f->server, f->cq, tag(1000)); - GPR_ASSERT(grpc_completion_queue_pluck(f->cq, tag(1000), - GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5), - NULL).type == GRPC_OP_COMPLETE); + GPR_ASSERT(grpc_completion_queue_pluck( + f->cq, tag(1000), GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5), NULL) + .type == GRPC_OP_COMPLETE); grpc_server_destroy(f->server); f->server = NULL; } diff --git a/test/core/end2end/tests/cancel_after_client_done.c b/test/core/end2end/tests/cancel_after_client_done.c index 364598a76a0..bc958a6ff3c 100644 --- a/test/core/end2end/tests/cancel_after_client_done.c +++ b/test/core/end2end/tests/cancel_after_client_done.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -76,9 +76,9 @@ static void drain_cq(grpc_completion_queue *cq) { static void shutdown_server(grpc_end2end_test_fixture *f) { if (!f->server) return; grpc_server_shutdown_and_notify(f->server, f->cq, tag(1000)); - GPR_ASSERT(grpc_completion_queue_pluck(f->cq, tag(1000), - GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5), - NULL).type == GRPC_OP_COMPLETE); + GPR_ASSERT(grpc_completion_queue_pluck( + f->cq, tag(1000), GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5), NULL) + .type == GRPC_OP_COMPLETE); grpc_server_destroy(f->server); f->server = NULL; } diff --git a/test/core/end2end/tests/cancel_after_invoke.c b/test/core/end2end/tests/cancel_after_invoke.c index ec0b0dea4c2..5bab10e030e 100644 --- a/test/core/end2end/tests/cancel_after_invoke.c +++ b/test/core/end2end/tests/cancel_after_invoke.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -77,9 +77,9 @@ static void drain_cq(grpc_completion_queue *cq) { static void shutdown_server(grpc_end2end_test_fixture *f) { if (!f->server) return; grpc_server_shutdown_and_notify(f->server, f->cq, tag(1000)); - GPR_ASSERT(grpc_completion_queue_pluck(f->cq, tag(1000), - GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5), - NULL).type == GRPC_OP_COMPLETE); + GPR_ASSERT(grpc_completion_queue_pluck( + f->cq, tag(1000), GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5), NULL) + .type == GRPC_OP_COMPLETE); grpc_server_destroy(f->server); f->server = NULL; } diff --git a/test/core/end2end/tests/cancel_before_invoke.c b/test/core/end2end/tests/cancel_before_invoke.c index 7b432fe87e8..8c0becd1c85 100644 --- a/test/core/end2end/tests/cancel_before_invoke.c +++ b/test/core/end2end/tests/cancel_before_invoke.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -75,9 +75,9 @@ static void drain_cq(grpc_completion_queue *cq) { static void shutdown_server(grpc_end2end_test_fixture *f) { if (!f->server) return; grpc_server_shutdown_and_notify(f->server, f->cq, tag(1000)); - GPR_ASSERT(grpc_completion_queue_pluck(f->cq, tag(1000), - GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5), - NULL).type == GRPC_OP_COMPLETE); + GPR_ASSERT(grpc_completion_queue_pluck( + f->cq, tag(1000), GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5), NULL) + .type == GRPC_OP_COMPLETE); grpc_server_destroy(f->server); f->server = NULL; } diff --git a/test/core/end2end/tests/cancel_in_a_vacuum.c b/test/core/end2end/tests/cancel_in_a_vacuum.c index 214ab2b9e87..7bea7d7e659 100644 --- a/test/core/end2end/tests/cancel_in_a_vacuum.c +++ b/test/core/end2end/tests/cancel_in_a_vacuum.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -76,9 +76,9 @@ static void drain_cq(grpc_completion_queue *cq) { static void shutdown_server(grpc_end2end_test_fixture *f) { if (!f->server) return; grpc_server_shutdown_and_notify(f->server, f->cq, tag(1000)); - GPR_ASSERT(grpc_completion_queue_pluck(f->cq, tag(1000), - GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5), - NULL).type == GRPC_OP_COMPLETE); + GPR_ASSERT(grpc_completion_queue_pluck( + f->cq, tag(1000), GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5), NULL) + .type == GRPC_OP_COMPLETE); grpc_server_destroy(f->server); f->server = NULL; } diff --git a/test/core/end2end/tests/cancel_with_status.c b/test/core/end2end/tests/cancel_with_status.c index 1541ca099f8..e5a15560193 100644 --- a/test/core/end2end/tests/cancel_with_status.c +++ b/test/core/end2end/tests/cancel_with_status.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -36,13 +36,13 @@ #include #include -#include "src/core/support/string.h" #include #include #include #include #include #include +#include "src/core/lib/support/string.h" #include "test/core/end2end/cq_verifier.h" enum { TIMEOUT = 200000 }; @@ -77,9 +77,9 @@ static void drain_cq(grpc_completion_queue *cq) { static void shutdown_server(grpc_end2end_test_fixture *f) { if (!f->server) return; grpc_server_shutdown_and_notify(f->server, f->cq, tag(1000)); - GPR_ASSERT(grpc_completion_queue_pluck(f->cq, tag(1000), - GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5), - NULL).type == GRPC_OP_COMPLETE); + GPR_ASSERT(grpc_completion_queue_pluck( + f->cq, tag(1000), GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5), NULL) + .type == GRPC_OP_COMPLETE); grpc_server_destroy(f->server); f->server = NULL; } diff --git a/test/core/end2end/tests/compressed_payload.c b/test/core/end2end/tests/compressed_payload.c index 33b1d8f9feb..9c258858cb4 100644 --- a/test/core/end2end/tests/compressed_payload.c +++ b/test/core/end2end/tests/compressed_payload.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -43,10 +43,10 @@ #include #include +#include "src/core/lib/channel/channel_args.h" +#include "src/core/lib/channel/compress_filter.h" +#include "src/core/lib/surface/call_test_only.h" #include "test/core/end2end/cq_verifier.h" -#include "src/core/channel/channel_args.h" -#include "src/core/channel/compress_filter.h" -#include "src/core/surface/call_test_only.h" enum { TIMEOUT = 200000 }; @@ -80,9 +80,9 @@ static void drain_cq(grpc_completion_queue *cq) { static void shutdown_server(grpc_end2end_test_fixture *f) { if (!f->server) return; grpc_server_shutdown_and_notify(f->server, f->cq, tag(1000)); - GPR_ASSERT(grpc_completion_queue_pluck(f->cq, tag(1000), - GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5), - NULL).type == GRPC_OP_COMPLETE); + GPR_ASSERT(grpc_completion_queue_pluck( + f->cq, tag(1000), GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5), NULL) + .type == GRPC_OP_COMPLETE); grpc_server_destroy(f->server); f->server = NULL; } diff --git a/test/core/end2end/tests/default_host.c b/test/core/end2end/tests/default_host.c index dc3303436b3..576d81e3953 100644 --- a/test/core/end2end/tests/default_host.c +++ b/test/core/end2end/tests/default_host.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -36,13 +36,13 @@ #include #include -#include "src/core/support/string.h" #include #include #include #include #include #include +#include "src/core/lib/support/string.h" #include "test/core/end2end/cq_verifier.h" enum { TIMEOUT = 200000 }; @@ -77,9 +77,9 @@ static void drain_cq(grpc_completion_queue *cq) { static void shutdown_server(grpc_end2end_test_fixture *f) { if (!f->server) return; grpc_server_shutdown_and_notify(f->server, f->cq, tag(1000)); - GPR_ASSERT(grpc_completion_queue_pluck(f->cq, tag(1000), - GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5), - NULL).type == GRPC_OP_COMPLETE); + GPR_ASSERT(grpc_completion_queue_pluck( + f->cq, tag(1000), GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5), NULL) + .type == GRPC_OP_COMPLETE); grpc_server_destroy(f->server); f->server = NULL; } diff --git a/test/core/end2end/tests/empty_batch.c b/test/core/end2end/tests/empty_batch.c index 24320c0f32c..7f56313fa0d 100644 --- a/test/core/end2end/tests/empty_batch.c +++ b/test/core/end2end/tests/empty_batch.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -36,13 +36,13 @@ #include #include -#include "src/core/support/string.h" #include #include #include #include #include #include +#include "src/core/lib/support/string.h" #include "test/core/end2end/cq_verifier.h" enum { TIMEOUT = 200000 }; @@ -77,9 +77,9 @@ static void drain_cq(grpc_completion_queue *cq) { static void shutdown_server(grpc_end2end_test_fixture *f) { if (!f->server) return; grpc_server_shutdown_and_notify(f->server, f->cq, tag(1000)); - GPR_ASSERT(grpc_completion_queue_pluck(f->cq, tag(1000), - GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5), - NULL).type == GRPC_OP_COMPLETE); + GPR_ASSERT(grpc_completion_queue_pluck( + f->cq, tag(1000), GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5), NULL) + .type == GRPC_OP_COMPLETE); grpc_server_destroy(f->server); f->server = NULL; } diff --git a/test/core/end2end/tests/high_initial_seqno.c b/test/core/end2end/tests/high_initial_seqno.c index 8d16ef5f5ee..2196fbd343b 100644 --- a/test/core/end2end/tests/high_initial_seqno.c +++ b/test/core/end2end/tests/high_initial_seqno.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -44,7 +44,7 @@ #include #include -#include "src/core/support/string.h" +#include "src/core/lib/support/string.h" #include "test/core/end2end/cq_verifier.h" enum { TIMEOUT = 200000 }; @@ -79,9 +79,9 @@ static void drain_cq(grpc_completion_queue *cq) { static void shutdown_server(grpc_end2end_test_fixture *f) { if (!f->server) return; grpc_server_shutdown_and_notify(f->server, f->cq, tag(1000)); - GPR_ASSERT(grpc_completion_queue_pluck(f->cq, tag(1000), - GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5), - NULL).type == GRPC_OP_COMPLETE); + GPR_ASSERT(grpc_completion_queue_pluck( + f->cq, tag(1000), GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5), NULL) + .type == GRPC_OP_COMPLETE); grpc_server_destroy(f->server); f->server = NULL; } diff --git a/test/core/end2end/tests/hpack_size.c b/test/core/end2end/tests/hpack_size.c index fd4fe3419f0..2774e506277 100644 --- a/test/core/end2end/tests/hpack_size.c +++ b/test/core/end2end/tests/hpack_size.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -44,7 +44,7 @@ #include #include -#include "src/core/support/string.h" +#include "src/core/lib/support/string.h" #include "test/core/end2end/cq_verifier.h" static void *tag(intptr_t t) { return (void *)t; } @@ -262,9 +262,9 @@ static void drain_cq(grpc_completion_queue *cq) { static void shutdown_server(grpc_end2end_test_fixture *f) { if (!f->server) return; grpc_server_shutdown_and_notify(f->server, f->cq, tag(1000)); - GPR_ASSERT(grpc_completion_queue_pluck(f->cq, tag(1000), - GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5), - NULL).type == GRPC_OP_COMPLETE); + GPR_ASSERT(grpc_completion_queue_pluck( + f->cq, tag(1000), GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5), NULL) + .type == GRPC_OP_COMPLETE); grpc_server_destroy(f->server); f->server = NULL; } diff --git a/test/core/end2end/tests/invoke_large_request.c b/test/core/end2end/tests/invoke_large_request.c index f0b019821d1..7f03ebbc6fc 100644 --- a/test/core/end2end/tests/invoke_large_request.c +++ b/test/core/end2end/tests/invoke_large_request.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -73,9 +73,9 @@ static void drain_cq(grpc_completion_queue *cq) { static void shutdown_server(grpc_end2end_test_fixture *f) { if (!f->server) return; grpc_server_shutdown_and_notify(f->server, f->cq, tag(1000)); - GPR_ASSERT(grpc_completion_queue_pluck(f->cq, tag(1000), - GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5), - NULL).type == GRPC_OP_COMPLETE); + GPR_ASSERT(grpc_completion_queue_pluck( + f->cq, tag(1000), GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5), NULL) + .type == GRPC_OP_COMPLETE); grpc_server_destroy(f->server); f->server = NULL; } diff --git a/test/core/end2end/tests/large_metadata.c b/test/core/end2end/tests/large_metadata.c index 1b41e89b26b..4b779744704 100644 --- a/test/core/end2end/tests/large_metadata.c +++ b/test/core/end2end/tests/large_metadata.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -75,9 +75,9 @@ static void drain_cq(grpc_completion_queue *cq) { static void shutdown_server(grpc_end2end_test_fixture *f) { if (!f->server) return; grpc_server_shutdown_and_notify(f->server, f->cq, tag(1000)); - GPR_ASSERT(grpc_completion_queue_pluck(f->cq, tag(1000), - GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5), - NULL).type == GRPC_OP_COMPLETE); + GPR_ASSERT(grpc_completion_queue_pluck( + f->cq, tag(1000), GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5), NULL) + .type == GRPC_OP_COMPLETE); grpc_server_destroy(f->server); f->server = NULL; } diff --git a/test/core/end2end/tests/max_concurrent_streams.c b/test/core/end2end/tests/max_concurrent_streams.c index d6b2a06f9b8..05472bf19e5 100644 --- a/test/core/end2end/tests/max_concurrent_streams.c +++ b/test/core/end2end/tests/max_concurrent_streams.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -75,9 +75,9 @@ static void drain_cq(grpc_completion_queue *cq) { static void shutdown_server(grpc_end2end_test_fixture *f) { if (!f->server) return; grpc_server_shutdown_and_notify(f->server, f->cq, tag(1000)); - GPR_ASSERT(grpc_completion_queue_pluck(f->cq, tag(1000), - GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5), - NULL).type == GRPC_OP_COMPLETE); + GPR_ASSERT(grpc_completion_queue_pluck( + f->cq, tag(1000), GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5), NULL) + .type == GRPC_OP_COMPLETE); grpc_server_destroy(f->server); f->server = NULL; } diff --git a/test/core/end2end/tests/max_message_length.c b/test/core/end2end/tests/max_message_length.c index 59ab7f476c9..2202306325c 100644 --- a/test/core/end2end/tests/max_message_length.c +++ b/test/core/end2end/tests/max_message_length.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -75,9 +75,9 @@ static void drain_cq(grpc_completion_queue *cq) { static void shutdown_server(grpc_end2end_test_fixture *f) { if (!f->server) return; grpc_server_shutdown_and_notify(f->server, f->cq, tag(1000)); - GPR_ASSERT(grpc_completion_queue_pluck(f->cq, tag(1000), - GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5), - NULL).type == GRPC_OP_COMPLETE); + GPR_ASSERT(grpc_completion_queue_pluck( + f->cq, tag(1000), GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5), NULL) + .type == GRPC_OP_COMPLETE); grpc_server_destroy(f->server); f->server = NULL; } diff --git a/test/core/end2end/tests/negative_deadline.c b/test/core/end2end/tests/negative_deadline.c index 2109310634a..e5031af59aa 100644 --- a/test/core/end2end/tests/negative_deadline.c +++ b/test/core/end2end/tests/negative_deadline.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -36,13 +36,13 @@ #include #include -#include "src/core/support/string.h" #include #include #include #include #include #include +#include "src/core/lib/support/string.h" #include "test/core/end2end/cq_verifier.h" enum { TIMEOUT = 200000 }; @@ -77,9 +77,9 @@ static void drain_cq(grpc_completion_queue *cq) { static void shutdown_server(grpc_end2end_test_fixture *f) { if (!f->server) return; grpc_server_shutdown_and_notify(f->server, f->cq, tag(1000)); - GPR_ASSERT(grpc_completion_queue_pluck(f->cq, tag(1000), - GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5), - NULL).type == GRPC_OP_COMPLETE); + GPR_ASSERT(grpc_completion_queue_pluck( + f->cq, tag(1000), GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5), NULL) + .type == GRPC_OP_COMPLETE); grpc_server_destroy(f->server); f->server = NULL; } diff --git a/test/core/end2end/tests/no_op.c b/test/core/end2end/tests/no_op.c index 4bc1d631d1e..efcd496071d 100644 --- a/test/core/end2end/tests/no_op.c +++ b/test/core/end2end/tests/no_op.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -75,9 +75,9 @@ static void drain_cq(grpc_completion_queue *cq) { static void shutdown_server(grpc_end2end_test_fixture *f) { if (!f->server) return; grpc_server_shutdown_and_notify(f->server, f->cq, tag(1000)); - GPR_ASSERT(grpc_completion_queue_pluck(f->cq, tag(1000), - GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5), - NULL).type == GRPC_OP_COMPLETE); + GPR_ASSERT(grpc_completion_queue_pluck( + f->cq, tag(1000), GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5), NULL) + .type == GRPC_OP_COMPLETE); grpc_server_destroy(f->server); f->server = NULL; } diff --git a/test/core/end2end/tests/payload.c b/test/core/end2end/tests/payload.c index bc220cbdc9f..74af28ddc3c 100644 --- a/test/core/end2end/tests/payload.c +++ b/test/core/end2end/tests/payload.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -75,9 +75,9 @@ static void drain_cq(grpc_completion_queue *cq) { static void shutdown_server(grpc_end2end_test_fixture *f) { if (!f->server) return; grpc_server_shutdown_and_notify(f->server, f->cq, tag(1000)); - GPR_ASSERT(grpc_completion_queue_pluck(f->cq, tag(1000), - GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5), - NULL).type == GRPC_OP_COMPLETE); + GPR_ASSERT(grpc_completion_queue_pluck( + f->cq, tag(1000), GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5), NULL) + .type == GRPC_OP_COMPLETE); grpc_server_destroy(f->server); f->server = NULL; } diff --git a/test/core/end2end/tests/ping_pong_streaming.c b/test/core/end2end/tests/ping_pong_streaming.c index 8351f508c5c..7af01497c58 100644 --- a/test/core/end2end/tests/ping_pong_streaming.c +++ b/test/core/end2end/tests/ping_pong_streaming.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -75,9 +75,9 @@ static void drain_cq(grpc_completion_queue *cq) { static void shutdown_server(grpc_end2end_test_fixture *f) { if (!f->server) return; grpc_server_shutdown_and_notify(f->server, f->cq, tag(1000)); - GPR_ASSERT(grpc_completion_queue_pluck(f->cq, tag(1000), - GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5), - NULL).type == GRPC_OP_COMPLETE); + GPR_ASSERT(grpc_completion_queue_pluck( + f->cq, tag(1000), GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5), NULL) + .type == GRPC_OP_COMPLETE); grpc_server_destroy(f->server); f->server = NULL; } diff --git a/test/core/end2end/tests/registered_call.c b/test/core/end2end/tests/registered_call.c index d9d2b19d12d..09f452f6e5c 100644 --- a/test/core/end2end/tests/registered_call.c +++ b/test/core/end2end/tests/registered_call.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -36,13 +36,13 @@ #include #include -#include "src/core/support/string.h" #include #include #include #include #include #include +#include "src/core/lib/support/string.h" #include "test/core/end2end/cq_verifier.h" enum { TIMEOUT = 200000 }; @@ -77,9 +77,9 @@ static void drain_cq(grpc_completion_queue *cq) { static void shutdown_server(grpc_end2end_test_fixture *f) { if (!f->server) return; grpc_server_shutdown_and_notify(f->server, f->cq, tag(1000)); - GPR_ASSERT(grpc_completion_queue_pluck(f->cq, tag(1000), - GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5), - NULL).type == GRPC_OP_COMPLETE); + GPR_ASSERT(grpc_completion_queue_pluck( + f->cq, tag(1000), GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5), NULL) + .type == GRPC_OP_COMPLETE); grpc_server_destroy(f->server); f->server = NULL; } diff --git a/test/core/end2end/tests/request_with_flags.c b/test/core/end2end/tests/request_with_flags.c index 340aba6cdbb..433622e2dad 100644 --- a/test/core/end2end/tests/request_with_flags.c +++ b/test/core/end2end/tests/request_with_flags.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -41,7 +41,7 @@ #include #include #include -#include "src/core/transport/byte_stream.h" +#include "src/core/lib/transport/byte_stream.h" #include "test/core/end2end/cq_verifier.h" enum { TIMEOUT = 200000 }; @@ -76,9 +76,9 @@ static void drain_cq(grpc_completion_queue *cq) { static void shutdown_server(grpc_end2end_test_fixture *f) { if (!f->server) return; grpc_server_shutdown_and_notify(f->server, f->cq, tag(1000)); - GPR_ASSERT(grpc_completion_queue_pluck(f->cq, tag(1000), - GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5), - NULL).type == GRPC_OP_COMPLETE); + GPR_ASSERT(grpc_completion_queue_pluck( + f->cq, tag(1000), GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5), NULL) + .type == GRPC_OP_COMPLETE); grpc_server_destroy(f->server); f->server = NULL; } diff --git a/test/core/end2end/tests/request_with_payload.c b/test/core/end2end/tests/request_with_payload.c index 1aced6a8755..07f9993d241 100644 --- a/test/core/end2end/tests/request_with_payload.c +++ b/test/core/end2end/tests/request_with_payload.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -75,9 +75,9 @@ static void drain_cq(grpc_completion_queue *cq) { static void shutdown_server(grpc_end2end_test_fixture *f) { if (!f->server) return; grpc_server_shutdown_and_notify(f->server, f->cq, tag(1000)); - GPR_ASSERT(grpc_completion_queue_pluck(f->cq, tag(1000), - GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5), - NULL).type == GRPC_OP_COMPLETE); + GPR_ASSERT(grpc_completion_queue_pluck( + f->cq, tag(1000), GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5), NULL) + .type == GRPC_OP_COMPLETE); grpc_server_destroy(f->server); f->server = NULL; } diff --git a/test/core/end2end/tests/server_finishes_request.c b/test/core/end2end/tests/server_finishes_request.c index 6bca8d476c7..d3ac2d5d613 100644 --- a/test/core/end2end/tests/server_finishes_request.c +++ b/test/core/end2end/tests/server_finishes_request.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -36,13 +36,13 @@ #include #include -#include "src/core/support/string.h" #include #include #include #include #include #include +#include "src/core/lib/support/string.h" #include "test/core/end2end/cq_verifier.h" enum { TIMEOUT = 200000 }; @@ -77,9 +77,9 @@ static void drain_cq(grpc_completion_queue *cq) { static void shutdown_server(grpc_end2end_test_fixture *f) { if (!f->server) return; grpc_server_shutdown_and_notify(f->server, f->cq, tag(1000)); - GPR_ASSERT(grpc_completion_queue_pluck(f->cq, tag(1000), - GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5), - NULL).type == GRPC_OP_COMPLETE); + GPR_ASSERT(grpc_completion_queue_pluck( + f->cq, tag(1000), GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5), NULL) + .type == GRPC_OP_COMPLETE); grpc_server_destroy(f->server); f->server = NULL; } diff --git a/test/core/end2end/tests/simple_delayed_request.c b/test/core/end2end/tests/simple_delayed_request.c index 0afef7503b7..e9f5a38c763 100644 --- a/test/core/end2end/tests/simple_delayed_request.c +++ b/test/core/end2end/tests/simple_delayed_request.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -63,9 +63,9 @@ static void drain_cq(grpc_completion_queue *cq) { static void shutdown_server(grpc_end2end_test_fixture *f) { if (!f->server) return; grpc_server_shutdown_and_notify(f->server, f->cq, tag(1000)); - GPR_ASSERT(grpc_completion_queue_pluck(f->cq, tag(1000), - GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5), - NULL).type == GRPC_OP_COMPLETE); + GPR_ASSERT(grpc_completion_queue_pluck( + f->cq, tag(1000), GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5), NULL) + .type == GRPC_OP_COMPLETE); grpc_server_destroy(f->server); f->server = NULL; } diff --git a/test/core/end2end/tests/simple_metadata.c b/test/core/end2end/tests/simple_metadata.c index c5084a560ff..0e214e3770b 100644 --- a/test/core/end2end/tests/simple_metadata.c +++ b/test/core/end2end/tests/simple_metadata.c @@ -75,9 +75,9 @@ static void drain_cq(grpc_completion_queue *cq) { static void shutdown_server(grpc_end2end_test_fixture *f) { if (!f->server) return; grpc_server_shutdown_and_notify(f->server, f->cq, tag(1000)); - GPR_ASSERT(grpc_completion_queue_pluck(f->cq, tag(1000), - GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5), - NULL).type == GRPC_OP_COMPLETE); + GPR_ASSERT(grpc_completion_queue_pluck( + f->cq, tag(1000), GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5), NULL) + .type == GRPC_OP_COMPLETE); grpc_server_destroy(f->server); f->server = NULL; } diff --git a/test/core/end2end/tests/simple_request.c b/test/core/end2end/tests/simple_request.c index 3720cd1631b..bc634ef83a2 100644 --- a/test/core/end2end/tests/simple_request.c +++ b/test/core/end2end/tests/simple_request.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -36,13 +36,13 @@ #include #include -#include "src/core/support/string.h" #include #include #include #include #include #include +#include "src/core/lib/support/string.h" #include "test/core/end2end/cq_verifier.h" enum { TIMEOUT = 200000 }; @@ -77,9 +77,9 @@ static void drain_cq(grpc_completion_queue *cq) { static void shutdown_server(grpc_end2end_test_fixture *f) { if (!f->server) return; grpc_server_shutdown_and_notify(f->server, f->cq, tag(1000)); - GPR_ASSERT(grpc_completion_queue_pluck(f->cq, tag(1000), - GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5), - NULL).type == GRPC_OP_COMPLETE); + GPR_ASSERT(grpc_completion_queue_pluck( + f->cq, tag(1000), GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5), NULL) + .type == GRPC_OP_COMPLETE); grpc_server_destroy(f->server); f->server = NULL; } diff --git a/test/core/end2end/tests/trailing_metadata.c b/test/core/end2end/tests/trailing_metadata.c index 78525e9538e..03f4f3e79ba 100644 --- a/test/core/end2end/tests/trailing_metadata.c +++ b/test/core/end2end/tests/trailing_metadata.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -75,9 +75,9 @@ static void drain_cq(grpc_completion_queue *cq) { static void shutdown_server(grpc_end2end_test_fixture *f) { if (!f->server) return; grpc_server_shutdown_and_notify(f->server, f->cq, tag(1000)); - GPR_ASSERT(grpc_completion_queue_pluck(f->cq, tag(1000), - GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5), - NULL).type == GRPC_OP_COMPLETE); + GPR_ASSERT(grpc_completion_queue_pluck( + f->cq, tag(1000), GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5), NULL) + .type == GRPC_OP_COMPLETE); grpc_server_destroy(f->server); f->server = NULL; } diff --git a/test/core/fling/client.c b/test/core/fling/client.c index b36aef30935..6a4eb1c6e31 100644 --- a/test/core/fling/client.c +++ b/test/core/fling/client.c @@ -41,7 +41,7 @@ #include #include #include -#include "src/core/profiling/timers.h" +#include "src/core/lib/profiling/timers.h" #include "test/core/util/grpc_profiler.h" #include "test/core/util/test_config.h" diff --git a/test/core/fling/fling_stream_test.c b/test/core/fling/fling_stream_test.c index 78a73372aa8..2807504976d 100644 --- a/test/core/fling/fling_stream_test.c +++ b/test/core/fling/fling_stream_test.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -35,19 +35,19 @@ #define _POSIX_SOURCE #endif -#include #include -#include -#include #include +#include #include +#include #include #include +#include -#include "src/core/support/string.h" #include #include #include +#include "src/core/lib/support/string.h" #include "test/core/util/port.h" int main(int argc, char **argv) { diff --git a/test/core/fling/fling_test.c b/test/core/fling/fling_test.c index cf43ecfd2de..46456a2901b 100644 --- a/test/core/fling/fling_test.c +++ b/test/core/fling/fling_test.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,14 +31,14 @@ * */ -#include #include +#include #include #include #include #include -#include "src/core/support/string.h" +#include "src/core/lib/support/string.h" #include "test/core/util/port.h" int main(int argc, char **argv) { diff --git a/test/core/fling/server.c b/test/core/fling/server.c index 42be20e42d1..4fef21f51d8 100644 --- a/test/core/fling/server.c +++ b/test/core/fling/server.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -49,7 +49,7 @@ #include #include #include -#include "src/core/profiling/timers.h" +#include "src/core/lib/profiling/timers.h" #include "test/core/end2end/data/ssl_test_data.h" #include "test/core/util/grpc_profiler.h" #include "test/core/util/port.h" diff --git a/test/core/httpcli/format_request_test.c b/test/core/http/format_request_test.c similarity index 88% rename from test/core/httpcli/format_request_test.c rename to test/core/http/format_request_test.c index da850049e20..a676420b706 100644 --- a/test/core/httpcli/format_request_test.c +++ b/test/core/http/format_request_test.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,7 +31,7 @@ * */ -#include "src/core/httpcli/format_request.h" +#include "src/core/lib/http/format_request.h" #include @@ -39,15 +39,15 @@ #include "test/core/util/test_config.h" static void test_format_get_request(void) { - grpc_httpcli_header hdr = {"x-yz", "abc"}; + grpc_http_header hdr = {"x-yz", "abc"}; grpc_httpcli_request req; gpr_slice slice; memset(&req, 0, sizeof(req)); req.host = "example.com"; - req.path = "/index.html"; - req.hdr_count = 1; - req.hdrs = &hdr; + req.http.path = "/index.html"; + req.http.hdr_count = 1; + req.http.hdrs = &hdr; slice = grpc_httpcli_format_get_request(&req); @@ -64,7 +64,7 @@ static void test_format_get_request(void) { } static void test_format_post_request(void) { - grpc_httpcli_header hdr = {"x-yz", "abc"}; + grpc_http_header hdr = {"x-yz", "abc"}; grpc_httpcli_request req; gpr_slice slice; char body_bytes[] = "fake body"; @@ -72,9 +72,9 @@ static void test_format_post_request(void) { memset(&req, 0, sizeof(req)); req.host = "example.com"; - req.path = "/index.html"; - req.hdr_count = 1; - req.hdrs = &hdr; + req.http.path = "/index.html"; + req.http.hdr_count = 1; + req.http.hdrs = &hdr; slice = grpc_httpcli_format_post_request(&req, body_bytes, body_len); @@ -94,15 +94,15 @@ static void test_format_post_request(void) { } static void test_format_post_request_no_body(void) { - grpc_httpcli_header hdr = {"x-yz", "abc"}; + grpc_http_header hdr = {"x-yz", "abc"}; grpc_httpcli_request req; gpr_slice slice; memset(&req, 0, sizeof(req)); req.host = "example.com"; - req.path = "/index.html"; - req.hdr_count = 1; - req.hdrs = &hdr; + req.http.path = "/index.html"; + req.http.hdr_count = 1; + req.http.hdrs = &hdr; slice = grpc_httpcli_format_post_request(&req, NULL, 0); @@ -119,7 +119,7 @@ static void test_format_post_request_no_body(void) { } static void test_format_post_request_content_type_override(void) { - grpc_httpcli_header hdrs[2]; + grpc_http_header hdrs[2]; grpc_httpcli_request req; gpr_slice slice; char body_bytes[] = "fake%20body"; @@ -131,9 +131,9 @@ static void test_format_post_request_content_type_override(void) { hdrs[1].value = "application/x-www-form-urlencoded"; memset(&req, 0, sizeof(req)); req.host = "example.com"; - req.path = "/index.html"; - req.hdr_count = 2; - req.hdrs = hdrs; + req.http.path = "/index.html"; + req.http.hdr_count = 2; + req.http.hdrs = hdrs; slice = grpc_httpcli_format_post_request(&req, body_bytes, body_len); @@ -142,8 +142,7 @@ static void test_format_post_request_content_type_override(void) { "POST /index.html HTTP/1.0\r\n" "Host: example.com\r\n" "Connection: close\r\n" - "User-Agent: " GRPC_HTTPCLI_USER_AGENT - "\r\n" + "User-Agent: " GRPC_HTTPCLI_USER_AGENT "\r\n" "x-yz: abc\r\n" "Content-Type: application/x-www-form-urlencoded\r\n" "Content-Length: 11\r\n" diff --git a/test/core/httpcli/httpcli_test.c b/test/core/http/httpcli_test.c similarity index 87% rename from test/core/httpcli/httpcli_test.c rename to test/core/http/httpcli_test.c index da1463329d4..1fdbcd08001 100644 --- a/test/core/httpcli/httpcli_test.c +++ b/test/core/http/httpcli_test.c @@ -31,7 +31,7 @@ * */ -#include "src/core/httpcli/httpcli.h" +#include "src/core/lib/http/httpcli.h" #include @@ -41,7 +41,7 @@ #include #include #include -#include "src/core/iomgr/iomgr.h" +#include "src/core/lib/iomgr/iomgr.h" #include "test/core/util/port.h" #include "test/core/util/test_config.h" @@ -83,7 +83,7 @@ static void test_get(int port) { memset(&req, 0, sizeof(req)); req.host = host; - req.path = "/get"; + req.http.path = "/get"; req.handshaker = &grpc_httpcli_plaintext; grpc_httpcli_get(&exec_ctx, &g_context, g_pollset, &req, n_seconds_time(15), @@ -114,7 +114,7 @@ static void test_post(int port) { memset(&req, 0, sizeof(req)); req.host = host; - req.path = "/post"; + req.http.path = "/post"; req.handshaker = &grpc_httpcli_plaintext; grpc_httpcli_post(&exec_ctx, &g_context, g_pollset, &req, "hello", 5, @@ -144,31 +144,35 @@ int main(int argc, char **argv) { char *lslash = strrchr(me, '/'); char *args[4]; int port = grpc_pick_unused_port_or_die(); + int arg_shift = 0; + /* figure out where we are */ + char *root; + if (lslash) { + root = gpr_malloc((size_t)(lslash - me + 1)); + memcpy(root, me, (size_t)(lslash - me)); + root[lslash - me] = 0; + } else { + root = gpr_strdup("."); + } GPR_ASSERT(argc <= 2); if (argc == 2) { args[0] = gpr_strdup(argv[1]); } else { - /* figure out where we are */ - char *root; - if (lslash) { - root = gpr_malloc((size_t)(lslash - me + 1)); - memcpy(root, me, (size_t)(lslash - me)); - root[lslash - me] = 0; - } else { - root = gpr_strdup("."); - } - gpr_asprintf(&args[0], "%s/../../test/core/httpcli/test_server.py", root); - gpr_free(root); + arg_shift = 1; + gpr_asprintf(&args[0], "%s/../../tools/distrib/python_wrapper.sh", root); + gpr_asprintf(&args[1], "%s/../../test/core/http/test_server.py", root); } /* start the server */ - args[1] = "--port"; - gpr_asprintf(&args[2], "%d", port); - server = gpr_subprocess_create(3, (const char **)args); + args[1 + arg_shift] = "--port"; + gpr_asprintf(&args[2 + arg_shift], "%d", port); + server = gpr_subprocess_create(3 + arg_shift, (const char **)args); GPR_ASSERT(server); gpr_free(args[0]); - gpr_free(args[2]); + if (arg_shift) gpr_free(args[1]); + gpr_free(args[2 + arg_shift]); + gpr_free(root); gpr_sleep_until(gpr_time_add(gpr_now(GPR_CLOCK_REALTIME), gpr_time_from_seconds(5, GPR_TIMESPAN))); diff --git a/test/core/httpcli/httpscli_test.c b/test/core/http/httpscli_test.c similarity index 87% rename from test/core/httpcli/httpscli_test.c rename to test/core/http/httpscli_test.c index 7f765bc614f..71db3e72bfe 100644 --- a/test/core/httpcli/httpscli_test.c +++ b/test/core/http/httpscli_test.c @@ -31,7 +31,7 @@ * */ -#include "src/core/httpcli/httpcli.h" +#include "src/core/lib/http/httpcli.h" #include @@ -41,7 +41,7 @@ #include #include #include -#include "src/core/iomgr/iomgr.h" +#include "src/core/lib/iomgr/iomgr.h" #include "test/core/util/port.h" #include "test/core/util/test_config.h" @@ -84,7 +84,7 @@ static void test_get(int port) { memset(&req, 0, sizeof(req)); req.host = host; req.ssl_host_override = "foo.test.google.fr"; - req.path = "/get"; + req.http.path = "/get"; req.handshaker = &grpc_httpcli_ssl; grpc_httpcli_get(&exec_ctx, &g_context, g_pollset, &req, n_seconds_time(15), @@ -116,7 +116,7 @@ static void test_post(int port) { memset(&req, 0, sizeof(req)); req.host = host; req.ssl_host_override = "foo.test.google.fr"; - req.path = "/post"; + req.http.path = "/post"; req.handshaker = &grpc_httpcli_ssl; grpc_httpcli_post(&exec_ctx, &g_context, g_pollset, &req, "hello", 5, @@ -146,32 +146,36 @@ int main(int argc, char **argv) { char *lslash = strrchr(me, '/'); char *args[5]; int port = grpc_pick_unused_port_or_die(); + int arg_shift = 0; + /* figure out where we are */ + char *root; + if (lslash) { + root = gpr_malloc((size_t)(lslash - me + 1)); + memcpy(root, me, (size_t)(lslash - me)); + root[lslash - me] = 0; + } else { + root = gpr_strdup("."); + } GPR_ASSERT(argc <= 2); if (argc == 2) { args[0] = gpr_strdup(argv[1]); } else { - /* figure out where we are */ - char *root; - if (lslash) { - root = gpr_malloc((size_t)(lslash - me + 1)); - memcpy(root, me, (size_t)(lslash - me)); - root[lslash - me] = 0; - } else { - root = gpr_strdup("."); - } - gpr_asprintf(&args[0], "%s/../../test/core/httpcli/test_server.py", root); - gpr_free(root); + arg_shift = 1; + gpr_asprintf(&args[0], "%s/../../tools/distrib/python_wrapper.sh", root); + gpr_asprintf(&args[1], "%s/../../test/core/http/test_server.py", root); } /* start the server */ - args[1] = "--port"; - gpr_asprintf(&args[2], "%d", port); - args[3] = "--ssl"; - server = gpr_subprocess_create(4, (const char **)args); + args[1 + arg_shift] = "--port"; + gpr_asprintf(&args[2 + arg_shift], "%d", port); + args[3 + arg_shift] = "--ssl"; + server = gpr_subprocess_create(4 + arg_shift, (const char **)args); GPR_ASSERT(server); gpr_free(args[0]); - gpr_free(args[2]); + if (arg_shift) gpr_free(args[1]); + gpr_free(args[2 + arg_shift]); + gpr_free(root); gpr_sleep_until(gpr_time_add(gpr_now(GPR_CLOCK_REALTIME), gpr_time_from_seconds(5, GPR_TIMESPAN))); diff --git a/test/core/httpcli/parser_test.c b/test/core/http/parser_test.c similarity index 50% rename from test/core/httpcli/parser_test.c rename to test/core/http/parser_test.c index a26ddd28214..eeb4de7f30b 100644 --- a/test/core/httpcli/parser_test.c +++ b/test/core/http/parser_test.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,7 +31,7 @@ * */ -#include "src/core/httpcli/parser.h" +#include "src/core/lib/http/parser.h" #include #include @@ -43,9 +43,65 @@ #include "test/core/util/slice_splitter.h" #include "test/core/util/test_config.h" +static void test_request_succeeds(grpc_slice_split_mode split_mode, + char *request, char *expect_method, + grpc_http_version expect_version, + char *expect_path, char *expect_body, ...) { + grpc_http_parser parser; + gpr_slice input_slice = gpr_slice_from_copied_string(request); + size_t num_slices; + size_t i; + gpr_slice *slices; + va_list args; + + grpc_split_slices(split_mode, &input_slice, 1, &slices, &num_slices); + gpr_slice_unref(input_slice); + + grpc_http_parser_init(&parser); + + for (i = 0; i < num_slices; i++) { + GPR_ASSERT(grpc_http_parser_parse(&parser, slices[i])); + gpr_slice_unref(slices[i]); + } + GPR_ASSERT(grpc_http_parser_eof(&parser)); + + GPR_ASSERT(GRPC_HTTP_REQUEST == parser.type); + GPR_ASSERT(0 == strcmp(expect_method, parser.http.request.method)); + GPR_ASSERT(0 == strcmp(expect_path, parser.http.request.path)); + GPR_ASSERT(expect_version == parser.http.request.version); + + if (expect_body != NULL) { + GPR_ASSERT(strlen(expect_body) == parser.http.request.body_length); + GPR_ASSERT(0 == memcmp(expect_body, parser.http.request.body, + parser.http.request.body_length)); + } else { + GPR_ASSERT(parser.http.request.body_length == 0); + } + + va_start(args, expect_body); + i = 0; + for (;;) { + char *expect_key; + char *expect_value; + expect_key = va_arg(args, char *); + if (!expect_key) break; + GPR_ASSERT(i < parser.http.request.hdr_count); + expect_value = va_arg(args, char *); + GPR_ASSERT(expect_value); + GPR_ASSERT(0 == strcmp(expect_key, parser.http.request.hdrs[i].key)); + GPR_ASSERT(0 == strcmp(expect_value, parser.http.request.hdrs[i].value)); + i++; + } + va_end(args); + GPR_ASSERT(i == parser.http.request.hdr_count); + + grpc_http_parser_destroy(&parser); + gpr_free(slices); +} + static void test_succeeds(grpc_slice_split_mode split_mode, char *response, int expect_status, char *expect_body, ...) { - grpc_httpcli_parser parser; + grpc_http_parser parser; gpr_slice input_slice = gpr_slice_from_copied_string(response); size_t num_slices; size_t i; @@ -55,20 +111,22 @@ static void test_succeeds(grpc_slice_split_mode split_mode, char *response, grpc_split_slices(split_mode, &input_slice, 1, &slices, &num_slices); gpr_slice_unref(input_slice); - grpc_httpcli_parser_init(&parser); + grpc_http_parser_init(&parser); for (i = 0; i < num_slices; i++) { - GPR_ASSERT(grpc_httpcli_parser_parse(&parser, slices[i])); + GPR_ASSERT(grpc_http_parser_parse(&parser, slices[i])); gpr_slice_unref(slices[i]); } - GPR_ASSERT(grpc_httpcli_parser_eof(&parser)); + GPR_ASSERT(grpc_http_parser_eof(&parser)); - GPR_ASSERT(expect_status == parser.r.status); + GPR_ASSERT(GRPC_HTTP_RESPONSE == parser.type); + GPR_ASSERT(expect_status == parser.http.response.status); if (expect_body != NULL) { - GPR_ASSERT(strlen(expect_body) == parser.r.body_length); - GPR_ASSERT(0 == memcmp(expect_body, parser.r.body, parser.r.body_length)); + GPR_ASSERT(strlen(expect_body) == parser.http.response.body_length); + GPR_ASSERT(0 == memcmp(expect_body, parser.http.response.body, + parser.http.response.body_length)); } else { - GPR_ASSERT(parser.r.body_length == 0); + GPR_ASSERT(parser.http.response.body_length == 0); } va_start(args, expect_body); @@ -78,22 +136,22 @@ static void test_succeeds(grpc_slice_split_mode split_mode, char *response, char *expect_value; expect_key = va_arg(args, char *); if (!expect_key) break; - GPR_ASSERT(i < parser.r.hdr_count); + GPR_ASSERT(i < parser.http.response.hdr_count); expect_value = va_arg(args, char *); GPR_ASSERT(expect_value); - GPR_ASSERT(0 == strcmp(expect_key, parser.r.hdrs[i].key)); - GPR_ASSERT(0 == strcmp(expect_value, parser.r.hdrs[i].value)); + GPR_ASSERT(0 == strcmp(expect_key, parser.http.response.hdrs[i].key)); + GPR_ASSERT(0 == strcmp(expect_value, parser.http.response.hdrs[i].value)); i++; } va_end(args); - GPR_ASSERT(i == parser.r.hdr_count); + GPR_ASSERT(i == parser.http.response.hdr_count); - grpc_httpcli_parser_destroy(&parser); + grpc_http_parser_destroy(&parser); gpr_free(slices); } static void test_fails(grpc_slice_split_mode split_mode, char *response) { - grpc_httpcli_parser parser; + grpc_http_parser parser; gpr_slice input_slice = gpr_slice_from_copied_string(response); size_t num_slices; size_t i; @@ -103,20 +161,20 @@ static void test_fails(grpc_slice_split_mode split_mode, char *response) { grpc_split_slices(split_mode, &input_slice, 1, &slices, &num_slices); gpr_slice_unref(input_slice); - grpc_httpcli_parser_init(&parser); + grpc_http_parser_init(&parser); for (i = 0; i < num_slices; i++) { - if (!done && !grpc_httpcli_parser_parse(&parser, slices[i])) { + if (!done && !grpc_http_parser_parse(&parser, slices[i])) { done = 1; } gpr_slice_unref(slices[i]); } - if (!done && !grpc_httpcli_parser_eof(&parser)) { + if (!done && !grpc_http_parser_eof(&parser)) { done = 1; } GPR_ASSERT(done); - grpc_httpcli_parser_destroy(&parser); + grpc_http_parser_destroy(&parser); gpr_free(slices); } @@ -145,6 +203,32 @@ int main(int argc, char **argv) { "\r\n" "hello world!", 200, "hello world!", "xyz", "abc", NULL); + test_request_succeeds(split_modes[i], + "GET / HTTP/1.0\r\n" + "\r\n", + "GET", GRPC_HTTP_HTTP10, "/", NULL, NULL); + test_request_succeeds(split_modes[i], + "GET / HTTP/1.0\r\n" + "\r\n" + "xyz", + "GET", GRPC_HTTP_HTTP10, "/", "xyz", NULL); + test_request_succeeds(split_modes[i], + "GET / HTTP/1.1\r\n" + "\r\n" + "xyz", + "GET", GRPC_HTTP_HTTP11, "/", "xyz", NULL); + test_request_succeeds(split_modes[i], + "GET / HTTP/2.0\r\n" + "\r\n" + "xyz", + "GET", GRPC_HTTP_HTTP20, "/", "xyz", NULL); + test_request_succeeds(split_modes[i], + "GET / HTTP/1.0\r\n" + "xyz: abc\r\n" + "\r\n" + "xyz", + "GET", GRPC_HTTP_HTTP10, "/", "xyz", "xyz", "abc", + NULL); test_fails(split_modes[i], "HTTP/1.0\r\n"); test_fails(split_modes[i], "HTTP/1.2\r\n"); test_fails(split_modes[i], "HTTP/1.0 000 XYX\r\n"); @@ -157,10 +241,15 @@ int main(int argc, char **argv) { " def\r\n" "\r\n" "hello world!"); + test_fails(split_modes[i], "GET\r\n"); + test_fails(split_modes[i], "GET /\r\n"); + test_fails(split_modes[i], "GET / HTTP/0.0\r\n"); + test_fails(split_modes[i], "GET / ____/1.0\r\n"); + test_fails(split_modes[i], "GET / HTTP/1.2\r\n"); - tmp1 = gpr_malloc(2 * GRPC_HTTPCLI_MAX_HEADER_LENGTH); - memset(tmp1, 'a', 2 * GRPC_HTTPCLI_MAX_HEADER_LENGTH - 1); - tmp1[2 * GRPC_HTTPCLI_MAX_HEADER_LENGTH - 1] = 0; + tmp1 = gpr_malloc(2 * GRPC_HTTP_PARSER_MAX_HEADER_LENGTH); + memset(tmp1, 'a', 2 * GRPC_HTTP_PARSER_MAX_HEADER_LENGTH - 1); + tmp1[2 * GRPC_HTTP_PARSER_MAX_HEADER_LENGTH - 1] = 0; gpr_asprintf(&tmp2, "HTTP/1.0 200 OK\r\nxyz: %s\r\n\r\n", tmp1); test_fails(split_modes[i], tmp2); gpr_free(tmp1); diff --git a/test/core/httpcli/test_server.py b/test/core/http/test_server.py similarity index 94% rename from test/core/httpcli/test_server.py rename to test/core/http/test_server.py index dbbf5ceb3c7..9f8d052cead 100755 --- a/test/core/httpcli/test_server.py +++ b/test/core/http/test_server.py @@ -1,5 +1,5 @@ #!/usr/bin/env python2.7 -# Copyright 2015, Google Inc. +# Copyright 2015-2016, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -36,8 +36,8 @@ import os import ssl import sys -_PEM = os.path.abspath(os.path.join(os.path.dirname(sys.argv[0]), '../../..', 'src/core/tsi/test_creds/server1.pem')) -_KEY = os.path.abspath(os.path.join(os.path.dirname(sys.argv[0]), '../../..', 'src/core/tsi/test_creds/server1.key')) +_PEM = os.path.abspath(os.path.join(os.path.dirname(sys.argv[0]), '../../..', 'src/core/lib/tsi/test_creds/server1.pem')) +_KEY = os.path.abspath(os.path.join(os.path.dirname(sys.argv[0]), '../../..', 'src/core/lib/tsi/test_creds/server1.key')) print _PEM open(_PEM).close() diff --git a/test/core/iomgr/endpoint_pair_test.c b/test/core/iomgr/endpoint_pair_test.c index c3a91088a57..a91a9a70843 100644 --- a/test/core/iomgr/endpoint_pair_test.c +++ b/test/core/iomgr/endpoint_pair_test.c @@ -31,14 +31,14 @@ * */ -#include "src/core/iomgr/tcp_posix.h" +#include "src/core/lib/iomgr/tcp_posix.h" #include #include #include #include #include -#include "src/core/iomgr/endpoint_pair.h" +#include "src/core/lib/iomgr/endpoint_pair.h" #include "test/core/iomgr/endpoint_tests.h" #include "test/core/util/test_config.h" diff --git a/test/core/iomgr/endpoint_tests.h b/test/core/iomgr/endpoint_tests.h index 8ea47e345cf..c7542a03e31 100644 --- a/test/core/iomgr/endpoint_tests.h +++ b/test/core/iomgr/endpoint_tests.h @@ -36,7 +36,7 @@ #include -#include "src/core/iomgr/endpoint.h" +#include "src/core/lib/iomgr/endpoint.h" typedef struct grpc_endpoint_test_config grpc_endpoint_test_config; typedef struct grpc_endpoint_test_fixture grpc_endpoint_test_fixture; diff --git a/test/core/iomgr/fd_conservation_posix_test.c b/test/core/iomgr/fd_conservation_posix_test.c index 401bf70a9e9..aae94e71b20 100644 --- a/test/core/iomgr/fd_conservation_posix_test.c +++ b/test/core/iomgr/fd_conservation_posix_test.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -35,9 +35,9 @@ #include +#include "src/core/lib/iomgr/endpoint_pair.h" +#include "src/core/lib/iomgr/iomgr.h" #include "test/core/util/test_config.h" -#include "src/core/iomgr/endpoint_pair.h" -#include "src/core/iomgr/iomgr.h" int main(int argc, char **argv) { int i; diff --git a/test/core/iomgr/fd_posix_test.c b/test/core/iomgr/fd_posix_test.c index 99689ebcc3b..203e1e3899b 100644 --- a/test/core/iomgr/fd_posix_test.c +++ b/test/core/iomgr/fd_posix_test.c @@ -31,7 +31,7 @@ * */ -#include "src/core/iomgr/fd_posix.h" +#include "src/core/lib/iomgr/fd_posix.h" #include #include @@ -50,7 +50,7 @@ #include #include -#include "src/core/iomgr/pollset_posix.h" +#include "src/core/lib/iomgr/pollset_posix.h" #include "test/core/util/test_config.h" static gpr_mu *g_mu; diff --git a/test/core/iomgr/resolve_address_test.c b/test/core/iomgr/resolve_address_test.c index 56ce091a887..7aec91a85eb 100644 --- a/test/core/iomgr/resolve_address_test.c +++ b/test/core/iomgr/resolve_address_test.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,11 +31,11 @@ * */ -#include "src/core/iomgr/resolve_address.h" -#include "src/core/iomgr/executor.h" +#include "src/core/lib/iomgr/resolve_address.h" #include #include #include +#include "src/core/lib/iomgr/executor.h" #include "test/core/util/test_config.h" static gpr_timespec test_deadline(void) { diff --git a/test/core/iomgr/sockaddr_utils_test.c b/test/core/iomgr/sockaddr_utils_test.c index a7b57c14663..19bee9a3995 100644 --- a/test/core/iomgr/sockaddr_utils_test.c +++ b/test/core/iomgr/sockaddr_utils_test.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,7 +31,7 @@ * */ -#include "src/core/iomgr/sockaddr_utils.h" +#include "src/core/lib/iomgr/sockaddr_utils.h" #include #include diff --git a/test/core/iomgr/socket_utils_test.c b/test/core/iomgr/socket_utils_test.c index 58c3fbc0ae3..8238a9c33f5 100644 --- a/test/core/iomgr/socket_utils_test.c +++ b/test/core/iomgr/socket_utils_test.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -32,7 +32,7 @@ */ #include -#include "src/core/iomgr/socket_utils_posix.h" +#include "src/core/lib/iomgr/socket_utils_posix.h" #include #include diff --git a/test/core/iomgr/tcp_client_posix_test.c b/test/core/iomgr/tcp_client_posix_test.c index 746dfd85be6..d798bf241d6 100644 --- a/test/core/iomgr/tcp_client_posix_test.c +++ b/test/core/iomgr/tcp_client_posix_test.c @@ -31,7 +31,7 @@ * */ -#include "src/core/iomgr/tcp_client.h" +#include "src/core/lib/iomgr/tcp_client.h" #include #include @@ -44,9 +44,9 @@ #include #include -#include "src/core/iomgr/iomgr.h" -#include "src/core/iomgr/socket_utils_posix.h" -#include "src/core/iomgr/timer.h" +#include "src/core/lib/iomgr/iomgr.h" +#include "src/core/lib/iomgr/socket_utils_posix.h" +#include "src/core/lib/iomgr/timer.h" #include "test/core/util/test_config.h" static grpc_pollset_set *g_pollset_set; diff --git a/test/core/iomgr/tcp_posix_test.c b/test/core/iomgr/tcp_posix_test.c index 4351642ab6e..79f18c6d7ab 100644 --- a/test/core/iomgr/tcp_posix_test.c +++ b/test/core/iomgr/tcp_posix_test.c @@ -31,7 +31,7 @@ * */ -#include "src/core/iomgr/tcp_posix.h" +#include "src/core/lib/iomgr/tcp_posix.h" #include #include diff --git a/test/core/iomgr/tcp_server_posix_test.c b/test/core/iomgr/tcp_server_posix_test.c index 7933468355a..cde147d30e7 100644 --- a/test/core/iomgr/tcp_server_posix_test.c +++ b/test/core/iomgr/tcp_server_posix_test.c @@ -31,7 +31,7 @@ * */ -#include "src/core/iomgr/tcp_server.h" +#include "src/core/lib/iomgr/tcp_server.h" #include #include @@ -45,8 +45,8 @@ #include #include -#include "src/core/iomgr/iomgr.h" -#include "src/core/iomgr/sockaddr_utils.h" +#include "src/core/lib/iomgr/iomgr.h" +#include "src/core/lib/iomgr/sockaddr_utils.h" #include "test/core/util/port.h" #include "test/core/util/test_config.h" diff --git a/test/core/iomgr/time_averaged_stats_test.c b/test/core/iomgr/time_averaged_stats_test.c index cb006d152a3..a49d899e308 100644 --- a/test/core/iomgr/time_averaged_stats_test.c +++ b/test/core/iomgr/time_averaged_stats_test.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,7 +31,7 @@ * */ -#include "src/core/iomgr/time_averaged_stats.h" +#include "src/core/lib/iomgr/time_averaged_stats.h" #include diff --git a/test/core/iomgr/timer_heap_test.c b/test/core/iomgr/timer_heap_test.c index cd34696f7dd..d230c831ca7 100644 --- a/test/core/iomgr/timer_heap_test.c +++ b/test/core/iomgr/timer_heap_test.c @@ -31,7 +31,7 @@ * */ -#include "src/core/iomgr/timer_heap.h" +#include "src/core/lib/iomgr/timer_heap.h" #include #include @@ -177,11 +177,12 @@ static void test2(void) { grpc_timer_heap pq; - elem_struct elems[1000]; + static const size_t elems_size = 1000; + elem_struct *elems = gpr_malloc(elems_size * sizeof(elem_struct)); size_t num_inserted = 0; grpc_timer_heap_init(&pq); - memset(elems, 0, sizeof(elems)); + memset(elems, 0, elems_size); for (size_t round = 0; round < 10000; round++) { int r = rand() % 1000; @@ -209,7 +210,7 @@ static void test2(void) { if (num_inserted > 0) { grpc_timer *top = grpc_timer_heap_top(&pq); grpc_timer_heap_pop(&pq); - for (size_t i = 0; i < GPR_ARRAY_SIZE(elems); i++) { + for (size_t i = 0; i < elems_size; i++) { if (top == &elems[i].elem) { GPR_ASSERT(elems[i].inserted); elems[i].inserted = false; @@ -222,7 +223,7 @@ static void test2(void) { if (num_inserted) { gpr_timespec *min_deadline = NULL; - for (size_t i = 0; i < GPR_ARRAY_SIZE(elems); i++) { + for (size_t i = 0; i < elems_size; i++) { if (elems[i].inserted) { if (min_deadline == NULL) { min_deadline = &elems[i].elem.deadline; @@ -239,6 +240,7 @@ static void test2(void) { } grpc_timer_heap_destroy(&pq); + gpr_free(elems); } static void shrink_test(void) { diff --git a/test/core/iomgr/timer_list_test.c b/test/core/iomgr/timer_list_test.c index 7a21fdd5c10..0333a75059b 100644 --- a/test/core/iomgr/timer_list_test.c +++ b/test/core/iomgr/timer_list_test.c @@ -31,7 +31,7 @@ * */ -#include "src/core/iomgr/timer.h" +#include "src/core/lib/iomgr/timer.h" #include @@ -81,9 +81,8 @@ static void add_test(void) { } GPR_ASSERT(!grpc_timer_check( - &exec_ctx, - gpr_time_add(start, gpr_time_from_millis(600, GPR_TIMESPAN)), - NULL)); + &exec_ctx, gpr_time_add(start, gpr_time_from_millis(600, GPR_TIMESPAN)), + NULL)); grpc_exec_ctx_finish(&exec_ctx); for (i = 0; i < 30; i++) { GPR_ASSERT(cb_called[i][1] == (i < 10)); @@ -101,9 +100,8 @@ static void add_test(void) { } GPR_ASSERT(!grpc_timer_check( - &exec_ctx, - gpr_time_add(start, gpr_time_from_millis(1600, GPR_TIMESPAN)), - NULL)); + &exec_ctx, gpr_time_add(start, gpr_time_from_millis(1600, GPR_TIMESPAN)), + NULL)); for (i = 0; i < 30; i++) { GPR_ASSERT(cb_called[i][1] == (i < 20)); GPR_ASSERT(cb_called[i][0] == 0); diff --git a/test/core/iomgr/udp_server_test.c b/test/core/iomgr/udp_server_test.c index 2e253d8a8a1..0c55ef08b46 100644 --- a/test/core/iomgr/udp_server_test.c +++ b/test/core/iomgr/udp_server_test.c @@ -31,16 +31,18 @@ * */ -#include "src/core/iomgr/udp_server.h" -#include "src/core/iomgr/iomgr.h" +#include "src/core/lib/iomgr/udp_server.h" +#include #include #include #include +#include "src/core/lib/iomgr/iomgr.h" +#include "src/core/lib/iomgr/pollset_posix.h" #include "test/core/util/test_config.h" -#include #include #include +#include #include #ifdef GRPC_NEED_UDP @@ -48,6 +50,7 @@ #define LOG_TEST(x) gpr_log(GPR_INFO, "%s", #x) static grpc_pollset g_pollset; +static gpr_mu *g_mu; static int g_number_of_reads = 0; static int g_number_of_bytes_read = 0; @@ -56,14 +59,14 @@ static void on_read(grpc_exec_ctx *exec_ctx, grpc_fd *emfd, char read_buffer[512]; ssize_t byte_count; - gpr_mu_lock(GRPC_POLLSET_MU(&g_pollset)); + gpr_mu_lock(g_mu); byte_count = recv(emfd->fd, read_buffer, sizeof(read_buffer), 0); g_number_of_reads++; g_number_of_bytes_read += (int)byte_count; grpc_pollset_kick(&g_pollset, NULL); - gpr_mu_unlock(GRPC_POLLSET_MU(&g_pollset)); + gpr_mu_unlock(g_mu); } static void test_no_op(void) { @@ -142,7 +145,7 @@ static void test_receive(int number_of_clients) { pollsets[0] = &g_pollset; grpc_udp_server_start(&exec_ctx, s, pollsets, 1, NULL); - gpr_mu_lock(GRPC_POLLSET_MU(&g_pollset)); + gpr_mu_lock(g_mu); for (i = 0; i < number_of_clients; i++) { deadline = GRPC_TIMEOUT_SECONDS_TO_DEADLINE(10); @@ -155,19 +158,19 @@ static void test_receive(int number_of_clients) { GPR_ASSERT(5 == write(clifd, "hello", 5)); while (g_number_of_reads == number_of_reads_before && gpr_time_cmp(deadline, gpr_now(deadline.clock_type)) > 0) { - grpc_pollset_worker worker; + grpc_pollset_worker *worker = NULL; grpc_pollset_work(&exec_ctx, &g_pollset, &worker, gpr_now(GPR_CLOCK_MONOTONIC), deadline); - gpr_mu_unlock(GRPC_POLLSET_MU(&g_pollset)); + gpr_mu_unlock(g_mu); grpc_exec_ctx_finish(&exec_ctx); - gpr_mu_lock(GRPC_POLLSET_MU(&g_pollset)); + gpr_mu_lock(g_mu); } GPR_ASSERT(g_number_of_reads == number_of_reads_before + 1); close(clifd); } GPR_ASSERT(g_number_of_bytes_read == 5 * number_of_clients); - gpr_mu_unlock(GRPC_POLLSET_MU(&g_pollset)); + gpr_mu_unlock(g_mu); grpc_udp_server_destroy(&exec_ctx, s, NULL); grpc_exec_ctx_finish(&exec_ctx); @@ -181,8 +184,8 @@ int main(int argc, char **argv) { grpc_closure destroyed; grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; grpc_test_init(argc, argv); - grpc_iomgr_init(); - grpc_pollset_init(&g_pollset); + grpc_init(); + grpc_pollset_init(&g_pollset, &g_mu); test_no_op(); test_no_op_with_start(); diff --git a/test/core/iomgr/workqueue_test.c b/test/core/iomgr/workqueue_test.c index 8a1faf6303e..2d9b5d0d55a 100644 --- a/test/core/iomgr/workqueue_test.c +++ b/test/core/iomgr/workqueue_test.c @@ -31,7 +31,7 @@ * */ -#include "src/core/iomgr/workqueue.h" +#include "src/core/lib/iomgr/workqueue.h" #include #include diff --git a/test/core/json/json_rewrite.c b/test/core/json/json_rewrite.c index 0c615a9975d..41090db105e 100644 --- a/test/core/json/json_rewrite.c +++ b/test/core/json/json_rewrite.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -38,8 +38,8 @@ #include #include -#include "src/core/json/json_reader.h" -#include "src/core/json/json_writer.h" +#include "src/core/lib/json/json_reader.h" +#include "src/core/lib/json/json_writer.h" typedef struct json_writer_userdata { FILE *out; } json_writer_userdata; diff --git a/test/core/json/json_rewrite_test.c b/test/core/json/json_rewrite_test.c index d99cb0dd03f..33fc98ed745 100644 --- a/test/core/json/json_rewrite_test.c +++ b/test/core/json/json_rewrite_test.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -35,12 +35,12 @@ #include #include -#include #include +#include #include "test/core/util/test_config.h" -#include "src/core/json/json_reader.h" -#include "src/core/json/json_writer.h" +#include "src/core/lib/json/json_reader.h" +#include "src/core/lib/json/json_writer.h" typedef struct json_writer_userdata { FILE *cmp; } json_writer_userdata; diff --git a/test/core/json/json_stream_error_test.c b/test/core/json/json_stream_error_test.c index 400776759df..630e1b03df7 100644 --- a/test/core/json/json_stream_error_test.c +++ b/test/core/json/json_stream_error_test.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -35,12 +35,12 @@ #include #include -#include #include +#include #include "test/core/util/test_config.h" -#include "src/core/json/json_reader.h" -#include "src/core/json/json_writer.h" +#include "src/core/lib/json/json_reader.h" +#include "src/core/lib/json/json_writer.h" static int g_string_clear_once = 0; diff --git a/test/core/json/json_test.c b/test/core/json/json_test.c index 5add80d753e..2a007627f36 100644 --- a/test/core/json/json_test.c +++ b/test/core/json/json_test.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -34,11 +34,11 @@ #include #include -#include #include #include -#include "src/core/json/json.h" -#include "src/core/support/string.h" +#include +#include "src/core/lib/json/json.h" +#include "src/core/lib/support/string.h" #include "test/core/util/test_config.h" @@ -66,7 +66,7 @@ static testing_pair testing_pairs[] = { {"\"\\ud834\\udd1e\"", "\"\\ud834\\udd1e\""}, /* Testing nested empty containers. */ { - " [ [ ] , { } , [ ] ] ", "[[],{},[]]", + " [ [ ] , { } , [ ] ] ", "[[],{},[]]", }, /* Testing escapes and control chars in key strings. */ {" { \"\\u007f\x7f\\n\\r\\\"\\f\\b\\\\a , b\": 1, \"\": 0 } ", diff --git a/test/core/network_benchmarks/low_level_ping_pong.c b/test/core/network_benchmarks/low_level_ping_pong.c index dd1544c27b8..b8c6954e380 100644 --- a/test/core/network_benchmarks/low_level_ping_pong.c +++ b/test/core/network_benchmarks/low_level_ping_pong.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -49,13 +49,13 @@ #endif #include -#include "src/core/iomgr/socket_utils_posix.h" #include #include #include #include #include #include +#include "src/core/lib/iomgr/socket_utils_posix.h" typedef struct fd_pair { int read_fd; diff --git a/test/core/profiling/timers_test.c b/test/core/profiling/timers_test.c index 7070fe465f1..a3831191eb3 100644 --- a/test/core/profiling/timers_test.c +++ b/test/core/profiling/timers_test.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,7 +31,7 @@ * */ -#include "src/core/profiling/timers.h" +#include "src/core/lib/profiling/timers.h" #include #include "test/core/util/test_config.h" diff --git a/test/core/security/auth_context_test.c b/test/core/security/auth_context_test.c index d091c7e7e63..84d2afb85b4 100644 --- a/test/core/security/auth_context_test.c +++ b/test/core/security/auth_context_test.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -33,8 +33,8 @@ #include -#include "src/core/security/security_context.h" -#include "src/core/support/string.h" +#include "src/core/lib/security/security_context.h" +#include "src/core/lib/support/string.h" #include "test/core/util/test_config.h" #include diff --git a/test/core/security/b64_test.c b/test/core/security/b64_test.c index 772514e1fda..ab15df2c210 100644 --- a/test/core/security/b64_test.c +++ b/test/core/security/b64_test.c @@ -31,7 +31,7 @@ * */ -#include "src/core/security/b64.h" +#include "src/core/lib/security/b64.h" #include diff --git a/test/core/security/create_jwt.c b/test/core/security/create_jwt.c index 4c0cf436eeb..3416de72541 100644 --- a/test/core/security/create_jwt.c +++ b/test/core/security/create_jwt.c @@ -34,9 +34,9 @@ #include #include -#include "src/core/security/credentials.h" -#include "src/core/security/json_token.h" -#include "src/core/support/load_file.h" +#include "src/core/lib/security/credentials.h" +#include "src/core/lib/security/json_token.h" +#include "src/core/lib/support/load_file.h" #include #include diff --git a/test/core/security/credentials_test.c b/test/core/security/credentials_test.c index 98133ef5e5f..e741e3656f2 100644 --- a/test/core/security/credentials_test.c +++ b/test/core/security/credentials_test.c @@ -33,7 +33,7 @@ #include -#include "src/core/security/credentials.h" +#include "src/core/lib/security/credentials.h" #include #include @@ -44,11 +44,11 @@ #include #include -#include "src/core/httpcli/httpcli.h" -#include "src/core/security/json_token.h" -#include "src/core/support/env.h" -#include "src/core/support/tmpfile.h" -#include "src/core/support/string.h" +#include "src/core/lib/http/httpcli.h" +#include "src/core/lib/security/json_token.h" +#include "src/core/lib/support/env.h" +#include "src/core/lib/support/string.h" +#include "src/core/lib/support/tmpfile.h" #include "test/core/util/test_config.h" /* -- Mock channel credentials. -- */ @@ -536,12 +536,12 @@ static void validate_compute_engine_http_request( GPR_ASSERT(request->handshaker != &grpc_httpcli_ssl); GPR_ASSERT(strcmp(request->host, "metadata") == 0); GPR_ASSERT( - strcmp(request->path, + strcmp(request->http.path, "/computeMetadata/v1/instance/service-accounts/default/token") == 0); - GPR_ASSERT(request->hdr_count == 1); - GPR_ASSERT(strcmp(request->hdrs[0].key, "Metadata-Flavor") == 0); - GPR_ASSERT(strcmp(request->hdrs[0].value, "Google") == 0); + GPR_ASSERT(request->http.hdr_count == 1); + GPR_ASSERT(strcmp(request->http.hdrs[0].key, "Metadata-Flavor") == 0); + GPR_ASSERT(strcmp(request->http.hdrs[0].value, "Google") == 0); } static int compute_engine_httpcli_get_success_override( @@ -639,11 +639,12 @@ static void validate_refresh_token_http_request( gpr_free(expected_body); GPR_ASSERT(request->handshaker == &grpc_httpcli_ssl); GPR_ASSERT(strcmp(request->host, GRPC_GOOGLE_OAUTH2_SERVICE_HOST) == 0); - GPR_ASSERT(strcmp(request->path, GRPC_GOOGLE_OAUTH2_SERVICE_TOKEN_PATH) == 0); - GPR_ASSERT(request->hdr_count == 1); - GPR_ASSERT(strcmp(request->hdrs[0].key, "Content-Type") == 0); GPR_ASSERT( - strcmp(request->hdrs[0].value, "application/x-www-form-urlencoded") == 0); + strcmp(request->http.path, GRPC_GOOGLE_OAUTH2_SERVICE_TOKEN_PATH) == 0); + GPR_ASSERT(request->http.hdr_count == 1); + GPR_ASSERT(strcmp(request->http.hdrs[0].key, "Content-Type") == 0); + GPR_ASSERT(strcmp(request->http.hdrs[0].value, + "application/x-www-form-urlencoded") == 0); } static int refresh_token_httpcli_post_success( @@ -898,12 +899,12 @@ static int default_creds_gce_detection_httpcli_get_success_override( gpr_timespec deadline, grpc_httpcli_response_cb on_response, void *user_data) { grpc_httpcli_response response = http_response(200, ""); - grpc_httpcli_header header; + grpc_http_header header; header.key = "Metadata-Flavor"; header.value = "Google"; response.hdr_count = 1; response.hdrs = &header; - GPR_ASSERT(strcmp(request->path, "/") == 0); + GPR_ASSERT(strcmp(request->http.path, "/") == 0); GPR_ASSERT(strcmp(request->host, "metadata.google.internal") == 0); on_response(exec_ctx, user_data, &response); return 1; @@ -961,7 +962,7 @@ static int default_creds_gce_detection_httpcli_get_failure_override( void *user_data) { /* No magic header. */ grpc_httpcli_response response = http_response(200, ""); - GPR_ASSERT(strcmp(request->path, "/") == 0); + GPR_ASSERT(strcmp(request->http.path, "/") == 0); GPR_ASSERT(strcmp(request->host, "metadata.google.internal") == 0); on_response(exec_ctx, user_data, &response); return 1; diff --git a/test/core/security/fetch_oauth2.c b/test/core/security/fetch_oauth2.c index 87b54f1a0c3..1f4e18005e5 100644 --- a/test/core/security/fetch_oauth2.c +++ b/test/core/security/fetch_oauth2.c @@ -42,8 +42,8 @@ #include #include -#include "src/core/security/credentials.h" -#include "src/core/support/load_file.h" +#include "src/core/lib/security/credentials.h" +#include "src/core/lib/support/load_file.h" #include "test/core/security/oauth2_utils.h" static grpc_call_credentials *create_refresh_token_creds( diff --git a/test/core/security/json_token_test.c b/test/core/security/json_token_test.c index 4d80c16fb98..460d5299f06 100644 --- a/test/core/security/json_token_test.c +++ b/test/core/security/json_token_test.c @@ -31,7 +31,7 @@ * */ -#include "src/core/security/json_token.h" +#include "src/core/lib/security/json_token.h" #include #include @@ -41,8 +41,8 @@ #include #include -#include "src/core/json/json.h" -#include "src/core/security/b64.h" +#include "src/core/lib/json/json.h" +#include "src/core/lib/security/b64.h" #include "test/core/util/test_config.h" /* This JSON key was generated with the GCE console and revoked immediately. diff --git a/test/core/security/jwt_verifier_test.c b/test/core/security/jwt_verifier_test.c index f6ec9e12ef3..c57f4d72ee2 100644 --- a/test/core/security/jwt_verifier_test.c +++ b/test/core/security/jwt_verifier_test.c @@ -31,13 +31,13 @@ * */ -#include "src/core/security/jwt_verifier.h" +#include "src/core/lib/security/jwt_verifier.h" #include -#include "src/core/httpcli/httpcli.h" -#include "src/core/security/b64.h" -#include "src/core/security/json_token.h" +#include "src/core/lib/http/httpcli.h" +#include "src/core/lib/security/b64.h" +#include "src/core/lib/security/json_token.h" #include "test/core/util/test_config.h" #include @@ -288,7 +288,7 @@ static int httpcli_get_google_keys_for_email( grpc_httpcli_response response = http_response(200, good_google_email_keys()); GPR_ASSERT(request->handshaker == &grpc_httpcli_ssl); GPR_ASSERT(strcmp(request->host, "www.googleapis.com") == 0); - GPR_ASSERT(strcmp(request->path, + GPR_ASSERT(strcmp(request->http.path, "/robot/v1/metadata/x509/" "777-abaslkan11hlb6nmim3bpspl31ud@developer." "gserviceaccount.com") == 0); @@ -336,7 +336,7 @@ static int httpcli_get_custom_keys_for_email( grpc_httpcli_response response = http_response(200, gpr_strdup(good_jwk_set)); GPR_ASSERT(request->handshaker == &grpc_httpcli_ssl); GPR_ASSERT(strcmp(request->host, "keys.bar.com") == 0); - GPR_ASSERT(strcmp(request->path, "/jwk/foo@bar.com") == 0); + GPR_ASSERT(strcmp(request->http.path, "/jwk/foo@bar.com") == 0); on_response(exec_ctx, user_data, &response); gpr_free(response.body); return 1; @@ -372,7 +372,7 @@ static int httpcli_get_jwk_set(grpc_exec_ctx *exec_ctx, grpc_httpcli_response response = http_response(200, gpr_strdup(good_jwk_set)); GPR_ASSERT(request->handshaker == &grpc_httpcli_ssl); GPR_ASSERT(strcmp(request->host, "www.googleapis.com") == 0); - GPR_ASSERT(strcmp(request->path, "/oauth2/v3/certs") == 0); + GPR_ASSERT(strcmp(request->http.path, "/oauth2/v3/certs") == 0); on_response(exec_ctx, user_data, &response); gpr_free(response.body); return 1; @@ -387,7 +387,7 @@ static int httpcli_get_openid_config(grpc_exec_ctx *exec_ctx, http_response(200, gpr_strdup(good_openid_config)); GPR_ASSERT(request->handshaker == &grpc_httpcli_ssl); GPR_ASSERT(strcmp(request->host, "accounts.google.com") == 0); - GPR_ASSERT(strcmp(request->path, GRPC_OPENID_CONFIG_URL_SUFFIX) == 0); + GPR_ASSERT(strcmp(request->http.path, GRPC_OPENID_CONFIG_URL_SUFFIX) == 0); grpc_httpcli_set_override(httpcli_get_jwk_set, httpcli_post_should_not_be_called); on_response(exec_ctx, user_data, &response); diff --git a/test/core/security/oauth2_utils.c b/test/core/security/oauth2_utils.c index 9b70afffe1e..52259e63af8 100644 --- a/test/core/security/oauth2_utils.c +++ b/test/core/security/oauth2_utils.c @@ -42,7 +42,7 @@ #include #include -#include "src/core/security/credentials.h" +#include "src/core/lib/security/credentials.h" typedef struct { gpr_mu *mu; diff --git a/test/core/security/oauth2_utils.h b/test/core/security/oauth2_utils.h index b35fe7987fc..5930f4729c1 100644 --- a/test/core/security/oauth2_utils.h +++ b/test/core/security/oauth2_utils.h @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -34,7 +34,7 @@ #ifndef GRPC_TEST_CORE_SECURITY_OAUTH2_UTILS_H #define GRPC_TEST_CORE_SECURITY_OAUTH2_UTILS_H -#include "src/core/security/credentials.h" +#include "src/core/lib/security/credentials.h" #ifdef __cplusplus extern "C" { diff --git a/test/core/security/print_google_default_creds_token.c b/test/core/security/print_google_default_creds_token.c index 09673f362cf..49812f7f3e9 100644 --- a/test/core/security/print_google_default_creds_token.c +++ b/test/core/security/print_google_default_creds_token.c @@ -42,8 +42,8 @@ #include #include -#include "src/core/security/credentials.h" -#include "src/core/support/string.h" +#include "src/core/lib/security/credentials.h" +#include "src/core/lib/support/string.h" typedef struct { gpr_mu *mu; diff --git a/test/core/security/secure_endpoint_test.c b/test/core/security/secure_endpoint_test.c index 0e8c38a53ec..f6884ec1baa 100644 --- a/test/core/security/secure_endpoint_test.c +++ b/test/core/security/secure_endpoint_test.c @@ -39,10 +39,10 @@ #include #include #include -#include "src/core/iomgr/endpoint_pair.h" -#include "src/core/iomgr/iomgr.h" -#include "src/core/security/secure_endpoint.h" -#include "src/core/tsi/fake_transport_security.h" +#include "src/core/lib/iomgr/endpoint_pair.h" +#include "src/core/lib/iomgr/iomgr.h" +#include "src/core/lib/security/secure_endpoint.h" +#include "src/core/lib/tsi/fake_transport_security.h" #include "test/core/util/test_config.h" static gpr_mu *g_mu; diff --git a/test/core/security/security_connector_test.c b/test/core/security/security_connector_test.c index 420e3a4c525..b080343e3f4 100644 --- a/test/core/security/security_connector_test.c +++ b/test/core/security/security_connector_test.c @@ -40,13 +40,13 @@ #include #include -#include "src/core/security/security_connector.h" -#include "src/core/security/security_context.h" -#include "src/core/support/env.h" -#include "src/core/support/tmpfile.h" -#include "src/core/support/string.h" -#include "src/core/tsi/ssl_transport_security.h" -#include "src/core/tsi/transport_security.h" +#include "src/core/lib/security/security_connector.h" +#include "src/core/lib/security/security_context.h" +#include "src/core/lib/support/env.h" +#include "src/core/lib/support/string.h" +#include "src/core/lib/support/tmpfile.h" +#include "src/core/lib/tsi/ssl_transport_security.h" +#include "src/core/lib/tsi/transport_security.h" #include "test/core/util/test_config.h" static int check_transport_security_type(const grpc_auth_context *ctx) { @@ -80,13 +80,14 @@ static int check_peer_property(const tsi_peer *peer, static int check_ssl_peer_equivalence(const tsi_peer *original, const tsi_peer *reconstructed) { - /* The reconstructed peer only has CN and SAN properties. */ + /* The reconstructed peer only has CN, SAN and pem cert properties. */ size_t i; for (i = 0; i < original->property_count; i++) { const tsi_peer_property *prop = &original->properties[i]; if ((strcmp(prop->name, TSI_X509_SUBJECT_COMMON_NAME_PEER_PROPERTY) == 0) || (strcmp(prop->name, TSI_X509_SUBJECT_ALTERNATIVE_NAME_PEER_PROPERTY) == - 0)) { + 0) || + (strcmp(prop->name, TSI_X509_PEM_CERT_PROPERTY) == 0)) { if (!check_peer_property(reconstructed, prop)) return 0; } } @@ -164,24 +165,50 @@ static int check_x509_cn(const grpc_auth_context *ctx, return 1; } +static int check_x509_pem_cert(const grpc_auth_context *ctx, + const char *expected_pem_cert) { + grpc_auth_property_iterator it = grpc_auth_context_find_properties_by_name( + ctx, GRPC_X509_PEM_CERT_PROPERTY_NAME); + const grpc_auth_property *prop = grpc_auth_property_iterator_next(&it); + if (prop == NULL) { + gpr_log(GPR_ERROR, "Pem certificate property not found."); + return 0; + } + if (strncmp(prop->value, expected_pem_cert, prop->value_length) != 0) { + gpr_log(GPR_ERROR, "Expected pem cert %s and got %s", expected_pem_cert, + prop->value); + return 0; + } + if (grpc_auth_property_iterator_next(&it) != NULL) { + gpr_log(GPR_ERROR, "Expected only one property for pem cert."); + return 0; + } + return 1; +} + static void test_cn_only_ssl_peer_to_auth_context(void) { tsi_peer peer; tsi_peer rpeer; grpc_auth_context *ctx; const char *expected_cn = "cn1"; - GPR_ASSERT(tsi_construct_peer(2, &peer) == TSI_OK); + const char *expected_pem_cert = "pem_cert1"; + GPR_ASSERT(tsi_construct_peer(3, &peer) == TSI_OK); GPR_ASSERT(tsi_construct_string_peer_property_from_cstring( TSI_CERTIFICATE_TYPE_PEER_PROPERTY, TSI_X509_CERTIFICATE_TYPE, &peer.properties[0]) == TSI_OK); GPR_ASSERT(tsi_construct_string_peer_property_from_cstring( TSI_X509_SUBJECT_COMMON_NAME_PEER_PROPERTY, expected_cn, &peer.properties[1]) == TSI_OK); + GPR_ASSERT(tsi_construct_string_peer_property_from_cstring( + TSI_X509_PEM_CERT_PROPERTY, expected_pem_cert, + &peer.properties[2]) == TSI_OK); ctx = tsi_ssl_peer_to_auth_context(&peer); GPR_ASSERT(ctx != NULL); GPR_ASSERT(grpc_auth_context_peer_is_authenticated(ctx)); GPR_ASSERT(check_identity(ctx, GRPC_X509_CN_PROPERTY_NAME, &expected_cn, 1)); GPR_ASSERT(check_transport_security_type(ctx)); GPR_ASSERT(check_x509_cn(ctx, expected_cn)); + GPR_ASSERT(check_x509_pem_cert(ctx, expected_pem_cert)); rpeer = tsi_shallow_peer_from_ssl_auth_context(ctx); GPR_ASSERT(check_ssl_peer_equivalence(&peer, &rpeer)); @@ -197,7 +224,8 @@ static void test_cn_and_one_san_ssl_peer_to_auth_context(void) { grpc_auth_context *ctx; const char *expected_cn = "cn1"; const char *expected_san = "san1"; - GPR_ASSERT(tsi_construct_peer(3, &peer) == TSI_OK); + const char *expected_pem_cert = "pem_cert1"; + GPR_ASSERT(tsi_construct_peer(4, &peer) == TSI_OK); GPR_ASSERT(tsi_construct_string_peer_property_from_cstring( TSI_CERTIFICATE_TYPE_PEER_PROPERTY, TSI_X509_CERTIFICATE_TYPE, &peer.properties[0]) == TSI_OK); @@ -207,6 +235,9 @@ static void test_cn_and_one_san_ssl_peer_to_auth_context(void) { GPR_ASSERT(tsi_construct_string_peer_property_from_cstring( TSI_X509_SUBJECT_ALTERNATIVE_NAME_PEER_PROPERTY, expected_san, &peer.properties[2]) == TSI_OK); + GPR_ASSERT(tsi_construct_string_peer_property_from_cstring( + TSI_X509_PEM_CERT_PROPERTY, expected_pem_cert, + &peer.properties[3]) == TSI_OK); ctx = tsi_ssl_peer_to_auth_context(&peer); GPR_ASSERT(ctx != NULL); GPR_ASSERT(grpc_auth_context_peer_is_authenticated(ctx)); @@ -214,6 +245,7 @@ static void test_cn_and_one_san_ssl_peer_to_auth_context(void) { check_identity(ctx, GRPC_X509_SAN_PROPERTY_NAME, &expected_san, 1)); GPR_ASSERT(check_transport_security_type(ctx)); GPR_ASSERT(check_x509_cn(ctx, expected_cn)); + GPR_ASSERT(check_x509_pem_cert(ctx, expected_pem_cert)); rpeer = tsi_shallow_peer_from_ssl_auth_context(ctx); GPR_ASSERT(check_ssl_peer_equivalence(&peer, &rpeer)); @@ -229,8 +261,9 @@ static void test_cn_and_multiple_sans_ssl_peer_to_auth_context(void) { grpc_auth_context *ctx; const char *expected_cn = "cn1"; const char *expected_sans[] = {"san1", "san2", "san3"}; + const char *expected_pem_cert = "pem_cert1"; size_t i; - GPR_ASSERT(tsi_construct_peer(2 + GPR_ARRAY_SIZE(expected_sans), &peer) == + GPR_ASSERT(tsi_construct_peer(3 + GPR_ARRAY_SIZE(expected_sans), &peer) == TSI_OK); GPR_ASSERT(tsi_construct_string_peer_property_from_cstring( TSI_CERTIFICATE_TYPE_PEER_PROPERTY, TSI_X509_CERTIFICATE_TYPE, @@ -238,10 +271,13 @@ static void test_cn_and_multiple_sans_ssl_peer_to_auth_context(void) { GPR_ASSERT(tsi_construct_string_peer_property_from_cstring( TSI_X509_SUBJECT_COMMON_NAME_PEER_PROPERTY, expected_cn, &peer.properties[1]) == TSI_OK); + GPR_ASSERT(tsi_construct_string_peer_property_from_cstring( + TSI_X509_PEM_CERT_PROPERTY, expected_pem_cert, + &peer.properties[2]) == TSI_OK); for (i = 0; i < GPR_ARRAY_SIZE(expected_sans); i++) { GPR_ASSERT(tsi_construct_string_peer_property_from_cstring( TSI_X509_SUBJECT_ALTERNATIVE_NAME_PEER_PROPERTY, - expected_sans[i], &peer.properties[2 + i]) == TSI_OK); + expected_sans[i], &peer.properties[3 + i]) == TSI_OK); } ctx = tsi_ssl_peer_to_auth_context(&peer); GPR_ASSERT(ctx != NULL); @@ -250,6 +286,7 @@ static void test_cn_and_multiple_sans_ssl_peer_to_auth_context(void) { GPR_ARRAY_SIZE(expected_sans))); GPR_ASSERT(check_transport_security_type(ctx)); GPR_ASSERT(check_x509_cn(ctx, expected_cn)); + GPR_ASSERT(check_x509_pem_cert(ctx, expected_pem_cert)); rpeer = tsi_shallow_peer_from_ssl_auth_context(ctx); GPR_ASSERT(check_ssl_peer_equivalence(&peer, &rpeer)); @@ -265,9 +302,10 @@ static void test_cn_and_multiple_sans_and_others_ssl_peer_to_auth_context( tsi_peer rpeer; grpc_auth_context *ctx; const char *expected_cn = "cn1"; + const char *expected_pem_cert = "pem_cert1"; const char *expected_sans[] = {"san1", "san2", "san3"}; size_t i; - GPR_ASSERT(tsi_construct_peer(4 + GPR_ARRAY_SIZE(expected_sans), &peer) == + GPR_ASSERT(tsi_construct_peer(5 + GPR_ARRAY_SIZE(expected_sans), &peer) == TSI_OK); GPR_ASSERT(tsi_construct_string_peer_property_from_cstring( TSI_CERTIFICATE_TYPE_PEER_PROPERTY, TSI_X509_CERTIFICATE_TYPE, @@ -279,10 +317,13 @@ static void test_cn_and_multiple_sans_and_others_ssl_peer_to_auth_context( &peer.properties[2]) == TSI_OK); GPR_ASSERT(tsi_construct_string_peer_property_from_cstring( "chapi", "chapo", &peer.properties[3]) == TSI_OK); + GPR_ASSERT(tsi_construct_string_peer_property_from_cstring( + TSI_X509_PEM_CERT_PROPERTY, expected_pem_cert, + &peer.properties[4]) == TSI_OK); for (i = 0; i < GPR_ARRAY_SIZE(expected_sans); i++) { GPR_ASSERT(tsi_construct_string_peer_property_from_cstring( TSI_X509_SUBJECT_ALTERNATIVE_NAME_PEER_PROPERTY, - expected_sans[i], &peer.properties[4 + i]) == TSI_OK); + expected_sans[i], &peer.properties[5 + i]) == TSI_OK); } ctx = tsi_ssl_peer_to_auth_context(&peer); GPR_ASSERT(ctx != NULL); @@ -291,6 +332,7 @@ static void test_cn_and_multiple_sans_and_others_ssl_peer_to_auth_context( GPR_ARRAY_SIZE(expected_sans))); GPR_ASSERT(check_transport_security_type(ctx)); GPR_ASSERT(check_x509_cn(ctx, expected_cn)); + GPR_ASSERT(check_x509_pem_cert(ctx, expected_pem_cert)); rpeer = tsi_shallow_peer_from_ssl_auth_context(ctx); GPR_ASSERT(check_ssl_peer_equivalence(&peer, &rpeer)); diff --git a/test/core/security/verify_jwt.c b/test/core/security/verify_jwt.c index eb86589681d..c08e03d9d7d 100644 --- a/test/core/security/verify_jwt.c +++ b/test/core/security/verify_jwt.c @@ -42,7 +42,7 @@ #include #include -#include "src/core/security/jwt_verifier.h" +#include "src/core/lib/security/jwt_verifier.h" typedef struct { grpc_pollset *pollset; diff --git a/test/core/statistics/census_log_tests.c b/test/core/statistics/census_log_tests.c index 77cc57d4d63..fef8e9ed487 100644 --- a/test/core/statistics/census_log_tests.c +++ b/test/core/statistics/census_log_tests.c @@ -31,10 +31,7 @@ * */ -#include "src/core/statistics/census_log.h" -#include -#include -#include +#include "src/core/lib/statistics/census_log.h" #include #include #include @@ -42,6 +39,9 @@ #include #include #include +#include +#include +#include #include "test/core/util/test_config.h" /* Fills in 'record' of size 'size'. Each byte in record is filled in with the diff --git a/test/core/statistics/census_stub_test.c b/test/core/statistics/census_stub_test.c index 8e409a37263..df5d25b6782 100644 --- a/test/core/statistics/census_stub_test.c +++ b/test/core/statistics/census_stub_test.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -34,10 +34,10 @@ #include #include -#include "src/core/statistics/census_interface.h" -#include "src/core/statistics/census_rpc_stats.h" #include #include +#include "src/core/lib/statistics/census_interface.h" +#include "src/core/lib/statistics/census_rpc_stats.h" #include "test/core/util/test_config.h" /* Tests census noop stubs in a simulated rpc flow */ diff --git a/test/core/statistics/hash_table_test.c b/test/core/statistics/hash_table_test.c index 3b119dbc0c8..903d297bb8a 100644 --- a/test/core/statistics/hash_table_test.c +++ b/test/core/statistics/hash_table_test.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -35,13 +35,13 @@ #include #include -#include "src/core/statistics/hash_table.h" +#include "src/core/lib/statistics/hash_table.h" -#include "src/core/support/murmur_hash.h" -#include "src/core/support/string.h" #include #include #include +#include "src/core/lib/support/murmur_hash.h" +#include "src/core/lib/support/string.h" #include "test/core/util/test_config.h" static uint64_t hash64(const void *k) { @@ -65,8 +65,8 @@ static void free_data(void *data) { gpr_free(data); } static void test_create_table(void) { /* Create table with uint64 key type */ census_ht *ht = NULL; - census_ht_option ht_options = {CENSUS_HT_UINT64, 1999, NULL, NULL, NULL, - NULL}; + census_ht_option ht_options = { + CENSUS_HT_UINT64, 1999, NULL, NULL, NULL, NULL}; ht = census_ht_create(&ht_options); GPR_ASSERT(ht != NULL); GPR_ASSERT(census_ht_get_size(ht) == 0); @@ -120,8 +120,8 @@ static void test_table_with_int_key(void) { /* Test that there is no memory leak when keys and values are owned by table. */ static void test_value_and_key_deleter(void) { - census_ht_option opt = {CENSUS_HT_POINTER, 7, &hash64, &cmp_str_keys, - &free_data, &free_data}; + census_ht_option opt = {CENSUS_HT_POINTER, 7, &hash64, + &cmp_str_keys, &free_data, &free_data}; census_ht *ht = census_ht_create(&opt); census_ht_key key; char *val = NULL; @@ -185,8 +185,8 @@ static void test_simple_add_and_erase(void) { } static void test_insertion_and_deletion_with_high_collision_rate(void) { - census_ht_option opt = {CENSUS_HT_POINTER, 13, &force_collision, - &cmp_str_keys, NULL, NULL}; + census_ht_option opt = {CENSUS_HT_POINTER, 13, &force_collision, + &cmp_str_keys, NULL, NULL}; census_ht *ht = census_ht_create(&opt); char key_str[1000][GPR_LTOA_MIN_BUFSIZE]; uint64_t val = 0; @@ -209,12 +209,12 @@ static void test_insertion_and_deletion_with_high_collision_rate(void) { } static void test_table_with_string_key(void) { - census_ht_option opt = {CENSUS_HT_POINTER, 7, &hash64, &cmp_str_keys, NULL, - NULL}; + census_ht_option opt = {CENSUS_HT_POINTER, 7, &hash64, + &cmp_str_keys, NULL, NULL}; census_ht *ht = census_ht_create(&opt); - const char *keys[] = {"k1", "a", "000", "apple", - "banana_a_long_long_long_banana", "%$", "111", "foo", - "b"}; + const char *keys[] = { + "k1", "a", "000", "apple", "banana_a_long_long_long_banana", + "%$", "111", "foo", "b"}; const int vals[] = {0, 1, 2, 3, 4, 5, 6, 7, 8}; int i = 0; GPR_ASSERT(ht != NULL); diff --git a/test/core/statistics/rpc_stats_test.c b/test/core/statistics/rpc_stats_test.c index b1d8814cfa6..dc2f70bbd42 100644 --- a/test/core/statistics/rpc_stats_test.c +++ b/test/core/statistics/rpc_stats_test.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -33,15 +33,15 @@ #include -#include "src/core/statistics/census_interface.h" -#include "src/core/statistics/census_rpc_stats.h" -#include "src/core/statistics/census_tracing.h" #include #include #include #include #include #include +#include "src/core/lib/statistics/census_interface.h" +#include "src/core/lib/statistics/census_rpc_stats.h" +#include "src/core/lib/statistics/census_tracing.h" #include "test/core/util/test_config.h" /* Ensure all possible state transitions are called without causing problem */ diff --git a/test/core/statistics/trace_test.c b/test/core/statistics/trace_test.c index 75904040ff7..2cc3ddd36c7 100644 --- a/test/core/statistics/trace_test.c +++ b/test/core/statistics/trace_test.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,12 +31,9 @@ * */ -#include #include +#include -#include "src/core/statistics/census_interface.h" -#include "src/core/statistics/census_tracing.h" -#include "src/core/statistics/census_tracing.h" #include #include #include @@ -44,6 +41,9 @@ #include #include #include +#include "src/core/lib/statistics/census_interface.h" +#include "src/core/lib/statistics/census_tracing.h" +#include "src/core/lib/statistics/census_tracing.h" #include "test/core/util/test_config.h" /* Ensure all possible state transitions are called without causing problem */ diff --git a/test/core/statistics/window_stats_test.c b/test/core/statistics/window_stats_test.c index 578138fdd29..ed0d7bb94a1 100644 --- a/test/core/statistics/window_stats_test.c +++ b/test/core/statistics/window_stats_test.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,10 +31,10 @@ * */ -#include "src/core/statistics/window_stats.h" -#include +#include "src/core/lib/statistics/window_stats.h" #include #include +#include #include "test/core/util/test_config.h" typedef struct test_stat { diff --git a/test/core/support/alloc_test.c b/test/core/support/alloc_test.c index 6bdba8c3907..e2d0c16b41d 100644 --- a/test/core/support/alloc_test.c +++ b/test/core/support/alloc_test.c @@ -31,8 +31,8 @@ * */ -#include #include +#include #include "test/core/util/test_config.h" static void *fake_malloc(size_t size) { return (void *)size; } diff --git a/test/core/support/backoff_test.c b/test/core/support/backoff_test.c new file mode 100644 index 00000000000..13cba7d750e --- /dev/null +++ b/test/core/support/backoff_test.c @@ -0,0 +1,107 @@ +/* + * + * Copyright 2016, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include "src/core/lib/support/backoff.h" + +#include + +#include "test/core/util/test_config.h" + +static void test_constant_backoff(void) { + gpr_backoff backoff; + gpr_backoff_init(&backoff, 1.0, 0.0, 1000, 1000); + + gpr_timespec now = gpr_time_0(GPR_TIMESPAN); + gpr_timespec next = gpr_backoff_begin(&backoff, now); + GPR_ASSERT(gpr_time_to_millis(gpr_time_sub(next, now)) == 1000); + for (int i = 0; i < 10000; i++) { + next = gpr_backoff_step(&backoff, now); + GPR_ASSERT(gpr_time_to_millis(gpr_time_sub(next, now)) == 1000); + now = next; + } +} + +static void test_no_jitter_backoff(void) { + gpr_backoff backoff; + gpr_backoff_init(&backoff, 2.0, 0.0, 1, 513); + + gpr_timespec now = gpr_time_0(GPR_TIMESPAN); + gpr_timespec next = gpr_backoff_begin(&backoff, now); + GPR_ASSERT(gpr_time_cmp(gpr_time_from_millis(1, GPR_TIMESPAN), next) == 0); + now = next; + next = gpr_backoff_step(&backoff, now); + GPR_ASSERT(gpr_time_cmp(gpr_time_from_millis(3, GPR_TIMESPAN), next) == 0); + now = next; + next = gpr_backoff_step(&backoff, now); + GPR_ASSERT(gpr_time_cmp(gpr_time_from_millis(7, GPR_TIMESPAN), next) == 0); + now = next; + next = gpr_backoff_step(&backoff, now); + GPR_ASSERT(gpr_time_cmp(gpr_time_from_millis(15, GPR_TIMESPAN), next) == 0); + now = next; + next = gpr_backoff_step(&backoff, now); + GPR_ASSERT(gpr_time_cmp(gpr_time_from_millis(31, GPR_TIMESPAN), next) == 0); + now = next; + next = gpr_backoff_step(&backoff, now); + GPR_ASSERT(gpr_time_cmp(gpr_time_from_millis(63, GPR_TIMESPAN), next) == 0); + now = next; + next = gpr_backoff_step(&backoff, now); + GPR_ASSERT(gpr_time_cmp(gpr_time_from_millis(127, GPR_TIMESPAN), next) == 0); + now = next; + next = gpr_backoff_step(&backoff, now); + GPR_ASSERT(gpr_time_cmp(gpr_time_from_millis(255, GPR_TIMESPAN), next) == 0); + now = next; + next = gpr_backoff_step(&backoff, now); + GPR_ASSERT(gpr_time_cmp(gpr_time_from_millis(511, GPR_TIMESPAN), next) == 0); + now = next; + next = gpr_backoff_step(&backoff, now); + GPR_ASSERT(gpr_time_cmp(gpr_time_from_millis(1023, GPR_TIMESPAN), next) == 0); + now = next; + next = gpr_backoff_step(&backoff, now); + GPR_ASSERT(gpr_time_cmp(gpr_time_from_millis(1536, GPR_TIMESPAN), next) == 0); + now = next; + next = gpr_backoff_step(&backoff, now); + GPR_ASSERT(gpr_time_cmp(gpr_time_from_millis(2049, GPR_TIMESPAN), next) == 0); + now = next; + next = gpr_backoff_step(&backoff, now); + GPR_ASSERT(gpr_time_cmp(gpr_time_from_millis(2562, GPR_TIMESPAN), next) == 0); +} + +int main(int argc, char **argv) { + grpc_test_init(argc, argv); + gpr_time_init(); + + test_constant_backoff(); + test_no_jitter_backoff(); + + return 0; +} diff --git a/test/core/support/env_test.c b/test/core/support/env_test.c index 69aebcc918c..1ab86d6991f 100644 --- a/test/core/support/env_test.c +++ b/test/core/support/env_test.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -37,8 +37,8 @@ #include #include -#include "src/core/support/env.h" -#include "src/core/support/string.h" +#include "src/core/lib/support/env.h" +#include "src/core/lib/support/string.h" #include "test/core/util/test_config.h" #define LOG_TEST_NAME(x) gpr_log(GPR_INFO, "%s", x) diff --git a/test/core/support/load_file_test.c b/test/core/support/load_file_test.c index e6ba6174400..6bc7b900582 100644 --- a/test/core/support/load_file_test.c +++ b/test/core/support/load_file_test.c @@ -38,9 +38,9 @@ #include #include -#include "src/core/support/load_file.h" -#include "src/core/support/tmpfile.h" -#include "src/core/support/string.h" +#include "src/core/lib/support/load_file.h" +#include "src/core/lib/support/string.h" +#include "src/core/lib/support/tmpfile.h" #include "test/core/util/test_config.h" #define LOG_TEST_NAME(x) gpr_log(GPR_INFO, "%s", x) @@ -135,33 +135,33 @@ static void test_load_big_file(void) { gpr_slice slice; int success; char *tmp_name; - unsigned char buffer[124631]; + static const size_t buffer_size = 124631; + unsigned char *buffer = gpr_malloc(buffer_size); unsigned char *current; size_t i; LOG_TEST_NAME("test_load_big_file"); - for (i = 0; i < sizeof(buffer); i++) { - buffer[i] = 42; - } + memset(buffer, 42, buffer_size); tmp = gpr_tmpfile(prefix, &tmp_name); GPR_ASSERT(tmp != NULL); GPR_ASSERT(tmp_name != NULL); - GPR_ASSERT(fwrite(buffer, 1, sizeof(buffer), tmp) == sizeof(buffer)); + GPR_ASSERT(fwrite(buffer, 1, buffer_size, tmp) == buffer_size); fclose(tmp); slice = gpr_load_file(tmp_name, 0, &success); GPR_ASSERT(success == 1); - GPR_ASSERT(GPR_SLICE_LENGTH(slice) == sizeof(buffer)); + GPR_ASSERT(GPR_SLICE_LENGTH(slice) == buffer_size); current = GPR_SLICE_START_PTR(slice); - for (i = 0; i < sizeof(buffer); i++) { + for (i = 0; i < buffer_size; i++) { GPR_ASSERT(current[i] == 42); } remove(tmp_name); gpr_free(tmp_name); gpr_slice_unref(slice); + gpr_free(buffer); } int main(int argc, char **argv) { diff --git a/test/core/support/murmur_hash_test.c b/test/core/support/murmur_hash_test.c index 562b9567e71..c93efb4be4a 100644 --- a/test/core/support/murmur_hash_test.c +++ b/test/core/support/murmur_hash_test.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,7 +31,7 @@ * */ -#include "src/core/support/murmur_hash.h" +#include "src/core/lib/support/murmur_hash.h" #include #include #include "test/core/util/test_config.h" diff --git a/test/core/support/stack_lockfree_test.c b/test/core/support/stack_lockfree_test.c index 0f49e6fa52a..13c8f3c925e 100644 --- a/test/core/support/stack_lockfree_test.c +++ b/test/core/support/stack_lockfree_test.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,7 +31,7 @@ * */ -#include "src/core/support/stack_lockfree.h" +#include "src/core/lib/support/stack_lockfree.h" #include diff --git a/test/core/support/string_test.c b/test/core/support/string_test.c index c1d0f122509..e5e474d43c4 100644 --- a/test/core/support/string_test.c +++ b/test/core/support/string_test.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,7 +31,7 @@ * */ -#include "src/core/support/string.h" +#include "src/core/lib/support/string.h" #include #include diff --git a/test/core/support/sync_test.c b/test/core/support/sync_test.c index d311eb136a6..2121a4c5fa2 100644 --- a/test/core/support/sync_test.c +++ b/test/core/support/sync_test.c @@ -33,13 +33,13 @@ /* Test of gpr synchronization support. */ -#include -#include #include #include #include #include #include +#include +#include #include "test/core/util/test_config.h" /* ==================Example use of interface=================== diff --git a/test/core/support/thd_test.c b/test/core/support/thd_test.c index 0c176da2d3c..771c5104c86 100644 --- a/test/core/support/thd_test.c +++ b/test/core/support/thd_test.c @@ -33,12 +33,12 @@ /* Test of gpr thread support. */ -#include -#include #include #include #include #include +#include +#include #include "test/core/util/test_config.h" #define NUM_THREADS 300 diff --git a/test/core/support/time_test.c b/test/core/support/time_test.c index 6cc3786df12..643e9eada7e 100644 --- a/test/core/support/time_test.c +++ b/test/core/support/time_test.c @@ -33,14 +33,14 @@ /* Test of gpr time support. */ -#include -#include -#include -#include #include #include #include #include +#include +#include +#include +#include #include "test/core/util/test_config.h" static void to_fp(void *arg, const char *buf, size_t len) { diff --git a/test/core/support/tls_test.c b/test/core/support/tls_test.c index c6fb1a4a260..7b73e5beb76 100644 --- a/test/core/support/tls_test.c +++ b/test/core/support/tls_test.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -33,12 +33,12 @@ /* Test of gpr thread local storage support. */ -#include -#include #include #include #include #include +#include +#include #include "test/core/util/test_config.h" #define NUM_THREADS 100 diff --git a/test/core/support/useful_test.c b/test/core/support/useful_test.c index 3665bbf972b..08a8cc90a93 100644 --- a/test/core/support/useful_test.c +++ b/test/core/support/useful_test.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,9 +31,9 @@ * */ -#include -#include #include +#include +#include #include "test/core/util/test_config.h" int main(int argc, char **argv) { diff --git a/test/core/surface/byte_buffer_reader_test.c b/test/core/surface/byte_buffer_reader_test.c index c87fbdc897b..629bce9107c 100644 --- a/test/core/surface/byte_buffer_reader_test.c +++ b/test/core/surface/byte_buffer_reader_test.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,10 +31,10 @@ * */ -#include #include -#include +#include #include +#include #include #include @@ -42,7 +42,7 @@ #include #include "test/core/util/test_config.h" -#include "src/core/compression/message_compress.h" +#include "src/core/lib/compression/message_compress.h" #include diff --git a/test/core/surface/channel_create_test.c b/test/core/surface/channel_create_test.c index 044e766473f..d5d7d1c3117 100644 --- a/test/core/surface/channel_create_test.c +++ b/test/core/surface/channel_create_test.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -33,7 +33,7 @@ #include #include -#include "src/core/client_config/resolver_registry.h" +#include "src/core/lib/client_config/resolver_registry.h" #include "test/core/util/test_config.h" void test_unknown_scheme_target(void) { diff --git a/test/core/surface/completion_queue_test.c b/test/core/surface/completion_queue_test.c index ec49840ba8b..fa9b363a6fa 100644 --- a/test/core/surface/completion_queue_test.c +++ b/test/core/surface/completion_queue_test.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,14 +31,14 @@ * */ -#include "src/core/surface/completion_queue.h" +#include "src/core/lib/surface/completion_queue.h" -#include "src/core/iomgr/iomgr.h" #include #include #include #include #include +#include "src/core/lib/iomgr/iomgr.h" #include "test/core/util/test_config.h" #define LOG_TEST(x) gpr_log(GPR_INFO, "%s", x) diff --git a/test/core/surface/concurrent_connectivity_test.c b/test/core/surface/concurrent_connectivity_test.c index 4d3b7bf22a3..96761b05023 100644 --- a/test/core/surface/concurrent_connectivity_test.c +++ b/test/core/surface/concurrent_connectivity_test.c @@ -40,29 +40,27 @@ #include "test/core/util/test_config.h" #define NUM_THREADS 100 -static grpc_channel* channels[NUM_THREADS]; -static grpc_completion_queue* queues[NUM_THREADS]; +#define NUM_OUTER_LOOPS 10 +#define NUM_INNER_LOOPS 10 +#define DELAY_MILLIS 10 +#define POLL_MILLIS 3000 -void create_loop_destroy(void* actually_an_int) { - int thread_index = (int)(intptr_t)(actually_an_int); - for (int i = 0; i < 10; ++i) { +void create_loop_destroy(void* unused) { + for (int i = 0; i < NUM_OUTER_LOOPS; ++i) { grpc_completion_queue* cq = grpc_completion_queue_create(NULL); grpc_channel* chan = grpc_insecure_channel_create("localhost", NULL, NULL); - channels[thread_index] = chan; - queues[thread_index] = cq; - - for (int j = 0; j < 10; ++j) { - gpr_timespec later_time = GRPC_TIMEOUT_MILLIS_TO_DEADLINE(10); + for (int j = 0; j < NUM_INNER_LOOPS; ++j) { + gpr_timespec later_time = GRPC_TIMEOUT_MILLIS_TO_DEADLINE(DELAY_MILLIS); grpc_connectivity_state state = grpc_channel_check_connectivity_state(chan, 1); grpc_channel_watch_connectivity_state(chan, state, later_time, cq, NULL); - GPR_ASSERT(grpc_completion_queue_next(cq, - GRPC_TIMEOUT_SECONDS_TO_DEADLINE(3), - NULL).type == GRPC_OP_COMPLETE); + gpr_timespec poll_time = GRPC_TIMEOUT_MILLIS_TO_DEADLINE(POLL_MILLIS); + GPR_ASSERT(grpc_completion_queue_next(cq, poll_time, NULL).type == + GRPC_OP_COMPLETE); } - grpc_channel_destroy(channels[thread_index]); - grpc_completion_queue_destroy(queues[thread_index]); + grpc_channel_destroy(chan); + grpc_completion_queue_destroy(cq); } } @@ -70,12 +68,12 @@ int main(int argc, char** argv) { grpc_test_init(argc, argv); grpc_init(); gpr_thd_id threads[NUM_THREADS]; - for (intptr_t i = 0; i < NUM_THREADS; ++i) { + for (size_t i = 0; i < NUM_THREADS; ++i) { gpr_thd_options options = gpr_thd_options_default(); gpr_thd_options_set_joinable(&options); - gpr_thd_new(&threads[i], create_loop_destroy, (void*)i, &options); + gpr_thd_new(&threads[i], create_loop_destroy, NULL, &options); } - for (int i = 0; i < NUM_THREADS; ++i) { + for (size_t i = 0; i < NUM_THREADS; ++i) { gpr_thd_join(threads[i]); } grpc_shutdown(); diff --git a/test/core/surface/lame_client_test.c b/test/core/surface/lame_client_test.c index 79e53cb4222..310aa003432 100644 --- a/test/core/surface/lame_client_test.c +++ b/test/core/surface/lame_client_test.c @@ -36,10 +36,10 @@ #include #include #include -#include "src/core/channel/channel_stack.h" -#include "src/core/iomgr/closure.h" -#include "src/core/surface/channel.h" -#include "src/core/transport/transport.h" +#include "src/core/lib/channel/channel_stack.h" +#include "src/core/lib/iomgr/closure.h" +#include "src/core/lib/surface/channel.h" +#include "src/core/lib/transport/transport.h" #include "test/core/end2end/cq_verifier.h" #include "test/core/util/test_config.h" diff --git a/test/core/surface/secure_channel_create_test.c b/test/core/surface/secure_channel_create_test.c index f3e5fefaf01..5c95390707e 100644 --- a/test/core/surface/secure_channel_create_test.c +++ b/test/core/surface/secure_channel_create_test.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -36,10 +36,10 @@ #include #include #include -#include "src/core/client_config/resolver_registry.h" -#include "src/core/security/credentials.h" -#include "src/core/security/security_connector.h" -#include "src/core/surface/channel.h" +#include "src/core/lib/client_config/resolver_registry.h" +#include "src/core/lib/security/credentials.h" +#include "src/core/lib/security/security_connector.h" +#include "src/core/lib/surface/channel.h" #include "test/core/util/test_config.h" void test_unknown_scheme_target(void) { diff --git a/test/core/surface/server_chttp2_test.c b/test/core/surface/server_chttp2_test.c index 84b345bb504..14eb1ff9dcc 100644 --- a/test/core/surface/server_chttp2_test.c +++ b/test/core/surface/server_chttp2_test.c @@ -37,8 +37,8 @@ #include #include #include -#include "src/core/security/credentials.h" -#include "src/core/tsi/fake_transport_security.h" +#include "src/core/lib/security/credentials.h" +#include "src/core/lib/tsi/fake_transport_security.h" #include "test/core/util/port.h" #include "test/core/util/test_config.h" diff --git a/test/core/transport/chttp2/alpn_test.c b/test/core/transport/chttp2/alpn_test.c index 9a7d5ef0c37..13509c13f7a 100644 --- a/test/core/transport/chttp2/alpn_test.c +++ b/test/core/transport/chttp2/alpn_test.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,7 +31,7 @@ * */ -#include "src/core/transport/chttp2/alpn.h" +#include "src/core/ext/transport/chttp2/transport/alpn.h" #include #include "test/core/util/test_config.h" diff --git a/test/core/transport/chttp2/bin_encoder_test.c b/test/core/transport/chttp2/bin_encoder_test.c index d1838075be0..56b86e037b1 100644 --- a/test/core/transport/chttp2/bin_encoder_test.c +++ b/test/core/transport/chttp2/bin_encoder_test.c @@ -31,7 +31,7 @@ * */ -#include "src/core/transport/chttp2/bin_encoder.h" +#include "src/core/ext/transport/chttp2/transport/bin_encoder.h" #include @@ -39,9 +39,9 @@ * TODO(murgatroid99): Remove this */ #include -#include "src/core/support/string.h" #include #include +#include "src/core/lib/support/string.h" static int all_ok = 1; diff --git a/test/core/transport/chttp2/hpack_encoder_test.c b/test/core/transport/chttp2/hpack_encoder_test.c index 4a9d143640a..818ce09a7c2 100644 --- a/test/core/transport/chttp2/hpack_encoder_test.c +++ b/test/core/transport/chttp2/hpack_encoder_test.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,16 +31,16 @@ * */ -#include "src/core/transport/chttp2/hpack_encoder.h" +#include "src/core/ext/transport/chttp2/transport/hpack_encoder.h" #include -#include "src/core/support/string.h" -#include "src/core/transport/chttp2/hpack_parser.h" -#include "src/core/transport/metadata.h" #include #include #include +#include "src/core/ext/transport/chttp2/transport/hpack_parser.h" +#include "src/core/lib/support/string.h" +#include "src/core/lib/transport/metadata.h" #include "test/core/util/parse_hexstring.h" #include "test/core/util/slice_splitter.h" #include "test/core/util/test_config.h" diff --git a/test/core/transport/chttp2/hpack_parser_test.c b/test/core/transport/chttp2/hpack_parser_test.c index 4456e197afc..1ec47972fdf 100644 --- a/test/core/transport/chttp2/hpack_parser_test.c +++ b/test/core/transport/chttp2/hpack_parser_test.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,7 +31,7 @@ * */ -#include "src/core/transport/chttp2/hpack_parser.h" +#include "src/core/ext/transport/chttp2/transport/hpack_parser.h" #include diff --git a/test/core/transport/chttp2/hpack_table_test.c b/test/core/transport/chttp2/hpack_table_test.c index 3c5f2e4e314..6a2dadf81fd 100644 --- a/test/core/transport/chttp2/hpack_table_test.c +++ b/test/core/transport/chttp2/hpack_table_test.c @@ -31,17 +31,17 @@ * */ -#include "src/core/transport/chttp2/hpack_table.h" +#include "src/core/ext/transport/chttp2/transport/hpack_table.h" -#include #include +#include #include #include #include #include -#include "src/core/support/string.h" +#include "src/core/lib/support/string.h" #include "test/core/util/test_config.h" #define LOG_TEST(x) gpr_log(GPR_INFO, "%s", x) diff --git a/test/core/transport/chttp2/status_conversion_test.c b/test/core/transport/chttp2/status_conversion_test.c index e2729a0a198..8f39ff34c2a 100644 --- a/test/core/transport/chttp2/status_conversion_test.c +++ b/test/core/transport/chttp2/status_conversion_test.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,7 +31,7 @@ * */ -#include "src/core/transport/chttp2/status_conversion.h" +#include "src/core/ext/transport/chttp2/transport/status_conversion.h" #include #include "test/core/util/test_config.h" diff --git a/test/core/transport/chttp2/stream_map_test.c b/test/core/transport/chttp2/stream_map_test.c index 527d2fe0aed..c514814ddc0 100644 --- a/test/core/transport/chttp2/stream_map_test.c +++ b/test/core/transport/chttp2/stream_map_test.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,7 +31,7 @@ * */ -#include "src/core/transport/chttp2/stream_map.h" +#include "src/core/ext/transport/chttp2/transport/stream_map.h" #include #include "test/core/util/test_config.h" diff --git a/test/core/transport/chttp2/timeout_encoding_test.c b/test/core/transport/chttp2/timeout_encoding_test.c index 483e79fb253..7cc698e4aed 100644 --- a/test/core/transport/chttp2/timeout_encoding_test.c +++ b/test/core/transport/chttp2/timeout_encoding_test.c @@ -31,16 +31,16 @@ * */ -#include "src/core/transport/chttp2/timeout_encoding.h" +#include "src/core/ext/transport/chttp2/transport/timeout_encoding.h" #include #include -#include "src/core/support/string.h" #include #include #include #include +#include "src/core/lib/support/string.h" #include "test/core/util/test_config.h" #define LOG_TEST(x) gpr_log(GPR_INFO, "%s", x) @@ -128,11 +128,10 @@ void test_decoding(void) { decode_suite('H', gpr_time_from_hours); assert_decodes_as("1000000000S", gpr_time_from_seconds(1000 * 1000 * 1000, GPR_TIMESPAN)); - assert_decodes_as("1000000000000000000000u", - gpr_inf_future(GPR_CLOCK_REALTIME)); - assert_decodes_as("1000000001S", gpr_inf_future(GPR_CLOCK_REALTIME)); - assert_decodes_as("2000000001S", gpr_inf_future(GPR_CLOCK_REALTIME)); - assert_decodes_as("9999999999S", gpr_inf_future(GPR_CLOCK_REALTIME)); + assert_decodes_as("1000000000000000000000u", gpr_inf_future(GPR_TIMESPAN)); + assert_decodes_as("1000000001S", gpr_inf_future(GPR_TIMESPAN)); + assert_decodes_as("2000000001S", gpr_inf_future(GPR_TIMESPAN)); + assert_decodes_as("9999999999S", gpr_inf_future(GPR_TIMESPAN)); } void test_decoding_fails(void) { diff --git a/test/core/transport/chttp2/varint_test.c b/test/core/transport/chttp2/varint_test.c index f06116a731b..85c6c84f846 100644 --- a/test/core/transport/chttp2/varint_test.c +++ b/test/core/transport/chttp2/varint_test.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,7 +31,7 @@ * */ -#include "src/core/transport/chttp2/varint.h" +#include "src/core/ext/transport/chttp2/transport/varint.h" #include #include diff --git a/test/core/transport/connectivity_state_test.c b/test/core/transport/connectivity_state_test.c index 4b2d0aa44a0..b310d4dc00d 100644 --- a/test/core/transport/connectivity_state_test.c +++ b/test/core/transport/connectivity_state_test.c @@ -31,7 +31,7 @@ * */ -#include "src/core/transport/connectivity_state.h" +#include "src/core/lib/transport/connectivity_state.h" #include diff --git a/test/core/transport/metadata_test.c b/test/core/transport/metadata_test.c index 928fba7f452..836b503858e 100644 --- a/test/core/transport/metadata_test.c +++ b/test/core/transport/metadata_test.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,7 +31,7 @@ * */ -#include "src/core/transport/metadata.h" +#include "src/core/lib/transport/metadata.h" #include @@ -40,8 +40,8 @@ #include #include -#include "src/core/support/string.h" -#include "src/core/transport/chttp2/bin_encoder.h" +#include "src/core/ext/transport/chttp2/transport/bin_encoder.h" +#include "src/core/lib/support/string.h" #include "test/core/util/test_config.h" #define LOG_TEST(x) gpr_log(GPR_INFO, "%s", x) diff --git a/test/core/tsi/transport_security_test.c b/test/core/tsi/transport_security_test.c index 667d3f03497..49b5b8b5f2b 100644 --- a/test/core/tsi/transport_security_test.c +++ b/test/core/tsi/transport_security_test.c @@ -31,7 +31,7 @@ * */ -#include "src/core/tsi/transport_security.h" +#include "src/core/lib/tsi/transport_security.h" #include @@ -42,9 +42,9 @@ #include -#include "src/core/support/string.h" -#include "src/core/tsi/fake_transport_security.h" -#include "src/core/tsi/ssl_transport_security.h" +#include "src/core/lib/support/string.h" +#include "src/core/lib/tsi/fake_transport_security.h" +#include "src/core/lib/tsi/ssl_transport_security.h" #include "test/core/util/test_config.h" typedef struct { diff --git a/test/core/util/port_posix.c b/test/core/util/port_posix.c index c4bd00c1baa..fea7e52b09b 100644 --- a/test/core/util/port_posix.c +++ b/test/core/util/port_posix.c @@ -38,7 +38,6 @@ #include "test/core/util/port.h" #include -#include #include #include #include @@ -50,8 +49,9 @@ #include #include -#include "src/core/httpcli/httpcli.h" -#include "src/core/support/env.h" +#include "src/core/lib/http/httpcli.h" +#include "src/core/lib/support/env.h" +#include "test/core/util/port_server_client.h" #define NUM_RANDOM_PORTS_TO_PICK 100 @@ -68,76 +68,12 @@ static int has_port_been_chosen(int port) { return 0; } -typedef struct freereq { - gpr_mu *mu; - grpc_pollset *pollset; - int done; -} freereq; - -static void destroy_pollset_and_shutdown(grpc_exec_ctx *exec_ctx, void *p, - bool success) { - grpc_pollset_destroy(p); - gpr_free(p); - grpc_shutdown(); -} - -static void freed_port_from_server(grpc_exec_ctx *exec_ctx, void *arg, - const grpc_httpcli_response *response) { - freereq *pr = arg; - gpr_mu_lock(pr->mu); - pr->done = 1; - grpc_pollset_kick(pr->pollset, NULL); - gpr_mu_unlock(pr->mu); -} - -static void free_port_using_server(char *server, int port) { - grpc_httpcli_context context; - grpc_httpcli_request req; - freereq pr; - char *path; - grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_closure *shutdown_closure; - - grpc_init(); - - memset(&pr, 0, sizeof(pr)); - memset(&req, 0, sizeof(req)); - - pr.pollset = gpr_malloc(grpc_pollset_size()); - grpc_pollset_init(pr.pollset, &pr.mu); - shutdown_closure = - grpc_closure_create(destroy_pollset_and_shutdown, pr.pollset); - - req.host = server; - gpr_asprintf(&path, "/drop/%d", port); - req.path = path; - - grpc_httpcli_context_init(&context); - grpc_httpcli_get(&exec_ctx, &context, pr.pollset, &req, - GRPC_TIMEOUT_SECONDS_TO_DEADLINE(10), freed_port_from_server, - &pr); - gpr_mu_lock(pr.mu); - while (!pr.done) { - grpc_pollset_worker *worker = NULL; - grpc_pollset_work(&exec_ctx, pr.pollset, &worker, - gpr_now(GPR_CLOCK_MONOTONIC), - GRPC_TIMEOUT_SECONDS_TO_DEADLINE(1)); - } - gpr_mu_unlock(pr.mu); - - grpc_httpcli_context_destroy(&context); - grpc_exec_ctx_finish(&exec_ctx); - grpc_pollset_shutdown(&exec_ctx, pr.pollset, shutdown_closure); - grpc_exec_ctx_finish(&exec_ctx); - gpr_free(path); -} - -static void free_chosen_ports() { +static void free_chosen_ports(void) { char *env = gpr_getenv("GRPC_TEST_PORT_SERVER"); if (env != NULL) { size_t i; for (i = 0; i < num_chosen_ports; i++) { - free_port_using_server(env, chosen_ports[i]); + grpc_free_port_using_server(env, chosen_ports[i]); } gpr_free(env); } @@ -205,101 +141,6 @@ static int is_port_available(int *port, int is_tcp) { return 1; } -typedef struct portreq { - gpr_mu *mu; - grpc_pollset *pollset; - int port; - int retries; - char *server; - grpc_httpcli_context *ctx; -} portreq; - -static void got_port_from_server(grpc_exec_ctx *exec_ctx, void *arg, - const grpc_httpcli_response *response) { - size_t i; - int port = 0; - portreq *pr = arg; - int failed = 0; - - if (!response) { - failed = 1; - gpr_log(GPR_DEBUG, - "failed port pick from server: retrying [response=NULL]"); - } else if (response->status != 200) { - failed = 1; - gpr_log(GPR_DEBUG, "failed port pick from server: status=%d", - response->status); - } - - if (failed) { - grpc_httpcli_request req; - memset(&req, 0, sizeof(req)); - GPR_ASSERT(pr->retries < 10); - sleep(1 + (unsigned)(pow(1.3, pr->retries) * rand() / RAND_MAX)); - pr->retries++; - req.host = pr->server; - req.path = "/get"; - grpc_httpcli_get(exec_ctx, pr->ctx, pr->pollset, &req, - GRPC_TIMEOUT_SECONDS_TO_DEADLINE(10), got_port_from_server, - pr); - return; - } - GPR_ASSERT(response); - GPR_ASSERT(response->status == 200); - for (i = 0; i < response->body_length; i++) { - GPR_ASSERT(response->body[i] >= '0' && response->body[i] <= '9'); - port = port * 10 + response->body[i] - '0'; - } - GPR_ASSERT(port > 1024); - gpr_mu_lock(pr->mu); - pr->port = port; - grpc_pollset_kick(pr->pollset, NULL); - gpr_mu_unlock(pr->mu); -} - -static int pick_port_using_server(char *server) { - grpc_httpcli_context context; - grpc_httpcli_request req; - portreq pr; - grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_closure *shutdown_closure; - - grpc_init(); - - memset(&pr, 0, sizeof(pr)); - memset(&req, 0, sizeof(req)); - pr.pollset = gpr_malloc(grpc_pollset_size()); - grpc_pollset_init(pr.pollset, &pr.mu); - shutdown_closure = - grpc_closure_create(destroy_pollset_and_shutdown, pr.pollset); - pr.port = -1; - pr.server = server; - pr.ctx = &context; - - req.host = server; - req.path = "/get"; - - grpc_httpcli_context_init(&context); - grpc_httpcli_get(&exec_ctx, &context, pr.pollset, &req, - GRPC_TIMEOUT_SECONDS_TO_DEADLINE(10), got_port_from_server, - &pr); - grpc_exec_ctx_finish(&exec_ctx); - gpr_mu_lock(pr.mu); - while (pr.port == -1) { - grpc_pollset_worker *worker = NULL; - grpc_pollset_work(&exec_ctx, pr.pollset, &worker, - gpr_now(GPR_CLOCK_MONOTONIC), - GRPC_TIMEOUT_SECONDS_TO_DEADLINE(1)); - } - gpr_mu_unlock(pr.mu); - - grpc_httpcli_context_destroy(&context); - grpc_pollset_shutdown(&exec_ctx, pr.pollset, shutdown_closure); - grpc_exec_ctx_finish(&exec_ctx); - - return pr.port; -} - int grpc_pick_unused_port(void) { /* We repeatedly pick a port and then see whether or not it is available for use both as a TCP socket and a UDP socket. First, we @@ -319,7 +160,7 @@ int grpc_pick_unused_port(void) { char *env = gpr_getenv("GRPC_TEST_PORT_SERVER"); if (env) { - int port = pick_port_using_server(env); + int port = grpc_pick_port_using_server(env); gpr_free(env); if (port != 0) { chose_port(port); diff --git a/test/core/util/port_server_client.c b/test/core/util/port_server_client.c new file mode 100644 index 00000000000..ea01b46838c --- /dev/null +++ b/test/core/util/port_server_client.c @@ -0,0 +1,215 @@ +/* + * + * Copyright 2015-2016, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include +#include "test/core/util/test_config.h" + +#ifdef GRPC_TEST_PICK_PORT +#include "test/core/util/port_server_client.h" + +#include +#include + +#include +#include +#include +#include +#include +#include + +#include "src/core/lib/http/httpcli.h" + +typedef struct freereq { + gpr_mu *mu; + grpc_pollset *pollset; + int done; +} freereq; + +static void destroy_pollset_and_shutdown(grpc_exec_ctx *exec_ctx, void *p, + bool success) { + grpc_pollset_destroy(p); + gpr_free(p); + grpc_shutdown(); +} + +static void freed_port_from_server(grpc_exec_ctx *exec_ctx, void *arg, + const grpc_httpcli_response *response) { + freereq *pr = arg; + gpr_mu_lock(pr->mu); + pr->done = 1; + grpc_pollset_kick(pr->pollset, NULL); + gpr_mu_unlock(pr->mu); +} + +void grpc_free_port_using_server(char *server, int port) { + grpc_httpcli_context context; + grpc_httpcli_request req; + freereq pr; + char *path; + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + grpc_closure *shutdown_closure; + + grpc_init(); + + memset(&pr, 0, sizeof(pr)); + memset(&req, 0, sizeof(req)); + + pr.pollset = gpr_malloc(grpc_pollset_size()); + grpc_pollset_init(pr.pollset, &pr.mu); + shutdown_closure = + grpc_closure_create(destroy_pollset_and_shutdown, pr.pollset); + + req.host = server; + gpr_asprintf(&path, "/drop/%d", port); + req.http.path = path; + + grpc_httpcli_context_init(&context); + grpc_httpcli_get(&exec_ctx, &context, pr.pollset, &req, + GRPC_TIMEOUT_SECONDS_TO_DEADLINE(10), freed_port_from_server, + &pr); + gpr_mu_lock(pr.mu); + while (!pr.done) { + grpc_pollset_worker *worker = NULL; + grpc_pollset_work(&exec_ctx, pr.pollset, &worker, + gpr_now(GPR_CLOCK_MONOTONIC), + GRPC_TIMEOUT_SECONDS_TO_DEADLINE(1)); + } + gpr_mu_unlock(pr.mu); + + grpc_httpcli_context_destroy(&context); + grpc_exec_ctx_finish(&exec_ctx); + grpc_pollset_shutdown(&exec_ctx, pr.pollset, shutdown_closure); + grpc_exec_ctx_finish(&exec_ctx); + gpr_free(path); +} + +typedef struct portreq { + gpr_mu *mu; + grpc_pollset *pollset; + int port; + int retries; + char *server; + grpc_httpcli_context *ctx; +} portreq; + +static void got_port_from_server(grpc_exec_ctx *exec_ctx, void *arg, + const grpc_httpcli_response *response) { + size_t i; + int port = 0; + portreq *pr = arg; + int failed = 0; + + if (!response) { + failed = 1; + gpr_log(GPR_DEBUG, + "failed port pick from server: retrying [response=NULL]"); + } else if (response->status != 200) { + failed = 1; + gpr_log(GPR_DEBUG, "failed port pick from server: status=%d", + response->status); + } + + if (failed) { + grpc_httpcli_request req; + memset(&req, 0, sizeof(req)); + GPR_ASSERT(pr->retries < 10); + gpr_sleep_until(gpr_time_add( + gpr_now(GPR_CLOCK_REALTIME), + gpr_time_from_millis( + (int64_t)(1000.0 * (1 + pow(1.3, pr->retries) * rand() / RAND_MAX)), + GPR_TIMESPAN))); + pr->retries++; + req.host = pr->server; + req.http.path = "/get"; + grpc_httpcli_get(exec_ctx, pr->ctx, pr->pollset, &req, + GRPC_TIMEOUT_SECONDS_TO_DEADLINE(10), got_port_from_server, + pr); + return; + } + GPR_ASSERT(response); + GPR_ASSERT(response->status == 200); + for (i = 0; i < response->body_length; i++) { + GPR_ASSERT(response->body[i] >= '0' && response->body[i] <= '9'); + port = port * 10 + response->body[i] - '0'; + } + GPR_ASSERT(port > 1024); + gpr_mu_lock(pr->mu); + pr->port = port; + grpc_pollset_kick(pr->pollset, NULL); + gpr_mu_unlock(pr->mu); +} + +int grpc_pick_port_using_server(char *server) { + grpc_httpcli_context context; + grpc_httpcli_request req; + portreq pr; + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + grpc_closure *shutdown_closure; + + grpc_init(); + + memset(&pr, 0, sizeof(pr)); + memset(&req, 0, sizeof(req)); + pr.pollset = gpr_malloc(grpc_pollset_size()); + grpc_pollset_init(pr.pollset, &pr.mu); + shutdown_closure = + grpc_closure_create(destroy_pollset_and_shutdown, pr.pollset); + pr.port = -1; + pr.server = server; + pr.ctx = &context; + + req.host = server; + req.http.path = "/get"; + + grpc_httpcli_context_init(&context); + grpc_httpcli_get(&exec_ctx, &context, pr.pollset, &req, + GRPC_TIMEOUT_SECONDS_TO_DEADLINE(10), got_port_from_server, + &pr); + grpc_exec_ctx_finish(&exec_ctx); + gpr_mu_lock(pr.mu); + while (pr.port == -1) { + grpc_pollset_worker *worker = NULL; + grpc_pollset_work(&exec_ctx, pr.pollset, &worker, + gpr_now(GPR_CLOCK_MONOTONIC), + GRPC_TIMEOUT_SECONDS_TO_DEADLINE(1)); + } + gpr_mu_unlock(pr.mu); + + grpc_httpcli_context_destroy(&context); + grpc_pollset_shutdown(&exec_ctx, pr.pollset, shutdown_closure); + grpc_exec_ctx_finish(&exec_ctx); + + return pr.port; +} + +#endif // GRPC_TEST_PICK_PORT diff --git a/test/core/util/port_server_client.h b/test/core/util/port_server_client.h new file mode 100644 index 00000000000..fc209cde5b0 --- /dev/null +++ b/test/core/util/port_server_client.h @@ -0,0 +1,42 @@ +/* + * + * Copyright 2015-2016, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#ifndef GRPC_TEST_CORE_UTIL_PORT_SERVER_CLIENT_H +#define GRPC_TEST_CORE_UTIL_PORT_SERVER_CLIENT_H + +// C interface to port_server.py + +int grpc_pick_port_using_server(char *server); +void grpc_free_port_using_server(char *server, int port); + +#endif // GRPC_TEST_CORE_UTIL_PORT_SERVER_CLIENT_H diff --git a/test/core/util/port_windows.c b/test/core/util/port_windows.c index 3b20aeb7182..081782d2951 100644 --- a/test/core/util/port_windows.c +++ b/test/core/util/port_windows.c @@ -37,18 +37,19 @@ #include "test/core/util/port.h" +#include #include #include -#include #include #include #include #include -#include "src/core/support/env.h" -#include "src/core/httpcli/httpcli.h" -#include "src/core/iomgr/sockaddr_utils.h" +#include "src/core/lib/http/httpcli.h" +#include "src/core/lib/iomgr/sockaddr_utils.h" +#include "src/core/lib/support/env.h" +#include "test/core/util/port_server_client.h" #define NUM_RANDOM_PORTS_TO_PICK 100 @@ -65,7 +66,18 @@ static int has_port_been_chosen(int port) { return 0; } -static void free_chosen_ports(void) { gpr_free(chosen_ports); } +static void free_chosen_ports(void) { + char *env = gpr_getenv("GRPC_TEST_PORT_SERVER"); + if (env != NULL) { + size_t i; + for (i = 0; i < num_chosen_ports; i++) { + grpc_free_port_using_server(env, chosen_ports[i]); + } + gpr_free(env); + } + + gpr_free(chosen_ports); +} static void chose_port(int port) { if (chosen_ports == NULL) { @@ -128,80 +140,6 @@ static int is_port_available(int *port, int is_tcp) { return 1; } -typedef struct portreq { - grpc_pollset *pollset; - gpr_mu *mu; - int port; -} portreq; - -static void got_port_from_server(grpc_exec_ctx *exec_ctx, void *arg, - const grpc_httpcli_response *response) { - size_t i; - int port = 0; - portreq *pr = arg; - GPR_ASSERT(response); - GPR_ASSERT(response->status == 200); - for (i = 0; i < response->body_length; i++) { - GPR_ASSERT(response->body[i] >= '0' && response->body[i] <= '9'); - port = port * 10 + response->body[i] - '0'; - } - GPR_ASSERT(port > 1024); - gpr_mu_lock(pr->mu); - pr->port = port; - grpc_pollset_kick(pr->pollset, NULL); - gpr_mu_unlock(pr->mu); -} - -static void destroy_pollset_and_shutdown(grpc_exec_ctx *exec_ctx, void *p, - bool success) { - grpc_pollset_destroy(p); - grpc_shutdown(); -} - -static int pick_port_using_server(char *server) { - grpc_httpcli_context context; - grpc_httpcli_request req; - portreq pr; - grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_closure destroy_pollset_closure; - - grpc_init(); - - memset(&pr, 0, sizeof(pr)); - memset(&req, 0, sizeof(req)); - pr.pollset = gpr_malloc(grpc_pollset_size()); - grpc_pollset_init(pr.pollset, &pr.mu); - pr.port = -1; - - req.host = server; - req.path = "/get"; - - grpc_httpcli_context_init(&context); - grpc_httpcli_get(&exec_ctx, &context, pr.pollset, &req, - GRPC_TIMEOUT_SECONDS_TO_DEADLINE(10), got_port_from_server, - &pr); - gpr_mu_lock(pr.mu); - while (pr.port == -1) { - grpc_pollset_worker *worker = NULL; - grpc_pollset_work(&exec_ctx, pr.pollset, &worker, - gpr_now(GPR_CLOCK_MONOTONIC), - GRPC_TIMEOUT_SECONDS_TO_DEADLINE(1)); - gpr_mu_unlock(pr.mu); - grpc_exec_ctx_flush(&exec_ctx); - gpr_mu_lock(pr.mu); - } - gpr_mu_unlock(pr.mu); - - grpc_httpcli_context_destroy(&context); - grpc_closure_init(&destroy_pollset_closure, destroy_pollset_and_shutdown, - &pr.pollset); - grpc_pollset_shutdown(&exec_ctx, pr.pollset, &destroy_pollset_closure); - gpr_free(pr.pollset); - - grpc_exec_ctx_finish(&exec_ctx); - return pr.port; -} - int grpc_pick_unused_port(void) { /* We repeatedly pick a port and then see whether or not it is available for use both as a TCP socket and a UDP socket. First, we @@ -221,7 +159,7 @@ int grpc_pick_unused_port(void) { char *env = gpr_getenv("GRPC_TEST_PORT_SERVER"); if (env) { - int port = pick_port_using_server(env); + int port = grpc_pick_port_using_server(env); gpr_free(env); if (port != 0) { return port; diff --git a/test/core/util/reconnect_server.c b/test/core/util/reconnect_server.c index 57225aa8a33..0e7a4865266 100644 --- a/test/core/util/reconnect_server.c +++ b/test/core/util/reconnect_server.c @@ -40,9 +40,9 @@ #include #include #include -#include "src/core/iomgr/endpoint.h" -#include "src/core/iomgr/sockaddr.h" -#include "src/core/iomgr/tcp_server.h" +#include "src/core/lib/iomgr/endpoint.h" +#include "src/core/lib/iomgr/sockaddr.h" +#include "src/core/lib/iomgr/tcp_server.h" #include "test/core/util/port.h" #include "test/core/util/test_tcp_server.h" diff --git a/test/core/util/test_config.c b/test/core/util/test_config.c index 14bfc957cbd..7ffaa6fe27d 100644 --- a/test/core/util/test_config.c +++ b/test/core/util/test_config.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -33,11 +33,13 @@ #include "test/core/util/test_config.h" -#include #include -#include "src/core/support/string.h" -#include +#include #include +#include +#include +#include +#include "src/core/lib/support/string.h" double g_fixture_slowdown_factor = 1.0; @@ -52,14 +54,127 @@ static unsigned seed(void) { return _getpid(); } #endif #if GPR_WINDOWS_CRASH_HANDLER -LONG crash_handler(struct _EXCEPTION_POINTERS *ex_info) { - gpr_log(GPR_DEBUG, "Exception handler called, dumping information"); - while (ex_info->ExceptionRecord) { - DWORD code = ex_info->ExceptionRecord->ExceptionCode; - DWORD flgs = ex_info->ExceptionRecord->ExceptionFlags; - PVOID addr = ex_info->ExceptionRecord->ExceptionAddress; - gpr_log("code: %x - flags: %d - address: %p", code, flgs, addr); - ex_info->ExceptionRecord = ex_info->ExceptionRecord->ExceptionRecord; +#include + +#include + +// disable warning 4091 - dbghelp.h is broken for msvc2015 +#pragma warning(disable : 4091) +#define DBGHELP_TRANSLATE_TCHAR +#include + +#ifdef _MSC_VER +#pragma comment(lib, "dbghelp.lib") +#endif + +static void print_current_stack() { + typedef USHORT(WINAPI * CaptureStackBackTraceType)( + __in ULONG, __in ULONG, __out PVOID *, __out_opt PULONG); + CaptureStackBackTraceType func = (CaptureStackBackTraceType)(GetProcAddress( + LoadLibrary(_T("kernel32.dll")), "RtlCaptureStackBackTrace")); + + if (func == NULL) return; // WOE 29.SEP.2010 + +// Quote from Microsoft Documentation: +// ## Windows Server 2003 and Windows XP: +// ## The sum of the FramesToSkip and FramesToCapture parameters must be less +// than 63. +#define MAX_CALLERS 62 + + void *callers_stack[MAX_CALLERS]; + unsigned short frames; + SYMBOL_INFOW *symbol; + HANDLE process; + process = GetCurrentProcess(); + SymInitialize(process, NULL, TRUE); + frames = (func)(0, MAX_CALLERS, callers_stack, NULL); + symbol = + (SYMBOL_INFOW *)calloc(sizeof(SYMBOL_INFOW) + 256 * sizeof(wchar_t), 1); + symbol->MaxNameLen = 255; + symbol->SizeOfStruct = sizeof(SYMBOL_INFOW); + + const unsigned short MAX_CALLERS_SHOWN = 32; + frames = frames < MAX_CALLERS_SHOWN ? frames : MAX_CALLERS_SHOWN; + for (unsigned int i = 0; i < frames; i++) { + SymFromAddrW(process, (DWORD64)(callers_stack[i]), 0, symbol); + fwprintf(stderr, L"*** %d: %016I64X %ls - %016I64X\n", i, + (DWORD64)callers_stack[i], symbol->Name, (DWORD64)symbol->Address); + fflush(stderr); + } + + free(symbol); +} + +static void print_stack_from_context(CONTEXT c) { + STACKFRAME s; // in/out stackframe + memset(&s, 0, sizeof(s)); + DWORD imageType; +#ifdef _M_IX86 + // normally, call ImageNtHeader() and use machine info from PE header + imageType = IMAGE_FILE_MACHINE_I386; + s.AddrPC.Offset = c.Eip; + s.AddrPC.Mode = AddrModeFlat; + s.AddrFrame.Offset = c.Ebp; + s.AddrFrame.Mode = AddrModeFlat; + s.AddrStack.Offset = c.Esp; + s.AddrStack.Mode = AddrModeFlat; +#elif _M_X64 + imageType = IMAGE_FILE_MACHINE_AMD64; + s.AddrPC.Offset = c.Rip; + s.AddrPC.Mode = AddrModeFlat; + s.AddrFrame.Offset = c.Rsp; + s.AddrFrame.Mode = AddrModeFlat; + s.AddrStack.Offset = c.Rsp; + s.AddrStack.Mode = AddrModeFlat; +#elif _M_IA64 + imageType = IMAGE_FILE_MACHINE_IA64; + s.AddrPC.Offset = c.StIIP; + s.AddrPC.Mode = AddrModeFlat; + s.AddrFrame.Offset = c.IntSp; + s.AddrFrame.Mode = AddrModeFlat; + s.AddrBStore.Offset = c.RsBSP; + s.AddrBStore.Mode = AddrModeFlat; + s.AddrStack.Offset = c.IntSp; + s.AddrStack.Mode = AddrModeFlat; +#else +#error "Platform not supported!" +#endif + + HANDLE process = GetCurrentProcess(); + HANDLE thread = GetCurrentThread(); + + SYMBOL_INFOW *symbol = + (SYMBOL_INFOW *)calloc(sizeof(SYMBOL_INFOW) + 256 * sizeof(wchar_t), 1); + symbol->MaxNameLen = 255; + symbol->SizeOfStruct = sizeof(SYMBOL_INFOW); + + while (StackWalk(imageType, process, thread, &s, &c, 0, + SymFunctionTableAccess, SymGetModuleBase, 0)) { + BOOL has_symbol = + SymFromAddrW(process, (DWORD64)(s.AddrPC.Offset), 0, symbol); + fwprintf( + stderr, L"*** %016I64X %ls - %016I64X\n", (DWORD64)(s.AddrPC.Offset), + has_symbol ? symbol->Name : L"<>", (DWORD64)symbol->Address); + fflush(stderr); + } + + free(symbol); +} + +static LONG crash_handler(struct _EXCEPTION_POINTERS *ex_info) { + fprintf(stderr, "Exception handler called, dumping information\n"); + bool try_to_print_stack = true; + PEXCEPTION_RECORD exrec = ex_info->ExceptionRecord; + while (exrec) { + DWORD code = exrec->ExceptionCode; + DWORD flgs = exrec->ExceptionFlags; + PVOID addr = exrec->ExceptionAddress; + if (code == EXCEPTION_STACK_OVERFLOW) try_to_print_stack = false; + fprintf(stderr, "code: %x - flags: %d - address: %p\n", code, flgs, addr); + exrec = exrec->ExceptionRecord; + } + if (try_to_print_stack) { + print_stack_from_context(*ex_info->ContextRecord); } if (IsDebuggerPresent()) { __debugbreak(); @@ -69,8 +184,9 @@ LONG crash_handler(struct _EXCEPTION_POINTERS *ex_info) { return EXCEPTION_EXECUTE_HANDLER; } -void abort_handler(int sig) { - gpr_log(GPR_DEBUG, "Abort handler called."); +static void abort_handler(int sig) { + fprintf(stderr, "Abort handler called.\n"); + print_current_stack(NULL); if (IsDebuggerPresent()) { __debugbreak(); } else { @@ -79,17 +195,20 @@ void abort_handler(int sig) { } static void install_crash_handler() { + if (!SymInitialize(GetCurrentProcess(), NULL, TRUE)) { + fprintf(stderr, "SymInitialize failed: %d\n", GetLastError()); + } SetUnhandledExceptionFilter((LPTOP_LEVEL_EXCEPTION_FILTER)crash_handler); _set_abort_behavior(0, _WRITE_ABORT_MSG); _set_abort_behavior(0, _CALL_REPORTFAULT); signal(SIGABRT, abort_handler); } #elif GPR_POSIX_CRASH_HANDLER +#include #include +#include #include #include -#include -#include static char g_alt_stack[MINSIGSTKSZ]; diff --git a/test/core/util/test_tcp_server.c b/test/core/util/test_tcp_server.c index ab379441d8c..7703ec00392 100644 --- a/test/core/util/test_tcp_server.c +++ b/test/core/util/test_tcp_server.c @@ -40,9 +40,9 @@ #include #include #include -#include "src/core/iomgr/endpoint.h" -#include "src/core/iomgr/sockaddr.h" -#include "src/core/iomgr/tcp_server.h" +#include "src/core/lib/iomgr/endpoint.h" +#include "src/core/lib/iomgr/sockaddr.h" +#include "src/core/lib/iomgr/tcp_server.h" #include "test/core/util/port.h" static void on_server_destroyed(grpc_exec_ctx *exec_ctx, void *data, diff --git a/test/core/util/test_tcp_server.h b/test/core/util/test_tcp_server.h index 15fcb4fb873..7d1025f17a1 100644 --- a/test/core/util/test_tcp_server.h +++ b/test/core/util/test_tcp_server.h @@ -35,7 +35,7 @@ #define GRPC_TEST_CORE_UTIL_TEST_TCP_SERVER_H #include -#include "src/core/iomgr/tcp_server.h" +#include "src/core/lib/iomgr/tcp_server.h" typedef struct test_tcp_server { grpc_tcp_server *tcp_server; diff --git a/src/cpp/codegen/grpc_library.cc b/test/cpp/codegen/codegen_test.cc similarity index 87% rename from src/cpp/codegen/grpc_library.cc rename to test/cpp/codegen/codegen_test.cc index 48acec3f3d1..735755a5d06 100644 --- a/src/cpp/codegen/grpc_library.cc +++ b/test/cpp/codegen/codegen_test.cc @@ -31,10 +31,19 @@ * */ -#include +#include namespace grpc { +namespace { -GrpcLibraryInterface *g_glip = nullptr; +class CodegenTest : public ::testing::Test {}; +TEST_F(CodegenTest, Build) {} + +} // namespace } // namespace grpc + +int main(int argc, char** argv) { + ::testing::InitGoogleTest(&argc, argv); + return RUN_ALL_TESTS(); +} diff --git a/test/cpp/common/auth_property_iterator_test.cc b/test/cpp/common/auth_property_iterator_test.cc index a629ff5a904..4b5cf02c696 100644 --- a/test/cpp/common/auth_property_iterator_test.cc +++ b/test/cpp/common/auth_property_iterator_test.cc @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,14 +31,14 @@ * */ -#include #include +#include #include #include "src/cpp/common/secure_auth_context.h" #include "test/cpp/util/string_ref_helper.h" extern "C" { -#include "src/core/security/security_context.h" +#include "src/core/lib/security/security_context.h" } using ::grpc::testing::ToString; diff --git a/test/cpp/common/secure_auth_context_test.cc b/test/cpp/common/secure_auth_context_test.cc index 11de646999f..c421910cba4 100644 --- a/test/cpp/common/secure_auth_context_test.cc +++ b/test/cpp/common/secure_auth_context_test.cc @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,14 +31,14 @@ * */ -#include +#include "src/cpp/common/secure_auth_context.h" #include +#include #include -#include "src/cpp/common/secure_auth_context.h" #include "test/cpp/util/string_ref_helper.h" extern "C" { -#include "src/core/security/security_context.h" +#include "src/core/lib/security/security_context.h" } using grpc::testing::ToString; diff --git a/test/cpp/end2end/async_end2end_test.cc b/test/cpp/end2end/async_end2end_test.cc index dc8c2bb6e5b..d8aa4c0137e 100644 --- a/test/cpp/end2end/async_end2end_test.cc +++ b/test/cpp/end2end/async_end2end_test.cc @@ -53,7 +53,7 @@ #include "test/cpp/util/string_ref_helper.h" #ifdef GPR_POSIX_SOCKET -#include "src/core/iomgr/pollset_posix.h" +#include "src/core/lib/iomgr/pollset_posix.h" #endif using grpc::testing::EchoRequest; diff --git a/test/cpp/end2end/end2end_test.cc b/test/cpp/end2end/end2end_test.cc index 47598183220..ff388c03415 100644 --- a/test/cpp/end2end/end2end_test.cc +++ b/test/cpp/end2end/end2end_test.cc @@ -48,7 +48,7 @@ #include #include -#include "src/core/security/credentials.h" +#include "src/core/lib/security/credentials.h" #include "src/proto/grpc/testing/duplicate/echo_duplicate.grpc.pb.h" #include "src/proto/grpc/testing/echo.grpc.pb.h" #include "test/core/util/port.h" diff --git a/test/cpp/end2end/generic_end2end_test.cc b/test/cpp/end2end/generic_end2end_test.cc index 4e6d50ea80f..8dad1c2005f 100644 --- a/test/cpp/end2end/generic_end2end_test.cc +++ b/test/cpp/end2end/generic_end2end_test.cc @@ -135,6 +135,8 @@ class GenericEnd2endTest : public ::testing::Test { std::unique_ptr send_buffer = SerializeToByteBuffer(&send_request); call->Write(*send_buffer, tag(2)); + // Send ByteBuffer can be destroyed after calling Write. + send_buffer.reset(); client_ok(2); call->WritesDone(tag(3)); client_ok(3); @@ -154,6 +156,7 @@ class GenericEnd2endTest : public ::testing::Test { send_response.set_message(recv_request.message()); send_buffer = SerializeToByteBuffer(&send_response); stream.Write(*send_buffer, tag(6)); + send_buffer.reset(); server_ok(6); stream.Finish(Status::OK, tag(7)); @@ -223,6 +226,7 @@ TEST_F(GenericEnd2endTest, SimpleBidiStreaming) { std::unique_ptr send_buffer = SerializeToByteBuffer(&send_request); cli_stream->Write(*send_buffer, tag(3)); + send_buffer.reset(); client_ok(3); ByteBuffer recv_buffer; @@ -234,6 +238,7 @@ TEST_F(GenericEnd2endTest, SimpleBidiStreaming) { send_response.set_message(recv_request.message()); send_buffer = SerializeToByteBuffer(&send_response); srv_stream.Write(*send_buffer, tag(5)); + send_buffer.reset(); server_ok(5); cli_stream->Read(&recv_buffer, tag(6)); diff --git a/test/cpp/end2end/hybrid_end2end_test.cc b/test/cpp/end2end/hybrid_end2end_test.cc index c72e20628f9..02043a89d3a 100644 --- a/test/cpp/end2end/hybrid_end2end_test.cc +++ b/test/cpp/end2end/hybrid_end2end_test.cc @@ -356,7 +356,8 @@ TEST_F(HybridEnd2endTest, AsyncEcho) { TEST_F(HybridEnd2endTest, AsyncEchoRequestStream) { EchoTestService::WithAsyncMethod_RequestStream< - EchoTestService::WithAsyncMethod_Echo > service; + EchoTestService::WithAsyncMethod_Echo > + service; SetUpServer(&service, nullptr, nullptr); ResetStub(); std::thread echo_handler_thread( @@ -436,7 +437,8 @@ TEST_F(HybridEnd2endTest, GenericEcho) { TEST_F(HybridEnd2endTest, GenericEchoAsyncRequestStream) { EchoTestService::WithAsyncMethod_RequestStream< - EchoTestService::WithGenericMethod_Echo > service; + EchoTestService::WithGenericMethod_Echo > + service; AsyncGenericService generic_service; SetUpServer(&service, nullptr, &generic_service); ResetStub(); @@ -453,7 +455,8 @@ TEST_F(HybridEnd2endTest, GenericEchoAsyncRequestStream) { // Add a second service with one sync method. TEST_F(HybridEnd2endTest, GenericEchoAsyncRequestStream_SyncDupService) { EchoTestService::WithAsyncMethod_RequestStream< - EchoTestService::WithGenericMethod_Echo > service; + EchoTestService::WithGenericMethod_Echo > + service; AsyncGenericService generic_service; TestServiceImplDupPkg dup_service; SetUpServer(&service, &dup_service, &generic_service); @@ -472,7 +475,8 @@ TEST_F(HybridEnd2endTest, GenericEchoAsyncRequestStream_SyncDupService) { // Add a second service with one async method. TEST_F(HybridEnd2endTest, GenericEchoAsyncRequestStream_AsyncDupService) { EchoTestService::WithAsyncMethod_RequestStream< - EchoTestService::WithGenericMethod_Echo > service; + EchoTestService::WithGenericMethod_Echo > + service; AsyncGenericService generic_service; duplicate::EchoTestService::AsyncService dup_service; SetUpServer(&service, &dup_service, &generic_service); diff --git a/test/cpp/end2end/shutdown_test.cc b/test/cpp/end2end/shutdown_test.cc index dbbda3ac516..62bb6b1b781 100644 --- a/test/cpp/end2end/shutdown_test.cc +++ b/test/cpp/end2end/shutdown_test.cc @@ -43,7 +43,7 @@ #include #include -#include "src/core/support/env.h" +#include "src/core/lib/support/env.h" #include "src/proto/grpc/testing/echo.grpc.pb.h" #include "test/core/util/port.h" #include "test/core/util/test_config.h" diff --git a/test/cpp/end2end/test_service_impl.cc b/test/cpp/end2end/test_service_impl.cc index fe29c4afe9e..2f5dd6d49e8 100644 --- a/test/cpp/end2end/test_service_impl.cc +++ b/test/cpp/end2end/test_service_impl.cc @@ -129,10 +129,9 @@ Status TestServiceImpl::Echo(ServerContext* context, const EchoRequest* request, if (request->has_param() && request->param().echo_metadata()) { const std::multimap& client_metadata = context->client_metadata(); - for ( - std::multimap::const_iterator iter = - client_metadata.begin(); - iter != client_metadata.end(); ++iter) { + for (std::multimap::const_iterator + iter = client_metadata.begin(); + iter != client_metadata.end(); ++iter) { context->AddTrailingMetadata(ToString(iter->first), ToString(iter->second)); } diff --git a/test/cpp/end2end/thread_stress_test.cc b/test/cpp/end2end/thread_stress_test.cc index e246c0b0e2f..8760b8d28e3 100644 --- a/test/cpp/end2end/thread_stress_test.cc +++ b/test/cpp/end2end/thread_stress_test.cc @@ -45,7 +45,7 @@ #include #include -#include "src/core/surface/api_trace.h" +#include "src/core/lib/surface/api_trace.h" #include "src/proto/grpc/testing/duplicate/echo_duplicate.grpc.pb.h" #include "src/proto/grpc/testing/echo.grpc.pb.h" #include "test/core/util/port.h" @@ -318,7 +318,7 @@ class AsyncClientEnd2endTest : public ::testing::Test { TEST_F(AsyncClientEnd2endTest, ThreadStress) { common_.ResetStub(); - std::vector send_threads, completion_threads; + std::vector send_threads, completion_threads; for (int i = 0; i < kNumAsyncReceiveThreads; ++i) { completion_threads.push_back(new std::thread( &AsyncClientEnd2endTest_ThreadStress_Test::AsyncCompleteRpc, this)); diff --git a/test/cpp/end2end/zookeeper_test.cc b/test/cpp/end2end/zookeeper_test.cc index bbf1b0edc12..f1b6ac24798 100644 --- a/test/cpp/end2end/zookeeper_test.cc +++ b/test/cpp/end2end/zookeeper_test.cc @@ -42,7 +42,7 @@ #include #include -#include "src/core/support/env.h" +#include "src/core/lib/support/env.h" #include "src/proto/grpc/testing/echo.grpc.pb.h" #include "test/core/util/port.h" #include "test/core/util/test_config.h" diff --git a/test/cpp/grpclb/grpclb_api_test.cc b/test/cpp/grpclb/grpclb_api_test.cc index bd4885fb4cd..bc8219c1c7a 100644 --- a/test/cpp/grpclb/grpclb_api_test.cc +++ b/test/cpp/grpclb/grpclb_api_test.cc @@ -34,7 +34,7 @@ #include #include -#include "src/core/client_config/lb_policies/load_balancer_api.h" +#include "src/core/lib/client_config/lb_policies/load_balancer_api.h" #include "src/proto/grpc/lb/v0/load_balancer.pb.h" // C++ version namespace grpc { diff --git a/test/cpp/interop/client.cc b/test/cpp/interop/client.cc index 788adefd24b..8b237fe75fb 100644 --- a/test/cpp/interop/client.cc +++ b/test/cpp/interop/client.cc @@ -35,11 +35,11 @@ #include -#include -#include #include #include #include +#include +#include #include "test/cpp/interop/client_helper.h" #include "test/cpp/interop/interop_client.h" diff --git a/test/cpp/interop/client_helper.cc b/test/cpp/interop/client_helper.cc index 5caf0f2d1d0..029b9678012 100644 --- a/test/cpp/interop/client_helper.cc +++ b/test/cpp/interop/client_helper.cc @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -39,13 +39,13 @@ #include #include -#include -#include -#include #include #include #include #include +#include +#include +#include #include "src/cpp/client/secure_credentials.h" #include "test/core/security/oauth2_utils.h" diff --git a/test/cpp/interop/client_helper.h b/test/cpp/interop/client_helper.h index 0f77474139e..0790464449f 100644 --- a/test/cpp/interop/client_helper.h +++ b/test/cpp/interop/client_helper.h @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -38,7 +38,7 @@ #include -#include "src/core/surface/call_test_only.h" +#include "src/core/lib/surface/call_test_only.h" namespace grpc { namespace testing { diff --git a/test/cpp/interop/interop_client.cc b/test/cpp/interop/interop_client.cc index 46f6fdac409..2fcd9f39514 100644 --- a/test/cpp/interop/interop_client.cc +++ b/test/cpp/interop/interop_client.cc @@ -46,10 +46,10 @@ #include #include -#include "src/core/transport/byte_stream.h" +#include "src/core/lib/transport/byte_stream.h" #include "src/proto/grpc/testing/empty.grpc.pb.h" -#include "src/proto/grpc/testing/test.grpc.pb.h" #include "src/proto/grpc/testing/messages.grpc.pb.h" +#include "src/proto/grpc/testing/test.grpc.pb.h" #include "test/cpp/interop/client_helper.h" namespace grpc { diff --git a/test/cpp/interop/interop_client.h b/test/cpp/interop/interop_client.h index 3f57f3c7336..e6706b5713d 100644 --- a/test/cpp/interop/interop_client.h +++ b/test/cpp/interop/interop_client.h @@ -36,8 +36,8 @@ #include -#include #include +#include #include "src/proto/grpc/testing/messages.grpc.pb.h" #include "src/proto/grpc/testing/test.grpc.pb.h" diff --git a/test/cpp/interop/interop_test.cc b/test/cpp/interop/interop_test.cc index faf66989033..f1fb3c96759 100644 --- a/test/cpp/interop/interop_test.cc +++ b/test/cpp/interop/interop_test.cc @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -35,14 +35,14 @@ #define _POSIX_SOURCE #endif -#include #include -#include -#include #include +#include #include +#include #include #include +#include #include #include @@ -51,8 +51,8 @@ #include "test/core/util/port.h" extern "C" { -#include "src/core/iomgr/socket_utils_posix.h" -#include "src/core/support/string.h" +#include "src/core/lib/iomgr/socket_utils_posix.h" +#include "src/core/lib/support/string.h" } int test_client(const char* root, const char* host, int port) { diff --git a/test/cpp/interop/reconnect_interop_client.cc b/test/cpp/interop/reconnect_interop_client.cc index 79a60cc8602..c668edaceb0 100644 --- a/test/cpp/interop/reconnect_interop_client.cc +++ b/test/cpp/interop/reconnect_interop_client.cc @@ -34,16 +34,16 @@ #include #include -#include -#include #include #include #include -#include "test/cpp/util/create_test_channel.h" -#include "test/cpp/util/test_config.h" -#include "src/proto/grpc/testing/test.grpc.pb.h" +#include +#include #include "src/proto/grpc/testing/empty.grpc.pb.h" #include "src/proto/grpc/testing/messages.grpc.pb.h" +#include "src/proto/grpc/testing/test.grpc.pb.h" +#include "test/cpp/util/create_test_channel.h" +#include "test/cpp/util/test_config.h" DEFINE_int32(server_control_port, 0, "Server port for control rpcs."); DEFINE_int32(server_retry_port, 0, "Server port for testing reconnection."); diff --git a/test/cpp/interop/reconnect_interop_server.cc b/test/cpp/interop/reconnect_interop_server.cc index 3602b8c2b05..1f9147d0efa 100644 --- a/test/cpp/interop/reconnect_interop_server.cc +++ b/test/cpp/interop/reconnect_interop_server.cc @@ -31,6 +31,8 @@ * */ +// Test description at doc/connection-backoff-interop-test-description.md + #include #include @@ -40,17 +42,17 @@ #include #include -#include -#include #include #include #include +#include +#include -#include "test/core/util/reconnect_server.h" -#include "test/cpp/util/test_config.h" -#include "src/proto/grpc/testing/test.grpc.pb.h" #include "src/proto/grpc/testing/empty.grpc.pb.h" #include "src/proto/grpc/testing/messages.grpc.pb.h" +#include "src/proto/grpc/testing/test.grpc.pb.h" +#include "test/core/util/reconnect_server.h" +#include "test/cpp/util/test_config.h" DEFINE_int32(control_port, 0, "Server port for controlling the server."); DEFINE_int32(retry_port, 0, diff --git a/test/cpp/interop/server_helper.cc b/test/cpp/interop/server_helper.cc index 9a284094f00..97c39c4245f 100644 --- a/test/cpp/interop/server_helper.cc +++ b/test/cpp/interop/server_helper.cc @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -38,7 +38,7 @@ #include #include -#include "src/core/surface/call_test_only.h" +#include "src/core/lib/surface/call_test_only.h" #include "test/core/end2end/data/ssl_test_data.h" DECLARE_bool(use_tls); diff --git a/test/cpp/interop/server_helper.h b/test/cpp/interop/server_helper.h index 57337e52396..38c2fba9cff 100644 --- a/test/cpp/interop/server_helper.h +++ b/test/cpp/interop/server_helper.h @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -36,9 +36,9 @@ #include -#include -#include #include +#include +#include namespace grpc { namespace testing { diff --git a/test/cpp/interop/server_main.cc b/test/cpp/interop/server_main.cc index 18ac35d551c..8a718701c33 100644 --- a/test/cpp/interop/server_main.cc +++ b/test/cpp/interop/server_main.cc @@ -40,19 +40,19 @@ #include #include -#include -#include -#include +#include #include #include #include -#include +#include +#include +#include -#include "test/cpp/interop/server_helper.h" -#include "test/cpp/util/test_config.h" -#include "src/proto/grpc/testing/test.grpc.pb.h" #include "src/proto/grpc/testing/empty.grpc.pb.h" #include "src/proto/grpc/testing/messages.grpc.pb.h" +#include "src/proto/grpc/testing/test.grpc.pb.h" +#include "test/cpp/interop/server_helper.h" +#include "test/cpp/util/test_config.h" DEFINE_bool(use_tls, false, "Whether to use tls."); DEFINE_int32(port, 0, "Server port."); diff --git a/test/cpp/interop/stress_test.cc b/test/cpp/interop/stress_test.cc index 702354dc87d..162f7b37783 100644 --- a/test/cpp/interop/stress_test.cc +++ b/test/cpp/interop/stress_test.cc @@ -43,12 +43,12 @@ #include #include +#include "src/proto/grpc/testing/metrics.grpc.pb.h" +#include "src/proto/grpc/testing/metrics.pb.h" #include "test/cpp/interop/interop_client.h" #include "test/cpp/interop/stress_interop_client.h" #include "test/cpp/util/metrics_server.h" #include "test/cpp/util/test_config.h" -#include "src/proto/grpc/testing/metrics.grpc.pb.h" -#include "src/proto/grpc/testing/metrics.pb.h" extern "C" { extern void gpr_default_log(gpr_log_func_args* args); diff --git a/test/cpp/qps/async_streaming_ping_pong_test.cc b/test/cpp/qps/async_streaming_ping_pong_test.cc index 97499329c1f..d9fbb39df7e 100644 --- a/test/cpp/qps/async_streaming_ping_pong_test.cc +++ b/test/cpp/qps/async_streaming_ping_pong_test.cc @@ -43,7 +43,7 @@ namespace grpc { namespace testing { static const int WARMUP = 5; -static const int BENCHMARK = 10; +static const int BENCHMARK = 5; static void RunAsyncStreamingPingPong() { gpr_log(GPR_INFO, "Running Async Streaming Ping Pong"); diff --git a/test/cpp/qps/async_unary_ping_pong_test.cc b/test/cpp/qps/async_unary_ping_pong_test.cc index d801bddf4ac..5ab86197b0f 100644 --- a/test/cpp/qps/async_unary_ping_pong_test.cc +++ b/test/cpp/qps/async_unary_ping_pong_test.cc @@ -43,7 +43,7 @@ namespace grpc { namespace testing { static const int WARMUP = 5; -static const int BENCHMARK = 10; +static const int BENCHMARK = 5; static void RunAsyncUnaryPingPong() { gpr_log(GPR_INFO, "Running Async Unary Ping Pong"); diff --git a/test/cpp/qps/client_async.cc b/test/cpp/qps/client_async.cc index 9e9da9909af..dcdb665a9ac 100644 --- a/test/cpp/qps/client_async.cc +++ b/test/cpp/qps/client_async.cc @@ -141,7 +141,8 @@ class ClientRpcContextUnaryImpl : public ClientRpcContext { std::function next_issue_; std::function>( BenchmarkService::Stub*, grpc::ClientContext*, const RequestType&, - CompletionQueue*)> start_req_; + CompletionQueue*)> + start_req_; grpc::Status status_; double start_; std::unique_ptr> @@ -359,10 +360,10 @@ class ClientRpcContextStreamingImpl : public ClientRpcContext { State next_state_; std::function callback_; std::function next_issue_; - std::function< - std::unique_ptr>( - BenchmarkService::Stub*, grpc::ClientContext*, CompletionQueue*, - void*)> start_req_; + std::function>( + BenchmarkService::Stub*, grpc::ClientContext*, CompletionQueue*, void*)> + start_req_; grpc::Status status_; double start_; std::unique_ptr> @@ -491,7 +492,8 @@ class ClientRpcContextGenericStreamingImpl : public ClientRpcContext { std::function next_issue_; std::function( grpc::GenericStub*, grpc::ClientContext*, const grpc::string&, - CompletionQueue*, void*)> start_req_; + CompletionQueue*, void*)> + start_req_; grpc::Status status_; double start_; std::unique_ptr stream_; diff --git a/test/cpp/qps/client_sync.cc b/test/cpp/qps/client_sync.cc index 4284e07bd4c..a1489d88e6d 100644 --- a/test/cpp/qps/client_sync.cc +++ b/test/cpp/qps/client_sync.cc @@ -53,7 +53,7 @@ #include #include -#include "src/core/profiling/timers.h" +#include "src/core/lib/profiling/timers.h" #include "src/proto/grpc/testing/services.grpc.pb.h" #include "test/cpp/qps/client.h" #include "test/cpp/qps/histogram.h" diff --git a/test/cpp/qps/driver.cc b/test/cpp/qps/driver.cc index bc8780f74d5..6cca7dec2bf 100644 --- a/test/cpp/qps/driver.cc +++ b/test/cpp/qps/driver.cc @@ -43,8 +43,9 @@ #include #include #include +#include -#include "src/core/support/env.h" +#include "src/core/lib/support/env.h" #include "src/proto/grpc/testing/services.grpc.pb.h" #include "test/core/util/port.h" #include "test/core/util/test_config.h" @@ -120,11 +121,9 @@ static deque get_workers(const string& name) { namespace runsc { // ClientContext allocator -template -static ClientContext* AllocContext(list* contexts, T deadline) { +static ClientContext* AllocContext(list* contexts) { contexts->emplace_back(); auto context = &contexts->back(); - context->set_deadline(deadline); return context; } @@ -196,9 +195,6 @@ std::unique_ptr RunScenario( // Trim to just what we need workers.resize(num_clients + num_servers); - gpr_timespec deadline = - GRPC_TIMEOUT_SECONDS_TO_DEADLINE(warmup_seconds + benchmark_seconds + 20); - // Start servers using runsc::ServerData; // servers is array rather than std::vector to avoid gcc-4.4 issues @@ -248,7 +244,7 @@ std::unique_ptr RunScenario( ServerArgs args; *args.mutable_setup() = server_config; servers[i].stream = - servers[i].stub->RunServer(runsc::AllocContext(&contexts, deadline)); + servers[i].stub->RunServer(runsc::AllocContext(&contexts)); GPR_ASSERT(servers[i].stream->Write(args)); ServerStatus init_status; GPR_ASSERT(servers[i].stream->Read(&init_status)); @@ -304,7 +300,7 @@ std::unique_ptr RunScenario( ClientArgs args; *args.mutable_setup() = per_client_config; clients[i].stream = - clients[i].stub->RunClient(runsc::AllocContext(&contexts, deadline)); + clients[i].stub->RunClient(runsc::AllocContext(&contexts)); GPR_ASSERT(clients[i].stream->Write(args)); ClientStatus init_status; GPR_ASSERT(clients[i].stream->Read(&init_status)); @@ -342,7 +338,8 @@ std::unique_ptr RunScenario( // Use gpr_sleep_until rather than this_thread::sleep_until to support // compilers that don't work with this_thread gpr_sleep_until(gpr_time_add( - start, gpr_time_from_seconds(benchmark_seconds, GPR_TIMESPAN))); + start, + gpr_time_from_seconds(warmup_seconds + benchmark_seconds, GPR_TIMESPAN))); // Finish a run std::unique_ptr result(new ScenarioResult); diff --git a/test/cpp/qps/driver.h b/test/cpp/qps/driver.h index 3af61f73917..1e2e28029e0 100644 --- a/test/cpp/qps/driver.h +++ b/test/cpp/qps/driver.h @@ -36,8 +36,8 @@ #include -#include "test/cpp/qps/histogram.h" #include "src/proto/grpc/testing/control.grpc.pb.h" +#include "test/cpp/qps/histogram.h" namespace grpc { namespace testing { diff --git a/test/cpp/qps/generic_async_streaming_ping_pong_test.cc b/test/cpp/qps/generic_async_streaming_ping_pong_test.cc index d9166ae210f..fc06cddfef5 100644 --- a/test/cpp/qps/generic_async_streaming_ping_pong_test.cc +++ b/test/cpp/qps/generic_async_streaming_ping_pong_test.cc @@ -43,7 +43,7 @@ namespace grpc { namespace testing { static const int WARMUP = 5; -static const int BENCHMARK = 10; +static const int BENCHMARK = 5; static void RunGenericAsyncStreamingPingPong() { gpr_log(GPR_INFO, "Running Generic Async Streaming Ping Pong"); @@ -62,6 +62,7 @@ static void RunGenericAsyncStreamingPingPong() { ServerConfig server_config; server_config.set_server_type(ASYNC_GENERIC_SERVER); server_config.set_async_server_threads(1); + *server_config.mutable_payload_config() = client_config.payload_config(); const auto result = RunScenario(client_config, 1, server_config, 1, WARMUP, BENCHMARK, -2); diff --git a/test/cpp/qps/limit_cores.cc b/test/cpp/qps/limit_cores.cc index fad9a323afd..59ed369067f 100644 --- a/test/cpp/qps/limit_cores.cc +++ b/test/cpp/qps/limit_cores.cc @@ -37,14 +37,15 @@ #include #include -namespace grpc { -namespace testing { - #ifdef GPR_CPU_LINUX #ifndef _GNU_SOURCE #define _GNU_SOURCE #endif #include + +namespace grpc { +namespace testing { + int LimitCores(const int* cores, int cores_size) { const int num_cores = gpr_cpu_num_cores(); int cores_set = 0; @@ -71,9 +72,16 @@ int LimitCores(const int* cores, int cores_size) { CPU_FREE(cpup); return cores_set; } + +} // namespace testing +} // namespace grpc #else +namespace grpc { +namespace testing { + // LimitCores is not currently supported for non-Linux platforms int LimitCores(const int*, int) { return gpr_cpu_num_cores(); } -#endif + } // namespace testing } // namespace grpc +#endif diff --git a/test/cpp/qps/perf_db_client.h b/test/cpp/qps/perf_db_client.h index ece020aa9b3..668083b811a 100644 --- a/test/cpp/qps/perf_db_client.h +++ b/test/cpp/qps/perf_db_client.h @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,17 +31,17 @@ * */ +#include #include #include #include -#include -#include -#include #include #include #include #include +#include +#include #include "src/proto/grpc/testing/perf_db.grpc.pb.h" namespace grpc { diff --git a/test/cpp/qps/qps_driver.cc b/test/cpp/qps/qps_driver.cc index 69fb4d75e8d..f9bd01b2a1b 100644 --- a/test/cpp/qps/qps_driver.cc +++ b/test/cpp/qps/qps_driver.cc @@ -171,6 +171,10 @@ static void QpsDriver() { server_config.set_core_limit(FLAGS_server_core_limit); } + if (FLAGS_bbuf_resp_size >= 0) { + *server_config.mutable_payload_config() = client_config.payload_config(); + } + if (FLAGS_secure_test) { // Set up security params SecurityParams security; diff --git a/test/cpp/qps/qps_openloop_test.cc b/test/cpp/qps/qps_openloop_test.cc index 27f266b32be..2ae0afbcbef 100644 --- a/test/cpp/qps/qps_openloop_test.cc +++ b/test/cpp/qps/qps_openloop_test.cc @@ -44,7 +44,7 @@ namespace grpc { namespace testing { static const int WARMUP = 5; -static const int BENCHMARK = 10; +static const int BENCHMARK = 5; static void RunQPS() { gpr_log(GPR_INFO, "Running QPS test, open-loop"); diff --git a/test/cpp/qps/qps_test.cc b/test/cpp/qps/qps_test.cc index 27aaf137f64..b6a2e1ef306 100644 --- a/test/cpp/qps/qps_test.cc +++ b/test/cpp/qps/qps_test.cc @@ -43,7 +43,7 @@ namespace grpc { namespace testing { static const int WARMUP = 20; -static const int BENCHMARK = 40; +static const int BENCHMARK = 20; static void RunQPS() { gpr_log(GPR_INFO, "Running QPS test"); diff --git a/test/cpp/qps/qps_test_with_poll.cc b/test/cpp/qps/qps_test_with_poll.cc index 8340a6386a5..647aaac4c47 100644 --- a/test/cpp/qps/qps_test_with_poll.cc +++ b/test/cpp/qps/qps_test_with_poll.cc @@ -40,7 +40,7 @@ #include "test/cpp/util/benchmark_config.h" extern "C" { -#include "src/core/iomgr/pollset_posix.h" +#include "src/core/lib/iomgr/pollset_posix.h" } namespace grpc { diff --git a/test/cpp/qps/secure_sync_unary_ping_pong_test.cc b/test/cpp/qps/secure_sync_unary_ping_pong_test.cc index 359310b8560..946c76f747e 100644 --- a/test/cpp/qps/secure_sync_unary_ping_pong_test.cc +++ b/test/cpp/qps/secure_sync_unary_ping_pong_test.cc @@ -43,7 +43,7 @@ namespace grpc { namespace testing { static const int WARMUP = 5; -static const int BENCHMARK = 10; +static const int BENCHMARK = 5; static void RunSynchronousUnaryPingPong() { gpr_log(GPR_INFO, "Running Synchronous Unary Ping Pong"); diff --git a/test/cpp/qps/server_async.cc b/test/cpp/qps/server_async.cc index 2024e0bfef8..1bfb07013df 100644 --- a/test/cpp/qps/server_async.cc +++ b/test/cpp/qps/server_async.cc @@ -130,8 +130,7 @@ class AsyncQpsServerTest : public Server { } } ~AsyncQpsServerTest() { - auto deadline = GRPC_TIMEOUT_SECONDS_TO_DEADLINE(10); - server_->Shutdown(deadline); + server_->Shutdown(); for (auto ss = shutdown_state_.begin(); ss != shutdown_state_.end(); ++ss) { (*ss)->set_shutdown(); } @@ -388,12 +387,14 @@ static Status ProcessGenericRPC(const PayloadConfig &payload_config, } std::unique_ptr CreateAsyncServer(const ServerConfig &config) { - return std::unique_ptr(new AsyncQpsServerTest< - SimpleRequest, SimpleResponse, BenchmarkService::AsyncService, - grpc::ServerContext>( - config, RegisterBenchmarkService, - &BenchmarkService::AsyncService::RequestUnaryCall, - &BenchmarkService::AsyncService::RequestStreamingCall, ProcessSimpleRPC)); + return std::unique_ptr( + new AsyncQpsServerTest( + config, RegisterBenchmarkService, + &BenchmarkService::AsyncService::RequestUnaryCall, + &BenchmarkService::AsyncService::RequestStreamingCall, + ProcessSimpleRPC)); } std::unique_ptr CreateAsyncGenericServer(const ServerConfig &config) { return std::unique_ptr( diff --git a/test/cpp/qps/sync_streaming_ping_pong_test.cc b/test/cpp/qps/sync_streaming_ping_pong_test.cc index e02c14c926d..ee1bbc7a113 100644 --- a/test/cpp/qps/sync_streaming_ping_pong_test.cc +++ b/test/cpp/qps/sync_streaming_ping_pong_test.cc @@ -43,7 +43,7 @@ namespace grpc { namespace testing { static const int WARMUP = 5; -static const int BENCHMARK = 10; +static const int BENCHMARK = 5; static void RunSynchronousStreamingPingPong() { gpr_log(GPR_INFO, "Running Synchronous Streaming Ping Pong"); diff --git a/test/cpp/qps/sync_unary_ping_pong_test.cc b/test/cpp/qps/sync_unary_ping_pong_test.cc index 9d363c04fb2..4dccfee1908 100644 --- a/test/cpp/qps/sync_unary_ping_pong_test.cc +++ b/test/cpp/qps/sync_unary_ping_pong_test.cc @@ -43,7 +43,7 @@ namespace grpc { namespace testing { static const int WARMUP = 5; -static const int BENCHMARK = 10; +static const int BENCHMARK = 5; static void RunSynchronousUnaryPingPong() { gpr_log(GPR_INFO, "Running Synchronous Unary Ping Pong"); diff --git a/test/cpp/util/benchmark_config.cc b/test/cpp/util/benchmark_config.cc index 3c38221b4cb..5c3a4cf35d5 100644 --- a/test/cpp/util/benchmark_config.cc +++ b/test/cpp/util/benchmark_config.cc @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,8 +31,8 @@ * */ -#include #include "test/cpp/util/benchmark_config.h" +#include DEFINE_bool(enable_log_reporter, true, "Enable reporting of benchmark results through GprLog"); diff --git a/test/cpp/util/byte_buffer_test.cc b/test/cpp/util/byte_buffer_test.cc index f36c32cac5b..bc172e97178 100644 --- a/test/cpp/util/byte_buffer_test.cc +++ b/test/cpp/util/byte_buffer_test.cc @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -36,8 +36,8 @@ #include #include -#include #include +#include #include namespace grpc { @@ -105,6 +105,24 @@ TEST_F(ByteBufferTest, Dump) { EXPECT_TRUE(SliceEqual(slices[1], world)); } +TEST_F(ByteBufferTest, SerializationMakesCopy) { + gpr_slice hello = gpr_slice_from_copied_string(kContent1); + gpr_slice world = gpr_slice_from_copied_string(kContent2); + std::vector slices; + slices.push_back(Slice(hello, Slice::STEAL_REF)); + slices.push_back(Slice(world, Slice::STEAL_REF)); + grpc_byte_buffer* send_buffer = nullptr; + bool owned = false; + ByteBuffer buffer(&slices[0], 2); + slices.clear(); + auto status = SerializationTraits::Serialize( + buffer, &send_buffer, &owned); + EXPECT_TRUE(status.ok()); + EXPECT_TRUE(owned); + EXPECT_TRUE(send_buffer != nullptr); + grpc_byte_buffer_destroy(send_buffer); +} + } // namespace } // namespace grpc diff --git a/test/cpp/util/cli_call_test.cc b/test/cpp/util/cli_call_test.cc index 5fdf5193209..474ac282cec 100644 --- a/test/cpp/util/cli_call_test.cc +++ b/test/cpp/util/cli_call_test.cc @@ -33,18 +33,18 @@ #include "test/cpp/util/cli_call.h" -#include #include #include #include #include #include #include +#include #include +#include "src/proto/grpc/testing/echo.grpc.pb.h" #include "test/core/util/port.h" #include "test/core/util/test_config.h" -#include "src/proto/grpc/testing/echo.grpc.pb.h" #include "test/cpp/util/string_ref_helper.h" using grpc::testing::EchoRequest; diff --git a/test/cpp/util/grpc_cli.cc b/test/cpp/util/grpc_cli.cc index f9b9f0c40a0..0b0bc20a351 100644 --- a/test/cpp/util/grpc_cli.cc +++ b/test/cpp/util/grpc_cli.cc @@ -1,6 +1,6 @@ /* - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -65,11 +65,11 @@ #include #include -#include #include #include #include #include +#include #include "test/cpp/util/cli_call.h" #include "test/cpp/util/string_ref_helper.h" diff --git a/test/cpp/util/test_config.cc b/test/cpp/util/test_config.cc index e74f8fb14f1..c446ae55c79 100644 --- a/test/cpp/util/test_config.cc +++ b/test/cpp/util/test_config.cc @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,8 +31,8 @@ * */ -#include #include "test/cpp/util/test_config.h" +#include // In some distros, gflags is in the namespace google, and in some others, // in gflags. This hack is enabling us to find both. diff --git a/test/cpp/util/test_credentials_provider.cc b/test/cpp/util/test_credentials_provider.cc index e314fd6d75a..9c09a73115b 100644 --- a/test/cpp/util/test_credentials_provider.cc +++ b/test/cpp/util/test_credentials_provider.cc @@ -36,8 +36,8 @@ #include -#include #include +#include #include "test/core/end2end/data/ssl_test_data.h" diff --git a/test/cpp/util/time_test.cc b/test/cpp/util/time_test.cc index 48c6ce7697c..e78c85b43af 100644 --- a/test/cpp/util/time_test.cc +++ b/test/cpp/util/time_test.cc @@ -31,8 +31,8 @@ * */ -#include #include +#include #include using std::chrono::duration_cast; diff --git a/third_party/boringssl b/third_party/boringssl index 9f897b25800..907ae62b9d8 160000 --- a/third_party/boringssl +++ b/third_party/boringssl @@ -1 +1 @@ -Subproject commit 9f897b25800d2f54f5c442ef01a60721aeca6d87 +Subproject commit 907ae62b9d81121cb86b604f83e6b811a43f7a87 diff --git a/tools/buildgen/plugins/expand_filegroups.py b/tools/buildgen/plugins/expand_filegroups.py index 156bdc44171..c40143ef958 100755 --- a/tools/buildgen/plugins/expand_filegroups.py +++ b/tools/buildgen/plugins/expand_filegroups.py @@ -1,4 +1,4 @@ -# Copyright 2015, Google Inc. +# Copyright 2015-2016, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -42,6 +42,9 @@ def excluded(filename, exclude_res): return False +FILEGROUP_LISTS = ['src', 'headers', 'public_headers'] + + def mako_plugin(dictionary): """The exported plugin code for expand_filegroups. @@ -54,21 +57,44 @@ def mako_plugin(dictionary): filegroups_list = dictionary.get('filegroups') filegroups = {} - for fg in filegroups_list: - filegroups[fg['name']] = fg + todo = filegroups_list[:] + skips = 0 + + while todo: + assert skips != len(todo), "infinite loop in filegroup uses clauses" + # take the first element of the todo list + cur = todo[0] + todo = todo[1:] + # check all uses filegroups are present (if no, skip and come back later) + skip = False + for uses in cur.get('uses', []): + if uses not in filegroups: + skip = True + if skip: + skips += 1 + todo.append(cur) + else: + skips = 0 + for uses in cur.get('uses', []): + for lst in FILEGROUP_LISTS: + vals = cur.get(lst, []) + vals.extend(filegroups[uses].get(lst, [])) + cur[lst] = vals + filegroups[cur['name']] = cur + + # the above expansion can introduce duplicate filenames: contract them here + for fg in filegroups.itervalues(): + for lst in FILEGROUP_LISTS: + fg[lst] = sorted(list(set(fg.get(lst, [])))) for lib in libs: for fg_name in lib.get('filegroups', []): fg = filegroups[fg_name] - src = lib.get('src', []) - src.extend(fg.get('src', [])) - lib['src'] = src - - headers = lib.get('headers', []) - headers.extend(fg.get('headers', [])) - lib['headers'] = headers + for lst in FILEGROUP_LISTS: + vals = lib.get(lst, []) + vals.extend(fg.get(lst, [])) + lib[lst] = vals - public_headers = lib.get('public_headers', []) - public_headers.extend(fg.get('public_headers', [])) - lib['public_headers'] = public_headers + for lst in FILEGROUP_LISTS: + lib[lst] = sorted(list(set(lib.get(lst, [])))) diff --git a/tools/buildgen/plugins/expand_version.py b/tools/buildgen/plugins/expand_version.py index b55e1b15ff8..dd77f7af125 100755 --- a/tools/buildgen/plugins/expand_version.py +++ b/tools/buildgen/plugins/expand_version.py @@ -84,6 +84,11 @@ class Version: else: return '%d.%d.%d' % (self.major, self.minor, self.patch) + def php(self): + """Version string in PHP style""" + """PECL does not allow tag in version string""" + return '%d.%d.%d' % (self.major, self.minor, self.patch) + def mako_plugin(dictionary): """Expand version numbers: - for each language, ensure there's a language_version tag in diff --git a/tools/codegen/core/gen_hpack_tables.c b/tools/codegen/core/gen_hpack_tables.c index bae4e4cd734..cb2b89ae253 100644 --- a/tools/codegen/core/gen_hpack_tables.c +++ b/tools/codegen/core/gen_hpack_tables.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -33,13 +33,13 @@ /* generates constant tables for hpack.c */ +#include #include #include #include -#include #include -#include "src/core/transport/chttp2/huffsyms.h" +#include "src/core/ext/transport/chttp2/transport/huffsyms.h" /* * first byte LUT generation diff --git a/tools/codegen/core/gen_load_balancing_proto.sh b/tools/codegen/core/gen_load_balancing_proto.sh index fb6a468ee0b..6a5363eeb32 100755 --- a/tools/codegen/core/gen_load_balancing_proto.sh +++ b/tools/codegen/core/gen_load_balancing_proto.sh @@ -82,7 +82,7 @@ fi readonly GRPC_ROOT=$PWD -OUTPUT_DIR="$GRPC_ROOT/src/core/proto/grpc/lb/v0" +OUTPUT_DIR="$GRPC_ROOT/src/core/lib/proto/grpc/lb/v0" if [ $# -eq 2 ]; then mkdir -p "$2" if [ $? != 0 ]; then @@ -122,7 +122,7 @@ protoc \ "$(basename $1)" readonly PROTO_BASENAME=$(basename $1 .proto) -sed -i "s:$PROTO_BASENAME.pb.h:src/core/proto/grpc/lb/v0/$PROTO_BASENAME.pb.h:g" \ +sed -i "s:$PROTO_BASENAME.pb.h:src/core/lib/proto/grpc/lb/v0/$PROTO_BASENAME.pb.h:g" \ "$OUTPUT_DIR/$PROTO_BASENAME.pb.c" # prepend copyright diff --git a/tools/codegen/core/gen_static_metadata.py b/tools/codegen/core/gen_static_metadata.py index e6ae00e6112..70d41414f45 100755 --- a/tools/codegen/core/gen_static_metadata.py +++ b/tools/codegen/core/gen_static_metadata.py @@ -196,7 +196,7 @@ for mask in range(1, 1<>H, '#ifndef GRPC_INTERNAL_CORE_TRANSPORT_STATIC_METADATA_H' print >>H, '#define GRPC_INTERNAL_CORE_TRANSPORT_STATIC_METADATA_H' print >>H -print >>H, '#include "src/core/transport/metadata.h"' +print >>H, '#include "src/core/lib/transport/metadata.h"' print >>H -print >>C, '#include "src/core/transport/static_metadata.h"' +print >>C, '#include "src/core/lib/transport/static_metadata.h"' print >>C print >>H, '#define GRPC_STATIC_MDSTR_COUNT %d' % len(all_strs) @@ -309,4 +309,3 @@ print >>H, '#endif /* GRPC_INTERNAL_CORE_TRANSPORT_STATIC_METADATA_H */' H.close() C.close() - diff --git a/tools/distrib/check_copyright.py b/tools/distrib/check_copyright.py index 99771f9632c..5badbf484bc 100755 --- a/tools/distrib/check_copyright.py +++ b/tools/distrib/check_copyright.py @@ -105,7 +105,7 @@ RE_LICENSE = dict( for k, v in LICENSE_PREFIX.iteritems()) if args.precommit: - FILE_LIST_COMMAND = 'git diff --name-only HEAD | grep -v ^third_party/' + FILE_LIST_COMMAND = 'git status -z | grep -Poz \'(?<=^[MARC][MARCD ] )[^\s]+\'' else: FILE_LIST_COMMAND = 'git ls-tree -r --name-only -r HEAD | grep -v ^third_party/' diff --git a/tools/distrib/check_include_guards.py b/tools/distrib/check_include_guards.py new file mode 100755 index 00000000000..463e3168858 --- /dev/null +++ b/tools/distrib/check_include_guards.py @@ -0,0 +1,197 @@ +#!/usr/bin/env python2.7 + +# Copyright 2016, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +import argparse +import os +import re +import sys +import subprocess + + +def build_valid_guard(fpath): + prefix = 'GRPC_' if not fpath.startswith('include/') else '' + return prefix + '_'.join(fpath.replace('++', 'XX').replace('.', '_').upper().split('/')[1:]) + + +def load(fpath): + with open(fpath, 'r') as f: + return f.read() + + +def save(fpath, contents): + with open(fpath, 'w') as f: + f.write(contents) + + +class GuardValidator(object): + def __init__(self): + self.ifndef_re = re.compile(r'#ifndef ([A-Z][A-Z_1-9]*)') + self.define_re = re.compile(r'#define ([A-Z][A-Z_1-9]*)') + self.endif_c_re = re.compile(r'#endif /\* ([A-Z][A-Z_1-9]*) \*/') + self.endif_cpp_re = re.compile(r'#endif // ([A-Z][A-Z_1-9]*)') + self.failed = False + + def fail(self, fpath, regexp, fcontents, match_txt, correct, fix): + cpp_header = 'grpc++' in fpath + self.failed = True + invalid_guards_msg_template = ( + '{0}: Missing preprocessor guards (RE {1}). ' + 'Please wrap your code around the following guards:\n' + '#ifndef {2}\n' + '#define {2}\n' + '...\n' + '... epic code ...\n' + '...\n') + ('#endif // {2}' if cpp_header else '#endif /* {2} */') + if not match_txt: + print invalid_guards_msg_template.format(fpath, regexp.pattern, + build_valid_guard(fpath)) + return fcontents + + print ('{}: Wrong preprocessor guards (RE {}):' + '\n\tFound {}, expected {}').format( + fpath, regexp.pattern, match_txt, correct) + if fix: + print 'Fixing {}...\n'.format(fpath) + fixed_fcontents = re.sub(match_txt, correct, fcontents) + if fixed_fcontents: + self.failed = False + return fixed_fcontents + else: + print + return fcontents + + def check(self, fpath, fix): + cpp_header = 'grpc++' in fpath + valid_guard = build_valid_guard(fpath) + + fcontents = load(fpath) + + match = self.ifndef_re.search(fcontents) + if match.lastindex is None: + # No ifndef. Request manual addition with hints + self.fail(fpath, match.re, match.string, '', '', False) + return False # failed + + # Does the guard end with a '_H'? + running_guard = match.group(1) + if not running_guard.endswith('_H'): + fcontents = self.fail(fpath, match.re, match.string, match.group(1), + valid_guard, fix) + if fix: save(fpath, fcontents) + + # Is it the expected one based on the file path? + if running_guard != valid_guard: + fcontents = self.fail(fpath, match.re, match.string, match.group(1), + valid_guard, fix) + if fix: save(fpath, fcontents) + + # Is there a #define? Is it the same as the #ifndef one? + match = self.define_re.search(fcontents) + if match.lastindex is None: + # No define. Request manual addition with hints + self.fail(fpath, match.re, match.string, '', '', False) + return False # failed + + # Is the #define guard the same as the #ifndef guard? + if match.group(1) != running_guard: + fcontents = self.fail(fpath, match.re, match.string, match.group(1), + valid_guard, fix) + if fix: save(fpath, fcontents) + + # Is there a properly commented #endif? + endif_re = self.endif_cpp_re if cpp_header else self.endif_c_re + flines = fcontents.rstrip().splitlines() + match = endif_re.search(flines[-1]) + if not match: + # No endif. Check if we have the last line as just '#endif' and if so + # replace it with a properly commented one. + if flines[-1] == '#endif': + flines[-1] = ('#endif' + + (' // {}\n'.format(valid_guard) if cpp_header + else ' /* {} */\n'.format(valid_guard))) + if fix: + fcontents = '\n'.join(flines) + save(fpath, fcontents) + else: + # something else is wrong, bail out + self.fail(fpath, endif_re, flines[-1], '', '', False) + elif match.group(1) != running_guard: + # Is the #endif guard the same as the #ifndef and #define guards? + fcontents = self.fail(fpath, endif_re, fcontents, match.group(1), + valid_guard, fix) + if fix: save(fpath, fcontents) + + return not self.failed # Did the check succeed? (ie, not failed) + +# find our home +ROOT = os.path.abspath( + os.path.join(os.path.dirname(sys.argv[0]), '../..')) +os.chdir(ROOT) + +# parse command line +argp = argparse.ArgumentParser(description='include guard checker') +argp.add_argument('-f', '--fix', + default=False, + action='store_true'); +argp.add_argument('--precommit', + default=False, + action='store_true') +args = argp.parse_args() + +KNOWN_BAD = set([ + 'src/core/lib/proto/grpc/lb/v0/load_balancer.pb.h', +]) + + +grep_filter = r"grep -E '^(include|src/core)/.*\.h$'" +if args.precommit: + git_command = 'git diff --name-only HEAD' +else: + git_command = 'git ls-tree -r --name-only -r HEAD' + +FILE_LIST_COMMAND = ' | '.join((git_command, grep_filter)) + +# scan files +ok = True +filename_list = [] +try: + filename_list = subprocess.check_output(FILE_LIST_COMMAND, + shell=True).splitlines() +except subprocess.CalledProcessError: + sys.exit(0) + +validator = GuardValidator() + +for filename in filename_list: + if filename in KNOWN_BAD: continue + ok = validator.check(filename, args.fix) + +sys.exit(0 if ok else 1) diff --git a/tools/distrib/check_nanopb_output.sh b/tools/distrib/check_nanopb_output.sh index 5f49ebb93e6..e0a60946a99 100755 --- a/tools/distrib/check_nanopb_output.sh +++ b/tools/distrib/check_nanopb_output.sh @@ -30,8 +30,6 @@ set -ex -apt-get install -y autoconf automake libtool curl python-virtualenv - readonly NANOPB_TMP_OUTPUT="$(mktemp -d)" # install protoc version 3 @@ -62,7 +60,7 @@ PATH="$PROTOC_PATH:$PATH" ./tools/codegen/core/gen_load_balancing_proto.sh \ $NANOPB_TMP_OUTPUT # compare outputs to checked compiled code -if ! diff -r $NANOPB_TMP_OUTPUT src/core/proto/grpc/lb/v0; then - echo "Outputs differ: $NANOPB_TMP_OUTPUT vs src/core/proto/grpc/lb/v0" +if ! diff -r $NANOPB_TMP_OUTPUT src/core/lib/proto/grpc/lb/v0; then + echo "Outputs differ: $NANOPB_TMP_OUTPUT vs src/core/lib/proto/grpc/lb/v0" exit 2 fi diff --git a/tools/distrib/python_wrapper.sh b/tools/distrib/python_wrapper.sh new file mode 100755 index 00000000000..347a715c852 --- /dev/null +++ b/tools/distrib/python_wrapper.sh @@ -0,0 +1,47 @@ +#!/bin/sh + +# Copyright 2016, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +for p in python2.7 python2.6 python2 python not_found ; do + + python=`which $p || echo not_found` + + if [ -x "$python" ] ; then + break + fi + +done + +if [ -x "$python" ] ; then + exec $python $@ +else + echo "No acceptable version of python found on the system" + exit 1 +fi diff --git a/tools/dockerfile/grpc_clang_format/Dockerfile b/tools/dockerfile/grpc_clang_format/Dockerfile index 4b101f6f531..be2ffc58cf9 100644 --- a/tools/dockerfile/grpc_clang_format/Dockerfile +++ b/tools/dockerfile/grpc_clang_format/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2015, Google Inc. +# Copyright 2015-2016, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -27,9 +27,13 @@ # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -FROM ubuntu:vivid +FROM ubuntu:wily RUN apt-get update -RUN apt-get -y install clang-format-3.6 +RUN apt-get -y install wget +RUN echo deb http://llvm.org/apt/wily/ llvm-toolchain-wily main >> /etc/apt/sources.list +RUN echo deb-src http://llvm.org/apt/wily/ llvm-toolchain-wily main >> /etc/apt/sources.list +RUN wget -O - http://llvm.org/apt/llvm-snapshot.gpg.key| apt-key add - +RUN apt-get update +RUN apt-get -y install clang-format-3.8 ADD clang_format_all_the_things.sh / CMD ["echo 'Run with tools/distrib/clang_format_code.sh'"] - diff --git a/tools/dockerfile/grpc_clang_format/clang_format_all_the_things.sh b/tools/dockerfile/grpc_clang_format/clang_format_all_the_things.sh index d56bc018311..a50ca174114 100755 --- a/tools/dockerfile/grpc_clang_format/clang_format_all_the_things.sh +++ b/tools/dockerfile/grpc_clang_format/clang_format_all_the_things.sh @@ -37,7 +37,7 @@ DIRS="src/core src/cpp test/core test/cpp include" GLOB="*.h *.c *.cc" # clang format command -CLANG_FORMAT=clang-format-3.6 +CLANG_FORMAT=clang-format-3.8 files= for dir in $DIRS diff --git a/tools/dockerfile/grpc_interop_stress_cxx/Dockerfile b/tools/dockerfile/grpc_interop_stress_cxx/Dockerfile index 4123cc1a26a..214747fd4a5 100644 --- a/tools/dockerfile/grpc_interop_stress_cxx/Dockerfile +++ b/tools/dockerfile/grpc_interop_stress_cxx/Dockerfile @@ -27,12 +27,9 @@ # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# A work-in-progress Dockerfile that allows running gRPC test suites -# inside a docker container. - FROM debian:jessie -# Install Git. +# Install Git and basic packages. RUN apt-get update && apt-get install -y \ autoconf \ autotools-dev \ @@ -43,13 +40,16 @@ RUN apt-get update && apt-get install -y \ gcc \ gcc-multilib \ git \ + golang \ gyp \ + lcov \ libc6 \ libc6-dbg \ libc6-dev \ libgtest-dev \ libtool \ make \ + perl \ strace \ python-dev \ python-setuptools \ @@ -59,7 +59,9 @@ RUN apt-get update && apt-get install -y \ wget \ zip && apt-get clean -RUN easy_install -U pip +#================ +# Build profiling +RUN apt-get update && apt-get install -y time && apt-get clean # Prepare ccache RUN ln -s /usr/bin/ccache /usr/local/bin/gcc @@ -69,12 +71,47 @@ RUN ln -s /usr/bin/ccache /usr/local/bin/c++ RUN ln -s /usr/bin/ccache /usr/local/bin/clang RUN ln -s /usr/bin/ccache /usr/local/bin/clang++ -################## +#================= # C++ dependencies -RUN apt-get update && apt-get -y install libgflags-dev libgtest-dev libc++-dev clang +RUN apt-get update && apt-get -y install libgflags-dev libgtest-dev libc++-dev clang && apt-get clean -# Google Cloud platform API libraries (for BigQuery) +# Google Cloud platform API libraries +RUN apt-get update && apt-get install -y python-pip && apt-get clean RUN pip install --upgrade google-api-python-client + +#================= +# Update clang to a version with improved tsan + +RUN apt-get update && apt-get -y install python cmake && apt-get clean + +RUN git clone -n -b release_38 http://llvm.org/git/llvm.git && \ + cd llvm && git checkout ad57503 && cd .. +RUN git clone -n -b release_38 http://llvm.org/git/clang.git && \ + cd clang && git checkout ad2c56e && cd .. +RUN git clone -n -b release_38 http://llvm.org/git/compiler-rt.git && \ + cd compiler-rt && git checkout 3176922 && cd .. +RUN git clone -n -b release_38 \ + http://llvm.org/git/clang-tools-extra.git && cd clang-tools-extra && \ + git checkout c288525 && cd .. +RUN git clone -n -b release_38 http://llvm.org/git/libcxx.git && \ + cd libcxx && git checkout fda3549 && cd .. +RUN git clone -n -b release_38 http://llvm.org/git/libcxxabi.git && \ + cd libcxxabi && git checkout 8d4e51d && cd .. + +RUN mv clang llvm/tools +RUN mv compiler-rt llvm/projects +RUN mv clang-tools-extra llvm/tools/clang/tools +RUN mv libcxx llvm/projects +RUN mv libcxxabi llvm/projects + +RUN mkdir llvm-build +RUN cd llvm-build && cmake \ + -DCMAKE_BUILD_TYPE:STRING=Release \ + -DCMAKE_INSTALL_PREFIX:STRING=/usr \ + -DLLVM_TARGETS_TO_BUILD:STRING=X86 \ + ../llvm +RUN make -C llvm-build && make -C llvm-build install && rm -rf llvm-build + # Define the default command. CMD ["bash"] diff --git a/tools/dockerfile/grpc_interop_stress_cxx/build_interop_stress.sh b/tools/dockerfile/grpc_interop_stress_cxx/build_interop_stress.sh index 392bdfccda0..470db4c13fb 100755 --- a/tools/dockerfile/grpc_interop_stress_cxx/build_interop_stress.sh +++ b/tools/dockerfile/grpc_interop_stress_cxx/build_interop_stress.sh @@ -41,5 +41,7 @@ cd /var/local/git/grpc make install-certs +BUILD_TYPE=${BUILD_TYPE:=opt} + # build C++ interop stress client, interop client and server -make stress_test metrics_client interop_client interop_server +make CONFIG=$BUILD_TYPE stress_test metrics_client interop_client interop_server diff --git a/tools/dockerfile/test/cxx_jessie_x64/Dockerfile b/tools/dockerfile/test/cxx_jessie_x64/Dockerfile index e3ed39dfe6c..b848f233b70 100644 --- a/tools/dockerfile/test/cxx_jessie_x64/Dockerfile +++ b/tools/dockerfile/test/cxx_jessie_x64/Dockerfile @@ -67,6 +67,39 @@ RUN apt-get update && apt-get install -y time && apt-get clean # C++ dependencies RUN apt-get update && apt-get -y install libgflags-dev libgtest-dev libc++-dev clang && apt-get clean +#================= +# Update clang to a version with improved tsan + +RUN apt-get update && apt-get -y install python cmake && apt-get clean + +RUN git clone -n -b release_38 http://llvm.org/git/llvm.git && \ + cd llvm && git checkout ad57503 && cd .. +RUN git clone -n -b release_38 http://llvm.org/git/clang.git && \ + cd clang && git checkout ad2c56e && cd .. +RUN git clone -n -b release_38 http://llvm.org/git/compiler-rt.git && \ + cd compiler-rt && git checkout 3176922 && cd .. +RUN git clone -n -b release_38 \ + http://llvm.org/git/clang-tools-extra.git && cd clang-tools-extra && \ + git checkout c288525 && cd .. +RUN git clone -n -b release_38 http://llvm.org/git/libcxx.git && \ + cd libcxx && git checkout fda3549 && cd .. +RUN git clone -n -b release_38 http://llvm.org/git/libcxxabi.git && \ + cd libcxxabi && git checkout 8d4e51d && cd .. + +RUN mv clang llvm/tools +RUN mv compiler-rt llvm/projects +RUN mv clang-tools-extra llvm/tools/clang/tools +RUN mv libcxx llvm/projects +RUN mv libcxxabi llvm/projects + +RUN mkdir llvm-build +RUN cd llvm-build && cmake \ + -DCMAKE_BUILD_TYPE:STRING=Release \ + -DCMAKE_INSTALL_PREFIX:STRING=/usr \ + -DLLVM_TARGETS_TO_BUILD:STRING=X86 \ + ../llvm +RUN make -C llvm-build && make -C llvm-build install && rm -rf llvm-build + # Prepare ccache RUN ln -s /usr/bin/ccache /usr/local/bin/gcc RUN ln -s /usr/bin/ccache /usr/local/bin/g++ diff --git a/tools/dockerfile/test/cxx_squeeze_x64/Dockerfile b/tools/dockerfile/test/cxx_wheezy_x64/Dockerfile similarity index 82% rename from tools/dockerfile/test/cxx_squeeze_x64/Dockerfile rename to tools/dockerfile/test/cxx_wheezy_x64/Dockerfile index b7f95aaa8d9..6f330f9166c 100644 --- a/tools/dockerfile/test/cxx_squeeze_x64/Dockerfile +++ b/tools/dockerfile/test/cxx_wheezy_x64/Dockerfile @@ -27,7 +27,7 @@ # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -FROM debian:squeeze +FROM debian:wheezy # Install Git and basic packages. RUN apt-get update && apt-get install -y \ @@ -40,6 +40,7 @@ RUN apt-get update && apt-get install -y \ gcc \ gcc-multilib \ git \ + golang \ gyp \ lcov \ libc6 \ @@ -62,16 +63,18 @@ RUN apt-get update && apt-get install -y \ # Build profiling RUN apt-get update && apt-get install -y time && apt-get clean +#================= +# C++ dependencies +RUN apt-get update && apt-get -y install libgflags-dev libgtest-dev libc++-dev clang && apt-get clean -# libgflags-dev is not available on squeezy -RUN apt-get update && apt-get -y install libgtest-dev libc++-dev clang && apt-get clean -RUN apt-get update && apt-get -y install python-pip && apt-get clean -RUN pip install argparse +RUN apt-get update && apt-get install -y \ + gcc-4.4 \ + gcc-4.4-multilib -RUN wget http://openssl.org/source/openssl-1.0.2f.tar.gz +RUN wget https://openssl.org/source/old/1.0.2/openssl-1.0.2f.tar.gz -ENV POST_GIT_STEP tools/dockerfile/test/cxx_squeeze_x64/post-git-setup.sh +ENV POST_GIT_STEP tools/dockerfile/test/cxx_wheezy_x64/post-git-setup.sh # Prepare ccache RUN ln -s /usr/bin/ccache /usr/local/bin/gcc @@ -81,6 +84,10 @@ RUN ln -s /usr/bin/ccache /usr/local/bin/c++ RUN ln -s /usr/bin/ccache /usr/local/bin/clang RUN ln -s /usr/bin/ccache /usr/local/bin/clang++ +#====================== +# Zookeeper dependencies +# TODO(jtattermusch): is zookeeper still needed? +RUN apt-get install -y libzookeeper-mt-dev RUN mkdir /var/local/jenkins diff --git a/tools/dockerfile/test/cxx_squeeze_x64/post-git-setup.sh b/tools/dockerfile/test/cxx_wheezy_x64/post-git-setup.sh similarity index 100% rename from tools/dockerfile/test/cxx_squeeze_x64/post-git-setup.sh rename to tools/dockerfile/test/cxx_wheezy_x64/post-git-setup.sh diff --git a/tools/dockerfile/test/sanity/Dockerfile b/tools/dockerfile/test/sanity/Dockerfile index 1935f675602..4a69cd8c00e 100644 --- a/tools/dockerfile/test/sanity/Dockerfile +++ b/tools/dockerfile/test/sanity/Dockerfile @@ -65,7 +65,13 @@ RUN apt-get update && apt-get install -y time && apt-get clean #======================== # Sanity test dependencies -RUN apt-get update && apt-get install -y python-pip +RUN apt-get update && apt-get install -y \ + python-pip \ + autoconf \ + automake \ + libtool \ + curl \ + python-virtualenv RUN pip install simplejson mako #=================== diff --git a/tools/doxygen/Doxyfile.c++ b/tools/doxygen/Doxyfile.c++ index dd5c8ece26a..fe7962babd2 100644 --- a/tools/doxygen/Doxyfile.c++ +++ b/tools/doxygen/Doxyfile.c++ @@ -770,6 +770,37 @@ include/grpc++/generic/generic_stub.h \ include/grpc++/grpc++.h \ include/grpc++/impl/call.h \ include/grpc++/impl/client_unary_call.h \ +include/grpc++/impl/codegen/async_stream.h \ +include/grpc++/impl/codegen/async_unary_call.h \ +include/grpc++/impl/codegen/call.h \ +include/grpc++/impl/codegen/call_hook.h \ +include/grpc++/impl/codegen/channel_interface.h \ +include/grpc++/impl/codegen/client_context.h \ +include/grpc++/impl/codegen/client_unary_call.h \ +include/grpc++/impl/codegen/completion_queue.h \ +include/grpc++/impl/codegen/completion_queue_tag.h \ +include/grpc++/impl/codegen/config.h \ +include/grpc++/impl/codegen/config_protobuf.h \ +include/grpc++/impl/codegen/core_codegen_interface.h \ +include/grpc++/impl/codegen/grpc_library.h \ +include/grpc++/impl/codegen/method_handler_impl.h \ +include/grpc++/impl/codegen/proto_utils.h \ +include/grpc++/impl/codegen/rpc_method.h \ +include/grpc++/impl/codegen/rpc_service_method.h \ +include/grpc++/impl/codegen/security/auth_context.h \ +include/grpc++/impl/codegen/serialization_traits.h \ +include/grpc++/impl/codegen/server_context.h \ +include/grpc++/impl/codegen/server_interface.h \ +include/grpc++/impl/codegen/service_type.h \ +include/grpc++/impl/codegen/status.h \ +include/grpc++/impl/codegen/status_code_enum.h \ +include/grpc++/impl/codegen/string_ref.h \ +include/grpc++/impl/codegen/stub_options.h \ +include/grpc++/impl/codegen/sync.h \ +include/grpc++/impl/codegen/sync_cxx11.h \ +include/grpc++/impl/codegen/sync_no_cxx11.h \ +include/grpc++/impl/codegen/sync_stream.h \ +include/grpc++/impl/codegen/time.h \ include/grpc++/impl/grpc_library.h \ include/grpc++/impl/method_handler_impl.h \ include/grpc++/impl/proto_utils.h \ @@ -803,37 +834,7 @@ include/grpc++/support/status_code_enum.h \ include/grpc++/support/string_ref.h \ include/grpc++/support/stub_options.h \ include/grpc++/support/sync_stream.h \ -include/grpc++/support/time.h \ -include/grpc++/impl/codegen/async_stream.h \ -include/grpc++/impl/codegen/async_unary_call.h \ -include/grpc++/impl/codegen/call.h \ -include/grpc++/impl/codegen/call_hook.h \ -include/grpc++/impl/codegen/channel_interface.h \ -include/grpc++/impl/codegen/client_context.h \ -include/grpc++/impl/codegen/client_unary_call.h \ -include/grpc++/impl/codegen/completion_queue.h \ -include/grpc++/impl/codegen/completion_queue_tag.h \ -include/grpc++/impl/codegen/config.h \ -include/grpc++/impl/codegen/config_protobuf.h \ -include/grpc++/impl/codegen/grpc_library.h \ -include/grpc++/impl/codegen/method_handler_impl.h \ -include/grpc++/impl/codegen/proto_utils.h \ -include/grpc++/impl/codegen/rpc_method.h \ -include/grpc++/impl/codegen/rpc_service_method.h \ -include/grpc++/impl/codegen/security/auth_context.h \ -include/grpc++/impl/codegen/serialization_traits.h \ -include/grpc++/impl/codegen/server_context.h \ -include/grpc++/impl/codegen/server_interface.h \ -include/grpc++/impl/codegen/service_type.h \ -include/grpc++/impl/codegen/status.h \ -include/grpc++/impl/codegen/status_code_enum.h \ -include/grpc++/impl/codegen/string_ref.h \ -include/grpc++/impl/codegen/stub_options.h \ -include/grpc++/impl/codegen/sync.h \ -include/grpc++/impl/codegen/sync_cxx11.h \ -include/grpc++/impl/codegen/sync_no_cxx11.h \ -include/grpc++/impl/codegen/sync_stream.h \ -include/grpc++/impl/codegen/time.h +include/grpc++/support/time.h # This tag can be used to specify the character encoding of the source files # that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses diff --git a/tools/doxygen/Doxyfile.c++.internal b/tools/doxygen/Doxyfile.c++.internal index a2853108476..30bf7bf126d 100644 --- a/tools/doxygen/Doxyfile.c++.internal +++ b/tools/doxygen/Doxyfile.c++.internal @@ -770,6 +770,37 @@ include/grpc++/generic/generic_stub.h \ include/grpc++/grpc++.h \ include/grpc++/impl/call.h \ include/grpc++/impl/client_unary_call.h \ +include/grpc++/impl/codegen/async_stream.h \ +include/grpc++/impl/codegen/async_unary_call.h \ +include/grpc++/impl/codegen/call.h \ +include/grpc++/impl/codegen/call_hook.h \ +include/grpc++/impl/codegen/channel_interface.h \ +include/grpc++/impl/codegen/client_context.h \ +include/grpc++/impl/codegen/client_unary_call.h \ +include/grpc++/impl/codegen/completion_queue.h \ +include/grpc++/impl/codegen/completion_queue_tag.h \ +include/grpc++/impl/codegen/config.h \ +include/grpc++/impl/codegen/config_protobuf.h \ +include/grpc++/impl/codegen/core_codegen_interface.h \ +include/grpc++/impl/codegen/grpc_library.h \ +include/grpc++/impl/codegen/method_handler_impl.h \ +include/grpc++/impl/codegen/proto_utils.h \ +include/grpc++/impl/codegen/rpc_method.h \ +include/grpc++/impl/codegen/rpc_service_method.h \ +include/grpc++/impl/codegen/security/auth_context.h \ +include/grpc++/impl/codegen/serialization_traits.h \ +include/grpc++/impl/codegen/server_context.h \ +include/grpc++/impl/codegen/server_interface.h \ +include/grpc++/impl/codegen/service_type.h \ +include/grpc++/impl/codegen/status.h \ +include/grpc++/impl/codegen/status_code_enum.h \ +include/grpc++/impl/codegen/string_ref.h \ +include/grpc++/impl/codegen/stub_options.h \ +include/grpc++/impl/codegen/sync.h \ +include/grpc++/impl/codegen/sync_cxx11.h \ +include/grpc++/impl/codegen/sync_no_cxx11.h \ +include/grpc++/impl/codegen/sync_stream.h \ +include/grpc++/impl/codegen/time.h \ include/grpc++/impl/grpc_library.h \ include/grpc++/impl/method_handler_impl.h \ include/grpc++/impl/proto_utils.h \ @@ -804,49 +835,14 @@ include/grpc++/support/string_ref.h \ include/grpc++/support/stub_options.h \ include/grpc++/support/sync_stream.h \ include/grpc++/support/time.h \ -include/grpc++/impl/codegen/async_stream.h \ -include/grpc++/impl/codegen/async_unary_call.h \ -include/grpc++/impl/codegen/call.h \ -include/grpc++/impl/codegen/call_hook.h \ -include/grpc++/impl/codegen/channel_interface.h \ -include/grpc++/impl/codegen/client_context.h \ -include/grpc++/impl/codegen/client_unary_call.h \ -include/grpc++/impl/codegen/completion_queue.h \ -include/grpc++/impl/codegen/completion_queue_tag.h \ -include/grpc++/impl/codegen/config.h \ -include/grpc++/impl/codegen/config_protobuf.h \ -include/grpc++/impl/codegen/grpc_library.h \ -include/grpc++/impl/codegen/method_handler_impl.h \ -include/grpc++/impl/codegen/proto_utils.h \ -include/grpc++/impl/codegen/rpc_method.h \ -include/grpc++/impl/codegen/rpc_service_method.h \ -include/grpc++/impl/codegen/security/auth_context.h \ -include/grpc++/impl/codegen/serialization_traits.h \ -include/grpc++/impl/codegen/server_context.h \ -include/grpc++/impl/codegen/server_interface.h \ -include/grpc++/impl/codegen/service_type.h \ -include/grpc++/impl/codegen/status.h \ -include/grpc++/impl/codegen/status_code_enum.h \ -include/grpc++/impl/codegen/string_ref.h \ -include/grpc++/impl/codegen/stub_options.h \ -include/grpc++/impl/codegen/sync.h \ -include/grpc++/impl/codegen/sync_cxx11.h \ -include/grpc++/impl/codegen/sync_no_cxx11.h \ -include/grpc++/impl/codegen/sync_stream.h \ -include/grpc++/impl/codegen/time.h \ -src/cpp/client/secure_credentials.h \ -src/cpp/common/secure_auth_context.h \ -src/cpp/server/secure_server_credentials.h \ src/cpp/client/create_channel_internal.h \ +src/cpp/client/secure_credentials.h \ +src/cpp/common/core_codegen.h \ src/cpp/common/create_auth_context.h \ +src/cpp/common/secure_auth_context.h \ src/cpp/server/dynamic_thread_pool.h \ +src/cpp/server/secure_server_credentials.h \ src/cpp/server/thread_pool_interface.h \ -src/cpp/client/secure_credentials.cc \ -src/cpp/common/auth_property_iterator.cc \ -src/cpp/common/secure_auth_context.cc \ -src/cpp/common/secure_channel_arguments.cc \ -src/cpp/common/secure_create_auth_context.cc \ -src/cpp/server/secure_server_credentials.cc \ src/cpp/client/channel.cc \ src/cpp/client/client_context.cc \ src/cpp/client/create_channel.cc \ @@ -854,15 +850,21 @@ src/cpp/client/create_channel_internal.cc \ src/cpp/client/credentials.cc \ src/cpp/client/generic_stub.cc \ src/cpp/client/insecure_credentials.cc \ -src/cpp/common/call.cc \ +src/cpp/client/secure_credentials.cc \ +src/cpp/codegen/codegen_init.cc \ +src/cpp/common/auth_property_iterator.cc \ src/cpp/common/channel_arguments.cc \ src/cpp/common/completion_queue.cc \ +src/cpp/common/core_codegen.cc \ src/cpp/common/rpc_method.cc \ -src/cpp/proto/proto_utils.cc \ +src/cpp/common/secure_auth_context.cc \ +src/cpp/common/secure_channel_arguments.cc \ +src/cpp/common/secure_create_auth_context.cc \ src/cpp/server/async_generic_service.cc \ src/cpp/server/create_default_thread_pool.cc \ src/cpp/server/dynamic_thread_pool.cc \ src/cpp/server/insecure_server_credentials.cc \ +src/cpp/server/secure_server_credentials.cc \ src/cpp/server/server.cc \ src/cpp/server/server_builder.cc \ src/cpp/server/server_context.cc \ @@ -871,8 +873,7 @@ src/cpp/util/byte_buffer.cc \ src/cpp/util/slice.cc \ src/cpp/util/status.cc \ src/cpp/util/string_ref.cc \ -src/cpp/util/time.cc \ -src/cpp/codegen/grpc_library.cc +src/cpp/util/time.cc # This tag can be used to specify the character encoding of the source files # that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses diff --git a/tools/doxygen/Doxyfile.core b/tools/doxygen/Doxyfile.core index a9b14c8aff3..55f4ffe4b1e 100644 --- a/tools/doxygen/Doxyfile.core +++ b/tools/doxygen/Doxyfile.core @@ -760,19 +760,33 @@ WARN_LOGFILE = # spaces. # Note: If this tag is empty the current directory is searched. -INPUT = include/grpc/grpc_security.h \ +INPUT = include/grpc/byte_buffer.h \ +include/grpc/byte_buffer_reader.h \ +include/grpc/census.h \ +include/grpc/compression.h \ +include/grpc/grpc.h \ +include/grpc/grpc_security.h \ include/grpc/impl/codegen/byte_buffer.h \ include/grpc/impl/codegen/compression_types.h \ include/grpc/impl/codegen/connectivity_state.h \ include/grpc/impl/codegen/grpc_types.h \ include/grpc/impl/codegen/propagation_bits.h \ include/grpc/impl/codegen/status.h \ -include/grpc/byte_buffer.h \ -include/grpc/byte_buffer_reader.h \ -include/grpc/compression.h \ -include/grpc/grpc.h \ include/grpc/status.h \ -include/grpc/census.h \ +include/grpc/impl/codegen/alloc.h \ +include/grpc/impl/codegen/atm.h \ +include/grpc/impl/codegen/atm_gcc_atomic.h \ +include/grpc/impl/codegen/atm_gcc_sync.h \ +include/grpc/impl/codegen/atm_win32.h \ +include/grpc/impl/codegen/log.h \ +include/grpc/impl/codegen/port_platform.h \ +include/grpc/impl/codegen/slice.h \ +include/grpc/impl/codegen/slice_buffer.h \ +include/grpc/impl/codegen/sync.h \ +include/grpc/impl/codegen/sync_generic.h \ +include/grpc/impl/codegen/sync_posix.h \ +include/grpc/impl/codegen/sync_win32.h \ +include/grpc/impl/codegen/time.h \ include/grpc/support/alloc.h \ include/grpc/support/atm.h \ include/grpc/support/atm_gcc_atomic.h \ @@ -800,21 +814,7 @@ include/grpc/support/tls.h \ include/grpc/support/tls_gcc.h \ include/grpc/support/tls_msvc.h \ include/grpc/support/tls_pthread.h \ -include/grpc/support/useful.h \ -include/grpc/impl/codegen/alloc.h \ -include/grpc/impl/codegen/atm.h \ -include/grpc/impl/codegen/atm_gcc_atomic.h \ -include/grpc/impl/codegen/atm_gcc_sync.h \ -include/grpc/impl/codegen/atm_win32.h \ -include/grpc/impl/codegen/log.h \ -include/grpc/impl/codegen/port_platform.h \ -include/grpc/impl/codegen/slice.h \ -include/grpc/impl/codegen/slice_buffer.h \ -include/grpc/impl/codegen/sync.h \ -include/grpc/impl/codegen/sync_generic.h \ -include/grpc/impl/codegen/sync_posix.h \ -include/grpc/impl/codegen/sync_win32.h \ -include/grpc/impl/codegen/time.h +include/grpc/support/useful.h # This tag can be used to specify the character encoding of the source files # that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses diff --git a/tools/doxygen/Doxyfile.core.internal b/tools/doxygen/Doxyfile.core.internal index a894eaf22bb..bb7177f52f2 100644 --- a/tools/doxygen/Doxyfile.core.internal +++ b/tools/doxygen/Doxyfile.core.internal @@ -760,315 +760,338 @@ WARN_LOGFILE = # spaces. # Note: If this tag is empty the current directory is searched. -INPUT = include/grpc/grpc_security.h \ +INPUT = include/grpc/byte_buffer.h \ +include/grpc/byte_buffer_reader.h \ +include/grpc/census.h \ +include/grpc/compression.h \ +include/grpc/grpc.h \ +include/grpc/grpc_security.h \ include/grpc/impl/codegen/byte_buffer.h \ include/grpc/impl/codegen/compression_types.h \ include/grpc/impl/codegen/connectivity_state.h \ include/grpc/impl/codegen/grpc_types.h \ include/grpc/impl/codegen/propagation_bits.h \ include/grpc/impl/codegen/status.h \ -include/grpc/byte_buffer.h \ -include/grpc/byte_buffer_reader.h \ -include/grpc/compression.h \ -include/grpc/grpc.h \ include/grpc/status.h \ -include/grpc/census.h \ -src/core/census/grpc_filter.h \ -src/core/channel/channel_args.h \ -src/core/channel/channel_stack.h \ -src/core/channel/client_channel.h \ -src/core/channel/client_uchannel.h \ -src/core/channel/compress_filter.h \ -src/core/channel/connected_channel.h \ -src/core/channel/context.h \ -src/core/channel/http_client_filter.h \ -src/core/channel/http_server_filter.h \ -src/core/channel/subchannel_call_holder.h \ -src/core/client_config/client_config.h \ -src/core/client_config/connector.h \ -src/core/client_config/initial_connect_string.h \ -src/core/client_config/lb_policies/load_balancer_api.h \ -src/core/client_config/lb_policies/pick_first.h \ -src/core/client_config/lb_policies/round_robin.h \ -src/core/client_config/lb_policy.h \ -src/core/client_config/lb_policy_factory.h \ -src/core/client_config/lb_policy_registry.h \ -src/core/client_config/resolver.h \ -src/core/client_config/resolver_factory.h \ -src/core/client_config/resolver_registry.h \ -src/core/client_config/resolvers/dns_resolver.h \ -src/core/client_config/resolvers/sockaddr_resolver.h \ -src/core/client_config/subchannel.h \ -src/core/client_config/subchannel_factory.h \ -src/core/client_config/subchannel_index.h \ -src/core/client_config/uri_parser.h \ -src/core/compression/algorithm_metadata.h \ -src/core/compression/message_compress.h \ -src/core/debug/trace.h \ -src/core/httpcli/format_request.h \ -src/core/httpcli/httpcli.h \ -src/core/httpcli/parser.h \ -src/core/iomgr/closure.h \ -src/core/iomgr/endpoint.h \ -src/core/iomgr/endpoint_pair.h \ -src/core/iomgr/exec_ctx.h \ -src/core/iomgr/executor.h \ -src/core/iomgr/fd_posix.h \ -src/core/iomgr/iocp_windows.h \ -src/core/iomgr/iomgr.h \ -src/core/iomgr/iomgr_internal.h \ -src/core/iomgr/iomgr_posix.h \ -src/core/iomgr/pollset.h \ -src/core/iomgr/pollset_posix.h \ -src/core/iomgr/pollset_set.h \ -src/core/iomgr/pollset_set_posix.h \ -src/core/iomgr/pollset_set_windows.h \ -src/core/iomgr/pollset_windows.h \ -src/core/iomgr/resolve_address.h \ -src/core/iomgr/sockaddr.h \ -src/core/iomgr/sockaddr_posix.h \ -src/core/iomgr/sockaddr_utils.h \ -src/core/iomgr/sockaddr_win32.h \ -src/core/iomgr/socket_utils_posix.h \ -src/core/iomgr/socket_windows.h \ -src/core/iomgr/tcp_client.h \ -src/core/iomgr/tcp_posix.h \ -src/core/iomgr/tcp_server.h \ -src/core/iomgr/tcp_windows.h \ -src/core/iomgr/time_averaged_stats.h \ -src/core/iomgr/timer.h \ -src/core/iomgr/timer_heap.h \ -src/core/iomgr/udp_server.h \ -src/core/iomgr/wakeup_fd_pipe.h \ -src/core/iomgr/wakeup_fd_posix.h \ -src/core/iomgr/workqueue.h \ -src/core/iomgr/workqueue_posix.h \ -src/core/iomgr/workqueue_windows.h \ -src/core/json/json.h \ -src/core/json/json_common.h \ -src/core/json/json_reader.h \ -src/core/json/json_writer.h \ -src/core/proto/grpc/lb/v0/load_balancer.pb.h \ -src/core/statistics/census_interface.h \ -src/core/statistics/census_rpc_stats.h \ -src/core/surface/api_trace.h \ -src/core/surface/call.h \ -src/core/surface/call_test_only.h \ -src/core/surface/channel.h \ -src/core/surface/completion_queue.h \ -src/core/surface/event_string.h \ -src/core/surface/init.h \ -src/core/surface/server.h \ -src/core/surface/surface_trace.h \ -src/core/transport/byte_stream.h \ -src/core/transport/chttp2/alpn.h \ -src/core/transport/chttp2/bin_encoder.h \ -src/core/transport/chttp2/frame.h \ -src/core/transport/chttp2/frame_data.h \ -src/core/transport/chttp2/frame_goaway.h \ -src/core/transport/chttp2/frame_ping.h \ -src/core/transport/chttp2/frame_rst_stream.h \ -src/core/transport/chttp2/frame_settings.h \ -src/core/transport/chttp2/frame_window_update.h \ -src/core/transport/chttp2/hpack_encoder.h \ -src/core/transport/chttp2/hpack_parser.h \ -src/core/transport/chttp2/hpack_table.h \ -src/core/transport/chttp2/http2_errors.h \ -src/core/transport/chttp2/huffsyms.h \ -src/core/transport/chttp2/incoming_metadata.h \ -src/core/transport/chttp2/internal.h \ -src/core/transport/chttp2/status_conversion.h \ -src/core/transport/chttp2/stream_map.h \ -src/core/transport/chttp2/timeout_encoding.h \ -src/core/transport/chttp2/varint.h \ -src/core/transport/chttp2_transport.h \ -src/core/transport/connectivity_state.h \ -src/core/transport/metadata.h \ -src/core/transport/metadata_batch.h \ -src/core/transport/static_metadata.h \ -src/core/transport/transport.h \ -src/core/transport/transport_impl.h \ -src/core/security/auth_filters.h \ -src/core/security/b64.h \ -src/core/security/credentials.h \ -src/core/security/handshake.h \ -src/core/security/json_token.h \ -src/core/security/jwt_verifier.h \ -src/core/security/secure_endpoint.h \ -src/core/security/security_connector.h \ -src/core/security/security_context.h \ -src/core/tsi/fake_transport_security.h \ -src/core/tsi/ssl_transport_security.h \ -src/core/tsi/ssl_types.h \ -src/core/tsi/transport_security.h \ -src/core/tsi/transport_security_interface.h \ -src/core/census/aggregation.h \ -src/core/census/mlog.h \ -src/core/census/rpc_metric_id.h \ +src/core/ext/transport/chttp2/transport/alpn.h \ +src/core/ext/transport/chttp2/transport/bin_encoder.h \ +src/core/ext/transport/chttp2/transport/chttp2_transport.h \ +src/core/ext/transport/chttp2/transport/frame.h \ +src/core/ext/transport/chttp2/transport/frame_data.h \ +src/core/ext/transport/chttp2/transport/frame_goaway.h \ +src/core/ext/transport/chttp2/transport/frame_ping.h \ +src/core/ext/transport/chttp2/transport/frame_rst_stream.h \ +src/core/ext/transport/chttp2/transport/frame_settings.h \ +src/core/ext/transport/chttp2/transport/frame_window_update.h \ +src/core/ext/transport/chttp2/transport/hpack_encoder.h \ +src/core/ext/transport/chttp2/transport/hpack_parser.h \ +src/core/ext/transport/chttp2/transport/hpack_table.h \ +src/core/ext/transport/chttp2/transport/http2_errors.h \ +src/core/ext/transport/chttp2/transport/huffsyms.h \ +src/core/ext/transport/chttp2/transport/incoming_metadata.h \ +src/core/ext/transport/chttp2/transport/internal.h \ +src/core/ext/transport/chttp2/transport/status_conversion.h \ +src/core/ext/transport/chttp2/transport/stream_map.h \ +src/core/ext/transport/chttp2/transport/timeout_encoding.h \ +src/core/ext/transport/chttp2/transport/varint.h \ +src/core/lib/census/aggregation.h \ +src/core/lib/census/grpc_filter.h \ +src/core/lib/census/grpc_plugin.h \ +src/core/lib/census/mlog.h \ +src/core/lib/census/rpc_metric_id.h \ +src/core/lib/channel/channel_args.h \ +src/core/lib/channel/channel_stack.h \ +src/core/lib/channel/channel_stack_builder.h \ +src/core/lib/channel/client_channel.h \ +src/core/lib/channel/compress_filter.h \ +src/core/lib/channel/connected_channel.h \ +src/core/lib/channel/context.h \ +src/core/lib/channel/http_client_filter.h \ +src/core/lib/channel/http_server_filter.h \ +src/core/lib/channel/subchannel_call_holder.h \ +src/core/lib/client_config/client_config.h \ +src/core/lib/client_config/connector.h \ +src/core/lib/client_config/initial_connect_string.h \ +src/core/lib/client_config/lb_policies/load_balancer_api.h \ +src/core/lib/client_config/lb_policies/pick_first.h \ +src/core/lib/client_config/lb_policies/round_robin.h \ +src/core/lib/client_config/lb_policy.h \ +src/core/lib/client_config/lb_policy_factory.h \ +src/core/lib/client_config/lb_policy_registry.h \ +src/core/lib/client_config/resolver.h \ +src/core/lib/client_config/resolver_factory.h \ +src/core/lib/client_config/resolver_registry.h \ +src/core/lib/client_config/resolvers/dns_resolver.h \ +src/core/lib/client_config/resolvers/sockaddr_resolver.h \ +src/core/lib/client_config/subchannel.h \ +src/core/lib/client_config/subchannel_factory.h \ +src/core/lib/client_config/subchannel_index.h \ +src/core/lib/client_config/uri_parser.h \ +src/core/lib/compression/algorithm_metadata.h \ +src/core/lib/compression/message_compress.h \ +src/core/lib/debug/trace.h \ +src/core/lib/http/format_request.h \ +src/core/lib/http/httpcli.h \ +src/core/lib/http/parser.h \ +src/core/lib/iomgr/closure.h \ +src/core/lib/iomgr/endpoint.h \ +src/core/lib/iomgr/endpoint_pair.h \ +src/core/lib/iomgr/exec_ctx.h \ +src/core/lib/iomgr/executor.h \ +src/core/lib/iomgr/fd_posix.h \ +src/core/lib/iomgr/iocp_windows.h \ +src/core/lib/iomgr/iomgr.h \ +src/core/lib/iomgr/iomgr_internal.h \ +src/core/lib/iomgr/iomgr_posix.h \ +src/core/lib/iomgr/pollset.h \ +src/core/lib/iomgr/pollset_posix.h \ +src/core/lib/iomgr/pollset_set.h \ +src/core/lib/iomgr/pollset_set_posix.h \ +src/core/lib/iomgr/pollset_set_windows.h \ +src/core/lib/iomgr/pollset_windows.h \ +src/core/lib/iomgr/resolve_address.h \ +src/core/lib/iomgr/sockaddr.h \ +src/core/lib/iomgr/sockaddr_posix.h \ +src/core/lib/iomgr/sockaddr_utils.h \ +src/core/lib/iomgr/sockaddr_win32.h \ +src/core/lib/iomgr/socket_utils_posix.h \ +src/core/lib/iomgr/socket_windows.h \ +src/core/lib/iomgr/tcp_client.h \ +src/core/lib/iomgr/tcp_posix.h \ +src/core/lib/iomgr/tcp_server.h \ +src/core/lib/iomgr/tcp_windows.h \ +src/core/lib/iomgr/time_averaged_stats.h \ +src/core/lib/iomgr/timer.h \ +src/core/lib/iomgr/timer_heap.h \ +src/core/lib/iomgr/udp_server.h \ +src/core/lib/iomgr/unix_sockets_posix.h \ +src/core/lib/iomgr/wakeup_fd_pipe.h \ +src/core/lib/iomgr/wakeup_fd_posix.h \ +src/core/lib/iomgr/workqueue.h \ +src/core/lib/iomgr/workqueue_posix.h \ +src/core/lib/iomgr/workqueue_windows.h \ +src/core/lib/json/json.h \ +src/core/lib/json/json_common.h \ +src/core/lib/json/json_reader.h \ +src/core/lib/json/json_writer.h \ +src/core/lib/proto/grpc/lb/v0/load_balancer.pb.h \ +src/core/lib/security/auth_filters.h \ +src/core/lib/security/b64.h \ +src/core/lib/security/credentials.h \ +src/core/lib/security/handshake.h \ +src/core/lib/security/json_token.h \ +src/core/lib/security/jwt_verifier.h \ +src/core/lib/security/secure_endpoint.h \ +src/core/lib/security/security_connector.h \ +src/core/lib/security/security_context.h \ +src/core/lib/statistics/census_interface.h \ +src/core/lib/statistics/census_rpc_stats.h \ +src/core/lib/surface/api_trace.h \ +src/core/lib/surface/call.h \ +src/core/lib/surface/call_test_only.h \ +src/core/lib/surface/channel.h \ +src/core/lib/surface/channel_init.h \ +src/core/lib/surface/channel_stack_type.h \ +src/core/lib/surface/completion_queue.h \ +src/core/lib/surface/event_string.h \ +src/core/lib/surface/init.h \ +src/core/lib/surface/lame_client.h \ +src/core/lib/surface/server.h \ +src/core/lib/surface/surface_trace.h \ +src/core/lib/transport/byte_stream.h \ +src/core/lib/transport/connectivity_state.h \ +src/core/lib/transport/metadata.h \ +src/core/lib/transport/metadata_batch.h \ +src/core/lib/transport/static_metadata.h \ +src/core/lib/transport/transport.h \ +src/core/lib/transport/transport_impl.h \ +src/core/lib/tsi/fake_transport_security.h \ +src/core/lib/tsi/ssl_transport_security.h \ +src/core/lib/tsi/ssl_types.h \ +src/core/lib/tsi/transport_security.h \ +src/core/lib/tsi/transport_security_interface.h \ third_party/nanopb/pb.h \ third_party/nanopb/pb_common.h \ third_party/nanopb/pb_decode.h \ third_party/nanopb/pb_encode.h \ -src/core/census/grpc_context.c \ -src/core/census/grpc_filter.c \ -src/core/channel/channel_args.c \ -src/core/channel/channel_stack.c \ -src/core/channel/client_channel.c \ -src/core/channel/client_uchannel.c \ -src/core/channel/compress_filter.c \ -src/core/channel/connected_channel.c \ -src/core/channel/http_client_filter.c \ -src/core/channel/http_server_filter.c \ -src/core/channel/subchannel_call_holder.c \ -src/core/client_config/client_config.c \ -src/core/client_config/connector.c \ -src/core/client_config/default_initial_connect_string.c \ -src/core/client_config/initial_connect_string.c \ -src/core/client_config/lb_policies/load_balancer_api.c \ -src/core/client_config/lb_policies/pick_first.c \ -src/core/client_config/lb_policies/round_robin.c \ -src/core/client_config/lb_policy.c \ -src/core/client_config/lb_policy_factory.c \ -src/core/client_config/lb_policy_registry.c \ -src/core/client_config/resolver.c \ -src/core/client_config/resolver_factory.c \ -src/core/client_config/resolver_registry.c \ -src/core/client_config/resolvers/dns_resolver.c \ -src/core/client_config/resolvers/sockaddr_resolver.c \ -src/core/client_config/subchannel.c \ -src/core/client_config/subchannel_factory.c \ -src/core/client_config/subchannel_index.c \ -src/core/client_config/uri_parser.c \ -src/core/compression/compression_algorithm.c \ -src/core/compression/message_compress.c \ -src/core/debug/trace.c \ -src/core/httpcli/format_request.c \ -src/core/httpcli/httpcli.c \ -src/core/httpcli/parser.c \ -src/core/iomgr/closure.c \ -src/core/iomgr/endpoint.c \ -src/core/iomgr/endpoint_pair_posix.c \ -src/core/iomgr/endpoint_pair_windows.c \ -src/core/iomgr/exec_ctx.c \ -src/core/iomgr/executor.c \ -src/core/iomgr/fd_posix.c \ -src/core/iomgr/iocp_windows.c \ -src/core/iomgr/iomgr.c \ -src/core/iomgr/iomgr_posix.c \ -src/core/iomgr/iomgr_windows.c \ -src/core/iomgr/pollset_multipoller_with_epoll.c \ -src/core/iomgr/pollset_multipoller_with_poll_posix.c \ -src/core/iomgr/pollset_posix.c \ -src/core/iomgr/pollset_set_posix.c \ -src/core/iomgr/pollset_set_windows.c \ -src/core/iomgr/pollset_windows.c \ -src/core/iomgr/resolve_address_posix.c \ -src/core/iomgr/resolve_address_windows.c \ -src/core/iomgr/sockaddr_utils.c \ -src/core/iomgr/socket_utils_common_posix.c \ -src/core/iomgr/socket_utils_linux.c \ -src/core/iomgr/socket_utils_posix.c \ -src/core/iomgr/socket_windows.c \ -src/core/iomgr/tcp_client_posix.c \ -src/core/iomgr/tcp_client_windows.c \ -src/core/iomgr/tcp_posix.c \ -src/core/iomgr/tcp_server_posix.c \ -src/core/iomgr/tcp_server_windows.c \ -src/core/iomgr/tcp_windows.c \ -src/core/iomgr/time_averaged_stats.c \ -src/core/iomgr/timer.c \ -src/core/iomgr/timer_heap.c \ -src/core/iomgr/udp_server.c \ -src/core/iomgr/wakeup_fd_eventfd.c \ -src/core/iomgr/wakeup_fd_nospecial.c \ -src/core/iomgr/wakeup_fd_pipe.c \ -src/core/iomgr/wakeup_fd_posix.c \ -src/core/iomgr/workqueue_posix.c \ -src/core/iomgr/workqueue_windows.c \ -src/core/json/json.c \ -src/core/json/json_reader.c \ -src/core/json/json_string.c \ -src/core/json/json_writer.c \ -src/core/proto/grpc/lb/v0/load_balancer.pb.c \ -src/core/surface/alarm.c \ -src/core/surface/api_trace.c \ -src/core/surface/byte_buffer.c \ -src/core/surface/byte_buffer_reader.c \ -src/core/surface/call.c \ -src/core/surface/call_details.c \ -src/core/surface/call_log_batch.c \ -src/core/surface/channel.c \ -src/core/surface/channel_connectivity.c \ -src/core/surface/channel_create.c \ -src/core/surface/channel_ping.c \ -src/core/surface/completion_queue.c \ -src/core/surface/event_string.c \ -src/core/surface/init.c \ -src/core/surface/lame_client.c \ -src/core/surface/metadata_array.c \ -src/core/surface/server.c \ -src/core/surface/server_chttp2.c \ -src/core/surface/server_create.c \ -src/core/surface/validate_metadata.c \ -src/core/surface/version.c \ -src/core/transport/byte_stream.c \ -src/core/transport/chttp2/alpn.c \ -src/core/transport/chttp2/bin_encoder.c \ -src/core/transport/chttp2/frame_data.c \ -src/core/transport/chttp2/frame_goaway.c \ -src/core/transport/chttp2/frame_ping.c \ -src/core/transport/chttp2/frame_rst_stream.c \ -src/core/transport/chttp2/frame_settings.c \ -src/core/transport/chttp2/frame_window_update.c \ -src/core/transport/chttp2/hpack_encoder.c \ -src/core/transport/chttp2/hpack_parser.c \ -src/core/transport/chttp2/hpack_table.c \ -src/core/transport/chttp2/huffsyms.c \ -src/core/transport/chttp2/incoming_metadata.c \ -src/core/transport/chttp2/parsing.c \ -src/core/transport/chttp2/status_conversion.c \ -src/core/transport/chttp2/stream_lists.c \ -src/core/transport/chttp2/stream_map.c \ -src/core/transport/chttp2/timeout_encoding.c \ -src/core/transport/chttp2/varint.c \ -src/core/transport/chttp2/writing.c \ -src/core/transport/chttp2_transport.c \ -src/core/transport/connectivity_state.c \ -src/core/transport/metadata.c \ -src/core/transport/metadata_batch.c \ -src/core/transport/static_metadata.c \ -src/core/transport/transport.c \ -src/core/transport/transport_op_string.c \ -src/core/httpcli/httpcli_security_connector.c \ -src/core/security/b64.c \ -src/core/security/client_auth_filter.c \ -src/core/security/credentials.c \ -src/core/security/credentials_metadata.c \ -src/core/security/credentials_posix.c \ -src/core/security/credentials_win32.c \ -src/core/security/google_default_credentials.c \ -src/core/security/handshake.c \ -src/core/security/json_token.c \ -src/core/security/jwt_verifier.c \ -src/core/security/secure_endpoint.c \ -src/core/security/security_connector.c \ -src/core/security/security_context.c \ -src/core/security/server_auth_filter.c \ -src/core/security/server_secure_chttp2.c \ -src/core/surface/init_secure.c \ -src/core/surface/secure_channel_create.c \ -src/core/tsi/fake_transport_security.c \ -src/core/tsi/ssl_transport_security.c \ -src/core/tsi/transport_security.c \ -src/core/census/context.c \ -src/core/census/initialize.c \ -src/core/census/mlog.c \ -src/core/census/operation.c \ -src/core/census/placeholders.c \ -src/core/census/tracing.c \ +src/core/ext/transport/chttp2/client/insecure/channel_create.c \ +src/core/ext/transport/chttp2/client/secure/secure_channel_create.c \ +src/core/ext/transport/chttp2/server/insecure/server_chttp2.c \ +src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c \ +src/core/ext/transport/chttp2/transport/alpn.c \ +src/core/ext/transport/chttp2/transport/bin_encoder.c \ +src/core/ext/transport/chttp2/transport/chttp2_transport.c \ +src/core/ext/transport/chttp2/transport/frame_data.c \ +src/core/ext/transport/chttp2/transport/frame_goaway.c \ +src/core/ext/transport/chttp2/transport/frame_ping.c \ +src/core/ext/transport/chttp2/transport/frame_rst_stream.c \ +src/core/ext/transport/chttp2/transport/frame_settings.c \ +src/core/ext/transport/chttp2/transport/frame_window_update.c \ +src/core/ext/transport/chttp2/transport/hpack_encoder.c \ +src/core/ext/transport/chttp2/transport/hpack_parser.c \ +src/core/ext/transport/chttp2/transport/hpack_table.c \ +src/core/ext/transport/chttp2/transport/huffsyms.c \ +src/core/ext/transport/chttp2/transport/incoming_metadata.c \ +src/core/ext/transport/chttp2/transport/parsing.c \ +src/core/ext/transport/chttp2/transport/status_conversion.c \ +src/core/ext/transport/chttp2/transport/stream_lists.c \ +src/core/ext/transport/chttp2/transport/stream_map.c \ +src/core/ext/transport/chttp2/transport/timeout_encoding.c \ +src/core/ext/transport/chttp2/transport/varint.c \ +src/core/ext/transport/chttp2/transport/writing.c \ +src/core/lib/census/context.c \ +src/core/lib/census/grpc_context.c \ +src/core/lib/census/grpc_filter.c \ +src/core/lib/census/grpc_plugin.c \ +src/core/lib/census/initialize.c \ +src/core/lib/census/mlog.c \ +src/core/lib/census/operation.c \ +src/core/lib/census/placeholders.c \ +src/core/lib/census/tracing.c \ +src/core/lib/channel/channel_args.c \ +src/core/lib/channel/channel_stack.c \ +src/core/lib/channel/channel_stack_builder.c \ +src/core/lib/channel/client_channel.c \ +src/core/lib/channel/compress_filter.c \ +src/core/lib/channel/connected_channel.c \ +src/core/lib/channel/http_client_filter.c \ +src/core/lib/channel/http_server_filter.c \ +src/core/lib/channel/subchannel_call_holder.c \ +src/core/lib/client_config/client_config.c \ +src/core/lib/client_config/connector.c \ +src/core/lib/client_config/default_initial_connect_string.c \ +src/core/lib/client_config/initial_connect_string.c \ +src/core/lib/client_config/lb_policies/load_balancer_api.c \ +src/core/lib/client_config/lb_policies/pick_first.c \ +src/core/lib/client_config/lb_policies/round_robin.c \ +src/core/lib/client_config/lb_policy.c \ +src/core/lib/client_config/lb_policy_factory.c \ +src/core/lib/client_config/lb_policy_registry.c \ +src/core/lib/client_config/resolver.c \ +src/core/lib/client_config/resolver_factory.c \ +src/core/lib/client_config/resolver_registry.c \ +src/core/lib/client_config/resolvers/dns_resolver.c \ +src/core/lib/client_config/resolvers/sockaddr_resolver.c \ +src/core/lib/client_config/subchannel.c \ +src/core/lib/client_config/subchannel_factory.c \ +src/core/lib/client_config/subchannel_index.c \ +src/core/lib/client_config/uri_parser.c \ +src/core/lib/compression/compression_algorithm.c \ +src/core/lib/compression/message_compress.c \ +src/core/lib/debug/trace.c \ +src/core/lib/http/format_request.c \ +src/core/lib/http/httpcli.c \ +src/core/lib/http/httpcli_security_connector.c \ +src/core/lib/http/parser.c \ +src/core/lib/iomgr/closure.c \ +src/core/lib/iomgr/endpoint.c \ +src/core/lib/iomgr/endpoint_pair_posix.c \ +src/core/lib/iomgr/endpoint_pair_windows.c \ +src/core/lib/iomgr/exec_ctx.c \ +src/core/lib/iomgr/executor.c \ +src/core/lib/iomgr/fd_posix.c \ +src/core/lib/iomgr/iocp_windows.c \ +src/core/lib/iomgr/iomgr.c \ +src/core/lib/iomgr/iomgr_posix.c \ +src/core/lib/iomgr/iomgr_windows.c \ +src/core/lib/iomgr/pollset_multipoller_with_epoll.c \ +src/core/lib/iomgr/pollset_multipoller_with_poll_posix.c \ +src/core/lib/iomgr/pollset_posix.c \ +src/core/lib/iomgr/pollset_set_posix.c \ +src/core/lib/iomgr/pollset_set_windows.c \ +src/core/lib/iomgr/pollset_windows.c \ +src/core/lib/iomgr/resolve_address_posix.c \ +src/core/lib/iomgr/resolve_address_windows.c \ +src/core/lib/iomgr/sockaddr_utils.c \ +src/core/lib/iomgr/socket_utils_common_posix.c \ +src/core/lib/iomgr/socket_utils_linux.c \ +src/core/lib/iomgr/socket_utils_posix.c \ +src/core/lib/iomgr/socket_windows.c \ +src/core/lib/iomgr/tcp_client_posix.c \ +src/core/lib/iomgr/tcp_client_windows.c \ +src/core/lib/iomgr/tcp_posix.c \ +src/core/lib/iomgr/tcp_server_posix.c \ +src/core/lib/iomgr/tcp_server_windows.c \ +src/core/lib/iomgr/tcp_windows.c \ +src/core/lib/iomgr/time_averaged_stats.c \ +src/core/lib/iomgr/timer.c \ +src/core/lib/iomgr/timer_heap.c \ +src/core/lib/iomgr/udp_server.c \ +src/core/lib/iomgr/unix_sockets_posix.c \ +src/core/lib/iomgr/unix_sockets_posix_noop.c \ +src/core/lib/iomgr/wakeup_fd_eventfd.c \ +src/core/lib/iomgr/wakeup_fd_nospecial.c \ +src/core/lib/iomgr/wakeup_fd_pipe.c \ +src/core/lib/iomgr/wakeup_fd_posix.c \ +src/core/lib/iomgr/workqueue_posix.c \ +src/core/lib/iomgr/workqueue_windows.c \ +src/core/lib/json/json.c \ +src/core/lib/json/json_reader.c \ +src/core/lib/json/json_string.c \ +src/core/lib/json/json_writer.c \ +src/core/lib/proto/grpc/lb/v0/load_balancer.pb.c \ +src/core/lib/security/b64.c \ +src/core/lib/security/client_auth_filter.c \ +src/core/lib/security/credentials.c \ +src/core/lib/security/credentials_metadata.c \ +src/core/lib/security/credentials_posix.c \ +src/core/lib/security/credentials_win32.c \ +src/core/lib/security/google_default_credentials.c \ +src/core/lib/security/handshake.c \ +src/core/lib/security/json_token.c \ +src/core/lib/security/jwt_verifier.c \ +src/core/lib/security/secure_endpoint.c \ +src/core/lib/security/security_connector.c \ +src/core/lib/security/security_context.c \ +src/core/lib/security/server_auth_filter.c \ +src/core/lib/surface/alarm.c \ +src/core/lib/surface/api_trace.c \ +src/core/lib/surface/byte_buffer.c \ +src/core/lib/surface/byte_buffer_reader.c \ +src/core/lib/surface/call.c \ +src/core/lib/surface/call_details.c \ +src/core/lib/surface/call_log_batch.c \ +src/core/lib/surface/channel.c \ +src/core/lib/surface/channel_connectivity.c \ +src/core/lib/surface/channel_init.c \ +src/core/lib/surface/channel_ping.c \ +src/core/lib/surface/channel_stack_type.c \ +src/core/lib/surface/completion_queue.c \ +src/core/lib/surface/event_string.c \ +src/core/lib/surface/init.c \ +src/core/lib/surface/init_secure.c \ +src/core/lib/surface/lame_client.c \ +src/core/lib/surface/metadata_array.c \ +src/core/lib/surface/server.c \ +src/core/lib/surface/validate_metadata.c \ +src/core/lib/surface/version.c \ +src/core/lib/transport/byte_stream.c \ +src/core/lib/transport/connectivity_state.c \ +src/core/lib/transport/metadata.c \ +src/core/lib/transport/metadata_batch.c \ +src/core/lib/transport/static_metadata.c \ +src/core/lib/transport/transport.c \ +src/core/lib/transport/transport_op_string.c \ +src/core/lib/tsi/fake_transport_security.c \ +src/core/lib/tsi/ssl_transport_security.c \ +src/core/lib/tsi/transport_security.c \ third_party/nanopb/pb_common.c \ third_party/nanopb/pb_decode.c \ third_party/nanopb/pb_encode.c \ +include/grpc/impl/codegen/alloc.h \ +include/grpc/impl/codegen/atm.h \ +include/grpc/impl/codegen/atm_gcc_atomic.h \ +include/grpc/impl/codegen/atm_gcc_sync.h \ +include/grpc/impl/codegen/atm_win32.h \ +include/grpc/impl/codegen/log.h \ +include/grpc/impl/codegen/port_platform.h \ +include/grpc/impl/codegen/slice.h \ +include/grpc/impl/codegen/slice_buffer.h \ +include/grpc/impl/codegen/sync.h \ +include/grpc/impl/codegen/sync_generic.h \ +include/grpc/impl/codegen/sync_posix.h \ +include/grpc/impl/codegen/sync_win32.h \ +include/grpc/impl/codegen/time.h \ include/grpc/support/alloc.h \ include/grpc/support/atm.h \ include/grpc/support/atm_gcc_atomic.h \ @@ -1097,74 +1120,62 @@ include/grpc/support/tls_gcc.h \ include/grpc/support/tls_msvc.h \ include/grpc/support/tls_pthread.h \ include/grpc/support/useful.h \ -include/grpc/impl/codegen/alloc.h \ -include/grpc/impl/codegen/atm.h \ -include/grpc/impl/codegen/atm_gcc_atomic.h \ -include/grpc/impl/codegen/atm_gcc_sync.h \ -include/grpc/impl/codegen/atm_win32.h \ -include/grpc/impl/codegen/log.h \ -include/grpc/impl/codegen/port_platform.h \ -include/grpc/impl/codegen/slice.h \ -include/grpc/impl/codegen/slice_buffer.h \ -include/grpc/impl/codegen/sync.h \ -include/grpc/impl/codegen/sync_generic.h \ -include/grpc/impl/codegen/sync_posix.h \ -include/grpc/impl/codegen/sync_win32.h \ -include/grpc/impl/codegen/time.h \ -src/core/profiling/timers.h \ -src/core/support/block_annotate.h \ -src/core/support/env.h \ -src/core/support/load_file.h \ -src/core/support/murmur_hash.h \ -src/core/support/stack_lockfree.h \ -src/core/support/string.h \ -src/core/support/string_win32.h \ -src/core/support/thd_internal.h \ -src/core/support/time_precise.h \ -src/core/support/tmpfile.h \ -src/core/profiling/basic_timers.c \ -src/core/profiling/stap_timers.c \ -src/core/support/alloc.c \ -src/core/support/avl.c \ -src/core/support/cmdline.c \ -src/core/support/cpu_iphone.c \ -src/core/support/cpu_linux.c \ -src/core/support/cpu_posix.c \ -src/core/support/cpu_windows.c \ -src/core/support/env_linux.c \ -src/core/support/env_posix.c \ -src/core/support/env_win32.c \ -src/core/support/histogram.c \ -src/core/support/host_port.c \ -src/core/support/load_file.c \ -src/core/support/log.c \ -src/core/support/log_android.c \ -src/core/support/log_linux.c \ -src/core/support/log_posix.c \ -src/core/support/log_win32.c \ -src/core/support/murmur_hash.c \ -src/core/support/slice.c \ -src/core/support/slice_buffer.c \ -src/core/support/stack_lockfree.c \ -src/core/support/string.c \ -src/core/support/string_posix.c \ -src/core/support/string_win32.c \ -src/core/support/subprocess_posix.c \ -src/core/support/subprocess_windows.c \ -src/core/support/sync.c \ -src/core/support/sync_posix.c \ -src/core/support/sync_win32.c \ -src/core/support/thd.c \ -src/core/support/thd_posix.c \ -src/core/support/thd_win32.c \ -src/core/support/time.c \ -src/core/support/time_posix.c \ -src/core/support/time_precise.c \ -src/core/support/time_win32.c \ -src/core/support/tls_pthread.c \ -src/core/support/tmpfile_posix.c \ -src/core/support/tmpfile_win32.c \ -src/core/support/wrap_memcpy.c +src/core/lib/profiling/timers.h \ +src/core/lib/support/backoff.h \ +src/core/lib/support/block_annotate.h \ +src/core/lib/support/env.h \ +src/core/lib/support/load_file.h \ +src/core/lib/support/murmur_hash.h \ +src/core/lib/support/stack_lockfree.h \ +src/core/lib/support/string.h \ +src/core/lib/support/string_win32.h \ +src/core/lib/support/thd_internal.h \ +src/core/lib/support/time_precise.h \ +src/core/lib/support/tmpfile.h \ +src/core/lib/profiling/basic_timers.c \ +src/core/lib/profiling/stap_timers.c \ +src/core/lib/support/alloc.c \ +src/core/lib/support/avl.c \ +src/core/lib/support/backoff.c \ +src/core/lib/support/cmdline.c \ +src/core/lib/support/cpu_iphone.c \ +src/core/lib/support/cpu_linux.c \ +src/core/lib/support/cpu_posix.c \ +src/core/lib/support/cpu_windows.c \ +src/core/lib/support/env_linux.c \ +src/core/lib/support/env_posix.c \ +src/core/lib/support/env_win32.c \ +src/core/lib/support/histogram.c \ +src/core/lib/support/host_port.c \ +src/core/lib/support/load_file.c \ +src/core/lib/support/log.c \ +src/core/lib/support/log_android.c \ +src/core/lib/support/log_linux.c \ +src/core/lib/support/log_posix.c \ +src/core/lib/support/log_win32.c \ +src/core/lib/support/murmur_hash.c \ +src/core/lib/support/slice.c \ +src/core/lib/support/slice_buffer.c \ +src/core/lib/support/stack_lockfree.c \ +src/core/lib/support/string.c \ +src/core/lib/support/string_posix.c \ +src/core/lib/support/string_win32.c \ +src/core/lib/support/subprocess_posix.c \ +src/core/lib/support/subprocess_windows.c \ +src/core/lib/support/sync.c \ +src/core/lib/support/sync_posix.c \ +src/core/lib/support/sync_win32.c \ +src/core/lib/support/thd.c \ +src/core/lib/support/thd_posix.c \ +src/core/lib/support/thd_win32.c \ +src/core/lib/support/time.c \ +src/core/lib/support/time_posix.c \ +src/core/lib/support/time_precise.c \ +src/core/lib/support/time_win32.c \ +src/core/lib/support/tls_pthread.c \ +src/core/lib/support/tmpfile_posix.c \ +src/core/lib/support/tmpfile_win32.c \ +src/core/lib/support/wrap_memcpy.c # This tag can be used to specify the character encoding of the source files # that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses diff --git a/tools/gce/create_linux_performance_worker.sh b/tools/gce/create_linux_performance_worker.sh new file mode 100755 index 00000000000..720fc80a0de --- /dev/null +++ b/tools/gce/create_linux_performance_worker.sh @@ -0,0 +1,61 @@ +#!/bin/bash +# Copyright 2015-2016, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +# Creates a performance worker on GCE. + +set -ex + +cd $(dirname $0) + +CLOUD_PROJECT=grpc-testing +ZONE=us-central1-b # this zone allows 32core machines + +INSTANCE_NAME="${1:-grpc-performance-driver}" +MACHINE_TYPE=n1-standard-32 + +gcloud compute instances create $INSTANCE_NAME \ + --project="$CLOUD_PROJECT" \ + --zone "$ZONE" \ + --machine-type $MACHINE_TYPE \ + --image ubuntu-15-10 \ + --boot-disk-size 300 + +echo 'Created GCE instance, waiting 60 seconds for it to come online.' +sleep 60 + +gcloud compute copy-files \ + --project="$CLOUD_PROJECT" \ + --zone "$ZONE" \ + jenkins_master.pub linux_performance_worker_init.sh ${INSTANCE_NAME}:~ + +gcloud compute ssh \ + --project="$CLOUD_PROJECT" \ + --zone "$ZONE" \ + $INSTANCE_NAME --command "./linux_performance_worker_init.sh" diff --git a/tools/gce/linux_performance_worker_init.sh b/tools/gce/linux_performance_worker_init.sh new file mode 100755 index 00000000000..bae2b51106b --- /dev/null +++ b/tools/gce/linux_performance_worker_init.sh @@ -0,0 +1,106 @@ +#!/bin/bash +# Copyright 2015-2016, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +# Initializes a fresh GCE VM to become a jenkins linux performance worker. +# You shouldn't run this script on your own, +# use create_linux_performance_worker.sh instead. + +set -ex + +sudo apt-get update + +# Install JRE +sudo apt-get install -y openjdk-7-jre +sudo apt-get install -y unzip lsof + +# Setup jenkins user (or the user will already exist bcuz magic) +sudo adduser jenkins --disabled-password || true + +# Add pubkey of jenkins@grpc-jenkins-master to authorized keys of jenkins@ +# This needs to happen as the last step to prevent Jenkins master from connecting +# to a machine that hasn't been properly setup yet. +cat jenkins_master.pub | sudo tee --append ~jenkins/.ssh/authorized_keys + +sudo apt-get install -y \ + autoconf \ + autotools-dev \ + build-essential \ + bzip2 \ + ccache \ + curl \ + gcc \ + gcc-multilib \ + git \ + gyp \ + lcov \ + libc6 \ + libc6-dbg \ + libc6-dev \ + libgtest-dev \ + libtool \ + make \ + strace \ + pypy \ + python-dev \ + python-pip \ + python-setuptools \ + python-yaml \ + telnet \ + unzip \ + wget \ + zip + +# perftools +sudo apt-get install -y google-perftools libgoogle-perftools-dev + +# C++ dependencies +sudo apt-get install -y libgflags-dev libgtest-dev libc++-dev clang + +# Python dependencies +sudo pip install tabulate +curl -O https://bootstrap.pypa.io/get-pip.py +sudo pypy get-pip.py +sudo pypy -m pip install tabulate + +# Node dependences. +touch .profile +curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.25.4/install.sh | bash +nvm install 0.12 && npm config set cache /tmp/npm-cache + +# C# dependencies (http://www.mono-project.com/docs/getting-started/install/linux/#debian-ubuntu-and-derivatives) + +sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF +echo "deb http://download.mono-project.com/repo/debian wheezy main" | sudo tee /etc/apt/sources.list.d/mono-xamarin.list +sudo apt-get update +sudo apt-get install -y mono-devel nuget + +# Ruby dependencies +gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 +curl -sSL https://get.rvm.io | bash -s stable --ruby diff --git a/tools/http2_interop/http2interop_test.go b/tools/http2_interop/http2interop_test.go index fb314da1964..305125f0c11 100644 --- a/tools/http2_interop/http2interop_test.go +++ b/tools/http2_interop/http2interop_test.go @@ -49,7 +49,7 @@ func InteropCtx(t *testing.T) *HTTP2InteropCtx { if ctx.UseTestCa { // It would be odd if useTestCa was true, but not useTls. meh - certData, err := ioutil.ReadFile("src/core/tsi/test_creds/ca.pem") + certData, err := ioutil.ReadFile("src/core/lib/tsi/test_creds/ca.pem") if err != nil { t.Fatal(err) } diff --git a/tools/jenkins/build_interop_stress_image.sh b/tools/jenkins/build_interop_stress_image.sh index 501dc5b7ca4..b5dbcc5ce4b 100755 --- a/tools/jenkins/build_interop_stress_image.sh +++ b/tools/jenkins/build_interop_stress_image.sh @@ -34,10 +34,12 @@ set -x # Params: -# INTEROP_IMAGE - name of tag of the final interop image +# INTEROP_IMAGE - Name of tag of the final interop image # INTEROP_IMAGE_TAG - Optional. If set, the created image will be tagged using # the command: 'docker tag $INTEROP_IMAGE $INTEROP_IMAGE_REPOSITORY_TAG' -# BASE_NAME - base name used to locate the base Dockerfile and build script +# BASE_NAME - Base name used to locate the base Dockerfile and build script +# BUILD_TYPE - The 'CONFIG' variable passed to the 'make' command (example: +# asan, tsan. Default value: opt). # TTY_FLAG - optional -t flag to make docker allocate tty # BUILD_INTEROP_DOCKER_EXTRA_ARGS - optional args to be passed to the # docker run command @@ -71,6 +73,7 @@ CONTAINER_NAME="build_${BASE_NAME}_$(uuidgen)" (docker run \ -e CCACHE_DIR=/tmp/ccache \ -e THIS_IS_REALLY_NEEDED='see https://github.com/docker/docker/issues/14203 for why docker is awful' \ + -e BUILD_TYPE=${BUILD_TYPE:=opt} \ -i $TTY_FLAG \ $MOUNT_ARGS \ $BUILD_INTEROP_DOCKER_EXTRA_ARGS \ diff --git a/tools/openssl/use_openssl.sh b/tools/openssl/use_openssl.sh index 3098217ec1b..9318b342578 100755 --- a/tools/openssl/use_openssl.sh +++ b/tools/openssl/use_openssl.sh @@ -38,8 +38,8 @@ CC=${CC:-cc} # allow openssl to be pre-downloaded if [ ! -e third_party/openssl-1.0.2f.tar.gz ] then - echo "Downloading http://openssl.org/source/openssl-1.0.2f.tar.gz to third_party/openssl-1.0.2f.tar.gz" - wget http://openssl.org/source/openssl-1.0.2f.tar.gz -O third_party/openssl-1.0.2f.tar.gz + echo "Downloading https://openssl.org/source/old/1.0.2/openssl-1.0.2f.tar.gz to third_party/openssl-1.0.2f.tar.gz" + wget https://openssl.org/source/old/1.0.2/openssl-1.0.2f.tar.gz -O third_party/openssl-1.0.2f.tar.gz fi # clean openssl directory diff --git a/tools/run_tests/run_tests.py b/tools/run_tests/run_tests.py index 99bf5df1f92..a9438045aa6 100755 --- a/tools/run_tests/run_tests.py +++ b/tools/run_tests/run_tests.py @@ -80,7 +80,7 @@ class Config(object): self.timeout_multiplier = timeout_multiplier def job_spec(self, cmdline, hash_targets, timeout_seconds=5*60, - shortname=None, environ={}, cpu_cost=1.0): + shortname=None, environ={}, cpu_cost=1.0, flaky=False): """Construct a jobset.JobSpec for a test under this config Args: @@ -102,7 +102,7 @@ class Config(object): timeout_seconds=(self.timeout_multiplier * timeout_seconds if timeout_seconds else None), hash_targets=hash_targets if self.allow_hashing else None, - flake_retries=5 if args.allow_flakes else 0, + flake_retries=5 if flaky or args.allow_flakes else 0, timeout_retries=3 if args.allow_flakes else 0) @@ -183,14 +183,15 @@ class CLanguage(object): shortname='%s:%s' % (binary, test), cpu_cost=target['cpu_cost'], environ={'GRPC_DEFAULT_SSL_ROOTS_FILE_PATH': - _ROOT + '/src/core/tsi/test_creds/ca.pem'})) + _ROOT + '/src/core/lib/tsi/test_creds/ca.pem'})) else: cmdline = [binary] + target['args'] out.append(self.config.job_spec(cmdline, [binary], shortname=' '.join(cmdline), cpu_cost=target['cpu_cost'], + flaky=target.get('flaky', False), environ={'GRPC_DEFAULT_SSL_ROOTS_FILE_PATH': - _ROOT + '/src/core/tsi/test_creds/ca.pem'})) + _ROOT + '/src/core/lib/tsi/test_creds/ca.pem'})) elif self.args.regex == '.*' or self.platform == 'windows': print '\nWARNING: binary not found, skipping', binary return sorted(out) @@ -231,6 +232,9 @@ class CLanguage(object): def _clang_make_options(self): return ['CC=clang', 'CXX=clang++', 'LD=clang', 'LDXX=clang++'] + def _gcc44_make_options(self): + return ['CC=gcc-4.4', 'CXX=g++-4.4', 'LD=gcc-4.4', 'LDXX=g++-4.4'] + def _compiler_options(self, use_docker, compiler): """Returns docker distro and make options to use for given compiler.""" if _is_use_docker_child(): @@ -241,7 +245,7 @@ class CLanguage(object): if compiler == 'gcc4.9' or compiler == 'default': return ('jessie', []) elif compiler == 'gcc4.4': - return ('squeeze', []) + return ('wheezy', self._gcc44_make_options()) elif compiler == 'gcc5.3': return ('ubuntu1604', []) elif compiler == 'clang3.4': @@ -879,7 +883,7 @@ if args.use_docker: sys.exit(1) else: dockerfile_dir = next(iter(dockerfile_dirs)) - + child_argv = [ arg for arg in sys.argv if not arg == '--use_docker' ] run_tests_cmd = 'python tools/run_tests/run_tests.py %s' % ' '.join(child_argv[1:]) diff --git a/tools/run_tests/sanity/check_sources_and_headers.py b/tools/run_tests/sanity/check_sources_and_headers.py index 44dc49bb06f..b5f7912796e 100755 --- a/tools/run_tests/sanity/check_sources_and_headers.py +++ b/tools/run_tests/sanity/check_sources_and_headers.py @@ -55,7 +55,7 @@ def target_has_header(target, name): for dep in target['deps']: if target_has_header(get_target(dep), name): return True - if name == 'src/core/profiling/stap_probes.h': + if name == 'src/core/lib/profiling/stap_probes.h': return True return False diff --git a/tools/run_tests/sanity/check_submodules.sh b/tools/run_tests/sanity/check_submodules.sh index 3c6dbb9ea1f..630e7fb3ae1 100755 --- a/tools/run_tests/sanity/check_submodules.sh +++ b/tools/run_tests/sanity/check_submodules.sh @@ -41,7 +41,7 @@ want_submodules=`mktemp /tmp/submXXXXXX` git submodule | awk '{ print $1 }' | sort > $submodules cat << EOF | awk '{ print $1 }' | sort > $want_submodules - 9f897b25800d2f54f5c442ef01a60721aeca6d87 third_party/boringssl (version_for_cocoapods_1.0-67-g9f897b2) + 907ae62b9d81121cb86b604f83e6b811a43f7a87 third_party/boringssl (version_for_cocoapods_1.0-72-g907ae62) 05b155ff59114735ec8cd089f669c4c3d8f59029 third_party/gflags (v2.1.0-45-g05b155f) c99458533a9b4c743ed51537e25989ea55944908 third_party/googletest (release-1.7.0) f8ac463766281625ad710900479130c7fcb4d63b third_party/nanopb (nanopb-0.3.4-29-gf8ac463) diff --git a/tools/run_tests/sanity/sanity_tests.yaml b/tools/run_tests/sanity/sanity_tests.yaml index 3840f4d8df6..f155c8da45a 100644 --- a/tools/run_tests/sanity/sanity_tests.yaml +++ b/tools/run_tests/sanity/sanity_tests.yaml @@ -8,3 +8,4 @@ - script: tools/distrib/clang_format_code.sh - script: tools/distrib/check_trailing_newlines.sh - script: tools/distrib/check_nanopb_output.sh +- script: tools/distrib/check_include_guards.py diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json index 092ed35ad97..e1bfa8719b6 100644 --- a/tools/run_tests/sources_and_headers.json +++ b/tools/run_tests/sources_and_headers.json @@ -404,6 +404,20 @@ "third_party": false, "type": "target" }, + { + "deps": [ + "gpr", + "gpr_test_util" + ], + "headers": [], + "language": "c", + "name": "gpr_backoff_test", + "src": [ + "test/core/support/backoff_test.c" + ], + "third_party": false, + "type": "target" + }, { "deps": [ "gpr", @@ -909,9 +923,9 @@ ], "headers": [], "language": "c", - "name": "httpcli_format_request_test", + "name": "http_parser_test", "src": [ - "test/core/httpcli/format_request_test.c" + "test/core/http/parser_test.c" ], "third_party": false, "type": "target" @@ -925,9 +939,9 @@ ], "headers": [], "language": "c", - "name": "httpcli_parser_test", + "name": "httpcli_format_request_test", "src": [ - "test/core/httpcli/parser_test.c" + "test/core/http/format_request_test.c" ], "third_party": false, "type": "target" @@ -943,7 +957,7 @@ "language": "c", "name": "httpcli_test", "src": [ - "test/core/httpcli/httpcli_test.c" + "test/core/http/httpcli_test.c" ], "third_party": false, "type": "target" @@ -959,7 +973,7 @@ "language": "c", "name": "httpscli_test", "src": [ - "test/core/httpcli/httpscli_test.c" + "test/core/http/httpscli_test.c" ], "third_party": false, "type": "target" @@ -1714,6 +1728,32 @@ "third_party": false, "type": "target" }, + { + "deps": [ + "grpc++_codegen_lib" + ], + "headers": [ + "src/proto/grpc/testing/control.grpc.pb.h", + "src/proto/grpc/testing/control.pb.h", + "src/proto/grpc/testing/messages.grpc.pb.h", + "src/proto/grpc/testing/messages.pb.h", + "src/proto/grpc/testing/payloads.grpc.pb.h", + "src/proto/grpc/testing/payloads.pb.h", + "src/proto/grpc/testing/perf_db.grpc.pb.h", + "src/proto/grpc/testing/perf_db.pb.h", + "src/proto/grpc/testing/services.grpc.pb.h", + "src/proto/grpc/testing/services.pb.h", + "src/proto/grpc/testing/stats.grpc.pb.h", + "src/proto/grpc/testing/stats.pb.h" + ], + "language": "c++", + "name": "codegen_test", + "src": [ + "test/cpp/codegen/codegen_test.cc" + ], + "third_party": false, + "type": "target" + }, { "deps": [ "gpr", @@ -2490,6 +2530,19 @@ "third_party": true, "type": "target" }, + { + "deps": [ + "boringssl", + "boringssl_asn1_test_lib", + "boringssl_test_util" + ], + "headers": [], + "language": "c++", + "name": "boringssl_asn1_test", + "src": [], + "third_party": true, + "type": "target" + }, { "deps": [ "boringssl", @@ -3149,7 +3202,6 @@ }, { "deps": [ - "end2end_certs", "end2end_tests", "gpr", "gpr_test_util", @@ -3167,7 +3219,6 @@ }, { "deps": [ - "end2end_certs", "end2end_tests", "gpr", "gpr_test_util", @@ -3185,7 +3236,6 @@ }, { "deps": [ - "end2end_certs", "end2end_tests", "gpr", "gpr_test_util", @@ -3203,7 +3253,6 @@ }, { "deps": [ - "end2end_certs", "end2end_tests", "gpr", "gpr_test_util", @@ -3221,7 +3270,6 @@ }, { "deps": [ - "end2end_certs", "end2end_tests", "gpr", "gpr_test_util", @@ -3239,7 +3287,6 @@ }, { "deps": [ - "end2end_certs", "end2end_tests", "gpr", "gpr_test_util", @@ -3257,7 +3304,6 @@ }, { "deps": [ - "end2end_certs", "end2end_tests", "gpr", "gpr_test_util", @@ -3275,7 +3321,23 @@ }, { "deps": [ - "end2end_certs", + "end2end_tests", + "gpr", + "gpr_test_util", + "grpc", + "grpc_test_util" + ], + "headers": [], + "language": "c", + "name": "h2_full+trace_test", + "src": [ + "test/core/end2end/fixtures/h2_full+trace.c" + ], + "third_party": false, + "type": "target" + }, + { + "deps": [ "end2end_tests", "gpr", "gpr_test_util", @@ -3293,7 +3355,6 @@ }, { "deps": [ - "end2end_certs", "end2end_tests", "gpr", "gpr_test_util", @@ -3311,7 +3372,6 @@ }, { "deps": [ - "end2end_certs", "end2end_tests", "gpr", "gpr_test_util", @@ -3329,7 +3389,6 @@ }, { "deps": [ - "end2end_certs", "end2end_tests", "gpr", "gpr_test_util", @@ -3347,7 +3406,6 @@ }, { "deps": [ - "end2end_certs", "end2end_tests", "gpr", "gpr_test_util", @@ -3365,7 +3423,6 @@ }, { "deps": [ - "end2end_certs", "end2end_tests", "gpr", "gpr_test_util", @@ -3383,7 +3440,6 @@ }, { "deps": [ - "end2end_certs", "end2end_tests", "gpr", "gpr_test_util", @@ -3401,7 +3457,6 @@ }, { "deps": [ - "end2end_certs", "end2end_tests", "gpr", "gpr_test_util", @@ -3419,25 +3474,6 @@ }, { "deps": [ - "end2end_certs", - "end2end_tests", - "gpr", - "gpr_test_util", - "grpc", - "grpc_test_util" - ], - "headers": [], - "language": "c", - "name": "h2_uchannel_test", - "src": [ - "test/core/end2end/fixtures/h2_uchannel.c" - ], - "third_party": false, - "type": "target" - }, - { - "deps": [ - "end2end_certs", "end2end_tests", "gpr", "gpr_test_util", @@ -3455,7 +3491,6 @@ }, { "deps": [ - "end2end_certs", "end2end_tests", "gpr", "gpr_test_util", @@ -3583,9 +3618,9 @@ ], "headers": [], "language": "c", - "name": "h2_proxy_nosec_test", + "name": "h2_full+trace_nosec_test", "src": [ - "test/core/end2end/fixtures/h2_proxy.c" + "test/core/end2end/fixtures/h2_full+trace.c" ], "third_party": false, "type": "target" @@ -3600,9 +3635,9 @@ ], "headers": [], "language": "c", - "name": "h2_sockpair_nosec_test", + "name": "h2_proxy_nosec_test", "src": [ - "test/core/end2end/fixtures/h2_sockpair.c" + "test/core/end2end/fixtures/h2_proxy.c" ], "third_party": false, "type": "target" @@ -3617,9 +3652,9 @@ ], "headers": [], "language": "c", - "name": "h2_sockpair+trace_nosec_test", + "name": "h2_sockpair_nosec_test", "src": [ - "test/core/end2end/fixtures/h2_sockpair+trace.c" + "test/core/end2end/fixtures/h2_sockpair.c" ], "third_party": false, "type": "target" @@ -3634,9 +3669,9 @@ ], "headers": [], "language": "c", - "name": "h2_sockpair_1byte_nosec_test", + "name": "h2_sockpair+trace_nosec_test", "src": [ - "test/core/end2end/fixtures/h2_sockpair_1byte.c" + "test/core/end2end/fixtures/h2_sockpair+trace.c" ], "third_party": false, "type": "target" @@ -3651,9 +3686,9 @@ ], "headers": [], "language": "c", - "name": "h2_uchannel_nosec_test", + "name": "h2_sockpair_1byte_nosec_test", "src": [ - "test/core/end2end/fixtures/h2_uchannel.c" + "test/core/end2end/fixtures/h2_sockpair_1byte.c" ], "third_party": false, "type": "target" @@ -3737,17 +3772,18 @@ "include/grpc/support/tls_msvc.h", "include/grpc/support/tls_pthread.h", "include/grpc/support/useful.h", - "src/core/profiling/timers.h", - "src/core/support/block_annotate.h", - "src/core/support/env.h", - "src/core/support/load_file.h", - "src/core/support/murmur_hash.h", - "src/core/support/stack_lockfree.h", - "src/core/support/string.h", - "src/core/support/string_win32.h", - "src/core/support/thd_internal.h", - "src/core/support/time_precise.h", - "src/core/support/tmpfile.h" + "src/core/lib/profiling/timers.h", + "src/core/lib/support/backoff.h", + "src/core/lib/support/block_annotate.h", + "src/core/lib/support/env.h", + "src/core/lib/support/load_file.h", + "src/core/lib/support/murmur_hash.h", + "src/core/lib/support/stack_lockfree.h", + "src/core/lib/support/string.h", + "src/core/lib/support/string_win32.h", + "src/core/lib/support/thd_internal.h", + "src/core/lib/support/time_precise.h", + "src/core/lib/support/tmpfile.h" ], "language": "c", "name": "gpr", @@ -3794,60 +3830,62 @@ "include/grpc/support/tls_msvc.h", "include/grpc/support/tls_pthread.h", "include/grpc/support/useful.h", - "src/core/profiling/basic_timers.c", - "src/core/profiling/stap_timers.c", - "src/core/profiling/timers.h", - "src/core/support/alloc.c", - "src/core/support/avl.c", - "src/core/support/block_annotate.h", - "src/core/support/cmdline.c", - "src/core/support/cpu_iphone.c", - "src/core/support/cpu_linux.c", - "src/core/support/cpu_posix.c", - "src/core/support/cpu_windows.c", - "src/core/support/env.h", - "src/core/support/env_linux.c", - "src/core/support/env_posix.c", - "src/core/support/env_win32.c", - "src/core/support/histogram.c", - "src/core/support/host_port.c", - "src/core/support/load_file.c", - "src/core/support/load_file.h", - "src/core/support/log.c", - "src/core/support/log_android.c", - "src/core/support/log_linux.c", - "src/core/support/log_posix.c", - "src/core/support/log_win32.c", - "src/core/support/murmur_hash.c", - "src/core/support/murmur_hash.h", - "src/core/support/slice.c", - "src/core/support/slice_buffer.c", - "src/core/support/stack_lockfree.c", - "src/core/support/stack_lockfree.h", - "src/core/support/string.c", - "src/core/support/string.h", - "src/core/support/string_posix.c", - "src/core/support/string_win32.c", - "src/core/support/string_win32.h", - "src/core/support/subprocess_posix.c", - "src/core/support/subprocess_windows.c", - "src/core/support/sync.c", - "src/core/support/sync_posix.c", - "src/core/support/sync_win32.c", - "src/core/support/thd.c", - "src/core/support/thd_internal.h", - "src/core/support/thd_posix.c", - "src/core/support/thd_win32.c", - "src/core/support/time.c", - "src/core/support/time_posix.c", - "src/core/support/time_precise.c", - "src/core/support/time_precise.h", - "src/core/support/time_win32.c", - "src/core/support/tls_pthread.c", - "src/core/support/tmpfile.h", - "src/core/support/tmpfile_posix.c", - "src/core/support/tmpfile_win32.c", - "src/core/support/wrap_memcpy.c" + "src/core/lib/profiling/basic_timers.c", + "src/core/lib/profiling/stap_timers.c", + "src/core/lib/profiling/timers.h", + "src/core/lib/support/alloc.c", + "src/core/lib/support/avl.c", + "src/core/lib/support/backoff.c", + "src/core/lib/support/backoff.h", + "src/core/lib/support/block_annotate.h", + "src/core/lib/support/cmdline.c", + "src/core/lib/support/cpu_iphone.c", + "src/core/lib/support/cpu_linux.c", + "src/core/lib/support/cpu_posix.c", + "src/core/lib/support/cpu_windows.c", + "src/core/lib/support/env.h", + "src/core/lib/support/env_linux.c", + "src/core/lib/support/env_posix.c", + "src/core/lib/support/env_win32.c", + "src/core/lib/support/histogram.c", + "src/core/lib/support/host_port.c", + "src/core/lib/support/load_file.c", + "src/core/lib/support/load_file.h", + "src/core/lib/support/log.c", + "src/core/lib/support/log_android.c", + "src/core/lib/support/log_linux.c", + "src/core/lib/support/log_posix.c", + "src/core/lib/support/log_win32.c", + "src/core/lib/support/murmur_hash.c", + "src/core/lib/support/murmur_hash.h", + "src/core/lib/support/slice.c", + "src/core/lib/support/slice_buffer.c", + "src/core/lib/support/stack_lockfree.c", + "src/core/lib/support/stack_lockfree.h", + "src/core/lib/support/string.c", + "src/core/lib/support/string.h", + "src/core/lib/support/string_posix.c", + "src/core/lib/support/string_win32.c", + "src/core/lib/support/string_win32.h", + "src/core/lib/support/subprocess_posix.c", + "src/core/lib/support/subprocess_windows.c", + "src/core/lib/support/sync.c", + "src/core/lib/support/sync_posix.c", + "src/core/lib/support/sync_win32.c", + "src/core/lib/support/thd.c", + "src/core/lib/support/thd_internal.h", + "src/core/lib/support/thd_posix.c", + "src/core/lib/support/thd_win32.c", + "src/core/lib/support/time.c", + "src/core/lib/support/time_posix.c", + "src/core/lib/support/time_precise.c", + "src/core/lib/support/time_precise.h", + "src/core/lib/support/time_win32.c", + "src/core/lib/support/tls_pthread.c", + "src/core/lib/support/tmpfile.h", + "src/core/lib/support/tmpfile_posix.c", + "src/core/lib/support/tmpfile_win32.c", + "src/core/lib/support/wrap_memcpy.c" ], "third_party": false, "type": "lib" @@ -3886,138 +3924,143 @@ "include/grpc/impl/codegen/propagation_bits.h", "include/grpc/impl/codegen/status.h", "include/grpc/status.h", - "src/core/census/aggregation.h", - "src/core/census/grpc_filter.h", - "src/core/census/mlog.h", - "src/core/census/rpc_metric_id.h", - "src/core/channel/channel_args.h", - "src/core/channel/channel_stack.h", - "src/core/channel/client_channel.h", - "src/core/channel/client_uchannel.h", - "src/core/channel/compress_filter.h", - "src/core/channel/connected_channel.h", - "src/core/channel/context.h", - "src/core/channel/http_client_filter.h", - "src/core/channel/http_server_filter.h", - "src/core/channel/subchannel_call_holder.h", - "src/core/client_config/client_config.h", - "src/core/client_config/connector.h", - "src/core/client_config/initial_connect_string.h", - "src/core/client_config/lb_policies/load_balancer_api.h", - "src/core/client_config/lb_policies/pick_first.h", - "src/core/client_config/lb_policies/round_robin.h", - "src/core/client_config/lb_policy.h", - "src/core/client_config/lb_policy_factory.h", - "src/core/client_config/lb_policy_registry.h", - "src/core/client_config/resolver.h", - "src/core/client_config/resolver_factory.h", - "src/core/client_config/resolver_registry.h", - "src/core/client_config/resolvers/dns_resolver.h", - "src/core/client_config/resolvers/sockaddr_resolver.h", - "src/core/client_config/subchannel.h", - "src/core/client_config/subchannel_factory.h", - "src/core/client_config/subchannel_index.h", - "src/core/client_config/uri_parser.h", - "src/core/compression/algorithm_metadata.h", - "src/core/compression/message_compress.h", - "src/core/debug/trace.h", - "src/core/httpcli/format_request.h", - "src/core/httpcli/httpcli.h", - "src/core/httpcli/parser.h", - "src/core/iomgr/closure.h", - "src/core/iomgr/endpoint.h", - "src/core/iomgr/endpoint_pair.h", - "src/core/iomgr/exec_ctx.h", - "src/core/iomgr/executor.h", - "src/core/iomgr/fd_posix.h", - "src/core/iomgr/iocp_windows.h", - "src/core/iomgr/iomgr.h", - "src/core/iomgr/iomgr_internal.h", - "src/core/iomgr/iomgr_posix.h", - "src/core/iomgr/pollset.h", - "src/core/iomgr/pollset_posix.h", - "src/core/iomgr/pollset_set.h", - "src/core/iomgr/pollset_set_posix.h", - "src/core/iomgr/pollset_set_windows.h", - "src/core/iomgr/pollset_windows.h", - "src/core/iomgr/resolve_address.h", - "src/core/iomgr/sockaddr.h", - "src/core/iomgr/sockaddr_posix.h", - "src/core/iomgr/sockaddr_utils.h", - "src/core/iomgr/sockaddr_win32.h", - "src/core/iomgr/socket_utils_posix.h", - "src/core/iomgr/socket_windows.h", - "src/core/iomgr/tcp_client.h", - "src/core/iomgr/tcp_posix.h", - "src/core/iomgr/tcp_server.h", - "src/core/iomgr/tcp_windows.h", - "src/core/iomgr/time_averaged_stats.h", - "src/core/iomgr/timer.h", - "src/core/iomgr/timer_heap.h", - "src/core/iomgr/udp_server.h", - "src/core/iomgr/wakeup_fd_pipe.h", - "src/core/iomgr/wakeup_fd_posix.h", - "src/core/iomgr/workqueue.h", - "src/core/iomgr/workqueue_posix.h", - "src/core/iomgr/workqueue_windows.h", - "src/core/json/json.h", - "src/core/json/json_common.h", - "src/core/json/json_reader.h", - "src/core/json/json_writer.h", - "src/core/proto/grpc/lb/v0/load_balancer.pb.h", - "src/core/security/auth_filters.h", - "src/core/security/b64.h", - "src/core/security/credentials.h", - "src/core/security/handshake.h", - "src/core/security/json_token.h", - "src/core/security/jwt_verifier.h", - "src/core/security/secure_endpoint.h", - "src/core/security/security_connector.h", - "src/core/security/security_context.h", - "src/core/statistics/census_interface.h", - "src/core/statistics/census_rpc_stats.h", - "src/core/surface/api_trace.h", - "src/core/surface/call.h", - "src/core/surface/call_test_only.h", - "src/core/surface/channel.h", - "src/core/surface/completion_queue.h", - "src/core/surface/event_string.h", - "src/core/surface/init.h", - "src/core/surface/server.h", - "src/core/surface/surface_trace.h", - "src/core/transport/byte_stream.h", - "src/core/transport/chttp2/alpn.h", - "src/core/transport/chttp2/bin_encoder.h", - "src/core/transport/chttp2/frame.h", - "src/core/transport/chttp2/frame_data.h", - "src/core/transport/chttp2/frame_goaway.h", - "src/core/transport/chttp2/frame_ping.h", - "src/core/transport/chttp2/frame_rst_stream.h", - "src/core/transport/chttp2/frame_settings.h", - "src/core/transport/chttp2/frame_window_update.h", - "src/core/transport/chttp2/hpack_encoder.h", - "src/core/transport/chttp2/hpack_parser.h", - "src/core/transport/chttp2/hpack_table.h", - "src/core/transport/chttp2/http2_errors.h", - "src/core/transport/chttp2/huffsyms.h", - "src/core/transport/chttp2/incoming_metadata.h", - "src/core/transport/chttp2/internal.h", - "src/core/transport/chttp2/status_conversion.h", - "src/core/transport/chttp2/stream_map.h", - "src/core/transport/chttp2/timeout_encoding.h", - "src/core/transport/chttp2/varint.h", - "src/core/transport/chttp2_transport.h", - "src/core/transport/connectivity_state.h", - "src/core/transport/metadata.h", - "src/core/transport/metadata_batch.h", - "src/core/transport/static_metadata.h", - "src/core/transport/transport.h", - "src/core/transport/transport_impl.h", - "src/core/tsi/fake_transport_security.h", - "src/core/tsi/ssl_transport_security.h", - "src/core/tsi/ssl_types.h", - "src/core/tsi/transport_security.h", - "src/core/tsi/transport_security_interface.h", + "src/core/ext/transport/chttp2/transport/alpn.h", + "src/core/ext/transport/chttp2/transport/bin_encoder.h", + "src/core/ext/transport/chttp2/transport/chttp2_transport.h", + "src/core/ext/transport/chttp2/transport/frame.h", + "src/core/ext/transport/chttp2/transport/frame_data.h", + "src/core/ext/transport/chttp2/transport/frame_goaway.h", + "src/core/ext/transport/chttp2/transport/frame_ping.h", + "src/core/ext/transport/chttp2/transport/frame_rst_stream.h", + "src/core/ext/transport/chttp2/transport/frame_settings.h", + "src/core/ext/transport/chttp2/transport/frame_window_update.h", + "src/core/ext/transport/chttp2/transport/hpack_encoder.h", + "src/core/ext/transport/chttp2/transport/hpack_parser.h", + "src/core/ext/transport/chttp2/transport/hpack_table.h", + "src/core/ext/transport/chttp2/transport/http2_errors.h", + "src/core/ext/transport/chttp2/transport/huffsyms.h", + "src/core/ext/transport/chttp2/transport/incoming_metadata.h", + "src/core/ext/transport/chttp2/transport/internal.h", + "src/core/ext/transport/chttp2/transport/status_conversion.h", + "src/core/ext/transport/chttp2/transport/stream_map.h", + "src/core/ext/transport/chttp2/transport/timeout_encoding.h", + "src/core/ext/transport/chttp2/transport/varint.h", + "src/core/lib/census/aggregation.h", + "src/core/lib/census/grpc_filter.h", + "src/core/lib/census/grpc_plugin.h", + "src/core/lib/census/mlog.h", + "src/core/lib/census/rpc_metric_id.h", + "src/core/lib/channel/channel_args.h", + "src/core/lib/channel/channel_stack.h", + "src/core/lib/channel/channel_stack_builder.h", + "src/core/lib/channel/client_channel.h", + "src/core/lib/channel/compress_filter.h", + "src/core/lib/channel/connected_channel.h", + "src/core/lib/channel/context.h", + "src/core/lib/channel/http_client_filter.h", + "src/core/lib/channel/http_server_filter.h", + "src/core/lib/channel/subchannel_call_holder.h", + "src/core/lib/client_config/client_config.h", + "src/core/lib/client_config/connector.h", + "src/core/lib/client_config/initial_connect_string.h", + "src/core/lib/client_config/lb_policies/load_balancer_api.h", + "src/core/lib/client_config/lb_policies/pick_first.h", + "src/core/lib/client_config/lb_policies/round_robin.h", + "src/core/lib/client_config/lb_policy.h", + "src/core/lib/client_config/lb_policy_factory.h", + "src/core/lib/client_config/lb_policy_registry.h", + "src/core/lib/client_config/resolver.h", + "src/core/lib/client_config/resolver_factory.h", + "src/core/lib/client_config/resolver_registry.h", + "src/core/lib/client_config/resolvers/dns_resolver.h", + "src/core/lib/client_config/resolvers/sockaddr_resolver.h", + "src/core/lib/client_config/subchannel.h", + "src/core/lib/client_config/subchannel_factory.h", + "src/core/lib/client_config/subchannel_index.h", + "src/core/lib/client_config/uri_parser.h", + "src/core/lib/compression/algorithm_metadata.h", + "src/core/lib/compression/message_compress.h", + "src/core/lib/debug/trace.h", + "src/core/lib/http/format_request.h", + "src/core/lib/http/httpcli.h", + "src/core/lib/http/parser.h", + "src/core/lib/iomgr/closure.h", + "src/core/lib/iomgr/endpoint.h", + "src/core/lib/iomgr/endpoint_pair.h", + "src/core/lib/iomgr/exec_ctx.h", + "src/core/lib/iomgr/executor.h", + "src/core/lib/iomgr/fd_posix.h", + "src/core/lib/iomgr/iocp_windows.h", + "src/core/lib/iomgr/iomgr.h", + "src/core/lib/iomgr/iomgr_internal.h", + "src/core/lib/iomgr/iomgr_posix.h", + "src/core/lib/iomgr/pollset.h", + "src/core/lib/iomgr/pollset_posix.h", + "src/core/lib/iomgr/pollset_set.h", + "src/core/lib/iomgr/pollset_set_posix.h", + "src/core/lib/iomgr/pollset_set_windows.h", + "src/core/lib/iomgr/pollset_windows.h", + "src/core/lib/iomgr/resolve_address.h", + "src/core/lib/iomgr/sockaddr.h", + "src/core/lib/iomgr/sockaddr_posix.h", + "src/core/lib/iomgr/sockaddr_utils.h", + "src/core/lib/iomgr/sockaddr_win32.h", + "src/core/lib/iomgr/socket_utils_posix.h", + "src/core/lib/iomgr/socket_windows.h", + "src/core/lib/iomgr/tcp_client.h", + "src/core/lib/iomgr/tcp_posix.h", + "src/core/lib/iomgr/tcp_server.h", + "src/core/lib/iomgr/tcp_windows.h", + "src/core/lib/iomgr/time_averaged_stats.h", + "src/core/lib/iomgr/timer.h", + "src/core/lib/iomgr/timer_heap.h", + "src/core/lib/iomgr/udp_server.h", + "src/core/lib/iomgr/unix_sockets_posix.h", + "src/core/lib/iomgr/wakeup_fd_pipe.h", + "src/core/lib/iomgr/wakeup_fd_posix.h", + "src/core/lib/iomgr/workqueue.h", + "src/core/lib/iomgr/workqueue_posix.h", + "src/core/lib/iomgr/workqueue_windows.h", + "src/core/lib/json/json.h", + "src/core/lib/json/json_common.h", + "src/core/lib/json/json_reader.h", + "src/core/lib/json/json_writer.h", + "src/core/lib/proto/grpc/lb/v0/load_balancer.pb.h", + "src/core/lib/security/auth_filters.h", + "src/core/lib/security/b64.h", + "src/core/lib/security/credentials.h", + "src/core/lib/security/handshake.h", + "src/core/lib/security/json_token.h", + "src/core/lib/security/jwt_verifier.h", + "src/core/lib/security/secure_endpoint.h", + "src/core/lib/security/security_connector.h", + "src/core/lib/security/security_context.h", + "src/core/lib/statistics/census_interface.h", + "src/core/lib/statistics/census_rpc_stats.h", + "src/core/lib/surface/api_trace.h", + "src/core/lib/surface/call.h", + "src/core/lib/surface/call_test_only.h", + "src/core/lib/surface/channel.h", + "src/core/lib/surface/channel_init.h", + "src/core/lib/surface/channel_stack_type.h", + "src/core/lib/surface/completion_queue.h", + "src/core/lib/surface/event_string.h", + "src/core/lib/surface/init.h", + "src/core/lib/surface/lame_client.h", + "src/core/lib/surface/server.h", + "src/core/lib/surface/surface_trace.h", + "src/core/lib/transport/byte_stream.h", + "src/core/lib/transport/connectivity_state.h", + "src/core/lib/transport/metadata.h", + "src/core/lib/transport/metadata_batch.h", + "src/core/lib/transport/static_metadata.h", + "src/core/lib/transport/transport.h", + "src/core/lib/transport/transport_impl.h", + "src/core/lib/tsi/fake_transport_security.h", + "src/core/lib/tsi/ssl_transport_security.h", + "src/core/lib/tsi/ssl_types.h", + "src/core/lib/tsi/transport_security.h", + "src/core/lib/tsi/transport_security_interface.h", "third_party/nanopb/pb.h", "third_party/nanopb/pb_common.h", "third_party/nanopb/pb_decode.h", @@ -4039,295 +4082,355 @@ "include/grpc/impl/codegen/propagation_bits.h", "include/grpc/impl/codegen/status.h", "include/grpc/status.h", - "src/core/census/aggregation.h", - "src/core/census/context.c", - "src/core/census/grpc_context.c", - "src/core/census/grpc_filter.c", - "src/core/census/grpc_filter.h", - "src/core/census/initialize.c", - "src/core/census/mlog.c", - "src/core/census/mlog.h", - "src/core/census/operation.c", - "src/core/census/placeholders.c", - "src/core/census/rpc_metric_id.h", - "src/core/census/tracing.c", - "src/core/channel/channel_args.c", - "src/core/channel/channel_args.h", - "src/core/channel/channel_stack.c", - "src/core/channel/channel_stack.h", - "src/core/channel/client_channel.c", - "src/core/channel/client_channel.h", - "src/core/channel/client_uchannel.c", - "src/core/channel/client_uchannel.h", - "src/core/channel/compress_filter.c", - "src/core/channel/compress_filter.h", - "src/core/channel/connected_channel.c", - "src/core/channel/connected_channel.h", - "src/core/channel/context.h", - "src/core/channel/http_client_filter.c", - "src/core/channel/http_client_filter.h", - "src/core/channel/http_server_filter.c", - "src/core/channel/http_server_filter.h", - "src/core/channel/subchannel_call_holder.c", - "src/core/channel/subchannel_call_holder.h", - "src/core/client_config/client_config.c", - "src/core/client_config/client_config.h", - "src/core/client_config/connector.c", - "src/core/client_config/connector.h", - "src/core/client_config/default_initial_connect_string.c", - "src/core/client_config/initial_connect_string.c", - "src/core/client_config/initial_connect_string.h", - "src/core/client_config/lb_policies/load_balancer_api.c", - "src/core/client_config/lb_policies/load_balancer_api.h", - "src/core/client_config/lb_policies/pick_first.c", - "src/core/client_config/lb_policies/pick_first.h", - "src/core/client_config/lb_policies/round_robin.c", - "src/core/client_config/lb_policies/round_robin.h", - "src/core/client_config/lb_policy.c", - "src/core/client_config/lb_policy.h", - "src/core/client_config/lb_policy_factory.c", - "src/core/client_config/lb_policy_factory.h", - "src/core/client_config/lb_policy_registry.c", - "src/core/client_config/lb_policy_registry.h", - "src/core/client_config/resolver.c", - "src/core/client_config/resolver.h", - "src/core/client_config/resolver_factory.c", - "src/core/client_config/resolver_factory.h", - "src/core/client_config/resolver_registry.c", - "src/core/client_config/resolver_registry.h", - "src/core/client_config/resolvers/dns_resolver.c", - "src/core/client_config/resolvers/dns_resolver.h", - "src/core/client_config/resolvers/sockaddr_resolver.c", - "src/core/client_config/resolvers/sockaddr_resolver.h", - "src/core/client_config/subchannel.c", - "src/core/client_config/subchannel.h", - "src/core/client_config/subchannel_factory.c", - "src/core/client_config/subchannel_factory.h", - "src/core/client_config/subchannel_index.c", - "src/core/client_config/subchannel_index.h", - "src/core/client_config/uri_parser.c", - "src/core/client_config/uri_parser.h", - "src/core/compression/algorithm_metadata.h", - "src/core/compression/compression_algorithm.c", - "src/core/compression/message_compress.c", - "src/core/compression/message_compress.h", - "src/core/debug/trace.c", - "src/core/debug/trace.h", - "src/core/httpcli/format_request.c", - "src/core/httpcli/format_request.h", - "src/core/httpcli/httpcli.c", - "src/core/httpcli/httpcli.h", - "src/core/httpcli/httpcli_security_connector.c", - "src/core/httpcli/parser.c", - "src/core/httpcli/parser.h", - "src/core/iomgr/closure.c", - "src/core/iomgr/closure.h", - "src/core/iomgr/endpoint.c", - "src/core/iomgr/endpoint.h", - "src/core/iomgr/endpoint_pair.h", - "src/core/iomgr/endpoint_pair_posix.c", - "src/core/iomgr/endpoint_pair_windows.c", - "src/core/iomgr/exec_ctx.c", - "src/core/iomgr/exec_ctx.h", - "src/core/iomgr/executor.c", - "src/core/iomgr/executor.h", - "src/core/iomgr/fd_posix.c", - "src/core/iomgr/fd_posix.h", - "src/core/iomgr/iocp_windows.c", - "src/core/iomgr/iocp_windows.h", - "src/core/iomgr/iomgr.c", - "src/core/iomgr/iomgr.h", - "src/core/iomgr/iomgr_internal.h", - "src/core/iomgr/iomgr_posix.c", - "src/core/iomgr/iomgr_posix.h", - "src/core/iomgr/iomgr_windows.c", - "src/core/iomgr/pollset.h", - "src/core/iomgr/pollset_multipoller_with_epoll.c", - "src/core/iomgr/pollset_multipoller_with_poll_posix.c", - "src/core/iomgr/pollset_posix.c", - "src/core/iomgr/pollset_posix.h", - "src/core/iomgr/pollset_set.h", - "src/core/iomgr/pollset_set_posix.c", - "src/core/iomgr/pollset_set_posix.h", - "src/core/iomgr/pollset_set_windows.c", - "src/core/iomgr/pollset_set_windows.h", - "src/core/iomgr/pollset_windows.c", - "src/core/iomgr/pollset_windows.h", - "src/core/iomgr/resolve_address.h", - "src/core/iomgr/resolve_address_posix.c", - "src/core/iomgr/resolve_address_windows.c", - "src/core/iomgr/sockaddr.h", - "src/core/iomgr/sockaddr_posix.h", - "src/core/iomgr/sockaddr_utils.c", - "src/core/iomgr/sockaddr_utils.h", - "src/core/iomgr/sockaddr_win32.h", - "src/core/iomgr/socket_utils_common_posix.c", - "src/core/iomgr/socket_utils_linux.c", - "src/core/iomgr/socket_utils_posix.c", - "src/core/iomgr/socket_utils_posix.h", - "src/core/iomgr/socket_windows.c", - "src/core/iomgr/socket_windows.h", - "src/core/iomgr/tcp_client.h", - "src/core/iomgr/tcp_client_posix.c", - "src/core/iomgr/tcp_client_windows.c", - "src/core/iomgr/tcp_posix.c", - "src/core/iomgr/tcp_posix.h", - "src/core/iomgr/tcp_server.h", - "src/core/iomgr/tcp_server_posix.c", - "src/core/iomgr/tcp_server_windows.c", - "src/core/iomgr/tcp_windows.c", - "src/core/iomgr/tcp_windows.h", - "src/core/iomgr/time_averaged_stats.c", - "src/core/iomgr/time_averaged_stats.h", - "src/core/iomgr/timer.c", - "src/core/iomgr/timer.h", - "src/core/iomgr/timer_heap.c", - "src/core/iomgr/timer_heap.h", - "src/core/iomgr/udp_server.c", - "src/core/iomgr/udp_server.h", - "src/core/iomgr/wakeup_fd_eventfd.c", - "src/core/iomgr/wakeup_fd_nospecial.c", - "src/core/iomgr/wakeup_fd_pipe.c", - "src/core/iomgr/wakeup_fd_pipe.h", - "src/core/iomgr/wakeup_fd_posix.c", - "src/core/iomgr/wakeup_fd_posix.h", - "src/core/iomgr/workqueue.h", - "src/core/iomgr/workqueue_posix.c", - "src/core/iomgr/workqueue_posix.h", - "src/core/iomgr/workqueue_windows.c", - "src/core/iomgr/workqueue_windows.h", - "src/core/json/json.c", - "src/core/json/json.h", - "src/core/json/json_common.h", - "src/core/json/json_reader.c", - "src/core/json/json_reader.h", - "src/core/json/json_string.c", - "src/core/json/json_writer.c", - "src/core/json/json_writer.h", - "src/core/proto/grpc/lb/v0/load_balancer.pb.c", - "src/core/proto/grpc/lb/v0/load_balancer.pb.h", - "src/core/security/auth_filters.h", - "src/core/security/b64.c", - "src/core/security/b64.h", - "src/core/security/client_auth_filter.c", - "src/core/security/credentials.c", - "src/core/security/credentials.h", - "src/core/security/credentials_metadata.c", - "src/core/security/credentials_posix.c", - "src/core/security/credentials_win32.c", - "src/core/security/google_default_credentials.c", - "src/core/security/handshake.c", - "src/core/security/handshake.h", - "src/core/security/json_token.c", - "src/core/security/json_token.h", - "src/core/security/jwt_verifier.c", - "src/core/security/jwt_verifier.h", - "src/core/security/secure_endpoint.c", - "src/core/security/secure_endpoint.h", - "src/core/security/security_connector.c", - "src/core/security/security_connector.h", - "src/core/security/security_context.c", - "src/core/security/security_context.h", - "src/core/security/server_auth_filter.c", - "src/core/security/server_secure_chttp2.c", - "src/core/statistics/census_interface.h", - "src/core/statistics/census_rpc_stats.h", - "src/core/surface/alarm.c", - "src/core/surface/api_trace.c", - "src/core/surface/api_trace.h", - "src/core/surface/byte_buffer.c", - "src/core/surface/byte_buffer_reader.c", - "src/core/surface/call.c", - "src/core/surface/call.h", - "src/core/surface/call_details.c", - "src/core/surface/call_log_batch.c", - "src/core/surface/call_test_only.h", - "src/core/surface/channel.c", - "src/core/surface/channel.h", - "src/core/surface/channel_connectivity.c", - "src/core/surface/channel_create.c", - "src/core/surface/channel_ping.c", - "src/core/surface/completion_queue.c", - "src/core/surface/completion_queue.h", - "src/core/surface/event_string.c", - "src/core/surface/event_string.h", - "src/core/surface/init.c", - "src/core/surface/init.h", - "src/core/surface/init_secure.c", - "src/core/surface/lame_client.c", - "src/core/surface/metadata_array.c", - "src/core/surface/secure_channel_create.c", - "src/core/surface/server.c", - "src/core/surface/server.h", - "src/core/surface/server_chttp2.c", - "src/core/surface/server_create.c", - "src/core/surface/surface_trace.h", - "src/core/surface/validate_metadata.c", - "src/core/surface/version.c", - "src/core/transport/byte_stream.c", - "src/core/transport/byte_stream.h", - "src/core/transport/chttp2/alpn.c", - "src/core/transport/chttp2/alpn.h", - "src/core/transport/chttp2/bin_encoder.c", - "src/core/transport/chttp2/bin_encoder.h", - "src/core/transport/chttp2/frame.h", - "src/core/transport/chttp2/frame_data.c", - "src/core/transport/chttp2/frame_data.h", - "src/core/transport/chttp2/frame_goaway.c", - "src/core/transport/chttp2/frame_goaway.h", - "src/core/transport/chttp2/frame_ping.c", - "src/core/transport/chttp2/frame_ping.h", - "src/core/transport/chttp2/frame_rst_stream.c", - "src/core/transport/chttp2/frame_rst_stream.h", - "src/core/transport/chttp2/frame_settings.c", - "src/core/transport/chttp2/frame_settings.h", - "src/core/transport/chttp2/frame_window_update.c", - "src/core/transport/chttp2/frame_window_update.h", - "src/core/transport/chttp2/hpack_encoder.c", - "src/core/transport/chttp2/hpack_encoder.h", - "src/core/transport/chttp2/hpack_parser.c", - "src/core/transport/chttp2/hpack_parser.h", - "src/core/transport/chttp2/hpack_table.c", - "src/core/transport/chttp2/hpack_table.h", - "src/core/transport/chttp2/http2_errors.h", - "src/core/transport/chttp2/huffsyms.c", - "src/core/transport/chttp2/huffsyms.h", - "src/core/transport/chttp2/incoming_metadata.c", - "src/core/transport/chttp2/incoming_metadata.h", - "src/core/transport/chttp2/internal.h", - "src/core/transport/chttp2/parsing.c", - "src/core/transport/chttp2/status_conversion.c", - "src/core/transport/chttp2/status_conversion.h", - "src/core/transport/chttp2/stream_lists.c", - "src/core/transport/chttp2/stream_map.c", - "src/core/transport/chttp2/stream_map.h", - "src/core/transport/chttp2/timeout_encoding.c", - "src/core/transport/chttp2/timeout_encoding.h", - "src/core/transport/chttp2/varint.c", - "src/core/transport/chttp2/varint.h", - "src/core/transport/chttp2/writing.c", - "src/core/transport/chttp2_transport.c", - "src/core/transport/chttp2_transport.h", - "src/core/transport/connectivity_state.c", - "src/core/transport/connectivity_state.h", - "src/core/transport/metadata.c", - "src/core/transport/metadata.h", - "src/core/transport/metadata_batch.c", - "src/core/transport/metadata_batch.h", - "src/core/transport/static_metadata.c", - "src/core/transport/static_metadata.h", - "src/core/transport/transport.c", - "src/core/transport/transport.h", - "src/core/transport/transport_impl.h", - "src/core/transport/transport_op_string.c", - "src/core/tsi/fake_transport_security.c", - "src/core/tsi/fake_transport_security.h", - "src/core/tsi/ssl_transport_security.c", - "src/core/tsi/ssl_transport_security.h", - "src/core/tsi/ssl_types.h", - "src/core/tsi/transport_security.c", - "src/core/tsi/transport_security.h", - "src/core/tsi/transport_security_interface.h" + "src/core/ext/transport/chttp2/client/insecure/channel_create.c", + "src/core/ext/transport/chttp2/client/secure/secure_channel_create.c", + "src/core/ext/transport/chttp2/server/insecure/server_chttp2.c", + "src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c", + "src/core/ext/transport/chttp2/transport/alpn.c", + "src/core/ext/transport/chttp2/transport/alpn.h", + "src/core/ext/transport/chttp2/transport/bin_encoder.c", + "src/core/ext/transport/chttp2/transport/bin_encoder.h", + "src/core/ext/transport/chttp2/transport/chttp2_transport.c", + "src/core/ext/transport/chttp2/transport/chttp2_transport.h", + "src/core/ext/transport/chttp2/transport/frame.h", + "src/core/ext/transport/chttp2/transport/frame_data.c", + "src/core/ext/transport/chttp2/transport/frame_data.h", + "src/core/ext/transport/chttp2/transport/frame_goaway.c", + "src/core/ext/transport/chttp2/transport/frame_goaway.h", + "src/core/ext/transport/chttp2/transport/frame_ping.c", + "src/core/ext/transport/chttp2/transport/frame_ping.h", + "src/core/ext/transport/chttp2/transport/frame_rst_stream.c", + "src/core/ext/transport/chttp2/transport/frame_rst_stream.h", + "src/core/ext/transport/chttp2/transport/frame_settings.c", + "src/core/ext/transport/chttp2/transport/frame_settings.h", + "src/core/ext/transport/chttp2/transport/frame_window_update.c", + "src/core/ext/transport/chttp2/transport/frame_window_update.h", + "src/core/ext/transport/chttp2/transport/hpack_encoder.c", + "src/core/ext/transport/chttp2/transport/hpack_encoder.h", + "src/core/ext/transport/chttp2/transport/hpack_parser.c", + "src/core/ext/transport/chttp2/transport/hpack_parser.h", + "src/core/ext/transport/chttp2/transport/hpack_table.c", + "src/core/ext/transport/chttp2/transport/hpack_table.h", + "src/core/ext/transport/chttp2/transport/http2_errors.h", + "src/core/ext/transport/chttp2/transport/huffsyms.c", + "src/core/ext/transport/chttp2/transport/huffsyms.h", + "src/core/ext/transport/chttp2/transport/incoming_metadata.c", + "src/core/ext/transport/chttp2/transport/incoming_metadata.h", + "src/core/ext/transport/chttp2/transport/internal.h", + "src/core/ext/transport/chttp2/transport/parsing.c", + "src/core/ext/transport/chttp2/transport/status_conversion.c", + "src/core/ext/transport/chttp2/transport/status_conversion.h", + "src/core/ext/transport/chttp2/transport/stream_lists.c", + "src/core/ext/transport/chttp2/transport/stream_map.c", + "src/core/ext/transport/chttp2/transport/stream_map.h", + "src/core/ext/transport/chttp2/transport/timeout_encoding.c", + "src/core/ext/transport/chttp2/transport/timeout_encoding.h", + "src/core/ext/transport/chttp2/transport/varint.c", + "src/core/ext/transport/chttp2/transport/varint.h", + "src/core/ext/transport/chttp2/transport/writing.c", + "src/core/lib/census/aggregation.h", + "src/core/lib/census/context.c", + "src/core/lib/census/grpc_context.c", + "src/core/lib/census/grpc_filter.c", + "src/core/lib/census/grpc_filter.h", + "src/core/lib/census/grpc_plugin.c", + "src/core/lib/census/grpc_plugin.h", + "src/core/lib/census/initialize.c", + "src/core/lib/census/mlog.c", + "src/core/lib/census/mlog.h", + "src/core/lib/census/operation.c", + "src/core/lib/census/placeholders.c", + "src/core/lib/census/rpc_metric_id.h", + "src/core/lib/census/tracing.c", + "src/core/lib/channel/channel_args.c", + "src/core/lib/channel/channel_args.h", + "src/core/lib/channel/channel_stack.c", + "src/core/lib/channel/channel_stack.h", + "src/core/lib/channel/channel_stack_builder.c", + "src/core/lib/channel/channel_stack_builder.h", + "src/core/lib/channel/client_channel.c", + "src/core/lib/channel/client_channel.h", + "src/core/lib/channel/compress_filter.c", + "src/core/lib/channel/compress_filter.h", + "src/core/lib/channel/connected_channel.c", + "src/core/lib/channel/connected_channel.h", + "src/core/lib/channel/context.h", + "src/core/lib/channel/http_client_filter.c", + "src/core/lib/channel/http_client_filter.h", + "src/core/lib/channel/http_server_filter.c", + "src/core/lib/channel/http_server_filter.h", + "src/core/lib/channel/subchannel_call_holder.c", + "src/core/lib/channel/subchannel_call_holder.h", + "src/core/lib/client_config/client_config.c", + "src/core/lib/client_config/client_config.h", + "src/core/lib/client_config/connector.c", + "src/core/lib/client_config/connector.h", + "src/core/lib/client_config/default_initial_connect_string.c", + "src/core/lib/client_config/initial_connect_string.c", + "src/core/lib/client_config/initial_connect_string.h", + "src/core/lib/client_config/lb_policies/load_balancer_api.c", + "src/core/lib/client_config/lb_policies/load_balancer_api.h", + "src/core/lib/client_config/lb_policies/pick_first.c", + "src/core/lib/client_config/lb_policies/pick_first.h", + "src/core/lib/client_config/lb_policies/round_robin.c", + "src/core/lib/client_config/lb_policies/round_robin.h", + "src/core/lib/client_config/lb_policy.c", + "src/core/lib/client_config/lb_policy.h", + "src/core/lib/client_config/lb_policy_factory.c", + "src/core/lib/client_config/lb_policy_factory.h", + "src/core/lib/client_config/lb_policy_registry.c", + "src/core/lib/client_config/lb_policy_registry.h", + "src/core/lib/client_config/resolver.c", + "src/core/lib/client_config/resolver.h", + "src/core/lib/client_config/resolver_factory.c", + "src/core/lib/client_config/resolver_factory.h", + "src/core/lib/client_config/resolver_registry.c", + "src/core/lib/client_config/resolver_registry.h", + "src/core/lib/client_config/resolvers/dns_resolver.c", + "src/core/lib/client_config/resolvers/dns_resolver.h", + "src/core/lib/client_config/resolvers/sockaddr_resolver.c", + "src/core/lib/client_config/resolvers/sockaddr_resolver.h", + "src/core/lib/client_config/subchannel.c", + "src/core/lib/client_config/subchannel.h", + "src/core/lib/client_config/subchannel_factory.c", + "src/core/lib/client_config/subchannel_factory.h", + "src/core/lib/client_config/subchannel_index.c", + "src/core/lib/client_config/subchannel_index.h", + "src/core/lib/client_config/uri_parser.c", + "src/core/lib/client_config/uri_parser.h", + "src/core/lib/compression/algorithm_metadata.h", + "src/core/lib/compression/compression_algorithm.c", + "src/core/lib/compression/message_compress.c", + "src/core/lib/compression/message_compress.h", + "src/core/lib/debug/trace.c", + "src/core/lib/debug/trace.h", + "src/core/lib/http/format_request.c", + "src/core/lib/http/format_request.h", + "src/core/lib/http/httpcli.c", + "src/core/lib/http/httpcli.h", + "src/core/lib/http/httpcli_security_connector.c", + "src/core/lib/http/parser.c", + "src/core/lib/http/parser.h", + "src/core/lib/iomgr/closure.c", + "src/core/lib/iomgr/closure.h", + "src/core/lib/iomgr/endpoint.c", + "src/core/lib/iomgr/endpoint.h", + "src/core/lib/iomgr/endpoint_pair.h", + "src/core/lib/iomgr/endpoint_pair_posix.c", + "src/core/lib/iomgr/endpoint_pair_windows.c", + "src/core/lib/iomgr/exec_ctx.c", + "src/core/lib/iomgr/exec_ctx.h", + "src/core/lib/iomgr/executor.c", + "src/core/lib/iomgr/executor.h", + "src/core/lib/iomgr/fd_posix.c", + "src/core/lib/iomgr/fd_posix.h", + "src/core/lib/iomgr/iocp_windows.c", + "src/core/lib/iomgr/iocp_windows.h", + "src/core/lib/iomgr/iomgr.c", + "src/core/lib/iomgr/iomgr.h", + "src/core/lib/iomgr/iomgr_internal.h", + "src/core/lib/iomgr/iomgr_posix.c", + "src/core/lib/iomgr/iomgr_posix.h", + "src/core/lib/iomgr/iomgr_windows.c", + "src/core/lib/iomgr/pollset.h", + "src/core/lib/iomgr/pollset_multipoller_with_epoll.c", + "src/core/lib/iomgr/pollset_multipoller_with_poll_posix.c", + "src/core/lib/iomgr/pollset_posix.c", + "src/core/lib/iomgr/pollset_posix.h", + "src/core/lib/iomgr/pollset_set.h", + "src/core/lib/iomgr/pollset_set_posix.c", + "src/core/lib/iomgr/pollset_set_posix.h", + "src/core/lib/iomgr/pollset_set_windows.c", + "src/core/lib/iomgr/pollset_set_windows.h", + "src/core/lib/iomgr/pollset_windows.c", + "src/core/lib/iomgr/pollset_windows.h", + "src/core/lib/iomgr/resolve_address.h", + "src/core/lib/iomgr/resolve_address_posix.c", + "src/core/lib/iomgr/resolve_address_windows.c", + "src/core/lib/iomgr/sockaddr.h", + "src/core/lib/iomgr/sockaddr_posix.h", + "src/core/lib/iomgr/sockaddr_utils.c", + "src/core/lib/iomgr/sockaddr_utils.h", + "src/core/lib/iomgr/sockaddr_win32.h", + "src/core/lib/iomgr/socket_utils_common_posix.c", + "src/core/lib/iomgr/socket_utils_linux.c", + "src/core/lib/iomgr/socket_utils_posix.c", + "src/core/lib/iomgr/socket_utils_posix.h", + "src/core/lib/iomgr/socket_windows.c", + "src/core/lib/iomgr/socket_windows.h", + "src/core/lib/iomgr/tcp_client.h", + "src/core/lib/iomgr/tcp_client_posix.c", + "src/core/lib/iomgr/tcp_client_windows.c", + "src/core/lib/iomgr/tcp_posix.c", + "src/core/lib/iomgr/tcp_posix.h", + "src/core/lib/iomgr/tcp_server.h", + "src/core/lib/iomgr/tcp_server_posix.c", + "src/core/lib/iomgr/tcp_server_windows.c", + "src/core/lib/iomgr/tcp_windows.c", + "src/core/lib/iomgr/tcp_windows.h", + "src/core/lib/iomgr/time_averaged_stats.c", + "src/core/lib/iomgr/time_averaged_stats.h", + "src/core/lib/iomgr/timer.c", + "src/core/lib/iomgr/timer.h", + "src/core/lib/iomgr/timer_heap.c", + "src/core/lib/iomgr/timer_heap.h", + "src/core/lib/iomgr/udp_server.c", + "src/core/lib/iomgr/udp_server.h", + "src/core/lib/iomgr/unix_sockets_posix.c", + "src/core/lib/iomgr/unix_sockets_posix.h", + "src/core/lib/iomgr/unix_sockets_posix_noop.c", + "src/core/lib/iomgr/wakeup_fd_eventfd.c", + "src/core/lib/iomgr/wakeup_fd_nospecial.c", + "src/core/lib/iomgr/wakeup_fd_pipe.c", + "src/core/lib/iomgr/wakeup_fd_pipe.h", + "src/core/lib/iomgr/wakeup_fd_posix.c", + "src/core/lib/iomgr/wakeup_fd_posix.h", + "src/core/lib/iomgr/workqueue.h", + "src/core/lib/iomgr/workqueue_posix.c", + "src/core/lib/iomgr/workqueue_posix.h", + "src/core/lib/iomgr/workqueue_windows.c", + "src/core/lib/iomgr/workqueue_windows.h", + "src/core/lib/json/json.c", + "src/core/lib/json/json.h", + "src/core/lib/json/json_common.h", + "src/core/lib/json/json_reader.c", + "src/core/lib/json/json_reader.h", + "src/core/lib/json/json_string.c", + "src/core/lib/json/json_writer.c", + "src/core/lib/json/json_writer.h", + "src/core/lib/proto/grpc/lb/v0/load_balancer.pb.c", + "src/core/lib/proto/grpc/lb/v0/load_balancer.pb.h", + "src/core/lib/security/auth_filters.h", + "src/core/lib/security/b64.c", + "src/core/lib/security/b64.h", + "src/core/lib/security/client_auth_filter.c", + "src/core/lib/security/credentials.c", + "src/core/lib/security/credentials.h", + "src/core/lib/security/credentials_metadata.c", + "src/core/lib/security/credentials_posix.c", + "src/core/lib/security/credentials_win32.c", + "src/core/lib/security/google_default_credentials.c", + "src/core/lib/security/handshake.c", + "src/core/lib/security/handshake.h", + "src/core/lib/security/json_token.c", + "src/core/lib/security/json_token.h", + "src/core/lib/security/jwt_verifier.c", + "src/core/lib/security/jwt_verifier.h", + "src/core/lib/security/secure_endpoint.c", + "src/core/lib/security/secure_endpoint.h", + "src/core/lib/security/security_connector.c", + "src/core/lib/security/security_connector.h", + "src/core/lib/security/security_context.c", + "src/core/lib/security/security_context.h", + "src/core/lib/security/server_auth_filter.c", + "src/core/lib/statistics/census_interface.h", + "src/core/lib/statistics/census_rpc_stats.h", + "src/core/lib/surface/alarm.c", + "src/core/lib/surface/api_trace.c", + "src/core/lib/surface/api_trace.h", + "src/core/lib/surface/byte_buffer.c", + "src/core/lib/surface/byte_buffer_reader.c", + "src/core/lib/surface/call.c", + "src/core/lib/surface/call.h", + "src/core/lib/surface/call_details.c", + "src/core/lib/surface/call_log_batch.c", + "src/core/lib/surface/call_test_only.h", + "src/core/lib/surface/channel.c", + "src/core/lib/surface/channel.h", + "src/core/lib/surface/channel_connectivity.c", + "src/core/lib/surface/channel_init.c", + "src/core/lib/surface/channel_init.h", + "src/core/lib/surface/channel_ping.c", + "src/core/lib/surface/channel_stack_type.c", + "src/core/lib/surface/channel_stack_type.h", + "src/core/lib/surface/completion_queue.c", + "src/core/lib/surface/completion_queue.h", + "src/core/lib/surface/event_string.c", + "src/core/lib/surface/event_string.h", + "src/core/lib/surface/init.c", + "src/core/lib/surface/init.h", + "src/core/lib/surface/init_secure.c", + "src/core/lib/surface/lame_client.c", + "src/core/lib/surface/lame_client.h", + "src/core/lib/surface/metadata_array.c", + "src/core/lib/surface/server.c", + "src/core/lib/surface/server.h", + "src/core/lib/surface/surface_trace.h", + "src/core/lib/surface/validate_metadata.c", + "src/core/lib/surface/version.c", + "src/core/lib/transport/byte_stream.c", + "src/core/lib/transport/byte_stream.h", + "src/core/lib/transport/connectivity_state.c", + "src/core/lib/transport/connectivity_state.h", + "src/core/lib/transport/metadata.c", + "src/core/lib/transport/metadata.h", + "src/core/lib/transport/metadata_batch.c", + "src/core/lib/transport/metadata_batch.h", + "src/core/lib/transport/static_metadata.c", + "src/core/lib/transport/static_metadata.h", + "src/core/lib/transport/transport.c", + "src/core/lib/transport/transport.h", + "src/core/lib/transport/transport_impl.h", + "src/core/lib/transport/transport_op_string.c", + "src/core/lib/tsi/fake_transport_security.c", + "src/core/lib/tsi/fake_transport_security.h", + "src/core/lib/tsi/ssl_transport_security.c", + "src/core/lib/tsi/ssl_transport_security.h", + "src/core/lib/tsi/ssl_types.h", + "src/core/lib/tsi/transport_security.c", + "src/core/lib/tsi/transport_security.h", + "src/core/lib/tsi/transport_security_interface.h" + ], + "third_party": false, + "type": "lib" + }, + { + "deps": [], + "headers": [ + "include/grpc/impl/codegen/alloc.h", + "include/grpc/impl/codegen/atm.h", + "include/grpc/impl/codegen/atm_gcc_atomic.h", + "include/grpc/impl/codegen/atm_gcc_sync.h", + "include/grpc/impl/codegen/atm_win32.h", + "include/grpc/impl/codegen/byte_buffer.h", + "include/grpc/impl/codegen/compression_types.h", + "include/grpc/impl/codegen/connectivity_state.h", + "include/grpc/impl/codegen/grpc_types.h", + "include/grpc/impl/codegen/log.h", + "include/grpc/impl/codegen/port_platform.h", + "include/grpc/impl/codegen/propagation_bits.h", + "include/grpc/impl/codegen/slice.h", + "include/grpc/impl/codegen/slice_buffer.h", + "include/grpc/impl/codegen/status.h", + "include/grpc/impl/codegen/sync.h", + "include/grpc/impl/codegen/sync_generic.h", + "include/grpc/impl/codegen/sync_posix.h", + "include/grpc/impl/codegen/sync_win32.h", + "include/grpc/impl/codegen/time.h" + ], + "language": "c", + "name": "grpc_codegen_lib", + "src": [ + "include/grpc/impl/codegen/alloc.h", + "include/grpc/impl/codegen/atm.h", + "include/grpc/impl/codegen/atm_gcc_atomic.h", + "include/grpc/impl/codegen/atm_gcc_sync.h", + "include/grpc/impl/codegen/atm_win32.h", + "include/grpc/impl/codegen/byte_buffer.h", + "include/grpc/impl/codegen/compression_types.h", + "include/grpc/impl/codegen/connectivity_state.h", + "include/grpc/impl/codegen/grpc_types.h", + "include/grpc/impl/codegen/log.h", + "include/grpc/impl/codegen/port_platform.h", + "include/grpc/impl/codegen/propagation_bits.h", + "include/grpc/impl/codegen/slice.h", + "include/grpc/impl/codegen/slice_buffer.h", + "include/grpc/impl/codegen/status.h", + "include/grpc/impl/codegen/sync.h", + "include/grpc/impl/codegen/sync_generic.h", + "include/grpc/impl/codegen/sync_posix.h", + "include/grpc/impl/codegen/sync_win32.h", + "include/grpc/impl/codegen/time.h" ], "third_party": false, "type": "lib" @@ -4359,6 +4462,7 @@ "test/core/util/grpc_profiler.h", "test/core/util/parse_hexstring.h", "test/core/util/port.h", + "test/core/util/port_server_client.h", "test/core/util/slice_splitter.h" ], "language": "c", @@ -4382,6 +4486,8 @@ "test/core/util/parse_hexstring.h", "test/core/util/port.h", "test/core/util/port_posix.c", + "test/core/util/port_server_client.c", + "test/core/util/port_server_client.h", "test/core/util/port_windows.c", "test/core/util/slice_splitter.c", "test/core/util/slice_splitter.h" @@ -4402,6 +4508,7 @@ "test/core/util/grpc_profiler.h", "test/core/util/parse_hexstring.h", "test/core/util/port.h", + "test/core/util/port_server_client.h", "test/core/util/slice_splitter.h" ], "language": "c", @@ -4419,6 +4526,8 @@ "test/core/util/parse_hexstring.h", "test/core/util/port.h", "test/core/util/port_posix.c", + "test/core/util/port_server_client.c", + "test/core/util/port_server_client.h", "test/core/util/port_windows.c", "test/core/util/slice_splitter.c", "test/core/util/slice_splitter.h" @@ -4443,124 +4552,129 @@ "include/grpc/impl/codegen/propagation_bits.h", "include/grpc/impl/codegen/status.h", "include/grpc/status.h", - "src/core/census/aggregation.h", - "src/core/census/grpc_filter.h", - "src/core/census/mlog.h", - "src/core/census/rpc_metric_id.h", - "src/core/channel/channel_args.h", - "src/core/channel/channel_stack.h", - "src/core/channel/client_channel.h", - "src/core/channel/client_uchannel.h", - "src/core/channel/compress_filter.h", - "src/core/channel/connected_channel.h", - "src/core/channel/context.h", - "src/core/channel/http_client_filter.h", - "src/core/channel/http_server_filter.h", - "src/core/channel/subchannel_call_holder.h", - "src/core/client_config/client_config.h", - "src/core/client_config/connector.h", - "src/core/client_config/initial_connect_string.h", - "src/core/client_config/lb_policies/load_balancer_api.h", - "src/core/client_config/lb_policies/pick_first.h", - "src/core/client_config/lb_policies/round_robin.h", - "src/core/client_config/lb_policy.h", - "src/core/client_config/lb_policy_factory.h", - "src/core/client_config/lb_policy_registry.h", - "src/core/client_config/resolver.h", - "src/core/client_config/resolver_factory.h", - "src/core/client_config/resolver_registry.h", - "src/core/client_config/resolvers/dns_resolver.h", - "src/core/client_config/resolvers/sockaddr_resolver.h", - "src/core/client_config/subchannel.h", - "src/core/client_config/subchannel_factory.h", - "src/core/client_config/subchannel_index.h", - "src/core/client_config/uri_parser.h", - "src/core/compression/algorithm_metadata.h", - "src/core/compression/message_compress.h", - "src/core/debug/trace.h", - "src/core/httpcli/format_request.h", - "src/core/httpcli/httpcli.h", - "src/core/httpcli/parser.h", - "src/core/iomgr/closure.h", - "src/core/iomgr/endpoint.h", - "src/core/iomgr/endpoint_pair.h", - "src/core/iomgr/exec_ctx.h", - "src/core/iomgr/executor.h", - "src/core/iomgr/fd_posix.h", - "src/core/iomgr/iocp_windows.h", - "src/core/iomgr/iomgr.h", - "src/core/iomgr/iomgr_internal.h", - "src/core/iomgr/iomgr_posix.h", - "src/core/iomgr/pollset.h", - "src/core/iomgr/pollset_posix.h", - "src/core/iomgr/pollset_set.h", - "src/core/iomgr/pollset_set_posix.h", - "src/core/iomgr/pollset_set_windows.h", - "src/core/iomgr/pollset_windows.h", - "src/core/iomgr/resolve_address.h", - "src/core/iomgr/sockaddr.h", - "src/core/iomgr/sockaddr_posix.h", - "src/core/iomgr/sockaddr_utils.h", - "src/core/iomgr/sockaddr_win32.h", - "src/core/iomgr/socket_utils_posix.h", - "src/core/iomgr/socket_windows.h", - "src/core/iomgr/tcp_client.h", - "src/core/iomgr/tcp_posix.h", - "src/core/iomgr/tcp_server.h", - "src/core/iomgr/tcp_windows.h", - "src/core/iomgr/time_averaged_stats.h", - "src/core/iomgr/timer.h", - "src/core/iomgr/timer_heap.h", - "src/core/iomgr/udp_server.h", - "src/core/iomgr/wakeup_fd_pipe.h", - "src/core/iomgr/wakeup_fd_posix.h", - "src/core/iomgr/workqueue.h", - "src/core/iomgr/workqueue_posix.h", - "src/core/iomgr/workqueue_windows.h", - "src/core/json/json.h", - "src/core/json/json_common.h", - "src/core/json/json_reader.h", - "src/core/json/json_writer.h", - "src/core/proto/grpc/lb/v0/load_balancer.pb.h", - "src/core/statistics/census_interface.h", - "src/core/statistics/census_rpc_stats.h", - "src/core/surface/api_trace.h", - "src/core/surface/call.h", - "src/core/surface/call_test_only.h", - "src/core/surface/channel.h", - "src/core/surface/completion_queue.h", - "src/core/surface/event_string.h", - "src/core/surface/init.h", - "src/core/surface/server.h", - "src/core/surface/surface_trace.h", - "src/core/transport/byte_stream.h", - "src/core/transport/chttp2/alpn.h", - "src/core/transport/chttp2/bin_encoder.h", - "src/core/transport/chttp2/frame.h", - "src/core/transport/chttp2/frame_data.h", - "src/core/transport/chttp2/frame_goaway.h", - "src/core/transport/chttp2/frame_ping.h", - "src/core/transport/chttp2/frame_rst_stream.h", - "src/core/transport/chttp2/frame_settings.h", - "src/core/transport/chttp2/frame_window_update.h", - "src/core/transport/chttp2/hpack_encoder.h", - "src/core/transport/chttp2/hpack_parser.h", - "src/core/transport/chttp2/hpack_table.h", - "src/core/transport/chttp2/http2_errors.h", - "src/core/transport/chttp2/huffsyms.h", - "src/core/transport/chttp2/incoming_metadata.h", - "src/core/transport/chttp2/internal.h", - "src/core/transport/chttp2/status_conversion.h", - "src/core/transport/chttp2/stream_map.h", - "src/core/transport/chttp2/timeout_encoding.h", - "src/core/transport/chttp2/varint.h", - "src/core/transport/chttp2_transport.h", - "src/core/transport/connectivity_state.h", - "src/core/transport/metadata.h", - "src/core/transport/metadata_batch.h", - "src/core/transport/static_metadata.h", - "src/core/transport/transport.h", - "src/core/transport/transport_impl.h", + "src/core/ext/transport/chttp2/transport/alpn.h", + "src/core/ext/transport/chttp2/transport/bin_encoder.h", + "src/core/ext/transport/chttp2/transport/chttp2_transport.h", + "src/core/ext/transport/chttp2/transport/frame.h", + "src/core/ext/transport/chttp2/transport/frame_data.h", + "src/core/ext/transport/chttp2/transport/frame_goaway.h", + "src/core/ext/transport/chttp2/transport/frame_ping.h", + "src/core/ext/transport/chttp2/transport/frame_rst_stream.h", + "src/core/ext/transport/chttp2/transport/frame_settings.h", + "src/core/ext/transport/chttp2/transport/frame_window_update.h", + "src/core/ext/transport/chttp2/transport/hpack_encoder.h", + "src/core/ext/transport/chttp2/transport/hpack_parser.h", + "src/core/ext/transport/chttp2/transport/hpack_table.h", + "src/core/ext/transport/chttp2/transport/http2_errors.h", + "src/core/ext/transport/chttp2/transport/huffsyms.h", + "src/core/ext/transport/chttp2/transport/incoming_metadata.h", + "src/core/ext/transport/chttp2/transport/internal.h", + "src/core/ext/transport/chttp2/transport/status_conversion.h", + "src/core/ext/transport/chttp2/transport/stream_map.h", + "src/core/ext/transport/chttp2/transport/timeout_encoding.h", + "src/core/ext/transport/chttp2/transport/varint.h", + "src/core/lib/census/aggregation.h", + "src/core/lib/census/grpc_filter.h", + "src/core/lib/census/grpc_plugin.h", + "src/core/lib/census/mlog.h", + "src/core/lib/census/rpc_metric_id.h", + "src/core/lib/channel/channel_args.h", + "src/core/lib/channel/channel_stack.h", + "src/core/lib/channel/channel_stack_builder.h", + "src/core/lib/channel/client_channel.h", + "src/core/lib/channel/compress_filter.h", + "src/core/lib/channel/connected_channel.h", + "src/core/lib/channel/context.h", + "src/core/lib/channel/http_client_filter.h", + "src/core/lib/channel/http_server_filter.h", + "src/core/lib/channel/subchannel_call_holder.h", + "src/core/lib/client_config/client_config.h", + "src/core/lib/client_config/connector.h", + "src/core/lib/client_config/initial_connect_string.h", + "src/core/lib/client_config/lb_policies/load_balancer_api.h", + "src/core/lib/client_config/lb_policies/pick_first.h", + "src/core/lib/client_config/lb_policies/round_robin.h", + "src/core/lib/client_config/lb_policy.h", + "src/core/lib/client_config/lb_policy_factory.h", + "src/core/lib/client_config/lb_policy_registry.h", + "src/core/lib/client_config/resolver.h", + "src/core/lib/client_config/resolver_factory.h", + "src/core/lib/client_config/resolver_registry.h", + "src/core/lib/client_config/resolvers/dns_resolver.h", + "src/core/lib/client_config/resolvers/sockaddr_resolver.h", + "src/core/lib/client_config/subchannel.h", + "src/core/lib/client_config/subchannel_factory.h", + "src/core/lib/client_config/subchannel_index.h", + "src/core/lib/client_config/uri_parser.h", + "src/core/lib/compression/algorithm_metadata.h", + "src/core/lib/compression/message_compress.h", + "src/core/lib/debug/trace.h", + "src/core/lib/http/format_request.h", + "src/core/lib/http/httpcli.h", + "src/core/lib/http/parser.h", + "src/core/lib/iomgr/closure.h", + "src/core/lib/iomgr/endpoint.h", + "src/core/lib/iomgr/endpoint_pair.h", + "src/core/lib/iomgr/exec_ctx.h", + "src/core/lib/iomgr/executor.h", + "src/core/lib/iomgr/fd_posix.h", + "src/core/lib/iomgr/iocp_windows.h", + "src/core/lib/iomgr/iomgr.h", + "src/core/lib/iomgr/iomgr_internal.h", + "src/core/lib/iomgr/iomgr_posix.h", + "src/core/lib/iomgr/pollset.h", + "src/core/lib/iomgr/pollset_posix.h", + "src/core/lib/iomgr/pollset_set.h", + "src/core/lib/iomgr/pollset_set_posix.h", + "src/core/lib/iomgr/pollset_set_windows.h", + "src/core/lib/iomgr/pollset_windows.h", + "src/core/lib/iomgr/resolve_address.h", + "src/core/lib/iomgr/sockaddr.h", + "src/core/lib/iomgr/sockaddr_posix.h", + "src/core/lib/iomgr/sockaddr_utils.h", + "src/core/lib/iomgr/sockaddr_win32.h", + "src/core/lib/iomgr/socket_utils_posix.h", + "src/core/lib/iomgr/socket_windows.h", + "src/core/lib/iomgr/tcp_client.h", + "src/core/lib/iomgr/tcp_posix.h", + "src/core/lib/iomgr/tcp_server.h", + "src/core/lib/iomgr/tcp_windows.h", + "src/core/lib/iomgr/time_averaged_stats.h", + "src/core/lib/iomgr/timer.h", + "src/core/lib/iomgr/timer_heap.h", + "src/core/lib/iomgr/udp_server.h", + "src/core/lib/iomgr/unix_sockets_posix.h", + "src/core/lib/iomgr/wakeup_fd_pipe.h", + "src/core/lib/iomgr/wakeup_fd_posix.h", + "src/core/lib/iomgr/workqueue.h", + "src/core/lib/iomgr/workqueue_posix.h", + "src/core/lib/iomgr/workqueue_windows.h", + "src/core/lib/json/json.h", + "src/core/lib/json/json_common.h", + "src/core/lib/json/json_reader.h", + "src/core/lib/json/json_writer.h", + "src/core/lib/proto/grpc/lb/v0/load_balancer.pb.h", + "src/core/lib/statistics/census_interface.h", + "src/core/lib/statistics/census_rpc_stats.h", + "src/core/lib/surface/api_trace.h", + "src/core/lib/surface/call.h", + "src/core/lib/surface/call_test_only.h", + "src/core/lib/surface/channel.h", + "src/core/lib/surface/channel_init.h", + "src/core/lib/surface/channel_stack_type.h", + "src/core/lib/surface/completion_queue.h", + "src/core/lib/surface/event_string.h", + "src/core/lib/surface/init.h", + "src/core/lib/surface/lame_client.h", + "src/core/lib/surface/server.h", + "src/core/lib/surface/surface_trace.h", + "src/core/lib/transport/byte_stream.h", + "src/core/lib/transport/connectivity_state.h", + "src/core/lib/transport/metadata.h", + "src/core/lib/transport/metadata_batch.h", + "src/core/lib/transport/static_metadata.h", + "src/core/lib/transport/transport.h", + "src/core/lib/transport/transport_impl.h", "third_party/nanopb/pb.h", "third_party/nanopb/pb_common.h", "third_party/nanopb/pb_decode.h", @@ -4581,261 +4695,270 @@ "include/grpc/impl/codegen/propagation_bits.h", "include/grpc/impl/codegen/status.h", "include/grpc/status.h", - "src/core/census/aggregation.h", - "src/core/census/context.c", - "src/core/census/grpc_context.c", - "src/core/census/grpc_filter.c", - "src/core/census/grpc_filter.h", - "src/core/census/initialize.c", - "src/core/census/mlog.c", - "src/core/census/mlog.h", - "src/core/census/operation.c", - "src/core/census/placeholders.c", - "src/core/census/rpc_metric_id.h", - "src/core/census/tracing.c", - "src/core/channel/channel_args.c", - "src/core/channel/channel_args.h", - "src/core/channel/channel_stack.c", - "src/core/channel/channel_stack.h", - "src/core/channel/client_channel.c", - "src/core/channel/client_channel.h", - "src/core/channel/client_uchannel.c", - "src/core/channel/client_uchannel.h", - "src/core/channel/compress_filter.c", - "src/core/channel/compress_filter.h", - "src/core/channel/connected_channel.c", - "src/core/channel/connected_channel.h", - "src/core/channel/context.h", - "src/core/channel/http_client_filter.c", - "src/core/channel/http_client_filter.h", - "src/core/channel/http_server_filter.c", - "src/core/channel/http_server_filter.h", - "src/core/channel/subchannel_call_holder.c", - "src/core/channel/subchannel_call_holder.h", - "src/core/client_config/client_config.c", - "src/core/client_config/client_config.h", - "src/core/client_config/connector.c", - "src/core/client_config/connector.h", - "src/core/client_config/default_initial_connect_string.c", - "src/core/client_config/initial_connect_string.c", - "src/core/client_config/initial_connect_string.h", - "src/core/client_config/lb_policies/load_balancer_api.c", - "src/core/client_config/lb_policies/load_balancer_api.h", - "src/core/client_config/lb_policies/pick_first.c", - "src/core/client_config/lb_policies/pick_first.h", - "src/core/client_config/lb_policies/round_robin.c", - "src/core/client_config/lb_policies/round_robin.h", - "src/core/client_config/lb_policy.c", - "src/core/client_config/lb_policy.h", - "src/core/client_config/lb_policy_factory.c", - "src/core/client_config/lb_policy_factory.h", - "src/core/client_config/lb_policy_registry.c", - "src/core/client_config/lb_policy_registry.h", - "src/core/client_config/resolver.c", - "src/core/client_config/resolver.h", - "src/core/client_config/resolver_factory.c", - "src/core/client_config/resolver_factory.h", - "src/core/client_config/resolver_registry.c", - "src/core/client_config/resolver_registry.h", - "src/core/client_config/resolvers/dns_resolver.c", - "src/core/client_config/resolvers/dns_resolver.h", - "src/core/client_config/resolvers/sockaddr_resolver.c", - "src/core/client_config/resolvers/sockaddr_resolver.h", - "src/core/client_config/subchannel.c", - "src/core/client_config/subchannel.h", - "src/core/client_config/subchannel_factory.c", - "src/core/client_config/subchannel_factory.h", - "src/core/client_config/subchannel_index.c", - "src/core/client_config/subchannel_index.h", - "src/core/client_config/uri_parser.c", - "src/core/client_config/uri_parser.h", - "src/core/compression/algorithm_metadata.h", - "src/core/compression/compression_algorithm.c", - "src/core/compression/message_compress.c", - "src/core/compression/message_compress.h", - "src/core/debug/trace.c", - "src/core/debug/trace.h", - "src/core/httpcli/format_request.c", - "src/core/httpcli/format_request.h", - "src/core/httpcli/httpcli.c", - "src/core/httpcli/httpcli.h", - "src/core/httpcli/parser.c", - "src/core/httpcli/parser.h", - "src/core/iomgr/closure.c", - "src/core/iomgr/closure.h", - "src/core/iomgr/endpoint.c", - "src/core/iomgr/endpoint.h", - "src/core/iomgr/endpoint_pair.h", - "src/core/iomgr/endpoint_pair_posix.c", - "src/core/iomgr/endpoint_pair_windows.c", - "src/core/iomgr/exec_ctx.c", - "src/core/iomgr/exec_ctx.h", - "src/core/iomgr/executor.c", - "src/core/iomgr/executor.h", - "src/core/iomgr/fd_posix.c", - "src/core/iomgr/fd_posix.h", - "src/core/iomgr/iocp_windows.c", - "src/core/iomgr/iocp_windows.h", - "src/core/iomgr/iomgr.c", - "src/core/iomgr/iomgr.h", - "src/core/iomgr/iomgr_internal.h", - "src/core/iomgr/iomgr_posix.c", - "src/core/iomgr/iomgr_posix.h", - "src/core/iomgr/iomgr_windows.c", - "src/core/iomgr/pollset.h", - "src/core/iomgr/pollset_multipoller_with_epoll.c", - "src/core/iomgr/pollset_multipoller_with_poll_posix.c", - "src/core/iomgr/pollset_posix.c", - "src/core/iomgr/pollset_posix.h", - "src/core/iomgr/pollset_set.h", - "src/core/iomgr/pollset_set_posix.c", - "src/core/iomgr/pollset_set_posix.h", - "src/core/iomgr/pollset_set_windows.c", - "src/core/iomgr/pollset_set_windows.h", - "src/core/iomgr/pollset_windows.c", - "src/core/iomgr/pollset_windows.h", - "src/core/iomgr/resolve_address.h", - "src/core/iomgr/resolve_address_posix.c", - "src/core/iomgr/resolve_address_windows.c", - "src/core/iomgr/sockaddr.h", - "src/core/iomgr/sockaddr_posix.h", - "src/core/iomgr/sockaddr_utils.c", - "src/core/iomgr/sockaddr_utils.h", - "src/core/iomgr/sockaddr_win32.h", - "src/core/iomgr/socket_utils_common_posix.c", - "src/core/iomgr/socket_utils_linux.c", - "src/core/iomgr/socket_utils_posix.c", - "src/core/iomgr/socket_utils_posix.h", - "src/core/iomgr/socket_windows.c", - "src/core/iomgr/socket_windows.h", - "src/core/iomgr/tcp_client.h", - "src/core/iomgr/tcp_client_posix.c", - "src/core/iomgr/tcp_client_windows.c", - "src/core/iomgr/tcp_posix.c", - "src/core/iomgr/tcp_posix.h", - "src/core/iomgr/tcp_server.h", - "src/core/iomgr/tcp_server_posix.c", - "src/core/iomgr/tcp_server_windows.c", - "src/core/iomgr/tcp_windows.c", - "src/core/iomgr/tcp_windows.h", - "src/core/iomgr/time_averaged_stats.c", - "src/core/iomgr/time_averaged_stats.h", - "src/core/iomgr/timer.c", - "src/core/iomgr/timer.h", - "src/core/iomgr/timer_heap.c", - "src/core/iomgr/timer_heap.h", - "src/core/iomgr/udp_server.c", - "src/core/iomgr/udp_server.h", - "src/core/iomgr/wakeup_fd_eventfd.c", - "src/core/iomgr/wakeup_fd_nospecial.c", - "src/core/iomgr/wakeup_fd_pipe.c", - "src/core/iomgr/wakeup_fd_pipe.h", - "src/core/iomgr/wakeup_fd_posix.c", - "src/core/iomgr/wakeup_fd_posix.h", - "src/core/iomgr/workqueue.h", - "src/core/iomgr/workqueue_posix.c", - "src/core/iomgr/workqueue_posix.h", - "src/core/iomgr/workqueue_windows.c", - "src/core/iomgr/workqueue_windows.h", - "src/core/json/json.c", - "src/core/json/json.h", - "src/core/json/json_common.h", - "src/core/json/json_reader.c", - "src/core/json/json_reader.h", - "src/core/json/json_string.c", - "src/core/json/json_writer.c", - "src/core/json/json_writer.h", - "src/core/proto/grpc/lb/v0/load_balancer.pb.c", - "src/core/proto/grpc/lb/v0/load_balancer.pb.h", - "src/core/statistics/census_interface.h", - "src/core/statistics/census_rpc_stats.h", - "src/core/surface/alarm.c", - "src/core/surface/api_trace.c", - "src/core/surface/api_trace.h", - "src/core/surface/byte_buffer.c", - "src/core/surface/byte_buffer_reader.c", - "src/core/surface/call.c", - "src/core/surface/call.h", - "src/core/surface/call_details.c", - "src/core/surface/call_log_batch.c", - "src/core/surface/call_test_only.h", - "src/core/surface/channel.c", - "src/core/surface/channel.h", - "src/core/surface/channel_connectivity.c", - "src/core/surface/channel_create.c", - "src/core/surface/channel_ping.c", - "src/core/surface/completion_queue.c", - "src/core/surface/completion_queue.h", - "src/core/surface/event_string.c", - "src/core/surface/event_string.h", - "src/core/surface/init.c", - "src/core/surface/init.h", - "src/core/surface/init_unsecure.c", - "src/core/surface/lame_client.c", - "src/core/surface/metadata_array.c", - "src/core/surface/server.c", - "src/core/surface/server.h", - "src/core/surface/server_chttp2.c", - "src/core/surface/server_create.c", - "src/core/surface/surface_trace.h", - "src/core/surface/validate_metadata.c", - "src/core/surface/version.c", - "src/core/transport/byte_stream.c", - "src/core/transport/byte_stream.h", - "src/core/transport/chttp2/alpn.c", - "src/core/transport/chttp2/alpn.h", - "src/core/transport/chttp2/bin_encoder.c", - "src/core/transport/chttp2/bin_encoder.h", - "src/core/transport/chttp2/frame.h", - "src/core/transport/chttp2/frame_data.c", - "src/core/transport/chttp2/frame_data.h", - "src/core/transport/chttp2/frame_goaway.c", - "src/core/transport/chttp2/frame_goaway.h", - "src/core/transport/chttp2/frame_ping.c", - "src/core/transport/chttp2/frame_ping.h", - "src/core/transport/chttp2/frame_rst_stream.c", - "src/core/transport/chttp2/frame_rst_stream.h", - "src/core/transport/chttp2/frame_settings.c", - "src/core/transport/chttp2/frame_settings.h", - "src/core/transport/chttp2/frame_window_update.c", - "src/core/transport/chttp2/frame_window_update.h", - "src/core/transport/chttp2/hpack_encoder.c", - "src/core/transport/chttp2/hpack_encoder.h", - "src/core/transport/chttp2/hpack_parser.c", - "src/core/transport/chttp2/hpack_parser.h", - "src/core/transport/chttp2/hpack_table.c", - "src/core/transport/chttp2/hpack_table.h", - "src/core/transport/chttp2/http2_errors.h", - "src/core/transport/chttp2/huffsyms.c", - "src/core/transport/chttp2/huffsyms.h", - "src/core/transport/chttp2/incoming_metadata.c", - "src/core/transport/chttp2/incoming_metadata.h", - "src/core/transport/chttp2/internal.h", - "src/core/transport/chttp2/parsing.c", - "src/core/transport/chttp2/status_conversion.c", - "src/core/transport/chttp2/status_conversion.h", - "src/core/transport/chttp2/stream_lists.c", - "src/core/transport/chttp2/stream_map.c", - "src/core/transport/chttp2/stream_map.h", - "src/core/transport/chttp2/timeout_encoding.c", - "src/core/transport/chttp2/timeout_encoding.h", - "src/core/transport/chttp2/varint.c", - "src/core/transport/chttp2/varint.h", - "src/core/transport/chttp2/writing.c", - "src/core/transport/chttp2_transport.c", - "src/core/transport/chttp2_transport.h", - "src/core/transport/connectivity_state.c", - "src/core/transport/connectivity_state.h", - "src/core/transport/metadata.c", - "src/core/transport/metadata.h", - "src/core/transport/metadata_batch.c", - "src/core/transport/metadata_batch.h", - "src/core/transport/static_metadata.c", - "src/core/transport/static_metadata.h", - "src/core/transport/transport.c", - "src/core/transport/transport.h", - "src/core/transport/transport_impl.h", - "src/core/transport/transport_op_string.c" + "src/core/ext/transport/chttp2/client/insecure/channel_create.c", + "src/core/ext/transport/chttp2/server/insecure/server_chttp2.c", + "src/core/ext/transport/chttp2/transport/alpn.c", + "src/core/ext/transport/chttp2/transport/alpn.h", + "src/core/ext/transport/chttp2/transport/bin_encoder.c", + "src/core/ext/transport/chttp2/transport/bin_encoder.h", + "src/core/ext/transport/chttp2/transport/chttp2_transport.c", + "src/core/ext/transport/chttp2/transport/chttp2_transport.h", + "src/core/ext/transport/chttp2/transport/frame.h", + "src/core/ext/transport/chttp2/transport/frame_data.c", + "src/core/ext/transport/chttp2/transport/frame_data.h", + "src/core/ext/transport/chttp2/transport/frame_goaway.c", + "src/core/ext/transport/chttp2/transport/frame_goaway.h", + "src/core/ext/transport/chttp2/transport/frame_ping.c", + "src/core/ext/transport/chttp2/transport/frame_ping.h", + "src/core/ext/transport/chttp2/transport/frame_rst_stream.c", + "src/core/ext/transport/chttp2/transport/frame_rst_stream.h", + "src/core/ext/transport/chttp2/transport/frame_settings.c", + "src/core/ext/transport/chttp2/transport/frame_settings.h", + "src/core/ext/transport/chttp2/transport/frame_window_update.c", + "src/core/ext/transport/chttp2/transport/frame_window_update.h", + "src/core/ext/transport/chttp2/transport/hpack_encoder.c", + "src/core/ext/transport/chttp2/transport/hpack_encoder.h", + "src/core/ext/transport/chttp2/transport/hpack_parser.c", + "src/core/ext/transport/chttp2/transport/hpack_parser.h", + "src/core/ext/transport/chttp2/transport/hpack_table.c", + "src/core/ext/transport/chttp2/transport/hpack_table.h", + "src/core/ext/transport/chttp2/transport/http2_errors.h", + "src/core/ext/transport/chttp2/transport/huffsyms.c", + "src/core/ext/transport/chttp2/transport/huffsyms.h", + "src/core/ext/transport/chttp2/transport/incoming_metadata.c", + "src/core/ext/transport/chttp2/transport/incoming_metadata.h", + "src/core/ext/transport/chttp2/transport/internal.h", + "src/core/ext/transport/chttp2/transport/parsing.c", + "src/core/ext/transport/chttp2/transport/status_conversion.c", + "src/core/ext/transport/chttp2/transport/status_conversion.h", + "src/core/ext/transport/chttp2/transport/stream_lists.c", + "src/core/ext/transport/chttp2/transport/stream_map.c", + "src/core/ext/transport/chttp2/transport/stream_map.h", + "src/core/ext/transport/chttp2/transport/timeout_encoding.c", + "src/core/ext/transport/chttp2/transport/timeout_encoding.h", + "src/core/ext/transport/chttp2/transport/varint.c", + "src/core/ext/transport/chttp2/transport/varint.h", + "src/core/ext/transport/chttp2/transport/writing.c", + "src/core/lib/census/aggregation.h", + "src/core/lib/census/context.c", + "src/core/lib/census/grpc_context.c", + "src/core/lib/census/grpc_filter.c", + "src/core/lib/census/grpc_filter.h", + "src/core/lib/census/grpc_plugin.c", + "src/core/lib/census/grpc_plugin.h", + "src/core/lib/census/initialize.c", + "src/core/lib/census/mlog.c", + "src/core/lib/census/mlog.h", + "src/core/lib/census/operation.c", + "src/core/lib/census/placeholders.c", + "src/core/lib/census/rpc_metric_id.h", + "src/core/lib/census/tracing.c", + "src/core/lib/channel/channel_args.c", + "src/core/lib/channel/channel_args.h", + "src/core/lib/channel/channel_stack.c", + "src/core/lib/channel/channel_stack.h", + "src/core/lib/channel/channel_stack_builder.c", + "src/core/lib/channel/channel_stack_builder.h", + "src/core/lib/channel/client_channel.c", + "src/core/lib/channel/client_channel.h", + "src/core/lib/channel/compress_filter.c", + "src/core/lib/channel/compress_filter.h", + "src/core/lib/channel/connected_channel.c", + "src/core/lib/channel/connected_channel.h", + "src/core/lib/channel/context.h", + "src/core/lib/channel/http_client_filter.c", + "src/core/lib/channel/http_client_filter.h", + "src/core/lib/channel/http_server_filter.c", + "src/core/lib/channel/http_server_filter.h", + "src/core/lib/channel/subchannel_call_holder.c", + "src/core/lib/channel/subchannel_call_holder.h", + "src/core/lib/client_config/client_config.c", + "src/core/lib/client_config/client_config.h", + "src/core/lib/client_config/connector.c", + "src/core/lib/client_config/connector.h", + "src/core/lib/client_config/default_initial_connect_string.c", + "src/core/lib/client_config/initial_connect_string.c", + "src/core/lib/client_config/initial_connect_string.h", + "src/core/lib/client_config/lb_policies/load_balancer_api.c", + "src/core/lib/client_config/lb_policies/load_balancer_api.h", + "src/core/lib/client_config/lb_policies/pick_first.c", + "src/core/lib/client_config/lb_policies/pick_first.h", + "src/core/lib/client_config/lb_policies/round_robin.c", + "src/core/lib/client_config/lb_policies/round_robin.h", + "src/core/lib/client_config/lb_policy.c", + "src/core/lib/client_config/lb_policy.h", + "src/core/lib/client_config/lb_policy_factory.c", + "src/core/lib/client_config/lb_policy_factory.h", + "src/core/lib/client_config/lb_policy_registry.c", + "src/core/lib/client_config/lb_policy_registry.h", + "src/core/lib/client_config/resolver.c", + "src/core/lib/client_config/resolver.h", + "src/core/lib/client_config/resolver_factory.c", + "src/core/lib/client_config/resolver_factory.h", + "src/core/lib/client_config/resolver_registry.c", + "src/core/lib/client_config/resolver_registry.h", + "src/core/lib/client_config/resolvers/dns_resolver.c", + "src/core/lib/client_config/resolvers/dns_resolver.h", + "src/core/lib/client_config/resolvers/sockaddr_resolver.c", + "src/core/lib/client_config/resolvers/sockaddr_resolver.h", + "src/core/lib/client_config/subchannel.c", + "src/core/lib/client_config/subchannel.h", + "src/core/lib/client_config/subchannel_factory.c", + "src/core/lib/client_config/subchannel_factory.h", + "src/core/lib/client_config/subchannel_index.c", + "src/core/lib/client_config/subchannel_index.h", + "src/core/lib/client_config/uri_parser.c", + "src/core/lib/client_config/uri_parser.h", + "src/core/lib/compression/algorithm_metadata.h", + "src/core/lib/compression/compression_algorithm.c", + "src/core/lib/compression/message_compress.c", + "src/core/lib/compression/message_compress.h", + "src/core/lib/debug/trace.c", + "src/core/lib/debug/trace.h", + "src/core/lib/http/format_request.c", + "src/core/lib/http/format_request.h", + "src/core/lib/http/httpcli.c", + "src/core/lib/http/httpcli.h", + "src/core/lib/http/parser.c", + "src/core/lib/http/parser.h", + "src/core/lib/iomgr/closure.c", + "src/core/lib/iomgr/closure.h", + "src/core/lib/iomgr/endpoint.c", + "src/core/lib/iomgr/endpoint.h", + "src/core/lib/iomgr/endpoint_pair.h", + "src/core/lib/iomgr/endpoint_pair_posix.c", + "src/core/lib/iomgr/endpoint_pair_windows.c", + "src/core/lib/iomgr/exec_ctx.c", + "src/core/lib/iomgr/exec_ctx.h", + "src/core/lib/iomgr/executor.c", + "src/core/lib/iomgr/executor.h", + "src/core/lib/iomgr/fd_posix.c", + "src/core/lib/iomgr/fd_posix.h", + "src/core/lib/iomgr/iocp_windows.c", + "src/core/lib/iomgr/iocp_windows.h", + "src/core/lib/iomgr/iomgr.c", + "src/core/lib/iomgr/iomgr.h", + "src/core/lib/iomgr/iomgr_internal.h", + "src/core/lib/iomgr/iomgr_posix.c", + "src/core/lib/iomgr/iomgr_posix.h", + "src/core/lib/iomgr/iomgr_windows.c", + "src/core/lib/iomgr/pollset.h", + "src/core/lib/iomgr/pollset_multipoller_with_epoll.c", + "src/core/lib/iomgr/pollset_multipoller_with_poll_posix.c", + "src/core/lib/iomgr/pollset_posix.c", + "src/core/lib/iomgr/pollset_posix.h", + "src/core/lib/iomgr/pollset_set.h", + "src/core/lib/iomgr/pollset_set_posix.c", + "src/core/lib/iomgr/pollset_set_posix.h", + "src/core/lib/iomgr/pollset_set_windows.c", + "src/core/lib/iomgr/pollset_set_windows.h", + "src/core/lib/iomgr/pollset_windows.c", + "src/core/lib/iomgr/pollset_windows.h", + "src/core/lib/iomgr/resolve_address.h", + "src/core/lib/iomgr/resolve_address_posix.c", + "src/core/lib/iomgr/resolve_address_windows.c", + "src/core/lib/iomgr/sockaddr.h", + "src/core/lib/iomgr/sockaddr_posix.h", + "src/core/lib/iomgr/sockaddr_utils.c", + "src/core/lib/iomgr/sockaddr_utils.h", + "src/core/lib/iomgr/sockaddr_win32.h", + "src/core/lib/iomgr/socket_utils_common_posix.c", + "src/core/lib/iomgr/socket_utils_linux.c", + "src/core/lib/iomgr/socket_utils_posix.c", + "src/core/lib/iomgr/socket_utils_posix.h", + "src/core/lib/iomgr/socket_windows.c", + "src/core/lib/iomgr/socket_windows.h", + "src/core/lib/iomgr/tcp_client.h", + "src/core/lib/iomgr/tcp_client_posix.c", + "src/core/lib/iomgr/tcp_client_windows.c", + "src/core/lib/iomgr/tcp_posix.c", + "src/core/lib/iomgr/tcp_posix.h", + "src/core/lib/iomgr/tcp_server.h", + "src/core/lib/iomgr/tcp_server_posix.c", + "src/core/lib/iomgr/tcp_server_windows.c", + "src/core/lib/iomgr/tcp_windows.c", + "src/core/lib/iomgr/tcp_windows.h", + "src/core/lib/iomgr/time_averaged_stats.c", + "src/core/lib/iomgr/time_averaged_stats.h", + "src/core/lib/iomgr/timer.c", + "src/core/lib/iomgr/timer.h", + "src/core/lib/iomgr/timer_heap.c", + "src/core/lib/iomgr/timer_heap.h", + "src/core/lib/iomgr/udp_server.c", + "src/core/lib/iomgr/udp_server.h", + "src/core/lib/iomgr/unix_sockets_posix.c", + "src/core/lib/iomgr/unix_sockets_posix.h", + "src/core/lib/iomgr/unix_sockets_posix_noop.c", + "src/core/lib/iomgr/wakeup_fd_eventfd.c", + "src/core/lib/iomgr/wakeup_fd_nospecial.c", + "src/core/lib/iomgr/wakeup_fd_pipe.c", + "src/core/lib/iomgr/wakeup_fd_pipe.h", + "src/core/lib/iomgr/wakeup_fd_posix.c", + "src/core/lib/iomgr/wakeup_fd_posix.h", + "src/core/lib/iomgr/workqueue.h", + "src/core/lib/iomgr/workqueue_posix.c", + "src/core/lib/iomgr/workqueue_posix.h", + "src/core/lib/iomgr/workqueue_windows.c", + "src/core/lib/iomgr/workqueue_windows.h", + "src/core/lib/json/json.c", + "src/core/lib/json/json.h", + "src/core/lib/json/json_common.h", + "src/core/lib/json/json_reader.c", + "src/core/lib/json/json_reader.h", + "src/core/lib/json/json_string.c", + "src/core/lib/json/json_writer.c", + "src/core/lib/json/json_writer.h", + "src/core/lib/proto/grpc/lb/v0/load_balancer.pb.c", + "src/core/lib/proto/grpc/lb/v0/load_balancer.pb.h", + "src/core/lib/statistics/census_interface.h", + "src/core/lib/statistics/census_rpc_stats.h", + "src/core/lib/surface/alarm.c", + "src/core/lib/surface/api_trace.c", + "src/core/lib/surface/api_trace.h", + "src/core/lib/surface/byte_buffer.c", + "src/core/lib/surface/byte_buffer_reader.c", + "src/core/lib/surface/call.c", + "src/core/lib/surface/call.h", + "src/core/lib/surface/call_details.c", + "src/core/lib/surface/call_log_batch.c", + "src/core/lib/surface/call_test_only.h", + "src/core/lib/surface/channel.c", + "src/core/lib/surface/channel.h", + "src/core/lib/surface/channel_connectivity.c", + "src/core/lib/surface/channel_init.c", + "src/core/lib/surface/channel_init.h", + "src/core/lib/surface/channel_ping.c", + "src/core/lib/surface/channel_stack_type.c", + "src/core/lib/surface/channel_stack_type.h", + "src/core/lib/surface/completion_queue.c", + "src/core/lib/surface/completion_queue.h", + "src/core/lib/surface/event_string.c", + "src/core/lib/surface/event_string.h", + "src/core/lib/surface/init.c", + "src/core/lib/surface/init.h", + "src/core/lib/surface/init_unsecure.c", + "src/core/lib/surface/lame_client.c", + "src/core/lib/surface/lame_client.h", + "src/core/lib/surface/metadata_array.c", + "src/core/lib/surface/server.c", + "src/core/lib/surface/server.h", + "src/core/lib/surface/surface_trace.h", + "src/core/lib/surface/validate_metadata.c", + "src/core/lib/surface/version.c", + "src/core/lib/transport/byte_stream.c", + "src/core/lib/transport/byte_stream.h", + "src/core/lib/transport/connectivity_state.c", + "src/core/lib/transport/connectivity_state.h", + "src/core/lib/transport/metadata.c", + "src/core/lib/transport/metadata.h", + "src/core/lib/transport/metadata_batch.c", + "src/core/lib/transport/metadata_batch.h", + "src/core/lib/transport/static_metadata.c", + "src/core/lib/transport/static_metadata.h", + "src/core/lib/transport/transport.c", + "src/core/lib/transport/transport.h", + "src/core/lib/transport/transport_impl.h", + "src/core/lib/transport/transport_op_string.c" ], "third_party": false, "type": "lib" @@ -4847,14 +4970,14 @@ ], "headers": [ "include/grpc/grpc_zookeeper.h", - "src/core/client_config/resolvers/zookeeper_resolver.h" + "src/core/lib/client_config/resolvers/zookeeper_resolver.h" ], "language": "c", "name": "grpc_zookeeper", "src": [ "include/grpc/grpc_zookeeper.h", - "src/core/client_config/resolvers/zookeeper_resolver.c", - "src/core/client_config/resolvers/zookeeper_resolver.h" + "src/core/lib/client_config/resolvers/zookeeper_resolver.c", + "src/core/lib/client_config/resolvers/zookeeper_resolver.h" ], "third_party": false, "type": "lib" @@ -4924,6 +5047,7 @@ "include/grpc++/impl/codegen/completion_queue_tag.h", "include/grpc++/impl/codegen/config.h", "include/grpc++/impl/codegen/config_protobuf.h", + "include/grpc++/impl/codegen/core_codegen_interface.h", "include/grpc++/impl/codegen/grpc_library.h", "include/grpc++/impl/codegen/method_handler_impl.h", "include/grpc++/impl/codegen/proto_utils.h", @@ -4979,6 +5103,7 @@ "include/grpc++/support/time.h", "src/cpp/client/create_channel_internal.h", "src/cpp/client/secure_credentials.h", + "src/cpp/common/core_codegen.h", "src/cpp/common/create_auth_context.h", "src/cpp/common/secure_auth_context.h", "src/cpp/server/dynamic_thread_pool.h", @@ -5009,6 +5134,7 @@ "include/grpc++/impl/codegen/completion_queue_tag.h", "include/grpc++/impl/codegen/config.h", "include/grpc++/impl/codegen/config_protobuf.h", + "include/grpc++/impl/codegen/core_codegen_interface.h", "include/grpc++/impl/codegen/grpc_library.h", "include/grpc++/impl/codegen/method_handler_impl.h", "include/grpc++/impl/codegen/proto_utils.h", @@ -5072,18 +5198,18 @@ "src/cpp/client/insecure_credentials.cc", "src/cpp/client/secure_credentials.cc", "src/cpp/client/secure_credentials.h", - "src/cpp/codegen/grpc_library.cc", + "src/cpp/codegen/codegen_init.cc", "src/cpp/common/auth_property_iterator.cc", - "src/cpp/common/call.cc", "src/cpp/common/channel_arguments.cc", "src/cpp/common/completion_queue.cc", + "src/cpp/common/core_codegen.cc", + "src/cpp/common/core_codegen.h", "src/cpp/common/create_auth_context.h", "src/cpp/common/rpc_method.cc", "src/cpp/common/secure_auth_context.cc", "src/cpp/common/secure_auth_context.h", "src/cpp/common/secure_channel_arguments.cc", "src/cpp/common/secure_create_auth_context.cc", - "src/cpp/proto/proto_utils.cc", "src/cpp/server/async_generic_service.cc", "src/cpp/server/create_default_thread_pool.cc", "src/cpp/server/dynamic_thread_pool.cc", @@ -5105,6 +5231,120 @@ "third_party": false, "type": "lib" }, + { + "deps": [], + "headers": [ + "include/grpc++/impl/codegen/async_stream.h", + "include/grpc++/impl/codegen/async_unary_call.h", + "include/grpc++/impl/codegen/call.h", + "include/grpc++/impl/codegen/call_hook.h", + "include/grpc++/impl/codegen/channel_interface.h", + "include/grpc++/impl/codegen/client_context.h", + "include/grpc++/impl/codegen/client_unary_call.h", + "include/grpc++/impl/codegen/completion_queue.h", + "include/grpc++/impl/codegen/completion_queue_tag.h", + "include/grpc++/impl/codegen/config.h", + "include/grpc++/impl/codegen/config_protobuf.h", + "include/grpc++/impl/codegen/core_codegen_interface.h", + "include/grpc++/impl/codegen/grpc_library.h", + "include/grpc++/impl/codegen/method_handler_impl.h", + "include/grpc++/impl/codegen/proto_utils.h", + "include/grpc++/impl/codegen/rpc_method.h", + "include/grpc++/impl/codegen/rpc_service_method.h", + "include/grpc++/impl/codegen/security/auth_context.h", + "include/grpc++/impl/codegen/serialization_traits.h", + "include/grpc++/impl/codegen/server_context.h", + "include/grpc++/impl/codegen/server_interface.h", + "include/grpc++/impl/codegen/service_type.h", + "include/grpc++/impl/codegen/status.h", + "include/grpc++/impl/codegen/status_code_enum.h", + "include/grpc++/impl/codegen/string_ref.h", + "include/grpc++/impl/codegen/stub_options.h", + "include/grpc++/impl/codegen/sync.h", + "include/grpc++/impl/codegen/sync_cxx11.h", + "include/grpc++/impl/codegen/sync_no_cxx11.h", + "include/grpc++/impl/codegen/sync_stream.h", + "include/grpc++/impl/codegen/time.h", + "include/grpc/impl/codegen/alloc.h", + "include/grpc/impl/codegen/atm.h", + "include/grpc/impl/codegen/atm_gcc_atomic.h", + "include/grpc/impl/codegen/atm_gcc_sync.h", + "include/grpc/impl/codegen/atm_win32.h", + "include/grpc/impl/codegen/byte_buffer.h", + "include/grpc/impl/codegen/compression_types.h", + "include/grpc/impl/codegen/connectivity_state.h", + "include/grpc/impl/codegen/grpc_types.h", + "include/grpc/impl/codegen/log.h", + "include/grpc/impl/codegen/port_platform.h", + "include/grpc/impl/codegen/propagation_bits.h", + "include/grpc/impl/codegen/slice.h", + "include/grpc/impl/codegen/slice_buffer.h", + "include/grpc/impl/codegen/status.h", + "include/grpc/impl/codegen/sync.h", + "include/grpc/impl/codegen/sync_generic.h", + "include/grpc/impl/codegen/sync_posix.h", + "include/grpc/impl/codegen/sync_win32.h", + "include/grpc/impl/codegen/time.h" + ], + "language": "c++", + "name": "grpc++_codegen_lib", + "src": [ + "include/grpc++/impl/codegen/async_stream.h", + "include/grpc++/impl/codegen/async_unary_call.h", + "include/grpc++/impl/codegen/call.h", + "include/grpc++/impl/codegen/call_hook.h", + "include/grpc++/impl/codegen/channel_interface.h", + "include/grpc++/impl/codegen/client_context.h", + "include/grpc++/impl/codegen/client_unary_call.h", + "include/grpc++/impl/codegen/completion_queue.h", + "include/grpc++/impl/codegen/completion_queue_tag.h", + "include/grpc++/impl/codegen/config.h", + "include/grpc++/impl/codegen/config_protobuf.h", + "include/grpc++/impl/codegen/core_codegen_interface.h", + "include/grpc++/impl/codegen/grpc_library.h", + "include/grpc++/impl/codegen/method_handler_impl.h", + "include/grpc++/impl/codegen/proto_utils.h", + "include/grpc++/impl/codegen/rpc_method.h", + "include/grpc++/impl/codegen/rpc_service_method.h", + "include/grpc++/impl/codegen/security/auth_context.h", + "include/grpc++/impl/codegen/serialization_traits.h", + "include/grpc++/impl/codegen/server_context.h", + "include/grpc++/impl/codegen/server_interface.h", + "include/grpc++/impl/codegen/service_type.h", + "include/grpc++/impl/codegen/status.h", + "include/grpc++/impl/codegen/status_code_enum.h", + "include/grpc++/impl/codegen/string_ref.h", + "include/grpc++/impl/codegen/stub_options.h", + "include/grpc++/impl/codegen/sync.h", + "include/grpc++/impl/codegen/sync_cxx11.h", + "include/grpc++/impl/codegen/sync_no_cxx11.h", + "include/grpc++/impl/codegen/sync_stream.h", + "include/grpc++/impl/codegen/time.h", + "include/grpc/impl/codegen/alloc.h", + "include/grpc/impl/codegen/atm.h", + "include/grpc/impl/codegen/atm_gcc_atomic.h", + "include/grpc/impl/codegen/atm_gcc_sync.h", + "include/grpc/impl/codegen/atm_win32.h", + "include/grpc/impl/codegen/byte_buffer.h", + "include/grpc/impl/codegen/compression_types.h", + "include/grpc/impl/codegen/connectivity_state.h", + "include/grpc/impl/codegen/grpc_types.h", + "include/grpc/impl/codegen/log.h", + "include/grpc/impl/codegen/port_platform.h", + "include/grpc/impl/codegen/propagation_bits.h", + "include/grpc/impl/codegen/slice.h", + "include/grpc/impl/codegen/slice_buffer.h", + "include/grpc/impl/codegen/status.h", + "include/grpc/impl/codegen/sync.h", + "include/grpc/impl/codegen/sync_generic.h", + "include/grpc/impl/codegen/sync_posix.h", + "include/grpc/impl/codegen/sync_win32.h", + "include/grpc/impl/codegen/time.h", + "src/cpp/codegen/codegen_init.cc" + ], + "third_party": false, + "type": "lib" + }, { "deps": [], "headers": [ @@ -5187,6 +5427,7 @@ "include/grpc++/impl/codegen/completion_queue_tag.h", "include/grpc++/impl/codegen/config.h", "include/grpc++/impl/codegen/config_protobuf.h", + "include/grpc++/impl/codegen/core_codegen_interface.h", "include/grpc++/impl/codegen/grpc_library.h", "include/grpc++/impl/codegen/method_handler_impl.h", "include/grpc++/impl/codegen/proto_utils.h", @@ -5241,6 +5482,7 @@ "include/grpc++/support/sync_stream.h", "include/grpc++/support/time.h", "src/cpp/client/create_channel_internal.h", + "src/cpp/common/core_codegen.h", "src/cpp/common/create_auth_context.h", "src/cpp/server/dynamic_thread_pool.h", "src/cpp/server/thread_pool_interface.h" @@ -5269,6 +5511,7 @@ "include/grpc++/impl/codegen/completion_queue_tag.h", "include/grpc++/impl/codegen/config.h", "include/grpc++/impl/codegen/config_protobuf.h", + "include/grpc++/impl/codegen/core_codegen_interface.h", "include/grpc++/impl/codegen/grpc_library.h", "include/grpc++/impl/codegen/method_handler_impl.h", "include/grpc++/impl/codegen/proto_utils.h", @@ -5330,14 +5573,14 @@ "src/cpp/client/credentials.cc", "src/cpp/client/generic_stub.cc", "src/cpp/client/insecure_credentials.cc", - "src/cpp/codegen/grpc_library.cc", - "src/cpp/common/call.cc", + "src/cpp/codegen/codegen_init.cc", "src/cpp/common/channel_arguments.cc", "src/cpp/common/completion_queue.cc", + "src/cpp/common/core_codegen.cc", + "src/cpp/common/core_codegen.h", "src/cpp/common/create_auth_context.h", "src/cpp/common/insecure_create_auth_context.cc", "src/cpp/common/rpc_method.cc", - "src/cpp/proto/proto_utils.cc", "src/cpp/server/async_generic_service.cc", "src/cpp/server/create_default_thread_pool.cc", "src/cpp/server/dynamic_thread_pool.cc", @@ -5358,38 +5601,10 @@ "type": "lib" }, { - "deps": [], + "deps": [ + "grpc++_codegen_lib" + ], "headers": [ - "include/grpc++/impl/codegen/async_stream.h", - "include/grpc++/impl/codegen/async_unary_call.h", - "include/grpc++/impl/codegen/call.h", - "include/grpc++/impl/codegen/call_hook.h", - "include/grpc++/impl/codegen/channel_interface.h", - "include/grpc++/impl/codegen/client_context.h", - "include/grpc++/impl/codegen/client_unary_call.h", - "include/grpc++/impl/codegen/completion_queue.h", - "include/grpc++/impl/codegen/completion_queue_tag.h", - "include/grpc++/impl/codegen/config.h", - "include/grpc++/impl/codegen/config_protobuf.h", - "include/grpc++/impl/codegen/grpc_library.h", - "include/grpc++/impl/codegen/method_handler_impl.h", - "include/grpc++/impl/codegen/proto_utils.h", - "include/grpc++/impl/codegen/rpc_method.h", - "include/grpc++/impl/codegen/rpc_service_method.h", - "include/grpc++/impl/codegen/security/auth_context.h", - "include/grpc++/impl/codegen/serialization_traits.h", - "include/grpc++/impl/codegen/server_context.h", - "include/grpc++/impl/codegen/server_interface.h", - "include/grpc++/impl/codegen/service_type.h", - "include/grpc++/impl/codegen/status.h", - "include/grpc++/impl/codegen/status_code_enum.h", - "include/grpc++/impl/codegen/string_ref.h", - "include/grpc++/impl/codegen/stub_options.h", - "include/grpc++/impl/codegen/sync.h", - "include/grpc++/impl/codegen/sync_cxx11.h", - "include/grpc++/impl/codegen/sync_no_cxx11.h", - "include/grpc++/impl/codegen/sync_stream.h", - "include/grpc++/impl/codegen/time.h", "include/grpc++/support/config.h", "include/grpc++/support/config_protobuf.h", "include/grpc/impl/codegen/alloc.h", @@ -5397,16 +5612,10 @@ "include/grpc/impl/codegen/atm_gcc_atomic.h", "include/grpc/impl/codegen/atm_gcc_sync.h", "include/grpc/impl/codegen/atm_win32.h", - "include/grpc/impl/codegen/byte_buffer.h", - "include/grpc/impl/codegen/compression_types.h", - "include/grpc/impl/codegen/connectivity_state.h", - "include/grpc/impl/codegen/grpc_types.h", "include/grpc/impl/codegen/log.h", "include/grpc/impl/codegen/port_platform.h", - "include/grpc/impl/codegen/propagation_bits.h", "include/grpc/impl/codegen/slice.h", "include/grpc/impl/codegen/slice_buffer.h", - "include/grpc/impl/codegen/status.h", "include/grpc/impl/codegen/sync.h", "include/grpc/impl/codegen/sync_generic.h", "include/grpc/impl/codegen/sync_posix.h", @@ -5429,36 +5638,6 @@ "language": "c++", "name": "grpc_plugin_support", "src": [ - "include/grpc++/impl/codegen/async_stream.h", - "include/grpc++/impl/codegen/async_unary_call.h", - "include/grpc++/impl/codegen/call.h", - "include/grpc++/impl/codegen/call_hook.h", - "include/grpc++/impl/codegen/channel_interface.h", - "include/grpc++/impl/codegen/client_context.h", - "include/grpc++/impl/codegen/client_unary_call.h", - "include/grpc++/impl/codegen/completion_queue.h", - "include/grpc++/impl/codegen/completion_queue_tag.h", - "include/grpc++/impl/codegen/config.h", - "include/grpc++/impl/codegen/config_protobuf.h", - "include/grpc++/impl/codegen/grpc_library.h", - "include/grpc++/impl/codegen/method_handler_impl.h", - "include/grpc++/impl/codegen/proto_utils.h", - "include/grpc++/impl/codegen/rpc_method.h", - "include/grpc++/impl/codegen/rpc_service_method.h", - "include/grpc++/impl/codegen/security/auth_context.h", - "include/grpc++/impl/codegen/serialization_traits.h", - "include/grpc++/impl/codegen/server_context.h", - "include/grpc++/impl/codegen/server_interface.h", - "include/grpc++/impl/codegen/service_type.h", - "include/grpc++/impl/codegen/status.h", - "include/grpc++/impl/codegen/status_code_enum.h", - "include/grpc++/impl/codegen/string_ref.h", - "include/grpc++/impl/codegen/stub_options.h", - "include/grpc++/impl/codegen/sync.h", - "include/grpc++/impl/codegen/sync_cxx11.h", - "include/grpc++/impl/codegen/sync_no_cxx11.h", - "include/grpc++/impl/codegen/sync_stream.h", - "include/grpc++/impl/codegen/time.h", "include/grpc++/support/config.h", "include/grpc++/support/config_protobuf.h", "include/grpc/impl/codegen/alloc.h", @@ -5466,16 +5645,10 @@ "include/grpc/impl/codegen/atm_gcc_atomic.h", "include/grpc/impl/codegen/atm_gcc_sync.h", "include/grpc/impl/codegen/atm_win32.h", - "include/grpc/impl/codegen/byte_buffer.h", - "include/grpc/impl/codegen/compression_types.h", - "include/grpc/impl/codegen/connectivity_state.h", - "include/grpc/impl/codegen/grpc_types.h", "include/grpc/impl/codegen/log.h", "include/grpc/impl/codegen/port_platform.h", - "include/grpc/impl/codegen/propagation_bits.h", "include/grpc/impl/codegen/slice.h", "include/grpc/impl/codegen/slice_buffer.h", - "include/grpc/impl/codegen/status.h", "include/grpc/impl/codegen/sync.h", "include/grpc/impl/codegen/sync_generic.h", "include/grpc/impl/codegen/sync_posix.h", @@ -5498,8 +5671,7 @@ "src/compiler/ruby_generator.h", "src/compiler/ruby_generator_helpers-inl.h", "src/compiler/ruby_generator_map-inl.h", - "src/compiler/ruby_generator_string-inl.h", - "src/cpp/codegen/grpc_library.cc" + "src/compiler/ruby_generator_string-inl.h" ], "third_party": false, "type": "lib" @@ -5818,6 +5990,18 @@ "third_party": true, "type": "lib" }, + { + "deps": [ + "boringssl", + "boringssl_test_util" + ], + "headers": [], + "language": "c++", + "name": "boringssl_asn1_test_lib", + "src": [], + "third_party": true, + "type": "lib" + }, { "deps": [ "boringssl", @@ -6299,7 +6483,6 @@ }, { "deps": [ - "end2end_certs", "gpr", "gpr_test_util", "grpc", @@ -6410,18 +6593,5 @@ ], "third_party": false, "type": "lib" - }, - { - "deps": [], - "headers": [], - "language": "c", - "name": "end2end_certs", - "src": [ - "test/core/end2end/data/server1_cert.c", - "test/core/end2end/data/server1_key.c", - "test/core/end2end/data/test_root_cert.c" - ], - "third_party": false, - "type": "lib" } ] diff --git a/tools/run_tests/stress_test/README.md b/tools/run_tests/stress_test/README.md index 80e4cd58f0a..84f9719cb16 100644 --- a/tools/run_tests/stress_test/README.md +++ b/tools/run_tests/stress_test/README.md @@ -30,6 +30,27 @@ 3. Install Google Cloud SDK. Instructions [here](https://cloud.google.com/sdk/). This installs the `gcloud` tool 4. Install `kubectl`, Kubernetes command line tool using `gcloud`. i.e - `$ gcloud components update kubectl` + - NOTE: If you are running this from a GCE instance, the command may fail with the following error: + ``` + You cannot perform this action because this Cloud SDK installation is + managed by an external package manager. If you would like to get the + latest version, please see our main download page at: + + https://developers.google.com/cloud/sdk/ + + ERROR: (gcloud.components.update) The component manager is disabled for this installation + ``` + -- If so, you will have to manually install Cloud SDK by doing the following + ```shell + $ # The following installs latest Cloud SDK and updates the PATH + $ # (Accept the default values when prompted) + $ curl https://sdk.cloud.google.com | bash + $ exec -l $SHELL + $ # Set the defaults. Pick the default GCE credentials when prompted (The service account + $ # name will have a name similar to: "xxx-compute@developer.gserviceaccount.com") + $ gcloud init + ``` + 5. Install Google python client apis: - `‘$ sudo pip install --upgrade google-api-python-client’` - **Note**: Do `$ sudo apt-get install python-pip` (or `$ easy_install -U pip`) if you do not have pip @@ -46,8 +67,10 @@ The script has several parameters and you can find out more details by using the - `$ tools/run_tests/stress_test/run_stress_tests_on_gke.py --help` > **Example** -> `$ tools/run_tests/stress_test/run_stress_tests_on_gke.py --project_id=sree-gce --test_duration_secs=180 --num_clients=5` - -> Launches the 5 instances of stress test clients, 1 instance of stress test server and runs the test for 180 seconds. The test would be run on the default container cluster (that you have set in `gcloud`) in the project `sree-gce`. +> ```bash +> $ # Change to the grpc root directory +> $ cd $GRPC_ROOT +> $ tools/run_tests/stress_test/run_on_gke.py --project_id=sree-gce --config_file=tools/run_tests/stress_test/configs/opt.json +> ``` -> Note: we currently do not have the ability to launch multiple instances of the server. This can be added very easily in future +> The above runs the stress test on GKE under the project `sree-gce` in the default cluster (that you set by `gcloud` command earlier). The test settings (like number of client instances, servers, the parmeters to pass, test cases etc) are all loaded from the config file `$GRPC_ROOT/tools/run_tests/stress_test/opt.json` diff --git a/tools/run_tests/stress_test/STRESS_CLIENT_SPEC.md b/tools/run_tests/stress_test/STRESS_CLIENT_SPEC.md new file mode 100644 index 00000000000..c4c9f145137 --- /dev/null +++ b/tools/run_tests/stress_test/STRESS_CLIENT_SPEC.md @@ -0,0 +1,25 @@ +Stress Test client Specification +========================= +This document specifies the features a stress test client should implement in order to work with the stress testing framework. The stress test clients are executed against the existing interop test servers. + +**Requirements** +-------------- +**1.** A stress test client should be able to repeatedly execute one or more of the existing 'interop test cases'. It may just be a wrapper around the existing interop test client. The exact command line arguments the client should support are listed in _Table 1_ below. + +**2.** The stress test client must implement a metrics server defined by _[metrics.proto](https://github.com/grpc/grpc/blob/master/src/proto/grpc/testing/metrics.proto)_ and must expose _qps_ as a long-valued Gauge. The client can track the overall _qps_ in one Gauge or in multiple Gagues (for example: One per Channel or Stub). + The framework periodically queries the _qps_ by calling the `GetAllGauges()` method (the framework assumes that all the returned Gauges are _qps_ Gauges) and uses this to determine if the stress test client is running or crashed or stalled. +> *Note:* In this context, the term _**qps**_ means _interop test cases per second_ (not _messages per second_ or _rpc calls per second_) + + +**Table 1:** Command line arguments that should be supported by the stress test client. + +>_**Note** The current C++ [stress client](https://github.com/grpc/grpc/blob/master/test/cpp/interop/stress_test.cc) supports more flags than those listed here but those flags will soon be deprecated_| + +Parameter | Description +----------------------|--------------------------------- +`--server_address` | The stress client should accept a list of server addresses in the following format:
```:,:..:```
_Note:_ `` can be either server name or IP address.

_Type:_ string
_default:_ ```localhost:8080```
_Example:_ ``foo.foobar.com:8080,bar.foobar.com:8080``

Currently, the stress test framework only passes one server address to the client. +`--test_cases` | List of test cases along with the relative weights in the following format:
`,...`.
The test cases names are the same as those currently used by the interop clients

_Type:_ string
_Example:_ `empty_unary:20,large_unary:10,empty_stream:70`
(The stress client would then make `empty_unary` calls 20% of the time, `large_unary` calls 10% of the time and `empty_stream` calls 70% of the time.)
_Note:_ The weights need not add up to 100. +`--test_duration-secs` | The test duration in seconds. A value of -1 means that the test should run forever until forcefully terminated.
_Type:_ int
_default:_ -1 +`--num_channels_per_server` | Number of channels (i.e connections) to each server.
_Type:_ int
_default:_ 1

_Note:_ Unfortunately, the term `channel` is used differently in `grpc-java` and `C based grpc`. In this context, this really means "number of connections to the server" +`--num_stubs_per_channel ` | Number of client stubs per each connection to server.
_Type:_ int
_default:_ 1 +`--metrics_port` | The port at which the stress client exposes [QPS metrics](https://github.com/grpc/grpc/blob/master/src/proto/grpc/testing/metrics.proto).
_Type:_ int
_default:_ 8081 diff --git a/tools/run_tests/stress_test/configs/opt-tsan-asan.json b/tools/run_tests/stress_test/configs/opt-tsan-asan.json new file mode 100644 index 00000000000..1dc2d3fe086 --- /dev/null +++ b/tools/run_tests/stress_test/configs/opt-tsan-asan.json @@ -0,0 +1,135 @@ +{ + "dockerImages": { + "grpc_stress_cxx_opt" : { + "buildScript": "tools/jenkins/build_interop_stress_image.sh", + "dockerFileDir": "grpc_interop_stress_cxx", + "buildType": "opt" + }, + "grpc_stress_cxx_tsan": { + "buildScript": "tools/jenkins/build_interop_stress_image.sh", + "dockerFileDir": "grpc_interop_stress_cxx", + "buildType": "tsan" + }, + "grpc_stress_cxx_asan": { + "buildScript": "tools/jenkins/build_interop_stress_image.sh", + "dockerFileDir": "grpc_interop_stress_cxx", + "buildType": "asan" + } + }, + + "clientTemplates": { + "baseTemplates": { + "default": { + "wrapperScriptPath": "/var/local/git/grpc/tools/gcp/stress_test/run_client.py", + "pollIntervalSecs": 60, + "clientArgs": { + "num_channels_per_server":5, + "num_stubs_per_channel":10, + "test_cases": "empty_unary:1,large_unary:1,client_streaming:1,server_streaming:1,empty_stream:1", + "metrics_port": 8081, + "metrics_collection_interval_secs":60 + }, + "metricsPort": 8081, + "metricsArgs": { + "metrics_server_address": "localhost:8081", + "total_only": "true" + } + } + }, + "templates": { + "cxx_client_opt": { + "baseTemplate": "default", + "clientImagePath": "/var/local/git/grpc/bins/opt/stress_test", + "metricsClientImagePath": "/var/local/git/grpc/bins/opt/metrics_client" + }, + "cxx_client_tsan": { + "baseTemplate": "default", + "clientImagePath": "/var/local/git/grpc/bins/tsan/stress_test", + "metricsClientImagePath": "/var/local/git/grpc/bins/tsan/metrics_client" + }, + "cxx_client_asan": { + "baseTemplate": "default", + "clientImagePath": "/var/local/git/grpc/bins/asan/stress_test", + "metricsClientImagePath": "/var/local/git/grpc/bins/asan/metrics_client" + } + } + }, + + "serverTemplates": { + "baseTemplates":{ + "default": { + "wrapperScriptPath": "/var/local/git/grpc/tools/gcp/stress_test/run_server.py", + "serverPort": 8080, + "serverArgs": { + "port": 8080 + } + } + }, + "templates": { + "cxx_server_opt": { + "baseTemplate": "default", + "serverImagePath": "/var/local/git/grpc/bins/opt/interop_server" + }, + "cxx_server_tsan": { + "baseTemplate": "default", + "serverImagePath": "/var/local/git/grpc/bins/tsan/interop_server" + }, + "cxx_server_asan": { + "baseTemplate": "default", + "serverImagePath": "/var/local/git/grpc/bins/asan/interop_server" + } + } + }, + + "testMatrix": { + "serverPodSpecs": { + "stress-server-opt": { + "serverTemplate": "cxx_server_opt", + "dockerImage": "grpc_stress_cxx_opt", + "numInstances": 1 + }, + "stress-server-tsan": { + "serverTemplate": "cxx_server_tsan", + "dockerImage": "grpc_stress_cxx_tsan", + "numInstances": 1 + }, + "stress-server-asan": { + "serverTemplate": "cxx_server_asan", + "dockerImage": "grpc_stress_cxx_asan", + "numInstances": 1 + } + }, + + "clientPodSpecs": { + "stress-client-opt": { + "clientTemplate": "cxx_client_opt", + "dockerImage": "grpc_stress_cxx_opt", + "numInstances": 3, + "serverPodSpec": "stress-server-opt" + }, + "stress-client-tsan": { + "clientTemplate": "cxx_client_tsan", + "dockerImage": "grpc_stress_cxx_tsan", + "numInstances": 3, + "serverPodSpec": "stress-server-tsan" + }, + "stress-client-asan": { + "clientTemplate": "cxx_client_asan", + "dockerImage": "grpc_stress_cxx_asan", + "numInstances": 3, + "serverPodSpec": "stress-server-asan" + } + } + }, + + "globalSettings": { + "buildDockerImages": true, + "pollIntervalSecs": 60, + "testDurationSecs": 7200, + "kubernetesProxyPort": 8001, + "datasetIdNamePrefix": "stress_test_opt_tsan", + "summaryTableId": "summary", + "qpsTableId": "qps", + "podWarmupSecs": 60 + } +} diff --git a/tools/run_tests/stress_test/configs/opt.json b/tools/run_tests/stress_test/configs/opt.json new file mode 100644 index 00000000000..7fc024034b8 --- /dev/null +++ b/tools/run_tests/stress_test/configs/opt.json @@ -0,0 +1,86 @@ +{ + "dockerImages": { + "grpc_stress_cxx_opt" : { + "buildScript": "tools/jenkins/build_interop_stress_image.sh", + "dockerFileDir": "grpc_interop_stress_cxx", + "buildType": "opt" + } + }, + + "clientTemplates": { + "baseTemplates": { + "default": { + "wrapperScriptPath": "/var/local/git/grpc/tools/gcp/stress_test/run_client.py", + "pollIntervalSecs": 60, + "clientArgs": { + "num_channels_per_server":5, + "num_stubs_per_channel":10, + "test_cases": "empty_unary:1,large_unary:1,client_streaming:1,server_streaming:1,empty_stream:1", + "metrics_port": 8081, + "metrics_collection_interval_secs":60 + }, + "metricsPort": 8081, + "metricsArgs": { + "metrics_server_address": "localhost:8081", + "total_only": "true" + } + } + }, + "templates": { + "cxx_client_opt": { + "baseTemplate": "default", + "clientImagePath": "/var/local/git/grpc/bins/opt/stress_test", + "metricsClientImagePath": "/var/local/git/grpc/bins/opt/metrics_client" + } + } + }, + + "serverTemplates": { + "baseTemplates":{ + "default": { + "wrapperScriptPath": "/var/local/git/grpc/tools/gcp/stress_test/run_server.py", + "serverPort": 8080, + "serverArgs": { + "port": 8080 + } + } + }, + "templates": { + "cxx_server_opt": { + "baseTemplate": "default", + "serverImagePath": "/var/local/git/grpc/bins/opt/interop_server" + } + } + }, + + "testMatrix": { + "serverPodSpecs": { + "stress-server-opt": { + "serverTemplate": "cxx_server_opt", + "dockerImage": "grpc_stress_cxx_opt", + "numInstances": 1 + } + }, + + "clientPodSpecs": { + "stress-client-opt": { + "clientTemplate": "cxx_client_opt", + "dockerImage": "grpc_stress_cxx_opt", + "numInstances": 10, + "serverPodSpec": "stress-server-opt" + } + } + }, + + "globalSettings": { + "buildDockerImages": true, + "pollIntervalSecs": 10, + "testDurationSecs": 120, + "kubernetesProxyPort": 8001, + "datasetIdNamePrefix": "stress_test_opt", + "summaryTableId": "summary", + "qpsTableId": "qps", + "podWarmupSecs": 60 + } +} + diff --git a/tools/run_tests/stress_test/run_on_gke.py b/tools/run_tests/stress_test/run_on_gke.py new file mode 100755 index 00000000000..3a81c1a3763 --- /dev/null +++ b/tools/run_tests/stress_test/run_on_gke.py @@ -0,0 +1,636 @@ +#!/usr/bin/env python2.7 +# Copyright 2015-2016, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +import argparse +import datetime +import json +import os +import subprocess +import sys +import time + +stress_test_utils_dir = os.path.abspath(os.path.join( + os.path.dirname(__file__), '../../gcp/stress_test')) +sys.path.append(stress_test_utils_dir) +from stress_test_utils import BigQueryHelper + +kubernetes_api_dir = os.path.abspath(os.path.join( + os.path.dirname(__file__), '../../gcp/utils')) +sys.path.append(kubernetes_api_dir) + +import kubernetes_api + + +class GlobalSettings: + + def __init__(self, gcp_project_id, build_docker_images, + test_poll_interval_secs, test_duration_secs, + kubernetes_proxy_port, dataset_id_prefix, summary_table_id, + qps_table_id, pod_warmup_secs): + self.gcp_project_id = gcp_project_id + self.build_docker_images = build_docker_images + self.test_poll_interval_secs = test_poll_interval_secs + self.test_duration_secs = test_duration_secs + self.kubernetes_proxy_port = kubernetes_proxy_port + self.dataset_id_prefix = dataset_id_prefix + self.summary_table_id = summary_table_id + self.qps_table_id = qps_table_id + self.pod_warmup_secs = pod_warmup_secs + + +class ClientTemplate: + """ Contains all the common settings that are used by a stress client """ + + def __init__(self, name, client_image_path, metrics_client_image_path, + metrics_port, wrapper_script_path, poll_interval_secs, + client_args_dict, metrics_args_dict): + self.name = name + self.client_image_path = client_image_path + self.metrics_client_image_path = metrics_client_image_path + self.metrics_port = metrics_port + self.wrapper_script_path = wrapper_script_path + self.poll_interval_secs = poll_interval_secs + self.client_args_dict = client_args_dict + self.metrics_args_dict = metrics_args_dict + + +class ServerTemplate: + """ Contains all the common settings used by a stress server """ + + def __init__(self, name, server_image_path, wrapper_script_path, server_port, + server_args_dict): + self.name = name + self.server_image_path = server_image_path + self.wrapper_script_path = wrapper_script_path + self.server_port = server_port + self.server_args_dict = server_args_dict + + +class DockerImage: + """ Represents properties of a Docker image. Provides methods to build the + image and push it to GKE registry + """ + + def __init__(self, gcp_project_id, image_name, build_script_path, + dockerfile_dir, build_type): + """Args: + + image_name: The docker image name + tag_name: The additional tag name. This is the name used when pushing the + docker image to GKE registry + build_script_path: The path to the build script that builds this docker + image + dockerfile_dir: The name of the directory under + '/tools/dockerfile' that contains the dockerfile + """ + self.image_name = image_name + self.gcp_project_id = gcp_project_id + self.build_script_path = build_script_path + self.dockerfile_dir = dockerfile_dir + self.build_type = build_type + self.tag_name = self._make_tag_name(gcp_project_id, image_name) + + def _make_tag_name(self, project_id, image_name): + return 'gcr.io/%s/%s' % (project_id, image_name) + + def build_image(self): + print 'Building docker image: %s (tag: %s)' % (self.image_name, + self.tag_name) + os.environ['INTEROP_IMAGE'] = self.image_name + os.environ['INTEROP_IMAGE_REPOSITORY_TAG'] = self.tag_name + os.environ['BASE_NAME'] = self.dockerfile_dir + os.environ['BUILD_TYPE'] = self.build_type + print 'DEBUG: path: ', self.build_script_path + if subprocess.call(args=[self.build_script_path]) != 0: + print 'Error in building the Docker image' + return False + return True + + def push_to_gke_registry(self): + cmd = ['gcloud', 'docker', 'push', self.tag_name] + print 'Pushing %s to the GKE registry..' % self.tag_name + if subprocess.call(args=cmd) != 0: + print 'Error in pushing the image %s to the GKE registry' % self.tag_name + return False + return True + + +class ServerPodSpec: + """ Contains the information required to launch server pods. """ + + def __init__(self, name, server_template, docker_image, num_instances): + self.name = name + self.template = server_template + self.docker_image = docker_image + self.num_instances = num_instances + + def pod_names(self): + """ Return a list of names of server pods to create. """ + return ['%s-%d' % (self.name, i) for i in range(1, self.num_instances + 1)] + + def server_addresses(self): + """ Return string of server addresses in the following format: + ':,:...' + """ + return ','.join(['%s:%d' % (pod_name, self.template.server_port) + for pod_name in self.pod_names()]) + + +class ClientPodSpec: + """ Contains the information required to launch client pods """ + + def __init__(self, name, client_template, docker_image, num_instances, + server_addresses): + self.name = name + self.template = client_template + self.docker_image = docker_image + self.num_instances = num_instances + self.server_addresses = server_addresses + + def pod_names(self): + """ Return a list of names of client pods to create """ + return ['%s-%d' % (self.name, i) for i in range(1, self.num_instances + 1)] + + # The client args in the template do not have server addresses. This function + # adds the server addresses and returns the updated client args + def get_client_args_dict(self): + args_dict = self.template.client_args_dict.copy() + args_dict['server_addresses'] = self.server_addresses + return args_dict + + +class Gke: + """ Class that has helper methods to interact with GKE """ + + class KubernetesProxy: + """Class to start a proxy on localhost to talk to the Kubernetes API server""" + + def __init__(self, port): + cmd = ['kubectl', 'proxy', '--port=%d' % port] + self.p = subprocess.Popen(args=cmd) + time.sleep(2) + print '\nStarted kubernetes proxy on port: %d' % port + + def __del__(self): + if self.p is not None: + print 'Shutting down Kubernetes proxy..' + self.p.kill() + + def __init__(self, project_id, run_id, dataset_id, summary_table_id, + qps_table_id, kubernetes_port): + self.project_id = project_id + self.run_id = run_id + self.dataset_id = dataset_id + self.summary_table_id = summary_table_id + self.qps_table_id = qps_table_id + + # The environment variables we would like to pass to every pod (both client + # and server) launched in GKE + self.gke_env = { + 'RUN_ID': self.run_id, + 'GCP_PROJECT_ID': self.project_id, + 'DATASET_ID': self.dataset_id, + 'SUMMARY_TABLE_ID': self.summary_table_id, + 'QPS_TABLE_ID': self.qps_table_id + } + + self.kubernetes_port = kubernetes_port + # Start kubernetes proxy + self.kubernetes_proxy = Gke.KubernetesProxy(kubernetes_port) + + def _args_dict_to_str(self, args_dict): + return ' '.join('--%s=%s' % (k, args_dict[k]) for k in args_dict.keys()) + + def launch_servers(self, server_pod_spec): + is_success = True + + # The command to run inside the container is the wrapper script (which then + # launches the actual server) + container_cmd = server_pod_spec.template.wrapper_script_path + + # The parameters to the wrapper script (defined in + # server_pod_spec.template.wrapper_script_path) are are injected into the + # container via environment variables + server_env = self.gke_env.copy() + server_env.update({ + 'STRESS_TEST_IMAGE_TYPE': 'SERVER', + 'STRESS_TEST_IMAGE': server_pod_spec.template.server_image_path, + 'STRESS_TEST_ARGS_STR': self._args_dict_to_str( + server_pod_spec.template.server_args_dict) + }) + + for pod_name in server_pod_spec.pod_names(): + server_env['POD_NAME'] = pod_name + print 'Creating server: %s' % pod_name + is_success = kubernetes_api.create_pod_and_service( + 'localhost', + self.kubernetes_port, + 'default', # Use 'default' namespace + pod_name, + server_pod_spec.docker_image.tag_name, + [server_pod_spec.template.server_port], # Ports to expose on the pod + [container_cmd], + [], # Args list is empty since we are passing all args via env variables + server_env, + True # Headless = True for server to that GKE creates a DNS record for pod_name + ) + if not is_success: + print 'Error in launching server: %s' % pod_name + break + + if is_success: + print 'Successfully created server(s)' + + return is_success + + def launch_clients(self, client_pod_spec): + is_success = True + + # The command to run inside the container is the wrapper script (which then + # launches the actual stress client) + container_cmd = client_pod_spec.template.wrapper_script_path + + # The parameters to the wrapper script (defined in + # client_pod_spec.template.wrapper_script_path) are are injected into the + # container via environment variables + client_env = self.gke_env.copy() + client_env.update({ + 'STRESS_TEST_IMAGE_TYPE': 'CLIENT', + 'STRESS_TEST_IMAGE': client_pod_spec.template.client_image_path, + 'STRESS_TEST_ARGS_STR': self._args_dict_to_str( + client_pod_spec.get_client_args_dict()), + 'METRICS_CLIENT_IMAGE': + client_pod_spec.template.metrics_client_image_path, + 'METRICS_CLIENT_ARGS_STR': self._args_dict_to_str( + client_pod_spec.template.metrics_args_dict), + 'POLL_INTERVAL_SECS': str(client_pod_spec.template.poll_interval_secs) + }) + + for pod_name in client_pod_spec.pod_names(): + client_env['POD_NAME'] = pod_name + print 'Creating client: %s' % pod_name + is_success = kubernetes_api.create_pod_and_service( + 'localhost', + self.kubernetes_port, + 'default', # default namespace, + pod_name, + client_pod_spec.docker_image.tag_name, + [client_pod_spec.template.metrics_port], # Ports to expose on the pod + [container_cmd], + [], # Empty args list since all args are passed via env variables + client_env, + False # Client is not a headless service. + ) + + if not is_success: + print 'Error in launching client %s' % pod_name + break + + if is_success: + print 'Successfully created all client(s)' + + return is_success + + def _delete_pods(self, pod_name_list): + is_success = True + for pod_name in pod_name_list: + print 'Deleting %s' % pod_name + is_success = kubernetes_api.delete_pod_and_service( + 'localhost', + self.kubernetes_port, + 'default', # default namespace + pod_name) + + if not is_success: + print 'Error in deleting pod %s' % pod_name + break + + if is_success: + print 'Successfully deleted all pods' + + return is_success + + def delete_servers(self, server_pod_spec): + return self._delete_pods(server_pod_spec.pod_names()) + + def delete_clients(self, client_pod_spec): + return self._delete_pods(client_pod_spec.pod_names()) + + +class Config: + + def __init__(self, config_filename, gcp_project_id): + print 'Loading configuration...' + config_dict = self._load_config(config_filename) + + self.global_settings = self._parse_global_settings(config_dict, + gcp_project_id) + self.docker_images_dict = self._parse_docker_images( + config_dict, self.global_settings.gcp_project_id) + self.client_templates_dict = self._parse_client_templates(config_dict) + self.server_templates_dict = self._parse_server_templates(config_dict) + self.server_pod_specs_dict = self._parse_server_pod_specs( + config_dict, self.docker_images_dict, self.server_templates_dict) + self.client_pod_specs_dict = self._parse_client_pod_specs( + config_dict, self.docker_images_dict, self.client_templates_dict, + self.server_pod_specs_dict) + print 'Loaded Configuaration.' + + def _parse_global_settings(self, config_dict, gcp_project_id): + global_settings_dict = config_dict['globalSettings'] + return GlobalSettings(gcp_project_id, + global_settings_dict['buildDockerImages'], + global_settings_dict['pollIntervalSecs'], + global_settings_dict['testDurationSecs'], + global_settings_dict['kubernetesProxyPort'], + global_settings_dict['datasetIdNamePrefix'], + global_settings_dict['summaryTableId'], + global_settings_dict['qpsTableId'], + global_settings_dict['podWarmupSecs']) + + def _parse_docker_images(self, config_dict, gcp_project_id): + """Parses the 'dockerImages' section of the config file and returns a + Dictionary of 'DockerImage' objects keyed by docker image names""" + docker_images_dict = {} + + docker_config_dict = config_dict['dockerImages'] + for image_name in docker_config_dict.keys(): + build_script_path = docker_config_dict[image_name]['buildScript'] + dockerfile_dir = docker_config_dict[image_name]['dockerFileDir'] + build_type = docker_config_dict[image_name]['buildType'] + docker_images_dict[image_name] = DockerImage(gcp_project_id, image_name, + build_script_path, + dockerfile_dir, build_type) + return docker_images_dict + + def _parse_client_templates(self, config_dict): + """Parses the 'clientTemplates' section of the config file and returns a + Dictionary of 'ClientTemplate' objects keyed by client template names. + + Note: The 'baseTemplates' sub section of the config file contains templates + with default values and the 'templates' sub section contains the actual + client templates (which refer to the base template name to use for default + values). + """ + client_templates_dict = {} + + templates_dict = config_dict['clientTemplates']['templates'] + base_templates_dict = config_dict['clientTemplates'].get('baseTemplates', + {}) + for template_name in templates_dict.keys(): + # temp_dict is a temporary dictionary that merges base template dictionary + # and client template dictionary (with client template dictionary values + # overriding base template values) + temp_dict = {} + + base_template_name = templates_dict[template_name].get('baseTemplate') + if not base_template_name is None: + temp_dict = base_templates_dict[base_template_name].copy() + + temp_dict.update(templates_dict[template_name]) + + # Create and add ClientTemplate object to the final client_templates_dict + client_templates_dict[template_name] = ClientTemplate( + template_name, temp_dict['clientImagePath'], + temp_dict['metricsClientImagePath'], temp_dict['metricsPort'], + temp_dict['wrapperScriptPath'], temp_dict['pollIntervalSecs'], + temp_dict['clientArgs'].copy(), temp_dict['metricsArgs'].copy()) + + return client_templates_dict + + def _parse_server_templates(self, config_dict): + """Parses the 'serverTemplates' section of the config file and returns a + Dictionary of 'serverTemplate' objects keyed by server template names. + + Note: The 'baseTemplates' sub section of the config file contains templates + with default values and the 'templates' sub section contains the actual + server templates (which refer to the base template name to use for default + values). + """ + server_templates_dict = {} + + templates_dict = config_dict['serverTemplates']['templates'] + base_templates_dict = config_dict['serverTemplates'].get('baseTemplates', + {}) + + for template_name in templates_dict.keys(): + # temp_dict is a temporary dictionary that merges base template dictionary + # and server template dictionary (with server template dictionary values + # overriding base template values) + temp_dict = {} + + base_template_name = templates_dict[template_name].get('baseTemplate') + if not base_template_name is None: + temp_dict = base_templates_dict[base_template_name].copy() + + temp_dict.update(templates_dict[template_name]) + + # Create and add ServerTemplate object to the final server_templates_dict + server_templates_dict[template_name] = ServerTemplate( + template_name, temp_dict['serverImagePath'], + temp_dict['wrapperScriptPath'], temp_dict['serverPort'], + temp_dict['serverArgs'].copy()) + + return server_templates_dict + + def _parse_server_pod_specs(self, config_dict, docker_images_dict, + server_templates_dict): + """Parses the 'serverPodSpecs' sub-section (under 'testMatrix' section) of + the config file and returns a Dictionary of 'ServerPodSpec' objects keyed + by server pod spec names""" + server_pod_specs_dict = {} + + pod_specs_dict = config_dict['testMatrix'].get('serverPodSpecs', {}) + + for pod_name in pod_specs_dict.keys(): + server_template_name = pod_specs_dict[pod_name]['serverTemplate'] + docker_image_name = pod_specs_dict[pod_name]['dockerImage'] + num_instances = pod_specs_dict[pod_name].get('numInstances', 1) + + # Create and add the ServerPodSpec object to the final + # server_pod_specs_dict + server_pod_specs_dict[pod_name] = ServerPodSpec( + pod_name, server_templates_dict[server_template_name], + docker_images_dict[docker_image_name], num_instances) + + return server_pod_specs_dict + + def _parse_client_pod_specs(self, config_dict, docker_images_dict, + client_templates_dict, server_pod_specs_dict): + """Parses the 'clientPodSpecs' sub-section (under 'testMatrix' section) of + the config file and returns a Dictionary of 'ClientPodSpec' objects keyed + by client pod spec names""" + client_pod_specs_dict = {} + + pod_specs_dict = config_dict['testMatrix'].get('clientPodSpecs', {}) + for pod_name in pod_specs_dict.keys(): + client_template_name = pod_specs_dict[pod_name]['clientTemplate'] + docker_image_name = pod_specs_dict[pod_name]['dockerImage'] + num_instances = pod_specs_dict[pod_name]['numInstances'] + + # Get the server addresses from the server pod spec object + server_pod_spec_name = pod_specs_dict[pod_name]['serverPodSpec'] + server_addresses = server_pod_specs_dict[ + server_pod_spec_name].server_addresses() + + client_pod_specs_dict[pod_name] = ClientPodSpec( + pod_name, client_templates_dict[client_template_name], + docker_images_dict[docker_image_name], num_instances, + server_addresses) + + return client_pod_specs_dict + + def _load_config(self, config_filename): + """Opens the config file and converts the Json text to Dictionary""" + if not os.path.isabs(config_filename): + raise Exception('Config objects expects an absolute file path. ' + 'config file name passed: %s' % config_filename) + with open(config_filename) as config_file: + return json.load(config_file) + + +def run_tests(config): + """ The main function that launches the stress tests """ + # Build docker images and push to GKE registry + if config.global_settings.build_docker_images: + for name, docker_image in config.docker_images_dict.iteritems(): + if not (docker_image.build_image() and + docker_image.push_to_gke_registry()): + return False + + # Create a unique id for this run (Note: Using timestamp instead of UUID to + # make it easier to deduce the date/time of the run just by looking at the run + # run id. This is useful in debugging when looking at records in Biq query) + run_id = datetime.datetime.now().strftime('%Y_%m_%d_%H_%M_%S') + dataset_id = '%s_%s' % (config.global_settings.dataset_id_prefix, run_id) + + bq_helper = BigQueryHelper(run_id, '', '', + config.global_settings.gcp_project_id, dataset_id, + config.global_settings.summary_table_id, + config.global_settings.qps_table_id) + bq_helper.initialize() + + gke = Gke(config.global_settings.gcp_project_id, run_id, dataset_id, + config.global_settings.summary_table_id, + config.global_settings.qps_table_id, + config.global_settings.kubernetes_proxy_port) + + is_success = True + + try: + print 'Launching servers..' + for name, server_pod_spec in config.server_pod_specs_dict.iteritems(): + if not gke.launch_servers(server_pod_spec): + is_success = False # is_success is checked in the 'finally' block + return False + + print('Launched servers. Waiting for %d seconds for the server pods to be ' + 'fully online') % config.global_settings.pod_warmup_secs + time.sleep(config.global_settings.pod_warmup_secs) + + for name, client_pod_spec in config.client_pod_specs_dict.iteritems(): + if not gke.launch_clients(client_pod_spec): + is_success = False # is_success is checked in the 'finally' block + return False + + print('Launched all clients. Waiting for %d seconds for the client pods to ' + 'be fully online') % config.global_settings.pod_warmup_secs + time.sleep(config.global_settings.pod_warmup_secs) + + start_time = datetime.datetime.now() + end_time = start_time + datetime.timedelta( + seconds=config.global_settings.test_duration_secs) + print 'Running the test until %s' % end_time.isoformat() + + while True: + if datetime.datetime.now() > end_time: + print 'Test was run for %d seconds' % config.global_settings.test_duration_secs + break + + # Check if either stress server or clients have failed (btw, the bq_helper + # monitors all the rows in the summary table and checks if any of them + # have a failure status) + if bq_helper.check_if_any_tests_failed(): + is_success = False + print 'Some tests failed.' + break # Don't 'return' here. We still want to call bq_helper to print qps/summary tables + + # Tests running fine. Wait until next poll time to check the status + print 'Sleeping for %d seconds..' % config.global_settings.test_poll_interval_secs + time.sleep(config.global_settings.test_poll_interval_secs) + + # Print BiqQuery tables + bq_helper.print_qps_records() + bq_helper.print_summary_records() + + finally: + # If there was a test failure, we should not delete the pods since they + # would contain useful debug information (logs, core dumps etc) + if is_success: + for name, server_pod_spec in config.server_pod_specs_dict.iteritems(): + gke.delete_servers(server_pod_spec) + for name, client_pod_spec in config.client_pod_specs_dict.iteritems(): + gke.delete_clients(client_pod_spec) + + return is_success + + +argp = argparse.ArgumentParser( + description='Launch stress tests in GKE', + formatter_class=argparse.ArgumentDefaultsHelpFormatter) +argp.add_argument('--gcp_project_id', + required=True, + help='The Google Cloud Platform Project Id') +argp.add_argument('--config_file', + required=True, + type=str, + help='The test config file') + +if __name__ == '__main__': + args = argp.parse_args() + + config_filename = args.config_file + + # Since we will be changing the current working directory to grpc root in the + # next step, we should check if the config filename path is a relative path + # (i.e a path relative to the current working directory) and if so, convert it + # to abosulte path + if not os.path.isabs(config_filename): + config_filename = os.path.abspath(config_filename) + + config = Config(config_filename, args.gcp_project_id) + + # Change current working directory to grpc root + # (This is important because all relative file paths in the config file are + # supposed to interpreted as relative to the GRPC root) + grpc_root = os.path.abspath(os.path.join( + os.path.dirname(sys.argv[0]), '../../..')) + os.chdir(grpc_root) + + run_tests(config) diff --git a/tools/run_tests/stress_test/run_stress_tests_on_gke.py b/tools/run_tests/stress_test/run_stress_tests_on_gke.py deleted file mode 100755 index 634eb1aca53..00000000000 --- a/tools/run_tests/stress_test/run_stress_tests_on_gke.py +++ /dev/null @@ -1,556 +0,0 @@ -#!/usr/bin/env python2.7 -# Copyright 2015-2016, Google Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -import argparse -import datetime -import os -import subprocess -import sys -import time - -stress_test_utils_dir = os.path.abspath(os.path.join( - os.path.dirname(__file__), '../../gcp/stress_test')) -sys.path.append(stress_test_utils_dir) -from stress_test_utils import BigQueryHelper - -kubernetes_api_dir = os.path.abspath(os.path.join( - os.path.dirname(__file__), '../../gcp/utils')) -sys.path.append(kubernetes_api_dir) - -import kubernetes_api - -_GRPC_ROOT = os.path.abspath(os.path.join( - os.path.dirname(sys.argv[0]), '../../..')) -os.chdir(_GRPC_ROOT) - -# num of seconds to wait for the GKE image to start and warmup -_GKE_IMAGE_WARMUP_WAIT_SECS = 60 - -_SERVER_POD_NAME = 'stress-server' -_CLIENT_POD_NAME_PREFIX = 'stress-client' -_DATASET_ID_PREFIX = 'stress_test' -_SUMMARY_TABLE_ID = 'summary' -_QPS_TABLE_ID = 'qps' - -_DEFAULT_DOCKER_IMAGE_NAME = 'grpc_stress_test' - -# The default port on which the kubernetes proxy server is started on localhost -# (i.e kubectl proxy --port=) -_DEFAULT_KUBERNETES_PROXY_PORT = 8001 - -# How frequently should the stress client wrapper script (running inside a GKE -# container) poll the health of the stress client (also running inside the GKE -# container) and upload metrics to BigQuery -_DEFAULT_STRESS_CLIENT_POLL_INTERVAL_SECS = 60 - -# The default setting for stress test server and client -_DEFAULT_STRESS_SERVER_PORT = 8080 -_DEFAULT_METRICS_PORT = 8081 -_DEFAULT_TEST_CASES_STR = 'empty_unary:1,large_unary:1,client_streaming:1,server_streaming:1,empty_stream:1' -_DEFAULT_NUM_CHANNELS_PER_SERVER = 5 -_DEFAULT_NUM_STUBS_PER_CHANNEL = 10 -_DEFAULT_METRICS_COLLECTION_INTERVAL_SECS = 30 - -# Number of stress client instances to launch -_DEFAULT_NUM_CLIENTS = 3 - -# How frequently should this test monitor the health of Stress clients and -# Servers running in GKE -_DEFAULT_TEST_POLL_INTERVAL_SECS = 60 - -# Default run time for this test (2 hour) -_DEFAULT_TEST_DURATION_SECS = 7200 - -# The number of seconds it would take a GKE pod to warm up (i.e get to 'Running' -# state from the time of creation). Ideally this is something the test should -# automatically determine by using Kubernetes API to poll the pods status. -_DEFAULT_GKE_WARMUP_SECS = 60 - - -class KubernetesProxy: - """ Class to start a proxy on localhost to the Kubernetes API server """ - - def __init__(self, api_port): - self.port = api_port - self.p = None - self.started = False - - def start(self): - cmd = ['kubectl', 'proxy', '--port=%d' % self.port] - self.p = subprocess.Popen(args=cmd) - self.started = True - time.sleep(2) - print '..Started' - - def get_port(self): - return self.port - - def is_started(self): - return self.started - - def __del__(self): - if self.p is not None: - print 'Shutting down Kubernetes proxy..' - self.p.kill() - - -class TestSettings: - - def __init__(self, build_docker_image, test_poll_interval_secs, - test_duration_secs, kubernetes_proxy_port): - self.build_docker_image = build_docker_image - self.test_poll_interval_secs = test_poll_interval_secs - self.test_duration_secs = test_duration_secs - self.kubernetes_proxy_port = kubernetes_proxy_port - - -class GkeSettings: - - def __init__(self, project_id, docker_image_name): - self.project_id = project_id - self.docker_image_name = docker_image_name - self.tag_name = 'gcr.io/%s/%s' % (project_id, docker_image_name) - - -class BigQuerySettings: - - def __init__(self, run_id, dataset_id, summary_table_id, qps_table_id): - self.run_id = run_id - self.dataset_id = dataset_id - self.summary_table_id = summary_table_id - self.qps_table_id = qps_table_id - - -class StressServerSettings: - - def __init__(self, server_pod_name, server_port): - self.server_pod_name = server_pod_name - self.server_port = server_port - - -class StressClientSettings: - - def __init__(self, num_clients, client_pod_name_prefix, server_pod_name, - server_port, metrics_port, metrics_collection_interval_secs, - stress_client_poll_interval_secs, num_channels_per_server, - num_stubs_per_channel, test_cases_str): - self.num_clients = num_clients - self.client_pod_name_prefix = client_pod_name_prefix - self.server_pod_name = server_pod_name - self.server_port = server_port - self.metrics_port = metrics_port - self.metrics_collection_interval_secs = metrics_collection_interval_secs - self.stress_client_poll_interval_secs = stress_client_poll_interval_secs - self.num_channels_per_server = num_channels_per_server - self.num_stubs_per_channel = num_stubs_per_channel - self.test_cases_str = test_cases_str - - # == Derived properties == - # Note: Client can accept a list of server addresses (a comma separated list - # of 'server_name:server_port'). In this case, we only have one server - # address to pass - self.server_addresses = '%s.default.svc.cluster.local:%d' % ( - server_pod_name, server_port) - self.client_pod_names_list = ['%s-%d' % (client_pod_name_prefix, i) - for i in range(1, num_clients + 1)] - - -def _build_docker_image(image_name, tag_name): - """ Build the docker image and add tag it to the GKE repository """ - print 'Building docker image: %s' % image_name - os.environ['INTEROP_IMAGE'] = image_name - os.environ['INTEROP_IMAGE_REPOSITORY_TAG'] = tag_name - # Note that 'BASE_NAME' HAS to be 'grpc_interop_stress_cxx' since the script - # build_interop_stress_image.sh invokes the following script: - # tools/dockerfile/$BASE_NAME/build_interop_stress.sh - os.environ['BASE_NAME'] = 'grpc_interop_stress_cxx' - cmd = ['tools/jenkins/build_interop_stress_image.sh'] - retcode = subprocess.call(args=cmd) - if retcode != 0: - print 'Error in building docker image' - return False - return True - - -def _push_docker_image_to_gke_registry(docker_tag_name): - """Executes 'gcloud docker push ' to push the image to GKE registry""" - cmd = ['gcloud', 'docker', 'push', docker_tag_name] - print 'Pushing %s to GKE registry..' % docker_tag_name - retcode = subprocess.call(args=cmd) - if retcode != 0: - print 'Error in pushing docker image %s to the GKE registry' % docker_tag_name - return False - return True - - -def _launch_server(gke_settings, stress_server_settings, bq_settings, - kubernetes_proxy): - """ Launches a stress test server instance in GKE cluster """ - if not kubernetes_proxy.is_started: - print 'Kubernetes proxy must be started before calling this function' - return False - - # This is the wrapper script that is run in the container. This script runs - # the actual stress test server - server_cmd_list = ['/var/local/git/grpc/tools/gcp/stress_test/run_server.py'] - - # run_server.py does not take any args from the command line. The args are - # instead passed via environment variables (see server_env below) - server_arg_list = [] - - # The parameters to the script run_server.py are injected into the container - # via environment variables - server_env = { - 'STRESS_TEST_IMAGE_TYPE': 'SERVER', - 'STRESS_TEST_IMAGE': '/var/local/git/grpc/bins/opt/interop_server', - 'STRESS_TEST_ARGS_STR': '--port=%s' % stress_server_settings.server_port, - 'RUN_ID': bq_settings.run_id, - 'POD_NAME': stress_server_settings.server_pod_name, - 'GCP_PROJECT_ID': gke_settings.project_id, - 'DATASET_ID': bq_settings.dataset_id, - 'SUMMARY_TABLE_ID': bq_settings.summary_table_id, - 'QPS_TABLE_ID': bq_settings.qps_table_id - } - - # Launch Server - is_success = kubernetes_api.create_pod_and_service( - 'localhost', - kubernetes_proxy.get_port(), - 'default', # Use 'default' namespace - stress_server_settings.server_pod_name, - gke_settings.tag_name, - [stress_server_settings.server_port], # Port that should be exposed - server_cmd_list, - server_arg_list, - server_env, - True # Headless = True for server. Since we want DNS records to be created by GKE - ) - - return is_success - - -def _launch_client(gke_settings, stress_server_settings, stress_client_settings, - bq_settings, kubernetes_proxy): - """ Launches a configurable number of stress test clients on GKE cluster """ - if not kubernetes_proxy.is_started: - print 'Kubernetes proxy must be started before calling this function' - return False - - stress_client_arg_list = [ - '--server_addresses=%s' % stress_client_settings.server_addresses, - '--test_cases=%s' % stress_client_settings.test_cases_str, - '--num_stubs_per_channel=%d' % - stress_client_settings.num_stubs_per_channel - ] - - # This is the wrapper script that is run in the container. This script runs - # the actual stress client - client_cmd_list = ['/var/local/git/grpc/tools/gcp/stress_test/run_client.py'] - - # run_client.py takes no args. All args are passed as env variables (see - # client_env) - client_arg_list = [] - - metrics_server_address = 'localhost:%d' % stress_client_settings.metrics_port - metrics_client_arg_list = [ - '--metrics_server_address=%s' % metrics_server_address, - '--total_only=true' - ] - - # The parameters to the script run_client.py are injected into the container - # via environment variables - client_env = { - 'STRESS_TEST_IMAGE_TYPE': 'CLIENT', - 'STRESS_TEST_IMAGE': '/var/local/git/grpc/bins/opt/stress_test', - 'STRESS_TEST_ARGS_STR': ' '.join(stress_client_arg_list), - 'METRICS_CLIENT_IMAGE': '/var/local/git/grpc/bins/opt/metrics_client', - 'METRICS_CLIENT_ARGS_STR': ' '.join(metrics_client_arg_list), - 'RUN_ID': bq_settings.run_id, - 'POLL_INTERVAL_SECS': - str(stress_client_settings.stress_client_poll_interval_secs), - 'GCP_PROJECT_ID': gke_settings.project_id, - 'DATASET_ID': bq_settings.dataset_id, - 'SUMMARY_TABLE_ID': bq_settings.summary_table_id, - 'QPS_TABLE_ID': bq_settings.qps_table_id - } - - for pod_name in stress_client_settings.client_pod_names_list: - client_env['POD_NAME'] = pod_name - is_success = kubernetes_api.create_pod_and_service( - 'localhost', # Since proxy is running on localhost - kubernetes_proxy.get_port(), - 'default', # default namespace - pod_name, - gke_settings.tag_name, - [stress_client_settings.metrics_port - ], # Client pods expose metrics port - client_cmd_list, - client_arg_list, - client_env, - False # Client is not a headless service - ) - if not is_success: - print 'Error in launching client %s' % pod_name - return False - - return True - - -def _launch_server_and_client(gke_settings, stress_server_settings, - stress_client_settings, bq_settings, - kubernetes_proxy_port): - # Start kubernetes proxy - print 'Kubernetes proxy' - kubernetes_proxy = KubernetesProxy(kubernetes_proxy_port) - kubernetes_proxy.start() - - print 'Launching server..' - is_success = _launch_server(gke_settings, stress_server_settings, bq_settings, - kubernetes_proxy) - if not is_success: - print 'Error in launching server' - return False - - # Server takes a while to start. - # TODO(sree) Use Kubernetes API to query the status of the server instead of - # sleeping - print 'Waiting for %s seconds for the server to start...' % _GKE_IMAGE_WARMUP_WAIT_SECS - time.sleep(_GKE_IMAGE_WARMUP_WAIT_SECS) - - # Launch client - client_pod_name_prefix = 'stress-client' - is_success = _launch_client(gke_settings, stress_server_settings, - stress_client_settings, bq_settings, - kubernetes_proxy) - - if not is_success: - print 'Error in launching client(s)' - return False - - print 'Waiting for %s seconds for the client images to start...' % _GKE_IMAGE_WARMUP_WAIT_SECS - time.sleep(_GKE_IMAGE_WARMUP_WAIT_SECS) - return True - - -def _delete_server_and_client(stress_server_settings, stress_client_settings, - kubernetes_proxy_port): - kubernetes_proxy = KubernetesProxy(kubernetes_proxy_port) - kubernetes_proxy.start() - - # Delete clients first - is_success = True - for pod_name in stress_client_settings.client_pod_names_list: - is_success = kubernetes_api.delete_pod_and_service( - 'localhost', kubernetes_proxy_port, 'default', pod_name) - if not is_success: - return False - - # Delete server - is_success = kubernetes_api.delete_pod_and_service( - 'localhost', kubernetes_proxy_port, 'default', - stress_server_settings.server_pod_name) - return is_success - - -def run_test_main(test_settings, gke_settings, stress_server_settings, - stress_client_clients): - is_success = True - - if test_settings.build_docker_image: - is_success = _build_docker_image(gke_settings.docker_image_name, - gke_settings.tag_name) - if not is_success: - return False - - is_success = _push_docker_image_to_gke_registry(gke_settings.tag_name) - if not is_success: - return False - - # Create a unique id for this run (Note: Using timestamp instead of UUID to - # make it easier to deduce the date/time of the run just by looking at the run - # run id. This is useful in debugging when looking at records in Biq query) - run_id = datetime.datetime.now().strftime('%Y_%m_%d_%H_%M_%S') - dataset_id = '%s_%s' % (_DATASET_ID_PREFIX, run_id) - - # Big Query settings (common for both Stress Server and Client) - bq_settings = BigQuerySettings(run_id, dataset_id, _SUMMARY_TABLE_ID, - _QPS_TABLE_ID) - - bq_helper = BigQueryHelper(run_id, '', '', args.project_id, dataset_id, - _SUMMARY_TABLE_ID, _QPS_TABLE_ID) - bq_helper.initialize() - - try: - is_success = _launch_server_and_client(gke_settings, stress_server_settings, - stress_client_settings, bq_settings, - test_settings.kubernetes_proxy_port) - if not is_success: - return False - - start_time = datetime.datetime.now() - end_time = start_time + datetime.timedelta( - seconds=test_settings.test_duration_secs) - print 'Running the test until %s' % end_time.isoformat() - - while True: - if datetime.datetime.now() > end_time: - print 'Test was run for %d seconds' % test_settings.test_duration_secs - break - - # Check if either stress server or clients have failed - if bq_helper.check_if_any_tests_failed(): - is_success = False - print 'Some tests failed.' - break - - # Things seem to be running fine. Wait until next poll time to check the - # status - print 'Sleeping for %d seconds..' % test_settings.test_poll_interval_secs - time.sleep(test_settings.test_poll_interval_secs) - - # Print BiqQuery tables - bq_helper.print_summary_records() - bq_helper.print_qps_records() - - finally: - # If is_success is False at this point, it means that the stress tests were - # started successfully but failed while running the tests. In this case we - # do should not delete the pods (since they contain all the failure - # information) - if is_success: - _delete_server_and_client(stress_server_settings, stress_client_settings, - test_settings.kubernetes_proxy_port) - - return is_success - - -argp = argparse.ArgumentParser( - description='Launch stress tests in GKE', - formatter_class=argparse.ArgumentDefaultsHelpFormatter) -argp.add_argument('--project_id', - required=True, - help='The Google Cloud Platform Project Id') -argp.add_argument('--num_clients', - default=1, - type=int, - help='Number of client instances to start') -argp.add_argument('--docker_image_name', - default=_DEFAULT_DOCKER_IMAGE_NAME, - help='The name of the docker image containing stress client ' - 'and stress servers') -argp.add_argument('--build_docker_image', - dest='build_docker_image', - action='store_true', - help='Build a docker image and push to Google Container ' - 'Registry') -argp.add_argument('--do_not_build_docker_image', - dest='build_docker_image', - action='store_false', - help='Do not build and push docker image to Google Container ' - 'Registry') -argp.set_defaults(build_docker_image=True) - -argp.add_argument('--test_poll_interval_secs', - default=_DEFAULT_TEST_POLL_INTERVAL_SECS, - type=int, - help='How frequently should this script should monitor the ' - 'health of stress clients and servers running in the GKE ' - 'cluster') -argp.add_argument('--test_duration_secs', - default=_DEFAULT_TEST_DURATION_SECS, - type=int, - help='How long should this test be run') -argp.add_argument('--kubernetes_proxy_port', - default=_DEFAULT_KUBERNETES_PROXY_PORT, - type=int, - help='The port on which the kubernetes proxy (on localhost)' - ' is started') -argp.add_argument('--stress_server_port', - default=_DEFAULT_STRESS_SERVER_PORT, - type=int, - help='The port on which the stress server (in GKE ' - 'containers) listens') -argp.add_argument('--stress_client_metrics_port', - default=_DEFAULT_METRICS_PORT, - type=int, - help='The port on which the stress clients (in GKE ' - 'containers) expose metrics') -argp.add_argument('--stress_client_poll_interval_secs', - default=_DEFAULT_STRESS_CLIENT_POLL_INTERVAL_SECS, - type=int, - help='How frequently should the stress client wrapper script' - ' running inside GKE should monitor health of the actual ' - ' stress client process and upload the metrics to BigQuery') -argp.add_argument('--stress_client_metrics_collection_interval_secs', - default=_DEFAULT_METRICS_COLLECTION_INTERVAL_SECS, - type=int, - help='How frequently should metrics be collected in-memory on' - ' the stress clients (running inside GKE containers). Note ' - 'that this is NOT the same as the upload-to-BigQuery ' - 'frequency. The metrics upload frequency is controlled by the' - ' --stress_client_poll_interval_secs flag') -argp.add_argument('--stress_client_num_channels_per_server', - default=_DEFAULT_NUM_CHANNELS_PER_SERVER, - type=int, - help='The number of channels created to each server from a ' - 'stress client') -argp.add_argument('--stress_client_num_stubs_per_channel', - default=_DEFAULT_NUM_STUBS_PER_CHANNEL, - type=int, - help='The number of stubs created per channel. This number ' - 'indicates the max number of RPCs that can be made in ' - 'parallel on each channel at any given time') -argp.add_argument('--stress_client_test_cases', - default=_DEFAULT_TEST_CASES_STR, - help='List of test cases (with weights) to be executed by the' - ' stress test client. The list is in the following format:\n' - ' ..\n' - ' (Note: The weights do not have to add up to 100)') - -if __name__ == '__main__': - args = argp.parse_args() - - test_settings = TestSettings( - args.build_docker_image, args.test_poll_interval_secs, - args.test_duration_secs, args.kubernetes_proxy_port) - - gke_settings = GkeSettings(args.project_id, args.docker_image_name) - - stress_server_settings = StressServerSettings(_SERVER_POD_NAME, - args.stress_server_port) - stress_client_settings = StressClientSettings( - args.num_clients, _CLIENT_POD_NAME_PREFIX, _SERVER_POD_NAME, - args.stress_server_port, args.stress_client_metrics_port, - args.stress_client_metrics_collection_interval_secs, - args.stress_client_poll_interval_secs, - args.stress_client_num_channels_per_server, - args.stress_client_num_stubs_per_channel, args.stress_client_test_cases) - - run_test_main(test_settings, gke_settings, stress_server_settings, - stress_client_settings) diff --git a/tools/run_tests/tests.json b/tools/run_tests/tests.json index 000315f2f4a..5f72b8c5828 100644 --- a/tools/run_tests/tests.json +++ b/tools/run_tests/tests.json @@ -453,6 +453,27 @@ "windows" ] }, + { + "args": [], + "ci_platforms": [ + "linux", + "mac", + "posix", + "windows" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "gtest": false, + "language": "c", + "name": "gpr_backoff_test", + "platforms": [ + "linux", + "mac", + "posix", + "windows" + ] + }, { "args": [], "ci_platforms": [ @@ -1073,7 +1094,7 @@ "flaky": false, "gtest": false, "language": "c", - "name": "httpcli_format_request_test", + "name": "http_parser_test", "platforms": [ "linux", "mac", @@ -1094,7 +1115,7 @@ "flaky": false, "gtest": false, "language": "c", - "name": "httpcli_parser_test", + "name": "httpcli_format_request_test", "platforms": [ "linux", "mac", @@ -1272,7 +1293,7 @@ ], "cpu_cost": 0.1, "exclude_configs": [], - "flaky": false, + "flaky": true, "gtest": false, "language": "c", "name": "lb_policies_test", @@ -1314,7 +1335,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], - "flaky": false, + "flaky": true, "gtest": false, "language": "c", "name": "mlog_test", @@ -2019,6 +2040,27 @@ "posix" ] }, + { + "args": [], + "ci_platforms": [ + "linux", + "mac", + "posix", + "windows" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "gtest": true, + "language": "c++", + "name": "codegen_test", + "platforms": [ + "linux", + "mac", + "posix", + "windows" + ] + }, { "args": [], "ci_platforms": [ @@ -2274,7 +2316,7 @@ "mac", "posix" ], - "cpu_cost": 10, + "cpu_cost": 0.5, "exclude_configs": [], "flaky": false, "gtest": false, @@ -2735,6 +2777,30 @@ "windows" ] }, + { + "args": [], + "boringssl": true, + "ci_platforms": [ + "linux", + "mac", + "posix", + "windows" + ], + "cpu_cost": 1.0, + "defaults": "boringssl", + "exclude_configs": [ + "asan" + ], + "flaky": false, + "language": "c++", + "name": "boringssl_asn1_test", + "platforms": [ + "linux", + "mac", + "posix", + "windows" + ] + }, { "args": [], "boringssl": true, @@ -9076,13 +9142,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_full+trace_test", "platforms": [ "windows", "linux", @@ -9097,13 +9164,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_full+trace_test", "platforms": [ "windows", "linux", @@ -9118,13 +9186,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_full+trace_test", "platforms": [ "windows", "linux", @@ -9139,13 +9208,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_full+trace_test", "platforms": [ "windows", "linux", @@ -9160,13 +9230,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_full+trace_test", "platforms": [ "windows", "linux", @@ -9181,13 +9252,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_full+trace_test", "platforms": [ "windows", "linux", @@ -9202,13 +9274,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_full+trace_test", "platforms": [ "windows", "linux", @@ -9223,13 +9296,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_full+trace_test", "platforms": [ "windows", "linux", @@ -9244,13 +9318,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_full+trace_test", "platforms": [ "windows", "linux", @@ -9265,13 +9340,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_full+trace_test", "platforms": [ "windows", "linux", @@ -9286,13 +9362,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_full+trace_test", "platforms": [ "windows", "linux", @@ -9307,13 +9384,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_full+trace_test", "platforms": [ "windows", "linux", @@ -9328,13 +9406,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_full+trace_test", "platforms": [ "windows", "linux", @@ -9349,13 +9428,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_full+trace_test", "platforms": [ "windows", "linux", @@ -9370,13 +9450,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_full+trace_test", "platforms": [ "windows", "linux", @@ -9389,36 +9470,16 @@ "high_initial_seqno" ], "ci_platforms": [ - "windows", - "linux", - "posix" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_oauth2_test", - "platforms": [ "windows", "linux", "mac", "posix" - ] - }, - { - "args": [ - "hpack_size" - ], - "ci_platforms": [ - "windows", - "linux", - "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_full+trace_test", "platforms": [ "windows", "linux", @@ -9433,13 +9494,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_full+trace_test", "platforms": [ "windows", "linux", @@ -9454,13 +9516,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_full+trace_test", "platforms": [ "windows", "linux", @@ -9475,13 +9538,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_full+trace_test", "platforms": [ "windows", "linux", @@ -9496,13 +9560,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_full+trace_test", "platforms": [ "windows", "linux", @@ -9517,13 +9582,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_full+trace_test", "platforms": [ "windows", "linux", @@ -9538,13 +9604,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_full+trace_test", "platforms": [ "windows", "linux", @@ -9559,13 +9626,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_full+trace_test", "platforms": [ "windows", "linux", @@ -9580,13 +9648,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_full+trace_test", "platforms": [ "windows", "linux", @@ -9601,13 +9670,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_full+trace_test", "platforms": [ "windows", "linux", @@ -9622,13 +9692,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_full+trace_test", "platforms": [ "windows", "linux", @@ -9643,13 +9714,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_full+trace_test", "platforms": [ "windows", "linux", @@ -9664,13 +9736,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_full+trace_test", "platforms": [ "windows", "linux", @@ -9685,13 +9758,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_full+trace_test", "platforms": [ "windows", "linux", @@ -9706,13 +9780,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_full+trace_test", "platforms": [ "windows", "linux", @@ -9727,13 +9802,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_full+trace_test", "platforms": [ "windows", "linux", @@ -9748,13 +9824,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_full+trace_test", "platforms": [ "windows", "linux", @@ -9769,13 +9846,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_full+trace_test", "platforms": [ "windows", "linux", @@ -9790,13 +9868,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_full+trace_test", "platforms": [ "windows", "linux", @@ -9811,13 +9890,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_full+trace_test", "platforms": [ "windows", "linux", @@ -9838,7 +9918,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -9859,7 +9939,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -9880,7 +9960,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -9901,7 +9981,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -9922,7 +10002,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -9943,7 +10023,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -9964,7 +10044,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -9985,7 +10065,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -10006,7 +10086,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -10016,18 +10096,18 @@ }, { "args": [ - "default_host" + "compressed_payload" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -10037,18 +10117,18 @@ }, { "args": [ - "disappearing_server" + "connectivity" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -10058,7 +10138,7 @@ }, { "args": [ - "empty_batch" + "default_host" ], "ci_platforms": [ "windows", @@ -10069,7 +10149,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -10079,18 +10159,18 @@ }, { "args": [ - "graceful_server_shutdown" + "disappearing_server" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -10100,7 +10180,7 @@ }, { "args": [ - "high_initial_seqno" + "empty_batch" ], "ci_platforms": [ "windows", @@ -10111,7 +10191,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -10121,18 +10201,18 @@ }, { "args": [ - "invoke_large_request" + "graceful_server_shutdown" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -10142,7 +10222,7 @@ }, { "args": [ - "large_metadata" + "high_initial_seqno" ], "ci_platforms": [ "windows", @@ -10153,7 +10233,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -10163,18 +10243,18 @@ }, { "args": [ - "max_message_length" + "hpack_size" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -10184,7 +10264,7 @@ }, { "args": [ - "negative_deadline" + "invoke_large_request" ], "ci_platforms": [ "windows", @@ -10195,7 +10275,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -10205,7 +10285,7 @@ }, { "args": [ - "no_op" + "large_metadata" ], "ci_platforms": [ "windows", @@ -10216,7 +10296,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -10226,18 +10306,18 @@ }, { "args": [ - "payload" + "max_concurrent_streams" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -10247,18 +10327,18 @@ }, { "args": [ - "ping_pong_streaming" + "max_message_length" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -10268,7 +10348,7 @@ }, { "args": [ - "registered_call" + "negative_deadline" ], "ci_platforms": [ "windows", @@ -10279,7 +10359,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -10289,7 +10369,7 @@ }, { "args": [ - "request_with_payload" + "no_op" ], "ci_platforms": [ "windows", @@ -10300,7 +10380,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -10310,18 +10390,18 @@ }, { "args": [ - "server_finishes_request" + "payload" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -10331,7 +10411,7 @@ }, { "args": [ - "shutdown_finishes_calls" + "ping" ], "ci_platforms": [ "windows", @@ -10342,7 +10422,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -10352,7 +10432,7 @@ }, { "args": [ - "shutdown_finishes_tags" + "ping_pong_streaming" ], "ci_platforms": [ "windows", @@ -10363,7 +10443,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -10373,18 +10453,18 @@ }, { "args": [ - "simple_delayed_request" + "registered_call" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -10394,7 +10474,7 @@ }, { "args": [ - "simple_metadata" + "request_with_flags" ], "ci_platforms": [ "windows", @@ -10405,7 +10485,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -10415,7 +10495,7 @@ }, { "args": [ - "simple_request" + "request_with_payload" ], "ci_platforms": [ "windows", @@ -10426,7 +10506,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -10436,7 +10516,7 @@ }, { "args": [ - "trailing_metadata" + "server_finishes_request" ], "ci_platforms": [ "windows", @@ -10447,7 +10527,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -10457,7 +10537,7 @@ }, { "args": [ - "bad_hostname" + "shutdown_finishes_calls" ], "ci_platforms": [ "windows", @@ -10468,7 +10548,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -10478,7 +10558,7 @@ }, { "args": [ - "binary_metadata" + "shutdown_finishes_tags" ], "ci_platforms": [ "windows", @@ -10489,7 +10569,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -10499,18 +10579,18 @@ }, { "args": [ - "call_creds" + "simple_delayed_request" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -10520,18 +10600,18 @@ }, { "args": [ - "cancel_after_accept" + "simple_metadata" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -10541,18 +10621,18 @@ }, { "args": [ - "cancel_after_client_done" + "simple_request" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -10562,18 +10642,18 @@ }, { "args": [ - "cancel_after_invoke" + "trailing_metadata" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -10583,18 +10663,18 @@ }, { "args": [ - "cancel_before_invoke" + "bad_hostname" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -10604,18 +10684,18 @@ }, { "args": [ - "cancel_in_a_vacuum" + "binary_metadata" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -10625,18 +10705,18 @@ }, { "args": [ - "cancel_with_status" + "call_creds" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -10646,7 +10726,7 @@ }, { "args": [ - "compressed_payload" + "cancel_after_accept" ], "ci_platforms": [ "windows", @@ -10657,7 +10737,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -10667,18 +10747,18 @@ }, { "args": [ - "empty_batch" + "cancel_after_client_done" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -10688,7 +10768,7 @@ }, { "args": [ - "graceful_server_shutdown" + "cancel_after_invoke" ], "ci_platforms": [ "windows", @@ -10699,7 +10779,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -10709,18 +10789,18 @@ }, { "args": [ - "high_initial_seqno" + "cancel_before_invoke" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -10730,18 +10810,18 @@ }, { "args": [ - "hpack_size" + "cancel_in_a_vacuum" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -10751,18 +10831,18 @@ }, { "args": [ - "invoke_large_request" + "cancel_with_status" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -10772,7 +10852,7 @@ }, { "args": [ - "large_metadata" + "default_host" ], "ci_platforms": [ "windows", @@ -10783,7 +10863,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -10793,7 +10873,7 @@ }, { "args": [ - "max_concurrent_streams" + "disappearing_server" ], "ci_platforms": [ "windows", @@ -10804,7 +10884,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -10814,18 +10894,18 @@ }, { "args": [ - "max_message_length" + "empty_batch" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -10835,18 +10915,18 @@ }, { "args": [ - "negative_deadline" + "graceful_server_shutdown" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -10856,7 +10936,7 @@ }, { "args": [ - "no_op" + "high_initial_seqno" ], "ci_platforms": [ "windows", @@ -10867,7 +10947,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -10877,18 +10957,18 @@ }, { "args": [ - "payload" + "invoke_large_request" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -10898,7 +10978,7 @@ }, { "args": [ - "ping_pong_streaming" + "large_metadata" ], "ci_platforms": [ "windows", @@ -10909,7 +10989,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -10919,18 +10999,18 @@ }, { "args": [ - "registered_call" + "max_message_length" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -10940,7 +11020,7 @@ }, { "args": [ - "request_with_flags" + "negative_deadline" ], "ci_platforms": [ "windows", @@ -10951,7 +11031,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -10961,7 +11041,7 @@ }, { "args": [ - "request_with_payload" + "no_op" ], "ci_platforms": [ "windows", @@ -10972,7 +11052,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -10982,18 +11062,18 @@ }, { "args": [ - "server_finishes_request" + "payload" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -11003,7 +11083,7 @@ }, { "args": [ - "shutdown_finishes_calls" + "ping_pong_streaming" ], "ci_platforms": [ "windows", @@ -11014,7 +11094,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -11024,7 +11104,7 @@ }, { "args": [ - "shutdown_finishes_tags" + "registered_call" ], "ci_platforms": [ "windows", @@ -11035,7 +11115,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -11045,7 +11125,7 @@ }, { "args": [ - "simple_metadata" + "request_with_payload" ], "ci_platforms": [ "windows", @@ -11056,7 +11136,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -11066,7 +11146,7 @@ }, { "args": [ - "simple_request" + "server_finishes_request" ], "ci_platforms": [ "windows", @@ -11077,7 +11157,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -11087,7 +11167,7 @@ }, { "args": [ - "trailing_metadata" + "shutdown_finishes_calls" ], "ci_platforms": [ "windows", @@ -11098,7 +11178,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -11108,19 +11188,18 @@ }, { "args": [ - "bad_hostname" + "shutdown_finishes_tags" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -11130,19 +11209,18 @@ }, { "args": [ - "binary_metadata" + "simple_delayed_request" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -11152,19 +11230,18 @@ }, { "args": [ - "call_creds" + "simple_metadata" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -11174,19 +11251,18 @@ }, { "args": [ - "cancel_after_accept" + "simple_request" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -11196,19 +11272,18 @@ }, { "args": [ - "cancel_after_client_done" + "trailing_metadata" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -11218,19 +11293,18 @@ }, { "args": [ - "cancel_after_invoke" + "bad_hostname" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -11240,19 +11314,18 @@ }, { "args": [ - "cancel_before_invoke" + "binary_metadata" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -11262,19 +11335,18 @@ }, { "args": [ - "cancel_in_a_vacuum" + "call_creds" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -11284,19 +11356,18 @@ }, { "args": [ - "cancel_with_status" + "cancel_after_accept" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -11306,19 +11377,18 @@ }, { "args": [ - "compressed_payload" + "cancel_after_client_done" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -11328,19 +11398,18 @@ }, { "args": [ - "empty_batch" + "cancel_after_invoke" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -11350,19 +11419,18 @@ }, { "args": [ - "graceful_server_shutdown" + "cancel_before_invoke" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -11372,19 +11440,18 @@ }, { "args": [ - "high_initial_seqno" + "cancel_in_a_vacuum" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -11394,19 +11461,18 @@ }, { "args": [ - "invoke_large_request" + "cancel_with_status" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -11416,19 +11482,18 @@ }, { "args": [ - "large_metadata" + "compressed_payload" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -11438,19 +11503,18 @@ }, { "args": [ - "max_concurrent_streams" + "empty_batch" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -11460,19 +11524,18 @@ }, { "args": [ - "max_message_length" + "graceful_server_shutdown" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -11482,19 +11545,18 @@ }, { "args": [ - "negative_deadline" + "high_initial_seqno" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -11504,19 +11566,18 @@ }, { "args": [ - "no_op" + "hpack_size" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -11526,19 +11587,18 @@ }, { "args": [ - "payload" + "invoke_large_request" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -11548,19 +11608,18 @@ }, { "args": [ - "ping_pong_streaming" + "large_metadata" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -11570,19 +11629,18 @@ }, { "args": [ - "registered_call" + "max_concurrent_streams" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -11592,19 +11650,18 @@ }, { "args": [ - "request_with_flags" + "max_message_length" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -11614,19 +11671,18 @@ }, { "args": [ - "request_with_payload" + "negative_deadline" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -11636,19 +11692,18 @@ }, { "args": [ - "server_finishes_request" + "no_op" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -11658,19 +11713,18 @@ }, { "args": [ - "shutdown_finishes_calls" + "payload" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -11680,19 +11734,18 @@ }, { "args": [ - "shutdown_finishes_tags" + "ping_pong_streaming" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -11702,19 +11755,18 @@ }, { "args": [ - "simple_metadata" + "registered_call" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -11724,19 +11776,18 @@ }, { "args": [ - "simple_request" + "request_with_flags" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -11746,19 +11797,18 @@ }, { "args": [ - "trailing_metadata" + "request_with_payload" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -11768,7 +11818,7 @@ }, { "args": [ - "bad_hostname" + "server_finishes_request" ], "ci_platforms": [ "windows", @@ -11779,7 +11829,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -11789,7 +11839,7 @@ }, { "args": [ - "binary_metadata" + "shutdown_finishes_calls" ], "ci_platforms": [ "windows", @@ -11800,7 +11850,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -11810,7 +11860,7 @@ }, { "args": [ - "call_creds" + "shutdown_finishes_tags" ], "ci_platforms": [ "windows", @@ -11821,7 +11871,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -11831,18 +11881,18 @@ }, { "args": [ - "cancel_after_accept" + "simple_metadata" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -11852,18 +11902,18 @@ }, { "args": [ - "cancel_after_client_done" + "simple_request" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -11873,18 +11923,18 @@ }, { "args": [ - "cancel_after_invoke" + "trailing_metadata" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -11894,18 +11944,18 @@ }, { "args": [ - "cancel_before_invoke" + "bad_hostname" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -11915,18 +11965,18 @@ }, { "args": [ - "cancel_in_a_vacuum" + "binary_metadata" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -11936,18 +11986,18 @@ }, { "args": [ - "cancel_with_status" + "call_creds" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -11957,7 +12007,7 @@ }, { "args": [ - "compressed_payload" + "cancel_after_accept" ], "ci_platforms": [ "windows", @@ -11968,7 +12018,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -11978,18 +12028,18 @@ }, { "args": [ - "empty_batch" + "cancel_after_client_done" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -11999,7 +12049,7 @@ }, { "args": [ - "graceful_server_shutdown" + "cancel_after_invoke" ], "ci_platforms": [ "windows", @@ -12010,7 +12060,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -12020,18 +12070,18 @@ }, { "args": [ - "high_initial_seqno" + "cancel_before_invoke" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -12041,18 +12091,18 @@ }, { "args": [ - "hpack_size" + "cancel_in_a_vacuum" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -12062,18 +12112,18 @@ }, { "args": [ - "invoke_large_request" + "cancel_with_status" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -12083,18 +12133,18 @@ }, { "args": [ - "large_metadata" + "compressed_payload" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -12104,7 +12154,7 @@ }, { "args": [ - "max_concurrent_streams" + "empty_batch" ], "ci_platforms": [ "windows", @@ -12115,7 +12165,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -12125,7 +12175,7 @@ }, { "args": [ - "max_message_length" + "graceful_server_shutdown" ], "ci_platforms": [ "windows", @@ -12136,7 +12186,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -12146,7 +12196,7 @@ }, { "args": [ - "negative_deadline" + "high_initial_seqno" ], "ci_platforms": [ "windows", @@ -12157,7 +12207,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -12167,7 +12217,7 @@ }, { "args": [ - "no_op" + "invoke_large_request" ], "ci_platforms": [ "windows", @@ -12178,7 +12228,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -12188,18 +12238,18 @@ }, { "args": [ - "payload" + "large_metadata" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -12209,7 +12259,7 @@ }, { "args": [ - "ping_pong_streaming" + "max_concurrent_streams" ], "ci_platforms": [ "windows", @@ -12220,7 +12270,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -12230,18 +12280,18 @@ }, { "args": [ - "registered_call" + "max_message_length" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -12251,7 +12301,7 @@ }, { "args": [ - "request_with_flags" + "negative_deadline" ], "ci_platforms": [ "windows", @@ -12262,7 +12312,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -12272,7 +12322,7 @@ }, { "args": [ - "request_with_payload" + "no_op" ], "ci_platforms": [ "windows", @@ -12283,7 +12333,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -12293,18 +12343,18 @@ }, { "args": [ - "server_finishes_request" + "payload" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -12314,7 +12364,7 @@ }, { "args": [ - "shutdown_finishes_calls" + "ping_pong_streaming" ], "ci_platforms": [ "windows", @@ -12325,7 +12375,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -12335,7 +12385,7 @@ }, { "args": [ - "shutdown_finishes_tags" + "registered_call" ], "ci_platforms": [ "windows", @@ -12346,7 +12396,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -12356,7 +12406,7 @@ }, { "args": [ - "simple_metadata" + "request_with_flags" ], "ci_platforms": [ "windows", @@ -12367,7 +12417,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -12377,7 +12427,7 @@ }, { "args": [ - "simple_request" + "request_with_payload" ], "ci_platforms": [ "windows", @@ -12388,7 +12438,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -12398,7 +12448,7 @@ }, { "args": [ - "trailing_metadata" + "server_finishes_request" ], "ci_platforms": [ "windows", @@ -12409,7 +12459,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -12419,19 +12469,18 @@ }, { "args": [ - "bad_hostname" + "shutdown_finishes_calls" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -12441,19 +12490,18 @@ }, { "args": [ - "binary_metadata" + "shutdown_finishes_tags" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -12463,19 +12511,18 @@ }, { "args": [ - "call_creds" + "simple_metadata" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -12485,19 +12532,18 @@ }, { "args": [ - "cancel_after_accept" + "simple_request" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -12507,19 +12553,18 @@ }, { "args": [ - "cancel_after_client_done" + "trailing_metadata" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -12529,19 +12574,18 @@ }, { "args": [ - "cancel_after_invoke" + "bad_hostname" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_sockpair_1byte_test", "platforms": [ "windows", "linux", @@ -12551,19 +12595,18 @@ }, { "args": [ - "cancel_before_invoke" + "binary_metadata" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_sockpair_1byte_test", "platforms": [ "windows", "linux", @@ -12573,19 +12616,18 @@ }, { "args": [ - "cancel_in_a_vacuum" + "call_creds" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_sockpair_1byte_test", "platforms": [ "windows", "linux", @@ -12595,19 +12637,18 @@ }, { "args": [ - "cancel_with_status" + "cancel_after_accept" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_sockpair_1byte_test", "platforms": [ "windows", "linux", @@ -12617,19 +12658,18 @@ }, { "args": [ - "compressed_payload" + "cancel_after_client_done" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_sockpair_1byte_test", "platforms": [ "windows", "linux", @@ -12639,19 +12679,18 @@ }, { "args": [ - "connectivity" + "cancel_after_invoke" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_sockpair_1byte_test", "platforms": [ "windows", "linux", @@ -12661,19 +12700,18 @@ }, { "args": [ - "default_host" + "cancel_before_invoke" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_sockpair_1byte_test", "platforms": [ "windows", "linux", @@ -12683,19 +12721,18 @@ }, { "args": [ - "disappearing_server" + "cancel_in_a_vacuum" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_sockpair_1byte_test", "platforms": [ "windows", "linux", @@ -12705,19 +12742,18 @@ }, { "args": [ - "empty_batch" + "cancel_with_status" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_sockpair_1byte_test", "platforms": [ "windows", "linux", @@ -12727,19 +12763,18 @@ }, { "args": [ - "graceful_server_shutdown" + "compressed_payload" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_sockpair_1byte_test", "platforms": [ "windows", "linux", @@ -12749,19 +12784,18 @@ }, { "args": [ - "high_initial_seqno" + "empty_batch" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_sockpair_1byte_test", "platforms": [ "windows", "linux", @@ -12771,19 +12805,18 @@ }, { "args": [ - "hpack_size" + "graceful_server_shutdown" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_sockpair_1byte_test", "platforms": [ "windows", "linux", @@ -12793,19 +12826,18 @@ }, { "args": [ - "invoke_large_request" + "high_initial_seqno" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_sockpair_1byte_test", "platforms": [ "windows", "linux", @@ -12815,19 +12847,18 @@ }, { "args": [ - "large_metadata" + "hpack_size" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_sockpair_1byte_test", "platforms": [ "windows", "linux", @@ -12837,19 +12868,18 @@ }, { "args": [ - "max_concurrent_streams" + "invoke_large_request" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_sockpair_1byte_test", "platforms": [ "windows", "linux", @@ -12859,19 +12889,18 @@ }, { "args": [ - "max_message_length" + "large_metadata" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_sockpair_1byte_test", "platforms": [ "windows", "linux", @@ -12881,19 +12910,18 @@ }, { "args": [ - "negative_deadline" + "max_concurrent_streams" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_sockpair_1byte_test", "platforms": [ "windows", "linux", @@ -12903,19 +12931,18 @@ }, { "args": [ - "no_op" + "max_message_length" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_sockpair_1byte_test", "platforms": [ "windows", "linux", @@ -12925,19 +12952,18 @@ }, { "args": [ - "payload" + "negative_deadline" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_sockpair_1byte_test", "platforms": [ "windows", "linux", @@ -12947,19 +12973,18 @@ }, { "args": [ - "ping" + "no_op" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_sockpair_1byte_test", "platforms": [ "windows", "linux", @@ -12969,19 +12994,18 @@ }, { "args": [ - "ping_pong_streaming" + "payload" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_sockpair_1byte_test", "platforms": [ "windows", "linux", @@ -12991,19 +13015,18 @@ }, { "args": [ - "registered_call" + "ping_pong_streaming" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_sockpair_1byte_test", "platforms": [ "windows", "linux", @@ -13013,19 +13036,18 @@ }, { "args": [ - "request_with_flags" + "registered_call" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_sockpair_1byte_test", "platforms": [ "windows", "linux", @@ -13035,19 +13057,18 @@ }, { "args": [ - "request_with_payload" + "request_with_flags" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_sockpair_1byte_test", "platforms": [ "windows", "linux", @@ -13057,19 +13078,18 @@ }, { "args": [ - "server_finishes_request" + "request_with_payload" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_sockpair_1byte_test", "platforms": [ "windows", "linux", @@ -13079,19 +13099,18 @@ }, { "args": [ - "shutdown_finishes_calls" + "server_finishes_request" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_sockpair_1byte_test", "platforms": [ "windows", "linux", @@ -13101,19 +13120,18 @@ }, { "args": [ - "shutdown_finishes_tags" + "shutdown_finishes_calls" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_sockpair_1byte_test", "platforms": [ "windows", "linux", @@ -13123,19 +13141,18 @@ }, { "args": [ - "simple_delayed_request" + "shutdown_finishes_tags" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_sockpair_1byte_test", "platforms": [ "windows", "linux", @@ -13150,14 +13167,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_sockpair_1byte_test", "platforms": [ "windows", "linux", @@ -13172,14 +13188,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_sockpair_1byte_test", "platforms": [ "windows", "linux", @@ -13194,14 +13209,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_sockpair_1byte_test", "platforms": [ "windows", "linux", @@ -13214,15 +13228,21 @@ "bad_hostname" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl+poll_test", + "name": "h2_ssl_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -13230,15 +13250,21 @@ "binary_metadata" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl+poll_test", + "name": "h2_ssl_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -13246,15 +13272,21 @@ "call_creds" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl+poll_test", + "name": "h2_ssl_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -13262,15 +13294,21 @@ "cancel_after_accept" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl+poll_test", + "name": "h2_ssl_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -13278,15 +13316,21 @@ "cancel_after_client_done" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl+poll_test", + "name": "h2_ssl_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -13294,15 +13338,21 @@ "cancel_after_invoke" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl+poll_test", + "name": "h2_ssl_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -13310,15 +13360,21 @@ "cancel_before_invoke" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl+poll_test", + "name": "h2_ssl_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -13326,15 +13382,21 @@ "cancel_in_a_vacuum" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl+poll_test", + "name": "h2_ssl_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -13342,15 +13404,21 @@ "cancel_with_status" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl+poll_test", + "name": "h2_ssl_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -13358,15 +13426,21 @@ "compressed_payload" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl+poll_test", + "name": "h2_ssl_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -13374,15 +13448,21 @@ "connectivity" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl+poll_test", + "name": "h2_ssl_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -13390,15 +13470,21 @@ "default_host" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl+poll_test", + "name": "h2_ssl_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -13406,15 +13492,21 @@ "disappearing_server" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl+poll_test", + "name": "h2_ssl_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -13422,15 +13514,21 @@ "empty_batch" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl+poll_test", + "name": "h2_ssl_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -13438,15 +13536,21 @@ "graceful_server_shutdown" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl+poll_test", + "name": "h2_ssl_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -13454,15 +13558,21 @@ "high_initial_seqno" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl+poll_test", + "name": "h2_ssl_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -13470,15 +13580,21 @@ "hpack_size" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl+poll_test", + "name": "h2_ssl_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -13486,15 +13602,21 @@ "invoke_large_request" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl+poll_test", + "name": "h2_ssl_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -13502,15 +13624,21 @@ "large_metadata" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl+poll_test", + "name": "h2_ssl_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -13518,15 +13646,21 @@ "max_concurrent_streams" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl+poll_test", + "name": "h2_ssl_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -13534,15 +13668,21 @@ "max_message_length" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl+poll_test", + "name": "h2_ssl_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -13550,15 +13690,21 @@ "negative_deadline" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl+poll_test", + "name": "h2_ssl_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -13566,15 +13712,21 @@ "no_op" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl+poll_test", + "name": "h2_ssl_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -13582,15 +13734,21 @@ "payload" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl+poll_test", + "name": "h2_ssl_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -13598,15 +13756,21 @@ "ping" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl+poll_test", + "name": "h2_ssl_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -13614,15 +13778,21 @@ "ping_pong_streaming" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl+poll_test", + "name": "h2_ssl_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -13630,15 +13800,21 @@ "registered_call" ], "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "exclude_configs": [], + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl+poll_test", + "name": "h2_ssl_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -13646,15 +13822,21 @@ "request_with_flags" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl+poll_test", + "name": "h2_ssl_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -13662,15 +13844,21 @@ "request_with_payload" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl+poll_test", + "name": "h2_ssl_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -13678,15 +13866,21 @@ "server_finishes_request" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl+poll_test", + "name": "h2_ssl_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -13694,15 +13888,21 @@ "shutdown_finishes_calls" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl+poll_test", + "name": "h2_ssl_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -13710,15 +13910,21 @@ "shutdown_finishes_tags" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl+poll_test", + "name": "h2_ssl_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -13726,15 +13932,21 @@ "simple_delayed_request" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl+poll_test", + "name": "h2_ssl_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -13742,15 +13954,21 @@ "simple_metadata" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl+poll_test", + "name": "h2_ssl_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -13758,15 +13976,21 @@ "simple_request" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl+poll_test", + "name": "h2_ssl_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -13774,15 +13998,21 @@ "trailing_metadata" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl+poll_test", + "name": "h2_ssl_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -13790,20 +14020,15 @@ "bad_hostname" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "linux" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_ssl+poll_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { @@ -13811,20 +14036,15 @@ "binary_metadata" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "linux" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_ssl+poll_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { @@ -13832,20 +14052,15 @@ "call_creds" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "linux" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_ssl+poll_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { @@ -13853,20 +14068,15 @@ "cancel_after_accept" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "linux" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_ssl+poll_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { @@ -13874,20 +14084,15 @@ "cancel_after_client_done" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "linux" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_ssl+poll_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { @@ -13895,20 +14100,15 @@ "cancel_after_invoke" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "linux" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_ssl+poll_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { @@ -13916,20 +14116,15 @@ "cancel_before_invoke" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "linux" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_ssl+poll_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { @@ -13937,20 +14132,15 @@ "cancel_in_a_vacuum" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "linux" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_ssl+poll_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { @@ -13958,20 +14148,47 @@ "cancel_with_status" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "linux" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_ssl+poll_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" + ] + }, + { + "args": [ + "compressed_payload" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl+poll_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "connectivity" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl+poll_test", + "platforms": [ + "linux" ] }, { @@ -13979,20 +14196,15 @@ "default_host" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "linux" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_ssl+poll_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { @@ -14000,20 +14212,15 @@ "disappearing_server" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "linux" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_ssl+poll_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { @@ -14021,20 +14228,15 @@ "empty_batch" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "linux" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_ssl+poll_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { @@ -14042,20 +14244,15 @@ "graceful_server_shutdown" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "linux" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_ssl+poll_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { @@ -14063,20 +14260,31 @@ "high_initial_seqno" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "linux" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_ssl+poll_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" + ] + }, + { + "args": [ + "hpack_size" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl+poll_test", + "platforms": [ + "linux" ] }, { @@ -14084,20 +14292,15 @@ "invoke_large_request" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "linux" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_ssl+poll_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { @@ -14105,20 +14308,31 @@ "large_metadata" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "linux" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_ssl+poll_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" + ] + }, + { + "args": [ + "max_concurrent_streams" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl+poll_test", + "platforms": [ + "linux" ] }, { @@ -14126,20 +14340,15 @@ "max_message_length" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "linux" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_ssl+poll_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { @@ -14147,20 +14356,15 @@ "negative_deadline" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "linux" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_ssl+poll_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { @@ -14168,20 +14372,15 @@ "no_op" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "linux" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_ssl+poll_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { @@ -14189,20 +14388,31 @@ "payload" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "linux" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_ssl+poll_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" + ] + }, + { + "args": [ + "ping" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl+poll_test", + "platforms": [ + "linux" ] }, { @@ -14210,41 +14420,47 @@ "ping_pong_streaming" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "linux" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl+poll_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "registered_call" + ], + "ci_platforms": [ + "linux" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_ssl+poll_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "registered_call" + "request_with_flags" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "linux" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_ssl+poll_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { @@ -14252,20 +14468,15 @@ "request_with_payload" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "linux" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_ssl+poll_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { @@ -14273,20 +14484,15 @@ "server_finishes_request" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "linux" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_ssl+poll_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { @@ -14294,20 +14500,15 @@ "shutdown_finishes_calls" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "linux" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_ssl+poll_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { @@ -14315,20 +14516,15 @@ "shutdown_finishes_tags" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "linux" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_ssl+poll_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { @@ -14336,20 +14532,15 @@ "simple_delayed_request" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "linux" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_ssl+poll_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { @@ -14357,20 +14548,15 @@ "simple_metadata" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "linux" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_ssl+poll_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { @@ -14378,20 +14564,15 @@ "simple_request" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "linux" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_ssl+poll_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { @@ -14399,20 +14580,15 @@ "trailing_metadata" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "linux" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_ssl+poll_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { @@ -14422,14 +14598,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_ssl_proxy_test", "platforms": [ "windows", "linux", @@ -14444,14 +14619,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_ssl_proxy_test", "platforms": [ "windows", "linux", @@ -14466,14 +14640,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_ssl_proxy_test", "platforms": [ "windows", "linux", @@ -14488,14 +14661,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_ssl_proxy_test", "platforms": [ "windows", "linux", @@ -14510,14 +14682,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_ssl_proxy_test", "platforms": [ "windows", "linux", @@ -14532,14 +14703,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_ssl_proxy_test", "platforms": [ "windows", "linux", @@ -14554,14 +14724,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_ssl_proxy_test", "platforms": [ "windows", "linux", @@ -14576,14 +14745,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_ssl_proxy_test", "platforms": [ "windows", "linux", @@ -14598,14 +14766,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_ssl_proxy_test", "platforms": [ "windows", "linux", @@ -14615,19 +14782,18 @@ }, { "args": [ - "compressed_payload" + "default_host" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_ssl_proxy_test", "platforms": [ "windows", "linux", @@ -14637,19 +14803,18 @@ }, { "args": [ - "empty_batch" + "disappearing_server" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_ssl_proxy_test", "platforms": [ "windows", "linux", @@ -14659,19 +14824,18 @@ }, { "args": [ - "graceful_server_shutdown" + "empty_batch" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_ssl_proxy_test", "platforms": [ "windows", "linux", @@ -14681,19 +14845,18 @@ }, { "args": [ - "high_initial_seqno" + "graceful_server_shutdown" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_ssl_proxy_test", "platforms": [ "windows", "linux", @@ -14703,19 +14866,18 @@ }, { "args": [ - "hpack_size" + "high_initial_seqno" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_ssl_proxy_test", "platforms": [ "windows", "linux", @@ -14730,14 +14892,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_ssl_proxy_test", "platforms": [ "windows", "linux", @@ -14752,36 +14913,13 @@ "ci_platforms": [ "windows", "linux", - "mac", - "posix" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_uchannel_test", - "platforms": [ - "windows", - "linux", - "mac", - "posix" - ] - }, - { - "args": [ - "max_concurrent_streams" - ], - "ci_platforms": [ - "windows", - "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_ssl_proxy_test", "platforms": [ "windows", "linux", @@ -14796,14 +14934,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_ssl_proxy_test", "platforms": [ "windows", "linux", @@ -14818,14 +14955,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_ssl_proxy_test", "platforms": [ "windows", "linux", @@ -14840,14 +14976,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_ssl_proxy_test", "platforms": [ "windows", "linux", @@ -14862,14 +14997,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_ssl_proxy_test", "platforms": [ "windows", "linux", @@ -14884,14 +15018,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_ssl_proxy_test", "platforms": [ "windows", "linux", @@ -14906,14 +15039,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_ssl_proxy_test", "platforms": [ "windows", "linux", @@ -14923,19 +15055,18 @@ }, { "args": [ - "request_with_flags" + "request_with_payload" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_ssl_proxy_test", "platforms": [ "windows", "linux", @@ -14945,19 +15076,18 @@ }, { "args": [ - "request_with_payload" + "server_finishes_request" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_ssl_proxy_test", "platforms": [ "windows", "linux", @@ -14967,19 +15097,18 @@ }, { "args": [ - "server_finishes_request" + "shutdown_finishes_calls" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_ssl_proxy_test", "platforms": [ "windows", "linux", @@ -14989,19 +15118,18 @@ }, { "args": [ - "shutdown_finishes_calls" + "shutdown_finishes_tags" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_ssl_proxy_test", "platforms": [ "windows", "linux", @@ -15011,19 +15139,18 @@ }, { "args": [ - "shutdown_finishes_tags" + "simple_delayed_request" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_ssl_proxy_test", "platforms": [ "windows", "linux", @@ -15038,14 +15165,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_ssl_proxy_test", "platforms": [ "windows", "linux", @@ -15060,14 +15186,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_ssl_proxy_test", "platforms": [ "windows", "linux", @@ -15082,14 +15207,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_ssl_proxy_test", "platforms": [ "windows", "linux", @@ -20326,41 +20450,86 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+poll+pipe_nosec_test", + "name": "h2_full+poll+pipe_nosec_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "trailing_metadata" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+poll+pipe_nosec_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "bad_hostname" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+trace_nosec_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "trailing_metadata" + "binary_metadata" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+poll+pipe_nosec_test", + "name": "h2_full+trace_nosec_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "bad_hostname" + "cancel_after_accept" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_nosec_test", + "name": "h2_full+trace_nosec_test", "platforms": [ "windows", "linux", @@ -20370,18 +20539,19 @@ }, { "args": [ - "binary_metadata" + "cancel_after_client_done" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_nosec_test", + "name": "h2_full+trace_nosec_test", "platforms": [ "windows", "linux", @@ -20391,18 +20561,19 @@ }, { "args": [ - "cancel_after_accept" + "cancel_after_invoke" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_nosec_test", + "name": "h2_full+trace_nosec_test", "platforms": [ "windows", "linux", @@ -20412,18 +20583,19 @@ }, { "args": [ - "cancel_after_client_done" + "cancel_before_invoke" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_nosec_test", + "name": "h2_full+trace_nosec_test", "platforms": [ "windows", "linux", @@ -20433,18 +20605,19 @@ }, { "args": [ - "cancel_after_invoke" + "cancel_in_a_vacuum" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_nosec_test", + "name": "h2_full+trace_nosec_test", "platforms": [ "windows", "linux", @@ -20454,18 +20627,19 @@ }, { "args": [ - "cancel_before_invoke" + "cancel_with_status" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_nosec_test", + "name": "h2_full+trace_nosec_test", "platforms": [ "windows", "linux", @@ -20475,18 +20649,19 @@ }, { "args": [ - "cancel_in_a_vacuum" + "compressed_payload" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_nosec_test", + "name": "h2_full+trace_nosec_test", "platforms": [ "windows", "linux", @@ -20496,18 +20671,19 @@ }, { "args": [ - "cancel_with_status" + "connectivity" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_nosec_test", + "name": "h2_full+trace_nosec_test", "platforms": [ "windows", "linux", @@ -20522,13 +20698,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_nosec_test", + "name": "h2_full+trace_nosec_test", "platforms": [ "windows", "linux", @@ -20543,13 +20720,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_nosec_test", + "name": "h2_full+trace_nosec_test", "platforms": [ "windows", "linux", @@ -20564,13 +20742,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_nosec_test", + "name": "h2_full+trace_nosec_test", "platforms": [ "windows", "linux", @@ -20585,13 +20764,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_nosec_test", + "name": "h2_full+trace_nosec_test", "platforms": [ "windows", "linux", @@ -20606,13 +20786,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_nosec_test", + "name": "h2_full+trace_nosec_test", "platforms": [ "windows", "linux", @@ -20627,13 +20808,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_nosec_test", + "name": "h2_full+trace_nosec_test", "platforms": [ "windows", "linux", @@ -20648,13 +20830,36 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_nosec_test", + "name": "h2_full+trace_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "max_concurrent_streams" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+trace_nosec_test", "platforms": [ "windows", "linux", @@ -20669,13 +20874,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_nosec_test", + "name": "h2_full+trace_nosec_test", "platforms": [ "windows", "linux", @@ -20690,13 +20896,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_nosec_test", + "name": "h2_full+trace_nosec_test", "platforms": [ "windows", "linux", @@ -20711,13 +20918,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_nosec_test", + "name": "h2_full+trace_nosec_test", "platforms": [ "windows", "linux", @@ -20732,13 +20940,36 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_nosec_test", + "name": "h2_full+trace_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "ping" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+trace_nosec_test", "platforms": [ "windows", "linux", @@ -20753,13 +20984,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_nosec_test", + "name": "h2_full+trace_nosec_test", "platforms": [ "windows", "linux", @@ -20774,13 +21006,36 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_nosec_test", + "name": "h2_full+trace_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "request_with_flags" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+trace_nosec_test", "platforms": [ "windows", "linux", @@ -20795,13 +21050,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_nosec_test", + "name": "h2_full+trace_nosec_test", "platforms": [ "windows", "linux", @@ -20816,13 +21072,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_nosec_test", + "name": "h2_full+trace_nosec_test", "platforms": [ "windows", "linux", @@ -20837,13 +21094,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_nosec_test", + "name": "h2_full+trace_nosec_test", "platforms": [ "windows", "linux", @@ -20858,13 +21116,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_nosec_test", + "name": "h2_full+trace_nosec_test", "platforms": [ "windows", "linux", @@ -20879,13 +21138,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_nosec_test", + "name": "h2_full+trace_nosec_test", "platforms": [ "windows", "linux", @@ -20900,13 +21160,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_nosec_test", + "name": "h2_full+trace_nosec_test", "platforms": [ "windows", "linux", @@ -20921,13 +21182,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_nosec_test", + "name": "h2_full+trace_nosec_test", "platforms": [ "windows", "linux", @@ -20942,13 +21204,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_nosec_test", + "name": "h2_full+trace_nosec_test", "platforms": [ "windows", "linux", @@ -20969,7 +21232,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_nosec_test", + "name": "h2_proxy_nosec_test", "platforms": [ "windows", "linux", @@ -20990,7 +21253,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_nosec_test", + "name": "h2_proxy_nosec_test", "platforms": [ "windows", "linux", @@ -21011,7 +21274,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_nosec_test", + "name": "h2_proxy_nosec_test", "platforms": [ "windows", "linux", @@ -21032,7 +21295,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_nosec_test", + "name": "h2_proxy_nosec_test", "platforms": [ "windows", "linux", @@ -21053,7 +21316,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_nosec_test", + "name": "h2_proxy_nosec_test", "platforms": [ "windows", "linux", @@ -21074,7 +21337,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_nosec_test", + "name": "h2_proxy_nosec_test", "platforms": [ "windows", "linux", @@ -21095,7 +21358,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_nosec_test", + "name": "h2_proxy_nosec_test", "platforms": [ "windows", "linux", @@ -21116,7 +21379,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_nosec_test", + "name": "h2_proxy_nosec_test", "platforms": [ "windows", "linux", @@ -21126,18 +21389,18 @@ }, { "args": [ - "compressed_payload" + "default_host" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_nosec_test", + "name": "h2_proxy_nosec_test", "platforms": [ "windows", "linux", @@ -21147,7 +21410,7 @@ }, { "args": [ - "empty_batch" + "disappearing_server" ], "ci_platforms": [ "windows", @@ -21158,7 +21421,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_nosec_test", + "name": "h2_proxy_nosec_test", "platforms": [ "windows", "linux", @@ -21168,18 +21431,18 @@ }, { "args": [ - "graceful_server_shutdown" + "empty_batch" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_nosec_test", + "name": "h2_proxy_nosec_test", "platforms": [ "windows", "linux", @@ -21189,18 +21452,18 @@ }, { "args": [ - "high_initial_seqno" + "graceful_server_shutdown" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_nosec_test", + "name": "h2_proxy_nosec_test", "platforms": [ "windows", "linux", @@ -21210,7 +21473,7 @@ }, { "args": [ - "hpack_size" + "high_initial_seqno" ], "ci_platforms": [ "windows", @@ -21221,7 +21484,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_nosec_test", + "name": "h2_proxy_nosec_test", "platforms": [ "windows", "linux", @@ -21242,7 +21505,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_nosec_test", + "name": "h2_proxy_nosec_test", "platforms": [ "windows", "linux", @@ -21263,28 +21526,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_nosec_test", - "platforms": [ - "windows", - "linux", - "mac", - "posix" - ] - }, - { - "args": [ - "max_concurrent_streams" - ], - "ci_platforms": [ - "windows", - "linux", - "posix" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_nosec_test", + "name": "h2_proxy_nosec_test", "platforms": [ "windows", "linux", @@ -21305,7 +21547,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_nosec_test", + "name": "h2_proxy_nosec_test", "platforms": [ "windows", "linux", @@ -21326,7 +21568,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_nosec_test", + "name": "h2_proxy_nosec_test", "platforms": [ "windows", "linux", @@ -21347,7 +21589,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_nosec_test", + "name": "h2_proxy_nosec_test", "platforms": [ "windows", "linux", @@ -21368,7 +21610,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_nosec_test", + "name": "h2_proxy_nosec_test", "platforms": [ "windows", "linux", @@ -21389,7 +21631,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_nosec_test", + "name": "h2_proxy_nosec_test", "platforms": [ "windows", "linux", @@ -21410,7 +21652,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_nosec_test", + "name": "h2_proxy_nosec_test", "platforms": [ "windows", "linux", @@ -21420,7 +21662,7 @@ }, { "args": [ - "request_with_flags" + "request_with_payload" ], "ci_platforms": [ "windows", @@ -21431,7 +21673,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_nosec_test", + "name": "h2_proxy_nosec_test", "platforms": [ "windows", "linux", @@ -21441,7 +21683,7 @@ }, { "args": [ - "request_with_payload" + "server_finishes_request" ], "ci_platforms": [ "windows", @@ -21452,7 +21694,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_nosec_test", + "name": "h2_proxy_nosec_test", "platforms": [ "windows", "linux", @@ -21462,7 +21704,7 @@ }, { "args": [ - "server_finishes_request" + "shutdown_finishes_calls" ], "ci_platforms": [ "windows", @@ -21473,7 +21715,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_nosec_test", + "name": "h2_proxy_nosec_test", "platforms": [ "windows", "linux", @@ -21483,7 +21725,7 @@ }, { "args": [ - "shutdown_finishes_calls" + "shutdown_finishes_tags" ], "ci_platforms": [ "windows", @@ -21494,7 +21736,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_nosec_test", + "name": "h2_proxy_nosec_test", "platforms": [ "windows", "linux", @@ -21504,18 +21746,18 @@ }, { "args": [ - "shutdown_finishes_tags" + "simple_delayed_request" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_nosec_test", + "name": "h2_proxy_nosec_test", "platforms": [ "windows", "linux", @@ -21536,7 +21778,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_nosec_test", + "name": "h2_proxy_nosec_test", "platforms": [ "windows", "linux", @@ -21557,7 +21799,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_nosec_test", + "name": "h2_proxy_nosec_test", "platforms": [ "windows", "linux", @@ -21578,7 +21820,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_nosec_test", + "name": "h2_proxy_nosec_test", "platforms": [ "windows", "linux", @@ -21593,14 +21835,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_nosec_test", + "name": "h2_sockpair_nosec_test", "platforms": [ "windows", "linux", @@ -21615,14 +21856,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_nosec_test", + "name": "h2_sockpair_nosec_test", "platforms": [ "windows", "linux", @@ -21637,14 +21877,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_nosec_test", + "name": "h2_sockpair_nosec_test", "platforms": [ "windows", "linux", @@ -21659,14 +21898,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_nosec_test", + "name": "h2_sockpair_nosec_test", "platforms": [ "windows", "linux", @@ -21681,14 +21919,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_nosec_test", + "name": "h2_sockpair_nosec_test", "platforms": [ "windows", "linux", @@ -21703,14 +21940,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_nosec_test", + "name": "h2_sockpair_nosec_test", "platforms": [ "windows", "linux", @@ -21725,14 +21961,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_nosec_test", + "name": "h2_sockpair_nosec_test", "platforms": [ "windows", "linux", @@ -21747,14 +21982,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_nosec_test", + "name": "h2_sockpair_nosec_test", "platforms": [ "windows", "linux", @@ -21769,14 +22003,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_nosec_test", + "name": "h2_sockpair_nosec_test", "platforms": [ "windows", "linux", @@ -21791,14 +22024,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_nosec_test", + "name": "h2_sockpair_nosec_test", "platforms": [ "windows", "linux", @@ -21813,14 +22045,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_nosec_test", + "name": "h2_sockpair_nosec_test", "platforms": [ "windows", "linux", @@ -21833,16 +22064,36 @@ "high_initial_seqno" ], "ci_platforms": [ + "windows", + "linux", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_nosec_test", + "platforms": [ "windows", "linux", "mac", "posix" + ] + }, + { + "args": [ + "hpack_size" + ], + "ci_platforms": [ + "windows", + "linux", + "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_nosec_test", + "name": "h2_sockpair_nosec_test", "platforms": [ "windows", "linux", @@ -21857,14 +22108,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_nosec_test", + "name": "h2_sockpair_nosec_test", "platforms": [ "windows", "linux", @@ -21879,14 +22129,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_nosec_test", + "name": "h2_sockpair_nosec_test", "platforms": [ "windows", "linux", @@ -21901,14 +22150,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_nosec_test", + "name": "h2_sockpair_nosec_test", "platforms": [ "windows", "linux", @@ -21923,14 +22171,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_nosec_test", + "name": "h2_sockpair_nosec_test", "platforms": [ "windows", "linux", @@ -21945,14 +22192,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_nosec_test", + "name": "h2_sockpair_nosec_test", "platforms": [ "windows", "linux", @@ -21967,14 +22213,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_nosec_test", + "name": "h2_sockpair_nosec_test", "platforms": [ "windows", "linux", @@ -21989,14 +22234,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_nosec_test", + "name": "h2_sockpair_nosec_test", "platforms": [ "windows", "linux", @@ -22011,14 +22255,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_nosec_test", + "name": "h2_sockpair_nosec_test", "platforms": [ "windows", "linux", @@ -22033,14 +22276,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_nosec_test", + "name": "h2_sockpair_nosec_test", "platforms": [ "windows", "linux", @@ -22055,14 +22297,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_nosec_test", + "name": "h2_sockpair_nosec_test", "platforms": [ "windows", "linux", @@ -22077,14 +22318,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_nosec_test", + "name": "h2_sockpair_nosec_test", "platforms": [ "windows", "linux", @@ -22099,14 +22339,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_nosec_test", + "name": "h2_sockpair_nosec_test", "platforms": [ "windows", "linux", @@ -22121,14 +22360,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_nosec_test", + "name": "h2_sockpair_nosec_test", "platforms": [ "windows", "linux", @@ -22143,14 +22381,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_nosec_test", + "name": "h2_sockpair_nosec_test", "platforms": [ "windows", "linux", @@ -22165,14 +22402,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_nosec_test", + "name": "h2_sockpair_nosec_test", "platforms": [ "windows", "linux", @@ -22187,14 +22423,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_nosec_test", + "name": "h2_sockpair_nosec_test", "platforms": [ "windows", "linux", @@ -22209,14 +22444,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_nosec_test", + "name": "h2_sockpair_nosec_test", "platforms": [ "windows", "linux", @@ -22237,7 +22471,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_nosec_test", + "name": "h2_sockpair+trace_nosec_test", "platforms": [ "windows", "linux", @@ -22258,7 +22492,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_nosec_test", + "name": "h2_sockpair+trace_nosec_test", "platforms": [ "windows", "linux", @@ -22279,7 +22513,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_nosec_test", + "name": "h2_sockpair+trace_nosec_test", "platforms": [ "windows", "linux", @@ -22300,7 +22534,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_nosec_test", + "name": "h2_sockpair+trace_nosec_test", "platforms": [ "windows", "linux", @@ -22321,7 +22555,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_nosec_test", + "name": "h2_sockpair+trace_nosec_test", "platforms": [ "windows", "linux", @@ -22342,7 +22576,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_nosec_test", + "name": "h2_sockpair+trace_nosec_test", "platforms": [ "windows", "linux", @@ -22363,7 +22597,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_nosec_test", + "name": "h2_sockpair+trace_nosec_test", "platforms": [ "windows", "linux", @@ -22384,7 +22618,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_nosec_test", + "name": "h2_sockpair+trace_nosec_test", "platforms": [ "windows", "linux", @@ -22405,7 +22639,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_nosec_test", + "name": "h2_sockpair+trace_nosec_test", "platforms": [ "windows", "linux", @@ -22426,7 +22660,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_nosec_test", + "name": "h2_sockpair+trace_nosec_test", "platforms": [ "windows", "linux", @@ -22447,7 +22681,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_nosec_test", + "name": "h2_sockpair+trace_nosec_test", "platforms": [ "windows", "linux", @@ -22468,28 +22702,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_nosec_test", - "platforms": [ - "windows", - "linux", - "mac", - "posix" - ] - }, - { - "args": [ - "hpack_size" - ], - "ci_platforms": [ - "windows", - "linux", - "posix" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_1byte_nosec_test", + "name": "h2_sockpair+trace_nosec_test", "platforms": [ "windows", "linux", @@ -22510,7 +22723,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_nosec_test", + "name": "h2_sockpair+trace_nosec_test", "platforms": [ "windows", "linux", @@ -22531,7 +22744,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_nosec_test", + "name": "h2_sockpair+trace_nosec_test", "platforms": [ "windows", "linux", @@ -22552,7 +22765,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_nosec_test", + "name": "h2_sockpair+trace_nosec_test", "platforms": [ "windows", "linux", @@ -22573,7 +22786,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_nosec_test", + "name": "h2_sockpair+trace_nosec_test", "platforms": [ "windows", "linux", @@ -22594,7 +22807,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_nosec_test", + "name": "h2_sockpair+trace_nosec_test", "platforms": [ "windows", "linux", @@ -22615,7 +22828,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_nosec_test", + "name": "h2_sockpair+trace_nosec_test", "platforms": [ "windows", "linux", @@ -22636,7 +22849,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_nosec_test", + "name": "h2_sockpair+trace_nosec_test", "platforms": [ "windows", "linux", @@ -22657,7 +22870,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_nosec_test", + "name": "h2_sockpair+trace_nosec_test", "platforms": [ "windows", "linux", @@ -22678,7 +22891,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_nosec_test", + "name": "h2_sockpair+trace_nosec_test", "platforms": [ "windows", "linux", @@ -22699,7 +22912,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_nosec_test", + "name": "h2_sockpair+trace_nosec_test", "platforms": [ "windows", "linux", @@ -22720,7 +22933,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_nosec_test", + "name": "h2_sockpair+trace_nosec_test", "platforms": [ "windows", "linux", @@ -22741,7 +22954,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_nosec_test", + "name": "h2_sockpair+trace_nosec_test", "platforms": [ "windows", "linux", @@ -22762,7 +22975,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_nosec_test", + "name": "h2_sockpair+trace_nosec_test", "platforms": [ "windows", "linux", @@ -22783,7 +22996,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_nosec_test", + "name": "h2_sockpair+trace_nosec_test", "platforms": [ "windows", "linux", @@ -22804,7 +23017,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_nosec_test", + "name": "h2_sockpair+trace_nosec_test", "platforms": [ "windows", "linux", @@ -22825,7 +23038,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_nosec_test", + "name": "h2_sockpair+trace_nosec_test", "platforms": [ "windows", "linux", @@ -22846,7 +23059,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_nosec_test", + "name": "h2_sockpair+trace_nosec_test", "platforms": [ "windows", "linux", @@ -22861,14 +23074,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_nosec_test", + "name": "h2_sockpair_1byte_nosec_test", "platforms": [ "windows", "linux", @@ -22883,14 +23095,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_nosec_test", + "name": "h2_sockpair_1byte_nosec_test", "platforms": [ "windows", "linux", @@ -22905,14 +23116,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_nosec_test", + "name": "h2_sockpair_1byte_nosec_test", "platforms": [ "windows", "linux", @@ -22927,14 +23137,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_nosec_test", + "name": "h2_sockpair_1byte_nosec_test", "platforms": [ "windows", "linux", @@ -22949,14 +23158,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_nosec_test", + "name": "h2_sockpair_1byte_nosec_test", "platforms": [ "windows", "linux", @@ -22971,14 +23179,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_nosec_test", + "name": "h2_sockpair_1byte_nosec_test", "platforms": [ "windows", "linux", @@ -22993,14 +23200,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_nosec_test", + "name": "h2_sockpair_1byte_nosec_test", "platforms": [ "windows", "linux", @@ -23015,14 +23221,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_nosec_test", + "name": "h2_sockpair_1byte_nosec_test", "platforms": [ "windows", "linux", @@ -23037,14 +23242,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_nosec_test", + "name": "h2_sockpair_1byte_nosec_test", "platforms": [ "windows", "linux", @@ -23059,14 +23263,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_nosec_test", + "name": "h2_sockpair_1byte_nosec_test", "platforms": [ "windows", "linux", @@ -23081,14 +23284,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_nosec_test", + "name": "h2_sockpair_1byte_nosec_test", "platforms": [ "windows", "linux", @@ -23103,14 +23305,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_nosec_test", + "name": "h2_sockpair_1byte_nosec_test", "platforms": [ "windows", "linux", @@ -23125,14 +23326,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_nosec_test", + "name": "h2_sockpair_1byte_nosec_test", "platforms": [ "windows", "linux", @@ -23147,14 +23347,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_nosec_test", + "name": "h2_sockpair_1byte_nosec_test", "platforms": [ "windows", "linux", @@ -23169,14 +23368,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_nosec_test", + "name": "h2_sockpair_1byte_nosec_test", "platforms": [ "windows", "linux", @@ -23191,14 +23389,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_nosec_test", + "name": "h2_sockpair_1byte_nosec_test", "platforms": [ "windows", "linux", @@ -23213,14 +23410,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_nosec_test", + "name": "h2_sockpair_1byte_nosec_test", "platforms": [ "windows", "linux", @@ -23235,14 +23431,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_nosec_test", + "name": "h2_sockpair_1byte_nosec_test", "platforms": [ "windows", "linux", @@ -23257,14 +23452,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_nosec_test", + "name": "h2_sockpair_1byte_nosec_test", "platforms": [ "windows", "linux", @@ -23279,14 +23473,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_nosec_test", + "name": "h2_sockpair_1byte_nosec_test", "platforms": [ "windows", "linux", @@ -23301,14 +23494,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_nosec_test", + "name": "h2_sockpair_1byte_nosec_test", "platforms": [ "windows", "linux", @@ -23323,14 +23515,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_nosec_test", + "name": "h2_sockpair_1byte_nosec_test", "platforms": [ "windows", "linux", @@ -23345,14 +23536,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_nosec_test", + "name": "h2_sockpair_1byte_nosec_test", "platforms": [ "windows", "linux", @@ -23367,14 +23557,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_nosec_test", + "name": "h2_sockpair_1byte_nosec_test", "platforms": [ "windows", "linux", @@ -23389,14 +23578,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_nosec_test", + "name": "h2_sockpair_1byte_nosec_test", "platforms": [ "windows", "linux", @@ -23411,14 +23599,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_nosec_test", + "name": "h2_sockpair_1byte_nosec_test", "platforms": [ "windows", "linux", @@ -23433,14 +23620,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_nosec_test", + "name": "h2_sockpair_1byte_nosec_test", "platforms": [ "windows", "linux", @@ -23455,14 +23641,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_nosec_test", + "name": "h2_sockpair_1byte_nosec_test", "platforms": [ "windows", "linux", @@ -23477,14 +23662,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_nosec_test", + "name": "h2_sockpair_1byte_nosec_test", "platforms": [ "windows", "linux", @@ -23499,14 +23683,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_nosec_test", + "name": "h2_sockpair_1byte_nosec_test", "platforms": [ "windows", "linux", diff --git a/vsprojects/buildtests_c.sln b/vsprojects/buildtests_c.sln index 413ed3e3f38..96dc4eb1074 100644 --- a/vsprojects/buildtests_c.sln +++ b/vsprojects/buildtests_c.sln @@ -100,7 +100,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "end2end_tests", "vcxproj\te lib = "True" EndProjectSection ProjectSection(ProjectDependencies) = postProject - {80EA2691-C037-6DD3-D3AB-21510BF0E64B} = {80EA2691-C037-6DD3-D3AB-21510BF0E64B} {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} = {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} @@ -118,11 +117,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "end2end_nosec_tests", "vcxp {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} EndProjectSection EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "end2end_certs", "vcxproj\test/end2end\end2end_certs\end2end_certs.vcxproj", "{80EA2691-C037-6DD3-D3AB-21510BF0E64B}" - ProjectSection(myProperties) = preProject - lib = "True" - EndProjectSection -EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "alarm_test", "vcxproj\test\alarm_test\alarm_test.vcxproj", "{AFD362D7-0E2A-E700-1F27-9D90F76166DF}" ProjectSection(myProperties) = preProject lib = "False" @@ -340,6 +334,15 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gpr_avl_test", "vcxproj\tes {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} EndProjectSection EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gpr_backoff_test", "vcxproj\test\gpr_backoff_test\gpr_backoff_test.vcxproj", "{889F570D-E046-BD52-9E4C-B4CD13DFE2DB}" + ProjectSection(myProperties) = preProject + lib = "False" + EndProjectSection + ProjectSection(ProjectDependencies) = postProject + {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} + {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} + EndProjectSection +EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gpr_cmdline_test", "vcxproj\test\gpr_cmdline_test\gpr_cmdline_test.vcxproj", "{10668A5D-65CD-F530-22D0-747B395B4C26}" ProjectSection(myProperties) = preProject lib = "False" @@ -660,7 +663,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "hpack_table_test", "vcxproj {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} EndProjectSection EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "httpcli_format_request_test", "vcxproj\test\httpcli_format_request_test\httpcli_format_request_test.vcxproj", "{A43C3292-CAE7-1B8C-A5FD-52D9E3DCFD82}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "http_parser_test", "vcxproj\test\http_parser_test\http_parser_test.vcxproj", "{49D7E690-BDA1-5236-1ABF-3D81C1559DF7}" ProjectSection(myProperties) = preProject lib = "False" EndProjectSection @@ -671,7 +674,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "httpcli_format_request_test {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} EndProjectSection EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "httpcli_parser_test", "vcxproj\test\httpcli_parser_test\httpcli_parser_test.vcxproj", "{B6F60D1C-D4F3-0F1A-4A2F-9134629B7848}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "httpcli_format_request_test", "vcxproj\test\httpcli_format_request_test\httpcli_format_request_test.vcxproj", "{A43C3292-CAE7-1B8C-A5FD-52D9E3DCFD82}" ProjectSection(myProperties) = preProject lib = "False" EndProjectSection @@ -1100,7 +1103,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "h2_census_test", "vcxproj\t EndProjectSection ProjectSection(ProjectDependencies) = postProject {1F1F9084-2A93-B80E-364F-5754894AFAB4} = {1F1F9084-2A93-B80E-364F-5754894AFAB4} - {80EA2691-C037-6DD3-D3AB-21510BF0E64B} = {80EA2691-C037-6DD3-D3AB-21510BF0E64B} {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} = {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} @@ -1113,7 +1115,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "h2_compress_test", "vcxproj EndProjectSection ProjectSection(ProjectDependencies) = postProject {1F1F9084-2A93-B80E-364F-5754894AFAB4} = {1F1F9084-2A93-B80E-364F-5754894AFAB4} - {80EA2691-C037-6DD3-D3AB-21510BF0E64B} = {80EA2691-C037-6DD3-D3AB-21510BF0E64B} {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} = {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} @@ -1126,7 +1127,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "h2_fakesec_test", "vcxproj\ EndProjectSection ProjectSection(ProjectDependencies) = postProject {1F1F9084-2A93-B80E-364F-5754894AFAB4} = {1F1F9084-2A93-B80E-364F-5754894AFAB4} - {80EA2691-C037-6DD3-D3AB-21510BF0E64B} = {80EA2691-C037-6DD3-D3AB-21510BF0E64B} {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} = {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} @@ -1139,111 +1139,102 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "h2_full_test", "vcxproj\tes EndProjectSection ProjectSection(ProjectDependencies) = postProject {1F1F9084-2A93-B80E-364F-5754894AFAB4} = {1F1F9084-2A93-B80E-364F-5754894AFAB4} - {80EA2691-C037-6DD3-D3AB-21510BF0E64B} = {80EA2691-C037-6DD3-D3AB-21510BF0E64B} {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} = {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} EndProjectSection EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "h2_oauth2_test", "vcxproj\test/end2end/fixtures\h2_oauth2_test\h2_oauth2_test.vcxproj", "{0F761FF3-342A-C429-711F-F76181BAA52D}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "h2_full+trace_test", "vcxproj\test/end2end/fixtures\h2_full+trace_test\h2_full+trace_test.vcxproj", "{16C713C6-062E-F71F-A44C-52DC35494B27}" ProjectSection(myProperties) = preProject lib = "False" EndProjectSection ProjectSection(ProjectDependencies) = postProject {1F1F9084-2A93-B80E-364F-5754894AFAB4} = {1F1F9084-2A93-B80E-364F-5754894AFAB4} - {80EA2691-C037-6DD3-D3AB-21510BF0E64B} = {80EA2691-C037-6DD3-D3AB-21510BF0E64B} {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} = {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} EndProjectSection EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "h2_proxy_test", "vcxproj\test/end2end/fixtures\h2_proxy_test\h2_proxy_test.vcxproj", "{5753B14F-0C69-2E56-6264-5541B2DCDF67}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "h2_oauth2_test", "vcxproj\test/end2end/fixtures\h2_oauth2_test\h2_oauth2_test.vcxproj", "{0F761FF3-342A-C429-711F-F76181BAA52D}" ProjectSection(myProperties) = preProject lib = "False" EndProjectSection ProjectSection(ProjectDependencies) = postProject {1F1F9084-2A93-B80E-364F-5754894AFAB4} = {1F1F9084-2A93-B80E-364F-5754894AFAB4} - {80EA2691-C037-6DD3-D3AB-21510BF0E64B} = {80EA2691-C037-6DD3-D3AB-21510BF0E64B} {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} = {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} EndProjectSection EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "h2_sockpair_test", "vcxproj\test/end2end/fixtures\h2_sockpair_test\h2_sockpair_test.vcxproj", "{67458AF8-A122-7740-F195-C2E74A106FAB}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "h2_proxy_test", "vcxproj\test/end2end/fixtures\h2_proxy_test\h2_proxy_test.vcxproj", "{5753B14F-0C69-2E56-6264-5541B2DCDF67}" ProjectSection(myProperties) = preProject lib = "False" EndProjectSection ProjectSection(ProjectDependencies) = postProject {1F1F9084-2A93-B80E-364F-5754894AFAB4} = {1F1F9084-2A93-B80E-364F-5754894AFAB4} - {80EA2691-C037-6DD3-D3AB-21510BF0E64B} = {80EA2691-C037-6DD3-D3AB-21510BF0E64B} {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} = {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} EndProjectSection EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "h2_sockpair+trace_test", "vcxproj\test/end2end/fixtures\h2_sockpair+trace_test\h2_sockpair+trace_test.vcxproj", "{82878169-5A89-FD1E-31A6-E9F07BB92418}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "h2_sockpair_test", "vcxproj\test/end2end/fixtures\h2_sockpair_test\h2_sockpair_test.vcxproj", "{67458AF8-A122-7740-F195-C2E74A106FAB}" ProjectSection(myProperties) = preProject lib = "False" EndProjectSection ProjectSection(ProjectDependencies) = postProject {1F1F9084-2A93-B80E-364F-5754894AFAB4} = {1F1F9084-2A93-B80E-364F-5754894AFAB4} - {80EA2691-C037-6DD3-D3AB-21510BF0E64B} = {80EA2691-C037-6DD3-D3AB-21510BF0E64B} {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} = {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} EndProjectSection EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "h2_sockpair_1byte_test", "vcxproj\test/end2end/fixtures\h2_sockpair_1byte_test\h2_sockpair_1byte_test.vcxproj", "{03A65361-E139-5344-1868-8E8FC269C6E6}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "h2_sockpair+trace_test", "vcxproj\test/end2end/fixtures\h2_sockpair+trace_test\h2_sockpair+trace_test.vcxproj", "{82878169-5A89-FD1E-31A6-E9F07BB92418}" ProjectSection(myProperties) = preProject lib = "False" EndProjectSection ProjectSection(ProjectDependencies) = postProject {1F1F9084-2A93-B80E-364F-5754894AFAB4} = {1F1F9084-2A93-B80E-364F-5754894AFAB4} - {80EA2691-C037-6DD3-D3AB-21510BF0E64B} = {80EA2691-C037-6DD3-D3AB-21510BF0E64B} {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} = {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} EndProjectSection EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "h2_ssl_test", "vcxproj\test/end2end/fixtures\h2_ssl_test\h2_ssl_test.vcxproj", "{EA78D290-4098-FF04-C647-013F6B81E4E7}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "h2_sockpair_1byte_test", "vcxproj\test/end2end/fixtures\h2_sockpair_1byte_test\h2_sockpair_1byte_test.vcxproj", "{03A65361-E139-5344-1868-8E8FC269C6E6}" ProjectSection(myProperties) = preProject lib = "False" EndProjectSection ProjectSection(ProjectDependencies) = postProject {1F1F9084-2A93-B80E-364F-5754894AFAB4} = {1F1F9084-2A93-B80E-364F-5754894AFAB4} - {80EA2691-C037-6DD3-D3AB-21510BF0E64B} = {80EA2691-C037-6DD3-D3AB-21510BF0E64B} {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} = {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} EndProjectSection EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "h2_ssl_proxy_test", "vcxproj\test/end2end/fixtures\h2_ssl_proxy_test\h2_ssl_proxy_test.vcxproj", "{A9092608-E45E-AC96-6533-A6E7DD98211D}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "h2_ssl_test", "vcxproj\test/end2end/fixtures\h2_ssl_test\h2_ssl_test.vcxproj", "{EA78D290-4098-FF04-C647-013F6B81E4E7}" ProjectSection(myProperties) = preProject lib = "False" EndProjectSection ProjectSection(ProjectDependencies) = postProject {1F1F9084-2A93-B80E-364F-5754894AFAB4} = {1F1F9084-2A93-B80E-364F-5754894AFAB4} - {80EA2691-C037-6DD3-D3AB-21510BF0E64B} = {80EA2691-C037-6DD3-D3AB-21510BF0E64B} {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} = {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} EndProjectSection EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "h2_uchannel_test", "vcxproj\test/end2end/fixtures\h2_uchannel_test\h2_uchannel_test.vcxproj", "{E39D59C4-F5CB-7D68-DA6B-C6BC93843435}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "h2_ssl_proxy_test", "vcxproj\test/end2end/fixtures\h2_ssl_proxy_test\h2_ssl_proxy_test.vcxproj", "{A9092608-E45E-AC96-6533-A6E7DD98211D}" ProjectSection(myProperties) = preProject lib = "False" EndProjectSection ProjectSection(ProjectDependencies) = postProject {1F1F9084-2A93-B80E-364F-5754894AFAB4} = {1F1F9084-2A93-B80E-364F-5754894AFAB4} - {80EA2691-C037-6DD3-D3AB-21510BF0E64B} = {80EA2691-C037-6DD3-D3AB-21510BF0E64B} {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} = {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} @@ -1286,7 +1277,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "h2_full_nosec_test", "vcxpr {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} EndProjectSection EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "h2_proxy_nosec_test", "vcxproj\test/end2end/fixtures\h2_proxy_nosec_test\h2_proxy_nosec_test.vcxproj", "{6EC72045-98CB-8A8D-9788-BC94209E23C8}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "h2_full+trace_nosec_test", "vcxproj\test/end2end/fixtures\h2_full+trace_nosec_test\h2_full+trace_nosec_test.vcxproj", "{DFD51943-4906-8051-7D66-6A7D50E0D87E}" ProjectSection(myProperties) = preProject lib = "False" EndProjectSection @@ -1298,7 +1289,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "h2_proxy_nosec_test", "vcxp {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} EndProjectSection EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "h2_sockpair_nosec_test", "vcxproj\test/end2end/fixtures\h2_sockpair_nosec_test\h2_sockpair_nosec_test.vcxproj", "{B3F26242-A43D-4F77-A84C-0F478741A061}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "h2_proxy_nosec_test", "vcxproj\test/end2end/fixtures\h2_proxy_nosec_test\h2_proxy_nosec_test.vcxproj", "{6EC72045-98CB-8A8D-9788-BC94209E23C8}" ProjectSection(myProperties) = preProject lib = "False" EndProjectSection @@ -1310,7 +1301,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "h2_sockpair_nosec_test", "v {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} EndProjectSection EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "h2_sockpair+trace_nosec_test", "vcxproj\test/end2end/fixtures\h2_sockpair+trace_nosec_test\h2_sockpair+trace_nosec_test.vcxproj", "{962380E0-1C06-8917-8F7F-1A02E0E93BE7}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "h2_sockpair_nosec_test", "vcxproj\test/end2end/fixtures\h2_sockpair_nosec_test\h2_sockpair_nosec_test.vcxproj", "{B3F26242-A43D-4F77-A84C-0F478741A061}" ProjectSection(myProperties) = preProject lib = "False" EndProjectSection @@ -1322,7 +1313,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "h2_sockpair+trace_nosec_tes {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} EndProjectSection EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "h2_sockpair_1byte_nosec_test", "vcxproj\test/end2end/fixtures\h2_sockpair_1byte_nosec_test\h2_sockpair_1byte_nosec_test.vcxproj", "{485E6713-487D-F274-BDE7-5D29300C93FE}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "h2_sockpair+trace_nosec_test", "vcxproj\test/end2end/fixtures\h2_sockpair+trace_nosec_test\h2_sockpair+trace_nosec_test.vcxproj", "{962380E0-1C06-8917-8F7F-1A02E0E93BE7}" ProjectSection(myProperties) = preProject lib = "False" EndProjectSection @@ -1334,7 +1325,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "h2_sockpair_1byte_nosec_tes {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} EndProjectSection EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "h2_uchannel_nosec_test", "vcxproj\test/end2end/fixtures\h2_uchannel_nosec_test\h2_uchannel_nosec_test.vcxproj", "{BD79A629-4181-DB5E-C28F-44EB280A6F91}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "h2_sockpair_1byte_nosec_test", "vcxproj\test/end2end/fixtures\h2_sockpair_1byte_nosec_test\h2_sockpair_1byte_nosec_test.vcxproj", "{485E6713-487D-F274-BDE7-5D29300C93FE}" ProjectSection(myProperties) = preProject lib = "False" EndProjectSection @@ -1550,22 +1541,6 @@ Global {47C2CB41-4E9F-58B6-F606-F6FAED5D00ED}.Release-DLL|Win32.Build.0 = Release|Win32 {47C2CB41-4E9F-58B6-F606-F6FAED5D00ED}.Release-DLL|x64.ActiveCfg = Release|x64 {47C2CB41-4E9F-58B6-F606-F6FAED5D00ED}.Release-DLL|x64.Build.0 = Release|x64 - {80EA2691-C037-6DD3-D3AB-21510BF0E64B}.Debug|Win32.ActiveCfg = Debug|Win32 - {80EA2691-C037-6DD3-D3AB-21510BF0E64B}.Debug|x64.ActiveCfg = Debug|x64 - {80EA2691-C037-6DD3-D3AB-21510BF0E64B}.Release|Win32.ActiveCfg = Release|Win32 - {80EA2691-C037-6DD3-D3AB-21510BF0E64B}.Release|x64.ActiveCfg = Release|x64 - {80EA2691-C037-6DD3-D3AB-21510BF0E64B}.Debug|Win32.Build.0 = Debug|Win32 - {80EA2691-C037-6DD3-D3AB-21510BF0E64B}.Debug|x64.Build.0 = Debug|x64 - {80EA2691-C037-6DD3-D3AB-21510BF0E64B}.Release|Win32.Build.0 = Release|Win32 - {80EA2691-C037-6DD3-D3AB-21510BF0E64B}.Release|x64.Build.0 = Release|x64 - {80EA2691-C037-6DD3-D3AB-21510BF0E64B}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {80EA2691-C037-6DD3-D3AB-21510BF0E64B}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {80EA2691-C037-6DD3-D3AB-21510BF0E64B}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {80EA2691-C037-6DD3-D3AB-21510BF0E64B}.Debug-DLL|x64.Build.0 = Debug|x64 - {80EA2691-C037-6DD3-D3AB-21510BF0E64B}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {80EA2691-C037-6DD3-D3AB-21510BF0E64B}.Release-DLL|Win32.Build.0 = Release|Win32 - {80EA2691-C037-6DD3-D3AB-21510BF0E64B}.Release-DLL|x64.ActiveCfg = Release|x64 - {80EA2691-C037-6DD3-D3AB-21510BF0E64B}.Release-DLL|x64.Build.0 = Release|x64 {AFD362D7-0E2A-E700-1F27-9D90F76166DF}.Debug|Win32.ActiveCfg = Debug|Win32 {AFD362D7-0E2A-E700-1F27-9D90F76166DF}.Debug|x64.ActiveCfg = Debug|x64 {AFD362D7-0E2A-E700-1F27-9D90F76166DF}.Release|Win32.ActiveCfg = Release|Win32 @@ -1902,6 +1877,22 @@ Global {144D8CFF-2737-A18A-DCFD-01603533D63F}.Release-DLL|Win32.Build.0 = Release|Win32 {144D8CFF-2737-A18A-DCFD-01603533D63F}.Release-DLL|x64.ActiveCfg = Release|x64 {144D8CFF-2737-A18A-DCFD-01603533D63F}.Release-DLL|x64.Build.0 = Release|x64 + {889F570D-E046-BD52-9E4C-B4CD13DFE2DB}.Debug|Win32.ActiveCfg = Debug|Win32 + {889F570D-E046-BD52-9E4C-B4CD13DFE2DB}.Debug|x64.ActiveCfg = Debug|x64 + {889F570D-E046-BD52-9E4C-B4CD13DFE2DB}.Release|Win32.ActiveCfg = Release|Win32 + {889F570D-E046-BD52-9E4C-B4CD13DFE2DB}.Release|x64.ActiveCfg = Release|x64 + {889F570D-E046-BD52-9E4C-B4CD13DFE2DB}.Debug|Win32.Build.0 = Debug|Win32 + {889F570D-E046-BD52-9E4C-B4CD13DFE2DB}.Debug|x64.Build.0 = Debug|x64 + {889F570D-E046-BD52-9E4C-B4CD13DFE2DB}.Release|Win32.Build.0 = Release|Win32 + {889F570D-E046-BD52-9E4C-B4CD13DFE2DB}.Release|x64.Build.0 = Release|x64 + {889F570D-E046-BD52-9E4C-B4CD13DFE2DB}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 + {889F570D-E046-BD52-9E4C-B4CD13DFE2DB}.Debug-DLL|Win32.Build.0 = Debug|Win32 + {889F570D-E046-BD52-9E4C-B4CD13DFE2DB}.Debug-DLL|x64.ActiveCfg = Debug|x64 + {889F570D-E046-BD52-9E4C-B4CD13DFE2DB}.Debug-DLL|x64.Build.0 = Debug|x64 + {889F570D-E046-BD52-9E4C-B4CD13DFE2DB}.Release-DLL|Win32.ActiveCfg = Release|Win32 + {889F570D-E046-BD52-9E4C-B4CD13DFE2DB}.Release-DLL|Win32.Build.0 = Release|Win32 + {889F570D-E046-BD52-9E4C-B4CD13DFE2DB}.Release-DLL|x64.ActiveCfg = Release|x64 + {889F570D-E046-BD52-9E4C-B4CD13DFE2DB}.Release-DLL|x64.Build.0 = Release|x64 {10668A5D-65CD-F530-22D0-747B395B4C26}.Debug|Win32.ActiveCfg = Debug|Win32 {10668A5D-65CD-F530-22D0-747B395B4C26}.Debug|x64.ActiveCfg = Debug|x64 {10668A5D-65CD-F530-22D0-747B395B4C26}.Release|Win32.ActiveCfg = Release|Win32 @@ -2414,6 +2405,22 @@ Global {FF2CEE6D-850F-E22C-53A0-8C5912B14B20}.Release-DLL|Win32.Build.0 = Release|Win32 {FF2CEE6D-850F-E22C-53A0-8C5912B14B20}.Release-DLL|x64.ActiveCfg = Release|x64 {FF2CEE6D-850F-E22C-53A0-8C5912B14B20}.Release-DLL|x64.Build.0 = Release|x64 + {49D7E690-BDA1-5236-1ABF-3D81C1559DF7}.Debug|Win32.ActiveCfg = Debug|Win32 + {49D7E690-BDA1-5236-1ABF-3D81C1559DF7}.Debug|x64.ActiveCfg = Debug|x64 + {49D7E690-BDA1-5236-1ABF-3D81C1559DF7}.Release|Win32.ActiveCfg = Release|Win32 + {49D7E690-BDA1-5236-1ABF-3D81C1559DF7}.Release|x64.ActiveCfg = Release|x64 + {49D7E690-BDA1-5236-1ABF-3D81C1559DF7}.Debug|Win32.Build.0 = Debug|Win32 + {49D7E690-BDA1-5236-1ABF-3D81C1559DF7}.Debug|x64.Build.0 = Debug|x64 + {49D7E690-BDA1-5236-1ABF-3D81C1559DF7}.Release|Win32.Build.0 = Release|Win32 + {49D7E690-BDA1-5236-1ABF-3D81C1559DF7}.Release|x64.Build.0 = Release|x64 + {49D7E690-BDA1-5236-1ABF-3D81C1559DF7}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 + {49D7E690-BDA1-5236-1ABF-3D81C1559DF7}.Debug-DLL|Win32.Build.0 = Debug|Win32 + {49D7E690-BDA1-5236-1ABF-3D81C1559DF7}.Debug-DLL|x64.ActiveCfg = Debug|x64 + {49D7E690-BDA1-5236-1ABF-3D81C1559DF7}.Debug-DLL|x64.Build.0 = Debug|x64 + {49D7E690-BDA1-5236-1ABF-3D81C1559DF7}.Release-DLL|Win32.ActiveCfg = Release|Win32 + {49D7E690-BDA1-5236-1ABF-3D81C1559DF7}.Release-DLL|Win32.Build.0 = Release|Win32 + {49D7E690-BDA1-5236-1ABF-3D81C1559DF7}.Release-DLL|x64.ActiveCfg = Release|x64 + {49D7E690-BDA1-5236-1ABF-3D81C1559DF7}.Release-DLL|x64.Build.0 = Release|x64 {A43C3292-CAE7-1B8C-A5FD-52D9E3DCFD82}.Debug|Win32.ActiveCfg = Debug|Win32 {A43C3292-CAE7-1B8C-A5FD-52D9E3DCFD82}.Debug|x64.ActiveCfg = Debug|x64 {A43C3292-CAE7-1B8C-A5FD-52D9E3DCFD82}.Release|Win32.ActiveCfg = Release|Win32 @@ -2430,22 +2437,6 @@ Global {A43C3292-CAE7-1B8C-A5FD-52D9E3DCFD82}.Release-DLL|Win32.Build.0 = Release|Win32 {A43C3292-CAE7-1B8C-A5FD-52D9E3DCFD82}.Release-DLL|x64.ActiveCfg = Release|x64 {A43C3292-CAE7-1B8C-A5FD-52D9E3DCFD82}.Release-DLL|x64.Build.0 = Release|x64 - {B6F60D1C-D4F3-0F1A-4A2F-9134629B7848}.Debug|Win32.ActiveCfg = Debug|Win32 - {B6F60D1C-D4F3-0F1A-4A2F-9134629B7848}.Debug|x64.ActiveCfg = Debug|x64 - {B6F60D1C-D4F3-0F1A-4A2F-9134629B7848}.Release|Win32.ActiveCfg = Release|Win32 - {B6F60D1C-D4F3-0F1A-4A2F-9134629B7848}.Release|x64.ActiveCfg = Release|x64 - {B6F60D1C-D4F3-0F1A-4A2F-9134629B7848}.Debug|Win32.Build.0 = Debug|Win32 - {B6F60D1C-D4F3-0F1A-4A2F-9134629B7848}.Debug|x64.Build.0 = Debug|x64 - {B6F60D1C-D4F3-0F1A-4A2F-9134629B7848}.Release|Win32.Build.0 = Release|Win32 - {B6F60D1C-D4F3-0F1A-4A2F-9134629B7848}.Release|x64.Build.0 = Release|x64 - {B6F60D1C-D4F3-0F1A-4A2F-9134629B7848}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {B6F60D1C-D4F3-0F1A-4A2F-9134629B7848}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {B6F60D1C-D4F3-0F1A-4A2F-9134629B7848}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {B6F60D1C-D4F3-0F1A-4A2F-9134629B7848}.Debug-DLL|x64.Build.0 = Debug|x64 - {B6F60D1C-D4F3-0F1A-4A2F-9134629B7848}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {B6F60D1C-D4F3-0F1A-4A2F-9134629B7848}.Release-DLL|Win32.Build.0 = Release|Win32 - {B6F60D1C-D4F3-0F1A-4A2F-9134629B7848}.Release-DLL|x64.ActiveCfg = Release|x64 - {B6F60D1C-D4F3-0F1A-4A2F-9134629B7848}.Release-DLL|x64.Build.0 = Release|x64 {117CA7AD-C42B-9217-6C95-42A801777BC5}.Debug|Win32.ActiveCfg = Debug|Win32 {117CA7AD-C42B-9217-6C95-42A801777BC5}.Debug|x64.ActiveCfg = Debug|x64 {117CA7AD-C42B-9217-6C95-42A801777BC5}.Release|Win32.ActiveCfg = Release|Win32 @@ -3102,6 +3093,22 @@ Global {EEBEFA75-C625-C823-FE96-9AD64887B57D}.Release-DLL|Win32.Build.0 = Release|Win32 {EEBEFA75-C625-C823-FE96-9AD64887B57D}.Release-DLL|x64.ActiveCfg = Release|x64 {EEBEFA75-C625-C823-FE96-9AD64887B57D}.Release-DLL|x64.Build.0 = Release|x64 + {16C713C6-062E-F71F-A44C-52DC35494B27}.Debug|Win32.ActiveCfg = Debug|Win32 + {16C713C6-062E-F71F-A44C-52DC35494B27}.Debug|x64.ActiveCfg = Debug|x64 + {16C713C6-062E-F71F-A44C-52DC35494B27}.Release|Win32.ActiveCfg = Release|Win32 + {16C713C6-062E-F71F-A44C-52DC35494B27}.Release|x64.ActiveCfg = Release|x64 + {16C713C6-062E-F71F-A44C-52DC35494B27}.Debug|Win32.Build.0 = Debug|Win32 + {16C713C6-062E-F71F-A44C-52DC35494B27}.Debug|x64.Build.0 = Debug|x64 + {16C713C6-062E-F71F-A44C-52DC35494B27}.Release|Win32.Build.0 = Release|Win32 + {16C713C6-062E-F71F-A44C-52DC35494B27}.Release|x64.Build.0 = Release|x64 + {16C713C6-062E-F71F-A44C-52DC35494B27}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 + {16C713C6-062E-F71F-A44C-52DC35494B27}.Debug-DLL|Win32.Build.0 = Debug|Win32 + {16C713C6-062E-F71F-A44C-52DC35494B27}.Debug-DLL|x64.ActiveCfg = Debug|x64 + {16C713C6-062E-F71F-A44C-52DC35494B27}.Debug-DLL|x64.Build.0 = Debug|x64 + {16C713C6-062E-F71F-A44C-52DC35494B27}.Release-DLL|Win32.ActiveCfg = Release|Win32 + {16C713C6-062E-F71F-A44C-52DC35494B27}.Release-DLL|Win32.Build.0 = Release|Win32 + {16C713C6-062E-F71F-A44C-52DC35494B27}.Release-DLL|x64.ActiveCfg = Release|x64 + {16C713C6-062E-F71F-A44C-52DC35494B27}.Release-DLL|x64.Build.0 = Release|x64 {0F761FF3-342A-C429-711F-F76181BAA52D}.Debug|Win32.ActiveCfg = Debug|Win32 {0F761FF3-342A-C429-711F-F76181BAA52D}.Debug|x64.ActiveCfg = Debug|x64 {0F761FF3-342A-C429-711F-F76181BAA52D}.Release|Win32.ActiveCfg = Release|Win32 @@ -3214,22 +3221,6 @@ Global {A9092608-E45E-AC96-6533-A6E7DD98211D}.Release-DLL|Win32.Build.0 = Release|Win32 {A9092608-E45E-AC96-6533-A6E7DD98211D}.Release-DLL|x64.ActiveCfg = Release|x64 {A9092608-E45E-AC96-6533-A6E7DD98211D}.Release-DLL|x64.Build.0 = Release|x64 - {E39D59C4-F5CB-7D68-DA6B-C6BC93843435}.Debug|Win32.ActiveCfg = Debug|Win32 - {E39D59C4-F5CB-7D68-DA6B-C6BC93843435}.Debug|x64.ActiveCfg = Debug|x64 - {E39D59C4-F5CB-7D68-DA6B-C6BC93843435}.Release|Win32.ActiveCfg = Release|Win32 - {E39D59C4-F5CB-7D68-DA6B-C6BC93843435}.Release|x64.ActiveCfg = Release|x64 - {E39D59C4-F5CB-7D68-DA6B-C6BC93843435}.Debug|Win32.Build.0 = Debug|Win32 - {E39D59C4-F5CB-7D68-DA6B-C6BC93843435}.Debug|x64.Build.0 = Debug|x64 - {E39D59C4-F5CB-7D68-DA6B-C6BC93843435}.Release|Win32.Build.0 = Release|Win32 - {E39D59C4-F5CB-7D68-DA6B-C6BC93843435}.Release|x64.Build.0 = Release|x64 - {E39D59C4-F5CB-7D68-DA6B-C6BC93843435}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {E39D59C4-F5CB-7D68-DA6B-C6BC93843435}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {E39D59C4-F5CB-7D68-DA6B-C6BC93843435}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {E39D59C4-F5CB-7D68-DA6B-C6BC93843435}.Debug-DLL|x64.Build.0 = Debug|x64 - {E39D59C4-F5CB-7D68-DA6B-C6BC93843435}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {E39D59C4-F5CB-7D68-DA6B-C6BC93843435}.Release-DLL|Win32.Build.0 = Release|Win32 - {E39D59C4-F5CB-7D68-DA6B-C6BC93843435}.Release-DLL|x64.ActiveCfg = Release|x64 - {E39D59C4-F5CB-7D68-DA6B-C6BC93843435}.Release-DLL|x64.Build.0 = Release|x64 {A8039D43-910E-4248-2A22-74366E8C4DCD}.Debug|Win32.ActiveCfg = Debug|Win32 {A8039D43-910E-4248-2A22-74366E8C4DCD}.Debug|x64.ActiveCfg = Debug|x64 {A8039D43-910E-4248-2A22-74366E8C4DCD}.Release|Win32.ActiveCfg = Release|Win32 @@ -3278,6 +3269,22 @@ Global {345EA50E-BCD4-DAC7-E1C8-DDA6291B75E2}.Release-DLL|Win32.Build.0 = Release|Win32 {345EA50E-BCD4-DAC7-E1C8-DDA6291B75E2}.Release-DLL|x64.ActiveCfg = Release|x64 {345EA50E-BCD4-DAC7-E1C8-DDA6291B75E2}.Release-DLL|x64.Build.0 = Release|x64 + {DFD51943-4906-8051-7D66-6A7D50E0D87E}.Debug|Win32.ActiveCfg = Debug|Win32 + {DFD51943-4906-8051-7D66-6A7D50E0D87E}.Debug|x64.ActiveCfg = Debug|x64 + {DFD51943-4906-8051-7D66-6A7D50E0D87E}.Release|Win32.ActiveCfg = Release|Win32 + {DFD51943-4906-8051-7D66-6A7D50E0D87E}.Release|x64.ActiveCfg = Release|x64 + {DFD51943-4906-8051-7D66-6A7D50E0D87E}.Debug|Win32.Build.0 = Debug|Win32 + {DFD51943-4906-8051-7D66-6A7D50E0D87E}.Debug|x64.Build.0 = Debug|x64 + {DFD51943-4906-8051-7D66-6A7D50E0D87E}.Release|Win32.Build.0 = Release|Win32 + {DFD51943-4906-8051-7D66-6A7D50E0D87E}.Release|x64.Build.0 = Release|x64 + {DFD51943-4906-8051-7D66-6A7D50E0D87E}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 + {DFD51943-4906-8051-7D66-6A7D50E0D87E}.Debug-DLL|Win32.Build.0 = Debug|Win32 + {DFD51943-4906-8051-7D66-6A7D50E0D87E}.Debug-DLL|x64.ActiveCfg = Debug|x64 + {DFD51943-4906-8051-7D66-6A7D50E0D87E}.Debug-DLL|x64.Build.0 = Debug|x64 + {DFD51943-4906-8051-7D66-6A7D50E0D87E}.Release-DLL|Win32.ActiveCfg = Release|Win32 + {DFD51943-4906-8051-7D66-6A7D50E0D87E}.Release-DLL|Win32.Build.0 = Release|Win32 + {DFD51943-4906-8051-7D66-6A7D50E0D87E}.Release-DLL|x64.ActiveCfg = Release|x64 + {DFD51943-4906-8051-7D66-6A7D50E0D87E}.Release-DLL|x64.Build.0 = Release|x64 {6EC72045-98CB-8A8D-9788-BC94209E23C8}.Debug|Win32.ActiveCfg = Debug|Win32 {6EC72045-98CB-8A8D-9788-BC94209E23C8}.Debug|x64.ActiveCfg = Debug|x64 {6EC72045-98CB-8A8D-9788-BC94209E23C8}.Release|Win32.ActiveCfg = Release|Win32 @@ -3342,22 +3349,6 @@ Global {485E6713-487D-F274-BDE7-5D29300C93FE}.Release-DLL|Win32.Build.0 = Release|Win32 {485E6713-487D-F274-BDE7-5D29300C93FE}.Release-DLL|x64.ActiveCfg = Release|x64 {485E6713-487D-F274-BDE7-5D29300C93FE}.Release-DLL|x64.Build.0 = Release|x64 - {BD79A629-4181-DB5E-C28F-44EB280A6F91}.Debug|Win32.ActiveCfg = Debug|Win32 - {BD79A629-4181-DB5E-C28F-44EB280A6F91}.Debug|x64.ActiveCfg = Debug|x64 - {BD79A629-4181-DB5E-C28F-44EB280A6F91}.Release|Win32.ActiveCfg = Release|Win32 - {BD79A629-4181-DB5E-C28F-44EB280A6F91}.Release|x64.ActiveCfg = Release|x64 - {BD79A629-4181-DB5E-C28F-44EB280A6F91}.Debug|Win32.Build.0 = Debug|Win32 - {BD79A629-4181-DB5E-C28F-44EB280A6F91}.Debug|x64.Build.0 = Debug|x64 - {BD79A629-4181-DB5E-C28F-44EB280A6F91}.Release|Win32.Build.0 = Release|Win32 - {BD79A629-4181-DB5E-C28F-44EB280A6F91}.Release|x64.Build.0 = Release|x64 - {BD79A629-4181-DB5E-C28F-44EB280A6F91}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {BD79A629-4181-DB5E-C28F-44EB280A6F91}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {BD79A629-4181-DB5E-C28F-44EB280A6F91}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {BD79A629-4181-DB5E-C28F-44EB280A6F91}.Debug-DLL|x64.Build.0 = Debug|x64 - {BD79A629-4181-DB5E-C28F-44EB280A6F91}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {BD79A629-4181-DB5E-C28F-44EB280A6F91}.Release-DLL|Win32.Build.0 = Release|Win32 - {BD79A629-4181-DB5E-C28F-44EB280A6F91}.Release-DLL|x64.ActiveCfg = Release|x64 - {BD79A629-4181-DB5E-C28F-44EB280A6F91}.Release-DLL|x64.Build.0 = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/vsprojects/grpc.sln b/vsprojects/grpc.sln index 3f6b3379728..851bca0d1c1 100644 --- a/vsprojects/grpc.sln +++ b/vsprojects/grpc.sln @@ -92,6 +92,11 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc++", "vcxproj\.\grpc++\ {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} EndProjectSection EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc++_codegen_lib", "vcxproj\.\grpc++_codegen_lib\grpc++_codegen_lib.vcxproj", "{AAC6AF12-94C8-4A3C-A1BF-DAA4738F4500}" + ProjectSection(myProperties) = preProject + lib = "True" + EndProjectSection +EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc++_unsecure", "vcxproj\.\grpc++_unsecure\grpc++_unsecure.vcxproj", "{6EE56155-DF7C-4F6E-BFC4-F6F776BEB211}" ProjectSection(myProperties) = preProject lib = "True" @@ -341,6 +346,22 @@ Global {C187A093-A0FE-489D-A40A-6E33DE0F9FEB}.Release-DLL|Win32.Build.0 = Release-DLL|Win32 {C187A093-A0FE-489D-A40A-6E33DE0F9FEB}.Release-DLL|x64.ActiveCfg = Release-DLL|x64 {C187A093-A0FE-489D-A40A-6E33DE0F9FEB}.Release-DLL|x64.Build.0 = Release-DLL|x64 + {AAC6AF12-94C8-4A3C-A1BF-DAA4738F4500}.Debug|Win32.ActiveCfg = Debug|Win32 + {AAC6AF12-94C8-4A3C-A1BF-DAA4738F4500}.Debug|x64.ActiveCfg = Debug|x64 + {AAC6AF12-94C8-4A3C-A1BF-DAA4738F4500}.Release|Win32.ActiveCfg = Release|Win32 + {AAC6AF12-94C8-4A3C-A1BF-DAA4738F4500}.Release|x64.ActiveCfg = Release|x64 + {AAC6AF12-94C8-4A3C-A1BF-DAA4738F4500}.Debug|Win32.Build.0 = Debug|Win32 + {AAC6AF12-94C8-4A3C-A1BF-DAA4738F4500}.Debug|x64.Build.0 = Debug|x64 + {AAC6AF12-94C8-4A3C-A1BF-DAA4738F4500}.Release|Win32.Build.0 = Release|Win32 + {AAC6AF12-94C8-4A3C-A1BF-DAA4738F4500}.Release|x64.Build.0 = Release|x64 + {AAC6AF12-94C8-4A3C-A1BF-DAA4738F4500}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 + {AAC6AF12-94C8-4A3C-A1BF-DAA4738F4500}.Debug-DLL|Win32.Build.0 = Debug|Win32 + {AAC6AF12-94C8-4A3C-A1BF-DAA4738F4500}.Debug-DLL|x64.ActiveCfg = Debug|x64 + {AAC6AF12-94C8-4A3C-A1BF-DAA4738F4500}.Debug-DLL|x64.Build.0 = Debug|x64 + {AAC6AF12-94C8-4A3C-A1BF-DAA4738F4500}.Release-DLL|Win32.ActiveCfg = Release|Win32 + {AAC6AF12-94C8-4A3C-A1BF-DAA4738F4500}.Release-DLL|Win32.Build.0 = Release|Win32 + {AAC6AF12-94C8-4A3C-A1BF-DAA4738F4500}.Release-DLL|x64.ActiveCfg = Release|x64 + {AAC6AF12-94C8-4A3C-A1BF-DAA4738F4500}.Release-DLL|x64.Build.0 = Release|x64 {6EE56155-DF7C-4F6E-BFC4-F6F776BEB211}.Debug|Win32.ActiveCfg = Debug|Win32 {6EE56155-DF7C-4F6E-BFC4-F6F776BEB211}.Debug|x64.ActiveCfg = Debug|x64 {6EE56155-DF7C-4F6E-BFC4-F6F776BEB211}.Release|Win32.ActiveCfg = Release|Win32 diff --git a/vsprojects/grpc_protoc_plugins.sln b/vsprojects/grpc_protoc_plugins.sln index ef1cbb8e572..444cb268d09 100644 --- a/vsprojects/grpc_protoc_plugins.sln +++ b/vsprojects/grpc_protoc_plugins.sln @@ -3,10 +3,18 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 2013 VisualStudioVersion = 12.0.21005.1 MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc_codegen_lib", "vcxproj\.\grpc_codegen_lib\grpc_codegen_lib.vcxproj", "{A828FD72-44CE-4EA5-8966-6E4624458D58}" + ProjectSection(myProperties) = preProject + lib = "True" + EndProjectSection +EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc_plugin_support", "vcxproj\.\grpc_plugin_support\grpc_plugin_support.vcxproj", "{B6E81D84-2ACB-41B8-8781-493A944C7817}" ProjectSection(myProperties) = preProject lib = "True" EndProjectSection + ProjectSection(ProjectDependencies) = postProject + {AAC6AF12-94C8-4A3C-A1BF-DAA4738F4500} = {AAC6AF12-94C8-4A3C-A1BF-DAA4738F4500} + EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc_cpp_plugin", "vcxproj\.\grpc_cpp_plugin\grpc_cpp_plugin.vcxproj", "{7E51A25F-AC59-488F-906C-C60FAAE706AA}" ProjectSection(myProperties) = preProject @@ -56,6 +64,14 @@ Global Release|x64 = Release|x64 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution + {A828FD72-44CE-4EA5-8966-6E4624458D58}.Debug|Win32.ActiveCfg = Debug|Win32 + {A828FD72-44CE-4EA5-8966-6E4624458D58}.Debug|x64.ActiveCfg = Debug|x64 + {A828FD72-44CE-4EA5-8966-6E4624458D58}.Release|Win32.ActiveCfg = Release|Win32 + {A828FD72-44CE-4EA5-8966-6E4624458D58}.Release|x64.ActiveCfg = Release|x64 + {A828FD72-44CE-4EA5-8966-6E4624458D58}.Debug|Win32.Build.0 = Debug|Win32 + {A828FD72-44CE-4EA5-8966-6E4624458D58}.Debug|x64.Build.0 = Debug|x64 + {A828FD72-44CE-4EA5-8966-6E4624458D58}.Release|Win32.Build.0 = Release|Win32 + {A828FD72-44CE-4EA5-8966-6E4624458D58}.Release|x64.Build.0 = Release|x64 {B6E81D84-2ACB-41B8-8781-493A944C7817}.Debug|Win32.ActiveCfg = Debug|Win32 {B6E81D84-2ACB-41B8-8781-493A944C7817}.Debug|x64.ActiveCfg = Debug|x64 {B6E81D84-2ACB-41B8-8781-493A944C7817}.Release|Win32.ActiveCfg = Release|Win32 diff --git a/vsprojects/vcxproj/gpr/gpr.vcxproj b/vsprojects/vcxproj/gpr/gpr.vcxproj index dae8e623d82..870246cbe18 100644 --- a/vsprojects/vcxproj/gpr/gpr.vcxproj +++ b/vsprojects/vcxproj/gpr/gpr.vcxproj @@ -147,6 +147,20 @@ + + + + + + + + + + + + + + @@ -175,120 +189,109 @@ - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + - + + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + diff --git a/vsprojects/vcxproj/gpr/gpr.vcxproj.filters b/vsprojects/vcxproj/gpr/gpr.vcxproj.filters index 055b29f6480..b932420d98b 100644 --- a/vsprojects/vcxproj/gpr/gpr.vcxproj.filters +++ b/vsprojects/vcxproj/gpr/gpr.vcxproj.filters @@ -1,137 +1,182 @@ - - src\core\profiling + + src\core\lib\profiling - - src\core\profiling + + src\core\lib\profiling - - src\core\support + + src\core\lib\support - - src\core\support + + src\core\lib\support - - src\core\support + + src\core\lib\support - - src\core\support + + src\core\lib\support - - src\core\support + + src\core\lib\support - - src\core\support + + src\core\lib\support - - src\core\support + + src\core\lib\support - - src\core\support + + src\core\lib\support - - src\core\support + + src\core\lib\support - - src\core\support + + src\core\lib\support - - src\core\support + + src\core\lib\support - - src\core\support + + src\core\lib\support - - src\core\support + + src\core\lib\support - - src\core\support + + src\core\lib\support - - src\core\support + + src\core\lib\support - - src\core\support + + src\core\lib\support - - src\core\support + + src\core\lib\support - - src\core\support + + src\core\lib\support - - src\core\support + + src\core\lib\support - - src\core\support + + src\core\lib\support - - src\core\support + + src\core\lib\support - - src\core\support + + src\core\lib\support - - src\core\support + + src\core\lib\support - - src\core\support + + src\core\lib\support - - src\core\support + + src\core\lib\support - - src\core\support + + src\core\lib\support - - src\core\support + + src\core\lib\support - - src\core\support + + src\core\lib\support - - src\core\support + + src\core\lib\support - - src\core\support + + src\core\lib\support - - src\core\support + + src\core\lib\support - - src\core\support + + src\core\lib\support - - src\core\support + + src\core\lib\support - - src\core\support + + src\core\lib\support - - src\core\support + + src\core\lib\support - - src\core\support + + src\core\lib\support - - src\core\support + + src\core\lib\support - - src\core\support + + src\core\lib\support - - src\core\support + + src\core\lib\support - - src\core\support + + src\core\lib\support - - src\core\support + + src\core\lib\support + + + src\core\lib\support + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + include\grpc\support @@ -216,82 +261,43 @@ include\grpc\support - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - src\core\profiling + + src\core\lib\profiling - - src\core\support + + src\core\lib\support - - src\core\support + + src\core\lib\support - - src\core\support + + src\core\lib\support - - src\core\support + + src\core\lib\support - - src\core\support + + src\core\lib\support - - src\core\support + + src\core\lib\support - - src\core\support + + src\core\lib\support - - src\core\support + + src\core\lib\support - - src\core\support + + src\core\lib\support - - src\core\support + + src\core\lib\support + + + src\core\lib\support @@ -317,11 +323,14 @@ {c5e1baa7-de77-beb1-9675-942261648f79} - - {93b7086c-8c8a-6bbf-fb14-1f166bf0146a} + + {52037bcb-5719-a548-224d-834fbe569045} + + + {ba38d79d-d5de-a89e-9ca2-c5235a03ca7f} - - {bb116f2a-ea2a-c233-82da-0c54e3cbfec1} + + {a4812158-7fba-959e-4e09-50167fe38df8}
diff --git a/vsprojects/vcxproj/grpc++/grpc++.vcxproj b/vsprojects/vcxproj/grpc++/grpc++.vcxproj index 0b8c3451969..2c644215def 100644 --- a/vsprojects/vcxproj/grpc++/grpc++.vcxproj +++ b/vsprojects/vcxproj/grpc++/grpc++.vcxproj @@ -268,6 +268,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -302,59 +333,18 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + - - - - - - - - - - - - @@ -369,15 +359,25 @@ - + + + + + + + - + + + + + @@ -387,6 +387,8 @@ + + @@ -405,8 +407,6 @@ - - diff --git a/vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters b/vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters index 0f3dccf17c5..35468ea34c5 100644 --- a/vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters +++ b/vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters @@ -1,24 +1,6 @@ - - src\cpp\client - - - src\cpp\common - - - src\cpp\common - - - src\cpp\common - - - src\cpp\common - - - src\cpp\server - src\cpp\client @@ -40,7 +22,13 @@ src\cpp\client - + + src\cpp\client + + + src\cpp\codegen + + src\cpp\common @@ -49,11 +37,20 @@ src\cpp\common + + src\cpp\common + src\cpp\common - - src\cpp\proto + + src\cpp\common + + + src\cpp\common + + + src\cpp\common src\cpp\server @@ -67,6 +64,9 @@ src\cpp\server + + src\cpp\server + src\cpp\server @@ -94,9 +94,6 @@ src\cpp\util - - src\cpp\codegen - @@ -129,6 +126,99 @@ include\grpc++\impl + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen\security + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + include\grpc++\impl @@ -231,116 +321,29 @@ include\grpc++\support - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen\security - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - + + src\cpp\client + src\cpp\client - + src\cpp\common - - src\cpp\server - - - src\cpp\client - src\cpp\common + + src\cpp\common + src\cpp\server + + src\cpp\server + src\cpp\server @@ -386,9 +389,6 @@ {2336e396-7e0b-8bf9-3b09-adc6ad1f0e5b} - - {c22e8b9b-d2eb-a2e8-0cb8-3f7e3c902a7b} - {321b0980-74ad-e8ca-f23b-deffa5d6bb8f} diff --git a/vsprojects/vcxproj/grpc++_codegen_lib/grpc++_codegen_lib.vcxproj b/vsprojects/vcxproj/grpc++_codegen_lib/grpc++_codegen_lib.vcxproj new file mode 100644 index 00000000000..fa56d2a0995 --- /dev/null +++ b/vsprojects/vcxproj/grpc++_codegen_lib/grpc++_codegen_lib.vcxproj @@ -0,0 +1,215 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {AAC6AF12-94C8-4A3C-A1BF-DAA4738F4500} + true + $(SolutionDir)IntDir\$(MSBuildProjectName)\ + + + + v100 + + + v110 + + + v120 + + + v140 + + + StaticLibrary + true + Unicode + + + StaticLibrary + false + true + Unicode + + + + + + + + + + + + grpc++_codegen_lib + + + grpc++_codegen_lib + + + + NotUsing + Level3 + Disabled + WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) + true + MultiThreadedDebug + true + None + false + + + Windows + true + false + + + + + + NotUsing + Level3 + Disabled + WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) + true + MultiThreadedDebug + true + None + false + + + Windows + true + false + + + + + + NotUsing + Level3 + MaxSpeed + WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) + true + true + true + MultiThreaded + true + None + false + + + Windows + true + false + true + true + + + + + + NotUsing + Level3 + MaxSpeed + WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) + true + true + true + MultiThreaded + true + None + false + + + Windows + true + false + true + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + + + + diff --git a/vsprojects/vcxproj/grpc++_codegen_lib/grpc++_codegen_lib.vcxproj.filters b/vsprojects/vcxproj/grpc++_codegen_lib/grpc++_codegen_lib.vcxproj.filters new file mode 100644 index 00000000000..3259e98707f --- /dev/null +++ b/vsprojects/vcxproj/grpc++_codegen_lib/grpc++_codegen_lib.vcxproj.filters @@ -0,0 +1,200 @@ + + + + + src\cpp\codegen + + + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen\security + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + + + + {cf409044-341b-37b5-03f3-0b09c3c474c4} + + + {cddccffd-da89-18ad-da57-0c9d704a4633} + + + {cb8cb5ad-cf23-a491-046c-1c0688be53ac} + + + {a734ff7f-2489-0c04-3fc6-35e361240cf1} + + + {ffc473f2-ece4-fedf-238f-f161e5c3d5e7} + + + {89065a9e-e4a0-e5e4-32e9-51cd4cadab46} + + + {45ab28cb-74e7-1a53-77c1-bbf2ec383fa2} + + + {311586c5-1a08-e1ba-8dd8-d1cbe10156b3} + + + {e9bdb195-1cf9-a0f4-231c-fcee59eb54ca} + + + {d2e57ea3-c758-0f7c-3bc9-e71dd87bd654} + + + {f93ade18-7c50-7ed9-b8e7-383b11f077c2} + + + + diff --git a/vsprojects/vcxproj/grpc++_test_util/grpc++_test_util.vcxproj b/vsprojects/vcxproj/grpc++_test_util/grpc++_test_util.vcxproj index 33860af620b..0b4498f22e9 100644 --- a/vsprojects/vcxproj/grpc++_test_util/grpc++_test_util.vcxproj +++ b/vsprojects/vcxproj/grpc++_test_util/grpc++_test_util.vcxproj @@ -156,13 +156,13 @@ - + - + - + - + @@ -172,13 +172,13 @@ - + - + - + - + diff --git a/vsprojects/vcxproj/grpc++_test_util/grpc++_test_util.vcxproj.filters b/vsprojects/vcxproj/grpc++_test_util/grpc++_test_util.vcxproj.filters index b35ba1fd91c..3a16c657470 100644 --- a/vsprojects/vcxproj/grpc++_test_util/grpc++_test_util.vcxproj.filters +++ b/vsprojects/vcxproj/grpc++_test_util/grpc++_test_util.vcxproj.filters @@ -1,14 +1,14 @@ - - src\proto\grpc\testing + + src\proto\grpc\testing\duplicate src\proto\grpc\testing - - src\proto\grpc\testing\duplicate + + src\proto\grpc\testing test\cpp\end2end diff --git a/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj b/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj index 2dcadbaec0c..7455e88b282 100644 --- a/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj +++ b/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj @@ -268,6 +268,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -302,46 +333,15 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - @@ -356,15 +356,17 @@ - + - + - + + + @@ -392,8 +394,6 @@ - - diff --git a/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj.filters b/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj.filters index 3572c651b6d..dda90b10948 100644 --- a/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj.filters +++ b/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj.filters @@ -1,9 +1,6 @@ - - src\cpp\common - src\cpp\client @@ -25,8 +22,8 @@ src\cpp\client - - src\cpp\common + + src\cpp\codegen src\cpp\common @@ -34,11 +31,14 @@ src\cpp\common - + src\cpp\common - - src\cpp\proto + + src\cpp\common + + + src\cpp\common src\cpp\server @@ -79,9 +79,6 @@ src\cpp\util - - src\cpp\codegen - @@ -114,6 +111,99 @@ include\grpc++\impl + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen\security + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + include\grpc++\impl @@ -216,101 +306,14 @@ include\grpc++\support - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen\security - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - src\cpp\client + + src\cpp\common + src\cpp\common @@ -362,9 +365,6 @@ {ed8e4daa-825f-fbe5-2a45-846ad9165d3d} - - {10b51a99-2e57-249e-ce23-3ab8c6b99ffb} - {8a54a279-d14b-4237-0df3-1ffe1ef5a7af} diff --git a/vsprojects/vcxproj/grpc/grpc.vcxproj b/vsprojects/vcxproj/grpc/grpc.vcxproj index c2635c31a3d..c20f8d70708 100644 --- a/vsprojects/vcxproj/grpc/grpc.vcxproj +++ b/vsprojects/vcxproj/grpc/grpc.vcxproj @@ -267,6 +267,11 @@ + + + + + @@ -274,465 +279,473 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + diff --git a/vsprojects/vcxproj/grpc/grpc.vcxproj.filters b/vsprojects/vcxproj/grpc/grpc.vcxproj.filters index 6dd10d3dd34..f03b20703f7 100644 --- a/vsprojects/vcxproj/grpc/grpc.vcxproj.filters +++ b/vsprojects/vcxproj/grpc/grpc.vcxproj.filters @@ -1,476 +1,488 @@ - - src\core\census + + src\core\ext\transport\chttp2\client\insecure - - src\core\census + + src\core\ext\transport\chttp2\client\secure - - src\core\channel + + src\core\ext\transport\chttp2\server\insecure - - src\core\channel + + src\core\ext\transport\chttp2\server\secure - - src\core\channel + + src\core\ext\transport\chttp2\transport - - src\core\channel + + src\core\ext\transport\chttp2\transport - - src\core\channel + + src\core\ext\transport\chttp2\transport - - src\core\channel + + src\core\ext\transport\chttp2\transport - - src\core\channel + + src\core\ext\transport\chttp2\transport - - src\core\channel + + src\core\ext\transport\chttp2\transport - - src\core\channel + + src\core\ext\transport\chttp2\transport - - src\core\client_config + + src\core\ext\transport\chttp2\transport - - src\core\client_config + + src\core\ext\transport\chttp2\transport - - src\core\client_config + + src\core\ext\transport\chttp2\transport - - src\core\client_config + + src\core\ext\transport\chttp2\transport - - src\core\client_config\lb_policies + + src\core\ext\transport\chttp2\transport - - src\core\client_config\lb_policies + + src\core\ext\transport\chttp2\transport - - src\core\client_config\lb_policies + + src\core\ext\transport\chttp2\transport - - src\core\client_config + + src\core\ext\transport\chttp2\transport - - src\core\client_config + + src\core\ext\transport\chttp2\transport - - src\core\client_config + + src\core\ext\transport\chttp2\transport - - src\core\client_config + + src\core\ext\transport\chttp2\transport - - src\core\client_config + + src\core\ext\transport\chttp2\transport - - src\core\client_config + + src\core\ext\transport\chttp2\transport - - src\core\client_config\resolvers + + src\core\ext\transport\chttp2\transport - - src\core\client_config\resolvers + + src\core\lib\census - - src\core\client_config + + src\core\lib\census - - src\core\client_config + + src\core\lib\census - - src\core\client_config + + src\core\lib\census - - src\core\client_config + + src\core\lib\census - - src\core\compression + + src\core\lib\census - - src\core\compression + + src\core\lib\census - - src\core\debug + + src\core\lib\census - - src\core\httpcli + + src\core\lib\census - - src\core\httpcli + + src\core\lib\channel - - src\core\httpcli + + src\core\lib\channel - - src\core\iomgr + + src\core\lib\channel - - src\core\iomgr + + src\core\lib\channel - - src\core\iomgr + + src\core\lib\channel - - src\core\iomgr + + src\core\lib\channel - - src\core\iomgr + + src\core\lib\channel - - src\core\iomgr + + src\core\lib\channel - - src\core\iomgr + + src\core\lib\channel - - src\core\iomgr + + src\core\lib\client_config - - src\core\iomgr + + src\core\lib\client_config - - src\core\iomgr + + src\core\lib\client_config - - src\core\iomgr + + src\core\lib\client_config - - src\core\iomgr + + src\core\lib\client_config\lb_policies - - src\core\iomgr + + src\core\lib\client_config\lb_policies - - src\core\iomgr + + src\core\lib\client_config\lb_policies - - src\core\iomgr + + src\core\lib\client_config - - src\core\iomgr + + src\core\lib\client_config - - src\core\iomgr + + src\core\lib\client_config - - src\core\iomgr + + src\core\lib\client_config - - src\core\iomgr + + src\core\lib\client_config - - src\core\iomgr + + src\core\lib\client_config - - src\core\iomgr + + src\core\lib\client_config\resolvers - - src\core\iomgr + + src\core\lib\client_config\resolvers - - src\core\iomgr + + src\core\lib\client_config - - src\core\iomgr + + src\core\lib\client_config - - src\core\iomgr + + src\core\lib\client_config - - src\core\iomgr + + src\core\lib\client_config - - src\core\iomgr + + src\core\lib\compression - - src\core\iomgr + + src\core\lib\compression - - src\core\iomgr + + src\core\lib\debug - - src\core\iomgr + + src\core\lib\http - - src\core\iomgr + + src\core\lib\http - - src\core\iomgr + + src\core\lib\http - - src\core\iomgr + + src\core\lib\http - - src\core\iomgr + + src\core\lib\iomgr - - src\core\iomgr + + src\core\lib\iomgr - - src\core\iomgr + + src\core\lib\iomgr - - src\core\iomgr + + src\core\lib\iomgr - - src\core\iomgr + + src\core\lib\iomgr - - src\core\iomgr + + src\core\lib\iomgr - - src\core\iomgr + + src\core\lib\iomgr - - src\core\json + + src\core\lib\iomgr - - src\core\json + + src\core\lib\iomgr - - src\core\json + + src\core\lib\iomgr - - src\core\json + + src\core\lib\iomgr - - src\core\proto\grpc\lb\v0 + + src\core\lib\iomgr - - src\core\surface + + src\core\lib\iomgr - - src\core\surface + + src\core\lib\iomgr - - src\core\surface + + src\core\lib\iomgr - - src\core\surface + + src\core\lib\iomgr - - src\core\surface + + src\core\lib\iomgr - - src\core\surface + + src\core\lib\iomgr - - src\core\surface + + src\core\lib\iomgr - - src\core\surface + + src\core\lib\iomgr - - src\core\surface + + src\core\lib\iomgr - - src\core\surface + + src\core\lib\iomgr - - src\core\surface + + src\core\lib\iomgr - - src\core\surface + + src\core\lib\iomgr - - src\core\surface + + src\core\lib\iomgr - - src\core\surface + + src\core\lib\iomgr - - src\core\surface + + src\core\lib\iomgr - - src\core\surface + + src\core\lib\iomgr - - src\core\surface + + src\core\lib\iomgr - - src\core\surface + + src\core\lib\iomgr - - src\core\surface + + src\core\lib\iomgr - - src\core\surface + + src\core\lib\iomgr - - src\core\surface + + src\core\lib\iomgr - - src\core\transport + + src\core\lib\iomgr - - src\core\transport\chttp2 + + src\core\lib\iomgr - - src\core\transport\chttp2 + + src\core\lib\iomgr - - src\core\transport\chttp2 + + src\core\lib\iomgr - - src\core\transport\chttp2 + + src\core\lib\iomgr - - src\core\transport\chttp2 + + src\core\lib\iomgr - - src\core\transport\chttp2 + + src\core\lib\iomgr - - src\core\transport\chttp2 + + src\core\lib\iomgr - - src\core\transport\chttp2 + + src\core\lib\iomgr - - src\core\transport\chttp2 + + src\core\lib\json - - src\core\transport\chttp2 + + src\core\lib\json - - src\core\transport\chttp2 + + src\core\lib\json - - src\core\transport\chttp2 + + src\core\lib\json - - src\core\transport\chttp2 + + src\core\lib\proto\grpc\lb\v0 - - src\core\transport\chttp2 + + src\core\lib\security - - src\core\transport\chttp2 + + src\core\lib\security - - src\core\transport\chttp2 + + src\core\lib\security - - src\core\transport\chttp2 + + src\core\lib\security - - src\core\transport\chttp2 + + src\core\lib\security - - src\core\transport\chttp2 + + src\core\lib\security - - src\core\transport\chttp2 + + src\core\lib\security - - src\core\transport + + src\core\lib\security - - src\core\transport + + src\core\lib\security - - src\core\transport + + src\core\lib\security - - src\core\transport + + src\core\lib\security - - src\core\transport + + src\core\lib\security - - src\core\transport + + src\core\lib\security - - src\core\transport + + src\core\lib\security - - src\core\httpcli + + src\core\lib\surface - - src\core\security + + src\core\lib\surface - - src\core\security + + src\core\lib\surface - - src\core\security + + src\core\lib\surface - - src\core\security + + src\core\lib\surface - - src\core\security + + src\core\lib\surface - - src\core\security + + src\core\lib\surface - - src\core\security + + src\core\lib\surface - - src\core\security + + src\core\lib\surface - - src\core\security + + src\core\lib\surface - - src\core\security + + src\core\lib\surface - - src\core\security + + src\core\lib\surface - - src\core\security + + src\core\lib\surface - - src\core\security + + src\core\lib\surface - - src\core\security + + src\core\lib\surface - - src\core\security + + src\core\lib\surface - - src\core\surface + + src\core\lib\surface - - src\core\surface + + src\core\lib\surface - - src\core\tsi + + src\core\lib\surface - - src\core\tsi + + src\core\lib\surface - - src\core\tsi + + src\core\lib\surface - - src\core\census + + src\core\lib\transport - - src\core\census + + src\core\lib\transport - - src\core\census + + src\core\lib\transport - - src\core\census + + src\core\lib\transport - - src\core\census + + src\core\lib\transport - - src\core\census + + src\core\lib\transport + + + src\core\lib\transport + + + src\core\lib\tsi + + + src\core\lib\tsi + + + src\core\lib\tsi third_party\nanopb @@ -483,6 +495,21 @@ + + include\grpc + + + include\grpc + + + include\grpc + + + include\grpc + + + include\grpc + include\grpc @@ -504,421 +531,421 @@ include\grpc\impl\codegen - + include\grpc - - include\grpc + + + + src\core\ext\transport\chttp2\transport - - include\grpc + + src\core\ext\transport\chttp2\transport - - include\grpc + + src\core\ext\transport\chttp2\transport - - include\grpc + + src\core\ext\transport\chttp2\transport - - include\grpc + + src\core\ext\transport\chttp2\transport - - - - src\core\census + + src\core\ext\transport\chttp2\transport - - src\core\channel + + src\core\ext\transport\chttp2\transport - - src\core\channel + + src\core\ext\transport\chttp2\transport - - src\core\channel + + src\core\ext\transport\chttp2\transport - - src\core\channel + + src\core\ext\transport\chttp2\transport - - src\core\channel + + src\core\ext\transport\chttp2\transport - - src\core\channel + + src\core\ext\transport\chttp2\transport - - src\core\channel + + src\core\ext\transport\chttp2\transport - - src\core\channel + + src\core\ext\transport\chttp2\transport - - src\core\channel + + src\core\ext\transport\chttp2\transport - - src\core\channel + + src\core\ext\transport\chttp2\transport - - src\core\client_config + + src\core\ext\transport\chttp2\transport - - src\core\client_config + + src\core\ext\transport\chttp2\transport - - src\core\client_config + + src\core\ext\transport\chttp2\transport - - src\core\client_config\lb_policies + + src\core\ext\transport\chttp2\transport - - src\core\client_config\lb_policies + + src\core\ext\transport\chttp2\transport - - src\core\client_config\lb_policies + + src\core\lib\census - - src\core\client_config + + src\core\lib\census - - src\core\client_config + + src\core\lib\census - - src\core\client_config + + src\core\lib\census - - src\core\client_config + + src\core\lib\census - - src\core\client_config + + src\core\lib\channel - - src\core\client_config + + src\core\lib\channel - - src\core\client_config\resolvers + + src\core\lib\channel - - src\core\client_config\resolvers + + src\core\lib\channel - - src\core\client_config + + src\core\lib\channel - - src\core\client_config + + src\core\lib\channel - - src\core\client_config + + src\core\lib\channel - - src\core\client_config + + src\core\lib\channel - - src\core\compression + + src\core\lib\channel - - src\core\compression + + src\core\lib\channel - - src\core\debug + + src\core\lib\client_config - - src\core\httpcli + + src\core\lib\client_config - - src\core\httpcli + + src\core\lib\client_config - - src\core\httpcli + + src\core\lib\client_config\lb_policies - - src\core\iomgr + + src\core\lib\client_config\lb_policies - - src\core\iomgr + + src\core\lib\client_config\lb_policies - - src\core\iomgr + + src\core\lib\client_config - - src\core\iomgr + + src\core\lib\client_config - - src\core\iomgr + + src\core\lib\client_config - - src\core\iomgr + + src\core\lib\client_config - - src\core\iomgr + + src\core\lib\client_config - - src\core\iomgr + + src\core\lib\client_config - - src\core\iomgr + + src\core\lib\client_config\resolvers - - src\core\iomgr + + src\core\lib\client_config\resolvers - - src\core\iomgr + + src\core\lib\client_config - - src\core\iomgr + + src\core\lib\client_config - - src\core\iomgr + + src\core\lib\client_config - - src\core\iomgr + + src\core\lib\client_config - - src\core\iomgr + + src\core\lib\compression - - src\core\iomgr + + src\core\lib\compression - - src\core\iomgr + + src\core\lib\debug - - src\core\iomgr + + src\core\lib\http - - src\core\iomgr + + src\core\lib\http - - src\core\iomgr + + src\core\lib\http - - src\core\iomgr + + src\core\lib\iomgr - - src\core\iomgr + + src\core\lib\iomgr - - src\core\iomgr + + src\core\lib\iomgr - - src\core\iomgr + + src\core\lib\iomgr - - src\core\iomgr + + src\core\lib\iomgr - - src\core\iomgr + + src\core\lib\iomgr - - src\core\iomgr + + src\core\lib\iomgr - - src\core\iomgr + + src\core\lib\iomgr - - src\core\iomgr + + src\core\lib\iomgr - - src\core\iomgr + + src\core\lib\iomgr - - src\core\iomgr + + src\core\lib\iomgr - - src\core\iomgr + + src\core\lib\iomgr - - src\core\iomgr + + src\core\lib\iomgr - - src\core\iomgr + + src\core\lib\iomgr - - src\core\iomgr + + src\core\lib\iomgr - - src\core\iomgr + + src\core\lib\iomgr - - src\core\json + + src\core\lib\iomgr - - src\core\json + + src\core\lib\iomgr - - src\core\json + + src\core\lib\iomgr - - src\core\json + + src\core\lib\iomgr - - src\core\proto\grpc\lb\v0 + + src\core\lib\iomgr - - src\core\statistics + + src\core\lib\iomgr - - src\core\statistics + + src\core\lib\iomgr - - src\core\surface + + src\core\lib\iomgr - - src\core\surface + + src\core\lib\iomgr - - src\core\surface + + src\core\lib\iomgr - - src\core\surface + + src\core\lib\iomgr - - src\core\surface + + src\core\lib\iomgr - - src\core\surface + + src\core\lib\iomgr - - src\core\surface + + src\core\lib\iomgr - - src\core\surface + + src\core\lib\iomgr - - src\core\surface + + src\core\lib\iomgr - - src\core\transport + + src\core\lib\iomgr - - src\core\transport\chttp2 + + src\core\lib\iomgr - - src\core\transport\chttp2 + + src\core\lib\iomgr - - src\core\transport\chttp2 + + src\core\lib\iomgr - - src\core\transport\chttp2 + + src\core\lib\iomgr - - src\core\transport\chttp2 + + src\core\lib\json - - src\core\transport\chttp2 + + src\core\lib\json - - src\core\transport\chttp2 + + src\core\lib\json - - src\core\transport\chttp2 + + src\core\lib\json - - src\core\transport\chttp2 + + src\core\lib\proto\grpc\lb\v0 - - src\core\transport\chttp2 + + src\core\lib\security - - src\core\transport\chttp2 + + src\core\lib\security - - src\core\transport\chttp2 + + src\core\lib\security - - src\core\transport\chttp2 + + src\core\lib\security - - src\core\transport\chttp2 + + src\core\lib\security - - src\core\transport\chttp2 + + src\core\lib\security - - src\core\transport\chttp2 + + src\core\lib\security - - src\core\transport\chttp2 + + src\core\lib\security - - src\core\transport\chttp2 + + src\core\lib\security - - src\core\transport\chttp2 + + src\core\lib\statistics - - src\core\transport\chttp2 + + src\core\lib\statistics - - src\core\transport + + src\core\lib\surface - - src\core\transport + + src\core\lib\surface - - src\core\transport + + src\core\lib\surface - - src\core\transport + + src\core\lib\surface - - src\core\transport + + src\core\lib\surface - - src\core\transport + + src\core\lib\surface - - src\core\transport + + src\core\lib\surface - - src\core\security + + src\core\lib\surface - - src\core\security + + src\core\lib\surface - - src\core\security + + src\core\lib\surface - - src\core\security + + src\core\lib\surface - - src\core\security + + src\core\lib\surface - - src\core\security + + src\core\lib\transport - - src\core\security + + src\core\lib\transport - - src\core\security + + src\core\lib\transport - - src\core\security + + src\core\lib\transport - - src\core\tsi + + src\core\lib\transport - - src\core\tsi + + src\core\lib\transport - - src\core\tsi + + src\core\lib\transport - - src\core\tsi + + src\core\lib\tsi - - src\core\tsi + + src\core\lib\tsi - - src\core\census + + src\core\lib\tsi - - src\core\census + + src\core\lib\tsi - - src\core\census + + src\core\lib\tsi third_party\nanopb @@ -953,65 +980,95 @@ {ea745680-21ea-9c5e-679b-64dc40562d08} - - {fb3aefc2-8205-b0bf-525f-ab5e339f7f76} + + {3f32a58f-394f-5f13-06aa-6cc52cc2daaf} + + + {e3abfd0a-064e-0f2f-c8e8-7c5a7e98142a} + + + {ac42667b-bbba-3571-20bc-7a4240ef26ca} + + + {dbffebe0-eebb-577d-1860-ef6837f4cf50} + + + {4e699b02-fae4-dabd-afd2-2e41b05bef0e} + + + {e98ed28e-8dc5-3bb4-22a2-8893831a0ab8} + + + {1d36fe16-b004-6bee-c661-328234bbb469} + + + {e8539863-6029-cca4-44a9-5481cacf8144} + + + {0afa539f-8c83-d4b9-cdea-550091f09638} + + + {6f34254e-e69f-c9b4-156d-5024bade5408} + + + {5b2ded3f-84a5-f6b4-2060-286c7d1dc945} - - {d897b6c3-c555-234e-a589-b4f008063615} + + {f4108884-98c3-ac2e-c669-83cd41343975} - - {e71e6928-b1e3-0616-0961-1505370458ab} + + {1931b044-90f3-cd68-b5f8-23be77ca8efc} - - {a3eca4d5-f760-61a6-7251-556b828c8b44} + + {2f3260de-be57-d18d-6882-61d115baa159} - - {6d97b8d9-2c15-927a-892a-709d073c02ab} + + {118d2bb5-086f-54f3-11de-26d7d7f73f9d} - - {263cb913-dfe6-42a4-096b-cac231f76305} + + {b9d8db6c-2c68-1c90-fe5e-37da90f47ae6} - - {1da7ef8a-a06d-5499-b3de-19fee4a4214d} + + {dadf7fe9-3f15-d431-e4f6-f987b090536c} - - {a9bc00ad-835f-c625-c6d9-6a1324f98b9f} + + {19122742-9b92-5b67-9fb9-e552ac62ca5d} - - {1baf3894-af37-e647-bdbc-95dc17ed0073} + + {dab8f03a-73de-8cfa-88fb-6e04402efb54} - - {e665cc0e-b994-d7c5-cc18-2007392019f0} + + {5468ba38-b8a3-85b1-216f-48a2364e18df} - - {1ff04466-0905-8a5d-d6f4-7ff2df4c13b5} + + {cb2b0073-f2a7-5c63-d182-8874b24bdf36} - - {7c7ad0b3-bf85-5bd3-e0c8-4f5468a8e2e6} + + {b4b19f9a-1575-8a21-0bca-537746f858b7} - - {3d533dad-8100-e8a3-b7c3-1fc13a4d60da} + + {cbc8ce67-4a97-d533-8dc3-f949c63e2771} - - {0ffcf868-7617-5fed-b6ce-2162d9d09148} + + {933530ae-447b-ea8d-3531-98f0556960b0} - - {1d850ac6-e639-4eab-5338-4ba40272fcc9} + + {c33f944f-37d4-42fd-abc3-61f0d4400462} - - {0ef49896-2313-4a3f-1ce2-716fa0e5c6ca} + + {c4661d64-349f-01c1-1ba8-0602f9047595} - - {aeb18e82-5d25-0aad-8b02-a0a3470073ce} + + {4dc3c48b-e931-ed47-ffa2-b4ea3a7956ec} - - {168fa1b1-1c18-eb55-9a4d-746bc58df2c1} + + {a21971fb-304f-da08-b1b2-7bd8df8ac373} - - {b8b623c3-a168-a2b1-0d5f-b70a1f1cd8d2} + + {e9d0d3fc-c100-f3e6-89b8-649f241155bf} - - {0b0f9ab1-efa4-7f03-e446-6fb9b5227e84} + + {95ad2811-c8d0-7a42-2a73-baf03fcbf699} {aaab30a4-2a15-732e-c141-3fbc0f0f5a7a} diff --git a/vsprojects/vcxproj/grpc_codegen_lib/grpc_codegen_lib.vcxproj b/vsprojects/vcxproj/grpc_codegen_lib/grpc_codegen_lib.vcxproj new file mode 100644 index 00000000000..7d7a60915f7 --- /dev/null +++ b/vsprojects/vcxproj/grpc_codegen_lib/grpc_codegen_lib.vcxproj @@ -0,0 +1,184 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {A828FD72-44CE-4EA5-8966-6E4624458D58} + true + $(SolutionDir)IntDir\$(MSBuildProjectName)\ + + + + v100 + + + v110 + + + v120 + + + v140 + + + StaticLibrary + true + Unicode + + + StaticLibrary + false + true + Unicode + + + + + + + + + + + + grpc_codegen_lib + + + grpc_codegen_lib + + + + NotUsing + Level3 + Disabled + WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) + true + MultiThreadedDebug + true + None + false + + + Windows + true + false + + + + + + NotUsing + Level3 + Disabled + WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) + true + MultiThreadedDebug + true + None + false + + + Windows + true + false + + + + + + NotUsing + Level3 + MaxSpeed + WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) + true + true + true + MultiThreaded + true + None + false + + + Windows + true + false + true + true + + + + + + NotUsing + Level3 + MaxSpeed + WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) + true + true + true + MultiThreaded + true + None + false + + + Windows + true + false + true + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + + + + diff --git a/vsprojects/vcxproj/grpc_codegen_lib/grpc_codegen_lib.vcxproj.filters b/vsprojects/vcxproj/grpc_codegen_lib/grpc_codegen_lib.vcxproj.filters new file mode 100644 index 00000000000..891dff031f7 --- /dev/null +++ b/vsprojects/vcxproj/grpc_codegen_lib/grpc_codegen_lib.vcxproj.filters @@ -0,0 +1,81 @@ + + + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + + + + {1fe03afe-0c52-a706-2c50-4ea691805d81} + + + {386f8a29-15ac-1f26-30ee-d9a605a802be} + + + {9828c5d3-4dc2-f116-97bf-015089243c94} + + + {0e88ed03-ed1e-49c0-15d7-69934b433494} + + + + diff --git a/vsprojects/vcxproj/grpc_plugin_support/grpc_plugin_support.vcxproj b/vsprojects/vcxproj/grpc_plugin_support/grpc_plugin_support.vcxproj index a76c883903a..058ae4fcb51 100644 --- a/vsprojects/vcxproj/grpc_plugin_support/grpc_plugin_support.vcxproj +++ b/vsprojects/vcxproj/grpc_plugin_support/grpc_plugin_support.vcxproj @@ -148,42 +148,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -227,8 +191,11 @@ - - + + + + {AAC6AF12-94C8-4A3C-A1BF-DAA4738F4500} + diff --git a/vsprojects/vcxproj/grpc_plugin_support/grpc_plugin_support.vcxproj.filters b/vsprojects/vcxproj/grpc_plugin_support/grpc_plugin_support.vcxproj.filters index de33d98f6de..b1a63eb41f8 100644 --- a/vsprojects/vcxproj/grpc_plugin_support/grpc_plugin_support.vcxproj.filters +++ b/vsprojects/vcxproj/grpc_plugin_support/grpc_plugin_support.vcxproj.filters @@ -16,119 +16,8 @@ src\compiler - - src\cpp\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen\security - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - include\grpc\impl\codegen @@ -230,15 +119,6 @@ {893c09ee-e315-e763-9d9d-37522ba2f51c} - - {3e8c71a4-8a06-a577-2799-2224a1ad1f1b} - - - {ec2a6e26-915b-ba1b-4f59-f361dc01105c} - - - {c1593bf9-5ef8-cb28-e46b-543153918a3f} - {1c34d005-1ffb-8a31-881a-c6bb431cda69} @@ -254,12 +134,6 @@ {0e6b1e6c-7299-59ce-d757-619bcddd5441} - - {29d80aab-9e9d-0417-6dfa-59dec47c9883} - - - {c0d4a389-f341-8385-4534-fe9d8fb09952} - diff --git a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj index 5735327b786..668f8a56074 100644 --- a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj +++ b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj @@ -147,37 +147,40 @@ - - + + + + + - - - - + + + + diff --git a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters index 47a689a8224..7f2876d5e41 100644 --- a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters +++ b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters @@ -1,6 +1,9 @@ + + test\core\end2end + test\core\end2end\data @@ -10,18 +13,15 @@ test\core\end2end\data - - test\core\security - - - test\core\end2end - test\core\end2end\fixtures test\core\iomgr + + test\core\security + test\core\util @@ -31,6 +31,9 @@ test\core\util + + test\core\util + test\core\util @@ -39,21 +42,21 @@ - - test\core\end2end\data - - - test\core\security - test\core\end2end + + test\core\end2end\data + test\core\end2end\fixtures test\core\iomgr + + test\core\security + test\core\util @@ -63,6 +66,9 @@ test\core\util + + test\core\util + test\core\util diff --git a/vsprojects/vcxproj/grpc_test_util_unsecure/grpc_test_util_unsecure.vcxproj b/vsprojects/vcxproj/grpc_test_util_unsecure/grpc_test_util_unsecure.vcxproj index 6ff6ec9a564..2a3c50e85c9 100644 --- a/vsprojects/vcxproj/grpc_test_util_unsecure/grpc_test_util_unsecure.vcxproj +++ b/vsprojects/vcxproj/grpc_test_util_unsecure/grpc_test_util_unsecure.vcxproj @@ -153,6 +153,7 @@ + @@ -168,6 +169,8 @@ + + diff --git a/vsprojects/vcxproj/grpc_test_util_unsecure/grpc_test_util_unsecure.vcxproj.filters b/vsprojects/vcxproj/grpc_test_util_unsecure/grpc_test_util_unsecure.vcxproj.filters index 3b682cec6d2..cdb19e1b467 100644 --- a/vsprojects/vcxproj/grpc_test_util_unsecure/grpc_test_util_unsecure.vcxproj.filters +++ b/vsprojects/vcxproj/grpc_test_util_unsecure/grpc_test_util_unsecure.vcxproj.filters @@ -19,6 +19,9 @@ test\core\util + + test\core\util + test\core\util @@ -45,6 +48,9 @@ test\core\util + + test\core\util + test\core\util diff --git a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj index f0d869ba930..e89cc8a1257 100644 --- a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj +++ b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj @@ -260,415 +260,428 @@ + - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + diff --git a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters index 1f240212a38..c9f1ad69433 100644 --- a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters +++ b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters @@ -1,416 +1,428 @@ - - src\core\surface + + src\core\ext\transport\chttp2\client\insecure - - src\core\census + + src\core\ext\transport\chttp2\server\insecure - - src\core\census + + src\core\ext\transport\chttp2\transport - - src\core\channel + + src\core\ext\transport\chttp2\transport - - src\core\channel + + src\core\ext\transport\chttp2\transport - - src\core\channel + + src\core\ext\transport\chttp2\transport - - src\core\channel + + src\core\ext\transport\chttp2\transport - - src\core\channel + + src\core\ext\transport\chttp2\transport - - src\core\channel + + src\core\ext\transport\chttp2\transport - - src\core\channel + + src\core\ext\transport\chttp2\transport - - src\core\channel + + src\core\ext\transport\chttp2\transport - - src\core\channel + + src\core\ext\transport\chttp2\transport - - src\core\client_config + + src\core\ext\transport\chttp2\transport - - src\core\client_config + + src\core\ext\transport\chttp2\transport - - src\core\client_config + + src\core\ext\transport\chttp2\transport - - src\core\client_config + + src\core\ext\transport\chttp2\transport - - src\core\client_config\lb_policies + + src\core\ext\transport\chttp2\transport - - src\core\client_config\lb_policies + + src\core\ext\transport\chttp2\transport - - src\core\client_config\lb_policies + + src\core\ext\transport\chttp2\transport - - src\core\client_config + + src\core\ext\transport\chttp2\transport - - src\core\client_config + + src\core\ext\transport\chttp2\transport - - src\core\client_config + + src\core\ext\transport\chttp2\transport - - src\core\client_config + + src\core\ext\transport\chttp2\transport - - src\core\client_config + + src\core\lib\census - - src\core\client_config + + src\core\lib\census - - src\core\client_config\resolvers + + src\core\lib\census - - src\core\client_config\resolvers + + src\core\lib\census - - src\core\client_config + + src\core\lib\census - - src\core\client_config + + src\core\lib\census - - src\core\client_config + + src\core\lib\census - - src\core\client_config + + src\core\lib\census - - src\core\compression + + src\core\lib\census - - src\core\compression + + src\core\lib\channel - - src\core\debug + + src\core\lib\channel - - src\core\httpcli + + src\core\lib\channel - - src\core\httpcli + + src\core\lib\channel - - src\core\httpcli + + src\core\lib\channel - - src\core\iomgr + + src\core\lib\channel - - src\core\iomgr + + src\core\lib\channel - - src\core\iomgr + + src\core\lib\channel - - src\core\iomgr + + src\core\lib\channel - - src\core\iomgr + + src\core\lib\client_config - - src\core\iomgr + + src\core\lib\client_config - - src\core\iomgr + + src\core\lib\client_config - - src\core\iomgr + + src\core\lib\client_config - - src\core\iomgr + + src\core\lib\client_config\lb_policies - - src\core\iomgr + + src\core\lib\client_config\lb_policies - - src\core\iomgr + + src\core\lib\client_config\lb_policies - - src\core\iomgr + + src\core\lib\client_config - - src\core\iomgr + + src\core\lib\client_config - - src\core\iomgr + + src\core\lib\client_config - - src\core\iomgr + + src\core\lib\client_config - - src\core\iomgr + + src\core\lib\client_config - - src\core\iomgr + + src\core\lib\client_config - - src\core\iomgr + + src\core\lib\client_config\resolvers - - src\core\iomgr + + src\core\lib\client_config\resolvers - - src\core\iomgr + + src\core\lib\client_config - - src\core\iomgr + + src\core\lib\client_config - - src\core\iomgr + + src\core\lib\client_config - - src\core\iomgr + + src\core\lib\client_config - - src\core\iomgr + + src\core\lib\compression - - src\core\iomgr + + src\core\lib\compression - - src\core\iomgr + + src\core\lib\debug - - src\core\iomgr + + src\core\lib\http - - src\core\iomgr + + src\core\lib\http - - src\core\iomgr + + src\core\lib\http - - src\core\iomgr + + src\core\lib\iomgr - - src\core\iomgr + + src\core\lib\iomgr - - src\core\iomgr + + src\core\lib\iomgr - - src\core\iomgr + + src\core\lib\iomgr - - src\core\iomgr + + src\core\lib\iomgr - - src\core\iomgr + + src\core\lib\iomgr - - src\core\iomgr + + src\core\lib\iomgr - - src\core\iomgr + + src\core\lib\iomgr - - src\core\iomgr + + src\core\lib\iomgr - - src\core\iomgr + + src\core\lib\iomgr - - src\core\iomgr + + src\core\lib\iomgr - - src\core\json + + src\core\lib\iomgr - - src\core\json + + src\core\lib\iomgr - - src\core\json + + src\core\lib\iomgr - - src\core\json + + src\core\lib\iomgr - - src\core\proto\grpc\lb\v0 + + src\core\lib\iomgr - - src\core\surface + + src\core\lib\iomgr - - src\core\surface + + src\core\lib\iomgr - - src\core\surface + + src\core\lib\iomgr - - src\core\surface + + src\core\lib\iomgr - - src\core\surface + + src\core\lib\iomgr - - src\core\surface + + src\core\lib\iomgr - - src\core\surface + + src\core\lib\iomgr - - src\core\surface + + src\core\lib\iomgr - - src\core\surface + + src\core\lib\iomgr - - src\core\surface + + src\core\lib\iomgr - - src\core\surface + + src\core\lib\iomgr - - src\core\surface + + src\core\lib\iomgr - - src\core\surface + + src\core\lib\iomgr - - src\core\surface + + src\core\lib\iomgr - - src\core\surface + + src\core\lib\iomgr - - src\core\surface + + src\core\lib\iomgr - - src\core\surface + + src\core\lib\iomgr - - src\core\surface + + src\core\lib\iomgr - - src\core\surface + + src\core\lib\iomgr - - src\core\surface + + src\core\lib\iomgr - - src\core\surface + + src\core\lib\iomgr - - src\core\transport + + src\core\lib\iomgr - - src\core\transport\chttp2 + + src\core\lib\iomgr - - src\core\transport\chttp2 + + src\core\lib\iomgr - - src\core\transport\chttp2 + + src\core\lib\iomgr - - src\core\transport\chttp2 + + src\core\lib\iomgr - - src\core\transport\chttp2 + + src\core\lib\json - - src\core\transport\chttp2 + + src\core\lib\json - - src\core\transport\chttp2 + + src\core\lib\json - - src\core\transport\chttp2 + + src\core\lib\json - - src\core\transport\chttp2 + + src\core\lib\proto\grpc\lb\v0 - - src\core\transport\chttp2 + + src\core\lib\surface - - src\core\transport\chttp2 + + src\core\lib\surface - - src\core\transport\chttp2 + + src\core\lib\surface - - src\core\transport\chttp2 + + src\core\lib\surface - - src\core\transport\chttp2 + + src\core\lib\surface - - src\core\transport\chttp2 + + src\core\lib\surface - - src\core\transport\chttp2 + + src\core\lib\surface - - src\core\transport\chttp2 + + src\core\lib\surface - - src\core\transport\chttp2 + + src\core\lib\surface - - src\core\transport\chttp2 + + src\core\lib\surface - - src\core\transport\chttp2 + + src\core\lib\surface - - src\core\transport + + src\core\lib\surface - - src\core\transport + + src\core\lib\surface - - src\core\transport + + src\core\lib\surface - - src\core\transport + + src\core\lib\surface - - src\core\transport + + src\core\lib\surface - - src\core\transport + + src\core\lib\surface - - src\core\transport + + src\core\lib\surface - - src\core\census + + src\core\lib\surface - - src\core\census + + src\core\lib\surface - - src\core\census + + src\core\lib\surface - - src\core\census + + src\core\lib\transport - - src\core\census + + src\core\lib\transport - - src\core\census + + src\core\lib\transport + + + src\core\lib\transport + + + src\core\lib\transport + + + src\core\lib\transport + + + src\core\lib\transport third_party\nanopb @@ -429,13 +441,13 @@ include\grpc - + include\grpc - + include\grpc - + include\grpc @@ -456,364 +468,379 @@ include\grpc\impl\codegen - + include\grpc - - src\core\census + + src\core\ext\transport\chttp2\transport + + + src\core\ext\transport\chttp2\transport - - src\core\channel + + src\core\ext\transport\chttp2\transport - - src\core\channel + + src\core\ext\transport\chttp2\transport - - src\core\channel + + src\core\ext\transport\chttp2\transport - - src\core\channel + + src\core\ext\transport\chttp2\transport - - src\core\channel + + src\core\ext\transport\chttp2\transport - - src\core\channel + + src\core\ext\transport\chttp2\transport - - src\core\channel + + src\core\ext\transport\chttp2\transport - - src\core\channel + + src\core\ext\transport\chttp2\transport - - src\core\channel + + src\core\ext\transport\chttp2\transport - - src\core\channel + + src\core\ext\transport\chttp2\transport - - src\core\client_config + + src\core\ext\transport\chttp2\transport - - src\core\client_config + + src\core\ext\transport\chttp2\transport - - src\core\client_config + + src\core\ext\transport\chttp2\transport - - src\core\client_config\lb_policies + + src\core\ext\transport\chttp2\transport - - src\core\client_config\lb_policies + + src\core\ext\transport\chttp2\transport - - src\core\client_config\lb_policies + + src\core\ext\transport\chttp2\transport - - src\core\client_config + + src\core\ext\transport\chttp2\transport - - src\core\client_config + + src\core\ext\transport\chttp2\transport - - src\core\client_config + + src\core\ext\transport\chttp2\transport - - src\core\client_config + + src\core\lib\census - - src\core\client_config + + src\core\lib\census - - src\core\client_config + + src\core\lib\census - - src\core\client_config\resolvers + + src\core\lib\census - - src\core\client_config\resolvers + + src\core\lib\census - - src\core\client_config + + src\core\lib\channel - - src\core\client_config + + src\core\lib\channel - - src\core\client_config + + src\core\lib\channel - - src\core\client_config + + src\core\lib\channel - - src\core\compression + + src\core\lib\channel - - src\core\compression + + src\core\lib\channel - - src\core\debug + + src\core\lib\channel - - src\core\httpcli + + src\core\lib\channel - - src\core\httpcli + + src\core\lib\channel - - src\core\httpcli + + src\core\lib\channel - - src\core\iomgr + + src\core\lib\client_config - - src\core\iomgr + + src\core\lib\client_config - - src\core\iomgr + + src\core\lib\client_config - - src\core\iomgr + + src\core\lib\client_config\lb_policies - - src\core\iomgr + + src\core\lib\client_config\lb_policies - - src\core\iomgr + + src\core\lib\client_config\lb_policies - - src\core\iomgr + + src\core\lib\client_config - - src\core\iomgr + + src\core\lib\client_config - - src\core\iomgr + + src\core\lib\client_config - - src\core\iomgr + + src\core\lib\client_config - - src\core\iomgr + + src\core\lib\client_config - - src\core\iomgr + + src\core\lib\client_config - - src\core\iomgr + + src\core\lib\client_config\resolvers - - src\core\iomgr + + src\core\lib\client_config\resolvers - - src\core\iomgr + + src\core\lib\client_config - - src\core\iomgr + + src\core\lib\client_config - - src\core\iomgr + + src\core\lib\client_config - - src\core\iomgr + + src\core\lib\client_config - - src\core\iomgr + + src\core\lib\compression - - src\core\iomgr + + src\core\lib\compression - - src\core\iomgr + + src\core\lib\debug - - src\core\iomgr + + src\core\lib\http - - src\core\iomgr + + src\core\lib\http - - src\core\iomgr + + src\core\lib\http - - src\core\iomgr + + src\core\lib\iomgr - - src\core\iomgr + + src\core\lib\iomgr - - src\core\iomgr + + src\core\lib\iomgr - - src\core\iomgr + + src\core\lib\iomgr - - src\core\iomgr + + src\core\lib\iomgr - - src\core\iomgr + + src\core\lib\iomgr - - src\core\iomgr + + src\core\lib\iomgr - - src\core\iomgr + + src\core\lib\iomgr - - src\core\iomgr + + src\core\lib\iomgr - - src\core\iomgr + + src\core\lib\iomgr - - src\core\iomgr + + src\core\lib\iomgr - - src\core\iomgr + + src\core\lib\iomgr - - src\core\json + + src\core\lib\iomgr - - src\core\json + + src\core\lib\iomgr - - src\core\json + + src\core\lib\iomgr - - src\core\json + + src\core\lib\iomgr - - src\core\proto\grpc\lb\v0 + + src\core\lib\iomgr - - src\core\statistics + + src\core\lib\iomgr - - src\core\statistics + + src\core\lib\iomgr - - src\core\surface + + src\core\lib\iomgr - - src\core\surface + + src\core\lib\iomgr - - src\core\surface + + src\core\lib\iomgr - - src\core\surface + + src\core\lib\iomgr - - src\core\surface + + src\core\lib\iomgr - - src\core\surface + + src\core\lib\iomgr - - src\core\surface + + src\core\lib\iomgr - - src\core\surface + + src\core\lib\iomgr - - src\core\surface + + src\core\lib\iomgr - - src\core\transport + + src\core\lib\iomgr - - src\core\transport\chttp2 + + src\core\lib\iomgr - - src\core\transport\chttp2 + + src\core\lib\iomgr - - src\core\transport\chttp2 + + src\core\lib\iomgr - - src\core\transport\chttp2 + + src\core\lib\iomgr - - src\core\transport\chttp2 + + src\core\lib\iomgr - - src\core\transport\chttp2 + + src\core\lib\iomgr - - src\core\transport\chttp2 + + src\core\lib\iomgr - - src\core\transport\chttp2 + + src\core\lib\iomgr - - src\core\transport\chttp2 + + src\core\lib\json - - src\core\transport\chttp2 + + src\core\lib\json - - src\core\transport\chttp2 + + src\core\lib\json - - src\core\transport\chttp2 + + src\core\lib\json - - src\core\transport\chttp2 + + src\core\lib\proto\grpc\lb\v0 - - src\core\transport\chttp2 + + src\core\lib\statistics - - src\core\transport\chttp2 + + src\core\lib\statistics - - src\core\transport\chttp2 + + src\core\lib\surface - - src\core\transport\chttp2 + + src\core\lib\surface - - src\core\transport\chttp2 + + src\core\lib\surface - - src\core\transport\chttp2 + + src\core\lib\surface - - src\core\transport\chttp2 + + src\core\lib\surface - - src\core\transport + + src\core\lib\surface - - src\core\transport + + src\core\lib\surface - - src\core\transport + + src\core\lib\surface - - src\core\transport + + src\core\lib\surface - - src\core\transport + + src\core\lib\surface - - src\core\transport + + src\core\lib\surface - - src\core\transport + + src\core\lib\surface - - src\core\census + + src\core\lib\transport - - src\core\census + + src\core\lib\transport - - src\core\census + + src\core\lib\transport + + + src\core\lib\transport + + + src\core\lib\transport + + + src\core\lib\transport + + + src\core\lib\transport third_party\nanopb @@ -848,59 +875,83 @@ {88491077-386b-2039-d14c-0c40136b5f7a} - - {a7596ee2-afee-3a82-7e6e-bd8b8f904e04} + + {82f86e8c-00a4-f566-d235-670fc629798d} + + + {967c89fe-c97c-27e2-aac0-9ba5854cb5fa} + + + {702829f0-099e-2ab7-6b44-ed7cff3ec083} + + + {0d589e16-e470-4968-318c-796af5a33637} + + + {34dfdc9b-ab97-47f0-c1e1-b2e7381c3de6} + + + {81fb55f4-9216-441b-8389-a7120bbcd45e} + + + {3f53dcb6-71d7-28ff-1794-26a08e4601fe} + + + {45b20f28-376c-9dea-1800-8a0193411946} + + + {8bd5b461-bff8-6aa8-b5a6-85da2834eb8a} - - {cc102c4b-66ff-cf4c-2288-d76327e1a183} + + {19582d5a-dab7-9dc1-c7e9-cc147fd52e5f} - - {02bd7340-02ee-4337-ffa5-0b6ecc7cf60c} + + {fb964f3d-a59c-a7ba-fee5-6072dbb94a7b} - - {308af086-46c7-fa66-9021-19b1c3d4a6bd} + + {29ca2974-89e4-1a74-3e4d-0d63e2f77566} - - {dd617c24-6f07-fdff-80d5-c8610d6f815e} + + {6c7e36d4-6117-e0cd-c886-b9eb3c994927} - - {2e3aca1d-223d-10a1-b282-7f9fc68ee6f5} + + {2d959ef9-9703-dc92-a56f-9fe136dadfb9} - - {6d8d5774-7291-554d-fafa-583463cd3fd9} + + {b88002e9-185e-4e64-49f5-2d8989ce87f6} - - {1ba3a245-47e7-89b5-b0c9-aca758bd0277} + + {7f23789d-f18a-2a2d-60fe-a87dc656f539} - - {a9df8b24-ecea-ff6d-8999-d8fa54cd70bf} + + {748c8078-2027-8641-f485-1d4c66466e79} - - {443ffc61-1bea-2477-6e54-1ddf8c139264} + + {bb1a1cf2-6824-08f0-a9bd-3fafcaf13042} - - {7f4bb22a-65ba-0f8f-6387-66b1f6677a80} + + {681cdaeb-c47f-8853-d985-bf13c2873947} - - {9c2bd164-c317-8a13-564d-3b28b0fd79cf} + + {4bfbd6c6-f6a8-c6b3-5186-b788f4e11e23} - - {2bad8e10-4fc5-d8b3-e026-4abbd0c25cda} + + {60f3ab7d-ea44-348f-671e-77fdebbd18bb} - - {4475c8ed-e01b-8906-47d0-8a504189c0d5} + + {bcd33510-32e7-c2fb-e11d-a3655f97bc84} - - {e084164c-a069-00e3-db35-4e0b1cd6f0b7} + + {bb9b8c80-9eff-5ab6-5b29-c2d54f0fc192} - - {6cd0127e-c24b-d43c-38f5-198db8d4322a} + + {d0ab6d54-ae25-fc49-3656-91d9db57366a} - - {6687ff98-e36e-c0b1-2756-1bc79edec406} + + {506dc3b3-d884-2b59-0dfa-57ed6affa2d3} - - {5fcd6206-f774-9ae6-4b85-305d6a723843} + + {6c3394d1-27e9-003e-19ed-8116d210f7cc} {025c051e-8eba-125b-67f9-173f95176eb2} diff --git a/vsprojects/vcxproj/qps/qps.vcxproj b/vsprojects/vcxproj/qps/qps.vcxproj index a57b7409b69..d458664c8d0 100644 --- a/vsprojects/vcxproj/qps/qps.vcxproj +++ b/vsprojects/vcxproj/qps/qps.vcxproj @@ -161,6 +161,14 @@ + + + + + + + + @@ -177,21 +185,13 @@ - - - - - - - - - + - + - + - + @@ -201,13 +201,13 @@ - + - + - + - + diff --git a/vsprojects/vcxproj/qps/qps.vcxproj.filters b/vsprojects/vcxproj/qps/qps.vcxproj.filters index eeb9555a6af..c3ea63d04ee 100644 --- a/vsprojects/vcxproj/qps/qps.vcxproj.filters +++ b/vsprojects/vcxproj/qps/qps.vcxproj.filters @@ -1,22 +1,22 @@ - + src\proto\grpc\testing - + src\proto\grpc\testing - + src\proto\grpc\testing - + src\proto\grpc\testing src\proto\grpc\testing - + src\proto\grpc\testing diff --git a/vsprojects/vcxproj/test/boringssl/boringssl_asn1_test/boringssl_asn1_test.vcxproj b/vsprojects/vcxproj/test/boringssl/boringssl_asn1_test/boringssl_asn1_test.vcxproj new file mode 100644 index 00000000000..9d5aa67e06c --- /dev/null +++ b/vsprojects/vcxproj/test/boringssl/boringssl_asn1_test/boringssl_asn1_test.vcxproj @@ -0,0 +1,198 @@ + + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {A18A6879-13EB-F421-E270-03C6DBD6A6B7} + true + $(SolutionDir)IntDir\$(MSBuildProjectName)\ + + + + v100 + + + v110 + + + v120 + + + v140 + + + Application + true + Unicode + + + Application + false + true + Unicode + + + + + + + + + + + + + + + + boringssl_asn1_test + static + Debug + static + Debug + + + boringssl_asn1_test + static + Release + static + Release + + + + NotUsing + Level3 + Disabled + WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) + true + MultiThreadedDebug + false + None + false + + + Console + true + false + + + + + + NotUsing + Level3 + Disabled + WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) + true + MultiThreadedDebug + false + None + false + + + Console + true + false + + + + + + NotUsing + Level3 + MaxSpeed + WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) + true + true + true + MultiThreaded + false + None + false + + + Console + true + false + true + true + + + + + + NotUsing + Level3 + MaxSpeed + WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) + true + true + true + MultiThreaded + false + None + false + + + Console + true + false + true + true + + + + + + + + + + {37B78CF5-2090-3DC6-FF98-17381709846A} + + + {427037B1-B51B-D6F1-5025-AD12B200266A} + + + {9FD9A3EF-C4A3-8390-D8F4-6F86C22A58CE} + + + + + + + + + + + + + + + This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + + + + + + + + + diff --git a/vsprojects/vcxproj/test/boringssl/boringssl_asn1_test/boringssl_asn1_test.vcxproj.filters b/vsprojects/vcxproj/test/boringssl/boringssl_asn1_test/boringssl_asn1_test.vcxproj.filters new file mode 100644 index 00000000000..00e4276f1d4 --- /dev/null +++ b/vsprojects/vcxproj/test/boringssl/boringssl_asn1_test/boringssl_asn1_test.vcxproj.filters @@ -0,0 +1,7 @@ + + + + + + + diff --git a/vsprojects/vcxproj/test/end2end/end2end_certs/end2end_certs.vcxproj b/vsprojects/vcxproj/test/boringssl/boringssl_asn1_test_lib/boringssl_asn1_test_lib.vcxproj similarity index 89% rename from vsprojects/vcxproj/test/end2end/end2end_certs/end2end_certs.vcxproj rename to vsprojects/vcxproj/test/boringssl/boringssl_asn1_test_lib/boringssl_asn1_test_lib.vcxproj index 85502bace45..177bfcbb3b7 100644 --- a/vsprojects/vcxproj/test/end2end/end2end_certs/end2end_certs.vcxproj +++ b/vsprojects/vcxproj/test/boringssl/boringssl_asn1_test_lib/boringssl_asn1_test_lib.vcxproj @@ -19,7 +19,7 @@ - {80EA2691-C037-6DD3-D3AB-21510BF0E64B} + {37B78CF5-2090-3DC6-FF98-17381709846A} true $(SolutionDir)IntDir\$(MSBuildProjectName)\ @@ -57,10 +57,10 @@ - end2end_certs + boringssl_asn1_test_lib - end2end_certs + boringssl_asn1_test_lib @@ -70,7 +70,7 @@ WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) true MultiThreadedDebug - true + false None false @@ -89,7 +89,7 @@ WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) true MultiThreadedDebug - true + false None false @@ -110,7 +110,7 @@ true true MultiThreaded - true + false None false @@ -133,7 +133,7 @@ true true MultiThreaded - true + false None false @@ -147,13 +147,17 @@ - - - - - + + + + {427037B1-B51B-D6F1-5025-AD12B200266A} + + + {9FD9A3EF-C4A3-8390-D8F4-6F86C22A58CE} + + diff --git a/vsprojects/vcxproj/test/boringssl/boringssl_asn1_test_lib/boringssl_asn1_test_lib.vcxproj.filters b/vsprojects/vcxproj/test/boringssl/boringssl_asn1_test_lib/boringssl_asn1_test_lib.vcxproj.filters new file mode 100644 index 00000000000..d508701e3cd --- /dev/null +++ b/vsprojects/vcxproj/test/boringssl/boringssl_asn1_test_lib/boringssl_asn1_test_lib.vcxproj.filters @@ -0,0 +1,24 @@ + + + + + third_party\boringssl\crypto\asn1 + + + + + + {4115523a-a0e5-e13f-f46b-76308dedf6f3} + + + {c1481ada-4ab1-0cb6-8828-83f09d5421e4} + + + {199f1153-e7a0-fcef-73f5-eb766cb38fc3} + + + {c5964062-112a-0884-d3ae-d8aec947c2f3} + + + + diff --git a/vsprojects/vcxproj/test/codegen_test/codegen_test.vcxproj b/vsprojects/vcxproj/test/codegen_test/codegen_test.vcxproj new file mode 100644 index 00000000000..7ba2a561330 --- /dev/null +++ b/vsprojects/vcxproj/test/codegen_test/codegen_test.vcxproj @@ -0,0 +1,240 @@ + + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {07D92FF8-D0D1-CB1B-51D3-EBA0E5DEBDD7} + true + $(SolutionDir)IntDir\$(MSBuildProjectName)\ + + + + v100 + + + v110 + + + v120 + + + v140 + + + Application + true + Unicode + + + Application + false + true + Unicode + + + + + + + + + + + + + + + + codegen_test + static + Debug + static + Debug + + + codegen_test + static + Release + static + Release + + + + NotUsing + Level3 + Disabled + WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) + true + MultiThreadedDebug + true + None + false + + + Console + true + false + + + + + + NotUsing + Level3 + Disabled + WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) + true + MultiThreadedDebug + true + None + false + + + Console + true + false + + + + + + NotUsing + Level3 + MaxSpeed + WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) + true + true + true + MultiThreaded + true + None + false + + + Console + true + false + true + true + + + + + + NotUsing + Level3 + MaxSpeed + WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) + true + true + true + MultiThreaded + true + None + false + + + Console + true + false + true + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {AAC6AF12-94C8-4A3C-A1BF-DAA4738F4500} + + + + + + + + + + + + + + + This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + + + + + + + + + diff --git a/vsprojects/vcxproj/test/codegen_test/codegen_test.vcxproj.filters b/vsprojects/vcxproj/test/codegen_test/codegen_test.vcxproj.filters new file mode 100644 index 00000000000..980cf76052b --- /dev/null +++ b/vsprojects/vcxproj/test/codegen_test/codegen_test.vcxproj.filters @@ -0,0 +1,51 @@ + + + + + src\proto\grpc\testing + + + src\proto\grpc\testing + + + src\proto\grpc\testing + + + src\proto\grpc\testing + + + src\proto\grpc\testing + + + src\proto\grpc\testing + + + test\cpp\codegen + + + + + + {a37f6960-8f92-51ed-9b99-d24970584bb2} + + + {dc3f4032-f0dc-f8f0-e07a-78c0f628e9f5} + + + {250aede7-067f-590b-42d7-15939da4a59d} + + + {57f4543e-acd0-a4a0-f3c3-8494e509b2b3} + + + {7337b395-7e96-f49b-0a4f-b8a70be23a57} + + + {cf9e3404-0ab9-a301-9715-728febcece23} + + + {d349ac75-02e7-cb63-92f1-1785a74c0561} + + + + diff --git a/vsprojects/vcxproj/test/end2end/end2end_certs/end2end_certs.vcxproj.filters b/vsprojects/vcxproj/test/end2end/end2end_certs/end2end_certs.vcxproj.filters deleted file mode 100644 index 62b14d1abd4..00000000000 --- a/vsprojects/vcxproj/test/end2end/end2end_certs/end2end_certs.vcxproj.filters +++ /dev/null @@ -1,30 +0,0 @@ - - - - - test\core\end2end\data - - - test\core\end2end\data - - - test\core\end2end\data - - - - - - {c94707fc-9ae9-9cc3-8743-77776eb9d9cc} - - - {f91d3831-d4bb-0981-77a4-16d8c5be07e9} - - - {afbaeee0-7ab8-872c-8c47-3e3e5a8cc5e3} - - - {5e4bc33c-7867-c329-d107-009b198f97dc} - - - - diff --git a/vsprojects/vcxproj/test/end2end/fixtures/h2_census_test/h2_census_test.vcxproj b/vsprojects/vcxproj/test/end2end/fixtures/h2_census_test/h2_census_test.vcxproj index 612b5df8064..2f63ad02a89 100644 --- a/vsprojects/vcxproj/test/end2end/fixtures/h2_census_test/h2_census_test.vcxproj +++ b/vsprojects/vcxproj/test/end2end/fixtures/h2_census_test/h2_census_test.vcxproj @@ -165,9 +165,6 @@ {1F1F9084-2A93-B80E-364F-5754894AFAB4} - - {80EA2691-C037-6DD3-D3AB-21510BF0E64B} - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} diff --git a/vsprojects/vcxproj/test/end2end/fixtures/h2_compress_test/h2_compress_test.vcxproj b/vsprojects/vcxproj/test/end2end/fixtures/h2_compress_test/h2_compress_test.vcxproj index 4b6fbaa585a..c9efe0b6716 100644 --- a/vsprojects/vcxproj/test/end2end/fixtures/h2_compress_test/h2_compress_test.vcxproj +++ b/vsprojects/vcxproj/test/end2end/fixtures/h2_compress_test/h2_compress_test.vcxproj @@ -165,9 +165,6 @@ {1F1F9084-2A93-B80E-364F-5754894AFAB4} - - {80EA2691-C037-6DD3-D3AB-21510BF0E64B} - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} diff --git a/vsprojects/vcxproj/test/end2end/fixtures/h2_fakesec_test/h2_fakesec_test.vcxproj b/vsprojects/vcxproj/test/end2end/fixtures/h2_fakesec_test/h2_fakesec_test.vcxproj index 3406fadc1e1..d84176e189c 100644 --- a/vsprojects/vcxproj/test/end2end/fixtures/h2_fakesec_test/h2_fakesec_test.vcxproj +++ b/vsprojects/vcxproj/test/end2end/fixtures/h2_fakesec_test/h2_fakesec_test.vcxproj @@ -165,9 +165,6 @@ {1F1F9084-2A93-B80E-364F-5754894AFAB4} - - {80EA2691-C037-6DD3-D3AB-21510BF0E64B} - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} diff --git a/vsprojects/vcxproj/test/end2end/fixtures/h2_uchannel_nosec_test/h2_uchannel_nosec_test.vcxproj b/vsprojects/vcxproj/test/end2end/fixtures/h2_full+trace_nosec_test/h2_full+trace_nosec_test.vcxproj similarity index 98% rename from vsprojects/vcxproj/test/end2end/fixtures/h2_uchannel_nosec_test/h2_uchannel_nosec_test.vcxproj rename to vsprojects/vcxproj/test/end2end/fixtures/h2_full+trace_nosec_test/h2_full+trace_nosec_test.vcxproj index 76a9e5600f5..a59e08213c1 100644 --- a/vsprojects/vcxproj/test/end2end/fixtures/h2_uchannel_nosec_test/h2_uchannel_nosec_test.vcxproj +++ b/vsprojects/vcxproj/test/end2end/fixtures/h2_full+trace_nosec_test/h2_full+trace_nosec_test.vcxproj @@ -20,7 +20,7 @@ - {BD79A629-4181-DB5E-C28F-44EB280A6F91} + {DFD51943-4906-8051-7D66-6A7D50E0D87E} true $(SolutionDir)IntDir\$(MSBuildProjectName)\ @@ -60,14 +60,14 @@ - h2_uchannel_nosec_test + h2_full+trace_nosec_test static Debug static Debug - h2_uchannel_nosec_test + h2_full+trace_nosec_test static Release static @@ -158,7 +158,7 @@ - + diff --git a/vsprojects/vcxproj/test/end2end/fixtures/h2_uchannel_nosec_test/h2_uchannel_nosec_test.vcxproj.filters b/vsprojects/vcxproj/test/end2end/fixtures/h2_full+trace_nosec_test/h2_full+trace_nosec_test.vcxproj.filters similarity index 68% rename from vsprojects/vcxproj/test/end2end/fixtures/h2_uchannel_nosec_test/h2_uchannel_nosec_test.vcxproj.filters rename to vsprojects/vcxproj/test/end2end/fixtures/h2_full+trace_nosec_test/h2_full+trace_nosec_test.vcxproj.filters index c9adeeebafc..c9164af19ae 100644 --- a/vsprojects/vcxproj/test/end2end/fixtures/h2_uchannel_nosec_test/h2_uchannel_nosec_test.vcxproj.filters +++ b/vsprojects/vcxproj/test/end2end/fixtures/h2_full+trace_nosec_test/h2_full+trace_nosec_test.vcxproj.filters @@ -1,23 +1,23 @@ - + test\core\end2end\fixtures - {549b9d3c-70c0-f3de-36d6-5b2ce5fb098c} + {2828a8fc-bcc1-7b1c-4953-0c8eaf9fe643} - {d37f19b6-6893-6a90-09d2-e50d891899ff} + {d8e78fb2-4316-018b-704a-0944fd0c6fd9} - {bde36bf9-4894-e85b-4a35-f7b1abe9387f} + {1981c949-24c5-413c-ab03-24eff55e803a} - {e16ce654-bd8c-2527-1077-e6cd2639c1cb} + {bfc11ba4-7401-55f0-8513-598aa93e7e1a} diff --git a/vsprojects/vcxproj/test/end2end/fixtures/h2_uchannel_test/h2_uchannel_test.vcxproj b/vsprojects/vcxproj/test/end2end/fixtures/h2_full+trace_test/h2_full+trace_test.vcxproj similarity index 97% rename from vsprojects/vcxproj/test/end2end/fixtures/h2_uchannel_test/h2_uchannel_test.vcxproj rename to vsprojects/vcxproj/test/end2end/fixtures/h2_full+trace_test/h2_full+trace_test.vcxproj index bcf0f34066d..6ca9dfa46de 100644 --- a/vsprojects/vcxproj/test/end2end/fixtures/h2_uchannel_test/h2_uchannel_test.vcxproj +++ b/vsprojects/vcxproj/test/end2end/fixtures/h2_full+trace_test/h2_full+trace_test.vcxproj @@ -20,7 +20,7 @@ - {E39D59C4-F5CB-7D68-DA6B-C6BC93843435} + {16C713C6-062E-F71F-A44C-52DC35494B27} true $(SolutionDir)IntDir\$(MSBuildProjectName)\ @@ -60,14 +60,14 @@ - h2_uchannel_test + h2_full+trace_test static Debug static Debug - h2_uchannel_test + h2_full+trace_test static Release static @@ -158,16 +158,13 @@ - + {1F1F9084-2A93-B80E-364F-5754894AFAB4} - - {80EA2691-C037-6DD3-D3AB-21510BF0E64B} - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} diff --git a/vsprojects/vcxproj/test/end2end/fixtures/h2_uchannel_test/h2_uchannel_test.vcxproj.filters b/vsprojects/vcxproj/test/end2end/fixtures/h2_full+trace_test/h2_full+trace_test.vcxproj.filters similarity index 68% rename from vsprojects/vcxproj/test/end2end/fixtures/h2_uchannel_test/h2_uchannel_test.vcxproj.filters rename to vsprojects/vcxproj/test/end2end/fixtures/h2_full+trace_test/h2_full+trace_test.vcxproj.filters index 611a643a333..87e8e7228be 100644 --- a/vsprojects/vcxproj/test/end2end/fixtures/h2_uchannel_test/h2_uchannel_test.vcxproj.filters +++ b/vsprojects/vcxproj/test/end2end/fixtures/h2_full+trace_test/h2_full+trace_test.vcxproj.filters @@ -1,23 +1,23 @@ - + test\core\end2end\fixtures - {0e4c3b3f-4d89-039d-c4d2-3bd39bb5701f} + {00848213-d356-89b0-1d05-8131961dc959} - {75084bcc-1809-7f7a-8989-d8fe2d5d404f} + {863a91b6-f5f9-5326-129a-10003d7af98f} - {9e123c51-0a8c-f222-f2f9-3cee19f2f99e} + {2733ff09-adc7-fd49-696f-5f72df2f44e2} - {999ee744-f147-9430-9a09-a16f69ecfa2a} + {62aa4eaf-c183-f2af-9ef9-a88ee802702c} diff --git a/vsprojects/vcxproj/test/end2end/fixtures/h2_full_test/h2_full_test.vcxproj b/vsprojects/vcxproj/test/end2end/fixtures/h2_full_test/h2_full_test.vcxproj index 96bd4361d0e..4ac31f1d349 100644 --- a/vsprojects/vcxproj/test/end2end/fixtures/h2_full_test/h2_full_test.vcxproj +++ b/vsprojects/vcxproj/test/end2end/fixtures/h2_full_test/h2_full_test.vcxproj @@ -165,9 +165,6 @@ {1F1F9084-2A93-B80E-364F-5754894AFAB4} - - {80EA2691-C037-6DD3-D3AB-21510BF0E64B} - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} diff --git a/vsprojects/vcxproj/test/end2end/fixtures/h2_oauth2_test/h2_oauth2_test.vcxproj b/vsprojects/vcxproj/test/end2end/fixtures/h2_oauth2_test/h2_oauth2_test.vcxproj index f89d32c192a..67cc3c81414 100644 --- a/vsprojects/vcxproj/test/end2end/fixtures/h2_oauth2_test/h2_oauth2_test.vcxproj +++ b/vsprojects/vcxproj/test/end2end/fixtures/h2_oauth2_test/h2_oauth2_test.vcxproj @@ -165,9 +165,6 @@ {1F1F9084-2A93-B80E-364F-5754894AFAB4} - - {80EA2691-C037-6DD3-D3AB-21510BF0E64B} - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} diff --git a/vsprojects/vcxproj/test/end2end/fixtures/h2_proxy_test/h2_proxy_test.vcxproj b/vsprojects/vcxproj/test/end2end/fixtures/h2_proxy_test/h2_proxy_test.vcxproj index 8f56454848f..f159dfbd4df 100644 --- a/vsprojects/vcxproj/test/end2end/fixtures/h2_proxy_test/h2_proxy_test.vcxproj +++ b/vsprojects/vcxproj/test/end2end/fixtures/h2_proxy_test/h2_proxy_test.vcxproj @@ -165,9 +165,6 @@ {1F1F9084-2A93-B80E-364F-5754894AFAB4} - - {80EA2691-C037-6DD3-D3AB-21510BF0E64B} - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} diff --git a/vsprojects/vcxproj/test/end2end/fixtures/h2_sockpair+trace_test/h2_sockpair+trace_test.vcxproj b/vsprojects/vcxproj/test/end2end/fixtures/h2_sockpair+trace_test/h2_sockpair+trace_test.vcxproj index 44427fb134a..134913df46f 100644 --- a/vsprojects/vcxproj/test/end2end/fixtures/h2_sockpair+trace_test/h2_sockpair+trace_test.vcxproj +++ b/vsprojects/vcxproj/test/end2end/fixtures/h2_sockpair+trace_test/h2_sockpair+trace_test.vcxproj @@ -165,9 +165,6 @@ {1F1F9084-2A93-B80E-364F-5754894AFAB4} - - {80EA2691-C037-6DD3-D3AB-21510BF0E64B} - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} diff --git a/vsprojects/vcxproj/test/end2end/fixtures/h2_sockpair_1byte_test/h2_sockpair_1byte_test.vcxproj b/vsprojects/vcxproj/test/end2end/fixtures/h2_sockpair_1byte_test/h2_sockpair_1byte_test.vcxproj index 5f4e43ff4e6..67c548629d4 100644 --- a/vsprojects/vcxproj/test/end2end/fixtures/h2_sockpair_1byte_test/h2_sockpair_1byte_test.vcxproj +++ b/vsprojects/vcxproj/test/end2end/fixtures/h2_sockpair_1byte_test/h2_sockpair_1byte_test.vcxproj @@ -165,9 +165,6 @@ {1F1F9084-2A93-B80E-364F-5754894AFAB4} - - {80EA2691-C037-6DD3-D3AB-21510BF0E64B} - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} diff --git a/vsprojects/vcxproj/test/end2end/fixtures/h2_sockpair_test/h2_sockpair_test.vcxproj b/vsprojects/vcxproj/test/end2end/fixtures/h2_sockpair_test/h2_sockpair_test.vcxproj index 96359174bcf..515ea021ea0 100644 --- a/vsprojects/vcxproj/test/end2end/fixtures/h2_sockpair_test/h2_sockpair_test.vcxproj +++ b/vsprojects/vcxproj/test/end2end/fixtures/h2_sockpair_test/h2_sockpair_test.vcxproj @@ -165,9 +165,6 @@ {1F1F9084-2A93-B80E-364F-5754894AFAB4} - - {80EA2691-C037-6DD3-D3AB-21510BF0E64B} - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} diff --git a/vsprojects/vcxproj/test/end2end/fixtures/h2_ssl_proxy_test/h2_ssl_proxy_test.vcxproj b/vsprojects/vcxproj/test/end2end/fixtures/h2_ssl_proxy_test/h2_ssl_proxy_test.vcxproj index 0693d6573a5..c3463b9d61d 100644 --- a/vsprojects/vcxproj/test/end2end/fixtures/h2_ssl_proxy_test/h2_ssl_proxy_test.vcxproj +++ b/vsprojects/vcxproj/test/end2end/fixtures/h2_ssl_proxy_test/h2_ssl_proxy_test.vcxproj @@ -165,9 +165,6 @@ {1F1F9084-2A93-B80E-364F-5754894AFAB4} - - {80EA2691-C037-6DD3-D3AB-21510BF0E64B} - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} diff --git a/vsprojects/vcxproj/test/end2end/fixtures/h2_ssl_test/h2_ssl_test.vcxproj b/vsprojects/vcxproj/test/end2end/fixtures/h2_ssl_test/h2_ssl_test.vcxproj index 64e0c1be4a8..217e4153c9a 100644 --- a/vsprojects/vcxproj/test/end2end/fixtures/h2_ssl_test/h2_ssl_test.vcxproj +++ b/vsprojects/vcxproj/test/end2end/fixtures/h2_ssl_test/h2_ssl_test.vcxproj @@ -165,9 +165,6 @@ {1F1F9084-2A93-B80E-364F-5754894AFAB4} - - {80EA2691-C037-6DD3-D3AB-21510BF0E64B} - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} diff --git a/vsprojects/vcxproj/test/end2end/tests/end2end_nosec_tests/end2end_nosec_tests.vcxproj b/vsprojects/vcxproj/test/end2end/tests/end2end_nosec_tests/end2end_nosec_tests.vcxproj index 2f3b591dfc2..568a0515aae 100644 --- a/vsprojects/vcxproj/test/end2end/tests/end2end_nosec_tests/end2end_nosec_tests.vcxproj +++ b/vsprojects/vcxproj/test/end2end/tests/end2end_nosec_tests/end2end_nosec_tests.vcxproj @@ -147,8 +147,8 @@ - + diff --git a/vsprojects/vcxproj/test/end2end/tests/end2end_nosec_tests/end2end_nosec_tests.vcxproj.filters b/vsprojects/vcxproj/test/end2end/tests/end2end_nosec_tests/end2end_nosec_tests.vcxproj.filters index c63ebe7d81b..ecc23e868da 100644 --- a/vsprojects/vcxproj/test/end2end/tests/end2end_nosec_tests/end2end_nosec_tests.vcxproj.filters +++ b/vsprojects/vcxproj/test/end2end/tests/end2end_nosec_tests/end2end_nosec_tests.vcxproj.filters @@ -111,12 +111,12 @@ - - test\core\end2end\tests - test\core\end2end + + test\core\end2end\tests + diff --git a/vsprojects/vcxproj/test/end2end/tests/end2end_tests/end2end_tests.vcxproj b/vsprojects/vcxproj/test/end2end/tests/end2end_tests/end2end_tests.vcxproj index 9d7bdc574cf..3e0092ef874 100644 --- a/vsprojects/vcxproj/test/end2end/tests/end2end_tests/end2end_tests.vcxproj +++ b/vsprojects/vcxproj/test/end2end/tests/end2end_tests/end2end_tests.vcxproj @@ -147,8 +147,8 @@ - + @@ -227,9 +227,6 @@ - - {80EA2691-C037-6DD3-D3AB-21510BF0E64B} - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} diff --git a/vsprojects/vcxproj/test/end2end/tests/end2end_tests/end2end_tests.vcxproj.filters b/vsprojects/vcxproj/test/end2end/tests/end2end_tests/end2end_tests.vcxproj.filters index c30054a17ba..c3aabc48a03 100644 --- a/vsprojects/vcxproj/test/end2end/tests/end2end_tests/end2end_tests.vcxproj.filters +++ b/vsprojects/vcxproj/test/end2end/tests/end2end_tests/end2end_tests.vcxproj.filters @@ -114,12 +114,12 @@ - - test\core\end2end\tests - test\core\end2end + + test\core\end2end\tests + diff --git a/vsprojects/vcxproj/test/gpr_backoff_test/gpr_backoff_test.vcxproj b/vsprojects/vcxproj/test/gpr_backoff_test/gpr_backoff_test.vcxproj new file mode 100644 index 00000000000..6aa292ef4f5 --- /dev/null +++ b/vsprojects/vcxproj/test/gpr_backoff_test/gpr_backoff_test.vcxproj @@ -0,0 +1,193 @@ + + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {889F570D-E046-BD52-9E4C-B4CD13DFE2DB} + true + $(SolutionDir)IntDir\$(MSBuildProjectName)\ + + + + v100 + + + v110 + + + v120 + + + v140 + + + Application + true + Unicode + + + Application + false + true + Unicode + + + + + + + + + + + + + + gpr_backoff_test + static + Debug + static + Debug + + + gpr_backoff_test + static + Release + static + Release + + + + NotUsing + Level3 + Disabled + WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) + true + MultiThreadedDebug + true + None + false + + + Console + true + false + + + + + + NotUsing + Level3 + Disabled + WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) + true + MultiThreadedDebug + true + None + false + + + Console + true + false + + + + + + NotUsing + Level3 + MaxSpeed + WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) + true + true + true + MultiThreaded + true + None + false + + + Console + true + false + true + true + + + + + + NotUsing + Level3 + MaxSpeed + WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) + true + true + true + MultiThreaded + true + None + false + + + Console + true + false + true + true + + + + + + + + + + {EAB0A629-17A9-44DB-B5FF-E91A721FE037} + + + {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} + + + + + + + + + + + + + + + This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + + + + + + + + + diff --git a/vsprojects/vcxproj/test/gpr_backoff_test/gpr_backoff_test.vcxproj.filters b/vsprojects/vcxproj/test/gpr_backoff_test/gpr_backoff_test.vcxproj.filters new file mode 100644 index 00000000000..eb3c1bbd8c2 --- /dev/null +++ b/vsprojects/vcxproj/test/gpr_backoff_test/gpr_backoff_test.vcxproj.filters @@ -0,0 +1,21 @@ + + + + + test\core\support + + + + + + {4b7f1d25-d344-0bcb-63d8-2ba959874ea8} + + + {2bd2fba5-8799-2c78-469f-ec3ba6b01da8} + + + {2ef0cfa7-fe3d-2b82-7d0e-f9e293e8f98c} + + + + diff --git a/vsprojects/vcxproj/test/httpcli_parser_test/httpcli_parser_test.vcxproj b/vsprojects/vcxproj/test/http_parser_test/http_parser_test.vcxproj similarity index 98% rename from vsprojects/vcxproj/test/httpcli_parser_test/httpcli_parser_test.vcxproj rename to vsprojects/vcxproj/test/http_parser_test/http_parser_test.vcxproj index 6f976309c59..bd5cf1212c5 100644 --- a/vsprojects/vcxproj/test/httpcli_parser_test/httpcli_parser_test.vcxproj +++ b/vsprojects/vcxproj/test/http_parser_test/http_parser_test.vcxproj @@ -20,7 +20,7 @@ - {B6F60D1C-D4F3-0F1A-4A2F-9134629B7848} + {49D7E690-BDA1-5236-1ABF-3D81C1559DF7} true $(SolutionDir)IntDir\$(MSBuildProjectName)\ @@ -60,14 +60,14 @@ - httpcli_parser_test + http_parser_test static Debug static Debug - httpcli_parser_test + http_parser_test static Release static @@ -158,7 +158,7 @@ - + diff --git a/vsprojects/vcxproj/test/httpcli_parser_test/httpcli_parser_test.vcxproj.filters b/vsprojects/vcxproj/test/http_parser_test/http_parser_test.vcxproj.filters similarity index 51% rename from vsprojects/vcxproj/test/httpcli_parser_test/httpcli_parser_test.vcxproj.filters rename to vsprojects/vcxproj/test/http_parser_test/http_parser_test.vcxproj.filters index 1cdc32fb850..4353c3b61ff 100644 --- a/vsprojects/vcxproj/test/httpcli_parser_test/httpcli_parser_test.vcxproj.filters +++ b/vsprojects/vcxproj/test/http_parser_test/http_parser_test.vcxproj.filters @@ -1,20 +1,20 @@ - - test\core\httpcli + + test\core\http - {f3562e8b-3020-c79a-4e3b-c895f9e49f44} + {1d07f09d-a0ec-d684-3589-bff02afbe830} - {db527686-b5c7-68df-a106-bd919f60742a} + {eedab59d-9f19-9172-cf0e-83a839217afc} - - {8e60d460-93de-c6e1-b67b-bfae71bd9bca} + + {1fcac48f-3718-00ea-6c0c-aafa1a4de528} diff --git a/vsprojects/vcxproj/test/httpcli_format_request_test/httpcli_format_request_test.vcxproj b/vsprojects/vcxproj/test/httpcli_format_request_test/httpcli_format_request_test.vcxproj index 97f14f6c8e4..5515349b9b2 100644 --- a/vsprojects/vcxproj/test/httpcli_format_request_test/httpcli_format_request_test.vcxproj +++ b/vsprojects/vcxproj/test/httpcli_format_request_test/httpcli_format_request_test.vcxproj @@ -158,7 +158,7 @@ - + diff --git a/vsprojects/vcxproj/test/httpcli_format_request_test/httpcli_format_request_test.vcxproj.filters b/vsprojects/vcxproj/test/httpcli_format_request_test/httpcli_format_request_test.vcxproj.filters index c54ded579bc..6f941f4361d 100644 --- a/vsprojects/vcxproj/test/httpcli_format_request_test/httpcli_format_request_test.vcxproj.filters +++ b/vsprojects/vcxproj/test/httpcli_format_request_test/httpcli_format_request_test.vcxproj.filters @@ -1,8 +1,8 @@ - - test\core\httpcli + + test\core\http @@ -13,8 +13,8 @@ {f033cf49-b830-5698-3989-6ec75817333b} - - {75330e6a-521e-5f90-defd-652a4591dbe9} + + {51615bc9-b61d-8d7d-9abb-5409276c04ec}