From bb84c6a70ee15759fcc5c612847a1681f0ad68af Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Thu, 17 Mar 2016 10:42:57 -0700 Subject: Make stack traces show up in run_tests.py logs --- test/core/util/test_config.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'test') diff --git a/test/core/util/test_config.c b/test/core/util/test_config.c index bf672e8f67..f408048fdf 100644 --- a/test/core/util/test_config.c +++ b/test/core/util/test_config.c @@ -99,6 +99,7 @@ static void print_current_stack() { 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); @@ -154,6 +155,7 @@ static void print_stack_from_context(CONTEXT c) { fwprintf( stderr, L"*** %016I64X %ls - %016I64X\n", (DWORD64)(s.AddrPC.Offset), has_symbol ? symbol->Name : L"<>", (DWORD64)symbol->Address); + fflush(stderr); } free(symbol); -- cgit v1.2.3 From 506f60fcff2a84125e9d00031ea084c4fd9f7e5b Mon Sep 17 00:00:00 2001 From: vjpai Date: Fri, 18 Mar 2016 11:28:26 -0700 Subject: Fix an include --- test/core/iomgr/udp_server_test.c | 1 + 1 file changed, 1 insertion(+) (limited to 'test') diff --git a/test/core/iomgr/udp_server_test.c b/test/core/iomgr/udp_server_test.c index ce3c23b4bf..365b5c002b 100644 --- a/test/core/iomgr/udp_server_test.c +++ b/test/core/iomgr/udp_server_test.c @@ -34,6 +34,7 @@ #include "src/core/iomgr/iomgr.h" #include "src/core/iomgr/pollset_posix.h" #include "src/core/iomgr/udp_server.h" +#include #include #include #include -- cgit v1.2.3 From 711766dc7553734ab239519ba30d3ca165b24874 Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Mon, 21 Mar 2016 11:27:37 -0700 Subject: Ensure that no #includes are inside of a namespace. --- test/cpp/qps/limit_cores.cc | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'test') diff --git a/test/cpp/qps/limit_cores.cc b/test/cpp/qps/limit_cores.cc index fad9a323af..c9931d9130 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; @@ -72,6 +73,10 @@ int LimitCores(const int* cores, int cores_size) { return cores_set; } #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 -- cgit v1.2.3 From ca2886a05c85d634d324de6a5e359f34664d76b8 Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Mon, 21 Mar 2016 12:04:18 -0700 Subject: Made the code simpler to parse for humans --- test/cpp/qps/limit_cores.cc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'test') diff --git a/test/cpp/qps/limit_cores.cc b/test/cpp/qps/limit_cores.cc index c9931d9130..59ed369067 100644 --- a/test/cpp/qps/limit_cores.cc +++ b/test/cpp/qps/limit_cores.cc @@ -72,13 +72,16 @@ int LimitCores(const int* cores, int cores_size) { CPU_FREE(cpup); return cores_set; } -#else +} // 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 -- cgit v1.2.3 From f64befd27fb08104fb5d1a7006d4f8ac08510f8f Mon Sep 17 00:00:00 2001 From: yang-g Date: Mon, 21 Mar 2016 14:04:10 -0700 Subject: Make a copy of ByteBuffer when writing --- include/grpc++/support/byte_buffer.h | 4 ++-- test/cpp/end2end/generic_end2end_test.cc | 5 +++++ test/cpp/util/byte_buffer_test.cc | 20 +++++++++++++++++++- 3 files changed, 26 insertions(+), 3 deletions(-) (limited to 'test') diff --git a/include/grpc++/support/byte_buffer.h b/include/grpc++/support/byte_buffer.h index 82591a88ef..27307f8fcd 100644 --- a/include/grpc++/support/byte_buffer.h +++ b/include/grpc++/support/byte_buffer.h @@ -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/test/cpp/end2end/generic_end2end_test.cc b/test/cpp/end2end/generic_end2end_test.cc index 4e6d50ea80..8dad1c2005 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/util/byte_buffer_test.cc b/test/cpp/util/byte_buffer_test.cc index f36c32cac5..eb9dabcc2a 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 @@ -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 -- cgit v1.2.3 From e07c368861b171c4f878e3dff651b61e8aeada59 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Mon, 21 Mar 2016 14:35:40 -0700 Subject: Update test --- test/core/transport/chttp2/timeout_encoding_test.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'test') diff --git a/test/core/transport/chttp2/timeout_encoding_test.c b/test/core/transport/chttp2/timeout_encoding_test.c index 483e79fb25..b7dd60e9b1 100644 --- a/test/core/transport/chttp2/timeout_encoding_test.c +++ b/test/core/transport/chttp2/timeout_encoding_test.c @@ -36,11 +36,11 @@ #include #include -#include "src/core/support/string.h" #include #include #include #include +#include "src/core/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) { -- cgit v1.2.3 From fb349b9f7150c20a98565bfffdceaab6b50a92a2 Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Mon, 21 Mar 2016 15:37:20 -0700 Subject: removed uchannels --- BUILD | 6 - Makefile | 58 - binding.gyp | 1 - build.yaml | 2 - config.m4 | 1 - gRPC.podspec | 3 - grpc.gemspec | 2 - package.json | 2 - package.xml | 2 - src/core/census/grpc_plugin.c | 2 - src/core/channel/client_uchannel.c | 233 -- src/core/channel/client_uchannel.h | 60 - src/core/channel/subchannel_call_holder.h | 5 +- src/core/surface/channel_connectivity.c | 17 +- src/core/surface/channel_init.c | 2 - src/core/surface/channel_stack_type.c | 2 - src/core/surface/channel_stack_type.h | 3 - src/core/surface/init.c | 6 - src/python/grpcio/grpc_core_dependencies.py | 1 - test/core/end2end/fixtures/h2_uchannel.c | 350 -- test/core/end2end/gen_build_yaml.py | 1 - tools/doxygen/Doxyfile.core.internal | 2 - tools/run_tests/sources_and_headers.json | 40 - tools/run_tests/tests.json | 3442 ++++++-------------- vsprojects/buildtests_c.sln | 56 - vsprojects/vcxproj/grpc/grpc.vcxproj | 3 - vsprojects/vcxproj/grpc/grpc.vcxproj.filters | 6 - .../vcxproj/grpc_unsecure/grpc_unsecure.vcxproj | 3 - .../grpc_unsecure/grpc_unsecure.vcxproj.filters | 6 - .../h2_uchannel_nosec_test.vcxproj | 202 -- .../h2_uchannel_nosec_test.vcxproj.filters | 24 - .../h2_uchannel_test/h2_uchannel_test.vcxproj | 202 -- .../h2_uchannel_test.vcxproj.filters | 24 - 33 files changed, 1054 insertions(+), 3715 deletions(-) delete mode 100644 src/core/channel/client_uchannel.c delete mode 100644 src/core/channel/client_uchannel.h delete mode 100644 test/core/end2end/fixtures/h2_uchannel.c delete mode 100644 vsprojects/vcxproj/test/end2end/fixtures/h2_uchannel_nosec_test/h2_uchannel_nosec_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/end2end/fixtures/h2_uchannel_nosec_test/h2_uchannel_nosec_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/end2end/fixtures/h2_uchannel_test/h2_uchannel_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/end2end/fixtures/h2_uchannel_test/h2_uchannel_test.vcxproj.filters (limited to 'test') diff --git a/BUILD b/BUILD index 514aea8f53..2c2cce76c4 100644 --- a/BUILD +++ b/BUILD @@ -163,7 +163,6 @@ cc_library( "src/core/channel/channel_stack.h", "src/core/channel/channel_stack_builder.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", @@ -305,7 +304,6 @@ cc_library( "src/core/channel/channel_stack.c", "src/core/channel/channel_stack_builder.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", @@ -537,7 +535,6 @@ cc_library( "src/core/channel/channel_stack.h", "src/core/channel/channel_stack_builder.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", @@ -666,7 +663,6 @@ cc_library( "src/core/channel/channel_stack.c", "src/core/channel/channel_stack_builder.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", @@ -1367,7 +1363,6 @@ objc_library( "src/core/channel/channel_stack.c", "src/core/channel/channel_stack_builder.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", @@ -1544,7 +1539,6 @@ objc_library( "src/core/channel/channel_stack.h", "src/core/channel/channel_stack_builder.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", diff --git a/Makefile b/Makefile index c7f7c9c450..37f0167305 100644 --- a/Makefile +++ b/Makefile @@ -1084,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 @@ -1098,7 +1097,6 @@ 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 @@ -1307,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 \ @@ -1321,7 +1318,6 @@ buildtests_c: privatelibs_c \ $(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 \ @@ -2414,7 +2410,6 @@ LIBGRPC_SRC = \ src/core/channel/channel_stack.c \ src/core/channel/channel_stack_builder.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 \ @@ -2775,7 +2770,6 @@ LIBGRPC_UNSECURE_SRC = \ src/core/channel/channel_stack.c \ src/core/channel/channel_stack_builder.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 \ @@ -13052,38 +13046,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)/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)/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)/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 \ @@ -13368,26 +13330,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 \ diff --git a/binding.gyp b/binding.gyp index 5f9dfd9c6d..c16697786a 100644 --- a/binding.gyp +++ b/binding.gyp @@ -565,7 +565,6 @@ 'src/core/channel/channel_stack.c', 'src/core/channel/channel_stack_builder.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', diff --git a/build.yaml b/build.yaml index deec44f143..28e9ce6d75 100644 --- a/build.yaml +++ b/build.yaml @@ -253,7 +253,6 @@ filegroups: - src/core/channel/channel_stack.h - src/core/channel/channel_stack_builder.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 @@ -375,7 +374,6 @@ filegroups: - src/core/channel/channel_stack.c - src/core/channel/channel_stack_builder.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 diff --git a/config.m4 b/config.m4 index 91b87e2448..2d42c405ec 100644 --- a/config.m4 +++ b/config.m4 @@ -87,7 +87,6 @@ if test "$PHP_GRPC" != "no"; then src/core/channel/channel_stack.c \ src/core/channel/channel_stack_builder.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 \ diff --git a/gRPC.podspec b/gRPC.podspec index 86121c9d28..65f24a658c 100644 --- a/gRPC.podspec +++ b/gRPC.podspec @@ -167,7 +167,6 @@ Pod::Spec.new do |s| 'src/core/channel/channel_stack.h', 'src/core/channel/channel_stack_builder.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', @@ -322,7 +321,6 @@ Pod::Spec.new do |s| 'src/core/channel/channel_stack.c', 'src/core/channel/channel_stack_builder.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', @@ -497,7 +495,6 @@ Pod::Spec.new do |s| 'src/core/channel/channel_stack.h', 'src/core/channel/channel_stack_builder.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', diff --git a/grpc.gemspec b/grpc.gemspec index c06262212d..0873286e21 100755 --- a/grpc.gemspec +++ b/grpc.gemspec @@ -163,7 +163,6 @@ Gem::Specification.new do |s| s.files += %w( src/core/channel/channel_stack.h ) s.files += %w( src/core/channel/channel_stack_builder.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 ) @@ -305,7 +304,6 @@ Gem::Specification.new do |s| s.files += %w( src/core/channel/channel_stack.c ) s.files += %w( src/core/channel/channel_stack_builder.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 ) diff --git a/package.json b/package.json index 371dfdce99..bc15183c93 100644 --- a/package.json +++ b/package.json @@ -105,7 +105,6 @@ "src/core/channel/channel_stack.h", "src/core/channel/channel_stack_builder.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", @@ -247,7 +246,6 @@ "src/core/channel/channel_stack.c", "src/core/channel/channel_stack_builder.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", diff --git a/package.xml b/package.xml index a0d8bfd885..95bc835602 100644 --- a/package.xml +++ b/package.xml @@ -167,7 +167,6 @@ - @@ -309,7 +308,6 @@ - diff --git a/src/core/census/grpc_plugin.c b/src/core/census/grpc_plugin.c index 3be2a48eb8..8d60a5197e 100644 --- a/src/core/census/grpc_plugin.c +++ b/src/core/census/grpc_plugin.c @@ -63,8 +63,6 @@ void census_grpc_plugin_init(void) { } grpc_channel_init_register_stage(GRPC_CLIENT_CHANNEL, INT_MAX, maybe_add_census_filter, NULL); - grpc_channel_init_register_stage(GRPC_CLIENT_UCHANNEL, INT_MAX, - maybe_add_census_filter, NULL); grpc_channel_init_register_stage(GRPC_SERVER_CHANNEL, INT_MAX, maybe_add_census_filter, NULL); } diff --git a/src/core/channel/client_uchannel.c b/src/core/channel/client_uchannel.c deleted file mode 100644 index d32327206e..0000000000 --- a/src/core/channel/client_uchannel.c +++ /dev/null @@ -1,233 +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; - grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - - channel = - grpc_channel_create(&exec_ctx, NULL, args, GRPC_CLIENT_UCHANNEL, NULL); - - 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/channel/client_uchannel.h b/src/core/channel/client_uchannel.h deleted file mode 100644 index 8bb288e7d4..0000000000 --- a/src/core/channel/client_uchannel.h +++ /dev/null @@ -1,60 +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. - * - */ - -#ifndef GRPC_CORE_CHANNEL_CLIENT_UCHANNEL_H -#define GRPC_CORE_CHANNEL_CLIENT_UCHANNEL_H - -#include "src/core/channel/channel_stack.h" -#include "src/core/client_config/resolver.h" - -#define GRPC_MICROCHANNEL_SUBCHANNEL_ARG "grpc.microchannel_subchannel_key" - -/* A client microchannel (aka uchannel) is a channel wrapping a subchannel, for - * the purposes of lightweight RPC communications from within the core.*/ - -extern const grpc_channel_filter grpc_client_uchannel_filter; - -grpc_connectivity_state grpc_client_uchannel_check_connectivity_state( - grpc_exec_ctx *exec_ctx, grpc_channel_element *elem, int try_to_connect); - -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); - -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_CORE_CHANNEL_CLIENT_UCHANNEL_H */ diff --git a/src/core/channel/subchannel_call_holder.h b/src/core/channel/subchannel_call_holder.h index 9086cdc882..84b4657db4 100644 --- a/src/core/channel/subchannel_call_holder.h +++ b/src/core/channel/subchannel_call_holder.h @@ -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; diff --git a/src/core/surface/channel_connectivity.c b/src/core/surface/channel_connectivity.c index 2dd4fce26b..18267939ed 100644 --- a/src/core/surface/channel_connectivity.c +++ b/src/core/surface/channel_connectivity.c @@ -37,7 +37,6 @@ #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" @@ -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/surface/channel_init.c b/src/core/surface/channel_init.c index 538be84696..ac962f3972 100644 --- a/src/core/surface/channel_init.c +++ b/src/core/surface/channel_init.c @@ -112,8 +112,6 @@ static const char *name_for_type(grpc_channel_stack_type type) { return "CLIENT_SUBCHANNEL"; case GRPC_SERVER_CHANNEL: return "SERVER_CHANNEL"; - case GRPC_CLIENT_UCHANNEL: - return "CLIENT_UCHANNEL"; case GRPC_CLIENT_LAME_CHANNEL: return "CLIENT_LAME_CHANNEL"; case GRPC_CLIENT_DIRECT_CHANNEL: diff --git a/src/core/surface/channel_stack_type.c b/src/core/surface/channel_stack_type.c index 6fd33d411d..29bb7704f8 100644 --- a/src/core/surface/channel_stack_type.c +++ b/src/core/surface/channel_stack_type.c @@ -39,8 +39,6 @@ bool grpc_channel_stack_type_is_client(grpc_channel_stack_type type) { switch (type) { case GRPC_CLIENT_CHANNEL: return true; - case GRPC_CLIENT_UCHANNEL: - return true; case GRPC_CLIENT_SUBCHANNEL: return true; case GRPC_CLIENT_LAME_CHANNEL: diff --git a/src/core/surface/channel_stack_type.h b/src/core/surface/channel_stack_type.h index 846391a68a..75a1b9c072 100644 --- a/src/core/surface/channel_stack_type.h +++ b/src/core/surface/channel_stack_type.h @@ -39,9 +39,6 @@ typedef enum { // normal top-half client channel with load-balancing, connection management GRPC_CLIENT_CHANNEL, - // abbreviated top-half client channel bound to one subchannel - for internal - // load balancing implementation - GRPC_CLIENT_UCHANNEL, // bottom-half of a client channel: everything that happens post-load // balancing (bound to a specific transport) GRPC_CLIENT_SUBCHANNEL, diff --git a/src/core/surface/init.c b/src/core/surface/init.c index b50770959f..2ce50a0d82 100644 --- a/src/core/surface/init.c +++ b/src/core/surface/init.c @@ -45,7 +45,6 @@ #include "src/core/channel/compress_filter.h" #include "src/core/channel/connected_channel.h" #include "src/core/channel/client_channel.h" -#include "src/core/channel/client_uchannel.h" #include "src/core/channel/http_client_filter.h" #include "src/core/channel/http_server_filter.h" #include "src/core/client_config/lb_policy_registry.h" @@ -112,9 +111,6 @@ static void register_builtin_channel_init() { grpc_channel_init_register_stage(GRPC_CLIENT_DIRECT_CHANNEL, INT_MAX, prepend_filter, (void *)&grpc_compress_filter); - grpc_channel_init_register_stage(GRPC_CLIENT_UCHANNEL, 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, @@ -134,8 +130,6 @@ static void register_builtin_channel_init() { 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_UCHANNEL, INT_MAX, append_filter, - (void *)&grpc_client_uchannel_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, diff --git a/src/python/grpcio/grpc_core_dependencies.py b/src/python/grpcio/grpc_core_dependencies.py index b9e7d8c898..29506e69bc 100644 --- a/src/python/grpcio/grpc_core_dependencies.py +++ b/src/python/grpcio/grpc_core_dependencies.py @@ -81,7 +81,6 @@ CORE_SOURCE_FILES = [ 'src/core/channel/channel_stack.c', 'src/core/channel/channel_stack_builder.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', diff --git a/test/core/end2end/fixtures/h2_uchannel.c b/test/core/end2end/fixtures/h2_uchannel.c deleted file mode 100644 index 25a4804bea..0000000000 --- a/test/core/end2end/fixtures/h2_uchannel.c +++ /dev/null @@ -1,350 +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); - } 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; - grpc_resolver *resolver; - subchannel_factory *f; - grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - - channel = - grpc_channel_create(&exec_ctx, target, args, GRPC_CLIENT_CHANNEL, NULL); - - 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_subchannel; - 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_subchannel = 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_subchannel); - 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/gen_build_yaml.py b/test/core/end2end/gen_build_yaml.py index fa32601c60..93b48c331c 100755 --- a/test/core/end2end/gen_build_yaml.py +++ b/test/core/end2end/gen_build_yaml.py @@ -72,7 +72,6 @@ END2END_FIXTURES = { '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, } diff --git a/tools/doxygen/Doxyfile.core.internal b/tools/doxygen/Doxyfile.core.internal index 4fcfba3983..694fd2820b 100644 --- a/tools/doxygen/Doxyfile.core.internal +++ b/tools/doxygen/Doxyfile.core.internal @@ -779,7 +779,6 @@ src/core/channel/channel_args.h \ src/core/channel/channel_stack.h \ src/core/channel/channel_stack_builder.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 \ @@ -921,7 +920,6 @@ src/core/channel/channel_args.c \ src/core/channel/channel_stack.c \ src/core/channel/channel_stack_builder.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 \ diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json index 28647e4406..3b787d680a 100644 --- a/tools/run_tests/sources_and_headers.json +++ b/tools/run_tests/sources_and_headers.json @@ -3472,23 +3472,6 @@ "third_party": false, "type": "target" }, - { - "deps": [ - "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_tests", @@ -3710,23 +3693,6 @@ "third_party": false, "type": "target" }, - { - "deps": [ - "end2end_nosec_tests", - "gpr", - "gpr_test_util", - "grpc_test_util_unsecure", - "grpc_unsecure" - ], - "headers": [], - "language": "c", - "name": "h2_uchannel_nosec_test", - "src": [ - "test/core/end2end/fixtures/h2_uchannel.c" - ], - "third_party": false, - "type": "target" - }, { "deps": [ "end2end_nosec_tests", @@ -3967,7 +3933,6 @@ "src/core/channel/channel_stack.h", "src/core/channel/channel_stack_builder.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", @@ -4138,8 +4103,6 @@ "src/core/channel/channel_stack_builder.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", @@ -4594,7 +4557,6 @@ "src/core/channel/channel_stack.h", "src/core/channel/channel_stack_builder.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", @@ -4750,8 +4712,6 @@ "src/core/channel/channel_stack_builder.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", diff --git a/tools/run_tests/tests.json b/tools/run_tests/tests.json index bd652f2aa7..8db852c0f3 100644 --- a/tools/run_tests/tests.json +++ b/tools/run_tests/tests.json @@ -15226,7 +15226,6 @@ "bad_hostname" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -15235,9 +15234,8 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -15248,7 +15246,6 @@ "binary_metadata" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -15257,9 +15254,8 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -15270,7 +15266,6 @@ "call_creds" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -15279,9 +15274,8 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -15292,7 +15286,6 @@ "cancel_after_accept" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -15301,9 +15294,8 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -15314,7 +15306,6 @@ "cancel_after_client_done" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -15323,9 +15314,8 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -15336,7 +15326,6 @@ "cancel_after_invoke" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -15345,9 +15334,8 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -15358,7 +15346,6 @@ "cancel_before_invoke" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -15367,9 +15354,8 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -15380,7 +15366,6 @@ "cancel_in_a_vacuum" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -15389,9 +15374,8 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -15402,7 +15386,6 @@ "cancel_with_status" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -15411,9 +15394,8 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -15424,7 +15406,6 @@ "compressed_payload" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -15433,9 +15414,8 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -15443,21 +15423,19 @@ }, { "args": [ - "empty_batch" + "connectivity" ], "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_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -15465,21 +15443,19 @@ }, { "args": [ - "graceful_server_shutdown" + "disappearing_server" ], "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_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -15487,10 +15463,9 @@ }, { "args": [ - "high_initial_seqno" + "empty_batch" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -15499,9 +15474,8 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -15509,21 +15483,19 @@ }, { "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_uchannel_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -15531,10 +15503,9 @@ }, { "args": [ - "invoke_large_request" + "high_initial_seqno" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -15543,9 +15514,8 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -15553,10 +15523,9 @@ }, { "args": [ - "large_metadata" + "hpack_size" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -15565,9 +15534,8 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -15575,10 +15543,9 @@ }, { "args": [ - "max_concurrent_streams" + "invoke_large_request" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -15587,9 +15554,8 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -15597,21 +15563,19 @@ }, { "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_uchannel_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -15619,10 +15583,9 @@ }, { "args": [ - "negative_deadline" + "max_concurrent_streams" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -15631,9 +15594,8 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -15641,21 +15603,19 @@ }, { "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_uchannel_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -15663,21 +15623,19 @@ }, { "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_uchannel_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -15685,10 +15643,9 @@ }, { "args": [ - "ping_pong_streaming" + "no_op" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -15697,9 +15654,8 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -15707,21 +15663,19 @@ }, { "args": [ - "registered_call" + "payload" ], "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_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -15729,10 +15683,9 @@ }, { "args": [ - "request_with_flags" + "ping" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -15741,9 +15694,8 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -15751,10 +15703,9 @@ }, { "args": [ - "request_with_payload" + "ping_pong_streaming" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -15763,9 +15714,8 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -15773,10 +15723,9 @@ }, { "args": [ - "server_finishes_request" + "registered_call" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -15785,9 +15734,8 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -15795,10 +15743,9 @@ }, { "args": [ - "shutdown_finishes_calls" + "request_with_flags" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -15807,9 +15754,8 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -15817,10 +15763,9 @@ }, { "args": [ - "shutdown_finishes_tags" + "request_with_payload" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -15829,9 +15774,8 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -15839,10 +15783,9 @@ }, { "args": [ - "simple_metadata" + "server_finishes_request" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -15851,9 +15794,8 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -15861,10 +15803,9 @@ }, { "args": [ - "simple_request" + "shutdown_finishes_calls" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -15873,9 +15814,8 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -15883,10 +15823,9 @@ }, { "args": [ - "trailing_metadata" + "shutdown_finishes_tags" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -15895,9 +15834,8 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -15905,14 +15843,14 @@ }, { "args": [ - "bad_hostname" + "simple_delayed_request" ], "ci_platforms": [ "linux", "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", @@ -15925,7 +15863,7 @@ }, { "args": [ - "binary_metadata" + "simple_metadata" ], "ci_platforms": [ "linux", @@ -15945,7 +15883,7 @@ }, { "args": [ - "call_creds" + "simple_request" ], "ci_platforms": [ "linux", @@ -15965,14 +15903,14 @@ }, { "args": [ - "cancel_after_accept" + "trailing_metadata" ], "ci_platforms": [ "linux", "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", @@ -15985,162 +15923,194 @@ }, { "args": [ - "cancel_after_client_done" + "bad_hostname" ], "ci_platforms": [ - "linux", - "mac", - "posix" + "linux" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_uds+poll_test", "platforms": [ - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "cancel_after_invoke" + "binary_metadata" ], "ci_platforms": [ - "linux", - "mac", - "posix" + "linux" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_uds+poll_test", "platforms": [ - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "cancel_before_invoke" + "call_creds" ], "ci_platforms": [ - "linux", - "mac", - "posix" + "linux" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_uds+poll_test", "platforms": [ - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "cancel_in_a_vacuum" + "cancel_after_accept" ], "ci_platforms": [ - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_uds+poll_test", "platforms": [ - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "cancel_with_status" + "cancel_after_client_done" ], "ci_platforms": [ - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_uds+poll_test", "platforms": [ - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "compressed_payload" + "cancel_after_invoke" ], "ci_platforms": [ - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_uds+poll_test", "platforms": [ - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "connectivity" + "cancel_before_invoke" ], "ci_platforms": [ - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_uds+poll_test", "platforms": [ - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "disappearing_server" + "cancel_in_a_vacuum" ], "ci_platforms": [ - "linux", - "mac", - "posix" + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uds+poll_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "cancel_with_status" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uds+poll_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "compressed_payload" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uds+poll_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "connectivity" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uds+poll_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "disappearing_server" + ], + "ci_platforms": [ + "linux" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_uds+poll_test", "platforms": [ - "linux", - "mac", - "posix" + "linux" ] }, { @@ -16148,19 +16118,15 @@ "empty_batch" ], "ci_platforms": [ - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_uds+poll_test", "platforms": [ - "linux", - "mac", - "posix" + "linux" ] }, { @@ -16168,19 +16134,15 @@ "graceful_server_shutdown" ], "ci_platforms": [ - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_uds+poll_test", "platforms": [ - "linux", - "mac", - "posix" + "linux" ] }, { @@ -16188,19 +16150,15 @@ "high_initial_seqno" ], "ci_platforms": [ - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_uds+poll_test", "platforms": [ - "linux", - "mac", - "posix" + "linux" ] }, { @@ -16208,19 +16166,15 @@ "hpack_size" ], "ci_platforms": [ - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_uds+poll_test", "platforms": [ - "linux", - "mac", - "posix" + "linux" ] }, { @@ -16228,19 +16182,15 @@ "invoke_large_request" ], "ci_platforms": [ - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_uds+poll_test", "platforms": [ - "linux", - "mac", - "posix" + "linux" ] }, { @@ -16248,19 +16198,15 @@ "large_metadata" ], "ci_platforms": [ - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_uds+poll_test", "platforms": [ - "linux", - "mac", - "posix" + "linux" ] }, { @@ -16268,19 +16214,15 @@ "max_concurrent_streams" ], "ci_platforms": [ - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_uds+poll_test", "platforms": [ - "linux", - "mac", - "posix" + "linux" ] }, { @@ -16288,19 +16230,15 @@ "max_message_length" ], "ci_platforms": [ - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_uds+poll_test", "platforms": [ - "linux", - "mac", - "posix" + "linux" ] }, { @@ -16308,19 +16246,15 @@ "negative_deadline" ], "ci_platforms": [ - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_uds+poll_test", "platforms": [ - "linux", - "mac", - "posix" + "linux" ] }, { @@ -16328,19 +16262,15 @@ "no_op" ], "ci_platforms": [ - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_uds+poll_test", "platforms": [ - "linux", - "mac", - "posix" + "linux" ] }, { @@ -16348,19 +16278,15 @@ "payload" ], "ci_platforms": [ - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_uds+poll_test", "platforms": [ - "linux", - "mac", - "posix" + "linux" ] }, { @@ -16368,19 +16294,15 @@ "ping" ], "ci_platforms": [ - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_uds+poll_test", "platforms": [ - "linux", - "mac", - "posix" + "linux" ] }, { @@ -16388,19 +16310,15 @@ "ping_pong_streaming" ], "ci_platforms": [ - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_uds+poll_test", "platforms": [ - "linux", - "mac", - "posix" + "linux" ] }, { @@ -16408,19 +16326,15 @@ "registered_call" ], "ci_platforms": [ - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_uds+poll_test", "platforms": [ - "linux", - "mac", - "posix" + "linux" ] }, { @@ -16428,19 +16342,15 @@ "request_with_flags" ], "ci_platforms": [ - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_uds+poll_test", "platforms": [ - "linux", - "mac", - "posix" + "linux" ] }, { @@ -16448,19 +16358,15 @@ "request_with_payload" ], "ci_platforms": [ - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_uds+poll_test", "platforms": [ - "linux", - "mac", - "posix" + "linux" ] }, { @@ -16468,19 +16374,15 @@ "server_finishes_request" ], "ci_platforms": [ - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_uds+poll_test", "platforms": [ - "linux", - "mac", - "posix" + "linux" ] }, { @@ -16488,19 +16390,15 @@ "shutdown_finishes_calls" ], "ci_platforms": [ - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_uds+poll_test", "platforms": [ - "linux", - "mac", - "posix" + "linux" ] }, { @@ -16508,19 +16406,15 @@ "shutdown_finishes_tags" ], "ci_platforms": [ - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_uds+poll_test", "platforms": [ - "linux", - "mac", - "posix" + "linux" ] }, { @@ -16528,19 +16422,15 @@ "simple_delayed_request" ], "ci_platforms": [ - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_uds+poll_test", "platforms": [ - "linux", - "mac", - "posix" + "linux" ] }, { @@ -16548,19 +16438,15 @@ "simple_metadata" ], "ci_platforms": [ - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_uds+poll_test", "platforms": [ - "linux", - "mac", - "posix" + "linux" ] }, { @@ -16568,19 +16454,15 @@ "simple_request" ], "ci_platforms": [ - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_uds+poll_test", "platforms": [ - "linux", - "mac", - "posix" + "linux" ] }, { @@ -16588,19 +16470,15 @@ "trailing_metadata" ], "ci_platforms": [ - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_uds+poll_test", "platforms": [ - "linux", - "mac", - "posix" + "linux" ] }, { @@ -16608,15 +16486,21 @@ "bad_hostname" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds+poll_test", + "name": "h2_census_nosec_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -16624,159 +16508,219 @@ "binary_metadata" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds+poll_test", + "name": "h2_census_nosec_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "call_creds" + "cancel_after_accept" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds+poll_test", + "name": "h2_census_nosec_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "cancel_after_accept" + "cancel_after_client_done" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds+poll_test", + "name": "h2_census_nosec_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "cancel_after_client_done" + "cancel_after_invoke" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds+poll_test", + "name": "h2_census_nosec_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "cancel_after_invoke" + "cancel_before_invoke" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds+poll_test", + "name": "h2_census_nosec_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "cancel_before_invoke" + "cancel_in_a_vacuum" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds+poll_test", + "name": "h2_census_nosec_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "cancel_in_a_vacuum" + "cancel_with_status" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds+poll_test", + "name": "h2_census_nosec_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "cancel_with_status" + "compressed_payload" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds+poll_test", + "name": "h2_census_nosec_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "compressed_payload" + "connectivity" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds+poll_test", + "name": "h2_census_nosec_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "connectivity" + "default_host" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds+poll_test", + "name": "h2_census_nosec_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -16784,15 +16728,21 @@ "disappearing_server" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds+poll_test", + "name": "h2_census_nosec_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -16800,15 +16750,21 @@ "empty_batch" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds+poll_test", + "name": "h2_census_nosec_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -16816,15 +16772,21 @@ "graceful_server_shutdown" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds+poll_test", + "name": "h2_census_nosec_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -16832,15 +16794,21 @@ "high_initial_seqno" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds+poll_test", + "name": "h2_census_nosec_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -16848,31 +16816,43 @@ "hpack_size" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds+poll_test", + "name": "h2_census_nosec_test", "platforms": [ - "linux" - ] + "windows", + "linux", + "mac", + "posix" + ] }, { "args": [ "invoke_large_request" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds+poll_test", + "name": "h2_census_nosec_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -16880,15 +16860,21 @@ "large_metadata" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds+poll_test", + "name": "h2_census_nosec_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -16896,15 +16882,21 @@ "max_concurrent_streams" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds+poll_test", + "name": "h2_census_nosec_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -16912,15 +16904,21 @@ "max_message_length" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds+poll_test", + "name": "h2_census_nosec_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -16928,15 +16926,21 @@ "negative_deadline" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds+poll_test", + "name": "h2_census_nosec_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -16944,15 +16948,21 @@ "no_op" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds+poll_test", + "name": "h2_census_nosec_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -16960,15 +16970,21 @@ "payload" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds+poll_test", + "name": "h2_census_nosec_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -16976,15 +16992,21 @@ "ping" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds+poll_test", + "name": "h2_census_nosec_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -16992,15 +17014,21 @@ "ping_pong_streaming" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds+poll_test", + "name": "h2_census_nosec_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -17008,15 +17036,21 @@ "registered_call" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds+poll_test", + "name": "h2_census_nosec_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -17024,15 +17058,21 @@ "request_with_flags" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds+poll_test", + "name": "h2_census_nosec_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -17040,15 +17080,21 @@ "request_with_payload" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds+poll_test", + "name": "h2_census_nosec_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -17056,15 +17102,21 @@ "server_finishes_request" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds+poll_test", + "name": "h2_census_nosec_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -17072,15 +17124,21 @@ "shutdown_finishes_calls" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds+poll_test", + "name": "h2_census_nosec_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -17088,15 +17146,21 @@ "shutdown_finishes_tags" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds+poll_test", + "name": "h2_census_nosec_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -17104,15 +17168,21 @@ "simple_delayed_request" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds+poll_test", + "name": "h2_census_nosec_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -17120,15 +17190,21 @@ "simple_metadata" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds+poll_test", + "name": "h2_census_nosec_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -17136,15 +17212,21 @@ "simple_request" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds+poll_test", + "name": "h2_census_nosec_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -17152,15 +17234,21 @@ "trailing_metadata" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds+poll_test", + "name": "h2_census_nosec_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -17177,7 +17265,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_compress_nosec_test", "platforms": [ "windows", "linux", @@ -17199,7 +17287,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_compress_nosec_test", "platforms": [ "windows", "linux", @@ -17221,7 +17309,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_compress_nosec_test", "platforms": [ "windows", "linux", @@ -17243,7 +17331,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_compress_nosec_test", "platforms": [ "windows", "linux", @@ -17265,7 +17353,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_compress_nosec_test", "platforms": [ "windows", "linux", @@ -17287,7 +17375,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_compress_nosec_test", "platforms": [ "windows", "linux", @@ -17309,7 +17397,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_compress_nosec_test", "platforms": [ "windows", "linux", @@ -17331,7 +17419,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_compress_nosec_test", "platforms": [ "windows", "linux", @@ -17353,7 +17441,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_compress_nosec_test", "platforms": [ "windows", "linux", @@ -17375,7 +17463,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_compress_nosec_test", "platforms": [ "windows", "linux", @@ -17397,7 +17485,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_compress_nosec_test", "platforms": [ "windows", "linux", @@ -17419,7 +17507,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_compress_nosec_test", "platforms": [ "windows", "linux", @@ -17441,7 +17529,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_compress_nosec_test", "platforms": [ "windows", "linux", @@ -17463,7 +17551,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_compress_nosec_test", "platforms": [ "windows", "linux", @@ -17485,7 +17573,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_compress_nosec_test", "platforms": [ "windows", "linux", @@ -17507,7 +17595,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_compress_nosec_test", "platforms": [ "windows", "linux", @@ -17529,7 +17617,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_compress_nosec_test", "platforms": [ "windows", "linux", @@ -17551,7 +17639,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_compress_nosec_test", "platforms": [ "windows", "linux", @@ -17573,7 +17661,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_compress_nosec_test", "platforms": [ "windows", "linux", @@ -17595,7 +17683,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_compress_nosec_test", "platforms": [ "windows", "linux", @@ -17617,7 +17705,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_compress_nosec_test", "platforms": [ "windows", "linux", @@ -17639,7 +17727,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_compress_nosec_test", "platforms": [ "windows", "linux", @@ -17661,7 +17749,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_compress_nosec_test", "platforms": [ "windows", "linux", @@ -17683,7 +17771,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_compress_nosec_test", "platforms": [ "windows", "linux", @@ -17705,7 +17793,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_compress_nosec_test", "platforms": [ "windows", "linux", @@ -17727,7 +17815,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_compress_nosec_test", "platforms": [ "windows", "linux", @@ -17749,7 +17837,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_compress_nosec_test", "platforms": [ "windows", "linux", @@ -17771,7 +17859,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_compress_nosec_test", "platforms": [ "windows", "linux", @@ -17793,7 +17881,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_compress_nosec_test", "platforms": [ "windows", "linux", @@ -17815,7 +17903,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_compress_nosec_test", "platforms": [ "windows", "linux", @@ -17837,7 +17925,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_compress_nosec_test", "platforms": [ "windows", "linux", @@ -17859,7 +17947,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_compress_nosec_test", "platforms": [ "windows", "linux", @@ -17881,7 +17969,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_compress_nosec_test", "platforms": [ "windows", "linux", @@ -17903,7 +17991,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_compress_nosec_test", "platforms": [ "windows", "linux", @@ -17925,7 +18013,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_compress_nosec_test", "platforms": [ "windows", "linux", @@ -17947,7 +18035,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_full_nosec_test", "platforms": [ "windows", "linux", @@ -17969,7 +18057,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_full_nosec_test", "platforms": [ "windows", "linux", @@ -17991,7 +18079,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_full_nosec_test", "platforms": [ "windows", "linux", @@ -18013,7 +18101,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_full_nosec_test", "platforms": [ "windows", "linux", @@ -18035,7 +18123,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_full_nosec_test", "platforms": [ "windows", "linux", @@ -18057,7 +18145,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_full_nosec_test", "platforms": [ "windows", "linux", @@ -18079,7 +18167,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_full_nosec_test", "platforms": [ "windows", "linux", @@ -18101,7 +18189,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_full_nosec_test", "platforms": [ "windows", "linux", @@ -18123,7 +18211,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_full_nosec_test", "platforms": [ "windows", "linux", @@ -18145,7 +18233,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_full_nosec_test", "platforms": [ "windows", "linux", @@ -18167,7 +18255,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_full_nosec_test", "platforms": [ "windows", "linux", @@ -18189,7 +18277,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_full_nosec_test", "platforms": [ "windows", "linux", @@ -18211,7 +18299,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_full_nosec_test", "platforms": [ "windows", "linux", @@ -18233,7 +18321,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_full_nosec_test", "platforms": [ "windows", "linux", @@ -18255,7 +18343,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_full_nosec_test", "platforms": [ "windows", "linux", @@ -18277,7 +18365,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_full_nosec_test", "platforms": [ "windows", "linux", @@ -18299,7 +18387,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_full_nosec_test", "platforms": [ "windows", "linux", @@ -18321,7 +18409,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_full_nosec_test", "platforms": [ "windows", "linux", @@ -18343,7 +18431,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_full_nosec_test", "platforms": [ "windows", "linux", @@ -18365,7 +18453,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_full_nosec_test", "platforms": [ "windows", "linux", @@ -18387,7 +18475,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_full_nosec_test", "platforms": [ "windows", "linux", @@ -18409,7 +18497,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_full_nosec_test", "platforms": [ "windows", "linux", @@ -18431,7 +18519,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_full_nosec_test", "platforms": [ "windows", "linux", @@ -18453,7 +18541,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_full_nosec_test", "platforms": [ "windows", "linux", @@ -18475,7 +18563,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_full_nosec_test", "platforms": [ "windows", "linux", @@ -18497,7 +18585,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_full_nosec_test", "platforms": [ "windows", "linux", @@ -18519,7 +18607,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_full_nosec_test", "platforms": [ "windows", "linux", @@ -18541,7 +18629,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_full_nosec_test", "platforms": [ "windows", "linux", @@ -18563,7 +18651,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_full_nosec_test", "platforms": [ "windows", "linux", @@ -18585,7 +18673,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_full_nosec_test", "platforms": [ "windows", "linux", @@ -18607,7 +18695,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_full_nosec_test", "platforms": [ "windows", "linux", @@ -18629,7 +18717,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_full_nosec_test", "platforms": [ "windows", "linux", @@ -18651,7 +18739,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_full_nosec_test", "platforms": [ "windows", "linux", @@ -18673,7 +18761,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_full_nosec_test", "platforms": [ "windows", "linux", @@ -18695,7 +18783,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_full_nosec_test", "platforms": [ "windows", "linux", @@ -18708,21 +18796,15 @@ "bad_hostname" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_nosec_test", + "name": "h2_full+pipe_nosec_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { @@ -18730,21 +18812,15 @@ "binary_metadata" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_nosec_test", + "name": "h2_full+pipe_nosec_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { @@ -18752,21 +18828,15 @@ "cancel_after_accept" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_nosec_test", + "name": "h2_full+pipe_nosec_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { @@ -18774,21 +18844,15 @@ "cancel_after_client_done" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_nosec_test", + "name": "h2_full+pipe_nosec_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { @@ -18796,21 +18860,15 @@ "cancel_after_invoke" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_nosec_test", + "name": "h2_full+pipe_nosec_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { @@ -18818,21 +18876,15 @@ "cancel_before_invoke" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_nosec_test", + "name": "h2_full+pipe_nosec_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { @@ -18840,21 +18892,15 @@ "cancel_in_a_vacuum" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_nosec_test", + "name": "h2_full+pipe_nosec_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { @@ -18862,21 +18908,15 @@ "cancel_with_status" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_nosec_test", + "name": "h2_full+pipe_nosec_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { @@ -18884,21 +18924,15 @@ "compressed_payload" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_nosec_test", + "name": "h2_full+pipe_nosec_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { @@ -18906,21 +18940,15 @@ "connectivity" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_nosec_test", + "name": "h2_full+pipe_nosec_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { @@ -18928,21 +18956,15 @@ "default_host" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_nosec_test", + "name": "h2_full+pipe_nosec_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { @@ -18950,21 +18972,15 @@ "disappearing_server" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_nosec_test", + "name": "h2_full+pipe_nosec_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { @@ -18972,21 +18988,15 @@ "empty_batch" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_nosec_test", + "name": "h2_full+pipe_nosec_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { @@ -18994,21 +19004,15 @@ "graceful_server_shutdown" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_nosec_test", + "name": "h2_full+pipe_nosec_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { @@ -19016,21 +19020,15 @@ "high_initial_seqno" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_nosec_test", + "name": "h2_full+pipe_nosec_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { @@ -19038,21 +19036,15 @@ "hpack_size" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_nosec_test", + "name": "h2_full+pipe_nosec_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { @@ -19060,21 +19052,15 @@ "invoke_large_request" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_nosec_test", + "name": "h2_full+pipe_nosec_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { @@ -19082,21 +19068,15 @@ "large_metadata" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_nosec_test", + "name": "h2_full+pipe_nosec_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { @@ -19104,21 +19084,15 @@ "max_concurrent_streams" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_nosec_test", + "name": "h2_full+pipe_nosec_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { @@ -19126,21 +19100,15 @@ "max_message_length" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_nosec_test", + "name": "h2_full+pipe_nosec_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { @@ -19148,21 +19116,15 @@ "negative_deadline" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_nosec_test", + "name": "h2_full+pipe_nosec_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { @@ -19170,21 +19132,15 @@ "no_op" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_nosec_test", + "name": "h2_full+pipe_nosec_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { @@ -19192,21 +19148,15 @@ "payload" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_nosec_test", + "name": "h2_full+pipe_nosec_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { @@ -19214,21 +19164,15 @@ "ping" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_nosec_test", + "name": "h2_full+pipe_nosec_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { @@ -19236,21 +19180,15 @@ "ping_pong_streaming" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_nosec_test", + "name": "h2_full+pipe_nosec_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { @@ -19258,21 +19196,15 @@ "registered_call" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_nosec_test", + "name": "h2_full+pipe_nosec_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { @@ -19280,21 +19212,15 @@ "request_with_flags" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_nosec_test", + "name": "h2_full+pipe_nosec_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { @@ -19302,21 +19228,15 @@ "request_with_payload" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_nosec_test", + "name": "h2_full+pipe_nosec_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { @@ -19324,21 +19244,15 @@ "server_finishes_request" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_nosec_test", + "name": "h2_full+pipe_nosec_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { @@ -19346,21 +19260,15 @@ "shutdown_finishes_calls" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_nosec_test", + "name": "h2_full+pipe_nosec_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { @@ -19368,21 +19276,15 @@ "shutdown_finishes_tags" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_nosec_test", + "name": "h2_full+pipe_nosec_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { @@ -19390,21 +19292,15 @@ "simple_delayed_request" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_nosec_test", + "name": "h2_full+pipe_nosec_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { @@ -19412,21 +19308,15 @@ "simple_metadata" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_nosec_test", + "name": "h2_full+pipe_nosec_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { @@ -19434,21 +19324,15 @@ "simple_request" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_nosec_test", + "name": "h2_full+pipe_nosec_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { @@ -19456,21 +19340,15 @@ "trailing_metadata" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_nosec_test", + "name": "h2_full+pipe_nosec_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { @@ -19484,7 +19362,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_nosec_test", + "name": "h2_full+poll_nosec_test", "platforms": [ "linux" ] @@ -19500,7 +19378,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_nosec_test", + "name": "h2_full+poll_nosec_test", "platforms": [ "linux" ] @@ -19516,7 +19394,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_nosec_test", + "name": "h2_full+poll_nosec_test", "platforms": [ "linux" ] @@ -19532,7 +19410,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_nosec_test", + "name": "h2_full+poll_nosec_test", "platforms": [ "linux" ] @@ -19548,7 +19426,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_nosec_test", + "name": "h2_full+poll_nosec_test", "platforms": [ "linux" ] @@ -19564,7 +19442,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_nosec_test", + "name": "h2_full+poll_nosec_test", "platforms": [ "linux" ] @@ -19580,7 +19458,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_nosec_test", + "name": "h2_full+poll_nosec_test", "platforms": [ "linux" ] @@ -19596,7 +19474,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_nosec_test", + "name": "h2_full+poll_nosec_test", "platforms": [ "linux" ] @@ -19612,7 +19490,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_nosec_test", + "name": "h2_full+poll_nosec_test", "platforms": [ "linux" ] @@ -19628,7 +19506,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_nosec_test", + "name": "h2_full+poll_nosec_test", "platforms": [ "linux" ] @@ -19644,7 +19522,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_nosec_test", + "name": "h2_full+poll_nosec_test", "platforms": [ "linux" ] @@ -19660,7 +19538,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_nosec_test", + "name": "h2_full+poll_nosec_test", "platforms": [ "linux" ] @@ -19676,7 +19554,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_nosec_test", + "name": "h2_full+poll_nosec_test", "platforms": [ "linux" ] @@ -19692,7 +19570,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_nosec_test", + "name": "h2_full+poll_nosec_test", "platforms": [ "linux" ] @@ -19708,7 +19586,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_nosec_test", + "name": "h2_full+poll_nosec_test", "platforms": [ "linux" ] @@ -19724,7 +19602,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_nosec_test", + "name": "h2_full+poll_nosec_test", "platforms": [ "linux" ] @@ -19740,7 +19618,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_nosec_test", + "name": "h2_full+poll_nosec_test", "platforms": [ "linux" ] @@ -19756,7 +19634,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_nosec_test", + "name": "h2_full+poll_nosec_test", "platforms": [ "linux" ] @@ -19772,7 +19650,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_nosec_test", + "name": "h2_full+poll_nosec_test", "platforms": [ "linux" ] @@ -19788,7 +19666,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_nosec_test", + "name": "h2_full+poll_nosec_test", "platforms": [ "linux" ] @@ -19804,7 +19682,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_nosec_test", + "name": "h2_full+poll_nosec_test", "platforms": [ "linux" ] @@ -19820,7 +19698,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_nosec_test", + "name": "h2_full+poll_nosec_test", "platforms": [ "linux" ] @@ -19836,7 +19714,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_nosec_test", + "name": "h2_full+poll_nosec_test", "platforms": [ "linux" ] @@ -19852,7 +19730,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_nosec_test", + "name": "h2_full+poll_nosec_test", "platforms": [ "linux" ] @@ -19868,7 +19746,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_nosec_test", + "name": "h2_full+poll_nosec_test", "platforms": [ "linux" ] @@ -19884,7 +19762,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_nosec_test", + "name": "h2_full+poll_nosec_test", "platforms": [ "linux" ] @@ -19900,7 +19778,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_nosec_test", + "name": "h2_full+poll_nosec_test", "platforms": [ "linux" ] @@ -19916,7 +19794,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_nosec_test", + "name": "h2_full+poll_nosec_test", "platforms": [ "linux" ] @@ -19932,7 +19810,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_nosec_test", + "name": "h2_full+poll_nosec_test", "platforms": [ "linux" ] @@ -19948,7 +19826,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_nosec_test", + "name": "h2_full+poll_nosec_test", "platforms": [ "linux" ] @@ -19964,7 +19842,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_nosec_test", + "name": "h2_full+poll_nosec_test", "platforms": [ "linux" ] @@ -19980,7 +19858,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_nosec_test", + "name": "h2_full+poll_nosec_test", "platforms": [ "linux" ] @@ -19996,7 +19874,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_nosec_test", + "name": "h2_full+poll_nosec_test", "platforms": [ "linux" ] @@ -20012,7 +19890,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_nosec_test", + "name": "h2_full+poll_nosec_test", "platforms": [ "linux" ] @@ -20028,7 +19906,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_nosec_test", + "name": "h2_full+poll_nosec_test", "platforms": [ "linux" ] @@ -20044,7 +19922,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+poll_nosec_test", + "name": "h2_full+poll+pipe_nosec_test", "platforms": [ "linux" ] @@ -20060,7 +19938,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+poll_nosec_test", + "name": "h2_full+poll+pipe_nosec_test", "platforms": [ "linux" ] @@ -20076,7 +19954,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+poll_nosec_test", + "name": "h2_full+poll+pipe_nosec_test", "platforms": [ "linux" ] @@ -20092,7 +19970,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+poll_nosec_test", + "name": "h2_full+poll+pipe_nosec_test", "platforms": [ "linux" ] @@ -20108,7 +19986,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+poll_nosec_test", + "name": "h2_full+poll+pipe_nosec_test", "platforms": [ "linux" ] @@ -20124,7 +20002,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+poll_nosec_test", + "name": "h2_full+poll+pipe_nosec_test", "platforms": [ "linux" ] @@ -20140,7 +20018,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+poll_nosec_test", + "name": "h2_full+poll+pipe_nosec_test", "platforms": [ "linux" ] @@ -20156,7 +20034,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+poll_nosec_test", + "name": "h2_full+poll+pipe_nosec_test", "platforms": [ "linux" ] @@ -20172,7 +20050,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+poll_nosec_test", + "name": "h2_full+poll+pipe_nosec_test", "platforms": [ "linux" ] @@ -20188,7 +20066,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+poll_nosec_test", + "name": "h2_full+poll+pipe_nosec_test", "platforms": [ "linux" ] @@ -20204,7 +20082,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+poll_nosec_test", + "name": "h2_full+poll+pipe_nosec_test", "platforms": [ "linux" ] @@ -20220,7 +20098,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+poll_nosec_test", + "name": "h2_full+poll+pipe_nosec_test", "platforms": [ "linux" ] @@ -20236,7 +20114,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+poll_nosec_test", + "name": "h2_full+poll+pipe_nosec_test", "platforms": [ "linux" ] @@ -20252,7 +20130,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+poll_nosec_test", + "name": "h2_full+poll+pipe_nosec_test", "platforms": [ "linux" ] @@ -20268,7 +20146,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+poll_nosec_test", + "name": "h2_full+poll+pipe_nosec_test", "platforms": [ "linux" ] @@ -20284,7 +20162,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+poll_nosec_test", + "name": "h2_full+poll+pipe_nosec_test", "platforms": [ "linux" ] @@ -20300,7 +20178,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+poll_nosec_test", + "name": "h2_full+poll+pipe_nosec_test", "platforms": [ "linux" ] @@ -20316,7 +20194,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+poll_nosec_test", + "name": "h2_full+poll+pipe_nosec_test", "platforms": [ "linux" ] @@ -20332,7 +20210,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+poll_nosec_test", + "name": "h2_full+poll+pipe_nosec_test", "platforms": [ "linux" ] @@ -20348,7 +20226,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+poll_nosec_test", + "name": "h2_full+poll+pipe_nosec_test", "platforms": [ "linux" ] @@ -20364,7 +20242,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+poll_nosec_test", + "name": "h2_full+poll+pipe_nosec_test", "platforms": [ "linux" ] @@ -20380,7 +20258,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+poll_nosec_test", + "name": "h2_full+poll+pipe_nosec_test", "platforms": [ "linux" ] @@ -20396,7 +20274,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+poll_nosec_test", + "name": "h2_full+poll+pipe_nosec_test", "platforms": [ "linux" ] @@ -20412,7 +20290,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+poll_nosec_test", + "name": "h2_full+poll+pipe_nosec_test", "platforms": [ "linux" ] @@ -20428,7 +20306,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+poll_nosec_test", + "name": "h2_full+poll+pipe_nosec_test", "platforms": [ "linux" ] @@ -20444,7 +20322,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+poll_nosec_test", + "name": "h2_full+poll+pipe_nosec_test", "platforms": [ "linux" ] @@ -20460,7 +20338,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+poll_nosec_test", + "name": "h2_full+poll+pipe_nosec_test", "platforms": [ "linux" ] @@ -20476,7 +20354,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+poll_nosec_test", + "name": "h2_full+poll+pipe_nosec_test", "platforms": [ "linux" ] @@ -20492,7 +20370,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+poll_nosec_test", + "name": "h2_full+poll+pipe_nosec_test", "platforms": [ "linux" ] @@ -20508,7 +20386,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+poll_nosec_test", + "name": "h2_full+poll+pipe_nosec_test", "platforms": [ "linux" ] @@ -20524,7 +20402,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+poll_nosec_test", + "name": "h2_full+poll+pipe_nosec_test", "platforms": [ "linux" ] @@ -20540,7 +20418,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+poll_nosec_test", + "name": "h2_full+poll+pipe_nosec_test", "platforms": [ "linux" ] @@ -20556,54 +20434,6 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+poll_nosec_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "simple_request" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full+poll_nosec_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "trailing_metadata" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full+poll_nosec_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "bad_hostname" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "flaky": false, - "language": "c", "name": "h2_full+poll+pipe_nosec_test", "platforms": [ "linux" @@ -20611,7 +20441,7 @@ }, { "args": [ - "binary_metadata" + "simple_request" ], "ci_platforms": [ "linux" @@ -20627,1151 +20457,23 @@ }, { "args": [ - "cancel_after_accept" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full+poll+pipe_nosec_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "cancel_after_client_done" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full+poll+pipe_nosec_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "cancel_after_invoke" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full+poll+pipe_nosec_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "cancel_before_invoke" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full+poll+pipe_nosec_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "cancel_in_a_vacuum" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full+poll+pipe_nosec_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "cancel_with_status" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full+poll+pipe_nosec_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "compressed_payload" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full+poll+pipe_nosec_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "connectivity" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full+poll+pipe_nosec_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "default_host" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full+poll+pipe_nosec_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "disappearing_server" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full+poll+pipe_nosec_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "empty_batch" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full+poll+pipe_nosec_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "graceful_server_shutdown" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full+poll+pipe_nosec_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "high_initial_seqno" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full+poll+pipe_nosec_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "hpack_size" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full+poll+pipe_nosec_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "invoke_large_request" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full+poll+pipe_nosec_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "large_metadata" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full+poll+pipe_nosec_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "max_concurrent_streams" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full+poll+pipe_nosec_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "max_message_length" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full+poll+pipe_nosec_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "negative_deadline" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full+poll+pipe_nosec_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "no_op" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full+poll+pipe_nosec_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "payload" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full+poll+pipe_nosec_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "ping" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full+poll+pipe_nosec_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "ping_pong_streaming" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full+poll+pipe_nosec_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "registered_call" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full+poll+pipe_nosec_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "request_with_flags" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full+poll+pipe_nosec_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "request_with_payload" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full+poll+pipe_nosec_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "server_finishes_request" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full+poll+pipe_nosec_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "shutdown_finishes_calls" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full+poll+pipe_nosec_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "shutdown_finishes_tags" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full+poll+pipe_nosec_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "simple_delayed_request" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full+poll+pipe_nosec_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "simple_metadata" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full+poll+pipe_nosec_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "simple_request" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "flaky": false, - "language": "c", - "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": [ - "windows", - "linux", - "mac", - "posix" - ] - }, - { - "args": [ - "binary_metadata" - ], - "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", - "mac", - "posix" - ] - }, - { - "args": [ - "cancel_after_accept" - ], - "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" - ], - "cpu_cost": 0.1, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full+trace_nosec_test", - "platforms": [ - "windows", - "linux", - "mac", - "posix" - ] - }, - { - "args": [ - "cancel_after_client_done" - ], - "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" - ], - "cpu_cost": 0.1, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full+trace_nosec_test", - "platforms": [ - "windows", - "linux", - "mac", - "posix" - ] - }, - { - "args": [ - "cancel_after_invoke" - ], - "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" - ], - "cpu_cost": 0.1, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full+trace_nosec_test", - "platforms": [ - "windows", - "linux", - "mac", - "posix" - ] - }, - { - "args": [ - "cancel_before_invoke" - ], - "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" - ], - "cpu_cost": 0.1, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full+trace_nosec_test", - "platforms": [ - "windows", - "linux", - "mac", - "posix" - ] - }, - { - "args": [ - "cancel_in_a_vacuum" - ], - "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" - ], - "cpu_cost": 0.1, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full+trace_nosec_test", - "platforms": [ - "windows", - "linux", - "mac", - "posix" - ] - }, - { - "args": [ - "cancel_with_status" - ], - "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" - ], - "cpu_cost": 0.1, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full+trace_nosec_test", - "platforms": [ - "windows", - "linux", - "mac", - "posix" - ] - }, - { - "args": [ - "compressed_payload" - ], - "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" - ], - "cpu_cost": 0.1, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full+trace_nosec_test", - "platforms": [ - "windows", - "linux", - "mac", - "posix" - ] - }, - { - "args": [ - "connectivity" - ], - "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" - ], - "cpu_cost": 0.1, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full+trace_nosec_test", - "platforms": [ - "windows", - "linux", - "mac", - "posix" - ] - }, - { - "args": [ - "default_host" - ], - "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", - "mac", - "posix" - ] - }, - { - "args": [ - "disappearing_server" - ], - "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", - "mac", - "posix" - ] - }, - { - "args": [ - "empty_batch" - ], - "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", - "mac", - "posix" - ] - }, - { - "args": [ - "graceful_server_shutdown" - ], - "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" - ], - "cpu_cost": 0.1, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full+trace_nosec_test", - "platforms": [ - "windows", - "linux", - "mac", - "posix" - ] - }, - { - "args": [ - "high_initial_seqno" - ], - "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", - "mac", - "posix" - ] - }, - { - "args": [ - "invoke_large_request" - ], - "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", - "mac", - "posix" - ] - }, - { - "args": [ - "large_metadata" - ], - "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", - "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", - "mac", - "posix" - ] - }, - { - "args": [ - "max_message_length" - ], - "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" - ], - "cpu_cost": 0.1, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full+trace_nosec_test", - "platforms": [ - "windows", - "linux", - "mac", - "posix" - ] - }, - { - "args": [ - "negative_deadline" - ], - "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", - "mac", - "posix" - ] - }, - { - "args": [ - "no_op" - ], - "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", - "mac", - "posix" - ] - }, - { - "args": [ - "payload" - ], - "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" - ], - "cpu_cost": 0.1, - "exclude_configs": [], - "flaky": false, - "language": "c", - "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", - "mac", - "posix" - ] - }, - { - "args": [ - "ping_pong_streaming" - ], - "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", - "mac", - "posix" - ] - }, - { - "args": [ - "registered_call" - ], - "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", - "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", - "mac", - "posix" - ] - }, - { - "args": [ - "request_with_payload" - ], - "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", - "mac", - "posix" - ] - }, - { - "args": [ - "server_finishes_request" + "trailing_metadata" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+trace_nosec_test", + "name": "h2_full+poll+pipe_nosec_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "shutdown_finishes_calls" + "bad_hostname" ], "ci_platforms": [ "windows", @@ -21793,7 +20495,7 @@ }, { "args": [ - "shutdown_finishes_tags" + "binary_metadata" ], "ci_platforms": [ "windows", @@ -21815,7 +20517,7 @@ }, { "args": [ - "simple_delayed_request" + "cancel_after_accept" ], "ci_platforms": [ "windows", @@ -21837,7 +20539,7 @@ }, { "args": [ - "simple_metadata" + "cancel_after_client_done" ], "ci_platforms": [ "windows", @@ -21845,7 +20547,7 @@ "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", @@ -21859,7 +20561,7 @@ }, { "args": [ - "simple_request" + "cancel_after_invoke" ], "ci_platforms": [ "windows", @@ -21867,7 +20569,7 @@ "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", @@ -21881,7 +20583,7 @@ }, { "args": [ - "trailing_metadata" + "cancel_before_invoke" ], "ci_platforms": [ "windows", @@ -21889,7 +20591,7 @@ "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", @@ -21903,18 +20605,19 @@ }, { "args": [ - "bad_hostname" + "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_proxy_nosec_test", + "name": "h2_full+trace_nosec_test", "platforms": [ "windows", "linux", @@ -21924,18 +20627,19 @@ }, { "args": [ - "binary_metadata" + "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_proxy_nosec_test", + "name": "h2_full+trace_nosec_test", "platforms": [ "windows", "linux", @@ -21945,18 +20649,19 @@ }, { "args": [ - "cancel_after_accept" + "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", @@ -21966,18 +20671,19 @@ }, { "args": [ - "cancel_after_client_done" + "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", @@ -21987,18 +20693,19 @@ }, { "args": [ - "cancel_after_invoke" + "default_host" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_nosec_test", + "name": "h2_full+trace_nosec_test", "platforms": [ "windows", "linux", @@ -22008,18 +20715,19 @@ }, { "args": [ - "cancel_before_invoke" + "disappearing_server" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_nosec_test", + "name": "h2_full+trace_nosec_test", "platforms": [ "windows", "linux", @@ -22029,18 +20737,19 @@ }, { "args": [ - "cancel_in_a_vacuum" + "empty_batch" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_nosec_test", + "name": "h2_full+trace_nosec_test", "platforms": [ "windows", "linux", @@ -22050,18 +20759,19 @@ }, { "args": [ - "cancel_with_status" + "graceful_server_shutdown" ], "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", @@ -22071,18 +20781,19 @@ }, { "args": [ - "default_host" + "high_initial_seqno" ], "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", @@ -22092,18 +20803,19 @@ }, { "args": [ - "disappearing_server" + "invoke_large_request" ], "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", @@ -22113,18 +20825,19 @@ }, { "args": [ - "empty_batch" + "large_metadata" ], "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", @@ -22134,18 +20847,19 @@ }, { "args": [ - "graceful_server_shutdown" + "max_concurrent_streams" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_nosec_test", + "name": "h2_full+trace_nosec_test", "platforms": [ "windows", "linux", @@ -22155,18 +20869,19 @@ }, { "args": [ - "high_initial_seqno" + "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_proxy_nosec_test", + "name": "h2_full+trace_nosec_test", "platforms": [ "windows", "linux", @@ -22176,18 +20891,19 @@ }, { "args": [ - "invoke_large_request" + "negative_deadline" ], "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", @@ -22197,18 +20913,19 @@ }, { "args": [ - "large_metadata" + "no_op" ], "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", @@ -22218,18 +20935,19 @@ }, { "args": [ - "max_message_length" + "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", @@ -22239,18 +20957,19 @@ }, { "args": [ - "negative_deadline" + "ping" ], "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", @@ -22260,18 +20979,19 @@ }, { "args": [ - "no_op" + "ping_pong_streaming" ], "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", @@ -22281,39 +21001,19 @@ }, { "args": [ - "payload" + "registered_call" ], "ci_platforms": [ - "windows", - "linux", - "posix" - ], - "cpu_cost": 0.1, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_proxy_nosec_test", - "platforms": [ "windows", "linux", "mac", "posix" - ] - }, - { - "args": [ - "ping_pong_streaming" - ], - "ci_platforms": [ - "windows", - "linux", - "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", @@ -22323,18 +21023,19 @@ }, { "args": [ - "registered_call" + "request_with_flags" ], "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", @@ -22349,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", @@ -22370,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", @@ -22391,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", @@ -22412,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", @@ -22433,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", @@ -22454,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", @@ -22475,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", @@ -22496,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", @@ -22523,7 +21232,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_nosec_test", + "name": "h2_proxy_nosec_test", "platforms": [ "windows", "linux", @@ -22544,7 +21253,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_nosec_test", + "name": "h2_proxy_nosec_test", "platforms": [ "windows", "linux", @@ -22565,7 +21274,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_nosec_test", + "name": "h2_proxy_nosec_test", "platforms": [ "windows", "linux", @@ -22586,7 +21295,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_nosec_test", + "name": "h2_proxy_nosec_test", "platforms": [ "windows", "linux", @@ -22607,7 +21316,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_nosec_test", + "name": "h2_proxy_nosec_test", "platforms": [ "windows", "linux", @@ -22628,7 +21337,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_nosec_test", + "name": "h2_proxy_nosec_test", "platforms": [ "windows", "linux", @@ -22649,7 +21358,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_nosec_test", + "name": "h2_proxy_nosec_test", "platforms": [ "windows", "linux", @@ -22670,7 +21379,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_nosec_test", + "name": "h2_proxy_nosec_test", "platforms": [ "windows", "linux", @@ -22680,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", @@ -22701,7 +21410,7 @@ }, { "args": [ - "empty_batch" + "disappearing_server" ], "ci_platforms": [ "windows", @@ -22712,7 +21421,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_nosec_test", + "name": "h2_proxy_nosec_test", "platforms": [ "windows", "linux", @@ -22722,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", @@ -22743,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", @@ -22764,7 +21473,7 @@ }, { "args": [ - "hpack_size" + "high_initial_seqno" ], "ci_platforms": [ "windows", @@ -22775,7 +21484,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_nosec_test", + "name": "h2_proxy_nosec_test", "platforms": [ "windows", "linux", @@ -22796,7 +21505,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_nosec_test", + "name": "h2_proxy_nosec_test", "platforms": [ "windows", "linux", @@ -22817,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", @@ -22859,7 +21547,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_nosec_test", + "name": "h2_proxy_nosec_test", "platforms": [ "windows", "linux", @@ -22880,7 +21568,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_nosec_test", + "name": "h2_proxy_nosec_test", "platforms": [ "windows", "linux", @@ -22901,7 +21589,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_nosec_test", + "name": "h2_proxy_nosec_test", "platforms": [ "windows", "linux", @@ -22922,7 +21610,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_nosec_test", + "name": "h2_proxy_nosec_test", "platforms": [ "windows", "linux", @@ -22943,7 +21631,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_nosec_test", + "name": "h2_proxy_nosec_test", "platforms": [ "windows", "linux", @@ -22964,7 +21652,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_nosec_test", + "name": "h2_proxy_nosec_test", "platforms": [ "windows", "linux", @@ -22974,7 +21662,7 @@ }, { "args": [ - "request_with_flags" + "request_with_payload" ], "ci_platforms": [ "windows", @@ -22985,7 +21673,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_nosec_test", + "name": "h2_proxy_nosec_test", "platforms": [ "windows", "linux", @@ -22995,7 +21683,7 @@ }, { "args": [ - "request_with_payload" + "server_finishes_request" ], "ci_platforms": [ "windows", @@ -23006,7 +21694,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_nosec_test", + "name": "h2_proxy_nosec_test", "platforms": [ "windows", "linux", @@ -23016,7 +21704,7 @@ }, { "args": [ - "server_finishes_request" + "shutdown_finishes_calls" ], "ci_platforms": [ "windows", @@ -23027,7 +21715,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_nosec_test", + "name": "h2_proxy_nosec_test", "platforms": [ "windows", "linux", @@ -23037,7 +21725,7 @@ }, { "args": [ - "shutdown_finishes_calls" + "shutdown_finishes_tags" ], "ci_platforms": [ "windows", @@ -23048,7 +21736,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_nosec_test", + "name": "h2_proxy_nosec_test", "platforms": [ "windows", "linux", @@ -23058,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", @@ -23090,7 +21778,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_nosec_test", + "name": "h2_proxy_nosec_test", "platforms": [ "windows", "linux", @@ -23111,7 +21799,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_nosec_test", + "name": "h2_proxy_nosec_test", "platforms": [ "windows", "linux", @@ -23132,7 +21820,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_nosec_test", + "name": "h2_proxy_nosec_test", "platforms": [ "windows", "linux", @@ -23153,7 +21841,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_nosec_test", + "name": "h2_sockpair_nosec_test", "platforms": [ "windows", "linux", @@ -23174,7 +21862,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_nosec_test", + "name": "h2_sockpair_nosec_test", "platforms": [ "windows", "linux", @@ -23195,7 +21883,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_nosec_test", + "name": "h2_sockpair_nosec_test", "platforms": [ "windows", "linux", @@ -23216,7 +21904,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_nosec_test", + "name": "h2_sockpair_nosec_test", "platforms": [ "windows", "linux", @@ -23237,7 +21925,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_nosec_test", + "name": "h2_sockpair_nosec_test", "platforms": [ "windows", "linux", @@ -23258,7 +21946,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_nosec_test", + "name": "h2_sockpair_nosec_test", "platforms": [ "windows", "linux", @@ -23279,7 +21967,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_nosec_test", + "name": "h2_sockpair_nosec_test", "platforms": [ "windows", "linux", @@ -23300,7 +21988,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_nosec_test", + "name": "h2_sockpair_nosec_test", "platforms": [ "windows", "linux", @@ -23321,7 +22009,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_nosec_test", + "name": "h2_sockpair_nosec_test", "platforms": [ "windows", "linux", @@ -23342,7 +22030,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_nosec_test", + "name": "h2_sockpair_nosec_test", "platforms": [ "windows", "linux", @@ -23363,7 +22051,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_nosec_test", + "name": "h2_sockpair_nosec_test", "platforms": [ "windows", "linux", @@ -23384,7 +22072,28 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_nosec_test", + "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_nosec_test", "platforms": [ "windows", "linux", @@ -23405,7 +22114,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_nosec_test", + "name": "h2_sockpair_nosec_test", "platforms": [ "windows", "linux", @@ -23426,7 +22135,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_nosec_test", + "name": "h2_sockpair_nosec_test", "platforms": [ "windows", "linux", @@ -23447,7 +22156,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_nosec_test", + "name": "h2_sockpair_nosec_test", "platforms": [ "windows", "linux", @@ -23468,7 +22177,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_nosec_test", + "name": "h2_sockpair_nosec_test", "platforms": [ "windows", "linux", @@ -23489,7 +22198,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_nosec_test", + "name": "h2_sockpair_nosec_test", "platforms": [ "windows", "linux", @@ -23510,7 +22219,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_nosec_test", + "name": "h2_sockpair_nosec_test", "platforms": [ "windows", "linux", @@ -23531,7 +22240,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_nosec_test", + "name": "h2_sockpair_nosec_test", "platforms": [ "windows", "linux", @@ -23552,7 +22261,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_nosec_test", + "name": "h2_sockpair_nosec_test", "platforms": [ "windows", "linux", @@ -23573,7 +22282,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_nosec_test", + "name": "h2_sockpair_nosec_test", "platforms": [ "windows", "linux", @@ -23594,7 +22303,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_nosec_test", + "name": "h2_sockpair_nosec_test", "platforms": [ "windows", "linux", @@ -23615,7 +22324,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_nosec_test", + "name": "h2_sockpair_nosec_test", "platforms": [ "windows", "linux", @@ -23636,7 +22345,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_nosec_test", + "name": "h2_sockpair_nosec_test", "platforms": [ "windows", "linux", @@ -23657,7 +22366,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_nosec_test", + "name": "h2_sockpair_nosec_test", "platforms": [ "windows", "linux", @@ -23678,7 +22387,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_nosec_test", + "name": "h2_sockpair_nosec_test", "platforms": [ "windows", "linux", @@ -23699,7 +22408,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_nosec_test", + "name": "h2_sockpair_nosec_test", "platforms": [ "windows", "linux", @@ -23720,7 +22429,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_nosec_test", + "name": "h2_sockpair_nosec_test", "platforms": [ "windows", "linux", @@ -23741,7 +22450,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_nosec_test", + "name": "h2_sockpair_nosec_test", "platforms": [ "windows", "linux", @@ -23762,7 +22471,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_nosec_test", + "name": "h2_sockpair+trace_nosec_test", "platforms": [ "windows", "linux", @@ -23783,7 +22492,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_nosec_test", + "name": "h2_sockpair+trace_nosec_test", "platforms": [ "windows", "linux", @@ -23804,7 +22513,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_nosec_test", + "name": "h2_sockpair+trace_nosec_test", "platforms": [ "windows", "linux", @@ -23825,7 +22534,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_nosec_test", + "name": "h2_sockpair+trace_nosec_test", "platforms": [ "windows", "linux", @@ -23846,7 +22555,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_nosec_test", + "name": "h2_sockpair+trace_nosec_test", "platforms": [ "windows", "linux", @@ -23867,7 +22576,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_nosec_test", + "name": "h2_sockpair+trace_nosec_test", "platforms": [ "windows", "linux", @@ -23888,7 +22597,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_nosec_test", + "name": "h2_sockpair+trace_nosec_test", "platforms": [ "windows", "linux", @@ -23909,7 +22618,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_nosec_test", + "name": "h2_sockpair+trace_nosec_test", "platforms": [ "windows", "linux", @@ -23930,7 +22639,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_nosec_test", + "name": "h2_sockpair+trace_nosec_test", "platforms": [ "windows", "linux", @@ -23951,7 +22660,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_nosec_test", + "name": "h2_sockpair+trace_nosec_test", "platforms": [ "windows", "linux", @@ -23972,7 +22681,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_nosec_test", + "name": "h2_sockpair+trace_nosec_test", "platforms": [ "windows", "linux", @@ -23993,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", @@ -24035,7 +22723,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_nosec_test", + "name": "h2_sockpair+trace_nosec_test", "platforms": [ "windows", "linux", @@ -24056,7 +22744,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_nosec_test", + "name": "h2_sockpair+trace_nosec_test", "platforms": [ "windows", "linux", @@ -24077,7 +22765,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_nosec_test", + "name": "h2_sockpair+trace_nosec_test", "platforms": [ "windows", "linux", @@ -24098,7 +22786,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_nosec_test", + "name": "h2_sockpair+trace_nosec_test", "platforms": [ "windows", "linux", @@ -24119,7 +22807,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_nosec_test", + "name": "h2_sockpair+trace_nosec_test", "platforms": [ "windows", "linux", @@ -24140,7 +22828,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_nosec_test", + "name": "h2_sockpair+trace_nosec_test", "platforms": [ "windows", "linux", @@ -24161,7 +22849,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_nosec_test", + "name": "h2_sockpair+trace_nosec_test", "platforms": [ "windows", "linux", @@ -24182,7 +22870,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_nosec_test", + "name": "h2_sockpair+trace_nosec_test", "platforms": [ "windows", "linux", @@ -24203,7 +22891,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_nosec_test", + "name": "h2_sockpair+trace_nosec_test", "platforms": [ "windows", "linux", @@ -24224,7 +22912,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_nosec_test", + "name": "h2_sockpair+trace_nosec_test", "platforms": [ "windows", "linux", @@ -24245,7 +22933,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_nosec_test", + "name": "h2_sockpair+trace_nosec_test", "platforms": [ "windows", "linux", @@ -24266,7 +22954,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_nosec_test", + "name": "h2_sockpair+trace_nosec_test", "platforms": [ "windows", "linux", @@ -24287,7 +22975,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_nosec_test", + "name": "h2_sockpair+trace_nosec_test", "platforms": [ "windows", "linux", @@ -24308,7 +22996,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_nosec_test", + "name": "h2_sockpair+trace_nosec_test", "platforms": [ "windows", "linux", @@ -24329,7 +23017,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_nosec_test", + "name": "h2_sockpair+trace_nosec_test", "platforms": [ "windows", "linux", @@ -24350,7 +23038,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_nosec_test", + "name": "h2_sockpair+trace_nosec_test", "platforms": [ "windows", "linux", @@ -24371,7 +23059,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_nosec_test", + "name": "h2_sockpair+trace_nosec_test", "platforms": [ "windows", "linux", @@ -24386,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", @@ -24408,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", @@ -24430,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", @@ -24452,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", @@ -24474,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", @@ -24496,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", @@ -24518,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", @@ -24540,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", @@ -24562,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", @@ -24584,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", @@ -24606,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", @@ -24628,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", @@ -24650,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", @@ -24672,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", @@ -24694,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", @@ -24716,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", @@ -24738,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", @@ -24760,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", @@ -24782,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", @@ -24804,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", @@ -24826,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", @@ -24848,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", @@ -24870,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", @@ -24892,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", @@ -24914,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", @@ -24936,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", @@ -24958,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", @@ -24980,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", @@ -25002,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", @@ -25024,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 8c64423b51..86f42ee632 100644 --- a/vsprojects/buildtests_c.sln +++ b/vsprojects/buildtests_c.sln @@ -1241,18 +1241,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "h2_ssl_proxy_test", "vcxpro {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}" - ProjectSection(myProperties) = preProject - lib = "False" - EndProjectSection - ProjectSection(ProjectDependencies) = postProject - {1F1F9084-2A93-B80E-364F-5754894AFAB4} = {1F1F9084-2A93-B80E-364F-5754894AFAB4} - {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_census_nosec_test", "vcxproj\test/end2end/fixtures\h2_census_nosec_test\h2_census_nosec_test.vcxproj", "{A8039D43-910E-4248-2A22-74366E8C4DCD}" ProjectSection(myProperties) = preProject lib = "False" @@ -1349,18 +1337,6 @@ 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}" - ProjectSection(myProperties) = preProject - lib = "False" - EndProjectSection - ProjectSection(ProjectDependencies) = postProject - {47C2CB41-4E9F-58B6-F606-F6FAED5D00ED} = {47C2CB41-4E9F-58B6-F606-F6FAED5D00ED} - {0A7E7F92-FDEA-40F1-A9EC-3BA484F98BBF} = {0A7E7F92-FDEA-40F1-A9EC-3BA484F98BBF} - {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5} = {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5} - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - EndProjectSection -EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 @@ -3245,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 @@ -3389,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/vcxproj/grpc/grpc.vcxproj b/vsprojects/vcxproj/grpc/grpc.vcxproj index 869acb4039..30726ff5e9 100644 --- a/vsprojects/vcxproj/grpc/grpc.vcxproj +++ b/vsprojects/vcxproj/grpc/grpc.vcxproj @@ -288,7 +288,6 @@ - @@ -439,8 +438,6 @@ - - diff --git a/vsprojects/vcxproj/grpc/grpc.vcxproj.filters b/vsprojects/vcxproj/grpc/grpc.vcxproj.filters index 44cf627d13..26ef8aa781 100644 --- a/vsprojects/vcxproj/grpc/grpc.vcxproj.filters +++ b/vsprojects/vcxproj/grpc/grpc.vcxproj.filters @@ -22,9 +22,6 @@ src\core\channel - - src\core\channel - src\core\channel @@ -551,9 +548,6 @@ src\core\channel - - src\core\channel - src\core\channel diff --git a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj index 83a48c3a3d..1939396e1a 100644 --- a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj +++ b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj @@ -278,7 +278,6 @@ - @@ -417,8 +416,6 @@ - - diff --git a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters index 7c14e8cbc9..6075961030 100644 --- a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters +++ b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters @@ -25,9 +25,6 @@ src\core\channel - - src\core\channel - src\core\channel @@ -488,9 +485,6 @@ src\core\channel - - src\core\channel - src\core\channel diff --git a/vsprojects/vcxproj/test/end2end/fixtures/h2_uchannel_nosec_test/h2_uchannel_nosec_test.vcxproj b/vsprojects/vcxproj/test/end2end/fixtures/h2_uchannel_nosec_test/h2_uchannel_nosec_test.vcxproj deleted file mode 100644 index 76a9e5600f..0000000000 --- a/vsprojects/vcxproj/test/end2end/fixtures/h2_uchannel_nosec_test/h2_uchannel_nosec_test.vcxproj +++ /dev/null @@ -1,202 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {BD79A629-4181-DB5E-C28F-44EB280A6F91} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - h2_uchannel_nosec_test - static - Debug - static - Debug - - - h2_uchannel_nosec_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 - - - - - - - - - - {47C2CB41-4E9F-58B6-F606-F6FAED5D00ED} - - - {0A7E7F92-FDEA-40F1-A9EC-3BA484F98BBF} - - - {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5} - - - {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/end2end/fixtures/h2_uchannel_nosec_test/h2_uchannel_nosec_test.vcxproj.filters b/vsprojects/vcxproj/test/end2end/fixtures/h2_uchannel_nosec_test/h2_uchannel_nosec_test.vcxproj.filters deleted file mode 100644 index c9adeeebaf..0000000000 --- a/vsprojects/vcxproj/test/end2end/fixtures/h2_uchannel_nosec_test/h2_uchannel_nosec_test.vcxproj.filters +++ /dev/null @@ -1,24 +0,0 @@ - - - - - test\core\end2end\fixtures - - - - - - {549b9d3c-70c0-f3de-36d6-5b2ce5fb098c} - - - {d37f19b6-6893-6a90-09d2-e50d891899ff} - - - {bde36bf9-4894-e85b-4a35-f7b1abe9387f} - - - {e16ce654-bd8c-2527-1077-e6cd2639c1cb} - - - - diff --git a/vsprojects/vcxproj/test/end2end/fixtures/h2_uchannel_test/h2_uchannel_test.vcxproj b/vsprojects/vcxproj/test/end2end/fixtures/h2_uchannel_test/h2_uchannel_test.vcxproj deleted file mode 100644 index 1564608631..0000000000 --- a/vsprojects/vcxproj/test/end2end/fixtures/h2_uchannel_test/h2_uchannel_test.vcxproj +++ /dev/null @@ -1,202 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {E39D59C4-F5CB-7D68-DA6B-C6BC93843435} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - h2_uchannel_test - static - Debug - static - Debug - - - h2_uchannel_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 - - - - - - - - - - {1F1F9084-2A93-B80E-364F-5754894AFAB4} - - - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - - - {29D16885-7228-4C31-81ED-5F9187C7F2A9} - - - {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/end2end/fixtures/h2_uchannel_test/h2_uchannel_test.vcxproj.filters b/vsprojects/vcxproj/test/end2end/fixtures/h2_uchannel_test/h2_uchannel_test.vcxproj.filters deleted file mode 100644 index 611a643a33..0000000000 --- a/vsprojects/vcxproj/test/end2end/fixtures/h2_uchannel_test/h2_uchannel_test.vcxproj.filters +++ /dev/null @@ -1,24 +0,0 @@ - - - - - test\core\end2end\fixtures - - - - - - {0e4c3b3f-4d89-039d-c4d2-3bd39bb5701f} - - - {75084bcc-1809-7f7a-8989-d8fe2d5d404f} - - - {9e123c51-0a8c-f222-f2f9-3cee19f2f99e} - - - {999ee744-f147-9430-9a09-a16f69ecfa2a} - - - - -- cgit v1.2.3 From 1824f0519f26b00cb5e95e52ea50c7990223157c Mon Sep 17 00:00:00 2001 From: Matthew Iselin Date: Wed, 10 Feb 2016 12:16:06 +1100 Subject: Add HTTP request parsing. This extends the existing http parser to support requests as well as responses. httpcli continues to exist and work as it has previously, though in the new directory src/core/http (to reflect the fact the directory now contains code relevant to parsing requests, which httpcli would not generally involve itself in). --- BUILD | 40 +-- Makefile | 68 ++--- binding.gyp | 8 +- build.yaml | 26 +- config.m4 | 10 +- gRPC.podspec | 20 +- grpc.gemspec | 14 +- package.json | 14 +- package.xml | 14 +- src/core/http/format_request.c | 120 ++++++++ src/core/http/format_request.h | 45 +++ src/core/http/httpcli.c | 293 +++++++++++++++++++ src/core/http/httpcli.h | 144 ++++++++++ src/core/http/httpcli_security_connector.c | 188 +++++++++++++ src/core/http/parser.c | 313 +++++++++++++++++++++ src/core/http/parser.h | 116 ++++++++ src/core/httpcli/format_request.c | 120 -------- src/core/httpcli/format_request.h | 45 --- src/core/httpcli/httpcli.c | 288 ------------------- src/core/httpcli/httpcli.h | 163 ----------- src/core/httpcli/httpcli_security_connector.c | 188 ------------- src/core/httpcli/parser.c | 211 -------------- src/core/httpcli/parser.h | 64 ----- src/core/security/credentials.c | 25 +- src/core/security/credentials.h | 7 +- src/core/security/google_default_credentials.c | 9 +- src/core/security/jwt_verifier.c | 20 +- src/python/grpcio/grpc_core_dependencies.py | 8 +- test/core/http/format_request_test.c | 165 +++++++++++ test/core/http/httpcli_test.c | 200 +++++++++++++ test/core/http/httpscli_test.c | 203 +++++++++++++ test/core/http/parser_test.c | 260 +++++++++++++++++ test/core/http/test_server.py | 71 +++++ test/core/httpcli/format_request_test.c | 165 ----------- test/core/httpcli/httpcli_test.c | 200 ------------- test/core/httpcli/httpscli_test.c | 203 ------------- test/core/httpcli/parser_test.c | 171 ----------- test/core/httpcli/test_server.py | 71 ----- test/core/security/credentials_test.c | 25 +- test/core/security/jwt_verifier_test.c | 10 +- test/core/util/port_posix.c | 1 + test/core/util/port_server_client.c | 8 +- test/core/util/port_windows.c | 1 + tools/doxygen/Doxyfile.core.internal | 14 +- tools/run_tests/sources_and_headers.json | 50 ++-- tools/run_tests/tests.json | 4 +- vsprojects/buildtests_c.sln | 36 +-- vsprojects/vcxproj/grpc/grpc.vcxproj | 14 +- vsprojects/vcxproj/grpc/grpc.vcxproj.filters | 32 +-- .../vcxproj/grpc_unsecure/grpc_unsecure.vcxproj | 12 +- .../grpc_unsecure/grpc_unsecure.vcxproj.filters | 28 +- .../test/http_parser_test/http_parser_test.vcxproj | 199 +++++++++++++ .../http_parser_test.vcxproj.filters | 21 ++ .../httpcli_format_request_test.vcxproj | 2 +- .../httpcli_format_request_test.vcxproj.filters | 8 +- .../httpcli_parser_test.vcxproj | 199 ------------- .../httpcli_parser_test.vcxproj.filters | 21 -- 57 files changed, 2605 insertions(+), 2370 deletions(-) create mode 100644 src/core/http/format_request.c create mode 100644 src/core/http/format_request.h create mode 100644 src/core/http/httpcli.c create mode 100644 src/core/http/httpcli.h create mode 100644 src/core/http/httpcli_security_connector.c create mode 100644 src/core/http/parser.c create mode 100644 src/core/http/parser.h delete mode 100644 src/core/httpcli/format_request.c delete mode 100644 src/core/httpcli/format_request.h delete mode 100644 src/core/httpcli/httpcli.c delete mode 100644 src/core/httpcli/httpcli.h delete mode 100644 src/core/httpcli/httpcli_security_connector.c delete mode 100644 src/core/httpcli/parser.c delete mode 100644 src/core/httpcli/parser.h create mode 100644 test/core/http/format_request_test.c create mode 100644 test/core/http/httpcli_test.c create mode 100644 test/core/http/httpscli_test.c create mode 100644 test/core/http/parser_test.c create mode 100755 test/core/http/test_server.py delete mode 100644 test/core/httpcli/format_request_test.c delete mode 100644 test/core/httpcli/httpcli_test.c delete mode 100644 test/core/httpcli/httpscli_test.c delete mode 100644 test/core/httpcli/parser_test.c delete mode 100755 test/core/httpcli/test_server.py create mode 100644 vsprojects/vcxproj/test/http_parser_test/http_parser_test.vcxproj create mode 100644 vsprojects/vcxproj/test/http_parser_test/http_parser_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/httpcli_parser_test/httpcli_parser_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/httpcli_parser_test/httpcli_parser_test.vcxproj.filters (limited to 'test') diff --git a/BUILD b/BUILD index 2c2cce76c4..4ca2c250a0 100644 --- a/BUILD +++ b/BUILD @@ -190,9 +190,9 @@ cc_library( "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/http/format_request.h", + "src/core/http/httpcli.h", + "src/core/http/parser.h", "src/core/iomgr/closure.h", "src/core/iomgr/endpoint.h", "src/core/iomgr/endpoint_pair.h", @@ -331,9 +331,9 @@ cc_library( "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/http/format_request.c", + "src/core/http/httpcli.c", + "src/core/http/parser.c", "src/core/iomgr/closure.c", "src/core/iomgr/endpoint.c", "src/core/iomgr/endpoint_pair_posix.c", @@ -429,7 +429,7 @@ cc_library( "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/http/httpcli_security_connector.c", "src/core/security/b64.c", "src/core/security/client_auth_filter.c", "src/core/security/credentials.c", @@ -562,9 +562,9 @@ cc_library( "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/http/format_request.h", + "src/core/http/httpcli.h", + "src/core/http/parser.h", "src/core/iomgr/closure.h", "src/core/iomgr/endpoint.h", "src/core/iomgr/endpoint_pair.h", @@ -690,9 +690,9 @@ cc_library( "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/http/format_request.c", + "src/core/http/httpcli.c", + "src/core/http/parser.c", "src/core/iomgr/closure.c", "src/core/iomgr/endpoint.c", "src/core/iomgr/endpoint_pair_posix.c", @@ -1390,9 +1390,9 @@ objc_library( "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/http/format_request.c", + "src/core/http/httpcli.c", + "src/core/http/parser.c", "src/core/iomgr/closure.c", "src/core/iomgr/endpoint.c", "src/core/iomgr/endpoint_pair_posix.c", @@ -1488,7 +1488,7 @@ objc_library( "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/http/httpcli_security_connector.c", "src/core/security/b64.c", "src/core/security/client_auth_filter.c", "src/core/security/credentials.c", @@ -1566,9 +1566,9 @@ objc_library( "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/http/format_request.h", + "src/core/http/httpcli.h", + "src/core/http/parser.h", "src/core/iomgr/closure.h", "src/core/iomgr/endpoint.h", "src/core/iomgr/endpoint_pair.h", diff --git a/Makefile b/Makefile index 0e2b8905b0..aaa2d79f8f 100644 --- a/Makefile +++ b/Makefile @@ -927,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 @@ -1236,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 \ @@ -1522,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" @@ -2437,9 +2437,9 @@ LIBGRPC_SRC = \ 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/http/format_request.c \ + src/core/http/httpcli.c \ + src/core/http/parser.c \ src/core/iomgr/closure.c \ src/core/iomgr/endpoint.c \ src/core/iomgr/endpoint_pair_posix.c \ @@ -2535,7 +2535,7 @@ LIBGRPC_SRC = \ 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/http/httpcli_security_connector.c \ src/core/security/b64.c \ src/core/security/client_auth_filter.c \ src/core/security/credentials.c \ @@ -2797,9 +2797,9 @@ LIBGRPC_UNSECURE_SRC = \ 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/http/format_request.c \ + src/core/http/httpcli.c \ + src/core/http/parser.c \ src/core/iomgr/closure.c \ src/core/iomgr/endpoint.c \ src/core/iomgr/endpoint_pair_posix.c \ @@ -7757,72 +7757,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) @@ -7842,7 +7842,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) @@ -7854,7 +7854,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) @@ -7874,7 +7874,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) @@ -13378,7 +13378,7 @@ 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/http/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) diff --git a/binding.gyp b/binding.gyp index c16697786a..8f3382a19a 100644 --- a/binding.gyp +++ b/binding.gyp @@ -592,9 +592,9 @@ '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/http/format_request.c', + 'src/core/http/httpcli.c', + 'src/core/http/parser.c', 'src/core/iomgr/closure.c', 'src/core/iomgr/endpoint.c', 'src/core/iomgr/endpoint_pair_posix.c', @@ -690,7 +690,7 @@ '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/http/httpcli_security_connector.c', 'src/core/security/b64.c', 'src/core/security/client_auth_filter.c', 'src/core/security/credentials.c', diff --git a/build.yaml b/build.yaml index 9773490776..6b35e6fe71 100644 --- a/build.yaml +++ b/build.yaml @@ -280,9 +280,9 @@ filegroups: - 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/http/format_request.h + - src/core/http/httpcli.h + - src/core/http/parser.h - src/core/iomgr/closure.h - src/core/iomgr/endpoint.h - src/core/iomgr/endpoint_pair.h @@ -401,9 +401,9 @@ filegroups: - 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/http/format_request.c + - src/core/http/httpcli.c + - src/core/http/parser.c - src/core/iomgr/closure.c - src/core/iomgr/endpoint.c - src/core/iomgr/endpoint_pair_posix.c @@ -524,7 +524,7 @@ filegroups: - src/core/tsi/transport_security.h - src/core/tsi/transport_security_interface.h src: - - src/core/httpcli/httpcli_security_connector.c + - src/core/http/httpcli_security_connector.c - src/core/security/b64.c - src/core/security/client_auth_filter.c - src/core/security/credentials.c @@ -1560,21 +1560,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 @@ -1585,7 +1585,7 @@ targets: build: test language: c src: - - test/core/httpcli/httpcli_test.c + - test/core/http/httpcli_test.c deps: - grpc_test_util - grpc @@ -1600,7 +1600,7 @@ targets: build: test language: c src: - - test/core/httpcli/httpscli_test.c + - test/core/http/httpscli_test.c deps: - grpc_test_util - grpc diff --git a/config.m4 b/config.m4 index 2d42c405ec..e8ee56f210 100644 --- a/config.m4 +++ b/config.m4 @@ -114,9 +114,9 @@ if test "$PHP_GRPC" != "no"; then 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/http/format_request.c \ + src/core/http/httpcli.c \ + src/core/http/parser.c \ src/core/iomgr/closure.c \ src/core/iomgr/endpoint.c \ src/core/iomgr/endpoint_pair_posix.c \ @@ -212,7 +212,7 @@ if test "$PHP_GRPC" != "no"; then 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/http/httpcli_security_connector.c \ src/core/security/b64.c \ src/core/security/client_auth_filter.c \ src/core/security/credentials.c \ @@ -551,7 +551,7 @@ if test "$PHP_GRPC" != "no"; then 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/http) 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) diff --git a/gRPC.podspec b/gRPC.podspec index 65f24a658c..0187d11aa4 100644 --- a/gRPC.podspec +++ b/gRPC.podspec @@ -194,9 +194,9 @@ Pod::Spec.new do |s| '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/http/format_request.h', + 'src/core/http/httpcli.h', + 'src/core/http/parser.h', 'src/core/iomgr/closure.h', 'src/core/iomgr/endpoint.h', 'src/core/iomgr/endpoint_pair.h', @@ -348,9 +348,9 @@ Pod::Spec.new do |s| '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/http/format_request.c', + 'src/core/http/httpcli.c', + 'src/core/http/parser.c', 'src/core/iomgr/closure.c', 'src/core/iomgr/endpoint.c', 'src/core/iomgr/endpoint_pair_posix.c', @@ -446,7 +446,7 @@ Pod::Spec.new do |s| '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/http/httpcli_security_connector.c', 'src/core/security/b64.c', 'src/core/security/client_auth_filter.c', 'src/core/security/credentials.c', @@ -522,9 +522,9 @@ Pod::Spec.new do |s| '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/http/format_request.h', + 'src/core/http/httpcli.h', + 'src/core/http/parser.h', 'src/core/iomgr/closure.h', 'src/core/iomgr/endpoint.h', 'src/core/iomgr/endpoint_pair.h', diff --git a/grpc.gemspec b/grpc.gemspec index 0873286e21..c897ccd551 100755 --- a/grpc.gemspec +++ b/grpc.gemspec @@ -190,9 +190,9 @@ Gem::Specification.new do |s| 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/http/format_request.h ) + s.files += %w( src/core/http/httpcli.h ) + s.files += %w( src/core/http/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 ) @@ -331,9 +331,9 @@ Gem::Specification.new do |s| 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/http/format_request.c ) + s.files += %w( src/core/http/httpcli.c ) + s.files += %w( src/core/http/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 ) @@ -429,7 +429,7 @@ Gem::Specification.new do |s| 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/http/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 ) diff --git a/package.json b/package.json index bc15183c93..3fb0799fd3 100644 --- a/package.json +++ b/package.json @@ -132,9 +132,9 @@ "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/http/format_request.h", + "src/core/http/httpcli.h", + "src/core/http/parser.h", "src/core/iomgr/closure.h", "src/core/iomgr/endpoint.h", "src/core/iomgr/endpoint_pair.h", @@ -273,9 +273,9 @@ "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/http/format_request.c", + "src/core/http/httpcli.c", + "src/core/http/parser.c", "src/core/iomgr/closure.c", "src/core/iomgr/endpoint.c", "src/core/iomgr/endpoint_pair_posix.c", @@ -371,7 +371,7 @@ "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/http/httpcli_security_connector.c", "src/core/security/b64.c", "src/core/security/client_auth_filter.c", "src/core/security/credentials.c", diff --git a/package.xml b/package.xml index 95bc835602..cf11e0e450 100644 --- a/package.xml +++ b/package.xml @@ -194,9 +194,9 @@ - - - + + + @@ -335,9 +335,9 @@ - - - + + + @@ -433,7 +433,7 @@ - + diff --git a/src/core/http/format_request.c b/src/core/http/format_request.c new file mode 100644 index 0000000000..60179297bf --- /dev/null +++ b/src/core/http/format_request.c @@ -0,0 +1,120 @@ +/* + * + * 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/http/format_request.h" + +#include +#include +#include + +#include "src/core/support/string.h" +#include +#include +#include +#include + +static void fill_common_header(const grpc_httpcli_request *request, + gpr_strvec *buf) { + size_t i; + 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: ")); + gpr_strvec_add(buf, gpr_strdup(request->host)); + gpr_strvec_add(buf, gpr_strdup("\r\n")); + gpr_strvec_add(buf, gpr_strdup("Connection: close\r\n")); + gpr_strvec_add(buf, + gpr_strdup("User-Agent: " GRPC_HTTPCLI_USER_AGENT "\r\n")); + /* user supplied headers */ + 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->http.hdrs[i].value)); + gpr_strvec_add(buf, gpr_strdup("\r\n")); + } +} + +gpr_slice grpc_httpcli_format_get_request(const grpc_httpcli_request *request) { + gpr_strvec out; + char *flat; + size_t flat_len; + + gpr_strvec_init(&out); + gpr_strvec_add(&out, gpr_strdup("GET ")); + fill_common_header(request, &out); + gpr_strvec_add(&out, gpr_strdup("\r\n")); + + flat = gpr_strvec_flatten(&out, &flat_len); + gpr_strvec_destroy(&out); + + return gpr_slice_new(flat, flat_len, gpr_free); +} + +gpr_slice grpc_httpcli_format_post_request(const grpc_httpcli_request *request, + const char *body_bytes, + size_t body_size) { + gpr_strvec out; + char *tmp; + size_t out_len; + size_t i; + + gpr_strvec_init(&out); + + gpr_strvec_add(&out, gpr_strdup("POST ")); + fill_common_header(request, &out); + if (body_bytes) { + uint8_t has_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; + } + } + if (!has_content_type) { + gpr_strvec_add(&out, gpr_strdup("Content-Type: text/plain\r\n")); + } + gpr_asprintf(&tmp, "Content-Length: %lu\r\n", (unsigned long)body_size); + gpr_strvec_add(&out, tmp); + } + gpr_strvec_add(&out, gpr_strdup("\r\n")); + tmp = gpr_strvec_flatten(&out, &out_len); + gpr_strvec_destroy(&out); + + if (body_bytes) { + tmp = gpr_realloc(tmp, out_len + body_size); + memcpy(tmp + out_len, body_bytes, body_size); + out_len += body_size; + } + + return gpr_slice_new(tmp, out_len, gpr_free); +} diff --git a/src/core/http/format_request.h b/src/core/http/format_request.h new file mode 100644 index 0000000000..49593b695c --- /dev/null +++ b/src/core/http/format_request.h @@ -0,0 +1,45 @@ +/* + * + * 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_HTTP_FORMAT_REQUEST_H +#define GRPC_CORE_HTTP_FORMAT_REQUEST_H + +#include "src/core/http/httpcli.h" +#include + +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_CORE_HTTP_FORMAT_REQUEST_H */ diff --git a/src/core/http/httpcli.c b/src/core/http/httpcli.c new file mode 100644 index 0000000000..1c0d3336ea --- /dev/null +++ b/src/core/http/httpcli.c @@ -0,0 +1,293 @@ +/* + * + * 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/http/httpcli.h" +#include "src/core/iomgr/sockaddr.h" + +#include + +#include +#include +#include + +#include "src/core/http/format_request.h" +#include "src/core/http/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" + +typedef struct { + gpr_slice request_text; + grpc_http_parser parser; + grpc_resolved_addresses *addresses; + size_t next_address; + grpc_endpoint *ep; + char *host; + char *ssl_host_override; + gpr_timespec deadline; + int have_read_byte; + const grpc_httpcli_handshaker *handshaker; + grpc_httpcli_response_cb on_response; + void *user_data; + grpc_httpcli_context *context; + grpc_pollset *pollset; + grpc_iomgr_object iomgr_obj; + gpr_slice_buffer incoming; + gpr_slice_buffer outgoing; + grpc_closure on_read; + grpc_closure done_write; + grpc_closure connected; +} internal_request; + +static grpc_httpcli_get_override g_get_override = NULL; +static grpc_httpcli_post_override g_post_override = NULL; + +static void plaintext_handshake(grpc_exec_ctx *exec_ctx, void *arg, + grpc_endpoint *endpoint, const char *host, + void (*on_done)(grpc_exec_ctx *exec_ctx, + void *arg, + grpc_endpoint *endpoint)) { + on_done(exec_ctx, arg, endpoint); +} + +const grpc_httpcli_handshaker grpc_httpcli_plaintext = {"http", + plaintext_handshake}; + +void grpc_httpcli_context_init(grpc_httpcli_context *context) { + context->pollset_set = grpc_pollset_set_create(); +} + +void grpc_httpcli_context_destroy(grpc_httpcli_context *context) { + grpc_pollset_set_destroy(context->pollset_set); +} + +static void next_address(grpc_exec_ctx *exec_ctx, internal_request *req); + +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.http.response : NULL); + grpc_http_parser_destroy(&req->parser); + if (req->addresses != NULL) { + grpc_resolved_addresses_destroy(req->addresses); + } + if (req->ep != NULL) { + grpc_endpoint_destroy(exec_ctx, req->ep); + } + gpr_slice_unref(req->request_text); + gpr_free(req->host); + gpr_free(req->ssl_host_override); + grpc_iomgr_unregister_object(&req->iomgr_obj); + gpr_slice_buffer_destroy(&req->incoming); + gpr_slice_buffer_destroy(&req->outgoing); + gpr_free(req); +} + +static void on_read(grpc_exec_ctx *exec_ctx, void *user_data, bool success); + +static void do_read(grpc_exec_ctx *exec_ctx, internal_request *req) { + grpc_endpoint_read(exec_ctx, req->ep, &req->incoming, &req->on_read); +} + +static void on_read(grpc_exec_ctx *exec_ctx, void *user_data, bool success) { + internal_request *req = user_data; + size_t i; + + for (i = 0; i < req->incoming.count; i++) { + if (GPR_SLICE_LENGTH(req->incoming.slices[i])) { + req->have_read_byte = 1; + if (!grpc_http_parser_parse(&req->parser, req->incoming.slices[i])) { + finish(exec_ctx, req, 0); + return; + } + } + } + + if (success) { + do_read(exec_ctx, req); + } else if (!req->have_read_byte) { + next_address(exec_ctx, req); + } else { + 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); + } +} + +static void on_written(grpc_exec_ctx *exec_ctx, internal_request *req) { + do_read(exec_ctx, req); +} + +static void done_write(grpc_exec_ctx *exec_ctx, void *arg, bool success) { + internal_request *req = arg; + if (success) { + on_written(exec_ctx, req); + } else { + next_address(exec_ctx, req); + } +} + +static void start_write(grpc_exec_ctx *exec_ctx, internal_request *req) { + gpr_slice_ref(req->request_text); + gpr_slice_buffer_add(&req->outgoing, req->request_text); + grpc_endpoint_write(exec_ctx, req->ep, &req->outgoing, &req->done_write); +} + +static void on_handshake_done(grpc_exec_ctx *exec_ctx, void *arg, + grpc_endpoint *ep) { + internal_request *req = arg; + + if (!ep) { + next_address(exec_ctx, req); + return; + } + + req->ep = ep; + start_write(exec_ctx, req); +} + +static void on_connected(grpc_exec_ctx *exec_ctx, void *arg, bool success) { + internal_request *req = arg; + + if (!req->ep) { + next_address(exec_ctx, req); + return; + } + req->handshaker->handshake( + exec_ctx, req, req->ep, + req->ssl_host_override ? req->ssl_host_override : req->host, + on_handshake_done); +} + +static void next_address(grpc_exec_ctx *exec_ctx, internal_request *req) { + grpc_resolved_address *addr; + if (req->next_address == req->addresses->naddrs) { + finish(exec_ctx, req, 0); + return; + } + addr = &req->addresses->addrs[req->next_address++]; + grpc_closure_init(&req->connected, on_connected, req); + grpc_tcp_client_connect( + exec_ctx, &req->connected, &req->ep, req->context->pollset_set, + (struct sockaddr *)&addr->addr, addr->len, req->deadline); +} + +static void on_resolved(grpc_exec_ctx *exec_ctx, void *arg, + grpc_resolved_addresses *addresses) { + internal_request *req = arg; + if (!addresses) { + finish(exec_ctx, req, 0); + return; + } + req->addresses = addresses; + req->next_address = 0; + next_address(exec_ctx, req); +} + +static void internal_request_begin( + grpc_exec_ctx *exec_ctx, grpc_httpcli_context *context, + grpc_pollset *pollset, const grpc_httpcli_request *request, + gpr_timespec deadline, grpc_httpcli_response_cb on_response, + void *user_data, const char *name, gpr_slice request_text) { + internal_request *req = gpr_malloc(sizeof(internal_request)); + memset(req, 0, sizeof(*req)); + req->request_text = request_text; + grpc_http_parser_init(&req->parser); + req->on_response = on_response; + req->user_data = user_data; + req->deadline = deadline; + req->handshaker = + request->handshaker ? request->handshaker : &grpc_httpcli_plaintext; + req->context = context; + req->pollset = pollset; + grpc_closure_init(&req->on_read, on_read, req); + grpc_closure_init(&req->done_write, done_write, req); + gpr_slice_buffer_init(&req->incoming); + gpr_slice_buffer_init(&req->outgoing); + grpc_iomgr_register_object(&req->iomgr_obj, name); + req->host = gpr_strdup(request->host); + req->ssl_host_override = gpr_strdup(request->ssl_host_override); + + grpc_pollset_set_add_pollset(exec_ctx, req->context->pollset_set, + req->pollset); + grpc_resolve_address(request->host, req->handshaker->default_port, + on_resolved, req); +} + +void grpc_httpcli_get(grpc_exec_ctx *exec_ctx, grpc_httpcli_context *context, + grpc_pollset *pollset, + const grpc_httpcli_request *request, + gpr_timespec deadline, + grpc_httpcli_response_cb on_response, void *user_data) { + char *name; + if (g_get_override && + g_get_override(exec_ctx, request, deadline, on_response, user_data)) { + return; + } + 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)); + gpr_free(name); +} + +void grpc_httpcli_post(grpc_exec_ctx *exec_ctx, grpc_httpcli_context *context, + grpc_pollset *pollset, + const grpc_httpcli_request *request, + const char *body_bytes, size_t body_size, + gpr_timespec deadline, + grpc_httpcli_response_cb on_response, void *user_data) { + char *name; + if (g_post_override && + g_post_override(exec_ctx, request, body_bytes, body_size, deadline, + on_response, user_data)) { + return; + } + 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)); + gpr_free(name); +} + +void grpc_httpcli_set_override(grpc_httpcli_get_override get, + grpc_httpcli_post_override post) { + g_get_override = get; + g_post_override = post; +} diff --git a/src/core/http/httpcli.h b/src/core/http/httpcli.h new file mode 100644 index 0000000000..0bf4f2f445 --- /dev/null +++ b/src/core/http/httpcli.h @@ -0,0 +1,144 @@ +/* + * + * 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_HTTP_HTTPCLI_H +#define GRPC_CORE_HTTP_HTTPCLI_H + +#include + +#include + +#include "src/core/http/parser.h" +#include "src/core/iomgr/endpoint.h" +#include "src/core/iomgr/iomgr_internal.h" +#include "src/core/iomgr/pollset_set.h" + +/* User agent this library reports */ +#define GRPC_HTTPCLI_USER_AGENT "grpc-httpcli/0.0" + +/* Tracks in-progress http requests + TODO(ctiller): allow caching and capturing multiple requests for the + same content and combining them */ +typedef struct grpc_httpcli_context { + grpc_pollset_set *pollset_set; +} grpc_httpcli_context; + +typedef struct { + const char *default_port; + void (*handshake)(grpc_exec_ctx *exec_ctx, void *arg, grpc_endpoint *endpoint, + const char *host, + void (*on_done)(grpc_exec_ctx *exec_ctx, void *arg, + grpc_endpoint *endpoint)); +} grpc_httpcli_handshaker; + +extern const grpc_httpcli_handshaker grpc_httpcli_plaintext; +extern const grpc_httpcli_handshaker grpc_httpcli_ssl; + +/* A request */ +typedef struct grpc_httpcli_request { + /* The host name to connect to */ + char *host; + /* The host to verify in the SSL handshake (or NULL) */ + char *ssl_host_override; + /* The main part of the request + The following headers are supplied automatically and MUST NOT be set here: + Host, Connection, User-Agent */ + grpc_http_request http; + /* handshaker to use ssl for the request */ + const grpc_httpcli_handshaker *handshaker; +} grpc_httpcli_request; + +/* 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_http_response *response); + +void grpc_httpcli_context_init(grpc_httpcli_context *context); +void grpc_httpcli_context_destroy(grpc_httpcli_context *context); + +/* Asynchronously perform a HTTP GET. + 'context' specifies the http context under which to do the get + 'pollset' indicates a grpc_pollset that is interested in the result + of the get - work on this pollset may be used to progress the get + operation + 'request' contains request parameters - these are caller owned and can be + destroyed once the call returns + 'deadline' contains a deadline for the request (or gpr_inf_future) + 'on_response' is a callback to report results to (and 'user_data' is a user + supplied pointer to pass to said call) */ +void grpc_httpcli_get(grpc_exec_ctx *exec_ctx, grpc_httpcli_context *context, + grpc_pollset *pollset, + const grpc_httpcli_request *request, + gpr_timespec deadline, + grpc_httpcli_response_cb on_response, void *user_data); + +/* Asynchronously perform a HTTP POST. + 'context' specifies the http context under which to do the post + 'pollset' indicates a grpc_pollset that is interested in the result + of the post - work on this pollset may be used to progress the post + operation + 'request' contains request parameters - these are caller owned and can be + destroyed once the call returns + 'body_bytes' and 'body_size' specify the payload for the post. + When there is no body, pass in NULL as body_bytes. + 'deadline' contains a deadline for the request (or gpr_inf_future) + 'em' points to a caller owned event manager that must be alive for the + lifetime of the request + 'on_response' is a callback to report results to (and 'user_data' is a user + supplied pointer to pass to said call) + Does not support ?var1=val1&var2=val2 in the path. */ +void grpc_httpcli_post(grpc_exec_ctx *exec_ctx, grpc_httpcli_context *context, + grpc_pollset *pollset, + const grpc_httpcli_request *request, + const char *body_bytes, size_t body_size, + gpr_timespec deadline, + grpc_httpcli_response_cb on_response, void *user_data); + +/* override functions return 1 if they handled the request, 0 otherwise */ +typedef int (*grpc_httpcli_get_override)(grpc_exec_ctx *exec_ctx, + const grpc_httpcli_request *request, + gpr_timespec deadline, + grpc_httpcli_response_cb on_response, + void *user_data); +typedef int (*grpc_httpcli_post_override)( + grpc_exec_ctx *exec_ctx, const grpc_httpcli_request *request, + const char *body_bytes, size_t body_size, gpr_timespec deadline, + grpc_httpcli_response_cb on_response, void *user_data); + +void grpc_httpcli_set_override(grpc_httpcli_get_override get, + grpc_httpcli_post_override post); + +#endif /* GRPC_CORE_HTTP_HTTPCLI_H */ diff --git a/src/core/http/httpcli_security_connector.c b/src/core/http/httpcli_security_connector.c new file mode 100644 index 0000000000..ce82701089 --- /dev/null +++ b/src/core/http/httpcli_security_connector.c @@ -0,0 +1,188 @@ +/* + * + * 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/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" + +typedef struct { + grpc_channel_security_connector base; + tsi_ssl_handshaker_factory *handshaker_factory; + char *secure_peer_name; +} grpc_httpcli_ssl_channel_security_connector; + +static void httpcli_ssl_destroy(grpc_security_connector *sc) { + grpc_httpcli_ssl_channel_security_connector *c = + (grpc_httpcli_ssl_channel_security_connector *)sc; + if (c->handshaker_factory != NULL) { + tsi_ssl_handshaker_factory_destroy(c->handshaker_factory); + } + if (c->secure_peer_name != NULL) gpr_free(c->secure_peer_name); + gpr_free(sc); +} + +static void httpcli_ssl_do_handshake(grpc_exec_ctx *exec_ctx, + grpc_channel_security_connector *sc, + grpc_endpoint *nonsecure_endpoint, + grpc_security_handshake_done_cb cb, + void *user_data) { + grpc_httpcli_ssl_channel_security_connector *c = + (grpc_httpcli_ssl_channel_security_connector *)sc; + tsi_result result = TSI_OK; + tsi_handshaker *handshaker; + if (c->handshaker_factory == NULL) { + cb(exec_ctx, user_data, GRPC_SECURITY_ERROR, NULL, NULL); + return; + } + result = tsi_ssl_handshaker_factory_create_handshaker( + c->handshaker_factory, c->secure_peer_name, &handshaker); + if (result != TSI_OK) { + gpr_log(GPR_ERROR, "Handshaker creation failed with error %s.", + tsi_result_to_string(result)); + cb(exec_ctx, user_data, GRPC_SECURITY_ERROR, NULL, NULL); + } else { + grpc_do_security_handshake(exec_ctx, handshaker, &sc->base, true, + nonsecure_endpoint, cb, user_data); + } +} + +static void httpcli_ssl_check_peer(grpc_exec_ctx *exec_ctx, + grpc_security_connector *sc, tsi_peer peer, + grpc_security_peer_check_cb cb, + void *user_data) { + grpc_httpcli_ssl_channel_security_connector *c = + (grpc_httpcli_ssl_channel_security_connector *)sc; + grpc_security_status status = GRPC_SECURITY_OK; + + /* Check the peer name. */ + if (c->secure_peer_name != NULL && + !tsi_ssl_peer_matches_name(&peer, c->secure_peer_name)) { + gpr_log(GPR_ERROR, "Peer name %s is not in peer certificate", + c->secure_peer_name); + status = GRPC_SECURITY_ERROR; + } + cb(exec_ctx, user_data, status, NULL); + tsi_peer_destruct(&peer); +} + +static grpc_security_connector_vtable httpcli_ssl_vtable = { + httpcli_ssl_destroy, httpcli_ssl_check_peer}; + +static grpc_security_status httpcli_ssl_channel_security_connector_create( + const unsigned char *pem_root_certs, size_t pem_root_certs_size, + const char *secure_peer_name, grpc_channel_security_connector **sc) { + tsi_result result = TSI_OK; + grpc_httpcli_ssl_channel_security_connector *c; + + if (secure_peer_name != NULL && pem_root_certs == NULL) { + gpr_log(GPR_ERROR, + "Cannot assert a secure peer name without a trust root."); + return GRPC_SECURITY_ERROR; + } + + c = gpr_malloc(sizeof(grpc_httpcli_ssl_channel_security_connector)); + memset(c, 0, sizeof(grpc_httpcli_ssl_channel_security_connector)); + + gpr_ref_init(&c->base.base.refcount, 1); + c->base.base.vtable = &httpcli_ssl_vtable; + if (secure_peer_name != NULL) { + c->secure_peer_name = gpr_strdup(secure_peer_name); + } + result = tsi_create_ssl_client_handshaker_factory( + NULL, 0, NULL, 0, pem_root_certs, pem_root_certs_size, NULL, NULL, NULL, + 0, &c->handshaker_factory); + if (result != TSI_OK) { + gpr_log(GPR_ERROR, "Handshaker factory creation failed with %s.", + tsi_result_to_string(result)); + httpcli_ssl_destroy(&c->base.base); + *sc = NULL; + return GRPC_SECURITY_ERROR; + } + c->base.do_handshake = httpcli_ssl_do_handshake; + *sc = &c->base; + return GRPC_SECURITY_OK; +} + +/* handshaker */ + +typedef struct { + void (*func)(grpc_exec_ctx *exec_ctx, void *arg, grpc_endpoint *endpoint); + void *arg; +} on_done_closure; + +static void on_secure_transport_setup_done(grpc_exec_ctx *exec_ctx, void *rp, + grpc_security_status status, + grpc_endpoint *secure_endpoint, + grpc_auth_context *auth_context) { + on_done_closure *c = rp; + if (status != GRPC_SECURITY_OK) { + gpr_log(GPR_ERROR, "Secure transport setup failed with error %d.", status); + c->func(exec_ctx, c->arg, NULL); + } else { + c->func(exec_ctx, c->arg, secure_endpoint); + } + gpr_free(c); +} + +static void ssl_handshake(grpc_exec_ctx *exec_ctx, void *arg, + grpc_endpoint *tcp, const char *host, + void (*on_done)(grpc_exec_ctx *exec_ctx, void *arg, + grpc_endpoint *endpoint)) { + grpc_channel_security_connector *sc = NULL; + const unsigned char *pem_root_certs = NULL; + on_done_closure *c = gpr_malloc(sizeof(*c)); + size_t pem_root_certs_size = grpc_get_default_ssl_roots(&pem_root_certs); + if (pem_root_certs == NULL || pem_root_certs_size == 0) { + gpr_log(GPR_ERROR, "Could not get default pem root certs."); + on_done(exec_ctx, arg, NULL); + gpr_free(c); + return; + } + c->func = on_done; + c->arg = arg; + GPR_ASSERT(httpcli_ssl_channel_security_connector_create( + pem_root_certs, pem_root_certs_size, host, &sc) == + GRPC_SECURITY_OK); + grpc_channel_security_connector_do_handshake( + exec_ctx, sc, tcp, on_secure_transport_setup_done, c); + GRPC_SECURITY_CONNECTOR_UNREF(&sc->base, "httpcli"); +} + +const grpc_httpcli_handshaker grpc_httpcli_ssl = {"https", ssl_handshake}; diff --git a/src/core/http/parser.c b/src/core/http/parser.c new file mode 100644 index 0000000000..ebec8a5157 --- /dev/null +++ b/src/core/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/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/http/parser.h b/src/core/http/parser.h new file mode 100644 index 0000000000..39517e485a --- /dev/null +++ b/src/core/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_HTTP_PARSER_H +#define GRPC_CORE_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_HTTP_PARSER_H */ diff --git a/src/core/httpcli/format_request.c b/src/core/httpcli/format_request.c deleted file mode 100644 index 04f2a2d99a..0000000000 --- a/src/core/httpcli/format_request.c +++ /dev/null @@ -1,120 +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/format_request.h" - -#include -#include -#include - -#include "src/core/support/string.h" -#include -#include -#include -#include - -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(" HTTP/1.0\r\n")); - /* just in case some crazy server really expects HTTP/1.1 */ - gpr_strvec_add(buf, gpr_strdup("Host: ")); - gpr_strvec_add(buf, gpr_strdup(request->host)); - gpr_strvec_add(buf, gpr_strdup("\r\n")); - gpr_strvec_add(buf, gpr_strdup("Connection: close\r\n")); - 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)); - gpr_strvec_add(buf, gpr_strdup(": ")); - gpr_strvec_add(buf, gpr_strdup(request->hdrs[i].value)); - gpr_strvec_add(buf, gpr_strdup("\r\n")); - } -} - -gpr_slice grpc_httpcli_format_get_request(const grpc_httpcli_request *request) { - gpr_strvec out; - char *flat; - size_t flat_len; - - gpr_strvec_init(&out); - gpr_strvec_add(&out, gpr_strdup("GET ")); - fill_common_header(request, &out); - gpr_strvec_add(&out, gpr_strdup("\r\n")); - - flat = gpr_strvec_flatten(&out, &flat_len); - gpr_strvec_destroy(&out); - - return gpr_slice_new(flat, flat_len, gpr_free); -} - -gpr_slice grpc_httpcli_format_post_request(const grpc_httpcli_request *request, - const char *body_bytes, - size_t body_size) { - gpr_strvec out; - char *tmp; - size_t out_len; - size_t i; - - gpr_strvec_init(&out); - - gpr_strvec_add(&out, gpr_strdup("POST ")); - 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) { - has_content_type = 1; - break; - } - } - if (!has_content_type) { - gpr_strvec_add(&out, gpr_strdup("Content-Type: text/plain\r\n")); - } - gpr_asprintf(&tmp, "Content-Length: %lu\r\n", (unsigned long)body_size); - gpr_strvec_add(&out, tmp); - } - gpr_strvec_add(&out, gpr_strdup("\r\n")); - tmp = gpr_strvec_flatten(&out, &out_len); - gpr_strvec_destroy(&out); - - if (body_bytes) { - tmp = gpr_realloc(tmp, out_len + body_size); - memcpy(tmp + out_len, body_bytes, body_size); - out_len += body_size; - } - - return gpr_slice_new(tmp, out_len, gpr_free); -} diff --git a/src/core/httpcli/format_request.h b/src/core/httpcli/format_request.h deleted file mode 100644 index eb47cc90ca..0000000000 --- a/src/core/httpcli/format_request.h +++ /dev/null @@ -1,45 +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. - * - */ - -#ifndef GRPC_CORE_HTTPCLI_FORMAT_REQUEST_H -#define GRPC_CORE_HTTPCLI_FORMAT_REQUEST_H - -#include "src/core/httpcli/httpcli.h" -#include - -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_CORE_HTTPCLI_FORMAT_REQUEST_H */ diff --git a/src/core/httpcli/httpcli.c b/src/core/httpcli/httpcli.c deleted file mode 100644 index 1219c444c7..0000000000 --- a/src/core/httpcli/httpcli.c +++ /dev/null @@ -1,288 +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/httpcli/httpcli.h" -#include "src/core/iomgr/sockaddr.h" - -#include - -#include -#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" - -typedef struct { - gpr_slice request_text; - grpc_httpcli_parser parser; - grpc_resolved_addresses *addresses; - size_t next_address; - grpc_endpoint *ep; - char *host; - char *ssl_host_override; - gpr_timespec deadline; - int have_read_byte; - const grpc_httpcli_handshaker *handshaker; - grpc_httpcli_response_cb on_response; - void *user_data; - grpc_httpcli_context *context; - grpc_pollset *pollset; - grpc_iomgr_object iomgr_obj; - gpr_slice_buffer incoming; - gpr_slice_buffer outgoing; - grpc_closure on_read; - grpc_closure done_write; - grpc_closure connected; -} internal_request; - -static grpc_httpcli_get_override g_get_override = NULL; -static grpc_httpcli_post_override g_post_override = NULL; - -static void plaintext_handshake(grpc_exec_ctx *exec_ctx, void *arg, - grpc_endpoint *endpoint, const char *host, - void (*on_done)(grpc_exec_ctx *exec_ctx, - void *arg, - grpc_endpoint *endpoint)) { - on_done(exec_ctx, arg, endpoint); -} - -const grpc_httpcli_handshaker grpc_httpcli_plaintext = {"http", - plaintext_handshake}; - -void grpc_httpcli_context_init(grpc_httpcli_context *context) { - context->pollset_set = grpc_pollset_set_create(); -} - -void grpc_httpcli_context_destroy(grpc_httpcli_context *context) { - grpc_pollset_set_destroy(context->pollset_set); -} - -static void next_address(grpc_exec_ctx *exec_ctx, internal_request *req); - -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); - if (req->addresses != NULL) { - grpc_resolved_addresses_destroy(req->addresses); - } - if (req->ep != NULL) { - grpc_endpoint_destroy(exec_ctx, req->ep); - } - gpr_slice_unref(req->request_text); - gpr_free(req->host); - gpr_free(req->ssl_host_override); - grpc_iomgr_unregister_object(&req->iomgr_obj); - gpr_slice_buffer_destroy(&req->incoming); - gpr_slice_buffer_destroy(&req->outgoing); - gpr_free(req); -} - -static void on_read(grpc_exec_ctx *exec_ctx, void *user_data, bool success); - -static void do_read(grpc_exec_ctx *exec_ctx, internal_request *req) { - grpc_endpoint_read(exec_ctx, req->ep, &req->incoming, &req->on_read); -} - -static void on_read(grpc_exec_ctx *exec_ctx, void *user_data, bool success) { - internal_request *req = user_data; - size_t i; - - 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])) { - finish(exec_ctx, req, 0); - return; - } - } - } - - if (success) { - do_read(exec_ctx, req); - } else if (!req->have_read_byte) { - next_address(exec_ctx, req); - } else { - finish(exec_ctx, req, grpc_httpcli_parser_eof(&req->parser)); - } -} - -static void on_written(grpc_exec_ctx *exec_ctx, internal_request *req) { - do_read(exec_ctx, req); -} - -static void done_write(grpc_exec_ctx *exec_ctx, void *arg, bool success) { - internal_request *req = arg; - if (success) { - on_written(exec_ctx, req); - } else { - next_address(exec_ctx, req); - } -} - -static void start_write(grpc_exec_ctx *exec_ctx, internal_request *req) { - gpr_slice_ref(req->request_text); - gpr_slice_buffer_add(&req->outgoing, req->request_text); - grpc_endpoint_write(exec_ctx, req->ep, &req->outgoing, &req->done_write); -} - -static void on_handshake_done(grpc_exec_ctx *exec_ctx, void *arg, - grpc_endpoint *ep) { - internal_request *req = arg; - - if (!ep) { - next_address(exec_ctx, req); - return; - } - - req->ep = ep; - start_write(exec_ctx, req); -} - -static void on_connected(grpc_exec_ctx *exec_ctx, void *arg, bool success) { - internal_request *req = arg; - - if (!req->ep) { - next_address(exec_ctx, req); - return; - } - req->handshaker->handshake( - exec_ctx, req, req->ep, - req->ssl_host_override ? req->ssl_host_override : req->host, - on_handshake_done); -} - -static void next_address(grpc_exec_ctx *exec_ctx, internal_request *req) { - grpc_resolved_address *addr; - if (req->next_address == req->addresses->naddrs) { - finish(exec_ctx, req, 0); - return; - } - addr = &req->addresses->addrs[req->next_address++]; - grpc_closure_init(&req->connected, on_connected, req); - grpc_tcp_client_connect( - exec_ctx, &req->connected, &req->ep, req->context->pollset_set, - (struct sockaddr *)&addr->addr, addr->len, req->deadline); -} - -static void on_resolved(grpc_exec_ctx *exec_ctx, void *arg, - grpc_resolved_addresses *addresses) { - internal_request *req = arg; - if (!addresses) { - finish(exec_ctx, req, 0); - return; - } - req->addresses = addresses; - req->next_address = 0; - next_address(exec_ctx, req); -} - -static void internal_request_begin( - grpc_exec_ctx *exec_ctx, grpc_httpcli_context *context, - grpc_pollset *pollset, const grpc_httpcli_request *request, - gpr_timespec deadline, grpc_httpcli_response_cb on_response, - void *user_data, const char *name, gpr_slice request_text) { - internal_request *req = gpr_malloc(sizeof(internal_request)); - memset(req, 0, sizeof(*req)); - req->request_text = request_text; - grpc_httpcli_parser_init(&req->parser); - req->on_response = on_response; - req->user_data = user_data; - req->deadline = deadline; - req->handshaker = - request->handshaker ? request->handshaker : &grpc_httpcli_plaintext; - req->context = context; - req->pollset = pollset; - grpc_closure_init(&req->on_read, on_read, req); - grpc_closure_init(&req->done_write, done_write, req); - gpr_slice_buffer_init(&req->incoming); - gpr_slice_buffer_init(&req->outgoing); - grpc_iomgr_register_object(&req->iomgr_obj, name); - req->host = gpr_strdup(request->host); - req->ssl_host_override = gpr_strdup(request->ssl_host_override); - - grpc_pollset_set_add_pollset(exec_ctx, req->context->pollset_set, - req->pollset); - grpc_resolve_address(request->host, req->handshaker->default_port, - on_resolved, req); -} - -void grpc_httpcli_get(grpc_exec_ctx *exec_ctx, grpc_httpcli_context *context, - grpc_pollset *pollset, - const grpc_httpcli_request *request, - gpr_timespec deadline, - grpc_httpcli_response_cb on_response, void *user_data) { - char *name; - if (g_get_override && - g_get_override(exec_ctx, request, deadline, on_response, user_data)) { - return; - } - gpr_asprintf(&name, "HTTP:GET:%s:%s", request->host, request->path); - internal_request_begin(exec_ctx, context, pollset, request, deadline, - on_response, user_data, name, - grpc_httpcli_format_get_request(request)); - gpr_free(name); -} - -void grpc_httpcli_post(grpc_exec_ctx *exec_ctx, grpc_httpcli_context *context, - grpc_pollset *pollset, - const grpc_httpcli_request *request, - const char *body_bytes, size_t body_size, - gpr_timespec deadline, - grpc_httpcli_response_cb on_response, void *user_data) { - char *name; - if (g_post_override && - g_post_override(exec_ctx, request, body_bytes, body_size, deadline, - on_response, user_data)) { - return; - } - gpr_asprintf(&name, "HTTP:POST:%s:%s", request->host, request->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)); - gpr_free(name); -} - -void grpc_httpcli_set_override(grpc_httpcli_get_override get, - grpc_httpcli_post_override post) { - g_get_override = get; - g_post_override = post; -} diff --git a/src/core/httpcli/httpcli.h b/src/core/httpcli/httpcli.h deleted file mode 100644 index 1fe5782657..0000000000 --- a/src/core/httpcli/httpcli.h +++ /dev/null @@ -1,163 +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. - * - */ - -#ifndef GRPC_CORE_HTTPCLI_HTTPCLI_H -#define GRPC_CORE_HTTPCLI_HTTPCLI_H - -#include - -#include - -#include "src/core/iomgr/endpoint.h" -#include "src/core/iomgr/iomgr_internal.h" -#include "src/core/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 - same content and combining them */ -typedef struct grpc_httpcli_context { - grpc_pollset_set *pollset_set; -} grpc_httpcli_context; - -typedef struct { - const char *default_port; - void (*handshake)(grpc_exec_ctx *exec_ctx, void *arg, grpc_endpoint *endpoint, - const char *host, - void (*on_done)(grpc_exec_ctx *exec_ctx, void *arg, - grpc_endpoint *endpoint)); -} grpc_httpcli_handshaker; - -extern const grpc_httpcli_handshaker grpc_httpcli_plaintext; -extern const grpc_httpcli_handshaker grpc_httpcli_ssl; - -/* A request */ -typedef struct grpc_httpcli_request { - /* The host name to connect to */ - 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: - Host, Connection, User-Agent */ - size_t hdr_count; - grpc_httpcli_header *hdrs; - /* 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; - -/* 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); - -void grpc_httpcli_context_init(grpc_httpcli_context *context); -void grpc_httpcli_context_destroy(grpc_httpcli_context *context); - -/* Asynchronously perform a HTTP GET. - 'context' specifies the http context under which to do the get - 'pollset' indicates a grpc_pollset that is interested in the result - of the get - work on this pollset may be used to progress the get - operation - 'request' contains request parameters - these are caller owned and can be - destroyed once the call returns - 'deadline' contains a deadline for the request (or gpr_inf_future) - 'on_response' is a callback to report results to (and 'user_data' is a user - supplied pointer to pass to said call) */ -void grpc_httpcli_get(grpc_exec_ctx *exec_ctx, grpc_httpcli_context *context, - grpc_pollset *pollset, - const grpc_httpcli_request *request, - gpr_timespec deadline, - grpc_httpcli_response_cb on_response, void *user_data); - -/* Asynchronously perform a HTTP POST. - 'context' specifies the http context under which to do the post - 'pollset' indicates a grpc_pollset that is interested in the result - of the post - work on this pollset may be used to progress the post - operation - 'request' contains request parameters - these are caller owned and can be - destroyed once the call returns - 'body_bytes' and 'body_size' specify the payload for the post. - When there is no body, pass in NULL as body_bytes. - 'deadline' contains a deadline for the request (or gpr_inf_future) - 'em' points to a caller owned event manager that must be alive for the - lifetime of the request - 'on_response' is a callback to report results to (and 'user_data' is a user - supplied pointer to pass to said call) - Does not support ?var1=val1&var2=val2 in the path. */ -void grpc_httpcli_post(grpc_exec_ctx *exec_ctx, grpc_httpcli_context *context, - grpc_pollset *pollset, - const grpc_httpcli_request *request, - const char *body_bytes, size_t body_size, - gpr_timespec deadline, - grpc_httpcli_response_cb on_response, void *user_data); - -/* override functions return 1 if they handled the request, 0 otherwise */ -typedef int (*grpc_httpcli_get_override)(grpc_exec_ctx *exec_ctx, - const grpc_httpcli_request *request, - gpr_timespec deadline, - grpc_httpcli_response_cb on_response, - void *user_data); -typedef int (*grpc_httpcli_post_override)( - grpc_exec_ctx *exec_ctx, const grpc_httpcli_request *request, - const char *body_bytes, size_t body_size, gpr_timespec deadline, - grpc_httpcli_response_cb on_response, void *user_data); - -void grpc_httpcli_set_override(grpc_httpcli_get_override get, - grpc_httpcli_post_override post); - -#endif /* GRPC_CORE_HTTPCLI_HTTPCLI_H */ diff --git a/src/core/httpcli/httpcli_security_connector.c b/src/core/httpcli/httpcli_security_connector.c deleted file mode 100644 index 156961a377..0000000000 --- a/src/core/httpcli/httpcli_security_connector.c +++ /dev/null @@ -1,188 +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/httpcli/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" - -typedef struct { - grpc_channel_security_connector base; - tsi_ssl_handshaker_factory *handshaker_factory; - char *secure_peer_name; -} grpc_httpcli_ssl_channel_security_connector; - -static void httpcli_ssl_destroy(grpc_security_connector *sc) { - grpc_httpcli_ssl_channel_security_connector *c = - (grpc_httpcli_ssl_channel_security_connector *)sc; - if (c->handshaker_factory != NULL) { - tsi_ssl_handshaker_factory_destroy(c->handshaker_factory); - } - if (c->secure_peer_name != NULL) gpr_free(c->secure_peer_name); - gpr_free(sc); -} - -static void httpcli_ssl_do_handshake(grpc_exec_ctx *exec_ctx, - grpc_channel_security_connector *sc, - grpc_endpoint *nonsecure_endpoint, - grpc_security_handshake_done_cb cb, - void *user_data) { - grpc_httpcli_ssl_channel_security_connector *c = - (grpc_httpcli_ssl_channel_security_connector *)sc; - tsi_result result = TSI_OK; - tsi_handshaker *handshaker; - if (c->handshaker_factory == NULL) { - cb(exec_ctx, user_data, GRPC_SECURITY_ERROR, NULL, NULL); - return; - } - result = tsi_ssl_handshaker_factory_create_handshaker( - c->handshaker_factory, c->secure_peer_name, &handshaker); - if (result != TSI_OK) { - gpr_log(GPR_ERROR, "Handshaker creation failed with error %s.", - tsi_result_to_string(result)); - cb(exec_ctx, user_data, GRPC_SECURITY_ERROR, NULL, NULL); - } else { - grpc_do_security_handshake(exec_ctx, handshaker, &sc->base, true, - nonsecure_endpoint, cb, user_data); - } -} - -static void httpcli_ssl_check_peer(grpc_exec_ctx *exec_ctx, - grpc_security_connector *sc, tsi_peer peer, - grpc_security_peer_check_cb cb, - void *user_data) { - grpc_httpcli_ssl_channel_security_connector *c = - (grpc_httpcli_ssl_channel_security_connector *)sc; - grpc_security_status status = GRPC_SECURITY_OK; - - /* Check the peer name. */ - if (c->secure_peer_name != NULL && - !tsi_ssl_peer_matches_name(&peer, c->secure_peer_name)) { - gpr_log(GPR_ERROR, "Peer name %s is not in peer certificate", - c->secure_peer_name); - status = GRPC_SECURITY_ERROR; - } - cb(exec_ctx, user_data, status, NULL); - tsi_peer_destruct(&peer); -} - -static grpc_security_connector_vtable httpcli_ssl_vtable = { - httpcli_ssl_destroy, httpcli_ssl_check_peer}; - -static grpc_security_status httpcli_ssl_channel_security_connector_create( - const unsigned char *pem_root_certs, size_t pem_root_certs_size, - const char *secure_peer_name, grpc_channel_security_connector **sc) { - tsi_result result = TSI_OK; - grpc_httpcli_ssl_channel_security_connector *c; - - if (secure_peer_name != NULL && pem_root_certs == NULL) { - gpr_log(GPR_ERROR, - "Cannot assert a secure peer name without a trust root."); - return GRPC_SECURITY_ERROR; - } - - c = gpr_malloc(sizeof(grpc_httpcli_ssl_channel_security_connector)); - memset(c, 0, sizeof(grpc_httpcli_ssl_channel_security_connector)); - - gpr_ref_init(&c->base.base.refcount, 1); - c->base.base.vtable = &httpcli_ssl_vtable; - if (secure_peer_name != NULL) { - c->secure_peer_name = gpr_strdup(secure_peer_name); - } - result = tsi_create_ssl_client_handshaker_factory( - NULL, 0, NULL, 0, pem_root_certs, pem_root_certs_size, NULL, NULL, NULL, - 0, &c->handshaker_factory); - if (result != TSI_OK) { - gpr_log(GPR_ERROR, "Handshaker factory creation failed with %s.", - tsi_result_to_string(result)); - httpcli_ssl_destroy(&c->base.base); - *sc = NULL; - return GRPC_SECURITY_ERROR; - } - c->base.do_handshake = httpcli_ssl_do_handshake; - *sc = &c->base; - return GRPC_SECURITY_OK; -} - -/* handshaker */ - -typedef struct { - void (*func)(grpc_exec_ctx *exec_ctx, void *arg, grpc_endpoint *endpoint); - void *arg; -} on_done_closure; - -static void on_secure_transport_setup_done(grpc_exec_ctx *exec_ctx, void *rp, - grpc_security_status status, - grpc_endpoint *secure_endpoint, - grpc_auth_context *auth_context) { - on_done_closure *c = rp; - if (status != GRPC_SECURITY_OK) { - gpr_log(GPR_ERROR, "Secure transport setup failed with error %d.", status); - c->func(exec_ctx, c->arg, NULL); - } else { - c->func(exec_ctx, c->arg, secure_endpoint); - } - gpr_free(c); -} - -static void ssl_handshake(grpc_exec_ctx *exec_ctx, void *arg, - grpc_endpoint *tcp, const char *host, - void (*on_done)(grpc_exec_ctx *exec_ctx, void *arg, - grpc_endpoint *endpoint)) { - grpc_channel_security_connector *sc = NULL; - const unsigned char *pem_root_certs = NULL; - on_done_closure *c = gpr_malloc(sizeof(*c)); - size_t pem_root_certs_size = grpc_get_default_ssl_roots(&pem_root_certs); - if (pem_root_certs == NULL || pem_root_certs_size == 0) { - gpr_log(GPR_ERROR, "Could not get default pem root certs."); - on_done(exec_ctx, arg, NULL); - gpr_free(c); - return; - } - c->func = on_done; - c->arg = arg; - GPR_ASSERT(httpcli_ssl_channel_security_connector_create( - pem_root_certs, pem_root_certs_size, host, &sc) == - GRPC_SECURITY_OK); - grpc_channel_security_connector_do_handshake( - exec_ctx, sc, tcp, on_secure_transport_setup_done, c); - GRPC_SECURITY_CONNECTOR_UNREF(&sc->base, "httpcli"); -} - -const grpc_httpcli_handshaker grpc_httpcli_ssl = {"https", ssl_handshake}; diff --git a/src/core/httpcli/parser.c b/src/core/httpcli/parser.c deleted file mode 100644 index c314f025a0..0000000000 --- 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/httpcli/parser.h b/src/core/httpcli/parser.h deleted file mode 100644 index cd4a737245..0000000000 --- a/src/core/httpcli/parser.h +++ /dev/null @@ -1,64 +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. - * - */ - -#ifndef GRPC_CORE_HTTPCLI_PARSER_H -#define GRPC_CORE_HTTPCLI_PARSER_H - -#include "src/core/httpcli/httpcli.h" -#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_CORE_HTTPCLI_PARSER_H */ diff --git a/src/core/security/credentials.c b/src/core/security/credentials.c index b4fa616fa7..0ba6d5dd84 100644 --- a/src/core/security/credentials.c +++ b/src/core/security/credentials.c @@ -38,7 +38,8 @@ #include "src/core/channel/channel_args.h" #include "src/core/channel/http_client_filter.h" -#include "src/core/httpcli/httpcli.h" +#include "src/core/http/parser.h" +#include "src/core/http/httpcli.h" #include "src/core/iomgr/executor.h" #include "src/core/json/json.h" #include "src/core/support/string.h" @@ -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/security/credentials.h index 133aa9d8d9..afac7a5bf2 100644 --- a/src/core/security/credentials.h +++ b/src/core/security/credentials.h @@ -39,11 +39,12 @@ #include #include -#include "src/core/httpcli/httpcli.h" +#include "src/core/http/httpcli.h" +#include "src/core/http/parser.h" #include "src/core/security/json_token.h" #include "src/core/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); diff --git a/src/core/security/google_default_credentials.c b/src/core/security/google_default_credentials.c index 1f4f3e4aa5..3872e86993 100644 --- a/src/core/security/google_default_credentials.c +++ b/src/core/security/google_default_credentials.c @@ -39,7 +39,8 @@ #include #include -#include "src/core/httpcli/httpcli.h" +#include "src/core/http/httpcli.h" +#include "src/core/http/parser.h" #include "src/core/support/env.h" #include "src/core/support/load_file.h" #include "src/core/surface/api_trace.h" @@ -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/jwt_verifier.c b/src/core/security/jwt_verifier.c index 928c6c148d..0bb8e05306 100644 --- a/src/core/security/jwt_verifier.c +++ b/src/core/security/jwt_verifier.c @@ -36,7 +36,7 @@ #include #include -#include "src/core/httpcli/httpcli.h" +#include "src/core/http/httpcli.h" #include "src/core/security/b64.h" #include "src/core/tsi/ssl_types.h" @@ -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/python/grpcio/grpc_core_dependencies.py b/src/python/grpcio/grpc_core_dependencies.py index 29506e69bc..ef3d6dd17a 100644 --- a/src/python/grpcio/grpc_core_dependencies.py +++ b/src/python/grpcio/grpc_core_dependencies.py @@ -108,9 +108,9 @@ CORE_SOURCE_FILES = [ '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/http/format_request.c', + 'src/core/http/httpcli.c', + 'src/core/http/parser.c', 'src/core/iomgr/closure.c', 'src/core/iomgr/endpoint.c', 'src/core/iomgr/endpoint_pair_posix.c', @@ -206,7 +206,7 @@ CORE_SOURCE_FILES = [ '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/http/httpcli_security_connector.c', 'src/core/security/b64.c', 'src/core/security/client_auth_filter.c', 'src/core/security/credentials.c', diff --git a/test/core/http/format_request_test.c b/test/core/http/format_request_test.c new file mode 100644 index 0000000000..67dfd24803 --- /dev/null +++ b/test/core/http/format_request_test.c @@ -0,0 +1,165 @@ +/* + * + * 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/http/format_request.h" + +#include + +#include +#include "test/core/util/test_config.h" + +static void test_format_get_request(void) { + grpc_http_header hdr = {"x-yz", "abc"}; + grpc_httpcli_request req; + gpr_slice slice; + + memset(&req, 0, sizeof(req)); + req.host = "example.com"; + req.http.path = "/index.html"; + req.http.hdr_count = 1; + req.http.hdrs = &hdr; + + slice = grpc_httpcli_format_get_request(&req); + + GPR_ASSERT(0 == gpr_slice_str_cmp(slice, + "GET /index.html HTTP/1.0\r\n" + "Host: example.com\r\n" + "Connection: close\r\n" + "User-Agent: " GRPC_HTTPCLI_USER_AGENT + "\r\n" + "x-yz: abc\r\n" + "\r\n")); + + gpr_slice_unref(slice); +} + +static void test_format_post_request(void) { + grpc_http_header hdr = {"x-yz", "abc"}; + grpc_httpcli_request req; + gpr_slice slice; + char body_bytes[] = "fake body"; + size_t body_len = 9; + + memset(&req, 0, sizeof(req)); + req.host = "example.com"; + 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); + + GPR_ASSERT(0 == gpr_slice_str_cmp(slice, + "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" + "x-yz: abc\r\n" + "Content-Type: text/plain\r\n" + "Content-Length: 9\r\n" + "\r\n" + "fake body")); + + gpr_slice_unref(slice); +} + +static void test_format_post_request_no_body(void) { + grpc_http_header hdr = {"x-yz", "abc"}; + grpc_httpcli_request req; + gpr_slice slice; + + memset(&req, 0, sizeof(req)); + req.host = "example.com"; + req.http.path = "/index.html"; + req.http.hdr_count = 1; + req.http.hdrs = &hdr; + + slice = grpc_httpcli_format_post_request(&req, NULL, 0); + + GPR_ASSERT(0 == gpr_slice_str_cmp(slice, + "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" + "x-yz: abc\r\n" + "\r\n")); + + gpr_slice_unref(slice); +} + +static void test_format_post_request_content_type_override(void) { + grpc_http_header hdrs[2]; + grpc_httpcli_request req; + gpr_slice slice; + char body_bytes[] = "fake%20body"; + size_t body_len = 11; + + hdrs[0].key = "x-yz"; + hdrs[0].value = "abc"; + hdrs[1].key = "Content-Type"; + hdrs[1].value = "application/x-www-form-urlencoded"; + memset(&req, 0, sizeof(req)); + req.host = "example.com"; + 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); + + GPR_ASSERT(0 == gpr_slice_str_cmp( + slice, + "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" + "x-yz: abc\r\n" + "Content-Type: application/x-www-form-urlencoded\r\n" + "Content-Length: 11\r\n" + "\r\n" + "fake%20body")); + + gpr_slice_unref(slice); +} + +int main(int argc, char **argv) { + grpc_test_init(argc, argv); + + test_format_get_request(); + test_format_post_request(); + test_format_post_request_no_body(); + test_format_post_request_content_type_override(); + + return 0; +} diff --git a/test/core/http/httpcli_test.c b/test/core/http/httpcli_test.c new file mode 100644 index 0000000000..bdb7a02e9b --- /dev/null +++ b/test/core/http/httpcli_test.c @@ -0,0 +1,200 @@ +/* + * + * 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/http/httpcli.h" + +#include + +#include +#include +#include +#include +#include +#include +#include "src/core/iomgr/iomgr.h" +#include "test/core/util/port.h" +#include "test/core/util/test_config.h" + +static int g_done = 0; +static grpc_httpcli_context g_context; +static gpr_mu *g_mu; +static grpc_pollset *g_pollset; + +static gpr_timespec n_seconds_time(int seconds) { + return GRPC_TIMEOUT_SECONDS_TO_DEADLINE(seconds); +} + +static void on_finish(grpc_exec_ctx *exec_ctx, void *arg, + const grpc_httpcli_response *response) { + const char *expect = + "Hello world!" + "

