From 1eb113c61ed87dbc12d9e76649e206190ccd3c4a Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Thu, 27 Aug 2015 09:26:33 -0700 Subject: [PATCH 001/169] Add metadata echo functionality to interop server, and corresponding interop test --- src/node/interop/interop_client.js | 73 ++++++++++++++++++++++++++++ src/node/interop/interop_server.js | 48 ++++++++++++++++-- src/node/test/interop_sanity_test.js | 4 ++ 3 files changed, 120 insertions(+), 5 deletions(-) diff --git a/src/node/interop/interop_client.js b/src/node/interop/interop_client.js index 8fb8d669206..14ae045275e 100644 --- a/src/node/interop/interop_client.js +++ b/src/node/interop/interop_client.js @@ -49,6 +49,9 @@ var AUTH_USER = ('155450119199-3psnrh1sdr3d8cpj1v46naggf81mhdnk' + var COMPUTE_ENGINE_USER = ('155450119199-r5aaqa2vqoa9g5mv2m6s3m1l293rlmel' + '@developer.gserviceaccount.com'); +var ECHO_INITIAL_KEY = "x-grpc-test-echo-initial"; +var ECHO_TRAILING_KEY = "x-grpc-test-echo-trailing-bin"; + /** * Create a buffer filled with size zeroes * @param {number} size The length of the buffer @@ -60,6 +63,27 @@ function zeroBuffer(size) { return zeros; } +/** + * This is used for testing functions with multiple asynchronous calls that + * can happen in different orders. This should be passed the number of async + * function invocations that can occur last, and each of those should call this + * function's return value + * @param {function()} done The function that should be called when a test is + * complete. + * @param {number} count The number of calls to the resulting function if the + * test passes. + * @return {function()} The function that should be called at the end of each + * sequence of asynchronous functions. + */ +function multiDone(done, count) { + return function() { + count -= 1; + if (count <= 0) { + done(); + } + }; +} + /** * Run the empty_unary test * @param {Client} client The client to test against @@ -271,6 +295,54 @@ function timeoutOnSleepingServer(client, done) { }); } +function customMetadata(client, done) { + done = multiDone(done, 5); + var metadata = new grpc.Metadata(); + metadata.set(ECHO_INITIAL_KEY, 'test_initial_metadata_value'); + metadata.set(ECHO_TRAILING_KEY, new Buffer('ababab', 'hex')); + var arg = { + response_type: 'COMPRESSABLE', + response_size: 314159, + payload: { + body: zeroBuffer(271828) + } + }; + var streaming_arg = { + payload: { + body: zeroBuffer(271828) + } + }; + var unary = client.unaryCall(arg, function(err, resp) { + assert.ifError(err); + done(); + }, metadata); + unary.on('metadata', function(metadata) { + assert.deepEqual(metadata.get(ECHO_INITIAL_KEY), + ['test_initial_metadata_value']); + done(); + }); + unary.on('status', function(status) { + var echo_trailer = status.metadata.get(ECHO_TRAILING_KEY); + assert(echo_trailer.length > 0); + assert.strictEqual(echo_trailer.toString('hex'), 'ababab'); + done(); + }); + var stream = client.fullDuplexCall(metadata); + stream.on('metadata', function(metadata) { + assert.deepEqual(metadata.get(ECHO_INITIAL_KEY), + ['test_initial_metadata_value']); + done(); + }); + stream.on('status', function(status) { + var echo_trailer = status.metadata.get(ECHO_TRAILING_KEY); + assert(echo_trailer.length > 0); + assert.strictEqual(echo_trailer.toString('hex'), 'ababab'); + done(); + }); + stream.write(streaming_arg); + stream.end(); +} + /** * Run one of the authentication tests. * @param {string} expected_user The expected username in the response @@ -358,6 +430,7 @@ var test_cases = { cancel_after_begin: cancelAfterBegin, cancel_after_first_response: cancelAfterFirstResponse, timeout_on_sleeping_server: timeoutOnSleepingServer, + custom_metadata: customMetadata, compute_engine_creds: _.partial(authTest, COMPUTE_ENGINE_USER, null), service_account_creds: _.partial(authTest, AUTH_USER, AUTH_SCOPE), jwt_token_creds: _.partial(authTest, AUTH_USER, null), diff --git a/src/node/interop/interop_server.js b/src/node/interop/interop_server.js index 99155e99584..c23f2376808 100644 --- a/src/node/interop/interop_server.js +++ b/src/node/interop/interop_server.js @@ -39,6 +39,9 @@ var _ = require('lodash'); var grpc = require('..'); var testProto = grpc.load(__dirname + '/test.proto').grpc.testing; +var ECHO_INITIAL_KEY = "x-grpc-test-echo-initial"; +var ECHO_TRAILING_KEY = "x-grpc-test-echo-trailing-bin"; + /** * Create a buffer filled with size zeroes * @param {number} size The length of the buffer @@ -50,6 +53,34 @@ function zeroBuffer(size) { return zeros; } +/** + * Echos a header metadata item as specified in the interop spec. + * @param {Call} call The call to echo metadata on + */ +function echoHeader(call) { + var echo_initial = call.metadata.get(ECHO_INITIAL_KEY); + if (echo_initial.length > 0) { + var response_metadata = new grpc.Metadata(); + response_metadata.set(ECHO_INITIAL_KEY, echo_initial[0]); + call.sendMetadata(response_metadata); + } +} + +/** + * Gets the trailer metadata that should be echoed when the call is done, + * as specified in the interop spec. + * @param {Call} call The call to get metadata from + * @return {grpc.Metadata} The metadata to send as a trailer + */ +function getEchoTrailer(call) { + var echo_trailer = call.metadata.get(ECHO_TRAILING_KEY); + var response_trailer = new grpc.Metadata(); + if (echo_trailer.length > 0) { + response_trailer.set(ECHO_TRAILING_KEY, echo_trailer[0]); + } + return response_trailer; +} + /** * Respond to an empty parameter with an empty response. * NOTE: this currently does not work due to issue #137 @@ -58,7 +89,8 @@ function zeroBuffer(size) { * or error */ function handleEmpty(call, callback) { - callback(null, {}); + echoHeader(call); + callback(null, {}, getEchoTrailer(call)); } /** @@ -68,6 +100,7 @@ function handleEmpty(call, callback) { * error */ function handleUnary(call, callback) { + echoHeader(call); var req = call.request; var zeros = zeroBuffer(req.response_size); var payload_type = req.response_type; @@ -75,7 +108,8 @@ function handleUnary(call, callback) { payload_type = ['COMPRESSABLE', 'UNCOMPRESSABLE'][Math.random() < 0.5 ? 0 : 1]; } - callback(null, {payload: {type: payload_type, body: zeros}}); + callback(null, {payload: {type: payload_type, body: zeros}}, + getEchoTrailer(call)); } /** @@ -85,12 +119,14 @@ function handleUnary(call, callback) { * error */ function handleStreamingInput(call, callback) { + echoHeader(call); var aggregate_size = 0; call.on('data', function(value) { aggregate_size += value.payload.body.length; }); call.on('end', function() { - callback(null, {aggregated_payload_size: aggregate_size}); + callback(null, {aggregated_payload_size: aggregate_size}, + getEchoTrailer(call)); }); } @@ -99,6 +135,7 @@ function handleStreamingInput(call, callback) { * @param {Call} call Call to handle */ function handleStreamingOutput(call) { + echoHeader(call); var req = call.request; var payload_type = req.response_type; if (payload_type === 'RANDOM') { @@ -113,7 +150,7 @@ function handleStreamingOutput(call) { } }); }); - call.end(); + call.end(getEchoTrailer(call)); } /** @@ -122,6 +159,7 @@ function handleStreamingOutput(call) { * @param {Call} call Call to handle */ function handleFullDuplex(call) { + echoHeader(call); call.on('data', function(value) { var payload_type = value.response_type; if (payload_type === 'RANDOM') { @@ -138,7 +176,7 @@ function handleFullDuplex(call) { }); }); call.on('end', function() { - call.end(); + call.end(getEchoTrailer(call)); }); } diff --git a/src/node/test/interop_sanity_test.js b/src/node/test/interop_sanity_test.js index 2ca07c1d50d..d7b6f3316c8 100644 --- a/src/node/test/interop_sanity_test.js +++ b/src/node/test/interop_sanity_test.js @@ -90,4 +90,8 @@ describe('Interop tests', function() { interop_client.runTest(port, name_override, 'timeout_on_sleeping_server', true, true, done); }); + it.only('should pass custom_metadata', function(done) { + interop_client.runTest(port, name_override, 'custom_metadata', + true, true, done); + }); }); From e634f9afdf86df6e89e9a4722b956bd6154b41b0 Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Thu, 27 Aug 2015 10:02:00 -0700 Subject: [PATCH 002/169] Fixed the tests --- src/node/interop/interop_client.js | 8 ++++---- src/node/interop/interop_server.js | 4 ++-- src/node/test/interop_sanity_test.js | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/node/interop/interop_client.js b/src/node/interop/interop_client.js index 14ae045275e..7945ab190ea 100644 --- a/src/node/interop/interop_client.js +++ b/src/node/interop/interop_client.js @@ -49,8 +49,8 @@ var AUTH_USER = ('155450119199-3psnrh1sdr3d8cpj1v46naggf81mhdnk' + var COMPUTE_ENGINE_USER = ('155450119199-r5aaqa2vqoa9g5mv2m6s3m1l293rlmel' + '@developer.gserviceaccount.com'); -var ECHO_INITIAL_KEY = "x-grpc-test-echo-initial"; -var ECHO_TRAILING_KEY = "x-grpc-test-echo-trailing-bin"; +var ECHO_INITIAL_KEY = 'x-grpc-test-echo-initial'; +var ECHO_TRAILING_KEY = 'x-grpc-test-echo-trailing-bin'; /** * Create a buffer filled with size zeroes @@ -324,7 +324,7 @@ function customMetadata(client, done) { unary.on('status', function(status) { var echo_trailer = status.metadata.get(ECHO_TRAILING_KEY); assert(echo_trailer.length > 0); - assert.strictEqual(echo_trailer.toString('hex'), 'ababab'); + assert.strictEqual(echo_trailer[0].toString('hex'), 'ababab'); done(); }); var stream = client.fullDuplexCall(metadata); @@ -336,7 +336,7 @@ function customMetadata(client, done) { stream.on('status', function(status) { var echo_trailer = status.metadata.get(ECHO_TRAILING_KEY); assert(echo_trailer.length > 0); - assert.strictEqual(echo_trailer.toString('hex'), 'ababab'); + assert.strictEqual(echo_trailer[0].toString('hex'), 'ababab'); done(); }); stream.write(streaming_arg); diff --git a/src/node/interop/interop_server.js b/src/node/interop/interop_server.js index c23f2376808..762e6700133 100644 --- a/src/node/interop/interop_server.js +++ b/src/node/interop/interop_server.js @@ -39,8 +39,8 @@ var _ = require('lodash'); var grpc = require('..'); var testProto = grpc.load(__dirname + '/test.proto').grpc.testing; -var ECHO_INITIAL_KEY = "x-grpc-test-echo-initial"; -var ECHO_TRAILING_KEY = "x-grpc-test-echo-trailing-bin"; +var ECHO_INITIAL_KEY = 'x-grpc-test-echo-initial'; +var ECHO_TRAILING_KEY = 'x-grpc-test-echo-trailing-bin'; /** * Create a buffer filled with size zeroes diff --git a/src/node/test/interop_sanity_test.js b/src/node/test/interop_sanity_test.js index d7b6f3316c8..804c1d45e4a 100644 --- a/src/node/test/interop_sanity_test.js +++ b/src/node/test/interop_sanity_test.js @@ -90,7 +90,7 @@ describe('Interop tests', function() { interop_client.runTest(port, name_override, 'timeout_on_sleeping_server', true, true, done); }); - it.only('should pass custom_metadata', function(done) { + it('should pass custom_metadata', function(done) { interop_client.runTest(port, name_override, 'custom_metadata', true, true, done); }); From dd7e017e305d149bca999f670159ad254a7d9598 Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Thu, 27 Aug 2015 10:02:24 -0700 Subject: [PATCH 003/169] Fixed handling of binary metadata values --- src/node/ext/call.cc | 23 ++++++++++++----------- src/node/src/metadata.js | 4 +++- 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/src/node/ext/call.cc b/src/node/ext/call.cc index 18858fa334a..fddc1e214f5 100644 --- a/src/node/ext/call.cc +++ b/src/node/ext/call.cc @@ -111,17 +111,19 @@ bool CreateMetadataArray(Handle metadata, grpc_metadata_array *array, NanAssignPersistent(*handle, value); resources->handles.push_back(unique_ptr( new PersistentHolder(handle))); - continue; + } else { + return false; } - } - if (value->IsString()) { - Handle string_value = value->ToString(); - NanUtf8String *utf8_value = new NanUtf8String(string_value); - resources->strings.push_back(unique_ptr(utf8_value)); - current->value = **utf8_value; - current->value_length = string_value->Length(); } else { - return false; + if (value->IsString()) { + Handle string_value = value->ToString(); + NanUtf8String *utf8_value = new NanUtf8String(string_value); + resources->strings.push_back(unique_ptr(utf8_value)); + current->value = **utf8_value; + current->value_length = string_value->Length(); + } else { + return false; + } } array->count += 1; } @@ -156,8 +158,7 @@ Handle ParseMetadata(const grpc_metadata_array *metadata_array) { } if (EndsWith(elem->key, "-bin")) { array->Set(index_map[elem->key], - MakeFastBuffer( - NanNewBufferHandle(elem->value, elem->value_length))); + NanNewBufferHandle(elem->value, elem->value_length)); } else { array->Set(index_map[elem->key], NanNew(elem->value)); } diff --git a/src/node/src/metadata.js b/src/node/src/metadata.js index 65fd91f3672..c1da70b1974 100644 --- a/src/node/src/metadata.js +++ b/src/node/src/metadata.js @@ -147,7 +147,9 @@ Metadata.prototype.getMap = function() { */ Metadata.prototype.clone = function() { var copy = new Metadata(); - copy._internal_repr = _.cloneDeep(this._internal_repr); + _.forOwn(this._internal_repr, function(value, key) { + copy._internal_repr[key] = _.clone(value); + }); return copy; }; From ada3f61f4d4a90061cee746cae1cd8eadef3b013 Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Wed, 23 Sep 2015 10:47:35 -0700 Subject: [PATCH 004/169] Added function signatures for plugin wrapping --- src/node/ext/credentials.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/node/ext/credentials.h b/src/node/ext/credentials.h index 62957e61c3e..ecbbb968914 100644 --- a/src/node/ext/credentials.h +++ b/src/node/ext/credentials.h @@ -69,6 +69,7 @@ class Credentials : public ::node::ObjectWrap { static NAN_METHOD(CreateFake); static NAN_METHOD(CreateIam); static NAN_METHOD(CreateInsecure); + static NAN_METHOD(CreateFromPlugin); static NanCallback *constructor; // Used for typechecking instances of this javascript class static v8::Persistent fun_tpl; @@ -76,6 +77,19 @@ class Credentials : public ::node::ObjectWrap { grpc_credentials *wrapped_credentials; }; +/* Auth metadata plugin functionality */ + +typedef struct plugin_state { + Nan::Callback *callback; +} plugin_state; + +void plugin_get_metadata(void *state, const char *service_url, + grpc_credentials_plugin_metadata_cb cb, void *user_data); + +void plugin_destroy_state(void *state); + +static NAN_METHOD(PluginCallback); + } // namespace node } // namespace grpc From e339f6feecf943c282ccc5efe4500a7d3d4b660a Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Wed, 23 Sep 2015 11:38:39 -0700 Subject: [PATCH 005/169] Fixed hang when using Node gRPC with other async operations --- src/node/ext/completion_queue_async_worker.cc | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/src/node/ext/completion_queue_async_worker.cc b/src/node/ext/completion_queue_async_worker.cc index bf2cd946a5c..efc611b8b78 100644 --- a/src/node/ext/completion_queue_async_worker.cc +++ b/src/node/ext/completion_queue_async_worker.cc @@ -53,6 +53,9 @@ using v8::Value; grpc_completion_queue *CompletionQueueAsyncWorker::queue; +// Invariants: current_threads <= max_queue_threads +// (current_threads == max_queue_threads) || (waiting_next_calls == 0) + int CompletionQueueAsyncWorker::current_threads; int CompletionQueueAsyncWorker::waiting_next_calls; @@ -74,11 +77,15 @@ grpc_completion_queue *CompletionQueueAsyncWorker::GetQueue() { return queue; } void CompletionQueueAsyncWorker::Next() { NanScope(); if (current_threads < max_queue_threads) { + current_threads += 1; CompletionQueueAsyncWorker *worker = new CompletionQueueAsyncWorker(); NanAsyncQueueWorker(worker); } else { waiting_next_calls += 1; } + GPR_ASSERT(current_threads <= max_queue_threads); + GPR_ASSERT((current_threads == max_queue_threads) || + (waiting_next_calls == 0)); } void CompletionQueueAsyncWorker::Init(Handle exports) { @@ -92,11 +99,15 @@ void CompletionQueueAsyncWorker::HandleOKCallback() { NanScope(); if (waiting_next_calls > 0) { waiting_next_calls -= 1; + // Old worker removed, new worker added. current_threads += 0 CompletionQueueAsyncWorker *worker = new CompletionQueueAsyncWorker(); NanAsyncQueueWorker(worker); } else { current_threads -= 1; } + GPR_ASSERT(current_threads <= max_queue_threads); + GPR_ASSERT((current_threads == max_queue_threads) || + (waiting_next_calls == 0)); NanCallback *callback = GetTagCallback(result.tag); Handle argv[] = {NanNull(), GetTagNodeValue(result.tag)}; callback->Call(2, argv); @@ -106,6 +117,17 @@ void CompletionQueueAsyncWorker::HandleOKCallback() { void CompletionQueueAsyncWorker::HandleErrorCallback() { NanScope(); + if (waiting_next_calls > 0) { + waiting_next_calls -= 1; + // Old worker removed, new worker added. current_threads += 0 + CompletionQueueAsyncWorker *worker = new CompletionQueueAsyncWorker(); + NanAsyncQueueWorker(worker); + } else { + current_threads -= 1; + } + GPR_ASSERT(current_threads <= max_queue_threads); + GPR_ASSERT((current_threads == max_queue_threads) || + (waiting_next_calls == 0)); NanCallback *callback = GetTagCallback(result.tag); Handle argv[] = {NanError(ErrorMessage())}; From ad88f57ae9e43b1d5bcbb53e3baeefff6447121f Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Wed, 23 Sep 2015 12:23:04 -0700 Subject: [PATCH 006/169] update C# examples to 0.7.1 --- examples/csharp/helloworld/.nuget/packages.config | 2 +- examples/csharp/helloworld/Greeter/Greeter.csproj | 14 +++++++------- examples/csharp/helloworld/Greeter/packages.config | 6 +++--- .../helloworld/GreeterClient/GreeterClient.csproj | 14 +++++++------- .../helloworld/GreeterClient/packages.config | 6 +++--- .../helloworld/GreeterServer/GreeterServer.csproj | 14 +++++++------- .../helloworld/GreeterServer/packages.config | 6 +++--- examples/csharp/route_guide/.nuget/packages.config | 2 +- .../route_guide/RouteGuide/RouteGuide.csproj | 14 +++++++------- .../csharp/route_guide/RouteGuide/packages.config | 6 +++--- .../RouteGuideClient/RouteGuideClient.csproj | 14 +++++++------- .../route_guide/RouteGuideClient/packages.config | 6 +++--- .../RouteGuideServer/RouteGuideServer.csproj | 14 +++++++------- .../route_guide/RouteGuideServer/packages.config | 6 +++--- 14 files changed, 62 insertions(+), 62 deletions(-) diff --git a/examples/csharp/helloworld/.nuget/packages.config b/examples/csharp/helloworld/.nuget/packages.config index e2879c18932..1c1f118d466 100644 --- a/examples/csharp/helloworld/.nuget/packages.config +++ b/examples/csharp/helloworld/.nuget/packages.config @@ -1,4 +1,4 @@  - + \ No newline at end of file diff --git a/examples/csharp/helloworld/Greeter/Greeter.csproj b/examples/csharp/helloworld/Greeter/Greeter.csproj index 3d92c4bf25a..2ae8620267f 100644 --- a/examples/csharp/helloworld/Greeter/Greeter.csproj +++ b/examples/csharp/helloworld/Greeter/Greeter.csproj @@ -1,6 +1,6 @@  - + @@ -13,7 +13,7 @@ Greeter Greeter v4.5 - 3ef64a6a + e423e365 true @@ -37,9 +37,9 @@ ..\packages\Google.Protobuf.3.0.0-alpha4\lib\portable-net45+netcore45+wpa81+wp8\Google.Protobuf.dll - + False - ..\packages\Grpc.Core.0.7.0\lib\net45\Grpc.Core.dll + ..\packages\Grpc.Core.0.7.1\lib\net45\Grpc.Core.dll @@ -65,10 +65,10 @@ - - + + - + \ No newline at end of file diff --git a/examples/csharp/helloworld/Greeter/packages.config b/examples/csharp/helloworld/Greeter/packages.config index 1273624cbd0..c0f73879160 100644 --- a/examples/csharp/helloworld/Greeter/packages.config +++ b/examples/csharp/helloworld/Greeter/packages.config @@ -1,10 +1,10 @@  - - + + - + \ No newline at end of file diff --git a/examples/csharp/helloworld/GreeterClient/GreeterClient.csproj b/examples/csharp/helloworld/GreeterClient/GreeterClient.csproj index 7874172bf26..af330f2b905 100644 --- a/examples/csharp/helloworld/GreeterClient/GreeterClient.csproj +++ b/examples/csharp/helloworld/GreeterClient/GreeterClient.csproj @@ -1,6 +1,6 @@  - + @@ -13,7 +13,7 @@ GreeterClient GreeterClient v4.5 - c4057b0a + 2dcf22af true @@ -37,9 +37,9 @@ ..\packages\Google.Protobuf.3.0.0-alpha4\lib\portable-net45+netcore45+wpa81+wp8\Google.Protobuf.dll - + False - ..\packages\Grpc.Core.0.7.0\lib\net45\Grpc.Core.dll + ..\packages\Grpc.Core.0.7.1\lib\net45\Grpc.Core.dll @@ -68,10 +68,10 @@ - - + + - + \ No newline at end of file diff --git a/examples/csharp/helloworld/GreeterClient/packages.config b/examples/csharp/helloworld/GreeterClient/packages.config index 1273624cbd0..c0f73879160 100644 --- a/examples/csharp/helloworld/GreeterClient/packages.config +++ b/examples/csharp/helloworld/GreeterClient/packages.config @@ -1,10 +1,10 @@  - - + + - + \ No newline at end of file diff --git a/examples/csharp/helloworld/GreeterServer/GreeterServer.csproj b/examples/csharp/helloworld/GreeterServer/GreeterServer.csproj index d1db2f4773b..752f32828b0 100644 --- a/examples/csharp/helloworld/GreeterServer/GreeterServer.csproj +++ b/examples/csharp/helloworld/GreeterServer/GreeterServer.csproj @@ -1,6 +1,6 @@  - + @@ -13,7 +13,7 @@ GreeterServer GreeterServer v4.5 - cc15afe5 + 53a3a588 true @@ -37,9 +37,9 @@ ..\packages\Google.Protobuf.3.0.0-alpha4\lib\portable-net45+netcore45+wpa81+wp8\Google.Protobuf.dll - + False - ..\packages\Grpc.Core.0.7.0\lib\net45\Grpc.Core.dll + ..\packages\Grpc.Core.0.7.1\lib\net45\Grpc.Core.dll @@ -68,10 +68,10 @@ - - + + - + \ No newline at end of file diff --git a/examples/csharp/helloworld/GreeterServer/packages.config b/examples/csharp/helloworld/GreeterServer/packages.config index 1273624cbd0..c0f73879160 100644 --- a/examples/csharp/helloworld/GreeterServer/packages.config +++ b/examples/csharp/helloworld/GreeterServer/packages.config @@ -1,10 +1,10 @@  - - + + - + \ No newline at end of file diff --git a/examples/csharp/route_guide/.nuget/packages.config b/examples/csharp/route_guide/.nuget/packages.config index e2879c18932..1c1f118d466 100644 --- a/examples/csharp/route_guide/.nuget/packages.config +++ b/examples/csharp/route_guide/.nuget/packages.config @@ -1,4 +1,4 @@  - + \ No newline at end of file diff --git a/examples/csharp/route_guide/RouteGuide/RouteGuide.csproj b/examples/csharp/route_guide/RouteGuide/RouteGuide.csproj index 302a783aa46..f3342229d42 100644 --- a/examples/csharp/route_guide/RouteGuide/RouteGuide.csproj +++ b/examples/csharp/route_guide/RouteGuide/RouteGuide.csproj @@ -1,6 +1,6 @@  - + @@ -14,7 +14,7 @@ RouteGuide v4.5 512 - 443bbc38 + 256a7eeb true @@ -37,9 +37,9 @@ ..\packages\Google.Protobuf.3.0.0-alpha4\lib\portable-net45+netcore45+wpa81+wp8\Google.Protobuf.dll - + False - ..\packages\Grpc.Core.0.7.0\lib\net45\Grpc.Core.dll + ..\packages\Grpc.Core.0.7.1\lib\net45\Grpc.Core.dll False @@ -77,12 +77,12 @@ - - + + - + + true + + + v120 + Win32 + Debug + cdecl + + \ No newline at end of file diff --git a/vsprojects/copkg/zlib/managed_targets/grpc.dependencies.zlib.redist.targets b/vsprojects/copkg/zlib/managed_targets/grpc.dependencies.zlib.redist.targets new file mode 100644 index 00000000000..f00d97dc361 --- /dev/null +++ b/vsprojects/copkg/zlib/managed_targets/grpc.dependencies.zlib.redist.targets @@ -0,0 +1,14 @@ + + + + + + + + PreserveNewest + + + + + + \ No newline at end of file diff --git a/vsprojects/copkg/zlib/version.inc b/vsprojects/copkg/zlib/version.inc new file mode 100644 index 00000000000..1f893a49514 --- /dev/null +++ b/vsprojects/copkg/zlib/version.inc @@ -0,0 +1 @@ +#define { package-version : 1.2.8.9; } diff --git a/vsprojects/copkg/zlib/zlib.sln b/vsprojects/copkg/zlib/zlib.sln new file mode 100644 index 00000000000..7c38e6e1215 --- /dev/null +++ b/vsprojects/copkg/zlib/zlib.sln @@ -0,0 +1,26 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2012 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlib", "zlib.vcxproj", "{63BED288-E8C3-4345-B84D-2E64598DCF3A}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release|Win32 = Release|Win32 + Debug|x64 = Debug|x64 + Release|x64 = Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {63BED288-E8C3-4345-B84D-2E64598DCF3A}.Debug|Win32.ActiveCfg = Debug|Win32 + {63BED288-E8C3-4345-B84D-2E64598DCF3A}.Debug|Win32.Build.0 = Debug|Win32 + {63BED288-E8C3-4345-B84D-2E64598DCF3A}.Release|Win32.ActiveCfg = Release|Win32 + {63BED288-E8C3-4345-B84D-2E64598DCF3A}.Release|Win32.Build.0 = Release|Win32 + {63BED288-E8C3-4345-B84D-2E64598DCF3A}.Debug|x64.ActiveCfg = Debug|x64 + {63BED288-E8C3-4345-B84D-2E64598DCF3A}.Debug|x64.Build.0 = Debug|x64 + {63BED288-E8C3-4345-B84D-2E64598DCF3A}.Release|x64.ActiveCfg = Release|x64 + {63BED288-E8C3-4345-B84D-2E64598DCF3A}.Release|x64.Build.0 = Release|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/vsprojects/copkg/zlib/zlib.vcxproj b/vsprojects/copkg/zlib/zlib.vcxproj new file mode 100644 index 00000000000..0a60fe53937 --- /dev/null +++ b/vsprojects/copkg/zlib/zlib.vcxproj @@ -0,0 +1,155 @@ + + + + $(registry:HKEY_LOCAL_MACHINE\Software\Outercurve\CoApp.Powershell\etc) + + + false + + + + + v110 + + + + + + + + {63BED288-E8C3-4345-B84D-2E64598DCF3A} + $(MSBuildProjectName) + + 1 + + + DynamicLibrary + + + _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS; + $(Defines);ZLIB_WINAPI; + $(Defines);ZLIB_DLL; + $(Defines);IOWIN32_USING_WINRT_API=1; + $(Defines);IOWIN32_USING_WINRT_API=0; + $(Defines);ASMV;ASMINF; + $(Defines);WIN64; + + + ..\..; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $(ProjectRootDir)Output/$(PlatformToolset)/$(Platform)/$(Configuration)/$(UsesConfigurationType)/$(CallingConvention)/$(CharacterSet)/$(AppContainer)/$(UseASM)/ + $(ProjectRootDir)Intermediate/$(TargetName)/$(PlatformToolset)/$(Platform)/$(Configuration)/$(UsesConfigurationType)/$(CallingConvention)/$(CharacterSet)/$(AppContainer)/$(UseASM)/ + + + + + true + + + 0x5A4C0000 + + + + + + $(IntDir)gvmat64.lst + Build + $(IntDir)gvmat64.obj + + + $(IntDir)inffasx64.lst + Build + $(IntDir)inffasx64.obj + + + $(IntDir)inffas32.lst + Build + true + /coff %(AdditionalOptions) + $(IntDir)inffas32.obj + + + $(IntDir)match686.lst + Build + true + /coff %(AdditionalOptions) + $(IntDir)match686.obj + + + + + + + + + + + + + + + + + + + + + + + + + ZLIB_INTERNAL;%(PreprocessorDefinitions) + + + ZLIB_INTERNAL;%(PreprocessorDefinitions) + + + + + + + + + + + + + From 18e2202fb568d8488e1e63eb6f9bd22baca012b3 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Mon, 28 Sep 2015 17:20:03 -0700 Subject: [PATCH 069/169] customize the coapp scripts for zlib --- vsprojects/{copkg => coapp}/zlib/README.md | 0 vsprojects/{copkg => coapp}/zlib/buildall.bat | 0 .../zlib/grpc.dependencies.zlib.autopkg | 62 +++++++++---------- .../grpc.dependencies.zlib.redist.props | 0 .../grpc.dependencies.zlib.redist.targets | 0 vsprojects/{copkg => coapp}/zlib/version.inc | 0 vsprojects/{copkg => coapp}/zlib/zlib.sln | 0 vsprojects/{copkg => coapp}/zlib/zlib.vcxproj | 56 +++++++---------- 8 files changed, 53 insertions(+), 65 deletions(-) rename vsprojects/{copkg => coapp}/zlib/README.md (100%) rename vsprojects/{copkg => coapp}/zlib/buildall.bat (100%) rename vsprojects/{copkg => coapp}/zlib/grpc.dependencies.zlib.autopkg (57%) rename vsprojects/{copkg => coapp}/zlib/managed_targets/grpc.dependencies.zlib.redist.props (100%) rename vsprojects/{copkg => coapp}/zlib/managed_targets/grpc.dependencies.zlib.redist.targets (100%) rename vsprojects/{copkg => coapp}/zlib/version.inc (100%) rename vsprojects/{copkg => coapp}/zlib/zlib.sln (100%) rename vsprojects/{copkg => coapp}/zlib/zlib.vcxproj (75%) diff --git a/vsprojects/copkg/zlib/README.md b/vsprojects/coapp/zlib/README.md similarity index 100% rename from vsprojects/copkg/zlib/README.md rename to vsprojects/coapp/zlib/README.md diff --git a/vsprojects/copkg/zlib/buildall.bat b/vsprojects/coapp/zlib/buildall.bat similarity index 100% rename from vsprojects/copkg/zlib/buildall.bat rename to vsprojects/coapp/zlib/buildall.bat diff --git a/vsprojects/copkg/zlib/grpc.dependencies.zlib.autopkg b/vsprojects/coapp/zlib/grpc.dependencies.zlib.autopkg similarity index 57% rename from vsprojects/copkg/zlib/grpc.dependencies.zlib.autopkg rename to vsprojects/coapp/zlib/grpc.dependencies.zlib.autopkg index 015103ba2f0..01390b94346 100644 --- a/vsprojects/copkg/zlib/grpc.dependencies.zlib.autopkg +++ b/vsprojects/coapp/zlib/grpc.dependencies.zlib.autopkg @@ -41,42 +41,38 @@ nuget { "managed_targets\${package-id}.redist.targets"; }; - include: { ..\..\zlib.h, ..\..\zconf.h }; + include: { ..\..\..\third_party\zlib\zlib.h, ..\..\..\third_party\zlib\zconf.h }; - docs: { ..\..\doc\**\* }; + docs: { ..\..\..\third_party\zlib\doc\**\* }; source += { - "..\..\adler32.c", - "..\..\compress.c", - "..\..\crc32.c", - "..\..\deflate.c", - "..\..\gzclose.c", - "..\..\gzlib.c", - "..\..\gzread.c", - "..\..\gzwrite.c", - "..\..\infback.c", - "..\..\inffast.c", - "..\..\inflate.c", - "..\..\inftrees.c", - "..\..\trees.c", - "..\..\uncompr.c", - "..\..\zutil.c", - "..\..\crc32.h", - "..\..\deflate.h", - "..\..\gzguts.h", - "..\..\inffast.h", - "..\..\inffixed.h", - "..\..\inflate.h", - "..\..\inftrees.h", - "..\..\trees.h", - "..\..\zconf.h", - "..\..\zlib.h", - "..\..\zutil.h", - "..\masmx64\inffas8664.c", - "..\minizip\ioapi.c", - "..\minizip\iowin32.c", - "..\minizip\unzip.c", - "..\minizip\zip.c", + "..\..\..\third_party\zlib\adler32.c", + "..\..\..\third_party\zlib\compress.c", + "..\..\..\third_party\zlib\crc32.c", + "..\..\..\third_party\zlib\deflate.c", + "..\..\..\third_party\zlib\gzclose.c", + "..\..\..\third_party\zlib\gzlib.c", + "..\..\..\third_party\zlib\gzread.c", + "..\..\..\third_party\zlib\gzwrite.c", + "..\..\..\third_party\zlib\infback.c", + "..\..\..\third_party\zlib\inffast.c", + "..\..\..\third_party\zlib\inflate.c", + "..\..\..\third_party\zlib\inftrees.c", + "..\..\..\third_party\zlib\trees.c", + "..\..\..\third_party\zlib\uncompr.c", + "..\..\..\third_party\zlib\zutil.c", + "..\..\..\third_party\zlib\crc32.h", + "..\..\..\third_party\zlib\deflate.h", + "..\..\..\third_party\zlib\gzguts.h", + "..\..\..\third_party\zlib\inffast.h", + "..\..\..\third_party\zlib\inffixed.h", + "..\..\..\third_party\zlib\inflate.h", + "..\..\..\third_party\zlib\inftrees.h", + "..\..\..\third_party\zlib\trees.h", + "..\..\..\third_party\zlib\zconf.h", + "..\..\..\third_party\zlib\zlib.h", + "..\..\..\third_party\zlib\zutil.h", + "..\..\..\third_party\zlib\contrib\masmx64\inffas8664.c", }; ("v100,v120", "Win32,x64", "Release,Debug", "Dynamic", "cdecl,stdcall", "MultiByte") => { [${0},${1},${2},${3},${4}] { diff --git a/vsprojects/copkg/zlib/managed_targets/grpc.dependencies.zlib.redist.props b/vsprojects/coapp/zlib/managed_targets/grpc.dependencies.zlib.redist.props similarity index 100% rename from vsprojects/copkg/zlib/managed_targets/grpc.dependencies.zlib.redist.props rename to vsprojects/coapp/zlib/managed_targets/grpc.dependencies.zlib.redist.props diff --git a/vsprojects/copkg/zlib/managed_targets/grpc.dependencies.zlib.redist.targets b/vsprojects/coapp/zlib/managed_targets/grpc.dependencies.zlib.redist.targets similarity index 100% rename from vsprojects/copkg/zlib/managed_targets/grpc.dependencies.zlib.redist.targets rename to vsprojects/coapp/zlib/managed_targets/grpc.dependencies.zlib.redist.targets diff --git a/vsprojects/copkg/zlib/version.inc b/vsprojects/coapp/zlib/version.inc similarity index 100% rename from vsprojects/copkg/zlib/version.inc rename to vsprojects/coapp/zlib/version.inc diff --git a/vsprojects/copkg/zlib/zlib.sln b/vsprojects/coapp/zlib/zlib.sln similarity index 100% rename from vsprojects/copkg/zlib/zlib.sln rename to vsprojects/coapp/zlib/zlib.sln diff --git a/vsprojects/copkg/zlib/zlib.vcxproj b/vsprojects/coapp/zlib/zlib.vcxproj similarity index 75% rename from vsprojects/copkg/zlib/zlib.vcxproj rename to vsprojects/coapp/zlib/zlib.vcxproj index 0a60fe53937..56df39a2483 100644 --- a/vsprojects/copkg/zlib/zlib.vcxproj +++ b/vsprojects/coapp/zlib/zlib.vcxproj @@ -8,8 +8,8 @@ - - v110 + + v120 @@ -35,7 +35,7 @@ $(Defines);WIN64; - ..\..; + ..\..\..\third_party\zlib; @@ -89,24 +89,24 @@ - + $(IntDir)gvmat64.lst Build $(IntDir)gvmat64.obj - + $(IntDir)inffasx64.lst Build $(IntDir)inffasx64.obj - + $(IntDir)inffas32.lst Build true /coff %(AdditionalOptions) $(IntDir)inffas32.obj - + $(IntDir)match686.lst Build true @@ -118,36 +118,28 @@ - - - - - - - - - - - - - - - - - - - ZLIB_INTERNAL;%(PreprocessorDefinitions) - - - ZLIB_INTERNAL;%(PreprocessorDefinitions) - - + + + + + + + + + + + + + + + + - + From 191b79cf53edbb2537967860257d3b28453dd7c8 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Wed, 30 Sep 2015 10:49:58 -0700 Subject: [PATCH 070/169] Add comment --- src/core/iomgr/pollset_posix.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/core/iomgr/pollset_posix.c b/src/core/iomgr/pollset_posix.c index f4e4ce60457..82a82cc0644 100644 --- a/src/core/iomgr/pollset_posix.c +++ b/src/core/iomgr/pollset_posix.c @@ -57,7 +57,14 @@ GPR_TLS_DECL(g_current_thread_poller); GPR_TLS_DECL(g_current_thread_worker); +/** Default poll() function - a pointer so that it can be overridden by some + * tests */ grpc_poll_function_type grpc_poll_function = poll; + +/** The alarm system needs to be able to wakeup 'some poller' sometimes + * (specifically when a new alarm needs to be triggered earlier than the next + * alarm 'epoch'). + * This wakeup_fd gives us something to alert on when such a case occurs. */ grpc_wakeup_fd grpc_global_wakeup_fd; static void remove_worker(grpc_pollset *p, grpc_pollset_worker *worker) { From d7d8337df091c90fed6066a28059ae88a910ce52 Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Wed, 30 Sep 2015 11:00:23 -0700 Subject: [PATCH 071/169] Added code for extension coverage --- src/node/.istanbul.yml | 6 ++++++ src/node/binding.gyp | 15 +++++++++++++++ src/node/package.json | 6 ++++-- tools/run_tests/run_node.sh | 15 ++++++++++++++- 4 files changed, 39 insertions(+), 3 deletions(-) create mode 100644 src/node/.istanbul.yml diff --git a/src/node/.istanbul.yml b/src/node/.istanbul.yml new file mode 100644 index 00000000000..9ff1379f511 --- /dev/null +++ b/src/node/.istanbul.yml @@ -0,0 +1,6 @@ +reporting: + watermarks: + statements: [80, 95] + lines: [80, 95] + functions: [80, 95] + branches: [80, 95] diff --git a/src/node/binding.gyp b/src/node/binding.gyp index a6440309324..247719e9813 100644 --- a/src/node/binding.gyp +++ b/src/node/binding.gyp @@ -1,4 +1,7 @@ { + "variables" : { + 'config': '/dev/null 2>&1 && echo true || echo false)' }, 'conditions': [ + ['config=="gcov"', { + 'cflags': [ + '-ftest-coverage', + '-fprofile-arcs', + '-O0' + ], + 'ldflags': [ + '-ftest-coverage', + '-fprofile-arcs' + ] + } + ], ['pkg_config_grpc == "true"', { 'link_settings': { 'libraries': [ diff --git a/src/node/package.json b/src/node/package.json index 22f94757ce6..0a5528781db 100644 --- a/src/node/package.json +++ b/src/node/package.json @@ -21,8 +21,9 @@ }, "scripts": { "lint": "node ./node_modules/jshint/bin/jshint src test examples interop index.js", - "test": "node ./node_modules/mocha/bin/mocha && npm run-script lint", - "gen_docs": "./node_modules/.bin/jsdoc -c jsdoc_conf.json" + "test": "./node_modules/.bin/mocha && npm run-script lint", + "gen_docs": "./node_modules/.bin/jsdoc -c jsdoc_conf.json", + "coverage": "./node_modules/.bin/istanbul cover ./node_modules/.bin/_mocha" }, "dependencies": { "bindings": "^1.2.0", @@ -33,6 +34,7 @@ "devDependencies": { "async": "^0.9.0", "google-auth-library": "^0.9.2", + "istanbul": "^0.3.21", "jsdoc": "^3.3.2", "jshint": "^2.5.0", "minimist": "^1.1.0", diff --git a/tools/run_tests/run_node.sh b/tools/run_tests/run_node.sh index bcd93ed2262..1043b447db3 100755 --- a/tools/run_tests/run_node.sh +++ b/tools/run_tests/run_node.sh @@ -37,6 +37,19 @@ cd $(dirname $0)/../.. root=`pwd` +cd $root/src/node + export LD_LIBRARY_PATH=$root/libs/$CONFIG -$root/src/node/node_modules/mocha/bin/mocha --timeout 8000 $root/src/node/test +if [ "$CONFIG" = "gcov" ] +then + ./node_modules/.bin/istanbul cover ./node_modules/.bin/_mocha -- \ + --timeout 8000 + cd build + gcov Release/obj.target/grpc/ext/*.o + lcov --base-directory . --directory . -c -o coverage.info + genhtml -o ../ext_coverage --num-spaces 2 -t 'Node gRPC test coverage' \ + coverage.info +else + ./node_modules/mocha/bin/mocha --timeout 8000 +fi From 404cf028e58cfe7f367532be6428901db40b78e4 Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Wed, 30 Sep 2015 11:31:21 -0700 Subject: [PATCH 072/169] Subchannel cleanup on iomgr shutdown --- src/core/client_config/subchannel.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/core/client_config/subchannel.c b/src/core/client_config/subchannel.c index 740389003a5..e6c05c93194 100644 --- a/src/core/client_config/subchannel.c +++ b/src/core/client_config/subchannel.c @@ -645,11 +645,24 @@ static void on_alarm(grpc_exec_ctx *exec_ctx, void *arg, int iomgr_success) { iomgr_success = 0; } connectivity_state_changed_locked(exec_ctx, c, "alarm"); - gpr_mu_unlock(&c->mu); if (iomgr_success) { + gpr_mu_unlock(&c->mu); update_reconnect_parameters(c); continue_connect(exec_ctx, c); } else { + waiting_for_connect *w4c; + w4c = c->waiting; + c->waiting = NULL; + gpr_mu_unlock(&c->mu); + while (w4c != NULL) { + waiting_for_connect *next = w4c->next; + grpc_subchannel_del_interested_party(exec_ctx, w4c->subchannel, + w4c->pollset); + w4c->notify->cb(exec_ctx, w4c->notify->cb_arg, 0); + GRPC_SUBCHANNEL_UNREF(exec_ctx, w4c->subchannel, "waiting_for_connect"); + gpr_free(w4c); + w4c = next; + } GRPC_CHANNEL_INTERNAL_UNREF(exec_ctx, c->master, "connecting"); GRPC_SUBCHANNEL_UNREF(exec_ctx, c, "connecting"); } From 5f709ca2a43e63c0fc069112b53acb2f84211ff0 Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Wed, 30 Sep 2015 14:22:54 -0700 Subject: [PATCH 073/169] Split Credentials into two types --- src/node/binding.gyp | 3 +- src/node/ext/call.cc | 8 +- .../{credentials.cc => call_credentials.cc} | 117 +++------- .../ext/{credentials.h => call_credentials.h} | 24 +-- src/node/ext/channel.cc | 8 +- src/node/ext/channel_credentials.cc | 200 ++++++++++++++++++ src/node/ext/channel_credentials.h | 79 +++++++ src/node/ext/node_grpc.cc | 6 +- src/node/interop/interop_client.js | 3 +- src/node/src/credentials.js | 46 ++-- src/node/test/call_test.js | 2 +- src/node/test/channel_test.js | 2 +- src/node/test/credentials_test.js | 20 ++ src/node/test/end_to_end_test.js | 2 +- 14 files changed, 392 insertions(+), 128 deletions(-) rename src/node/ext/{credentials.cc => call_credentials.cc} (68%) rename src/node/ext/{credentials.h => call_credentials.h} (85%) create mode 100644 src/node/ext/channel_credentials.cc create mode 100644 src/node/ext/channel_credentials.h diff --git a/src/node/binding.gyp b/src/node/binding.gyp index a6440309324..36147a5552f 100644 --- a/src/node/binding.gyp +++ b/src/node/binding.gyp @@ -72,9 +72,10 @@ "sources": [ "ext/byte_buffer.cc", "ext/call.cc", + "ext/call_credentials.cc", "ext/channel.cc", + "ext/channel_credentials.cc", "ext/completion_queue_async_worker.cc", - "ext/credentials.cc", "ext/node_grpc.cc", "ext/server.cc", "ext/server_credentials.cc", diff --git a/src/node/ext/call.cc b/src/node/ext/call.cc index fccb30f547e..116263554ac 100644 --- a/src/node/ext/call.cc +++ b/src/node/ext/call.cc @@ -46,7 +46,7 @@ #include "call.h" #include "channel.h" #include "completion_queue_async_worker.h" -#include "credentials.h" +#include "call_credentials.h" #include "timeval.h" using std::unique_ptr; @@ -733,12 +733,12 @@ NAN_METHOD(Call::SetCredentials) { return Nan::ThrowTypeError( "setCredentials can only be called on Call objects"); } - if (!Credentials::HasInstance(info[0])) { + if (!CallCredentials::HasInstance(info[0])) { return Nan::ThrowTypeError( - "setCredentials' first argument must be a credential"); + "setCredentials' first argument must be a CallCredentials"); } Call *call = ObjectWrap::Unwrap(info.This()); - Credentials *creds_object = ObjectWrap::Unwrap( + CallCredentials *creds_object = ObjectWrap::Unwrap( Nan::To(info[0]).ToLocalChecked()); grpc_credentials *creds = creds_object->GetWrappedCredentials(); grpc_call_error error = GRPC_CALL_ERROR; diff --git a/src/node/ext/credentials.cc b/src/node/ext/call_credentials.cc similarity index 68% rename from src/node/ext/credentials.cc rename to src/node/ext/call_credentials.cc index 182c99d0e0d..839bb567e48 100644 --- a/src/node/ext/credentials.cc +++ b/src/node/ext/call_credentials.cc @@ -36,7 +36,7 @@ #include "grpc/grpc.h" #include "grpc/grpc_security.h" #include "grpc/support/log.h" -#include "credentials.h" +#include "call_credentials.h" #include "call.h" namespace grpc { @@ -61,47 +61,42 @@ using v8::Object; using v8::ObjectTemplate; using v8::Value; -Nan::Callback *Credentials::constructor; -Persistent Credentials::fun_tpl; +Nan::Callback *CallCredentials::constructor; +Persistent CallCredentials::fun_tpl; -Credentials::Credentials(grpc_credentials *credentials) +CallCredentials::CallCredentials(grpc_credentials *credentials) : wrapped_credentials(credentials) {} -Credentials::~Credentials() { +CallCredentials::~CallCredentials() { grpc_credentials_release(wrapped_credentials); } -void Credentials::Init(Local exports) { +void CallCredentials::Init(Local exports) { HandleScope scope; Local tpl = Nan::New(New); - tpl->SetClassName(Nan::New("Credentials").ToLocalChecked()); + tpl->SetClassName(Nan::New("CallCredentials").ToLocalChecked()); tpl->InstanceTemplate()->SetInternalFieldCount(1); + Nan::SetPrototypeMethod(tpl, "compose", Compose); fun_tpl.Reset(tpl); Local ctr = Nan::GetFunction(tpl).ToLocalChecked(); - Nan::Set(ctr, Nan::New("createSsl").ToLocalChecked(), - Nan::GetFunction( - Nan::New(CreateSsl)).ToLocalChecked()); - Nan::Set(ctr, Nan::New("createComposite").ToLocalChecked(), - Nan::GetFunction( - Nan::New(CreateComposite)).ToLocalChecked()); - Nan::Set(ctr, Nan::New("createInsecure").ToLocalChecked(), - Nan::GetFunction( - Nan::New(CreateInsecure)).ToLocalChecked()); Nan::Set(ctr, Nan::New("createFromPlugin").ToLocalChecked(), Nan::GetFunction( Nan::New(CreateFromPlugin)).ToLocalChecked()); - Nan::Set(exports, Nan::New("Credentials").ToLocalChecked(), ctr); + Nan::Set(exports, Nan::New("CallCredentials").ToLocalChecked(), ctr); constructor = new Nan::Callback(ctr); } -bool Credentials::HasInstance(Local val) { +bool CallCredentials::HasInstance(Local val) { HandleScope scope; return Nan::New(fun_tpl)->HasInstance(val); } -Local Credentials::WrapStruct(grpc_credentials *credentials) { +Local CallCredentials::WrapStruct(grpc_credentials *credentials) { EscapableHandleScope scope; const int argc = 1; + if (credentials == NULL) { + return scope.Escape(Nan::Null()); + } Local argv[argc] = { Nan::New(reinterpret_cast(credentials))}; MaybeLocal maybe_instance = Nan::NewInstance( @@ -113,20 +108,20 @@ Local Credentials::WrapStruct(grpc_credentials *credentials) { } } -grpc_credentials *Credentials::GetWrappedCredentials() { +grpc_credentials *CallCredentials::GetWrappedCredentials() { return wrapped_credentials; } -NAN_METHOD(Credentials::New) { +NAN_METHOD(CallCredentials::New) { if (info.IsConstructCall()) { if (!info[0]->IsExternal()) { return Nan::ThrowTypeError( - "Credentials can only be created with the provided functions"); + "CallCredentials can only be created with the provided functions"); } Local ext = info[0].As(); grpc_credentials *creds_value = reinterpret_cast(ext->Value()); - Credentials *credentials = new Credentials(creds_value); + CallCredentials *credentials = new CallCredentials(creds_value); credentials->Wrap(info.This()); info.GetReturnValue().Set(info.This()); return; @@ -144,71 +139,26 @@ NAN_METHOD(Credentials::New) { } } -NAN_METHOD(Credentials::CreateSsl) { - char *root_certs = NULL; - grpc_ssl_pem_key_cert_pair key_cert_pair = {NULL, NULL}; - if (::node::Buffer::HasInstance(info[0])) { - root_certs = ::node::Buffer::Data(info[0]); - } else if (!(info[0]->IsNull() || info[0]->IsUndefined())) { - return Nan::ThrowTypeError("createSsl's first argument must be a Buffer"); - } - if (::node::Buffer::HasInstance(info[1])) { - key_cert_pair.private_key = ::node::Buffer::Data(info[1]); - } else if (!(info[1]->IsNull() || info[1]->IsUndefined())) { - return Nan::ThrowTypeError( - "createSSl's second argument must be a Buffer if provided"); - } - if (::node::Buffer::HasInstance(info[2])) { - key_cert_pair.cert_chain = ::node::Buffer::Data(info[2]); - } else if (!(info[2]->IsNull() || info[2]->IsUndefined())) { - return Nan::ThrowTypeError( - "createSSl's third argument must be a Buffer if provided"); - } - grpc_credentials *creds = grpc_ssl_credentials_create( - root_certs, key_cert_pair.private_key == NULL ? NULL : &key_cert_pair, - NULL); - if (creds == NULL) { - info.GetReturnValue().SetNull(); - } else { - info.GetReturnValue().Set(WrapStruct(creds)); - } -} - -NAN_METHOD(Credentials::CreateComposite) { - if (!HasInstance(info[0])) { +NAN_METHOD(CallCredentials::Compose) { + if (!CallCredentials::HasInstance(info.This())) { return Nan::ThrowTypeError( - "createComposite's first argument must be a Credentials object"); + "compose can only be called on CallCredentials objects"); } - if (!HasInstance(info[1])) { + if (!CallCredentials::HasInstance(info[0])) { return Nan::ThrowTypeError( - "createComposite's second argument must be a Credentials object"); + "compose's first argument must be a CallCredentials object"); } - Credentials *creds0 = ObjectWrap::Unwrap( + CallCredentials *self = ObjectWrap::Unwrap(info.This()); + CallCredentials *other = ObjectWrap::Unwrap( Nan::To(info[0]).ToLocalChecked()); - Credentials *creds1 = ObjectWrap::Unwrap( - Nan::To(info[1]).ToLocalChecked()); - if (creds0->wrapped_credentials == NULL) { - info.GetReturnValue().Set(info[1]); - return; - } - if (creds1->wrapped_credentials == NULL) { - info.GetReturnValue().Set(info[0]); - return; - } grpc_credentials *creds = grpc_composite_credentials_create( - creds0->wrapped_credentials, creds1->wrapped_credentials, NULL); - if (creds == NULL) { - info.GetReturnValue().SetNull(); - } else { - info.GetReturnValue().Set(WrapStruct(creds)); - } + self->wrapped_credentials, other->wrapped_credentials, NULL); + info.GetReturnValue().Set(WrapStruct(creds)); } -NAN_METHOD(Credentials::CreateInsecure) { - info.GetReturnValue().Set(WrapStruct(NULL)); -} -NAN_METHOD(Credentials::CreateFromPlugin) { + +NAN_METHOD(CallCredentials::CreateFromPlugin) { if (!info[0]->IsFunction()) { return Nan::ThrowTypeError( "createFromPlugin's argument must be a function"); @@ -221,11 +171,7 @@ NAN_METHOD(Credentials::CreateFromPlugin) { plugin.state = reinterpret_cast(state); grpc_credentials *creds = grpc_metadata_credentials_create_from_plugin(plugin, NULL); - if (creds == NULL) { - info.GetReturnValue().SetNull(); - } else { - info.GetReturnValue().Set(WrapStruct(creds)); - } + info.GetReturnValue().Set(WrapStruct(creds)); } NAN_METHOD(PluginCallback) { @@ -245,9 +191,6 @@ NAN_METHOD(PluginCallback) { shared_ptr resources(new Resources); grpc_status_code code = static_cast( Nan::To(info[0]).FromJust()); - //Utf8String details_str(info[1]); - //char *details = static_cast(calloc(details_str.length(), sizeof(char))); - //memcpy(details, *details_str, details_str.length()); char *details = *Utf8String(info[1]); grpc_metadata_array array; if (!CreateMetadataArray(Nan::To(info[2]).ToLocalChecked(), diff --git a/src/node/ext/credentials.h b/src/node/ext/call_credentials.h similarity index 85% rename from src/node/ext/credentials.h rename to src/node/ext/call_credentials.h index fd0360ed5f4..618292d19e8 100644 --- a/src/node/ext/credentials.h +++ b/src/node/ext/call_credentials.h @@ -31,19 +31,17 @@ * */ -#ifndef NET_GRPC_NODE_CREDENTIALS_H_ -#define NET_GRPC_NODE_CREDENTIALS_H_ +#ifndef GRPC_NODE_CALL_CREDENTIALS_H_ +#define GRPC_NODE_CALL_CREDENTIALS_H_ #include #include -#include "grpc/grpc.h" #include "grpc/grpc_security.h" namespace grpc { namespace node { -/* Wrapper class for grpc_credentials structs */ -class Credentials : public Nan::ObjectWrap { +class CallCredentials : public Nan::ObjectWrap { public: static void Init(v8::Local exports); static bool HasInstance(v8::Local val); @@ -54,18 +52,18 @@ class Credentials : public Nan::ObjectWrap { grpc_credentials *GetWrappedCredentials(); private: - explicit Credentials(grpc_credentials *credentials); - ~Credentials(); + explicit CallCredentials(grpc_credentials *credentials); + ~CallCredentials(); // Prevent copying - Credentials(const Credentials &); - Credentials &operator=(const Credentials &); + CallCredentials(const CallCredentials &); + CallCredentials &operator=(const CallCredentials &); static NAN_METHOD(New); static NAN_METHOD(CreateSsl); - static NAN_METHOD(CreateComposite); - static NAN_METHOD(CreateInsecure); static NAN_METHOD(CreateFromPlugin); + + static NAN_METHOD(Compose); static Nan::Callback *constructor; // Used for typechecking instances of this javascript class static Nan::Persistent fun_tpl; @@ -97,6 +95,6 @@ NAN_METHOD(PluginCallback); NAUV_WORK_CB(SendPluginCallback); } // namespace node -} // namespace grpc +} // namepsace grpc -#endif // NET_GRPC_NODE_CREDENTIALS_H_ +#endif // GRPC_NODE_CALL_CREDENTIALS_H_ diff --git a/src/node/ext/channel.cc b/src/node/ext/channel.cc index 6eb1e776884..a328c017130 100644 --- a/src/node/ext/channel.cc +++ b/src/node/ext/channel.cc @@ -42,7 +42,7 @@ #include "call.h" #include "channel.h" #include "completion_queue_async_worker.h" -#include "credentials.h" +#include "channel_credentials.h" #include "timeval.h" namespace grpc { @@ -112,11 +112,11 @@ NAN_METHOD(Channel::New) { // Owned by the Channel object Utf8String host(info[0]); grpc_credentials *creds; - if (!Credentials::HasInstance(info[1])) { + if (!ChannelCredentials::HasInstance(info[1])) { return Nan::ThrowTypeError( - "Channel's second argument must be a credential"); + "Channel's second argument must be a ChannelCredentials"); } - Credentials *creds_object = ObjectWrap::Unwrap( + ChannelCredentials *creds_object = ObjectWrap::Unwrap( Nan::To(info[1]).ToLocalChecked()); creds = creds_object->GetWrappedCredentials(); grpc_channel_args *channel_args_ptr; diff --git a/src/node/ext/channel_credentials.cc b/src/node/ext/channel_credentials.cc new file mode 100644 index 00000000000..07763bd301d --- /dev/null +++ b/src/node/ext/channel_credentials.cc @@ -0,0 +1,200 @@ +/* + * + * Copyright 2015, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include + +#include "grpc/grpc.h" +#include "grpc/grpc_security.h" +#include "grpc/support/log.h" +#include "channel_credentials.h" +#include "call_credentials.h" +#include "call.h" + +namespace grpc { +namespace node { + +using Nan::Callback; +using Nan::EscapableHandleScope; +using Nan::HandleScope; +using Nan::Maybe; +using Nan::MaybeLocal; +using Nan::ObjectWrap; +using Nan::Persistent; +using Nan::Utf8String; + +using v8::Exception; +using v8::External; +using v8::Function; +using v8::FunctionTemplate; +using v8::Integer; +using v8::Local; +using v8::Object; +using v8::ObjectTemplate; +using v8::Value; + +Nan::Callback *ChannelCredentials::constructor; +Persistent ChannelCredentials::fun_tpl; + +ChannelCredentials::ChannelCredentials(grpc_credentials *credentials) + : wrapped_credentials(credentials) {} + +ChannelCredentials::~ChannelCredentials() { + grpc_credentials_release(wrapped_credentials); +} + +void ChannelCredentials::Init(Local exports) { + HandleScope scope; + Local tpl = Nan::New(New); + tpl->SetClassName(Nan::New("ChannelCredentials").ToLocalChecked()); + tpl->InstanceTemplate()->SetInternalFieldCount(1); + Nan::SetPrototypeMethod(tpl, "compose", Compose); + fun_tpl.Reset(tpl); + Local ctr = Nan::GetFunction(tpl).ToLocalChecked(); + Nan::Set(ctr, Nan::New("createSsl").ToLocalChecked(), + Nan::GetFunction( + Nan::New(CreateSsl)).ToLocalChecked()); + Nan::Set(ctr, Nan::New("createInsecure").ToLocalChecked(), + Nan::GetFunction( + Nan::New(CreateInsecure)).ToLocalChecked()); + Nan::Set(exports, Nan::New("ChannelCredentials").ToLocalChecked(), ctr); + constructor = new Nan::Callback(ctr); +} + +bool ChannelCredentials::HasInstance(Local val) { + HandleScope scope; + return Nan::New(fun_tpl)->HasInstance(val); +} + +Local ChannelCredentials::WrapStruct(grpc_credentials *credentials) { + EscapableHandleScope scope; + const int argc = 1; + Local argv[argc] = { + Nan::New(reinterpret_cast(credentials))}; + MaybeLocal maybe_instance = Nan::NewInstance( + constructor->GetFunction(), argc, argv); + if (maybe_instance.IsEmpty()) { + return scope.Escape(Nan::Null()); + } else { + return scope.Escape(maybe_instance.ToLocalChecked()); + } +} + +grpc_credentials *ChannelCredentials::GetWrappedCredentials() { + return wrapped_credentials; +} + +NAN_METHOD(ChannelCredentials::New) { + if (info.IsConstructCall()) { + if (!info[0]->IsExternal()) { + return Nan::ThrowTypeError( + "ChannelCredentials can only be created with the provided functions"); + } + Local ext = info[0].As(); + grpc_credentials *creds_value = + reinterpret_cast(ext->Value()); + ChannelCredentials *credentials = new ChannelCredentials(creds_value); + credentials->Wrap(info.This()); + info.GetReturnValue().Set(info.This()); + return; + } else { + const int argc = 1; + Local argv[argc] = {info[0]}; + MaybeLocal maybe_instance = constructor->GetFunction()->NewInstance( + argc, argv); + if (maybe_instance.IsEmpty()) { + // There's probably a pending exception + return; + } else { + info.GetReturnValue().Set(maybe_instance.ToLocalChecked()); + } + } +} + +NAN_METHOD(ChannelCredentials::CreateSsl) { + char *root_certs = NULL; + grpc_ssl_pem_key_cert_pair key_cert_pair = {NULL, NULL}; + if (::node::Buffer::HasInstance(info[0])) { + root_certs = ::node::Buffer::Data(info[0]); + } else if (!(info[0]->IsNull() || info[0]->IsUndefined())) { + return Nan::ThrowTypeError("createSsl's first argument must be a Buffer"); + } + if (::node::Buffer::HasInstance(info[1])) { + key_cert_pair.private_key = ::node::Buffer::Data(info[1]); + } else if (!(info[1]->IsNull() || info[1]->IsUndefined())) { + return Nan::ThrowTypeError( + "createSSl's second argument must be a Buffer if provided"); + } + if (::node::Buffer::HasInstance(info[2])) { + key_cert_pair.cert_chain = ::node::Buffer::Data(info[2]); + } else if (!(info[2]->IsNull() || info[2]->IsUndefined())) { + return Nan::ThrowTypeError( + "createSSl's third argument must be a Buffer if provided"); + } + grpc_credentials *creds = grpc_ssl_credentials_create( + root_certs, key_cert_pair.private_key == NULL ? NULL : &key_cert_pair, + NULL); + if (creds == NULL) { + info.GetReturnValue().SetNull(); + } else { + info.GetReturnValue().Set(WrapStruct(creds)); + } +} + +NAN_METHOD(ChannelCredentials::Compose) { + if (!ChannelCredentials::HasInstance(info.This())) { + return Nan::ThrowTypeError( + "compose can only be called on ChannelCredentials objects"); + } + if (!CallCredentials::HasInstance(info[0])) { + return Nan::ThrowTypeError( + "compose's first argument must be a CallCredentials object"); + } + ChannelCredentials *self = ObjectWrap::Unwrap( + info.This()); + CallCredentials *other = ObjectWrap::Unwrap( + Nan::To(info[0]).ToLocalChecked()); + grpc_credentials *creds = grpc_composite_credentials_create( + self->wrapped_credentials, other->GetWrappedCredentials(), NULL); + if (creds == NULL) { + info.GetReturnValue().SetNull(); + } else { + info.GetReturnValue().Set(WrapStruct(creds)); + } +} + +NAN_METHOD(ChannelCredentials::CreateInsecure) { + info.GetReturnValue().Set(WrapStruct(NULL)); +} + +} // namespace node +} // namespace grpc diff --git a/src/node/ext/channel_credentials.h b/src/node/ext/channel_credentials.h new file mode 100644 index 00000000000..31ea0987bc6 --- /dev/null +++ b/src/node/ext/channel_credentials.h @@ -0,0 +1,79 @@ +/* + * + * Copyright 2015, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#ifndef NET_GRPC_NODE_CHANNEL_CREDENTIALS_H_ +#define NET_GRPC_NODE_CHANNEL_CREDENTIALS_H_ + +#include +#include +#include "grpc/grpc.h" +#include "grpc/grpc_security.h" + +namespace grpc { +namespace node { + +/* Wrapper class for grpc_credentials structs */ +class ChannelCredentials : public Nan::ObjectWrap { + public: + static void Init(v8::Local exports); + static bool HasInstance(v8::Local val); + /* Wrap a grpc_credentials struct in a javascript object */ + static v8::Local WrapStruct(grpc_credentials *credentials); + + /* Returns the grpc_credentials struct that this object wraps */ + grpc_credentials *GetWrappedCredentials(); + + private: + explicit ChannelCredentials(grpc_credentials *credentials); + ~ChannelCredentials(); + + // Prevent copying + ChannelCredentials(const ChannelCredentials &); + ChannelCredentials &operator=(const ChannelCredentials &); + + static NAN_METHOD(New); + static NAN_METHOD(CreateSsl); + static NAN_METHOD(CreateInsecure); + + static NAN_METHOD(Compose); + static Nan::Callback *constructor; + // Used for typechecking instances of this javascript class + static Nan::Persistent fun_tpl; + + grpc_credentials *wrapped_credentials; +}; + +} // namespace node +} // namespace grpc + +#endif // NET_GRPC_NODE_CHANNEL_CREDENTIALS_H_ diff --git a/src/node/ext/node_grpc.cc b/src/node/ext/node_grpc.cc index caca0fc4522..6fdd398f5d5 100644 --- a/src/node/ext/node_grpc.cc +++ b/src/node/ext/node_grpc.cc @@ -37,10 +37,11 @@ #include "grpc/grpc.h" #include "call.h" +#include "call_credentials.h" #include "channel.h" +#include "channel_credentials.h" #include "server.h" #include "completion_queue_async_worker.h" -#include "credentials.h" #include "server_credentials.h" using v8::Local; @@ -240,10 +241,11 @@ void init(Local exports) { InitWriteFlags(exports); grpc::node::Call::Init(exports); + grpc::node::CallCredentials::Init(exports); grpc::node::Channel::Init(exports); + grpc::node::ChannelCredentials::Init(exports); grpc::node::Server::Init(exports); grpc::node::CompletionQueueAsyncWorker::Init(exports); - grpc::node::Credentials::Init(exports); grpc::node::ServerCredentials::Init(exports); } diff --git a/src/node/interop/interop_client.js b/src/node/interop/interop_client.js index 84cd7aff6e3..ba87d4227a4 100644 --- a/src/node/interop/interop_client.js +++ b/src/node/interop/interop_client.js @@ -460,7 +460,8 @@ function runTest(address, host_override, test_case, tls, test_ca, done) { if (test.getCreds) { test.getCreds(function(err, new_creds) { - execute(err, grpc.credentials.combineCredentials(creds, new_creds)); + execute(err, grpc.credentials.combineChannelCredentials( + creds, new_creds)); }); } else { execute(null, creds); diff --git a/src/node/src/credentials.js b/src/node/src/credentials.js index f233ba76135..b7a3ea5b64d 100644 --- a/src/node/src/credentials.js +++ b/src/node/src/credentials.js @@ -40,7 +40,9 @@ var grpc = require('bindings')('grpc.node'); -var Credentials = grpc.Credentials; +var CallCredentials = grpc.CallCredentials; + +var ChannelCredentials = grpc.ChannelCredentials; var Metadata = require('./metadata.js'); @@ -51,8 +53,9 @@ var Metadata = require('./metadata.js'); * @param {Buffer=} private_key The client certificate private key, if * applicable * @param {Buffer=} cert_chain The client certificate cert chain, if applicable + * @return {ChannelCredentials} The SSL Credentials object */ -exports.createSsl = Credentials.createSsl; +exports.createSsl = ChannelCredentials.createSsl; /** * Create a gRPC credentials object from a metadata generation function. This @@ -61,10 +64,10 @@ exports.createSsl = Credentials.createSsl; * which corresponds to a status code that this library uses. * @param {function(String, function(Error, Metadata))} metadata_generator The * function that generates metadata - * @return {Credentials} The credentials object + * @return {CallCredentials} The credentials object */ exports.createFromMetadataGenerator = function(metadata_generator) { - return Credentials.createFromPlugin(function(service_url, callback) { + return CallCredentials.createFromPlugin(function(service_url, callback) { metadata_generator(service_url, function(error, metadata) { var code = grpc.status.OK; var message = ''; @@ -82,7 +85,7 @@ exports.createFromMetadataGenerator = function(metadata_generator) { /** * Create a gRPC credential from a Google credential object. * @param {Object} google_credential The Google credential object to use - * @return {Credentials} The resulting credentials object + * @return {CallCredentials} The resulting credentials object */ exports.createFromGoogleCredential = function(google_credential) { return exports.createFromMetadataGenerator(function(service_url, callback) { @@ -99,22 +102,39 @@ exports.createFromGoogleCredential = function(google_credential) { }; /** - * Combine any number of Credentials into a single credentials object - * @param(...Credentials) credentials The Credentials to combine - * @return Credentials A credentials object that combines all of the input + * Combine a ChannelCredentials with any number of CallCredentials into a single + * ChannelCredentials object. + * @param {ChannelCredentials} channel_credential The ChannelCredentials to + * start with + * @param {...CallCredentials} credentials The CallCredentials to compose + * @return ChannelCredentials A credentials object that combines all of the + * input credentials + */ +exports.combineChannelCredentials = function(channel_credential) { + var current = channel_credential; + for (var i = 1; i < arguments.length; i++) { + current = current.compose(arguments[i]); + } + return current; +}; + +/** + * Combine any number of CallCredentials into a single CallCredentials object + * @param {...CallCredentials} credentials the CallCredentials to compose + * @return CallCredentials A credentials object that combines all of the input * credentials */ -exports.combineCredentials = function() { +exports.combineCallCredentials = function() { var current = arguments[0]; for (var i = 1; i < arguments.length; i++) { - current = Credentials.createComposite(current, arguments[i]); + current = current.compose(arguments[i]); } return current; -}; +} /** * Create an insecure credentials object. This is used to create a channel that * does not use SSL. - * @return Credentials The insecure credentials object + * @return {ChannelCredentials} The insecure credentials object */ -exports.createInsecure = Credentials.createInsecure; +exports.createInsecure = ChannelCredentials.createInsecure; diff --git a/src/node/test/call_test.js b/src/node/test/call_test.js index e7f071bcd53..bb292cb2616 100644 --- a/src/node/test/call_test.js +++ b/src/node/test/call_test.js @@ -48,7 +48,7 @@ function getDeadline(timeout_secs) { return deadline; } -var insecureCreds = grpc.Credentials.createInsecure(); +var insecureCreds = grpc.ChannelCredentials.createInsecure(); describe('call', function() { var channel; diff --git a/src/node/test/channel_test.js b/src/node/test/channel_test.js index 2e436222d1e..da7aa8d7461 100644 --- a/src/node/test/channel_test.js +++ b/src/node/test/channel_test.js @@ -56,7 +56,7 @@ function multiDone(done, count) { } }; } -var insecureCreds = grpc.Credentials.createInsecure(); +var insecureCreds = grpc.ChannelCredentials.createInsecure(); describe('channel', function() { describe('constructor', function() { diff --git a/src/node/test/credentials_test.js b/src/node/test/credentials_test.js index e84ade681f4..8eb91ee69e6 100644 --- a/src/node/test/credentials_test.js +++ b/src/node/test/credentials_test.js @@ -219,5 +219,25 @@ describe('client credentials', function() { }); call.end(); }); + it('should be able to use multiple plugin credentials', function(done) { + var altMetadataUpdater = function(service_url, callback) { + var metadata = new grpc.Metadata(); + metadata.set('other_plugin_key', 'other_plugin_value'); + callback(null, metadata); + }; + var alt_updater_creds = grpc.credentials.createFromMetadataGenerator( + altMetadataUpdater); + var combined_updater = grpc.credentials.combineCallCredentials( + updater_creds, alt_updater_creds); + var call = client.unary({}, function(err, data) { + assert.ifError(err); + }, null, {credentials: updater_creds}); + call.on('metadata', function(metadata) { + assert.deepEqual(metadata.get('plugin_key'), ['plugin_value']); + assert.deepEqual(metadata.get('other_plugin_key'), + ['other_plugin_value']); + done(); + }); + }); }); }); diff --git a/src/node/test/end_to_end_test.js b/src/node/test/end_to_end_test.js index 4b8da3bfb17..78a99fba420 100644 --- a/src/node/test/end_to_end_test.js +++ b/src/node/test/end_to_end_test.js @@ -57,7 +57,7 @@ function multiDone(done, count) { }; } -var insecureCreds = grpc.Credentials.createInsecure(); +var insecureCreds = grpc.ChannelCredentials.createInsecure(); describe('end-to-end', function() { var server; From d43ad333b8847b596b3e1205e85635f0c513aa08 Mon Sep 17 00:00:00 2001 From: Masood Malekghassemi Date: Thu, 17 Sep 2015 14:50:36 -0700 Subject: [PATCH 074/169] Make load_tests protocol tests run via py.test --- src/python/grpcio_test/grpc_test/conftest.py | 60 ++++++++++++++++++++ tools/run_tests/run_python.sh | 10 ---- 2 files changed, 60 insertions(+), 10 deletions(-) create mode 100644 src/python/grpcio_test/grpc_test/conftest.py diff --git a/src/python/grpcio_test/grpc_test/conftest.py b/src/python/grpcio_test/grpc_test/conftest.py new file mode 100644 index 00000000000..357320ec64b --- /dev/null +++ b/src/python/grpcio_test/grpc_test/conftest.py @@ -0,0 +1,60 @@ +import types +import unittest + +import pytest + + +class LoadTestsSuiteCollector(pytest.Collector): + + def __init__(self, name, parent, suite): + super(LoadTestsSuiteCollector, self).__init__(name, parent=parent) + self.suite = suite + self.obj = suite + + def collect(self): + collected = [] + for case in self.suite: + if isinstance(case, unittest.TestCase): + collected.append(LoadTestsCase(case.id(), self, case)) + elif isinstance(case, unittest.TestSuite): + collected.append( + LoadTestsSuiteCollector('suite_child_of_mine', self, case)) + return collected + + def reportinfo(self): + return str(self.suite) + + +class LoadTestsCase(pytest.Function): + + def __init__(self, name, parent, item): + super(LoadTestsCase, self).__init__(name, parent, callobj=self._item_run) + self.item = item + + def _item_run(self): + result = unittest.TestResult() + self.item(result) + if result.failures: + test_method, trace = result.failures[0] + pytest.fail(trace, False) + elif result.errors: + test_method, trace = result.errors[0] + pytest.fail(trace, False) + elif result.skipped: + test_method, reason = result.skipped[0] + pytest.skip(reason) + + +def pytest_pycollect_makeitem(collector, name, obj): + if name == 'load_tests' and isinstance(obj, types.FunctionType): + suite = unittest.TestSuite() + loader = unittest.TestLoader() + pattern = '*' + try: + # Check that the 'load_tests' object is actually a callable that actually + # accepts the arguments expected for the load_tests protocol. + suite = obj(loader, suite, pattern) + except Exception as e: + return None + else: + return LoadTestsSuiteCollector(name, collector, suite) diff --git a/tools/run_tests/run_python.sh b/tools/run_tests/run_python.sh index 977b02fd949..e2135be04c5 100755 --- a/tools/run_tests/run_python.sh +++ b/tools/run_tests/run_python.sh @@ -40,14 +40,4 @@ export DYLD_LIBRARY_PATH=$ROOT/libs/$CONFIG export PATH=$ROOT/bins/$CONFIG:$ROOT/bins/$CONFIG/protobuf:$PATH source "python"$PYVER"_virtual_environment"/bin/activate -# TODO(atash): These tests don't currently run under py.test and thus don't -# appear under the coverage report. Find a way to get these tests to work with -# py.test (or find another tool or *something*) that's acceptable to the rest of -# the team... -"python"$PYVER -m grpc_test._core_over_links_base_interface_test -"python"$PYVER -m grpc_test._crust_over_core_over_links_face_interface_test -"python"$PYVER -m grpc_test.beta._face_interface_test -"python"$PYVER -m grpc_test.framework._crust_over_core_face_interface_test -"python"$PYVER -m grpc_test.framework.core._base_interface_test - "python"$PYVER $GRPCIO_TEST/setup.py test -a "-n8 --cov=grpc --junitxml=./report.xml --timeout=300" From 3b147818e3aef9d77cce55e96447b568558f2e62 Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Wed, 30 Sep 2015 15:59:52 -0700 Subject: [PATCH 075/169] Added subchannel ability to unsubscribe to connectivity state changes. --- src/core/client_config/subchannel.c | 11 +++++++++++ src/core/client_config/subchannel.h | 15 +++++++++++---- src/core/transport/connectivity_state.c | 21 +++++++++++++++++++++ src/core/transport/connectivity_state.h | 7 +++++++ 4 files changed, 50 insertions(+), 4 deletions(-) diff --git a/src/core/client_config/subchannel.c b/src/core/client_config/subchannel.c index 740389003a5..86654544605 100644 --- a/src/core/client_config/subchannel.c +++ b/src/core/client_config/subchannel.c @@ -413,6 +413,17 @@ void grpc_subchannel_notify_on_state_change(grpc_exec_ctx *exec_ctx, } } +int grpc_subchannel_state_change_unsubscribe(grpc_exec_ctx *exec_ctx, + grpc_subchannel *c, + grpc_closure *subscribed_notify) { + int success; + gpr_mu_lock(&c->mu); + success = grpc_connectivity_state_change_unsubscribe( + exec_ctx, &c->state_tracker, subscribed_notify); + gpr_mu_unlock(&c->mu); + return success; +} + void grpc_subchannel_process_transport_op(grpc_exec_ctx *exec_ctx, grpc_subchannel *c, grpc_transport_op *op) { diff --git a/src/core/client_config/subchannel.h b/src/core/client_config/subchannel.h index 2af3ce9e56a..03e7cd0590d 100644 --- a/src/core/client_config/subchannel.h +++ b/src/core/client_config/subchannel.h @@ -64,13 +64,13 @@ typedef struct grpc_subchannel_args grpc_subchannel_args; #define GRPC_SUBCHANNEL_REF_EXTRA_ARGS #endif -void grpc_subchannel_ref(grpc_subchannel *channel - GRPC_SUBCHANNEL_REF_EXTRA_ARGS); +void grpc_subchannel_ref( + grpc_subchannel *channel GRPC_SUBCHANNEL_REF_EXTRA_ARGS); void grpc_subchannel_unref(grpc_exec_ctx *exec_ctx, grpc_subchannel *channel GRPC_SUBCHANNEL_REF_EXTRA_ARGS); -void grpc_subchannel_call_ref(grpc_subchannel_call *call - GRPC_SUBCHANNEL_REF_EXTRA_ARGS); +void grpc_subchannel_call_ref( + grpc_subchannel_call *call GRPC_SUBCHANNEL_REF_EXTRA_ARGS); void grpc_subchannel_call_unref(grpc_exec_ctx *exec_ctx, grpc_subchannel_call *call GRPC_SUBCHANNEL_REF_EXTRA_ARGS); @@ -98,6 +98,13 @@ void grpc_subchannel_notify_on_state_change(grpc_exec_ctx *exec_ctx, grpc_connectivity_state *state, grpc_closure *notify); +/** Remove \a subscribed_notify from the list of closures to be called on a + * state change if present, returning 1. Otherwise, nothing is done and return + * 0. */ +int grpc_subchannel_state_change_unsubscribe(grpc_exec_ctx *exec_ctx, + grpc_subchannel *channel, + grpc_closure *subscribed_notify); + /** express interest in \a channel's activities through \a pollset. */ void grpc_subchannel_add_interested_party(grpc_exec_ctx *exec_ctx, grpc_subchannel *channel, diff --git a/src/core/transport/connectivity_state.c b/src/core/transport/connectivity_state.c index a53fecc1985..09b298c131b 100644 --- a/src/core/transport/connectivity_state.c +++ b/src/core/transport/connectivity_state.c @@ -115,6 +115,27 @@ int grpc_connectivity_state_notify_on_state_change( return tracker->current_state == GRPC_CHANNEL_IDLE; } +int grpc_connectivity_state_change_unsubscribe( + grpc_exec_ctx *exec_ctx, grpc_connectivity_state_tracker *tracker, + grpc_closure *subscribed_notify) { + grpc_connectivity_state_watcher *w = tracker->watchers; + if (w != NULL && w->notify == subscribed_notify) { + tracker->watchers = w->next; + gpr_free(w); + return 1; + } + while (w != NULL) { + grpc_connectivity_state_watcher *rm_candidate = w->next; + if (rm_candidate != NULL && rm_candidate->notify == subscribed_notify) { + w->next = w->next->next; + gpr_free(rm_candidate); + return 1; + } + w = w->next; + } + return 0; +} + void grpc_connectivity_state_set(grpc_exec_ctx *exec_ctx, grpc_connectivity_state_tracker *tracker, grpc_connectivity_state state, diff --git a/src/core/transport/connectivity_state.h b/src/core/transport/connectivity_state.h index 8b6b0554cd4..119b1c1554d 100644 --- a/src/core/transport/connectivity_state.h +++ b/src/core/transport/connectivity_state.h @@ -78,4 +78,11 @@ int grpc_connectivity_state_notify_on_state_change( grpc_exec_ctx *exec_ctx, grpc_connectivity_state_tracker *tracker, grpc_connectivity_state *current, grpc_closure *notify); +/** Remove \a subscribed_notify from the list of closures to be called on a + * state change if present, returning 1. Otherwise, nothing is done and return + * 0. */ +int grpc_connectivity_state_change_unsubscribe( + grpc_exec_ctx *exec_ctx, grpc_connectivity_state_tracker *tracker, + grpc_closure *subscribed_notify); + #endif /* GRPC_INTERNAL_CORE_TRANSPORT_CONNECTIVITY_STATE_H */ From bf6cfc3d18bb144fdeda924a0584a569bc552fef Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Thu, 1 Oct 2015 02:23:03 +0200 Subject: [PATCH 076/169] Adding lcov to the jenkins docker files. --- tools/jenkins/grpc_jenkins_slave/Dockerfile | 3 ++- tools/jenkins/grpc_jenkins_slave_32bits/Dockerfile | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/tools/jenkins/grpc_jenkins_slave/Dockerfile b/tools/jenkins/grpc_jenkins_slave/Dockerfile index 7248f974092..4f5387eeb55 100644 --- a/tools/jenkins/grpc_jenkins_slave/Dockerfile +++ b/tools/jenkins/grpc_jenkins_slave/Dockerfile @@ -32,7 +32,7 @@ FROM debian:jessie -# Install Git. +# Install Git and basic packages. RUN apt-get update && apt-get install -y \ autoconf \ autotools-dev \ @@ -44,6 +44,7 @@ RUN apt-get update && apt-get install -y \ gcc-multilib \ git \ gyp \ + lcov \ libc6 \ libc6-dbg \ libc6-dev \ diff --git a/tools/jenkins/grpc_jenkins_slave_32bits/Dockerfile b/tools/jenkins/grpc_jenkins_slave_32bits/Dockerfile index c1ff85c3ca1..81a03990916 100644 --- a/tools/jenkins/grpc_jenkins_slave_32bits/Dockerfile +++ b/tools/jenkins/grpc_jenkins_slave_32bits/Dockerfile @@ -32,7 +32,7 @@ FROM 32bit/debian:jessie -# Install Git. +# Install Git and basic packages. RUN apt-get update && apt-get install -y \ autoconf \ autotools-dev \ @@ -44,6 +44,7 @@ RUN apt-get update && apt-get install -y \ gcc-multilib \ git \ gyp \ + lcov \ libc6 \ libc6-dbg \ libc6-dev \ From 988e37f1fc8542c205db569be0dd20f758c39164 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Thu, 1 Oct 2015 07:53:56 -0700 Subject: [PATCH 077/169] Allow fd_posix to force a re-evaluation of polling on wakeup --- src/core/iomgr/fd_posix.c | 20 ++++++++++---------- src/core/iomgr/fd_posix.h | 2 ++ src/core/iomgr/pollset_posix.c | 30 +++++++++++++++++++++++++++++- src/core/iomgr/pollset_posix.h | 5 +++++ 4 files changed, 46 insertions(+), 11 deletions(-) diff --git a/src/core/iomgr/fd_posix.c b/src/core/iomgr/fd_posix.c index b48b7f050aa..806af9bc26b 100644 --- a/src/core/iomgr/fd_posix.c +++ b/src/core/iomgr/fd_posix.c @@ -173,19 +173,19 @@ int grpc_fd_is_orphaned(grpc_fd *fd) { return (gpr_atm_acq_load(&fd->refst) & 1) == 0; } -static void pollset_kick_locked(grpc_pollset *pollset) { - gpr_mu_lock(GRPC_POLLSET_MU(pollset)); - grpc_pollset_kick(pollset, NULL); - gpr_mu_unlock(GRPC_POLLSET_MU(pollset)); +static void pollset_kick_locked(grpc_fd_watcher *watcher) { + gpr_mu_lock(GRPC_POLLSET_MU(watcher->pollset)); + grpc_pollset_kick_ex(watcher->pollset, watcher->worker, GRPC_POLLSET_REEVALUATE_POLLING_ON_WAKEUP); + gpr_mu_unlock(GRPC_POLLSET_MU(watcher->pollset)); } static void maybe_wake_one_watcher_locked(grpc_fd *fd) { if (fd->inactive_watcher_root.next != &fd->inactive_watcher_root) { - pollset_kick_locked(fd->inactive_watcher_root.next->pollset); + pollset_kick_locked(fd->inactive_watcher_root.next); } else if (fd->read_watcher) { - pollset_kick_locked(fd->read_watcher->pollset); + pollset_kick_locked(fd->read_watcher); } else if (fd->write_watcher) { - pollset_kick_locked(fd->write_watcher->pollset); + pollset_kick_locked(fd->write_watcher); } } @@ -199,13 +199,13 @@ static void wake_all_watchers_locked(grpc_fd *fd) { grpc_fd_watcher *watcher; for (watcher = fd->inactive_watcher_root.next; watcher != &fd->inactive_watcher_root; watcher = watcher->next) { - pollset_kick_locked(watcher->pollset); + pollset_kick_locked(watcher); } if (fd->read_watcher) { - pollset_kick_locked(fd->read_watcher->pollset); + pollset_kick_locked(fd->read_watcher); } if (fd->write_watcher && fd->write_watcher != fd->read_watcher) { - pollset_kick_locked(fd->write_watcher->pollset); + pollset_kick_locked(fd->write_watcher); } } diff --git a/src/core/iomgr/fd_posix.h b/src/core/iomgr/fd_posix.h index 089aa4d7175..a60aff2a096 100644 --- a/src/core/iomgr/fd_posix.h +++ b/src/core/iomgr/fd_posix.h @@ -46,6 +46,7 @@ typedef struct grpc_fd_watcher { struct grpc_fd_watcher *next; struct grpc_fd_watcher *prev; grpc_pollset *pollset; + grpc_pollset_worker *worker; grpc_fd *fd; } grpc_fd_watcher; @@ -126,6 +127,7 @@ void grpc_fd_orphan(grpc_exec_ctx *exec_ctx, grpc_fd *fd, grpc_closure *on_done, fd's current interest (such as epoll) do not need to call this function. MUST NOT be called with a pollset lock taken */ gpr_uint32 grpc_fd_begin_poll(grpc_fd *fd, grpc_pollset *pollset, + grpc_pollset_worker *worker, gpr_uint32 read_mask, gpr_uint32 write_mask, grpc_fd_watcher *rec); /* Complete polling previously started with grpc_fd_begin_poll diff --git a/src/core/iomgr/pollset_posix.c b/src/core/iomgr/pollset_posix.c index 82a82cc0644..c88fff6b43a 100644 --- a/src/core/iomgr/pollset_posix.c +++ b/src/core/iomgr/pollset_posix.c @@ -98,31 +98,59 @@ static void push_front_worker(grpc_pollset *p, grpc_pollset_worker *worker) { worker->prev->next = worker->next->prev = worker; } -void grpc_pollset_kick(grpc_pollset *p, grpc_pollset_worker *specific_worker) { +void grpc_pollset_kick_ex(grpc_pollset *p, grpc_pollset_worker *specific_worker, gpr_uint32 flags) { /* pollset->mu already held */ if (specific_worker != NULL) { if (specific_worker == GRPC_POLLSET_KICK_BROADCAST) { + GPR_ASSERT((flags & GRPC_POLLSET_REEVALUATE_POLLING_ON_WAKEUP) == 0); for (specific_worker = p->root_worker.next; specific_worker != &p->root_worker; specific_worker = specific_worker->next) { grpc_wakeup_fd_wakeup(&specific_worker->wakeup_fd); } p->kicked_without_pollers = 1; + return; } else if (gpr_tls_get(&g_current_thread_worker) != (gpr_intptr)specific_worker) { + if ((flags & GRPC_POLLSET_REEVALUATE_POLLING_ON_WAKEUP) != 0) { + specific_worker->reevaluate_polling_on_wakeup = 1; + } + grpc_wakeup_fd_wakeup(&specific_worker->wakeup_fd); + return; + } else if ((flags & GRPC_POLLSET_CAN_KICK_SELF) != 0) { + if ((flags & GRPC_POLLSET_REEVALUATE_POLLING_ON_WAKEUP) != 0) { + specific_worker->reevaluate_polling_on_wakeup = 1; + } grpc_wakeup_fd_wakeup(&specific_worker->wakeup_fd); + return; } } else if (gpr_tls_get(&g_current_thread_poller) != (gpr_intptr)p) { + GPR_ASSERT((flags & GRPC_POLLSET_REEVALUATE_POLLING_ON_WAKEUP) == 0); specific_worker = pop_front_worker(p); if (specific_worker != NULL) { + if (gpr_tls_get(&g_current_thread_worker) == (gpr_intptr)specific_worker) { + push_back_worker(p, specific_worker); + specific_worker = pop_front_worker(p); + if ((flags & GRPC_POLLSET_CAN_KICK_SELF) == 0 && + gpr_tls_get(&g_current_thread_worker) == (gpr_intptr)specific_worker) { + push_back_worker(p, specific_worker); + return; + } + } push_back_worker(p, specific_worker); grpc_wakeup_fd_wakeup(&specific_worker->wakeup_fd); + return; } else { p->kicked_without_pollers = 1; + return; } } } +void grpc_pollset_kick(grpc_pollset *p, grpc_pollset_worker *specific_worker) { + grpc_pollset_kick_ex(p, specific_worker, 0); +} + /* global state management */ void grpc_pollset_global_init(void) { diff --git a/src/core/iomgr/pollset_posix.h b/src/core/iomgr/pollset_posix.h index 83c52585390..762582c79df 100644 --- a/src/core/iomgr/pollset_posix.h +++ b/src/core/iomgr/pollset_posix.h @@ -50,6 +50,7 @@ struct grpc_fd; typedef struct grpc_pollset_worker { grpc_wakeup_fd wakeup_fd; + int reevaluate_polling_on_wakeup; struct grpc_pollset_worker *next; struct grpc_pollset_worker *prev; } grpc_pollset_worker; @@ -111,6 +112,10 @@ void grpc_kick_drain(grpc_pollset *p); int grpc_poll_deadline_to_millis_timeout(gpr_timespec deadline, gpr_timespec now); +#define GRPC_POLLSET_CAN_KICK_SELF 1 +#define GRPC_POLLSET_REEVALUATE_POLLING_ON_WAKEUP 2 +void grpc_pollset_kick_ex(grpc_pollset *p, grpc_pollset_worker *specific_worker, gpr_uint32 flags); + /* turn a pollset into a multipoller: platform specific */ typedef void (*grpc_platform_become_multipoller_type)(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, From dc17471545f0621ca03c8e73584139bcfde34479 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Thu, 1 Oct 2015 10:25:02 -0700 Subject: [PATCH 078/169] Completing wakeup story --- src/core/iomgr/fd_posix.c | 10 ++-- .../iomgr/pollset_multipoller_with_epoll.c | 2 +- .../pollset_multipoller_with_poll_posix.c | 4 +- src/core/iomgr/pollset_posix.c | 56 ++++++++++++------- 4 files changed, 44 insertions(+), 28 deletions(-) diff --git a/src/core/iomgr/fd_posix.c b/src/core/iomgr/fd_posix.c index 806af9bc26b..222e745c648 100644 --- a/src/core/iomgr/fd_posix.c +++ b/src/core/iomgr/fd_posix.c @@ -339,8 +339,8 @@ void grpc_fd_notify_on_write(grpc_exec_ctx *exec_ctx, grpc_fd *fd, } gpr_uint32 grpc_fd_begin_poll(grpc_fd *fd, grpc_pollset *pollset, - gpr_uint32 read_mask, gpr_uint32 write_mask, - grpc_fd_watcher *watcher) { + grpc_pollset_worker *worker, gpr_uint32 read_mask, + gpr_uint32 write_mask, grpc_fd_watcher *watcher) { gpr_uint32 mask = 0; /* keep track of pollers that have requested our events, in case they change */ @@ -351,6 +351,7 @@ gpr_uint32 grpc_fd_begin_poll(grpc_fd *fd, grpc_pollset *pollset, if (gpr_atm_no_barrier_load(&fd->shutdown)) { watcher->fd = NULL; watcher->pollset = NULL; + watcher->worker = NULL; gpr_mu_unlock(&fd->watcher_mu); GRPC_FD_UNREF(fd, "poll"); return 0; @@ -369,12 +370,13 @@ gpr_uint32 grpc_fd_begin_poll(grpc_fd *fd, grpc_pollset *pollset, mask |= write_mask; } /* if not polling, remember this watcher in case we need someone to later */ - if (mask == 0) { + if (mask == 0 && worker != NULL) { watcher->next = &fd->inactive_watcher_root; watcher->prev = watcher->next->prev; watcher->next->prev = watcher->prev->next = watcher; } watcher->pollset = pollset; + watcher->worker = worker; watcher->fd = fd; gpr_mu_unlock(&fd->watcher_mu); @@ -404,7 +406,7 @@ void grpc_fd_end_poll(grpc_exec_ctx *exec_ctx, grpc_fd_watcher *watcher, kick = kick || !got_write; fd->write_watcher = NULL; } - if (!was_polling) { + if (!was_polling && watcher->worker != NULL) { /* remove from inactive list */ watcher->next->prev = watcher->prev; watcher->prev->next = watcher->next; diff --git a/src/core/iomgr/pollset_multipoller_with_epoll.c b/src/core/iomgr/pollset_multipoller_with_epoll.c index d26e60f6650..1030c3fd1bb 100644 --- a/src/core/iomgr/pollset_multipoller_with_epoll.c +++ b/src/core/iomgr/pollset_multipoller_with_epoll.c @@ -72,7 +72,7 @@ static void finally_add_fd(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, /* We pretend to be polling whilst adding an fd to keep the fd from being closed during the add. This may result in a spurious wakeup being assigned to this pollset whilst adding, but that should be benign. */ - GPR_ASSERT(grpc_fd_begin_poll(fd, pollset, 0, 0, &watcher) == 0); + GPR_ASSERT(grpc_fd_begin_poll(fd, pollset, NULL, 0, 0, &watcher) == 0); if (watcher.fd != NULL) { ev.events = (uint32_t)(EPOLLIN | EPOLLOUT | EPOLLET); ev.data.ptr = fd; diff --git a/src/core/iomgr/pollset_multipoller_with_poll_posix.c b/src/core/iomgr/pollset_multipoller_with_poll_posix.c index 1356ebe7a06..79ff26dc040 100644 --- a/src/core/iomgr/pollset_multipoller_with_poll_posix.c +++ b/src/core/iomgr/pollset_multipoller_with_poll_posix.c @@ -147,8 +147,8 @@ static void multipoll_with_poll_pollset_maybe_work_and_unlock( gpr_mu_unlock(&pollset->mu); for (i = 2; i < pfd_count; i++) { - pfds[i].events = (short)grpc_fd_begin_poll(watchers[i].fd, pollset, POLLIN, - POLLOUT, &watchers[i]); + pfds[i].events = (short)grpc_fd_begin_poll(watchers[i].fd, pollset, worker, + POLLIN, POLLOUT, &watchers[i]); } /* TODO(vpai): Consider first doing a 0 timeout poll here to avoid diff --git a/src/core/iomgr/pollset_posix.c b/src/core/iomgr/pollset_posix.c index c88fff6b43a..b26f03d0c7b 100644 --- a/src/core/iomgr/pollset_posix.c +++ b/src/core/iomgr/pollset_posix.c @@ -225,8 +225,10 @@ void grpc_pollset_work(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, /* pollset->mu already held */ int added_worker = 0; int locked = 1; + int queued_work = 0; /* this must happen before we (potentially) drop pollset->mu */ worker->next = worker->prev = NULL; + worker->reevaluate_polling_on_wakeup = 0; /* TODO(ctiller): pool these */ grpc_wakeup_fd_init(&worker->wakeup_fd); if (!grpc_pollset_has_workers(pollset) && @@ -248,29 +250,41 @@ void grpc_pollset_work(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, locked = 0; goto done; } - if (!pollset->kicked_without_pollers) { - push_front_worker(pollset, worker); - added_worker = 1; - gpr_tls_set(&g_current_thread_poller, (gpr_intptr)pollset); - gpr_tls_set(&g_current_thread_worker, (gpr_intptr)worker); - pollset->vtable->maybe_work_and_unlock(exec_ctx, pollset, worker, deadline, - now); - locked = 0; - gpr_tls_set(&g_current_thread_poller, 0); - gpr_tls_set(&g_current_thread_worker, 0); - } else { - pollset->kicked_without_pollers = 0; - } -done: - if (!locked) { - grpc_exec_ctx_flush(exec_ctx); - gpr_mu_lock(&pollset->mu); - locked = 1; + for (;;) { + if (!pollset->kicked_without_pollers) { + if (!added_worker) { + push_front_worker(pollset, worker); + added_worker = 1; + } + gpr_tls_set(&g_current_thread_poller, (gpr_intptr)pollset); + gpr_tls_set(&g_current_thread_worker, (gpr_intptr)worker); + pollset->vtable->maybe_work_and_unlock(exec_ctx, pollset, worker, + deadline, now); + locked = 0; + gpr_tls_set(&g_current_thread_poller, 0); + gpr_tls_set(&g_current_thread_worker, 0); + } else { + pollset->kicked_without_pollers = 0; + } + done: + if (!locked) { + queued_work |= grpc_exec_ctx_flush(exec_ctx); + gpr_mu_lock(&pollset->mu); + locked = 1; + } + if (worker->reevaluate_polling_on_wakeup) { + worker->reevaluate_polling_on_wakeup = 0; + if (queued_work) { + deadline = gpr_inf_past(GPR_CLOCK_MONOTONIC); + } + continue; + } + break; } - grpc_wakeup_fd_destroy(&worker->wakeup_fd); if (added_worker) { remove_worker(pollset, worker); } + grpc_wakeup_fd_destroy(&worker->wakeup_fd); if (pollset->shutting_down) { if (grpc_pollset_has_workers(pollset)) { grpc_pollset_kick(pollset, NULL); @@ -507,8 +521,8 @@ static void basic_pollset_maybe_work_and_unlock(grpc_exec_ctx *exec_ctx, pfd[2].fd = fd->fd; pfd[2].revents = 0; gpr_mu_unlock(&pollset->mu); - pfd[2].events = - (short)grpc_fd_begin_poll(fd, pollset, POLLIN, POLLOUT, &fd_watcher); + pfd[2].events = (short)grpc_fd_begin_poll(fd, pollset, worker, POLLIN, + POLLOUT, &fd_watcher); if (pfd[2].events != 0) { nfds++; } From 9908877a731baacb4b26ce92011e43f5f9366b14 Mon Sep 17 00:00:00 2001 From: Tim Emiola Date: Thu, 1 Oct 2015 10:54:25 -0700 Subject: [PATCH 079/169] Update README.mds that don't currently have Status 'Beta' --- README.md | 38 +++++++++++++++++++------------------- src/core/README.md | 3 +-- src/cpp/README.md | 3 +-- 3 files changed, 21 insertions(+), 23 deletions(-) diff --git a/README.md b/README.md index c01529a73de..2ef6c3d7f6e 100644 --- a/README.md +++ b/README.md @@ -26,31 +26,31 @@ of shared C core library [src/core] (src/core). * PHP source code: [src/php] (src/php) * C# source code: [src/csharp] (src/csharp) * Objective-C source code: [src/objective-c] (src/objective-c) - -Java source code is in [grpc-java] (http://github.com/grpc/grpc-java) repository. + +Java source code is in [grpc-java] (http://github.com/grpc/grpc-java) repository. Go source code is in [grpc-go] (http://github.com/grpc/grpc-go) repository. #Current Status of libraries Libraries in different languages are in different state of development. We are seeking contributions for all of these libraries. - * shared C core library [src/core] (src/core) : Early adopter ready - Alpha. - * C++ Library: [src/cpp] (src/cpp) : Early adopter ready - Alpha. - * Ruby Library: [src/ruby] (src/ruby) : Early adopter ready - Alpha. - * NodeJS Library: [src/node] (src/node) : Early adopter ready - Alpha. - * Python Library: [src/python] (src/python) : Early adopter ready - Alpha. - * C# Library: [src/csharp] (src/csharp) : Beta. - * Objective-C Library: [src/objective-c] (src/objective-c): Early adopter ready - Alpha. - * PHP Library: [src/php] (src/php) : Pre-Alpha. + * shared C core library [src/core] (src/core) : Beta - the surface API is stable + * C++ Library: [src/cpp] (src/cpp) : Beta - the surface API is stable + * Ruby Library: [src/ruby] (src/ruby) : Beta - the surface API is stable + * NodeJS Library: [src/node] (src/node) : Beta - the surface API is stable + * Python Library: [src/python] (src/python) : Beta - the surface API is stable + * C# Library: [src/csharp] (src/csharp) : Beta - the surface API is stable + * Objective-C Library: [src/objective-c] (src/objective-c): Beta - the surface API is stable + * PHP Library: [src/php] (src/php) : Beta - the surface API is stable #Overview -Remote Procedure Calls (RPCs) provide a useful abstraction for building +Remote Procedure Calls (RPCs) provide a useful abstraction for building distributed applications and services. The libraries in this repository provide a concrete implementation of the gRPC protocol, layered over HTTP/2. These libraries enable communication between clients and servers using any -combination of the supported languages. +combination of the supported languages. ##Interface @@ -62,12 +62,12 @@ which they use on the client-side and implement on the server side. By default, gRPC uses [Protocol Buffers](https://github.com/google/protobuf) as the Interface Definition Language (IDL) for describing both the service interface -and the structure of the payload messages. It is possible to use other +and the structure of the payload messages. It is possible to use other alternatives if desired. ###Surface API Starting from an interface definition in a .proto file, gRPC provides -Protocol Compiler plugins that generate Client- and Server-side APIs. +Protocol Compiler plugins that generate Client- and Server-side APIs. gRPC users typically call into these APIs on the Client side and implement the corresponding API on the server side. @@ -76,9 +76,9 @@ Synchronous RPC calls, that block until a response arrives from the server, are the closest approximation to the abstraction of a procedure call that RPC aspires to. -On the other hand, networks are inherently asynchronous and in many scenarios, +On the other hand, networks are inherently asynchronous and in many scenarios, it is desirable to have the ability to start RPCs without blocking the current -thread. +thread. The gRPC programming surface in most languages comes in both synchronous and asynchronous flavors. @@ -87,8 +87,8 @@ asynchronous flavors. ## Streaming gRPC supports streaming semantics, where either the client or the server (or both) -send a stream of messages on a single RPC call. The most general case is -Bidirectional Streaming where a single gRPC call establishes a stream where both +send a stream of messages on a single RPC call. The most general case is +Bidirectional Streaming where a single gRPC call establishes a stream where both the client and the server can send a stream of messages to each other. The streamed messages are delivered in the order they were sent. @@ -103,7 +103,7 @@ fleshing out the details of each of the required operations. A gRPC RPC comprises of a bidirectional stream of messages, initiated by the client. In the client-to-server direction, this stream begins with a mandatory `Call Header`, followed by optional `Initial-Metadata`, followed by zero or more `Payload Messages`. The server-to-client direction contains an optional `Initial-Metadata`, followed by zero or more `Payload Messages` terminated with a mandatory `Status` and optional `Status-Metadata` (a.k.a.,`Trailing-Metadata`). ## Implementation over HTTP/2 -The abstract protocol defined above is implemented over [HTTP/2](https://http2.github.io/). gRPC bidirectional streams are mapped to HTTP/2 streams. The contents of `Call Header` and `Initial Metadata` are sent as HTTP/2 headers and subject to HPACK compression. `Payload Messages` are serialized into a byte stream of length prefixed gRPC frames which are then fragmented into HTTP/2 frames at the sender and reassembled at the receiver. `Status` and `Trailing-Metadata` are sent as HTTP/2 trailing headers (a.k.a., trailers). +The abstract protocol defined above is implemented over [HTTP/2](https://http2.github.io/). gRPC bidirectional streams are mapped to HTTP/2 streams. The contents of `Call Header` and `Initial Metadata` are sent as HTTP/2 headers and subject to HPACK compression. `Payload Messages` are serialized into a byte stream of length prefixed gRPC frames which are then fragmented into HTTP/2 frames at the sender and reassembled at the receiver. `Status` and `Trailing-Metadata` are sent as HTTP/2 trailing headers (a.k.a., trailers). ## Flow Control gRPC inherits the flow control mechanisms in HTTP/2 and uses them to enable fine-grained control of the amount of memory used for buffering in-flight messages. diff --git a/src/core/README.md b/src/core/README.md index 407dc4f7019..0d8c0d5bd90 100644 --- a/src/core/README.md +++ b/src/core/README.md @@ -5,5 +5,4 @@ Python, PHP, NodeJS, Objective-C) are layered on top of this library. #Status -Alpha : Ready for early adopters - +Beta diff --git a/src/cpp/README.md b/src/cpp/README.md index a2eb9a08c81..baeba083155 100644 --- a/src/cpp/README.md +++ b/src/cpp/README.md @@ -5,5 +5,4 @@ This directory contains source code for C++ implementation of gRPC. #Status -Alpha : Ready for early adopters - +Beta From 0d55750cb2b8122df3bfb4030c008fe084455000 Mon Sep 17 00:00:00 2001 From: yang-g Date: Thu, 1 Oct 2015 11:30:12 -0700 Subject: [PATCH 080/169] Maybe it is already ready when we call getstatus --- test/cpp/end2end/end2end_test.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/cpp/end2end/end2end_test.cc b/test/cpp/end2end/end2end_test.cc index 49a38ce544b..0322b2dabef 100644 --- a/test/cpp/end2end/end2end_test.cc +++ b/test/cpp/end2end/end2end_test.cc @@ -734,7 +734,8 @@ TEST_P(End2endTest, ChannelState) { EXPECT_EQ(GRPC_CHANNEL_IDLE, channel_->GetState(true)); EXPECT_TRUE(channel_->WaitForStateChange(GRPC_CHANNEL_IDLE, gpr_inf_future(GPR_CLOCK_REALTIME))); - EXPECT_EQ(GRPC_CHANNEL_CONNECTING, channel_->GetState(false)); + auto state = channel_->GetState(false); + EXPECT_TRUE(state == GRPC_CHANNEL_CONNECTING || state == GRPC_CHANNEL_READY); } // Takes 10s. From 035cf093de8e18095f9aeca3a7fe4faaa05c4639 Mon Sep 17 00:00:00 2001 From: yang-g Date: Fri, 18 Sep 2015 12:11:05 -0700 Subject: [PATCH 081/169] enable_ssl to use_tls --- test/cpp/interop/client.cc | 4 ++-- test/cpp/interop/client_helper.cc | 14 +++++++------- test/cpp/interop/server.cc | 2 +- test/cpp/interop/server_helper.cc | 4 ++-- tools/dockerfile/grpc_cxx/Dockerfile | 2 +- tools/gce_setup/grpc_docker.sh | 10 +++++----- 6 files changed, 18 insertions(+), 18 deletions(-) diff --git a/test/cpp/interop/client.cc b/test/cpp/interop/client.cc index 58c71cca35e..e785ac90099 100644 --- a/test/cpp/interop/client.cc +++ b/test/cpp/interop/client.cc @@ -45,7 +45,7 @@ #include "test/cpp/interop/interop_client.h" #include "test/cpp/util/test_config.h" -DEFINE_bool(enable_ssl, false, "Whether to use ssl/tls."); +DEFINE_bool(use_tls, false, "Whether to use tls."); DEFINE_bool(use_prod_roots, false, "True to use SSL roots for google"); DEFINE_int32(server_port, 0, "Server port."); DEFINE_string(server_host, "127.0.0.1", "Server host to connect to"); @@ -143,7 +143,7 @@ int main(int argc, char** argv) { client.DoEmptyStream(); client.DoStatusWithMessage(); // service_account_creds and jwt_token_creds can only run with ssl. - if (FLAGS_enable_ssl) { + if (FLAGS_use_tls) { grpc::string json_key = GetServiceAccountJsonKey(); client.DoJwtTokenCreds(json_key); client.DoOauth2AuthToken( diff --git a/test/cpp/interop/client_helper.cc b/test/cpp/interop/client_helper.cc index f85aa6ad8eb..cbad21e318e 100644 --- a/test/cpp/interop/client_helper.cc +++ b/test/cpp/interop/client_helper.cc @@ -51,7 +51,7 @@ #include "test/core/security/oauth2_utils.h" #include "test/cpp/util/create_test_channel.h" -DECLARE_bool(enable_ssl); +DECLARE_bool(use_tls); DECLARE_bool(use_prod_roots); DECLARE_int32(server_port); DECLARE_string(server_host); @@ -99,27 +99,27 @@ std::shared_ptr CreateChannelForTestCase( if (test_case == "compute_engine_creds") { std::shared_ptr creds; - GPR_ASSERT(FLAGS_enable_ssl); + GPR_ASSERT(FLAGS_use_tls); creds = GoogleComputeEngineCredentials(); return CreateTestChannel(host_port, FLAGS_server_host_override, - FLAGS_enable_ssl, FLAGS_use_prod_roots, creds); + FLAGS_use_tls, FLAGS_use_prod_roots, creds); } else if (test_case == "jwt_token_creds") { std::shared_ptr creds; - GPR_ASSERT(FLAGS_enable_ssl); + GPR_ASSERT(FLAGS_use_tls); grpc::string json_key = GetServiceAccountJsonKey(); std::chrono::seconds token_lifetime = std::chrono::hours(1); creds = ServiceAccountJWTAccessCredentials(json_key, token_lifetime.count()); return CreateTestChannel(host_port, FLAGS_server_host_override, - FLAGS_enable_ssl, FLAGS_use_prod_roots, creds); + FLAGS_use_tls, FLAGS_use_prod_roots, creds); } else if (test_case == "oauth2_auth_token") { grpc::string raw_token = GetOauth2AccessToken(); std::shared_ptr creds = AccessTokenCredentials(raw_token); return CreateTestChannel(host_port, FLAGS_server_host_override, - FLAGS_enable_ssl, FLAGS_use_prod_roots, creds); + FLAGS_use_tls, FLAGS_use_prod_roots, creds); } else { return CreateTestChannel(host_port, FLAGS_server_host_override, - FLAGS_enable_ssl, FLAGS_use_prod_roots); + FLAGS_use_tls, FLAGS_use_prod_roots); } } diff --git a/test/cpp/interop/server.cc b/test/cpp/interop/server.cc index 03b65324473..c0e1ec943d7 100644 --- a/test/cpp/interop/server.cc +++ b/test/cpp/interop/server.cc @@ -54,7 +54,7 @@ #include "test/proto/empty.grpc.pb.h" #include "test/proto/messages.grpc.pb.h" -DEFINE_bool(enable_ssl, false, "Whether to use ssl/tls."); +DEFINE_bool(use_tls, false, "Whether to use tls."); DEFINE_int32(port, 0, "Server port."); using grpc::Server; diff --git a/test/cpp/interop/server_helper.cc b/test/cpp/interop/server_helper.cc index 015198354e9..45707508466 100644 --- a/test/cpp/interop/server_helper.cc +++ b/test/cpp/interop/server_helper.cc @@ -41,13 +41,13 @@ #include "src/core/surface/call.h" #include "test/core/end2end/data/ssl_test_data.h" -DECLARE_bool(enable_ssl); +DECLARE_bool(use_tls); namespace grpc { namespace testing { std::shared_ptr CreateInteropServerCredentials() { - if (FLAGS_enable_ssl) { + if (FLAGS_use_tls) { SslServerCredentialsOptions::PemKeyCertPair pkcp = {test_server1_key, test_server1_cert}; SslServerCredentialsOptions ssl_opts; diff --git a/tools/dockerfile/grpc_cxx/Dockerfile b/tools/dockerfile/grpc_cxx/Dockerfile index ac09e25e404..82887df95c7 100644 --- a/tools/dockerfile/grpc_cxx/Dockerfile +++ b/tools/dockerfile/grpc_cxx/Dockerfile @@ -54,4 +54,4 @@ ADD service_account service_account ADD cacerts cacerts ENV GRPC_DEFAULT_SSL_ROOTS_FILE_PATH /cacerts/roots.pem -CMD ["/var/local/git/grpc/bins/opt/interop_server", "--enable_ssl", "--port=8010"] +CMD ["/var/local/git/grpc/bins/opt/interop_server", "--use_tls", "--port=8010"] diff --git a/tools/gce_setup/grpc_docker.sh b/tools/gce_setup/grpc_docker.sh index 84263ad6b99..fdb77363273 100755 --- a/tools/gce_setup/grpc_docker.sh +++ b/tools/gce_setup/grpc_docker.sh @@ -1477,7 +1477,7 @@ grpc_cloud_prod_auth_compute_engine_creds_gen_node_cmd() { # cmd=$($grpc_gen_test_cmd $flags) grpc_interop_gen_cxx_cmd() { local cmd_prefix="sudo docker run grpc/cxx"; - local test_script="/var/local/git/grpc/bins/opt/interop_client --enable_ssl"; + local test_script="/var/local/git/grpc/bins/opt/interop_client --use_tls"; local the_cmd="$cmd_prefix $test_script $@"; echo $the_cmd } @@ -1489,7 +1489,7 @@ grpc_interop_gen_cxx_cmd() { # cmd=$($grpc_gen_test_cmd $flags) grpc_cloud_prod_gen_cxx_cmd() { local cmd_prefix="sudo docker run grpc/cxx"; - local test_script="/var/local/git/grpc/bins/opt/interop_client --enable_ssl --use_prod_roots"; + local test_script="/var/local/git/grpc/bins/opt/interop_client --use_tls --use_prod_roots"; local gfe_flags=$(_grpc_prod_gfe_flags) local the_cmd="$cmd_prefix $test_script $gfe_flags $@"; echo $the_cmd @@ -1502,7 +1502,7 @@ grpc_cloud_prod_gen_cxx_cmd() { # cmd=$($grpc_gen_test_cmd $flags) grpc_cloud_prod_auth_service_account_creds_gen_cxx_cmd() { local cmd_prefix="sudo docker run grpc/cxx"; - local test_script="/var/local/git/grpc/bins/opt/interop_client --enable_ssl --use_prod_roots"; + local test_script="/var/local/git/grpc/bins/opt/interop_client --use_tls --use_prod_roots"; local gfe_flags=$(_grpc_prod_gfe_flags) local added_gfe_flags=$(_grpc_svc_acc_test_flags) local the_cmd="$cmd_prefix $test_script $gfe_flags $added_gfe_flags $@"; @@ -1516,7 +1516,7 @@ grpc_cloud_prod_auth_service_account_creds_gen_cxx_cmd() { # cmd=$($grpc_gen_test_cmd $flags) grpc_cloud_prod_auth_compute_engine_creds_gen_cxx_cmd() { local cmd_prefix="sudo docker run grpc/cxx"; - local test_script="/var/local/git/grpc/bins/opt/interop_client --enable_ssl --use_prod_roots"; + local test_script="/var/local/git/grpc/bins/opt/interop_client --use_tls --use_prod_roots"; local gfe_flags=$(_grpc_prod_gfe_flags) local added_gfe_flags=$(_grpc_gce_test_flags) local the_cmd="$cmd_prefix $test_script $gfe_flags $added_gfe_flags $@"; @@ -1530,7 +1530,7 @@ grpc_cloud_prod_auth_compute_engine_creds_gen_cxx_cmd() { # cmd=$($grpc_gen_test_cmd $flags) grpc_cloud_prod_auth_jwt_token_creds_gen_cxx_cmd() { local cmd_prefix="sudo docker run grpc/cxx"; - local test_script="/var/local/git/grpc/bins/opt/interop_client --enable_ssl --use_prod_roots"; + local test_script="/var/local/git/grpc/bins/opt/interop_client --use_tls --use_prod_roots"; local gfe_flags=$(_grpc_prod_gfe_flags) local added_gfe_flags=$(_grpc_jwt_token_test_flags) local the_cmd="$cmd_prefix $test_script $gfe_flags $added_gfe_flags $@"; From 18802c778601fd560b3b31c681fbe89ddc1c2409 Mon Sep 17 00:00:00 2001 From: yang-g Date: Mon, 21 Sep 2015 13:08:29 -0700 Subject: [PATCH 082/169] change objc --- src/objective-c/tests/run_tests.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/objective-c/tests/run_tests.sh b/src/objective-c/tests/run_tests.sh index 7b133c1782b..598f4e7fa1d 100755 --- a/src/objective-c/tests/run_tests.sh +++ b/src/objective-c/tests/run_tests.sh @@ -37,7 +37,7 @@ cd $(dirname $0) # Run the tests server. ../../../bins/$CONFIG/interop_server --port=5050 & -../../../bins/$CONFIG/interop_server --port=5051 --enable_ssl & +../../../bins/$CONFIG/interop_server --port=5051 --use_tls & # Kill them when this script exits. trap 'kill -9 `jobs -p`' EXIT From 54db83d06d9655dcc8ef1c1359538bc1e13031d6 Mon Sep 17 00:00:00 2001 From: yang-g Date: Thu, 1 Oct 2015 11:42:05 -0700 Subject: [PATCH 083/169] fix run_interop_tests.py --- tools/run_tests/run_interop_tests.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/tools/run_tests/run_interop_tests.py b/tools/run_tests/run_interop_tests.py index a2fb1243cc4..6445513fbed 100755 --- a/tools/run_tests/run_interop_tests.py +++ b/tools/run_tests/run_interop_tests.py @@ -53,8 +53,7 @@ _CLOUD_TO_CLOUD_BASE_ARGS = [ # supported by C core SslCredentials instead. _SSL_CERT_ENV = { 'SSL_CERT_FILE':'/usr/local/share/grpc/roots.pem' } -# TODO(jtatttermusch) unify usage of --enable_ssl, --use_tls and --use_tls=true - +# TODO(jtatttermusch) unify usage of --use_tls and --use_tls=true class CXXLanguage: @@ -64,11 +63,11 @@ class CXXLanguage: def cloud_to_prod_args(self): return (self.client_cmdline_base + _CLOUD_TO_PROD_BASE_ARGS + - ['--enable_ssl','--use_prod_roots']) + ['--use_tls=true','--use_prod_roots']) def cloud_to_cloud_args(self): return (self.client_cmdline_base + _CLOUD_TO_CLOUD_BASE_ARGS + - ['--enable_ssl']) + ['--use_tls=true']) def cloud_to_prod_env(self): return None @@ -327,4 +326,4 @@ else: jobset.message('FAILED', 'Some tests failed', do_newline=True) tree = ET.ElementTree(root) -tree.write('report.xml', encoding='UTF-8') \ No newline at end of file +tree.write('report.xml', encoding='UTF-8') From 2af89e49cb4ad5b5e30cd4c447acaca1d0c44843 Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Thu, 1 Oct 2015 11:54:00 -0700 Subject: [PATCH 084/169] Moved gRPC node package root to repo root, made it depend on grpc.gyp --- src/node/.istanbul.yml => .istanbul.yml | 0 binding.gyp | 66 ++++++++++++ grpc.gyp | 8 +- src/node/package.json => package.json | 38 ++++--- src/node/LICENSE | 28 ----- src/node/README.md | 36 ------- src/node/binding.gyp | 100 ------------------ src/node/index.js | 3 +- src/node/interop/empty.proto | 43 -------- src/node/interop/interop_client.js | 4 +- src/node/interop/interop_server.js | 4 +- src/node/interop/messages.proto | 132 ------------------------ src/node/interop/test.proto | 72 ------------- src/node/src/client.js | 4 +- src/node/src/server.js | 2 +- src/node/test/call_test.js | 2 +- src/node/test/channel_test.js | 2 +- src/node/test/constant_test.js | 2 +- src/node/test/end_to_end_test.js | 2 +- src/node/test/server_test.js | 2 +- src/node/test/surface_test.js | 2 +- templates/grpc.gyp.template | 8 +- 22 files changed, 117 insertions(+), 443 deletions(-) rename src/node/.istanbul.yml => .istanbul.yml (100%) create mode 100644 binding.gyp rename src/node/package.json => package.json (59%) delete mode 100644 src/node/LICENSE delete mode 100644 src/node/binding.gyp delete mode 100644 src/node/interop/empty.proto delete mode 100644 src/node/interop/messages.proto delete mode 100644 src/node/interop/test.proto diff --git a/src/node/.istanbul.yml b/.istanbul.yml similarity index 100% rename from src/node/.istanbul.yml rename to .istanbul.yml diff --git a/binding.gyp b/binding.gyp new file mode 100644 index 00000000000..1cab4bb80a7 --- /dev/null +++ b/binding.gyp @@ -0,0 +1,66 @@ +{ + "variables" : { + 'config': '/include LDFLAGS=-L/lib npm install [grpc] -``` - ## TESTING To run the test suite, simply run `npm test` in the install location. @@ -110,7 +78,3 @@ ServerCredentials ``` An object with factory methods for creating credential objects for servers. - -[homebrew]:http://brew.sh -[gRPC install script]:https://raw.githubusercontent.com/grpc/homebrew-grpc/master/scripts/install -[Debian jessie-backports]:http://backports.debian.org/Instructions/ diff --git a/src/node/binding.gyp b/src/node/binding.gyp deleted file mode 100644 index 247719e9813..00000000000 --- a/src/node/binding.gyp +++ /dev/null @@ -1,100 +0,0 @@ -{ - "variables" : { - 'config': '/dev/null 2>&1 && echo true || echo false)' - }, - 'conditions': [ - ['config=="gcov"', { - 'cflags': [ - '-ftest-coverage', - '-fprofile-arcs', - '-O0' - ], - 'ldflags': [ - '-ftest-coverage', - '-fprofile-arcs' - ] - } - ], - ['pkg_config_grpc == "true"', { - 'link_settings': { - 'libraries': [ - ' Date: Thu, 1 Oct 2015 11:54:21 -0700 Subject: [PATCH 085/169] Updated run_tests with new node package location --- tools/run_tests/build_node.sh | 5 ----- tools/run_tests/run_node.sh | 8 ++------ 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/tools/run_tests/build_node.sh b/tools/run_tests/build_node.sh index 95ffb94c6ea..faa7b624b8e 100755 --- a/tools/run_tests/build_node.sh +++ b/tools/run_tests/build_node.sh @@ -36,9 +36,4 @@ CONFIG=${CONFIG:-opt} # change to grpc repo root cd $(dirname $0)/../.. -export CXXFLAGS=-I`pwd`/include -export LDFLAGS=-L`pwd`/libs/$CONFIG - -cd src/node - npm install --unsafe-perm diff --git a/tools/run_tests/run_node.sh b/tools/run_tests/run_node.sh index 1043b447db3..eb68b20e834 100755 --- a/tools/run_tests/run_node.sh +++ b/tools/run_tests/run_node.sh @@ -37,19 +37,15 @@ cd $(dirname $0)/../.. root=`pwd` -cd $root/src/node - -export LD_LIBRARY_PATH=$root/libs/$CONFIG - if [ "$CONFIG" = "gcov" ] then ./node_modules/.bin/istanbul cover ./node_modules/.bin/_mocha -- \ - --timeout 8000 + --timeout 8000 src/node/test cd build gcov Release/obj.target/grpc/ext/*.o lcov --base-directory . --directory . -c -o coverage.info genhtml -o ../ext_coverage --num-spaces 2 -t 'Node gRPC test coverage' \ coverage.info else - ./node_modules/mocha/bin/mocha --timeout 8000 + ./node_modules/mocha/bin/mocha --timeout 8000 src/node/test fi From f3f85647e3f99bb60a7aefa159160fe7eaddfb28 Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Thu, 1 Oct 2015 11:54:39 -0700 Subject: [PATCH 086/169] Updated examples with new node package location --- examples/node/greeter_client.js | 2 +- examples/node/greeter_server.js | 2 +- examples/node/package.json | 10 ---------- examples/node/route_guide/route_guide_client.js | 4 ++-- examples/node/route_guide/route_guide_server.js | 4 ++-- 5 files changed, 6 insertions(+), 16 deletions(-) delete mode 100644 examples/node/package.json diff --git a/examples/node/greeter_client.js b/examples/node/greeter_client.js index ddc8abbbed2..175f8e6b5a8 100644 --- a/examples/node/greeter_client.js +++ b/examples/node/greeter_client.js @@ -33,7 +33,7 @@ var PROTO_PATH = __dirname + '/helloworld.proto'; -var grpc = require('grpc'); +var grpc = require('../../'); var hello_proto = grpc.load(PROTO_PATH).helloworld; function main() { diff --git a/examples/node/greeter_server.js b/examples/node/greeter_server.js index 44b44afaafb..3600c8bfbf4 100644 --- a/examples/node/greeter_server.js +++ b/examples/node/greeter_server.js @@ -33,7 +33,7 @@ var PROTO_PATH = __dirname + '/helloworld.proto'; -var grpc = require('grpc'); +var grpc = require('../../'); var hello_proto = grpc.load(PROTO_PATH).helloworld; /** diff --git a/examples/node/package.json b/examples/node/package.json deleted file mode 100644 index 6c4f95b1093..00000000000 --- a/examples/node/package.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "name": "grpc-demo", - "version": "0.5.0", - "dependencies": { - "async": "^0.9.0", - "grpc": "~0.11.0", - "minimist": "^1.1.0", - "underscore": "^1.8.2" - } -} diff --git a/examples/node/route_guide/route_guide_client.js b/examples/node/route_guide/route_guide_client.js index 1da6c690252..525d68f44ca 100644 --- a/examples/node/route_guide/route_guide_client.js +++ b/examples/node/route_guide/route_guide_client.js @@ -31,8 +31,8 @@ var async = require('async'); var fs = require('fs'); var parseArgs = require('minimist'); var path = require('path'); -var _ = require('underscore'); -var grpc = require('grpc'); +var _ = require('lodash'); +var grpc = require('../../../'); var routeguide = grpc.load(__dirname + '/route_guide.proto').routeguide; var client = new routeguide.RouteGuide('localhost:50051', grpc.Credentials.createInsecure()); diff --git a/examples/node/route_guide/route_guide_server.js b/examples/node/route_guide/route_guide_server.js index faae3087fd1..5bb81446f05 100644 --- a/examples/node/route_guide/route_guide_server.js +++ b/examples/node/route_guide/route_guide_server.js @@ -30,8 +30,8 @@ var fs = require('fs'); var parseArgs = require('minimist'); var path = require('path'); -var _ = require('underscore'); -var grpc = require('grpc'); +var _ = require('lodash'); +var grpc = require('../../../'); var routeguide = grpc.load(__dirname + '/route_guide.proto').routeguide; var COORD_FACTOR = 1e7; From 35155ae997e07ea3928a24be91bc6643efa2c31a Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Thu, 1 Oct 2015 12:02:30 -0700 Subject: [PATCH 087/169] Fixed missing item in Node library file list --- src/node/package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/src/node/package.json b/src/node/package.json index 22f94757ce6..67946adc6fb 100644 --- a/src/node/package.json +++ b/src/node/package.json @@ -52,6 +52,7 @@ "cli", "examples", "ext", + "health_check", "interop", "src", "test" From db5b1603b20e53946b72a2e0898eeffa360fadcf Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Thu, 1 Oct 2015 13:20:11 -0700 Subject: [PATCH 088/169] Removed most of the gyp file, and the tests for it There seems to be a bug in node-gyp (nodejs/node-gyp#752) that prevents it from working properly with other gyp files. --- grpc.gyp | 12292 --------------------------------- templates/grpc.gyp.template | 20 +- tools/run_tests/run_tests.py | 42 +- 3 files changed, 2 insertions(+), 12352 deletions(-) diff --git a/grpc.gyp b/grpc.gyp index 8ba299b9fb6..d17fa8f030c 100644 --- a/grpc.gyp +++ b/grpc.gyp @@ -135,17 +135,6 @@ ], }, # TODO: Add C++ targets - { - 'target_name': 'gpr_test_util', - 'product_prefix': 'lib', - 'type': 'static_library', - 'dependencies': [ - 'gpr', - ], - 'sources': [ - 'test/core/util/test_config.c', - ], - }, # TODO: Add C++ targets { 'target_name': 'grpc', @@ -306,219 +295,10 @@ ], }, # TODO: Add C++ targets - { - 'target_name': 'grpc_test_util', - 'product_prefix': 'lib', - 'type': 'static_library', - 'dependencies': [ - 'gpr', - 'gpr_test_util', - 'grpc', - ], - 'sources': [ - 'test/core/end2end/data/server1_cert.c', - 'test/core/end2end/data/server1_key.c', - 'test/core/end2end/data/test_root_cert.c', - 'test/core/end2end/cq_verifier.c', - 'test/core/end2end/fixtures/proxy.c', - 'test/core/iomgr/endpoint_tests.c', - 'test/core/security/oauth2_utils.c', - 'test/core/util/grpc_profiler.c', - 'test/core/util/parse_hexstring.c', - 'test/core/util/port_posix.c', - 'test/core/util/port_windows.c', - 'test/core/util/slice_splitter.c', - ], - }, # TODO: Add C++ targets - { - 'target_name': 'grpc_test_util_unsecure', - 'product_prefix': 'lib', - 'type': 'static_library', - 'dependencies': [ - 'gpr', - 'gpr_test_util', - 'grpc', - ], - 'sources': [ - 'test/core/end2end/cq_verifier.c', - 'test/core/end2end/fixtures/proxy.c', - 'test/core/iomgr/endpoint_tests.c', - 'test/core/security/oauth2_utils.c', - 'test/core/util/grpc_profiler.c', - 'test/core/util/parse_hexstring.c', - 'test/core/util/port_posix.c', - 'test/core/util/port_windows.c', - 'test/core/util/slice_splitter.c', - ], - }, # TODO: Add C++ targets - { - 'target_name': 'grpc_unsecure', - 'product_prefix': 'lib', - 'type': 'static_library', - 'dependencies': [ - 'gpr', - ], - 'sources': [ - 'src/core/surface/init_unsecure.c', - 'src/core/census/grpc_context.c', - 'src/core/census/grpc_filter.c', - 'src/core/channel/channel_args.c', - 'src/core/channel/channel_stack.c', - 'src/core/channel/client_channel.c', - 'src/core/channel/compress_filter.c', - 'src/core/channel/connected_channel.c', - 'src/core/channel/http_client_filter.c', - 'src/core/channel/http_server_filter.c', - 'src/core/channel/noop_filter.c', - 'src/core/client_config/client_config.c', - 'src/core/client_config/connector.c', - 'src/core/client_config/lb_policies/pick_first.c', - 'src/core/client_config/lb_policies/round_robin.c', - 'src/core/client_config/lb_policy.c', - 'src/core/client_config/lb_policy_factory.c', - 'src/core/client_config/lb_policy_registry.c', - 'src/core/client_config/resolver.c', - 'src/core/client_config/resolver_factory.c', - 'src/core/client_config/resolver_registry.c', - 'src/core/client_config/resolvers/dns_resolver.c', - 'src/core/client_config/resolvers/sockaddr_resolver.c', - 'src/core/client_config/subchannel.c', - 'src/core/client_config/subchannel_factory.c', - 'src/core/client_config/subchannel_factory_decorators/add_channel_arg.c', - 'src/core/client_config/subchannel_factory_decorators/merge_channel_args.c', - 'src/core/client_config/uri_parser.c', - 'src/core/compression/algorithm.c', - 'src/core/compression/message_compress.c', - 'src/core/debug/trace.c', - 'src/core/httpcli/format_request.c', - 'src/core/httpcli/httpcli.c', - 'src/core/httpcli/parser.c', - 'src/core/iomgr/alarm.c', - 'src/core/iomgr/alarm_heap.c', - 'src/core/iomgr/closure.c', - 'src/core/iomgr/endpoint.c', - 'src/core/iomgr/endpoint_pair_posix.c', - 'src/core/iomgr/endpoint_pair_windows.c', - 'src/core/iomgr/exec_ctx.c', - 'src/core/iomgr/fd_posix.c', - 'src/core/iomgr/iocp_windows.c', - 'src/core/iomgr/iomgr.c', - 'src/core/iomgr/iomgr_posix.c', - 'src/core/iomgr/iomgr_windows.c', - 'src/core/iomgr/pollset_multipoller_with_epoll.c', - 'src/core/iomgr/pollset_multipoller_with_poll_posix.c', - 'src/core/iomgr/pollset_posix.c', - 'src/core/iomgr/pollset_set_posix.c', - 'src/core/iomgr/pollset_set_windows.c', - 'src/core/iomgr/pollset_windows.c', - 'src/core/iomgr/resolve_address_posix.c', - 'src/core/iomgr/resolve_address_windows.c', - 'src/core/iomgr/sockaddr_utils.c', - 'src/core/iomgr/socket_utils_common_posix.c', - 'src/core/iomgr/socket_utils_linux.c', - 'src/core/iomgr/socket_utils_posix.c', - 'src/core/iomgr/socket_windows.c', - 'src/core/iomgr/tcp_client_posix.c', - 'src/core/iomgr/tcp_client_windows.c', - 'src/core/iomgr/tcp_posix.c', - 'src/core/iomgr/tcp_server_posix.c', - 'src/core/iomgr/tcp_server_windows.c', - 'src/core/iomgr/tcp_windows.c', - 'src/core/iomgr/time_averaged_stats.c', - 'src/core/iomgr/udp_server.c', - 'src/core/iomgr/wakeup_fd_eventfd.c', - 'src/core/iomgr/wakeup_fd_nospecial.c', - 'src/core/iomgr/wakeup_fd_pipe.c', - 'src/core/iomgr/wakeup_fd_posix.c', - 'src/core/iomgr/workqueue_posix.c', - 'src/core/iomgr/workqueue_windows.c', - 'src/core/json/json.c', - 'src/core/json/json_reader.c', - 'src/core/json/json_string.c', - 'src/core/json/json_writer.c', - 'src/core/profiling/basic_timers.c', - 'src/core/profiling/stap_timers.c', - 'src/core/surface/byte_buffer.c', - 'src/core/surface/byte_buffer_queue.c', - 'src/core/surface/byte_buffer_reader.c', - 'src/core/surface/call.c', - 'src/core/surface/call_details.c', - 'src/core/surface/call_log_batch.c', - 'src/core/surface/channel.c', - 'src/core/surface/channel_connectivity.c', - 'src/core/surface/channel_create.c', - 'src/core/surface/completion_queue.c', - 'src/core/surface/event_string.c', - 'src/core/surface/init.c', - 'src/core/surface/lame_client.c', - 'src/core/surface/metadata_array.c', - 'src/core/surface/server.c', - 'src/core/surface/server_chttp2.c', - 'src/core/surface/server_create.c', - 'src/core/surface/surface_trace.c', - 'src/core/surface/version.c', - 'src/core/transport/chttp2/alpn.c', - 'src/core/transport/chttp2/bin_encoder.c', - 'src/core/transport/chttp2/frame_data.c', - 'src/core/transport/chttp2/frame_goaway.c', - 'src/core/transport/chttp2/frame_ping.c', - 'src/core/transport/chttp2/frame_rst_stream.c', - 'src/core/transport/chttp2/frame_settings.c', - 'src/core/transport/chttp2/frame_window_update.c', - 'src/core/transport/chttp2/hpack_parser.c', - 'src/core/transport/chttp2/hpack_table.c', - 'src/core/transport/chttp2/huffsyms.c', - 'src/core/transport/chttp2/incoming_metadata.c', - 'src/core/transport/chttp2/parsing.c', - 'src/core/transport/chttp2/status_conversion.c', - 'src/core/transport/chttp2/stream_encoder.c', - 'src/core/transport/chttp2/stream_lists.c', - 'src/core/transport/chttp2/stream_map.c', - 'src/core/transport/chttp2/timeout_encoding.c', - 'src/core/transport/chttp2/varint.c', - 'src/core/transport/chttp2/writing.c', - 'src/core/transport/chttp2_transport.c', - 'src/core/transport/connectivity_state.c', - 'src/core/transport/metadata.c', - 'src/core/transport/stream_op.c', - 'src/core/transport/transport.c', - 'src/core/transport/transport_op_string.c', - 'src/core/census/context.c', - 'src/core/census/initialize.c', - 'src/core/census/operation.c', - 'src/core/census/tracing.c', - ], - }, # TODO: Add C++ targets - { - 'target_name': 'grpc_zookeeper', - 'product_prefix': 'lib', - 'type': 'static_library', - 'dependencies': [ - 'gpr', - 'grpc', - ], - 'sources': [ - 'src/core/client_config/resolvers/zookeeper_resolver.c', - ], - }, # TODO: Add C++ targets - { - 'target_name': 'reconnect_server', - 'product_prefix': 'lib', - 'type': 'static_library', - 'dependencies': [ - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - 'test/core/util/reconnect_server.c', - ], - }, # TODO: Add C++ targets # TODO: Add C++ targets # TODO: Add C++ targets @@ -531,12125 +311,53 @@ # TODO: Add C++ targets # TODO: Add C++ targets # TODO: Add C++ targets - { - 'target_name': 'end2end_fixture_h2_compress', - 'product_prefix': 'lib', - 'type': 'static_library', - 'dependencies': [ - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - 'test/core/end2end/fixtures/h2_compress.c', - ], - }, # TODO: Add C++ targets - { - 'target_name': 'end2end_fixture_h2_fakesec', - 'product_prefix': 'lib', - 'type': 'static_library', - 'dependencies': [ - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - 'test/core/end2end/fixtures/h2_fakesec.c', - ], - }, # TODO: Add C++ targets - { - 'target_name': 'end2end_fixture_h2_full', - 'product_prefix': 'lib', - 'type': 'static_library', - 'dependencies': [ - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - 'test/core/end2end/fixtures/h2_full.c', - ], - }, # TODO: Add C++ targets - { - 'target_name': 'end2end_fixture_h2_full+poll', - 'product_prefix': 'lib', - 'type': 'static_library', - 'dependencies': [ - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - 'test/core/end2end/fixtures/h2_full+poll.c', - ], - }, # TODO: Add C++ targets - { - 'target_name': 'end2end_fixture_h2_oauth2', - 'product_prefix': 'lib', - 'type': 'static_library', - 'dependencies': [ - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - 'test/core/end2end/fixtures/h2_oauth2.c', - ], - }, # TODO: Add C++ targets - { - 'target_name': 'end2end_fixture_h2_proxy', - 'product_prefix': 'lib', - 'type': 'static_library', - 'dependencies': [ - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - 'test/core/end2end/fixtures/h2_proxy.c', - ], - }, # TODO: Add C++ targets - { - 'target_name': 'end2end_fixture_h2_sockpair', - 'product_prefix': 'lib', - 'type': 'static_library', - 'dependencies': [ - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - 'test/core/end2end/fixtures/h2_sockpair.c', - ], - }, # TODO: Add C++ targets - { - 'target_name': 'end2end_fixture_h2_sockpair+trace', - 'product_prefix': 'lib', - 'type': 'static_library', - 'dependencies': [ - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - 'test/core/end2end/fixtures/h2_sockpair+trace.c', - ], - }, # TODO: Add C++ targets - { - 'target_name': 'end2end_fixture_h2_sockpair_1byte', - 'product_prefix': 'lib', - 'type': 'static_library', - 'dependencies': [ - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - 'test/core/end2end/fixtures/h2_sockpair_1byte.c', - ], - }, # TODO: Add C++ targets - { - 'target_name': 'end2end_fixture_h2_ssl', - 'product_prefix': 'lib', - 'type': 'static_library', - 'dependencies': [ - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - 'test/core/end2end/fixtures/h2_ssl.c', - ], - }, # TODO: Add C++ targets - { - 'target_name': 'end2end_fixture_h2_ssl+poll', - 'product_prefix': 'lib', - 'type': 'static_library', - 'dependencies': [ - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - 'test/core/end2end/fixtures/h2_ssl+poll.c', - ], - }, # TODO: Add C++ targets - { - 'target_name': 'end2end_fixture_h2_ssl_proxy', - 'product_prefix': 'lib', - 'type': 'static_library', - 'dependencies': [ - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - 'test/core/end2end/fixtures/h2_ssl_proxy.c', - ], - }, # TODO: Add C++ targets - { - 'target_name': 'end2end_fixture_h2_uds', - 'product_prefix': 'lib', - 'type': 'static_library', - 'dependencies': [ - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - 'test/core/end2end/fixtures/h2_uds.c', - ], - }, # TODO: Add C++ targets - { - 'target_name': 'end2end_fixture_h2_uds+poll', - 'product_prefix': 'lib', - 'type': 'static_library', - 'dependencies': [ - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - 'test/core/end2end/fixtures/h2_uds+poll.c', - ], - }, # TODO: Add C++ targets - { - 'target_name': 'end2end_test_bad_hostname', - 'product_prefix': 'lib', - 'type': 'static_library', - 'dependencies': [ - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - 'test/core/end2end/tests/bad_hostname.c', - ], - }, # TODO: Add C++ targets - { - 'target_name': 'end2end_test_binary_metadata', - 'product_prefix': 'lib', - 'type': 'static_library', - 'dependencies': [ - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - 'test/core/end2end/tests/binary_metadata.c', - ], - }, # TODO: Add C++ targets - { - 'target_name': 'end2end_test_call_creds', - 'product_prefix': 'lib', - 'type': 'static_library', - 'dependencies': [ - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - 'test/core/end2end/tests/call_creds.c', - ], - }, # TODO: Add C++ targets - { - 'target_name': 'end2end_test_cancel_after_accept', - 'product_prefix': 'lib', - 'type': 'static_library', - 'dependencies': [ - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - 'test/core/end2end/tests/cancel_after_accept.c', - ], - }, # TODO: Add C++ targets - { - 'target_name': 'end2end_test_cancel_after_client_done', - 'product_prefix': 'lib', - 'type': 'static_library', - 'dependencies': [ - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - 'test/core/end2end/tests/cancel_after_client_done.c', - ], - }, # TODO: Add C++ targets - { - 'target_name': 'end2end_test_cancel_after_invoke', - 'product_prefix': 'lib', - 'type': 'static_library', - 'dependencies': [ - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - 'test/core/end2end/tests/cancel_after_invoke.c', - ], - }, # TODO: Add C++ targets - { - 'target_name': 'end2end_test_cancel_before_invoke', - 'product_prefix': 'lib', - 'type': 'static_library', - 'dependencies': [ - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - 'test/core/end2end/tests/cancel_before_invoke.c', - ], - }, # TODO: Add C++ targets - { - 'target_name': 'end2end_test_cancel_in_a_vacuum', - 'product_prefix': 'lib', - 'type': 'static_library', - 'dependencies': [ - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - 'test/core/end2end/tests/cancel_in_a_vacuum.c', - ], - }, # TODO: Add C++ targets - { - 'target_name': 'end2end_test_census_simple_request', - 'product_prefix': 'lib', - 'type': 'static_library', - 'dependencies': [ - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - 'test/core/end2end/tests/census_simple_request.c', - ], - }, # TODO: Add C++ targets - { - 'target_name': 'end2end_test_channel_connectivity', - 'product_prefix': 'lib', - 'type': 'static_library', - 'dependencies': [ - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - 'test/core/end2end/tests/channel_connectivity.c', - ], - }, # TODO: Add C++ targets - { - 'target_name': 'end2end_test_compressed_payload', - 'product_prefix': 'lib', - 'type': 'static_library', - 'dependencies': [ - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - 'test/core/end2end/tests/compressed_payload.c', - ], - }, # TODO: Add C++ targets - { - 'target_name': 'end2end_test_default_host', - 'product_prefix': 'lib', - 'type': 'static_library', - 'dependencies': [ - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - 'test/core/end2end/tests/default_host.c', - ], - }, # TODO: Add C++ targets - { - 'target_name': 'end2end_test_disappearing_server', - 'product_prefix': 'lib', - 'type': 'static_library', - 'dependencies': [ - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - 'test/core/end2end/tests/disappearing_server.c', - ], - }, # TODO: Add C++ targets - { - 'target_name': 'end2end_test_empty_batch', - 'product_prefix': 'lib', - 'type': 'static_library', - 'dependencies': [ - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - 'test/core/end2end/tests/empty_batch.c', - ], - }, # TODO: Add C++ targets - { - 'target_name': 'end2end_test_graceful_server_shutdown', - 'product_prefix': 'lib', - 'type': 'static_library', - 'dependencies': [ - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - 'test/core/end2end/tests/graceful_server_shutdown.c', - ], - }, # TODO: Add C++ targets - { - 'target_name': 'end2end_test_high_initial_seqno', - 'product_prefix': 'lib', - 'type': 'static_library', - 'dependencies': [ - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - 'test/core/end2end/tests/high_initial_seqno.c', - ], - }, # TODO: Add C++ targets - { - 'target_name': 'end2end_test_invoke_large_request', - 'product_prefix': 'lib', - 'type': 'static_library', - 'dependencies': [ - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - 'test/core/end2end/tests/invoke_large_request.c', - ], - }, # TODO: Add C++ targets - { - 'target_name': 'end2end_test_large_metadata', - 'product_prefix': 'lib', - 'type': 'static_library', - 'dependencies': [ - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - 'test/core/end2end/tests/large_metadata.c', - ], - }, # TODO: Add C++ targets - { - 'target_name': 'end2end_test_max_concurrent_streams', - 'product_prefix': 'lib', - 'type': 'static_library', - 'dependencies': [ - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - 'test/core/end2end/tests/max_concurrent_streams.c', - ], - }, # TODO: Add C++ targets - { - 'target_name': 'end2end_test_max_message_length', - 'product_prefix': 'lib', - 'type': 'static_library', - 'dependencies': [ - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - 'test/core/end2end/tests/max_message_length.c', - ], - }, # TODO: Add C++ targets - { - 'target_name': 'end2end_test_metadata', - 'product_prefix': 'lib', - 'type': 'static_library', - 'dependencies': [ - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - 'test/core/end2end/tests/metadata.c', - ], - }, # TODO: Add C++ targets - { - 'target_name': 'end2end_test_no_op', - 'product_prefix': 'lib', - 'type': 'static_library', - 'dependencies': [ - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - 'test/core/end2end/tests/no_op.c', - ], - }, # TODO: Add C++ targets - { - 'target_name': 'end2end_test_payload', - 'product_prefix': 'lib', - 'type': 'static_library', - 'dependencies': [ - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - 'test/core/end2end/tests/payload.c', - ], - }, # TODO: Add C++ targets - { - 'target_name': 'end2end_test_ping_pong_streaming', - 'product_prefix': 'lib', - 'type': 'static_library', - 'dependencies': [ - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - 'test/core/end2end/tests/ping_pong_streaming.c', - ], - }, # TODO: Add C++ targets - { - 'target_name': 'end2end_test_registered_call', - 'product_prefix': 'lib', - 'type': 'static_library', - 'dependencies': [ - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - 'test/core/end2end/tests/registered_call.c', - ], - }, # TODO: Add C++ targets - { - 'target_name': 'end2end_test_request_with_flags', - 'product_prefix': 'lib', - 'type': 'static_library', - 'dependencies': [ - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - 'test/core/end2end/tests/request_with_flags.c', - ], - }, # TODO: Add C++ targets - { - 'target_name': 'end2end_test_request_with_payload', - 'product_prefix': 'lib', - 'type': 'static_library', - 'dependencies': [ - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - 'test/core/end2end/tests/request_with_payload.c', - ], - }, # TODO: Add C++ targets - { - 'target_name': 'end2end_test_server_finishes_request', - 'product_prefix': 'lib', - 'type': 'static_library', - 'dependencies': [ - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - 'test/core/end2end/tests/server_finishes_request.c', - ], - }, # TODO: Add C++ targets - { - 'target_name': 'end2end_test_shutdown_finishes_calls', - 'product_prefix': 'lib', - 'type': 'static_library', - 'dependencies': [ - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - 'test/core/end2end/tests/shutdown_finishes_calls.c', - ], - }, # TODO: Add C++ targets - { - 'target_name': 'end2end_test_shutdown_finishes_tags', - 'product_prefix': 'lib', - 'type': 'static_library', - 'dependencies': [ - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - 'test/core/end2end/tests/shutdown_finishes_tags.c', - ], - }, # TODO: Add C++ targets - { - 'target_name': 'end2end_test_simple_delayed_request', - 'product_prefix': 'lib', - 'type': 'static_library', - 'dependencies': [ - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - 'test/core/end2end/tests/simple_delayed_request.c', - ], - }, # TODO: Add C++ targets - { - 'target_name': 'end2end_test_simple_request', - 'product_prefix': 'lib', - 'type': 'static_library', - 'dependencies': [ - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - 'test/core/end2end/tests/simple_request.c', - ], - }, # TODO: Add C++ targets - { - 'target_name': 'end2end_test_trailing_metadata', - 'product_prefix': 'lib', - 'type': 'static_library', - 'dependencies': [ - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - 'test/core/end2end/tests/trailing_metadata.c', - ], - }, # TODO: Add C++ targets - { - 'target_name': 'end2end_certs', - 'product_prefix': 'lib', - 'type': 'static_library', - 'dependencies': [ - ], - 'sources': [ - 'test/core/end2end/data/test_root_cert.c', - 'test/core/end2end/data/server1_cert.c', - 'test/core/end2end/data/server1_key.c', - ], - }, # TODO: Add C++ targets - { - 'target_name': 'bad_client_test', - 'product_prefix': 'lib', - 'type': 'static_library', - 'dependencies': [ - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - 'test/core/bad_client/bad_client.c', - ], - }, - { - 'target_name': 'alarm_heap_test', - 'type': 'executable', - 'dependencies': [ - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - 'test/core/iomgr/alarm_heap_test.c', - ] - }, - { - 'target_name': 'alarm_list_test', - 'type': 'executable', - 'dependencies': [ - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - 'test/core/iomgr/alarm_list_test.c', - ] - }, - { - 'target_name': 'alpn_test', - 'type': 'executable', - 'dependencies': [ - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - 'test/core/transport/chttp2/alpn_test.c', - ] - }, - { - 'target_name': 'bin_encoder_test', - 'type': 'executable', - 'dependencies': [ - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - 'test/core/transport/chttp2/bin_encoder_test.c', - ] - }, - { - 'target_name': 'chttp2_status_conversion_test', - 'type': 'executable', - 'dependencies': [ - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - 'test/core/transport/chttp2/status_conversion_test.c', - ] - }, - { - 'target_name': 'chttp2_stream_encoder_test', - 'type': 'executable', - 'dependencies': [ - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - 'test/core/transport/chttp2/stream_encoder_test.c', - ] - }, - { - 'target_name': 'chttp2_stream_map_test', - 'type': 'executable', - 'dependencies': [ - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - 'test/core/transport/chttp2/stream_map_test.c', - ] - }, - { - 'target_name': 'compression_test', - 'type': 'executable', - 'dependencies': [ - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - 'test/core/compression/compression_test.c', - ] - }, - { - 'target_name': 'dualstack_socket_test', - 'type': 'executable', - 'dependencies': [ - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - 'test/core/end2end/dualstack_socket_test.c', - ] - }, - { - 'target_name': 'endpoint_pair_test', - 'type': 'executable', - 'dependencies': [ - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - 'test/core/iomgr/endpoint_pair_test.c', - ] - }, - { - 'target_name': 'fd_conservation_posix_test', - 'type': 'executable', - 'dependencies': [ - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - 'test/core/iomgr/fd_conservation_posix_test.c', - ] - }, - { - 'target_name': 'fd_posix_test', - 'type': 'executable', - 'dependencies': [ - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - 'test/core/iomgr/fd_posix_test.c', - ] - }, - { - 'target_name': 'fling_client', - 'type': 'executable', - 'dependencies': [ - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - 'test/core/fling/client.c', - ] - }, - { - 'target_name': 'fling_server', - 'type': 'executable', - 'dependencies': [ - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - 'test/core/fling/server.c', - ] - }, - { - 'target_name': 'fling_stream_test', - 'type': 'executable', - 'dependencies': [ - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - 'test/core/fling/fling_stream_test.c', - ] - }, - { - 'target_name': 'fling_test', - 'type': 'executable', - 'dependencies': [ - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - 'test/core/fling/fling_test.c', - ] - }, - { - 'target_name': 'gen_hpack_tables', - 'type': 'executable', - 'dependencies': [ - 'gpr', - 'grpc', - ], - 'sources': [ - 'tools/codegen/core/gen_hpack_tables.c', - ] - }, - { - 'target_name': 'gen_legal_metadata_characters', - 'type': 'executable', - 'dependencies': [ - ], - 'sources': [ - 'tools/codegen/core/gen_legal_metadata_characters.c', - ] - }, - { - 'target_name': 'gpr_cmdline_test', - 'type': 'executable', - 'dependencies': [ - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - 'test/core/support/cmdline_test.c', - ] - }, - { - 'target_name': 'gpr_env_test', - 'type': 'executable', - 'dependencies': [ - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - 'test/core/support/env_test.c', - ] - }, - { - 'target_name': 'gpr_file_test', - 'type': 'executable', - 'dependencies': [ - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - 'test/core/support/file_test.c', - ] - }, - { - 'target_name': 'gpr_histogram_test', - 'type': 'executable', - 'dependencies': [ - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - 'test/core/support/histogram_test.c', - ] - }, - { - 'target_name': 'gpr_host_port_test', - 'type': 'executable', - 'dependencies': [ - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - 'test/core/support/host_port_test.c', - ] - }, - { - 'target_name': 'gpr_log_test', - 'type': 'executable', - 'dependencies': [ - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - 'test/core/support/log_test.c', - ] - }, - { - 'target_name': 'gpr_slice_buffer_test', - 'type': 'executable', - 'dependencies': [ - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - 'test/core/support/slice_buffer_test.c', - ] - }, - { - 'target_name': 'gpr_slice_test', - 'type': 'executable', - 'dependencies': [ - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - 'test/core/support/slice_test.c', - ] - }, - { - 'target_name': 'gpr_stack_lockfree_test', - 'type': 'executable', - 'dependencies': [ - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - 'test/core/support/stack_lockfree_test.c', - ] - }, - { - 'target_name': 'gpr_string_test', - 'type': 'executable', - 'dependencies': [ - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - 'test/core/support/string_test.c', - ] - }, - { - 'target_name': 'gpr_sync_test', - 'type': 'executable', - 'dependencies': [ - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - 'test/core/support/sync_test.c', - ] - }, - { - 'target_name': 'gpr_thd_test', - 'type': 'executable', - 'dependencies': [ - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - 'test/core/support/thd_test.c', - ] - }, - { - 'target_name': 'gpr_time_test', - 'type': 'executable', - 'dependencies': [ - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - 'test/core/support/time_test.c', - ] - }, - { - 'target_name': 'gpr_tls_test', - 'type': 'executable', - 'dependencies': [ - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - 'test/core/support/tls_test.c', - ] - }, - { - 'target_name': 'gpr_useful_test', - 'type': 'executable', - 'dependencies': [ - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - 'test/core/support/useful_test.c', - ] - }, - { - 'target_name': 'grpc_auth_context_test', - 'type': 'executable', - 'dependencies': [ - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - 'test/core/security/auth_context_test.c', - ] - }, - { - 'target_name': 'grpc_base64_test', - 'type': 'executable', - 'dependencies': [ - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - 'test/core/security/base64_test.c', - ] - }, - { - 'target_name': 'grpc_byte_buffer_reader_test', - 'type': 'executable', - 'dependencies': [ - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - 'test/core/surface/byte_buffer_reader_test.c', - ] - }, - { - 'target_name': 'grpc_channel_args_test', - 'type': 'executable', - 'dependencies': [ - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - 'test/core/channel/channel_args_test.c', - ] - }, - { - 'target_name': 'grpc_channel_stack_test', - 'type': 'executable', - 'dependencies': [ - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - 'test/core/channel/channel_stack_test.c', - ] - }, - { - 'target_name': 'grpc_completion_queue_test', - 'type': 'executable', - 'dependencies': [ - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - 'test/core/surface/completion_queue_test.c', - ] - }, - { - 'target_name': 'grpc_create_jwt', - 'type': 'executable', - 'dependencies': [ - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - 'test/core/security/create_jwt.c', - ] - }, - { - 'target_name': 'grpc_credentials_test', - 'type': 'executable', - 'dependencies': [ - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - 'test/core/security/credentials_test.c', - ] - }, - { - 'target_name': 'grpc_fetch_oauth2', - 'type': 'executable', - 'dependencies': [ - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - 'test/core/security/fetch_oauth2.c', - ] - }, - { - 'target_name': 'grpc_json_token_test', - 'type': 'executable', - 'dependencies': [ - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - 'test/core/security/json_token_test.c', - ] - }, - { - 'target_name': 'grpc_jwt_verifier_test', - 'type': 'executable', - 'dependencies': [ - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - 'test/core/security/jwt_verifier_test.c', - ] - }, - { - 'target_name': 'grpc_print_google_default_creds_token', - 'type': 'executable', - 'dependencies': [ - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - 'test/core/security/print_google_default_creds_token.c', - ] - }, - { - 'target_name': 'grpc_security_connector_test', - 'type': 'executable', - 'dependencies': [ - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - 'test/core/security/security_connector_test.c', - ] - }, - { - 'target_name': 'grpc_stream_op_test', - 'type': 'executable', - 'dependencies': [ - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - 'test/core/transport/stream_op_test.c', - ] - }, - { - 'target_name': 'grpc_verify_jwt', - 'type': 'executable', - 'dependencies': [ - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - 'test/core/security/verify_jwt.c', - ] - }, - { - 'target_name': 'hpack_parser_test', - 'type': 'executable', - 'dependencies': [ - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - 'test/core/transport/chttp2/hpack_parser_test.c', - ] - }, - { - 'target_name': 'hpack_table_test', - 'type': 'executable', - 'dependencies': [ - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - 'test/core/transport/chttp2/hpack_table_test.c', - ] - }, - { - 'target_name': 'httpcli_format_request_test', - 'type': 'executable', - 'dependencies': [ - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - 'test/core/httpcli/format_request_test.c', - ] - }, - { - 'target_name': 'httpcli_parser_test', - 'type': 'executable', - 'dependencies': [ - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - 'test/core/httpcli/parser_test.c', - ] - }, - { - 'target_name': 'httpcli_test', - 'type': 'executable', - 'dependencies': [ - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - 'test/core/httpcli/httpcli_test.c', - ] - }, - { - 'target_name': 'json_rewrite', - 'type': 'executable', - 'dependencies': [ - 'grpc', - 'gpr', - ], - 'sources': [ - 'test/core/json/json_rewrite.c', - ] - }, - { - 'target_name': 'json_rewrite_test', - 'type': 'executable', - 'dependencies': [ - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - 'test/core/json/json_rewrite_test.c', - ] - }, - { - 'target_name': 'json_test', - 'type': 'executable', - 'dependencies': [ - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - 'test/core/json/json_test.c', - ] - }, - { - 'target_name': 'lame_client_test', - 'type': 'executable', - 'dependencies': [ - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - 'test/core/surface/lame_client_test.c', - ] - }, - { - 'target_name': 'lb_policies_test', - 'type': 'executable', - 'dependencies': [ - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - 'test/core/client_config/lb_policies_test.c', - ] - }, - { - 'target_name': 'low_level_ping_pong_benchmark', - 'type': 'executable', - 'dependencies': [ - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - 'test/core/network_benchmarks/low_level_ping_pong.c', - ] - }, - { - 'target_name': 'message_compress_test', - 'type': 'executable', - 'dependencies': [ - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - 'test/core/compression/message_compress_test.c', - ] - }, - { - 'target_name': 'multi_init_test', - 'type': 'executable', - 'dependencies': [ - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - 'test/core/surface/multi_init_test.c', - ] - }, - { - 'target_name': 'multiple_server_queues_test', - 'type': 'executable', - 'dependencies': [ - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - 'test/core/end2end/multiple_server_queues_test.c', - ] - }, - { - 'target_name': 'murmur_hash_test', - 'type': 'executable', - 'dependencies': [ - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - 'test/core/support/murmur_hash_test.c', - ] - }, - { - 'target_name': 'no_server_test', - 'type': 'executable', - 'dependencies': [ - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - 'test/core/end2end/no_server_test.c', - ] - }, - { - 'target_name': 'resolve_address_test', - 'type': 'executable', - 'dependencies': [ - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - 'test/core/iomgr/resolve_address_test.c', - ] - }, - { - 'target_name': 'secure_endpoint_test', - 'type': 'executable', - 'dependencies': [ - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - 'test/core/security/secure_endpoint_test.c', - ] - }, - { - 'target_name': 'sockaddr_utils_test', - 'type': 'executable', - 'dependencies': [ - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - 'test/core/iomgr/sockaddr_utils_test.c', - ] - }, - { - 'target_name': 'tcp_client_posix_test', - 'type': 'executable', - 'dependencies': [ - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - 'test/core/iomgr/tcp_client_posix_test.c', - ] - }, - { - 'target_name': 'tcp_posix_test', - 'type': 'executable', - 'dependencies': [ - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - 'test/core/iomgr/tcp_posix_test.c', - ] - }, - { - 'target_name': 'tcp_server_posix_test', - 'type': 'executable', - 'dependencies': [ - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - 'test/core/iomgr/tcp_server_posix_test.c', - ] - }, - { - 'target_name': 'time_averaged_stats_test', - 'type': 'executable', - 'dependencies': [ - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - 'test/core/iomgr/time_averaged_stats_test.c', - ] - }, - { - 'target_name': 'timeout_encoding_test', - 'type': 'executable', - 'dependencies': [ - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - 'test/core/transport/chttp2/timeout_encoding_test.c', - ] - }, - { - 'target_name': 'timers_test', - 'type': 'executable', - 'dependencies': [ - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - 'test/core/profiling/timers_test.c', - ] - }, - { - 'target_name': 'transport_metadata_test', - 'type': 'executable', - 'dependencies': [ - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - 'test/core/transport/metadata_test.c', - ] - }, - { - 'target_name': 'transport_security_test', - 'type': 'executable', - 'dependencies': [ - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - 'test/core/tsi/transport_security_test.c', - ] - }, - { - 'target_name': 'udp_server_test', - 'type': 'executable', - 'dependencies': [ - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - 'test/core/iomgr/udp_server_test.c', - ] - }, - { - 'target_name': 'uri_parser_test', - 'type': 'executable', - 'dependencies': [ - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - 'test/core/client_config/uri_parser_test.c', - ] - }, - { - 'target_name': 'workqueue_test', - 'type': 'executable', - 'dependencies': [ - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - 'test/core/iomgr/workqueue_test.c', - ] - }, - { - 'target_name': 'h2_compress_bad_hostname_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_compress', - 'end2end_test_bad_hostname', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_compress_binary_metadata_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_compress', - 'end2end_test_binary_metadata', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_compress_call_creds_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_compress', - 'end2end_test_call_creds', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_compress_cancel_after_accept_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_compress', - 'end2end_test_cancel_after_accept', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_compress_cancel_after_client_done_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_compress', - 'end2end_test_cancel_after_client_done', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_compress_cancel_after_invoke_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_compress', - 'end2end_test_cancel_after_invoke', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_compress_cancel_before_invoke_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_compress', - 'end2end_test_cancel_before_invoke', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_compress_cancel_in_a_vacuum_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_compress', - 'end2end_test_cancel_in_a_vacuum', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_compress_census_simple_request_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_compress', - 'end2end_test_census_simple_request', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_compress_channel_connectivity_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_compress', - 'end2end_test_channel_connectivity', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_compress_compressed_payload_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_compress', - 'end2end_test_compressed_payload', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_compress_default_host_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_compress', - 'end2end_test_default_host', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_compress_disappearing_server_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_compress', - 'end2end_test_disappearing_server', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_compress_empty_batch_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_compress', - 'end2end_test_empty_batch', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_compress_graceful_server_shutdown_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_compress', - 'end2end_test_graceful_server_shutdown', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_compress_high_initial_seqno_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_compress', - 'end2end_test_high_initial_seqno', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_compress_invoke_large_request_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_compress', - 'end2end_test_invoke_large_request', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_compress_large_metadata_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_compress', - 'end2end_test_large_metadata', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_compress_max_concurrent_streams_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_compress', - 'end2end_test_max_concurrent_streams', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_compress_max_message_length_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_compress', - 'end2end_test_max_message_length', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_compress_metadata_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_compress', - 'end2end_test_metadata', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_compress_no_op_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_compress', - 'end2end_test_no_op', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_compress_payload_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_compress', - 'end2end_test_payload', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_compress_ping_pong_streaming_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_compress', - 'end2end_test_ping_pong_streaming', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_compress_registered_call_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_compress', - 'end2end_test_registered_call', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_compress_request_with_flags_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_compress', - 'end2end_test_request_with_flags', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_compress_request_with_payload_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_compress', - 'end2end_test_request_with_payload', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_compress_server_finishes_request_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_compress', - 'end2end_test_server_finishes_request', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_compress_shutdown_finishes_calls_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_compress', - 'end2end_test_shutdown_finishes_calls', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_compress_shutdown_finishes_tags_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_compress', - 'end2end_test_shutdown_finishes_tags', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_compress_simple_delayed_request_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_compress', - 'end2end_test_simple_delayed_request', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_compress_simple_request_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_compress', - 'end2end_test_simple_request', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_compress_trailing_metadata_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_compress', - 'end2end_test_trailing_metadata', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_fakesec_bad_hostname_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_fakesec', - 'end2end_test_bad_hostname', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_fakesec_binary_metadata_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_fakesec', - 'end2end_test_binary_metadata', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_fakesec_call_creds_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_fakesec', - 'end2end_test_call_creds', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_fakesec_cancel_after_accept_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_fakesec', - 'end2end_test_cancel_after_accept', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_fakesec_cancel_after_client_done_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_fakesec', - 'end2end_test_cancel_after_client_done', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_fakesec_cancel_after_invoke_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_fakesec', - 'end2end_test_cancel_after_invoke', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_fakesec_cancel_before_invoke_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_fakesec', - 'end2end_test_cancel_before_invoke', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_fakesec_cancel_in_a_vacuum_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_fakesec', - 'end2end_test_cancel_in_a_vacuum', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_fakesec_census_simple_request_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_fakesec', - 'end2end_test_census_simple_request', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_fakesec_channel_connectivity_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_fakesec', - 'end2end_test_channel_connectivity', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_fakesec_compressed_payload_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_fakesec', - 'end2end_test_compressed_payload', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_fakesec_default_host_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_fakesec', - 'end2end_test_default_host', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_fakesec_disappearing_server_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_fakesec', - 'end2end_test_disappearing_server', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_fakesec_empty_batch_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_fakesec', - 'end2end_test_empty_batch', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_fakesec_graceful_server_shutdown_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_fakesec', - 'end2end_test_graceful_server_shutdown', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_fakesec_high_initial_seqno_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_fakesec', - 'end2end_test_high_initial_seqno', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_fakesec_invoke_large_request_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_fakesec', - 'end2end_test_invoke_large_request', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_fakesec_large_metadata_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_fakesec', - 'end2end_test_large_metadata', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_fakesec_max_concurrent_streams_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_fakesec', - 'end2end_test_max_concurrent_streams', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_fakesec_max_message_length_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_fakesec', - 'end2end_test_max_message_length', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_fakesec_metadata_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_fakesec', - 'end2end_test_metadata', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_fakesec_no_op_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_fakesec', - 'end2end_test_no_op', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_fakesec_payload_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_fakesec', - 'end2end_test_payload', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_fakesec_ping_pong_streaming_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_fakesec', - 'end2end_test_ping_pong_streaming', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_fakesec_registered_call_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_fakesec', - 'end2end_test_registered_call', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_fakesec_request_with_flags_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_fakesec', - 'end2end_test_request_with_flags', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_fakesec_request_with_payload_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_fakesec', - 'end2end_test_request_with_payload', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_fakesec_server_finishes_request_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_fakesec', - 'end2end_test_server_finishes_request', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_fakesec_shutdown_finishes_calls_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_fakesec', - 'end2end_test_shutdown_finishes_calls', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_fakesec_shutdown_finishes_tags_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_fakesec', - 'end2end_test_shutdown_finishes_tags', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_fakesec_simple_delayed_request_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_fakesec', - 'end2end_test_simple_delayed_request', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_fakesec_simple_request_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_fakesec', - 'end2end_test_simple_request', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_fakesec_trailing_metadata_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_fakesec', - 'end2end_test_trailing_metadata', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_full_bad_hostname_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_full', - 'end2end_test_bad_hostname', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_full_binary_metadata_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_full', - 'end2end_test_binary_metadata', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_full_call_creds_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_full', - 'end2end_test_call_creds', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_full_cancel_after_accept_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_full', - 'end2end_test_cancel_after_accept', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_full_cancel_after_client_done_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_full', - 'end2end_test_cancel_after_client_done', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_full_cancel_after_invoke_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_full', - 'end2end_test_cancel_after_invoke', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_full_cancel_before_invoke_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_full', - 'end2end_test_cancel_before_invoke', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_full_cancel_in_a_vacuum_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_full', - 'end2end_test_cancel_in_a_vacuum', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_full_census_simple_request_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_full', - 'end2end_test_census_simple_request', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_full_channel_connectivity_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_full', - 'end2end_test_channel_connectivity', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_full_compressed_payload_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_full', - 'end2end_test_compressed_payload', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_full_default_host_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_full', - 'end2end_test_default_host', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_full_disappearing_server_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_full', - 'end2end_test_disappearing_server', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_full_empty_batch_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_full', - 'end2end_test_empty_batch', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_full_graceful_server_shutdown_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_full', - 'end2end_test_graceful_server_shutdown', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_full_high_initial_seqno_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_full', - 'end2end_test_high_initial_seqno', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_full_invoke_large_request_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_full', - 'end2end_test_invoke_large_request', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_full_large_metadata_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_full', - 'end2end_test_large_metadata', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_full_max_concurrent_streams_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_full', - 'end2end_test_max_concurrent_streams', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_full_max_message_length_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_full', - 'end2end_test_max_message_length', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_full_metadata_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_full', - 'end2end_test_metadata', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_full_no_op_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_full', - 'end2end_test_no_op', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_full_payload_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_full', - 'end2end_test_payload', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_full_ping_pong_streaming_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_full', - 'end2end_test_ping_pong_streaming', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_full_registered_call_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_full', - 'end2end_test_registered_call', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_full_request_with_flags_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_full', - 'end2end_test_request_with_flags', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_full_request_with_payload_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_full', - 'end2end_test_request_with_payload', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_full_server_finishes_request_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_full', - 'end2end_test_server_finishes_request', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_full_shutdown_finishes_calls_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_full', - 'end2end_test_shutdown_finishes_calls', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_full_shutdown_finishes_tags_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_full', - 'end2end_test_shutdown_finishes_tags', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_full_simple_delayed_request_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_full', - 'end2end_test_simple_delayed_request', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_full_simple_request_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_full', - 'end2end_test_simple_request', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_full_trailing_metadata_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_full', - 'end2end_test_trailing_metadata', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_full+poll_bad_hostname_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_full+poll', - 'end2end_test_bad_hostname', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_full+poll_binary_metadata_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_full+poll', - 'end2end_test_binary_metadata', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_full+poll_call_creds_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_full+poll', - 'end2end_test_call_creds', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_full+poll_cancel_after_accept_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_full+poll', - 'end2end_test_cancel_after_accept', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_full+poll_cancel_after_client_done_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_full+poll', - 'end2end_test_cancel_after_client_done', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_full+poll_cancel_after_invoke_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_full+poll', - 'end2end_test_cancel_after_invoke', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_full+poll_cancel_before_invoke_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_full+poll', - 'end2end_test_cancel_before_invoke', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_full+poll_cancel_in_a_vacuum_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_full+poll', - 'end2end_test_cancel_in_a_vacuum', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_full+poll_census_simple_request_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_full+poll', - 'end2end_test_census_simple_request', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_full+poll_channel_connectivity_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_full+poll', - 'end2end_test_channel_connectivity', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_full+poll_compressed_payload_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_full+poll', - 'end2end_test_compressed_payload', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_full+poll_default_host_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_full+poll', - 'end2end_test_default_host', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_full+poll_disappearing_server_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_full+poll', - 'end2end_test_disappearing_server', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_full+poll_empty_batch_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_full+poll', - 'end2end_test_empty_batch', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_full+poll_graceful_server_shutdown_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_full+poll', - 'end2end_test_graceful_server_shutdown', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_full+poll_high_initial_seqno_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_full+poll', - 'end2end_test_high_initial_seqno', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_full+poll_invoke_large_request_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_full+poll', - 'end2end_test_invoke_large_request', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_full+poll_large_metadata_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_full+poll', - 'end2end_test_large_metadata', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_full+poll_max_concurrent_streams_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_full+poll', - 'end2end_test_max_concurrent_streams', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_full+poll_max_message_length_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_full+poll', - 'end2end_test_max_message_length', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_full+poll_metadata_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_full+poll', - 'end2end_test_metadata', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_full+poll_no_op_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_full+poll', - 'end2end_test_no_op', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_full+poll_payload_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_full+poll', - 'end2end_test_payload', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_full+poll_ping_pong_streaming_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_full+poll', - 'end2end_test_ping_pong_streaming', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_full+poll_registered_call_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_full+poll', - 'end2end_test_registered_call', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_full+poll_request_with_flags_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_full+poll', - 'end2end_test_request_with_flags', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_full+poll_request_with_payload_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_full+poll', - 'end2end_test_request_with_payload', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_full+poll_server_finishes_request_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_full+poll', - 'end2end_test_server_finishes_request', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_full+poll_shutdown_finishes_calls_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_full+poll', - 'end2end_test_shutdown_finishes_calls', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_full+poll_shutdown_finishes_tags_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_full+poll', - 'end2end_test_shutdown_finishes_tags', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_full+poll_simple_delayed_request_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_full+poll', - 'end2end_test_simple_delayed_request', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_full+poll_simple_request_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_full+poll', - 'end2end_test_simple_request', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_full+poll_trailing_metadata_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_full+poll', - 'end2end_test_trailing_metadata', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_oauth2_bad_hostname_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_oauth2', - 'end2end_test_bad_hostname', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_oauth2_binary_metadata_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_oauth2', - 'end2end_test_binary_metadata', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_oauth2_call_creds_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_oauth2', - 'end2end_test_call_creds', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_oauth2_cancel_after_accept_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_oauth2', - 'end2end_test_cancel_after_accept', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_oauth2_cancel_after_client_done_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_oauth2', - 'end2end_test_cancel_after_client_done', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_oauth2_cancel_after_invoke_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_oauth2', - 'end2end_test_cancel_after_invoke', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_oauth2_cancel_before_invoke_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_oauth2', - 'end2end_test_cancel_before_invoke', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_oauth2_cancel_in_a_vacuum_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_oauth2', - 'end2end_test_cancel_in_a_vacuum', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_oauth2_census_simple_request_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_oauth2', - 'end2end_test_census_simple_request', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_oauth2_channel_connectivity_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_oauth2', - 'end2end_test_channel_connectivity', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_oauth2_compressed_payload_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_oauth2', - 'end2end_test_compressed_payload', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_oauth2_default_host_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_oauth2', - 'end2end_test_default_host', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_oauth2_disappearing_server_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_oauth2', - 'end2end_test_disappearing_server', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_oauth2_empty_batch_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_oauth2', - 'end2end_test_empty_batch', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_oauth2_graceful_server_shutdown_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_oauth2', - 'end2end_test_graceful_server_shutdown', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_oauth2_high_initial_seqno_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_oauth2', - 'end2end_test_high_initial_seqno', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_oauth2_invoke_large_request_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_oauth2', - 'end2end_test_invoke_large_request', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_oauth2_large_metadata_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_oauth2', - 'end2end_test_large_metadata', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_oauth2_max_concurrent_streams_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_oauth2', - 'end2end_test_max_concurrent_streams', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_oauth2_max_message_length_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_oauth2', - 'end2end_test_max_message_length', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_oauth2_metadata_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_oauth2', - 'end2end_test_metadata', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_oauth2_no_op_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_oauth2', - 'end2end_test_no_op', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_oauth2_payload_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_oauth2', - 'end2end_test_payload', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_oauth2_ping_pong_streaming_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_oauth2', - 'end2end_test_ping_pong_streaming', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_oauth2_registered_call_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_oauth2', - 'end2end_test_registered_call', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_oauth2_request_with_flags_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_oauth2', - 'end2end_test_request_with_flags', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_oauth2_request_with_payload_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_oauth2', - 'end2end_test_request_with_payload', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_oauth2_server_finishes_request_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_oauth2', - 'end2end_test_server_finishes_request', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_oauth2_shutdown_finishes_calls_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_oauth2', - 'end2end_test_shutdown_finishes_calls', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_oauth2_shutdown_finishes_tags_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_oauth2', - 'end2end_test_shutdown_finishes_tags', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_oauth2_simple_delayed_request_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_oauth2', - 'end2end_test_simple_delayed_request', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_oauth2_simple_request_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_oauth2', - 'end2end_test_simple_request', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_oauth2_trailing_metadata_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_oauth2', - 'end2end_test_trailing_metadata', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_proxy_bad_hostname_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_proxy', - 'end2end_test_bad_hostname', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_proxy_binary_metadata_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_proxy', - 'end2end_test_binary_metadata', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_proxy_call_creds_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_proxy', - 'end2end_test_call_creds', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_proxy_cancel_after_accept_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_proxy', - 'end2end_test_cancel_after_accept', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_proxy_cancel_after_client_done_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_proxy', - 'end2end_test_cancel_after_client_done', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_proxy_cancel_after_invoke_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_proxy', - 'end2end_test_cancel_after_invoke', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_proxy_cancel_before_invoke_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_proxy', - 'end2end_test_cancel_before_invoke', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_proxy_cancel_in_a_vacuum_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_proxy', - 'end2end_test_cancel_in_a_vacuum', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_proxy_census_simple_request_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_proxy', - 'end2end_test_census_simple_request', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_proxy_default_host_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_proxy', - 'end2end_test_default_host', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_proxy_disappearing_server_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_proxy', - 'end2end_test_disappearing_server', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_proxy_empty_batch_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_proxy', - 'end2end_test_empty_batch', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_proxy_graceful_server_shutdown_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_proxy', - 'end2end_test_graceful_server_shutdown', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_proxy_high_initial_seqno_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_proxy', - 'end2end_test_high_initial_seqno', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_proxy_invoke_large_request_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_proxy', - 'end2end_test_invoke_large_request', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_proxy_large_metadata_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_proxy', - 'end2end_test_large_metadata', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_proxy_max_message_length_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_proxy', - 'end2end_test_max_message_length', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_proxy_metadata_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_proxy', - 'end2end_test_metadata', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_proxy_no_op_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_proxy', - 'end2end_test_no_op', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_proxy_payload_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_proxy', - 'end2end_test_payload', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_proxy_ping_pong_streaming_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_proxy', - 'end2end_test_ping_pong_streaming', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_proxy_registered_call_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_proxy', - 'end2end_test_registered_call', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_proxy_request_with_payload_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_proxy', - 'end2end_test_request_with_payload', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_proxy_server_finishes_request_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_proxy', - 'end2end_test_server_finishes_request', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_proxy_shutdown_finishes_calls_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_proxy', - 'end2end_test_shutdown_finishes_calls', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_proxy_shutdown_finishes_tags_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_proxy', - 'end2end_test_shutdown_finishes_tags', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_proxy_simple_delayed_request_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_proxy', - 'end2end_test_simple_delayed_request', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_proxy_simple_request_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_proxy', - 'end2end_test_simple_request', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_proxy_trailing_metadata_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_proxy', - 'end2end_test_trailing_metadata', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair_bad_hostname_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair', - 'end2end_test_bad_hostname', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair_binary_metadata_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair', - 'end2end_test_binary_metadata', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair_call_creds_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair', - 'end2end_test_call_creds', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair_cancel_after_accept_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair', - 'end2end_test_cancel_after_accept', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair_cancel_after_client_done_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair', - 'end2end_test_cancel_after_client_done', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair_cancel_after_invoke_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair', - 'end2end_test_cancel_after_invoke', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair_cancel_before_invoke_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair', - 'end2end_test_cancel_before_invoke', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair_cancel_in_a_vacuum_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair', - 'end2end_test_cancel_in_a_vacuum', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair_census_simple_request_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair', - 'end2end_test_census_simple_request', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair_compressed_payload_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair', - 'end2end_test_compressed_payload', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair_empty_batch_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair', - 'end2end_test_empty_batch', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair_graceful_server_shutdown_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair', - 'end2end_test_graceful_server_shutdown', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair_high_initial_seqno_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair', - 'end2end_test_high_initial_seqno', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair_invoke_large_request_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair', - 'end2end_test_invoke_large_request', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair_large_metadata_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair', - 'end2end_test_large_metadata', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair_max_concurrent_streams_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair', - 'end2end_test_max_concurrent_streams', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair_max_message_length_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair', - 'end2end_test_max_message_length', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair_metadata_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair', - 'end2end_test_metadata', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair_no_op_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair', - 'end2end_test_no_op', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair_payload_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair', - 'end2end_test_payload', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair_ping_pong_streaming_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair', - 'end2end_test_ping_pong_streaming', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair_registered_call_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair', - 'end2end_test_registered_call', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair_request_with_flags_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair', - 'end2end_test_request_with_flags', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair_request_with_payload_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair', - 'end2end_test_request_with_payload', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair_server_finishes_request_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair', - 'end2end_test_server_finishes_request', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair_shutdown_finishes_calls_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair', - 'end2end_test_shutdown_finishes_calls', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair_shutdown_finishes_tags_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair', - 'end2end_test_shutdown_finishes_tags', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair_simple_request_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair', - 'end2end_test_simple_request', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair_trailing_metadata_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair', - 'end2end_test_trailing_metadata', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair+trace_bad_hostname_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair+trace', - 'end2end_test_bad_hostname', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair+trace_binary_metadata_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair+trace', - 'end2end_test_binary_metadata', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair+trace_call_creds_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair+trace', - 'end2end_test_call_creds', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair+trace_cancel_after_accept_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair+trace', - 'end2end_test_cancel_after_accept', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair+trace_cancel_after_client_done_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair+trace', - 'end2end_test_cancel_after_client_done', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair+trace_cancel_after_invoke_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair+trace', - 'end2end_test_cancel_after_invoke', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair+trace_cancel_before_invoke_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair+trace', - 'end2end_test_cancel_before_invoke', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair+trace_cancel_in_a_vacuum_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair+trace', - 'end2end_test_cancel_in_a_vacuum', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair+trace_census_simple_request_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair+trace', - 'end2end_test_census_simple_request', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair+trace_compressed_payload_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair+trace', - 'end2end_test_compressed_payload', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair+trace_empty_batch_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair+trace', - 'end2end_test_empty_batch', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair+trace_graceful_server_shutdown_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair+trace', - 'end2end_test_graceful_server_shutdown', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair+trace_high_initial_seqno_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair+trace', - 'end2end_test_high_initial_seqno', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair+trace_invoke_large_request_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair+trace', - 'end2end_test_invoke_large_request', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair+trace_large_metadata_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair+trace', - 'end2end_test_large_metadata', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair+trace_max_concurrent_streams_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair+trace', - 'end2end_test_max_concurrent_streams', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair+trace_max_message_length_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair+trace', - 'end2end_test_max_message_length', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair+trace_metadata_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair+trace', - 'end2end_test_metadata', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair+trace_no_op_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair+trace', - 'end2end_test_no_op', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair+trace_payload_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair+trace', - 'end2end_test_payload', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair+trace_ping_pong_streaming_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair+trace', - 'end2end_test_ping_pong_streaming', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair+trace_registered_call_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair+trace', - 'end2end_test_registered_call', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair+trace_request_with_flags_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair+trace', - 'end2end_test_request_with_flags', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair+trace_request_with_payload_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair+trace', - 'end2end_test_request_with_payload', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair+trace_server_finishes_request_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair+trace', - 'end2end_test_server_finishes_request', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair+trace_shutdown_finishes_calls_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair+trace', - 'end2end_test_shutdown_finishes_calls', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair+trace_shutdown_finishes_tags_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair+trace', - 'end2end_test_shutdown_finishes_tags', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair+trace_simple_request_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair+trace', - 'end2end_test_simple_request', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair+trace_trailing_metadata_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair+trace', - 'end2end_test_trailing_metadata', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair_1byte_bad_hostname_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair_1byte', - 'end2end_test_bad_hostname', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair_1byte_binary_metadata_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair_1byte', - 'end2end_test_binary_metadata', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair_1byte_call_creds_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair_1byte', - 'end2end_test_call_creds', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair_1byte_cancel_after_accept_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair_1byte', - 'end2end_test_cancel_after_accept', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair_1byte_cancel_after_client_done_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair_1byte', - 'end2end_test_cancel_after_client_done', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair_1byte_cancel_after_invoke_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair_1byte', - 'end2end_test_cancel_after_invoke', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair_1byte_cancel_before_invoke_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair_1byte', - 'end2end_test_cancel_before_invoke', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair_1byte_cancel_in_a_vacuum_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair_1byte', - 'end2end_test_cancel_in_a_vacuum', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair_1byte_census_simple_request_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair_1byte', - 'end2end_test_census_simple_request', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair_1byte_compressed_payload_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair_1byte', - 'end2end_test_compressed_payload', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair_1byte_empty_batch_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair_1byte', - 'end2end_test_empty_batch', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair_1byte_graceful_server_shutdown_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair_1byte', - 'end2end_test_graceful_server_shutdown', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair_1byte_high_initial_seqno_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair_1byte', - 'end2end_test_high_initial_seqno', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair_1byte_invoke_large_request_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair_1byte', - 'end2end_test_invoke_large_request', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair_1byte_large_metadata_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair_1byte', - 'end2end_test_large_metadata', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair_1byte_max_concurrent_streams_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair_1byte', - 'end2end_test_max_concurrent_streams', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair_1byte_max_message_length_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair_1byte', - 'end2end_test_max_message_length', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair_1byte_metadata_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair_1byte', - 'end2end_test_metadata', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair_1byte_no_op_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair_1byte', - 'end2end_test_no_op', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair_1byte_payload_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair_1byte', - 'end2end_test_payload', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair_1byte_ping_pong_streaming_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair_1byte', - 'end2end_test_ping_pong_streaming', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair_1byte_registered_call_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair_1byte', - 'end2end_test_registered_call', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair_1byte_request_with_flags_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair_1byte', - 'end2end_test_request_with_flags', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair_1byte_request_with_payload_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair_1byte', - 'end2end_test_request_with_payload', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair_1byte_server_finishes_request_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair_1byte', - 'end2end_test_server_finishes_request', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair_1byte_shutdown_finishes_calls_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair_1byte', - 'end2end_test_shutdown_finishes_calls', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair_1byte_shutdown_finishes_tags_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair_1byte', - 'end2end_test_shutdown_finishes_tags', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair_1byte_simple_request_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair_1byte', - 'end2end_test_simple_request', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair_1byte_trailing_metadata_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair_1byte', - 'end2end_test_trailing_metadata', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_ssl_bad_hostname_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_ssl', - 'end2end_test_bad_hostname', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_ssl_binary_metadata_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_ssl', - 'end2end_test_binary_metadata', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_ssl_call_creds_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_ssl', - 'end2end_test_call_creds', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_ssl_cancel_after_accept_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_ssl', - 'end2end_test_cancel_after_accept', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_ssl_cancel_after_client_done_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_ssl', - 'end2end_test_cancel_after_client_done', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_ssl_cancel_after_invoke_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_ssl', - 'end2end_test_cancel_after_invoke', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_ssl_cancel_before_invoke_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_ssl', - 'end2end_test_cancel_before_invoke', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_ssl_cancel_in_a_vacuum_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_ssl', - 'end2end_test_cancel_in_a_vacuum', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_ssl_census_simple_request_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_ssl', - 'end2end_test_census_simple_request', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_ssl_channel_connectivity_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_ssl', - 'end2end_test_channel_connectivity', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_ssl_compressed_payload_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_ssl', - 'end2end_test_compressed_payload', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_ssl_default_host_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_ssl', - 'end2end_test_default_host', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_ssl_disappearing_server_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_ssl', - 'end2end_test_disappearing_server', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_ssl_empty_batch_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_ssl', - 'end2end_test_empty_batch', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_ssl_graceful_server_shutdown_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_ssl', - 'end2end_test_graceful_server_shutdown', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_ssl_high_initial_seqno_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_ssl', - 'end2end_test_high_initial_seqno', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_ssl_invoke_large_request_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_ssl', - 'end2end_test_invoke_large_request', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_ssl_large_metadata_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_ssl', - 'end2end_test_large_metadata', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_ssl_max_concurrent_streams_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_ssl', - 'end2end_test_max_concurrent_streams', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_ssl_max_message_length_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_ssl', - 'end2end_test_max_message_length', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_ssl_metadata_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_ssl', - 'end2end_test_metadata', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_ssl_no_op_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_ssl', - 'end2end_test_no_op', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_ssl_payload_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_ssl', - 'end2end_test_payload', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_ssl_ping_pong_streaming_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_ssl', - 'end2end_test_ping_pong_streaming', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_ssl_registered_call_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_ssl', - 'end2end_test_registered_call', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_ssl_request_with_flags_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_ssl', - 'end2end_test_request_with_flags', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_ssl_request_with_payload_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_ssl', - 'end2end_test_request_with_payload', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_ssl_server_finishes_request_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_ssl', - 'end2end_test_server_finishes_request', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_ssl_shutdown_finishes_calls_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_ssl', - 'end2end_test_shutdown_finishes_calls', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_ssl_shutdown_finishes_tags_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_ssl', - 'end2end_test_shutdown_finishes_tags', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_ssl_simple_delayed_request_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_ssl', - 'end2end_test_simple_delayed_request', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_ssl_simple_request_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_ssl', - 'end2end_test_simple_request', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_ssl_trailing_metadata_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_ssl', - 'end2end_test_trailing_metadata', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_ssl+poll_bad_hostname_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_ssl+poll', - 'end2end_test_bad_hostname', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_ssl+poll_binary_metadata_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_ssl+poll', - 'end2end_test_binary_metadata', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_ssl+poll_call_creds_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_ssl+poll', - 'end2end_test_call_creds', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_ssl+poll_cancel_after_accept_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_ssl+poll', - 'end2end_test_cancel_after_accept', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_ssl+poll_cancel_after_client_done_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_ssl+poll', - 'end2end_test_cancel_after_client_done', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_ssl+poll_cancel_after_invoke_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_ssl+poll', - 'end2end_test_cancel_after_invoke', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_ssl+poll_cancel_before_invoke_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_ssl+poll', - 'end2end_test_cancel_before_invoke', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_ssl+poll_cancel_in_a_vacuum_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_ssl+poll', - 'end2end_test_cancel_in_a_vacuum', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_ssl+poll_census_simple_request_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_ssl+poll', - 'end2end_test_census_simple_request', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_ssl+poll_channel_connectivity_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_ssl+poll', - 'end2end_test_channel_connectivity', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_ssl+poll_compressed_payload_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_ssl+poll', - 'end2end_test_compressed_payload', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_ssl+poll_default_host_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_ssl+poll', - 'end2end_test_default_host', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_ssl+poll_disappearing_server_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_ssl+poll', - 'end2end_test_disappearing_server', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_ssl+poll_empty_batch_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_ssl+poll', - 'end2end_test_empty_batch', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_ssl+poll_graceful_server_shutdown_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_ssl+poll', - 'end2end_test_graceful_server_shutdown', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_ssl+poll_high_initial_seqno_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_ssl+poll', - 'end2end_test_high_initial_seqno', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_ssl+poll_invoke_large_request_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_ssl+poll', - 'end2end_test_invoke_large_request', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_ssl+poll_large_metadata_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_ssl+poll', - 'end2end_test_large_metadata', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_ssl+poll_max_concurrent_streams_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_ssl+poll', - 'end2end_test_max_concurrent_streams', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_ssl+poll_max_message_length_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_ssl+poll', - 'end2end_test_max_message_length', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_ssl+poll_metadata_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_ssl+poll', - 'end2end_test_metadata', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_ssl+poll_no_op_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_ssl+poll', - 'end2end_test_no_op', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_ssl+poll_payload_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_ssl+poll', - 'end2end_test_payload', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_ssl+poll_ping_pong_streaming_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_ssl+poll', - 'end2end_test_ping_pong_streaming', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_ssl+poll_registered_call_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_ssl+poll', - 'end2end_test_registered_call', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_ssl+poll_request_with_flags_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_ssl+poll', - 'end2end_test_request_with_flags', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_ssl+poll_request_with_payload_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_ssl+poll', - 'end2end_test_request_with_payload', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_ssl+poll_server_finishes_request_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_ssl+poll', - 'end2end_test_server_finishes_request', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_ssl+poll_shutdown_finishes_calls_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_ssl+poll', - 'end2end_test_shutdown_finishes_calls', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_ssl+poll_shutdown_finishes_tags_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_ssl+poll', - 'end2end_test_shutdown_finishes_tags', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_ssl+poll_simple_delayed_request_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_ssl+poll', - 'end2end_test_simple_delayed_request', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_ssl+poll_simple_request_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_ssl+poll', - 'end2end_test_simple_request', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_ssl+poll_trailing_metadata_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_ssl+poll', - 'end2end_test_trailing_metadata', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_ssl_proxy_bad_hostname_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_ssl_proxy', - 'end2end_test_bad_hostname', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_ssl_proxy_binary_metadata_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_ssl_proxy', - 'end2end_test_binary_metadata', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_ssl_proxy_call_creds_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_ssl_proxy', - 'end2end_test_call_creds', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_ssl_proxy_cancel_after_accept_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_ssl_proxy', - 'end2end_test_cancel_after_accept', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_ssl_proxy_cancel_after_client_done_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_ssl_proxy', - 'end2end_test_cancel_after_client_done', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_ssl_proxy_cancel_after_invoke_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_ssl_proxy', - 'end2end_test_cancel_after_invoke', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_ssl_proxy_cancel_before_invoke_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_ssl_proxy', - 'end2end_test_cancel_before_invoke', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_ssl_proxy_cancel_in_a_vacuum_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_ssl_proxy', - 'end2end_test_cancel_in_a_vacuum', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_ssl_proxy_census_simple_request_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_ssl_proxy', - 'end2end_test_census_simple_request', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_ssl_proxy_default_host_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_ssl_proxy', - 'end2end_test_default_host', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_ssl_proxy_disappearing_server_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_ssl_proxy', - 'end2end_test_disappearing_server', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_ssl_proxy_empty_batch_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_ssl_proxy', - 'end2end_test_empty_batch', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_ssl_proxy_graceful_server_shutdown_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_ssl_proxy', - 'end2end_test_graceful_server_shutdown', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_ssl_proxy_high_initial_seqno_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_ssl_proxy', - 'end2end_test_high_initial_seqno', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_ssl_proxy_invoke_large_request_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_ssl_proxy', - 'end2end_test_invoke_large_request', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_ssl_proxy_large_metadata_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_ssl_proxy', - 'end2end_test_large_metadata', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_ssl_proxy_max_message_length_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_ssl_proxy', - 'end2end_test_max_message_length', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_ssl_proxy_metadata_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_ssl_proxy', - 'end2end_test_metadata', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_ssl_proxy_no_op_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_ssl_proxy', - 'end2end_test_no_op', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_ssl_proxy_payload_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_ssl_proxy', - 'end2end_test_payload', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_ssl_proxy_ping_pong_streaming_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_ssl_proxy', - 'end2end_test_ping_pong_streaming', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_ssl_proxy_registered_call_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_ssl_proxy', - 'end2end_test_registered_call', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_ssl_proxy_request_with_payload_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_ssl_proxy', - 'end2end_test_request_with_payload', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_ssl_proxy_server_finishes_request_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_ssl_proxy', - 'end2end_test_server_finishes_request', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_ssl_proxy_shutdown_finishes_calls_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_ssl_proxy', - 'end2end_test_shutdown_finishes_calls', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_ssl_proxy_shutdown_finishes_tags_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_ssl_proxy', - 'end2end_test_shutdown_finishes_tags', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_ssl_proxy_simple_delayed_request_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_ssl_proxy', - 'end2end_test_simple_delayed_request', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_ssl_proxy_simple_request_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_ssl_proxy', - 'end2end_test_simple_request', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_ssl_proxy_trailing_metadata_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_ssl_proxy', - 'end2end_test_trailing_metadata', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_uds_bad_hostname_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_uds', - 'end2end_test_bad_hostname', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_uds_binary_metadata_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_uds', - 'end2end_test_binary_metadata', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_uds_call_creds_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_uds', - 'end2end_test_call_creds', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_uds_cancel_after_accept_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_uds', - 'end2end_test_cancel_after_accept', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_uds_cancel_after_client_done_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_uds', - 'end2end_test_cancel_after_client_done', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_uds_cancel_after_invoke_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_uds', - 'end2end_test_cancel_after_invoke', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_uds_cancel_before_invoke_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_uds', - 'end2end_test_cancel_before_invoke', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_uds_cancel_in_a_vacuum_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_uds', - 'end2end_test_cancel_in_a_vacuum', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_uds_census_simple_request_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_uds', - 'end2end_test_census_simple_request', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_uds_channel_connectivity_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_uds', - 'end2end_test_channel_connectivity', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_uds_compressed_payload_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_uds', - 'end2end_test_compressed_payload', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_uds_disappearing_server_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_uds', - 'end2end_test_disappearing_server', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_uds_empty_batch_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_uds', - 'end2end_test_empty_batch', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_uds_graceful_server_shutdown_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_uds', - 'end2end_test_graceful_server_shutdown', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_uds_high_initial_seqno_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_uds', - 'end2end_test_high_initial_seqno', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_uds_invoke_large_request_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_uds', - 'end2end_test_invoke_large_request', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_uds_large_metadata_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_uds', - 'end2end_test_large_metadata', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_uds_max_concurrent_streams_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_uds', - 'end2end_test_max_concurrent_streams', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_uds_max_message_length_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_uds', - 'end2end_test_max_message_length', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_uds_metadata_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_uds', - 'end2end_test_metadata', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_uds_no_op_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_uds', - 'end2end_test_no_op', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_uds_payload_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_uds', - 'end2end_test_payload', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_uds_ping_pong_streaming_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_uds', - 'end2end_test_ping_pong_streaming', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_uds_registered_call_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_uds', - 'end2end_test_registered_call', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_uds_request_with_flags_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_uds', - 'end2end_test_request_with_flags', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_uds_request_with_payload_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_uds', - 'end2end_test_request_with_payload', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_uds_server_finishes_request_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_uds', - 'end2end_test_server_finishes_request', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_uds_shutdown_finishes_calls_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_uds', - 'end2end_test_shutdown_finishes_calls', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_uds_shutdown_finishes_tags_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_uds', - 'end2end_test_shutdown_finishes_tags', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_uds_simple_delayed_request_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_uds', - 'end2end_test_simple_delayed_request', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_uds_simple_request_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_uds', - 'end2end_test_simple_request', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_uds_trailing_metadata_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_uds', - 'end2end_test_trailing_metadata', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_uds+poll_bad_hostname_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_uds+poll', - 'end2end_test_bad_hostname', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_uds+poll_binary_metadata_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_uds+poll', - 'end2end_test_binary_metadata', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_uds+poll_call_creds_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_uds+poll', - 'end2end_test_call_creds', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_uds+poll_cancel_after_accept_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_uds+poll', - 'end2end_test_cancel_after_accept', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_uds+poll_cancel_after_client_done_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_uds+poll', - 'end2end_test_cancel_after_client_done', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_uds+poll_cancel_after_invoke_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_uds+poll', - 'end2end_test_cancel_after_invoke', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_uds+poll_cancel_before_invoke_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_uds+poll', - 'end2end_test_cancel_before_invoke', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_uds+poll_cancel_in_a_vacuum_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_uds+poll', - 'end2end_test_cancel_in_a_vacuum', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_uds+poll_census_simple_request_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_uds+poll', - 'end2end_test_census_simple_request', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_uds+poll_channel_connectivity_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_uds+poll', - 'end2end_test_channel_connectivity', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_uds+poll_compressed_payload_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_uds+poll', - 'end2end_test_compressed_payload', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_uds+poll_disappearing_server_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_uds+poll', - 'end2end_test_disappearing_server', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_uds+poll_empty_batch_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_uds+poll', - 'end2end_test_empty_batch', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_uds+poll_graceful_server_shutdown_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_uds+poll', - 'end2end_test_graceful_server_shutdown', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_uds+poll_high_initial_seqno_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_uds+poll', - 'end2end_test_high_initial_seqno', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_uds+poll_invoke_large_request_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_uds+poll', - 'end2end_test_invoke_large_request', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_uds+poll_large_metadata_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_uds+poll', - 'end2end_test_large_metadata', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_uds+poll_max_concurrent_streams_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_uds+poll', - 'end2end_test_max_concurrent_streams', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_uds+poll_max_message_length_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_uds+poll', - 'end2end_test_max_message_length', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_uds+poll_metadata_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_uds+poll', - 'end2end_test_metadata', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_uds+poll_no_op_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_uds+poll', - 'end2end_test_no_op', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_uds+poll_payload_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_uds+poll', - 'end2end_test_payload', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_uds+poll_ping_pong_streaming_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_uds+poll', - 'end2end_test_ping_pong_streaming', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_uds+poll_registered_call_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_uds+poll', - 'end2end_test_registered_call', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_uds+poll_request_with_flags_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_uds+poll', - 'end2end_test_request_with_flags', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_uds+poll_request_with_payload_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_uds+poll', - 'end2end_test_request_with_payload', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_uds+poll_server_finishes_request_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_uds+poll', - 'end2end_test_server_finishes_request', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_uds+poll_shutdown_finishes_calls_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_uds+poll', - 'end2end_test_shutdown_finishes_calls', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_uds+poll_shutdown_finishes_tags_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_uds+poll', - 'end2end_test_shutdown_finishes_tags', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_uds+poll_simple_delayed_request_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_uds+poll', - 'end2end_test_simple_delayed_request', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_uds+poll_simple_request_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_uds+poll', - 'end2end_test_simple_request', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_uds+poll_trailing_metadata_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_uds+poll', - 'end2end_test_trailing_metadata', - 'end2end_certs', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_compress_bad_hostname_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_compress', - 'end2end_test_bad_hostname', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_compress_binary_metadata_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_compress', - 'end2end_test_binary_metadata', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_compress_cancel_after_accept_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_compress', - 'end2end_test_cancel_after_accept', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_compress_cancel_after_client_done_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_compress', - 'end2end_test_cancel_after_client_done', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_compress_cancel_after_invoke_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_compress', - 'end2end_test_cancel_after_invoke', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_compress_cancel_before_invoke_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_compress', - 'end2end_test_cancel_before_invoke', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_compress_cancel_in_a_vacuum_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_compress', - 'end2end_test_cancel_in_a_vacuum', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_compress_census_simple_request_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_compress', - 'end2end_test_census_simple_request', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_compress_channel_connectivity_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_compress', - 'end2end_test_channel_connectivity', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_compress_compressed_payload_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_compress', - 'end2end_test_compressed_payload', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_compress_default_host_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_compress', - 'end2end_test_default_host', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_compress_disappearing_server_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_compress', - 'end2end_test_disappearing_server', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_compress_empty_batch_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_compress', - 'end2end_test_empty_batch', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_compress_graceful_server_shutdown_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_compress', - 'end2end_test_graceful_server_shutdown', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_compress_high_initial_seqno_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_compress', - 'end2end_test_high_initial_seqno', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_compress_invoke_large_request_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_compress', - 'end2end_test_invoke_large_request', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_compress_large_metadata_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_compress', - 'end2end_test_large_metadata', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_compress_max_concurrent_streams_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_compress', - 'end2end_test_max_concurrent_streams', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_compress_max_message_length_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_compress', - 'end2end_test_max_message_length', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_compress_metadata_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_compress', - 'end2end_test_metadata', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_compress_no_op_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_compress', - 'end2end_test_no_op', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_compress_payload_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_compress', - 'end2end_test_payload', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_compress_ping_pong_streaming_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_compress', - 'end2end_test_ping_pong_streaming', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_compress_registered_call_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_compress', - 'end2end_test_registered_call', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_compress_request_with_flags_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_compress', - 'end2end_test_request_with_flags', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_compress_request_with_payload_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_compress', - 'end2end_test_request_with_payload', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_compress_server_finishes_request_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_compress', - 'end2end_test_server_finishes_request', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_compress_shutdown_finishes_calls_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_compress', - 'end2end_test_shutdown_finishes_calls', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_compress_shutdown_finishes_tags_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_compress', - 'end2end_test_shutdown_finishes_tags', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_compress_simple_delayed_request_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_compress', - 'end2end_test_simple_delayed_request', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_compress_simple_request_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_compress', - 'end2end_test_simple_request', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_compress_trailing_metadata_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_compress', - 'end2end_test_trailing_metadata', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_full_bad_hostname_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_full', - 'end2end_test_bad_hostname', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_full_binary_metadata_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_full', - 'end2end_test_binary_metadata', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_full_cancel_after_accept_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_full', - 'end2end_test_cancel_after_accept', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_full_cancel_after_client_done_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_full', - 'end2end_test_cancel_after_client_done', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_full_cancel_after_invoke_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_full', - 'end2end_test_cancel_after_invoke', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_full_cancel_before_invoke_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_full', - 'end2end_test_cancel_before_invoke', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_full_cancel_in_a_vacuum_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_full', - 'end2end_test_cancel_in_a_vacuum', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_full_census_simple_request_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_full', - 'end2end_test_census_simple_request', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_full_channel_connectivity_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_full', - 'end2end_test_channel_connectivity', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_full_compressed_payload_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_full', - 'end2end_test_compressed_payload', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_full_default_host_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_full', - 'end2end_test_default_host', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_full_disappearing_server_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_full', - 'end2end_test_disappearing_server', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_full_empty_batch_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_full', - 'end2end_test_empty_batch', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_full_graceful_server_shutdown_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_full', - 'end2end_test_graceful_server_shutdown', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_full_high_initial_seqno_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_full', - 'end2end_test_high_initial_seqno', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_full_invoke_large_request_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_full', - 'end2end_test_invoke_large_request', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_full_large_metadata_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_full', - 'end2end_test_large_metadata', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_full_max_concurrent_streams_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_full', - 'end2end_test_max_concurrent_streams', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_full_max_message_length_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_full', - 'end2end_test_max_message_length', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_full_metadata_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_full', - 'end2end_test_metadata', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_full_no_op_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_full', - 'end2end_test_no_op', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_full_payload_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_full', - 'end2end_test_payload', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_full_ping_pong_streaming_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_full', - 'end2end_test_ping_pong_streaming', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_full_registered_call_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_full', - 'end2end_test_registered_call', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_full_request_with_flags_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_full', - 'end2end_test_request_with_flags', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_full_request_with_payload_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_full', - 'end2end_test_request_with_payload', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_full_server_finishes_request_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_full', - 'end2end_test_server_finishes_request', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_full_shutdown_finishes_calls_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_full', - 'end2end_test_shutdown_finishes_calls', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_full_shutdown_finishes_tags_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_full', - 'end2end_test_shutdown_finishes_tags', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_full_simple_delayed_request_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_full', - 'end2end_test_simple_delayed_request', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_full_simple_request_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_full', - 'end2end_test_simple_request', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_full_trailing_metadata_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_full', - 'end2end_test_trailing_metadata', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_full+poll_bad_hostname_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_full+poll', - 'end2end_test_bad_hostname', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_full+poll_binary_metadata_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_full+poll', - 'end2end_test_binary_metadata', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_full+poll_cancel_after_accept_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_full+poll', - 'end2end_test_cancel_after_accept', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_full+poll_cancel_after_client_done_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_full+poll', - 'end2end_test_cancel_after_client_done', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_full+poll_cancel_after_invoke_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_full+poll', - 'end2end_test_cancel_after_invoke', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_full+poll_cancel_before_invoke_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_full+poll', - 'end2end_test_cancel_before_invoke', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_full+poll_cancel_in_a_vacuum_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_full+poll', - 'end2end_test_cancel_in_a_vacuum', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_full+poll_census_simple_request_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_full+poll', - 'end2end_test_census_simple_request', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_full+poll_channel_connectivity_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_full+poll', - 'end2end_test_channel_connectivity', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_full+poll_compressed_payload_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_full+poll', - 'end2end_test_compressed_payload', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_full+poll_default_host_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_full+poll', - 'end2end_test_default_host', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_full+poll_disappearing_server_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_full+poll', - 'end2end_test_disappearing_server', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_full+poll_empty_batch_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_full+poll', - 'end2end_test_empty_batch', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_full+poll_graceful_server_shutdown_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_full+poll', - 'end2end_test_graceful_server_shutdown', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_full+poll_high_initial_seqno_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_full+poll', - 'end2end_test_high_initial_seqno', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_full+poll_invoke_large_request_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_full+poll', - 'end2end_test_invoke_large_request', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_full+poll_large_metadata_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_full+poll', - 'end2end_test_large_metadata', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_full+poll_max_concurrent_streams_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_full+poll', - 'end2end_test_max_concurrent_streams', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_full+poll_max_message_length_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_full+poll', - 'end2end_test_max_message_length', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_full+poll_metadata_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_full+poll', - 'end2end_test_metadata', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_full+poll_no_op_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_full+poll', - 'end2end_test_no_op', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_full+poll_payload_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_full+poll', - 'end2end_test_payload', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_full+poll_ping_pong_streaming_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_full+poll', - 'end2end_test_ping_pong_streaming', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_full+poll_registered_call_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_full+poll', - 'end2end_test_registered_call', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_full+poll_request_with_flags_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_full+poll', - 'end2end_test_request_with_flags', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_full+poll_request_with_payload_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_full+poll', - 'end2end_test_request_with_payload', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_full+poll_server_finishes_request_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_full+poll', - 'end2end_test_server_finishes_request', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_full+poll_shutdown_finishes_calls_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_full+poll', - 'end2end_test_shutdown_finishes_calls', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_full+poll_shutdown_finishes_tags_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_full+poll', - 'end2end_test_shutdown_finishes_tags', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_full+poll_simple_delayed_request_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_full+poll', - 'end2end_test_simple_delayed_request', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_full+poll_simple_request_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_full+poll', - 'end2end_test_simple_request', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_full+poll_trailing_metadata_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_full+poll', - 'end2end_test_trailing_metadata', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_proxy_bad_hostname_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_proxy', - 'end2end_test_bad_hostname', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_proxy_binary_metadata_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_proxy', - 'end2end_test_binary_metadata', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_proxy_cancel_after_accept_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_proxy', - 'end2end_test_cancel_after_accept', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_proxy_cancel_after_client_done_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_proxy', - 'end2end_test_cancel_after_client_done', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_proxy_cancel_after_invoke_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_proxy', - 'end2end_test_cancel_after_invoke', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_proxy_cancel_before_invoke_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_proxy', - 'end2end_test_cancel_before_invoke', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_proxy_cancel_in_a_vacuum_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_proxy', - 'end2end_test_cancel_in_a_vacuum', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_proxy_census_simple_request_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_proxy', - 'end2end_test_census_simple_request', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_proxy_default_host_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_proxy', - 'end2end_test_default_host', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_proxy_disappearing_server_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_proxy', - 'end2end_test_disappearing_server', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_proxy_empty_batch_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_proxy', - 'end2end_test_empty_batch', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_proxy_graceful_server_shutdown_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_proxy', - 'end2end_test_graceful_server_shutdown', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_proxy_high_initial_seqno_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_proxy', - 'end2end_test_high_initial_seqno', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_proxy_invoke_large_request_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_proxy', - 'end2end_test_invoke_large_request', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_proxy_large_metadata_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_proxy', - 'end2end_test_large_metadata', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_proxy_max_message_length_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_proxy', - 'end2end_test_max_message_length', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_proxy_metadata_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_proxy', - 'end2end_test_metadata', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_proxy_no_op_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_proxy', - 'end2end_test_no_op', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_proxy_payload_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_proxy', - 'end2end_test_payload', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_proxy_ping_pong_streaming_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_proxy', - 'end2end_test_ping_pong_streaming', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_proxy_registered_call_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_proxy', - 'end2end_test_registered_call', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_proxy_request_with_payload_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_proxy', - 'end2end_test_request_with_payload', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_proxy_server_finishes_request_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_proxy', - 'end2end_test_server_finishes_request', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_proxy_shutdown_finishes_calls_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_proxy', - 'end2end_test_shutdown_finishes_calls', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_proxy_shutdown_finishes_tags_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_proxy', - 'end2end_test_shutdown_finishes_tags', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_proxy_simple_delayed_request_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_proxy', - 'end2end_test_simple_delayed_request', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_proxy_simple_request_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_proxy', - 'end2end_test_simple_request', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_proxy_trailing_metadata_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_proxy', - 'end2end_test_trailing_metadata', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair_bad_hostname_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair', - 'end2end_test_bad_hostname', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair_binary_metadata_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair', - 'end2end_test_binary_metadata', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair_cancel_after_accept_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair', - 'end2end_test_cancel_after_accept', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair_cancel_after_client_done_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair', - 'end2end_test_cancel_after_client_done', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair_cancel_after_invoke_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair', - 'end2end_test_cancel_after_invoke', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair_cancel_before_invoke_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair', - 'end2end_test_cancel_before_invoke', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair_cancel_in_a_vacuum_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair', - 'end2end_test_cancel_in_a_vacuum', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair_census_simple_request_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair', - 'end2end_test_census_simple_request', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair_compressed_payload_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair', - 'end2end_test_compressed_payload', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair_empty_batch_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair', - 'end2end_test_empty_batch', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair_graceful_server_shutdown_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair', - 'end2end_test_graceful_server_shutdown', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair_high_initial_seqno_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair', - 'end2end_test_high_initial_seqno', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair_invoke_large_request_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair', - 'end2end_test_invoke_large_request', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair_large_metadata_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair', - 'end2end_test_large_metadata', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair_max_concurrent_streams_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair', - 'end2end_test_max_concurrent_streams', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair_max_message_length_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair', - 'end2end_test_max_message_length', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair_metadata_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair', - 'end2end_test_metadata', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair_no_op_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair', - 'end2end_test_no_op', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair_payload_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair', - 'end2end_test_payload', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair_ping_pong_streaming_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair', - 'end2end_test_ping_pong_streaming', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair_registered_call_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair', - 'end2end_test_registered_call', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair_request_with_flags_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair', - 'end2end_test_request_with_flags', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair_request_with_payload_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair', - 'end2end_test_request_with_payload', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair_server_finishes_request_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair', - 'end2end_test_server_finishes_request', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair_shutdown_finishes_calls_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair', - 'end2end_test_shutdown_finishes_calls', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair_shutdown_finishes_tags_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair', - 'end2end_test_shutdown_finishes_tags', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair_simple_request_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair', - 'end2end_test_simple_request', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair_trailing_metadata_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair', - 'end2end_test_trailing_metadata', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair+trace_bad_hostname_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair+trace', - 'end2end_test_bad_hostname', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair+trace_binary_metadata_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair+trace', - 'end2end_test_binary_metadata', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair+trace_cancel_after_accept_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair+trace', - 'end2end_test_cancel_after_accept', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair+trace_cancel_after_client_done_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair+trace', - 'end2end_test_cancel_after_client_done', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair+trace_cancel_after_invoke_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair+trace', - 'end2end_test_cancel_after_invoke', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair+trace_cancel_before_invoke_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair+trace', - 'end2end_test_cancel_before_invoke', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair+trace_cancel_in_a_vacuum_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair+trace', - 'end2end_test_cancel_in_a_vacuum', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair+trace_census_simple_request_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair+trace', - 'end2end_test_census_simple_request', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair+trace_compressed_payload_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair+trace', - 'end2end_test_compressed_payload', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair+trace_empty_batch_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair+trace', - 'end2end_test_empty_batch', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair+trace_graceful_server_shutdown_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair+trace', - 'end2end_test_graceful_server_shutdown', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair+trace_high_initial_seqno_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair+trace', - 'end2end_test_high_initial_seqno', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair+trace_invoke_large_request_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair+trace', - 'end2end_test_invoke_large_request', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair+trace_large_metadata_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair+trace', - 'end2end_test_large_metadata', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair+trace_max_concurrent_streams_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair+trace', - 'end2end_test_max_concurrent_streams', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair+trace_max_message_length_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair+trace', - 'end2end_test_max_message_length', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair+trace_metadata_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair+trace', - 'end2end_test_metadata', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair+trace_no_op_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair+trace', - 'end2end_test_no_op', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair+trace_payload_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair+trace', - 'end2end_test_payload', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair+trace_ping_pong_streaming_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair+trace', - 'end2end_test_ping_pong_streaming', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair+trace_registered_call_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair+trace', - 'end2end_test_registered_call', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair+trace_request_with_flags_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair+trace', - 'end2end_test_request_with_flags', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair+trace_request_with_payload_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair+trace', - 'end2end_test_request_with_payload', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair+trace_server_finishes_request_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair+trace', - 'end2end_test_server_finishes_request', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair+trace_shutdown_finishes_calls_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair+trace', - 'end2end_test_shutdown_finishes_calls', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair+trace_shutdown_finishes_tags_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair+trace', - 'end2end_test_shutdown_finishes_tags', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair+trace_simple_request_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair+trace', - 'end2end_test_simple_request', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair+trace_trailing_metadata_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair+trace', - 'end2end_test_trailing_metadata', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair_1byte_bad_hostname_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair_1byte', - 'end2end_test_bad_hostname', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair_1byte_binary_metadata_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair_1byte', - 'end2end_test_binary_metadata', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair_1byte_cancel_after_accept_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair_1byte', - 'end2end_test_cancel_after_accept', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair_1byte_cancel_after_client_done_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair_1byte', - 'end2end_test_cancel_after_client_done', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair_1byte_cancel_after_invoke_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair_1byte', - 'end2end_test_cancel_after_invoke', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair_1byte_cancel_before_invoke_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair_1byte', - 'end2end_test_cancel_before_invoke', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair_1byte_cancel_in_a_vacuum_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair_1byte', - 'end2end_test_cancel_in_a_vacuum', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair_1byte_census_simple_request_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair_1byte', - 'end2end_test_census_simple_request', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair_1byte_compressed_payload_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair_1byte', - 'end2end_test_compressed_payload', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair_1byte_empty_batch_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair_1byte', - 'end2end_test_empty_batch', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair_1byte_graceful_server_shutdown_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair_1byte', - 'end2end_test_graceful_server_shutdown', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair_1byte_high_initial_seqno_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair_1byte', - 'end2end_test_high_initial_seqno', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair_1byte_invoke_large_request_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair_1byte', - 'end2end_test_invoke_large_request', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair_1byte_large_metadata_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair_1byte', - 'end2end_test_large_metadata', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair_1byte_max_concurrent_streams_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair_1byte', - 'end2end_test_max_concurrent_streams', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair_1byte_max_message_length_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair_1byte', - 'end2end_test_max_message_length', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair_1byte_metadata_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair_1byte', - 'end2end_test_metadata', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair_1byte_no_op_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair_1byte', - 'end2end_test_no_op', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair_1byte_payload_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair_1byte', - 'end2end_test_payload', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair_1byte_ping_pong_streaming_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair_1byte', - 'end2end_test_ping_pong_streaming', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair_1byte_registered_call_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair_1byte', - 'end2end_test_registered_call', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair_1byte_request_with_flags_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair_1byte', - 'end2end_test_request_with_flags', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair_1byte_request_with_payload_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair_1byte', - 'end2end_test_request_with_payload', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair_1byte_server_finishes_request_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair_1byte', - 'end2end_test_server_finishes_request', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair_1byte_shutdown_finishes_calls_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair_1byte', - 'end2end_test_shutdown_finishes_calls', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair_1byte_shutdown_finishes_tags_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair_1byte', - 'end2end_test_shutdown_finishes_tags', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair_1byte_simple_request_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair_1byte', - 'end2end_test_simple_request', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_sockpair_1byte_trailing_metadata_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_sockpair_1byte', - 'end2end_test_trailing_metadata', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_uds_bad_hostname_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_uds', - 'end2end_test_bad_hostname', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_uds_binary_metadata_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_uds', - 'end2end_test_binary_metadata', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_uds_cancel_after_accept_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_uds', - 'end2end_test_cancel_after_accept', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_uds_cancel_after_client_done_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_uds', - 'end2end_test_cancel_after_client_done', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_uds_cancel_after_invoke_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_uds', - 'end2end_test_cancel_after_invoke', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_uds_cancel_before_invoke_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_uds', - 'end2end_test_cancel_before_invoke', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_uds_cancel_in_a_vacuum_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_uds', - 'end2end_test_cancel_in_a_vacuum', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_uds_census_simple_request_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_uds', - 'end2end_test_census_simple_request', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_uds_channel_connectivity_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_uds', - 'end2end_test_channel_connectivity', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_uds_compressed_payload_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_uds', - 'end2end_test_compressed_payload', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_uds_disappearing_server_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_uds', - 'end2end_test_disappearing_server', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_uds_empty_batch_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_uds', - 'end2end_test_empty_batch', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_uds_graceful_server_shutdown_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_uds', - 'end2end_test_graceful_server_shutdown', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_uds_high_initial_seqno_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_uds', - 'end2end_test_high_initial_seqno', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_uds_invoke_large_request_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_uds', - 'end2end_test_invoke_large_request', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_uds_large_metadata_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_uds', - 'end2end_test_large_metadata', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_uds_max_concurrent_streams_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_uds', - 'end2end_test_max_concurrent_streams', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_uds_max_message_length_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_uds', - 'end2end_test_max_message_length', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_uds_metadata_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_uds', - 'end2end_test_metadata', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_uds_no_op_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_uds', - 'end2end_test_no_op', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_uds_payload_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_uds', - 'end2end_test_payload', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_uds_ping_pong_streaming_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_uds', - 'end2end_test_ping_pong_streaming', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_uds_registered_call_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_uds', - 'end2end_test_registered_call', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_uds_request_with_flags_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_uds', - 'end2end_test_request_with_flags', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_uds_request_with_payload_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_uds', - 'end2end_test_request_with_payload', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_uds_server_finishes_request_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_uds', - 'end2end_test_server_finishes_request', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_uds_shutdown_finishes_calls_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_uds', - 'end2end_test_shutdown_finishes_calls', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_uds_shutdown_finishes_tags_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_uds', - 'end2end_test_shutdown_finishes_tags', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_uds_simple_delayed_request_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_uds', - 'end2end_test_simple_delayed_request', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_uds_simple_request_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_uds', - 'end2end_test_simple_request', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_uds_trailing_metadata_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_uds', - 'end2end_test_trailing_metadata', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_uds+poll_bad_hostname_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_uds+poll', - 'end2end_test_bad_hostname', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_uds+poll_binary_metadata_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_uds+poll', - 'end2end_test_binary_metadata', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_uds+poll_cancel_after_accept_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_uds+poll', - 'end2end_test_cancel_after_accept', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_uds+poll_cancel_after_client_done_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_uds+poll', - 'end2end_test_cancel_after_client_done', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_uds+poll_cancel_after_invoke_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_uds+poll', - 'end2end_test_cancel_after_invoke', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_uds+poll_cancel_before_invoke_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_uds+poll', - 'end2end_test_cancel_before_invoke', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_uds+poll_cancel_in_a_vacuum_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_uds+poll', - 'end2end_test_cancel_in_a_vacuum', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_uds+poll_census_simple_request_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_uds+poll', - 'end2end_test_census_simple_request', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_uds+poll_channel_connectivity_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_uds+poll', - 'end2end_test_channel_connectivity', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_uds+poll_compressed_payload_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_uds+poll', - 'end2end_test_compressed_payload', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_uds+poll_disappearing_server_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_uds+poll', - 'end2end_test_disappearing_server', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_uds+poll_empty_batch_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_uds+poll', - 'end2end_test_empty_batch', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_uds+poll_graceful_server_shutdown_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_uds+poll', - 'end2end_test_graceful_server_shutdown', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_uds+poll_high_initial_seqno_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_uds+poll', - 'end2end_test_high_initial_seqno', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_uds+poll_invoke_large_request_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_uds+poll', - 'end2end_test_invoke_large_request', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_uds+poll_large_metadata_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_uds+poll', - 'end2end_test_large_metadata', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_uds+poll_max_concurrent_streams_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_uds+poll', - 'end2end_test_max_concurrent_streams', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_uds+poll_max_message_length_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_uds+poll', - 'end2end_test_max_message_length', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_uds+poll_metadata_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_uds+poll', - 'end2end_test_metadata', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_uds+poll_no_op_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_uds+poll', - 'end2end_test_no_op', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_uds+poll_payload_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_uds+poll', - 'end2end_test_payload', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_uds+poll_ping_pong_streaming_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_uds+poll', - 'end2end_test_ping_pong_streaming', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_uds+poll_registered_call_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_uds+poll', - 'end2end_test_registered_call', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_uds+poll_request_with_flags_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_uds+poll', - 'end2end_test_request_with_flags', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_uds+poll_request_with_payload_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_uds+poll', - 'end2end_test_request_with_payload', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_uds+poll_server_finishes_request_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_uds+poll', - 'end2end_test_server_finishes_request', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_uds+poll_shutdown_finishes_calls_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_uds+poll', - 'end2end_test_shutdown_finishes_calls', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_uds+poll_shutdown_finishes_tags_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_uds+poll', - 'end2end_test_shutdown_finishes_tags', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_uds+poll_simple_delayed_request_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_uds+poll', - 'end2end_test_simple_delayed_request', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_uds+poll_simple_request_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_uds+poll', - 'end2end_test_simple_request', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'h2_uds+poll_trailing_metadata_nosec_test', - 'type': 'executable', - 'dependencies': [ - 'end2end_fixture_h2_uds+poll', - 'end2end_test_trailing_metadata', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - ] - }, - { - 'target_name': 'connection_prefix_bad_client_test', - 'type': 'executable', - 'dependencies': [ - 'bad_client_test', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - 'test/core/bad_client/tests/connection_prefix.c', - ] - }, - { - 'target_name': 'initial_settings_frame_bad_client_test', - 'type': 'executable', - 'dependencies': [ - 'bad_client_test', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr', - ], - 'sources': [ - 'test/core/bad_client/tests/initial_settings_frame.c', - ] - }, ] } diff --git a/templates/grpc.gyp.template b/templates/grpc.gyp.template index cd5446d553c..b9cee33fe0b 100644 --- a/templates/grpc.gyp.template +++ b/templates/grpc.gyp.template @@ -91,7 +91,7 @@ 'targets': [ % for lib in libs: # TODO: Add C++ targets - % if lib.language == 'c': + % if lib.name == 'gpr' or lib.name == 'grpc': { 'target_name': '${lib.name}', 'product_prefix': 'lib', @@ -109,23 +109,5 @@ }, % endif % endfor - % for tgt in targets: - % if tgt.language == 'c': - { - 'target_name': '${tgt.name}', - 'type': 'executable', - 'dependencies': [ - % for dep in getattr(tgt, 'deps', []): - '${dep}', - % endfor - ], - 'sources': [ - % for source in tgt.src: - '${source}', - % endfor - ] - }, - % endif - % endfor ] } diff --git a/tools/run_tests/run_tests.py b/tools/run_tests/run_tests.py index 38c06764b9b..67561eb558f 100755 --- a/tools/run_tests/run_tests.py +++ b/tools/run_tests/run_tests.py @@ -181,45 +181,6 @@ class CLanguage(object): def __str__(self): return self.make_target - -def gyp_test_paths(travis, config=None): - binaries = get_c_tests(travis, 'c') - out = [] - for target in binaries: - if config is not None and config.build_config in target['exclude_configs']: - continue - binary = 'out/Debug/%s' % target['name'] - out.append(binary) - return sorted(out) - - -class GYPCLanguage(object): - - def test_specs(self, config, travis): - return [config.job_spec([binary], [binary]) - for binary in gyp_test_paths(travis, config)] - - def pre_build_steps(self): - return [['gyp', '--depth=.', '--suffix=-gyp', 'grpc.gyp']] - - def make_targets(self): - # HACK(ctiller): force fling_client and fling_server to be built, as fling_test - # needs these - return gyp_test_paths(False) + ['fling_client', 'fling_server'] - - def build_steps(self): - return [] - - def makefile_name(self): - return 'Makefile-gyp' - - def supports_multi_config(self): - return False - - def __str__(self): - return 'gyp' - - class NodeLanguage(object): def test_specs(self, config, travis): @@ -230,7 +191,7 @@ class NodeLanguage(object): return [] def make_targets(self): - return ['static_c', 'shared_c'] + return [] def build_steps(self): return [['tools/run_tests/build_node.sh']] @@ -483,7 +444,6 @@ _DEFAULT = ['opt'] _LANGUAGES = { 'c++': CLanguage('cxx', 'c++'), 'c': CLanguage('c', 'c'), - 'gyp': GYPCLanguage(), 'node': NodeLanguage(), 'php': PhpLanguage(), 'python': PythonLanguage(), From fbc1139aa061719d08885535e4725d0a5ee1f8ff Mon Sep 17 00:00:00 2001 From: Scott84 Date: Fri, 2 Oct 2015 09:01:28 -0700 Subject: [PATCH 089/169] Update GRXWriter.m Corrected compiler warning for effectively pure virtual ObjC methods. --- src/objective-c/RxLibrary/GRXWriter.m | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/objective-c/RxLibrary/GRXWriter.m b/src/objective-c/RxLibrary/GRXWriter.m index 019fcbd7858..fee33f55563 100644 --- a/src/objective-c/RxLibrary/GRXWriter.m +++ b/src/objective-c/RxLibrary/GRXWriter.m @@ -35,4 +35,14 @@ @implementation GRXWriter +- (void)startWithWriteable:(id)writeable { + NSAssert(NO, @"Missing base implementation for %@", NSStringFromSelector(_cmd)); + [self doesNotRecognizeSelector:_cmd]; +} + +- (void)finishWithError:(NSError *)errorOrNil { + NSAssert(NO, @"Missing base implementation for %@", NSStringFromSelector(_cmd)); + [self doesNotRecognizeSelector:_cmd]; +} + @end From 86ef17ada9a11966ea307c720bfa06e63ce09184 Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Fri, 2 Oct 2015 10:23:20 -0700 Subject: [PATCH 090/169] Prevented composing insecure credentials --- src/node/ext/channel_credentials.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/node/ext/channel_credentials.cc b/src/node/ext/channel_credentials.cc index 07763bd301d..3d47ff293df 100644 --- a/src/node/ext/channel_credentials.cc +++ b/src/node/ext/channel_credentials.cc @@ -181,6 +181,10 @@ NAN_METHOD(ChannelCredentials::Compose) { } ChannelCredentials *self = ObjectWrap::Unwrap( info.This()); + if (self->wrapped_credentials == NULL) { + return Nan::ThrowTypeError( + "Cannot compose insecure credential"); + } CallCredentials *other = ObjectWrap::Unwrap( Nan::To(info[0]).ToLocalChecked()); grpc_credentials *creds = grpc_composite_credentials_create( From 759f59a18354beefa75ffa1f31172121bbf255f2 Mon Sep 17 00:00:00 2001 From: yang-g Date: Fri, 2 Oct 2015 10:38:22 -0700 Subject: [PATCH 091/169] handle closed transport at the end of a read --- src/core/transport/chttp2_transport.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/transport/chttp2_transport.c b/src/core/transport/chttp2_transport.c index 0202d53abdb..58d5bdc7850 100644 --- a/src/core/transport/chttp2_transport.c +++ b/src/core/transport/chttp2_transport.c @@ -1136,7 +1136,7 @@ static void recv_data(grpc_exec_ctx *exec_ctx, void *tp, int success) { grpc_chttp2_publish_reads(exec_ctx, &t->global, &t->parsing); t->parsing_active = 0; } - if (!success || i != t->read_buffer.count) { + if (!success || i != t->read_buffer.count || t->closed) { drop_connection(exec_ctx, t); read_error_locked(exec_ctx, t); } else if (!t->closed) { From 91ad018c0026dc231e73ede1db17ef5e329d453c Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Thu, 1 Oct 2015 09:22:03 -0700 Subject: [PATCH 092/169] Build and run per-language containers for interop tests --- .../build_docker_and_run_interop_tests.sh | 111 ------ tools/jenkins/build_interop_image.sh | 93 +++++ tools/jenkins/grpc_interop_csharp/Dockerfile | 92 +++++ .../grpc_interop_csharp/build_interop.sh | 44 +++ tools/jenkins/grpc_interop_cxx/Dockerfile | 75 ++++ .../jenkins/grpc_interop_cxx/build_interop.sh | 42 +++ tools/jenkins/grpc_interop_java/Dockerfile | 58 ++++ .../build_interop.sh} | 12 +- tools/jenkins/grpc_interop_node/Dockerfile | 79 +++++ .../build_interop.sh} | 24 +- tools/jenkins/grpc_interop_php/Dockerfile | 112 ++++++ .../build_interop.sh} | 40 +-- tools/jenkins/grpc_interop_ruby/Dockerfile | 87 +++++ .../grpc_interop_ruby/build_interop.sh | 43 +++ tools/run_tests/dockerjob.py | 112 ++++++ tools/run_tests/jobset.py | 11 +- tools/run_tests/run_interop_tests.py | 326 +++++++++++++----- 17 files changed, 1115 insertions(+), 246 deletions(-) delete mode 100755 tools/jenkins/build_docker_and_run_interop_tests.sh create mode 100755 tools/jenkins/build_interop_image.sh create mode 100644 tools/jenkins/grpc_interop_csharp/Dockerfile create mode 100755 tools/jenkins/grpc_interop_csharp/build_interop.sh create mode 100644 tools/jenkins/grpc_interop_cxx/Dockerfile create mode 100755 tools/jenkins/grpc_interop_cxx/build_interop.sh create mode 100644 tools/jenkins/grpc_interop_java/Dockerfile rename tools/jenkins/{docker_run_interop_tests.sh => grpc_interop_java/build_interop.sh} (85%) create mode 100644 tools/jenkins/grpc_interop_node/Dockerfile rename tools/jenkins/{docker_run_interop_servers.sh => grpc_interop_node/build_interop.sh} (65%) create mode 100644 tools/jenkins/grpc_interop_php/Dockerfile rename tools/jenkins/{docker_prepare_interop_tests.sh => grpc_interop_php/build_interop.sh} (67%) create mode 100644 tools/jenkins/grpc_interop_ruby/Dockerfile create mode 100755 tools/jenkins/grpc_interop_ruby/build_interop.sh create mode 100755 tools/run_tests/dockerjob.py diff --git a/tools/jenkins/build_docker_and_run_interop_tests.sh b/tools/jenkins/build_docker_and_run_interop_tests.sh deleted file mode 100755 index d2d56d947bf..00000000000 --- a/tools/jenkins/build_docker_and_run_interop_tests.sh +++ /dev/null @@ -1,111 +0,0 @@ -#!/bin/bash -# Copyright 2015, Google Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# -# This script is invoked by run_interop_tests.py to accommodate -# "interop tests under docker" scenario. You should never need to call this -# script on your own. - -set -ex - -cd `dirname $0`/../.. -git_root=`pwd` -cd - - -mkdir -p /tmp/ccache - -# Use image name based on Dockerfile checksum -DOCKER_IMAGE_NAME=grpc_jenkins_slave${docker_suffix}_`sha1sum tools/jenkins/grpc_jenkins_slave/Dockerfile | cut -f1 -d\ ` - -# Make sure docker image has been built. Should be instantaneous if so. -docker build -t $DOCKER_IMAGE_NAME tools/jenkins/grpc_jenkins_slave$docker_suffix - -# Create a local branch so the child Docker script won't complain -git branch -f jenkins-docker - -# Make sure the CID files are gone. -rm -f prepare.cid server.cid client.cid - -# Prepare image for interop tests -docker run \ - -e CCACHE_DIR=/tmp/ccache \ - -i $TTY_FLAG \ - -v "$git_root:/var/local/jenkins/grpc" \ - -v /tmp/ccache:/tmp/ccache \ - --cidfile=prepare.cid \ - $DOCKER_IMAGE_NAME \ - bash -l /var/local/jenkins/grpc/tools/jenkins/docker_prepare_interop_tests.sh || DOCKER_FAILED="true" - -PREPARE_CID=`cat prepare.cid` - -# Create image from the container, we will spawn one docker for clients -# and one for servers. -INTEROP_IMAGE=interop_`uuidgen` -docker commit $PREPARE_CID $INTEROP_IMAGE -# remove container, possibly killing it first -docker rm -f $PREPARE_CID || true -echo "Successfully built image $INTEROP_IMAGE" - -# run interop servers under docker in the background -docker run \ - -d -i \ - $SERVERS_DOCKER_EXTRA_ARGS \ - --cidfile=server.cid \ - $INTEROP_IMAGE bash -l /var/local/git/grpc/tools/jenkins/docker_run_interop_servers.sh - -SERVER_CID=`cat server.cid` - -SERVER_PORTS="" -for tuple in $SERVER_PORT_TUPLES -do - # lookup under which port docker exposes given internal port - exposed_port=`docker port $SERVER_CID ${tuple#*:} | awk -F ":" '{print $NF}'` - - # override the port for corresponding cloud_to_cloud server - SERVER_PORTS+=" --override_server ${tuple%:*}=localhost:$exposed_port" - echo "${tuple%:*} server is exposed under port $exposed_port" -done - -# run interop clients -docker run \ - -e "RUN_TESTS_COMMAND=$RUN_TESTS_COMMAND $SERVER_PORTS" \ - -w /var/local/git/grpc \ - -i $TTY_FLAG \ - --net=host \ - --cidfile=client.cid \ - $INTEROP_IMAGE bash -l /var/local/git/grpc/tools/jenkins/docker_run_interop_tests.sh || DOCKER_FAILED="true" - -CLIENT_CID=`cat client.cid` - -echo "killing and removing server container $SERVER_CID" -docker rm -f $SERVER_CID || true - -docker cp $CLIENT_CID:/var/local/git/grpc/report.xml $git_root -docker rm -f $CLIENT_CID || true -docker rmi -f $DOCKER_IMAGE_NAME || true diff --git a/tools/jenkins/build_interop_image.sh b/tools/jenkins/build_interop_image.sh new file mode 100755 index 00000000000..b5958588f2b --- /dev/null +++ b/tools/jenkins/build_interop_image.sh @@ -0,0 +1,93 @@ +#!/bin/bash +# Copyright 2015, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# +# This script is invoked by run_interop_tests.py to build the docker image +# for interop testing. You should never need to call this script on your own. + +set -x + +cd `dirname $0`/../.. +GRPC_ROOT=`pwd` +MOUNT_ARGS="-v $GRPC_ROOT:/var/local/jenkins/grpc" + +GRPC_JAVA_ROOT=`cd ../grpc-java && pwd` +if [ "$GRPC_JAVA_ROOT" != "" ] +then + MOUNT_ARGS+=" -v $GRPC_JAVA_ROOT:/var/local/jenkins/grpc-java" +else + echo "WARNING: grpc-java not found, it won't be mounted to the docker container." +fi + +GRPC_GO_ROOT=`cd ../grpc-go && pwd` +if [ "$GRPC_GO_ROOT" != "" ] +then + MOUNT_ARGS+=" -v $GRPC_GO_ROOT:/var/local/jenkins/grpc-go" +else + echo "WARNING: grpc-go not found, it won't be mounted to the docker container." +fi + +mkdir -p /tmp/ccache + +# Params: +# INTEROP_IMAGE - name of tag of the final interop image +# BASE_NAME - base name used to locate the base Dockerfile and build script +# TTY_FLAG - optional -t flag to make docker allocate tty. + +# Use image name based on Dockerfile checksum +BASE_IMAGE=${BASE_NAME}_base:`sha1sum tools/jenkins/$BASE_NAME/Dockerfile | cut -f1 -d\ ` + +# Make sure base docker image has been built. Should be instantaneous if so. +docker build -t $BASE_IMAGE --force-rm=true tools/jenkins/$BASE_NAME || exit $? + +# Create a local branch so the child Docker script won't complain +git branch -f jenkins-docker + +CIDFILE=`mktemp -u --suffix=.cid` + +# Prepare image for interop tests, commit it on success. +(docker run \ + -e CCACHE_DIR=/tmp/ccache \ + -i $TTY_FLAG \ + $MOUNT_ARGS \ + -v /tmp/ccache:/tmp/ccache \ + --cidfile=$CIDFILE \ + $BASE_IMAGE \ + bash -l /var/local/jenkins/grpc/tools/jenkins/$BASE_NAME/build_interop.sh \ + && docker commit `cat $CIDFILE` $INTEROP_IMAGE \ + && echo "Successfully built image $INTEROP_IMAGE") +EXITCODE=$? + +# remove intermediate container, possibly killing it first +docker rm -f `cat $CIDFILE` + +# remove the cidfile +rm -rf `cat $CIDFILE` + +exit $EXITCODE diff --git a/tools/jenkins/grpc_interop_csharp/Dockerfile b/tools/jenkins/grpc_interop_csharp/Dockerfile new file mode 100644 index 00000000000..3789cd32038 --- /dev/null +++ b/tools/jenkins/grpc_interop_csharp/Dockerfile @@ -0,0 +1,92 @@ +# Copyright 2015, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +# A work-in-progress Dockerfile that allows running gRPC test suites +# inside a docker container. + +FROM debian:jessie + +# Install Git. +RUN apt-get update && apt-get install -y \ + autoconf \ + autotools-dev \ + build-essential \ + bzip2 \ + ccache \ + curl \ + gcc \ + gcc-multilib \ + git \ + gyp \ + libc6 \ + libc6-dbg \ + libc6-dev \ + libgtest-dev \ + libtool \ + make \ + strace \ + python-dev \ + python-setuptools \ + python-yaml \ + telnet \ + unzip \ + wget \ + zip && apt-get clean + +# Prepare ccache +RUN ln -s /usr/bin/ccache /usr/local/bin/gcc +RUN ln -s /usr/bin/ccache /usr/local/bin/g++ +RUN ln -s /usr/bin/ccache /usr/local/bin/cc +RUN ln -s /usr/bin/ccache /usr/local/bin/c++ +RUN ln -s /usr/bin/ccache /usr/local/bin/clang +RUN ln -s /usr/bin/ccache /usr/local/bin/clang++ + +################# +# C# dependencies + +# Update to a newer version of mono +RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF +RUN echo "deb http://download.mono-project.com/repo/debian wheezy main" | tee /etc/apt/sources.list.d/mono-xamarin.list +RUN echo "deb http://download.mono-project.com/repo/debian wheezy-apache24-compat main" | tee -a /etc/apt/sources.list.d/mono-xamarin.list +RUN echo "deb http://download.mono-project.com/repo/debian wheezy-libjpeg62-compat main" | tee -a /etc/apt/sources.list.d/mono-xamarin.list +RUN echo "deb http://download.mono-project.com/repo/debian wheezy-libtiff-compat main" | tee -a /etc/apt/sources.list.d/mono-xamarin.list + +# Install dependencies +RUN apt-get update && apt-get -y dist-upgrade && apt-get install -y \ + mono-devel \ + nunit \ + nunit-console \ + monodevelop + +# Download NuGet +RUN cd /var/local && wget www.nuget.org/NuGet.exe +ENV NUGET mono /var/local/NuGet.exe + +# Define the default command. +CMD ["bash"] diff --git a/tools/jenkins/grpc_interop_csharp/build_interop.sh b/tools/jenkins/grpc_interop_csharp/build_interop.sh new file mode 100755 index 00000000000..e91cbed81ea --- /dev/null +++ b/tools/jenkins/grpc_interop_csharp/build_interop.sh @@ -0,0 +1,44 @@ +#!/bin/bash +# Copyright 2015, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# +# Builds C# interop server and client in a base image. +set -e + +mkdir -p /var/local/git +git clone --recursive /var/local/jenkins/grpc /var/local/git/grpc + +cd /var/local/git/grpc + +make install-certs + +# build C# interop client & server +make install_grpc_csharp_ext +(cd src/csharp && mono /var/local/NuGet.exe restore Grpc.sln) +(cd src/csharp && xbuild Grpc.sln) diff --git a/tools/jenkins/grpc_interop_cxx/Dockerfile b/tools/jenkins/grpc_interop_cxx/Dockerfile new file mode 100644 index 00000000000..1fa19075330 --- /dev/null +++ b/tools/jenkins/grpc_interop_cxx/Dockerfile @@ -0,0 +1,75 @@ +# Copyright 2015, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +# A work-in-progress Dockerfile that allows running gRPC test suites +# inside a docker container. + +FROM debian:jessie + +# Install Git. +RUN apt-get update && apt-get install -y \ + autoconf \ + autotools-dev \ + build-essential \ + bzip2 \ + ccache \ + curl \ + gcc \ + gcc-multilib \ + git \ + gyp \ + libc6 \ + libc6-dbg \ + libc6-dev \ + libgtest-dev \ + libtool \ + make \ + strace \ + python-dev \ + python-setuptools \ + python-yaml \ + telnet \ + unzip \ + wget \ + zip && apt-get clean + +# Prepare ccache +RUN ln -s /usr/bin/ccache /usr/local/bin/gcc +RUN ln -s /usr/bin/ccache /usr/local/bin/g++ +RUN ln -s /usr/bin/ccache /usr/local/bin/cc +RUN ln -s /usr/bin/ccache /usr/local/bin/c++ +RUN ln -s /usr/bin/ccache /usr/local/bin/clang +RUN ln -s /usr/bin/ccache /usr/local/bin/clang++ + +################## +# C++ dependencies +RUN apt-get update && apt-get -y install libgflags-dev libgtest-dev libc++-dev clang + +# Define the default command. +CMD ["bash"] diff --git a/tools/jenkins/grpc_interop_cxx/build_interop.sh b/tools/jenkins/grpc_interop_cxx/build_interop.sh new file mode 100755 index 00000000000..4163e11ecc7 --- /dev/null +++ b/tools/jenkins/grpc_interop_cxx/build_interop.sh @@ -0,0 +1,42 @@ +#!/bin/bash +# Copyright 2015, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# +# Builds C++ interop server and client in a base image. +set -e + +mkdir -p /var/local/git +git clone --recursive /var/local/jenkins/grpc /var/local/git/grpc + +cd /var/local/git/grpc + +make install-certs + +# build C++ interop client & server +make interop_client interop_server diff --git a/tools/jenkins/grpc_interop_java/Dockerfile b/tools/jenkins/grpc_interop_java/Dockerfile new file mode 100644 index 00000000000..1ec24a95e38 --- /dev/null +++ b/tools/jenkins/grpc_interop_java/Dockerfile @@ -0,0 +1,58 @@ +# Copyright 2015, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +FROM debian:jessie + +# Install JDK 8 and Git +# +# TODO(temiola): simplify this if/when a simpler process is available. +# +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 \ + 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 + +# Trigger download of as many Gradle artifacts as possible. +RUN git clone --recursive --depth 1 https://github.com/grpc/grpc-java.git && \ + cd grpc-java && \ + ./gradlew build -PskipCodegen=true && \ + rm -r "$(pwd)" + +# Define the default command. +CMD ["bash"] diff --git a/tools/jenkins/docker_run_interop_tests.sh b/tools/jenkins/grpc_interop_java/build_interop.sh similarity index 85% rename from tools/jenkins/docker_run_interop_tests.sh rename to tools/jenkins/grpc_interop_java/build_interop.sh index 29970afb258..4ee2f44e3d5 100755 --- a/tools/jenkins/docker_run_interop_tests.sh +++ b/tools/jenkins/grpc_interop_java/build_interop.sh @@ -28,12 +28,12 @@ # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # -# This script is invoked by build_docker_and_run_interop_tests.sh inside -# a docker container. You should never need to call this script on your own. +# Builds Java interop server and client in a base image. set -e -nvm use 0.12 -rvm use ruby-2.1 +mkdir -p /var/local/git +git clone --recursive --depth 1 /var/local/jenkins/grpc-java /var/local/git/grpc-java -# run the cloud-to-prod interop tests -$RUN_TESTS_COMMAND +cd /var/local/git/grpc-java + +./gradlew :grpc-interop-testing:installDist -PskipCodegen=true diff --git a/tools/jenkins/grpc_interop_node/Dockerfile b/tools/jenkins/grpc_interop_node/Dockerfile new file mode 100644 index 00000000000..587227b9429 --- /dev/null +++ b/tools/jenkins/grpc_interop_node/Dockerfile @@ -0,0 +1,79 @@ +# Copyright 2015, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +# A work-in-progress Dockerfile that allows running gRPC test suites +# inside a docker container. + +FROM debian:jessie + +# Install Git. +RUN apt-get update && apt-get install -y \ + autoconf \ + autotools-dev \ + build-essential \ + bzip2 \ + ccache \ + curl \ + gcc \ + gcc-multilib \ + git \ + gyp \ + libc6 \ + libc6-dbg \ + libc6-dev \ + libgtest-dev \ + libtool \ + make \ + strace \ + python-dev \ + python-setuptools \ + python-yaml \ + telnet \ + unzip \ + wget \ + zip && apt-get clean + +# Prepare ccache +RUN ln -s /usr/bin/ccache /usr/local/bin/gcc +RUN ln -s /usr/bin/ccache /usr/local/bin/g++ +RUN ln -s /usr/bin/ccache /usr/local/bin/cc +RUN ln -s /usr/bin/ccache /usr/local/bin/c++ +RUN ln -s /usr/bin/ccache /usr/local/bin/clang +RUN ln -s /usr/bin/ccache /usr/local/bin/clang++ + +################## +# Node dependencies + +# Install nvm +RUN touch .profile +RUN curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.25.4/install.sh | bash +RUN /bin/bash -l -c "nvm install 0.12" + +# Define the default command. +CMD ["bash"] diff --git a/tools/jenkins/docker_run_interop_servers.sh b/tools/jenkins/grpc_interop_node/build_interop.sh similarity index 65% rename from tools/jenkins/docker_run_interop_servers.sh rename to tools/jenkins/grpc_interop_node/build_interop.sh index 9f29a65aaa4..55e2a4081bc 100755 --- a/tools/jenkins/docker_run_interop_servers.sh +++ b/tools/jenkins/grpc_interop_node/build_interop.sh @@ -28,23 +28,19 @@ # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # -# This script is invoked by run_jekins.sh. It contains the test logic -# that should run inside a docker container. +# Builds Node interop server and client in a base image. set -e +mkdir -p /var/local/git +git clone --recursive /var/local/jenkins/grpc /var/local/git/grpc + cd /var/local/git/grpc nvm use 0.12 -rvm use ruby-2.1 - -# If port env variable is set, run corresponding interop server on given port in background. -# TODO(jtattermusch): ideally, run_interop_tests.py would generate the commands to run servers. - -[ -z "${SERVER_PORT_cxx}" ] || bins/opt/interop_server --enable_ssl --port=${SERVER_PORT_cxx} & - -[ -z "${SERVER_PORT_node}" ] || node src/node/interop/interop_server.js --use_tls=true --port=${SERVER_PORT_node} & - -[ -z "${SERVER_PORT_ruby}" ] || ruby src/ruby/bin/interop/interop_server.rb --use_tls --port=${SERVER_PORT_ruby} & +nvm alias default 0.12 # prevent the need to run 'nvm use' in every shell -[ -z "${SERVER_PORT_csharp}" ] || (cd src/csharp/Grpc.IntegrationTesting.Server/bin/Debug && mono Grpc.IntegrationTesting.Server.exe --use_tls --port=${SERVER_PORT_csharp}) & +make install-certs -sleep infinity +# build Node interop client & server +npm install -g node-gyp +make install_c -C /var/local/git/grpc +(cd src/node && npm install && node-gyp rebuild) diff --git a/tools/jenkins/grpc_interop_php/Dockerfile b/tools/jenkins/grpc_interop_php/Dockerfile new file mode 100644 index 00000000000..0edc3c174d4 --- /dev/null +++ b/tools/jenkins/grpc_interop_php/Dockerfile @@ -0,0 +1,112 @@ +# Copyright 2015, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +# A work-in-progress Dockerfile that allows running gRPC test suites +# inside a docker container. + +FROM debian:jessie + +# Install Git. +RUN apt-get update && apt-get install -y \ + autoconf \ + autotools-dev \ + build-essential \ + bzip2 \ + ccache \ + curl \ + gcc \ + gcc-multilib \ + git \ + gyp \ + libc6 \ + libc6-dbg \ + libc6-dev \ + libgtest-dev \ + libtool \ + make \ + strace \ + python-dev \ + python-setuptools \ + python-yaml \ + telnet \ + unzip \ + wget \ + zip && apt-get clean + +# Prepare ccache +RUN ln -s /usr/bin/ccache /usr/local/bin/gcc +RUN ln -s /usr/bin/ccache /usr/local/bin/g++ +RUN ln -s /usr/bin/ccache /usr/local/bin/cc +RUN ln -s /usr/bin/ccache /usr/local/bin/c++ +RUN ln -s /usr/bin/ccache /usr/local/bin/clang +RUN ln -s /usr/bin/ccache /usr/local/bin/clang++ + +################## +# Ruby dependencies + +# Install rvm +RUN gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 +RUN \curl -sSL https://get.rvm.io | bash -s stable + +# Install Ruby 2.1 +RUN /bin/bash -l -c "rvm install ruby-2.1" +RUN /bin/bash -l -c "rvm use --default ruby-2.1" +RUN /bin/bash -l -c "echo 'gem: --no-ri --no-rdoc' > ~/.gemrc" +RUN /bin/bash -l -c "echo 'export PATH=/usr/local/rvm/bin:$PATH' >> ~/.bashrc" +RUN /bin/bash -l -c "echo 'rvm --default use ruby-2.1' >> ~/.bashrc" +RUN /bin/bash -l -c "gem install bundler --no-ri --no-rdoc" + +################## +# PHP dependencies + +# Install dependencies + +RUN /bin/bash -l -c "echo 'deb http://packages.dotdeb.org wheezy-php55 all' \ + >> /etc/apt/sources.list.d/dotdeb.list" +RUN /bin/bash -l -c "echo 'deb-src http://packages.dotdeb.org wheezy-php55 all' \ + >> /etc/apt/sources.list.d/dotdeb.list" +RUN wget http://www.dotdeb.org/dotdeb.gpg -O- | apt-key add - + +RUN apt-get update && apt-get install -y \ + git php5 php5-dev phpunit unzip + +# ronn: a ruby tool used to convert markdown to man pages, used during the +# install of Protobuf extensions +# +# rake: a ruby version of make used to build the PHP Protobuf extension +RUN /bin/bash -l -c "rvm all do gem install ronn rake" + +ENV DEBIAN_FRONTEND noniteractive + +# Install composer +RUN curl -sS https://getcomposer.org/installer | php +RUN mv composer.phar /usr/local/bin/composer + +# Define the default command. +CMD ["bash"] diff --git a/tools/jenkins/docker_prepare_interop_tests.sh b/tools/jenkins/grpc_interop_php/build_interop.sh similarity index 67% rename from tools/jenkins/docker_prepare_interop_tests.sh rename to tools/jenkins/grpc_interop_php/build_interop.sh index a1fe0b72d2f..745dea845d6 100755 --- a/tools/jenkins/docker_prepare_interop_tests.sh +++ b/tools/jenkins/grpc_interop_php/build_interop.sh @@ -28,52 +28,32 @@ # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # -# This script is invoked by run_jekins.sh. It contains the test logic -# that should run inside a docker container. +# Builds PHP interop server and client in a base image. set -e mkdir -p /var/local/git git clone --recursive /var/local/jenkins/grpc /var/local/git/grpc cd /var/local/git/grpc -nvm use 0.12 -rvm use ruby-2.1 +rvm --default use ruby-2.1 -# TODO(jtattermusch): use cleaner way to install root certs -mkdir -p /usr/local/share/grpc -cp etc/roots.pem /usr/local/share/grpc/ +make install-certs -# build C++ interop client & server -make interop_client interop_server +# gRPC core and protobuf need to be installed +make install -# build C# interop client & server -make install_grpc_csharp_ext -(cd src/csharp && mono /var/local/NuGet.exe restore Grpc.sln) -(cd src/csharp && xbuild Grpc.sln) - -# build Node interop client & server -npm install -g node-gyp -make install_c -C /var/local/git/grpc -(cd src/node && npm install && node-gyp rebuild) - -# build Ruby interop client and server -(cd src/ruby && gem update bundler && bundle && rake compile:grpc) - -# TODO(jtattermusch): add python - -# build PHP interop client -# TODO(jtattermusch): prerequisites for PHP should be installed sooner than here. -# Install composer -curl -sS https://getcomposer.org/installer | php -mv composer.phar /usr/local/bin/composer # Download the patched PHP protobuf so that PHP gRPC clients can be generated # from proto3 schemas. git clone https://github.com/stanley-cheung/Protobuf-PHP.git /var/local/git/protobuf-php + (cd src/php/ext/grpc && phpize && ./configure && make) -rvm all do gem install ronn rake + (cd third_party/protobuf && make install) + (cd /var/local/git/protobuf-php \ && rvm all do rake pear:package version=1.0 \ && pear install Protobuf-1.0.tgz) + (cd src/php && composer install) + (cd src/php && protoc-gen-php -i tests/interop/ -o tests/interop/ tests/interop/test.proto) diff --git a/tools/jenkins/grpc_interop_ruby/Dockerfile b/tools/jenkins/grpc_interop_ruby/Dockerfile new file mode 100644 index 00000000000..ff201fa291e --- /dev/null +++ b/tools/jenkins/grpc_interop_ruby/Dockerfile @@ -0,0 +1,87 @@ +# Copyright 2015, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +# A work-in-progress Dockerfile that allows running gRPC test suites +# inside a docker container. + +FROM debian:jessie + +# Install Git. +RUN apt-get update && apt-get install -y \ + autoconf \ + autotools-dev \ + build-essential \ + bzip2 \ + ccache \ + curl \ + gcc \ + gcc-multilib \ + git \ + gyp \ + libc6 \ + libc6-dbg \ + libc6-dev \ + libgtest-dev \ + libtool \ + make \ + strace \ + python-dev \ + python-setuptools \ + python-yaml \ + telnet \ + unzip \ + wget \ + zip && apt-get clean + +# Prepare ccache +RUN ln -s /usr/bin/ccache /usr/local/bin/gcc +RUN ln -s /usr/bin/ccache /usr/local/bin/g++ +RUN ln -s /usr/bin/ccache /usr/local/bin/cc +RUN ln -s /usr/bin/ccache /usr/local/bin/c++ +RUN ln -s /usr/bin/ccache /usr/local/bin/clang +RUN ln -s /usr/bin/ccache /usr/local/bin/clang++ + + +################## +# Ruby dependencies + +# Install rvm +RUN gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 +RUN \curl -sSL https://get.rvm.io | bash -s stable + +# Install Ruby 2.1 +RUN /bin/bash -l -c "rvm install ruby-2.1" +RUN /bin/bash -l -c "rvm use --default ruby-2.1" +RUN /bin/bash -l -c "echo 'gem: --no-ri --no-rdoc' > ~/.gemrc" +RUN /bin/bash -l -c "echo 'export PATH=/usr/local/rvm/bin:$PATH' >> ~/.bashrc" +RUN /bin/bash -l -c "echo 'rvm --default use ruby-2.1' >> ~/.bashrc" +RUN /bin/bash -l -c "gem install bundler --no-ri --no-rdoc" + +# Define the default command. +CMD ["bash"] diff --git a/tools/jenkins/grpc_interop_ruby/build_interop.sh b/tools/jenkins/grpc_interop_ruby/build_interop.sh new file mode 100755 index 00000000000..7d407e7d0a9 --- /dev/null +++ b/tools/jenkins/grpc_interop_ruby/build_interop.sh @@ -0,0 +1,43 @@ +#!/bin/bash +# Copyright 2015, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# +# Builds Ruby interop server and client in a base image. +set -e + +mkdir -p /var/local/git +git clone --recursive /var/local/jenkins/grpc /var/local/git/grpc + +cd /var/local/git/grpc +rvm --default use ruby-2.1 + +make install-certs + +# build Ruby interop client and server +(cd src/ruby && gem update bundler && bundle && rake compile:grpc) diff --git a/tools/run_tests/dockerjob.py b/tools/run_tests/dockerjob.py new file mode 100755 index 00000000000..e938a3c2f7f --- /dev/null +++ b/tools/run_tests/dockerjob.py @@ -0,0 +1,112 @@ +# Copyright 2015, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +"""Helpers to run docker instances as jobs.""" + +import jobset +import tempfile +import time +import uuid +import os +import subprocess + +_DEVNULL = open(os.devnull, 'w') + +def wait_for_file(filepath, timeout_seconds=15): + """Wait until given file exists and returns its content.""" + started = time.time() + while time.time() - started < timeout_seconds: + if os.path.isfile(filepath): + with open(filepath, 'r') as f: + return f.read() + time.sleep(1) + raise Exception('Failed to read file %s.' % filepath) + + +def docker_mapped_port(cid, port): + """Get port mapped to internal given internal port for given container.""" + output = subprocess.check_output('docker port %s %s' % (cid, port), shell=True) + return int(output.split(':', 2)[1]) + + +def finish_jobs(jobs): + """Kills given docker containers and waits for corresponding jobs to finish""" + for job in jobs: + job.kill(suppress_failure=True) + + while any(job.is_running() for job in jobs): + time.sleep(1) + + +def image_exists(image): + """Returns True if given docker image exists.""" + return subprocess.call(['docker','inspect', image], + stdout=_DEVNULL, + stderr=_DEVNULL) == 0 + + +def remove_image(image, skip_nonexistent=False, max_retries=10): + """Attempts to remove docker image with retries.""" + if skip_nonexistent and not image_exists(image): + return True + for attempt in range(0, max_retries): + if subprocess.call(['docker','rmi', '-f', image]) == 0: + return True + time.sleep(2) + print 'Failed to remove docker image %s' % image + return False + + +class DockerJob: + """Encapsulates a job""" + + def __init__(self, spec): + self._spec = spec + self._job = jobset.Job(spec, bin_hash=None, newline_on_success=True, travis=True, add_env={}, xml_report=None) + self._cidfile = spec.cidfile + self._cid = None + + def cid(self): + """Gets cid of this container""" + if not self._cid: + self._cid = wait_for_file(self._cidfile) + return self._cid + + def mapped_port(self, port): + return docker_mapped_port(self.cid(), port) + + def kill(self, suppress_failure=False): + """Sends kill signal to the container.""" + if suppress_failure: + self._job.suppress_failure_message() + return subprocess.call(['docker','kill', self.cid()]) == 0 + + def is_running(self): + """Polls a job and returns True if given job is still running.""" + return self._job.state(jobset.NoCache()) == jobset._RUNNING diff --git a/tools/run_tests/jobset.py b/tools/run_tests/jobset.py index b9ec020f9ef..87be703b4cd 100755 --- a/tools/run_tests/jobset.py +++ b/tools/run_tests/jobset.py @@ -180,6 +180,7 @@ class Job(object): name=self._spec.shortname) if xml_report is not None else None self._retries = 0 self._timeout_retries = 0 + self._suppress_failure_message = False message('START', spec.shortname, do_newline=self._travis) self.start() @@ -220,9 +221,10 @@ class Job(object): self.start() else: self._state = _FAILURE - message('FAILED', '%s [ret=%d, pid=%d]' % ( - self._spec.shortname, self._process.returncode, self._process.pid), - stdout, do_newline=True) + if not self._suppress_failure_message: + message('FAILED', '%s [ret=%d, pid=%d]' % ( + self._spec.shortname, self._process.returncode, self._process.pid), + stdout, do_newline=True) if self._xml_test is not None: ET.SubElement(self._xml_test, 'failure', message='Failure').text else: @@ -254,6 +256,9 @@ class Job(object): self._state = _KILLED self._process.terminate() + def suppress_failure_message(self): + self._suppress_failure_message = True + class Jobset(object): """Manages one run of jobs.""" diff --git a/tools/run_tests/run_interop_tests.py b/tools/run_tests/run_interop_tests.py index a2fb1243cc4..b5c1043e72a 100755 --- a/tools/run_tests/run_interop_tests.py +++ b/tools/run_tests/run_interop_tests.py @@ -31,14 +31,21 @@ """Run interop (cross-language) tests in parallel.""" import argparse +import dockerjob import itertools import xml.etree.cElementTree as ET import jobset import os import subprocess import sys +import tempfile import time +import uuid +ROOT = os.path.abspath(os.path.join(os.path.dirname(sys.argv[0]), '../..')) +os.chdir(ROOT) + +_DEFAULT_SERVER_PORT=8080 _CLOUD_TO_PROD_BASE_ARGS = [ '--server_host_override=grpc-test.sandbox.google.com', @@ -61,6 +68,7 @@ class CXXLanguage: def __init__(self): self.client_cmdline_base = ['bins/opt/interop_client'] self.client_cwd = None + self.server_cwd = None def cloud_to_prod_args(self): return (self.client_cmdline_base + _CLOUD_TO_PROD_BASE_ARGS + @@ -73,6 +81,9 @@ class CXXLanguage: def cloud_to_prod_env(self): return None + def server_args(self): + return ['bins/opt/interop_server', '--enable_ssl'] + def __str__(self): return 'c++' @@ -82,6 +93,7 @@ class CSharpLanguage: def __init__(self): self.client_cmdline_base = ['mono', 'Grpc.IntegrationTesting.Client.exe'] self.client_cwd = 'src/csharp/Grpc.IntegrationTesting.Client/bin/Debug' + self.server_cwd = 'src/csharp/Grpc.IntegrationTesting.Server/bin/Debug' def cloud_to_prod_args(self): return (self.client_cmdline_base + _CLOUD_TO_PROD_BASE_ARGS + @@ -94,15 +106,44 @@ class CSharpLanguage: def cloud_to_prod_env(self): return _SSL_CERT_ENV + def server_args(self): + return ['mono', 'Grpc.IntegrationTesting.Server.exe', '--use_tls'] + def __str__(self): return 'csharp' +class JavaLanguage: + + def __init__(self): + self.client_cmdline_base = ['./run-test-client.sh'] + self.client_cwd = '../grpc-java' + self.server_cwd = '../grpc-java' + + def cloud_to_prod_args(self): + return (self.client_cmdline_base + _CLOUD_TO_PROD_BASE_ARGS + + ['--use_tls=true']) + + def cloud_to_cloud_args(self): + return (self.client_cmdline_base + _CLOUD_TO_CLOUD_BASE_ARGS + + ['--use_tls=true', '--use_test_ca=true']) + + def cloud_to_prod_env(self): + return None + + def server_args(self): + return ['./run-test-server.sh', '--use_tls=true'] + + def __str__(self): + return 'java' + + class NodeLanguage: def __init__(self): self.client_cmdline_base = ['node', 'src/node/interop/interop_client.js'] self.client_cwd = None + self.server_cwd = None def cloud_to_prod_args(self): return (self.client_cmdline_base + _CLOUD_TO_PROD_BASE_ARGS + @@ -115,6 +156,9 @@ class NodeLanguage: def cloud_to_prod_env(self): return _SSL_CERT_ENV + def server_args(self): + return ['node', 'src/node/interop/interop_server.js', '--use_tls=true'] + def __str__(self): return 'node' @@ -145,6 +189,7 @@ class RubyLanguage: def __init__(self): self.client_cmdline_base = ['ruby', 'src/ruby/bin/interop/interop_client.rb'] self.client_cwd = None + self.server_cwd = None def cloud_to_prod_args(self): return (self.client_cmdline_base + _CLOUD_TO_PROD_BASE_ARGS + @@ -157,57 +202,144 @@ class RubyLanguage: def cloud_to_prod_env(self): return _SSL_CERT_ENV + def server_args(self): + return ['ruby', 'src/ruby/bin/interop/interop_server.rb', '--use_tls'] + def __str__(self): return 'ruby' -# TODO(jtattermusch): add php and python once we get them working +# TODO(jtattermusch): python once we get it working _LANGUAGES = { 'c++' : CXXLanguage(), 'csharp' : CSharpLanguage(), + 'java' : JavaLanguage(), 'node' : NodeLanguage(), 'php' : PHPLanguage(), 'ruby' : RubyLanguage(), } -# languages supported as cloud_to_cloud servers +# languages supported as cloud_to_cloud servers # TODO(jtattermusch): enable other languages as servers as well -_SERVERS = { 'c++' : 8010, 'node' : 8040, 'csharp': 8070 } +_SERVERS = ['c++', 'node', 'csharp', 'java'] -# TODO(jtattermusch): add empty_stream once C++ start supporting it. +# TODO(jtattermusch): add empty_stream once C++ starts supporting it. +# TODO(jtattermusch): add timeout_on_sleeping_server once java starts supporting it. # TODO(jtattermusch): add support for auth tests. _TEST_CASES = ['large_unary', 'empty_unary', 'ping_pong', 'client_streaming', 'server_streaming', - 'cancel_after_begin', 'cancel_after_first_response', - 'timeout_on_sleeping_server'] + 'cancel_after_begin', 'cancel_after_first_response'] -def cloud_to_prod_jobspec(language, test_case): +def docker_run_cmdline(cmdline, image, docker_args=[], cwd=None, environ=None): + """Wraps given cmdline array to create 'docker run' cmdline from it.""" + docker_cmdline = ['docker', 'run', '-i', '--rm=true'] + + # turn environ into -e docker args + if environ: + for k,v in environ.iteritems(): + docker_cmdline += ['-e', '%s=%s' % (k,v)] + + # set working directory + workdir = '/var/local/git/grpc' + if cwd: + workdir = os.path.join(workdir, cwd) + docker_cmdline += ['-w', workdir] + + docker_cmdline += docker_args + [image] + cmdline + return docker_cmdline + + +def bash_login_cmdline(cmdline): + """Creates bash -l -c cmdline from args list.""" + # Use login shell: + # * rvm and nvm require it + # * makes error messages clearer if executables are missing + return ['bash', '-l', '-c', ' '.join(cmdline)] + + +def cloud_to_prod_jobspec(language, test_case, docker_image=None): """Creates jobspec for cloud-to-prod interop test""" - cmdline = language.cloud_to_prod_args() + ['--test_case=%s' % test_case] + cmdline = bash_login_cmdline(language.cloud_to_prod_args() + + ['--test_case=%s' % test_case]) + cwd = language.client_cwd + environ = language.cloud_to_prod_env() + if docker_image: + cmdline = docker_run_cmdline(cmdline, image=docker_image, cwd=cwd, environ=environ) + cwd = None + environ = None + test_job = jobset.JobSpec( cmdline=cmdline, - cwd=language.client_cwd, + cwd=cwd, + environ=environ, shortname="cloud_to_prod:%s:%s" % (language, test_case), - environ=language.cloud_to_prod_env(), - timeout_seconds=60) + timeout_seconds=60, + flake_retries=5 if args.allow_flakes else 0, + timeout_retries=2 if args.allow_flakes else 0) return test_job def cloud_to_cloud_jobspec(language, test_case, server_name, server_host, - server_port): + server_port, docker_image=None): """Creates jobspec for cloud-to-cloud interop test""" - cmdline = language.cloud_to_cloud_args() + ['--test_case=%s' % test_case, - '--server_host=%s' % server_host, - '--server_port=%s' % server_port ] + cmdline = bash_login_cmdline(language.cloud_to_cloud_args() + + ['--test_case=%s' % test_case, + '--server_host=%s' % server_host, + '--server_port=%s' % server_port ]) + cwd = language.client_cwd + if docker_image: + cmdline = docker_run_cmdline(cmdline, + image=docker_image, + cwd=cwd, + docker_args=['--net=host']) + cwd = None test_job = jobset.JobSpec( cmdline=cmdline, - cwd=language.client_cwd, + cwd=cwd, shortname="cloud_to_cloud:%s:%s_server:%s" % (language, server_name, test_case), - timeout_seconds=60) + timeout_seconds=60, + flake_retries=5 if args.allow_flakes else 0, + timeout_retries=2 if args.allow_flakes else 0) return test_job + +def server_jobspec(language, docker_image): + """Create jobspec for running a server""" + cidfile = tempfile.mktemp() + cmdline = bash_login_cmdline(language.server_args() + + ['--port=%s' % _DEFAULT_SERVER_PORT]) + docker_cmdline = docker_run_cmdline(cmdline, + image=docker_image, + cwd=language.server_cwd, + docker_args=['-p', str(_DEFAULT_SERVER_PORT), + '--cidfile', cidfile]) + server_job = jobset.JobSpec( + cmdline=docker_cmdline, + shortname="interop_server:%s" % language, + timeout_seconds=30*60) + server_job.cidfile = cidfile + return server_job + + +def build_interop_image_jobspec(language, tag=None): + """Creates jobspec for building interop docker image for a language""" + safelang = str(language).replace("+", "x") + if not tag: + tag = 'grpc_interop_%s:%s' % (safelang, uuid.uuid4()) + env = {'INTEROP_IMAGE': tag, 'BASE_NAME': 'grpc_interop_%s' % safelang} + if not args.travis: + env['TTY_FLAG'] = '-t' + build_job = jobset.JobSpec( + cmdline=['tools/jenkins/build_interop_image.sh'], + environ=env, + shortname="build_docker_%s" % (language), + timeout_seconds=30*60) + build_job.tag = tag + return build_job + + argp = argparse.ArgumentParser(description='Run interop tests.') argp.add_argument('-l', '--language', choices=['all'] + sorted(_LANGUAGES), @@ -243,9 +375,14 @@ argp.add_argument('--use_docker', help='Run all the interop tests under docker. That provides ' + 'additional isolation and prevents the need to install ' + 'language specific prerequisites. Only available on Linux.') +argp.add_argument('--allow_flakes', + default=False, + action='store_const', + const=True, + help="Allow flaky tests to show as passing (re-runs failed tests up to five times)") args = argp.parse_args() -servers = set(s for s in itertools.chain.from_iterable(_SERVERS.iterkeys() +servers = set(s for s in itertools.chain.from_iterable(_SERVERS if x == 'all' else [x] for x in args.server)) @@ -258,73 +395,98 @@ if args.use_docker: print 'copied to the docker environment.' time.sleep(5) - child_argv = [ arg for arg in sys.argv if not arg == '--use_docker' ] - run_tests_cmd = ('tools/run_tests/run_interop_tests.py %s' % - " ".join(child_argv[1:])) - - # cmdline args to pass to the container running servers. - servers_extra_docker_args = '' - server_port_tuples = '' - for server in servers: - port = _SERVERS[server] - servers_extra_docker_args += ' -p %s' % port - servers_extra_docker_args += ' -e SERVER_PORT_%s=%s' % (server.replace("+", "x"), port) - server_port_tuples += ' %s:%s' % (server, port) - - env = os.environ.copy() - env['RUN_TESTS_COMMAND'] = run_tests_cmd - env['SERVERS_DOCKER_EXTRA_ARGS'] = servers_extra_docker_args - env['SERVER_PORT_TUPLES'] = server_port_tuples - if not args.travis: - env['TTY_FLAG'] = '-t' # enables Ctrl-C when not on Jenkins. - - subprocess.check_call(['tools/jenkins/build_docker_and_run_interop_tests.sh'], - shell=True, - env=env) - sys.exit(0) +if not args.use_docker and servers: + print "Running interop servers is only supported with --use_docker option enabled." + sys.exit(1) languages = set(_LANGUAGES[l] for l in itertools.chain.from_iterable( _LANGUAGES.iterkeys() if x == 'all' else [x] for x in args.language)) -jobs = [] -if args.cloud_to_prod: - for language in languages: - for test_case in _TEST_CASES: - test_job = cloud_to_prod_jobspec(language, test_case) - jobs.append(test_job) - -# default servers to "localhost" and the default port -server_addresses = dict((s, ("localhost", _SERVERS[s])) for s in servers) - -for server in args.override_server: - server_name = server[0] - (server_host, server_port) = server[1].split(":") - server_addresses[server_name] = (server_host, server_port) - -for server_name, server_address in server_addresses.iteritems(): - (server_host, server_port) = server_address - for language in languages: - for test_case in _TEST_CASES: - test_job = cloud_to_cloud_jobspec(language, - test_case, - server_name, - server_host, - server_port) - jobs.append(test_job) - -if not jobs: - print "No jobs to run." - sys.exit(1) - -root = ET.Element('testsuites') -testsuite = ET.SubElement(root, 'testsuite', id='1', package='grpc', name='tests') - -if jobset.run(jobs, newline_on_success=True, maxjobs=args.jobs, xml_report=testsuite): - jobset.message('SUCCESS', 'All tests passed', do_newline=True) -else: - jobset.message('FAILED', 'Some tests failed', do_newline=True) - -tree = ET.ElementTree(root) -tree.write('report.xml', encoding='UTF-8') \ No newline at end of file +docker_images={} +if args.use_docker: + # languages for which to build docker images + languages_to_build = set(_LANGUAGES[k] for k in set([str(l) for l in languages] + + [s for s in servers])) + + build_jobs = [] + for l in languages_to_build: + job = build_interop_image_jobspec(l) + docker_images[str(l)] = job.tag + build_jobs.append(job) + + if build_jobs: + jobset.message('START', 'Building interop docker images.', do_newline=True) + if jobset.run(build_jobs, newline_on_success=True, maxjobs=args.jobs): + jobset.message('SUCCESS', 'All docker images built successfully.', do_newline=True) + else: + jobset.message('FAILED', 'Failed to build interop docker images.', do_newline=True) + for image in docker_images.itervalues(): + dockerjob.remove_image(image, skip_nonexistent=True) + exit(1); + +# Start interop servers. +server_jobs={} +server_addresses={} +try: + for s in servers: + lang = str(s) + spec = server_jobspec(_LANGUAGES[lang], docker_images.get(lang)) + job = dockerjob.DockerJob(spec) + server_jobs[lang] = job + server_addresses[lang] = ('localhost', job.mapped_port(_DEFAULT_SERVER_PORT)) + + jobs = [] + if args.cloud_to_prod: + for language in languages: + for test_case in _TEST_CASES: + test_job = cloud_to_prod_jobspec(language, test_case, + docker_image=docker_images.get(str(language))) + jobs.append(test_job) + + for server in args.override_server: + server_name = server[0] + (server_host, server_port) = server[1].split(':') + server_addresses[server_name] = (server_host, server_port) + + for server_name, server_address in server_addresses.iteritems(): + (server_host, server_port) = server_address + for language in languages: + for test_case in _TEST_CASES: + test_job = cloud_to_cloud_jobspec(language, + test_case, + server_name, + server_host, + server_port, + docker_image=docker_images.get(str(language))) + jobs.append(test_job) + + if not jobs: + print "No jobs to run." + for image in docker_images.itervalues(): + dockerjob.remove_image(image, skip_nonexistent=True) + sys.exit(1) + + root = ET.Element('testsuites') + testsuite = ET.SubElement(root, 'testsuite', id='1', package='grpc', name='tests') + + if jobset.run(jobs, newline_on_success=True, maxjobs=args.jobs, xml_report=testsuite): + jobset.message('SUCCESS', 'All tests passed', do_newline=True) + else: + jobset.message('FAILED', 'Some tests failed', do_newline=True) + + tree = ET.ElementTree(root) + tree.write('report.xml', encoding='UTF-8') + +finally: + # Check if servers are still running. + for server, job in server_jobs.iteritems(): + if not job.is_running(): + print 'Server "%s" has exited prematurely.' % server + + dockerjob.finish_jobs([j for j in server_jobs.itervalues()]) + + for image in docker_images.itervalues(): + print 'Removing docker image %s' % image + dockerjob.remove_image(image) From 196188f77bab6925b5d27e98186c5925f68bf123 Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Fri, 2 Oct 2015 12:49:03 -0700 Subject: [PATCH 093/169] Fixed node extension module name --- src/node/ext/node_grpc.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/node/ext/node_grpc.cc b/src/node/ext/node_grpc.cc index caca0fc4522..8ea0c64b99c 100644 --- a/src/node/ext/node_grpc.cc +++ b/src/node/ext/node_grpc.cc @@ -247,4 +247,4 @@ void init(Local exports) { grpc::node::ServerCredentials::Init(exports); } -NODE_MODULE(grpc, init) +NODE_MODULE(grpc_node, init) From 38a09b78d290cb5930a15bb13f9e9afd4c7a27dc Mon Sep 17 00:00:00 2001 From: David Klempner Date: Fri, 2 Oct 2015 13:37:58 -0700 Subject: [PATCH 094/169] Restore sanity by reformatting grpc_version_string --- src/core/surface/version.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/core/surface/version.c b/src/core/surface/version.c index e559d51448a..4b90e06a043 100644 --- a/src/core/surface/version.c +++ b/src/core/surface/version.c @@ -36,4 +36,6 @@ #include -const char *grpc_version_string(void) { return "0.11.0.0"; } +const char *grpc_version_string(void) { + return "0.11.0.0"; +} From 58d05a63dfb9355d707c3f7c4da781f4071efc60 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 2 Oct 2015 13:59:31 -0700 Subject: [PATCH 095/169] Stabilize mac build --- src/core/iomgr/fd_posix.c | 241 ++++++++++-------- src/core/iomgr/fd_posix.h | 14 +- .../pollset_multipoller_with_poll_posix.c | 30 +-- src/core/iomgr/pollset_posix.c | 32 +-- 4 files changed, 173 insertions(+), 144 deletions(-) diff --git a/src/core/iomgr/fd_posix.c b/src/core/iomgr/fd_posix.c index 222e745c648..567e1ff02ec 100644 --- a/src/core/iomgr/fd_posix.c +++ b/src/core/iomgr/fd_posix.c @@ -44,11 +44,10 @@ #include #include #include +#include -enum descriptor_state { - NOT_READY = 0, - READY = 1 -}; /* or a pointer to a closure to call */ +#define CLOSURE_NOT_READY ((grpc_closure*)0) +#define CLOSURE_READY ((grpc_closure*)1) /* We need to keep a freelist not because of any concerns of malloc performance * but instead so that implementations with multiple threads in (for example) @@ -70,6 +69,8 @@ enum descriptor_state { static grpc_fd *fd_freelist = NULL; static gpr_mu fd_freelist_mu; +static long gettid(void) { return syscall(__NR_gettid); } + static void freelist_fd(grpc_fd *fd) { gpr_mu_lock(&fd_freelist_mu); fd->freelist_next = fd_freelist; @@ -88,14 +89,15 @@ static grpc_fd *alloc_fd(int fd) { gpr_mu_unlock(&fd_freelist_mu); if (r == NULL) { r = gpr_malloc(sizeof(grpc_fd)); - gpr_mu_init(&r->set_state_mu); - gpr_mu_init(&r->watcher_mu); + gpr_mu_init(&r->mu); + r->cap_ev = 0; + r->ev = NULL; } gpr_atm_rel_store(&r->refst, 1); - gpr_atm_rel_store(&r->readst, NOT_READY); - gpr_atm_rel_store(&r->writest, NOT_READY); - gpr_atm_rel_store(&r->shutdown, 0); + r->shutdown = 0; + r->read_closure = CLOSURE_NOT_READY; + r->write_closure = CLOSURE_NOT_READY; r->fd = fd; r->inactive_watcher_root.next = r->inactive_watcher_root.prev = &r->inactive_watcher_root; @@ -103,12 +105,13 @@ static grpc_fd *alloc_fd(int fd) { r->read_watcher = r->write_watcher = NULL; r->on_done_closure = NULL; r->closed = 0; + r->num_ev = 0; return r; } static void destroy(grpc_fd *fd) { - gpr_mu_destroy(&fd->set_state_mu); - gpr_mu_destroy(&fd->watcher_mu); + gpr_mu_destroy(&fd->mu); + gpr_free(fd->ev); gpr_free(fd); } @@ -169,43 +172,70 @@ grpc_fd *grpc_fd_create(int fd, const char *name) { return r; } +static int count_inactive(grpc_fd *fd) { + int n = 0; + grpc_fd_watcher *w; + for (w = fd->inactive_watcher_root.next; w != &fd->inactive_watcher_root; w = w->next) { + n++; + } + return n; +} + +static void fdev_add(fd_event_type type, grpc_fd *fd, grpc_pollset *pollset, grpc_pollset_worker *pollset_worker, grpc_fd_watcher *fd_watcher) { + fd_event *ev; + if (fd->num_ev == fd->cap_ev) { + fd->cap_ev = GPR_MAX(2 * fd->cap_ev, 32); + fd->ev = gpr_realloc(fd->ev, sizeof(*fd->ev) * fd->cap_ev); + } + ev = &fd->ev[fd->num_ev++]; + ev->thread = gettid(); + ev->type = type; + ev->pollset = pollset; + ev->pollset_worker = pollset_worker; + ev->watcher = fd_watcher; + ev->shutdown = fd->shutdown; + ev->closed = fd->closed; + ev->read_closure = fd->read_closure; + ev->write_closure = fd->write_closure; + ev->read_watcher = fd->read_watcher; + ev->write_watcher = fd->write_watcher; + ev->num_inactive = count_inactive(fd); +} + int grpc_fd_is_orphaned(grpc_fd *fd) { return (gpr_atm_acq_load(&fd->refst) & 1) == 0; } -static void pollset_kick_locked(grpc_fd_watcher *watcher) { +static void pollset_kick_locked(grpc_fd_watcher *watcher, fd_event_type type) { + fdev_add(type, watcher->fd, watcher->pollset, watcher->worker, watcher); gpr_mu_lock(GRPC_POLLSET_MU(watcher->pollset)); + GPR_ASSERT(watcher->worker); grpc_pollset_kick_ex(watcher->pollset, watcher->worker, GRPC_POLLSET_REEVALUATE_POLLING_ON_WAKEUP); gpr_mu_unlock(GRPC_POLLSET_MU(watcher->pollset)); + fdev_add(type + 1, watcher->fd, watcher->pollset, watcher->worker, watcher); } static void maybe_wake_one_watcher_locked(grpc_fd *fd) { if (fd->inactive_watcher_root.next != &fd->inactive_watcher_root) { - pollset_kick_locked(fd->inactive_watcher_root.next); + pollset_kick_locked(fd->inactive_watcher_root.next, FDEV_KICK_INACTIVE); } else if (fd->read_watcher) { - pollset_kick_locked(fd->read_watcher); + pollset_kick_locked(fd->read_watcher, FDEV_KICK_READER); } else if (fd->write_watcher) { - pollset_kick_locked(fd->write_watcher); + pollset_kick_locked(fd->write_watcher, FDEV_KICK_WRITER); } } -static void maybe_wake_one_watcher(grpc_fd *fd) { - gpr_mu_lock(&fd->watcher_mu); - maybe_wake_one_watcher_locked(fd); - gpr_mu_unlock(&fd->watcher_mu); -} - static void wake_all_watchers_locked(grpc_fd *fd) { grpc_fd_watcher *watcher; for (watcher = fd->inactive_watcher_root.next; watcher != &fd->inactive_watcher_root; watcher = watcher->next) { - pollset_kick_locked(watcher); + pollset_kick_locked(watcher, FDEV_KICK_INACTIVE); } if (fd->read_watcher) { - pollset_kick_locked(fd->read_watcher); + pollset_kick_locked(fd->read_watcher, FDEV_KICK_READER); } if (fd->write_watcher && fd->write_watcher != fd->read_watcher) { - pollset_kick_locked(fd->write_watcher); + pollset_kick_locked(fd->write_watcher, FDEV_KICK_WRITER); } } @@ -218,7 +248,7 @@ void grpc_fd_orphan(grpc_exec_ctx *exec_ctx, grpc_fd *fd, grpc_closure *on_done, const char *reason) { fd->on_done_closure = on_done; shutdown(fd->fd, SHUT_RDWR); - gpr_mu_lock(&fd->watcher_mu); + gpr_mu_lock(&fd->mu); REF_BY(fd, 1, reason); /* remove active status, but keep referenced */ if (!has_watchers(fd)) { fd->closed = 1; @@ -227,7 +257,7 @@ void grpc_fd_orphan(grpc_exec_ctx *exec_ctx, grpc_fd *fd, grpc_closure *on_done, } else { wake_all_watchers_locked(fd); } - gpr_mu_unlock(&fd->watcher_mu); + gpr_mu_unlock(&fd->mu); UNREF_BY(fd, 2, reason); /* drop the reference */ } @@ -247,125 +277,107 @@ void grpc_fd_ref(grpc_fd *fd) { ref_by(fd, 2); } void grpc_fd_unref(grpc_fd *fd) { unref_by(fd, 2); } #endif -static void notify_on(grpc_exec_ctx *exec_ctx, grpc_fd *fd, gpr_atm *st, +static void notify_on_locked(grpc_exec_ctx *exec_ctx, grpc_fd *fd, grpc_closure **st, grpc_closure *closure) { - switch (gpr_atm_acq_load(st)) { - case NOT_READY: - /* There is no race if the descriptor is already ready, so we skip - the interlocked op in that case. As long as the app doesn't - try to set the same upcall twice (which it shouldn't) then - oldval should never be anything other than READY or NOT_READY. We - don't - check for user error on the fast path. */ - if (gpr_atm_rel_cas(st, NOT_READY, (gpr_intptr)closure)) { - /* swap was successful -- the closure will run after the next - set_ready call. NOTE: we don't have an ABA problem here, - since we should never have concurrent calls to the same - notify_on function. */ - maybe_wake_one_watcher(fd); - return; - } - /* swap was unsuccessful due to an intervening set_ready call. - Fall through to the READY code below */ - case READY: - GPR_ASSERT(gpr_atm_no_barrier_load(st) == READY); - gpr_atm_rel_store(st, NOT_READY); - grpc_exec_ctx_enqueue(exec_ctx, closure, - !gpr_atm_acq_load(&fd->shutdown)); - return; - default: /* WAITING */ - /* upcallptr was set to a different closure. This is an error! */ - gpr_log(GPR_ERROR, - "User called a notify_on function with a previous callback still " - "pending"); - abort(); + if (*st == CLOSURE_NOT_READY) { + *st = closure; + } else if (*st == CLOSURE_READY) { + *st = CLOSURE_NOT_READY; + grpc_exec_ctx_enqueue(exec_ctx, closure, !fd->shutdown); + maybe_wake_one_watcher_locked(fd); + } else { + /* upcallptr was set to a different closure. This is an error! */ + gpr_log(GPR_ERROR, + "User called a notify_on function with a previous callback still " + "pending"); + abort(); } - gpr_log(GPR_ERROR, "Corrupt memory in &st->state"); - abort(); } -static void set_ready_locked(grpc_exec_ctx *exec_ctx, grpc_fd *fd, - gpr_atm *st) { - gpr_intptr state = gpr_atm_acq_load(st); - - switch (state) { - case READY: - /* duplicate ready, ignore */ - return; - case NOT_READY: - if (gpr_atm_rel_cas(st, NOT_READY, READY)) { - /* swap was successful -- the closure will run after the next - notify_on call. */ - return; - } - /* swap was unsuccessful due to an intervening set_ready call. - Fall through to the WAITING code below */ - state = gpr_atm_acq_load(st); - default: /* waiting */ - GPR_ASSERT(gpr_atm_no_barrier_load(st) != READY && - gpr_atm_no_barrier_load(st) != NOT_READY); - grpc_exec_ctx_enqueue(exec_ctx, (grpc_closure *)state, - !gpr_atm_acq_load(&fd->shutdown)); - gpr_atm_rel_store(st, NOT_READY); - return; +/* returns 1 if state becomes not ready */ +static int set_ready_locked(grpc_exec_ctx *exec_ctx, grpc_fd *fd, + grpc_closure **st) { + if (*st == CLOSURE_READY) { + /* duplicate ready, ignore */ + return 0; + } else if (*st == CLOSURE_NOT_READY) { + *st = CLOSURE_READY; + return 0; + } else { + grpc_exec_ctx_enqueue(exec_ctx, *st, !fd->shutdown); + *st = CLOSURE_NOT_READY; + return 1; } } -static void set_ready(grpc_exec_ctx *exec_ctx, grpc_fd *fd, gpr_atm *st) { +static void set_ready(grpc_exec_ctx *exec_ctx, grpc_fd *fd, grpc_closure **st) { /* only one set_ready can be active at once (but there may be a racing notify_on) */ - gpr_mu_lock(&fd->set_state_mu); + gpr_mu_lock(&fd->mu); set_ready_locked(exec_ctx, fd, st); - gpr_mu_unlock(&fd->set_state_mu); + gpr_mu_unlock(&fd->mu); } void grpc_fd_shutdown(grpc_exec_ctx *exec_ctx, grpc_fd *fd) { - gpr_mu_lock(&fd->set_state_mu); + gpr_mu_lock(&fd->mu); GPR_ASSERT(!gpr_atm_no_barrier_load(&fd->shutdown)); - gpr_atm_rel_store(&fd->shutdown, 1); - set_ready_locked(exec_ctx, fd, &fd->readst); - set_ready_locked(exec_ctx, fd, &fd->writest); - gpr_mu_unlock(&fd->set_state_mu); + fd->shutdown = 1; + set_ready_locked(exec_ctx, fd, &fd->read_closure); + set_ready_locked(exec_ctx, fd, &fd->write_closure); + gpr_mu_unlock(&fd->mu); } void grpc_fd_notify_on_read(grpc_exec_ctx *exec_ctx, grpc_fd *fd, grpc_closure *closure) { - notify_on(exec_ctx, fd, &fd->readst, closure); + gpr_mu_lock(&fd->mu); + fdev_add(FDEV_NOTIFY_ON_READ, fd, NULL, NULL, NULL); + notify_on_locked(exec_ctx, fd, &fd->read_closure, closure); + gpr_mu_unlock(&fd->mu); } void grpc_fd_notify_on_write(grpc_exec_ctx *exec_ctx, grpc_fd *fd, grpc_closure *closure) { - notify_on(exec_ctx, fd, &fd->writest, closure); + gpr_mu_lock(&fd->mu); + fdev_add(FDEV_NOTIFY_ON_WRITE, fd, NULL, NULL, NULL); + notify_on_locked(exec_ctx, fd, &fd->write_closure, closure); + gpr_mu_unlock(&fd->mu); } gpr_uint32 grpc_fd_begin_poll(grpc_fd *fd, grpc_pollset *pollset, grpc_pollset_worker *worker, gpr_uint32 read_mask, gpr_uint32 write_mask, grpc_fd_watcher *watcher) { gpr_uint32 mask = 0; + grpc_closure *cur; + int requested; /* keep track of pollers that have requested our events, in case they change */ GRPC_FD_REF(fd, "poll"); - gpr_mu_lock(&fd->watcher_mu); + gpr_mu_lock(&fd->mu); + fdev_add(FDEV_BEGIN_POLL, fd, pollset, worker, watcher); + /* if we are shutdown, then don't add to the watcher set */ if (gpr_atm_no_barrier_load(&fd->shutdown)) { watcher->fd = NULL; watcher->pollset = NULL; watcher->worker = NULL; - gpr_mu_unlock(&fd->watcher_mu); + gpr_mu_unlock(&fd->mu); GRPC_FD_UNREF(fd, "poll"); return 0; } + /* if there is nobody polling for read, but we need to, then start doing so */ - if (read_mask && !fd->read_watcher && - (gpr_uintptr)gpr_atm_acq_load(&fd->readst) > READY) { + cur = fd->read_closure; + requested = cur != CLOSURE_READY; + if (read_mask && fd->read_watcher == NULL && requested) { fd->read_watcher = watcher; mask |= read_mask; } /* if there is nobody polling for write, but we need to, then start doing so */ - if (write_mask && !fd->write_watcher && - (gpr_uintptr)gpr_atm_acq_load(&fd->writest) > READY) { + cur = fd->write_closure; + requested = cur != CLOSURE_READY; + if (write_mask && fd->write_watcher == NULL && requested) { fd->write_watcher = watcher; mask |= write_mask; } @@ -378,7 +390,7 @@ gpr_uint32 grpc_fd_begin_poll(grpc_fd *fd, grpc_pollset *pollset, watcher->pollset = pollset; watcher->worker = worker; watcher->fd = fd; - gpr_mu_unlock(&fd->watcher_mu); + gpr_mu_unlock(&fd->mu); return mask; } @@ -393,17 +405,24 @@ void grpc_fd_end_poll(grpc_exec_ctx *exec_ctx, grpc_fd_watcher *watcher, return; } - gpr_mu_lock(&fd->watcher_mu); + gpr_mu_lock(&fd->mu); + + fdev_add(FDEV_END_POLL, watcher->fd, watcher->pollset, watcher->worker, watcher); + if (watcher == fd->read_watcher) { /* remove read watcher, kick if we still need a read */ was_polling = 1; - kick = kick || !got_read; + if (!got_read) { + kick = 1; + } fd->read_watcher = NULL; } if (watcher == fd->write_watcher) { /* remove write watcher, kick if we still need a write */ was_polling = 1; - kick = kick || !got_write; + if (!got_write) { + kick = 1; + } fd->write_watcher = NULL; } if (!was_polling && watcher->worker != NULL) { @@ -411,6 +430,16 @@ void grpc_fd_end_poll(grpc_exec_ctx *exec_ctx, grpc_fd_watcher *watcher, watcher->next->prev = watcher->prev; watcher->prev->next = watcher->next; } + if (got_read) { + if (set_ready_locked(exec_ctx, fd, &fd->read_closure)) { + kick = 1; + } + } + if (got_write) { + if (set_ready_locked(exec_ctx, fd, &fd->write_closure)) { + kick = 1; + } + } if (kick) { maybe_wake_one_watcher_locked(fd); } @@ -419,17 +448,17 @@ void grpc_fd_end_poll(grpc_exec_ctx *exec_ctx, grpc_fd_watcher *watcher, close(fd->fd); grpc_exec_ctx_enqueue(exec_ctx, fd->on_done_closure, 1); } - gpr_mu_unlock(&fd->watcher_mu); + gpr_mu_unlock(&fd->mu); GRPC_FD_UNREF(fd, "poll"); } void grpc_fd_become_readable(grpc_exec_ctx *exec_ctx, grpc_fd *fd) { - set_ready(exec_ctx, fd, &fd->readst); + set_ready(exec_ctx, fd, &fd->read_closure); } void grpc_fd_become_writable(grpc_exec_ctx *exec_ctx, grpc_fd *fd) { - set_ready(exec_ctx, fd, &fd->writest); + set_ready(exec_ctx, fd, &fd->write_closure); } #endif diff --git a/src/core/iomgr/fd_posix.h b/src/core/iomgr/fd_posix.h index a60aff2a096..b56931cb2b9 100644 --- a/src/core/iomgr/fd_posix.h +++ b/src/core/iomgr/fd_posix.h @@ -59,8 +59,8 @@ struct grpc_fd { and just unref by 1 when we're ready to flag the object as orphaned */ gpr_atm refst; - gpr_mu set_state_mu; - gpr_atm shutdown; + gpr_mu mu; + int shutdown; int closed; /* The watcher list. @@ -85,20 +85,22 @@ struct grpc_fd { If at a later time there becomes need of a poller to poll, one of the inactive pollers may be kicked out of their poll loops to take that responsibility. */ - gpr_mu watcher_mu; grpc_fd_watcher inactive_watcher_root; grpc_fd_watcher *read_watcher; grpc_fd_watcher *write_watcher; - gpr_atm readst; - gpr_atm writest; + grpc_closure *read_closure; + grpc_closure *write_closure; struct grpc_fd *freelist_next; grpc_closure *on_done_closure; - grpc_closure *shutdown_closures[2]; grpc_iomgr_object iomgr_object; + + size_t num_ev; + size_t cap_ev; + fd_event *ev; }; /* Create a wrapped file descriptor. diff --git a/src/core/iomgr/pollset_multipoller_with_poll_posix.c b/src/core/iomgr/pollset_multipoller_with_poll_posix.c index 79ff26dc040..ba0ba72816d 100644 --- a/src/core/iomgr/pollset_multipoller_with_poll_posix.c +++ b/src/core/iomgr/pollset_multipoller_with_poll_posix.c @@ -102,6 +102,9 @@ static void multipoll_with_poll_pollset_del_fd(grpc_exec_ctx *exec_ctx, static void multipoll_with_poll_pollset_maybe_work_and_unlock( grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, grpc_pollset_worker *worker, gpr_timespec deadline, gpr_timespec now) { +#define POLLOUT_CHECK (POLLOUT | POLLHUP | POLLERR) +#define POLLIN_CHECK (POLLIN | POLLHUP | POLLERR) + int timeout; int r; size_t i, j, fd_count; @@ -157,34 +160,29 @@ static void multipoll_with_poll_pollset_maybe_work_and_unlock( r = grpc_poll_function(pfds, pfd_count, timeout); GRPC_SCHEDULING_END_BLOCKING_REGION; - for (i = 2; i < pfd_count; i++) { - grpc_fd_end_poll(exec_ctx, &watchers[i], pfds[i].revents & POLLIN, - pfds[i].revents & POLLOUT); - } - if (r < 0) { - if (errno != EINTR) { - gpr_log(GPR_ERROR, "poll() failed: %s", strerror(errno)); + gpr_log(GPR_ERROR, "poll() failed: %s", strerror(errno)); + for (i = 2; i < pfd_count; i++) { + grpc_fd_end_poll(exec_ctx, &watchers[i], 0, 0); } } else if (r == 0) { - /* do nothing */ + for (i = 2; i < pfd_count; i++) { + grpc_fd_end_poll(exec_ctx, &watchers[i], 0, 0); + } } else { - if (pfds[0].revents & POLLIN) { + if (pfds[0].revents & POLLIN_CHECK) { grpc_wakeup_fd_consume_wakeup(&grpc_global_wakeup_fd); } - if (pfds[1].revents & POLLIN) { + if (pfds[1].revents & POLLIN_CHECK) { grpc_wakeup_fd_consume_wakeup(&worker->wakeup_fd); } for (i = 2; i < pfd_count; i++) { if (watchers[i].fd == NULL) { + grpc_fd_end_poll(exec_ctx, &watchers[i], 0, 0); continue; } - if (pfds[i].revents & (POLLIN | POLLHUP | POLLERR)) { - grpc_fd_become_readable(exec_ctx, watchers[i].fd); - } - if (pfds[i].revents & (POLLOUT | POLLHUP | POLLERR)) { - grpc_fd_become_writable(exec_ctx, watchers[i].fd); - } + grpc_fd_end_poll(exec_ctx, &watchers[i], pfds[i].revents & POLLIN_CHECK, + pfds[i].revents & POLLOUT_CHECK); } } diff --git a/src/core/iomgr/pollset_posix.c b/src/core/iomgr/pollset_posix.c index b26f03d0c7b..30750d95fc8 100644 --- a/src/core/iomgr/pollset_posix.c +++ b/src/core/iomgr/pollset_posix.c @@ -274,6 +274,7 @@ void grpc_pollset_work(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, } if (worker->reevaluate_polling_on_wakeup) { worker->reevaluate_polling_on_wakeup = 0; + pollset->kicked_without_pollers = 0; if (queued_work) { deadline = gpr_inf_past(GPR_CLOCK_MONOTONIC); } @@ -497,6 +498,9 @@ static void basic_pollset_maybe_work_and_unlock(grpc_exec_ctx *exec_ctx, grpc_pollset_worker *worker, gpr_timespec deadline, gpr_timespec now) { +#define POLLOUT_CHECK (POLLOUT | POLLHUP | POLLERR) +#define POLLIN_CHECK (POLLIN | POLLHUP | POLLERR) + struct pollfd pfd[3]; grpc_fd *fd; grpc_fd_watcher fd_watcher; @@ -539,31 +543,27 @@ static void basic_pollset_maybe_work_and_unlock(grpc_exec_ctx *exec_ctx, GRPC_SCHEDULING_END_BLOCKING_REGION; GRPC_TIMER_MARK(GRPC_PTAG_POLL_FINISHED, r); - if (fd) { - grpc_fd_end_poll(exec_ctx, &fd_watcher, pfd[2].revents & POLLIN, - pfd[2].revents & POLLOUT); - } - if (r < 0) { - if (errno != EINTR) { - gpr_log(GPR_ERROR, "poll() failed: %s", strerror(errno)); + gpr_log(GPR_ERROR, "poll() failed: %s", strerror(errno)); + if (fd) { + grpc_fd_end_poll(exec_ctx, &fd_watcher, 0, 0); } } else if (r == 0) { - /* do nothing */ + if (fd) { + grpc_fd_end_poll(exec_ctx, &fd_watcher, 0, 0); + } } else { - if (pfd[0].revents & POLLIN) { + if (pfd[0].revents & POLLIN_CHECK) { grpc_wakeup_fd_consume_wakeup(&grpc_global_wakeup_fd); } - if (pfd[1].revents & POLLIN) { + if (pfd[1].revents & POLLIN_CHECK) { grpc_wakeup_fd_consume_wakeup(&worker->wakeup_fd); } if (nfds > 2) { - if (pfd[2].revents & (POLLIN | POLLHUP | POLLERR)) { - grpc_fd_become_readable(exec_ctx, fd); - } - if (pfd[2].revents & (POLLOUT | POLLHUP | POLLERR)) { - grpc_fd_become_writable(exec_ctx, fd); - } + grpc_fd_end_poll(exec_ctx, &fd_watcher, pfd[2].revents & POLLIN_CHECK, + pfd[2].revents & POLLOUT_CHECK); + } else if (fd) { + grpc_fd_end_poll(exec_ctx, &fd_watcher, 0, 0); } } } From 57f79d641e70c07e7bbff518c8ad5189d3770d3c Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 2 Oct 2015 14:00:12 -0700 Subject: [PATCH 096/169] clang-format --- src/core/iomgr/fd_posix.c | 23 +++++++++++-------- src/core/iomgr/fd_posix.h | 5 ++-- .../pollset_multipoller_with_poll_posix.c | 2 +- src/core/iomgr/pollset_posix.c | 13 +++++++---- src/core/iomgr/pollset_posix.h | 3 ++- 5 files changed, 27 insertions(+), 19 deletions(-) diff --git a/src/core/iomgr/fd_posix.c b/src/core/iomgr/fd_posix.c index 567e1ff02ec..e086a71e12f 100644 --- a/src/core/iomgr/fd_posix.c +++ b/src/core/iomgr/fd_posix.c @@ -46,8 +46,8 @@ #include #include -#define CLOSURE_NOT_READY ((grpc_closure*)0) -#define CLOSURE_READY ((grpc_closure*)1) +#define CLOSURE_NOT_READY ((grpc_closure *)0) +#define CLOSURE_READY ((grpc_closure *)1) /* We need to keep a freelist not because of any concerns of malloc performance * but instead so that implementations with multiple threads in (for example) @@ -175,13 +175,16 @@ grpc_fd *grpc_fd_create(int fd, const char *name) { static int count_inactive(grpc_fd *fd) { int n = 0; grpc_fd_watcher *w; - for (w = fd->inactive_watcher_root.next; w != &fd->inactive_watcher_root; w = w->next) { + for (w = fd->inactive_watcher_root.next; w != &fd->inactive_watcher_root; + w = w->next) { n++; } return n; } -static void fdev_add(fd_event_type type, grpc_fd *fd, grpc_pollset *pollset, grpc_pollset_worker *pollset_worker, grpc_fd_watcher *fd_watcher) { +static void fdev_add(fd_event_type type, grpc_fd *fd, grpc_pollset *pollset, + grpc_pollset_worker *pollset_worker, + grpc_fd_watcher *fd_watcher) { fd_event *ev; if (fd->num_ev == fd->cap_ev) { fd->cap_ev = GPR_MAX(2 * fd->cap_ev, 32); @@ -210,7 +213,8 @@ static void pollset_kick_locked(grpc_fd_watcher *watcher, fd_event_type type) { fdev_add(type, watcher->fd, watcher->pollset, watcher->worker, watcher); gpr_mu_lock(GRPC_POLLSET_MU(watcher->pollset)); GPR_ASSERT(watcher->worker); - grpc_pollset_kick_ex(watcher->pollset, watcher->worker, GRPC_POLLSET_REEVALUATE_POLLING_ON_WAKEUP); + grpc_pollset_kick_ex(watcher->pollset, watcher->worker, + GRPC_POLLSET_REEVALUATE_POLLING_ON_WAKEUP); gpr_mu_unlock(GRPC_POLLSET_MU(watcher->pollset)); fdev_add(type + 1, watcher->fd, watcher->pollset, watcher->worker, watcher); } @@ -277,8 +281,8 @@ void grpc_fd_ref(grpc_fd *fd) { ref_by(fd, 2); } void grpc_fd_unref(grpc_fd *fd) { unref_by(fd, 2); } #endif -static void notify_on_locked(grpc_exec_ctx *exec_ctx, grpc_fd *fd, grpc_closure **st, - grpc_closure *closure) { +static void notify_on_locked(grpc_exec_ctx *exec_ctx, grpc_fd *fd, + grpc_closure **st, grpc_closure *closure) { if (*st == CLOSURE_NOT_READY) { *st = closure; } else if (*st == CLOSURE_READY) { @@ -296,7 +300,7 @@ static void notify_on_locked(grpc_exec_ctx *exec_ctx, grpc_fd *fd, grpc_closure /* returns 1 if state becomes not ready */ static int set_ready_locked(grpc_exec_ctx *exec_ctx, grpc_fd *fd, - grpc_closure **st) { + grpc_closure **st) { if (*st == CLOSURE_READY) { /* duplicate ready, ignore */ return 0; @@ -407,7 +411,8 @@ void grpc_fd_end_poll(grpc_exec_ctx *exec_ctx, grpc_fd_watcher *watcher, gpr_mu_lock(&fd->mu); - fdev_add(FDEV_END_POLL, watcher->fd, watcher->pollset, watcher->worker, watcher); + fdev_add(FDEV_END_POLL, watcher->fd, watcher->pollset, watcher->worker, + watcher); if (watcher == fd->read_watcher) { /* remove read watcher, kick if we still need a read */ diff --git a/src/core/iomgr/fd_posix.h b/src/core/iomgr/fd_posix.h index b56931cb2b9..8e6f2cfb52c 100644 --- a/src/core/iomgr/fd_posix.h +++ b/src/core/iomgr/fd_posix.h @@ -129,9 +129,8 @@ void grpc_fd_orphan(grpc_exec_ctx *exec_ctx, grpc_fd *fd, grpc_closure *on_done, fd's current interest (such as epoll) do not need to call this function. MUST NOT be called with a pollset lock taken */ gpr_uint32 grpc_fd_begin_poll(grpc_fd *fd, grpc_pollset *pollset, - grpc_pollset_worker *worker, - gpr_uint32 read_mask, gpr_uint32 write_mask, - grpc_fd_watcher *rec); + grpc_pollset_worker *worker, gpr_uint32 read_mask, + gpr_uint32 write_mask, grpc_fd_watcher *rec); /* Complete polling previously started with grpc_fd_begin_poll MUST NOT be called with a pollset lock taken */ void grpc_fd_end_poll(grpc_exec_ctx *exec_ctx, grpc_fd_watcher *rec, diff --git a/src/core/iomgr/pollset_multipoller_with_poll_posix.c b/src/core/iomgr/pollset_multipoller_with_poll_posix.c index ba0ba72816d..faa6c144913 100644 --- a/src/core/iomgr/pollset_multipoller_with_poll_posix.c +++ b/src/core/iomgr/pollset_multipoller_with_poll_posix.c @@ -103,7 +103,7 @@ static void multipoll_with_poll_pollset_maybe_work_and_unlock( grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, grpc_pollset_worker *worker, gpr_timespec deadline, gpr_timespec now) { #define POLLOUT_CHECK (POLLOUT | POLLHUP | POLLERR) -#define POLLIN_CHECK (POLLIN | POLLHUP | POLLERR) +#define POLLIN_CHECK (POLLIN | POLLHUP | POLLERR) int timeout; int r; diff --git a/src/core/iomgr/pollset_posix.c b/src/core/iomgr/pollset_posix.c index 5b7f7cce9a3..574ebc7c60a 100644 --- a/src/core/iomgr/pollset_posix.c +++ b/src/core/iomgr/pollset_posix.c @@ -98,7 +98,8 @@ static void push_front_worker(grpc_pollset *p, grpc_pollset_worker *worker) { worker->prev->next = worker->next->prev = worker; } -void grpc_pollset_kick_ex(grpc_pollset *p, grpc_pollset_worker *specific_worker, gpr_uint32 flags) { +void grpc_pollset_kick_ex(grpc_pollset *p, grpc_pollset_worker *specific_worker, + gpr_uint32 flags) { /* pollset->mu already held */ if (specific_worker != NULL) { if (specific_worker == GRPC_POLLSET_KICK_BROADCAST) { @@ -128,11 +129,13 @@ void grpc_pollset_kick_ex(grpc_pollset *p, grpc_pollset_worker *specific_worker, GPR_ASSERT((flags & GRPC_POLLSET_REEVALUATE_POLLING_ON_WAKEUP) == 0); specific_worker = pop_front_worker(p); if (specific_worker != NULL) { - if (gpr_tls_get(&g_current_thread_worker) == (gpr_intptr)specific_worker) { + if (gpr_tls_get(&g_current_thread_worker) == + (gpr_intptr)specific_worker) { push_back_worker(p, specific_worker); specific_worker = pop_front_worker(p); - if ((flags & GRPC_POLLSET_CAN_KICK_SELF) == 0 && - gpr_tls_get(&g_current_thread_worker) == (gpr_intptr)specific_worker) { + if ((flags & GRPC_POLLSET_CAN_KICK_SELF) == 0 && + gpr_tls_get(&g_current_thread_worker) == + (gpr_intptr)specific_worker) { push_back_worker(p, specific_worker); return; } @@ -497,7 +500,7 @@ static void basic_pollset_maybe_work_and_unlock(grpc_exec_ctx *exec_ctx, gpr_timespec deadline, gpr_timespec now) { #define POLLOUT_CHECK (POLLOUT | POLLHUP | POLLERR) -#define POLLIN_CHECK (POLLIN | POLLHUP | POLLERR) +#define POLLIN_CHECK (POLLIN | POLLHUP | POLLERR) struct pollfd pfd[3]; grpc_fd *fd; diff --git a/src/core/iomgr/pollset_posix.h b/src/core/iomgr/pollset_posix.h index 762582c79df..d3752076434 100644 --- a/src/core/iomgr/pollset_posix.h +++ b/src/core/iomgr/pollset_posix.h @@ -114,7 +114,8 @@ int grpc_poll_deadline_to_millis_timeout(gpr_timespec deadline, #define GRPC_POLLSET_CAN_KICK_SELF 1 #define GRPC_POLLSET_REEVALUATE_POLLING_ON_WAKEUP 2 -void grpc_pollset_kick_ex(grpc_pollset *p, grpc_pollset_worker *specific_worker, gpr_uint32 flags); +void grpc_pollset_kick_ex(grpc_pollset *p, grpc_pollset_worker *specific_worker, + gpr_uint32 flags); /* turn a pollset into a multipoller: platform specific */ typedef void (*grpc_platform_become_multipoller_type)(grpc_exec_ctx *exec_ctx, From 210a0ea598d44d725518ee68a27ad185fb0c16b0 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Fri, 2 Oct 2015 15:05:36 -0700 Subject: [PATCH 097/169] tweaking of run_interop_tests.py --- tools/run_tests/dockerjob.py | 5 ++++- tools/run_tests/run_interop_tests.py | 11 +++++++---- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/tools/run_tests/dockerjob.py b/tools/run_tests/dockerjob.py index e938a3c2f7f..11686d46b09 100755 --- a/tools/run_tests/dockerjob.py +++ b/tools/run_tests/dockerjob.py @@ -44,7 +44,10 @@ def wait_for_file(filepath, timeout_seconds=15): while time.time() - started < timeout_seconds: if os.path.isfile(filepath): with open(filepath, 'r') as f: - return f.read() + content = f.read() + # make sure we don't return empty content + if content: + return content time.sleep(1) raise Exception('Failed to read file %s.' % filepath) diff --git a/tools/run_tests/run_interop_tests.py b/tools/run_tests/run_interop_tests.py index 274eaa33363..46b34fea4c0 100755 --- a/tools/run_tests/run_interop_tests.py +++ b/tools/run_tests/run_interop_tests.py @@ -35,6 +35,7 @@ import dockerjob import itertools import xml.etree.cElementTree as ET import jobset +import multiprocessing import os import subprocess import sys @@ -224,10 +225,11 @@ _LANGUAGES = { # TODO(jtattermusch): enable other languages as servers as well _SERVERS = ['c++', 'node', 'csharp', 'java'] +# TODO(jtattermusch): add empty_stream once PHP starts supporting it. # TODO(jtattermusch): add timeout_on_sleeping_server once java starts supporting it. # TODO(jtattermusch): add support for auth tests. _TEST_CASES = ['large_unary', 'empty_unary', 'ping_pong', - 'empty_stream', 'client_streaming', 'server_streaming', + 'client_streaming', 'server_streaming', 'cancel_after_begin', 'cancel_after_first_response'] @@ -274,7 +276,7 @@ def cloud_to_prod_jobspec(language, test_case, docker_image=None): cwd=cwd, environ=environ, shortname="cloud_to_prod:%s:%s" % (language, test_case), - timeout_seconds=60, + timeout_seconds=2*60, flake_retries=5 if args.allow_flakes else 0, timeout_retries=2 if args.allow_flakes else 0) return test_job @@ -299,7 +301,7 @@ def cloud_to_cloud_jobspec(language, test_case, server_name, server_host, cwd=cwd, shortname="cloud_to_cloud:%s:%s_server:%s" % (language, server_name, test_case), - timeout_seconds=60, + timeout_seconds=2*60, flake_retries=5 if args.allow_flakes else 0, timeout_retries=2 if args.allow_flakes else 0) return test_job @@ -346,7 +348,7 @@ argp.add_argument('-l', '--language', nargs='+', default=['all'], help='Clients to run.') -argp.add_argument('-j', '--jobs', default=24, type=int) +argp.add_argument('-j', '--jobs', default=multiprocessing.cpu_count(), type=int) argp.add_argument('--cloud_to_prod', default=False, action='store_const', @@ -437,6 +439,7 @@ try: server_jobs[lang] = job server_addresses[lang] = ('localhost', job.mapped_port(_DEFAULT_SERVER_PORT)) + jobs = [] if args.cloud_to_prod: for language in languages: From 4d97707751dd0912225e14ef469da762b62f6979 Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Fri, 2 Oct 2015 23:52:38 +0200 Subject: [PATCH 098/169] Adding crude html report support. --- .gitignore | 1 + tools/jenkins/build_docker_and_run_tests.sh | 4 ++++ tools/jenkins/docker_run_tests.sh | 14 ++++++++++++++ tools/run_tests/run_node.sh | 8 ++++---- 4 files changed, 23 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 8dc459ea276..18b42811b28 100644 --- a/.gitignore +++ b/.gitignore @@ -8,6 +8,7 @@ objs python*_virtual_environment # gcov coverage data +reports coverage *.gcno diff --git a/tools/jenkins/build_docker_and_run_tests.sh b/tools/jenkins/build_docker_and_run_tests.sh index 9f97f39e75d..2c562e992aa 100755 --- a/tools/jenkins/build_docker_and_run_tests.sh +++ b/tools/jenkins/build_docker_and_run_tests.sh @@ -74,6 +74,10 @@ then docker cp "$DOCKER_CID:/var/local/git/grpc/$XML_REPORT" $git_root fi +docker cp "$DOCKER_CID:/var/local/git/grpc/reports.zip" $git_root || true +unzip $git_root/reports.zip -d $git_root || true +rm -f reports.zip + # remove the container, possibly killing it first docker rm -f $DOCKER_CID || true diff --git a/tools/jenkins/docker_run_tests.sh b/tools/jenkins/docker_run_tests.sh index 3595a95f5ce..2e39bc6f51e 100755 --- a/tools/jenkins/docker_run_tests.sh +++ b/tools/jenkins/docker_run_tests.sh @@ -42,4 +42,18 @@ git clone --recursive /var/local/jenkins/grpc /var/local/git/grpc nvm use 0.12 rvm use ruby-2.1 +mkdir -p reports + $RUN_TESTS_COMMAND + +cd reports +echo '' > index.html +find . -maxdepth 1 -mindepth 1 -type d | sort | while read d ; do + d=${d#*/} + n=${d//_/ } + echo "$n
" >> index.html +done +echo '' >> index.html +cd .. + +zip -r reports.zip reports diff --git a/tools/run_tests/run_node.sh b/tools/run_tests/run_node.sh index 1043b447db3..e322ab1995a 100755 --- a/tools/run_tests/run_node.sh +++ b/tools/run_tests/run_node.sh @@ -43,13 +43,13 @@ export LD_LIBRARY_PATH=$root/libs/$CONFIG if [ "$CONFIG" = "gcov" ] then - ./node_modules/.bin/istanbul cover ./node_modules/.bin/_mocha -- \ - --timeout 8000 + ./node_modules/.bin/istanbul cover --dir ../../reports/node_coverage \ + ./node_modules/.bin/_mocha -- --timeout 8000 cd build gcov Release/obj.target/grpc/ext/*.o lcov --base-directory . --directory . -c -o coverage.info - genhtml -o ../ext_coverage --num-spaces 2 -t 'Node gRPC test coverage' \ - coverage.info + genhtml -o ../../../reports/node_ext_coverage --num-spaces 2 \ + -t 'Node gRPC test coverage' coverage.info else ./node_modules/mocha/bin/mocha --timeout 8000 fi From 1270b2b36b8c40aec10cdae72a849ec4c6f3ce48 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 2 Oct 2015 16:12:25 -0700 Subject: [PATCH 099/169] Debug cleanup --- src/core/iomgr/fd_posix.c | 62 +++++---------------------------------- src/core/iomgr/fd_posix.h | 4 --- 2 files changed, 7 insertions(+), 59 deletions(-) diff --git a/src/core/iomgr/fd_posix.c b/src/core/iomgr/fd_posix.c index e086a71e12f..dc4aabb668f 100644 --- a/src/core/iomgr/fd_posix.c +++ b/src/core/iomgr/fd_posix.c @@ -44,7 +44,6 @@ #include #include #include -#include #define CLOSURE_NOT_READY ((grpc_closure *)0) #define CLOSURE_READY ((grpc_closure *)1) @@ -69,8 +68,6 @@ static grpc_fd *fd_freelist = NULL; static gpr_mu fd_freelist_mu; -static long gettid(void) { return syscall(__NR_gettid); } - static void freelist_fd(grpc_fd *fd) { gpr_mu_lock(&fd_freelist_mu); fd->freelist_next = fd_freelist; @@ -90,8 +87,6 @@ static grpc_fd *alloc_fd(int fd) { if (r == NULL) { r = gpr_malloc(sizeof(grpc_fd)); gpr_mu_init(&r->mu); - r->cap_ev = 0; - r->ev = NULL; } gpr_atm_rel_store(&r->refst, 1); @@ -105,13 +100,11 @@ static grpc_fd *alloc_fd(int fd) { r->read_watcher = r->write_watcher = NULL; r->on_done_closure = NULL; r->closed = 0; - r->num_ev = 0; return r; } static void destroy(grpc_fd *fd) { gpr_mu_destroy(&fd->mu); - gpr_free(fd->ev); gpr_free(fd); } @@ -172,60 +165,25 @@ grpc_fd *grpc_fd_create(int fd, const char *name) { return r; } -static int count_inactive(grpc_fd *fd) { - int n = 0; - grpc_fd_watcher *w; - for (w = fd->inactive_watcher_root.next; w != &fd->inactive_watcher_root; - w = w->next) { - n++; - } - return n; -} - -static void fdev_add(fd_event_type type, grpc_fd *fd, grpc_pollset *pollset, - grpc_pollset_worker *pollset_worker, - grpc_fd_watcher *fd_watcher) { - fd_event *ev; - if (fd->num_ev == fd->cap_ev) { - fd->cap_ev = GPR_MAX(2 * fd->cap_ev, 32); - fd->ev = gpr_realloc(fd->ev, sizeof(*fd->ev) * fd->cap_ev); - } - ev = &fd->ev[fd->num_ev++]; - ev->thread = gettid(); - ev->type = type; - ev->pollset = pollset; - ev->pollset_worker = pollset_worker; - ev->watcher = fd_watcher; - ev->shutdown = fd->shutdown; - ev->closed = fd->closed; - ev->read_closure = fd->read_closure; - ev->write_closure = fd->write_closure; - ev->read_watcher = fd->read_watcher; - ev->write_watcher = fd->write_watcher; - ev->num_inactive = count_inactive(fd); -} - int grpc_fd_is_orphaned(grpc_fd *fd) { return (gpr_atm_acq_load(&fd->refst) & 1) == 0; } -static void pollset_kick_locked(grpc_fd_watcher *watcher, fd_event_type type) { - fdev_add(type, watcher->fd, watcher->pollset, watcher->worker, watcher); +static void pollset_kick_locked(grpc_fd_watcher *watcher) { gpr_mu_lock(GRPC_POLLSET_MU(watcher->pollset)); GPR_ASSERT(watcher->worker); grpc_pollset_kick_ex(watcher->pollset, watcher->worker, GRPC_POLLSET_REEVALUATE_POLLING_ON_WAKEUP); gpr_mu_unlock(GRPC_POLLSET_MU(watcher->pollset)); - fdev_add(type + 1, watcher->fd, watcher->pollset, watcher->worker, watcher); } static void maybe_wake_one_watcher_locked(grpc_fd *fd) { if (fd->inactive_watcher_root.next != &fd->inactive_watcher_root) { - pollset_kick_locked(fd->inactive_watcher_root.next, FDEV_KICK_INACTIVE); + pollset_kick_locked(fd->inactive_watcher_root.next); } else if (fd->read_watcher) { - pollset_kick_locked(fd->read_watcher, FDEV_KICK_READER); + pollset_kick_locked(fd->read_watcher); } else if (fd->write_watcher) { - pollset_kick_locked(fd->write_watcher, FDEV_KICK_WRITER); + pollset_kick_locked(fd->write_watcher); } } @@ -233,13 +191,13 @@ static void wake_all_watchers_locked(grpc_fd *fd) { grpc_fd_watcher *watcher; for (watcher = fd->inactive_watcher_root.next; watcher != &fd->inactive_watcher_root; watcher = watcher->next) { - pollset_kick_locked(watcher, FDEV_KICK_INACTIVE); + pollset_kick_locked(watcher); } if (fd->read_watcher) { - pollset_kick_locked(fd->read_watcher, FDEV_KICK_READER); + pollset_kick_locked(fd->read_watcher); } if (fd->write_watcher && fd->write_watcher != fd->read_watcher) { - pollset_kick_locked(fd->write_watcher, FDEV_KICK_WRITER); + pollset_kick_locked(fd->write_watcher); } } @@ -334,7 +292,6 @@ void grpc_fd_shutdown(grpc_exec_ctx *exec_ctx, grpc_fd *fd) { void grpc_fd_notify_on_read(grpc_exec_ctx *exec_ctx, grpc_fd *fd, grpc_closure *closure) { gpr_mu_lock(&fd->mu); - fdev_add(FDEV_NOTIFY_ON_READ, fd, NULL, NULL, NULL); notify_on_locked(exec_ctx, fd, &fd->read_closure, closure); gpr_mu_unlock(&fd->mu); } @@ -342,7 +299,6 @@ void grpc_fd_notify_on_read(grpc_exec_ctx *exec_ctx, grpc_fd *fd, void grpc_fd_notify_on_write(grpc_exec_ctx *exec_ctx, grpc_fd *fd, grpc_closure *closure) { gpr_mu_lock(&fd->mu); - fdev_add(FDEV_NOTIFY_ON_WRITE, fd, NULL, NULL, NULL); notify_on_locked(exec_ctx, fd, &fd->write_closure, closure); gpr_mu_unlock(&fd->mu); } @@ -358,7 +314,6 @@ gpr_uint32 grpc_fd_begin_poll(grpc_fd *fd, grpc_pollset *pollset, GRPC_FD_REF(fd, "poll"); gpr_mu_lock(&fd->mu); - fdev_add(FDEV_BEGIN_POLL, fd, pollset, worker, watcher); /* if we are shutdown, then don't add to the watcher set */ if (gpr_atm_no_barrier_load(&fd->shutdown)) { @@ -411,9 +366,6 @@ void grpc_fd_end_poll(grpc_exec_ctx *exec_ctx, grpc_fd_watcher *watcher, gpr_mu_lock(&fd->mu); - fdev_add(FDEV_END_POLL, watcher->fd, watcher->pollset, watcher->worker, - watcher); - if (watcher == fd->read_watcher) { /* remove read watcher, kick if we still need a read */ was_polling = 1; diff --git a/src/core/iomgr/fd_posix.h b/src/core/iomgr/fd_posix.h index 8e6f2cfb52c..ca3d065abcb 100644 --- a/src/core/iomgr/fd_posix.h +++ b/src/core/iomgr/fd_posix.h @@ -97,10 +97,6 @@ struct grpc_fd { grpc_closure *on_done_closure; grpc_iomgr_object iomgr_object; - - size_t num_ev; - size_t cap_ev; - fd_event *ev; }; /* Create a wrapped file descriptor. From 2c1c00055b11bf9d54998ec2ac98e2464e4b07bd Mon Sep 17 00:00:00 2001 From: yang-g Date: Fri, 2 Oct 2015 16:15:05 -0700 Subject: [PATCH 100/169] Pollset can be destroyed again in pollset_work if the called_shutdown is not set here --- src/core/iomgr/pollset_posix.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/core/iomgr/pollset_posix.c b/src/core/iomgr/pollset_posix.c index 82a82cc0644..418502d1c6d 100644 --- a/src/core/iomgr/pollset_posix.c +++ b/src/core/iomgr/pollset_posix.c @@ -354,6 +354,7 @@ static void basic_do_promote(grpc_exec_ctx *exec_ctx, void *args, int success) { if (pollset->shutting_down) { /* We don't care about this pollset anymore. */ if (pollset->in_flight_cbs == 0 && !pollset->called_shutdown) { + pollset->called_shutdown = 1; finish_shutdown(exec_ctx, pollset); } } else if (grpc_fd_is_orphaned(fd)) { From 548735efb8d27b61db8eae3752b4fffb1ae4bcd9 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 2 Oct 2015 16:17:10 -0700 Subject: [PATCH 101/169] Commentary --- src/core/iomgr/fd_posix.h | 4 +++- src/core/iomgr/pollset_posix.h | 4 ++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/core/iomgr/fd_posix.h b/src/core/iomgr/fd_posix.h index ca3d065abcb..b85c74b52b6 100644 --- a/src/core/iomgr/fd_posix.h +++ b/src/core/iomgr/fd_posix.h @@ -128,7 +128,9 @@ gpr_uint32 grpc_fd_begin_poll(grpc_fd *fd, grpc_pollset *pollset, grpc_pollset_worker *worker, gpr_uint32 read_mask, gpr_uint32 write_mask, grpc_fd_watcher *rec); /* Complete polling previously started with grpc_fd_begin_poll - MUST NOT be called with a pollset lock taken */ + MUST NOT be called with a pollset lock taken + if got_read or got_write are 1, also does the notify_on_{read,write} as + appropriate. */ void grpc_fd_end_poll(grpc_exec_ctx *exec_ctx, grpc_fd_watcher *rec, int got_read, int got_write); diff --git a/src/core/iomgr/pollset_posix.h b/src/core/iomgr/pollset_posix.h index d3752076434..f0ec07ebce9 100644 --- a/src/core/iomgr/pollset_posix.h +++ b/src/core/iomgr/pollset_posix.h @@ -112,8 +112,12 @@ void grpc_kick_drain(grpc_pollset *p); int grpc_poll_deadline_to_millis_timeout(gpr_timespec deadline, gpr_timespec now); +/* Allow kick to wakeup the currently polling worker */ #define GRPC_POLLSET_CAN_KICK_SELF 1 +/* Force the wakee to repoll when awoken */ #define GRPC_POLLSET_REEVALUATE_POLLING_ON_WAKEUP 2 +/* As per grpc_pollset_kick, with an extended set of flags (defined above) + -- mostly for fd_posix's use. */ void grpc_pollset_kick_ex(grpc_pollset *p, grpc_pollset_worker *specific_worker, gpr_uint32 flags); From ce04de0671435d50d82a50ec1c66985596959a52 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 2 Oct 2015 16:17:49 -0700 Subject: [PATCH 102/169] Commentary --- src/core/iomgr/fd_posix.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/iomgr/fd_posix.h b/src/core/iomgr/fd_posix.h index b85c74b52b6..dc917ebbc0f 100644 --- a/src/core/iomgr/fd_posix.h +++ b/src/core/iomgr/fd_posix.h @@ -129,7 +129,7 @@ gpr_uint32 grpc_fd_begin_poll(grpc_fd *fd, grpc_pollset *pollset, gpr_uint32 write_mask, grpc_fd_watcher *rec); /* Complete polling previously started with grpc_fd_begin_poll MUST NOT be called with a pollset lock taken - if got_read or got_write are 1, also does the notify_on_{read,write} as + if got_read or got_write are 1, also does the become_{readable,writable} as appropriate. */ void grpc_fd_end_poll(grpc_exec_ctx *exec_ctx, grpc_fd_watcher *rec, int got_read, int got_write); From c04610357ca9c7bfc993849a150c40872a13f50a Mon Sep 17 00:00:00 2001 From: yang-g Date: Fri, 2 Oct 2015 16:22:43 -0700 Subject: [PATCH 103/169] The Writes may return false after the server cancels the stream --- test/cpp/end2end/end2end_test.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/test/cpp/end2end/end2end_test.cc b/test/cpp/end2end/end2end_test.cc index 0322b2dabef..4ba1ee0c056 100644 --- a/test/cpp/end2end/end2end_test.cc +++ b/test/cpp/end2end/end2end_test.cc @@ -683,10 +683,14 @@ TEST_P(End2endTest, RequestStreamServerEarlyCancelTest) { auto stream = stub_->RequestStream(&context, &response); request.set_message("hello"); int send_messages = 20; - while (send_messages > 0) { + while (send_messages > 10) { EXPECT_TRUE(stream->Write(request)); send_messages--; } + while (send_messages > 0) { + stream->Write(request); + send_messages--; + } stream->WritesDone(); Status s = stream->Finish(); EXPECT_EQ(s.error_code(), StatusCode::CANCELLED); From 861fbcbf22b2aae7d8793051ce6ef598fc6e074a Mon Sep 17 00:00:00 2001 From: Masood Malekghassemi Date: Wed, 19 Aug 2015 16:31:36 -0700 Subject: [PATCH 104/169] Coalesce GRPC_TRACE=surface,batch into GRPC_TRACE=surface --- src/core/surface/call.h | 9 ++++----- src/core/surface/call_log_batch.c | 2 -- src/core/surface/init.c | 1 - 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/src/core/surface/call.h b/src/core/surface/call.h index 7ac0c92ab73..b1a1045792b 100644 --- a/src/core/surface/call.h +++ b/src/core/surface/call.h @@ -36,6 +36,7 @@ #include "src/core/channel/channel_stack.h" #include "src/core/channel/context.h" +#include "src/core/surface/surface_trace.h" #include #ifdef __cplusplus @@ -128,8 +129,6 @@ grpc_call_stack *grpc_call_get_call_stack(grpc_call *call); /* Given the top call_element, get the call object. */ grpc_call *grpc_call_from_top_element(grpc_call_element *surface_element); -extern int grpc_trace_batch; - void grpc_call_log_batch(char *file, int line, gpr_log_severity severity, grpc_call *call, const grpc_op *ops, size_t nops, void *tag); @@ -155,17 +154,17 @@ void grpc_call_context_set(grpc_call *call, grpc_context_index elem, void *grpc_call_context_get(grpc_call *call, grpc_context_index elem); #define GRPC_CALL_LOG_BATCH(sev, call, ops, nops, tag) \ - if (grpc_trace_batch) grpc_call_log_batch(sev, call, ops, nops, tag) + if (grpc_surface_trace) grpc_call_log_batch(sev, call, ops, nops, tag) #define GRPC_SERVER_LOG_REQUEST_CALL(sev, server, call, details, \ initial_metadata, cq_bound_to_call, \ cq_for_notifications, tag) \ - if (grpc_trace_batch) \ + if (grpc_surface_trace) \ grpc_server_log_request_call(sev, server, call, details, initial_metadata, \ cq_bound_to_call, cq_for_notifications, tag) #define GRPC_SERVER_LOG_SHUTDOWN(sev, server, cq, tag) \ - if (grpc_trace_batch) grpc_server_log_shutdown(sev, server, cq, tag) + if (grpc_surface_trace) grpc_server_log_shutdown(sev, server, cq, tag) gpr_uint8 grpc_call_is_client(grpc_call *call); diff --git a/src/core/surface/call_log_batch.c b/src/core/surface/call_log_batch.c index 5a3ef1e5f4b..2dd9737cf87 100644 --- a/src/core/surface/call_log_batch.c +++ b/src/core/surface/call_log_batch.c @@ -37,8 +37,6 @@ #include #include -int grpc_trace_batch = 0; - static void add_metadata(gpr_strvec *b, const grpc_metadata *md, size_t count) { size_t i; for (i = 0; i < count; i++) { diff --git a/src/core/surface/init.c b/src/core/surface/init.c index 93c27c77bf6..7d7e72440ea 100644 --- a/src/core/surface/init.c +++ b/src/core/surface/init.c @@ -102,7 +102,6 @@ void grpc_init(void) { grpc_register_tracer("surface", &grpc_surface_trace); grpc_register_tracer("http", &grpc_http_trace); grpc_register_tracer("flowctl", &grpc_flowctl_trace); - grpc_register_tracer("batch", &grpc_trace_batch); grpc_register_tracer("connectivity_state", &grpc_connectivity_state_trace); grpc_security_pre_init(); grpc_iomgr_init(); From 76c3d7481f56ad1a9ab928c3e423030fa440a729 Mon Sep 17 00:00:00 2001 From: Masood Malekghassemi Date: Wed, 19 Aug 2015 18:22:53 -0700 Subject: [PATCH 105/169] Add API tracing to gRPC core --- build.json | 2729 +++++++++++++++++ src/core/census/grpc_context.c | 4 + .../resolvers/zookeeper_resolver.c | 2 + src/core/compression/algorithm.c | 13 + src/core/security/credentials.c | 40 + .../security/google_default_credentials.c | 4 + src/core/security/security_context.c | 24 + src/core/security/server_secure_chttp2.c | 5 + src/core/surface/api_trace.c | 36 + src/core/surface/api_trace.h | 65 + src/core/surface/call.c | 13 + src/core/surface/call_details.c | 4 + src/core/surface/channel.c | 24 + src/core/surface/channel_connectivity.c | 12 + src/core/surface/channel_create.c | 4 + src/core/surface/completion_queue.c | 18 + src/core/surface/init.c | 6 + src/core/surface/lame_client.c | 5 + src/core/surface/metadata_array.c | 4 + src/core/surface/secure_channel_create.c | 5 + src/core/surface/server.c | 28 + src/core/surface/server_chttp2.c | 4 + src/core/surface/server_create.c | 3 +- src/core/surface/version.c | 8 +- 24 files changed, 3058 insertions(+), 2 deletions(-) create mode 100644 build.json create mode 100644 src/core/surface/api_trace.c create mode 100644 src/core/surface/api_trace.h diff --git a/build.json b/build.json new file mode 100644 index 00000000000..c68569e9f1a --- /dev/null +++ b/build.json @@ -0,0 +1,2729 @@ +{ + "#1": "This file describes the list of targets and dependencies.", + "#2": "It is used among other things to generate all of our project files.", + "#3": "Please refer to the templates directory for more information.", + "settings": { + "#": "The public version number of the library.", + "version": { + "major": 0, + "minor": 10, + "micro": 1, + "build": 0 + } + }, + "filegroups": [ + { + "name": "census", + "public_headers": [ + "include/grpc/census.h" + ], + "headers": [ + "src/core/census/context.h", + "src/core/census/rpc_stat_id.h" + ], + "src": [ + "src/core/census/context.c", + "src/core/census/initialize.c", + "src/core/census/record_stat.c" + ] + }, + { + "name": "grpc++_base", + "public_headers": [ + "include/grpc++/channel.h", + "include/grpc++/client_context.h", + "include/grpc++/completion_queue.h", + "include/grpc++/create_channel.h", + "include/grpc++/credentials.h", + "include/grpc++/generic/async_generic_service.h", + "include/grpc++/generic/generic_stub.h", + "include/grpc++/impl/call.h", + "include/grpc++/impl/client_unary_call.h", + "include/grpc++/impl/grpc_library.h", + "include/grpc++/impl/proto_utils.h", + "include/grpc++/impl/rpc_method.h", + "include/grpc++/impl/rpc_service_method.h", + "include/grpc++/impl/serialization_traits.h", + "include/grpc++/impl/service_type.h", + "include/grpc++/impl/sync.h", + "include/grpc++/impl/sync_cxx11.h", + "include/grpc++/impl/sync_no_cxx11.h", + "include/grpc++/impl/thd.h", + "include/grpc++/impl/thd_cxx11.h", + "include/grpc++/impl/thd_no_cxx11.h", + "include/grpc++/server.h", + "include/grpc++/server_builder.h", + "include/grpc++/server_context.h", + "include/grpc++/server_credentials.h", + "include/grpc++/support/async_stream.h", + "include/grpc++/support/async_unary_call.h", + "include/grpc++/support/auth_context.h", + "include/grpc++/support/byte_buffer.h", + "include/grpc++/support/channel_arguments.h", + "include/grpc++/support/config.h", + "include/grpc++/support/config_protobuf.h", + "include/grpc++/support/slice.h", + "include/grpc++/support/status.h", + "include/grpc++/support/status_code_enum.h", + "include/grpc++/support/string_ref.h", + "include/grpc++/support/stub_options.h", + "include/grpc++/support/sync_stream.h", + "include/grpc++/support/time.h" + ], + "headers": [ + "src/cpp/client/create_channel_internal.h", + "src/cpp/common/create_auth_context.h", + "src/cpp/server/dynamic_thread_pool.h", + "src/cpp/server/fixed_size_thread_pool.h", + "src/cpp/server/thread_pool_interface.h" + ], + "src": [ + "src/cpp/client/channel.cc", + "src/cpp/client/channel_arguments.cc", + "src/cpp/client/client_context.cc", + "src/cpp/client/create_channel.cc", + "src/cpp/client/create_channel_internal.cc", + "src/cpp/client/credentials.cc", + "src/cpp/client/generic_stub.cc", + "src/cpp/client/insecure_credentials.cc", + "src/cpp/common/call.cc", + "src/cpp/common/completion_queue.cc", + "src/cpp/common/rpc_method.cc", + "src/cpp/proto/proto_utils.cc", + "src/cpp/server/async_generic_service.cc", + "src/cpp/server/create_default_thread_pool.cc", + "src/cpp/server/dynamic_thread_pool.cc", + "src/cpp/server/fixed_size_thread_pool.cc", + "src/cpp/server/insecure_server_credentials.cc", + "src/cpp/server/server.cc", + "src/cpp/server/server_builder.cc", + "src/cpp/server/server_context.cc", + "src/cpp/server/server_credentials.cc", + "src/cpp/util/byte_buffer.cc", + "src/cpp/util/slice.cc", + "src/cpp/util/status.cc", + "src/cpp/util/string_ref.cc", + "src/cpp/util/time.cc" + ] + }, + { + "name": "grpc_base", + "public_headers": [ + "include/grpc/byte_buffer.h", + "include/grpc/byte_buffer_reader.h", + "include/grpc/compression.h", + "include/grpc/grpc.h", + "include/grpc/status.h" + ], + "headers": [ + "src/core/census/grpc_filter.h", + "src/core/channel/channel_args.h", + "src/core/channel/channel_stack.h", + "src/core/channel/client_channel.h", + "src/core/channel/compress_filter.h", + "src/core/channel/connected_channel.h", + "src/core/channel/context.h", + "src/core/channel/http_client_filter.h", + "src/core/channel/http_server_filter.h", + "src/core/channel/noop_filter.h", + "src/core/client_config/client_config.h", + "src/core/client_config/connector.h", + "src/core/client_config/lb_policies/pick_first.h", + "src/core/client_config/lb_policy.h", + "src/core/client_config/resolver.h", + "src/core/client_config/resolver_factory.h", + "src/core/client_config/resolver_registry.h", + "src/core/client_config/resolvers/dns_resolver.h", + "src/core/client_config/resolvers/sockaddr_resolver.h", + "src/core/client_config/subchannel.h", + "src/core/client_config/subchannel_factory.h", + "src/core/client_config/subchannel_factory_decorators/add_channel_arg.h", + "src/core/client_config/subchannel_factory_decorators/merge_channel_args.h", + "src/core/client_config/uri_parser.h", + "src/core/compression/message_compress.h", + "src/core/debug/trace.h", + "src/core/httpcli/format_request.h", + "src/core/httpcli/httpcli.h", + "src/core/httpcli/parser.h", + "src/core/iomgr/alarm.h", + "src/core/iomgr/alarm_heap.h", + "src/core/iomgr/alarm_internal.h", + "src/core/iomgr/endpoint.h", + "src/core/iomgr/endpoint_pair.h", + "src/core/iomgr/fd_posix.h", + "src/core/iomgr/iocp_windows.h", + "src/core/iomgr/iomgr.h", + "src/core/iomgr/iomgr_internal.h", + "src/core/iomgr/iomgr_posix.h", + "src/core/iomgr/pollset.h", + "src/core/iomgr/pollset_posix.h", + "src/core/iomgr/pollset_set.h", + "src/core/iomgr/pollset_set_posix.h", + "src/core/iomgr/pollset_set_windows.h", + "src/core/iomgr/pollset_windows.h", + "src/core/iomgr/resolve_address.h", + "src/core/iomgr/sockaddr.h", + "src/core/iomgr/sockaddr_posix.h", + "src/core/iomgr/sockaddr_utils.h", + "src/core/iomgr/sockaddr_win32.h", + "src/core/iomgr/socket_utils_posix.h", + "src/core/iomgr/socket_windows.h", + "src/core/iomgr/tcp_client.h", + "src/core/iomgr/tcp_posix.h", + "src/core/iomgr/tcp_server.h", + "src/core/iomgr/tcp_windows.h", + "src/core/iomgr/time_averaged_stats.h", + "src/core/iomgr/udp_server.h", + "src/core/iomgr/wakeup_fd_pipe.h", + "src/core/iomgr/wakeup_fd_posix.h", + "src/core/json/json.h", + "src/core/json/json_common.h", + "src/core/json/json_reader.h", + "src/core/json/json_writer.h", + "src/core/profiling/timers.h", + "src/core/profiling/timers_preciseclock.h", + "src/core/statistics/census_interface.h", + "src/core/statistics/census_rpc_stats.h", + "src/core/surface/byte_buffer_queue.h", + "src/core/surface/call.h", + "src/core/surface/channel.h", + "src/core/surface/completion_queue.h", + "src/core/surface/event_string.h", + "src/core/surface/init.h", + "src/core/surface/server.h", + "src/core/surface/surface_trace.h", + "src/core/transport/chttp2/alpn.h", + "src/core/transport/chttp2/bin_encoder.h", + "src/core/transport/chttp2/frame.h", + "src/core/transport/chttp2/frame_data.h", + "src/core/transport/chttp2/frame_goaway.h", + "src/core/transport/chttp2/frame_ping.h", + "src/core/transport/chttp2/frame_rst_stream.h", + "src/core/transport/chttp2/frame_settings.h", + "src/core/transport/chttp2/frame_window_update.h", + "src/core/transport/chttp2/hpack_parser.h", + "src/core/transport/chttp2/hpack_table.h", + "src/core/transport/chttp2/http2_errors.h", + "src/core/transport/chttp2/huffsyms.h", + "src/core/transport/chttp2/incoming_metadata.h", + "src/core/transport/chttp2/internal.h", + "src/core/transport/chttp2/status_conversion.h", + "src/core/transport/chttp2/stream_encoder.h", + "src/core/transport/chttp2/stream_map.h", + "src/core/transport/chttp2/timeout_encoding.h", + "src/core/transport/chttp2/varint.h", + "src/core/transport/chttp2_transport.h", + "src/core/transport/connectivity_state.h", + "src/core/transport/metadata.h", + "src/core/transport/stream_op.h", + "src/core/transport/transport.h", + "src/core/transport/transport_impl.h" + ], + "src": [ + "src/core/census/grpc_context.c", + "src/core/census/grpc_filter.c", + "src/core/channel/channel_args.c", + "src/core/channel/channel_stack.c", + "src/core/channel/client_channel.c", + "src/core/channel/compress_filter.c", + "src/core/channel/connected_channel.c", + "src/core/channel/http_client_filter.c", + "src/core/channel/http_server_filter.c", + "src/core/channel/noop_filter.c", + "src/core/client_config/client_config.c", + "src/core/client_config/connector.c", + "src/core/client_config/lb_policies/pick_first.c", + "src/core/client_config/lb_policy.c", + "src/core/client_config/resolver.c", + "src/core/client_config/resolver_factory.c", + "src/core/client_config/resolver_registry.c", + "src/core/client_config/resolvers/dns_resolver.c", + "src/core/client_config/resolvers/sockaddr_resolver.c", + "src/core/client_config/subchannel.c", + "src/core/client_config/subchannel_factory.c", + "src/core/client_config/subchannel_factory_decorators/add_channel_arg.c", + "src/core/client_config/subchannel_factory_decorators/merge_channel_args.c", + "src/core/client_config/uri_parser.c", + "src/core/compression/algorithm.c", + "src/core/compression/message_compress.c", + "src/core/debug/trace.c", + "src/core/httpcli/format_request.c", + "src/core/httpcli/httpcli.c", + "src/core/httpcli/parser.c", + "src/core/iomgr/alarm.c", + "src/core/iomgr/alarm_heap.c", + "src/core/iomgr/endpoint.c", + "src/core/iomgr/endpoint_pair_posix.c", + "src/core/iomgr/endpoint_pair_windows.c", + "src/core/iomgr/fd_posix.c", + "src/core/iomgr/iocp_windows.c", + "src/core/iomgr/iomgr.c", + "src/core/iomgr/iomgr_posix.c", + "src/core/iomgr/iomgr_windows.c", + "src/core/iomgr/pollset_multipoller_with_epoll.c", + "src/core/iomgr/pollset_multipoller_with_poll_posix.c", + "src/core/iomgr/pollset_posix.c", + "src/core/iomgr/pollset_set_posix.c", + "src/core/iomgr/pollset_set_windows.c", + "src/core/iomgr/pollset_windows.c", + "src/core/iomgr/resolve_address_posix.c", + "src/core/iomgr/resolve_address_windows.c", + "src/core/iomgr/sockaddr_utils.c", + "src/core/iomgr/socket_utils_common_posix.c", + "src/core/iomgr/socket_utils_linux.c", + "src/core/iomgr/socket_utils_posix.c", + "src/core/iomgr/socket_windows.c", + "src/core/iomgr/tcp_client_posix.c", + "src/core/iomgr/tcp_client_windows.c", + "src/core/iomgr/tcp_posix.c", + "src/core/iomgr/tcp_server_posix.c", + "src/core/iomgr/tcp_server_windows.c", + "src/core/iomgr/tcp_windows.c", + "src/core/iomgr/time_averaged_stats.c", + "src/core/iomgr/udp_server.c", + "src/core/iomgr/wakeup_fd_eventfd.c", + "src/core/iomgr/wakeup_fd_nospecial.c", + "src/core/iomgr/wakeup_fd_pipe.c", + "src/core/iomgr/wakeup_fd_posix.c", + "src/core/json/json.c", + "src/core/json/json_reader.c", + "src/core/json/json_string.c", + "src/core/json/json_writer.c", + "src/core/profiling/basic_timers.c", + "src/core/profiling/stap_timers.c", + "src/core/surface/api_trace.c", + "src/core/surface/byte_buffer.c", + "src/core/surface/byte_buffer_queue.c", + "src/core/surface/byte_buffer_reader.c", + "src/core/surface/call.c", + "src/core/surface/call_details.c", + "src/core/surface/call_log_batch.c", + "src/core/surface/channel.c", + "src/core/surface/channel_connectivity.c", + "src/core/surface/channel_create.c", + "src/core/surface/completion_queue.c", + "src/core/surface/event_string.c", + "src/core/surface/init.c", + "src/core/surface/lame_client.c", + "src/core/surface/metadata_array.c", + "src/core/surface/server.c", + "src/core/surface/server_chttp2.c", + "src/core/surface/server_create.c", + "src/core/surface/surface_trace.c", + "src/core/surface/version.c", + "src/core/transport/chttp2/alpn.c", + "src/core/transport/chttp2/bin_encoder.c", + "src/core/transport/chttp2/frame_data.c", + "src/core/transport/chttp2/frame_goaway.c", + "src/core/transport/chttp2/frame_ping.c", + "src/core/transport/chttp2/frame_rst_stream.c", + "src/core/transport/chttp2/frame_settings.c", + "src/core/transport/chttp2/frame_window_update.c", + "src/core/transport/chttp2/hpack_parser.c", + "src/core/transport/chttp2/hpack_table.c", + "src/core/transport/chttp2/huffsyms.c", + "src/core/transport/chttp2/incoming_metadata.c", + "src/core/transport/chttp2/parsing.c", + "src/core/transport/chttp2/status_conversion.c", + "src/core/transport/chttp2/stream_encoder.c", + "src/core/transport/chttp2/stream_lists.c", + "src/core/transport/chttp2/stream_map.c", + "src/core/transport/chttp2/timeout_encoding.c", + "src/core/transport/chttp2/varint.c", + "src/core/transport/chttp2/writing.c", + "src/core/transport/chttp2_transport.c", + "src/core/transport/connectivity_state.c", + "src/core/transport/metadata.c", + "src/core/transport/stream_op.c", + "src/core/transport/transport.c", + "src/core/transport/transport_op_string.c" + ] + }, + { + "name": "grpc_test_util_base", + "headers": [ + "test/core/end2end/cq_verifier.h", + "test/core/end2end/fixtures/proxy.h", + "test/core/iomgr/endpoint_tests.h", + "test/core/security/oauth2_utils.h", + "test/core/util/grpc_profiler.h", + "test/core/util/parse_hexstring.h", + "test/core/util/port.h", + "test/core/util/slice_splitter.h" + ], + "src": [ + "test/core/end2end/cq_verifier.c", + "test/core/end2end/fixtures/proxy.c", + "test/core/iomgr/endpoint_tests.c", + "test/core/security/oauth2_utils.c", + "test/core/util/grpc_profiler.c", + "test/core/util/parse_hexstring.c", + "test/core/util/port_posix.c", + "test/core/util/port_windows.c", + "test/core/util/slice_splitter.c" + ] + } + ], + "libs": [ + { + "name": "gpr", + "build": "all", + "language": "c", + "public_headers": [ + "include/grpc/support/alloc.h", + "include/grpc/support/atm.h", + "include/grpc/support/atm_gcc_atomic.h", + "include/grpc/support/atm_gcc_sync.h", + "include/grpc/support/atm_win32.h", + "include/grpc/support/cmdline.h", + "include/grpc/support/cpu.h", + "include/grpc/support/histogram.h", + "include/grpc/support/host_port.h", + "include/grpc/support/log.h", + "include/grpc/support/log_win32.h", + "include/grpc/support/port_platform.h", + "include/grpc/support/slice.h", + "include/grpc/support/slice_buffer.h", + "include/grpc/support/string_util.h", + "include/grpc/support/subprocess.h", + "include/grpc/support/sync.h", + "include/grpc/support/sync_generic.h", + "include/grpc/support/sync_posix.h", + "include/grpc/support/sync_win32.h", + "include/grpc/support/thd.h", + "include/grpc/support/time.h", + "include/grpc/support/tls.h", + "include/grpc/support/tls_gcc.h", + "include/grpc/support/tls_msvc.h", + "include/grpc/support/tls_pthread.h", + "include/grpc/support/useful.h" + ], + "headers": [ + "src/core/support/env.h", + "src/core/support/file.h", + "src/core/support/murmur_hash.h", + "src/core/support/stack_lockfree.h", + "src/core/support/string.h", + "src/core/support/string_win32.h", + "src/core/support/thd_internal.h" + ], + "src": [ + "src/core/support/alloc.c", + "src/core/support/cmdline.c", + "src/core/support/cpu_iphone.c", + "src/core/support/cpu_linux.c", + "src/core/support/cpu_posix.c", + "src/core/support/cpu_windows.c", + "src/core/support/env_linux.c", + "src/core/support/env_posix.c", + "src/core/support/env_win32.c", + "src/core/support/file.c", + "src/core/support/file_posix.c", + "src/core/support/file_win32.c", + "src/core/support/histogram.c", + "src/core/support/host_port.c", + "src/core/support/log.c", + "src/core/support/log_android.c", + "src/core/support/log_linux.c", + "src/core/support/log_posix.c", + "src/core/support/log_win32.c", + "src/core/support/murmur_hash.c", + "src/core/support/slice.c", + "src/core/support/slice_buffer.c", + "src/core/support/stack_lockfree.c", + "src/core/support/string.c", + "src/core/support/string_posix.c", + "src/core/support/string_win32.c", + "src/core/support/subprocess_posix.c", + "src/core/support/sync.c", + "src/core/support/sync_posix.c", + "src/core/support/sync_win32.c", + "src/core/support/thd.c", + "src/core/support/thd_posix.c", + "src/core/support/thd_win32.c", + "src/core/support/time.c", + "src/core/support/time_posix.c", + "src/core/support/time_win32.c", + "src/core/support/tls_pthread.c" + ], + "secure": "no", + "vs_project_guid": "{B23D3D1A-9438-4EDA-BEB6-9A0A03D17792}" + }, + { + "name": "gpr_test_util", + "build": "private", + "language": "c", + "headers": [ + "test/core/util/test_config.h" + ], + "src": [ + "test/core/util/test_config.c" + ], + "deps": [ + "gpr" + ], + "secure": "no", + "vs_project_guid": "{EAB0A629-17A9-44DB-B5FF-E91A721FE037}" + }, + { + "name": "grpc", + "build": "all", + "language": "c", + "public_headers": [ + "include/grpc/grpc_security.h" + ], + "headers": [ + "src/core/security/auth_filters.h", + "src/core/security/base64.h", + "src/core/security/credentials.h", + "src/core/security/json_token.h", + "src/core/security/jwt_verifier.h", + "src/core/security/secure_endpoint.h", + "src/core/security/secure_transport_setup.h", + "src/core/security/security_connector.h", + "src/core/security/security_context.h", + "src/core/tsi/fake_transport_security.h", + "src/core/tsi/ssl_transport_security.h", + "src/core/tsi/transport_security.h", + "src/core/tsi/transport_security_interface.h" + ], + "src": [ + "src/core/httpcli/httpcli_security_connector.c", + "src/core/security/base64.c", + "src/core/security/client_auth_filter.c", + "src/core/security/credentials.c", + "src/core/security/credentials_metadata.c", + "src/core/security/credentials_posix.c", + "src/core/security/credentials_win32.c", + "src/core/security/google_default_credentials.c", + "src/core/security/json_token.c", + "src/core/security/jwt_verifier.c", + "src/core/security/secure_endpoint.c", + "src/core/security/secure_transport_setup.c", + "src/core/security/security_connector.c", + "src/core/security/security_context.c", + "src/core/security/server_auth_filter.c", + "src/core/security/server_secure_chttp2.c", + "src/core/surface/init_secure.c", + "src/core/surface/secure_channel_create.c", + "src/core/tsi/fake_transport_security.c", + "src/core/tsi/ssl_transport_security.c", + "src/core/tsi/transport_security.c" + ], + "deps": [ + "gpr" + ], + "baselib": true, + "dll": "yes", + "filegroups": [ + "grpc_base", + "census" + ], + "secure": "yes", + "vs_project_guid": "{29D16885-7228-4C31-81ED-5F9187C7F2A9}" + }, + { + "name": "grpc_test_util", + "build": "private", + "language": "c", + "headers": [ + "test/core/end2end/data/ssl_test_data.h" + ], + "src": [ + "test/core/end2end/data/server1_cert.c", + "test/core/end2end/data/server1_key.c", + "test/core/end2end/data/test_root_cert.c" + ], + "deps": [ + "gpr", + "gpr_test_util", + "grpc" + ], + "filegroups": [ + "grpc_test_util_base" + ], + "vs_project_guid": "{17BCAFC0-5FDC-4C94-AEB9-95F3E220614B}" + }, + { + "name": "grpc_test_util_unsecure", + "build": "private", + "language": "c", + "deps": [ + "gpr", + "gpr_test_util", + "grpc" + ], + "filegroups": [ + "grpc_test_util_base" + ], + "secure": "no", + "vs_project_guid": "{0A7E7F92-FDEA-40F1-A9EC-3BA484F98BBF}" + }, + { + "name": "grpc_unsecure", + "build": "all", + "language": "c", + "src": [ + "src/core/surface/init_unsecure.c" + ], + "deps": [ + "gpr" + ], + "baselib": true, + "dll": "yes", + "filegroups": [ + "grpc_base", + "census" + ], + "secure": "no", + "vs_project_guid": "{46CEDFFF-9692-456A-AA24-38B5D6BCF4C5}" + }, + { + "name": "grpc_zookeeper", + "build": "all", + "language": "c", + "public_headers": [ + "include/grpc/grpc_zookeeper.h" + ], + "headers": [ + "src/core/client_config/resolvers/zookeeper_resolver.h" + ], + "src": [ + "src/core/client_config/resolvers/zookeeper_resolver.c" + ], + "deps": [ + "gpr", + "grpc" + ], + "external_deps": [ + "zookeeper" + ], + "secure": "no" + }, + { + "name": "reconnect_server", + "build": "private", + "language": "c", + "headers": [ + "test/core/util/reconnect_server.h" + ], + "src": [ + "test/core/util/reconnect_server.c" + ], + "deps": [ + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ] + }, + { + "name": "grpc++", + "build": "all", + "language": "c++", + "headers": [ + "src/cpp/client/secure_credentials.h", + "src/cpp/common/secure_auth_context.h", + "src/cpp/server/secure_server_credentials.h" + ], + "src": [ + "src/cpp/client/secure_channel_arguments.cc", + "src/cpp/client/secure_credentials.cc", + "src/cpp/common/auth_property_iterator.cc", + "src/cpp/common/secure_auth_context.cc", + "src/cpp/common/secure_create_auth_context.cc", + "src/cpp/server/secure_server_credentials.cc" + ], + "deps": [ + "gpr", + "grpc" + ], + "baselib": true, + "dll": "yes", + "filegroups": [ + "grpc++_base" + ], + "secure": "check", + "vs_project_guid": "{C187A093-A0FE-489D-A40A-6E33DE0F9FEB}" + }, + { + "name": "grpc++_test_config", + "build": "private", + "language": "c++", + "headers": [ + "test/cpp/util/test_config.h" + ], + "src": [ + "test/cpp/util/test_config.cc" + ] + }, + { + "name": "grpc++_test_util", + "build": "private", + "language": "c++", + "headers": [ + "test/cpp/util/cli_call.h", + "test/cpp/util/create_test_channel.h", + "test/cpp/util/subprocess.h" + ], + "src": [ + "test/cpp/util/messages.proto", + "test/cpp/util/echo.proto", + "test/cpp/util/echo_duplicate.proto", + "test/cpp/util/cli_call.cc", + "test/cpp/util/create_test_channel.cc", + "test/cpp/util/subprocess.cc" + ], + "deps": [ + "grpc++", + "grpc_test_util" + ] + }, + { + "name": "grpc++_unsecure", + "build": "all", + "language": "c++", + "src": [ + "src/cpp/common/insecure_create_auth_context.cc" + ], + "deps": [ + "gpr", + "grpc_unsecure" + ], + "baselib": true, + "dll": "yes", + "filegroups": [ + "grpc++_base" + ], + "secure": "no", + "vs_project_guid": "{6EE56155-DF7C-4F6E-BFC4-F6F776BEB211}" + }, + { + "name": "grpc_plugin_support", + "build": "protoc", + "language": "c++", + "headers": [ + "include/grpc++/support/config.h", + "include/grpc++/support/config_protobuf.h", + "src/compiler/config.h", + "src/compiler/cpp_generator.h", + "src/compiler/cpp_generator_helpers.h", + "src/compiler/csharp_generator.h", + "src/compiler/csharp_generator_helpers.h", + "src/compiler/generator_helpers.h", + "src/compiler/objective_c_generator.h", + "src/compiler/objective_c_generator_helpers.h", + "src/compiler/python_generator.h", + "src/compiler/ruby_generator.h", + "src/compiler/ruby_generator_helpers-inl.h", + "src/compiler/ruby_generator_map-inl.h", + "src/compiler/ruby_generator_string-inl.h" + ], + "src": [ + "src/compiler/cpp_generator.cc", + "src/compiler/csharp_generator.cc", + "src/compiler/objective_c_generator.cc", + "src/compiler/python_generator.cc", + "src/compiler/ruby_generator.cc" + ], + "deps": [], + "secure": "no", + "vs_project_guid": "{B6E81D84-2ACB-41B8-8781-493A944C7817}" + }, + { + "name": "interop_client_helper", + "build": "private", + "language": "c++", + "headers": [ + "test/cpp/interop/client_helper.h" + ], + "src": [ + "test/proto/messages.proto", + "test/cpp/interop/client_helper.cc" + ], + "deps": [ + "grpc++_test_util", + "grpc_test_util", + "grpc++", + "grpc", + "gpr" + ] + }, + { + "name": "interop_client_main", + "build": "private", + "language": "c++", + "headers": [ + "test/cpp/interop/interop_client.h" + ], + "src": [ + "test/proto/empty.proto", + "test/proto/messages.proto", + "test/proto/test.proto", + "test/cpp/interop/client.cc", + "test/cpp/interop/interop_client.cc" + ], + "deps": [ + "interop_client_helper", + "grpc++_test_util", + "grpc_test_util", + "grpc++", + "grpc", + "gpr_test_util", + "gpr", + "grpc++_test_config" + ] + }, + { + "name": "interop_server_helper", + "build": "private", + "language": "c++", + "headers": [ + "test/cpp/interop/server_helper.h" + ], + "src": [ + "test/cpp/interop/server_helper.cc" + ], + "deps": [ + "grpc_test_util", + "grpc++", + "grpc", + "gpr" + ] + }, + { + "name": "interop_server_main", + "build": "private", + "language": "c++", + "src": [ + "test/proto/empty.proto", + "test/proto/messages.proto", + "test/proto/test.proto", + "test/cpp/interop/server.cc" + ], + "deps": [ + "interop_server_helper", + "grpc++_test_util", + "grpc_test_util", + "grpc++", + "grpc", + "gpr_test_util", + "gpr", + "grpc++_test_config" + ] + }, + { + "name": "pubsub_client_lib", + "build": "do_not_build", + "language": "c++", + "headers": [ + "examples/pubsub/publisher.h", + "examples/pubsub/subscriber.h" + ], + "src": [ + "examples/pubsub/label.proto", + "examples/pubsub/empty.proto", + "examples/pubsub/pubsub.proto", + "examples/pubsub/publisher.cc", + "examples/pubsub/subscriber.cc" + ], + "deps": [ + "grpc++", + "grpc", + "gpr" + ] + }, + { + "name": "qps", + "build": "private", + "language": "c++", + "headers": [ + "test/cpp/qps/client.h", + "test/cpp/qps/driver.h", + "test/cpp/qps/histogram.h", + "test/cpp/qps/interarrival.h", + "test/cpp/qps/perf_db_client.h", + "test/cpp/qps/qps_worker.h", + "test/cpp/qps/report.h", + "test/cpp/qps/server.h", + "test/cpp/qps/stats.h", + "test/cpp/qps/timer.h", + "test/cpp/util/benchmark_config.h" + ], + "src": [ + "test/cpp/qps/qpstest.proto", + "test/cpp/qps/perf_db.proto", + "test/cpp/qps/client_async.cc", + "test/cpp/qps/client_sync.cc", + "test/cpp/qps/driver.cc", + "test/cpp/qps/perf_db_client.cc", + "test/cpp/qps/qps_worker.cc", + "test/cpp/qps/report.cc", + "test/cpp/qps/server_async.cc", + "test/cpp/qps/server_sync.cc", + "test/cpp/qps/timer.cc", + "test/cpp/util/benchmark_config.cc" + ], + "deps": [ + "grpc_test_util", + "grpc++_test_util", + "grpc++" + ] + }, + { + "name": "grpc_csharp_ext", + "build": "all", + "language": "csharp", + "src": [ + "src/csharp/ext/grpc_csharp_ext.c" + ], + "deps": [ + "gpr", + "grpc" + ], + "dll": "only", + "vs_project_guid": "{D64C6D63-4458-4A88-AB38-35678384A7E4}" + } + ], + "targets": [ + { + "name": "alarm_heap_test", + "build": "test", + "language": "c", + "src": [ + "test/core/iomgr/alarm_heap_test.c" + ], + "deps": [ + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ] + }, + { + "name": "alarm_list_test", + "build": "test", + "language": "c", + "src": [ + "test/core/iomgr/alarm_list_test.c" + ], + "deps": [ + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ] + }, + { + "name": "alarm_test", + "build": "test", + "language": "c", + "src": [ + "test/core/iomgr/alarm_test.c" + ], + "deps": [ + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ] + }, + { + "name": "alpn_test", + "build": "test", + "language": "c", + "src": [ + "test/core/transport/chttp2/alpn_test.c" + ], + "deps": [ + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ] + }, + { + "name": "bin_encoder_test", + "build": "test", + "language": "c", + "src": [ + "test/core/transport/chttp2/bin_encoder_test.c" + ], + "deps": [ + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ] + }, + { + "name": "chttp2_status_conversion_test", + "build": "test", + "language": "c", + "src": [ + "test/core/transport/chttp2/status_conversion_test.c" + ], + "deps": [ + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ] + }, + { + "name": "chttp2_stream_encoder_test", + "build": "test", + "language": "c", + "src": [ + "test/core/transport/chttp2/stream_encoder_test.c" + ], + "deps": [ + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ] + }, + { + "name": "chttp2_stream_map_test", + "build": "test", + "language": "c", + "src": [ + "test/core/transport/chttp2/stream_map_test.c" + ], + "deps": [ + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ] + }, + { + "name": "compression_test", + "build": "test", + "language": "c", + "src": [ + "test/core/compression/compression_test.c" + ], + "deps": [ + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ] + }, + { + "name": "dualstack_socket_test", + "build": "test", + "language": "c", + "src": [ + "test/core/end2end/dualstack_socket_test.c" + ], + "deps": [ + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "platforms": [ + "mac", + "linux", + "posix" + ] + }, + { + "name": "fd_conservation_posix_test", + "build": "test", + "language": "c", + "src": [ + "test/core/iomgr/fd_conservation_posix_test.c" + ], + "deps": [ + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "platforms": [ + "mac", + "linux", + "posix" + ] + }, + { + "name": "fd_posix_test", + "build": "test", + "language": "c", + "src": [ + "test/core/iomgr/fd_posix_test.c" + ], + "deps": [ + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "platforms": [ + "mac", + "linux", + "posix" + ] + }, + { + "name": "fling_client", + "build": "test", + "run": false, + "language": "c", + "src": [ + "test/core/fling/client.c" + ], + "deps": [ + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ] + }, + { + "name": "fling_server", + "build": "test", + "run": false, + "language": "c", + "src": [ + "test/core/fling/server.c" + ], + "deps": [ + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ] + }, + { + "name": "fling_stream_test", + "build": "test", + "language": "c", + "src": [ + "test/core/fling/fling_stream_test.c" + ], + "deps": [ + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "platforms": [ + "mac", + "linux", + "posix" + ] + }, + { + "name": "fling_test", + "build": "test", + "language": "c", + "src": [ + "test/core/fling/fling_test.c" + ], + "deps": [ + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "platforms": [ + "mac", + "linux", + "posix" + ] + }, + { + "name": "gen_hpack_tables", + "build": "tool", + "language": "c", + "src": [ + "tools/codegen/core/gen_hpack_tables.c" + ], + "deps": [ + "gpr", + "grpc" + ] + }, + { + "name": "gpr_cmdline_test", + "build": "test", + "language": "c", + "src": [ + "test/core/support/cmdline_test.c" + ], + "deps": [ + "gpr_test_util", + "gpr" + ] + }, + { + "name": "gpr_env_test", + "build": "test", + "language": "c", + "src": [ + "test/core/support/env_test.c" + ], + "deps": [ + "gpr_test_util", + "gpr" + ] + }, + { + "name": "gpr_file_test", + "build": "test", + "language": "c", + "src": [ + "test/core/support/file_test.c" + ], + "deps": [ + "gpr_test_util", + "gpr" + ] + }, + { + "name": "gpr_histogram_test", + "build": "test", + "language": "c", + "src": [ + "test/core/support/histogram_test.c" + ], + "deps": [ + "gpr_test_util", + "gpr" + ] + }, + { + "name": "gpr_host_port_test", + "build": "test", + "language": "c", + "src": [ + "test/core/support/host_port_test.c" + ], + "deps": [ + "gpr_test_util", + "gpr" + ] + }, + { + "name": "gpr_log_test", + "build": "test", + "language": "c", + "src": [ + "test/core/support/log_test.c" + ], + "deps": [ + "gpr_test_util", + "gpr" + ] + }, + { + "name": "gpr_slice_buffer_test", + "build": "test", + "language": "c", + "src": [ + "test/core/support/slice_buffer_test.c" + ], + "deps": [ + "gpr_test_util", + "gpr" + ] + }, + { + "name": "gpr_slice_test", + "build": "test", + "language": "c", + "src": [ + "test/core/support/slice_test.c" + ], + "deps": [ + "gpr_test_util", + "gpr" + ] + }, + { + "name": "gpr_stack_lockfree_test", + "build": "test", + "language": "c", + "src": [ + "test/core/support/stack_lockfree_test.c" + ], + "deps": [ + "gpr_test_util", + "gpr" + ] + }, + { + "name": "gpr_string_test", + "build": "test", + "language": "c", + "src": [ + "test/core/support/string_test.c" + ], + "deps": [ + "gpr_test_util", + "gpr" + ] + }, + { + "name": "gpr_sync_test", + "build": "test", + "language": "c", + "src": [ + "test/core/support/sync_test.c" + ], + "deps": [ + "gpr_test_util", + "gpr" + ] + }, + { + "name": "gpr_thd_test", + "build": "test", + "language": "c", + "src": [ + "test/core/support/thd_test.c" + ], + "deps": [ + "gpr_test_util", + "gpr" + ] + }, + { + "name": "gpr_time_test", + "build": "test", + "language": "c", + "src": [ + "test/core/support/time_test.c" + ], + "deps": [ + "gpr_test_util", + "gpr" + ] + }, + { + "name": "gpr_tls_test", + "build": "test", + "language": "c", + "src": [ + "test/core/support/tls_test.c" + ], + "deps": [ + "gpr_test_util", + "gpr" + ] + }, + { + "name": "gpr_useful_test", + "build": "test", + "language": "c", + "src": [ + "test/core/support/useful_test.c" + ], + "deps": [ + "gpr_test_util", + "gpr" + ] + }, + { + "name": "grpc_auth_context_test", + "build": "test", + "language": "c", + "src": [ + "test/core/security/auth_context_test.c" + ], + "deps": [ + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ] + }, + { + "name": "grpc_base64_test", + "build": "test", + "language": "c", + "src": [ + "test/core/security/base64_test.c" + ], + "deps": [ + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ] + }, + { + "name": "grpc_byte_buffer_reader_test", + "build": "test", + "language": "c", + "src": [ + "test/core/surface/byte_buffer_reader_test.c" + ], + "deps": [ + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ] + }, + { + "name": "grpc_channel_args_test", + "build": "test", + "language": "c", + "src": [ + "test/core/channel/channel_args_test.c" + ], + "deps": [ + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ] + }, + { + "name": "grpc_channel_stack_test", + "build": "test", + "language": "c", + "src": [ + "test/core/channel/channel_stack_test.c" + ], + "deps": [ + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ] + }, + { + "name": "grpc_completion_queue_test", + "build": "test", + "language": "c", + "src": [ + "test/core/surface/completion_queue_test.c" + ], + "deps": [ + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ] + }, + { + "name": "grpc_create_jwt", + "build": "tool", + "language": "c", + "src": [ + "test/core/security/create_jwt.c" + ], + "deps": [ + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ] + }, + { + "name": "grpc_credentials_test", + "build": "test", + "language": "c", + "src": [ + "test/core/security/credentials_test.c" + ], + "deps": [ + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ] + }, + { + "name": "grpc_fetch_oauth2", + "build": "tool", + "language": "c", + "src": [ + "test/core/security/fetch_oauth2.c" + ], + "deps": [ + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ] + }, + { + "name": "grpc_json_token_test", + "build": "test", + "language": "c", + "src": [ + "test/core/security/json_token_test.c" + ], + "deps": [ + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ] + }, + { + "name": "grpc_jwt_verifier_test", + "build": "test", + "language": "c", + "src": [ + "test/core/security/jwt_verifier_test.c" + ], + "deps": [ + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ] + }, + { + "name": "grpc_print_google_default_creds_token", + "build": "tool", + "language": "c", + "src": [ + "test/core/security/print_google_default_creds_token.c" + ], + "deps": [ + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ] + }, + { + "name": "grpc_security_connector_test", + "build": "test", + "language": "c", + "src": [ + "test/core/security/security_connector_test.c" + ], + "deps": [ + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ] + }, + { + "name": "grpc_stream_op_test", + "build": "test", + "language": "c", + "src": [ + "test/core/transport/stream_op_test.c" + ], + "deps": [ + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ] + }, + { + "name": "grpc_verify_jwt", + "build": "tool", + "language": "c", + "src": [ + "test/core/security/verify_jwt.c" + ], + "deps": [ + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ] + }, + { + "name": "hpack_parser_test", + "build": "test", + "language": "c", + "src": [ + "test/core/transport/chttp2/hpack_parser_test.c" + ], + "deps": [ + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ] + }, + { + "name": "hpack_table_test", + "build": "test", + "language": "c", + "src": [ + "test/core/transport/chttp2/hpack_table_test.c" + ], + "deps": [ + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ] + }, + { + "name": "httpcli_format_request_test", + "build": "test", + "language": "c", + "src": [ + "test/core/httpcli/format_request_test.c" + ], + "deps": [ + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ] + }, + { + "name": "httpcli_parser_test", + "build": "test", + "language": "c", + "src": [ + "test/core/httpcli/parser_test.c" + ], + "deps": [ + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ] + }, + { + "name": "httpcli_test", + "build": "test", + "language": "c", + "src": [ + "test/core/httpcli/httpcli_test.c" + ], + "deps": [ + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "platforms": [ + "mac", + "linux", + "posix" + ] + }, + { + "name": "json_rewrite", + "build": "test", + "run": false, + "language": "c", + "src": [ + "test/core/json/json_rewrite.c" + ], + "deps": [ + "grpc", + "gpr" + ] + }, + { + "name": "json_rewrite_test", + "build": "test", + "language": "c", + "src": [ + "test/core/json/json_rewrite_test.c" + ], + "deps": [ + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ] + }, + { + "name": "json_test", + "build": "test", + "language": "c", + "src": [ + "test/core/json/json_test.c" + ], + "deps": [ + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ] + }, + { + "name": "lame_client_test", + "build": "test", + "language": "c", + "src": [ + "test/core/surface/lame_client_test.c" + ], + "deps": [ + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ] + }, + { + "name": "low_level_ping_pong_benchmark", + "build": "benchmark", + "language": "c", + "src": [ + "test/core/network_benchmarks/low_level_ping_pong.c" + ], + "deps": [ + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ] + }, + { + "name": "message_compress_test", + "build": "test", + "language": "c", + "src": [ + "test/core/compression/message_compress_test.c" + ], + "deps": [ + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ] + }, + { + "name": "multi_init_test", + "build": "test", + "language": "c", + "src": [ + "test/core/surface/multi_init_test.c" + ], + "deps": [ + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ] + }, + { + "name": "multiple_server_queues_test", + "build": "test", + "language": "c", + "src": [ + "test/core/end2end/multiple_server_queues_test.c" + ], + "deps": [ + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ] + }, + { + "name": "murmur_hash_test", + "build": "test", + "language": "c", + "src": [ + "test/core/support/murmur_hash_test.c" + ], + "deps": [ + "gpr_test_util", + "gpr" + ] + }, + { + "name": "no_server_test", + "build": "test", + "language": "c", + "src": [ + "test/core/end2end/no_server_test.c" + ], + "deps": [ + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ] + }, + { + "name": "resolve_address_test", + "build": "test", + "language": "c", + "src": [ + "test/core/iomgr/resolve_address_test.c" + ], + "deps": [ + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ] + }, + { + "name": "secure_endpoint_test", + "build": "test", + "language": "c", + "src": [ + "test/core/security/secure_endpoint_test.c" + ], + "deps": [ + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ] + }, + { + "name": "sockaddr_utils_test", + "build": "test", + "language": "c", + "src": [ + "test/core/iomgr/sockaddr_utils_test.c" + ], + "deps": [ + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ] + }, + { + "name": "tcp_client_posix_test", + "build": "test", + "language": "c", + "src": [ + "test/core/iomgr/tcp_client_posix_test.c" + ], + "deps": [ + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "platforms": [ + "mac", + "linux", + "posix" + ] + }, + { + "name": "tcp_posix_test", + "build": "test", + "language": "c", + "src": [ + "test/core/iomgr/tcp_posix_test.c" + ], + "deps": [ + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "platforms": [ + "mac", + "linux", + "posix" + ] + }, + { + "name": "tcp_server_posix_test", + "build": "test", + "language": "c", + "src": [ + "test/core/iomgr/tcp_server_posix_test.c" + ], + "deps": [ + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "platforms": [ + "mac", + "linux", + "posix" + ] + }, + { + "name": "time_averaged_stats_test", + "build": "test", + "language": "c", + "src": [ + "test/core/iomgr/time_averaged_stats_test.c" + ], + "deps": [ + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ] + }, + { + "name": "timeout_encoding_test", + "build": "test", + "language": "c", + "src": [ + "test/core/transport/chttp2/timeout_encoding_test.c" + ], + "deps": [ + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ] + }, + { + "name": "timers_test", + "build": "test", + "language": "c", + "src": [ + "test/core/profiling/timers_test.c" + ], + "deps": [ + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ] + }, + { + "name": "transport_metadata_test", + "build": "test", + "language": "c", + "src": [ + "test/core/transport/metadata_test.c" + ], + "deps": [ + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ] + }, + { + "name": "transport_security_test", + "build": "test", + "language": "c", + "src": [ + "test/core/tsi/transport_security_test.c" + ], + "deps": [ + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ] + }, + { + "name": "udp_server_test", + "build": "test", + "language": "c", + "src": [ + "test/core/iomgr/udp_server_test.c" + ], + "deps": [ + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "platforms": [ + "posix" + ] + }, + { + "name": "uri_parser_test", + "build": "test", + "language": "c", + "src": [ + "test/core/client_config/uri_parser_test.c" + ], + "deps": [ + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ] + }, + { + "name": "async_end2end_test", + "build": "test", + "language": "c++", + "src": [ + "test/cpp/end2end/async_end2end_test.cc" + ], + "deps": [ + "grpc++_test_util", + "grpc_test_util", + "grpc++", + "grpc", + "gpr_test_util", + "gpr" + ] + }, + { + "name": "async_streaming_ping_pong_test", + "build": "test", + "language": "c++", + "src": [ + "test/cpp/qps/async_streaming_ping_pong_test.cc" + ], + "deps": [ + "qps", + "grpc++_test_util", + "grpc_test_util", + "grpc++", + "grpc", + "gpr_test_util", + "gpr" + ], + "platforms": [ + "mac", + "linux", + "posix" + ] + }, + { + "name": "async_unary_ping_pong_test", + "build": "test", + "language": "c++", + "src": [ + "test/cpp/qps/async_unary_ping_pong_test.cc" + ], + "deps": [ + "qps", + "grpc++_test_util", + "grpc_test_util", + "grpc++", + "grpc", + "gpr_test_util", + "gpr" + ], + "platforms": [ + "mac", + "linux", + "posix" + ] + }, + { + "name": "auth_property_iterator_test", + "build": "test", + "language": "c++", + "src": [ + "test/cpp/common/auth_property_iterator_test.cc" + ], + "deps": [ + "grpc++", + "grpc", + "gpr" + ] + }, + { + "name": "channel_arguments_test", + "build": "test", + "language": "c++", + "src": [ + "test/cpp/client/channel_arguments_test.cc" + ], + "deps": [ + "grpc++", + "grpc", + "gpr" + ] + }, + { + "name": "cli_call_test", + "build": "test", + "language": "c++", + "src": [ + "test/cpp/util/cli_call_test.cc" + ], + "deps": [ + "grpc++_test_util", + "grpc_test_util", + "grpc++", + "grpc", + "gpr_test_util", + "gpr" + ] + }, + { + "name": "client_crash_test", + "build": "test", + "language": "c++", + "src": [ + "test/cpp/end2end/client_crash_test.cc" + ], + "deps": [ + "grpc++_test_util", + "grpc_test_util", + "grpc++", + "grpc", + "gpr_test_util", + "gpr" + ], + "platforms": [ + "mac", + "linux", + "posix" + ] + }, + { + "name": "client_crash_test_server", + "build": "test", + "run": false, + "language": "c++", + "src": [ + "test/cpp/end2end/client_crash_test_server.cc" + ], + "deps": [ + "grpc++_test_util", + "grpc_test_util", + "grpc++", + "grpc", + "gpr_test_util", + "gpr" + ] + }, + { + "name": "credentials_test", + "build": "test", + "language": "c++", + "src": [ + "test/cpp/client/credentials_test.cc" + ], + "deps": [ + "grpc++", + "grpc", + "gpr" + ] + }, + { + "name": "cxx_byte_buffer_test", + "build": "test", + "language": "c++", + "src": [ + "test/cpp/util/byte_buffer_test.cc" + ], + "deps": [ + "grpc_test_util", + "grpc++", + "grpc", + "gpr_test_util", + "gpr" + ] + }, + { + "name": "cxx_slice_test", + "build": "test", + "language": "c++", + "src": [ + "test/cpp/util/slice_test.cc" + ], + "deps": [ + "grpc_test_util", + "grpc++", + "grpc", + "gpr_test_util", + "gpr" + ] + }, + { + "name": "cxx_string_ref_test", + "build": "test", + "language": "c++", + "src": [ + "test/cpp/util/string_ref_test.cc" + ], + "deps": [ + "grpc++" + ] + }, + { + "name": "cxx_time_test", + "build": "test", + "language": "c++", + "src": [ + "test/cpp/util/time_test.cc" + ], + "deps": [ + "grpc_test_util", + "grpc++", + "grpc", + "gpr_test_util", + "gpr" + ] + }, + { + "name": "end2end_test", + "build": "test", + "language": "c++", + "src": [ + "test/cpp/end2end/end2end_test.cc" + ], + "deps": [ + "grpc++_test_util", + "grpc_test_util", + "grpc++", + "grpc", + "gpr_test_util", + "gpr" + ] + }, + { + "name": "generic_end2end_test", + "build": "test", + "language": "c++", + "src": [ + "test/cpp/end2end/generic_end2end_test.cc" + ], + "deps": [ + "grpc++_test_util", + "grpc_test_util", + "grpc++", + "grpc", + "gpr_test_util", + "gpr" + ] + }, + { + "name": "grpc_cli", + "build": "test", + "run": false, + "language": "c++", + "src": [ + "test/cpp/util/grpc_cli.cc" + ], + "deps": [ + "grpc++_test_util", + "grpc_test_util", + "grpc++", + "grpc", + "gpr_test_util", + "gpr", + "grpc++_test_config" + ] + }, + { + "name": "grpc_cpp_plugin", + "build": "protoc", + "language": "c++", + "src": [ + "src/compiler/cpp_plugin.cc" + ], + "deps": [ + "grpc_plugin_support" + ], + "secure": "no", + "vs_project_guid": "{7E51A25F-AC59-488F-906C-C60FAAE706AA}" + }, + { + "name": "grpc_csharp_plugin", + "build": "protoc", + "language": "c++", + "src": [ + "src/compiler/csharp_plugin.cc" + ], + "deps": [ + "grpc_plugin_support" + ], + "secure": "no", + "vs_project_guid": "{3C813052-A49A-4662-B90A-1ADBEC7EE453}" + }, + { + "name": "grpc_objective_c_plugin", + "build": "protoc", + "language": "c++", + "src": [ + "src/compiler/objective_c_plugin.cc" + ], + "deps": [ + "grpc_plugin_support" + ], + "secure": "no", + "vs_project_guid": "{19564640-CEE6-4921-ABA5-676ED79A36F6}" + }, + { + "name": "grpc_python_plugin", + "build": "protoc", + "language": "c++", + "src": [ + "src/compiler/python_plugin.cc" + ], + "deps": [ + "grpc_plugin_support" + ], + "secure": "no", + "vs_project_guid": "{DF52D501-A6CF-4E6F-BA38-6EBE2E8DAFB2}" + }, + { + "name": "grpc_ruby_plugin", + "build": "protoc", + "language": "c++", + "src": [ + "src/compiler/ruby_plugin.cc" + ], + "deps": [ + "grpc_plugin_support" + ], + "secure": "no", + "vs_project_guid": "{069E9D05-B78B-4751-9252-D21EBAE7DE8E}" + }, + { + "name": "interop_client", + "build": "test", + "run": false, + "language": "c++", + "src": [], + "deps": [ + "interop_client_main", + "interop_client_helper", + "grpc++_test_util", + "grpc_test_util", + "grpc++", + "grpc", + "gpr_test_util", + "gpr", + "grpc++_test_config" + ], + "platforms": [ + "mac", + "linux", + "posix" + ] + }, + { + "name": "interop_server", + "build": "test", + "run": false, + "language": "c++", + "src": [], + "deps": [ + "interop_server_main", + "interop_server_helper", + "grpc++_test_util", + "grpc_test_util", + "grpc++", + "grpc", + "gpr_test_util", + "gpr", + "grpc++_test_config" + ], + "platforms": [ + "mac", + "linux", + "posix" + ] + }, + { + "name": "interop_test", + "build": "test", + "language": "c++", + "src": [ + "test/cpp/interop/interop_test.cc" + ], + "deps": [ + "grpc_test_util", + "grpc", + "gpr_test_util", + "gpr" + ], + "platforms": [ + "mac", + "linux", + "posix" + ] + }, + { + "name": "mock_test", + "build": "test", + "language": "c++", + "src": [ + "test/cpp/end2end/mock_test.cc" + ], + "deps": [ + "grpc++_test_util", + "grpc_test_util", + "grpc++", + "grpc", + "gpr_test_util", + "gpr" + ] + }, + { + "name": "pubsub_client", + "build": "do_not_build", + "run": false, + "language": "c++", + "src": [ + "examples/pubsub/main.cc" + ], + "deps": [ + "pubsub_client_lib", + "grpc_test_util", + "grpc++", + "grpc", + "gpr_test_util", + "gpr", + "grpc++_test_config" + ] + }, + { + "name": "pubsub_publisher_test", + "build": "do_not_build", + "language": "c++", + "src": [ + "examples/pubsub/publisher_test.cc" + ], + "deps": [ + "pubsub_client_lib", + "grpc++_test_util", + "grpc_test_util", + "grpc++", + "grpc", + "gpr_test_util", + "gpr" + ] + }, + { + "name": "pubsub_subscriber_test", + "build": "do_not_build", + "language": "c++", + "src": [ + "examples/pubsub/subscriber_test.cc" + ], + "deps": [ + "pubsub_client_lib", + "grpc++_test_util", + "grpc_test_util", + "grpc++", + "grpc", + "gpr_test_util", + "gpr" + ] + }, + { + "name": "qps_driver", + "build": "benchmark", + "language": "c++", + "src": [ + "test/cpp/qps/qps_driver.cc" + ], + "deps": [ + "qps", + "grpc++_test_util", + "grpc_test_util", + "grpc++", + "grpc", + "gpr_test_util", + "gpr", + "grpc++_test_config" + ] + }, + { + "name": "qps_interarrival_test", + "build": "test", + "run": false, + "language": "c++", + "src": [ + "test/cpp/qps/qps_interarrival_test.cc" + ], + "deps": [ + "qps", + "grpc++_test_util", + "grpc_test_util", + "grpc++", + "grpc", + "gpr_test_util", + "gpr" + ], + "platforms": [ + "mac", + "linux", + "posix" + ] + }, + { + "name": "qps_openloop_test", + "build": "test", + "language": "c++", + "src": [ + "test/cpp/qps/qps_openloop_test.cc" + ], + "deps": [ + "qps", + "grpc++_test_util", + "grpc_test_util", + "grpc++", + "grpc", + "gpr_test_util", + "gpr", + "grpc++_test_config" + ], + "platforms": [ + "mac", + "linux", + "posix" + ] + }, + { + "name": "qps_test", + "build": "test", + "language": "c++", + "src": [ + "test/cpp/qps/qps_test.cc" + ], + "deps": [ + "qps", + "grpc++_test_util", + "grpc_test_util", + "grpc++", + "grpc", + "gpr_test_util", + "gpr", + "grpc++_test_config" + ], + "exclude_configs": [ + "tsan" + ], + "platforms": [ + "mac", + "linux", + "posix" + ] + }, + { + "name": "qps_worker", + "build": "benchmark", + "language": "c++", + "headers": [ + "test/cpp/qps/client.h", + "test/cpp/qps/server.h" + ], + "src": [ + "test/cpp/qps/worker.cc" + ], + "deps": [ + "qps", + "grpc++_test_util", + "grpc_test_util", + "grpc++", + "grpc", + "gpr_test_util", + "gpr", + "grpc++_test_config" + ] + }, + { + "name": "reconnect_interop_client", + "build": "test", + "run": false, + "language": "c++", + "src": [ + "test/proto/empty.proto", + "test/proto/messages.proto", + "test/proto/test.proto", + "test/cpp/interop/reconnect_interop_client.cc" + ], + "deps": [ + "grpc++_test_util", + "grpc_test_util", + "grpc++", + "grpc", + "gpr_test_util", + "gpr", + "grpc++_test_config" + ] + }, + { + "name": "reconnect_interop_server", + "build": "test", + "run": false, + "language": "c++", + "src": [ + "test/proto/empty.proto", + "test/proto/messages.proto", + "test/proto/test.proto", + "test/cpp/interop/reconnect_interop_server.cc" + ], + "deps": [ + "reconnect_server", + "grpc++_test_util", + "grpc_test_util", + "grpc++", + "grpc", + "gpr_test_util", + "gpr", + "grpc++_test_config" + ] + }, + { + "name": "secure_auth_context_test", + "build": "test", + "language": "c++", + "src": [ + "test/cpp/common/secure_auth_context_test.cc" + ], + "deps": [ + "grpc++", + "grpc", + "gpr" + ] + }, + { + "name": "server_crash_test", + "build": "test", + "language": "c++", + "src": [ + "test/cpp/end2end/server_crash_test.cc" + ], + "deps": [ + "grpc++_test_util", + "grpc_test_util", + "grpc++", + "grpc", + "gpr_test_util", + "gpr" + ], + "platforms": [ + "mac", + "linux", + "posix" + ] + }, + { + "name": "server_crash_test_client", + "build": "test", + "run": false, + "language": "c++", + "src": [ + "test/cpp/end2end/server_crash_test_client.cc" + ], + "deps": [ + "grpc++_test_util", + "grpc_test_util", + "grpc++", + "grpc", + "gpr_test_util", + "gpr" + ] + }, + { + "name": "shutdown_test", + "build": "test", + "language": "c++", + "src": [ + "test/cpp/end2end/shutdown_test.cc" + ], + "deps": [ + "grpc++_test_util", + "grpc_test_util", + "grpc++", + "grpc", + "gpr_test_util", + "gpr" + ] + }, + { + "name": "status_test", + "build": "test", + "language": "c++", + "src": [ + "test/cpp/util/status_test.cc" + ], + "deps": [ + "grpc_test_util", + "grpc++", + "grpc", + "gpr_test_util", + "gpr" + ] + }, + { + "name": "sync_streaming_ping_pong_test", + "build": "test", + "language": "c++", + "src": [ + "test/cpp/qps/sync_streaming_ping_pong_test.cc" + ], + "deps": [ + "qps", + "grpc++_test_util", + "grpc_test_util", + "grpc++", + "grpc", + "gpr_test_util", + "gpr" + ], + "platforms": [ + "mac", + "linux", + "posix" + ] + }, + { + "name": "sync_unary_ping_pong_test", + "build": "test", + "language": "c++", + "src": [ + "test/cpp/qps/sync_unary_ping_pong_test.cc" + ], + "deps": [ + "qps", + "grpc++_test_util", + "grpc_test_util", + "grpc++", + "grpc", + "gpr_test_util", + "gpr" + ], + "platforms": [ + "mac", + "linux", + "posix" + ] + }, + { + "name": "thread_stress_test", + "build": "test", + "language": "c++", + "src": [ + "test/cpp/end2end/thread_stress_test.cc" + ], + "deps": [ + "grpc++_test_util", + "grpc_test_util", + "grpc++", + "grpc", + "gpr_test_util", + "gpr" + ] + }, + { + "name": "zookeeper_test", + "build": "test", + "language": "c++", + "src": [ + "test/cpp/end2end/zookeeper_test.cc" + ], + "deps": [ + "grpc++_test_util", + "grpc_test_util", + "grpc++", + "grpc_zookeeper", + "grpc", + "gpr_test_util", + "gpr" + ], + "external_deps": [ + "zookeeper" + ] + } + ] +} diff --git a/src/core/census/grpc_context.c b/src/core/census/grpc_context.c index 429f3ec9db0..4b61382a2c2 100644 --- a/src/core/census/grpc_context.c +++ b/src/core/census/grpc_context.c @@ -33,9 +33,12 @@ #include #include +#include "src/core/surface/api_trace.h" #include "src/core/surface/call.h" void grpc_census_call_set_context(grpc_call *call, census_context *context) { + GRPC_API_TRACE("grpc_census_call_set_context(call=%p, census_context=%p)", 2, + (call, context)); if (census_enabled() == CENSUS_FEATURE_NONE) { return; } @@ -45,5 +48,6 @@ void grpc_census_call_set_context(grpc_call *call, census_context *context) { } census_context *grpc_census_call_get_context(grpc_call *call) { + GRPC_API_TRACE("grpc_census_call_get_context(call=%p)", 1, (call)); return (census_context *)grpc_call_context_get(call, GRPC_CONTEXT_TRACING); } diff --git a/src/core/client_config/resolvers/zookeeper_resolver.c b/src/core/client_config/resolvers/zookeeper_resolver.c index f640a0084ad..136197d4c64 100644 --- a/src/core/client_config/resolvers/zookeeper_resolver.c +++ b/src/core/client_config/resolvers/zookeeper_resolver.c @@ -45,6 +45,7 @@ #include "src/core/client_config/resolver_registry.h" #include "src/core/iomgr/resolve_address.h" #include "src/core/support/string.h" +#include "src/core/surface/api_trace.h" #include "src/core/json/json.h" /** Zookeeper session expiration time in milliseconds */ @@ -487,6 +488,7 @@ static void zookeeper_plugin_init() { } void grpc_zookeeper_register() { + GRPC_API_TRACE("grpc_zookeeper_register(void)", 0, ()); grpc_register_plugin(zookeeper_plugin_init, NULL); } diff --git a/src/core/compression/algorithm.c b/src/core/compression/algorithm.c index 8adde13b1ec..ad7bb8c8133 100644 --- a/src/core/compression/algorithm.c +++ b/src/core/compression/algorithm.c @@ -37,12 +37,19 @@ #include #include +#include "src/core/surface/api_trace.h" + int grpc_compression_algorithm_parse(const char *name, size_t name_length, grpc_compression_algorithm *algorithm) { /* we use strncmp not only because it's safer (even though in this case it * doesn't matter, given that we are comparing against string literals, but * because this way we needn't have "name" nil-terminated (useful for slice * data, for example) */ + GRPC_API_TRACE( + "grpc_compression_algorithm_parse(" + "name=%*.*s, name_length=%lu, algorithm=%p)", 5, + ((int)name_length, (int)name_length, name, + (unsigned long)name_length, algorithm)); if (name_length == 0) { return 0; } @@ -60,6 +67,8 @@ int grpc_compression_algorithm_parse(const char *name, size_t name_length, int grpc_compression_algorithm_name(grpc_compression_algorithm algorithm, char **name) { + GRPC_API_TRACE("grpc_compression_algorithm_parse(algorithm=%d, name=%p)", 2, + ((int)algorithm, name)); switch (algorithm) { case GRPC_COMPRESS_NONE: *name = "identity"; @@ -80,6 +89,8 @@ int grpc_compression_algorithm_name(grpc_compression_algorithm algorithm, * compression algorithms */ grpc_compression_algorithm grpc_compression_algorithm_for_level( grpc_compression_level level) { + GRPC_API_TRACE("grpc_compression_algorithm_for_level(level=%d)", 1, + ((int)level)); switch (level) { case GRPC_COMPRESS_LEVEL_NONE: return GRPC_COMPRESS_NONE; @@ -96,6 +107,8 @@ grpc_compression_algorithm grpc_compression_algorithm_for_level( grpc_compression_level grpc_compression_level_for_algorithm( grpc_compression_algorithm algorithm) { grpc_compression_level clevel; + GRPC_API_TRACE("grpc_compression_level_for_algorithm(algorithm=%d)", 1, + ((int)algorithm)); for (clevel = GRPC_COMPRESS_LEVEL_NONE; clevel < GRPC_COMPRESS_LEVEL_COUNT; ++clevel) { if (grpc_compression_algorithm_for_level(clevel) == algorithm) { diff --git a/src/core/security/credentials.c b/src/core/security/credentials.c index bdd9ab8e9ca..ff67b5d30a8 100644 --- a/src/core/security/credentials.c +++ b/src/core/security/credentials.c @@ -41,6 +41,7 @@ #include "src/core/json/json.h" #include "src/core/httpcli/httpcli.h" #include "src/core/iomgr/iomgr.h" +#include "src/core/surface/api_trace.h" #include "src/core/support/string.h" #include @@ -91,6 +92,7 @@ void grpc_credentials_unref(grpc_credentials *creds) { } void grpc_credentials_release(grpc_credentials *creds) { + GRPC_API_TRACE("grpc_credentials_release(creds=%p)", 1, (creds)); grpc_credentials_unref(creds); } @@ -152,6 +154,7 @@ void grpc_server_credentials_unref(grpc_server_credentials *creds) { } void grpc_server_credentials_release(grpc_server_credentials *creds) { + GRPC_API_TRACE("grpc_server_credentials_release(creds=%p)", 1, (creds)); grpc_server_credentials_unref(creds); } @@ -166,6 +169,11 @@ grpc_security_status grpc_server_credentials_create_security_connector( void grpc_server_credentials_set_auth_metadata_processor( grpc_server_credentials *creds, grpc_auth_metadata_processor processor) { + GRPC_API_TRACE( + "grpc_server_credentials_set_auth_metadata_processor(" + "creds=%p, " + "processor=grpc_auth_metadata_processor { process: %lx, state: %p })", + 3, (creds, (unsigned long)processor.process, processor.state)); if (creds == NULL) return; if (creds->processor.destroy != NULL && creds->processor.state != NULL) { creds->processor.destroy(creds->processor.state); @@ -317,6 +325,10 @@ grpc_credentials *grpc_ssl_credentials_create( const char *pem_root_certs, grpc_ssl_pem_key_cert_pair *pem_key_cert_pair, void *reserved) { grpc_ssl_credentials *c = gpr_malloc(sizeof(grpc_ssl_credentials)); + GRPC_API_TRACE("grpc_ssl_credentials_create(pem_root_certs=%s, " + "pem_key_cert_pair=%p, " + "reserved=%p)", + 3, (pem_root_certs, pem_key_cert_pair, reserved)); GPR_ASSERT(reserved == NULL); memset(c, 0, sizeof(grpc_ssl_credentials)); c->base.type = GRPC_CREDENTIALS_TYPE_SSL; @@ -331,6 +343,12 @@ grpc_server_credentials *grpc_ssl_server_credentials_create( size_t num_key_cert_pairs, int force_client_auth, void *reserved) { grpc_ssl_server_credentials *c = gpr_malloc(sizeof(grpc_ssl_server_credentials)); + GRPC_API_TRACE( + "grpc_ssl_server_credentials_create(" + "pem_root_certs=%s, pem_key_cert_pairs=%p, num_key_cert_pairs=%lu, " + "force_client_auth=%d, reserved=%p)", 5, + (pem_root_certs, pem_key_cert_pairs, (unsigned long)num_key_cert_pairs, + force_client_auth, reserved)); GPR_ASSERT(reserved == NULL); memset(c, 0, sizeof(grpc_ssl_server_credentials)); c->base.type = GRPC_CREDENTIALS_TYPE_SSL; @@ -449,6 +467,14 @@ grpc_service_account_jwt_access_credentials_create_from_auth_json_key( grpc_credentials *grpc_service_account_jwt_access_credentials_create( const char *json_key, gpr_timespec token_lifetime, void *reserved) { + GRPC_API_TRACE( + "grpc_service_account_jwt_access_credentials_create(" + "json_key=%s, " + "token_lifetime=" + "gpr_timespec { tv_sec: %ld, tv_nsec: %d, clock_type: %d }, " + "reserved=%p)", + 5, (json_key, (long)token_lifetime.tv_sec, + token_lifetime.tv_nsec, (int)token_lifetime.clock_type, reserved)); GPR_ASSERT(reserved == NULL); return grpc_service_account_jwt_access_credentials_create_from_auth_json_key( grpc_auth_json_key_create_from_string(json_key), token_lifetime); @@ -659,6 +685,8 @@ grpc_credentials *grpc_google_compute_engine_credentials_create( void *reserved) { grpc_oauth2_token_fetcher_credentials *c = gpr_malloc(sizeof(grpc_oauth2_token_fetcher_credentials)); + GRPC_API_TRACE("grpc_compute_engine_credentials_create(reserved=%p)", 1, + (reserved)); GPR_ASSERT(reserved == NULL); init_oauth2_token_fetcher(c, compute_engine_fetch_oauth2); c->base.vtable = &compute_engine_vtable; @@ -720,6 +748,9 @@ grpc_credentials *grpc_refresh_token_credentials_create_from_auth_refresh_token( grpc_credentials *grpc_google_refresh_token_credentials_create( const char *json_refresh_token, void *reserved) { + GRPC_API_TRACE("grpc_refresh_token_credentials_create(json_refresh_token=%s, " + "reserved=%p)", + 2, (json_refresh_token, reserved)); GPR_ASSERT(reserved == NULL); return grpc_refresh_token_credentials_create_from_auth_refresh_token( grpc_auth_refresh_token_create_from_string(json_refresh_token)); @@ -820,6 +851,9 @@ grpc_credentials *grpc_access_token_credentials_create(const char *access_token, grpc_access_token_credentials *c = gpr_malloc(sizeof(grpc_access_token_credentials)); char *token_md_value; + GRPC_API_TRACE("grpc_access_token_credentials_create(access_token=%s, " + "reserved=%p)", 2, + (access_token, reserved)); GPR_ASSERT(reserved == NULL); memset(c, 0, sizeof(grpc_access_token_credentials)); c->base.type = GRPC_CREDENTIALS_TYPE_OAUTH2; @@ -1056,6 +1090,9 @@ grpc_credentials *grpc_composite_credentials_create(grpc_credentials *creds1, grpc_credentials_array creds1_array; grpc_credentials_array creds2_array; grpc_composite_credentials *c; + GRPC_API_TRACE("grpc_composite_credentials_create(creds1=%p, creds2=%p, " + "reserved=%p)", 3, + (creds1, creds2, reserved)); GPR_ASSERT(reserved == NULL); GPR_ASSERT(creds1 != NULL); GPR_ASSERT(creds2 != NULL); @@ -1158,6 +1195,9 @@ static grpc_credentials_vtable iam_vtable = { grpc_credentials *grpc_google_iam_credentials_create( const char *token, const char *authority_selector, void *reserved) { grpc_google_iam_credentials *c; + GRPC_API_TRACE("grpc_iam_credentials_create(token=%s, authority_selector=%s, " + "reserved=%p)", + 3, (token, authority_selector, reserved)); GPR_ASSERT(reserved == NULL); GPR_ASSERT(token != NULL); GPR_ASSERT(authority_selector != NULL); diff --git a/src/core/security/google_default_credentials.c b/src/core/security/google_default_credentials.c index 7b858428083..45135305b28 100644 --- a/src/core/security/google_default_credentials.c +++ b/src/core/security/google_default_credentials.c @@ -42,6 +42,7 @@ #include "src/core/httpcli/httpcli.h" #include "src/core/support/env.h" #include "src/core/support/file.h" +#include "src/core/surface/api_trace.h" /* -- Constants. -- */ @@ -178,6 +179,9 @@ end: grpc_credentials *grpc_google_default_credentials_create(void) { grpc_credentials *result = NULL; int serving_cached_credentials = 0; + + GRPC_API_TRACE("grpc_google_default_credentials_create(void)", 0, ()); + gpr_once_init(&g_once, init_default_credentials); gpr_mu_lock(&g_mu); diff --git a/src/core/security/security_context.c b/src/core/security/security_context.c index 95d80ba122f..b3cf5204c0d 100644 --- a/src/core/security/security_context.c +++ b/src/core/security/security_context.c @@ -34,6 +34,7 @@ #include #include "src/core/security/security_context.h" +#include "src/core/surface/api_trace.h" #include "src/core/surface/call.h" #include "src/core/support/string.h" @@ -47,6 +48,8 @@ grpc_call_error grpc_call_set_credentials(grpc_call *call, grpc_credentials *creds) { grpc_client_security_context *ctx = NULL; + GRPC_API_TRACE("grpc_call_set_credentials(call=%p, creds=%p)", 2, + (call, creds)); if (!grpc_call_is_client(call)) { gpr_log(GPR_ERROR, "Method is client-side only."); return GRPC_CALL_ERROR_NOT_ON_SERVER; @@ -71,6 +74,7 @@ grpc_call_error grpc_call_set_credentials(grpc_call *call, grpc_auth_context *grpc_call_auth_context(grpc_call *call) { void *sec_ctx = grpc_call_context_get(call, GRPC_CONTEXT_SECURITY); + GRPC_API_TRACE("grpc_call_auth_context(call=%p)", 1, (call)); if (sec_ctx == NULL) return NULL; return grpc_call_is_client(call) ? GRPC_AUTH_CONTEXT_REF( @@ -82,6 +86,7 @@ grpc_auth_context *grpc_call_auth_context(grpc_call *call) { } void grpc_auth_context_release(grpc_auth_context *context) { + GRPC_API_TRACE("grpc_auth_context_release(context=%p)", 1, (context)); GRPC_AUTH_CONTEXT_UNREF(context, "grpc_auth_context_unref"); } @@ -174,6 +179,8 @@ void grpc_auth_context_unref(grpc_auth_context *ctx) { const char *grpc_auth_context_peer_identity_property_name( const grpc_auth_context *ctx) { + GRPC_API_TRACE("grpc_auth_context_peer_identity_property_name(ctx=%p)", 1, + (ctx)); return ctx->peer_identity_property_name; } @@ -182,6 +189,9 @@ int grpc_auth_context_set_peer_identity_property_name(grpc_auth_context *ctx, grpc_auth_property_iterator it = grpc_auth_context_find_properties_by_name(ctx, name); const grpc_auth_property *prop = grpc_auth_property_iterator_next(&it); + GRPC_API_TRACE( + "grpc_auth_context_set_peer_identity_property_name(ctx=%p, name=%s)", 2, + (ctx, name)); if (prop == NULL) { gpr_log(GPR_ERROR, "Property name %s not found in auth context.", name != NULL ? name : "NULL"); @@ -192,12 +202,14 @@ int grpc_auth_context_set_peer_identity_property_name(grpc_auth_context *ctx, } int grpc_auth_context_peer_is_authenticated(const grpc_auth_context *ctx) { + GRPC_API_TRACE("grpc_auth_context_peer_is_authenticated(ctx=%p)", 1, (ctx)); return ctx->peer_identity_property_name == NULL ? 0 : 1; } grpc_auth_property_iterator grpc_auth_context_property_iterator( const grpc_auth_context *ctx) { grpc_auth_property_iterator it = empty_iterator; + GRPC_API_TRACE("grpc_auth_context_property_iterator(ctx=%p)", 1, (ctx)); if (ctx == NULL) return it; it.ctx = ctx; return it; @@ -205,6 +217,7 @@ grpc_auth_property_iterator grpc_auth_context_property_iterator( const grpc_auth_property *grpc_auth_property_iterator_next( grpc_auth_property_iterator *it) { + GRPC_API_TRACE("grpc_auth_property_iterator_next(it=%p)", 1, (it)); if (it == NULL || it->ctx == NULL) return NULL; while (it->index == it->ctx->properties.count) { if (it->ctx->chained == NULL) return NULL; @@ -229,6 +242,8 @@ const grpc_auth_property *grpc_auth_property_iterator_next( grpc_auth_property_iterator grpc_auth_context_find_properties_by_name( const grpc_auth_context *ctx, const char *name) { grpc_auth_property_iterator it = empty_iterator; + GRPC_API_TRACE("grpc_auth_context_find_properties_by_name(ctx=%p, name=%s)", + 2, (ctx, name)); if (ctx == NULL || name == NULL) return empty_iterator; it.ctx = ctx; it.name = name; @@ -237,6 +252,7 @@ grpc_auth_property_iterator grpc_auth_context_find_properties_by_name( grpc_auth_property_iterator grpc_auth_context_peer_identity( const grpc_auth_context *ctx) { + GRPC_API_TRACE("grpc_auth_context_peer_identity(ctx=%p)", 1, (ctx)); if (ctx == NULL) return empty_iterator; return grpc_auth_context_find_properties_by_name( ctx, ctx->peer_identity_property_name); @@ -255,6 +271,11 @@ static void ensure_auth_context_capacity(grpc_auth_context *ctx) { void grpc_auth_context_add_property(grpc_auth_context *ctx, const char *name, const char *value, size_t value_length) { grpc_auth_property *prop; + GRPC_API_TRACE( + "grpc_auth_context_add_property(ctx=%p, name=%s, value=%*.*s, " + "value_length=%lu)", + 6, (ctx, name, (int)value_length, (int)value_length, value, + (unsigned long)value_length)); ensure_auth_context_capacity(ctx); prop = &ctx->properties.array[ctx->properties.count++]; prop->name = gpr_strdup(name); @@ -268,6 +289,9 @@ void grpc_auth_context_add_cstring_property(grpc_auth_context *ctx, const char *name, const char *value) { grpc_auth_property *prop; + GRPC_API_TRACE( + "grpc_auth_context_add_cstring_property(ctx=%p, name=%s, value=%s)", 3, + (ctx, name, value)); ensure_auth_context_capacity(ctx); prop = &ctx->properties.array[ctx->properties.count++]; prop->name = gpr_strdup(name); diff --git a/src/core/security/server_secure_chttp2.c b/src/core/security/server_secure_chttp2.c index a6c515dc34e..3738ed6eb13 100644 --- a/src/core/security/server_secure_chttp2.c +++ b/src/core/security/server_secure_chttp2.c @@ -44,6 +44,7 @@ #include "src/core/security/credentials.h" #include "src/core/security/security_connector.h" #include "src/core/security/security_context.h" +#include "src/core/surface/api_trace.h" #include "src/core/surface/server.h" #include "src/core/transport/chttp2_transport.h" #include @@ -222,6 +223,10 @@ int grpc_server_add_secure_http2_port(grpc_server *server, const char *addr, grpc_security_connector *sc = NULL; grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + GRPC_API_TRACE("grpc_server_add_secure_http2_port(" + "server=%p, addr=%s, creds=%p)", + 3, (server, addr, creds)); + /* create security context */ if (creds == NULL) goto error; status = grpc_server_credentials_create_security_connector(creds, &sc); diff --git a/src/core/surface/api_trace.c b/src/core/surface/api_trace.c new file mode 100644 index 00000000000..9f0b900d467 --- /dev/null +++ b/src/core/surface/api_trace.c @@ -0,0 +1,36 @@ +/* + * + * Copyright 2015, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include "src/core/surface/api_trace.h" + +int grpc_api_trace = 0; diff --git a/src/core/surface/api_trace.h b/src/core/surface/api_trace.h new file mode 100644 index 00000000000..7769b191efa --- /dev/null +++ b/src/core/surface/api_trace.h @@ -0,0 +1,65 @@ +/* + * + * Copyright 2015, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#ifndef GRPC_INTERNAL_CORE_SURFACE_API_TRACE_H +#define GRPC_INTERNAL_CORE_SURFACE_API_TRACE_H + +#include "src/core/debug/trace.h" +#include + +extern int grpc_api_trace; + +/* Provide unwrapping macros because we're in C89 and variadic macros weren't + introduced until C99... */ +#define GRPC_API_TRACE_UNWRAP0() +#define GRPC_API_TRACE_UNWRAP1(a) , a +#define GRPC_API_TRACE_UNWRAP2(a, b) , a, b +#define GRPC_API_TRACE_UNWRAP3(a, b, c) , a, b, c +#define GRPC_API_TRACE_UNWRAP4(a, b, c, d) , a, b, c, d +#define GRPC_API_TRACE_UNWRAP5(a, b, c, d, e) , a, b, c, d, e +#define GRPC_API_TRACE_UNWRAP6(a, b, c, d, e, f) , a, b, c, d, e, f +#define GRPC_API_TRACE_UNWRAP7(a, b, c, d, e, f, g) , a, b, c, d, e, f, g +#define GRPC_API_TRACE_UNWRAP8(a, b, c, d, e, f, g, h) , a, b, c, d, e, f, g, h +#define GRPC_API_TRACE_UNWRAP9(a, b, c, d, e, f, g, h, i) \ + , a, b, c, d, e, f, g, h, i +#define GRPC_API_TRACE_UNWRAP10(a, b, c, d, e, f, g, h, i, j) \ + , a, b, c, d, e, f, g, h, i, j + +/* Due to the limitations of C89's preprocessor, the arity of the var-arg list + 'nargs' must be specified. */ +#define GRPC_API_TRACE(fmt, nargs, args) \ + if (grpc_api_trace) { \ + gpr_log(GPR_INFO, fmt GRPC_API_TRACE_UNWRAP##nargs args ); \ + } + +#endif /* GRPC_INTERNAL_CORE_SURFACE_API_TRACE_H */ diff --git a/src/core/surface/call.c b/src/core/surface/call.c index 0b917f15611..85c27746dca 100644 --- a/src/core/surface/call.c +++ b/src/core/surface/call.c @@ -45,6 +45,7 @@ #include "src/core/iomgr/alarm.h" #include "src/core/profiling/timers.h" #include "src/core/support/string.h" +#include "src/core/surface/api_trace.h" #include "src/core/surface/byte_buffer_queue.h" #include "src/core/surface/call.h" #include "src/core/surface/channel.h" @@ -1280,6 +1281,8 @@ void grpc_call_destroy(grpc_call *c) { grpc_call *parent = c->parent; grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + GRPC_API_TRACE("grpc_call_destroy(c=%p)", 1, (c)); + if (parent) { gpr_mu_lock(&parent->mu); if (c == parent->first_child) { @@ -1308,6 +1311,7 @@ void grpc_call_destroy(grpc_call *c) { } grpc_call_error grpc_call_cancel(grpc_call *call, void *reserved) { + GRPC_API_TRACE("grpc_call_cancel(call=%p, reserved=%p)", 2, (call, reserved)); GPR_ASSERT(!reserved); return grpc_call_cancel_with_status(call, GRPC_STATUS_CANCELLED, "Cancelled", NULL); @@ -1319,6 +1323,10 @@ grpc_call_error grpc_call_cancel_with_status(grpc_call *c, void *reserved) { grpc_call_error r; grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + GRPC_API_TRACE( + "grpc_call_cancel_with_status(" + "c=%p, status=%d, description=%s, reserved=%p)", + 4, (c, (int)status, description, reserved)); GPR_ASSERT(reserved == NULL); lock(c); r = cancel_with_status(c, status, description); @@ -1386,6 +1394,7 @@ char *grpc_call_get_peer(grpc_call *call) { grpc_call_element *elem = CALL_ELEM_FROM_CALL(call, 0); grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; char *result = elem->filter->get_peer(&exec_ctx, elem); + GRPC_API_TRACE("grpc_call_get_peer(%p)", 1, (call)); grpc_exec_ctx_finish(&exec_ctx); return result; } @@ -1580,6 +1589,10 @@ grpc_call_error grpc_call_start_batch(grpc_call *call, const grpc_op *ops, grpc_call_error error; grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + GRPC_API_TRACE( + "grpc_call_start_batch(call=%p, ops=%p, nops=%lu, tag=%p, reserved=%p)", + 5, (call, ops, (unsigned long)nops, tag, reserved)); + if (reserved != NULL) { error = GRPC_CALL_ERROR; goto done; diff --git a/src/core/surface/call_details.c b/src/core/surface/call_details.c index 65d2d1da5b2..60f0029819c 100644 --- a/src/core/surface/call_details.c +++ b/src/core/surface/call_details.c @@ -36,11 +36,15 @@ #include +#include "src/core/surface/api_trace.h" + void grpc_call_details_init(grpc_call_details* cd) { + GRPC_API_TRACE("grpc_call_details_init(cd=%p)", 1, (cd)); memset(cd, 0, sizeof(*cd)); } void grpc_call_details_destroy(grpc_call_details* cd) { + GRPC_API_TRACE("grpc_call_details_destroy(cd=%p)", 1, (cd)); gpr_free(cd->method); gpr_free(cd->host); } diff --git a/src/core/surface/channel.c b/src/core/surface/channel.c index aed7a79e4ef..3ff11eb0344 100644 --- a/src/core/surface/channel.c +++ b/src/core/surface/channel.c @@ -43,6 +43,7 @@ #include "src/core/client_config/resolver_registry.h" #include "src/core/iomgr/iomgr.h" #include "src/core/support/string.h" +#include "src/core/surface/api_trace.h" #include "src/core/surface/call.h" #include "src/core/surface/init.h" @@ -184,6 +185,7 @@ grpc_channel *grpc_channel_create_from_filters( } char *grpc_channel_get_target(grpc_channel *channel) { + GRPC_API_TRACE("grpc_channel_get_target(channel=%p)", 1, (channel)); return gpr_strdup(channel->target); } @@ -213,6 +215,15 @@ grpc_call *grpc_channel_create_call(grpc_channel *channel, grpc_completion_queue *cq, const char *method, const char *host, gpr_timespec deadline, void *reserved) { + GRPC_API_TRACE( + "grpc_channel_create_call(" + "channel=%p, parent_call=%p, propagation_mask=%x, cq=%p, method=%s, " + "host=%s, " + "deadline=gpr_timespec { tv_sec: %ld, tv_nsec: %d, clock_type: %d }, " + "reserved=%p)", + 10, (channel, parent_call, (unsigned)propagation_mask, cq, method, + host, (long)deadline.tv_sec, deadline.tv_nsec, + (int)deadline.clock_type, reserved)); GPR_ASSERT(!reserved); return grpc_channel_create_call_internal( channel, parent_call, propagation_mask, cq, @@ -230,6 +241,9 @@ grpc_call *grpc_channel_create_call(grpc_channel *channel, void *grpc_channel_register_call(grpc_channel *channel, const char *method, const char *host, void *reserved) { registered_call *rc = gpr_malloc(sizeof(registered_call)); + GRPC_API_TRACE( + "grpc_channel_register_call(channel=%p, method=%s, host=%s, reserved=%p)", + 4, (channel, method, host, reserved)); GPR_ASSERT(!reserved); rc->path = grpc_mdelem_from_metadata_strings( channel->metadata_context, GRPC_MDSTR_REF(channel->path_string), @@ -252,6 +266,15 @@ grpc_call *grpc_channel_create_registered_call( grpc_completion_queue *completion_queue, void *registered_call_handle, gpr_timespec deadline, void *reserved) { registered_call *rc = registered_call_handle; + GRPC_API_TRACE( + "grpc_channel_create_registered_call(" + "channel=%p, parent_call=%p, propagation_mask=%x, completion_queue=%p, " + "registered_call_handle=%p, " + "deadline=gpr_timespec { tv_sec: %ld, tv_nsec: %d, clock_type: %d }, " + "reserved=%p)", + 9, (channel, parent_call, (unsigned)propagation_mask, completion_queue, + registered_call_handle, (long)deadline.tv_sec, deadline.tv_nsec, + (int)deadline.clock_type, reserved)); GPR_ASSERT(!reserved); return grpc_channel_create_call_internal( channel, parent_call, propagation_mask, completion_queue, @@ -317,6 +340,7 @@ void grpc_channel_destroy(grpc_channel *channel) { grpc_transport_op op; grpc_channel_element *elem; grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + GRPC_API_TRACE("grpc_channel_destroy(channel=%p)", 1, (channel)); memset(&op, 0, sizeof(op)); op.disconnect = 1; elem = grpc_channel_stack_element(CHANNEL_STACK_FROM_CHANNEL(channel), 0); diff --git a/src/core/surface/channel_connectivity.c b/src/core/surface/channel_connectivity.c index 47cbab154f8..bef3d387fc9 100644 --- a/src/core/surface/channel_connectivity.c +++ b/src/core/surface/channel_connectivity.c @@ -38,6 +38,7 @@ #include "src/core/channel/client_channel.h" #include "src/core/iomgr/alarm.h" +#include "src/core/surface/api_trace.h" #include "src/core/surface/completion_queue.h" grpc_connectivity_state grpc_channel_check_connectivity_state( @@ -47,6 +48,9 @@ grpc_connectivity_state grpc_channel_check_connectivity_state( grpc_channel_stack_last_element(grpc_channel_get_channel_stack(channel)); grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; grpc_connectivity_state state; + GRPC_API_TRACE( + "grpc_channel_check_connectivity_state(channel=%p, try_to_connect=%d)", + 2, (channel, try_to_connect)); if (client_channel_elem->filter != &grpc_client_channel_filter) { gpr_log(GPR_ERROR, "grpc_channel_check_connectivity_state called on something that is " @@ -175,6 +179,14 @@ void grpc_channel_watch_connectivity_state( grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; state_watcher *w = gpr_malloc(sizeof(*w)); + GRPC_API_TRACE( + "grpc_channel_watch_connectivity_state(" + "channel=%p, last_observed_state=%d, " + "deadline=gpr_timespec { tv_sec: %ld, tv_nsec: %d, clock_type: %d }, " + "cq=%p, tag=%p)", + 7, (channel, (int)last_observed_state, (long)deadline.tv_sec, + deadline.tv_nsec, (int)deadline.clock_type, cq, tag)); + grpc_cq_begin_op(cq); gpr_mu_init(&w->mu); diff --git a/src/core/surface/channel_create.c b/src/core/surface/channel_create.c index 05591ce27f9..51d9130b63d 100644 --- a/src/core/surface/channel_create.c +++ b/src/core/surface/channel_create.c @@ -45,6 +45,7 @@ #include "src/core/channel/http_client_filter.h" #include "src/core/client_config/resolver_registry.h" #include "src/core/iomgr/tcp_client.h" +#include "src/core/surface/api_trace.h" #include "src/core/surface/channel.h" #include "src/core/transport/chttp2_transport.h" @@ -184,6 +185,9 @@ grpc_channel *grpc_insecure_channel_create(const char *target, grpc_mdctx *mdctx = grpc_mdctx_create(); grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; size_t n = 0; + GRPC_API_TRACE( + "grpc_insecure_channel_create(target=%p, args=%p, reserved=%p)", 3, + (target, args, reserved)); GPR_ASSERT(!reserved); if (grpc_channel_args_is_census_enabled(args)) { filters[n++] = &grpc_client_census_filter; diff --git a/src/core/surface/completion_queue.c b/src/core/surface/completion_queue.c index 5dac8ebcf8b..a6b32d27aa1 100644 --- a/src/core/surface/completion_queue.c +++ b/src/core/surface/completion_queue.c @@ -38,6 +38,7 @@ #include "src/core/iomgr/pollset.h" #include "src/core/support/string.h" +#include "src/core/surface/api_trace.h" #include "src/core/surface/call.h" #include "src/core/surface/event_string.h" #include "src/core/surface/surface_trace.h" @@ -75,6 +76,7 @@ static void on_pollset_destroy_done(grpc_exec_ctx *exec_ctx, void *cc, grpc_completion_queue *grpc_completion_queue_create(void *reserved) { grpc_completion_queue *cc = gpr_malloc(sizeof(grpc_completion_queue)); + GRPC_API_TRACE("grpc_completion_queue_create(reserved=%p)", 1, (reserved)); GPR_ASSERT(!reserved); memset(cc, 0, sizeof(*cc)); /* Initial ref is dropped by grpc_completion_queue_shutdown */ @@ -182,6 +184,13 @@ grpc_event grpc_completion_queue_next(grpc_completion_queue *cc, gpr_timespec now; grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + GRPC_API_TRACE( + "grpc_completion_queue_next(" + "cc=%p, " + "deadline=gpr_timespec { tv_sec: %ld, tv_nsec: %d, clock_type: %d }, " + "reserved=%p)", + 5, (cc, (long)deadline.tv_sec, deadline.tv_nsec, + (int)deadline.clock_type, reserved)); GPR_ASSERT(!reserved); deadline = gpr_convert_clock_type(deadline, GPR_CLOCK_MONOTONIC); @@ -259,6 +268,13 @@ grpc_event grpc_completion_queue_pluck(grpc_completion_queue *cc, void *tag, int first_loop = 1; grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + GRPC_API_TRACE( + "grpc_completion_queue_pluck(" + "cc=%p, tag=%p, " + "deadline=gpr_timespec { tv_sec: %ld, tv_nsec: %d, clock_type: %d }, " + "reserved=%p)", + 6, (cc, tag, (long)deadline.tv_sec, deadline.tv_nsec, + (int)deadline.clock_type, reserved)); GPR_ASSERT(!reserved); deadline = gpr_convert_clock_type(deadline, GPR_CLOCK_MONOTONIC); @@ -324,6 +340,7 @@ done: to zero here, then enter shutdown mode and wake up any waiters */ void grpc_completion_queue_shutdown(grpc_completion_queue *cc) { grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + GRPC_API_TRACE("grpc_completion_queue_shutdown(cc=%p)", 1, (cc)); gpr_mu_lock(GRPC_POLLSET_MU(&cc->pollset)); if (cc->shutdown_called) { gpr_mu_unlock(GRPC_POLLSET_MU(&cc->pollset)); @@ -343,6 +360,7 @@ void grpc_completion_queue_shutdown(grpc_completion_queue *cc) { } void grpc_completion_queue_destroy(grpc_completion_queue *cc) { + GRPC_API_TRACE("grpc_completion_queue_destroy(cc=%p)", 1, (cc)); grpc_completion_queue_shutdown(cc); GRPC_CQ_INTERNAL_UNREF(cc, "destroy"); } diff --git a/src/core/surface/init.c b/src/core/surface/init.c index 7d7e72440ea..96ab5ecb60b 100644 --- a/src/core/surface/init.c +++ b/src/core/surface/init.c @@ -49,6 +49,7 @@ #include "src/core/debug/trace.h" #include "src/core/iomgr/iomgr.h" #include "src/core/profiling/timers.h" +#include "src/core/surface/api_trace.h" #include "src/core/surface/call.h" #include "src/core/surface/init.h" #include "src/core/surface/surface_trace.h" @@ -75,6 +76,8 @@ static grpc_plugin g_all_of_the_plugins[MAX_PLUGINS]; static int g_number_of_plugins = 0; void grpc_register_plugin(void (*init)(void), void (*destroy)(void)) { + GRPC_API_TRACE("grpc_register_plugin(init=%lx, destroy=%lx)", 2, + ((unsigned long)init, (unsigned long)destroy)); GPR_ASSERT(g_number_of_plugins != MAX_PLUGINS); g_all_of_the_plugins[g_number_of_plugins].init = init; g_all_of_the_plugins[g_number_of_plugins].destroy = destroy; @@ -98,6 +101,7 @@ void grpc_init(void) { #ifdef GPR_POSIX_SOCKET grpc_register_resolver_type(grpc_unix_resolver_factory_create()); #endif + grpc_register_tracer("api", &grpc_api_trace); grpc_register_tracer("channel", &grpc_trace_channel); grpc_register_tracer("surface", &grpc_surface_trace); grpc_register_tracer("http", &grpc_http_trace); @@ -120,10 +124,12 @@ void grpc_init(void) { } } gpr_mu_unlock(&g_init_mu); + GRPC_API_TRACE("grpc_init(void)", 0, ()); } void grpc_shutdown(void) { int i; + GRPC_API_TRACE("grpc_shutdown(void)", 0, ()); gpr_mu_lock(&g_init_mu); if (--g_initializations == 0) { grpc_iomgr_shutdown(); diff --git a/src/core/surface/lame_client.c b/src/core/surface/lame_client.c index 9e14ce2191a..d2462d8c999 100644 --- a/src/core/surface/lame_client.c +++ b/src/core/surface/lame_client.c @@ -37,6 +37,7 @@ #include "src/core/channel/channel_stack.h" #include "src/core/support/string.h" +#include "src/core/surface/api_trace.h" #include "src/core/surface/channel.h" #include "src/core/surface/call.h" #include @@ -151,6 +152,10 @@ grpc_channel *grpc_lame_client_channel_create(const char *target, channel = grpc_channel_create_from_filters(&exec_ctx, target, filters, 1, NULL, grpc_mdctx_create(), 1); elem = grpc_channel_stack_element(grpc_channel_get_channel_stack(channel), 0); + GRPC_API_TRACE( + "grpc_lame_client_channel_create(target=%s, error_code=%d, " + "error_message=%s)", + 3, (target, (int)error_code, error_message)); GPR_ASSERT(elem->filter == &lame_filter); chand = (channel_data *)elem->channel_data; chand->error_code = error_code; diff --git a/src/core/surface/metadata_array.c b/src/core/surface/metadata_array.c index 648c5792667..4c7bf17835a 100644 --- a/src/core/surface/metadata_array.c +++ b/src/core/surface/metadata_array.c @@ -36,10 +36,14 @@ #include +#include "src/core/surface/api_trace.h" + void grpc_metadata_array_init(grpc_metadata_array* array) { + GRPC_API_TRACE("grpc_metadata_array_init(array=%p)", 1, (array)); memset(array, 0, sizeof(*array)); } void grpc_metadata_array_destroy(grpc_metadata_array* array) { + GRPC_API_TRACE("grpc_metadata_array_destroy(array=%p)", 1, (array)); gpr_free(array->metadata); } diff --git a/src/core/surface/secure_channel_create.c b/src/core/surface/secure_channel_create.c index d6070a54a89..7fe43b0eaa5 100644 --- a/src/core/surface/secure_channel_create.c +++ b/src/core/surface/secure_channel_create.c @@ -47,6 +47,7 @@ #include "src/core/iomgr/tcp_client.h" #include "src/core/security/auth_filters.h" #include "src/core/security/credentials.h" +#include "src/core/surface/api_trace.h" #include "src/core/surface/channel.h" #include "src/core/transport/chttp2_transport.h" #include "src/core/tsi/transport_security_interface.h" @@ -246,7 +247,11 @@ grpc_channel *grpc_secure_channel_create(grpc_credentials *creds, grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; size_t n = 0; + GRPC_API_TRACE("grpc_secure_channel_create(creds=%p, target=%s, args=%p, " + "reserved=%p)", 4, + (creds, target, args, reserved)); GPR_ASSERT(reserved == NULL); + if (grpc_find_security_connector_in_args(args) != NULL) { gpr_log(GPR_ERROR, "Cannot set security context in channel args."); grpc_exec_ctx_finish(&exec_ctx); diff --git a/src/core/surface/server.c b/src/core/surface/server.c index e3ce88b3e60..ebd2ef9af35 100644 --- a/src/core/surface/server.c +++ b/src/core/surface/server.c @@ -48,6 +48,7 @@ #include "src/core/iomgr/iomgr.h" #include "src/core/support/stack_lockfree.h" #include "src/core/support/string.h" +#include "src/core/surface/api_trace.h" #include "src/core/surface/call.h" #include "src/core/surface/channel.h" #include "src/core/surface/completion_queue.h" @@ -776,6 +777,9 @@ void grpc_server_register_completion_queue(grpc_server *server, grpc_completion_queue *cq, void *reserved) { size_t i, n; + GRPC_API_TRACE( + "grpc_server_register_completion_queue(server=%p, cq=%p, reserved=%p)", 3, + (server, cq, reserved)); GPR_ASSERT(!reserved); for (i = 0; i < server->cq_count; i++) { if (server->cqs[i] == cq) return; @@ -854,6 +858,8 @@ static int streq(const char *a, const char *b) { void *grpc_server_register_method(grpc_server *server, const char *method, const char *host) { registered_method *m; + GRPC_API_TRACE("grpc_server_register_method(server=%p, method=%s, host=%s)", + 3, (server, method, host)); if (!method) { gpr_log(GPR_ERROR, "grpc_server_register_method method string cannot be NULL"); @@ -881,6 +887,8 @@ void grpc_server_start(grpc_server *server) { size_t i; grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + GRPC_API_TRACE("grpc_server_start(server=%p)", 1, (server)); + server->pollsets = gpr_malloc(sizeof(grpc_pollset *) * server->cq_count); for (i = 0; i < server->cq_count; i++) { server->pollsets[i] = grpc_cq_pollset(server->cqs[i]); @@ -1011,6 +1019,9 @@ void grpc_server_shutdown_and_notify(grpc_server *server, channel_broadcaster broadcaster; grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + GRPC_API_TRACE("grpc_server_shutdown_and_notify(server=%p, cq=%p, tag=%p)", 3, + (server, cq, tag)); + GRPC_SERVER_LOG_SHUTDOWN(GPR_INFO, server, cq, tag); /* lock, and gather up some stuff to do */ @@ -1063,6 +1074,8 @@ void grpc_server_cancel_all_calls(grpc_server *server) { channel_broadcaster broadcaster; grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + GRPC_API_TRACE("grpc_server_cancel_all_calls(server=%p)", 1, (server)); + gpr_mu_lock(&server->mu_global); channel_broadcaster_init(server, &broadcaster); gpr_mu_unlock(&server->mu_global); @@ -1075,6 +1088,8 @@ void grpc_server_destroy(grpc_server *server) { listener *l; grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + GRPC_API_TRACE("grpc_server_destroy(server=%p)", 1, (server)); + gpr_mu_lock(&server->mu_global); GPR_ASSERT(gpr_atm_acq_load(&server->shutdown_flag) || !server->listeners); GPR_ASSERT(server->listeners_destroyed == num_listeners(server)); @@ -1169,6 +1184,12 @@ grpc_call_error grpc_server_request_call( grpc_call_error error; grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; requested_call *rc = gpr_malloc(sizeof(*rc)); + GRPC_API_TRACE( + "grpc_server_request_call(" + "server=%p, call=%p, details=%p, initial_metadata=%p, " + "cq_bound_to_call=%p, cq_for_notification=%p, tag%p)", + 7, (server, call, details, initial_metadata, cq_bound_to_call, + cq_for_notification, tag)); GRPC_SERVER_LOG_REQUEST_CALL(GPR_INFO, server, call, details, initial_metadata, cq_bound_to_call, cq_for_notification, tag); @@ -1202,6 +1223,13 @@ grpc_call_error grpc_server_request_registered_call( grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; requested_call *rc = gpr_malloc(sizeof(*rc)); registered_method *rm = rmp; + GRPC_API_TRACE( + "grpc_server_request_registered_call(" + "server=%p, rmp=%p, call=%p, deadline=%p, initial_metadata=%p, " + "optional_payload=%p, cq_bound_to_call=%p, cq_for_notification=%p, " + "tag=%p)", + 9, (server, rmp, call, deadline, initial_metadata, optional_payload, + cq_bound_to_call, cq_for_notification, tag)); if (!grpc_cq_is_server_cq(cq_for_notification)) { gpr_free(rc); error = GRPC_CALL_ERROR_NOT_SERVER_COMPLETION_QUEUE; diff --git a/src/core/surface/server_chttp2.c b/src/core/surface/server_chttp2.c index 3904ce969dd..580b91573c2 100644 --- a/src/core/surface/server_chttp2.c +++ b/src/core/surface/server_chttp2.c @@ -36,6 +36,7 @@ #include "src/core/channel/http_server_filter.h" #include "src/core/iomgr/resolve_address.h" #include "src/core/iomgr/tcp_server.h" +#include "src/core/surface/api_trace.h" #include "src/core/surface/server.h" #include "src/core/transport/chttp2_transport.h" #include @@ -92,6 +93,9 @@ int grpc_server_add_insecure_http2_port(grpc_server *server, const char *addr) { int port_temp; grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + GRPC_API_TRACE("grpc_server_add_insecure_http2_port(server=%p, addr=%s)", 2, + (server, addr)); + resolved = grpc_blocking_resolve_address(addr, "http"); if (!resolved) { goto error; diff --git a/src/core/surface/server_create.c b/src/core/surface/server_create.c index fc7ae820f53..c7811a6d881 100644 --- a/src/core/surface/server_create.c +++ b/src/core/surface/server_create.c @@ -32,13 +32,14 @@ */ #include +#include "src/core/surface/api_trace.h" #include "src/core/surface/completion_queue.h" #include "src/core/surface/server.h" #include "src/core/channel/compress_filter.h" grpc_server *grpc_server_create(const grpc_channel_args *args, void *reserved) { const grpc_channel_filter *filters[] = {&grpc_compress_filter}; - (void)reserved; + GRPC_API_TRACE("grpc_server_create(%p, %p)", 2, (args, reserved)); return grpc_server_create_from_filters(filters, GPR_ARRAY_SIZE(filters), args); } diff --git a/src/core/surface/version.c b/src/core/surface/version.c index e559d51448a..8eb3ceea70f 100644 --- a/src/core/surface/version.c +++ b/src/core/surface/version.c @@ -36,4 +36,10 @@ #include -const char *grpc_version_string(void) { return "0.11.0.0"; } +#include "src/core/surface/api_trace.h" + +const char *grpc_version_string(void) { + GRPC_API_TRACE("grpc_version_string(void)", 0, ()); + return "0.11.0.0"; +} + From fe1093c3a8d59c6bdc97eef6f6ade784df99204b Mon Sep 17 00:00:00 2001 From: Masood Malekghassemi Date: Wed, 19 Aug 2015 19:15:24 -0700 Subject: [PATCH 106/169] Update build tools --- BUILD | 3 + Makefile | 2 + gRPC.podspec | 1 + tools/doxygen/Doxyfile.core.internal | 1 + tools/run_tests/sources_and_headers.json | 2 + vsprojects/grpc/grpc.vcxproj | 659 +++++++++++++ vsprojects/grpc/grpc.vcxproj.filters | 874 ++++++++++++++++++ .../grpc_unsecure/grpc_unsecure.vcxproj | 597 ++++++++++++ .../grpc_unsecure.vcxproj.filters | 766 +++++++++++++++ 9 files changed, 2905 insertions(+) create mode 100644 vsprojects/grpc/grpc.vcxproj create mode 100644 vsprojects/grpc/grpc.vcxproj.filters create mode 100644 vsprojects/grpc_unsecure/grpc_unsecure.vcxproj create mode 100644 vsprojects/grpc_unsecure/grpc_unsecure.vcxproj.filters diff --git a/BUILD b/BUILD index c8118089bef..c4ff5ee7972 100644 --- a/BUILD +++ b/BUILD @@ -356,6 +356,7 @@ cc_library( "src/core/json/json_writer.c", "src/core/profiling/basic_timers.c", "src/core/profiling/stap_timers.c", + "src/core/surface/api_trace.c", "src/core/surface/byte_buffer.c", "src/core/surface/byte_buffer_queue.c", "src/core/surface/byte_buffer_reader.c", @@ -621,6 +622,7 @@ cc_library( "src/core/json/json_writer.c", "src/core/profiling/basic_timers.c", "src/core/profiling/stap_timers.c", + "src/core/surface/api_trace.c", "src/core/surface/byte_buffer.c", "src/core/surface/byte_buffer_queue.c", "src/core/surface/byte_buffer_reader.c", @@ -1145,6 +1147,7 @@ objc_library( "src/core/json/json_writer.c", "src/core/profiling/basic_timers.c", "src/core/profiling/stap_timers.c", + "src/core/surface/api_trace.c", "src/core/surface/byte_buffer.c", "src/core/surface/byte_buffer_queue.c", "src/core/surface/byte_buffer_reader.c", diff --git a/Makefile b/Makefile index e0a7b804721..ca365a8dbe3 100644 --- a/Makefile +++ b/Makefile @@ -4119,6 +4119,7 @@ LIBGRPC_SRC = \ src/core/json/json_writer.c \ src/core/profiling/basic_timers.c \ src/core/profiling/stap_timers.c \ + src/core/surface/api_trace.c \ src/core/surface/byte_buffer.c \ src/core/surface/byte_buffer_queue.c \ src/core/surface/byte_buffer_reader.c \ @@ -4401,6 +4402,7 @@ LIBGRPC_UNSECURE_SRC = \ src/core/json/json_writer.c \ src/core/profiling/basic_timers.c \ src/core/profiling/stap_timers.c \ + src/core/surface/api_trace.c \ src/core/surface/byte_buffer.c \ src/core/surface/byte_buffer_queue.c \ src/core/surface/byte_buffer_reader.c \ diff --git a/gRPC.podspec b/gRPC.podspec index 46823453bab..dfb52a88bf7 100644 --- a/gRPC.podspec +++ b/gRPC.podspec @@ -366,6 +366,7 @@ Pod::Spec.new do |s| 'src/core/json/json_writer.c', 'src/core/profiling/basic_timers.c', 'src/core/profiling/stap_timers.c', + 'src/core/surface/api_trace.c', 'src/core/surface/byte_buffer.c', 'src/core/surface/byte_buffer_queue.c', 'src/core/surface/byte_buffer_reader.c', diff --git a/tools/doxygen/Doxyfile.core.internal b/tools/doxygen/Doxyfile.core.internal index a7a3da4d200..123280ca1b2 100644 --- a/tools/doxygen/Doxyfile.core.internal +++ b/tools/doxygen/Doxyfile.core.internal @@ -991,6 +991,7 @@ src/core/json/json_string.c \ src/core/json/json_writer.c \ src/core/profiling/basic_timers.c \ src/core/profiling/stap_timers.c \ +src/core/surface/api_trace.c \ src/core/surface/byte_buffer.c \ src/core/surface/byte_buffer_queue.c \ src/core/surface/byte_buffer_reader.c \ diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json index 1e5dd11fcd0..8d5c82b8128 100644 --- a/tools/run_tests/sources_and_headers.json +++ b/tools/run_tests/sources_and_headers.json @@ -12596,6 +12596,7 @@ "src/core/security/server_secure_chttp2.c", "src/core/statistics/census_interface.h", "src/core/statistics/census_rpc_stats.h", + "src/core/surface/api_trace.c", "src/core/surface/byte_buffer.c", "src/core/surface/byte_buffer_queue.c", "src/core/surface/byte_buffer_queue.h", @@ -13060,6 +13061,7 @@ "src/core/profiling/timers.h", "src/core/statistics/census_interface.h", "src/core/statistics/census_rpc_stats.h", + "src/core/surface/api_trace.c", "src/core/surface/byte_buffer.c", "src/core/surface/byte_buffer_queue.c", "src/core/surface/byte_buffer_queue.h", diff --git a/vsprojects/grpc/grpc.vcxproj b/vsprojects/grpc/grpc.vcxproj new file mode 100644 index 00000000000..dc1a58b8dd4 --- /dev/null +++ b/vsprojects/grpc/grpc.vcxproj @@ -0,0 +1,659 @@ + + + + + + Debug-DLL + Win32 + + + Debug-DLL + x64 + + + Release-DLL + Win32 + + + Release-DLL + x64 + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {29D16885-7228-4C31-81ED-5F9187C7F2A9} + + + + v100 + + + v110 + + + v120 + + + StaticLibrary + true + Unicode + + + StaticLibrary + false + true + Unicode + + + StaticLibrary + true + Unicode + + + StaticLibrary + false + true + Unicode + + + + + + + + + + + + grpc + static + Debug + Debug + + + grpc + static + Debug + Debug + + + + NotUsing + Level3 + Disabled + WIN32;_DEBUG;_LIB;_USE_32BIT_TIME_T;%(PreprocessorDefinitions) + true + MultiThreadedDebug + + + Windows + true + + + + + NotUsing + Level3 + Disabled + WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) + true + MultiThreadedDebug + + + Windows + true + + + + + Level3 + NotUsing + MaxSpeed + true + true + WIN32;NDEBUG;_LIB;_USE_32BIT_TIME_T;%(PreprocessorDefinitions) + true + MultiThreaded + + + Windows + true + true + true + + + + + Level3 + NotUsing + MaxSpeed + true + true + WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) + true + MultiThreaded + + + Windows + true + true + true + + + + + NotUsing + Level3 + Disabled + WIN32;_DEBUG;_LIB;_USE_32BIT_TIME_T;%(PreprocessorDefinitions) + true + MultiThreadedDebug + + + Windows + true + + + + + NotUsing + Level3 + Disabled + WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) + true + MultiThreadedDebug + + + Windows + true + + + + + Level3 + NotUsing + MaxSpeed + true + true + WIN32;NDEBUG;_LIB;_USE_32BIT_TIME_T;%(PreprocessorDefinitions) + true + MultiThreaded + + + Windows + true + true + true + + + + + Level3 + NotUsing + MaxSpeed + true + true + WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) + true + MultiThreaded + + + Windows + true + true + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} + + + + + + + + + + + + + + + This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + + + + + + + + diff --git a/vsprojects/grpc/grpc.vcxproj.filters b/vsprojects/grpc/grpc.vcxproj.filters new file mode 100644 index 00000000000..624bac04f5b --- /dev/null +++ b/vsprojects/grpc/grpc.vcxproj.filters @@ -0,0 +1,874 @@ + + + + + src\core\httpcli + + + src\core\security + + + src\core\security + + + src\core\security + + + src\core\security + + + src\core\security + + + src\core\security + + + src\core\security + + + src\core\security + + + src\core\security + + + src\core\security + + + src\core\security + + + src\core\security + + + src\core\security + + + src\core\security + + + src\core\security + + + src\core\surface + + + src\core\surface + + + src\core\tsi + + + src\core\tsi + + + src\core\tsi + + + src\core\census + + + src\core\census + + + src\core\channel + + + src\core\channel + + + src\core\channel + + + src\core\channel + + + src\core\channel + + + src\core\channel + + + src\core\channel + + + src\core\channel + + + src\core\client_config + + + src\core\client_config + + + src\core\client_config\lb_policies + + + src\core\client_config + + + src\core\client_config + + + src\core\client_config + + + src\core\client_config + + + src\core\client_config\resolvers + + + src\core\client_config\resolvers + + + src\core\client_config + + + src\core\client_config + + + src\core\client_config\subchannel_factory_decorators + + + src\core\client_config\subchannel_factory_decorators + + + src\core\client_config + + + src\core\compression + + + src\core\compression + + + src\core\debug + + + src\core\httpcli + + + src\core\httpcli + + + src\core\httpcli + + + src\core\iomgr + + + src\core\iomgr + + + src\core\iomgr + + + src\core\iomgr + + + src\core\iomgr + + + src\core\iomgr + + + src\core\iomgr + + + src\core\iomgr + + + src\core\iomgr + + + src\core\iomgr + + + src\core\iomgr + + + src\core\iomgr + + + src\core\iomgr + + + src\core\iomgr + + + src\core\iomgr + + + src\core\iomgr + + + src\core\iomgr + + + src\core\iomgr + + + src\core\iomgr + + + src\core\iomgr + + + src\core\iomgr + + + src\core\iomgr + + + src\core\iomgr + + + src\core\iomgr + + + src\core\iomgr + + + src\core\iomgr + + + src\core\iomgr + + + src\core\iomgr + + + src\core\iomgr + + + src\core\iomgr + + + src\core\iomgr + + + src\core\iomgr + + + src\core\iomgr + + + src\core\iomgr + + + src\core\iomgr + + + src\core\json + + + src\core\json + + + src\core\json + + + src\core\json + + + src\core\profiling + + + src\core\profiling + + + src\core\surface + + + src\core\surface + + + src\core\surface + + + src\core\surface + + + src\core\surface + + + src\core\surface + + + src\core\surface + + + src\core\surface + + + src\core\surface + + + src\core\surface + + + src\core\surface + + + src\core\surface + + + src\core\surface + + + src\core\surface + + + src\core\surface + + + src\core\surface + + + src\core\surface + + + src\core\surface + + + src\core\surface + + + src\core\surface + + + src\core\transport\chttp2 + + + src\core\transport\chttp2 + + + src\core\transport\chttp2 + + + src\core\transport\chttp2 + + + src\core\transport\chttp2 + + + src\core\transport\chttp2 + + + src\core\transport\chttp2 + + + src\core\transport\chttp2 + + + src\core\transport\chttp2 + + + src\core\transport\chttp2 + + + src\core\transport\chttp2 + + + src\core\transport\chttp2 + + + src\core\transport\chttp2 + + + src\core\transport\chttp2 + + + src\core\transport\chttp2 + + + src\core\transport\chttp2 + + + src\core\transport\chttp2 + + + src\core\transport\chttp2 + + + src\core\transport\chttp2 + + + src\core\transport\chttp2 + + + src\core\transport + + + src\core\transport + + + src\core\transport + + + src\core\transport + + + src\core\transport + + + src\core\transport + + + src\core\census + + + src\core\census + + + src\core\census + + + + + include\grpc + + + include\grpc + + + include\grpc + + + include\grpc + + + include\grpc + + + include\grpc + + + include\grpc + + + + + src\core\security + + + src\core\security + + + src\core\security + + + src\core\security + + + src\core\security + + + src\core\security + + + src\core\security + + + src\core\security + + + src\core\security + + + src\core\tsi + + + src\core\tsi + + + src\core\tsi + + + src\core\tsi + + + src\core\census + + + src\core\channel + + + src\core\channel + + + src\core\channel + + + src\core\channel + + + src\core\channel + + + src\core\channel + + + src\core\channel + + + src\core\channel + + + src\core\channel + + + src\core\client_config + + + src\core\client_config + + + src\core\client_config\lb_policies + + + src\core\client_config + + + src\core\client_config + + + src\core\client_config + + + src\core\client_config + + + src\core\client_config\resolvers + + + src\core\client_config\resolvers + + + src\core\client_config + + + src\core\client_config + + + src\core\client_config\subchannel_factory_decorators + + + src\core\client_config\subchannel_factory_decorators + + + src\core\client_config + + + src\core\compression + + + src\core\debug + + + src\core\httpcli + + + src\core\httpcli + + + src\core\httpcli + + + src\core\iomgr + + + src\core\iomgr + + + src\core\iomgr + + + src\core\iomgr + + + src\core\iomgr + + + src\core\iomgr + + + src\core\iomgr + + + src\core\iomgr + + + src\core\iomgr + + + src\core\iomgr + + + src\core\iomgr + + + src\core\iomgr + + + src\core\iomgr + + + src\core\iomgr + + + src\core\iomgr + + + src\core\iomgr + + + src\core\iomgr + + + src\core\iomgr + + + src\core\iomgr + + + src\core\iomgr + + + src\core\iomgr + + + src\core\iomgr + + + src\core\iomgr + + + src\core\iomgr + + + src\core\iomgr + + + src\core\iomgr + + + src\core\iomgr + + + src\core\iomgr + + + src\core\iomgr + + + src\core\iomgr + + + src\core\iomgr + + + src\core\json + + + src\core\json + + + src\core\json + + + src\core\json + + + src\core\profiling + + + src\core\profiling + + + src\core\statistics + + + src\core\statistics + + + src\core\surface + + + src\core\surface + + + src\core\surface + + + src\core\surface + + + src\core\surface + + + src\core\surface + + + src\core\surface + + + src\core\surface + + + src\core\transport\chttp2 + + + src\core\transport\chttp2 + + + src\core\transport\chttp2 + + + src\core\transport\chttp2 + + + src\core\transport\chttp2 + + + src\core\transport\chttp2 + + + src\core\transport\chttp2 + + + src\core\transport\chttp2 + + + src\core\transport\chttp2 + + + src\core\transport\chttp2 + + + src\core\transport\chttp2 + + + src\core\transport\chttp2 + + + src\core\transport\chttp2 + + + src\core\transport\chttp2 + + + src\core\transport\chttp2 + + + src\core\transport\chttp2 + + + src\core\transport\chttp2 + + + src\core\transport\chttp2 + + + src\core\transport\chttp2 + + + src\core\transport\chttp2 + + + src\core\transport + + + src\core\transport + + + src\core\transport + + + src\core\transport + + + src\core\transport + + + src\core\transport + + + src\core\census + + + src\core\census + + + + + + {968de0a1-346d-b75a-6f19-6a55119b8235} + + + {880c644d-b84f-cfca-98bd-e145f36232ab} + + + {d538af37-07b2-062b-fa2a-d9f882cb2737} + + + {ea745680-21ea-9c5e-679b-64dc40562d08} + + + {fb3aefc2-8205-b0bf-525f-ab5e339f7f76} + + + {d897b6c3-c555-234e-a589-b4f008063615} + + + {e71e6928-b1e3-0616-0961-1505370458ab} + + + {a3eca4d5-f760-61a6-7251-556b828c8b44} + + + {6d97b8d9-2c15-927a-892a-709d073c02ab} + + + {428cdbb1-c777-2c64-79b3-43d6ee413061} + + + {263cb913-dfe6-42a4-096b-cac231f76305} + + + {1da7ef8a-a06d-5499-b3de-19fee4a4214d} + + + {a9bc00ad-835f-c625-c6d9-6a1324f98b9f} + + + {1baf3894-af37-e647-bdbc-95dc17ed0073} + + + {e665cc0e-b994-d7c5-cc18-2007392019f0} + + + {87674b72-0f05-0469-481a-bd8c7af9ad80} + + + {1d850ac6-e639-4eab-5338-4ba40272fcc9} + + + {0ef49896-2313-4a3f-1ce2-716fa0e5c6ca} + + + {aeb18e82-5d25-0aad-8b02-a0a3470073ce} + + + {168fa1b1-1c18-eb55-9a4d-746bc58df2c1} + + + {b8b623c3-a168-a2b1-0d5f-b70a1f1cd8d2} + + + {0b0f9ab1-efa4-7f03-e446-6fb9b5227e84} + + + + diff --git a/vsprojects/grpc_unsecure/grpc_unsecure.vcxproj b/vsprojects/grpc_unsecure/grpc_unsecure.vcxproj new file mode 100644 index 00000000000..2329d3532cc --- /dev/null +++ b/vsprojects/grpc_unsecure/grpc_unsecure.vcxproj @@ -0,0 +1,597 @@ + + + + + Debug-DLL + Win32 + + + Debug-DLL + x64 + + + Release-DLL + Win32 + + + Release-DLL + x64 + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5} + + + + v100 + + + v110 + + + v120 + + + StaticLibrary + true + Unicode + + + StaticLibrary + false + true + Unicode + + + StaticLibrary + true + Unicode + + + StaticLibrary + false + true + Unicode + + + + + + + + + + + + grpc_unsecure + static + Debug + + + grpc_unsecure + static + Debug + + + + NotUsing + Level3 + Disabled + WIN32;_DEBUG;_LIB;_USE_32BIT_TIME_T;%(PreprocessorDefinitions) + true + MultiThreadedDebug + + + Windows + true + + + + + NotUsing + Level3 + Disabled + WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) + true + MultiThreadedDebug + + + Windows + true + + + + + Level3 + NotUsing + MaxSpeed + true + true + WIN32;NDEBUG;_LIB;_USE_32BIT_TIME_T;%(PreprocessorDefinitions) + true + MultiThreaded + + + Windows + true + true + true + + + + + Level3 + NotUsing + MaxSpeed + true + true + WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) + true + MultiThreaded + + + Windows + true + true + true + + + + + NotUsing + Level3 + Disabled + WIN32;_DEBUG;_LIB;_USE_32BIT_TIME_T;%(PreprocessorDefinitions) + true + MultiThreadedDebug + + + Windows + true + + + + + NotUsing + Level3 + Disabled + WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) + true + MultiThreadedDebug + + + Windows + true + + + + + Level3 + NotUsing + MaxSpeed + true + true + WIN32;NDEBUG;_LIB;_USE_32BIT_TIME_T;%(PreprocessorDefinitions) + true + MultiThreaded + + + Windows + true + true + true + + + + + Level3 + NotUsing + MaxSpeed + true + true + WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) + true + MultiThreaded + + + Windows + true + true + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} + + + + + + + + + + + + + This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + + + + + diff --git a/vsprojects/grpc_unsecure/grpc_unsecure.vcxproj.filters b/vsprojects/grpc_unsecure/grpc_unsecure.vcxproj.filters new file mode 100644 index 00000000000..493bae2fb8b --- /dev/null +++ b/vsprojects/grpc_unsecure/grpc_unsecure.vcxproj.filters @@ -0,0 +1,766 @@ + + + + + src\core\surface + + + src\core\census + + + src\core\census + + + src\core\channel + + + src\core\channel + + + src\core\channel + + + src\core\channel + + + src\core\channel + + + src\core\channel + + + src\core\channel + + + src\core\channel + + + src\core\client_config + + + src\core\client_config + + + src\core\client_config\lb_policies + + + src\core\client_config + + + src\core\client_config + + + src\core\client_config + + + src\core\client_config + + + src\core\client_config\resolvers + + + src\core\client_config\resolvers + + + src\core\client_config + + + src\core\client_config + + + src\core\client_config\subchannel_factory_decorators + + + src\core\client_config\subchannel_factory_decorators + + + src\core\client_config + + + src\core\compression + + + src\core\compression + + + src\core\debug + + + src\core\httpcli + + + src\core\httpcli + + + src\core\httpcli + + + src\core\iomgr + + + src\core\iomgr + + + src\core\iomgr + + + src\core\iomgr + + + src\core\iomgr + + + src\core\iomgr + + + src\core\iomgr + + + src\core\iomgr + + + src\core\iomgr + + + src\core\iomgr + + + src\core\iomgr + + + src\core\iomgr + + + src\core\iomgr + + + src\core\iomgr + + + src\core\iomgr + + + src\core\iomgr + + + src\core\iomgr + + + src\core\iomgr + + + src\core\iomgr + + + src\core\iomgr + + + src\core\iomgr + + + src\core\iomgr + + + src\core\iomgr + + + src\core\iomgr + + + src\core\iomgr + + + src\core\iomgr + + + src\core\iomgr + + + src\core\iomgr + + + src\core\iomgr + + + src\core\iomgr + + + src\core\iomgr + + + src\core\iomgr + + + src\core\iomgr + + + src\core\iomgr + + + src\core\iomgr + + + src\core\json + + + src\core\json + + + src\core\json + + + src\core\json + + + src\core\profiling + + + src\core\profiling + + + src\core\surface + + + src\core\surface + + + src\core\surface + + + src\core\surface + + + src\core\surface + + + src\core\surface + + + src\core\surface + + + src\core\surface + + + src\core\surface + + + src\core\surface + + + src\core\surface + + + src\core\surface + + + src\core\surface + + + src\core\surface + + + src\core\surface + + + src\core\surface + + + src\core\surface + + + src\core\surface + + + src\core\surface + + + src\core\surface + + + src\core\transport\chttp2 + + + src\core\transport\chttp2 + + + src\core\transport\chttp2 + + + src\core\transport\chttp2 + + + src\core\transport\chttp2 + + + src\core\transport\chttp2 + + + src\core\transport\chttp2 + + + src\core\transport\chttp2 + + + src\core\transport\chttp2 + + + src\core\transport\chttp2 + + + src\core\transport\chttp2 + + + src\core\transport\chttp2 + + + src\core\transport\chttp2 + + + src\core\transport\chttp2 + + + src\core\transport\chttp2 + + + src\core\transport\chttp2 + + + src\core\transport\chttp2 + + + src\core\transport\chttp2 + + + src\core\transport\chttp2 + + + src\core\transport\chttp2 + + + src\core\transport + + + src\core\transport + + + src\core\transport + + + src\core\transport + + + src\core\transport + + + src\core\transport + + + src\core\census + + + src\core\census + + + src\core\census + + + + + include\grpc + + + include\grpc + + + include\grpc + + + include\grpc + + + include\grpc + + + include\grpc + + + + + src\core\census + + + src\core\channel + + + src\core\channel + + + src\core\channel + + + src\core\channel + + + src\core\channel + + + src\core\channel + + + src\core\channel + + + src\core\channel + + + src\core\channel + + + src\core\client_config + + + src\core\client_config + + + src\core\client_config\lb_policies + + + src\core\client_config + + + src\core\client_config + + + src\core\client_config + + + src\core\client_config + + + src\core\client_config\resolvers + + + src\core\client_config\resolvers + + + src\core\client_config + + + src\core\client_config + + + src\core\client_config\subchannel_factory_decorators + + + src\core\client_config\subchannel_factory_decorators + + + src\core\client_config + + + src\core\compression + + + src\core\debug + + + src\core\httpcli + + + src\core\httpcli + + + src\core\httpcli + + + src\core\iomgr + + + src\core\iomgr + + + src\core\iomgr + + + src\core\iomgr + + + src\core\iomgr + + + src\core\iomgr + + + src\core\iomgr + + + src\core\iomgr + + + src\core\iomgr + + + src\core\iomgr + + + src\core\iomgr + + + src\core\iomgr + + + src\core\iomgr + + + src\core\iomgr + + + src\core\iomgr + + + src\core\iomgr + + + src\core\iomgr + + + src\core\iomgr + + + src\core\iomgr + + + src\core\iomgr + + + src\core\iomgr + + + src\core\iomgr + + + src\core\iomgr + + + src\core\iomgr + + + src\core\iomgr + + + src\core\iomgr + + + src\core\iomgr + + + src\core\iomgr + + + src\core\iomgr + + + src\core\iomgr + + + src\core\iomgr + + + src\core\json + + + src\core\json + + + src\core\json + + + src\core\json + + + src\core\profiling + + + src\core\profiling + + + src\core\statistics + + + src\core\statistics + + + src\core\surface + + + src\core\surface + + + src\core\surface + + + src\core\surface + + + src\core\surface + + + src\core\surface + + + src\core\surface + + + src\core\surface + + + src\core\transport\chttp2 + + + src\core\transport\chttp2 + + + src\core\transport\chttp2 + + + src\core\transport\chttp2 + + + src\core\transport\chttp2 + + + src\core\transport\chttp2 + + + src\core\transport\chttp2 + + + src\core\transport\chttp2 + + + src\core\transport\chttp2 + + + src\core\transport\chttp2 + + + src\core\transport\chttp2 + + + src\core\transport\chttp2 + + + src\core\transport\chttp2 + + + src\core\transport\chttp2 + + + src\core\transport\chttp2 + + + src\core\transport\chttp2 + + + src\core\transport\chttp2 + + + src\core\transport\chttp2 + + + src\core\transport\chttp2 + + + src\core\transport\chttp2 + + + src\core\transport + + + src\core\transport + + + src\core\transport + + + src\core\transport + + + src\core\transport + + + src\core\transport + + + src\core\census + + + src\core\census + + + + + + {10076c7e-7c8e-8005-0c81-64454af2cbc8} + + + {77b9717b-b8d8-dd5f-14bb-a3e96809a70a} + + + {aaf326a1-c884-46ea-875a-cbbd9983e539} + + + {88491077-386b-2039-d14c-0c40136b5f7a} + + + {a7596ee2-afee-3a82-7e6e-bd8b8f904e04} + + + {cc102c4b-66ff-cf4c-2288-d76327e1a183} + + + {02bd7340-02ee-4337-ffa5-0b6ecc7cf60c} + + + {308af086-46c7-fa66-9021-19b1c3d4a6bd} + + + {dd617c24-6f07-fdff-80d5-c8610d6f815e} + + + {64285d1a-ebd0-7637-ae20-15df5ca6cc83} + + + {2e3aca1d-223d-10a1-b282-7f9fc68ee6f5} + + + {6d8d5774-7291-554d-fafa-583463cd3fd9} + + + {1ba3a245-47e7-89b5-b0c9-aca758bd0277} + + + {a9df8b24-ecea-ff6d-8999-d8fa54cd70bf} + + + {443ffc61-1bea-2477-6e54-1ddf8c139264} + + + {7f91d9bf-c9de-835a-d74d-b16f843b89a9} + + + {e084164c-a069-00e3-db35-4e0b1cd6f0b7} + + + {6cd0127e-c24b-d43c-38f5-198db8d4322a} + + + {6687ff98-e36e-c0b1-2756-1bc79edec406} + + + {5fcd6206-f774-9ae6-4b85-305d6a723843} + + + + From 7307b1a706e40be9e497915d72e6009e8b16d358 Mon Sep 17 00:00:00 2001 From: Masood Malekghassemi Date: Thu, 20 Aug 2015 18:49:53 -0700 Subject: [PATCH 107/169] Coalesce GRPC_TRACE=surface with API tracing --- src/core/surface/call.h | 7 ++++--- src/core/surface/init.c | 1 - src/core/surface/surface_trace.c | 36 -------------------------------- src/core/surface/surface_trace.h | 5 ++--- 4 files changed, 6 insertions(+), 43 deletions(-) delete mode 100644 src/core/surface/surface_trace.c diff --git a/src/core/surface/call.h b/src/core/surface/call.h index b1a1045792b..acfedf40cd4 100644 --- a/src/core/surface/call.h +++ b/src/core/surface/call.h @@ -36,6 +36,7 @@ #include "src/core/channel/channel_stack.h" #include "src/core/channel/context.h" +#include "src/core/surface/api_trace.h" #include "src/core/surface/surface_trace.h" #include @@ -154,17 +155,17 @@ void grpc_call_context_set(grpc_call *call, grpc_context_index elem, void *grpc_call_context_get(grpc_call *call, grpc_context_index elem); #define GRPC_CALL_LOG_BATCH(sev, call, ops, nops, tag) \ - if (grpc_surface_trace) grpc_call_log_batch(sev, call, ops, nops, tag) + if (grpc_api_trace) grpc_call_log_batch(sev, call, ops, nops, tag) #define GRPC_SERVER_LOG_REQUEST_CALL(sev, server, call, details, \ initial_metadata, cq_bound_to_call, \ cq_for_notifications, tag) \ - if (grpc_surface_trace) \ + if (grpc_api_trace) \ grpc_server_log_request_call(sev, server, call, details, initial_metadata, \ cq_bound_to_call, cq_for_notifications, tag) #define GRPC_SERVER_LOG_SHUTDOWN(sev, server, cq, tag) \ - if (grpc_surface_trace) grpc_server_log_shutdown(sev, server, cq, tag) + if (grpc_api_trace) grpc_server_log_shutdown(sev, server, cq, tag) gpr_uint8 grpc_call_is_client(grpc_call *call); diff --git a/src/core/surface/init.c b/src/core/surface/init.c index 96ab5ecb60b..95011cab178 100644 --- a/src/core/surface/init.c +++ b/src/core/surface/init.c @@ -103,7 +103,6 @@ void grpc_init(void) { #endif grpc_register_tracer("api", &grpc_api_trace); grpc_register_tracer("channel", &grpc_trace_channel); - grpc_register_tracer("surface", &grpc_surface_trace); grpc_register_tracer("http", &grpc_http_trace); grpc_register_tracer("flowctl", &grpc_flowctl_trace); grpc_register_tracer("connectivity_state", &grpc_connectivity_state_trace); diff --git a/src/core/surface/surface_trace.c b/src/core/surface/surface_trace.c deleted file mode 100644 index 57a0053162a..00000000000 --- a/src/core/surface/surface_trace.c +++ /dev/null @@ -1,36 +0,0 @@ -/* - * - * Copyright 2015, Google Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -#include "src/core/surface/surface_trace.h" - -int grpc_surface_trace = 0; diff --git a/src/core/surface/surface_trace.h b/src/core/surface/surface_trace.h index 2b4728e2b4b..51329a49842 100644 --- a/src/core/surface/surface_trace.h +++ b/src/core/surface/surface_trace.h @@ -35,12 +35,11 @@ #define GRPC_INTERNAL_CORE_SURFACE_SURFACE_TRACE_H #include "src/core/debug/trace.h" +#include "src/core/surface/api_trace.h" #include -extern int grpc_surface_trace; - #define GRPC_SURFACE_TRACE_RETURNED_EVENT(cq, event) \ - if (grpc_surface_trace) { \ + if (grpc_api_trace) { \ char *_ev = grpc_event_string(event); \ gpr_log(GPR_INFO, "RETURN_EVENT[%p]: %s", cq, _ev); \ gpr_free(_ev); \ From 92298107521cda48f2a29050e9ac0965da470200 Mon Sep 17 00:00:00 2001 From: Masood Malekghassemi Date: Thu, 20 Aug 2015 18:50:17 -0700 Subject: [PATCH 108/169] Update build files --- BUILD | 6 +++--- Makefile | 2 -- build.json | 2 +- gRPC.podspec | 3 ++- tools/doxygen/Doxyfile.core.internal | 2 +- tools/run_tests/sources_and_headers.json | 6 ++++-- vsprojects/grpc/grpc.vcxproj | 3 +-- vsprojects/grpc/grpc.vcxproj.filters | 6 +++--- vsprojects/grpc_unsecure/grpc_unsecure.vcxproj | 3 +-- vsprojects/grpc_unsecure/grpc_unsecure.vcxproj.filters | 6 +++--- 10 files changed, 19 insertions(+), 20 deletions(-) diff --git a/BUILD b/BUILD index c4ff5ee7972..3e2a45b8a0a 100644 --- a/BUILD +++ b/BUILD @@ -220,6 +220,7 @@ cc_library( "src/core/profiling/timers.h", "src/core/statistics/census_interface.h", "src/core/statistics/census_rpc_stats.h", + "src/core/surface/api_trace.h", "src/core/surface/byte_buffer_queue.h", "src/core/surface/call.h", "src/core/surface/channel.h", @@ -374,7 +375,6 @@ cc_library( "src/core/surface/server.c", "src/core/surface/server_chttp2.c", "src/core/surface/server_create.c", - "src/core/surface/surface_trace.c", "src/core/surface/version.c", "src/core/transport/chttp2/alpn.c", "src/core/transport/chttp2/bin_encoder.c", @@ -506,6 +506,7 @@ cc_library( "src/core/profiling/timers.h", "src/core/statistics/census_interface.h", "src/core/statistics/census_rpc_stats.h", + "src/core/surface/api_trace.h", "src/core/surface/byte_buffer_queue.h", "src/core/surface/call.h", "src/core/surface/channel.h", @@ -640,7 +641,6 @@ cc_library( "src/core/surface/server.c", "src/core/surface/server_chttp2.c", "src/core/surface/server_create.c", - "src/core/surface/surface_trace.c", "src/core/surface/version.c", "src/core/transport/chttp2/alpn.c", "src/core/transport/chttp2/bin_encoder.c", @@ -1165,7 +1165,6 @@ objc_library( "src/core/surface/server.c", "src/core/surface/server_chttp2.c", "src/core/surface/server_create.c", - "src/core/surface/surface_trace.c", "src/core/surface/version.c", "src/core/transport/chttp2/alpn.c", "src/core/transport/chttp2/bin_encoder.c", @@ -1294,6 +1293,7 @@ objc_library( "src/core/profiling/timers.h", "src/core/statistics/census_interface.h", "src/core/statistics/census_rpc_stats.h", + "src/core/surface/api_trace.h", "src/core/surface/byte_buffer_queue.h", "src/core/surface/call.h", "src/core/surface/channel.h", diff --git a/Makefile b/Makefile index ca365a8dbe3..8eb94f768a2 100644 --- a/Makefile +++ b/Makefile @@ -4137,7 +4137,6 @@ LIBGRPC_SRC = \ src/core/surface/server.c \ src/core/surface/server_chttp2.c \ src/core/surface/server_create.c \ - src/core/surface/surface_trace.c \ src/core/surface/version.c \ src/core/transport/chttp2/alpn.c \ src/core/transport/chttp2/bin_encoder.c \ @@ -4420,7 +4419,6 @@ LIBGRPC_UNSECURE_SRC = \ src/core/surface/server.c \ src/core/surface/server_chttp2.c \ src/core/surface/server_create.c \ - src/core/surface/surface_trace.c \ src/core/surface/version.c \ src/core/transport/chttp2/alpn.c \ src/core/transport/chttp2/bin_encoder.c \ diff --git a/build.json b/build.json index c68569e9f1a..0a4248c7a8d 100644 --- a/build.json +++ b/build.json @@ -184,6 +184,7 @@ "src/core/profiling/timers_preciseclock.h", "src/core/statistics/census_interface.h", "src/core/statistics/census_rpc_stats.h", + "src/core/surface/api_trace.h", "src/core/surface/byte_buffer_queue.h", "src/core/surface/call.h", "src/core/surface/channel.h", @@ -309,7 +310,6 @@ "src/core/surface/server.c", "src/core/surface/server_chttp2.c", "src/core/surface/server_create.c", - "src/core/surface/surface_trace.c", "src/core/surface/version.c", "src/core/transport/chttp2/alpn.c", "src/core/transport/chttp2/bin_encoder.c", diff --git a/gRPC.podspec b/gRPC.podspec index dfb52a88bf7..2636a38882c 100644 --- a/gRPC.podspec +++ b/gRPC.podspec @@ -223,6 +223,7 @@ Pod::Spec.new do |s| 'src/core/profiling/timers.h', 'src/core/statistics/census_interface.h', 'src/core/statistics/census_rpc_stats.h', + 'src/core/surface/api_trace.h', 'src/core/surface/byte_buffer_queue.h', 'src/core/surface/call.h', 'src/core/surface/channel.h', @@ -384,7 +385,6 @@ Pod::Spec.new do |s| 'src/core/surface/server.c', 'src/core/surface/server_chttp2.c', 'src/core/surface/server_create.c', - 'src/core/surface/surface_trace.c', 'src/core/surface/version.c', 'src/core/transport/chttp2/alpn.c', 'src/core/transport/chttp2/bin_encoder.c', @@ -514,6 +514,7 @@ Pod::Spec.new do |s| 'src/core/profiling/timers.h', 'src/core/statistics/census_interface.h', 'src/core/statistics/census_rpc_stats.h', + 'src/core/surface/api_trace.h', 'src/core/surface/byte_buffer_queue.h', 'src/core/surface/call.h', 'src/core/surface/channel.h', diff --git a/tools/doxygen/Doxyfile.core.internal b/tools/doxygen/Doxyfile.core.internal index 123280ca1b2..5658a102d75 100644 --- a/tools/doxygen/Doxyfile.core.internal +++ b/tools/doxygen/Doxyfile.core.internal @@ -855,6 +855,7 @@ src/core/json/json_writer.h \ src/core/profiling/timers.h \ src/core/statistics/census_interface.h \ src/core/statistics/census_rpc_stats.h \ +src/core/surface/api_trace.h \ src/core/surface/byte_buffer_queue.h \ src/core/surface/call.h \ src/core/surface/channel.h \ @@ -1009,7 +1010,6 @@ src/core/surface/metadata_array.c \ src/core/surface/server.c \ src/core/surface/server_chttp2.c \ src/core/surface/server_create.c \ -src/core/surface/surface_trace.c \ src/core/surface/version.c \ src/core/transport/chttp2/alpn.c \ src/core/transport/chttp2/bin_encoder.c \ diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json index 8d5c82b8128..1ceff15a3be 100644 --- a/tools/run_tests/sources_and_headers.json +++ b/tools/run_tests/sources_and_headers.json @@ -12362,6 +12362,7 @@ "src/core/security/security_context.h", "src/core/statistics/census_interface.h", "src/core/statistics/census_rpc_stats.h", + "src/core/surface/api_trace.h", "src/core/surface/byte_buffer_queue.h", "src/core/surface/call.h", "src/core/surface/channel.h", @@ -12597,6 +12598,7 @@ "src/core/statistics/census_interface.h", "src/core/statistics/census_rpc_stats.h", "src/core/surface/api_trace.c", + "src/core/surface/api_trace.h", "src/core/surface/byte_buffer.c", "src/core/surface/byte_buffer_queue.c", "src/core/surface/byte_buffer_queue.h", @@ -12623,7 +12625,6 @@ "src/core/surface/server.h", "src/core/surface/server_chttp2.c", "src/core/surface/server_create.c", - "src/core/surface/surface_trace.c", "src/core/surface/surface_trace.h", "src/core/surface/version.c", "src/core/transport/chttp2/alpn.c", @@ -12857,6 +12858,7 @@ "src/core/profiling/timers.h", "src/core/statistics/census_interface.h", "src/core/statistics/census_rpc_stats.h", + "src/core/surface/api_trace.h", "src/core/surface/byte_buffer_queue.h", "src/core/surface/call.h", "src/core/surface/channel.h", @@ -13062,6 +13064,7 @@ "src/core/statistics/census_interface.h", "src/core/statistics/census_rpc_stats.h", "src/core/surface/api_trace.c", + "src/core/surface/api_trace.h", "src/core/surface/byte_buffer.c", "src/core/surface/byte_buffer_queue.c", "src/core/surface/byte_buffer_queue.h", @@ -13087,7 +13090,6 @@ "src/core/surface/server.h", "src/core/surface/server_chttp2.c", "src/core/surface/server_create.c", - "src/core/surface/surface_trace.c", "src/core/surface/surface_trace.h", "src/core/surface/version.c", "src/core/transport/chttp2/alpn.c", diff --git a/vsprojects/grpc/grpc.vcxproj b/vsprojects/grpc/grpc.vcxproj index dc1a58b8dd4..c6750948677 100644 --- a/vsprojects/grpc/grpc.vcxproj +++ b/vsprojects/grpc/grpc.vcxproj @@ -310,6 +310,7 @@ + @@ -568,8 +569,6 @@ - - diff --git a/vsprojects/grpc/grpc.vcxproj.filters b/vsprojects/grpc/grpc.vcxproj.filters index 624bac04f5b..5bde4656165 100644 --- a/vsprojects/grpc/grpc.vcxproj.filters +++ b/vsprojects/grpc/grpc.vcxproj.filters @@ -331,9 +331,6 @@ src\core\surface - - src\core\surface - src\core\surface @@ -692,6 +689,9 @@ src\core\statistics + + src\core\surface + src\core\surface diff --git a/vsprojects/grpc_unsecure/grpc_unsecure.vcxproj b/vsprojects/grpc_unsecure/grpc_unsecure.vcxproj index 2329d3532cc..60143f1ab12 100644 --- a/vsprojects/grpc_unsecure/grpc_unsecure.vcxproj +++ b/vsprojects/grpc_unsecure/grpc_unsecure.vcxproj @@ -293,6 +293,7 @@ + @@ -511,8 +512,6 @@ - - diff --git a/vsprojects/grpc_unsecure/grpc_unsecure.vcxproj.filters b/vsprojects/grpc_unsecure/grpc_unsecure.vcxproj.filters index 493bae2fb8b..edfa397e37e 100644 --- a/vsprojects/grpc_unsecure/grpc_unsecure.vcxproj.filters +++ b/vsprojects/grpc_unsecure/grpc_unsecure.vcxproj.filters @@ -271,9 +271,6 @@ src\core\surface - - src\core\surface - src\core\surface @@ -590,6 +587,9 @@ src\core\statistics + + src\core\surface + src\core\surface From cff6469dfc1beb118773961106ae884234a908f5 Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Sat, 3 Oct 2015 02:01:51 +0200 Subject: [PATCH 109/169] Making template agree with clang-format. --- gRPC.podspec | 1 + src/core/surface/version.c | 4 +--- templates/src/core/surface/version.c.template | 5 ++--- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/gRPC.podspec b/gRPC.podspec index 46823453bab..122c16eff85 100644 --- a/gRPC.podspec +++ b/gRPC.podspec @@ -46,6 +46,7 @@ Pod::Spec.new do |s| s.source = { :git => 'https://github.com/grpc/grpc.git', :tag => "release-#{version.gsub(/\./, '_')}-objectivec-#{version}" } + s.ios.deployment_target = '7.1' s.osx.deployment_target = '10.9' s.requires_arc = true diff --git a/src/core/surface/version.c b/src/core/surface/version.c index 4b90e06a043..e559d51448a 100644 --- a/src/core/surface/version.c +++ b/src/core/surface/version.c @@ -36,6 +36,4 @@ #include -const char *grpc_version_string(void) { - return "0.11.0.0"; -} +const char *grpc_version_string(void) { return "0.11.0.0"; } diff --git a/templates/src/core/surface/version.c.template b/templates/src/core/surface/version.c.template index 3e6840460fa..31a5af99cae 100644 --- a/templates/src/core/surface/version.c.template +++ b/templates/src/core/surface/version.c.template @@ -38,6 +38,5 @@ #include - const char *grpc_version_string(void) { - return "${settings.version.major}.${settings.version.minor}.${settings.version.micro}.${settings.version.build}"; - } + const char *grpc_version_string(void) { \ + return "${settings.version.major}.${settings.version.minor}.${settings.version.micro}.${settings.version.build}"; } From 9baaeade7cfca46f79af20f9e9235b80a3aa9735 Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Sat, 3 Oct 2015 02:25:02 +0200 Subject: [PATCH 110/169] Get sanity to output more interesting information if it fails. --- tools/buildgen/generate_projects.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/buildgen/generate_projects.py b/tools/buildgen/generate_projects.py index c3e2b120516..e0bd6759bd0 100755 --- a/tools/buildgen/generate_projects.py +++ b/tools/buildgen/generate_projects.py @@ -78,8 +78,8 @@ jobset.run(jobs) if test is not None: for s, g in test.iteritems(): if os.path.isfile(g): - assert(0 == os.system('diff %s %s' % (s, g))) + assert 0 == os.system('diff %s %s' % (s, g)), s os.unlink(g) else: - assert(0 == os.system('diff -r %s %s' % (s, g))) + assert 0 == os.system('diff -r %s %s' % (s, g)), s shutil.rmtree(g, ignore_errors=True) From 9260a95062ceb278f2e644a537705cbb4aeca56c Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Sat, 3 Oct 2015 15:53:27 -0700 Subject: [PATCH 111/169] Explicit Python version for port_server --- tools/run_tests/run_tests.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/run_tests/run_tests.py b/tools/run_tests/run_tests.py index 38c06764b9b..51008538f27 100755 --- a/tools/run_tests/run_tests.py +++ b/tools/run_tests/run_tests.py @@ -728,7 +728,7 @@ def _start_port_server(port_server_port): if not running: port_log = open('portlog.txt', 'w') port_server = subprocess.Popen( - ['python', 'tools/run_tests/port_server.py', '-p', '%d' % port_server_port], + ['python2.7', 'tools/run_tests/port_server.py', '-p', '%d' % port_server_port], stderr=subprocess.STDOUT, stdout=port_log) # ensure port server is up From d76cdac17a394d5a4be882ef0474db605db0c950 Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Sat, 3 Oct 2015 15:57:09 -0700 Subject: [PATCH 112/169] Type conversion fixes to make GCC 5.2.0 happy --- src/core/surface/call.c | 8 +++++--- src/core/transport/chttp2/bin_encoder.c | 8 ++++---- src/core/tsi/fake_transport_security.c | 8 ++++---- tools/codegen/core/gen_hpack_tables.c | 5 +++-- tools/codegen/core/gen_legal_metadata_characters.c | 3 ++- 5 files changed, 18 insertions(+), 14 deletions(-) diff --git a/src/core/surface/call.c b/src/core/surface/call.c index 0b917f15611..3f06507f9fa 100644 --- a/src/core/surface/call.c +++ b/src/core/surface/call.c @@ -424,7 +424,8 @@ static grpc_cq_completion *allocate_completion(grpc_call *call) { if (call->allocated_completions & (1u << i)) { continue; } - call->allocated_completions |= (gpr_uint8)(1u << i); + call->allocated_completions = + (gpr_uint8)(call->allocated_completions | (1u << i)); gpr_mu_unlock(&call->completion_mu); return &call->completions[i]; } @@ -735,7 +736,7 @@ static void finish_live_ioreq_op(grpc_call *call, grpc_ioreq_op op, size_t i; /* ioreq is live: we need to do something */ master = &call->masters[master_set]; - master->complete_mask |= (gpr_uint16)(1u << op); + master->complete_mask = (gpr_uint16)(master->complete_mask | (1u << op)); if (!success) { master->success = 0; } @@ -1245,7 +1246,7 @@ static grpc_call_error start_ioreq(grpc_call *call, const grpc_ioreq *reqs, GRPC_MDSTR_REF(reqs[i].data.send_status.details)); } } - have_ops |= (gpr_uint16)(1u << op); + have_ops = (gpr_uint16)(have_ops | (1u << op)); call->request_data[op] = data; call->request_flags[op] = reqs[i].flags; @@ -1830,3 +1831,4 @@ void *grpc_call_context_get(grpc_call *call, grpc_context_index elem) { } gpr_uint8 grpc_call_is_client(grpc_call *call) { return call->is_client; } + diff --git a/src/core/transport/chttp2/bin_encoder.c b/src/core/transport/chttp2/bin_encoder.c index f1bbf9aa918..b0b04f697a2 100644 --- a/src/core/transport/chttp2/bin_encoder.c +++ b/src/core/transport/chttp2/bin_encoder.c @@ -185,8 +185,8 @@ gpr_slice grpc_chttp2_huffman_compress(gpr_slice input) { } if (temp_length) { - *out++ = (gpr_uint8)(temp << (8u - temp_length)) | - (gpr_uint8)(0xffu >> temp_length); + *out++ = (gpr_uint8)((gpr_uint8)(temp << (8u - temp_length)) | + (gpr_uint8)(0xffu >> temp_length)); } GPR_ASSERT(out == GPR_SLICE_END_PTR(output)); @@ -265,8 +265,8 @@ gpr_slice grpc_chttp2_base64_encode_and_huffman_compress(gpr_slice input) { } if (out.temp_length) { - *out.out++ = (gpr_uint8)(out.temp << (8u - out.temp_length)) | - (gpr_uint8)(0xffu >> out.temp_length); + *out.out++ = (gpr_uint8)((gpr_uint8)(out.temp << (8u - out.temp_length)) | + (gpr_uint8)(0xffu >> out.temp_length)); } GPR_ASSERT(out.out <= GPR_SLICE_END_PTR(output)); diff --git a/src/core/tsi/fake_transport_security.c b/src/core/tsi/fake_transport_security.c index cbb6f17ae18..a40268a7f0b 100644 --- a/src/core/tsi/fake_transport_security.c +++ b/src/core/tsi/fake_transport_security.c @@ -118,10 +118,10 @@ static gpr_uint32 load32_little_endian(const unsigned char *buf) { } static void store32_little_endian(gpr_uint32 value, unsigned char *buf) { - buf[3] = (unsigned char)(value >> 24) & 0xFF; - buf[2] = (unsigned char)(value >> 16) & 0xFF; - buf[1] = (unsigned char)(value >> 8) & 0xFF; - buf[0] = (unsigned char)(value)&0xFF; + buf[3] = (unsigned char)((value >> 24) & 0xFF); + buf[2] = (unsigned char)((value >> 16) & 0xFF); + buf[1] = (unsigned char)((value >> 8) & 0xFF); + buf[0] = (unsigned char)((value) & 0xFF); } static void tsi_fake_frame_reset(tsi_fake_frame *frame, int needs_draining) { diff --git a/tools/codegen/core/gen_hpack_tables.c b/tools/codegen/core/gen_hpack_tables.c index d924aba6022..21667f0651d 100644 --- a/tools/codegen/core/gen_hpack_tables.c +++ b/tools/codegen/core/gen_hpack_tables.c @@ -71,7 +71,7 @@ static unsigned char prefix_mask(unsigned char prefix_len) { unsigned char i; unsigned char out = 0; for (i = 0; i < prefix_len; i++) { - out |= (unsigned char)(1 << (7 - i)); + out = (unsigned char)(out | (unsigned char)(1 << (7 - i))); } return out; } @@ -92,7 +92,8 @@ static void generate_first_byte_lut(void) { chrspec = NULL; for (j = 0; j < num_fields; j++) { if ((prefix_mask(fields[j].prefix_length) & i) == fields[j].prefix) { - suffix = suffix_mask(fields[j].prefix_length) & (unsigned char)i; + suffix = (unsigned char)(suffix_mask(fields[j].prefix_length) & + (unsigned char)i); if (suffix == suffix_mask(fields[j].prefix_length)) { if (fields[j].index != 2) continue; } else if (suffix == 0) { diff --git a/tools/codegen/core/gen_legal_metadata_characters.c b/tools/codegen/core/gen_legal_metadata_characters.c index 2ffda54a21f..5783c3ff696 100644 --- a/tools/codegen/core/gen_legal_metadata_characters.c +++ b/tools/codegen/core/gen_legal_metadata_characters.c @@ -41,7 +41,8 @@ static unsigned char legal_bits[256 / 8]; static void legal(int x) { int byte = x / 8; int bit = x % 8; - legal_bits[byte] |= (unsigned char)(1 << bit); + legal_bits[byte] = + (unsigned char)((legal_bits[byte] | (unsigned char)(1 << bit))); } static void dump(void) { From 9a170333d5b6aaa5eba7663cc583ca34a97ba89b Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Sun, 4 Oct 2015 15:40:54 -0700 Subject: [PATCH 113/169] Idem for generate_projects.py --- gRPC.podspec | 1 + tools/buildgen/generate_projects.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/gRPC.podspec b/gRPC.podspec index 46823453bab..122c16eff85 100644 --- a/gRPC.podspec +++ b/gRPC.podspec @@ -46,6 +46,7 @@ Pod::Spec.new do |s| s.source = { :git => 'https://github.com/grpc/grpc.git', :tag => "release-#{version.gsub(/\./, '_')}-objectivec-#{version}" } + s.ios.deployment_target = '7.1' s.osx.deployment_target = '10.9' s.requires_arc = true diff --git a/tools/buildgen/generate_projects.py b/tools/buildgen/generate_projects.py index c3e2b120516..b2c3c26aa62 100755 --- a/tools/buildgen/generate_projects.py +++ b/tools/buildgen/generate_projects.py @@ -55,7 +55,7 @@ for root, dirs, files in os.walk('templates'): out = out_dir + '/' + os.path.splitext(f)[0] if not os.path.exists(out_dir): os.makedirs(out_dir) - cmd = ['python', 'tools/buildgen/mako_renderer.py'] + cmd = ['python2.7', 'tools/buildgen/mako_renderer.py'] for plugin in plugins: cmd.append('-p') cmd.append(plugin) From 985f22e42b2404420264be0b2e21f81d1efd6b52 Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Sun, 4 Oct 2015 23:14:37 -0700 Subject: [PATCH 114/169] Limited number of parallel jobs for generate_projects --- tools/buildgen/generate_projects.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/buildgen/generate_projects.py b/tools/buildgen/generate_projects.py index b2c3c26aa62..5feebf0cac5 100755 --- a/tools/buildgen/generate_projects.py +++ b/tools/buildgen/generate_projects.py @@ -34,6 +34,7 @@ import os import shutil import sys import tempfile +import multiprocessing sys.path.append(os.path.join(os.path.dirname(sys.argv[0]), '..', 'run_tests')) assert sys.argv[1:], 'run generate_projects.sh instead of this directly' @@ -73,7 +74,7 @@ for root, dirs, files in os.walk('templates'): cmd.append(root + '/' + f) jobs.append(jobset.JobSpec(cmd, shortname=out)) -jobset.run(jobs) +jobset.run(jobs, maxjobs=multiprocessing.cpu_count()) if test is not None: for s, g in test.iteritems(): From 4de3e4f41ee7ca14741dc0c857e27b993868324e Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Mon, 5 Oct 2015 08:55:50 -0700 Subject: [PATCH 115/169] Restore sanity --- BUILD | 9 ++-- Makefile | 4 +- gRPC.podspec | 4 +- src/core/client_config/subchannel.h | 8 ++-- src/core/compression/algorithm.c | 6 +-- src/core/security/credentials.c | 61 +++++++++++++----------- src/core/security/security_context.c | 2 +- src/core/security/server_secure_chttp2.c | 7 +-- src/core/surface/api_trace.h | 12 ++--- src/core/surface/call.c | 2 +- src/core/surface/call.h | 2 +- src/core/surface/channel.c | 22 ++++----- src/core/surface/channel_connectivity.c | 10 ++-- src/core/surface/completion_queue.c | 16 +++---- src/core/surface/lame_client.c | 2 +- src/core/surface/secure_channel_create.c | 7 +-- src/core/surface/server.c | 10 ++-- src/core/surface/surface_trace.h | 2 +- src/core/surface/version.c | 8 +--- tools/doxygen/Doxyfile.core.internal | 3 +- tools/run_tests/sources_and_headers.json | 8 +--- 21 files changed, 98 insertions(+), 107 deletions(-) diff --git a/BUILD b/BUILD index 3e2a45b8a0a..c8118089bef 100644 --- a/BUILD +++ b/BUILD @@ -220,7 +220,6 @@ cc_library( "src/core/profiling/timers.h", "src/core/statistics/census_interface.h", "src/core/statistics/census_rpc_stats.h", - "src/core/surface/api_trace.h", "src/core/surface/byte_buffer_queue.h", "src/core/surface/call.h", "src/core/surface/channel.h", @@ -357,7 +356,6 @@ cc_library( "src/core/json/json_writer.c", "src/core/profiling/basic_timers.c", "src/core/profiling/stap_timers.c", - "src/core/surface/api_trace.c", "src/core/surface/byte_buffer.c", "src/core/surface/byte_buffer_queue.c", "src/core/surface/byte_buffer_reader.c", @@ -375,6 +373,7 @@ cc_library( "src/core/surface/server.c", "src/core/surface/server_chttp2.c", "src/core/surface/server_create.c", + "src/core/surface/surface_trace.c", "src/core/surface/version.c", "src/core/transport/chttp2/alpn.c", "src/core/transport/chttp2/bin_encoder.c", @@ -506,7 +505,6 @@ cc_library( "src/core/profiling/timers.h", "src/core/statistics/census_interface.h", "src/core/statistics/census_rpc_stats.h", - "src/core/surface/api_trace.h", "src/core/surface/byte_buffer_queue.h", "src/core/surface/call.h", "src/core/surface/channel.h", @@ -623,7 +621,6 @@ cc_library( "src/core/json/json_writer.c", "src/core/profiling/basic_timers.c", "src/core/profiling/stap_timers.c", - "src/core/surface/api_trace.c", "src/core/surface/byte_buffer.c", "src/core/surface/byte_buffer_queue.c", "src/core/surface/byte_buffer_reader.c", @@ -641,6 +638,7 @@ cc_library( "src/core/surface/server.c", "src/core/surface/server_chttp2.c", "src/core/surface/server_create.c", + "src/core/surface/surface_trace.c", "src/core/surface/version.c", "src/core/transport/chttp2/alpn.c", "src/core/transport/chttp2/bin_encoder.c", @@ -1147,7 +1145,6 @@ objc_library( "src/core/json/json_writer.c", "src/core/profiling/basic_timers.c", "src/core/profiling/stap_timers.c", - "src/core/surface/api_trace.c", "src/core/surface/byte_buffer.c", "src/core/surface/byte_buffer_queue.c", "src/core/surface/byte_buffer_reader.c", @@ -1165,6 +1162,7 @@ objc_library( "src/core/surface/server.c", "src/core/surface/server_chttp2.c", "src/core/surface/server_create.c", + "src/core/surface/surface_trace.c", "src/core/surface/version.c", "src/core/transport/chttp2/alpn.c", "src/core/transport/chttp2/bin_encoder.c", @@ -1293,7 +1291,6 @@ objc_library( "src/core/profiling/timers.h", "src/core/statistics/census_interface.h", "src/core/statistics/census_rpc_stats.h", - "src/core/surface/api_trace.h", "src/core/surface/byte_buffer_queue.h", "src/core/surface/call.h", "src/core/surface/channel.h", diff --git a/Makefile b/Makefile index 8eb94f768a2..e0a7b804721 100644 --- a/Makefile +++ b/Makefile @@ -4119,7 +4119,6 @@ LIBGRPC_SRC = \ src/core/json/json_writer.c \ src/core/profiling/basic_timers.c \ src/core/profiling/stap_timers.c \ - src/core/surface/api_trace.c \ src/core/surface/byte_buffer.c \ src/core/surface/byte_buffer_queue.c \ src/core/surface/byte_buffer_reader.c \ @@ -4137,6 +4136,7 @@ LIBGRPC_SRC = \ src/core/surface/server.c \ src/core/surface/server_chttp2.c \ src/core/surface/server_create.c \ + src/core/surface/surface_trace.c \ src/core/surface/version.c \ src/core/transport/chttp2/alpn.c \ src/core/transport/chttp2/bin_encoder.c \ @@ -4401,7 +4401,6 @@ LIBGRPC_UNSECURE_SRC = \ src/core/json/json_writer.c \ src/core/profiling/basic_timers.c \ src/core/profiling/stap_timers.c \ - src/core/surface/api_trace.c \ src/core/surface/byte_buffer.c \ src/core/surface/byte_buffer_queue.c \ src/core/surface/byte_buffer_reader.c \ @@ -4419,6 +4418,7 @@ LIBGRPC_UNSECURE_SRC = \ src/core/surface/server.c \ src/core/surface/server_chttp2.c \ src/core/surface/server_create.c \ + src/core/surface/surface_trace.c \ src/core/surface/version.c \ src/core/transport/chttp2/alpn.c \ src/core/transport/chttp2/bin_encoder.c \ diff --git a/gRPC.podspec b/gRPC.podspec index 717e7005ee5..122c16eff85 100644 --- a/gRPC.podspec +++ b/gRPC.podspec @@ -224,7 +224,6 @@ Pod::Spec.new do |s| 'src/core/profiling/timers.h', 'src/core/statistics/census_interface.h', 'src/core/statistics/census_rpc_stats.h', - 'src/core/surface/api_trace.h', 'src/core/surface/byte_buffer_queue.h', 'src/core/surface/call.h', 'src/core/surface/channel.h', @@ -368,7 +367,6 @@ Pod::Spec.new do |s| 'src/core/json/json_writer.c', 'src/core/profiling/basic_timers.c', 'src/core/profiling/stap_timers.c', - 'src/core/surface/api_trace.c', 'src/core/surface/byte_buffer.c', 'src/core/surface/byte_buffer_queue.c', 'src/core/surface/byte_buffer_reader.c', @@ -386,6 +384,7 @@ Pod::Spec.new do |s| 'src/core/surface/server.c', 'src/core/surface/server_chttp2.c', 'src/core/surface/server_create.c', + 'src/core/surface/surface_trace.c', 'src/core/surface/version.c', 'src/core/transport/chttp2/alpn.c', 'src/core/transport/chttp2/bin_encoder.c', @@ -515,7 +514,6 @@ Pod::Spec.new do |s| 'src/core/profiling/timers.h', 'src/core/statistics/census_interface.h', 'src/core/statistics/census_rpc_stats.h', - 'src/core/surface/api_trace.h', 'src/core/surface/byte_buffer_queue.h', 'src/core/surface/call.h', 'src/core/surface/channel.h', diff --git a/src/core/client_config/subchannel.h b/src/core/client_config/subchannel.h index 03e7cd0590d..86b7fa58513 100644 --- a/src/core/client_config/subchannel.h +++ b/src/core/client_config/subchannel.h @@ -64,13 +64,13 @@ typedef struct grpc_subchannel_args grpc_subchannel_args; #define GRPC_SUBCHANNEL_REF_EXTRA_ARGS #endif -void grpc_subchannel_ref( - grpc_subchannel *channel GRPC_SUBCHANNEL_REF_EXTRA_ARGS); +void grpc_subchannel_ref(grpc_subchannel *channel + GRPC_SUBCHANNEL_REF_EXTRA_ARGS); void grpc_subchannel_unref(grpc_exec_ctx *exec_ctx, grpc_subchannel *channel GRPC_SUBCHANNEL_REF_EXTRA_ARGS); -void grpc_subchannel_call_ref( - grpc_subchannel_call *call GRPC_SUBCHANNEL_REF_EXTRA_ARGS); +void grpc_subchannel_call_ref(grpc_subchannel_call *call + GRPC_SUBCHANNEL_REF_EXTRA_ARGS); void grpc_subchannel_call_unref(grpc_exec_ctx *exec_ctx, grpc_subchannel_call *call GRPC_SUBCHANNEL_REF_EXTRA_ARGS); diff --git a/src/core/compression/algorithm.c b/src/core/compression/algorithm.c index ad7bb8c8133..d55e499f5ea 100644 --- a/src/core/compression/algorithm.c +++ b/src/core/compression/algorithm.c @@ -47,9 +47,9 @@ int grpc_compression_algorithm_parse(const char *name, size_t name_length, * data, for example) */ GRPC_API_TRACE( "grpc_compression_algorithm_parse(" - "name=%*.*s, name_length=%lu, algorithm=%p)", 5, - ((int)name_length, (int)name_length, name, - (unsigned long)name_length, algorithm)); + "name=%*.*s, name_length=%lu, algorithm=%p)", + 5, ((int)name_length, (int)name_length, name, (unsigned long)name_length, + algorithm)); if (name_length == 0) { return 0; } diff --git a/src/core/security/credentials.c b/src/core/security/credentials.c index ff67b5d30a8..398db20e8cf 100644 --- a/src/core/security/credentials.c +++ b/src/core/security/credentials.c @@ -171,8 +171,8 @@ void grpc_server_credentials_set_auth_metadata_processor( grpc_server_credentials *creds, grpc_auth_metadata_processor processor) { GRPC_API_TRACE( "grpc_server_credentials_set_auth_metadata_processor(" - "creds=%p, " - "processor=grpc_auth_metadata_processor { process: %lx, state: %p })", + "creds=%p, " + "processor=grpc_auth_metadata_processor { process: %lx, state: %p })", 3, (creds, (unsigned long)processor.process, processor.state)); if (creds == NULL) return; if (creds->processor.destroy != NULL && creds->processor.state != NULL) { @@ -325,10 +325,11 @@ grpc_credentials *grpc_ssl_credentials_create( const char *pem_root_certs, grpc_ssl_pem_key_cert_pair *pem_key_cert_pair, void *reserved) { grpc_ssl_credentials *c = gpr_malloc(sizeof(grpc_ssl_credentials)); - GRPC_API_TRACE("grpc_ssl_credentials_create(pem_root_certs=%s, " - "pem_key_cert_pair=%p, " - "reserved=%p)", - 3, (pem_root_certs, pem_key_cert_pair, reserved)); + GRPC_API_TRACE( + "grpc_ssl_credentials_create(pem_root_certs=%s, " + "pem_key_cert_pair=%p, " + "reserved=%p)", + 3, (pem_root_certs, pem_key_cert_pair, reserved)); GPR_ASSERT(reserved == NULL); memset(c, 0, sizeof(grpc_ssl_credentials)); c->base.type = GRPC_CREDENTIALS_TYPE_SSL; @@ -345,10 +346,10 @@ grpc_server_credentials *grpc_ssl_server_credentials_create( gpr_malloc(sizeof(grpc_ssl_server_credentials)); GRPC_API_TRACE( "grpc_ssl_server_credentials_create(" - "pem_root_certs=%s, pem_key_cert_pairs=%p, num_key_cert_pairs=%lu, " - "force_client_auth=%d, reserved=%p)", 5, - (pem_root_certs, pem_key_cert_pairs, (unsigned long)num_key_cert_pairs, - force_client_auth, reserved)); + "pem_root_certs=%s, pem_key_cert_pairs=%p, num_key_cert_pairs=%lu, " + "force_client_auth=%d, reserved=%p)", + 5, (pem_root_certs, pem_key_cert_pairs, (unsigned long)num_key_cert_pairs, + force_client_auth, reserved)); GPR_ASSERT(reserved == NULL); memset(c, 0, sizeof(grpc_ssl_server_credentials)); c->base.type = GRPC_CREDENTIALS_TYPE_SSL; @@ -469,12 +470,12 @@ grpc_credentials *grpc_service_account_jwt_access_credentials_create( const char *json_key, gpr_timespec token_lifetime, void *reserved) { GRPC_API_TRACE( "grpc_service_account_jwt_access_credentials_create(" - "json_key=%s, " - "token_lifetime=" - "gpr_timespec { tv_sec: %ld, tv_nsec: %d, clock_type: %d }, " - "reserved=%p)", - 5, (json_key, (long)token_lifetime.tv_sec, - token_lifetime.tv_nsec, (int)token_lifetime.clock_type, reserved)); + "json_key=%s, " + "token_lifetime=" + "gpr_timespec { tv_sec: %ld, tv_nsec: %d, clock_type: %d }, " + "reserved=%p)", + 5, (json_key, (long)token_lifetime.tv_sec, token_lifetime.tv_nsec, + (int)token_lifetime.clock_type, reserved)); GPR_ASSERT(reserved == NULL); return grpc_service_account_jwt_access_credentials_create_from_auth_json_key( grpc_auth_json_key_create_from_string(json_key), token_lifetime); @@ -748,9 +749,10 @@ grpc_credentials *grpc_refresh_token_credentials_create_from_auth_refresh_token( grpc_credentials *grpc_google_refresh_token_credentials_create( const char *json_refresh_token, void *reserved) { - GRPC_API_TRACE("grpc_refresh_token_credentials_create(json_refresh_token=%s, " - "reserved=%p)", - 2, (json_refresh_token, reserved)); + GRPC_API_TRACE( + "grpc_refresh_token_credentials_create(json_refresh_token=%s, " + "reserved=%p)", + 2, (json_refresh_token, reserved)); GPR_ASSERT(reserved == NULL); return grpc_refresh_token_credentials_create_from_auth_refresh_token( grpc_auth_refresh_token_create_from_string(json_refresh_token)); @@ -851,9 +853,10 @@ grpc_credentials *grpc_access_token_credentials_create(const char *access_token, grpc_access_token_credentials *c = gpr_malloc(sizeof(grpc_access_token_credentials)); char *token_md_value; - GRPC_API_TRACE("grpc_access_token_credentials_create(access_token=%s, " - "reserved=%p)", 2, - (access_token, reserved)); + GRPC_API_TRACE( + "grpc_access_token_credentials_create(access_token=%s, " + "reserved=%p)", + 2, (access_token, reserved)); GPR_ASSERT(reserved == NULL); memset(c, 0, sizeof(grpc_access_token_credentials)); c->base.type = GRPC_CREDENTIALS_TYPE_OAUTH2; @@ -1090,9 +1093,10 @@ grpc_credentials *grpc_composite_credentials_create(grpc_credentials *creds1, grpc_credentials_array creds1_array; grpc_credentials_array creds2_array; grpc_composite_credentials *c; - GRPC_API_TRACE("grpc_composite_credentials_create(creds1=%p, creds2=%p, " - "reserved=%p)", 3, - (creds1, creds2, reserved)); + GRPC_API_TRACE( + "grpc_composite_credentials_create(creds1=%p, creds2=%p, " + "reserved=%p)", + 3, (creds1, creds2, reserved)); GPR_ASSERT(reserved == NULL); GPR_ASSERT(creds1 != NULL); GPR_ASSERT(creds2 != NULL); @@ -1195,9 +1199,10 @@ static grpc_credentials_vtable iam_vtable = { grpc_credentials *grpc_google_iam_credentials_create( const char *token, const char *authority_selector, void *reserved) { grpc_google_iam_credentials *c; - GRPC_API_TRACE("grpc_iam_credentials_create(token=%s, authority_selector=%s, " - "reserved=%p)", - 3, (token, authority_selector, reserved)); + GRPC_API_TRACE( + "grpc_iam_credentials_create(token=%s, authority_selector=%s, " + "reserved=%p)", + 3, (token, authority_selector, reserved)); GPR_ASSERT(reserved == NULL); GPR_ASSERT(token != NULL); GPR_ASSERT(authority_selector != NULL); diff --git a/src/core/security/security_context.c b/src/core/security/security_context.c index b3cf5204c0d..fb905e0b228 100644 --- a/src/core/security/security_context.c +++ b/src/core/security/security_context.c @@ -273,7 +273,7 @@ void grpc_auth_context_add_property(grpc_auth_context *ctx, const char *name, grpc_auth_property *prop; GRPC_API_TRACE( "grpc_auth_context_add_property(ctx=%p, name=%s, value=%*.*s, " - "value_length=%lu)", + "value_length=%lu)", 6, (ctx, name, (int)value_length, (int)value_length, value, (unsigned long)value_length)); ensure_auth_context_capacity(ctx); diff --git a/src/core/security/server_secure_chttp2.c b/src/core/security/server_secure_chttp2.c index 3738ed6eb13..881e44a3fed 100644 --- a/src/core/security/server_secure_chttp2.c +++ b/src/core/security/server_secure_chttp2.c @@ -223,9 +223,10 @@ int grpc_server_add_secure_http2_port(grpc_server *server, const char *addr, grpc_security_connector *sc = NULL; grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - GRPC_API_TRACE("grpc_server_add_secure_http2_port(" - "server=%p, addr=%s, creds=%p)", - 3, (server, addr, creds)); + GRPC_API_TRACE( + "grpc_server_add_secure_http2_port(" + "server=%p, addr=%s, creds=%p)", + 3, (server, addr, creds)); /* create security context */ if (creds == NULL) goto error; diff --git a/src/core/surface/api_trace.h b/src/core/surface/api_trace.h index 7769b191efa..82bbf3b62b3 100644 --- a/src/core/surface/api_trace.h +++ b/src/core/surface/api_trace.h @@ -51,15 +51,15 @@ extern int grpc_api_trace; #define GRPC_API_TRACE_UNWRAP7(a, b, c, d, e, f, g) , a, b, c, d, e, f, g #define GRPC_API_TRACE_UNWRAP8(a, b, c, d, e, f, g, h) , a, b, c, d, e, f, g, h #define GRPC_API_TRACE_UNWRAP9(a, b, c, d, e, f, g, h, i) \ - , a, b, c, d, e, f, g, h, i + , a, b, c, d, e, f, g, h, i #define GRPC_API_TRACE_UNWRAP10(a, b, c, d, e, f, g, h, i, j) \ - , a, b, c, d, e, f, g, h, i, j + , a, b, c, d, e, f, g, h, i, j /* Due to the limitations of C89's preprocessor, the arity of the var-arg list 'nargs' must be specified. */ -#define GRPC_API_TRACE(fmt, nargs, args) \ - if (grpc_api_trace) { \ - gpr_log(GPR_INFO, fmt GRPC_API_TRACE_UNWRAP##nargs args ); \ - } +#define GRPC_API_TRACE(fmt, nargs, args) \ + if (grpc_api_trace) { \ + gpr_log(GPR_INFO, fmt GRPC_API_TRACE_UNWRAP##nargs args); \ + } #endif /* GRPC_INTERNAL_CORE_SURFACE_API_TRACE_H */ diff --git a/src/core/surface/call.c b/src/core/surface/call.c index 85c27746dca..d15a3bcbade 100644 --- a/src/core/surface/call.c +++ b/src/core/surface/call.c @@ -1325,7 +1325,7 @@ grpc_call_error grpc_call_cancel_with_status(grpc_call *c, grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; GRPC_API_TRACE( "grpc_call_cancel_with_status(" - "c=%p, status=%d, description=%s, reserved=%p)", + "c=%p, status=%d, description=%s, reserved=%p)", 4, (c, (int)status, description, reserved)); GPR_ASSERT(reserved == NULL); lock(c); diff --git a/src/core/surface/call.h b/src/core/surface/call.h index acfedf40cd4..f421a81619f 100644 --- a/src/core/surface/call.h +++ b/src/core/surface/call.h @@ -160,7 +160,7 @@ void *grpc_call_context_get(grpc_call *call, grpc_context_index elem); #define GRPC_SERVER_LOG_REQUEST_CALL(sev, server, call, details, \ initial_metadata, cq_bound_to_call, \ cq_for_notifications, tag) \ - if (grpc_api_trace) \ + if (grpc_api_trace) \ grpc_server_log_request_call(sev, server, call, details, initial_metadata, \ cq_bound_to_call, cq_for_notifications, tag) diff --git a/src/core/surface/channel.c b/src/core/surface/channel.c index 3ff11eb0344..a9a5f828f27 100644 --- a/src/core/surface/channel.c +++ b/src/core/surface/channel.c @@ -217,13 +217,13 @@ grpc_call *grpc_channel_create_call(grpc_channel *channel, gpr_timespec deadline, void *reserved) { GRPC_API_TRACE( "grpc_channel_create_call(" - "channel=%p, parent_call=%p, propagation_mask=%x, cq=%p, method=%s, " - "host=%s, " - "deadline=gpr_timespec { tv_sec: %ld, tv_nsec: %d, clock_type: %d }, " - "reserved=%p)", - 10, (channel, parent_call, (unsigned)propagation_mask, cq, method, - host, (long)deadline.tv_sec, deadline.tv_nsec, - (int)deadline.clock_type, reserved)); + "channel=%p, parent_call=%p, propagation_mask=%x, cq=%p, method=%s, " + "host=%s, " + "deadline=gpr_timespec { tv_sec: %ld, tv_nsec: %d, clock_type: %d }, " + "reserved=%p)", + 10, (channel, parent_call, (unsigned)propagation_mask, cq, method, host, + (long)deadline.tv_sec, deadline.tv_nsec, (int)deadline.clock_type, + reserved)); GPR_ASSERT(!reserved); return grpc_channel_create_call_internal( channel, parent_call, propagation_mask, cq, @@ -268,10 +268,10 @@ grpc_call *grpc_channel_create_registered_call( registered_call *rc = registered_call_handle; GRPC_API_TRACE( "grpc_channel_create_registered_call(" - "channel=%p, parent_call=%p, propagation_mask=%x, completion_queue=%p, " - "registered_call_handle=%p, " - "deadline=gpr_timespec { tv_sec: %ld, tv_nsec: %d, clock_type: %d }, " - "reserved=%p)", + "channel=%p, parent_call=%p, propagation_mask=%x, completion_queue=%p, " + "registered_call_handle=%p, " + "deadline=gpr_timespec { tv_sec: %ld, tv_nsec: %d, clock_type: %d }, " + "reserved=%p)", 9, (channel, parent_call, (unsigned)propagation_mask, completion_queue, registered_call_handle, (long)deadline.tv_sec, deadline.tv_nsec, (int)deadline.clock_type, reserved)); diff --git a/src/core/surface/channel_connectivity.c b/src/core/surface/channel_connectivity.c index bef3d387fc9..f72fb041426 100644 --- a/src/core/surface/channel_connectivity.c +++ b/src/core/surface/channel_connectivity.c @@ -49,8 +49,8 @@ grpc_connectivity_state grpc_channel_check_connectivity_state( grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; grpc_connectivity_state state; GRPC_API_TRACE( - "grpc_channel_check_connectivity_state(channel=%p, try_to_connect=%d)", - 2, (channel, try_to_connect)); + "grpc_channel_check_connectivity_state(channel=%p, try_to_connect=%d)", 2, + (channel, try_to_connect)); if (client_channel_elem->filter != &grpc_client_channel_filter) { gpr_log(GPR_ERROR, "grpc_channel_check_connectivity_state called on something that is " @@ -181,9 +181,9 @@ void grpc_channel_watch_connectivity_state( GRPC_API_TRACE( "grpc_channel_watch_connectivity_state(" - "channel=%p, last_observed_state=%d, " - "deadline=gpr_timespec { tv_sec: %ld, tv_nsec: %d, clock_type: %d }, " - "cq=%p, tag=%p)", + "channel=%p, last_observed_state=%d, " + "deadline=gpr_timespec { tv_sec: %ld, tv_nsec: %d, clock_type: %d }, " + "cq=%p, tag=%p)", 7, (channel, (int)last_observed_state, (long)deadline.tv_sec, deadline.tv_nsec, (int)deadline.clock_type, cq, tag)); diff --git a/src/core/surface/completion_queue.c b/src/core/surface/completion_queue.c index a6b32d27aa1..e818ccba488 100644 --- a/src/core/surface/completion_queue.c +++ b/src/core/surface/completion_queue.c @@ -186,11 +186,11 @@ grpc_event grpc_completion_queue_next(grpc_completion_queue *cc, GRPC_API_TRACE( "grpc_completion_queue_next(" - "cc=%p, " - "deadline=gpr_timespec { tv_sec: %ld, tv_nsec: %d, clock_type: %d }, " - "reserved=%p)", - 5, (cc, (long)deadline.tv_sec, deadline.tv_nsec, - (int)deadline.clock_type, reserved)); + "cc=%p, " + "deadline=gpr_timespec { tv_sec: %ld, tv_nsec: %d, clock_type: %d }, " + "reserved=%p)", + 5, (cc, (long)deadline.tv_sec, deadline.tv_nsec, (int)deadline.clock_type, + reserved)); GPR_ASSERT(!reserved); deadline = gpr_convert_clock_type(deadline, GPR_CLOCK_MONOTONIC); @@ -270,9 +270,9 @@ grpc_event grpc_completion_queue_pluck(grpc_completion_queue *cc, void *tag, GRPC_API_TRACE( "grpc_completion_queue_pluck(" - "cc=%p, tag=%p, " - "deadline=gpr_timespec { tv_sec: %ld, tv_nsec: %d, clock_type: %d }, " - "reserved=%p)", + "cc=%p, tag=%p, " + "deadline=gpr_timespec { tv_sec: %ld, tv_nsec: %d, clock_type: %d }, " + "reserved=%p)", 6, (cc, tag, (long)deadline.tv_sec, deadline.tv_nsec, (int)deadline.clock_type, reserved)); GPR_ASSERT(!reserved); diff --git a/src/core/surface/lame_client.c b/src/core/surface/lame_client.c index d2462d8c999..e72264fbcdb 100644 --- a/src/core/surface/lame_client.c +++ b/src/core/surface/lame_client.c @@ -154,7 +154,7 @@ grpc_channel *grpc_lame_client_channel_create(const char *target, elem = grpc_channel_stack_element(grpc_channel_get_channel_stack(channel), 0); GRPC_API_TRACE( "grpc_lame_client_channel_create(target=%s, error_code=%d, " - "error_message=%s)", + "error_message=%s)", 3, (target, (int)error_code, error_message)); GPR_ASSERT(elem->filter == &lame_filter); chand = (channel_data *)elem->channel_data; diff --git a/src/core/surface/secure_channel_create.c b/src/core/surface/secure_channel_create.c index 7fe43b0eaa5..1282ee99ed7 100644 --- a/src/core/surface/secure_channel_create.c +++ b/src/core/surface/secure_channel_create.c @@ -247,9 +247,10 @@ grpc_channel *grpc_secure_channel_create(grpc_credentials *creds, grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; size_t n = 0; - GRPC_API_TRACE("grpc_secure_channel_create(creds=%p, target=%s, args=%p, " - "reserved=%p)", 4, - (creds, target, args, reserved)); + GRPC_API_TRACE( + "grpc_secure_channel_create(creds=%p, target=%s, args=%p, " + "reserved=%p)", + 4, (creds, target, args, reserved)); GPR_ASSERT(reserved == NULL); if (grpc_find_security_connector_in_args(args) != NULL) { diff --git a/src/core/surface/server.c b/src/core/surface/server.c index ebd2ef9af35..819226278dc 100644 --- a/src/core/surface/server.c +++ b/src/core/surface/server.c @@ -1186,8 +1186,8 @@ grpc_call_error grpc_server_request_call( requested_call *rc = gpr_malloc(sizeof(*rc)); GRPC_API_TRACE( "grpc_server_request_call(" - "server=%p, call=%p, details=%p, initial_metadata=%p, " - "cq_bound_to_call=%p, cq_for_notification=%p, tag%p)", + "server=%p, call=%p, details=%p, initial_metadata=%p, " + "cq_bound_to_call=%p, cq_for_notification=%p, tag%p)", 7, (server, call, details, initial_metadata, cq_bound_to_call, cq_for_notification, tag)); GRPC_SERVER_LOG_REQUEST_CALL(GPR_INFO, server, call, details, @@ -1225,9 +1225,9 @@ grpc_call_error grpc_server_request_registered_call( registered_method *rm = rmp; GRPC_API_TRACE( "grpc_server_request_registered_call(" - "server=%p, rmp=%p, call=%p, deadline=%p, initial_metadata=%p, " - "optional_payload=%p, cq_bound_to_call=%p, cq_for_notification=%p, " - "tag=%p)", + "server=%p, rmp=%p, call=%p, deadline=%p, initial_metadata=%p, " + "optional_payload=%p, cq_bound_to_call=%p, cq_for_notification=%p, " + "tag=%p)", 9, (server, rmp, call, deadline, initial_metadata, optional_payload, cq_bound_to_call, cq_for_notification, tag)); if (!grpc_cq_is_server_cq(cq_for_notification)) { diff --git a/src/core/surface/surface_trace.h b/src/core/surface/surface_trace.h index 51329a49842..93b2859ac5b 100644 --- a/src/core/surface/surface_trace.h +++ b/src/core/surface/surface_trace.h @@ -39,7 +39,7 @@ #include #define GRPC_SURFACE_TRACE_RETURNED_EVENT(cq, event) \ - if (grpc_api_trace) { \ + if (grpc_api_trace) { \ char *_ev = grpc_event_string(event); \ gpr_log(GPR_INFO, "RETURN_EVENT[%p]: %s", cq, _ev); \ gpr_free(_ev); \ diff --git a/src/core/surface/version.c b/src/core/surface/version.c index 8eb3ceea70f..e559d51448a 100644 --- a/src/core/surface/version.c +++ b/src/core/surface/version.c @@ -36,10 +36,4 @@ #include -#include "src/core/surface/api_trace.h" - -const char *grpc_version_string(void) { - GRPC_API_TRACE("grpc_version_string(void)", 0, ()); - return "0.11.0.0"; -} - +const char *grpc_version_string(void) { return "0.11.0.0"; } diff --git a/tools/doxygen/Doxyfile.core.internal b/tools/doxygen/Doxyfile.core.internal index 5658a102d75..a7a3da4d200 100644 --- a/tools/doxygen/Doxyfile.core.internal +++ b/tools/doxygen/Doxyfile.core.internal @@ -855,7 +855,6 @@ src/core/json/json_writer.h \ src/core/profiling/timers.h \ src/core/statistics/census_interface.h \ src/core/statistics/census_rpc_stats.h \ -src/core/surface/api_trace.h \ src/core/surface/byte_buffer_queue.h \ src/core/surface/call.h \ src/core/surface/channel.h \ @@ -992,7 +991,6 @@ src/core/json/json_string.c \ src/core/json/json_writer.c \ src/core/profiling/basic_timers.c \ src/core/profiling/stap_timers.c \ -src/core/surface/api_trace.c \ src/core/surface/byte_buffer.c \ src/core/surface/byte_buffer_queue.c \ src/core/surface/byte_buffer_reader.c \ @@ -1010,6 +1008,7 @@ src/core/surface/metadata_array.c \ src/core/surface/server.c \ src/core/surface/server_chttp2.c \ src/core/surface/server_create.c \ +src/core/surface/surface_trace.c \ src/core/surface/version.c \ src/core/transport/chttp2/alpn.c \ src/core/transport/chttp2/bin_encoder.c \ diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json index 1ceff15a3be..1e5dd11fcd0 100644 --- a/tools/run_tests/sources_and_headers.json +++ b/tools/run_tests/sources_and_headers.json @@ -12362,7 +12362,6 @@ "src/core/security/security_context.h", "src/core/statistics/census_interface.h", "src/core/statistics/census_rpc_stats.h", - "src/core/surface/api_trace.h", "src/core/surface/byte_buffer_queue.h", "src/core/surface/call.h", "src/core/surface/channel.h", @@ -12597,8 +12596,6 @@ "src/core/security/server_secure_chttp2.c", "src/core/statistics/census_interface.h", "src/core/statistics/census_rpc_stats.h", - "src/core/surface/api_trace.c", - "src/core/surface/api_trace.h", "src/core/surface/byte_buffer.c", "src/core/surface/byte_buffer_queue.c", "src/core/surface/byte_buffer_queue.h", @@ -12625,6 +12622,7 @@ "src/core/surface/server.h", "src/core/surface/server_chttp2.c", "src/core/surface/server_create.c", + "src/core/surface/surface_trace.c", "src/core/surface/surface_trace.h", "src/core/surface/version.c", "src/core/transport/chttp2/alpn.c", @@ -12858,7 +12856,6 @@ "src/core/profiling/timers.h", "src/core/statistics/census_interface.h", "src/core/statistics/census_rpc_stats.h", - "src/core/surface/api_trace.h", "src/core/surface/byte_buffer_queue.h", "src/core/surface/call.h", "src/core/surface/channel.h", @@ -13063,8 +13060,6 @@ "src/core/profiling/timers.h", "src/core/statistics/census_interface.h", "src/core/statistics/census_rpc_stats.h", - "src/core/surface/api_trace.c", - "src/core/surface/api_trace.h", "src/core/surface/byte_buffer.c", "src/core/surface/byte_buffer_queue.c", "src/core/surface/byte_buffer_queue.h", @@ -13090,6 +13085,7 @@ "src/core/surface/server.h", "src/core/surface/server_chttp2.c", "src/core/surface/server_create.c", + "src/core/surface/surface_trace.c", "src/core/surface/surface_trace.h", "src/core/surface/version.c", "src/core/transport/chttp2/alpn.c", From 2468ff56a43670a3a48c825c25aae905c6f2e63e Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Mon, 5 Oct 2015 09:00:17 -0700 Subject: [PATCH 116/169] Restore build sanity --- BUILD | 12 ++++++------ Makefile | 4 ++-- build.yaml | 4 ++-- gRPC.podspec | 6 +++--- grpc.gyp | 4 ++-- tools/doxygen/Doxyfile.core.internal | 4 ++-- tools/run_tests/sources_and_headers.json | 12 ++++++------ vsprojects/vcxproj/grpc/grpc.vcxproj | 6 +++--- vsprojects/vcxproj/grpc/grpc.vcxproj.filters | 12 ++++++------ .../vcxproj/grpc_unsecure/grpc_unsecure.vcxproj | 6 +++--- .../grpc_unsecure/grpc_unsecure.vcxproj.filters | 12 ++++++------ 11 files changed, 41 insertions(+), 41 deletions(-) diff --git a/BUILD b/BUILD index c8118089bef..ea1ea26b425 100644 --- a/BUILD +++ b/BUILD @@ -220,6 +220,7 @@ cc_library( "src/core/profiling/timers.h", "src/core/statistics/census_interface.h", "src/core/statistics/census_rpc_stats.h", + "src/core/surface/api_trace.h", "src/core/surface/byte_buffer_queue.h", "src/core/surface/call.h", "src/core/surface/channel.h", @@ -227,7 +228,6 @@ cc_library( "src/core/surface/event_string.h", "src/core/surface/init.h", "src/core/surface/server.h", - "src/core/surface/surface_trace.h", "src/core/transport/chttp2/alpn.h", "src/core/transport/chttp2/bin_encoder.h", "src/core/transport/chttp2/frame.h", @@ -356,6 +356,7 @@ cc_library( "src/core/json/json_writer.c", "src/core/profiling/basic_timers.c", "src/core/profiling/stap_timers.c", + "src/core/surface/api_trace.c", "src/core/surface/byte_buffer.c", "src/core/surface/byte_buffer_queue.c", "src/core/surface/byte_buffer_reader.c", @@ -373,7 +374,6 @@ cc_library( "src/core/surface/server.c", "src/core/surface/server_chttp2.c", "src/core/surface/server_create.c", - "src/core/surface/surface_trace.c", "src/core/surface/version.c", "src/core/transport/chttp2/alpn.c", "src/core/transport/chttp2/bin_encoder.c", @@ -505,6 +505,7 @@ cc_library( "src/core/profiling/timers.h", "src/core/statistics/census_interface.h", "src/core/statistics/census_rpc_stats.h", + "src/core/surface/api_trace.h", "src/core/surface/byte_buffer_queue.h", "src/core/surface/call.h", "src/core/surface/channel.h", @@ -512,7 +513,6 @@ cc_library( "src/core/surface/event_string.h", "src/core/surface/init.h", "src/core/surface/server.h", - "src/core/surface/surface_trace.h", "src/core/transport/chttp2/alpn.h", "src/core/transport/chttp2/bin_encoder.h", "src/core/transport/chttp2/frame.h", @@ -621,6 +621,7 @@ cc_library( "src/core/json/json_writer.c", "src/core/profiling/basic_timers.c", "src/core/profiling/stap_timers.c", + "src/core/surface/api_trace.c", "src/core/surface/byte_buffer.c", "src/core/surface/byte_buffer_queue.c", "src/core/surface/byte_buffer_reader.c", @@ -638,7 +639,6 @@ cc_library( "src/core/surface/server.c", "src/core/surface/server_chttp2.c", "src/core/surface/server_create.c", - "src/core/surface/surface_trace.c", "src/core/surface/version.c", "src/core/transport/chttp2/alpn.c", "src/core/transport/chttp2/bin_encoder.c", @@ -1145,6 +1145,7 @@ objc_library( "src/core/json/json_writer.c", "src/core/profiling/basic_timers.c", "src/core/profiling/stap_timers.c", + "src/core/surface/api_trace.c", "src/core/surface/byte_buffer.c", "src/core/surface/byte_buffer_queue.c", "src/core/surface/byte_buffer_reader.c", @@ -1162,7 +1163,6 @@ objc_library( "src/core/surface/server.c", "src/core/surface/server_chttp2.c", "src/core/surface/server_create.c", - "src/core/surface/surface_trace.c", "src/core/surface/version.c", "src/core/transport/chttp2/alpn.c", "src/core/transport/chttp2/bin_encoder.c", @@ -1291,6 +1291,7 @@ objc_library( "src/core/profiling/timers.h", "src/core/statistics/census_interface.h", "src/core/statistics/census_rpc_stats.h", + "src/core/surface/api_trace.h", "src/core/surface/byte_buffer_queue.h", "src/core/surface/call.h", "src/core/surface/channel.h", @@ -1298,7 +1299,6 @@ objc_library( "src/core/surface/event_string.h", "src/core/surface/init.h", "src/core/surface/server.h", - "src/core/surface/surface_trace.h", "src/core/transport/chttp2/alpn.h", "src/core/transport/chttp2/bin_encoder.h", "src/core/transport/chttp2/frame.h", diff --git a/Makefile b/Makefile index e0a7b804721..8eb94f768a2 100644 --- a/Makefile +++ b/Makefile @@ -4119,6 +4119,7 @@ LIBGRPC_SRC = \ src/core/json/json_writer.c \ src/core/profiling/basic_timers.c \ src/core/profiling/stap_timers.c \ + src/core/surface/api_trace.c \ src/core/surface/byte_buffer.c \ src/core/surface/byte_buffer_queue.c \ src/core/surface/byte_buffer_reader.c \ @@ -4136,7 +4137,6 @@ LIBGRPC_SRC = \ src/core/surface/server.c \ src/core/surface/server_chttp2.c \ src/core/surface/server_create.c \ - src/core/surface/surface_trace.c \ src/core/surface/version.c \ src/core/transport/chttp2/alpn.c \ src/core/transport/chttp2/bin_encoder.c \ @@ -4401,6 +4401,7 @@ LIBGRPC_UNSECURE_SRC = \ src/core/json/json_writer.c \ src/core/profiling/basic_timers.c \ src/core/profiling/stap_timers.c \ + src/core/surface/api_trace.c \ src/core/surface/byte_buffer.c \ src/core/surface/byte_buffer_queue.c \ src/core/surface/byte_buffer_reader.c \ @@ -4418,7 +4419,6 @@ LIBGRPC_UNSECURE_SRC = \ src/core/surface/server.c \ src/core/surface/server_chttp2.c \ src/core/surface/server_create.c \ - src/core/surface/surface_trace.c \ src/core/surface/version.c \ src/core/transport/chttp2/alpn.c \ src/core/transport/chttp2/bin_encoder.c \ diff --git a/build.yaml b/build.yaml index 32dfa34df6e..762bbf39557 100644 --- a/build.yaml +++ b/build.yaml @@ -180,6 +180,7 @@ filegroups: - src/core/profiling/timers.h - src/core/statistics/census_interface.h - src/core/statistics/census_rpc_stats.h + - src/core/surface/api_trace.h - src/core/surface/byte_buffer_queue.h - src/core/surface/call.h - src/core/surface/channel.h @@ -187,7 +188,6 @@ filegroups: - src/core/surface/event_string.h - src/core/surface/init.h - src/core/surface/server.h - - src/core/surface/surface_trace.h - src/core/transport/chttp2/alpn.h - src/core/transport/chttp2/bin_encoder.h - src/core/transport/chttp2/frame.h @@ -293,6 +293,7 @@ filegroups: - src/core/json/json_writer.c - src/core/profiling/basic_timers.c - src/core/profiling/stap_timers.c + - src/core/surface/api_trace.c - src/core/surface/byte_buffer.c - src/core/surface/byte_buffer_queue.c - src/core/surface/byte_buffer_reader.c @@ -310,7 +311,6 @@ filegroups: - src/core/surface/server.c - src/core/surface/server_chttp2.c - src/core/surface/server_create.c - - src/core/surface/surface_trace.c - src/core/surface/version.c - src/core/transport/chttp2/alpn.c - src/core/transport/chttp2/bin_encoder.c diff --git a/gRPC.podspec b/gRPC.podspec index 122c16eff85..01f4e654076 100644 --- a/gRPC.podspec +++ b/gRPC.podspec @@ -224,6 +224,7 @@ Pod::Spec.new do |s| 'src/core/profiling/timers.h', 'src/core/statistics/census_interface.h', 'src/core/statistics/census_rpc_stats.h', + 'src/core/surface/api_trace.h', 'src/core/surface/byte_buffer_queue.h', 'src/core/surface/call.h', 'src/core/surface/channel.h', @@ -231,7 +232,6 @@ Pod::Spec.new do |s| 'src/core/surface/event_string.h', 'src/core/surface/init.h', 'src/core/surface/server.h', - 'src/core/surface/surface_trace.h', 'src/core/transport/chttp2/alpn.h', 'src/core/transport/chttp2/bin_encoder.h', 'src/core/transport/chttp2/frame.h', @@ -367,6 +367,7 @@ Pod::Spec.new do |s| 'src/core/json/json_writer.c', 'src/core/profiling/basic_timers.c', 'src/core/profiling/stap_timers.c', + 'src/core/surface/api_trace.c', 'src/core/surface/byte_buffer.c', 'src/core/surface/byte_buffer_queue.c', 'src/core/surface/byte_buffer_reader.c', @@ -384,7 +385,6 @@ Pod::Spec.new do |s| 'src/core/surface/server.c', 'src/core/surface/server_chttp2.c', 'src/core/surface/server_create.c', - 'src/core/surface/surface_trace.c', 'src/core/surface/version.c', 'src/core/transport/chttp2/alpn.c', 'src/core/transport/chttp2/bin_encoder.c', @@ -514,6 +514,7 @@ Pod::Spec.new do |s| 'src/core/profiling/timers.h', 'src/core/statistics/census_interface.h', 'src/core/statistics/census_rpc_stats.h', + 'src/core/surface/api_trace.h', 'src/core/surface/byte_buffer_queue.h', 'src/core/surface/call.h', 'src/core/surface/channel.h', @@ -521,7 +522,6 @@ Pod::Spec.new do |s| 'src/core/surface/event_string.h', 'src/core/surface/init.h', 'src/core/surface/server.h', - 'src/core/surface/surface_trace.h', 'src/core/transport/chttp2/alpn.h', 'src/core/transport/chttp2/bin_encoder.h', 'src/core/transport/chttp2/frame.h', diff --git a/grpc.gyp b/grpc.gyp index 60179f04ff7..2225ca4e045 100644 --- a/grpc.gyp +++ b/grpc.gyp @@ -248,6 +248,7 @@ 'src/core/json/json_writer.c', 'src/core/profiling/basic_timers.c', 'src/core/profiling/stap_timers.c', + 'src/core/surface/api_trace.c', 'src/core/surface/byte_buffer.c', 'src/core/surface/byte_buffer_queue.c', 'src/core/surface/byte_buffer_reader.c', @@ -265,7 +266,6 @@ 'src/core/surface/server.c', 'src/core/surface/server_chttp2.c', 'src/core/surface/server_create.c', - 'src/core/surface/surface_trace.c', 'src/core/surface/version.c', 'src/core/transport/chttp2/alpn.c', 'src/core/transport/chttp2/bin_encoder.c', @@ -434,6 +434,7 @@ 'src/core/json/json_writer.c', 'src/core/profiling/basic_timers.c', 'src/core/profiling/stap_timers.c', + 'src/core/surface/api_trace.c', 'src/core/surface/byte_buffer.c', 'src/core/surface/byte_buffer_queue.c', 'src/core/surface/byte_buffer_reader.c', @@ -451,7 +452,6 @@ 'src/core/surface/server.c', 'src/core/surface/server_chttp2.c', 'src/core/surface/server_create.c', - 'src/core/surface/surface_trace.c', 'src/core/surface/version.c', 'src/core/transport/chttp2/alpn.c', 'src/core/transport/chttp2/bin_encoder.c', diff --git a/tools/doxygen/Doxyfile.core.internal b/tools/doxygen/Doxyfile.core.internal index a7a3da4d200..a48fe2eca80 100644 --- a/tools/doxygen/Doxyfile.core.internal +++ b/tools/doxygen/Doxyfile.core.internal @@ -855,6 +855,7 @@ src/core/json/json_writer.h \ src/core/profiling/timers.h \ src/core/statistics/census_interface.h \ src/core/statistics/census_rpc_stats.h \ +src/core/surface/api_trace.h \ src/core/surface/byte_buffer_queue.h \ src/core/surface/call.h \ src/core/surface/channel.h \ @@ -862,7 +863,6 @@ src/core/surface/completion_queue.h \ src/core/surface/event_string.h \ src/core/surface/init.h \ src/core/surface/server.h \ -src/core/surface/surface_trace.h \ src/core/transport/chttp2/alpn.h \ src/core/transport/chttp2/bin_encoder.h \ src/core/transport/chttp2/frame.h \ @@ -991,6 +991,7 @@ src/core/json/json_string.c \ src/core/json/json_writer.c \ src/core/profiling/basic_timers.c \ src/core/profiling/stap_timers.c \ +src/core/surface/api_trace.c \ src/core/surface/byte_buffer.c \ src/core/surface/byte_buffer_queue.c \ src/core/surface/byte_buffer_reader.c \ @@ -1008,7 +1009,6 @@ src/core/surface/metadata_array.c \ src/core/surface/server.c \ src/core/surface/server_chttp2.c \ src/core/surface/server_create.c \ -src/core/surface/surface_trace.c \ src/core/surface/version.c \ src/core/transport/chttp2/alpn.c \ src/core/transport/chttp2/bin_encoder.c \ diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json index 1e5dd11fcd0..d48285eb34e 100644 --- a/tools/run_tests/sources_and_headers.json +++ b/tools/run_tests/sources_and_headers.json @@ -12362,6 +12362,7 @@ "src/core/security/security_context.h", "src/core/statistics/census_interface.h", "src/core/statistics/census_rpc_stats.h", + "src/core/surface/api_trace.h", "src/core/surface/byte_buffer_queue.h", "src/core/surface/call.h", "src/core/surface/channel.h", @@ -12369,7 +12370,6 @@ "src/core/surface/event_string.h", "src/core/surface/init.h", "src/core/surface/server.h", - "src/core/surface/surface_trace.h", "src/core/transport/chttp2/alpn.h", "src/core/transport/chttp2/bin_encoder.h", "src/core/transport/chttp2/frame.h", @@ -12596,6 +12596,8 @@ "src/core/security/server_secure_chttp2.c", "src/core/statistics/census_interface.h", "src/core/statistics/census_rpc_stats.h", + "src/core/surface/api_trace.c", + "src/core/surface/api_trace.h", "src/core/surface/byte_buffer.c", "src/core/surface/byte_buffer_queue.c", "src/core/surface/byte_buffer_queue.h", @@ -12622,8 +12624,6 @@ "src/core/surface/server.h", "src/core/surface/server_chttp2.c", "src/core/surface/server_create.c", - "src/core/surface/surface_trace.c", - "src/core/surface/surface_trace.h", "src/core/surface/version.c", "src/core/transport/chttp2/alpn.c", "src/core/transport/chttp2/alpn.h", @@ -12856,6 +12856,7 @@ "src/core/profiling/timers.h", "src/core/statistics/census_interface.h", "src/core/statistics/census_rpc_stats.h", + "src/core/surface/api_trace.h", "src/core/surface/byte_buffer_queue.h", "src/core/surface/call.h", "src/core/surface/channel.h", @@ -12863,7 +12864,6 @@ "src/core/surface/event_string.h", "src/core/surface/init.h", "src/core/surface/server.h", - "src/core/surface/surface_trace.h", "src/core/transport/chttp2/alpn.h", "src/core/transport/chttp2/bin_encoder.h", "src/core/transport/chttp2/frame.h", @@ -13060,6 +13060,8 @@ "src/core/profiling/timers.h", "src/core/statistics/census_interface.h", "src/core/statistics/census_rpc_stats.h", + "src/core/surface/api_trace.c", + "src/core/surface/api_trace.h", "src/core/surface/byte_buffer.c", "src/core/surface/byte_buffer_queue.c", "src/core/surface/byte_buffer_queue.h", @@ -13085,8 +13087,6 @@ "src/core/surface/server.h", "src/core/surface/server_chttp2.c", "src/core/surface/server_create.c", - "src/core/surface/surface_trace.c", - "src/core/surface/surface_trace.h", "src/core/surface/version.c", "src/core/transport/chttp2/alpn.c", "src/core/transport/chttp2/alpn.h", diff --git a/vsprojects/vcxproj/grpc/grpc.vcxproj b/vsprojects/vcxproj/grpc/grpc.vcxproj index e7770af3c24..6d87f4bc7c9 100644 --- a/vsprojects/vcxproj/grpc/grpc.vcxproj +++ b/vsprojects/vcxproj/grpc/grpc.vcxproj @@ -341,6 +341,7 @@ + @@ -348,7 +349,6 @@ - @@ -578,6 +578,8 @@ + + @@ -612,8 +614,6 @@ - - diff --git a/vsprojects/vcxproj/grpc/grpc.vcxproj.filters b/vsprojects/vcxproj/grpc/grpc.vcxproj.filters index a8f82370d91..4c841bc7d53 100644 --- a/vsprojects/vcxproj/grpc/grpc.vcxproj.filters +++ b/vsprojects/vcxproj/grpc/grpc.vcxproj.filters @@ -298,6 +298,9 @@ src\core\profiling + + src\core\surface + src\core\surface @@ -349,9 +352,6 @@ src\core\surface - - src\core\surface - src\core\surface @@ -734,6 +734,9 @@ src\core\statistics + + src\core\surface + src\core\surface @@ -755,9 +758,6 @@ src\core\surface - - src\core\surface - src\core\transport\chttp2 diff --git a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj index 82ec8a75480..45741371669 100644 --- a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj +++ b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj @@ -320,6 +320,7 @@ + @@ -327,7 +328,6 @@ - @@ -517,6 +517,8 @@ + + @@ -551,8 +553,6 @@ - - diff --git a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters index 21355d67f26..ecda41e4c95 100644 --- a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters +++ b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters @@ -238,6 +238,9 @@ src\core\profiling + + src\core\surface + src\core\surface @@ -289,9 +292,6 @@ src\core\surface - - src\core\surface - src\core\surface @@ -632,6 +632,9 @@ src\core\statistics + + src\core\surface + src\core\surface @@ -653,9 +656,6 @@ src\core\surface - - src\core\surface - src\core\transport\chttp2 From 0801ce6ef395bef289a14a095ad6a4d7a1ced74d Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Mon, 5 Oct 2015 09:40:31 -0700 Subject: [PATCH 117/169] Restore include sanity --- BUILD | 3 +++ build.yaml | 1 + gRPC.podspec | 2 ++ tools/doxygen/Doxyfile.core.internal | 1 + tools/run_tests/sources_and_headers.json | 4 ++++ vsprojects/vcxproj/grpc/grpc.vcxproj | 1 + vsprojects/vcxproj/grpc/grpc.vcxproj.filters | 3 +++ vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj | 1 + .../vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters | 3 +++ 9 files changed, 19 insertions(+) diff --git a/BUILD b/BUILD index ea1ea26b425..3e2a45b8a0a 100644 --- a/BUILD +++ b/BUILD @@ -228,6 +228,7 @@ cc_library( "src/core/surface/event_string.h", "src/core/surface/init.h", "src/core/surface/server.h", + "src/core/surface/surface_trace.h", "src/core/transport/chttp2/alpn.h", "src/core/transport/chttp2/bin_encoder.h", "src/core/transport/chttp2/frame.h", @@ -513,6 +514,7 @@ cc_library( "src/core/surface/event_string.h", "src/core/surface/init.h", "src/core/surface/server.h", + "src/core/surface/surface_trace.h", "src/core/transport/chttp2/alpn.h", "src/core/transport/chttp2/bin_encoder.h", "src/core/transport/chttp2/frame.h", @@ -1299,6 +1301,7 @@ objc_library( "src/core/surface/event_string.h", "src/core/surface/init.h", "src/core/surface/server.h", + "src/core/surface/surface_trace.h", "src/core/transport/chttp2/alpn.h", "src/core/transport/chttp2/bin_encoder.h", "src/core/transport/chttp2/frame.h", diff --git a/build.yaml b/build.yaml index 762bbf39557..98fb0348ca3 100644 --- a/build.yaml +++ b/build.yaml @@ -188,6 +188,7 @@ filegroups: - src/core/surface/event_string.h - src/core/surface/init.h - src/core/surface/server.h + - src/core/surface/surface_trace.h - src/core/transport/chttp2/alpn.h - src/core/transport/chttp2/bin_encoder.h - src/core/transport/chttp2/frame.h diff --git a/gRPC.podspec b/gRPC.podspec index 01f4e654076..717e7005ee5 100644 --- a/gRPC.podspec +++ b/gRPC.podspec @@ -232,6 +232,7 @@ Pod::Spec.new do |s| 'src/core/surface/event_string.h', 'src/core/surface/init.h', 'src/core/surface/server.h', + 'src/core/surface/surface_trace.h', 'src/core/transport/chttp2/alpn.h', 'src/core/transport/chttp2/bin_encoder.h', 'src/core/transport/chttp2/frame.h', @@ -522,6 +523,7 @@ Pod::Spec.new do |s| 'src/core/surface/event_string.h', 'src/core/surface/init.h', 'src/core/surface/server.h', + 'src/core/surface/surface_trace.h', 'src/core/transport/chttp2/alpn.h', 'src/core/transport/chttp2/bin_encoder.h', 'src/core/transport/chttp2/frame.h', diff --git a/tools/doxygen/Doxyfile.core.internal b/tools/doxygen/Doxyfile.core.internal index a48fe2eca80..5658a102d75 100644 --- a/tools/doxygen/Doxyfile.core.internal +++ b/tools/doxygen/Doxyfile.core.internal @@ -863,6 +863,7 @@ src/core/surface/completion_queue.h \ src/core/surface/event_string.h \ src/core/surface/init.h \ src/core/surface/server.h \ +src/core/surface/surface_trace.h \ src/core/transport/chttp2/alpn.h \ src/core/transport/chttp2/bin_encoder.h \ src/core/transport/chttp2/frame.h \ diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json index d48285eb34e..1ceff15a3be 100644 --- a/tools/run_tests/sources_and_headers.json +++ b/tools/run_tests/sources_and_headers.json @@ -12370,6 +12370,7 @@ "src/core/surface/event_string.h", "src/core/surface/init.h", "src/core/surface/server.h", + "src/core/surface/surface_trace.h", "src/core/transport/chttp2/alpn.h", "src/core/transport/chttp2/bin_encoder.h", "src/core/transport/chttp2/frame.h", @@ -12624,6 +12625,7 @@ "src/core/surface/server.h", "src/core/surface/server_chttp2.c", "src/core/surface/server_create.c", + "src/core/surface/surface_trace.h", "src/core/surface/version.c", "src/core/transport/chttp2/alpn.c", "src/core/transport/chttp2/alpn.h", @@ -12864,6 +12866,7 @@ "src/core/surface/event_string.h", "src/core/surface/init.h", "src/core/surface/server.h", + "src/core/surface/surface_trace.h", "src/core/transport/chttp2/alpn.h", "src/core/transport/chttp2/bin_encoder.h", "src/core/transport/chttp2/frame.h", @@ -13087,6 +13090,7 @@ "src/core/surface/server.h", "src/core/surface/server_chttp2.c", "src/core/surface/server_create.c", + "src/core/surface/surface_trace.h", "src/core/surface/version.c", "src/core/transport/chttp2/alpn.c", "src/core/transport/chttp2/alpn.h", diff --git a/vsprojects/vcxproj/grpc/grpc.vcxproj b/vsprojects/vcxproj/grpc/grpc.vcxproj index 6d87f4bc7c9..183edbc05bf 100644 --- a/vsprojects/vcxproj/grpc/grpc.vcxproj +++ b/vsprojects/vcxproj/grpc/grpc.vcxproj @@ -349,6 +349,7 @@ + diff --git a/vsprojects/vcxproj/grpc/grpc.vcxproj.filters b/vsprojects/vcxproj/grpc/grpc.vcxproj.filters index 4c841bc7d53..66ce9ca05be 100644 --- a/vsprojects/vcxproj/grpc/grpc.vcxproj.filters +++ b/vsprojects/vcxproj/grpc/grpc.vcxproj.filters @@ -758,6 +758,9 @@ src\core\surface + + src\core\surface + src\core\transport\chttp2 diff --git a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj index 45741371669..b527179f9f3 100644 --- a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj +++ b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj @@ -328,6 +328,7 @@ + diff --git a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters index ecda41e4c95..7be3c9ec93b 100644 --- a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters +++ b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters @@ -656,6 +656,9 @@ src\core\surface + + src\core\surface + src\core\transport\chttp2 From f33b13246e172f45d34c61f3f1ecbfa8d4b02daf Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Mon, 5 Oct 2015 09:45:04 -0700 Subject: [PATCH 118/169] Added copyright notice to binding.gyp --- binding.gyp | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/binding.gyp b/binding.gyp index 1cab4bb80a7..a2431a38e2c 100644 --- a/binding.gyp +++ b/binding.gyp @@ -1,3 +1,31 @@ +# Copyright 2015, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. { "variables" : { 'config': ' Date: Mon, 5 Oct 2015 09:55:57 -0700 Subject: [PATCH 119/169] Removed spurious comment from grpc.gyp --- grpc.gyp | 68 ------------------------------------- templates/grpc.gyp.template | 1 - 2 files changed, 69 deletions(-) diff --git a/grpc.gyp b/grpc.gyp index d17fa8f030c..222ff8d003a 100644 --- a/grpc.gyp +++ b/grpc.gyp @@ -87,7 +87,6 @@ } }, 'targets': [ - # TODO: Add C++ targets { 'target_name': 'gpr', 'product_prefix': 'lib', @@ -134,8 +133,6 @@ 'src/core/support/tls_pthread.c', ], }, - # TODO: Add C++ targets - # TODO: Add C++ targets { 'target_name': 'grpc', 'product_prefix': 'lib', @@ -294,70 +291,5 @@ 'src/core/census/tracing.c', ], }, - # TODO: Add C++ targets - # TODO: Add C++ targets - # TODO: Add C++ targets - # TODO: Add C++ targets - # TODO: Add C++ targets - # TODO: Add C++ targets - # TODO: Add C++ targets - # TODO: Add C++ targets - # TODO: Add C++ targets - # TODO: Add C++ targets - # TODO: Add C++ targets - # TODO: Add C++ targets - # TODO: Add C++ targets - # TODO: Add C++ targets - # TODO: Add C++ targets - # TODO: Add C++ targets - # TODO: Add C++ targets - # TODO: Add C++ targets - # TODO: Add C++ targets - # TODO: Add C++ targets - # TODO: Add C++ targets - # TODO: Add C++ targets - # TODO: Add C++ targets - # TODO: Add C++ targets - # TODO: Add C++ targets - # TODO: Add C++ targets - # TODO: Add C++ targets - # TODO: Add C++ targets - # TODO: Add C++ targets - # TODO: Add C++ targets - # TODO: Add C++ targets - # TODO: Add C++ targets - # TODO: Add C++ targets - # TODO: Add C++ targets - # TODO: Add C++ targets - # TODO: Add C++ targets - # TODO: Add C++ targets - # TODO: Add C++ targets - # TODO: Add C++ targets - # TODO: Add C++ targets - # TODO: Add C++ targets - # TODO: Add C++ targets - # TODO: Add C++ targets - # TODO: Add C++ targets - # TODO: Add C++ targets - # TODO: Add C++ targets - # TODO: Add C++ targets - # TODO: Add C++ targets - # TODO: Add C++ targets - # TODO: Add C++ targets - # TODO: Add C++ targets - # TODO: Add C++ targets - # TODO: Add C++ targets - # TODO: Add C++ targets - # TODO: Add C++ targets - # TODO: Add C++ targets - # TODO: Add C++ targets - # TODO: Add C++ targets - # TODO: Add C++ targets - # TODO: Add C++ targets - # TODO: Add C++ targets - # TODO: Add C++ targets - # TODO: Add C++ targets - # TODO: Add C++ targets - # TODO: Add C++ targets ] } diff --git a/templates/grpc.gyp.template b/templates/grpc.gyp.template index b9cee33fe0b..9a7637d8bf4 100644 --- a/templates/grpc.gyp.template +++ b/templates/grpc.gyp.template @@ -90,7 +90,6 @@ }, 'targets': [ % for lib in libs: - # TODO: Add C++ targets % if lib.name == 'gpr' or lib.name == 'grpc': { 'target_name': '${lib.name}', From 08005eda53827a3892cc0d68395d5a7f9658b31b Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Mon, 5 Oct 2015 11:19:34 -0700 Subject: [PATCH 120/169] Removed a pair of racy Node tests --- src/node/test/surface_test.js | 45 ----------------------------------- 1 file changed, 45 deletions(-) diff --git a/src/node/test/surface_test.js b/src/node/test/surface_test.js index d917c7a1712..7af3ad895e2 100644 --- a/src/node/test/surface_test.js +++ b/src/node/test/surface_test.js @@ -707,29 +707,6 @@ describe('Other conditions', function() { proxy.forceShutdown(); }); describe('Cancellation', function() { - it('With a unary call', function(done) { - done = multiDone(done, 2); - proxy_impl.unary = function(parent, callback) { - client.unary(parent.request, function(err, value) { - try { - assert(err); - assert.strictEqual(err.code, grpc.status.CANCELLED); - } finally { - callback(err, value); - done(); - } - }, null, {parent: parent}); - call.cancel(); - }; - proxy.addProtoService(test_service, proxy_impl); - var proxy_port = proxy.bind('localhost:0', server_insecure_creds); - proxy.start(); - var proxy_client = new Client('localhost:' + proxy_port, - grpc.Credentials.createInsecure()); - var call = proxy_client.unary({}, function(err, value) { - done(); - }); - }); it('With a client stream call', function(done) { done = multiDone(done, 2); proxy_impl.clientStream = function(parent, callback) { @@ -753,28 +730,6 @@ describe('Other conditions', function() { done(); }); }); - it('With a server stream call', function(done) { - done = multiDone(done, 2); - proxy_impl.serverStream = function(parent) { - var child = client.serverStream(parent.request, null, - {parent: parent}); - child.on('error', function(err) { - assert(err); - assert.strictEqual(err.code, grpc.status.CANCELLED); - done(); - }); - call.cancel(); - }; - proxy.addProtoService(test_service, proxy_impl); - var proxy_port = proxy.bind('localhost:0', server_insecure_creds); - proxy.start(); - var proxy_client = new Client('localhost:' + proxy_port, - grpc.Credentials.createInsecure()); - var call = proxy_client.serverStream({}); - call.on('error', function(err) { - done(); - }); - }); it('With a bidi stream call', function(done) { done = multiDone(done, 2); proxy_impl.bidiStream = function(parent) { From bae235cd5fdfd10f63308e70eff8e689449e040b Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Mon, 5 Oct 2015 11:33:36 -0700 Subject: [PATCH 121/169] Fix use-after-free --- src/core/iomgr/pollset_posix.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/core/iomgr/pollset_posix.c b/src/core/iomgr/pollset_posix.c index 90428274843..b663780a02a 100644 --- a/src/core/iomgr/pollset_posix.c +++ b/src/core/iomgr/pollset_posix.c @@ -477,6 +477,7 @@ static void basic_pollset_maybe_work_and_unlock(grpc_exec_ctx *exec_ctx, if (fd) { pfd[2].fd = fd->fd; pfd[2].revents = 0; + GRPC_FD_REF(fd, "basicpoll_begin"); gpr_mu_unlock(&pollset->mu); pfd[2].events = (short)grpc_fd_begin_poll(fd, pollset, POLLIN, POLLOUT, &fd_watcher); @@ -523,6 +524,10 @@ static void basic_pollset_maybe_work_and_unlock(grpc_exec_ctx *exec_ctx, } } } + + if (fd) { + GRPC_FD_UNREF(fd, "basicpoll_begin"); + } } static void basic_pollset_destroy(grpc_pollset *pollset) { From cc1bde76031cd7dab69349147df1f5d663cdae2e Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Mon, 5 Oct 2015 12:47:45 -0700 Subject: [PATCH 122/169] add go support to run_interop_tests.py --- tools/jenkins/grpc_interop_go/Dockerfile | 36 ++++++++++++++ .../jenkins/grpc_interop_go/build_interop.sh | 48 +++++++++++++++++++ tools/run_tests/run_interop_tests.py | 34 +++++++++++-- 3 files changed, 115 insertions(+), 3 deletions(-) create mode 100644 tools/jenkins/grpc_interop_go/Dockerfile create mode 100755 tools/jenkins/grpc_interop_go/build_interop.sh diff --git a/tools/jenkins/grpc_interop_go/Dockerfile b/tools/jenkins/grpc_interop_go/Dockerfile new file mode 100644 index 00000000000..bb60f09f247 --- /dev/null +++ b/tools/jenkins/grpc_interop_go/Dockerfile @@ -0,0 +1,36 @@ +# Copyright 2015, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +FROM golang:1.4 + +# Using login shell removes Go from path, so we add it. +RUN ln -s /usr/src/go/bin/go /usr/local/bin + +# Define the default command. +CMD ["bash"] diff --git a/tools/jenkins/grpc_interop_go/build_interop.sh b/tools/jenkins/grpc_interop_go/build_interop.sh new file mode 100755 index 00000000000..c8c5eafd481 --- /dev/null +++ b/tools/jenkins/grpc_interop_go/build_interop.sh @@ -0,0 +1,48 @@ +#!/bin/bash +# Copyright 2015, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# +# Builds Go interop server and client in a base image. +set -e + +# Clone just the grpc-go source code without any dependencies. +# We are cloning from a local git repo that contains the right revision +# to test instead of using "go get" to download from Github directly. +git clone --recursive /var/local/jenkins/grpc-go src/gooogle.golang.org/grpc + +# Get dependencies from GitHub +go get github.com/golang/protobuf/proto +go get golang.org/x/net/context +go get golang.org/x/net/trace +go get golang.org/x/oauth2 +go get google.golang.org/cloud + +# Build the interop client and server +(cd src/google.golang.org/grpc/interop/client && go install) +(cd src/google.golang.org/grpc/interop/server && go install) diff --git a/tools/run_tests/run_interop_tests.py b/tools/run_tests/run_interop_tests.py index 46b34fea4c0..f0935fb5d61 100755 --- a/tools/run_tests/run_interop_tests.py +++ b/tools/run_tests/run_interop_tests.py @@ -61,8 +61,9 @@ _CLOUD_TO_CLOUD_BASE_ARGS = [ # supported by C core SslCredentials instead. _SSL_CERT_ENV = { 'SSL_CERT_FILE':'/usr/local/share/grpc/roots.pem' } -# TODO(jtatttermusch) unify usage of --use_tls and --use_tls=true -# TODO(jtatttermusch) unify usage of --use_prod_roots and --use_test_ca +# TODO(jtattermusch) unify usage of --use_tls and --use_tls=true +# TODO(jtattermusch) unify usage of --use_prod_roots and --use_test_ca +# TODO(jtattermusch) go uses --tls_ca_file instead of --use_test_ca class CXXLanguage: @@ -140,6 +141,32 @@ class JavaLanguage: return 'java' +class GoLanguage: + + def __init__(self): + self.client_cmdline_base = ['go', 'run', 'client.go'] + # TODO: this relies on running inside docker + self.client_cwd = '/go/src/google.golang.org/grpc/interop/client' + self.server_cwd = '/go/src/google.golang.org/grpc/interop/server' + + def cloud_to_prod_args(self): + return (self.client_cmdline_base + _CLOUD_TO_PROD_BASE_ARGS + + ['--use_tls=true', '--tls_ca_file=""']) + + def cloud_to_cloud_args(self): + return (self.client_cmdline_base + _CLOUD_TO_CLOUD_BASE_ARGS + + ['--use_tls=true']) + + def cloud_to_prod_env(self): + return None + + def server_args(self): + return ['go', 'run', 'server.go', '--use_tls=true'] + + def __str__(self): + return 'go' + + class NodeLanguage: def __init__(self): @@ -215,6 +242,7 @@ class RubyLanguage: _LANGUAGES = { 'c++' : CXXLanguage(), 'csharp' : CSharpLanguage(), + 'go' : GoLanguage(), 'java' : JavaLanguage(), 'node' : NodeLanguage(), 'php' : PHPLanguage(), @@ -223,7 +251,7 @@ _LANGUAGES = { # languages supported as cloud_to_cloud servers # TODO(jtattermusch): enable other languages as servers as well -_SERVERS = ['c++', 'node', 'csharp', 'java'] +_SERVERS = ['c++', 'node', 'csharp', 'java', 'go'] # TODO(jtattermusch): add empty_stream once PHP starts supporting it. # TODO(jtattermusch): add timeout_on_sleeping_server once java starts supporting it. From 4b6bc1e8595755a73c8c4e879b322ccad8b3dfe3 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Mon, 5 Oct 2015 13:06:49 -0700 Subject: [PATCH 123/169] added comment about go dependencies --- tools/jenkins/grpc_interop_go/build_interop.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/jenkins/grpc_interop_go/build_interop.sh b/tools/jenkins/grpc_interop_go/build_interop.sh index c8c5eafd481..78dd4ea9cf5 100755 --- a/tools/jenkins/grpc_interop_go/build_interop.sh +++ b/tools/jenkins/grpc_interop_go/build_interop.sh @@ -37,6 +37,8 @@ set -e git clone --recursive /var/local/jenkins/grpc-go src/gooogle.golang.org/grpc # Get dependencies from GitHub +# NOTE: once grpc-go dependencies change, this needs to be updated manually +# but we don't expect this to happen any time soon. go get github.com/golang/protobuf/proto go get golang.org/x/net/context go get golang.org/x/net/trace From 3bf828f602247b6af2b7ccd45eb45fc86d67b597 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Mon, 5 Oct 2015 13:36:25 -0700 Subject: [PATCH 124/169] Add a more useful log message when failing to connect --- src/core/iomgr/tcp_client_posix.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/core/iomgr/tcp_client_posix.c b/src/core/iomgr/tcp_client_posix.c index 346566866a2..aca2691c416 100644 --- a/src/core/iomgr/tcp_client_posix.c +++ b/src/core/iomgr/tcp_client_posix.c @@ -141,7 +141,8 @@ static void on_writable(grpc_exec_ctx *exec_ctx, void *acp, int success) { err = getsockopt(fd->fd, SOL_SOCKET, SO_ERROR, &so_error, &so_error_size); } while (err < 0 && errno == EINTR); if (err < 0) { - gpr_log(GPR_ERROR, "getsockopt(ERROR): %s", strerror(errno)); + gpr_log(GPR_ERROR, "failed to connect to '%s': getsockopt(ERROR): %s", + ac->addr_str, strerror(errno)); goto finish; } else if (so_error != 0) { if (so_error == ENOBUFS) { @@ -166,10 +167,14 @@ static void on_writable(grpc_exec_ctx *exec_ctx, void *acp, int success) { } else { switch (so_error) { case ECONNREFUSED: - gpr_log(GPR_ERROR, "socket error: connection refused"); + gpr_log( + GPR_ERROR, + "failed to connect to '%s': socket error: connection refused", + ac->addr_str); break; default: - gpr_log(GPR_ERROR, "socket error: %d", so_error); + gpr_log(GPR_ERROR, "failed to connect to '%s': socket error: %d", + ac->addr_str, so_error); break; } goto finish; @@ -181,7 +186,8 @@ static void on_writable(grpc_exec_ctx *exec_ctx, void *acp, int success) { goto finish; } } else { - gpr_log(GPR_ERROR, "on_writable failed during connect"); + gpr_log(GPR_ERROR, "failed to connect to '%s': timeout occurred", + ac->addr_str); goto finish; } From 809831eef7263c2c6ed189b28c5df617cbb8a543 Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Mon, 5 Oct 2015 13:40:07 -0700 Subject: [PATCH 125/169] Added comments --- src/core/surface/call.c | 16 +++++++++++++++- src/core/transport/chttp2/bin_encoder.c | 10 ++++++++++ tools/codegen/core/gen_hpack_tables.c | 10 ++++++++++ .../codegen/core/gen_legal_metadata_characters.c | 5 +++++ 4 files changed, 40 insertions(+), 1 deletion(-) diff --git a/src/core/surface/call.c b/src/core/surface/call.c index 3f06507f9fa..e31b89489fc 100644 --- a/src/core/surface/call.c +++ b/src/core/surface/call.c @@ -424,6 +424,11 @@ static grpc_cq_completion *allocate_completion(grpc_call *call) { if (call->allocated_completions & (1u << i)) { continue; } + /* NB: the following integer arithmetic operation needs to be in its + * expanded form due to the "integral promotion" performed (see section + * 3.2.1.1 of the C89 draft standard), which in this case upcasts the result + * of the bitwise OR to "unsigned". A cast to the smaller container type is + * then required to avoid the compiler warning */ call->allocated_completions = (gpr_uint8)(call->allocated_completions | (1u << i)); gpr_mu_unlock(&call->completion_mu); @@ -736,6 +741,11 @@ static void finish_live_ioreq_op(grpc_call *call, grpc_ioreq_op op, size_t i; /* ioreq is live: we need to do something */ master = &call->masters[master_set]; + /* NB: the following integer arithmetic operation needs to be in its + * expanded form due to the "integral promotion" performed (see section + * 3.2.1.1 of the C89 draft standard), which in this case upcasts the result + * of the bitwise OR to "unsigned". A cast to the smaller container type is + * then required to avoid the compiler warning */ master->complete_mask = (gpr_uint16)(master->complete_mask | (1u << op)); if (!success) { master->success = 0; @@ -1246,6 +1256,11 @@ static grpc_call_error start_ioreq(grpc_call *call, const grpc_ioreq *reqs, GRPC_MDSTR_REF(reqs[i].data.send_status.details)); } } + /* NB: the following integer arithmetic operation needs to be in its + * expanded form due to the "integral promotion" performed (see section + * 3.2.1.1 of the C89 draft standard), which in this case upcasts the result + * of the bitwise OR to "unsigned". A cast to the smaller container type is + * then required to avoid the compiler warning */ have_ops = (gpr_uint16)(have_ops | (1u << op)); call->request_data[op] = data; @@ -1831,4 +1846,3 @@ void *grpc_call_context_get(grpc_call *call, grpc_context_index elem) { } gpr_uint8 grpc_call_is_client(grpc_call *call) { return call->is_client; } - diff --git a/src/core/transport/chttp2/bin_encoder.c b/src/core/transport/chttp2/bin_encoder.c index b0b04f697a2..5266f3ebf77 100644 --- a/src/core/transport/chttp2/bin_encoder.c +++ b/src/core/transport/chttp2/bin_encoder.c @@ -185,6 +185,11 @@ gpr_slice grpc_chttp2_huffman_compress(gpr_slice input) { } if (temp_length) { + /* NB: the following integer arithmetic operation needs to be in its + * expanded form due to the "integral promotion" performed (see section + * 3.2.1.1 of the C89 draft standard), which in this case upcasts the result + * of the bitwise OR to "unsigned". A cast to the smaller container type is + * then required to avoid the compiler warning */ *out++ = (gpr_uint8)((gpr_uint8)(temp << (8u - temp_length)) | (gpr_uint8)(0xffu >> temp_length)); } @@ -265,6 +270,11 @@ gpr_slice grpc_chttp2_base64_encode_and_huffman_compress(gpr_slice input) { } if (out.temp_length) { + /* NB: the following integer arithmetic operation needs to be in its + * expanded form due to the "integral promotion" performed (see section + * 3.2.1.1 of the C89 draft standard), which in this case upcasts the result + * of the bitwise OR to "unsigned". A cast to the smaller container type is + * then required to avoid the compiler warning */ *out.out++ = (gpr_uint8)((gpr_uint8)(out.temp << (8u - out.temp_length)) | (gpr_uint8)(0xffu >> out.temp_length)); } diff --git a/tools/codegen/core/gen_hpack_tables.c b/tools/codegen/core/gen_hpack_tables.c index 21667f0651d..48398bebd53 100644 --- a/tools/codegen/core/gen_hpack_tables.c +++ b/tools/codegen/core/gen_hpack_tables.c @@ -71,6 +71,11 @@ static unsigned char prefix_mask(unsigned char prefix_len) { unsigned char i; unsigned char out = 0; for (i = 0; i < prefix_len; i++) { + /* NB: the following integer arithmetic operation needs to be in its + * expanded form due to the "integral promotion" performed (see section + * 3.2.1.1 of the C89 draft standard), which in this case upcasts the result + * of the bitwise OR to "unsigned". A cast to the smaller container type is + * then required to avoid the compiler warning */ out = (unsigned char)(out | (unsigned char)(1 << (7 - i))); } return out; @@ -92,6 +97,11 @@ static void generate_first_byte_lut(void) { chrspec = NULL; for (j = 0; j < num_fields; j++) { if ((prefix_mask(fields[j].prefix_length) & i) == fields[j].prefix) { + /* NB: the following integer arithmetic operation needs to be in its + * expanded form due to the "integral promotion" performed (see section + * 3.2.1.1 of the C89 draft standard), which in this case upcasts the + * result of the bitwise AND to "unsigned". A cast to the smaller + * container type is then required to avoid the compiler warning */ suffix = (unsigned char)(suffix_mask(fields[j].prefix_length) & (unsigned char)i); if (suffix == suffix_mask(fields[j].prefix_length)) { diff --git a/tools/codegen/core/gen_legal_metadata_characters.c b/tools/codegen/core/gen_legal_metadata_characters.c index 5783c3ff696..37189165771 100644 --- a/tools/codegen/core/gen_legal_metadata_characters.c +++ b/tools/codegen/core/gen_legal_metadata_characters.c @@ -41,6 +41,11 @@ static unsigned char legal_bits[256 / 8]; static void legal(int x) { int byte = x / 8; int bit = x % 8; + /* NB: the following integer arithmetic operation needs to be in its + * expanded form due to the "integral promotion" performed (see section + * 3.2.1.1 of the C89 draft standard), which in this case upcasts the result + * of the bitwise OR to "unsigned". A cast to the smaller container type is + * then required to avoid the compiler warning */ legal_bits[byte] = (unsigned char)((legal_bits[byte] | (unsigned char)(1 << bit))); } From c6c3189f3dca4880d05cf0492c28d0988b06367e Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Mon, 5 Oct 2015 14:00:19 -0700 Subject: [PATCH 126/169] Add more verbose traces for debug output --- test/core/util/port_posix.c | 14 ++++++++++++-- tools/run_tests/run_tests.py | 10 +++++++--- 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/test/core/util/port_posix.c b/test/core/util/port_posix.c index 887079e0f8a..0a50660586a 100644 --- a/test/core/util/port_posix.c +++ b/test/core/util/port_posix.c @@ -213,15 +213,25 @@ static void got_port_from_server(grpc_exec_ctx *exec_ctx, void *arg, size_t i; int port = 0; portreq *pr = arg; + int failed = 0; + + if (!response) { + failed = 1; + gpr_log(GPR_DEBUG, + "failed port pick from server: retrying [response=NULL]"); + } else if (response->status != 200) { + failed = 1; + gpr_log(GPR_DEBUG, "failed port pick from server: status=%d", + response->status); + } - if (!response || response->status != 200) { + if (failed) { grpc_httpcli_request req; memset(&req, 0, sizeof(req)); GPR_ASSERT(pr->retries < 10); pr->retries++; req.host = pr->server; req.path = "/get"; - gpr_log(GPR_DEBUG, "failed port pick from server: retrying"); sleep(1); grpc_httpcli_get(exec_ctx, pr->ctx, &pr->pollset, &req, GRPC_TIMEOUT_SECONDS_TO_DEADLINE(10), got_port_from_server, diff --git a/tools/run_tests/run_tests.py b/tools/run_tests/run_tests.py index 38c06764b9b..9ed8ef33e1f 100755 --- a/tools/run_tests/run_tests.py +++ b/tools/run_tests/run_tests.py @@ -715,17 +715,21 @@ def _start_port_server(port_server_port): try: version = urllib2.urlopen('http://localhost:%d/version' % port_server_port, timeout=1).read() + print 'detected port server running' running = True except Exception: + print 'failed to detect port server: %s' % sys.exc_info()[0] running = False if running: with open('tools/run_tests/port_server.py') as f: current_version = hashlib.sha1(f.read()).hexdigest() running = (version == current_version) if not running: + print 'port_server version mismatch: killing the old one' urllib2.urlopen('http://localhost:%d/quit' % port_server_port).read() time.sleep(1) if not running: + print 'starting port_server' port_log = open('portlog.txt', 'w') port_server = subprocess.Popen( ['python', 'tools/run_tests/port_server.py', '-p', '%d' % port_server_port], @@ -737,7 +741,7 @@ def _start_port_server(port_server_port): if waits > 10: port_server.kill() if port_server.poll() is not None: - print "port_server failed to start" + print 'port_server failed to start' port_log = open('portlog.txt', 'r').read() print port_log sys.exit(1) @@ -746,11 +750,11 @@ def _start_port_server(port_server_port): timeout=1).read() break except socket.timeout: - print "waiting for port_server" + print 'waiting for port_server: timeout' time.sleep(0.5) waits += 1 except urllib2.URLError: - print "waiting for port_server" + print 'waiting for port_server: urlerror' time.sleep(0.5) waits += 1 except: From 0d6499e7e1fc9c9d4e1b7369a28f1ef95006714f Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Mon, 5 Oct 2015 14:00:47 -0700 Subject: [PATCH 127/169] Add more verbose traces for port_server usage --- test/core/util/port_posix.c | 14 ++++++++++++-- tools/run_tests/run_tests.py | 10 +++++++--- 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/test/core/util/port_posix.c b/test/core/util/port_posix.c index 887079e0f8a..0a50660586a 100644 --- a/test/core/util/port_posix.c +++ b/test/core/util/port_posix.c @@ -213,15 +213,25 @@ static void got_port_from_server(grpc_exec_ctx *exec_ctx, void *arg, size_t i; int port = 0; portreq *pr = arg; + int failed = 0; + + if (!response) { + failed = 1; + gpr_log(GPR_DEBUG, + "failed port pick from server: retrying [response=NULL]"); + } else if (response->status != 200) { + failed = 1; + gpr_log(GPR_DEBUG, "failed port pick from server: status=%d", + response->status); + } - if (!response || response->status != 200) { + if (failed) { grpc_httpcli_request req; memset(&req, 0, sizeof(req)); GPR_ASSERT(pr->retries < 10); pr->retries++; req.host = pr->server; req.path = "/get"; - gpr_log(GPR_DEBUG, "failed port pick from server: retrying"); sleep(1); grpc_httpcli_get(exec_ctx, pr->ctx, &pr->pollset, &req, GRPC_TIMEOUT_SECONDS_TO_DEADLINE(10), got_port_from_server, diff --git a/tools/run_tests/run_tests.py b/tools/run_tests/run_tests.py index 38c06764b9b..9ed8ef33e1f 100755 --- a/tools/run_tests/run_tests.py +++ b/tools/run_tests/run_tests.py @@ -715,17 +715,21 @@ def _start_port_server(port_server_port): try: version = urllib2.urlopen('http://localhost:%d/version' % port_server_port, timeout=1).read() + print 'detected port server running' running = True except Exception: + print 'failed to detect port server: %s' % sys.exc_info()[0] running = False if running: with open('tools/run_tests/port_server.py') as f: current_version = hashlib.sha1(f.read()).hexdigest() running = (version == current_version) if not running: + print 'port_server version mismatch: killing the old one' urllib2.urlopen('http://localhost:%d/quit' % port_server_port).read() time.sleep(1) if not running: + print 'starting port_server' port_log = open('portlog.txt', 'w') port_server = subprocess.Popen( ['python', 'tools/run_tests/port_server.py', '-p', '%d' % port_server_port], @@ -737,7 +741,7 @@ def _start_port_server(port_server_port): if waits > 10: port_server.kill() if port_server.poll() is not None: - print "port_server failed to start" + print 'port_server failed to start' port_log = open('portlog.txt', 'r').read() print port_log sys.exit(1) @@ -746,11 +750,11 @@ def _start_port_server(port_server_port): timeout=1).read() break except socket.timeout: - print "waiting for port_server" + print 'waiting for port_server: timeout' time.sleep(0.5) waits += 1 except urllib2.URLError: - print "waiting for port_server" + print 'waiting for port_server: urlerror' time.sleep(0.5) waits += 1 except: From 1447ece09352c0c7a8fbeacad55214d2ff075b0d Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Mon, 5 Oct 2015 14:44:32 -0700 Subject: [PATCH 128/169] Use sys.executable instead of hard coding python binary string This is necessary to get the right binary on Windows --- tools/run_tests/run_tests.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/run_tests/run_tests.py b/tools/run_tests/run_tests.py index 6764586897a..e938520403d 100755 --- a/tools/run_tests/run_tests.py +++ b/tools/run_tests/run_tests.py @@ -732,7 +732,7 @@ def _start_port_server(port_server_port): print 'starting port_server' port_log = open('portlog.txt', 'w') port_server = subprocess.Popen( - ['python2.7', 'tools/run_tests/port_server.py', '-p', '%d' % port_server_port], + [sys.executable, 'tools/run_tests/port_server.py', '-p', '%d' % port_server_port], stderr=subprocess.STDOUT, stdout=port_log) # ensure port server is up From 7cd632c89ae9f2db2e25e4ece32e6103a5da63c3 Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Mon, 5 Oct 2015 15:56:18 -0700 Subject: [PATCH 129/169] Re-implemented call propagation tests to avoid race conditions --- src/node/test/surface_test.js | 263 +++++++++++++++++++++------------- 1 file changed, 165 insertions(+), 98 deletions(-) diff --git a/src/node/test/surface_test.js b/src/node/test/surface_test.js index 7af3ad895e2..989fe5fd659 100644 --- a/src/node/test/surface_test.js +++ b/src/node/test/surface_test.js @@ -690,120 +690,187 @@ describe('Other conditions', function() { }); }); }); - describe('Call propagation', function() { - var proxy; - var proxy_impl; - beforeEach(function() { - proxy = new grpc.Server(); - proxy_impl = { - unary: function(call) {}, - clientStream: function(stream) {}, - serverStream: function(stream) {}, - bidiStream: function(stream) {} - }; +}); +describe('Call propagation', function() { + var proxy; + var proxy_impl; + + var test_service; + var Client; + var client; + var server; + before(function() { + var test_proto = ProtoBuf.loadProtoFile(__dirname + '/test_service.proto'); + test_service = test_proto.lookup('TestService'); + server = new grpc.Server(); + server.addProtoService(test_service, { + unary: function(call) {}, + clientStream: function(stream) {}, + serverStream: function(stream) {}, + bidiStream: function(stream) {} }); - afterEach(function() { - console.log('Shutting down server'); - proxy.forceShutdown(); - }); - describe('Cancellation', function() { - it('With a client stream call', function(done) { - done = multiDone(done, 2); - proxy_impl.clientStream = function(parent, callback) { - client.clientStream(function(err, value) { - try { - assert(err); - assert.strictEqual(err.code, grpc.status.CANCELLED); - } finally { - callback(err, value); - done(); - } - }, null, {parent: parent}); - call.cancel(); - }; - proxy.addProtoService(test_service, proxy_impl); - var proxy_port = proxy.bind('localhost:0', server_insecure_creds); - proxy.start(); - var proxy_client = new Client('localhost:' + proxy_port, - grpc.Credentials.createInsecure()); - var call = proxy_client.clientStream(function(err, value) { - done(); - }); + var port = server.bind('localhost:0', server_insecure_creds); + Client = surface_client.makeProtobufClientConstructor(test_service); + client = new Client('localhost:' + port, grpc.Credentials.createInsecure()); + server.start(); + }); + after(function() { + server.forceShutdown(); + }); + beforeEach(function() { + proxy = new grpc.Server(); + proxy_impl = { + unary: function(call) {}, + clientStream: function(stream) {}, + serverStream: function(stream) {}, + bidiStream: function(stream) {} + }; + }); + afterEach(function() { + proxy.forceShutdown(); + }); + describe('Cancellation', function() { + it('With a unary call', function(done) { + done = multiDone(done, 2); + proxy_impl.unary = function(parent, callback) { + client.unary(parent.request, function(err, value) { + try { + assert(err); + assert.strictEqual(err.code, grpc.status.CANCELLED); + } finally { + callback(err, value); + done(); + } + }, null, {parent: parent}); + call.cancel(); + }; + proxy.addProtoService(test_service, proxy_impl); + var proxy_port = proxy.bind('localhost:0', server_insecure_creds); + proxy.start(); + var proxy_client = new Client('localhost:' + proxy_port, + grpc.Credentials.createInsecure()); + var call = proxy_client.unary({}, function(err, value) { + done(); }); - it('With a bidi stream call', function(done) { - done = multiDone(done, 2); - proxy_impl.bidiStream = function(parent) { - var child = client.bidiStream(null, {parent: parent}); - child.on('error', function(err) { + }); + it('With a client stream call', function(done) { + done = multiDone(done, 2); + proxy_impl.clientStream = function(parent, callback) { + client.clientStream(function(err, value) { + try { assert(err); assert.strictEqual(err.code, grpc.status.CANCELLED); + } finally { + callback(err, value); done(); - }); - call.cancel(); - }; - proxy.addProtoService(test_service, proxy_impl); - var proxy_port = proxy.bind('localhost:0', server_insecure_creds); - proxy.start(); - var proxy_client = new Client('localhost:' + proxy_port, - grpc.Credentials.createInsecure()); - var call = proxy_client.bidiStream(); - call.on('error', function(err) { + } + }, null, {parent: parent}); + call.cancel(); + }; + proxy.addProtoService(test_service, proxy_impl); + var proxy_port = proxy.bind('localhost:0', server_insecure_creds); + proxy.start(); + var proxy_client = new Client('localhost:' + proxy_port, + grpc.Credentials.createInsecure()); + var call = proxy_client.clientStream(function(err, value) { + done(); + }); + }); + it('With a server stream call', function(done) { + done = multiDone(done, 2); + proxy_impl.serverStream = function(parent) { + var child = client.serverStream(parent.request, null, + {parent: parent}); + child.on('error', function(err) { + assert(err); + assert.strictEqual(err.code, grpc.status.CANCELLED); done(); }); + call.cancel(); + }; + proxy.addProtoService(test_service, proxy_impl); + var proxy_port = proxy.bind('localhost:0', server_insecure_creds); + proxy.start(); + var proxy_client = new Client('localhost:' + proxy_port, + grpc.Credentials.createInsecure()); + var call = proxy_client.serverStream({}); + call.on('error', function(err) { + done(); }); }); - describe('Deadline', function() { - /* jshint bitwise:false */ - var deadline_flags = (grpc.propagate.DEFAULTS & - ~grpc.propagate.CANCELLATION); - it('With a client stream call', function(done) { - done = multiDone(done, 2); - proxy_impl.clientStream = function(parent, callback) { - client.clientStream(function(err, value) { - try { - assert(err); - assert(err.code === grpc.status.DEADLINE_EXCEEDED || - err.code === grpc.status.INTERNAL); - } finally { - callback(err, value); - done(); - } - }, null, {parent: parent, propagate_flags: deadline_flags}); - }; - proxy.addProtoService(test_service, proxy_impl); - var proxy_port = proxy.bind('localhost:0', server_insecure_creds); - proxy.start(); - var proxy_client = new Client('localhost:' + proxy_port, - grpc.Credentials.createInsecure()); - var deadline = new Date(); - deadline.setSeconds(deadline.getSeconds() + 1); - proxy_client.clientStream(function(err, value) { + it('With a bidi stream call', function(done) { + done = multiDone(done, 2); + proxy_impl.bidiStream = function(parent) { + var child = client.bidiStream(null, {parent: parent}); + child.on('error', function(err) { + assert(err); + assert.strictEqual(err.code, grpc.status.CANCELLED); done(); - }, null, {deadline: deadline}); - }); - it('With a bidi stream call', function(done) { - done = multiDone(done, 2); - proxy_impl.bidiStream = function(parent) { - var child = client.bidiStream( - null, {parent: parent, propagate_flags: deadline_flags}); - child.on('error', function(err) { + }); + call.cancel(); + }; + proxy.addProtoService(test_service, proxy_impl); + var proxy_port = proxy.bind('localhost:0', server_insecure_creds); + proxy.start(); + var proxy_client = new Client('localhost:' + proxy_port, + grpc.Credentials.createInsecure()); + var call = proxy_client.bidiStream(); + call.on('error', function(err) { + done(); + }); + }); + }); + describe('Deadline', function() { + /* jshint bitwise:false */ + var deadline_flags = (grpc.propagate.DEFAULTS & + ~grpc.propagate.CANCELLATION); + it('With a client stream call', function(done) { + done = multiDone(done, 2); + proxy_impl.clientStream = function(parent, callback) { + client.clientStream(function(err, value) { + try { assert(err); assert(err.code === grpc.status.DEADLINE_EXCEEDED || err.code === grpc.status.INTERNAL); + } finally { + callback(err, value); done(); - }); - }; - proxy.addProtoService(test_service, proxy_impl); - var proxy_port = proxy.bind('localhost:0', server_insecure_creds); - proxy.start(); - var proxy_client = new Client('localhost:' + proxy_port, - grpc.Credentials.createInsecure()); - var deadline = new Date(); - deadline.setSeconds(deadline.getSeconds() + 1); - var call = proxy_client.bidiStream(null, {deadline: deadline}); - call.on('error', function(err) { + } + }, null, {parent: parent, propagate_flags: deadline_flags}); + }; + proxy.addProtoService(test_service, proxy_impl); + var proxy_port = proxy.bind('localhost:0', server_insecure_creds); + proxy.start(); + var proxy_client = new Client('localhost:' + proxy_port, + grpc.Credentials.createInsecure()); + var deadline = new Date(); + deadline.setSeconds(deadline.getSeconds() + 1); + proxy_client.clientStream(function(err, value) { + done(); + }, null, {deadline: deadline}); + }); + it('With a bidi stream call', function(done) { + done = multiDone(done, 2); + proxy_impl.bidiStream = function(parent) { + var child = client.bidiStream( + null, {parent: parent, propagate_flags: deadline_flags}); + child.on('error', function(err) { + assert(err); + assert(err.code === grpc.status.DEADLINE_EXCEEDED || + err.code === grpc.status.INTERNAL); done(); }); + }; + proxy.addProtoService(test_service, proxy_impl); + var proxy_port = proxy.bind('localhost:0', server_insecure_creds); + proxy.start(); + var proxy_client = new Client('localhost:' + proxy_port, + grpc.Credentials.createInsecure()); + var deadline = new Date(); + deadline.setSeconds(deadline.getSeconds() + 1); + var call = proxy_client.bidiStream(null, {deadline: deadline}); + call.on('error', function(err) { + done(); }); }); }); From 9554534b5e649c30e6e6ef219eed25f954a9a03f Mon Sep 17 00:00:00 2001 From: Masood Malekghassemi Date: Mon, 5 Oct 2015 15:25:39 -0700 Subject: [PATCH 130/169] Clean up build_python.sh This is in preparation for the eventual refactoring of the run_tests.py system. --- tools/run_tests/build_python.sh | 62 ++++++++++++++++++++++++++------- 1 file changed, 49 insertions(+), 13 deletions(-) diff --git a/tools/run_tests/build_python.sh b/tools/run_tests/build_python.sh index 2efc2c714d0..eb386146754 100755 --- a/tools/run_tests/build_python.sh +++ b/tools/run_tests/build_python.sh @@ -39,6 +39,46 @@ GRPCIO=$ROOT/src/python/grpcio GRPCIO_TEST=$ROOT/src/python/grpcio_test GRPCIO_HEALTH_CHECKING=$ROOT/src/python/grpcio_health_checking +# +# Dependency steps. +# +install_grpcio_deps() { + cd $GRPCIO + pip install -r requirements.txt +} +install_grpcio_test_deps() { + cd $GRPCIO_TEST + pip install -r requirements.txt +} +# +# End dependency steps. +# + +# +# Install steps. Requires that the `pip` command is appropriate (i.e. that the +# virtual environment has been activated). +# +install_grpcio() { + CFLAGS="-I$ROOT/include -std=c89" LDFLAGS=-L$ROOT/libs/$CONFIG GRPC_PYTHON_BUILD_WITH_CYTHON=1 pip install $GRPCIO +} +install_grpcio_test() { + pip install $GRPCIO_TEST +} +install_grpcio_health_checking() { + pip install $GRPCIO_HEALTH_CHECKING +} +# +# End install steps. +# + +# Cleans the environment of previous installations +clean_grpcio_all() { + (yes | pip uninstall grpcio) || true + (yes | pip uninstall grpcio_test) || true + (yes | pip uninstall grpcio_health_checking) || true +} + +# Builds the testing environment. make_virtualenv() { virtualenv_name="python"$1"_virtual_environment" if [ ! -d $virtualenv_name ] @@ -48,33 +88,29 @@ make_virtualenv() { source $virtualenv_name/bin/activate # Install grpcio - cd $GRPCIO - pip install -r requirements.txt - CFLAGS="-I$ROOT/include -std=c89" LDFLAGS=-L$ROOT/libs/$CONFIG GRPC_PYTHON_BUILD_WITH_CYTHON=1 pip install $GRPCIO + install_grpcio_deps + install_grpcio # Install grpcio_test - cd $GRPCIO_TEST - pip install -r requirements.txt - pip install $GRPCIO_TEST + install_grpcio_test_deps + install_grpcio_test # Install grpcio_health_checking - pip install $GRPCIO_HEALTH_CHECKING + install_grpcio_health_checking else source $virtualenv_name/bin/activate # Uninstall and re-install the packages we care about. Don't use # --force-reinstall or --ignore-installed to avoid propagating this # unnecessarily to dependencies. Don't use --no-deps to avoid missing # dependency upgrades. - (yes | pip uninstall grpcio) || true - (yes | pip uninstall grpcio_test) || true - (yes | pip uninstall grpcio_health_checking) || true - (CFLAGS="-I$ROOT/include -std=c89" LDFLAGS=-L$ROOT/libs/$CONFIG GRPC_PYTHON_BUILD_WITH_CYTHON=1 pip install $GRPCIO) || ( + clean_grpcio_all + install_grpcio || ( # Fall back to rebuilding the entire environment rm -rf $virtualenv_name make_virtualenv $1 ) - pip install $GRPCIO_TEST - pip install $GRPCIO_HEALTH_CHECKING + install_grpcio_test + install_grpcio_health_checking fi } From 2b778d6971b48c5f322a6f0bce494978362ee23e Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Tue, 6 Oct 2015 09:03:36 -0700 Subject: [PATCH 131/169] copy service account key logic --- tools/jenkins/build_interop_image.sh | 14 +++++++++++--- tools/jenkins/grpc_interop_csharp/build_interop.sh | 3 +++ tools/jenkins/grpc_interop_cxx/build_interop.sh | 3 +++ tools/jenkins/grpc_interop_go/build_interop.sh | 3 +++ tools/jenkins/grpc_interop_java/build_interop.sh | 3 +++ tools/jenkins/grpc_interop_node/build_interop.sh | 3 +++ tools/jenkins/grpc_interop_php/build_interop.sh | 3 +++ tools/jenkins/grpc_interop_ruby/build_interop.sh | 3 +++ 8 files changed, 32 insertions(+), 3 deletions(-) diff --git a/tools/jenkins/build_interop_image.sh b/tools/jenkins/build_interop_image.sh index b5958588f2b..3664eed84d9 100755 --- a/tools/jenkins/build_interop_image.sh +++ b/tools/jenkins/build_interop_image.sh @@ -35,12 +35,12 @@ set -x cd `dirname $0`/../.. GRPC_ROOT=`pwd` -MOUNT_ARGS="-v $GRPC_ROOT:/var/local/jenkins/grpc" +MOUNT_ARGS="-v $GRPC_ROOT:/var/local/jenkins/grpc:ro" GRPC_JAVA_ROOT=`cd ../grpc-java && pwd` if [ "$GRPC_JAVA_ROOT" != "" ] then - MOUNT_ARGS+=" -v $GRPC_JAVA_ROOT:/var/local/jenkins/grpc-java" + MOUNT_ARGS+=" -v $GRPC_JAVA_ROOT:/var/local/jenkins/grpc-java:ro" else echo "WARNING: grpc-java not found, it won't be mounted to the docker container." fi @@ -48,7 +48,7 @@ fi GRPC_GO_ROOT=`cd ../grpc-go && pwd` if [ "$GRPC_GO_ROOT" != "" ] then - MOUNT_ARGS+=" -v $GRPC_GO_ROOT:/var/local/jenkins/grpc-go" + MOUNT_ARGS+=" -v $GRPC_GO_ROOT:/var/local/jenkins/grpc-go:ro" else echo "WARNING: grpc-go not found, it won't be mounted to the docker container." fi @@ -60,6 +60,14 @@ mkdir -p /tmp/ccache # BASE_NAME - base name used to locate the base Dockerfile and build script # TTY_FLAG - optional -t flag to make docker allocate tty. +# Mount service account dir if available. +# If service_directory does not contain the service account JSON file, +# some of the tests will fail. +if [ -e $HOME/service_account ] +then + MOUNT_ARGS+=" -v $HOME/service_account:/var/local/jenkins/service_account:ro" +fi + # Use image name based on Dockerfile checksum BASE_IMAGE=${BASE_NAME}_base:`sha1sum tools/jenkins/$BASE_NAME/Dockerfile | cut -f1 -d\ ` diff --git a/tools/jenkins/grpc_interop_csharp/build_interop.sh b/tools/jenkins/grpc_interop_csharp/build_interop.sh index e91cbed81ea..8fde687900a 100755 --- a/tools/jenkins/grpc_interop_csharp/build_interop.sh +++ b/tools/jenkins/grpc_interop_csharp/build_interop.sh @@ -34,6 +34,9 @@ set -e mkdir -p /var/local/git git clone --recursive /var/local/jenkins/grpc /var/local/git/grpc +# copy service account keys if available +cp -r /var/local/jenkins/service_account $HOME || true + cd /var/local/git/grpc make install-certs diff --git a/tools/jenkins/grpc_interop_cxx/build_interop.sh b/tools/jenkins/grpc_interop_cxx/build_interop.sh index 4163e11ecc7..1c0828d23a6 100755 --- a/tools/jenkins/grpc_interop_cxx/build_interop.sh +++ b/tools/jenkins/grpc_interop_cxx/build_interop.sh @@ -34,6 +34,9 @@ set -e mkdir -p /var/local/git git clone --recursive /var/local/jenkins/grpc /var/local/git/grpc +# copy service account keys if available +cp -r /var/local/jenkins/service_account $HOME || true + cd /var/local/git/grpc make install-certs diff --git a/tools/jenkins/grpc_interop_go/build_interop.sh b/tools/jenkins/grpc_interop_go/build_interop.sh index 78dd4ea9cf5..05fc6dfdfb6 100755 --- a/tools/jenkins/grpc_interop_go/build_interop.sh +++ b/tools/jenkins/grpc_interop_go/build_interop.sh @@ -36,6 +36,9 @@ set -e # to test instead of using "go get" to download from Github directly. git clone --recursive /var/local/jenkins/grpc-go src/gooogle.golang.org/grpc +# copy service account keys if available +cp -r /var/local/jenkins/service_account $HOME || true + # Get dependencies from GitHub # NOTE: once grpc-go dependencies change, this needs to be updated manually # but we don't expect this to happen any time soon. diff --git a/tools/jenkins/grpc_interop_java/build_interop.sh b/tools/jenkins/grpc_interop_java/build_interop.sh index 4ee2f44e3d5..9997c63308b 100755 --- a/tools/jenkins/grpc_interop_java/build_interop.sh +++ b/tools/jenkins/grpc_interop_java/build_interop.sh @@ -34,6 +34,9 @@ set -e mkdir -p /var/local/git git clone --recursive --depth 1 /var/local/jenkins/grpc-java /var/local/git/grpc-java +# copy service account keys if available +cp -r /var/local/jenkins/service_account $HOME || true + cd /var/local/git/grpc-java ./gradlew :grpc-interop-testing:installDist -PskipCodegen=true diff --git a/tools/jenkins/grpc_interop_node/build_interop.sh b/tools/jenkins/grpc_interop_node/build_interop.sh index 55e2a4081bc..84e25e33088 100755 --- a/tools/jenkins/grpc_interop_node/build_interop.sh +++ b/tools/jenkins/grpc_interop_node/build_interop.sh @@ -34,6 +34,9 @@ set -e mkdir -p /var/local/git git clone --recursive /var/local/jenkins/grpc /var/local/git/grpc +# copy service account keys if available +cp -r /var/local/jenkins/service_account $HOME || true + cd /var/local/git/grpc nvm use 0.12 nvm alias default 0.12 # prevent the need to run 'nvm use' in every shell diff --git a/tools/jenkins/grpc_interop_php/build_interop.sh b/tools/jenkins/grpc_interop_php/build_interop.sh index 745dea845d6..cd9d67804af 100755 --- a/tools/jenkins/grpc_interop_php/build_interop.sh +++ b/tools/jenkins/grpc_interop_php/build_interop.sh @@ -34,6 +34,9 @@ set -e mkdir -p /var/local/git git clone --recursive /var/local/jenkins/grpc /var/local/git/grpc +# copy service account keys if available +cp -r /var/local/jenkins/service_account $HOME || true + cd /var/local/git/grpc rvm --default use ruby-2.1 diff --git a/tools/jenkins/grpc_interop_ruby/build_interop.sh b/tools/jenkins/grpc_interop_ruby/build_interop.sh index 7d407e7d0a9..c5023f5c1d4 100755 --- a/tools/jenkins/grpc_interop_ruby/build_interop.sh +++ b/tools/jenkins/grpc_interop_ruby/build_interop.sh @@ -34,6 +34,9 @@ set -e mkdir -p /var/local/git git clone --recursive /var/local/jenkins/grpc /var/local/git/grpc +# copy service account keys if available +cp -r /var/local/jenkins/service_account $HOME || true + cd /var/local/git/grpc rvm --default use ruby-2.1 From 800dacb334c130395d8eda53cc148ff0ede0d8be Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Tue, 6 Oct 2015 09:10:26 -0700 Subject: [PATCH 132/169] Tag struct to ease casting in debugger --- src/core/channel/client_channel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/channel/client_channel.c b/src/core/channel/client_channel.c index b59b62a6aa7..8e7cb27cfd2 100644 --- a/src/core/channel/client_channel.c +++ b/src/core/channel/client_channel.c @@ -51,7 +51,7 @@ typedef struct call_data call_data; -typedef struct { +typedef struct client_channel_channel_data { /** metadata context for this channel */ grpc_mdctx *mdctx; /** resolver for this channel */ From 3ff551bf70e9cfbcc19aa4781b0c33719aa63538 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Tue, 6 Oct 2015 09:11:37 -0700 Subject: [PATCH 133/169] Add a simpler (but slower) path for closures for where it makes sense --- src/core/iomgr/closure.c | 24 ++++++++++++++++++++++++ src/core/iomgr/closure.h | 3 +++ 2 files changed, 27 insertions(+) diff --git a/src/core/iomgr/closure.c b/src/core/iomgr/closure.c index 32654257892..d91681990f2 100644 --- a/src/core/iomgr/closure.c +++ b/src/core/iomgr/closure.c @@ -33,6 +33,8 @@ #include "src/core/iomgr/closure.h" +#include + void grpc_closure_init(grpc_closure *closure, grpc_iomgr_cb_func cb, void *cb_arg) { closure->cb = cb; @@ -69,3 +71,25 @@ void grpc_closure_list_move(grpc_closure_list *src, grpc_closure_list *dst) { } src->head = src->tail = NULL; } + +typedef struct { + grpc_iomgr_cb_func cb; + void *cb_arg; + grpc_closure wrapper; +} wrapped_closure; + +static void closure_wrapper(grpc_exec_ctx *exec_ctx, void *arg, int success) { + wrapped_closure *wc = arg; + grpc_iomgr_cb_func cb = wc->cb; + void *cb_arg = wc->cb_arg; + gpr_free(wc); + cb(exec_ctx, cb_arg, success); +} + +grpc_closure *grpc_closure_create(grpc_iomgr_cb_func cb, void *cb_arg) { + wrapped_closure *wc = gpr_malloc(sizeof(*wc)); + wc->cb = cb; + wc->cb_arg = cb_arg; + grpc_closure_init(&wc->wrapper, closure_wrapper, wc); + return &wc->wrapper; +} diff --git a/src/core/iomgr/closure.h b/src/core/iomgr/closure.h index 982ffa4e1be..d812659af0c 100644 --- a/src/core/iomgr/closure.h +++ b/src/core/iomgr/closure.h @@ -77,6 +77,9 @@ struct grpc_closure { void grpc_closure_init(grpc_closure *closure, grpc_iomgr_cb_func cb, void *cb_arg); +/* Create a heap allocated closure: try to avoid except for very rare events */ +grpc_closure *grpc_closure_create(grpc_iomgr_cb_func cb, void *cb_arg); + #define GRPC_CLOSURE_LIST_INIT \ { NULL, NULL } From b09d84d7eb397e9c839f70322d995e60009f7bbe Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Tue, 6 Oct 2015 09:12:16 -0700 Subject: [PATCH 134/169] Discard unnecessary subchannels when they're no longer required --- .../client_config/lb_policies/pick_first.c | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/src/core/client_config/lb_policies/pick_first.c b/src/core/client_config/lb_policies/pick_first.c index 28155d0fbc0..18c8c0412f7 100644 --- a/src/core/client_config/lb_policies/pick_first.c +++ b/src/core/client_config/lb_policies/pick_first.c @@ -172,6 +172,37 @@ void pf_pick(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol, } } +static void destroy_subchannels(grpc_exec_ctx *exec_ctx, void *arg, + int iomgr_success) { + pick_first_lb_policy *p = arg; + size_t i; + grpc_transport_op op; + size_t num_subchannels = p->num_subchannels; + grpc_subchannel **subchannels; + grpc_subchannel *exclude_subchannel; + + gpr_mu_lock(&p->mu); + subchannels = p->subchannels; + exclude_subchannel = p->selected; + p->num_subchannels = 0; + p->subchannels = NULL; + gpr_mu_unlock(&p->mu); + GRPC_LB_POLICY_UNREF(exec_ctx, &p->base, "destroy_subchannels"); + + for (i = 0; i < num_subchannels; i++) { + if (subchannels[i] == exclude_subchannel) { + exclude_subchannel = NULL; + continue; + } + memset(&op, 0, sizeof(op)); + op.disconnect = 1; + grpc_subchannel_process_transport_op(exec_ctx, subchannels[i], &op); + GRPC_SUBCHANNEL_UNREF(exec_ctx, subchannels[i], "pick_first"); + } + + gpr_free(subchannels); +} + static void pf_connectivity_changed(grpc_exec_ctx *exec_ctx, void *arg, int iomgr_success) { pick_first_lb_policy *p = arg; @@ -200,6 +231,10 @@ static void pf_connectivity_changed(grpc_exec_ctx *exec_ctx, void *arg, grpc_connectivity_state_set(exec_ctx, &p->state_tracker, GRPC_CHANNEL_READY, "connecting_ready"); p->selected = p->subchannels[p->checking_subchannel]; + /* drop the pick list: we are connected now */ + GRPC_LB_POLICY_REF(&p->base, "destroy_subchannels"); + grpc_exec_ctx_enqueue(exec_ctx, grpc_closure_create(destroy_subchannels, p), 1); + /* update any calls that were waiting for a pick */ while ((pp = p->pending_picks)) { p->pending_picks = pp->next; *pp->target = p->selected; From faf8f684b1d2bd453a9bfc42a626795e39836c7f Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Tue, 6 Oct 2015 09:12:34 -0700 Subject: [PATCH 135/169] Close incoming connections if we are post shutdown --- src/core/iomgr/tcp_server_windows.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/core/iomgr/tcp_server_windows.c b/src/core/iomgr/tcp_server_windows.c index db3319b3c6c..3fea8b5b350 100644 --- a/src/core/iomgr/tcp_server_windows.c +++ b/src/core/iomgr/tcp_server_windows.c @@ -336,6 +336,8 @@ static void on_accept(grpc_exec_ctx *exec_ctx, void *arg, int from_iocp) { peer_name_string); gpr_free(fd_name); gpr_free(peer_name_string); + } else { + closesocket(sock); } } From 89a768e2b14adc35bddda2de2aa367286f1a7100 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Tue, 6 Oct 2015 09:55:59 -0700 Subject: [PATCH 136/169] Fix memory leaks --- .../client_config/lb_policies/pick_first.c | 26 ++++++++++++++----- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/src/core/client_config/lb_policies/pick_first.c b/src/core/client_config/lb_policies/pick_first.c index 18c8c0412f7..4b3aaab09cc 100644 --- a/src/core/client_config/lb_policies/pick_first.c +++ b/src/core/client_config/lb_policies/pick_first.c @@ -101,6 +101,9 @@ void pf_destroy(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol) { for (i = 0; i < p->num_subchannels; i++) { GRPC_SUBCHANNEL_UNREF(exec_ctx, p->subchannels[i], "pick_first"); } + if (p->selected) { + GRPC_SUBCHANNEL_UNREF(exec_ctx, p->selected, "picked_first"); + } grpc_connectivity_state_destroy(exec_ctx, &p->state_tracker); gpr_free(p->subchannels); gpr_mu_destroy(&p->mu); @@ -183,20 +186,18 @@ static void destroy_subchannels(grpc_exec_ctx *exec_ctx, void *arg, gpr_mu_lock(&p->mu); subchannels = p->subchannels; - exclude_subchannel = p->selected; p->num_subchannels = 0; p->subchannels = NULL; + exclude_subchannel = p->selected; gpr_mu_unlock(&p->mu); GRPC_LB_POLICY_UNREF(exec_ctx, &p->base, "destroy_subchannels"); for (i = 0; i < num_subchannels; i++) { - if (subchannels[i] == exclude_subchannel) { - exclude_subchannel = NULL; - continue; + if (subchannels[i] != exclude_subchannel) { + memset(&op, 0, sizeof(op)); + op.disconnect = 1; + grpc_subchannel_process_transport_op(exec_ctx, subchannels[i], &op); } - memset(&op, 0, sizeof(op)); - op.disconnect = 1; - grpc_subchannel_process_transport_op(exec_ctx, subchannels[i], &op); GRPC_SUBCHANNEL_UNREF(exec_ctx, subchannels[i], "pick_first"); } @@ -231,6 +232,7 @@ static void pf_connectivity_changed(grpc_exec_ctx *exec_ctx, void *arg, grpc_connectivity_state_set(exec_ctx, &p->state_tracker, GRPC_CHANNEL_READY, "connecting_ready"); p->selected = p->subchannels[p->checking_subchannel]; + GRPC_SUBCHANNEL_REF(p->selected, "picked_first"); /* drop the pick list: we are connected now */ GRPC_LB_POLICY_REF(&p->base, "destroy_subchannels"); grpc_exec_ctx_enqueue(exec_ctx, grpc_closure_create(destroy_subchannels, p), 1); @@ -314,10 +316,15 @@ static void pf_broadcast(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol, size_t i; size_t n; grpc_subchannel **subchannels; + grpc_subchannel *selected; gpr_mu_lock(&p->mu); n = p->num_subchannels; subchannels = gpr_malloc(n * sizeof(*subchannels)); + selected = p->selected; + if (selected) { + GRPC_SUBCHANNEL_REF(selected, "pf_broadcast_to_selected"); + } for (i = 0; i < n; i++) { subchannels[i] = p->subchannels[i]; GRPC_SUBCHANNEL_REF(subchannels[i], "pf_broadcast"); @@ -325,9 +332,14 @@ static void pf_broadcast(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol, gpr_mu_unlock(&p->mu); for (i = 0; i < n; i++) { + if (selected == subchannels[i]) continue; grpc_subchannel_process_transport_op(exec_ctx, subchannels[i], op); GRPC_SUBCHANNEL_UNREF(exec_ctx, subchannels[i], "pf_broadcast"); } + if (p->selected) { + grpc_subchannel_process_transport_op(exec_ctx, selected, op); + GRPC_SUBCHANNEL_UNREF(exec_ctx, selected, "pf_broadcast_to_selected"); + } gpr_free(subchannels); } From 42a2c4e6b429c53d0f423cefc09ffeb5b7eedfad Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Tue, 6 Oct 2015 10:45:52 -0700 Subject: [PATCH 137/169] Removed a bunch of Node files I don't need or use --- src/node/bin/README.md | 16 -- src/node/bin/service_packager | 2 - src/node/cli/service_packager.js | 142 ------------------ src/node/cli/service_packager/index.js | 36 ----- .../service_packager/package.json.template | 17 --- src/node/examples/stock.proto | 62 -------- src/node/examples/stock_client.js | 47 ------ src/node/examples/stock_server.js | 87 ----------- .../{examples => performance}/perf_test.js | 0 .../{examples => performance}/qps_test.js | 0 10 files changed, 409 deletions(-) delete mode 100644 src/node/bin/README.md delete mode 100755 src/node/bin/service_packager delete mode 100644 src/node/cli/service_packager.js delete mode 100644 src/node/cli/service_packager/index.js delete mode 100644 src/node/cli/service_packager/package.json.template delete mode 100644 src/node/examples/stock.proto delete mode 100644 src/node/examples/stock_client.js delete mode 100644 src/node/examples/stock_server.js rename src/node/{examples => performance}/perf_test.js (100%) rename src/node/{examples => performance}/qps_test.js (100%) diff --git a/src/node/bin/README.md b/src/node/bin/README.md deleted file mode 100644 index 2f856e428ef..00000000000 --- a/src/node/bin/README.md +++ /dev/null @@ -1,16 +0,0 @@ -# Command Line Tools - -# Service Packager - -The command line tool `bin/service_packager`, when called with the following command line: - -```bash -service_packager proto_file -o output_path -n name -v version [-i input_path...] -``` - -Populates `output_path` with a node package consisting of a `package.json` populated with `name` and `version`, an `index.js`, a `LICENSE` file copied from gRPC, and a `service.json`, which is compiled from `proto_file` and the given `input_path`s. `require('output_path')` returns an object that is equivalent to - -```js -{ client: require('grpc').load('service.json'), - auth: require('google-auth-library') } -``` diff --git a/src/node/bin/service_packager b/src/node/bin/service_packager deleted file mode 100755 index c7f24609977..00000000000 --- a/src/node/bin/service_packager +++ /dev/null @@ -1,2 +0,0 @@ -#!/usr/bin/env node -require(__dirname+'/../cli/service_packager.js').main(process.argv.slice(2)); \ No newline at end of file diff --git a/src/node/cli/service_packager.js b/src/node/cli/service_packager.js deleted file mode 100644 index c92c450a01e..00000000000 --- a/src/node/cli/service_packager.js +++ /dev/null @@ -1,142 +0,0 @@ -/* - * - * Copyright 2015, Google Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -'use strict'; - -var fs = require('fs'); -var path = require('path'); - -var _ = require('lodash'); -var async = require('async'); -var pbjs = require('protobufjs/cli/pbjs'); -var parseArgs = require('minimist'); -var Mustache = require('mustache'); - -var package_json = require('../package.json'); - -var template_path = path.resolve(__dirname, 'service_packager'); - -var package_tpl_path = path.join(template_path, 'package.json.template'); - -var arg_format = { - string: ['include', 'out', 'name', 'version'], - alias: { - include: 'i', - out: 'o', - name: 'n', - version: 'v' - } -}; - -// TODO(mlumish): autogenerate README.md from proto file - -/** - * Render package.json file from template using provided parameters. - * @param {Object} params Map of parameter names to values - * @param {function(Error, string)} callback Callback to pass rendered template - * text to - */ -function generatePackage(params, callback) { - fs.readFile(package_tpl_path, {encoding: 'utf-8'}, function(err, template) { - if (err) { - callback(err); - } else { - var rendered = Mustache.render(template, params); - callback(null, rendered); - } - }); -} - -/** - * Copy a file - * @param {string} src_path The filepath to copy from - * @param {string} dest_path The filepath to copy to - */ -function copyFile(src_path, dest_path) { - fs.createReadStream(src_path).pipe(fs.createWriteStream(dest_path)); -} - -/** - * Run the script. Copies the index.js and LICENSE files to the output path, - * renders the package.json template to the output path, and generates a - * service.json file from the input proto files using pbjs. The arguments are - * taken directly from the command line, and handled as follows: - * -i (--include) : An include path for pbjs (can be dpulicated) - * -o (--output): The output path - * -n (--name): The name of the package - * -v (--version): The package version - * @param {Array} argv The argument vector - */ -function main(argv) { - var args = parseArgs(argv, arg_format); - var out_path = path.resolve(args.out); - var include_dirs = []; - if (args.include) { - include_dirs = _.map(_.flatten([args.include]), function(p) { - return path.resolve(p); - }); - } - args.grpc_version = package_json.version; - generatePackage(args, function(err, rendered) { - if (err) throw err; - fs.writeFile(path.join(out_path, 'package.json'), rendered, function(err) { - if (err) throw err; - }); - }); - copyFile(path.join(template_path, 'index.js'), - path.join(out_path, 'index.js')); - copyFile(path.join(__dirname, '..', 'LICENSE'), - path.join(out_path, 'LICENSE')); - - var service_stream = fs.createWriteStream(path.join(out_path, - 'service.json')); - var pbjs_args = _.flatten(['node', 'pbjs', - args._[0], - '-legacy', - _.map(include_dirs, function(dir) { - return "-path=" + dir; - })]); - var old_stdout = process.stdout; - process.__defineGetter__('stdout', function() { - return service_stream; - }); - var pbjs_status = pbjs.main(pbjs_args); - process.__defineGetter__('stdout', function() { - return old_stdout; - }); - if (pbjs_status !== pbjs.STATUS_OK) { - throw new Error('pbjs failed with status code ' + pbjs_status); - } -} - -exports.main = main; diff --git a/src/node/cli/service_packager/index.js b/src/node/cli/service_packager/index.js deleted file mode 100644 index 811e08b89ac..00000000000 --- a/src/node/cli/service_packager/index.js +++ /dev/null @@ -1,36 +0,0 @@ -/* - * - * Copyright 2015, Google Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -var grpc = require('grpc'); -exports.client = grpc.load(__dirname + '/service.json', 'json'); -exports.auth = require('google-auth-library'); diff --git a/src/node/cli/service_packager/package.json.template b/src/node/cli/service_packager/package.json.template deleted file mode 100644 index 9f9019172e0..00000000000 --- a/src/node/cli/service_packager/package.json.template +++ /dev/null @@ -1,17 +0,0 @@ -{ - "name": "{{{name}}}", - "version": "{{{version}}}", - "author": "Google Inc.", - "description": "Client library for {{{name}}} built on gRPC", - "license": "Apache-2.0", - "dependencies": { - "grpc": "{{{grpc_version}}}", - "google-auth-library": "^0.9.2" - }, - "main": "index.js", - "files": [ - "LICENSE", - "index.js", - "service.json" - ] -} diff --git a/src/node/examples/stock.proto b/src/node/examples/stock.proto deleted file mode 100644 index 5ee2bcbce66..00000000000 --- a/src/node/examples/stock.proto +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright 2015, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -syntax = "proto3"; - -package examples; - -// Protocol type definitions -message StockRequest { - string symbol = 1; - int32 num_trades_to_watch = 2; -} - -message StockReply { - float price = 1; - string symbol = 2; -} - - -// Interface exported by the server -service Stock { - // Simple blocking RPC - rpc GetLastTradePrice(StockRequest) returns (StockReply) { - } - // Bidirectional streaming RPC - rpc GetLastTradePriceMultiple(stream StockRequest) returns - (stream StockReply) { - } - // Unidirectional server-to-client streaming RPC - rpc WatchFutureTrades(StockRequest) returns (stream StockReply) { - } - // Unidirectional client-to-server streaming RPC - rpc GetHighestTradePrice(stream StockRequest) returns (StockReply) { - } - -} diff --git a/src/node/examples/stock_client.js b/src/node/examples/stock_client.js deleted file mode 100644 index ab9b050e9b1..00000000000 --- a/src/node/examples/stock_client.js +++ /dev/null @@ -1,47 +0,0 @@ -/* - * - * Copyright 2015, Google Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -var grpc = require('..'); -var examples = grpc.load(__dirname + '/stock.proto').examples; - -/** - * This exports a client constructor for the Stock service. The usage looks like - * - * var StockClient = require('stock_client.js'); - * var stockClient = new StockClient(server_address, - * grpc.Credentials.createInsecure()); - * stockClient.getLastTradePrice({symbol: 'GOOG'}, function(error, response) { - * console.log(error || response); - * }); - */ -module.exports = examples.Stock; diff --git a/src/node/examples/stock_server.js b/src/node/examples/stock_server.js deleted file mode 100644 index 12e54795845..00000000000 --- a/src/node/examples/stock_server.js +++ /dev/null @@ -1,87 +0,0 @@ -/* - * - * Copyright 2015, Google Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -'use strict'; - -var _ = require('lodash'); -var grpc = require('..'); -var examples = grpc.load(__dirname + '/stock.proto').examples; - -function getLastTradePrice(call, callback) { - callback(null, {symbol: call.request.symbol, price: 88}); -} - -function watchFutureTrades(call) { - for (var i = 0; i < call.request.num_trades_to_watch; i++) { - call.write({price: 88.00 + i * 10.00}); - } - call.end(); -} - -function getHighestTradePrice(call, callback) { - var trades = []; - call.on('data', function(data) { - trades.push({symbol: data.symbol, price: _.random(0, 100)}); - }); - call.on('end', function() { - if(_.isEmpty(trades)) { - callback(null, {}); - } else { - callback(null, _.max(trades, function(trade){return trade.price;})); - } - }); -} - -function getLastTradePriceMultiple(call) { - call.on('data', function(data) { - call.write({price: 88}); - }); - call.on('end', function() { - call.end(); - }); -} - -var stockServer = new grpc.Server(); -stockServer.addProtoService(examples.Stock.service, { - getLastTradePrice: getLastTradePrice, - getLastTradePriceMultiple: getLastTradePriceMultiple, - watchFutureTrades: watchFutureTrades, - getHighestTradePrice: getHighestTradePrice -}); - -if (require.main === module) { - stockServer.bind('0.0.0.0:50051', grpc.ServerCredentials.createInsecure()); - stockServer.start(); -} - -module.exports = stockServer; diff --git a/src/node/examples/perf_test.js b/src/node/performance/perf_test.js similarity index 100% rename from src/node/examples/perf_test.js rename to src/node/performance/perf_test.js diff --git a/src/node/examples/qps_test.js b/src/node/performance/qps_test.js similarity index 100% rename from src/node/examples/qps_test.js rename to src/node/performance/qps_test.js From 0f93e435a1cf4ab16076de32278839fcc51efcb9 Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Tue, 6 Oct 2015 10:49:12 -0700 Subject: [PATCH 138/169] Moved math proto and server to test folder --- src/node/{examples => test/math}/math.proto | 0 src/node/{examples => test/math}/math_server.js | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename src/node/{examples => test/math}/math.proto (100%) rename src/node/{examples => test/math}/math_server.js (100%) diff --git a/src/node/examples/math.proto b/src/node/test/math/math.proto similarity index 100% rename from src/node/examples/math.proto rename to src/node/test/math/math.proto diff --git a/src/node/examples/math_server.js b/src/node/test/math/math_server.js similarity index 100% rename from src/node/examples/math_server.js rename to src/node/test/math/math_server.js From 2c641c65e4ede79b9291d7569d53dc68b719d243 Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Tue, 6 Oct 2015 10:51:18 -0700 Subject: [PATCH 139/169] Fixed up Node tests after math folder move --- src/node/test/async_test.js | 4 ++-- src/node/test/math/math_server.js | 2 +- src/node/test/math_client_test.js | 4 ++-- src/node/test/surface_test.js | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/node/test/async_test.js b/src/node/test/async_test.js index e81de62bc93..ce3ce50a2d6 100644 --- a/src/node/test/async_test.js +++ b/src/node/test/async_test.js @@ -36,7 +36,7 @@ var assert = require('assert'); var grpc = require('..'); -var math = grpc.load(__dirname + '/../examples/math.proto').math; +var math = grpc.load(__dirname + '/math/math.proto').math; /** @@ -47,7 +47,7 @@ var math_client; /** * Server to test against */ -var getServer = require('../examples/math_server.js'); +var getServer = require('./math/math_server.js'); var server = getServer(); diff --git a/src/node/test/math/math_server.js b/src/node/test/math/math_server.js index a4b237aeebf..9d06596f3d3 100644 --- a/src/node/test/math/math_server.js +++ b/src/node/test/math/math_server.js @@ -33,7 +33,7 @@ 'use strict'; -var grpc = require('..'); +var grpc = require('../..'); var math = grpc.load(__dirname + '/math.proto').math; /** diff --git a/src/node/test/math_client_test.js b/src/node/test/math_client_test.js index 6a6607ec748..be1d1182be4 100644 --- a/src/node/test/math_client_test.js +++ b/src/node/test/math_client_test.js @@ -36,7 +36,7 @@ var assert = require('assert'); var grpc = require('..'); -var math = grpc.load(__dirname + '/../examples/math.proto').math; +var math = grpc.load(__dirname + '/math/math.proto').math; /** * Client to use to make requests to a running server. @@ -46,7 +46,7 @@ var math_client; /** * Server to test against */ -var getServer = require('../examples/math_server.js'); +var getServer = require('./math/math_server.js'); var server = getServer(); diff --git a/src/node/test/surface_test.js b/src/node/test/surface_test.js index 989fe5fd659..85f399c448e 100644 --- a/src/node/test/surface_test.js +++ b/src/node/test/surface_test.js @@ -41,7 +41,7 @@ var ProtoBuf = require('protobufjs'); var grpc = require('..'); -var math_proto = ProtoBuf.loadProtoFile(__dirname + '/../examples/math.proto'); +var math_proto = ProtoBuf.loadProtoFile(__dirname + '/math/math.proto'); var mathService = math_proto.lookup('math.Math'); From 54030dd67f2b67d02d0d894f90eb54c1f5b53358 Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Tue, 6 Oct 2015 10:57:22 -0700 Subject: [PATCH 140/169] Don't package tests in Node package --- src/node/package.json | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/node/package.json b/src/node/package.json index 0aeca5f659a..0faca7ddf16 100644 --- a/src/node/package.json +++ b/src/node/package.json @@ -39,8 +39,7 @@ "jshint": "^2.5.0", "minimist": "^1.1.0", "mocha": "~1.21.0", - "mustache": "^2.0.0", - "strftime": "^0.8.2" + "mustache": "^2.0.0" }, "engines": { "node": ">=0.10.13" @@ -50,14 +49,9 @@ "README.md", "index.js", "binding.gyp", - "bin", - "cli", - "examples", "ext", "health_check", - "interop", - "src", - "test" + "src" ], "main": "index.js", "license": "BSD-3-Clause" From 35284f0c8442ae31dc9057583d2064c5257fae4f Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Tue, 6 Oct 2015 11:05:05 -0700 Subject: [PATCH 141/169] Simplified comments --- src/core/surface/call.c | 15 ++++++--------- src/core/transport/chttp2/bin_encoder.c | 10 ++++------ tools/codegen/core/gen_hpack_tables.c | 10 ++++------ .../codegen/core/gen_legal_metadata_characters.c | 5 ++--- 4 files changed, 16 insertions(+), 24 deletions(-) diff --git a/src/core/surface/call.c b/src/core/surface/call.c index ad022f43b1a..6b0395ab002 100644 --- a/src/core/surface/call.c +++ b/src/core/surface/call.c @@ -427,9 +427,8 @@ static grpc_cq_completion *allocate_completion(grpc_call *call) { } /* NB: the following integer arithmetic operation needs to be in its * expanded form due to the "integral promotion" performed (see section - * 3.2.1.1 of the C89 draft standard), which in this case upcasts the result - * of the bitwise OR to "unsigned". A cast to the smaller container type is - * then required to avoid the compiler warning */ + * 3.2.1.1 of the C89 draft standard). A cast to the smaller container type + * is then required to avoid the compiler warning */ call->allocated_completions = (gpr_uint8)(call->allocated_completions | (1u << i)); gpr_mu_unlock(&call->completion_mu); @@ -744,9 +743,8 @@ static void finish_live_ioreq_op(grpc_call *call, grpc_ioreq_op op, master = &call->masters[master_set]; /* NB: the following integer arithmetic operation needs to be in its * expanded form due to the "integral promotion" performed (see section - * 3.2.1.1 of the C89 draft standard), which in this case upcasts the result - * of the bitwise OR to "unsigned". A cast to the smaller container type is - * then required to avoid the compiler warning */ + * 3.2.1.1 of the C89 draft standard). A cast to the smaller container type + * is then required to avoid the compiler warning */ master->complete_mask = (gpr_uint16)(master->complete_mask | (1u << op)); if (!success) { master->success = 0; @@ -1259,9 +1257,8 @@ static grpc_call_error start_ioreq(grpc_call *call, const grpc_ioreq *reqs, } /* NB: the following integer arithmetic operation needs to be in its * expanded form due to the "integral promotion" performed (see section - * 3.2.1.1 of the C89 draft standard), which in this case upcasts the result - * of the bitwise OR to "unsigned". A cast to the smaller container type is - * then required to avoid the compiler warning */ + * 3.2.1.1 of the C89 draft standard). A cast to the smaller container type + * is then required to avoid the compiler warning */ have_ops = (gpr_uint16)(have_ops | (1u << op)); call->request_data[op] = data; diff --git a/src/core/transport/chttp2/bin_encoder.c b/src/core/transport/chttp2/bin_encoder.c index 5266f3ebf77..9c9070ede4f 100644 --- a/src/core/transport/chttp2/bin_encoder.c +++ b/src/core/transport/chttp2/bin_encoder.c @@ -187,9 +187,8 @@ gpr_slice grpc_chttp2_huffman_compress(gpr_slice input) { if (temp_length) { /* NB: the following integer arithmetic operation needs to be in its * expanded form due to the "integral promotion" performed (see section - * 3.2.1.1 of the C89 draft standard), which in this case upcasts the result - * of the bitwise OR to "unsigned". A cast to the smaller container type is - * then required to avoid the compiler warning */ + * 3.2.1.1 of the C89 draft standard). A cast to the smaller container type + * is then required to avoid the compiler warning */ *out++ = (gpr_uint8)((gpr_uint8)(temp << (8u - temp_length)) | (gpr_uint8)(0xffu >> temp_length)); } @@ -272,9 +271,8 @@ gpr_slice grpc_chttp2_base64_encode_and_huffman_compress(gpr_slice input) { if (out.temp_length) { /* NB: the following integer arithmetic operation needs to be in its * expanded form due to the "integral promotion" performed (see section - * 3.2.1.1 of the C89 draft standard), which in this case upcasts the result - * of the bitwise OR to "unsigned". A cast to the smaller container type is - * then required to avoid the compiler warning */ + * 3.2.1.1 of the C89 draft standard). A cast to the smaller container type + * is then required to avoid the compiler warning */ *out.out++ = (gpr_uint8)((gpr_uint8)(out.temp << (8u - out.temp_length)) | (gpr_uint8)(0xffu >> out.temp_length)); } diff --git a/tools/codegen/core/gen_hpack_tables.c b/tools/codegen/core/gen_hpack_tables.c index 48398bebd53..bae4e4cd734 100644 --- a/tools/codegen/core/gen_hpack_tables.c +++ b/tools/codegen/core/gen_hpack_tables.c @@ -73,9 +73,8 @@ static unsigned char prefix_mask(unsigned char prefix_len) { for (i = 0; i < prefix_len; i++) { /* NB: the following integer arithmetic operation needs to be in its * expanded form due to the "integral promotion" performed (see section - * 3.2.1.1 of the C89 draft standard), which in this case upcasts the result - * of the bitwise OR to "unsigned". A cast to the smaller container type is - * then required to avoid the compiler warning */ + * 3.2.1.1 of the C89 draft standard). A cast to the smaller container type + * is then required to avoid the compiler warning */ out = (unsigned char)(out | (unsigned char)(1 << (7 - i))); } return out; @@ -99,9 +98,8 @@ static void generate_first_byte_lut(void) { if ((prefix_mask(fields[j].prefix_length) & i) == fields[j].prefix) { /* NB: the following integer arithmetic operation needs to be in its * expanded form due to the "integral promotion" performed (see section - * 3.2.1.1 of the C89 draft standard), which in this case upcasts the - * result of the bitwise AND to "unsigned". A cast to the smaller - * container type is then required to avoid the compiler warning */ + * 3.2.1.1 of the C89 draft standard). A cast to the smaller container + * type is then required to avoid the compiler warning */ suffix = (unsigned char)(suffix_mask(fields[j].prefix_length) & (unsigned char)i); if (suffix == suffix_mask(fields[j].prefix_length)) { diff --git a/tools/codegen/core/gen_legal_metadata_characters.c b/tools/codegen/core/gen_legal_metadata_characters.c index 37189165771..677fa5c1556 100644 --- a/tools/codegen/core/gen_legal_metadata_characters.c +++ b/tools/codegen/core/gen_legal_metadata_characters.c @@ -43,9 +43,8 @@ static void legal(int x) { int bit = x % 8; /* NB: the following integer arithmetic operation needs to be in its * expanded form due to the "integral promotion" performed (see section - * 3.2.1.1 of the C89 draft standard), which in this case upcasts the result - * of the bitwise OR to "unsigned". A cast to the smaller container type is - * then required to avoid the compiler warning */ + * 3.2.1.1 of the C89 draft standard). A cast to the smaller container type + * is then required to avoid the compiler warning */ legal_bits[byte] = (unsigned char)((legal_bits[byte] | (unsigned char)(1 << bit))); } From fb8c77d477aaa0f4944e30ac591c440c1ef009cc Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Tue, 6 Oct 2015 09:33:37 -0700 Subject: [PATCH 142/169] add auth interop tests --- tools/run_tests/run_interop_tests.py | 62 ++++++++++++++++++++++++---- 1 file changed, 55 insertions(+), 7 deletions(-) diff --git a/tools/run_tests/run_interop_tests.py b/tools/run_tests/run_interop_tests.py index f0935fb5d61..e20d11c0cfd 100755 --- a/tools/run_tests/run_interop_tests.py +++ b/tools/run_tests/run_interop_tests.py @@ -82,7 +82,7 @@ class CXXLanguage: ['--use_tls=true']) def cloud_to_prod_env(self): - return None + return {} def server_args(self): return ['bins/opt/interop_server', '--use_tls=true'] @@ -132,7 +132,7 @@ class JavaLanguage: ['--use_tls=true', '--use_test_ca=true']) def cloud_to_prod_env(self): - return None + return {} def server_args(self): return ['./run-test-server.sh', '--use_tls=true'] @@ -158,7 +158,7 @@ class GoLanguage: ['--use_tls=true']) def cloud_to_prod_env(self): - return None + return {} def server_args(self): return ['go', 'run', 'server.go', '--use_tls=true'] @@ -260,6 +260,9 @@ _TEST_CASES = ['large_unary', 'empty_unary', 'ping_pong', 'client_streaming', 'server_streaming', 'cancel_after_begin', 'cancel_after_first_response'] +_AUTH_TEST_CASES = ['compute_engine_creds', 'jwt_token_creds', + 'oauth2_auth_token', 'per_rpc_creds'] + def docker_run_cmdline(cmdline, image, docker_args=[], cwd=None, environ=None): """Wraps given cmdline array to create 'docker run' cmdline from it.""" @@ -288,22 +291,54 @@ def bash_login_cmdline(cmdline): return ['bash', '-l', '-c', ' '.join(cmdline)] -def cloud_to_prod_jobspec(language, test_case, docker_image=None): +def add_auth_options(language, test_case, cmdline, env): + """Returns (cmdline, env) tuple with cloud_to_prod_auth test options.""" + + language = str(language) + cmdline = list(cmdline) + env = env.copy() + + # TODO(jtattermusch): this file path only works inside docker + key_filepath = '/root/service_account/stubbyCloudTestingTest-ee3fce360ac5.json' + oauth_scope_arg = '--oauth_scope=https://www.googleapis.com/auth/xapi.zoo' + key_file_arg = '--service_account_key_file=%s' % key_filepath + default_account_arg = '--default_service_account=830293263384-compute@developer.gserviceaccount.com' + + if test_case in ['jwt_token_creds', 'per_rpc_creds', 'oauth2_auth_token']: + if language in ['csharp', 'node', 'php', 'ruby']: + env['GOOGLE_APPLICATION_CREDENTIALS'] = key_filepath + else: + cmdline += [key_file_arg] + + if test_case in ['per_rpc_creds', 'oauth2_auth_token']: + cmdline += [oauth_scope_arg] + + if test_case == 'compute_engine_creds': + cmdline += [oauth_scope_arg, default_account_arg] + + return (cmdline, env) + + +def cloud_to_prod_jobspec(language, test_case, docker_image=None, auth=False): """Creates jobspec for cloud-to-prod interop test""" - cmdline = bash_login_cmdline(language.cloud_to_prod_args() + - ['--test_case=%s' % test_case]) + cmdline = language.cloud_to_prod_args() + ['--test_case=%s' % test_case] cwd = language.client_cwd environ = language.cloud_to_prod_env() + if auth: + cmdline, environ = add_auth_options(language, test_case, cmdline, environ) + cmdline = bash_login_cmdline(cmdline) + if docker_image: cmdline = docker_run_cmdline(cmdline, image=docker_image, cwd=cwd, environ=environ) cwd = None environ = None + suite_name='cloud_to_prod_auth' if auth else 'cloud_to_prod' test_job = jobset.JobSpec( cmdline=cmdline, cwd=cwd, environ=environ, - shortname="cloud_to_prod:%s:%s" % (language, test_case), + shortname="%s:%s:%s" % (suite_name, language, test_case), timeout_seconds=2*60, flake_retries=5 if args.allow_flakes else 0, timeout_retries=2 if args.allow_flakes else 0) @@ -382,6 +417,11 @@ argp.add_argument('--cloud_to_prod', action='store_const', const=True, help='Run cloud_to_prod tests.') +argp.add_argument('--cloud_to_prod_auth', + default=False, + action='store_const', + const=True, + help='Run cloud_to_prod_auth tests.') argp.add_argument('-s', '--server', choices=['all'] + sorted(_SERVERS), action='append', @@ -476,6 +516,14 @@ try: docker_image=docker_images.get(str(language))) jobs.append(test_job) + if args.cloud_to_prod_auth: + for language in languages: + for test_case in _AUTH_TEST_CASES: + test_job = cloud_to_prod_jobspec(language, test_case, + docker_image=docker_images.get(str(language)), + auth=True) + jobs.append(test_job) + for server in args.override_server: server_name = server[0] (server_host, server_port) = server[1].split(':') From b937aa1b7a62142c9decf20b8c0a5be3ef20ec0b Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Tue, 6 Oct 2015 11:30:30 -0700 Subject: [PATCH 143/169] ex --> ext --- src/core/iomgr/fd_posix.c | 4 ++-- src/core/iomgr/pollset_posix.c | 6 +++--- src/core/iomgr/pollset_posix.h | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/core/iomgr/fd_posix.c b/src/core/iomgr/fd_posix.c index dc4aabb668f..7ae8d6efa5b 100644 --- a/src/core/iomgr/fd_posix.c +++ b/src/core/iomgr/fd_posix.c @@ -172,8 +172,8 @@ int grpc_fd_is_orphaned(grpc_fd *fd) { static void pollset_kick_locked(grpc_fd_watcher *watcher) { gpr_mu_lock(GRPC_POLLSET_MU(watcher->pollset)); GPR_ASSERT(watcher->worker); - grpc_pollset_kick_ex(watcher->pollset, watcher->worker, - GRPC_POLLSET_REEVALUATE_POLLING_ON_WAKEUP); + grpc_pollset_kick_ext(watcher->pollset, watcher->worker, + GRPC_POLLSET_REEVALUATE_POLLING_ON_WAKEUP); gpr_mu_unlock(GRPC_POLLSET_MU(watcher->pollset)); } diff --git a/src/core/iomgr/pollset_posix.c b/src/core/iomgr/pollset_posix.c index 574ebc7c60a..0851a0dc70c 100644 --- a/src/core/iomgr/pollset_posix.c +++ b/src/core/iomgr/pollset_posix.c @@ -98,8 +98,8 @@ static void push_front_worker(grpc_pollset *p, grpc_pollset_worker *worker) { worker->prev->next = worker->next->prev = worker; } -void grpc_pollset_kick_ex(grpc_pollset *p, grpc_pollset_worker *specific_worker, - gpr_uint32 flags) { +void grpc_pollset_kick_ext(grpc_pollset *p, grpc_pollset_worker *specific_worker, + gpr_uint32 flags) { /* pollset->mu already held */ if (specific_worker != NULL) { if (specific_worker == GRPC_POLLSET_KICK_BROADCAST) { @@ -151,7 +151,7 @@ void grpc_pollset_kick_ex(grpc_pollset *p, grpc_pollset_worker *specific_worker, } void grpc_pollset_kick(grpc_pollset *p, grpc_pollset_worker *specific_worker) { - grpc_pollset_kick_ex(p, specific_worker, 0); + grpc_pollset_kick_ext(p, specific_worker, 0); } /* global state management */ diff --git a/src/core/iomgr/pollset_posix.h b/src/core/iomgr/pollset_posix.h index f0ec07ebce9..6b91725de77 100644 --- a/src/core/iomgr/pollset_posix.h +++ b/src/core/iomgr/pollset_posix.h @@ -118,8 +118,8 @@ int grpc_poll_deadline_to_millis_timeout(gpr_timespec deadline, #define GRPC_POLLSET_REEVALUATE_POLLING_ON_WAKEUP 2 /* As per grpc_pollset_kick, with an extended set of flags (defined above) -- mostly for fd_posix's use. */ -void grpc_pollset_kick_ex(grpc_pollset *p, grpc_pollset_worker *specific_worker, - gpr_uint32 flags); +void grpc_pollset_kick_ext(grpc_pollset *p, grpc_pollset_worker *specific_worker, + gpr_uint32 flags); /* turn a pollset into a multipoller: platform specific */ typedef void (*grpc_platform_become_multipoller_type)(grpc_exec_ctx *exec_ctx, From d0a00003d6123a45842ac6df842abcbdb6ed612f Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Tue, 6 Oct 2015 11:30:37 -0700 Subject: [PATCH 144/169] clang-format --- src/core/iomgr/pollset_posix.c | 3 ++- src/core/iomgr/pollset_posix.h | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/core/iomgr/pollset_posix.c b/src/core/iomgr/pollset_posix.c index 0851a0dc70c..7581c3593e6 100644 --- a/src/core/iomgr/pollset_posix.c +++ b/src/core/iomgr/pollset_posix.c @@ -98,7 +98,8 @@ static void push_front_worker(grpc_pollset *p, grpc_pollset_worker *worker) { worker->prev->next = worker->next->prev = worker; } -void grpc_pollset_kick_ext(grpc_pollset *p, grpc_pollset_worker *specific_worker, +void grpc_pollset_kick_ext(grpc_pollset *p, + grpc_pollset_worker *specific_worker, gpr_uint32 flags) { /* pollset->mu already held */ if (specific_worker != NULL) { diff --git a/src/core/iomgr/pollset_posix.h b/src/core/iomgr/pollset_posix.h index 6b91725de77..34f76db2afa 100644 --- a/src/core/iomgr/pollset_posix.h +++ b/src/core/iomgr/pollset_posix.h @@ -118,7 +118,8 @@ int grpc_poll_deadline_to_millis_timeout(gpr_timespec deadline, #define GRPC_POLLSET_REEVALUATE_POLLING_ON_WAKEUP 2 /* As per grpc_pollset_kick, with an extended set of flags (defined above) -- mostly for fd_posix's use. */ -void grpc_pollset_kick_ext(grpc_pollset *p, grpc_pollset_worker *specific_worker, +void grpc_pollset_kick_ext(grpc_pollset *p, + grpc_pollset_worker *specific_worker, gpr_uint32 flags); /* turn a pollset into a multipoller: platform specific */ From d49e3a1e6bc8f269257d7879f132bda1bd36b0a4 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Tue, 6 Oct 2015 11:33:14 -0700 Subject: [PATCH 145/169] Add commentary --- src/core/iomgr/fd_posix.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/core/iomgr/fd_posix.c b/src/core/iomgr/fd_posix.c index 7ae8d6efa5b..231bc988a87 100644 --- a/src/core/iomgr/fd_posix.c +++ b/src/core/iomgr/fd_posix.c @@ -242,8 +242,10 @@ void grpc_fd_unref(grpc_fd *fd) { unref_by(fd, 2); } static void notify_on_locked(grpc_exec_ctx *exec_ctx, grpc_fd *fd, grpc_closure **st, grpc_closure *closure) { if (*st == CLOSURE_NOT_READY) { + /* not ready ==> switch to a waiting state by setting the closure */ *st = closure; } else if (*st == CLOSURE_READY) { + /* already ready ==> queue the closure to run immediately */ *st = CLOSURE_NOT_READY; grpc_exec_ctx_enqueue(exec_ctx, closure, !fd->shutdown); maybe_wake_one_watcher_locked(fd); @@ -260,12 +262,14 @@ static void notify_on_locked(grpc_exec_ctx *exec_ctx, grpc_fd *fd, static int set_ready_locked(grpc_exec_ctx *exec_ctx, grpc_fd *fd, grpc_closure **st) { if (*st == CLOSURE_READY) { - /* duplicate ready, ignore */ + /* duplicate ready ==> ignore */ return 0; } else if (*st == CLOSURE_NOT_READY) { + /* not ready, and not waiting ==> flag ready */ *st = CLOSURE_READY; return 0; } else { + /* waiting ==> queue closure */ grpc_exec_ctx_enqueue(exec_ctx, *st, !fd->shutdown); *st = CLOSURE_NOT_READY; return 1; From 60e5f91a39525cd10ae8fc033cb6a1aefa566984 Mon Sep 17 00:00:00 2001 From: Masood Malekghassemi Date: Mon, 5 Oct 2015 15:26:26 -0700 Subject: [PATCH 146/169] Enable pip caching on Jenkins slaves --- tools/jenkins/build_docker_and_run_tests.sh | 7 +++++++ tools/jenkins/docker_run_tests.sh | 4 ++++ tools/jenkins/grpc_jenkins_slave/Dockerfile | 5 +++-- tools/run_tests/build_python.sh | 13 ------------- 4 files changed, 14 insertions(+), 15 deletions(-) diff --git a/tools/jenkins/build_docker_and_run_tests.sh b/tools/jenkins/build_docker_and_run_tests.sh index 2c562e992aa..8b7809f2e23 100755 --- a/tools/jenkins/build_docker_and_run_tests.sh +++ b/tools/jenkins/build_docker_and_run_tests.sh @@ -37,8 +37,13 @@ cd `dirname $0`/../.. git_root=`pwd` cd - +# Ensure existence of ccache directory mkdir -p /tmp/ccache +# Ensure existence of the home directory for XDG caches (e.g. what pip uses for +# its cache location now that --download-cache is deprecated). +mkdir -p /tmp/xdg-cache-home + # Create a local branch so the child Docker script won't complain git branch -f jenkins-docker @@ -57,9 +62,11 @@ docker run \ -e "config=$config" \ -e "arch=$arch" \ -e CCACHE_DIR=/tmp/ccache \ + -e XDG_CACHE_HOME=/tmp/xdg-cache-home \ -i $TTY_FLAG \ -v "$git_root:/var/local/jenkins/grpc" \ -v /tmp/ccache:/tmp/ccache \ + -v /tmp/xdg-cache-home:/tmp/xdg-cache-home \ -v /var/run/docker.sock:/var/run/docker.sock \ -v $(which docker):/bin/docker \ -w /var/local/git/grpc \ diff --git a/tools/jenkins/docker_run_tests.sh b/tools/jenkins/docker_run_tests.sh index 2e39bc6f51e..8bafeea6200 100755 --- a/tools/jenkins/docker_run_tests.sh +++ b/tools/jenkins/docker_run_tests.sh @@ -36,6 +36,10 @@ set -e export CONFIG=$config export ASAN_SYMBOLIZER_PATH=/usr/bin/llvm-symbolizer-3.5 +# Ensure that programs depending on current-user-ownership of cache directories +# are satisfied (it's being mounted from outside the image). +chown `whoami` $XDG_CACHE_HOME + mkdir -p /var/local/git git clone --recursive /var/local/jenkins/grpc /var/local/git/grpc diff --git a/tools/jenkins/grpc_jenkins_slave/Dockerfile b/tools/jenkins/grpc_jenkins_slave/Dockerfile index 4f5387eeb55..5f2b425c8c2 100644 --- a/tools/jenkins/grpc_jenkins_slave/Dockerfile +++ b/tools/jenkins/grpc_jenkins_slave/Dockerfile @@ -126,10 +126,11 @@ RUN /bin/bash -l -c "gem install bundler --no-ri --no-rdoc" RUN apt-get update && apt-get install -y \ python-all-dev \ python3-all-dev \ - python-pip \ - python-virtualenv + python-pip # Install Python packages from PyPI +RUN pip install pip --upgrade +RUN pip install virtualenv RUN pip install futures==2.2.0 enum34==1.0.4 protobuf==3.0.0a2 # For sanity test diff --git a/tools/run_tests/build_python.sh b/tools/run_tests/build_python.sh index eb386146754..24cf6ba7c88 100755 --- a/tools/run_tests/build_python.sh +++ b/tools/run_tests/build_python.sh @@ -39,9 +39,6 @@ GRPCIO=$ROOT/src/python/grpcio GRPCIO_TEST=$ROOT/src/python/grpcio_test GRPCIO_HEALTH_CHECKING=$ROOT/src/python/grpcio_health_checking -# -# Dependency steps. -# install_grpcio_deps() { cd $GRPCIO pip install -r requirements.txt @@ -50,14 +47,7 @@ install_grpcio_test_deps() { cd $GRPCIO_TEST pip install -r requirements.txt } -# -# End dependency steps. -# -# -# Install steps. Requires that the `pip` command is appropriate (i.e. that the -# virtual environment has been activated). -# install_grpcio() { CFLAGS="-I$ROOT/include -std=c89" LDFLAGS=-L$ROOT/libs/$CONFIG GRPC_PYTHON_BUILD_WITH_CYTHON=1 pip install $GRPCIO } @@ -67,9 +57,6 @@ install_grpcio_test() { install_grpcio_health_checking() { pip install $GRPCIO_HEALTH_CHECKING } -# -# End install steps. -# # Cleans the environment of previous installations clean_grpcio_all() { From b1dec72703e02bddf1edc4d5186db29a24aad927 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Tue, 6 Oct 2015 11:46:01 -0700 Subject: [PATCH 147/169] add ruby server to run_interop_tests.py --- tools/run_tests/run_interop_tests.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tools/run_tests/run_interop_tests.py b/tools/run_tests/run_interop_tests.py index f0935fb5d61..374dec1851c 100755 --- a/tools/run_tests/run_interop_tests.py +++ b/tools/run_tests/run_interop_tests.py @@ -250,8 +250,7 @@ _LANGUAGES = { } # languages supported as cloud_to_cloud servers -# TODO(jtattermusch): enable other languages as servers as well -_SERVERS = ['c++', 'node', 'csharp', 'java', 'go'] +_SERVERS = ['c++', 'node', 'csharp', 'java', 'go', 'ruby'] # TODO(jtattermusch): add empty_stream once PHP starts supporting it. # TODO(jtattermusch): add timeout_on_sleeping_server once java starts supporting it. From 6078a7d36728e4711eee6897c033c3ad60acba49 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Tue, 6 Oct 2015 11:50:21 -0700 Subject: [PATCH 148/169] Add commentary --- src/core/iomgr/pollset_posix.c | 29 +++++++++++++++++++++++++---- 1 file changed, 25 insertions(+), 4 deletions(-) diff --git a/src/core/iomgr/pollset_posix.c b/src/core/iomgr/pollset_posix.c index 7581c3593e6..08e34c5d567 100644 --- a/src/core/iomgr/pollset_posix.c +++ b/src/core/iomgr/pollset_posix.c @@ -228,31 +228,44 @@ void grpc_pollset_work(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, int added_worker = 0; int locked = 1; int queued_work = 0; + int keep_polling = 0; /* this must happen before we (potentially) drop pollset->mu */ worker->next = worker->prev = NULL; worker->reevaluate_polling_on_wakeup = 0; /* TODO(ctiller): pool these */ grpc_wakeup_fd_init(&worker->wakeup_fd); + /* If there's work waiting for the pollset to be idle, and the + pollset is idle, then do that work */ if (!grpc_pollset_has_workers(pollset) && !grpc_closure_list_empty(pollset->idle_jobs)) { grpc_exec_ctx_enqueue_list(exec_ctx, &pollset->idle_jobs); goto done; } + /* Check alarms - these are a global resource so we just ping + each time through on every pollset. + May update deadline to ensure timely wakeups. + TODO(ctiller): can this work be localized? */ if (grpc_alarm_check(exec_ctx, now, &deadline)) { gpr_mu_unlock(&pollset->mu); locked = 0; goto done; } + /* If we're shutting down then we don't execute any extended work */ if (pollset->shutting_down) { goto done; } + /* Give do_promote priority so we don't starve it out */ if (pollset->in_flight_cbs) { - /* Give do_promote priority so we don't starve it out */ gpr_mu_unlock(&pollset->mu); locked = 0; goto done; } - for (;;) { + /* Start polling, and keep doing so while we're being asked to + re-evaluate our pollers (this allows poll() based pollers to + ensure they don't miss wakeups) */ + keep_polling = 1; + while (keep_polling) { + keep_polling = 0; if (!pollset->kicked_without_pollers) { if (!added_worker) { push_front_worker(pollset, worker); @@ -268,21 +281,29 @@ void grpc_pollset_work(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, } else { pollset->kicked_without_pollers = 0; } + /* Finished execution - start cleaning up. + Note that we may arrive here from outside the enclosing while() loop. + In that case we won't loop though as we haven't added worker to the + worker list, which means nobody could ask us to re-evaluate polling). */ done: if (!locked) { queued_work |= grpc_exec_ctx_flush(exec_ctx); gpr_mu_lock(&pollset->mu); locked = 1; } + /* If we're forced to re-evaluate polling (via grpc_pollset_kick with + GRPC_POLLSET_REEVALUATE_POLLING_ON_WAKEUP) then we land here and force + a loop */ if (worker->reevaluate_polling_on_wakeup) { worker->reevaluate_polling_on_wakeup = 0; pollset->kicked_without_pollers = 0; if (queued_work) { + /* If there's queued work on the list, then set the deadline to be + immediate so we get back out of the polling loop quickly */ deadline = gpr_inf_past(GPR_CLOCK_MONOTONIC); } - continue; + keep_polling = 1; } - break; } if (added_worker) { remove_worker(pollset, worker); From fe4939f8093e1d5e56c8657007d34a3c9f47674b Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Tue, 6 Oct 2015 12:55:36 -0700 Subject: [PATCH 149/169] More robust port_server version checking --- tools/run_tests/port_server.py | 19 ++++++++++++++----- tools/run_tests/run_tests.py | 27 +++++++++++++++------------ 2 files changed, 29 insertions(+), 17 deletions(-) diff --git a/tools/run_tests/port_server.py b/tools/run_tests/port_server.py index 48b6214b958..b953df952cb 100755 --- a/tools/run_tests/port_server.py +++ b/tools/run_tests/port_server.py @@ -38,6 +38,18 @@ import socket import sys import time + +# increment this number whenever making a change to ensure that +# the changes are picked up by running CI servers +# note that all changes must be backwards compatible +_MY_VERSION = 2 + + +if len(sys.argv) == 2 and sys.argv[1] == 'dump_version': + print _MY_VERSION + sys.exit(0) + + argp = argparse.ArgumentParser(description='Server for httpcli_test') argp.add_argument('-p', '--port', default=12345, type=int) args = argp.parse_args() @@ -47,9 +59,6 @@ print 'port server running on port %d' % args.port pool = [] in_use = {} -with open(__file__) as f: - _MY_VERSION = hashlib.sha1(f.read()).hexdigest() - def refill_pool(max_timeout, req): """Scan for ports not marked for being in use""" @@ -113,7 +122,7 @@ class Handler(BaseHTTPServer.BaseHTTPRequestHandler): del in_use[p] pool.append(p) self.log_message('drop port %d' % p) - elif self.path == '/version': + elif self.path == '/version_number': # fetch a version string and the current process pid self.send_response(200) self.send_header('Content-Type', 'text/plain') @@ -128,7 +137,7 @@ class Handler(BaseHTTPServer.BaseHTTPRequestHandler): self.end_headers() now = time.time() self.wfile.write(yaml.dump({'pool': pool, 'in_use': dict((k, now - v) for k, v in in_use.iteritems())})) - elif self.path == '/quit': + elif self.path == '/quitquitquit': self.send_response(200) self.end_headers() keep_running = False diff --git a/tools/run_tests/run_tests.py b/tools/run_tests/run_tests.py index e938520403d..4e71e3e4b64 100755 --- a/tools/run_tests/run_tests.py +++ b/tools/run_tests/run_tests.py @@ -713,21 +713,24 @@ def _start_port_server(port_server_port): # if not running ==> start a new one # otherwise, leave it up try: - version = urllib2.urlopen('http://localhost:%d/version' % port_server_port, - timeout=1).read() - print 'detected port server running' + version = int(urllib2.urlopen( + 'http://localhost:%d/version_number' % port_server_port, + timeout=1).read()) + print 'detected port server running version %d' % version running = True - except Exception: + except Exception as e: print 'failed to detect port server: %s' % sys.exc_info()[0] + print e.strerror running = False if running: - with open('tools/run_tests/port_server.py') as f: - current_version = hashlib.sha1(f.read()).hexdigest() - running = (version == current_version) - if not running: - print 'port_server version mismatch: killing the old one' - urllib2.urlopen('http://localhost:%d/quit' % port_server_port).read() - time.sleep(1) + current_version = int(subprocess.check_output( + [sys.executable, 'tools/run_tests/port_server.py', 'dump_version'])) + print 'my port server is version %d' % current_version + running = (version >= current_version) + if not running: + print 'port_server version mismatch: killing the old one' + urllib2.urlopen('http://localhost:%d/quitquitquit' % port_server_port).read() + time.sleep(1) if not running: print 'starting port_server' port_log = open('portlog.txt', 'w') @@ -773,7 +776,7 @@ def _build_and_run( # start antagonists antagonists = [subprocess.Popen(['tools/run_tests/antagonist.py']) for _ in range(0, args.antagonists)] - port_server_port = 9999 + port_server_port = 32767 _start_port_server(port_server_port) try: infinite_runs = runs_per_test == 0 From 89f1c7277928f6f222b4f2c6ec2dff71bacbbe68 Mon Sep 17 00:00:00 2001 From: yang-g Date: Tue, 6 Oct 2015 13:34:37 -0700 Subject: [PATCH 150/169] unref slice before cancel --- src/core/surface/call.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/core/surface/call.c b/src/core/surface/call.c index d15a3bcbade..786535a5797 100644 --- a/src/core/surface/call.c +++ b/src/core/surface/call.c @@ -927,6 +927,7 @@ static int add_slice_to_message(grpc_call *call, gpr_slice slice) { } /* we have to be reading a message to know what to do here */ if (!call->reading_message) { + gpr_slice_unref(slice); cancel_with_status(call, GRPC_STATUS_INVALID_ARGUMENT, "Received payload data while not reading a message"); return 0; From 5bd75d789c77891b6dfee3dd619a67ec5be444d3 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Tue, 8 Sep 2015 10:55:20 -0700 Subject: [PATCH 151/169] implement C# wrapping for plugin API --- src/csharp/Grpc.Core/Credentials.cs | 52 ++++++++ src/csharp/Grpc.Core/Grpc.Core.csproj | 1 + .../Internal/CredentialsSafeHandle.cs | 8 ++ .../NativeMetadataCredentialsPlugin.cs | 112 ++++++++++++++++++ .../Grpc.IntegrationTesting.csproj | 1 + .../MetadataCredentialsTest.cs | 100 ++++++++++++++++ src/csharp/ext/grpc_csharp_ext.c | 41 ++++++- 7 files changed, 314 insertions(+), 1 deletion(-) create mode 100644 src/csharp/Grpc.Core/Internal/NativeMetadataCredentialsPlugin.cs create mode 100644 src/csharp/Grpc.IntegrationTesting/MetadataCredentialsTest.cs diff --git a/src/csharp/Grpc.Core/Credentials.cs b/src/csharp/Grpc.Core/Credentials.cs index 4fcac0c4c00..e653d3688cf 100644 --- a/src/csharp/Grpc.Core/Credentials.cs +++ b/src/csharp/Grpc.Core/Credentials.cs @@ -32,10 +32,17 @@ #endregion using System; +using System.Collections.Generic; +using System.Threading.Tasks; + using Grpc.Core.Internal; +using Grpc.Core.Utils; namespace Grpc.Core { + // TODO: rename + public delegate Task AsyncAuthInterceptor(string authUri, Metadata metadata); + /// /// Client-side credentials. Used for creation of a secure channel. /// @@ -135,4 +142,49 @@ namespace Grpc.Core return CredentialsSafeHandle.CreateSslCredentials(rootCertificates, keyCertificatePair); } } + + /// + /// Client-side credentials that delegate metadata based auth to an interceptor. + /// + public partial class MetadataCredentials : Credentials + { + readonly AsyncAuthInterceptor interceptor; + + public MetadataCredentials(AsyncAuthInterceptor interceptor) + { + this.interceptor = interceptor; + } + + internal override CredentialsSafeHandle ToNativeCredentials() + { + NativeMetadataCredentialsPlugin plugin = new NativeMetadataCredentialsPlugin(interceptor); + return plugin.Credentials; + } + } + + public sealed class CompositeCredentials : Credentials + { + readonly List credentials; + + public CompositeCredentials(params Credentials[] credentials) + { + Preconditions.CheckArgument(credentials.Length >= 2, "Composite credentials object can only be created from 2 or more credentials."); + this.credentials = new List(credentials); + } + + public static CompositeCredentials Create(params Credentials[] credentials) + { + return new CompositeCredentials(credentials); + } + + internal override CredentialsSafeHandle ToNativeCredentials() + { + var nativeComposite = credentials[0].ToNativeCredentials(); + for (int i = 1; i < credentials.Count; i++) + { + nativeComposite = CredentialsSafeHandle.CreateComposite(nativeComposite, credentials[i].ToNativeCredentials()); + } + return nativeComposite; + } + } } diff --git a/src/csharp/Grpc.Core/Grpc.Core.csproj b/src/csharp/Grpc.Core/Grpc.Core.csproj index ad2af17bc75..04c3eda1130 100644 --- a/src/csharp/Grpc.Core/Grpc.Core.csproj +++ b/src/csharp/Grpc.Core/Grpc.Core.csproj @@ -49,6 +49,7 @@ + diff --git a/src/csharp/Grpc.Core/Internal/CredentialsSafeHandle.cs b/src/csharp/Grpc.Core/Internal/CredentialsSafeHandle.cs index feed3353624..bab45108e02 100644 --- a/src/csharp/Grpc.Core/Internal/CredentialsSafeHandle.cs +++ b/src/csharp/Grpc.Core/Internal/CredentialsSafeHandle.cs @@ -43,6 +43,9 @@ namespace Grpc.Core.Internal [DllImport("grpc_csharp_ext.dll", CharSet = CharSet.Ansi)] static extern CredentialsSafeHandle grpcsharp_ssl_credentials_create(string pemRootCerts, string keyCertPairCertChain, string keyCertPairPrivateKey); + [DllImport("grpc_csharp_ext.dll")] + static extern CredentialsSafeHandle grpcsharp_composite_credentials_create(CredentialsSafeHandle creds1, CredentialsSafeHandle creds2); + [DllImport("grpc_csharp_ext.dll")] static extern void grpcsharp_credentials_release(IntPtr credentials); @@ -69,6 +72,11 @@ namespace Grpc.Core.Internal } } + public static CredentialsSafeHandle CreateComposite(CredentialsSafeHandle creds1, CredentialsSafeHandle creds2) + { + return grpcsharp_composite_credentials_create(creds1, creds2); + } + protected override bool ReleaseHandle() { grpcsharp_credentials_release(handle); diff --git a/src/csharp/Grpc.Core/Internal/NativeMetadataCredentialsPlugin.cs b/src/csharp/Grpc.Core/Internal/NativeMetadataCredentialsPlugin.cs new file mode 100644 index 00000000000..6662a73b17a --- /dev/null +++ b/src/csharp/Grpc.Core/Internal/NativeMetadataCredentialsPlugin.cs @@ -0,0 +1,112 @@ +#region Copyright notice and license +// Copyright 2015, Google Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +#endregion +using System; +using System.Runtime.InteropServices; +using System.Threading; +using System.Threading.Tasks; + +using Grpc.Core.Logging; +using Grpc.Core.Utils; + +namespace Grpc.Core.Internal +{ + internal delegate void NativeMetadataInterceptor(IntPtr statePtr, IntPtr serviceUrlPtr, IntPtr callbackPtr, IntPtr userDataPtr, bool isDestroy); + + internal class NativeMetadataCredentialsPlugin + { + const string GetMetadataExceptionMsg = "Exception occured in metadata credentials plugin."; + static readonly ILogger Logger = GrpcEnvironment.Logger.ForType(); + + [DllImport("grpc_csharp_ext.dll")] + static extern CredentialsSafeHandle grpcsharp_metadata_credentials_create_from_plugin(NativeMetadataInterceptor interceptor); + + [DllImport("grpc_csharp_ext.dll", CharSet = CharSet.Ansi)] + static extern void grpcsharp_metadata_credentials_notify_from_plugin(IntPtr callbackPtr, IntPtr userData, MetadataArraySafeHandle metadataArray, StatusCode statusCode, string errorDetails); + + AsyncAuthInterceptor interceptor; + GCHandle gcHandle; + NativeMetadataInterceptor nativeInterceptor; + CredentialsSafeHandle credentials; + + public NativeMetadataCredentialsPlugin(AsyncAuthInterceptor interceptor) + { + this.interceptor = Preconditions.CheckNotNull(interceptor, "interceptor"); + this.nativeInterceptor = NativeMetadataInterceptorHandler; + + // Make sure the callback doesn't get garbage collected until it is destroyed. + this.gcHandle = GCHandle.Alloc(this.nativeInterceptor, GCHandleType.Normal); + this.credentials = grpcsharp_metadata_credentials_create_from_plugin(nativeInterceptor); + } + + public CredentialsSafeHandle Credentials + { + get { return credentials; } + } + + private void NativeMetadataInterceptorHandler(IntPtr statePtr, IntPtr serviceUrlPtr, IntPtr callbackPtr, IntPtr userDataPtr, bool isDestroy) + { + if (isDestroy) + { + gcHandle.Free(); + return; + } + + try + { + string serviceUrl = Marshal.PtrToStringAnsi(serviceUrlPtr); + StartGetMetadata(serviceUrl, callbackPtr, userDataPtr); + } + catch (Exception e) + { + grpcsharp_metadata_credentials_notify_from_plugin(callbackPtr, userDataPtr, null, StatusCode.Unknown, GetMetadataExceptionMsg); + Logger.Error(e, GetMetadataExceptionMsg); + } + } + + private async void StartGetMetadata(string serviceUrl, IntPtr callbackPtr, IntPtr userDataPtr) + { + try + { + var metadata = new Metadata(); + await interceptor(serviceUrl, metadata); + using (var metadataArray = MetadataArraySafeHandle.Create(metadata)) + { + grpcsharp_metadata_credentials_notify_from_plugin(callbackPtr, userDataPtr, metadataArray, StatusCode.OK, null); + } + } + catch (Exception e) + { + grpcsharp_metadata_credentials_notify_from_plugin(callbackPtr, userDataPtr, null, StatusCode.Unknown, GetMetadataExceptionMsg); + Logger.Error(e, GetMetadataExceptionMsg); + } + } + } +} diff --git a/src/csharp/Grpc.IntegrationTesting/Grpc.IntegrationTesting.csproj b/src/csharp/Grpc.IntegrationTesting/Grpc.IntegrationTesting.csproj index a0bcf431f7b..f0a39acf753 100644 --- a/src/csharp/Grpc.IntegrationTesting/Grpc.IntegrationTesting.csproj +++ b/src/csharp/Grpc.IntegrationTesting/Grpc.IntegrationTesting.csproj @@ -96,6 +96,7 @@ + diff --git a/src/csharp/Grpc.IntegrationTesting/MetadataCredentialsTest.cs b/src/csharp/Grpc.IntegrationTesting/MetadataCredentialsTest.cs new file mode 100644 index 00000000000..76991dfc209 --- /dev/null +++ b/src/csharp/Grpc.IntegrationTesting/MetadataCredentialsTest.cs @@ -0,0 +1,100 @@ +#region Copyright notice and license + +// Copyright 2015, Google Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +#endregion + +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading; +using System.Threading.Tasks; +using Grpc.Core; +using Grpc.Core.Utils; +using Grpc.Testing; +using NUnit.Framework; + +namespace Grpc.IntegrationTesting +{ + public class MetadataCredentialsTest + { + const string Host = "localhost"; + Server server; + Channel channel; + TestService.ITestServiceClient client; + + [TestFixtureSetUp] + public void Init() + { + var serverCredentials = new SslServerCredentials(new[] { new KeyCertificatePair( + File.ReadAllText(TestCredentials.ServerCertChainPath), + File.ReadAllText(TestCredentials.ServerPrivateKeyPath)) }); + server = new Server + { + Services = { TestService.BindService(new TestServiceImpl()) }, + Ports = { { Host, ServerPort.PickUnused, serverCredentials } } + }; + server.Start(); + + var options = new List + { + new ChannelOption(ChannelOptions.SslTargetNameOverride, TestCredentials.DefaultHostOverride) + }; + + var asyncAuthInterceptor = new AsyncAuthInterceptor(async (authUri, metadata) => + { + await Task.Delay(100); // make sure the operation is asynchronous. + metadata.Add("authorization", "SECRET_TOKEN"); + }); + + var clientCredentials = CompositeCredentials.Create( + new SslCredentials(File.ReadAllText(TestCredentials.ClientCertAuthorityPath)), + new MetadataCredentials(asyncAuthInterceptor) + ); + channel = new Channel(Host, server.Ports.Single().BoundPort, clientCredentials, options); + client = TestService.NewClient(channel); + } + + [TestFixtureTearDown] + public void Cleanup() + { + channel.ShutdownAsync().Wait(); + server.ShutdownAsync().Wait(); + } + + [Test] + public void MetadataCredentials() + { + var response = client.UnaryCall(new SimpleRequest { ResponseSize = 10 }); + Assert.AreEqual(10, response.Payload.Body.Length); + } + } +} diff --git a/src/csharp/ext/grpc_csharp_ext.c b/src/csharp/ext/grpc_csharp_ext.c index 51e0728fb9d..657f999ad4e 100644 --- a/src/csharp/ext/grpc_csharp_ext.c +++ b/src/csharp/ext/grpc_csharp_ext.c @@ -68,7 +68,7 @@ grpc_byte_buffer *string_to_byte_buffer(const char *buffer, size_t len) { /* * Helper to maintain lifetime of batch op inputs and store batch op outputs. */ -typedef struct gprcsharp_batch_context { +typedef struct grpcsharp_batch_context { grpc_metadata_array send_initial_metadata; grpc_byte_buffer *send_message; struct { @@ -892,6 +892,45 @@ grpcsharp_server_add_secure_http2_port(grpc_server *server, const char *addr, return grpc_server_add_secure_http2_port(server, addr, creds); } +GPR_EXPORT grpc_credentials *GPR_CALLTYPE grpcsharp_composite_credentials_create( + grpc_credentials *creds1, + grpc_credentials *creds2) { + return grpc_composite_credentials_create(creds1, creds2, NULL); +} + +/* Metadata credentials plugin */ + +GPR_EXPORT void GPR_CALLTYPE grpcsharp_metadata_credentials_notify_from_plugin( + void *callback_ptr, void *user_data, grpc_metadata_array *metadata, + grpc_status_code status, const char *error_details) { + grpc_credentials_plugin_metadata_cb cb = (grpc_credentials_plugin_metadata_cb)callback_ptr; + cb(user_data, metadata->metadata, metadata->count, status, error_details); +} + +typedef void(GPR_CALLTYPE *grpcsharp_metadata_interceptor_func)( + void *state, const char *service_url, void *callback_ptr, + void *user_data, gpr_int32 is_destroy); + +static void grpcsharp_get_metadata_handler(void *state, const char *service_url, + grpc_credentials_plugin_metadata_cb cb, void *user_data) { + grpcsharp_metadata_interceptor_func interceptor = (grpcsharp_metadata_interceptor_func)state; + interceptor(state, service_url, (void*)cb, user_data, 0); +} + +static void grpcsharp_metadata_credentials_destroy_handler(void *state) { + grpcsharp_metadata_interceptor_func interceptor = (grpcsharp_metadata_interceptor_func)state; + interceptor(state, NULL, NULL, NULL, 1); +} + +GPR_EXPORT grpc_credentials *GPR_CALLTYPE grpcsharp_metadata_credentials_create_from_plugin( + grpcsharp_metadata_interceptor_func metadata_interceptor) { + grpc_metadata_credentials_plugin plugin; + plugin.get_metadata = grpcsharp_get_metadata_handler; + plugin.destroy = grpcsharp_metadata_credentials_destroy_handler; + plugin.state = metadata_interceptor; + return grpc_metadata_credentials_create_from_plugin(plugin, NULL); +} + /* Logging */ typedef void(GPR_CALLTYPE *grpcsharp_log_func)(const char *file, gpr_int32 line, From 74f39e185eaddfb07e9b024b0d8aec547cd83821 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Wed, 23 Sep 2015 20:14:56 -0700 Subject: [PATCH 152/169] Migrate C# to the new auth API --- src/csharp/Grpc.Auth/AuthInterceptors.cs | 24 ++-- src/csharp/Grpc.Auth/Grpc.Auth.csproj | 1 + src/csharp/Grpc.Auth/GrpcCredentials.cs | 93 +++++++++++++++ src/csharp/Grpc.Core.Tests/ClientBaseTest.cs | 62 ---------- src/csharp/Grpc.Core.Tests/CredentialsTest.cs | 109 ++++++++++++++++++ .../Grpc.Core.Tests/Grpc.Core.Tests.csproj | 2 +- .../Grpc.Core.Tests/MarshallingErrorsTest.cs | 4 +- src/csharp/Grpc.Core/CallOptions.cs | 16 ++- src/csharp/Grpc.Core/ClientBase.cs | 31 ++--- src/csharp/Grpc.Core/Credentials.cs | 72 ++++++++++-- src/csharp/Grpc.Core/Internal/AsyncCall.cs | 10 +- .../Grpc.Core/Internal/CallSafeHandle.cs | 8 ++ .../Grpc.Core/Internal/ChannelSafeHandle.cs | 6 +- .../Grpc.IntegrationTesting.Client.csproj | 49 ++++++++ .../packages.config | 11 ++ .../Grpc.IntegrationTesting.Server.csproj | 49 ++++++++ .../packages.config | 11 ++ .../Grpc.IntegrationTesting/InteropClient.cs | 52 +++++---- .../MetadataCredentialsTest.cs | 7 +- src/csharp/ext/grpc_csharp_ext.c | 5 + 20 files changed, 481 insertions(+), 141 deletions(-) create mode 100644 src/csharp/Grpc.Auth/GrpcCredentials.cs delete mode 100644 src/csharp/Grpc.Core.Tests/ClientBaseTest.cs create mode 100644 src/csharp/Grpc.Core.Tests/CredentialsTest.cs create mode 100644 src/csharp/Grpc.IntegrationTesting.Client/packages.config create mode 100644 src/csharp/Grpc.IntegrationTesting.Server/packages.config diff --git a/src/csharp/Grpc.Auth/AuthInterceptors.cs b/src/csharp/Grpc.Auth/AuthInterceptors.cs index c8ab4d9af6f..fa925667751 100644 --- a/src/csharp/Grpc.Auth/AuthInterceptors.cs +++ b/src/csharp/Grpc.Auth/AuthInterceptors.cs @@ -41,8 +41,8 @@ using Grpc.Core.Utils; namespace Grpc.Auth { /// - /// Factory methods to create authorization interceptors. Interceptors created can be registered with gRPC client classes (autogenerated client stubs that - /// inherit from ). + /// Factory methods to create authorization interceptors. + /// /// public static class AuthInterceptors { @@ -50,31 +50,29 @@ namespace Grpc.Auth private const string Schema = "Bearer"; /// - /// Creates interceptor that will obtain access token from any credential type that implements + /// Creates an that will obtain access token from any credential type that implements /// ITokenAccess. (e.g. GoogleCredential). /// /// The credential to use to obtain access tokens. - /// The header interceptor. - public static HeaderInterceptor FromCredential(ITokenAccess credential) + /// The interceptor. + public static AsyncAuthInterceptor FromCredential(ITokenAccess credential) { - return new HeaderInterceptor((method, authUri, metadata) => + return new AsyncAuthInterceptor(async (authUri, metadata) => { - // TODO(jtattermusch): Rethink synchronous wait to obtain the result. - var accessToken = credential.GetAccessTokenForRequestAsync(authUri, CancellationToken.None) - .ConfigureAwait(false).GetAwaiter().GetResult(); + var accessToken = await credential.GetAccessTokenForRequestAsync(authUri, CancellationToken.None).ConfigureAwait(false); metadata.Add(CreateBearerTokenHeader(accessToken)); }); } /// - /// Creates OAuth2 interceptor that will use given access token as authorization. + /// Creates an that will use given access token as authorization. /// /// OAuth2 access token. - /// The header interceptor. - public static HeaderInterceptor FromAccessToken(string accessToken) + /// The interceptor. + public static AsyncAuthInterceptor FromAccessToken(string accessToken) { Preconditions.CheckNotNull(accessToken); - return new HeaderInterceptor((method, authUri, metadata) => + return new AsyncAuthInterceptor(async (authUri, metadata) => { metadata.Add(CreateBearerTokenHeader(accessToken)); }); diff --git a/src/csharp/Grpc.Auth/Grpc.Auth.csproj b/src/csharp/Grpc.Auth/Grpc.Auth.csproj index 4fb087d4a34..80ab07d2ae5 100644 --- a/src/csharp/Grpc.Auth/Grpc.Auth.csproj +++ b/src/csharp/Grpc.Auth/Grpc.Auth.csproj @@ -78,6 +78,7 @@ Version.cs + diff --git a/src/csharp/Grpc.Auth/GrpcCredentials.cs b/src/csharp/Grpc.Auth/GrpcCredentials.cs new file mode 100644 index 00000000000..496d8e14164 --- /dev/null +++ b/src/csharp/Grpc.Auth/GrpcCredentials.cs @@ -0,0 +1,93 @@ +#region Copyright notice and license + +// Copyright 2015, Google Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +#endregion + +using System; +using System.Threading; + +using Google.Apis.Auth.OAuth2; +using Grpc.Core; +using Grpc.Core.Utils; + +namespace Grpc.Auth +{ + /// + /// Factory methods to create instances of class. + /// + public static class GrpcCredentials + { + /// + /// Creates a instance that will obtain access tokens + /// from any credential that implements ITokenAccess. (e.g. GoogleCredential). + /// + /// The credential to use to obtain access tokens. + /// The MetadataCredentials instance. + public static MetadataCredentials Create(ITokenAccess credential) + { + return new MetadataCredentials(AuthInterceptors.FromCredential(credential)); + } + + /// + /// Convenience method to create a instance from + /// ITokenAccess credential and SslCredentials instance. + /// + /// The credential to use to obtain access tokens. + /// The SslCredentials instance. + /// The composite credential for access token based auth over a secure channel. + public static CompositeCredentials Create(ITokenAccess credential, SslCredentials sslCredentials) + { + return CompositeCredentials.Create(Create(credential), sslCredentials); + } + + /// + /// Creates an instance of that will use given access token to authenticate + /// with a gRPC service. + /// + /// OAuth2 access token. + /// /// The MetadataCredentials instance. + public static MetadataCredentials FromAccessToken(string accessToken) + { + return new MetadataCredentials(AuthInterceptors.FromAccessToken(accessToken)); + } + + /// + /// Converts a ITokenAccess object into a object supported + /// by gRPC. + /// + /// + /// + public static MetadataCredentials ToGrpcCredentials(this ITokenAccess credential) + { + return GrpcCredentials.Create(credential); + } + } +} diff --git a/src/csharp/Grpc.Core.Tests/ClientBaseTest.cs b/src/csharp/Grpc.Core.Tests/ClientBaseTest.cs deleted file mode 100644 index 2dc10ebe971..00000000000 --- a/src/csharp/Grpc.Core.Tests/ClientBaseTest.cs +++ /dev/null @@ -1,62 +0,0 @@ -#region Copyright notice and license - -// Copyright 2015, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#endregion - -using System; -using Grpc.Core; -using Grpc.Core.Internal; -using Grpc.Core.Utils; -using NUnit.Framework; - -namespace Grpc.Core.Tests -{ - public class ClientBaseTest - { - [Test] - public void GetAuthUriBase_Valid() - { - Assert.AreEqual("https://some.googleapi.com/", ClientBase.GetAuthUriBase("some.googleapi.com")); - Assert.AreEqual("https://some.googleapi.com/", ClientBase.GetAuthUriBase("dns:///some.googleapi.com/")); - Assert.AreEqual("https://some.googleapi.com/", ClientBase.GetAuthUriBase("dns:///some.googleapi.com:443/")); - Assert.AreEqual("https://some.googleapi.com/", ClientBase.GetAuthUriBase("some.googleapi.com:443/")); - } - - [Test] - public void GetAuthUriBase_Invalid() - { - Assert.IsNull(ClientBase.GetAuthUriBase("some.googleapi.com:")); - Assert.IsNull(ClientBase.GetAuthUriBase("https://some.googleapi.com/")); - Assert.IsNull(ClientBase.GetAuthUriBase("dns://some.googleapi.com:443")); // just two slashes - Assert.IsNull(ClientBase.GetAuthUriBase("")); - } - } -} diff --git a/src/csharp/Grpc.Core.Tests/CredentialsTest.cs b/src/csharp/Grpc.Core.Tests/CredentialsTest.cs new file mode 100644 index 00000000000..5048144f98a --- /dev/null +++ b/src/csharp/Grpc.Core.Tests/CredentialsTest.cs @@ -0,0 +1,109 @@ +#region Copyright notice and license + +// Copyright 2015, Google Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +#endregion + +using System; +using System.Diagnostics; +using System.Runtime.InteropServices; +using System.Threading; +using System.Threading.Tasks; +using Grpc.Core; +using Grpc.Core.Internal; +using Grpc.Core.Utils; +using NUnit.Framework; + +namespace Grpc.Core.Tests +{ + public class CredentialsTest + { + [Test] + public void InsecureCredentials_IsNonComposable() + { + Assert.IsFalse(Credentials.Insecure.IsComposable); + } + + [Test] + public void CompositeCredentials_Create() + { + new CompositeCredentials(new FakeCredentials(true), new FakeCredentials(true), new FakeCredentials(true)); + } + + [Test] + public void CompositeCredentials_ComposeAtLeastTwo() + { + Assert.Throws(typeof(ArgumentException), () => new CompositeCredentials(new FakeCredentials(true))); + } + + [Test] + public void CompositeCredentials_ForbidsNonComposable() + { + Assert.Throws(typeof(ArgumentException), () => new CompositeCredentials(new FakeCredentials(true), new FakeCredentials(false))); + } + + [Test] + public void CompositeCredentials_ToNativeCredentials() + { + var composite = new CompositeCredentials(new MetadataCredentials(async (uri, m) => { await Task.Delay(1); }), new SslCredentials()); + using (var nativeComposite = composite.ToNativeCredentials()) + { + } + } + + [Test] + public void CompositeCredentials_OnlyOneConnectorCredentialAllowed() + { + var composite = new CompositeCredentials(new SslCredentials(), new SslCredentials()); + // it makes no sense to compose multiple ssl credentials. + Assert.Throws(typeof(ArgumentException), () => composite.ToNativeCredentials()); + } + + private class FakeCredentials : Credentials + { + readonly bool composable; + + public FakeCredentials(bool composable) + { + this.composable = composable; + } + + internal override bool IsComposable + { + get { return composable; } + } + + internal override CredentialsSafeHandle ToNativeCredentials() + { + return null; + } + } + } +} diff --git a/src/csharp/Grpc.Core.Tests/Grpc.Core.Tests.csproj b/src/csharp/Grpc.Core.Tests/Grpc.Core.Tests.csproj index f730936062d..0ebfaa0a62d 100644 --- a/src/csharp/Grpc.Core.Tests/Grpc.Core.Tests.csproj +++ b/src/csharp/Grpc.Core.Tests/Grpc.Core.Tests.csproj @@ -63,8 +63,8 @@ Version.cs - + diff --git a/src/csharp/Grpc.Core.Tests/MarshallingErrorsTest.cs b/src/csharp/Grpc.Core.Tests/MarshallingErrorsTest.cs index 83707e0c6da..37fb36946af 100644 --- a/src/csharp/Grpc.Core.Tests/MarshallingErrorsTest.cs +++ b/src/csharp/Grpc.Core.Tests/MarshallingErrorsTest.cs @@ -119,7 +119,7 @@ namespace Grpc.Core.Tests [Test] public void RequestParsingError_UnaryRequest() { - helper.UnaryHandler = new UnaryServerMethod((request, context) => + helper.UnaryHandler = new UnaryServerMethod((request, context) => { return Task.FromResult("RESPONSE"); }); @@ -161,7 +161,7 @@ namespace Grpc.Core.Tests { helper.ClientStreamingHandler = new ClientStreamingServerMethod(async (requestStream, context) => { - CollectionAssert.AreEqual(new [] {"A", "B"}, await requestStream.ToListAsync()); + CollectionAssert.AreEqual(new[] { "A", "B" }, await requestStream.ToListAsync()); return "RESPONSE"; }); var call = Calls.AsyncClientStreamingCall(helper.CreateClientStreamingCall()); diff --git a/src/csharp/Grpc.Core/CallOptions.cs b/src/csharp/Grpc.Core/CallOptions.cs index c3bc9c31564..c708fcdfc49 100644 --- a/src/csharp/Grpc.Core/CallOptions.cs +++ b/src/csharp/Grpc.Core/CallOptions.cs @@ -49,6 +49,7 @@ namespace Grpc.Core CancellationToken cancellationToken; WriteOptions writeOptions; ContextPropagationToken propagationToken; + Credentials credentials; /// /// Creates a new instance of CallOptions struct. @@ -58,14 +59,16 @@ namespace Grpc.Core /// Can be used to request cancellation of the call. /// Write options that will be used for this call. /// Context propagation token obtained from . + /// Credentials to use for this call. public CallOptions(Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken), - WriteOptions writeOptions = null, ContextPropagationToken propagationToken = null) + WriteOptions writeOptions = null, ContextPropagationToken propagationToken = null, Credentials credentials = null) { this.headers = headers; this.deadline = deadline; this.cancellationToken = cancellationToken; this.writeOptions = writeOptions; this.propagationToken = propagationToken; + this.credentials = credentials; } /// @@ -114,6 +117,17 @@ namespace Grpc.Core } } + /// + /// Credentials to use for this call. + /// + public Credentials Credentials + { + get + { + return this.credentials; + } + } + /// /// Returns new instance of with /// Headers set to the value provided. Values of all other fields are preserved. diff --git a/src/csharp/Grpc.Core/ClientBase.cs b/src/csharp/Grpc.Core/ClientBase.cs index f4533e735cb..e5b398062b2 100644 --- a/src/csharp/Grpc.Core/ClientBase.cs +++ b/src/csharp/Grpc.Core/ClientBase.cs @@ -40,18 +40,17 @@ namespace Grpc.Core /// /// Interceptor for call headers. /// - public delegate void HeaderInterceptor(IMethod method, string authUri, Metadata metadata); + /// Header interceptor is no longer to recommented way to perform authentication. + /// For header (initial metadata) based auth such as OAuth2 or JWT access token, use . + /// + public delegate void HeaderInterceptor(IMethod method, Metadata metadata); /// /// Base class for client-side stubs. /// public abstract class ClientBase { - // Regex for removal of the optional DNS scheme, trailing port, and trailing backslash - static readonly Regex ChannelTargetPattern = new Regex(@"^(dns:\/{3})?([^:\/]+)(:\d+)?\/?$"); - readonly Channel channel; - readonly string authUriBase; /// /// Initializes a new instance of ClientBase class. @@ -60,13 +59,14 @@ namespace Grpc.Core public ClientBase(Channel channel) { this.channel = channel; - this.authUriBase = GetAuthUriBase(channel.Target); } /// - /// Can be used to register a custom header (request metadata) interceptor. + /// Can be used to register a custom header interceptor. /// The interceptor is invoked each time a new call on this client is started. + /// It is not recommented to use header interceptor to add auth headers to RPC calls. /// + /// public HeaderInterceptor HeaderInterceptor { get; @@ -115,24 +115,9 @@ namespace Grpc.Core { options = options.WithHeaders(new Metadata()); } - var authUri = authUriBase != null ? authUriBase + method.ServiceName : null; - interceptor(method, authUri, options.Headers); + interceptor(method, options.Headers); } return new CallInvocationDetails(channel, method, Host, options); } - - /// - /// Creates Auth URI base from channel's target (the one passed at channel creation). - /// Fully-qualified service name is to be appended to this. - /// - internal static string GetAuthUriBase(string target) - { - var match = ChannelTargetPattern.Match(target); - if (!match.Success) - { - return null; - } - return "https://" + match.Groups[2].Value + "/"; - } } } diff --git a/src/csharp/Grpc.Core/Credentials.cs b/src/csharp/Grpc.Core/Credentials.cs index e653d3688cf..fcef627b25e 100644 --- a/src/csharp/Grpc.Core/Credentials.cs +++ b/src/csharp/Grpc.Core/Credentials.cs @@ -40,9 +40,6 @@ using Grpc.Core.Utils; namespace Grpc.Core { - // TODO: rename - public delegate Task AsyncAuthInterceptor(string authUri, Metadata metadata); - /// /// Client-side credentials. Used for creation of a secure channel. /// @@ -69,12 +66,26 @@ namespace Grpc.Core /// The native credentials. internal abstract CredentialsSafeHandle ToNativeCredentials(); + /// + /// Returns true if this credential type allows being composed by CompositeCredentials. + /// + internal virtual bool IsComposable + { + get { return true; } + } + private sealed class InsecureCredentialsImpl : Credentials { internal override CredentialsSafeHandle ToNativeCredentials() { return null; } + + // Composing insecure credentials makes no sense. + internal override bool IsComposable + { + get { return false; } + } } } @@ -143,13 +154,26 @@ namespace Grpc.Core } } + /// + /// Asynchronous authentication interceptor for . + /// + /// URL of a service to which current remote call needs to authenticate + /// Metadata to populate with entries that will be added to outgoing call's headers. + /// + public delegate Task AsyncAuthInterceptor(string authUri, Metadata metadata); + /// /// Client-side credentials that delegate metadata based auth to an interceptor. + /// The interceptor is automatically invoked for each remote call that uses MetadataCredentials. /// public partial class MetadataCredentials : Credentials { readonly AsyncAuthInterceptor interceptor; + /// + /// Initializes a new instance of MetadataCredentials class. + /// + /// authentication interceptor public MetadataCredentials(AsyncAuthInterceptor interceptor) { this.interceptor = interceptor; @@ -162,16 +186,34 @@ namespace Grpc.Core } } + /// + /// Credentials that allow composing multiple credentials objects into one object. + /// public sealed class CompositeCredentials : Credentials { readonly List credentials; + /// + /// Initializes a new instance of CompositeCredentials class. + /// The resulting credentials object will be composite of all the credentials specified as parameters. + /// + /// credentials to compose public CompositeCredentials(params Credentials[] credentials) { Preconditions.CheckArgument(credentials.Length >= 2, "Composite credentials object can only be created from 2 or more credentials."); + foreach (var cred in credentials) + { + Preconditions.CheckArgument(cred.IsComposable, "Cannot create composite credentials: one or more credential objects do not allow composition."); + } this.credentials = new List(credentials); } + /// + /// Creates a new instance of CompositeCredentials class by composing + /// multiple Credentials objects. + /// + /// credentials to compose + /// The new CompositeCredentials public static CompositeCredentials Create(params Credentials[] credentials) { return new CompositeCredentials(credentials); @@ -179,12 +221,28 @@ namespace Grpc.Core internal override CredentialsSafeHandle ToNativeCredentials() { - var nativeComposite = credentials[0].ToNativeCredentials(); - for (int i = 1; i < credentials.Count; i++) + return ToNativeRecursive(0); + } + + // Recursive descent makes managing lifetime of intermediate CredentialSafeHandle instances easier. + // In practice, we won't usually see composites from more than two credentials anyway. + private CredentialsSafeHandle ToNativeRecursive(int startIndex) + { + if (startIndex == credentials.Count - 1) + { + return credentials[startIndex].ToNativeCredentials(); + } + + using (var cred1 = credentials[startIndex].ToNativeCredentials()) + using (var cred2 = ToNativeRecursive(startIndex + 1)) { - nativeComposite = CredentialsSafeHandle.CreateComposite(nativeComposite, credentials[i].ToNativeCredentials()); + var nativeComposite = CredentialsSafeHandle.CreateComposite(cred1, cred2); + if (nativeComposite.IsInvalid) + { + throw new ArgumentException("Error creating native composite credentials. Likely, this is because you are trying to compose incompatible credentials."); + } + return nativeComposite; } - return nativeComposite; } } } diff --git a/src/csharp/Grpc.Core/Internal/AsyncCall.cs b/src/csharp/Grpc.Core/Internal/AsyncCall.cs index e3b00781c62..800462c8540 100644 --- a/src/csharp/Grpc.Core/Internal/AsyncCall.cs +++ b/src/csharp/Grpc.Core/Internal/AsyncCall.cs @@ -344,9 +344,13 @@ namespace Grpc.Core.Internal var parentCall = details.Options.PropagationToken != null ? details.Options.PropagationToken.ParentCall : CallSafeHandle.NullInstance; - return details.Channel.Handle.CreateCall(environment.CompletionRegistry, - parentCall, ContextPropagationToken.DefaultMask, cq, - details.Method, details.Host, Timespec.FromDateTime(details.Options.Deadline.Value)); + var credentials = details.Options.Credentials; + using (var nativeCredentials = credentials != null ? credentials.ToNativeCredentials() : null) + { + return details.Channel.Handle.CreateCall(environment.CompletionRegistry, + parentCall, ContextPropagationToken.DefaultMask, cq, + details.Method, details.Host, Timespec.FromDateTime(details.Options.Deadline.Value), nativeCredentials); + } } // Make sure that once cancellationToken for this call is cancelled, Cancel() will be called. diff --git a/src/csharp/Grpc.Core/Internal/CallSafeHandle.cs b/src/csharp/Grpc.Core/Internal/CallSafeHandle.cs index c3611a7761f..0be7a4dd3a1 100644 --- a/src/csharp/Grpc.Core/Internal/CallSafeHandle.cs +++ b/src/csharp/Grpc.Core/Internal/CallSafeHandle.cs @@ -98,6 +98,9 @@ namespace Grpc.Core.Internal static extern GRPCCallError grpcsharp_call_send_initial_metadata(CallSafeHandle call, BatchContextSafeHandle ctx, MetadataArraySafeHandle metadataArray); + [DllImport("grpc_csharp_ext.dll")] + static extern GRPCCallError grpcsharp_call_set_credentials(CallSafeHandle call, CredentialsSafeHandle credentials); + [DllImport("grpc_csharp_ext.dll")] static extern CStringSafeHandle grpcsharp_call_get_peer(CallSafeHandle call); @@ -113,6 +116,11 @@ namespace Grpc.Core.Internal this.completionRegistry = completionRegistry; } + public void SetCredentials(CredentialsSafeHandle credentials) + { + grpcsharp_call_set_credentials(this, credentials).CheckOk(); + } + public void StartUnary(UnaryResponseClientHandler callback, byte[] payload, MetadataArraySafeHandle metadataArray, WriteFlags writeFlags) { var ctx = BatchContextSafeHandle.Create(); diff --git a/src/csharp/Grpc.Core/Internal/ChannelSafeHandle.cs b/src/csharp/Grpc.Core/Internal/ChannelSafeHandle.cs index 7a1c6e3dacd..d270d77526f 100644 --- a/src/csharp/Grpc.Core/Internal/ChannelSafeHandle.cs +++ b/src/csharp/Grpc.Core/Internal/ChannelSafeHandle.cs @@ -82,9 +82,13 @@ namespace Grpc.Core.Internal return grpcsharp_secure_channel_create(credentials, target, channelArgs); } - public CallSafeHandle CreateCall(CompletionRegistry registry, CallSafeHandle parentCall, ContextPropagationFlags propagationMask, CompletionQueueSafeHandle cq, string method, string host, Timespec deadline) + public CallSafeHandle CreateCall(CompletionRegistry registry, CallSafeHandle parentCall, ContextPropagationFlags propagationMask, CompletionQueueSafeHandle cq, string method, string host, Timespec deadline, CredentialsSafeHandle credentials) { var result = grpcsharp_channel_create_call(this, parentCall, propagationMask, cq, method, host, deadline); + if (credentials != null) + { + result.SetCredentials(credentials); + } result.SetCompletionRegistry(registry); return result; } diff --git a/src/csharp/Grpc.IntegrationTesting.Client/Grpc.IntegrationTesting.Client.csproj b/src/csharp/Grpc.IntegrationTesting.Client/Grpc.IntegrationTesting.Client.csproj index 2c38c9645c5..8bc2082a1da 100644 --- a/src/csharp/Grpc.IntegrationTesting.Client/Grpc.IntegrationTesting.Client.csproj +++ b/src/csharp/Grpc.IntegrationTesting.Client/Grpc.IntegrationTesting.Client.csproj @@ -9,6 +9,7 @@ Grpc.IntegrationTesting.Client Grpc.IntegrationTesting.Client.Program v4.5 + 6d22e68f true @@ -38,7 +39,47 @@ C:\keys\Grpc.snk + + False + ..\packages\BouncyCastle.1.7.0\lib\Net40-Client\BouncyCastle.Crypto.dll + + + False + ..\packages\Google.Apis.Auth.1.9.3\lib\net40\Google.Apis.Auth.dll + + + False + ..\packages\Google.Apis.Auth.1.9.3\lib\net40\Google.Apis.Auth.PlatformServices.dll + + + False + ..\packages\Google.Apis.Core.1.9.3\lib\portable-net40+sl50+win+wpa81+wp80\Google.Apis.Core.dll + + + False + ..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.dll + + + ..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.dll + + + False + ..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.Desktop.dll + + + False + ..\packages\Newtonsoft.Json.7.0.1\lib\net45\Newtonsoft.Json.dll + + + + + ..\packages\Microsoft.Net.Http.2.2.29\lib\net45\System.Net.Http.Extensions.dll + + + ..\packages\Microsoft.Net.Http.2.2.29\lib\net45\System.Net.Http.Primitives.dll + + @@ -60,5 +101,13 @@ + + + + + This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + + + \ No newline at end of file diff --git a/src/csharp/Grpc.IntegrationTesting.Client/packages.config b/src/csharp/Grpc.IntegrationTesting.Client/packages.config new file mode 100644 index 00000000000..7a02c95db91 --- /dev/null +++ b/src/csharp/Grpc.IntegrationTesting.Client/packages.config @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/src/csharp/Grpc.IntegrationTesting.Server/Grpc.IntegrationTesting.Server.csproj b/src/csharp/Grpc.IntegrationTesting.Server/Grpc.IntegrationTesting.Server.csproj index 949ad61375c..1eadbeb9206 100644 --- a/src/csharp/Grpc.IntegrationTesting.Server/Grpc.IntegrationTesting.Server.csproj +++ b/src/csharp/Grpc.IntegrationTesting.Server/Grpc.IntegrationTesting.Server.csproj @@ -9,6 +9,7 @@ Grpc.IntegrationTesting.Server Grpc.IntegrationTesting.Server.Program v4.5 + d9ee8e52 true @@ -38,7 +39,47 @@ C:\keys\Grpc.snk + + False + ..\packages\BouncyCastle.1.7.0\lib\Net40-Client\BouncyCastle.Crypto.dll + + + False + ..\packages\Google.Apis.Auth.1.9.3\lib\net40\Google.Apis.Auth.dll + + + False + ..\packages\Google.Apis.Auth.1.9.3\lib\net40\Google.Apis.Auth.PlatformServices.dll + + + False + ..\packages\Google.Apis.Core.1.9.3\lib\portable-net40+sl50+win+wpa81+wp80\Google.Apis.Core.dll + + + False + ..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.dll + + + ..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.dll + + + False + ..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.Desktop.dll + + + False + ..\packages\Newtonsoft.Json.7.0.1\lib\net45\Newtonsoft.Json.dll + + + + + ..\packages\Microsoft.Net.Http.2.2.29\lib\net45\System.Net.Http.Extensions.dll + + + ..\packages\Microsoft.Net.Http.2.2.29\lib\net45\System.Net.Http.Primitives.dll + + @@ -60,5 +101,13 @@ + + + + + This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + + + \ No newline at end of file diff --git a/src/csharp/Grpc.IntegrationTesting.Server/packages.config b/src/csharp/Grpc.IntegrationTesting.Server/packages.config new file mode 100644 index 00000000000..7a02c95db91 --- /dev/null +++ b/src/csharp/Grpc.IntegrationTesting.Server/packages.config @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/src/csharp/Grpc.IntegrationTesting/InteropClient.cs b/src/csharp/Grpc.IntegrationTesting/InteropClient.cs index 504d798b893..d3b7fe87f3c 100644 --- a/src/csharp/Grpc.IntegrationTesting/InteropClient.cs +++ b/src/csharp/Grpc.IntegrationTesting/InteropClient.cs @@ -33,11 +33,13 @@ using System; using System.Collections.Generic; +using System.IO; using System.Text.RegularExpressions; using System.Threading; using System.Threading.Tasks; using CommandLine; +using CommandLine.Text; using Google.Apis.Auth.OAuth2; using Google.Protobuf; using Grpc.Auth; @@ -45,8 +47,6 @@ using Grpc.Core; using Grpc.Core.Utils; using Grpc.Testing; using NUnit.Framework; -using CommandLine.Text; -using System.IO; namespace Grpc.IntegrationTesting { @@ -117,6 +117,20 @@ namespace Grpc.IntegrationTesting private async Task Run() { var credentials = options.UseTls ? TestCredentials.CreateTestClientCredentials(options.UseTestCa) : Credentials.Insecure; + + if (options.TestCase == "jwt_token_creds") + { + var googleCredential = await GoogleCredential.GetApplicationDefaultAsync(); + Assert.IsTrue(googleCredential.IsCreateScopedRequired); + credentials = CompositeCredentials.Create(googleCredential.ToGrpcCredentials(), credentials); + } + + if (options.TestCase == "compute_engine_creds") + { + var googleCredential = await GoogleCredential.GetApplicationDefaultAsync(); + Assert.IsFalse(googleCredential.IsCreateScopedRequired); + credentials = CompositeCredentials.Create(googleCredential.ToGrpcCredentials(), credentials); + } List channelOptions = null; if (!string.IsNullOrEmpty(options.ServerHostOverride)) @@ -155,10 +169,10 @@ namespace Grpc.IntegrationTesting await RunEmptyStreamAsync(client); break; case "compute_engine_creds": - await RunComputeEngineCredsAsync(client, options.DefaultServiceAccount, options.OAuthScope); + RunComputeEngineCreds(client, options.DefaultServiceAccount, options.OAuthScope); break; case "jwt_token_creds": - await RunJwtTokenCredsAsync(client, options.DefaultServiceAccount); + RunJwtTokenCreds(client, options.DefaultServiceAccount); break; case "oauth2_auth_token": await RunOAuth2AuthTokenAsync(client, options.DefaultServiceAccount, options.OAuthScope); @@ -318,13 +332,10 @@ namespace Grpc.IntegrationTesting Console.WriteLine("Passed!"); } - public static async Task RunComputeEngineCredsAsync(TestService.TestServiceClient client, string defaultServiceAccount, string oauthScope) + public static void RunComputeEngineCreds(TestService.TestServiceClient client, string defaultServiceAccount, string oauthScope) { Console.WriteLine("running compute_engine_creds"); - var credential = await GoogleCredential.GetApplicationDefaultAsync(); - Assert.IsFalse(credential.IsCreateScopedRequired); - client.HeaderInterceptor = AuthInterceptors.FromCredential(credential); - + var request = new SimpleRequest { ResponseType = PayloadType.COMPRESSABLE, @@ -334,6 +345,7 @@ namespace Grpc.IntegrationTesting FillOauthScope = true }; + // not setting credentials here because they were set on channel already var response = client.UnaryCall(request); Assert.AreEqual(PayloadType.COMPRESSABLE, response.Payload.Type); @@ -344,13 +356,10 @@ namespace Grpc.IntegrationTesting Console.WriteLine("Passed!"); } - public static async Task RunJwtTokenCredsAsync(TestService.TestServiceClient client, string defaultServiceAccount) + public static void RunJwtTokenCreds(TestService.TestServiceClient client, string defaultServiceAccount) { Console.WriteLine("running jwt_token_creds"); - var credential = await GoogleCredential.GetApplicationDefaultAsync(); - Assert.IsTrue(credential.IsCreateScopedRequired); - client.HeaderInterceptor = AuthInterceptors.FromCredential(credential); - + var request = new SimpleRequest { ResponseType = PayloadType.COMPRESSABLE, @@ -359,6 +368,7 @@ namespace Grpc.IntegrationTesting FillUsername = true, }; + // not setting credentials here because they were set on channel already var response = client.UnaryCall(request); Assert.AreEqual(PayloadType.COMPRESSABLE, response.Payload.Type); @@ -373,15 +383,14 @@ namespace Grpc.IntegrationTesting ITokenAccess credential = (await GoogleCredential.GetApplicationDefaultAsync()).CreateScoped(new[] { oauthScope }); string oauth2Token = await credential.GetAccessTokenForRequestAsync(); - client.HeaderInterceptor = AuthInterceptors.FromAccessToken(oauth2Token); - + var credentials = GrpcCredentials.FromAccessToken(oauth2Token); var request = new SimpleRequest { FillUsername = true, FillOauthScope = true }; - var response = client.UnaryCall(request); + var response = client.UnaryCall(request, new CallOptions(credentials: credentials)); Assert.False(string.IsNullOrEmpty(response.OauthScope)); Assert.True(oauthScope.Contains(response.OauthScope)); @@ -392,18 +401,15 @@ namespace Grpc.IntegrationTesting public static async Task RunPerRpcCredsAsync(TestService.TestServiceClient client, string defaultServiceAccount, string oauthScope) { Console.WriteLine("running per_rpc_creds"); - ITokenAccess credential = (await GoogleCredential.GetApplicationDefaultAsync()).CreateScoped(new[] { oauthScope }); - string accessToken = await credential.GetAccessTokenForRequestAsync(); - var headerInterceptor = AuthInterceptors.FromAccessToken(accessToken); + ITokenAccess googleCredential = (await GoogleCredential.GetApplicationDefaultAsync()).CreateScoped(new[] { oauthScope }); + var credentials = GrpcCredentials.Create(googleCredential); var request = new SimpleRequest { FillUsername = true, }; - var headers = new Metadata(); - headerInterceptor(null, "", headers); - var response = client.UnaryCall(request, headers: headers); + var response = client.UnaryCall(request, new CallOptions(credentials: credentials)); Assert.AreEqual(defaultServiceAccount, response.Username); Console.WriteLine("Passed!"); diff --git a/src/csharp/Grpc.IntegrationTesting/MetadataCredentialsTest.cs b/src/csharp/Grpc.IntegrationTesting/MetadataCredentialsTest.cs index 76991dfc209..790bade89d4 100644 --- a/src/csharp/Grpc.IntegrationTesting/MetadataCredentialsTest.cs +++ b/src/csharp/Grpc.IntegrationTesting/MetadataCredentialsTest.cs @@ -54,9 +54,7 @@ namespace Grpc.IntegrationTesting [TestFixtureSetUp] public void Init() { - var serverCredentials = new SslServerCredentials(new[] { new KeyCertificatePair( - File.ReadAllText(TestCredentials.ServerCertChainPath), - File.ReadAllText(TestCredentials.ServerPrivateKeyPath)) }); + var serverCredentials = new SslServerCredentials(new[] { new KeyCertificatePair(File.ReadAllText(TestCredentials.ServerCertChainPath), File.ReadAllText(TestCredentials.ServerPrivateKeyPath)) }); server = new Server { Services = { TestService.BindService(new TestServiceImpl()) }, @@ -77,8 +75,7 @@ namespace Grpc.IntegrationTesting var clientCredentials = CompositeCredentials.Create( new SslCredentials(File.ReadAllText(TestCredentials.ClientCertAuthorityPath)), - new MetadataCredentials(asyncAuthInterceptor) - ); + new MetadataCredentials(asyncAuthInterceptor)); channel = new Channel(Host, server.Ports.Single().BoundPort, clientCredentials, options); client = TestService.NewClient(channel); } diff --git a/src/csharp/ext/grpc_csharp_ext.c b/src/csharp/ext/grpc_csharp_ext.c index 657f999ad4e..0f05347dc51 100644 --- a/src/csharp/ext/grpc_csharp_ext.c +++ b/src/csharp/ext/grpc_csharp_ext.c @@ -785,6 +785,11 @@ grpcsharp_call_send_initial_metadata(grpc_call *call, NULL); } +GPR_EXPORT grpc_call_error GPR_CALLTYPE grpcsharp_call_set_credentials(grpc_call *call, + grpc_credentials *creds) { + return grpc_call_set_credentials(call, creds); +} + /* Server */ GPR_EXPORT grpc_server *GPR_CALLTYPE From 9e5e7e9a6cde7f9d91b00cb65b3c99e01916c813 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Thu, 24 Sep 2015 10:34:05 -0700 Subject: [PATCH 153/169] a small interop client refactoring --- .../Grpc.IntegrationTesting/InteropClient.cs | 32 +++++++++++-------- 1 file changed, 19 insertions(+), 13 deletions(-) diff --git a/src/csharp/Grpc.IntegrationTesting/InteropClient.cs b/src/csharp/Grpc.IntegrationTesting/InteropClient.cs index d3b7fe87f3c..c99084d1a90 100644 --- a/src/csharp/Grpc.IntegrationTesting/InteropClient.cs +++ b/src/csharp/Grpc.IntegrationTesting/InteropClient.cs @@ -115,6 +115,24 @@ namespace Grpc.IntegrationTesting } private async Task Run() + { + var credentials = await CreateCredentialsAsync(); + + List channelOptions = null; + if (!string.IsNullOrEmpty(options.ServerHostOverride)) + { + channelOptions = new List + { + new ChannelOption(ChannelOptions.SslTargetNameOverride, options.ServerHostOverride) + }; + } + var channel = new Channel(options.ServerHost, options.ServerPort, credentials, channelOptions); + TestService.TestServiceClient client = new TestService.TestServiceClient(channel); + await RunTestCaseAsync(client, options); + await channel.ShutdownAsync(); + } + + private async Task CreateCredentialsAsync() { var credentials = options.UseTls ? TestCredentials.CreateTestClientCredentials(options.UseTestCa) : Credentials.Insecure; @@ -131,19 +149,7 @@ namespace Grpc.IntegrationTesting Assert.IsFalse(googleCredential.IsCreateScopedRequired); credentials = CompositeCredentials.Create(googleCredential.ToGrpcCredentials(), credentials); } - - List channelOptions = null; - if (!string.IsNullOrEmpty(options.ServerHostOverride)) - { - channelOptions = new List - { - new ChannelOption(ChannelOptions.SslTargetNameOverride, options.ServerHostOverride) - }; - } - var channel = new Channel(options.ServerHost, options.ServerPort, credentials, channelOptions); - TestService.TestServiceClient client = new TestService.TestServiceClient(channel); - await RunTestCaseAsync(client, options); - await channel.ShutdownAsync(); + return credentials; } private async Task RunTestCaseAsync(TestService.TestServiceClient client, ClientOptions options) From c234f23ce7cb2b1a984e403c4d203b7089fc878c Mon Sep 17 00:00:00 2001 From: Masood Malekghassemi Date: Tue, 6 Oct 2015 14:43:37 -0700 Subject: [PATCH 154/169] Add verbosity back to Python testing output --- tools/run_tests/run_python.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/run_tests/run_python.sh b/tools/run_tests/run_python.sh index e2135be04c5..6f45c0aa7a7 100755 --- a/tools/run_tests/run_python.sh +++ b/tools/run_tests/run_python.sh @@ -40,4 +40,4 @@ export DYLD_LIBRARY_PATH=$ROOT/libs/$CONFIG export PATH=$ROOT/bins/$CONFIG:$ROOT/bins/$CONFIG/protobuf:$PATH source "python"$PYVER"_virtual_environment"/bin/activate -"python"$PYVER $GRPCIO_TEST/setup.py test -a "-n8 --cov=grpc --junitxml=./report.xml --timeout=300" +"python"$PYVER $GRPCIO_TEST/setup.py test -a "-n8 --cov=grpc --junitxml=./report.xml --timeout=300 -v" From bd52ac4080bfa70d173d822702ee54d1b062dcda Mon Sep 17 00:00:00 2001 From: Hannes Magnusson Date: Tue, 6 Oct 2015 15:26:41 -0700 Subject: [PATCH 155/169] Fix #2275 (Make sure PHP example can be run with Apache) Normal constants, like most other things, are cleaned up during RSHUTDOWN. We need to explicitly mark them as persistent using CONST_PERSISTENT --- src/php/ext/grpc/php_grpc.c | 111 +++++++++++++++++++++++------------- 1 file changed, 70 insertions(+), 41 deletions(-) diff --git a/src/php/ext/grpc/php_grpc.c b/src/php/ext/grpc/php_grpc.c index 0f730ea7567..4ad78ea0a31 100644 --- a/src/php/ext/grpc/php_grpc.c +++ b/src/php/ext/grpc/php_grpc.c @@ -109,91 +109,120 @@ PHP_MINIT_FUNCTION(grpc) { */ /* Register call error constants */ grpc_init(); - REGISTER_LONG_CONSTANT("Grpc\\CALL_OK", GRPC_CALL_OK, CONST_CS); - REGISTER_LONG_CONSTANT("Grpc\\CALL_ERROR", GRPC_CALL_ERROR, CONST_CS); + REGISTER_LONG_CONSTANT("Grpc\\CALL_OK", GRPC_CALL_OK, + CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT("Grpc\\CALL_ERROR", GRPC_CALL_ERROR, + CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("Grpc\\CALL_ERROR_NOT_ON_SERVER", - GRPC_CALL_ERROR_NOT_ON_SERVER, CONST_CS); + GRPC_CALL_ERROR_NOT_ON_SERVER, + CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("Grpc\\CALL_ERROR_NOT_ON_CLIENT", - GRPC_CALL_ERROR_NOT_ON_CLIENT, CONST_CS); + GRPC_CALL_ERROR_NOT_ON_CLIENT, + CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("Grpc\\CALL_ERROR_ALREADY_INVOKED", - GRPC_CALL_ERROR_ALREADY_INVOKED, CONST_CS); + GRPC_CALL_ERROR_ALREADY_INVOKED, + CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("Grpc\\CALL_ERROR_NOT_INVOKED", - GRPC_CALL_ERROR_NOT_INVOKED, CONST_CS); + GRPC_CALL_ERROR_NOT_INVOKED, + CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("Grpc\\CALL_ERROR_ALREADY_FINISHED", - GRPC_CALL_ERROR_ALREADY_FINISHED, CONST_CS); + GRPC_CALL_ERROR_ALREADY_FINISHED, + CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("Grpc\\CALL_ERROR_TOO_MANY_OPERATIONS", - GRPC_CALL_ERROR_TOO_MANY_OPERATIONS, CONST_CS); + GRPC_CALL_ERROR_TOO_MANY_OPERATIONS, + CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("Grpc\\CALL_ERROR_INVALID_FLAGS", - GRPC_CALL_ERROR_INVALID_FLAGS, CONST_CS); + GRPC_CALL_ERROR_INVALID_FLAGS, + CONST_CS | CONST_PERSISTENT); /* Register flag constants */ REGISTER_LONG_CONSTANT("Grpc\\WRITE_BUFFER_HINT", GRPC_WRITE_BUFFER_HINT, - CONST_CS); + CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("Grpc\\WRITE_NO_COMPRESS", GRPC_WRITE_NO_COMPRESS, - CONST_CS); + CONST_CS | CONST_PERSISTENT); /* Register status constants */ - REGISTER_LONG_CONSTANT("Grpc\\STATUS_OK", GRPC_STATUS_OK, CONST_CS); + REGISTER_LONG_CONSTANT("Grpc\\STATUS_OK", GRPC_STATUS_OK, + CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("Grpc\\STATUS_CANCELLED", GRPC_STATUS_CANCELLED, - CONST_CS); - REGISTER_LONG_CONSTANT("Grpc\\STATUS_UNKNOWN", GRPC_STATUS_UNKNOWN, CONST_CS); + CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT("Grpc\\STATUS_UNKNOWN", GRPC_STATUS_UNKNOWN, + CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("Grpc\\STATUS_INVALID_ARGUMENT", - GRPC_STATUS_INVALID_ARGUMENT, CONST_CS); + GRPC_STATUS_INVALID_ARGUMENT, + CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("Grpc\\STATUS_DEADLINE_EXCEEDED", - GRPC_STATUS_DEADLINE_EXCEEDED, CONST_CS); + GRPC_STATUS_DEADLINE_EXCEEDED, + CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("Grpc\\STATUS_NOT_FOUND", GRPC_STATUS_NOT_FOUND, - CONST_CS); + CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("Grpc\\STATUS_ALREADY_EXISTS", - GRPC_STATUS_ALREADY_EXISTS, CONST_CS); + GRPC_STATUS_ALREADY_EXISTS, + CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("Grpc\\STATUS_PERMISSION_DENIED", - GRPC_STATUS_PERMISSION_DENIED, CONST_CS); + GRPC_STATUS_PERMISSION_DENIED, + CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("Grpc\\STATUS_UNAUTHENTICATED", - GRPC_STATUS_UNAUTHENTICATED, CONST_CS); + GRPC_STATUS_UNAUTHENTICATED, + CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("Grpc\\STATUS_RESOURCE_EXHAUSTED", - GRPC_STATUS_RESOURCE_EXHAUSTED, CONST_CS); + GRPC_STATUS_RESOURCE_EXHAUSTED, + CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("Grpc\\STATUS_FAILED_PRECONDITION", - GRPC_STATUS_FAILED_PRECONDITION, CONST_CS); - REGISTER_LONG_CONSTANT("Grpc\\STATUS_ABORTED", GRPC_STATUS_ABORTED, CONST_CS); + GRPC_STATUS_FAILED_PRECONDITION, + CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT("Grpc\\STATUS_ABORTED", GRPC_STATUS_ABORTED, + CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("Grpc\\STATUS_OUT_OF_RANGE", GRPC_STATUS_OUT_OF_RANGE, - CONST_CS); + CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("Grpc\\STATUS_UNIMPLEMENTED", - GRPC_STATUS_UNIMPLEMENTED, CONST_CS); + GRPC_STATUS_UNIMPLEMENTED, + CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("Grpc\\STATUS_INTERNAL", GRPC_STATUS_INTERNAL, - CONST_CS); + CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("Grpc\\STATUS_UNAVAILABLE", GRPC_STATUS_UNAVAILABLE, - CONST_CS); + CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("Grpc\\STATUS_DATA_LOSS", GRPC_STATUS_DATA_LOSS, - CONST_CS); + CONST_CS | CONST_PERSISTENT); /* Register op type constants */ REGISTER_LONG_CONSTANT("Grpc\\OP_SEND_INITIAL_METADATA", - GRPC_OP_SEND_INITIAL_METADATA, CONST_CS); + GRPC_OP_SEND_INITIAL_METADATA, + CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("Grpc\\OP_SEND_MESSAGE", - GRPC_OP_SEND_MESSAGE, CONST_CS); + GRPC_OP_SEND_MESSAGE, + CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("Grpc\\OP_SEND_CLOSE_FROM_CLIENT", - GRPC_OP_SEND_CLOSE_FROM_CLIENT, CONST_CS); + GRPC_OP_SEND_CLOSE_FROM_CLIENT, + CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("Grpc\\OP_SEND_STATUS_FROM_SERVER", - GRPC_OP_SEND_STATUS_FROM_SERVER, CONST_CS); + GRPC_OP_SEND_STATUS_FROM_SERVER, + CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("Grpc\\OP_RECV_INITIAL_METADATA", - GRPC_OP_RECV_INITIAL_METADATA, CONST_CS); + GRPC_OP_RECV_INITIAL_METADATA, + CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("Grpc\\OP_RECV_MESSAGE", - GRPC_OP_RECV_MESSAGE, CONST_CS); + GRPC_OP_RECV_MESSAGE, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("Grpc\\OP_RECV_STATUS_ON_CLIENT", - GRPC_OP_RECV_STATUS_ON_CLIENT, CONST_CS); + GRPC_OP_RECV_STATUS_ON_CLIENT, + CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("Grpc\\OP_RECV_CLOSE_ON_SERVER", - GRPC_OP_RECV_CLOSE_ON_SERVER, CONST_CS); + GRPC_OP_RECV_CLOSE_ON_SERVER, + CONST_CS | CONST_PERSISTENT); /* Register connectivity state constants */ REGISTER_LONG_CONSTANT("Grpc\\CHANNEL_IDLE", - GRPC_CHANNEL_IDLE, CONST_CS); + GRPC_CHANNEL_IDLE, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("Grpc\\CHANNEL_CONNECTING", - GRPC_CHANNEL_CONNECTING, CONST_CS); + GRPC_CHANNEL_CONNECTING, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("Grpc\\CHANNEL_READY", - GRPC_CHANNEL_READY, CONST_CS); + GRPC_CHANNEL_READY, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("Grpc\\CHANNEL_TRANSIENT_FAILURE", - GRPC_CHANNEL_TRANSIENT_FAILURE, CONST_CS); + GRPC_CHANNEL_TRANSIENT_FAILURE, + CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("Grpc\\CHANNEL_FATAL_FAILURE", - GRPC_CHANNEL_FATAL_FAILURE, CONST_CS); + GRPC_CHANNEL_FATAL_FAILURE, + CONST_CS | CONST_PERSISTENT); grpc_init_call(TSRMLS_C); grpc_init_channel(TSRMLS_C); From f194d6f82856afb9dc7aee9ef2063ce08d7fdbeb Mon Sep 17 00:00:00 2001 From: Masood Malekghassemi Date: Tue, 6 Oct 2015 16:17:50 -0700 Subject: [PATCH 156/169] Set pytest-xdist-compatible pytest-timeout method --- tools/run_tests/run_python.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/run_tests/run_python.sh b/tools/run_tests/run_python.sh index 6f45c0aa7a7..848775e9b19 100755 --- a/tools/run_tests/run_python.sh +++ b/tools/run_tests/run_python.sh @@ -40,4 +40,4 @@ export DYLD_LIBRARY_PATH=$ROOT/libs/$CONFIG export PATH=$ROOT/bins/$CONFIG:$ROOT/bins/$CONFIG/protobuf:$PATH source "python"$PYVER"_virtual_environment"/bin/activate -"python"$PYVER $GRPCIO_TEST/setup.py test -a "-n8 --cov=grpc --junitxml=./report.xml --timeout=300 -v" +"python"$PYVER $GRPCIO_TEST/setup.py test -a "-n8 --cov=grpc --junitxml=./report.xml --timeout=300 -v --boxed --timeout_method=thread" From f20d7db554e1d1d3085b23c1b73391d078ab0e91 Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Tue, 6 Oct 2015 16:51:50 -0700 Subject: [PATCH 157/169] Fixed issues with binary metadata type checking --- src/node/ext/call.cc | 5 +++-- src/node/src/metadata.js | 5 ++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/node/ext/call.cc b/src/node/ext/call.cc index b08a9f96d81..f98fe2463b6 100644 --- a/src/node/ext/call.cc +++ b/src/node/ext/call.cc @@ -168,8 +168,9 @@ Local ParseMetadata(const grpc_metadata_array *metadata_array) { } if (EndsWith(elem->key, "-bin")) { Nan::Set(array, index_map[elem->key], - Nan::CopyBuffer(elem->value, - elem->value_length).ToLocalChecked()); + MakeFastBuffer( + Nan::CopyBuffer(elem->value, + elem->value_length).ToLocalChecked())); } else { Nan::Set(array, index_map[elem->key], Nan::New(elem->value).ToLocalChecked()); diff --git a/src/node/src/metadata.js b/src/node/src/metadata.js index c1da70b1974..5c24e46c9b2 100644 --- a/src/node/src/metadata.js +++ b/src/node/src/metadata.js @@ -59,6 +59,7 @@ function normalizeKey(key) { function validate(key, value) { if (_.endsWith(key, '-bin')) { if (!(value instanceof Buffer)) { + console.log(value.constructor.toString()); throw new Error('keys that end with \'-bin\' must have Buffer values'); } } else { @@ -173,7 +174,9 @@ Metadata.prototype._getCoreRepresentation = function() { Metadata._fromCoreRepresentation = function(metadata) { var newMetadata = new Metadata(); if (metadata) { - newMetadata._internal_repr = _.cloneDeep(metadata); + _.forOwn(metadata, function(value, key) { + newMetadata._internal_repr[key] = _.clone(value); + }); } return newMetadata; }; From 5bd7005833b60d9db31860049458b122fa496599 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Tue, 6 Oct 2015 16:47:49 -0700 Subject: [PATCH 158/169] introduce the new split-type credentials api --- src/csharp/Grpc.Auth/GrpcCredentials.cs | 10 +- ...dentialsTest.cs => CallCredentialsTest.cs} | 58 +------ .../Grpc.Core.Tests/ChannelCredentialsTest.cs | 73 +++++++++ src/csharp/Grpc.Core.Tests/ChannelTest.cs | 10 +- src/csharp/Grpc.Core.Tests/FakeCredentials.cs | 73 +++++++++ .../Grpc.Core.Tests/Grpc.Core.Tests.csproj | 4 +- .../Grpc.Core.Tests/Internal/AsyncCallTest.cs | 2 +- .../Grpc.Core.Tests/MockServiceHelper.cs | 2 +- src/csharp/Grpc.Core/CallCredentials.cs | 142 +++++++++++++++++ src/csharp/Grpc.Core/CallOptions.cs | 6 +- src/csharp/Grpc.Core/Channel.cs | 4 +- .../{Credentials.cs => ChannelCredentials.cs} | 146 ++++++++---------- src/csharp/Grpc.Core/Grpc.Core.csproj | 3 +- .../Grpc.Examples.MathClient/MathClient.cs | 2 +- .../MathClientServerTests.cs | 2 +- .../HealthClientServerTest.cs | 2 +- .../Grpc.IntegrationTesting/InteropClient.cs | 8 +- .../MetadataCredentialsTest.cs | 2 +- 18 files changed, 393 insertions(+), 156 deletions(-) rename src/csharp/Grpc.Core.Tests/{CredentialsTest.cs => CallCredentialsTest.cs} (52%) create mode 100644 src/csharp/Grpc.Core.Tests/ChannelCredentialsTest.cs create mode 100644 src/csharp/Grpc.Core.Tests/FakeCredentials.cs create mode 100644 src/csharp/Grpc.Core/CallCredentials.cs rename src/csharp/Grpc.Core/{Credentials.cs => ChannelCredentials.cs} (61%) diff --git a/src/csharp/Grpc.Auth/GrpcCredentials.cs b/src/csharp/Grpc.Auth/GrpcCredentials.cs index 496d8e14164..d8b10804c6e 100644 --- a/src/csharp/Grpc.Auth/GrpcCredentials.cs +++ b/src/csharp/Grpc.Auth/GrpcCredentials.cs @@ -41,7 +41,7 @@ using Grpc.Core.Utils; namespace Grpc.Auth { /// - /// Factory methods to create instances of class. + /// Factory methods to create instances of and classes. /// public static class GrpcCredentials { @@ -57,15 +57,15 @@ namespace Grpc.Auth } /// - /// Convenience method to create a instance from + /// Convenience method to create a instance from /// ITokenAccess credential and SslCredentials instance. /// /// The credential to use to obtain access tokens. /// The SslCredentials instance. - /// The composite credential for access token based auth over a secure channel. - public static CompositeCredentials Create(ITokenAccess credential, SslCredentials sslCredentials) + /// The channel credentials for access token based auth over a secure channel. + public static ChannelCredentials Create(ITokenAccess credential, SslCredentials sslCredentials) { - return CompositeCredentials.Create(Create(credential), sslCredentials); + return ChannelCredentials.Create(sslCredentials, Create(credential)); } /// diff --git a/src/csharp/Grpc.Core.Tests/CredentialsTest.cs b/src/csharp/Grpc.Core.Tests/CallCredentialsTest.cs similarity index 52% rename from src/csharp/Grpc.Core.Tests/CredentialsTest.cs rename to src/csharp/Grpc.Core.Tests/CallCredentialsTest.cs index 5048144f98a..451963229a4 100644 --- a/src/csharp/Grpc.Core.Tests/CredentialsTest.cs +++ b/src/csharp/Grpc.Core.Tests/CallCredentialsTest.cs @@ -43,67 +43,23 @@ using NUnit.Framework; namespace Grpc.Core.Tests { - public class CredentialsTest + public class CallCredentialsTest { [Test] - public void InsecureCredentials_IsNonComposable() + public void CallCredentials_ComposeAtLeastTwo() { - Assert.IsFalse(Credentials.Insecure.IsComposable); + Assert.Throws(typeof(ArgumentException), () => CallCredentials.Compose(new FakeCallCredentials())); } [Test] - public void CompositeCredentials_Create() + public void CallCredentials_ToNativeCredentials() { - new CompositeCredentials(new FakeCredentials(true), new FakeCredentials(true), new FakeCredentials(true)); - } - - [Test] - public void CompositeCredentials_ComposeAtLeastTwo() - { - Assert.Throws(typeof(ArgumentException), () => new CompositeCredentials(new FakeCredentials(true))); - } - - [Test] - public void CompositeCredentials_ForbidsNonComposable() - { - Assert.Throws(typeof(ArgumentException), () => new CompositeCredentials(new FakeCredentials(true), new FakeCredentials(false))); - } - - [Test] - public void CompositeCredentials_ToNativeCredentials() - { - var composite = new CompositeCredentials(new MetadataCredentials(async (uri, m) => { await Task.Delay(1); }), new SslCredentials()); + var composite = CallCredentials.Compose( + new MetadataCredentials(async (uri, m) => { await Task.Delay(1); }), + new MetadataCredentials(async (uri, m) => { await Task.Delay(2); })); using (var nativeComposite = composite.ToNativeCredentials()) { } } - - [Test] - public void CompositeCredentials_OnlyOneConnectorCredentialAllowed() - { - var composite = new CompositeCredentials(new SslCredentials(), new SslCredentials()); - // it makes no sense to compose multiple ssl credentials. - Assert.Throws(typeof(ArgumentException), () => composite.ToNativeCredentials()); - } - - private class FakeCredentials : Credentials - { - readonly bool composable; - - public FakeCredentials(bool composable) - { - this.composable = composable; - } - - internal override bool IsComposable - { - get { return composable; } - } - - internal override CredentialsSafeHandle ToNativeCredentials() - { - return null; - } - } } } diff --git a/src/csharp/Grpc.Core.Tests/ChannelCredentialsTest.cs b/src/csharp/Grpc.Core.Tests/ChannelCredentialsTest.cs new file mode 100644 index 00000000000..489bf385756 --- /dev/null +++ b/src/csharp/Grpc.Core.Tests/ChannelCredentialsTest.cs @@ -0,0 +1,73 @@ +#region Copyright notice and license + +// Copyright 2015, Google Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +#endregion + +using System; +using System.Diagnostics; +using System.Runtime.InteropServices; +using System.Threading; +using System.Threading.Tasks; +using Grpc.Core; +using Grpc.Core.Internal; +using Grpc.Core.Utils; +using NUnit.Framework; + +namespace Grpc.Core.Tests +{ + public class ChannelCredentialsTest + { + [Test] + public void InsecureCredentials_IsNonComposable() + { + Assert.IsFalse(ChannelCredentials.Insecure.IsComposable); + } + + [Test] + public void ChannelCredentials_CreateComposite() + { + var composite = ChannelCredentials.Create(new FakeChannelCredentials(true), new FakeCallCredentials()); + Assert.IsFalse(composite.IsComposable); + + Assert.Throws(typeof(ArgumentNullException), () => ChannelCredentials.Create(null, new FakeCallCredentials())); + Assert.Throws(typeof(ArgumentNullException), () => ChannelCredentials.Create(new FakeChannelCredentials(true), null)); + + // forbid composing non-composable + Assert.Throws(typeof(ArgumentException), () => ChannelCredentials.Create(new FakeChannelCredentials(false), new FakeCallCredentials())); + } + + [Test] + public void ChannelCredentials_CreateWrapped() + { + ChannelCredentials.Create(new FakeCallCredentials()); + } + } +} diff --git a/src/csharp/Grpc.Core.Tests/ChannelTest.cs b/src/csharp/Grpc.Core.Tests/ChannelTest.cs index dfbd92879e7..f4ae9abefd8 100644 --- a/src/csharp/Grpc.Core.Tests/ChannelTest.cs +++ b/src/csharp/Grpc.Core.Tests/ChannelTest.cs @@ -44,13 +44,13 @@ namespace Grpc.Core.Tests [Test] public void Constructor_RejectsInvalidParams() { - Assert.Throws(typeof(ArgumentNullException), () => new Channel(null, Credentials.Insecure)); + Assert.Throws(typeof(ArgumentNullException), () => new Channel(null, ChannelCredentials.Insecure)); } [Test] public void State_IdleAfterCreation() { - var channel = new Channel("localhost", Credentials.Insecure); + var channel = new Channel("localhost", ChannelCredentials.Insecure); Assert.AreEqual(ChannelState.Idle, channel.State); channel.ShutdownAsync().Wait(); } @@ -58,7 +58,7 @@ namespace Grpc.Core.Tests [Test] public void WaitForStateChangedAsync_InvalidArgument() { - var channel = new Channel("localhost", Credentials.Insecure); + var channel = new Channel("localhost", ChannelCredentials.Insecure); Assert.Throws(typeof(ArgumentException), () => channel.WaitForStateChangedAsync(ChannelState.FatalFailure)); channel.ShutdownAsync().Wait(); } @@ -66,7 +66,7 @@ namespace Grpc.Core.Tests [Test] public void ResolvedTarget() { - var channel = new Channel("127.0.0.1", Credentials.Insecure); + var channel = new Channel("127.0.0.1", ChannelCredentials.Insecure); Assert.IsTrue(channel.ResolvedTarget.Contains("127.0.0.1")); channel.ShutdownAsync().Wait(); } @@ -74,7 +74,7 @@ namespace Grpc.Core.Tests [Test] public void Shutdown_AllowedOnlyOnce() { - var channel = new Channel("localhost", Credentials.Insecure); + var channel = new Channel("localhost", ChannelCredentials.Insecure); channel.ShutdownAsync().Wait(); Assert.Throws(typeof(InvalidOperationException), () => channel.ShutdownAsync().GetAwaiter().GetResult()); } diff --git a/src/csharp/Grpc.Core.Tests/FakeCredentials.cs b/src/csharp/Grpc.Core.Tests/FakeCredentials.cs new file mode 100644 index 00000000000..87d55cd276a --- /dev/null +++ b/src/csharp/Grpc.Core.Tests/FakeCredentials.cs @@ -0,0 +1,73 @@ +#region Copyright notice and license + +// Copyright 2015, Google Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +#endregion + +using System; +using System.Diagnostics; +using System.Runtime.InteropServices; +using System.Threading; +using System.Threading.Tasks; +using Grpc.Core; +using Grpc.Core.Internal; +using Grpc.Core.Utils; +using NUnit.Framework; + +namespace Grpc.Core.Tests +{ + internal class FakeChannelCredentials : ChannelCredentials + { + readonly bool composable; + + public FakeChannelCredentials(bool composable) + { + this.composable = composable; + } + + internal override bool IsComposable + { + get { return composable; } + } + + internal override CredentialsSafeHandle ToNativeCredentials() + { + return null; + } + } + + internal class FakeCallCredentials : CallCredentials + { + internal override CredentialsSafeHandle ToNativeCredentials() + { + return null; + } + } +} diff --git a/src/csharp/Grpc.Core.Tests/Grpc.Core.Tests.csproj b/src/csharp/Grpc.Core.Tests/Grpc.Core.Tests.csproj index 0ebfaa0a62d..91d072ababe 100644 --- a/src/csharp/Grpc.Core.Tests/Grpc.Core.Tests.csproj +++ b/src/csharp/Grpc.Core.Tests/Grpc.Core.Tests.csproj @@ -63,8 +63,10 @@ Version.cs + + - + diff --git a/src/csharp/Grpc.Core.Tests/Internal/AsyncCallTest.cs b/src/csharp/Grpc.Core.Tests/Internal/AsyncCallTest.cs index 685c5f7d6cb..246072bff13 100644 --- a/src/csharp/Grpc.Core.Tests/Internal/AsyncCallTest.cs +++ b/src/csharp/Grpc.Core.Tests/Internal/AsyncCallTest.cs @@ -49,7 +49,7 @@ namespace Grpc.Core.Internal.Tests [SetUp] public void Init() { - channel = new Channel("localhost", Credentials.Insecure); + channel = new Channel("localhost", ChannelCredentials.Insecure); fakeCall = new FakeNativeCall(); diff --git a/src/csharp/Grpc.Core.Tests/MockServiceHelper.cs b/src/csharp/Grpc.Core.Tests/MockServiceHelper.cs index 765732c7687..567e04eddcc 100644 --- a/src/csharp/Grpc.Core.Tests/MockServiceHelper.cs +++ b/src/csharp/Grpc.Core.Tests/MockServiceHelper.cs @@ -154,7 +154,7 @@ namespace Grpc.Core.Tests { if (channel == null) { - channel = new Channel(Host, GetServer().Ports.Single().BoundPort, Credentials.Insecure); + channel = new Channel(Host, GetServer().Ports.Single().BoundPort, ChannelCredentials.Insecure); } return channel; } diff --git a/src/csharp/Grpc.Core/CallCredentials.cs b/src/csharp/Grpc.Core/CallCredentials.cs new file mode 100644 index 00000000000..809c9f412d0 --- /dev/null +++ b/src/csharp/Grpc.Core/CallCredentials.cs @@ -0,0 +1,142 @@ +#region Copyright notice and license + +// Copyright 2015, Google Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +#endregion + +using System; +using System.Collections.Generic; +using System.Threading.Tasks; + +using Grpc.Core.Internal; +using Grpc.Core.Utils; + +namespace Grpc.Core +{ + /// + /// Client-side call credentials. Provide authorization with per-call granularity. + /// + public abstract class CallCredentials + { + /// + /// Composes multiple multiple CallCredentials objects into + /// a single CallCredentials object. + /// + /// credentials to compose + /// The new CompositeCallCredentials + public static CallCredentials Compose(params CallCredentials[] credentials) + { + return new CompositeCallCredentials(credentials); + } + + /// + /// Creates native object for the credentials. + /// + /// The native credentials. + internal abstract CredentialsSafeHandle ToNativeCredentials(); + } + + /// + /// Asynchronous authentication interceptor for . + /// + /// URL of a service to which current remote call needs to authenticate + /// Metadata to populate with entries that will be added to outgoing call's headers. + /// + public delegate Task AsyncAuthInterceptor(string authUri, Metadata metadata); + + /// + /// Client-side credentials that delegate metadata based auth to an interceptor. + /// The interceptor is automatically invoked for each remote call that uses MetadataCredentials. + /// + public class MetadataCredentials : CallCredentials + { + readonly AsyncAuthInterceptor interceptor; + + /// + /// Initializes a new instance of MetadataCredentials class. + /// + /// authentication interceptor + public MetadataCredentials(AsyncAuthInterceptor interceptor) + { + this.interceptor = interceptor; + } + + internal override CredentialsSafeHandle ToNativeCredentials() + { + NativeMetadataCredentialsPlugin plugin = new NativeMetadataCredentialsPlugin(interceptor); + return plugin.Credentials; + } + } + + /// + /// Credentials that allow composing multiple credentials objects into one object. + /// + internal sealed class CompositeCallCredentials : CallCredentials + { + readonly List credentials; + + /// + /// Initializes a new instance of CompositeCallCredentials class. + /// The resulting credentials object will be composite of all the credentials specified as parameters. + /// + /// credentials to compose + public CompositeCallCredentials(params CallCredentials[] credentials) + { + Preconditions.CheckArgument(credentials.Length >= 2, "Composite credentials object can only be created from 2 or more credentials."); + this.credentials = new List(credentials); + } + + internal override CredentialsSafeHandle ToNativeCredentials() + { + return ToNativeRecursive(0); + } + + // Recursive descent makes managing lifetime of intermediate CredentialSafeHandle instances easier. + // In practice, we won't usually see composites from more than two credentials anyway. + private CredentialsSafeHandle ToNativeRecursive(int startIndex) + { + if (startIndex == credentials.Count - 1) + { + return credentials[startIndex].ToNativeCredentials(); + } + + using (var cred1 = credentials[startIndex].ToNativeCredentials()) + using (var cred2 = ToNativeRecursive(startIndex + 1)) + { + var nativeComposite = CredentialsSafeHandle.CreateComposite(cred1, cred2); + if (nativeComposite.IsInvalid) + { + throw new ArgumentException("Error creating native composite credentials. Likely, this is because you are trying to compose incompatible credentials."); + } + return nativeComposite; + } + } + } +} diff --git a/src/csharp/Grpc.Core/CallOptions.cs b/src/csharp/Grpc.Core/CallOptions.cs index c708fcdfc49..c0f94c63c2f 100644 --- a/src/csharp/Grpc.Core/CallOptions.cs +++ b/src/csharp/Grpc.Core/CallOptions.cs @@ -49,7 +49,7 @@ namespace Grpc.Core CancellationToken cancellationToken; WriteOptions writeOptions; ContextPropagationToken propagationToken; - Credentials credentials; + CallCredentials credentials; /// /// Creates a new instance of CallOptions struct. @@ -61,7 +61,7 @@ namespace Grpc.Core /// Context propagation token obtained from . /// Credentials to use for this call. public CallOptions(Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken), - WriteOptions writeOptions = null, ContextPropagationToken propagationToken = null, Credentials credentials = null) + WriteOptions writeOptions = null, ContextPropagationToken propagationToken = null, CallCredentials credentials = null) { this.headers = headers; this.deadline = deadline; @@ -120,7 +120,7 @@ namespace Grpc.Core /// /// Credentials to use for this call. /// - public Credentials Credentials + public CallCredentials Credentials { get { diff --git a/src/csharp/Grpc.Core/Channel.cs b/src/csharp/Grpc.Core/Channel.cs index f1942727cde..6b99055d4c8 100644 --- a/src/csharp/Grpc.Core/Channel.cs +++ b/src/csharp/Grpc.Core/Channel.cs @@ -68,7 +68,7 @@ namespace Grpc.Core /// Target of the channel. /// Credentials to secure the channel. /// Channel options. - public Channel(string target, Credentials credentials, IEnumerable options = null) + public Channel(string target, ChannelCredentials credentials, IEnumerable options = null) { this.target = Preconditions.CheckNotNull(target, "target"); this.environment = GrpcEnvironment.AddRef(); @@ -96,7 +96,7 @@ namespace Grpc.Core /// The port. /// Credentials to secure the channel. /// Channel options. - public Channel(string host, int port, Credentials credentials, IEnumerable options = null) : + public Channel(string host, int port, ChannelCredentials credentials, IEnumerable options = null) : this(string.Format("{0}:{1}", host, port), credentials, options) { } diff --git a/src/csharp/Grpc.Core/Credentials.cs b/src/csharp/Grpc.Core/ChannelCredentials.cs similarity index 61% rename from src/csharp/Grpc.Core/Credentials.cs rename to src/csharp/Grpc.Core/ChannelCredentials.cs index fcef627b25e..599674e02bd 100644 --- a/src/csharp/Grpc.Core/Credentials.cs +++ b/src/csharp/Grpc.Core/ChannelCredentials.cs @@ -41,17 +41,17 @@ using Grpc.Core.Utils; namespace Grpc.Core { /// - /// Client-side credentials. Used for creation of a secure channel. + /// Client-side channel credentials. Used for creation of a secure channel. /// - public abstract class Credentials + public abstract class ChannelCredentials { - static readonly Credentials InsecureInstance = new InsecureCredentialsImpl(); + static readonly ChannelCredentials InsecureInstance = new InsecureCredentialsImpl(); /// - /// Returns instance of credential that provides no security and + /// Returns instance of credentials that provides no security and /// will result in creating an unsecure channel with no encryption whatsoever. /// - public static Credentials Insecure + public static ChannelCredentials Insecure { get { @@ -59,6 +59,29 @@ namespace Grpc.Core } } + /// + /// Creates a new instance of ChannelCredentials class by composing + /// given channel credentials with call credentials. + /// + /// Channel credentials. + /// Call credentials. + /// The new composite ChannelCredentials + public static ChannelCredentials Create(ChannelCredentials channelCredentials, CallCredentials callCredentials) + { + return new CompositeChannelCredentials(channelCredentials, callCredentials); + } + + /// + /// Creates a new instance of ChannelCredentials by wrapping + /// an instance of CallCredentials. + /// + /// Call credentials. + /// The ChannelCredentials wrapping given call credentials. + public static ChannelCredentials Create(CallCredentials callCredentials) + { + return new WrappedCallCredentials(callCredentials); + } + /// /// Creates native object for the credentials. May return null if insecure channel /// should be created. @@ -71,28 +94,22 @@ namespace Grpc.Core /// internal virtual bool IsComposable { - get { return true; } + get { return false; } } - private sealed class InsecureCredentialsImpl : Credentials + private sealed class InsecureCredentialsImpl : ChannelCredentials { internal override CredentialsSafeHandle ToNativeCredentials() { return null; } - - // Composing insecure credentials makes no sense. - internal override bool IsComposable - { - get { return false; } - } } } /// /// Client-side SSL credentials. /// - public sealed class SslCredentials : Credentials + public sealed class SslCredentials : ChannelCredentials { readonly string rootCertificates; readonly KeyCertificatePair keyCertificatePair; @@ -148,6 +165,12 @@ namespace Grpc.Core } } + // Composing composite makes no sense. + internal override bool IsComposable + { + get { return true; } + } + internal override CredentialsSafeHandle ToNativeCredentials() { return CredentialsSafeHandle.CreateSslCredentials(rootCertificates, keyCertificatePair); @@ -155,94 +178,61 @@ namespace Grpc.Core } /// - /// Asynchronous authentication interceptor for . + /// Credentials that allow composing one object and + /// one or more objects into a single . /// - /// URL of a service to which current remote call needs to authenticate - /// Metadata to populate with entries that will be added to outgoing call's headers. - /// - public delegate Task AsyncAuthInterceptor(string authUri, Metadata metadata); - - /// - /// Client-side credentials that delegate metadata based auth to an interceptor. - /// The interceptor is automatically invoked for each remote call that uses MetadataCredentials. - /// - public partial class MetadataCredentials : Credentials + internal sealed class CompositeChannelCredentials : ChannelCredentials { - readonly AsyncAuthInterceptor interceptor; + readonly ChannelCredentials channelCredentials; + readonly CallCredentials callCredentials; /// - /// Initializes a new instance of MetadataCredentials class. + /// Initializes a new instance of CompositeChannelCredentials class. + /// The resulting credentials object will be composite of all the credentials specified as parameters. /// - /// authentication interceptor - public MetadataCredentials(AsyncAuthInterceptor interceptor) + /// channelCredentials to compose + /// channelCredentials to compose + public CompositeChannelCredentials(ChannelCredentials channelCredentials, CallCredentials callCredentials) { - this.interceptor = interceptor; + this.channelCredentials = Preconditions.CheckNotNull(channelCredentials); + this.callCredentials = Preconditions.CheckNotNull(callCredentials); + Preconditions.CheckArgument(channelCredentials.IsComposable, "Supplied channel credentials do not allow composition."); } internal override CredentialsSafeHandle ToNativeCredentials() { - NativeMetadataCredentialsPlugin plugin = new NativeMetadataCredentialsPlugin(interceptor); - return plugin.Credentials; + using (var cred1 = channelCredentials.ToNativeCredentials()) + using (var cred2 = callCredentials.ToNativeCredentials()) + { + var nativeComposite = CredentialsSafeHandle.CreateComposite(cred1, cred2); + if (nativeComposite.IsInvalid) + { + throw new ArgumentException("Error creating native composite credentials. Likely, this is because you are trying to compose incompatible credentials."); + } + return nativeComposite; + } } } /// - /// Credentials that allow composing multiple credentials objects into one object. + /// Credentials wrapping as . /// - public sealed class CompositeCredentials : Credentials + internal sealed class WrappedCallCredentials : ChannelCredentials { - readonly List credentials; + readonly CallCredentials callCredentials; /// - /// Initializes a new instance of CompositeCredentials class. - /// The resulting credentials object will be composite of all the credentials specified as parameters. + /// Wraps instance of CallCredentials as ChannelCredentials. /// - /// credentials to compose - public CompositeCredentials(params Credentials[] credentials) + /// credentials to wrap + public WrappedCallCredentials(CallCredentials callCredentials) { - Preconditions.CheckArgument(credentials.Length >= 2, "Composite credentials object can only be created from 2 or more credentials."); - foreach (var cred in credentials) - { - Preconditions.CheckArgument(cred.IsComposable, "Cannot create composite credentials: one or more credential objects do not allow composition."); - } - this.credentials = new List(credentials); - } - - /// - /// Creates a new instance of CompositeCredentials class by composing - /// multiple Credentials objects. - /// - /// credentials to compose - /// The new CompositeCredentials - public static CompositeCredentials Create(params Credentials[] credentials) - { - return new CompositeCredentials(credentials); + this.callCredentials = Preconditions.CheckNotNull(callCredentials); } internal override CredentialsSafeHandle ToNativeCredentials() { - return ToNativeRecursive(0); - } - - // Recursive descent makes managing lifetime of intermediate CredentialSafeHandle instances easier. - // In practice, we won't usually see composites from more than two credentials anyway. - private CredentialsSafeHandle ToNativeRecursive(int startIndex) - { - if (startIndex == credentials.Count - 1) - { - return credentials[startIndex].ToNativeCredentials(); - } - - using (var cred1 = credentials[startIndex].ToNativeCredentials()) - using (var cred2 = ToNativeRecursive(startIndex + 1)) - { - var nativeComposite = CredentialsSafeHandle.CreateComposite(cred1, cred2); - if (nativeComposite.IsInvalid) - { - throw new ArgumentException("Error creating native composite credentials. Likely, this is because you are trying to compose incompatible credentials."); - } - return nativeComposite; - } + return callCredentials.ToNativeCredentials(); } } } diff --git a/src/csharp/Grpc.Core/Grpc.Core.csproj b/src/csharp/Grpc.Core/Grpc.Core.csproj index 04c3eda1130..92d4e19eac2 100644 --- a/src/csharp/Grpc.Core/Grpc.Core.csproj +++ b/src/csharp/Grpc.Core/Grpc.Core.csproj @@ -48,6 +48,7 @@ + @@ -80,7 +81,7 @@ - + diff --git a/src/csharp/Grpc.Examples.MathClient/MathClient.cs b/src/csharp/Grpc.Examples.MathClient/MathClient.cs index 01e4a80babc..64e429ed5a3 100644 --- a/src/csharp/Grpc.Examples.MathClient/MathClient.cs +++ b/src/csharp/Grpc.Examples.MathClient/MathClient.cs @@ -39,7 +39,7 @@ namespace Math { public static void Main(string[] args) { - var channel = new Channel("127.0.0.1", 23456, Credentials.Insecure); + var channel = new Channel("127.0.0.1", 23456, ChannelCredentials.Insecure); Math.IMathClient client = new Math.MathClient(channel); MathExamples.DivExample(client); diff --git a/src/csharp/Grpc.Examples.Tests/MathClientServerTests.cs b/src/csharp/Grpc.Examples.Tests/MathClientServerTests.cs index e2975b5da93..290d42808e7 100644 --- a/src/csharp/Grpc.Examples.Tests/MathClientServerTests.cs +++ b/src/csharp/Grpc.Examples.Tests/MathClientServerTests.cs @@ -61,7 +61,7 @@ namespace Math.Tests Ports = { { Host, ServerPort.PickUnused, ServerCredentials.Insecure } } }; server.Start(); - channel = new Channel(Host, server.Ports.Single().BoundPort, Credentials.Insecure); + channel = new Channel(Host, server.Ports.Single().BoundPort, ChannelCredentials.Insecure); client = Math.NewClient(channel); } diff --git a/src/csharp/Grpc.HealthCheck.Tests/HealthClientServerTest.cs b/src/csharp/Grpc.HealthCheck.Tests/HealthClientServerTest.cs index 6c3a53bec05..d90f21c2e1c 100644 --- a/src/csharp/Grpc.HealthCheck.Tests/HealthClientServerTest.cs +++ b/src/csharp/Grpc.HealthCheck.Tests/HealthClientServerTest.cs @@ -63,7 +63,7 @@ namespace Grpc.HealthCheck.Tests Ports = { { Host, ServerPort.PickUnused, ServerCredentials.Insecure } } }; server.Start(); - channel = new Channel(Host, server.Ports.Single().BoundPort, Credentials.Insecure); + channel = new Channel(Host, server.Ports.Single().BoundPort, ChannelCredentials.Insecure); client = Grpc.Health.V1Alpha.Health.NewClient(channel); } diff --git a/src/csharp/Grpc.IntegrationTesting/InteropClient.cs b/src/csharp/Grpc.IntegrationTesting/InteropClient.cs index c99084d1a90..0df4ee35ba9 100644 --- a/src/csharp/Grpc.IntegrationTesting/InteropClient.cs +++ b/src/csharp/Grpc.IntegrationTesting/InteropClient.cs @@ -132,22 +132,22 @@ namespace Grpc.IntegrationTesting await channel.ShutdownAsync(); } - private async Task CreateCredentialsAsync() + private async Task CreateCredentialsAsync() { - var credentials = options.UseTls ? TestCredentials.CreateTestClientCredentials(options.UseTestCa) : Credentials.Insecure; + var credentials = options.UseTls ? TestCredentials.CreateTestClientCredentials(options.UseTestCa) : ChannelCredentials.Insecure; if (options.TestCase == "jwt_token_creds") { var googleCredential = await GoogleCredential.GetApplicationDefaultAsync(); Assert.IsTrue(googleCredential.IsCreateScopedRequired); - credentials = CompositeCredentials.Create(googleCredential.ToGrpcCredentials(), credentials); + credentials = ChannelCredentials.Create(credentials, googleCredential.ToGrpcCredentials()); } if (options.TestCase == "compute_engine_creds") { var googleCredential = await GoogleCredential.GetApplicationDefaultAsync(); Assert.IsFalse(googleCredential.IsCreateScopedRequired); - credentials = CompositeCredentials.Create(googleCredential.ToGrpcCredentials(), credentials); + credentials = ChannelCredentials.Create(credentials, googleCredential.ToGrpcCredentials()); } return credentials; } diff --git a/src/csharp/Grpc.IntegrationTesting/MetadataCredentialsTest.cs b/src/csharp/Grpc.IntegrationTesting/MetadataCredentialsTest.cs index 790bade89d4..5325b2fa148 100644 --- a/src/csharp/Grpc.IntegrationTesting/MetadataCredentialsTest.cs +++ b/src/csharp/Grpc.IntegrationTesting/MetadataCredentialsTest.cs @@ -73,7 +73,7 @@ namespace Grpc.IntegrationTesting metadata.Add("authorization", "SECRET_TOKEN"); }); - var clientCredentials = CompositeCredentials.Create( + var clientCredentials = ChannelCredentials.Create( new SslCredentials(File.ReadAllText(TestCredentials.ClientCertAuthorityPath)), new MetadataCredentials(asyncAuthInterceptor)); channel = new Channel(Host, server.Ports.Single().BoundPort, clientCredentials, options); From c6787b263fbf31510fce389304d9a11da0d8aa2f Mon Sep 17 00:00:00 2001 From: Robbie Shade Date: Wed, 7 Oct 2015 10:13:53 -0400 Subject: [PATCH 159/169] Fix broken udp_server_test, by adding exec_ctx to read_cb --- src/core/iomgr/udp_server.c | 2 +- src/core/iomgr/udp_server.h | 3 ++- test/core/iomgr/udp_server_test.c | 3 ++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/core/iomgr/udp_server.c b/src/core/iomgr/udp_server.c index 1304f2067ea..9903e970e66 100644 --- a/src/core/iomgr/udp_server.c +++ b/src/core/iomgr/udp_server.c @@ -278,7 +278,7 @@ static void on_read(grpc_exec_ctx *exec_ctx, void *arg, int success) { /* Tell the registered callback that data is available to read. */ GPR_ASSERT(sp->read_cb); - sp->read_cb(sp->emfd, sp->server->grpc_server); + sp->read_cb(exec_ctx, sp->emfd, sp->server->grpc_server); /* Re-arm the notification event so we get another chance to read. */ grpc_fd_notify_on_read(exec_ctx, sp->emfd, &sp->read_closure); diff --git a/src/core/iomgr/udp_server.h b/src/core/iomgr/udp_server.h index dbbe0971093..de5736c4262 100644 --- a/src/core/iomgr/udp_server.h +++ b/src/core/iomgr/udp_server.h @@ -43,7 +43,8 @@ typedef struct grpc_server grpc_server; typedef struct grpc_udp_server grpc_udp_server; /* Called when data is available to read from the socket. */ -typedef void (*grpc_udp_server_read_cb)(grpc_fd *emfd, grpc_server *server); +typedef void (*grpc_udp_server_read_cb)(grpc_exec_ctx *exec_ctx, grpc_fd *emfd, + grpc_server *server); /* Create a server, initially not bound to any ports */ grpc_udp_server *grpc_udp_server_create(void); diff --git a/test/core/iomgr/udp_server_test.c b/test/core/iomgr/udp_server_test.c index fc0026da4df..86e87679378 100644 --- a/test/core/iomgr/udp_server_test.c +++ b/test/core/iomgr/udp_server_test.c @@ -49,7 +49,8 @@ static grpc_pollset g_pollset; static int g_number_of_reads = 0; static int g_number_of_bytes_read = 0; -static void on_read(grpc_fd *emfd, grpc_server *server) { +static void on_read(grpc_exec_ctx *exec_ctx, grpc_fd *emfd, + grpc_server *server) { char read_buffer[512]; ssize_t byte_count; From 4e7ea93614ba22180ae6b7b840cfec8547c9c2a8 Mon Sep 17 00:00:00 2001 From: Nathaniel Manista Date: Wed, 7 Oct 2015 14:34:08 +0000 Subject: [PATCH 160/169] "gRPC in 3 minutes" for Python --- examples/python/README.md | 55 +++++ examples/python/helloworld/helloworld_pb2.py | 202 +++++++++++++++++++ 2 files changed, 257 insertions(+) create mode 100644 examples/python/README.md create mode 100644 examples/python/helloworld/helloworld_pb2.py diff --git a/examples/python/README.md b/examples/python/README.md new file mode 100644 index 00000000000..7b48c824bae --- /dev/null +++ b/examples/python/README.md @@ -0,0 +1,55 @@ +gRPC in 3 minutes (Python) +======================== + +Background +------------- +For this sample, we've already generated the server and client stubs from +[helloworld.proto][] and we'll be using a specific reference platform. + +Prerequisites +------------- + +- Debian 8.2 "Jessie" platform with `root` access +- `git` +- `python2.7` +- `pip` +- Python development headers + +Set-up +------- + ```sh + $ # install the gRPC Core: + $ sudo apt-get install libgrpc-dev + $ # install gRPC Python: + $ sudo pip install -U grpcio==0.11.0b1 + $ # Since this "hello, world" example uses protocol buffers: + $ sudo pip install -U protobuf==3.0.0a3 + $ # Clone the repository to get the example code: + $ git clone https://github.com/grpc/grpc + $ # Navigate to the "hello, world" Python example: + $ cd grpc/examples/python/helloworld + ``` + +Try it! +------- + +- Run the server + + ```sh + $ python2.7 greeter_server.py & + ``` + +- Run the client + + ```sh + $ python2.7 greeter_client.py + ``` + +Tutorial +-------- + +You can find a more detailed tutorial in [gRPC Basics: Python][] + +[helloworld.proto]:../protos/helloworld.proto +[Install gRPC Python]:../../src/python#installation +[gRPC Basics: Python]:http://www.grpc.io/docs/tutorials/basic/python.html diff --git a/examples/python/helloworld/helloworld_pb2.py b/examples/python/helloworld/helloworld_pb2.py new file mode 100644 index 00000000000..1b2674e4c8e --- /dev/null +++ b/examples/python/helloworld/helloworld_pb2.py @@ -0,0 +1,202 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: helloworld.proto + +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from google.protobuf import reflection as _reflection +from google.protobuf import symbol_database as _symbol_database +from google.protobuf import descriptor_pb2 +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + + + +DESCRIPTOR = _descriptor.FileDescriptor( + name='helloworld.proto', + package='helloworld', + syntax='proto3', + serialized_pb=b'\n\x10helloworld.proto\x12\nhelloworld\"\x1c\n\x0cHelloRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\"\x1d\n\nHelloReply\x12\x0f\n\x07message\x18\x01 \x01(\t2I\n\x07Greeter\x12>\n\x08SayHello\x12\x18.helloworld.HelloRequest\x1a\x16.helloworld.HelloReply\"\x00\x42\x18\n\x10io.grpc.examples\xa2\x02\x03HLWb\x06proto3' +) +_sym_db.RegisterFileDescriptor(DESCRIPTOR) + + + + +_HELLOREQUEST = _descriptor.Descriptor( + name='HelloRequest', + full_name='helloworld.HelloRequest', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='name', full_name='helloworld.HelloRequest.name', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=32, + serialized_end=60, +) + + +_HELLOREPLY = _descriptor.Descriptor( + name='HelloReply', + full_name='helloworld.HelloReply', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='message', full_name='helloworld.HelloReply.message', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=62, + serialized_end=91, +) + +DESCRIPTOR.message_types_by_name['HelloRequest'] = _HELLOREQUEST +DESCRIPTOR.message_types_by_name['HelloReply'] = _HELLOREPLY + +HelloRequest = _reflection.GeneratedProtocolMessageType('HelloRequest', (_message.Message,), dict( + DESCRIPTOR = _HELLOREQUEST, + __module__ = 'helloworld_pb2' + # @@protoc_insertion_point(class_scope:helloworld.HelloRequest) + )) +_sym_db.RegisterMessage(HelloRequest) + +HelloReply = _reflection.GeneratedProtocolMessageType('HelloReply', (_message.Message,), dict( + DESCRIPTOR = _HELLOREPLY, + __module__ = 'helloworld_pb2' + # @@protoc_insertion_point(class_scope:helloworld.HelloReply) + )) +_sym_db.RegisterMessage(HelloReply) + + +DESCRIPTOR.has_options = True +DESCRIPTOR._options = _descriptor._ParseOptions(descriptor_pb2.FileOptions(), b'\n\020io.grpc.examples\242\002\003HLW') +import abc +from grpc.beta import implementations as beta_implementations +from grpc.early_adopter import implementations as early_adopter_implementations +from grpc.framework.alpha import utilities as alpha_utilities +from grpc.framework.common import cardinality +from grpc.framework.interfaces.face import utilities as face_utilities +class EarlyAdopterGreeterServicer(object): + """""" + __metaclass__ = abc.ABCMeta + @abc.abstractmethod + def SayHello(self, request, context): + raise NotImplementedError() +class EarlyAdopterGreeterServer(object): + """""" + __metaclass__ = abc.ABCMeta + @abc.abstractmethod + def start(self): + raise NotImplementedError() + @abc.abstractmethod + def stop(self): + raise NotImplementedError() +class EarlyAdopterGreeterStub(object): + """""" + __metaclass__ = abc.ABCMeta + @abc.abstractmethod + def SayHello(self, request): + raise NotImplementedError() + SayHello.async = None +def early_adopter_create_Greeter_server(servicer, port, private_key=None, certificate_chain=None): + import helloworld_pb2 + import helloworld_pb2 + method_service_descriptions = { + "SayHello": alpha_utilities.unary_unary_service_description( + servicer.SayHello, + helloworld_pb2.HelloRequest.FromString, + helloworld_pb2.HelloReply.SerializeToString, + ), + } + return early_adopter_implementations.server("helloworld.Greeter", method_service_descriptions, port, private_key=private_key, certificate_chain=certificate_chain) +def early_adopter_create_Greeter_stub(host, port, metadata_transformer=None, secure=False, root_certificates=None, private_key=None, certificate_chain=None, server_host_override=None): + import helloworld_pb2 + import helloworld_pb2 + method_invocation_descriptions = { + "SayHello": alpha_utilities.unary_unary_invocation_description( + helloworld_pb2.HelloRequest.SerializeToString, + helloworld_pb2.HelloReply.FromString, + ), + } + return early_adopter_implementations.stub("helloworld.Greeter", method_invocation_descriptions, host, port, metadata_transformer=metadata_transformer, secure=secure, root_certificates=root_certificates, private_key=private_key, certificate_chain=certificate_chain, server_host_override=server_host_override) + +class BetaGreeterServicer(object): + """""" + __metaclass__ = abc.ABCMeta + @abc.abstractmethod + def SayHello(self, request, context): + raise NotImplementedError() + +class BetaGreeterStub(object): + """The interface to which stubs will conform.""" + __metaclass__ = abc.ABCMeta + @abc.abstractmethod + def SayHello(self, request, timeout): + raise NotImplementedError() + SayHello.future = None + +def beta_create_Greeter_server(servicer, pool=None, pool_size=None, default_timeout=None, maximum_timeout=None): + import helloworld_pb2 + import helloworld_pb2 + request_deserializers = { + ('helloworld.Greeter', 'SayHello'): helloworld_pb2.HelloRequest.FromString, + } + response_serializers = { + ('helloworld.Greeter', 'SayHello'): helloworld_pb2.HelloReply.SerializeToString, + } + method_implementations = { + ('helloworld.Greeter', 'SayHello'): face_utilities.unary_unary_inline(servicer.SayHello), + } + server_options = beta_implementations.server_options(request_deserializers=request_deserializers, response_serializers=response_serializers, thread_pool=pool, thread_pool_size=pool_size, default_timeout=default_timeout, maximum_timeout=maximum_timeout) + return beta_implementations.server(method_implementations, options=server_options) + +def beta_create_Greeter_stub(channel, host=None, metadata_transformer=None, pool=None, pool_size=None): + import helloworld_pb2 + import helloworld_pb2 + request_serializers = { + ('helloworld.Greeter', 'SayHello'): helloworld_pb2.HelloRequest.SerializeToString, + } + response_deserializers = { + ('helloworld.Greeter', 'SayHello'): helloworld_pb2.HelloReply.FromString, + } + cardinalities = { + 'SayHello': cardinality.Cardinality.UNARY_UNARY, + } + stub_options = beta_implementations.stub_options(host=host, metadata_transformer=metadata_transformer, request_serializers=request_serializers, response_deserializers=response_deserializers, thread_pool=pool, thread_pool_size=pool_size) + return beta_implementations.dynamic_stub(channel, 'helloworld.Greeter', cardinalities, options=stub_options) +# @@protoc_insertion_point(module_scope) From 706a010e3472951e45f34e31d34a16ab91a7b559 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Thu, 24 Sep 2015 18:34:39 -0700 Subject: [PATCH 161/169] stop gcc complaints about func ptr conversions --- src/csharp/ext/grpc_csharp_ext.c | 52 +++++++++++++++++--------------- 1 file changed, 27 insertions(+), 25 deletions(-) diff --git a/src/csharp/ext/grpc_csharp_ext.c b/src/csharp/ext/grpc_csharp_ext.c index 0f05347dc51..679ca43d749 100644 --- a/src/csharp/ext/grpc_csharp_ext.c +++ b/src/csharp/ext/grpc_csharp_ext.c @@ -665,16 +665,16 @@ grpcsharp_call_start_duplex_streaming(grpc_call *call, } GPR_EXPORT grpc_call_error GPR_CALLTYPE grpcsharp_call_recv_initial_metadata( - grpc_call *call, grpcsharp_batch_context *ctx) { - /* TODO: don't use magic number */ - grpc_op ops[1]; - ops[0].op = GRPC_OP_RECV_INITIAL_METADATA; - ops[0].data.recv_initial_metadata = &(ctx->recv_initial_metadata); - ops[0].flags = 0; - ops[0].reserved = NULL; + grpc_call *call, grpcsharp_batch_context *ctx) { + /* TODO: don't use magic number */ + grpc_op ops[1]; + ops[0].op = GRPC_OP_RECV_INITIAL_METADATA; + ops[0].data.recv_initial_metadata = &(ctx->recv_initial_metadata); + ops[0].flags = 0; + ops[0].reserved = NULL; - return grpc_call_start_batch(call, ops, sizeof(ops) / sizeof(ops[0]), ctx, - NULL); + return grpc_call_start_batch(call, ops, sizeof(ops) / sizeof(ops[0]), ctx, + NULL); } GPR_EXPORT grpc_call_error GPR_CALLTYPE @@ -898,41 +898,43 @@ grpcsharp_server_add_secure_http2_port(grpc_server *server, const char *addr, } GPR_EXPORT grpc_credentials *GPR_CALLTYPE grpcsharp_composite_credentials_create( - grpc_credentials *creds1, - grpc_credentials *creds2) { - return grpc_composite_credentials_create(creds1, creds2, NULL); + grpc_credentials *creds1, + grpc_credentials *creds2) { + return grpc_composite_credentials_create(creds1, creds2, NULL); } /* Metadata credentials plugin */ GPR_EXPORT void GPR_CALLTYPE grpcsharp_metadata_credentials_notify_from_plugin( - void *callback_ptr, void *user_data, grpc_metadata_array *metadata, - grpc_status_code status, const char *error_details) { - grpc_credentials_plugin_metadata_cb cb = (grpc_credentials_plugin_metadata_cb)callback_ptr; - cb(user_data, metadata->metadata, metadata->count, status, error_details); + grpc_credentials_plugin_metadata_cb cb, + void *user_data, grpc_metadata_array *metadata, + grpc_status_code status, const char *error_details) { + cb(user_data, metadata->metadata, metadata->count, status, error_details); } typedef void(GPR_CALLTYPE *grpcsharp_metadata_interceptor_func)( - void *state, const char *service_url, void *callback_ptr, - void *user_data, gpr_int32 is_destroy); + void *state, const char *service_url, grpc_credentials_plugin_metadata_cb cb, + void *user_data, gpr_int32 is_destroy); static void grpcsharp_get_metadata_handler(void *state, const char *service_url, - grpc_credentials_plugin_metadata_cb cb, void *user_data) { - grpcsharp_metadata_interceptor_func interceptor = (grpcsharp_metadata_interceptor_func)state; - interceptor(state, service_url, (void*)cb, user_data, 0); + grpc_credentials_plugin_metadata_cb cb, void *user_data) { + grpcsharp_metadata_interceptor_func interceptor = + (grpcsharp_metadata_interceptor_func)(gpr_intptr)state; + interceptor(state, service_url, cb, user_data, 0); } static void grpcsharp_metadata_credentials_destroy_handler(void *state) { - grpcsharp_metadata_interceptor_func interceptor = (grpcsharp_metadata_interceptor_func)state; - interceptor(state, NULL, NULL, NULL, 1); + grpcsharp_metadata_interceptor_func interceptor = + (grpcsharp_metadata_interceptor_func)(gpr_intptr)state; + interceptor(state, NULL, NULL, NULL, 1); } GPR_EXPORT grpc_credentials *GPR_CALLTYPE grpcsharp_metadata_credentials_create_from_plugin( - grpcsharp_metadata_interceptor_func metadata_interceptor) { + grpcsharp_metadata_interceptor_func metadata_interceptor) { grpc_metadata_credentials_plugin plugin; plugin.get_metadata = grpcsharp_get_metadata_handler; plugin.destroy = grpcsharp_metadata_credentials_destroy_handler; - plugin.state = metadata_interceptor; + plugin.state = (void*)(gpr_intptr)metadata_interceptor; return grpc_metadata_credentials_create_from_plugin(plugin, NULL); } From e7c704a1876c2aa1778a29ae8d5043d747eaa12a Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Wed, 7 Oct 2015 11:00:48 -0700 Subject: [PATCH 162/169] build.json reappeared --- build.json | 2729 ---------------------------------------------------- 1 file changed, 2729 deletions(-) delete mode 100644 build.json diff --git a/build.json b/build.json deleted file mode 100644 index 0a4248c7a8d..00000000000 --- a/build.json +++ /dev/null @@ -1,2729 +0,0 @@ -{ - "#1": "This file describes the list of targets and dependencies.", - "#2": "It is used among other things to generate all of our project files.", - "#3": "Please refer to the templates directory for more information.", - "settings": { - "#": "The public version number of the library.", - "version": { - "major": 0, - "minor": 10, - "micro": 1, - "build": 0 - } - }, - "filegroups": [ - { - "name": "census", - "public_headers": [ - "include/grpc/census.h" - ], - "headers": [ - "src/core/census/context.h", - "src/core/census/rpc_stat_id.h" - ], - "src": [ - "src/core/census/context.c", - "src/core/census/initialize.c", - "src/core/census/record_stat.c" - ] - }, - { - "name": "grpc++_base", - "public_headers": [ - "include/grpc++/channel.h", - "include/grpc++/client_context.h", - "include/grpc++/completion_queue.h", - "include/grpc++/create_channel.h", - "include/grpc++/credentials.h", - "include/grpc++/generic/async_generic_service.h", - "include/grpc++/generic/generic_stub.h", - "include/grpc++/impl/call.h", - "include/grpc++/impl/client_unary_call.h", - "include/grpc++/impl/grpc_library.h", - "include/grpc++/impl/proto_utils.h", - "include/grpc++/impl/rpc_method.h", - "include/grpc++/impl/rpc_service_method.h", - "include/grpc++/impl/serialization_traits.h", - "include/grpc++/impl/service_type.h", - "include/grpc++/impl/sync.h", - "include/grpc++/impl/sync_cxx11.h", - "include/grpc++/impl/sync_no_cxx11.h", - "include/grpc++/impl/thd.h", - "include/grpc++/impl/thd_cxx11.h", - "include/grpc++/impl/thd_no_cxx11.h", - "include/grpc++/server.h", - "include/grpc++/server_builder.h", - "include/grpc++/server_context.h", - "include/grpc++/server_credentials.h", - "include/grpc++/support/async_stream.h", - "include/grpc++/support/async_unary_call.h", - "include/grpc++/support/auth_context.h", - "include/grpc++/support/byte_buffer.h", - "include/grpc++/support/channel_arguments.h", - "include/grpc++/support/config.h", - "include/grpc++/support/config_protobuf.h", - "include/grpc++/support/slice.h", - "include/grpc++/support/status.h", - "include/grpc++/support/status_code_enum.h", - "include/grpc++/support/string_ref.h", - "include/grpc++/support/stub_options.h", - "include/grpc++/support/sync_stream.h", - "include/grpc++/support/time.h" - ], - "headers": [ - "src/cpp/client/create_channel_internal.h", - "src/cpp/common/create_auth_context.h", - "src/cpp/server/dynamic_thread_pool.h", - "src/cpp/server/fixed_size_thread_pool.h", - "src/cpp/server/thread_pool_interface.h" - ], - "src": [ - "src/cpp/client/channel.cc", - "src/cpp/client/channel_arguments.cc", - "src/cpp/client/client_context.cc", - "src/cpp/client/create_channel.cc", - "src/cpp/client/create_channel_internal.cc", - "src/cpp/client/credentials.cc", - "src/cpp/client/generic_stub.cc", - "src/cpp/client/insecure_credentials.cc", - "src/cpp/common/call.cc", - "src/cpp/common/completion_queue.cc", - "src/cpp/common/rpc_method.cc", - "src/cpp/proto/proto_utils.cc", - "src/cpp/server/async_generic_service.cc", - "src/cpp/server/create_default_thread_pool.cc", - "src/cpp/server/dynamic_thread_pool.cc", - "src/cpp/server/fixed_size_thread_pool.cc", - "src/cpp/server/insecure_server_credentials.cc", - "src/cpp/server/server.cc", - "src/cpp/server/server_builder.cc", - "src/cpp/server/server_context.cc", - "src/cpp/server/server_credentials.cc", - "src/cpp/util/byte_buffer.cc", - "src/cpp/util/slice.cc", - "src/cpp/util/status.cc", - "src/cpp/util/string_ref.cc", - "src/cpp/util/time.cc" - ] - }, - { - "name": "grpc_base", - "public_headers": [ - "include/grpc/byte_buffer.h", - "include/grpc/byte_buffer_reader.h", - "include/grpc/compression.h", - "include/grpc/grpc.h", - "include/grpc/status.h" - ], - "headers": [ - "src/core/census/grpc_filter.h", - "src/core/channel/channel_args.h", - "src/core/channel/channel_stack.h", - "src/core/channel/client_channel.h", - "src/core/channel/compress_filter.h", - "src/core/channel/connected_channel.h", - "src/core/channel/context.h", - "src/core/channel/http_client_filter.h", - "src/core/channel/http_server_filter.h", - "src/core/channel/noop_filter.h", - "src/core/client_config/client_config.h", - "src/core/client_config/connector.h", - "src/core/client_config/lb_policies/pick_first.h", - "src/core/client_config/lb_policy.h", - "src/core/client_config/resolver.h", - "src/core/client_config/resolver_factory.h", - "src/core/client_config/resolver_registry.h", - "src/core/client_config/resolvers/dns_resolver.h", - "src/core/client_config/resolvers/sockaddr_resolver.h", - "src/core/client_config/subchannel.h", - "src/core/client_config/subchannel_factory.h", - "src/core/client_config/subchannel_factory_decorators/add_channel_arg.h", - "src/core/client_config/subchannel_factory_decorators/merge_channel_args.h", - "src/core/client_config/uri_parser.h", - "src/core/compression/message_compress.h", - "src/core/debug/trace.h", - "src/core/httpcli/format_request.h", - "src/core/httpcli/httpcli.h", - "src/core/httpcli/parser.h", - "src/core/iomgr/alarm.h", - "src/core/iomgr/alarm_heap.h", - "src/core/iomgr/alarm_internal.h", - "src/core/iomgr/endpoint.h", - "src/core/iomgr/endpoint_pair.h", - "src/core/iomgr/fd_posix.h", - "src/core/iomgr/iocp_windows.h", - "src/core/iomgr/iomgr.h", - "src/core/iomgr/iomgr_internal.h", - "src/core/iomgr/iomgr_posix.h", - "src/core/iomgr/pollset.h", - "src/core/iomgr/pollset_posix.h", - "src/core/iomgr/pollset_set.h", - "src/core/iomgr/pollset_set_posix.h", - "src/core/iomgr/pollset_set_windows.h", - "src/core/iomgr/pollset_windows.h", - "src/core/iomgr/resolve_address.h", - "src/core/iomgr/sockaddr.h", - "src/core/iomgr/sockaddr_posix.h", - "src/core/iomgr/sockaddr_utils.h", - "src/core/iomgr/sockaddr_win32.h", - "src/core/iomgr/socket_utils_posix.h", - "src/core/iomgr/socket_windows.h", - "src/core/iomgr/tcp_client.h", - "src/core/iomgr/tcp_posix.h", - "src/core/iomgr/tcp_server.h", - "src/core/iomgr/tcp_windows.h", - "src/core/iomgr/time_averaged_stats.h", - "src/core/iomgr/udp_server.h", - "src/core/iomgr/wakeup_fd_pipe.h", - "src/core/iomgr/wakeup_fd_posix.h", - "src/core/json/json.h", - "src/core/json/json_common.h", - "src/core/json/json_reader.h", - "src/core/json/json_writer.h", - "src/core/profiling/timers.h", - "src/core/profiling/timers_preciseclock.h", - "src/core/statistics/census_interface.h", - "src/core/statistics/census_rpc_stats.h", - "src/core/surface/api_trace.h", - "src/core/surface/byte_buffer_queue.h", - "src/core/surface/call.h", - "src/core/surface/channel.h", - "src/core/surface/completion_queue.h", - "src/core/surface/event_string.h", - "src/core/surface/init.h", - "src/core/surface/server.h", - "src/core/surface/surface_trace.h", - "src/core/transport/chttp2/alpn.h", - "src/core/transport/chttp2/bin_encoder.h", - "src/core/transport/chttp2/frame.h", - "src/core/transport/chttp2/frame_data.h", - "src/core/transport/chttp2/frame_goaway.h", - "src/core/transport/chttp2/frame_ping.h", - "src/core/transport/chttp2/frame_rst_stream.h", - "src/core/transport/chttp2/frame_settings.h", - "src/core/transport/chttp2/frame_window_update.h", - "src/core/transport/chttp2/hpack_parser.h", - "src/core/transport/chttp2/hpack_table.h", - "src/core/transport/chttp2/http2_errors.h", - "src/core/transport/chttp2/huffsyms.h", - "src/core/transport/chttp2/incoming_metadata.h", - "src/core/transport/chttp2/internal.h", - "src/core/transport/chttp2/status_conversion.h", - "src/core/transport/chttp2/stream_encoder.h", - "src/core/transport/chttp2/stream_map.h", - "src/core/transport/chttp2/timeout_encoding.h", - "src/core/transport/chttp2/varint.h", - "src/core/transport/chttp2_transport.h", - "src/core/transport/connectivity_state.h", - "src/core/transport/metadata.h", - "src/core/transport/stream_op.h", - "src/core/transport/transport.h", - "src/core/transport/transport_impl.h" - ], - "src": [ - "src/core/census/grpc_context.c", - "src/core/census/grpc_filter.c", - "src/core/channel/channel_args.c", - "src/core/channel/channel_stack.c", - "src/core/channel/client_channel.c", - "src/core/channel/compress_filter.c", - "src/core/channel/connected_channel.c", - "src/core/channel/http_client_filter.c", - "src/core/channel/http_server_filter.c", - "src/core/channel/noop_filter.c", - "src/core/client_config/client_config.c", - "src/core/client_config/connector.c", - "src/core/client_config/lb_policies/pick_first.c", - "src/core/client_config/lb_policy.c", - "src/core/client_config/resolver.c", - "src/core/client_config/resolver_factory.c", - "src/core/client_config/resolver_registry.c", - "src/core/client_config/resolvers/dns_resolver.c", - "src/core/client_config/resolvers/sockaddr_resolver.c", - "src/core/client_config/subchannel.c", - "src/core/client_config/subchannel_factory.c", - "src/core/client_config/subchannel_factory_decorators/add_channel_arg.c", - "src/core/client_config/subchannel_factory_decorators/merge_channel_args.c", - "src/core/client_config/uri_parser.c", - "src/core/compression/algorithm.c", - "src/core/compression/message_compress.c", - "src/core/debug/trace.c", - "src/core/httpcli/format_request.c", - "src/core/httpcli/httpcli.c", - "src/core/httpcli/parser.c", - "src/core/iomgr/alarm.c", - "src/core/iomgr/alarm_heap.c", - "src/core/iomgr/endpoint.c", - "src/core/iomgr/endpoint_pair_posix.c", - "src/core/iomgr/endpoint_pair_windows.c", - "src/core/iomgr/fd_posix.c", - "src/core/iomgr/iocp_windows.c", - "src/core/iomgr/iomgr.c", - "src/core/iomgr/iomgr_posix.c", - "src/core/iomgr/iomgr_windows.c", - "src/core/iomgr/pollset_multipoller_with_epoll.c", - "src/core/iomgr/pollset_multipoller_with_poll_posix.c", - "src/core/iomgr/pollset_posix.c", - "src/core/iomgr/pollset_set_posix.c", - "src/core/iomgr/pollset_set_windows.c", - "src/core/iomgr/pollset_windows.c", - "src/core/iomgr/resolve_address_posix.c", - "src/core/iomgr/resolve_address_windows.c", - "src/core/iomgr/sockaddr_utils.c", - "src/core/iomgr/socket_utils_common_posix.c", - "src/core/iomgr/socket_utils_linux.c", - "src/core/iomgr/socket_utils_posix.c", - "src/core/iomgr/socket_windows.c", - "src/core/iomgr/tcp_client_posix.c", - "src/core/iomgr/tcp_client_windows.c", - "src/core/iomgr/tcp_posix.c", - "src/core/iomgr/tcp_server_posix.c", - "src/core/iomgr/tcp_server_windows.c", - "src/core/iomgr/tcp_windows.c", - "src/core/iomgr/time_averaged_stats.c", - "src/core/iomgr/udp_server.c", - "src/core/iomgr/wakeup_fd_eventfd.c", - "src/core/iomgr/wakeup_fd_nospecial.c", - "src/core/iomgr/wakeup_fd_pipe.c", - "src/core/iomgr/wakeup_fd_posix.c", - "src/core/json/json.c", - "src/core/json/json_reader.c", - "src/core/json/json_string.c", - "src/core/json/json_writer.c", - "src/core/profiling/basic_timers.c", - "src/core/profiling/stap_timers.c", - "src/core/surface/api_trace.c", - "src/core/surface/byte_buffer.c", - "src/core/surface/byte_buffer_queue.c", - "src/core/surface/byte_buffer_reader.c", - "src/core/surface/call.c", - "src/core/surface/call_details.c", - "src/core/surface/call_log_batch.c", - "src/core/surface/channel.c", - "src/core/surface/channel_connectivity.c", - "src/core/surface/channel_create.c", - "src/core/surface/completion_queue.c", - "src/core/surface/event_string.c", - "src/core/surface/init.c", - "src/core/surface/lame_client.c", - "src/core/surface/metadata_array.c", - "src/core/surface/server.c", - "src/core/surface/server_chttp2.c", - "src/core/surface/server_create.c", - "src/core/surface/version.c", - "src/core/transport/chttp2/alpn.c", - "src/core/transport/chttp2/bin_encoder.c", - "src/core/transport/chttp2/frame_data.c", - "src/core/transport/chttp2/frame_goaway.c", - "src/core/transport/chttp2/frame_ping.c", - "src/core/transport/chttp2/frame_rst_stream.c", - "src/core/transport/chttp2/frame_settings.c", - "src/core/transport/chttp2/frame_window_update.c", - "src/core/transport/chttp2/hpack_parser.c", - "src/core/transport/chttp2/hpack_table.c", - "src/core/transport/chttp2/huffsyms.c", - "src/core/transport/chttp2/incoming_metadata.c", - "src/core/transport/chttp2/parsing.c", - "src/core/transport/chttp2/status_conversion.c", - "src/core/transport/chttp2/stream_encoder.c", - "src/core/transport/chttp2/stream_lists.c", - "src/core/transport/chttp2/stream_map.c", - "src/core/transport/chttp2/timeout_encoding.c", - "src/core/transport/chttp2/varint.c", - "src/core/transport/chttp2/writing.c", - "src/core/transport/chttp2_transport.c", - "src/core/transport/connectivity_state.c", - "src/core/transport/metadata.c", - "src/core/transport/stream_op.c", - "src/core/transport/transport.c", - "src/core/transport/transport_op_string.c" - ] - }, - { - "name": "grpc_test_util_base", - "headers": [ - "test/core/end2end/cq_verifier.h", - "test/core/end2end/fixtures/proxy.h", - "test/core/iomgr/endpoint_tests.h", - "test/core/security/oauth2_utils.h", - "test/core/util/grpc_profiler.h", - "test/core/util/parse_hexstring.h", - "test/core/util/port.h", - "test/core/util/slice_splitter.h" - ], - "src": [ - "test/core/end2end/cq_verifier.c", - "test/core/end2end/fixtures/proxy.c", - "test/core/iomgr/endpoint_tests.c", - "test/core/security/oauth2_utils.c", - "test/core/util/grpc_profiler.c", - "test/core/util/parse_hexstring.c", - "test/core/util/port_posix.c", - "test/core/util/port_windows.c", - "test/core/util/slice_splitter.c" - ] - } - ], - "libs": [ - { - "name": "gpr", - "build": "all", - "language": "c", - "public_headers": [ - "include/grpc/support/alloc.h", - "include/grpc/support/atm.h", - "include/grpc/support/atm_gcc_atomic.h", - "include/grpc/support/atm_gcc_sync.h", - "include/grpc/support/atm_win32.h", - "include/grpc/support/cmdline.h", - "include/grpc/support/cpu.h", - "include/grpc/support/histogram.h", - "include/grpc/support/host_port.h", - "include/grpc/support/log.h", - "include/grpc/support/log_win32.h", - "include/grpc/support/port_platform.h", - "include/grpc/support/slice.h", - "include/grpc/support/slice_buffer.h", - "include/grpc/support/string_util.h", - "include/grpc/support/subprocess.h", - "include/grpc/support/sync.h", - "include/grpc/support/sync_generic.h", - "include/grpc/support/sync_posix.h", - "include/grpc/support/sync_win32.h", - "include/grpc/support/thd.h", - "include/grpc/support/time.h", - "include/grpc/support/tls.h", - "include/grpc/support/tls_gcc.h", - "include/grpc/support/tls_msvc.h", - "include/grpc/support/tls_pthread.h", - "include/grpc/support/useful.h" - ], - "headers": [ - "src/core/support/env.h", - "src/core/support/file.h", - "src/core/support/murmur_hash.h", - "src/core/support/stack_lockfree.h", - "src/core/support/string.h", - "src/core/support/string_win32.h", - "src/core/support/thd_internal.h" - ], - "src": [ - "src/core/support/alloc.c", - "src/core/support/cmdline.c", - "src/core/support/cpu_iphone.c", - "src/core/support/cpu_linux.c", - "src/core/support/cpu_posix.c", - "src/core/support/cpu_windows.c", - "src/core/support/env_linux.c", - "src/core/support/env_posix.c", - "src/core/support/env_win32.c", - "src/core/support/file.c", - "src/core/support/file_posix.c", - "src/core/support/file_win32.c", - "src/core/support/histogram.c", - "src/core/support/host_port.c", - "src/core/support/log.c", - "src/core/support/log_android.c", - "src/core/support/log_linux.c", - "src/core/support/log_posix.c", - "src/core/support/log_win32.c", - "src/core/support/murmur_hash.c", - "src/core/support/slice.c", - "src/core/support/slice_buffer.c", - "src/core/support/stack_lockfree.c", - "src/core/support/string.c", - "src/core/support/string_posix.c", - "src/core/support/string_win32.c", - "src/core/support/subprocess_posix.c", - "src/core/support/sync.c", - "src/core/support/sync_posix.c", - "src/core/support/sync_win32.c", - "src/core/support/thd.c", - "src/core/support/thd_posix.c", - "src/core/support/thd_win32.c", - "src/core/support/time.c", - "src/core/support/time_posix.c", - "src/core/support/time_win32.c", - "src/core/support/tls_pthread.c" - ], - "secure": "no", - "vs_project_guid": "{B23D3D1A-9438-4EDA-BEB6-9A0A03D17792}" - }, - { - "name": "gpr_test_util", - "build": "private", - "language": "c", - "headers": [ - "test/core/util/test_config.h" - ], - "src": [ - "test/core/util/test_config.c" - ], - "deps": [ - "gpr" - ], - "secure": "no", - "vs_project_guid": "{EAB0A629-17A9-44DB-B5FF-E91A721FE037}" - }, - { - "name": "grpc", - "build": "all", - "language": "c", - "public_headers": [ - "include/grpc/grpc_security.h" - ], - "headers": [ - "src/core/security/auth_filters.h", - "src/core/security/base64.h", - "src/core/security/credentials.h", - "src/core/security/json_token.h", - "src/core/security/jwt_verifier.h", - "src/core/security/secure_endpoint.h", - "src/core/security/secure_transport_setup.h", - "src/core/security/security_connector.h", - "src/core/security/security_context.h", - "src/core/tsi/fake_transport_security.h", - "src/core/tsi/ssl_transport_security.h", - "src/core/tsi/transport_security.h", - "src/core/tsi/transport_security_interface.h" - ], - "src": [ - "src/core/httpcli/httpcli_security_connector.c", - "src/core/security/base64.c", - "src/core/security/client_auth_filter.c", - "src/core/security/credentials.c", - "src/core/security/credentials_metadata.c", - "src/core/security/credentials_posix.c", - "src/core/security/credentials_win32.c", - "src/core/security/google_default_credentials.c", - "src/core/security/json_token.c", - "src/core/security/jwt_verifier.c", - "src/core/security/secure_endpoint.c", - "src/core/security/secure_transport_setup.c", - "src/core/security/security_connector.c", - "src/core/security/security_context.c", - "src/core/security/server_auth_filter.c", - "src/core/security/server_secure_chttp2.c", - "src/core/surface/init_secure.c", - "src/core/surface/secure_channel_create.c", - "src/core/tsi/fake_transport_security.c", - "src/core/tsi/ssl_transport_security.c", - "src/core/tsi/transport_security.c" - ], - "deps": [ - "gpr" - ], - "baselib": true, - "dll": "yes", - "filegroups": [ - "grpc_base", - "census" - ], - "secure": "yes", - "vs_project_guid": "{29D16885-7228-4C31-81ED-5F9187C7F2A9}" - }, - { - "name": "grpc_test_util", - "build": "private", - "language": "c", - "headers": [ - "test/core/end2end/data/ssl_test_data.h" - ], - "src": [ - "test/core/end2end/data/server1_cert.c", - "test/core/end2end/data/server1_key.c", - "test/core/end2end/data/test_root_cert.c" - ], - "deps": [ - "gpr", - "gpr_test_util", - "grpc" - ], - "filegroups": [ - "grpc_test_util_base" - ], - "vs_project_guid": "{17BCAFC0-5FDC-4C94-AEB9-95F3E220614B}" - }, - { - "name": "grpc_test_util_unsecure", - "build": "private", - "language": "c", - "deps": [ - "gpr", - "gpr_test_util", - "grpc" - ], - "filegroups": [ - "grpc_test_util_base" - ], - "secure": "no", - "vs_project_guid": "{0A7E7F92-FDEA-40F1-A9EC-3BA484F98BBF}" - }, - { - "name": "grpc_unsecure", - "build": "all", - "language": "c", - "src": [ - "src/core/surface/init_unsecure.c" - ], - "deps": [ - "gpr" - ], - "baselib": true, - "dll": "yes", - "filegroups": [ - "grpc_base", - "census" - ], - "secure": "no", - "vs_project_guid": "{46CEDFFF-9692-456A-AA24-38B5D6BCF4C5}" - }, - { - "name": "grpc_zookeeper", - "build": "all", - "language": "c", - "public_headers": [ - "include/grpc/grpc_zookeeper.h" - ], - "headers": [ - "src/core/client_config/resolvers/zookeeper_resolver.h" - ], - "src": [ - "src/core/client_config/resolvers/zookeeper_resolver.c" - ], - "deps": [ - "gpr", - "grpc" - ], - "external_deps": [ - "zookeeper" - ], - "secure": "no" - }, - { - "name": "reconnect_server", - "build": "private", - "language": "c", - "headers": [ - "test/core/util/reconnect_server.h" - ], - "src": [ - "test/core/util/reconnect_server.c" - ], - "deps": [ - "grpc_test_util", - "grpc", - "gpr_test_util", - "gpr" - ] - }, - { - "name": "grpc++", - "build": "all", - "language": "c++", - "headers": [ - "src/cpp/client/secure_credentials.h", - "src/cpp/common/secure_auth_context.h", - "src/cpp/server/secure_server_credentials.h" - ], - "src": [ - "src/cpp/client/secure_channel_arguments.cc", - "src/cpp/client/secure_credentials.cc", - "src/cpp/common/auth_property_iterator.cc", - "src/cpp/common/secure_auth_context.cc", - "src/cpp/common/secure_create_auth_context.cc", - "src/cpp/server/secure_server_credentials.cc" - ], - "deps": [ - "gpr", - "grpc" - ], - "baselib": true, - "dll": "yes", - "filegroups": [ - "grpc++_base" - ], - "secure": "check", - "vs_project_guid": "{C187A093-A0FE-489D-A40A-6E33DE0F9FEB}" - }, - { - "name": "grpc++_test_config", - "build": "private", - "language": "c++", - "headers": [ - "test/cpp/util/test_config.h" - ], - "src": [ - "test/cpp/util/test_config.cc" - ] - }, - { - "name": "grpc++_test_util", - "build": "private", - "language": "c++", - "headers": [ - "test/cpp/util/cli_call.h", - "test/cpp/util/create_test_channel.h", - "test/cpp/util/subprocess.h" - ], - "src": [ - "test/cpp/util/messages.proto", - "test/cpp/util/echo.proto", - "test/cpp/util/echo_duplicate.proto", - "test/cpp/util/cli_call.cc", - "test/cpp/util/create_test_channel.cc", - "test/cpp/util/subprocess.cc" - ], - "deps": [ - "grpc++", - "grpc_test_util" - ] - }, - { - "name": "grpc++_unsecure", - "build": "all", - "language": "c++", - "src": [ - "src/cpp/common/insecure_create_auth_context.cc" - ], - "deps": [ - "gpr", - "grpc_unsecure" - ], - "baselib": true, - "dll": "yes", - "filegroups": [ - "grpc++_base" - ], - "secure": "no", - "vs_project_guid": "{6EE56155-DF7C-4F6E-BFC4-F6F776BEB211}" - }, - { - "name": "grpc_plugin_support", - "build": "protoc", - "language": "c++", - "headers": [ - "include/grpc++/support/config.h", - "include/grpc++/support/config_protobuf.h", - "src/compiler/config.h", - "src/compiler/cpp_generator.h", - "src/compiler/cpp_generator_helpers.h", - "src/compiler/csharp_generator.h", - "src/compiler/csharp_generator_helpers.h", - "src/compiler/generator_helpers.h", - "src/compiler/objective_c_generator.h", - "src/compiler/objective_c_generator_helpers.h", - "src/compiler/python_generator.h", - "src/compiler/ruby_generator.h", - "src/compiler/ruby_generator_helpers-inl.h", - "src/compiler/ruby_generator_map-inl.h", - "src/compiler/ruby_generator_string-inl.h" - ], - "src": [ - "src/compiler/cpp_generator.cc", - "src/compiler/csharp_generator.cc", - "src/compiler/objective_c_generator.cc", - "src/compiler/python_generator.cc", - "src/compiler/ruby_generator.cc" - ], - "deps": [], - "secure": "no", - "vs_project_guid": "{B6E81D84-2ACB-41B8-8781-493A944C7817}" - }, - { - "name": "interop_client_helper", - "build": "private", - "language": "c++", - "headers": [ - "test/cpp/interop/client_helper.h" - ], - "src": [ - "test/proto/messages.proto", - "test/cpp/interop/client_helper.cc" - ], - "deps": [ - "grpc++_test_util", - "grpc_test_util", - "grpc++", - "grpc", - "gpr" - ] - }, - { - "name": "interop_client_main", - "build": "private", - "language": "c++", - "headers": [ - "test/cpp/interop/interop_client.h" - ], - "src": [ - "test/proto/empty.proto", - "test/proto/messages.proto", - "test/proto/test.proto", - "test/cpp/interop/client.cc", - "test/cpp/interop/interop_client.cc" - ], - "deps": [ - "interop_client_helper", - "grpc++_test_util", - "grpc_test_util", - "grpc++", - "grpc", - "gpr_test_util", - "gpr", - "grpc++_test_config" - ] - }, - { - "name": "interop_server_helper", - "build": "private", - "language": "c++", - "headers": [ - "test/cpp/interop/server_helper.h" - ], - "src": [ - "test/cpp/interop/server_helper.cc" - ], - "deps": [ - "grpc_test_util", - "grpc++", - "grpc", - "gpr" - ] - }, - { - "name": "interop_server_main", - "build": "private", - "language": "c++", - "src": [ - "test/proto/empty.proto", - "test/proto/messages.proto", - "test/proto/test.proto", - "test/cpp/interop/server.cc" - ], - "deps": [ - "interop_server_helper", - "grpc++_test_util", - "grpc_test_util", - "grpc++", - "grpc", - "gpr_test_util", - "gpr", - "grpc++_test_config" - ] - }, - { - "name": "pubsub_client_lib", - "build": "do_not_build", - "language": "c++", - "headers": [ - "examples/pubsub/publisher.h", - "examples/pubsub/subscriber.h" - ], - "src": [ - "examples/pubsub/label.proto", - "examples/pubsub/empty.proto", - "examples/pubsub/pubsub.proto", - "examples/pubsub/publisher.cc", - "examples/pubsub/subscriber.cc" - ], - "deps": [ - "grpc++", - "grpc", - "gpr" - ] - }, - { - "name": "qps", - "build": "private", - "language": "c++", - "headers": [ - "test/cpp/qps/client.h", - "test/cpp/qps/driver.h", - "test/cpp/qps/histogram.h", - "test/cpp/qps/interarrival.h", - "test/cpp/qps/perf_db_client.h", - "test/cpp/qps/qps_worker.h", - "test/cpp/qps/report.h", - "test/cpp/qps/server.h", - "test/cpp/qps/stats.h", - "test/cpp/qps/timer.h", - "test/cpp/util/benchmark_config.h" - ], - "src": [ - "test/cpp/qps/qpstest.proto", - "test/cpp/qps/perf_db.proto", - "test/cpp/qps/client_async.cc", - "test/cpp/qps/client_sync.cc", - "test/cpp/qps/driver.cc", - "test/cpp/qps/perf_db_client.cc", - "test/cpp/qps/qps_worker.cc", - "test/cpp/qps/report.cc", - "test/cpp/qps/server_async.cc", - "test/cpp/qps/server_sync.cc", - "test/cpp/qps/timer.cc", - "test/cpp/util/benchmark_config.cc" - ], - "deps": [ - "grpc_test_util", - "grpc++_test_util", - "grpc++" - ] - }, - { - "name": "grpc_csharp_ext", - "build": "all", - "language": "csharp", - "src": [ - "src/csharp/ext/grpc_csharp_ext.c" - ], - "deps": [ - "gpr", - "grpc" - ], - "dll": "only", - "vs_project_guid": "{D64C6D63-4458-4A88-AB38-35678384A7E4}" - } - ], - "targets": [ - { - "name": "alarm_heap_test", - "build": "test", - "language": "c", - "src": [ - "test/core/iomgr/alarm_heap_test.c" - ], - "deps": [ - "grpc_test_util", - "grpc", - "gpr_test_util", - "gpr" - ] - }, - { - "name": "alarm_list_test", - "build": "test", - "language": "c", - "src": [ - "test/core/iomgr/alarm_list_test.c" - ], - "deps": [ - "grpc_test_util", - "grpc", - "gpr_test_util", - "gpr" - ] - }, - { - "name": "alarm_test", - "build": "test", - "language": "c", - "src": [ - "test/core/iomgr/alarm_test.c" - ], - "deps": [ - "grpc_test_util", - "grpc", - "gpr_test_util", - "gpr" - ] - }, - { - "name": "alpn_test", - "build": "test", - "language": "c", - "src": [ - "test/core/transport/chttp2/alpn_test.c" - ], - "deps": [ - "grpc_test_util", - "grpc", - "gpr_test_util", - "gpr" - ] - }, - { - "name": "bin_encoder_test", - "build": "test", - "language": "c", - "src": [ - "test/core/transport/chttp2/bin_encoder_test.c" - ], - "deps": [ - "grpc_test_util", - "grpc", - "gpr_test_util", - "gpr" - ] - }, - { - "name": "chttp2_status_conversion_test", - "build": "test", - "language": "c", - "src": [ - "test/core/transport/chttp2/status_conversion_test.c" - ], - "deps": [ - "grpc_test_util", - "grpc", - "gpr_test_util", - "gpr" - ] - }, - { - "name": "chttp2_stream_encoder_test", - "build": "test", - "language": "c", - "src": [ - "test/core/transport/chttp2/stream_encoder_test.c" - ], - "deps": [ - "grpc_test_util", - "grpc", - "gpr_test_util", - "gpr" - ] - }, - { - "name": "chttp2_stream_map_test", - "build": "test", - "language": "c", - "src": [ - "test/core/transport/chttp2/stream_map_test.c" - ], - "deps": [ - "grpc_test_util", - "grpc", - "gpr_test_util", - "gpr" - ] - }, - { - "name": "compression_test", - "build": "test", - "language": "c", - "src": [ - "test/core/compression/compression_test.c" - ], - "deps": [ - "grpc_test_util", - "grpc", - "gpr_test_util", - "gpr" - ] - }, - { - "name": "dualstack_socket_test", - "build": "test", - "language": "c", - "src": [ - "test/core/end2end/dualstack_socket_test.c" - ], - "deps": [ - "grpc_test_util", - "grpc", - "gpr_test_util", - "gpr" - ], - "platforms": [ - "mac", - "linux", - "posix" - ] - }, - { - "name": "fd_conservation_posix_test", - "build": "test", - "language": "c", - "src": [ - "test/core/iomgr/fd_conservation_posix_test.c" - ], - "deps": [ - "grpc_test_util", - "grpc", - "gpr_test_util", - "gpr" - ], - "platforms": [ - "mac", - "linux", - "posix" - ] - }, - { - "name": "fd_posix_test", - "build": "test", - "language": "c", - "src": [ - "test/core/iomgr/fd_posix_test.c" - ], - "deps": [ - "grpc_test_util", - "grpc", - "gpr_test_util", - "gpr" - ], - "platforms": [ - "mac", - "linux", - "posix" - ] - }, - { - "name": "fling_client", - "build": "test", - "run": false, - "language": "c", - "src": [ - "test/core/fling/client.c" - ], - "deps": [ - "grpc_test_util", - "grpc", - "gpr_test_util", - "gpr" - ] - }, - { - "name": "fling_server", - "build": "test", - "run": false, - "language": "c", - "src": [ - "test/core/fling/server.c" - ], - "deps": [ - "grpc_test_util", - "grpc", - "gpr_test_util", - "gpr" - ] - }, - { - "name": "fling_stream_test", - "build": "test", - "language": "c", - "src": [ - "test/core/fling/fling_stream_test.c" - ], - "deps": [ - "grpc_test_util", - "grpc", - "gpr_test_util", - "gpr" - ], - "platforms": [ - "mac", - "linux", - "posix" - ] - }, - { - "name": "fling_test", - "build": "test", - "language": "c", - "src": [ - "test/core/fling/fling_test.c" - ], - "deps": [ - "grpc_test_util", - "grpc", - "gpr_test_util", - "gpr" - ], - "platforms": [ - "mac", - "linux", - "posix" - ] - }, - { - "name": "gen_hpack_tables", - "build": "tool", - "language": "c", - "src": [ - "tools/codegen/core/gen_hpack_tables.c" - ], - "deps": [ - "gpr", - "grpc" - ] - }, - { - "name": "gpr_cmdline_test", - "build": "test", - "language": "c", - "src": [ - "test/core/support/cmdline_test.c" - ], - "deps": [ - "gpr_test_util", - "gpr" - ] - }, - { - "name": "gpr_env_test", - "build": "test", - "language": "c", - "src": [ - "test/core/support/env_test.c" - ], - "deps": [ - "gpr_test_util", - "gpr" - ] - }, - { - "name": "gpr_file_test", - "build": "test", - "language": "c", - "src": [ - "test/core/support/file_test.c" - ], - "deps": [ - "gpr_test_util", - "gpr" - ] - }, - { - "name": "gpr_histogram_test", - "build": "test", - "language": "c", - "src": [ - "test/core/support/histogram_test.c" - ], - "deps": [ - "gpr_test_util", - "gpr" - ] - }, - { - "name": "gpr_host_port_test", - "build": "test", - "language": "c", - "src": [ - "test/core/support/host_port_test.c" - ], - "deps": [ - "gpr_test_util", - "gpr" - ] - }, - { - "name": "gpr_log_test", - "build": "test", - "language": "c", - "src": [ - "test/core/support/log_test.c" - ], - "deps": [ - "gpr_test_util", - "gpr" - ] - }, - { - "name": "gpr_slice_buffer_test", - "build": "test", - "language": "c", - "src": [ - "test/core/support/slice_buffer_test.c" - ], - "deps": [ - "gpr_test_util", - "gpr" - ] - }, - { - "name": "gpr_slice_test", - "build": "test", - "language": "c", - "src": [ - "test/core/support/slice_test.c" - ], - "deps": [ - "gpr_test_util", - "gpr" - ] - }, - { - "name": "gpr_stack_lockfree_test", - "build": "test", - "language": "c", - "src": [ - "test/core/support/stack_lockfree_test.c" - ], - "deps": [ - "gpr_test_util", - "gpr" - ] - }, - { - "name": "gpr_string_test", - "build": "test", - "language": "c", - "src": [ - "test/core/support/string_test.c" - ], - "deps": [ - "gpr_test_util", - "gpr" - ] - }, - { - "name": "gpr_sync_test", - "build": "test", - "language": "c", - "src": [ - "test/core/support/sync_test.c" - ], - "deps": [ - "gpr_test_util", - "gpr" - ] - }, - { - "name": "gpr_thd_test", - "build": "test", - "language": "c", - "src": [ - "test/core/support/thd_test.c" - ], - "deps": [ - "gpr_test_util", - "gpr" - ] - }, - { - "name": "gpr_time_test", - "build": "test", - "language": "c", - "src": [ - "test/core/support/time_test.c" - ], - "deps": [ - "gpr_test_util", - "gpr" - ] - }, - { - "name": "gpr_tls_test", - "build": "test", - "language": "c", - "src": [ - "test/core/support/tls_test.c" - ], - "deps": [ - "gpr_test_util", - "gpr" - ] - }, - { - "name": "gpr_useful_test", - "build": "test", - "language": "c", - "src": [ - "test/core/support/useful_test.c" - ], - "deps": [ - "gpr_test_util", - "gpr" - ] - }, - { - "name": "grpc_auth_context_test", - "build": "test", - "language": "c", - "src": [ - "test/core/security/auth_context_test.c" - ], - "deps": [ - "grpc_test_util", - "grpc", - "gpr_test_util", - "gpr" - ] - }, - { - "name": "grpc_base64_test", - "build": "test", - "language": "c", - "src": [ - "test/core/security/base64_test.c" - ], - "deps": [ - "grpc_test_util", - "grpc", - "gpr_test_util", - "gpr" - ] - }, - { - "name": "grpc_byte_buffer_reader_test", - "build": "test", - "language": "c", - "src": [ - "test/core/surface/byte_buffer_reader_test.c" - ], - "deps": [ - "grpc_test_util", - "grpc", - "gpr_test_util", - "gpr" - ] - }, - { - "name": "grpc_channel_args_test", - "build": "test", - "language": "c", - "src": [ - "test/core/channel/channel_args_test.c" - ], - "deps": [ - "grpc_test_util", - "grpc", - "gpr_test_util", - "gpr" - ] - }, - { - "name": "grpc_channel_stack_test", - "build": "test", - "language": "c", - "src": [ - "test/core/channel/channel_stack_test.c" - ], - "deps": [ - "grpc_test_util", - "grpc", - "gpr_test_util", - "gpr" - ] - }, - { - "name": "grpc_completion_queue_test", - "build": "test", - "language": "c", - "src": [ - "test/core/surface/completion_queue_test.c" - ], - "deps": [ - "grpc_test_util", - "grpc", - "gpr_test_util", - "gpr" - ] - }, - { - "name": "grpc_create_jwt", - "build": "tool", - "language": "c", - "src": [ - "test/core/security/create_jwt.c" - ], - "deps": [ - "grpc_test_util", - "grpc", - "gpr_test_util", - "gpr" - ] - }, - { - "name": "grpc_credentials_test", - "build": "test", - "language": "c", - "src": [ - "test/core/security/credentials_test.c" - ], - "deps": [ - "grpc_test_util", - "grpc", - "gpr_test_util", - "gpr" - ] - }, - { - "name": "grpc_fetch_oauth2", - "build": "tool", - "language": "c", - "src": [ - "test/core/security/fetch_oauth2.c" - ], - "deps": [ - "grpc_test_util", - "grpc", - "gpr_test_util", - "gpr" - ] - }, - { - "name": "grpc_json_token_test", - "build": "test", - "language": "c", - "src": [ - "test/core/security/json_token_test.c" - ], - "deps": [ - "grpc_test_util", - "grpc", - "gpr_test_util", - "gpr" - ] - }, - { - "name": "grpc_jwt_verifier_test", - "build": "test", - "language": "c", - "src": [ - "test/core/security/jwt_verifier_test.c" - ], - "deps": [ - "grpc_test_util", - "grpc", - "gpr_test_util", - "gpr" - ] - }, - { - "name": "grpc_print_google_default_creds_token", - "build": "tool", - "language": "c", - "src": [ - "test/core/security/print_google_default_creds_token.c" - ], - "deps": [ - "grpc_test_util", - "grpc", - "gpr_test_util", - "gpr" - ] - }, - { - "name": "grpc_security_connector_test", - "build": "test", - "language": "c", - "src": [ - "test/core/security/security_connector_test.c" - ], - "deps": [ - "grpc_test_util", - "grpc", - "gpr_test_util", - "gpr" - ] - }, - { - "name": "grpc_stream_op_test", - "build": "test", - "language": "c", - "src": [ - "test/core/transport/stream_op_test.c" - ], - "deps": [ - "grpc_test_util", - "grpc", - "gpr_test_util", - "gpr" - ] - }, - { - "name": "grpc_verify_jwt", - "build": "tool", - "language": "c", - "src": [ - "test/core/security/verify_jwt.c" - ], - "deps": [ - "grpc_test_util", - "grpc", - "gpr_test_util", - "gpr" - ] - }, - { - "name": "hpack_parser_test", - "build": "test", - "language": "c", - "src": [ - "test/core/transport/chttp2/hpack_parser_test.c" - ], - "deps": [ - "grpc_test_util", - "grpc", - "gpr_test_util", - "gpr" - ] - }, - { - "name": "hpack_table_test", - "build": "test", - "language": "c", - "src": [ - "test/core/transport/chttp2/hpack_table_test.c" - ], - "deps": [ - "grpc_test_util", - "grpc", - "gpr_test_util", - "gpr" - ] - }, - { - "name": "httpcli_format_request_test", - "build": "test", - "language": "c", - "src": [ - "test/core/httpcli/format_request_test.c" - ], - "deps": [ - "grpc_test_util", - "grpc", - "gpr_test_util", - "gpr" - ] - }, - { - "name": "httpcli_parser_test", - "build": "test", - "language": "c", - "src": [ - "test/core/httpcli/parser_test.c" - ], - "deps": [ - "grpc_test_util", - "grpc", - "gpr_test_util", - "gpr" - ] - }, - { - "name": "httpcli_test", - "build": "test", - "language": "c", - "src": [ - "test/core/httpcli/httpcli_test.c" - ], - "deps": [ - "grpc_test_util", - "grpc", - "gpr_test_util", - "gpr" - ], - "platforms": [ - "mac", - "linux", - "posix" - ] - }, - { - "name": "json_rewrite", - "build": "test", - "run": false, - "language": "c", - "src": [ - "test/core/json/json_rewrite.c" - ], - "deps": [ - "grpc", - "gpr" - ] - }, - { - "name": "json_rewrite_test", - "build": "test", - "language": "c", - "src": [ - "test/core/json/json_rewrite_test.c" - ], - "deps": [ - "grpc_test_util", - "grpc", - "gpr_test_util", - "gpr" - ] - }, - { - "name": "json_test", - "build": "test", - "language": "c", - "src": [ - "test/core/json/json_test.c" - ], - "deps": [ - "grpc_test_util", - "grpc", - "gpr_test_util", - "gpr" - ] - }, - { - "name": "lame_client_test", - "build": "test", - "language": "c", - "src": [ - "test/core/surface/lame_client_test.c" - ], - "deps": [ - "grpc_test_util", - "grpc", - "gpr_test_util", - "gpr" - ] - }, - { - "name": "low_level_ping_pong_benchmark", - "build": "benchmark", - "language": "c", - "src": [ - "test/core/network_benchmarks/low_level_ping_pong.c" - ], - "deps": [ - "grpc_test_util", - "grpc", - "gpr_test_util", - "gpr" - ] - }, - { - "name": "message_compress_test", - "build": "test", - "language": "c", - "src": [ - "test/core/compression/message_compress_test.c" - ], - "deps": [ - "grpc_test_util", - "grpc", - "gpr_test_util", - "gpr" - ] - }, - { - "name": "multi_init_test", - "build": "test", - "language": "c", - "src": [ - "test/core/surface/multi_init_test.c" - ], - "deps": [ - "grpc_test_util", - "grpc", - "gpr_test_util", - "gpr" - ] - }, - { - "name": "multiple_server_queues_test", - "build": "test", - "language": "c", - "src": [ - "test/core/end2end/multiple_server_queues_test.c" - ], - "deps": [ - "grpc_test_util", - "grpc", - "gpr_test_util", - "gpr" - ] - }, - { - "name": "murmur_hash_test", - "build": "test", - "language": "c", - "src": [ - "test/core/support/murmur_hash_test.c" - ], - "deps": [ - "gpr_test_util", - "gpr" - ] - }, - { - "name": "no_server_test", - "build": "test", - "language": "c", - "src": [ - "test/core/end2end/no_server_test.c" - ], - "deps": [ - "grpc_test_util", - "grpc", - "gpr_test_util", - "gpr" - ] - }, - { - "name": "resolve_address_test", - "build": "test", - "language": "c", - "src": [ - "test/core/iomgr/resolve_address_test.c" - ], - "deps": [ - "grpc_test_util", - "grpc", - "gpr_test_util", - "gpr" - ] - }, - { - "name": "secure_endpoint_test", - "build": "test", - "language": "c", - "src": [ - "test/core/security/secure_endpoint_test.c" - ], - "deps": [ - "grpc_test_util", - "grpc", - "gpr_test_util", - "gpr" - ] - }, - { - "name": "sockaddr_utils_test", - "build": "test", - "language": "c", - "src": [ - "test/core/iomgr/sockaddr_utils_test.c" - ], - "deps": [ - "grpc_test_util", - "grpc", - "gpr_test_util", - "gpr" - ] - }, - { - "name": "tcp_client_posix_test", - "build": "test", - "language": "c", - "src": [ - "test/core/iomgr/tcp_client_posix_test.c" - ], - "deps": [ - "grpc_test_util", - "grpc", - "gpr_test_util", - "gpr" - ], - "platforms": [ - "mac", - "linux", - "posix" - ] - }, - { - "name": "tcp_posix_test", - "build": "test", - "language": "c", - "src": [ - "test/core/iomgr/tcp_posix_test.c" - ], - "deps": [ - "grpc_test_util", - "grpc", - "gpr_test_util", - "gpr" - ], - "platforms": [ - "mac", - "linux", - "posix" - ] - }, - { - "name": "tcp_server_posix_test", - "build": "test", - "language": "c", - "src": [ - "test/core/iomgr/tcp_server_posix_test.c" - ], - "deps": [ - "grpc_test_util", - "grpc", - "gpr_test_util", - "gpr" - ], - "platforms": [ - "mac", - "linux", - "posix" - ] - }, - { - "name": "time_averaged_stats_test", - "build": "test", - "language": "c", - "src": [ - "test/core/iomgr/time_averaged_stats_test.c" - ], - "deps": [ - "grpc_test_util", - "grpc", - "gpr_test_util", - "gpr" - ] - }, - { - "name": "timeout_encoding_test", - "build": "test", - "language": "c", - "src": [ - "test/core/transport/chttp2/timeout_encoding_test.c" - ], - "deps": [ - "grpc_test_util", - "grpc", - "gpr_test_util", - "gpr" - ] - }, - { - "name": "timers_test", - "build": "test", - "language": "c", - "src": [ - "test/core/profiling/timers_test.c" - ], - "deps": [ - "grpc_test_util", - "grpc", - "gpr_test_util", - "gpr" - ] - }, - { - "name": "transport_metadata_test", - "build": "test", - "language": "c", - "src": [ - "test/core/transport/metadata_test.c" - ], - "deps": [ - "grpc_test_util", - "grpc", - "gpr_test_util", - "gpr" - ] - }, - { - "name": "transport_security_test", - "build": "test", - "language": "c", - "src": [ - "test/core/tsi/transport_security_test.c" - ], - "deps": [ - "grpc_test_util", - "grpc", - "gpr_test_util", - "gpr" - ] - }, - { - "name": "udp_server_test", - "build": "test", - "language": "c", - "src": [ - "test/core/iomgr/udp_server_test.c" - ], - "deps": [ - "grpc_test_util", - "grpc", - "gpr_test_util", - "gpr" - ], - "platforms": [ - "posix" - ] - }, - { - "name": "uri_parser_test", - "build": "test", - "language": "c", - "src": [ - "test/core/client_config/uri_parser_test.c" - ], - "deps": [ - "grpc_test_util", - "grpc", - "gpr_test_util", - "gpr" - ] - }, - { - "name": "async_end2end_test", - "build": "test", - "language": "c++", - "src": [ - "test/cpp/end2end/async_end2end_test.cc" - ], - "deps": [ - "grpc++_test_util", - "grpc_test_util", - "grpc++", - "grpc", - "gpr_test_util", - "gpr" - ] - }, - { - "name": "async_streaming_ping_pong_test", - "build": "test", - "language": "c++", - "src": [ - "test/cpp/qps/async_streaming_ping_pong_test.cc" - ], - "deps": [ - "qps", - "grpc++_test_util", - "grpc_test_util", - "grpc++", - "grpc", - "gpr_test_util", - "gpr" - ], - "platforms": [ - "mac", - "linux", - "posix" - ] - }, - { - "name": "async_unary_ping_pong_test", - "build": "test", - "language": "c++", - "src": [ - "test/cpp/qps/async_unary_ping_pong_test.cc" - ], - "deps": [ - "qps", - "grpc++_test_util", - "grpc_test_util", - "grpc++", - "grpc", - "gpr_test_util", - "gpr" - ], - "platforms": [ - "mac", - "linux", - "posix" - ] - }, - { - "name": "auth_property_iterator_test", - "build": "test", - "language": "c++", - "src": [ - "test/cpp/common/auth_property_iterator_test.cc" - ], - "deps": [ - "grpc++", - "grpc", - "gpr" - ] - }, - { - "name": "channel_arguments_test", - "build": "test", - "language": "c++", - "src": [ - "test/cpp/client/channel_arguments_test.cc" - ], - "deps": [ - "grpc++", - "grpc", - "gpr" - ] - }, - { - "name": "cli_call_test", - "build": "test", - "language": "c++", - "src": [ - "test/cpp/util/cli_call_test.cc" - ], - "deps": [ - "grpc++_test_util", - "grpc_test_util", - "grpc++", - "grpc", - "gpr_test_util", - "gpr" - ] - }, - { - "name": "client_crash_test", - "build": "test", - "language": "c++", - "src": [ - "test/cpp/end2end/client_crash_test.cc" - ], - "deps": [ - "grpc++_test_util", - "grpc_test_util", - "grpc++", - "grpc", - "gpr_test_util", - "gpr" - ], - "platforms": [ - "mac", - "linux", - "posix" - ] - }, - { - "name": "client_crash_test_server", - "build": "test", - "run": false, - "language": "c++", - "src": [ - "test/cpp/end2end/client_crash_test_server.cc" - ], - "deps": [ - "grpc++_test_util", - "grpc_test_util", - "grpc++", - "grpc", - "gpr_test_util", - "gpr" - ] - }, - { - "name": "credentials_test", - "build": "test", - "language": "c++", - "src": [ - "test/cpp/client/credentials_test.cc" - ], - "deps": [ - "grpc++", - "grpc", - "gpr" - ] - }, - { - "name": "cxx_byte_buffer_test", - "build": "test", - "language": "c++", - "src": [ - "test/cpp/util/byte_buffer_test.cc" - ], - "deps": [ - "grpc_test_util", - "grpc++", - "grpc", - "gpr_test_util", - "gpr" - ] - }, - { - "name": "cxx_slice_test", - "build": "test", - "language": "c++", - "src": [ - "test/cpp/util/slice_test.cc" - ], - "deps": [ - "grpc_test_util", - "grpc++", - "grpc", - "gpr_test_util", - "gpr" - ] - }, - { - "name": "cxx_string_ref_test", - "build": "test", - "language": "c++", - "src": [ - "test/cpp/util/string_ref_test.cc" - ], - "deps": [ - "grpc++" - ] - }, - { - "name": "cxx_time_test", - "build": "test", - "language": "c++", - "src": [ - "test/cpp/util/time_test.cc" - ], - "deps": [ - "grpc_test_util", - "grpc++", - "grpc", - "gpr_test_util", - "gpr" - ] - }, - { - "name": "end2end_test", - "build": "test", - "language": "c++", - "src": [ - "test/cpp/end2end/end2end_test.cc" - ], - "deps": [ - "grpc++_test_util", - "grpc_test_util", - "grpc++", - "grpc", - "gpr_test_util", - "gpr" - ] - }, - { - "name": "generic_end2end_test", - "build": "test", - "language": "c++", - "src": [ - "test/cpp/end2end/generic_end2end_test.cc" - ], - "deps": [ - "grpc++_test_util", - "grpc_test_util", - "grpc++", - "grpc", - "gpr_test_util", - "gpr" - ] - }, - { - "name": "grpc_cli", - "build": "test", - "run": false, - "language": "c++", - "src": [ - "test/cpp/util/grpc_cli.cc" - ], - "deps": [ - "grpc++_test_util", - "grpc_test_util", - "grpc++", - "grpc", - "gpr_test_util", - "gpr", - "grpc++_test_config" - ] - }, - { - "name": "grpc_cpp_plugin", - "build": "protoc", - "language": "c++", - "src": [ - "src/compiler/cpp_plugin.cc" - ], - "deps": [ - "grpc_plugin_support" - ], - "secure": "no", - "vs_project_guid": "{7E51A25F-AC59-488F-906C-C60FAAE706AA}" - }, - { - "name": "grpc_csharp_plugin", - "build": "protoc", - "language": "c++", - "src": [ - "src/compiler/csharp_plugin.cc" - ], - "deps": [ - "grpc_plugin_support" - ], - "secure": "no", - "vs_project_guid": "{3C813052-A49A-4662-B90A-1ADBEC7EE453}" - }, - { - "name": "grpc_objective_c_plugin", - "build": "protoc", - "language": "c++", - "src": [ - "src/compiler/objective_c_plugin.cc" - ], - "deps": [ - "grpc_plugin_support" - ], - "secure": "no", - "vs_project_guid": "{19564640-CEE6-4921-ABA5-676ED79A36F6}" - }, - { - "name": "grpc_python_plugin", - "build": "protoc", - "language": "c++", - "src": [ - "src/compiler/python_plugin.cc" - ], - "deps": [ - "grpc_plugin_support" - ], - "secure": "no", - "vs_project_guid": "{DF52D501-A6CF-4E6F-BA38-6EBE2E8DAFB2}" - }, - { - "name": "grpc_ruby_plugin", - "build": "protoc", - "language": "c++", - "src": [ - "src/compiler/ruby_plugin.cc" - ], - "deps": [ - "grpc_plugin_support" - ], - "secure": "no", - "vs_project_guid": "{069E9D05-B78B-4751-9252-D21EBAE7DE8E}" - }, - { - "name": "interop_client", - "build": "test", - "run": false, - "language": "c++", - "src": [], - "deps": [ - "interop_client_main", - "interop_client_helper", - "grpc++_test_util", - "grpc_test_util", - "grpc++", - "grpc", - "gpr_test_util", - "gpr", - "grpc++_test_config" - ], - "platforms": [ - "mac", - "linux", - "posix" - ] - }, - { - "name": "interop_server", - "build": "test", - "run": false, - "language": "c++", - "src": [], - "deps": [ - "interop_server_main", - "interop_server_helper", - "grpc++_test_util", - "grpc_test_util", - "grpc++", - "grpc", - "gpr_test_util", - "gpr", - "grpc++_test_config" - ], - "platforms": [ - "mac", - "linux", - "posix" - ] - }, - { - "name": "interop_test", - "build": "test", - "language": "c++", - "src": [ - "test/cpp/interop/interop_test.cc" - ], - "deps": [ - "grpc_test_util", - "grpc", - "gpr_test_util", - "gpr" - ], - "platforms": [ - "mac", - "linux", - "posix" - ] - }, - { - "name": "mock_test", - "build": "test", - "language": "c++", - "src": [ - "test/cpp/end2end/mock_test.cc" - ], - "deps": [ - "grpc++_test_util", - "grpc_test_util", - "grpc++", - "grpc", - "gpr_test_util", - "gpr" - ] - }, - { - "name": "pubsub_client", - "build": "do_not_build", - "run": false, - "language": "c++", - "src": [ - "examples/pubsub/main.cc" - ], - "deps": [ - "pubsub_client_lib", - "grpc_test_util", - "grpc++", - "grpc", - "gpr_test_util", - "gpr", - "grpc++_test_config" - ] - }, - { - "name": "pubsub_publisher_test", - "build": "do_not_build", - "language": "c++", - "src": [ - "examples/pubsub/publisher_test.cc" - ], - "deps": [ - "pubsub_client_lib", - "grpc++_test_util", - "grpc_test_util", - "grpc++", - "grpc", - "gpr_test_util", - "gpr" - ] - }, - { - "name": "pubsub_subscriber_test", - "build": "do_not_build", - "language": "c++", - "src": [ - "examples/pubsub/subscriber_test.cc" - ], - "deps": [ - "pubsub_client_lib", - "grpc++_test_util", - "grpc_test_util", - "grpc++", - "grpc", - "gpr_test_util", - "gpr" - ] - }, - { - "name": "qps_driver", - "build": "benchmark", - "language": "c++", - "src": [ - "test/cpp/qps/qps_driver.cc" - ], - "deps": [ - "qps", - "grpc++_test_util", - "grpc_test_util", - "grpc++", - "grpc", - "gpr_test_util", - "gpr", - "grpc++_test_config" - ] - }, - { - "name": "qps_interarrival_test", - "build": "test", - "run": false, - "language": "c++", - "src": [ - "test/cpp/qps/qps_interarrival_test.cc" - ], - "deps": [ - "qps", - "grpc++_test_util", - "grpc_test_util", - "grpc++", - "grpc", - "gpr_test_util", - "gpr" - ], - "platforms": [ - "mac", - "linux", - "posix" - ] - }, - { - "name": "qps_openloop_test", - "build": "test", - "language": "c++", - "src": [ - "test/cpp/qps/qps_openloop_test.cc" - ], - "deps": [ - "qps", - "grpc++_test_util", - "grpc_test_util", - "grpc++", - "grpc", - "gpr_test_util", - "gpr", - "grpc++_test_config" - ], - "platforms": [ - "mac", - "linux", - "posix" - ] - }, - { - "name": "qps_test", - "build": "test", - "language": "c++", - "src": [ - "test/cpp/qps/qps_test.cc" - ], - "deps": [ - "qps", - "grpc++_test_util", - "grpc_test_util", - "grpc++", - "grpc", - "gpr_test_util", - "gpr", - "grpc++_test_config" - ], - "exclude_configs": [ - "tsan" - ], - "platforms": [ - "mac", - "linux", - "posix" - ] - }, - { - "name": "qps_worker", - "build": "benchmark", - "language": "c++", - "headers": [ - "test/cpp/qps/client.h", - "test/cpp/qps/server.h" - ], - "src": [ - "test/cpp/qps/worker.cc" - ], - "deps": [ - "qps", - "grpc++_test_util", - "grpc_test_util", - "grpc++", - "grpc", - "gpr_test_util", - "gpr", - "grpc++_test_config" - ] - }, - { - "name": "reconnect_interop_client", - "build": "test", - "run": false, - "language": "c++", - "src": [ - "test/proto/empty.proto", - "test/proto/messages.proto", - "test/proto/test.proto", - "test/cpp/interop/reconnect_interop_client.cc" - ], - "deps": [ - "grpc++_test_util", - "grpc_test_util", - "grpc++", - "grpc", - "gpr_test_util", - "gpr", - "grpc++_test_config" - ] - }, - { - "name": "reconnect_interop_server", - "build": "test", - "run": false, - "language": "c++", - "src": [ - "test/proto/empty.proto", - "test/proto/messages.proto", - "test/proto/test.proto", - "test/cpp/interop/reconnect_interop_server.cc" - ], - "deps": [ - "reconnect_server", - "grpc++_test_util", - "grpc_test_util", - "grpc++", - "grpc", - "gpr_test_util", - "gpr", - "grpc++_test_config" - ] - }, - { - "name": "secure_auth_context_test", - "build": "test", - "language": "c++", - "src": [ - "test/cpp/common/secure_auth_context_test.cc" - ], - "deps": [ - "grpc++", - "grpc", - "gpr" - ] - }, - { - "name": "server_crash_test", - "build": "test", - "language": "c++", - "src": [ - "test/cpp/end2end/server_crash_test.cc" - ], - "deps": [ - "grpc++_test_util", - "grpc_test_util", - "grpc++", - "grpc", - "gpr_test_util", - "gpr" - ], - "platforms": [ - "mac", - "linux", - "posix" - ] - }, - { - "name": "server_crash_test_client", - "build": "test", - "run": false, - "language": "c++", - "src": [ - "test/cpp/end2end/server_crash_test_client.cc" - ], - "deps": [ - "grpc++_test_util", - "grpc_test_util", - "grpc++", - "grpc", - "gpr_test_util", - "gpr" - ] - }, - { - "name": "shutdown_test", - "build": "test", - "language": "c++", - "src": [ - "test/cpp/end2end/shutdown_test.cc" - ], - "deps": [ - "grpc++_test_util", - "grpc_test_util", - "grpc++", - "grpc", - "gpr_test_util", - "gpr" - ] - }, - { - "name": "status_test", - "build": "test", - "language": "c++", - "src": [ - "test/cpp/util/status_test.cc" - ], - "deps": [ - "grpc_test_util", - "grpc++", - "grpc", - "gpr_test_util", - "gpr" - ] - }, - { - "name": "sync_streaming_ping_pong_test", - "build": "test", - "language": "c++", - "src": [ - "test/cpp/qps/sync_streaming_ping_pong_test.cc" - ], - "deps": [ - "qps", - "grpc++_test_util", - "grpc_test_util", - "grpc++", - "grpc", - "gpr_test_util", - "gpr" - ], - "platforms": [ - "mac", - "linux", - "posix" - ] - }, - { - "name": "sync_unary_ping_pong_test", - "build": "test", - "language": "c++", - "src": [ - "test/cpp/qps/sync_unary_ping_pong_test.cc" - ], - "deps": [ - "qps", - "grpc++_test_util", - "grpc_test_util", - "grpc++", - "grpc", - "gpr_test_util", - "gpr" - ], - "platforms": [ - "mac", - "linux", - "posix" - ] - }, - { - "name": "thread_stress_test", - "build": "test", - "language": "c++", - "src": [ - "test/cpp/end2end/thread_stress_test.cc" - ], - "deps": [ - "grpc++_test_util", - "grpc_test_util", - "grpc++", - "grpc", - "gpr_test_util", - "gpr" - ] - }, - { - "name": "zookeeper_test", - "build": "test", - "language": "c++", - "src": [ - "test/cpp/end2end/zookeeper_test.cc" - ], - "deps": [ - "grpc++_test_util", - "grpc_test_util", - "grpc++", - "grpc_zookeeper", - "grpc", - "gpr_test_util", - "gpr" - ], - "external_deps": [ - "zookeeper" - ] - } - ] -} From 4399679161e9f2ed072120b176f01b30a0ab7042 Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Wed, 7 Oct 2015 11:40:37 -0700 Subject: [PATCH 163/169] Removed now-extaneous function --- src/node/index.js | 26 -------------------------- 1 file changed, 26 deletions(-) diff --git a/src/node/index.js b/src/node/index.js index 25d8ce6e3b4..ba6bac39716 100644 --- a/src/node/index.js +++ b/src/node/index.js @@ -94,32 +94,6 @@ exports.load = function load(filename, format) { return loadObject(builder.ns); }; -/** - * Get a function that a client can use to update metadata with authentication - * information from a Google Auth credential object, which comes from the - * google-auth-library. - * @param {Object} credential The credential object to use - * @return {function(Object, callback)} Metadata updater function - */ -exports.getGoogleAuthDelegate = function getGoogleAuthDelegate(credential) { - /** - * Update a metadata object with authentication information. - * @param {string} authURI The uri to authenticate to - * @param {Object} metadata Metadata object - * @param {function(Error, Object)} callback - */ - return function updateMetadata(authURI, metadata, callback) { - credential.getRequestMetadata(authURI, function(err, header) { - if (err) { - callback(err); - return; - } - metadata.add('authorization', header.Authorization); - callback(null, metadata); - }); - }; -}; - /** * @see module:src/server.Server */ From 4de94d41d27b0c204eac9cabdb439b142d086e1f Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Wed, 7 Oct 2015 13:52:47 -0700 Subject: [PATCH 164/169] Added more documentation to credentials.js --- src/node/src/credentials.js | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/src/node/src/credentials.js b/src/node/src/credentials.js index 97dd973715f..009ff633067 100644 --- a/src/node/src/credentials.js +++ b/src/node/src/credentials.js @@ -33,6 +33,29 @@ /** * Credentials module + * + * This module contains factory methods for two different credential types: + * CallCredentials and ChannelCredentials. ChannelCredentials are things like + * SSL credentials that can be used to secure a connection, and are used to + * construct a Client object. CallCredentials genrally modify metadata, so they + * can be attached to an individual method call. + * + * CallCredentials can be composed with other CallCredentials to create + * CallCredentials. ChannelCredentials can be composed with CallCredentials + * to create ChannelCredentials. No combined credential can have more than + * one ChannelCredentials. + * + * For example, to create a client secured with SSL that uses Google + * default application credentials to authenticate: + * + * var channel_creds = credentials.createSsl(root_certs); + * (new GoogleAuth()).getApplicationDefault(function(err, credential) { + * var call_creds = credentials.createFromGoogleCredential(credential); + * var combined_creds = credentials.combineChannelCredentials( + * channel_creds, call_creds); + * var client = new Client(address, combined_creds); + * }); + * * @module */ @@ -134,7 +157,7 @@ exports.combineCallCredentials = function() { /** * Create an insecure credentials object. This is used to create a channel that - * does not use SSL. + * does not use SSL. This cannot be composed with anything. * @return {ChannelCredentials} The insecure credentials object */ exports.createInsecure = ChannelCredentials.createInsecure; From 47eeb2b28c8c6b7aa7551381cf80ef0c28541775 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Wed, 7 Oct 2015 14:09:18 -0700 Subject: [PATCH 165/169] reduce parallelism for windows build --- tools/run_tests/run_tests.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/run_tests/run_tests.py b/tools/run_tests/run_tests.py index 4e71e3e4b64..a05fbe806a8 100755 --- a/tools/run_tests/run_tests.py +++ b/tools/run_tests/run_tests.py @@ -624,7 +624,9 @@ if platform.system() == 'Windows': def make_jobspec(cfg, targets, makefile='Makefile'): extra_args = [] # better do parallel compilation - extra_args.extend(["/m"]) + # empirically /m:2 gives the best performance/price and should prevent + # overloading the windows workers. + extra_args.extend(["/m:2"]) # disable PDB generation: it's broken, and we don't need it during CI extra_args.extend(["/p:Jenkins=true"]) return [ From 2189719b8f37f13870bde8a43549de3b3b58385d Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Wed, 7 Oct 2015 15:42:21 -0700 Subject: [PATCH 166/169] increase timeout for build step jobs to 10 mins --- tools/run_tests/run_tests.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/run_tests/run_tests.py b/tools/run_tests/run_tests.py index a05fbe806a8..cb366c0a15c 100755 --- a/tools/run_tests/run_tests.py +++ b/tools/run_tests/run_tests.py @@ -660,7 +660,7 @@ if make_targets: make_commands = itertools.chain.from_iterable(make_jobspec(cfg, list(targets), makefile) for cfg in build_configs for (makefile, targets) in make_targets.iteritems()) build_steps.extend(set(make_commands)) build_steps.extend(set( - jobset.JobSpec(cmdline, environ={'CONFIG': cfg}) + jobset.JobSpec(cmdline, environ={'CONFIG': cfg}, timeout_seconds=10*60) for cfg in build_configs for l in languages for cmdline in l.build_steps())) From 7828e813f780d95814db67fc2aac8a3e104ac743 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Wed, 7 Oct 2015 17:27:48 -0700 Subject: [PATCH 167/169] make C# interop test args parsing compliant with spec --- src/csharp/Grpc.IntegrationTesting/InteropClient.cs | 12 +++++++----- src/csharp/Grpc.IntegrationTesting/InteropServer.cs | 7 ++++--- tools/run_tests/run_interop_tests.py | 6 +++--- 3 files changed, 14 insertions(+), 11 deletions(-) diff --git a/src/csharp/Grpc.IntegrationTesting/InteropClient.cs b/src/csharp/Grpc.IntegrationTesting/InteropClient.cs index 0df4ee35ba9..0ed2910ae02 100644 --- a/src/csharp/Grpc.IntegrationTesting/InteropClient.cs +++ b/src/csharp/Grpc.IntegrationTesting/InteropClient.cs @@ -66,11 +66,13 @@ namespace Grpc.IntegrationTesting [Option("test_case", DefaultValue = "large_unary")] public string TestCase { get; set; } - [Option("use_tls")] - public bool UseTls { get; set; } + // Deliberately using nullable bool type to allow --use_tls=true syntax (as opposed to --use_tls) + [Option("use_tls", DefaultValue = false)] + public bool? UseTls { get; set; } - [Option("use_test_ca")] - public bool UseTestCa { get; set; } + // Deliberately using nullable bool type to allow --use_test_ca=true syntax (as opposed to --use_test_ca) + [Option("use_test_ca", DefaultValue = false)] + public bool? UseTestCa { get; set; } [Option("default_service_account", Required = false)] public string DefaultServiceAccount { get; set; } @@ -134,7 +136,7 @@ namespace Grpc.IntegrationTesting private async Task CreateCredentialsAsync() { - var credentials = options.UseTls ? TestCredentials.CreateTestClientCredentials(options.UseTestCa) : ChannelCredentials.Insecure; + var credentials = options.UseTls.Value ? TestCredentials.CreateTestClientCredentials(options.UseTestCa.Value) : ChannelCredentials.Insecure; if (options.TestCase == "jwt_token_creds") { diff --git a/src/csharp/Grpc.IntegrationTesting/InteropServer.cs b/src/csharp/Grpc.IntegrationTesting/InteropServer.cs index 513f8722d64..29f842be2ec 100644 --- a/src/csharp/Grpc.IntegrationTesting/InteropServer.cs +++ b/src/csharp/Grpc.IntegrationTesting/InteropServer.cs @@ -54,8 +54,9 @@ namespace Grpc.IntegrationTesting [Option("port", DefaultValue = 8070)] public int Port { get; set; } - [Option("use_tls")] - public bool UseTls { get; set; } + // Deliberately using nullable bool type to allow --use_tls=true syntax (as opposed to --use_tls) + [Option("use_tls", DefaultValue = false)] + public bool? UseTls { get; set; } [HelpOption] public string GetUsage() @@ -99,7 +100,7 @@ namespace Grpc.IntegrationTesting string host = "0.0.0.0"; int port = options.Port; - if (options.UseTls) + if (options.UseTls.Value) { server.Ports.Add(host, port, TestCredentials.CreateTestServerCredentials()); } diff --git a/tools/run_tests/run_interop_tests.py b/tools/run_tests/run_interop_tests.py index 374dec1851c..abc4b6e6fb7 100755 --- a/tools/run_tests/run_interop_tests.py +++ b/tools/run_tests/run_interop_tests.py @@ -100,17 +100,17 @@ class CSharpLanguage: def cloud_to_prod_args(self): return (self.client_cmdline_base + _CLOUD_TO_PROD_BASE_ARGS + - ['--use_tls']) + ['--use_tls=true']) def cloud_to_cloud_args(self): return (self.client_cmdline_base + _CLOUD_TO_CLOUD_BASE_ARGS + - ['--use_tls', '--use_test_ca']) + ['--use_tls=true', '--use_test_ca=true']) def cloud_to_prod_env(self): return _SSL_CERT_ENV def server_args(self): - return ['mono', 'Grpc.IntegrationTesting.Server.exe', '--use_tls'] + return ['mono', 'Grpc.IntegrationTesting.Server.exe', '--use_tls=true'] def __str__(self): return 'csharp' From bcf988f0f3c77537f5ac4e67caedb3dca752ae0d Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Thu, 8 Oct 2015 03:00:42 +0200 Subject: [PATCH 168/169] Splitting out bundle install for ruby into the prebuild step. --- tools/run_tests/build_ruby.sh | 2 -- tools/run_tests/pre_build_ruby.sh | 39 +++++++++++++++++++++++++++++++ tools/run_tests/run_tests.py | 2 +- 3 files changed, 40 insertions(+), 3 deletions(-) create mode 100755 tools/run_tests/pre_build_ruby.sh diff --git a/tools/run_tests/build_ruby.sh b/tools/run_tests/build_ruby.sh index 259f336ef22..6d23c316c5a 100755 --- a/tools/run_tests/build_ruby.sh +++ b/tools/run_tests/build_ruby.sh @@ -37,6 +37,4 @@ export GRPC_CONFIG=${CONFIG:-opt} cd $(dirname $0)/../../src/ruby rm -rf ./tmp - -bundle install rake compile:grpc diff --git a/tools/run_tests/pre_build_ruby.sh b/tools/run_tests/pre_build_ruby.sh new file mode 100755 index 00000000000..569a1d0333b --- /dev/null +++ b/tools/run_tests/pre_build_ruby.sh @@ -0,0 +1,39 @@ +#!/bin/bash + +# Copyright 2015, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +set -ex + +export GRPC_CONFIG=${CONFIG:-opt} + +# change to grpc's ruby directory +cd $(dirname $0)/../../src/ruby + +bundle install diff --git a/tools/run_tests/run_tests.py b/tools/run_tests/run_tests.py index 6423ecfd7cb..d38c0c96ee6 100755 --- a/tools/run_tests/run_tests.py +++ b/tools/run_tests/run_tests.py @@ -284,7 +284,7 @@ class RubyLanguage(object): environ=_FORCE_ENVIRON_FOR_WRAPPERS)] def pre_build_steps(self): - return [] + return [['tools/run_tests/pre_build_ruby.sh']] def make_targets(self): return ['static_c'] From bfe8a9febc97c0de542fe01c5ecb05512e7afd12 Mon Sep 17 00:00:00 2001 From: Tim Emiola Date: Thu, 8 Oct 2015 09:05:28 -0700 Subject: [PATCH 169/169] Fixes the broken ruby interop tests --- src/ruby/lib/grpc/generic/client_stub.rb | 22 ++++++++++++++-------- src/ruby/spec/generic/client_stub_spec.rb | 14 ++++++++++++++ 2 files changed, 28 insertions(+), 8 deletions(-) diff --git a/src/ruby/lib/grpc/generic/client_stub.rb b/src/ruby/lib/grpc/generic/client_stub.rb index 8c923845298..b8e33ad295a 100644 --- a/src/ruby/lib/grpc/generic/client_stub.rb +++ b/src/ruby/lib/grpc/generic/client_stub.rb @@ -176,8 +176,7 @@ module GRPC deadline: deadline, timeout: timeout, parent: parent) - kw_with_jwt_uri = self.class.update_with_jwt_aud_uri(kw, @host, method) - md = @update_metadata.nil? ? kw : @update_metadata.call(kw_with_jwt_uri) + md = update_metadata(kw, method) return c.request_response(req, **md) unless return_op # return the operation view of the active_call; define #execute as a @@ -244,8 +243,7 @@ module GRPC deadline: deadline, timeout: timeout, parent: parent) - kw_with_jwt_uri = self.class.update_with_jwt_aud_uri(kw, @host, method) - md = @update_metadata.nil? ? kw : @update_metadata.call(kw_with_jwt_uri) + md = update_metadata(kw, method) return c.client_streamer(requests, **md) unless return_op # return the operation view of the active_call; define #execute as a @@ -322,8 +320,7 @@ module GRPC deadline: deadline, timeout: timeout, parent: parent) - kw_with_jwt_uri = self.class.update_with_jwt_aud_uri(kw, @host, method) - md = @update_metadata.nil? ? kw : @update_metadata.call(kw_with_jwt_uri) + md = update_metadata(kw, method) return c.server_streamer(req, **md, &blk) unless return_op # return the operation view of the active_call; define #execute @@ -439,8 +436,7 @@ module GRPC deadline: deadline, timeout: timeout, parent: parent) - kw_with_jwt_uri = self.class.update_with_jwt_aud_uri(kw, @host, method) - md = @update_metadata.nil? ? kw : @update_metadata.call(kw_with_jwt_uri) + md = update_metadata(kw, method) return c.bidi_streamer(requests, **md, &blk) unless return_op # return the operation view of the active_call; define #execute @@ -454,6 +450,16 @@ module GRPC private + def update_metadata(kw, method) + return kw if @update_metadata.nil? + just_jwt_uri = self.class.update_with_jwt_aud_uri({}, @host, method) + updated = @update_metadata.call(just_jwt_uri) + + # keys should be lowercase + updated = Hash[updated.each_pair.map { |k, v| [k.downcase, v] }] + kw.merge(updated) + end + # Creates a new active stub # # @param method [string] the method being called. diff --git a/src/ruby/spec/generic/client_stub_spec.rb b/src/ruby/spec/generic/client_stub_spec.rb index a05433df75e..c5173aee1d5 100644 --- a/src/ruby/spec/generic/client_stub_spec.rb +++ b/src/ruby/spec/generic/client_stub_spec.rb @@ -159,6 +159,20 @@ describe 'ClientStub' do th.join end + it 'should downcase the keys provided by the metadata updater' do + server_port = create_test_server + host = "localhost:#{server_port}" + th = run_request_response(@sent_msg, @resp, @pass, + k1: 'downcased-key-v1', k2: 'v2') + update_md = proc do |md| + md[:K1] = 'downcased-key-v1' + md + end + stub = GRPC::ClientStub.new(host, @cq, update_metadata: update_md) + expect(get_response(stub)).to eq(@resp) + th.join + end + it 'should send a request when configured using an override channel' do server_port = create_test_server alt_host = "localhost:#{server_port}"