From 39816efa3b98341941980a7ff5ebd8cc042e28e4 Mon Sep 17 00:00:00 2001 From: Karthik Ravi Shankar Date: Fri, 19 Apr 2019 12:57:08 -0700 Subject: [PATCH 01/83] Test invoking a callback-based RPC under lock --- .../end2end/client_callback_end2end_test.cc | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/test/cpp/end2end/client_callback_end2end_test.cc b/test/cpp/end2end/client_callback_end2end_test.cc index 821fcc2da6d..da2ce854703 100644 --- a/test/cpp/end2end/client_callback_end2end_test.cc +++ b/test/cpp/end2end/client_callback_end2end_test.cc @@ -374,6 +374,34 @@ TEST_P(ClientCallbackEnd2endTest, SimpleRpc) { SendRpcs(1, false); } +TEST_P(ClientCallbackEnd2endTest, SimpleRpcUnderLock) { + MAYBE_SKIP_TEST; + ResetStub(); + std::mutex mu; + std::condition_variable cv; + bool done; + EchoRequest request; + request.set_message("Hello locked world."); + EchoResponse response; + ClientContext cli_ctx; + { + std::lock_guard l(mu); + stub_->experimental_async()->Echo( + &cli_ctx, &request, &response, + [&mu, &cv, &done, &request, &response](Status s) { + std::lock_guard l(mu); + EXPECT_TRUE(s.ok()); + EXPECT_EQ(request.message(), response.message()); + done = true; + cv.notify_one(); + }); + } + std::unique_lock l(mu); + while (!done) { + cv.wait(l); + } +} + TEST_P(ClientCallbackEnd2endTest, SequentialRpcs) { MAYBE_SKIP_TEST; ResetStub(); From 72312daadf571adaef351a482a30f6afc1b94e2c Mon Sep 17 00:00:00 2001 From: Karthik Ravi Shankar Date: Fri, 19 Apr 2019 12:57:32 -0700 Subject: [PATCH 02/83] Move callback-based API to use Executors over ApplicationExecutionCtx --- src/core/lib/surface/completion_queue.cc | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/src/core/lib/surface/completion_queue.cc b/src/core/lib/surface/completion_queue.cc index 7d679204bac..9f2a6b4783a 100644 --- a/src/core/lib/surface/completion_queue.cc +++ b/src/core/lib/surface/completion_queue.cc @@ -814,6 +814,11 @@ static void cq_end_op_for_pluck(grpc_completion_queue* cq, void* tag, GRPC_ERROR_UNREF(error); } +static void functor_callback(void* arg, grpc_error* error) { + auto* functor = static_cast(arg); + (*functor).functor_run(callback, error == GRPC_ERROR_NONE ? true : false); +} + /* Complete an event on a completion queue of type GRPC_CQ_CALLBACK */ static void cq_end_op_for_callback( grpc_completion_queue* cq, void* tag, grpc_error* error, @@ -822,7 +827,6 @@ static void cq_end_op_for_callback( GPR_TIMER_SCOPE("cq_end_op_for_callback", 0); cq_callback_data* cqd = static_cast DATA_FROM_CQ(cq); - bool is_success = (error == GRPC_ERROR_NONE); if (grpc_api_trace.enabled() || (grpc_trace_operation_failures.enabled() && error != GRPC_ERROR_NONE)) { @@ -847,10 +851,13 @@ static void cq_end_op_for_callback( cq_finish_shutdown_callback(cq); } - GRPC_ERROR_UNREF(error); - auto* functor = static_cast(tag); - grpc_core::ApplicationCallbackExecCtx::Enqueue(functor, is_success); + GRPC_CLOSURE_SCHED( + GRPC_CLOSURE_CREATE(functor_callback, functor, + grpc_core::Executor::Scheduler(grpc_core::ExecutorJobType::SHORT)), + GRPC_ERROR_REF(error)); + + GRPC_ERROR_UNREF(error); } void grpc_cq_end_op(grpc_completion_queue* cq, void* tag, grpc_error* error, @@ -1334,7 +1341,11 @@ static void cq_finish_shutdown_callback(grpc_completion_queue* cq) { GPR_ASSERT(cqd->shutdown_called); cq->poller_vtable->shutdown(POLLSET_FROM_CQ(cq), &cq->pollset_shutdown_done); - grpc_core::ApplicationCallbackExecCtx::Enqueue(callback, true); + GRPC_CLOSURE_SCHED( + GRPC_CLOSURE_CREATE(functor_callback, callback, + grpc_core::Executor::Scheduler(grpc_core::ExecutorJobType::SHORT)), + GRPC_ERROR_NONE); + } static void cq_shutdown_callback(grpc_completion_queue* cq) { From 56e34854caeefbbbbae0cd4c9e3649a01d466153 Mon Sep 17 00:00:00 2001 From: Karthik Ravi Shankar Date: Fri, 19 Apr 2019 13:52:55 -0700 Subject: [PATCH 03/83] Fix review comments and clang fixes. --- src/core/lib/surface/completion_queue.cc | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/core/lib/surface/completion_queue.cc b/src/core/lib/surface/completion_queue.cc index 9f2a6b4783a..29dd2101e10 100644 --- a/src/core/lib/surface/completion_queue.cc +++ b/src/core/lib/surface/completion_queue.cc @@ -34,6 +34,7 @@ #include "src/core/lib/gpr/string.h" #include "src/core/lib/gpr/tls.h" #include "src/core/lib/gprpp/atomic.h" +#include "src/core/lib/iomgr/executor.h" #include "src/core/lib/iomgr/pollset.h" #include "src/core/lib/iomgr/timer.h" #include "src/core/lib/profiling/timers.h" @@ -816,7 +817,7 @@ static void cq_end_op_for_pluck(grpc_completion_queue* cq, void* tag, static void functor_callback(void* arg, grpc_error* error) { auto* functor = static_cast(arg); - (*functor).functor_run(callback, error == GRPC_ERROR_NONE ? true : false); + functor->functor_run(functor, error == GRPC_ERROR_NONE); } /* Complete an event on a completion queue of type GRPC_CQ_CALLBACK */ @@ -853,8 +854,9 @@ static void cq_end_op_for_callback( auto* functor = static_cast(tag); GRPC_CLOSURE_SCHED( - GRPC_CLOSURE_CREATE(functor_callback, functor, - grpc_core::Executor::Scheduler(grpc_core::ExecutorJobType::SHORT)), + GRPC_CLOSURE_CREATE( + functor_callback, functor, + grpc_core::Executor::Scheduler(grpc_core::ExecutorJobType::SHORT)), GRPC_ERROR_REF(error)); GRPC_ERROR_UNREF(error); @@ -1342,10 +1344,10 @@ static void cq_finish_shutdown_callback(grpc_completion_queue* cq) { cq->poller_vtable->shutdown(POLLSET_FROM_CQ(cq), &cq->pollset_shutdown_done); GRPC_CLOSURE_SCHED( - GRPC_CLOSURE_CREATE(functor_callback, callback, - grpc_core::Executor::Scheduler(grpc_core::ExecutorJobType::SHORT)), + GRPC_CLOSURE_CREATE( + functor_callback, callback, + grpc_core::Executor::Scheduler(grpc_core::ExecutorJobType::SHORT)), GRPC_ERROR_NONE); - } static void cq_shutdown_callback(grpc_completion_queue* cq) { From 358e2543be0220051b237033340eeb56e07e54c7 Mon Sep 17 00:00:00 2001 From: Alex Polcyn Date: Mon, 22 Apr 2019 18:22:28 +0000 Subject: [PATCH 04/83] Add 1.19 and 1.20 to interop matrix --- tools/interop_matrix/client_matrix.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/interop_matrix/client_matrix.py b/tools/interop_matrix/client_matrix.py index 67b6832c8b2..1a8b8ef248e 100644 --- a/tools/interop_matrix/client_matrix.py +++ b/tools/interop_matrix/client_matrix.py @@ -213,6 +213,8 @@ LANG_RELEASE_MATRIX = { ReleaseInfo(patch=[ 'tools/dockerfile/interoptest/grpc_interop_ruby/build_interop.sh', ])), + ('v1.19.0', ReleaseInfo()), + ('v1.20.0', ReleaseInfo()), # TODO: https://github.com/grpc/grpc/issues/18262. # If you are not encountering the error in above issue # go ahead and upload the docker image for new releases. From f3911e7ff17e58d57b01132ac6351e837de877ab Mon Sep 17 00:00:00 2001 From: Karthik Ravi Shankar Date: Mon, 22 Apr 2019 15:37:54 -0700 Subject: [PATCH 05/83] Fix the completion queue tests for the new behavior --- test/core/surface/completion_queue_test.cc | 46 +++++++++++++++++++++- 1 file changed, 45 insertions(+), 1 deletion(-) diff --git a/test/core/surface/completion_queue_test.cc b/test/core/surface/completion_queue_test.cc index 7c3630eaf18..214d673cdf6 100644 --- a/test/core/surface/completion_queue_test.cc +++ b/test/core/surface/completion_queue_test.cc @@ -23,6 +23,7 @@ #include #include "src/core/lib/gpr/useful.h" #include "src/core/lib/gprpp/memory.h" +#include "src/core/lib/gprpp/sync.h" #include "src/core/lib/iomgr/iomgr.h" #include "test/core/util/test_config.h" @@ -365,10 +366,19 @@ static void test_callback(void) { GRPC_CQ_DEFAULT_POLLING, GRPC_CQ_NON_LISTENING, GRPC_CQ_NON_POLLING}; grpc_completion_queue_attributes attr; unsigned i; + static gpr_mu mu, shutdown_mu; + static gpr_cv cv, shutdown_cv; + static int cb_counter; + gpr_mu_init(&mu); + gpr_mu_init(&shutdown_mu); + gpr_cv_init(&cv); + gpr_cv_init(&shutdown_cv); LOG_TEST("test_callback"); + gpr_mu_lock(&shutdown_mu); bool got_shutdown = false; + gpr_mu_unlock(&shutdown_mu); class ShutdownCallback : public grpc_experimental_completion_queue_functor { public: ShutdownCallback(bool* done) : done_(done) { @@ -376,7 +386,11 @@ static void test_callback(void) { } ~ShutdownCallback() {} static void Run(grpc_experimental_completion_queue_functor* cb, int ok) { + gpr_mu_lock(&shutdown_mu); *static_cast(cb)->done_ = static_cast(ok); + gpr_mu_unlock(&shutdown_mu); + // Signal when the shutdown callback is completed. + gpr_cv_signal(&shutdown_cv); } private: @@ -391,9 +405,11 @@ static void test_callback(void) { for (size_t pidx = 0; pidx < GPR_ARRAY_SIZE(polling_types); pidx++) { int sumtags = 0; int counter = 0; + gpr_mu_lock(&mu); + cb_counter = 0; + gpr_mu_unlock(&mu); { // reset exec_ctx types - grpc_core::ApplicationCallbackExecCtx callback_exec_ctx; grpc_core::ExecCtx exec_ctx; attr.cq_polling_type = polling_types[pidx]; cc = grpc_completion_queue_create( @@ -409,7 +425,13 @@ static void test_callback(void) { int ok) { GPR_ASSERT(static_cast(ok)); auto* callback = static_cast(cb); + gpr_mu_lock(&mu); + cb_counter++; *callback->counter_ += callback->tag_; + if (cb_counter == GPR_ARRAY_SIZE(tags)) { + gpr_cv_signal(&cv); + } + gpr_mu_unlock(&mu); grpc_core::Delete(callback); }; @@ -429,12 +451,34 @@ static void test_callback(void) { nullptr, &completions[i]); } + gpr_mu_lock(&mu); + while (cb_counter != GPR_ARRAY_SIZE(tags)) { + // Wait for all the callbacks to complete. + gpr_cv_wait(&cv, &mu, gpr_inf_future(GPR_CLOCK_REALTIME)); + } + gpr_mu_unlock(&mu); + shutdown_and_destroy(cc); + + gpr_mu_lock(&shutdown_mu); + while (!got_shutdown) { + // Wait for the shutdown callback to complete. + gpr_cv_wait(&shutdown_cv, &shutdown_mu, gpr_inf_future(GPR_CLOCK_REALTIME)); + } + gpr_mu_unlock(&shutdown_mu); } + + gpr_mu_lock(&mu); + // Run the assertions to check if the test ran successfully. GPR_ASSERT(sumtags == counter); GPR_ASSERT(got_shutdown); + gpr_mu_unlock(&mu); got_shutdown = false; } + gpr_mu_destroy(&mu); + gpr_mu_destroy(&shutdown_mu); + gpr_cv_destroy(&cv); + gpr_cv_destroy(&shutdown_cv); } struct thread_state { From 4f4476e00f61b14a8f1141a0ba743215e39d88b2 Mon Sep 17 00:00:00 2001 From: Karthik Ravi Shankar Date: Tue, 23 Apr 2019 10:17:13 -0700 Subject: [PATCH 06/83] Make the exector to LONG from SHORT --- src/core/lib/surface/completion_queue.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/lib/surface/completion_queue.cc b/src/core/lib/surface/completion_queue.cc index 29dd2101e10..afd046596ef 100644 --- a/src/core/lib/surface/completion_queue.cc +++ b/src/core/lib/surface/completion_queue.cc @@ -856,7 +856,7 @@ static void cq_end_op_for_callback( GRPC_CLOSURE_SCHED( GRPC_CLOSURE_CREATE( functor_callback, functor, - grpc_core::Executor::Scheduler(grpc_core::ExecutorJobType::SHORT)), + grpc_core::Executor::Scheduler(grpc_core::ExecutorJobType::LONG)), GRPC_ERROR_REF(error)); GRPC_ERROR_UNREF(error); @@ -1346,7 +1346,7 @@ static void cq_finish_shutdown_callback(grpc_completion_queue* cq) { GRPC_CLOSURE_SCHED( GRPC_CLOSURE_CREATE( functor_callback, callback, - grpc_core::Executor::Scheduler(grpc_core::ExecutorJobType::SHORT)), + grpc_core::Executor::Scheduler(grpc_core::ExecutorJobType::LONG)), GRPC_ERROR_NONE); } From 99533ab52b30e4055eb6ee034a8de81f7cb863a8 Mon Sep 17 00:00:00 2001 From: Muxi Yan Date: Thu, 25 Apr 2019 16:40:49 -0700 Subject: [PATCH 07/83] Reorganize ObjC tests --- src/objective-c/tests/APIv2Tests/Info.plist | 22 - src/objective-c/tests/ChannelTests/Info.plist | 22 - .../tests/CoreCronetEnd2EndTests/Info.plist | 24 - .../CoreCronetEnd2EndTests.mm | 0 .../CronetUnitTests.mm} | 4 +- .../InteropTestsRemoteWithCronet.m | 0 .../tests/CronetUnitTests/Info.plist | 24 - .../tests/{ => InteropTests}/InteropTests.h | 0 .../tests/{ => InteropTests}/InteropTests.m | 77 +- .../InteropTests/InteropTestsBlockCallbacks.h | 33 + .../InteropTests/InteropTestsBlockCallbacks.m | 80 + .../InteropTestsLocalCleartext.m | 0 .../{ => InteropTests}/InteropTestsLocalSSL.m | 0 .../InteropTestsMultipleChannels.m | 268 ++ .../{ => InteropTests}/InteropTestsRemote.m | 0 .../tests/InteropTestsCallOptions/Info.plist | 22 - .../InteropTestsCallOptions.m | 116 - .../InteropTestsMultipleChannels/Info.plist | 22 - .../InteropTestsMultipleChannels.m | 259 -- .../InteropTestsRemoteWithCronet/Info.plist | 24 - src/objective-c/tests/Podfile | 85 +- src/objective-c/tests/Tests.m | 25 - .../tests/Tests.xcodeproj/project.pbxproj | 3998 +++-------------- .../xcshareddata/xcschemes/AllTests.xcscheme | 110 - .../xcschemes/ChannelTests.xcscheme | 90 - .../xcschemes/CoreCronetEnd2EndTests.xcscheme | 101 - .../CoreCronetEnd2EndTests_Asan.xcscheme | 60 - .../CoreCronetEnd2EndTests_Tsan.xcscheme | 59 - ...Iv2Tests.xcscheme => CronetTests.xcscheme} | 30 +- .../xcschemes/CronetUnitTests.xcscheme | 56 - ...sRemote.xcscheme => InteropTests.xcscheme} | 46 +- .../InteropTestsCallOptions.xcscheme | 56 - .../InteropTestsLocalCleartext.xcscheme | 95 - ...nteropTestsLocalCleartextCFStream.xcscheme | 63 - .../xcschemes/InteropTestsLocalSSL.xcscheme | 95 - .../InteropTestsLocalSSLCFStream.xcscheme | 63 - .../InteropTestsMultipleChannels.xcscheme | 56 - .../InteropTestsRemoteCFStream.xcscheme | 61 - .../InteropTestsRemoteWithCronet.xcscheme | 104 - .../xcshareddata/xcschemes/MacTests.xcscheme | 2 +- .../xcschemes/RxLibraryUnitTests.xcscheme | 90 - .../xcshareddata/xcschemes/Tests.xcscheme | 80 - .../xcshareddata/xcschemes/UnitTests.xcscheme | 6 +- .../{APIv2Tests => UnitTests}/APIv2Tests.m | 0 .../ChannelPoolTest.m | 0 .../ChannelTests.m | 0 .../tests/{ => UnitTests}/GRPCClientTests.m | 2 +- src/objective-c/tests/UnitTests/Info.plist | 22 - .../{UnitTests.m => NSErrorUnitTests.m} | 4 +- .../{ => UnitTests}/RxLibraryUnitTests.m | 0 src/objective-c/tests/run_tests.sh | 128 +- 51 files changed, 1100 insertions(+), 5484 deletions(-) delete mode 100644 src/objective-c/tests/APIv2Tests/Info.plist delete mode 100644 src/objective-c/tests/ChannelTests/Info.plist delete mode 100644 src/objective-c/tests/CoreCronetEnd2EndTests/Info.plist rename src/objective-c/tests/{CoreCronetEnd2EndTests => CronetTests}/CoreCronetEnd2EndTests.mm (100%) rename src/objective-c/tests/{CronetUnitTests/CronetUnitTests.m => CronetTests/CronetUnitTests.mm} (99%) rename src/objective-c/tests/{InteropTestsRemoteWithCronet => CronetTests}/InteropTestsRemoteWithCronet.m (100%) delete mode 100644 src/objective-c/tests/CronetUnitTests/Info.plist rename src/objective-c/tests/{ => InteropTests}/InteropTests.h (100%) rename src/objective-c/tests/{ => InteropTests}/InteropTests.m (94%) create mode 100644 src/objective-c/tests/InteropTests/InteropTestsBlockCallbacks.h create mode 100644 src/objective-c/tests/InteropTests/InteropTestsBlockCallbacks.m rename src/objective-c/tests/{ => InteropTests}/InteropTestsLocalCleartext.m (100%) rename src/objective-c/tests/{ => InteropTests}/InteropTestsLocalSSL.m (100%) create mode 100644 src/objective-c/tests/InteropTests/InteropTestsMultipleChannels.m rename src/objective-c/tests/{ => InteropTests}/InteropTestsRemote.m (100%) delete mode 100644 src/objective-c/tests/InteropTestsCallOptions/Info.plist delete mode 100644 src/objective-c/tests/InteropTestsCallOptions/InteropTestsCallOptions.m delete mode 100644 src/objective-c/tests/InteropTestsMultipleChannels/Info.plist delete mode 100644 src/objective-c/tests/InteropTestsMultipleChannels/InteropTestsMultipleChannels.m delete mode 100644 src/objective-c/tests/InteropTestsRemoteWithCronet/Info.plist delete mode 100644 src/objective-c/tests/Tests.m delete mode 100644 src/objective-c/tests/Tests.xcodeproj/xcshareddata/xcschemes/AllTests.xcscheme delete mode 100644 src/objective-c/tests/Tests.xcodeproj/xcshareddata/xcschemes/ChannelTests.xcscheme delete mode 100644 src/objective-c/tests/Tests.xcodeproj/xcshareddata/xcschemes/CoreCronetEnd2EndTests.xcscheme delete mode 100644 src/objective-c/tests/Tests.xcodeproj/xcshareddata/xcschemes/CoreCronetEnd2EndTests_Asan.xcscheme delete mode 100644 src/objective-c/tests/Tests.xcodeproj/xcshareddata/xcschemes/CoreCronetEnd2EndTests_Tsan.xcscheme rename src/objective-c/tests/Tests.xcodeproj/xcshareddata/xcschemes/{APIv2Tests.xcscheme => CronetTests.xcscheme} (77%) delete mode 100644 src/objective-c/tests/Tests.xcodeproj/xcshareddata/xcschemes/CronetUnitTests.xcscheme rename src/objective-c/tests/Tests.xcodeproj/xcshareddata/xcschemes/{InteropTestsRemote.xcscheme => InteropTests.xcscheme} (75%) delete mode 100644 src/objective-c/tests/Tests.xcodeproj/xcshareddata/xcschemes/InteropTestsCallOptions.xcscheme delete mode 100644 src/objective-c/tests/Tests.xcodeproj/xcshareddata/xcschemes/InteropTestsLocalCleartext.xcscheme delete mode 100644 src/objective-c/tests/Tests.xcodeproj/xcshareddata/xcschemes/InteropTestsLocalCleartextCFStream.xcscheme delete mode 100644 src/objective-c/tests/Tests.xcodeproj/xcshareddata/xcschemes/InteropTestsLocalSSL.xcscheme delete mode 100644 src/objective-c/tests/Tests.xcodeproj/xcshareddata/xcschemes/InteropTestsLocalSSLCFStream.xcscheme delete mode 100644 src/objective-c/tests/Tests.xcodeproj/xcshareddata/xcschemes/InteropTestsMultipleChannels.xcscheme delete mode 100644 src/objective-c/tests/Tests.xcodeproj/xcshareddata/xcschemes/InteropTestsRemoteCFStream.xcscheme delete mode 100644 src/objective-c/tests/Tests.xcodeproj/xcshareddata/xcschemes/InteropTestsRemoteWithCronet.xcscheme delete mode 100644 src/objective-c/tests/Tests.xcodeproj/xcshareddata/xcschemes/RxLibraryUnitTests.xcscheme delete mode 100644 src/objective-c/tests/Tests.xcodeproj/xcshareddata/xcschemes/Tests.xcscheme rename src/objective-c/tests/{APIv2Tests => UnitTests}/APIv2Tests.m (100%) rename src/objective-c/tests/{ChannelTests => UnitTests}/ChannelPoolTest.m (100%) rename src/objective-c/tests/{ChannelTests => UnitTests}/ChannelTests.m (100%) rename src/objective-c/tests/{ => UnitTests}/GRPCClientTests.m (99%) delete mode 100644 src/objective-c/tests/UnitTests/Info.plist rename src/objective-c/tests/UnitTests/{UnitTests.m => NSErrorUnitTests.m} (96%) rename src/objective-c/tests/{ => UnitTests}/RxLibraryUnitTests.m (100%) diff --git a/src/objective-c/tests/APIv2Tests/Info.plist b/src/objective-c/tests/APIv2Tests/Info.plist deleted file mode 100644 index 6c40a6cd0c4..00000000000 --- a/src/objective-c/tests/APIv2Tests/Info.plist +++ /dev/null @@ -1,22 +0,0 @@ - - - - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - BNDL - CFBundleShortVersionString - 1.0 - CFBundleVersion - 1 - - diff --git a/src/objective-c/tests/ChannelTests/Info.plist b/src/objective-c/tests/ChannelTests/Info.plist deleted file mode 100644 index 6c40a6cd0c4..00000000000 --- a/src/objective-c/tests/ChannelTests/Info.plist +++ /dev/null @@ -1,22 +0,0 @@ - - - - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - BNDL - CFBundleShortVersionString - 1.0 - CFBundleVersion - 1 - - diff --git a/src/objective-c/tests/CoreCronetEnd2EndTests/Info.plist b/src/objective-c/tests/CoreCronetEnd2EndTests/Info.plist deleted file mode 100644 index fbeeb96ba6c..00000000000 --- a/src/objective-c/tests/CoreCronetEnd2EndTests/Info.plist +++ /dev/null @@ -1,24 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - gRPC.$(PRODUCT_NAME:rfc1034identifier) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - BNDL - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1 - - diff --git a/src/objective-c/tests/CoreCronetEnd2EndTests/CoreCronetEnd2EndTests.mm b/src/objective-c/tests/CronetTests/CoreCronetEnd2EndTests.mm similarity index 100% rename from src/objective-c/tests/CoreCronetEnd2EndTests/CoreCronetEnd2EndTests.mm rename to src/objective-c/tests/CronetTests/CoreCronetEnd2EndTests.mm diff --git a/src/objective-c/tests/CronetUnitTests/CronetUnitTests.m b/src/objective-c/tests/CronetTests/CronetUnitTests.mm similarity index 99% rename from src/objective-c/tests/CronetUnitTests/CronetUnitTests.m rename to src/objective-c/tests/CronetTests/CronetUnitTests.mm index d732bc6ba99..2a861032caf 100644 --- a/src/objective-c/tests/CronetUnitTests/CronetUnitTests.m +++ b/src/objective-c/tests/CronetTests/CronetUnitTests.mm @@ -37,9 +37,9 @@ #import "test/core/end2end/data/ssl_test_data.h" #import "test/core/util/test_config.h" +#define GRPC_SHADOW_BORINGSSL_SYMBOLS #import "src/core/tsi/grpc_shadow_boringssl.h" - -#import +#import " static void drain_cq(grpc_completion_queue *cq) { grpc_event ev; diff --git a/src/objective-c/tests/InteropTestsRemoteWithCronet/InteropTestsRemoteWithCronet.m b/src/objective-c/tests/CronetTests/InteropTestsRemoteWithCronet.m similarity index 100% rename from src/objective-c/tests/InteropTestsRemoteWithCronet/InteropTestsRemoteWithCronet.m rename to src/objective-c/tests/CronetTests/InteropTestsRemoteWithCronet.m diff --git a/src/objective-c/tests/CronetUnitTests/Info.plist b/src/objective-c/tests/CronetUnitTests/Info.plist deleted file mode 100644 index ba72822e872..00000000000 --- a/src/objective-c/tests/CronetUnitTests/Info.plist +++ /dev/null @@ -1,24 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - BNDL - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1 - - diff --git a/src/objective-c/tests/InteropTests.h b/src/objective-c/tests/InteropTests/InteropTests.h similarity index 100% rename from src/objective-c/tests/InteropTests.h rename to src/objective-c/tests/InteropTests/InteropTests.h diff --git a/src/objective-c/tests/InteropTests.m b/src/objective-c/tests/InteropTests/InteropTests.m similarity index 94% rename from src/objective-c/tests/InteropTests.m rename to src/objective-c/tests/InteropTests/InteropTests.m index aab38e3a594..164d571d125 100644 --- a/src/objective-c/tests/InteropTests.m +++ b/src/objective-c/tests/InteropTests/InteropTests.m @@ -36,6 +36,8 @@ #import #import +#import "InteropTestsBlockCallbacks.h" + #define TEST_TIMEOUT 32 extern const char *kCFStreamVarName; @@ -76,81 +78,6 @@ BOOL isRemoteInteropTest(NSString *host) { return [host isEqualToString:@"grpc-test.sandbox.googleapis.com"]; } -// Convenience class to use blocks as callbacks -@interface InteropTestsBlockCallbacks : NSObject - -- (instancetype)initWithInitialMetadataCallback:(void (^)(NSDictionary *))initialMetadataCallback - messageCallback:(void (^)(id))messageCallback - closeCallback:(void (^)(NSDictionary *, NSError *))closeCallback - writeMessageCallback:(void (^)(void))writeMessageCallback; - -- (instancetype)initWithInitialMetadataCallback:(void (^)(NSDictionary *))initialMetadataCallback - messageCallback:(void (^)(id))messageCallback - closeCallback:(void (^)(NSDictionary *, NSError *))closeCallback; - -@end - -@implementation InteropTestsBlockCallbacks { - void (^_initialMetadataCallback)(NSDictionary *); - void (^_messageCallback)(id); - void (^_closeCallback)(NSDictionary *, NSError *); - void (^_writeMessageCallback)(void); - dispatch_queue_t _dispatchQueue; -} - -- (instancetype)initWithInitialMetadataCallback:(void (^)(NSDictionary *))initialMetadataCallback - messageCallback:(void (^)(id))messageCallback - closeCallback:(void (^)(NSDictionary *, NSError *))closeCallback - writeMessageCallback:(void (^)(void))writeMessageCallback { - if ((self = [super init])) { - _initialMetadataCallback = initialMetadataCallback; - _messageCallback = messageCallback; - _closeCallback = closeCallback; - _writeMessageCallback = writeMessageCallback; - _dispatchQueue = dispatch_queue_create(nil, DISPATCH_QUEUE_SERIAL); - } - return self; -} - -- (instancetype)initWithInitialMetadataCallback:(void (^)(NSDictionary *))initialMetadataCallback - messageCallback:(void (^)(id))messageCallback - closeCallback:(void (^)(NSDictionary *, NSError *))closeCallback { - return [self initWithInitialMetadataCallback:initialMetadataCallback - messageCallback:messageCallback - closeCallback:closeCallback - writeMessageCallback:nil]; -} - -- (void)didReceiveInitialMetadata:(NSDictionary *)initialMetadata { - if (_initialMetadataCallback) { - _initialMetadataCallback(initialMetadata); - } -} - -- (void)didReceiveProtoMessage:(GPBMessage *)message { - if (_messageCallback) { - _messageCallback(message); - } -} - -- (void)didCloseWithTrailingMetadata:(NSDictionary *)trailingMetadata error:(NSError *)error { - if (_closeCallback) { - _closeCallback(trailingMetadata, error); - } -} - -- (void)didWriteMessage { - if (_writeMessageCallback) { - _writeMessageCallback(); - } -} - -- (dispatch_queue_t)dispatchQueue { - return _dispatchQueue; -} - -@end - #pragma mark Tests @implementation InteropTests { diff --git a/src/objective-c/tests/InteropTests/InteropTestsBlockCallbacks.h b/src/objective-c/tests/InteropTests/InteropTestsBlockCallbacks.h new file mode 100644 index 00000000000..fa0b8361b65 --- /dev/null +++ b/src/objective-c/tests/InteropTests/InteropTestsBlockCallbacks.h @@ -0,0 +1,33 @@ +/* + * + * Copyright 2019 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +#import + +// Convenience class to use blocks as callbacks +@interface InteropTestsBlockCallbacks : NSObject + +- (instancetype)initWithInitialMetadataCallback:(void (^)(NSDictionary *))initialMetadataCallback + messageCallback:(void (^)(id))messageCallback + closeCallback:(void (^)(NSDictionary *, NSError *))closeCallback + writeMessageCallback:(void (^)(void))writeMessageCallback; + +- (instancetype)initWithInitialMetadataCallback:(void (^)(NSDictionary *))initialMetadataCallback + messageCallback:(void (^)(id))messageCallback + closeCallback:(void (^)(NSDictionary *, NSError *))closeCallback; + +@end diff --git a/src/objective-c/tests/InteropTests/InteropTestsBlockCallbacks.m b/src/objective-c/tests/InteropTests/InteropTestsBlockCallbacks.m new file mode 100644 index 00000000000..1ab1fa995a6 --- /dev/null +++ b/src/objective-c/tests/InteropTests/InteropTestsBlockCallbacks.m @@ -0,0 +1,80 @@ +/* + * + * Copyright 2019 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +#import "InteropTestsBlockCallbacks.h" + +@implementation InteropTestsBlockCallbacks { + void (^_initialMetadataCallback)(NSDictionary *); + void (^_messageCallback)(id); + void (^_closeCallback)(NSDictionary *, NSError *); + void (^_writeMessageCallback)(void); + dispatch_queue_t _dispatchQueue; +} + +- (instancetype)initWithInitialMetadataCallback:(void (^)(NSDictionary *))initialMetadataCallback + messageCallback:(void (^)(id))messageCallback + closeCallback:(void (^)(NSDictionary *, NSError *))closeCallback + writeMessageCallback:(void (^)(void))writeMessageCallback { + if ((self = [super init])) { + _initialMetadataCallback = initialMetadataCallback; + _messageCallback = messageCallback; + _closeCallback = closeCallback; + _writeMessageCallback = writeMessageCallback; + _dispatchQueue = dispatch_queue_create(nil, DISPATCH_QUEUE_SERIAL); + } + return self; +} + +- (instancetype)initWithInitialMetadataCallback:(void (^)(NSDictionary *))initialMetadataCallback + messageCallback:(void (^)(id))messageCallback + closeCallback:(void (^)(NSDictionary *, NSError *))closeCallback { + return [self initWithInitialMetadataCallback:initialMetadataCallback + messageCallback:messageCallback + closeCallback:closeCallback + writeMessageCallback:nil]; +} + +- (void)didReceiveInitialMetadata:(NSDictionary *)initialMetadata { + if (_initialMetadataCallback) { + _initialMetadataCallback(initialMetadata); + } +} + +- (void)didReceiveProtoMessage:(GPBMessage *)message { + if (_messageCallback) { + _messageCallback(message); + } +} + +- (void)didCloseWithTrailingMetadata:(NSDictionary *)trailingMetadata error:(NSError *)error { + if (_closeCallback) { + _closeCallback(trailingMetadata, error); + } +} + +- (void)didWriteMessage { + if (_writeMessageCallback) { + _writeMessageCallback(); + } +} + +- (dispatch_queue_t)dispatchQueue { + return _dispatchQueue; +} + +@end diff --git a/src/objective-c/tests/InteropTestsLocalCleartext.m b/src/objective-c/tests/InteropTests/InteropTestsLocalCleartext.m similarity index 100% rename from src/objective-c/tests/InteropTestsLocalCleartext.m rename to src/objective-c/tests/InteropTests/InteropTestsLocalCleartext.m diff --git a/src/objective-c/tests/InteropTestsLocalSSL.m b/src/objective-c/tests/InteropTests/InteropTestsLocalSSL.m similarity index 100% rename from src/objective-c/tests/InteropTestsLocalSSL.m rename to src/objective-c/tests/InteropTests/InteropTestsLocalSSL.m diff --git a/src/objective-c/tests/InteropTests/InteropTestsMultipleChannels.m b/src/objective-c/tests/InteropTests/InteropTestsMultipleChannels.m new file mode 100644 index 00000000000..c0beb107fad --- /dev/null +++ b/src/objective-c/tests/InteropTests/InteropTestsMultipleChannels.m @@ -0,0 +1,268 @@ +/* + * + * Copyright 2018 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +#import + +#ifdef GRPC_COMPILE_WITH_CRONET +#import +#endif +#import +#import +#import +#import + +#import "InteropTestsBlockCallbacks.h" + +#define NSStringize_helper(x) #x +#define NSStringize(x) @NSStringize_helper(x) +static NSString *const kRemoteSSLHost = NSStringize(HOST_PORT_REMOTE); +static NSString *const kLocalSSLHost = NSStringize(HOST_PORT_LOCALSSL); +static NSString *const kLocalCleartextHost = NSStringize(HOST_PORT_LOCAL); + +static const NSTimeInterval TEST_TIMEOUT = 8000; + +@interface RMTStreamingOutputCallRequest (Constructors) ++ (instancetype)messageWithPayloadSize:(NSNumber *)payloadSize + requestedResponseSize:(NSNumber *)responseSize; +@end + +@implementation RMTStreamingOutputCallRequest (Constructors) ++ (instancetype)messageWithPayloadSize:(NSNumber *)payloadSize + requestedResponseSize:(NSNumber *)responseSize { + RMTStreamingOutputCallRequest *request = [self message]; + RMTResponseParameters *parameters = [RMTResponseParameters message]; + parameters.size = responseSize.intValue; + [request.responseParametersArray addObject:parameters]; + request.payload.body = [NSMutableData dataWithLength:payloadSize.unsignedIntegerValue]; + return request; +} +@end + +@interface RMTStreamingOutputCallResponse (Constructors) ++ (instancetype)messageWithPayloadSize:(NSNumber *)payloadSize; +@end + +@implementation RMTStreamingOutputCallResponse (Constructors) ++ (instancetype)messageWithPayloadSize:(NSNumber *)payloadSize { + RMTStreamingOutputCallResponse *response = [self message]; + response.payload.type = RMTPayloadType_Compressable; + response.payload.body = [NSMutableData dataWithLength:payloadSize.unsignedIntegerValue]; + return response; +} +@end + + + +@interface InteropTestsMultipleChannels : XCTestCase + +@end + +dispatch_once_t initCronet; + +@implementation InteropTestsMultipleChannels { + RMTTestService *_remoteService; + RMTTestService *_remoteCronetService; + RMTTestService *_localCleartextService; + RMTTestService *_localSSLService; +} + +- (void)setUp { + [super setUp]; + + self.continueAfterFailure = NO; + + _remoteService = [RMTTestService serviceWithHost:kRemoteSSLHost callOptions:nil]; + + dispatch_once(&initCronet, ^{ + [Cronet setHttp2Enabled:YES]; + [Cronet start]; + }); + + // Default stack with remote host + GRPCMutableCallOptions *options = [[GRPCMutableCallOptions alloc] init]; + options.transportType = GRPCTransportTypeCronet; + // Cronet stack with remote host + _remoteCronetService = [RMTTestService serviceWithHost:kRemoteSSLHost callOptions:options]; + + + // Local stack with no SSL + options = [[GRPCMutableCallOptions alloc] init]; + options.transportType = GRPCTransportTypeInsecure; + _localCleartextService = [RMTTestService serviceWithHost:kLocalCleartextHost callOptions:options]; + + // Local stack with SSL + NSBundle *bundle = [NSBundle bundleForClass:[self class]]; + NSString *certsPath = + [bundle pathForResource:@"TestCertificates.bundle/test-certificates" ofType:@"pem"]; + NSError *error = nil; + NSString *certs = + [NSString stringWithContentsOfFile:certsPath encoding:NSUTF8StringEncoding error:&error]; + XCTAssertNil(error); + + options = [[GRPCMutableCallOptions alloc] init]; + options.transportType = GRPCTransportTypeChttp2BoringSSL; + options.PEMRootCertificates = certs; + options.hostNameOverride = @"foo.test.google.fr"; + _localSSLService = [RMTTestService serviceWithHost:kLocalSSLHost callOptions:options]; +} + +- (void)testEmptyUnaryRPC { + __weak XCTestExpectation *expectRemote = [self expectationWithDescription:@"Remote RPC finish"]; + __weak XCTestExpectation *expectCronetRemote = + [self expectationWithDescription:@"Remote RPC finish"]; + __weak XCTestExpectation *expectCleartext = + [self expectationWithDescription:@"Remote RPC finish"]; + __weak XCTestExpectation *expectSSL = [self expectationWithDescription:@"Remote RPC finish"]; + + GPBEmpty *request = [GPBEmpty message]; + + void (^messageHandler)(id message) = ^(id message) { + id expectedResponse = [GPBEmpty message]; + XCTAssertEqualObjects(message, expectedResponse); + }; + + GRPCUnaryProtoCall *callRemote = [_remoteService emptyCallWithMessage:request + responseHandler:[[InteropTestsBlockCallbacks alloc] initWithInitialMetadataCallback:nil + messageCallback:messageHandler + closeCallback:^(NSDictionary *trailingMetadata, NSError *error) { + XCTAssertNil(error); + [expectRemote fulfill]; + } + writeMessageCallback:nil] + callOptions:nil]; + GRPCUnaryProtoCall *callCronet = [_remoteCronetService emptyCallWithMessage:request + responseHandler:[[InteropTestsBlockCallbacks alloc] initWithInitialMetadataCallback:nil + messageCallback:messageHandler + closeCallback:^(NSDictionary *trailingMetadata, NSError *error) { + XCTAssertNil(error); + [expectCronetRemote fulfill]; + } + writeMessageCallback:nil] + callOptions:nil]; + GRPCUnaryProtoCall *callCleartext = [_localCleartextService emptyCallWithMessage:request + responseHandler:[[InteropTestsBlockCallbacks alloc] initWithInitialMetadataCallback:nil + messageCallback:messageHandler + closeCallback:^(NSDictionary *trailingMetadata, NSError *error) { + XCTAssertNil(error); + [expectCleartext fulfill]; + } + writeMessageCallback:nil] + callOptions:nil]; + GRPCUnaryProtoCall *callSSL = [_localSSLService emptyCallWithMessage:request + responseHandler:[[InteropTestsBlockCallbacks alloc] initWithInitialMetadataCallback:nil + messageCallback:messageHandler + closeCallback:^(NSDictionary *trailingMetadata, NSError *error) { + XCTAssertNil(error); + [expectSSL fulfill]; + } + writeMessageCallback:nil] + callOptions:nil]; + [callRemote start]; + [callCronet start]; + [callCleartext start]; + [callSSL start]; + + [self waitForExpectationsWithTimeout:TEST_TIMEOUT handler:nil]; +} + +- (void)testFullDuplexRPC { + __weak XCTestExpectation *expectRemote = [self expectationWithDescription:@"Remote RPC finish"]; + __weak XCTestExpectation *expectCronetRemote = + [self expectationWithDescription:@"Remote RPC finish"]; + __weak XCTestExpectation *expectCleartext = + [self expectationWithDescription:@"Remote RPC finish"]; + __weak XCTestExpectation *expectSSL = [self expectationWithDescription:@"Remote RPC finish"]; + + NSArray *requestSizes = @[ @100, @101, @102, @103 ]; + NSArray *responseSizes = @[ @104, @105, @106, @107 ]; + XCTAssertEqual([requestSizes count], [responseSizes count]); + NSUInteger kRounds = [requestSizes count]; + NSMutableArray *calls = [NSMutableArray arrayWithCapacity:4]; + + NSMutableArray *requests = [NSMutableArray arrayWithCapacity:kRounds]; + NSMutableArray *responses = [NSMutableArray arrayWithCapacity:kRounds]; + for (int i = 0; i < kRounds; i++) { + requests[i] = [RMTStreamingOutputCallRequest messageWithPayloadSize:requestSizes[i] + requestedResponseSize:responseSizes[i]]; + responses[i] = [RMTStreamingOutputCallResponse messageWithPayloadSize:responseSizes[i]]; + } + + __block NSMutableArray *steps = [NSMutableArray arrayWithCapacity:4]; + __block NSMutableArray *requestsBuffers = [NSMutableArray arrayWithCapacity:4]; + for (int i = 0; i < 4; i++) { + steps[i] = [NSNumber numberWithUnsignedInteger:0]; + requestsBuffers[i] = [[GRXBufferedPipe alloc] init]; + [requestsBuffers[i] writeValue:requests[0]]; + } + + void (^handler)(NSUInteger index, id message) = ^(NSUInteger index, id message) { + NSUInteger step = [steps[index] unsignedIntegerValue]; + step++; + steps[index] = [NSNumber numberWithUnsignedInteger:step]; + if (step < kRounds) { + [calls[index] writeMessage:requests[step]]; + } else { + [calls[index] finish]; + } + }; + + calls[0] = [_remoteService fullDuplexCallWithResponseHandler:[[InteropTestsBlockCallbacks alloc] initWithInitialMetadataCallback:nil + messageCallback:^(id message) { + handler(0, message); + } + closeCallback:^(NSDictionary *trailingMetadata, NSError *error) { + XCTAssertNil(error); + [expectRemote fulfill]; + } writeMessageCallback:nil] + callOptions:nil]; + calls[1] = [_remoteCronetService fullDuplexCallWithResponseHandler:[[InteropTestsBlockCallbacks alloc] initWithInitialMetadataCallback:nil + messageCallback:^(id message) { + handler(1, message); + } + closeCallback:^(NSDictionary *trailingMetadata, NSError *error) { + XCTAssertNil(error); + [expectCronetRemote fulfill]; + } writeMessageCallback:nil] + callOptions:nil]; + calls[2] = [_localCleartextService fullDuplexCallWithResponseHandler:[[InteropTestsBlockCallbacks alloc] initWithInitialMetadataCallback:nil + messageCallback:^(id message) { + handler(2, message); + } + closeCallback:^(NSDictionary *trailingMetadata, NSError *error) { + XCTAssertNil(error); + [expectCleartext fulfill]; + } writeMessageCallback:nil] + callOptions:nil]; + calls[3] = [_localSSLService fullDuplexCallWithResponseHandler:[[InteropTestsBlockCallbacks alloc] initWithInitialMetadataCallback:nil + messageCallback:^(id message) { + handler(3, message); + } + closeCallback:^(NSDictionary *trailingMetadata, NSError *error) { + XCTAssertNil(error); + [expectSSL fulfill]; + } writeMessageCallback:nil] + callOptions:nil]; + for (int i = 0; i < 4; i++) { + [calls[i] start]; + [calls[i] writeMessage:requests[0]]; + } + + [self waitForExpectationsWithTimeout:TEST_TIMEOUT handler:nil]; +} + +@end diff --git a/src/objective-c/tests/InteropTestsRemote.m b/src/objective-c/tests/InteropTests/InteropTestsRemote.m similarity index 100% rename from src/objective-c/tests/InteropTestsRemote.m rename to src/objective-c/tests/InteropTests/InteropTestsRemote.m diff --git a/src/objective-c/tests/InteropTestsCallOptions/Info.plist b/src/objective-c/tests/InteropTestsCallOptions/Info.plist deleted file mode 100644 index 6c40a6cd0c4..00000000000 --- a/src/objective-c/tests/InteropTestsCallOptions/Info.plist +++ /dev/null @@ -1,22 +0,0 @@ - - - - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - BNDL - CFBundleShortVersionString - 1.0 - CFBundleVersion - 1 - - diff --git a/src/objective-c/tests/InteropTestsCallOptions/InteropTestsCallOptions.m b/src/objective-c/tests/InteropTestsCallOptions/InteropTestsCallOptions.m deleted file mode 100644 index db51cb1cfbb..00000000000 --- a/src/objective-c/tests/InteropTestsCallOptions/InteropTestsCallOptions.m +++ /dev/null @@ -1,116 +0,0 @@ -/* - * - * Copyright 2018 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -#import - -#import -#import -#import -#import -#import -#import - -#define NSStringize_helper(x) #x -#define NSStringize(x) @NSStringize_helper(x) -static NSString *kRemoteHost = NSStringize(HOST_PORT_REMOTE); -const int32_t kRemoteInteropServerOverhead = 12; - -static const NSTimeInterval TEST_TIMEOUT = 16000; - -@interface InteropTestsCallOptions : XCTestCase - -@end - -@implementation InteropTestsCallOptions { - RMTTestService *_service; -} - -- (void)setUp { - self.continueAfterFailure = NO; - _service = [RMTTestService serviceWithHost:kRemoteHost]; - _service.options = [[GRPCCallOptions alloc] init]; -} - -- (void)test4MBResponsesAreAccepted { - __weak XCTestExpectation *expectation = [self expectationWithDescription:@"MaxResponseSize"]; - - RMTSimpleRequest *request = [RMTSimpleRequest message]; - const int32_t kPayloadSize = - 4 * 1024 * 1024 - kRemoteInteropServerOverhead; // 4MB - encoding overhead - request.responseSize = kPayloadSize; - - [_service unaryCallWithRequest:request - handler:^(RMTSimpleResponse *response, NSError *error) { - XCTAssertNil(error, @"Finished with unexpected error: %@", error); - XCTAssertEqual(response.payload.body.length, kPayloadSize); - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:TEST_TIMEOUT handler:nil]; -} - -- (void)testResponsesOverMaxSizeFailWithActionableMessage { - __weak XCTestExpectation *expectation = [self expectationWithDescription:@"ResponseOverMaxSize"]; - - RMTSimpleRequest *request = [RMTSimpleRequest message]; - const int32_t kPayloadSize = - 4 * 1024 * 1024 - kRemoteInteropServerOverhead + 1; // 1B over max size - request.responseSize = kPayloadSize; - - [_service unaryCallWithRequest:request - handler:^(RMTSimpleResponse *response, NSError *error) { - XCTAssertEqualObjects( - error.localizedDescription, - @"Received message larger than max (4194305 vs. 4194304)"); - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:TEST_TIMEOUT handler:nil]; -} - -- (void)testResponsesOver4MBAreAcceptedIfOptedIn { - __weak XCTestExpectation *expectation = - [self expectationWithDescription:@"HigherResponseSizeLimit"]; - - RMTSimpleRequest *request = [RMTSimpleRequest message]; - const size_t kPayloadSize = 5 * 1024 * 1024; // 5MB - request.responseSize = kPayloadSize; - - GRPCProtoCall *rpc = [_service - RPCToUnaryCallWithRequest:request - handler:^(RMTSimpleResponse *response, NSError *error) { - XCTAssertNil(error, @"Finished with unexpected error: %@", error); - XCTAssertEqual(response.payload.body.length, kPayloadSize); - [expectation fulfill]; - }]; - GRPCCallOptions *options = rpc.options; - options.responseSizeLimit = 6 * 1024 * 1024; - - [rpc start]; - - [self waitForExpectationsWithTimeout:TEST_TIMEOUT handler:nil]; -} - -- (void)testPerformanceExample { - // This is an example of a performance test case. - [self measureBlock:^{ - // Put the code you want to measure the time of here. - }]; -} - -@end diff --git a/src/objective-c/tests/InteropTestsMultipleChannels/Info.plist b/src/objective-c/tests/InteropTestsMultipleChannels/Info.plist deleted file mode 100644 index 6c40a6cd0c4..00000000000 --- a/src/objective-c/tests/InteropTestsMultipleChannels/Info.plist +++ /dev/null @@ -1,22 +0,0 @@ - - - - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - BNDL - CFBundleShortVersionString - 1.0 - CFBundleVersion - 1 - - diff --git a/src/objective-c/tests/InteropTestsMultipleChannels/InteropTestsMultipleChannels.m b/src/objective-c/tests/InteropTestsMultipleChannels/InteropTestsMultipleChannels.m deleted file mode 100644 index b0d4e4883a3..00000000000 --- a/src/objective-c/tests/InteropTestsMultipleChannels/InteropTestsMultipleChannels.m +++ /dev/null @@ -1,259 +0,0 @@ -/* - * - * Copyright 2018 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -#import - -#import -#import -#import -#import -#import - -#define NSStringize_helper(x) #x -#define NSStringize(x) @NSStringize_helper(x) -static NSString *const kRemoteSSLHost = NSStringize(HOST_PORT_REMOTE); -static NSString *const kLocalSSLHost = NSStringize(HOST_PORT_LOCALSSL); -static NSString *const kLocalCleartextHost = NSStringize(HOST_PORT_LOCAL); - -static const NSTimeInterval TEST_TIMEOUT = 8000; - -@interface RMTStreamingOutputCallRequest (Constructors) -+ (instancetype)messageWithPayloadSize:(NSNumber *)payloadSize - requestedResponseSize:(NSNumber *)responseSize; -@end - -@implementation RMTStreamingOutputCallRequest (Constructors) -+ (instancetype)messageWithPayloadSize:(NSNumber *)payloadSize - requestedResponseSize:(NSNumber *)responseSize { - RMTStreamingOutputCallRequest *request = [self message]; - RMTResponseParameters *parameters = [RMTResponseParameters message]; - parameters.size = responseSize.intValue; - [request.responseParametersArray addObject:parameters]; - request.payload.body = [NSMutableData dataWithLength:payloadSize.unsignedIntegerValue]; - return request; -} -@end - -@interface RMTStreamingOutputCallResponse (Constructors) -+ (instancetype)messageWithPayloadSize:(NSNumber *)payloadSize; -@end - -@implementation RMTStreamingOutputCallResponse (Constructors) -+ (instancetype)messageWithPayloadSize:(NSNumber *)payloadSize { - RMTStreamingOutputCallResponse *response = [self message]; - response.payload.type = RMTPayloadType_Compressable; - response.payload.body = [NSMutableData dataWithLength:payloadSize.unsignedIntegerValue]; - return response; -} -@end - -@interface InteropTestsMultipleChannels : XCTestCase - -@end - -dispatch_once_t initCronet; - -@implementation InteropTestsMultipleChannels { - RMTTestService *_remoteService; - RMTTestService *_remoteCronetService; - RMTTestService *_localCleartextService; - RMTTestService *_localSSLService; -} - -- (void)setUp { - [super setUp]; - - self.continueAfterFailure = NO; - - // Default stack with remote host - _remoteService = [RMTTestService serviceWithHost:kRemoteSSLHost]; - - // Cronet stack with remote host - _remoteCronetService = [RMTTestService serviceWithHost:kRemoteSSLHost]; - - dispatch_once(&initCronet, ^{ - [Cronet setHttp2Enabled:YES]; - [Cronet start]; - }); - - GRPCCallOptions *options = [[GRPCCallOptions alloc] init]; - options.transportType = GRPCTransportTypeCronet; - options.cronetEngine = [Cronet getGlobalEngine]; - _remoteCronetService.options = options; - - // Local stack with no SSL - _localCleartextService = [RMTTestService serviceWithHost:kLocalCleartextHost]; - options = [[GRPCCallOptions alloc] init]; - options.transportType = GRPCTransportTypeInsecure; - _localCleartextService.options = options; - - // Local stack with SSL - _localSSLService = [RMTTestService serviceWithHost:kLocalSSLHost]; - - NSBundle *bundle = [NSBundle bundleForClass:[self class]]; - NSString *certsPath = - [bundle pathForResource:@"TestCertificates.bundle/test-certificates" ofType:@"pem"]; - NSError *error = nil; - NSString *certs = - [NSString stringWithContentsOfFile:certsPath encoding:NSUTF8StringEncoding error:&error]; - XCTAssertNil(error); - - options = [[GRPCCallOptions alloc] init]; - options.transportType = GRPCTransportTypeChttp2BoringSSL; - options.PEMRootCertificates = certs; - options.hostNameOverride = @"foo.test.google.fr"; - _localSSLService.options = options; -} - -- (void)testEmptyUnaryRPC { - __weak XCTestExpectation *expectRemote = [self expectationWithDescription:@"Remote RPC finish"]; - __weak XCTestExpectation *expectCronetRemote = - [self expectationWithDescription:@"Remote RPC finish"]; - __weak XCTestExpectation *expectCleartext = - [self expectationWithDescription:@"Remote RPC finish"]; - __weak XCTestExpectation *expectSSL = [self expectationWithDescription:@"Remote RPC finish"]; - - GPBEmpty *request = [GPBEmpty message]; - - void (^handler)(GPBEmpty *response, NSError *error) = ^(GPBEmpty *response, NSError *error) { - XCTAssertNil(error, @"Finished with unexpected error: %@", error); - - id expectedResponse = [GPBEmpty message]; - XCTAssertEqualObjects(response, expectedResponse); - }; - - [_remoteService emptyCallWithRequest:request - handler:^(GPBEmpty *response, NSError *error) { - handler(response, error); - [expectRemote fulfill]; - }]; - [_remoteCronetService emptyCallWithRequest:request - handler:^(GPBEmpty *response, NSError *error) { - handler(response, error); - [expectCronetRemote fulfill]; - }]; - [_localCleartextService emptyCallWithRequest:request - handler:^(GPBEmpty *response, NSError *error) { - handler(response, error); - [expectCleartext fulfill]; - }]; - [_localSSLService emptyCallWithRequest:request - handler:^(GPBEmpty *response, NSError *error) { - handler(response, error); - [expectSSL fulfill]; - }]; - - [self waitForExpectationsWithTimeout:TEST_TIMEOUT handler:nil]; -} - -- (void)testFullDuplexRPC { - __weak XCTestExpectation *expectRemote = [self expectationWithDescription:@"Remote RPC finish"]; - __weak XCTestExpectation *expectCronetRemote = - [self expectationWithDescription:@"Remote RPC finish"]; - __weak XCTestExpectation *expectCleartext = - [self expectationWithDescription:@"Remote RPC finish"]; - __weak XCTestExpectation *expectSSL = [self expectationWithDescription:@"Remote RPC finish"]; - - NSArray *requestSizes = @[ @100, @101, @102, @103 ]; - NSArray *responseSizes = @[ @104, @105, @106, @107 ]; - XCTAssertEqual([requestSizes count], [responseSizes count]); - NSUInteger kRounds = [requestSizes count]; - - NSMutableArray *requests = [NSMutableArray arrayWithCapacity:kRounds]; - NSMutableArray *responses = [NSMutableArray arrayWithCapacity:kRounds]; - for (int i = 0; i < kRounds; i++) { - requests[i] = [RMTStreamingOutputCallRequest messageWithPayloadSize:requestSizes[i] - requestedResponseSize:responseSizes[i]]; - responses[i] = [RMTStreamingOutputCallResponse messageWithPayloadSize:responseSizes[i]]; - } - - __block NSMutableArray *steps = [NSMutableArray arrayWithCapacity:4]; - __block NSMutableArray *requestsBuffers = [NSMutableArray arrayWithCapacity:4]; - for (int i = 0; i < 4; i++) { - steps[i] = [NSNumber numberWithUnsignedInteger:0]; - requestsBuffers[i] = [[GRXBufferedPipe alloc] init]; - [requestsBuffers[i] writeValue:requests[0]]; - } - - BOOL (^handler)(int, BOOL, RMTStreamingOutputCallResponse *, NSError *) = - ^(int index, BOOL done, RMTStreamingOutputCallResponse *response, NSError *error) { - XCTAssertNil(error, @"Finished with unexpected error: %@", error); - XCTAssertTrue(done || response, @"Event handler called without an event."); - if (response) { - NSUInteger step = [steps[index] unsignedIntegerValue]; - XCTAssertLessThan(step, kRounds, @"More than %lu responses received.", - (unsigned long)kRounds); - XCTAssertEqualObjects(response, responses[step]); - step++; - steps[index] = [NSNumber numberWithUnsignedInteger:step]; - GRXBufferedPipe *pipe = requestsBuffers[index]; - if (step < kRounds) { - [pipe writeValue:requests[step]]; - } else { - [pipe writesFinishedWithError:nil]; - } - } - if (done) { - NSUInteger step = [steps[index] unsignedIntegerValue]; - XCTAssertEqual(step, kRounds, @"Received %lu responses instead of %lu.", step, kRounds); - return YES; - } - return NO; - }; - - [_remoteService - fullDuplexCallWithRequestsWriter:requestsBuffers[0] - eventHandler:^(BOOL done, - RMTStreamingOutputCallResponse *_Nullable response, - NSError *_Nullable error) { - if (handler(0, done, response, error)) { - [expectRemote fulfill]; - } - }]; - [_remoteCronetService - fullDuplexCallWithRequestsWriter:requestsBuffers[1] - eventHandler:^(BOOL done, - RMTStreamingOutputCallResponse *_Nullable response, - NSError *_Nullable error) { - if (handler(1, done, response, error)) { - [expectCronetRemote fulfill]; - } - }]; - [_localCleartextService - fullDuplexCallWithRequestsWriter:requestsBuffers[2] - eventHandler:^(BOOL done, - RMTStreamingOutputCallResponse *_Nullable response, - NSError *_Nullable error) { - if (handler(2, done, response, error)) { - [expectCleartext fulfill]; - } - }]; - [_localSSLService - fullDuplexCallWithRequestsWriter:requestsBuffers[3] - eventHandler:^(BOOL done, - RMTStreamingOutputCallResponse *_Nullable response, - NSError *_Nullable error) { - if (handler(3, done, response, error)) { - [expectSSL fulfill]; - } - }]; - - [self waitForExpectationsWithTimeout:TEST_TIMEOUT handler:nil]; -} - -@end diff --git a/src/objective-c/tests/InteropTestsRemoteWithCronet/Info.plist b/src/objective-c/tests/InteropTestsRemoteWithCronet/Info.plist deleted file mode 100644 index ba72822e872..00000000000 --- a/src/objective-c/tests/InteropTestsRemoteWithCronet/Info.plist +++ /dev/null @@ -1,24 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - BNDL - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1 - - diff --git a/src/objective-c/tests/Podfile b/src/objective-c/tests/Podfile index 34ed6680195..146abf5b0e0 100644 --- a/src/objective-c/tests/Podfile +++ b/src/objective-c/tests/Podfile @@ -5,23 +5,26 @@ install! 'cocoapods', :deterministic_uuids => false # Location of gRPC's repo root relative to this file. GRPC_LOCAL_SRC = '../../..' -# Install the dependencies in the main target plus all test targets. +target 'MacTests' do + platform :osx, '10.13' + pod 'Protobuf', :path => "#{GRPC_LOCAL_SRC}/third_party/protobuf", :inhibit_warnings => true + + pod '!ProtoCompiler', :path => "#{GRPC_LOCAL_SRC}/src/objective-c" + pod '!ProtoCompiler-gRPCPlugin', :path => "#{GRPC_LOCAL_SRC}/src/objective-c" + + pod 'BoringSSL-GRPC', :podspec => "#{GRPC_LOCAL_SRC}/src/objective-c", :inhibit_warnings => true + + pod 'gRPC', :path => GRPC_LOCAL_SRC + pod 'gRPC-Core', :path => GRPC_LOCAL_SRC + pod 'gRPC-RxLibrary', :path => GRPC_LOCAL_SRC + pod 'gRPC-ProtoRPC', :path => GRPC_LOCAL_SRC, :inhibit_warnings => true + pod 'RemoteTest', :path => "RemoteTestClient", :inhibit_warnings => true +end + %w( - AllTests - RxLibraryUnitTests - InteropTestsRemote - InteropTestsLocalSSL - InteropTestsLocalCleartext - InteropTestsRemoteWithCronet - InteropTestsMultipleChannels - InteropTestsCallOptions UnitTests - InteropTestsRemoteCFStream - InteropTestsLocalSSLCFStream - InteropTestsLocalCleartextCFStream - APIv2Tests ).each do |target_name| - target target_name do + target target_name do platform :ios, '8.0' pod 'Protobuf', :path => "#{GRPC_LOCAL_SRC}/third_party/protobuf", :inhibit_warnings => true @@ -35,52 +38,34 @@ GRPC_LOCAL_SRC = '../../..' pod 'gRPC-RxLibrary', :path => GRPC_LOCAL_SRC pod 'gRPC-ProtoRPC', :path => GRPC_LOCAL_SRC, :inhibit_warnings => true pod 'RemoteTest', :path => "RemoteTestClient", :inhibit_warnings => true - - if target_name == 'InteropTestsRemoteWithCronet' or target_name == 'InteropTestsMultipleChannels' - pod 'gRPC-Core/Cronet-Implementation', :path => GRPC_LOCAL_SRC - pod 'CronetFramework', :podspec => "#{GRPC_LOCAL_SRC}/src/objective-c" - end end end -target 'MacTests' do - platform :osx, '10.13' - pod 'Protobuf', :path => "#{GRPC_LOCAL_SRC}/third_party/protobuf", :inhibit_warnings => true - - pod '!ProtoCompiler', :path => "#{GRPC_LOCAL_SRC}/src/objective-c" - pod '!ProtoCompiler-gRPCPlugin', :path => "#{GRPC_LOCAL_SRC}/src/objective-c" - - pod 'BoringSSL-GRPC', :podspec => "#{GRPC_LOCAL_SRC}/src/objective-c", :inhibit_warnings => true - - pod 'gRPC', :path => GRPC_LOCAL_SRC - pod 'gRPC-Core', :path => GRPC_LOCAL_SRC - pod 'gRPC-RxLibrary', :path => GRPC_LOCAL_SRC - pod 'gRPC-ProtoRPC', :path => GRPC_LOCAL_SRC, :inhibit_warnings => true - pod 'RemoteTest', :path => "RemoteTestClient", :inhibit_warnings => true -end - %w( - CoreCronetEnd2EndTests - CronetUnitTests + InteropTests + CronetTests ).each do |target_name| target target_name do platform :ios, '8.0' - pod 'BoringSSL-GRPC', :podspec => "#{GRPC_LOCAL_SRC}/src/objective-c", :inhibit_warnings => true - pod 'CronetFramework', :podspec => "#{GRPC_LOCAL_SRC}/src/objective-c" - pod 'gRPC-Core', :path => GRPC_LOCAL_SRC - pod 'gRPC-Core/Cronet-Interface', :path => GRPC_LOCAL_SRC + pod 'Protobuf', :path => "#{GRPC_LOCAL_SRC}/third_party/protobuf", :inhibit_warnings => true + + pod '!ProtoCompiler', :path => "#{GRPC_LOCAL_SRC}/src/objective-c" + pod '!ProtoCompiler-gRPCPlugin', :path => "#{GRPC_LOCAL_SRC}/src/objective-c" + + pod 'BoringSSL-GRPC', :podspec => "#{GRPC_LOCAL_SRC}/src/objective-c", :inhibit_warnings => true + + pod 'gRPC', :path => GRPC_LOCAL_SRC + pod 'gRPC-Core', :path => GRPC_LOCAL_SRC + pod 'gRPC-RxLibrary', :path => GRPC_LOCAL_SRC + pod 'gRPC-ProtoRPC', :path => GRPC_LOCAL_SRC, :inhibit_warnings => true + pod 'RemoteTest', :path => "RemoteTestClient", :inhibit_warnings => true + pod 'gRPC-Core/Cronet-Implementation', :path => GRPC_LOCAL_SRC - pod 'gRPC-Core/Tests', :path => GRPC_LOCAL_SRC + pod 'CronetFramework', :podspec => "#{GRPC_LOCAL_SRC}/src/objective-c" + pod 'gRPC-Core/Tests', :path => GRPC_LOCAL_SRC, :inhibit_warnings => true end end -target 'ChannelTests' do - platform :ios, '8.0' - pod 'gRPC', :path => GRPC_LOCAL_SRC - pod 'gRPC-Core', :path => GRPC_LOCAL_SRC - pod 'BoringSSL-GRPC', :podspec => "#{GRPC_LOCAL_SRC}/src/objective-c", :inhibit_warnings => true -end - # gRPC-Core.podspec needs to be modified to be successfully used for local development. A Podfile's # pre_install hook lets us do that. The block passed to it runs after the podspecs are downloaded # and before they are installed in the user project. @@ -127,7 +112,7 @@ post_install do |installer| # GPR_UNREACHABLE_CODE causes "Control may reach end of non-void # function" warning config.build_settings['GCC_WARN_ABOUT_RETURN_TYPE'] = 'NO' - config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] = '$(inherited) COCOAPODS=1 GRPC_CRONET_WITH_PACKET_COALESCING=1 GRPC_CFSTREAM=1' + config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] = '$(inherited) COCOAPODS=1 GRPC_CRONET_WITH_PACKET_COALESCING=1' end end diff --git a/src/objective-c/tests/Tests.m b/src/objective-c/tests/Tests.m deleted file mode 100644 index 1d303497134..00000000000 --- a/src/objective-c/tests/Tests.m +++ /dev/null @@ -1,25 +0,0 @@ -/* - * - * Copyright 2015 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -#import - -@interface Tests : NSObject -@end - -@implementation Tests -@end diff --git a/src/objective-c/tests/Tests.xcodeproj/project.pbxproj b/src/objective-c/tests/Tests.xcodeproj/project.pbxproj index 27a617c83b4..1295731641b 100644 --- a/src/objective-c/tests/Tests.xcodeproj/project.pbxproj +++ b/src/objective-c/tests/Tests.xcodeproj/project.pbxproj @@ -7,186 +7,45 @@ objects = { /* Begin PBXBuildFile section */ - 06467F3A8D01EC493D12ADA2 /* libPods-CronetUnitTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = C6134277D2EB8B380862A03F /* libPods-CronetUnitTests.a */; }; - 09B76D9585ACE7403804D9DC /* libPods-InteropTestsRemoteWithCronet.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 9E9444C764F0FFF64A7EB58E /* libPods-InteropTestsRemoteWithCronet.a */; }; - 0F9232F984C08643FD40C34F /* libPods-InteropTestsRemote.a in Frameworks */ = {isa = PBXBuildFile; fileRef = DBE059B4AC7A51919467EEC0 /* libPods-InteropTestsRemote.a */; }; - 16A9E77B6E336B3C0B9BA6E0 /* libPods-InteropTestsLocalSSL.a in Frameworks */ = {isa = PBXBuildFile; fileRef = DBEDE45BDA60DF1E1C8950C0 /* libPods-InteropTestsLocalSSL.a */; }; - 1A0FB7F8C95A2F82538BC950 /* libPods-ChannelTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 48F1841C9A920626995DC28C /* libPods-ChannelTests.a */; }; - 20DFDF829DD993A4A00D5662 /* libPods-RxLibraryUnitTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A58BE6DF1C62D1739EBB2C78 /* libPods-RxLibraryUnitTests.a */; }; - 333E8FC01C8285B7C547D799 /* libPods-InteropTestsLocalCleartext.a in Frameworks */ = {isa = PBXBuildFile; fileRef = FD346DB2C23F676C4842F3FF /* libPods-InteropTestsLocalCleartext.a */; }; - 5E0282E9215AA697007AC99D /* UnitTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 5E0282E8215AA697007AC99D /* UnitTests.m */; }; - 5E0282EB215AA697007AC99D /* libTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 635697C71B14FC11007A7283 /* libTests.a */; }; - 5E3B95A521CAC6C500C0A151 /* APIv2Tests.m in Sources */ = {isa = PBXBuildFile; fileRef = 5E3B95A421CAC6C500C0A151 /* APIv2Tests.m */; }; - 5E7D71AD210954A8001EA6BA /* TestCertificates.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 63E240CF1B6C63DC005F3B0E /* TestCertificates.bundle */; }; - 5E7D71B5210B9EC9001EA6BA /* InteropTestsCallOptions.m in Sources */ = {isa = PBXBuildFile; fileRef = 5E7D71B4210B9EC9001EA6BA /* InteropTestsCallOptions.m */; }; - 5E7D71B7210B9EC9001EA6BA /* libTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 635697C71B14FC11007A7283 /* libTests.a */; }; - 5E8A5DA71D3840B4000F8BC4 /* CoreCronetEnd2EndTests.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5E8A5DA61D3840B4000F8BC4 /* CoreCronetEnd2EndTests.mm */; }; - 5E8A5DA91D3840B4000F8BC4 /* libTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 635697C71B14FC11007A7283 /* libTests.a */; }; - 5EAD6D271E27047400002378 /* CronetUnitTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 5EAD6D261E27047400002378 /* CronetUnitTests.m */; }; - 5EAD6D291E27047400002378 /* libTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 635697C71B14FC11007A7283 /* libTests.a */; }; - 5EB2A2E72107DED300EB4B69 /* ChannelTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 5EB2A2E62107DED300EB4B69 /* ChannelTests.m */; }; - 5EB2A2E92107DED300EB4B69 /* libTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 635697C71B14FC11007A7283 /* libTests.a */; }; - 5EB2A2F82109284500EB4B69 /* InteropTestsMultipleChannels.m in Sources */ = {isa = PBXBuildFile; fileRef = 5EB2A2F72109284500EB4B69 /* InteropTestsMultipleChannels.m */; }; - 5EB2A2FA2109284500EB4B69 /* libTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 635697C71B14FC11007A7283 /* libTests.a */; }; - 5EB5C3AA21656CEA00ADC300 /* ChannelPoolTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 5EB5C3A921656CEA00ADC300 /* ChannelPoolTest.m */; }; - 5EC5E42B2081782C000EF4AD /* InteropTestsRemote.m in Sources */ = {isa = PBXBuildFile; fileRef = 6379CC4F1BE16703001BC0A1 /* InteropTestsRemote.m */; }; - 5EC5E42C20817832000EF4AD /* InteropTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 635ED2EB1B1A3BC400FDE5C3 /* InteropTests.m */; }; - 5EC5E43B208185A7000EF4AD /* InteropTestsLocalCleartext.m in Sources */ = {isa = PBXBuildFile; fileRef = 63715F551B780C020029CB0B /* InteropTestsLocalCleartext.m */; }; - 5EC5E43C208185AD000EF4AD /* InteropTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 635ED2EB1B1A3BC400FDE5C3 /* InteropTests.m */; }; - 5EC5E43D208185B0000EF4AD /* GRPCClientTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 6312AE4D1B1BF49B00341DEE /* GRPCClientTests.m */; }; - 5EC5E44C208185EC000EF4AD /* InteropTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 635ED2EB1B1A3BC400FDE5C3 /* InteropTests.m */; }; - 5EC5E44D208185F0000EF4AD /* InteropTestsLocalSSL.m in Sources */ = {isa = PBXBuildFile; fileRef = 63E240CD1B6C4E2B005F3B0E /* InteropTestsLocalSSL.m */; }; - 5EC5E44E20818948000EF4AD /* TestCertificates.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 63E240CF1B6C63DC005F3B0E /* TestCertificates.bundle */; }; - 5EE84BF41D4717E40050C6CC /* InteropTestsRemoteWithCronet.m in Sources */ = {isa = PBXBuildFile; fileRef = 5EE84BF31D4717E40050C6CC /* InteropTestsRemoteWithCronet.m */; }; - 5EE84BF61D4717E40050C6CC /* libTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 635697C71B14FC11007A7283 /* libTests.a */; }; - 5EE84BFE1D471D400050C6CC /* InteropTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 635ED2EB1B1A3BC400FDE5C3 /* InteropTests.m */; }; - 60D2A57ED559F34428C2EEC5 /* libPods-CoreCronetEnd2EndTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = FBD98AC417B9882D32B19F28 /* libPods-CoreCronetEnd2EndTests.a */; }; - 6312AE4E1B1BF49B00341DEE /* GRPCClientTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 6312AE4D1B1BF49B00341DEE /* GRPCClientTests.m */; }; - 63423F4A1B150A5F006CF63C /* libTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 635697C71B14FC11007A7283 /* libTests.a */; }; - 635697CD1B14FC11007A7283 /* Tests.m in Sources */ = {isa = PBXBuildFile; fileRef = 635697CC1B14FC11007A7283 /* Tests.m */; }; - 635ED2EC1B1A3BC400FDE5C3 /* InteropTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 635ED2EB1B1A3BC400FDE5C3 /* InteropTests.m */; }; - 63715F561B780C020029CB0B /* InteropTestsLocalCleartext.m in Sources */ = {isa = PBXBuildFile; fileRef = 63715F551B780C020029CB0B /* InteropTestsLocalCleartext.m */; }; - 6379CC4D1BE1662A001BC0A1 /* InteropTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 635ED2EB1B1A3BC400FDE5C3 /* InteropTests.m */; }; - 6379CC4E1BE1662B001BC0A1 /* InteropTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 635ED2EB1B1A3BC400FDE5C3 /* InteropTests.m */; }; - 6379CC501BE16703001BC0A1 /* InteropTestsRemote.m in Sources */ = {isa = PBXBuildFile; fileRef = 6379CC4F1BE16703001BC0A1 /* InteropTestsRemote.m */; }; - 6379CC511BE1683B001BC0A1 /* InteropTestsRemote.m in Sources */ = {isa = PBXBuildFile; fileRef = 6379CC4F1BE16703001BC0A1 /* InteropTestsRemote.m */; }; - 6379CC531BE17709001BC0A1 /* TestCertificates.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 63E240CF1B6C63DC005F3B0E /* TestCertificates.bundle */; }; - 63DC84181BE15179000708E8 /* libTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 635697C71B14FC11007A7283 /* libTests.a */; }; - 63DC841E1BE15180000708E8 /* RxLibraryUnitTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 63423F501B151B77006CF63C /* RxLibraryUnitTests.m */; }; - 63DC84281BE15267000708E8 /* libTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 635697C71B14FC11007A7283 /* libTests.a */; }; - 63DC842E1BE15278000708E8 /* RxLibraryUnitTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 63423F501B151B77006CF63C /* RxLibraryUnitTests.m */; }; - 63DC842F1BE1527D000708E8 /* InteropTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 635ED2EB1B1A3BC400FDE5C3 /* InteropTests.m */; }; - 63DC84391BE15294000708E8 /* libTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 635697C71B14FC11007A7283 /* libTests.a */; }; - 63DC84481BE152B5000708E8 /* libTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 635697C71B14FC11007A7283 /* libTests.a */; }; - 63DC844E1BE15350000708E8 /* InteropTestsLocalCleartext.m in Sources */ = {isa = PBXBuildFile; fileRef = 63715F551B780C020029CB0B /* InteropTestsLocalCleartext.m */; }; - 63DC844F1BE15353000708E8 /* InteropTestsLocalSSL.m in Sources */ = {isa = PBXBuildFile; fileRef = 63E240CD1B6C4E2B005F3B0E /* InteropTestsLocalSSL.m */; }; - 63DC84501BE153AA000708E8 /* GRPCClientTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 6312AE4D1B1BF49B00341DEE /* GRPCClientTests.m */; }; - 63E240CE1B6C4E2B005F3B0E /* InteropTestsLocalSSL.m in Sources */ = {isa = PBXBuildFile; fileRef = 63E240CD1B6C4E2B005F3B0E /* InteropTestsLocalSSL.m */; }; - 63E240D01B6C63DC005F3B0E /* TestCertificates.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 63E240CF1B6C63DC005F3B0E /* TestCertificates.bundle */; }; - 6C1A3F81CCF7C998B4813EFD /* libPods-InteropTestsCallOptions.a in Frameworks */ = {isa = PBXBuildFile; fileRef = AF3FC2CFFE7B0961823BC740 /* libPods-InteropTestsCallOptions.a */; }; - 886717A79EFF774F356798E6 /* libPods-InteropTestsMultipleChannels.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 355D0E30AD224763BC9519F4 /* libPods-InteropTestsMultipleChannels.a */; }; - 91D4B3C85B6D8562F409CB48 /* libPods-InteropTestsLocalSSLCFStream.a in Frameworks */ = {isa = PBXBuildFile; fileRef = F3AB031E0E26AC8EF30A2A2A /* libPods-InteropTestsLocalSSLCFStream.a */; }; + 5E0282E9215AA697007AC99D /* NSErrorUnitTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 5E0282E8215AA697007AC99D /* NSErrorUnitTests.m */; }; + 5E3F14842278B461007C6D90 /* InteropTestsBlockCallbacks.m in Sources */ = {isa = PBXBuildFile; fileRef = 5E3F14832278B461007C6D90 /* InteropTestsBlockCallbacks.m */; }; + 5E3F14852278BF5D007C6D90 /* InteropTestsBlockCallbacks.m in Sources */ = {isa = PBXBuildFile; fileRef = 5E3F14832278B461007C6D90 /* InteropTestsBlockCallbacks.m */; }; + 5E3F14862278BFFF007C6D90 /* InteropTestsBlockCallbacks.m in Sources */ = {isa = PBXBuildFile; fileRef = 5E3F14832278B461007C6D90 /* InteropTestsBlockCallbacks.m */; }; + 5E7F486422775B37006656AD /* InteropTestsRemoteWithCronet.m in Sources */ = {isa = PBXBuildFile; fileRef = 5EE84BF31D4717E40050C6CC /* InteropTestsRemoteWithCronet.m */; }; + 5E7F486522775B41006656AD /* CronetUnitTests.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5EAD6D261E27047400002378 /* CronetUnitTests.mm */; }; + 5E7F486E22778086006656AD /* CoreCronetEnd2EndTests.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5E7F486D22778086006656AD /* CoreCronetEnd2EndTests.mm */; }; + 5E7F487922778226006656AD /* InteropTestsMultipleChannels.m in Sources */ = {isa = PBXBuildFile; fileRef = 5E7F487722778226006656AD /* InteropTestsMultipleChannels.m */; }; + 5E7F487D22778256006656AD /* ChannelPoolTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 5E7F487B22778256006656AD /* ChannelPoolTest.m */; }; + 5E7F487E22778256006656AD /* ChannelTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 5E7F487C22778256006656AD /* ChannelTests.m */; }; + 5E7F4880227782C1006656AD /* APIv2Tests.m in Sources */ = {isa = PBXBuildFile; fileRef = 5E7F487F227782C1006656AD /* APIv2Tests.m */; }; + 5E7F488322778A88006656AD /* InteropTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 5E7F488222778A88006656AD /* InteropTests.m */; }; + 5E7F488422778A88006656AD /* InteropTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 5E7F488222778A88006656AD /* InteropTests.m */; }; + 5E7F488522778A88006656AD /* InteropTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 5E7F488222778A88006656AD /* InteropTests.m */; }; + 5E7F488722778AEA006656AD /* GRPCClientTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 5E7F488622778AEA006656AD /* GRPCClientTests.m */; }; + 5E7F488922778B04006656AD /* InteropTestsRemote.m in Sources */ = {isa = PBXBuildFile; fileRef = 5E7F488822778B04006656AD /* InteropTestsRemote.m */; }; + 5E7F488B22778B5D006656AD /* RxLibraryUnitTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 5E7F488A22778B5D006656AD /* RxLibraryUnitTests.m */; }; + 5E7F488C22778C60006656AD /* APIv2Tests.m in Sources */ = {isa = PBXBuildFile; fileRef = 5E7F487F227782C1006656AD /* APIv2Tests.m */; }; + 5E7F488D22778C85006656AD /* InteropTestsLocalSSL.m in Sources */ = {isa = PBXBuildFile; fileRef = 63E240CD1B6C4E2B005F3B0E /* InteropTestsLocalSSL.m */; }; + 5E7F488E22778C87006656AD /* InteropTestsLocalCleartext.m in Sources */ = {isa = PBXBuildFile; fileRef = 63715F551B780C020029CB0B /* InteropTestsLocalCleartext.m */; }; + 5E7F488F22778C8C006656AD /* InteropTestsRemote.m in Sources */ = {isa = PBXBuildFile; fileRef = 5E7F488822778B04006656AD /* InteropTestsRemote.m */; }; + 5E7F489022778C95006656AD /* RxLibraryUnitTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 5E7F488A22778B5D006656AD /* RxLibraryUnitTests.m */; }; + 5EA4770322736178000F72FC /* InteropTestsLocalSSL.m in Sources */ = {isa = PBXBuildFile; fileRef = 63E240CD1B6C4E2B005F3B0E /* InteropTestsLocalSSL.m */; }; + 5EA477042273617B000F72FC /* InteropTestsLocalCleartext.m in Sources */ = {isa = PBXBuildFile; fileRef = 63715F551B780C020029CB0B /* InteropTestsLocalCleartext.m */; }; + 5EA4770522736AC4000F72FC /* TestCertificates.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 63E240CF1B6C63DC005F3B0E /* TestCertificates.bundle */; }; + 65EB19E418B39A8374D407BB /* libPods-CronetTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1B1511C20E16A8422B58D61A /* libPods-CronetTests.a */; }; + 903163C7FE885838580AEC7A /* libPods-InteropTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = D457AD9797664CFA191C3280 /* libPods-InteropTests.a */; }; 953CD2942A3A6D6CE695BE87 /* libPods-MacTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 276873A05AC5479B60DF6079 /* libPods-MacTests.a */; }; - 98478C9F42329DF769A45B6C /* libPods-APIv2Tests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = B6AD69CACF67505B0F028E92 /* libPods-APIv2Tests.a */; }; B071230B22669EED004B64A1 /* StressTests.m in Sources */ = {isa = PBXBuildFile; fileRef = B071230A22669EED004B64A1 /* StressTests.m */; }; - B0BB3F02225E7A3C008DA580 /* InteropTestsLocalSSL.m in Sources */ = {isa = PBXBuildFile; fileRef = 63E240CD1B6C4E2B005F3B0E /* InteropTestsLocalSSL.m */; }; - B0BB3F03225E7A44008DA580 /* InteropTestsLocalCleartext.m in Sources */ = {isa = PBXBuildFile; fileRef = 63715F551B780C020029CB0B /* InteropTestsLocalCleartext.m */; }; - B0BB3F04225E7A8D008DA580 /* RxLibraryUnitTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 63423F501B151B77006CF63C /* RxLibraryUnitTests.m */; }; - B0BB3F05225E7A9F008DA580 /* InteropTestsRemote.m in Sources */ = {isa = PBXBuildFile; fileRef = 6379CC4F1BE16703001BC0A1 /* InteropTestsRemote.m */; }; - B0BB3F06225E7AAD008DA580 /* GRPCClientTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 6312AE4D1B1BF49B00341DEE /* GRPCClientTests.m */; }; - B0BB3F07225E7AB5008DA580 /* APIv2Tests.m in Sources */ = {isa = PBXBuildFile; fileRef = 5E3B95A421CAC6C500C0A151 /* APIv2Tests.m */; }; - B0BB3F08225E7ABA008DA580 /* UnitTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 5E0282E8215AA697007AC99D /* UnitTests.m */; }; + B0BB3F08225E7ABA008DA580 /* NSErrorUnitTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 5E0282E8215AA697007AC99D /* NSErrorUnitTests.m */; }; B0BB3F0A225EA511008DA580 /* TestCertificates.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 63E240CF1B6C63DC005F3B0E /* TestCertificates.bundle */; }; - B0BB3F0B225EB110008DA580 /* InteropTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 635ED2EB1B1A3BC400FDE5C3 /* InteropTests.m */; }; B0D39B9A2266F3CB00A4078D /* StressTestsSSL.m in Sources */ = {isa = PBXBuildFile; fileRef = B0D39B992266F3CB00A4078D /* StressTestsSSL.m */; }; B0D39B9C2266FF9800A4078D /* StressTestsCleartext.m in Sources */ = {isa = PBXBuildFile; fileRef = B0D39B9B2266FF9800A4078D /* StressTestsCleartext.m */; }; - BC111C80CBF7068B62869352 /* libPods-InteropTestsRemoteCFStream.a in Frameworks */ = {isa = PBXBuildFile; fileRef = F44AC3F44E3491A8C0D890FE /* libPods-InteropTestsRemoteCFStream.a */; }; - C3D6F4270A2FFF634D8849ED /* libPods-InteropTestsLocalCleartextCFStream.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 0BDA4BA011779D5D25B5618C /* libPods-InteropTestsLocalCleartextCFStream.a */; }; CCF5C0719EF608276AE16374 /* libPods-UnitTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 22A3EBB488699C8CEA19707B /* libPods-UnitTests.a */; }; - F15EF7852DC70770EFDB1D2C /* libPods-AllTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = CAE086D5B470DA367D415AB0 /* libPods-AllTests.a */; }; /* End PBXBuildFile section */ -/* Begin PBXContainerItemProxy section */ - 5E0282EC215AA697007AC99D /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 635697BF1B14FC11007A7283 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 635697C61B14FC11007A7283; - remoteInfo = Tests; - }; - 5E7D71B8210B9EC9001EA6BA /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 635697BF1B14FC11007A7283 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 635697C61B14FC11007A7283; - remoteInfo = Tests; - }; - 5E8A5DAA1D3840B4000F8BC4 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 635697BF1B14FC11007A7283 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 635697C61B14FC11007A7283; - remoteInfo = Tests; - }; - 5EAD6D2A1E27047400002378 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 635697BF1B14FC11007A7283 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 635697C61B14FC11007A7283; - remoteInfo = Tests; - }; - 5EB2A2EA2107DED300EB4B69 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 635697BF1B14FC11007A7283 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 635697C61B14FC11007A7283; - remoteInfo = Tests; - }; - 5EB2A2FB2109284500EB4B69 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 635697BF1B14FC11007A7283 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 635697C61B14FC11007A7283; - remoteInfo = Tests; - }; - 5EE84BF71D4717E40050C6CC /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 635697BF1B14FC11007A7283 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 635697C61B14FC11007A7283; - remoteInfo = Tests; - }; - 63423F4B1B150A5F006CF63C /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 635697BF1B14FC11007A7283 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 635697C61B14FC11007A7283; - remoteInfo = Tests; - }; - 63DC84191BE15179000708E8 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 635697BF1B14FC11007A7283 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 635697C61B14FC11007A7283; - remoteInfo = Tests; - }; - 63DC84291BE15267000708E8 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 635697BF1B14FC11007A7283 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 635697C61B14FC11007A7283; - remoteInfo = Tests; - }; - 63DC843A1BE15294000708E8 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 635697BF1B14FC11007A7283 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 635697C61B14FC11007A7283; - remoteInfo = Tests; - }; - 63DC84491BE152B5000708E8 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 635697BF1B14FC11007A7283 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 635697C61B14FC11007A7283; - remoteInfo = Tests; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXCopyFilesBuildPhase section */ - 635697C51B14FC11007A7283 /* CopyFiles */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = "include/$(PRODUCT_NAME)"; - dstSubfolderSpec = 16; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXCopyFilesBuildPhase section */ - /* Begin PBXFileReference section */ 02192CF1FF9534E3D18C65FC /* Pods-CronetUnitTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-CronetUnitTests.release.xcconfig"; path = "Pods/Target Support Files/Pods-CronetUnitTests/Pods-CronetUnitTests.release.xcconfig"; sourceTree = ""; }; + 070266E2626EB997B54880A3 /* Pods-InteropTests.test.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-InteropTests.test.xcconfig"; path = "Pods/Target Support Files/Pods-InteropTests/Pods-InteropTests.test.xcconfig"; sourceTree = ""; }; 07D10A965323BEA7FE59A74B /* Pods-RxLibraryUnitTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RxLibraryUnitTests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-RxLibraryUnitTests/Pods-RxLibraryUnitTests.debug.xcconfig"; sourceTree = ""; }; 0A4F89D9C90E9C30990218F0 /* Pods.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.release.xcconfig; path = "Pods/Target Support Files/Pods/Pods.release.xcconfig"; sourceTree = ""; }; 0BDA4BA011779D5D25B5618C /* libPods-InteropTestsLocalCleartextCFStream.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-InteropTestsLocalCleartextCFStream.a"; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -198,9 +57,11 @@ 1588C85DEAF7FC0ACDEA4C02 /* Pods-InteropTestsLocalCleartext.test.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-InteropTestsLocalCleartext.test.xcconfig"; path = "Pods/Target Support Files/Pods-InteropTestsLocalCleartext/Pods-InteropTestsLocalCleartext.test.xcconfig"; sourceTree = ""; }; 16A2E4C5839C83FBDA63881F /* Pods-MacTests.cronet.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-MacTests.cronet.xcconfig"; path = "Pods/Target Support Files/Pods-MacTests/Pods-MacTests.cronet.xcconfig"; sourceTree = ""; }; 17F60BF2871F6AF85FB3FA12 /* Pods-InteropTestsRemoteWithCronet.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-InteropTestsRemoteWithCronet.debug.xcconfig"; path = "Pods/Target Support Files/Pods-InteropTestsRemoteWithCronet/Pods-InteropTestsRemoteWithCronet.debug.xcconfig"; sourceTree = ""; }; + 1B1511C20E16A8422B58D61A /* libPods-CronetTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-CronetTests.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 1E43EAE443CBB4482B1EB071 /* Pods-MacTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-MacTests.release.xcconfig"; path = "Pods/Target Support Files/Pods-MacTests/Pods-MacTests.release.xcconfig"; sourceTree = ""; }; 1F5E788FBF9A4A06EB9E1ACD /* Pods-MacTests.test.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-MacTests.test.xcconfig"; path = "Pods/Target Support Files/Pods-MacTests/Pods-MacTests.test.xcconfig"; sourceTree = ""; }; 20DFF2F3C97EF098FE5A3171 /* libPods-Tests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Tests.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + 20F6A3D59D0EE091E2D43953 /* Pods-CronetTests.cronet.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-CronetTests.cronet.xcconfig"; path = "Pods/Target Support Files/Pods-CronetTests/Pods-CronetTests.cronet.xcconfig"; sourceTree = ""; }; 22A3EBB488699C8CEA19707B /* libPods-UnitTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-UnitTests.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 2650FEF00956E7924772F9D9 /* Pods-InteropTestsMultipleChannels.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-InteropTestsMultipleChannels.release.xcconfig"; path = "Pods/Target Support Files/Pods-InteropTestsMultipleChannels/Pods-InteropTestsMultipleChannels.release.xcconfig"; sourceTree = ""; }; 276873A05AC5479B60DF6079 /* libPods-MacTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-MacTests.a"; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -226,58 +87,41 @@ 55B630C1FF8C36D1EFC4E0A4 /* Pods-InteropTestsLocalSSLCFStream.cronet.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-InteropTestsLocalSSLCFStream.cronet.xcconfig"; path = "Pods/Target Support Files/Pods-InteropTestsLocalSSLCFStream/Pods-InteropTestsLocalSSLCFStream.cronet.xcconfig"; sourceTree = ""; }; 573450F334B331D0BED8B961 /* Pods-CoreCronetEnd2EndTests.cronet.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-CoreCronetEnd2EndTests.cronet.xcconfig"; path = "Pods/Target Support Files/Pods-CoreCronetEnd2EndTests/Pods-CoreCronetEnd2EndTests.cronet.xcconfig"; sourceTree = ""; }; 5761E98978DDDF136A58CB7E /* Pods-AllTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-AllTests.release.xcconfig"; path = "Pods/Target Support Files/Pods-AllTests/Pods-AllTests.release.xcconfig"; sourceTree = ""; }; + 5AB9A82F289D548D6B8816F9 /* Pods-CronetTests.test.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-CronetTests.test.xcconfig"; path = "Pods/Target Support Files/Pods-CronetTests/Pods-CronetTests.test.xcconfig"; sourceTree = ""; }; 5E0282E6215AA697007AC99D /* UnitTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = UnitTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; - 5E0282E8215AA697007AC99D /* UnitTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = UnitTests.m; sourceTree = ""; }; - 5E0282EA215AA697007AC99D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 5E3B95A221CAC6C500C0A151 /* APIv2Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = APIv2Tests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; - 5E3B95A421CAC6C500C0A151 /* APIv2Tests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = APIv2Tests.m; sourceTree = ""; }; - 5E3B95A621CAC6C500C0A151 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 5E7D71B2210B9EC8001EA6BA /* InteropTestsCallOptions.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = InteropTestsCallOptions.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; - 5E7D71B4210B9EC9001EA6BA /* InteropTestsCallOptions.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = InteropTestsCallOptions.m; sourceTree = ""; }; - 5E7D71B6210B9EC9001EA6BA /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 5E8A5DA41D3840B4000F8BC4 /* CoreCronetEnd2EndTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = CoreCronetEnd2EndTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; - 5E8A5DA61D3840B4000F8BC4 /* CoreCronetEnd2EndTests.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = CoreCronetEnd2EndTests.mm; sourceTree = ""; }; + 5E0282E8215AA697007AC99D /* NSErrorUnitTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = NSErrorUnitTests.m; sourceTree = ""; }; + 5E3F14822278B42D007C6D90 /* InteropTestsBlockCallbacks.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = InteropTestsBlockCallbacks.h; sourceTree = ""; }; + 5E3F14832278B461007C6D90 /* InteropTestsBlockCallbacks.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = InteropTestsBlockCallbacks.m; sourceTree = ""; }; + 5E7F485922775B15006656AD /* CronetTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = CronetTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 5E7F486622776AD8006656AD /* Cronet.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cronet.framework; path = Pods/CronetFramework/Cronet.framework; sourceTree = ""; }; + 5E7F486D22778086006656AD /* CoreCronetEnd2EndTests.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = CoreCronetEnd2EndTests.mm; sourceTree = ""; }; + 5E7F487722778226006656AD /* InteropTestsMultipleChannels.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = InteropTestsMultipleChannels.m; sourceTree = ""; }; + 5E7F487B22778256006656AD /* ChannelPoolTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ChannelPoolTest.m; sourceTree = ""; }; + 5E7F487C22778256006656AD /* ChannelTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ChannelTests.m; sourceTree = ""; }; + 5E7F487F227782C1006656AD /* APIv2Tests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = APIv2Tests.m; sourceTree = ""; }; + 5E7F488122778A88006656AD /* InteropTests.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InteropTests.h; sourceTree = ""; }; + 5E7F488222778A88006656AD /* InteropTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = InteropTests.m; sourceTree = ""; }; + 5E7F488622778AEA006656AD /* GRPCClientTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GRPCClientTests.m; sourceTree = ""; }; + 5E7F488822778B04006656AD /* InteropTestsRemote.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = InteropTestsRemote.m; sourceTree = ""; }; + 5E7F488A22778B5D006656AD /* RxLibraryUnitTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RxLibraryUnitTests.m; sourceTree = ""; }; + 5EA476F42272816A000F72FC /* InteropTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = InteropTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 5EA908CF4CDA4CE218352A06 /* Pods-InteropTestsLocalSSLCFStream.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-InteropTestsLocalSSLCFStream.release.xcconfig"; path = "Pods/Target Support Files/Pods-InteropTestsLocalSSLCFStream/Pods-InteropTestsLocalSSLCFStream.release.xcconfig"; sourceTree = ""; }; - 5EAD6D241E27047400002378 /* CronetUnitTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = CronetUnitTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; - 5EAD6D261E27047400002378 /* CronetUnitTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CronetUnitTests.m; sourceTree = ""; }; - 5EAD6D281E27047400002378 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 5EAD6D261E27047400002378 /* CronetUnitTests.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = CronetUnitTests.mm; path = CronetTests/CronetUnitTests.mm; sourceTree = SOURCE_ROOT; }; 5EAFE8271F8EFB87007F2189 /* version.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = version.h; sourceTree = ""; }; - 5EB2A2E42107DED300EB4B69 /* ChannelTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = ChannelTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; - 5EB2A2E62107DED300EB4B69 /* ChannelTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ChannelTests.m; sourceTree = ""; }; - 5EB2A2E82107DED300EB4B69 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 5EB2A2F52109284500EB4B69 /* InteropTestsMultipleChannels.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = InteropTestsMultipleChannels.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; - 5EB2A2F72109284500EB4B69 /* InteropTestsMultipleChannels.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = InteropTestsMultipleChannels.m; sourceTree = ""; }; - 5EB2A2F92109284500EB4B69 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 5EB5C3A921656CEA00ADC300 /* ChannelPoolTest.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ChannelPoolTest.m; sourceTree = ""; }; - 5EC5E421208177CC000EF4AD /* InteropTestsRemoteCFStream.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = InteropTestsRemoteCFStream.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; - 5EC5E4312081856B000EF4AD /* InteropTestsLocalCleartextCFStream.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = InteropTestsLocalCleartextCFStream.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; - 5EC5E442208185CE000EF4AD /* InteropTestsLocalSSLCFStream.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = InteropTestsLocalSSLCFStream.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; - 5EE84BF11D4717E40050C6CC /* InteropTestsRemoteWithCronet.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = InteropTestsRemoteWithCronet.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; - 5EE84BF31D4717E40050C6CC /* InteropTestsRemoteWithCronet.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = InteropTestsRemoteWithCronet.m; sourceTree = ""; }; - 5EE84BF51D4717E40050C6CC /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 6312AE4D1B1BF49B00341DEE /* GRPCClientTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GRPCClientTests.m; sourceTree = ""; }; - 63423F441B150A5F006CF63C /* AllTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = AllTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; - 63423F501B151B77006CF63C /* RxLibraryUnitTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RxLibraryUnitTests.m; sourceTree = ""; }; - 635697C71B14FC11007A7283 /* libTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libTests.a; sourceTree = BUILT_PRODUCTS_DIR; }; - 635697CC1B14FC11007A7283 /* Tests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = Tests.m; sourceTree = ""; }; + 5EE84BF31D4717E40050C6CC /* InteropTestsRemoteWithCronet.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = InteropTestsRemoteWithCronet.m; path = CronetTests/InteropTestsRemoteWithCronet.m; sourceTree = SOURCE_ROOT; }; 635697D81B14FC11007A7283 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 635ED2EB1B1A3BC400FDE5C3 /* InteropTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = InteropTests.m; sourceTree = ""; }; - 63715F551B780C020029CB0B /* InteropTestsLocalCleartext.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = InteropTestsLocalCleartext.m; sourceTree = ""; }; - 6379CC4F1BE16703001BC0A1 /* InteropTestsRemote.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = InteropTestsRemote.m; sourceTree = ""; }; - 63DC84131BE15179000708E8 /* RxLibraryUnitTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RxLibraryUnitTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; - 63DC84231BE15267000708E8 /* InteropTestsRemote.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = InteropTestsRemote.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; - 63DC84341BE15294000708E8 /* InteropTestsLocalSSL.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = InteropTestsLocalSSL.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; - 63DC84431BE152B5000708E8 /* InteropTestsLocalCleartext.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = InteropTestsLocalCleartext.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; - 63E240CC1B6C4D3A005F3B0E /* InteropTests.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InteropTests.h; sourceTree = ""; }; - 63E240CD1B6C4E2B005F3B0E /* InteropTestsLocalSSL.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = InteropTestsLocalSSL.m; sourceTree = ""; }; + 63715F551B780C020029CB0B /* InteropTestsLocalCleartext.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = InteropTestsLocalCleartext.m; path = InteropTests/InteropTestsLocalCleartext.m; sourceTree = SOURCE_ROOT; }; + 63E240CD1B6C4E2B005F3B0E /* InteropTestsLocalSSL.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = InteropTestsLocalSSL.m; path = InteropTests/InteropTestsLocalSSL.m; sourceTree = SOURCE_ROOT; }; 63E240CF1B6C63DC005F3B0E /* TestCertificates.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; path = TestCertificates.bundle; sourceTree = ""; }; 64F68A9A6A63CC930DD30A6E /* Pods-CronetUnitTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-CronetUnitTests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-CronetUnitTests/Pods-CronetUnitTests.debug.xcconfig"; sourceTree = ""; }; 6793C9D019CB268C5BB491A2 /* Pods-CoreCronetEnd2EndTests.test.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-CoreCronetEnd2EndTests.test.xcconfig"; path = "Pods/Target Support Files/Pods-CoreCronetEnd2EndTests/Pods-CoreCronetEnd2EndTests.test.xcconfig"; sourceTree = ""; }; + 680439AC2BC8761EDD54A1EA /* Pods-InteropTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-InteropTests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-InteropTests/Pods-InteropTests.debug.xcconfig"; sourceTree = ""; }; 73D2DF07027835BA0FB0B1C0 /* Pods-InteropTestsCallOptions.cronet.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-InteropTestsCallOptions.cronet.xcconfig"; path = "Pods/Target Support Files/Pods-InteropTestsCallOptions/Pods-InteropTestsCallOptions.cronet.xcconfig"; sourceTree = ""; }; 781089FAE980F51F88A3BE0B /* Pods-RxLibraryUnitTests.test.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RxLibraryUnitTests.test.xcconfig"; path = "Pods/Target Support Files/Pods-RxLibraryUnitTests/Pods-RxLibraryUnitTests.test.xcconfig"; sourceTree = ""; }; 79C68EFFCB5533475D810B79 /* Pods-RxLibraryUnitTests.cronet.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RxLibraryUnitTests.cronet.xcconfig"; path = "Pods/Target Support Files/Pods-RxLibraryUnitTests/Pods-RxLibraryUnitTests.cronet.xcconfig"; sourceTree = ""; }; 7A2E97E3F469CC2A758D77DE /* Pods-InteropTestsLocalSSL.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-InteropTestsLocalSSL.release.xcconfig"; path = "Pods/Target Support Files/Pods-InteropTestsLocalSSL/Pods-InteropTestsLocalSSL.release.xcconfig"; sourceTree = ""; }; 7BA53C6D224288D5870FE6F3 /* Pods-InteropTestsLocalCleartextCFStream.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-InteropTestsLocalCleartextCFStream.release.xcconfig"; path = "Pods/Target Support Files/Pods-InteropTestsLocalCleartextCFStream/Pods-InteropTestsLocalCleartextCFStream.release.xcconfig"; sourceTree = ""; }; + 7F4F42EBAF311E9F84FCA32E /* Pods-CronetTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-CronetTests.release.xcconfig"; path = "Pods/Target Support Files/Pods-CronetTests/Pods-CronetTests.release.xcconfig"; sourceTree = ""; }; 8B498B05C6DA0818B2FA91D4 /* Pods-InteropTestsLocalCleartextCFStream.cronet.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-InteropTestsLocalCleartextCFStream.cronet.xcconfig"; path = "Pods/Target Support Files/Pods-InteropTestsLocalCleartextCFStream/Pods-InteropTestsLocalCleartextCFStream.cronet.xcconfig"; sourceTree = ""; }; 8C233E85C3EB45B3CAE52EDF /* Pods-APIv2Tests.cronet.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-APIv2Tests.cronet.xcconfig"; path = "Pods/Target Support Files/Pods-APIv2Tests/Pods-APIv2Tests.cronet.xcconfig"; sourceTree = ""; }; 90E63AD3C4A1E3E6BC745096 /* Pods-ChannelTests.cronet.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ChannelTests.cronet.xcconfig"; path = "Pods/Target Support Files/Pods-ChannelTests/Pods-ChannelTests.cronet.xcconfig"; sourceTree = ""; }; @@ -305,7 +149,9 @@ C6134277D2EB8B380862A03F /* libPods-CronetUnitTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-CronetUnitTests.a"; sourceTree = BUILT_PRODUCTS_DIR; }; C9172F9020E8C97A470D7250 /* Pods-InteropTestsCallOptions.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-InteropTestsCallOptions.release.xcconfig"; path = "Pods/Target Support Files/Pods-InteropTestsCallOptions/Pods-InteropTestsCallOptions.release.xcconfig"; sourceTree = ""; }; CAE086D5B470DA367D415AB0 /* libPods-AllTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-AllTests.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + CDF6CC70B8BF9D10EFE7D199 /* Pods-InteropTests.cronet.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-InteropTests.cronet.xcconfig"; path = "Pods/Target Support Files/Pods-InteropTests/Pods-InteropTests.cronet.xcconfig"; sourceTree = ""; }; D13BEC8181B8E678A1B52F54 /* Pods-InteropTestsLocalSSL.test.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-InteropTestsLocalSSL.test.xcconfig"; path = "Pods/Target Support Files/Pods-InteropTestsLocalSSL/Pods-InteropTestsLocalSSL.test.xcconfig"; sourceTree = ""; }; + D457AD9797664CFA191C3280 /* libPods-InteropTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-InteropTests.a"; sourceTree = BUILT_PRODUCTS_DIR; }; D52B92A7108602F170DA8091 /* Pods-ChannelTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ChannelTests.release.xcconfig"; path = "Pods/Target Support Files/Pods-ChannelTests/Pods-ChannelTests.release.xcconfig"; sourceTree = ""; }; DB1F4391AF69D20D38D74B67 /* Pods-AllTests.test.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-AllTests.test.xcconfig"; path = "Pods/Target Support Files/Pods-AllTests/Pods-AllTests.test.xcconfig"; sourceTree = ""; }; DBE059B4AC7A51919467EEC0 /* libPods-InteropTestsRemote.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-InteropTestsRemote.a"; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -319,8 +165,10 @@ E7E4D3FD76E3B745D992AF5F /* Pods-AllTests.cronet.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-AllTests.cronet.xcconfig"; path = "Pods/Target Support Files/Pods-AllTests/Pods-AllTests.cronet.xcconfig"; sourceTree = ""; }; EA8B122ACDE73E3AAA0E4A19 /* Pods-InteropTestsMultipleChannels.test.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-InteropTestsMultipleChannels.test.xcconfig"; path = "Pods/Target Support Files/Pods-InteropTestsMultipleChannels/Pods-InteropTestsMultipleChannels.test.xcconfig"; sourceTree = ""; }; EBFFEC04B514CB0D4922DC40 /* Pods-UnitTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-UnitTests.release.xcconfig"; path = "Pods/Target Support Files/Pods-UnitTests/Pods-UnitTests.release.xcconfig"; sourceTree = ""; }; + EC66920112123D2DB1CB7F6C /* Pods-CronetTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-CronetTests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-CronetTests/Pods-CronetTests.debug.xcconfig"; sourceTree = ""; }; F3AB031E0E26AC8EF30A2A2A /* libPods-InteropTestsLocalSSLCFStream.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-InteropTestsLocalSSLCFStream.a"; sourceTree = BUILT_PRODUCTS_DIR; }; F44AC3F44E3491A8C0D890FE /* libPods-InteropTestsRemoteCFStream.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-InteropTestsRemoteCFStream.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + F6A7EECACBB4849DDD3F450A /* Pods-InteropTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-InteropTests.release.xcconfig"; path = "Pods/Target Support Files/Pods-InteropTests/Pods-InteropTests.release.xcconfig"; sourceTree = ""; }; F9E48EF5ACB1F38825171C5F /* Pods-ChannelTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ChannelTests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-ChannelTests/Pods-ChannelTests.debug.xcconfig"; sourceTree = ""; }; FBD98AC417B9882D32B19F28 /* libPods-CoreCronetEnd2EndTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-CoreCronetEnd2EndTests.a"; sourceTree = BUILT_PRODUCTS_DIR; }; FD346DB2C23F676C4842F3FF /* libPods-InteropTestsLocalCleartext.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-InteropTestsLocalCleartext.a"; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -332,146 +180,23 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 5E0282EB215AA697007AC99D /* libTests.a in Frameworks */, CCF5C0719EF608276AE16374 /* libPods-UnitTests.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; - 5E3B959F21CAC6C500C0A151 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 98478C9F42329DF769A45B6C /* libPods-APIv2Tests.a in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 5E7D71AF210B9EC8001EA6BA /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 5E7D71B7210B9EC9001EA6BA /* libTests.a in Frameworks */, - 6C1A3F81CCF7C998B4813EFD /* libPods-InteropTestsCallOptions.a in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 5E8A5DA11D3840B4000F8BC4 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 5E8A5DA91D3840B4000F8BC4 /* libTests.a in Frameworks */, - 60D2A57ED559F34428C2EEC5 /* libPods-CoreCronetEnd2EndTests.a in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 5EAD6D211E27047400002378 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 5EAD6D291E27047400002378 /* libTests.a in Frameworks */, - 06467F3A8D01EC493D12ADA2 /* libPods-CronetUnitTests.a in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 5EB2A2E12107DED300EB4B69 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 5EB2A2E92107DED300EB4B69 /* libTests.a in Frameworks */, - 1A0FB7F8C95A2F82538BC950 /* libPods-ChannelTests.a in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 5EB2A2F22109284500EB4B69 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 5EB2A2FA2109284500EB4B69 /* libTests.a in Frameworks */, - 886717A79EFF774F356798E6 /* libPods-InteropTestsMultipleChannels.a in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 5EC5E41E208177CC000EF4AD /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - BC111C80CBF7068B62869352 /* libPods-InteropTestsRemoteCFStream.a in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 5EC5E42E2081856B000EF4AD /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - C3D6F4270A2FFF634D8849ED /* libPods-InteropTestsLocalCleartextCFStream.a in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 5EC5E43F208185CE000EF4AD /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 91D4B3C85B6D8562F409CB48 /* libPods-InteropTestsLocalSSLCFStream.a in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 5EE84BEE1D4717E40050C6CC /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 5EE84BF61D4717E40050C6CC /* libTests.a in Frameworks */, - 09B76D9585ACE7403804D9DC /* libPods-InteropTestsRemoteWithCronet.a in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 63423F411B150A5F006CF63C /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 63423F4A1B150A5F006CF63C /* libTests.a in Frameworks */, - F15EF7852DC70770EFDB1D2C /* libPods-AllTests.a in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 635697C41B14FC11007A7283 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 63DC84101BE15179000708E8 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 63DC84181BE15179000708E8 /* libTests.a in Frameworks */, - 20DFDF829DD993A4A00D5662 /* libPods-RxLibraryUnitTests.a in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 63DC84201BE15267000708E8 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 63DC84281BE15267000708E8 /* libTests.a in Frameworks */, - 0F9232F984C08643FD40C34F /* libPods-InteropTestsRemote.a in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 63DC84311BE15294000708E8 /* Frameworks */ = { + 5E7F485622775B15006656AD /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 63DC84391BE15294000708E8 /* libTests.a in Frameworks */, - 16A9E77B6E336B3C0B9BA6E0 /* libPods-InteropTestsLocalSSL.a in Frameworks */, + 65EB19E418B39A8374D407BB /* libPods-CronetTests.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; - 63DC84401BE152B5000708E8 /* Frameworks */ = { + 5EA476F12272816A000F72FC /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 63DC84481BE152B5000708E8 /* libTests.a in Frameworks */, - 333E8FC01C8285B7C547D799 /* libPods-InteropTestsLocalCleartext.a in Frameworks */, + 903163C7FE885838580AEC7A /* libPods-InteropTests.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -489,6 +214,7 @@ 136D535E19727099B941D7B1 /* Frameworks */ = { isa = PBXGroup; children = ( + 5E7F486622776AD8006656AD /* Cronet.framework */, 35F2B6BF3BAE8F0DC4AFD76E /* libPods.a */, CAE086D5B470DA367D415AB0 /* libPods-AllTests.a */, FD346DB2C23F676C4842F3FF /* libPods-InteropTestsLocalCleartext.a */, @@ -508,6 +234,8 @@ 22A3EBB488699C8CEA19707B /* libPods-UnitTests.a */, B6AD69CACF67505B0F028E92 /* libPods-APIv2Tests.a */, 276873A05AC5479B60DF6079 /* libPods-MacTests.a */, + D457AD9797664CFA191C3280 /* libPods-InteropTests.a */, + 1B1511C20E16A8422B58D61A /* libPods-CronetTests.a */, ); name = Frameworks; sourceTree = ""; @@ -585,6 +313,14 @@ 1F5E788FBF9A4A06EB9E1ACD /* Pods-MacTests.test.xcconfig */, 16A2E4C5839C83FBDA63881F /* Pods-MacTests.cronet.xcconfig */, 1E43EAE443CBB4482B1EB071 /* Pods-MacTests.release.xcconfig */, + 680439AC2BC8761EDD54A1EA /* Pods-InteropTests.debug.xcconfig */, + 070266E2626EB997B54880A3 /* Pods-InteropTests.test.xcconfig */, + CDF6CC70B8BF9D10EFE7D199 /* Pods-InteropTests.cronet.xcconfig */, + F6A7EECACBB4849DDD3F450A /* Pods-InteropTests.release.xcconfig */, + EC66920112123D2DB1CB7F6C /* Pods-CronetTests.debug.xcconfig */, + 5AB9A82F289D548D6B8816F9 /* Pods-CronetTests.test.xcconfig */, + 20F6A3D59D0EE091E2D43953 /* Pods-CronetTests.cronet.xcconfig */, + 7F4F42EBAF311E9F84FCA32E /* Pods-CronetTests.release.xcconfig */, ); name = Pods; sourceTree = ""; @@ -592,89 +328,50 @@ 5E0282E7215AA697007AC99D /* UnitTests */ = { isa = PBXGroup; children = ( - 5E0282E8215AA697007AC99D /* UnitTests.m */, - 5E0282EA215AA697007AC99D /* Info.plist */, + 5E7F488A22778B5D006656AD /* RxLibraryUnitTests.m */, + 5E7F488622778AEA006656AD /* GRPCClientTests.m */, + 5E7F487F227782C1006656AD /* APIv2Tests.m */, + 5E7F487B22778256006656AD /* ChannelPoolTest.m */, + 5E7F487C22778256006656AD /* ChannelTests.m */, + 5E0282E8215AA697007AC99D /* NSErrorUnitTests.m */, ); path = UnitTests; sourceTree = ""; }; - 5E3B95A321CAC6C500C0A151 /* APIv2Tests */ = { - isa = PBXGroup; - children = ( - 5E3B95A421CAC6C500C0A151 /* APIv2Tests.m */, - 5E3B95A621CAC6C500C0A151 /* Info.plist */, - ); - path = APIv2Tests; - sourceTree = ""; - }; - 5E7D71B3210B9EC9001EA6BA /* InteropTestsCallOptions */ = { - isa = PBXGroup; - children = ( - 5E7D71B4210B9EC9001EA6BA /* InteropTestsCallOptions.m */, - 5E7D71B6210B9EC9001EA6BA /* Info.plist */, - ); - path = InteropTestsCallOptions; - sourceTree = ""; - }; - 5E8A5DA51D3840B4000F8BC4 /* CoreCronetEnd2EndTests */ = { - isa = PBXGroup; - children = ( - 5E8A5DA61D3840B4000F8BC4 /* CoreCronetEnd2EndTests.mm */, - ); - path = CoreCronetEnd2EndTests; - sourceTree = ""; - }; - 5EAD6D251E27047400002378 /* CronetUnitTests */ = { - isa = PBXGroup; - children = ( - 5EAD6D261E27047400002378 /* CronetUnitTests.m */, - 5EAD6D281E27047400002378 /* Info.plist */, - ); - path = CronetUnitTests; - sourceTree = ""; - }; - 5EB2A2E52107DED300EB4B69 /* ChannelTests */ = { - isa = PBXGroup; - children = ( - 5EB5C3A921656CEA00ADC300 /* ChannelPoolTest.m */, - 5EB2A2E62107DED300EB4B69 /* ChannelTests.m */, - 5EB2A2E82107DED300EB4B69 /* Info.plist */, - ); - path = ChannelTests; - sourceTree = ""; - }; - 5EB2A2F62109284500EB4B69 /* InteropTestsMultipleChannels */ = { + 5E7F485A22775B15006656AD /* CronetTests */ = { isa = PBXGroup; children = ( - 5EB2A2F72109284500EB4B69 /* InteropTestsMultipleChannels.m */, - 5EB2A2F92109284500EB4B69 /* Info.plist */, + 5EE84BF31D4717E40050C6CC /* InteropTestsRemoteWithCronet.m */, + 5E7F486D22778086006656AD /* CoreCronetEnd2EndTests.mm */, + 5EAD6D261E27047400002378 /* CronetUnitTests.mm */, ); - path = InteropTestsMultipleChannels; + path = CronetTests; sourceTree = ""; }; - 5EE84BF21D4717E40050C6CC /* InteropTestsRemoteWithCronet */ = { + 5E7F48762277820F006656AD /* InteropTests */ = { isa = PBXGroup; children = ( - 5EE84BF31D4717E40050C6CC /* InteropTestsRemoteWithCronet.m */, - 5EE84BF51D4717E40050C6CC /* Info.plist */, + 5E7F488822778B04006656AD /* InteropTestsRemote.m */, + 5E7F488122778A88006656AD /* InteropTests.h */, + 5E7F488222778A88006656AD /* InteropTests.m */, + 63E240CD1B6C4E2B005F3B0E /* InteropTestsLocalSSL.m */, + 63715F551B780C020029CB0B /* InteropTestsLocalCleartext.m */, + 5E7F487722778226006656AD /* InteropTestsMultipleChannels.m */, + 5E3F14822278B42D007C6D90 /* InteropTestsBlockCallbacks.h */, + 5E3F14832278B461007C6D90 /* InteropTestsBlockCallbacks.m */, ); - path = InteropTestsRemoteWithCronet; + path = InteropTests; sourceTree = ""; }; 635697BE1B14FC11007A7283 = { isa = PBXGroup; children = ( + 5E7F48762277820F006656AD /* InteropTests */, 635697C91B14FC11007A7283 /* Tests */, 63E240CF1B6C63DC005F3B0E /* TestCertificates.bundle */, - 5E8A5DA51D3840B4000F8BC4 /* CoreCronetEnd2EndTests */, - 5EE84BF21D4717E40050C6CC /* InteropTestsRemoteWithCronet */, - 5EAD6D251E27047400002378 /* CronetUnitTests */, - 5EB2A2E52107DED300EB4B69 /* ChannelTests */, - 5EB2A2F62109284500EB4B69 /* InteropTestsMultipleChannels */, - 5E7D71B3210B9EC9001EA6BA /* InteropTestsCallOptions */, 5E0282E7215AA697007AC99D /* UnitTests */, - 5E3B95A321CAC6C500C0A151 /* APIv2Tests */, B0BB3EF8225E795F008DA580 /* MacTests */, + 5E7F485A22775B15006656AD /* CronetTests */, 635697C81B14FC11007A7283 /* Products */, 51E4650F34F854F41FF053B3 /* Pods */, 136D535E19727099B941D7B1 /* Frameworks */, @@ -684,24 +381,10 @@ 635697C81B14FC11007A7283 /* Products */ = { isa = PBXGroup; children = ( - 635697C71B14FC11007A7283 /* libTests.a */, - 63423F441B150A5F006CF63C /* AllTests.xctest */, - 63DC84131BE15179000708E8 /* RxLibraryUnitTests.xctest */, - 63DC84231BE15267000708E8 /* InteropTestsRemote.xctest */, - 63DC84341BE15294000708E8 /* InteropTestsLocalSSL.xctest */, - 63DC84431BE152B5000708E8 /* InteropTestsLocalCleartext.xctest */, - 5E8A5DA41D3840B4000F8BC4 /* CoreCronetEnd2EndTests.xctest */, - 5EE84BF11D4717E40050C6CC /* InteropTestsRemoteWithCronet.xctest */, - 5EAD6D241E27047400002378 /* CronetUnitTests.xctest */, - 5EC5E421208177CC000EF4AD /* InteropTestsRemoteCFStream.xctest */, - 5EC5E4312081856B000EF4AD /* InteropTestsLocalCleartextCFStream.xctest */, - 5EC5E442208185CE000EF4AD /* InteropTestsLocalSSLCFStream.xctest */, - 5EB2A2E42107DED300EB4B69 /* ChannelTests.xctest */, - 5EB2A2F52109284500EB4B69 /* InteropTestsMultipleChannels.xctest */, - 5E7D71B2210B9EC8001EA6BA /* InteropTestsCallOptions.xctest */, 5E0282E6215AA697007AC99D /* UnitTests.xctest */, - 5E3B95A221CAC6C500C0A151 /* APIv2Tests.xctest */, B0BB3EF7225E795F008DA580 /* MacTests.xctest */, + 5EA476F42272816A000F72FC /* InteropTests.xctest */, + 5E7F485922775B15006656AD /* CronetTests.xctest */, ); name = Products; sourceTree = ""; @@ -710,14 +393,6 @@ isa = PBXGroup; children = ( 5EAFE8271F8EFB87007F2189 /* version.h */, - 6312AE4D1B1BF49B00341DEE /* GRPCClientTests.m */, - 63E240CC1B6C4D3A005F3B0E /* InteropTests.h */, - 635ED2EB1B1A3BC400FDE5C3 /* InteropTests.m */, - 6379CC4F1BE16703001BC0A1 /* InteropTestsRemote.m */, - 63E240CD1B6C4E2B005F3B0E /* InteropTestsLocalSSL.m */, - 63715F551B780C020029CB0B /* InteropTestsLocalCleartext.m */, - 63423F501B151B77006CF63C /* RxLibraryUnitTests.m */, - 635697CC1B14FC11007A7283 /* Tests.m */, 635697D71B14FC11007A7283 /* Supporting Files */, ); name = Tests; @@ -759,769 +434,348 @@ buildRules = ( ); dependencies = ( - 5E0282ED215AA697007AC99D /* PBXTargetDependency */, ); name = UnitTests; productName = UnitTests; productReference = 5E0282E6215AA697007AC99D /* UnitTests.xctest */; productType = "com.apple.product-type.bundle.unit-test"; }; - 5E3B95A121CAC6C500C0A151 /* APIv2Tests */ = { + 5E7F485822775B15006656AD /* CronetTests */ = { isa = PBXNativeTarget; - buildConfigurationList = 5E3B95A721CAC6C500C0A151 /* Build configuration list for PBXNativeTarget "APIv2Tests" */; + buildConfigurationList = 5E7F485E22775B15006656AD /* Build configuration list for PBXNativeTarget "CronetTests" */; buildPhases = ( - EDDD3FA856BCA3443ED36D1E /* [CP] Check Pods Manifest.lock */, - 5E3B959E21CAC6C500C0A151 /* Sources */, - 5E3B959F21CAC6C500C0A151 /* Frameworks */, - 5E3B95A021CAC6C500C0A151 /* Resources */, - C17B826BBD02FDD4A5F355AF /* [CP] Copy Pods Resources */, + CCAEC0F23E05489651A07D53 /* [CP] Check Pods Manifest.lock */, + 5E7F485522775B15006656AD /* Sources */, + 5E7F485622775B15006656AD /* Frameworks */, + 5E7F485722775B15006656AD /* Resources */, + 292EA42A76AC7933A37235FD /* [CP] Embed Pods Frameworks */, + 30AFD6F6FC40B9923632A866 /* [CP] Copy Pods Resources */, ); buildRules = ( ); dependencies = ( ); - name = APIv2Tests; - productName = APIv2Tests; - productReference = 5E3B95A221CAC6C500C0A151 /* APIv2Tests.xctest */; + name = CronetTests; + productName = CronetTests; + productReference = 5E7F485922775B15006656AD /* CronetTests.xctest */; productType = "com.apple.product-type.bundle.unit-test"; }; - 5E7D71B1210B9EC8001EA6BA /* InteropTestsCallOptions */ = { + 5EA476F32272816A000F72FC /* InteropTests */ = { isa = PBXNativeTarget; - buildConfigurationList = 5E7D71BA210B9EC9001EA6BA /* Build configuration list for PBXNativeTarget "InteropTestsCallOptions" */; + buildConfigurationList = 5EA477002272816B000F72FC /* Build configuration list for PBXNativeTarget "InteropTests" */; buildPhases = ( - 2865C6386D677998F861E183 /* [CP] Check Pods Manifest.lock */, - 5E7D71AE210B9EC8001EA6BA /* Sources */, - 5E7D71AF210B9EC8001EA6BA /* Frameworks */, - 5E7D71B0210B9EC8001EA6BA /* Resources */, - 6BA6D00B1816306453BF82D4 /* [CP] Copy Pods Resources */, + 40BCDB09674DF988C708D22B /* [CP] Check Pods Manifest.lock */, + 5EA476F02272816A000F72FC /* Sources */, + 5EA476F12272816A000F72FC /* Frameworks */, + 5EA476F22272816A000F72FC /* Resources */, + D11CB94CF56A1E53760D29D8 /* [CP] Copy Pods Resources */, + 0FEFD5FC6B323AC95549AE4A /* [CP] Embed Pods Frameworks */, ); buildRules = ( ); dependencies = ( - 5E7D71B9210B9EC9001EA6BA /* PBXTargetDependency */, ); - name = InteropTestsCallOptions; - productName = InteropTestsCallOptions; - productReference = 5E7D71B2210B9EC8001EA6BA /* InteropTestsCallOptions.xctest */; + name = InteropTests; + productName = InteropTests; + productReference = 5EA476F42272816A000F72FC /* InteropTests.xctest */; productType = "com.apple.product-type.bundle.unit-test"; }; - 5E8A5DA31D3840B4000F8BC4 /* CoreCronetEnd2EndTests */ = { + B0BB3EF6225E795F008DA580 /* MacTests */ = { isa = PBXNativeTarget; - buildConfigurationList = 5E8A5DAE1D3840B4000F8BC4 /* Build configuration list for PBXNativeTarget "CoreCronetEnd2EndTests" */; + buildConfigurationList = B0BB3EFC225E795F008DA580 /* Build configuration list for PBXNativeTarget "MacTests" */; buildPhases = ( - F58F17E425446B15028B9F74 /* [CP] Check Pods Manifest.lock */, - 5E8A5DA01D3840B4000F8BC4 /* Sources */, - 5E8A5DA11D3840B4000F8BC4 /* Frameworks */, - 5E8A5DA21D3840B4000F8BC4 /* Resources */, - E63468C760D0724F18861822 /* [CP] Embed Pods Frameworks */, + E5B20F69559C6AE299DFEA7C /* [CP] Check Pods Manifest.lock */, + B0BB3EF3225E795F008DA580 /* Sources */, + B0BB3EF4225E795F008DA580 /* Frameworks */, + B0BB3EF5225E795F008DA580 /* Resources */, + 452FDC3918FEC23ECAFD31EC /* [CP] Copy Pods Resources */, ); buildRules = ( ); dependencies = ( - 5E8A5DAB1D3840B4000F8BC4 /* PBXTargetDependency */, ); - name = CoreCronetEnd2EndTests; - productName = CoreCronetEnd2EndTests; - productReference = 5E8A5DA41D3840B4000F8BC4 /* CoreCronetEnd2EndTests.xctest */; + name = MacTests; + productName = MacTests; + productReference = B0BB3EF7225E795F008DA580 /* MacTests.xctest */; productType = "com.apple.product-type.bundle.unit-test"; }; - 5EAD6D231E27047400002378 /* CronetUnitTests */ = { - isa = PBXNativeTarget; - buildConfigurationList = 5EAD6D2F1E27047400002378 /* Build configuration list for PBXNativeTarget "CronetUnitTests" */; - buildPhases = ( - 80E2DDD2EC04A4009F45E933 /* [CP] Check Pods Manifest.lock */, - 5EAD6D201E27047400002378 /* Sources */, - 5EAD6D211E27047400002378 /* Frameworks */, - 5EAD6D221E27047400002378 /* Resources */, - A686B9967BB4CB81B1CBF8F8 /* [CP] Embed Pods Frameworks */, - ); - buildRules = ( +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 635697BF1B14FC11007A7283 /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 0630; + ORGANIZATIONNAME = gRPC; + TargetAttributes = { + 5E0282E5215AA697007AC99D = { + CreatedOnToolsVersion = 9.2; + ProvisioningStyle = Automatic; + }; + 5E7F485822775B15006656AD = { + CreatedOnToolsVersion = 10.1; + ProvisioningStyle = Automatic; + }; + 5EA476F32272816A000F72FC = { + CreatedOnToolsVersion = 10.1; + ProvisioningStyle = Automatic; + }; + B0BB3EF6225E795F008DA580 = { + CreatedOnToolsVersion = 10.1; + ProvisioningStyle = Automatic; + }; + }; + }; + buildConfigurationList = 635697C21B14FC11007A7283 /* Build configuration list for PBXProject "Tests" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, ); - dependencies = ( - 5EAD6D2B1E27047400002378 /* PBXTargetDependency */, + mainGroup = 635697BE1B14FC11007A7283; + productRefGroup = 635697C81B14FC11007A7283 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 5E0282E5215AA697007AC99D /* UnitTests */, + B0BB3EF6225E795F008DA580 /* MacTests */, + 5EA476F32272816A000F72FC /* InteropTests */, + 5E7F485822775B15006656AD /* CronetTests */, ); - name = CronetUnitTests; - productName = CronetUnitTests; - productReference = 5EAD6D241E27047400002378 /* CronetUnitTests.xctest */; - productType = "com.apple.product-type.bundle.unit-test"; }; - 5EB2A2E32107DED300EB4B69 /* ChannelTests */ = { - isa = PBXNativeTarget; - buildConfigurationList = 5EB2A2F02107DED300EB4B69 /* Build configuration list for PBXNativeTarget "ChannelTests" */; - buildPhases = ( - 021B3B1F545989843EBC9A4B /* [CP] Check Pods Manifest.lock */, - 5EB2A2E02107DED300EB4B69 /* Sources */, - 5EB2A2E12107DED300EB4B69 /* Frameworks */, - 5EB2A2E22107DED300EB4B69 /* Resources */, - 1EAF0CBDBFAB18D4DA64535D /* [CP] Copy Pods Resources */, +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 5E0282E4215AA697007AC99D /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( ); - buildRules = ( + runOnlyForDeploymentPostprocessing = 0; + }; + 5E7F485722775B15006656AD /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( ); - dependencies = ( - 5EB2A2EB2107DED300EB4B69 /* PBXTargetDependency */, + runOnlyForDeploymentPostprocessing = 0; + }; + 5EA476F22272816A000F72FC /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 5EA4770522736AC4000F72FC /* TestCertificates.bundle in Resources */, ); - name = ChannelTests; - productName = ChannelTests; - productReference = 5EB2A2E42107DED300EB4B69 /* ChannelTests.xctest */; - productType = "com.apple.product-type.bundle.unit-test"; + runOnlyForDeploymentPostprocessing = 0; }; - 5EB2A2F42109284500EB4B69 /* InteropTestsMultipleChannels */ = { - isa = PBXNativeTarget; - buildConfigurationList = 5EB2A3012109284500EB4B69 /* Build configuration list for PBXNativeTarget "InteropTestsMultipleChannels" */; - buildPhases = ( - 8C1ED025E07C4D457C355336 /* [CP] Check Pods Manifest.lock */, - 5EB2A2F12109284500EB4B69 /* Sources */, - 5EB2A2F22109284500EB4B69 /* Frameworks */, - 5EB2A2F32109284500EB4B69 /* Resources */, - 8D685CB612835DB3F7A6F14A /* [CP] Embed Pods Frameworks */, - 0617B5294978A95BEBBFF733 /* [CP] Copy Pods Resources */, + B0BB3EF5225E795F008DA580 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + B0BB3F0A225EA511008DA580 /* TestCertificates.bundle in Resources */, ); - buildRules = ( + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 0FEFD5FC6B323AC95549AE4A /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( ); - dependencies = ( - 5EB2A2FC2109284500EB4B69 /* PBXTargetDependency */, + inputFileListPaths = ( ); - name = InteropTestsMultipleChannels; - productName = InteropTestsMultipleChannels; - productReference = 5EB2A2F52109284500EB4B69 /* InteropTestsMultipleChannels.xctest */; - productType = "com.apple.product-type.bundle.unit-test"; - }; - 5EC5E420208177CC000EF4AD /* InteropTestsRemoteCFStream */ = { - isa = PBXNativeTarget; - buildConfigurationList = 5EC5E42A208177CD000EF4AD /* Build configuration list for PBXNativeTarget "InteropTestsRemoteCFStream" */; - buildPhases = ( - 483CDBBAEAEFCB530ADDDDD5 /* [CP] Check Pods Manifest.lock */, - 5EC5E41D208177CC000EF4AD /* Sources */, - 5EC5E41E208177CC000EF4AD /* Frameworks */, - 5EC5E41F208177CC000EF4AD /* Resources */, - 95FBC48B743503845678584F /* [CP] Copy Pods Resources */, + inputPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-InteropTests/Pods-InteropTests-frameworks.sh", + "${PODS_ROOT}/CronetFramework/Cronet.framework", ); - buildRules = ( + name = "[CP] Embed Pods Frameworks"; + outputFileListPaths = ( ); - dependencies = ( + outputPaths = ( + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Cronet.framework", ); - name = InteropTestsRemoteCFStream; - productName = InteropTestsRemoteCFStream; - productReference = 5EC5E421208177CC000EF4AD /* InteropTestsRemoteCFStream.xctest */; - productType = "com.apple.product-type.bundle.unit-test"; + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-InteropTests/Pods-InteropTests-frameworks.sh\"\n"; + showEnvVarsInLog = 0; }; - 5EC5E4302081856B000EF4AD /* InteropTestsLocalCleartextCFStream */ = { - isa = PBXNativeTarget; - buildConfigurationList = 5EC5E4362081856C000EF4AD /* Build configuration list for PBXNativeTarget "InteropTestsLocalCleartextCFStream" */; - buildPhases = ( - 252A376345E38FD452A89C3D /* [CP] Check Pods Manifest.lock */, - 5EC5E42D2081856B000EF4AD /* Sources */, - 5EC5E42E2081856B000EF4AD /* Frameworks */, - 5EC5E42F2081856B000EF4AD /* Resources */, - A023FB55205A7EA37D413549 /* [CP] Copy Pods Resources */, + 292EA42A76AC7933A37235FD /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( ); - buildRules = ( + inputFileListPaths = ( ); - dependencies = ( + inputPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-CronetTests/Pods-CronetTests-frameworks.sh", + "${PODS_ROOT}/CronetFramework/Cronet.framework", ); - name = InteropTestsLocalCleartextCFStream; - productName = InteropTestsLocalCleartextCFStream; - productReference = 5EC5E4312081856B000EF4AD /* InteropTestsLocalCleartextCFStream.xctest */; - productType = "com.apple.product-type.bundle.unit-test"; - }; - 5EC5E441208185CE000EF4AD /* InteropTestsLocalSSLCFStream */ = { - isa = PBXNativeTarget; - buildConfigurationList = 5EC5E447208185CE000EF4AD /* Build configuration list for PBXNativeTarget "InteropTestsLocalSSLCFStream" */; - buildPhases = ( - F3D5B2CDA172580341682830 /* [CP] Check Pods Manifest.lock */, - 5EC5E43E208185CE000EF4AD /* Sources */, - 5EC5E43F208185CE000EF4AD /* Frameworks */, - 5EC5E440208185CE000EF4AD /* Resources */, - 4EB2FFF40BB00AD0C545D7EF /* [CP] Copy Pods Resources */, - ); - buildRules = ( + name = "[CP] Embed Pods Frameworks"; + outputFileListPaths = ( ); - dependencies = ( + outputPaths = ( + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Cronet.framework", ); - name = InteropTestsLocalSSLCFStream; - productName = InteropTestsLocalSSLCFStream; - productReference = 5EC5E442208185CE000EF4AD /* InteropTestsLocalSSLCFStream.xctest */; - productType = "com.apple.product-type.bundle.unit-test"; + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-CronetTests/Pods-CronetTests-frameworks.sh\"\n"; + showEnvVarsInLog = 0; }; - 5EE84BF01D4717E40050C6CC /* InteropTestsRemoteWithCronet */ = { - isa = PBXNativeTarget; - buildConfigurationList = 5EE84BFB1D4717E40050C6CC /* Build configuration list for PBXNativeTarget "InteropTestsRemoteWithCronet" */; - buildPhases = ( - C0F7B1FF6F88CC5FBF362F4C /* [CP] Check Pods Manifest.lock */, - 5EE84BED1D4717E40050C6CC /* Sources */, - 5EE84BEE1D4717E40050C6CC /* Frameworks */, - 5EE84BEF1D4717E40050C6CC /* Resources */, - 31F8D1C407195CBF0C02929B /* [CP] Embed Pods Frameworks */, - DB4D0E73C229F2FF3B364AB3 /* [CP] Copy Pods Resources */, - ); - buildRules = ( + 30AFD6F6FC40B9923632A866 /* [CP] Copy Pods Resources */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( ); - dependencies = ( - 5EE84BF81D4717E40050C6CC /* PBXTargetDependency */, + inputFileListPaths = ( ); - name = InteropTestsRemoteWithCronet; - productName = InteropTestsRemoteWithCronet; - productReference = 5EE84BF11D4717E40050C6CC /* InteropTestsRemoteWithCronet.xctest */; - productType = "com.apple.product-type.bundle.unit-test"; - }; - 63423F431B150A5F006CF63C /* AllTests */ = { - isa = PBXNativeTarget; - buildConfigurationList = 63423F4D1B150A5F006CF63C /* Build configuration list for PBXNativeTarget "AllTests" */; - buildPhases = ( - 914ADDD7106BA9BB8A7E569F /* [CP] Check Pods Manifest.lock */, - 63423F401B150A5F006CF63C /* Sources */, - 63423F411B150A5F006CF63C /* Frameworks */, - 63423F421B150A5F006CF63C /* Resources */, - A441F71824DCB9D0CA297748 /* [CP] Copy Pods Resources */, + inputPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-CronetTests/Pods-CronetTests-resources.sh", + "${PODS_CONFIGURATION_BUILD_DIR}/gRPC-iOS/gRPCCertificates.bundle", ); - buildRules = ( + name = "[CP] Copy Pods Resources"; + outputFileListPaths = ( ); - dependencies = ( - 63423F4C1B150A5F006CF63C /* PBXTargetDependency */, + outputPaths = ( + "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/gRPCCertificates.bundle", ); - name = AllTests; - productName = AllTests; - productReference = 63423F441B150A5F006CF63C /* AllTests.xctest */; - productType = "com.apple.product-type.bundle.unit-test"; + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-CronetTests/Pods-CronetTests-resources.sh\"\n"; + showEnvVarsInLog = 0; }; - 635697C61B14FC11007A7283 /* Tests */ = { - isa = PBXNativeTarget; - buildConfigurationList = 635697DB1B14FC11007A7283 /* Build configuration list for PBXNativeTarget "Tests" */; - buildPhases = ( - 635697C31B14FC11007A7283 /* Sources */, - 635697C41B14FC11007A7283 /* Frameworks */, - 635697C51B14FC11007A7283 /* CopyFiles */, - ); - buildRules = ( + 40BCDB09674DF988C708D22B /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( ); - dependencies = ( + inputFileListPaths = ( ); - name = Tests; - productName = Tests; - productReference = 635697C71B14FC11007A7283 /* libTests.a */; - productType = "com.apple.product-type.library.static"; - }; - 63DC84121BE15179000708E8 /* RxLibraryUnitTests */ = { - isa = PBXNativeTarget; - buildConfigurationList = 63DC841B1BE15179000708E8 /* Build configuration list for PBXNativeTarget "RxLibraryUnitTests" */; - buildPhases = ( - B2986CEEE8CDD4901C97598B /* [CP] Check Pods Manifest.lock */, - 63DC840F1BE15179000708E8 /* Sources */, - 63DC84101BE15179000708E8 /* Frameworks */, - 63DC84111BE15179000708E8 /* Resources */, - C977426A8727267BBAC7D48E /* [CP] Copy Pods Resources */, + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", ); - buildRules = ( + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( ); - dependencies = ( - 63DC841A1BE15179000708E8 /* PBXTargetDependency */, + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-InteropTests-checkManifestLockResult.txt", ); - name = RxLibraryUnitTests; - productName = RxLibraryUnitTests; - productReference = 63DC84131BE15179000708E8 /* RxLibraryUnitTests.xctest */; - productType = "com.apple.product-type.bundle.unit-test"; + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; }; - 63DC84221BE15267000708E8 /* InteropTestsRemote */ = { - isa = PBXNativeTarget; - buildConfigurationList = 63DC842B1BE15267000708E8 /* Build configuration list for PBXNativeTarget "InteropTestsRemote" */; - buildPhases = ( - 4C406327D3907A5E5FBA8AC9 /* [CP] Check Pods Manifest.lock */, - 63DC841F1BE15267000708E8 /* Sources */, - 63DC84201BE15267000708E8 /* Frameworks */, - 63DC84211BE15267000708E8 /* Resources */, - C2E09DC4BD239F71160F0CC1 /* [CP] Copy Pods Resources */, - ); - buildRules = ( + 452FDC3918FEC23ECAFD31EC /* [CP] Copy Pods Resources */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( ); - dependencies = ( - 63DC842A1BE15267000708E8 /* PBXTargetDependency */, + inputFileListPaths = ( ); - name = InteropTestsRemote; - productName = InteropTests; - productReference = 63DC84231BE15267000708E8 /* InteropTestsRemote.xctest */; - productType = "com.apple.product-type.bundle.unit-test"; - }; - 63DC84331BE15294000708E8 /* InteropTestsLocalSSL */ = { - isa = PBXNativeTarget; - buildConfigurationList = 63DC843C1BE15294000708E8 /* Build configuration list for PBXNativeTarget "InteropTestsLocalSSL" */; - buildPhases = ( - 5C20DCCB71C3991E6FE78C22 /* [CP] Check Pods Manifest.lock */, - 63DC84301BE15294000708E8 /* Sources */, - 63DC84311BE15294000708E8 /* Frameworks */, - 63DC84321BE15294000708E8 /* Resources */, - 693DD0B453431D64EA24FD66 /* [CP] Copy Pods Resources */, + inputPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-MacTests/Pods-MacTests-resources.sh", + "${PODS_CONFIGURATION_BUILD_DIR}/gRPC-macOS/gRPCCertificates.bundle", ); - buildRules = ( + name = "[CP] Copy Pods Resources"; + outputFileListPaths = ( ); - dependencies = ( - 63DC843B1BE15294000708E8 /* PBXTargetDependency */, + outputPaths = ( + "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/gRPCCertificates.bundle", ); - name = InteropTestsLocalSSL; - productName = InteropTestsLocalSSL; - productReference = 63DC84341BE15294000708E8 /* InteropTestsLocalSSL.xctest */; - productType = "com.apple.product-type.bundle.unit-test"; + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-MacTests/Pods-MacTests-resources.sh\"\n"; + showEnvVarsInLog = 0; }; - 63DC84421BE152B5000708E8 /* InteropTestsLocalCleartext */ = { - isa = PBXNativeTarget; - buildConfigurationList = 63DC844B1BE152B5000708E8 /* Build configuration list for PBXNativeTarget "InteropTestsLocalCleartext" */; - buildPhases = ( - 7418AC7B3844B29E48D24FC7 /* [CP] Check Pods Manifest.lock */, - 63DC843F1BE152B5000708E8 /* Sources */, - 63DC84401BE152B5000708E8 /* Frameworks */, - 63DC84411BE152B5000708E8 /* Resources */, - 8AD3130D3C58A0FB32FF2A36 /* [CP] Copy Pods Resources */, + 9AD0B5E94F2AA5962EA6AA36 /* [CP] Copy Pods Resources */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( ); - buildRules = ( + inputPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-UnitTests/Pods-UnitTests-resources.sh", + "${PODS_CONFIGURATION_BUILD_DIR}/gRPC-iOS/gRPCCertificates.bundle", ); - dependencies = ( - 63DC844A1BE152B5000708E8 /* PBXTargetDependency */, + name = "[CP] Copy Pods Resources"; + outputPaths = ( + "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/gRPCCertificates.bundle", ); - name = InteropTestsLocalCleartext; - productName = InteropTestsLocalCleartext; - productReference = 63DC84431BE152B5000708E8 /* InteropTestsLocalCleartext.xctest */; - productType = "com.apple.product-type.bundle.unit-test"; + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-UnitTests/Pods-UnitTests-resources.sh\"\n"; + showEnvVarsInLog = 0; }; - B0BB3EF6225E795F008DA580 /* MacTests */ = { - isa = PBXNativeTarget; - buildConfigurationList = B0BB3EFC225E795F008DA580 /* Build configuration list for PBXNativeTarget "MacTests" */; - buildPhases = ( - E5B20F69559C6AE299DFEA7C /* [CP] Check Pods Manifest.lock */, - B0BB3EF3225E795F008DA580 /* Sources */, - B0BB3EF4225E795F008DA580 /* Frameworks */, - B0BB3EF5225E795F008DA580 /* Resources */, - 452FDC3918FEC23ECAFD31EC /* [CP] Copy Pods Resources */, - ); - buildRules = ( + CCAEC0F23E05489651A07D53 /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( ); - dependencies = ( + inputFileListPaths = ( ); - name = MacTests; - productName = MacTests; - productReference = B0BB3EF7225E795F008DA580 /* MacTests.xctest */; - productType = "com.apple.product-type.bundle.unit-test"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 635697BF1B14FC11007A7283 /* Project object */ = { - isa = PBXProject; - attributes = { - LastUpgradeCheck = 0630; - ORGANIZATIONNAME = gRPC; - TargetAttributes = { - 5E0282E5215AA697007AC99D = { - CreatedOnToolsVersion = 9.2; - ProvisioningStyle = Automatic; - }; - 5E3B95A121CAC6C500C0A151 = { - CreatedOnToolsVersion = 10.0; - ProvisioningStyle = Automatic; - }; - 5E7D71B1210B9EC8001EA6BA = { - CreatedOnToolsVersion = 9.3; - ProvisioningStyle = Automatic; - }; - 5E8A5DA31D3840B4000F8BC4 = { - CreatedOnToolsVersion = 7.3.1; - }; - 5EAD6D231E27047400002378 = { - CreatedOnToolsVersion = 7.3.1; - }; - 5EB2A2E32107DED300EB4B69 = { - CreatedOnToolsVersion = 9.3; - ProvisioningStyle = Automatic; - }; - 5EB2A2F42109284500EB4B69 = { - CreatedOnToolsVersion = 9.3; - ProvisioningStyle = Automatic; - }; - 5EC5E420208177CC000EF4AD = { - CreatedOnToolsVersion = 9.2; - ProvisioningStyle = Automatic; - }; - 5EC5E4302081856B000EF4AD = { - CreatedOnToolsVersion = 9.2; - ProvisioningStyle = Automatic; - }; - 5EC5E441208185CE000EF4AD = { - CreatedOnToolsVersion = 9.2; - ProvisioningStyle = Automatic; - }; - 5EE84BF01D4717E40050C6CC = { - CreatedOnToolsVersion = 7.3.1; - }; - 63423F431B150A5F006CF63C = { - CreatedOnToolsVersion = 6.3.1; - }; - 635697C61B14FC11007A7283 = { - CreatedOnToolsVersion = 6.3.1; - }; - 63DC84121BE15179000708E8 = { - CreatedOnToolsVersion = 7.0.1; - }; - 63DC84221BE15267000708E8 = { - CreatedOnToolsVersion = 7.0.1; - }; - 63DC84331BE15294000708E8 = { - CreatedOnToolsVersion = 7.0.1; - }; - 63DC84421BE152B5000708E8 = { - CreatedOnToolsVersion = 7.0.1; - }; - B0BB3EF6225E795F008DA580 = { - CreatedOnToolsVersion = 10.1; - ProvisioningStyle = Automatic; - }; - }; - }; - buildConfigurationList = 635697C21B14FC11007A7283 /* Build configuration list for PBXProject "Tests" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; - hasScannedForEncodings = 0; - knownRegions = ( - en, + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", ); - mainGroup = 635697BE1B14FC11007A7283; - productRefGroup = 635697C81B14FC11007A7283 /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 635697C61B14FC11007A7283 /* Tests */, - 63423F431B150A5F006CF63C /* AllTests */, - 63DC84121BE15179000708E8 /* RxLibraryUnitTests */, - 63DC84221BE15267000708E8 /* InteropTestsRemote */, - 63DC84331BE15294000708E8 /* InteropTestsLocalSSL */, - 63DC84421BE152B5000708E8 /* InteropTestsLocalCleartext */, - 5E8A5DA31D3840B4000F8BC4 /* CoreCronetEnd2EndTests */, - 5EE84BF01D4717E40050C6CC /* InteropTestsRemoteWithCronet */, - 5EAD6D231E27047400002378 /* CronetUnitTests */, - 5EC5E420208177CC000EF4AD /* InteropTestsRemoteCFStream */, - 5EC5E4302081856B000EF4AD /* InteropTestsLocalCleartextCFStream */, - 5EC5E441208185CE000EF4AD /* InteropTestsLocalSSLCFStream */, - 5EB2A2E32107DED300EB4B69 /* ChannelTests */, - 5EB2A2F42109284500EB4B69 /* InteropTestsMultipleChannels */, - 5E7D71B1210B9EC8001EA6BA /* InteropTestsCallOptions */, - 5E0282E5215AA697007AC99D /* UnitTests */, - 5E3B95A121CAC6C500C0A151 /* APIv2Tests */, - B0BB3EF6225E795F008DA580 /* MacTests */, + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 5E0282E4215AA697007AC99D /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-CronetTests-checkManifestLockResult.txt", ); runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; }; - 5E3B95A021CAC6C500C0A151 /* Resources */ = { - isa = PBXResourcesBuildPhase; + D11CB94CF56A1E53760D29D8 /* [CP] Copy Pods Resources */ = { + isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); - runOnlyForDeploymentPostprocessing = 0; - }; - 5E7D71B0210B9EC8001EA6BA /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( + inputFileListPaths = ( ); - runOnlyForDeploymentPostprocessing = 0; - }; - 5E8A5DA21D3840B4000F8BC4 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( + inputPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-InteropTests/Pods-InteropTests-resources.sh", + "${PODS_CONFIGURATION_BUILD_DIR}/gRPC-iOS/gRPCCertificates.bundle", ); - runOnlyForDeploymentPostprocessing = 0; - }; - 5EAD6D221E27047400002378 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( + name = "[CP] Copy Pods Resources"; + outputFileListPaths = ( + ); + outputPaths = ( + "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/gRPCCertificates.bundle", ); runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-InteropTests/Pods-InteropTests-resources.sh\"\n"; + showEnvVarsInLog = 0; }; - 5EB2A2E22107DED300EB4B69 /* Resources */ = { - isa = PBXResourcesBuildPhase; + E5B20F69559C6AE299DFEA7C /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); + inputFileListPaths = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-MacTests-checkManifestLockResult.txt", + ); runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; }; - 5EB2A2F32109284500EB4B69 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 5E7D71AD210954A8001EA6BA /* TestCertificates.bundle in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 5EC5E41F208177CC000EF4AD /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 5EC5E42F2081856B000EF4AD /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 5EC5E440208185CE000EF4AD /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 5EC5E44E20818948000EF4AD /* TestCertificates.bundle in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 5EE84BEF1D4717E40050C6CC /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 63423F421B150A5F006CF63C /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 63E240D01B6C63DC005F3B0E /* TestCertificates.bundle in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 63DC84111BE15179000708E8 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 63DC84211BE15267000708E8 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 63DC84321BE15294000708E8 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 6379CC531BE17709001BC0A1 /* TestCertificates.bundle in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 63DC84411BE152B5000708E8 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - B0BB3EF5225E795F008DA580 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - B0BB3F0A225EA511008DA580 /* TestCertificates.bundle in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXShellScriptBuildPhase section */ - 021B3B1F545989843EBC9A4B /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-ChannelTests-checkManifestLockResult.txt", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; - showEnvVarsInLog = 0; - }; - 0617B5294978A95BEBBFF733 /* [CP] Copy Pods Resources */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - "${SRCROOT}/Pods/Target Support Files/Pods-InteropTestsMultipleChannels/Pods-InteropTestsMultipleChannels-resources.sh", - "${PODS_CONFIGURATION_BUILD_DIR}/gRPC-iOS/gRPCCertificates.bundle", - ); - name = "[CP] Copy Pods Resources"; - outputPaths = ( - "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/gRPCCertificates.bundle", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-InteropTestsMultipleChannels/Pods-InteropTestsMultipleChannels-resources.sh\"\n"; - showEnvVarsInLog = 0; - }; - 1EAF0CBDBFAB18D4DA64535D /* [CP] Copy Pods Resources */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - "${SRCROOT}/Pods/Target Support Files/Pods-ChannelTests/Pods-ChannelTests-resources.sh", - "${PODS_CONFIGURATION_BUILD_DIR}/gRPC-iOS/gRPCCertificates.bundle", - ); - name = "[CP] Copy Pods Resources"; - outputPaths = ( - "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/gRPCCertificates.bundle", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-ChannelTests/Pods-ChannelTests-resources.sh\"\n"; - showEnvVarsInLog = 0; - }; - 252A376345E38FD452A89C3D /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-InteropTestsLocalCleartextCFStream-checkManifestLockResult.txt", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; - showEnvVarsInLog = 0; - }; - 2865C6386D677998F861E183 /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-InteropTestsCallOptions-checkManifestLockResult.txt", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; - showEnvVarsInLog = 0; - }; - 31F8D1C407195CBF0C02929B /* [CP] Embed Pods Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - "${SRCROOT}/Pods/Target Support Files/Pods-InteropTestsRemoteWithCronet/Pods-InteropTestsRemoteWithCronet-frameworks.sh", - "${PODS_ROOT}/CronetFramework/Cronet.framework", - ); - name = "[CP] Embed Pods Frameworks"; - outputPaths = ( - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Cronet.framework", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-InteropTestsRemoteWithCronet/Pods-InteropTestsRemoteWithCronet-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; - 452FDC3918FEC23ECAFD31EC /* [CP] Copy Pods Resources */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - ); - inputPaths = ( - "${SRCROOT}/Pods/Target Support Files/Pods-MacTests/Pods-MacTests-resources.sh", - "${PODS_CONFIGURATION_BUILD_DIR}/gRPC-macOS/gRPCCertificates.bundle", - ); - name = "[CP] Copy Pods Resources"; - outputFileListPaths = ( - ); - outputPaths = ( - "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/gRPCCertificates.bundle", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-MacTests/Pods-MacTests-resources.sh\"\n"; - showEnvVarsInLog = 0; - }; - 483CDBBAEAEFCB530ADDDDD5 /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-InteropTestsRemoteCFStream-checkManifestLockResult.txt", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; - showEnvVarsInLog = 0; - }; - 4C406327D3907A5E5FBA8AC9 /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-InteropTestsRemote-checkManifestLockResult.txt", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; - showEnvVarsInLog = 0; - }; - 4EB2FFF40BB00AD0C545D7EF /* [CP] Copy Pods Resources */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - "${SRCROOT}/Pods/Target Support Files/Pods-InteropTestsLocalSSLCFStream/Pods-InteropTestsLocalSSLCFStream-resources.sh", - "${PODS_CONFIGURATION_BUILD_DIR}/gRPC-iOS/gRPCCertificates.bundle", - ); - name = "[CP] Copy Pods Resources"; - outputPaths = ( - "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/gRPCCertificates.bundle", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-InteropTestsLocalSSLCFStream/Pods-InteropTestsLocalSSLCFStream-resources.sh\"\n"; - showEnvVarsInLog = 0; - }; - 5C20DCCB71C3991E6FE78C22 /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; + F07941C0BAF6A7C67AA60C48 /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); @@ -1531,1849 +785,78 @@ ); name = "[CP] Check Pods Manifest.lock"; outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-InteropTestsLocalSSL-checkManifestLockResult.txt", + "$(DERIVED_FILE_DIR)/Pods-UnitTests-checkManifestLockResult.txt", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; showEnvVarsInLog = 0; }; - 693DD0B453431D64EA24FD66 /* [CP] Copy Pods Resources */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - "${SRCROOT}/Pods/Target Support Files/Pods-InteropTestsLocalSSL/Pods-InteropTestsLocalSSL-resources.sh", - "${PODS_CONFIGURATION_BUILD_DIR}/gRPC-iOS/gRPCCertificates.bundle", - ); - name = "[CP] Copy Pods Resources"; - outputPaths = ( - "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/gRPCCertificates.bundle", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-InteropTestsLocalSSL/Pods-InteropTestsLocalSSL-resources.sh\"\n"; - showEnvVarsInLog = 0; - }; - 6BA6D00B1816306453BF82D4 /* [CP] Copy Pods Resources */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - "${SRCROOT}/Pods/Target Support Files/Pods-InteropTestsCallOptions/Pods-InteropTestsCallOptions-resources.sh", - "${PODS_CONFIGURATION_BUILD_DIR}/gRPC-iOS/gRPCCertificates.bundle", - ); - name = "[CP] Copy Pods Resources"; - outputPaths = ( - "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/gRPCCertificates.bundle", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-InteropTestsCallOptions/Pods-InteropTestsCallOptions-resources.sh\"\n"; - showEnvVarsInLog = 0; - }; - 7418AC7B3844B29E48D24FC7 /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-InteropTestsLocalCleartext-checkManifestLockResult.txt", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; - showEnvVarsInLog = 0; - }; - 80E2DDD2EC04A4009F45E933 /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-CronetUnitTests-checkManifestLockResult.txt", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; - showEnvVarsInLog = 0; - }; - 8AD3130D3C58A0FB32FF2A36 /* [CP] Copy Pods Resources */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - "${SRCROOT}/Pods/Target Support Files/Pods-InteropTestsLocalCleartext/Pods-InteropTestsLocalCleartext-resources.sh", - "${PODS_CONFIGURATION_BUILD_DIR}/gRPC-iOS/gRPCCertificates.bundle", - ); - name = "[CP] Copy Pods Resources"; - outputPaths = ( - "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/gRPCCertificates.bundle", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-InteropTestsLocalCleartext/Pods-InteropTestsLocalCleartext-resources.sh\"\n"; - showEnvVarsInLog = 0; - }; - 8C1ED025E07C4D457C355336 /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-InteropTestsMultipleChannels-checkManifestLockResult.txt", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; - showEnvVarsInLog = 0; - }; - 8D685CB612835DB3F7A6F14A /* [CP] Embed Pods Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - "${SRCROOT}/Pods/Target Support Files/Pods-InteropTestsMultipleChannels/Pods-InteropTestsMultipleChannels-frameworks.sh", - "${PODS_ROOT}/CronetFramework/Cronet.framework", - ); - name = "[CP] Embed Pods Frameworks"; - outputPaths = ( - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Cronet.framework", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-InteropTestsMultipleChannels/Pods-InteropTestsMultipleChannels-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; - 914ADDD7106BA9BB8A7E569F /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-AllTests-checkManifestLockResult.txt", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; - showEnvVarsInLog = 0; - }; - 95FBC48B743503845678584F /* [CP] Copy Pods Resources */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - "${SRCROOT}/Pods/Target Support Files/Pods-InteropTestsRemoteCFStream/Pods-InteropTestsRemoteCFStream-resources.sh", - "${PODS_CONFIGURATION_BUILD_DIR}/gRPC-iOS/gRPCCertificates.bundle", - ); - name = "[CP] Copy Pods Resources"; - outputPaths = ( - "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/gRPCCertificates.bundle", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-InteropTestsRemoteCFStream/Pods-InteropTestsRemoteCFStream-resources.sh\"\n"; - showEnvVarsInLog = 0; - }; - 9AD0B5E94F2AA5962EA6AA36 /* [CP] Copy Pods Resources */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - "${SRCROOT}/Pods/Target Support Files/Pods-UnitTests/Pods-UnitTests-resources.sh", - "${PODS_CONFIGURATION_BUILD_DIR}/gRPC-iOS/gRPCCertificates.bundle", - ); - name = "[CP] Copy Pods Resources"; - outputPaths = ( - "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/gRPCCertificates.bundle", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-UnitTests/Pods-UnitTests-resources.sh\"\n"; - showEnvVarsInLog = 0; - }; - A023FB55205A7EA37D413549 /* [CP] Copy Pods Resources */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - "${SRCROOT}/Pods/Target Support Files/Pods-InteropTestsLocalCleartextCFStream/Pods-InteropTestsLocalCleartextCFStream-resources.sh", - "${PODS_CONFIGURATION_BUILD_DIR}/gRPC-iOS/gRPCCertificates.bundle", - ); - name = "[CP] Copy Pods Resources"; - outputPaths = ( - "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/gRPCCertificates.bundle", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-InteropTestsLocalCleartextCFStream/Pods-InteropTestsLocalCleartextCFStream-resources.sh\"\n"; - showEnvVarsInLog = 0; - }; - A441F71824DCB9D0CA297748 /* [CP] Copy Pods Resources */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - "${SRCROOT}/Pods/Target Support Files/Pods-AllTests/Pods-AllTests-resources.sh", - "${PODS_CONFIGURATION_BUILD_DIR}/gRPC-iOS/gRPCCertificates.bundle", - ); - name = "[CP] Copy Pods Resources"; - outputPaths = ( - "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/gRPCCertificates.bundle", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-AllTests/Pods-AllTests-resources.sh\"\n"; - showEnvVarsInLog = 0; - }; - A686B9967BB4CB81B1CBF8F8 /* [CP] Embed Pods Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - "${SRCROOT}/Pods/Target Support Files/Pods-CronetUnitTests/Pods-CronetUnitTests-frameworks.sh", - "${PODS_ROOT}/CronetFramework/Cronet.framework", - ); - name = "[CP] Embed Pods Frameworks"; - outputPaths = ( - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Cronet.framework", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-CronetUnitTests/Pods-CronetUnitTests-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; - B2986CEEE8CDD4901C97598B /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-RxLibraryUnitTests-checkManifestLockResult.txt", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; - showEnvVarsInLog = 0; - }; - C0F7B1FF6F88CC5FBF362F4C /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-InteropTestsRemoteWithCronet-checkManifestLockResult.txt", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; - showEnvVarsInLog = 0; - }; - C17B826BBD02FDD4A5F355AF /* [CP] Copy Pods Resources */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - ); - inputPaths = ( - "${SRCROOT}/Pods/Target Support Files/Pods-APIv2Tests/Pods-APIv2Tests-resources.sh", - "${PODS_CONFIGURATION_BUILD_DIR}/gRPC-iOS/gRPCCertificates.bundle", - ); - name = "[CP] Copy Pods Resources"; - outputFileListPaths = ( - ); - outputPaths = ( - "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/gRPCCertificates.bundle", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-APIv2Tests/Pods-APIv2Tests-resources.sh\"\n"; - showEnvVarsInLog = 0; - }; - C2E09DC4BD239F71160F0CC1 /* [CP] Copy Pods Resources */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - "${SRCROOT}/Pods/Target Support Files/Pods-InteropTestsRemote/Pods-InteropTestsRemote-resources.sh", - "${PODS_CONFIGURATION_BUILD_DIR}/gRPC-iOS/gRPCCertificates.bundle", - ); - name = "[CP] Copy Pods Resources"; - outputPaths = ( - "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/gRPCCertificates.bundle", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-InteropTestsRemote/Pods-InteropTestsRemote-resources.sh\"\n"; - showEnvVarsInLog = 0; - }; - C977426A8727267BBAC7D48E /* [CP] Copy Pods Resources */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - "${SRCROOT}/Pods/Target Support Files/Pods-RxLibraryUnitTests/Pods-RxLibraryUnitTests-resources.sh", - "${PODS_CONFIGURATION_BUILD_DIR}/gRPC-iOS/gRPCCertificates.bundle", - ); - name = "[CP] Copy Pods Resources"; - outputPaths = ( - "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/gRPCCertificates.bundle", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-RxLibraryUnitTests/Pods-RxLibraryUnitTests-resources.sh\"\n"; - showEnvVarsInLog = 0; - }; - DB4D0E73C229F2FF3B364AB3 /* [CP] Copy Pods Resources */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - "${SRCROOT}/Pods/Target Support Files/Pods-InteropTestsRemoteWithCronet/Pods-InteropTestsRemoteWithCronet-resources.sh", - "${PODS_CONFIGURATION_BUILD_DIR}/gRPC-iOS/gRPCCertificates.bundle", - ); - name = "[CP] Copy Pods Resources"; - outputPaths = ( - "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/gRPCCertificates.bundle", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-InteropTestsRemoteWithCronet/Pods-InteropTestsRemoteWithCronet-resources.sh\"\n"; - showEnvVarsInLog = 0; - }; - E5B20F69559C6AE299DFEA7C /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; - outputFileListPaths = ( - ); - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-MacTests-checkManifestLockResult.txt", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; - showEnvVarsInLog = 0; - }; - E63468C760D0724F18861822 /* [CP] Embed Pods Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - "${SRCROOT}/Pods/Target Support Files/Pods-CoreCronetEnd2EndTests/Pods-CoreCronetEnd2EndTests-frameworks.sh", - "${PODS_ROOT}/CronetFramework/Cronet.framework", - ); - name = "[CP] Embed Pods Frameworks"; - outputPaths = ( - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Cronet.framework", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-CoreCronetEnd2EndTests/Pods-CoreCronetEnd2EndTests-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; - EDDD3FA856BCA3443ED36D1E /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; - outputFileListPaths = ( - ); - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-APIv2Tests-checkManifestLockResult.txt", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; - showEnvVarsInLog = 0; - }; - F07941C0BAF6A7C67AA60C48 /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-UnitTests-checkManifestLockResult.txt", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; - showEnvVarsInLog = 0; - }; - F3D5B2CDA172580341682830 /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-InteropTestsLocalSSLCFStream-checkManifestLockResult.txt", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; - showEnvVarsInLog = 0; - }; - F58F17E425446B15028B9F74 /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-CoreCronetEnd2EndTests-checkManifestLockResult.txt", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; - showEnvVarsInLog = 0; - }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 5E0282E2215AA697007AC99D /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 5E0282E9215AA697007AC99D /* UnitTests.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 5E3B959E21CAC6C500C0A151 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 5E3B95A521CAC6C500C0A151 /* APIv2Tests.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 5E7D71AE210B9EC8001EA6BA /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 5E7D71B5210B9EC9001EA6BA /* InteropTestsCallOptions.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 5E8A5DA01D3840B4000F8BC4 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 5E8A5DA71D3840B4000F8BC4 /* CoreCronetEnd2EndTests.mm in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 5EAD6D201E27047400002378 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 5EAD6D271E27047400002378 /* CronetUnitTests.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 5EB2A2E02107DED300EB4B69 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 5EB2A2E72107DED300EB4B69 /* ChannelTests.m in Sources */, - 5EB5C3AA21656CEA00ADC300 /* ChannelPoolTest.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 5EB2A2F12109284500EB4B69 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 5EB2A2F82109284500EB4B69 /* InteropTestsMultipleChannels.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 5EC5E41D208177CC000EF4AD /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 5EC5E42B2081782C000EF4AD /* InteropTestsRemote.m in Sources */, - 5EC5E42C20817832000EF4AD /* InteropTests.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 5EC5E42D2081856B000EF4AD /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 5EC5E43B208185A7000EF4AD /* InteropTestsLocalCleartext.m in Sources */, - 5EC5E43D208185B0000EF4AD /* GRPCClientTests.m in Sources */, - 5EC5E43C208185AD000EF4AD /* InteropTests.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 5EC5E43E208185CE000EF4AD /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 5EC5E44D208185F0000EF4AD /* InteropTestsLocalSSL.m in Sources */, - 5EC5E44C208185EC000EF4AD /* InteropTests.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 5EE84BED1D4717E40050C6CC /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 5EE84BFE1D471D400050C6CC /* InteropTests.m in Sources */, - 5EE84BF41D4717E40050C6CC /* InteropTestsRemoteWithCronet.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 63423F401B150A5F006CF63C /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 63715F561B780C020029CB0B /* InteropTestsLocalCleartext.m in Sources */, - 6379CC511BE1683B001BC0A1 /* InteropTestsRemote.m in Sources */, - 63E240CE1B6C4E2B005F3B0E /* InteropTestsLocalSSL.m in Sources */, - 6312AE4E1B1BF49B00341DEE /* GRPCClientTests.m in Sources */, - 635ED2EC1B1A3BC400FDE5C3 /* InteropTests.m in Sources */, - 63DC842E1BE15278000708E8 /* RxLibraryUnitTests.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 635697C31B14FC11007A7283 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 635697CD1B14FC11007A7283 /* Tests.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 63DC840F1BE15179000708E8 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 63DC841E1BE15180000708E8 /* RxLibraryUnitTests.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 63DC841F1BE15267000708E8 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 63DC842F1BE1527D000708E8 /* InteropTests.m in Sources */, - 6379CC501BE16703001BC0A1 /* InteropTestsRemote.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 63DC84301BE15294000708E8 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 63DC844F1BE15353000708E8 /* InteropTestsLocalSSL.m in Sources */, - 6379CC4D1BE1662A001BC0A1 /* InteropTests.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 63DC843F1BE152B5000708E8 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 63DC84501BE153AA000708E8 /* GRPCClientTests.m in Sources */, - 63DC844E1BE15350000708E8 /* InteropTestsLocalCleartext.m in Sources */, - 6379CC4E1BE1662B001BC0A1 /* InteropTests.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - B0BB3EF3225E795F008DA580 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - B0BB3F07225E7AB5008DA580 /* APIv2Tests.m in Sources */, - B0BB3F08225E7ABA008DA580 /* UnitTests.m in Sources */, - B071230B22669EED004B64A1 /* StressTests.m in Sources */, - B0BB3F05225E7A9F008DA580 /* InteropTestsRemote.m in Sources */, - B0D39B9A2266F3CB00A4078D /* StressTestsSSL.m in Sources */, - B0BB3F03225E7A44008DA580 /* InteropTestsLocalCleartext.m in Sources */, - B0BB3F04225E7A8D008DA580 /* RxLibraryUnitTests.m in Sources */, - B0D39B9C2266FF9800A4078D /* StressTestsCleartext.m in Sources */, - B0BB3F0B225EB110008DA580 /* InteropTests.m in Sources */, - B0BB3F02225E7A3C008DA580 /* InteropTestsLocalSSL.m in Sources */, - B0BB3F06225E7AAD008DA580 /* GRPCClientTests.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - 5E0282ED215AA697007AC99D /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 635697C61B14FC11007A7283 /* Tests */; - targetProxy = 5E0282EC215AA697007AC99D /* PBXContainerItemProxy */; - }; - 5E7D71B9210B9EC9001EA6BA /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 635697C61B14FC11007A7283 /* Tests */; - targetProxy = 5E7D71B8210B9EC9001EA6BA /* PBXContainerItemProxy */; - }; - 5E8A5DAB1D3840B4000F8BC4 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 635697C61B14FC11007A7283 /* Tests */; - targetProxy = 5E8A5DAA1D3840B4000F8BC4 /* PBXContainerItemProxy */; - }; - 5EAD6D2B1E27047400002378 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 635697C61B14FC11007A7283 /* Tests */; - targetProxy = 5EAD6D2A1E27047400002378 /* PBXContainerItemProxy */; - }; - 5EB2A2EB2107DED300EB4B69 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 635697C61B14FC11007A7283 /* Tests */; - targetProxy = 5EB2A2EA2107DED300EB4B69 /* PBXContainerItemProxy */; - }; - 5EB2A2FC2109284500EB4B69 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 635697C61B14FC11007A7283 /* Tests */; - targetProxy = 5EB2A2FB2109284500EB4B69 /* PBXContainerItemProxy */; - }; - 5EE84BF81D4717E40050C6CC /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 635697C61B14FC11007A7283 /* Tests */; - targetProxy = 5EE84BF71D4717E40050C6CC /* PBXContainerItemProxy */; - }; - 63423F4C1B150A5F006CF63C /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 635697C61B14FC11007A7283 /* Tests */; - targetProxy = 63423F4B1B150A5F006CF63C /* PBXContainerItemProxy */; - }; - 63DC841A1BE15179000708E8 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 635697C61B14FC11007A7283 /* Tests */; - targetProxy = 63DC84191BE15179000708E8 /* PBXContainerItemProxy */; - }; - 63DC842A1BE15267000708E8 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 635697C61B14FC11007A7283 /* Tests */; - targetProxy = 63DC84291BE15267000708E8 /* PBXContainerItemProxy */; - }; - 63DC843B1BE15294000708E8 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 635697C61B14FC11007A7283 /* Tests */; - targetProxy = 63DC843A1BE15294000708E8 /* PBXContainerItemProxy */; - }; - 63DC844A1BE152B5000708E8 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 635697C61B14FC11007A7283 /* Tests */; - targetProxy = 63DC84491BE152B5000708E8 /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin XCBuildConfiguration section */ - 5E0282EE215AA697007AC99D /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = A2DCF2570BE515B62CB924CA /* Pods-UnitTests.debug.xcconfig */; - buildSettings = { - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CODE_SIGN_IDENTITY = "iPhone Developer"; - CODE_SIGN_STYLE = Automatic; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu11; - INFOPLIST_FILE = UnitTests/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 11.2; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = io.grpc.UnitTests; - PRODUCT_NAME = "$(TARGET_NAME)"; - TARGETED_DEVICE_FAMILY = "1,2"; - USER_HEADER_SEARCH_PATHS = "\"$(PODS_ROOT)/../../../..\""; - }; - name = Debug; - }; - 5E0282EF215AA697007AC99D /* Test */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 94D7A5FAA13480E9A5166D7A /* Pods-UnitTests.test.xcconfig */; - buildSettings = { - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CODE_SIGN_IDENTITY = "iPhone Developer"; - CODE_SIGN_STYLE = Automatic; - GCC_C_LANGUAGE_STANDARD = gnu11; - INFOPLIST_FILE = UnitTests/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 11.2; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = io.grpc.UnitTests; - PRODUCT_NAME = "$(TARGET_NAME)"; - TARGETED_DEVICE_FAMILY = "1,2"; - USER_HEADER_SEARCH_PATHS = "\"$(PODS_ROOT)/../../../..\""; - }; - name = Test; - }; - 5E0282F0215AA697007AC99D /* Cronet */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = E1E7660656D902104F728892 /* Pods-UnitTests.cronet.xcconfig */; - buildSettings = { - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CODE_SIGN_IDENTITY = "iPhone Developer"; - CODE_SIGN_STYLE = Automatic; - GCC_C_LANGUAGE_STANDARD = gnu11; - INFOPLIST_FILE = UnitTests/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 11.2; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = io.grpc.UnitTests; - PRODUCT_NAME = "$(TARGET_NAME)"; - TARGETED_DEVICE_FAMILY = "1,2"; - USER_HEADER_SEARCH_PATHS = "\"$(PODS_ROOT)/../../../..\""; - }; - name = Cronet; - }; - 5E0282F1215AA697007AC99D /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = EBFFEC04B514CB0D4922DC40 /* Pods-UnitTests.release.xcconfig */; - buildSettings = { - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CODE_SIGN_IDENTITY = "iPhone Developer"; - CODE_SIGN_STYLE = Automatic; - GCC_C_LANGUAGE_STANDARD = gnu11; - INFOPLIST_FILE = UnitTests/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 11.2; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = io.grpc.UnitTests; - PRODUCT_NAME = "$(TARGET_NAME)"; - TARGETED_DEVICE_FAMILY = "1,2"; - USER_HEADER_SEARCH_PATHS = "\"$(PODS_ROOT)/../../../..\""; - }; - name = Release; - }; - 5E1228981E4D400F00E8504F /* Test */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - "HOST_PORT_LOCALSSL=$(HOST_PORT_LOCALSSL)", - "HOST_PORT_LOCAL=$(HOST_PORT_LOCAL)", - "HOST_PORT_REMOTE=$(HOST_PORT_REMOTE)", - "GRPC_TEST_OBJC=1", - ); - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_TREAT_WARNINGS_AS_ERRORS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 8.3; - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = iphoneos; - }; - name = Test; - }; - 5E1228991E4D400F00E8504F /* Test */ = { - isa = XCBuildConfiguration; - buildSettings = { - GCC_TREAT_WARNINGS_AS_ERRORS = YES; - PRODUCT_NAME = "$(TARGET_NAME)"; - SKIP_INSTALL = YES; - }; - name = Test; - }; - 5E12289A1E4D400F00E8504F /* Test */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = DB1F4391AF69D20D38D74B67 /* Pods-AllTests.test.xcconfig */; - buildSettings = { - FRAMEWORK_SEARCH_PATHS = ( - "$(SDKROOT)/Developer/Library/Frameworks", - "$(inherited)", - ); - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - "GRPC_TEST_OBJC=1", - ); - INFOPLIST_FILE = Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Test; - }; - 5E12289B1E4D400F00E8504F /* Test */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 781089FAE980F51F88A3BE0B /* Pods-RxLibraryUnitTests.test.xcconfig */; - buildSettings = { - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_TESTABILITY = YES; - INFOPLIST_FILE = Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = io.grpc.RxLibraryUnitTests; - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Test; - }; - 5E12289C1E4D400F00E8504F /* Test */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = A6F832FCEFA6F6881E620F12 /* Pods-InteropTestsRemote.test.xcconfig */; - buildSettings = { - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_TESTABILITY = YES; - GCC_PREPROCESSOR_DEFINITIONS = ( - "$(inherited)", - "COCOAPODS=1", - "$(inherited)", - "GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS=1", - "GRPC_TEST_OBJC=1", - ); - INFOPLIST_FILE = Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = io.grpc.InteropTests; - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Test; - }; - 5E12289D1E4D400F00E8504F /* Test */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = D13BEC8181B8E678A1B52F54 /* Pods-InteropTestsLocalSSL.test.xcconfig */; - buildSettings = { - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_TESTABILITY = YES; - GCC_PREPROCESSOR_DEFINITIONS = ( - "$(inherited)", - "COCOAPODS=1", - "$(inherited)", - "GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS=1", - "GRPC_TEST_OBJC=1", - ); - INFOPLIST_FILE = Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = io.grpc.InteropTestsLocalSSL; - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Test; - }; - 5E12289E1E4D400F00E8504F /* Test */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 1588C85DEAF7FC0ACDEA4C02 /* Pods-InteropTestsLocalCleartext.test.xcconfig */; - buildSettings = { - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_TESTABILITY = YES; - GCC_PREPROCESSOR_DEFINITIONS = ( - "$(inherited)", - "COCOAPODS=1", - "GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS=1", - "GRPC_TEST_OBJC=1", - ); - INFOPLIST_FILE = Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = io.grpc.InteropTestsLocalCleartext; - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Test; - }; - 5E12289F1E4D400F00E8504F /* Test */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 6793C9D019CB268C5BB491A2 /* Pods-CoreCronetEnd2EndTests.test.xcconfig */; - buildSettings = { - CLANG_ANALYZER_NONNULL = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_TESTABILITY = YES; - INFOPLIST_FILE = CoreCronetEnd2EndTests/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 9.3; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = io.grpc.CoreCronetEnd2EndTests; - PRODUCT_NAME = "$(TARGET_NAME)"; - USER_HEADER_SEARCH_PATHS = "$(inherited) \"${PODS_ROOT}/../../../..\""; - }; - name = Test; - }; - 5E1228A01E4D400F00E8504F /* Test */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 2B89F3037963E6EDDD48D8C3 /* Pods-InteropTestsRemoteWithCronet.test.xcconfig */; - buildSettings = { - CLANG_ANALYZER_NONNULL = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_TESTABILITY = YES; - GCC_PREPROCESSOR_DEFINITIONS = ( - "$(inherited)", - "COCOAPODS=1", - "GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS=1", - "GRPC_TEST_OBJC=1", - ); - INFOPLIST_FILE = InteropTestsRemoteWithCronet/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 9.3; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = io.grpc.InteropTestsRemoteWithCronet; - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Test; - }; - 5E1228A11E4D400F00E8504F /* Test */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = B226619DC4E709E0FFFF94B8 /* Pods-CronetUnitTests.test.xcconfig */; - buildSettings = { - CLANG_ANALYZER_NONNULL = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_TESTABILITY = YES; - GCC_INPUT_FILETYPE = sourcecode.cpp.objcpp; - INFOPLIST_FILE = CronetUnitTests/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 9.3; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = io.grpc.CronetUnitTests; - PRODUCT_NAME = "$(TARGET_NAME)"; - USER_HEADER_SEARCH_PATHS = "\"${PODS_ROOT}/../../../..\" $(inherited)"; - }; - name = Test; - }; - 5E3B95A821CAC6C500C0A151 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 1286B30AD74CB64CD91FB17D /* Pods-APIv2Tests.debug.xcconfig */; - buildSettings = { - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_ENABLE_OBJC_WEAK = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CODE_SIGN_IDENTITY = "iPhone Developer"; - CODE_SIGN_STYLE = Automatic; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu11; - INFOPLIST_FILE = APIv2Tests/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 11.2; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; - MTL_FAST_MATH = YES; - PRODUCT_BUNDLE_IDENTIFIER = io.grpc.APIv2Tests; - PRODUCT_NAME = "$(TARGET_NAME)"; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Debug; - }; - 5E3B95A921CAC6C500C0A151 /* Test */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 51F2A64B7AADBA1B225B132E /* Pods-APIv2Tests.test.xcconfig */; - buildSettings = { - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_ENABLE_OBJC_WEAK = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CODE_SIGN_IDENTITY = "iPhone Developer"; - CODE_SIGN_STYLE = Automatic; - GCC_C_LANGUAGE_STANDARD = gnu11; - INFOPLIST_FILE = APIv2Tests/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 11.2; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MTL_FAST_MATH = YES; - PRODUCT_BUNDLE_IDENTIFIER = io.grpc.APIv2Tests; - PRODUCT_NAME = "$(TARGET_NAME)"; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Test; - }; - 5E3B95AA21CAC6C500C0A151 /* Cronet */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 8C233E85C3EB45B3CAE52EDF /* Pods-APIv2Tests.cronet.xcconfig */; - buildSettings = { - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_ENABLE_OBJC_WEAK = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CODE_SIGN_IDENTITY = "iPhone Developer"; - CODE_SIGN_STYLE = Automatic; - GCC_C_LANGUAGE_STANDARD = gnu11; - INFOPLIST_FILE = APIv2Tests/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 11.2; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MTL_FAST_MATH = YES; - PRODUCT_BUNDLE_IDENTIFIER = io.grpc.APIv2Tests; - PRODUCT_NAME = "$(TARGET_NAME)"; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Cronet; - }; - 5E3B95AB21CAC6C500C0A151 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 12B238CD1702393C2BA5DE80 /* Pods-APIv2Tests.release.xcconfig */; - buildSettings = { - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_ENABLE_OBJC_WEAK = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CODE_SIGN_IDENTITY = "iPhone Developer"; - CODE_SIGN_STYLE = Automatic; - GCC_C_LANGUAGE_STANDARD = gnu11; - INFOPLIST_FILE = APIv2Tests/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 11.2; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MTL_FAST_MATH = YES; - PRODUCT_BUNDLE_IDENTIFIER = io.grpc.APIv2Tests; - PRODUCT_NAME = "$(TARGET_NAME)"; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Release; - }; - 5E7D71BB210B9EC9001EA6BA /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 3A98DF08852F60AF1D96481D /* Pods-InteropTestsCallOptions.debug.xcconfig */; - buildSettings = { - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_ENABLE_OBJC_WEAK = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CODE_SIGN_IDENTITY = "iPhone Developer"; - CODE_SIGN_STYLE = Automatic; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu11; - INFOPLIST_FILE = InteropTestsCallOptions/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 11.3; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = io.grpc.InteropTestsCallOptions; - PRODUCT_NAME = "$(TARGET_NAME)"; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Debug; - }; - 5E7D71BC210B9EC9001EA6BA /* Test */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = A25967A0D40ED14B3287AD81 /* Pods-InteropTestsCallOptions.test.xcconfig */; - buildSettings = { - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_ENABLE_OBJC_WEAK = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CODE_SIGN_IDENTITY = "iPhone Developer"; - CODE_SIGN_STYLE = Automatic; - GCC_C_LANGUAGE_STANDARD = gnu11; - INFOPLIST_FILE = InteropTestsCallOptions/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 11.3; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = io.grpc.InteropTestsCallOptions; - PRODUCT_NAME = "$(TARGET_NAME)"; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Test; - }; - 5E7D71BD210B9EC9001EA6BA /* Cronet */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 73D2DF07027835BA0FB0B1C0 /* Pods-InteropTestsCallOptions.cronet.xcconfig */; - buildSettings = { - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_ENABLE_OBJC_WEAK = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CODE_SIGN_IDENTITY = "iPhone Developer"; - CODE_SIGN_STYLE = Automatic; - GCC_C_LANGUAGE_STANDARD = gnu11; - INFOPLIST_FILE = InteropTestsCallOptions/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 11.3; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = io.grpc.InteropTestsCallOptions; - PRODUCT_NAME = "$(TARGET_NAME)"; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Cronet; - }; - 5E7D71BE210B9EC9001EA6BA /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = C9172F9020E8C97A470D7250 /* Pods-InteropTestsCallOptions.release.xcconfig */; - buildSettings = { - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_ENABLE_OBJC_WEAK = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CODE_SIGN_IDENTITY = "iPhone Developer"; - CODE_SIGN_STYLE = Automatic; - GCC_C_LANGUAGE_STANDARD = gnu11; - INFOPLIST_FILE = InteropTestsCallOptions/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 11.3; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = io.grpc.InteropTestsCallOptions; - PRODUCT_NAME = "$(TARGET_NAME)"; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Release; - }; - 5E8A5DAC1D3840B4000F8BC4 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 0D2284C3DF7E57F0ED504E39 /* Pods-CoreCronetEnd2EndTests.debug.xcconfig */; - buildSettings = { - CLANG_ANALYZER_NONNULL = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_TESTABILITY = YES; - INFOPLIST_FILE = CoreCronetEnd2EndTests/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 9.3; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - LIBRARY_SEARCH_PATHS = ( - "$(inherited)", - "\"${PODS_CONFIGURATION_BUILD_DIR}/BoringSSL\"", - "\"${PODS_CONFIGURATION_BUILD_DIR}/Protobuf\"", - "\"${PODS_CONFIGURATION_BUILD_DIR}/RemoteTest\"", - "\"${PODS_CONFIGURATION_BUILD_DIR}/gRPC\"", - "\"${PODS_CONFIGURATION_BUILD_DIR}/gRPC-Core-072e2d32\"", - "\"${PODS_CONFIGURATION_BUILD_DIR}/gRPC-ProtoRPC\"", - "\"${PODS_CONFIGURATION_BUILD_DIR}/gRPC-RxLibrary\"", - "\"${PODS_CONFIGURATION_BUILD_DIR}/nanopb\"", - "\"${PODS_CONFIGURATION_BUILD_DIR}/gRPC-Core\"", - ); - PRODUCT_BUNDLE_IDENTIFIER = io.grpc.CoreCronetEnd2EndTests; - PRODUCT_NAME = "$(TARGET_NAME)"; - USER_HEADER_SEARCH_PATHS = "$(inherited) \"${PODS_ROOT}/../../../..\""; - }; - name = Debug; - }; - 5E8A5DAD1D3840B4000F8BC4 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 4AD97096D13D7416DC91A72A /* Pods-CoreCronetEnd2EndTests.release.xcconfig */; - buildSettings = { - CLANG_ANALYZER_NONNULL = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - INFOPLIST_FILE = CoreCronetEnd2EndTests/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 9.3; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = io.grpc.CoreCronetEnd2EndTests; - PRODUCT_NAME = "$(TARGET_NAME)"; - USER_HEADER_SEARCH_PATHS = "$(inherited) \"${PODS_ROOT}/../../../..\""; - }; - name = Release; - }; - 5EAD6D2C1E27047400002378 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 64F68A9A6A63CC930DD30A6E /* Pods-CronetUnitTests.debug.xcconfig */; - buildSettings = { - CLANG_ANALYZER_NONNULL = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_TESTABILITY = YES; - GCC_INPUT_FILETYPE = sourcecode.cpp.objcpp; - GCC_PREPROCESSOR_DEFINITIONS = ( - "$(inherited)", - "COCOAPODS=1", - "$(inherited)", - "PB_FIELD_32BIT=1", - "PB_NO_PACKED_STRUCTS=1", - "GRPC_SHADOW_BORINGSSL_SYMBOLS=1", - ); - INFOPLIST_FILE = CronetUnitTests/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 9.3; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = io.grpc.CronetUnitTests; - PRODUCT_NAME = "$(TARGET_NAME)"; - USER_HEADER_SEARCH_PATHS = "\"${PODS_ROOT}/../../../..\" $(inherited)"; - }; - name = Debug; - }; - 5EAD6D2D1E27047400002378 /* Cronet */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 386712AEACF7C2190C4B8B3F /* Pods-CronetUnitTests.cronet.xcconfig */; - buildSettings = { - CLANG_ANALYZER_NONNULL = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - GCC_INPUT_FILETYPE = sourcecode.cpp.objcpp; - INFOPLIST_FILE = CronetUnitTests/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 9.3; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = io.grpc.CronetUnitTests; - PRODUCT_NAME = "$(TARGET_NAME)"; - USER_HEADER_SEARCH_PATHS = "\"${PODS_ROOT}/../../../..\" $(inherited)"; - }; - name = Cronet; - }; - 5EAD6D2E1E27047400002378 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 02192CF1FF9534E3D18C65FC /* Pods-CronetUnitTests.release.xcconfig */; - buildSettings = { - CLANG_ANALYZER_NONNULL = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - GCC_INPUT_FILETYPE = sourcecode.cpp.objcpp; - INFOPLIST_FILE = CronetUnitTests/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 9.3; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = io.grpc.CronetUnitTests; - PRODUCT_NAME = "$(TARGET_NAME)"; - USER_HEADER_SEARCH_PATHS = "\"${PODS_ROOT}/../../../..\" $(inherited)"; - }; - name = Release; - }; - 5EB2A2EC2107DED300EB4B69 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = F9E48EF5ACB1F38825171C5F /* Pods-ChannelTests.debug.xcconfig */; - buildSettings = { - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_ENABLE_OBJC_WEAK = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CODE_SIGN_IDENTITY = "iPhone Developer"; - CODE_SIGN_STYLE = Automatic; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu11; - INFOPLIST_FILE = ChannelTests/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 11.3; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = io.grpc.ChannelTests; - PRODUCT_NAME = "$(TARGET_NAME)"; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Debug; - }; - 5EB2A2ED2107DED300EB4B69 /* Test */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = BED74BC8ABF9917C66175879 /* Pods-ChannelTests.test.xcconfig */; - buildSettings = { - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_ENABLE_OBJC_WEAK = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CODE_SIGN_IDENTITY = "iPhone Developer"; - CODE_SIGN_STYLE = Automatic; - GCC_C_LANGUAGE_STANDARD = gnu11; - INFOPLIST_FILE = ChannelTests/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 11.3; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = io.grpc.ChannelTests; - PRODUCT_NAME = "$(TARGET_NAME)"; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Test; - }; - 5EB2A2EE2107DED300EB4B69 /* Cronet */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 90E63AD3C4A1E3E6BC745096 /* Pods-ChannelTests.cronet.xcconfig */; - buildSettings = { - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_ENABLE_OBJC_WEAK = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CODE_SIGN_IDENTITY = "iPhone Developer"; - CODE_SIGN_STYLE = Automatic; - GCC_C_LANGUAGE_STANDARD = gnu11; - INFOPLIST_FILE = ChannelTests/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 11.3; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = io.grpc.ChannelTests; - PRODUCT_NAME = "$(TARGET_NAME)"; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Cronet; - }; - 5EB2A2EF2107DED300EB4B69 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = D52B92A7108602F170DA8091 /* Pods-ChannelTests.release.xcconfig */; - buildSettings = { - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_ENABLE_OBJC_WEAK = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CODE_SIGN_IDENTITY = "iPhone Developer"; - CODE_SIGN_STYLE = Automatic; - GCC_C_LANGUAGE_STANDARD = gnu11; - INFOPLIST_FILE = ChannelTests/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 11.3; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = io.grpc.ChannelTests; - PRODUCT_NAME = "$(TARGET_NAME)"; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Release; - }; - 5EB2A2FD2109284500EB4B69 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 3CADF86203B9D03EA96C359D /* Pods-InteropTestsMultipleChannels.debug.xcconfig */; - buildSettings = { - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_ENABLE_OBJC_WEAK = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CODE_SIGN_IDENTITY = "iPhone Developer"; - CODE_SIGN_STYLE = Automatic; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu11; - INFOPLIST_FILE = InteropTestsMultipleChannels/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 11.3; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = io.grpc.InteropTestsMultipleChannels; - PRODUCT_NAME = "$(TARGET_NAME)"; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Debug; - }; - 5EB2A2FE2109284500EB4B69 /* Test */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = EA8B122ACDE73E3AAA0E4A19 /* Pods-InteropTestsMultipleChannels.test.xcconfig */; - buildSettings = { - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_ENABLE_OBJC_WEAK = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CODE_SIGN_IDENTITY = "iPhone Developer"; - CODE_SIGN_STYLE = Automatic; - GCC_C_LANGUAGE_STANDARD = gnu11; - INFOPLIST_FILE = InteropTestsMultipleChannels/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 11.3; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = io.grpc.InteropTestsMultipleChannels; - PRODUCT_NAME = "$(TARGET_NAME)"; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Test; - }; - 5EB2A2FF2109284500EB4B69 /* Cronet */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 1295CCBD1082B4A7CFCED95F /* Pods-InteropTestsMultipleChannels.cronet.xcconfig */; - buildSettings = { - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_ENABLE_OBJC_WEAK = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CODE_SIGN_IDENTITY = "iPhone Developer"; - CODE_SIGN_STYLE = Automatic; - GCC_C_LANGUAGE_STANDARD = gnu11; - INFOPLIST_FILE = InteropTestsMultipleChannels/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 11.3; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = io.grpc.InteropTestsMultipleChannels; - PRODUCT_NAME = "$(TARGET_NAME)"; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Cronet; - }; - 5EB2A3002109284500EB4B69 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 2650FEF00956E7924772F9D9 /* Pods-InteropTestsMultipleChannels.release.xcconfig */; - buildSettings = { - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_ENABLE_OBJC_WEAK = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CODE_SIGN_IDENTITY = "iPhone Developer"; - CODE_SIGN_STYLE = Automatic; - GCC_C_LANGUAGE_STANDARD = gnu11; - INFOPLIST_FILE = InteropTestsMultipleChannels/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 11.3; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = io.grpc.InteropTestsMultipleChannels; - PRODUCT_NAME = "$(TARGET_NAME)"; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Release; - }; - 5EC3C7A01D4FC18C000330E2 /* Cronet */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - "HOST_PORT_REMOTE=$(HOST_PORT_REMOTE)", - "HOST_PORT_LOCALSSL=$(HOST_PORT_LOCALSSL)", - "HOST_PORT_LOCAL=$(HOST_PORT_LOCAL)", - ); - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_TREAT_WARNINGS_AS_ERRORS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 8.3; - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = iphoneos; - }; - name = Cronet; - }; - 5EC3C7A11D4FC18C000330E2 /* Cronet */ = { - isa = XCBuildConfiguration; - buildSettings = { - GCC_TREAT_WARNINGS_AS_ERRORS = YES; - PRODUCT_NAME = "$(TARGET_NAME)"; - SKIP_INSTALL = YES; - }; - name = Cronet; - }; - 5EC3C7A21D4FC18C000330E2 /* Cronet */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = E7E4D3FD76E3B745D992AF5F /* Pods-AllTests.cronet.xcconfig */; - buildSettings = { - FRAMEWORK_SEARCH_PATHS = ( - "$(SDKROOT)/Developer/Library/Frameworks", - "$(inherited)", - ); - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - INFOPLIST_FILE = Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Cronet; - }; - 5EC3C7A31D4FC18C000330E2 /* Cronet */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 79C68EFFCB5533475D810B79 /* Pods-RxLibraryUnitTests.cronet.xcconfig */; - buildSettings = { - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_TESTABILITY = YES; - INFOPLIST_FILE = Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = io.grpc.RxLibraryUnitTests; - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Cronet; - }; - 5EC3C7A41D4FC18C000330E2 /* Cronet */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 4ADEA1C8BBE10D90940AC68E /* Pods-InteropTestsRemote.cronet.xcconfig */; - buildSettings = { - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_TESTABILITY = YES; - GCC_PREPROCESSOR_DEFINITIONS = ( - "$(inherited)", - "COCOAPODS=1", - "$(inherited)", - "GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS=1", - ); - INFOPLIST_FILE = Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = io.grpc.InteropTests; - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Cronet; - }; - 5EC3C7A51D4FC18C000330E2 /* Cronet */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 14B09A58FEE53A7A6B838920 /* Pods-InteropTestsLocalSSL.cronet.xcconfig */; - buildSettings = { - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_TESTABILITY = YES; - INFOPLIST_FILE = Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = io.grpc.InteropTestsLocalSSL; - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Cronet; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 5E0282E2215AA697007AC99D /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 5E0282E9215AA697007AC99D /* NSErrorUnitTests.m in Sources */, + 5E7F4880227782C1006656AD /* APIv2Tests.m in Sources */, + 5E7F487D22778256006656AD /* ChannelPoolTest.m in Sources */, + 5E7F488722778AEA006656AD /* GRPCClientTests.m in Sources */, + 5E7F487E22778256006656AD /* ChannelTests.m in Sources */, + 5E7F488B22778B5D006656AD /* RxLibraryUnitTests.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; }; - 5EC3C7A61D4FC18C000330E2 /* Cronet */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = AA7CB64B4DD9915AE7C03163 /* Pods-InteropTestsLocalCleartext.cronet.xcconfig */; - buildSettings = { - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_TESTABILITY = YES; - INFOPLIST_FILE = Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = io.grpc.InteropTestsLocalCleartext; - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Cronet; + 5E7F485522775B15006656AD /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 5E3F14852278BF5D007C6D90 /* InteropTestsBlockCallbacks.m in Sources */, + 5E7F486E22778086006656AD /* CoreCronetEnd2EndTests.mm in Sources */, + 5E7F488522778A88006656AD /* InteropTests.m in Sources */, + 5E7F486422775B37006656AD /* InteropTestsRemoteWithCronet.m in Sources */, + 5E7F486522775B41006656AD /* CronetUnitTests.mm in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; }; - 5EC3C7A71D4FC18C000330E2 /* Cronet */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 573450F334B331D0BED8B961 /* Pods-CoreCronetEnd2EndTests.cronet.xcconfig */; - buildSettings = { - CLANG_ANALYZER_NONNULL = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_TESTABILITY = YES; - INFOPLIST_FILE = CoreCronetEnd2EndTests/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 9.3; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = io.grpc.CoreCronetEnd2EndTests; - PRODUCT_NAME = "$(TARGET_NAME)"; - USER_HEADER_SEARCH_PATHS = "$(inherited) \"${PODS_ROOT}/../../../..\""; - }; - name = Cronet; + 5EA476F02272816A000F72FC /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 5E3F14842278B461007C6D90 /* InteropTestsBlockCallbacks.m in Sources */, + 5E7F488922778B04006656AD /* InteropTestsRemote.m in Sources */, + 5E7F487922778226006656AD /* InteropTestsMultipleChannels.m in Sources */, + 5EA477042273617B000F72FC /* InteropTestsLocalCleartext.m in Sources */, + 5EA4770322736178000F72FC /* InteropTestsLocalSSL.m in Sources */, + 5E7F488422778A88006656AD /* InteropTests.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; }; - 5EC3C7A81D4FC18C000330E2 /* Cronet */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 3F27B2E744482771EB93C394 /* Pods-InteropTestsRemoteWithCronet.cronet.xcconfig */; - buildSettings = { - CLANG_ANALYZER_NONNULL = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_TESTABILITY = YES; - GCC_PREPROCESSOR_DEFINITIONS = ( - "$(inherited)", - "COCOAPODS=1", - "GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS=1", - "GRPC_COMPILE_WITH_CRONET=1", - "GRPC_CRONET_WITH_PACKET_COALESCING=1", - "GRPC_TEST_OBJC=1", - ); - INFOPLIST_FILE = InteropTestsRemoteWithCronet/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 9.3; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = io.grpc.InteropTestsRemoteWithCronet; - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Cronet; + B0BB3EF3225E795F008DA580 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + B0BB3F08225E7ABA008DA580 /* NSErrorUnitTests.m in Sources */, + 5E7F488D22778C85006656AD /* InteropTestsLocalSSL.m in Sources */, + 5E7F488E22778C87006656AD /* InteropTestsLocalCleartext.m in Sources */, + 5E7F489022778C95006656AD /* RxLibraryUnitTests.m in Sources */, + B071230B22669EED004B64A1 /* StressTests.m in Sources */, + B0D39B9A2266F3CB00A4078D /* StressTestsSSL.m in Sources */, + 5E7F488322778A88006656AD /* InteropTests.m in Sources */, + 5E3F14862278BFFF007C6D90 /* InteropTestsBlockCallbacks.m in Sources */, + 5E7F488C22778C60006656AD /* APIv2Tests.m in Sources */, + 5E7F488F22778C8C006656AD /* InteropTestsRemote.m in Sources */, + B0D39B9C2266FF9800A4078D /* StressTestsCleartext.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; }; - 5EC5E426208177CC000EF4AD /* Debug */ = { +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 5E0282EE215AA697007AC99D /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 32748C4078AEB05F8F954361 /* Pods-InteropTestsRemoteCFStream.debug.xcconfig */; + baseConfigurationReference = A2DCF2570BE515B62CB924CA /* Pods-UnitTests.debug.xcconfig */; buildSettings = { CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; @@ -3396,15 +879,16 @@ INFOPLIST_FILE = Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 11.2; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = io.grpc.InteropTestsRemoteCFStream; + PRODUCT_BUNDLE_IDENTIFIER = io.grpc.UnitTests; PRODUCT_NAME = "$(TARGET_NAME)"; TARGETED_DEVICE_FAMILY = "1,2"; + USER_HEADER_SEARCH_PATHS = "\"$(PODS_ROOT)/../../../..\""; }; name = Debug; }; - 5EC5E427208177CC000EF4AD /* Test */ = { + 5E0282EF215AA697007AC99D /* Test */ = { isa = XCBuildConfiguration; - baseConfigurationReference = C17F57E5BCB989AB1C2F1F25 /* Pods-InteropTestsRemoteCFStream.test.xcconfig */; + baseConfigurationReference = 94D7A5FAA13480E9A5166D7A /* Pods-UnitTests.test.xcconfig */; buildSettings = { CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; @@ -3422,28 +906,19 @@ CODE_SIGN_IDENTITY = "iPhone Developer"; CODE_SIGN_STYLE = Automatic; GCC_C_LANGUAGE_STANDARD = gnu11; - GCC_PREPROCESSOR_DEFINITIONS = ( - "$(inherited)", - "COCOAPODS=1", - "$(inherited)", - "GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS=1", - "$(inherited)", - "PB_FIELD_32BIT=1", - "PB_NO_PACKED_STRUCTS=1", - "GRPC_CFSTREAM=1", - ); INFOPLIST_FILE = Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 11.2; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = io.grpc.InteropTestsRemoteCFStream; + PRODUCT_BUNDLE_IDENTIFIER = io.grpc.UnitTests; PRODUCT_NAME = "$(TARGET_NAME)"; TARGETED_DEVICE_FAMILY = "1,2"; + USER_HEADER_SEARCH_PATHS = "\"$(PODS_ROOT)/../../../..\""; }; name = Test; }; - 5EC5E428208177CC000EF4AD /* Cronet */ = { + 5E0282F0215AA697007AC99D /* Cronet */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 4A1A42B2E941CCD453489E5B /* Pods-InteropTestsRemoteCFStream.cronet.xcconfig */; + baseConfigurationReference = E1E7660656D902104F728892 /* Pods-UnitTests.cronet.xcconfig */; buildSettings = { CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; @@ -3464,15 +939,16 @@ INFOPLIST_FILE = Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 11.2; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = io.grpc.InteropTestsRemoteCFStream; + PRODUCT_BUNDLE_IDENTIFIER = io.grpc.UnitTests; PRODUCT_NAME = "$(TARGET_NAME)"; TARGETED_DEVICE_FAMILY = "1,2"; + USER_HEADER_SEARCH_PATHS = "\"$(PODS_ROOT)/../../../..\""; }; name = Cronet; }; - 5EC5E429208177CC000EF4AD /* Release */ = { + 5E0282F1215AA697007AC99D /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 303F4A17EB1650FC44603D17 /* Pods-InteropTestsRemoteCFStream.release.xcconfig */; + baseConfigurationReference = EBFFEC04B514CB0D4922DC40 /* Pods-UnitTests.release.xcconfig */; buildSettings = { CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; @@ -3493,24 +969,75 @@ INFOPLIST_FILE = Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 11.2; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = io.grpc.InteropTestsRemoteCFStream; + PRODUCT_BUNDLE_IDENTIFIER = io.grpc.UnitTests; PRODUCT_NAME = "$(TARGET_NAME)"; TARGETED_DEVICE_FAMILY = "1,2"; + USER_HEADER_SEARCH_PATHS = "\"$(PODS_ROOT)/../../../..\""; }; name = Release; }; - 5EC5E4372081856C000EF4AD /* Debug */ = { + 5E1228981E4D400F00E8504F /* Test */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + "HOST_PORT_LOCALSSL=$(HOST_PORT_LOCALSSL)", + "HOST_PORT_LOCAL=$(HOST_PORT_LOCAL)", + "HOST_PORT_REMOTE=$(HOST_PORT_REMOTE)", + "GRPC_TEST_OBJC=1", + ); + GCC_SYMBOLS_PRIVATE_EXTERN = NO; + GCC_TREAT_WARNINGS_AS_ERRORS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 8.3; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + }; + name = Test; + }; + 5E7F485F22775B15006656AD /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 943138072A9605B5B8DC1FC0 /* Pods-InteropTestsLocalCleartextCFStream.debug.xcconfig */; + baseConfigurationReference = EC66920112123D2DB1CB7F6C /* Pods-CronetTests.debug.xcconfig */; buildSettings = { CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_ENABLE_OBJC_WEAK = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_COMMA = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_DOCUMENTATION_COMMENTS = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; @@ -3520,28 +1047,39 @@ CODE_SIGN_STYLE = Automatic; DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_TESTABILITY = YES; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Pods/CronetFramework", + ); GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_WARN_INHIBIT_ALL_WARNINGS = YES; INFOPLIST_FILE = Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 11.2; + IPHONEOS_DEPLOYMENT_TARGET = 12.1; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = io.grpc.InteropTestsLocalCleartextCFStream; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + PRODUCT_BUNDLE_IDENTIFIER = io.grpc.CronetTests; PRODUCT_NAME = "$(TARGET_NAME)"; TARGETED_DEVICE_FAMILY = "1,2"; + USER_HEADER_SEARCH_PATHS = ../../..; }; name = Debug; }; - 5EC5E4382081856C000EF4AD /* Test */ = { + 5E7F486022775B15006656AD /* Test */ = { isa = XCBuildConfiguration; - baseConfigurationReference = E4FD4606D4AB8D5A314D72F0 /* Pods-InteropTestsLocalCleartextCFStream.test.xcconfig */; + baseConfigurationReference = 5AB9A82F289D548D6B8816F9 /* Pods-CronetTests.test.xcconfig */; buildSettings = { CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_ENABLE_OBJC_WEAK = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_COMMA = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_DOCUMENTATION_COMMENTS = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; @@ -3549,38 +1087,38 @@ CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; CODE_SIGN_IDENTITY = "iPhone Developer"; CODE_SIGN_STYLE = Automatic; - GCC_C_LANGUAGE_STANDARD = gnu11; - GCC_PREPROCESSOR_DEFINITIONS = ( - "$(inherited)", - "COCOAPODS=1", - "$(inherited)", - "GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS=1", + FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", - "PB_FIELD_32BIT=1", - "PB_NO_PACKED_STRUCTS=1", - "GRPC_CFSTREAM=1", + "$(PROJECT_DIR)/Pods/CronetFramework", ); + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_WARN_INHIBIT_ALL_WARNINGS = YES; INFOPLIST_FILE = Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 11.2; + IPHONEOS_DEPLOYMENT_TARGET = 12.1; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = io.grpc.InteropTestsLocalCleartextCFStream; + MTL_FAST_MATH = YES; + PRODUCT_BUNDLE_IDENTIFIER = io.grpc.CronetTests; PRODUCT_NAME = "$(TARGET_NAME)"; TARGETED_DEVICE_FAMILY = "1,2"; + USER_HEADER_SEARCH_PATHS = ../../..; }; name = Test; }; - 5EC5E4392081856C000EF4AD /* Cronet */ = { + 5E7F486122775B15006656AD /* Cronet */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 8B498B05C6DA0818B2FA91D4 /* Pods-InteropTestsLocalCleartextCFStream.cronet.xcconfig */; + baseConfigurationReference = 20F6A3D59D0EE091E2D43953 /* Pods-CronetTests.cronet.xcconfig */; buildSettings = { CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_ENABLE_OBJC_WEAK = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_COMMA = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_DOCUMENTATION_COMMENTS = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; @@ -3588,28 +1126,38 @@ CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; CODE_SIGN_IDENTITY = "iPhone Developer"; CODE_SIGN_STYLE = Automatic; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Pods/CronetFramework", + ); GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_WARN_INHIBIT_ALL_WARNINGS = YES; INFOPLIST_FILE = Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 11.2; + IPHONEOS_DEPLOYMENT_TARGET = 12.1; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = io.grpc.InteropTestsLocalCleartextCFStream; + MTL_FAST_MATH = YES; + PRODUCT_BUNDLE_IDENTIFIER = io.grpc.CronetTests; PRODUCT_NAME = "$(TARGET_NAME)"; TARGETED_DEVICE_FAMILY = "1,2"; + USER_HEADER_SEARCH_PATHS = ../../..; }; name = Cronet; }; - 5EC5E43A2081856C000EF4AD /* Release */ = { + 5E7F486222775B15006656AD /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 7BA53C6D224288D5870FE6F3 /* Pods-InteropTestsLocalCleartextCFStream.release.xcconfig */; + baseConfigurationReference = 7F4F42EBAF311E9F84FCA32E /* Pods-CronetTests.release.xcconfig */; buildSettings = { CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_ENABLE_OBJC_WEAK = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_COMMA = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_DOCUMENTATION_COMMENTS = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; @@ -3617,28 +1165,38 @@ CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; CODE_SIGN_IDENTITY = "iPhone Developer"; CODE_SIGN_STYLE = Automatic; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Pods/CronetFramework", + ); GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_WARN_INHIBIT_ALL_WARNINGS = YES; INFOPLIST_FILE = Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 11.2; + IPHONEOS_DEPLOYMENT_TARGET = 12.1; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = io.grpc.InteropTestsLocalCleartextCFStream; + MTL_FAST_MATH = YES; + PRODUCT_BUNDLE_IDENTIFIER = io.grpc.CronetTests; PRODUCT_NAME = "$(TARGET_NAME)"; TARGETED_DEVICE_FAMILY = "1,2"; + USER_HEADER_SEARCH_PATHS = ../../..; }; name = Release; }; - 5EC5E448208185CE000EF4AD /* Debug */ = { + 5EA476FC2272816B000F72FC /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 3EB55EF291706E3DDE23C3B7 /* Pods-InteropTestsLocalSSLCFStream.debug.xcconfig */; + baseConfigurationReference = 680439AC2BC8761EDD54A1EA /* Pods-InteropTests.debug.xcconfig */; buildSettings = { CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_ENABLE_OBJC_WEAK = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_COMMA = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_DOCUMENTATION_COMMENTS = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; @@ -3650,26 +1208,31 @@ ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = gnu11; INFOPLIST_FILE = Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 11.2; + IPHONEOS_DEPLOYMENT_TARGET = 12.1; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = io.grpc.InteropTestsLocalSSLCFStream; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + PRODUCT_BUNDLE_IDENTIFIER = io.grpc.InteropTests; PRODUCT_NAME = "$(TARGET_NAME)"; TARGETED_DEVICE_FAMILY = "1,2"; }; name = Debug; }; - 5EC5E449208185CE000EF4AD /* Test */ = { + 5EA476FD2272816B000F72FC /* Test */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 41AA59529240A6BBBD3DB904 /* Pods-InteropTestsLocalSSLCFStream.test.xcconfig */; + baseConfigurationReference = 070266E2626EB997B54880A3 /* Pods-InteropTests.test.xcconfig */; buildSettings = { CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_ENABLE_OBJC_WEAK = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_COMMA = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_DOCUMENTATION_COMMENTS = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; @@ -3678,66 +1241,31 @@ CODE_SIGN_IDENTITY = "iPhone Developer"; CODE_SIGN_STYLE = Automatic; GCC_C_LANGUAGE_STANDARD = gnu11; - GCC_PREPROCESSOR_DEFINITIONS = ( - "$(inherited)", - "COCOAPODS=1", - "$(inherited)", - "GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS=1", - "$(inherited)", - "PB_FIELD_32BIT=1", - "PB_NO_PACKED_STRUCTS=1", - "GRPC_CFSTREAM=1", - ); INFOPLIST_FILE = Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 11.2; + IPHONEOS_DEPLOYMENT_TARGET = 12.1; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = io.grpc.InteropTestsLocalSSLCFStream; + MTL_FAST_MATH = YES; + PRODUCT_BUNDLE_IDENTIFIER = io.grpc.InteropTests; PRODUCT_NAME = "$(TARGET_NAME)"; TARGETED_DEVICE_FAMILY = "1,2"; }; name = Test; }; - 5EC5E44A208185CE000EF4AD /* Cronet */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 55B630C1FF8C36D1EFC4E0A4 /* Pods-InteropTestsLocalSSLCFStream.cronet.xcconfig */; - buildSettings = { - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CODE_SIGN_IDENTITY = "iPhone Developer"; - CODE_SIGN_STYLE = Automatic; - GCC_C_LANGUAGE_STANDARD = gnu11; - INFOPLIST_FILE = Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 11.2; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = io.grpc.InteropTestsLocalSSLCFStream; - PRODUCT_NAME = "$(TARGET_NAME)"; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Cronet; - }; - 5EC5E44B208185CE000EF4AD /* Release */ = { + 5EA476FE2272816B000F72FC /* Cronet */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 5EA908CF4CDA4CE218352A06 /* Pods-InteropTestsLocalSSLCFStream.release.xcconfig */; + baseConfigurationReference = CDF6CC70B8BF9D10EFE7D199 /* Pods-InteropTests.cronet.xcconfig */; buildSettings = { CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_ENABLE_OBJC_WEAK = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_COMMA = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_DOCUMENTATION_COMMENTS = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; @@ -3746,88 +1274,96 @@ CODE_SIGN_IDENTITY = "iPhone Developer"; CODE_SIGN_STYLE = Automatic; GCC_C_LANGUAGE_STANDARD = gnu11; - INFOPLIST_FILE = Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 11.2; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = io.grpc.InteropTestsLocalSSLCFStream; - PRODUCT_NAME = "$(TARGET_NAME)"; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Release; - }; - 5EE84BF91D4717E40050C6CC /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 17F60BF2871F6AF85FB3FA12 /* Pods-InteropTestsRemoteWithCronet.debug.xcconfig */; - buildSettings = { - CLANG_ANALYZER_NONNULL = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_TESTABILITY = YES; - GCC_PREPROCESSOR_DEFINITIONS = ( - "$(inherited)", - "COCOAPODS=1", - "GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS=1", - ); - INFOPLIST_FILE = InteropTestsRemoteWithCronet/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 9.3; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = io.grpc.InteropTestsRemoteWithCronet; - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Debug; - }; - 5EE84BFA1D4717E40050C6CC /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = AC414EF7A6BF76ED02B6E480 /* Pods-InteropTestsRemoteWithCronet.release.xcconfig */; - buildSettings = { - CLANG_ANALYZER_NONNULL = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - GCC_PREPROCESSOR_DEFINITIONS = ( - "$(inherited)", - "COCOAPODS=1", - "$(inherited)", - "GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS=1", - "GRPC_COMPILE_WITH_CRONET=1", - ); - INFOPLIST_FILE = InteropTestsRemoteWithCronet/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 9.3; + INFOPLIST_FILE = Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 12.1; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = io.grpc.InteropTestsRemoteWithCronet; + MTL_FAST_MATH = YES; + PRODUCT_BUNDLE_IDENTIFIER = io.grpc.InteropTests; PRODUCT_NAME = "$(TARGET_NAME)"; + TARGETED_DEVICE_FAMILY = "1,2"; }; - name = Release; + name = Cronet; }; - 63423F4E1B150A5F006CF63C /* Debug */ = { + 5EA476FF2272816B000F72FC /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = B94C27C06733CF98CE1B2757 /* Pods-AllTests.debug.xcconfig */; + baseConfigurationReference = F6A7EECACBB4849DDD3F450A /* Pods-InteropTests.release.xcconfig */; buildSettings = { - FRAMEWORK_SEARCH_PATHS = ( - "$(SDKROOT)/Developer/Library/Frameworks", - "$(inherited)", - ); - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CODE_SIGN_IDENTITY = "iPhone Developer"; + CODE_SIGN_STYLE = Automatic; + GCC_C_LANGUAGE_STANDARD = gnu11; INFOPLIST_FILE = Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 12.1; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MTL_FAST_MATH = YES; + PRODUCT_BUNDLE_IDENTIFIER = io.grpc.InteropTests; PRODUCT_NAME = "$(TARGET_NAME)"; + TARGETED_DEVICE_FAMILY = "1,2"; }; - name = Debug; + name = Release; }; - 63423F4F1B150A5F006CF63C /* Release */ = { + 5EC3C7A01D4FC18C000330E2 /* Cronet */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 5761E98978DDDF136A58CB7E /* Pods-AllTests.release.xcconfig */; buildSettings = { - FRAMEWORK_SEARCH_PATHS = ( - "$(SDKROOT)/Developer/Library/Frameworks", + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", "$(inherited)", + "HOST_PORT_REMOTE=$(HOST_PORT_REMOTE)", + "HOST_PORT_LOCALSSL=$(HOST_PORT_LOCALSSL)", + "HOST_PORT_LOCAL=$(HOST_PORT_LOCAL)", + "GRPC_TEST_OBJC=1", + "GRPC_COMPILE_WITH_CRONET=1", ); - INFOPLIST_FILE = Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_NAME = "$(TARGET_NAME)"; + GCC_SYMBOLS_PRIVATE_EXTERN = NO; + GCC_TREAT_WARNINGS_AS_ERRORS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 8.3; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; }; - name = Release; + name = Cronet; }; 635697D91B14FC11007A7283 /* Debug */ = { isa = XCBuildConfiguration; @@ -3909,128 +1445,6 @@ }; name = Release; }; - 635697DC1B14FC11007A7283 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - GCC_TREAT_WARNINGS_AS_ERRORS = YES; - PRODUCT_NAME = "$(TARGET_NAME)"; - SKIP_INSTALL = YES; - }; - name = Debug; - }; - 635697DD1B14FC11007A7283 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - GCC_TREAT_WARNINGS_AS_ERRORS = YES; - PRODUCT_NAME = "$(TARGET_NAME)"; - SKIP_INSTALL = YES; - }; - name = Release; - }; - 63DC841C1BE15179000708E8 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 07D10A965323BEA7FE59A74B /* Pods-RxLibraryUnitTests.debug.xcconfig */; - buildSettings = { - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_TESTABILITY = YES; - INFOPLIST_FILE = Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = io.grpc.RxLibraryUnitTests; - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Debug; - }; - 63DC841D1BE15179000708E8 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 3B0861FC805389C52DB260D4 /* Pods-RxLibraryUnitTests.release.xcconfig */; - buildSettings = { - INFOPLIST_FILE = Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = io.grpc.RxLibraryUnitTests; - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Release; - }; - 63DC842C1BE15267000708E8 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = DC3CA1D948F068E76957A861 /* Pods-InteropTestsRemote.debug.xcconfig */; - buildSettings = { - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_TESTABILITY = YES; - INFOPLIST_FILE = Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = io.grpc.InteropTests; - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Debug; - }; - 63DC842D1BE15267000708E8 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = E4275A759BDBDF143B9B438F /* Pods-InteropTestsRemote.release.xcconfig */; - buildSettings = { - INFOPLIST_FILE = Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = io.grpc.InteropTests; - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Release; - }; - 63DC843D1BE15294000708E8 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 553BBBED24E4162D1F769D65 /* Pods-InteropTestsLocalSSL.debug.xcconfig */; - buildSettings = { - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_TESTABILITY = YES; - INFOPLIST_FILE = Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = io.grpc.InteropTestsLocalSSL; - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Debug; - }; - 63DC843E1BE15294000708E8 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 7A2E97E3F469CC2A758D77DE /* Pods-InteropTestsLocalSSL.release.xcconfig */; - buildSettings = { - INFOPLIST_FILE = Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = io.grpc.InteropTestsLocalSSL; - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Release; - }; - 63DC844C1BE152B5000708E8 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = E1486220285AF123EB124008 /* Pods-InteropTestsLocalCleartext.debug.xcconfig */; - buildSettings = { - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_TESTABILITY = YES; - INFOPLIST_FILE = Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = io.grpc.InteropTestsLocalCleartext; - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Debug; - }; - 63DC844D1BE152B5000708E8 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 51A275E86C141416ED63FF76 /* Pods-InteropTestsLocalCleartext.release.xcconfig */; - buildSettings = { - INFOPLIST_FILE = Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = io.grpc.InteropTestsLocalCleartext; - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Release; - }; B0BB3EFD225E795F008DA580 /* Debug */ = { isa = XCBuildConfiguration; baseConfigurationReference = E3ACD4D5902745976D9C2229 /* Pods-MacTests.debug.xcconfig */; @@ -4193,123 +1607,24 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 5E3B95A721CAC6C500C0A151 /* Build configuration list for PBXNativeTarget "APIv2Tests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 5E3B95A821CAC6C500C0A151 /* Debug */, - 5E3B95A921CAC6C500C0A151 /* Test */, - 5E3B95AA21CAC6C500C0A151 /* Cronet */, - 5E3B95AB21CAC6C500C0A151 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 5E7D71BA210B9EC9001EA6BA /* Build configuration list for PBXNativeTarget "InteropTestsCallOptions" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 5E7D71BB210B9EC9001EA6BA /* Debug */, - 5E7D71BC210B9EC9001EA6BA /* Test */, - 5E7D71BD210B9EC9001EA6BA /* Cronet */, - 5E7D71BE210B9EC9001EA6BA /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 5E8A5DAE1D3840B4000F8BC4 /* Build configuration list for PBXNativeTarget "CoreCronetEnd2EndTests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 5E8A5DAC1D3840B4000F8BC4 /* Debug */, - 5E12289F1E4D400F00E8504F /* Test */, - 5EC3C7A71D4FC18C000330E2 /* Cronet */, - 5E8A5DAD1D3840B4000F8BC4 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 5EAD6D2F1E27047400002378 /* Build configuration list for PBXNativeTarget "CronetUnitTests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 5EAD6D2C1E27047400002378 /* Debug */, - 5E1228A11E4D400F00E8504F /* Test */, - 5EAD6D2D1E27047400002378 /* Cronet */, - 5EAD6D2E1E27047400002378 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 5EB2A2F02107DED300EB4B69 /* Build configuration list for PBXNativeTarget "ChannelTests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 5EB2A2EC2107DED300EB4B69 /* Debug */, - 5EB2A2ED2107DED300EB4B69 /* Test */, - 5EB2A2EE2107DED300EB4B69 /* Cronet */, - 5EB2A2EF2107DED300EB4B69 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 5EB2A3012109284500EB4B69 /* Build configuration list for PBXNativeTarget "InteropTestsMultipleChannels" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 5EB2A2FD2109284500EB4B69 /* Debug */, - 5EB2A2FE2109284500EB4B69 /* Test */, - 5EB2A2FF2109284500EB4B69 /* Cronet */, - 5EB2A3002109284500EB4B69 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 5EC5E42A208177CD000EF4AD /* Build configuration list for PBXNativeTarget "InteropTestsRemoteCFStream" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 5EC5E426208177CC000EF4AD /* Debug */, - 5EC5E427208177CC000EF4AD /* Test */, - 5EC5E428208177CC000EF4AD /* Cronet */, - 5EC5E429208177CC000EF4AD /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 5EC5E4362081856C000EF4AD /* Build configuration list for PBXNativeTarget "InteropTestsLocalCleartextCFStream" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 5EC5E4372081856C000EF4AD /* Debug */, - 5EC5E4382081856C000EF4AD /* Test */, - 5EC5E4392081856C000EF4AD /* Cronet */, - 5EC5E43A2081856C000EF4AD /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 5EC5E447208185CE000EF4AD /* Build configuration list for PBXNativeTarget "InteropTestsLocalSSLCFStream" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 5EC5E448208185CE000EF4AD /* Debug */, - 5EC5E449208185CE000EF4AD /* Test */, - 5EC5E44A208185CE000EF4AD /* Cronet */, - 5EC5E44B208185CE000EF4AD /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 5EE84BFB1D4717E40050C6CC /* Build configuration list for PBXNativeTarget "InteropTestsRemoteWithCronet" */ = { + 5E7F485E22775B15006656AD /* Build configuration list for PBXNativeTarget "CronetTests" */ = { isa = XCConfigurationList; buildConfigurations = ( - 5EE84BF91D4717E40050C6CC /* Debug */, - 5E1228A01E4D400F00E8504F /* Test */, - 5EC3C7A81D4FC18C000330E2 /* Cronet */, - 5EE84BFA1D4717E40050C6CC /* Release */, + 5E7F485F22775B15006656AD /* Debug */, + 5E7F486022775B15006656AD /* Test */, + 5E7F486122775B15006656AD /* Cronet */, + 5E7F486222775B15006656AD /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 63423F4D1B150A5F006CF63C /* Build configuration list for PBXNativeTarget "AllTests" */ = { + 5EA477002272816B000F72FC /* Build configuration list for PBXNativeTarget "InteropTests" */ = { isa = XCConfigurationList; buildConfigurations = ( - 63423F4E1B150A5F006CF63C /* Debug */, - 5E12289A1E4D400F00E8504F /* Test */, - 5EC3C7A21D4FC18C000330E2 /* Cronet */, - 63423F4F1B150A5F006CF63C /* Release */, + 5EA476FC2272816B000F72FC /* Debug */, + 5EA476FD2272816B000F72FC /* Test */, + 5EA476FE2272816B000F72FC /* Cronet */, + 5EA476FF2272816B000F72FC /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; @@ -4325,61 +1640,6 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 635697DB1B14FC11007A7283 /* Build configuration list for PBXNativeTarget "Tests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 635697DC1B14FC11007A7283 /* Debug */, - 5E1228991E4D400F00E8504F /* Test */, - 5EC3C7A11D4FC18C000330E2 /* Cronet */, - 635697DD1B14FC11007A7283 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 63DC841B1BE15179000708E8 /* Build configuration list for PBXNativeTarget "RxLibraryUnitTests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 63DC841C1BE15179000708E8 /* Debug */, - 5E12289B1E4D400F00E8504F /* Test */, - 5EC3C7A31D4FC18C000330E2 /* Cronet */, - 63DC841D1BE15179000708E8 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 63DC842B1BE15267000708E8 /* Build configuration list for PBXNativeTarget "InteropTestsRemote" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 63DC842C1BE15267000708E8 /* Debug */, - 5E12289C1E4D400F00E8504F /* Test */, - 5EC3C7A41D4FC18C000330E2 /* Cronet */, - 63DC842D1BE15267000708E8 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 63DC843C1BE15294000708E8 /* Build configuration list for PBXNativeTarget "InteropTestsLocalSSL" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 63DC843D1BE15294000708E8 /* Debug */, - 5E12289D1E4D400F00E8504F /* Test */, - 5EC3C7A51D4FC18C000330E2 /* Cronet */, - 63DC843E1BE15294000708E8 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 63DC844B1BE152B5000708E8 /* Build configuration list for PBXNativeTarget "InteropTestsLocalCleartext" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 63DC844C1BE152B5000708E8 /* Debug */, - 5E12289E1E4D400F00E8504F /* Test */, - 5EC3C7A61D4FC18C000330E2 /* Cronet */, - 63DC844D1BE152B5000708E8 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; B0BB3EFC225E795F008DA580 /* Build configuration list for PBXNativeTarget "MacTests" */ = { isa = XCConfigurationList; buildConfigurations = ( diff --git a/src/objective-c/tests/Tests.xcodeproj/xcshareddata/xcschemes/AllTests.xcscheme b/src/objective-c/tests/Tests.xcodeproj/xcshareddata/xcschemes/AllTests.xcscheme deleted file mode 100644 index a2560fee029..00000000000 --- a/src/objective-c/tests/Tests.xcodeproj/xcshareddata/xcschemes/AllTests.xcscheme +++ /dev/null @@ -1,110 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/objective-c/tests/Tests.xcodeproj/xcshareddata/xcschemes/ChannelTests.xcscheme b/src/objective-c/tests/Tests.xcodeproj/xcshareddata/xcschemes/ChannelTests.xcscheme deleted file mode 100644 index acae965bed0..00000000000 --- a/src/objective-c/tests/Tests.xcodeproj/xcshareddata/xcschemes/ChannelTests.xcscheme +++ /dev/null @@ -1,90 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/objective-c/tests/Tests.xcodeproj/xcshareddata/xcschemes/CoreCronetEnd2EndTests.xcscheme b/src/objective-c/tests/Tests.xcodeproj/xcshareddata/xcschemes/CoreCronetEnd2EndTests.xcscheme deleted file mode 100644 index e62edd397a5..00000000000 --- a/src/objective-c/tests/Tests.xcodeproj/xcshareddata/xcschemes/CoreCronetEnd2EndTests.xcscheme +++ /dev/null @@ -1,101 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/objective-c/tests/Tests.xcodeproj/xcshareddata/xcschemes/CoreCronetEnd2EndTests_Asan.xcscheme b/src/objective-c/tests/Tests.xcodeproj/xcshareddata/xcschemes/CoreCronetEnd2EndTests_Asan.xcscheme deleted file mode 100644 index 0a597e756ec..00000000000 --- a/src/objective-c/tests/Tests.xcodeproj/xcshareddata/xcschemes/CoreCronetEnd2EndTests_Asan.xcscheme +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/objective-c/tests/Tests.xcodeproj/xcshareddata/xcschemes/CoreCronetEnd2EndTests_Tsan.xcscheme b/src/objective-c/tests/Tests.xcodeproj/xcshareddata/xcschemes/CoreCronetEnd2EndTests_Tsan.xcscheme deleted file mode 100644 index 5fe60b96920..00000000000 --- a/src/objective-c/tests/Tests.xcodeproj/xcshareddata/xcschemes/CoreCronetEnd2EndTests_Tsan.xcscheme +++ /dev/null @@ -1,59 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/objective-c/tests/Tests.xcodeproj/xcshareddata/xcschemes/APIv2Tests.xcscheme b/src/objective-c/tests/Tests.xcodeproj/xcshareddata/xcschemes/CronetTests.xcscheme similarity index 77% rename from src/objective-c/tests/Tests.xcodeproj/xcshareddata/xcschemes/APIv2Tests.xcscheme rename to src/objective-c/tests/Tests.xcodeproj/xcshareddata/xcschemes/CronetTests.xcscheme index e0d1d1fdcac..aea349a06cc 100644 --- a/src/objective-c/tests/Tests.xcodeproj/xcshareddata/xcschemes/APIv2Tests.xcscheme +++ b/src/objective-c/tests/Tests.xcodeproj/xcshareddata/xcschemes/CronetTests.xcscheme @@ -1,6 +1,6 @@ @@ -32,9 +32,9 @@ skipped = "NO"> @@ -43,7 +43,7 @@ @@ -73,9 +73,9 @@ diff --git a/src/objective-c/tests/Tests.xcodeproj/xcshareddata/xcschemes/CronetUnitTests.xcscheme b/src/objective-c/tests/Tests.xcodeproj/xcshareddata/xcschemes/CronetUnitTests.xcscheme deleted file mode 100644 index ea711e09e97..00000000000 --- a/src/objective-c/tests/Tests.xcodeproj/xcshareddata/xcschemes/CronetUnitTests.xcscheme +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/objective-c/tests/Tests.xcodeproj/xcshareddata/xcschemes/InteropTestsRemote.xcscheme b/src/objective-c/tests/Tests.xcodeproj/xcshareddata/xcschemes/InteropTests.xcscheme similarity index 75% rename from src/objective-c/tests/Tests.xcodeproj/xcshareddata/xcschemes/InteropTestsRemote.xcscheme rename to src/objective-c/tests/Tests.xcodeproj/xcshareddata/xcschemes/InteropTests.xcscheme index 412bf6a0143..a2b1614b991 100644 --- a/src/objective-c/tests/Tests.xcodeproj/xcshareddata/xcschemes/InteropTestsRemote.xcscheme +++ b/src/objective-c/tests/Tests.xcodeproj/xcshareddata/xcschemes/InteropTests.xcscheme @@ -1,6 +1,6 @@ + buildForAnalyzing = "NO"> @@ -32,9 +32,9 @@ skipped = "NO"> @@ -44,20 +44,11 @@ - - - - @@ -84,9 +75,18 @@ savedToolIdentifier = "" useCustomWorkingDirectory = "NO" debugDocumentVersioning = "YES"> + + + + + buildConfiguration = "Debug"> - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/objective-c/tests/Tests.xcodeproj/xcshareddata/xcschemes/InteropTestsLocalCleartext.xcscheme b/src/objective-c/tests/Tests.xcodeproj/xcshareddata/xcschemes/InteropTestsLocalCleartext.xcscheme deleted file mode 100644 index 11b41c92140..00000000000 --- a/src/objective-c/tests/Tests.xcodeproj/xcshareddata/xcschemes/InteropTestsLocalCleartext.xcscheme +++ /dev/null @@ -1,95 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/objective-c/tests/Tests.xcodeproj/xcshareddata/xcschemes/InteropTestsLocalCleartextCFStream.xcscheme b/src/objective-c/tests/Tests.xcodeproj/xcshareddata/xcschemes/InteropTestsLocalCleartextCFStream.xcscheme deleted file mode 100644 index fe766de928e..00000000000 --- a/src/objective-c/tests/Tests.xcodeproj/xcshareddata/xcschemes/InteropTestsLocalCleartextCFStream.xcscheme +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/objective-c/tests/Tests.xcodeproj/xcshareddata/xcschemes/InteropTestsLocalSSL.xcscheme b/src/objective-c/tests/Tests.xcodeproj/xcshareddata/xcschemes/InteropTestsLocalSSL.xcscheme deleted file mode 100644 index 37135b3ad36..00000000000 --- a/src/objective-c/tests/Tests.xcodeproj/xcshareddata/xcschemes/InteropTestsLocalSSL.xcscheme +++ /dev/null @@ -1,95 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/objective-c/tests/Tests.xcodeproj/xcshareddata/xcschemes/InteropTestsLocalSSLCFStream.xcscheme b/src/objective-c/tests/Tests.xcodeproj/xcshareddata/xcschemes/InteropTestsLocalSSLCFStream.xcscheme deleted file mode 100644 index bd663276493..00000000000 --- a/src/objective-c/tests/Tests.xcodeproj/xcshareddata/xcschemes/InteropTestsLocalSSLCFStream.xcscheme +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/objective-c/tests/Tests.xcodeproj/xcshareddata/xcschemes/InteropTestsMultipleChannels.xcscheme b/src/objective-c/tests/Tests.xcodeproj/xcshareddata/xcschemes/InteropTestsMultipleChannels.xcscheme deleted file mode 100644 index 1b4c1f5e51c..00000000000 --- a/src/objective-c/tests/Tests.xcodeproj/xcshareddata/xcschemes/InteropTestsMultipleChannels.xcscheme +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/objective-c/tests/Tests.xcodeproj/xcshareddata/xcschemes/InteropTestsRemoteCFStream.xcscheme b/src/objective-c/tests/Tests.xcodeproj/xcshareddata/xcschemes/InteropTestsRemoteCFStream.xcscheme deleted file mode 100644 index 33a5ded038b..00000000000 --- a/src/objective-c/tests/Tests.xcodeproj/xcshareddata/xcschemes/InteropTestsRemoteCFStream.xcscheme +++ /dev/null @@ -1,61 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/objective-c/tests/Tests.xcodeproj/xcshareddata/xcschemes/InteropTestsRemoteWithCronet.xcscheme b/src/objective-c/tests/Tests.xcodeproj/xcshareddata/xcschemes/InteropTestsRemoteWithCronet.xcscheme deleted file mode 100644 index 1d211115f75..00000000000 --- a/src/objective-c/tests/Tests.xcodeproj/xcshareddata/xcschemes/InteropTestsRemoteWithCronet.xcscheme +++ /dev/null @@ -1,104 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/objective-c/tests/Tests.xcodeproj/xcshareddata/xcschemes/MacTests.xcscheme b/src/objective-c/tests/Tests.xcodeproj/xcshareddata/xcschemes/MacTests.xcscheme index f84ac7fc741..fbd2d08f219 100644 --- a/src/objective-c/tests/Tests.xcodeproj/xcshareddata/xcschemes/MacTests.xcscheme +++ b/src/objective-c/tests/Tests.xcodeproj/xcshareddata/xcschemes/MacTests.xcscheme @@ -51,7 +51,7 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/objective-c/tests/Tests.xcodeproj/xcshareddata/xcschemes/Tests.xcscheme b/src/objective-c/tests/Tests.xcodeproj/xcshareddata/xcschemes/Tests.xcscheme deleted file mode 100644 index 77f567db3d4..00000000000 --- a/src/objective-c/tests/Tests.xcodeproj/xcshareddata/xcschemes/Tests.xcscheme +++ /dev/null @@ -1,80 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/objective-c/tests/Tests.xcodeproj/xcshareddata/xcschemes/UnitTests.xcscheme b/src/objective-c/tests/Tests.xcodeproj/xcshareddata/xcschemes/UnitTests.xcscheme index 3af3555f48e..d20a9e5ae7b 100644 --- a/src/objective-c/tests/Tests.xcodeproj/xcshareddata/xcschemes/UnitTests.xcscheme +++ b/src/objective-c/tests/Tests.xcodeproj/xcshareddata/xcschemes/UnitTests.xcscheme @@ -23,10 +23,9 @@ -#import "version.h" +#import "../version.h" #define TEST_TIMEOUT 16 diff --git a/src/objective-c/tests/UnitTests/Info.plist b/src/objective-c/tests/UnitTests/Info.plist deleted file mode 100644 index 6c40a6cd0c4..00000000000 --- a/src/objective-c/tests/UnitTests/Info.plist +++ /dev/null @@ -1,22 +0,0 @@ - - - - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - BNDL - CFBundleShortVersionString - 1.0 - CFBundleVersion - 1 - - diff --git a/src/objective-c/tests/UnitTests/UnitTests.m b/src/objective-c/tests/UnitTests/NSErrorUnitTests.m similarity index 96% rename from src/objective-c/tests/UnitTests/UnitTests.m rename to src/objective-c/tests/UnitTests/NSErrorUnitTests.m index 4dcb8c08d28..8a4f03a4460 100644 --- a/src/objective-c/tests/UnitTests/UnitTests.m +++ b/src/objective-c/tests/UnitTests/NSErrorUnitTests.m @@ -22,11 +22,11 @@ #import "../../GRPCClient/private/NSError+GRPC.h" -@interface UnitTests : XCTestCase +@interface NSErrorUnitTests : XCTestCase @end -@implementation UnitTests +@implementation NSErrorUnitTests - (void)testNSError { const char *kDetails = "test details"; diff --git a/src/objective-c/tests/RxLibraryUnitTests.m b/src/objective-c/tests/UnitTests/RxLibraryUnitTests.m similarity index 100% rename from src/objective-c/tests/RxLibraryUnitTests.m rename to src/objective-c/tests/UnitTests/RxLibraryUnitTests.m diff --git a/src/objective-c/tests/run_tests.sh b/src/objective-c/tests/run_tests.sh index 8c768cb85be..24185c561ec 100755 --- a/src/objective-c/tests/run_tests.sh +++ b/src/objective-c/tests/run_tests.sh @@ -43,98 +43,12 @@ XCODEBUILD_FILTER='(^CompileC |^Ld |^ *[^ ]*clang |^ *cd |^ *export |^Libtool |^ echo "TIME: $(date)" -# Retry the test for up to 3 times when return code is 65, due to Xcode issue: -# http://www.openradar.me/29785686 -# The issue seems to be a connectivity issue to Xcode simulator so only retry -# the first xcodebuild command -retries=0 -while [ $retries -lt 3 ]; do - return_code=0 - out=$(xcodebuild \ - -workspace Tests.xcworkspace \ - -scheme AllTests \ - -destination name="iPhone 8" \ - HOST_PORT_LOCALSSL=localhost:5051 \ - HOST_PORT_LOCAL=localhost:5050 \ - HOST_PORT_REMOTE=grpc-test.sandbox.googleapis.com \ - test 2>&1 \ - | egrep -v "$XCODEBUILD_FILTER" \ - | egrep -v '^$' \ - | egrep -v "(GPBDictionary|GPBArray)" - ) || return_code=$? - if [ $return_code == 65 ] && [[ $out == *"DTXProxyChannel error 1"* ]]; then - echo "$out" - echo "Failed with code 65 (DTXProxyChannel error 1); retry." - retries=$(($retries+1)) - elif [ $return_code == 0 ]; then - echo "$out" - break - else - echo "$out" - echo "Failed with code $return_code." - exit 1 - fi -done -if [ $retries == 3 ]; then - echo "Failed with code 65 for 3 times; abort." - exit 1 -fi - -echo "TIME: $(date)" -xcodebuild \ - -workspace Tests.xcworkspace \ - -scheme CoreCronetEnd2EndTests \ - -destination name="iPhone 8" \ - test \ - | egrep -v "$XCODEBUILD_FILTER" \ - | egrep -v '^$' \ - | egrep -v "(GPBDictionary|GPBArray)" - - -echo "TIME: $(date)" -xcodebuild \ - -workspace Tests.xcworkspace \ - -scheme CoreCronetEnd2EndTests_Asan \ - -destination name="iPhone 6" \ - test \ - | egrep -v "$XCODEBUILD_FILTER" \ - | egrep -v '^$' \ - | egrep -v "(GPBDictionary|GPBArray)" - - -echo "TIME: $(date)" -xcodebuild \ - -workspace Tests.xcworkspace \ - -scheme CoreCronetEnd2EndTests_Tsan \ - -destination name="iPhone 6" \ - test \ - | egrep -v "$XCODEBUILD_FILTER" \ - | egrep -v '^$' \ - | egrep -v "(GPBDictionary|GPBArray)" - - -echo "TIME: $(date)" -xcodebuild \ - -workspace Tests.xcworkspace \ - -scheme CronetUnitTests \ - -destination name="iPhone 8" \ - test \ - | egrep -v "$XCODEBUILD_FILTER" \ - | egrep -v '^$' \ - | egrep -v "(GPBDictionary|GPBArray)" - - -echo "TIME: $(date)" -xcodebuild \ - -workspace Tests.xcworkspace \ - -scheme InteropTestsRemoteWithCronet \ - -destination name="iPhone 8" \ - HOST_PORT_REMOTE=grpc-test.sandbox.googleapis.com \ - test \ - | egrep -v "$XCODEBUILD_FILTER" \ - | egrep -v '^$' \ - | egrep -v "(GPBDictionary|GPBArray)" - - -echo "TIME: $(date)" xcodebuild \ -workspace Tests.xcworkspace \ - -scheme InteropTestsRemoteCFStream \ + -scheme InteropTests \ -destination name="iPhone 8" \ + HOST_PORT_LOCALSSL=localhost:5051 \ + HOST_PORT_LOCAL=localhost:5050 \ HOST_PORT_REMOTE=grpc-test.sandbox.googleapis.com \ test \ | egrep -v "$XCODEBUILD_FILTER" \ @@ -144,9 +58,11 @@ xcodebuild \ echo "TIME: $(date)" xcodebuild \ -workspace Tests.xcworkspace \ - -scheme InteropTestsLocalCleartextCFStream \ + -scheme UnitTests \ -destination name="iPhone 8" \ + HOST_PORT_LOCALSSL=localhost:5051 \ HOST_PORT_LOCAL=localhost:5050 \ + HOST_PORT_REMOTE=grpc-test.sandbox.googleapis.com \ test \ | egrep -v "$XCODEBUILD_FILTER" \ | egrep -v '^$' \ @@ -155,39 +71,9 @@ xcodebuild \ echo "TIME: $(date)" xcodebuild \ -workspace Tests.xcworkspace \ - -scheme InteropTestsLocalSSLCFStream \ + -scheme CronetTests \ -destination name="iPhone 8" \ HOST_PORT_LOCALSSL=localhost:5051 \ - test \ - | egrep -v "$XCODEBUILD_FILTER" \ - | egrep -v '^$' \ - | egrep -v "(GPBDictionary|GPBArray)" - - -echo "TIME: $(date)" -xcodebuild \ - -workspace Tests.xcworkspace \ - -scheme UnitTests \ - -destination name="iPhone 8" \ - test \ - | egrep -v "$XCODEBUILD_FILTER" \ - | egrep -v '^$' \ - | egrep -v "(GPBDictionary|GPBArray)" - - -echo "TIME: $(date)" -xcodebuild \ - -workspace Tests.xcworkspace \ - -scheme ChannelTests \ - -destination name="iPhone 8" \ - test \ - | egrep -v "$XCODEBUILD_FILTER" \ - | egrep -v '^$' \ - | egrep -v "(GPBDictionary|GPBArray)" - - -echo "TIME: $(date)" -xcodebuild \ - -workspace Tests.xcworkspace \ - -scheme APIv2Tests \ - -destination name="iPhone 8" \ HOST_PORT_LOCAL=localhost:5050 \ HOST_PORT_REMOTE=grpc-test.sandbox.googleapis.com \ test \ From 7e8dec516ba4fe886dcdbc57fa3a4ab772004cf7 Mon Sep 17 00:00:00 2001 From: Muxi Yan Date: Tue, 30 Apr 2019 13:52:37 -0700 Subject: [PATCH 08/83] Unify deployment target --- .../tests/Tests.xcodeproj/project.pbxproj | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/src/objective-c/tests/Tests.xcodeproj/project.pbxproj b/src/objective-c/tests/Tests.xcodeproj/project.pbxproj index 1295731641b..1f05899bd60 100644 --- a/src/objective-c/tests/Tests.xcodeproj/project.pbxproj +++ b/src/objective-c/tests/Tests.xcodeproj/project.pbxproj @@ -877,7 +877,6 @@ ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = gnu11; INFOPLIST_FILE = Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 11.2; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = io.grpc.UnitTests; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -907,7 +906,6 @@ CODE_SIGN_STYLE = Automatic; GCC_C_LANGUAGE_STANDARD = gnu11; INFOPLIST_FILE = Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 11.2; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = io.grpc.UnitTests; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -937,7 +935,6 @@ CODE_SIGN_STYLE = Automatic; GCC_C_LANGUAGE_STANDARD = gnu11; INFOPLIST_FILE = Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 11.2; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = io.grpc.UnitTests; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -967,7 +964,6 @@ CODE_SIGN_STYLE = Automatic; GCC_C_LANGUAGE_STANDARD = gnu11; INFOPLIST_FILE = Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 11.2; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = io.grpc.UnitTests; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -1054,7 +1050,6 @@ GCC_C_LANGUAGE_STANDARD = gnu11; GCC_WARN_INHIBIT_ALL_WARNINGS = YES; INFOPLIST_FILE = Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 12.1; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; @@ -1094,7 +1089,6 @@ GCC_C_LANGUAGE_STANDARD = gnu11; GCC_WARN_INHIBIT_ALL_WARNINGS = YES; INFOPLIST_FILE = Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 12.1; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; MTL_FAST_MATH = YES; PRODUCT_BUNDLE_IDENTIFIER = io.grpc.CronetTests; @@ -1133,7 +1127,6 @@ GCC_C_LANGUAGE_STANDARD = gnu11; GCC_WARN_INHIBIT_ALL_WARNINGS = YES; INFOPLIST_FILE = Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 12.1; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; MTL_FAST_MATH = YES; PRODUCT_BUNDLE_IDENTIFIER = io.grpc.CronetTests; @@ -1172,7 +1165,6 @@ GCC_C_LANGUAGE_STANDARD = gnu11; GCC_WARN_INHIBIT_ALL_WARNINGS = YES; INFOPLIST_FILE = Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 12.1; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; MTL_FAST_MATH = YES; PRODUCT_BUNDLE_IDENTIFIER = io.grpc.CronetTests; @@ -1208,7 +1200,6 @@ ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = gnu11; INFOPLIST_FILE = Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 12.1; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; @@ -1242,7 +1233,6 @@ CODE_SIGN_STYLE = Automatic; GCC_C_LANGUAGE_STANDARD = gnu11; INFOPLIST_FILE = Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 12.1; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; MTL_FAST_MATH = YES; PRODUCT_BUNDLE_IDENTIFIER = io.grpc.InteropTests; @@ -1275,7 +1265,6 @@ CODE_SIGN_STYLE = Automatic; GCC_C_LANGUAGE_STANDARD = gnu11; INFOPLIST_FILE = Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 12.1; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; MTL_FAST_MATH = YES; PRODUCT_BUNDLE_IDENTIFIER = io.grpc.InteropTests; @@ -1308,7 +1297,6 @@ CODE_SIGN_STYLE = Automatic; GCC_C_LANGUAGE_STANDARD = gnu11; INFOPLIST_FILE = Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 12.1; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; MTL_FAST_MATH = YES; PRODUCT_BUNDLE_IDENTIFIER = io.grpc.InteropTests; From 2e8e7e4838ecf179cbb2ee8e943c27cec6dc7668 Mon Sep 17 00:00:00 2001 From: Muxi Yan Date: Tue, 30 Apr 2019 16:56:43 -0700 Subject: [PATCH 09/83] Initialize Cronet only once --- src/objective-c/tests/InteropTests/InteropTests.m | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/objective-c/tests/InteropTests/InteropTests.m b/src/objective-c/tests/InteropTests/InteropTests.m index 164d571d125..260afb83e6f 100644 --- a/src/objective-c/tests/InteropTests/InteropTests.m +++ b/src/objective-c/tests/InteropTests/InteropTests.m @@ -110,10 +110,13 @@ BOOL isRemoteInteropTest(NSString *host) { + (void)setUp { NSLog(@"InteropTest Started, class: %@", [[self class] description]); #ifdef GRPC_COMPILE_WITH_CRONET - // Cronet setup - [Cronet setHttp2Enabled:YES]; - [Cronet start]; - [GRPCCall useCronetWithEngine:[Cronet getGlobalEngine]]; + static dispatch_once_t *enableCronet; + dispatch_once(enableCronet, ^{ + // Cronet setup + [Cronet setHttp2Enabled:YES]; + [Cronet start]; + [GRPCCall useCronetWithEngine:[Cronet getGlobalEngine]]; + }); #endif #ifdef GRPC_CFSTREAM setenv(kCFStreamVarName, "1", 1); From d6c98bf82e46daed0841382d59d112a36979fb17 Mon Sep 17 00:00:00 2001 From: Muxi Yan Date: Tue, 30 Apr 2019 18:25:06 -0700 Subject: [PATCH 10/83] Fix Cronet multiple initialization problem --- .../CronetTests/CoreCronetEnd2EndTests.mm | 10 ++--- .../tests/CronetTests/CronetUnitTests.mm | 13 ++----- .../InteropTestsRemoteWithCronet.m | 4 ++ src/objective-c/tests/EnableCronet.h | 34 +++++++++++++++++ src/objective-c/tests/EnableCronet.m | 38 +++++++++++++++++++ .../tests/InteropTests/InteropTests.h | 5 +++ .../tests/InteropTests/InteropTests.m | 14 ++++--- .../tests/Tests.xcodeproj/project.pbxproj | 8 ++++ .../xcschemes/CronetTests.xcscheme | 5 +++ 9 files changed, 108 insertions(+), 23 deletions(-) create mode 100644 src/objective-c/tests/EnableCronet.h create mode 100644 src/objective-c/tests/EnableCronet.m diff --git a/src/objective-c/tests/CronetTests/CoreCronetEnd2EndTests.mm b/src/objective-c/tests/CronetTests/CoreCronetEnd2EndTests.mm index 2fac1be3d0e..3a753d4a4a4 100644 --- a/src/objective-c/tests/CronetTests/CoreCronetEnd2EndTests.mm +++ b/src/objective-c/tests/CronetTests/CoreCronetEnd2EndTests.mm @@ -49,6 +49,8 @@ #import #include +#import "../EnableCronet.h" + typedef struct fullstack_secure_fixture_data { char *localaddr; } fullstack_secure_fixture_data; @@ -176,13 +178,7 @@ static char *roots_filename; grpc_init(); - [Cronet setHttp2Enabled:YES]; - [Cronet enableTestCertVerifierForTesting]; - NSURL *url = [[[NSFileManager defaultManager] URLsForDirectory:NSDocumentDirectory - inDomains:NSUserDomainMask] lastObject]; - NSLog(@"Documents directory: %@", url); - [Cronet start]; - [Cronet startNetLogToFile:@"cronet_netlog.json" logBytes:YES]; + enableCronet(); } // The tearDown() function is run after all test cases finish running diff --git a/src/objective-c/tests/CronetTests/CronetUnitTests.mm b/src/objective-c/tests/CronetTests/CronetUnitTests.mm index 2a861032caf..b17bc334479 100644 --- a/src/objective-c/tests/CronetTests/CronetUnitTests.mm +++ b/src/objective-c/tests/CronetTests/CronetUnitTests.mm @@ -20,6 +20,8 @@ #import #import +#import "../EnableCronet.h" + #import #import #import @@ -61,16 +63,7 @@ static void drain_cq(grpc_completion_queue *cq) { grpc_test_init(1, argv); grpc_init(); - - [Cronet setHttp2Enabled:YES]; - [Cronet setSslKeyLogFileName:@"Documents/key"]; - [Cronet enableTestCertVerifierForTesting]; - NSURL *url = [[[NSFileManager defaultManager] URLsForDirectory:NSDocumentDirectory - inDomains:NSUserDomainMask] lastObject]; - NSLog(@"Documents directory: %@", url); - [Cronet start]; - [Cronet startNetLogToFile:@"Documents/cronet_netlog.json" logBytes:YES]; - + enableCronet(); init_ssl(); } diff --git a/src/objective-c/tests/CronetTests/InteropTestsRemoteWithCronet.m b/src/objective-c/tests/CronetTests/InteropTestsRemoteWithCronet.m index 25041ae5eb1..a2a79c46316 100644 --- a/src/objective-c/tests/CronetTests/InteropTestsRemoteWithCronet.m +++ b/src/objective-c/tests/CronetTests/InteropTestsRemoteWithCronet.m @@ -44,6 +44,10 @@ static int32_t kRemoteInteropServerOverhead = 12; return kRemoteSSLHost; } ++ (BOOL)useCronet { + return YES; +} + - (int32_t)encodingOverhead { return kRemoteInteropServerOverhead; // bytes } diff --git a/src/objective-c/tests/EnableCronet.h b/src/objective-c/tests/EnableCronet.h new file mode 100644 index 00000000000..e544e76345d --- /dev/null +++ b/src/objective-c/tests/EnableCronet.h @@ -0,0 +1,34 @@ +/* + * + * Copyright 2019 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +#ifdef GRPC_COMPILE_WITH_CRONET + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * Enable Cronet for once. + */ +void enableCronet(); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/src/objective-c/tests/EnableCronet.m b/src/objective-c/tests/EnableCronet.m new file mode 100644 index 00000000000..ff6e4612d88 --- /dev/null +++ b/src/objective-c/tests/EnableCronet.m @@ -0,0 +1,38 @@ +/* + * + * Copyright 2019 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +#ifdef GRPC_COMPILE_WITH_CRONET + +#import +#import "EnableCronet.h" + +void enableCronet(void) { + static dispatch_once_t enableCronet; + dispatch_once(&enableCronet, ^{ + [Cronet setHttp2Enabled:YES]; + [Cronet setSslKeyLogFileName:@"Documents/key"]; + [Cronet enableTestCertVerifierForTesting]; + NSURL *url = [[[NSFileManager defaultManager] URLsForDirectory:NSDocumentDirectory + inDomains:NSUserDomainMask] lastObject]; + NSLog(@"Documents directory: %@", url); + [Cronet start]; + [Cronet startNetLogToFile:@"cronet_netlog.json" logBytes:YES]; + }); +} + +#endif diff --git a/src/objective-c/tests/InteropTests/InteropTests.h b/src/objective-c/tests/InteropTests/InteropTests.h index 038f24b62e5..cffa90ac497 100644 --- a/src/objective-c/tests/InteropTests/InteropTests.h +++ b/src/objective-c/tests/InteropTests/InteropTests.h @@ -59,4 +59,9 @@ */ + (NSString *)hostNameOverride; +/** + * Whether to use Cronet for all the v1 API tests in the test suite. + */ ++ (BOOL)useCronet; + @end diff --git a/src/objective-c/tests/InteropTests/InteropTests.m b/src/objective-c/tests/InteropTests/InteropTests.m index 260afb83e6f..3204f689c48 100644 --- a/src/objective-c/tests/InteropTests/InteropTests.m +++ b/src/objective-c/tests/InteropTests/InteropTests.m @@ -37,6 +37,7 @@ #import #import "InteropTestsBlockCallbacks.h" +#import "../enableCronet.h" #define TEST_TIMEOUT 32 @@ -107,16 +108,17 @@ BOOL isRemoteInteropTest(NSString *host) { return nil; } ++ (BOOL)useCronet { + return NO; +} + + (void)setUp { NSLog(@"InteropTest Started, class: %@", [[self class] description]); #ifdef GRPC_COMPILE_WITH_CRONET - static dispatch_once_t *enableCronet; - dispatch_once(enableCronet, ^{ - // Cronet setup - [Cronet setHttp2Enabled:YES]; - [Cronet start]; + enableCronet(); + if ([self useCronet]) { [GRPCCall useCronetWithEngine:[Cronet getGlobalEngine]]; - }); + } #endif #ifdef GRPC_CFSTREAM setenv(kCFStreamVarName, "1", 1); diff --git a/src/objective-c/tests/Tests.xcodeproj/project.pbxproj b/src/objective-c/tests/Tests.xcodeproj/project.pbxproj index 1f05899bd60..c226e29d83b 100644 --- a/src/objective-c/tests/Tests.xcodeproj/project.pbxproj +++ b/src/objective-c/tests/Tests.xcodeproj/project.pbxproj @@ -11,6 +11,8 @@ 5E3F14842278B461007C6D90 /* InteropTestsBlockCallbacks.m in Sources */ = {isa = PBXBuildFile; fileRef = 5E3F14832278B461007C6D90 /* InteropTestsBlockCallbacks.m */; }; 5E3F14852278BF5D007C6D90 /* InteropTestsBlockCallbacks.m in Sources */ = {isa = PBXBuildFile; fileRef = 5E3F14832278B461007C6D90 /* InteropTestsBlockCallbacks.m */; }; 5E3F14862278BFFF007C6D90 /* InteropTestsBlockCallbacks.m in Sources */ = {isa = PBXBuildFile; fileRef = 5E3F14832278B461007C6D90 /* InteropTestsBlockCallbacks.m */; }; + 5E3F148D22792856007C6D90 /* EnableCronet.m in Sources */ = {isa = PBXBuildFile; fileRef = 5E3F1487227918AA007C6D90 /* EnableCronet.m */; }; + 5E3F148E22792AF5007C6D90 /* EnableCronet.m in Sources */ = {isa = PBXBuildFile; fileRef = 5E3F1487227918AA007C6D90 /* EnableCronet.m */; }; 5E7F486422775B37006656AD /* InteropTestsRemoteWithCronet.m in Sources */ = {isa = PBXBuildFile; fileRef = 5EE84BF31D4717E40050C6CC /* InteropTestsRemoteWithCronet.m */; }; 5E7F486522775B41006656AD /* CronetUnitTests.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5EAD6D261E27047400002378 /* CronetUnitTests.mm */; }; 5E7F486E22778086006656AD /* CoreCronetEnd2EndTests.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5E7F486D22778086006656AD /* CoreCronetEnd2EndTests.mm */; }; @@ -92,6 +94,8 @@ 5E0282E8215AA697007AC99D /* NSErrorUnitTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = NSErrorUnitTests.m; sourceTree = ""; }; 5E3F14822278B42D007C6D90 /* InteropTestsBlockCallbacks.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = InteropTestsBlockCallbacks.h; sourceTree = ""; }; 5E3F14832278B461007C6D90 /* InteropTestsBlockCallbacks.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = InteropTestsBlockCallbacks.m; sourceTree = ""; }; + 5E3F1487227918AA007C6D90 /* EnableCronet.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = EnableCronet.m; sourceTree = ""; }; + 5E3F148A227918C4007C6D90 /* EnableCronet.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = EnableCronet.h; sourceTree = ""; }; 5E7F485922775B15006656AD /* CronetTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = CronetTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 5E7F486622776AD8006656AD /* Cronet.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cronet.framework; path = Pods/CronetFramework/Cronet.framework; sourceTree = ""; }; 5E7F486D22778086006656AD /* CoreCronetEnd2EndTests.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = CoreCronetEnd2EndTests.mm; sourceTree = ""; }; @@ -392,6 +396,8 @@ 635697C91B14FC11007A7283 /* Tests */ = { isa = PBXGroup; children = ( + 5E3F148A227918C4007C6D90 /* EnableCronet.h */, + 5E3F1487227918AA007C6D90 /* EnableCronet.m */, 5EAFE8271F8EFB87007F2189 /* version.h */, 635697D71B14FC11007A7283 /* Supporting Files */, ); @@ -813,6 +819,7 @@ buildActionMask = 2147483647; files = ( 5E3F14852278BF5D007C6D90 /* InteropTestsBlockCallbacks.m in Sources */, + 5E3F148D22792856007C6D90 /* EnableCronet.m in Sources */, 5E7F486E22778086006656AD /* CoreCronetEnd2EndTests.mm in Sources */, 5E7F488522778A88006656AD /* InteropTests.m in Sources */, 5E7F486422775B37006656AD /* InteropTestsRemoteWithCronet.m in Sources */, @@ -825,6 +832,7 @@ buildActionMask = 2147483647; files = ( 5E3F14842278B461007C6D90 /* InteropTestsBlockCallbacks.m in Sources */, + 5E3F148E22792AF5007C6D90 /* EnableCronet.m in Sources */, 5E7F488922778B04006656AD /* InteropTestsRemote.m in Sources */, 5E7F487922778226006656AD /* InteropTestsMultipleChannels.m in Sources */, 5EA477042273617B000F72FC /* InteropTestsLocalCleartext.m in Sources */, diff --git a/src/objective-c/tests/Tests.xcodeproj/xcshareddata/xcschemes/CronetTests.xcscheme b/src/objective-c/tests/Tests.xcodeproj/xcshareddata/xcschemes/CronetTests.xcscheme index aea349a06cc..ac8cfc971c8 100644 --- a/src/objective-c/tests/Tests.xcodeproj/xcshareddata/xcschemes/CronetTests.xcscheme +++ b/src/objective-c/tests/Tests.xcodeproj/xcshareddata/xcschemes/CronetTests.xcscheme @@ -37,6 +37,11 @@ BlueprintName = "CronetTests" ReferencedContainer = "container:Tests.xcodeproj"> + + + + From 8f0934d739c340824ff070c76c75000928fa83e5 Mon Sep 17 00:00:00 2001 From: Muxi Yan Date: Wed, 1 May 2019 11:39:01 -0700 Subject: [PATCH 11/83] Another Cronet mulitple initialization problem --- .../tests/InteropTests/InteropTestsMultipleChannels.m | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/objective-c/tests/InteropTests/InteropTestsMultipleChannels.m b/src/objective-c/tests/InteropTests/InteropTestsMultipleChannels.m index c0beb107fad..506d7807de2 100644 --- a/src/objective-c/tests/InteropTests/InteropTestsMultipleChannels.m +++ b/src/objective-c/tests/InteropTests/InteropTestsMultipleChannels.m @@ -27,6 +27,7 @@ #import #import "InteropTestsBlockCallbacks.h" +#import "../EnableCronet" #define NSStringize_helper(x) #x #define NSStringize(x) @NSStringize_helper(x) @@ -88,10 +89,7 @@ dispatch_once_t initCronet; _remoteService = [RMTTestService serviceWithHost:kRemoteSSLHost callOptions:nil]; - dispatch_once(&initCronet, ^{ - [Cronet setHttp2Enabled:YES]; - [Cronet start]; - }); + enableCronet(); // Default stack with remote host GRPCMutableCallOptions *options = [[GRPCMutableCallOptions alloc] init]; From a0cf95a88abc573882329ac9ea4e7d7544725b15 Mon Sep 17 00:00:00 2001 From: Muxi Yan Date: Wed, 1 May 2019 11:40:11 -0700 Subject: [PATCH 12/83] Add log to debug --- src/objective-c/tests/EnableCronet.m | 1 + 1 file changed, 1 insertion(+) diff --git a/src/objective-c/tests/EnableCronet.m b/src/objective-c/tests/EnableCronet.m index ff6e4612d88..b618ec74706 100644 --- a/src/objective-c/tests/EnableCronet.m +++ b/src/objective-c/tests/EnableCronet.m @@ -24,6 +24,7 @@ void enableCronet(void) { static dispatch_once_t enableCronet; dispatch_once(&enableCronet, ^{ + NSLog(@"enableCronet()"); [Cronet setHttp2Enabled:YES]; [Cronet setSslKeyLogFileName:@"Documents/key"]; [Cronet enableTestCertVerifierForTesting]; From f9defc92794d2ee3bcd7db729bea77c0d06c206e Mon Sep 17 00:00:00 2001 From: Muxi Yan Date: Wed, 1 May 2019 13:12:32 -0700 Subject: [PATCH 13/83] prototype issue --- src/objective-c/tests/EnableCronet.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/objective-c/tests/EnableCronet.h b/src/objective-c/tests/EnableCronet.h index e544e76345d..720aace4075 100644 --- a/src/objective-c/tests/EnableCronet.h +++ b/src/objective-c/tests/EnableCronet.h @@ -25,7 +25,7 @@ extern "C" { /** * Enable Cronet for once. */ -void enableCronet(); +void enableCronet(void); #ifdef __cplusplus } From bcbff503ec3f3afd87978822a29b19dc9b4fddf6 Mon Sep 17 00:00:00 2001 From: Muxi Yan Date: Wed, 1 May 2019 14:20:26 -0700 Subject: [PATCH 14/83] nit --- src/objective-c/tests/InteropTests/InteropTests.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/objective-c/tests/InteropTests/InteropTests.m b/src/objective-c/tests/InteropTests/InteropTests.m index 3204f689c48..91fdd0fd841 100644 --- a/src/objective-c/tests/InteropTests/InteropTests.m +++ b/src/objective-c/tests/InteropTests/InteropTests.m @@ -37,7 +37,7 @@ #import #import "InteropTestsBlockCallbacks.h" -#import "../enableCronet.h" +#import "../EnableCronet.h" #define TEST_TIMEOUT 32 From 4ca3431715e660a08d94e1776837269867768cf1 Mon Sep 17 00:00:00 2001 From: Muxi Yan Date: Wed, 1 May 2019 15:48:11 -0700 Subject: [PATCH 15/83] nit fix --- .../tests/InteropTests/InteropTestsMultipleChannels.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/objective-c/tests/InteropTests/InteropTestsMultipleChannels.m b/src/objective-c/tests/InteropTests/InteropTestsMultipleChannels.m index 506d7807de2..58946825f98 100644 --- a/src/objective-c/tests/InteropTests/InteropTestsMultipleChannels.m +++ b/src/objective-c/tests/InteropTests/InteropTestsMultipleChannels.m @@ -27,7 +27,7 @@ #import #import "InteropTestsBlockCallbacks.h" -#import "../EnableCronet" +#import "../EnableCronet.h" #define NSStringize_helper(x) #x #define NSStringize(x) @NSStringize_helper(x) From 4e711fab644fb30c2e0cae6cb7f01aa56e9dbd75 Mon Sep 17 00:00:00 2001 From: Yash Tibrewal Date: Mon, 13 May 2019 13:51:14 -0700 Subject: [PATCH 16/83] Add method to validate and set service config json --- .../grpcpp/support/channel_arguments_impl.h | 23 ++++++++++++++++++- src/cpp/common/channel_arguments.cc | 15 +++++++++++- .../end2end/service_config_end2end_test.cc | 8 ++++++- 3 files changed, 43 insertions(+), 3 deletions(-) diff --git a/include/grpcpp/support/channel_arguments_impl.h b/include/grpcpp/support/channel_arguments_impl.h index 0efeadca880..631992d28c3 100644 --- a/include/grpcpp/support/channel_arguments_impl.h +++ b/include/grpcpp/support/channel_arguments_impl.h @@ -40,8 +40,24 @@ class SecureChannelCredentials; /// Options for channel creation. The user can use generic setters to pass /// key value pairs down to C channel creation code. For gRPC related options, /// concrete setters are provided. -class ChannelArguments { +class ChannelArguments : private ::grpc::GrpcLibraryCodegen { public: + /// NOTE: class experimental_type is not part of the public API of this class. + /// TODO(yashykt): Integrate into public API when this is no longer + /// experimental. + class experimental_type { + public: + explicit experimental_type(ChannelArguments* args) : args_(args) {} + + /// Validates \a service_config_json. If valid, set the service config and + /// returns an empty string. If invalid, returns the validation error. + grpc::string ValidateAndSetServiceConfigJSON( + const grpc::string& service_config_json); + + private: + ChannelArguments* args_; + }; + ChannelArguments(); ~ChannelArguments(); @@ -125,6 +141,11 @@ class ChannelArguments { return out; } + /// NOTE: The function experimental() is not stable public API. It is a view + /// to the experimental components of this class. It may be changed or removed + /// at any time. + experimental_type experimental() { return experimental_type(this); } + private: friend class grpc_impl::SecureChannelCredentials; friend class grpc::testing::ChannelArgumentsTest; diff --git a/src/cpp/common/channel_arguments.cc b/src/cpp/common/channel_arguments.cc index 932139890fe..faea3316c58 100644 --- a/src/cpp/common/channel_arguments.cc +++ b/src/cpp/common/channel_arguments.cc @@ -23,6 +23,7 @@ #include #include #include +#include "src/core/ext/filters/client_channel/service_config.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/iomgr/socket_mutator.h" @@ -35,7 +36,7 @@ ChannelArguments::ChannelArguments() { } ChannelArguments::ChannelArguments(const ChannelArguments& other) - : strings_(other.strings_) { + : ::grpc::GrpcLibraryCodegen(), strings_(other.strings_) { args_.reserve(other.args_.size()); auto list_it_dst = strings_.begin(); auto list_it_src = other.strings_.begin(); @@ -215,4 +216,16 @@ void ChannelArguments::SetChannelArgs(grpc_channel_args* channel_args) const { } } +grpc::string +ChannelArguments::experimental_type::ValidateAndSetServiceConfigJSON( + const grpc::string& service_config_json) { + grpc_error* error = GRPC_ERROR_NONE; + grpc_core::ServiceConfig::Create(service_config_json.c_str(), &error); + if (error != GRPC_ERROR_NONE) { + return grpc_error_string(error); + } + args_->SetServiceConfigJSON(service_config_json); + return ""; +} + } // namespace grpc_impl diff --git a/test/cpp/end2end/service_config_end2end_test.cc b/test/cpp/end2end/service_config_end2end_test.cc index b3299232763..74a304f6b26 100644 --- a/test/cpp/end2end/service_config_end2end_test.cc +++ b/test/cpp/end2end/service_config_end2end_test.cc @@ -231,7 +231,9 @@ class ServiceConfigEnd2endTest : public ::testing::Test { std::shared_ptr BuildChannelWithDefaultServiceConfig() { ChannelArguments args; - args.SetServiceConfigJSON(ValidDefaultServiceConfig()); + EXPECT_THAT(args.experimental().ValidateAndSetServiceConfigJSON( + ValidDefaultServiceConfig()), + ::testing::StrEq("")); args.SetPointer(GRPC_ARG_FAKE_RESOLVER_RESPONSE_GENERATOR, response_generator_.get()); return ::grpc::CreateCustomChannel("fake:///", creds_, args); @@ -239,6 +241,10 @@ class ServiceConfigEnd2endTest : public ::testing::Test { std::shared_ptr BuildChannelWithInvalidDefaultServiceConfig() { ChannelArguments args; + EXPECT_THAT( + args.experimental().ValidateAndSetServiceConfigJSON( + InvalidDefaultServiceConfig()), + ::testing::HasSubstr("failed to parse JSON for service config")); args.SetServiceConfigJSON(InvalidDefaultServiceConfig()); args.SetPointer(GRPC_ARG_FAKE_RESOLVER_RESPONSE_GENERATOR, response_generator_.get()); From d115e39a4a301321b647782c14ddb771b7129e01 Mon Sep 17 00:00:00 2001 From: Yash Tibrewal Date: Mon, 13 May 2019 15:04:23 -0700 Subject: [PATCH 17/83] Add initialization note --- include/grpcpp/support/channel_arguments_impl.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/grpcpp/support/channel_arguments_impl.h b/include/grpcpp/support/channel_arguments_impl.h index 631992d28c3..e31f7e80db0 100644 --- a/include/grpcpp/support/channel_arguments_impl.h +++ b/include/grpcpp/support/channel_arguments_impl.h @@ -40,6 +40,9 @@ class SecureChannelCredentials; /// Options for channel creation. The user can use generic setters to pass /// key value pairs down to C channel creation code. For gRPC related options, /// concrete setters are provided. +/// This class derives from GrpcLibraryCodegen so that gRPC is initialized +/// before ValidateAndSetServiceConfigJSON is used. (Service config validation +/// methods are registered at initialization.) class ChannelArguments : private ::grpc::GrpcLibraryCodegen { public: /// NOTE: class experimental_type is not part of the public API of this class. From 3a9c96301a259d469ff5cc975c008f402af2cbe8 Mon Sep 17 00:00:00 2001 From: Yash Tibrewal Date: Mon, 13 May 2019 15:05:43 -0700 Subject: [PATCH 18/83] s/set/sets --- include/grpcpp/support/channel_arguments_impl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/grpcpp/support/channel_arguments_impl.h b/include/grpcpp/support/channel_arguments_impl.h index e31f7e80db0..9a034078033 100644 --- a/include/grpcpp/support/channel_arguments_impl.h +++ b/include/grpcpp/support/channel_arguments_impl.h @@ -52,7 +52,7 @@ class ChannelArguments : private ::grpc::GrpcLibraryCodegen { public: explicit experimental_type(ChannelArguments* args) : args_(args) {} - /// Validates \a service_config_json. If valid, set the service config and + /// Validates \a service_config_json. If valid, sets the service config and /// returns an empty string. If invalid, returns the validation error. grpc::string ValidateAndSetServiceConfigJSON( const grpc::string& service_config_json); From 15d8fd9b23d1b01bb8da7563dcddb22c09288bb8 Mon Sep 17 00:00:00 2001 From: Yash Tibrewal Date: Mon, 13 May 2019 16:09:48 -0700 Subject: [PATCH 19/83] Missing error unref --- src/cpp/common/channel_arguments.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/cpp/common/channel_arguments.cc b/src/cpp/common/channel_arguments.cc index faea3316c58..84b786299c6 100644 --- a/src/cpp/common/channel_arguments.cc +++ b/src/cpp/common/channel_arguments.cc @@ -222,7 +222,9 @@ ChannelArguments::experimental_type::ValidateAndSetServiceConfigJSON( grpc_error* error = GRPC_ERROR_NONE; grpc_core::ServiceConfig::Create(service_config_json.c_str(), &error); if (error != GRPC_ERROR_NONE) { - return grpc_error_string(error); + grpc::string return_value = grpc_error_string(error); + GRPC_ERROR_UNREF(error); + return return_value; } args_->SetServiceConfigJSON(service_config_json); return ""; From f299391f15927561927282a495c50e8d97c1ea16 Mon Sep 17 00:00:00 2001 From: Yash Tibrewal Date: Tue, 14 May 2019 10:36:49 -0700 Subject: [PATCH 20/83] Add GrpcLibraryInitializer --- src/cpp/common/channel_arguments.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/cpp/common/channel_arguments.cc b/src/cpp/common/channel_arguments.cc index 84b786299c6..48dfe815042 100644 --- a/src/cpp/common/channel_arguments.cc +++ b/src/cpp/common/channel_arguments.cc @@ -22,6 +22,7 @@ #include #include #include +#include #include #include "src/core/ext/filters/client_channel/service_config.h" #include "src/core/lib/channel/channel_args.h" @@ -30,7 +31,12 @@ namespace grpc_impl { +namespace { +::grpc::internal::GrpcLibraryInitializer g_gli_initializer; +} // namespace + ChannelArguments::ChannelArguments() { + g_gli_initializer.summon(); // This will be ignored if used on the server side. SetString(GRPC_ARG_PRIMARY_USER_AGENT_STRING, "grpc-c++/" + grpc::Version()); } From e68316dda5c607118c9a20e79d46a2b99c72fccb Mon Sep 17 00:00:00 2001 From: Karthik Ravi Shankar Date: Tue, 14 May 2019 12:07:05 -0700 Subject: [PATCH 21/83] Fix errors from clang format script --- src/core/lib/surface/completion_queue.cc | 18 ++++++++---------- test/core/surface/completion_queue_test.cc | 3 ++- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/src/core/lib/surface/completion_queue.cc b/src/core/lib/surface/completion_queue.cc index 18cc15d8b7a..2b60033c42c 100644 --- a/src/core/lib/surface/completion_queue.cc +++ b/src/core/lib/surface/completion_queue.cc @@ -862,11 +862,10 @@ static void cq_end_op_for_callback( } auto* functor = static_cast(tag); - GRPC_CLOSURE_SCHED( - GRPC_CLOSURE_CREATE( - functor_callback, functor, - grpc_core::Executor::Scheduler(grpc_core::ExecutorJobType::LONG)), - GRPC_ERROR_REF(error)); + GRPC_CLOSURE_SCHED(GRPC_CLOSURE_CREATE(functor_callback, functor, + grpc_core::Executor::Scheduler( + grpc_core::ExecutorJobType::LONG)), + GRPC_ERROR_REF(error)); GRPC_ERROR_UNREF(error); } @@ -1352,11 +1351,10 @@ static void cq_finish_shutdown_callback(grpc_completion_queue* cq) { GPR_ASSERT(cqd->shutdown_called); cq->poller_vtable->shutdown(POLLSET_FROM_CQ(cq), &cq->pollset_shutdown_done); - GRPC_CLOSURE_SCHED( - GRPC_CLOSURE_CREATE( - functor_callback, callback, - grpc_core::Executor::Scheduler(grpc_core::ExecutorJobType::LONG)), - GRPC_ERROR_NONE); + GRPC_CLOSURE_SCHED(GRPC_CLOSURE_CREATE(functor_callback, callback, + grpc_core::Executor::Scheduler( + grpc_core::ExecutorJobType::LONG)), + GRPC_ERROR_NONE); } static void cq_shutdown_callback(grpc_completion_queue* cq) { diff --git a/test/core/surface/completion_queue_test.cc b/test/core/surface/completion_queue_test.cc index 214d673cdf6..35a67387335 100644 --- a/test/core/surface/completion_queue_test.cc +++ b/test/core/surface/completion_queue_test.cc @@ -463,7 +463,8 @@ static void test_callback(void) { gpr_mu_lock(&shutdown_mu); while (!got_shutdown) { // Wait for the shutdown callback to complete. - gpr_cv_wait(&shutdown_cv, &shutdown_mu, gpr_inf_future(GPR_CLOCK_REALTIME)); + gpr_cv_wait(&shutdown_cv, &shutdown_mu, + gpr_inf_future(GPR_CLOCK_REALTIME)); } gpr_mu_unlock(&shutdown_mu); } From a73f22bd73d72223136658d8ce1cd3da46d6457f Mon Sep 17 00:00:00 2001 From: Karthik Ravi Shankar Date: Tue, 14 May 2019 12:10:17 -0700 Subject: [PATCH 22/83] Make the executor SHORT instead of LONG. --- src/core/lib/surface/completion_queue.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/lib/surface/completion_queue.cc b/src/core/lib/surface/completion_queue.cc index 2b60033c42c..8dce0e01141 100644 --- a/src/core/lib/surface/completion_queue.cc +++ b/src/core/lib/surface/completion_queue.cc @@ -864,7 +864,7 @@ static void cq_end_op_for_callback( auto* functor = static_cast(tag); GRPC_CLOSURE_SCHED(GRPC_CLOSURE_CREATE(functor_callback, functor, grpc_core::Executor::Scheduler( - grpc_core::ExecutorJobType::LONG)), + grpc_core::ExecutorJobType::SHORT)), GRPC_ERROR_REF(error)); GRPC_ERROR_UNREF(error); @@ -1353,7 +1353,7 @@ static void cq_finish_shutdown_callback(grpc_completion_queue* cq) { cq->poller_vtable->shutdown(POLLSET_FROM_CQ(cq), &cq->pollset_shutdown_done); GRPC_CLOSURE_SCHED(GRPC_CLOSURE_CREATE(functor_callback, callback, grpc_core::Executor::Scheduler( - grpc_core::ExecutorJobType::LONG)), + grpc_core::ExecutorJobType::SHORT)), GRPC_ERROR_NONE); } From 091c12ad79049558c80bc3831c0198ea216c6673 Mon Sep 17 00:00:00 2001 From: Karthik Ravi Shankar Date: Tue, 14 May 2019 12:55:20 -0700 Subject: [PATCH 23/83] Fix clang errors --- src/core/lib/surface/completion_queue.cc | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/src/core/lib/surface/completion_queue.cc b/src/core/lib/surface/completion_queue.cc index 8dce0e01141..cdf1020051f 100644 --- a/src/core/lib/surface/completion_queue.cc +++ b/src/core/lib/surface/completion_queue.cc @@ -862,10 +862,11 @@ static void cq_end_op_for_callback( } auto* functor = static_cast(tag); - GRPC_CLOSURE_SCHED(GRPC_CLOSURE_CREATE(functor_callback, functor, - grpc_core::Executor::Scheduler( - grpc_core::ExecutorJobType::SHORT)), - GRPC_ERROR_REF(error)); + GRPC_CLOSURE_SCHED( + GRPC_CLOSURE_CREATE( + functor_callback, functor, + grpc_core::Executor::Scheduler(grpc_core::ExecutorJobType::SHORT)), + GRPC_ERROR_REF(error)); GRPC_ERROR_UNREF(error); } @@ -1351,10 +1352,11 @@ static void cq_finish_shutdown_callback(grpc_completion_queue* cq) { GPR_ASSERT(cqd->shutdown_called); cq->poller_vtable->shutdown(POLLSET_FROM_CQ(cq), &cq->pollset_shutdown_done); - GRPC_CLOSURE_SCHED(GRPC_CLOSURE_CREATE(functor_callback, callback, - grpc_core::Executor::Scheduler( - grpc_core::ExecutorJobType::SHORT)), - GRPC_ERROR_NONE); + GRPC_CLOSURE_SCHED( + GRPC_CLOSURE_CREATE( + functor_callback, callback, + grpc_core::Executor::Scheduler(grpc_core::ExecutorJobType::SHORT)), + GRPC_ERROR_NONE); } static void cq_shutdown_callback(grpc_completion_queue* cq) { From 172bb1b30f15b1d656603190c5bad2f426ac1354 Mon Sep 17 00:00:00 2001 From: Karthik Ravi Shankar Date: Tue, 14 May 2019 15:04:39 -0700 Subject: [PATCH 24/83] Whitelist internal code path to use ApplicationExecCtx --- src/core/lib/surface/completion_queue.cc | 27 +++++++++++++++--------- src/core/lib/surface/completion_queue.h | 2 +- src/core/lib/surface/server.cc | 2 +- 3 files changed, 19 insertions(+), 12 deletions(-) diff --git a/src/core/lib/surface/completion_queue.cc b/src/core/lib/surface/completion_queue.cc index cdf1020051f..d040e91b796 100644 --- a/src/core/lib/surface/completion_queue.cc +++ b/src/core/lib/surface/completion_queue.cc @@ -201,7 +201,7 @@ struct cq_vtable { bool (*begin_op)(grpc_completion_queue* cq, void* tag); void (*end_op)(grpc_completion_queue* cq, void* tag, grpc_error* error, void (*done)(void* done_arg, grpc_cq_completion* storage), - void* done_arg, grpc_cq_completion* storage); + void* done_arg, grpc_cq_completion* storage, bool internal); grpc_event (*next)(grpc_completion_queue* cq, gpr_timespec deadline, void* reserved); grpc_event (*pluck)(grpc_completion_queue* cq, void* tag, @@ -359,19 +359,19 @@ static void cq_end_op_for_next(grpc_completion_queue* cq, void* tag, grpc_error* error, void (*done)(void* done_arg, grpc_cq_completion* storage), - void* done_arg, grpc_cq_completion* storage); + void* done_arg, grpc_cq_completion* storage, bool internal = false); static void cq_end_op_for_pluck(grpc_completion_queue* cq, void* tag, grpc_error* error, void (*done)(void* done_arg, grpc_cq_completion* storage), - void* done_arg, grpc_cq_completion* storage); + void* done_arg, grpc_cq_completion* storage, bool internal = false); static void cq_end_op_for_callback(grpc_completion_queue* cq, void* tag, grpc_error* error, void (*done)(void* done_arg, grpc_cq_completion* storage), - void* done_arg, grpc_cq_completion* storage); + void* done_arg, grpc_cq_completion* storage, bool internal = false); static grpc_event cq_next(grpc_completion_queue* cq, gpr_timespec deadline, void* reserved); @@ -679,7 +679,8 @@ static void cq_end_op_for_next(grpc_completion_queue* cq, void* tag, grpc_error* error, void (*done)(void* done_arg, grpc_cq_completion* storage), - void* done_arg, grpc_cq_completion* storage) { + void* done_arg, grpc_cq_completion* storage, + bool internal) { GPR_TIMER_SCOPE("cq_end_op_for_next", 0); if (GRPC_TRACE_FLAG_ENABLED(grpc_api_trace) || @@ -759,7 +760,8 @@ static void cq_end_op_for_pluck(grpc_completion_queue* cq, void* tag, grpc_error* error, void (*done)(void* done_arg, grpc_cq_completion* storage), - void* done_arg, grpc_cq_completion* storage) { + void* done_arg, grpc_cq_completion* storage, + bool internal) { GPR_TIMER_SCOPE("cq_end_op_for_pluck", 0); cq_pluck_data* cqd = static_cast DATA_FROM_CQ(cq); @@ -831,7 +833,8 @@ static void functor_callback(void* arg, grpc_error* error) { static void cq_end_op_for_callback( grpc_completion_queue* cq, void* tag, grpc_error* error, void (*done)(void* done_arg, grpc_cq_completion* storage), void* done_arg, - grpc_cq_completion* storage) { + grpc_cq_completion* storage, + bool internal) { GPR_TIMER_SCOPE("cq_end_op_for_callback", 0); cq_callback_data* cqd = static_cast DATA_FROM_CQ(cq); @@ -862,19 +865,23 @@ static void cq_end_op_for_callback( } auto* functor = static_cast(tag); - GRPC_CLOSURE_SCHED( + if (internal) { + grpc_core::ApplicationCallbackExecCtx::Enqueue(functor, (error == GRPC_ERROR_NONE)); + } else { + GRPC_CLOSURE_SCHED( GRPC_CLOSURE_CREATE( functor_callback, functor, grpc_core::Executor::Scheduler(grpc_core::ExecutorJobType::SHORT)), GRPC_ERROR_REF(error)); + } GRPC_ERROR_UNREF(error); } void grpc_cq_end_op(grpc_completion_queue* cq, void* tag, grpc_error* error, void (*done)(void* done_arg, grpc_cq_completion* storage), - void* done_arg, grpc_cq_completion* storage) { - cq->vtable->end_op(cq, tag, error, done, done_arg, storage); + void* done_arg, grpc_cq_completion* storage, bool internal) { + cq->vtable->end_op(cq, tag, error, done, done_arg, storage, internal); } typedef struct { diff --git a/src/core/lib/surface/completion_queue.h b/src/core/lib/surface/completion_queue.h index d60fe6d6efe..f5b0822fcb4 100644 --- a/src/core/lib/surface/completion_queue.h +++ b/src/core/lib/surface/completion_queue.h @@ -77,7 +77,7 @@ bool grpc_cq_begin_op(grpc_completion_queue* cc, void* tag); grpc_cq_begin_op */ void grpc_cq_end_op(grpc_completion_queue* cc, void* tag, grpc_error* error, void (*done)(void* done_arg, grpc_cq_completion* storage), - void* done_arg, grpc_cq_completion* storage); + void* done_arg, grpc_cq_completion* storage, bool internal); grpc_pollset* grpc_cq_pollset(grpc_completion_queue* cc); diff --git a/src/core/lib/surface/server.cc b/src/core/lib/surface/server.cc index 2377c4d8f23..19f61c548d6 100644 --- a/src/core/lib/surface/server.cc +++ b/src/core/lib/surface/server.cc @@ -513,7 +513,7 @@ static void publish_call(grpc_server* server, call_data* calld, size_t cq_idx, } grpc_cq_end_op(calld->cq_new, rc->tag, GRPC_ERROR_NONE, done_request_event, - rc, &rc->completion); + rc, &rc->completion, true); } static void publish_new_rpc(void* arg, grpc_error* error) { From 4b89514919cbf1bb62294400587f9d98af323284 Mon Sep 17 00:00:00 2001 From: Karthik Ravi Shankar Date: Wed, 15 May 2019 12:04:13 -0700 Subject: [PATCH 25/83] Fix default value compile issues --- src/core/lib/surface/completion_queue.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/lib/surface/completion_queue.h b/src/core/lib/surface/completion_queue.h index f5b0822fcb4..16550ac61eb 100644 --- a/src/core/lib/surface/completion_queue.h +++ b/src/core/lib/surface/completion_queue.h @@ -77,7 +77,7 @@ bool grpc_cq_begin_op(grpc_completion_queue* cc, void* tag); grpc_cq_begin_op */ void grpc_cq_end_op(grpc_completion_queue* cc, void* tag, grpc_error* error, void (*done)(void* done_arg, grpc_cq_completion* storage), - void* done_arg, grpc_cq_completion* storage, bool internal); + void* done_arg, grpc_cq_completion* storage, bool internal = false); grpc_pollset* grpc_cq_pollset(grpc_completion_queue* cc); From 26ba981deeda821fae3a185b21308d16adcbbfe4 Mon Sep 17 00:00:00 2001 From: Karthik Ravi Shankar Date: Thu, 16 May 2019 09:34:20 -0700 Subject: [PATCH 26/83] Fix clang errors --- src/core/lib/surface/completion_queue.cc | 68 +++++++++++------------- src/core/lib/surface/completion_queue.h | 3 +- 2 files changed, 33 insertions(+), 38 deletions(-) diff --git a/src/core/lib/surface/completion_queue.cc b/src/core/lib/surface/completion_queue.cc index d040e91b796..f1b31e9cbba 100644 --- a/src/core/lib/surface/completion_queue.cc +++ b/src/core/lib/surface/completion_queue.cc @@ -355,23 +355,20 @@ static bool cq_begin_op_for_callback(grpc_completion_queue* cq, void* tag); // queue. The done argument is a callback that will be invoked when it is // safe to free up that storage. The storage MUST NOT be freed until the // done callback is invoked. -static void cq_end_op_for_next(grpc_completion_queue* cq, void* tag, - grpc_error* error, - void (*done)(void* done_arg, - grpc_cq_completion* storage), - void* done_arg, grpc_cq_completion* storage, bool internal = false); - -static void cq_end_op_for_pluck(grpc_completion_queue* cq, void* tag, - grpc_error* error, - void (*done)(void* done_arg, - grpc_cq_completion* storage), - void* done_arg, grpc_cq_completion* storage, bool internal = false); - -static void cq_end_op_for_callback(grpc_completion_queue* cq, void* tag, - grpc_error* error, - void (*done)(void* done_arg, - grpc_cq_completion* storage), - void* done_arg, grpc_cq_completion* storage, bool internal = false); +static void cq_end_op_for_next( + grpc_completion_queue* cq, void* tag, grpc_error* error, + void (*done)(void* done_arg, grpc_cq_completion* storage), void* done_arg, + grpc_cq_completion* storage, bool internal = false); + +static void cq_end_op_for_pluck( + grpc_completion_queue* cq, void* tag, grpc_error* error, + void (*done)(void* done_arg, grpc_cq_completion* storage), void* done_arg, + grpc_cq_completion* storage, bool internal = false); + +static void cq_end_op_for_callback( + grpc_completion_queue* cq, void* tag, grpc_error* error, + void (*done)(void* done_arg, grpc_cq_completion* storage), void* done_arg, + grpc_cq_completion* storage, bool internal = false); static grpc_event cq_next(grpc_completion_queue* cq, gpr_timespec deadline, void* reserved); @@ -675,12 +672,10 @@ bool grpc_cq_begin_op(grpc_completion_queue* cq, void* tag) { /* Queue a GRPC_OP_COMPLETED operation to a completion queue (with a * completion * type of GRPC_CQ_NEXT) */ -static void cq_end_op_for_next(grpc_completion_queue* cq, void* tag, - grpc_error* error, - void (*done)(void* done_arg, - grpc_cq_completion* storage), - void* done_arg, grpc_cq_completion* storage, - bool internal) { +static void cq_end_op_for_next( + grpc_completion_queue* cq, void* tag, grpc_error* error, + void (*done)(void* done_arg, grpc_cq_completion* storage), void* done_arg, + grpc_cq_completion* storage, bool internal) { GPR_TIMER_SCOPE("cq_end_op_for_next", 0); if (GRPC_TRACE_FLAG_ENABLED(grpc_api_trace) || @@ -756,12 +751,10 @@ static void cq_end_op_for_next(grpc_completion_queue* cq, void* tag, /* Queue a GRPC_OP_COMPLETED operation to a completion queue (with a * completion * type of GRPC_CQ_PLUCK) */ -static void cq_end_op_for_pluck(grpc_completion_queue* cq, void* tag, - grpc_error* error, - void (*done)(void* done_arg, - grpc_cq_completion* storage), - void* done_arg, grpc_cq_completion* storage, - bool internal) { +static void cq_end_op_for_pluck( + grpc_completion_queue* cq, void* tag, grpc_error* error, + void (*done)(void* done_arg, grpc_cq_completion* storage), void* done_arg, + grpc_cq_completion* storage, bool internal) { GPR_TIMER_SCOPE("cq_end_op_for_pluck", 0); cq_pluck_data* cqd = static_cast DATA_FROM_CQ(cq); @@ -833,8 +826,7 @@ static void functor_callback(void* arg, grpc_error* error) { static void cq_end_op_for_callback( grpc_completion_queue* cq, void* tag, grpc_error* error, void (*done)(void* done_arg, grpc_cq_completion* storage), void* done_arg, - grpc_cq_completion* storage, - bool internal) { + grpc_cq_completion* storage, bool internal) { GPR_TIMER_SCOPE("cq_end_op_for_callback", 0); cq_callback_data* cqd = static_cast DATA_FROM_CQ(cq); @@ -866,13 +858,14 @@ static void cq_end_op_for_callback( auto* functor = static_cast(tag); if (internal) { - grpc_core::ApplicationCallbackExecCtx::Enqueue(functor, (error == GRPC_ERROR_NONE)); + grpc_core::ApplicationCallbackExecCtx::Enqueue(functor, + (error == GRPC_ERROR_NONE)); } else { GRPC_CLOSURE_SCHED( - GRPC_CLOSURE_CREATE( - functor_callback, functor, - grpc_core::Executor::Scheduler(grpc_core::ExecutorJobType::SHORT)), - GRPC_ERROR_REF(error)); + GRPC_CLOSURE_CREATE( + functor_callback, functor, + grpc_core::Executor::Scheduler(grpc_core::ExecutorJobType::SHORT)), + GRPC_ERROR_REF(error)); } GRPC_ERROR_UNREF(error); @@ -880,7 +873,8 @@ static void cq_end_op_for_callback( void grpc_cq_end_op(grpc_completion_queue* cq, void* tag, grpc_error* error, void (*done)(void* done_arg, grpc_cq_completion* storage), - void* done_arg, grpc_cq_completion* storage, bool internal) { + void* done_arg, grpc_cq_completion* storage, + bool internal) { cq->vtable->end_op(cq, tag, error, done, done_arg, storage, internal); } diff --git a/src/core/lib/surface/completion_queue.h b/src/core/lib/surface/completion_queue.h index 16550ac61eb..3ba9fbb8765 100644 --- a/src/core/lib/surface/completion_queue.h +++ b/src/core/lib/surface/completion_queue.h @@ -77,7 +77,8 @@ bool grpc_cq_begin_op(grpc_completion_queue* cc, void* tag); grpc_cq_begin_op */ void grpc_cq_end_op(grpc_completion_queue* cc, void* tag, grpc_error* error, void (*done)(void* done_arg, grpc_cq_completion* storage), - void* done_arg, grpc_cq_completion* storage, bool internal = false); + void* done_arg, grpc_cq_completion* storage, + bool internal = false); grpc_pollset* grpc_cq_pollset(grpc_completion_queue* cc); From fe85756a8afd6e257b378b73cea1681785efb58d Mon Sep 17 00:00:00 2001 From: Karthik Ravi Shankar Date: Fri, 17 May 2019 10:15:41 -0700 Subject: [PATCH 27/83] Fix end2end tests --- test/cpp/end2end/client_callback_end2end_test.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/cpp/end2end/client_callback_end2end_test.cc b/test/cpp/end2end/client_callback_end2end_test.cc index ed7482b4be5..8cf6def1073 100644 --- a/test/cpp/end2end/client_callback_end2end_test.cc +++ b/test/cpp/end2end/client_callback_end2end_test.cc @@ -379,7 +379,7 @@ TEST_P(ClientCallbackEnd2endTest, SimpleRpcUnderLock) { ResetStub(); std::mutex mu; std::condition_variable cv; - bool done; + bool done = false; EchoRequest request; request.set_message("Hello locked world."); EchoResponse response; From 92aa0530fa5c1c4a0419413223cc6016529a661a Mon Sep 17 00:00:00 2001 From: Karthik Ravi Shankar Date: Fri, 17 May 2019 12:17:16 -0700 Subject: [PATCH 28/83] Changes to locking order --- test/core/surface/completion_queue_test.cc | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/test/core/surface/completion_queue_test.cc b/test/core/surface/completion_queue_test.cc index 35a67387335..32f4debef13 100644 --- a/test/core/surface/completion_queue_test.cc +++ b/test/core/surface/completion_queue_test.cc @@ -388,9 +388,9 @@ static void test_callback(void) { static void Run(grpc_experimental_completion_queue_functor* cb, int ok) { gpr_mu_lock(&shutdown_mu); *static_cast(cb)->done_ = static_cast(ok); - gpr_mu_unlock(&shutdown_mu); // Signal when the shutdown callback is completed. gpr_cv_signal(&shutdown_cv); + gpr_mu_unlock(&shutdown_mu); } private: @@ -469,17 +469,18 @@ static void test_callback(void) { gpr_mu_unlock(&shutdown_mu); } - gpr_mu_lock(&mu); // Run the assertions to check if the test ran successfully. GPR_ASSERT(sumtags == counter); GPR_ASSERT(got_shutdown); - gpr_mu_unlock(&mu); + gpr_mu_lock(&shutdown_mu); got_shutdown = false; + gpr_mu_unlock(&shutdown_mu); } - gpr_mu_destroy(&mu); - gpr_mu_destroy(&shutdown_mu); + gpr_cv_destroy(&cv); gpr_cv_destroy(&shutdown_cv); + gpr_mu_destroy(&mu); + gpr_mu_destroy(&shutdown_mu); } struct thread_state { From a89b1763afa69d8a943a129971e36e2b0129751f Mon Sep 17 00:00:00 2001 From: Karthik Ravi Shankar Date: Fri, 17 May 2019 15:35:12 -0700 Subject: [PATCH 29/83] changes --- src/core/lib/surface/completion_queue.cc | 37 ++++++++++-------------- src/core/lib/surface/completion_queue.h | 3 +- src/core/lib/surface/server.cc | 2 +- 3 files changed, 17 insertions(+), 25 deletions(-) diff --git a/src/core/lib/surface/completion_queue.cc b/src/core/lib/surface/completion_queue.cc index f1b31e9cbba..b62f3fa6add 100644 --- a/src/core/lib/surface/completion_queue.cc +++ b/src/core/lib/surface/completion_queue.cc @@ -201,7 +201,7 @@ struct cq_vtable { bool (*begin_op)(grpc_completion_queue* cq, void* tag); void (*end_op)(grpc_completion_queue* cq, void* tag, grpc_error* error, void (*done)(void* done_arg, grpc_cq_completion* storage), - void* done_arg, grpc_cq_completion* storage, bool internal); + void* done_arg, grpc_cq_completion* storage); grpc_event (*next)(grpc_completion_queue* cq, gpr_timespec deadline, void* reserved); grpc_event (*pluck)(grpc_completion_queue* cq, void* tag, @@ -358,17 +358,17 @@ static bool cq_begin_op_for_callback(grpc_completion_queue* cq, void* tag); static void cq_end_op_for_next( grpc_completion_queue* cq, void* tag, grpc_error* error, void (*done)(void* done_arg, grpc_cq_completion* storage), void* done_arg, - grpc_cq_completion* storage, bool internal = false); + grpc_cq_completion* storage); static void cq_end_op_for_pluck( grpc_completion_queue* cq, void* tag, grpc_error* error, void (*done)(void* done_arg, grpc_cq_completion* storage), void* done_arg, - grpc_cq_completion* storage, bool internal = false); + grpc_cq_completion* storage); static void cq_end_op_for_callback( grpc_completion_queue* cq, void* tag, grpc_error* error, void (*done)(void* done_arg, grpc_cq_completion* storage), void* done_arg, - grpc_cq_completion* storage, bool internal = false); + grpc_cq_completion* storage); static grpc_event cq_next(grpc_completion_queue* cq, gpr_timespec deadline, void* reserved); @@ -675,7 +675,7 @@ bool grpc_cq_begin_op(grpc_completion_queue* cq, void* tag) { static void cq_end_op_for_next( grpc_completion_queue* cq, void* tag, grpc_error* error, void (*done)(void* done_arg, grpc_cq_completion* storage), void* done_arg, - grpc_cq_completion* storage, bool internal) { + grpc_cq_completion* storage) { GPR_TIMER_SCOPE("cq_end_op_for_next", 0); if (GRPC_TRACE_FLAG_ENABLED(grpc_api_trace) || @@ -754,7 +754,7 @@ static void cq_end_op_for_next( static void cq_end_op_for_pluck( grpc_completion_queue* cq, void* tag, grpc_error* error, void (*done)(void* done_arg, grpc_cq_completion* storage), void* done_arg, - grpc_cq_completion* storage, bool internal) { + grpc_cq_completion* storage) { GPR_TIMER_SCOPE("cq_end_op_for_pluck", 0); cq_pluck_data* cqd = static_cast DATA_FROM_CQ(cq); @@ -826,7 +826,7 @@ static void functor_callback(void* arg, grpc_error* error) { static void cq_end_op_for_callback( grpc_completion_queue* cq, void* tag, grpc_error* error, void (*done)(void* done_arg, grpc_cq_completion* storage), void* done_arg, - grpc_cq_completion* storage, bool internal) { + grpc_cq_completion* storage) { GPR_TIMER_SCOPE("cq_end_op_for_callback", 0); cq_callback_data* cqd = static_cast DATA_FROM_CQ(cq); @@ -857,25 +857,18 @@ static void cq_end_op_for_callback( } auto* functor = static_cast(tag); - if (internal) { - grpc_core::ApplicationCallbackExecCtx::Enqueue(functor, - (error == GRPC_ERROR_NONE)); - } else { - GRPC_CLOSURE_SCHED( - GRPC_CLOSURE_CREATE( - functor_callback, functor, - grpc_core::Executor::Scheduler(grpc_core::ExecutorJobType::SHORT)), - GRPC_ERROR_REF(error)); - } - + GRPC_CLOSURE_RUN( + GRPC_CLOSURE_CREATE( + functor_callback, functor, + grpc_core::Executor::Scheduler(grpc_core::ExecutorJobType::SHORT)), + GRPC_ERROR_REF(error)); GRPC_ERROR_UNREF(error); } void grpc_cq_end_op(grpc_completion_queue* cq, void* tag, grpc_error* error, void (*done)(void* done_arg, grpc_cq_completion* storage), - void* done_arg, grpc_cq_completion* storage, - bool internal) { - cq->vtable->end_op(cq, tag, error, done, done_arg, storage, internal); + void* done_arg, grpc_cq_completion* storage) { + cq->vtable->end_op(cq, tag, error, done, done_arg, storage); } typedef struct { @@ -1353,7 +1346,7 @@ static void cq_finish_shutdown_callback(grpc_completion_queue* cq) { GPR_ASSERT(cqd->shutdown_called); cq->poller_vtable->shutdown(POLLSET_FROM_CQ(cq), &cq->pollset_shutdown_done); - GRPC_CLOSURE_SCHED( + GRPC_CLOSURE_RUN( GRPC_CLOSURE_CREATE( functor_callback, callback, grpc_core::Executor::Scheduler(grpc_core::ExecutorJobType::SHORT)), diff --git a/src/core/lib/surface/completion_queue.h b/src/core/lib/surface/completion_queue.h index 3ba9fbb8765..d60fe6d6efe 100644 --- a/src/core/lib/surface/completion_queue.h +++ b/src/core/lib/surface/completion_queue.h @@ -77,8 +77,7 @@ bool grpc_cq_begin_op(grpc_completion_queue* cc, void* tag); grpc_cq_begin_op */ void grpc_cq_end_op(grpc_completion_queue* cc, void* tag, grpc_error* error, void (*done)(void* done_arg, grpc_cq_completion* storage), - void* done_arg, grpc_cq_completion* storage, - bool internal = false); + void* done_arg, grpc_cq_completion* storage); grpc_pollset* grpc_cq_pollset(grpc_completion_queue* cc); diff --git a/src/core/lib/surface/server.cc b/src/core/lib/surface/server.cc index 19f61c548d6..2377c4d8f23 100644 --- a/src/core/lib/surface/server.cc +++ b/src/core/lib/surface/server.cc @@ -513,7 +513,7 @@ static void publish_call(grpc_server* server, call_data* calld, size_t cq_idx, } grpc_cq_end_op(calld->cq_new, rc->tag, GRPC_ERROR_NONE, done_request_event, - rc, &rc->completion, true); + rc, &rc->completion); } static void publish_new_rpc(void* arg, grpc_error* error) { From 56ff5a918f114372e7dfd9f130d4411b474bc466 Mon Sep 17 00:00:00 2001 From: Karthik Ravi Shankar Date: Mon, 20 May 2019 11:35:45 -0700 Subject: [PATCH 30/83] Address review comments - 1 --- test/core/surface/completion_queue_test.cc | 6 ------ 1 file changed, 6 deletions(-) diff --git a/test/core/surface/completion_queue_test.cc b/test/core/surface/completion_queue_test.cc index 32f4debef13..ff6722ffb17 100644 --- a/test/core/surface/completion_queue_test.cc +++ b/test/core/surface/completion_queue_test.cc @@ -376,9 +376,7 @@ static void test_callback(void) { LOG_TEST("test_callback"); - gpr_mu_lock(&shutdown_mu); bool got_shutdown = false; - gpr_mu_unlock(&shutdown_mu); class ShutdownCallback : public grpc_experimental_completion_queue_functor { public: ShutdownCallback(bool* done) : done_(done) { @@ -405,9 +403,7 @@ static void test_callback(void) { for (size_t pidx = 0; pidx < GPR_ARRAY_SIZE(polling_types); pidx++) { int sumtags = 0; int counter = 0; - gpr_mu_lock(&mu); cb_counter = 0; - gpr_mu_unlock(&mu); { // reset exec_ctx types grpc_core::ExecCtx exec_ctx; @@ -472,9 +468,7 @@ static void test_callback(void) { // Run the assertions to check if the test ran successfully. GPR_ASSERT(sumtags == counter); GPR_ASSERT(got_shutdown); - gpr_mu_lock(&shutdown_mu); got_shutdown = false; - gpr_mu_unlock(&shutdown_mu); } gpr_cv_destroy(&cv); From f63dde8e8e7c0f7b0ec855f87085eba1f8ed23b5 Mon Sep 17 00:00:00 2001 From: Yash Tibrewal Date: Mon, 20 May 2019 11:45:07 -0700 Subject: [PATCH 31/83] Make validation function a global function --- .../grpcpp/support/channel_arguments_impl.h | 35 ++++++------------- src/cpp/common/channel_arguments.cc | 27 +++++++------- .../end2end/service_config_end2end_test.cc | 5 +-- 3 files changed, 26 insertions(+), 41 deletions(-) diff --git a/include/grpcpp/support/channel_arguments_impl.h b/include/grpcpp/support/channel_arguments_impl.h index 9a034078033..a137a5b7c7d 100644 --- a/include/grpcpp/support/channel_arguments_impl.h +++ b/include/grpcpp/support/channel_arguments_impl.h @@ -31,6 +31,15 @@ namespace grpc { namespace testing { class ChannelArgumentsTest; } // namespace testing + +namespace experimental { +/// Validates \a service_config_json. If valid, returns an empty string. +/// Otherwise, returns the validation error. +/// TODO(yashykt): Promote it to out of experimental once it is proved useful +/// and gRFC is accepted. +grpc::string ValidateServiceConfigJSON(const grpc::string& service_config_json); +} // namespace experimental + } // namespace grpc namespace grpc_impl { @@ -40,27 +49,8 @@ class SecureChannelCredentials; /// Options for channel creation. The user can use generic setters to pass /// key value pairs down to C channel creation code. For gRPC related options, /// concrete setters are provided. -/// This class derives from GrpcLibraryCodegen so that gRPC is initialized -/// before ValidateAndSetServiceConfigJSON is used. (Service config validation -/// methods are registered at initialization.) -class ChannelArguments : private ::grpc::GrpcLibraryCodegen { +class ChannelArguments { public: - /// NOTE: class experimental_type is not part of the public API of this class. - /// TODO(yashykt): Integrate into public API when this is no longer - /// experimental. - class experimental_type { - public: - explicit experimental_type(ChannelArguments* args) : args_(args) {} - - /// Validates \a service_config_json. If valid, sets the service config and - /// returns an empty string. If invalid, returns the validation error. - grpc::string ValidateAndSetServiceConfigJSON( - const grpc::string& service_config_json); - - private: - ChannelArguments* args_; - }; - ChannelArguments(); ~ChannelArguments(); @@ -144,11 +134,6 @@ class ChannelArguments : private ::grpc::GrpcLibraryCodegen { return out; } - /// NOTE: The function experimental() is not stable public API. It is a view - /// to the experimental components of this class. It may be changed or removed - /// at any time. - experimental_type experimental() { return experimental_type(this); } - private: friend class grpc_impl::SecureChannelCredentials; friend class grpc::testing::ChannelArgumentsTest; diff --git a/src/cpp/common/channel_arguments.cc b/src/cpp/common/channel_arguments.cc index 48dfe815042..2f32703814e 100644 --- a/src/cpp/common/channel_arguments.cc +++ b/src/cpp/common/channel_arguments.cc @@ -31,18 +31,13 @@ namespace grpc_impl { -namespace { -::grpc::internal::GrpcLibraryInitializer g_gli_initializer; -} // namespace - ChannelArguments::ChannelArguments() { - g_gli_initializer.summon(); // This will be ignored if used on the server side. SetString(GRPC_ARG_PRIMARY_USER_AGENT_STRING, "grpc-c++/" + grpc::Version()); } ChannelArguments::ChannelArguments(const ChannelArguments& other) - : ::grpc::GrpcLibraryCodegen(), strings_(other.strings_) { + : strings_(other.strings_) { args_.reserve(other.args_.size()); auto list_it_dst = strings_.begin(); auto list_it_src = other.strings_.begin(); @@ -222,18 +217,22 @@ void ChannelArguments::SetChannelArgs(grpc_channel_args* channel_args) const { } } -grpc::string -ChannelArguments::experimental_type::ValidateAndSetServiceConfigJSON( +} // namespace grpc_impl + +namespace grpc { +namespace experimental { +grpc::string ValidateServiceConfigJSON( const grpc::string& service_config_json) { + grpc_init(); grpc_error* error = GRPC_ERROR_NONE; grpc_core::ServiceConfig::Create(service_config_json.c_str(), &error); + grpc::string return_value; if (error != GRPC_ERROR_NONE) { - grpc::string return_value = grpc_error_string(error); + return_value = grpc_error_string(error); GRPC_ERROR_UNREF(error); - return return_value; } - args_->SetServiceConfigJSON(service_config_json); - return ""; + grpc_shutdown(); + return return_value; } - -} // namespace grpc_impl +} // namespace experimental +} // namespace grpc diff --git a/test/cpp/end2end/service_config_end2end_test.cc b/test/cpp/end2end/service_config_end2end_test.cc index 74a304f6b26..e5c3a8e3eff 100644 --- a/test/cpp/end2end/service_config_end2end_test.cc +++ b/test/cpp/end2end/service_config_end2end_test.cc @@ -231,9 +231,10 @@ class ServiceConfigEnd2endTest : public ::testing::Test { std::shared_ptr BuildChannelWithDefaultServiceConfig() { ChannelArguments args; - EXPECT_THAT(args.experimental().ValidateAndSetServiceConfigJSON( + EXPECT_THAT(grpc::experimental::ValidateServiceConfigJSON( ValidDefaultServiceConfig()), ::testing::StrEq("")); + args.SetServiceConfigJSON(ValidDefaultServiceConfig()); args.SetPointer(GRPC_ARG_FAKE_RESOLVER_RESPONSE_GENERATOR, response_generator_.get()); return ::grpc::CreateCustomChannel("fake:///", creds_, args); @@ -242,7 +243,7 @@ class ServiceConfigEnd2endTest : public ::testing::Test { std::shared_ptr BuildChannelWithInvalidDefaultServiceConfig() { ChannelArguments args; EXPECT_THAT( - args.experimental().ValidateAndSetServiceConfigJSON( + grpc::experimental::ValidateServiceConfigJSON( InvalidDefaultServiceConfig()), ::testing::HasSubstr("failed to parse JSON for service config")); args.SetServiceConfigJSON(InvalidDefaultServiceConfig()); From 41ae267107706b4166ba057f027a0bc66d6e93ec Mon Sep 17 00:00:00 2001 From: Yash Tibrewal Date: Mon, 20 May 2019 11:46:18 -0700 Subject: [PATCH 32/83] Remove unnecessary header --- src/cpp/common/channel_arguments.cc | 1 - 1 file changed, 1 deletion(-) diff --git a/src/cpp/common/channel_arguments.cc b/src/cpp/common/channel_arguments.cc index 2f32703814e..b97e1ed8da9 100644 --- a/src/cpp/common/channel_arguments.cc +++ b/src/cpp/common/channel_arguments.cc @@ -22,7 +22,6 @@ #include #include #include -#include #include #include "src/core/ext/filters/client_channel/service_config.h" #include "src/core/lib/channel/channel_args.h" From cb9e2188ab05f983f447ed4cf8fb93b299bd224d Mon Sep 17 00:00:00 2001 From: Richard Belleville Date: Mon, 20 May 2019 12:45:16 -0700 Subject: [PATCH 33/83] Add python deprecation notices. --- src/python/grpcio/README.rst | 8 ++++++++ src/python/grpcio_channelz/README.rst | 8 ++++++++ src/python/grpcio_health_checking/README.rst | 8 ++++++++ src/python/grpcio_reflection/README.rst | 8 ++++++++ src/python/grpcio_status/README.rst | 8 ++++++++ src/python/grpcio_testing/README.rst | 8 ++++++++ tools/distrib/python/grpcio_tools/README.rst | 8 ++++++++ 7 files changed, 56 insertions(+) diff --git a/src/python/grpcio/README.rst b/src/python/grpcio/README.rst index f047243f82d..44d516ef6cb 100644 --- a/src/python/grpcio/README.rst +++ b/src/python/grpcio/README.rst @@ -3,6 +3,14 @@ gRPC Python Package for gRPC Python. +Supported Python Versions +------------------------- +Python >= 3.5 + +Deprecated Python Versions +-------------------------- +Python == 2.7. Python 2.7 support will be removed on January 1, 2020. + Installation ------------ diff --git a/src/python/grpcio_channelz/README.rst b/src/python/grpcio_channelz/README.rst index efeaa560646..d66d0c4f922 100644 --- a/src/python/grpcio_channelz/README.rst +++ b/src/python/grpcio_channelz/README.rst @@ -3,6 +3,14 @@ gRPC Python Channelz package Channelz is a live debug tool in gRPC Python. +Supported Python Versions +------------------------- +Python >= 3.5 + +Deprecated Python Versions +-------------------------- +Python == 2.7. Python 2.7 support will be removed on January 1, 2020. + Dependencies ------------ diff --git a/src/python/grpcio_health_checking/README.rst b/src/python/grpcio_health_checking/README.rst index 600734e50df..044377a5828 100644 --- a/src/python/grpcio_health_checking/README.rst +++ b/src/python/grpcio_health_checking/README.rst @@ -3,6 +3,14 @@ gRPC Python Health Checking Reference package for GRPC Python health checking. +Supported Python Versions +------------------------- +Python >= 3.5 + +Deprecated Python Versions +-------------------------- +Python == 2.7. Python 2.7 support will be removed on January 1, 2020. + Dependencies ------------ diff --git a/src/python/grpcio_reflection/README.rst b/src/python/grpcio_reflection/README.rst index da99a449044..56f9953373b 100644 --- a/src/python/grpcio_reflection/README.rst +++ b/src/python/grpcio_reflection/README.rst @@ -3,6 +3,14 @@ gRPC Python Reflection package Reference package for reflection in GRPC Python. +Supported Python Versions +------------------------- +Python >= 3.5 + +Deprecated Python Versions +-------------------------- +Python == 2.7. Python 2.7 support will be removed on January 1, 2020. + Dependencies ------------ diff --git a/src/python/grpcio_status/README.rst b/src/python/grpcio_status/README.rst index dc2f7b1dab1..16c59387a61 100644 --- a/src/python/grpcio_status/README.rst +++ b/src/python/grpcio_status/README.rst @@ -3,6 +3,14 @@ gRPC Python Status Proto Reference package for GRPC Python status proto mapping. +Supported Python Versions +------------------------- +Python >= 3.5 + +Deprecated Python Versions +-------------------------- +Python == 2.7. Python 2.7 support will be removed on January 1, 2020. + Dependencies ------------ diff --git a/src/python/grpcio_testing/README.rst b/src/python/grpcio_testing/README.rst index c699b80fb67..968dec85071 100644 --- a/src/python/grpcio_testing/README.rst +++ b/src/python/grpcio_testing/README.rst @@ -3,6 +3,14 @@ gRPC Python Testing Package Testing utilities for gRPC Python +Supported Python Versions +------------------------- +Python >= 3.5 + +Deprecated Python Versions +-------------------------- +Python == 2.7. Python 2.7 support will be removed on January 1, 2020. + Dependencies ------------ diff --git a/tools/distrib/python/grpcio_tools/README.rst b/tools/distrib/python/grpcio_tools/README.rst index 32873b291fa..cc974eda315 100644 --- a/tools/distrib/python/grpcio_tools/README.rst +++ b/tools/distrib/python/grpcio_tools/README.rst @@ -3,6 +3,14 @@ gRPC Python Tools Package for gRPC Python tools. +Supported Python Versions +------------------------- +Python >= 3.5 + +Deprecated Python Versions +-------------------------- +Python == 2.7. Python 2.7 support will be removed on January 1, 2020. + Installation ------------ From 061dfc911f54c8a641ff7126dec77ac0c27430e7 Mon Sep 17 00:00:00 2001 From: Karthik Ravi Shankar Date: Mon, 20 May 2019 13:51:27 -0700 Subject: [PATCH 34/83] Bring back the internalization --- src/core/lib/surface/completion_queue.cc | 23 ++++++++++++++--------- src/core/lib/surface/completion_queue.h | 3 ++- src/core/lib/surface/server.cc | 2 +- 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/src/core/lib/surface/completion_queue.cc b/src/core/lib/surface/completion_queue.cc index b62f3fa6add..64ceb45cf24 100644 --- a/src/core/lib/surface/completion_queue.cc +++ b/src/core/lib/surface/completion_queue.cc @@ -201,7 +201,7 @@ struct cq_vtable { bool (*begin_op)(grpc_completion_queue* cq, void* tag); void (*end_op)(grpc_completion_queue* cq, void* tag, grpc_error* error, void (*done)(void* done_arg, grpc_cq_completion* storage), - void* done_arg, grpc_cq_completion* storage); + void* done_arg, grpc_cq_completion* storage, bool internal); grpc_event (*next)(grpc_completion_queue* cq, gpr_timespec deadline, void* reserved); grpc_event (*pluck)(grpc_completion_queue* cq, void* tag, @@ -358,17 +358,17 @@ static bool cq_begin_op_for_callback(grpc_completion_queue* cq, void* tag); static void cq_end_op_for_next( grpc_completion_queue* cq, void* tag, grpc_error* error, void (*done)(void* done_arg, grpc_cq_completion* storage), void* done_arg, - grpc_cq_completion* storage); + grpc_cq_completion* storage, bool internal); static void cq_end_op_for_pluck( grpc_completion_queue* cq, void* tag, grpc_error* error, void (*done)(void* done_arg, grpc_cq_completion* storage), void* done_arg, - grpc_cq_completion* storage); + grpc_cq_completion* storage, bool internal); static void cq_end_op_for_callback( grpc_completion_queue* cq, void* tag, grpc_error* error, void (*done)(void* done_arg, grpc_cq_completion* storage), void* done_arg, - grpc_cq_completion* storage); + grpc_cq_completion* storage, bool internal); static grpc_event cq_next(grpc_completion_queue* cq, gpr_timespec deadline, void* reserved); @@ -675,7 +675,7 @@ bool grpc_cq_begin_op(grpc_completion_queue* cq, void* tag) { static void cq_end_op_for_next( grpc_completion_queue* cq, void* tag, grpc_error* error, void (*done)(void* done_arg, grpc_cq_completion* storage), void* done_arg, - grpc_cq_completion* storage) { + grpc_cq_completion* storage, bool internal) { GPR_TIMER_SCOPE("cq_end_op_for_next", 0); if (GRPC_TRACE_FLAG_ENABLED(grpc_api_trace) || @@ -754,7 +754,7 @@ static void cq_end_op_for_next( static void cq_end_op_for_pluck( grpc_completion_queue* cq, void* tag, grpc_error* error, void (*done)(void* done_arg, grpc_cq_completion* storage), void* done_arg, - grpc_cq_completion* storage) { + grpc_cq_completion* storage, bool internal) { GPR_TIMER_SCOPE("cq_end_op_for_pluck", 0); cq_pluck_data* cqd = static_cast DATA_FROM_CQ(cq); @@ -826,7 +826,7 @@ static void functor_callback(void* arg, grpc_error* error) { static void cq_end_op_for_callback( grpc_completion_queue* cq, void* tag, grpc_error* error, void (*done)(void* done_arg, grpc_cq_completion* storage), void* done_arg, - grpc_cq_completion* storage) { + grpc_cq_completion* storage, bool internal) { GPR_TIMER_SCOPE("cq_end_op_for_callback", 0); cq_callback_data* cqd = static_cast DATA_FROM_CQ(cq); @@ -857,18 +857,23 @@ static void cq_end_op_for_callback( } auto* functor = static_cast(tag); + if (internal) { + grpc_core::ApplicationCallbackExecCtx::Enqueue(functor, + (error == GRPC_ERROR_NONE)); + } else { GRPC_CLOSURE_RUN( GRPC_CLOSURE_CREATE( functor_callback, functor, grpc_core::Executor::Scheduler(grpc_core::ExecutorJobType::SHORT)), GRPC_ERROR_REF(error)); + } GRPC_ERROR_UNREF(error); } void grpc_cq_end_op(grpc_completion_queue* cq, void* tag, grpc_error* error, void (*done)(void* done_arg, grpc_cq_completion* storage), - void* done_arg, grpc_cq_completion* storage) { - cq->vtable->end_op(cq, tag, error, done, done_arg, storage); + void* done_arg, grpc_cq_completion* storage, bool internal) { + cq->vtable->end_op(cq, tag, error, done, done_arg, storage, internal); } typedef struct { diff --git a/src/core/lib/surface/completion_queue.h b/src/core/lib/surface/completion_queue.h index d60fe6d6efe..3ba9fbb8765 100644 --- a/src/core/lib/surface/completion_queue.h +++ b/src/core/lib/surface/completion_queue.h @@ -77,7 +77,8 @@ bool grpc_cq_begin_op(grpc_completion_queue* cc, void* tag); grpc_cq_begin_op */ void grpc_cq_end_op(grpc_completion_queue* cc, void* tag, grpc_error* error, void (*done)(void* done_arg, grpc_cq_completion* storage), - void* done_arg, grpc_cq_completion* storage); + void* done_arg, grpc_cq_completion* storage, + bool internal = false); grpc_pollset* grpc_cq_pollset(grpc_completion_queue* cc); diff --git a/src/core/lib/surface/server.cc b/src/core/lib/surface/server.cc index 2377c4d8f23..19f61c548d6 100644 --- a/src/core/lib/surface/server.cc +++ b/src/core/lib/surface/server.cc @@ -513,7 +513,7 @@ static void publish_call(grpc_server* server, call_data* calld, size_t cq_idx, } grpc_cq_end_op(calld->cq_new, rc->tag, GRPC_ERROR_NONE, done_request_event, - rc, &rc->completion); + rc, &rc->completion, true); } static void publish_new_rpc(void* arg, grpc_error* error) { From 5d95bf037d2ef325c0221d17a4c2ece586349f46 Mon Sep 17 00:00:00 2001 From: Richard Belleville Date: Mon, 20 May 2019 14:09:10 -0700 Subject: [PATCH 35/83] Actually include README.rst in all packages --- src/python/grpcio_channelz/setup.py | 4 ++++ src/python/grpcio_health_checking/setup.py | 4 ++++ src/python/grpcio_reflection/setup.py | 4 ++++ src/python/grpcio_status/setup.py | 4 ++++ src/python/grpcio_testing/setup.py | 4 ++++ tools/distrib/python/grpcio_tools/setup.py | 4 ++++ 6 files changed, 24 insertions(+) diff --git a/src/python/grpcio_channelz/setup.py b/src/python/grpcio_channelz/setup.py index f8c0e93913d..cc03809dda8 100644 --- a/src/python/grpcio_channelz/setup.py +++ b/src/python/grpcio_channelz/setup.py @@ -18,6 +18,9 @@ import sys import setuptools +_PACKAGE_PATH = os.path.realpath(os.path.dirname(__file__)) +_README_PATH = os.path.join(_PACKAGE_PATH, 'README.rst') + # Ensure we're in the proper directory whether or not we're being used by pip. os.chdir(os.path.dirname(os.path.abspath(__file__))) @@ -85,6 +88,7 @@ setuptools.setup( version=grpc_version.VERSION, license='Apache License 2.0', description='Channel Level Live Debug Information Service for gRPC', + long_description=open(_README_PATH, 'r').read(), author='The gRPC Authors', author_email='grpc-io@googlegroups.com', classifiers=CLASSIFIERS, diff --git a/src/python/grpcio_health_checking/setup.py b/src/python/grpcio_health_checking/setup.py index 5a09a80f6ae..dc2a69c1f43 100644 --- a/src/python/grpcio_health_checking/setup.py +++ b/src/python/grpcio_health_checking/setup.py @@ -17,6 +17,9 @@ import os import setuptools +_PACKAGE_PATH = os.path.realpath(os.path.dirname(__file__)) +_README_PATH = os.path.join(_PACKAGE_PATH, 'README.rst') + # Ensure we're in the proper directory whether or not we're being used by pip. os.chdir(os.path.dirname(os.path.abspath(__file__))) @@ -83,6 +86,7 @@ setuptools.setup( name='grpcio-health-checking', version=grpc_version.VERSION, description='Standard Health Checking Service for gRPC', + long_description=open(_README_PATH, 'r').read(), author='The gRPC Authors', author_email='grpc-io@googlegroups.com', url='https://grpc.io', diff --git a/src/python/grpcio_reflection/setup.py b/src/python/grpcio_reflection/setup.py index f205069acd5..3fbcfda3229 100644 --- a/src/python/grpcio_reflection/setup.py +++ b/src/python/grpcio_reflection/setup.py @@ -18,6 +18,9 @@ import sys import setuptools +_PACKAGE_PATH = os.path.realpath(os.path.dirname(__file__)) +_README_PATH = os.path.join(_PACKAGE_PATH, 'README.rst') + # Ensure we're in the proper directory whether or not we're being used by pip. os.chdir(os.path.dirname(os.path.abspath(__file__))) @@ -85,6 +88,7 @@ setuptools.setup( version=grpc_version.VERSION, license='Apache License 2.0', description='Standard Protobuf Reflection Service for gRPC', + long_description=open(_README_PATH, 'r').read(), author='The gRPC Authors', author_email='grpc-io@googlegroups.com', classifiers=CLASSIFIERS, diff --git a/src/python/grpcio_status/setup.py b/src/python/grpcio_status/setup.py index 983d3ea430b..06d5dcfa8aa 100644 --- a/src/python/grpcio_status/setup.py +++ b/src/python/grpcio_status/setup.py @@ -17,6 +17,9 @@ import os import setuptools +_PACKAGE_PATH = os.path.realpath(os.path.dirname(__file__)) +_README_PATH = os.path.join(_PACKAGE_PATH, 'README.rst') + # Ensure we're in the proper directory whether or not we're being used by pip. os.chdir(os.path.dirname(os.path.abspath(__file__))) @@ -82,6 +85,7 @@ setuptools.setup( name='grpcio-status', version=grpc_version.VERSION, description='Status proto mapping for gRPC', + long_description=open(_README_PATH, 'r').read(), author='The gRPC Authors', author_email='grpc-io@googlegroups.com', url='https://grpc.io', diff --git a/src/python/grpcio_testing/setup.py b/src/python/grpcio_testing/setup.py index 18db71e0f09..05d2a130ed6 100644 --- a/src/python/grpcio_testing/setup.py +++ b/src/python/grpcio_testing/setup.py @@ -18,6 +18,9 @@ import sys import setuptools +_PACKAGE_PATH = os.path.realpath(os.path.dirname(__file__)) +_README_PATH = os.path.join(_PACKAGE_PATH, 'README.rst') + # Ensure we're in the proper directory whether or not we're being used by pip. os.chdir(os.path.dirname(os.path.abspath(__file__))) @@ -68,6 +71,7 @@ setuptools.setup( version=grpc_version.VERSION, license='Apache License 2.0', description='Testing utilities for gRPC Python', + long_description=open(_README_PATH, 'r').read(), author='The gRPC Authors', author_email='grpc-io@googlegroups.com', url='https://grpc.io', diff --git a/tools/distrib/python/grpcio_tools/setup.py b/tools/distrib/python/grpcio_tools/setup.py index 64c468cbf7b..e83e08b0431 100644 --- a/tools/distrib/python/grpcio_tools/setup.py +++ b/tools/distrib/python/grpcio_tools/setup.py @@ -31,6 +31,9 @@ from setuptools.command import build_ext # TODO(atash) add flag to disable Cython use +_PACKAGE_PATH = os.path.realpath(os.path.dirname(__file__)) +_README_PATH = os.path.join(_PACKAGE_PATH, 'README.rst') + os.chdir(os.path.dirname(os.path.abspath(__file__))) sys.path.insert(0, os.path.abspath('.')) @@ -191,6 +194,7 @@ setuptools.setup( name='grpcio-tools', version=grpc_version.VERSION, description='Protobuf code generator for gRPC', + long_description=open(_README_PATH, 'r').read(), author='The gRPC Authors', author_email='grpc-io@googlegroups.com', url='https://grpc.io', From 035bf8eb14cc119dafec0aebd19e953e65142cb9 Mon Sep 17 00:00:00 2001 From: Karthik Ravi Shankar Date: Tue, 21 May 2019 10:50:18 -0700 Subject: [PATCH 36/83] Fix clang errors --- src/core/lib/surface/completion_queue.cc | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/core/lib/surface/completion_queue.cc b/src/core/lib/surface/completion_queue.cc index 64ceb45cf24..5fa36392da5 100644 --- a/src/core/lib/surface/completion_queue.cc +++ b/src/core/lib/surface/completion_queue.cc @@ -861,18 +861,19 @@ static void cq_end_op_for_callback( grpc_core::ApplicationCallbackExecCtx::Enqueue(functor, (error == GRPC_ERROR_NONE)); } else { - GRPC_CLOSURE_RUN( - GRPC_CLOSURE_CREATE( - functor_callback, functor, - grpc_core::Executor::Scheduler(grpc_core::ExecutorJobType::SHORT)), - GRPC_ERROR_REF(error)); + GRPC_CLOSURE_RUN( + GRPC_CLOSURE_CREATE( + functor_callback, functor, + grpc_core::Executor::Scheduler(grpc_core::ExecutorJobType::SHORT)), + GRPC_ERROR_REF(error)); } GRPC_ERROR_UNREF(error); } void grpc_cq_end_op(grpc_completion_queue* cq, void* tag, grpc_error* error, void (*done)(void* done_arg, grpc_cq_completion* storage), - void* done_arg, grpc_cq_completion* storage, bool internal) { + void* done_arg, grpc_cq_completion* storage, + bool internal) { cq->vtable->end_op(cq, tag, error, done, done_arg, storage, internal); } @@ -1351,11 +1352,10 @@ static void cq_finish_shutdown_callback(grpc_completion_queue* cq) { GPR_ASSERT(cqd->shutdown_called); cq->poller_vtable->shutdown(POLLSET_FROM_CQ(cq), &cq->pollset_shutdown_done); - GRPC_CLOSURE_RUN( - GRPC_CLOSURE_CREATE( - functor_callback, callback, - grpc_core::Executor::Scheduler(grpc_core::ExecutorJobType::SHORT)), - GRPC_ERROR_NONE); + GRPC_CLOSURE_RUN(GRPC_CLOSURE_CREATE(functor_callback, callback, + grpc_core::Executor::Scheduler( + grpc_core::ExecutorJobType::SHORT)), + GRPC_ERROR_NONE); } static void cq_shutdown_callback(grpc_completion_queue* cq) { From ccc105f3fdc0e017b8510f694f2ebb9c67c90324 Mon Sep 17 00:00:00 2001 From: Karthik Ravi Shankar Date: Tue, 21 May 2019 11:07:43 -0700 Subject: [PATCH 37/83] Move GRPC_CLOSURE_RUN to GRPC_CLOSURE_SCHED - As here we want it to be scheduled for execution later. --- src/core/lib/surface/completion_queue.cc | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/core/lib/surface/completion_queue.cc b/src/core/lib/surface/completion_queue.cc index 5fa36392da5..d0ed1a9f673 100644 --- a/src/core/lib/surface/completion_queue.cc +++ b/src/core/lib/surface/completion_queue.cc @@ -861,7 +861,7 @@ static void cq_end_op_for_callback( grpc_core::ApplicationCallbackExecCtx::Enqueue(functor, (error == GRPC_ERROR_NONE)); } else { - GRPC_CLOSURE_RUN( + GRPC_CLOSURE_SCHED( GRPC_CLOSURE_CREATE( functor_callback, functor, grpc_core::Executor::Scheduler(grpc_core::ExecutorJobType::SHORT)), @@ -1352,10 +1352,11 @@ static void cq_finish_shutdown_callback(grpc_completion_queue* cq) { GPR_ASSERT(cqd->shutdown_called); cq->poller_vtable->shutdown(POLLSET_FROM_CQ(cq), &cq->pollset_shutdown_done); - GRPC_CLOSURE_RUN(GRPC_CLOSURE_CREATE(functor_callback, callback, - grpc_core::Executor::Scheduler( - grpc_core::ExecutorJobType::SHORT)), - GRPC_ERROR_NONE); + GRPC_CLOSURE_SCHED( + GRPC_CLOSURE_CREATE( + functor_callback, callback, + grpc_core::Executor::Scheduler(grpc_core::ExecutorJobType::SHORT)), + GRPC_ERROR_NONE); } static void cq_shutdown_callback(grpc_completion_queue* cq) { From f131adf89c0fb510b755a390a4b833c887c0706c Mon Sep 17 00:00:00 2001 From: Keith Smiley Date: Tue, 21 May 2019 15:52:40 -0700 Subject: [PATCH 38/83] Fix bazel incompatible changes When building grpc with the upcoming `--incompatible_depset_is_not_iterable` flag, these violations were found --- bazel/generate_cc.bzl | 6 +++--- bazel/python_rules.bzl | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/bazel/generate_cc.bzl b/bazel/generate_cc.bzl index 29a888f608f..b7edcda702f 100644 --- a/bazel/generate_cc.bzl +++ b/bazel/generate_cc.bzl @@ -41,11 +41,11 @@ def _join_directories(directories): def generate_cc_impl(ctx): """Implementation of the generate_cc rule.""" - protos = [f for src in ctx.attr.srcs for f in src.proto.check_deps_sources] + protos = [f for src in ctx.attr.srcs for f in src.proto.check_deps_sources.to_list()] includes = [ f for src in ctx.attr.srcs - for f in src.proto.transitive_imports + for f in src.proto.transitive_imports.to_list() ] outs = [] proto_root = get_proto_root( @@ -128,7 +128,7 @@ def generate_cc_impl(ctx): arguments += ["-I{0}".format(f + "/../..")] well_known_proto_files = [ f - for f in ctx.attr.well_known_protos.files + for f in ctx.attr.well_known_protos.files.to_list() ] ctx.actions.run( diff --git a/bazel/python_rules.bzl b/bazel/python_rules.bzl index 2f3b38af002..17004f3474d 100644 --- a/bazel/python_rules.bzl +++ b/bazel/python_rules.bzl @@ -33,7 +33,7 @@ def _generate_py_impl(context): includes = [ file for src in context.attr.deps - for file in src.proto.transitive_imports + for file in src.proto.transitive_imports.to_list() ] proto_root = get_proto_root(context.label.workspace_root) format_str = (_GENERATED_GRPC_PROTO_FORMAT if context.executable.plugin else _GENERATED_PROTO_FORMAT) From 2e31120724ace26a939bb2c34892e1eb2b9cc8d0 Mon Sep 17 00:00:00 2001 From: Muxi Yan Date: Wed, 22 May 2019 10:42:39 -0700 Subject: [PATCH 39/83] Fix StressTests on Mac --- src/objective-c/tests/Podfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/objective-c/tests/Podfile b/src/objective-c/tests/Podfile index 146abf5b0e0..c9d620ca2e9 100644 --- a/src/objective-c/tests/Podfile +++ b/src/objective-c/tests/Podfile @@ -112,7 +112,7 @@ post_install do |installer| # GPR_UNREACHABLE_CODE causes "Control may reach end of non-void # function" warning config.build_settings['GCC_WARN_ABOUT_RETURN_TYPE'] = 'NO' - config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] = '$(inherited) COCOAPODS=1 GRPC_CRONET_WITH_PACKET_COALESCING=1' + config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] = '$(inherited) COCOAPODS=1 GRPC_CRONET_WITH_PACKET_COALESCING=1 GRPC_CFSTREAM=1' end end From 4f7f561564e52b0f2dd97ac661594d2449886df4 Mon Sep 17 00:00:00 2001 From: Karthik Ravi Shankar Date: Wed, 22 May 2019 10:42:50 -0700 Subject: [PATCH 40/83] Add synchronization to bm test - since we made the callback run on another thread, add synchronization in bm tests as well --- test/cpp/microbenchmarks/bm_cq.cc | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/test/cpp/microbenchmarks/bm_cq.cc b/test/cpp/microbenchmarks/bm_cq.cc index 50eb9454fbe..1f0b9621b21 100644 --- a/test/cpp/microbenchmarks/bm_cq.cc +++ b/test/cpp/microbenchmarks/bm_cq.cc @@ -166,6 +166,9 @@ class TagCallback : public grpc_experimental_completion_queue_functor { int* iter_; }; +static gpr_mu shutdown_mu; +static gpr_cv shutdown_cv; + // Check if completion queue is shut down class ShutdownCallback : public grpc_experimental_completion_queue_functor { public: @@ -174,7 +177,10 @@ class ShutdownCallback : public grpc_experimental_completion_queue_functor { } ~ShutdownCallback() {} static void Run(grpc_experimental_completion_queue_functor* cb, int ok) { + gpr_mu_lock(&shutdown_mu); *static_cast(cb)->done_ = static_cast(ok); + gpr_cv_signal(&shutdown_cv); + gpr_mu_unlock(&shutdown_mu); } private: @@ -185,6 +191,8 @@ static void BM_Callback_CQ_Pass1Core(benchmark::State& state) { TrackCounters track_counters; int iteration = 0; TagCallback tag_cb(&iteration); + gpr_mu_init(&shutdown_mu); + gpr_cv_init(&shutdown_cv); bool got_shutdown = false; ShutdownCallback shutdown_cb(&got_shutdown); grpc_completion_queue* cc = @@ -198,9 +206,19 @@ static void BM_Callback_CQ_Pass1Core(benchmark::State& state) { nullptr, &completion); } shutdown_and_destroy(cc); + + gpr_mu_lock(&shutdown_mu); + while (!got_shutdown) { + // Wait for the shutdown callback to complete. + gpr_cv_wait(&shutdown_cv, &shutdown_mu, + gpr_inf_future(GPR_CLOCK_REALTIME)); + } + gpr_mu_unlock(&shutdown_mu); GPR_ASSERT(got_shutdown); GPR_ASSERT(iteration == static_cast(state.iterations())); track_counters.Finish(state); + gpr_cv_destroy(&shutdown_cv); + gpr_mu_destroy(&shutdown_mu); } BENCHMARK(BM_Callback_CQ_Pass1Core); From 4a208f0071b0ece3a36bf3be4fc3c7602cce2cd8 Mon Sep 17 00:00:00 2001 From: Can Guler Date: Wed, 22 May 2019 10:48:54 -0700 Subject: [PATCH 41/83] Add v1.21.0 releases of grpc-go to interop matrix --- tools/interop_matrix/client_matrix.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/interop_matrix/client_matrix.py b/tools/interop_matrix/client_matrix.py index 234c71295b3..f9c069f6389 100644 --- a/tools/interop_matrix/client_matrix.py +++ b/tools/interop_matrix/client_matrix.py @@ -124,6 +124,7 @@ LANG_RELEASE_MATRIX = { ('v1.18.0', ReleaseInfo(runtime_subset=['go1.11'])), ('v1.19.0', ReleaseInfo(runtime_subset=['go1.11'])), ('v1.20.0', ReleaseInfo(runtime_subset=['go1.11'])), + ('v1.21.0', ReleaseInfo(runtime_subset=['go1.11'])), ]), 'java': OrderedDict([ From e1f62278e316d8b20dc5a2d7f91f76b117d6199b Mon Sep 17 00:00:00 2001 From: Karthik Ravi Shankar Date: Wed, 22 May 2019 13:53:10 -0700 Subject: [PATCH 42/83] Fix clang error --- test/cpp/microbenchmarks/bm_cq.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/test/cpp/microbenchmarks/bm_cq.cc b/test/cpp/microbenchmarks/bm_cq.cc index 1f0b9621b21..6ab4b083c13 100644 --- a/test/cpp/microbenchmarks/bm_cq.cc +++ b/test/cpp/microbenchmarks/bm_cq.cc @@ -210,8 +210,7 @@ static void BM_Callback_CQ_Pass1Core(benchmark::State& state) { gpr_mu_lock(&shutdown_mu); while (!got_shutdown) { // Wait for the shutdown callback to complete. - gpr_cv_wait(&shutdown_cv, &shutdown_mu, - gpr_inf_future(GPR_CLOCK_REALTIME)); + gpr_cv_wait(&shutdown_cv, &shutdown_mu, gpr_inf_future(GPR_CLOCK_REALTIME)); } gpr_mu_unlock(&shutdown_mu); GPR_ASSERT(got_shutdown); From 3d258e89aec313c2b3687a38eb06cc61559a1cda Mon Sep 17 00:00:00 2001 From: Karthik Ravi Shankar Date: Wed, 22 May 2019 14:59:33 -0700 Subject: [PATCH 43/83] Fix windows compiler errors --- test/core/surface/completion_queue_test.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/core/surface/completion_queue_test.cc b/test/core/surface/completion_queue_test.cc index ff6722ffb17..4a33b934f43 100644 --- a/test/core/surface/completion_queue_test.cc +++ b/test/core/surface/completion_queue_test.cc @@ -360,7 +360,7 @@ static void test_pluck_after_shutdown(void) { static void test_callback(void) { grpc_completion_queue* cc; - void* tags[128]; + static void* tags[128]; grpc_cq_completion completions[GPR_ARRAY_SIZE(tags)]; grpc_cq_polling_type polling_types[] = { GRPC_CQ_DEFAULT_POLLING, GRPC_CQ_NON_LISTENING, GRPC_CQ_NON_POLLING}; From edc506849f3429c6b4a6d90ec604aeb1b7b0eb54 Mon Sep 17 00:00:00 2001 From: Wayne Zhang Date: Wed, 22 May 2019 15:24:33 -0700 Subject: [PATCH 44/83] Expose interop test for others --- src/proto/grpc/testing/BUILD | 25 ++++++++----- test/cpp/interop/BUILD | 21 ++++++++++- test/cpp/util/BUILD | 1 + test/cpp/util/test_credentials_provider.cc | 43 ++++++++++++++++++++-- 4 files changed, 76 insertions(+), 14 deletions(-) diff --git a/src/proto/grpc/testing/BUILD b/src/proto/grpc/testing/BUILD index 727c99cf99c..212f0f3cca7 100644 --- a/src/proto/grpc/testing/BUILD +++ b/src/proto/grpc/testing/BUILD @@ -18,11 +18,17 @@ load("//bazel:grpc_build_system.bzl", "grpc_proto_library", "grpc_package") load("@grpc_python_dependencies//:requirements.bzl", "requirement") load("//bazel:python_rules.bzl", "py_proto_library") -grpc_package(name = "testing", visibility = "public") +grpc_package( + name = "testing", + visibility = "public", +) exports_files([ "echo.proto", "echo_messages.proto", + "test.proto", + "empty.proto", + "messages.proto", ]) grpc_proto_library( @@ -50,9 +56,11 @@ grpc_proto_library( grpc_proto_library( name = "echo_proto", srcs = ["echo.proto"], - deps = ["echo_messages_proto", - "simple_messages_proto"], generate_mocks = True, + deps = [ + "echo_messages_proto", + "simple_messages_proto", + ], ) grpc_proto_library( @@ -102,7 +110,7 @@ grpc_proto_library( name = "benchmark_service_proto", srcs = ["benchmark_service.proto"], deps = [ - "messages_proto", + "messages_proto", ], ) @@ -110,7 +118,7 @@ grpc_proto_library( name = "report_qps_scenario_service_proto", srcs = ["report_qps_scenario_service.proto"], deps = [ - "control_proto", + "control_proto", ], ) @@ -118,7 +126,7 @@ grpc_proto_library( name = "worker_service_proto", srcs = ["worker_service.proto"], deps = [ - "control_proto", + "control_proto", ], ) @@ -134,7 +142,7 @@ grpc_proto_library( has_services = False, deps = [ "//src/proto/grpc/core:stats_proto", - ] + ], ) grpc_proto_library( @@ -190,6 +198,5 @@ py_proto_library( name = "py_test_proto", deps = [ ":test_proto_descriptor", - ] + ], ) - diff --git a/test/cpp/interop/BUILD b/test/cpp/interop/BUILD index 6cf4719c17b..802302bc8bf 100644 --- a/test/cpp/interop/BUILD +++ b/test/cpp/interop/BUILD @@ -16,7 +16,10 @@ licenses(["notice"]) # Apache v2 load("//bazel:grpc_build_system.bzl", "grpc_cc_library", "grpc_cc_test", "grpc_cc_binary", "grpc_package") -grpc_package(name = "test/cpp/interop") +grpc_package( + name = "test/cpp/interop", + visibility = "public", +) grpc_cc_library( name = "server_helper_lib", @@ -103,6 +106,20 @@ grpc_cc_binary( ], ) +grpc_cc_binary( + name = "metrics_client", + srcs = ["metrics_client.cc"], + external_deps = [ + "gflags", + ], + language = "C++", + deps = [ + "//:grpc++", + "//test/cpp/util:metrics_server_lib", + "//test/cpp/util:test_config", + ], +) + grpc_cc_binary( name = "reconnect_interop_client", srcs = [ @@ -153,6 +170,7 @@ grpc_cc_test( external_deps = [ "gflags", ], + tags = ["no_windows"], deps = [ "//:gpr", "//:grpc", @@ -161,5 +179,4 @@ grpc_cc_test( "//test/cpp/util:test_config", "//test/cpp/util:test_util", ], - tags = ["no_windows"], ) diff --git a/test/cpp/util/BUILD b/test/cpp/util/BUILD index bb1ca868ffb..d112611ef35 100644 --- a/test/cpp/util/BUILD +++ b/test/cpp/util/BUILD @@ -75,6 +75,7 @@ grpc_cc_library( "test_credentials_provider.h", ], external_deps = [ + "gflags", "protobuf", ], deps = [ diff --git a/test/cpp/util/test_credentials_provider.cc b/test/cpp/util/test_credentials_provider.cc index 455f94e33d4..41779327cb9 100644 --- a/test/cpp/util/test_credentials_provider.cc +++ b/test/cpp/util/test_credentials_provider.cc @@ -19,21 +19,50 @@ #include "test/cpp/util/test_credentials_provider.h" +#include +#include +#include + #include #include +#include #include #include #include #include "test/core/end2end/data/ssl_test_data.h" +DEFINE_string(tls_cert_file, "", "The TLS cert file used when --use_tls=true"); +DEFINE_string(tls_key_file, "", "The TLS key file used when --use_tls=true"); + namespace grpc { namespace testing { namespace { +grpc::string ReadFile(const grpc::string& src_path) { + std::ifstream src; + src.open(src_path, std::ifstream::in | std::ifstream::binary); + + grpc::string contents; + src.seekg(0, std::ios::end); + contents.reserve(src.tellg()); + src.seekg(0, std::ios::beg); + contents.assign((std::istreambuf_iterator(src)), + (std::istreambuf_iterator())); + return contents; +} + class DefaultCredentialsProvider : public CredentialsProvider { public: + DefaultCredentialsProvider() { + if (!FLAGS_tls_key_file.empty()) { + custom_server_key_ = ReadFile(FLAGS_tls_key_file); + } + if (!FLAGS_tls_cert_file.empty()) { + custom_server_cert_ = ReadFile(FLAGS_tls_cert_file); + } + } ~DefaultCredentialsProvider() override {} void AddSecureType( @@ -87,11 +116,17 @@ class DefaultCredentialsProvider : public CredentialsProvider { grpc::experimental::AltsServerCredentialsOptions alts_opts; return grpc::experimental::AltsServerCredentials(alts_opts); } else if (type == grpc::testing::kTlsCredentialsType) { - SslServerCredentialsOptions::PemKeyCertPair pkcp = {test_server1_key, - test_server1_cert}; SslServerCredentialsOptions ssl_opts; ssl_opts.pem_root_certs = ""; - ssl_opts.pem_key_cert_pairs.push_back(pkcp); + if (!custom_server_key_.empty() && !custom_server_cert_.empty()) { + SslServerCredentialsOptions::PemKeyCertPair pkcp = {custom_server_key_, + custom_server_cert_}; + ssl_opts.pem_key_cert_pairs.push_back(pkcp); + } else { + SslServerCredentialsOptions::PemKeyCertPair pkcp = {test_server1_key, + test_server1_cert}; + ssl_opts.pem_key_cert_pairs.push_back(pkcp); + } return SslServerCredentials(ssl_opts); } else { std::unique_lock lock(mu_); @@ -121,6 +156,8 @@ class DefaultCredentialsProvider : public CredentialsProvider { std::vector added_secure_type_names_; std::vector> added_secure_type_providers_; + grpc::string custom_server_key_; + grpc::string custom_server_cert_; }; CredentialsProvider* g_provider = nullptr; From b53e707c3c155171d746e99e7020f311f0af3d8b Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Thu, 23 May 2019 17:54:40 +0200 Subject: [PATCH 45/83] update bazel version in dockerfile --- templates/tools/dockerfile/bazel.include | 9 ++++++--- tools/dockerfile/test/bazel/Dockerfile | 9 ++++++--- tools/dockerfile/test/sanity/Dockerfile | 9 ++++++--- 3 files changed, 18 insertions(+), 9 deletions(-) diff --git a/templates/tools/dockerfile/bazel.include b/templates/tools/dockerfile/bazel.include index 8888e938f43..3744dacc281 100644 --- a/templates/tools/dockerfile/bazel.include +++ b/templates/tools/dockerfile/bazel.include @@ -1,7 +1,10 @@ #======================== # Bazel installation +# Must be in sync with tools/bazel.sh +ENV BAZEL_VERSION 0.24.1 + RUN apt-get update && apt-get install -y wget && apt-get clean -RUN wget https://github.com/bazelbuild/bazel/releases/download/0.23.2/bazel-0.23.2-installer-linux-x86_64.sh && ${'\\'} - bash ./bazel-0.23.2-installer-linux-x86_64.sh && ${'\\'} - rm bazel-0.23.2-installer-linux-x86_64.sh +RUN wget "https://github.com/bazelbuild/bazel/releases/download/$BAZEL_VERSION/bazel-$BAZEL_VERSION-installer-linux-x86_64.sh" && ${'\\'} + bash ./bazel-$BAZEL_VERSION-installer-linux-x86_64.sh && ${'\\'} + rm bazel-$BAZEL_VERSION-installer-linux-x86_64.sh diff --git a/tools/dockerfile/test/bazel/Dockerfile b/tools/dockerfile/test/bazel/Dockerfile index 2536fe299cb..b9fc409d939 100644 --- a/tools/dockerfile/test/bazel/Dockerfile +++ b/tools/dockerfile/test/bazel/Dockerfile @@ -51,10 +51,13 @@ RUN pip install futures==2.2.0 enum34==1.0.4 protobuf==3.5.2.post1 six==1.10.0 t #======================== # Bazel installation +# Must be in sync with tools/bazel.sh +ENV BAZEL_VERSION 0.24.1 + RUN apt-get update && apt-get install -y wget && apt-get clean -RUN wget https://github.com/bazelbuild/bazel/releases/download/0.23.2/bazel-0.23.2-installer-linux-x86_64.sh && \ - bash ./bazel-0.23.2-installer-linux-x86_64.sh && \ - rm bazel-0.23.2-installer-linux-x86_64.sh +RUN wget "https://github.com/bazelbuild/bazel/releases/download/$BAZEL_VERSION/bazel-$BAZEL_VERSION-installer-linux-x86_64.sh" && \ + bash ./bazel-$BAZEL_VERSION-installer-linux-x86_64.sh && \ + rm bazel-$BAZEL_VERSION-installer-linux-x86_64.sh RUN mkdir -p /var/local/jenkins diff --git a/tools/dockerfile/test/sanity/Dockerfile b/tools/dockerfile/test/sanity/Dockerfile index 765bd7267a4..4ef4a0a9454 100644 --- a/tools/dockerfile/test/sanity/Dockerfile +++ b/tools/dockerfile/test/sanity/Dockerfile @@ -97,10 +97,13 @@ ENV CLANG_TIDY=clang-tidy #======================== # Bazel installation +# Must be in sync with tools/bazel.sh +ENV BAZEL_VERSION 0.24.1 + RUN apt-get update && apt-get install -y wget && apt-get clean -RUN wget https://github.com/bazelbuild/bazel/releases/download/0.23.2/bazel-0.23.2-installer-linux-x86_64.sh && \ - bash ./bazel-0.23.2-installer-linux-x86_64.sh && \ - rm bazel-0.23.2-installer-linux-x86_64.sh +RUN wget "https://github.com/bazelbuild/bazel/releases/download/$BAZEL_VERSION/bazel-$BAZEL_VERSION-installer-linux-x86_64.sh" && \ + bash ./bazel-$BAZEL_VERSION-installer-linux-x86_64.sh && \ + rm bazel-$BAZEL_VERSION-installer-linux-x86_64.sh # Define the default command. From 374ff3139a955b5df1fdb10b7a4cf228f597e1eb Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Thu, 23 May 2019 17:56:52 +0200 Subject: [PATCH 46/83] use bazel.sh for foundry RBE tests --- .../internal_ci/linux/grpc_bazel_on_foundry_base.sh | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/tools/internal_ci/linux/grpc_bazel_on_foundry_base.sh b/tools/internal_ci/linux/grpc_bazel_on_foundry_base.sh index 93399f81e79..bcde79ecd8e 100755 --- a/tools/internal_ci/linux/grpc_bazel_on_foundry_base.sh +++ b/tools/internal_ci/linux/grpc_bazel_on_foundry_base.sh @@ -15,26 +15,21 @@ set -ex -# Download bazel -temp_dir="$(mktemp -d)" -wget -q https://github.com/bazelbuild/bazel/releases/download/0.23.2/bazel-0.23.2-linux-x86_64 -O "${temp_dir}/bazel" -chmod 755 "${temp_dir}/bazel" -export PATH="${temp_dir}:${PATH}" -# This should show ${temp_dir}/bazel -which bazel - # change to grpc repo root cd $(dirname $0)/../../.. source tools/internal_ci/helper_scripts/prepare_build_linux_rc +# make sure bazel is available +tools/bazel.sh version + # to get "bazel" link for kokoro build, we need to generate # invocation UUID, set a flag for bazel to use it # and upload "bazel_invocation_ids" file as artifact. BAZEL_INVOCATION_ID="$(uuidgen)" echo "${BAZEL_INVOCATION_ID}" >"${KOKORO_ARTIFACTS_DIR}/bazel_invocation_ids" -bazel \ +tools/bazel.sh \ --bazelrc=tools/remote_build/kokoro.bazelrc \ test \ --invocation_id="${BAZEL_INVOCATION_ID}" \ From a3cc5ee574ca0e4c059ff353616ea307894aa223 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Thu, 23 May 2019 17:57:52 +0200 Subject: [PATCH 47/83] use bazel.sh in bazel RBE readme --- tools/remote_build/README.md | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/tools/remote_build/README.md b/tools/remote_build/README.md index 2cd5f03daf1..4cc3c7a0ea1 100644 --- a/tools/remote_build/README.md +++ b/tools/remote_build/README.md @@ -17,22 +17,27 @@ and tests run by Kokoro CI. ## Running remote build manually from dev workstation +*At the time being, tools/bazel.sh is used instead of invoking "bazel" directly +to overcome the bazel versioning problem (our BUILD files currently only work with +a specific window of bazel version and bazel.sh wrapper makes sure that version +is used).* + Run from repository root (opt, dbg): ``` # manual run of bazel tests remotely on Foundry -bazel --bazelrc=tools/remote_build/manual.bazelrc test --config=opt //test/... +tools/bazel.sh --bazelrc=tools/remote_build/manual.bazelrc test --config=opt //test/... ``` Sanitizer runs (asan, msan, tsan, ubsan): ``` # manual run of bazel tests remotely on Foundry with given sanitizer -bazel --bazelrc=tools/remote_build/manual.bazelrc test --config=asan //test/... +tools/bazel.sh --bazelrc=tools/remote_build/manual.bazelrc test --config=asan //test/... ``` Run on Windows MSVC: ``` # RBE manual run only for c-core (must be run on a Windows host machine) -bazel --bazelrc=tools/remote_build/windows.bazelrc build :all [--credentials_json=(path to service account credentials)] +tools/bazel.sh --bazelrc=tools/remote_build/windows.bazelrc build :all [--credentials_json=(path to service account credentials)] ``` Available command line options can be found in From af279949d49109ee54d484b345abe5b78b8614ea Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Thu, 23 May 2019 18:16:03 +0200 Subject: [PATCH 48/83] update bazel_rbe.bat --- tools/internal_ci/windows/bazel_rbe.bat | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/internal_ci/windows/bazel_rbe.bat b/tools/internal_ci/windows/bazel_rbe.bat index 8f2c534c5ef..30c66896edf 100644 --- a/tools/internal_ci/windows/bazel_rbe.bat +++ b/tools/internal_ci/windows/bazel_rbe.bat @@ -13,7 +13,8 @@ @rem limitations under the License. @rem TODO(jtattermusch): make this generate less output -choco install bazel -y --version 0.23.2 --limit-output +@rem TODO(jtattermusch): use tools/bazel.sh script to keep the versions in sync +choco install bazel -y --version 0.24.1 --limit-output cd github/grpc set PATH=C:\tools\msys64\usr\bin;C:\Python27;%PATH% From 796744596864229ffe1d2307e42add2c7b17761c Mon Sep 17 00:00:00 2001 From: Stanley Cheung Date: Wed, 22 May 2019 13:14:53 -0700 Subject: [PATCH 49/83] Fix PHP extension segfault --- src/php/ext/grpc/php_grpc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/php/ext/grpc/php_grpc.c b/src/php/ext/grpc/php_grpc.c index f6c2f85ed47..1098075690a 100644 --- a/src/php/ext/grpc/php_grpc.c +++ b/src/php/ext/grpc/php_grpc.c @@ -205,7 +205,9 @@ void register_fork_handlers() { void apply_ini_settings() { if (GRPC_G(enable_fork_support)) { - putenv("GRPC_ENABLE_FORK_SUPPORT=1"); + char *enable_str = malloc(sizeof("GRPC_ENABLE_FORK_SUPPORT=1")); + strcpy(enable_str, "GRPC_ENABLE_FORK_SUPPORT=1"); + putenv(enable_str); } if (GRPC_G(poll_strategy)) { From fb1a6b1d4804782f8ee9b6e1a563a4397f436714 Mon Sep 17 00:00:00 2001 From: Muxi Yan Date: Thu, 23 May 2019 13:25:04 -0700 Subject: [PATCH 50/83] clang-format --- .../tests/CronetTests/CronetUnitTests.mm | 2 +- src/objective-c/tests/EnableCronet.m | 2 +- .../tests/InteropTests/InteropTests.m | 2 +- .../InteropTestsMultipleChannels.m | 177 ++++++++++-------- 4 files changed, 104 insertions(+), 79 deletions(-) diff --git a/src/objective-c/tests/CronetTests/CronetUnitTests.mm b/src/objective-c/tests/CronetTests/CronetUnitTests.mm index b17bc334479..b0f3a3000f1 100644 --- a/src/objective-c/tests/CronetTests/CronetUnitTests.mm +++ b/src/objective-c/tests/CronetTests/CronetUnitTests.mm @@ -40,8 +40,8 @@ #import "test/core/util/test_config.h" #define GRPC_SHADOW_BORINGSSL_SYMBOLS -#import "src/core/tsi/grpc_shadow_boringssl.h" #import " +#import "src/core/tsi/grpc_shadow_boringssl.h" static void drain_cq(grpc_completion_queue *cq) { grpc_event ev; diff --git a/src/objective-c/tests/EnableCronet.m b/src/objective-c/tests/EnableCronet.m index b618ec74706..5e0c933d835 100644 --- a/src/objective-c/tests/EnableCronet.m +++ b/src/objective-c/tests/EnableCronet.m @@ -18,8 +18,8 @@ #ifdef GRPC_COMPILE_WITH_CRONET -#import #import "EnableCronet.h" +#import void enableCronet(void) { static dispatch_once_t enableCronet; diff --git a/src/objective-c/tests/InteropTests/InteropTests.m b/src/objective-c/tests/InteropTests/InteropTests.m index 91fdd0fd841..89f5b96c38b 100644 --- a/src/objective-c/tests/InteropTests/InteropTests.m +++ b/src/objective-c/tests/InteropTests/InteropTests.m @@ -36,8 +36,8 @@ #import #import -#import "InteropTestsBlockCallbacks.h" #import "../EnableCronet.h" +#import "InteropTestsBlockCallbacks.h" #define TEST_TIMEOUT 32 diff --git a/src/objective-c/tests/InteropTests/InteropTestsMultipleChannels.m b/src/objective-c/tests/InteropTests/InteropTestsMultipleChannels.m index 58946825f98..ffda48719e7 100644 --- a/src/objective-c/tests/InteropTests/InteropTestsMultipleChannels.m +++ b/src/objective-c/tests/InteropTests/InteropTestsMultipleChannels.m @@ -26,8 +26,8 @@ #import #import -#import "InteropTestsBlockCallbacks.h" #import "../EnableCronet.h" +#import "InteropTestsBlockCallbacks.h" #define NSStringize_helper(x) #x #define NSStringize(x) @NSStringize_helper(x) @@ -67,8 +67,6 @@ static const NSTimeInterval TEST_TIMEOUT = 8000; } @end - - @interface InteropTestsMultipleChannels : XCTestCase @end @@ -97,7 +95,6 @@ dispatch_once_t initCronet; // Cronet stack with remote host _remoteCronetService = [RMTTestService serviceWithHost:kRemoteSSLHost callOptions:options]; - // Local stack with no SSL options = [[GRPCMutableCallOptions alloc] init]; options.transportType = GRPCTransportTypeInsecure; @@ -134,42 +131,54 @@ dispatch_once_t initCronet; XCTAssertEqualObjects(message, expectedResponse); }; - GRPCUnaryProtoCall *callRemote = [_remoteService emptyCallWithMessage:request - responseHandler:[[InteropTestsBlockCallbacks alloc] initWithInitialMetadataCallback:nil - messageCallback:messageHandler - closeCallback:^(NSDictionary *trailingMetadata, NSError *error) { - XCTAssertNil(error); - [expectRemote fulfill]; - } - writeMessageCallback:nil] - callOptions:nil]; - GRPCUnaryProtoCall *callCronet = [_remoteCronetService emptyCallWithMessage:request - responseHandler:[[InteropTestsBlockCallbacks alloc] initWithInitialMetadataCallback:nil - messageCallback:messageHandler - closeCallback:^(NSDictionary *trailingMetadata, NSError *error) { - XCTAssertNil(error); - [expectCronetRemote fulfill]; - } - writeMessageCallback:nil] - callOptions:nil]; - GRPCUnaryProtoCall *callCleartext = [_localCleartextService emptyCallWithMessage:request - responseHandler:[[InteropTestsBlockCallbacks alloc] initWithInitialMetadataCallback:nil - messageCallback:messageHandler - closeCallback:^(NSDictionary *trailingMetadata, NSError *error) { - XCTAssertNil(error); - [expectCleartext fulfill]; - } - writeMessageCallback:nil] - callOptions:nil]; - GRPCUnaryProtoCall *callSSL = [_localSSLService emptyCallWithMessage:request - responseHandler:[[InteropTestsBlockCallbacks alloc] initWithInitialMetadataCallback:nil - messageCallback:messageHandler - closeCallback:^(NSDictionary *trailingMetadata, NSError *error) { - XCTAssertNil(error); - [expectSSL fulfill]; - } - writeMessageCallback:nil] - callOptions:nil]; + GRPCUnaryProtoCall *callRemote = [_remoteService + emptyCallWithMessage:request + responseHandler:[[InteropTestsBlockCallbacks alloc] + initWithInitialMetadataCallback:nil + messageCallback:messageHandler + closeCallback:^(NSDictionary *trailingMetadata, + NSError *error) { + XCTAssertNil(error); + [expectRemote fulfill]; + } + writeMessageCallback:nil] + callOptions:nil]; + GRPCUnaryProtoCall *callCronet = [_remoteCronetService + emptyCallWithMessage:request + responseHandler:[[InteropTestsBlockCallbacks alloc] + initWithInitialMetadataCallback:nil + messageCallback:messageHandler + closeCallback:^(NSDictionary *trailingMetadata, + NSError *error) { + XCTAssertNil(error); + [expectCronetRemote fulfill]; + } + writeMessageCallback:nil] + callOptions:nil]; + GRPCUnaryProtoCall *callCleartext = [_localCleartextService + emptyCallWithMessage:request + responseHandler:[[InteropTestsBlockCallbacks alloc] + initWithInitialMetadataCallback:nil + messageCallback:messageHandler + closeCallback:^(NSDictionary *trailingMetadata, + NSError *error) { + XCTAssertNil(error); + [expectCleartext fulfill]; + } + writeMessageCallback:nil] + callOptions:nil]; + GRPCUnaryProtoCall *callSSL = [_localSSLService + emptyCallWithMessage:request + responseHandler:[[InteropTestsBlockCallbacks alloc] + initWithInitialMetadataCallback:nil + messageCallback:messageHandler + closeCallback:^(NSDictionary *trailingMetadata, + NSError *error) { + XCTAssertNil(error); + [expectSSL fulfill]; + } + writeMessageCallback:nil] + callOptions:nil]; [callRemote start]; [callCronet start]; [callCleartext start]; @@ -219,42 +228,58 @@ dispatch_once_t initCronet; } }; - calls[0] = [_remoteService fullDuplexCallWithResponseHandler:[[InteropTestsBlockCallbacks alloc] initWithInitialMetadataCallback:nil - messageCallback:^(id message) { - handler(0, message); - } - closeCallback:^(NSDictionary *trailingMetadata, NSError *error) { - XCTAssertNil(error); - [expectRemote fulfill]; - } writeMessageCallback:nil] - callOptions:nil]; - calls[1] = [_remoteCronetService fullDuplexCallWithResponseHandler:[[InteropTestsBlockCallbacks alloc] initWithInitialMetadataCallback:nil - messageCallback:^(id message) { - handler(1, message); - } - closeCallback:^(NSDictionary *trailingMetadata, NSError *error) { - XCTAssertNil(error); - [expectCronetRemote fulfill]; - } writeMessageCallback:nil] - callOptions:nil]; - calls[2] = [_localCleartextService fullDuplexCallWithResponseHandler:[[InteropTestsBlockCallbacks alloc] initWithInitialMetadataCallback:nil - messageCallback:^(id message) { - handler(2, message); - } - closeCallback:^(NSDictionary *trailingMetadata, NSError *error) { - XCTAssertNil(error); - [expectCleartext fulfill]; - } writeMessageCallback:nil] - callOptions:nil]; - calls[3] = [_localSSLService fullDuplexCallWithResponseHandler:[[InteropTestsBlockCallbacks alloc] initWithInitialMetadataCallback:nil - messageCallback:^(id message) { - handler(3, message); - } - closeCallback:^(NSDictionary *trailingMetadata, NSError *error) { - XCTAssertNil(error); - [expectSSL fulfill]; - } writeMessageCallback:nil] - callOptions:nil]; + calls[0] = [_remoteService + fullDuplexCallWithResponseHandler:[[InteropTestsBlockCallbacks alloc] + initWithInitialMetadataCallback:nil + messageCallback:^(id message) { + handler(0, message); + } + closeCallback:^(NSDictionary *trailingMetadata, + NSError *error) { + XCTAssertNil(error); + [expectRemote fulfill]; + } + writeMessageCallback:nil] + callOptions:nil]; + calls[1] = [_remoteCronetService + fullDuplexCallWithResponseHandler:[[InteropTestsBlockCallbacks alloc] + initWithInitialMetadataCallback:nil + messageCallback:^(id message) { + handler(1, message); + } + closeCallback:^(NSDictionary *trailingMetadata, + NSError *error) { + XCTAssertNil(error); + [expectCronetRemote fulfill]; + } + writeMessageCallback:nil] + callOptions:nil]; + calls[2] = [_localCleartextService + fullDuplexCallWithResponseHandler:[[InteropTestsBlockCallbacks alloc] + initWithInitialMetadataCallback:nil + messageCallback:^(id message) { + handler(2, message); + } + closeCallback:^(NSDictionary *trailingMetadata, + NSError *error) { + XCTAssertNil(error); + [expectCleartext fulfill]; + } + writeMessageCallback:nil] + callOptions:nil]; + calls[3] = [_localSSLService + fullDuplexCallWithResponseHandler:[[InteropTestsBlockCallbacks alloc] + initWithInitialMetadataCallback:nil + messageCallback:^(id message) { + handler(3, message); + } + closeCallback:^(NSDictionary *trailingMetadata, + NSError *error) { + XCTAssertNil(error); + [expectSSL fulfill]; + } + writeMessageCallback:nil] + callOptions:nil]; for (int i = 0; i < 4; i++) { [calls[i] start]; [calls[i] writeMessage:requests[0]]; From 0a57193dec25db5e5b44e7a7445fb7b0a55fe571 Mon Sep 17 00:00:00 2001 From: Arjun Roy Date: Thu, 23 May 2019 16:11:23 -0700 Subject: [PATCH 51/83] Replaced gpr_ref with grpc_core::Atomic in call batch struct --- src/core/lib/surface/call.cc | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/core/lib/surface/call.cc b/src/core/lib/surface/call.cc index 254476f47e3..271b3ddd560 100644 --- a/src/core/lib/surface/call.cc +++ b/src/core/lib/surface/call.cc @@ -74,7 +74,7 @@ #define ESTIMATED_MDELEM_COUNT 16 struct batch_control { - batch_control() { gpr_ref_init(&steps_to_complete, 0); } + batch_control() = default; grpc_call* call = nullptr; grpc_transport_stream_op_batch op; @@ -99,8 +99,14 @@ struct batch_control { } completion_data; grpc_closure start_batch; grpc_closure finish_batch; - gpr_refcount steps_to_complete; + grpc_core::Atomic steps_to_complete; gpr_atm batch_error = reinterpret_cast(GRPC_ERROR_NONE); + void set_num_steps_to_complete(uintptr_t steps) { + steps_to_complete.Store(steps, grpc_core::MemoryOrder::RELEASE); + } + bool completed_batch_step() { + return steps_to_complete.FetchSub(1, grpc_core::MemoryOrder::ACQ_REL) == 1; + } }; struct parent_call { @@ -1225,7 +1231,7 @@ static void post_batch_completion(batch_control* bctl) { } static void finish_batch_step(batch_control* bctl) { - if (GPR_UNLIKELY(gpr_unref(&bctl->steps_to_complete))) { + if (GPR_UNLIKELY(bctl->completed_batch_step())) { post_batch_completion(bctl); } } @@ -1866,7 +1872,7 @@ static grpc_call_error call_start_batch(grpc_call* call, const grpc_op* ops, if (!is_notify_tag_closure) { GPR_ASSERT(grpc_cq_begin_op(call->cq, notify_tag)); } - gpr_ref_init(&bctl->steps_to_complete, (has_send_ops ? 1 : 0) + num_recv_ops); + bctl->set_num_steps_to_complete((has_send_ops ? 1 : 0) + num_recv_ops); if (has_send_ops) { GRPC_CLOSURE_INIT(&bctl->finish_batch, finish_batch, bctl, From d2c8eb94c954914e14f979229e963964211c80f8 Mon Sep 17 00:00:00 2001 From: Karthik Ravi Shankar Date: Thu, 23 May 2019 18:09:12 -0700 Subject: [PATCH 52/83] Fix microbenchmark failures --- test/cpp/microbenchmarks/callback_streaming_ping_pong.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/cpp/microbenchmarks/callback_streaming_ping_pong.h b/test/cpp/microbenchmarks/callback_streaming_ping_pong.h index 9fb86bd8299..0d27e0efa50 100644 --- a/test/cpp/microbenchmarks/callback_streaming_ping_pong.h +++ b/test/cpp/microbenchmarks/callback_streaming_ping_pong.h @@ -115,7 +115,7 @@ class BidiClient int msgs_size_; std::mutex mu; std::condition_variable cv; - bool done; + bool done = false; }; template From b18faa6c95bee22f03730ad4bc9b192440b5403b Mon Sep 17 00:00:00 2001 From: Karthik Ravi Shankar Date: Thu, 23 May 2019 20:08:45 -0700 Subject: [PATCH 53/83] Fix tsan error --- test/cpp/microbenchmarks/bm_cq.cc | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/test/cpp/microbenchmarks/bm_cq.cc b/test/cpp/microbenchmarks/bm_cq.cc index 6ab4b083c13..edbff9c2be3 100644 --- a/test/cpp/microbenchmarks/bm_cq.cc +++ b/test/cpp/microbenchmarks/bm_cq.cc @@ -150,6 +150,9 @@ static void shutdown_and_destroy(grpc_completion_queue* cc) { grpc_completion_queue_destroy(cc); } +static gpr_mu shutdown_mu, mu; +static gpr_cv shutdown_cv, cv; + // Tag completion queue iterate times class TagCallback : public grpc_experimental_completion_queue_functor { public: @@ -158,17 +161,17 @@ class TagCallback : public grpc_experimental_completion_queue_functor { } ~TagCallback() {} static void Run(grpc_experimental_completion_queue_functor* cb, int ok) { + gpr_mu_lock(&mu); GPR_ASSERT(static_cast(ok)); *static_cast(cb)->iter_ += 1; + gpr_cv_signal(&cv); + gpr_mu_unlock(&mu); }; private: int* iter_; }; -static gpr_mu shutdown_mu; -static gpr_cv shutdown_cv; - // Check if completion queue is shut down class ShutdownCallback : public grpc_experimental_completion_queue_functor { public: @@ -189,8 +192,10 @@ class ShutdownCallback : public grpc_experimental_completion_queue_functor { static void BM_Callback_CQ_Pass1Core(benchmark::State& state) { TrackCounters track_counters; - int iteration = 0; + int iteration = 0, current_iterations = 0; TagCallback tag_cb(&iteration); + gpr_mu_init(&mu); + gpr_cv_init(&cv); gpr_mu_init(&shutdown_mu); gpr_cv_init(&shutdown_cv); bool got_shutdown = false; @@ -207,15 +212,26 @@ static void BM_Callback_CQ_Pass1Core(benchmark::State& state) { } shutdown_and_destroy(cc); + gpr_mu_lock(&mu); + current_iterations = static_cast(state.iterations()); + while (current_iterations != iteration) { + // Wait for all the callbacks to complete. + gpr_cv_wait(&cv, &mu, gpr_inf_future(GPR_CLOCK_REALTIME)); + } + gpr_mu_unlock(&mu); + gpr_mu_lock(&shutdown_mu); while (!got_shutdown) { // Wait for the shutdown callback to complete. gpr_cv_wait(&shutdown_cv, &shutdown_mu, gpr_inf_future(GPR_CLOCK_REALTIME)); } gpr_mu_unlock(&shutdown_mu); + GPR_ASSERT(got_shutdown); GPR_ASSERT(iteration == static_cast(state.iterations())); track_counters.Finish(state); + gpr_cv_destroy(&cv); + gpr_mu_destroy(&mu); gpr_cv_destroy(&shutdown_cv); gpr_mu_destroy(&shutdown_mu); } From 088319bc40f2d0b38c69a7b3c557749131451810 Mon Sep 17 00:00:00 2001 From: Karthik Ravi Shankar Date: Thu, 23 May 2019 22:10:53 -0700 Subject: [PATCH 54/83] IWYU in core_codegen_interface core_codegen_interface requires ByteBuffer in generated code and needs to include byte_buffer.h NO_BUG=Cleanup --- include/grpcpp/impl/codegen/core_codegen_interface.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/grpcpp/impl/codegen/core_codegen_interface.h b/include/grpcpp/impl/codegen/core_codegen_interface.h index 3792c3d4693..02b5033c51f 100644 --- a/include/grpcpp/impl/codegen/core_codegen_interface.h +++ b/include/grpcpp/impl/codegen/core_codegen_interface.h @@ -19,6 +19,7 @@ #ifndef GRPCPP_IMPL_CODEGEN_CORE_CODEGEN_INTERFACE_H #define GRPCPP_IMPL_CODEGEN_CORE_CODEGEN_INTERFACE_H +#include #include #include #include From caa965bd1d0b12e388cd95da5593880049675b1b Mon Sep 17 00:00:00 2001 From: Muxi Yan Date: Fri, 24 May 2019 09:25:17 -0700 Subject: [PATCH 55/83] Address comments --- .../{EnableCronet.h => ConfigureCronet.h} | 2 +- .../{EnableCronet.m => ConfigureCronet.m} | 10 ++--- .../CronetTests/CoreCronetEnd2EndTests.mm | 4 +- .../tests/CronetTests/CronetUnitTests.mm | 6 +-- .../tests/InteropTests/InteropTests.m | 4 +- .../InteropTestsMultipleChannels.m | 4 +- src/objective-c/tests/Podfile | 26 ++++++------- .../tests/Tests.xcodeproj/project.pbxproj | 37 +++++-------------- .../xcschemes/InteropTests.xcscheme | 2 +- 9 files changed, 36 insertions(+), 59 deletions(-) rename src/objective-c/tests/{EnableCronet.h => ConfigureCronet.h} (96%) rename src/objective-c/tests/{EnableCronet.m => ConfigureCronet.m} (86%) diff --git a/src/objective-c/tests/EnableCronet.h b/src/objective-c/tests/ConfigureCronet.h similarity index 96% rename from src/objective-c/tests/EnableCronet.h rename to src/objective-c/tests/ConfigureCronet.h index 720aace4075..cc5c038f3c6 100644 --- a/src/objective-c/tests/EnableCronet.h +++ b/src/objective-c/tests/ConfigureCronet.h @@ -25,7 +25,7 @@ extern "C" { /** * Enable Cronet for once. */ -void enableCronet(void); +void configureCronet(void); #ifdef __cplusplus } diff --git a/src/objective-c/tests/EnableCronet.m b/src/objective-c/tests/ConfigureCronet.m similarity index 86% rename from src/objective-c/tests/EnableCronet.m rename to src/objective-c/tests/ConfigureCronet.m index 5e0c933d835..ab137e28cad 100644 --- a/src/objective-c/tests/EnableCronet.m +++ b/src/objective-c/tests/ConfigureCronet.m @@ -18,13 +18,13 @@ #ifdef GRPC_COMPILE_WITH_CRONET -#import "EnableCronet.h" +#import "ConfigureCronet.h" #import -void enableCronet(void) { - static dispatch_once_t enableCronet; - dispatch_once(&enableCronet, ^{ - NSLog(@"enableCronet()"); +void configureCronet(void) { + static dispatch_once_t configureCronet; + dispatch_once(&configureCronet, ^{ + NSLog(@"configureCronet()"); [Cronet setHttp2Enabled:YES]; [Cronet setSslKeyLogFileName:@"Documents/key"]; [Cronet enableTestCertVerifierForTesting]; diff --git a/src/objective-c/tests/CronetTests/CoreCronetEnd2EndTests.mm b/src/objective-c/tests/CronetTests/CoreCronetEnd2EndTests.mm index 034d06b1976..a24734024dc 100644 --- a/src/objective-c/tests/CronetTests/CoreCronetEnd2EndTests.mm +++ b/src/objective-c/tests/CronetTests/CoreCronetEnd2EndTests.mm @@ -49,7 +49,7 @@ #import #include -#import "../EnableCronet.h" +#import "../ConfigureCronet.h" typedef struct fullstack_secure_fixture_data { char *localaddr; @@ -178,7 +178,7 @@ static char *roots_filename; grpc_init(); - enableCronet(); + configureCronet(); } // The tearDown() function is run after all test cases finish running diff --git a/src/objective-c/tests/CronetTests/CronetUnitTests.mm b/src/objective-c/tests/CronetTests/CronetUnitTests.mm index b0f3a3000f1..5ae0d77e37f 100644 --- a/src/objective-c/tests/CronetTests/CronetUnitTests.mm +++ b/src/objective-c/tests/CronetTests/CronetUnitTests.mm @@ -20,7 +20,7 @@ #import #import -#import "../EnableCronet.h" +#import "../ConfigureCronet.h" #import #import @@ -40,8 +40,8 @@ #import "test/core/util/test_config.h" #define GRPC_SHADOW_BORINGSSL_SYMBOLS -#import " #import "src/core/tsi/grpc_shadow_boringssl.h" +#import " static void drain_cq(grpc_completion_queue *cq) { grpc_event ev; @@ -63,7 +63,7 @@ static void drain_cq(grpc_completion_queue *cq) { grpc_test_init(1, argv); grpc_init(); - enableCronet(); + configureCronet(); init_ssl(); } diff --git a/src/objective-c/tests/InteropTests/InteropTests.m b/src/objective-c/tests/InteropTests/InteropTests.m index 89f5b96c38b..767c7c9c3c5 100644 --- a/src/objective-c/tests/InteropTests/InteropTests.m +++ b/src/objective-c/tests/InteropTests/InteropTests.m @@ -36,7 +36,7 @@ #import #import -#import "../EnableCronet.h" +#import "../ConfigureCronet.h" #import "InteropTestsBlockCallbacks.h" #define TEST_TIMEOUT 32 @@ -115,7 +115,7 @@ BOOL isRemoteInteropTest(NSString *host) { + (void)setUp { NSLog(@"InteropTest Started, class: %@", [[self class] description]); #ifdef GRPC_COMPILE_WITH_CRONET - enableCronet(); + configureCronet(); if ([self useCronet]) { [GRPCCall useCronetWithEngine:[Cronet getGlobalEngine]]; } diff --git a/src/objective-c/tests/InteropTests/InteropTestsMultipleChannels.m b/src/objective-c/tests/InteropTests/InteropTestsMultipleChannels.m index ffda48719e7..14ba2871aa2 100644 --- a/src/objective-c/tests/InteropTests/InteropTestsMultipleChannels.m +++ b/src/objective-c/tests/InteropTests/InteropTestsMultipleChannels.m @@ -26,7 +26,7 @@ #import #import -#import "../EnableCronet.h" +#import "../ConfigureCronet.h" #import "InteropTestsBlockCallbacks.h" #define NSStringize_helper(x) #x @@ -87,7 +87,7 @@ dispatch_once_t initCronet; _remoteService = [RMTTestService serviceWithHost:kRemoteSSLHost callOptions:nil]; - enableCronet(); + configureCronet(); // Default stack with remote host GRPCMutableCallOptions *options = [[GRPCMutableCallOptions alloc] init]; diff --git a/src/objective-c/tests/Podfile b/src/objective-c/tests/Podfile index c9d620ca2e9..60d2a98fba2 100644 --- a/src/objective-c/tests/Podfile +++ b/src/objective-c/tests/Podfile @@ -21,24 +21,20 @@ target 'MacTests' do pod 'RemoteTest', :path => "RemoteTestClient", :inhibit_warnings => true end -%w( - UnitTests -).each do |target_name| - target target_name do - platform :ios, '8.0' - pod 'Protobuf', :path => "#{GRPC_LOCAL_SRC}/third_party/protobuf", :inhibit_warnings => true +target 'UnitTests' do + platform :ios, '8.0' + pod 'Protobuf', :path => "#{GRPC_LOCAL_SRC}/third_party/protobuf", :inhibit_warnings => true - pod '!ProtoCompiler', :path => "#{GRPC_LOCAL_SRC}/src/objective-c" - pod '!ProtoCompiler-gRPCPlugin', :path => "#{GRPC_LOCAL_SRC}/src/objective-c" + pod '!ProtoCompiler', :path => "#{GRPC_LOCAL_SRC}/src/objective-c" + pod '!ProtoCompiler-gRPCPlugin', :path => "#{GRPC_LOCAL_SRC}/src/objective-c" - pod 'BoringSSL-GRPC', :podspec => "#{GRPC_LOCAL_SRC}/src/objective-c", :inhibit_warnings => true + pod 'BoringSSL-GRPC', :podspec => "#{GRPC_LOCAL_SRC}/src/objective-c", :inhibit_warnings => true - pod 'gRPC', :path => GRPC_LOCAL_SRC - pod 'gRPC-Core', :path => GRPC_LOCAL_SRC - pod 'gRPC-RxLibrary', :path => GRPC_LOCAL_SRC - pod 'gRPC-ProtoRPC', :path => GRPC_LOCAL_SRC, :inhibit_warnings => true - pod 'RemoteTest', :path => "RemoteTestClient", :inhibit_warnings => true - end + pod 'gRPC', :path => GRPC_LOCAL_SRC + pod 'gRPC-Core', :path => GRPC_LOCAL_SRC + pod 'gRPC-RxLibrary', :path => GRPC_LOCAL_SRC + pod 'gRPC-ProtoRPC', :path => GRPC_LOCAL_SRC, :inhibit_warnings => true + pod 'RemoteTest', :path => "RemoteTestClient", :inhibit_warnings => true end %w( diff --git a/src/objective-c/tests/Tests.xcodeproj/project.pbxproj b/src/objective-c/tests/Tests.xcodeproj/project.pbxproj index c226e29d83b..737d52b547d 100644 --- a/src/objective-c/tests/Tests.xcodeproj/project.pbxproj +++ b/src/objective-c/tests/Tests.xcodeproj/project.pbxproj @@ -11,8 +11,8 @@ 5E3F14842278B461007C6D90 /* InteropTestsBlockCallbacks.m in Sources */ = {isa = PBXBuildFile; fileRef = 5E3F14832278B461007C6D90 /* InteropTestsBlockCallbacks.m */; }; 5E3F14852278BF5D007C6D90 /* InteropTestsBlockCallbacks.m in Sources */ = {isa = PBXBuildFile; fileRef = 5E3F14832278B461007C6D90 /* InteropTestsBlockCallbacks.m */; }; 5E3F14862278BFFF007C6D90 /* InteropTestsBlockCallbacks.m in Sources */ = {isa = PBXBuildFile; fileRef = 5E3F14832278B461007C6D90 /* InteropTestsBlockCallbacks.m */; }; - 5E3F148D22792856007C6D90 /* EnableCronet.m in Sources */ = {isa = PBXBuildFile; fileRef = 5E3F1487227918AA007C6D90 /* EnableCronet.m */; }; - 5E3F148E22792AF5007C6D90 /* EnableCronet.m in Sources */ = {isa = PBXBuildFile; fileRef = 5E3F1487227918AA007C6D90 /* EnableCronet.m */; }; + 5E3F148D22792856007C6D90 /* ConfigureCronet.m in Sources */ = {isa = PBXBuildFile; fileRef = 5E3F1487227918AA007C6D90 /* ConfigureCronet.m */; }; + 5E3F148E22792AF5007C6D90 /* ConfigureCronet.m in Sources */ = {isa = PBXBuildFile; fileRef = 5E3F1487227918AA007C6D90 /* ConfigureCronet.m */; }; 5E7F486422775B37006656AD /* InteropTestsRemoteWithCronet.m in Sources */ = {isa = PBXBuildFile; fileRef = 5EE84BF31D4717E40050C6CC /* InteropTestsRemoteWithCronet.m */; }; 5E7F486522775B41006656AD /* CronetUnitTests.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5EAD6D261E27047400002378 /* CronetUnitTests.mm */; }; 5E7F486E22778086006656AD /* CoreCronetEnd2EndTests.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5E7F486D22778086006656AD /* CoreCronetEnd2EndTests.mm */; }; @@ -94,8 +94,8 @@ 5E0282E8215AA697007AC99D /* NSErrorUnitTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = NSErrorUnitTests.m; sourceTree = ""; }; 5E3F14822278B42D007C6D90 /* InteropTestsBlockCallbacks.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = InteropTestsBlockCallbacks.h; sourceTree = ""; }; 5E3F14832278B461007C6D90 /* InteropTestsBlockCallbacks.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = InteropTestsBlockCallbacks.m; sourceTree = ""; }; - 5E3F1487227918AA007C6D90 /* EnableCronet.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = EnableCronet.m; sourceTree = ""; }; - 5E3F148A227918C4007C6D90 /* EnableCronet.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = EnableCronet.h; sourceTree = ""; }; + 5E3F1487227918AA007C6D90 /* ConfigureCronet.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ConfigureCronet.m; sourceTree = ""; }; + 5E3F148A227918C4007C6D90 /* ConfigureCronet.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ConfigureCronet.h; sourceTree = ""; }; 5E7F485922775B15006656AD /* CronetTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = CronetTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 5E7F486622776AD8006656AD /* Cronet.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cronet.framework; path = Pods/CronetFramework/Cronet.framework; sourceTree = ""; }; 5E7F486D22778086006656AD /* CoreCronetEnd2EndTests.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = CoreCronetEnd2EndTests.mm; sourceTree = ""; }; @@ -396,8 +396,8 @@ 635697C91B14FC11007A7283 /* Tests */ = { isa = PBXGroup; children = ( - 5E3F148A227918C4007C6D90 /* EnableCronet.h */, - 5E3F1487227918AA007C6D90 /* EnableCronet.m */, + 5E3F148A227918C4007C6D90 /* ConfigureCronet.h */, + 5E3F1487227918AA007C6D90 /* ConfigureCronet.m */, 5EAFE8271F8EFB87007F2189 /* version.h */, 635697D71B14FC11007A7283 /* Supporting Files */, ); @@ -537,6 +537,7 @@ developmentRegion = English; hasScannedForEncodings = 0; knownRegions = ( + English, en, ); mainGroup = 635697BE1B14FC11007A7283; @@ -591,15 +592,11 @@ buildActionMask = 2147483647; files = ( ); - inputFileListPaths = ( - ); inputPaths = ( "${PODS_ROOT}/Target Support Files/Pods-InteropTests/Pods-InteropTests-frameworks.sh", "${PODS_ROOT}/CronetFramework/Cronet.framework", ); name = "[CP] Embed Pods Frameworks"; - outputFileListPaths = ( - ); outputPaths = ( "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Cronet.framework", ); @@ -613,15 +610,11 @@ buildActionMask = 2147483647; files = ( ); - inputFileListPaths = ( - ); inputPaths = ( "${PODS_ROOT}/Target Support Files/Pods-CronetTests/Pods-CronetTests-frameworks.sh", "${PODS_ROOT}/CronetFramework/Cronet.framework", ); name = "[CP] Embed Pods Frameworks"; - outputFileListPaths = ( - ); outputPaths = ( "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Cronet.framework", ); @@ -635,15 +628,11 @@ buildActionMask = 2147483647; files = ( ); - inputFileListPaths = ( - ); inputPaths = ( "${PODS_ROOT}/Target Support Files/Pods-CronetTests/Pods-CronetTests-resources.sh", "${PODS_CONFIGURATION_BUILD_DIR}/gRPC-iOS/gRPCCertificates.bundle", ); name = "[CP] Copy Pods Resources"; - outputFileListPaths = ( - ); outputPaths = ( "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/gRPCCertificates.bundle", ); @@ -679,15 +668,11 @@ buildActionMask = 2147483647; files = ( ); - inputFileListPaths = ( - ); inputPaths = ( "${PODS_ROOT}/Target Support Files/Pods-MacTests/Pods-MacTests-resources.sh", "${PODS_CONFIGURATION_BUILD_DIR}/gRPC-macOS/gRPCCertificates.bundle", ); name = "[CP] Copy Pods Resources"; - outputFileListPaths = ( - ); outputPaths = ( "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/gRPCCertificates.bundle", ); @@ -741,15 +726,11 @@ buildActionMask = 2147483647; files = ( ); - inputFileListPaths = ( - ); inputPaths = ( "${PODS_ROOT}/Target Support Files/Pods-InteropTests/Pods-InteropTests-resources.sh", "${PODS_CONFIGURATION_BUILD_DIR}/gRPC-iOS/gRPCCertificates.bundle", ); name = "[CP] Copy Pods Resources"; - outputFileListPaths = ( - ); outputPaths = ( "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/gRPCCertificates.bundle", ); @@ -819,7 +800,7 @@ buildActionMask = 2147483647; files = ( 5E3F14852278BF5D007C6D90 /* InteropTestsBlockCallbacks.m in Sources */, - 5E3F148D22792856007C6D90 /* EnableCronet.m in Sources */, + 5E3F148D22792856007C6D90 /* ConfigureCronet.m in Sources */, 5E7F486E22778086006656AD /* CoreCronetEnd2EndTests.mm in Sources */, 5E7F488522778A88006656AD /* InteropTests.m in Sources */, 5E7F486422775B37006656AD /* InteropTestsRemoteWithCronet.m in Sources */, @@ -832,7 +813,7 @@ buildActionMask = 2147483647; files = ( 5E3F14842278B461007C6D90 /* InteropTestsBlockCallbacks.m in Sources */, - 5E3F148E22792AF5007C6D90 /* EnableCronet.m in Sources */, + 5E3F148E22792AF5007C6D90 /* ConfigureCronet.m in Sources */, 5E7F488922778B04006656AD /* InteropTestsRemote.m in Sources */, 5E7F487922778226006656AD /* InteropTestsMultipleChannels.m in Sources */, 5EA477042273617B000F72FC /* InteropTestsLocalCleartext.m in Sources */, diff --git a/src/objective-c/tests/Tests.xcodeproj/xcshareddata/xcschemes/InteropTests.xcscheme b/src/objective-c/tests/Tests.xcodeproj/xcshareddata/xcschemes/InteropTests.xcscheme index a2b1614b991..adb3c366af2 100644 --- a/src/objective-c/tests/Tests.xcodeproj/xcshareddata/xcschemes/InteropTests.xcscheme +++ b/src/objective-c/tests/Tests.xcodeproj/xcshareddata/xcschemes/InteropTests.xcscheme @@ -86,7 +86,7 @@ + buildConfiguration = "Cronet"> Date: Fri, 24 May 2019 10:58:14 -0700 Subject: [PATCH 56/83] Swap java interop tests to openjdk8 Since openjdk8 is dead to us (see #19113), we cannot leave openjdk8 in the list of runtimes in client_matrix.py. The list of runtimes is now the defaults to use, which includes master, and you can specify alternative runtimes per-release. Fixes #19113 --- .../Dockerfile.include | 6 +- .../grpc_interop_java/Dockerfile.template | 3 +- .../build_interop.sh.template | 2 +- .../grpc_interop_java/java_deps.include | 17 --- .../Dockerfile.template | 3 - .../build_interop.sh.template | 3 - .../java_deps.include | 12 --- .../interoptest/grpc_interop_java/Dockerfile | 18 +--- .../grpc_interop_java/build_interop.sh | 2 +- .../grpc_interop_java_oracle8/Dockerfile | 34 ------ .../build_interop.sh | 44 -------- tools/interop_matrix/README.md | 6 +- tools/interop_matrix/client_matrix.py | 100 +++++++++--------- 13 files changed, 64 insertions(+), 186 deletions(-) rename templates/tools/dockerfile/interoptest/{grpc_interop_java_oracle8 => grpc_interop_java}/Dockerfile.include (63%) delete mode 100644 templates/tools/dockerfile/interoptest/grpc_interop_java/java_deps.include delete mode 100644 templates/tools/dockerfile/interoptest/grpc_interop_java_oracle8/Dockerfile.template delete mode 100644 templates/tools/dockerfile/interoptest/grpc_interop_java_oracle8/build_interop.sh.template delete mode 100644 templates/tools/dockerfile/interoptest/grpc_interop_java_oracle8/java_deps.include delete mode 100644 tools/dockerfile/interoptest/grpc_interop_java_oracle8/Dockerfile delete mode 100644 tools/dockerfile/interoptest/grpc_interop_java_oracle8/build_interop.sh diff --git a/templates/tools/dockerfile/interoptest/grpc_interop_java_oracle8/Dockerfile.include b/templates/tools/dockerfile/interoptest/grpc_interop_java/Dockerfile.include similarity index 63% rename from templates/tools/dockerfile/interoptest/grpc_interop_java_oracle8/Dockerfile.include rename to templates/tools/dockerfile/interoptest/grpc_interop_java/Dockerfile.include index 7307e29f0a0..c0b2b745c14 100644 --- a/templates/tools/dockerfile/interoptest/grpc_interop_java_oracle8/Dockerfile.include +++ b/templates/tools/dockerfile/interoptest/grpc_interop_java/Dockerfile.include @@ -14,7 +14,11 @@ <%include file="../../debian_jessie_header.include"/> -<%include file="java_deps.include"/> +RUN echo "deb http://archive.debian.org/debian/ jessie-backports main contrib non-free" > /etc/apt/sources.list.d/jessie-backports.list && ${'\\'} + echo 'Acquire::Check-Valid-Until no;' > /etc/apt/apt.conf.d/99no-check-valid-until && ${'\\'} + apt-get update && ${'\\'} + apt-get install -y --no-install-recommends -t jessie-backports openjdk-8-jdk-headless && ${'\\'} + apt-get clean # Define the default command. CMD ["bash"] diff --git a/templates/tools/dockerfile/interoptest/grpc_interop_java/Dockerfile.template b/templates/tools/dockerfile/interoptest/grpc_interop_java/Dockerfile.template index 74d01809e22..8eaa9a9dbbc 100644 --- a/templates/tools/dockerfile/interoptest/grpc_interop_java/Dockerfile.template +++ b/templates/tools/dockerfile/interoptest/grpc_interop_java/Dockerfile.template @@ -1,4 +1,3 @@ %YAML 1.2 --- | - <%include file="../grpc_interop_java_oracle8/Dockerfile.include"/> - + <%include file="Dockerfile.include"/> diff --git a/templates/tools/dockerfile/interoptest/grpc_interop_java/build_interop.sh.template b/templates/tools/dockerfile/interoptest/grpc_interop_java/build_interop.sh.template index 42eb4d8b96e..db5d40d5488 100644 --- a/templates/tools/dockerfile/interoptest/grpc_interop_java/build_interop.sh.template +++ b/templates/tools/dockerfile/interoptest/grpc_interop_java/build_interop.sh.template @@ -1,3 +1,3 @@ %YAML 1.2 --- | - <%include file="../../java_build_interop.sh.include"/> + <%include file="../../java_build_interop.sh.include"/> diff --git a/templates/tools/dockerfile/interoptest/grpc_interop_java/java_deps.include b/templates/tools/dockerfile/interoptest/grpc_interop_java/java_deps.include deleted file mode 100644 index 40d70e06d1a..00000000000 --- a/templates/tools/dockerfile/interoptest/grpc_interop_java/java_deps.include +++ /dev/null @@ -1,17 +0,0 @@ -# Install JDK 8 and Git -# -RUN echo oracle-java8-installer shared/accepted-oracle-license-v1-1 select true | /usr/bin/debconf-set-selections && ${'\\'} - echo "deb http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main" | tee /etc/apt/sources.list.d/webupd8team-java.list && ${'\\'} - echo "deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main" | tee -a /etc/apt/sources.list.d/webupd8team-java.list && ${'\\'} - apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys EEA14886 - -RUN apt-get update && apt-get -y install ${'\\'} - git ${'\\'} - libapr1 ${'\\'} - oracle-java8-installer ${'\\'} - && ${'\\'} - apt-get clean && rm -r /var/cache/oracle-jdk8-installer/ - -ENV JAVA_HOME /usr/lib/jvm/java-8-oracle -ENV PATH $PATH:$JAVA_HOME/bin - diff --git a/templates/tools/dockerfile/interoptest/grpc_interop_java_oracle8/Dockerfile.template b/templates/tools/dockerfile/interoptest/grpc_interop_java_oracle8/Dockerfile.template deleted file mode 100644 index 8eaa9a9dbbc..00000000000 --- a/templates/tools/dockerfile/interoptest/grpc_interop_java_oracle8/Dockerfile.template +++ /dev/null @@ -1,3 +0,0 @@ -%YAML 1.2 ---- | - <%include file="Dockerfile.include"/> diff --git a/templates/tools/dockerfile/interoptest/grpc_interop_java_oracle8/build_interop.sh.template b/templates/tools/dockerfile/interoptest/grpc_interop_java_oracle8/build_interop.sh.template deleted file mode 100644 index db5d40d5488..00000000000 --- a/templates/tools/dockerfile/interoptest/grpc_interop_java_oracle8/build_interop.sh.template +++ /dev/null @@ -1,3 +0,0 @@ -%YAML 1.2 ---- | - <%include file="../../java_build_interop.sh.include"/> diff --git a/templates/tools/dockerfile/interoptest/grpc_interop_java_oracle8/java_deps.include b/templates/tools/dockerfile/interoptest/grpc_interop_java_oracle8/java_deps.include deleted file mode 100644 index c05b5642393..00000000000 --- a/templates/tools/dockerfile/interoptest/grpc_interop_java_oracle8/java_deps.include +++ /dev/null @@ -1,12 +0,0 @@ -# Install JDK 8 -# -RUN echo oracle-java8-installer shared/accepted-oracle-license-v1-1 select true | /usr/bin/debconf-set-selections && ${'\\'} - echo "deb http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main" | tee /etc/apt/sources.list.d/webupd8team-java.list && ${'\\'} - echo "deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main" | tee -a /etc/apt/sources.list.d/webupd8team-java.list && ${'\\'} - apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys EEA14886 && ${'\\'} - apt-get update && apt-get -y install oracle-java8-installer && ${'\\'} - apt-get clean && rm -r /var/cache/oracle-jdk8-installer/ - -ENV JAVA_HOME /usr/lib/jvm/java-8-oracle -ENV PATH $PATH:$JAVA_HOME/bin - diff --git a/tools/dockerfile/interoptest/grpc_interop_java/Dockerfile b/tools/dockerfile/interoptest/grpc_interop_java/Dockerfile index 979c14db3f6..b7664b3c4c1 100644 --- a/tools/dockerfile/interoptest/grpc_interop_java/Dockerfile +++ b/tools/dockerfile/interoptest/grpc_interop_java/Dockerfile @@ -15,19 +15,11 @@ FROM debian:jessie -# Install JDK 8 -# -RUN echo oracle-java8-installer shared/accepted-oracle-license-v1-1 select true | /usr/bin/debconf-set-selections && \ - echo "deb http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main" | tee /etc/apt/sources.list.d/webupd8team-java.list && \ - echo "deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main" | tee -a /etc/apt/sources.list.d/webupd8team-java.list && \ - apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys EEA14886 && \ - apt-get update && apt-get -y install oracle-java8-installer && \ - apt-get clean && rm -r /var/cache/oracle-jdk8-installer/ - -ENV JAVA_HOME /usr/lib/jvm/java-8-oracle -ENV PATH $PATH:$JAVA_HOME/bin - - +RUN echo "deb http://archive.debian.org/debian/ jessie-backports main contrib non-free" > /etc/apt/sources.list.d/jessie-backports.list && \ + echo 'Acquire::Check-Valid-Until no;' > /etc/apt/apt.conf.d/99no-check-valid-until && \ + apt-get update && \ + apt-get install -y --no-install-recommends -t jessie-backports openjdk-8-jdk-headless && \ + apt-get clean # Define the default command. CMD ["bash"] diff --git a/tools/dockerfile/interoptest/grpc_interop_java/build_interop.sh b/tools/dockerfile/interoptest/grpc_interop_java/build_interop.sh index 8e1154679d7..77d322882f7 100644 --- a/tools/dockerfile/interoptest/grpc_interop_java/build_interop.sh +++ b/tools/dockerfile/interoptest/grpc_interop_java/build_interop.sh @@ -41,4 +41,4 @@ java.util.logging.ConsoleHandler.level = ALL .level = FINE io.grpc.netty.NettyClientHandler = ALL io.grpc.netty.NettyServerHandler = ALL" > /var/local/grpc_java_logging/logconf.txt - + diff --git a/tools/dockerfile/interoptest/grpc_interop_java_oracle8/Dockerfile b/tools/dockerfile/interoptest/grpc_interop_java_oracle8/Dockerfile deleted file mode 100644 index 979c14db3f6..00000000000 --- a/tools/dockerfile/interoptest/grpc_interop_java_oracle8/Dockerfile +++ /dev/null @@ -1,34 +0,0 @@ -# Copyright 2017 gRPC authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -FROM debian:jessie - - -# Install JDK 8 -# -RUN echo oracle-java8-installer shared/accepted-oracle-license-v1-1 select true | /usr/bin/debconf-set-selections && \ - echo "deb http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main" | tee /etc/apt/sources.list.d/webupd8team-java.list && \ - echo "deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main" | tee -a /etc/apt/sources.list.d/webupd8team-java.list && \ - apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys EEA14886 && \ - apt-get update && apt-get -y install oracle-java8-installer && \ - apt-get clean && rm -r /var/cache/oracle-jdk8-installer/ - -ENV JAVA_HOME /usr/lib/jvm/java-8-oracle -ENV PATH $PATH:$JAVA_HOME/bin - - - -# Define the default command. -CMD ["bash"] - diff --git a/tools/dockerfile/interoptest/grpc_interop_java_oracle8/build_interop.sh b/tools/dockerfile/interoptest/grpc_interop_java_oracle8/build_interop.sh deleted file mode 100644 index 77d322882f7..00000000000 --- a/tools/dockerfile/interoptest/grpc_interop_java_oracle8/build_interop.sh +++ /dev/null @@ -1,44 +0,0 @@ -#!/bin/bash -# Copyright 2015 gRPC authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# Builds Java interop server and client in a base image. -set -e - -cp -r /var/local/jenkins/grpc-java /tmp/grpc-java - -# copy service account keys if available -cp -r /var/local/jenkins/service_account $HOME || true - -pushd /tmp/grpc-java -./gradlew :grpc-interop-testing:installDist -PskipCodegen=true - -mkdir -p /var/local/git/grpc-java/ -cp -r --parents -t /var/local/git/grpc-java/ \ - interop-testing/build/install/ \ - run-test-client.sh \ - run-test-server.sh - -popd -rm -r /tmp/grpc-java -rm -r "$HOME/.gradle" - -# enable extra java logging -mkdir -p /var/local/grpc_java_logging -echo "handlers = java.util.logging.ConsoleHandler -java.util.logging.ConsoleHandler.level = ALL -.level = FINE -io.grpc.netty.NettyClientHandler = ALL -io.grpc.netty.NettyServerHandler = ALL" > /var/local/grpc_java_logging/logconf.txt - diff --git a/tools/interop_matrix/README.md b/tools/interop_matrix/README.md index 9d5c777cdee..2b37ee7d033 100644 --- a/tools/interop_matrix/README.md +++ b/tools/interop_matrix/README.md @@ -12,11 +12,11 @@ We have continuous nightly test setup to test gRPC backward compatibility betwee - `tools/interop_matrix/create_matrix_images.py --git_checkout --release=v1.9.9 --upload_images --language cxx csharp python ruby php` - Verify that the new docker image was built successfully and uploaded to GCR. For example, - `gcloud container images list --repository gcr.io/grpc-testing` lists available images. - - `gcloud container images list-tags gcr.io/grpc-testing/grpc_interop_java_oracle8` should show an image entry with tag `v1.9.9`. + - `gcloud container images list-tags gcr.io/grpc-testing/grpc_interop_java` should show an image entry with tag `v1.9.9`. - images can also be viewed in https://pantheon.corp.google.com/gcr/images/grpc-testing?project=grpc-testing - Verify the just-created docker client image would pass backward compatibility test (it should). For example, - - `gcloud docker -- pull gcr.io/grpc-testing/grpc_interop_java_oracle8:v1.9.9` followed by - - `docker_image=gcr.io/grpc-testing/grpc_interop_java_oracle8:v1.9.9 tools/interop_matrix/testcases/java__master` + - `gcloud docker -- pull gcr.io/grpc-testing/grpc_interop_java:v1.9.9` followed by + - `docker_image=gcr.io/grpc-testing/grpc_interop_java:v1.9.9 tools/interop_matrix/testcases/java__master` - git commit the change and merge it to upstream/master. - (Optional) clean up the tmp directory to where grpc source is cloned at `/export/hda3/tmp/grpc_matrix/`. For more details on each step, refer to sections below. diff --git a/tools/interop_matrix/client_matrix.py b/tools/interop_matrix/client_matrix.py index f9c069f6389..56fbbcab033 100644 --- a/tools/interop_matrix/client_matrix.py +++ b/tools/interop_matrix/client_matrix.py @@ -37,12 +37,8 @@ def get_runtimes_for_lang_release(lang, release): """Get list of valid runtimes for given release of lang.""" runtimes = list(LANG_RUNTIME_MATRIX[lang]) release_info = LANG_RELEASE_MATRIX[lang].get(release) - if release_info and release_info.runtime_subset: - runtimes = list(release_info.runtime_subset) - - # check that all selected runtimes are valid for given language - for runtime in runtimes: - assert runtime in LANG_RUNTIME_MATRIX[lang] + if release_info and release_info.runtimes: + runtimes = list(release_info.runtimes) return runtimes @@ -55,11 +51,11 @@ def should_build_docker_interop_image_from_release_tag(lang): return True -# Dictionary of runtimes per language +# Dictionary of default runtimes per language LANG_RUNTIME_MATRIX = { 'cxx': ['cxx'], # This is actually debian8. 'go': ['go1.8', 'go1.11'], - 'java': ['java_oracle8'], + 'java': ['java'], 'python': ['python'], 'node': ['node'], 'ruby': ['ruby'], @@ -71,9 +67,9 @@ LANG_RUNTIME_MATRIX = { class ReleaseInfo: """Info about a single release of a language""" - def __init__(self, patch=[], runtime_subset=[], testcases_file=None): + def __init__(self, patch=[], runtimes=[], testcases_file=None): self.patch = patch - self.runtime_subset = runtime_subset + self.runtimes = runtimes self.testcases_file = testcases_file @@ -104,51 +100,51 @@ LANG_RELEASE_MATRIX = { ]), 'go': OrderedDict([ - ('v1.0.5', ReleaseInfo(runtime_subset=['go1.8'])), - ('v1.2.1', ReleaseInfo(runtime_subset=['go1.8'])), - ('v1.3.0', ReleaseInfo(runtime_subset=['go1.8'])), - ('v1.4.2', ReleaseInfo(runtime_subset=['go1.8'])), - ('v1.5.2', ReleaseInfo(runtime_subset=['go1.8'])), - ('v1.6.0', ReleaseInfo(runtime_subset=['go1.8'])), - ('v1.7.4', ReleaseInfo(runtime_subset=['go1.8'])), - ('v1.8.2', ReleaseInfo(runtime_subset=['go1.8'])), - ('v1.9.2', ReleaseInfo(runtime_subset=['go1.8'])), - ('v1.10.1', ReleaseInfo(runtime_subset=['go1.8'])), - ('v1.11.3', ReleaseInfo(runtime_subset=['go1.8'])), - ('v1.12.2', ReleaseInfo(runtime_subset=['go1.8'])), - ('v1.13.0', ReleaseInfo(runtime_subset=['go1.8'])), - ('v1.14.0', ReleaseInfo(runtime_subset=['go1.8'])), - ('v1.15.0', ReleaseInfo(runtime_subset=['go1.8'])), - ('v1.16.0', ReleaseInfo(runtime_subset=['go1.8'])), - ('v1.17.0', ReleaseInfo(runtime_subset=['go1.11'])), - ('v1.18.0', ReleaseInfo(runtime_subset=['go1.11'])), - ('v1.19.0', ReleaseInfo(runtime_subset=['go1.11'])), - ('v1.20.0', ReleaseInfo(runtime_subset=['go1.11'])), - ('v1.21.0', ReleaseInfo(runtime_subset=['go1.11'])), + ('v1.0.5', ReleaseInfo(runtimes=['go1.8'])), + ('v1.2.1', ReleaseInfo(runtimes=['go1.8'])), + ('v1.3.0', ReleaseInfo(runtimes=['go1.8'])), + ('v1.4.2', ReleaseInfo(runtimes=['go1.8'])), + ('v1.5.2', ReleaseInfo(runtimes=['go1.8'])), + ('v1.6.0', ReleaseInfo(runtimes=['go1.8'])), + ('v1.7.4', ReleaseInfo(runtimes=['go1.8'])), + ('v1.8.2', ReleaseInfo(runtimes=['go1.8'])), + ('v1.9.2', ReleaseInfo(runtimes=['go1.8'])), + ('v1.10.1', ReleaseInfo(runtimes=['go1.8'])), + ('v1.11.3', ReleaseInfo(runtimes=['go1.8'])), + ('v1.12.2', ReleaseInfo(runtimes=['go1.8'])), + ('v1.13.0', ReleaseInfo(runtimes=['go1.8'])), + ('v1.14.0', ReleaseInfo(runtimes=['go1.8'])), + ('v1.15.0', ReleaseInfo(runtimes=['go1.8'])), + ('v1.16.0', ReleaseInfo(runtimes=['go1.8'])), + ('v1.17.0', ReleaseInfo(runtimes=['go1.11'])), + ('v1.18.0', ReleaseInfo(runtimes=['go1.11'])), + ('v1.19.0', ReleaseInfo(runtimes=['go1.11'])), + ('v1.20.0', ReleaseInfo(runtimes=['go1.11'])), + ('v1.21.0', ReleaseInfo(runtimes=['go1.11'])), ]), 'java': OrderedDict([ - ('v1.0.3', ReleaseInfo()), - ('v1.1.2', ReleaseInfo()), - ('v1.2.0', ReleaseInfo()), - ('v1.3.1', ReleaseInfo()), - ('v1.4.0', ReleaseInfo()), - ('v1.5.0', ReleaseInfo()), - ('v1.6.1', ReleaseInfo()), - ('v1.7.0', ReleaseInfo()), - ('v1.8.0', ReleaseInfo()), - ('v1.9.1', ReleaseInfo()), - ('v1.10.1', ReleaseInfo()), - ('v1.11.0', ReleaseInfo()), - ('v1.12.0', ReleaseInfo()), - ('v1.13.1', ReleaseInfo()), - ('v1.14.0', ReleaseInfo()), - ('v1.15.0', ReleaseInfo()), - ('v1.16.1', ReleaseInfo()), - ('v1.17.1', ReleaseInfo()), - ('v1.18.0', ReleaseInfo()), - ('v1.19.0', ReleaseInfo()), - ('v1.20.0', ReleaseInfo()), + ('v1.0.3', ReleaseInfo(runtimes=['java_oracle8'])), + ('v1.1.2', ReleaseInfo(runtimes=['java_oracle8'])), + ('v1.2.0', ReleaseInfo(runtimes=['java_oracle8'])), + ('v1.3.1', ReleaseInfo(runtimes=['java_oracle8'])), + ('v1.4.0', ReleaseInfo(runtimes=['java_oracle8'])), + ('v1.5.0', ReleaseInfo(runtimes=['java_oracle8'])), + ('v1.6.1', ReleaseInfo(runtimes=['java_oracle8'])), + ('v1.7.0', ReleaseInfo(runtimes=['java_oracle8'])), + ('v1.8.0', ReleaseInfo(runtimes=['java_oracle8'])), + ('v1.9.1', ReleaseInfo(runtimes=['java_oracle8'])), + ('v1.10.1', ReleaseInfo(runtimes=['java_oracle8'])), + ('v1.11.0', ReleaseInfo(runtimes=['java_oracle8'])), + ('v1.12.0', ReleaseInfo(runtimes=['java_oracle8'])), + ('v1.13.1', ReleaseInfo(runtimes=['java_oracle8'])), + ('v1.14.0', ReleaseInfo(runtimes=['java_oracle8'])), + ('v1.15.0', ReleaseInfo(runtimes=['java_oracle8'])), + ('v1.16.1', ReleaseInfo(runtimes=['java_oracle8'])), + ('v1.17.1', ReleaseInfo(runtimes=['java_oracle8'])), + ('v1.18.0', ReleaseInfo(runtimes=['java_oracle8'])), + ('v1.19.0', ReleaseInfo(runtimes=['java_oracle8'])), + ('v1.20.0', ReleaseInfo(runtimes=['java_oracle8'])), ]), 'python': OrderedDict([ From 155ca4be68571ea56f3dee85c11196c8c44e39b5 Mon Sep 17 00:00:00 2001 From: Muxi Yan Date: Fri, 24 May 2019 12:37:33 -0700 Subject: [PATCH 57/83] Polish scheme configurations --- .../xcshareddata/xcschemes/CronetTests.xcscheme | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/objective-c/tests/Tests.xcodeproj/xcshareddata/xcschemes/CronetTests.xcscheme b/src/objective-c/tests/Tests.xcodeproj/xcshareddata/xcschemes/CronetTests.xcscheme index ac8cfc971c8..0156c906971 100644 --- a/src/objective-c/tests/Tests.xcodeproj/xcshareddata/xcschemes/CronetTests.xcscheme +++ b/src/objective-c/tests/Tests.xcodeproj/xcshareddata/xcschemes/CronetTests.xcscheme @@ -70,7 +70,7 @@ + buildConfiguration = "Cronet"> Date: Fri, 24 May 2019 12:51:14 -0700 Subject: [PATCH 58/83] clang-format --- src/objective-c/tests/CronetTests/CronetUnitTests.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/objective-c/tests/CronetTests/CronetUnitTests.mm b/src/objective-c/tests/CronetTests/CronetUnitTests.mm index 5ae0d77e37f..595a1d19708 100644 --- a/src/objective-c/tests/CronetTests/CronetUnitTests.mm +++ b/src/objective-c/tests/CronetTests/CronetUnitTests.mm @@ -40,8 +40,8 @@ #import "test/core/util/test_config.h" #define GRPC_SHADOW_BORINGSSL_SYMBOLS -#import "src/core/tsi/grpc_shadow_boringssl.h" #import " +#import "src/core/tsi/grpc_shadow_boringssl.h" static void drain_cq(grpc_completion_queue *cq) { grpc_event ev; From 886dc10daa669d96c7e9722a736efee60d5eaee3 Mon Sep 17 00:00:00 2001 From: Yash Tibrewal Date: Fri, 24 May 2019 14:29:16 -0700 Subject: [PATCH 59/83] Move validate_service_config to a new file --- BUILD | 2 + BUILD.gn | 2 + CMakeLists.txt | 6 +++ Makefile | 6 +++ build.yaml | 2 + gRPC-C++.podspec | 2 + grpc.gyp | 2 + .../grpcpp/support/channel_arguments_impl.h | 9 ----- .../grpcpp/support/validate_service_config.h | 36 +++++++++++++++++ src/cpp/common/channel_arguments.cc | 18 --------- src/cpp/common/validate_service_config.cc | 40 +++++++++++++++++++ .../end2end/service_config_end2end_test.cc | 1 + tools/doxygen/Doxyfile.c++ | 3 +- tools/doxygen/Doxyfile.c++.internal | 2 + .../generated/sources_and_headers.json | 3 ++ 15 files changed, 106 insertions(+), 28 deletions(-) create mode 100644 include/grpcpp/support/validate_service_config.h create mode 100644 src/cpp/common/validate_service_config.cc diff --git a/BUILD b/BUILD index ddd1f97b541..edfc19a6080 100644 --- a/BUILD +++ b/BUILD @@ -137,6 +137,7 @@ GRPCXX_SRCS = [ "src/cpp/common/resource_quota_cc.cc", "src/cpp/common/rpc_method.cc", "src/cpp/common/version_cc.cc", + "src/cpp/common/validate_service_config.cc", "src/cpp/server/async_generic_service.cc", "src/cpp/server/channel_argument_option.cc", "src/cpp/server/create_default_thread_pool.cc", @@ -284,6 +285,7 @@ GRPCXX_PUBLIC_HDRS = [ "include/grpcpp/support/stub_options.h", "include/grpcpp/support/sync_stream.h", "include/grpcpp/support/time.h", + "include/grpcpp/support/validate_service_config.h", ] grpc_cc_library( diff --git a/BUILD.gn b/BUILD.gn index dcd5bc880eb..8e493af7540 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -1141,6 +1141,7 @@ config("grpc_config") { "include/grpcpp/support/stub_options.h", "include/grpcpp/support/sync_stream.h", "include/grpcpp/support/time.h", + "include/grpcpp/support/validate_service_config.h", "src/core/ext/transport/inproc/inproc_transport.h", "src/core/lib/avl/avl.h", "src/core/lib/backoff/backoff.h", @@ -1340,6 +1341,7 @@ config("grpc_config") { "src/cpp/common/secure_auth_context.h", "src/cpp/common/secure_channel_arguments.cc", "src/cpp/common/secure_create_auth_context.cc", + "src/cpp/common/validate_service_config.cc", "src/cpp/common/version_cc.cc", "src/cpp/server/async_generic_service.cc", "src/cpp/server/channel_argument_option.cc", diff --git a/CMakeLists.txt b/CMakeLists.txt index 429d083d279..c2da881909d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2977,6 +2977,7 @@ add_library(grpc++ src/cpp/common/core_codegen.cc src/cpp/common/resource_quota_cc.cc src/cpp/common/rpc_method.cc + src/cpp/common/validate_service_config.cc src/cpp/common/version_cc.cc src/cpp/server/async_generic_service.cc src/cpp/server/channel_argument_option.cc @@ -3151,6 +3152,7 @@ foreach(_hdr include/grpcpp/support/stub_options.h include/grpcpp/support/sync_stream.h include/grpcpp/support/time.h + include/grpcpp/support/validate_service_config.h include/grpc/support/alloc.h include/grpc/support/atm.h include/grpc/support/atm_gcc_atomic.h @@ -3373,6 +3375,7 @@ add_library(grpc++_cronet src/cpp/common/core_codegen.cc src/cpp/common/resource_quota_cc.cc src/cpp/common/rpc_method.cc + src/cpp/common/validate_service_config.cc src/cpp/common/version_cc.cc src/cpp/server/async_generic_service.cc src/cpp/server/channel_argument_option.cc @@ -3767,6 +3770,7 @@ foreach(_hdr include/grpcpp/support/stub_options.h include/grpcpp/support/sync_stream.h include/grpcpp/support/time.h + include/grpcpp/support/validate_service_config.h include/grpc/support/alloc.h include/grpc/support/atm.h include/grpc/support/atm_gcc_atomic.h @@ -4584,6 +4588,7 @@ add_library(grpc++_unsecure src/cpp/common/core_codegen.cc src/cpp/common/resource_quota_cc.cc src/cpp/common/rpc_method.cc + src/cpp/common/validate_service_config.cc src/cpp/common/version_cc.cc src/cpp/server/async_generic_service.cc src/cpp/server/channel_argument_option.cc @@ -4757,6 +4762,7 @@ foreach(_hdr include/grpcpp/support/stub_options.h include/grpcpp/support/sync_stream.h include/grpcpp/support/time.h + include/grpcpp/support/validate_service_config.h include/grpc/support/alloc.h include/grpc/support/atm.h include/grpc/support/atm_gcc_atomic.h diff --git a/Makefile b/Makefile index 605e533e8a8..a462b5c5074 100644 --- a/Makefile +++ b/Makefile @@ -5370,6 +5370,7 @@ LIBGRPC++_SRC = \ src/cpp/common/core_codegen.cc \ src/cpp/common/resource_quota_cc.cc \ src/cpp/common/rpc_method.cc \ + src/cpp/common/validate_service_config.cc \ src/cpp/common/version_cc.cc \ src/cpp/server/async_generic_service.cc \ src/cpp/server/channel_argument_option.cc \ @@ -5509,6 +5510,7 @@ PUBLIC_HEADERS_CXX += \ include/grpcpp/support/stub_options.h \ include/grpcpp/support/sync_stream.h \ include/grpcpp/support/time.h \ + include/grpcpp/support/validate_service_config.h \ include/grpc/support/alloc.h \ include/grpc/support/atm.h \ include/grpc/support/atm_gcc_atomic.h \ @@ -5775,6 +5777,7 @@ LIBGRPC++_CRONET_SRC = \ src/cpp/common/core_codegen.cc \ src/cpp/common/resource_quota_cc.cc \ src/cpp/common/rpc_method.cc \ + src/cpp/common/validate_service_config.cc \ src/cpp/common/version_cc.cc \ src/cpp/server/async_generic_service.cc \ src/cpp/server/channel_argument_option.cc \ @@ -6133,6 +6136,7 @@ PUBLIC_HEADERS_CXX += \ include/grpcpp/support/stub_options.h \ include/grpcpp/support/sync_stream.h \ include/grpcpp/support/time.h \ + include/grpcpp/support/validate_service_config.h \ include/grpc/support/alloc.h \ include/grpc/support/atm.h \ include/grpc/support/atm_gcc_atomic.h \ @@ -6933,6 +6937,7 @@ LIBGRPC++_UNSECURE_SRC = \ src/cpp/common/core_codegen.cc \ src/cpp/common/resource_quota_cc.cc \ src/cpp/common/rpc_method.cc \ + src/cpp/common/validate_service_config.cc \ src/cpp/common/version_cc.cc \ src/cpp/server/async_generic_service.cc \ src/cpp/server/channel_argument_option.cc \ @@ -7072,6 +7077,7 @@ PUBLIC_HEADERS_CXX += \ include/grpcpp/support/stub_options.h \ include/grpcpp/support/sync_stream.h \ include/grpcpp/support/time.h \ + include/grpcpp/support/validate_service_config.h \ include/grpc/support/alloc.h \ include/grpc/support/atm.h \ include/grpc/support/atm_gcc_atomic.h \ diff --git a/build.yaml b/build.yaml index e2a1b75dda5..99820507a6f 100644 --- a/build.yaml +++ b/build.yaml @@ -1428,6 +1428,7 @@ filegroups: - include/grpcpp/support/stub_options.h - include/grpcpp/support/sync_stream.h - include/grpcpp/support/time.h + - include/grpcpp/support/validate_service_config.h headers: - src/cpp/client/create_channel_internal.h - src/cpp/common/channel_filter.h @@ -1451,6 +1452,7 @@ filegroups: - src/cpp/common/core_codegen.cc - src/cpp/common/resource_quota_cc.cc - src/cpp/common/rpc_method.cc + - src/cpp/common/validate_service_config.cc - src/cpp/common/version_cc.cc - src/cpp/server/async_generic_service.cc - src/cpp/server/channel_argument_option.cc diff --git a/gRPC-C++.podspec b/gRPC-C++.podspec index 10e37bb5f47..17a87304aae 100644 --- a/gRPC-C++.podspec +++ b/gRPC-C++.podspec @@ -148,6 +148,7 @@ Pod::Spec.new do |s| 'include/grpcpp/support/stub_options.h', 'include/grpcpp/support/sync_stream.h', 'include/grpcpp/support/time.h', + 'include/grpcpp/support/validate_service_config.h', 'include/grpcpp/impl/codegen/async_generic_service.h', 'include/grpcpp/impl/codegen/async_stream.h', 'include/grpcpp/impl/codegen/async_unary_call.h', @@ -233,6 +234,7 @@ Pod::Spec.new do |s| 'src/cpp/common/core_codegen.cc', 'src/cpp/common/resource_quota_cc.cc', 'src/cpp/common/rpc_method.cc', + 'src/cpp/common/validate_service_config.cc', 'src/cpp/common/version_cc.cc', 'src/cpp/server/async_generic_service.cc', 'src/cpp/server/channel_argument_option.cc', diff --git a/grpc.gyp b/grpc.gyp index 833a0b48715..1668900a3c7 100644 --- a/grpc.gyp +++ b/grpc.gyp @@ -1447,6 +1447,7 @@ 'src/cpp/common/core_codegen.cc', 'src/cpp/common/resource_quota_cc.cc', 'src/cpp/common/rpc_method.cc', + 'src/cpp/common/validate_service_config.cc', 'src/cpp/common/version_cc.cc', 'src/cpp/server/async_generic_service.cc', 'src/cpp/server/channel_argument_option.cc', @@ -1602,6 +1603,7 @@ 'src/cpp/common/core_codegen.cc', 'src/cpp/common/resource_quota_cc.cc', 'src/cpp/common/rpc_method.cc', + 'src/cpp/common/validate_service_config.cc', 'src/cpp/common/version_cc.cc', 'src/cpp/server/async_generic_service.cc', 'src/cpp/server/channel_argument_option.cc', diff --git a/include/grpcpp/support/channel_arguments_impl.h b/include/grpcpp/support/channel_arguments_impl.h index a137a5b7c7d..0efeadca880 100644 --- a/include/grpcpp/support/channel_arguments_impl.h +++ b/include/grpcpp/support/channel_arguments_impl.h @@ -31,15 +31,6 @@ namespace grpc { namespace testing { class ChannelArgumentsTest; } // namespace testing - -namespace experimental { -/// Validates \a service_config_json. If valid, returns an empty string. -/// Otherwise, returns the validation error. -/// TODO(yashykt): Promote it to out of experimental once it is proved useful -/// and gRFC is accepted. -grpc::string ValidateServiceConfigJSON(const grpc::string& service_config_json); -} // namespace experimental - } // namespace grpc namespace grpc_impl { diff --git a/include/grpcpp/support/validate_service_config.h b/include/grpcpp/support/validate_service_config.h new file mode 100644 index 00000000000..d5ea521a1ef --- /dev/null +++ b/include/grpcpp/support/validate_service_config.h @@ -0,0 +1,36 @@ +/* + * + * Copyright 2019 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +#ifndef GRPCPP_SUPPORT_VALIDATE_SERVICE_CONFIG_H +#define GRPCPP_SUPPORT_VALIDATE_SERVICE_CONFIG_H + +#include + +namespace grpc { + +namespace experimental { +/// Validates \a service_config_json. If valid, returns an empty string. +/// Otherwise, returns the validation error. +/// TODO(yashykt): Promote it to out of experimental once it is proved useful +/// and gRFC is accepted. +grpc::string ValidateServiceConfigJSON(const grpc::string& service_config_json); +} // namespace experimental + +} // namespace grpc + +#endif // GRPCPP_SUPPORT_VALIDATE_SERVICE_CONFIG_H \ No newline at end of file diff --git a/src/cpp/common/channel_arguments.cc b/src/cpp/common/channel_arguments.cc index b97e1ed8da9..f35c91572eb 100644 --- a/src/cpp/common/channel_arguments.cc +++ b/src/cpp/common/channel_arguments.cc @@ -217,21 +217,3 @@ void ChannelArguments::SetChannelArgs(grpc_channel_args* channel_args) const { } } // namespace grpc_impl - -namespace grpc { -namespace experimental { -grpc::string ValidateServiceConfigJSON( - const grpc::string& service_config_json) { - grpc_init(); - grpc_error* error = GRPC_ERROR_NONE; - grpc_core::ServiceConfig::Create(service_config_json.c_str(), &error); - grpc::string return_value; - if (error != GRPC_ERROR_NONE) { - return_value = grpc_error_string(error); - GRPC_ERROR_UNREF(error); - } - grpc_shutdown(); - return return_value; -} -} // namespace experimental -} // namespace grpc diff --git a/src/cpp/common/validate_service_config.cc b/src/cpp/common/validate_service_config.cc new file mode 100644 index 00000000000..0f193cf1c42 --- /dev/null +++ b/src/cpp/common/validate_service_config.cc @@ -0,0 +1,40 @@ +/* + * + * Copyright 2019 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +#include +#include + +#include "src/core/ext/filters/client_channel/service_config.h" + +namespace grpc { +namespace experimental { +grpc::string ValidateServiceConfigJSON( + const grpc::string& service_config_json) { + grpc_init(); + grpc_error* error = GRPC_ERROR_NONE; + grpc_core::ServiceConfig::Create(service_config_json.c_str(), &error); + grpc::string return_value; + if (error != GRPC_ERROR_NONE) { + return_value = grpc_error_string(error); + GRPC_ERROR_UNREF(error); + } + grpc_shutdown(); + return return_value; +} +} // namespace experimental +} // namespace grpc diff --git a/test/cpp/end2end/service_config_end2end_test.cc b/test/cpp/end2end/service_config_end2end_test.cc index e5c3a8e3eff..14786b98f85 100644 --- a/test/cpp/end2end/service_config_end2end_test.cc +++ b/test/cpp/end2end/service_config_end2end_test.cc @@ -36,6 +36,7 @@ #include #include #include +#include #include "src/core/ext/filters/client_channel/backup_poller.h" #include "src/core/ext/filters/client_channel/global_subchannel_pool.h" diff --git a/tools/doxygen/Doxyfile.c++ b/tools/doxygen/Doxyfile.c++ index 667b9b3541e..913d7be993b 100644 --- a/tools/doxygen/Doxyfile.c++ +++ b/tools/doxygen/Doxyfile.c++ @@ -1040,7 +1040,8 @@ include/grpcpp/support/status_code_enum.h \ include/grpcpp/support/string_ref.h \ include/grpcpp/support/stub_options.h \ include/grpcpp/support/sync_stream.h \ -include/grpcpp/support/time.h +include/grpcpp/support/time.h \ +include/grpcpp/support/validate_service_config.h # This tag can be used to specify the character encoding of the source files # that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses diff --git a/tools/doxygen/Doxyfile.c++.internal b/tools/doxygen/Doxyfile.c++.internal index 529b35a2c39..58192bfc34b 100644 --- a/tools/doxygen/Doxyfile.c++.internal +++ b/tools/doxygen/Doxyfile.c++.internal @@ -1043,6 +1043,7 @@ include/grpcpp/support/string_ref.h \ include/grpcpp/support/stub_options.h \ include/grpcpp/support/sync_stream.h \ include/grpcpp/support/time.h \ +include/grpcpp/support/validate_service_config.h \ src/core/ext/filters/client_channel/health/health.pb.c \ src/core/ext/filters/client_channel/health/health.pb.h \ src/core/ext/transport/inproc/inproc_transport.h \ @@ -1245,6 +1246,7 @@ src/cpp/common/secure_auth_context.cc \ src/cpp/common/secure_auth_context.h \ src/cpp/common/secure_channel_arguments.cc \ src/cpp/common/secure_create_auth_context.cc \ +src/cpp/common/validate_service_config.cc \ src/cpp/common/version_cc.cc \ src/cpp/server/async_generic_service.cc \ src/cpp/server/channel_argument_option.cc \ diff --git a/tools/run_tests/generated/sources_and_headers.json b/tools/run_tests/generated/sources_and_headers.json index e67465d1602..677fff1d48b 100644 --- a/tools/run_tests/generated/sources_and_headers.json +++ b/tools/run_tests/generated/sources_and_headers.json @@ -10311,6 +10311,7 @@ "include/grpcpp/support/stub_options.h", "include/grpcpp/support/sync_stream.h", "include/grpcpp/support/time.h", + "include/grpcpp/support/validate_service_config.h", "src/cpp/client/create_channel_internal.h", "src/cpp/common/channel_filter.h", "src/cpp/server/dynamic_thread_pool.h", @@ -10436,6 +10437,7 @@ "include/grpcpp/support/stub_options.h", "include/grpcpp/support/sync_stream.h", "include/grpcpp/support/time.h", + "include/grpcpp/support/validate_service_config.h", "src/cpp/client/channel_cc.cc", "src/cpp/client/client_context.cc", "src/cpp/client/client_interceptor.cc", @@ -10453,6 +10455,7 @@ "src/cpp/common/core_codegen.cc", "src/cpp/common/resource_quota_cc.cc", "src/cpp/common/rpc_method.cc", + "src/cpp/common/validate_service_config.cc", "src/cpp/common/version_cc.cc", "src/cpp/server/async_generic_service.cc", "src/cpp/server/channel_argument_option.cc", From 57cc401597f9464809ee9d9402bd448aa1e0aecc Mon Sep 17 00:00:00 2001 From: weiyongji <232589621@qq.com> Date: Sat, 25 May 2019 11:20:08 +0800 Subject: [PATCH 60/83] typo fix --- src/cpp/thread_manager/thread_manager.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cpp/thread_manager/thread_manager.h b/src/cpp/thread_manager/thread_manager.h index 2fbf309d421..62b1beebc37 100644 --- a/src/cpp/thread_manager/thread_manager.h +++ b/src/cpp/thread_manager/thread_manager.h @@ -56,7 +56,7 @@ class ThreadManager { // DoWork() // // If the return value is SHUTDOWN:, - // - ThreadManager WILL NOT call DoWork() and terminates the thead + // - ThreadManager WILL NOT call DoWork() and terminates the thread // // If the return value is TIMEOUT:, // - ThreadManager WILL NOT call DoWork() @@ -133,7 +133,7 @@ class ThreadManager { grpc_core::Thread thd_; }; - // The main funtion in ThreadManager + // The main function in ThreadManager void MainWorkLoop(); void MarkAsCompleted(WorkerThread* thd); From a2f7ce699be7678ff72870c6a164317762b1b30d Mon Sep 17 00:00:00 2001 From: weiyongji <232589621@qq.com> Date: Sat, 25 May 2019 15:07:24 +0800 Subject: [PATCH 61/83] call destroy function in test_serial() --- test/core/gpr/mpscq_test.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/test/core/gpr/mpscq_test.cc b/test/core/gpr/mpscq_test.cc index 744cea934c5..552fe8d9687 100644 --- a/test/core/gpr/mpscq_test.cc +++ b/test/core/gpr/mpscq_test.cc @@ -55,6 +55,7 @@ static void test_serial(void) { GPR_ASSERT(n->i == i); gpr_free(n); } + gpr_mpscq_destroy(&q); } typedef struct { From bd0d6fc7b6b7499f3385a92c42e853a8d55ce16e Mon Sep 17 00:00:00 2001 From: weiyongji <232589621@qq.com> Date: Sat, 25 May 2019 15:46:28 +0800 Subject: [PATCH 62/83] cancel the modification in mpscq_test.cc --- test/core/gpr/mpscq_test.cc | 1 - 1 file changed, 1 deletion(-) diff --git a/test/core/gpr/mpscq_test.cc b/test/core/gpr/mpscq_test.cc index 552fe8d9687..744cea934c5 100644 --- a/test/core/gpr/mpscq_test.cc +++ b/test/core/gpr/mpscq_test.cc @@ -55,7 +55,6 @@ static void test_serial(void) { GPR_ASSERT(n->i == i); gpr_free(n); } - gpr_mpscq_destroy(&q); } typedef struct { From e3c280d61373312f3f69ad786c7fbd0d7cae6f51 Mon Sep 17 00:00:00 2001 From: Muxi Yan Date: Fri, 24 May 2019 15:26:05 -0700 Subject: [PATCH 63/83] build fix --- src/objective-c/tests/CronetTests/CronetUnitTests.mm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/objective-c/tests/CronetTests/CronetUnitTests.mm b/src/objective-c/tests/CronetTests/CronetUnitTests.mm index 595a1d19708..2473cf612be 100644 --- a/src/objective-c/tests/CronetTests/CronetUnitTests.mm +++ b/src/objective-c/tests/CronetTests/CronetUnitTests.mm @@ -40,9 +40,10 @@ #import "test/core/util/test_config.h" #define GRPC_SHADOW_BORINGSSL_SYMBOLS -#import " #import "src/core/tsi/grpc_shadow_boringssl.h" +#import + static void drain_cq(grpc_completion_queue *cq) { grpc_event ev; do { From ec640a53c6001321af759c13efae24350117e4bd Mon Sep 17 00:00:00 2001 From: Srini Polavarapu <35056280+srini100@users.noreply.github.com> Date: Thu, 23 May 2019 13:18:36 -0700 Subject: [PATCH 64/83] Merge pull request #19105 from gnossen/twine_check_artifacts Produce Python Wheels with a Valid long_description field --- src/python/grpcio/README.rst | 8 ++++---- tools/distrib/python/grpcio_tools/README.rst | 8 ++++---- tools/run_tests/artifacts/build_artifact_python.bat | 4 ++++ tools/run_tests/artifacts/build_artifact_python.sh | 6 ++++++ 4 files changed, 18 insertions(+), 8 deletions(-) diff --git a/src/python/grpcio/README.rst b/src/python/grpcio/README.rst index f047243f82d..04a3bcbc204 100644 --- a/src/python/grpcio/README.rst +++ b/src/python/grpcio/README.rst @@ -8,8 +8,8 @@ Installation gRPC Python is available for Linux, macOS, and Windows. -From PyPI -~~~~~~~~~ +Installing From PyPI +~~~~~~~~~~~~~~~~~~~~ If you are installing locally... @@ -37,8 +37,8 @@ n.b. On Windows and on Mac OS X one *must* have a recent release of :code:`pip` to retrieve the proper wheel from PyPI. Be sure to upgrade to the latest version! -From Source -~~~~~~~~~~~ +Installing From Source +~~~~~~~~~~~~~~~~~~~~~~ Building from source requires that you have the Python headers (usually a package named :code:`python-dev`). diff --git a/tools/distrib/python/grpcio_tools/README.rst b/tools/distrib/python/grpcio_tools/README.rst index 32873b291fa..17816deff61 100644 --- a/tools/distrib/python/grpcio_tools/README.rst +++ b/tools/distrib/python/grpcio_tools/README.rst @@ -9,8 +9,8 @@ Installation The gRPC Python tools package is available for Linux, Mac OS X, and Windows running Python 2.7. -From PyPI -~~~~~~~~~ +Installing From PyPI +~~~~~~~~~~~~~~~~~~~~ If you are installing locally... @@ -42,8 +42,8 @@ You might also need to install Cython to handle installation via the source distribution if gRPC Python's system coverage with wheels does not happen to include your system. -From Source -~~~~~~~~~~~ +Installing From Source +~~~~~~~~~~~~~~~~~~~~~~ Building from source requires that you have the Python headers (usually a package named :code:`python-dev`) and Cython installed. It further requires a diff --git a/tools/run_tests/artifacts/build_artifact_python.bat b/tools/run_tests/artifacts/build_artifact_python.bat index 795e80dc40d..c946cd98061 100644 --- a/tools/run_tests/artifacts/build_artifact_python.bat +++ b/tools/run_tests/artifacts/build_artifact_python.bat @@ -46,6 +46,10 @@ pushd tools\distrib\python\grpcio_tools python setup.py bdist_wheel || goto :error popd +@rem Ensure the generate artifacts are valid. +python -m pip install twine +python -m twine check dist\* tools\distrib\python\grpcio_tools\dist\* || goto :error + xcopy /Y /I /S dist\* %ARTIFACT_DIR% || goto :error xcopy /Y /I /S tools\distrib\python\grpcio_tools\dist\* %ARTIFACT_DIR% || goto :error diff --git a/tools/run_tests/artifacts/build_artifact_python.sh b/tools/run_tests/artifacts/build_artifact_python.sh index e451ced338f..c5e380fe5dc 100755 --- a/tools/run_tests/artifacts/build_artifact_python.sh +++ b/tools/run_tests/artifacts/build_artifact_python.sh @@ -130,5 +130,11 @@ then cp -r src/python/grpcio_status/dist/* "$ARTIFACT_DIR" fi +# Ensure the generated artifacts are valid. +"${PYTHON}" -m virtualenv venv || { "${PYTHON}" -m pip install virtualenv && "${PYTHON}" -m virtualenv venv; } +venv/bin/python -m pip install twine +venv/bin/python -m twine check dist/* tools/distrib/python/grpcio_tools/dist/* +rm -rf venv/ + cp -r dist/* "$ARTIFACT_DIR" cp -r tools/distrib/python/grpcio_tools/dist/* "$ARTIFACT_DIR" From 3893a6379bd64d7a1c945819b598d7b5518eee6e Mon Sep 17 00:00:00 2001 From: Yash Tibrewal Date: Tue, 28 May 2019 11:57:57 -0700 Subject: [PATCH 65/83] Clean up --- include/grpcpp/support/validate_service_config.h | 2 +- src/cpp/common/channel_arguments.cc | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/include/grpcpp/support/validate_service_config.h b/include/grpcpp/support/validate_service_config.h index d5ea521a1ef..41f2c636bd9 100644 --- a/include/grpcpp/support/validate_service_config.h +++ b/include/grpcpp/support/validate_service_config.h @@ -33,4 +33,4 @@ grpc::string ValidateServiceConfigJSON(const grpc::string& service_config_json); } // namespace grpc -#endif // GRPCPP_SUPPORT_VALIDATE_SERVICE_CONFIG_H \ No newline at end of file +#endif // GRPCPP_SUPPORT_VALIDATE_SERVICE_CONFIG_H diff --git a/src/cpp/common/channel_arguments.cc b/src/cpp/common/channel_arguments.cc index f35c91572eb..932139890fe 100644 --- a/src/cpp/common/channel_arguments.cc +++ b/src/cpp/common/channel_arguments.cc @@ -23,7 +23,6 @@ #include #include #include -#include "src/core/ext/filters/client_channel/service_config.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/iomgr/socket_mutator.h" From 31ec9a74aebfe9d7036a5a1b0099e3e23be5bea1 Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Tue, 28 May 2019 14:23:01 -0700 Subject: [PATCH 66/83] More LB policy API improvements. --- .../filters/client_channel/client_channel.cc | 164 +++++++++++------- .../ext/filters/client_channel/lb_policy.cc | 18 +- .../ext/filters/client_channel/lb_policy.h | 154 ++++++++-------- .../client_channel/lb_policy/grpclb/grpclb.cc | 43 ++--- .../lb_policy/pick_first/pick_first.cc | 14 +- .../lb_policy/round_robin/round_robin.cc | 17 +- .../client_channel/lb_policy/xds/xds.cc | 56 +++--- .../client_channel/lb_policy_factory.h | 2 +- .../client_channel/lb_policy_registry.cc | 2 +- .../client_channel/lb_policy_registry.h | 2 +- .../client_channel/resolver_result_parsing.cc | 2 +- .../client_channel/resolver_result_parsing.h | 6 +- .../client_channel/resolving_lb_policy.cc | 6 +- .../client_channel/resolving_lb_policy.h | 8 +- test/core/util/test_lb_policies.cc | 34 ++-- 15 files changed, 291 insertions(+), 237 deletions(-) diff --git a/src/core/ext/filters/client_channel/client_channel.cc b/src/core/ext/filters/client_channel/client_channel.cc index c0586d459b2..5717d3e66d2 100644 --- a/src/core/ext/filters/client_channel/client_channel.cc +++ b/src/core/ext/filters/client_channel/client_channel.cc @@ -105,7 +105,6 @@ namespace { class ChannelData { public: struct QueuedPick { - LoadBalancingPolicy::PickArgs pick; grpc_call_element* elem; QueuedPick* next = nullptr; }; @@ -223,7 +222,7 @@ class ChannelData { static bool ProcessResolverResultLocked( void* arg, Resolver::Result* result, const char** lb_policy_name, - RefCountedPtr* lb_policy_config, + RefCountedPtr* lb_policy_config, grpc_error** service_config_error); grpc_error* DoPingLocked(grpc_transport_op* op); @@ -236,7 +235,7 @@ class ChannelData { const Resolver::Result& resolver_result, const internal::ClientChannelGlobalParsedConfig* parsed_service_config, UniquePtr* lb_policy_name, - RefCountedPtr* lb_policy_config); + RefCountedPtr* lb_policy_config); // // Fields set at construction and never modified. @@ -314,6 +313,16 @@ class CallData { private: class QueuedPickCanceller; + class LbCallState : public LoadBalancingPolicy::CallState { + public: + explicit LbCallState(CallData* calld) : calld_(calld) {} + + void* Alloc(size_t size) override { return calld_->arena_->Alloc(size); } + + private: + CallData* calld_; + }; + // State used for starting a retryable batch on a subchannel call. // This provides its own grpc_transport_stream_op_batch and other data // structures needed to populate the ops in the batch. @@ -449,8 +458,9 @@ class CallData { grpc_call_element* elem, SubchannelCallBatchData* batch_data, SubchannelCallRetryState* retry_state); - static void MaybeInjectRecvTrailingMetadataReadyForLoadBalancingPolicy( - const LoadBalancingPolicy::PickArgs& pick, + static void RecvTrailingMetadataReadyForLoadBalancingPolicy( + void* arg, grpc_error* error); + void MaybeInjectRecvTrailingMetadataReadyForLoadBalancingPolicy( grpc_transport_stream_op_batch* batch); // Returns the index into pending_batches_ to be used for batch. @@ -640,8 +650,19 @@ class CallData { bool pick_queued_ = false; bool service_config_applied_ = false; QueuedPickCanceller* pick_canceller_ = nullptr; + LbCallState lb_call_state_; + RefCountedPtr connected_subchannel_; + void (*lb_recv_trailing_metadata_ready_)( + void* user_data, grpc_metadata_batch* recv_trailing_metadata, + LoadBalancingPolicy::CallState* call_state) = nullptr; + void* lb_recv_trailing_metadata_ready_user_data_ = nullptr; grpc_closure pick_closure_; + // For intercepting recv_trailing_metadata_ready for the LB policy. + grpc_metadata_batch* recv_trailing_metadata_ = nullptr; + grpc_closure recv_trailing_metadata_ready_; + grpc_closure* original_recv_trailing_metadata_ready_ = nullptr; + grpc_polling_entity* pollent_ = nullptr; // Batches are added to this list when received from above. @@ -1143,7 +1164,7 @@ void ChannelData::ProcessLbPolicy( const Resolver::Result& resolver_result, const internal::ClientChannelGlobalParsedConfig* parsed_service_config, UniquePtr* lb_policy_name, - RefCountedPtr* lb_policy_config) { + RefCountedPtr* lb_policy_config) { // Prefer the LB policy name found in the service config. if (parsed_service_config != nullptr && parsed_service_config->parsed_lb_config() != nullptr) { @@ -1191,7 +1212,7 @@ void ChannelData::ProcessLbPolicy( // resolver result update. bool ChannelData::ProcessResolverResultLocked( void* arg, Resolver::Result* result, const char** lb_policy_name, - RefCountedPtr* lb_policy_config, + RefCountedPtr* lb_policy_config, grpc_error** service_config_error) { ChannelData* chand = static_cast(arg); RefCountedPtr service_config; @@ -1312,19 +1333,18 @@ grpc_error* ChannelData::DoPingLocked(grpc_transport_op* op) { if (grpc_connectivity_state_check(&state_tracker_) != GRPC_CHANNEL_READY) { return GRPC_ERROR_CREATE_FROM_STATIC_STRING("channel not connected"); } - LoadBalancingPolicy::PickArgs pick; - grpc_error* error = GRPC_ERROR_NONE; - picker_->Pick(&pick, &error); - if (pick.connected_subchannel != nullptr) { - pick.connected_subchannel->Ping(op->send_ping.on_initiate, - op->send_ping.on_ack); + LoadBalancingPolicy::PickResult result = + picker_->Pick(LoadBalancingPolicy::PickArgs()); + if (result.connected_subchannel != nullptr) { + result.connected_subchannel->Ping(op->send_ping.on_initiate, + op->send_ping.on_ack); } else { - if (error == GRPC_ERROR_NONE) { - error = GRPC_ERROR_CREATE_FROM_STATIC_STRING( + if (result.error == GRPC_ERROR_NONE) { + result.error = GRPC_ERROR_CREATE_FROM_STATIC_STRING( "LB policy dropped call on ping"); } } - return error; + return result.error; } void ChannelData::StartTransportOpLocked(void* arg, grpc_error* ignored) { @@ -1505,6 +1525,7 @@ CallData::CallData(grpc_call_element* elem, const ChannelData& chand, owning_call_(args.call_stack), call_combiner_(args.call_combiner), call_context_(args.context), + lb_call_state_(this), pending_send_initial_metadata_(false), pending_send_message_(false), pending_send_trailing_metadata_(false), @@ -1737,18 +1758,30 @@ void CallData::FreeCachedSendOpDataForCompletedBatch( // LB recv_trailing_metadata_ready handling // +void CallData::RecvTrailingMetadataReadyForLoadBalancingPolicy( + void* arg, grpc_error* error) { + CallData* calld = static_cast(arg); + // Invoke callback to LB policy. + calld->lb_recv_trailing_metadata_ready_( + calld->lb_recv_trailing_metadata_ready_user_data_, + calld->recv_trailing_metadata_, &calld->lb_call_state_); + // Chain to original callback. + GRPC_CLOSURE_RUN(calld->original_recv_trailing_metadata_ready_, + GRPC_ERROR_REF(error)); +} + void CallData::MaybeInjectRecvTrailingMetadataReadyForLoadBalancingPolicy( - const LoadBalancingPolicy::PickArgs& pick, grpc_transport_stream_op_batch* batch) { - if (pick.recv_trailing_metadata_ready != nullptr) { - *pick.original_recv_trailing_metadata_ready = + if (lb_recv_trailing_metadata_ready_ != nullptr) { + recv_trailing_metadata_ = + batch->payload->recv_trailing_metadata.recv_trailing_metadata; + original_recv_trailing_metadata_ready_ = batch->payload->recv_trailing_metadata.recv_trailing_metadata_ready; + GRPC_CLOSURE_INIT(&recv_trailing_metadata_ready_, + RecvTrailingMetadataReadyForLoadBalancingPolicy, this, + grpc_schedule_on_exec_ctx); batch->payload->recv_trailing_metadata.recv_trailing_metadata_ready = - pick.recv_trailing_metadata_ready; - if (pick.recv_trailing_metadata != nullptr) { - *pick.recv_trailing_metadata = - batch->payload->recv_trailing_metadata.recv_trailing_metadata; - } + &recv_trailing_metadata_ready_; } } @@ -1894,8 +1927,7 @@ void CallData::PendingBatchesFail( grpc_transport_stream_op_batch* batch = pending->batch; if (batch != nullptr) { if (batch->recv_trailing_metadata) { - MaybeInjectRecvTrailingMetadataReadyForLoadBalancingPolicy(pick_.pick, - batch); + MaybeInjectRecvTrailingMetadataReadyForLoadBalancingPolicy(batch); } batch->handler_private.extra_arg = this; GRPC_CLOSURE_INIT(&batch->handler_private.closure, @@ -1949,8 +1981,7 @@ void CallData::PendingBatchesResume(grpc_call_element* elem) { grpc_transport_stream_op_batch* batch = pending->batch; if (batch != nullptr) { if (batch->recv_trailing_metadata) { - MaybeInjectRecvTrailingMetadataReadyForLoadBalancingPolicy(pick_.pick, - batch); + MaybeInjectRecvTrailingMetadataReadyForLoadBalancingPolicy(batch); } batch->handler_private.extra_arg = subchannel_call_.get(); GRPC_CLOSURE_INIT(&batch->handler_private.closure, @@ -2011,7 +2042,7 @@ void CallData::DoRetry(grpc_call_element* elem, GPR_ASSERT(retry_policy != nullptr); // Reset subchannel call and connected subchannel. subchannel_call_.reset(); - pick_.pick.connected_subchannel.reset(); + connected_subchannel_.reset(); // Compute backoff delay. grpc_millis next_attempt_time; if (server_pushback_ms >= 0) { @@ -2868,7 +2899,7 @@ void CallData::AddRetriableRecvTrailingMetadataOp( .recv_trailing_metadata_ready = &retry_state->recv_trailing_metadata_ready; MaybeInjectRecvTrailingMetadataReadyForLoadBalancingPolicy( - pick_.pick, &batch_data->batch); + &batch_data->batch); } void CallData::StartInternalRecvTrailingMetadata(grpc_call_element* elem) { @@ -3135,8 +3166,7 @@ void CallData::CreateSubchannelCall(grpc_call_element* elem) { // need to use a separate call context for each subchannel call. call_context_, call_combiner_, parent_data_size}; grpc_error* error = GRPC_ERROR_NONE; - subchannel_call_ = - pick_.pick.connected_subchannel->CreateCall(call_args, &error); + subchannel_call_ = connected_subchannel_->CreateCall(call_args, &error); if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_routing_trace)) { gpr_log(GPR_INFO, "chand=%p calld=%p: create subchannel_call=%p: error=%s", chand, this, subchannel_call_.get(), grpc_error_string(error)); @@ -3297,13 +3327,14 @@ void CallData::MaybeApplyServiceConfigToCallLocked(grpc_call_element* elem) { } } -const char* PickResultName(LoadBalancingPolicy::PickResult result) { - switch (result) { - case LoadBalancingPolicy::PICK_COMPLETE: +const char* PickResultTypeName( + LoadBalancingPolicy::PickResult::ResultType type) { + switch (type) { + case LoadBalancingPolicy::PickResult::PICK_COMPLETE: return "COMPLETE"; - case LoadBalancingPolicy::PICK_QUEUE: + case LoadBalancingPolicy::PickResult::PICK_QUEUE: return "QUEUE"; - case LoadBalancingPolicy::PICK_TRANSIENT_FAILURE: + case LoadBalancingPolicy::PickResult::PICK_TRANSIENT_FAILURE: return "TRANSIENT_FAILURE"; } GPR_UNREACHABLE_CODE(return "UNKNOWN"); @@ -3313,8 +3344,10 @@ void CallData::StartPickLocked(void* arg, grpc_error* error) { grpc_call_element* elem = static_cast(arg); CallData* calld = static_cast(elem->call_data); ChannelData* chand = static_cast(elem->channel_data); - GPR_ASSERT(calld->pick_.pick.connected_subchannel == nullptr); + GPR_ASSERT(calld->connected_subchannel_ == nullptr); GPR_ASSERT(calld->subchannel_call_ == nullptr); + // Apply service config to call if needed. + calld->MaybeApplyServiceConfigToCallLocked(elem); // If this is a retry, use the send_initial_metadata payload that // we've cached; otherwise, use the pending batch. The // send_initial_metadata batch will be the first pending batch in the @@ -3325,58 +3358,58 @@ void CallData::StartPickLocked(void* arg, grpc_error* error) { // allocate the subchannel batch earlier so that we can give the // subchannel's copy of the metadata batch (which is copied for each // attempt) to the LB policy instead the one from the parent channel. - calld->pick_.pick.initial_metadata = + LoadBalancingPolicy::PickArgs pick_args; + pick_args.call_state = &calld->lb_call_state_; + pick_args.initial_metadata = calld->seen_send_initial_metadata_ ? &calld->send_initial_metadata_ : calld->pending_batches_[0] .batch->payload->send_initial_metadata.send_initial_metadata; - uint32_t* send_initial_metadata_flags = + // Grab initial metadata flags so that we can check later if the call has + // wait_for_ready enabled. + const uint32_t send_initial_metadata_flags = calld->seen_send_initial_metadata_ - ? &calld->send_initial_metadata_flags_ - : &calld->pending_batches_[0] - .batch->payload->send_initial_metadata - .send_initial_metadata_flags; - // Apply service config to call if needed. - calld->MaybeApplyServiceConfigToCallLocked(elem); + ? calld->send_initial_metadata_flags_ + : calld->pending_batches_[0] + .batch->payload->send_initial_metadata + .send_initial_metadata_flags; // When done, we schedule this closure to leave the data plane combiner. GRPC_CLOSURE_INIT(&calld->pick_closure_, PickDone, elem, grpc_schedule_on_exec_ctx); // Attempt pick. - error = GRPC_ERROR_NONE; - auto pick_result = chand->picker()->Pick(&calld->pick_.pick, &error); + auto result = chand->picker()->Pick(pick_args); if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_routing_trace)) { gpr_log(GPR_INFO, "chand=%p calld=%p: LB pick returned %s (connected_subchannel=%p, " "error=%s)", - chand, calld, PickResultName(pick_result), - calld->pick_.pick.connected_subchannel.get(), - grpc_error_string(error)); + chand, calld, PickResultTypeName(result.type), + result.connected_subchannel.get(), grpc_error_string(result.error)); } - switch (pick_result) { - case LoadBalancingPolicy::PICK_TRANSIENT_FAILURE: { + switch (result.type) { + case LoadBalancingPolicy::PickResult::PICK_TRANSIENT_FAILURE: { // If we're shutting down, fail all RPCs. grpc_error* disconnect_error = chand->disconnect_error(); if (disconnect_error != GRPC_ERROR_NONE) { - GRPC_ERROR_UNREF(error); + GRPC_ERROR_UNREF(result.error); GRPC_CLOSURE_SCHED(&calld->pick_closure_, GRPC_ERROR_REF(disconnect_error)); break; } // If wait_for_ready is false, then the error indicates the RPC // attempt's final status. - if ((*send_initial_metadata_flags & + if ((send_initial_metadata_flags & GRPC_INITIAL_METADATA_WAIT_FOR_READY) == 0) { // Retry if appropriate; otherwise, fail. grpc_status_code status = GRPC_STATUS_OK; - grpc_error_get_status(error, calld->deadline_, &status, nullptr, + grpc_error_get_status(result.error, calld->deadline_, &status, nullptr, nullptr, nullptr); if (!calld->enable_retries_ || !calld->MaybeRetry(elem, nullptr /* batch_data */, status, nullptr /* server_pushback_md */)) { grpc_error* new_error = GRPC_ERROR_CREATE_REFERENCING_FROM_STATIC_STRING( - "Failed to pick subchannel", &error, 1); - GRPC_ERROR_UNREF(error); + "Failed to pick subchannel", &result.error, 1); + GRPC_ERROR_UNREF(result.error); GRPC_CLOSURE_SCHED(&calld->pick_closure_, new_error); } if (calld->pick_queued_) calld->RemoveCallFromQueuedPicksLocked(elem); @@ -3384,19 +3417,24 @@ void CallData::StartPickLocked(void* arg, grpc_error* error) { } // If wait_for_ready is true, then queue to retry when we get a new // picker. - GRPC_ERROR_UNREF(error); + GRPC_ERROR_UNREF(result.error); } // Fallthrough - case LoadBalancingPolicy::PICK_QUEUE: + case LoadBalancingPolicy::PickResult::PICK_QUEUE: if (!calld->pick_queued_) calld->AddCallToQueuedPicksLocked(elem); break; default: // PICK_COMPLETE // Handle drops. - if (GPR_UNLIKELY(calld->pick_.pick.connected_subchannel == nullptr)) { - error = GRPC_ERROR_CREATE_FROM_STATIC_STRING( + if (GPR_UNLIKELY(result.connected_subchannel == nullptr)) { + result.error = GRPC_ERROR_CREATE_FROM_STATIC_STRING( "Call dropped by load balancing policy"); } - GRPC_CLOSURE_SCHED(&calld->pick_closure_, error); + calld->connected_subchannel_ = std::move(result.connected_subchannel); + calld->lb_recv_trailing_metadata_ready_ = + result.recv_trailing_metadata_ready; + calld->lb_recv_trailing_metadata_ready_user_data_ = + result.recv_trailing_metadata_ready_user_data; + GRPC_CLOSURE_SCHED(&calld->pick_closure_, result.error); if (calld->pick_queued_) calld->RemoveCallFromQueuedPicksLocked(elem); } } diff --git a/src/core/ext/filters/client_channel/lb_policy.cc b/src/core/ext/filters/client_channel/lb_policy.cc index 6fa799343ca..3e4d3703c82 100644 --- a/src/core/ext/filters/client_channel/lb_policy.cc +++ b/src/core/ext/filters/client_channel/lb_policy.cc @@ -105,7 +105,7 @@ LoadBalancingPolicy::UpdateArgs& LoadBalancingPolicy::UpdateArgs::operator=( // LoadBalancingPolicy::PickResult LoadBalancingPolicy::QueuePicker::Pick( - PickArgs* pick, grpc_error** error) { + PickArgs args) { // We invoke the parent's ExitIdleLocked() via a closure instead // of doing it directly here, for two reasons: // 1. ExitIdleLocked() may cause the policy's state to change and @@ -125,7 +125,9 @@ LoadBalancingPolicy::PickResult LoadBalancingPolicy::QueuePicker::Pick( grpc_combiner_scheduler(parent_->combiner())), GRPC_ERROR_NONE); } - return PICK_QUEUE; + PickResult result; + result.type = PickResult::PICK_QUEUE; + return result; } void LoadBalancingPolicy::QueuePicker::CallExitIdle(void* arg, @@ -135,4 +137,16 @@ void LoadBalancingPolicy::QueuePicker::CallExitIdle(void* arg, parent->Unref(); } +// +// LoadBalancingPolicy::TransientFailurePicker +// + +LoadBalancingPolicy::PickResult +LoadBalancingPolicy::TransientFailurePicker::Pick(PickArgs args) { + PickResult result; + result.type = PickResult::PICK_TRANSIENT_FAILURE; + result.error = GRPC_ERROR_REF(error_); + return result; +} + } // namespace grpc_core diff --git a/src/core/ext/filters/client_channel/lb_policy.h b/src/core/ext/filters/client_channel/lb_policy.h index 2ac7df63b7d..5920254a9ef 100644 --- a/src/core/ext/filters/client_channel/lb_policy.h +++ b/src/core/ext/filters/client_channel/lb_policy.h @@ -32,21 +32,9 @@ #include "src/core/lib/iomgr/polling_entity.h" #include "src/core/lib/transport/connectivity_state.h" -extern grpc_core::DebugOnlyTraceFlag grpc_trace_lb_policy_refcount; - namespace grpc_core { -/// Interface for parsed forms of load balancing configs found in a service -/// config. -class ParsedLoadBalancingConfig : public RefCounted { - public: - virtual ~ParsedLoadBalancingConfig() = default; - - // Returns the load balancing policy name - virtual const char* name() const GRPC_ABSTRACT; - - GRPC_ABSTRACT_BASE_CLASS; -}; +extern DebugOnlyTraceFlag grpc_trace_lb_policy_refcount; /// Interface for load balancing policies. /// @@ -89,66 +77,77 @@ class ParsedLoadBalancingConfig : public RefCounted { // interested_parties() hooks from the API. class LoadBalancingPolicy : public InternallyRefCounted { public: + /// Interface for accessing per-call state. + class CallState { + public: + CallState() = default; + virtual ~CallState() = default; + + /// Allocates memory associated with the call, which will be + /// automatically freed when the call is complete. + /// It is more efficient to use this than to allocate memory directly + /// for allocations that need to be made on a per-call basis. + virtual void* Alloc(size_t size) GRPC_ABSTRACT; + + GRPC_ABSTRACT_BASE_CLASS + }; + /// Arguments used when picking a subchannel for an RPC. struct PickArgs { - /// - /// Input parameters. - /// /// Initial metadata associated with the picking call. /// The LB policy may use the existing metadata to influence its routing /// decision, and it may add new metadata elements to be sent with the /// call to the chosen backend. // TODO(roth): Provide a more generic metadata API here. grpc_metadata_batch* initial_metadata = nullptr; - /// Storage for LB token in \a initial_metadata, or nullptr if not used. - // TODO(roth): Remove this from the API. Maybe have the LB policy - // allocate this on the arena instead? - grpc_linked_mdelem lb_token_mdelem_storage; - /// - /// Output parameters. - /// - /// Will be set to the selected subchannel, or nullptr on failure or when - /// the LB policy decides to drop the call. - RefCountedPtr connected_subchannel; - /// Callback set by lb policy to be notified of trailing metadata. - /// The callback must be scheduled on grpc_schedule_on_exec_ctx. - // TODO(roth): Provide a cleaner callback API. - grpc_closure* recv_trailing_metadata_ready = nullptr; - /// The address that will be set to point to the original - /// recv_trailing_metadata_ready callback, to be invoked by the LB - /// policy's recv_trailing_metadata_ready callback when complete. - /// Must be non-null if recv_trailing_metadata_ready is non-null. - // TODO(roth): Consider making the recv_trailing_metadata closure a - // synchronous callback, in which case it is not responsible for - // chaining to the next callback, so this can be removed from the API. - grpc_closure** original_recv_trailing_metadata_ready = nullptr; - /// If this is not nullptr, then the client channel will point it to the - /// call's trailing metadata before invoking recv_trailing_metadata_ready. - /// If this is nullptr, then the callback will still be called. - /// The lb does not have ownership of the metadata. - // TODO(roth): If we make this a synchronous callback, then this can - // be passed to the callback as a parameter and can be removed from - // the API here. - grpc_metadata_batch** recv_trailing_metadata = nullptr; + /// An interface for accessing call state. Can be used to allocate + /// data associated with the call in an efficient way. + CallState* call_state; }; /// The result of picking a subchannel for an RPC. - enum PickResult { - // Pick complete. If connected_subchannel is non-null, client channel - // can immediately proceed with the call on connected_subchannel; - // otherwise, call should be dropped. - PICK_COMPLETE, - // Pick cannot be completed until something changes on the control - // plane. Client channel will queue the pick and try again the - // next time the picker is updated. - PICK_QUEUE, - // LB policy is in transient failure. If the pick is wait_for_ready, - // client channel will wait for the next picker and try again; - // otherwise, the call will be failed immediately (although it may - // be retried if the client channel is configured to do so). - // The Pick() method will set its error parameter if this value is - // returned. - PICK_TRANSIENT_FAILURE, + struct PickResult { + enum ResultType { + /// Pick complete. If connected_subchannel is non-null, client channel + /// can immediately proceed with the call on connected_subchannel; + /// otherwise, call should be dropped. + PICK_COMPLETE, + /// Pick cannot be completed until something changes on the control + /// plane. Client channel will queue the pick and try again the + /// next time the picker is updated. + PICK_QUEUE, + /// LB policy is in transient failure. If the pick is wait_for_ready, + /// client channel will wait for the next picker and try again; + /// otherwise, the call will be failed immediately (although it may + /// be retried if the client channel is configured to do so). + /// The Pick() method will set its error parameter if this value is + /// returned. + PICK_TRANSIENT_FAILURE, + }; + ResultType type; + + /// Used only if type is PICK_COMPLETE. Will be set to the selected + /// subchannel, or nullptr if the LB policy decides to drop the call. + RefCountedPtr connected_subchannel; + + /// Used only if type is PICK_TRANSIENT_FAILURE. + /// Error to be set when returning a transient failure. + // TODO(roth): Replace this with something similar to grpc::Status, + // so that we don't expose grpc_error to this API. + grpc_error* error = GRPC_ERROR_NONE; + + /// Used only if type is PICK_COMPLETE. + /// Callback set by lb policy to be notified of trailing metadata. + /// The user_data argument will be set to the + /// recv_trailing_metadata_ready_user_data field. + /// recv_trailing_metadata will be set to the metadata, which may be + /// modified by the callback. The callback does not take ownership, + /// however, so any data that needs to be used after returning must + /// be copied. + void (*recv_trailing_metadata_ready)( + void* user_data, grpc_metadata_batch* recv_trailing_metadata, + CallState* call_state) = nullptr; + void* recv_trailing_metadata_ready_user_data = nullptr; }; /// A subchannel picker is the object used to pick the subchannel to @@ -162,17 +161,14 @@ class LoadBalancingPolicy : public InternallyRefCounted { /// live in the LB policy object itself. /// /// Currently, pickers are always accessed from within the - /// client_channel combiner, so they do not have to be thread-safe. - // TODO(roth): In a subsequent PR, split the data plane work (i.e., - // the interaction with the picker) and the control plane work (i.e., - // the interaction with the LB policy) into two different - // synchronization mechanisms, to avoid lock contention between the two. + /// client_channel data plane combiner, so they do not have to be + /// thread-safe. class SubchannelPicker { public: SubchannelPicker() = default; virtual ~SubchannelPicker() = default; - virtual PickResult Pick(PickArgs* pick, grpc_error** error) GRPC_ABSTRACT; + virtual PickResult Pick(PickArgs args) GRPC_ABSTRACT; GRPC_ABSTRACT_BASE_CLASS }; @@ -208,11 +204,24 @@ class LoadBalancingPolicy : public InternallyRefCounted { GRPC_ABSTRACT_BASE_CLASS }; + /// Interface for configuration data used by an LB policy implementation. + /// Individual implementations will create a subclass that adds methods to + /// return the parameters they need. + class Config : public RefCounted { + public: + virtual ~Config() = default; + + // Returns the load balancing policy name + virtual const char* name() const GRPC_ABSTRACT; + + GRPC_ABSTRACT_BASE_CLASS + }; + /// Data passed to the UpdateLocked() method when new addresses and /// config are available. struct UpdateArgs { ServerAddressList addresses; - RefCountedPtr config; + RefCountedPtr config; const grpc_channel_args* args = nullptr; // TODO(roth): Remove everything below once channel args is @@ -291,7 +300,7 @@ class LoadBalancingPolicy : public InternallyRefCounted { explicit QueuePicker(RefCountedPtr parent) : parent_(std::move(parent)) {} - PickResult Pick(PickArgs* pick, grpc_error** error) override; + PickResult Pick(PickArgs args) override; private: static void CallExitIdle(void* arg, grpc_error* error); @@ -306,10 +315,7 @@ class LoadBalancingPolicy : public InternallyRefCounted { explicit TransientFailurePicker(grpc_error* error) : error_(error) {} ~TransientFailurePicker() override { GRPC_ERROR_UNREF(error_); } - PickResult Pick(PickArgs* pick, grpc_error** error) override { - *error = GRPC_ERROR_REF(error_); - return PICK_TRANSIENT_FAILURE; - } + PickResult Pick(PickArgs args) override; private: grpc_error* error_; diff --git a/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc b/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc index ed6e8de3f21..2c652e4c6e6 100644 --- a/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc +++ b/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc @@ -118,19 +118,19 @@ namespace { constexpr char kGrpclb[] = "grpclb"; -class ParsedGrpcLbConfig : public ParsedLoadBalancingConfig { +class ParsedGrpcLbConfig : public LoadBalancingPolicy::Config { public: explicit ParsedGrpcLbConfig( - RefCountedPtr child_policy) + RefCountedPtr child_policy) : child_policy_(std::move(child_policy)) {} const char* name() const override { return kGrpclb; } - RefCountedPtr child_policy() const { + RefCountedPtr child_policy() const { return child_policy_; } private: - RefCountedPtr child_policy_; + RefCountedPtr child_policy_; }; class GrpcLb : public LoadBalancingPolicy { @@ -274,7 +274,7 @@ class GrpcLb : public LoadBalancingPolicy { child_picker_(std::move(child_picker)), client_stats_(std::move(client_stats)) {} - PickResult Pick(PickArgs* pick, grpc_error** error) override; + PickResult Pick(PickArgs args) override; private: // Storing the address for logging, but not holding a ref. @@ -394,7 +394,7 @@ class GrpcLb : public LoadBalancingPolicy { // until it reports READY, at which point it will be moved to child_policy_. OrphanablePtr pending_child_policy_; // The child policy config. - RefCountedPtr child_policy_config_; + RefCountedPtr child_policy_config_; // Child policy in state READY. bool child_policy_ready_ = false; }; @@ -561,7 +561,8 @@ const char* GrpcLb::Serverlist::ShouldDrop() { // GrpcLb::Picker // -GrpcLb::PickResult GrpcLb::Picker::Pick(PickArgs* pick, grpc_error** error) { +GrpcLb::PickResult GrpcLb::Picker::Pick(PickArgs args) { + PickResult result; // Check if we should drop the call. const char* drop_token = serverlist_->ShouldDrop(); if (drop_token != nullptr) { @@ -573,26 +574,28 @@ GrpcLb::PickResult GrpcLb::Picker::Pick(PickArgs* pick, grpc_error** error) { if (client_stats_ != nullptr) { client_stats_->AddCallDropped(drop_token); } - return PICK_COMPLETE; + result.type = PickResult::PICK_COMPLETE; + return result; } // Forward pick to child policy. - PickResult result = child_picker_->Pick(pick, error); + result = child_picker_->Pick(args); // If pick succeeded, add LB token to initial metadata. - if (result == PickResult::PICK_COMPLETE && - pick->connected_subchannel != nullptr) { + if (result.type == PickResult::PICK_COMPLETE && + result.connected_subchannel != nullptr) { const grpc_arg* arg = grpc_channel_args_find( - pick->connected_subchannel->args(), GRPC_ARG_GRPCLB_ADDRESS_LB_TOKEN); + result.connected_subchannel->args(), GRPC_ARG_GRPCLB_ADDRESS_LB_TOKEN); if (arg == nullptr) { gpr_log(GPR_ERROR, - "[grpclb %p picker %p] No LB token for connected subchannel " - "pick %p", - parent_, this, pick); + "[grpclb %p picker %p] No LB token for connected subchannel %p", + parent_, this, result.connected_subchannel.get()); abort(); } grpc_mdelem lb_token = {reinterpret_cast(arg->value.pointer.p)}; GPR_ASSERT(!GRPC_MDISNULL(lb_token)); + grpc_linked_mdelem* mdelem_storage = static_cast( + args.call_state->Alloc(sizeof(grpc_linked_mdelem))); GPR_ASSERT(grpc_metadata_batch_add_tail( - pick->initial_metadata, &pick->lb_token_mdelem_storage, + args.initial_metadata, mdelem_storage, GRPC_MDELEM_REF(lb_token)) == GRPC_ERROR_NONE); GrpcLbClientStats* client_stats = static_cast( grpc_mdelem_get_user_data(lb_token, GrpcLbClientStats::Destroy)); @@ -1800,15 +1803,15 @@ class GrpcLbFactory : public LoadBalancingPolicyFactory { const char* name() const override { return kGrpclb; } - RefCountedPtr ParseLoadBalancingConfig( + RefCountedPtr ParseLoadBalancingConfig( const grpc_json* json, grpc_error** error) const override { GPR_DEBUG_ASSERT(error != nullptr && *error == GRPC_ERROR_NONE); if (json == nullptr) { - return RefCountedPtr( + return RefCountedPtr( New(nullptr)); } InlinedVector error_list; - RefCountedPtr child_policy; + RefCountedPtr child_policy; for (const grpc_json* field = json->child; field != nullptr; field = field->next) { if (field->key == nullptr) continue; @@ -1826,7 +1829,7 @@ class GrpcLbFactory : public LoadBalancingPolicyFactory { } } if (error_list.empty()) { - return RefCountedPtr( + return RefCountedPtr( New(std::move(child_policy))); } else { *error = GRPC_ERROR_CREATE_FROM_VECTOR("GrpcLb Parser", &error_list); diff --git a/src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc b/src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc index 199e973e72c..1b0dd230b49 100644 --- a/src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc +++ b/src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc @@ -115,9 +115,11 @@ class PickFirst : public LoadBalancingPolicy { explicit Picker(RefCountedPtr connected_subchannel) : connected_subchannel_(std::move(connected_subchannel)) {} - PickResult Pick(PickArgs* pick, grpc_error** error) override { - pick->connected_subchannel = connected_subchannel_; - return PICK_COMPLETE; + PickResult Pick(PickArgs args) override { + PickResult result; + result.type = PickResult::PICK_COMPLETE; + result.connected_subchannel = connected_subchannel_; + return result; } private: @@ -527,7 +529,7 @@ void PickFirst::PickFirstSubchannelData:: } } -class ParsedPickFirstConfig : public ParsedLoadBalancingConfig { +class ParsedPickFirstConfig : public LoadBalancingPolicy::Config { public: const char* name() const override { return kPickFirst; } }; @@ -545,12 +547,12 @@ class PickFirstFactory : public LoadBalancingPolicyFactory { const char* name() const override { return kPickFirst; } - RefCountedPtr ParseLoadBalancingConfig( + RefCountedPtr ParseLoadBalancingConfig( const grpc_json* json, grpc_error** error) const override { if (json != nullptr) { GPR_DEBUG_ASSERT(strcmp(json->key, name()) == 0); } - return RefCountedPtr( + return RefCountedPtr( New()); } }; diff --git a/src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.cc b/src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.cc index 1693032ea24..0b9915de28e 100644 --- a/src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.cc +++ b/src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.cc @@ -149,7 +149,7 @@ class RoundRobin : public LoadBalancingPolicy { public: Picker(RoundRobin* parent, RoundRobinSubchannelList* subchannel_list); - PickResult Pick(PickArgs* pick, grpc_error** error) override; + PickResult Pick(PickArgs args) override; private: // Using pointer value only, no ref held -- do not dereference! @@ -220,8 +220,7 @@ RoundRobin::Picker::Picker(RoundRobin* parent, } } -RoundRobin::PickResult RoundRobin::Picker::Pick(PickArgs* pick, - grpc_error** error) { +RoundRobin::PickResult RoundRobin::Picker::Pick(PickArgs args) { last_picked_index_ = (last_picked_index_ + 1) % subchannels_.size(); if (GRPC_TRACE_FLAG_ENABLED(grpc_lb_round_robin_trace)) { gpr_log(GPR_INFO, @@ -230,8 +229,10 @@ RoundRobin::PickResult RoundRobin::Picker::Pick(PickArgs* pick, parent_, this, last_picked_index_, subchannels_[last_picked_index_].get()); } - pick->connected_subchannel = subchannels_[last_picked_index_]; - return PICK_COMPLETE; + PickResult result; + result.type = PickResult::PICK_COMPLETE; + result.connected_subchannel = subchannels_[last_picked_index_]; + return result; } // @@ -503,7 +504,7 @@ void RoundRobin::UpdateLocked(UpdateArgs args) { } } -class ParsedRoundRobinConfig : public ParsedLoadBalancingConfig { +class ParsedRoundRobinConfig : public LoadBalancingPolicy::Config { public: const char* name() const override { return kRoundRobin; } }; @@ -521,12 +522,12 @@ class RoundRobinFactory : public LoadBalancingPolicyFactory { const char* name() const override { return kRoundRobin; } - RefCountedPtr ParseLoadBalancingConfig( + RefCountedPtr ParseLoadBalancingConfig( const grpc_json* json, grpc_error** error) const override { if (json != nullptr) { GPR_DEBUG_ASSERT(strcmp(json->key, name()) == 0); } - return RefCountedPtr( + return RefCountedPtr( New()); } }; diff --git a/src/core/ext/filters/client_channel/lb_policy/xds/xds.cc b/src/core/ext/filters/client_channel/lb_policy/xds/xds.cc index 819bad6c00d..d70042af229 100644 --- a/src/core/ext/filters/client_channel/lb_policy/xds/xds.cc +++ b/src/core/ext/filters/client_channel/lb_policy/xds/xds.cc @@ -120,11 +120,11 @@ constexpr char kXds[] = "xds_experimental"; constexpr char kDefaultLocalityName[] = "xds_default_locality"; constexpr uint32_t kDefaultLocalityWeight = 3; -class ParsedXdsConfig : public ParsedLoadBalancingConfig { +class ParsedXdsConfig : public LoadBalancingPolicy::Config { public: ParsedXdsConfig(const char* balancer_name, - RefCountedPtr child_policy, - RefCountedPtr fallback_policy) + RefCountedPtr child_policy, + RefCountedPtr fallback_policy) : balancer_name_(balancer_name), child_policy_(std::move(child_policy)), fallback_policy_(std::move(fallback_policy)) {} @@ -133,18 +133,18 @@ class ParsedXdsConfig : public ParsedLoadBalancingConfig { const char* balancer_name() const { return balancer_name_; }; - RefCountedPtr child_policy() const { + RefCountedPtr child_policy() const { return child_policy_; } - RefCountedPtr fallback_policy() const { + RefCountedPtr fallback_policy() const { return fallback_policy_; } private: const char* balancer_name_ = nullptr; - RefCountedPtr child_policy_; - RefCountedPtr fallback_policy_; + RefCountedPtr child_policy_; + RefCountedPtr fallback_policy_; }; class XdsLb : public LoadBalancingPolicy { @@ -300,9 +300,7 @@ class XdsLb : public LoadBalancingPolicy { public: explicit PickerRef(UniquePtr picker) : picker_(std::move(picker)) {} - PickResult Pick(PickArgs* pick, grpc_error** error) { - return picker_->Pick(pick, error); - } + PickResult Pick(PickArgs args) { return picker_->Pick(args); } private: UniquePtr picker_; @@ -322,12 +320,11 @@ class XdsLb : public LoadBalancingPolicy { : client_stats_(std::move(client_stats)), pickers_(std::move(pickers)) {} - PickResult Pick(PickArgs* pick, grpc_error** error) override; + PickResult Pick(PickArgs args) override; private: // Calls the picker of the locality that the key falls within - PickResult PickFromLocality(const uint32_t key, PickArgs* pick, - grpc_error** error); + PickResult PickFromLocality(const uint32_t key, PickArgs args); RefCountedPtr client_stats_; PickerList pickers_; }; @@ -363,7 +360,7 @@ class XdsLb : public LoadBalancingPolicy { ~LocalityEntry() = default; void UpdateLocked(xds_grpclb_serverlist* serverlist, - ParsedLoadBalancingConfig* child_policy_config, + LoadBalancingPolicy::Config* child_policy_config, const grpc_channel_args* args); void ShutdownLocked(); void ResetBackoffLocked(); @@ -410,7 +407,7 @@ class XdsLb : public LoadBalancingPolicy { }; void UpdateLocked(const LocalityList& locality_list, - ParsedLoadBalancingConfig* child_policy_config, + LoadBalancingPolicy::Config* child_policy_config, const grpc_channel_args* args, XdsLb* parent); void ShutdownLocked(); void ResetBackoffLocked(); @@ -506,7 +503,7 @@ class XdsLb : public LoadBalancingPolicy { grpc_closure lb_on_fallback_; // The policy to use for the fallback backends. - RefCountedPtr fallback_policy_config_; + RefCountedPtr fallback_policy_config_; // Lock held when modifying the value of fallback_policy_ or // pending_fallback_policy_. Mutex fallback_policy_mu_; @@ -515,7 +512,7 @@ class XdsLb : public LoadBalancingPolicy { OrphanablePtr pending_fallback_policy_; // The policy to use for the backends. - RefCountedPtr child_policy_config_; + RefCountedPtr child_policy_config_; // Map of policies to use in the backend LocalityMap locality_map_; // TODO(mhaidry) : Add support for multiple maps of localities @@ -530,25 +527,24 @@ class XdsLb : public LoadBalancingPolicy { // XdsLb::Picker // -XdsLb::PickResult XdsLb::Picker::Pick(PickArgs* pick, grpc_error** error) { +XdsLb::PickResult XdsLb::Picker::Pick(PickArgs args) { // TODO(roth): Add support for drop handling. // Generate a random number between 0 and the total weight const uint32_t key = (rand() * pickers_[pickers_.size() - 1].first) / RAND_MAX; // Forward pick to whichever locality maps to the range in which the // random number falls in. - PickResult result = PickFromLocality(key, pick, error); + PickResult result = PickFromLocality(key, args); // If pick succeeded, add client stats. - if (result == PickResult::PICK_COMPLETE && - pick->connected_subchannel != nullptr && client_stats_ != nullptr) { + if (result.type == PickResult::PICK_COMPLETE && + result.connected_subchannel != nullptr && client_stats_ != nullptr) { // TODO(roth): Add support for client stats. } return result; } XdsLb::PickResult XdsLb::Picker::PickFromLocality(const uint32_t key, - PickArgs* pick, - grpc_error** error) { + PickArgs args) { size_t mid = 0; size_t start_index = 0; size_t end_index = pickers_.size() - 1; @@ -566,7 +562,7 @@ XdsLb::PickResult XdsLb::Picker::PickFromLocality(const uint32_t key, } if (index == 0) index = start_index; GPR_ASSERT(pickers_[index].first > key); - return pickers_[index].second->Pick(pick, error); + return pickers_[index].second->Pick(args); } // @@ -1744,7 +1740,7 @@ void XdsLb::LocalityMap::PruneLocalities(const LocalityList& locality_list) { void XdsLb::LocalityMap::UpdateLocked( const LocalityList& locality_serverlist, - ParsedLoadBalancingConfig* child_policy_config, + LoadBalancingPolicy::Config* child_policy_config, const grpc_channel_args* args, XdsLb* parent) { if (parent->shutting_down_) return; for (size_t i = 0; i < locality_serverlist.size(); i++) { @@ -1839,7 +1835,7 @@ XdsLb::LocalityMap::LocalityEntry::CreateChildPolicyLocked( void XdsLb::LocalityMap::LocalityEntry::UpdateLocked( xds_grpclb_serverlist* serverlist, - ParsedLoadBalancingConfig* child_policy_config, + LoadBalancingPolicy::Config* child_policy_config, const grpc_channel_args* args_in) { if (parent_->shutting_down_) return; // Construct update args. @@ -2158,7 +2154,7 @@ class XdsFactory : public LoadBalancingPolicyFactory { const char* name() const override { return kXds; } - RefCountedPtr ParseLoadBalancingConfig( + RefCountedPtr ParseLoadBalancingConfig( const grpc_json* json, grpc_error** error) const override { GPR_DEBUG_ASSERT(error != nullptr && *error == GRPC_ERROR_NONE); if (json == nullptr) { @@ -2174,8 +2170,8 @@ class XdsFactory : public LoadBalancingPolicyFactory { InlinedVector error_list; const char* balancer_name = nullptr; - RefCountedPtr child_policy; - RefCountedPtr fallback_policy; + RefCountedPtr child_policy; + RefCountedPtr fallback_policy; for (const grpc_json* field = json->child; field != nullptr; field = field->next) { if (field->key == nullptr) continue; @@ -2221,7 +2217,7 @@ class XdsFactory : public LoadBalancingPolicyFactory { "field:balancerName error:not found")); } if (error_list.empty()) { - return RefCountedPtr(New( + return RefCountedPtr(New( balancer_name, std::move(child_policy), std::move(fallback_policy))); } else { *error = GRPC_ERROR_CREATE_FROM_VECTOR("Xds Parser", &error_list); diff --git a/src/core/ext/filters/client_channel/lb_policy_factory.h b/src/core/ext/filters/client_channel/lb_policy_factory.h index aaf3e959542..3b8c9faa180 100644 --- a/src/core/ext/filters/client_channel/lb_policy_factory.h +++ b/src/core/ext/filters/client_channel/lb_policy_factory.h @@ -37,7 +37,7 @@ class LoadBalancingPolicyFactory { /// Caller does NOT take ownership of result. virtual const char* name() const GRPC_ABSTRACT; - virtual RefCountedPtr ParseLoadBalancingConfig( + virtual RefCountedPtr ParseLoadBalancingConfig( const grpc_json* json, grpc_error** error) const GRPC_ABSTRACT; virtual ~LoadBalancingPolicyFactory() {} diff --git a/src/core/ext/filters/client_channel/lb_policy_registry.cc b/src/core/ext/filters/client_channel/lb_policy_registry.cc index 973aa26d0f6..20099b52d6c 100644 --- a/src/core/ext/filters/client_channel/lb_policy_registry.cc +++ b/src/core/ext/filters/client_channel/lb_policy_registry.cc @@ -176,7 +176,7 @@ grpc_json* ParseLoadBalancingConfigHelper(const grpc_json* lb_config_array, } } // namespace -RefCountedPtr +RefCountedPtr LoadBalancingPolicyRegistry::ParseLoadBalancingConfig(const grpc_json* json, grpc_error** error) { GPR_DEBUG_ASSERT(error != nullptr && *error == GRPC_ERROR_NONE); diff --git a/src/core/ext/filters/client_channel/lb_policy_registry.h b/src/core/ext/filters/client_channel/lb_policy_registry.h index 6820cfc9334..c5f02953a1b 100644 --- a/src/core/ext/filters/client_channel/lb_policy_registry.h +++ b/src/core/ext/filters/client_channel/lb_policy_registry.h @@ -56,7 +56,7 @@ class LoadBalancingPolicyRegistry { /// Returns a parsed object of the load balancing policy to be used from a /// LoadBalancingConfig array \a json. - static RefCountedPtr ParseLoadBalancingConfig( + static RefCountedPtr ParseLoadBalancingConfig( const grpc_json* json, grpc_error** error); }; diff --git a/src/core/ext/filters/client_channel/resolver_result_parsing.cc b/src/core/ext/filters/client_channel/resolver_result_parsing.cc index 6a811a2d936..3a1960bfded 100644 --- a/src/core/ext/filters/client_channel/resolver_result_parsing.cc +++ b/src/core/ext/filters/client_channel/resolver_result_parsing.cc @@ -268,7 +268,7 @@ ClientChannelServiceConfigParser::ParseGlobalParams(const grpc_json* json, grpc_error** error) { GPR_DEBUG_ASSERT(error != nullptr && *error == GRPC_ERROR_NONE); InlinedVector error_list; - RefCountedPtr parsed_lb_config; + RefCountedPtr parsed_lb_config; UniquePtr lb_policy_name; Optional retry_throttling; const char* health_check_service_name = nullptr; diff --git a/src/core/ext/filters/client_channel/resolver_result_parsing.h b/src/core/ext/filters/client_channel/resolver_result_parsing.h index 7750791c779..d0a0456875d 100644 --- a/src/core/ext/filters/client_channel/resolver_result_parsing.h +++ b/src/core/ext/filters/client_channel/resolver_result_parsing.h @@ -45,7 +45,7 @@ class ClientChannelGlobalParsedConfig : public ServiceConfig::ParsedConfig { }; ClientChannelGlobalParsedConfig( - RefCountedPtr parsed_lb_config, + RefCountedPtr parsed_lb_config, UniquePtr parsed_deprecated_lb_policy, const Optional& retry_throttling, const char* health_check_service_name) @@ -58,7 +58,7 @@ class ClientChannelGlobalParsedConfig : public ServiceConfig::ParsedConfig { return retry_throttling_; } - RefCountedPtr parsed_lb_config() const { + RefCountedPtr parsed_lb_config() const { return parsed_lb_config_; } @@ -71,7 +71,7 @@ class ClientChannelGlobalParsedConfig : public ServiceConfig::ParsedConfig { } private: - RefCountedPtr parsed_lb_config_; + RefCountedPtr parsed_lb_config_; UniquePtr parsed_deprecated_lb_policy_; Optional retry_throttling_; const char* health_check_service_name_; diff --git a/src/core/ext/filters/client_channel/resolving_lb_policy.cc b/src/core/ext/filters/client_channel/resolving_lb_policy.cc index 4e383f65dd1..3fe2ee74c92 100644 --- a/src/core/ext/filters/client_channel/resolving_lb_policy.cc +++ b/src/core/ext/filters/client_channel/resolving_lb_policy.cc @@ -184,7 +184,7 @@ class ResolvingLoadBalancingPolicy::ResolvingControlHelper ResolvingLoadBalancingPolicy::ResolvingLoadBalancingPolicy( Args args, TraceFlag* tracer, UniquePtr target_uri, UniquePtr child_policy_name, - RefCountedPtr child_lb_config, + RefCountedPtr child_lb_config, grpc_error** error) : LoadBalancingPolicy(std::move(args)), tracer_(tracer), @@ -333,7 +333,7 @@ void ResolvingLoadBalancingPolicy::OnResolverError(grpc_error* error) { void ResolvingLoadBalancingPolicy::CreateOrUpdateLbPolicyLocked( const char* lb_policy_name, - RefCountedPtr lb_policy_config, + RefCountedPtr lb_policy_config, Resolver::Result result, TraceStringVector* trace_strings) { // If the child policy name changes, we need to create a new child // policy. When this happens, we leave child_policy_ as-is and store @@ -530,7 +530,7 @@ void ResolvingLoadBalancingPolicy::OnResolverResultChangedLocked( const bool resolution_contains_addresses = result.addresses.size() > 0; // Process the resolver result. const char* lb_policy_name = nullptr; - RefCountedPtr lb_policy_config; + RefCountedPtr lb_policy_config; bool service_config_changed = false; char* service_config_error_string = nullptr; if (process_resolver_result_ != nullptr) { diff --git a/src/core/ext/filters/client_channel/resolving_lb_policy.h b/src/core/ext/filters/client_channel/resolving_lb_policy.h index 0ca6c9563f9..cc9f3176cce 100644 --- a/src/core/ext/filters/client_channel/resolving_lb_policy.h +++ b/src/core/ext/filters/client_channel/resolving_lb_policy.h @@ -57,7 +57,7 @@ class ResolvingLoadBalancingPolicy : public LoadBalancingPolicy { ResolvingLoadBalancingPolicy( Args args, TraceFlag* tracer, UniquePtr target_uri, UniquePtr child_policy_name, - RefCountedPtr child_lb_config, + RefCountedPtr child_lb_config, grpc_error** error); // Private ctor, to be used by client_channel only! @@ -70,7 +70,7 @@ class ResolvingLoadBalancingPolicy : public LoadBalancingPolicy { // should set the channel to be in TRANSIENT_FAILURE. typedef bool (*ProcessResolverResultCallback)( void* user_data, Resolver::Result* result, const char** lb_policy_name, - RefCountedPtr* lb_policy_config, + RefCountedPtr* lb_policy_config, grpc_error** service_config_error); // If error is set when this returns, then construction failed, and // the caller may not use the new object. @@ -109,7 +109,7 @@ class ResolvingLoadBalancingPolicy : public LoadBalancingPolicy { void OnResolverError(grpc_error* error); void CreateOrUpdateLbPolicyLocked( const char* lb_policy_name, - RefCountedPtr lb_policy_config, + RefCountedPtr lb_policy_config, Resolver::Result result, TraceStringVector* trace_strings); OrphanablePtr CreateLbPolicyLocked( const char* lb_policy_name, const grpc_channel_args& args, @@ -126,7 +126,7 @@ class ResolvingLoadBalancingPolicy : public LoadBalancingPolicy { ProcessResolverResultCallback process_resolver_result_ = nullptr; void* process_resolver_result_user_data_ = nullptr; UniquePtr child_policy_name_; - RefCountedPtr child_lb_config_; + RefCountedPtr child_lb_config_; // Resolver and associated state. OrphanablePtr resolver_; diff --git a/test/core/util/test_lb_policies.cc b/test/core/util/test_lb_policies.cc index b871f04bc9e..bd28422bcd1 100644 --- a/test/core/util/test_lb_policies.cc +++ b/test/core/util/test_lb_policies.cc @@ -120,10 +120,12 @@ class InterceptRecvTrailingMetadataLoadBalancingPolicy cb_(cb), user_data_(user_data) {} - PickResult Pick(PickArgs* pick, grpc_error** error) override { - PickResult result = delegate_picker_->Pick(pick, error); - if (result == PICK_COMPLETE && pick->connected_subchannel != nullptr) { - New(pick, cb_, user_data_); // deletes itself + PickResult Pick(PickArgs args) override { + PickResult result = delegate_picker_->Pick(args); + if (result.type == PickResult::PICK_COMPLETE && + result.connected_subchannel != nullptr) { + new (args.call_state->Alloc(sizeof(TrailingMetadataHandler))) + TrailingMetadataHandler(&result, cb_, user_data_); } return result; } @@ -169,35 +171,27 @@ class InterceptRecvTrailingMetadataLoadBalancingPolicy class TrailingMetadataHandler { public: - TrailingMetadataHandler(PickArgs* pick, + TrailingMetadataHandler(PickResult* result, InterceptRecvTrailingMetadataCallback cb, void* user_data) : cb_(cb), user_data_(user_data) { - GRPC_CLOSURE_INIT(&recv_trailing_metadata_ready_, - RecordRecvTrailingMetadata, this, - grpc_schedule_on_exec_ctx); - pick->recv_trailing_metadata_ready = &recv_trailing_metadata_ready_; - pick->original_recv_trailing_metadata_ready = - &original_recv_trailing_metadata_ready_; - pick->recv_trailing_metadata = &recv_trailing_metadata_; + result->recv_trailing_metadata_ready = &RecordRecvTrailingMetadata; + result->recv_trailing_metadata_ready_user_data = this; } private: - static void RecordRecvTrailingMetadata(void* arg, grpc_error* err) { + static void RecordRecvTrailingMetadata( + void* arg, grpc_metadata_batch* recv_trailing_metadata, + CallState* call_state) { TrailingMetadataHandler* self = static_cast(arg); - GPR_ASSERT(self->recv_trailing_metadata_ != nullptr); + GPR_ASSERT(recv_trailing_metadata != nullptr); self->cb_(self->user_data_); - GRPC_CLOSURE_SCHED(self->original_recv_trailing_metadata_ready_, - GRPC_ERROR_REF(err)); - Delete(self); + self->~TrailingMetadataHandler(); } InterceptRecvTrailingMetadataCallback cb_; void* user_data_; - grpc_closure recv_trailing_metadata_ready_; - grpc_closure* original_recv_trailing_metadata_ready_ = nullptr; - grpc_metadata_batch* recv_trailing_metadata_ = nullptr; }; }; From 0f83755c6e676d1e0e67b5f99d06e525bd618944 Mon Sep 17 00:00:00 2001 From: Arjun Roy Date: Fri, 10 May 2019 13:57:01 -0700 Subject: [PATCH 67/83] chttp2 hpack encoder: fast-pathed static md/slice ops --- .../chttp2/transport/hpack_encoder.cc | 105 +++-- .../transport/chttp2/transport/hpack_table.cc | 10 - .../transport/chttp2/transport/hpack_table.h | 11 +- src/core/lib/slice/slice.cc | 3 +- src/core/lib/slice/slice_hash_table.h | 4 +- src/core/lib/slice/slice_intern.cc | 21 +- src/core/lib/slice/slice_internal.h | 31 ++ src/core/lib/slice/slice_weak_hash_table.h | 4 +- src/core/lib/surface/server.cc | 10 +- src/core/lib/transport/metadata.cc | 36 +- src/core/lib/transport/metadata.h | 30 +- src/core/lib/transport/static_metadata.cc | 434 ++++++++++------- src/core/lib/transport/static_metadata.h | 435 +++++++++++------- tools/codegen/core/gen_static_metadata.py | 18 +- 14 files changed, 705 insertions(+), 447 deletions(-) diff --git a/src/core/ext/transport/chttp2/transport/hpack_encoder.cc b/src/core/ext/transport/chttp2/transport/hpack_encoder.cc index d2607e97707..65f9ef4a53a 100644 --- a/src/core/ext/transport/chttp2/transport/hpack_encoder.cc +++ b/src/core/ext/transport/chttp2/transport/hpack_encoder.cc @@ -56,7 +56,10 @@ /* don't consider adding anything bigger than this to the hpack table */ #define MAX_DECODER_SPACE_USAGE 512 -static grpc_slice_refcount terminal_slice_refcount; +#define DATA_FRAME_HEADER_SIZE 9 + +static grpc_slice_refcount terminal_slice_refcount( + grpc_slice_refcount::Type::STATIC); static const grpc_slice terminal_slice = { &terminal_slice_refcount, /* refcount */ {{0, nullptr}} /* data.refcounted */ @@ -80,7 +83,8 @@ typedef struct { bool use_true_binary_metadata; } framer_state; -/* fills p (which is expected to be 9 bytes long) with a data frame header */ +/* fills p (which is expected to be DATA_FRAME_HEADER_SIZE bytes long) + * with a data frame header */ static void fill_header(uint8_t* p, uint8_t type, uint32_t id, size_t len, uint8_t flags) { GPR_ASSERT(len < 16777316); @@ -107,15 +111,17 @@ static void finish_frame(framer_state* st, int is_header_boundary, static_cast( (is_last_in_stream ? GRPC_CHTTP2_DATA_FLAG_END_STREAM : 0) | (is_header_boundary ? GRPC_CHTTP2_DATA_FLAG_END_HEADERS : 0))); - st->stats->framing_bytes += 9; + st->stats->framing_bytes += DATA_FRAME_HEADER_SIZE; st->is_first_frame = 0; } /* begin a new frame: reserve off header space, remember how many bytes we'd output before beginning */ static void begin_frame(framer_state* st) { - st->header_idx = - grpc_slice_buffer_add_indexed(st->output, GRPC_SLICE_MALLOC(9)); + grpc_slice reserved; + reserved.refcount = nullptr; + reserved.data.inlined.length = DATA_FRAME_HEADER_SIZE; + st->header_idx = grpc_slice_buffer_add_indexed(st->output, reserved); st->output_length_at_start_of_frame = st->output->length; } @@ -188,8 +194,9 @@ static void evict_entry(grpc_chttp2_hpack_compressor* c) { static uint32_t prepare_space_for_new_elem(grpc_chttp2_hpack_compressor* c, size_t elem_size) { uint32_t new_index = c->tail_remote_index + c->table_elems + 1; - GPR_ASSERT(elem_size < 65536); + GPR_DEBUG_ASSERT(elem_size < 65536); + // TODO(arjunroy): Re-examine semantics if (elem_size > c->max_table_size) { while (c->table_size > 0) { evict_entry(c); @@ -203,6 +210,7 @@ static uint32_t prepare_space_for_new_elem(grpc_chttp2_hpack_compressor* c, while (c->table_size + elem_size > c->max_table_size) { evict_entry(c); } + // TODO(arjunroy): Are we conflating size in bytes vs. membership? GPR_ASSERT(c->table_elems < c->max_table_size); c->table_elem_size[new_index % c->cap_table_elems] = static_cast(elem_size); @@ -215,19 +223,19 @@ static uint32_t prepare_space_for_new_elem(grpc_chttp2_hpack_compressor* c, // Add a key to the dynamic table. Both key and value will be added to table at // the decoder. static void add_key_with_index(grpc_chttp2_hpack_compressor* c, - grpc_mdelem elem, uint32_t new_index) { + grpc_mdelem elem, uint32_t new_index, + uint32_t key_hash) { if (new_index == 0) { return; } - uint32_t key_hash = grpc_slice_hash(GRPC_MDKEY(elem)); - /* Store the key into {entries,indices}_keys */ - if (grpc_slice_eq(c->entries_keys[HASH_FRAGMENT_2(key_hash)], - GRPC_MDKEY(elem))) { + if (grpc_slice_static_interned_equal( + c->entries_keys[HASH_FRAGMENT_2(key_hash)], GRPC_MDKEY(elem))) { c->indices_keys[HASH_FRAGMENT_2(key_hash)] = new_index; - } else if (grpc_slice_eq(c->entries_keys[HASH_FRAGMENT_3(key_hash)], - GRPC_MDKEY(elem))) { + } else if (grpc_slice_static_interned_equal( + c->entries_keys[HASH_FRAGMENT_3(key_hash)], + GRPC_MDKEY(elem))) { c->indices_keys[HASH_FRAGMENT_3(key_hash)] = new_index; } else if (c->entries_keys[HASH_FRAGMENT_2(key_hash)].refcount == &terminal_slice_refcount) { @@ -255,22 +263,20 @@ static void add_key_with_index(grpc_chttp2_hpack_compressor* c, /* add an element to the decoder table */ static void add_elem_with_index(grpc_chttp2_hpack_compressor* c, - grpc_mdelem elem, uint32_t new_index) { + grpc_mdelem elem, uint32_t new_index, + uint32_t elem_hash, uint32_t key_hash) { if (new_index == 0) { return; } - GPR_ASSERT(GRPC_MDELEM_IS_INTERNED(elem)); - - uint32_t key_hash = grpc_slice_hash(GRPC_MDKEY(elem)); - uint32_t value_hash = grpc_slice_hash(GRPC_MDVALUE(elem)); - uint32_t elem_hash = GRPC_MDSTR_KV_HASH(key_hash, value_hash); + GPR_DEBUG_ASSERT(GRPC_MDELEM_IS_INTERNED(elem)); /* Store this element into {entries,indices}_elem */ - if (grpc_mdelem_eq(c->entries_elems[HASH_FRAGMENT_2(elem_hash)], elem)) { + if (grpc_mdelem_both_interned_eq(c->entries_elems[HASH_FRAGMENT_2(elem_hash)], + elem)) { /* already there: update with new index */ c->indices_elems[HASH_FRAGMENT_2(elem_hash)] = new_index; - } else if (grpc_mdelem_eq(c->entries_elems[HASH_FRAGMENT_3(elem_hash)], - elem)) { + } else if (grpc_mdelem_both_interned_eq( + c->entries_elems[HASH_FRAGMENT_3(elem_hash)], elem)) { /* already there (cuckoo): update with new index */ c->indices_elems[HASH_FRAGMENT_3(elem_hash)] = new_index; } else if (GRPC_MDISNULL(c->entries_elems[HASH_FRAGMENT_2(elem_hash)])) { @@ -294,19 +300,19 @@ static void add_elem_with_index(grpc_chttp2_hpack_compressor* c, c->indices_elems[HASH_FRAGMENT_3(elem_hash)] = new_index; } - add_key_with_index(c, elem, new_index); + add_key_with_index(c, elem, new_index, key_hash); } static void add_elem(grpc_chttp2_hpack_compressor* c, grpc_mdelem elem, - size_t elem_size) { + size_t elem_size, uint32_t elem_hash, uint32_t key_hash) { uint32_t new_index = prepare_space_for_new_elem(c, elem_size); - add_elem_with_index(c, elem, new_index); + add_elem_with_index(c, elem, new_index, elem_hash, key_hash); } static void add_key(grpc_chttp2_hpack_compressor* c, grpc_mdelem elem, - size_t elem_size) { + size_t elem_size, uint32_t key_hash) { uint32_t new_index = prepare_space_for_new_elem(c, elem_size); - add_key_with_index(c, elem, new_index); + add_key_with_index(c, elem, new_index, key_hash); } static void emit_indexed(grpc_chttp2_hpack_compressor* c, uint32_t elem_index, @@ -488,27 +494,33 @@ static void hpack_enc(grpc_chttp2_hpack_compressor* c, grpc_mdelem elem, return; } - uint32_t key_hash = grpc_slice_hash(GRPC_MDKEY(elem)); uint32_t elem_hash = 0; if (elem_interned) { - uint32_t value_hash = grpc_slice_hash(GRPC_MDVALUE(elem)); - elem_hash = GRPC_MDSTR_KV_HASH(key_hash, value_hash); + if (GRPC_MDELEM_STORAGE(elem) == GRPC_MDELEM_STORAGE_INTERNED) { + elem_hash = + reinterpret_cast(GRPC_MDELEM_DATA(elem)) + ->hash(); + } else { + elem_hash = + reinterpret_cast(GRPC_MDELEM_DATA(elem)) + ->hash(); + } inc_filter(HASH_FRAGMENT_1(elem_hash), &c->filter_elems_sum, c->filter_elems); /* is this elem currently in the decoders table? */ - - if (grpc_mdelem_eq(c->entries_elems[HASH_FRAGMENT_2(elem_hash)], elem) && + if (grpc_mdelem_both_interned_eq( + c->entries_elems[HASH_FRAGMENT_2(elem_hash)], elem) && c->indices_elems[HASH_FRAGMENT_2(elem_hash)] > c->tail_remote_index) { /* HIT: complete element (first cuckoo hash) */ emit_indexed(c, dynidx(c, c->indices_elems[HASH_FRAGMENT_2(elem_hash)]), st); return; } - - if (grpc_mdelem_eq(c->entries_elems[HASH_FRAGMENT_3(elem_hash)], elem) && + if (grpc_mdelem_both_interned_eq( + c->entries_elems[HASH_FRAGMENT_3(elem_hash)], elem) && c->indices_elems[HASH_FRAGMENT_3(elem_hash)] > c->tail_remote_index) { /* HIT: complete element (second cuckoo hash) */ emit_indexed(c, dynidx(c, c->indices_elems[HASH_FRAGMENT_3(elem_hash)]), @@ -527,11 +539,12 @@ static void hpack_enc(grpc_chttp2_hpack_compressor* c, grpc_mdelem elem, c->filter_elems[HASH_FRAGMENT_1(elem_hash)] >= c->filter_elems_sum / ONE_ON_ADD_PROBABILITY; + uint32_t key_hash = GRPC_MDKEY(elem).refcount->Hash(GRPC_MDKEY(elem)); auto emit_maybe_add = [&should_add_elem, &elem, &st, &c, &indices_key, - &decoder_space_usage] { + &decoder_space_usage, &elem_hash, &key_hash] { if (should_add_elem) { emit_lithdr_incidx(c, dynidx(c, indices_key), elem, st); - add_elem(c, elem, decoder_space_usage); + add_elem(c, elem, decoder_space_usage, elem_hash, key_hash); } else { emit_lithdr_noidx(c, dynidx(c, indices_key), elem, st); } @@ -539,8 +552,8 @@ static void hpack_enc(grpc_chttp2_hpack_compressor* c, grpc_mdelem elem, /* no hits for the elem... maybe there's a key? */ indices_key = c->indices_keys[HASH_FRAGMENT_2(key_hash)]; - if (grpc_slice_eq(c->entries_keys[HASH_FRAGMENT_2(key_hash)], - GRPC_MDKEY(elem)) && + if (grpc_slice_static_interned_equal( + c->entries_keys[HASH_FRAGMENT_2(key_hash)], GRPC_MDKEY(elem)) && indices_key > c->tail_remote_index) { /* HIT: key (first cuckoo hash) */ emit_maybe_add(); @@ -548,8 +561,8 @@ static void hpack_enc(grpc_chttp2_hpack_compressor* c, grpc_mdelem elem, } indices_key = c->indices_keys[HASH_FRAGMENT_3(key_hash)]; - if (grpc_slice_eq(c->entries_keys[HASH_FRAGMENT_3(key_hash)], - GRPC_MDKEY(elem)) && + if (grpc_slice_static_interned_equal( + c->entries_keys[HASH_FRAGMENT_3(key_hash)], GRPC_MDKEY(elem)) && indices_key > c->tail_remote_index) { /* HIT: key (first cuckoo hash) */ emit_maybe_add(); @@ -565,9 +578,9 @@ static void hpack_enc(grpc_chttp2_hpack_compressor* c, grpc_mdelem elem, emit_lithdr_noidx_v(c, 0, elem, st); } if (should_add_elem) { - add_elem(c, elem, decoder_space_usage); + add_elem(c, elem, decoder_space_usage, elem_hash, key_hash); } else if (should_add_key) { - add_key(c, elem, decoder_space_usage); + add_key(c, elem, decoder_space_usage, key_hash); } } @@ -692,18 +705,18 @@ void grpc_chttp2_encode_header(grpc_chttp2_hpack_compressor* c, } for (size_t i = 0; i < extra_headers_size; ++i) { grpc_mdelem md = *extra_headers[i]; - uint8_t static_index = grpc_chttp2_get_static_hpack_table_index(md); + uintptr_t static_index = grpc_chttp2_get_static_hpack_table_index(md); if (static_index) { - emit_indexed(c, static_index, &st); + emit_indexed(c, static_cast(static_index), &st); } else { hpack_enc(c, md, &st); } } grpc_metadata_batch_assert_ok(metadata); for (grpc_linked_mdelem* l = metadata->list.head; l; l = l->next) { - uint8_t static_index = grpc_chttp2_get_static_hpack_table_index(l->md); + uintptr_t static_index = grpc_chttp2_get_static_hpack_table_index(l->md); if (static_index) { - emit_indexed(c, static_index, &st); + emit_indexed(c, static_cast(static_index), &st); } else { hpack_enc(c, l->md, &st); } diff --git a/src/core/ext/transport/chttp2/transport/hpack_table.cc b/src/core/ext/transport/chttp2/transport/hpack_table.cc index 16aeb49df4d..f2cbd26f6b8 100644 --- a/src/core/ext/transport/chttp2/transport/hpack_table.cc +++ b/src/core/ext/transport/chttp2/transport/hpack_table.cc @@ -385,13 +385,3 @@ size_t grpc_chttp2_get_size_in_hpack_table(grpc_mdelem elem, return overhead_and_key + value_len; } } - -uint8_t grpc_chttp2_get_static_hpack_table_index(grpc_mdelem md) { - if (GRPC_MDELEM_STORAGE(md) == GRPC_MDELEM_STORAGE_STATIC) { - uint8_t index = GRPC_MDELEM_DATA(md) - grpc_static_mdelem_table; - if (index < GRPC_CHTTP2_LAST_STATIC_ENTRY) { - return index + 1; // Hpack static metadata element indices start at 1 - } - } - return 0; -} diff --git a/src/core/ext/transport/chttp2/transport/hpack_table.h b/src/core/ext/transport/chttp2/transport/hpack_table.h index a0ffc6fab77..38f8bdda6ae 100644 --- a/src/core/ext/transport/chttp2/transport/hpack_table.h +++ b/src/core/ext/transport/chttp2/transport/hpack_table.h @@ -24,6 +24,7 @@ #include #include "src/core/lib/iomgr/error.h" #include "src/core/lib/transport/metadata.h" +#include "src/core/lib/transport/static_metadata.h" /* HPACK header table */ @@ -90,7 +91,15 @@ size_t grpc_chttp2_get_size_in_hpack_table(grpc_mdelem elem, /* Returns the static hpack table index that corresponds to /a elem. Returns 0 if /a elem is not statically stored or if it is not in the static hpack table */ -uint8_t grpc_chttp2_get_static_hpack_table_index(grpc_mdelem md); +inline uintptr_t grpc_chttp2_get_static_hpack_table_index(grpc_mdelem md) { + uintptr_t index = + reinterpret_cast(GRPC_MDELEM_DATA(md)) - + grpc_static_mdelem_table; + if (index < GRPC_CHTTP2_LAST_STATIC_ENTRY) { + return index + 1; // Hpack static metadata element indices start at 1 + } + return 0; +} /* Find a key/value pair in the table... returns the index in the table of the most similar entry, or 0 if the value was not found */ diff --git a/src/core/lib/slice/slice.cc b/src/core/lib/slice/slice.cc index 75acb28e99c..3a3edebdc7a 100644 --- a/src/core/lib/slice/slice.cc +++ b/src/core/lib/slice/slice.cc @@ -68,7 +68,8 @@ void grpc_slice_unref(grpc_slice slice) { /* grpc_slice_from_static_string support structure - a refcount that does nothing */ -static grpc_slice_refcount NoopRefcount; +static grpc_slice_refcount NoopRefcount = + grpc_slice_refcount(grpc_slice_refcount::Type::NOP); size_t grpc_slice_memory_usage(grpc_slice s) { if (s.refcount == nullptr || s.refcount == &NoopRefcount) { diff --git a/src/core/lib/slice/slice_hash_table.h b/src/core/lib/slice/slice_hash_table.h index 942830a3e9c..c20eca9db77 100644 --- a/src/core/lib/slice/slice_hash_table.h +++ b/src/core/lib/slice/slice_hash_table.h @@ -138,7 +138,7 @@ SliceHashTable::~SliceHashTable() { template void SliceHashTable::Add(const grpc_slice& key, T& value) { - const size_t hash = grpc_slice_hash(key); + const size_t hash = grpc_slice_hash_internal(key); for (size_t offset = 0; offset < size_; ++offset) { const size_t idx = (hash + offset) % size_; if (!entries_[idx].is_set) { @@ -156,7 +156,7 @@ void SliceHashTable::Add(const grpc_slice& key, T& value) { template const T* SliceHashTable::Get(const grpc_slice& key) const { - const size_t hash = grpc_slice_hash(key); + const size_t hash = grpc_slice_hash_internal(key); // We cap the number of probes at the max number recorded when // populating the table. for (size_t offset = 0; offset <= max_num_probes_; ++offset) { diff --git a/src/core/lib/slice/slice_intern.cc b/src/core/lib/slice/slice_intern.cc index 15909d9b96f..81d34ddce25 100644 --- a/src/core/lib/slice/slice_intern.cc +++ b/src/core/lib/slice/slice_intern.cc @@ -128,10 +128,7 @@ int grpc_static_slice_eq(grpc_slice a, grpc_slice b) { return GRPC_STATIC_METADATA_INDEX(a) == GRPC_STATIC_METADATA_INDEX(b); } -uint32_t grpc_slice_hash(grpc_slice s) { - return s.refcount == nullptr ? grpc_slice_default_hash_impl(s) - : s.refcount->Hash(s); -} +uint32_t grpc_slice_hash(grpc_slice s) { return grpc_slice_hash_internal(s); } grpc_slice grpc_slice_maybe_static_intern(grpc_slice slice, bool* returned_slice_is_different) { @@ -139,7 +136,7 @@ grpc_slice grpc_slice_maybe_static_intern(grpc_slice slice, return slice; } - uint32_t hash = grpc_slice_hash(slice); + uint32_t hash = grpc_slice_hash_internal(slice); for (uint32_t i = 0; i <= max_static_metadata_hash_probe; i++) { static_metadata_hash_ent ent = static_metadata_hash[(hash + i) % GPR_ARRAY_SIZE(static_metadata_hash)]; @@ -154,19 +151,13 @@ grpc_slice grpc_slice_maybe_static_intern(grpc_slice slice, return slice; } -bool grpc_slice_is_interned(const grpc_slice& slice) { - return (slice.refcount && - (slice.refcount->GetType() == grpc_slice_refcount::Type::INTERNED || - GRPC_IS_STATIC_METADATA_STRING(slice))); -} - grpc_slice grpc_slice_intern(grpc_slice slice) { GPR_TIMER_SCOPE("grpc_slice_intern", 0); if (GRPC_IS_STATIC_METADATA_STRING(slice)) { return slice; } - uint32_t hash = grpc_slice_hash(slice); + uint32_t hash = grpc_slice_hash_internal(slice); for (uint32_t i = 0; i <= max_static_metadata_hash_probe; i++) { static_metadata_hash_ent ent = @@ -238,7 +229,7 @@ void grpc_slice_intern_init(void) { max_static_metadata_hash_probe = 0; for (size_t i = 0; i < GRPC_STATIC_MDSTR_COUNT; i++) { grpc_static_metadata_hash_values[i] = - grpc_slice_default_hash_impl(grpc_static_slice_table[i]); + grpc_slice_default_hash_internal(grpc_static_slice_table[i]); for (size_t j = 0; j < GPR_ARRAY_SIZE(static_metadata_hash); j++) { size_t slot = (grpc_static_metadata_hash_values[i] + j) % GPR_ARRAY_SIZE(static_metadata_hash); @@ -252,6 +243,10 @@ void grpc_slice_intern_init(void) { } } } + // Handle KV hash for all static mdelems. + for (size_t i = 0; i < GRPC_STATIC_MDELEM_COUNT; ++i) { + grpc_static_mdelem_table[i].HashInit(); + } } void grpc_slice_intern_shutdown(void) { diff --git a/src/core/lib/slice/slice_internal.h b/src/core/lib/slice/slice_internal.h index e4aba015315..23a2f6b81bc 100644 --- a/src/core/lib/slice/slice_internal.h +++ b/src/core/lib/slice/slice_internal.h @@ -99,12 +99,15 @@ struct grpc_slice_refcount { enum class Type { STATIC, // Refcount for a static metadata slice. INTERNED, // Refcount for an interned slice. + NOP, // No-Op REGULAR // Refcount for non-static-metadata, non-interned slices. }; typedef void (*DestroyerFn)(void*); grpc_slice_refcount() = default; + explicit grpc_slice_refcount(Type t) : ref_type_(t) {} + explicit grpc_slice_refcount(grpc_slice_refcount* sub) : sub_refcount_(sub) {} // Regular constructor for grpc_slice_refcount. // @@ -200,6 +203,7 @@ inline int grpc_slice_refcount::Eq(const grpc_slice& a, const grpc_slice& b) { return GRPC_STATIC_METADATA_INDEX(a) == GRPC_STATIC_METADATA_INDEX(b); case Type::INTERNED: return a.refcount == b.refcount; + case Type::NOP: case Type::REGULAR: break; } @@ -217,6 +221,7 @@ inline uint32_t grpc_slice_refcount::Hash(const grpc_slice& slice) { case Type::INTERNED: return reinterpret_cast(slice.refcount) ->hash; + case Type::NOP: case Type::REGULAR: break; } @@ -258,6 +263,17 @@ void grpc_slice_buffer_sub_first(grpc_slice_buffer* sb, size_t begin, /* Check if a slice is interned */ bool grpc_slice_is_interned(const grpc_slice& slice); +inline bool grpc_slice_is_interned(const grpc_slice& slice) { + return (slice.refcount && + (slice.refcount->GetType() == grpc_slice_refcount::Type::INTERNED || + slice.refcount->GetType() == grpc_slice_refcount::Type::STATIC)); +} + +inline bool grpc_slice_static_interned_equal(const grpc_slice& a, + const grpc_slice& b) { + GPR_DEBUG_ASSERT(grpc_slice_is_interned(a) && grpc_slice_is_interned(b)); + return a.refcount == b.refcount; +} void grpc_slice_intern_init(void); void grpc_slice_intern_shutdown(void); @@ -271,6 +287,21 @@ grpc_slice grpc_slice_maybe_static_intern(grpc_slice slice, uint32_t grpc_static_slice_hash(grpc_slice s); int grpc_static_slice_eq(grpc_slice a, grpc_slice b); +inline uint32_t grpc_slice_hash_refcounted(const grpc_slice& s) { + GPR_DEBUG_ASSERT(s.refcount != nullptr); + return s.refcount->Hash(s); +} + +inline uint32_t grpc_slice_default_hash_internal(const grpc_slice& s) { + return gpr_murmur_hash3(GRPC_SLICE_START_PTR(s), GRPC_SLICE_LENGTH(s), + g_hash_seed); +} + +inline uint32_t grpc_slice_hash_internal(const grpc_slice& s) { + return s.refcount == nullptr ? grpc_slice_default_hash_internal(s) + : grpc_slice_hash_refcounted(s); +} + // Returns the memory used by this slice, not counting the slice structure // itself. This means that inlined and slices from static strings will return // 0. All other slices will return the size of the allocated chars. diff --git a/src/core/lib/slice/slice_weak_hash_table.h b/src/core/lib/slice/slice_weak_hash_table.h index 1335c817a39..8c5562bf196 100644 --- a/src/core/lib/slice/slice_weak_hash_table.h +++ b/src/core/lib/slice/slice_weak_hash_table.h @@ -47,7 +47,7 @@ class SliceWeakHashTable : public RefCounted> { /// Add a mapping from \a key to \a value, taking ownership of \a key. This /// operation will always succeed. It may discard older entries. void Add(const grpc_slice& key, T value) { - const size_t idx = grpc_slice_hash(key) % Size; + const size_t idx = grpc_slice_hash_internal(key) % Size; entries_[idx].Set(key, std::move(value)); return; } @@ -55,7 +55,7 @@ class SliceWeakHashTable : public RefCounted> { /// Returns the value from the table associated with / \a key or null if not /// found. const T* Get(const grpc_slice& key) const { - const size_t idx = grpc_slice_hash(key) % Size; + const size_t idx = grpc_slice_hash_internal(key) % Size; const auto& entry = entries_[idx]; return grpc_slice_eq(entry.key(), key) ? entry.value() : nullptr; } diff --git a/src/core/lib/surface/server.cc b/src/core/lib/surface/server.cc index 19f61c548d6..44de0cd42dd 100644 --- a/src/core/lib/surface/server.cc +++ b/src/core/lib/surface/server.cc @@ -625,8 +625,8 @@ static void start_new_rpc(grpc_call_element* elem) { if (chand->registered_methods && calld->path_set && calld->host_set) { /* TODO(ctiller): unify these two searches */ /* check for an exact match with host */ - hash = GRPC_MDSTR_KV_HASH(grpc_slice_hash(calld->host), - grpc_slice_hash(calld->path)); + hash = GRPC_MDSTR_KV_HASH(grpc_slice_hash_internal(calld->host), + grpc_slice_hash_internal(calld->path)); for (i = 0; i <= chand->registered_method_max_probes; i++) { rm = &chand->registered_methods[(hash + i) % chand->registered_method_slots]; @@ -644,7 +644,7 @@ static void start_new_rpc(grpc_call_element* elem) { return; } /* check for a wildcard method definition (no host set) */ - hash = GRPC_MDSTR_KV_HASH(0, grpc_slice_hash(calld->path)); + hash = GRPC_MDSTR_KV_HASH(0, grpc_slice_hash_internal(calld->path)); for (i = 0; i <= chand->registered_method_max_probes; i++) { rm = &chand->registered_methods[(hash + i) % chand->registered_method_slots]; @@ -1200,8 +1200,8 @@ void grpc_server_setup_transport( has_host = false; } method = grpc_slice_intern(grpc_slice_from_static_string(rm->method)); - hash = GRPC_MDSTR_KV_HASH(has_host ? grpc_slice_hash(host) : 0, - grpc_slice_hash(method)); + hash = GRPC_MDSTR_KV_HASH(has_host ? grpc_slice_hash_internal(host) : 0, + grpc_slice_hash_internal(method)); for (probes = 0; chand->registered_methods[(hash + probes) % slots] .server_registered_method != nullptr; probes++) diff --git a/src/core/lib/transport/metadata.cc b/src/core/lib/transport/metadata.cc index 4609eb42cdc..2fdecc99d3e 100644 --- a/src/core/lib/transport/metadata.cc +++ b/src/core/lib/transport/metadata.cc @@ -43,6 +43,7 @@ using grpc_core::AllocatedMetadata; using grpc_core::InternedMetadata; +using grpc_core::StaticMetadata; using grpc_core::UserData; /* There are two kinds of mdelem and mdstr instances. @@ -100,6 +101,12 @@ void grpc_mdelem_trace_unref(void* md, const grpc_slice& key, #define TABLE_IDX(hash, capacity) (((hash) >> (LOG2_SHARD_COUNT)) % (capacity)) #define SHARD_IDX(hash) ((hash) & ((1 << (LOG2_SHARD_COUNT)) - 1)) +void StaticMetadata::HashInit() { + uint32_t k_hash = grpc_slice_hash_internal(kv_.key); + uint32_t v_hash = grpc_slice_hash_internal(kv_.value); + hash_ = GRPC_MDSTR_KV_HASH(k_hash, v_hash); +} + AllocatedMetadata::AllocatedMetadata(const grpc_slice& key, const grpc_slice& value) : key_(grpc_slice_ref_internal(key)), @@ -133,8 +140,8 @@ InternedMetadata::InternedMetadata(const grpc_slice& key, InternedMetadata* next) : key_(grpc_slice_ref_internal(key)), value_(grpc_slice_ref_internal(value)), - refcnt_(1), hash_(hash), + refcnt_(1), link_(next) { #ifndef NDEBUG if (grpc_trace_metadata.enabled()) { @@ -223,11 +230,14 @@ void grpc_mdctx_global_shutdown() { } } +#ifndef NDEBUG static int is_mdelem_static(grpc_mdelem e) { - return GRPC_MDELEM_DATA(e) >= &grpc_static_mdelem_table[0] && - GRPC_MDELEM_DATA(e) < + return reinterpret_cast(GRPC_MDELEM_DATA(e)) >= + &grpc_static_mdelem_table[0] && + reinterpret_cast(GRPC_MDELEM_DATA(e)) < &grpc_static_mdelem_table[GRPC_STATIC_MDELEM_COUNT]; } +#endif void InternedMetadata::RefWithShardLocked(mdtab_shard* shard) { #ifndef NDEBUG @@ -323,8 +333,8 @@ grpc_mdelem grpc_mdelem_create( } } - uint32_t hash = - GRPC_MDSTR_KV_HASH(grpc_slice_hash(key), grpc_slice_hash(value)); + uint32_t hash = GRPC_MDSTR_KV_HASH(grpc_slice_hash_refcounted(key), + grpc_slice_hash_refcounted(value)); InternedMetadata* md; mdtab_shard* shard = &g_shards[SHARD_IDX(hash)]; size_t idx; @@ -391,8 +401,11 @@ void* grpc_mdelem_get_user_data(grpc_mdelem md, void (*destroy_func)(void*)) { case GRPC_MDELEM_STORAGE_EXTERNAL: return nullptr; case GRPC_MDELEM_STORAGE_STATIC: - return (void*)grpc_static_mdelem_user_data[GRPC_MDELEM_DATA(md) - - grpc_static_mdelem_table]; + return reinterpret_cast( + grpc_static_mdelem_user_data + [reinterpret_cast( + GRPC_MDELEM_DATA(md)) - + grpc_static_mdelem_table]); case GRPC_MDELEM_STORAGE_ALLOCATED: { auto* am = reinterpret_cast(GRPC_MDELEM_DATA(md)); return get_user_data(am->user_data(), destroy_func); @@ -430,15 +443,18 @@ void* grpc_mdelem_set_user_data(grpc_mdelem md, void (*destroy_func)(void*), return nullptr; case GRPC_MDELEM_STORAGE_STATIC: destroy_func(data); - return (void*)grpc_static_mdelem_user_data[GRPC_MDELEM_DATA(md) - - grpc_static_mdelem_table]; + return reinterpret_cast( + grpc_static_mdelem_user_data + [reinterpret_cast( + GRPC_MDELEM_DATA(md)) - + grpc_static_mdelem_table]); case GRPC_MDELEM_STORAGE_ALLOCATED: { auto* am = reinterpret_cast(GRPC_MDELEM_DATA(md)); return set_user_data(am->user_data(), destroy_func, data); } case GRPC_MDELEM_STORAGE_INTERNED: { auto* im = reinterpret_cast GRPC_MDELEM_DATA(md); - GPR_ASSERT(!is_mdelem_static(md)); + GPR_DEBUG_ASSERT(!is_mdelem_static(md)); return set_user_data(im->user_data(), destroy_func, data); } } diff --git a/src/core/lib/transport/metadata.h b/src/core/lib/transport/metadata.h index f59476ccc21..74c69f97584 100644 --- a/src/core/lib/transport/metadata.h +++ b/src/core/lib/transport/metadata.h @@ -141,6 +141,16 @@ inline bool grpc_mdelem_static_value_eq(grpc_mdelem a, grpc_mdelem b_static) { if (a.payload == b_static.payload) return true; return grpc_slice_eq_static_interned(GRPC_MDVALUE(a), GRPC_MDVALUE(b_static)); } +#define GRPC_MDISNULL(md) (GRPC_MDELEM_DATA(md) == NULL) + +inline bool grpc_mdelem_both_interned_eq(grpc_mdelem a_interned, + grpc_mdelem b_interned) { + GPR_DEBUG_ASSERT(GRPC_MDELEM_IS_INTERNED(a_interned) || + GRPC_MDISNULL(a_interned)); + GPR_DEBUG_ASSERT(GRPC_MDELEM_IS_INTERNED(b_interned) || + GRPC_MDISNULL(b_interned)); + return a_interned.payload == b_interned.payload; +} /* Mutator and accessor for grpc_mdelem user data. The destructor function is used as a type tag and is checked during user_data fetch. */ @@ -169,6 +179,23 @@ struct UserData { grpc_core::Atomic data; }; +class StaticMetadata { + public: + StaticMetadata(const grpc_slice& key, const grpc_slice& value) + : kv_({key, value}), hash_(0) {} + + const grpc_mdelem_data& data() const { return kv_; } + + void HashInit(); + uint32_t hash() { return hash_; } + + private: + grpc_mdelem_data kv_; + + /* private only data */ + uint32_t hash_; +}; + class InternedMetadata { public: struct BucketLink { @@ -227,8 +254,8 @@ class InternedMetadata { grpc_slice value_; /* private only data */ - grpc_core::Atomic refcnt_; uint32_t hash_; + grpc_core::Atomic refcnt_; UserData user_data_; @@ -344,7 +371,6 @@ inline void grpc_mdelem_unref(grpc_mdelem gmd) { } #define GRPC_MDNULL GRPC_MAKE_MDELEM(NULL, GRPC_MDELEM_STORAGE_EXTERNAL) -#define GRPC_MDISNULL(md) (GRPC_MDELEM_DATA(md) == NULL) /* We add 32 bytes of padding as per RFC-7540 section 6.5.2. */ #define GRPC_MDELEM_LENGTH(e) \ diff --git a/src/core/lib/transport/static_metadata.cc b/src/core/lib/transport/static_metadata.cc index 61ee1d46f77..bbf1736b595 100644 --- a/src/core/lib/transport/static_metadata.cc +++ b/src/core/lib/transport/static_metadata.cc @@ -390,184 +390,270 @@ grpc_mdelem grpc_static_mdelem_for_static_strings(intptr_t a, intptr_t b) { uint32_t h = elems_phash(k); return h < GPR_ARRAY_SIZE(elem_keys) && elem_keys[h] == k && elem_idxs[h] != 255 - ? GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[elem_idxs[h]], + ? GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[elem_idxs[h]].data(), GRPC_MDELEM_STORAGE_STATIC) : GRPC_MDNULL; } -grpc_mdelem_data grpc_static_mdelem_table[GRPC_STATIC_MDELEM_COUNT] = { - {{&grpc_static_metadata_refcounts[3], {{10, g_bytes + 19}}}, - {&grpc_static_metadata_refcounts[29], {{0, g_bytes + 354}}}}, - {{&grpc_static_metadata_refcounts[1], {{7, g_bytes + 5}}}, - {&grpc_static_metadata_refcounts[40], {{3, g_bytes + 612}}}}, - {{&grpc_static_metadata_refcounts[1], {{7, g_bytes + 5}}}, - {&grpc_static_metadata_refcounts[41], {{4, g_bytes + 615}}}}, - {{&grpc_static_metadata_refcounts[0], {{5, g_bytes + 0}}}, - {&grpc_static_metadata_refcounts[42], {{1, g_bytes + 619}}}}, - {{&grpc_static_metadata_refcounts[0], {{5, g_bytes + 0}}}, - {&grpc_static_metadata_refcounts[43], {{11, g_bytes + 620}}}}, - {{&grpc_static_metadata_refcounts[4], {{7, g_bytes + 29}}}, - {&grpc_static_metadata_refcounts[44], {{4, g_bytes + 631}}}}, - {{&grpc_static_metadata_refcounts[4], {{7, g_bytes + 29}}}, - {&grpc_static_metadata_refcounts[45], {{5, g_bytes + 635}}}}, - {{&grpc_static_metadata_refcounts[2], {{7, g_bytes + 12}}}, - {&grpc_static_metadata_refcounts[46], {{3, g_bytes + 640}}}}, - {{&grpc_static_metadata_refcounts[2], {{7, g_bytes + 12}}}, - {&grpc_static_metadata_refcounts[47], {{3, g_bytes + 643}}}}, - {{&grpc_static_metadata_refcounts[2], {{7, g_bytes + 12}}}, - {&grpc_static_metadata_refcounts[48], {{3, g_bytes + 646}}}}, - {{&grpc_static_metadata_refcounts[2], {{7, g_bytes + 12}}}, - {&grpc_static_metadata_refcounts[49], {{3, g_bytes + 649}}}}, - {{&grpc_static_metadata_refcounts[2], {{7, g_bytes + 12}}}, - {&grpc_static_metadata_refcounts[50], {{3, g_bytes + 652}}}}, - {{&grpc_static_metadata_refcounts[2], {{7, g_bytes + 12}}}, - {&grpc_static_metadata_refcounts[51], {{3, g_bytes + 655}}}}, - {{&grpc_static_metadata_refcounts[2], {{7, g_bytes + 12}}}, - {&grpc_static_metadata_refcounts[52], {{3, g_bytes + 658}}}}, - {{&grpc_static_metadata_refcounts[53], {{14, g_bytes + 661}}}, - {&grpc_static_metadata_refcounts[29], {{0, g_bytes + 354}}}}, - {{&grpc_static_metadata_refcounts[16], {{15, g_bytes + 186}}}, - {&grpc_static_metadata_refcounts[54], {{13, g_bytes + 675}}}}, - {{&grpc_static_metadata_refcounts[55], {{15, g_bytes + 688}}}, - {&grpc_static_metadata_refcounts[29], {{0, g_bytes + 354}}}}, - {{&grpc_static_metadata_refcounts[56], {{13, g_bytes + 703}}}, - {&grpc_static_metadata_refcounts[29], {{0, g_bytes + 354}}}}, - {{&grpc_static_metadata_refcounts[57], {{6, g_bytes + 716}}}, - {&grpc_static_metadata_refcounts[29], {{0, g_bytes + 354}}}}, - {{&grpc_static_metadata_refcounts[58], {{27, g_bytes + 722}}}, - {&grpc_static_metadata_refcounts[29], {{0, g_bytes + 354}}}}, - {{&grpc_static_metadata_refcounts[59], {{3, g_bytes + 749}}}, - {&grpc_static_metadata_refcounts[29], {{0, g_bytes + 354}}}}, - {{&grpc_static_metadata_refcounts[60], {{5, g_bytes + 752}}}, - {&grpc_static_metadata_refcounts[29], {{0, g_bytes + 354}}}}, - {{&grpc_static_metadata_refcounts[61], {{13, g_bytes + 757}}}, - {&grpc_static_metadata_refcounts[29], {{0, g_bytes + 354}}}}, - {{&grpc_static_metadata_refcounts[62], {{13, g_bytes + 770}}}, - {&grpc_static_metadata_refcounts[29], {{0, g_bytes + 354}}}}, - {{&grpc_static_metadata_refcounts[63], {{19, g_bytes + 783}}}, - {&grpc_static_metadata_refcounts[29], {{0, g_bytes + 354}}}}, - {{&grpc_static_metadata_refcounts[15], {{16, g_bytes + 170}}}, - {&grpc_static_metadata_refcounts[29], {{0, g_bytes + 354}}}}, - {{&grpc_static_metadata_refcounts[64], {{16, g_bytes + 802}}}, - {&grpc_static_metadata_refcounts[29], {{0, g_bytes + 354}}}}, - {{&grpc_static_metadata_refcounts[65], {{14, g_bytes + 818}}}, - {&grpc_static_metadata_refcounts[29], {{0, g_bytes + 354}}}}, - {{&grpc_static_metadata_refcounts[66], {{16, g_bytes + 832}}}, - {&grpc_static_metadata_refcounts[29], {{0, g_bytes + 354}}}}, - {{&grpc_static_metadata_refcounts[67], {{13, g_bytes + 848}}}, - {&grpc_static_metadata_refcounts[29], {{0, g_bytes + 354}}}}, - {{&grpc_static_metadata_refcounts[14], {{12, g_bytes + 158}}}, - {&grpc_static_metadata_refcounts[29], {{0, g_bytes + 354}}}}, - {{&grpc_static_metadata_refcounts[68], {{6, g_bytes + 861}}}, - {&grpc_static_metadata_refcounts[29], {{0, g_bytes + 354}}}}, - {{&grpc_static_metadata_refcounts[69], {{4, g_bytes + 867}}}, - {&grpc_static_metadata_refcounts[29], {{0, g_bytes + 354}}}}, - {{&grpc_static_metadata_refcounts[70], {{4, g_bytes + 871}}}, - {&grpc_static_metadata_refcounts[29], {{0, g_bytes + 354}}}}, - {{&grpc_static_metadata_refcounts[71], {{6, g_bytes + 875}}}, - {&grpc_static_metadata_refcounts[29], {{0, g_bytes + 354}}}}, - {{&grpc_static_metadata_refcounts[72], {{7, g_bytes + 881}}}, - {&grpc_static_metadata_refcounts[29], {{0, g_bytes + 354}}}}, - {{&grpc_static_metadata_refcounts[73], {{4, g_bytes + 888}}}, - {&grpc_static_metadata_refcounts[29], {{0, g_bytes + 354}}}}, - {{&grpc_static_metadata_refcounts[20], {{4, g_bytes + 278}}}, - {&grpc_static_metadata_refcounts[29], {{0, g_bytes + 354}}}}, - {{&grpc_static_metadata_refcounts[74], {{8, g_bytes + 892}}}, - {&grpc_static_metadata_refcounts[29], {{0, g_bytes + 354}}}}, - {{&grpc_static_metadata_refcounts[75], {{17, g_bytes + 900}}}, - {&grpc_static_metadata_refcounts[29], {{0, g_bytes + 354}}}}, - {{&grpc_static_metadata_refcounts[76], {{13, g_bytes + 917}}}, - {&grpc_static_metadata_refcounts[29], {{0, g_bytes + 354}}}}, - {{&grpc_static_metadata_refcounts[77], {{8, g_bytes + 930}}}, - {&grpc_static_metadata_refcounts[29], {{0, g_bytes + 354}}}}, - {{&grpc_static_metadata_refcounts[78], {{19, g_bytes + 938}}}, - {&grpc_static_metadata_refcounts[29], {{0, g_bytes + 354}}}}, - {{&grpc_static_metadata_refcounts[79], {{13, g_bytes + 957}}}, - {&grpc_static_metadata_refcounts[29], {{0, g_bytes + 354}}}}, - {{&grpc_static_metadata_refcounts[80], {{4, g_bytes + 970}}}, - {&grpc_static_metadata_refcounts[29], {{0, g_bytes + 354}}}}, - {{&grpc_static_metadata_refcounts[81], {{8, g_bytes + 974}}}, - {&grpc_static_metadata_refcounts[29], {{0, g_bytes + 354}}}}, - {{&grpc_static_metadata_refcounts[82], {{12, g_bytes + 982}}}, - {&grpc_static_metadata_refcounts[29], {{0, g_bytes + 354}}}}, - {{&grpc_static_metadata_refcounts[83], {{18, g_bytes + 994}}}, - {&grpc_static_metadata_refcounts[29], {{0, g_bytes + 354}}}}, - {{&grpc_static_metadata_refcounts[84], {{19, g_bytes + 1012}}}, - {&grpc_static_metadata_refcounts[29], {{0, g_bytes + 354}}}}, - {{&grpc_static_metadata_refcounts[85], {{5, g_bytes + 1031}}}, - {&grpc_static_metadata_refcounts[29], {{0, g_bytes + 354}}}}, - {{&grpc_static_metadata_refcounts[86], {{7, g_bytes + 1036}}}, - {&grpc_static_metadata_refcounts[29], {{0, g_bytes + 354}}}}, - {{&grpc_static_metadata_refcounts[87], {{7, g_bytes + 1043}}}, - {&grpc_static_metadata_refcounts[29], {{0, g_bytes + 354}}}}, - {{&grpc_static_metadata_refcounts[88], {{11, g_bytes + 1050}}}, - {&grpc_static_metadata_refcounts[29], {{0, g_bytes + 354}}}}, - {{&grpc_static_metadata_refcounts[89], {{6, g_bytes + 1061}}}, - {&grpc_static_metadata_refcounts[29], {{0, g_bytes + 354}}}}, - {{&grpc_static_metadata_refcounts[90], {{10, g_bytes + 1067}}}, - {&grpc_static_metadata_refcounts[29], {{0, g_bytes + 354}}}}, - {{&grpc_static_metadata_refcounts[91], {{25, g_bytes + 1077}}}, - {&grpc_static_metadata_refcounts[29], {{0, g_bytes + 354}}}}, - {{&grpc_static_metadata_refcounts[92], {{17, g_bytes + 1102}}}, - {&grpc_static_metadata_refcounts[29], {{0, g_bytes + 354}}}}, - {{&grpc_static_metadata_refcounts[19], {{10, g_bytes + 268}}}, - {&grpc_static_metadata_refcounts[29], {{0, g_bytes + 354}}}}, - {{&grpc_static_metadata_refcounts[93], {{4, g_bytes + 1119}}}, - {&grpc_static_metadata_refcounts[29], {{0, g_bytes + 354}}}}, - {{&grpc_static_metadata_refcounts[94], {{3, g_bytes + 1123}}}, - {&grpc_static_metadata_refcounts[29], {{0, g_bytes + 354}}}}, - {{&grpc_static_metadata_refcounts[95], {{16, g_bytes + 1126}}}, - {&grpc_static_metadata_refcounts[29], {{0, g_bytes + 354}}}}, - {{&grpc_static_metadata_refcounts[7], {{11, g_bytes + 50}}}, - {&grpc_static_metadata_refcounts[96], {{1, g_bytes + 1142}}}}, - {{&grpc_static_metadata_refcounts[7], {{11, g_bytes + 50}}}, - {&grpc_static_metadata_refcounts[25], {{1, g_bytes + 350}}}}, - {{&grpc_static_metadata_refcounts[7], {{11, g_bytes + 50}}}, - {&grpc_static_metadata_refcounts[26], {{1, g_bytes + 351}}}}, - {{&grpc_static_metadata_refcounts[9], {{13, g_bytes + 77}}}, - {&grpc_static_metadata_refcounts[97], {{8, g_bytes + 1143}}}}, - {{&grpc_static_metadata_refcounts[9], {{13, g_bytes + 77}}}, - {&grpc_static_metadata_refcounts[38], {{4, g_bytes + 597}}}}, - {{&grpc_static_metadata_refcounts[9], {{13, g_bytes + 77}}}, - {&grpc_static_metadata_refcounts[37], {{7, g_bytes + 590}}}}, - {{&grpc_static_metadata_refcounts[5], {{2, g_bytes + 36}}}, - {&grpc_static_metadata_refcounts[98], {{8, g_bytes + 1151}}}}, - {{&grpc_static_metadata_refcounts[14], {{12, g_bytes + 158}}}, - {&grpc_static_metadata_refcounts[99], {{16, g_bytes + 1159}}}}, - {{&grpc_static_metadata_refcounts[4], {{7, g_bytes + 29}}}, - {&grpc_static_metadata_refcounts[100], {{4, g_bytes + 1175}}}}, - {{&grpc_static_metadata_refcounts[1], {{7, g_bytes + 5}}}, - {&grpc_static_metadata_refcounts[101], {{3, g_bytes + 1179}}}}, - {{&grpc_static_metadata_refcounts[16], {{15, g_bytes + 186}}}, - {&grpc_static_metadata_refcounts[29], {{0, g_bytes + 354}}}}, - {{&grpc_static_metadata_refcounts[15], {{16, g_bytes + 170}}}, - {&grpc_static_metadata_refcounts[97], {{8, g_bytes + 1143}}}}, - {{&grpc_static_metadata_refcounts[15], {{16, g_bytes + 170}}}, - {&grpc_static_metadata_refcounts[38], {{4, g_bytes + 597}}}}, - {{&grpc_static_metadata_refcounts[21], {{8, g_bytes + 282}}}, - {&grpc_static_metadata_refcounts[29], {{0, g_bytes + 354}}}}, - {{&grpc_static_metadata_refcounts[102], {{11, g_bytes + 1182}}}, - {&grpc_static_metadata_refcounts[29], {{0, g_bytes + 354}}}}, - {{&grpc_static_metadata_refcounts[10], {{20, g_bytes + 90}}}, - {&grpc_static_metadata_refcounts[97], {{8, g_bytes + 1143}}}}, - {{&grpc_static_metadata_refcounts[10], {{20, g_bytes + 90}}}, - {&grpc_static_metadata_refcounts[37], {{7, g_bytes + 590}}}}, - {{&grpc_static_metadata_refcounts[10], {{20, g_bytes + 90}}}, - {&grpc_static_metadata_refcounts[103], {{16, g_bytes + 1193}}}}, - {{&grpc_static_metadata_refcounts[10], {{20, g_bytes + 90}}}, - {&grpc_static_metadata_refcounts[38], {{4, g_bytes + 597}}}}, - {{&grpc_static_metadata_refcounts[10], {{20, g_bytes + 90}}}, - {&grpc_static_metadata_refcounts[104], {{13, g_bytes + 1209}}}}, - {{&grpc_static_metadata_refcounts[10], {{20, g_bytes + 90}}}, - {&grpc_static_metadata_refcounts[105], {{12, g_bytes + 1222}}}}, - {{&grpc_static_metadata_refcounts[10], {{20, g_bytes + 90}}}, - {&grpc_static_metadata_refcounts[106], {{21, g_bytes + 1234}}}}, - {{&grpc_static_metadata_refcounts[16], {{15, g_bytes + 186}}}, - {&grpc_static_metadata_refcounts[97], {{8, g_bytes + 1143}}}}, - {{&grpc_static_metadata_refcounts[16], {{15, g_bytes + 186}}}, - {&grpc_static_metadata_refcounts[38], {{4, g_bytes + 597}}}}, - {{&grpc_static_metadata_refcounts[16], {{15, g_bytes + 186}}}, - {&grpc_static_metadata_refcounts[104], {{13, g_bytes + 1209}}}}, +grpc_core::StaticMetadata grpc_static_mdelem_table[GRPC_STATIC_MDELEM_COUNT] = { + grpc_core::StaticMetadata( + {&grpc_static_metadata_refcounts[3], {{10, g_bytes + 19}}}, + {&grpc_static_metadata_refcounts[29], {{0, g_bytes + 354}}}), + grpc_core::StaticMetadata( + {&grpc_static_metadata_refcounts[1], {{7, g_bytes + 5}}}, + {&grpc_static_metadata_refcounts[40], {{3, g_bytes + 612}}}), + grpc_core::StaticMetadata( + {&grpc_static_metadata_refcounts[1], {{7, g_bytes + 5}}}, + {&grpc_static_metadata_refcounts[41], {{4, g_bytes + 615}}}), + grpc_core::StaticMetadata( + {&grpc_static_metadata_refcounts[0], {{5, g_bytes + 0}}}, + {&grpc_static_metadata_refcounts[42], {{1, g_bytes + 619}}}), + grpc_core::StaticMetadata( + {&grpc_static_metadata_refcounts[0], {{5, g_bytes + 0}}}, + {&grpc_static_metadata_refcounts[43], {{11, g_bytes + 620}}}), + grpc_core::StaticMetadata( + {&grpc_static_metadata_refcounts[4], {{7, g_bytes + 29}}}, + {&grpc_static_metadata_refcounts[44], {{4, g_bytes + 631}}}), + grpc_core::StaticMetadata( + {&grpc_static_metadata_refcounts[4], {{7, g_bytes + 29}}}, + {&grpc_static_metadata_refcounts[45], {{5, g_bytes + 635}}}), + grpc_core::StaticMetadata( + {&grpc_static_metadata_refcounts[2], {{7, g_bytes + 12}}}, + {&grpc_static_metadata_refcounts[46], {{3, g_bytes + 640}}}), + grpc_core::StaticMetadata( + {&grpc_static_metadata_refcounts[2], {{7, g_bytes + 12}}}, + {&grpc_static_metadata_refcounts[47], {{3, g_bytes + 643}}}), + grpc_core::StaticMetadata( + {&grpc_static_metadata_refcounts[2], {{7, g_bytes + 12}}}, + {&grpc_static_metadata_refcounts[48], {{3, g_bytes + 646}}}), + grpc_core::StaticMetadata( + {&grpc_static_metadata_refcounts[2], {{7, g_bytes + 12}}}, + {&grpc_static_metadata_refcounts[49], {{3, g_bytes + 649}}}), + grpc_core::StaticMetadata( + {&grpc_static_metadata_refcounts[2], {{7, g_bytes + 12}}}, + {&grpc_static_metadata_refcounts[50], {{3, g_bytes + 652}}}), + grpc_core::StaticMetadata( + {&grpc_static_metadata_refcounts[2], {{7, g_bytes + 12}}}, + {&grpc_static_metadata_refcounts[51], {{3, g_bytes + 655}}}), + grpc_core::StaticMetadata( + {&grpc_static_metadata_refcounts[2], {{7, g_bytes + 12}}}, + {&grpc_static_metadata_refcounts[52], {{3, g_bytes + 658}}}), + grpc_core::StaticMetadata( + {&grpc_static_metadata_refcounts[53], {{14, g_bytes + 661}}}, + {&grpc_static_metadata_refcounts[29], {{0, g_bytes + 354}}}), + grpc_core::StaticMetadata( + {&grpc_static_metadata_refcounts[16], {{15, g_bytes + 186}}}, + {&grpc_static_metadata_refcounts[54], {{13, g_bytes + 675}}}), + grpc_core::StaticMetadata( + {&grpc_static_metadata_refcounts[55], {{15, g_bytes + 688}}}, + {&grpc_static_metadata_refcounts[29], {{0, g_bytes + 354}}}), + grpc_core::StaticMetadata( + {&grpc_static_metadata_refcounts[56], {{13, g_bytes + 703}}}, + {&grpc_static_metadata_refcounts[29], {{0, g_bytes + 354}}}), + grpc_core::StaticMetadata( + {&grpc_static_metadata_refcounts[57], {{6, g_bytes + 716}}}, + {&grpc_static_metadata_refcounts[29], {{0, g_bytes + 354}}}), + grpc_core::StaticMetadata( + {&grpc_static_metadata_refcounts[58], {{27, g_bytes + 722}}}, + {&grpc_static_metadata_refcounts[29], {{0, g_bytes + 354}}}), + grpc_core::StaticMetadata( + {&grpc_static_metadata_refcounts[59], {{3, g_bytes + 749}}}, + {&grpc_static_metadata_refcounts[29], {{0, g_bytes + 354}}}), + grpc_core::StaticMetadata( + {&grpc_static_metadata_refcounts[60], {{5, g_bytes + 752}}}, + {&grpc_static_metadata_refcounts[29], {{0, g_bytes + 354}}}), + grpc_core::StaticMetadata( + {&grpc_static_metadata_refcounts[61], {{13, g_bytes + 757}}}, + {&grpc_static_metadata_refcounts[29], {{0, g_bytes + 354}}}), + grpc_core::StaticMetadata( + {&grpc_static_metadata_refcounts[62], {{13, g_bytes + 770}}}, + {&grpc_static_metadata_refcounts[29], {{0, g_bytes + 354}}}), + grpc_core::StaticMetadata( + {&grpc_static_metadata_refcounts[63], {{19, g_bytes + 783}}}, + {&grpc_static_metadata_refcounts[29], {{0, g_bytes + 354}}}), + grpc_core::StaticMetadata( + {&grpc_static_metadata_refcounts[15], {{16, g_bytes + 170}}}, + {&grpc_static_metadata_refcounts[29], {{0, g_bytes + 354}}}), + grpc_core::StaticMetadata( + {&grpc_static_metadata_refcounts[64], {{16, g_bytes + 802}}}, + {&grpc_static_metadata_refcounts[29], {{0, g_bytes + 354}}}), + grpc_core::StaticMetadata( + {&grpc_static_metadata_refcounts[65], {{14, g_bytes + 818}}}, + {&grpc_static_metadata_refcounts[29], {{0, g_bytes + 354}}}), + grpc_core::StaticMetadata( + {&grpc_static_metadata_refcounts[66], {{16, g_bytes + 832}}}, + {&grpc_static_metadata_refcounts[29], {{0, g_bytes + 354}}}), + grpc_core::StaticMetadata( + {&grpc_static_metadata_refcounts[67], {{13, g_bytes + 848}}}, + {&grpc_static_metadata_refcounts[29], {{0, g_bytes + 354}}}), + grpc_core::StaticMetadata( + {&grpc_static_metadata_refcounts[14], {{12, g_bytes + 158}}}, + {&grpc_static_metadata_refcounts[29], {{0, g_bytes + 354}}}), + grpc_core::StaticMetadata( + {&grpc_static_metadata_refcounts[68], {{6, g_bytes + 861}}}, + {&grpc_static_metadata_refcounts[29], {{0, g_bytes + 354}}}), + grpc_core::StaticMetadata( + {&grpc_static_metadata_refcounts[69], {{4, g_bytes + 867}}}, + {&grpc_static_metadata_refcounts[29], {{0, g_bytes + 354}}}), + grpc_core::StaticMetadata( + {&grpc_static_metadata_refcounts[70], {{4, g_bytes + 871}}}, + {&grpc_static_metadata_refcounts[29], {{0, g_bytes + 354}}}), + grpc_core::StaticMetadata( + {&grpc_static_metadata_refcounts[71], {{6, g_bytes + 875}}}, + {&grpc_static_metadata_refcounts[29], {{0, g_bytes + 354}}}), + grpc_core::StaticMetadata( + {&grpc_static_metadata_refcounts[72], {{7, g_bytes + 881}}}, + {&grpc_static_metadata_refcounts[29], {{0, g_bytes + 354}}}), + grpc_core::StaticMetadata( + {&grpc_static_metadata_refcounts[73], {{4, g_bytes + 888}}}, + {&grpc_static_metadata_refcounts[29], {{0, g_bytes + 354}}}), + grpc_core::StaticMetadata( + {&grpc_static_metadata_refcounts[20], {{4, g_bytes + 278}}}, + {&grpc_static_metadata_refcounts[29], {{0, g_bytes + 354}}}), + grpc_core::StaticMetadata( + {&grpc_static_metadata_refcounts[74], {{8, g_bytes + 892}}}, + {&grpc_static_metadata_refcounts[29], {{0, g_bytes + 354}}}), + grpc_core::StaticMetadata( + {&grpc_static_metadata_refcounts[75], {{17, g_bytes + 900}}}, + {&grpc_static_metadata_refcounts[29], {{0, g_bytes + 354}}}), + grpc_core::StaticMetadata( + {&grpc_static_metadata_refcounts[76], {{13, g_bytes + 917}}}, + {&grpc_static_metadata_refcounts[29], {{0, g_bytes + 354}}}), + grpc_core::StaticMetadata( + {&grpc_static_metadata_refcounts[77], {{8, g_bytes + 930}}}, + {&grpc_static_metadata_refcounts[29], {{0, g_bytes + 354}}}), + grpc_core::StaticMetadata( + {&grpc_static_metadata_refcounts[78], {{19, g_bytes + 938}}}, + {&grpc_static_metadata_refcounts[29], {{0, g_bytes + 354}}}), + grpc_core::StaticMetadata( + {&grpc_static_metadata_refcounts[79], {{13, g_bytes + 957}}}, + {&grpc_static_metadata_refcounts[29], {{0, g_bytes + 354}}}), + grpc_core::StaticMetadata( + {&grpc_static_metadata_refcounts[80], {{4, g_bytes + 970}}}, + {&grpc_static_metadata_refcounts[29], {{0, g_bytes + 354}}}), + grpc_core::StaticMetadata( + {&grpc_static_metadata_refcounts[81], {{8, g_bytes + 974}}}, + {&grpc_static_metadata_refcounts[29], {{0, g_bytes + 354}}}), + grpc_core::StaticMetadata( + {&grpc_static_metadata_refcounts[82], {{12, g_bytes + 982}}}, + {&grpc_static_metadata_refcounts[29], {{0, g_bytes + 354}}}), + grpc_core::StaticMetadata( + {&grpc_static_metadata_refcounts[83], {{18, g_bytes + 994}}}, + {&grpc_static_metadata_refcounts[29], {{0, g_bytes + 354}}}), + grpc_core::StaticMetadata( + {&grpc_static_metadata_refcounts[84], {{19, g_bytes + 1012}}}, + {&grpc_static_metadata_refcounts[29], {{0, g_bytes + 354}}}), + grpc_core::StaticMetadata( + {&grpc_static_metadata_refcounts[85], {{5, g_bytes + 1031}}}, + {&grpc_static_metadata_refcounts[29], {{0, g_bytes + 354}}}), + grpc_core::StaticMetadata( + {&grpc_static_metadata_refcounts[86], {{7, g_bytes + 1036}}}, + {&grpc_static_metadata_refcounts[29], {{0, g_bytes + 354}}}), + grpc_core::StaticMetadata( + {&grpc_static_metadata_refcounts[87], {{7, g_bytes + 1043}}}, + {&grpc_static_metadata_refcounts[29], {{0, g_bytes + 354}}}), + grpc_core::StaticMetadata( + {&grpc_static_metadata_refcounts[88], {{11, g_bytes + 1050}}}, + {&grpc_static_metadata_refcounts[29], {{0, g_bytes + 354}}}), + grpc_core::StaticMetadata( + {&grpc_static_metadata_refcounts[89], {{6, g_bytes + 1061}}}, + {&grpc_static_metadata_refcounts[29], {{0, g_bytes + 354}}}), + grpc_core::StaticMetadata( + {&grpc_static_metadata_refcounts[90], {{10, g_bytes + 1067}}}, + {&grpc_static_metadata_refcounts[29], {{0, g_bytes + 354}}}), + grpc_core::StaticMetadata( + {&grpc_static_metadata_refcounts[91], {{25, g_bytes + 1077}}}, + {&grpc_static_metadata_refcounts[29], {{0, g_bytes + 354}}}), + grpc_core::StaticMetadata( + {&grpc_static_metadata_refcounts[92], {{17, g_bytes + 1102}}}, + {&grpc_static_metadata_refcounts[29], {{0, g_bytes + 354}}}), + grpc_core::StaticMetadata( + {&grpc_static_metadata_refcounts[19], {{10, g_bytes + 268}}}, + {&grpc_static_metadata_refcounts[29], {{0, g_bytes + 354}}}), + grpc_core::StaticMetadata( + {&grpc_static_metadata_refcounts[93], {{4, g_bytes + 1119}}}, + {&grpc_static_metadata_refcounts[29], {{0, g_bytes + 354}}}), + grpc_core::StaticMetadata( + {&grpc_static_metadata_refcounts[94], {{3, g_bytes + 1123}}}, + {&grpc_static_metadata_refcounts[29], {{0, g_bytes + 354}}}), + grpc_core::StaticMetadata( + {&grpc_static_metadata_refcounts[95], {{16, g_bytes + 1126}}}, + {&grpc_static_metadata_refcounts[29], {{0, g_bytes + 354}}}), + grpc_core::StaticMetadata( + {&grpc_static_metadata_refcounts[7], {{11, g_bytes + 50}}}, + {&grpc_static_metadata_refcounts[96], {{1, g_bytes + 1142}}}), + grpc_core::StaticMetadata( + {&grpc_static_metadata_refcounts[7], {{11, g_bytes + 50}}}, + {&grpc_static_metadata_refcounts[25], {{1, g_bytes + 350}}}), + grpc_core::StaticMetadata( + {&grpc_static_metadata_refcounts[7], {{11, g_bytes + 50}}}, + {&grpc_static_metadata_refcounts[26], {{1, g_bytes + 351}}}), + grpc_core::StaticMetadata( + {&grpc_static_metadata_refcounts[9], {{13, g_bytes + 77}}}, + {&grpc_static_metadata_refcounts[97], {{8, g_bytes + 1143}}}), + grpc_core::StaticMetadata( + {&grpc_static_metadata_refcounts[9], {{13, g_bytes + 77}}}, + {&grpc_static_metadata_refcounts[38], {{4, g_bytes + 597}}}), + grpc_core::StaticMetadata( + {&grpc_static_metadata_refcounts[9], {{13, g_bytes + 77}}}, + {&grpc_static_metadata_refcounts[37], {{7, g_bytes + 590}}}), + grpc_core::StaticMetadata( + {&grpc_static_metadata_refcounts[5], {{2, g_bytes + 36}}}, + {&grpc_static_metadata_refcounts[98], {{8, g_bytes + 1151}}}), + grpc_core::StaticMetadata( + {&grpc_static_metadata_refcounts[14], {{12, g_bytes + 158}}}, + {&grpc_static_metadata_refcounts[99], {{16, g_bytes + 1159}}}), + grpc_core::StaticMetadata( + {&grpc_static_metadata_refcounts[4], {{7, g_bytes + 29}}}, + {&grpc_static_metadata_refcounts[100], {{4, g_bytes + 1175}}}), + grpc_core::StaticMetadata( + {&grpc_static_metadata_refcounts[1], {{7, g_bytes + 5}}}, + {&grpc_static_metadata_refcounts[101], {{3, g_bytes + 1179}}}), + grpc_core::StaticMetadata( + {&grpc_static_metadata_refcounts[16], {{15, g_bytes + 186}}}, + {&grpc_static_metadata_refcounts[29], {{0, g_bytes + 354}}}), + grpc_core::StaticMetadata( + {&grpc_static_metadata_refcounts[15], {{16, g_bytes + 170}}}, + {&grpc_static_metadata_refcounts[97], {{8, g_bytes + 1143}}}), + grpc_core::StaticMetadata( + {&grpc_static_metadata_refcounts[15], {{16, g_bytes + 170}}}, + {&grpc_static_metadata_refcounts[38], {{4, g_bytes + 597}}}), + grpc_core::StaticMetadata( + {&grpc_static_metadata_refcounts[21], {{8, g_bytes + 282}}}, + {&grpc_static_metadata_refcounts[29], {{0, g_bytes + 354}}}), + grpc_core::StaticMetadata( + {&grpc_static_metadata_refcounts[102], {{11, g_bytes + 1182}}}, + {&grpc_static_metadata_refcounts[29], {{0, g_bytes + 354}}}), + grpc_core::StaticMetadata( + {&grpc_static_metadata_refcounts[10], {{20, g_bytes + 90}}}, + {&grpc_static_metadata_refcounts[97], {{8, g_bytes + 1143}}}), + grpc_core::StaticMetadata( + {&grpc_static_metadata_refcounts[10], {{20, g_bytes + 90}}}, + {&grpc_static_metadata_refcounts[37], {{7, g_bytes + 590}}}), + grpc_core::StaticMetadata( + {&grpc_static_metadata_refcounts[10], {{20, g_bytes + 90}}}, + {&grpc_static_metadata_refcounts[103], {{16, g_bytes + 1193}}}), + grpc_core::StaticMetadata( + {&grpc_static_metadata_refcounts[10], {{20, g_bytes + 90}}}, + {&grpc_static_metadata_refcounts[38], {{4, g_bytes + 597}}}), + grpc_core::StaticMetadata( + {&grpc_static_metadata_refcounts[10], {{20, g_bytes + 90}}}, + {&grpc_static_metadata_refcounts[104], {{13, g_bytes + 1209}}}), + grpc_core::StaticMetadata( + {&grpc_static_metadata_refcounts[10], {{20, g_bytes + 90}}}, + {&grpc_static_metadata_refcounts[105], {{12, g_bytes + 1222}}}), + grpc_core::StaticMetadata( + {&grpc_static_metadata_refcounts[10], {{20, g_bytes + 90}}}, + {&grpc_static_metadata_refcounts[106], {{21, g_bytes + 1234}}}), + grpc_core::StaticMetadata( + {&grpc_static_metadata_refcounts[16], {{15, g_bytes + 186}}}, + {&grpc_static_metadata_refcounts[97], {{8, g_bytes + 1143}}}), + grpc_core::StaticMetadata( + {&grpc_static_metadata_refcounts[16], {{15, g_bytes + 186}}}, + {&grpc_static_metadata_refcounts[38], {{4, g_bytes + 597}}}), + grpc_core::StaticMetadata( + {&grpc_static_metadata_refcounts[16], {{15, g_bytes + 186}}}, + {&grpc_static_metadata_refcounts[104], {{13, g_bytes + 1209}}}), }; const uint8_t grpc_static_accept_encoding_metadata[8] = {0, 76, 77, 78, 79, 80, 81, 82}; diff --git a/src/core/lib/transport/static_metadata.h b/src/core/lib/transport/static_metadata.h index a3f23de0953..800ee04d6f9 100644 --- a/src/core/lib/transport/static_metadata.h +++ b/src/core/lib/transport/static_metadata.h @@ -269,266 +269,353 @@ extern grpc_slice_refcount ((static_slice).refcount - grpc_static_metadata_refcounts))) #define GRPC_STATIC_MDELEM_COUNT 86 -extern grpc_mdelem_data grpc_static_mdelem_table[GRPC_STATIC_MDELEM_COUNT]; +extern grpc_core::StaticMetadata + grpc_static_mdelem_table[GRPC_STATIC_MDELEM_COUNT]; extern uintptr_t grpc_static_mdelem_user_data[GRPC_STATIC_MDELEM_COUNT]; /* ":authority": "" */ -#define GRPC_MDELEM_AUTHORITY_EMPTY \ - (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[0], GRPC_MDELEM_STORAGE_STATIC)) +#define GRPC_MDELEM_AUTHORITY_EMPTY \ + (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[0].data(), \ + GRPC_MDELEM_STORAGE_STATIC)) /* ":method": "GET" */ -#define GRPC_MDELEM_METHOD_GET \ - (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[1], GRPC_MDELEM_STORAGE_STATIC)) +#define GRPC_MDELEM_METHOD_GET \ + (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[1].data(), \ + GRPC_MDELEM_STORAGE_STATIC)) /* ":method": "POST" */ -#define GRPC_MDELEM_METHOD_POST \ - (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[2], GRPC_MDELEM_STORAGE_STATIC)) +#define GRPC_MDELEM_METHOD_POST \ + (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[2].data(), \ + GRPC_MDELEM_STORAGE_STATIC)) /* ":path": "/" */ -#define GRPC_MDELEM_PATH_SLASH \ - (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[3], GRPC_MDELEM_STORAGE_STATIC)) +#define GRPC_MDELEM_PATH_SLASH \ + (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[3].data(), \ + GRPC_MDELEM_STORAGE_STATIC)) /* ":path": "/index.html" */ -#define GRPC_MDELEM_PATH_SLASH_INDEX_DOT_HTML \ - (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[4], GRPC_MDELEM_STORAGE_STATIC)) +#define GRPC_MDELEM_PATH_SLASH_INDEX_DOT_HTML \ + (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[4].data(), \ + GRPC_MDELEM_STORAGE_STATIC)) /* ":scheme": "http" */ -#define GRPC_MDELEM_SCHEME_HTTP \ - (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[5], GRPC_MDELEM_STORAGE_STATIC)) +#define GRPC_MDELEM_SCHEME_HTTP \ + (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[5].data(), \ + GRPC_MDELEM_STORAGE_STATIC)) /* ":scheme": "https" */ -#define GRPC_MDELEM_SCHEME_HTTPS \ - (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[6], GRPC_MDELEM_STORAGE_STATIC)) +#define GRPC_MDELEM_SCHEME_HTTPS \ + (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[6].data(), \ + GRPC_MDELEM_STORAGE_STATIC)) /* ":status": "200" */ -#define GRPC_MDELEM_STATUS_200 \ - (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[7], GRPC_MDELEM_STORAGE_STATIC)) +#define GRPC_MDELEM_STATUS_200 \ + (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[7].data(), \ + GRPC_MDELEM_STORAGE_STATIC)) /* ":status": "204" */ -#define GRPC_MDELEM_STATUS_204 \ - (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[8], GRPC_MDELEM_STORAGE_STATIC)) +#define GRPC_MDELEM_STATUS_204 \ + (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[8].data(), \ + GRPC_MDELEM_STORAGE_STATIC)) /* ":status": "206" */ -#define GRPC_MDELEM_STATUS_206 \ - (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[9], GRPC_MDELEM_STORAGE_STATIC)) +#define GRPC_MDELEM_STATUS_206 \ + (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[9].data(), \ + GRPC_MDELEM_STORAGE_STATIC)) /* ":status": "304" */ -#define GRPC_MDELEM_STATUS_304 \ - (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[10], GRPC_MDELEM_STORAGE_STATIC)) +#define GRPC_MDELEM_STATUS_304 \ + (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[10].data(), \ + GRPC_MDELEM_STORAGE_STATIC)) /* ":status": "400" */ -#define GRPC_MDELEM_STATUS_400 \ - (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[11], GRPC_MDELEM_STORAGE_STATIC)) +#define GRPC_MDELEM_STATUS_400 \ + (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[11].data(), \ + GRPC_MDELEM_STORAGE_STATIC)) /* ":status": "404" */ -#define GRPC_MDELEM_STATUS_404 \ - (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[12], GRPC_MDELEM_STORAGE_STATIC)) +#define GRPC_MDELEM_STATUS_404 \ + (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[12].data(), \ + GRPC_MDELEM_STORAGE_STATIC)) /* ":status": "500" */ -#define GRPC_MDELEM_STATUS_500 \ - (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[13], GRPC_MDELEM_STORAGE_STATIC)) +#define GRPC_MDELEM_STATUS_500 \ + (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[13].data(), \ + GRPC_MDELEM_STORAGE_STATIC)) /* "accept-charset": "" */ -#define GRPC_MDELEM_ACCEPT_CHARSET_EMPTY \ - (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[14], GRPC_MDELEM_STORAGE_STATIC)) +#define GRPC_MDELEM_ACCEPT_CHARSET_EMPTY \ + (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[14].data(), \ + GRPC_MDELEM_STORAGE_STATIC)) /* "accept-encoding": "gzip, deflate" */ -#define GRPC_MDELEM_ACCEPT_ENCODING_GZIP_COMMA_DEFLATE \ - (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[15], GRPC_MDELEM_STORAGE_STATIC)) +#define GRPC_MDELEM_ACCEPT_ENCODING_GZIP_COMMA_DEFLATE \ + (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[15].data(), \ + GRPC_MDELEM_STORAGE_STATIC)) /* "accept-language": "" */ -#define GRPC_MDELEM_ACCEPT_LANGUAGE_EMPTY \ - (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[16], GRPC_MDELEM_STORAGE_STATIC)) +#define GRPC_MDELEM_ACCEPT_LANGUAGE_EMPTY \ + (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[16].data(), \ + GRPC_MDELEM_STORAGE_STATIC)) /* "accept-ranges": "" */ -#define GRPC_MDELEM_ACCEPT_RANGES_EMPTY \ - (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[17], GRPC_MDELEM_STORAGE_STATIC)) +#define GRPC_MDELEM_ACCEPT_RANGES_EMPTY \ + (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[17].data(), \ + GRPC_MDELEM_STORAGE_STATIC)) /* "accept": "" */ -#define GRPC_MDELEM_ACCEPT_EMPTY \ - (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[18], GRPC_MDELEM_STORAGE_STATIC)) +#define GRPC_MDELEM_ACCEPT_EMPTY \ + (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[18].data(), \ + GRPC_MDELEM_STORAGE_STATIC)) /* "access-control-allow-origin": "" */ -#define GRPC_MDELEM_ACCESS_CONTROL_ALLOW_ORIGIN_EMPTY \ - (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[19], GRPC_MDELEM_STORAGE_STATIC)) +#define GRPC_MDELEM_ACCESS_CONTROL_ALLOW_ORIGIN_EMPTY \ + (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[19].data(), \ + GRPC_MDELEM_STORAGE_STATIC)) /* "age": "" */ -#define GRPC_MDELEM_AGE_EMPTY \ - (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[20], GRPC_MDELEM_STORAGE_STATIC)) +#define GRPC_MDELEM_AGE_EMPTY \ + (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[20].data(), \ + GRPC_MDELEM_STORAGE_STATIC)) /* "allow": "" */ -#define GRPC_MDELEM_ALLOW_EMPTY \ - (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[21], GRPC_MDELEM_STORAGE_STATIC)) +#define GRPC_MDELEM_ALLOW_EMPTY \ + (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[21].data(), \ + GRPC_MDELEM_STORAGE_STATIC)) /* "authorization": "" */ -#define GRPC_MDELEM_AUTHORIZATION_EMPTY \ - (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[22], GRPC_MDELEM_STORAGE_STATIC)) +#define GRPC_MDELEM_AUTHORIZATION_EMPTY \ + (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[22].data(), \ + GRPC_MDELEM_STORAGE_STATIC)) /* "cache-control": "" */ -#define GRPC_MDELEM_CACHE_CONTROL_EMPTY \ - (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[23], GRPC_MDELEM_STORAGE_STATIC)) +#define GRPC_MDELEM_CACHE_CONTROL_EMPTY \ + (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[23].data(), \ + GRPC_MDELEM_STORAGE_STATIC)) /* "content-disposition": "" */ -#define GRPC_MDELEM_CONTENT_DISPOSITION_EMPTY \ - (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[24], GRPC_MDELEM_STORAGE_STATIC)) +#define GRPC_MDELEM_CONTENT_DISPOSITION_EMPTY \ + (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[24].data(), \ + GRPC_MDELEM_STORAGE_STATIC)) /* "content-encoding": "" */ -#define GRPC_MDELEM_CONTENT_ENCODING_EMPTY \ - (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[25], GRPC_MDELEM_STORAGE_STATIC)) +#define GRPC_MDELEM_CONTENT_ENCODING_EMPTY \ + (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[25].data(), \ + GRPC_MDELEM_STORAGE_STATIC)) /* "content-language": "" */ -#define GRPC_MDELEM_CONTENT_LANGUAGE_EMPTY \ - (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[26], GRPC_MDELEM_STORAGE_STATIC)) +#define GRPC_MDELEM_CONTENT_LANGUAGE_EMPTY \ + (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[26].data(), \ + GRPC_MDELEM_STORAGE_STATIC)) /* "content-length": "" */ -#define GRPC_MDELEM_CONTENT_LENGTH_EMPTY \ - (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[27], GRPC_MDELEM_STORAGE_STATIC)) +#define GRPC_MDELEM_CONTENT_LENGTH_EMPTY \ + (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[27].data(), \ + GRPC_MDELEM_STORAGE_STATIC)) /* "content-location": "" */ -#define GRPC_MDELEM_CONTENT_LOCATION_EMPTY \ - (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[28], GRPC_MDELEM_STORAGE_STATIC)) +#define GRPC_MDELEM_CONTENT_LOCATION_EMPTY \ + (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[28].data(), \ + GRPC_MDELEM_STORAGE_STATIC)) /* "content-range": "" */ -#define GRPC_MDELEM_CONTENT_RANGE_EMPTY \ - (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[29], GRPC_MDELEM_STORAGE_STATIC)) +#define GRPC_MDELEM_CONTENT_RANGE_EMPTY \ + (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[29].data(), \ + GRPC_MDELEM_STORAGE_STATIC)) /* "content-type": "" */ -#define GRPC_MDELEM_CONTENT_TYPE_EMPTY \ - (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[30], GRPC_MDELEM_STORAGE_STATIC)) +#define GRPC_MDELEM_CONTENT_TYPE_EMPTY \ + (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[30].data(), \ + GRPC_MDELEM_STORAGE_STATIC)) /* "cookie": "" */ -#define GRPC_MDELEM_COOKIE_EMPTY \ - (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[31], GRPC_MDELEM_STORAGE_STATIC)) +#define GRPC_MDELEM_COOKIE_EMPTY \ + (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[31].data(), \ + GRPC_MDELEM_STORAGE_STATIC)) /* "date": "" */ -#define GRPC_MDELEM_DATE_EMPTY \ - (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[32], GRPC_MDELEM_STORAGE_STATIC)) +#define GRPC_MDELEM_DATE_EMPTY \ + (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[32].data(), \ + GRPC_MDELEM_STORAGE_STATIC)) /* "etag": "" */ -#define GRPC_MDELEM_ETAG_EMPTY \ - (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[33], GRPC_MDELEM_STORAGE_STATIC)) +#define GRPC_MDELEM_ETAG_EMPTY \ + (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[33].data(), \ + GRPC_MDELEM_STORAGE_STATIC)) /* "expect": "" */ -#define GRPC_MDELEM_EXPECT_EMPTY \ - (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[34], GRPC_MDELEM_STORAGE_STATIC)) +#define GRPC_MDELEM_EXPECT_EMPTY \ + (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[34].data(), \ + GRPC_MDELEM_STORAGE_STATIC)) /* "expires": "" */ -#define GRPC_MDELEM_EXPIRES_EMPTY \ - (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[35], GRPC_MDELEM_STORAGE_STATIC)) +#define GRPC_MDELEM_EXPIRES_EMPTY \ + (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[35].data(), \ + GRPC_MDELEM_STORAGE_STATIC)) /* "from": "" */ -#define GRPC_MDELEM_FROM_EMPTY \ - (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[36], GRPC_MDELEM_STORAGE_STATIC)) +#define GRPC_MDELEM_FROM_EMPTY \ + (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[36].data(), \ + GRPC_MDELEM_STORAGE_STATIC)) /* "host": "" */ -#define GRPC_MDELEM_HOST_EMPTY \ - (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[37], GRPC_MDELEM_STORAGE_STATIC)) +#define GRPC_MDELEM_HOST_EMPTY \ + (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[37].data(), \ + GRPC_MDELEM_STORAGE_STATIC)) /* "if-match": "" */ -#define GRPC_MDELEM_IF_MATCH_EMPTY \ - (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[38], GRPC_MDELEM_STORAGE_STATIC)) +#define GRPC_MDELEM_IF_MATCH_EMPTY \ + (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[38].data(), \ + GRPC_MDELEM_STORAGE_STATIC)) /* "if-modified-since": "" */ -#define GRPC_MDELEM_IF_MODIFIED_SINCE_EMPTY \ - (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[39], GRPC_MDELEM_STORAGE_STATIC)) +#define GRPC_MDELEM_IF_MODIFIED_SINCE_EMPTY \ + (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[39].data(), \ + GRPC_MDELEM_STORAGE_STATIC)) /* "if-none-match": "" */ -#define GRPC_MDELEM_IF_NONE_MATCH_EMPTY \ - (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[40], GRPC_MDELEM_STORAGE_STATIC)) +#define GRPC_MDELEM_IF_NONE_MATCH_EMPTY \ + (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[40].data(), \ + GRPC_MDELEM_STORAGE_STATIC)) /* "if-range": "" */ -#define GRPC_MDELEM_IF_RANGE_EMPTY \ - (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[41], GRPC_MDELEM_STORAGE_STATIC)) +#define GRPC_MDELEM_IF_RANGE_EMPTY \ + (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[41].data(), \ + GRPC_MDELEM_STORAGE_STATIC)) /* "if-unmodified-since": "" */ -#define GRPC_MDELEM_IF_UNMODIFIED_SINCE_EMPTY \ - (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[42], GRPC_MDELEM_STORAGE_STATIC)) +#define GRPC_MDELEM_IF_UNMODIFIED_SINCE_EMPTY \ + (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[42].data(), \ + GRPC_MDELEM_STORAGE_STATIC)) /* "last-modified": "" */ -#define GRPC_MDELEM_LAST_MODIFIED_EMPTY \ - (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[43], GRPC_MDELEM_STORAGE_STATIC)) +#define GRPC_MDELEM_LAST_MODIFIED_EMPTY \ + (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[43].data(), \ + GRPC_MDELEM_STORAGE_STATIC)) /* "link": "" */ -#define GRPC_MDELEM_LINK_EMPTY \ - (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[44], GRPC_MDELEM_STORAGE_STATIC)) +#define GRPC_MDELEM_LINK_EMPTY \ + (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[44].data(), \ + GRPC_MDELEM_STORAGE_STATIC)) /* "location": "" */ -#define GRPC_MDELEM_LOCATION_EMPTY \ - (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[45], GRPC_MDELEM_STORAGE_STATIC)) +#define GRPC_MDELEM_LOCATION_EMPTY \ + (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[45].data(), \ + GRPC_MDELEM_STORAGE_STATIC)) /* "max-forwards": "" */ -#define GRPC_MDELEM_MAX_FORWARDS_EMPTY \ - (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[46], GRPC_MDELEM_STORAGE_STATIC)) +#define GRPC_MDELEM_MAX_FORWARDS_EMPTY \ + (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[46].data(), \ + GRPC_MDELEM_STORAGE_STATIC)) /* "proxy-authenticate": "" */ -#define GRPC_MDELEM_PROXY_AUTHENTICATE_EMPTY \ - (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[47], GRPC_MDELEM_STORAGE_STATIC)) +#define GRPC_MDELEM_PROXY_AUTHENTICATE_EMPTY \ + (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[47].data(), \ + GRPC_MDELEM_STORAGE_STATIC)) /* "proxy-authorization": "" */ -#define GRPC_MDELEM_PROXY_AUTHORIZATION_EMPTY \ - (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[48], GRPC_MDELEM_STORAGE_STATIC)) +#define GRPC_MDELEM_PROXY_AUTHORIZATION_EMPTY \ + (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[48].data(), \ + GRPC_MDELEM_STORAGE_STATIC)) /* "range": "" */ -#define GRPC_MDELEM_RANGE_EMPTY \ - (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[49], GRPC_MDELEM_STORAGE_STATIC)) +#define GRPC_MDELEM_RANGE_EMPTY \ + (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[49].data(), \ + GRPC_MDELEM_STORAGE_STATIC)) /* "referer": "" */ -#define GRPC_MDELEM_REFERER_EMPTY \ - (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[50], GRPC_MDELEM_STORAGE_STATIC)) +#define GRPC_MDELEM_REFERER_EMPTY \ + (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[50].data(), \ + GRPC_MDELEM_STORAGE_STATIC)) /* "refresh": "" */ -#define GRPC_MDELEM_REFRESH_EMPTY \ - (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[51], GRPC_MDELEM_STORAGE_STATIC)) +#define GRPC_MDELEM_REFRESH_EMPTY \ + (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[51].data(), \ + GRPC_MDELEM_STORAGE_STATIC)) /* "retry-after": "" */ -#define GRPC_MDELEM_RETRY_AFTER_EMPTY \ - (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[52], GRPC_MDELEM_STORAGE_STATIC)) +#define GRPC_MDELEM_RETRY_AFTER_EMPTY \ + (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[52].data(), \ + GRPC_MDELEM_STORAGE_STATIC)) /* "server": "" */ -#define GRPC_MDELEM_SERVER_EMPTY \ - (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[53], GRPC_MDELEM_STORAGE_STATIC)) +#define GRPC_MDELEM_SERVER_EMPTY \ + (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[53].data(), \ + GRPC_MDELEM_STORAGE_STATIC)) /* "set-cookie": "" */ -#define GRPC_MDELEM_SET_COOKIE_EMPTY \ - (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[54], GRPC_MDELEM_STORAGE_STATIC)) +#define GRPC_MDELEM_SET_COOKIE_EMPTY \ + (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[54].data(), \ + GRPC_MDELEM_STORAGE_STATIC)) /* "strict-transport-security": "" */ -#define GRPC_MDELEM_STRICT_TRANSPORT_SECURITY_EMPTY \ - (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[55], GRPC_MDELEM_STORAGE_STATIC)) +#define GRPC_MDELEM_STRICT_TRANSPORT_SECURITY_EMPTY \ + (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[55].data(), \ + GRPC_MDELEM_STORAGE_STATIC)) /* "transfer-encoding": "" */ -#define GRPC_MDELEM_TRANSFER_ENCODING_EMPTY \ - (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[56], GRPC_MDELEM_STORAGE_STATIC)) +#define GRPC_MDELEM_TRANSFER_ENCODING_EMPTY \ + (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[56].data(), \ + GRPC_MDELEM_STORAGE_STATIC)) /* "user-agent": "" */ -#define GRPC_MDELEM_USER_AGENT_EMPTY \ - (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[57], GRPC_MDELEM_STORAGE_STATIC)) +#define GRPC_MDELEM_USER_AGENT_EMPTY \ + (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[57].data(), \ + GRPC_MDELEM_STORAGE_STATIC)) /* "vary": "" */ -#define GRPC_MDELEM_VARY_EMPTY \ - (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[58], GRPC_MDELEM_STORAGE_STATIC)) +#define GRPC_MDELEM_VARY_EMPTY \ + (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[58].data(), \ + GRPC_MDELEM_STORAGE_STATIC)) /* "via": "" */ -#define GRPC_MDELEM_VIA_EMPTY \ - (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[59], GRPC_MDELEM_STORAGE_STATIC)) +#define GRPC_MDELEM_VIA_EMPTY \ + (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[59].data(), \ + GRPC_MDELEM_STORAGE_STATIC)) /* "www-authenticate": "" */ -#define GRPC_MDELEM_WWW_AUTHENTICATE_EMPTY \ - (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[60], GRPC_MDELEM_STORAGE_STATIC)) +#define GRPC_MDELEM_WWW_AUTHENTICATE_EMPTY \ + (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[60].data(), \ + GRPC_MDELEM_STORAGE_STATIC)) /* "grpc-status": "0" */ -#define GRPC_MDELEM_GRPC_STATUS_0 \ - (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[61], GRPC_MDELEM_STORAGE_STATIC)) +#define GRPC_MDELEM_GRPC_STATUS_0 \ + (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[61].data(), \ + GRPC_MDELEM_STORAGE_STATIC)) /* "grpc-status": "1" */ -#define GRPC_MDELEM_GRPC_STATUS_1 \ - (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[62], GRPC_MDELEM_STORAGE_STATIC)) +#define GRPC_MDELEM_GRPC_STATUS_1 \ + (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[62].data(), \ + GRPC_MDELEM_STORAGE_STATIC)) /* "grpc-status": "2" */ -#define GRPC_MDELEM_GRPC_STATUS_2 \ - (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[63], GRPC_MDELEM_STORAGE_STATIC)) +#define GRPC_MDELEM_GRPC_STATUS_2 \ + (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[63].data(), \ + GRPC_MDELEM_STORAGE_STATIC)) /* "grpc-encoding": "identity" */ -#define GRPC_MDELEM_GRPC_ENCODING_IDENTITY \ - (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[64], GRPC_MDELEM_STORAGE_STATIC)) +#define GRPC_MDELEM_GRPC_ENCODING_IDENTITY \ + (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[64].data(), \ + GRPC_MDELEM_STORAGE_STATIC)) /* "grpc-encoding": "gzip" */ -#define GRPC_MDELEM_GRPC_ENCODING_GZIP \ - (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[65], GRPC_MDELEM_STORAGE_STATIC)) +#define GRPC_MDELEM_GRPC_ENCODING_GZIP \ + (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[65].data(), \ + GRPC_MDELEM_STORAGE_STATIC)) /* "grpc-encoding": "deflate" */ -#define GRPC_MDELEM_GRPC_ENCODING_DEFLATE \ - (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[66], GRPC_MDELEM_STORAGE_STATIC)) +#define GRPC_MDELEM_GRPC_ENCODING_DEFLATE \ + (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[66].data(), \ + GRPC_MDELEM_STORAGE_STATIC)) /* "te": "trailers" */ -#define GRPC_MDELEM_TE_TRAILERS \ - (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[67], GRPC_MDELEM_STORAGE_STATIC)) +#define GRPC_MDELEM_TE_TRAILERS \ + (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[67].data(), \ + GRPC_MDELEM_STORAGE_STATIC)) /* "content-type": "application/grpc" */ -#define GRPC_MDELEM_CONTENT_TYPE_APPLICATION_SLASH_GRPC \ - (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[68], GRPC_MDELEM_STORAGE_STATIC)) +#define GRPC_MDELEM_CONTENT_TYPE_APPLICATION_SLASH_GRPC \ + (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[68].data(), \ + GRPC_MDELEM_STORAGE_STATIC)) /* ":scheme": "grpc" */ -#define GRPC_MDELEM_SCHEME_GRPC \ - (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[69], GRPC_MDELEM_STORAGE_STATIC)) +#define GRPC_MDELEM_SCHEME_GRPC \ + (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[69].data(), \ + GRPC_MDELEM_STORAGE_STATIC)) /* ":method": "PUT" */ -#define GRPC_MDELEM_METHOD_PUT \ - (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[70], GRPC_MDELEM_STORAGE_STATIC)) +#define GRPC_MDELEM_METHOD_PUT \ + (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[70].data(), \ + GRPC_MDELEM_STORAGE_STATIC)) /* "accept-encoding": "" */ -#define GRPC_MDELEM_ACCEPT_ENCODING_EMPTY \ - (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[71], GRPC_MDELEM_STORAGE_STATIC)) +#define GRPC_MDELEM_ACCEPT_ENCODING_EMPTY \ + (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[71].data(), \ + GRPC_MDELEM_STORAGE_STATIC)) /* "content-encoding": "identity" */ -#define GRPC_MDELEM_CONTENT_ENCODING_IDENTITY \ - (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[72], GRPC_MDELEM_STORAGE_STATIC)) +#define GRPC_MDELEM_CONTENT_ENCODING_IDENTITY \ + (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[72].data(), \ + GRPC_MDELEM_STORAGE_STATIC)) /* "content-encoding": "gzip" */ -#define GRPC_MDELEM_CONTENT_ENCODING_GZIP \ - (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[73], GRPC_MDELEM_STORAGE_STATIC)) +#define GRPC_MDELEM_CONTENT_ENCODING_GZIP \ + (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[73].data(), \ + GRPC_MDELEM_STORAGE_STATIC)) /* "lb-token": "" */ -#define GRPC_MDELEM_LB_TOKEN_EMPTY \ - (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[74], GRPC_MDELEM_STORAGE_STATIC)) +#define GRPC_MDELEM_LB_TOKEN_EMPTY \ + (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[74].data(), \ + GRPC_MDELEM_STORAGE_STATIC)) /* "lb-cost-bin": "" */ -#define GRPC_MDELEM_LB_COST_BIN_EMPTY \ - (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[75], GRPC_MDELEM_STORAGE_STATIC)) +#define GRPC_MDELEM_LB_COST_BIN_EMPTY \ + (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[75].data(), \ + GRPC_MDELEM_STORAGE_STATIC)) /* "grpc-accept-encoding": "identity" */ -#define GRPC_MDELEM_GRPC_ACCEPT_ENCODING_IDENTITY \ - (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[76], GRPC_MDELEM_STORAGE_STATIC)) +#define GRPC_MDELEM_GRPC_ACCEPT_ENCODING_IDENTITY \ + (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[76].data(), \ + GRPC_MDELEM_STORAGE_STATIC)) /* "grpc-accept-encoding": "deflate" */ -#define GRPC_MDELEM_GRPC_ACCEPT_ENCODING_DEFLATE \ - (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[77], GRPC_MDELEM_STORAGE_STATIC)) +#define GRPC_MDELEM_GRPC_ACCEPT_ENCODING_DEFLATE \ + (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[77].data(), \ + GRPC_MDELEM_STORAGE_STATIC)) /* "grpc-accept-encoding": "identity,deflate" */ #define GRPC_MDELEM_GRPC_ACCEPT_ENCODING_IDENTITY_COMMA_DEFLATE \ - (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[78], GRPC_MDELEM_STORAGE_STATIC)) + (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[78].data(), \ + GRPC_MDELEM_STORAGE_STATIC)) /* "grpc-accept-encoding": "gzip" */ -#define GRPC_MDELEM_GRPC_ACCEPT_ENCODING_GZIP \ - (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[79], GRPC_MDELEM_STORAGE_STATIC)) +#define GRPC_MDELEM_GRPC_ACCEPT_ENCODING_GZIP \ + (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[79].data(), \ + GRPC_MDELEM_STORAGE_STATIC)) /* "grpc-accept-encoding": "identity,gzip" */ #define GRPC_MDELEM_GRPC_ACCEPT_ENCODING_IDENTITY_COMMA_GZIP \ - (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[80], GRPC_MDELEM_STORAGE_STATIC)) + (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[80].data(), \ + GRPC_MDELEM_STORAGE_STATIC)) /* "grpc-accept-encoding": "deflate,gzip" */ #define GRPC_MDELEM_GRPC_ACCEPT_ENCODING_DEFLATE_COMMA_GZIP \ - (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[81], GRPC_MDELEM_STORAGE_STATIC)) + (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[81].data(), \ + GRPC_MDELEM_STORAGE_STATIC)) /* "grpc-accept-encoding": "identity,deflate,gzip" */ #define GRPC_MDELEM_GRPC_ACCEPT_ENCODING_IDENTITY_COMMA_DEFLATE_COMMA_GZIP \ - (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[82], GRPC_MDELEM_STORAGE_STATIC)) + (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[82].data(), \ + GRPC_MDELEM_STORAGE_STATIC)) /* "accept-encoding": "identity" */ -#define GRPC_MDELEM_ACCEPT_ENCODING_IDENTITY \ - (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[83], GRPC_MDELEM_STORAGE_STATIC)) +#define GRPC_MDELEM_ACCEPT_ENCODING_IDENTITY \ + (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[83].data(), \ + GRPC_MDELEM_STORAGE_STATIC)) /* "accept-encoding": "gzip" */ -#define GRPC_MDELEM_ACCEPT_ENCODING_GZIP \ - (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[84], GRPC_MDELEM_STORAGE_STATIC)) +#define GRPC_MDELEM_ACCEPT_ENCODING_GZIP \ + (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[84].data(), \ + GRPC_MDELEM_STORAGE_STATIC)) /* "accept-encoding": "identity,gzip" */ -#define GRPC_MDELEM_ACCEPT_ENCODING_IDENTITY_COMMA_GZIP \ - (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[85], GRPC_MDELEM_STORAGE_STATIC)) +#define GRPC_MDELEM_ACCEPT_ENCODING_IDENTITY_COMMA_GZIP \ + (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[85].data(), \ + GRPC_MDELEM_STORAGE_STATIC)) grpc_mdelem grpc_static_mdelem_for_static_strings(intptr_t a, intptr_t b); typedef enum { @@ -597,14 +684,16 @@ typedef union { : GRPC_BATCH_CALLOUTS_COUNT) extern const uint8_t grpc_static_accept_encoding_metadata[8]; -#define GRPC_MDELEM_ACCEPT_ENCODING_FOR_ALGORITHMS(algs) \ - (GRPC_MAKE_MDELEM( \ - &grpc_static_mdelem_table[grpc_static_accept_encoding_metadata[(algs)]], \ +#define GRPC_MDELEM_ACCEPT_ENCODING_FOR_ALGORITHMS(algs) \ + (GRPC_MAKE_MDELEM( \ + &grpc_static_mdelem_table[grpc_static_accept_encoding_metadata[(algs)]] \ + .data(), \ GRPC_MDELEM_STORAGE_STATIC)) extern const uint8_t grpc_static_accept_stream_encoding_metadata[4]; #define GRPC_MDELEM_ACCEPT_STREAM_ENCODING_FOR_ALGORITHMS(algs) \ (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table \ - [grpc_static_accept_stream_encoding_metadata[(algs)]], \ + [grpc_static_accept_stream_encoding_metadata[(algs)]] \ + .data(), \ GRPC_MDELEM_STORAGE_STATIC)) #endif /* GRPC_CORE_LIB_TRANSPORT_STATIC_METADATA_H */ diff --git a/tools/codegen/core/gen_static_metadata.py b/tools/codegen/core/gen_static_metadata.py index d66fdc3e835..b534d8dab7e 100755 --- a/tools/codegen/core/gen_static_metadata.py +++ b/tools/codegen/core/gen_static_metadata.py @@ -447,14 +447,15 @@ for i, elem in enumerate(all_elems): [len(elem[1])] + [ord(c) for c in elem[1]])) print >> H, '#define GRPC_STATIC_MDELEM_COUNT %d' % len(all_elems) -print >> H, ('extern grpc_mdelem_data ' +print >> H, ('extern grpc_core::StaticMetadata ' 'grpc_static_mdelem_table[GRPC_STATIC_MDELEM_COUNT];') print >> H, ('extern uintptr_t ' 'grpc_static_mdelem_user_data[GRPC_STATIC_MDELEM_COUNT];') for i, elem in enumerate(all_elems): print >> H, '/* "%s": "%s" */' % elem - print >> H, ('#define %s (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[%d], ' - 'GRPC_MDELEM_STORAGE_STATIC))') % (mangle(elem).upper(), i) + print >> H, ( + '#define %s (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[%d].data(), ' + 'GRPC_MDELEM_STORAGE_STATIC))') % (mangle(elem).upper(), i) print >> H print >> C, ('uintptr_t grpc_static_mdelem_user_data[GRPC_STATIC_MDELEM_COUNT] ' @@ -544,13 +545,14 @@ print >> C, 'grpc_mdelem grpc_static_mdelem_for_static_strings(intptr_t a, intpt print >> C, ' if (a == -1 || b == -1) return GRPC_MDNULL;' print >> C, ' uint32_t k = static_cast(a * %d + b);' % len(all_strs) print >> C, ' uint32_t h = elems_phash(k);' -print >> C, ' return h < GPR_ARRAY_SIZE(elem_keys) && elem_keys[h] == k && elem_idxs[h] != 255 ? GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[elem_idxs[h]], GRPC_MDELEM_STORAGE_STATIC) : GRPC_MDNULL;' +print >> C, ' return h < GPR_ARRAY_SIZE(elem_keys) && elem_keys[h] == k && elem_idxs[h] != 255 ? GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[elem_idxs[h]].data(), GRPC_MDELEM_STORAGE_STATIC) : GRPC_MDNULL;' print >> C, '}' print >> C -print >> C, 'grpc_mdelem_data grpc_static_mdelem_table[GRPC_STATIC_MDELEM_COUNT] = {' +print >> C, 'grpc_core::StaticMetadata grpc_static_mdelem_table[GRPC_STATIC_MDELEM_COUNT] = {' for a, b in all_elems: - print >> C, '{%s,%s},' % (slice_def(str_idx(a)), slice_def(str_idx(b))) + print >> C, 'grpc_core::StaticMetadata(%s,%s),' % (slice_def(str_idx(a)), + slice_def(str_idx(b))) print >> C, '};' print >> H, 'typedef enum {' @@ -579,7 +581,7 @@ print >> C, '0,%s' % ','.join('%d' % md_idx(elem) for elem in compression_elems) print >> C, '};' print >> C -print >> H, '#define GRPC_MDELEM_ACCEPT_ENCODING_FOR_ALGORITHMS(algs) (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[grpc_static_accept_encoding_metadata[(algs)]], GRPC_MDELEM_STORAGE_STATIC))' +print >> H, '#define GRPC_MDELEM_ACCEPT_ENCODING_FOR_ALGORITHMS(algs) (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[grpc_static_accept_encoding_metadata[(algs)]].data(), GRPC_MDELEM_STORAGE_STATIC))' print >> H print >> H, 'extern const uint8_t grpc_static_accept_stream_encoding_metadata[%d];' % ( @@ -590,7 +592,7 @@ print >> C, '0,%s' % ','.join( '%d' % md_idx(elem) for elem in stream_compression_elems) print >> C, '};' -print >> H, '#define GRPC_MDELEM_ACCEPT_STREAM_ENCODING_FOR_ALGORITHMS(algs) (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[grpc_static_accept_stream_encoding_metadata[(algs)]], GRPC_MDELEM_STORAGE_STATIC))' +print >> H, '#define GRPC_MDELEM_ACCEPT_STREAM_ENCODING_FOR_ALGORITHMS(algs) (GRPC_MAKE_MDELEM(&grpc_static_mdelem_table[grpc_static_accept_stream_encoding_metadata[(algs)]].data(), GRPC_MDELEM_STORAGE_STATIC))' print >> H, '#endif /* GRPC_CORE_LIB_TRANSPORT_STATIC_METADATA_H */' From f13abc071cb91c06e90f7121c66f39bae59ec691 Mon Sep 17 00:00:00 2001 From: Arjun Roy Date: Tue, 21 May 2019 19:02:27 -0700 Subject: [PATCH 68/83] Inlined and saved some ops for grpc_is_binary_header. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Various improvements for parsing/encoding: BM_HpackEncoderEncodeDeadline 171ns ± 0% 164ns ± 0% -3.74% (p=0.000 n=20+17) BM_HpackEncoderEncodeHeader/0/16384 102ns ± 1% 98ns ± 0% -3.28% (p=0.000 n=20+19) BM_HpackParserParseHeader 177ns ± 1% 165ns ± 1% -6.41% (p=0.000 n=19+18) BM_HpackParserParseHeader, UnrefHeader> 212ns ± 2% 199ns ± 1% -6.28% (p=0.000 n=20+18) --- .../chttp2/transport/hpack_encoder.cc | 18 +++-- .../chttp2/transport/hpack_parser.cc | 21 +++++- .../transport/chttp2/transport/hpack_table.cc | 7 +- .../cronet/transport/cronet_transport.cc | 5 +- src/core/lib/iomgr/error.cc | 6 +- src/core/lib/iomgr/error.h | 12 +++- .../credentials/plugin/plugin_credentials.cc | 2 +- src/core/lib/slice/slice_string_helpers.cc | 2 +- src/core/lib/slice/slice_string_helpers.h | 2 +- src/core/lib/surface/call.cc | 2 +- src/core/lib/surface/channel.cc | 57 +--------------- src/core/lib/surface/channel.h | 66 +++++++++++++++++-- src/core/lib/surface/validate_metadata.cc | 16 +++-- src/core/lib/surface/validate_metadata.h | 15 ++++- 14 files changed, 140 insertions(+), 91 deletions(-) diff --git a/src/core/ext/transport/chttp2/transport/hpack_encoder.cc b/src/core/ext/transport/chttp2/transport/hpack_encoder.cc index d2607e97707..b9871a3633e 100644 --- a/src/core/ext/transport/chttp2/transport/hpack_encoder.cc +++ b/src/core/ext/transport/chttp2/transport/hpack_encoder.cc @@ -37,6 +37,7 @@ #include "src/core/lib/debug/stats.h" #include "src/core/lib/slice/slice_internal.h" #include "src/core/lib/slice/slice_string_helpers.h" +#include "src/core/lib/surface/validate_metadata.h" #include "src/core/lib/transport/metadata.h" #include "src/core/lib/transport/static_metadata.h" #include "src/core/lib/transport/timeout_encoding.h" @@ -323,9 +324,14 @@ typedef struct { bool insert_null_before_wire_value; } wire_value; +template static wire_value get_wire_value(grpc_mdelem elem, bool true_binary_enabled) { wire_value wire_val; - if (grpc_is_binary_header(GRPC_MDKEY(elem))) { + bool is_bin_hdr = + mdkey_definitely_interned + ? grpc_is_refcounted_slice_binary_header(GRPC_MDKEY(elem)) + : grpc_is_binary_header_internal(GRPC_MDKEY(elem)); + if (is_bin_hdr) { if (true_binary_enabled) { GRPC_STATS_INC_HPACK_SEND_BINARY(); wire_val.huffman_prefix = 0x00; @@ -363,7 +369,7 @@ static void emit_lithdr_incidx(grpc_chttp2_hpack_compressor* c, framer_state* st) { GRPC_STATS_INC_HPACK_SEND_LITHDR_INCIDX(); uint32_t len_pfx = GRPC_CHTTP2_VARINT_LENGTH(key_index, 2); - wire_value value = get_wire_value(elem, st->use_true_binary_metadata); + wire_value value = get_wire_value(elem, st->use_true_binary_metadata); size_t len_val = wire_value_length(value); uint32_t len_val_len; GPR_ASSERT(len_val <= UINT32_MAX); @@ -380,7 +386,7 @@ static void emit_lithdr_noidx(grpc_chttp2_hpack_compressor* c, framer_state* st) { GRPC_STATS_INC_HPACK_SEND_LITHDR_NOTIDX(); uint32_t len_pfx = GRPC_CHTTP2_VARINT_LENGTH(key_index, 4); - wire_value value = get_wire_value(elem, st->use_true_binary_metadata); + wire_value value = get_wire_value(elem, st->use_true_binary_metadata); size_t len_val = wire_value_length(value); uint32_t len_val_len; GPR_ASSERT(len_val <= UINT32_MAX); @@ -399,7 +405,7 @@ static void emit_lithdr_incidx_v(grpc_chttp2_hpack_compressor* c, GRPC_STATS_INC_HPACK_SEND_LITHDR_INCIDX_V(); GRPC_STATS_INC_HPACK_SEND_UNCOMPRESSED(); uint32_t len_key = static_cast GRPC_SLICE_LENGTH(GRPC_MDKEY(elem)); - wire_value value = get_wire_value(elem, st->use_true_binary_metadata); + wire_value value = get_wire_value(elem, st->use_true_binary_metadata); uint32_t len_val = static_cast(wire_value_length(value)); uint32_t len_key_len = GRPC_CHTTP2_VARINT_LENGTH(len_key, 1); uint32_t len_val_len = GRPC_CHTTP2_VARINT_LENGTH(len_val, 1); @@ -421,7 +427,7 @@ static void emit_lithdr_noidx_v(grpc_chttp2_hpack_compressor* c, GRPC_STATS_INC_HPACK_SEND_LITHDR_NOTIDX_V(); GRPC_STATS_INC_HPACK_SEND_UNCOMPRESSED(); uint32_t len_key = static_cast GRPC_SLICE_LENGTH(GRPC_MDKEY(elem)); - wire_value value = get_wire_value(elem, st->use_true_binary_metadata); + wire_value value = get_wire_value(elem, st->use_true_binary_metadata); uint32_t len_val = static_cast(wire_value_length(value)); uint32_t len_key_len = GRPC_CHTTP2_VARINT_LENGTH(len_key, 1); uint32_t len_val_len = GRPC_CHTTP2_VARINT_LENGTH(len_val, 1); @@ -464,7 +470,7 @@ static void hpack_enc(grpc_chttp2_hpack_compressor* c, grpc_mdelem elem, if (GRPC_TRACE_FLAG_ENABLED(grpc_http_trace)) { char* k = grpc_slice_to_c_string(GRPC_MDKEY(elem)); char* v = nullptr; - if (grpc_is_binary_header(GRPC_MDKEY(elem))) { + if (grpc_is_binary_header_internal(GRPC_MDKEY(elem))) { v = grpc_dump_slice(GRPC_MDVALUE(elem), GPR_DUMP_HEX); } else { v = grpc_slice_to_c_string(GRPC_MDVALUE(elem)); diff --git a/src/core/ext/transport/chttp2/transport/hpack_parser.cc b/src/core/ext/transport/chttp2/transport/hpack_parser.cc index 6e422127511..7d5c39e5144 100644 --- a/src/core/ext/transport/chttp2/transport/hpack_parser.cc +++ b/src/core/ext/transport/chttp2/transport/hpack_parser.cc @@ -35,6 +35,7 @@ #include "src/core/lib/profiling/timers.h" #include "src/core/lib/slice/slice_internal.h" #include "src/core/lib/slice/slice_string_helpers.h" +#include "src/core/lib/surface/validate_metadata.h" #include "src/core/lib/transport/http2_errors.h" typedef enum { @@ -627,7 +628,7 @@ static grpc_error* on_hdr(grpc_chttp2_hpack_parser* p, grpc_mdelem md, if (GRPC_TRACE_FLAG_ENABLED(grpc_http_trace)) { char* k = grpc_slice_to_c_string(GRPC_MDKEY(md)); char* v = nullptr; - if (grpc_is_binary_header(GRPC_MDKEY(md))) { + if (grpc_is_binary_header_internal(GRPC_MDKEY(md))) { v = grpc_dump_slice(GRPC_MDVALUE(md), GPR_DUMP_HEX); } else { v = grpc_slice_to_c_string(GRPC_MDVALUE(md)); @@ -1494,7 +1495,13 @@ static grpc_error* parse_key_string(grpc_chttp2_hpack_parser* p, /* check if a key represents a binary header or not */ static bool is_binary_literal_header(grpc_chttp2_hpack_parser* p) { - return grpc_is_binary_header( + /* We know that either argument here is a reference counter slice. + * 1. If a result of grpc_slice_from_static_buffer, the refcount is set to + * NoopRefcount. + * 2. If it's p->key.data.referenced, then p->key.copied was set to false, + * which occurs in begin_parse_string() - where the refcount is set to + * p->current_slice_refcount, which is not null. */ + return grpc_is_refcounted_slice_binary_header( p->key.copied ? grpc_slice_from_static_buffer(p->key.data.copied.str, p->key.data.copied.length) : p->key.data.referenced); @@ -1511,7 +1518,15 @@ static grpc_error* is_binary_indexed_header(grpc_chttp2_hpack_parser* p, static_cast(p->index)), GRPC_ERROR_INT_SIZE, static_cast(p->table.num_ents)); } - *is = grpc_is_binary_header(GRPC_MDKEY(elem)); + /* We know that GRPC_MDKEY(elem) points to a reference counted slice since: + * 1. elem was a result of grpc_chttp2_hptbl_lookup + * 2. An item in this table is either static (see entries with + * index < GRPC_CHTTP2_LAST_STATIC_ENTRY or added via + * grpc_chttp2_hptbl_add). + * 3. If added via grpc_chttp2_hptbl_add, the entry is either static or + * interned. + * 4. Both static and interned element slices have non-null refcounts. */ + *is = grpc_is_refcounted_slice_binary_header(GRPC_MDKEY(elem)); return GRPC_ERROR_NONE; } diff --git a/src/core/ext/transport/chttp2/transport/hpack_table.cc b/src/core/ext/transport/chttp2/transport/hpack_table.cc index 16aeb49df4d..f1cf4acf7dd 100644 --- a/src/core/ext/transport/chttp2/transport/hpack_table.cc +++ b/src/core/ext/transport/chttp2/transport/hpack_table.cc @@ -29,6 +29,7 @@ #include "src/core/lib/debug/trace.h" #include "src/core/lib/gpr/murmur_hash.h" +#include "src/core/lib/surface/validate_metadata.h" #include "src/core/lib/transport/static_metadata.h" extern grpc_core::TraceFlag grpc_http_trace; @@ -375,9 +376,11 @@ static size_t get_base64_encoded_size(size_t raw_length) { size_t grpc_chttp2_get_size_in_hpack_table(grpc_mdelem elem, bool use_true_binary_metadata) { - size_t overhead_and_key = 32 + GRPC_SLICE_LENGTH(GRPC_MDKEY(elem)); + const uint8_t* key_buf = GRPC_SLICE_START_PTR(GRPC_MDKEY(elem)); + size_t key_len = GRPC_SLICE_LENGTH(GRPC_MDKEY(elem)); + size_t overhead_and_key = 32 + key_len; size_t value_len = GRPC_SLICE_LENGTH(GRPC_MDVALUE(elem)); - if (grpc_is_binary_header(GRPC_MDKEY(elem))) { + if (grpc_key_is_binary_header(key_buf, key_len)) { return overhead_and_key + (use_true_binary_metadata ? value_len + 1 : get_base64_encoded_size(value_len)); diff --git a/src/core/ext/transport/cronet/transport/cronet_transport.cc b/src/core/ext/transport/cronet/transport/cronet_transport.cc index 413de807638..3ddda268cfb 100644 --- a/src/core/ext/transport/cronet/transport/cronet_transport.cc +++ b/src/core/ext/transport/cronet/transport/cronet_transport.cc @@ -38,6 +38,7 @@ #include "src/core/lib/slice/slice_internal.h" #include "src/core/lib/slice/slice_string_helpers.h" #include "src/core/lib/surface/channel.h" +#include "src/core/lib/surface/validate_metadata.h" #include "src/core/lib/transport/metadata_batch.h" #include "src/core/lib/transport/static_metadata.h" #include "src/core/lib/transport/transport_impl.h" @@ -419,7 +420,7 @@ static void convert_cronet_array_to_metadata( grpc_slice key = grpc_slice_intern( grpc_slice_from_static_string(header_array->headers[i].key)); grpc_slice value; - if (grpc_is_binary_header(key)) { + if (grpc_is_refcounted_slice_binary_header(key)) { value = grpc_slice_from_static_string(header_array->headers[i].value); value = grpc_slice_intern(grpc_chttp2_base64_decode_with_length( value, grpc_chttp2_base64_infer_length_after_decode(value))); @@ -746,7 +747,7 @@ static void convert_metadata_to_cronet_headers( curr = curr->next; char* key = grpc_slice_to_c_string(GRPC_MDKEY(mdelem)); char* value; - if (grpc_is_binary_header(GRPC_MDKEY(mdelem))) { + if (grpc_is_binary_header_internal(GRPC_MDKEY(mdelem))) { grpc_slice wire_value = grpc_chttp2_base64_encode(GRPC_MDVALUE(mdelem)); value = grpc_slice_to_c_string(wire_value); grpc_slice_unref_internal(wire_value); diff --git a/src/core/lib/iomgr/error.cc b/src/core/lib/iomgr/error.cc index f194eb62d48..ebec9dc704a 100644 --- a/src/core/lib/iomgr/error.cc +++ b/src/core/lib/iomgr/error.cc @@ -795,9 +795,9 @@ grpc_error* grpc_wsa_error(const char* file, int line, int err, } #endif -bool grpc_log_if_error(const char* what, grpc_error* error, const char* file, - int line) { - if (error == GRPC_ERROR_NONE) return true; +bool grpc_log_error(const char* what, grpc_error* error, const char* file, + int line) { + GPR_DEBUG_ASSERT(error != GRPC_ERROR_NONE); const char* msg = grpc_error_string(error); gpr_log(file, line, GPR_LOG_SEVERITY_ERROR, "%s: %s", what, msg); GRPC_ERROR_UNREF(error); diff --git a/src/core/lib/iomgr/error.h b/src/core/lib/iomgr/error.h index 7b04888e9ec..0a72e5ca101 100644 --- a/src/core/lib/iomgr/error.h +++ b/src/core/lib/iomgr/error.h @@ -261,9 +261,15 @@ grpc_error* grpc_wsa_error(const char* file, int line, int err, #define GRPC_WSA_ERROR(err, call_name) \ grpc_wsa_error(__FILE__, __LINE__, err, call_name) -bool grpc_log_if_error(const char* what, grpc_error* error, const char* file, - int line); +bool grpc_log_error(const char* what, grpc_error* error, const char* file, + int line); +inline bool grpc_log_if_error(const char* what, grpc_error* error, + const char* file, int line) { + return error == GRPC_ERROR_NONE ? true + : grpc_log_error(what, error, file, line); +} + #define GRPC_LOG_IF_ERROR(what, error) \ - grpc_log_if_error((what), (error), __FILE__, __LINE__) + (grpc_log_if_error((what), (error), __FILE__, __LINE__)) #endif /* GRPC_CORE_LIB_IOMGR_ERROR_H */ diff --git a/src/core/lib/security/credentials/plugin/plugin_credentials.cc b/src/core/lib/security/credentials/plugin/plugin_credentials.cc index 333366d0f0a..92af88aee0b 100644 --- a/src/core/lib/security/credentials/plugin/plugin_credentials.cc +++ b/src/core/lib/security/credentials/plugin/plugin_credentials.cc @@ -85,7 +85,7 @@ static grpc_error* process_plugin_result( grpc_validate_header_key_is_legal(md[i].key))) { seen_illegal_header = true; break; - } else if (!grpc_is_binary_header(md[i].key) && + } else if (!grpc_is_binary_header_internal(md[i].key) && !GRPC_LOG_IF_ERROR( "validate_metadata_from_plugin", grpc_validate_header_nonbin_value_is_legal(md[i].value))) { diff --git a/src/core/lib/slice/slice_string_helpers.cc b/src/core/lib/slice/slice_string_helpers.cc index 6af9c33eb56..c2392fd392f 100644 --- a/src/core/lib/slice/slice_string_helpers.cc +++ b/src/core/lib/slice/slice_string_helpers.cc @@ -27,7 +27,7 @@ #include "src/core/lib/gpr/string.h" #include "src/core/lib/slice/slice_internal.h" -char* grpc_dump_slice(grpc_slice s, uint32_t flags) { +char* grpc_dump_slice(const grpc_slice& s, uint32_t flags) { return gpr_dump(reinterpret_cast GRPC_SLICE_START_PTR(s), GRPC_SLICE_LENGTH(s), flags); } diff --git a/src/core/lib/slice/slice_string_helpers.h b/src/core/lib/slice/slice_string_helpers.h index 976f72411a8..cb1df658fa5 100644 --- a/src/core/lib/slice/slice_string_helpers.h +++ b/src/core/lib/slice/slice_string_helpers.h @@ -30,7 +30,7 @@ #include "src/core/lib/gpr/string.h" /* Calls gpr_dump on a slice. */ -char* grpc_dump_slice(grpc_slice slice, uint32_t flags); +char* grpc_dump_slice(const grpc_slice& slice, uint32_t flags); /** Split \a str by the separator \a sep. Results are stored in \a dst, which * should be a properly initialized instance. */ diff --git a/src/core/lib/surface/call.cc b/src/core/lib/surface/call.cc index 254476f47e3..0ae7de29070 100644 --- a/src/core/lib/surface/call.cc +++ b/src/core/lib/surface/call.cc @@ -899,7 +899,7 @@ static int prepare_application_metadata(grpc_call* call, int count, if (!GRPC_LOG_IF_ERROR("validate_metadata", grpc_validate_header_key_is_legal(md->key))) { break; - } else if (!grpc_is_binary_header(md->key) && + } else if (!grpc_is_binary_header_internal(md->key) && !GRPC_LOG_IF_ERROR( "validate_metadata", grpc_validate_header_nonbin_value_is_legal(md->value))) { diff --git a/src/core/lib/surface/channel.cc b/src/core/lib/surface/channel.cc index e47cb4360ea..12869b7780d 100644 --- a/src/core/lib/surface/channel.cc +++ b/src/core/lib/surface/channel.cc @@ -59,23 +59,6 @@ typedef struct registered_call { struct registered_call* next; } registered_call; -struct grpc_channel { - int is_client; - grpc_compression_options compression_options; - - gpr_atm call_size_estimate; - grpc_resource_user* resource_user; - - gpr_mu registered_call_mu; - registered_call* registered_calls; - - grpc_core::RefCountedPtr channelz_channel; - - char* target; -}; - -#define CHANNEL_STACK_FROM_CHANNEL(c) ((grpc_channel_stack*)((c) + 1)) - static void destroy_channel(void* arg, grpc_error* error); grpc_channel* grpc_channel_create_with_builder( @@ -214,11 +197,6 @@ static grpc_channel_args* build_channel_args( return grpc_channel_args_copy_and_add(input_args, new_args, num_new_args); } -grpc_core::channelz::ChannelNode* grpc_channel_get_channelz_node( - grpc_channel* channel) { - return channel->channelz_channel.get(); -} - grpc_channel* grpc_channel_create(const char* target, const grpc_channel_args* input_args, grpc_channel_stack_type channel_stack_type, @@ -421,21 +399,6 @@ grpc_call* grpc_channel_create_registered_call( return call; } -#ifndef NDEBUG -#define REF_REASON reason -#define REF_ARG , const char* reason -#else -#define REF_REASON "" -#define REF_ARG -#endif -void grpc_channel_internal_ref(grpc_channel* c REF_ARG) { - GRPC_CHANNEL_STACK_REF(CHANNEL_STACK_FROM_CHANNEL(c), REF_REASON); -} - -void grpc_channel_internal_unref(grpc_channel* c REF_ARG) { - GRPC_CHANNEL_STACK_UNREF(CHANNEL_STACK_FROM_CHANNEL(c), REF_REASON); -} - static void destroy_channel(void* arg, grpc_error* error) { grpc_channel* channel = static_cast(arg); if (channel->channelz_channel != nullptr) { @@ -475,25 +438,9 @@ void grpc_channel_destroy(grpc_channel* channel) { GRPC_CHANNEL_INTERNAL_UNREF(channel, "channel"); } -grpc_channel_stack* grpc_channel_get_channel_stack(grpc_channel* channel) { - return CHANNEL_STACK_FROM_CHANNEL(channel); -} - -grpc_compression_options grpc_channel_compression_options( - const grpc_channel* channel) { - return channel->compression_options; -} - -grpc_mdelem grpc_channel_get_reffed_status_elem(grpc_channel* channel, int i) { +grpc_mdelem grpc_channel_get_reffed_status_elem_slowpath(grpc_channel* channel, + int i) { char tmp[GPR_LTOA_MIN_BUFSIZE]; - switch (i) { - case 0: - return GRPC_MDELEM_GRPC_STATUS_0; - case 1: - return GRPC_MDELEM_GRPC_STATUS_1; - case 2: - return GRPC_MDELEM_GRPC_STATUS_2; - } gpr_ltoa(i, tmp); return grpc_mdelem_from_slices(GRPC_MDSTR_GRPC_STATUS, grpc_slice_from_copied_string(tmp)); diff --git a/src/core/lib/surface/channel.h b/src/core/lib/surface/channel.h index ab00b8e94f7..5d666220745 100644 --- a/src/core/lib/surface/channel.h +++ b/src/core/lib/surface/channel.h @@ -59,22 +59,76 @@ grpc_core::channelz::ChannelNode* grpc_channel_get_channelz_node( status_code. The returned elem is owned by the caller. */ -grpc_mdelem grpc_channel_get_reffed_status_elem(grpc_channel* channel, - int status_code); +grpc_mdelem grpc_channel_get_reffed_status_elem_slowpath(grpc_channel* channel, + int status_code); +inline grpc_mdelem grpc_channel_get_reffed_status_elem(grpc_channel* channel, + int status_code) { + switch (status_code) { + case 0: + return GRPC_MDELEM_GRPC_STATUS_0; + case 1: + return GRPC_MDELEM_GRPC_STATUS_1; + case 2: + return GRPC_MDELEM_GRPC_STATUS_2; + } + return grpc_channel_get_reffed_status_elem_slowpath(channel, status_code); +} size_t grpc_channel_get_call_size_estimate(grpc_channel* channel); void grpc_channel_update_call_size_estimate(grpc_channel* channel, size_t size); +struct registered_call; +struct grpc_channel { + int is_client; + grpc_compression_options compression_options; + + gpr_atm call_size_estimate; + grpc_resource_user* resource_user; + + gpr_mu registered_call_mu; + registered_call* registered_calls; + + grpc_core::RefCountedPtr channelz_channel; + + char* target; +}; +#define CHANNEL_STACK_FROM_CHANNEL(c) ((grpc_channel_stack*)((c) + 1)) + +inline grpc_compression_options grpc_channel_compression_options( + const grpc_channel* channel) { + return channel->compression_options; +} + +inline grpc_channel_stack* grpc_channel_get_channel_stack( + grpc_channel* channel) { + return CHANNEL_STACK_FROM_CHANNEL(channel); +} + +inline grpc_core::channelz::ChannelNode* grpc_channel_get_channelz_node( + grpc_channel* channel) { + return channel->channelz_channel.get(); +} + #ifndef NDEBUG -void grpc_channel_internal_ref(grpc_channel* channel, const char* reason); -void grpc_channel_internal_unref(grpc_channel* channel, const char* reason); +inline void grpc_channel_internal_ref(grpc_channel* channel, + const char* reason) { + GRPC_CHANNEL_STACK_REF(CHANNEL_STACK_FROM_CHANNEL(channel), reason); +} +inline void grpc_channel_internal_unref(grpc_channel* channel, + const char* reason) { + GRPC_CHANNEL_STACK_UNREF(CHANNEL_STACK_FROM_CHANNEL(channel), reason); +} #define GRPC_CHANNEL_INTERNAL_REF(channel, reason) \ grpc_channel_internal_ref(channel, reason) #define GRPC_CHANNEL_INTERNAL_UNREF(channel, reason) \ grpc_channel_internal_unref(channel, reason) #else -void grpc_channel_internal_ref(grpc_channel* channel); -void grpc_channel_internal_unref(grpc_channel* channel); +inline void grpc_channel_internal_ref(grpc_channel* channel) { + GRPC_CHANNEL_STACK_REF(CHANNEL_STACK_FROM_CHANNEL(channel), "unused"); +} +inline void grpc_channel_internal_unref(grpc_channel* channel) { + GRPC_CHANNEL_STACK_UNREF(CHANNEL_STACK_FROM_CHANNEL(channel), "unused"); +} #define GRPC_CHANNEL_INTERNAL_REF(channel, reason) \ grpc_channel_internal_ref(channel) #define GRPC_CHANNEL_INTERNAL_UNREF(channel, reason) \ diff --git a/src/core/lib/surface/validate_metadata.cc b/src/core/lib/surface/validate_metadata.cc index 2dd18f3dd3f..a92ab823a38 100644 --- a/src/core/lib/surface/validate_metadata.cc +++ b/src/core/lib/surface/validate_metadata.cc @@ -29,7 +29,8 @@ #include "src/core/lib/slice/slice_string_helpers.h" #include "src/core/lib/surface/validate_metadata.h" -static grpc_error* conforms_to(grpc_slice slice, const uint8_t* legal_bits, +static grpc_error* conforms_to(const grpc_slice& slice, + const uint8_t* legal_bits, const char* err_desc) { const uint8_t* p = GRPC_SLICE_START_PTR(slice); const uint8_t* e = GRPC_SLICE_END_PTR(slice); @@ -57,7 +58,7 @@ static int error2int(grpc_error* error) { return r; } -grpc_error* grpc_validate_header_key_is_legal(grpc_slice slice) { +grpc_error* grpc_validate_header_key_is_legal(const grpc_slice& slice) { static const uint8_t legal_header_bits[256 / 8] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0xff, 0x03, 0x00, 0x00, 0x00, 0x80, 0xfe, 0xff, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -77,7 +78,8 @@ int grpc_header_key_is_legal(grpc_slice slice) { return error2int(grpc_validate_header_key_is_legal(slice)); } -grpc_error* grpc_validate_header_nonbin_value_is_legal(grpc_slice slice) { +grpc_error* grpc_validate_header_nonbin_value_is_legal( + const grpc_slice& slice) { static const uint8_t legal_header_bits[256 / 8] = { 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -89,7 +91,11 @@ int grpc_header_nonbin_value_is_legal(grpc_slice slice) { return error2int(grpc_validate_header_nonbin_value_is_legal(slice)); } +int grpc_is_binary_header_internal(const grpc_slice& slice) { + return grpc_key_is_binary_header(GRPC_SLICE_START_PTR(slice), + GRPC_SLICE_LENGTH(slice)); +} + int grpc_is_binary_header(grpc_slice slice) { - if (GRPC_SLICE_LENGTH(slice) < 5) return 0; - return 0 == memcmp(GRPC_SLICE_END_PTR(slice) - 4, "-bin", 4); + return grpc_is_binary_header_internal(slice); } diff --git a/src/core/lib/surface/validate_metadata.h b/src/core/lib/surface/validate_metadata.h index e87fb7beedc..db3be684c11 100644 --- a/src/core/lib/surface/validate_metadata.h +++ b/src/core/lib/surface/validate_metadata.h @@ -24,7 +24,18 @@ #include #include "src/core/lib/iomgr/error.h" -grpc_error* grpc_validate_header_key_is_legal(grpc_slice slice); -grpc_error* grpc_validate_header_nonbin_value_is_legal(grpc_slice slice); +grpc_error* grpc_validate_header_key_is_legal(const grpc_slice& slice); +grpc_error* grpc_validate_header_nonbin_value_is_legal(const grpc_slice& slice); + +int grpc_is_binary_header_internal(const grpc_slice& slice); +inline int grpc_key_is_binary_header(const uint8_t* buf, size_t length) { + if (length < 5) return 0; + return 0 == memcmp(buf + length - 4, "-bin", 4); +} +inline int grpc_is_refcounted_slice_binary_header(const grpc_slice& slice) { + GPR_DEBUG_ASSERT(slice.refcount != nullptr); + return grpc_key_is_binary_header(slice.data.refcounted.bytes, + slice.data.refcounted.length); +} #endif /* GRPC_CORE_LIB_SURFACE_VALIDATE_METADATA_H */ From bd2756e482b90df42bc3f60105cb06841331aad9 Mon Sep 17 00:00:00 2001 From: Wayne Zhang Date: Tue, 28 May 2019 15:39:53 -0700 Subject: [PATCH 69/83] Fix format --- test/cpp/util/test_credentials_provider.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/cpp/util/test_credentials_provider.cc b/test/cpp/util/test_credentials_provider.cc index 41779327cb9..fd796372c8c 100644 --- a/test/cpp/util/test_credentials_provider.cc +++ b/test/cpp/util/test_credentials_provider.cc @@ -119,8 +119,8 @@ class DefaultCredentialsProvider : public CredentialsProvider { SslServerCredentialsOptions ssl_opts; ssl_opts.pem_root_certs = ""; if (!custom_server_key_.empty() && !custom_server_cert_.empty()) { - SslServerCredentialsOptions::PemKeyCertPair pkcp = {custom_server_key_, - custom_server_cert_}; + SslServerCredentialsOptions::PemKeyCertPair pkcp = { + custom_server_key_, custom_server_cert_}; ssl_opts.pem_key_cert_pairs.push_back(pkcp); } else { SslServerCredentialsOptions::PemKeyCertPair pkcp = {test_server1_key, From 740c931e239a6a823e0fb86ced095f930fae9730 Mon Sep 17 00:00:00 2001 From: Guantao Liu Date: Tue, 28 May 2019 16:25:01 -0700 Subject: [PATCH 70/83] Adjust the order of IOMgr initialization, so as to set up a customized timer correctly. Also, change the comment of grpc_timer::heap_index. --- src/core/lib/iomgr/iomgr.cc | 2 +- src/core/lib/iomgr/timer.h | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/core/lib/iomgr/iomgr.cc b/src/core/lib/iomgr/iomgr.cc index b86aa6f2d76..b09d19fa759 100644 --- a/src/core/lib/iomgr/iomgr.cc +++ b/src/core/lib/iomgr/iomgr.cc @@ -57,10 +57,10 @@ void grpc_iomgr_init() { gpr_mu_init(&g_mu); gpr_cv_init(&g_rcv); grpc_core::Executor::InitAll(); - grpc_timer_list_init(); g_root_object.next = g_root_object.prev = &g_root_object; g_root_object.name = (char*)"root"; grpc_iomgr_platform_init(); + grpc_timer_list_init(); grpc_core::grpc_errqueue_init(); } diff --git a/src/core/lib/iomgr/timer.h b/src/core/lib/iomgr/timer.h index 17e933b8658..11da1496523 100644 --- a/src/core/lib/iomgr/timer.h +++ b/src/core/lib/iomgr/timer.h @@ -29,7 +29,8 @@ typedef struct grpc_timer { grpc_millis deadline; - uint32_t heap_index; /* INVALID_HEAP_INDEX if not in heap */ + // Uninitialized if not using heap, or INVALID_HEAP_INDEX if not in heap. + uint32_t heap_index; bool pending; struct grpc_timer* next; struct grpc_timer* prev; From 7c8d6f63756ff0871cd8e251973375078f151f4f Mon Sep 17 00:00:00 2001 From: Arjun Roy Date: Tue, 28 May 2019 17:13:41 -0700 Subject: [PATCH 71/83] s/uintptr_t/intptr_t as requested --- src/core/lib/surface/call.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/lib/surface/call.cc b/src/core/lib/surface/call.cc index 271b3ddd560..e00ac1810de 100644 --- a/src/core/lib/surface/call.cc +++ b/src/core/lib/surface/call.cc @@ -99,7 +99,7 @@ struct batch_control { } completion_data; grpc_closure start_batch; grpc_closure finish_batch; - grpc_core::Atomic steps_to_complete; + grpc_core::Atomic steps_to_complete; gpr_atm batch_error = reinterpret_cast(GRPC_ERROR_NONE); void set_num_steps_to_complete(uintptr_t steps) { steps_to_complete.Store(steps, grpc_core::MemoryOrder::RELEASE); From 14c55dea4ab8a7a24003f0497c6b166079096be1 Mon Sep 17 00:00:00 2001 From: Arjun Roy Date: Tue, 14 May 2019 16:19:07 -0700 Subject: [PATCH 72/83] Inline more of md_unref for interned metadata. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In the common case, unref() for interned metadata was performing some unnecessary branches. This patch reduces the instruction count from about 19 to 12 in the case where an unref() occured but it wasn't the last reference. This has various speedups for chttp2_hpack, metadata and fullstack pingpong benchmarks. As a tradeoff, static/external metadata unref regresses slightly (fraction of a nanosecond increase in CPU time) while interned improves (roughly 5 nanoseconds reduction in CPU time). Examples: Fullstack: BM_UnaryPingPong/8/8 [polls/iter:0 ] 7.12µs ± 4% 6.91µs ± 3% -3.00% (p=0.000 n=20+19) BM_UnaryPingPong/0/32768 [polls/iter:3.0001 ] 35.3µs ± 2% 34.9µs ± 0% -1.15% (p=0.048 n=8+4) BM_UnaryPingPong/32768/32768 [polls/iter:3.00014 ] 49.6µs ± 1% 49.0µs ± 1% -1.15% (p=0.017 n=7+3) HpackParser: BM_HpackEncoderInitDestroy 274ns ± 0% 254ns ± 0% -7.12% (p=0.000 n=19+19) BM_HpackParserParseHeader 173ns ± 0% 140ns ± 0% -19.04% (p=0.000 n=18+16) BM_HpackParserParseHeader 751ns ± 1% 702ns ± 2% -6.50% (p=0.000 n=20+20) BM_HpackParserParseHeader 50.6ns ± 0% 46.9ns ± 0% -7.29% (p=0.000 n=14+19) BM_HpackParserParseHeader 486ns ± 1% 455ns ± 0% -6.42% (p=0.000 n=20+19) BM_HpackParserParseHeader 1.17µs ± 1% 1.12µs ± 1% -4.18% (p=0.000 n=18+20) BM_HpackParserParseHeader 163ns ± 1% 155ns ± 0% -4.52% (p=0.000 n=18+17) Metadata: BM_MetadataFromInternedKeyWithBackingStore 7.32ns ± 1% 6.67ns ± 0% -8.89% (p=0.000 n=20+17) BM_MetadataFromStaticMetadataStringsNotIndexed 77.4ns ± 2% 79.6ns ± 0% +2.86% (p=0.000 n=18+19) BM_MetadataRefUnrefExternal 1.74ns ± 0% 1.79ns ± 0% +2.65% (p=0.000 n=20+19) BM_MetadataRefUnrefInterned 18.5ns ± 0% 13.3ns ± 0% -28.00% (p=0.000 n=17+17) BM_MetadataRefUnrefAllocated 18.5ns ± 0% 13.3ns ± 0% -28.00% (p=0.000 n=17+18) --- src/core/lib/transport/metadata.cc | 48 ++++++---- src/core/lib/transport/metadata.h | 135 +++++++++++++---------------- 2 files changed, 93 insertions(+), 90 deletions(-) diff --git a/src/core/lib/transport/metadata.cc b/src/core/lib/transport/metadata.cc index 2fdecc99d3e..1523ced16d8 100644 --- a/src/core/lib/transport/metadata.cc +++ b/src/core/lib/transport/metadata.cc @@ -109,13 +109,12 @@ void StaticMetadata::HashInit() { AllocatedMetadata::AllocatedMetadata(const grpc_slice& key, const grpc_slice& value) - : key_(grpc_slice_ref_internal(key)), - value_(grpc_slice_ref_internal(value)), - refcnt_(1) { + : RefcountedMdBase(grpc_slice_ref_internal(key), + grpc_slice_ref_internal(value)) { #ifndef NDEBUG if (grpc_trace_metadata.enabled()) { - char* key_str = grpc_slice_to_c_string(key_); - char* value_str = grpc_slice_to_c_string(value_); + char* key_str = grpc_slice_to_c_string(key); + char* value_str = grpc_slice_to_c_string(value); gpr_log(GPR_DEBUG, "ELM ALLOC:%p:%" PRIdPTR ": '%s' = '%s'", this, RefValue(), key_str, value_str); gpr_free(key_str); @@ -125,8 +124,8 @@ AllocatedMetadata::AllocatedMetadata(const grpc_slice& key, } AllocatedMetadata::~AllocatedMetadata() { - grpc_slice_unref_internal(key_); - grpc_slice_unref_internal(value_); + grpc_slice_unref_internal(key()); + grpc_slice_unref_internal(value()); void* user_data = user_data_.data.Load(grpc_core::MemoryOrder::RELAXED); if (user_data) { destroy_user_data_func destroy_user_data = @@ -138,15 +137,13 @@ AllocatedMetadata::~AllocatedMetadata() { InternedMetadata::InternedMetadata(const grpc_slice& key, const grpc_slice& value, uint32_t hash, InternedMetadata* next) - : key_(grpc_slice_ref_internal(key)), - value_(grpc_slice_ref_internal(value)), - hash_(hash), - refcnt_(1), + : RefcountedMdBase(grpc_slice_ref_internal(key), + grpc_slice_ref_internal(value), hash), link_(next) { #ifndef NDEBUG if (grpc_trace_metadata.enabled()) { - char* key_str = grpc_slice_to_c_string(key_); - char* value_str = grpc_slice_to_c_string(value_); + char* key_str = grpc_slice_to_c_string(key); + char* value_str = grpc_slice_to_c_string(value); gpr_log(GPR_DEBUG, "ELM NEW:%p:%" PRIdPTR ": '%s' = '%s'", this, RefValue(), key_str, value_str); gpr_free(key_str); @@ -156,8 +153,8 @@ InternedMetadata::InternedMetadata(const grpc_slice& key, } InternedMetadata::~InternedMetadata() { - grpc_slice_unref_internal(key_); - grpc_slice_unref_internal(value_); + grpc_slice_unref_internal(key()); + grpc_slice_unref_internal(value()); void* user_data = user_data_.data.Load(grpc_core::MemoryOrder::RELAXED); if (user_data) { destroy_user_data_func destroy_user_data = @@ -242,8 +239,8 @@ static int is_mdelem_static(grpc_mdelem e) { void InternedMetadata::RefWithShardLocked(mdtab_shard* shard) { #ifndef NDEBUG if (grpc_trace_metadata.enabled()) { - char* key_str = grpc_slice_to_c_string(key_); - char* value_str = grpc_slice_to_c_string(value_); + char* key_str = grpc_slice_to_c_string(key()); + char* value_str = grpc_slice_to_c_string(value()); intptr_t value = RefValue(); gpr_log(__FILE__, __LINE__, GPR_LOG_SEVERITY_DEBUG, "ELM REF:%p:%" PRIdPTR "->%" PRIdPTR ": '%s' = '%s'", this, value, @@ -498,3 +495,20 @@ void grpc_mdelem_do_unref(grpc_mdelem gmd DEBUG_ARGS) { } } } + +void grpc_mdelem_on_final_unref(grpc_mdelem_data_storage storage, void* ptr, + uint32_t hash DEBUG_ARGS) { + switch (storage) { + case GRPC_MDELEM_STORAGE_EXTERNAL: + case GRPC_MDELEM_STORAGE_STATIC: + return; + case GRPC_MDELEM_STORAGE_INTERNED: { + note_disposed_interned_metadata(hash); + break; + } + case GRPC_MDELEM_STORAGE_ALLOCATED: { + grpc_core::Delete(reinterpret_cast(ptr)); + break; + } + } +} diff --git a/src/core/lib/transport/metadata.h b/src/core/lib/transport/metadata.h index 74c69f97584..3cef031031d 100644 --- a/src/core/lib/transport/metadata.h +++ b/src/core/lib/transport/metadata.h @@ -80,17 +80,22 @@ typedef struct grpc_mdelem_data { this bit set in their integer value */ #define GRPC_MDELEM_STORAGE_INTERNED_BIT 1 +/* External and static storage metadata has no refcount to ref/unref. Allocated + * and interned metadata do have a refcount. Metadata ref and unref methods use + * a switch statement on this enum to determine which behaviour to execute. + * Keeping the no-ref cases together and the ref-cases together leads to + * slightly better code generation (9 inlined instructions rather than 10). */ typedef enum { /* memory pointed to by grpc_mdelem::payload is owned by an external system */ GRPC_MDELEM_STORAGE_EXTERNAL = 0, - /* memory pointed to by grpc_mdelem::payload is interned by the metadata - system */ - GRPC_MDELEM_STORAGE_INTERNED = GRPC_MDELEM_STORAGE_INTERNED_BIT, + /* memory is in the static metadata table */ + GRPC_MDELEM_STORAGE_STATIC = GRPC_MDELEM_STORAGE_INTERNED_BIT, /* memory pointed to by grpc_mdelem::payload is allocated by the metadata system */ GRPC_MDELEM_STORAGE_ALLOCATED = 2, - /* memory is in the static metadata table */ - GRPC_MDELEM_STORAGE_STATIC = 2 | GRPC_MDELEM_STORAGE_INTERNED_BIT, + /* memory pointed to by grpc_mdelem::payload is interned by the metadata + system */ + GRPC_MDELEM_STORAGE_INTERNED = 2 | GRPC_MDELEM_STORAGE_INTERNED_BIT, } grpc_mdelem_data_storage; struct grpc_mdelem { @@ -196,17 +201,17 @@ class StaticMetadata { uint32_t hash_; }; -class InternedMetadata { +class RefcountedMdBase { public: - struct BucketLink { - explicit BucketLink(InternedMetadata* md) : next(md) {} - - InternedMetadata* next = nullptr; - }; + RefcountedMdBase(const grpc_slice& key, const grpc_slice& value) + : key_(key), value_(value), refcnt_(1) {} + RefcountedMdBase(const grpc_slice& key, const grpc_slice& value, + uint32_t hash) + : key_(key), value_(value), refcnt_(1), hash_(hash) {} - InternedMetadata(const grpc_slice& key, const grpc_slice& value, - uint32_t hash, InternedMetadata* next); - ~InternedMetadata(); + const grpc_slice& key() const { return key_; } + const grpc_slice& value() const { return value_; } + uint32_t hash() { return hash_; } #ifndef NDEBUG void Ref(const char* file, int line) { @@ -218,92 +223,65 @@ class InternedMetadata { grpc_mdelem_trace_unref(this, key_, value_, RefValue(), file, line); return Unref(); } -#else - // We define a naked Ref() in the else-clause to make sure we don't - // inadvertently skip the assert on debug builds. +#endif void Ref() { /* we can assume the ref count is >= 1 as the application is calling this function - meaning that no adjustment to mdtab_free is necessary, simplifying the logic here to be just an atomic increment */ refcnt_.FetchAdd(1, MemoryOrder::RELAXED); } -#endif // ifndef NDEBUG bool Unref() { const intptr_t prior = refcnt_.FetchSub(1, MemoryOrder::ACQ_REL); GPR_DEBUG_ASSERT(prior > 0); return prior == 1; } - void RefWithShardLocked(mdtab_shard* shard); - const grpc_slice& key() const { return key_; } - const grpc_slice& value() const { return value_; } - UserData* user_data() { return &user_data_; } - uint32_t hash() { return hash_; } - InternedMetadata* bucket_next() { return link_.next; } - void set_bucket_next(InternedMetadata* md) { link_.next = md; } - - static size_t CleanupLinkedMetadata(BucketLink* head); - - private: + protected: + intptr_t RefValue() { return refcnt_.Load(MemoryOrder::RELAXED); } bool AllRefsDropped() { return refcnt_.Load(MemoryOrder::ACQUIRE) == 0; } bool FirstRef() { return refcnt_.FetchAdd(1, MemoryOrder::RELAXED) == 0; } - intptr_t RefValue() { return refcnt_.Load(MemoryOrder::RELAXED); } + private: /* must be byte compatible with grpc_mdelem_data */ grpc_slice key_; grpc_slice value_; - - /* private only data */ - uint32_t hash_; grpc_core::Atomic refcnt_; + uint32_t hash_ = 0; +}; - UserData user_data_; +class InternedMetadata : public RefcountedMdBase { + public: + struct BucketLink { + explicit BucketLink(InternedMetadata* md) : next(md) {} + + InternedMetadata* next = nullptr; + }; + + InternedMetadata(const grpc_slice& key, const grpc_slice& value, + uint32_t hash, InternedMetadata* next); + ~InternedMetadata(); + + void RefWithShardLocked(mdtab_shard* shard); + UserData* user_data() { return &user_data_; } + InternedMetadata* bucket_next() { return link_.next; } + void set_bucket_next(InternedMetadata* md) { link_.next = md; } + + static size_t CleanupLinkedMetadata(BucketLink* head); + private: + UserData user_data_; BucketLink link_; }; /* Shadow structure for grpc_mdelem_data for allocated elements */ -class AllocatedMetadata { +class AllocatedMetadata : public RefcountedMdBase { public: AllocatedMetadata(const grpc_slice& key, const grpc_slice& value); ~AllocatedMetadata(); - const grpc_slice& key() const { return key_; } - const grpc_slice& value() const { return value_; } UserData* user_data() { return &user_data_; } -#ifndef NDEBUG - void Ref(const char* file, int line) { - grpc_mdelem_trace_ref(this, key_, value_, RefValue(), file, line); - Ref(); - } - bool Unref(const char* file, int line) { - grpc_mdelem_trace_unref(this, key_, value_, RefValue(), file, line); - return Unref(); - } -#endif // ifndef NDEBUG - void Ref() { - /* we can assume the ref count is >= 1 as the application is calling - this function - meaning that no adjustment to mdtab_free is necessary, - simplifying the logic here to be just an atomic increment */ - refcnt_.FetchAdd(1, MemoryOrder::RELAXED); - } - bool Unref() { - const intptr_t prior = refcnt_.FetchSub(1, MemoryOrder::ACQ_REL); - GPR_DEBUG_ASSERT(prior > 0); - return prior == 1; - } - private: - intptr_t RefValue() { return refcnt_.Load(MemoryOrder::RELAXED); } - - /* must be byte compatible with grpc_mdelem_data */ - grpc_slice key_; - grpc_slice value_; - - /* private only data */ - grpc_core::Atomic refcnt_; - UserData user_data_; }; @@ -348,24 +326,35 @@ inline grpc_mdelem grpc_mdelem_ref(grpc_mdelem gmd) { #ifndef NDEBUG #define GRPC_MDELEM_UNREF(s) grpc_mdelem_unref((s), __FILE__, __LINE__) -void grpc_mdelem_do_unref(grpc_mdelem gmd, const char* file, int line); +void grpc_mdelem_on_final_unref(grpc_mdelem_data_storage storage, void* ptr, + uint32_t hash, const char* file, int line); inline void grpc_mdelem_unref(grpc_mdelem gmd, const char* file, int line) { #else #define GRPC_MDELEM_UNREF(s) grpc_mdelem_unref((s)) -void grpc_mdelem_do_unref(grpc_mdelem gmd); +void grpc_mdelem_on_final_unref(grpc_mdelem_data_storage storage, void* ptr, + uint32_t hash); inline void grpc_mdelem_unref(grpc_mdelem gmd) { #endif - switch (GRPC_MDELEM_STORAGE(gmd)) { + const grpc_mdelem_data_storage storage = GRPC_MDELEM_STORAGE(gmd); + switch (storage) { case GRPC_MDELEM_STORAGE_EXTERNAL: case GRPC_MDELEM_STORAGE_STATIC: return; case GRPC_MDELEM_STORAGE_INTERNED: case GRPC_MDELEM_STORAGE_ALLOCATED: + auto* md = + reinterpret_cast GRPC_MDELEM_DATA(gmd); + /* once the refcount hits zero, some other thread can come along and + free an interned md at any time: it's unsafe from this point on to + access it so we read the hash now. */ + uint32_t hash = md->hash(); + if (GPR_UNLIKELY(md->Unref())) { #ifndef NDEBUG - grpc_mdelem_do_unref(gmd, file, line); + grpc_mdelem_on_final_unref(storage, md, hash, file, line); #else - grpc_mdelem_do_unref(gmd); + grpc_mdelem_on_final_unref(storage, md, hash); #endif + } return; } } From 757aba8f3c0dc159a3372dc6874fc1069141c0d3 Mon Sep 17 00:00:00 2001 From: Stanley Cheung Date: Tue, 28 May 2019 13:58:59 -0700 Subject: [PATCH 73/83] PHP: Fix ZTS build error --- src/php/ext/grpc/php_grpc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/php/ext/grpc/php_grpc.c b/src/php/ext/grpc/php_grpc.c index 1098075690a..74f536ea07b 100644 --- a/src/php/ext/grpc/php_grpc.c +++ b/src/php/ext/grpc/php_grpc.c @@ -203,7 +203,7 @@ void register_fork_handlers() { } } -void apply_ini_settings() { +void apply_ini_settings(TSRMLS_D) { if (GRPC_G(enable_fork_support)) { char *enable_str = malloc(sizeof("GRPC_ENABLE_FORK_SUPPORT=1")); strcpy(enable_str, "GRPC_ENABLE_FORK_SUPPORT=1"); @@ -392,7 +392,7 @@ PHP_MINFO_FUNCTION(grpc) { */ PHP_RINIT_FUNCTION(grpc) { if (!GRPC_G(initialized)) { - apply_ini_settings(); + apply_ini_settings(TSRMLS_C); grpc_init(); register_fork_handlers(); grpc_php_init_completion_queue(TSRMLS_C); From 659f71099c163a4046c595460c119fa4cd16829d Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Wed, 29 May 2019 04:03:47 -0400 Subject: [PATCH 74/83] upgrade bazel toolchain to fix ubsan RBE build --- bazel/grpc_deps.bzl | 8 ++++---- tools/remote_build/rbe_common.bazelrc | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/bazel/grpc_deps.bzl b/bazel/grpc_deps.bzl index a4e6509782d..db24c7645b0 100644 --- a/bazel/grpc_deps.bzl +++ b/bazel/grpc_deps.bzl @@ -186,11 +186,11 @@ def grpc_deps(): if "bazel_toolchains" not in native.existing_rules(): http_archive( name = "bazel_toolchains", - sha256 = "67335b3563d9b67dc2550b8f27cc689b64fadac491e69ce78763d9ba894cc5cc", - strip_prefix = "bazel-toolchains-cddc376d428ada2927ad359211c3e356bd9c9fbb", + sha256 = "88e818f9f03628eef609c8429c210ecf265ffe46c2af095f36c7ef8b1855fef5", + strip_prefix = "bazel-toolchains-92dd8a7a518a2fb7ba992d47c8b38299fe0be825", urls = [ - "https://mirror.bazel.build/github.com/bazelbuild/bazel-toolchains/archive/cddc376d428ada2927ad359211c3e356bd9c9fbb.tar.gz", - "https://github.com/bazelbuild/bazel-toolchains/archive/cddc376d428ada2927ad359211c3e356bd9c9fbb.tar.gz", + "https://mirror.bazel.build/github.com/bazelbuild/bazel-toolchains/archive/92dd8a7a518a2fb7ba992d47c8b38299fe0be825.tar.gz", + "https://github.com/bazelbuild/bazel-toolchains/archive/92dd8a7a518a2fb7ba992d47c8b38299fe0be825.tar.gz", ], ) diff --git a/tools/remote_build/rbe_common.bazelrc b/tools/remote_build/rbe_common.bazelrc index 69394fe092b..63b49c5c42d 100644 --- a/tools/remote_build/rbe_common.bazelrc +++ b/tools/remote_build/rbe_common.bazelrc @@ -84,4 +84,4 @@ build:ubsan --copt=-gmlt # TODO(jtattermusch): use more reasonable test timeout build:ubsan --test_timeout=3600 # override the config-agnostic crosstool_top -build:ubsan --crosstool_top=@bazel_toolchains//configs/experimental/ubuntu16_04_clang/1.2/bazel_0.21.0/ubsan:toolchain +build:ubsan --crosstool_top=@bazel_toolchains//configs/experimental/ubuntu16_04_clang/1.2/bazel_0.23.0/ubsan:toolchain From fa6c944f4c53acd28aa1392f1d3e8045c1340029 Mon Sep 17 00:00:00 2001 From: HarrisonXi Date: Wed, 29 May 2019 18:39:30 +0800 Subject: [PATCH 75/83] remove notification observer to avoid iOS 8 crash --- src/objective-c/GRPCClient/GRPCCall.m | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/objective-c/GRPCClient/GRPCCall.m b/src/objective-c/GRPCClient/GRPCCall.m index 495f94289e7..ba91640269e 100644 --- a/src/objective-c/GRPCClient/GRPCCall.m +++ b/src/objective-c/GRPCClient/GRPCCall.m @@ -648,6 +648,8 @@ const char *kCFStreamVarName = "grpc_cfstream"; } - (void)dealloc { + [GRPCConnectivityMonitor unregisterObserver:self]; + __block GRPCWrappedCall *wrappedCall = _wrappedCall; dispatch_async(_callQueue, ^{ wrappedCall = nil; From d835d1bb1f455fd150b10aa2125659b404697db2 Mon Sep 17 00:00:00 2001 From: Lidi Zheng Date: Wed, 29 May 2019 10:41:38 -0700 Subject: [PATCH 76/83] Surface exception from metadata credentails plugin methods --- src/python/grpcio/grpc/_cython/_cygrpc/credentials.pxd.pxi | 4 ++-- src/python/grpcio/grpc/_cython/_cygrpc/credentials.pyx.pxi | 4 ++-- src/python/grpcio/grpc/_cython/_cygrpc/grpc.pxi | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/python/grpcio/grpc/_cython/_cygrpc/credentials.pxd.pxi b/src/python/grpcio/grpc/_cython/_cygrpc/credentials.pxd.pxi index af069acc287..05892b37324 100644 --- a/src/python/grpcio/grpc/_cython/_cygrpc/credentials.pxd.pxi +++ b/src/python/grpcio/grpc/_cython/_cygrpc/credentials.pxd.pxi @@ -26,9 +26,9 @@ cdef int _get_metadata( grpc_credentials_plugin_metadata_cb cb, void *user_data, grpc_metadata creds_md[GRPC_METADATA_CREDENTIALS_PLUGIN_SYNC_MAX], size_t *num_creds_md, grpc_status_code *status, - const char **error_details) with gil + const char **error_details) except * with gil -cdef void _destroy(void *state) with gil +cdef void _destroy(void *state) except * with gil cdef class MetadataPluginCallCredentials(CallCredentials): diff --git a/src/python/grpcio/grpc/_cython/_cygrpc/credentials.pyx.pxi b/src/python/grpcio/grpc/_cython/_cygrpc/credentials.pyx.pxi index 52ca92f2e9f..2ec1c0bc427 100644 --- a/src/python/grpcio/grpc/_cython/_cygrpc/credentials.pyx.pxi +++ b/src/python/grpcio/grpc/_cython/_cygrpc/credentials.pyx.pxi @@ -42,7 +42,7 @@ cdef int _get_metadata( grpc_credentials_plugin_metadata_cb cb, void *user_data, grpc_metadata creds_md[GRPC_METADATA_CREDENTIALS_PLUGIN_SYNC_MAX], size_t *num_creds_md, grpc_status_code *status, - const char **error_details) with gil: + const char **error_details) except * with gil: cdef size_t metadata_count cdef grpc_metadata *c_metadata def callback(metadata, grpc_status_code status, bytes error_details): @@ -57,7 +57,7 @@ cdef int _get_metadata( return 0 # Asynchronous return -cdef void _destroy(void *state) with gil: +cdef void _destroy(void *state) except * with gil: cpython.Py_DECREF(state) grpc_shutdown_blocking() diff --git a/src/python/grpcio/grpc/_cython/_cygrpc/grpc.pxi b/src/python/grpcio/grpc/_cython/_cygrpc/grpc.pxi index 057d0776983..a674c34bb23 100644 --- a/src/python/grpcio/grpc/_cython/_cygrpc/grpc.pxi +++ b/src/python/grpcio/grpc/_cython/_cygrpc/grpc.pxi @@ -546,8 +546,8 @@ cdef extern from "grpc/grpc_security.h": grpc_credentials_plugin_metadata_cb cb, void *user_data, grpc_metadata creds_md[GRPC_METADATA_CREDENTIALS_PLUGIN_SYNC_MAX], size_t *num_creds_md, grpc_status_code *status, - const char **error_details) - void (*destroy)(void *state) + const char **error_details) except * + void (*destroy)(void *state) except * void *state const char *type From b790c24e5c3b0135a16e472a7badb868334d7eb6 Mon Sep 17 00:00:00 2001 From: Karthik Ravi Shankar Date: Wed, 29 May 2019 11:20:36 -0700 Subject: [PATCH 77/83] Revert "Start supporting a callback-based RPC under lock" --- src/core/lib/surface/completion_queue.cc | 85 ++++++++----------- src/core/lib/surface/completion_queue.h | 3 +- src/core/lib/surface/server.cc | 2 +- test/core/surface/completion_queue_test.cc | 44 +--------- .../end2end/client_callback_end2end_test.cc | 28 ------ test/cpp/microbenchmarks/bm_cq.cc | 35 +------- .../callback_streaming_ping_pong.h | 2 +- 7 files changed, 42 insertions(+), 157 deletions(-) diff --git a/src/core/lib/surface/completion_queue.cc b/src/core/lib/surface/completion_queue.cc index d0ed1a9f673..e796071eedc 100644 --- a/src/core/lib/surface/completion_queue.cc +++ b/src/core/lib/surface/completion_queue.cc @@ -34,7 +34,6 @@ #include "src/core/lib/gpr/string.h" #include "src/core/lib/gpr/tls.h" #include "src/core/lib/gprpp/atomic.h" -#include "src/core/lib/iomgr/executor.h" #include "src/core/lib/iomgr/pollset.h" #include "src/core/lib/iomgr/timer.h" #include "src/core/lib/profiling/timers.h" @@ -201,7 +200,7 @@ struct cq_vtable { bool (*begin_op)(grpc_completion_queue* cq, void* tag); void (*end_op)(grpc_completion_queue* cq, void* tag, grpc_error* error, void (*done)(void* done_arg, grpc_cq_completion* storage), - void* done_arg, grpc_cq_completion* storage, bool internal); + void* done_arg, grpc_cq_completion* storage); grpc_event (*next)(grpc_completion_queue* cq, gpr_timespec deadline, void* reserved); grpc_event (*pluck)(grpc_completion_queue* cq, void* tag, @@ -355,20 +354,23 @@ static bool cq_begin_op_for_callback(grpc_completion_queue* cq, void* tag); // queue. The done argument is a callback that will be invoked when it is // safe to free up that storage. The storage MUST NOT be freed until the // done callback is invoked. -static void cq_end_op_for_next( - grpc_completion_queue* cq, void* tag, grpc_error* error, - void (*done)(void* done_arg, grpc_cq_completion* storage), void* done_arg, - grpc_cq_completion* storage, bool internal); - -static void cq_end_op_for_pluck( - grpc_completion_queue* cq, void* tag, grpc_error* error, - void (*done)(void* done_arg, grpc_cq_completion* storage), void* done_arg, - grpc_cq_completion* storage, bool internal); - -static void cq_end_op_for_callback( - grpc_completion_queue* cq, void* tag, grpc_error* error, - void (*done)(void* done_arg, grpc_cq_completion* storage), void* done_arg, - grpc_cq_completion* storage, bool internal); +static void cq_end_op_for_next(grpc_completion_queue* cq, void* tag, + grpc_error* error, + void (*done)(void* done_arg, + grpc_cq_completion* storage), + void* done_arg, grpc_cq_completion* storage); + +static void cq_end_op_for_pluck(grpc_completion_queue* cq, void* tag, + grpc_error* error, + void (*done)(void* done_arg, + grpc_cq_completion* storage), + void* done_arg, grpc_cq_completion* storage); + +static void cq_end_op_for_callback(grpc_completion_queue* cq, void* tag, + grpc_error* error, + void (*done)(void* done_arg, + grpc_cq_completion* storage), + void* done_arg, grpc_cq_completion* storage); static grpc_event cq_next(grpc_completion_queue* cq, gpr_timespec deadline, void* reserved); @@ -672,10 +674,11 @@ bool grpc_cq_begin_op(grpc_completion_queue* cq, void* tag) { /* Queue a GRPC_OP_COMPLETED operation to a completion queue (with a * completion * type of GRPC_CQ_NEXT) */ -static void cq_end_op_for_next( - grpc_completion_queue* cq, void* tag, grpc_error* error, - void (*done)(void* done_arg, grpc_cq_completion* storage), void* done_arg, - grpc_cq_completion* storage, bool internal) { +static void cq_end_op_for_next(grpc_completion_queue* cq, void* tag, + grpc_error* error, + void (*done)(void* done_arg, + grpc_cq_completion* storage), + void* done_arg, grpc_cq_completion* storage) { GPR_TIMER_SCOPE("cq_end_op_for_next", 0); if (GRPC_TRACE_FLAG_ENABLED(grpc_api_trace) || @@ -751,10 +754,11 @@ static void cq_end_op_for_next( /* Queue a GRPC_OP_COMPLETED operation to a completion queue (with a * completion * type of GRPC_CQ_PLUCK) */ -static void cq_end_op_for_pluck( - grpc_completion_queue* cq, void* tag, grpc_error* error, - void (*done)(void* done_arg, grpc_cq_completion* storage), void* done_arg, - grpc_cq_completion* storage, bool internal) { +static void cq_end_op_for_pluck(grpc_completion_queue* cq, void* tag, + grpc_error* error, + void (*done)(void* done_arg, + grpc_cq_completion* storage), + void* done_arg, grpc_cq_completion* storage) { GPR_TIMER_SCOPE("cq_end_op_for_pluck", 0); cq_pluck_data* cqd = static_cast DATA_FROM_CQ(cq); @@ -817,19 +821,15 @@ static void cq_end_op_for_pluck( GRPC_ERROR_UNREF(error); } -static void functor_callback(void* arg, grpc_error* error) { - auto* functor = static_cast(arg); - functor->functor_run(functor, error == GRPC_ERROR_NONE); -} - /* Complete an event on a completion queue of type GRPC_CQ_CALLBACK */ static void cq_end_op_for_callback( grpc_completion_queue* cq, void* tag, grpc_error* error, void (*done)(void* done_arg, grpc_cq_completion* storage), void* done_arg, - grpc_cq_completion* storage, bool internal) { + grpc_cq_completion* storage) { GPR_TIMER_SCOPE("cq_end_op_for_callback", 0); cq_callback_data* cqd = static_cast DATA_FROM_CQ(cq); + bool is_success = (error == GRPC_ERROR_NONE); if (GRPC_TRACE_FLAG_ENABLED(grpc_api_trace) || (GRPC_TRACE_FLAG_ENABLED(grpc_trace_operation_failures) && @@ -856,25 +856,16 @@ static void cq_end_op_for_callback( cq_finish_shutdown_callback(cq); } - auto* functor = static_cast(tag); - if (internal) { - grpc_core::ApplicationCallbackExecCtx::Enqueue(functor, - (error == GRPC_ERROR_NONE)); - } else { - GRPC_CLOSURE_SCHED( - GRPC_CLOSURE_CREATE( - functor_callback, functor, - grpc_core::Executor::Scheduler(grpc_core::ExecutorJobType::SHORT)), - GRPC_ERROR_REF(error)); - } GRPC_ERROR_UNREF(error); + + auto* functor = static_cast(tag); + grpc_core::ApplicationCallbackExecCtx::Enqueue(functor, is_success); } void grpc_cq_end_op(grpc_completion_queue* cq, void* tag, grpc_error* error, void (*done)(void* done_arg, grpc_cq_completion* storage), - void* done_arg, grpc_cq_completion* storage, - bool internal) { - cq->vtable->end_op(cq, tag, error, done, done_arg, storage, internal); + void* done_arg, grpc_cq_completion* storage) { + cq->vtable->end_op(cq, tag, error, done, done_arg, storage); } typedef struct { @@ -1352,11 +1343,7 @@ static void cq_finish_shutdown_callback(grpc_completion_queue* cq) { GPR_ASSERT(cqd->shutdown_called); cq->poller_vtable->shutdown(POLLSET_FROM_CQ(cq), &cq->pollset_shutdown_done); - GRPC_CLOSURE_SCHED( - GRPC_CLOSURE_CREATE( - functor_callback, callback, - grpc_core::Executor::Scheduler(grpc_core::ExecutorJobType::SHORT)), - GRPC_ERROR_NONE); + grpc_core::ApplicationCallbackExecCtx::Enqueue(callback, true); } static void cq_shutdown_callback(grpc_completion_queue* cq) { diff --git a/src/core/lib/surface/completion_queue.h b/src/core/lib/surface/completion_queue.h index 3ba9fbb8765..d60fe6d6efe 100644 --- a/src/core/lib/surface/completion_queue.h +++ b/src/core/lib/surface/completion_queue.h @@ -77,8 +77,7 @@ bool grpc_cq_begin_op(grpc_completion_queue* cc, void* tag); grpc_cq_begin_op */ void grpc_cq_end_op(grpc_completion_queue* cc, void* tag, grpc_error* error, void (*done)(void* done_arg, grpc_cq_completion* storage), - void* done_arg, grpc_cq_completion* storage, - bool internal = false); + void* done_arg, grpc_cq_completion* storage); grpc_pollset* grpc_cq_pollset(grpc_completion_queue* cc); diff --git a/src/core/lib/surface/server.cc b/src/core/lib/surface/server.cc index 44de0cd42dd..5ecd5662c2c 100644 --- a/src/core/lib/surface/server.cc +++ b/src/core/lib/surface/server.cc @@ -513,7 +513,7 @@ static void publish_call(grpc_server* server, call_data* calld, size_t cq_idx, } grpc_cq_end_op(calld->cq_new, rc->tag, GRPC_ERROR_NONE, done_request_event, - rc, &rc->completion, true); + rc, &rc->completion); } static void publish_new_rpc(void* arg, grpc_error* error) { diff --git a/test/core/surface/completion_queue_test.cc b/test/core/surface/completion_queue_test.cc index 4a33b934f43..7c3630eaf18 100644 --- a/test/core/surface/completion_queue_test.cc +++ b/test/core/surface/completion_queue_test.cc @@ -23,7 +23,6 @@ #include #include "src/core/lib/gpr/useful.h" #include "src/core/lib/gprpp/memory.h" -#include "src/core/lib/gprpp/sync.h" #include "src/core/lib/iomgr/iomgr.h" #include "test/core/util/test_config.h" @@ -360,19 +359,12 @@ static void test_pluck_after_shutdown(void) { static void test_callback(void) { grpc_completion_queue* cc; - static void* tags[128]; + void* tags[128]; grpc_cq_completion completions[GPR_ARRAY_SIZE(tags)]; grpc_cq_polling_type polling_types[] = { GRPC_CQ_DEFAULT_POLLING, GRPC_CQ_NON_LISTENING, GRPC_CQ_NON_POLLING}; grpc_completion_queue_attributes attr; unsigned i; - static gpr_mu mu, shutdown_mu; - static gpr_cv cv, shutdown_cv; - static int cb_counter; - gpr_mu_init(&mu); - gpr_mu_init(&shutdown_mu); - gpr_cv_init(&cv); - gpr_cv_init(&shutdown_cv); LOG_TEST("test_callback"); @@ -384,11 +376,7 @@ static void test_callback(void) { } ~ShutdownCallback() {} static void Run(grpc_experimental_completion_queue_functor* cb, int ok) { - gpr_mu_lock(&shutdown_mu); *static_cast(cb)->done_ = static_cast(ok); - // Signal when the shutdown callback is completed. - gpr_cv_signal(&shutdown_cv); - gpr_mu_unlock(&shutdown_mu); } private: @@ -403,9 +391,9 @@ static void test_callback(void) { for (size_t pidx = 0; pidx < GPR_ARRAY_SIZE(polling_types); pidx++) { int sumtags = 0; int counter = 0; - cb_counter = 0; { // reset exec_ctx types + grpc_core::ApplicationCallbackExecCtx callback_exec_ctx; grpc_core::ExecCtx exec_ctx; attr.cq_polling_type = polling_types[pidx]; cc = grpc_completion_queue_create( @@ -421,13 +409,7 @@ static void test_callback(void) { int ok) { GPR_ASSERT(static_cast(ok)); auto* callback = static_cast(cb); - gpr_mu_lock(&mu); - cb_counter++; *callback->counter_ += callback->tag_; - if (cb_counter == GPR_ARRAY_SIZE(tags)) { - gpr_cv_signal(&cv); - } - gpr_mu_unlock(&mu); grpc_core::Delete(callback); }; @@ -447,34 +429,12 @@ static void test_callback(void) { nullptr, &completions[i]); } - gpr_mu_lock(&mu); - while (cb_counter != GPR_ARRAY_SIZE(tags)) { - // Wait for all the callbacks to complete. - gpr_cv_wait(&cv, &mu, gpr_inf_future(GPR_CLOCK_REALTIME)); - } - gpr_mu_unlock(&mu); - shutdown_and_destroy(cc); - - gpr_mu_lock(&shutdown_mu); - while (!got_shutdown) { - // Wait for the shutdown callback to complete. - gpr_cv_wait(&shutdown_cv, &shutdown_mu, - gpr_inf_future(GPR_CLOCK_REALTIME)); - } - gpr_mu_unlock(&shutdown_mu); } - - // Run the assertions to check if the test ran successfully. GPR_ASSERT(sumtags == counter); GPR_ASSERT(got_shutdown); got_shutdown = false; } - - gpr_cv_destroy(&cv); - gpr_cv_destroy(&shutdown_cv); - gpr_mu_destroy(&mu); - gpr_mu_destroy(&shutdown_mu); } struct thread_state { diff --git a/test/cpp/end2end/client_callback_end2end_test.cc b/test/cpp/end2end/client_callback_end2end_test.cc index 8cf6def1073..a154324216b 100644 --- a/test/cpp/end2end/client_callback_end2end_test.cc +++ b/test/cpp/end2end/client_callback_end2end_test.cc @@ -374,34 +374,6 @@ TEST_P(ClientCallbackEnd2endTest, SimpleRpc) { SendRpcs(1, false); } -TEST_P(ClientCallbackEnd2endTest, SimpleRpcUnderLock) { - MAYBE_SKIP_TEST; - ResetStub(); - std::mutex mu; - std::condition_variable cv; - bool done = false; - EchoRequest request; - request.set_message("Hello locked world."); - EchoResponse response; - ClientContext cli_ctx; - { - std::lock_guard l(mu); - stub_->experimental_async()->Echo( - &cli_ctx, &request, &response, - [&mu, &cv, &done, &request, &response](Status s) { - std::lock_guard l(mu); - EXPECT_TRUE(s.ok()); - EXPECT_EQ(request.message(), response.message()); - done = true; - cv.notify_one(); - }); - } - std::unique_lock l(mu); - while (!done) { - cv.wait(l); - } -} - TEST_P(ClientCallbackEnd2endTest, SequentialRpcs) { MAYBE_SKIP_TEST; ResetStub(); diff --git a/test/cpp/microbenchmarks/bm_cq.cc b/test/cpp/microbenchmarks/bm_cq.cc index edbff9c2be3..50eb9454fbe 100644 --- a/test/cpp/microbenchmarks/bm_cq.cc +++ b/test/cpp/microbenchmarks/bm_cq.cc @@ -150,9 +150,6 @@ static void shutdown_and_destroy(grpc_completion_queue* cc) { grpc_completion_queue_destroy(cc); } -static gpr_mu shutdown_mu, mu; -static gpr_cv shutdown_cv, cv; - // Tag completion queue iterate times class TagCallback : public grpc_experimental_completion_queue_functor { public: @@ -161,11 +158,8 @@ class TagCallback : public grpc_experimental_completion_queue_functor { } ~TagCallback() {} static void Run(grpc_experimental_completion_queue_functor* cb, int ok) { - gpr_mu_lock(&mu); GPR_ASSERT(static_cast(ok)); *static_cast(cb)->iter_ += 1; - gpr_cv_signal(&cv); - gpr_mu_unlock(&mu); }; private: @@ -180,10 +174,7 @@ class ShutdownCallback : public grpc_experimental_completion_queue_functor { } ~ShutdownCallback() {} static void Run(grpc_experimental_completion_queue_functor* cb, int ok) { - gpr_mu_lock(&shutdown_mu); *static_cast(cb)->done_ = static_cast(ok); - gpr_cv_signal(&shutdown_cv); - gpr_mu_unlock(&shutdown_mu); } private: @@ -192,12 +183,8 @@ class ShutdownCallback : public grpc_experimental_completion_queue_functor { static void BM_Callback_CQ_Pass1Core(benchmark::State& state) { TrackCounters track_counters; - int iteration = 0, current_iterations = 0; + int iteration = 0; TagCallback tag_cb(&iteration); - gpr_mu_init(&mu); - gpr_cv_init(&cv); - gpr_mu_init(&shutdown_mu); - gpr_cv_init(&shutdown_cv); bool got_shutdown = false; ShutdownCallback shutdown_cb(&got_shutdown); grpc_completion_queue* cc = @@ -211,29 +198,9 @@ static void BM_Callback_CQ_Pass1Core(benchmark::State& state) { nullptr, &completion); } shutdown_and_destroy(cc); - - gpr_mu_lock(&mu); - current_iterations = static_cast(state.iterations()); - while (current_iterations != iteration) { - // Wait for all the callbacks to complete. - gpr_cv_wait(&cv, &mu, gpr_inf_future(GPR_CLOCK_REALTIME)); - } - gpr_mu_unlock(&mu); - - gpr_mu_lock(&shutdown_mu); - while (!got_shutdown) { - // Wait for the shutdown callback to complete. - gpr_cv_wait(&shutdown_cv, &shutdown_mu, gpr_inf_future(GPR_CLOCK_REALTIME)); - } - gpr_mu_unlock(&shutdown_mu); - GPR_ASSERT(got_shutdown); GPR_ASSERT(iteration == static_cast(state.iterations())); track_counters.Finish(state); - gpr_cv_destroy(&cv); - gpr_mu_destroy(&mu); - gpr_cv_destroy(&shutdown_cv); - gpr_mu_destroy(&shutdown_mu); } BENCHMARK(BM_Callback_CQ_Pass1Core); diff --git a/test/cpp/microbenchmarks/callback_streaming_ping_pong.h b/test/cpp/microbenchmarks/callback_streaming_ping_pong.h index 0d27e0efa50..9fb86bd8299 100644 --- a/test/cpp/microbenchmarks/callback_streaming_ping_pong.h +++ b/test/cpp/microbenchmarks/callback_streaming_ping_pong.h @@ -115,7 +115,7 @@ class BidiClient int msgs_size_; std::mutex mu; std::condition_variable cv; - bool done = false; + bool done; }; template From 28ccd61cf5ebab2b48301b51b98efb7743f39246 Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Wed, 29 May 2019 12:21:15 -0700 Subject: [PATCH 78/83] Use SubchannelInterface to hide implementation from LB policy API. --- BUILD | 1 + BUILD.gn | 1 + build.yaml | 1 + gRPC-C++.podspec | 1 + gRPC-Core.podspec | 2 + grpc.gemspec | 1 + package.xml | 1 + .../filters/client_channel/client_channel.cc | 123 ++++++++++++++---- .../ext/filters/client_channel/lb_policy.h | 8 +- .../client_channel/lb_policy/grpclb/grpclb.cc | 6 +- .../lb_policy/pick_first/pick_first.cc | 10 +- .../lb_policy/round_robin/round_robin.cc | 7 +- .../lb_policy/subchannel_list.h | 91 ++++++------- .../client_channel/lb_policy/xds/xds.cc | 11 +- .../client_channel/resolving_lb_policy.cc | 5 +- .../client_channel/resolving_lb_policy.h | 3 +- .../ext/filters/client_channel/subchannel.cc | 26 +--- .../ext/filters/client_channel/subchannel.h | 46 ++----- .../client_channel/subchannel_interface.h | 109 ++++++++++++++++ test/core/util/test_lb_policies.cc | 3 +- tools/doxygen/Doxyfile.core.internal | 1 + .../generated/sources_and_headers.json | 2 + 22 files changed, 302 insertions(+), 157 deletions(-) create mode 100644 src/core/ext/filters/client_channel/subchannel_interface.h diff --git a/BUILD b/BUILD index 63744760bfd..e0827d46cb1 100644 --- a/BUILD +++ b/BUILD @@ -1143,6 +1143,7 @@ grpc_cc_library( "src/core/ext/filters/client_channel/server_address.h", "src/core/ext/filters/client_channel/service_config.h", "src/core/ext/filters/client_channel/subchannel.h", + "src/core/ext/filters/client_channel/subchannel_interface.h", "src/core/ext/filters/client_channel/subchannel_pool_interface.h", ], language = "c++", diff --git a/BUILD.gn b/BUILD.gn index 14e5c3f0b5f..258cdc9f873 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -345,6 +345,7 @@ config("grpc_config") { "src/core/ext/filters/client_channel/service_config.h", "src/core/ext/filters/client_channel/subchannel.cc", "src/core/ext/filters/client_channel/subchannel.h", + "src/core/ext/filters/client_channel/subchannel_interface.h", "src/core/ext/filters/client_channel/subchannel_pool_interface.cc", "src/core/ext/filters/client_channel/subchannel_pool_interface.h", "src/core/ext/filters/deadline/deadline_filter.cc", diff --git a/build.yaml b/build.yaml index 529afecbb33..5c085f18787 100644 --- a/build.yaml +++ b/build.yaml @@ -595,6 +595,7 @@ filegroups: - src/core/ext/filters/client_channel/server_address.h - src/core/ext/filters/client_channel/service_config.h - src/core/ext/filters/client_channel/subchannel.h + - src/core/ext/filters/client_channel/subchannel_interface.h - src/core/ext/filters/client_channel/subchannel_pool_interface.h src: - src/core/ext/filters/client_channel/backup_poller.cc diff --git a/gRPC-C++.podspec b/gRPC-C++.podspec index 0ce31532629..3b463cf7b90 100644 --- a/gRPC-C++.podspec +++ b/gRPC-C++.podspec @@ -399,6 +399,7 @@ Pod::Spec.new do |s| 'src/core/ext/filters/client_channel/server_address.h', 'src/core/ext/filters/client_channel/service_config.h', 'src/core/ext/filters/client_channel/subchannel.h', + 'src/core/ext/filters/client_channel/subchannel_interface.h', 'src/core/ext/filters/client_channel/subchannel_pool_interface.h', 'src/core/ext/filters/deadline/deadline_filter.h', 'src/core/ext/filters/client_channel/health/health.pb.h', diff --git a/gRPC-Core.podspec b/gRPC-Core.podspec index 8ad00aad096..85add8fb7a2 100644 --- a/gRPC-Core.podspec +++ b/gRPC-Core.podspec @@ -371,6 +371,7 @@ Pod::Spec.new do |s| 'src/core/ext/filters/client_channel/server_address.h', 'src/core/ext/filters/client_channel/service_config.h', 'src/core/ext/filters/client_channel/subchannel.h', + 'src/core/ext/filters/client_channel/subchannel_interface.h', 'src/core/ext/filters/client_channel/subchannel_pool_interface.h', 'src/core/ext/filters/deadline/deadline_filter.h', 'src/core/ext/filters/client_channel/health/health.pb.h', @@ -1023,6 +1024,7 @@ Pod::Spec.new do |s| 'src/core/ext/filters/client_channel/server_address.h', 'src/core/ext/filters/client_channel/service_config.h', 'src/core/ext/filters/client_channel/subchannel.h', + 'src/core/ext/filters/client_channel/subchannel_interface.h', 'src/core/ext/filters/client_channel/subchannel_pool_interface.h', 'src/core/ext/filters/deadline/deadline_filter.h', 'src/core/ext/filters/client_channel/health/health.pb.h', diff --git a/grpc.gemspec b/grpc.gemspec index 0bbf10fb361..e9d215bf10f 100644 --- a/grpc.gemspec +++ b/grpc.gemspec @@ -305,6 +305,7 @@ Gem::Specification.new do |s| s.files += %w( src/core/ext/filters/client_channel/server_address.h ) s.files += %w( src/core/ext/filters/client_channel/service_config.h ) s.files += %w( src/core/ext/filters/client_channel/subchannel.h ) + s.files += %w( src/core/ext/filters/client_channel/subchannel_interface.h ) s.files += %w( src/core/ext/filters/client_channel/subchannel_pool_interface.h ) s.files += %w( src/core/ext/filters/deadline/deadline_filter.h ) s.files += %w( src/core/ext/filters/client_channel/health/health.pb.h ) diff --git a/package.xml b/package.xml index eca74c8f167..fd712698a62 100644 --- a/package.xml +++ b/package.xml @@ -310,6 +310,7 @@ + diff --git a/src/core/ext/filters/client_channel/client_channel.cc b/src/core/ext/filters/client_channel/client_channel.cc index 5717d3e66d2..6b6045c98f6 100644 --- a/src/core/ext/filters/client_channel/client_channel.cc +++ b/src/core/ext/filters/client_channel/client_channel.cc @@ -51,6 +51,7 @@ #include "src/core/lib/gpr/string.h" #include "src/core/lib/gprpp/inlined_vector.h" #include "src/core/lib/gprpp/manual_constructor.h" +#include "src/core/lib/gprpp/map.h" #include "src/core/lib/gprpp/sync.h" #include "src/core/lib/iomgr/combiner.h" #include "src/core/lib/iomgr/iomgr.h" @@ -174,6 +175,7 @@ class ChannelData { private: class ConnectivityStateAndPickerSetter; class ServiceConfigSetter; + class GrpcSubchannel; class ClientChannelControlHelper; class ExternalConnectivityWatcher { @@ -221,7 +223,7 @@ class ChannelData { ~ChannelData(); static bool ProcessResolverResultLocked( - void* arg, Resolver::Result* result, const char** lb_policy_name, + void* arg, const Resolver::Result& result, const char** lb_policy_name, RefCountedPtr* lb_policy_config, grpc_error** service_config_error); @@ -270,6 +272,7 @@ class ChannelData { OrphanablePtr resolving_lb_policy_; grpc_connectivity_state_tracker state_tracker_; ExternalConnectivityWatcher::WatcherList external_connectivity_watcher_list_; + UniquePtr health_check_service_name_; RefCountedPtr saved_service_config_; bool received_first_resolver_result_ = false; @@ -954,6 +957,65 @@ void ChannelData::ExternalConnectivityWatcher::WatchConnectivityStateLocked( &self->chand_->state_tracker_, self->state_, &self->my_closure_); } +// +// ChannelData::GrpcSubchannel +// + +// This class is a wrapper for Subchannel that hides details of the +// channel's implementation (such as the health check service name) from +// the LB policy API. +// +// Note that no synchronization is needed here, because even if the +// underlying subchannel is shared between channels, this wrapper will only +// be used within one channel, so it will always be synchronized by the +// control plane combiner. +class ChannelData::GrpcSubchannel : public SubchannelInterface { + public: + GrpcSubchannel(Subchannel* subchannel, + UniquePtr health_check_service_name) + : subchannel_(subchannel), + health_check_service_name_(std::move(health_check_service_name)) {} + + ~GrpcSubchannel() { GRPC_SUBCHANNEL_UNREF(subchannel_, "unref from LB"); } + + grpc_connectivity_state CheckConnectivityState( + RefCountedPtr* connected_subchannel) + override { + RefCountedPtr tmp; + auto retval = subchannel_->CheckConnectivityState( + health_check_service_name_.get(), &tmp); + *connected_subchannel = std::move(tmp); + return retval; + } + + void WatchConnectivityState( + grpc_connectivity_state initial_state, + UniquePtr watcher) override { + subchannel_->WatchConnectivityState( + initial_state, + UniquePtr(gpr_strdup(health_check_service_name_.get())), + std::move(watcher)); + } + + void CancelConnectivityStateWatch( + ConnectivityStateWatcher* watcher) override { + subchannel_->CancelConnectivityStateWatch(health_check_service_name_.get(), + watcher); + } + + void AttemptToConnect() override { subchannel_->AttemptToConnect(); } + + channelz::SubchannelNode* channelz_node() override { + return subchannel_->channelz_node(); + } + + void ResetBackoff() override { subchannel_->ResetBackoff(); } + + private: + Subchannel* subchannel_; + UniquePtr health_check_service_name_; +}; + // // ChannelData::ClientChannelControlHelper // @@ -970,15 +1032,26 @@ class ChannelData::ClientChannelControlHelper "ClientChannelControlHelper"); } - Subchannel* CreateSubchannel(const grpc_channel_args& args) override { + RefCountedPtr CreateSubchannel( + const grpc_channel_args& args) override { + bool inhibit_health_checking = grpc_channel_arg_get_bool( + grpc_channel_args_find(&args, GRPC_ARG_INHIBIT_HEALTH_CHECKING), false); + UniquePtr health_check_service_name; + if (!inhibit_health_checking) { + health_check_service_name.reset( + gpr_strdup(chand_->health_check_service_name_.get())); + } + static const char* args_to_remove[] = {GRPC_ARG_INHIBIT_HEALTH_CHECKING}; grpc_arg arg = SubchannelPoolInterface::CreateChannelArg( chand_->subchannel_pool_.get()); - grpc_channel_args* new_args = - grpc_channel_args_copy_and_add(&args, &arg, 1); + grpc_channel_args* new_args = grpc_channel_args_copy_and_add_and_remove( + &args, args_to_remove, GPR_ARRAY_SIZE(args_to_remove), &arg, 1); Subchannel* subchannel = chand_->client_channel_factory_->CreateSubchannel(new_args); grpc_channel_args_destroy(new_args); - return subchannel; + if (subchannel == nullptr) return nullptr; + return MakeRefCounted(subchannel, + std::move(health_check_service_name)); } grpc_channel* CreateChannel(const char* target, @@ -1211,14 +1284,14 @@ void ChannelData::ProcessLbPolicy( // Synchronous callback from ResolvingLoadBalancingPolicy to process a // resolver result update. bool ChannelData::ProcessResolverResultLocked( - void* arg, Resolver::Result* result, const char** lb_policy_name, + void* arg, const Resolver::Result& result, const char** lb_policy_name, RefCountedPtr* lb_policy_config, grpc_error** service_config_error) { ChannelData* chand = static_cast(arg); RefCountedPtr service_config; // If resolver did not return a service config or returned an invalid service // config, we need a fallback service config. - if (result->service_config_error != GRPC_ERROR_NONE) { + if (result.service_config_error != GRPC_ERROR_NONE) { // If the service config was invalid, then fallback to the saved service // config. If there is no saved config either, use the default service // config. @@ -1239,7 +1312,7 @@ bool ChannelData::ProcessResolverResultLocked( } service_config = chand->default_service_config_; } - } else if (result->service_config == nullptr) { + } else if (result.service_config == nullptr) { if (chand->default_service_config_ != nullptr) { if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_routing_trace)) { gpr_log(GPR_INFO, @@ -1250,11 +1323,11 @@ bool ChannelData::ProcessResolverResultLocked( service_config = chand->default_service_config_; } } else { - service_config = result->service_config; + service_config = result.service_config; } - *service_config_error = GRPC_ERROR_REF(result->service_config_error); + *service_config_error = GRPC_ERROR_REF(result.service_config_error); if (service_config == nullptr && - result->service_config_error != GRPC_ERROR_NONE) { + result.service_config_error != GRPC_ERROR_NONE) { return false; } // Process service config. @@ -1267,19 +1340,6 @@ bool ChannelData::ProcessResolverResultLocked( service_config->GetGlobalParsedConfig( internal::ClientChannelServiceConfigParser::ParserIndex())); } - // TODO(roth): Eliminate this hack as part of hiding health check - // service name from LB policy API. As part of this, change the API - // for this function to pass in result as a const reference. - if (parsed_service_config != nullptr && - parsed_service_config->health_check_service_name() != nullptr) { - grpc_arg new_arg = grpc_channel_arg_string_create( - const_cast("grpc.temp.health_check"), - const_cast(parsed_service_config->health_check_service_name())); - grpc_channel_args* new_args = - grpc_channel_args_copy_and_add(result->args, &new_arg, 1); - grpc_channel_args_destroy(result->args); - result->args = new_args; - } // Check if the config has changed. const bool service_config_changed = ((service_config == nullptr) != @@ -1296,6 +1356,14 @@ bool ChannelData::ProcessResolverResultLocked( "chand=%p: resolver returned updated service config: \"%s\"", chand, service_config_json.get()); } + // Save health check service name. + if (service_config != nullptr) { + chand->health_check_service_name_.reset( + gpr_strdup(parsed_service_config->health_check_service_name())); + } else { + chand->health_check_service_name_.reset(); + } + // Save service config. chand->saved_service_config_ = std::move(service_config); } // We want to set the service config at least once. This should not really be @@ -1314,7 +1382,7 @@ bool ChannelData::ProcessResolverResultLocked( chand->saved_service_config_); } UniquePtr processed_lb_policy_name; - chand->ProcessLbPolicy(*result, parsed_service_config, + chand->ProcessLbPolicy(result, parsed_service_config, &processed_lb_policy_name, lb_policy_config); // Swap out the data used by GetChannelInfo(). { @@ -1336,8 +1404,9 @@ grpc_error* ChannelData::DoPingLocked(grpc_transport_op* op) { LoadBalancingPolicy::PickResult result = picker_->Pick(LoadBalancingPolicy::PickArgs()); if (result.connected_subchannel != nullptr) { - result.connected_subchannel->Ping(op->send_ping.on_initiate, - op->send_ping.on_ack); + ConnectedSubchannel* connected_subchannel = + static_cast(result.connected_subchannel.get()); + connected_subchannel->Ping(op->send_ping.on_initiate, op->send_ping.on_ack); } else { if (result.error == GRPC_ERROR_NONE) { result.error = GRPC_ERROR_CREATE_FROM_STATIC_STRING( diff --git a/src/core/ext/filters/client_channel/lb_policy.h b/src/core/ext/filters/client_channel/lb_policy.h index 5920254a9ef..2cadcc31998 100644 --- a/src/core/ext/filters/client_channel/lb_policy.h +++ b/src/core/ext/filters/client_channel/lb_policy.h @@ -24,7 +24,7 @@ #include "src/core/ext/filters/client_channel/client_channel_channelz.h" #include "src/core/ext/filters/client_channel/server_address.h" #include "src/core/ext/filters/client_channel/service_config.h" -#include "src/core/ext/filters/client_channel/subchannel.h" +#include "src/core/ext/filters/client_channel/subchannel_interface.h" #include "src/core/lib/gprpp/abstract.h" #include "src/core/lib/gprpp/orphanable.h" #include "src/core/lib/gprpp/ref_counted_ptr.h" @@ -128,7 +128,7 @@ class LoadBalancingPolicy : public InternallyRefCounted { /// Used only if type is PICK_COMPLETE. Will be set to the selected /// subchannel, or nullptr if the LB policy decides to drop the call. - RefCountedPtr connected_subchannel; + RefCountedPtr connected_subchannel; /// Used only if type is PICK_TRANSIENT_FAILURE. /// Error to be set when returning a transient failure. @@ -184,8 +184,8 @@ class LoadBalancingPolicy : public InternallyRefCounted { virtual ~ChannelControlHelper() = default; /// Creates a new subchannel with the specified channel args. - virtual Subchannel* CreateSubchannel(const grpc_channel_args& args) - GRPC_ABSTRACT; + virtual RefCountedPtr CreateSubchannel( + const grpc_channel_args& args) GRPC_ABSTRACT; /// Creates a channel with the specified target and channel args. /// This can be used in cases where the LB policy needs to create a diff --git a/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc b/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc index 2c652e4c6e6..a3a2a44eb0e 100644 --- a/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc +++ b/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc @@ -293,7 +293,8 @@ class GrpcLb : public LoadBalancingPolicy { explicit Helper(RefCountedPtr parent) : parent_(std::move(parent)) {} - Subchannel* CreateSubchannel(const grpc_channel_args& args) override; + RefCountedPtr CreateSubchannel( + const grpc_channel_args& args) override; grpc_channel* CreateChannel(const char* target, const grpc_channel_args& args) override; void UpdateState(grpc_connectivity_state state, @@ -620,7 +621,8 @@ bool GrpcLb::Helper::CalledByCurrentChild() const { return child_ == parent_->child_policy_.get(); } -Subchannel* GrpcLb::Helper::CreateSubchannel(const grpc_channel_args& args) { +RefCountedPtr GrpcLb::Helper::CreateSubchannel( + const grpc_channel_args& args) { if (parent_->shutting_down_ || (!CalledByPendingChild() && !CalledByCurrentChild())) { return nullptr; diff --git a/src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc b/src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc index 1b0dd230b49..4680117fede 100644 --- a/src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc +++ b/src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc @@ -68,8 +68,9 @@ class PickFirst : public LoadBalancingPolicy { PickFirstSubchannelData( SubchannelList* subchannel_list, - const ServerAddress& address, Subchannel* subchannel) - : SubchannelData(subchannel_list, address, subchannel) {} + const ServerAddress& address, + RefCountedPtr subchannel) + : SubchannelData(subchannel_list, address, std::move(subchannel)) {} void ProcessConnectivityChangeLocked( grpc_connectivity_state connectivity_state) override; @@ -112,7 +113,8 @@ class PickFirst : public LoadBalancingPolicy { class Picker : public SubchannelPicker { public: - explicit Picker(RefCountedPtr connected_subchannel) + explicit Picker( + RefCountedPtr connected_subchannel) : connected_subchannel_(std::move(connected_subchannel)) {} PickResult Pick(PickArgs args) override { @@ -123,7 +125,7 @@ class PickFirst : public LoadBalancingPolicy { } private: - RefCountedPtr connected_subchannel_; + RefCountedPtr connected_subchannel_; }; // Helper class to ensure that any function that modifies the child refs diff --git a/src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.cc b/src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.cc index 0b9915de28e..3b8ec4f2872 100644 --- a/src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.cc +++ b/src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.cc @@ -83,8 +83,9 @@ class RoundRobin : public LoadBalancingPolicy { RoundRobinSubchannelData( SubchannelList* subchannel_list, - const ServerAddress& address, Subchannel* subchannel) - : SubchannelData(subchannel_list, address, subchannel) {} + const ServerAddress& address, + RefCountedPtr subchannel) + : SubchannelData(subchannel_list, address, std::move(subchannel)) {} grpc_connectivity_state connectivity_state() const { return last_connectivity_state_; @@ -156,7 +157,7 @@ class RoundRobin : public LoadBalancingPolicy { RoundRobin* parent_; size_t last_picked_index_; - InlinedVector, 10> subchannels_; + InlinedVector, 10> subchannels_; }; // Helper class to ensure that any function that modifies the child refs diff --git a/src/core/ext/filters/client_channel/lb_policy/subchannel_list.h b/src/core/ext/filters/client_channel/lb_policy/subchannel_list.h index 93b4bbd369a..8929bc4ab1e 100644 --- a/src/core/ext/filters/client_channel/lb_policy/subchannel_list.h +++ b/src/core/ext/filters/client_channel/lb_policy/subchannel_list.h @@ -27,7 +27,10 @@ #include "src/core/ext/filters/client_channel/lb_policy_registry.h" #include "src/core/ext/filters/client_channel/server_address.h" +// TODO(roth): Should not need the include of subchannel.h here, since +// that implementation should be hidden from the LB policy API. #include "src/core/ext/filters/client_channel/subchannel.h" +#include "src/core/ext/filters/client_channel/subchannel_interface.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/debug/trace.h" #include "src/core/lib/gprpp/abstract.h" @@ -88,11 +91,11 @@ class SubchannelData { } // Returns a pointer to the subchannel. - Subchannel* subchannel() const { return subchannel_; } + SubchannelInterface* subchannel() const { return subchannel_.get(); } // Returns the connected subchannel. Will be null if the subchannel // is not connected. - ConnectedSubchannel* connected_subchannel() const { + ConnectedSubchannelInterface* connected_subchannel() const { return connected_subchannel_.get(); } @@ -102,8 +105,8 @@ class SubchannelData { // calling CancelConnectivityWatchLocked()). grpc_connectivity_state CheckConnectivityStateLocked() { GPR_ASSERT(pending_watcher_ == nullptr); - connectivity_state_ = subchannel()->CheckConnectivityState( - subchannel_list_->health_check_service_name(), &connected_subchannel_); + connectivity_state_ = + subchannel()->CheckConnectivityState(&connected_subchannel_); return connectivity_state_; } @@ -128,7 +131,8 @@ class SubchannelData { protected: SubchannelData( SubchannelList* subchannel_list, - const ServerAddress& address, Subchannel* subchannel); + const ServerAddress& address, + RefCountedPtr subchannel); virtual ~SubchannelData(); @@ -140,7 +144,7 @@ class SubchannelData { private: // Watcher for subchannel connectivity state. - class Watcher : public Subchannel::ConnectivityStateWatcher { + class Watcher : public SubchannelInterface::ConnectivityStateWatcher { public: Watcher( SubchannelData* subchannel_data, @@ -150,9 +154,9 @@ class SubchannelData { ~Watcher() { subchannel_list_.reset(DEBUG_LOCATION, "Watcher dtor"); } - void OnConnectivityStateChange( - grpc_connectivity_state new_state, - RefCountedPtr connected_subchannel) override; + void OnConnectivityStateChange(grpc_connectivity_state new_state, + RefCountedPtr + connected_subchannel) override; grpc_pollset_set* interested_parties() override { return subchannel_list_->policy()->interested_parties(); @@ -169,7 +173,7 @@ class SubchannelData { RefCountedPtr> subchannel_list, grpc_connectivity_state state, - RefCountedPtr connected_subchannel); + RefCountedPtr connected_subchannel); ~Updater() { subchannel_list_.reset(DEBUG_LOCATION, "Watcher::Updater dtor"); @@ -182,7 +186,7 @@ class SubchannelData { RefCountedPtr> subchannel_list_; const grpc_connectivity_state state_; - RefCountedPtr connected_subchannel_; + RefCountedPtr connected_subchannel_; grpc_closure closure_; }; @@ -196,12 +200,12 @@ class SubchannelData { // Backpointer to owning subchannel list. Not owned. SubchannelList* subchannel_list_; // The subchannel. - Subchannel* subchannel_; + RefCountedPtr subchannel_; // Will be non-null when the subchannel's state is being watched. - Subchannel::ConnectivityStateWatcher* pending_watcher_ = nullptr; + SubchannelInterface::ConnectivityStateWatcher* pending_watcher_ = nullptr; // Data updated by the watcher. grpc_connectivity_state connectivity_state_; - RefCountedPtr connected_subchannel_; + RefCountedPtr connected_subchannel_; }; // A list of subchannels. @@ -235,9 +239,6 @@ class SubchannelList : public InternallyRefCounted { // Accessors. LoadBalancingPolicy* policy() const { return policy_; } TraceFlag* tracer() const { return tracer_; } - const char* health_check_service_name() const { - return health_check_service_name_.get(); - } // Resets connection backoff of all subchannels. // TODO(roth): We will probably need to rethink this as part of moving @@ -275,8 +276,6 @@ class SubchannelList : public InternallyRefCounted { TraceFlag* tracer_; - UniquePtr health_check_service_name_; - grpc_combiner* combiner_; // The list of subchannels. @@ -300,7 +299,7 @@ template void SubchannelData::Watcher:: OnConnectivityStateChange( grpc_connectivity_state new_state, - RefCountedPtr connected_subchannel) { + RefCountedPtr connected_subchannel) { // Will delete itself. New(subchannel_data_, subchannel_list_->Ref(DEBUG_LOCATION, "Watcher::Updater"), @@ -314,7 +313,7 @@ SubchannelData::Watcher::Updater:: RefCountedPtr> subchannel_list, grpc_connectivity_state state, - RefCountedPtr connected_subchannel) + RefCountedPtr connected_subchannel) : subchannel_data_(subchannel_data), subchannel_list_(std::move(subchannel_list)), state_(state), @@ -336,7 +335,7 @@ void SubchannelData::Watcher::Updater:: "connected_subchannel=%p, shutting_down=%d, pending_watcher=%p", sd->subchannel_list_->tracer()->name(), sd->subchannel_list_->policy(), sd->subchannel_list_, sd->Index(), - sd->subchannel_list_->num_subchannels(), sd->subchannel_, + sd->subchannel_list_->num_subchannels(), sd->subchannel_.get(), grpc_connectivity_state_name(self->state_), self->connected_subchannel_.get(), sd->subchannel_list_->shutting_down(), sd->pending_watcher_); @@ -360,9 +359,9 @@ void SubchannelData::Watcher::Updater:: template SubchannelData::SubchannelData( SubchannelList* subchannel_list, - const ServerAddress& address, Subchannel* subchannel) + const ServerAddress& address, RefCountedPtr subchannel) : subchannel_list_(subchannel_list), - subchannel_(subchannel), + subchannel_(std::move(subchannel)), // We assume that the current state is IDLE. If not, we'll get a // callback telling us that. connectivity_state_(GRPC_CHANNEL_IDLE) {} @@ -382,10 +381,9 @@ void SubchannelData:: " (subchannel %p): unreffing subchannel", subchannel_list_->tracer()->name(), subchannel_list_->policy(), subchannel_list_, Index(), subchannel_list_->num_subchannels(), - subchannel_); + subchannel_.get()); } - GRPC_SUBCHANNEL_UNREF(subchannel_, reason); - subchannel_ = nullptr; + subchannel_.reset(); connected_subchannel_.reset(); } } @@ -407,16 +405,16 @@ void SubchannelDatatracer()->name(), subchannel_list_->policy(), subchannel_list_, Index(), subchannel_list_->num_subchannels(), - subchannel_, grpc_connectivity_state_name(connectivity_state_)); + subchannel_.get(), + grpc_connectivity_state_name(connectivity_state_)); } GPR_ASSERT(pending_watcher_ == nullptr); pending_watcher_ = New(this, subchannel_list()->Ref(DEBUG_LOCATION, "Watcher")); subchannel_->WatchConnectivityState( connectivity_state_, - UniquePtr( - gpr_strdup(subchannel_list_->health_check_service_name())), - UniquePtr(pending_watcher_)); + UniquePtr( + pending_watcher_)); } template @@ -428,11 +426,10 @@ void SubchannelData:: " (subchannel %p): canceling connectivity watch (%s)", subchannel_list_->tracer()->name(), subchannel_list_->policy(), subchannel_list_, Index(), subchannel_list_->num_subchannels(), - subchannel_, reason); + subchannel_.get(), reason); } if (pending_watcher_ != nullptr) { - subchannel_->CancelConnectivityStateWatch( - subchannel_list_->health_check_service_name(), pending_watcher_); + subchannel_->CancelConnectivityStateWatch(pending_watcher_); pending_watcher_ = nullptr; } } @@ -463,25 +460,12 @@ SubchannelList::SubchannelList( tracer_->name(), policy, this, addresses.size()); } subchannels_.reserve(addresses.size()); - // Find health check service name. - const bool inhibit_health_checking = grpc_channel_arg_get_bool( - grpc_channel_args_find(&args, GRPC_ARG_INHIBIT_HEALTH_CHECKING), false); - if (!inhibit_health_checking) { - const char* health_check_service_name = grpc_channel_arg_get_string( - grpc_channel_args_find(&args, "grpc.temp.health_check")); - if (health_check_service_name != nullptr) { - health_check_service_name_.reset(gpr_strdup(health_check_service_name)); - } - } // We need to remove the LB addresses in order to be able to compare the // subchannel keys of subchannels from a different batch of addresses. - // We also remove the health-checking-related args, since we are - // handling that here. // We remove the service config, since it will be passed into the // subchannel via call context. - static const char* keys_to_remove[] = { - GRPC_ARG_SUBCHANNEL_ADDRESS, "grpc.temp.health_check", - GRPC_ARG_INHIBIT_HEALTH_CHECKING, GRPC_ARG_SERVICE_CONFIG}; + static const char* keys_to_remove[] = {GRPC_ARG_SUBCHANNEL_ADDRESS, + GRPC_ARG_SERVICE_CONFIG}; // Create a subchannel for each address. for (size_t i = 0; i < addresses.size(); i++) { // TODO(roth): we should ideally hide this from the LB policy code. In @@ -504,7 +488,8 @@ SubchannelList::SubchannelList( &args, keys_to_remove, GPR_ARRAY_SIZE(keys_to_remove), args_to_add.data(), args_to_add.size()); gpr_free(args_to_add[subchannel_address_arg_index].value.string); - Subchannel* subchannel = helper->CreateSubchannel(*new_args); + RefCountedPtr subchannel = + helper->CreateSubchannel(*new_args); grpc_channel_args_destroy(new_args); if (subchannel == nullptr) { // Subchannel could not be created. @@ -523,11 +508,11 @@ SubchannelList::SubchannelList( gpr_log(GPR_INFO, "[%s %p] subchannel list %p index %" PRIuPTR ": Created subchannel %p for address uri %s", - tracer_->name(), policy_, this, subchannels_.size(), subchannel, - address_uri); + tracer_->name(), policy_, this, subchannels_.size(), + subchannel.get(), address_uri); gpr_free(address_uri); } - subchannels_.emplace_back(this, addresses[i], subchannel); + subchannels_.emplace_back(this, addresses[i], std::move(subchannel)); } } diff --git a/src/core/ext/filters/client_channel/lb_policy/xds/xds.cc b/src/core/ext/filters/client_channel/lb_policy/xds/xds.cc index d70042af229..b198e0e8637 100644 --- a/src/core/ext/filters/client_channel/lb_policy/xds/xds.cc +++ b/src/core/ext/filters/client_channel/lb_policy/xds/xds.cc @@ -334,7 +334,8 @@ class XdsLb : public LoadBalancingPolicy { explicit FallbackHelper(RefCountedPtr parent) : parent_(std::move(parent)) {} - Subchannel* CreateSubchannel(const grpc_channel_args& args) override; + RefCountedPtr CreateSubchannel( + const grpc_channel_args& args) override; grpc_channel* CreateChannel(const char* target, const grpc_channel_args& args) override; void UpdateState(grpc_connectivity_state state, @@ -374,7 +375,8 @@ class XdsLb : public LoadBalancingPolicy { explicit Helper(RefCountedPtr entry) : entry_(std::move(entry)) {} - Subchannel* CreateSubchannel(const grpc_channel_args& args) override; + RefCountedPtr CreateSubchannel( + const grpc_channel_args& args) override; grpc_channel* CreateChannel(const char* target, const grpc_channel_args& args) override; void UpdateState(grpc_connectivity_state state, @@ -579,7 +581,7 @@ bool XdsLb::FallbackHelper::CalledByCurrentFallback() const { return child_ == parent_->fallback_policy_.get(); } -Subchannel* XdsLb::FallbackHelper::CreateSubchannel( +RefCountedPtr XdsLb::FallbackHelper::CreateSubchannel( const grpc_channel_args& args) { if (parent_->shutting_down_ || (!CalledByPendingFallback() && !CalledByCurrentFallback())) { @@ -1997,7 +1999,8 @@ bool XdsLb::LocalityMap::LocalityEntry::Helper::CalledByCurrentChild() const { return child_ == entry_->child_policy_.get(); } -Subchannel* XdsLb::LocalityMap::LocalityEntry::Helper::CreateSubchannel( +RefCountedPtr +XdsLb::LocalityMap::LocalityEntry::Helper::CreateSubchannel( const grpc_channel_args& args) { if (entry_->parent_->shutting_down_ || (!CalledByPendingChild() && !CalledByCurrentChild())) { diff --git a/src/core/ext/filters/client_channel/resolving_lb_policy.cc b/src/core/ext/filters/client_channel/resolving_lb_policy.cc index 3fe2ee74c92..d23ac1f4e33 100644 --- a/src/core/ext/filters/client_channel/resolving_lb_policy.cc +++ b/src/core/ext/filters/client_channel/resolving_lb_policy.cc @@ -106,7 +106,8 @@ class ResolvingLoadBalancingPolicy::ResolvingControlHelper RefCountedPtr parent) : parent_(std::move(parent)) {} - Subchannel* CreateSubchannel(const grpc_channel_args& args) override { + RefCountedPtr CreateSubchannel( + const grpc_channel_args& args) override { if (parent_->resolver_ == nullptr) return nullptr; // Shutting down. if (!CalledByCurrentChild() && !CalledByPendingChild()) return nullptr; return parent_->channel_control_helper()->CreateSubchannel(args); @@ -536,7 +537,7 @@ void ResolvingLoadBalancingPolicy::OnResolverResultChangedLocked( if (process_resolver_result_ != nullptr) { grpc_error* service_config_error = GRPC_ERROR_NONE; service_config_changed = process_resolver_result_( - process_resolver_result_user_data_, &result, &lb_policy_name, + process_resolver_result_user_data_, result, &lb_policy_name, &lb_policy_config, &service_config_error); if (service_config_error != GRPC_ERROR_NONE) { service_config_error_string = diff --git a/src/core/ext/filters/client_channel/resolving_lb_policy.h b/src/core/ext/filters/client_channel/resolving_lb_policy.h index cc9f3176cce..679c8d0fba0 100644 --- a/src/core/ext/filters/client_channel/resolving_lb_policy.h +++ b/src/core/ext/filters/client_channel/resolving_lb_policy.h @@ -69,7 +69,8 @@ class ResolvingLoadBalancingPolicy : public LoadBalancingPolicy { // empty, it means that we don't have a valid service config to use, and we // should set the channel to be in TRANSIENT_FAILURE. typedef bool (*ProcessResolverResultCallback)( - void* user_data, Resolver::Result* result, const char** lb_policy_name, + void* user_data, const Resolver::Result& result, + const char** lb_policy_name, RefCountedPtr* lb_policy_config, grpc_error** service_config_error); // If error is set when this returns, then construction failed, and diff --git a/src/core/ext/filters/client_channel/subchannel.cc b/src/core/ext/filters/client_channel/subchannel.cc index cd778976166..cc3457e1e96 100644 --- a/src/core/ext/filters/client_channel/subchannel.cc +++ b/src/core/ext/filters/client_channel/subchannel.cc @@ -83,7 +83,7 @@ ConnectedSubchannel::ConnectedSubchannel( grpc_channel_stack* channel_stack, const grpc_channel_args* args, RefCountedPtr channelz_subchannel, intptr_t socket_uuid) - : RefCounted(&grpc_trace_stream_refcount), + : ConnectedSubchannelInterface(&grpc_trace_stream_refcount), channel_stack_(channel_stack), args_(grpc_channel_args_copy(args)), channelz_subchannel_(std::move(channelz_subchannel)), @@ -376,25 +376,17 @@ class Subchannel::ConnectedSubchannelStateWatcher { void Subchannel::ConnectivityStateWatcherList::AddWatcherLocked( UniquePtr watcher) { - watcher->next_ = head_; - head_ = watcher.release(); + watchers_.insert(MakePair(watcher.get(), std::move(watcher))); } void Subchannel::ConnectivityStateWatcherList::RemoveWatcherLocked( ConnectivityStateWatcher* watcher) { - for (ConnectivityStateWatcher** w = &head_; *w != nullptr; w = &(*w)->next_) { - if (*w == watcher) { - *w = watcher->next_; - Delete(watcher); - return; - } - } - GPR_UNREACHABLE_CODE(return ); + watchers_.erase(watcher); } void Subchannel::ConnectivityStateWatcherList::NotifyLocked( Subchannel* subchannel, grpc_connectivity_state state) { - for (ConnectivityStateWatcher* w = head_; w != nullptr; w = w->next_) { + for (const auto& p : watchers_) { RefCountedPtr connected_subchannel; if (state == GRPC_CHANNEL_READY) { connected_subchannel = subchannel->connected_subchannel_; @@ -407,15 +399,7 @@ void Subchannel::ConnectivityStateWatcherList::NotifyLocked( // the notification into the client_channel control-plane combiner // before processing it. But if we ever have any other callers here, // we will probably need to change this. - w->OnConnectivityStateChange(state, std::move(connected_subchannel)); - } -} - -void Subchannel::ConnectivityStateWatcherList::Clear() { - while (head_ != nullptr) { - ConnectivityStateWatcher* next = head_->next_; - Delete(head_); - head_ = next; + p.second->OnConnectivityStateChange(state, std::move(connected_subchannel)); } } diff --git a/src/core/ext/filters/client_channel/subchannel.h b/src/core/ext/filters/client_channel/subchannel.h index e0741bb28fa..2f05792b872 100644 --- a/src/core/ext/filters/client_channel/subchannel.h +++ b/src/core/ext/filters/client_channel/subchannel.h @@ -23,6 +23,7 @@ #include "src/core/ext/filters/client_channel/client_channel_channelz.h" #include "src/core/ext/filters/client_channel/connector.h" +#include "src/core/ext/filters/client_channel/subchannel_interface.h" #include "src/core/ext/filters/client_channel/subchannel_pool_interface.h" #include "src/core/lib/backoff/backoff.h" #include "src/core/lib/channel/channel_stack.h" @@ -69,7 +70,7 @@ namespace grpc_core { class SubchannelCall; -class ConnectedSubchannel : public RefCounted { +class ConnectedSubchannel : public ConnectedSubchannelInterface { public: struct CallArgs { grpc_polling_entity* pollent; @@ -96,7 +97,7 @@ class ConnectedSubchannel : public RefCounted { grpc_error** error); grpc_channel_stack* channel_stack() const { return channel_stack_; } - const grpc_channel_args* args() const { return args_; } + const grpc_channel_args* args() const override { return args_; } channelz::SubchannelNode* channelz_subchannel() const { return channelz_subchannel_.get(); } @@ -176,37 +177,9 @@ class SubchannelCall { // A subchannel that knows how to connect to exactly one target address. It // provides a target for load balancing. class Subchannel { - private: - class ConnectivityStateWatcherList; // Forward declaration. - public: - class ConnectivityStateWatcher { - public: - virtual ~ConnectivityStateWatcher() = default; - - // Will be invoked whenever the subchannel's connectivity state - // changes. There will be only one invocation of this method on a - // given watcher instance at any given time. - // - // When the state changes to READY, connected_subchannel will - // contain a ref to the connected subchannel. When it changes from - // READY to some other state, the implementation must release its - // ref to the connected subchannel. - virtual void OnConnectivityStateChange( - grpc_connectivity_state new_state, - RefCountedPtr connected_subchannel) // NOLINT - GRPC_ABSTRACT; - - virtual grpc_pollset_set* interested_parties() GRPC_ABSTRACT; - - GRPC_ABSTRACT_BASE_CLASS - - private: - // For access to next_. - friend class Subchannel::ConnectivityStateWatcherList; - - ConnectivityStateWatcher* next_ = nullptr; - }; + typedef SubchannelInterface::ConnectivityStateWatcher + ConnectivityStateWatcher; // The ctor and dtor are not intended to use directly. Subchannel(SubchannelKey* key, grpc_connector* connector, @@ -296,12 +269,15 @@ class Subchannel { // Notifies all watchers in the list about a change to state. void NotifyLocked(Subchannel* subchannel, grpc_connectivity_state state); - void Clear(); + void Clear() { watchers_.clear(); } - bool empty() const { return head_ == nullptr; } + bool empty() const { return watchers_.empty(); } private: - ConnectivityStateWatcher* head_ = nullptr; + // TODO(roth): This could be a set instead of a map if we had a set + // implementation. + Map> + watchers_; }; // A map that tracks ConnectivityStateWatchers using a particular health diff --git a/src/core/ext/filters/client_channel/subchannel_interface.h b/src/core/ext/filters/client_channel/subchannel_interface.h new file mode 100644 index 00000000000..0a471045f03 --- /dev/null +++ b/src/core/ext/filters/client_channel/subchannel_interface.h @@ -0,0 +1,109 @@ +/* + * + * Copyright 2019 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +#ifndef GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_SUBCHANNEL_INTERFACE_H +#define GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_SUBCHANNEL_INTERFACE_H + +#include + +#include "src/core/lib/debug/trace.h" +#include "src/core/lib/gprpp/ref_counted.h" +#include "src/core/lib/gprpp/ref_counted_ptr.h" + +namespace grpc_core { + +// TODO(roth): In a subsequent PR, remove this from this API. +class ConnectedSubchannelInterface + : public RefCounted { + public: + virtual const grpc_channel_args* args() const GRPC_ABSTRACT; + + protected: + template + explicit ConnectedSubchannelInterface(TraceFlagT* trace_flag = nullptr) + : RefCounted(trace_flag) {} +}; + +class SubchannelInterface : public RefCounted { + public: + class ConnectivityStateWatcher { + public: + virtual ~ConnectivityStateWatcher() = default; + + // Will be invoked whenever the subchannel's connectivity state + // changes. There will be only one invocation of this method on a + // given watcher instance at any given time. + // + // When the state changes to READY, connected_subchannel will + // contain a ref to the connected subchannel. When it changes from + // READY to some other state, the implementation must release its + // ref to the connected subchannel. + virtual void OnConnectivityStateChange( + grpc_connectivity_state new_state, + RefCountedPtr + connected_subchannel) // NOLINT + GRPC_ABSTRACT; + + // TODO(roth): Remove this as soon as we move to EventManager-based + // polling. + virtual grpc_pollset_set* interested_parties() GRPC_ABSTRACT; + + GRPC_ABSTRACT_BASE_CLASS + }; + + virtual ~SubchannelInterface() = default; + + // Returns the current connectivity state of the subchannel. + virtual grpc_connectivity_state CheckConnectivityState( + RefCountedPtr* connected_subchannel) + GRPC_ABSTRACT; + + // Starts watching the subchannel's connectivity state. + // The first callback to the watcher will be delivered when the + // subchannel's connectivity state becomes a value other than + // initial_state, which may happen immediately. + // Subsequent callbacks will be delivered as the subchannel's state + // changes. + // The watcher will be destroyed either when the subchannel is + // destroyed or when CancelConnectivityStateWatch() is called. + // There can be only one watcher of a given subchannel. It is not + // valid to call this method a second time without first cancelling + // the previous watcher using CancelConnectivityStateWatch(). + virtual void WatchConnectivityState( + grpc_connectivity_state initial_state, + UniquePtr watcher) GRPC_ABSTRACT; + + // Cancels a connectivity state watch. + // If the watcher has already been destroyed, this is a no-op. + virtual void CancelConnectivityStateWatch(ConnectivityStateWatcher* watcher) + GRPC_ABSTRACT; + + // Attempt to connect to the backend. Has no effect if already connected. + virtual void AttemptToConnect() GRPC_ABSTRACT; + + // TODO(roth): These methods should be removed from this interface to + // bettter hide grpc-specific functionality from the LB policy API. + virtual channelz::SubchannelNode* channelz_node() GRPC_ABSTRACT; + virtual void ResetBackoff() GRPC_ABSTRACT; + + GRPC_ABSTRACT_BASE_CLASS +}; + +} // namespace grpc_core + +#endif /* GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_SUBCHANNEL_INTERFACE_H */ diff --git a/test/core/util/test_lb_policies.cc b/test/core/util/test_lb_policies.cc index bd28422bcd1..ced6d9d8027 100644 --- a/test/core/util/test_lb_policies.cc +++ b/test/core/util/test_lb_policies.cc @@ -143,7 +143,8 @@ class InterceptRecvTrailingMetadataLoadBalancingPolicy InterceptRecvTrailingMetadataCallback cb, void* user_data) : parent_(std::move(parent)), cb_(cb), user_data_(user_data) {} - Subchannel* CreateSubchannel(const grpc_channel_args& args) override { + RefCountedPtr CreateSubchannel( + const grpc_channel_args& args) override { return parent_->channel_control_helper()->CreateSubchannel(args); } diff --git a/tools/doxygen/Doxyfile.core.internal b/tools/doxygen/Doxyfile.core.internal index 2c20d69e6e3..7768bca30f5 100644 --- a/tools/doxygen/Doxyfile.core.internal +++ b/tools/doxygen/Doxyfile.core.internal @@ -974,6 +974,7 @@ src/core/ext/filters/client_channel/service_config.cc \ src/core/ext/filters/client_channel/service_config.h \ src/core/ext/filters/client_channel/subchannel.cc \ src/core/ext/filters/client_channel/subchannel.h \ +src/core/ext/filters/client_channel/subchannel_interface.h \ src/core/ext/filters/client_channel/subchannel_pool_interface.cc \ src/core/ext/filters/client_channel/subchannel_pool_interface.h \ src/core/ext/filters/deadline/deadline_filter.cc \ diff --git a/tools/run_tests/generated/sources_and_headers.json b/tools/run_tests/generated/sources_and_headers.json index a9dc9fcfe3f..a479a00509a 100644 --- a/tools/run_tests/generated/sources_and_headers.json +++ b/tools/run_tests/generated/sources_and_headers.json @@ -8912,6 +8912,7 @@ "src/core/ext/filters/client_channel/server_address.h", "src/core/ext/filters/client_channel/service_config.h", "src/core/ext/filters/client_channel/subchannel.h", + "src/core/ext/filters/client_channel/subchannel_interface.h", "src/core/ext/filters/client_channel/subchannel_pool_interface.h" ], "is_filegroup": true, @@ -8968,6 +8969,7 @@ "src/core/ext/filters/client_channel/service_config.h", "src/core/ext/filters/client_channel/subchannel.cc", "src/core/ext/filters/client_channel/subchannel.h", + "src/core/ext/filters/client_channel/subchannel_interface.h", "src/core/ext/filters/client_channel/subchannel_pool_interface.cc", "src/core/ext/filters/client_channel/subchannel_pool_interface.h" ], From 196b0aa3a3a249dc1edc38a9ca6c035e9ab4ddf8 Mon Sep 17 00:00:00 2001 From: Karthik Ravi Shankar Date: Wed, 29 May 2019 13:15:47 -0700 Subject: [PATCH 79/83] Revert "Revert "Start supporting a callback-based RPC under lock"" --- src/core/lib/surface/completion_queue.cc | 85 +++++++++++-------- src/core/lib/surface/completion_queue.h | 3 +- src/core/lib/surface/server.cc | 2 +- test/core/surface/completion_queue_test.cc | 44 +++++++++- .../end2end/client_callback_end2end_test.cc | 28 ++++++ test/cpp/microbenchmarks/bm_cq.cc | 35 +++++++- .../callback_streaming_ping_pong.h | 2 +- 7 files changed, 157 insertions(+), 42 deletions(-) diff --git a/src/core/lib/surface/completion_queue.cc b/src/core/lib/surface/completion_queue.cc index e796071eedc..d0ed1a9f673 100644 --- a/src/core/lib/surface/completion_queue.cc +++ b/src/core/lib/surface/completion_queue.cc @@ -34,6 +34,7 @@ #include "src/core/lib/gpr/string.h" #include "src/core/lib/gpr/tls.h" #include "src/core/lib/gprpp/atomic.h" +#include "src/core/lib/iomgr/executor.h" #include "src/core/lib/iomgr/pollset.h" #include "src/core/lib/iomgr/timer.h" #include "src/core/lib/profiling/timers.h" @@ -200,7 +201,7 @@ struct cq_vtable { bool (*begin_op)(grpc_completion_queue* cq, void* tag); void (*end_op)(grpc_completion_queue* cq, void* tag, grpc_error* error, void (*done)(void* done_arg, grpc_cq_completion* storage), - void* done_arg, grpc_cq_completion* storage); + void* done_arg, grpc_cq_completion* storage, bool internal); grpc_event (*next)(grpc_completion_queue* cq, gpr_timespec deadline, void* reserved); grpc_event (*pluck)(grpc_completion_queue* cq, void* tag, @@ -354,23 +355,20 @@ static bool cq_begin_op_for_callback(grpc_completion_queue* cq, void* tag); // queue. The done argument is a callback that will be invoked when it is // safe to free up that storage. The storage MUST NOT be freed until the // done callback is invoked. -static void cq_end_op_for_next(grpc_completion_queue* cq, void* tag, - grpc_error* error, - void (*done)(void* done_arg, - grpc_cq_completion* storage), - void* done_arg, grpc_cq_completion* storage); - -static void cq_end_op_for_pluck(grpc_completion_queue* cq, void* tag, - grpc_error* error, - void (*done)(void* done_arg, - grpc_cq_completion* storage), - void* done_arg, grpc_cq_completion* storage); - -static void cq_end_op_for_callback(grpc_completion_queue* cq, void* tag, - grpc_error* error, - void (*done)(void* done_arg, - grpc_cq_completion* storage), - void* done_arg, grpc_cq_completion* storage); +static void cq_end_op_for_next( + grpc_completion_queue* cq, void* tag, grpc_error* error, + void (*done)(void* done_arg, grpc_cq_completion* storage), void* done_arg, + grpc_cq_completion* storage, bool internal); + +static void cq_end_op_for_pluck( + grpc_completion_queue* cq, void* tag, grpc_error* error, + void (*done)(void* done_arg, grpc_cq_completion* storage), void* done_arg, + grpc_cq_completion* storage, bool internal); + +static void cq_end_op_for_callback( + grpc_completion_queue* cq, void* tag, grpc_error* error, + void (*done)(void* done_arg, grpc_cq_completion* storage), void* done_arg, + grpc_cq_completion* storage, bool internal); static grpc_event cq_next(grpc_completion_queue* cq, gpr_timespec deadline, void* reserved); @@ -674,11 +672,10 @@ bool grpc_cq_begin_op(grpc_completion_queue* cq, void* tag) { /* Queue a GRPC_OP_COMPLETED operation to a completion queue (with a * completion * type of GRPC_CQ_NEXT) */ -static void cq_end_op_for_next(grpc_completion_queue* cq, void* tag, - grpc_error* error, - void (*done)(void* done_arg, - grpc_cq_completion* storage), - void* done_arg, grpc_cq_completion* storage) { +static void cq_end_op_for_next( + grpc_completion_queue* cq, void* tag, grpc_error* error, + void (*done)(void* done_arg, grpc_cq_completion* storage), void* done_arg, + grpc_cq_completion* storage, bool internal) { GPR_TIMER_SCOPE("cq_end_op_for_next", 0); if (GRPC_TRACE_FLAG_ENABLED(grpc_api_trace) || @@ -754,11 +751,10 @@ static void cq_end_op_for_next(grpc_completion_queue* cq, void* tag, /* Queue a GRPC_OP_COMPLETED operation to a completion queue (with a * completion * type of GRPC_CQ_PLUCK) */ -static void cq_end_op_for_pluck(grpc_completion_queue* cq, void* tag, - grpc_error* error, - void (*done)(void* done_arg, - grpc_cq_completion* storage), - void* done_arg, grpc_cq_completion* storage) { +static void cq_end_op_for_pluck( + grpc_completion_queue* cq, void* tag, grpc_error* error, + void (*done)(void* done_arg, grpc_cq_completion* storage), void* done_arg, + grpc_cq_completion* storage, bool internal) { GPR_TIMER_SCOPE("cq_end_op_for_pluck", 0); cq_pluck_data* cqd = static_cast DATA_FROM_CQ(cq); @@ -821,15 +817,19 @@ static void cq_end_op_for_pluck(grpc_completion_queue* cq, void* tag, GRPC_ERROR_UNREF(error); } +static void functor_callback(void* arg, grpc_error* error) { + auto* functor = static_cast(arg); + functor->functor_run(functor, error == GRPC_ERROR_NONE); +} + /* Complete an event on a completion queue of type GRPC_CQ_CALLBACK */ static void cq_end_op_for_callback( grpc_completion_queue* cq, void* tag, grpc_error* error, void (*done)(void* done_arg, grpc_cq_completion* storage), void* done_arg, - grpc_cq_completion* storage) { + grpc_cq_completion* storage, bool internal) { GPR_TIMER_SCOPE("cq_end_op_for_callback", 0); cq_callback_data* cqd = static_cast DATA_FROM_CQ(cq); - bool is_success = (error == GRPC_ERROR_NONE); if (GRPC_TRACE_FLAG_ENABLED(grpc_api_trace) || (GRPC_TRACE_FLAG_ENABLED(grpc_trace_operation_failures) && @@ -856,16 +856,25 @@ static void cq_end_op_for_callback( cq_finish_shutdown_callback(cq); } - GRPC_ERROR_UNREF(error); - auto* functor = static_cast(tag); - grpc_core::ApplicationCallbackExecCtx::Enqueue(functor, is_success); + if (internal) { + grpc_core::ApplicationCallbackExecCtx::Enqueue(functor, + (error == GRPC_ERROR_NONE)); + } else { + GRPC_CLOSURE_SCHED( + GRPC_CLOSURE_CREATE( + functor_callback, functor, + grpc_core::Executor::Scheduler(grpc_core::ExecutorJobType::SHORT)), + GRPC_ERROR_REF(error)); + } + GRPC_ERROR_UNREF(error); } void grpc_cq_end_op(grpc_completion_queue* cq, void* tag, grpc_error* error, void (*done)(void* done_arg, grpc_cq_completion* storage), - void* done_arg, grpc_cq_completion* storage) { - cq->vtable->end_op(cq, tag, error, done, done_arg, storage); + void* done_arg, grpc_cq_completion* storage, + bool internal) { + cq->vtable->end_op(cq, tag, error, done, done_arg, storage, internal); } typedef struct { @@ -1343,7 +1352,11 @@ static void cq_finish_shutdown_callback(grpc_completion_queue* cq) { GPR_ASSERT(cqd->shutdown_called); cq->poller_vtable->shutdown(POLLSET_FROM_CQ(cq), &cq->pollset_shutdown_done); - grpc_core::ApplicationCallbackExecCtx::Enqueue(callback, true); + GRPC_CLOSURE_SCHED( + GRPC_CLOSURE_CREATE( + functor_callback, callback, + grpc_core::Executor::Scheduler(grpc_core::ExecutorJobType::SHORT)), + GRPC_ERROR_NONE); } static void cq_shutdown_callback(grpc_completion_queue* cq) { diff --git a/src/core/lib/surface/completion_queue.h b/src/core/lib/surface/completion_queue.h index d60fe6d6efe..3ba9fbb8765 100644 --- a/src/core/lib/surface/completion_queue.h +++ b/src/core/lib/surface/completion_queue.h @@ -77,7 +77,8 @@ bool grpc_cq_begin_op(grpc_completion_queue* cc, void* tag); grpc_cq_begin_op */ void grpc_cq_end_op(grpc_completion_queue* cc, void* tag, grpc_error* error, void (*done)(void* done_arg, grpc_cq_completion* storage), - void* done_arg, grpc_cq_completion* storage); + void* done_arg, grpc_cq_completion* storage, + bool internal = false); grpc_pollset* grpc_cq_pollset(grpc_completion_queue* cc); diff --git a/src/core/lib/surface/server.cc b/src/core/lib/surface/server.cc index 5ecd5662c2c..44de0cd42dd 100644 --- a/src/core/lib/surface/server.cc +++ b/src/core/lib/surface/server.cc @@ -513,7 +513,7 @@ static void publish_call(grpc_server* server, call_data* calld, size_t cq_idx, } grpc_cq_end_op(calld->cq_new, rc->tag, GRPC_ERROR_NONE, done_request_event, - rc, &rc->completion); + rc, &rc->completion, true); } static void publish_new_rpc(void* arg, grpc_error* error) { diff --git a/test/core/surface/completion_queue_test.cc b/test/core/surface/completion_queue_test.cc index 7c3630eaf18..4a33b934f43 100644 --- a/test/core/surface/completion_queue_test.cc +++ b/test/core/surface/completion_queue_test.cc @@ -23,6 +23,7 @@ #include #include "src/core/lib/gpr/useful.h" #include "src/core/lib/gprpp/memory.h" +#include "src/core/lib/gprpp/sync.h" #include "src/core/lib/iomgr/iomgr.h" #include "test/core/util/test_config.h" @@ -359,12 +360,19 @@ static void test_pluck_after_shutdown(void) { static void test_callback(void) { grpc_completion_queue* cc; - void* tags[128]; + static void* tags[128]; grpc_cq_completion completions[GPR_ARRAY_SIZE(tags)]; grpc_cq_polling_type polling_types[] = { GRPC_CQ_DEFAULT_POLLING, GRPC_CQ_NON_LISTENING, GRPC_CQ_NON_POLLING}; grpc_completion_queue_attributes attr; unsigned i; + static gpr_mu mu, shutdown_mu; + static gpr_cv cv, shutdown_cv; + static int cb_counter; + gpr_mu_init(&mu); + gpr_mu_init(&shutdown_mu); + gpr_cv_init(&cv); + gpr_cv_init(&shutdown_cv); LOG_TEST("test_callback"); @@ -376,7 +384,11 @@ static void test_callback(void) { } ~ShutdownCallback() {} static void Run(grpc_experimental_completion_queue_functor* cb, int ok) { + gpr_mu_lock(&shutdown_mu); *static_cast(cb)->done_ = static_cast(ok); + // Signal when the shutdown callback is completed. + gpr_cv_signal(&shutdown_cv); + gpr_mu_unlock(&shutdown_mu); } private: @@ -391,9 +403,9 @@ static void test_callback(void) { for (size_t pidx = 0; pidx < GPR_ARRAY_SIZE(polling_types); pidx++) { int sumtags = 0; int counter = 0; + cb_counter = 0; { // reset exec_ctx types - grpc_core::ApplicationCallbackExecCtx callback_exec_ctx; grpc_core::ExecCtx exec_ctx; attr.cq_polling_type = polling_types[pidx]; cc = grpc_completion_queue_create( @@ -409,7 +421,13 @@ static void test_callback(void) { int ok) { GPR_ASSERT(static_cast(ok)); auto* callback = static_cast(cb); + gpr_mu_lock(&mu); + cb_counter++; *callback->counter_ += callback->tag_; + if (cb_counter == GPR_ARRAY_SIZE(tags)) { + gpr_cv_signal(&cv); + } + gpr_mu_unlock(&mu); grpc_core::Delete(callback); }; @@ -429,12 +447,34 @@ static void test_callback(void) { nullptr, &completions[i]); } + gpr_mu_lock(&mu); + while (cb_counter != GPR_ARRAY_SIZE(tags)) { + // Wait for all the callbacks to complete. + gpr_cv_wait(&cv, &mu, gpr_inf_future(GPR_CLOCK_REALTIME)); + } + gpr_mu_unlock(&mu); + shutdown_and_destroy(cc); + + gpr_mu_lock(&shutdown_mu); + while (!got_shutdown) { + // Wait for the shutdown callback to complete. + gpr_cv_wait(&shutdown_cv, &shutdown_mu, + gpr_inf_future(GPR_CLOCK_REALTIME)); + } + gpr_mu_unlock(&shutdown_mu); } + + // Run the assertions to check if the test ran successfully. GPR_ASSERT(sumtags == counter); GPR_ASSERT(got_shutdown); got_shutdown = false; } + + gpr_cv_destroy(&cv); + gpr_cv_destroy(&shutdown_cv); + gpr_mu_destroy(&mu); + gpr_mu_destroy(&shutdown_mu); } struct thread_state { diff --git a/test/cpp/end2end/client_callback_end2end_test.cc b/test/cpp/end2end/client_callback_end2end_test.cc index a154324216b..8cf6def1073 100644 --- a/test/cpp/end2end/client_callback_end2end_test.cc +++ b/test/cpp/end2end/client_callback_end2end_test.cc @@ -374,6 +374,34 @@ TEST_P(ClientCallbackEnd2endTest, SimpleRpc) { SendRpcs(1, false); } +TEST_P(ClientCallbackEnd2endTest, SimpleRpcUnderLock) { + MAYBE_SKIP_TEST; + ResetStub(); + std::mutex mu; + std::condition_variable cv; + bool done = false; + EchoRequest request; + request.set_message("Hello locked world."); + EchoResponse response; + ClientContext cli_ctx; + { + std::lock_guard l(mu); + stub_->experimental_async()->Echo( + &cli_ctx, &request, &response, + [&mu, &cv, &done, &request, &response](Status s) { + std::lock_guard l(mu); + EXPECT_TRUE(s.ok()); + EXPECT_EQ(request.message(), response.message()); + done = true; + cv.notify_one(); + }); + } + std::unique_lock l(mu); + while (!done) { + cv.wait(l); + } +} + TEST_P(ClientCallbackEnd2endTest, SequentialRpcs) { MAYBE_SKIP_TEST; ResetStub(); diff --git a/test/cpp/microbenchmarks/bm_cq.cc b/test/cpp/microbenchmarks/bm_cq.cc index 50eb9454fbe..edbff9c2be3 100644 --- a/test/cpp/microbenchmarks/bm_cq.cc +++ b/test/cpp/microbenchmarks/bm_cq.cc @@ -150,6 +150,9 @@ static void shutdown_and_destroy(grpc_completion_queue* cc) { grpc_completion_queue_destroy(cc); } +static gpr_mu shutdown_mu, mu; +static gpr_cv shutdown_cv, cv; + // Tag completion queue iterate times class TagCallback : public grpc_experimental_completion_queue_functor { public: @@ -158,8 +161,11 @@ class TagCallback : public grpc_experimental_completion_queue_functor { } ~TagCallback() {} static void Run(grpc_experimental_completion_queue_functor* cb, int ok) { + gpr_mu_lock(&mu); GPR_ASSERT(static_cast(ok)); *static_cast(cb)->iter_ += 1; + gpr_cv_signal(&cv); + gpr_mu_unlock(&mu); }; private: @@ -174,7 +180,10 @@ class ShutdownCallback : public grpc_experimental_completion_queue_functor { } ~ShutdownCallback() {} static void Run(grpc_experimental_completion_queue_functor* cb, int ok) { + gpr_mu_lock(&shutdown_mu); *static_cast(cb)->done_ = static_cast(ok); + gpr_cv_signal(&shutdown_cv); + gpr_mu_unlock(&shutdown_mu); } private: @@ -183,8 +192,12 @@ class ShutdownCallback : public grpc_experimental_completion_queue_functor { static void BM_Callback_CQ_Pass1Core(benchmark::State& state) { TrackCounters track_counters; - int iteration = 0; + int iteration = 0, current_iterations = 0; TagCallback tag_cb(&iteration); + gpr_mu_init(&mu); + gpr_cv_init(&cv); + gpr_mu_init(&shutdown_mu); + gpr_cv_init(&shutdown_cv); bool got_shutdown = false; ShutdownCallback shutdown_cb(&got_shutdown); grpc_completion_queue* cc = @@ -198,9 +211,29 @@ static void BM_Callback_CQ_Pass1Core(benchmark::State& state) { nullptr, &completion); } shutdown_and_destroy(cc); + + gpr_mu_lock(&mu); + current_iterations = static_cast(state.iterations()); + while (current_iterations != iteration) { + // Wait for all the callbacks to complete. + gpr_cv_wait(&cv, &mu, gpr_inf_future(GPR_CLOCK_REALTIME)); + } + gpr_mu_unlock(&mu); + + gpr_mu_lock(&shutdown_mu); + while (!got_shutdown) { + // Wait for the shutdown callback to complete. + gpr_cv_wait(&shutdown_cv, &shutdown_mu, gpr_inf_future(GPR_CLOCK_REALTIME)); + } + gpr_mu_unlock(&shutdown_mu); + GPR_ASSERT(got_shutdown); GPR_ASSERT(iteration == static_cast(state.iterations())); track_counters.Finish(state); + gpr_cv_destroy(&cv); + gpr_mu_destroy(&mu); + gpr_cv_destroy(&shutdown_cv); + gpr_mu_destroy(&shutdown_mu); } BENCHMARK(BM_Callback_CQ_Pass1Core); diff --git a/test/cpp/microbenchmarks/callback_streaming_ping_pong.h b/test/cpp/microbenchmarks/callback_streaming_ping_pong.h index 9fb86bd8299..0d27e0efa50 100644 --- a/test/cpp/microbenchmarks/callback_streaming_ping_pong.h +++ b/test/cpp/microbenchmarks/callback_streaming_ping_pong.h @@ -115,7 +115,7 @@ class BidiClient int msgs_size_; std::mutex mu; std::condition_variable cv; - bool done; + bool done = false; }; template From 8ef2152c801a4210c6e630012095af5b1fd7edee Mon Sep 17 00:00:00 2001 From: Karthik Ravi Shankar Date: Wed, 29 May 2019 14:28:56 -0700 Subject: [PATCH 80/83] Fix the memory leak. --- src/core/lib/surface/completion_queue.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/core/lib/surface/completion_queue.cc b/src/core/lib/surface/completion_queue.cc index d0ed1a9f673..9b30b3998a5 100644 --- a/src/core/lib/surface/completion_queue.cc +++ b/src/core/lib/surface/completion_queue.cc @@ -820,6 +820,7 @@ static void cq_end_op_for_pluck( static void functor_callback(void* arg, grpc_error* error) { auto* functor = static_cast(arg); functor->functor_run(functor, error == GRPC_ERROR_NONE); + GRPC_ERROR_UNREF(error); } /* Complete an event on a completion queue of type GRPC_CQ_CALLBACK */ @@ -860,14 +861,14 @@ static void cq_end_op_for_callback( if (internal) { grpc_core::ApplicationCallbackExecCtx::Enqueue(functor, (error == GRPC_ERROR_NONE)); + GRPC_ERROR_UNREF(error); } else { GRPC_CLOSURE_SCHED( GRPC_CLOSURE_CREATE( functor_callback, functor, grpc_core::Executor::Scheduler(grpc_core::ExecutorJobType::SHORT)), - GRPC_ERROR_REF(error)); + error); } - GRPC_ERROR_UNREF(error); } void grpc_cq_end_op(grpc_completion_queue* cq, void* tag, grpc_error* error, @@ -1356,7 +1357,7 @@ static void cq_finish_shutdown_callback(grpc_completion_queue* cq) { GRPC_CLOSURE_CREATE( functor_callback, callback, grpc_core::Executor::Scheduler(grpc_core::ExecutorJobType::SHORT)), - GRPC_ERROR_NONE); + GRPC_ERROR_REF(GRPC_ERROR_NONE)); } static void cq_shutdown_callback(grpc_completion_queue* cq) { From 724565372f3b1301f98776bfdc2460b58b50fcbc Mon Sep 17 00:00:00 2001 From: Karthik Ravi Shankar Date: Wed, 29 May 2019 16:42:06 -0700 Subject: [PATCH 81/83] Fix the ref count issue --- src/core/lib/surface/completion_queue.cc | 1 - 1 file changed, 1 deletion(-) diff --git a/src/core/lib/surface/completion_queue.cc b/src/core/lib/surface/completion_queue.cc index 9b30b3998a5..e883d472278 100644 --- a/src/core/lib/surface/completion_queue.cc +++ b/src/core/lib/surface/completion_queue.cc @@ -820,7 +820,6 @@ static void cq_end_op_for_pluck( static void functor_callback(void* arg, grpc_error* error) { auto* functor = static_cast(arg); functor->functor_run(functor, error == GRPC_ERROR_NONE); - GRPC_ERROR_UNREF(error); } /* Complete an event on a completion queue of type GRPC_CQ_CALLBACK */ From fc002a4d02656a7f21c29dbb6ac22a93181e7c75 Mon Sep 17 00:00:00 2001 From: Karthik Ravi Shankar Date: Wed, 29 May 2019 16:59:10 -0700 Subject: [PATCH 82/83] Remove ref for GRPC_ERROR_NONE --- src/core/lib/surface/completion_queue.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/lib/surface/completion_queue.cc b/src/core/lib/surface/completion_queue.cc index e883d472278..60a7d78b525 100644 --- a/src/core/lib/surface/completion_queue.cc +++ b/src/core/lib/surface/completion_queue.cc @@ -1356,7 +1356,7 @@ static void cq_finish_shutdown_callback(grpc_completion_queue* cq) { GRPC_CLOSURE_CREATE( functor_callback, callback, grpc_core::Executor::Scheduler(grpc_core::ExecutorJobType::SHORT)), - GRPC_ERROR_REF(GRPC_ERROR_NONE)); + GRPC_ERROR_NONE); } static void cq_shutdown_callback(grpc_completion_queue* cq) { From 1259579a945ee442225bb79cbcf0ef01fd470d52 Mon Sep 17 00:00:00 2001 From: Muxi Yan Date: Thu, 30 May 2019 08:25:17 -0700 Subject: [PATCH 83/83] clang-format --- src/objective-c/GRPCClient/GRPCCall.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/objective-c/GRPCClient/GRPCCall.m b/src/objective-c/GRPCClient/GRPCCall.m index ba91640269e..52ba1356929 100644 --- a/src/objective-c/GRPCClient/GRPCCall.m +++ b/src/objective-c/GRPCClient/GRPCCall.m @@ -649,7 +649,7 @@ const char *kCFStreamVarName = "grpc_cfstream"; - (void)dealloc { [GRPCConnectivityMonitor unregisterObserver:self]; - + __block GRPCWrappedCall *wrappedCall = _wrappedCall; dispatch_async(_callQueue, ^{ wrappedCall = nil;