This is a test

"; + GPR_ASSERT(arg == (void *)42); + GPR_ASSERT(response); + GPR_ASSERT(response->status == 200); + GPR_ASSERT(response->body_length == strlen(expect)); + GPR_ASSERT(0 == memcmp(expect, response->body, response->body_length)); + gpr_mu_lock(g_mu); + g_done = 1; + grpc_pollset_kick(g_pollset, NULL); + gpr_mu_unlock(g_mu); +} + +static void test_get(int port) { + grpc_httpcli_request req; + char *host; + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + + g_done = 0; + gpr_log(GPR_INFO, "test_get"); + + gpr_asprintf(&host, "localhost:%d", port); + gpr_log(GPR_INFO, "requesting from %s", host); + + memset(&req, 0, sizeof(req)); + req.host = host; + req.http.path = "/get"; + req.handshaker = &grpc_httpcli_plaintext; + + grpc_httpcli_get(&exec_ctx, &g_context, g_pollset, &req, n_seconds_time(15), + on_finish, (void *)42); + gpr_mu_lock(g_mu); + while (!g_done) { + grpc_pollset_worker *worker = NULL; + grpc_pollset_work(&exec_ctx, g_pollset, &worker, + gpr_now(GPR_CLOCK_MONOTONIC), n_seconds_time(20)); + gpr_mu_unlock(g_mu); + grpc_exec_ctx_finish(&exec_ctx); + gpr_mu_lock(g_mu); + } + gpr_mu_unlock(g_mu); + gpr_free(host); +} + +static void test_post(int port) { + grpc_httpcli_request req; + char *host; + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + + g_done = 0; + gpr_log(GPR_INFO, "test_post"); + + gpr_asprintf(&host, "localhost:%d", port); + gpr_log(GPR_INFO, "posting to %s", host); + + memset(&req, 0, sizeof(req)); + req.host = host; + req.http.path = "/post"; + req.handshaker = &grpc_httpcli_plaintext; + + grpc_httpcli_post(&exec_ctx, &g_context, g_pollset, &req, "hello", 5, + n_seconds_time(15), on_finish, (void *)42); + gpr_mu_lock(g_mu); + while (!g_done) { + grpc_pollset_worker *worker = NULL; + grpc_pollset_work(&exec_ctx, g_pollset, &worker, + gpr_now(GPR_CLOCK_MONOTONIC), n_seconds_time(20)); + gpr_mu_unlock(g_mu); + grpc_exec_ctx_finish(&exec_ctx); + gpr_mu_lock(g_mu); + } + gpr_mu_unlock(g_mu); + gpr_free(host); +} + +static void destroy_pollset(grpc_exec_ctx *exec_ctx, void *p, bool success) { + grpc_pollset_destroy(p); +} + +int main(int argc, char **argv) { + grpc_closure destroyed; + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + gpr_subprocess *server; + char *me = argv[0]; + 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 { + 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 + 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]); + 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))); + + grpc_test_init(argc, argv); + grpc_init(); + grpc_httpcli_context_init(&g_context); + g_pollset = gpr_malloc(grpc_pollset_size()); + grpc_pollset_init(g_pollset, &g_mu); + + test_get(port); + test_post(port); + + grpc_httpcli_context_destroy(&g_context); + grpc_closure_init(&destroyed, destroy_pollset, g_pollset); + grpc_pollset_shutdown(&exec_ctx, g_pollset, &destroyed); + grpc_exec_ctx_finish(&exec_ctx); + grpc_shutdown(); + + gpr_free(g_pollset); + + gpr_subprocess_destroy(server); + + return 0; +} diff --git a/test/core/http/httpscli_test.c b/test/core/http/httpscli_test.c new file mode 100644 index 0000000000..21845b6a8e --- /dev/null +++ b/test/core/http/httpscli_test.c @@ -0,0 +1,203 @@ +/* + * + * 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/http/httpcli.h" + +#include + +#include +#include +#include +#include +#include +#include +#include "src/core/iomgr/iomgr.h" +#include "test/core/util/port.h" +#include "test/core/util/test_config.h" + +static int g_done = 0; +static grpc_httpcli_context g_context; +static gpr_mu *g_mu; +static grpc_pollset *g_pollset; + +static gpr_timespec n_seconds_time(int seconds) { + return GRPC_TIMEOUT_SECONDS_TO_DEADLINE(seconds); +} + +static void on_finish(grpc_exec_ctx *exec_ctx, void *arg, + const grpc_httpcli_response *response) { + const char *expect = + "Hello world!" + "

This is a test

"; + GPR_ASSERT(arg == (void *)42); + GPR_ASSERT(response); + GPR_ASSERT(response->status == 200); + GPR_ASSERT(response->body_length == strlen(expect)); + GPR_ASSERT(0 == memcmp(expect, response->body, response->body_length)); + gpr_mu_lock(g_mu); + g_done = 1; + grpc_pollset_kick(g_pollset, NULL); + gpr_mu_unlock(g_mu); +} + +static void test_get(int port) { + grpc_httpcli_request req; + char *host; + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + + g_done = 0; + gpr_log(GPR_INFO, "test_get"); + + gpr_asprintf(&host, "localhost:%d", port); + gpr_log(GPR_INFO, "requesting from %s", host); + + memset(&req, 0, sizeof(req)); + req.host = host; + req.ssl_host_override = "foo.test.google.fr"; + req.http.path = "/get"; + req.handshaker = &grpc_httpcli_ssl; + + grpc_httpcli_get(&exec_ctx, &g_context, g_pollset, &req, n_seconds_time(15), + on_finish, (void *)42); + gpr_mu_lock(g_mu); + while (!g_done) { + grpc_pollset_worker *worker = NULL; + grpc_pollset_work(&exec_ctx, g_pollset, &worker, + gpr_now(GPR_CLOCK_MONOTONIC), n_seconds_time(20)); + gpr_mu_unlock(g_mu); + grpc_exec_ctx_finish(&exec_ctx); + gpr_mu_lock(g_mu); + } + gpr_mu_unlock(g_mu); + gpr_free(host); +} + +static void test_post(int port) { + grpc_httpcli_request req; + char *host; + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + + g_done = 0; + gpr_log(GPR_INFO, "test_post"); + + gpr_asprintf(&host, "localhost:%d", port); + gpr_log(GPR_INFO, "posting to %s", host); + + memset(&req, 0, sizeof(req)); + req.host = host; + req.ssl_host_override = "foo.test.google.fr"; + req.http.path = "/post"; + req.handshaker = &grpc_httpcli_ssl; + + grpc_httpcli_post(&exec_ctx, &g_context, g_pollset, &req, "hello", 5, + n_seconds_time(15), on_finish, (void *)42); + gpr_mu_lock(g_mu); + while (!g_done) { + grpc_pollset_worker *worker = NULL; + grpc_pollset_work(&exec_ctx, g_pollset, &worker, + gpr_now(GPR_CLOCK_MONOTONIC), n_seconds_time(20)); + gpr_mu_unlock(g_mu); + grpc_exec_ctx_finish(&exec_ctx); + gpr_mu_lock(g_mu); + } + gpr_mu_unlock(g_mu); + gpr_free(host); +} + +static void destroy_pollset(grpc_exec_ctx *exec_ctx, void *p, bool success) { + grpc_pollset_destroy(p); +} + +int main(int argc, char **argv) { + grpc_closure destroyed; + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + gpr_subprocess *server; + char *me = argv[0]; + 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 { + 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 + 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]); + 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))); + + grpc_test_init(argc, argv); + grpc_init(); + grpc_httpcli_context_init(&g_context); + g_pollset = gpr_malloc(grpc_pollset_size()); + grpc_pollset_init(g_pollset, &g_mu); + + test_get(port); + test_post(port); + + grpc_httpcli_context_destroy(&g_context); + grpc_closure_init(&destroyed, destroy_pollset, g_pollset); + grpc_pollset_shutdown(&exec_ctx, g_pollset, &destroyed); + grpc_exec_ctx_finish(&exec_ctx); + grpc_shutdown(); + + gpr_free(g_pollset); + + gpr_subprocess_destroy(server); + + return 0; +} diff --git a/test/core/http/parser_test.c b/test/core/http/parser_test.c new file mode 100644 index 0000000000..338a301534 --- /dev/null +++ b/test/core/http/parser_test.c @@ -0,0 +1,260 @@ +/* + * + * 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/http/parser.h" + +#include +#include + +#include +#include +#include +#include +#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_http_parser parser; + gpr_slice input_slice = gpr_slice_from_copied_string(response); + 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_RESPONSE == parser.type); + GPR_ASSERT(expect_status == parser.http.response.status); + if (expect_body != NULL) { + 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.http.response.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.response.hdr_count); + expect_value = va_arg(args, char *); + GPR_ASSERT(expect_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.http.response.hdr_count); + + grpc_http_parser_destroy(&parser); + gpr_free(slices); +} + +static void test_fails(grpc_slice_split_mode split_mode, char *response) { + grpc_http_parser parser; + gpr_slice input_slice = gpr_slice_from_copied_string(response); + size_t num_slices; + size_t i; + gpr_slice *slices; + int done = 0; + + 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++) { + if (!done && !grpc_http_parser_parse(&parser, slices[i])) { + done = 1; + } + gpr_slice_unref(slices[i]); + } + if (!done && !grpc_http_parser_eof(&parser)) { + done = 1; + } + GPR_ASSERT(done); + + grpc_http_parser_destroy(&parser); + gpr_free(slices); +} + +int main(int argc, char **argv) { + size_t i; + const grpc_slice_split_mode split_modes[] = {GRPC_SLICE_SPLIT_IDENTITY, + GRPC_SLICE_SPLIT_ONE_BYTE}; + char *tmp1, *tmp2; + + grpc_test_init(argc, argv); + + for (i = 0; i < GPR_ARRAY_SIZE(split_modes); i++) { + test_succeeds(split_modes[i], + "HTTP/1.0 200 OK\r\n" + "xyz: abc\r\n" + "\r\n" + "hello world!", + 200, "hello world!", "xyz", "abc", NULL); + test_succeeds(split_modes[i], + "HTTP/1.0 404 Not Found\r\n" + "\r\n", + 404, NULL, NULL); + test_succeeds(split_modes[i], + "HTTP/1.1 200 OK\r\n" + "xyz: abc\r\n" + "\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"); + test_fails(split_modes[i], "HTTP/1.0 200 OK\n"); + test_fails(split_modes[i], "HTTP/1.0 200 OK\r\n"); + test_fails(split_modes[i], "HTTP/1.0 200 OK\r\nFoo x\r\n"); + test_fails(split_modes[i], + "HTTP/1.0 200 OK\r\n" + "xyz: abc\r\n" + " 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_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); + gpr_free(tmp2); + } + + return 0; +} diff --git a/test/core/http/test_server.py b/test/core/http/test_server.py new file mode 100755 index 0000000000..ecde494cc0 --- /dev/null +++ b/test/core/http/test_server.py @@ -0,0 +1,71 @@ +#!/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. + +"""Server for httpcli_test""" + +import argparse +import BaseHTTPServer +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')) +print _PEM +open(_PEM).close() + +argp = argparse.ArgumentParser(description='Server for httpcli_test') +argp.add_argument('-p', '--port', default=10080, type=int) +argp.add_argument('-s', '--ssl', default=False, action='store_true') +args = argp.parse_args() + +print 'server running on port %d' % args.port + +class Handler(BaseHTTPServer.BaseHTTPRequestHandler): + def good(self): + self.send_response(200) + self.send_header('Content-Type', 'text/html') + self.end_headers() + self.wfile.write('Hello world!') + self.wfile.write('

This is a test

') + + def do_GET(self): + if self.path == '/get': + self.good() + + def do_POST(self): + content = self.rfile.read(int(self.headers.getheader('content-length'))) + if self.path == '/post' and content == 'hello': + self.good() + +httpd = BaseHTTPServer.HTTPServer(('localhost', args.port), Handler) +if args.ssl: + httpd.socket = ssl.wrap_socket(httpd.socket, certfile=_PEM, keyfile=_KEY, server_side=True) +httpd.serve_forever() diff --git a/test/core/httpcli/format_request_test.c b/test/core/httpcli/format_request_test.c deleted file mode 100644 index da850049e2..0000000000 --- a/test/core/httpcli/format_request_test.c +++ /dev/null @@ -1,165 +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/format_request.h" - -#include - -#include -#include "test/core/util/test_config.h" - -static void test_format_get_request(void) { - grpc_httpcli_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; - - slice = grpc_httpcli_format_get_request(&req); - - GPR_ASSERT(0 == gpr_slice_str_cmp(slice, - "GET /index.html HTTP/1.0\r\n" - "Host: example.com\r\n" - "Connection: close\r\n" - "User-Agent: " GRPC_HTTPCLI_USER_AGENT - "\r\n" - "x-yz: abc\r\n" - "\r\n")); - - gpr_slice_unref(slice); -} - -static void test_format_post_request(void) { - grpc_httpcli_header hdr = {"x-yz", "abc"}; - grpc_httpcli_request req; - gpr_slice slice; - char body_bytes[] = "fake body"; - size_t body_len = 9; - - memset(&req, 0, sizeof(req)); - req.host = "example.com"; - req.path = "/index.html"; - req.hdr_count = 1; - req.hdrs = &hdr; - - slice = grpc_httpcli_format_post_request(&req, body_bytes, body_len); - - GPR_ASSERT(0 == gpr_slice_str_cmp(slice, - "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" - "x-yz: abc\r\n" - "Content-Type: text/plain\r\n" - "Content-Length: 9\r\n" - "\r\n" - "fake body")); - - gpr_slice_unref(slice); -} - -static void test_format_post_request_no_body(void) { - grpc_httpcli_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; - - slice = grpc_httpcli_format_post_request(&req, NULL, 0); - - GPR_ASSERT(0 == gpr_slice_str_cmp(slice, - "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" - "x-yz: abc\r\n" - "\r\n")); - - gpr_slice_unref(slice); -} - -static void test_format_post_request_content_type_override(void) { - grpc_httpcli_header hdrs[2]; - grpc_httpcli_request req; - gpr_slice slice; - char body_bytes[] = "fake%20body"; - size_t body_len = 11; - - hdrs[0].key = "x-yz"; - hdrs[0].value = "abc"; - hdrs[1].key = "Content-Type"; - 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; - - slice = grpc_httpcli_format_post_request(&req, body_bytes, body_len); - - GPR_ASSERT(0 == gpr_slice_str_cmp( - slice, - "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" - "x-yz: abc\r\n" - "Content-Type: application/x-www-form-urlencoded\r\n" - "Content-Length: 11\r\n" - "\r\n" - "fake%20body")); - - gpr_slice_unref(slice); -} - -int main(int argc, char **argv) { - grpc_test_init(argc, argv); - - test_format_get_request(); - test_format_post_request(); - test_format_post_request_no_body(); - test_format_post_request_content_type_override(); - - return 0; -} diff --git a/test/core/httpcli/httpcli_test.c b/test/core/httpcli/httpcli_test.c deleted file mode 100644 index fbc5d4abe7..0000000000 --- a/test/core/httpcli/httpcli_test.c +++ /dev/null @@ -1,200 +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/httpcli/httpcli.h" - -#include - -#include -#include -#include -#include -#include -#include -#include "src/core/iomgr/iomgr.h" -#include "test/core/util/port.h" -#include "test/core/util/test_config.h" - -static int g_done = 0; -static grpc_httpcli_context g_context; -static gpr_mu *g_mu; -static grpc_pollset *g_pollset; - -static gpr_timespec n_seconds_time(int seconds) { - return GRPC_TIMEOUT_SECONDS_TO_DEADLINE(seconds); -} - -static void on_finish(grpc_exec_ctx *exec_ctx, void *arg, - const grpc_httpcli_response *response) { - const char *expect = - "Hello world!" - "

This is a test

"; - GPR_ASSERT(arg == (void *)42); - GPR_ASSERT(response); - GPR_ASSERT(response->status == 200); - GPR_ASSERT(response->body_length == strlen(expect)); - GPR_ASSERT(0 == memcmp(expect, response->body, response->body_length)); - gpr_mu_lock(g_mu); - g_done = 1; - grpc_pollset_kick(g_pollset, NULL); - gpr_mu_unlock(g_mu); -} - -static void test_get(int port) { - grpc_httpcli_request req; - char *host; - grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - - g_done = 0; - gpr_log(GPR_INFO, "test_get"); - - gpr_asprintf(&host, "localhost:%d", port); - gpr_log(GPR_INFO, "requesting from %s", host); - - memset(&req, 0, sizeof(req)); - req.host = host; - req.path = "/get"; - req.handshaker = &grpc_httpcli_plaintext; - - grpc_httpcli_get(&exec_ctx, &g_context, g_pollset, &req, n_seconds_time(15), - on_finish, (void *)42); - gpr_mu_lock(g_mu); - while (!g_done) { - grpc_pollset_worker *worker = NULL; - grpc_pollset_work(&exec_ctx, g_pollset, &worker, - gpr_now(GPR_CLOCK_MONOTONIC), n_seconds_time(20)); - gpr_mu_unlock(g_mu); - grpc_exec_ctx_finish(&exec_ctx); - gpr_mu_lock(g_mu); - } - gpr_mu_unlock(g_mu); - gpr_free(host); -} - -static void test_post(int port) { - grpc_httpcli_request req; - char *host; - grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - - g_done = 0; - gpr_log(GPR_INFO, "test_post"); - - gpr_asprintf(&host, "localhost:%d", port); - gpr_log(GPR_INFO, "posting to %s", host); - - memset(&req, 0, sizeof(req)); - req.host = host; - req.path = "/post"; - req.handshaker = &grpc_httpcli_plaintext; - - grpc_httpcli_post(&exec_ctx, &g_context, g_pollset, &req, "hello", 5, - n_seconds_time(15), on_finish, (void *)42); - gpr_mu_lock(g_mu); - while (!g_done) { - grpc_pollset_worker *worker = NULL; - grpc_pollset_work(&exec_ctx, g_pollset, &worker, - gpr_now(GPR_CLOCK_MONOTONIC), n_seconds_time(20)); - gpr_mu_unlock(g_mu); - grpc_exec_ctx_finish(&exec_ctx); - gpr_mu_lock(g_mu); - } - gpr_mu_unlock(g_mu); - gpr_free(host); -} - -static void destroy_pollset(grpc_exec_ctx *exec_ctx, void *p, bool success) { - grpc_pollset_destroy(p); -} - -int main(int argc, char **argv) { - grpc_closure destroyed; - grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - gpr_subprocess *server; - char *me = argv[0]; - 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 { - arg_shift = 1; - gpr_asprintf(&args[0], "%s/../../tools/distrib/python_wrapper.sh", root); - gpr_asprintf(&args[1], "%s/../../test/core/httpcli/test_server.py", root); - } - - /* start the server */ - 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]); - 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))); - - grpc_test_init(argc, argv); - grpc_init(); - grpc_httpcli_context_init(&g_context); - g_pollset = gpr_malloc(grpc_pollset_size()); - grpc_pollset_init(g_pollset, &g_mu); - - test_get(port); - test_post(port); - - grpc_httpcli_context_destroy(&g_context); - grpc_closure_init(&destroyed, destroy_pollset, g_pollset); - grpc_pollset_shutdown(&exec_ctx, g_pollset, &destroyed); - grpc_exec_ctx_finish(&exec_ctx); - grpc_shutdown(); - - gpr_free(g_pollset); - - gpr_subprocess_destroy(server); - - return 0; -} diff --git a/test/core/httpcli/httpscli_test.c b/test/core/httpcli/httpscli_test.c deleted file mode 100644 index 04c57db286..0000000000 --- a/test/core/httpcli/httpscli_test.c +++ /dev/null @@ -1,203 +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/httpcli/httpcli.h" - -#include - -#include -#include -#include -#include -#include -#include -#include "src/core/iomgr/iomgr.h" -#include "test/core/util/port.h" -#include "test/core/util/test_config.h" - -static int g_done = 0; -static grpc_httpcli_context g_context; -static gpr_mu *g_mu; -static grpc_pollset *g_pollset; - -static gpr_timespec n_seconds_time(int seconds) { - return GRPC_TIMEOUT_SECONDS_TO_DEADLINE(seconds); -} - -static void on_finish(grpc_exec_ctx *exec_ctx, void *arg, - const grpc_httpcli_response *response) { - const char *expect = - "Hello world!" - "

This is a test

"; - GPR_ASSERT(arg == (void *)42); - GPR_ASSERT(response); - GPR_ASSERT(response->status == 200); - GPR_ASSERT(response->body_length == strlen(expect)); - GPR_ASSERT(0 == memcmp(expect, response->body, response->body_length)); - gpr_mu_lock(g_mu); - g_done = 1; - grpc_pollset_kick(g_pollset, NULL); - gpr_mu_unlock(g_mu); -} - -static void test_get(int port) { - grpc_httpcli_request req; - char *host; - grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - - g_done = 0; - gpr_log(GPR_INFO, "test_get"); - - gpr_asprintf(&host, "localhost:%d", port); - gpr_log(GPR_INFO, "requesting from %s", host); - - memset(&req, 0, sizeof(req)); - req.host = host; - req.ssl_host_override = "foo.test.google.fr"; - req.path = "/get"; - req.handshaker = &grpc_httpcli_ssl; - - grpc_httpcli_get(&exec_ctx, &g_context, g_pollset, &req, n_seconds_time(15), - on_finish, (void *)42); - gpr_mu_lock(g_mu); - while (!g_done) { - grpc_pollset_worker *worker = NULL; - grpc_pollset_work(&exec_ctx, g_pollset, &worker, - gpr_now(GPR_CLOCK_MONOTONIC), n_seconds_time(20)); - gpr_mu_unlock(g_mu); - grpc_exec_ctx_finish(&exec_ctx); - gpr_mu_lock(g_mu); - } - gpr_mu_unlock(g_mu); - gpr_free(host); -} - -static void test_post(int port) { - grpc_httpcli_request req; - char *host; - grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - - g_done = 0; - gpr_log(GPR_INFO, "test_post"); - - gpr_asprintf(&host, "localhost:%d", port); - gpr_log(GPR_INFO, "posting to %s", host); - - memset(&req, 0, sizeof(req)); - req.host = host; - req.ssl_host_override = "foo.test.google.fr"; - req.path = "/post"; - req.handshaker = &grpc_httpcli_ssl; - - grpc_httpcli_post(&exec_ctx, &g_context, g_pollset, &req, "hello", 5, - n_seconds_time(15), on_finish, (void *)42); - gpr_mu_lock(g_mu); - while (!g_done) { - grpc_pollset_worker *worker = NULL; - grpc_pollset_work(&exec_ctx, g_pollset, &worker, - gpr_now(GPR_CLOCK_MONOTONIC), n_seconds_time(20)); - gpr_mu_unlock(g_mu); - grpc_exec_ctx_finish(&exec_ctx); - gpr_mu_lock(g_mu); - } - gpr_mu_unlock(g_mu); - gpr_free(host); -} - -static void destroy_pollset(grpc_exec_ctx *exec_ctx, void *p, bool success) { - grpc_pollset_destroy(p); -} - -int main(int argc, char **argv) { - grpc_closure destroyed; - grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - gpr_subprocess *server; - char *me = argv[0]; - 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 { - arg_shift = 1; - gpr_asprintf(&args[0], "%s/../../tools/distrib/python_wrapper.sh", root); - gpr_asprintf(&args[1], "%s/../../test/core/httpcli/test_server.py", root); - } - - /* start the server */ - 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]); - 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))); - - grpc_test_init(argc, argv); - grpc_init(); - grpc_httpcli_context_init(&g_context); - g_pollset = gpr_malloc(grpc_pollset_size()); - grpc_pollset_init(g_pollset, &g_mu); - - test_get(port); - test_post(port); - - grpc_httpcli_context_destroy(&g_context); - grpc_closure_init(&destroyed, destroy_pollset, g_pollset); - grpc_pollset_shutdown(&exec_ctx, g_pollset, &destroyed); - grpc_exec_ctx_finish(&exec_ctx); - grpc_shutdown(); - - gpr_free(g_pollset); - - gpr_subprocess_destroy(server); - - return 0; -} diff --git a/test/core/httpcli/parser_test.c b/test/core/httpcli/parser_test.c deleted file mode 100644 index a26ddd2821..0000000000 --- a/test/core/httpcli/parser_test.c +++ /dev/null @@ -1,171 +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 -#include -#include -#include "test/core/util/slice_splitter.h" -#include "test/core/util/test_config.h" - -static void test_succeeds(grpc_slice_split_mode split_mode, char *response, - int expect_status, char *expect_body, ...) { - grpc_httpcli_parser parser; - gpr_slice input_slice = gpr_slice_from_copied_string(response); - 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_httpcli_parser_init(&parser); - - for (i = 0; i < num_slices; i++) { - GPR_ASSERT(grpc_httpcli_parser_parse(&parser, slices[i])); - gpr_slice_unref(slices[i]); - } - GPR_ASSERT(grpc_httpcli_parser_eof(&parser)); - - GPR_ASSERT(expect_status == parser.r.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)); - } else { - GPR_ASSERT(parser.r.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.r.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)); - i++; - } - va_end(args); - GPR_ASSERT(i == parser.r.hdr_count); - - grpc_httpcli_parser_destroy(&parser); - gpr_free(slices); -} - -static void test_fails(grpc_slice_split_mode split_mode, char *response) { - grpc_httpcli_parser parser; - gpr_slice input_slice = gpr_slice_from_copied_string(response); - size_t num_slices; - size_t i; - gpr_slice *slices; - int done = 0; - - grpc_split_slices(split_mode, &input_slice, 1, &slices, &num_slices); - gpr_slice_unref(input_slice); - - grpc_httpcli_parser_init(&parser); - - for (i = 0; i < num_slices; i++) { - if (!done && !grpc_httpcli_parser_parse(&parser, slices[i])) { - done = 1; - } - gpr_slice_unref(slices[i]); - } - if (!done && !grpc_httpcli_parser_eof(&parser)) { - done = 1; - } - GPR_ASSERT(done); - - grpc_httpcli_parser_destroy(&parser); - gpr_free(slices); -} - -int main(int argc, char **argv) { - size_t i; - const grpc_slice_split_mode split_modes[] = {GRPC_SLICE_SPLIT_IDENTITY, - GRPC_SLICE_SPLIT_ONE_BYTE}; - char *tmp1, *tmp2; - - grpc_test_init(argc, argv); - - for (i = 0; i < GPR_ARRAY_SIZE(split_modes); i++) { - test_succeeds(split_modes[i], - "HTTP/1.0 200 OK\r\n" - "xyz: abc\r\n" - "\r\n" - "hello world!", - 200, "hello world!", "xyz", "abc", NULL); - test_succeeds(split_modes[i], - "HTTP/1.0 404 Not Found\r\n" - "\r\n", - 404, NULL, NULL); - test_succeeds(split_modes[i], - "HTTP/1.1 200 OK\r\n" - "xyz: abc\r\n" - "\r\n" - "hello world!", - 200, "hello world!", "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"); - test_fails(split_modes[i], "HTTP/1.0 200 OK\n"); - test_fails(split_modes[i], "HTTP/1.0 200 OK\r\n"); - test_fails(split_modes[i], "HTTP/1.0 200 OK\r\nFoo x\r\n"); - test_fails(split_modes[i], - "HTTP/1.0 200 OK\r\n" - "xyz: abc\r\n" - " def\r\n" - "\r\n" - "hello world!"); - - 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; - 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); - gpr_free(tmp2); - } - - return 0; -} diff --git a/test/core/httpcli/test_server.py b/test/core/httpcli/test_server.py deleted file mode 100755 index dbbf5ceb3c..0000000000 --- a/test/core/httpcli/test_server.py +++ /dev/null @@ -1,71 +0,0 @@ -#!/usr/bin/env python2.7 -# 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. - -"""Server for httpcli_test""" - -import argparse -import BaseHTTPServer -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')) -print _PEM -open(_PEM).close() - -argp = argparse.ArgumentParser(description='Server for httpcli_test') -argp.add_argument('-p', '--port', default=10080, type=int) -argp.add_argument('-s', '--ssl', default=False, action='store_true') -args = argp.parse_args() - -print 'server running on port %d' % args.port - -class Handler(BaseHTTPServer.BaseHTTPRequestHandler): - def good(self): - self.send_response(200) - self.send_header('Content-Type', 'text/html') - self.end_headers() - self.wfile.write('Hello world!') - self.wfile.write('

This is a test

') - - def do_GET(self): - if self.path == '/get': - self.good() - - def do_POST(self): - content = self.rfile.read(int(self.headers.getheader('content-length'))) - if self.path == '/post' and content == 'hello': - self.good() - -httpd = BaseHTTPServer.HTTPServer(('localhost', args.port), Handler) -if args.ssl: - httpd.socket = ssl.wrap_socket(httpd.socket, certfile=_PEM, keyfile=_KEY, server_side=True) -httpd.serve_forever() diff --git a/test/core/security/credentials_test.c b/test/core/security/credentials_test.c index 98133ef5e5..fd9ccbf45d 100644 --- a/test/core/security/credentials_test.c +++ b/test/core/security/credentials_test.c @@ -44,7 +44,7 @@ #include #include -#include "src/core/httpcli/httpcli.h" +#include "src/core/http/httpcli.h" #include "src/core/security/json_token.h" #include "src/core/support/env.h" #include "src/core/support/tmpfile.h" @@ -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/jwt_verifier_test.c b/test/core/security/jwt_verifier_test.c index f6ec9e12ef..d2f8d1d182 100644 --- a/test/core/security/jwt_verifier_test.c +++ b/test/core/security/jwt_verifier_test.c @@ -35,7 +35,7 @@ #include -#include "src/core/httpcli/httpcli.h" +#include "src/core/http/httpcli.h" #include "src/core/security/b64.h" #include "src/core/security/json_token.h" #include "test/core/util/test_config.h" @@ -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/util/port_posix.c b/test/core/util/port_posix.c index 5c0b2717cb..d211016267 100644 --- a/test/core/util/port_posix.c +++ b/test/core/util/port_posix.c @@ -49,6 +49,7 @@ #include #include +#include "src/core/http/httpcli.h" #include "src/core/support/env.h" #include "test/core/util/port_server_client.h" diff --git a/test/core/util/port_server_client.c b/test/core/util/port_server_client.c index 653ecb2709..c7b9d63109 100644 --- a/test/core/util/port_server_client.c +++ b/test/core/util/port_server_client.c @@ -47,7 +47,7 @@ #include #include -#include "src/core/httpcli/httpcli.h" +#include "src/core/http/httpcli.h" typedef struct freereq { gpr_mu *mu; @@ -91,7 +91,7 @@ void grpc_free_port_using_server(char *server, int port) { req.host = server; gpr_asprintf(&path, "/drop/%d", port); - req.path = path; + req.http.path = path; grpc_httpcli_context_init(&context); grpc_httpcli_get(&exec_ctx, &context, pr.pollset, &req, @@ -150,7 +150,7 @@ static void got_port_from_server(grpc_exec_ctx *exec_ctx, void *arg, GPR_TIMESPAN))); pr->retries++; req.host = pr->server; - req.path = "/get"; + 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); @@ -189,7 +189,7 @@ int grpc_pick_port_using_server(char *server) { pr.ctx = &context; req.host = server; - req.path = "/get"; + req.http.path = "/get"; grpc_httpcli_context_init(&context); grpc_httpcli_get(&exec_ctx, &context, pr.pollset, &req, diff --git a/test/core/util/port_windows.c b/test/core/util/port_windows.c index a810683440..77125dde75 100644 --- a/test/core/util/port_windows.c +++ b/test/core/util/port_windows.c @@ -47,6 +47,7 @@ #include #include "src/core/support/env.h" +#include "src/core/http/httpcli.h" #include "src/core/iomgr/sockaddr_utils.h" #include "test/core/util/port_server_client.h" diff --git a/tools/doxygen/Doxyfile.core.internal b/tools/doxygen/Doxyfile.core.internal index 694fd2820b..5b41e04216 100644 --- a/tools/doxygen/Doxyfile.core.internal +++ b/tools/doxygen/Doxyfile.core.internal @@ -806,9 +806,9 @@ 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/http/format_request.h \ +src/core/http/httpcli.h \ +src/core/http/parser.h \ src/core/iomgr/closure.h \ src/core/iomgr/endpoint.h \ src/core/iomgr/endpoint_pair.h \ @@ -947,9 +947,9 @@ 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/http/format_request.c \ +src/core/http/httpcli.c \ +src/core/http/parser.c \ src/core/iomgr/closure.c \ src/core/iomgr/endpoint.c \ src/core/iomgr/endpoint_pair_posix.c \ @@ -1045,7 +1045,7 @@ 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/http/httpcli_security_connector.c \ src/core/security/b64.c \ src/core/security/client_auth_filter.c \ src/core/security/credentials.c \ diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json index 3b787d680a..f206120d93 100644 --- a/tools/run_tests/sources_and_headers.json +++ b/tools/run_tests/sources_and_headers.json @@ -923,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" @@ -939,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" @@ -957,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" @@ -973,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" @@ -3960,9 +3960,9 @@ "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/http/format_request.h", + "src/core/http/httpcli.h", + "src/core/http/parser.h", "src/core/iomgr/closure.h", "src/core/iomgr/endpoint.h", "src/core/iomgr/endpoint_pair.h", @@ -4157,13 +4157,13 @@ "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/http/format_request.c", + "src/core/http/format_request.h", + "src/core/http/httpcli.c", + "src/core/http/httpcli.h", + "src/core/http/httpcli_security_connector.c", + "src/core/http/parser.c", + "src/core/http/parser.h", "src/core/iomgr/closure.c", "src/core/iomgr/closure.h", "src/core/iomgr/endpoint.c", @@ -4584,9 +4584,9 @@ "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/http/format_request.h", + "src/core/http/httpcli.h", + "src/core/http/parser.h", "src/core/iomgr/closure.h", "src/core/iomgr/endpoint.h", "src/core/iomgr/endpoint_pair.h", @@ -4766,12 +4766,12 @@ "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/http/format_request.c", + "src/core/http/format_request.h", + "src/core/http/httpcli.c", + "src/core/http/httpcli.h", + "src/core/http/parser.c", + "src/core/http/parser.h", "src/core/iomgr/closure.c", "src/core/iomgr/closure.h", "src/core/iomgr/endpoint.c", diff --git a/tools/run_tests/tests.json b/tools/run_tests/tests.json index 34006b19f2..5f72b8c582 100644 --- a/tools/run_tests/tests.json +++ b/tools/run_tests/tests.json @@ -1094,7 +1094,7 @@ "flaky": false, "gtest": false, "language": "c", - "name": "httpcli_format_request_test", + "name": "http_parser_test", "platforms": [ "linux", "mac", @@ -1115,7 +1115,7 @@ "flaky": false, "gtest": false, "language": "c", - "name": "httpcli_parser_test", + "name": "httpcli_format_request_test", "platforms": [ "linux", "mac", diff --git a/vsprojects/buildtests_c.sln b/vsprojects/buildtests_c.sln index 86f42ee632..96dc4eb107 100644 --- a/vsprojects/buildtests_c.sln +++ b/vsprojects/buildtests_c.sln @@ -663,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 @@ -674,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 @@ -2405,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 @@ -2421,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 diff --git a/vsprojects/vcxproj/grpc/grpc.vcxproj b/vsprojects/vcxproj/grpc/grpc.vcxproj index 30726ff5e9..353f642b06 100644 --- a/vsprojects/vcxproj/grpc/grpc.vcxproj +++ b/vsprojects/vcxproj/grpc/grpc.vcxproj @@ -315,9 +315,9 @@ - - - + + + @@ -492,11 +492,11 @@
- + - + - + @@ -688,7 +688,7 @@ - + diff --git a/vsprojects/vcxproj/grpc/grpc.vcxproj.filters b/vsprojects/vcxproj/grpc/grpc.vcxproj.filters index 26ef8aa781..f433f3694e 100644 --- a/vsprojects/vcxproj/grpc/grpc.vcxproj.filters +++ b/vsprojects/vcxproj/grpc/grpc.vcxproj.filters @@ -103,14 +103,14 @@ src\core\debug - - src\core\httpcli + + src\core\http - - src\core\httpcli + + src\core\http - - src\core\httpcli + + src\core\http src\core\iomgr @@ -397,8 +397,8 @@ src\core\transport - - src\core\httpcli + + src\core\http src\core\security @@ -629,14 +629,14 @@ src\core\debug - - src\core\httpcli + + src\core\http - - src\core\httpcli + + src\core\http - - src\core\httpcli + + src\core\http src\core\iomgr @@ -992,8 +992,8 @@ {1da7ef8a-a06d-5499-b3de-19fee4a4214d} - - {a9bc00ad-835f-c625-c6d9-6a1324f98b9f} + + {404fdb9e-a69c-81d4-035b-465c826115a9} {1baf3894-af37-e647-bdbc-95dc17ed0073} diff --git a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj index 1939396e1a..c2ece63578 100644 --- a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj +++ b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj @@ -305,9 +305,9 @@ - - - + + + @@ -470,11 +470,11 @@ - + - + - + diff --git a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters index 6075961030..2193d999f0 100644 --- a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters +++ b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters @@ -106,14 +106,14 @@ src\core\debug - - src\core\httpcli + + src\core\http - - src\core\httpcli + + src\core\http - - src\core\httpcli + + src\core\http src\core\iomgr @@ -566,14 +566,14 @@ src\core\debug - - src\core\httpcli + + src\core\http - - src\core\httpcli + + src\core\http - - src\core\httpcli + + src\core\http src\core\iomgr @@ -887,8 +887,8 @@ {6d8d5774-7291-554d-fafa-583463cd3fd9} - - {1ba3a245-47e7-89b5-b0c9-aca758bd0277} + + {46faed8e-5cd4-98b0-05ed-ff2ac7bc2d46} {a9df8b24-ecea-ff6d-8999-d8fa54cd70bf} diff --git a/vsprojects/vcxproj/test/http_parser_test/http_parser_test.vcxproj b/vsprojects/vcxproj/test/http_parser_test/http_parser_test.vcxproj new file mode 100644 index 0000000000..bd5cf1212c --- /dev/null +++ b/vsprojects/vcxproj/test/http_parser_test/http_parser_test.vcxproj @@ -0,0 +1,199 @@ + + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {49D7E690-BDA1-5236-1ABF-3D81C1559DF7} + true + $(SolutionDir)IntDir\$(MSBuildProjectName)\ + + + + v100 + + + v110 + + + v120 + + + v140 + + + Application + true + Unicode + + + Application + false + true + Unicode + + + + + + + + + + + + + + http_parser_test + static + Debug + static + Debug + + + http_parser_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 + + + + + + + + + + {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} + + + {29D16885-7228-4C31-81ED-5F9187C7F2A9} + + + {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/http_parser_test/http_parser_test.vcxproj.filters b/vsprojects/vcxproj/test/http_parser_test/http_parser_test.vcxproj.filters new file mode 100644 index 0000000000..4353c3b61f --- /dev/null +++ b/vsprojects/vcxproj/test/http_parser_test/http_parser_test.vcxproj.filters @@ -0,0 +1,21 @@ + + + + + test\core\http + + + + + + {1d07f09d-a0ec-d684-3589-bff02afbe830} + + + {eedab59d-9f19-9172-cf0e-83a839217afc} + + + {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 97f14f6c8e..5515349b9b 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 c54ded579b..6f941f4361 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} diff --git a/vsprojects/vcxproj/test/httpcli_parser_test/httpcli_parser_test.vcxproj b/vsprojects/vcxproj/test/httpcli_parser_test/httpcli_parser_test.vcxproj deleted file mode 100644 index 6f976309c5..0000000000 --- a/vsprojects/vcxproj/test/httpcli_parser_test/httpcli_parser_test.vcxproj +++ /dev/null @@ -1,199 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {B6F60D1C-D4F3-0F1A-4A2F-9134629B7848} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - httpcli_parser_test - static - Debug - static - Debug - - - httpcli_parser_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 - - - - - - - - - - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - - - {29D16885-7228-4C31-81ED-5F9187C7F2A9} - - - {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/httpcli_parser_test/httpcli_parser_test.vcxproj.filters b/vsprojects/vcxproj/test/httpcli_parser_test/httpcli_parser_test.vcxproj.filters deleted file mode 100644 index 1cdc32fb85..0000000000 --- a/vsprojects/vcxproj/test/httpcli_parser_test/httpcli_parser_test.vcxproj.filters +++ /dev/null @@ -1,21 +0,0 @@ - - - - - test\core\httpcli - - - - - - {f3562e8b-3020-c79a-4e3b-c895f9e49f44} - - - {db527686-b5c7-68df-a106-bd919f60742a} - - - {8e60d460-93de-c6e1-b67b-bfae71bd9bca} - - - - -- cgit v1.2.3 From 9498bb1bb140784d4348d10fa6b401e6a8bda9c0 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Wed, 23 Mar 2016 08:13:01 -0700 Subject: Reorder asserts to avoid TSAN failure --- test/core/end2end/fixtures/h2_full+trace.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'test') diff --git a/test/core/end2end/fixtures/h2_full+trace.c b/test/core/end2end/fixtures/h2_full+trace.c index 90b0063089..042ee212d7 100644 --- a/test/core/end2end/fixtures/h2_full+trace.c +++ b/test/core/end2end/fixtures/h2_full+trace.c @@ -118,14 +118,14 @@ int main(int argc, char **argv) { grpc_test_init(argc, argv); grpc_init(); - for (i = 0; i < sizeof(configs) / sizeof(*configs); i++) { - grpc_end2end_tests(argc, argv, configs[i]); - } - 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; -- cgit v1.2.3