From 367c2c0eab9c82c04031fa977b40c41626f46d74 Mon Sep 17 00:00:00 2001 From: Muxi Yan Date: Mon, 10 Jul 2017 11:21:24 -0700 Subject: [PATCH 01/80] Update protoc version --- src/objective-c/!ProtoCompiler-gRPCPlugin.podspec | 2 +- src/objective-c/!ProtoCompiler.podspec | 2 +- .../src/objective-c/!ProtoCompiler-gRPCPlugin.podspec.template | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/objective-c/!ProtoCompiler-gRPCPlugin.podspec b/src/objective-c/!ProtoCompiler-gRPCPlugin.podspec index 351a45df58e..b351d30aee1 100644 --- a/src/objective-c/!ProtoCompiler-gRPCPlugin.podspec +++ b/src/objective-c/!ProtoCompiler-gRPCPlugin.podspec @@ -101,7 +101,7 @@ Pod::Spec.new do |s| s.preserve_paths = plugin # Restrict the protoc version to the one supported by this plugin. - s.dependency '!ProtoCompiler', '3.2.0' + s.dependency '!ProtoCompiler', '3.3.0' # For the Protobuf dependency not to complain: s.ios.deployment_target = '7.0' s.osx.deployment_target = '10.9' diff --git a/src/objective-c/!ProtoCompiler.podspec b/src/objective-c/!ProtoCompiler.podspec index 2e9b944f33d..c3f95f9f425 100644 --- a/src/objective-c/!ProtoCompiler.podspec +++ b/src/objective-c/!ProtoCompiler.podspec @@ -36,7 +36,7 @@ Pod::Spec.new do |s| # exclamation mark ensures that other "regular" pods will be able to find it as it'll be installed # before them. s.name = '!ProtoCompiler' - v = '3.2.0' + v = '3.3.0' s.version = v s.summary = 'The Protobuf Compiler (protoc) generates Objective-C files from .proto files' s.description = <<-DESC diff --git a/templates/src/objective-c/!ProtoCompiler-gRPCPlugin.podspec.template b/templates/src/objective-c/!ProtoCompiler-gRPCPlugin.podspec.template index 93e3de8757d..9df980dc061 100644 --- a/templates/src/objective-c/!ProtoCompiler-gRPCPlugin.podspec.template +++ b/templates/src/objective-c/!ProtoCompiler-gRPCPlugin.podspec.template @@ -103,7 +103,7 @@ s.preserve_paths = plugin # Restrict the protoc version to the one supported by this plugin. - s.dependency '!ProtoCompiler', '3.2.0' + s.dependency '!ProtoCompiler', '3.3.0' # For the Protobuf dependency not to complain: s.ios.deployment_target = '7.0' s.osx.deployment_target = '10.9' From c0d3babbaad9ccf1630fafbc1e5f29ad2e8edd8a Mon Sep 17 00:00:00 2001 From: Muxi Yan Date: Mon, 10 Jul 2017 11:21:37 -0700 Subject: [PATCH 02/80] Update BoringSSL version --- gRPC-Core.podspec | 2 +- src/objective-c/BoringSSL.podspec | 542 ++++++++++++++------------- templates/gRPC-Core.podspec.template | 2 +- 3 files changed, 281 insertions(+), 265 deletions(-) diff --git a/gRPC-Core.podspec b/gRPC-Core.podspec index 2095c0f5297..facc1c3b21f 100644 --- a/gRPC-Core.podspec +++ b/gRPC-Core.podspec @@ -176,7 +176,7 @@ Pod::Spec.new do |s| ss.header_mappings_dir = '.' ss.libraries = 'z' ss.dependency "#{s.name}/Interface", version - ss.dependency 'BoringSSL', '~> 8.0' + ss.dependency 'BoringSSL', '~> 9.0' ss.dependency 'nanopb', '~> 0.3' # To save you from scrolling, this is the last part of the podspec. diff --git a/src/objective-c/BoringSSL.podspec b/src/objective-c/BoringSSL.podspec index 651bd4977d8..81e6555cfd2 100644 --- a/src/objective-c/BoringSSL.podspec +++ b/src/objective-c/BoringSSL.podspec @@ -31,7 +31,7 @@ Pod::Spec.new do |s| s.name = 'BoringSSL' - version = '8.2' + version = '9.0' s.version = version s.summary = 'BoringSSL is a fork of OpenSSL that is designed to meet Google’s needs.' # Adapted from the homepage: @@ -69,9 +69,7 @@ Pod::Spec.new do |s| s.source = { :git => 'https://boringssl.googlesource.com/boringssl', - # Restore this version name hack in the next version!! - # :tag => "version_for_cocoapods_#{version}", - :tag => "version_for_cocoapods_8.0", + :tag => "version_for_cocoapods_#{version}", } name = 'openssl' @@ -389,42 +387,42 @@ Pod::Spec.new do |s| 0x28340c19, 0x283480ac, 0x283500ea, - 0x2c3228ca, - 0x2c32a8d8, - 0x2c3328ea, - 0x2c33a8fc, - 0x2c342910, - 0x2c34a922, - 0x2c35293d, - 0x2c35a94f, - 0x2c362962, + 0x2c3229b1, + 0x2c32a9bf, + 0x2c3329d1, + 0x2c33a9e3, + 0x2c3429f7, + 0x2c34aa09, + 0x2c352a24, + 0x2c35aa36, + 0x2c362a49, 0x2c36832d, - 0x2c37296f, - 0x2c37a981, - 0x2c382994, - 0x2c38a9ab, - 0x2c3929b9, - 0x2c39a9c9, - 0x2c3a29db, - 0x2c3aa9ef, - 0x2c3b2a00, - 0x2c3baa1f, - 0x2c3c2a33, - 0x2c3caa49, - 0x2c3d2a62, - 0x2c3daa7f, - 0x2c3e2a90, - 0x2c3eaa9e, - 0x2c3f2ab6, - 0x2c3faace, - 0x2c402adb, + 0x2c372a56, + 0x2c37aa68, + 0x2c382a7b, + 0x2c38aa92, + 0x2c392aa0, + 0x2c39aab0, + 0x2c3a2ac2, + 0x2c3aaad6, + 0x2c3b2ae7, + 0x2c3bab06, + 0x2c3c2b1a, + 0x2c3cab30, + 0x2c3d2b49, + 0x2c3dab66, + 0x2c3e2b77, + 0x2c3eab85, + 0x2c3f2b9d, + 0x2c3fabb5, + 0x2c402bc2, 0x2c4090e7, - 0x2c412aec, - 0x2c41aaff, + 0x2c412bd3, + 0x2c41abe6, 0x2c4210c0, - 0x2c42ab10, + 0x2c42abf7, 0x2c430720, - 0x2c43aa11, + 0x2c43aaf8, 0x30320000, 0x30328015, 0x3033001f, @@ -577,180 +575,189 @@ Pod::Spec.new do |s| 0x403b9861, 0x403c0064, 0x403c8083, - 0x403d18aa, - 0x403d98c0, - 0x403e18cf, - 0x403e98e2, - 0x403f18fc, - 0x403f990a, - 0x4040191f, - 0x40409933, - 0x40411950, - 0x4041996b, - 0x40421984, - 0x40429997, - 0x404319ab, - 0x404399c3, - 0x404419da, + 0x403d18c1, + 0x403d98d7, + 0x403e18e6, + 0x403e98f9, + 0x403f1913, + 0x403f9921, + 0x40401936, + 0x4040994a, + 0x40411967, + 0x40419982, + 0x4042199b, + 0x404299ae, + 0x404319c2, + 0x404399da, + 0x404419f1, 0x404480ac, - 0x404519ef, - 0x40459a01, - 0x40461a25, - 0x40469a45, - 0x40471a53, - 0x40479a7a, - 0x40481ab7, - 0x40489ad0, - 0x40491ae7, - 0x40499b01, - 0x404a1b18, - 0x404a9b36, - 0x404b1b4e, - 0x404b9b65, - 0x404c1b7b, - 0x404c9b8d, - 0x404d1bae, - 0x404d9bd0, - 0x404e1be4, - 0x404e9bf1, - 0x404f1c1e, - 0x404f9c47, - 0x40501c71, - 0x40509c85, - 0x40511ca0, - 0x40519cb0, - 0x40521cc7, - 0x40529ceb, - 0x40531d03, - 0x40539d16, - 0x40541d2b, - 0x40549d4e, - 0x40551d5c, - 0x40559d79, - 0x40561d86, - 0x40569d9f, - 0x40571db7, - 0x40579dca, - 0x40581ddf, - 0x40589e06, - 0x40591e35, - 0x40599e62, - 0x405a1e76, - 0x405a9e86, - 0x405b1e9e, - 0x405b9eaf, - 0x405c1ec2, - 0x405c9ed3, - 0x405d1ee0, - 0x405d9ef7, - 0x405e1f17, + 0x40451a06, + 0x40459a18, + 0x40461a3c, + 0x40469a5c, + 0x40471a6a, + 0x40479a91, + 0x40481ace, + 0x40489ae7, + 0x40491afe, + 0x40499b18, + 0x404a1b2f, + 0x404a9b4d, + 0x404b1b65, + 0x404b9b7c, + 0x404c1b92, + 0x404c9ba4, + 0x404d1bc5, + 0x404d9be7, + 0x404e1bfb, + 0x404e9c08, + 0x404f1c35, + 0x404f9c5e, + 0x40501c99, + 0x40509cad, + 0x40511cc8, + 0x40519cd8, + 0x40521cef, + 0x40529d13, + 0x40531d2b, + 0x40539d3e, + 0x40541d53, + 0x40549d76, + 0x40551d84, + 0x40559da1, + 0x40561dae, + 0x40569dc7, + 0x40571ddf, + 0x40579df2, + 0x40581e07, + 0x40589e2e, + 0x40591e5d, + 0x40599e8a, + 0x405a1e9e, + 0x405a9eae, + 0x405b1ec6, + 0x405b9ed7, + 0x405c1eea, + 0x405c9f0b, + 0x405d1f18, + 0x405d9f2f, + 0x405e1f6d, 0x405e8a95, - 0x405f1f38, - 0x405f9f45, - 0x40601f53, - 0x40609f75, - 0x40611f9d, - 0x40619fb2, - 0x40621fc9, - 0x40629fda, - 0x40631feb, - 0x4063a000, - 0x40642017, - 0x4064a043, - 0x4065205e, - 0x4065a075, - 0x4066208d, - 0x4066a0b7, - 0x406720e2, - 0x4067a103, - 0x40682116, - 0x4068a137, - 0x40692169, - 0x4069a197, - 0x406a21b8, - 0x406aa1d8, - 0x406b2360, - 0x406ba383, - 0x406c2399, - 0x406ca5c5, - 0x406d25f4, - 0x406da61c, - 0x406e264a, - 0x406ea662, - 0x406f2681, - 0x406fa696, - 0x407026a9, - 0x4070a6c6, + 0x405f1f8e, + 0x405f9f9b, + 0x40601fa9, + 0x40609fcb, + 0x4061200f, + 0x4061a047, + 0x4062205e, + 0x4062a06f, + 0x40632080, + 0x4063a095, + 0x406420ac, + 0x4064a0d8, + 0x406520f3, + 0x4065a10a, + 0x40662122, + 0x4066a14c, + 0x40672177, + 0x4067a198, + 0x406821ab, + 0x4068a1cc, + 0x406921fe, + 0x4069a22c, + 0x406a224d, + 0x406aa26d, + 0x406b23f5, + 0x406ba418, + 0x406c242e, + 0x406ca690, + 0x406d26bf, + 0x406da6e7, + 0x406e2715, + 0x406ea749, + 0x406f2768, + 0x406fa77d, + 0x40702790, + 0x4070a7ad, 0x40710800, - 0x4071a6d8, - 0x407226eb, - 0x4072a704, - 0x4073271c, + 0x4071a7bf, + 0x407227d2, + 0x4072a7eb, + 0x40732803, 0x4073936d, - 0x40742730, - 0x4074a74a, - 0x4075275b, - 0x4075a76f, - 0x4076277d, + 0x40742817, + 0x4074a831, + 0x40752842, + 0x4075a856, + 0x40762864, 0x407691aa, - 0x407727a2, - 0x4077a7c4, - 0x407827df, - 0x4078a818, - 0x4079282f, - 0x4079a845, - 0x407a2851, - 0x407aa864, - 0x407b2879, - 0x407ba88b, - 0x407c28a0, - 0x407ca8a9, - 0x407d2152, - 0x407d9c57, - 0x407e27f4, - 0x407e9e16, - 0x407f1a67, + 0x40772889, + 0x4077a8ab, + 0x407828c6, + 0x4078a8ff, + 0x40792916, + 0x4079a92c, + 0x407a2938, + 0x407aa94b, + 0x407b2960, + 0x407ba972, + 0x407c2987, + 0x407ca990, + 0x407d21e7, + 0x407d9c6e, + 0x407e28db, + 0x407e9e3e, + 0x407f1a7e, 0x407f9887, - 0x40801c2e, - 0x40809a8f, - 0x40811cd9, - 0x40819c08, - 0x40822635, + 0x40801c45, + 0x40809aa6, + 0x40811d01, + 0x40819c1f, + 0x40822700, 0x4082986d, - 0x40831df1, - 0x4083a028, - 0x40841aa3, - 0x40849e4e, - 0x41f4228b, - 0x41f9231d, - 0x41fe2210, - 0x41fea3ec, - 0x41ff24dd, - 0x420322a4, - 0x420822c6, - 0x4208a302, - 0x420921f4, - 0x4209a33c, - 0x420a224b, - 0x420aa22b, - 0x420b226b, - 0x420ba2e4, - 0x420c24f9, - 0x420ca3b9, - 0x420d23d3, - 0x420da40a, - 0x42122424, - 0x421724c0, - 0x4217a466, - 0x421c2488, - 0x421f2443, - 0x42212510, - 0x422624a3, - 0x422b25a9, - 0x422ba572, - 0x422c2591, - 0x422ca54c, - 0x422d252b, + 0x40831e19, + 0x4083a0bd, + 0x40841aba, + 0x40849e76, + 0x40851efb, + 0x40859ff3, + 0x40861f4f, + 0x40869c88, + 0x4087272d, + 0x4087a024, + 0x408818aa, + 0x41f42320, + 0x41f923b2, + 0x41fe22a5, + 0x41fea481, + 0x41ff2572, + 0x42032339, + 0x4208235b, + 0x4208a397, + 0x42092289, + 0x4209a3d1, + 0x420a22e0, + 0x420aa2c0, + 0x420b2300, + 0x420ba379, + 0x420c258e, + 0x420ca44e, + 0x420d2468, + 0x420da49f, + 0x421224b9, + 0x42172555, + 0x4217a4fb, + 0x421c251d, + 0x421f24d8, + 0x422125a5, + 0x42262538, + 0x422b2674, + 0x422ba622, + 0x422c265c, + 0x422ca5e1, + 0x422d25c0, + 0x422da641, + 0x422e2607, 0x4432072b, 0x4432873a, 0x44330746, @@ -793,69 +800,69 @@ Pod::Spec.new do |s| 0x4c3d136d, 0x4c3d937c, 0x4c3e1389, - 0x50322b22, - 0x5032ab31, - 0x50332b3c, - 0x5033ab4c, - 0x50342b65, - 0x5034ab7f, - 0x50352b8d, - 0x5035aba3, - 0x50362bb5, - 0x5036abcb, - 0x50372be4, - 0x5037abf7, - 0x50382c0f, - 0x5038ac20, - 0x50392c35, - 0x5039ac49, - 0x503a2c69, - 0x503aac7f, - 0x503b2c97, - 0x503baca9, - 0x503c2cc5, - 0x503cacdc, - 0x503d2cf5, - 0x503dad0b, - 0x503e2d18, - 0x503ead2e, - 0x503f2d40, + 0x50322c09, + 0x5032ac18, + 0x50332c23, + 0x5033ac33, + 0x50342c4c, + 0x5034ac66, + 0x50352c74, + 0x5035ac8a, + 0x50362c9c, + 0x5036acb2, + 0x50372ccb, + 0x5037acde, + 0x50382cf6, + 0x5038ad07, + 0x50392d1c, + 0x5039ad30, + 0x503a2d50, + 0x503aad66, + 0x503b2d7e, + 0x503bad90, + 0x503c2dac, + 0x503cadc3, + 0x503d2ddc, + 0x503dadf2, + 0x503e2dff, + 0x503eae15, + 0x503f2e27, 0x503f8382, - 0x50402d53, - 0x5040ad63, - 0x50412d7d, - 0x5041ad8c, - 0x50422da6, - 0x5042adc3, - 0x50432dd3, - 0x5043ade3, - 0x50442df2, + 0x50402e3a, + 0x5040ae4a, + 0x50412e64, + 0x5041ae73, + 0x50422e8d, + 0x5042aeaa, + 0x50432eba, + 0x5043aeca, + 0x50442ed9, 0x5044843f, - 0x50452e06, - 0x5045ae24, - 0x50462e37, - 0x5046ae4d, - 0x50472e5f, - 0x5047ae74, - 0x50482e9a, - 0x5048aea8, - 0x50492ebb, - 0x5049aed0, - 0x504a2ee6, - 0x504aaef6, - 0x504b2f16, - 0x504baf29, - 0x504c2f4c, - 0x504caf7a, - 0x504d2f8c, - 0x504dafa9, - 0x504e2fc4, - 0x504eafe0, - 0x504f2ff2, - 0x504fb009, - 0x50503018, + 0x50452eed, + 0x5045af0b, + 0x50462f1e, + 0x5046af34, + 0x50472f46, + 0x5047af5b, + 0x50482f81, + 0x5048af8f, + 0x50492fa2, + 0x5049afb7, + 0x504a2fcd, + 0x504aafdd, + 0x504b2ffd, + 0x504bb010, + 0x504c3033, + 0x504cb061, + 0x504d3073, + 0x504db090, + 0x504e30ab, + 0x504eb0c7, + 0x504f30d9, + 0x504fb0f0, + 0x505030ff, 0x505086ef, - 0x5051302b, + 0x50513112, 0x58320ec9, 0x68320e8b, 0x68328c25, @@ -1218,6 +1225,7 @@ Pod::Spec.new do |s| "BIO_NOT_SET\\0" "BLOCK_CIPHER_PAD_IS_WRONG\\0" "BUFFERED_MESSAGES_ON_CIPHER_CHANGE\\0" + "CANNOT_PARSE_LEAF_CERT\\0" "CA_DN_LENGTH_MISMATCH\\0" "CA_DN_TOO_LONG\\0" "CCS_RECEIVED_EARLY\\0" @@ -1261,6 +1269,7 @@ Pod::Spec.new do |s| "INVALID_COMPRESSION_LIST\\0" "INVALID_MESSAGE\\0" "INVALID_OUTER_RECORD_TYPE\\0" + "INVALID_SCT_LIST\\0" "INVALID_SSL_SESSION\\0" "INVALID_TICKET_KEYS_LENGTH\\0" "LENGTH_MISMATCH\\0" @@ -1290,15 +1299,19 @@ Pod::Spec.new do |s| "NO_RENEGOTIATION\\0" "NO_REQUIRED_DIGEST\\0" "NO_SHARED_CIPHER\\0" + "NO_SHARED_GROUP\\0" "NULL_SSL_CTX\\0" "NULL_SSL_METHOD_PASSED\\0" "OLD_SESSION_CIPHER_NOT_RETURNED\\0" + "OLD_SESSION_PRF_HASH_MISMATCH\\0" "OLD_SESSION_VERSION_NOT_RETURNED\\0" "PARSE_TLSEXT\\0" "PATH_TOO_LONG\\0" "PEER_DID_NOT_RETURN_A_CERTIFICATE\\0" "PEER_ERROR_UNSUPPORTED_CERTIFICATE_TYPE\\0" + "PRE_SHARED_KEY_MUST_BE_LAST\\0" "PROTOCOL_IS_SHUTDOWN\\0" + "PSK_IDENTITY_BINDER_COUNT_MISMATCH\\0" "PSK_IDENTITY_NOT_FOUND\\0" "PSK_NO_CLIENT_CB\\0" "PSK_NO_SERVER_CB\\0" @@ -1350,7 +1363,9 @@ Pod::Spec.new do |s| "TLSV1_ALERT_USER_CANCELLED\\0" "TLSV1_BAD_CERTIFICATE_HASH_VALUE\\0" "TLSV1_BAD_CERTIFICATE_STATUS_RESPONSE\\0" + "TLSV1_CERTIFICATE_REQUIRED\\0" "TLSV1_CERTIFICATE_UNOBTAINABLE\\0" + "TLSV1_UNKNOWN_PSK_IDENTITY\\0" "TLSV1_UNRECOGNIZED_NAME\\0" "TLSV1_UNSUPPORTED_EXTENSION\\0" "TLS_PEER_DID_NOT_RESPOND_WITH_CERTIFICATE_LIST\\0" @@ -1358,6 +1373,7 @@ Pod::Spec.new do |s| "TOO_MANY_EMPTY_FRAGMENTS\\0" "TOO_MANY_KEY_UPDATES\\0" "TOO_MANY_WARNING_ALERTS\\0" + "TOO_MUCH_SKIPPED_EARLY_DATA\\0" "UNABLE_TO_FIND_ECDH_PARAMETERS\\0" "UNEXPECTED_EXTENSION\\0" "UNEXPECTED_MESSAGE\\0" diff --git a/templates/gRPC-Core.podspec.template b/templates/gRPC-Core.podspec.template index 538e1e64905..1a9de243173 100644 --- a/templates/gRPC-Core.podspec.template +++ b/templates/gRPC-Core.podspec.template @@ -135,7 +135,7 @@ ss.header_mappings_dir = '.' ss.libraries = 'z' ss.dependency "#{s.name}/Interface", version - ss.dependency 'BoringSSL', '~> 8.0' + ss.dependency 'BoringSSL', '~> 9.0' ss.dependency 'nanopb', '~> 0.3' # To save you from scrolling, this is the last part of the podspec. From 68198b57442ac59cd9e18fdcbfe580c52f7faa62 Mon Sep 17 00:00:00 2001 From: Muxi Yan Date: Wed, 12 Jul 2017 11:43:23 -0700 Subject: [PATCH 03/80] Transport layer recv (decompression) path --- .../chttp2/transport/chttp2_transport.c | 83 ++++++++++++++++--- .../transport/chttp2/transport/frame_data.c | 2 +- .../ext/transport/chttp2/transport/internal.h | 11 +++ 3 files changed, 83 insertions(+), 13 deletions(-) diff --git a/src/core/ext/transport/chttp2/transport/chttp2_transport.c b/src/core/ext/transport/chttp2/transport/chttp2_transport.c index ab7dc3ba9ff..aea4ce4e287 100644 --- a/src/core/ext/transport/chttp2/transport/chttp2_transport.c +++ b/src/core/ext/transport/chttp2/transport/chttp2_transport.c @@ -668,6 +668,7 @@ static int init_stream(grpc_exec_ctx *exec_ctx, grpc_transport *gt, grpc_chttp2_incoming_metadata_buffer_init(&s->metadata_buffer[1], arena); grpc_chttp2_data_parser_init(&s->data_parser); grpc_slice_buffer_init(&s->flow_controlled_buffer); + grpc_slice_buffer_init(&s->decompressed_data_buffer); s->deadline = gpr_inf_future(GPR_CLOCK_MONOTONIC); GRPC_CLOSURE_INIT(&s->complete_fetch_locked, complete_fetch_locked, s, grpc_schedule_on_exec_ctx); @@ -706,6 +707,7 @@ static void destroy_stream_locked(grpc_exec_ctx *exec_ctx, void *sp, grpc_slice_buffer_destroy_internal(exec_ctx, &s->unprocessed_incoming_frames_buffer); grpc_slice_buffer_destroy_internal(exec_ctx, &s->frame_storage); + grpc_slice_buffer_destroy_internal(exec_ctx, &s->decompressed_data_buffer); grpc_chttp2_list_remove_stalled_by_transport(t, s); grpc_chttp2_list_remove_stalled_by_stream(t, s); @@ -756,6 +758,11 @@ static void destroy_stream(grpc_exec_ctx *exec_ctx, grpc_transport *gt, grpc_chttp2_transport *t = (grpc_chttp2_transport *)gt; grpc_chttp2_stream *s = (grpc_chttp2_stream *)gs; + if (s->stream_decompression_ctx != NULL) { + grpc_stream_compression_context_destroy(s->stream_decompression_ctx); + s->stream_decompression_ctx = NULL; + } + s->destroy_stream_arg = then_schedule_closure; GRPC_CLOSURE_SCHED( exec_ctx, GRPC_CLOSURE_INIT(&s->destroy_stream, destroy_stream_locked, s, @@ -1430,12 +1437,7 @@ static void perform_stream_op_locked(grpc_exec_ctx *exec_ctx, void *stream_op, s->recv_message_ready = op_payload->recv_message.recv_message_ready; s->recv_message = op_payload->recv_message.recv_message; if (s->id != 0) { - if (s->pending_byte_stream) { - already_received = s->frame_storage.length; - } else { - already_received = s->frame_storage.length + - s->unprocessed_incoming_frames_buffer.length; - } + already_received = s->frame_storage.length; incoming_byte_stream_update_flow_control(exec_ctx, t, s, 5, already_received); } @@ -1659,10 +1661,42 @@ void grpc_chttp2_maybe_complete_recv_message(grpc_exec_ctx *exec_ctx, if (s->unprocessed_incoming_frames_buffer.length == 0) { grpc_slice_buffer_swap(&s->unprocessed_incoming_frames_buffer, &s->frame_storage); + s->unprocessed_incoming_frames_decompressed = false; + } + if (s->stream_compression_recv_enabled && + !s->unprocessed_incoming_frames_decompressed) { + grpc_slice_buffer decompressed_data; + bool end_of_context; + grpc_slice_buffer_init(&decompressed_data); + if (!s->stream_decompression_ctx) { + s->stream_decompression_ctx = + grpc_stream_compression_context_create( + GRPC_STREAM_COMPRESSION_DECOMPRESS); + } + if (!grpc_stream_decompress(s->stream_decompression_ctx, + &s->unprocessed_incoming_frames_buffer, + &decompressed_data, NULL, 5, + &end_of_context)) { + grpc_slice_buffer_reset_and_unref_internal(exec_ctx, + &s->frame_storage); + grpc_slice_buffer_reset_and_unref_internal( + exec_ctx, &s->unprocessed_incoming_frames_buffer); + s->seen_error = true; + } else { + error = grpc_deframe_unprocessed_incoming_frames( + exec_ctx, &s->data_parser, s, &decompressed_data, NULL, + s->recv_message); + if (end_of_context) { + grpc_stream_compression_context_destroy( + s->stream_decompression_ctx); + s->stream_decompression_ctx = NULL; + } + } + } else { + error = grpc_deframe_unprocessed_incoming_frames( + exec_ctx, &s->data_parser, s, + &s->unprocessed_incoming_frames_buffer, NULL, s->recv_message); } - error = grpc_deframe_unprocessed_incoming_frames( - exec_ctx, &s->data_parser, s, - &s->unprocessed_incoming_frames_buffer, NULL, s->recv_message); if (error != GRPC_ERROR_NONE) { s->seen_error = true; grpc_slice_buffer_reset_and_unref_internal(exec_ctx, @@ -2568,6 +2602,7 @@ static void incoming_byte_stream_next_locked(grpc_exec_ctx *exec_ctx, if (s->frame_storage.length > 0) { grpc_slice_buffer_swap(&s->frame_storage, &s->unprocessed_incoming_frames_buffer); + s->unprocessed_incoming_frames_decompressed = false; GRPC_CLOSURE_SCHED(exec_ctx, bs->next_action.on_complete, GRPC_ERROR_NONE); } else if (s->byte_stream_error != GRPC_ERROR_NONE) { GRPC_CLOSURE_SCHED(exec_ctx, bs->next_action.on_complete, @@ -2629,17 +2664,41 @@ static grpc_error *incoming_byte_stream_pull(grpc_exec_ctx *exec_ctx, grpc_chttp2_incoming_byte_stream *bs = (grpc_chttp2_incoming_byte_stream *)byte_stream; grpc_chttp2_stream *s = bs->stream; + grpc_error *error; if (s->unprocessed_incoming_frames_buffer.length > 0) { - grpc_error *error = grpc_deframe_unprocessed_incoming_frames( + if (s->stream_compression_recv_enabled && + !s->unprocessed_incoming_frames_decompressed) { + bool end_of_context; + if (!s->stream_decompression_ctx) { + s->stream_decompression_ctx = grpc_stream_compression_context_create( + GRPC_STREAM_COMPRESSION_DECOMPRESS); + } + if (!grpc_stream_decompress(s->stream_decompression_ctx, + &s->unprocessed_incoming_frames_buffer, + &s->decompressed_data_buffer, NULL, + ~(size_t)0, &end_of_context)) { + error = + GRPC_ERROR_CREATE_FROM_STATIC_STRING("Stream decompression error."); + return error; + } + GPR_ASSERT(s->unprocessed_incoming_frames_buffer.length == 0); + grpc_slice_buffer_swap(&s->unprocessed_incoming_frames_buffer, + &s->decompressed_data_buffer); + s->unprocessed_incoming_frames_decompressed = true; + if (end_of_context) { + grpc_stream_compression_context_destroy(s->stream_decompression_ctx); + s->stream_decompression_ctx = NULL; + } + } + error = grpc_deframe_unprocessed_incoming_frames( exec_ctx, &s->data_parser, s, &s->unprocessed_incoming_frames_buffer, slice, NULL); if (error != GRPC_ERROR_NONE) { return error; } } else { - grpc_error *error = - GRPC_ERROR_CREATE_FROM_STATIC_STRING("Truncated message"); + error = GRPC_ERROR_CREATE_FROM_STATIC_STRING("Truncated message"); GRPC_CLOSURE_SCHED(exec_ctx, &s->reset_byte_stream, GRPC_ERROR_REF(error)); return error; } diff --git a/src/core/ext/transport/chttp2/transport/frame_data.c b/src/core/ext/transport/chttp2/transport/frame_data.c index dead6be77f5..222d2177b29 100644 --- a/src/core/ext/transport/chttp2/transport/frame_data.c +++ b/src/core/ext/transport/chttp2/transport/frame_data.c @@ -293,7 +293,6 @@ grpc_error *grpc_chttp2_data_parser_parse(grpc_exec_ctx *exec_ctx, void *parser, grpc_chttp2_transport *t, grpc_chttp2_stream *s, grpc_slice slice, int is_last) { - /* grpc_error *error = parse_inner_buffer(exec_ctx, p, t, s, slice); */ if (!s->pending_byte_stream) { grpc_slice_ref_internal(slice); grpc_slice_buffer_add(&s->frame_storage, slice); @@ -304,6 +303,7 @@ grpc_error *grpc_chttp2_data_parser_parse(grpc_exec_ctx *exec_ctx, void *parser, grpc_slice_buffer_add(&s->unprocessed_incoming_frames_buffer, slice); GRPC_CLOSURE_SCHED(exec_ctx, s->on_next, GRPC_ERROR_NONE); s->on_next = NULL; + s->unprocessed_incoming_frames_decompressed = false; } else { grpc_slice_ref_internal(slice); grpc_slice_buffer_add(&s->frame_storage, slice); diff --git a/src/core/ext/transport/chttp2/transport/internal.h b/src/core/ext/transport/chttp2/transport/internal.h index b0726fdb5fd..64196d8c1c6 100644 --- a/src/core/ext/transport/chttp2/transport/internal.h +++ b/src/core/ext/transport/chttp2/transport/internal.h @@ -519,6 +519,17 @@ struct grpc_chttp2_stream { grpc_chttp2_write_cb *on_write_finished_cbs; grpc_chttp2_write_cb *finish_after_write; size_t sending_bytes; + + /** Whether stream compression send is enabled or not */ + bool stream_compression_recv_enabled; + /** Whether bytes stored in unprocessed_incoming_byte_stream is decompressed + */ + bool unprocessed_incoming_frames_decompressed; + /** Stream compression decompress context */ + grpc_stream_compression_context *stream_decompression_ctx; + + /** Temporary buffer storing decompressed data */ + grpc_slice_buffer decompressed_data_buffer; }; /** Transport writing call flow: From e89c83a21bf2975e6c686e5dc11fc5d17a22d590 Mon Sep 17 00:00:00 2001 From: Muxi Yan Date: Wed, 12 Jul 2017 11:49:27 -0700 Subject: [PATCH 04/80] Transport layer send (compression) path --- .../chttp2/transport/chttp2_transport.c | 6 ++ .../ext/transport/chttp2/transport/internal.h | 11 ++- .../ext/transport/chttp2/transport/writing.c | 82 ++++++++++++++----- 3 files changed, 79 insertions(+), 20 deletions(-) diff --git a/src/core/ext/transport/chttp2/transport/chttp2_transport.c b/src/core/ext/transport/chttp2/transport/chttp2_transport.c index aea4ce4e287..00b0738b20d 100644 --- a/src/core/ext/transport/chttp2/transport/chttp2_transport.c +++ b/src/core/ext/transport/chttp2/transport/chttp2_transport.c @@ -668,6 +668,7 @@ static int init_stream(grpc_exec_ctx *exec_ctx, grpc_transport *gt, grpc_chttp2_incoming_metadata_buffer_init(&s->metadata_buffer[1], arena); grpc_chttp2_data_parser_init(&s->data_parser); grpc_slice_buffer_init(&s->flow_controlled_buffer); + grpc_slice_buffer_init(&s->compressed_data_buffer); grpc_slice_buffer_init(&s->decompressed_data_buffer); s->deadline = gpr_inf_future(GPR_CLOCK_MONOTONIC); GRPC_CLOSURE_INIT(&s->complete_fetch_locked, complete_fetch_locked, s, @@ -707,6 +708,7 @@ static void destroy_stream_locked(grpc_exec_ctx *exec_ctx, void *sp, grpc_slice_buffer_destroy_internal(exec_ctx, &s->unprocessed_incoming_frames_buffer); grpc_slice_buffer_destroy_internal(exec_ctx, &s->frame_storage); + grpc_slice_buffer_destroy_internal(exec_ctx, &s->compressed_data_buffer); grpc_slice_buffer_destroy_internal(exec_ctx, &s->decompressed_data_buffer); grpc_chttp2_list_remove_stalled_by_transport(t, s); @@ -758,6 +760,10 @@ static void destroy_stream(grpc_exec_ctx *exec_ctx, grpc_transport *gt, grpc_chttp2_transport *t = (grpc_chttp2_transport *)gt; grpc_chttp2_stream *s = (grpc_chttp2_stream *)gs; + if (s->stream_compression_ctx != NULL) { + grpc_stream_compression_context_destroy(s->stream_compression_ctx); + s->stream_compression_ctx = NULL; + } if (s->stream_decompression_ctx != NULL) { grpc_stream_compression_context_destroy(s->stream_decompression_ctx); s->stream_decompression_ctx = NULL; diff --git a/src/core/ext/transport/chttp2/transport/internal.h b/src/core/ext/transport/chttp2/transport/internal.h index 64196d8c1c6..0f29b10d377 100644 --- a/src/core/ext/transport/chttp2/transport/internal.h +++ b/src/core/ext/transport/chttp2/transport/internal.h @@ -522,12 +522,21 @@ struct grpc_chttp2_stream { /** Whether stream compression send is enabled or not */ bool stream_compression_recv_enabled; + /** Whether stream compression recv is enabled or not */ + bool stream_compression_send_enabled; /** Whether bytes stored in unprocessed_incoming_byte_stream is decompressed */ bool unprocessed_incoming_frames_decompressed; /** Stream compression decompress context */ grpc_stream_compression_context *stream_decompression_ctx; - + /** Stream compression compress context */ + grpc_stream_compression_context *stream_compression_ctx; + + /** Buffer storing data that is compressed but not sent */ + grpc_slice_buffer compressed_data_buffer; + /** Amount of uncompressed bytes sent out when compressed_data_buffer is + * emptied */ + size_t uncompressed_data_size; /** Temporary buffer storing decompressed data */ grpc_slice_buffer decompressed_data_buffer; }; diff --git a/src/core/ext/transport/chttp2/transport/writing.c b/src/core/ext/transport/chttp2/transport/writing.c index 315f2a67a21..d7221eaf30a 100644 --- a/src/core/ext/transport/chttp2/transport/writing.c +++ b/src/core/ext/transport/chttp2/transport/writing.c @@ -303,7 +303,8 @@ grpc_chttp2_begin_write_result grpc_chttp2_begin_write( } if (sent_initial_metadata) { /* send any body bytes, if allowed by flow control */ - if (s->flow_controlled_buffer.length > 0) { + if (s->flow_controlled_buffer.length > 0 || + s->compressed_data_buffer.length > 0) { uint32_t stream_outgoing_window = (uint32_t)GPR_MAX( 0, s->outgoing_window_delta + @@ -314,21 +315,63 @@ grpc_chttp2_begin_write_result grpc_chttp2_begin_write( [GRPC_CHTTP2_SETTINGS_MAX_FRAME_SIZE], GPR_MIN(stream_outgoing_window, t->outgoing_window)); if (max_outgoing > 0) { - uint32_t send_bytes = - (uint32_t)GPR_MIN(max_outgoing, s->flow_controlled_buffer.length); - bool is_last_data_frame = - s->fetching_send_message == NULL && - send_bytes == s->flow_controlled_buffer.length; - bool is_last_frame = - is_last_data_frame && s->send_trailing_metadata != NULL && - grpc_metadata_batch_is_empty(s->send_trailing_metadata); - grpc_chttp2_encode_data(s->id, &s->flow_controlled_buffer, send_bytes, - is_last_frame, &s->stats.outgoing, - &t->outbuf); - GRPC_CHTTP2_FLOW_DEBIT_STREAM("write", t, s, outgoing_window_delta, - send_bytes); - GRPC_CHTTP2_FLOW_DEBIT_TRANSPORT("write", t, outgoing_window, - send_bytes); + bool is_last_data_frame; + bool is_last_frame; + if (s->stream_compression_send_enabled) { + while ((s->flow_controlled_buffer.length > 0 || + s->compressed_data_buffer.length > 0) && + max_outgoing > 0) { + if (s->compressed_data_buffer.length > 0) { + uint32_t send_bytes = (uint32_t)GPR_MIN( + max_outgoing, s->compressed_data_buffer.length); + is_last_data_frame = + (send_bytes == s->compressed_data_buffer.length && + s->flow_controlled_buffer.length == 0 && + s->fetching_send_message == NULL); + is_last_frame = + is_last_data_frame && s->send_trailing_metadata != NULL && + grpc_metadata_batch_is_empty(s->send_trailing_metadata); + grpc_chttp2_encode_data(s->id, &s->compressed_data_buffer, + send_bytes, is_last_frame, + &s->stats.outgoing, &t->outbuf); + GRPC_CHTTP2_FLOW_DEBIT_STREAM( + "write", t, s, outgoing_window_delta, send_bytes); + GRPC_CHTTP2_FLOW_DEBIT_TRANSPORT("write", t, outgoing_window, + send_bytes); + max_outgoing -= send_bytes; + if (s->compressed_data_buffer.length == 0) { + s->sending_bytes += s->uncompressed_data_size; + } + } else { + if (s->stream_compression_ctx == NULL) { + s->stream_compression_ctx = + grpc_stream_compression_context_create( + GRPC_STREAM_COMPRESSION_COMPRESS); + } + s->uncompressed_data_size = s->flow_controlled_buffer.length; + GPR_ASSERT(grpc_stream_compress( + s->stream_compression_ctx, &s->flow_controlled_buffer, + &s->compressed_data_buffer, NULL, ~(size_t)0, + GRPC_STREAM_COMPRESSION_FLUSH_SYNC)); + } + } + } else { + uint32_t send_bytes = (uint32_t)GPR_MIN( + max_outgoing, s->flow_controlled_buffer.length); + is_last_data_frame = s->fetching_send_message == NULL && + send_bytes == s->flow_controlled_buffer.length; + is_last_frame = + is_last_data_frame && s->send_trailing_metadata != NULL && + grpc_metadata_batch_is_empty(s->send_trailing_metadata); + grpc_chttp2_encode_data(s->id, &s->flow_controlled_buffer, + send_bytes, is_last_frame, + &s->stats.outgoing, &t->outbuf); + GRPC_CHTTP2_FLOW_DEBIT_STREAM("write", t, s, outgoing_window_delta, + send_bytes); + GRPC_CHTTP2_FLOW_DEBIT_TRANSPORT("write", t, outgoing_window, + send_bytes); + s->sending_bytes += send_bytes; + } t->ping_state.pings_before_data_required = t->ping_policy.max_pings_without_data; if (!t->is_client) { @@ -345,9 +388,9 @@ grpc_chttp2_begin_write_result grpc_chttp2_begin_write( &s->stats.outgoing)); } } - s->sending_bytes += send_bytes; now_writing = true; - if (s->flow_controlled_buffer.length > 0) { + if (s->flow_controlled_buffer.length > 0 || + s->compressed_data_buffer.length > 0) { GRPC_CHTTP2_STREAM_REF(s, "chttp2_writing:fork"); grpc_chttp2_list_add_writable_stream(t, s); } @@ -361,7 +404,8 @@ grpc_chttp2_begin_write_result grpc_chttp2_begin_write( } if (s->send_trailing_metadata != NULL && s->fetching_send_message == NULL && - s->flow_controlled_buffer.length == 0) { + s->flow_controlled_buffer.length == 0 && + s->compressed_data_buffer.length == 0) { GRPC_CHTTP2_IF_TRACING(gpr_log(GPR_INFO, "sending trailing_metadata")); if (grpc_metadata_batch_is_empty(s->send_trailing_metadata)) { grpc_chttp2_encode_data(s->id, &s->flow_controlled_buffer, 0, true, From 0fd37e1951ae541d873d0f2803ebeb88d9c9f848 Mon Sep 17 00:00:00 2001 From: Muxi Yan Date: Thu, 13 Jul 2017 21:07:29 -0700 Subject: [PATCH 05/80] Transport - Fix a bug in decompression path --- .../chttp2/transport/chttp2_transport.c | 45 ++++++++++++++++--- 1 file changed, 38 insertions(+), 7 deletions(-) diff --git a/src/core/ext/transport/chttp2/transport/chttp2_transport.c b/src/core/ext/transport/chttp2/transport/chttp2_transport.c index 00b0738b20d..1427b8f3302 100644 --- a/src/core/ext/transport/chttp2/transport/chttp2_transport.c +++ b/src/core/ext/transport/chttp2/transport/chttp2_transport.c @@ -1671,9 +1671,8 @@ void grpc_chttp2_maybe_complete_recv_message(grpc_exec_ctx *exec_ctx, } if (s->stream_compression_recv_enabled && !s->unprocessed_incoming_frames_decompressed) { - grpc_slice_buffer decompressed_data; + GPR_ASSERT(s->decompressed_data_buffer.length == 0); bool end_of_context; - grpc_slice_buffer_init(&decompressed_data); if (!s->stream_decompression_ctx) { s->stream_decompression_ctx = grpc_stream_compression_context_create( @@ -1681,17 +1680,18 @@ void grpc_chttp2_maybe_complete_recv_message(grpc_exec_ctx *exec_ctx, } if (!grpc_stream_decompress(s->stream_decompression_ctx, &s->unprocessed_incoming_frames_buffer, - &decompressed_data, NULL, 5, + &s->decompressed_data_buffer, NULL, 5, &end_of_context)) { grpc_slice_buffer_reset_and_unref_internal(exec_ctx, &s->frame_storage); grpc_slice_buffer_reset_and_unref_internal( exec_ctx, &s->unprocessed_incoming_frames_buffer); - s->seen_error = true; + error = + GRPC_ERROR_CREATE_FROM_STATIC_STRING("Stream decompression error."); } else { error = grpc_deframe_unprocessed_incoming_frames( - exec_ctx, &s->data_parser, s, &decompressed_data, NULL, - s->recv_message); + exec_ctx, &s->data_parser, s, &s->decompressed_data_buffer, + NULL, s->recv_message); if (end_of_context) { grpc_stream_compression_context_destroy( s->stream_decompression_ctx); @@ -1740,7 +1740,38 @@ void grpc_chttp2_maybe_complete_recv_trailing_metadata(grpc_exec_ctx *exec_ctx, } bool pending_data = s->pending_byte_stream || s->unprocessed_incoming_frames_buffer.length > 0; - if (s->read_closed && s->frame_storage.length == 0 && + if (s->stream_compression_recv_enabled && s->read_closed && + s->frame_storage.length > 0 && + s->unprocessed_incoming_frames_buffer.length == 0 && !pending_data && + !s->seen_error && s->recv_trailing_metadata_finished != NULL) { + /* Maybe some SYNC_FLUSH data is left in frame_storage. Consume them and + * maybe decompress the next 5 bytes in the stream. */ + bool end_of_context; + if (!s->stream_decompression_ctx) { + s->stream_decompression_ctx = + grpc_stream_compression_context_create( + GRPC_STREAM_COMPRESSION_DECOMPRESS); + } + if (!grpc_stream_decompress(s->stream_decompression_ctx, + &s->frame_storage, + &s->unprocessed_incoming_frames_buffer, + NULL, 5, &end_of_context)) { + grpc_slice_buffer_reset_and_unref_internal(exec_ctx, + &s->frame_storage); + grpc_slice_buffer_reset_and_unref_internal( + exec_ctx, &s->unprocessed_incoming_frames_buffer); + s->seen_error = true; + } else { + if (s->unprocessed_incoming_frames_buffer.length > 0) { + s->unprocessed_incoming_frames_decompressed = true; + } + if (end_of_context) { + grpc_stream_compression_context_destroy(s->stream_decompression_ctx); + s->stream_decompression_ctx = NULL; + } + } + } + if (s->read_closed && s->frame_storage.length == 0 && s->unprocessed_incoming_frames_buffer.length == 0 && (!pending_data || s->seen_error) && s->recv_trailing_metadata_finished != NULL) { grpc_chttp2_incoming_metadata_buffer_publish( From dfda37f5183176d711102135617534c4f0a5ea19 Mon Sep 17 00:00:00 2001 From: Muxi Yan Date: Mon, 17 Jul 2017 15:15:31 -0700 Subject: [PATCH 06/80] transport - Fix uninitialized variable --- src/core/ext/transport/chttp2/transport/writing.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/ext/transport/chttp2/transport/writing.c b/src/core/ext/transport/chttp2/transport/writing.c index d7221eaf30a..dd20ff61aeb 100644 --- a/src/core/ext/transport/chttp2/transport/writing.c +++ b/src/core/ext/transport/chttp2/transport/writing.c @@ -315,8 +315,8 @@ grpc_chttp2_begin_write_result grpc_chttp2_begin_write( [GRPC_CHTTP2_SETTINGS_MAX_FRAME_SIZE], GPR_MIN(stream_outgoing_window, t->outgoing_window)); if (max_outgoing > 0) { - bool is_last_data_frame; - bool is_last_frame; + bool is_last_data_frame = false; + bool is_last_frame = false; if (s->stream_compression_send_enabled) { while ((s->flow_controlled_buffer.length > 0 || s->compressed_data_buffer.length > 0) && From 26b33dedc2c065213070e4f820ca65365f712150 Mon Sep 17 00:00:00 2001 From: Muxi Yan Date: Mon, 17 Jul 2017 15:15:53 -0700 Subject: [PATCH 07/80] transport - clang-format --- .../chttp2/transport/chttp2_transport.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/src/core/ext/transport/chttp2/transport/chttp2_transport.c b/src/core/ext/transport/chttp2/transport/chttp2_transport.c index 1427b8f3302..d6c2ce7b05c 100644 --- a/src/core/ext/transport/chttp2/transport/chttp2_transport.c +++ b/src/core/ext/transport/chttp2/transport/chttp2_transport.c @@ -1686,8 +1686,8 @@ void grpc_chttp2_maybe_complete_recv_message(grpc_exec_ctx *exec_ctx, &s->frame_storage); grpc_slice_buffer_reset_and_unref_internal( exec_ctx, &s->unprocessed_incoming_frames_buffer); - error = - GRPC_ERROR_CREATE_FROM_STATIC_STRING("Stream decompression error."); + error = GRPC_ERROR_CREATE_FROM_STATIC_STRING( + "Stream decompression error."); } else { error = grpc_deframe_unprocessed_incoming_frames( exec_ctx, &s->data_parser, s, &s->decompressed_data_buffer, @@ -1748,16 +1748,14 @@ void grpc_chttp2_maybe_complete_recv_trailing_metadata(grpc_exec_ctx *exec_ctx, * maybe decompress the next 5 bytes in the stream. */ bool end_of_context; if (!s->stream_decompression_ctx) { - s->stream_decompression_ctx = - grpc_stream_compression_context_create( - GRPC_STREAM_COMPRESSION_DECOMPRESS); + s->stream_decompression_ctx = grpc_stream_compression_context_create( + GRPC_STREAM_COMPRESSION_DECOMPRESS); } if (!grpc_stream_decompress(s->stream_decompression_ctx, &s->frame_storage, - &s->unprocessed_incoming_frames_buffer, - NULL, 5, &end_of_context)) { - grpc_slice_buffer_reset_and_unref_internal(exec_ctx, - &s->frame_storage); + &s->unprocessed_incoming_frames_buffer, NULL, + 5, &end_of_context)) { + grpc_slice_buffer_reset_and_unref_internal(exec_ctx, &s->frame_storage); grpc_slice_buffer_reset_and_unref_internal( exec_ctx, &s->unprocessed_incoming_frames_buffer); s->seen_error = true; @@ -1771,7 +1769,8 @@ void grpc_chttp2_maybe_complete_recv_trailing_metadata(grpc_exec_ctx *exec_ctx, } } } - if (s->read_closed && s->frame_storage.length == 0 && s->unprocessed_incoming_frames_buffer.length == 0 && + if (s->read_closed && s->frame_storage.length == 0 && + s->unprocessed_incoming_frames_buffer.length == 0 && (!pending_data || s->seen_error) && s->recv_trailing_metadata_finished != NULL) { grpc_chttp2_incoming_metadata_buffer_publish( From 104dd1fba73f303add4f19900b0eb41b0a450c70 Mon Sep 17 00:00:00 2001 From: Muxi Yan Date: Tue, 18 Jul 2017 12:36:29 -0700 Subject: [PATCH 08/80] Fix umbrella header of BoringSSL --- src/objective-c/BoringSSL.podspec | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/objective-c/BoringSSL.podspec b/src/objective-c/BoringSSL.podspec index 81e6555cfd2..37798ec3c6b 100644 --- a/src/objective-c/BoringSSL.podspec +++ b/src/objective-c/BoringSSL.podspec @@ -167,7 +167,6 @@ Pod::Spec.new do |s| #include "hkdf.h" #include "md4.h" #include "md5.h" - #include "newhope.h" #include "obj_mac.h" #include "objects.h" #include "opensslv.h" @@ -181,7 +180,6 @@ Pod::Spec.new do |s| #include "ripemd.h" #include "safestack.h" #include "srtp.h" - #include "time_support.h" #include "x509.h" #include "x509v3.h" EOF From f20bfaa491a9d8cd832fd6c67eae19b10567ecb5 Mon Sep 17 00:00:00 2001 From: Muxi Yan Date: Wed, 19 Jul 2017 16:27:02 -0700 Subject: [PATCH 09/80] transport - Use macro for grpc header bytes size --- .../transport/chttp2/transport/chttp2_transport.c | 13 +++++++------ src/core/ext/transport/chttp2/transport/internal.h | 2 ++ 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/core/ext/transport/chttp2/transport/chttp2_transport.c b/src/core/ext/transport/chttp2/transport/chttp2_transport.c index d6c2ce7b05c..07ff9923ff4 100644 --- a/src/core/ext/transport/chttp2/transport/chttp2_transport.c +++ b/src/core/ext/transport/chttp2/transport/chttp2_transport.c @@ -1351,8 +1351,8 @@ static void perform_stream_op_locked(grpc_exec_ctx *exec_ctx, void *stream_op, "fetching_send_message_finished"); } else { GPR_ASSERT(s->fetching_send_message == NULL); - uint8_t *frame_hdr = - grpc_slice_buffer_tiny_add(&s->flow_controlled_buffer, 5); + uint8_t *frame_hdr = grpc_slice_buffer_tiny_add( + &s->flow_controlled_buffer, GRPC_HEADER_SIZE_IN_BYTES); uint32_t flags = op_payload->send_message.send_message->flags; frame_hdr[0] = (flags & GRPC_WRITE_INTERNAL_COMPRESS) != 0; size_t len = op_payload->send_message.send_message->length; @@ -1444,8 +1444,8 @@ static void perform_stream_op_locked(grpc_exec_ctx *exec_ctx, void *stream_op, s->recv_message = op_payload->recv_message.recv_message; if (s->id != 0) { already_received = s->frame_storage.length; - incoming_byte_stream_update_flow_control(exec_ctx, t, s, 5, - already_received); + incoming_byte_stream_update_flow_control( + exec_ctx, t, s, GRPC_HEADER_SIZE_IN_BYTES, already_received); } grpc_chttp2_maybe_complete_recv_message(exec_ctx, t, s); } @@ -1680,7 +1680,8 @@ void grpc_chttp2_maybe_complete_recv_message(grpc_exec_ctx *exec_ctx, } if (!grpc_stream_decompress(s->stream_decompression_ctx, &s->unprocessed_incoming_frames_buffer, - &s->decompressed_data_buffer, NULL, 5, + &s->decompressed_data_buffer, NULL, + GRPC_HEADER_SIZE_IN_BYTES, &end_of_context)) { grpc_slice_buffer_reset_and_unref_internal(exec_ctx, &s->frame_storage); @@ -1754,7 +1755,7 @@ void grpc_chttp2_maybe_complete_recv_trailing_metadata(grpc_exec_ctx *exec_ctx, if (!grpc_stream_decompress(s->stream_decompression_ctx, &s->frame_storage, &s->unprocessed_incoming_frames_buffer, NULL, - 5, &end_of_context)) { + GRPC_HEADER_SIZE_IN_BYTES, &end_of_context)) { grpc_slice_buffer_reset_and_unref_internal(exec_ctx, &s->frame_storage); grpc_slice_buffer_reset_and_unref_internal( exec_ctx, &s->unprocessed_incoming_frames_buffer); diff --git a/src/core/ext/transport/chttp2/transport/internal.h b/src/core/ext/transport/chttp2/transport/internal.h index 0f29b10d377..21858681a78 100644 --- a/src/core/ext/transport/chttp2/transport/internal.h +++ b/src/core/ext/transport/chttp2/transport/internal.h @@ -634,6 +634,8 @@ void grpc_chttp2_complete_closure_step(grpc_exec_ctx *exec_ctx, grpc_closure **pclosure, grpc_error *error, const char *desc); +#define GRPC_HEADER_SIZE_IN_BYTES 5 + #define GRPC_CHTTP2_CLIENT_CONNECT_STRING "PRI * HTTP/2.0\r\n\r\nSM\r\n\r\n" #define GRPC_CHTTP2_CLIENT_CONNECT_STRLEN \ (sizeof(GRPC_CHTTP2_CLIENT_CONNECT_STRING) - 1) From ab0d2d4e78d46ea37477d7d58e0b12e25b1e9886 Mon Sep 17 00:00:00 2001 From: Muxi Yan Date: Wed, 19 Jul 2017 16:36:25 -0700 Subject: [PATCH 10/80] transport - Change ~(size_t)0 to macro MAX_SIZE_T --- src/core/ext/transport/chttp2/transport/chttp2_transport.c | 2 +- src/core/ext/transport/chttp2/transport/internal.h | 1 + src/core/ext/transport/chttp2/transport/writing.c | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/core/ext/transport/chttp2/transport/chttp2_transport.c b/src/core/ext/transport/chttp2/transport/chttp2_transport.c index 07ff9923ff4..41516ed91a6 100644 --- a/src/core/ext/transport/chttp2/transport/chttp2_transport.c +++ b/src/core/ext/transport/chttp2/transport/chttp2_transport.c @@ -2714,7 +2714,7 @@ static grpc_error *incoming_byte_stream_pull(grpc_exec_ctx *exec_ctx, if (!grpc_stream_decompress(s->stream_decompression_ctx, &s->unprocessed_incoming_frames_buffer, &s->decompressed_data_buffer, NULL, - ~(size_t)0, &end_of_context)) { + MAX_SIZE_T, &end_of_context)) { error = GRPC_ERROR_CREATE_FROM_STATIC_STRING("Stream decompression error."); return error; diff --git a/src/core/ext/transport/chttp2/transport/internal.h b/src/core/ext/transport/chttp2/transport/internal.h index 21858681a78..0f05da262bf 100644 --- a/src/core/ext/transport/chttp2/transport/internal.h +++ b/src/core/ext/transport/chttp2/transport/internal.h @@ -635,6 +635,7 @@ void grpc_chttp2_complete_closure_step(grpc_exec_ctx *exec_ctx, grpc_error *error, const char *desc); #define GRPC_HEADER_SIZE_IN_BYTES 5 +#define MAX_SIZE_T (~(size_t)0) #define GRPC_CHTTP2_CLIENT_CONNECT_STRING "PRI * HTTP/2.0\r\n\r\nSM\r\n\r\n" #define GRPC_CHTTP2_CLIENT_CONNECT_STRLEN \ diff --git a/src/core/ext/transport/chttp2/transport/writing.c b/src/core/ext/transport/chttp2/transport/writing.c index dd20ff61aeb..08babb73692 100644 --- a/src/core/ext/transport/chttp2/transport/writing.c +++ b/src/core/ext/transport/chttp2/transport/writing.c @@ -351,7 +351,7 @@ grpc_chttp2_begin_write_result grpc_chttp2_begin_write( s->uncompressed_data_size = s->flow_controlled_buffer.length; GPR_ASSERT(grpc_stream_compress( s->stream_compression_ctx, &s->flow_controlled_buffer, - &s->compressed_data_buffer, NULL, ~(size_t)0, + &s->compressed_data_buffer, NULL, MAX_SIZE_T, GRPC_STREAM_COMPRESSION_FLUSH_SYNC)); } } From 99b339289620905e182c603901524950eef40e63 Mon Sep 17 00:00:00 2001 From: Muxi Yan Date: Wed, 19 Jul 2017 16:38:56 -0700 Subject: [PATCH 11/80] transport - Update comment --- src/core/ext/transport/chttp2/transport/internal.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/ext/transport/chttp2/transport/internal.h b/src/core/ext/transport/chttp2/transport/internal.h index 0f05da262bf..9fad6835167 100644 --- a/src/core/ext/transport/chttp2/transport/internal.h +++ b/src/core/ext/transport/chttp2/transport/internal.h @@ -520,9 +520,9 @@ struct grpc_chttp2_stream { grpc_chttp2_write_cb *finish_after_write; size_t sending_bytes; - /** Whether stream compression send is enabled or not */ + /** Whether stream compression send is enabled */ bool stream_compression_recv_enabled; - /** Whether stream compression recv is enabled or not */ + /** Whether stream compression recv is enabled */ bool stream_compression_send_enabled; /** Whether bytes stored in unprocessed_incoming_byte_stream is decompressed */ From 9469ac4a7a355aede1b386d52eeb937de8a6e456 Mon Sep 17 00:00:00 2001 From: Muxi Yan Date: Fri, 21 Jul 2017 12:50:35 -0700 Subject: [PATCH 12/80] transport - Move slice buffer creation to stream compression enabling time (PR 3) for performance --- .../chttp2/transport/chttp2_transport.c | 26 +++++++++++-------- .../ext/transport/chttp2/transport/internal.h | 4 +-- .../ext/transport/chttp2/transport/writing.c | 21 ++++++++------- 3 files changed, 28 insertions(+), 23 deletions(-) diff --git a/src/core/ext/transport/chttp2/transport/chttp2_transport.c b/src/core/ext/transport/chttp2/transport/chttp2_transport.c index 41516ed91a6..212704a1219 100644 --- a/src/core/ext/transport/chttp2/transport/chttp2_transport.c +++ b/src/core/ext/transport/chttp2/transport/chttp2_transport.c @@ -668,8 +668,6 @@ static int init_stream(grpc_exec_ctx *exec_ctx, grpc_transport *gt, grpc_chttp2_incoming_metadata_buffer_init(&s->metadata_buffer[1], arena); grpc_chttp2_data_parser_init(&s->data_parser); grpc_slice_buffer_init(&s->flow_controlled_buffer); - grpc_slice_buffer_init(&s->compressed_data_buffer); - grpc_slice_buffer_init(&s->decompressed_data_buffer); s->deadline = gpr_inf_future(GPR_CLOCK_MONOTONIC); GRPC_CLOSURE_INIT(&s->complete_fetch_locked, complete_fetch_locked, s, grpc_schedule_on_exec_ctx); @@ -708,8 +706,14 @@ static void destroy_stream_locked(grpc_exec_ctx *exec_ctx, void *sp, grpc_slice_buffer_destroy_internal(exec_ctx, &s->unprocessed_incoming_frames_buffer); grpc_slice_buffer_destroy_internal(exec_ctx, &s->frame_storage); - grpc_slice_buffer_destroy_internal(exec_ctx, &s->compressed_data_buffer); - grpc_slice_buffer_destroy_internal(exec_ctx, &s->decompressed_data_buffer); + if (s->compressed_data_buffer) { + grpc_slice_buffer_destroy_internal(exec_ctx, s->compressed_data_buffer); + gpr_free(s->compressed_data_buffer); + } + if (s->decompressed_data_buffer) { + grpc_slice_buffer_destroy_internal(exec_ctx, s->decompressed_data_buffer); + gpr_free(s->decompressed_data_buffer); + } grpc_chttp2_list_remove_stalled_by_transport(t, s); grpc_chttp2_list_remove_stalled_by_stream(t, s); @@ -1671,7 +1675,7 @@ void grpc_chttp2_maybe_complete_recv_message(grpc_exec_ctx *exec_ctx, } if (s->stream_compression_recv_enabled && !s->unprocessed_incoming_frames_decompressed) { - GPR_ASSERT(s->decompressed_data_buffer.length == 0); + GPR_ASSERT(s->decompressed_data_buffer->length == 0); bool end_of_context; if (!s->stream_decompression_ctx) { s->stream_decompression_ctx = @@ -1680,7 +1684,7 @@ void grpc_chttp2_maybe_complete_recv_message(grpc_exec_ctx *exec_ctx, } if (!grpc_stream_decompress(s->stream_decompression_ctx, &s->unprocessed_incoming_frames_buffer, - &s->decompressed_data_buffer, NULL, + s->decompressed_data_buffer, NULL, GRPC_HEADER_SIZE_IN_BYTES, &end_of_context)) { grpc_slice_buffer_reset_and_unref_internal(exec_ctx, @@ -1691,8 +1695,8 @@ void grpc_chttp2_maybe_complete_recv_message(grpc_exec_ctx *exec_ctx, "Stream decompression error."); } else { error = grpc_deframe_unprocessed_incoming_frames( - exec_ctx, &s->data_parser, s, &s->decompressed_data_buffer, - NULL, s->recv_message); + exec_ctx, &s->data_parser, s, s->decompressed_data_buffer, NULL, + s->recv_message); if (end_of_context) { grpc_stream_compression_context_destroy( s->stream_decompression_ctx); @@ -2713,15 +2717,15 @@ static grpc_error *incoming_byte_stream_pull(grpc_exec_ctx *exec_ctx, } if (!grpc_stream_decompress(s->stream_decompression_ctx, &s->unprocessed_incoming_frames_buffer, - &s->decompressed_data_buffer, NULL, - MAX_SIZE_T, &end_of_context)) { + s->decompressed_data_buffer, NULL, MAX_SIZE_T, + &end_of_context)) { error = GRPC_ERROR_CREATE_FROM_STATIC_STRING("Stream decompression error."); return error; } GPR_ASSERT(s->unprocessed_incoming_frames_buffer.length == 0); grpc_slice_buffer_swap(&s->unprocessed_incoming_frames_buffer, - &s->decompressed_data_buffer); + s->decompressed_data_buffer); s->unprocessed_incoming_frames_decompressed = true; if (end_of_context) { grpc_stream_compression_context_destroy(s->stream_decompression_ctx); diff --git a/src/core/ext/transport/chttp2/transport/internal.h b/src/core/ext/transport/chttp2/transport/internal.h index 9fad6835167..eb1acc0f132 100644 --- a/src/core/ext/transport/chttp2/transport/internal.h +++ b/src/core/ext/transport/chttp2/transport/internal.h @@ -533,12 +533,12 @@ struct grpc_chttp2_stream { grpc_stream_compression_context *stream_compression_ctx; /** Buffer storing data that is compressed but not sent */ - grpc_slice_buffer compressed_data_buffer; + grpc_slice_buffer *compressed_data_buffer; /** Amount of uncompressed bytes sent out when compressed_data_buffer is * emptied */ size_t uncompressed_data_size; /** Temporary buffer storing decompressed data */ - grpc_slice_buffer decompressed_data_buffer; + grpc_slice_buffer *decompressed_data_buffer; }; /** Transport writing call flow: diff --git a/src/core/ext/transport/chttp2/transport/writing.c b/src/core/ext/transport/chttp2/transport/writing.c index 08babb73692..2e3e9ee28bf 100644 --- a/src/core/ext/transport/chttp2/transport/writing.c +++ b/src/core/ext/transport/chttp2/transport/writing.c @@ -304,7 +304,8 @@ grpc_chttp2_begin_write_result grpc_chttp2_begin_write( if (sent_initial_metadata) { /* send any body bytes, if allowed by flow control */ if (s->flow_controlled_buffer.length > 0 || - s->compressed_data_buffer.length > 0) { + (s->stream_compression_send_enabled && + s->compressed_data_buffer->length > 0)) { uint32_t stream_outgoing_window = (uint32_t)GPR_MAX( 0, s->outgoing_window_delta + @@ -319,19 +320,19 @@ grpc_chttp2_begin_write_result grpc_chttp2_begin_write( bool is_last_frame = false; if (s->stream_compression_send_enabled) { while ((s->flow_controlled_buffer.length > 0 || - s->compressed_data_buffer.length > 0) && + s->compressed_data_buffer->length > 0) && max_outgoing > 0) { - if (s->compressed_data_buffer.length > 0) { + if (s->compressed_data_buffer->length > 0) { uint32_t send_bytes = (uint32_t)GPR_MIN( - max_outgoing, s->compressed_data_buffer.length); + max_outgoing, s->compressed_data_buffer->length); is_last_data_frame = - (send_bytes == s->compressed_data_buffer.length && + (send_bytes == s->compressed_data_buffer->length && s->flow_controlled_buffer.length == 0 && s->fetching_send_message == NULL); is_last_frame = is_last_data_frame && s->send_trailing_metadata != NULL && grpc_metadata_batch_is_empty(s->send_trailing_metadata); - grpc_chttp2_encode_data(s->id, &s->compressed_data_buffer, + grpc_chttp2_encode_data(s->id, s->compressed_data_buffer, send_bytes, is_last_frame, &s->stats.outgoing, &t->outbuf); GRPC_CHTTP2_FLOW_DEBIT_STREAM( @@ -339,7 +340,7 @@ grpc_chttp2_begin_write_result grpc_chttp2_begin_write( GRPC_CHTTP2_FLOW_DEBIT_TRANSPORT("write", t, outgoing_window, send_bytes); max_outgoing -= send_bytes; - if (s->compressed_data_buffer.length == 0) { + if (s->compressed_data_buffer->length == 0) { s->sending_bytes += s->uncompressed_data_size; } } else { @@ -351,7 +352,7 @@ grpc_chttp2_begin_write_result grpc_chttp2_begin_write( s->uncompressed_data_size = s->flow_controlled_buffer.length; GPR_ASSERT(grpc_stream_compress( s->stream_compression_ctx, &s->flow_controlled_buffer, - &s->compressed_data_buffer, NULL, MAX_SIZE_T, + s->compressed_data_buffer, NULL, MAX_SIZE_T, GRPC_STREAM_COMPRESSION_FLUSH_SYNC)); } } @@ -390,7 +391,7 @@ grpc_chttp2_begin_write_result grpc_chttp2_begin_write( } now_writing = true; if (s->flow_controlled_buffer.length > 0 || - s->compressed_data_buffer.length > 0) { + s->compressed_data_buffer->length > 0) { GRPC_CHTTP2_STREAM_REF(s, "chttp2_writing:fork"); grpc_chttp2_list_add_writable_stream(t, s); } @@ -405,7 +406,7 @@ grpc_chttp2_begin_write_result grpc_chttp2_begin_write( if (s->send_trailing_metadata != NULL && s->fetching_send_message == NULL && s->flow_controlled_buffer.length == 0 && - s->compressed_data_buffer.length == 0) { + s->compressed_data_buffer->length == 0) { GRPC_CHTTP2_IF_TRACING(gpr_log(GPR_INFO, "sending trailing_metadata")); if (grpc_metadata_batch_is_empty(s->send_trailing_metadata)) { grpc_chttp2_encode_data(s->id, &s->flow_controlled_buffer, 0, true, From c7a94c5052a2409ac68b991ae116d5f9e60eb545 Mon Sep 17 00:00:00 2001 From: Muxi Yan Date: Fri, 21 Jul 2017 14:04:26 -0700 Subject: [PATCH 13/80] Bug fix --- src/core/ext/transport/chttp2/transport/writing.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/core/ext/transport/chttp2/transport/writing.c b/src/core/ext/transport/chttp2/transport/writing.c index 2e3e9ee28bf..c3ede08343a 100644 --- a/src/core/ext/transport/chttp2/transport/writing.c +++ b/src/core/ext/transport/chttp2/transport/writing.c @@ -391,7 +391,8 @@ grpc_chttp2_begin_write_result grpc_chttp2_begin_write( } now_writing = true; if (s->flow_controlled_buffer.length > 0 || - s->compressed_data_buffer->length > 0) { + (s->stream_compression_send_enabled && + s->compressed_data_buffer->length > 0)) { GRPC_CHTTP2_STREAM_REF(s, "chttp2_writing:fork"); grpc_chttp2_list_add_writable_stream(t, s); } @@ -406,7 +407,8 @@ grpc_chttp2_begin_write_result grpc_chttp2_begin_write( if (s->send_trailing_metadata != NULL && s->fetching_send_message == NULL && s->flow_controlled_buffer.length == 0 && - s->compressed_data_buffer->length == 0) { + (!s->stream_compression_send_enabled || + s->compressed_data_buffer->length == 0)) { GRPC_CHTTP2_IF_TRACING(gpr_log(GPR_INFO, "sending trailing_metadata")); if (grpc_metadata_batch_is_empty(s->send_trailing_metadata)) { grpc_chttp2_encode_data(s->id, &s->flow_controlled_buffer, 0, true, From 3180dfafccffee5a50f821a97a289efe89a438a5 Mon Sep 17 00:00:00 2001 From: Axel Huebl Date: Fri, 21 Jul 2017 15:40:04 +0200 Subject: [PATCH 14/80] C-Ares: Remove Internal Header The `nameser.h` header is a C-Ares internal header which is not installed with C-Ares. This fixes build errors with cmake -DgRPC_CARES_PROVIDER=package .. --- .../client_channel/resolver/dns/c_ares/grpc_ares_wrapper.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.c b/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.c index 9065e336133..473f6b65f6e 100644 --- a/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.c +++ b/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.c @@ -33,7 +33,6 @@ #include #include #include -#include #include "src/core/ext/filters/client_channel/parse_address.h" #include "src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver.h" @@ -358,6 +357,9 @@ static grpc_ares_request *grpc_dns_lookup_ares_impl( grpc_ares_request_ref(r); char *service_name; gpr_asprintf(&service_name, "_grpclb._tcp.%s", host); + // see: RFC 1035, section 3.2.4. CLASS values + const int ns_c_in = 1; // internet + const int ns_t_srv = 33; // SRV record (RFC 2782) ares_query(*channel, service_name, ns_c_in, ns_t_srv, on_srv_query_done_cb, r); gpr_free(service_name); From 8f13439302b1b416f83c276e90e8de6cdf9bdec6 Mon Sep 17 00:00:00 2001 From: Adam Date: Mon, 24 Jul 2017 22:43:38 +0200 Subject: [PATCH 15/80] Fix issue from google/protobuf#1745 - javascript allow dot in filename --- src/compiler/node_generator.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/src/compiler/node_generator.cc b/src/compiler/node_generator.cc index 249ba086a57..355c11fcfcb 100644 --- a/src/compiler/node_generator.cc +++ b/src/compiler/node_generator.cc @@ -47,6 +47,7 @@ grpc::string ModuleAlias(const grpc::string filename) { grpc::string basename = grpc_generator::StripProto(filename); basename = grpc_generator::StringReplace(basename, "-", "$"); basename = grpc_generator::StringReplace(basename, "/", "_"); + basename = grpc_generator::StringReplace(basename, “.”, "_"); return basename + "_pb"; } From a178f406627916547037b63eb036f32d5db7c6d7 Mon Sep 17 00:00:00 2001 From: Adam Date: Mon, 24 Jul 2017 23:01:14 +0200 Subject: [PATCH 16/80] Fix quotation marks --- src/compiler/node_generator.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compiler/node_generator.cc b/src/compiler/node_generator.cc index 355c11fcfcb..c0fef9128f1 100644 --- a/src/compiler/node_generator.cc +++ b/src/compiler/node_generator.cc @@ -47,7 +47,7 @@ grpc::string ModuleAlias(const grpc::string filename) { grpc::string basename = grpc_generator::StripProto(filename); basename = grpc_generator::StringReplace(basename, "-", "$"); basename = grpc_generator::StringReplace(basename, "/", "_"); - basename = grpc_generator::StringReplace(basename, “.”, "_"); + basename = grpc_generator::StringReplace(basename, ".", "_"); return basename + "_pb"; } From 3d3403d3a8817a71d4bfb16e02e24fdcb5048f51 Mon Sep 17 00:00:00 2001 From: Guantao Liu Date: Mon, 24 Jul 2017 19:44:01 -0700 Subject: [PATCH 17/80] Update the scenario result schema --- .../run_tests/performance/scenario_result_schema.json | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tools/run_tests/performance/scenario_result_schema.json b/tools/run_tests/performance/scenario_result_schema.json index 245861f8c27..d7e2e292a7f 100644 --- a/tools/run_tests/performance/scenario_result_schema.json +++ b/tools/run_tests/performance/scenario_result_schema.json @@ -216,6 +216,16 @@ "name": "serverPollsPerRequest", "type": "FLOAT", "mode": "NULLABLE" + }, + { + "name": "serverQueriesPerCpuSec", + "type": "FLOAT", + "mode": "NULLABLE" + }, + { + "name": "clientQueriesPerCpuSec", + "type": "FLOAT", + "mode": "NULLABLE" } ] }, From 59ef64898a9aa3bbd9d0526c360315a77b662474 Mon Sep 17 00:00:00 2001 From: yang-g Date: Mon, 17 Jul 2017 13:52:24 -0700 Subject: [PATCH 18/80] Adding exec_ctx to avl vtable functions --- include/grpc/support/avl.h | 29 +- .../filters/client_channel/retry_throttle.c | 22 +- .../filters/client_channel/subchannel_index.c | 87 +- src/core/lib/support/avl.c | 177 +- test/core/support/avl_test.c | 3484 +++++++++-------- 5 files changed, 1906 insertions(+), 1893 deletions(-) diff --git a/include/grpc/support/avl.h b/include/grpc/support/avl.h index ed052e82229..cd029ef2a6c 100644 --- a/include/grpc/support/avl.h +++ b/include/grpc/support/avl.h @@ -31,18 +31,23 @@ typedef struct gpr_avl_node { long height; } gpr_avl_node; +/** vtable for the AVL tree + * The optional user_data is propagated from the top level gpr_avl_XXX API. + * From the same API call, multiple vtable functions may be called multiple + * times. + */ typedef struct gpr_avl_vtable { /** destroy a key */ - void (*destroy_key)(void *key); + void (*destroy_key)(void *key, void *user_data); /** copy a key, returning new value */ - void *(*copy_key)(void *key); + void *(*copy_key)(void *key, void *user_data); /** compare key1, key2; return <0 if key1 < key2, >0 if key1 > key2, 0 if key1 == key2 */ - long (*compare_keys)(void *key1, void *key2); + long (*compare_keys)(void *key1, void *key2, void *user_data); /** destroy a value */ - void (*destroy_value)(void *value); + void (*destroy_value)(void *value, void *user_data); /** copy a value */ - void *(*copy_value)(void *value); + void *(*copy_value)(void *value, void *user_data); } gpr_avl_vtable; /** "pointer" to an AVL tree - this is a reference @@ -57,25 +62,27 @@ typedef struct gpr_avl { GPRAPI gpr_avl gpr_avl_create(const gpr_avl_vtable *vtable); /** add a reference to an existing tree - returns the tree as a convenience */ -GPRAPI gpr_avl gpr_avl_ref(gpr_avl avl); +GPRAPI gpr_avl gpr_avl_ref(gpr_avl avl, void *user_data); /** remove a reference to a tree - destroying it if there are no references left */ -GPRAPI void gpr_avl_unref(gpr_avl avl); +GPRAPI void gpr_avl_unref(gpr_avl avl, void *user_data); /** return a new tree with (key, value) added to avl. implicitly unrefs avl to allow easy chaining. if key exists in avl, the new tree's key entry updated (i.e. a duplicate is not created) */ -GPRAPI gpr_avl gpr_avl_add(gpr_avl avl, void *key, void *value); +GPRAPI gpr_avl gpr_avl_add(gpr_avl avl, void *key, void *value, + void *user_data); /** return a new tree with key deleted implicitly unrefs avl to allow easy chaining. */ -GPRAPI gpr_avl gpr_avl_remove(gpr_avl avl, void *key); +GPRAPI gpr_avl gpr_avl_remove(gpr_avl avl, void *key, void *user_data); /** lookup key, and return the associated value. does not mutate avl. returns NULL if key is not found. */ -GPRAPI void *gpr_avl_get(gpr_avl avl, void *key); +GPRAPI void *gpr_avl_get(gpr_avl avl, void *key, void *user_data); /** Return 1 if avl contains key, 0 otherwise; if it has the key, sets *value to its value*/ -GPRAPI int gpr_avl_maybe_get(gpr_avl avl, void *key, void **value); +GPRAPI int gpr_avl_maybe_get(gpr_avl avl, void *key, void **value, + void *user_data); /** Return 1 if avl is empty, 0 otherwise */ GPRAPI int gpr_avl_is_empty(gpr_avl avl); diff --git a/src/core/ext/filters/client_channel/retry_throttle.c b/src/core/ext/filters/client_channel/retry_throttle.c index 3009e21d491..0c7a3ae6519 100644 --- a/src/core/ext/filters/client_channel/retry_throttle.c +++ b/src/core/ext/filters/client_channel/retry_throttle.c @@ -130,24 +130,28 @@ static grpc_server_retry_throttle_data* grpc_server_retry_throttle_data_create( // avl vtable for string -> server_retry_throttle_data map // -static void* copy_server_name(void* key) { return gpr_strdup(key); } +static void* copy_server_name(void* key, void* unused) { + return gpr_strdup(key); +} -static long compare_server_name(void* key1, void* key2) { +static long compare_server_name(void* key1, void* key2, void* unused) { return strcmp(key1, key2); } -static void destroy_server_retry_throttle_data(void* value) { +static void destroy_server_retry_throttle_data(void* value, void* unused) { grpc_server_retry_throttle_data* throttle_data = value; grpc_server_retry_throttle_data_unref(throttle_data); } -static void* copy_server_retry_throttle_data(void* value) { +static void* copy_server_retry_throttle_data(void* value, void* unused) { grpc_server_retry_throttle_data* throttle_data = value; return grpc_server_retry_throttle_data_ref(throttle_data); } +static void destroy_server_name(void* key, void* unused) { gpr_free(key); } + static const gpr_avl_vtable avl_vtable = { - gpr_free /* destroy_key */, copy_server_name, compare_server_name, + destroy_server_name, copy_server_name, compare_server_name, destroy_server_retry_throttle_data, copy_server_retry_throttle_data}; // @@ -164,19 +168,19 @@ void grpc_retry_throttle_map_init() { void grpc_retry_throttle_map_shutdown() { gpr_mu_destroy(&g_mu); - gpr_avl_unref(g_avl); + gpr_avl_unref(g_avl, NULL); } grpc_server_retry_throttle_data* grpc_retry_throttle_map_get_data_for_server( const char* server_name, int max_milli_tokens, int milli_token_ratio) { gpr_mu_lock(&g_mu); grpc_server_retry_throttle_data* throttle_data = - gpr_avl_get(g_avl, (char*)server_name); + gpr_avl_get(g_avl, (char*)server_name, NULL); if (throttle_data == NULL) { // Entry not found. Create a new one. throttle_data = grpc_server_retry_throttle_data_create( max_milli_tokens, milli_token_ratio, NULL); - g_avl = gpr_avl_add(g_avl, (char*)server_name, throttle_data); + g_avl = gpr_avl_add(g_avl, (char*)server_name, throttle_data, NULL); } else { if (throttle_data->max_milli_tokens != max_milli_tokens || throttle_data->milli_token_ratio != milli_token_ratio) { @@ -184,7 +188,7 @@ grpc_server_retry_throttle_data* grpc_retry_throttle_map_get_data_for_server( // the original one. throttle_data = grpc_server_retry_throttle_data_create( max_milli_tokens, milli_token_ratio, throttle_data); - g_avl = gpr_avl_add(g_avl, (char*)server_name, throttle_data); + g_avl = gpr_avl_add(g_avl, (char*)server_name, throttle_data, NULL); } else { // Entry found. Increase refcount. grpc_server_retry_throttle_data_ref(throttle_data); diff --git a/src/core/ext/filters/client_channel/subchannel_index.c b/src/core/ext/filters/client_channel/subchannel_index.c index a33ab950bff..15e42980af0 100644 --- a/src/core/ext/filters/client_channel/subchannel_index.c +++ b/src/core/ext/filters/client_channel/subchannel_index.c @@ -38,26 +38,8 @@ struct grpc_subchannel_key { grpc_subchannel_args args; }; -GPR_TLS_DECL(subchannel_index_exec_ctx); - static bool g_force_creation = false; -static void enter_ctx(grpc_exec_ctx *exec_ctx) { - GPR_ASSERT(gpr_tls_get(&subchannel_index_exec_ctx) == 0); - gpr_tls_set(&subchannel_index_exec_ctx, (intptr_t)exec_ctx); -} - -static void leave_ctx(grpc_exec_ctx *exec_ctx) { - GPR_ASSERT(gpr_tls_get(&subchannel_index_exec_ctx) == (intptr_t)exec_ctx); - gpr_tls_set(&subchannel_index_exec_ctx, 0); -} - -static grpc_exec_ctx *current_ctx() { - grpc_exec_ctx *c = (grpc_exec_ctx *)gpr_tls_get(&subchannel_index_exec_ctx); - GPR_ASSERT(c != NULL); - return c; -} - static grpc_subchannel_key *create_key( const grpc_subchannel_args *args, grpc_channel_args *(*copy_channel_args)(const grpc_channel_args *args)) { @@ -104,21 +86,25 @@ void grpc_subchannel_key_destroy(grpc_exec_ctx *exec_ctx, gpr_free(k); } -static void sck_avl_destroy(void *p) { - grpc_subchannel_key_destroy(current_ctx(), p); +static void sck_avl_destroy(void *p, void *user_data) { + grpc_exec_ctx *exec_ctx = (grpc_exec_ctx *)user_data; + grpc_subchannel_key_destroy(exec_ctx, p); } -static void *sck_avl_copy(void *p) { return subchannel_key_copy(p); } +static void *sck_avl_copy(void *p, void *unused) { + return subchannel_key_copy(p); +} -static long sck_avl_compare(void *a, void *b) { +static long sck_avl_compare(void *a, void *b, void *unused) { return grpc_subchannel_key_compare(a, b); } -static void scv_avl_destroy(void *p) { - GRPC_SUBCHANNEL_WEAK_UNREF(current_ctx(), p, "subchannel_index"); +static void scv_avl_destroy(void *p, void *user_data) { + grpc_exec_ctx *exec_ctx = (grpc_exec_ctx *)user_data; + GRPC_SUBCHANNEL_WEAK_UNREF(exec_ctx, p, "subchannel_index"); } -static void *scv_avl_copy(void *p) { +static void *scv_avl_copy(void *p, void *unused) { GRPC_SUBCHANNEL_WEAK_REF(p, "subchannel_index"); return p; } @@ -133,38 +119,33 @@ static const gpr_avl_vtable subchannel_avl_vtable = { void grpc_subchannel_index_init(void) { g_subchannel_index = gpr_avl_create(&subchannel_avl_vtable); gpr_mu_init(&g_mu); - gpr_tls_init(&subchannel_index_exec_ctx); } void grpc_subchannel_index_shutdown(void) { + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; gpr_mu_destroy(&g_mu); - gpr_avl_unref(g_subchannel_index); - gpr_tls_destroy(&subchannel_index_exec_ctx); + gpr_avl_unref(g_subchannel_index, &exec_ctx); + grpc_exec_ctx_finish(&exec_ctx); } grpc_subchannel *grpc_subchannel_index_find(grpc_exec_ctx *exec_ctx, grpc_subchannel_key *key) { - enter_ctx(exec_ctx); - // Lock, and take a reference to the subchannel index. // We don't need to do the search under a lock as avl's are immutable. gpr_mu_lock(&g_mu); - gpr_avl index = gpr_avl_ref(g_subchannel_index); + gpr_avl index = gpr_avl_ref(g_subchannel_index, exec_ctx); gpr_mu_unlock(&g_mu); - grpc_subchannel *c = - GRPC_SUBCHANNEL_REF_FROM_WEAK_REF(gpr_avl_get(index, key), "index_find"); - gpr_avl_unref(index); + grpc_subchannel *c = GRPC_SUBCHANNEL_REF_FROM_WEAK_REF( + gpr_avl_get(index, key, exec_ctx), "index_find"); + gpr_avl_unref(index, exec_ctx); - leave_ctx(exec_ctx); return c; } grpc_subchannel *grpc_subchannel_index_register(grpc_exec_ctx *exec_ctx, grpc_subchannel_key *key, grpc_subchannel *constructed) { - enter_ctx(exec_ctx); - grpc_subchannel *c = NULL; bool need_to_unref_constructed; @@ -174,11 +155,11 @@ grpc_subchannel *grpc_subchannel_index_register(grpc_exec_ctx *exec_ctx, // Compare and swap loop: // - take a reference to the current index gpr_mu_lock(&g_mu); - gpr_avl index = gpr_avl_ref(g_subchannel_index); + gpr_avl index = gpr_avl_ref(g_subchannel_index, exec_ctx); gpr_mu_unlock(&g_mu); // - Check to see if a subchannel already exists - c = gpr_avl_get(index, key); + c = gpr_avl_get(index, key, exec_ctx); if (c != NULL) { c = GRPC_SUBCHANNEL_REF_FROM_WEAK_REF(c, "index_register"); } @@ -187,9 +168,9 @@ grpc_subchannel *grpc_subchannel_index_register(grpc_exec_ctx *exec_ctx, need_to_unref_constructed = true; } else { // no -> update the avl and compare/swap - gpr_avl updated = - gpr_avl_add(gpr_avl_ref(index), subchannel_key_copy(key), - GRPC_SUBCHANNEL_WEAK_REF(constructed, "index_register")); + gpr_avl updated = gpr_avl_add( + gpr_avl_ref(index, exec_ctx), subchannel_key_copy(key), + GRPC_SUBCHANNEL_WEAK_REF(constructed, "index_register"), exec_ctx); // it may happen (but it's expected to be unlikely) // that some other thread has changed the index: @@ -201,12 +182,11 @@ grpc_subchannel *grpc_subchannel_index_register(grpc_exec_ctx *exec_ctx, } gpr_mu_unlock(&g_mu); - gpr_avl_unref(updated); + gpr_avl_unref(updated, exec_ctx); } - gpr_avl_unref(index); + gpr_avl_unref(index, exec_ctx); } - leave_ctx(exec_ctx); if (need_to_unref_constructed) { GRPC_SUBCHANNEL_UNREF(exec_ctx, constructed, "index_register"); @@ -218,27 +198,26 @@ grpc_subchannel *grpc_subchannel_index_register(grpc_exec_ctx *exec_ctx, void grpc_subchannel_index_unregister(grpc_exec_ctx *exec_ctx, grpc_subchannel_key *key, grpc_subchannel *constructed) { - enter_ctx(exec_ctx); - bool done = false; while (!done) { // Compare and swap loop: // - take a reference to the current index gpr_mu_lock(&g_mu); - gpr_avl index = gpr_avl_ref(g_subchannel_index); + gpr_avl index = gpr_avl_ref(g_subchannel_index, exec_ctx); gpr_mu_unlock(&g_mu); // Check to see if this key still refers to the previously // registered subchannel - grpc_subchannel *c = gpr_avl_get(index, key); + grpc_subchannel *c = gpr_avl_get(index, key, exec_ctx); if (c != constructed) { - gpr_avl_unref(index); + gpr_avl_unref(index, exec_ctx); break; } // compare and swap the update (some other thread may have // mutated the index behind us) - gpr_avl updated = gpr_avl_remove(gpr_avl_ref(index), key); + gpr_avl updated = + gpr_avl_remove(gpr_avl_ref(index, exec_ctx), key, exec_ctx); gpr_mu_lock(&g_mu); if (index.root == g_subchannel_index.root) { @@ -247,11 +226,9 @@ void grpc_subchannel_index_unregister(grpc_exec_ctx *exec_ctx, } gpr_mu_unlock(&g_mu); - gpr_avl_unref(updated); - gpr_avl_unref(index); + gpr_avl_unref(updated, exec_ctx); + gpr_avl_unref(index, exec_ctx); } - - leave_ctx(exec_ctx); } void grpc_subchannel_index_test_only_set_force_creation(bool force_creation) { diff --git a/src/core/lib/support/avl.c b/src/core/lib/support/avl.c index a6178fdbced..a58551e259e 100644 --- a/src/core/lib/support/avl.c +++ b/src/core/lib/support/avl.c @@ -32,22 +32,23 @@ gpr_avl gpr_avl_create(const gpr_avl_vtable *vtable) { return out; } -static gpr_avl_node *ref_node(gpr_avl_node *node) { +static gpr_avl_node *ref_node(gpr_avl_node *node, void *user_data) { if (node) { gpr_ref(&node->refs); } return node; } -static void unref_node(const gpr_avl_vtable *vtable, gpr_avl_node *node) { +static void unref_node(const gpr_avl_vtable *vtable, gpr_avl_node *node, + void *user_data) { if (node == NULL) { return; } if (gpr_unref(&node->refs)) { - vtable->destroy_key(node->key); - vtable->destroy_value(node->value); - unref_node(vtable, node->left); - unref_node(vtable, node->right); + vtable->destroy_key(node->key, user_data); + vtable->destroy_value(node->value, user_data); + unref_node(vtable, node->left, user_data); + unref_node(vtable, node->right, user_data); gpr_free(node); } } @@ -87,30 +88,30 @@ gpr_avl_node *new_node(void *key, void *value, gpr_avl_node *left, } static gpr_avl_node *get(const gpr_avl_vtable *vtable, gpr_avl_node *node, - void *key) { + void *key, void *user_data) { long cmp; if (node == NULL) { return NULL; } - cmp = vtable->compare_keys(node->key, key); + cmp = vtable->compare_keys(node->key, key, user_data); if (cmp == 0) { return node; } else if (cmp > 0) { - return get(vtable, node->left, key); + return get(vtable, node->left, key, user_data); } else { - return get(vtable, node->right, key); + return get(vtable, node->right, key, user_data); } } -void *gpr_avl_get(gpr_avl avl, void *key) { - gpr_avl_node *node = get(avl.vtable, avl.root, key); +void *gpr_avl_get(gpr_avl avl, void *key, void *user_data) { + gpr_avl_node *node = get(avl.vtable, avl.root, key, user_data); return node ? node->value : NULL; } -int gpr_avl_maybe_get(gpr_avl avl, void *key, void **value) { - gpr_avl_node *node = get(avl.vtable, avl.root, key); +int gpr_avl_maybe_get(gpr_avl avl, void *key, void **value, void *user_data) { + gpr_avl_node *node = get(avl.vtable, avl.root, key, user_data); if (node != NULL) { *value = node->value; return 1; @@ -120,70 +121,79 @@ int gpr_avl_maybe_get(gpr_avl avl, void *key, void **value) { static gpr_avl_node *rotate_left(const gpr_avl_vtable *vtable, void *key, void *value, gpr_avl_node *left, - gpr_avl_node *right) { + gpr_avl_node *right, void *user_data) { gpr_avl_node *n = - new_node(vtable->copy_key(right->key), vtable->copy_value(right->value), - new_node(key, value, left, ref_node(right->left)), - ref_node(right->right)); - unref_node(vtable, right); + new_node(vtable->copy_key(right->key, user_data), + vtable->copy_value(right->value, user_data), + new_node(key, value, left, ref_node(right->left, user_data)), + ref_node(right->right, user_data)); + unref_node(vtable, right, user_data); return n; } static gpr_avl_node *rotate_right(const gpr_avl_vtable *vtable, void *key, void *value, gpr_avl_node *left, - gpr_avl_node *right) { - gpr_avl_node *n = new_node( - vtable->copy_key(left->key), vtable->copy_value(left->value), - ref_node(left->left), new_node(key, value, ref_node(left->right), right)); - unref_node(vtable, left); + gpr_avl_node *right, void *user_data) { + gpr_avl_node *n = + new_node(vtable->copy_key(left->key, user_data), + vtable->copy_value(left->value, user_data), + ref_node(left->left, user_data), + new_node(key, value, ref_node(left->right, user_data), right)); + unref_node(vtable, left, user_data); return n; } static gpr_avl_node *rotate_left_right(const gpr_avl_vtable *vtable, void *key, void *value, gpr_avl_node *left, - gpr_avl_node *right) { + gpr_avl_node *right, void *user_data) { /* rotate_right(..., rotate_left(left), right) */ gpr_avl_node *n = new_node( - vtable->copy_key(left->right->key), - vtable->copy_value(left->right->value), - new_node(vtable->copy_key(left->key), vtable->copy_value(left->value), - ref_node(left->left), ref_node(left->right->left)), - new_node(key, value, ref_node(left->right->right), right)); - unref_node(vtable, left); + vtable->copy_key(left->right->key, user_data), + vtable->copy_value(left->right->value, user_data), + new_node(vtable->copy_key(left->key, user_data), + vtable->copy_value(left->value, user_data), + ref_node(left->left, user_data), + ref_node(left->right->left, user_data)), + new_node(key, value, ref_node(left->right->right, user_data), right)); + unref_node(vtable, left, user_data); return n; } static gpr_avl_node *rotate_right_left(const gpr_avl_vtable *vtable, void *key, void *value, gpr_avl_node *left, - gpr_avl_node *right) { + gpr_avl_node *right, void *user_data) { /* rotate_left(..., left, rotate_right(right)) */ gpr_avl_node *n = new_node( - vtable->copy_key(right->left->key), - vtable->copy_value(right->left->value), - new_node(key, value, left, ref_node(right->left->left)), - new_node(vtable->copy_key(right->key), vtable->copy_value(right->value), - ref_node(right->left->right), ref_node(right->right))); - unref_node(vtable, right); + vtable->copy_key(right->left->key, user_data), + vtable->copy_value(right->left->value, user_data), + new_node(key, value, left, ref_node(right->left->left, user_data)), + new_node(vtable->copy_key(right->key, user_data), + vtable->copy_value(right->value, user_data), + ref_node(right->left->right, user_data), + ref_node(right->right, user_data))); + unref_node(vtable, right, user_data); return n; } static gpr_avl_node *rebalance(const gpr_avl_vtable *vtable, void *key, void *value, gpr_avl_node *left, - gpr_avl_node *right) { + gpr_avl_node *right, void *user_data) { switch (node_height(left) - node_height(right)) { case 2: if (node_height(left->left) - node_height(left->right) == -1) { return assert_invariants( - rotate_left_right(vtable, key, value, left, right)); + rotate_left_right(vtable, key, value, left, right, user_data)); } else { - return assert_invariants(rotate_right(vtable, key, value, left, right)); + return assert_invariants( + rotate_right(vtable, key, value, left, right, user_data)); } case -2: if (node_height(right->left) - node_height(right->right) == 1) { return assert_invariants( - rotate_right_left(vtable, key, value, left, right)); + rotate_right_left(vtable, key, value, left, right, user_data)); } else { - return assert_invariants(rotate_left(vtable, key, value, left, right)); + return assert_invariants( + rotate_left(vtable, key, value, left, right, user_data)); } default: return assert_invariants(new_node(key, value, left, right)); @@ -191,30 +201,34 @@ static gpr_avl_node *rebalance(const gpr_avl_vtable *vtable, void *key, } static gpr_avl_node *add_key(const gpr_avl_vtable *vtable, gpr_avl_node *node, - void *key, void *value) { + void *key, void *value, void *user_data) { long cmp; if (node == NULL) { return new_node(key, value, NULL, NULL); } - cmp = vtable->compare_keys(node->key, key); + cmp = vtable->compare_keys(node->key, key, user_data); if (cmp == 0) { - return new_node(key, value, ref_node(node->left), ref_node(node->right)); + return new_node(key, value, ref_node(node->left, user_data), + ref_node(node->right, user_data)); } else if (cmp > 0) { - return rebalance( - vtable, vtable->copy_key(node->key), vtable->copy_value(node->value), - add_key(vtable, node->left, key, value), ref_node(node->right)); + return rebalance(vtable, vtable->copy_key(node->key, user_data), + vtable->copy_value(node->value, user_data), + add_key(vtable, node->left, key, value, user_data), + ref_node(node->right, user_data), user_data); } else { - return rebalance(vtable, vtable->copy_key(node->key), - vtable->copy_value(node->value), ref_node(node->left), - add_key(vtable, node->right, key, value)); + return rebalance(vtable, vtable->copy_key(node->key, user_data), + vtable->copy_value(node->value, user_data), + ref_node(node->left, user_data), + add_key(vtable, node->right, key, value, user_data), + user_data); } } -gpr_avl gpr_avl_add(gpr_avl avl, void *key, void *value) { +gpr_avl gpr_avl_add(gpr_avl avl, void *key, void *value, void *user_data) { gpr_avl_node *old_root = avl.root; - avl.root = add_key(avl.vtable, avl.root, key, value); + avl.root = add_key(avl.vtable, avl.root, key, value, user_data); assert_invariants(avl.root); - unref_node(avl.vtable, old_root); + unref_node(avl.vtable, old_root, user_data); return avl; } @@ -233,52 +247,61 @@ static gpr_avl_node *in_order_tail(gpr_avl_node *node) { } static gpr_avl_node *remove_key(const gpr_avl_vtable *vtable, - gpr_avl_node *node, void *key) { + gpr_avl_node *node, void *key, + void *user_data) { long cmp; if (node == NULL) { return NULL; } - cmp = vtable->compare_keys(node->key, key); + cmp = vtable->compare_keys(node->key, key, user_data); if (cmp == 0) { if (node->left == NULL) { - return ref_node(node->right); + return ref_node(node->right, user_data); } else if (node->right == NULL) { - return ref_node(node->left); + return ref_node(node->left, user_data); } else if (node->left->height < node->right->height) { gpr_avl_node *h = in_order_head(node->right); - return rebalance(vtable, vtable->copy_key(h->key), - vtable->copy_value(h->value), ref_node(node->left), - remove_key(vtable, node->right, h->key)); + return rebalance(vtable, vtable->copy_key(h->key, user_data), + vtable->copy_value(h->value, user_data), + ref_node(node->left, user_data), + remove_key(vtable, node->right, h->key, user_data), + user_data); } else { gpr_avl_node *h = in_order_tail(node->left); - return rebalance( - vtable, vtable->copy_key(h->key), vtable->copy_value(h->value), - remove_key(vtable, node->left, h->key), ref_node(node->right)); + return rebalance(vtable, vtable->copy_key(h->key, user_data), + vtable->copy_value(h->value, user_data), + remove_key(vtable, node->left, h->key, user_data), + ref_node(node->right, user_data), user_data); } } else if (cmp > 0) { - return rebalance( - vtable, vtable->copy_key(node->key), vtable->copy_value(node->value), - remove_key(vtable, node->left, key), ref_node(node->right)); + return rebalance(vtable, vtable->copy_key(node->key, user_data), + vtable->copy_value(node->value, user_data), + remove_key(vtable, node->left, key, user_data), + ref_node(node->right, user_data), user_data); } else { - return rebalance(vtable, vtable->copy_key(node->key), - vtable->copy_value(node->value), ref_node(node->left), - remove_key(vtable, node->right, key)); + return rebalance(vtable, vtable->copy_key(node->key, user_data), + vtable->copy_value(node->value, user_data), + ref_node(node->left, user_data), + remove_key(vtable, node->right, key, user_data), + user_data); } } -gpr_avl gpr_avl_remove(gpr_avl avl, void *key) { +gpr_avl gpr_avl_remove(gpr_avl avl, void *key, void *user_data) { gpr_avl_node *old_root = avl.root; - avl.root = remove_key(avl.vtable, avl.root, key); + avl.root = remove_key(avl.vtable, avl.root, key, user_data); assert_invariants(avl.root); - unref_node(avl.vtable, old_root); + unref_node(avl.vtable, old_root, user_data); return avl; } -gpr_avl gpr_avl_ref(gpr_avl avl) { - ref_node(avl.root); +gpr_avl gpr_avl_ref(gpr_avl avl, void *user_data) { + ref_node(avl.root, user_data); return avl; } -void gpr_avl_unref(gpr_avl avl) { unref_node(avl.vtable, avl.root); } +void gpr_avl_unref(gpr_avl avl, void *user_data) { + unref_node(avl.vtable, avl.root, user_data); +} int gpr_avl_is_empty(gpr_avl avl) { return avl.root == NULL; } diff --git a/test/core/support/avl_test.c b/test/core/support/avl_test.c index cd352d3d1d6..37424d64057 100644 --- a/test/core/support/avl_test.c +++ b/test/core/support/avl_test.c @@ -33,29 +33,31 @@ static int *box(int x) { return b; } -static long int_compare(void *int1, void *int2) { +static long int_compare(void *int1, void *int2, void *unused) { return (*(int *)int1) - (*(int *)int2); } -static void *int_copy(void *p) { return box(*(int *)p); } +static void *int_copy(void *p, void *unused) { return box(*(int *)p); } -static const gpr_avl_vtable int_int_vtable = {gpr_free, int_copy, int_compare, - gpr_free, int_copy}; +static void destroy(void *p, void *unused) { gpr_free(p); } + +static const gpr_avl_vtable int_int_vtable = {destroy, int_copy, int_compare, + destroy, int_copy}; static void check_get(gpr_avl avl, int key, int value) { int *k = box(key); - GPR_ASSERT(*(int *)gpr_avl_get(avl, k) == value); + GPR_ASSERT(*(int *)gpr_avl_get(avl, k, NULL) == value); gpr_free(k); } static void check_negget(gpr_avl avl, int key) { int *k = box(key); - GPR_ASSERT(gpr_avl_get(avl, k) == NULL); + GPR_ASSERT(gpr_avl_get(avl, k, NULL) == NULL); gpr_free(k); } static gpr_avl remove_int(gpr_avl avl, int key) { int *k = box(key); - avl = gpr_avl_remove(avl, k); + avl = gpr_avl_remove(avl, k, NULL); gpr_free(k); return avl; } @@ -64,94 +66,94 @@ static void test_get(void) { gpr_avl avl; gpr_log(GPR_DEBUG, "test_get"); avl = gpr_avl_create(&int_int_vtable); - avl = gpr_avl_add(avl, box(1), box(11)); - avl = gpr_avl_add(avl, box(2), box(22)); - avl = gpr_avl_add(avl, box(3), box(33)); + avl = gpr_avl_add(avl, box(1), box(11), NULL); + avl = gpr_avl_add(avl, box(2), box(22), NULL); + avl = gpr_avl_add(avl, box(3), box(33), NULL); check_get(avl, 1, 11); check_get(avl, 2, 22); check_get(avl, 3, 33); check_negget(avl, 4); - gpr_avl_unref(avl); + gpr_avl_unref(avl, NULL); } static void test_ll(void) { gpr_avl avl; gpr_log(GPR_DEBUG, "test_ll"); avl = gpr_avl_create(&int_int_vtable); - avl = gpr_avl_add(avl, box(5), box(1)); - avl = gpr_avl_add(avl, box(4), box(2)); - avl = gpr_avl_add(avl, box(3), box(3)); + avl = gpr_avl_add(avl, box(5), box(1), NULL); + avl = gpr_avl_add(avl, box(4), box(2), NULL); + avl = gpr_avl_add(avl, box(3), box(3), NULL); GPR_ASSERT(*(int *)avl.root->key == 4); GPR_ASSERT(*(int *)avl.root->left->key == 3); GPR_ASSERT(*(int *)avl.root->right->key == 5); - gpr_avl_unref(avl); + gpr_avl_unref(avl, NULL); } static void test_lr(void) { gpr_avl avl; gpr_log(GPR_DEBUG, "test_lr"); avl = gpr_avl_create(&int_int_vtable); - avl = gpr_avl_add(avl, box(5), box(1)); - avl = gpr_avl_add(avl, box(3), box(2)); - avl = gpr_avl_add(avl, box(4), box(3)); + avl = gpr_avl_add(avl, box(5), box(1), NULL); + avl = gpr_avl_add(avl, box(3), box(2), NULL); + avl = gpr_avl_add(avl, box(4), box(3), NULL); GPR_ASSERT(*(int *)avl.root->key == 4); GPR_ASSERT(*(int *)avl.root->left->key == 3); GPR_ASSERT(*(int *)avl.root->right->key == 5); - gpr_avl_unref(avl); + gpr_avl_unref(avl, NULL); } static void test_rr(void) { gpr_avl avl; gpr_log(GPR_DEBUG, "test_rr"); avl = gpr_avl_create(&int_int_vtable); - avl = gpr_avl_add(avl, box(3), box(1)); - avl = gpr_avl_add(avl, box(4), box(2)); - avl = gpr_avl_add(avl, box(5), box(3)); + avl = gpr_avl_add(avl, box(3), box(1), NULL); + avl = gpr_avl_add(avl, box(4), box(2), NULL); + avl = gpr_avl_add(avl, box(5), box(3), NULL); GPR_ASSERT(*(int *)avl.root->key == 4); GPR_ASSERT(*(int *)avl.root->left->key == 3); GPR_ASSERT(*(int *)avl.root->right->key == 5); - gpr_avl_unref(avl); + gpr_avl_unref(avl, NULL); } static void test_rl(void) { gpr_avl avl; gpr_log(GPR_DEBUG, "test_rl"); avl = gpr_avl_create(&int_int_vtable); - avl = gpr_avl_add(avl, box(3), box(1)); - avl = gpr_avl_add(avl, box(5), box(2)); - avl = gpr_avl_add(avl, box(4), box(3)); + avl = gpr_avl_add(avl, box(3), box(1), NULL); + avl = gpr_avl_add(avl, box(5), box(2), NULL); + avl = gpr_avl_add(avl, box(4), box(3), NULL); GPR_ASSERT(*(int *)avl.root->key == 4); GPR_ASSERT(*(int *)avl.root->left->key == 3); GPR_ASSERT(*(int *)avl.root->right->key == 5); - gpr_avl_unref(avl); + gpr_avl_unref(avl, NULL); } static void test_unbalanced(void) { gpr_avl avl; gpr_log(GPR_DEBUG, "test_unbalanced"); avl = gpr_avl_create(&int_int_vtable); - avl = gpr_avl_add(avl, box(5), box(1)); - avl = gpr_avl_add(avl, box(4), box(2)); - avl = gpr_avl_add(avl, box(3), box(3)); - avl = gpr_avl_add(avl, box(2), box(4)); - avl = gpr_avl_add(avl, box(1), box(5)); + avl = gpr_avl_add(avl, box(5), box(1), NULL); + avl = gpr_avl_add(avl, box(4), box(2), NULL); + avl = gpr_avl_add(avl, box(3), box(3), NULL); + avl = gpr_avl_add(avl, box(2), box(4), NULL); + avl = gpr_avl_add(avl, box(1), box(5), NULL); GPR_ASSERT(*(int *)avl.root->key == 4); GPR_ASSERT(*(int *)avl.root->left->key == 2); GPR_ASSERT(*(int *)avl.root->left->left->key == 1); GPR_ASSERT(*(int *)avl.root->left->right->key == 3); GPR_ASSERT(*(int *)avl.root->right->key == 5); - gpr_avl_unref(avl); + gpr_avl_unref(avl, NULL); } static void test_replace(void) { gpr_avl avl; gpr_log(GPR_DEBUG, "test_replace"); avl = gpr_avl_create(&int_int_vtable); - avl = gpr_avl_add(avl, box(1), box(1)); - avl = gpr_avl_add(avl, box(1), box(2)); + avl = gpr_avl_add(avl, box(1), box(1), NULL); + avl = gpr_avl_add(avl, box(1), box(2), NULL); check_get(avl, 1, 2); check_negget(avl, 2); - gpr_avl_unref(avl); + gpr_avl_unref(avl, NULL); } static void test_remove(void) { @@ -159,36 +161,36 @@ static void test_remove(void) { gpr_avl avl3, avl4, avl5, avln; gpr_log(GPR_DEBUG, "test_remove"); avl = gpr_avl_create(&int_int_vtable); - avl = gpr_avl_add(avl, box(3), box(1)); - avl = gpr_avl_add(avl, box(4), box(2)); - avl = gpr_avl_add(avl, box(5), box(3)); + avl = gpr_avl_add(avl, box(3), box(1), NULL); + avl = gpr_avl_add(avl, box(4), box(2), NULL); + avl = gpr_avl_add(avl, box(5), box(3), NULL); - avl3 = remove_int(gpr_avl_ref(avl), 3); - avl4 = remove_int(gpr_avl_ref(avl), 4); - avl5 = remove_int(gpr_avl_ref(avl), 5); - avln = remove_int(gpr_avl_ref(avl), 1); + avl3 = remove_int(gpr_avl_ref(avl, NULL), 3); + avl4 = remove_int(gpr_avl_ref(avl, NULL), 4); + avl5 = remove_int(gpr_avl_ref(avl, NULL), 5); + avln = remove_int(gpr_avl_ref(avl, NULL), 1); - gpr_avl_unref(avl); + gpr_avl_unref(avl, NULL); check_negget(avl3, 3); check_get(avl3, 4, 2); check_get(avl3, 5, 3); - gpr_avl_unref(avl3); + gpr_avl_unref(avl3, NULL); check_get(avl4, 3, 1); check_negget(avl4, 4); check_get(avl4, 5, 3); - gpr_avl_unref(avl4); + gpr_avl_unref(avl4, NULL); check_get(avl5, 3, 1); check_get(avl5, 4, 2); check_negget(avl5, 5); - gpr_avl_unref(avl5); + gpr_avl_unref(avl5, NULL); check_get(avln, 3, 1); check_get(avln, 4, 2); check_get(avln, 5, 3); - gpr_avl_unref(avln); + gpr_avl_unref(avln, NULL); } static void test_badcase1(void) { @@ -197,44 +199,44 @@ static void test_badcase1(void) { gpr_log(GPR_DEBUG, "test_badcase1"); avl = gpr_avl_create(&int_int_vtable); - avl = gpr_avl_add(avl, box(88), box(1)); + avl = gpr_avl_add(avl, box(88), box(1), NULL); avl = remove_int(avl, 643); avl = remove_int(avl, 983); - avl = gpr_avl_add(avl, box(985), box(4)); - avl = gpr_avl_add(avl, box(640), box(5)); - avl = gpr_avl_add(avl, box(41), box(6)); - avl = gpr_avl_add(avl, box(112), box(7)); - avl = gpr_avl_add(avl, box(342), box(8)); + avl = gpr_avl_add(avl, box(985), box(4), NULL); + avl = gpr_avl_add(avl, box(640), box(5), NULL); + avl = gpr_avl_add(avl, box(41), box(6), NULL); + avl = gpr_avl_add(avl, box(112), box(7), NULL); + avl = gpr_avl_add(avl, box(342), box(8), NULL); avl = remove_int(avl, 1013); - avl = gpr_avl_add(avl, box(434), box(10)); - avl = gpr_avl_add(avl, box(520), box(11)); - avl = gpr_avl_add(avl, box(231), box(12)); - avl = gpr_avl_add(avl, box(852), box(13)); + avl = gpr_avl_add(avl, box(434), box(10), NULL); + avl = gpr_avl_add(avl, box(520), box(11), NULL); + avl = gpr_avl_add(avl, box(231), box(12), NULL); + avl = gpr_avl_add(avl, box(852), box(13), NULL); avl = remove_int(avl, 461); - avl = gpr_avl_add(avl, box(108), box(15)); - avl = gpr_avl_add(avl, box(806), box(16)); - avl = gpr_avl_add(avl, box(827), box(17)); + avl = gpr_avl_add(avl, box(108), box(15), NULL); + avl = gpr_avl_add(avl, box(806), box(16), NULL); + avl = gpr_avl_add(avl, box(827), box(17), NULL); avl = remove_int(avl, 796); - avl = gpr_avl_add(avl, box(340), box(19)); - avl = gpr_avl_add(avl, box(498), box(20)); - avl = gpr_avl_add(avl, box(203), box(21)); - avl = gpr_avl_add(avl, box(751), box(22)); - avl = gpr_avl_add(avl, box(150), box(23)); + avl = gpr_avl_add(avl, box(340), box(19), NULL); + avl = gpr_avl_add(avl, box(498), box(20), NULL); + avl = gpr_avl_add(avl, box(203), box(21), NULL); + avl = gpr_avl_add(avl, box(751), box(22), NULL); + avl = gpr_avl_add(avl, box(150), box(23), NULL); avl = remove_int(avl, 237); - avl = gpr_avl_add(avl, box(830), box(25)); + avl = gpr_avl_add(avl, box(830), box(25), NULL); avl = remove_int(avl, 1007); avl = remove_int(avl, 394); - avl = gpr_avl_add(avl, box(65), box(28)); + avl = gpr_avl_add(avl, box(65), box(28), NULL); avl = remove_int(avl, 904); avl = remove_int(avl, 123); - avl = gpr_avl_add(avl, box(238), box(31)); - avl = gpr_avl_add(avl, box(184), box(32)); + avl = gpr_avl_add(avl, box(238), box(31), NULL); + avl = gpr_avl_add(avl, box(184), box(32), NULL); avl = remove_int(avl, 331); - avl = gpr_avl_add(avl, box(827), box(34)); + avl = gpr_avl_add(avl, box(827), box(34), NULL); check_get(avl, 830, 25); - gpr_avl_unref(avl); + gpr_avl_unref(avl, NULL); } static void test_badcase2(void) { @@ -243,254 +245,254 @@ static void test_badcase2(void) { gpr_log(GPR_DEBUG, "test_badcase2"); avl = gpr_avl_create(&int_int_vtable); - avl = gpr_avl_add(avl, box(288), box(1)); + avl = gpr_avl_add(avl, box(288), box(1), NULL); avl = remove_int(avl, 415); - avl = gpr_avl_add(avl, box(953), box(3)); - avl = gpr_avl_add(avl, box(101), box(4)); - avl = gpr_avl_add(avl, box(516), box(5)); - avl = gpr_avl_add(avl, box(547), box(6)); - avl = gpr_avl_add(avl, box(467), box(7)); - avl = gpr_avl_add(avl, box(793), box(8)); + avl = gpr_avl_add(avl, box(953), box(3), NULL); + avl = gpr_avl_add(avl, box(101), box(4), NULL); + avl = gpr_avl_add(avl, box(516), box(5), NULL); + avl = gpr_avl_add(avl, box(547), box(6), NULL); + avl = gpr_avl_add(avl, box(467), box(7), NULL); + avl = gpr_avl_add(avl, box(793), box(8), NULL); avl = remove_int(avl, 190); - avl = gpr_avl_add(avl, box(687), box(10)); - avl = gpr_avl_add(avl, box(242), box(11)); - avl = gpr_avl_add(avl, box(142), box(12)); + avl = gpr_avl_add(avl, box(687), box(10), NULL); + avl = gpr_avl_add(avl, box(242), box(11), NULL); + avl = gpr_avl_add(avl, box(142), box(12), NULL); avl = remove_int(avl, 705); avl = remove_int(avl, 578); avl = remove_int(avl, 767); avl = remove_int(avl, 183); - avl = gpr_avl_add(avl, box(950), box(17)); - avl = gpr_avl_add(avl, box(622), box(18)); + avl = gpr_avl_add(avl, box(950), box(17), NULL); + avl = gpr_avl_add(avl, box(622), box(18), NULL); avl = remove_int(avl, 513); avl = remove_int(avl, 429); - avl = gpr_avl_add(avl, box(205), box(21)); + avl = gpr_avl_add(avl, box(205), box(21), NULL); avl = remove_int(avl, 663); avl = remove_int(avl, 953); avl = remove_int(avl, 892); - avl = gpr_avl_add(avl, box(236), box(25)); + avl = gpr_avl_add(avl, box(236), box(25), NULL); avl = remove_int(avl, 982); avl = remove_int(avl, 201); avl = remove_int(avl, 684); - avl = gpr_avl_add(avl, box(572), box(29)); + avl = gpr_avl_add(avl, box(572), box(29), NULL); avl = remove_int(avl, 817); - avl = gpr_avl_add(avl, box(970), box(31)); + avl = gpr_avl_add(avl, box(970), box(31), NULL); avl = remove_int(avl, 347); avl = remove_int(avl, 574); - avl = gpr_avl_add(avl, box(752), box(34)); - avl = gpr_avl_add(avl, box(670), box(35)); - avl = gpr_avl_add(avl, box(69), box(36)); + avl = gpr_avl_add(avl, box(752), box(34), NULL); + avl = gpr_avl_add(avl, box(670), box(35), NULL); + avl = gpr_avl_add(avl, box(69), box(36), NULL); avl = remove_int(avl, 111); avl = remove_int(avl, 523); - avl = gpr_avl_add(avl, box(141), box(39)); + avl = gpr_avl_add(avl, box(141), box(39), NULL); avl = remove_int(avl, 159); - avl = gpr_avl_add(avl, box(947), box(41)); - avl = gpr_avl_add(avl, box(855), box(42)); + avl = gpr_avl_add(avl, box(947), box(41), NULL); + avl = gpr_avl_add(avl, box(855), box(42), NULL); avl = remove_int(avl, 218); avl = remove_int(avl, 6); - avl = gpr_avl_add(avl, box(753), box(45)); + avl = gpr_avl_add(avl, box(753), box(45), NULL); avl = remove_int(avl, 82); avl = remove_int(avl, 799); - avl = gpr_avl_add(avl, box(572), box(48)); + avl = gpr_avl_add(avl, box(572), box(48), NULL); avl = remove_int(avl, 376); avl = remove_int(avl, 413); - avl = gpr_avl_add(avl, box(458), box(51)); + avl = gpr_avl_add(avl, box(458), box(51), NULL); avl = remove_int(avl, 897); - avl = gpr_avl_add(avl, box(191), box(53)); - avl = gpr_avl_add(avl, box(609), box(54)); + avl = gpr_avl_add(avl, box(191), box(53), NULL); + avl = gpr_avl_add(avl, box(609), box(54), NULL); avl = remove_int(avl, 787); avl = remove_int(avl, 710); avl = remove_int(avl, 886); avl = remove_int(avl, 835); avl = remove_int(avl, 33); - avl = gpr_avl_add(avl, box(871), box(60)); + avl = gpr_avl_add(avl, box(871), box(60), NULL); avl = remove_int(avl, 641); - avl = gpr_avl_add(avl, box(462), box(62)); + avl = gpr_avl_add(avl, box(462), box(62), NULL); avl = remove_int(avl, 359); avl = remove_int(avl, 767); - avl = gpr_avl_add(avl, box(310), box(65)); + avl = gpr_avl_add(avl, box(310), box(65), NULL); avl = remove_int(avl, 757); avl = remove_int(avl, 639); avl = remove_int(avl, 314); - avl = gpr_avl_add(avl, box(2), box(69)); + avl = gpr_avl_add(avl, box(2), box(69), NULL); avl = remove_int(avl, 138); - avl = gpr_avl_add(avl, box(669), box(71)); + avl = gpr_avl_add(avl, box(669), box(71), NULL); avl = remove_int(avl, 477); - avl = gpr_avl_add(avl, box(366), box(73)); - avl = gpr_avl_add(avl, box(612), box(74)); - avl = gpr_avl_add(avl, box(106), box(75)); + avl = gpr_avl_add(avl, box(366), box(73), NULL); + avl = gpr_avl_add(avl, box(612), box(74), NULL); + avl = gpr_avl_add(avl, box(106), box(75), NULL); avl = remove_int(avl, 161); - avl = gpr_avl_add(avl, box(388), box(77)); - avl = gpr_avl_add(avl, box(141), box(78)); + avl = gpr_avl_add(avl, box(388), box(77), NULL); + avl = gpr_avl_add(avl, box(141), box(78), NULL); avl = remove_int(avl, 633); avl = remove_int(avl, 459); - avl = gpr_avl_add(avl, box(40), box(81)); + avl = gpr_avl_add(avl, box(40), box(81), NULL); avl = remove_int(avl, 689); - avl = gpr_avl_add(avl, box(823), box(83)); + avl = gpr_avl_add(avl, box(823), box(83), NULL); avl = remove_int(avl, 485); - avl = gpr_avl_add(avl, box(903), box(85)); - avl = gpr_avl_add(avl, box(592), box(86)); + avl = gpr_avl_add(avl, box(903), box(85), NULL); + avl = gpr_avl_add(avl, box(592), box(86), NULL); avl = remove_int(avl, 448); - avl = gpr_avl_add(avl, box(56), box(88)); + avl = gpr_avl_add(avl, box(56), box(88), NULL); avl = remove_int(avl, 333); - avl = gpr_avl_add(avl, box(189), box(90)); - avl = gpr_avl_add(avl, box(103), box(91)); + avl = gpr_avl_add(avl, box(189), box(90), NULL); + avl = gpr_avl_add(avl, box(103), box(91), NULL); avl = remove_int(avl, 164); avl = remove_int(avl, 974); - avl = gpr_avl_add(avl, box(215), box(94)); + avl = gpr_avl_add(avl, box(215), box(94), NULL); avl = remove_int(avl, 189); avl = remove_int(avl, 504); - avl = gpr_avl_add(avl, box(868), box(97)); + avl = gpr_avl_add(avl, box(868), box(97), NULL); avl = remove_int(avl, 909); avl = remove_int(avl, 148); avl = remove_int(avl, 469); - avl = gpr_avl_add(avl, box(994), box(101)); - avl = gpr_avl_add(avl, box(576), box(102)); + avl = gpr_avl_add(avl, box(994), box(101), NULL); + avl = gpr_avl_add(avl, box(576), box(102), NULL); avl = remove_int(avl, 82); avl = remove_int(avl, 209); - avl = gpr_avl_add(avl, box(276), box(105)); + avl = gpr_avl_add(avl, box(276), box(105), NULL); avl = remove_int(avl, 856); - avl = gpr_avl_add(avl, box(750), box(107)); + avl = gpr_avl_add(avl, box(750), box(107), NULL); avl = remove_int(avl, 871); - avl = gpr_avl_add(avl, box(301), box(109)); + avl = gpr_avl_add(avl, box(301), box(109), NULL); avl = remove_int(avl, 260); avl = remove_int(avl, 737); avl = remove_int(avl, 719); - avl = gpr_avl_add(avl, box(933), box(113)); - avl = gpr_avl_add(avl, box(225), box(114)); - avl = gpr_avl_add(avl, box(975), box(115)); - avl = gpr_avl_add(avl, box(86), box(116)); + avl = gpr_avl_add(avl, box(933), box(113), NULL); + avl = gpr_avl_add(avl, box(225), box(114), NULL); + avl = gpr_avl_add(avl, box(975), box(115), NULL); + avl = gpr_avl_add(avl, box(86), box(116), NULL); avl = remove_int(avl, 732); - avl = gpr_avl_add(avl, box(340), box(118)); - avl = gpr_avl_add(avl, box(271), box(119)); + avl = gpr_avl_add(avl, box(340), box(118), NULL); + avl = gpr_avl_add(avl, box(271), box(119), NULL); avl = remove_int(avl, 206); - avl = gpr_avl_add(avl, box(949), box(121)); - avl = gpr_avl_add(avl, box(927), box(122)); - avl = gpr_avl_add(avl, box(34), box(123)); - avl = gpr_avl_add(avl, box(351), box(124)); + avl = gpr_avl_add(avl, box(949), box(121), NULL); + avl = gpr_avl_add(avl, box(927), box(122), NULL); + avl = gpr_avl_add(avl, box(34), box(123), NULL); + avl = gpr_avl_add(avl, box(351), box(124), NULL); avl = remove_int(avl, 836); - avl = gpr_avl_add(avl, box(825), box(126)); - avl = gpr_avl_add(avl, box(352), box(127)); + avl = gpr_avl_add(avl, box(825), box(126), NULL); + avl = gpr_avl_add(avl, box(352), box(127), NULL); avl = remove_int(avl, 107); avl = remove_int(avl, 101); - avl = gpr_avl_add(avl, box(320), box(130)); - avl = gpr_avl_add(avl, box(3), box(131)); + avl = gpr_avl_add(avl, box(320), box(130), NULL); + avl = gpr_avl_add(avl, box(3), box(131), NULL); avl = remove_int(avl, 998); avl = remove_int(avl, 44); - avl = gpr_avl_add(avl, box(525), box(134)); - avl = gpr_avl_add(avl, box(864), box(135)); - avl = gpr_avl_add(avl, box(863), box(136)); + avl = gpr_avl_add(avl, box(525), box(134), NULL); + avl = gpr_avl_add(avl, box(864), box(135), NULL); + avl = gpr_avl_add(avl, box(863), box(136), NULL); avl = remove_int(avl, 770); - avl = gpr_avl_add(avl, box(440), box(138)); + avl = gpr_avl_add(avl, box(440), box(138), NULL); avl = remove_int(avl, 516); - avl = gpr_avl_add(avl, box(116), box(140)); + avl = gpr_avl_add(avl, box(116), box(140), NULL); avl = remove_int(avl, 380); - avl = gpr_avl_add(avl, box(878), box(142)); + avl = gpr_avl_add(avl, box(878), box(142), NULL); avl = remove_int(avl, 439); - avl = gpr_avl_add(avl, box(994), box(144)); + avl = gpr_avl_add(avl, box(994), box(144), NULL); avl = remove_int(avl, 294); avl = remove_int(avl, 593); - avl = gpr_avl_add(avl, box(696), box(147)); + avl = gpr_avl_add(avl, box(696), box(147), NULL); avl = remove_int(avl, 8); - avl = gpr_avl_add(avl, box(881), box(149)); + avl = gpr_avl_add(avl, box(881), box(149), NULL); avl = remove_int(avl, 32); avl = remove_int(avl, 242); - avl = gpr_avl_add(avl, box(487), box(152)); - avl = gpr_avl_add(avl, box(637), box(153)); - avl = gpr_avl_add(avl, box(793), box(154)); - avl = gpr_avl_add(avl, box(696), box(155)); + avl = gpr_avl_add(avl, box(487), box(152), NULL); + avl = gpr_avl_add(avl, box(637), box(153), NULL); + avl = gpr_avl_add(avl, box(793), box(154), NULL); + avl = gpr_avl_add(avl, box(696), box(155), NULL); avl = remove_int(avl, 458); - avl = gpr_avl_add(avl, box(828), box(157)); + avl = gpr_avl_add(avl, box(828), box(157), NULL); avl = remove_int(avl, 784); avl = remove_int(avl, 274); - avl = gpr_avl_add(avl, box(783), box(160)); + avl = gpr_avl_add(avl, box(783), box(160), NULL); avl = remove_int(avl, 21); - avl = gpr_avl_add(avl, box(866), box(162)); + avl = gpr_avl_add(avl, box(866), box(162), NULL); avl = remove_int(avl, 919); - avl = gpr_avl_add(avl, box(435), box(164)); + avl = gpr_avl_add(avl, box(435), box(164), NULL); avl = remove_int(avl, 385); - avl = gpr_avl_add(avl, box(475), box(166)); + avl = gpr_avl_add(avl, box(475), box(166), NULL); avl = remove_int(avl, 339); - avl = gpr_avl_add(avl, box(615), box(168)); + avl = gpr_avl_add(avl, box(615), box(168), NULL); avl = remove_int(avl, 866); avl = remove_int(avl, 82); avl = remove_int(avl, 271); - avl = gpr_avl_add(avl, box(590), box(172)); - avl = gpr_avl_add(avl, box(852), box(173)); + avl = gpr_avl_add(avl, box(590), box(172), NULL); + avl = gpr_avl_add(avl, box(852), box(173), NULL); avl = remove_int(avl, 318); avl = remove_int(avl, 82); - avl = gpr_avl_add(avl, box(672), box(176)); + avl = gpr_avl_add(avl, box(672), box(176), NULL); avl = remove_int(avl, 430); - avl = gpr_avl_add(avl, box(821), box(178)); - avl = gpr_avl_add(avl, box(365), box(179)); + avl = gpr_avl_add(avl, box(821), box(178), NULL); + avl = gpr_avl_add(avl, box(365), box(179), NULL); avl = remove_int(avl, 78); - avl = gpr_avl_add(avl, box(700), box(181)); - avl = gpr_avl_add(avl, box(353), box(182)); + avl = gpr_avl_add(avl, box(700), box(181), NULL); + avl = gpr_avl_add(avl, box(353), box(182), NULL); avl = remove_int(avl, 492); - avl = gpr_avl_add(avl, box(991), box(184)); + avl = gpr_avl_add(avl, box(991), box(184), NULL); avl = remove_int(avl, 330); - avl = gpr_avl_add(avl, box(873), box(186)); + avl = gpr_avl_add(avl, box(873), box(186), NULL); avl = remove_int(avl, 589); - avl = gpr_avl_add(avl, box(676), box(188)); - avl = gpr_avl_add(avl, box(790), box(189)); + avl = gpr_avl_add(avl, box(676), box(188), NULL); + avl = gpr_avl_add(avl, box(790), box(189), NULL); avl = remove_int(avl, 521); avl = remove_int(avl, 47); - avl = gpr_avl_add(avl, box(976), box(192)); - avl = gpr_avl_add(avl, box(683), box(193)); + avl = gpr_avl_add(avl, box(976), box(192), NULL); + avl = gpr_avl_add(avl, box(683), box(193), NULL); avl = remove_int(avl, 803); avl = remove_int(avl, 1006); - avl = gpr_avl_add(avl, box(775), box(196)); - avl = gpr_avl_add(avl, box(411), box(197)); - avl = gpr_avl_add(avl, box(697), box(198)); + avl = gpr_avl_add(avl, box(775), box(196), NULL); + avl = gpr_avl_add(avl, box(411), box(197), NULL); + avl = gpr_avl_add(avl, box(697), box(198), NULL); avl = remove_int(avl, 50); - avl = gpr_avl_add(avl, box(213), box(200)); + avl = gpr_avl_add(avl, box(213), box(200), NULL); avl = remove_int(avl, 714); - avl = gpr_avl_add(avl, box(981), box(202)); - avl = gpr_avl_add(avl, box(502), box(203)); - avl = gpr_avl_add(avl, box(697), box(204)); - avl = gpr_avl_add(avl, box(603), box(205)); - avl = gpr_avl_add(avl, box(117), box(206)); + avl = gpr_avl_add(avl, box(981), box(202), NULL); + avl = gpr_avl_add(avl, box(502), box(203), NULL); + avl = gpr_avl_add(avl, box(697), box(204), NULL); + avl = gpr_avl_add(avl, box(603), box(205), NULL); + avl = gpr_avl_add(avl, box(117), box(206), NULL); avl = remove_int(avl, 363); - avl = gpr_avl_add(avl, box(104), box(208)); + avl = gpr_avl_add(avl, box(104), box(208), NULL); avl = remove_int(avl, 842); - avl = gpr_avl_add(avl, box(48), box(210)); + avl = gpr_avl_add(avl, box(48), box(210), NULL); avl = remove_int(avl, 764); - avl = gpr_avl_add(avl, box(482), box(212)); - avl = gpr_avl_add(avl, box(928), box(213)); - avl = gpr_avl_add(avl, box(30), box(214)); - avl = gpr_avl_add(avl, box(820), box(215)); - avl = gpr_avl_add(avl, box(334), box(216)); + avl = gpr_avl_add(avl, box(482), box(212), NULL); + avl = gpr_avl_add(avl, box(928), box(213), NULL); + avl = gpr_avl_add(avl, box(30), box(214), NULL); + avl = gpr_avl_add(avl, box(820), box(215), NULL); + avl = gpr_avl_add(avl, box(334), box(216), NULL); avl = remove_int(avl, 306); - avl = gpr_avl_add(avl, box(789), box(218)); + avl = gpr_avl_add(avl, box(789), box(218), NULL); avl = remove_int(avl, 924); - avl = gpr_avl_add(avl, box(53), box(220)); + avl = gpr_avl_add(avl, box(53), box(220), NULL); avl = remove_int(avl, 657); - avl = gpr_avl_add(avl, box(130), box(222)); - avl = gpr_avl_add(avl, box(239), box(223)); + avl = gpr_avl_add(avl, box(130), box(222), NULL); + avl = gpr_avl_add(avl, box(239), box(223), NULL); avl = remove_int(avl, 20); - avl = gpr_avl_add(avl, box(117), box(225)); + avl = gpr_avl_add(avl, box(117), box(225), NULL); avl = remove_int(avl, 882); avl = remove_int(avl, 891); - avl = gpr_avl_add(avl, box(9), box(228)); - avl = gpr_avl_add(avl, box(496), box(229)); - avl = gpr_avl_add(avl, box(750), box(230)); - avl = gpr_avl_add(avl, box(283), box(231)); - avl = gpr_avl_add(avl, box(802), box(232)); + avl = gpr_avl_add(avl, box(9), box(228), NULL); + avl = gpr_avl_add(avl, box(496), box(229), NULL); + avl = gpr_avl_add(avl, box(750), box(230), NULL); + avl = gpr_avl_add(avl, box(283), box(231), NULL); + avl = gpr_avl_add(avl, box(802), box(232), NULL); avl = remove_int(avl, 352); - avl = gpr_avl_add(avl, box(374), box(234)); - avl = gpr_avl_add(avl, box(6), box(235)); - avl = gpr_avl_add(avl, box(756), box(236)); - avl = gpr_avl_add(avl, box(597), box(237)); - avl = gpr_avl_add(avl, box(661), box(238)); + avl = gpr_avl_add(avl, box(374), box(234), NULL); + avl = gpr_avl_add(avl, box(6), box(235), NULL); + avl = gpr_avl_add(avl, box(756), box(236), NULL); + avl = gpr_avl_add(avl, box(597), box(237), NULL); + avl = gpr_avl_add(avl, box(661), box(238), NULL); avl = remove_int(avl, 96); - avl = gpr_avl_add(avl, box(894), box(240)); + avl = gpr_avl_add(avl, box(894), box(240), NULL); avl = remove_int(avl, 749); - avl = gpr_avl_add(avl, box(71), box(242)); + avl = gpr_avl_add(avl, box(71), box(242), NULL); avl = remove_int(avl, 68); - avl = gpr_avl_add(avl, box(388), box(244)); + avl = gpr_avl_add(avl, box(388), box(244), NULL); avl = remove_int(avl, 119); avl = remove_int(avl, 856); - avl = gpr_avl_add(avl, box(176), box(247)); - avl = gpr_avl_add(avl, box(993), box(248)); + avl = gpr_avl_add(avl, box(176), box(247), NULL); + avl = gpr_avl_add(avl, box(993), box(248), NULL); avl = remove_int(avl, 178); avl = remove_int(avl, 781); avl = remove_int(avl, 771); @@ -499,37 +501,37 @@ static void test_badcase2(void) { avl = remove_int(avl, 157); avl = remove_int(avl, 142); avl = remove_int(avl, 686); - avl = gpr_avl_add(avl, box(779), box(257)); - avl = gpr_avl_add(avl, box(484), box(258)); + avl = gpr_avl_add(avl, box(779), box(257), NULL); + avl = gpr_avl_add(avl, box(484), box(258), NULL); avl = remove_int(avl, 837); - avl = gpr_avl_add(avl, box(388), box(260)); + avl = gpr_avl_add(avl, box(388), box(260), NULL); avl = remove_int(avl, 987); - avl = gpr_avl_add(avl, box(336), box(262)); + avl = gpr_avl_add(avl, box(336), box(262), NULL); avl = remove_int(avl, 855); - avl = gpr_avl_add(avl, box(668), box(264)); + avl = gpr_avl_add(avl, box(668), box(264), NULL); avl = remove_int(avl, 648); - avl = gpr_avl_add(avl, box(193), box(266)); + avl = gpr_avl_add(avl, box(193), box(266), NULL); avl = remove_int(avl, 939); - avl = gpr_avl_add(avl, box(740), box(268)); - avl = gpr_avl_add(avl, box(503), box(269)); - avl = gpr_avl_add(avl, box(765), box(270)); + avl = gpr_avl_add(avl, box(740), box(268), NULL); + avl = gpr_avl_add(avl, box(503), box(269), NULL); + avl = gpr_avl_add(avl, box(765), box(270), NULL); avl = remove_int(avl, 924); avl = remove_int(avl, 513); - avl = gpr_avl_add(avl, box(161), box(273)); - avl = gpr_avl_add(avl, box(502), box(274)); - avl = gpr_avl_add(avl, box(846), box(275)); + avl = gpr_avl_add(avl, box(161), box(273), NULL); + avl = gpr_avl_add(avl, box(502), box(274), NULL); + avl = gpr_avl_add(avl, box(846), box(275), NULL); avl = remove_int(avl, 931); - avl = gpr_avl_add(avl, box(87), box(277)); - avl = gpr_avl_add(avl, box(949), box(278)); - avl = gpr_avl_add(avl, box(548), box(279)); - avl = gpr_avl_add(avl, box(951), box(280)); + avl = gpr_avl_add(avl, box(87), box(277), NULL); + avl = gpr_avl_add(avl, box(949), box(278), NULL); + avl = gpr_avl_add(avl, box(548), box(279), NULL); + avl = gpr_avl_add(avl, box(951), box(280), NULL); avl = remove_int(avl, 1018); avl = remove_int(avl, 568); - avl = gpr_avl_add(avl, box(138), box(283)); - avl = gpr_avl_add(avl, box(202), box(284)); - avl = gpr_avl_add(avl, box(157), box(285)); - avl = gpr_avl_add(avl, box(264), box(286)); - avl = gpr_avl_add(avl, box(370), box(287)); + avl = gpr_avl_add(avl, box(138), box(283), NULL); + avl = gpr_avl_add(avl, box(202), box(284), NULL); + avl = gpr_avl_add(avl, box(157), box(285), NULL); + avl = gpr_avl_add(avl, box(264), box(286), NULL); + avl = gpr_avl_add(avl, box(370), box(287), NULL); avl = remove_int(avl, 736); avl = remove_int(avl, 751); avl = remove_int(avl, 506); @@ -537,524 +539,524 @@ static void test_badcase2(void) { avl = remove_int(avl, 358); avl = remove_int(avl, 657); avl = remove_int(avl, 86); - avl = gpr_avl_add(avl, box(876), box(295)); + avl = gpr_avl_add(avl, box(876), box(295), NULL); avl = remove_int(avl, 354); - avl = gpr_avl_add(avl, box(134), box(297)); + avl = gpr_avl_add(avl, box(134), box(297), NULL); avl = remove_int(avl, 781); avl = remove_int(avl, 183); - avl = gpr_avl_add(avl, box(914), box(300)); + avl = gpr_avl_add(avl, box(914), box(300), NULL); avl = remove_int(avl, 926); avl = remove_int(avl, 398); avl = remove_int(avl, 932); avl = remove_int(avl, 804); avl = remove_int(avl, 326); - avl = gpr_avl_add(avl, box(208), box(306)); - avl = gpr_avl_add(avl, box(699), box(307)); + avl = gpr_avl_add(avl, box(208), box(306), NULL); + avl = gpr_avl_add(avl, box(699), box(307), NULL); avl = remove_int(avl, 576); avl = remove_int(avl, 850); avl = remove_int(avl, 514); avl = remove_int(avl, 676); avl = remove_int(avl, 549); avl = remove_int(avl, 767); - avl = gpr_avl_add(avl, box(58), box(314)); - avl = gpr_avl_add(avl, box(265), box(315)); - avl = gpr_avl_add(avl, box(268), box(316)); - avl = gpr_avl_add(avl, box(103), box(317)); - avl = gpr_avl_add(avl, box(440), box(318)); + avl = gpr_avl_add(avl, box(58), box(314), NULL); + avl = gpr_avl_add(avl, box(265), box(315), NULL); + avl = gpr_avl_add(avl, box(268), box(316), NULL); + avl = gpr_avl_add(avl, box(103), box(317), NULL); + avl = gpr_avl_add(avl, box(440), box(318), NULL); avl = remove_int(avl, 777); - avl = gpr_avl_add(avl, box(670), box(320)); + avl = gpr_avl_add(avl, box(670), box(320), NULL); avl = remove_int(avl, 506); avl = remove_int(avl, 487); - avl = gpr_avl_add(avl, box(421), box(323)); + avl = gpr_avl_add(avl, box(421), box(323), NULL); avl = remove_int(avl, 514); - avl = gpr_avl_add(avl, box(701), box(325)); + avl = gpr_avl_add(avl, box(701), box(325), NULL); avl = remove_int(avl, 949); avl = remove_int(avl, 872); avl = remove_int(avl, 139); - avl = gpr_avl_add(avl, box(781), box(329)); - avl = gpr_avl_add(avl, box(543), box(330)); - avl = gpr_avl_add(avl, box(147), box(331)); + avl = gpr_avl_add(avl, box(781), box(329), NULL); + avl = gpr_avl_add(avl, box(543), box(330), NULL); + avl = gpr_avl_add(avl, box(147), box(331), NULL); avl = remove_int(avl, 190); - avl = gpr_avl_add(avl, box(453), box(333)); + avl = gpr_avl_add(avl, box(453), box(333), NULL); avl = remove_int(avl, 262); avl = remove_int(avl, 850); avl = remove_int(avl, 286); avl = remove_int(avl, 787); - avl = gpr_avl_add(avl, box(514), box(338)); + avl = gpr_avl_add(avl, box(514), box(338), NULL); avl = remove_int(avl, 812); - avl = gpr_avl_add(avl, box(431), box(340)); - avl = gpr_avl_add(avl, box(8), box(341)); + avl = gpr_avl_add(avl, box(431), box(340), NULL); + avl = gpr_avl_add(avl, box(8), box(341), NULL); avl = remove_int(avl, 843); - avl = gpr_avl_add(avl, box(831), box(343)); + avl = gpr_avl_add(avl, box(831), box(343), NULL); avl = remove_int(avl, 472); avl = remove_int(avl, 157); - avl = gpr_avl_add(avl, box(612), box(346)); - avl = gpr_avl_add(avl, box(802), box(347)); + avl = gpr_avl_add(avl, box(612), box(346), NULL); + avl = gpr_avl_add(avl, box(802), box(347), NULL); avl = remove_int(avl, 554); - avl = gpr_avl_add(avl, box(409), box(349)); - avl = gpr_avl_add(avl, box(439), box(350)); - avl = gpr_avl_add(avl, box(725), box(351)); - avl = gpr_avl_add(avl, box(568), box(352)); + avl = gpr_avl_add(avl, box(409), box(349), NULL); + avl = gpr_avl_add(avl, box(439), box(350), NULL); + avl = gpr_avl_add(avl, box(725), box(351), NULL); + avl = gpr_avl_add(avl, box(568), box(352), NULL); avl = remove_int(avl, 475); avl = remove_int(avl, 672); avl = remove_int(avl, 62); avl = remove_int(avl, 753); - avl = gpr_avl_add(avl, box(435), box(357)); - avl = gpr_avl_add(avl, box(950), box(358)); - avl = gpr_avl_add(avl, box(532), box(359)); - avl = gpr_avl_add(avl, box(832), box(360)); + avl = gpr_avl_add(avl, box(435), box(357), NULL); + avl = gpr_avl_add(avl, box(950), box(358), NULL); + avl = gpr_avl_add(avl, box(532), box(359), NULL); + avl = gpr_avl_add(avl, box(832), box(360), NULL); avl = remove_int(avl, 390); - avl = gpr_avl_add(avl, box(993), box(362)); + avl = gpr_avl_add(avl, box(993), box(362), NULL); avl = remove_int(avl, 198); avl = remove_int(avl, 401); - avl = gpr_avl_add(avl, box(316), box(365)); + avl = gpr_avl_add(avl, box(316), box(365), NULL); avl = remove_int(avl, 843); - avl = gpr_avl_add(avl, box(541), box(367)); - avl = gpr_avl_add(avl, box(505), box(368)); + avl = gpr_avl_add(avl, box(541), box(367), NULL); + avl = gpr_avl_add(avl, box(505), box(368), NULL); avl = remove_int(avl, 445); avl = remove_int(avl, 256); - avl = gpr_avl_add(avl, box(232), box(371)); + avl = gpr_avl_add(avl, box(232), box(371), NULL); avl = remove_int(avl, 577); avl = remove_int(avl, 558); - avl = gpr_avl_add(avl, box(910), box(374)); + avl = gpr_avl_add(avl, box(910), box(374), NULL); avl = remove_int(avl, 902); avl = remove_int(avl, 755); avl = remove_int(avl, 114); avl = remove_int(avl, 438); avl = remove_int(avl, 224); - avl = gpr_avl_add(avl, box(920), box(380)); - avl = gpr_avl_add(avl, box(655), box(381)); + avl = gpr_avl_add(avl, box(920), box(380), NULL); + avl = gpr_avl_add(avl, box(655), box(381), NULL); avl = remove_int(avl, 557); avl = remove_int(avl, 102); avl = remove_int(avl, 165); - avl = gpr_avl_add(avl, box(191), box(385)); + avl = gpr_avl_add(avl, box(191), box(385), NULL); avl = remove_int(avl, 30); - avl = gpr_avl_add(avl, box(406), box(387)); - avl = gpr_avl_add(avl, box(66), box(388)); - avl = gpr_avl_add(avl, box(87), box(389)); + avl = gpr_avl_add(avl, box(406), box(387), NULL); + avl = gpr_avl_add(avl, box(66), box(388), NULL); + avl = gpr_avl_add(avl, box(87), box(389), NULL); avl = remove_int(avl, 7); avl = remove_int(avl, 671); - avl = gpr_avl_add(avl, box(234), box(392)); + avl = gpr_avl_add(avl, box(234), box(392), NULL); avl = remove_int(avl, 463); - avl = gpr_avl_add(avl, box(75), box(394)); - avl = gpr_avl_add(avl, box(487), box(395)); + avl = gpr_avl_add(avl, box(75), box(394), NULL); + avl = gpr_avl_add(avl, box(487), box(395), NULL); avl = remove_int(avl, 203); - avl = gpr_avl_add(avl, box(711), box(397)); + avl = gpr_avl_add(avl, box(711), box(397), NULL); avl = remove_int(avl, 291); avl = remove_int(avl, 798); avl = remove_int(avl, 337); - avl = gpr_avl_add(avl, box(877), box(401)); - avl = gpr_avl_add(avl, box(388), box(402)); + avl = gpr_avl_add(avl, box(877), box(401), NULL); + avl = gpr_avl_add(avl, box(388), box(402), NULL); avl = remove_int(avl, 975); - avl = gpr_avl_add(avl, box(200), box(404)); - avl = gpr_avl_add(avl, box(408), box(405)); - avl = gpr_avl_add(avl, box(3), box(406)); - avl = gpr_avl_add(avl, box(971), box(407)); + avl = gpr_avl_add(avl, box(200), box(404), NULL); + avl = gpr_avl_add(avl, box(408), box(405), NULL); + avl = gpr_avl_add(avl, box(3), box(406), NULL); + avl = gpr_avl_add(avl, box(971), box(407), NULL); avl = remove_int(avl, 841); avl = remove_int(avl, 910); avl = remove_int(avl, 74); avl = remove_int(avl, 888); - avl = gpr_avl_add(avl, box(492), box(412)); + avl = gpr_avl_add(avl, box(492), box(412), NULL); avl = remove_int(avl, 14); avl = remove_int(avl, 364); - avl = gpr_avl_add(avl, box(215), box(415)); + avl = gpr_avl_add(avl, box(215), box(415), NULL); avl = remove_int(avl, 778); avl = remove_int(avl, 45); - avl = gpr_avl_add(avl, box(328), box(418)); - avl = gpr_avl_add(avl, box(597), box(419)); + avl = gpr_avl_add(avl, box(328), box(418), NULL); + avl = gpr_avl_add(avl, box(597), box(419), NULL); avl = remove_int(avl, 34); - avl = gpr_avl_add(avl, box(736), box(421)); + avl = gpr_avl_add(avl, box(736), box(421), NULL); avl = remove_int(avl, 37); - avl = gpr_avl_add(avl, box(275), box(423)); - avl = gpr_avl_add(avl, box(70), box(424)); - avl = gpr_avl_add(avl, box(771), box(425)); + avl = gpr_avl_add(avl, box(275), box(423), NULL); + avl = gpr_avl_add(avl, box(70), box(424), NULL); + avl = gpr_avl_add(avl, box(771), box(425), NULL); avl = remove_int(avl, 536); avl = remove_int(avl, 421); - avl = gpr_avl_add(avl, box(186), box(428)); - avl = gpr_avl_add(avl, box(788), box(429)); - avl = gpr_avl_add(avl, box(224), box(430)); + avl = gpr_avl_add(avl, box(186), box(428), NULL); + avl = gpr_avl_add(avl, box(788), box(429), NULL); + avl = gpr_avl_add(avl, box(224), box(430), NULL); avl = remove_int(avl, 228); - avl = gpr_avl_add(avl, box(48), box(432)); - avl = gpr_avl_add(avl, box(120), box(433)); - avl = gpr_avl_add(avl, box(269), box(434)); - avl = gpr_avl_add(avl, box(904), box(435)); + avl = gpr_avl_add(avl, box(48), box(432), NULL); + avl = gpr_avl_add(avl, box(120), box(433), NULL); + avl = gpr_avl_add(avl, box(269), box(434), NULL); + avl = gpr_avl_add(avl, box(904), box(435), NULL); avl = remove_int(avl, 699); - avl = gpr_avl_add(avl, box(340), box(437)); + avl = gpr_avl_add(avl, box(340), box(437), NULL); avl = remove_int(avl, 276); - avl = gpr_avl_add(avl, box(591), box(439)); - avl = gpr_avl_add(avl, box(778), box(440)); + avl = gpr_avl_add(avl, box(591), box(439), NULL); + avl = gpr_avl_add(avl, box(778), box(440), NULL); avl = remove_int(avl, 490); avl = remove_int(avl, 973); - avl = gpr_avl_add(avl, box(294), box(443)); - avl = gpr_avl_add(avl, box(323), box(444)); + avl = gpr_avl_add(avl, box(294), box(443), NULL); + avl = gpr_avl_add(avl, box(323), box(444), NULL); avl = remove_int(avl, 685); - avl = gpr_avl_add(avl, box(38), box(446)); - avl = gpr_avl_add(avl, box(525), box(447)); + avl = gpr_avl_add(avl, box(38), box(446), NULL); + avl = gpr_avl_add(avl, box(525), box(447), NULL); avl = remove_int(avl, 162); - avl = gpr_avl_add(avl, box(462), box(449)); - avl = gpr_avl_add(avl, box(340), box(450)); + avl = gpr_avl_add(avl, box(462), box(449), NULL); + avl = gpr_avl_add(avl, box(340), box(450), NULL); avl = remove_int(avl, 734); avl = remove_int(avl, 959); - avl = gpr_avl_add(avl, box(752), box(453)); - avl = gpr_avl_add(avl, box(667), box(454)); + avl = gpr_avl_add(avl, box(752), box(453), NULL); + avl = gpr_avl_add(avl, box(667), box(454), NULL); avl = remove_int(avl, 558); avl = remove_int(avl, 657); - avl = gpr_avl_add(avl, box(711), box(457)); + avl = gpr_avl_add(avl, box(711), box(457), NULL); avl = remove_int(avl, 937); - avl = gpr_avl_add(avl, box(741), box(459)); - avl = gpr_avl_add(avl, box(40), box(460)); + avl = gpr_avl_add(avl, box(741), box(459), NULL); + avl = gpr_avl_add(avl, box(40), box(460), NULL); avl = remove_int(avl, 784); - avl = gpr_avl_add(avl, box(292), box(462)); + avl = gpr_avl_add(avl, box(292), box(462), NULL); avl = remove_int(avl, 164); avl = remove_int(avl, 931); avl = remove_int(avl, 886); - avl = gpr_avl_add(avl, box(968), box(466)); + avl = gpr_avl_add(avl, box(968), box(466), NULL); avl = remove_int(avl, 263); - avl = gpr_avl_add(avl, box(647), box(468)); - avl = gpr_avl_add(avl, box(92), box(469)); + avl = gpr_avl_add(avl, box(647), box(468), NULL); + avl = gpr_avl_add(avl, box(92), box(469), NULL); avl = remove_int(avl, 310); - avl = gpr_avl_add(avl, box(711), box(471)); - avl = gpr_avl_add(avl, box(675), box(472)); + avl = gpr_avl_add(avl, box(711), box(471), NULL); + avl = gpr_avl_add(avl, box(675), box(472), NULL); avl = remove_int(avl, 549); - avl = gpr_avl_add(avl, box(380), box(474)); + avl = gpr_avl_add(avl, box(380), box(474), NULL); avl = remove_int(avl, 825); - avl = gpr_avl_add(avl, box(668), box(476)); + avl = gpr_avl_add(avl, box(668), box(476), NULL); avl = remove_int(avl, 498); - avl = gpr_avl_add(avl, box(870), box(478)); - avl = gpr_avl_add(avl, box(391), box(479)); - avl = gpr_avl_add(avl, box(264), box(480)); + avl = gpr_avl_add(avl, box(870), box(478), NULL); + avl = gpr_avl_add(avl, box(391), box(479), NULL); + avl = gpr_avl_add(avl, box(264), box(480), NULL); avl = remove_int(avl, 1); avl = remove_int(avl, 849); avl = remove_int(avl, 88); avl = remove_int(avl, 255); avl = remove_int(avl, 763); avl = remove_int(avl, 831); - avl = gpr_avl_add(avl, box(508), box(487)); + avl = gpr_avl_add(avl, box(508), box(487), NULL); avl = remove_int(avl, 849); avl = remove_int(avl, 47); - avl = gpr_avl_add(avl, box(299), box(490)); + avl = gpr_avl_add(avl, box(299), box(490), NULL); avl = remove_int(avl, 625); avl = remove_int(avl, 433); avl = remove_int(avl, 904); avl = remove_int(avl, 761); - avl = gpr_avl_add(avl, box(33), box(495)); - avl = gpr_avl_add(avl, box(524), box(496)); + avl = gpr_avl_add(avl, box(33), box(495), NULL); + avl = gpr_avl_add(avl, box(524), box(496), NULL); avl = remove_int(avl, 210); avl = remove_int(avl, 299); - avl = gpr_avl_add(avl, box(823), box(499)); + avl = gpr_avl_add(avl, box(823), box(499), NULL); avl = remove_int(avl, 479); avl = remove_int(avl, 96); avl = remove_int(avl, 1013); - avl = gpr_avl_add(avl, box(768), box(503)); + avl = gpr_avl_add(avl, box(768), box(503), NULL); avl = remove_int(avl, 638); avl = remove_int(avl, 20); - avl = gpr_avl_add(avl, box(663), box(506)); + avl = gpr_avl_add(avl, box(663), box(506), NULL); avl = remove_int(avl, 882); - avl = gpr_avl_add(avl, box(745), box(508)); + avl = gpr_avl_add(avl, box(745), box(508), NULL); avl = remove_int(avl, 352); - avl = gpr_avl_add(avl, box(10), box(510)); + avl = gpr_avl_add(avl, box(10), box(510), NULL); avl = remove_int(avl, 484); - avl = gpr_avl_add(avl, box(420), box(512)); - avl = gpr_avl_add(avl, box(884), box(513)); - avl = gpr_avl_add(avl, box(993), box(514)); - avl = gpr_avl_add(avl, box(251), box(515)); + avl = gpr_avl_add(avl, box(420), box(512), NULL); + avl = gpr_avl_add(avl, box(884), box(513), NULL); + avl = gpr_avl_add(avl, box(993), box(514), NULL); + avl = gpr_avl_add(avl, box(251), box(515), NULL); avl = remove_int(avl, 222); - avl = gpr_avl_add(avl, box(734), box(517)); - avl = gpr_avl_add(avl, box(952), box(518)); + avl = gpr_avl_add(avl, box(734), box(517), NULL); + avl = gpr_avl_add(avl, box(952), box(518), NULL); avl = remove_int(avl, 26); avl = remove_int(avl, 270); avl = remove_int(avl, 481); avl = remove_int(avl, 693); avl = remove_int(avl, 1006); - avl = gpr_avl_add(avl, box(77), box(524)); + avl = gpr_avl_add(avl, box(77), box(524), NULL); avl = remove_int(avl, 897); - avl = gpr_avl_add(avl, box(719), box(526)); - avl = gpr_avl_add(avl, box(622), box(527)); + avl = gpr_avl_add(avl, box(719), box(526), NULL); + avl = gpr_avl_add(avl, box(622), box(527), NULL); avl = remove_int(avl, 28); avl = remove_int(avl, 836); avl = remove_int(avl, 142); - avl = gpr_avl_add(avl, box(445), box(531)); - avl = gpr_avl_add(avl, box(410), box(532)); + avl = gpr_avl_add(avl, box(445), box(531), NULL); + avl = gpr_avl_add(avl, box(410), box(532), NULL); avl = remove_int(avl, 575); - avl = gpr_avl_add(avl, box(634), box(534)); - avl = gpr_avl_add(avl, box(906), box(535)); + avl = gpr_avl_add(avl, box(634), box(534), NULL); + avl = gpr_avl_add(avl, box(906), box(535), NULL); avl = remove_int(avl, 649); - avl = gpr_avl_add(avl, box(813), box(537)); + avl = gpr_avl_add(avl, box(813), box(537), NULL); avl = remove_int(avl, 702); avl = remove_int(avl, 732); - avl = gpr_avl_add(avl, box(105), box(540)); - avl = gpr_avl_add(avl, box(867), box(541)); + avl = gpr_avl_add(avl, box(105), box(540), NULL); + avl = gpr_avl_add(avl, box(867), box(541), NULL); avl = remove_int(avl, 964); avl = remove_int(avl, 941); - avl = gpr_avl_add(avl, box(947), box(544)); + avl = gpr_avl_add(avl, box(947), box(544), NULL); avl = remove_int(avl, 990); - avl = gpr_avl_add(avl, box(816), box(546)); + avl = gpr_avl_add(avl, box(816), box(546), NULL); avl = remove_int(avl, 429); avl = remove_int(avl, 567); avl = remove_int(avl, 541); avl = remove_int(avl, 583); - avl = gpr_avl_add(avl, box(57), box(551)); - avl = gpr_avl_add(avl, box(786), box(552)); - avl = gpr_avl_add(avl, box(526), box(553)); + avl = gpr_avl_add(avl, box(57), box(551), NULL); + avl = gpr_avl_add(avl, box(786), box(552), NULL); + avl = gpr_avl_add(avl, box(526), box(553), NULL); avl = remove_int(avl, 642); avl = remove_int(avl, 220); avl = remove_int(avl, 840); avl = remove_int(avl, 548); - avl = gpr_avl_add(avl, box(528), box(558)); - avl = gpr_avl_add(avl, box(749), box(559)); - avl = gpr_avl_add(avl, box(194), box(560)); + avl = gpr_avl_add(avl, box(528), box(558), NULL); + avl = gpr_avl_add(avl, box(749), box(559), NULL); + avl = gpr_avl_add(avl, box(194), box(560), NULL); avl = remove_int(avl, 517); - avl = gpr_avl_add(avl, box(102), box(562)); + avl = gpr_avl_add(avl, box(102), box(562), NULL); avl = remove_int(avl, 189); - avl = gpr_avl_add(avl, box(927), box(564)); + avl = gpr_avl_add(avl, box(927), box(564), NULL); avl = remove_int(avl, 846); avl = remove_int(avl, 130); - avl = gpr_avl_add(avl, box(694), box(567)); + avl = gpr_avl_add(avl, box(694), box(567), NULL); avl = remove_int(avl, 750); - avl = gpr_avl_add(avl, box(357), box(569)); + avl = gpr_avl_add(avl, box(357), box(569), NULL); avl = remove_int(avl, 431); avl = remove_int(avl, 91); - avl = gpr_avl_add(avl, box(640), box(572)); + avl = gpr_avl_add(avl, box(640), box(572), NULL); avl = remove_int(avl, 4); - avl = gpr_avl_add(avl, box(81), box(574)); - avl = gpr_avl_add(avl, box(595), box(575)); + avl = gpr_avl_add(avl, box(81), box(574), NULL); + avl = gpr_avl_add(avl, box(595), box(575), NULL); avl = remove_int(avl, 444); avl = remove_int(avl, 262); avl = remove_int(avl, 11); - avl = gpr_avl_add(avl, box(192), box(579)); - avl = gpr_avl_add(avl, box(158), box(580)); + avl = gpr_avl_add(avl, box(192), box(579), NULL); + avl = gpr_avl_add(avl, box(158), box(580), NULL); avl = remove_int(avl, 401); avl = remove_int(avl, 918); - avl = gpr_avl_add(avl, box(180), box(583)); + avl = gpr_avl_add(avl, box(180), box(583), NULL); avl = remove_int(avl, 268); - avl = gpr_avl_add(avl, box(1012), box(585)); - avl = gpr_avl_add(avl, box(90), box(586)); - avl = gpr_avl_add(avl, box(946), box(587)); + avl = gpr_avl_add(avl, box(1012), box(585), NULL); + avl = gpr_avl_add(avl, box(90), box(586), NULL); + avl = gpr_avl_add(avl, box(946), box(587), NULL); avl = remove_int(avl, 719); - avl = gpr_avl_add(avl, box(874), box(589)); - avl = gpr_avl_add(avl, box(679), box(590)); + avl = gpr_avl_add(avl, box(874), box(589), NULL); + avl = gpr_avl_add(avl, box(679), box(590), NULL); avl = remove_int(avl, 53); avl = remove_int(avl, 534); - avl = gpr_avl_add(avl, box(646), box(593)); - avl = gpr_avl_add(avl, box(767), box(594)); - avl = gpr_avl_add(avl, box(460), box(595)); - avl = gpr_avl_add(avl, box(852), box(596)); - avl = gpr_avl_add(avl, box(189), box(597)); + avl = gpr_avl_add(avl, box(646), box(593), NULL); + avl = gpr_avl_add(avl, box(767), box(594), NULL); + avl = gpr_avl_add(avl, box(460), box(595), NULL); + avl = gpr_avl_add(avl, box(852), box(596), NULL); + avl = gpr_avl_add(avl, box(189), box(597), NULL); avl = remove_int(avl, 932); avl = remove_int(avl, 366); avl = remove_int(avl, 907); - avl = gpr_avl_add(avl, box(875), box(601)); - avl = gpr_avl_add(avl, box(434), box(602)); - avl = gpr_avl_add(avl, box(704), box(603)); - avl = gpr_avl_add(avl, box(724), box(604)); - avl = gpr_avl_add(avl, box(930), box(605)); - avl = gpr_avl_add(avl, box(1000), box(606)); + avl = gpr_avl_add(avl, box(875), box(601), NULL); + avl = gpr_avl_add(avl, box(434), box(602), NULL); + avl = gpr_avl_add(avl, box(704), box(603), NULL); + avl = gpr_avl_add(avl, box(724), box(604), NULL); + avl = gpr_avl_add(avl, box(930), box(605), NULL); + avl = gpr_avl_add(avl, box(1000), box(606), NULL); avl = remove_int(avl, 479); - avl = gpr_avl_add(avl, box(275), box(608)); + avl = gpr_avl_add(avl, box(275), box(608), NULL); avl = remove_int(avl, 32); - avl = gpr_avl_add(avl, box(939), box(610)); + avl = gpr_avl_add(avl, box(939), box(610), NULL); avl = remove_int(avl, 943); avl = remove_int(avl, 329); - avl = gpr_avl_add(avl, box(490), box(613)); + avl = gpr_avl_add(avl, box(490), box(613), NULL); avl = remove_int(avl, 477); avl = remove_int(avl, 414); avl = remove_int(avl, 187); avl = remove_int(avl, 334); - avl = gpr_avl_add(avl, box(40), box(618)); + avl = gpr_avl_add(avl, box(40), box(618), NULL); avl = remove_int(avl, 751); - avl = gpr_avl_add(avl, box(568), box(620)); - avl = gpr_avl_add(avl, box(120), box(621)); - avl = gpr_avl_add(avl, box(617), box(622)); - avl = gpr_avl_add(avl, box(32), box(623)); + avl = gpr_avl_add(avl, box(568), box(620), NULL); + avl = gpr_avl_add(avl, box(120), box(621), NULL); + avl = gpr_avl_add(avl, box(617), box(622), NULL); + avl = gpr_avl_add(avl, box(32), box(623), NULL); avl = remove_int(avl, 701); - avl = gpr_avl_add(avl, box(910), box(625)); + avl = gpr_avl_add(avl, box(910), box(625), NULL); avl = remove_int(avl, 557); avl = remove_int(avl, 361); avl = remove_int(avl, 937); avl = remove_int(avl, 100); avl = remove_int(avl, 684); - avl = gpr_avl_add(avl, box(751), box(631)); + avl = gpr_avl_add(avl, box(751), box(631), NULL); avl = remove_int(avl, 781); avl = remove_int(avl, 469); avl = remove_int(avl, 75); avl = remove_int(avl, 561); - avl = gpr_avl_add(avl, box(854), box(636)); + avl = gpr_avl_add(avl, box(854), box(636), NULL); avl = remove_int(avl, 164); avl = remove_int(avl, 258); avl = remove_int(avl, 315); avl = remove_int(avl, 261); - avl = gpr_avl_add(avl, box(552), box(641)); - avl = gpr_avl_add(avl, box(6), box(642)); - avl = gpr_avl_add(avl, box(680), box(643)); + avl = gpr_avl_add(avl, box(552), box(641), NULL); + avl = gpr_avl_add(avl, box(6), box(642), NULL); + avl = gpr_avl_add(avl, box(680), box(643), NULL); avl = remove_int(avl, 741); avl = remove_int(avl, 309); avl = remove_int(avl, 272); - avl = gpr_avl_add(avl, box(249), box(647)); + avl = gpr_avl_add(avl, box(249), box(647), NULL); avl = remove_int(avl, 97); avl = remove_int(avl, 850); - avl = gpr_avl_add(avl, box(915), box(650)); - avl = gpr_avl_add(avl, box(816), box(651)); - avl = gpr_avl_add(avl, box(45), box(652)); - avl = gpr_avl_add(avl, box(168), box(653)); + avl = gpr_avl_add(avl, box(915), box(650), NULL); + avl = gpr_avl_add(avl, box(816), box(651), NULL); + avl = gpr_avl_add(avl, box(45), box(652), NULL); + avl = gpr_avl_add(avl, box(168), box(653), NULL); avl = remove_int(avl, 153); avl = remove_int(avl, 239); - avl = gpr_avl_add(avl, box(684), box(656)); - avl = gpr_avl_add(avl, box(208), box(657)); - avl = gpr_avl_add(avl, box(681), box(658)); - avl = gpr_avl_add(avl, box(609), box(659)); - avl = gpr_avl_add(avl, box(645), box(660)); + avl = gpr_avl_add(avl, box(684), box(656), NULL); + avl = gpr_avl_add(avl, box(208), box(657), NULL); + avl = gpr_avl_add(avl, box(681), box(658), NULL); + avl = gpr_avl_add(avl, box(609), box(659), NULL); + avl = gpr_avl_add(avl, box(645), box(660), NULL); avl = remove_int(avl, 799); - avl = gpr_avl_add(avl, box(955), box(662)); - avl = gpr_avl_add(avl, box(946), box(663)); - avl = gpr_avl_add(avl, box(744), box(664)); - avl = gpr_avl_add(avl, box(201), box(665)); - avl = gpr_avl_add(avl, box(136), box(666)); + avl = gpr_avl_add(avl, box(955), box(662), NULL); + avl = gpr_avl_add(avl, box(946), box(663), NULL); + avl = gpr_avl_add(avl, box(744), box(664), NULL); + avl = gpr_avl_add(avl, box(201), box(665), NULL); + avl = gpr_avl_add(avl, box(136), box(666), NULL); avl = remove_int(avl, 357); - avl = gpr_avl_add(avl, box(974), box(668)); + avl = gpr_avl_add(avl, box(974), box(668), NULL); avl = remove_int(avl, 485); - avl = gpr_avl_add(avl, box(1009), box(670)); - avl = gpr_avl_add(avl, box(517), box(671)); + avl = gpr_avl_add(avl, box(1009), box(670), NULL); + avl = gpr_avl_add(avl, box(517), box(671), NULL); avl = remove_int(avl, 491); - avl = gpr_avl_add(avl, box(336), box(673)); - avl = gpr_avl_add(avl, box(589), box(674)); + avl = gpr_avl_add(avl, box(336), box(673), NULL); + avl = gpr_avl_add(avl, box(589), box(674), NULL); avl = remove_int(avl, 546); avl = remove_int(avl, 840); avl = remove_int(avl, 104); avl = remove_int(avl, 347); - avl = gpr_avl_add(avl, box(801), box(679)); + avl = gpr_avl_add(avl, box(801), box(679), NULL); avl = remove_int(avl, 799); avl = remove_int(avl, 702); avl = remove_int(avl, 996); avl = remove_int(avl, 93); - avl = gpr_avl_add(avl, box(561), box(684)); - avl = gpr_avl_add(avl, box(25), box(685)); + avl = gpr_avl_add(avl, box(561), box(684), NULL); + avl = gpr_avl_add(avl, box(25), box(685), NULL); avl = remove_int(avl, 278); - avl = gpr_avl_add(avl, box(191), box(687)); + avl = gpr_avl_add(avl, box(191), box(687), NULL); avl = remove_int(avl, 243); avl = remove_int(avl, 918); avl = remove_int(avl, 449); - avl = gpr_avl_add(avl, box(19), box(691)); - avl = gpr_avl_add(avl, box(762), box(692)); - avl = gpr_avl_add(avl, box(13), box(693)); - avl = gpr_avl_add(avl, box(151), box(694)); - avl = gpr_avl_add(avl, box(152), box(695)); - avl = gpr_avl_add(avl, box(793), box(696)); + avl = gpr_avl_add(avl, box(19), box(691), NULL); + avl = gpr_avl_add(avl, box(762), box(692), NULL); + avl = gpr_avl_add(avl, box(13), box(693), NULL); + avl = gpr_avl_add(avl, box(151), box(694), NULL); + avl = gpr_avl_add(avl, box(152), box(695), NULL); + avl = gpr_avl_add(avl, box(793), box(696), NULL); avl = remove_int(avl, 862); avl = remove_int(avl, 890); - avl = gpr_avl_add(avl, box(687), box(699)); - avl = gpr_avl_add(avl, box(509), box(700)); - avl = gpr_avl_add(avl, box(973), box(701)); + avl = gpr_avl_add(avl, box(687), box(699), NULL); + avl = gpr_avl_add(avl, box(509), box(700), NULL); + avl = gpr_avl_add(avl, box(973), box(701), NULL); avl = remove_int(avl, 230); - avl = gpr_avl_add(avl, box(532), box(703)); + avl = gpr_avl_add(avl, box(532), box(703), NULL); avl = remove_int(avl, 668); - avl = gpr_avl_add(avl, box(281), box(705)); - avl = gpr_avl_add(avl, box(867), box(706)); - avl = gpr_avl_add(avl, box(359), box(707)); + avl = gpr_avl_add(avl, box(281), box(705), NULL); + avl = gpr_avl_add(avl, box(867), box(706), NULL); + avl = gpr_avl_add(avl, box(359), box(707), NULL); avl = remove_int(avl, 425); - avl = gpr_avl_add(avl, box(691), box(709)); - avl = gpr_avl_add(avl, box(163), box(710)); - avl = gpr_avl_add(avl, box(502), box(711)); + avl = gpr_avl_add(avl, box(691), box(709), NULL); + avl = gpr_avl_add(avl, box(163), box(710), NULL); + avl = gpr_avl_add(avl, box(502), box(711), NULL); avl = remove_int(avl, 674); - avl = gpr_avl_add(avl, box(697), box(713)); + avl = gpr_avl_add(avl, box(697), box(713), NULL); avl = remove_int(avl, 271); - avl = gpr_avl_add(avl, box(968), box(715)); - avl = gpr_avl_add(avl, box(48), box(716)); + avl = gpr_avl_add(avl, box(968), box(715), NULL); + avl = gpr_avl_add(avl, box(48), box(716), NULL); avl = remove_int(avl, 543); - avl = gpr_avl_add(avl, box(35), box(718)); - avl = gpr_avl_add(avl, box(751), box(719)); - avl = gpr_avl_add(avl, box(478), box(720)); + avl = gpr_avl_add(avl, box(35), box(718), NULL); + avl = gpr_avl_add(avl, box(751), box(719), NULL); + avl = gpr_avl_add(avl, box(478), box(720), NULL); avl = remove_int(avl, 797); avl = remove_int(avl, 309); - avl = gpr_avl_add(avl, box(927), box(723)); + avl = gpr_avl_add(avl, box(927), box(723), NULL); avl = remove_int(avl, 504); - avl = gpr_avl_add(avl, box(286), box(725)); - avl = gpr_avl_add(avl, box(413), box(726)); - avl = gpr_avl_add(avl, box(599), box(727)); + avl = gpr_avl_add(avl, box(286), box(725), NULL); + avl = gpr_avl_add(avl, box(413), box(726), NULL); + avl = gpr_avl_add(avl, box(599), box(727), NULL); avl = remove_int(avl, 105); avl = remove_int(avl, 605); - avl = gpr_avl_add(avl, box(632), box(730)); - avl = gpr_avl_add(avl, box(133), box(731)); + avl = gpr_avl_add(avl, box(632), box(730), NULL); + avl = gpr_avl_add(avl, box(133), box(731), NULL); avl = remove_int(avl, 443); - avl = gpr_avl_add(avl, box(958), box(733)); - avl = gpr_avl_add(avl, box(729), box(734)); + avl = gpr_avl_add(avl, box(958), box(733), NULL); + avl = gpr_avl_add(avl, box(729), box(734), NULL); avl = remove_int(avl, 158); - avl = gpr_avl_add(avl, box(694), box(736)); - avl = gpr_avl_add(avl, box(505), box(737)); + avl = gpr_avl_add(avl, box(694), box(736), NULL); + avl = gpr_avl_add(avl, box(505), box(737), NULL); avl = remove_int(avl, 63); avl = remove_int(avl, 714); - avl = gpr_avl_add(avl, box(1002), box(740)); + avl = gpr_avl_add(avl, box(1002), box(740), NULL); avl = remove_int(avl, 211); - avl = gpr_avl_add(avl, box(765), box(742)); - avl = gpr_avl_add(avl, box(455), box(743)); + avl = gpr_avl_add(avl, box(765), box(742), NULL); + avl = gpr_avl_add(avl, box(455), box(743), NULL); avl = remove_int(avl, 59); avl = remove_int(avl, 224); - avl = gpr_avl_add(avl, box(586), box(746)); - avl = gpr_avl_add(avl, box(348), box(747)); + avl = gpr_avl_add(avl, box(586), box(746), NULL); + avl = gpr_avl_add(avl, box(348), box(747), NULL); avl = remove_int(avl, 10); avl = remove_int(avl, 484); - avl = gpr_avl_add(avl, box(968), box(750)); - avl = gpr_avl_add(avl, box(923), box(751)); + avl = gpr_avl_add(avl, box(968), box(750), NULL); + avl = gpr_avl_add(avl, box(923), box(751), NULL); avl = remove_int(avl, 573); avl = remove_int(avl, 617); - avl = gpr_avl_add(avl, box(812), box(754)); - avl = gpr_avl_add(avl, box(179), box(755)); + avl = gpr_avl_add(avl, box(812), box(754), NULL); + avl = gpr_avl_add(avl, box(179), box(755), NULL); avl = remove_int(avl, 284); avl = remove_int(avl, 157); avl = remove_int(avl, 177); avl = remove_int(avl, 896); - avl = gpr_avl_add(avl, box(649), box(760)); - avl = gpr_avl_add(avl, box(927), box(761)); - avl = gpr_avl_add(avl, box(454), box(762)); - avl = gpr_avl_add(avl, box(217), box(763)); + avl = gpr_avl_add(avl, box(649), box(760), NULL); + avl = gpr_avl_add(avl, box(927), box(761), NULL); + avl = gpr_avl_add(avl, box(454), box(762), NULL); + avl = gpr_avl_add(avl, box(217), box(763), NULL); avl = remove_int(avl, 534); - avl = gpr_avl_add(avl, box(180), box(765)); - avl = gpr_avl_add(avl, box(319), box(766)); + avl = gpr_avl_add(avl, box(180), box(765), NULL); + avl = gpr_avl_add(avl, box(319), box(766), NULL); avl = remove_int(avl, 92); - avl = gpr_avl_add(avl, box(483), box(768)); + avl = gpr_avl_add(avl, box(483), box(768), NULL); avl = remove_int(avl, 504); avl = remove_int(avl, 1017); avl = remove_int(avl, 37); avl = remove_int(avl, 50); - avl = gpr_avl_add(avl, box(302), box(773)); + avl = gpr_avl_add(avl, box(302), box(773), NULL); avl = remove_int(avl, 807); - avl = gpr_avl_add(avl, box(463), box(775)); - avl = gpr_avl_add(avl, box(271), box(776)); - avl = gpr_avl_add(avl, box(644), box(777)); + avl = gpr_avl_add(avl, box(463), box(775), NULL); + avl = gpr_avl_add(avl, box(271), box(776), NULL); + avl = gpr_avl_add(avl, box(644), box(777), NULL); avl = remove_int(avl, 618); - avl = gpr_avl_add(avl, box(166), box(779)); - avl = gpr_avl_add(avl, box(538), box(780)); + avl = gpr_avl_add(avl, box(166), box(779), NULL); + avl = gpr_avl_add(avl, box(538), box(780), NULL); avl = remove_int(avl, 606); - avl = gpr_avl_add(avl, box(425), box(782)); + avl = gpr_avl_add(avl, box(425), box(782), NULL); avl = remove_int(avl, 725); avl = remove_int(avl, 383); - avl = gpr_avl_add(avl, box(155), box(785)); + avl = gpr_avl_add(avl, box(155), box(785), NULL); avl = remove_int(avl, 889); - avl = gpr_avl_add(avl, box(653), box(787)); + avl = gpr_avl_add(avl, box(653), box(787), NULL); avl = remove_int(avl, 386); - avl = gpr_avl_add(avl, box(142), box(789)); + avl = gpr_avl_add(avl, box(142), box(789), NULL); avl = remove_int(avl, 107); avl = remove_int(avl, 603); avl = remove_int(avl, 971); - avl = gpr_avl_add(avl, box(80), box(793)); - avl = gpr_avl_add(avl, box(61), box(794)); - avl = gpr_avl_add(avl, box(693), box(795)); - avl = gpr_avl_add(avl, box(592), box(796)); - avl = gpr_avl_add(avl, box(433), box(797)); - avl = gpr_avl_add(avl, box(973), box(798)); + avl = gpr_avl_add(avl, box(80), box(793), NULL); + avl = gpr_avl_add(avl, box(61), box(794), NULL); + avl = gpr_avl_add(avl, box(693), box(795), NULL); + avl = gpr_avl_add(avl, box(592), box(796), NULL); + avl = gpr_avl_add(avl, box(433), box(797), NULL); + avl = gpr_avl_add(avl, box(973), box(798), NULL); avl = remove_int(avl, 901); avl = remove_int(avl, 340); avl = remove_int(avl, 709); - avl = gpr_avl_add(avl, box(224), box(802)); + avl = gpr_avl_add(avl, box(224), box(802), NULL); avl = remove_int(avl, 120); avl = remove_int(avl, 271); - avl = gpr_avl_add(avl, box(780), box(805)); - avl = gpr_avl_add(avl, box(867), box(806)); - avl = gpr_avl_add(avl, box(756), box(807)); - avl = gpr_avl_add(avl, box(583), box(808)); - avl = gpr_avl_add(avl, box(356), box(809)); - avl = gpr_avl_add(avl, box(58), box(810)); + avl = gpr_avl_add(avl, box(780), box(805), NULL); + avl = gpr_avl_add(avl, box(867), box(806), NULL); + avl = gpr_avl_add(avl, box(756), box(807), NULL); + avl = gpr_avl_add(avl, box(583), box(808), NULL); + avl = gpr_avl_add(avl, box(356), box(809), NULL); + avl = gpr_avl_add(avl, box(58), box(810), NULL); avl = remove_int(avl, 219); - avl = gpr_avl_add(avl, box(301), box(812)); + avl = gpr_avl_add(avl, box(301), box(812), NULL); avl = remove_int(avl, 643); avl = remove_int(avl, 787); avl = remove_int(avl, 583); @@ -1063,72 +1065,72 @@ static void test_badcase2(void) { avl = remove_int(avl, 608); avl = remove_int(avl, 363); avl = remove_int(avl, 690); - avl = gpr_avl_add(avl, box(233), box(821)); - avl = gpr_avl_add(avl, box(479), box(822)); - avl = gpr_avl_add(avl, box(323), box(823)); - avl = gpr_avl_add(avl, box(802), box(824)); + avl = gpr_avl_add(avl, box(233), box(821), NULL); + avl = gpr_avl_add(avl, box(479), box(822), NULL); + avl = gpr_avl_add(avl, box(323), box(823), NULL); + avl = gpr_avl_add(avl, box(802), box(824), NULL); avl = remove_int(avl, 682); avl = remove_int(avl, 705); avl = remove_int(avl, 487); - avl = gpr_avl_add(avl, box(530), box(828)); - avl = gpr_avl_add(avl, box(232), box(829)); + avl = gpr_avl_add(avl, box(530), box(828), NULL); + avl = gpr_avl_add(avl, box(232), box(829), NULL); avl = remove_int(avl, 627); - avl = gpr_avl_add(avl, box(396), box(831)); - avl = gpr_avl_add(avl, box(61), box(832)); - avl = gpr_avl_add(avl, box(932), box(833)); - avl = gpr_avl_add(avl, box(108), box(834)); - avl = gpr_avl_add(avl, box(524), box(835)); + avl = gpr_avl_add(avl, box(396), box(831), NULL); + avl = gpr_avl_add(avl, box(61), box(832), NULL); + avl = gpr_avl_add(avl, box(932), box(833), NULL); + avl = gpr_avl_add(avl, box(108), box(834), NULL); + avl = gpr_avl_add(avl, box(524), box(835), NULL); avl = remove_int(avl, 390); avl = remove_int(avl, 307); - avl = gpr_avl_add(avl, box(722), box(838)); - avl = gpr_avl_add(avl, box(907), box(839)); + avl = gpr_avl_add(avl, box(722), box(838), NULL); + avl = gpr_avl_add(avl, box(907), box(839), NULL); avl = remove_int(avl, 286); avl = remove_int(avl, 337); avl = remove_int(avl, 443); - avl = gpr_avl_add(avl, box(973), box(843)); + avl = gpr_avl_add(avl, box(973), box(843), NULL); avl = remove_int(avl, 930); avl = remove_int(avl, 242); - avl = gpr_avl_add(avl, box(997), box(846)); - avl = gpr_avl_add(avl, box(689), box(847)); + avl = gpr_avl_add(avl, box(997), box(846), NULL); + avl = gpr_avl_add(avl, box(689), box(847), NULL); avl = remove_int(avl, 318); - avl = gpr_avl_add(avl, box(703), box(849)); - avl = gpr_avl_add(avl, box(868), box(850)); - avl = gpr_avl_add(avl, box(200), box(851)); - avl = gpr_avl_add(avl, box(960), box(852)); - avl = gpr_avl_add(avl, box(80), box(853)); + avl = gpr_avl_add(avl, box(703), box(849), NULL); + avl = gpr_avl_add(avl, box(868), box(850), NULL); + avl = gpr_avl_add(avl, box(200), box(851), NULL); + avl = gpr_avl_add(avl, box(960), box(852), NULL); + avl = gpr_avl_add(avl, box(80), box(853), NULL); avl = remove_int(avl, 113); - avl = gpr_avl_add(avl, box(135), box(855)); + avl = gpr_avl_add(avl, box(135), box(855), NULL); avl = remove_int(avl, 529); - avl = gpr_avl_add(avl, box(366), box(857)); + avl = gpr_avl_add(avl, box(366), box(857), NULL); avl = remove_int(avl, 272); - avl = gpr_avl_add(avl, box(921), box(859)); + avl = gpr_avl_add(avl, box(921), box(859), NULL); avl = remove_int(avl, 497); - avl = gpr_avl_add(avl, box(712), box(861)); + avl = gpr_avl_add(avl, box(712), box(861), NULL); avl = remove_int(avl, 777); avl = remove_int(avl, 505); avl = remove_int(avl, 974); avl = remove_int(avl, 497); - avl = gpr_avl_add(avl, box(388), box(866)); - avl = gpr_avl_add(avl, box(29), box(867)); - avl = gpr_avl_add(avl, box(180), box(868)); - avl = gpr_avl_add(avl, box(983), box(869)); - avl = gpr_avl_add(avl, box(72), box(870)); - avl = gpr_avl_add(avl, box(693), box(871)); - avl = gpr_avl_add(avl, box(567), box(872)); + avl = gpr_avl_add(avl, box(388), box(866), NULL); + avl = gpr_avl_add(avl, box(29), box(867), NULL); + avl = gpr_avl_add(avl, box(180), box(868), NULL); + avl = gpr_avl_add(avl, box(983), box(869), NULL); + avl = gpr_avl_add(avl, box(72), box(870), NULL); + avl = gpr_avl_add(avl, box(693), box(871), NULL); + avl = gpr_avl_add(avl, box(567), box(872), NULL); avl = remove_int(avl, 549); avl = remove_int(avl, 351); - avl = gpr_avl_add(avl, box(1019), box(875)); + avl = gpr_avl_add(avl, box(1019), box(875), NULL); avl = remove_int(avl, 585); avl = remove_int(avl, 294); avl = remove_int(avl, 61); - avl = gpr_avl_add(avl, box(409), box(879)); - avl = gpr_avl_add(avl, box(984), box(880)); - avl = gpr_avl_add(avl, box(830), box(881)); + avl = gpr_avl_add(avl, box(409), box(879), NULL); + avl = gpr_avl_add(avl, box(984), box(880), NULL); + avl = gpr_avl_add(avl, box(830), box(881), NULL); avl = remove_int(avl, 579); - avl = gpr_avl_add(avl, box(672), box(883)); + avl = gpr_avl_add(avl, box(672), box(883), NULL); avl = remove_int(avl, 968); - gpr_avl_unref(avl); + gpr_avl_unref(avl, NULL); } static void test_badcase3(void) { @@ -1138,191 +1140,191 @@ static void test_badcase3(void) { avl = gpr_avl_create(&int_int_vtable); avl = remove_int(avl, 624); - avl = gpr_avl_add(avl, box(59), box(2)); - avl = gpr_avl_add(avl, box(494), box(3)); - avl = gpr_avl_add(avl, box(226), box(4)); + avl = gpr_avl_add(avl, box(59), box(2), NULL); + avl = gpr_avl_add(avl, box(494), box(3), NULL); + avl = gpr_avl_add(avl, box(226), box(4), NULL); avl = remove_int(avl, 524); - avl = gpr_avl_add(avl, box(540), box(6)); + avl = gpr_avl_add(avl, box(540), box(6), NULL); avl = remove_int(avl, 1008); - avl = gpr_avl_add(avl, box(502), box(8)); + avl = gpr_avl_add(avl, box(502), box(8), NULL); avl = remove_int(avl, 267); avl = remove_int(avl, 764); avl = remove_int(avl, 443); - avl = gpr_avl_add(avl, box(8), box(12)); + avl = gpr_avl_add(avl, box(8), box(12), NULL); avl = remove_int(avl, 291); avl = remove_int(avl, 796); avl = remove_int(avl, 1002); - avl = gpr_avl_add(avl, box(778), box(16)); + avl = gpr_avl_add(avl, box(778), box(16), NULL); avl = remove_int(avl, 621); avl = remove_int(avl, 891); avl = remove_int(avl, 880); - avl = gpr_avl_add(avl, box(197), box(20)); - avl = gpr_avl_add(avl, box(441), box(21)); - avl = gpr_avl_add(avl, box(719), box(22)); + avl = gpr_avl_add(avl, box(197), box(20), NULL); + avl = gpr_avl_add(avl, box(441), box(21), NULL); + avl = gpr_avl_add(avl, box(719), box(22), NULL); avl = remove_int(avl, 109); - avl = gpr_avl_add(avl, box(458), box(24)); + avl = gpr_avl_add(avl, box(458), box(24), NULL); avl = remove_int(avl, 86); - avl = gpr_avl_add(avl, box(897), box(26)); - avl = gpr_avl_add(avl, box(997), box(27)); + avl = gpr_avl_add(avl, box(897), box(26), NULL); + avl = gpr_avl_add(avl, box(997), box(27), NULL); avl = remove_int(avl, 235); avl = remove_int(avl, 425); avl = remove_int(avl, 186); - avl = gpr_avl_add(avl, box(887), box(31)); - avl = gpr_avl_add(avl, box(1005), box(32)); - avl = gpr_avl_add(avl, box(778), box(33)); - avl = gpr_avl_add(avl, box(575), box(34)); + avl = gpr_avl_add(avl, box(887), box(31), NULL); + avl = gpr_avl_add(avl, box(1005), box(32), NULL); + avl = gpr_avl_add(avl, box(778), box(33), NULL); + avl = gpr_avl_add(avl, box(575), box(34), NULL); avl = remove_int(avl, 966); avl = remove_int(avl, 1015); - avl = gpr_avl_add(avl, box(486), box(37)); - avl = gpr_avl_add(avl, box(809), box(38)); - avl = gpr_avl_add(avl, box(907), box(39)); - avl = gpr_avl_add(avl, box(971), box(40)); + avl = gpr_avl_add(avl, box(486), box(37), NULL); + avl = gpr_avl_add(avl, box(809), box(38), NULL); + avl = gpr_avl_add(avl, box(907), box(39), NULL); + avl = gpr_avl_add(avl, box(971), box(40), NULL); avl = remove_int(avl, 441); avl = remove_int(avl, 498); - avl = gpr_avl_add(avl, box(727), box(43)); + avl = gpr_avl_add(avl, box(727), box(43), NULL); avl = remove_int(avl, 679); avl = remove_int(avl, 740); avl = remove_int(avl, 532); - avl = gpr_avl_add(avl, box(805), box(47)); + avl = gpr_avl_add(avl, box(805), box(47), NULL); avl = remove_int(avl, 64); - avl = gpr_avl_add(avl, box(362), box(49)); - avl = gpr_avl_add(avl, box(170), box(50)); - avl = gpr_avl_add(avl, box(389), box(51)); - avl = gpr_avl_add(avl, box(689), box(52)); + avl = gpr_avl_add(avl, box(362), box(49), NULL); + avl = gpr_avl_add(avl, box(170), box(50), NULL); + avl = gpr_avl_add(avl, box(389), box(51), NULL); + avl = gpr_avl_add(avl, box(689), box(52), NULL); avl = remove_int(avl, 871); - avl = gpr_avl_add(avl, box(447), box(54)); + avl = gpr_avl_add(avl, box(447), box(54), NULL); avl = remove_int(avl, 718); - avl = gpr_avl_add(avl, box(724), box(56)); + avl = gpr_avl_add(avl, box(724), box(56), NULL); avl = remove_int(avl, 215); - avl = gpr_avl_add(avl, box(550), box(58)); + avl = gpr_avl_add(avl, box(550), box(58), NULL); avl = remove_int(avl, 932); - avl = gpr_avl_add(avl, box(47), box(60)); + avl = gpr_avl_add(avl, box(47), box(60), NULL); avl = remove_int(avl, 46); avl = remove_int(avl, 229); - avl = gpr_avl_add(avl, box(68), box(63)); - avl = gpr_avl_add(avl, box(387), box(64)); + avl = gpr_avl_add(avl, box(68), box(63), NULL); + avl = gpr_avl_add(avl, box(387), box(64), NULL); avl = remove_int(avl, 933); avl = remove_int(avl, 736); avl = remove_int(avl, 719); - avl = gpr_avl_add(avl, box(150), box(68)); + avl = gpr_avl_add(avl, box(150), box(68), NULL); avl = remove_int(avl, 875); avl = remove_int(avl, 298); - avl = gpr_avl_add(avl, box(991), box(71)); + avl = gpr_avl_add(avl, box(991), box(71), NULL); avl = remove_int(avl, 705); - avl = gpr_avl_add(avl, box(197), box(73)); - avl = gpr_avl_add(avl, box(101), box(74)); + avl = gpr_avl_add(avl, box(197), box(73), NULL); + avl = gpr_avl_add(avl, box(101), box(74), NULL); avl = remove_int(avl, 436); - avl = gpr_avl_add(avl, box(755), box(76)); - avl = gpr_avl_add(avl, box(727), box(77)); + avl = gpr_avl_add(avl, box(755), box(76), NULL); + avl = gpr_avl_add(avl, box(727), box(77), NULL); avl = remove_int(avl, 309); avl = remove_int(avl, 253); - avl = gpr_avl_add(avl, box(203), box(80)); + avl = gpr_avl_add(avl, box(203), box(80), NULL); avl = remove_int(avl, 231); - avl = gpr_avl_add(avl, box(461), box(82)); + avl = gpr_avl_add(avl, box(461), box(82), NULL); avl = remove_int(avl, 316); avl = remove_int(avl, 493); - avl = gpr_avl_add(avl, box(184), box(85)); + avl = gpr_avl_add(avl, box(184), box(85), NULL); avl = remove_int(avl, 737); - avl = gpr_avl_add(avl, box(790), box(87)); - avl = gpr_avl_add(avl, box(335), box(88)); + avl = gpr_avl_add(avl, box(790), box(87), NULL); + avl = gpr_avl_add(avl, box(335), box(88), NULL); avl = remove_int(avl, 649); - avl = gpr_avl_add(avl, box(69), box(90)); + avl = gpr_avl_add(avl, box(69), box(90), NULL); avl = remove_int(avl, 585); avl = remove_int(avl, 543); - avl = gpr_avl_add(avl, box(784), box(93)); - avl = gpr_avl_add(avl, box(60), box(94)); - avl = gpr_avl_add(avl, box(525), box(95)); - avl = gpr_avl_add(avl, box(177), box(96)); - avl = gpr_avl_add(avl, box(178), box(97)); - avl = gpr_avl_add(avl, box(683), box(98)); - avl = gpr_avl_add(avl, box(226), box(99)); - avl = gpr_avl_add(avl, box(662), box(100)); + avl = gpr_avl_add(avl, box(784), box(93), NULL); + avl = gpr_avl_add(avl, box(60), box(94), NULL); + avl = gpr_avl_add(avl, box(525), box(95), NULL); + avl = gpr_avl_add(avl, box(177), box(96), NULL); + avl = gpr_avl_add(avl, box(178), box(97), NULL); + avl = gpr_avl_add(avl, box(683), box(98), NULL); + avl = gpr_avl_add(avl, box(226), box(99), NULL); + avl = gpr_avl_add(avl, box(662), box(100), NULL); avl = remove_int(avl, 944); - avl = gpr_avl_add(avl, box(562), box(102)); - avl = gpr_avl_add(avl, box(793), box(103)); + avl = gpr_avl_add(avl, box(562), box(102), NULL); + avl = gpr_avl_add(avl, box(793), box(103), NULL); avl = remove_int(avl, 673); - avl = gpr_avl_add(avl, box(310), box(105)); + avl = gpr_avl_add(avl, box(310), box(105), NULL); avl = remove_int(avl, 479); avl = remove_int(avl, 543); avl = remove_int(avl, 159); avl = remove_int(avl, 850); - avl = gpr_avl_add(avl, box(318), box(110)); - avl = gpr_avl_add(avl, box(483), box(111)); - avl = gpr_avl_add(avl, box(84), box(112)); + avl = gpr_avl_add(avl, box(318), box(110), NULL); + avl = gpr_avl_add(avl, box(483), box(111), NULL); + avl = gpr_avl_add(avl, box(84), box(112), NULL); avl = remove_int(avl, 109); - avl = gpr_avl_add(avl, box(132), box(114)); - avl = gpr_avl_add(avl, box(920), box(115)); + avl = gpr_avl_add(avl, box(132), box(114), NULL); + avl = gpr_avl_add(avl, box(920), box(115), NULL); avl = remove_int(avl, 746); - avl = gpr_avl_add(avl, box(145), box(117)); - avl = gpr_avl_add(avl, box(526), box(118)); + avl = gpr_avl_add(avl, box(145), box(117), NULL); + avl = gpr_avl_add(avl, box(526), box(118), NULL); avl = remove_int(avl, 158); - avl = gpr_avl_add(avl, box(332), box(120)); - avl = gpr_avl_add(avl, box(918), box(121)); + avl = gpr_avl_add(avl, box(332), box(120), NULL); + avl = gpr_avl_add(avl, box(918), box(121), NULL); avl = remove_int(avl, 339); - avl = gpr_avl_add(avl, box(809), box(123)); - avl = gpr_avl_add(avl, box(742), box(124)); - avl = gpr_avl_add(avl, box(718), box(125)); + avl = gpr_avl_add(avl, box(809), box(123), NULL); + avl = gpr_avl_add(avl, box(742), box(124), NULL); + avl = gpr_avl_add(avl, box(718), box(125), NULL); avl = remove_int(avl, 988); avl = remove_int(avl, 531); avl = remove_int(avl, 840); - avl = gpr_avl_add(avl, box(816), box(129)); - avl = gpr_avl_add(avl, box(976), box(130)); + avl = gpr_avl_add(avl, box(816), box(129), NULL); + avl = gpr_avl_add(avl, box(976), box(130), NULL); avl = remove_int(avl, 743); avl = remove_int(avl, 528); avl = remove_int(avl, 982); - avl = gpr_avl_add(avl, box(803), box(134)); - avl = gpr_avl_add(avl, box(205), box(135)); - avl = gpr_avl_add(avl, box(584), box(136)); + avl = gpr_avl_add(avl, box(803), box(134), NULL); + avl = gpr_avl_add(avl, box(205), box(135), NULL); + avl = gpr_avl_add(avl, box(584), box(136), NULL); avl = remove_int(avl, 923); avl = remove_int(avl, 538); avl = remove_int(avl, 398); avl = remove_int(avl, 320); avl = remove_int(avl, 292); - avl = gpr_avl_add(avl, box(270), box(142)); - avl = gpr_avl_add(avl, box(333), box(143)); + avl = gpr_avl_add(avl, box(270), box(142), NULL); + avl = gpr_avl_add(avl, box(333), box(143), NULL); avl = remove_int(avl, 439); - avl = gpr_avl_add(avl, box(35), box(145)); - avl = gpr_avl_add(avl, box(837), box(146)); + avl = gpr_avl_add(avl, box(35), box(145), NULL); + avl = gpr_avl_add(avl, box(837), box(146), NULL); avl = remove_int(avl, 65); avl = remove_int(avl, 642); avl = remove_int(avl, 371); avl = remove_int(avl, 140); avl = remove_int(avl, 533); avl = remove_int(avl, 676); - avl = gpr_avl_add(avl, box(624), box(153)); - avl = gpr_avl_add(avl, box(116), box(154)); - avl = gpr_avl_add(avl, box(446), box(155)); + avl = gpr_avl_add(avl, box(624), box(153), NULL); + avl = gpr_avl_add(avl, box(116), box(154), NULL); + avl = gpr_avl_add(avl, box(446), box(155), NULL); avl = remove_int(avl, 91); avl = remove_int(avl, 721); avl = remove_int(avl, 537); - avl = gpr_avl_add(avl, box(448), box(159)); + avl = gpr_avl_add(avl, box(448), box(159), NULL); avl = remove_int(avl, 155); avl = remove_int(avl, 344); avl = remove_int(avl, 237); - avl = gpr_avl_add(avl, box(309), box(163)); - avl = gpr_avl_add(avl, box(434), box(164)); - avl = gpr_avl_add(avl, box(277), box(165)); + avl = gpr_avl_add(avl, box(309), box(163), NULL); + avl = gpr_avl_add(avl, box(434), box(164), NULL); + avl = gpr_avl_add(avl, box(277), box(165), NULL); avl = remove_int(avl, 233); - avl = gpr_avl_add(avl, box(275), box(167)); - avl = gpr_avl_add(avl, box(218), box(168)); - avl = gpr_avl_add(avl, box(76), box(169)); - avl = gpr_avl_add(avl, box(898), box(170)); + avl = gpr_avl_add(avl, box(275), box(167), NULL); + avl = gpr_avl_add(avl, box(218), box(168), NULL); + avl = gpr_avl_add(avl, box(76), box(169), NULL); + avl = gpr_avl_add(avl, box(898), box(170), NULL); avl = remove_int(avl, 771); - avl = gpr_avl_add(avl, box(237), box(172)); + avl = gpr_avl_add(avl, box(237), box(172), NULL); avl = remove_int(avl, 327); - avl = gpr_avl_add(avl, box(499), box(174)); + avl = gpr_avl_add(avl, box(499), box(174), NULL); avl = remove_int(avl, 727); avl = remove_int(avl, 234); avl = remove_int(avl, 623); avl = remove_int(avl, 458); avl = remove_int(avl, 326); avl = remove_int(avl, 589); - avl = gpr_avl_add(avl, box(442), box(181)); + avl = gpr_avl_add(avl, box(442), box(181), NULL); avl = remove_int(avl, 389); - avl = gpr_avl_add(avl, box(708), box(183)); - avl = gpr_avl_add(avl, box(594), box(184)); - avl = gpr_avl_add(avl, box(942), box(185)); - avl = gpr_avl_add(avl, box(282), box(186)); + avl = gpr_avl_add(avl, box(708), box(183), NULL); + avl = gpr_avl_add(avl, box(594), box(184), NULL); + avl = gpr_avl_add(avl, box(942), box(185), NULL); + avl = gpr_avl_add(avl, box(282), box(186), NULL); avl = remove_int(avl, 434); avl = remove_int(avl, 134); avl = remove_int(avl, 270); @@ -1332,125 +1334,125 @@ static void test_badcase3(void) { avl = remove_int(avl, 193); avl = remove_int(avl, 797); avl = remove_int(avl, 347); - avl = gpr_avl_add(avl, box(99), box(196)); - avl = gpr_avl_add(avl, box(161), box(197)); + avl = gpr_avl_add(avl, box(99), box(196), NULL); + avl = gpr_avl_add(avl, box(161), box(197), NULL); avl = remove_int(avl, 484); - avl = gpr_avl_add(avl, box(72), box(199)); + avl = gpr_avl_add(avl, box(72), box(199), NULL); avl = remove_int(avl, 629); - avl = gpr_avl_add(avl, box(522), box(201)); + avl = gpr_avl_add(avl, box(522), box(201), NULL); avl = remove_int(avl, 679); - avl = gpr_avl_add(avl, box(407), box(203)); + avl = gpr_avl_add(avl, box(407), box(203), NULL); avl = remove_int(avl, 693); - avl = gpr_avl_add(avl, box(424), box(205)); - avl = gpr_avl_add(avl, box(651), box(206)); - avl = gpr_avl_add(avl, box(927), box(207)); + avl = gpr_avl_add(avl, box(424), box(205), NULL); + avl = gpr_avl_add(avl, box(651), box(206), NULL); + avl = gpr_avl_add(avl, box(927), box(207), NULL); avl = remove_int(avl, 553); - avl = gpr_avl_add(avl, box(128), box(209)); - avl = gpr_avl_add(avl, box(616), box(210)); - avl = gpr_avl_add(avl, box(690), box(211)); + avl = gpr_avl_add(avl, box(128), box(209), NULL); + avl = gpr_avl_add(avl, box(616), box(210), NULL); + avl = gpr_avl_add(avl, box(690), box(211), NULL); avl = remove_int(avl, 241); avl = remove_int(avl, 179); - avl = gpr_avl_add(avl, box(697), box(214)); + avl = gpr_avl_add(avl, box(697), box(214), NULL); avl = remove_int(avl, 779); - avl = gpr_avl_add(avl, box(241), box(216)); + avl = gpr_avl_add(avl, box(241), box(216), NULL); avl = remove_int(avl, 190); avl = remove_int(avl, 210); - avl = gpr_avl_add(avl, box(711), box(219)); + avl = gpr_avl_add(avl, box(711), box(219), NULL); avl = remove_int(avl, 251); avl = remove_int(avl, 61); - avl = gpr_avl_add(avl, box(800), box(222)); + avl = gpr_avl_add(avl, box(800), box(222), NULL); avl = remove_int(avl, 551); - avl = gpr_avl_add(avl, box(61), box(224)); - avl = gpr_avl_add(avl, box(656), box(225)); + avl = gpr_avl_add(avl, box(61), box(224), NULL); + avl = gpr_avl_add(avl, box(656), box(225), NULL); avl = remove_int(avl, 130); avl = remove_int(avl, 368); avl = remove_int(avl, 150); avl = remove_int(avl, 73); - avl = gpr_avl_add(avl, box(799), box(230)); - avl = gpr_avl_add(avl, box(125), box(231)); + avl = gpr_avl_add(avl, box(799), box(230), NULL); + avl = gpr_avl_add(avl, box(125), box(231), NULL); avl = remove_int(avl, 107); - avl = gpr_avl_add(avl, box(938), box(233)); - avl = gpr_avl_add(avl, box(914), box(234)); - avl = gpr_avl_add(avl, box(197), box(235)); + avl = gpr_avl_add(avl, box(938), box(233), NULL); + avl = gpr_avl_add(avl, box(914), box(234), NULL); + avl = gpr_avl_add(avl, box(197), box(235), NULL); avl = remove_int(avl, 736); - avl = gpr_avl_add(avl, box(20), box(237)); + avl = gpr_avl_add(avl, box(20), box(237), NULL); avl = remove_int(avl, 224); avl = remove_int(avl, 841); - avl = gpr_avl_add(avl, box(226), box(240)); + avl = gpr_avl_add(avl, box(226), box(240), NULL); avl = remove_int(avl, 963); avl = remove_int(avl, 796); avl = remove_int(avl, 728); - avl = gpr_avl_add(avl, box(855), box(244)); - avl = gpr_avl_add(avl, box(769), box(245)); - avl = gpr_avl_add(avl, box(631), box(246)); + avl = gpr_avl_add(avl, box(855), box(244), NULL); + avl = gpr_avl_add(avl, box(769), box(245), NULL); + avl = gpr_avl_add(avl, box(631), box(246), NULL); avl = remove_int(avl, 648); - avl = gpr_avl_add(avl, box(187), box(248)); - avl = gpr_avl_add(avl, box(31), box(249)); + avl = gpr_avl_add(avl, box(187), box(248), NULL); + avl = gpr_avl_add(avl, box(31), box(249), NULL); avl = remove_int(avl, 163); - avl = gpr_avl_add(avl, box(218), box(251)); - avl = gpr_avl_add(avl, box(488), box(252)); - avl = gpr_avl_add(avl, box(387), box(253)); - avl = gpr_avl_add(avl, box(809), box(254)); - avl = gpr_avl_add(avl, box(997), box(255)); + avl = gpr_avl_add(avl, box(218), box(251), NULL); + avl = gpr_avl_add(avl, box(488), box(252), NULL); + avl = gpr_avl_add(avl, box(387), box(253), NULL); + avl = gpr_avl_add(avl, box(809), box(254), NULL); + avl = gpr_avl_add(avl, box(997), box(255), NULL); avl = remove_int(avl, 678); - avl = gpr_avl_add(avl, box(368), box(257)); - avl = gpr_avl_add(avl, box(220), box(258)); - avl = gpr_avl_add(avl, box(373), box(259)); + avl = gpr_avl_add(avl, box(368), box(257), NULL); + avl = gpr_avl_add(avl, box(220), box(258), NULL); + avl = gpr_avl_add(avl, box(373), box(259), NULL); avl = remove_int(avl, 874); avl = remove_int(avl, 682); avl = remove_int(avl, 1014); avl = remove_int(avl, 195); - avl = gpr_avl_add(avl, box(868), box(264)); + avl = gpr_avl_add(avl, box(868), box(264), NULL); avl = remove_int(avl, 254); avl = remove_int(avl, 456); - avl = gpr_avl_add(avl, box(906), box(267)); + avl = gpr_avl_add(avl, box(906), box(267), NULL); avl = remove_int(avl, 711); - avl = gpr_avl_add(avl, box(632), box(269)); + avl = gpr_avl_add(avl, box(632), box(269), NULL); avl = remove_int(avl, 474); - avl = gpr_avl_add(avl, box(508), box(271)); - avl = gpr_avl_add(avl, box(518), box(272)); + avl = gpr_avl_add(avl, box(508), box(271), NULL); + avl = gpr_avl_add(avl, box(518), box(272), NULL); avl = remove_int(avl, 579); avl = remove_int(avl, 948); - avl = gpr_avl_add(avl, box(789), box(275)); - avl = gpr_avl_add(avl, box(48), box(276)); - avl = gpr_avl_add(avl, box(256), box(277)); - avl = gpr_avl_add(avl, box(754), box(278)); + avl = gpr_avl_add(avl, box(789), box(275), NULL); + avl = gpr_avl_add(avl, box(48), box(276), NULL); + avl = gpr_avl_add(avl, box(256), box(277), NULL); + avl = gpr_avl_add(avl, box(754), box(278), NULL); avl = remove_int(avl, 215); - avl = gpr_avl_add(avl, box(679), box(280)); - avl = gpr_avl_add(avl, box(606), box(281)); + avl = gpr_avl_add(avl, box(679), box(280), NULL); + avl = gpr_avl_add(avl, box(606), box(281), NULL); avl = remove_int(avl, 941); avl = remove_int(avl, 31); - avl = gpr_avl_add(avl, box(758), box(284)); + avl = gpr_avl_add(avl, box(758), box(284), NULL); avl = remove_int(avl, 101); - avl = gpr_avl_add(avl, box(244), box(286)); - avl = gpr_avl_add(avl, box(337), box(287)); - avl = gpr_avl_add(avl, box(461), box(288)); + avl = gpr_avl_add(avl, box(244), box(286), NULL); + avl = gpr_avl_add(avl, box(337), box(287), NULL); + avl = gpr_avl_add(avl, box(461), box(288), NULL); avl = remove_int(avl, 476); - avl = gpr_avl_add(avl, box(845), box(290)); + avl = gpr_avl_add(avl, box(845), box(290), NULL); avl = remove_int(avl, 160); - avl = gpr_avl_add(avl, box(690), box(292)); + avl = gpr_avl_add(avl, box(690), box(292), NULL); avl = remove_int(avl, 931); - avl = gpr_avl_add(avl, box(869), box(294)); - avl = gpr_avl_add(avl, box(1019), box(295)); + avl = gpr_avl_add(avl, box(869), box(294), NULL); + avl = gpr_avl_add(avl, box(1019), box(295), NULL); avl = remove_int(avl, 591); avl = remove_int(avl, 635); avl = remove_int(avl, 67); - avl = gpr_avl_add(avl, box(113), box(299)); + avl = gpr_avl_add(avl, box(113), box(299), NULL); avl = remove_int(avl, 305); - avl = gpr_avl_add(avl, box(10), box(301)); + avl = gpr_avl_add(avl, box(10), box(301), NULL); avl = remove_int(avl, 823); avl = remove_int(avl, 288); avl = remove_int(avl, 239); - avl = gpr_avl_add(avl, box(646), box(305)); - avl = gpr_avl_add(avl, box(1006), box(306)); - avl = gpr_avl_add(avl, box(954), box(307)); - avl = gpr_avl_add(avl, box(199), box(308)); - avl = gpr_avl_add(avl, box(69), box(309)); - avl = gpr_avl_add(avl, box(984), box(310)); + avl = gpr_avl_add(avl, box(646), box(305), NULL); + avl = gpr_avl_add(avl, box(1006), box(306), NULL); + avl = gpr_avl_add(avl, box(954), box(307), NULL); + avl = gpr_avl_add(avl, box(199), box(308), NULL); + avl = gpr_avl_add(avl, box(69), box(309), NULL); + avl = gpr_avl_add(avl, box(984), box(310), NULL); avl = remove_int(avl, 568); avl = remove_int(avl, 666); avl = remove_int(avl, 37); - avl = gpr_avl_add(avl, box(845), box(314)); + avl = gpr_avl_add(avl, box(845), box(314), NULL); avl = remove_int(avl, 535); avl = remove_int(avl, 365); avl = remove_int(avl, 676); @@ -1458,372 +1460,372 @@ static void test_badcase3(void) { avl = remove_int(avl, 425); avl = remove_int(avl, 704); avl = remove_int(avl, 168); - avl = gpr_avl_add(avl, box(853), box(322)); - avl = gpr_avl_add(avl, box(335), box(323)); - avl = gpr_avl_add(avl, box(961), box(324)); - avl = gpr_avl_add(avl, box(73), box(325)); + avl = gpr_avl_add(avl, box(853), box(322), NULL); + avl = gpr_avl_add(avl, box(335), box(323), NULL); + avl = gpr_avl_add(avl, box(961), box(324), NULL); + avl = gpr_avl_add(avl, box(73), box(325), NULL); avl = remove_int(avl, 469); - avl = gpr_avl_add(avl, box(449), box(327)); + avl = gpr_avl_add(avl, box(449), box(327), NULL); avl = remove_int(avl, 821); - avl = gpr_avl_add(avl, box(845), box(329)); + avl = gpr_avl_add(avl, box(845), box(329), NULL); avl = remove_int(avl, 637); - avl = gpr_avl_add(avl, box(769), box(331)); - avl = gpr_avl_add(avl, box(901), box(332)); + avl = gpr_avl_add(avl, box(769), box(331), NULL); + avl = gpr_avl_add(avl, box(901), box(332), NULL); avl = remove_int(avl, 142); avl = remove_int(avl, 361); avl = remove_int(avl, 876); - avl = gpr_avl_add(avl, box(614), box(336)); - avl = gpr_avl_add(avl, box(729), box(337)); + avl = gpr_avl_add(avl, box(614), box(336), NULL); + avl = gpr_avl_add(avl, box(729), box(337), NULL); avl = remove_int(avl, 120); avl = remove_int(avl, 473); avl = remove_int(avl, 445); - avl = gpr_avl_add(avl, box(978), box(341)); - avl = gpr_avl_add(avl, box(164), box(342)); - avl = gpr_avl_add(avl, box(1), box(343)); + avl = gpr_avl_add(avl, box(978), box(341), NULL); + avl = gpr_avl_add(avl, box(164), box(342), NULL); + avl = gpr_avl_add(avl, box(1), box(343), NULL); avl = remove_int(avl, 890); - avl = gpr_avl_add(avl, box(605), box(345)); - avl = gpr_avl_add(avl, box(178), box(346)); - avl = gpr_avl_add(avl, box(481), box(347)); - avl = gpr_avl_add(avl, box(772), box(348)); + avl = gpr_avl_add(avl, box(605), box(345), NULL); + avl = gpr_avl_add(avl, box(178), box(346), NULL); + avl = gpr_avl_add(avl, box(481), box(347), NULL); + avl = gpr_avl_add(avl, box(772), box(348), NULL); avl = remove_int(avl, 824); avl = remove_int(avl, 167); avl = remove_int(avl, 151); - avl = gpr_avl_add(avl, box(698), box(352)); - avl = gpr_avl_add(avl, box(202), box(353)); - avl = gpr_avl_add(avl, box(921), box(354)); - avl = gpr_avl_add(avl, box(875), box(355)); + avl = gpr_avl_add(avl, box(698), box(352), NULL); + avl = gpr_avl_add(avl, box(202), box(353), NULL); + avl = gpr_avl_add(avl, box(921), box(354), NULL); + avl = gpr_avl_add(avl, box(875), box(355), NULL); avl = remove_int(avl, 197); avl = remove_int(avl, 232); - avl = gpr_avl_add(avl, box(209), box(358)); + avl = gpr_avl_add(avl, box(209), box(358), NULL); avl = remove_int(avl, 324); avl = remove_int(avl, 56); avl = remove_int(avl, 579); avl = remove_int(avl, 255); avl = remove_int(avl, 290); - avl = gpr_avl_add(avl, box(661), box(364)); - avl = gpr_avl_add(avl, box(113), box(365)); + avl = gpr_avl_add(avl, box(661), box(364), NULL); + avl = gpr_avl_add(avl, box(113), box(365), NULL); avl = remove_int(avl, 767); - avl = gpr_avl_add(avl, box(586), box(367)); - avl = gpr_avl_add(avl, box(121), box(368)); + avl = gpr_avl_add(avl, box(586), box(367), NULL); + avl = gpr_avl_add(avl, box(121), box(368), NULL); avl = remove_int(avl, 235); avl = remove_int(avl, 439); avl = remove_int(avl, 360); - avl = gpr_avl_add(avl, box(916), box(372)); + avl = gpr_avl_add(avl, box(916), box(372), NULL); avl = remove_int(avl, 999); - avl = gpr_avl_add(avl, box(825), box(374)); - avl = gpr_avl_add(avl, box(177), box(375)); + avl = gpr_avl_add(avl, box(825), box(374), NULL); + avl = gpr_avl_add(avl, box(177), box(375), NULL); avl = remove_int(avl, 204); avl = remove_int(avl, 92); - avl = gpr_avl_add(avl, box(794), box(378)); - avl = gpr_avl_add(avl, box(463), box(379)); - avl = gpr_avl_add(avl, box(472), box(380)); + avl = gpr_avl_add(avl, box(794), box(378), NULL); + avl = gpr_avl_add(avl, box(463), box(379), NULL); + avl = gpr_avl_add(avl, box(472), box(380), NULL); avl = remove_int(avl, 235); - avl = gpr_avl_add(avl, box(840), box(382)); + avl = gpr_avl_add(avl, box(840), box(382), NULL); avl = remove_int(avl, 657); - avl = gpr_avl_add(avl, box(586), box(384)); - avl = gpr_avl_add(avl, box(979), box(385)); + avl = gpr_avl_add(avl, box(586), box(384), NULL); + avl = gpr_avl_add(avl, box(979), box(385), NULL); avl = remove_int(avl, 979); - avl = gpr_avl_add(avl, box(639), box(387)); + avl = gpr_avl_add(avl, box(639), box(387), NULL); avl = remove_int(avl, 907); avl = remove_int(avl, 973); - avl = gpr_avl_add(avl, box(913), box(390)); - avl = gpr_avl_add(avl, box(566), box(391)); - avl = gpr_avl_add(avl, box(883), box(392)); - avl = gpr_avl_add(avl, box(552), box(393)); - avl = gpr_avl_add(avl, box(16), box(394)); + avl = gpr_avl_add(avl, box(913), box(390), NULL); + avl = gpr_avl_add(avl, box(566), box(391), NULL); + avl = gpr_avl_add(avl, box(883), box(392), NULL); + avl = gpr_avl_add(avl, box(552), box(393), NULL); + avl = gpr_avl_add(avl, box(16), box(394), NULL); avl = remove_int(avl, 60); - avl = gpr_avl_add(avl, box(567), box(396)); - avl = gpr_avl_add(avl, box(705), box(397)); - avl = gpr_avl_add(avl, box(94), box(398)); + avl = gpr_avl_add(avl, box(567), box(396), NULL); + avl = gpr_avl_add(avl, box(705), box(397), NULL); + avl = gpr_avl_add(avl, box(94), box(398), NULL); avl = remove_int(avl, 321); - avl = gpr_avl_add(avl, box(207), box(400)); - avl = gpr_avl_add(avl, box(682), box(401)); - avl = gpr_avl_add(avl, box(592), box(402)); - avl = gpr_avl_add(avl, box(10), box(403)); + avl = gpr_avl_add(avl, box(207), box(400), NULL); + avl = gpr_avl_add(avl, box(682), box(401), NULL); + avl = gpr_avl_add(avl, box(592), box(402), NULL); + avl = gpr_avl_add(avl, box(10), box(403), NULL); avl = remove_int(avl, 911); avl = remove_int(avl, 161); - avl = gpr_avl_add(avl, box(86), box(406)); + avl = gpr_avl_add(avl, box(86), box(406), NULL); avl = remove_int(avl, 893); avl = remove_int(avl, 362); - avl = gpr_avl_add(avl, box(599), box(409)); + avl = gpr_avl_add(avl, box(599), box(409), NULL); avl = remove_int(avl, 413); - avl = gpr_avl_add(avl, box(867), box(411)); + avl = gpr_avl_add(avl, box(867), box(411), NULL); avl = remove_int(avl, 955); - avl = gpr_avl_add(avl, box(341), box(413)); - avl = gpr_avl_add(avl, box(887), box(414)); + avl = gpr_avl_add(avl, box(341), box(413), NULL); + avl = gpr_avl_add(avl, box(887), box(414), NULL); avl = remove_int(avl, 706); - avl = gpr_avl_add(avl, box(939), box(416)); + avl = gpr_avl_add(avl, box(939), box(416), NULL); avl = remove_int(avl, 233); avl = remove_int(avl, 662); avl = remove_int(avl, 984); avl = remove_int(avl, 203); - avl = gpr_avl_add(avl, box(326), box(421)); + avl = gpr_avl_add(avl, box(326), box(421), NULL); avl = remove_int(avl, 848); - avl = gpr_avl_add(avl, box(235), box(423)); + avl = gpr_avl_add(avl, box(235), box(423), NULL); avl = remove_int(avl, 617); - avl = gpr_avl_add(avl, box(565), box(425)); + avl = gpr_avl_add(avl, box(565), box(425), NULL); avl = remove_int(avl, 469); - avl = gpr_avl_add(avl, box(988), box(427)); + avl = gpr_avl_add(avl, box(988), box(427), NULL); avl = remove_int(avl, 957); - avl = gpr_avl_add(avl, box(426), box(429)); + avl = gpr_avl_add(avl, box(426), box(429), NULL); avl = remove_int(avl, 967); - avl = gpr_avl_add(avl, box(890), box(431)); - avl = gpr_avl_add(avl, box(473), box(432)); + avl = gpr_avl_add(avl, box(890), box(431), NULL); + avl = gpr_avl_add(avl, box(473), box(432), NULL); avl = remove_int(avl, 367); avl = remove_int(avl, 344); avl = remove_int(avl, 660); avl = remove_int(avl, 448); avl = remove_int(avl, 837); avl = remove_int(avl, 158); - avl = gpr_avl_add(avl, box(459), box(439)); + avl = gpr_avl_add(avl, box(459), box(439), NULL); avl = remove_int(avl, 882); avl = remove_int(avl, 782); - avl = gpr_avl_add(avl, box(408), box(442)); - avl = gpr_avl_add(avl, box(728), box(443)); + avl = gpr_avl_add(avl, box(408), box(442), NULL); + avl = gpr_avl_add(avl, box(728), box(443), NULL); avl = remove_int(avl, 27); - avl = gpr_avl_add(avl, box(137), box(445)); - avl = gpr_avl_add(avl, box(239), box(446)); + avl = gpr_avl_add(avl, box(137), box(445), NULL); + avl = gpr_avl_add(avl, box(239), box(446), NULL); avl = remove_int(avl, 854); - avl = gpr_avl_add(avl, box(104), box(448)); - avl = gpr_avl_add(avl, box(823), box(449)); - avl = gpr_avl_add(avl, box(524), box(450)); - avl = gpr_avl_add(avl, box(995), box(451)); + avl = gpr_avl_add(avl, box(104), box(448), NULL); + avl = gpr_avl_add(avl, box(823), box(449), NULL); + avl = gpr_avl_add(avl, box(524), box(450), NULL); + avl = gpr_avl_add(avl, box(995), box(451), NULL); avl = remove_int(avl, 422); avl = remove_int(avl, 220); - avl = gpr_avl_add(avl, box(856), box(454)); + avl = gpr_avl_add(avl, box(856), box(454), NULL); avl = remove_int(avl, 332); - avl = gpr_avl_add(avl, box(679), box(456)); + avl = gpr_avl_add(avl, box(679), box(456), NULL); avl = remove_int(avl, 18); - avl = gpr_avl_add(avl, box(837), box(458)); + avl = gpr_avl_add(avl, box(837), box(458), NULL); avl = remove_int(avl, 405); avl = remove_int(avl, 877); avl = remove_int(avl, 835); - avl = gpr_avl_add(avl, box(547), box(462)); + avl = gpr_avl_add(avl, box(547), box(462), NULL); avl = remove_int(avl, 805); avl = remove_int(avl, 862); - avl = gpr_avl_add(avl, box(75), box(465)); + avl = gpr_avl_add(avl, box(75), box(465), NULL); avl = remove_int(avl, 41); - avl = gpr_avl_add(avl, box(310), box(467)); + avl = gpr_avl_add(avl, box(310), box(467), NULL); avl = remove_int(avl, 855); - avl = gpr_avl_add(avl, box(20), box(469)); + avl = gpr_avl_add(avl, box(20), box(469), NULL); avl = remove_int(avl, 186); avl = remove_int(avl, 378); avl = remove_int(avl, 442); avl = remove_int(avl, 930); - avl = gpr_avl_add(avl, box(118), box(474)); - avl = gpr_avl_add(avl, box(96), box(475)); + avl = gpr_avl_add(avl, box(118), box(474), NULL); + avl = gpr_avl_add(avl, box(96), box(475), NULL); avl = remove_int(avl, 854); - avl = gpr_avl_add(avl, box(65), box(477)); - avl = gpr_avl_add(avl, box(573), box(478)); - avl = gpr_avl_add(avl, box(4), box(479)); - avl = gpr_avl_add(avl, box(451), box(480)); - avl = gpr_avl_add(avl, box(774), box(481)); - avl = gpr_avl_add(avl, box(126), box(482)); + avl = gpr_avl_add(avl, box(65), box(477), NULL); + avl = gpr_avl_add(avl, box(573), box(478), NULL); + avl = gpr_avl_add(avl, box(4), box(479), NULL); + avl = gpr_avl_add(avl, box(451), box(480), NULL); + avl = gpr_avl_add(avl, box(774), box(481), NULL); + avl = gpr_avl_add(avl, box(126), box(482), NULL); avl = remove_int(avl, 956); avl = remove_int(avl, 591); avl = remove_int(avl, 644); - avl = gpr_avl_add(avl, box(304), box(486)); + avl = gpr_avl_add(avl, box(304), box(486), NULL); avl = remove_int(avl, 620); avl = remove_int(avl, 394); - avl = gpr_avl_add(avl, box(1002), box(489)); - avl = gpr_avl_add(avl, box(837), box(490)); + avl = gpr_avl_add(avl, box(1002), box(489), NULL); + avl = gpr_avl_add(avl, box(837), box(490), NULL); avl = remove_int(avl, 485); - avl = gpr_avl_add(avl, box(1005), box(492)); + avl = gpr_avl_add(avl, box(1005), box(492), NULL); avl = remove_int(avl, 21); - avl = gpr_avl_add(avl, box(396), box(494)); + avl = gpr_avl_add(avl, box(396), box(494), NULL); avl = remove_int(avl, 966); - avl = gpr_avl_add(avl, box(105), box(496)); - avl = gpr_avl_add(avl, box(316), box(497)); + avl = gpr_avl_add(avl, box(105), box(496), NULL); + avl = gpr_avl_add(avl, box(316), box(497), NULL); avl = remove_int(avl, 776); - avl = gpr_avl_add(avl, box(188), box(499)); + avl = gpr_avl_add(avl, box(188), box(499), NULL); avl = remove_int(avl, 200); - avl = gpr_avl_add(avl, box(98), box(501)); - avl = gpr_avl_add(avl, box(831), box(502)); - avl = gpr_avl_add(avl, box(227), box(503)); - avl = gpr_avl_add(avl, box(220), box(504)); + avl = gpr_avl_add(avl, box(98), box(501), NULL); + avl = gpr_avl_add(avl, box(831), box(502), NULL); + avl = gpr_avl_add(avl, box(227), box(503), NULL); + avl = gpr_avl_add(avl, box(220), box(504), NULL); avl = remove_int(avl, 715); avl = remove_int(avl, 279); - avl = gpr_avl_add(avl, box(701), box(507)); - avl = gpr_avl_add(avl, box(726), box(508)); - avl = gpr_avl_add(avl, box(815), box(509)); - avl = gpr_avl_add(avl, box(749), box(510)); + avl = gpr_avl_add(avl, box(701), box(507), NULL); + avl = gpr_avl_add(avl, box(726), box(508), NULL); + avl = gpr_avl_add(avl, box(815), box(509), NULL); + avl = gpr_avl_add(avl, box(749), box(510), NULL); avl = remove_int(avl, 946); avl = remove_int(avl, 449); avl = remove_int(avl, 62); avl = remove_int(avl, 487); - avl = gpr_avl_add(avl, box(545), box(515)); + avl = gpr_avl_add(avl, box(545), box(515), NULL); avl = remove_int(avl, 59); - avl = gpr_avl_add(avl, box(168), box(517)); + avl = gpr_avl_add(avl, box(168), box(517), NULL); avl = remove_int(avl, 337); - avl = gpr_avl_add(avl, box(69), box(519)); + avl = gpr_avl_add(avl, box(69), box(519), NULL); avl = remove_int(avl, 600); - avl = gpr_avl_add(avl, box(591), box(521)); - avl = gpr_avl_add(avl, box(960), box(522)); - avl = gpr_avl_add(avl, box(116), box(523)); + avl = gpr_avl_add(avl, box(591), box(521), NULL); + avl = gpr_avl_add(avl, box(960), box(522), NULL); + avl = gpr_avl_add(avl, box(116), box(523), NULL); avl = remove_int(avl, 991); - avl = gpr_avl_add(avl, box(760), box(525)); - avl = gpr_avl_add(avl, box(664), box(526)); - avl = gpr_avl_add(avl, box(547), box(527)); + avl = gpr_avl_add(avl, box(760), box(525), NULL); + avl = gpr_avl_add(avl, box(664), box(526), NULL); + avl = gpr_avl_add(avl, box(547), box(527), NULL); avl = remove_int(avl, 922); - avl = gpr_avl_add(avl, box(290), box(529)); - avl = gpr_avl_add(avl, box(859), box(530)); - avl = gpr_avl_add(avl, box(49), box(531)); + avl = gpr_avl_add(avl, box(290), box(529), NULL); + avl = gpr_avl_add(avl, box(859), box(530), NULL); + avl = gpr_avl_add(avl, box(49), box(531), NULL); avl = remove_int(avl, 455); avl = remove_int(avl, 786); - avl = gpr_avl_add(avl, box(613), box(534)); - avl = gpr_avl_add(avl, box(326), box(535)); + avl = gpr_avl_add(avl, box(613), box(534), NULL); + avl = gpr_avl_add(avl, box(326), box(535), NULL); avl = remove_int(avl, 615); - avl = gpr_avl_add(avl, box(45), box(537)); - avl = gpr_avl_add(avl, box(162), box(538)); - avl = gpr_avl_add(avl, box(189), box(539)); + avl = gpr_avl_add(avl, box(45), box(537), NULL); + avl = gpr_avl_add(avl, box(162), box(538), NULL); + avl = gpr_avl_add(avl, box(189), box(539), NULL); avl = remove_int(avl, 68); avl = remove_int(avl, 846); - avl = gpr_avl_add(avl, box(608), box(542)); + avl = gpr_avl_add(avl, box(608), box(542), NULL); avl = remove_int(avl, 821); - avl = gpr_avl_add(avl, box(978), box(544)); - avl = gpr_avl_add(avl, box(892), box(545)); + avl = gpr_avl_add(avl, box(978), box(544), NULL); + avl = gpr_avl_add(avl, box(892), box(545), NULL); avl = remove_int(avl, 924); - avl = gpr_avl_add(avl, box(708), box(547)); + avl = gpr_avl_add(avl, box(708), box(547), NULL); avl = remove_int(avl, 135); avl = remove_int(avl, 124); - avl = gpr_avl_add(avl, box(301), box(550)); - avl = gpr_avl_add(avl, box(939), box(551)); - avl = gpr_avl_add(avl, box(344), box(552)); + avl = gpr_avl_add(avl, box(301), box(550), NULL); + avl = gpr_avl_add(avl, box(939), box(551), NULL); + avl = gpr_avl_add(avl, box(344), box(552), NULL); avl = remove_int(avl, 443); avl = remove_int(avl, 122); - avl = gpr_avl_add(avl, box(636), box(555)); + avl = gpr_avl_add(avl, box(636), box(555), NULL); avl = remove_int(avl, 558); - avl = gpr_avl_add(avl, box(923), box(557)); + avl = gpr_avl_add(avl, box(923), box(557), NULL); avl = remove_int(avl, 827); - avl = gpr_avl_add(avl, box(649), box(559)); - avl = gpr_avl_add(avl, box(808), box(560)); + avl = gpr_avl_add(avl, box(649), box(559), NULL); + avl = gpr_avl_add(avl, box(808), box(560), NULL); avl = remove_int(avl, 570); avl = remove_int(avl, 434); - avl = gpr_avl_add(avl, box(40), box(563)); - avl = gpr_avl_add(avl, box(725), box(564)); + avl = gpr_avl_add(avl, box(40), box(563), NULL); + avl = gpr_avl_add(avl, box(725), box(564), NULL); avl = remove_int(avl, 295); avl = remove_int(avl, 615); avl = remove_int(avl, 919); avl = remove_int(avl, 170); avl = remove_int(avl, 442); avl = remove_int(avl, 971); - avl = gpr_avl_add(avl, box(483), box(571)); - avl = gpr_avl_add(avl, box(512), box(572)); + avl = gpr_avl_add(avl, box(483), box(571), NULL); + avl = gpr_avl_add(avl, box(512), box(572), NULL); avl = remove_int(avl, 648); avl = remove_int(avl, 78); avl = remove_int(avl, 72); avl = remove_int(avl, 790); avl = remove_int(avl, 571); - avl = gpr_avl_add(avl, box(898), box(578)); + avl = gpr_avl_add(avl, box(898), box(578), NULL); avl = remove_int(avl, 770); avl = remove_int(avl, 776); - avl = gpr_avl_add(avl, box(602), box(581)); + avl = gpr_avl_add(avl, box(602), box(581), NULL); avl = remove_int(avl, 251); - avl = gpr_avl_add(avl, box(303), box(583)); + avl = gpr_avl_add(avl, box(303), box(583), NULL); avl = remove_int(avl, 837); - avl = gpr_avl_add(avl, box(714), box(585)); + avl = gpr_avl_add(avl, box(714), box(585), NULL); avl = remove_int(avl, 800); - avl = gpr_avl_add(avl, box(266), box(587)); - avl = gpr_avl_add(avl, box(555), box(588)); + avl = gpr_avl_add(avl, box(266), box(587), NULL); + avl = gpr_avl_add(avl, box(555), box(588), NULL); avl = remove_int(avl, 604); avl = remove_int(avl, 163); avl = remove_int(avl, 497); - avl = gpr_avl_add(avl, box(296), box(592)); + avl = gpr_avl_add(avl, box(296), box(592), NULL); avl = remove_int(avl, 129); - avl = gpr_avl_add(avl, box(656), box(594)); + avl = gpr_avl_add(avl, box(656), box(594), NULL); avl = remove_int(avl, 769); avl = remove_int(avl, 941); - avl = gpr_avl_add(avl, box(775), box(597)); - avl = gpr_avl_add(avl, box(846), box(598)); + avl = gpr_avl_add(avl, box(775), box(597), NULL); + avl = gpr_avl_add(avl, box(846), box(598), NULL); avl = remove_int(avl, 591); avl = remove_int(avl, 801); avl = remove_int(avl, 419); avl = remove_int(avl, 455); - avl = gpr_avl_add(avl, box(866), box(603)); - avl = gpr_avl_add(avl, box(575), box(604)); - avl = gpr_avl_add(avl, box(620), box(605)); + avl = gpr_avl_add(avl, box(866), box(603), NULL); + avl = gpr_avl_add(avl, box(575), box(604), NULL); + avl = gpr_avl_add(avl, box(620), box(605), NULL); avl = remove_int(avl, 100); avl = remove_int(avl, 667); - avl = gpr_avl_add(avl, box(138), box(608)); - avl = gpr_avl_add(avl, box(566), box(609)); - avl = gpr_avl_add(avl, box(673), box(610)); - avl = gpr_avl_add(avl, box(178), box(611)); + avl = gpr_avl_add(avl, box(138), box(608), NULL); + avl = gpr_avl_add(avl, box(566), box(609), NULL); + avl = gpr_avl_add(avl, box(673), box(610), NULL); + avl = gpr_avl_add(avl, box(178), box(611), NULL); avl = remove_int(avl, 659); - avl = gpr_avl_add(avl, box(759), box(613)); - avl = gpr_avl_add(avl, box(1008), box(614)); + avl = gpr_avl_add(avl, box(759), box(613), NULL); + avl = gpr_avl_add(avl, box(1008), box(614), NULL); avl = remove_int(avl, 116); - avl = gpr_avl_add(avl, box(608), box(616)); - avl = gpr_avl_add(avl, box(339), box(617)); - avl = gpr_avl_add(avl, box(197), box(618)); + avl = gpr_avl_add(avl, box(608), box(616), NULL); + avl = gpr_avl_add(avl, box(339), box(617), NULL); + avl = gpr_avl_add(avl, box(197), box(618), NULL); avl = remove_int(avl, 25); avl = remove_int(avl, 628); - avl = gpr_avl_add(avl, box(487), box(621)); + avl = gpr_avl_add(avl, box(487), box(621), NULL); avl = remove_int(avl, 739); avl = remove_int(avl, 100); avl = remove_int(avl, 928); - avl = gpr_avl_add(avl, box(647), box(625)); + avl = gpr_avl_add(avl, box(647), box(625), NULL); avl = remove_int(avl, 978); avl = remove_int(avl, 143); avl = remove_int(avl, 755); - avl = gpr_avl_add(avl, box(71), box(629)); + avl = gpr_avl_add(avl, box(71), box(629), NULL); avl = remove_int(avl, 205); - avl = gpr_avl_add(avl, box(501), box(631)); + avl = gpr_avl_add(avl, box(501), box(631), NULL); avl = remove_int(avl, 723); avl = remove_int(avl, 852); avl = remove_int(avl, 1021); avl = remove_int(avl, 670); avl = remove_int(avl, 500); - avl = gpr_avl_add(avl, box(330), box(637)); + avl = gpr_avl_add(avl, box(330), box(637), NULL); avl = remove_int(avl, 264); - avl = gpr_avl_add(avl, box(69), box(639)); + avl = gpr_avl_add(avl, box(69), box(639), NULL); avl = remove_int(avl, 73); - avl = gpr_avl_add(avl, box(745), box(641)); + avl = gpr_avl_add(avl, box(745), box(641), NULL); avl = remove_int(avl, 518); avl = remove_int(avl, 641); avl = remove_int(avl, 768); - avl = gpr_avl_add(avl, box(988), box(645)); - avl = gpr_avl_add(avl, box(899), box(646)); + avl = gpr_avl_add(avl, box(988), box(645), NULL); + avl = gpr_avl_add(avl, box(899), box(646), NULL); avl = remove_int(avl, 763); avl = remove_int(avl, 281); avl = remove_int(avl, 496); - avl = gpr_avl_add(avl, box(445), box(650)); + avl = gpr_avl_add(avl, box(445), box(650), NULL); avl = remove_int(avl, 905); - avl = gpr_avl_add(avl, box(275), box(652)); - avl = gpr_avl_add(avl, box(137), box(653)); + avl = gpr_avl_add(avl, box(275), box(652), NULL); + avl = gpr_avl_add(avl, box(137), box(653), NULL); avl = remove_int(avl, 642); - avl = gpr_avl_add(avl, box(708), box(655)); + avl = gpr_avl_add(avl, box(708), box(655), NULL); avl = remove_int(avl, 922); - avl = gpr_avl_add(avl, box(743), box(657)); + avl = gpr_avl_add(avl, box(743), box(657), NULL); avl = remove_int(avl, 295); avl = remove_int(avl, 665); avl = remove_int(avl, 48); - avl = gpr_avl_add(avl, box(1012), box(661)); + avl = gpr_avl_add(avl, box(1012), box(661), NULL); avl = remove_int(avl, 71); avl = remove_int(avl, 523); - avl = gpr_avl_add(avl, box(319), box(664)); + avl = gpr_avl_add(avl, box(319), box(664), NULL); avl = remove_int(avl, 632); - avl = gpr_avl_add(avl, box(137), box(666)); - avl = gpr_avl_add(avl, box(686), box(667)); - avl = gpr_avl_add(avl, box(724), box(668)); - avl = gpr_avl_add(avl, box(952), box(669)); - avl = gpr_avl_add(avl, box(5), box(670)); + avl = gpr_avl_add(avl, box(137), box(666), NULL); + avl = gpr_avl_add(avl, box(686), box(667), NULL); + avl = gpr_avl_add(avl, box(724), box(668), NULL); + avl = gpr_avl_add(avl, box(952), box(669), NULL); + avl = gpr_avl_add(avl, box(5), box(670), NULL); avl = remove_int(avl, 35); - avl = gpr_avl_add(avl, box(43), box(672)); - avl = gpr_avl_add(avl, box(320), box(673)); - avl = gpr_avl_add(avl, box(115), box(674)); + avl = gpr_avl_add(avl, box(43), box(672), NULL); + avl = gpr_avl_add(avl, box(320), box(673), NULL); + avl = gpr_avl_add(avl, box(115), box(674), NULL); avl = remove_int(avl, 377); avl = remove_int(avl, 591); avl = remove_int(avl, 87); avl = remove_int(avl, 93); - avl = gpr_avl_add(avl, box(1016), box(679)); - avl = gpr_avl_add(avl, box(605), box(680)); - avl = gpr_avl_add(avl, box(152), box(681)); - avl = gpr_avl_add(avl, box(113), box(682)); + avl = gpr_avl_add(avl, box(1016), box(679), NULL); + avl = gpr_avl_add(avl, box(605), box(680), NULL); + avl = gpr_avl_add(avl, box(152), box(681), NULL); + avl = gpr_avl_add(avl, box(113), box(682), NULL); avl = remove_int(avl, 131); avl = remove_int(avl, 637); - avl = gpr_avl_add(avl, box(156), box(685)); + avl = gpr_avl_add(avl, box(156), box(685), NULL); avl = remove_int(avl, 696); - avl = gpr_avl_add(avl, box(546), box(687)); + avl = gpr_avl_add(avl, box(546), box(687), NULL); avl = remove_int(avl, 970); avl = remove_int(avl, 53); avl = remove_int(avl, 827); @@ -1837,22 +1839,22 @@ static void test_badcase3(void) { avl = remove_int(avl, 244); avl = remove_int(avl, 576); avl = remove_int(avl, 413); - avl = gpr_avl_add(avl, box(500), box(701)); + avl = gpr_avl_add(avl, box(500), box(701), NULL); avl = remove_int(avl, 924); - avl = gpr_avl_add(avl, box(825), box(703)); + avl = gpr_avl_add(avl, box(825), box(703), NULL); avl = remove_int(avl, 888); avl = remove_int(avl, 931); - avl = gpr_avl_add(avl, box(285), box(706)); + avl = gpr_avl_add(avl, box(285), box(706), NULL); avl = remove_int(avl, 62); avl = remove_int(avl, 444); avl = remove_int(avl, 946); - avl = gpr_avl_add(avl, box(122), box(710)); - avl = gpr_avl_add(avl, box(846), box(711)); + avl = gpr_avl_add(avl, box(122), box(710), NULL); + avl = gpr_avl_add(avl, box(846), box(711), NULL); avl = remove_int(avl, 628); - avl = gpr_avl_add(avl, box(511), box(713)); - avl = gpr_avl_add(avl, box(398), box(714)); + avl = gpr_avl_add(avl, box(511), box(713), NULL); + avl = gpr_avl_add(avl, box(398), box(714), NULL); avl = remove_int(avl, 730); - avl = gpr_avl_add(avl, box(797), box(716)); + avl = gpr_avl_add(avl, box(797), box(716), NULL); avl = remove_int(avl, 897); avl = remove_int(avl, 228); avl = remove_int(avl, 544); @@ -1861,51 +1863,51 @@ static void test_badcase3(void) { avl = remove_int(avl, 583); avl = remove_int(avl, 894); avl = remove_int(avl, 942); - avl = gpr_avl_add(avl, box(346), box(725)); - avl = gpr_avl_add(avl, box(1015), box(726)); + avl = gpr_avl_add(avl, box(346), box(725), NULL); + avl = gpr_avl_add(avl, box(1015), box(726), NULL); avl = remove_int(avl, 813); - avl = gpr_avl_add(avl, box(213), box(728)); + avl = gpr_avl_add(avl, box(213), box(728), NULL); avl = remove_int(avl, 468); avl = remove_int(avl, 365); avl = remove_int(avl, 399); - avl = gpr_avl_add(avl, box(380), box(732)); + avl = gpr_avl_add(avl, box(380), box(732), NULL); avl = remove_int(avl, 835); avl = remove_int(avl, 970); - avl = gpr_avl_add(avl, box(700), box(735)); - avl = gpr_avl_add(avl, box(807), box(736)); + avl = gpr_avl_add(avl, box(700), box(735), NULL); + avl = gpr_avl_add(avl, box(807), box(736), NULL); avl = remove_int(avl, 312); avl = remove_int(avl, 282); avl = remove_int(avl, 370); avl = remove_int(avl, 999); avl = remove_int(avl, 241); avl = remove_int(avl, 884); - avl = gpr_avl_add(avl, box(587), box(743)); - avl = gpr_avl_add(avl, box(332), box(744)); + avl = gpr_avl_add(avl, box(587), box(743), NULL); + avl = gpr_avl_add(avl, box(332), box(744), NULL); avl = remove_int(avl, 686); avl = remove_int(avl, 206); avl = remove_int(avl, 835); - avl = gpr_avl_add(avl, box(334), box(748)); + avl = gpr_avl_add(avl, box(334), box(748), NULL); avl = remove_int(avl, 171); - avl = gpr_avl_add(avl, box(1002), box(750)); - avl = gpr_avl_add(avl, box(779), box(751)); - avl = gpr_avl_add(avl, box(307), box(752)); - avl = gpr_avl_add(avl, box(127), box(753)); - avl = gpr_avl_add(avl, box(251), box(754)); + avl = gpr_avl_add(avl, box(1002), box(750), NULL); + avl = gpr_avl_add(avl, box(779), box(751), NULL); + avl = gpr_avl_add(avl, box(307), box(752), NULL); + avl = gpr_avl_add(avl, box(127), box(753), NULL); + avl = gpr_avl_add(avl, box(251), box(754), NULL); avl = remove_int(avl, 790); avl = remove_int(avl, 189); avl = remove_int(avl, 193); avl = remove_int(avl, 38); avl = remove_int(avl, 124); - avl = gpr_avl_add(avl, box(812), box(760)); + avl = gpr_avl_add(avl, box(812), box(760), NULL); avl = remove_int(avl, 43); - avl = gpr_avl_add(avl, box(871), box(762)); - avl = gpr_avl_add(avl, box(580), box(763)); + avl = gpr_avl_add(avl, box(871), box(762), NULL); + avl = gpr_avl_add(avl, box(580), box(763), NULL); avl = remove_int(avl, 501); avl = remove_int(avl, 462); avl = remove_int(avl, 599); - avl = gpr_avl_add(avl, box(240), box(767)); - avl = gpr_avl_add(avl, box(285), box(768)); - avl = gpr_avl_add(avl, box(472), box(769)); + avl = gpr_avl_add(avl, box(240), box(767), NULL); + avl = gpr_avl_add(avl, box(285), box(768), NULL); + avl = gpr_avl_add(avl, box(472), box(769), NULL); avl = remove_int(avl, 865); avl = remove_int(avl, 763); avl = remove_int(avl, 245); @@ -1913,48 +1915,48 @@ static void test_badcase3(void) { avl = remove_int(avl, 713); avl = remove_int(avl, 654); avl = remove_int(avl, 1014); - avl = gpr_avl_add(avl, box(495), box(777)); - avl = gpr_avl_add(avl, box(552), box(778)); + avl = gpr_avl_add(avl, box(495), box(777), NULL); + avl = gpr_avl_add(avl, box(552), box(778), NULL); avl = remove_int(avl, 19); avl = remove_int(avl, 803); - avl = gpr_avl_add(avl, box(508), box(781)); + avl = gpr_avl_add(avl, box(508), box(781), NULL); avl = remove_int(avl, 699); avl = remove_int(avl, 260); avl = remove_int(avl, 92); avl = remove_int(avl, 497); - avl = gpr_avl_add(avl, box(970), box(786)); + avl = gpr_avl_add(avl, box(970), box(786), NULL); avl = remove_int(avl, 987); avl = remove_int(avl, 168); avl = remove_int(avl, 476); avl = remove_int(avl, 248); - avl = gpr_avl_add(avl, box(358), box(791)); + avl = gpr_avl_add(avl, box(358), box(791), NULL); avl = remove_int(avl, 804); avl = remove_int(avl, 77); avl = remove_int(avl, 905); avl = remove_int(avl, 362); - avl = gpr_avl_add(avl, box(578), box(796)); + avl = gpr_avl_add(avl, box(578), box(796), NULL); avl = remove_int(avl, 38); avl = remove_int(avl, 595); - avl = gpr_avl_add(avl, box(213), box(799)); + avl = gpr_avl_add(avl, box(213), box(799), NULL); avl = remove_int(avl, 7); avl = remove_int(avl, 620); - avl = gpr_avl_add(avl, box(946), box(802)); + avl = gpr_avl_add(avl, box(946), box(802), NULL); avl = remove_int(avl, 145); - avl = gpr_avl_add(avl, box(628), box(804)); + avl = gpr_avl_add(avl, box(628), box(804), NULL); avl = remove_int(avl, 972); - avl = gpr_avl_add(avl, box(728), box(806)); + avl = gpr_avl_add(avl, box(728), box(806), NULL); avl = remove_int(avl, 91); - avl = gpr_avl_add(avl, box(136), box(808)); - avl = gpr_avl_add(avl, box(841), box(809)); - avl = gpr_avl_add(avl, box(265), box(810)); - avl = gpr_avl_add(avl, box(701), box(811)); - avl = gpr_avl_add(avl, box(27), box(812)); + avl = gpr_avl_add(avl, box(136), box(808), NULL); + avl = gpr_avl_add(avl, box(841), box(809), NULL); + avl = gpr_avl_add(avl, box(265), box(810), NULL); + avl = gpr_avl_add(avl, box(701), box(811), NULL); + avl = gpr_avl_add(avl, box(27), box(812), NULL); avl = remove_int(avl, 72); avl = remove_int(avl, 14); - avl = gpr_avl_add(avl, box(286), box(815)); + avl = gpr_avl_add(avl, box(286), box(815), NULL); avl = remove_int(avl, 996); avl = remove_int(avl, 998); - avl = gpr_avl_add(avl, box(466), box(818)); + avl = gpr_avl_add(avl, box(466), box(818), NULL); avl = remove_int(avl, 1009); avl = remove_int(avl, 741); avl = remove_int(avl, 947); @@ -1963,138 +1965,138 @@ static void test_badcase3(void) { avl = remove_int(avl, 183); avl = remove_int(avl, 395); avl = remove_int(avl, 951); - avl = gpr_avl_add(avl, box(267), box(827)); + avl = gpr_avl_add(avl, box(267), box(827), NULL); avl = remove_int(avl, 812); - avl = gpr_avl_add(avl, box(577), box(829)); + avl = gpr_avl_add(avl, box(577), box(829), NULL); avl = remove_int(avl, 624); avl = remove_int(avl, 847); avl = remove_int(avl, 745); - avl = gpr_avl_add(avl, box(491), box(833)); - avl = gpr_avl_add(avl, box(941), box(834)); + avl = gpr_avl_add(avl, box(491), box(833), NULL); + avl = gpr_avl_add(avl, box(941), box(834), NULL); avl = remove_int(avl, 258); - avl = gpr_avl_add(avl, box(410), box(836)); - avl = gpr_avl_add(avl, box(80), box(837)); - avl = gpr_avl_add(avl, box(196), box(838)); - avl = gpr_avl_add(avl, box(5), box(839)); + avl = gpr_avl_add(avl, box(410), box(836), NULL); + avl = gpr_avl_add(avl, box(80), box(837), NULL); + avl = gpr_avl_add(avl, box(196), box(838), NULL); + avl = gpr_avl_add(avl, box(5), box(839), NULL); avl = remove_int(avl, 782); - avl = gpr_avl_add(avl, box(827), box(841)); + avl = gpr_avl_add(avl, box(827), box(841), NULL); avl = remove_int(avl, 472); avl = remove_int(avl, 664); - avl = gpr_avl_add(avl, box(409), box(844)); - avl = gpr_avl_add(avl, box(62), box(845)); + avl = gpr_avl_add(avl, box(409), box(844), NULL); + avl = gpr_avl_add(avl, box(62), box(845), NULL); avl = remove_int(avl, 56); avl = remove_int(avl, 606); avl = remove_int(avl, 707); avl = remove_int(avl, 989); avl = remove_int(avl, 549); avl = remove_int(avl, 259); - avl = gpr_avl_add(avl, box(405), box(852)); + avl = gpr_avl_add(avl, box(405), box(852), NULL); avl = remove_int(avl, 587); avl = remove_int(avl, 350); - avl = gpr_avl_add(avl, box(980), box(855)); - avl = gpr_avl_add(avl, box(992), box(856)); - avl = gpr_avl_add(avl, box(818), box(857)); + avl = gpr_avl_add(avl, box(980), box(855), NULL); + avl = gpr_avl_add(avl, box(992), box(856), NULL); + avl = gpr_avl_add(avl, box(818), box(857), NULL); avl = remove_int(avl, 853); avl = remove_int(avl, 701); - avl = gpr_avl_add(avl, box(675), box(860)); + avl = gpr_avl_add(avl, box(675), box(860), NULL); avl = remove_int(avl, 248); avl = remove_int(avl, 649); - avl = gpr_avl_add(avl, box(508), box(863)); + avl = gpr_avl_add(avl, box(508), box(863), NULL); avl = remove_int(avl, 927); - avl = gpr_avl_add(avl, box(957), box(865)); - avl = gpr_avl_add(avl, box(698), box(866)); - avl = gpr_avl_add(avl, box(388), box(867)); - avl = gpr_avl_add(avl, box(532), box(868)); - avl = gpr_avl_add(avl, box(681), box(869)); + avl = gpr_avl_add(avl, box(957), box(865), NULL); + avl = gpr_avl_add(avl, box(698), box(866), NULL); + avl = gpr_avl_add(avl, box(388), box(867), NULL); + avl = gpr_avl_add(avl, box(532), box(868), NULL); + avl = gpr_avl_add(avl, box(681), box(869), NULL); avl = remove_int(avl, 544); avl = remove_int(avl, 991); avl = remove_int(avl, 397); - avl = gpr_avl_add(avl, box(954), box(873)); - avl = gpr_avl_add(avl, box(219), box(874)); - avl = gpr_avl_add(avl, box(465), box(875)); + avl = gpr_avl_add(avl, box(954), box(873), NULL); + avl = gpr_avl_add(avl, box(219), box(874), NULL); + avl = gpr_avl_add(avl, box(465), box(875), NULL); avl = remove_int(avl, 371); - avl = gpr_avl_add(avl, box(601), box(877)); - avl = gpr_avl_add(avl, box(543), box(878)); + avl = gpr_avl_add(avl, box(601), box(877), NULL); + avl = gpr_avl_add(avl, box(543), box(878), NULL); avl = remove_int(avl, 329); - avl = gpr_avl_add(avl, box(560), box(880)); + avl = gpr_avl_add(avl, box(560), box(880), NULL); avl = remove_int(avl, 898); - avl = gpr_avl_add(avl, box(455), box(882)); + avl = gpr_avl_add(avl, box(455), box(882), NULL); avl = remove_int(avl, 313); - avl = gpr_avl_add(avl, box(215), box(884)); + avl = gpr_avl_add(avl, box(215), box(884), NULL); avl = remove_int(avl, 846); - avl = gpr_avl_add(avl, box(608), box(886)); + avl = gpr_avl_add(avl, box(608), box(886), NULL); avl = remove_int(avl, 248); - avl = gpr_avl_add(avl, box(575), box(888)); + avl = gpr_avl_add(avl, box(575), box(888), NULL); avl = remove_int(avl, 207); avl = remove_int(avl, 810); avl = remove_int(avl, 665); avl = remove_int(avl, 361); - avl = gpr_avl_add(avl, box(154), box(893)); - avl = gpr_avl_add(avl, box(329), box(894)); - avl = gpr_avl_add(avl, box(326), box(895)); + avl = gpr_avl_add(avl, box(154), box(893), NULL); + avl = gpr_avl_add(avl, box(329), box(894), NULL); + avl = gpr_avl_add(avl, box(326), box(895), NULL); avl = remove_int(avl, 746); avl = remove_int(avl, 99); - avl = gpr_avl_add(avl, box(464), box(898)); - avl = gpr_avl_add(avl, box(141), box(899)); + avl = gpr_avl_add(avl, box(464), box(898), NULL); + avl = gpr_avl_add(avl, box(141), box(899), NULL); avl = remove_int(avl, 383); - avl = gpr_avl_add(avl, box(414), box(901)); - avl = gpr_avl_add(avl, box(777), box(902)); + avl = gpr_avl_add(avl, box(414), box(901), NULL); + avl = gpr_avl_add(avl, box(777), box(902), NULL); avl = remove_int(avl, 972); avl = remove_int(avl, 841); avl = remove_int(avl, 100); - avl = gpr_avl_add(avl, box(828), box(906)); + avl = gpr_avl_add(avl, box(828), box(906), NULL); avl = remove_int(avl, 785); - avl = gpr_avl_add(avl, box(1008), box(908)); - avl = gpr_avl_add(avl, box(46), box(909)); + avl = gpr_avl_add(avl, box(1008), box(908), NULL); + avl = gpr_avl_add(avl, box(46), box(909), NULL); avl = remove_int(avl, 399); - avl = gpr_avl_add(avl, box(178), box(911)); - avl = gpr_avl_add(avl, box(573), box(912)); + avl = gpr_avl_add(avl, box(178), box(911), NULL); + avl = gpr_avl_add(avl, box(573), box(912), NULL); avl = remove_int(avl, 299); - avl = gpr_avl_add(avl, box(690), box(914)); - avl = gpr_avl_add(avl, box(692), box(915)); + avl = gpr_avl_add(avl, box(690), box(914), NULL); + avl = gpr_avl_add(avl, box(692), box(915), NULL); avl = remove_int(avl, 404); avl = remove_int(avl, 16); avl = remove_int(avl, 746); avl = remove_int(avl, 486); avl = remove_int(avl, 119); - avl = gpr_avl_add(avl, box(167), box(921)); + avl = gpr_avl_add(avl, box(167), box(921), NULL); avl = remove_int(avl, 328); - avl = gpr_avl_add(avl, box(89), box(923)); + avl = gpr_avl_add(avl, box(89), box(923), NULL); avl = remove_int(avl, 867); avl = remove_int(avl, 626); avl = remove_int(avl, 507); - avl = gpr_avl_add(avl, box(365), box(927)); - avl = gpr_avl_add(avl, box(58), box(928)); - avl = gpr_avl_add(avl, box(70), box(929)); + avl = gpr_avl_add(avl, box(365), box(927), NULL); + avl = gpr_avl_add(avl, box(58), box(928), NULL); + avl = gpr_avl_add(avl, box(70), box(929), NULL); avl = remove_int(avl, 81); avl = remove_int(avl, 797); - avl = gpr_avl_add(avl, box(846), box(932)); + avl = gpr_avl_add(avl, box(846), box(932), NULL); avl = remove_int(avl, 642); - avl = gpr_avl_add(avl, box(777), box(934)); + avl = gpr_avl_add(avl, box(777), box(934), NULL); avl = remove_int(avl, 107); - avl = gpr_avl_add(avl, box(691), box(936)); - avl = gpr_avl_add(avl, box(820), box(937)); - avl = gpr_avl_add(avl, box(202), box(938)); - avl = gpr_avl_add(avl, box(308), box(939)); - avl = gpr_avl_add(avl, box(20), box(940)); + avl = gpr_avl_add(avl, box(691), box(936), NULL); + avl = gpr_avl_add(avl, box(820), box(937), NULL); + avl = gpr_avl_add(avl, box(202), box(938), NULL); + avl = gpr_avl_add(avl, box(308), box(939), NULL); + avl = gpr_avl_add(avl, box(20), box(940), NULL); avl = remove_int(avl, 289); - avl = gpr_avl_add(avl, box(714), box(942)); - avl = gpr_avl_add(avl, box(584), box(943)); + avl = gpr_avl_add(avl, box(714), box(942), NULL); + avl = gpr_avl_add(avl, box(584), box(943), NULL); avl = remove_int(avl, 294); - avl = gpr_avl_add(avl, box(496), box(945)); - avl = gpr_avl_add(avl, box(394), box(946)); - avl = gpr_avl_add(avl, box(860), box(947)); - avl = gpr_avl_add(avl, box(58), box(948)); + avl = gpr_avl_add(avl, box(496), box(945), NULL); + avl = gpr_avl_add(avl, box(394), box(946), NULL); + avl = gpr_avl_add(avl, box(860), box(947), NULL); + avl = gpr_avl_add(avl, box(58), box(948), NULL); avl = remove_int(avl, 784); avl = remove_int(avl, 584); avl = remove_int(avl, 708); - avl = gpr_avl_add(avl, box(142), box(952)); - avl = gpr_avl_add(avl, box(247), box(953)); - avl = gpr_avl_add(avl, box(389), box(954)); + avl = gpr_avl_add(avl, box(142), box(952), NULL); + avl = gpr_avl_add(avl, box(247), box(953), NULL); + avl = gpr_avl_add(avl, box(389), box(954), NULL); avl = remove_int(avl, 390); - avl = gpr_avl_add(avl, box(465), box(956)); - avl = gpr_avl_add(avl, box(936), box(957)); - avl = gpr_avl_add(avl, box(309), box(958)); + avl = gpr_avl_add(avl, box(465), box(956), NULL); + avl = gpr_avl_add(avl, box(936), box(957), NULL); + avl = gpr_avl_add(avl, box(309), box(958), NULL); avl = remove_int(avl, 928); avl = remove_int(avl, 128); avl = remove_int(avl, 979); @@ -2102,15 +2104,15 @@ static void test_badcase3(void) { avl = remove_int(avl, 738); avl = remove_int(avl, 271); avl = remove_int(avl, 540); - avl = gpr_avl_add(avl, box(365), box(966)); + avl = gpr_avl_add(avl, box(365), box(966), NULL); avl = remove_int(avl, 82); - avl = gpr_avl_add(avl, box(728), box(968)); + avl = gpr_avl_add(avl, box(728), box(968), NULL); avl = remove_int(avl, 852); - avl = gpr_avl_add(avl, box(884), box(970)); - avl = gpr_avl_add(avl, box(502), box(971)); + avl = gpr_avl_add(avl, box(884), box(970), NULL); + avl = gpr_avl_add(avl, box(502), box(971), NULL); avl = remove_int(avl, 898); avl = remove_int(avl, 481); - avl = gpr_avl_add(avl, box(911), box(974)); + avl = gpr_avl_add(avl, box(911), box(974), NULL); avl = remove_int(avl, 787); avl = remove_int(avl, 785); avl = remove_int(avl, 537); @@ -2119,125 +2121,125 @@ static void test_badcase3(void) { avl = remove_int(avl, 749); avl = remove_int(avl, 637); avl = remove_int(avl, 900); - avl = gpr_avl_add(avl, box(598), box(983)); + avl = gpr_avl_add(avl, box(598), box(983), NULL); avl = remove_int(avl, 25); avl = remove_int(avl, 697); - avl = gpr_avl_add(avl, box(645), box(986)); - avl = gpr_avl_add(avl, box(211), box(987)); - avl = gpr_avl_add(avl, box(589), box(988)); + avl = gpr_avl_add(avl, box(645), box(986), NULL); + avl = gpr_avl_add(avl, box(211), box(987), NULL); + avl = gpr_avl_add(avl, box(589), box(988), NULL); avl = remove_int(avl, 702); - avl = gpr_avl_add(avl, box(53), box(990)); + avl = gpr_avl_add(avl, box(53), box(990), NULL); avl = remove_int(avl, 492); avl = remove_int(avl, 185); avl = remove_int(avl, 246); avl = remove_int(avl, 257); avl = remove_int(avl, 502); avl = remove_int(avl, 34); - avl = gpr_avl_add(avl, box(74), box(997)); - avl = gpr_avl_add(avl, box(834), box(998)); - avl = gpr_avl_add(avl, box(514), box(999)); - avl = gpr_avl_add(avl, box(75), box(1000)); + avl = gpr_avl_add(avl, box(74), box(997), NULL); + avl = gpr_avl_add(avl, box(834), box(998), NULL); + avl = gpr_avl_add(avl, box(514), box(999), NULL); + avl = gpr_avl_add(avl, box(75), box(1000), NULL); avl = remove_int(avl, 745); - avl = gpr_avl_add(avl, box(362), box(1002)); + avl = gpr_avl_add(avl, box(362), box(1002), NULL); avl = remove_int(avl, 215); - avl = gpr_avl_add(avl, box(624), box(1004)); + avl = gpr_avl_add(avl, box(624), box(1004), NULL); avl = remove_int(avl, 404); avl = remove_int(avl, 359); avl = remove_int(avl, 491); - avl = gpr_avl_add(avl, box(903), box(1008)); - avl = gpr_avl_add(avl, box(240), box(1009)); + avl = gpr_avl_add(avl, box(903), box(1008), NULL); + avl = gpr_avl_add(avl, box(240), box(1009), NULL); avl = remove_int(avl, 95); - avl = gpr_avl_add(avl, box(119), box(1011)); - avl = gpr_avl_add(avl, box(857), box(1012)); + avl = gpr_avl_add(avl, box(119), box(1011), NULL); + avl = gpr_avl_add(avl, box(857), box(1012), NULL); avl = remove_int(avl, 39); avl = remove_int(avl, 866); - avl = gpr_avl_add(avl, box(503), box(1015)); - avl = gpr_avl_add(avl, box(740), box(1016)); + avl = gpr_avl_add(avl, box(503), box(1015), NULL); + avl = gpr_avl_add(avl, box(740), box(1016), NULL); avl = remove_int(avl, 637); avl = remove_int(avl, 156); avl = remove_int(avl, 6); avl = remove_int(avl, 745); avl = remove_int(avl, 433); avl = remove_int(avl, 283); - avl = gpr_avl_add(avl, box(625), box(1023)); + avl = gpr_avl_add(avl, box(625), box(1023), NULL); avl = remove_int(avl, 638); - avl = gpr_avl_add(avl, box(299), box(1025)); - avl = gpr_avl_add(avl, box(584), box(1026)); + avl = gpr_avl_add(avl, box(299), box(1025), NULL); + avl = gpr_avl_add(avl, box(584), box(1026), NULL); avl = remove_int(avl, 863); - avl = gpr_avl_add(avl, box(612), box(1028)); - avl = gpr_avl_add(avl, box(62), box(1029)); - avl = gpr_avl_add(avl, box(432), box(1030)); + avl = gpr_avl_add(avl, box(612), box(1028), NULL); + avl = gpr_avl_add(avl, box(62), box(1029), NULL); + avl = gpr_avl_add(avl, box(432), box(1030), NULL); avl = remove_int(avl, 371); avl = remove_int(avl, 790); avl = remove_int(avl, 227); avl = remove_int(avl, 836); - avl = gpr_avl_add(avl, box(703), box(1035)); - avl = gpr_avl_add(avl, box(644), box(1036)); + avl = gpr_avl_add(avl, box(703), box(1035), NULL); + avl = gpr_avl_add(avl, box(644), box(1036), NULL); avl = remove_int(avl, 638); - avl = gpr_avl_add(avl, box(13), box(1038)); + avl = gpr_avl_add(avl, box(13), box(1038), NULL); avl = remove_int(avl, 66); avl = remove_int(avl, 82); - avl = gpr_avl_add(avl, box(362), box(1041)); - avl = gpr_avl_add(avl, box(783), box(1042)); + avl = gpr_avl_add(avl, box(362), box(1041), NULL); + avl = gpr_avl_add(avl, box(783), box(1042), NULL); avl = remove_int(avl, 60); - avl = gpr_avl_add(avl, box(80), box(1044)); - avl = gpr_avl_add(avl, box(825), box(1045)); - avl = gpr_avl_add(avl, box(688), box(1046)); - avl = gpr_avl_add(avl, box(662), box(1047)); + avl = gpr_avl_add(avl, box(80), box(1044), NULL); + avl = gpr_avl_add(avl, box(825), box(1045), NULL); + avl = gpr_avl_add(avl, box(688), box(1046), NULL); + avl = gpr_avl_add(avl, box(662), box(1047), NULL); avl = remove_int(avl, 156); avl = remove_int(avl, 376); avl = remove_int(avl, 99); - avl = gpr_avl_add(avl, box(526), box(1051)); - avl = gpr_avl_add(avl, box(168), box(1052)); + avl = gpr_avl_add(avl, box(526), box(1051), NULL); + avl = gpr_avl_add(avl, box(168), box(1052), NULL); avl = remove_int(avl, 646); avl = remove_int(avl, 380); avl = remove_int(avl, 833); - avl = gpr_avl_add(avl, box(53), box(1056)); + avl = gpr_avl_add(avl, box(53), box(1056), NULL); avl = remove_int(avl, 105); - avl = gpr_avl_add(avl, box(373), box(1058)); - avl = gpr_avl_add(avl, box(184), box(1059)); + avl = gpr_avl_add(avl, box(373), box(1058), NULL); + avl = gpr_avl_add(avl, box(184), box(1059), NULL); avl = remove_int(avl, 288); - avl = gpr_avl_add(avl, box(966), box(1061)); + avl = gpr_avl_add(avl, box(966), box(1061), NULL); avl = remove_int(avl, 158); - avl = gpr_avl_add(avl, box(406), box(1063)); + avl = gpr_avl_add(avl, box(406), box(1063), NULL); avl = remove_int(avl, 470); - avl = gpr_avl_add(avl, box(283), box(1065)); - avl = gpr_avl_add(avl, box(838), box(1066)); - avl = gpr_avl_add(avl, box(288), box(1067)); - avl = gpr_avl_add(avl, box(950), box(1068)); - avl = gpr_avl_add(avl, box(163), box(1069)); + avl = gpr_avl_add(avl, box(283), box(1065), NULL); + avl = gpr_avl_add(avl, box(838), box(1066), NULL); + avl = gpr_avl_add(avl, box(288), box(1067), NULL); + avl = gpr_avl_add(avl, box(950), box(1068), NULL); + avl = gpr_avl_add(avl, box(163), box(1069), NULL); avl = remove_int(avl, 623); avl = remove_int(avl, 769); - avl = gpr_avl_add(avl, box(144), box(1072)); - avl = gpr_avl_add(avl, box(489), box(1073)); + avl = gpr_avl_add(avl, box(144), box(1072), NULL); + avl = gpr_avl_add(avl, box(489), box(1073), NULL); avl = remove_int(avl, 15); - avl = gpr_avl_add(avl, box(971), box(1075)); + avl = gpr_avl_add(avl, box(971), box(1075), NULL); avl = remove_int(avl, 660); - avl = gpr_avl_add(avl, box(255), box(1077)); + avl = gpr_avl_add(avl, box(255), box(1077), NULL); avl = remove_int(avl, 494); - avl = gpr_avl_add(avl, box(109), box(1079)); - avl = gpr_avl_add(avl, box(420), box(1080)); - avl = gpr_avl_add(avl, box(509), box(1081)); + avl = gpr_avl_add(avl, box(109), box(1079), NULL); + avl = gpr_avl_add(avl, box(420), box(1080), NULL); + avl = gpr_avl_add(avl, box(509), box(1081), NULL); avl = remove_int(avl, 178); - avl = gpr_avl_add(avl, box(216), box(1083)); - avl = gpr_avl_add(avl, box(707), box(1084)); - avl = gpr_avl_add(avl, box(411), box(1085)); - avl = gpr_avl_add(avl, box(352), box(1086)); + avl = gpr_avl_add(avl, box(216), box(1083), NULL); + avl = gpr_avl_add(avl, box(707), box(1084), NULL); + avl = gpr_avl_add(avl, box(411), box(1085), NULL); + avl = gpr_avl_add(avl, box(352), box(1086), NULL); avl = remove_int(avl, 983); - avl = gpr_avl_add(avl, box(6), box(1088)); - avl = gpr_avl_add(avl, box(1014), box(1089)); + avl = gpr_avl_add(avl, box(6), box(1088), NULL); + avl = gpr_avl_add(avl, box(1014), box(1089), NULL); avl = remove_int(avl, 98); avl = remove_int(avl, 325); - avl = gpr_avl_add(avl, box(851), box(1092)); + avl = gpr_avl_add(avl, box(851), box(1092), NULL); avl = remove_int(avl, 553); - avl = gpr_avl_add(avl, box(218), box(1094)); - avl = gpr_avl_add(avl, box(261), box(1095)); + avl = gpr_avl_add(avl, box(218), box(1094), NULL); + avl = gpr_avl_add(avl, box(261), box(1095), NULL); avl = remove_int(avl, 31); - avl = gpr_avl_add(avl, box(872), box(1097)); + avl = gpr_avl_add(avl, box(872), box(1097), NULL); avl = remove_int(avl, 543); avl = remove_int(avl, 314); avl = remove_int(avl, 443); - avl = gpr_avl_add(avl, box(533), box(1101)); + avl = gpr_avl_add(avl, box(533), box(1101), NULL); avl = remove_int(avl, 881); avl = remove_int(avl, 269); avl = remove_int(avl, 940); @@ -2246,114 +2248,114 @@ static void test_badcase3(void) { avl = remove_int(avl, 773); avl = remove_int(avl, 790); avl = remove_int(avl, 345); - avl = gpr_avl_add(avl, box(965), box(1110)); + avl = gpr_avl_add(avl, box(965), box(1110), NULL); avl = remove_int(avl, 622); - avl = gpr_avl_add(avl, box(352), box(1112)); + avl = gpr_avl_add(avl, box(352), box(1112), NULL); avl = remove_int(avl, 182); - avl = gpr_avl_add(avl, box(534), box(1114)); - avl = gpr_avl_add(avl, box(97), box(1115)); - avl = gpr_avl_add(avl, box(198), box(1116)); + avl = gpr_avl_add(avl, box(534), box(1114), NULL); + avl = gpr_avl_add(avl, box(97), box(1115), NULL); + avl = gpr_avl_add(avl, box(198), box(1116), NULL); avl = remove_int(avl, 750); - avl = gpr_avl_add(avl, box(98), box(1118)); + avl = gpr_avl_add(avl, box(98), box(1118), NULL); avl = remove_int(avl, 943); - avl = gpr_avl_add(avl, box(254), box(1120)); - avl = gpr_avl_add(avl, box(30), box(1121)); + avl = gpr_avl_add(avl, box(254), box(1120), NULL); + avl = gpr_avl_add(avl, box(30), box(1121), NULL); avl = remove_int(avl, 14); avl = remove_int(avl, 475); avl = remove_int(avl, 82); - avl = gpr_avl_add(avl, box(789), box(1125)); - avl = gpr_avl_add(avl, box(402), box(1126)); + avl = gpr_avl_add(avl, box(789), box(1125), NULL); + avl = gpr_avl_add(avl, box(402), box(1126), NULL); avl = remove_int(avl, 1019); - avl = gpr_avl_add(avl, box(858), box(1128)); - avl = gpr_avl_add(avl, box(625), box(1129)); + avl = gpr_avl_add(avl, box(858), box(1128), NULL); + avl = gpr_avl_add(avl, box(625), box(1129), NULL); avl = remove_int(avl, 675); avl = remove_int(avl, 323); - avl = gpr_avl_add(avl, box(329), box(1132)); + avl = gpr_avl_add(avl, box(329), box(1132), NULL); avl = remove_int(avl, 929); avl = remove_int(avl, 44); - avl = gpr_avl_add(avl, box(443), box(1135)); - avl = gpr_avl_add(avl, box(653), box(1136)); - avl = gpr_avl_add(avl, box(750), box(1137)); - avl = gpr_avl_add(avl, box(252), box(1138)); - avl = gpr_avl_add(avl, box(449), box(1139)); + avl = gpr_avl_add(avl, box(443), box(1135), NULL); + avl = gpr_avl_add(avl, box(653), box(1136), NULL); + avl = gpr_avl_add(avl, box(750), box(1137), NULL); + avl = gpr_avl_add(avl, box(252), box(1138), NULL); + avl = gpr_avl_add(avl, box(449), box(1139), NULL); avl = remove_int(avl, 1022); avl = remove_int(avl, 357); avl = remove_int(avl, 602); avl = remove_int(avl, 131); - avl = gpr_avl_add(avl, box(531), box(1144)); + avl = gpr_avl_add(avl, box(531), box(1144), NULL); avl = remove_int(avl, 806); - avl = gpr_avl_add(avl, box(455), box(1146)); + avl = gpr_avl_add(avl, box(455), box(1146), NULL); avl = remove_int(avl, 31); - avl = gpr_avl_add(avl, box(154), box(1148)); - avl = gpr_avl_add(avl, box(189), box(1149)); + avl = gpr_avl_add(avl, box(154), box(1148), NULL); + avl = gpr_avl_add(avl, box(189), box(1149), NULL); avl = remove_int(avl, 786); - avl = gpr_avl_add(avl, box(496), box(1151)); - avl = gpr_avl_add(avl, box(81), box(1152)); - avl = gpr_avl_add(avl, box(59), box(1153)); + avl = gpr_avl_add(avl, box(496), box(1151), NULL); + avl = gpr_avl_add(avl, box(81), box(1152), NULL); + avl = gpr_avl_add(avl, box(59), box(1153), NULL); avl = remove_int(avl, 424); avl = remove_int(avl, 668); - avl = gpr_avl_add(avl, box(723), box(1156)); - avl = gpr_avl_add(avl, box(822), box(1157)); - avl = gpr_avl_add(avl, box(354), box(1158)); + avl = gpr_avl_add(avl, box(723), box(1156), NULL); + avl = gpr_avl_add(avl, box(822), box(1157), NULL); + avl = gpr_avl_add(avl, box(354), box(1158), NULL); avl = remove_int(avl, 738); - avl = gpr_avl_add(avl, box(686), box(1160)); - avl = gpr_avl_add(avl, box(43), box(1161)); - avl = gpr_avl_add(avl, box(625), box(1162)); - avl = gpr_avl_add(avl, box(902), box(1163)); - avl = gpr_avl_add(avl, box(12), box(1164)); - avl = gpr_avl_add(avl, box(977), box(1165)); - avl = gpr_avl_add(avl, box(699), box(1166)); - avl = gpr_avl_add(avl, box(189), box(1167)); + avl = gpr_avl_add(avl, box(686), box(1160), NULL); + avl = gpr_avl_add(avl, box(43), box(1161), NULL); + avl = gpr_avl_add(avl, box(625), box(1162), NULL); + avl = gpr_avl_add(avl, box(902), box(1163), NULL); + avl = gpr_avl_add(avl, box(12), box(1164), NULL); + avl = gpr_avl_add(avl, box(977), box(1165), NULL); + avl = gpr_avl_add(avl, box(699), box(1166), NULL); + avl = gpr_avl_add(avl, box(189), box(1167), NULL); avl = remove_int(avl, 672); avl = remove_int(avl, 90); avl = remove_int(avl, 757); avl = remove_int(avl, 494); - avl = gpr_avl_add(avl, box(759), box(1172)); + avl = gpr_avl_add(avl, box(759), box(1172), NULL); avl = remove_int(avl, 758); avl = remove_int(avl, 222); - avl = gpr_avl_add(avl, box(975), box(1175)); + avl = gpr_avl_add(avl, box(975), box(1175), NULL); avl = remove_int(avl, 993); - avl = gpr_avl_add(avl, box(2), box(1177)); - avl = gpr_avl_add(avl, box(70), box(1178)); + avl = gpr_avl_add(avl, box(2), box(1177), NULL); + avl = gpr_avl_add(avl, box(70), box(1178), NULL); avl = remove_int(avl, 350); avl = remove_int(avl, 972); avl = remove_int(avl, 880); - avl = gpr_avl_add(avl, box(753), box(1182)); + avl = gpr_avl_add(avl, box(753), box(1182), NULL); avl = remove_int(avl, 404); - avl = gpr_avl_add(avl, box(294), box(1184)); + avl = gpr_avl_add(avl, box(294), box(1184), NULL); avl = remove_int(avl, 474); - avl = gpr_avl_add(avl, box(228), box(1186)); - avl = gpr_avl_add(avl, box(484), box(1187)); + avl = gpr_avl_add(avl, box(228), box(1186), NULL); + avl = gpr_avl_add(avl, box(484), box(1187), NULL); avl = remove_int(avl, 238); avl = remove_int(avl, 53); avl = remove_int(avl, 691); - avl = gpr_avl_add(avl, box(345), box(1191)); + avl = gpr_avl_add(avl, box(345), box(1191), NULL); avl = remove_int(avl, 0); - avl = gpr_avl_add(avl, box(230), box(1193)); + avl = gpr_avl_add(avl, box(230), box(1193), NULL); avl = remove_int(avl, 227); avl = remove_int(avl, 152); - avl = gpr_avl_add(avl, box(884), box(1196)); + avl = gpr_avl_add(avl, box(884), box(1196), NULL); avl = remove_int(avl, 823); avl = remove_int(avl, 53); - avl = gpr_avl_add(avl, box(1015), box(1199)); - avl = gpr_avl_add(avl, box(697), box(1200)); - avl = gpr_avl_add(avl, box(376), box(1201)); + avl = gpr_avl_add(avl, box(1015), box(1199), NULL); + avl = gpr_avl_add(avl, box(697), box(1200), NULL); + avl = gpr_avl_add(avl, box(376), box(1201), NULL); avl = remove_int(avl, 411); - avl = gpr_avl_add(avl, box(888), box(1203)); + avl = gpr_avl_add(avl, box(888), box(1203), NULL); avl = remove_int(avl, 55); - avl = gpr_avl_add(avl, box(85), box(1205)); + avl = gpr_avl_add(avl, box(85), box(1205), NULL); avl = remove_int(avl, 947); avl = remove_int(avl, 382); avl = remove_int(avl, 777); - avl = gpr_avl_add(avl, box(1017), box(1209)); - avl = gpr_avl_add(avl, box(169), box(1210)); - avl = gpr_avl_add(avl, box(156), box(1211)); + avl = gpr_avl_add(avl, box(1017), box(1209), NULL); + avl = gpr_avl_add(avl, box(169), box(1210), NULL); + avl = gpr_avl_add(avl, box(156), box(1211), NULL); avl = remove_int(avl, 153); avl = remove_int(avl, 642); avl = remove_int(avl, 158); - avl = gpr_avl_add(avl, box(554), box(1215)); - avl = gpr_avl_add(avl, box(76), box(1216)); - avl = gpr_avl_add(avl, box(756), box(1217)); + avl = gpr_avl_add(avl, box(554), box(1215), NULL); + avl = gpr_avl_add(avl, box(76), box(1216), NULL); + avl = gpr_avl_add(avl, box(756), box(1217), NULL); avl = remove_int(avl, 767); avl = remove_int(avl, 112); avl = remove_int(avl, 539); @@ -2362,37 +2364,37 @@ static void test_badcase3(void) { avl = remove_int(avl, 385); avl = remove_int(avl, 514); avl = remove_int(avl, 362); - avl = gpr_avl_add(avl, box(523), box(1226)); - avl = gpr_avl_add(avl, box(712), box(1227)); - avl = gpr_avl_add(avl, box(474), box(1228)); - avl = gpr_avl_add(avl, box(882), box(1229)); - avl = gpr_avl_add(avl, box(965), box(1230)); + avl = gpr_avl_add(avl, box(523), box(1226), NULL); + avl = gpr_avl_add(avl, box(712), box(1227), NULL); + avl = gpr_avl_add(avl, box(474), box(1228), NULL); + avl = gpr_avl_add(avl, box(882), box(1229), NULL); + avl = gpr_avl_add(avl, box(965), box(1230), NULL); avl = remove_int(avl, 464); - avl = gpr_avl_add(avl, box(319), box(1232)); - avl = gpr_avl_add(avl, box(504), box(1233)); + avl = gpr_avl_add(avl, box(319), box(1232), NULL); + avl = gpr_avl_add(avl, box(504), box(1233), NULL); avl = remove_int(avl, 818); - avl = gpr_avl_add(avl, box(884), box(1235)); - avl = gpr_avl_add(avl, box(813), box(1236)); - avl = gpr_avl_add(avl, box(795), box(1237)); + avl = gpr_avl_add(avl, box(884), box(1235), NULL); + avl = gpr_avl_add(avl, box(813), box(1236), NULL); + avl = gpr_avl_add(avl, box(795), box(1237), NULL); avl = remove_int(avl, 306); - avl = gpr_avl_add(avl, box(799), box(1239)); + avl = gpr_avl_add(avl, box(799), box(1239), NULL); avl = remove_int(avl, 534); - avl = gpr_avl_add(avl, box(480), box(1241)); - avl = gpr_avl_add(avl, box(656), box(1242)); - avl = gpr_avl_add(avl, box(709), box(1243)); - avl = gpr_avl_add(avl, box(500), box(1244)); + avl = gpr_avl_add(avl, box(480), box(1241), NULL); + avl = gpr_avl_add(avl, box(656), box(1242), NULL); + avl = gpr_avl_add(avl, box(709), box(1243), NULL); + avl = gpr_avl_add(avl, box(500), box(1244), NULL); avl = remove_int(avl, 740); - avl = gpr_avl_add(avl, box(980), box(1246)); - avl = gpr_avl_add(avl, box(458), box(1247)); + avl = gpr_avl_add(avl, box(980), box(1246), NULL); + avl = gpr_avl_add(avl, box(458), box(1247), NULL); avl = remove_int(avl, 377); avl = remove_int(avl, 338); - avl = gpr_avl_add(avl, box(554), box(1250)); - avl = gpr_avl_add(avl, box(504), box(1251)); - avl = gpr_avl_add(avl, box(603), box(1252)); - avl = gpr_avl_add(avl, box(761), box(1253)); + avl = gpr_avl_add(avl, box(554), box(1250), NULL); + avl = gpr_avl_add(avl, box(504), box(1251), NULL); + avl = gpr_avl_add(avl, box(603), box(1252), NULL); + avl = gpr_avl_add(avl, box(761), box(1253), NULL); avl = remove_int(avl, 431); - avl = gpr_avl_add(avl, box(707), box(1255)); - avl = gpr_avl_add(avl, box(673), box(1256)); + avl = gpr_avl_add(avl, box(707), box(1255), NULL); + avl = gpr_avl_add(avl, box(673), box(1256), NULL); avl = remove_int(avl, 998); avl = remove_int(avl, 332); avl = remove_int(avl, 413); @@ -2400,448 +2402,448 @@ static void test_badcase3(void) { avl = remove_int(avl, 249); avl = remove_int(avl, 309); avl = remove_int(avl, 459); - avl = gpr_avl_add(avl, box(645), box(1264)); + avl = gpr_avl_add(avl, box(645), box(1264), NULL); avl = remove_int(avl, 858); avl = remove_int(avl, 997); - avl = gpr_avl_add(avl, box(519), box(1267)); + avl = gpr_avl_add(avl, box(519), box(1267), NULL); avl = remove_int(avl, 614); avl = remove_int(avl, 462); avl = remove_int(avl, 792); - avl = gpr_avl_add(avl, box(987), box(1271)); - avl = gpr_avl_add(avl, box(309), box(1272)); + avl = gpr_avl_add(avl, box(987), box(1271), NULL); + avl = gpr_avl_add(avl, box(309), box(1272), NULL); avl = remove_int(avl, 747); - avl = gpr_avl_add(avl, box(621), box(1274)); - avl = gpr_avl_add(avl, box(450), box(1275)); + avl = gpr_avl_add(avl, box(621), box(1274), NULL); + avl = gpr_avl_add(avl, box(450), box(1275), NULL); avl = remove_int(avl, 265); avl = remove_int(avl, 8); avl = remove_int(avl, 383); - avl = gpr_avl_add(avl, box(238), box(1279)); + avl = gpr_avl_add(avl, box(238), box(1279), NULL); avl = remove_int(avl, 241); - avl = gpr_avl_add(avl, box(180), box(1281)); - avl = gpr_avl_add(avl, box(411), box(1282)); - avl = gpr_avl_add(avl, box(791), box(1283)); - avl = gpr_avl_add(avl, box(955), box(1284)); + avl = gpr_avl_add(avl, box(180), box(1281), NULL); + avl = gpr_avl_add(avl, box(411), box(1282), NULL); + avl = gpr_avl_add(avl, box(791), box(1283), NULL); + avl = gpr_avl_add(avl, box(955), box(1284), NULL); avl = remove_int(avl, 24); avl = remove_int(avl, 375); - avl = gpr_avl_add(avl, box(140), box(1287)); + avl = gpr_avl_add(avl, box(140), box(1287), NULL); avl = remove_int(avl, 949); - avl = gpr_avl_add(avl, box(301), box(1289)); - avl = gpr_avl_add(avl, box(0), box(1290)); + avl = gpr_avl_add(avl, box(301), box(1289), NULL); + avl = gpr_avl_add(avl, box(0), box(1290), NULL); avl = remove_int(avl, 371); avl = remove_int(avl, 427); avl = remove_int(avl, 841); avl = remove_int(avl, 847); - avl = gpr_avl_add(avl, box(814), box(1295)); - avl = gpr_avl_add(avl, box(127), box(1296)); - avl = gpr_avl_add(avl, box(279), box(1297)); + avl = gpr_avl_add(avl, box(814), box(1295), NULL); + avl = gpr_avl_add(avl, box(127), box(1296), NULL); + avl = gpr_avl_add(avl, box(279), box(1297), NULL); avl = remove_int(avl, 669); avl = remove_int(avl, 541); avl = remove_int(avl, 275); avl = remove_int(avl, 299); avl = remove_int(avl, 552); - avl = gpr_avl_add(avl, box(310), box(1303)); - avl = gpr_avl_add(avl, box(304), box(1304)); - avl = gpr_avl_add(avl, box(1), box(1305)); - avl = gpr_avl_add(avl, box(339), box(1306)); + avl = gpr_avl_add(avl, box(310), box(1303), NULL); + avl = gpr_avl_add(avl, box(304), box(1304), NULL); + avl = gpr_avl_add(avl, box(1), box(1305), NULL); + avl = gpr_avl_add(avl, box(339), box(1306), NULL); avl = remove_int(avl, 570); avl = remove_int(avl, 752); avl = remove_int(avl, 552); avl = remove_int(avl, 442); avl = remove_int(avl, 639); - avl = gpr_avl_add(avl, box(313), box(1312)); + avl = gpr_avl_add(avl, box(313), box(1312), NULL); avl = remove_int(avl, 85); - avl = gpr_avl_add(avl, box(964), box(1314)); - avl = gpr_avl_add(avl, box(559), box(1315)); + avl = gpr_avl_add(avl, box(964), box(1314), NULL); + avl = gpr_avl_add(avl, box(559), box(1315), NULL); avl = remove_int(avl, 167); - avl = gpr_avl_add(avl, box(866), box(1317)); + avl = gpr_avl_add(avl, box(866), box(1317), NULL); avl = remove_int(avl, 275); - avl = gpr_avl_add(avl, box(173), box(1319)); - avl = gpr_avl_add(avl, box(765), box(1320)); + avl = gpr_avl_add(avl, box(173), box(1319), NULL); + avl = gpr_avl_add(avl, box(765), box(1320), NULL); avl = remove_int(avl, 883); - avl = gpr_avl_add(avl, box(547), box(1322)); - avl = gpr_avl_add(avl, box(847), box(1323)); + avl = gpr_avl_add(avl, box(547), box(1322), NULL); + avl = gpr_avl_add(avl, box(847), box(1323), NULL); avl = remove_int(avl, 817); avl = remove_int(avl, 850); avl = remove_int(avl, 718); - avl = gpr_avl_add(avl, box(806), box(1327)); - avl = gpr_avl_add(avl, box(360), box(1328)); + avl = gpr_avl_add(avl, box(806), box(1327), NULL); + avl = gpr_avl_add(avl, box(360), box(1328), NULL); avl = remove_int(avl, 991); - avl = gpr_avl_add(avl, box(493), box(1330)); + avl = gpr_avl_add(avl, box(493), box(1330), NULL); avl = remove_int(avl, 516); - avl = gpr_avl_add(avl, box(361), box(1332)); + avl = gpr_avl_add(avl, box(361), box(1332), NULL); avl = remove_int(avl, 355); - avl = gpr_avl_add(avl, box(512), box(1334)); - avl = gpr_avl_add(avl, box(191), box(1335)); + avl = gpr_avl_add(avl, box(512), box(1334), NULL); + avl = gpr_avl_add(avl, box(191), box(1335), NULL); avl = remove_int(avl, 703); - avl = gpr_avl_add(avl, box(333), box(1337)); + avl = gpr_avl_add(avl, box(333), box(1337), NULL); avl = remove_int(avl, 481); - avl = gpr_avl_add(avl, box(501), box(1339)); + avl = gpr_avl_add(avl, box(501), box(1339), NULL); avl = remove_int(avl, 532); avl = remove_int(avl, 510); - avl = gpr_avl_add(avl, box(793), box(1342)); - avl = gpr_avl_add(avl, box(234), box(1343)); + avl = gpr_avl_add(avl, box(793), box(1342), NULL); + avl = gpr_avl_add(avl, box(234), box(1343), NULL); avl = remove_int(avl, 159); avl = remove_int(avl, 429); avl = remove_int(avl, 728); avl = remove_int(avl, 288); - avl = gpr_avl_add(avl, box(281), box(1348)); - avl = gpr_avl_add(avl, box(702), box(1349)); - avl = gpr_avl_add(avl, box(149), box(1350)); + avl = gpr_avl_add(avl, box(281), box(1348), NULL); + avl = gpr_avl_add(avl, box(702), box(1349), NULL); + avl = gpr_avl_add(avl, box(149), box(1350), NULL); avl = remove_int(avl, 22); avl = remove_int(avl, 944); avl = remove_int(avl, 55); avl = remove_int(avl, 512); avl = remove_int(avl, 676); avl = remove_int(avl, 884); - avl = gpr_avl_add(avl, box(246), box(1357)); - avl = gpr_avl_add(avl, box(455), box(1358)); + avl = gpr_avl_add(avl, box(246), box(1357), NULL); + avl = gpr_avl_add(avl, box(455), box(1358), NULL); avl = remove_int(avl, 782); avl = remove_int(avl, 682); - avl = gpr_avl_add(avl, box(243), box(1361)); - avl = gpr_avl_add(avl, box(109), box(1362)); - avl = gpr_avl_add(avl, box(452), box(1363)); + avl = gpr_avl_add(avl, box(243), box(1361), NULL); + avl = gpr_avl_add(avl, box(109), box(1362), NULL); + avl = gpr_avl_add(avl, box(452), box(1363), NULL); avl = remove_int(avl, 151); - avl = gpr_avl_add(avl, box(159), box(1365)); + avl = gpr_avl_add(avl, box(159), box(1365), NULL); avl = remove_int(avl, 1023); - avl = gpr_avl_add(avl, box(129), box(1367)); - avl = gpr_avl_add(avl, box(537), box(1368)); + avl = gpr_avl_add(avl, box(129), box(1367), NULL); + avl = gpr_avl_add(avl, box(537), box(1368), NULL); avl = remove_int(avl, 321); - avl = gpr_avl_add(avl, box(740), box(1370)); + avl = gpr_avl_add(avl, box(740), box(1370), NULL); avl = remove_int(avl, 45); avl = remove_int(avl, 136); - avl = gpr_avl_add(avl, box(229), box(1373)); + avl = gpr_avl_add(avl, box(229), box(1373), NULL); avl = remove_int(avl, 772); - avl = gpr_avl_add(avl, box(181), box(1375)); + avl = gpr_avl_add(avl, box(181), box(1375), NULL); avl = remove_int(avl, 175); - avl = gpr_avl_add(avl, box(817), box(1377)); + avl = gpr_avl_add(avl, box(817), box(1377), NULL); avl = remove_int(avl, 956); - avl = gpr_avl_add(avl, box(675), box(1379)); - avl = gpr_avl_add(avl, box(375), box(1380)); + avl = gpr_avl_add(avl, box(675), box(1379), NULL); + avl = gpr_avl_add(avl, box(375), box(1380), NULL); avl = remove_int(avl, 384); - avl = gpr_avl_add(avl, box(1016), box(1382)); + avl = gpr_avl_add(avl, box(1016), box(1382), NULL); avl = remove_int(avl, 295); avl = remove_int(avl, 697); avl = remove_int(avl, 554); avl = remove_int(avl, 590); avl = remove_int(avl, 1014); - avl = gpr_avl_add(avl, box(890), box(1388)); - avl = gpr_avl_add(avl, box(293), box(1389)); + avl = gpr_avl_add(avl, box(890), box(1388), NULL); + avl = gpr_avl_add(avl, box(293), box(1389), NULL); avl = remove_int(avl, 207); avl = remove_int(avl, 46); - avl = gpr_avl_add(avl, box(899), box(1392)); - avl = gpr_avl_add(avl, box(666), box(1393)); - avl = gpr_avl_add(avl, box(85), box(1394)); - avl = gpr_avl_add(avl, box(914), box(1395)); - avl = gpr_avl_add(avl, box(128), box(1396)); - avl = gpr_avl_add(avl, box(835), box(1397)); - avl = gpr_avl_add(avl, box(787), box(1398)); - avl = gpr_avl_add(avl, box(649), box(1399)); - avl = gpr_avl_add(avl, box(723), box(1400)); + avl = gpr_avl_add(avl, box(899), box(1392), NULL); + avl = gpr_avl_add(avl, box(666), box(1393), NULL); + avl = gpr_avl_add(avl, box(85), box(1394), NULL); + avl = gpr_avl_add(avl, box(914), box(1395), NULL); + avl = gpr_avl_add(avl, box(128), box(1396), NULL); + avl = gpr_avl_add(avl, box(835), box(1397), NULL); + avl = gpr_avl_add(avl, box(787), box(1398), NULL); + avl = gpr_avl_add(avl, box(649), box(1399), NULL); + avl = gpr_avl_add(avl, box(723), box(1400), NULL); avl = remove_int(avl, 874); - avl = gpr_avl_add(avl, box(778), box(1402)); - avl = gpr_avl_add(avl, box(1015), box(1403)); - avl = gpr_avl_add(avl, box(59), box(1404)); - avl = gpr_avl_add(avl, box(259), box(1405)); - avl = gpr_avl_add(avl, box(758), box(1406)); + avl = gpr_avl_add(avl, box(778), box(1402), NULL); + avl = gpr_avl_add(avl, box(1015), box(1403), NULL); + avl = gpr_avl_add(avl, box(59), box(1404), NULL); + avl = gpr_avl_add(avl, box(259), box(1405), NULL); + avl = gpr_avl_add(avl, box(758), box(1406), NULL); avl = remove_int(avl, 648); - avl = gpr_avl_add(avl, box(145), box(1408)); - avl = gpr_avl_add(avl, box(440), box(1409)); + avl = gpr_avl_add(avl, box(145), box(1408), NULL); + avl = gpr_avl_add(avl, box(440), box(1409), NULL); avl = remove_int(avl, 608); avl = remove_int(avl, 690); - avl = gpr_avl_add(avl, box(605), box(1412)); + avl = gpr_avl_add(avl, box(605), box(1412), NULL); avl = remove_int(avl, 856); avl = remove_int(avl, 608); - avl = gpr_avl_add(avl, box(829), box(1415)); - avl = gpr_avl_add(avl, box(660), box(1416)); + avl = gpr_avl_add(avl, box(829), box(1415), NULL); + avl = gpr_avl_add(avl, box(660), box(1416), NULL); avl = remove_int(avl, 596); - avl = gpr_avl_add(avl, box(519), box(1418)); - avl = gpr_avl_add(avl, box(35), box(1419)); - avl = gpr_avl_add(avl, box(871), box(1420)); + avl = gpr_avl_add(avl, box(519), box(1418), NULL); + avl = gpr_avl_add(avl, box(35), box(1419), NULL); + avl = gpr_avl_add(avl, box(871), box(1420), NULL); avl = remove_int(avl, 845); - avl = gpr_avl_add(avl, box(600), box(1422)); - avl = gpr_avl_add(avl, box(215), box(1423)); + avl = gpr_avl_add(avl, box(600), box(1422), NULL); + avl = gpr_avl_add(avl, box(215), box(1423), NULL); avl = remove_int(avl, 761); - avl = gpr_avl_add(avl, box(975), box(1425)); + avl = gpr_avl_add(avl, box(975), box(1425), NULL); avl = remove_int(avl, 987); - avl = gpr_avl_add(avl, box(58), box(1427)); + avl = gpr_avl_add(avl, box(58), box(1427), NULL); avl = remove_int(avl, 119); - avl = gpr_avl_add(avl, box(937), box(1429)); - avl = gpr_avl_add(avl, box(372), box(1430)); - avl = gpr_avl_add(avl, box(11), box(1431)); - avl = gpr_avl_add(avl, box(398), box(1432)); - avl = gpr_avl_add(avl, box(423), box(1433)); + avl = gpr_avl_add(avl, box(937), box(1429), NULL); + avl = gpr_avl_add(avl, box(372), box(1430), NULL); + avl = gpr_avl_add(avl, box(11), box(1431), NULL); + avl = gpr_avl_add(avl, box(398), box(1432), NULL); + avl = gpr_avl_add(avl, box(423), box(1433), NULL); avl = remove_int(avl, 171); - avl = gpr_avl_add(avl, box(473), box(1435)); + avl = gpr_avl_add(avl, box(473), box(1435), NULL); avl = remove_int(avl, 752); avl = remove_int(avl, 625); avl = remove_int(avl, 764); avl = remove_int(avl, 49); - avl = gpr_avl_add(avl, box(472), box(1440)); + avl = gpr_avl_add(avl, box(472), box(1440), NULL); avl = remove_int(avl, 847); avl = remove_int(avl, 642); avl = remove_int(avl, 1004); avl = remove_int(avl, 795); avl = remove_int(avl, 465); - avl = gpr_avl_add(avl, box(636), box(1446)); + avl = gpr_avl_add(avl, box(636), box(1446), NULL); avl = remove_int(avl, 152); - avl = gpr_avl_add(avl, box(61), box(1448)); + avl = gpr_avl_add(avl, box(61), box(1448), NULL); avl = remove_int(avl, 929); avl = remove_int(avl, 9); - avl = gpr_avl_add(avl, box(251), box(1451)); - avl = gpr_avl_add(avl, box(672), box(1452)); - avl = gpr_avl_add(avl, box(66), box(1453)); + avl = gpr_avl_add(avl, box(251), box(1451), NULL); + avl = gpr_avl_add(avl, box(672), box(1452), NULL); + avl = gpr_avl_add(avl, box(66), box(1453), NULL); avl = remove_int(avl, 693); avl = remove_int(avl, 914); avl = remove_int(avl, 116); avl = remove_int(avl, 577); - avl = gpr_avl_add(avl, box(618), box(1458)); - avl = gpr_avl_add(avl, box(495), box(1459)); + avl = gpr_avl_add(avl, box(618), box(1458), NULL); + avl = gpr_avl_add(avl, box(495), box(1459), NULL); avl = remove_int(avl, 450); - avl = gpr_avl_add(avl, box(533), box(1461)); - avl = gpr_avl_add(avl, box(414), box(1462)); + avl = gpr_avl_add(avl, box(533), box(1461), NULL); + avl = gpr_avl_add(avl, box(414), box(1462), NULL); avl = remove_int(avl, 74); avl = remove_int(avl, 236); - avl = gpr_avl_add(avl, box(707), box(1465)); - avl = gpr_avl_add(avl, box(357), box(1466)); - avl = gpr_avl_add(avl, box(1007), box(1467)); - avl = gpr_avl_add(avl, box(811), box(1468)); - avl = gpr_avl_add(avl, box(418), box(1469)); - avl = gpr_avl_add(avl, box(164), box(1470)); - avl = gpr_avl_add(avl, box(622), box(1471)); + avl = gpr_avl_add(avl, box(707), box(1465), NULL); + avl = gpr_avl_add(avl, box(357), box(1466), NULL); + avl = gpr_avl_add(avl, box(1007), box(1467), NULL); + avl = gpr_avl_add(avl, box(811), box(1468), NULL); + avl = gpr_avl_add(avl, box(418), box(1469), NULL); + avl = gpr_avl_add(avl, box(164), box(1470), NULL); + avl = gpr_avl_add(avl, box(622), box(1471), NULL); avl = remove_int(avl, 22); avl = remove_int(avl, 14); avl = remove_int(avl, 732); avl = remove_int(avl, 7); avl = remove_int(avl, 447); - avl = gpr_avl_add(avl, box(221), box(1477)); - avl = gpr_avl_add(avl, box(202), box(1478)); - avl = gpr_avl_add(avl, box(312), box(1479)); + avl = gpr_avl_add(avl, box(221), box(1477), NULL); + avl = gpr_avl_add(avl, box(202), box(1478), NULL); + avl = gpr_avl_add(avl, box(312), box(1479), NULL); avl = remove_int(avl, 274); - avl = gpr_avl_add(avl, box(684), box(1481)); - avl = gpr_avl_add(avl, box(954), box(1482)); - avl = gpr_avl_add(avl, box(637), box(1483)); + avl = gpr_avl_add(avl, box(684), box(1481), NULL); + avl = gpr_avl_add(avl, box(954), box(1482), NULL); + avl = gpr_avl_add(avl, box(637), box(1483), NULL); avl = remove_int(avl, 716); - avl = gpr_avl_add(avl, box(198), box(1485)); + avl = gpr_avl_add(avl, box(198), box(1485), NULL); avl = remove_int(avl, 340); avl = remove_int(avl, 137); avl = remove_int(avl, 995); avl = remove_int(avl, 1004); - avl = gpr_avl_add(avl, box(661), box(1490)); - avl = gpr_avl_add(avl, box(862), box(1491)); + avl = gpr_avl_add(avl, box(661), box(1490), NULL); + avl = gpr_avl_add(avl, box(862), box(1491), NULL); avl = remove_int(avl, 527); - avl = gpr_avl_add(avl, box(945), box(1493)); + avl = gpr_avl_add(avl, box(945), box(1493), NULL); avl = remove_int(avl, 355); avl = remove_int(avl, 144); - avl = gpr_avl_add(avl, box(229), box(1496)); - avl = gpr_avl_add(avl, box(237), box(1497)); + avl = gpr_avl_add(avl, box(229), box(1496), NULL); + avl = gpr_avl_add(avl, box(237), box(1497), NULL); avl = remove_int(avl, 471); avl = remove_int(avl, 901); - avl = gpr_avl_add(avl, box(905), box(1500)); + avl = gpr_avl_add(avl, box(905), box(1500), NULL); avl = remove_int(avl, 19); avl = remove_int(avl, 896); avl = remove_int(avl, 585); avl = remove_int(avl, 308); - avl = gpr_avl_add(avl, box(547), box(1505)); - avl = gpr_avl_add(avl, box(552), box(1506)); - avl = gpr_avl_add(avl, box(30), box(1507)); - avl = gpr_avl_add(avl, box(445), box(1508)); + avl = gpr_avl_add(avl, box(547), box(1505), NULL); + avl = gpr_avl_add(avl, box(552), box(1506), NULL); + avl = gpr_avl_add(avl, box(30), box(1507), NULL); + avl = gpr_avl_add(avl, box(445), box(1508), NULL); avl = remove_int(avl, 785); avl = remove_int(avl, 185); - avl = gpr_avl_add(avl, box(405), box(1511)); - avl = gpr_avl_add(avl, box(733), box(1512)); - avl = gpr_avl_add(avl, box(573), box(1513)); - avl = gpr_avl_add(avl, box(492), box(1514)); - avl = gpr_avl_add(avl, box(343), box(1515)); - avl = gpr_avl_add(avl, box(527), box(1516)); - avl = gpr_avl_add(avl, box(596), box(1517)); - avl = gpr_avl_add(avl, box(519), box(1518)); + avl = gpr_avl_add(avl, box(405), box(1511), NULL); + avl = gpr_avl_add(avl, box(733), box(1512), NULL); + avl = gpr_avl_add(avl, box(573), box(1513), NULL); + avl = gpr_avl_add(avl, box(492), box(1514), NULL); + avl = gpr_avl_add(avl, box(343), box(1515), NULL); + avl = gpr_avl_add(avl, box(527), box(1516), NULL); + avl = gpr_avl_add(avl, box(596), box(1517), NULL); + avl = gpr_avl_add(avl, box(519), box(1518), NULL); avl = remove_int(avl, 243); avl = remove_int(avl, 722); - avl = gpr_avl_add(avl, box(772), box(1521)); + avl = gpr_avl_add(avl, box(772), box(1521), NULL); avl = remove_int(avl, 152); avl = remove_int(avl, 305); - avl = gpr_avl_add(avl, box(754), box(1524)); - avl = gpr_avl_add(avl, box(373), box(1525)); + avl = gpr_avl_add(avl, box(754), box(1524), NULL); + avl = gpr_avl_add(avl, box(373), box(1525), NULL); avl = remove_int(avl, 995); - avl = gpr_avl_add(avl, box(329), box(1527)); + avl = gpr_avl_add(avl, box(329), box(1527), NULL); avl = remove_int(avl, 397); - avl = gpr_avl_add(avl, box(884), box(1529)); + avl = gpr_avl_add(avl, box(884), box(1529), NULL); avl = remove_int(avl, 329); avl = remove_int(avl, 240); - avl = gpr_avl_add(avl, box(566), box(1532)); - avl = gpr_avl_add(avl, box(232), box(1533)); + avl = gpr_avl_add(avl, box(566), box(1532), NULL); + avl = gpr_avl_add(avl, box(232), box(1533), NULL); avl = remove_int(avl, 993); - avl = gpr_avl_add(avl, box(888), box(1535)); + avl = gpr_avl_add(avl, box(888), box(1535), NULL); avl = remove_int(avl, 242); - avl = gpr_avl_add(avl, box(941), box(1537)); + avl = gpr_avl_add(avl, box(941), box(1537), NULL); avl = remove_int(avl, 415); - avl = gpr_avl_add(avl, box(992), box(1539)); + avl = gpr_avl_add(avl, box(992), box(1539), NULL); avl = remove_int(avl, 289); - avl = gpr_avl_add(avl, box(60), box(1541)); - avl = gpr_avl_add(avl, box(97), box(1542)); + avl = gpr_avl_add(avl, box(60), box(1541), NULL); + avl = gpr_avl_add(avl, box(97), box(1542), NULL); avl = remove_int(avl, 965); avl = remove_int(avl, 267); avl = remove_int(avl, 360); - avl = gpr_avl_add(avl, box(5), box(1546)); + avl = gpr_avl_add(avl, box(5), box(1546), NULL); avl = remove_int(avl, 429); - avl = gpr_avl_add(avl, box(412), box(1548)); + avl = gpr_avl_add(avl, box(412), box(1548), NULL); avl = remove_int(avl, 632); avl = remove_int(avl, 113); - avl = gpr_avl_add(avl, box(48), box(1551)); - avl = gpr_avl_add(avl, box(108), box(1552)); - avl = gpr_avl_add(avl, box(750), box(1553)); + avl = gpr_avl_add(avl, box(48), box(1551), NULL); + avl = gpr_avl_add(avl, box(108), box(1552), NULL); + avl = gpr_avl_add(avl, box(750), box(1553), NULL); avl = remove_int(avl, 188); - avl = gpr_avl_add(avl, box(668), box(1555)); + avl = gpr_avl_add(avl, box(668), box(1555), NULL); avl = remove_int(avl, 37); avl = remove_int(avl, 737); - avl = gpr_avl_add(avl, box(93), box(1558)); - avl = gpr_avl_add(avl, box(628), box(1559)); - avl = gpr_avl_add(avl, box(480), box(1560)); + avl = gpr_avl_add(avl, box(93), box(1558), NULL); + avl = gpr_avl_add(avl, box(628), box(1559), NULL); + avl = gpr_avl_add(avl, box(480), box(1560), NULL); avl = remove_int(avl, 958); avl = remove_int(avl, 565); avl = remove_int(avl, 32); avl = remove_int(avl, 1); avl = remove_int(avl, 335); - avl = gpr_avl_add(avl, box(136), box(1566)); - avl = gpr_avl_add(avl, box(469), box(1567)); + avl = gpr_avl_add(avl, box(136), box(1566), NULL); + avl = gpr_avl_add(avl, box(469), box(1567), NULL); avl = remove_int(avl, 349); - avl = gpr_avl_add(avl, box(768), box(1569)); - avl = gpr_avl_add(avl, box(915), box(1570)); + avl = gpr_avl_add(avl, box(768), box(1569), NULL); + avl = gpr_avl_add(avl, box(915), box(1570), NULL); avl = remove_int(avl, 1014); - avl = gpr_avl_add(avl, box(117), box(1572)); + avl = gpr_avl_add(avl, box(117), box(1572), NULL); avl = remove_int(avl, 62); - avl = gpr_avl_add(avl, box(382), box(1574)); + avl = gpr_avl_add(avl, box(382), box(1574), NULL); avl = remove_int(avl, 571); - avl = gpr_avl_add(avl, box(655), box(1576)); - avl = gpr_avl_add(avl, box(323), box(1577)); + avl = gpr_avl_add(avl, box(655), box(1576), NULL); + avl = gpr_avl_add(avl, box(323), box(1577), NULL); avl = remove_int(avl, 869); avl = remove_int(avl, 151); - avl = gpr_avl_add(avl, box(1019), box(1580)); - avl = gpr_avl_add(avl, box(984), box(1581)); - avl = gpr_avl_add(avl, box(870), box(1582)); - avl = gpr_avl_add(avl, box(376), box(1583)); + avl = gpr_avl_add(avl, box(1019), box(1580), NULL); + avl = gpr_avl_add(avl, box(984), box(1581), NULL); + avl = gpr_avl_add(avl, box(870), box(1582), NULL); + avl = gpr_avl_add(avl, box(376), box(1583), NULL); avl = remove_int(avl, 625); - avl = gpr_avl_add(avl, box(733), box(1585)); + avl = gpr_avl_add(avl, box(733), box(1585), NULL); avl = remove_int(avl, 532); avl = remove_int(avl, 444); - avl = gpr_avl_add(avl, box(428), box(1588)); - avl = gpr_avl_add(avl, box(860), box(1589)); - avl = gpr_avl_add(avl, box(173), box(1590)); + avl = gpr_avl_add(avl, box(428), box(1588), NULL); + avl = gpr_avl_add(avl, box(860), box(1589), NULL); + avl = gpr_avl_add(avl, box(173), box(1590), NULL); avl = remove_int(avl, 649); avl = remove_int(avl, 913); avl = remove_int(avl, 1); avl = remove_int(avl, 304); - avl = gpr_avl_add(avl, box(604), box(1595)); - avl = gpr_avl_add(avl, box(639), box(1596)); + avl = gpr_avl_add(avl, box(604), box(1595), NULL); + avl = gpr_avl_add(avl, box(639), box(1596), NULL); avl = remove_int(avl, 431); - avl = gpr_avl_add(avl, box(993), box(1598)); + avl = gpr_avl_add(avl, box(993), box(1598), NULL); avl = remove_int(avl, 681); avl = remove_int(avl, 927); - avl = gpr_avl_add(avl, box(87), box(1601)); - avl = gpr_avl_add(avl, box(91), box(1602)); + avl = gpr_avl_add(avl, box(87), box(1601), NULL); + avl = gpr_avl_add(avl, box(91), box(1602), NULL); avl = remove_int(avl, 61); avl = remove_int(avl, 14); avl = remove_int(avl, 305); avl = remove_int(avl, 304); avl = remove_int(avl, 1016); - avl = gpr_avl_add(avl, box(903), box(1608)); - avl = gpr_avl_add(avl, box(951), box(1609)); - avl = gpr_avl_add(avl, box(146), box(1610)); - avl = gpr_avl_add(avl, box(482), box(1611)); - avl = gpr_avl_add(avl, box(71), box(1612)); + avl = gpr_avl_add(avl, box(903), box(1608), NULL); + avl = gpr_avl_add(avl, box(951), box(1609), NULL); + avl = gpr_avl_add(avl, box(146), box(1610), NULL); + avl = gpr_avl_add(avl, box(482), box(1611), NULL); + avl = gpr_avl_add(avl, box(71), box(1612), NULL); avl = remove_int(avl, 246); avl = remove_int(avl, 696); - avl = gpr_avl_add(avl, box(636), box(1615)); - avl = gpr_avl_add(avl, box(295), box(1616)); + avl = gpr_avl_add(avl, box(636), box(1615), NULL); + avl = gpr_avl_add(avl, box(295), box(1616), NULL); avl = remove_int(avl, 11); avl = remove_int(avl, 231); - avl = gpr_avl_add(avl, box(905), box(1619)); - avl = gpr_avl_add(avl, box(993), box(1620)); - avl = gpr_avl_add(avl, box(433), box(1621)); - avl = gpr_avl_add(avl, box(117), box(1622)); - avl = gpr_avl_add(avl, box(467), box(1623)); + avl = gpr_avl_add(avl, box(905), box(1619), NULL); + avl = gpr_avl_add(avl, box(993), box(1620), NULL); + avl = gpr_avl_add(avl, box(433), box(1621), NULL); + avl = gpr_avl_add(avl, box(117), box(1622), NULL); + avl = gpr_avl_add(avl, box(467), box(1623), NULL); avl = remove_int(avl, 419); - avl = gpr_avl_add(avl, box(179), box(1625)); + avl = gpr_avl_add(avl, box(179), box(1625), NULL); avl = remove_int(avl, 926); avl = remove_int(avl, 326); - avl = gpr_avl_add(avl, box(551), box(1628)); + avl = gpr_avl_add(avl, box(551), box(1628), NULL); avl = remove_int(avl, 14); avl = remove_int(avl, 476); avl = remove_int(avl, 823); - avl = gpr_avl_add(avl, box(350), box(1632)); - avl = gpr_avl_add(avl, box(133), box(1633)); + avl = gpr_avl_add(avl, box(350), box(1632), NULL); + avl = gpr_avl_add(avl, box(133), box(1633), NULL); avl = remove_int(avl, 906); - avl = gpr_avl_add(avl, box(827), box(1635)); - avl = gpr_avl_add(avl, box(201), box(1636)); + avl = gpr_avl_add(avl, box(827), box(1635), NULL); + avl = gpr_avl_add(avl, box(201), box(1636), NULL); avl = remove_int(avl, 124); avl = remove_int(avl, 662); - avl = gpr_avl_add(avl, box(314), box(1639)); - avl = gpr_avl_add(avl, box(986), box(1640)); - avl = gpr_avl_add(avl, box(622), box(1641)); + avl = gpr_avl_add(avl, box(314), box(1639), NULL); + avl = gpr_avl_add(avl, box(986), box(1640), NULL); + avl = gpr_avl_add(avl, box(622), box(1641), NULL); avl = remove_int(avl, 130); - avl = gpr_avl_add(avl, box(861), box(1643)); + avl = gpr_avl_add(avl, box(861), box(1643), NULL); avl = remove_int(avl, 497); avl = remove_int(avl, 905); - avl = gpr_avl_add(avl, box(502), box(1646)); + avl = gpr_avl_add(avl, box(502), box(1646), NULL); avl = remove_int(avl, 721); - avl = gpr_avl_add(avl, box(514), box(1648)); - avl = gpr_avl_add(avl, box(410), box(1649)); + avl = gpr_avl_add(avl, box(514), box(1648), NULL); + avl = gpr_avl_add(avl, box(410), box(1649), NULL); avl = remove_int(avl, 869); avl = remove_int(avl, 247); - avl = gpr_avl_add(avl, box(450), box(1652)); + avl = gpr_avl_add(avl, box(450), box(1652), NULL); avl = remove_int(avl, 364); - avl = gpr_avl_add(avl, box(963), box(1654)); - avl = gpr_avl_add(avl, box(146), box(1655)); + avl = gpr_avl_add(avl, box(963), box(1654), NULL); + avl = gpr_avl_add(avl, box(146), box(1655), NULL); avl = remove_int(avl, 147); avl = remove_int(avl, 789); - avl = gpr_avl_add(avl, box(693), box(1658)); - avl = gpr_avl_add(avl, box(959), box(1659)); + avl = gpr_avl_add(avl, box(693), box(1658), NULL); + avl = gpr_avl_add(avl, box(959), box(1659), NULL); avl = remove_int(avl, 478); - avl = gpr_avl_add(avl, box(116), box(1661)); - avl = gpr_avl_add(avl, box(520), box(1662)); - avl = gpr_avl_add(avl, box(809), box(1663)); - avl = gpr_avl_add(avl, box(667), box(1664)); - avl = gpr_avl_add(avl, box(406), box(1665)); + avl = gpr_avl_add(avl, box(116), box(1661), NULL); + avl = gpr_avl_add(avl, box(520), box(1662), NULL); + avl = gpr_avl_add(avl, box(809), box(1663), NULL); + avl = gpr_avl_add(avl, box(667), box(1664), NULL); + avl = gpr_avl_add(avl, box(406), box(1665), NULL); avl = remove_int(avl, 409); - avl = gpr_avl_add(avl, box(558), box(1667)); - avl = gpr_avl_add(avl, box(0), box(1668)); - avl = gpr_avl_add(avl, box(948), box(1669)); - avl = gpr_avl_add(avl, box(576), box(1670)); + avl = gpr_avl_add(avl, box(558), box(1667), NULL); + avl = gpr_avl_add(avl, box(0), box(1668), NULL); + avl = gpr_avl_add(avl, box(948), box(1669), NULL); + avl = gpr_avl_add(avl, box(576), box(1670), NULL); avl = remove_int(avl, 864); avl = remove_int(avl, 840); avl = remove_int(avl, 1001); - avl = gpr_avl_add(avl, box(232), box(1674)); + avl = gpr_avl_add(avl, box(232), box(1674), NULL); avl = remove_int(avl, 676); avl = remove_int(avl, 752); avl = remove_int(avl, 667); avl = remove_int(avl, 605); - avl = gpr_avl_add(avl, box(258), box(1679)); - avl = gpr_avl_add(avl, box(648), box(1680)); - avl = gpr_avl_add(avl, box(761), box(1681)); + avl = gpr_avl_add(avl, box(258), box(1679), NULL); + avl = gpr_avl_add(avl, box(648), box(1680), NULL); + avl = gpr_avl_add(avl, box(761), box(1681), NULL); avl = remove_int(avl, 293); avl = remove_int(avl, 893); - avl = gpr_avl_add(avl, box(194), box(1684)); + avl = gpr_avl_add(avl, box(194), box(1684), NULL); avl = remove_int(avl, 233); - avl = gpr_avl_add(avl, box(888), box(1686)); + avl = gpr_avl_add(avl, box(888), box(1686), NULL); avl = remove_int(avl, 470); avl = remove_int(avl, 703); avl = remove_int(avl, 190); avl = remove_int(avl, 359); - avl = gpr_avl_add(avl, box(621), box(1691)); + avl = gpr_avl_add(avl, box(621), box(1691), NULL); avl = remove_int(avl, 634); avl = remove_int(avl, 335); - avl = gpr_avl_add(avl, box(718), box(1694)); - avl = gpr_avl_add(avl, box(463), box(1695)); - avl = gpr_avl_add(avl, box(233), box(1696)); + avl = gpr_avl_add(avl, box(718), box(1694), NULL); + avl = gpr_avl_add(avl, box(463), box(1695), NULL); + avl = gpr_avl_add(avl, box(233), box(1696), NULL); avl = remove_int(avl, 376); avl = remove_int(avl, 496); avl = remove_int(avl, 819); avl = remove_int(avl, 38); avl = remove_int(avl, 436); avl = remove_int(avl, 102); - avl = gpr_avl_add(avl, box(607), box(1703)); + avl = gpr_avl_add(avl, box(607), box(1703), NULL); avl = remove_int(avl, 329); - avl = gpr_avl_add(avl, box(716), box(1705)); + avl = gpr_avl_add(avl, box(716), box(1705), NULL); avl = remove_int(avl, 639); avl = remove_int(avl, 775); avl = remove_int(avl, 578); @@ -2849,402 +2851,402 @@ static void test_badcase3(void) { avl = remove_int(avl, 679); avl = remove_int(avl, 615); avl = remove_int(avl, 104); - avl = gpr_avl_add(avl, box(414), box(1713)); - avl = gpr_avl_add(avl, box(212), box(1714)); - avl = gpr_avl_add(avl, box(266), box(1715)); - avl = gpr_avl_add(avl, box(238), box(1716)); + avl = gpr_avl_add(avl, box(414), box(1713), NULL); + avl = gpr_avl_add(avl, box(212), box(1714), NULL); + avl = gpr_avl_add(avl, box(266), box(1715), NULL); + avl = gpr_avl_add(avl, box(238), box(1716), NULL); avl = remove_int(avl, 153); - avl = gpr_avl_add(avl, box(585), box(1718)); + avl = gpr_avl_add(avl, box(585), box(1718), NULL); avl = remove_int(avl, 121); - avl = gpr_avl_add(avl, box(534), box(1720)); + avl = gpr_avl_add(avl, box(534), box(1720), NULL); avl = remove_int(avl, 579); - avl = gpr_avl_add(avl, box(127), box(1722)); - avl = gpr_avl_add(avl, box(399), box(1723)); + avl = gpr_avl_add(avl, box(127), box(1722), NULL); + avl = gpr_avl_add(avl, box(399), box(1723), NULL); avl = remove_int(avl, 417); - avl = gpr_avl_add(avl, box(978), box(1725)); - avl = gpr_avl_add(avl, box(768), box(1726)); + avl = gpr_avl_add(avl, box(978), box(1725), NULL); + avl = gpr_avl_add(avl, box(768), box(1726), NULL); avl = remove_int(avl, 985); - avl = gpr_avl_add(avl, box(536), box(1728)); - avl = gpr_avl_add(avl, box(449), box(1729)); - avl = gpr_avl_add(avl, box(586), box(1730)); + avl = gpr_avl_add(avl, box(536), box(1728), NULL); + avl = gpr_avl_add(avl, box(449), box(1729), NULL); + avl = gpr_avl_add(avl, box(586), box(1730), NULL); avl = remove_int(avl, 998); avl = remove_int(avl, 394); avl = remove_int(avl, 141); - avl = gpr_avl_add(avl, box(889), box(1734)); - avl = gpr_avl_add(avl, box(871), box(1735)); - avl = gpr_avl_add(avl, box(76), box(1736)); - avl = gpr_avl_add(avl, box(549), box(1737)); - avl = gpr_avl_add(avl, box(757), box(1738)); + avl = gpr_avl_add(avl, box(889), box(1734), NULL); + avl = gpr_avl_add(avl, box(871), box(1735), NULL); + avl = gpr_avl_add(avl, box(76), box(1736), NULL); + avl = gpr_avl_add(avl, box(549), box(1737), NULL); + avl = gpr_avl_add(avl, box(757), box(1738), NULL); avl = remove_int(avl, 908); - avl = gpr_avl_add(avl, box(789), box(1740)); + avl = gpr_avl_add(avl, box(789), box(1740), NULL); avl = remove_int(avl, 224); - avl = gpr_avl_add(avl, box(407), box(1742)); - avl = gpr_avl_add(avl, box(381), box(1743)); - avl = gpr_avl_add(avl, box(561), box(1744)); - avl = gpr_avl_add(avl, box(667), box(1745)); - avl = gpr_avl_add(avl, box(522), box(1746)); - avl = gpr_avl_add(avl, box(948), box(1747)); + avl = gpr_avl_add(avl, box(407), box(1742), NULL); + avl = gpr_avl_add(avl, box(381), box(1743), NULL); + avl = gpr_avl_add(avl, box(561), box(1744), NULL); + avl = gpr_avl_add(avl, box(667), box(1745), NULL); + avl = gpr_avl_add(avl, box(522), box(1746), NULL); + avl = gpr_avl_add(avl, box(948), box(1747), NULL); avl = remove_int(avl, 770); - avl = gpr_avl_add(avl, box(872), box(1749)); - avl = gpr_avl_add(avl, box(327), box(1750)); + avl = gpr_avl_add(avl, box(872), box(1749), NULL); + avl = gpr_avl_add(avl, box(327), box(1750), NULL); avl = remove_int(avl, 10); - avl = gpr_avl_add(avl, box(122), box(1752)); + avl = gpr_avl_add(avl, box(122), box(1752), NULL); avl = remove_int(avl, 606); - avl = gpr_avl_add(avl, box(485), box(1754)); + avl = gpr_avl_add(avl, box(485), box(1754), NULL); avl = remove_int(avl, 6); - avl = gpr_avl_add(avl, box(329), box(1756)); - avl = gpr_avl_add(avl, box(783), box(1757)); + avl = gpr_avl_add(avl, box(329), box(1756), NULL); + avl = gpr_avl_add(avl, box(783), box(1757), NULL); avl = remove_int(avl, 416); - avl = gpr_avl_add(avl, box(656), box(1759)); - avl = gpr_avl_add(avl, box(971), box(1760)); - avl = gpr_avl_add(avl, box(77), box(1761)); - avl = gpr_avl_add(avl, box(942), box(1762)); + avl = gpr_avl_add(avl, box(656), box(1759), NULL); + avl = gpr_avl_add(avl, box(971), box(1760), NULL); + avl = gpr_avl_add(avl, box(77), box(1761), NULL); + avl = gpr_avl_add(avl, box(942), box(1762), NULL); avl = remove_int(avl, 361); - avl = gpr_avl_add(avl, box(66), box(1764)); - avl = gpr_avl_add(avl, box(299), box(1765)); - avl = gpr_avl_add(avl, box(929), box(1766)); - avl = gpr_avl_add(avl, box(797), box(1767)); + avl = gpr_avl_add(avl, box(66), box(1764), NULL); + avl = gpr_avl_add(avl, box(299), box(1765), NULL); + avl = gpr_avl_add(avl, box(929), box(1766), NULL); + avl = gpr_avl_add(avl, box(797), box(1767), NULL); avl = remove_int(avl, 869); avl = remove_int(avl, 907); - avl = gpr_avl_add(avl, box(870), box(1770)); + avl = gpr_avl_add(avl, box(870), box(1770), NULL); avl = remove_int(avl, 580); avl = remove_int(avl, 120); - avl = gpr_avl_add(avl, box(913), box(1773)); + avl = gpr_avl_add(avl, box(913), box(1773), NULL); avl = remove_int(avl, 480); - avl = gpr_avl_add(avl, box(489), box(1775)); + avl = gpr_avl_add(avl, box(489), box(1775), NULL); avl = remove_int(avl, 845); - avl = gpr_avl_add(avl, box(896), box(1777)); + avl = gpr_avl_add(avl, box(896), box(1777), NULL); avl = remove_int(avl, 567); avl = remove_int(avl, 427); - avl = gpr_avl_add(avl, box(443), box(1780)); - avl = gpr_avl_add(avl, box(3), box(1781)); + avl = gpr_avl_add(avl, box(443), box(1780), NULL); + avl = gpr_avl_add(avl, box(3), box(1781), NULL); avl = remove_int(avl, 12); - avl = gpr_avl_add(avl, box(376), box(1783)); - avl = gpr_avl_add(avl, box(155), box(1784)); - avl = gpr_avl_add(avl, box(188), box(1785)); - avl = gpr_avl_add(avl, box(149), box(1786)); - avl = gpr_avl_add(avl, box(178), box(1787)); + avl = gpr_avl_add(avl, box(376), box(1783), NULL); + avl = gpr_avl_add(avl, box(155), box(1784), NULL); + avl = gpr_avl_add(avl, box(188), box(1785), NULL); + avl = gpr_avl_add(avl, box(149), box(1786), NULL); + avl = gpr_avl_add(avl, box(178), box(1787), NULL); avl = remove_int(avl, 84); - avl = gpr_avl_add(avl, box(805), box(1789)); - avl = gpr_avl_add(avl, box(612), box(1790)); + avl = gpr_avl_add(avl, box(805), box(1789), NULL); + avl = gpr_avl_add(avl, box(612), box(1790), NULL); avl = remove_int(avl, 991); - avl = gpr_avl_add(avl, box(837), box(1792)); + avl = gpr_avl_add(avl, box(837), box(1792), NULL); avl = remove_int(avl, 173); avl = remove_int(avl, 72); - avl = gpr_avl_add(avl, box(1014), box(1795)); + avl = gpr_avl_add(avl, box(1014), box(1795), NULL); avl = remove_int(avl, 303); - avl = gpr_avl_add(avl, box(865), box(1797)); - avl = gpr_avl_add(avl, box(793), box(1798)); + avl = gpr_avl_add(avl, box(865), box(1797), NULL); + avl = gpr_avl_add(avl, box(793), box(1798), NULL); avl = remove_int(avl, 173); avl = remove_int(avl, 477); - avl = gpr_avl_add(avl, box(950), box(1801)); - avl = gpr_avl_add(avl, box(105), box(1802)); - avl = gpr_avl_add(avl, box(895), box(1803)); - avl = gpr_avl_add(avl, box(171), box(1804)); - avl = gpr_avl_add(avl, box(753), box(1805)); - avl = gpr_avl_add(avl, box(946), box(1806)); + avl = gpr_avl_add(avl, box(950), box(1801), NULL); + avl = gpr_avl_add(avl, box(105), box(1802), NULL); + avl = gpr_avl_add(avl, box(895), box(1803), NULL); + avl = gpr_avl_add(avl, box(171), box(1804), NULL); + avl = gpr_avl_add(avl, box(753), box(1805), NULL); + avl = gpr_avl_add(avl, box(946), box(1806), NULL); avl = remove_int(avl, 194); avl = remove_int(avl, 559); avl = remove_int(avl, 116); - avl = gpr_avl_add(avl, box(968), box(1810)); + avl = gpr_avl_add(avl, box(968), box(1810), NULL); avl = remove_int(avl, 124); avl = remove_int(avl, 99); - avl = gpr_avl_add(avl, box(563), box(1813)); + avl = gpr_avl_add(avl, box(563), box(1813), NULL); avl = remove_int(avl, 182); - avl = gpr_avl_add(avl, box(816), box(1815)); + avl = gpr_avl_add(avl, box(816), box(1815), NULL); avl = remove_int(avl, 73); avl = remove_int(avl, 261); - avl = gpr_avl_add(avl, box(847), box(1818)); - avl = gpr_avl_add(avl, box(368), box(1819)); - avl = gpr_avl_add(avl, box(808), box(1820)); - avl = gpr_avl_add(avl, box(779), box(1821)); + avl = gpr_avl_add(avl, box(847), box(1818), NULL); + avl = gpr_avl_add(avl, box(368), box(1819), NULL); + avl = gpr_avl_add(avl, box(808), box(1820), NULL); + avl = gpr_avl_add(avl, box(779), box(1821), NULL); avl = remove_int(avl, 818); - avl = gpr_avl_add(avl, box(466), box(1823)); + avl = gpr_avl_add(avl, box(466), box(1823), NULL); avl = remove_int(avl, 316); - avl = gpr_avl_add(avl, box(986), box(1825)); - avl = gpr_avl_add(avl, box(688), box(1826)); - avl = gpr_avl_add(avl, box(509), box(1827)); - avl = gpr_avl_add(avl, box(51), box(1828)); + avl = gpr_avl_add(avl, box(986), box(1825), NULL); + avl = gpr_avl_add(avl, box(688), box(1826), NULL); + avl = gpr_avl_add(avl, box(509), box(1827), NULL); + avl = gpr_avl_add(avl, box(51), box(1828), NULL); avl = remove_int(avl, 655); avl = remove_int(avl, 785); avl = remove_int(avl, 893); - avl = gpr_avl_add(avl, box(167), box(1832)); + avl = gpr_avl_add(avl, box(167), box(1832), NULL); avl = remove_int(avl, 13); avl = remove_int(avl, 263); - avl = gpr_avl_add(avl, box(1009), box(1835)); + avl = gpr_avl_add(avl, box(1009), box(1835), NULL); avl = remove_int(avl, 480); avl = remove_int(avl, 778); avl = remove_int(avl, 713); avl = remove_int(avl, 628); - avl = gpr_avl_add(avl, box(803), box(1840)); + avl = gpr_avl_add(avl, box(803), box(1840), NULL); avl = remove_int(avl, 267); - avl = gpr_avl_add(avl, box(676), box(1842)); - avl = gpr_avl_add(avl, box(231), box(1843)); - avl = gpr_avl_add(avl, box(824), box(1844)); + avl = gpr_avl_add(avl, box(676), box(1842), NULL); + avl = gpr_avl_add(avl, box(231), box(1843), NULL); + avl = gpr_avl_add(avl, box(824), box(1844), NULL); avl = remove_int(avl, 961); - avl = gpr_avl_add(avl, box(311), box(1846)); - avl = gpr_avl_add(avl, box(420), box(1847)); - avl = gpr_avl_add(avl, box(960), box(1848)); - avl = gpr_avl_add(avl, box(468), box(1849)); - avl = gpr_avl_add(avl, box(815), box(1850)); + avl = gpr_avl_add(avl, box(311), box(1846), NULL); + avl = gpr_avl_add(avl, box(420), box(1847), NULL); + avl = gpr_avl_add(avl, box(960), box(1848), NULL); + avl = gpr_avl_add(avl, box(468), box(1849), NULL); + avl = gpr_avl_add(avl, box(815), box(1850), NULL); avl = remove_int(avl, 247); avl = remove_int(avl, 194); - avl = gpr_avl_add(avl, box(546), box(1853)); + avl = gpr_avl_add(avl, box(546), box(1853), NULL); avl = remove_int(avl, 222); avl = remove_int(avl, 914); avl = remove_int(avl, 741); - avl = gpr_avl_add(avl, box(470), box(1857)); - avl = gpr_avl_add(avl, box(933), box(1858)); - avl = gpr_avl_add(avl, box(97), box(1859)); + avl = gpr_avl_add(avl, box(470), box(1857), NULL); + avl = gpr_avl_add(avl, box(933), box(1858), NULL); + avl = gpr_avl_add(avl, box(97), box(1859), NULL); avl = remove_int(avl, 564); avl = remove_int(avl, 295); - avl = gpr_avl_add(avl, box(864), box(1862)); + avl = gpr_avl_add(avl, box(864), box(1862), NULL); avl = remove_int(avl, 329); - avl = gpr_avl_add(avl, box(124), box(1864)); - avl = gpr_avl_add(avl, box(1000), box(1865)); - avl = gpr_avl_add(avl, box(228), box(1866)); - avl = gpr_avl_add(avl, box(187), box(1867)); + avl = gpr_avl_add(avl, box(124), box(1864), NULL); + avl = gpr_avl_add(avl, box(1000), box(1865), NULL); + avl = gpr_avl_add(avl, box(228), box(1866), NULL); + avl = gpr_avl_add(avl, box(187), box(1867), NULL); avl = remove_int(avl, 224); avl = remove_int(avl, 306); avl = remove_int(avl, 884); - avl = gpr_avl_add(avl, box(449), box(1871)); - avl = gpr_avl_add(avl, box(353), box(1872)); - avl = gpr_avl_add(avl, box(994), box(1873)); - avl = gpr_avl_add(avl, box(596), box(1874)); - avl = gpr_avl_add(avl, box(996), box(1875)); - avl = gpr_avl_add(avl, box(101), box(1876)); - avl = gpr_avl_add(avl, box(1012), box(1877)); - avl = gpr_avl_add(avl, box(982), box(1878)); - avl = gpr_avl_add(avl, box(742), box(1879)); + avl = gpr_avl_add(avl, box(449), box(1871), NULL); + avl = gpr_avl_add(avl, box(353), box(1872), NULL); + avl = gpr_avl_add(avl, box(994), box(1873), NULL); + avl = gpr_avl_add(avl, box(596), box(1874), NULL); + avl = gpr_avl_add(avl, box(996), box(1875), NULL); + avl = gpr_avl_add(avl, box(101), box(1876), NULL); + avl = gpr_avl_add(avl, box(1012), box(1877), NULL); + avl = gpr_avl_add(avl, box(982), box(1878), NULL); + avl = gpr_avl_add(avl, box(742), box(1879), NULL); avl = remove_int(avl, 92); avl = remove_int(avl, 1022); - avl = gpr_avl_add(avl, box(941), box(1882)); + avl = gpr_avl_add(avl, box(941), box(1882), NULL); avl = remove_int(avl, 742); avl = remove_int(avl, 919); - avl = gpr_avl_add(avl, box(588), box(1885)); + avl = gpr_avl_add(avl, box(588), box(1885), NULL); avl = remove_int(avl, 221); - avl = gpr_avl_add(avl, box(356), box(1887)); - avl = gpr_avl_add(avl, box(932), box(1888)); + avl = gpr_avl_add(avl, box(356), box(1887), NULL); + avl = gpr_avl_add(avl, box(932), box(1888), NULL); avl = remove_int(avl, 837); - avl = gpr_avl_add(avl, box(394), box(1890)); - avl = gpr_avl_add(avl, box(642), box(1891)); - avl = gpr_avl_add(avl, box(52), box(1892)); - avl = gpr_avl_add(avl, box(437), box(1893)); - avl = gpr_avl_add(avl, box(948), box(1894)); - avl = gpr_avl_add(avl, box(93), box(1895)); + avl = gpr_avl_add(avl, box(394), box(1890), NULL); + avl = gpr_avl_add(avl, box(642), box(1891), NULL); + avl = gpr_avl_add(avl, box(52), box(1892), NULL); + avl = gpr_avl_add(avl, box(437), box(1893), NULL); + avl = gpr_avl_add(avl, box(948), box(1894), NULL); + avl = gpr_avl_add(avl, box(93), box(1895), NULL); avl = remove_int(avl, 873); avl = remove_int(avl, 336); avl = remove_int(avl, 277); avl = remove_int(avl, 932); - avl = gpr_avl_add(avl, box(80), box(1900)); - avl = gpr_avl_add(avl, box(952), box(1901)); - avl = gpr_avl_add(avl, box(510), box(1902)); + avl = gpr_avl_add(avl, box(80), box(1900), NULL); + avl = gpr_avl_add(avl, box(952), box(1901), NULL); + avl = gpr_avl_add(avl, box(510), box(1902), NULL); avl = remove_int(avl, 876); avl = remove_int(avl, 612); - avl = gpr_avl_add(avl, box(923), box(1905)); - avl = gpr_avl_add(avl, box(475), box(1906)); + avl = gpr_avl_add(avl, box(923), box(1905), NULL); + avl = gpr_avl_add(avl, box(475), box(1906), NULL); avl = remove_int(avl, 478); avl = remove_int(avl, 148); - avl = gpr_avl_add(avl, box(538), box(1909)); + avl = gpr_avl_add(avl, box(538), box(1909), NULL); avl = remove_int(avl, 47); - avl = gpr_avl_add(avl, box(89), box(1911)); + avl = gpr_avl_add(avl, box(89), box(1911), NULL); avl = remove_int(avl, 723); - avl = gpr_avl_add(avl, box(687), box(1913)); - avl = gpr_avl_add(avl, box(480), box(1914)); - avl = gpr_avl_add(avl, box(149), box(1915)); + avl = gpr_avl_add(avl, box(687), box(1913), NULL); + avl = gpr_avl_add(avl, box(480), box(1914), NULL); + avl = gpr_avl_add(avl, box(149), box(1915), NULL); avl = remove_int(avl, 68); avl = remove_int(avl, 862); avl = remove_int(avl, 363); - avl = gpr_avl_add(avl, box(996), box(1919)); + avl = gpr_avl_add(avl, box(996), box(1919), NULL); avl = remove_int(avl, 380); - avl = gpr_avl_add(avl, box(957), box(1921)); + avl = gpr_avl_add(avl, box(957), box(1921), NULL); avl = remove_int(avl, 413); - avl = gpr_avl_add(avl, box(360), box(1923)); - avl = gpr_avl_add(avl, box(304), box(1924)); - avl = gpr_avl_add(avl, box(634), box(1925)); - avl = gpr_avl_add(avl, box(506), box(1926)); + avl = gpr_avl_add(avl, box(360), box(1923), NULL); + avl = gpr_avl_add(avl, box(304), box(1924), NULL); + avl = gpr_avl_add(avl, box(634), box(1925), NULL); + avl = gpr_avl_add(avl, box(506), box(1926), NULL); avl = remove_int(avl, 248); - avl = gpr_avl_add(avl, box(124), box(1928)); - avl = gpr_avl_add(avl, box(181), box(1929)); + avl = gpr_avl_add(avl, box(124), box(1928), NULL); + avl = gpr_avl_add(avl, box(181), box(1929), NULL); avl = remove_int(avl, 507); - avl = gpr_avl_add(avl, box(141), box(1931)); + avl = gpr_avl_add(avl, box(141), box(1931), NULL); avl = remove_int(avl, 409); avl = remove_int(avl, 129); avl = remove_int(avl, 694); avl = remove_int(avl, 723); - avl = gpr_avl_add(avl, box(998), box(1936)); - avl = gpr_avl_add(avl, box(906), box(1937)); - avl = gpr_avl_add(avl, box(44), box(1938)); + avl = gpr_avl_add(avl, box(998), box(1936), NULL); + avl = gpr_avl_add(avl, box(906), box(1937), NULL); + avl = gpr_avl_add(avl, box(44), box(1938), NULL); avl = remove_int(avl, 949); avl = remove_int(avl, 117); - avl = gpr_avl_add(avl, box(700), box(1941)); - avl = gpr_avl_add(avl, box(258), box(1942)); + avl = gpr_avl_add(avl, box(700), box(1941), NULL); + avl = gpr_avl_add(avl, box(258), box(1942), NULL); avl = remove_int(avl, 828); - avl = gpr_avl_add(avl, box(860), box(1944)); - avl = gpr_avl_add(avl, box(987), box(1945)); - avl = gpr_avl_add(avl, box(316), box(1946)); - avl = gpr_avl_add(avl, box(919), box(1947)); + avl = gpr_avl_add(avl, box(860), box(1944), NULL); + avl = gpr_avl_add(avl, box(987), box(1945), NULL); + avl = gpr_avl_add(avl, box(316), box(1946), NULL); + avl = gpr_avl_add(avl, box(919), box(1947), NULL); avl = remove_int(avl, 84); - avl = gpr_avl_add(avl, box(473), box(1949)); + avl = gpr_avl_add(avl, box(473), box(1949), NULL); avl = remove_int(avl, 127); avl = remove_int(avl, 829); avl = remove_int(avl, 829); - avl = gpr_avl_add(avl, box(488), box(1953)); - avl = gpr_avl_add(avl, box(954), box(1954)); + avl = gpr_avl_add(avl, box(488), box(1953), NULL); + avl = gpr_avl_add(avl, box(954), box(1954), NULL); avl = remove_int(avl, 198); avl = remove_int(avl, 972); avl = remove_int(avl, 670); - avl = gpr_avl_add(avl, box(822), box(1958)); + avl = gpr_avl_add(avl, box(822), box(1958), NULL); avl = remove_int(avl, 589); avl = remove_int(avl, 459); - avl = gpr_avl_add(avl, box(1003), box(1961)); - avl = gpr_avl_add(avl, box(657), box(1962)); - avl = gpr_avl_add(avl, box(477), box(1963)); - avl = gpr_avl_add(avl, box(923), box(1964)); + avl = gpr_avl_add(avl, box(1003), box(1961), NULL); + avl = gpr_avl_add(avl, box(657), box(1962), NULL); + avl = gpr_avl_add(avl, box(477), box(1963), NULL); + avl = gpr_avl_add(avl, box(923), box(1964), NULL); avl = remove_int(avl, 496); avl = remove_int(avl, 99); - avl = gpr_avl_add(avl, box(127), box(1967)); - avl = gpr_avl_add(avl, box(1013), box(1968)); - avl = gpr_avl_add(avl, box(778), box(1969)); + avl = gpr_avl_add(avl, box(127), box(1967), NULL); + avl = gpr_avl_add(avl, box(1013), box(1968), NULL); + avl = gpr_avl_add(avl, box(778), box(1969), NULL); avl = remove_int(avl, 5); avl = remove_int(avl, 990); avl = remove_int(avl, 850); avl = remove_int(avl, 160); avl = remove_int(avl, 86); - avl = gpr_avl_add(avl, box(283), box(1975)); + avl = gpr_avl_add(avl, box(283), box(1975), NULL); avl = remove_int(avl, 278); avl = remove_int(avl, 297); avl = remove_int(avl, 137); avl = remove_int(avl, 653); - avl = gpr_avl_add(avl, box(702), box(1980)); + avl = gpr_avl_add(avl, box(702), box(1980), NULL); avl = remove_int(avl, 63); avl = remove_int(avl, 427); avl = remove_int(avl, 706); avl = remove_int(avl, 806); - avl = gpr_avl_add(avl, box(335), box(1985)); - avl = gpr_avl_add(avl, box(412), box(1986)); + avl = gpr_avl_add(avl, box(335), box(1985), NULL); + avl = gpr_avl_add(avl, box(412), box(1986), NULL); avl = remove_int(avl, 766); avl = remove_int(avl, 937); avl = remove_int(avl, 886); avl = remove_int(avl, 652); - avl = gpr_avl_add(avl, box(545), box(1991)); - avl = gpr_avl_add(avl, box(408), box(1992)); - avl = gpr_avl_add(avl, box(841), box(1993)); + avl = gpr_avl_add(avl, box(545), box(1991), NULL); + avl = gpr_avl_add(avl, box(408), box(1992), NULL); + avl = gpr_avl_add(avl, box(841), box(1993), NULL); avl = remove_int(avl, 593); - avl = gpr_avl_add(avl, box(582), box(1995)); - avl = gpr_avl_add(avl, box(597), box(1996)); + avl = gpr_avl_add(avl, box(582), box(1995), NULL); + avl = gpr_avl_add(avl, box(597), box(1996), NULL); avl = remove_int(avl, 49); avl = remove_int(avl, 835); - avl = gpr_avl_add(avl, box(417), box(1999)); - avl = gpr_avl_add(avl, box(191), box(2000)); + avl = gpr_avl_add(avl, box(417), box(1999), NULL); + avl = gpr_avl_add(avl, box(191), box(2000), NULL); avl = remove_int(avl, 406); - avl = gpr_avl_add(avl, box(30), box(2002)); + avl = gpr_avl_add(avl, box(30), box(2002), NULL); avl = remove_int(avl, 841); avl = remove_int(avl, 50); - avl = gpr_avl_add(avl, box(967), box(2005)); - avl = gpr_avl_add(avl, box(849), box(2006)); + avl = gpr_avl_add(avl, box(967), box(2005), NULL); + avl = gpr_avl_add(avl, box(849), box(2006), NULL); avl = remove_int(avl, 608); - avl = gpr_avl_add(avl, box(306), box(2008)); + avl = gpr_avl_add(avl, box(306), box(2008), NULL); avl = remove_int(avl, 779); - avl = gpr_avl_add(avl, box(897), box(2010)); - avl = gpr_avl_add(avl, box(147), box(2011)); + avl = gpr_avl_add(avl, box(897), box(2010), NULL); + avl = gpr_avl_add(avl, box(147), box(2011), NULL); avl = remove_int(avl, 982); - avl = gpr_avl_add(avl, box(470), box(2013)); + avl = gpr_avl_add(avl, box(470), box(2013), NULL); avl = remove_int(avl, 951); - avl = gpr_avl_add(avl, box(388), box(2015)); + avl = gpr_avl_add(avl, box(388), box(2015), NULL); avl = remove_int(avl, 616); avl = remove_int(avl, 721); avl = remove_int(avl, 942); avl = remove_int(avl, 589); - avl = gpr_avl_add(avl, box(218), box(2020)); + avl = gpr_avl_add(avl, box(218), box(2020), NULL); avl = remove_int(avl, 671); - avl = gpr_avl_add(avl, box(1020), box(2022)); + avl = gpr_avl_add(avl, box(1020), box(2022), NULL); avl = remove_int(avl, 277); - avl = gpr_avl_add(avl, box(681), box(2024)); - avl = gpr_avl_add(avl, box(179), box(2025)); - avl = gpr_avl_add(avl, box(370), box(2026)); - avl = gpr_avl_add(avl, box(0), box(2027)); + avl = gpr_avl_add(avl, box(681), box(2024), NULL); + avl = gpr_avl_add(avl, box(179), box(2025), NULL); + avl = gpr_avl_add(avl, box(370), box(2026), NULL); + avl = gpr_avl_add(avl, box(0), box(2027), NULL); avl = remove_int(avl, 523); - avl = gpr_avl_add(avl, box(99), box(2029)); - avl = gpr_avl_add(avl, box(334), box(2030)); - avl = gpr_avl_add(avl, box(569), box(2031)); - avl = gpr_avl_add(avl, box(257), box(2032)); + avl = gpr_avl_add(avl, box(99), box(2029), NULL); + avl = gpr_avl_add(avl, box(334), box(2030), NULL); + avl = gpr_avl_add(avl, box(569), box(2031), NULL); + avl = gpr_avl_add(avl, box(257), box(2032), NULL); avl = remove_int(avl, 572); - avl = gpr_avl_add(avl, box(805), box(2034)); - avl = gpr_avl_add(avl, box(143), box(2035)); - avl = gpr_avl_add(avl, box(670), box(2036)); + avl = gpr_avl_add(avl, box(805), box(2034), NULL); + avl = gpr_avl_add(avl, box(143), box(2035), NULL); + avl = gpr_avl_add(avl, box(670), box(2036), NULL); avl = remove_int(avl, 42); - avl = gpr_avl_add(avl, box(46), box(2038)); + avl = gpr_avl_add(avl, box(46), box(2038), NULL); avl = remove_int(avl, 970); - avl = gpr_avl_add(avl, box(353), box(2040)); + avl = gpr_avl_add(avl, box(353), box(2040), NULL); avl = remove_int(avl, 258); - avl = gpr_avl_add(avl, box(451), box(2042)); - avl = gpr_avl_add(avl, box(28), box(2043)); - avl = gpr_avl_add(avl, box(729), box(2044)); - avl = gpr_avl_add(avl, box(401), box(2045)); - avl = gpr_avl_add(avl, box(614), box(2046)); + avl = gpr_avl_add(avl, box(451), box(2042), NULL); + avl = gpr_avl_add(avl, box(28), box(2043), NULL); + avl = gpr_avl_add(avl, box(729), box(2044), NULL); + avl = gpr_avl_add(avl, box(401), box(2045), NULL); + avl = gpr_avl_add(avl, box(614), box(2046), NULL); avl = remove_int(avl, 990); avl = remove_int(avl, 212); avl = remove_int(avl, 22); avl = remove_int(avl, 677); - avl = gpr_avl_add(avl, box(1016), box(2051)); - avl = gpr_avl_add(avl, box(980), box(2052)); - avl = gpr_avl_add(avl, box(990), box(2053)); - avl = gpr_avl_add(avl, box(355), box(2054)); + avl = gpr_avl_add(avl, box(1016), box(2051), NULL); + avl = gpr_avl_add(avl, box(980), box(2052), NULL); + avl = gpr_avl_add(avl, box(990), box(2053), NULL); + avl = gpr_avl_add(avl, box(355), box(2054), NULL); avl = remove_int(avl, 730); avl = remove_int(avl, 37); - avl = gpr_avl_add(avl, box(407), box(2057)); - avl = gpr_avl_add(avl, box(222), box(2058)); - avl = gpr_avl_add(avl, box(439), box(2059)); - avl = gpr_avl_add(avl, box(563), box(2060)); + avl = gpr_avl_add(avl, box(407), box(2057), NULL); + avl = gpr_avl_add(avl, box(222), box(2058), NULL); + avl = gpr_avl_add(avl, box(439), box(2059), NULL); + avl = gpr_avl_add(avl, box(563), box(2060), NULL); avl = remove_int(avl, 992); avl = remove_int(avl, 786); - avl = gpr_avl_add(avl, box(1), box(2063)); - avl = gpr_avl_add(avl, box(473), box(2064)); - avl = gpr_avl_add(avl, box(992), box(2065)); + avl = gpr_avl_add(avl, box(1), box(2063), NULL); + avl = gpr_avl_add(avl, box(473), box(2064), NULL); + avl = gpr_avl_add(avl, box(992), box(2065), NULL); avl = remove_int(avl, 190); avl = remove_int(avl, 450); avl = remove_int(avl, 1020); avl = remove_int(avl, 149); - avl = gpr_avl_add(avl, box(329), box(2070)); - avl = gpr_avl_add(avl, box(35), box(2071)); + avl = gpr_avl_add(avl, box(329), box(2070), NULL); + avl = gpr_avl_add(avl, box(35), box(2071), NULL); avl = remove_int(avl, 843); - avl = gpr_avl_add(avl, box(855), box(2073)); + avl = gpr_avl_add(avl, box(855), box(2073), NULL); avl = remove_int(avl, 878); - avl = gpr_avl_add(avl, box(993), box(2075)); - avl = gpr_avl_add(avl, box(87), box(2076)); - avl = gpr_avl_add(avl, box(572), box(2077)); + avl = gpr_avl_add(avl, box(993), box(2075), NULL); + avl = gpr_avl_add(avl, box(87), box(2076), NULL); + avl = gpr_avl_add(avl, box(572), box(2077), NULL); avl = remove_int(avl, 896); - avl = gpr_avl_add(avl, box(849), box(2079)); + avl = gpr_avl_add(avl, box(849), box(2079), NULL); avl = remove_int(avl, 597); - avl = gpr_avl_add(avl, box(472), box(2081)); + avl = gpr_avl_add(avl, box(472), box(2081), NULL); avl = remove_int(avl, 778); avl = remove_int(avl, 934); avl = remove_int(avl, 314); - avl = gpr_avl_add(avl, box(101), box(2085)); + avl = gpr_avl_add(avl, box(101), box(2085), NULL); avl = remove_int(avl, 938); avl = remove_int(avl, 1010); - avl = gpr_avl_add(avl, box(579), box(2088)); + avl = gpr_avl_add(avl, box(579), box(2088), NULL); avl = remove_int(avl, 798); avl = remove_int(avl, 88); - avl = gpr_avl_add(avl, box(851), box(2091)); + avl = gpr_avl_add(avl, box(851), box(2091), NULL); avl = remove_int(avl, 705); - avl = gpr_avl_add(avl, box(26), box(2093)); + avl = gpr_avl_add(avl, box(26), box(2093), NULL); avl = remove_int(avl, 973); - avl = gpr_avl_add(avl, box(923), box(2095)); + avl = gpr_avl_add(avl, box(923), box(2095), NULL); avl = remove_int(avl, 668); - avl = gpr_avl_add(avl, box(310), box(2097)); - avl = gpr_avl_add(avl, box(269), box(2098)); + avl = gpr_avl_add(avl, box(310), box(2097), NULL); + avl = gpr_avl_add(avl, box(269), box(2098), NULL); avl = remove_int(avl, 173); - avl = gpr_avl_add(avl, box(279), box(2100)); + avl = gpr_avl_add(avl, box(279), box(2100), NULL); avl = remove_int(avl, 203); - avl = gpr_avl_add(avl, box(411), box(2102)); + avl = gpr_avl_add(avl, box(411), box(2102), NULL); avl = remove_int(avl, 950); - avl = gpr_avl_add(avl, box(6), box(2104)); + avl = gpr_avl_add(avl, box(6), box(2104), NULL); avl = remove_int(avl, 400); avl = remove_int(avl, 468); avl = remove_int(avl, 271); - avl = gpr_avl_add(avl, box(627), box(2108)); + avl = gpr_avl_add(avl, box(627), box(2108), NULL); avl = remove_int(avl, 727); avl = remove_int(avl, 148); avl = remove_int(avl, 98); @@ -3253,259 +3255,259 @@ static void test_badcase3(void) { avl = remove_int(avl, 628); avl = remove_int(avl, 826); avl = remove_int(avl, 664); - avl = gpr_avl_add(avl, box(76), box(2117)); + avl = gpr_avl_add(avl, box(76), box(2117), NULL); avl = remove_int(avl, 194); avl = remove_int(avl, 18); - avl = gpr_avl_add(avl, box(727), box(2120)); + avl = gpr_avl_add(avl, box(727), box(2120), NULL); avl = remove_int(avl, 295); - avl = gpr_avl_add(avl, box(645), box(2122)); + avl = gpr_avl_add(avl, box(645), box(2122), NULL); avl = remove_int(avl, 321); avl = remove_int(avl, 863); - avl = gpr_avl_add(avl, box(824), box(2125)); - avl = gpr_avl_add(avl, box(651), box(2126)); - avl = gpr_avl_add(avl, box(804), box(2127)); + avl = gpr_avl_add(avl, box(824), box(2125), NULL); + avl = gpr_avl_add(avl, box(651), box(2126), NULL); + avl = gpr_avl_add(avl, box(804), box(2127), NULL); avl = remove_int(avl, 307); - avl = gpr_avl_add(avl, box(867), box(2129)); + avl = gpr_avl_add(avl, box(867), box(2129), NULL); avl = remove_int(avl, 384); - avl = gpr_avl_add(avl, box(819), box(2131)); + avl = gpr_avl_add(avl, box(819), box(2131), NULL); avl = remove_int(avl, 674); - avl = gpr_avl_add(avl, box(76), box(2133)); + avl = gpr_avl_add(avl, box(76), box(2133), NULL); avl = remove_int(avl, 898); - avl = gpr_avl_add(avl, box(45), box(2135)); - avl = gpr_avl_add(avl, box(512), box(2136)); + avl = gpr_avl_add(avl, box(45), box(2135), NULL); + avl = gpr_avl_add(avl, box(512), box(2136), NULL); avl = remove_int(avl, 773); avl = remove_int(avl, 907); avl = remove_int(avl, 382); avl = remove_int(avl, 95); avl = remove_int(avl, 734); avl = remove_int(avl, 81); - avl = gpr_avl_add(avl, box(348), box(2143)); + avl = gpr_avl_add(avl, box(348), box(2143), NULL); avl = remove_int(avl, 509); avl = remove_int(avl, 301); - avl = gpr_avl_add(avl, box(861), box(2146)); - avl = gpr_avl_add(avl, box(918), box(2147)); + avl = gpr_avl_add(avl, box(861), box(2146), NULL); + avl = gpr_avl_add(avl, box(918), box(2147), NULL); avl = remove_int(avl, 992); - avl = gpr_avl_add(avl, box(356), box(2149)); + avl = gpr_avl_add(avl, box(356), box(2149), NULL); avl = remove_int(avl, 64); avl = remove_int(avl, 444); avl = remove_int(avl, 741); - avl = gpr_avl_add(avl, box(710), box(2153)); - avl = gpr_avl_add(avl, box(264), box(2154)); + avl = gpr_avl_add(avl, box(710), box(2153), NULL); + avl = gpr_avl_add(avl, box(264), box(2154), NULL); avl = remove_int(avl, 347); avl = remove_int(avl, 250); - avl = gpr_avl_add(avl, box(82), box(2157)); - avl = gpr_avl_add(avl, box(571), box(2158)); + avl = gpr_avl_add(avl, box(82), box(2157), NULL); + avl = gpr_avl_add(avl, box(571), box(2158), NULL); avl = remove_int(avl, 721); avl = remove_int(avl, 622); - avl = gpr_avl_add(avl, box(950), box(2161)); - avl = gpr_avl_add(avl, box(94), box(2162)); + avl = gpr_avl_add(avl, box(950), box(2161), NULL); + avl = gpr_avl_add(avl, box(94), box(2162), NULL); avl = remove_int(avl, 970); - avl = gpr_avl_add(avl, box(815), box(2164)); + avl = gpr_avl_add(avl, box(815), box(2164), NULL); avl = remove_int(avl, 930); avl = remove_int(avl, 703); - avl = gpr_avl_add(avl, box(432), box(2167)); + avl = gpr_avl_add(avl, box(432), box(2167), NULL); avl = remove_int(avl, 544); - avl = gpr_avl_add(avl, box(21), box(2169)); - avl = gpr_avl_add(avl, box(186), box(2170)); + avl = gpr_avl_add(avl, box(21), box(2169), NULL); + avl = gpr_avl_add(avl, box(186), box(2170), NULL); avl = remove_int(avl, 143); - avl = gpr_avl_add(avl, box(425), box(2172)); + avl = gpr_avl_add(avl, box(425), box(2172), NULL); avl = remove_int(avl, 769); - avl = gpr_avl_add(avl, box(656), box(2174)); + avl = gpr_avl_add(avl, box(656), box(2174), NULL); avl = remove_int(avl, 29); - avl = gpr_avl_add(avl, box(464), box(2176)); + avl = gpr_avl_add(avl, box(464), box(2176), NULL); avl = remove_int(avl, 713); - avl = gpr_avl_add(avl, box(800), box(2178)); + avl = gpr_avl_add(avl, box(800), box(2178), NULL); avl = remove_int(avl, 621); - avl = gpr_avl_add(avl, box(962), box(2180)); + avl = gpr_avl_add(avl, box(962), box(2180), NULL); avl = remove_int(avl, 448); - avl = gpr_avl_add(avl, box(878), box(2182)); + avl = gpr_avl_add(avl, box(878), box(2182), NULL); avl = remove_int(avl, 39); avl = remove_int(avl, 999); - avl = gpr_avl_add(avl, box(182), box(2185)); - avl = gpr_avl_add(avl, box(429), box(2186)); - avl = gpr_avl_add(avl, box(598), box(2187)); + avl = gpr_avl_add(avl, box(182), box(2185), NULL); + avl = gpr_avl_add(avl, box(429), box(2186), NULL); + avl = gpr_avl_add(avl, box(598), box(2187), NULL); avl = remove_int(avl, 551); - avl = gpr_avl_add(avl, box(827), box(2189)); - avl = gpr_avl_add(avl, box(809), box(2190)); + avl = gpr_avl_add(avl, box(827), box(2189), NULL); + avl = gpr_avl_add(avl, box(809), box(2190), NULL); avl = remove_int(avl, 438); avl = remove_int(avl, 811); - avl = gpr_avl_add(avl, box(808), box(2193)); - avl = gpr_avl_add(avl, box(788), box(2194)); + avl = gpr_avl_add(avl, box(808), box(2193), NULL); + avl = gpr_avl_add(avl, box(788), box(2194), NULL); avl = remove_int(avl, 156); - avl = gpr_avl_add(avl, box(933), box(2196)); - avl = gpr_avl_add(avl, box(344), box(2197)); + avl = gpr_avl_add(avl, box(933), box(2196), NULL); + avl = gpr_avl_add(avl, box(344), box(2197), NULL); avl = remove_int(avl, 460); - avl = gpr_avl_add(avl, box(161), box(2199)); - avl = gpr_avl_add(avl, box(444), box(2200)); + avl = gpr_avl_add(avl, box(161), box(2199), NULL); + avl = gpr_avl_add(avl, box(444), box(2200), NULL); avl = remove_int(avl, 597); avl = remove_int(avl, 668); - avl = gpr_avl_add(avl, box(703), box(2203)); + avl = gpr_avl_add(avl, box(703), box(2203), NULL); avl = remove_int(avl, 515); - avl = gpr_avl_add(avl, box(380), box(2205)); - avl = gpr_avl_add(avl, box(338), box(2206)); + avl = gpr_avl_add(avl, box(380), box(2205), NULL); + avl = gpr_avl_add(avl, box(338), box(2206), NULL); avl = remove_int(avl, 550); avl = remove_int(avl, 946); avl = remove_int(avl, 714); avl = remove_int(avl, 739); - avl = gpr_avl_add(avl, box(413), box(2211)); + avl = gpr_avl_add(avl, box(413), box(2211), NULL); avl = remove_int(avl, 450); - avl = gpr_avl_add(avl, box(411), box(2213)); - avl = gpr_avl_add(avl, box(117), box(2214)); - avl = gpr_avl_add(avl, box(322), box(2215)); - avl = gpr_avl_add(avl, box(915), box(2216)); - avl = gpr_avl_add(avl, box(410), box(2217)); - avl = gpr_avl_add(avl, box(66), box(2218)); + avl = gpr_avl_add(avl, box(411), box(2213), NULL); + avl = gpr_avl_add(avl, box(117), box(2214), NULL); + avl = gpr_avl_add(avl, box(322), box(2215), NULL); + avl = gpr_avl_add(avl, box(915), box(2216), NULL); + avl = gpr_avl_add(avl, box(410), box(2217), NULL); + avl = gpr_avl_add(avl, box(66), box(2218), NULL); avl = remove_int(avl, 756); avl = remove_int(avl, 596); - avl = gpr_avl_add(avl, box(882), box(2221)); - avl = gpr_avl_add(avl, box(930), box(2222)); - avl = gpr_avl_add(avl, box(36), box(2223)); + avl = gpr_avl_add(avl, box(882), box(2221), NULL); + avl = gpr_avl_add(avl, box(930), box(2222), NULL); + avl = gpr_avl_add(avl, box(36), box(2223), NULL); avl = remove_int(avl, 742); - avl = gpr_avl_add(avl, box(539), box(2225)); - avl = gpr_avl_add(avl, box(596), box(2226)); + avl = gpr_avl_add(avl, box(539), box(2225), NULL); + avl = gpr_avl_add(avl, box(596), box(2226), NULL); avl = remove_int(avl, 82); avl = remove_int(avl, 686); avl = remove_int(avl, 933); avl = remove_int(avl, 42); avl = remove_int(avl, 340); - avl = gpr_avl_add(avl, box(126), box(2232)); - avl = gpr_avl_add(avl, box(493), box(2233)); - avl = gpr_avl_add(avl, box(839), box(2234)); + avl = gpr_avl_add(avl, box(126), box(2232), NULL); + avl = gpr_avl_add(avl, box(493), box(2233), NULL); + avl = gpr_avl_add(avl, box(839), box(2234), NULL); avl = remove_int(avl, 774); - avl = gpr_avl_add(avl, box(337), box(2236)); + avl = gpr_avl_add(avl, box(337), box(2236), NULL); avl = remove_int(avl, 322); - avl = gpr_avl_add(avl, box(16), box(2238)); + avl = gpr_avl_add(avl, box(16), box(2238), NULL); avl = remove_int(avl, 73); avl = remove_int(avl, 85); avl = remove_int(avl, 191); avl = remove_int(avl, 541); - avl = gpr_avl_add(avl, box(704), box(2243)); + avl = gpr_avl_add(avl, box(704), box(2243), NULL); avl = remove_int(avl, 767); avl = remove_int(avl, 1006); avl = remove_int(avl, 844); avl = remove_int(avl, 742); - avl = gpr_avl_add(avl, box(48), box(2248)); - avl = gpr_avl_add(avl, box(138), box(2249)); - avl = gpr_avl_add(avl, box(437), box(2250)); - avl = gpr_avl_add(avl, box(275), box(2251)); + avl = gpr_avl_add(avl, box(48), box(2248), NULL); + avl = gpr_avl_add(avl, box(138), box(2249), NULL); + avl = gpr_avl_add(avl, box(437), box(2250), NULL); + avl = gpr_avl_add(avl, box(275), box(2251), NULL); avl = remove_int(avl, 520); - avl = gpr_avl_add(avl, box(1019), box(2253)); + avl = gpr_avl_add(avl, box(1019), box(2253), NULL); avl = remove_int(avl, 955); - avl = gpr_avl_add(avl, box(270), box(2255)); + avl = gpr_avl_add(avl, box(270), box(2255), NULL); avl = remove_int(avl, 680); avl = remove_int(avl, 698); - avl = gpr_avl_add(avl, box(735), box(2258)); - avl = gpr_avl_add(avl, box(400), box(2259)); + avl = gpr_avl_add(avl, box(735), box(2258), NULL); + avl = gpr_avl_add(avl, box(400), box(2259), NULL); avl = remove_int(avl, 991); - avl = gpr_avl_add(avl, box(263), box(2261)); + avl = gpr_avl_add(avl, box(263), box(2261), NULL); avl = remove_int(avl, 704); - avl = gpr_avl_add(avl, box(757), box(2263)); + avl = gpr_avl_add(avl, box(757), box(2263), NULL); avl = remove_int(avl, 194); avl = remove_int(avl, 616); avl = remove_int(avl, 784); - avl = gpr_avl_add(avl, box(382), box(2267)); - avl = gpr_avl_add(avl, box(464), box(2268)); - avl = gpr_avl_add(avl, box(817), box(2269)); + avl = gpr_avl_add(avl, box(382), box(2267), NULL); + avl = gpr_avl_add(avl, box(464), box(2268), NULL); + avl = gpr_avl_add(avl, box(817), box(2269), NULL); avl = remove_int(avl, 445); - avl = gpr_avl_add(avl, box(412), box(2271)); + avl = gpr_avl_add(avl, box(412), box(2271), NULL); avl = remove_int(avl, 525); - avl = gpr_avl_add(avl, box(299), box(2273)); - avl = gpr_avl_add(avl, box(464), box(2274)); - avl = gpr_avl_add(avl, box(715), box(2275)); + avl = gpr_avl_add(avl, box(299), box(2273), NULL); + avl = gpr_avl_add(avl, box(464), box(2274), NULL); + avl = gpr_avl_add(avl, box(715), box(2275), NULL); avl = remove_int(avl, 58); avl = remove_int(avl, 218); - avl = gpr_avl_add(avl, box(961), box(2278)); - avl = gpr_avl_add(avl, box(491), box(2279)); + avl = gpr_avl_add(avl, box(961), box(2278), NULL); + avl = gpr_avl_add(avl, box(491), box(2279), NULL); avl = remove_int(avl, 846); - avl = gpr_avl_add(avl, box(762), box(2281)); + avl = gpr_avl_add(avl, box(762), box(2281), NULL); avl = remove_int(avl, 974); avl = remove_int(avl, 887); - avl = gpr_avl_add(avl, box(498), box(2284)); + avl = gpr_avl_add(avl, box(498), box(2284), NULL); avl = remove_int(avl, 810); avl = remove_int(avl, 743); avl = remove_int(avl, 22); avl = remove_int(avl, 284); - avl = gpr_avl_add(avl, box(482), box(2289)); - avl = gpr_avl_add(avl, box(1021), box(2290)); + avl = gpr_avl_add(avl, box(482), box(2289), NULL); + avl = gpr_avl_add(avl, box(1021), box(2290), NULL); avl = remove_int(avl, 155); avl = remove_int(avl, 128); - avl = gpr_avl_add(avl, box(819), box(2293)); - avl = gpr_avl_add(avl, box(324), box(2294)); + avl = gpr_avl_add(avl, box(819), box(2293), NULL); + avl = gpr_avl_add(avl, box(324), box(2294), NULL); avl = remove_int(avl, 196); avl = remove_int(avl, 370); avl = remove_int(avl, 753); avl = remove_int(avl, 56); avl = remove_int(avl, 735); - avl = gpr_avl_add(avl, box(272), box(2300)); - avl = gpr_avl_add(avl, box(474), box(2301)); - avl = gpr_avl_add(avl, box(719), box(2302)); - avl = gpr_avl_add(avl, box(236), box(2303)); + avl = gpr_avl_add(avl, box(272), box(2300), NULL); + avl = gpr_avl_add(avl, box(474), box(2301), NULL); + avl = gpr_avl_add(avl, box(719), box(2302), NULL); + avl = gpr_avl_add(avl, box(236), box(2303), NULL); avl = remove_int(avl, 818); - avl = gpr_avl_add(avl, box(727), box(2305)); + avl = gpr_avl_add(avl, box(727), box(2305), NULL); avl = remove_int(avl, 892); avl = remove_int(avl, 871); avl = remove_int(avl, 231); - avl = gpr_avl_add(avl, box(62), box(2309)); - avl = gpr_avl_add(avl, box(953), box(2310)); + avl = gpr_avl_add(avl, box(62), box(2309), NULL); + avl = gpr_avl_add(avl, box(953), box(2310), NULL); avl = remove_int(avl, 701); - avl = gpr_avl_add(avl, box(193), box(2312)); + avl = gpr_avl_add(avl, box(193), box(2312), NULL); avl = remove_int(avl, 619); avl = remove_int(avl, 22); avl = remove_int(avl, 804); avl = remove_int(avl, 851); - avl = gpr_avl_add(avl, box(286), box(2317)); - avl = gpr_avl_add(avl, box(751), box(2318)); + avl = gpr_avl_add(avl, box(286), box(2317), NULL); + avl = gpr_avl_add(avl, box(751), box(2318), NULL); avl = remove_int(avl, 525); - avl = gpr_avl_add(avl, box(217), box(2320)); + avl = gpr_avl_add(avl, box(217), box(2320), NULL); avl = remove_int(avl, 336); - avl = gpr_avl_add(avl, box(86), box(2322)); - avl = gpr_avl_add(avl, box(81), box(2323)); - avl = gpr_avl_add(avl, box(850), box(2324)); + avl = gpr_avl_add(avl, box(86), box(2322), NULL); + avl = gpr_avl_add(avl, box(81), box(2323), NULL); + avl = gpr_avl_add(avl, box(850), box(2324), NULL); avl = remove_int(avl, 872); - avl = gpr_avl_add(avl, box(402), box(2326)); - avl = gpr_avl_add(avl, box(54), box(2327)); - avl = gpr_avl_add(avl, box(980), box(2328)); - avl = gpr_avl_add(avl, box(845), box(2329)); + avl = gpr_avl_add(avl, box(402), box(2326), NULL); + avl = gpr_avl_add(avl, box(54), box(2327), NULL); + avl = gpr_avl_add(avl, box(980), box(2328), NULL); + avl = gpr_avl_add(avl, box(845), box(2329), NULL); avl = remove_int(avl, 1004); avl = remove_int(avl, 273); avl = remove_int(avl, 879); - avl = gpr_avl_add(avl, box(354), box(2333)); - avl = gpr_avl_add(avl, box(58), box(2334)); - avl = gpr_avl_add(avl, box(127), box(2335)); + avl = gpr_avl_add(avl, box(354), box(2333), NULL); + avl = gpr_avl_add(avl, box(58), box(2334), NULL); + avl = gpr_avl_add(avl, box(127), box(2335), NULL); avl = remove_int(avl, 84); - avl = gpr_avl_add(avl, box(360), box(2337)); + avl = gpr_avl_add(avl, box(360), box(2337), NULL); avl = remove_int(avl, 648); avl = remove_int(avl, 488); avl = remove_int(avl, 585); avl = remove_int(avl, 230); - avl = gpr_avl_add(avl, box(887), box(2342)); + avl = gpr_avl_add(avl, box(887), box(2342), NULL); avl = remove_int(avl, 558); avl = remove_int(avl, 958); - avl = gpr_avl_add(avl, box(822), box(2345)); + avl = gpr_avl_add(avl, box(822), box(2345), NULL); avl = remove_int(avl, 1004); avl = remove_int(avl, 747); - avl = gpr_avl_add(avl, box(631), box(2348)); - avl = gpr_avl_add(avl, box(442), box(2349)); + avl = gpr_avl_add(avl, box(631), box(2348), NULL); + avl = gpr_avl_add(avl, box(442), box(2349), NULL); avl = remove_int(avl, 957); avl = remove_int(avl, 964); - avl = gpr_avl_add(avl, box(10), box(2352)); + avl = gpr_avl_add(avl, box(10), box(2352), NULL); avl = remove_int(avl, 189); - avl = gpr_avl_add(avl, box(742), box(2354)); + avl = gpr_avl_add(avl, box(742), box(2354), NULL); avl = remove_int(avl, 108); - avl = gpr_avl_add(avl, box(1014), box(2356)); + avl = gpr_avl_add(avl, box(1014), box(2356), NULL); avl = remove_int(avl, 266); avl = remove_int(avl, 623); avl = remove_int(avl, 697); - avl = gpr_avl_add(avl, box(180), box(2360)); + avl = gpr_avl_add(avl, box(180), box(2360), NULL); avl = remove_int(avl, 472); - avl = gpr_avl_add(avl, box(567), box(2362)); + avl = gpr_avl_add(avl, box(567), box(2362), NULL); avl = remove_int(avl, 1020); avl = remove_int(avl, 273); - avl = gpr_avl_add(avl, box(864), box(2365)); - avl = gpr_avl_add(avl, box(1009), box(2366)); + avl = gpr_avl_add(avl, box(864), box(2365), NULL); + avl = gpr_avl_add(avl, box(1009), box(2366), NULL); avl = remove_int(avl, 224); avl = remove_int(avl, 81); - avl = gpr_avl_add(avl, box(653), box(2369)); + avl = gpr_avl_add(avl, box(653), box(2369), NULL); avl = remove_int(avl, 67); avl = remove_int(avl, 102); avl = remove_int(avl, 76); @@ -3513,51 +3515,51 @@ static void test_badcase3(void) { avl = remove_int(avl, 169); avl = remove_int(avl, 232); avl = remove_int(avl, 79); - avl = gpr_avl_add(avl, box(509), box(2377)); + avl = gpr_avl_add(avl, box(509), box(2377), NULL); avl = remove_int(avl, 900); avl = remove_int(avl, 822); avl = remove_int(avl, 945); avl = remove_int(avl, 356); - avl = gpr_avl_add(avl, box(443), box(2382)); - avl = gpr_avl_add(avl, box(925), box(2383)); + avl = gpr_avl_add(avl, box(443), box(2382), NULL); + avl = gpr_avl_add(avl, box(925), box(2383), NULL); avl = remove_int(avl, 994); avl = remove_int(avl, 324); - avl = gpr_avl_add(avl, box(291), box(2386)); + avl = gpr_avl_add(avl, box(291), box(2386), NULL); avl = remove_int(avl, 94); avl = remove_int(avl, 795); avl = remove_int(avl, 42); - avl = gpr_avl_add(avl, box(613), box(2390)); + avl = gpr_avl_add(avl, box(613), box(2390), NULL); avl = remove_int(avl, 289); - avl = gpr_avl_add(avl, box(980), box(2392)); + avl = gpr_avl_add(avl, box(980), box(2392), NULL); avl = remove_int(avl, 316); - avl = gpr_avl_add(avl, box(281), box(2394)); - avl = gpr_avl_add(avl, box(1006), box(2395)); + avl = gpr_avl_add(avl, box(281), box(2394), NULL); + avl = gpr_avl_add(avl, box(1006), box(2395), NULL); avl = remove_int(avl, 776); - avl = gpr_avl_add(avl, box(108), box(2397)); - avl = gpr_avl_add(avl, box(918), box(2398)); + avl = gpr_avl_add(avl, box(108), box(2397), NULL); + avl = gpr_avl_add(avl, box(918), box(2398), NULL); avl = remove_int(avl, 721); avl = remove_int(avl, 563); - avl = gpr_avl_add(avl, box(925), box(2401)); + avl = gpr_avl_add(avl, box(925), box(2401), NULL); avl = remove_int(avl, 448); avl = remove_int(avl, 198); avl = remove_int(avl, 1); - avl = gpr_avl_add(avl, box(160), box(2405)); + avl = gpr_avl_add(avl, box(160), box(2405), NULL); avl = remove_int(avl, 515); - avl = gpr_avl_add(avl, box(284), box(2407)); - avl = gpr_avl_add(avl, box(225), box(2408)); + avl = gpr_avl_add(avl, box(284), box(2407), NULL); + avl = gpr_avl_add(avl, box(225), box(2408), NULL); avl = remove_int(avl, 304); - avl = gpr_avl_add(avl, box(714), box(2410)); - avl = gpr_avl_add(avl, box(708), box(2411)); - avl = gpr_avl_add(avl, box(624), box(2412)); + avl = gpr_avl_add(avl, box(714), box(2410), NULL); + avl = gpr_avl_add(avl, box(708), box(2411), NULL); + avl = gpr_avl_add(avl, box(624), box(2412), NULL); avl = remove_int(avl, 662); avl = remove_int(avl, 825); avl = remove_int(avl, 383); avl = remove_int(avl, 381); - avl = gpr_avl_add(avl, box(194), box(2417)); + avl = gpr_avl_add(avl, box(194), box(2417), NULL); avl = remove_int(avl, 280); avl = remove_int(avl, 25); avl = remove_int(avl, 633); - avl = gpr_avl_add(avl, box(897), box(2421)); + avl = gpr_avl_add(avl, box(897), box(2421), NULL); avl = remove_int(avl, 636); avl = remove_int(avl, 596); avl = remove_int(avl, 757); @@ -3567,33 +3569,33 @@ static void test_badcase3(void) { avl = remove_int(avl, 843); avl = remove_int(avl, 280); avl = remove_int(avl, 911); - avl = gpr_avl_add(avl, box(1008), box(2431)); + avl = gpr_avl_add(avl, box(1008), box(2431), NULL); avl = remove_int(avl, 948); avl = remove_int(avl, 74); avl = remove_int(avl, 571); - avl = gpr_avl_add(avl, box(486), box(2435)); - avl = gpr_avl_add(avl, box(285), box(2436)); + avl = gpr_avl_add(avl, box(486), box(2435), NULL); + avl = gpr_avl_add(avl, box(285), box(2436), NULL); avl = remove_int(avl, 304); avl = remove_int(avl, 516); - avl = gpr_avl_add(avl, box(758), box(2439)); - avl = gpr_avl_add(avl, box(776), box(2440)); + avl = gpr_avl_add(avl, box(758), box(2439), NULL); + avl = gpr_avl_add(avl, box(776), box(2440), NULL); avl = remove_int(avl, 696); - avl = gpr_avl_add(avl, box(104), box(2442)); - avl = gpr_avl_add(avl, box(700), box(2443)); - avl = gpr_avl_add(avl, box(114), box(2444)); - avl = gpr_avl_add(avl, box(567), box(2445)); + avl = gpr_avl_add(avl, box(104), box(2442), NULL); + avl = gpr_avl_add(avl, box(700), box(2443), NULL); + avl = gpr_avl_add(avl, box(114), box(2444), NULL); + avl = gpr_avl_add(avl, box(567), box(2445), NULL); avl = remove_int(avl, 620); - avl = gpr_avl_add(avl, box(270), box(2447)); + avl = gpr_avl_add(avl, box(270), box(2447), NULL); avl = remove_int(avl, 730); - avl = gpr_avl_add(avl, box(749), box(2449)); - avl = gpr_avl_add(avl, box(443), box(2450)); + avl = gpr_avl_add(avl, box(749), box(2449), NULL); + avl = gpr_avl_add(avl, box(443), box(2450), NULL); avl = remove_int(avl, 457); - avl = gpr_avl_add(avl, box(571), box(2452)); - avl = gpr_avl_add(avl, box(626), box(2453)); + avl = gpr_avl_add(avl, box(571), box(2452), NULL); + avl = gpr_avl_add(avl, box(626), box(2453), NULL); avl = remove_int(avl, 638); avl = remove_int(avl, 313); - gpr_avl_unref(avl); + gpr_avl_unref(avl, NULL); } static void test_stress(int amount_of_stress) { @@ -3616,9 +3618,9 @@ static void test_stress(int amount_of_stress) { GPR_ASSERT(i); if (rand() < RAND_MAX / 2) { added[idx] = i; - printf("avl = gpr_avl_add(avl, box(%d), box(%d)); /* d=%d */\n", idx, i, - deletions); - avl = gpr_avl_add(avl, box(idx), box(i)); + printf("avl = gpr_avl_add(avl, box(%d), box(%d), NULL); /* d=%d */\n", + idx, i, deletions); + avl = gpr_avl_add(avl, box(idx), box(i), NULL); } else { deletions += (added[idx] != 0); added[idx] = 0; @@ -3634,7 +3636,7 @@ static void test_stress(int amount_of_stress) { } } - gpr_avl_unref(avl); + gpr_avl_unref(avl, NULL); } int main(int argc, char *argv[]) { From 16149ad456834eb18afe04d78bd0c2ea097a86a3 Mon Sep 17 00:00:00 2001 From: yang-g Date: Mon, 17 Jul 2017 15:13:24 -0700 Subject: [PATCH 19/80] regenerate projects --- src/ruby/ext/grpc/rb_grpc_imports.generated.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/ruby/ext/grpc/rb_grpc_imports.generated.h b/src/ruby/ext/grpc/rb_grpc_imports.generated.h index a477ab65073..52887043502 100644 --- a/src/ruby/ext/grpc/rb_grpc_imports.generated.h +++ b/src/ruby/ext/grpc/rb_grpc_imports.generated.h @@ -644,22 +644,22 @@ extern gpr_get_allocation_functions_type gpr_get_allocation_functions_import; typedef gpr_avl(*gpr_avl_create_type)(const gpr_avl_vtable *vtable); extern gpr_avl_create_type gpr_avl_create_import; #define gpr_avl_create gpr_avl_create_import -typedef gpr_avl(*gpr_avl_ref_type)(gpr_avl avl); +typedef gpr_avl(*gpr_avl_ref_type)(gpr_avl avl, void *user_data); extern gpr_avl_ref_type gpr_avl_ref_import; #define gpr_avl_ref gpr_avl_ref_import -typedef void(*gpr_avl_unref_type)(gpr_avl avl); +typedef void(*gpr_avl_unref_type)(gpr_avl avl, void *user_data); extern gpr_avl_unref_type gpr_avl_unref_import; #define gpr_avl_unref gpr_avl_unref_import -typedef gpr_avl(*gpr_avl_add_type)(gpr_avl avl, void *key, void *value); +typedef gpr_avl(*gpr_avl_add_type)(gpr_avl avl, void *key, void *value, void *user_data); extern gpr_avl_add_type gpr_avl_add_import; #define gpr_avl_add gpr_avl_add_import -typedef gpr_avl(*gpr_avl_remove_type)(gpr_avl avl, void *key); +typedef gpr_avl(*gpr_avl_remove_type)(gpr_avl avl, void *key, void *user_data); extern gpr_avl_remove_type gpr_avl_remove_import; #define gpr_avl_remove gpr_avl_remove_import -typedef void *(*gpr_avl_get_type)(gpr_avl avl, void *key); +typedef void *(*gpr_avl_get_type)(gpr_avl avl, void *key, void *user_data); extern gpr_avl_get_type gpr_avl_get_import; #define gpr_avl_get gpr_avl_get_import -typedef int(*gpr_avl_maybe_get_type)(gpr_avl avl, void *key, void **value); +typedef int(*gpr_avl_maybe_get_type)(gpr_avl avl, void *key, void **value, void *user_data); extern gpr_avl_maybe_get_type gpr_avl_maybe_get_import; #define gpr_avl_maybe_get gpr_avl_maybe_get_import typedef int(*gpr_avl_is_empty_type)(gpr_avl avl); From d66ee1a0a8eac79e2cfbee7ea82a2de63492c5a1 Mon Sep 17 00:00:00 2001 From: yang-g Date: Tue, 18 Jul 2017 08:11:10 -0700 Subject: [PATCH 20/80] Remove unused user_data from ref_node. --- src/core/lib/support/avl.c | 88 +++++++++++++++++--------------------- 1 file changed, 40 insertions(+), 48 deletions(-) diff --git a/src/core/lib/support/avl.c b/src/core/lib/support/avl.c index a58551e259e..0e28b24c98e 100644 --- a/src/core/lib/support/avl.c +++ b/src/core/lib/support/avl.c @@ -32,7 +32,7 @@ gpr_avl gpr_avl_create(const gpr_avl_vtable *vtable) { return out; } -static gpr_avl_node *ref_node(gpr_avl_node *node, void *user_data) { +static gpr_avl_node *ref_node(gpr_avl_node *node) { if (node) { gpr_ref(&node->refs); } @@ -122,11 +122,10 @@ int gpr_avl_maybe_get(gpr_avl avl, void *key, void **value, void *user_data) { static gpr_avl_node *rotate_left(const gpr_avl_vtable *vtable, void *key, void *value, gpr_avl_node *left, gpr_avl_node *right, void *user_data) { - gpr_avl_node *n = - new_node(vtable->copy_key(right->key, user_data), - vtable->copy_value(right->value, user_data), - new_node(key, value, left, ref_node(right->left, user_data)), - ref_node(right->right, user_data)); + gpr_avl_node *n = new_node(vtable->copy_key(right->key, user_data), + vtable->copy_value(right->value, user_data), + new_node(key, value, left, ref_node(right->left)), + ref_node(right->right)); unref_node(vtable, right, user_data); return n; } @@ -136,9 +135,8 @@ static gpr_avl_node *rotate_right(const gpr_avl_vtable *vtable, void *key, gpr_avl_node *right, void *user_data) { gpr_avl_node *n = new_node(vtable->copy_key(left->key, user_data), - vtable->copy_value(left->value, user_data), - ref_node(left->left, user_data), - new_node(key, value, ref_node(left->right, user_data), right)); + vtable->copy_value(left->value, user_data), ref_node(left->left), + new_node(key, value, ref_node(left->right), right)); unref_node(vtable, left, user_data); return n; } @@ -147,14 +145,13 @@ static gpr_avl_node *rotate_left_right(const gpr_avl_vtable *vtable, void *key, void *value, gpr_avl_node *left, gpr_avl_node *right, void *user_data) { /* rotate_right(..., rotate_left(left), right) */ - gpr_avl_node *n = new_node( - vtable->copy_key(left->right->key, user_data), - vtable->copy_value(left->right->value, user_data), - new_node(vtable->copy_key(left->key, user_data), - vtable->copy_value(left->value, user_data), - ref_node(left->left, user_data), - ref_node(left->right->left, user_data)), - new_node(key, value, ref_node(left->right->right, user_data), right)); + gpr_avl_node *n = + new_node(vtable->copy_key(left->right->key, user_data), + vtable->copy_value(left->right->value, user_data), + new_node(vtable->copy_key(left->key, user_data), + vtable->copy_value(left->value, user_data), + ref_node(left->left), ref_node(left->right->left)), + new_node(key, value, ref_node(left->right->right), right)); unref_node(vtable, left, user_data); return n; } @@ -163,14 +160,13 @@ static gpr_avl_node *rotate_right_left(const gpr_avl_vtable *vtable, void *key, void *value, gpr_avl_node *left, gpr_avl_node *right, void *user_data) { /* rotate_left(..., left, rotate_right(right)) */ - gpr_avl_node *n = new_node( - vtable->copy_key(right->left->key, user_data), - vtable->copy_value(right->left->value, user_data), - new_node(key, value, left, ref_node(right->left->left, user_data)), - new_node(vtable->copy_key(right->key, user_data), - vtable->copy_value(right->value, user_data), - ref_node(right->left->right, user_data), - ref_node(right->right, user_data))); + gpr_avl_node *n = + new_node(vtable->copy_key(right->left->key, user_data), + vtable->copy_value(right->left->value, user_data), + new_node(key, value, left, ref_node(right->left->left)), + new_node(vtable->copy_key(right->key, user_data), + vtable->copy_value(right->value, user_data), + ref_node(right->left->right), ref_node(right->right))); unref_node(vtable, right, user_data); return n; } @@ -208,19 +204,17 @@ static gpr_avl_node *add_key(const gpr_avl_vtable *vtable, gpr_avl_node *node, } cmp = vtable->compare_keys(node->key, key, user_data); if (cmp == 0) { - return new_node(key, value, ref_node(node->left, user_data), - ref_node(node->right, user_data)); + return new_node(key, value, ref_node(node->left), ref_node(node->right)); } else if (cmp > 0) { return rebalance(vtable, vtable->copy_key(node->key, user_data), vtable->copy_value(node->value, user_data), add_key(vtable, node->left, key, value, user_data), - ref_node(node->right, user_data), user_data); + ref_node(node->right), user_data); } else { - return rebalance(vtable, vtable->copy_key(node->key, user_data), - vtable->copy_value(node->value, user_data), - ref_node(node->left, user_data), - add_key(vtable, node->right, key, value, user_data), - user_data); + return rebalance( + vtable, vtable->copy_key(node->key, user_data), + vtable->copy_value(node->value, user_data), ref_node(node->left), + add_key(vtable, node->right, key, value, user_data), user_data); } } @@ -256,34 +250,32 @@ static gpr_avl_node *remove_key(const gpr_avl_vtable *vtable, cmp = vtable->compare_keys(node->key, key, user_data); if (cmp == 0) { if (node->left == NULL) { - return ref_node(node->right, user_data); + return ref_node(node->right); } else if (node->right == NULL) { - return ref_node(node->left, user_data); + return ref_node(node->left); } else if (node->left->height < node->right->height) { gpr_avl_node *h = in_order_head(node->right); - return rebalance(vtable, vtable->copy_key(h->key, user_data), - vtable->copy_value(h->value, user_data), - ref_node(node->left, user_data), - remove_key(vtable, node->right, h->key, user_data), - user_data); + return rebalance( + vtable, vtable->copy_key(h->key, user_data), + vtable->copy_value(h->value, user_data), ref_node(node->left), + remove_key(vtable, node->right, h->key, user_data), user_data); } else { gpr_avl_node *h = in_order_tail(node->left); return rebalance(vtable, vtable->copy_key(h->key, user_data), vtable->copy_value(h->value, user_data), remove_key(vtable, node->left, h->key, user_data), - ref_node(node->right, user_data), user_data); + ref_node(node->right), user_data); } } else if (cmp > 0) { return rebalance(vtable, vtable->copy_key(node->key, user_data), vtable->copy_value(node->value, user_data), remove_key(vtable, node->left, key, user_data), - ref_node(node->right, user_data), user_data); + ref_node(node->right), user_data); } else { - return rebalance(vtable, vtable->copy_key(node->key, user_data), - vtable->copy_value(node->value, user_data), - ref_node(node->left, user_data), - remove_key(vtable, node->right, key, user_data), - user_data); + return rebalance( + vtable, vtable->copy_key(node->key, user_data), + vtable->copy_value(node->value, user_data), ref_node(node->left), + remove_key(vtable, node->right, key, user_data), user_data); } } @@ -296,7 +288,7 @@ gpr_avl gpr_avl_remove(gpr_avl avl, void *key, void *user_data) { } gpr_avl gpr_avl_ref(gpr_avl avl, void *user_data) { - ref_node(avl.root, user_data); + ref_node(avl.root); return avl; } From 1a4890705d3efbd5496bc5a0967ada72c1b7af25 Mon Sep 17 00:00:00 2001 From: yang-g Date: Wed, 19 Jul 2017 10:52:29 -0700 Subject: [PATCH 21/80] format code --- src/core/ext/filters/client_channel/subchannel_index.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/core/ext/filters/client_channel/subchannel_index.c b/src/core/ext/filters/client_channel/subchannel_index.c index 15e42980af0..ababd05d842 100644 --- a/src/core/ext/filters/client_channel/subchannel_index.c +++ b/src/core/ext/filters/client_channel/subchannel_index.c @@ -187,7 +187,6 @@ grpc_subchannel *grpc_subchannel_index_register(grpc_exec_ctx *exec_ctx, gpr_avl_unref(index, exec_ctx); } - if (need_to_unref_constructed) { GRPC_SUBCHANNEL_UNREF(exec_ctx, constructed, "index_register"); } From 303de0ae714d6a1d60b4ce7b8c582f27a4e9892b Mon Sep 17 00:00:00 2001 From: yang-g Date: Tue, 25 Jul 2017 07:50:45 -0700 Subject: [PATCH 22/80] update comments --- include/grpc/support/avl.h | 31 ++++++++++++++++++------------- 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/include/grpc/support/avl.h b/include/grpc/support/avl.h index cd029ef2a6c..d53ff5d9040 100644 --- a/include/grpc/support/avl.h +++ b/include/grpc/support/avl.h @@ -58,29 +58,34 @@ typedef struct gpr_avl { gpr_avl_node *root; } gpr_avl; -/** create an immutable AVL tree */ +/** Create an immutable AVL tree. */ GPRAPI gpr_avl gpr_avl_create(const gpr_avl_vtable *vtable); -/** add a reference to an existing tree - returns - the tree as a convenience */ +/** Add a reference to an existing tree - returns + the tree as a convenience. The optional user_data will be passed to vtable + functions. */ GPRAPI gpr_avl gpr_avl_ref(gpr_avl avl, void *user_data); -/** remove a reference to a tree - destroying it if there - are no references left */ +/** Remove a reference to a tree - destroying it if there + are no references left. The optional user_data will be passed to vtable + functions. */ GPRAPI void gpr_avl_unref(gpr_avl avl, void *user_data); -/** return a new tree with (key, value) added to avl. +/** Return a new tree with (key, value) added to avl. implicitly unrefs avl to allow easy chaining. if key exists in avl, the new tree's key entry updated - (i.e. a duplicate is not created) */ + (i.e. a duplicate is not created). The optional user_data will be passed to + vtable functions. */ GPRAPI gpr_avl gpr_avl_add(gpr_avl avl, void *key, void *value, void *user_data); -/** return a new tree with key deleted - implicitly unrefs avl to allow easy chaining. */ +/** Return a new tree with key deleted + implicitly unrefs avl to allow easy chaining. The optional user_data will be + passed to vtable functions. */ GPRAPI gpr_avl gpr_avl_remove(gpr_avl avl, void *key, void *user_data); -/** lookup key, and return the associated value. - does not mutate avl. - returns NULL if key is not found. */ +/** Lookup key, and return the associated value. + Does not mutate avl. + Returns NULL if key is not found. The optional user_data will be passed to + vtable functions.*/ GPRAPI void *gpr_avl_get(gpr_avl avl, void *key, void *user_data); /** Return 1 if avl contains key, 0 otherwise; if it has the key, sets *value to - its value*/ + its value. THe optional user_data will be passed to vtable functions. */ GPRAPI int gpr_avl_maybe_get(gpr_avl avl, void *key, void **value, void *user_data); /** Return 1 if avl is empty, 0 otherwise */ From 69b7231776dc42c87abad33430c66e7b302bf00c Mon Sep 17 00:00:00 2001 From: Nathaniel Manista Date: Fri, 21 Jul 2017 03:18:11 +0000 Subject: [PATCH 23/80] gRPC Python test infrastructure (The time-related first part of it, anyway.) --- .pylintrc | 5 + .../grpcio_testing/grpc_testing/__init__.py | 119 ++++++++++ .../grpcio_testing/grpc_testing/_time.py | 224 ++++++++++++++++++ src/python/grpcio_testing/grpc_version.py | 17 ++ src/python/grpcio_testing/setup.py | 44 ++++ .../grpcio_tests/tests/testing/__init__.py | 13 + .../grpcio_tests/tests/testing/_time_test.py | 165 +++++++++++++ src/python/grpcio_tests/tests/tests.json | 2 + tools/distrib/pylint_code.sh | 1 + tools/distrib/yapf_code.sh | 1 + .../run_tests/helper_scripts/build_python.sh | 3 + 11 files changed, 594 insertions(+) create mode 100644 src/python/grpcio_testing/grpc_testing/__init__.py create mode 100644 src/python/grpcio_testing/grpc_testing/_time.py create mode 100644 src/python/grpcio_testing/grpc_version.py create mode 100644 src/python/grpcio_testing/setup.py create mode 100644 src/python/grpcio_tests/tests/testing/__init__.py create mode 100644 src/python/grpcio_tests/tests/testing/_time_test.py diff --git a/.pylintrc b/.pylintrc index 8447821b4e5..05b4e685fb0 100644 --- a/.pylintrc +++ b/.pylintrc @@ -41,6 +41,11 @@ disable= # NOTE(nathaniel): We don't write doc strings for most private code # elements. missing-docstring, + # NOTE(nathaniel): In numeric comparisons it is better to have the + # lesser (or lesser-or-equal-to) quantity on the left when the + # expression is true than it is to worry about which is an identifier + # and which a literal value. + misplaced-comparison-constant, # NOTE(nathaniel): Our completely abstract interface classes don't have # constructors. no-init, diff --git a/src/python/grpcio_testing/grpc_testing/__init__.py b/src/python/grpcio_testing/grpc_testing/__init__.py new file mode 100644 index 00000000000..c5a17f457a4 --- /dev/null +++ b/src/python/grpcio_testing/grpc_testing/__init__.py @@ -0,0 +1,119 @@ +# Copyright 2017 gRPC authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +"""Objects for use in testing gRPC Python-using application code.""" + +import abc + +import six + +import grpc + + +class Time(six.with_metaclass(abc.ABCMeta)): + """A simulation of time. + + Implementations needn't be connected with real time as provided by the + Python interpreter, but as long as systems under test use + RpcContext.is_active and RpcContext.time_remaining for querying RPC liveness + implementations may be used to change passage of time in tests. + """ + + @abc.abstractmethod + def time(self): + """Accesses the current test time. + + Returns: + The current test time (over which this object has authority). + """ + raise NotImplementedError() + + @abc.abstractmethod + def call_in(self, behavior, delay): + """Adds a behavior to be called after some time. + + Args: + behavior: A behavior to be called with no arguments. + delay: A duration of time in seconds after which to call the behavior. + + Returns: + A grpc.Future with which the call of the behavior may be cancelled + before it is executed. + """ + raise NotImplementedError() + + @abc.abstractmethod + def call_at(self, behavior, time): + """Adds a behavior to be called at a specific time. + + Args: + behavior: A behavior to be called with no arguments. + time: The test time at which to call the behavior. + + Returns: + A grpc.Future with which the call of the behavior may be cancelled + before it is executed. + """ + raise NotImplementedError() + + @abc.abstractmethod + def sleep_for(self, duration): + """Blocks for some length of test time. + + Args: + duration: A duration of test time in seconds for which to block. + """ + raise NotImplementedError() + + @abc.abstractmethod + def sleep_until(self, time): + """Blocks until some test time. + + Args: + time: The test time until which to block. + """ + raise NotImplementedError() + + +def strict_real_time(): + """Creates a Time backed by the Python interpreter's time. + + The returned instance will be "strict" with respect to callbacks + submitted to it: it will ensure that all callbacks registered to + be called at time t have been called before it describes the time + as having advanced beyond t. + + Returns: + A Time backed by the "system" (Python interpreter's) time. + """ + from grpc_testing import _time + return _time.StrictRealTime() + + +def strict_fake_time(now): + """Creates a Time that can be manipulated by test code. + + The returned instance maintains an internal representation of time + independent of real time. This internal representation only advances + when user code calls the instance's sleep_for and sleep_until methods. + + The returned instance will be "strict" with respect to callbacks + submitted to it: it will ensure that all callbacks registered to + be called at time t have been called before it describes the time + as having advanced beyond t. + + Returns: + A Time that simulates the passage of time. + """ + from grpc_testing import _time + return _time.StrictFakeTime(now) diff --git a/src/python/grpcio_testing/grpc_testing/_time.py b/src/python/grpcio_testing/grpc_testing/_time.py new file mode 100644 index 00000000000..3b1ab4bcd86 --- /dev/null +++ b/src/python/grpcio_testing/grpc_testing/_time.py @@ -0,0 +1,224 @@ +# Copyright 2017 gRPC authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +"""Test times.""" + +import collections +import logging +import threading +import time as _time + +import grpc +import grpc_testing + + +def _call(behaviors): + for behavior in behaviors: + try: + behavior() + except Exception: # pylint: disable=broad-except + logging.exception('Exception calling behavior "%r"!', behavior) + + +def _call_in_thread(behaviors): + calling = threading.Thread(target=_call, args=(behaviors,)) + calling.start() + # NOTE(nathaniel): Because this function is called from "strict" Time + # implementations, it blocks until after all behaviors have terminated. + calling.join() + + +class _State(object): + + def __init__(self): + self.condition = threading.Condition() + self.times_to_behaviors = collections.defaultdict(list) + + +class _Delta( + collections.namedtuple('_Delta', + ('mature_behaviors', 'earliest_mature_time', + 'earliest_immature_time',))): + pass + + +def _process(state, now): + mature_behaviors = [] + earliest_mature_time = None + while state.times_to_behaviors: + earliest_time = min(state.times_to_behaviors) + if earliest_time <= now: + if earliest_mature_time is None: + earliest_mature_time = earliest_time + earliest_mature_behaviors = state.times_to_behaviors.pop( + earliest_time) + mature_behaviors.extend(earliest_mature_behaviors) + else: + earliest_immature_time = earliest_time + break + else: + earliest_immature_time = None + return _Delta(mature_behaviors, earliest_mature_time, + earliest_immature_time) + + +class _Future(grpc.Future): + + def __init__(self, state, behavior, time): + self._state = state + self._behavior = behavior + self._time = time + self._cancelled = False + + def cancel(self): + with self._state.condition: + if self._cancelled: + return True + else: + behaviors_at_time = self._state.times_to_behaviors.get( + self._time) + if behaviors_at_time is None: + return False + else: + behaviors_at_time.remove(self._behavior) + if not behaviors_at_time: + self._state.times_to_behaviors.pop(self._time) + self._state.condition.notify_all() + self._cancelled = True + return True + + def cancelled(self): + with self._state.condition: + return self._cancelled + + def running(self): + raise NotImplementedError() + + def done(self): + raise NotImplementedError() + + def result(self, timeout=None): + raise NotImplementedError() + + def exception(self, timeout=None): + raise NotImplementedError() + + def traceback(self, timeout=None): + raise NotImplementedError() + + def add_done_callback(self, fn): + raise NotImplementedError() + + +class StrictRealTime(grpc_testing.Time): + + def __init__(self): + self._state = _State() + self._active = False + self._calling = None + + def _activity(self): + while True: + with self._state.condition: + while True: + now = _time.time() + delta = _process(self._state, now) + self._state.condition.notify_all() + if delta.mature_behaviors: + self._calling = delta.earliest_mature_time + break + self._calling = None + if delta.earliest_immature_time is None: + self._active = False + return + else: + timeout = max(0, delta.earliest_immature_time - now) + self._state.condition.wait(timeout=timeout) + _call(delta.mature_behaviors) + + def _ensure_called_through(self, time): + with self._state.condition: + while ((self._state.times_to_behaviors and + min(self._state.times_to_behaviors) < time) or + (self._calling is not None and self._calling < time)): + self._state.condition.wait() + + def _call_at(self, behavior, time): + with self._state.condition: + self._state.times_to_behaviors[time].append(behavior) + if self._active: + self._state.condition.notify_all() + else: + activity = threading.Thread(target=self._activity) + activity.start() + self._active = True + return _Future(self._state, behavior, time) + + def time(self): + return _time.time() + + def call_in(self, behavior, delay): + return self._call_at(behavior, _time.time() + delay) + + def call_at(self, behavior, time): + return self._call_at(behavior, time) + + def sleep_for(self, duration): + time = _time.time() + duration + _time.sleep(duration) + self._ensure_called_through(time) + + def sleep_until(self, time): + _time.sleep(max(0, time - _time.time())) + self._ensure_called_through(time) + + +class StrictFakeTime(grpc_testing.Time): + + def __init__(self, time): + self._state = _State() + self._time = time + + def time(self): + return self._time + + def call_in(self, behavior, delay): + if delay <= 0: + _call_in_thread((behavior,)) + else: + with self._state.condition: + time = self._time + delay + self._state.times_to_behaviors[time].append(behavior) + return _Future(self._state, behavior, time) + + def call_at(self, behavior, time): + with self._state.condition: + if time <= self._time: + _call_in_thread((behavior,)) + else: + self._state.times_to_behaviors[time].append(behavior) + return _Future(self._state, behavior, time) + + def sleep_for(self, duration): + if 0 < duration: + with self._state.condition: + self._time += duration + delta = _process(self._state, self._time) + _call_in_thread(delta.mature_behaviors) + + def sleep_until(self, time): + with self._state.condition: + if self._time < time: + self._time = time + delta = _process(self._state, self._time) + _call_in_thread(delta.mature_behaviors) diff --git a/src/python/grpcio_testing/grpc_version.py b/src/python/grpcio_testing/grpc_version.py new file mode 100644 index 00000000000..41a75d46f68 --- /dev/null +++ b/src/python/grpcio_testing/grpc_version.py @@ -0,0 +1,17 @@ +# Copyright 2017 gRPC authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# AUTO-GENERATED FROM `$REPO_ROOT/templates/src/python/grpcio_reflection/grpc_version.py.template`!!! + +VERSION = '1.5.0.dev0' diff --git a/src/python/grpcio_testing/setup.py b/src/python/grpcio_testing/setup.py new file mode 100644 index 00000000000..0cc336abd1f --- /dev/null +++ b/src/python/grpcio_testing/setup.py @@ -0,0 +1,44 @@ +# Copyright 2017 gRPC authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +"""Setup module for gRPC Python's testing package.""" + +import os +import sys + +import setuptools + +# Ensure we're in the proper directory whether or not we're being used by pip. +os.chdir(os.path.dirname(os.path.abspath(__file__))) + +# Break import style to ensure that we can find same-directory modules. +import grpc_version + +PACKAGE_DIRECTORIES = { + '': '.', +} + +INSTALL_REQUIRES = ('protobuf>=3.3.0', + 'grpcio>={version}'.format(version=grpc_version.VERSION),) + +setuptools.setup( + name='grpcio-testing', + version=grpc_version.VERSION, + license='Apache License 2.0', + description='Testing utilities for gRPC Python', + author='The gRPC Authors', + author_email='grpc-io@googlegroups.com', + url='https://grpc.io', + package_dir=PACKAGE_DIRECTORIES, + packages=setuptools.find_packages('.'), + install_requires=INSTALL_REQUIRES) diff --git a/src/python/grpcio_tests/tests/testing/__init__.py b/src/python/grpcio_tests/tests/testing/__init__.py new file mode 100644 index 00000000000..1e120359cf9 --- /dev/null +++ b/src/python/grpcio_tests/tests/testing/__init__.py @@ -0,0 +1,13 @@ +# Copyright 2017 gRPC authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. diff --git a/src/python/grpcio_tests/tests/testing/_time_test.py b/src/python/grpcio_tests/tests/testing/_time_test.py new file mode 100644 index 00000000000..797394ae20f --- /dev/null +++ b/src/python/grpcio_tests/tests/testing/_time_test.py @@ -0,0 +1,165 @@ +# Copyright 2017 gRPC authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import random +import threading +import time +import unittest + +import grpc_testing + +_QUANTUM = 0.3 +_MANY = 10000 +# Tests that run in real time can either wait for the scheduler to +# eventually run what needs to be run (and risk timing out) or declare +# that the scheduler didn't schedule work reasonably fast enough. We +# choose the latter for this test. +_PATHOLOGICAL_SCHEDULING = 'pathological thread scheduling!' + + +class _TimeNoter(object): + + def __init__(self, time): + self._condition = threading.Condition() + self._time = time + self._call_times = [] + + def __call__(self): + with self._condition: + self._call_times.append(self._time.time()) + + def call_times(self): + with self._condition: + return tuple(self._call_times) + + +class TimeTest(object): + + def test_sleep_for(self): + start_time = self._time.time() + self._time.sleep_for(_QUANTUM) + end_time = self._time.time() + + self.assertLessEqual(start_time + _QUANTUM, end_time) + + def test_sleep_until(self): + start_time = self._time.time() + self._time.sleep_until(start_time + _QUANTUM) + end_time = self._time.time() + + self.assertLessEqual(start_time + _QUANTUM, end_time) + + def test_call_in(self): + time_noter = _TimeNoter(self._time) + + start_time = self._time.time() + self._time.call_in(time_noter, _QUANTUM) + self._time.sleep_for(_QUANTUM * 2) + call_times = time_noter.call_times() + + self.assertTrue(call_times, msg=_PATHOLOGICAL_SCHEDULING) + self.assertLessEqual(start_time + _QUANTUM, call_times[0]) + + def test_call_at(self): + time_noter = _TimeNoter(self._time) + + start_time = self._time.time() + self._time.call_at(time_noter, self._time.time() + _QUANTUM) + self._time.sleep_for(_QUANTUM * 2) + call_times = time_noter.call_times() + + self.assertTrue(call_times, msg=_PATHOLOGICAL_SCHEDULING) + self.assertLessEqual(start_time + _QUANTUM, call_times[0]) + + def test_cancel(self): + time_noter = _TimeNoter(self._time) + + future = self._time.call_in(time_noter, _QUANTUM * 2) + self._time.sleep_for(_QUANTUM) + cancelled = future.cancel() + self._time.sleep_for(_QUANTUM * 2) + call_times = time_noter.call_times() + + self.assertFalse(call_times, msg=_PATHOLOGICAL_SCHEDULING) + self.assertTrue(cancelled) + self.assertTrue(future.cancelled()) + + def test_many(self): + test_events = tuple(threading.Event() for _ in range(_MANY)) + possibly_cancelled_futures = {} + background_noise_futures = [] + + for test_event in test_events: + possibly_cancelled_futures[test_event] = self._time.call_in( + test_event.set, _QUANTUM * (2 + random.random())) + for _ in range(_MANY): + background_noise_futures.append( + self._time.call_in(threading.Event().set, _QUANTUM * 1000 * + random.random())) + self._time.sleep_for(_QUANTUM) + cancelled = set() + for test_event, test_future in possibly_cancelled_futures.items(): + if bool(random.randint(0, 1)) and test_future.cancel(): + cancelled.add(test_event) + self._time.sleep_for(_QUANTUM * 3) + + for test_event in test_events: + (self.assertFalse if test_event in cancelled else + self.assertTrue)(test_event.is_set()) + for background_noise_future in background_noise_futures: + background_noise_future.cancel() + + def test_same_behavior_used_several_times(self): + time_noter = _TimeNoter(self._time) + + start_time = self._time.time() + first_future_at_one = self._time.call_in(time_noter, _QUANTUM) + second_future_at_one = self._time.call_in(time_noter, _QUANTUM) + first_future_at_three = self._time.call_in(time_noter, _QUANTUM * 3) + second_future_at_three = self._time.call_in(time_noter, _QUANTUM * 3) + self._time.sleep_for(_QUANTUM * 2) + first_future_at_one_cancelled = first_future_at_one.cancel() + second_future_at_one_cancelled = second_future_at_one.cancel() + first_future_at_three_cancelled = first_future_at_three.cancel() + self._time.sleep_for(_QUANTUM * 2) + second_future_at_three_cancelled = second_future_at_three.cancel() + first_future_at_three_cancelled_again = first_future_at_three.cancel() + call_times = time_noter.call_times() + + self.assertEqual(3, len(call_times), msg=_PATHOLOGICAL_SCHEDULING) + self.assertFalse(first_future_at_one_cancelled) + self.assertFalse(second_future_at_one_cancelled) + self.assertTrue(first_future_at_three_cancelled) + self.assertFalse(second_future_at_three_cancelled) + self.assertTrue(first_future_at_three_cancelled_again) + self.assertLessEqual(start_time + _QUANTUM, call_times[0]) + self.assertLessEqual(start_time + _QUANTUM, call_times[1]) + self.assertLessEqual(start_time + _QUANTUM * 3, call_times[2]) + + +class StrictRealTimeTest(TimeTest, unittest.TestCase): + + def setUp(self): + self._time = grpc_testing.strict_real_time() + + +class StrictFakeTimeTest(TimeTest, unittest.TestCase): + + def setUp(self): + self._time = grpc_testing.strict_fake_time( + random.randint(0, int(time.time()))) + + +if __name__ == '__main__': + unittest.main(verbosity=2) diff --git a/src/python/grpcio_tests/tests/tests.json b/src/python/grpcio_tests/tests/tests.json index 126e8ac60dd..f86eeb76c70 100644 --- a/src/python/grpcio_tests/tests/tests.json +++ b/src/python/grpcio_tests/tests/tests.json @@ -9,6 +9,8 @@ "protoc_plugin._split_definitions_test.SplitSeparateTest", "protoc_plugin.beta_python_plugin_test.PythonPluginTest", "reflection._reflection_servicer_test.ReflectionServicerTest", + "testing._time_test.StrictFakeTimeTest", + "testing._time_test.StrictRealTimeTest", "unit._api_test.AllTest", "unit._api_test.ChannelConnectivityTest", "unit._api_test.ChannelTest", diff --git a/tools/distrib/pylint_code.sh b/tools/distrib/pylint_code.sh index 3a1825535d5..3c9235b5480 100755 --- a/tools/distrib/pylint_code.sh +++ b/tools/distrib/pylint_code.sh @@ -22,6 +22,7 @@ DIRS=( 'src/python/grpcio/grpc' 'src/python/grpcio_health_checking/grpc_health' 'src/python/grpcio_reflection/grpc_reflection' + 'src/python/grpcio_testing/grpc_testing' ) VIRTUALENV=python_pylint_venv diff --git a/tools/distrib/yapf_code.sh b/tools/distrib/yapf_code.sh index 4f75163748c..dbb6b5c41f2 100755 --- a/tools/distrib/yapf_code.sh +++ b/tools/distrib/yapf_code.sh @@ -25,6 +25,7 @@ EXCLUSIONS=( 'grpcio/grpc_*.py' 'grpcio_health_checking/grpc_*.py' 'grpcio_reflection/grpc_*.py' + 'grpcio_testing/grpc_*.py' 'grpcio_tests/grpc_*.py' ) diff --git a/tools/run_tests/helper_scripts/build_python.sh b/tools/run_tests/helper_scripts/build_python.sh index 1c1034e475d..be650553dc8 100755 --- a/tools/run_tests/helper_scripts/build_python.sh +++ b/tools/run_tests/helper_scripts/build_python.sh @@ -171,6 +171,9 @@ $VENV_PYTHON $ROOT/src/python/grpcio_reflection/setup.py preprocess $VENV_PYTHON $ROOT/src/python/grpcio_reflection/setup.py build_package_protos pip_install_dir $ROOT/src/python/grpcio_reflection +# Install testing +pip_install_dir $ROOT/src/python/grpcio_testing + # Build/install tests $VENV_PYTHON -m pip install coverage==4.4 oauth2client==4.1.0 \ google-auth==1.0.0 requests==2.14.2 From 9c420447fa73d139748a483336a923fba1419e0a Mon Sep 17 00:00:00 2001 From: Ken Payson Date: Tue, 25 Jul 2017 12:06:46 -0700 Subject: [PATCH 24/80] Add classifiers to package details --- setup.py | 13 +++++++++++++ src/python/grpcio_health_checking/setup.py | 13 +++++++++++++ src/python/grpcio_reflection/setup.py | 13 +++++++++++++ tools/distrib/python/grpcio_tools/setup.py | 13 +++++++++++++ 4 files changed, 52 insertions(+) diff --git a/setup.py b/setup.py index e42c8342ea6..403c13562cc 100644 --- a/setup.py +++ b/setup.py @@ -60,6 +60,18 @@ _spawn_patch.monkeypatch_spawn() LICENSE = 'Apache License 2.0' +CLASSIFIERS = [ + 'Development Status :: 5 - Production/Stable', + 'Programming Language :: Python', + 'Programming Language :: Python :: 2', + 'Programming Language :: Python :: 2.7', + 'Programming Language :: Python :: 3', + 'Programming Language :: Python :: 3.4', + 'Programming Language :: Python :: 3.5', + 'Programming Language :: Python :: 3.6', + 'License :: OSI Approved :: Apache Software License', +], + # Environment variable to determine whether or not the Cython extension should # *use* Cython or use the generated C files. Note that this requires the C files # to have been generated by building first *with* Cython support. Even if this @@ -283,6 +295,7 @@ setuptools.setup( author_email='grpc-io@googlegroups.com', url='https://grpc.io', license=LICENSE, + classifiers=CLASSIFIERS, long_description=open(README).read(), ext_modules=CYTHON_EXTENSION_MODULES, packages=list(PACKAGES), diff --git a/src/python/grpcio_health_checking/setup.py b/src/python/grpcio_health_checking/setup.py index 83e0ead3910..0299b4cca95 100644 --- a/src/python/grpcio_health_checking/setup.py +++ b/src/python/grpcio_health_checking/setup.py @@ -24,6 +24,18 @@ os.chdir(os.path.dirname(os.path.abspath(__file__))) import health_commands import grpc_version +CLASSIFIERS = [ + 'Development Status :: 5 - Production/Stable', + 'Programming Language :: Python', + 'Programming Language :: Python :: 2', + 'Programming Language :: Python :: 2.7', + 'Programming Language :: Python :: 3', + 'Programming Language :: Python :: 3.4', + 'Programming Language :: Python :: 3.5', + 'Programming Language :: Python :: 3.6', + 'License :: OSI Approved :: Apache Software License', +], + PACKAGE_DIRECTORIES = { '': '.', } @@ -48,6 +60,7 @@ setuptools.setup( author_email='grpc-io@googlegroups.com', url='https://grpc.io', license='Apache License 2.0', + classifiers=CLASSIFIERS, package_dir=PACKAGE_DIRECTORIES, packages=setuptools.find_packages('.'), install_requires=INSTALL_REQUIRES, diff --git a/src/python/grpcio_reflection/setup.py b/src/python/grpcio_reflection/setup.py index 20edbc4ec07..bed2311b598 100644 --- a/src/python/grpcio_reflection/setup.py +++ b/src/python/grpcio_reflection/setup.py @@ -25,6 +25,18 @@ os.chdir(os.path.dirname(os.path.abspath(__file__))) import reflection_commands import grpc_version +CLASSIFIERS = [ + 'Development Status :: 5 - Production/Stable', + 'Programming Language :: Python', + 'Programming Language :: Python :: 2', + 'Programming Language :: Python :: 2.7', + 'Programming Language :: Python :: 3', + 'Programming Language :: Python :: 3.4', + 'Programming Language :: Python :: 3.5', + 'Programming Language :: Python :: 3.6', + 'License :: OSI Approved :: Apache Software License', +], + PACKAGE_DIRECTORIES = { '': '.', } @@ -48,6 +60,7 @@ setuptools.setup( description='Standard Protobuf Reflection Service for gRPC', author='The gRPC Authors', author_email='grpc-io@googlegroups.com', + classifiers=CLASSIFIERS, url='https://grpc.io', package_dir=PACKAGE_DIRECTORIES, packages=setuptools.find_packages('.'), diff --git a/tools/distrib/python/grpcio_tools/setup.py b/tools/distrib/python/grpcio_tools/setup.py index ddbb348e0cd..5c0329bff0c 100644 --- a/tools/distrib/python/grpcio_tools/setup.py +++ b/tools/distrib/python/grpcio_tools/setup.py @@ -37,6 +37,18 @@ sys.path.insert(0, os.path.abspath('.')) import protoc_lib_deps import grpc_version +CLASSIFIERS = [ + 'Development Status :: 5 - Production/Stable', + 'Programming Language :: Python', + 'Programming Language :: Python :: 2', + 'Programming Language :: Python :: 2.7', + 'Programming Language :: Python :: 3', + 'Programming Language :: Python :: 3.4', + 'Programming Language :: Python :: 3.5', + 'Programming Language :: Python :: 3.6', + 'License :: OSI Approved :: Apache Software License', +], + PY3 = sys.version_info.major == 3 # Environment variable to determine whether or not the Cython extension should @@ -193,6 +205,7 @@ setuptools.setup( author_email='grpc-io@googlegroups.com', url='https://grpc.io', license='Apache License 2.0', + classifiers=CLASSIFIERS, ext_modules=extension_modules(), packages=setuptools.find_packages('.'), install_requires=[ From c22c65b58dd156620596d24524d77a504014d591 Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Tue, 25 Jul 2017 14:22:20 -0700 Subject: [PATCH 25/80] grpclb: deal with all-drops serverlists --- .../client_channel/lb_policy/grpclb/grpclb.c | 84 ++++++++++++------- .../lb_policy/round_robin/round_robin.c | 23 +++-- test/cpp/end2end/grpclb_end2end_test.cc | 42 +++++++++- 3 files changed, 107 insertions(+), 42 deletions(-) diff --git a/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.c b/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.c index fdb18f687f3..ebce801b37c 100644 --- a/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.c +++ b/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.c @@ -491,11 +491,8 @@ static grpc_lb_addresses *process_serverlist_locked( for (size_t i = 0; i < serverlist->num_servers; ++i) { if (is_server_valid(serverlist->servers[i], i, true)) ++num_valid; } - if (num_valid == 0) return NULL; - grpc_lb_addresses *lb_addresses = grpc_lb_addresses_create(num_valid, &lb_token_vtable); - /* second pass: actually populate the addresses and LB tokens (aka user data * to the outside world) to be read by the RR policy during its creation. * Given that the validity tests are very cheap, they are performed again @@ -503,14 +500,12 @@ static grpc_lb_addresses *process_serverlist_locked( * incurr in an allocation due to the arbitrary number of server */ size_t addr_idx = 0; for (size_t sl_idx = 0; sl_idx < serverlist->num_servers; ++sl_idx) { - GPR_ASSERT(addr_idx < num_valid); const grpc_grpclb_server *server = serverlist->servers[sl_idx]; if (!is_server_valid(serverlist->servers[sl_idx], sl_idx, false)) continue; - + GPR_ASSERT(addr_idx < num_valid); /* address processing */ grpc_resolved_address addr; parse_server(server, &addr); - /* lb token processing */ void *user_data; if (server->has_load_balance_token) { @@ -596,7 +591,7 @@ static void update_lb_connectivity_status_locked( grpc_connectivity_state_name(rr_state), (void *)glb_policy->rr_policy); } grpc_connectivity_state_set(exec_ctx, &glb_policy->state_tracker, rr_state, - GRPC_ERROR_REF(rr_state_error), + rr_state_error, "update_lb_connectivity_status_locked"); } @@ -678,11 +673,12 @@ static bool pick_from_internal_rr_locked( static grpc_lb_policy_args *lb_policy_args_create(grpc_exec_ctx *exec_ctx, glb_lb_policy *glb_policy) { + grpc_lb_addresses *addresses = + process_serverlist_locked(exec_ctx, glb_policy->serverlist); + GPR_ASSERT(addresses != NULL); grpc_lb_policy_args *args = gpr_zalloc(sizeof(*args)); args->client_channel_factory = glb_policy->cc_factory; args->combiner = glb_policy->base.combiner; - grpc_lb_addresses *addresses = - process_serverlist_locked(exec_ctx, glb_policy->serverlist); // Replace the LB addresses in the channel args that we pass down to // the subchannel. static const char *keys_to_remove[] = {GRPC_ARG_LB_ADDRESSES}; @@ -727,7 +723,6 @@ static void create_rr_locked(grpc_exec_ctx *exec_ctx, glb_lb_policy *glb_policy, /* Connectivity state is a function of the RR policy updated/created */ update_lb_connectivity_status_locked(exec_ctx, glb_policy, rr_state, rr_state_error); - /* Add the gRPC LB's interested_parties pollset_set to that of the newly * created RR policy. This will make the RR policy progress upon activity on * gRPC LB, which in turn is tied to the application's call */ @@ -761,8 +756,8 @@ static void create_rr_locked(grpc_exec_ctx *exec_ctx, glb_lb_policy *glb_policy, pp->wrapped_on_complete_arg.client_stats = grpc_grpclb_client_stats_ref(glb_policy->client_stats); if (GRPC_TRACER_ON(grpc_lb_glb_trace)) { - gpr_log(GPR_INFO, "Pending pick about to PICK from 0x%" PRIxPTR "", - (intptr_t)glb_policy->rr_policy); + gpr_log(GPR_INFO, "Pending pick about to (async) PICK from %p", + (void *)glb_policy->rr_policy); } pick_from_internal_rr_locked(exec_ctx, glb_policy, &pp->pick_args, true /* force_async */, pp->target, @@ -788,10 +783,9 @@ static void rr_handover_locked(grpc_exec_ctx *exec_ctx, glb_lb_policy *glb_policy) { GPR_ASSERT(glb_policy->serverlist != NULL && glb_policy->serverlist->num_servers > 0); - if (glb_policy->shutting_down) return; - grpc_lb_policy_args *args = lb_policy_args_create(exec_ctx, glb_policy); + GPR_ASSERT(args != NULL); if (glb_policy->rr_policy != NULL) { if (GRPC_TRACER_ON(grpc_lb_glb_trace)) { gpr_log(GPR_DEBUG, "Updating Round Robin policy (%p)", @@ -826,8 +820,8 @@ static void glb_rr_connectivity_changed_locked(grpc_exec_ctx *exec_ctx, unref_needed = true; gpr_free(rr_connectivity); } else { /* rr state != SHUTDOWN && !shutting down: biz as usual */ - update_lb_connectivity_status_locked(exec_ctx, glb_policy, - rr_connectivity->state, error); + update_lb_connectivity_status_locked( + exec_ctx, glb_policy, rr_connectivity->state, GRPC_ERROR_REF(error)); /* Resubscribe. Reuse the "rr_connectivity_cb" weak ref. */ grpc_lb_policy_notify_on_state_change_locked( exec_ctx, glb_policy->rr_policy, &rr_connectivity->state, @@ -1089,6 +1083,16 @@ static void glb_shutdown_locked(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol) { } } +// Cancel a specific pending pick. +// +// A grpclb pick progresses as follows: +// - If there's a Round Robin policy (glb_policy->rr_policy) available, it'll be +// handed over to the RR policy (in create_rr_locked()). From that point +// onwards, it'll be RR's responsibility. For cancellations, that implies the +// pick needs also be cancelled by the RR instance. +// - Otherwise, without an RR instance, picks stay pending at this policy's +// level (grpclb), inside the glb_policy->pending_picks list. To cancel these, +// we invoke the completion closure and set *target to NULL right here. static void glb_cancel_pick_locked(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol, grpc_connected_subchannel **target, grpc_error *error) { @@ -1108,9 +1112,23 @@ static void glb_cancel_pick_locked(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol, } pp = next; } + if (glb_policy->rr_policy != NULL) { + grpc_lb_policy_cancel_pick_locked(exec_ctx, glb_policy->rr_policy, target, + GRPC_ERROR_REF(error)); + } GRPC_ERROR_UNREF(error); } +// Cancel all pending picks. +// +// A grpclb pick progresses as follows: +// - If there's a Round Robin policy (glb_policy->rr_policy) available, it'll be +// handed over to the RR policy (in create_rr_locked()). From that point +// onwards, it'll be RR's responsibility. For cancellations, that implies the +// pick needs also be cancelled by the RR instance. +// - Otherwise, without an RR instance, picks stay pending at this policy's +// level (grpclb), inside the glb_policy->pending_picks list. To cancel these, +// we invoke the completion closure and set *target to NULL right here. static void glb_cancel_picks_locked(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol, uint32_t initial_metadata_flags_mask, @@ -1132,6 +1150,11 @@ static void glb_cancel_picks_locked(grpc_exec_ctx *exec_ctx, } pp = next; } + if (glb_policy->rr_policy != NULL) { + grpc_lb_policy_cancel_picks_locked( + exec_ctx, glb_policy->rr_policy, initial_metadata_flags_mask, + initial_metadata_flags_eq, GRPC_ERROR_REF(error)); + } GRPC_ERROR_UNREF(error); } @@ -1463,7 +1486,8 @@ static void query_for_backends_locked(grpc_exec_ctx *exec_ctx, op++; /* take a weak ref (won't prevent calling of \a glb_shutdown if the strong ref * count goes to zero) to be unref'd in lb_on_sent_initial_request_locked() */ - GRPC_LB_POLICY_WEAK_REF(&glb_policy->base, "lb_on_server_status_received"); + GRPC_LB_POLICY_WEAK_REF(&glb_policy->base, + "lb_on_sent_initial_request_locked"); call_error = grpc_call_start_batch_and_execute( exec_ctx, glb_policy->lb_call, ops, (size_t)(op - ops), &glb_policy->lb_on_sent_initial_request); @@ -1480,8 +1504,9 @@ static void query_for_backends_locked(grpc_exec_ctx *exec_ctx, op->reserved = NULL; op++; /* take a weak ref (won't prevent calling of \a glb_shutdown if the strong ref - * count goes to zero) to be unref'd in lb_on_server_status_received */ - GRPC_LB_POLICY_WEAK_REF(&glb_policy->base, "lb_on_server_status_received"); + * count goes to zero) to be unref'd in lb_on_server_status_received_locked */ + GRPC_LB_POLICY_WEAK_REF(&glb_policy->base, + "lb_on_server_status_received_locked"); call_error = grpc_call_start_batch_and_execute( exec_ctx, glb_policy->lb_call, ops, (size_t)(op - ops), &glb_policy->lb_on_server_status_received); @@ -1493,8 +1518,9 @@ static void query_for_backends_locked(grpc_exec_ctx *exec_ctx, op->flags = 0; op->reserved = NULL; op++; - /* take another weak ref to be unref'd in lb_on_response_received */ - GRPC_LB_POLICY_WEAK_REF(&glb_policy->base, "lb_on_response_received"); + /* take another weak ref to be unref'd/reused in + * lb_on_response_received_locked */ + GRPC_LB_POLICY_WEAK_REF(&glb_policy->base, "lb_on_response_received_locked"); call_error = grpc_call_start_batch_and_execute( exec_ctx, glb_policy->lb_call, ops, (size_t)(op - ops), &glb_policy->lb_on_response_received); @@ -1511,13 +1537,12 @@ static void lb_on_sent_initial_request_locked(grpc_exec_ctx *exec_ctx, do_send_client_load_report_locked(exec_ctx, glb_policy); } GRPC_LB_POLICY_WEAK_UNREF(exec_ctx, &glb_policy->base, - "lb_on_response_received_locked"); + "lb_on_sent_initial_request_locked"); } static void lb_on_response_received_locked(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { glb_lb_policy *glb_policy = arg; - grpc_op ops[2]; memset(ops, 0, sizeof(ops)); grpc_op *op = ops; @@ -1548,7 +1573,7 @@ static void lb_on_response_received_locked(grpc_exec_ctx *exec_ctx, void *arg, } /* take a weak ref (won't prevent calling of \a glb_shutdown() if the * strong ref count goes to zero) to be unref'd in - * send_client_load_report() */ + * send_client_load_report_locked() */ glb_policy->client_load_report_timer_pending = true; GRPC_LB_POLICY_WEAK_REF(&glb_policy->base, "client_load_report"); schedule_next_client_load_report(exec_ctx, glb_policy); @@ -1576,7 +1601,6 @@ static void lb_on_response_received_locked(grpc_exec_ctx *exec_ctx, void *arg, gpr_free(ipport); } } - /* update serverlist */ if (serverlist->num_servers > 0) { if (grpc_grpclb_serverlist_equals(glb_policy->serverlist, @@ -1611,9 +1635,7 @@ static void lb_on_response_received_locked(grpc_exec_ctx *exec_ctx, void *arg, grpc_dump_slice(response_slice, GPR_DUMP_ASCII | GPR_DUMP_HEX)); } } - grpc_slice_unref_internal(exec_ctx, response_slice); - if (!glb_policy->shutting_down) { /* keep listening for serverlist updates */ op->op = GRPC_OP_RECV_MESSAGE; @@ -1621,7 +1643,7 @@ static void lb_on_response_received_locked(grpc_exec_ctx *exec_ctx, void *arg, op->flags = 0; op->reserved = NULL; op++; - /* reuse the "lb_on_response_received" weak ref taken in + /* reuse the "lb_on_response_received_locked" weak ref taken in * query_for_backends_locked() */ const grpc_call_error call_error = grpc_call_start_batch_and_execute( exec_ctx, glb_policy->lb_call, ops, (size_t)(op - ops), @@ -1629,10 +1651,10 @@ static void lb_on_response_received_locked(grpc_exec_ctx *exec_ctx, void *arg, GPR_ASSERT(GRPC_CALL_OK == call_error); } } else { /* empty payload: call cancelled. */ - /* dispose of the "lb_on_response_received" weak ref taken in + /* dispose of the "lb_on_response_received_locked" weak ref taken in * query_for_backends_locked() and reused in every reception loop */ GRPC_LB_POLICY_WEAK_UNREF(exec_ctx, &glb_policy->base, - "lb_on_response_received_empty_payload"); + "lb_on_response_received_locked_empty_payload"); } } @@ -1699,7 +1721,7 @@ static void lb_on_server_status_received_locked(grpc_exec_ctx *exec_ctx, &glb_policy->lb_on_call_retry, now); } GRPC_LB_POLICY_WEAK_UNREF(exec_ctx, &glb_policy->base, - "lb_on_server_status_received"); + "lb_on_server_status_received_locked"); } static void glb_update_locked(grpc_exec_ctx *exec_ctx, grpc_lb_policy *policy, diff --git a/src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.c b/src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.c index 341763a4d71..bc40165cfb8 100644 --- a/src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.c +++ b/src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.c @@ -584,10 +584,16 @@ static void rr_connectivity_changed_locked(grpc_exec_ctx *exec_ctx, void *arg, // Dispose of outdated subchannel lists. if (sd->subchannel_list != p->subchannel_list && sd->subchannel_list != p->latest_pending_subchannel_list) { - // sd belongs to an outdated subchannel_list: get rid of it. - rr_subchannel_list_shutdown_and_unref(exec_ctx, sd->subchannel_list, - "sl_outdated"); - GRPC_LB_POLICY_WEAK_UNREF(exec_ctx, &p->base, "sl_outdated"); + char *reason = NULL; + if (sd->subchannel_list->shutting_down) { + reason = "sl_outdated_straggler"; + rr_subchannel_list_unref(exec_ctx, sd->subchannel_list, reason); + } else { + reason = "sl_outdated"; + rr_subchannel_list_shutdown_and_unref(exec_ctx, sd->subchannel_list, + reason); + } + GRPC_LB_POLICY_WEAK_UNREF(exec_ctx, &p->base, reason); return; } // Now that we're inside the combiner, copy the pending connectivity @@ -753,6 +759,7 @@ static void rr_update_locked(grpc_exec_ctx *exec_ctx, grpc_lb_policy *policy, for (size_t i = 0; i < addresses->num_addresses; i++) { if (!addresses->addresses[i].is_balancer) ++num_addrs; } + rr_subchannel_list *subchannel_list = rr_subchannel_list_create(p, num_addrs); if (num_addrs == 0) { grpc_connectivity_state_set( exec_ctx, &p->state_tracker, GRPC_CHANNEL_TRANSIENT_FAILURE, @@ -761,18 +768,16 @@ static void rr_update_locked(grpc_exec_ctx *exec_ctx, grpc_lb_policy *policy, if (p->subchannel_list != NULL) { rr_subchannel_list_shutdown_and_unref(exec_ctx, p->subchannel_list, "sl_shutdown_empty_update"); - p->subchannel_list = NULL; } + p->subchannel_list = subchannel_list; // empty list return; } size_t subchannel_index = 0; - rr_subchannel_list *subchannel_list = rr_subchannel_list_create(p, num_addrs); if (p->latest_pending_subchannel_list != NULL && p->started_picking) { if (GRPC_TRACER_ON(grpc_lb_round_robin_trace)) { gpr_log(GPR_DEBUG, "[RR %p] Shutting down latest pending subchannel list %p, about " - "to be " - "replaced by newer latest %p", + "to be replaced by newer latest %p", (void *)p, (void *)p->latest_pending_subchannel_list, (void *)subchannel_list); } @@ -876,10 +881,10 @@ static grpc_lb_policy *round_robin_create(grpc_exec_ctx *exec_ctx, grpc_lb_policy_args *args) { GPR_ASSERT(args->client_channel_factory != NULL); round_robin_lb_policy *p = gpr_zalloc(sizeof(*p)); - rr_update_locked(exec_ctx, &p->base, args); grpc_lb_policy_init(&p->base, &round_robin_lb_policy_vtable, args->combiner); grpc_connectivity_state_init(&p->state_tracker, GRPC_CHANNEL_IDLE, "round_robin"); + rr_update_locked(exec_ctx, &p->base, args); if (GRPC_TRACER_ON(grpc_lb_round_robin_trace)) { gpr_log(GPR_DEBUG, "[RR %p] Created with %lu subchannels", (void *)p, (unsigned long)p->subchannel_list->num_subchannels); diff --git a/test/cpp/end2end/grpclb_end2end_test.cc b/test/cpp/end2end/grpclb_end2end_test.cc index 86cce2d30d4..1f3255d18d8 100644 --- a/test/cpp/end2end/grpclb_end2end_test.cc +++ b/test/cpp/end2end/grpclb_end2end_test.cc @@ -73,8 +73,8 @@ extern "C" { using std::chrono::system_clock; -using grpc::lb::v1::LoadBalanceResponse; using grpc::lb::v1::LoadBalanceRequest; +using grpc::lb::v1::LoadBalanceResponse; using grpc::lb::v1::LoadBalancer; namespace grpc { @@ -647,7 +647,6 @@ class UpdatesTest : public GrpclbEnd2endTest { TEST_F(UpdatesTest, UpdateBalancers) { const std::vector first_backend{GetBackendPorts()[0]}; const std::vector second_backend{GetBackendPorts()[1]}; - ScheduleResponseForBalancer( 0, BalancerServiceImpl::BuildResponseForBackends(first_backend, 0, 0), 0); ScheduleResponseForBalancer( @@ -934,6 +933,45 @@ TEST_F(SingleBalancerTest, Drop) { EXPECT_EQ(1U, balancer_servers_[0].service_->response_count()); } +TEST_F(SingleBalancerTest, DropAllFirst) { + // All registered addresses are marked as "drop". + ScheduleResponseForBalancer( + 0, BalancerServiceImpl::BuildResponseForBackends({}, 1, 1), 0); + const auto& statuses_and_responses = SendRpc(kMessage_, 1); + for (const auto& status_and_response : statuses_and_responses) { + const Status& status = status_and_response.first; + EXPECT_FALSE(status.ok()); + EXPECT_EQ(status.error_message(), "Call dropped by load balancing policy"); + } +} + +TEST_F(SingleBalancerTest, DropAll) { + ScheduleResponseForBalancer( + 0, BalancerServiceImpl::BuildResponseForBackends(GetBackendPorts(), 0, 0), + 0); + ScheduleResponseForBalancer( + 0, BalancerServiceImpl::BuildResponseForBackends({}, 1, 1), 1000); + + // First call succeeds. + auto statuses_and_responses = SendRpc(kMessage_, 1); + for (const auto& status_and_response : statuses_and_responses) { + const Status& status = status_and_response.first; + const EchoResponse& response = status_and_response.second; + EXPECT_TRUE(status.ok()) << "code=" << status.error_code() + << " message=" << status.error_message(); + EXPECT_EQ(response.message(), kMessage_); + } + // But eventually, the update with only dropped servers is processed and calls + // fail. + do { + statuses_and_responses = SendRpc(kMessage_, 1); + ASSERT_EQ(statuses_and_responses.size(), 1UL); + } while (statuses_and_responses[0].first.ok()); + const Status& status = statuses_and_responses[0].first; + EXPECT_FALSE(status.ok()); + EXPECT_EQ(status.error_message(), "Call dropped by load balancing policy"); +} + class SingleBalancerWithClientLoadReportingTest : public GrpclbEnd2endTest { public: SingleBalancerWithClientLoadReportingTest() : GrpclbEnd2endTest(4, 1, 2) {} From b7a7301cb8c1413438a9d6a40f06ca4997e4fef6 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Tue, 25 Jul 2017 16:13:42 +0200 Subject: [PATCH 26/80] add script to generate index.html report --- .../helper_scripts/gen_report_index.sh | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100755 tools/internal_ci/helper_scripts/gen_report_index.sh diff --git a/tools/internal_ci/helper_scripts/gen_report_index.sh b/tools/internal_ci/helper_scripts/gen_report_index.sh new file mode 100755 index 00000000000..cda2fa92a67 --- /dev/null +++ b/tools/internal_ci/helper_scripts/gen_report_index.sh @@ -0,0 +1,35 @@ +#!/usr/bin/env bash +# Copyright 2017 gRPC authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generates index.html that will contain links to various test results on kokoro. +set -e + +# change to grpc repo root +cd $(dirname $0)/../../.. + +# Jenkins URLs are in form "grpc/job/macos/job/experimental/job/jtattermusch_experiment" +KOKORO_JOB_PATH=$(echo "${KOKORO_JOB_NAME}" | sed "s|/|/job/|g") + +mkdir -p reports + +echo '' > reports/kokoro_index.html +echo '

'${KOKORO_JOB_NAME}', build '#${KOKORO_BUILD_NUMBER}'

' >> reports/kokoro_index.html +echo '

Kokoro build dashboard (internal only)

' >> reports/kokoro_index.html +echo '

Test result dashboard (internal only)

' >> reports/kokoro_index.html +echo '

HTML test report (Not available yet)

' >> reports/kokoro_index.html +echo '

Test log (Not available yet)

' >> reports/kokoro_index.html +echo '' >> reports/kokoro_index.html + +echo 'Created reports/kokoro_index.html report index' From 3b091ee059d4c351be6d786954e8a6d6ba03a257 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Wed, 26 Jul 2017 10:49:52 +0200 Subject: [PATCH 27/80] upload reports as artifacts --- tools/internal_ci/helper_scripts/prepare_build_linux_rc | 2 ++ tools/internal_ci/helper_scripts/prepare_build_macos_rc | 2 ++ tools/internal_ci/linux/grpc_basictests_c_cpp_dbg.cfg | 1 + tools/internal_ci/linux/grpc_basictests_c_cpp_opt.cfg | 1 + tools/internal_ci/linux/grpc_basictests_multilang.cfg | 1 + tools/internal_ci/linux/grpc_build_artifacts.cfg | 1 + tools/internal_ci/linux/grpc_interop_badserver_java.cfg | 2 +- tools/internal_ci/linux/grpc_interop_badserver_python.cfg | 2 +- tools/internal_ci/linux/grpc_interop_matrix.cfg | 1 + tools/internal_ci/linux/grpc_interop_tocloud.cfg | 1 + tools/internal_ci/linux/grpc_interop_toprod.cfg | 1 + tools/internal_ci/linux/grpc_master.cfg | 1 + tools/internal_ci/linux/grpc_portability.cfg | 1 + tools/internal_ci/linux/grpc_portability_build_only.cfg | 1 + tools/internal_ci/linux/grpc_pull_request_sanity.cfg | 1 + tools/internal_ci/linux/grpc_sanity.cfg | 1 + tools/internal_ci/linux/sanitizer/grpc_c_asan.cfg | 1 + tools/internal_ci/linux/sanitizer/grpc_c_msan.cfg | 1 + tools/internal_ci/linux/sanitizer/grpc_c_tsan.cfg | 1 + tools/internal_ci/linux/sanitizer/grpc_c_ubsan.cfg | 1 + tools/internal_ci/linux/sanitizer/grpc_cpp_asan.cfg | 1 + tools/internal_ci/linux/sanitizer/grpc_cpp_tsan.cfg | 1 + tools/internal_ci/linux/sanitizer/pull_request/grpc_c_asan.cfg | 1 + tools/internal_ci/linux/sanitizer/pull_request/grpc_c_msan.cfg | 1 + tools/internal_ci/linux/sanitizer/pull_request/grpc_c_tsan.cfg | 1 + tools/internal_ci/linux/sanitizer/pull_request/grpc_c_ubsan.cfg | 1 + .../internal_ci/linux/sanitizer/pull_request/grpc_cpp_asan.cfg | 1 + .../internal_ci/linux/sanitizer/pull_request/grpc_cpp_tsan.cfg | 1 + tools/internal_ci/macos/grpc_build_artifacts.cfg | 1 + tools/internal_ci/macos/grpc_interop.cfg | 2 +- tools/internal_ci/macos/grpc_master.cfg | 1 + tools/internal_ci/windows/grpc_build_artifacts.cfg | 1 + tools/internal_ci/windows/grpc_master.cfg | 1 + tools/internal_ci/windows/grpc_portability_master.cfg | 1 + 34 files changed, 36 insertions(+), 3 deletions(-) diff --git a/tools/internal_ci/helper_scripts/prepare_build_linux_rc b/tools/internal_ci/helper_scripts/prepare_build_linux_rc index 7b7db19389f..049db33ec36 100644 --- a/tools/internal_ci/helper_scripts/prepare_build_linux_rc +++ b/tools/internal_ci/helper_scripts/prepare_build_linux_rc @@ -15,6 +15,8 @@ # Source this rc script to prepare the environment for linux builds +tools/internal_ci/helper_scripts/gen_report_index.sh + # Need to increase open files limit for c tests ulimit -n 32768 diff --git a/tools/internal_ci/helper_scripts/prepare_build_macos_rc b/tools/internal_ci/helper_scripts/prepare_build_macos_rc index 57463e6f6de..89e8e24351c 100644 --- a/tools/internal_ci/helper_scripts/prepare_build_macos_rc +++ b/tools/internal_ci/helper_scripts/prepare_build_macos_rc @@ -15,6 +15,8 @@ # Source this rc script to prepare the environment for macos builds +tools/internal_ci/helper_scripts/gen_report_index.sh + sudo launchctl limit maxfiles unlimited unlimited # show current maxfiles diff --git a/tools/internal_ci/linux/grpc_basictests_c_cpp_dbg.cfg b/tools/internal_ci/linux/grpc_basictests_c_cpp_dbg.cfg index ca547a0a4f7..4a0badf43bc 100644 --- a/tools/internal_ci/linux/grpc_basictests_c_cpp_dbg.cfg +++ b/tools/internal_ci/linux/grpc_basictests_c_cpp_dbg.cfg @@ -20,6 +20,7 @@ timeout_mins: 240 action { define_artifacts { regex: "**/*sponge_log.xml" + regex: "github/grpc/reports/**" } } diff --git a/tools/internal_ci/linux/grpc_basictests_c_cpp_opt.cfg b/tools/internal_ci/linux/grpc_basictests_c_cpp_opt.cfg index 62f05cef2ef..a2cfe021e16 100644 --- a/tools/internal_ci/linux/grpc_basictests_c_cpp_opt.cfg +++ b/tools/internal_ci/linux/grpc_basictests_c_cpp_opt.cfg @@ -20,6 +20,7 @@ timeout_mins: 240 action { define_artifacts { regex: "**/*sponge_log.xml" + regex: "github/grpc/reports/**" } } diff --git a/tools/internal_ci/linux/grpc_basictests_multilang.cfg b/tools/internal_ci/linux/grpc_basictests_multilang.cfg index be099d78c70..4433d14cd72 100644 --- a/tools/internal_ci/linux/grpc_basictests_multilang.cfg +++ b/tools/internal_ci/linux/grpc_basictests_multilang.cfg @@ -20,6 +20,7 @@ timeout_mins: 240 action { define_artifacts { regex: "**/*sponge_log.xml" + regex: "github/grpc/reports/**" } } diff --git a/tools/internal_ci/linux/grpc_build_artifacts.cfg b/tools/internal_ci/linux/grpc_build_artifacts.cfg index eb37b5b0cd6..88fc6b7b358 100644 --- a/tools/internal_ci/linux/grpc_build_artifacts.cfg +++ b/tools/internal_ci/linux/grpc_build_artifacts.cfg @@ -20,6 +20,7 @@ timeout_mins: 120 action { define_artifacts { regex: "**/*sponge_log.xml" + regex: "github/grpc/reports/**" regex: "github/grpc/artifacts/**" } } diff --git a/tools/internal_ci/linux/grpc_interop_badserver_java.cfg b/tools/internal_ci/linux/grpc_interop_badserver_java.cfg index 0aadb56c7c8..dc2114273ea 100644 --- a/tools/internal_ci/linux/grpc_interop_badserver_java.cfg +++ b/tools/internal_ci/linux/grpc_interop_badserver_java.cfg @@ -20,7 +20,7 @@ build_file: "grpc/tools/internal_ci/linux/grpc_interop_badserver_java.sh" timeout_mins: 480 action { define_artifacts { - regex: "**/report.xml", + regex: "**/report.xml" regex: "github/grpc/reports/**" } } diff --git a/tools/internal_ci/linux/grpc_interop_badserver_python.cfg b/tools/internal_ci/linux/grpc_interop_badserver_python.cfg index 29c5c635f9a..ec738fcf74a 100644 --- a/tools/internal_ci/linux/grpc_interop_badserver_python.cfg +++ b/tools/internal_ci/linux/grpc_interop_badserver_python.cfg @@ -20,7 +20,7 @@ build_file: "grpc/tools/internal_ci/linux/grpc_interop_badserver_python.sh" timeout_mins: 480 action { define_artifacts { - regex: "**/report.xml", + regex: "**/report.xml" regex: "github/grpc/reports/**" } } diff --git a/tools/internal_ci/linux/grpc_interop_matrix.cfg b/tools/internal_ci/linux/grpc_interop_matrix.cfg index 2fa3e8f897c..a7fd479a734 100644 --- a/tools/internal_ci/linux/grpc_interop_matrix.cfg +++ b/tools/internal_ci/linux/grpc_interop_matrix.cfg @@ -21,5 +21,6 @@ timeout_mins: 60 action { define_artifacts { regex: "**/sponge_log.xml" + regex: "github/grpc/reports/**" } } diff --git a/tools/internal_ci/linux/grpc_interop_tocloud.cfg b/tools/internal_ci/linux/grpc_interop_tocloud.cfg index 0c31b497afe..c613f668d97 100644 --- a/tools/internal_ci/linux/grpc_interop_tocloud.cfg +++ b/tools/internal_ci/linux/grpc_interop_tocloud.cfg @@ -21,5 +21,6 @@ timeout_mins: 480 action { define_artifacts { regex: "**/sponge_log.xml" + regex: "github/grpc/reports/**" } } diff --git a/tools/internal_ci/linux/grpc_interop_toprod.cfg b/tools/internal_ci/linux/grpc_interop_toprod.cfg index 18978b87e55..903480a3d18 100644 --- a/tools/internal_ci/linux/grpc_interop_toprod.cfg +++ b/tools/internal_ci/linux/grpc_interop_toprod.cfg @@ -21,6 +21,7 @@ timeout_mins: 60 action { define_artifacts { regex: "**/sponge_log.xml" + regex: "github/grpc/reports/**" } } diff --git a/tools/internal_ci/linux/grpc_master.cfg b/tools/internal_ci/linux/grpc_master.cfg index 8bcc668ba97..a2784df2974 100644 --- a/tools/internal_ci/linux/grpc_master.cfg +++ b/tools/internal_ci/linux/grpc_master.cfg @@ -20,6 +20,7 @@ timeout_mins: 240 action { define_artifacts { regex: "**/*sponge_log.xml" + regex: "github/grpc/reports/**" } } diff --git a/tools/internal_ci/linux/grpc_portability.cfg b/tools/internal_ci/linux/grpc_portability.cfg index c5bfd3bb40b..8c120be6b9a 100644 --- a/tools/internal_ci/linux/grpc_portability.cfg +++ b/tools/internal_ci/linux/grpc_portability.cfg @@ -20,6 +20,7 @@ timeout_mins: 1440 action { define_artifacts { regex: "**/*sponge_log.xml" + regex: "github/grpc/reports/**" } } diff --git a/tools/internal_ci/linux/grpc_portability_build_only.cfg b/tools/internal_ci/linux/grpc_portability_build_only.cfg index fce914c6121..501223c0c73 100644 --- a/tools/internal_ci/linux/grpc_portability_build_only.cfg +++ b/tools/internal_ci/linux/grpc_portability_build_only.cfg @@ -20,6 +20,7 @@ timeout_mins: 180 action { define_artifacts { regex: "**/*sponge_log.xml" + regex: "github/grpc/reports/**" } } diff --git a/tools/internal_ci/linux/grpc_pull_request_sanity.cfg b/tools/internal_ci/linux/grpc_pull_request_sanity.cfg index 6c76a929c04..b20d2ffba8e 100644 --- a/tools/internal_ci/linux/grpc_pull_request_sanity.cfg +++ b/tools/internal_ci/linux/grpc_pull_request_sanity.cfg @@ -20,6 +20,7 @@ timeout_mins: 30 action { define_artifacts { regex: "**/*sponge_log.xml" + regex: "github/grpc/reports/**" } } diff --git a/tools/internal_ci/linux/grpc_sanity.cfg b/tools/internal_ci/linux/grpc_sanity.cfg index 8dfeda0d456..24e7984f3a5 100644 --- a/tools/internal_ci/linux/grpc_sanity.cfg +++ b/tools/internal_ci/linux/grpc_sanity.cfg @@ -20,6 +20,7 @@ timeout_mins: 20 action { define_artifacts { regex: "**/*sponge_log.xml" + regex: "github/grpc/reports/**" } } diff --git a/tools/internal_ci/linux/sanitizer/grpc_c_asan.cfg b/tools/internal_ci/linux/sanitizer/grpc_c_asan.cfg index c4beaacf6bb..06a4372ce24 100644 --- a/tools/internal_ci/linux/sanitizer/grpc_c_asan.cfg +++ b/tools/internal_ci/linux/sanitizer/grpc_c_asan.cfg @@ -20,6 +20,7 @@ timeout_mins: 1440 action { define_artifacts { regex: "**/*sponge_log.xml" + regex: "github/grpc/reports/**" } } diff --git a/tools/internal_ci/linux/sanitizer/grpc_c_msan.cfg b/tools/internal_ci/linux/sanitizer/grpc_c_msan.cfg index 0197966f32f..f875327c1b8 100644 --- a/tools/internal_ci/linux/sanitizer/grpc_c_msan.cfg +++ b/tools/internal_ci/linux/sanitizer/grpc_c_msan.cfg @@ -20,6 +20,7 @@ timeout_mins: 1440 action { define_artifacts { regex: "**/*sponge_log.xml" + regex: "github/grpc/reports/**" } } diff --git a/tools/internal_ci/linux/sanitizer/grpc_c_tsan.cfg b/tools/internal_ci/linux/sanitizer/grpc_c_tsan.cfg index 243eb99fbbb..6658a804d89 100644 --- a/tools/internal_ci/linux/sanitizer/grpc_c_tsan.cfg +++ b/tools/internal_ci/linux/sanitizer/grpc_c_tsan.cfg @@ -20,6 +20,7 @@ timeout_mins: 1440 action { define_artifacts { regex: "**/*sponge_log.xml" + regex: "github/grpc/reports/**" } } diff --git a/tools/internal_ci/linux/sanitizer/grpc_c_ubsan.cfg b/tools/internal_ci/linux/sanitizer/grpc_c_ubsan.cfg index 24c7bf8a4c9..957a91ef2b4 100644 --- a/tools/internal_ci/linux/sanitizer/grpc_c_ubsan.cfg +++ b/tools/internal_ci/linux/sanitizer/grpc_c_ubsan.cfg @@ -20,6 +20,7 @@ timeout_mins: 1440 action { define_artifacts { regex: "**/*sponge_log.xml" + regex: "github/grpc/reports/**" } } diff --git a/tools/internal_ci/linux/sanitizer/grpc_cpp_asan.cfg b/tools/internal_ci/linux/sanitizer/grpc_cpp_asan.cfg index f12366cb0a7..dbbfce90cb5 100644 --- a/tools/internal_ci/linux/sanitizer/grpc_cpp_asan.cfg +++ b/tools/internal_ci/linux/sanitizer/grpc_cpp_asan.cfg @@ -20,6 +20,7 @@ timeout_mins: 1440 action { define_artifacts { regex: "**/*sponge_log.xml" + regex: "github/grpc/reports/**" } } diff --git a/tools/internal_ci/linux/sanitizer/grpc_cpp_tsan.cfg b/tools/internal_ci/linux/sanitizer/grpc_cpp_tsan.cfg index ca807aed163..fb0cefa1606 100644 --- a/tools/internal_ci/linux/sanitizer/grpc_cpp_tsan.cfg +++ b/tools/internal_ci/linux/sanitizer/grpc_cpp_tsan.cfg @@ -20,6 +20,7 @@ timeout_mins: 1440 action { define_artifacts { regex: "**/*sponge_log.xml" + regex: "github/grpc/reports/**" } } diff --git a/tools/internal_ci/linux/sanitizer/pull_request/grpc_c_asan.cfg b/tools/internal_ci/linux/sanitizer/pull_request/grpc_c_asan.cfg index 98eb4d0139d..649d93d0a12 100644 --- a/tools/internal_ci/linux/sanitizer/pull_request/grpc_c_asan.cfg +++ b/tools/internal_ci/linux/sanitizer/pull_request/grpc_c_asan.cfg @@ -21,6 +21,7 @@ timeout_mins: 1440 action { define_artifacts { regex: "**/*sponge_log.xml" + regex: "github/grpc/reports/**" } } diff --git a/tools/internal_ci/linux/sanitizer/pull_request/grpc_c_msan.cfg b/tools/internal_ci/linux/sanitizer/pull_request/grpc_c_msan.cfg index e47762ca885..d5ba2031fcb 100644 --- a/tools/internal_ci/linux/sanitizer/pull_request/grpc_c_msan.cfg +++ b/tools/internal_ci/linux/sanitizer/pull_request/grpc_c_msan.cfg @@ -21,6 +21,7 @@ timeout_mins: 1440 action { define_artifacts { regex: "**/*sponge_log.xml" + regex: "github/grpc/reports/**" } } diff --git a/tools/internal_ci/linux/sanitizer/pull_request/grpc_c_tsan.cfg b/tools/internal_ci/linux/sanitizer/pull_request/grpc_c_tsan.cfg index c3803aff563..67d4356821a 100644 --- a/tools/internal_ci/linux/sanitizer/pull_request/grpc_c_tsan.cfg +++ b/tools/internal_ci/linux/sanitizer/pull_request/grpc_c_tsan.cfg @@ -21,6 +21,7 @@ timeout_mins: 1440 action { define_artifacts { regex: "**/*sponge_log.xml" + regex: "github/grpc/reports/**" } } diff --git a/tools/internal_ci/linux/sanitizer/pull_request/grpc_c_ubsan.cfg b/tools/internal_ci/linux/sanitizer/pull_request/grpc_c_ubsan.cfg index 831cfb53ba4..c162d1d1d05 100644 --- a/tools/internal_ci/linux/sanitizer/pull_request/grpc_c_ubsan.cfg +++ b/tools/internal_ci/linux/sanitizer/pull_request/grpc_c_ubsan.cfg @@ -21,6 +21,7 @@ timeout_mins: 1440 action { define_artifacts { regex: "**/*sponge_log.xml" + regex: "github/grpc/reports/**" } } diff --git a/tools/internal_ci/linux/sanitizer/pull_request/grpc_cpp_asan.cfg b/tools/internal_ci/linux/sanitizer/pull_request/grpc_cpp_asan.cfg index c3324431822..29f1fce5684 100644 --- a/tools/internal_ci/linux/sanitizer/pull_request/grpc_cpp_asan.cfg +++ b/tools/internal_ci/linux/sanitizer/pull_request/grpc_cpp_asan.cfg @@ -21,6 +21,7 @@ timeout_mins: 1440 action { define_artifacts { regex: "**/*sponge_log.xml" + regex: "github/grpc/reports/**" } } diff --git a/tools/internal_ci/linux/sanitizer/pull_request/grpc_cpp_tsan.cfg b/tools/internal_ci/linux/sanitizer/pull_request/grpc_cpp_tsan.cfg index 92cd93fcac8..331f73b3c7f 100644 --- a/tools/internal_ci/linux/sanitizer/pull_request/grpc_cpp_tsan.cfg +++ b/tools/internal_ci/linux/sanitizer/pull_request/grpc_cpp_tsan.cfg @@ -21,6 +21,7 @@ timeout_mins: 1440 action { define_artifacts { regex: "**/*sponge_log.xml" + regex: "github/grpc/reports/**" } } diff --git a/tools/internal_ci/macos/grpc_build_artifacts.cfg b/tools/internal_ci/macos/grpc_build_artifacts.cfg index 19993809478..733933c62a6 100644 --- a/tools/internal_ci/macos/grpc_build_artifacts.cfg +++ b/tools/internal_ci/macos/grpc_build_artifacts.cfg @@ -20,6 +20,7 @@ timeout_mins: 120 action { define_artifacts { regex: "**/*sponge_log.xml" + regex: "github/grpc/reports/**" regex: "github/grpc/artifacts/**" } } diff --git a/tools/internal_ci/macos/grpc_interop.cfg b/tools/internal_ci/macos/grpc_interop.cfg index 25bac2f123d..9f3742c4864 100644 --- a/tools/internal_ci/macos/grpc_interop.cfg +++ b/tools/internal_ci/macos/grpc_interop.cfg @@ -19,7 +19,7 @@ build_file: "grpc/tools/internal_ci/macos/grpc_interop.sh" timeout_mins: 240 action { define_artifacts { - regex: "**/*sponge_log.xml", + regex: "**/*sponge_log.xml" regex: "github/grpc/reports/**" } } diff --git a/tools/internal_ci/macos/grpc_master.cfg b/tools/internal_ci/macos/grpc_master.cfg index 1c34979d012..24c021dfcc2 100644 --- a/tools/internal_ci/macos/grpc_master.cfg +++ b/tools/internal_ci/macos/grpc_master.cfg @@ -20,5 +20,6 @@ timeout_mins: 240 action { define_artifacts { regex: "**/*sponge_log.xml" + regex: "github/grpc/reports/**" } } diff --git a/tools/internal_ci/windows/grpc_build_artifacts.cfg b/tools/internal_ci/windows/grpc_build_artifacts.cfg index da359ca05ae..38b0abd519b 100644 --- a/tools/internal_ci/windows/grpc_build_artifacts.cfg +++ b/tools/internal_ci/windows/grpc_build_artifacts.cfg @@ -20,6 +20,7 @@ timeout_mins: 120 action { define_artifacts { regex: "**/*sponge_log.xml" + regex: "github/grpc/reports/**" regex: "github/grpc/artifacts/**" } } diff --git a/tools/internal_ci/windows/grpc_master.cfg b/tools/internal_ci/windows/grpc_master.cfg index 80abea6c381..786ebc01973 100644 --- a/tools/internal_ci/windows/grpc_master.cfg +++ b/tools/internal_ci/windows/grpc_master.cfg @@ -20,5 +20,6 @@ timeout_mins: 360 action { define_artifacts { regex: "**/*sponge_log.xml" + regex: "github/grpc/reports/**" } } diff --git a/tools/internal_ci/windows/grpc_portability_master.cfg b/tools/internal_ci/windows/grpc_portability_master.cfg index cb48d35de9e..85f69272546 100644 --- a/tools/internal_ci/windows/grpc_portability_master.cfg +++ b/tools/internal_ci/windows/grpc_portability_master.cfg @@ -20,5 +20,6 @@ timeout_mins: 360 action { define_artifacts { regex: "**/*sponge_log.xml" + regex: "github/grpc/reports/**" } } From fa9199581117c4c218220d3ce0bac1457f76e08a Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Wed, 26 Jul 2017 12:14:36 +0200 Subject: [PATCH 28/80] add prepare_build_windows.bat script --- .../helper_scripts/prepare_build_windows.bat | 21 +++++++++++++++++++ .../windows/grpc_build_artifacts.bat | 9 ++------ tools/internal_ci/windows/grpc_master.bat | 6 +----- .../windows/grpc_portability_master.bat | 6 +----- 4 files changed, 25 insertions(+), 17 deletions(-) create mode 100644 tools/internal_ci/helper_scripts/prepare_build_windows.bat diff --git a/tools/internal_ci/helper_scripts/prepare_build_windows.bat b/tools/internal_ci/helper_scripts/prepare_build_windows.bat new file mode 100644 index 00000000000..1634acd389d --- /dev/null +++ b/tools/internal_ci/helper_scripts/prepare_build_windows.bat @@ -0,0 +1,21 @@ +@rem Copyright 2017 gRPC authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem http://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. + +@rem make sure msys binaries are preferred over cygwin binaries +@rem set path to python 2.7 +set PATH=C:\tools\msys64\usr\bin;C:\Python27;%PATH% + +bash tools/internal_ci/helper_scripts/gen_report_index.sh + +git submodule update --init diff --git a/tools/internal_ci/windows/grpc_build_artifacts.bat b/tools/internal_ci/windows/grpc_build_artifacts.bat index 8cfa2fb0bea..29c876dd353 100644 --- a/tools/internal_ci/windows/grpc_build_artifacts.bat +++ b/tools/internal_ci/windows/grpc_build_artifacts.bat @@ -12,7 +12,7 @@ @rem See the License for the specific language governing permissions and @rem limitations under the License. -@rem Move python installation from _32bit to _32bits where they are expected python artifact builder +@rem Move python installation from _32bit to _32bits where they are expected by python artifact builder @rem TODO(jtattermusch): get rid of this hack rename C:\Python27_32bit Python27_32bits rename C:\Python34_32bit Python34_32bits @@ -21,15 +21,10 @@ rename C:\Python36_32bit Python36_32bits pacman -S --noconfirm mingw64/mingw-w64-x86_64-gcc mingw32/mingw-w64-i686-gcc -@rem make sure msys binaries are preferred over cygwin binaries -@rem set path to python 2.7 -set PATH=C:\tools\msys64\usr\bin;C:\Python27;%PATH% - - @rem enter repo root cd /d %~dp0\..\..\.. -git submodule update --init +call tools/internal_ci/helper_scripts/prepare_build_windows.bat python tools/run_tests/task_runner.py -f artifact windows || goto :error goto :EOF diff --git a/tools/internal_ci/windows/grpc_master.bat b/tools/internal_ci/windows/grpc_master.bat index 3984b810754..58eefc301bb 100644 --- a/tools/internal_ci/windows/grpc_master.bat +++ b/tools/internal_ci/windows/grpc_master.bat @@ -12,14 +12,10 @@ @rem See the License for the specific language governing permissions and @rem limitations under the License. -@rem make sure msys binaries are preferred over cygwin binaries -@rem set path to python 2.7 -set PATH=C:\tools\msys64\usr\bin;C:\Python27;%PATH% - @rem enter repo root cd /d %~dp0\..\..\.. -git submodule update --init +call tools/internal_ci/helper_scripts/prepare_build_windows.bat python tools/run_tests/run_tests_matrix.py -f basictests windows -j 1 --inner_jobs 8 --internal_ci || goto :error goto :EOF diff --git a/tools/internal_ci/windows/grpc_portability_master.bat b/tools/internal_ci/windows/grpc_portability_master.bat index cb6b1fe1337..c93d56c7e4a 100644 --- a/tools/internal_ci/windows/grpc_portability_master.bat +++ b/tools/internal_ci/windows/grpc_portability_master.bat @@ -12,14 +12,10 @@ @rem See the License for the specific language governing permissions and @rem limitations under the License. -@rem make sure msys binaries are preferred over cygwin binaries -@rem set path to python 2.7 -set PATH=C:\tools\msys64\usr\bin;C:\Python27;%PATH% - @rem enter repo root cd /d %~dp0\..\..\.. -git submodule update --init +call tools/internal_ci/helper_scripts/prepare_build_windows.bat python tools/run_tests/run_tests_matrix.py -f portability windows -j 1 --inner_jobs 8 --internal_ci || goto :error goto :EOF From 633434aed2b7db1e206c884257b198e04f2bf60e Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Mon, 24 Jul 2017 17:11:35 +0200 Subject: [PATCH 29/80] dont run user handlers on grpc threadpool threads --- .../Grpc.Core.Tests/ThreadingModelTest.cs | 98 +++++++++++++++++++ src/csharp/Grpc.Core/Grpc.Core.csproj | 1 + .../Grpc.Core/Internal/GrpcThreadPool.cs | 19 +++- src/csharp/tests.json | 1 + 4 files changed, 117 insertions(+), 2 deletions(-) create mode 100644 src/csharp/Grpc.Core.Tests/ThreadingModelTest.cs diff --git a/src/csharp/Grpc.Core.Tests/ThreadingModelTest.cs b/src/csharp/Grpc.Core.Tests/ThreadingModelTest.cs new file mode 100644 index 00000000000..fb181989455 --- /dev/null +++ b/src/csharp/Grpc.Core.Tests/ThreadingModelTest.cs @@ -0,0 +1,98 @@ +#region Copyright notice and license + +// Copyright 2015 gRPC authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#endregion + +using System; +using NUnit.Framework; +using System.Threading; +using System.Threading.Tasks; + +namespace Grpc.Core.Tests +{ + public class ThreadingModelTest + { + const string Host = "127.0.0.1"; + + MockServiceHelper helper; + Server server; + Channel channel; + + [SetUp] + public void Init() + { + helper = new MockServiceHelper(Host); + server = helper.GetServer(); + server.Start(); + channel = helper.GetChannel(); + } + + [TearDown] + public void Cleanup() + { + channel.ShutdownAsync().Wait(); + server.ShutdownAsync().Wait(); + } + + [Test] + public void BlockingCallInServerHandlerDoesNotDeadlock() + { + helper.UnaryHandler = new UnaryServerMethod(async (request, context) => + { + int recursionDepth = int.Parse(request); + if (recursionDepth <= 0) { + return "SUCCESS"; + } + return Calls.BlockingUnaryCall(helper.CreateUnaryCall(), (recursionDepth - 1).ToString()); + }); + + int maxRecursionDepth = Environment.ProcessorCount * 2; // make sure we have more pending blocking calls than threads in GrpcThreadPool + Assert.AreEqual("SUCCESS", Calls.BlockingUnaryCall(helper.CreateUnaryCall(), maxRecursionDepth.ToString())); + } + + [Test] + public void HandlerDoesNotRunOnGrpcThread() + { + helper.UnaryHandler = new UnaryServerMethod(async (request, context) => + { + if (IsRunningOnGrpcThreadPool()) { + return "Server handler should not run on gRPC threadpool thread."; + } + return request; + }); + + Assert.AreEqual("ABC", Calls.BlockingUnaryCall(helper.CreateUnaryCall(), "ABC")); + } + + [Test] + public async Task ContinuationDoesNotRunOnGrpcThread() + { + helper.UnaryHandler = new UnaryServerMethod(async (request, context) => + { + return request; + }); + + await Calls.AsyncUnaryCall(helper.CreateUnaryCall(), "ABC"); + Assert.IsFalse(IsRunningOnGrpcThreadPool()); + } + + private static bool IsRunningOnGrpcThreadPool() + { + var threadName = Thread.CurrentThread.Name ?? ""; + return threadName.Contains("grpc"); + } + } +} diff --git a/src/csharp/Grpc.Core/Grpc.Core.csproj b/src/csharp/Grpc.Core/Grpc.Core.csproj index 50358298f48..e32711c5204 100755 --- a/src/csharp/Grpc.Core/Grpc.Core.csproj +++ b/src/csharp/Grpc.Core/Grpc.Core.csproj @@ -64,6 +64,7 @@ + diff --git a/src/csharp/Grpc.Core/Internal/GrpcThreadPool.cs b/src/csharp/Grpc.Core/Internal/GrpcThreadPool.cs index f9ae77c74e9..8640058b0cc 100644 --- a/src/csharp/Grpc.Core/Internal/GrpcThreadPool.cs +++ b/src/csharp/Grpc.Core/Internal/GrpcThreadPool.cs @@ -33,6 +33,8 @@ namespace Grpc.Core.Internal internal class GrpcThreadPool { static readonly ILogger Logger = GrpcEnvironment.Logger.ForType(); + static readonly WaitCallback RunCompletionQueueEventCallbackSuccess = new WaitCallback((callback) => RunCompletionQueueEventCallback((OpCompletionDelegate) callback, true)); + static readonly WaitCallback RunCompletionQueueEventCallbackFailure = new WaitCallback((callback) => RunCompletionQueueEventCallback((OpCompletionDelegate) callback, false)); readonly GrpcEnvironment environment; readonly object myLock = new object(); @@ -165,11 +167,12 @@ namespace Grpc.Core.Internal try { var callback = cq.CompletionRegistry.Extract(tag); - callback(success); + // Use cached delegates to avoid unnecessary allocations + ThreadPool.QueueUserWorkItem(success ? RunCompletionQueueEventCallbackSuccess : RunCompletionQueueEventCallbackFailure, callback); } catch (Exception e) { - Logger.Error(e, "Exception occured while invoking completion delegate"); + Logger.Error(e, "Exception occured while extracting event from completion registry."); } } } @@ -186,5 +189,17 @@ namespace Grpc.Core.Internal } return list.AsReadOnly(); } + + private static void RunCompletionQueueEventCallback(OpCompletionDelegate callback, bool success) + { + try + { + callback(success); + } + catch (Exception e) + { + Logger.Error(e, "Exception occured while invoking completion delegate"); + } + } } } diff --git a/src/csharp/tests.json b/src/csharp/tests.json index bc6adbbfe8b..78410510526 100644 --- a/src/csharp/tests.json +++ b/src/csharp/tests.json @@ -31,6 +31,7 @@ "Grpc.Core.Tests.ShutdownHookPendingCallTest", "Grpc.Core.Tests.ShutdownHookServerTest", "Grpc.Core.Tests.ShutdownTest", + "Grpc.Core.Tests.ThreadingModelTest", "Grpc.Core.Tests.TimeoutsTest", "Grpc.Core.Tests.UserAgentStringTest" ], From 7dbd72497ceee212a33db09c51e0ad3c50a90b7e Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Tue, 25 Jul 2017 14:24:58 +0200 Subject: [PATCH 30/80] introduce inlineHandlers setting --- src/csharp/Grpc.Core/GrpcEnvironment.cs | 22 ++++++++++++++++++- .../Grpc.Core/Internal/GrpcThreadPool.cs | 14 ++++++++++-- 2 files changed, 33 insertions(+), 3 deletions(-) diff --git a/src/csharp/Grpc.Core/GrpcEnvironment.cs b/src/csharp/Grpc.Core/GrpcEnvironment.cs index 8d0c66aa5bf..0663ee92150 100644 --- a/src/csharp/Grpc.Core/GrpcEnvironment.cs +++ b/src/csharp/Grpc.Core/GrpcEnvironment.cs @@ -39,6 +39,7 @@ namespace Grpc.Core static int refCount; static int? customThreadPoolSize; static int? customCompletionQueueCount; + static bool inlineHandlers; static readonly HashSet registeredChannels = new HashSet(); static readonly HashSet registeredServers = new HashSet(); @@ -217,13 +218,32 @@ namespace Grpc.Core } } + /// + /// By default, gRPC's internal event handlers get offloaded to .NET default thread pool thread (inlineHandlers=false). + /// Setting inlineHandlers to true will allow scheduling the event handlers directly to + /// GrpcThreadPool internal threads. That can lead to significant performance gains in some situations, + /// but requires user to never block in async code (incorrectly written code can easily lead to deadlocks). + /// Inlining handlers is an advanced setting and you should only use it if you know what you are doing. + /// Most users should rely on the default value provided by gRPC library. + /// Note: this method is part of an experimental API that can change or be removed without any prior notice. + /// Note: inlineHandlers=true was the default in gRPC C# v1.4.x and earlier. + /// + public static void SetHandlerInlining(bool inlineHandlers) + { + lock (staticLock) + { + GrpcPreconditions.CheckState(instance == null, "Can only be set before GrpcEnvironment is initialized"); + GrpcEnvironment.inlineHandlers = inlineHandlers; + } + } + /// /// Creates gRPC environment. /// private GrpcEnvironment() { GrpcNativeInit(); - threadPool = new GrpcThreadPool(this, GetThreadPoolSizeOrDefault(), GetCompletionQueueCountOrDefault()); + threadPool = new GrpcThreadPool(this, GetThreadPoolSizeOrDefault(), GetCompletionQueueCountOrDefault(), inlineHandlers); threadPool.Start(); } diff --git a/src/csharp/Grpc.Core/Internal/GrpcThreadPool.cs b/src/csharp/Grpc.Core/Internal/GrpcThreadPool.cs index 8640058b0cc..19b44c26189 100644 --- a/src/csharp/Grpc.Core/Internal/GrpcThreadPool.cs +++ b/src/csharp/Grpc.Core/Internal/GrpcThreadPool.cs @@ -41,6 +41,7 @@ namespace Grpc.Core.Internal readonly List threads = new List(); readonly int poolSize; readonly int completionQueueCount; + readonly bool inlineHandlers; readonly List threadProfilers = new List(); // profilers assigned to threadpool threads @@ -54,11 +55,13 @@ namespace Grpc.Core.Internal /// Environment. /// Pool size. /// Completion queue count. - public GrpcThreadPool(GrpcEnvironment environment, int poolSize, int completionQueueCount) + /// Handler inlining. + public GrpcThreadPool(GrpcEnvironment environment, int poolSize, int completionQueueCount, bool inlineHandlers) { this.environment = environment; this.poolSize = poolSize; this.completionQueueCount = completionQueueCount; + this.inlineHandlers = inlineHandlers; GrpcPreconditions.CheckArgument(poolSize >= completionQueueCount, "Thread pool size cannot be smaller than the number of completion queues used."); } @@ -168,7 +171,14 @@ namespace Grpc.Core.Internal { var callback = cq.CompletionRegistry.Extract(tag); // Use cached delegates to avoid unnecessary allocations - ThreadPool.QueueUserWorkItem(success ? RunCompletionQueueEventCallbackSuccess : RunCompletionQueueEventCallbackFailure, callback); + if (!inlineHandlers) + { + ThreadPool.QueueUserWorkItem(success ? RunCompletionQueueEventCallbackSuccess : RunCompletionQueueEventCallbackFailure, callback); + } + else + { + RunCompletionQueueEventCallback(callback, success); + } } catch (Exception e) { From 75e9eaed4410b54226d113bcb27aff7ba396f2fa Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Tue, 25 Jul 2017 12:23:28 +0200 Subject: [PATCH 31/80] reduce threadpool size for qps benchmarks --- src/csharp/Grpc.IntegrationTesting/QpsWorker.cs | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/csharp/Grpc.IntegrationTesting/QpsWorker.cs b/src/csharp/Grpc.IntegrationTesting/QpsWorker.cs index 7009a93b186..a579fb80406 100644 --- a/src/csharp/Grpc.IntegrationTesting/QpsWorker.cs +++ b/src/csharp/Grpc.IntegrationTesting/QpsWorker.cs @@ -63,11 +63,6 @@ namespace Grpc.IntegrationTesting private async Task RunAsync() { - // (ThreadPoolSize == ProcessorCount) gives best throughput in benchmarks - // and doesn't seem to harm performance even when server and client - // are running on the same machine. - GrpcEnvironment.SetThreadPoolSize(Environment.ProcessorCount); - string host = "0.0.0.0"; int port = options.DriverPort; From 4095cd9de4d10d2b05363fb40f9a9cd669999591 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Wed, 26 Jul 2017 17:57:25 +0200 Subject: [PATCH 32/80] address comments --- tools/internal_ci/helper_scripts/gen_report_index.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/internal_ci/helper_scripts/gen_report_index.sh b/tools/internal_ci/helper_scripts/gen_report_index.sh index cda2fa92a67..0af89c331cd 100755 --- a/tools/internal_ci/helper_scripts/gen_report_index.sh +++ b/tools/internal_ci/helper_scripts/gen_report_index.sh @@ -19,7 +19,7 @@ set -e # change to grpc repo root cd $(dirname $0)/../../.. -# Jenkins URLs are in form "grpc/job/macos/job/experimental/job/jtattermusch_experiment" +# Kororo URLs are in the form "grpc/job/macos/job/master/job/grpc_build_artifacts" KOKORO_JOB_PATH=$(echo "${KOKORO_JOB_NAME}" | sed "s|/|/job/|g") mkdir -p reports From 738a76656cc53edb4715117d63da87c53767fa1a Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Wed, 26 Jul 2017 19:18:00 +0200 Subject: [PATCH 33/80] delete unused grpc_master.cfg --- tools/internal_ci/linux/grpc_master.cfg | 30 ------------------------- 1 file changed, 30 deletions(-) delete mode 100644 tools/internal_ci/linux/grpc_master.cfg diff --git a/tools/internal_ci/linux/grpc_master.cfg b/tools/internal_ci/linux/grpc_master.cfg deleted file mode 100644 index a2784df2974..00000000000 --- a/tools/internal_ci/linux/grpc_master.cfg +++ /dev/null @@ -1,30 +0,0 @@ -# Copyright 2017 gRPC authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Config file for the internal CI (in protobuf text format) - -# Location of the continuous shell script in repository. -build_file: "grpc/tools/internal_ci/linux/grpc_run_tests_matrix.sh" -timeout_mins: 240 -action { - define_artifacts { - regex: "**/*sponge_log.xml" - regex: "github/grpc/reports/**" - } -} - -env_vars { - key: "RUN_TESTS_FLAGS" - value: "-f basictests linux --inner_jobs 16 -j 1 --internal_ci --bq_result_table aggregate_results" -} From 7b538dda77ec85181d057a5a9c41c84b0e0cf988 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Wed, 26 Jul 2017 19:18:48 +0200 Subject: [PATCH 34/80] grpc_basictests for mac --- tools/internal_ci/macos/grpc_basictests.cfg | 30 ++++++++++++++++++ .../macos/grpc_run_tests_matrix.sh | 31 +++++++++++++++++++ 2 files changed, 61 insertions(+) create mode 100644 tools/internal_ci/macos/grpc_basictests.cfg create mode 100755 tools/internal_ci/macos/grpc_run_tests_matrix.sh diff --git a/tools/internal_ci/macos/grpc_basictests.cfg b/tools/internal_ci/macos/grpc_basictests.cfg new file mode 100644 index 00000000000..ce3609c9ec4 --- /dev/null +++ b/tools/internal_ci/macos/grpc_basictests.cfg @@ -0,0 +1,30 @@ +# Copyright 2017 gRPC authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Config file for the internal CI (in protobuf text format) + +# Location of the continuous shell script in repository. +build_file: "grpc/tools/internal_ci/macos/grpc_run_tests_matrix.sh" +timeout_mins: 240 +action { + define_artifacts { + regex: "**/*sponge_log.xml" + regex: "github/grpc/reports/**" + } +} + +env_vars { + key: "RUN_TESTS_FLAGS" + value: "-f basictests macos --internal_ci -j 2 --inner_jobs 4" +} diff --git a/tools/internal_ci/macos/grpc_run_tests_matrix.sh b/tools/internal_ci/macos/grpc_run_tests_matrix.sh new file mode 100755 index 00000000000..9a43e4869b0 --- /dev/null +++ b/tools/internal_ci/macos/grpc_run_tests_matrix.sh @@ -0,0 +1,31 @@ +#!/bin/bash +# Copyright 2017 gRPC authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -ex + +# change to grpc repo root +cd $(dirname $0)/../../.. + +source tools/internal_ci/helper_scripts/prepare_build_macos_rc + +tools/run_tests/run_tests_matrix.py $RUN_TESTS_FLAGS || FAILED="true" + +# kill port_server.py to prevent the build from hanging +ps aux | grep port_server\\.py | awk '{print $2}' | xargs kill -9 + +if [ "$FAILED" != "" ] +then + exit 1 +fi From bc699ed5da2cf6447cbd9f9cfb97b723dbf04cf9 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Wed, 26 Jul 2017 19:31:30 +0200 Subject: [PATCH 35/80] revamp kokoro windows jobs --- tools/internal_ci/windows/grpc_basictests.cfg | 30 +++++++++++++++++++ tools/internal_ci/windows/grpc_master.cfg | 7 ++++- .../windows/grpc_portability_master.bat | 24 --------------- .../windows/grpc_portability_master.cfg | 7 ++++- ...c_master.bat => grpc_run_tests_matrix.bat} | 2 +- 5 files changed, 43 insertions(+), 27 deletions(-) create mode 100644 tools/internal_ci/windows/grpc_basictests.cfg delete mode 100644 tools/internal_ci/windows/grpc_portability_master.bat rename tools/internal_ci/windows/{grpc_master.bat => grpc_run_tests_matrix.bat} (87%) diff --git a/tools/internal_ci/windows/grpc_basictests.cfg b/tools/internal_ci/windows/grpc_basictests.cfg new file mode 100644 index 00000000000..a116738651f --- /dev/null +++ b/tools/internal_ci/windows/grpc_basictests.cfg @@ -0,0 +1,30 @@ +# Copyright 2017 gRPC authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Config file for the internal CI (in protobuf text format) + +# Location of the continuous shell script in repository. +build_file: "grpc/tools/internal_ci/windows/grpc_run_tests_matrix.bat" +timeout_mins: 360 +action { + define_artifacts { + regex: "**/*sponge_log.xml" + regex: "github/grpc/reports/**" + } +} + +env_vars { + key: "RUN_TESTS_FLAGS" + value: "-f basictests windows -j 1 --inner_jobs 8 --internal_ci" +} diff --git a/tools/internal_ci/windows/grpc_master.cfg b/tools/internal_ci/windows/grpc_master.cfg index 786ebc01973..a116738651f 100644 --- a/tools/internal_ci/windows/grpc_master.cfg +++ b/tools/internal_ci/windows/grpc_master.cfg @@ -15,7 +15,7 @@ # Config file for the internal CI (in protobuf text format) # Location of the continuous shell script in repository. -build_file: "grpc/tools/internal_ci/windows/grpc_master.bat" +build_file: "grpc/tools/internal_ci/windows/grpc_run_tests_matrix.bat" timeout_mins: 360 action { define_artifacts { @@ -23,3 +23,8 @@ action { regex: "github/grpc/reports/**" } } + +env_vars { + key: "RUN_TESTS_FLAGS" + value: "-f basictests windows -j 1 --inner_jobs 8 --internal_ci" +} diff --git a/tools/internal_ci/windows/grpc_portability_master.bat b/tools/internal_ci/windows/grpc_portability_master.bat deleted file mode 100644 index c93d56c7e4a..00000000000 --- a/tools/internal_ci/windows/grpc_portability_master.bat +++ /dev/null @@ -1,24 +0,0 @@ -@rem Copyright 2017 gRPC authors. -@rem -@rem Licensed under the Apache License, Version 2.0 (the "License"); -@rem you may not use this file except in compliance with the License. -@rem You may obtain a copy of the License at -@rem -@rem http://www.apache.org/licenses/LICENSE-2.0 -@rem -@rem Unless required by applicable law or agreed to in writing, software -@rem distributed under the License is distributed on an "AS IS" BASIS, -@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -@rem See the License for the specific language governing permissions and -@rem limitations under the License. - -@rem enter repo root -cd /d %~dp0\..\..\.. - -call tools/internal_ci/helper_scripts/prepare_build_windows.bat - -python tools/run_tests/run_tests_matrix.py -f portability windows -j 1 --inner_jobs 8 --internal_ci || goto :error -goto :EOF - -:error -exit /b %errorlevel% diff --git a/tools/internal_ci/windows/grpc_portability_master.cfg b/tools/internal_ci/windows/grpc_portability_master.cfg index 85f69272546..c395cb4a949 100644 --- a/tools/internal_ci/windows/grpc_portability_master.cfg +++ b/tools/internal_ci/windows/grpc_portability_master.cfg @@ -15,7 +15,7 @@ # Config file for the internal CI (in protobuf text format) # Location of the continuous shell script in repository. -build_file: "grpc/tools/internal_ci/windows/grpc_portability_master.bat" +build_file: "grpc/tools/internal_ci/windows/grpc_run_tests_matrix.bat" timeout_mins: 360 action { define_artifacts { @@ -23,3 +23,8 @@ action { regex: "github/grpc/reports/**" } } + +env_vars { + key: "RUN_TESTS_FLAGS" + value: "-f portability windows -j 1 --inner_jobs 8 --internal_ci" +} diff --git a/tools/internal_ci/windows/grpc_master.bat b/tools/internal_ci/windows/grpc_run_tests_matrix.bat similarity index 87% rename from tools/internal_ci/windows/grpc_master.bat rename to tools/internal_ci/windows/grpc_run_tests_matrix.bat index 58eefc301bb..08d834f8b06 100644 --- a/tools/internal_ci/windows/grpc_master.bat +++ b/tools/internal_ci/windows/grpc_run_tests_matrix.bat @@ -17,7 +17,7 @@ cd /d %~dp0\..\..\.. call tools/internal_ci/helper_scripts/prepare_build_windows.bat -python tools/run_tests/run_tests_matrix.py -f basictests windows -j 1 --inner_jobs 8 --internal_ci || goto :error +python tools/run_tests/run_tests_matrix.py %RUN_TESTS_FLAGS% || goto :error goto :EOF :error From 66e7c6785f5a7ccce897c71cbbd685c350c03595 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Wed, 26 Jul 2017 19:34:45 +0200 Subject: [PATCH 36/80] revamp kokoro macos jobs --- tools/internal_ci/macos/grpc_master.cfg | 7 +++++- tools/internal_ci/macos/grpc_master.sh | 31 ------------------------- 2 files changed, 6 insertions(+), 32 deletions(-) delete mode 100755 tools/internal_ci/macos/grpc_master.sh diff --git a/tools/internal_ci/macos/grpc_master.cfg b/tools/internal_ci/macos/grpc_master.cfg index 24c021dfcc2..ce3609c9ec4 100644 --- a/tools/internal_ci/macos/grpc_master.cfg +++ b/tools/internal_ci/macos/grpc_master.cfg @@ -15,7 +15,7 @@ # Config file for the internal CI (in protobuf text format) # Location of the continuous shell script in repository. -build_file: "grpc/tools/internal_ci/macos/grpc_master.sh" +build_file: "grpc/tools/internal_ci/macos/grpc_run_tests_matrix.sh" timeout_mins: 240 action { define_artifacts { @@ -23,3 +23,8 @@ action { regex: "github/grpc/reports/**" } } + +env_vars { + key: "RUN_TESTS_FLAGS" + value: "-f basictests macos --internal_ci -j 2 --inner_jobs 4" +} diff --git a/tools/internal_ci/macos/grpc_master.sh b/tools/internal_ci/macos/grpc_master.sh deleted file mode 100755 index c64666b2dec..00000000000 --- a/tools/internal_ci/macos/grpc_master.sh +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/bash -# Copyright 2017 gRPC authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -set -ex - -# change to grpc repo root -cd $(dirname $0)/../../.. - -source tools/internal_ci/helper_scripts/prepare_build_macos_rc - -tools/run_tests/run_tests_matrix.py -f basictests macos --internal_ci -j 2 --inner_jobs 4 || FAILED="true" - -# kill port_server.py to prevent the build from hanging -ps aux | grep port_server\\.py | awk '{print $2}' | xargs kill -9 - -if [ "$FAILED" != "" ] -then - exit 1 -fi From 36d0056c146fd7fc7f9d37927c265617afabd7e5 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Wed, 26 Jul 2017 19:41:14 +0200 Subject: [PATCH 37/80] prevent timeouts for linux artifact build --- tools/internal_ci/linux/grpc_build_artifacts.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/internal_ci/linux/grpc_build_artifacts.sh b/tools/internal_ci/linux/grpc_build_artifacts.sh index 3997a130878..985243e91b2 100755 --- a/tools/internal_ci/linux/grpc_build_artifacts.sh +++ b/tools/internal_ci/linux/grpc_build_artifacts.sh @@ -26,4 +26,4 @@ set -e # rvm commands are very verbose rvm --default use ruby-2.4.1 set -ex -tools/run_tests/task_runner.py -f artifact linux +tools/run_tests/task_runner.py -f artifact linux -j 6 From 5794061764976c4771f69a3193cd38b3cdba193e Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Wed, 26 Jul 2017 14:29:52 -0700 Subject: [PATCH 38/80] Improvements to grpc_byte_stream API and handling. - Add shutdown() method (to be used in forthcoming call combiner code). - Use a vtable instead of storing method pointers in each instance. - Check all callers of pull() to make sure that they are properly handling errors. - Clarify ownership rules and attempt to adhere to them. - Added a new grpc_caching_byte_stream implementation, which is used in http_client_filter to avoid having to read the whole send_message byte stream before passing control down the stack. (This class may also be used in the retry code I'm working on separately.) - As part of this, did a major rewrite of http_client_filter, which made the code more readable and fixed a number of potential bugs. Note that some of this code is hard to test right now, due to the fact that the send_message byte stream is always a slice_buffer stream, for which next() is always synchronous and no destruction is needed. However, some future work (specifically, my call combiner work and Craig's incremental send work) will start leveraging this. --- CMakeLists.txt | 32 ++ Makefile | 36 ++ build.yaml | 10 + .../filters/http/client/http_client_filter.c | 514 +++++++++--------- .../message_compress_filter.c | 202 ++++--- .../chttp2/transport/chttp2_transport.c | 63 ++- .../ext/transport/inproc/inproc_transport.c | 33 +- src/core/lib/transport/byte_stream.c | 128 ++++- src/core/lib/transport/byte_stream.h | 99 +++- src/core/lib/transport/transport.c | 24 +- src/core/lib/transport/transport.h | 9 + test/core/transport/BUILD | 12 + test/core/transport/byte_stream_test.c | 279 ++++++++++ .../generated/sources_and_headers.json | 17 + tools/run_tests/generated/tests.json | 22 + vsprojects/buildtests_c.sln | 27 + .../byte_stream_test/byte_stream_test.vcxproj | 199 +++++++ .../byte_stream_test.vcxproj.filters | 21 + 18 files changed, 1306 insertions(+), 421 deletions(-) create mode 100644 test/core/transport/byte_stream_test.c create mode 100644 vsprojects/vcxproj/test/byte_stream_test/byte_stream_test.vcxproj create mode 100644 vsprojects/vcxproj/test/byte_stream_test/byte_stream_test.vcxproj.filters diff --git a/CMakeLists.txt b/CMakeLists.txt index 266f2c0774a..f71563a38d7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -394,6 +394,7 @@ add_dependencies(buildtests_c bad_server_response_test) add_dependencies(buildtests_c bdp_estimator_test) add_dependencies(buildtests_c bin_decoder_test) add_dependencies(buildtests_c bin_encoder_test) +add_dependencies(buildtests_c byte_stream_test) add_dependencies(buildtests_c census_context_test) add_dependencies(buildtests_c census_intrusive_hash_map_test) add_dependencies(buildtests_c census_resource_test) @@ -4785,6 +4786,37 @@ target_link_libraries(bin_encoder_test endif (gRPC_BUILD_TESTS) if (gRPC_BUILD_TESTS) +add_executable(byte_stream_test + test/core/transport/byte_stream_test.c +) + + +target_include_directories(byte_stream_test + PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} + PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include + PRIVATE ${BORINGSSL_ROOT_DIR}/include + PRIVATE ${PROTOBUF_ROOT_DIR}/src + PRIVATE ${BENCHMARK_ROOT_DIR}/include + PRIVATE ${ZLIB_ROOT_DIR} + PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/third_party/zlib + PRIVATE ${CARES_BUILD_INCLUDE_DIR} + PRIVATE ${CARES_INCLUDE_DIR} + PRIVATE ${CARES_PLATFORM_INCLUDE_DIR} + PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/third_party/cares/cares + PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/third_party/gflags/include +) + +target_link_libraries(byte_stream_test + ${_gRPC_ALLTARGETS_LIBRARIES} + grpc_test_util + grpc + gpr_test_util + gpr +) + +endif (gRPC_BUILD_TESTS) +if (gRPC_BUILD_TESTS) + add_executable(census_context_test test/core/census/context_test.c ) diff --git a/Makefile b/Makefile index 7b53024b6c1..98cfb04e54a 100644 --- a/Makefile +++ b/Makefile @@ -954,6 +954,7 @@ bad_server_response_test: $(BINDIR)/$(CONFIG)/bad_server_response_test bdp_estimator_test: $(BINDIR)/$(CONFIG)/bdp_estimator_test bin_decoder_test: $(BINDIR)/$(CONFIG)/bin_decoder_test bin_encoder_test: $(BINDIR)/$(CONFIG)/bin_encoder_test +byte_stream_test: $(BINDIR)/$(CONFIG)/byte_stream_test census_context_test: $(BINDIR)/$(CONFIG)/census_context_test census_intrusive_hash_map_test: $(BINDIR)/$(CONFIG)/census_intrusive_hash_map_test census_resource_test: $(BINDIR)/$(CONFIG)/census_resource_test @@ -1345,6 +1346,7 @@ buildtests_c: privatelibs_c \ $(BINDIR)/$(CONFIG)/bdp_estimator_test \ $(BINDIR)/$(CONFIG)/bin_decoder_test \ $(BINDIR)/$(CONFIG)/bin_encoder_test \ + $(BINDIR)/$(CONFIG)/byte_stream_test \ $(BINDIR)/$(CONFIG)/census_context_test \ $(BINDIR)/$(CONFIG)/census_intrusive_hash_map_test \ $(BINDIR)/$(CONFIG)/census_resource_test \ @@ -1746,6 +1748,8 @@ test_c: buildtests_c $(Q) $(BINDIR)/$(CONFIG)/bin_decoder_test || ( echo test bin_decoder_test failed ; exit 1 ) $(E) "[RUN] Testing bin_encoder_test" $(Q) $(BINDIR)/$(CONFIG)/bin_encoder_test || ( echo test bin_encoder_test failed ; exit 1 ) + $(E) "[RUN] Testing byte_stream_test" + $(Q) $(BINDIR)/$(CONFIG)/byte_stream_test || ( echo test byte_stream_test failed ; exit 1 ) $(E) "[RUN] Testing census_context_test" $(Q) $(BINDIR)/$(CONFIG)/census_context_test || ( echo test census_context_test failed ; exit 1 ) $(E) "[RUN] Testing census_intrusive_hash_map_test" @@ -8411,6 +8415,38 @@ endif endif +BYTE_STREAM_TEST_SRC = \ + test/core/transport/byte_stream_test.c \ + +BYTE_STREAM_TEST_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(BYTE_STREAM_TEST_SRC)))) +ifeq ($(NO_SECURE),true) + +# You can't build secure targets if you don't have OpenSSL. + +$(BINDIR)/$(CONFIG)/byte_stream_test: openssl_dep_error + +else + + + +$(BINDIR)/$(CONFIG)/byte_stream_test: $(BYTE_STREAM_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a + $(E) "[LD] Linking $@" + $(Q) mkdir -p `dirname $@` + $(Q) $(LD) $(LDFLAGS) $(BYTE_STREAM_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/byte_stream_test + +endif + +$(OBJDIR)/$(CONFIG)/test/core/transport/byte_stream_test.o: $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a + +deps_byte_stream_test: $(BYTE_STREAM_TEST_OBJS:.o=.dep) + +ifneq ($(NO_SECURE),true) +ifneq ($(NO_DEPS),true) +-include $(BYTE_STREAM_TEST_OBJS:.o=.dep) +endif +endif + + CENSUS_CONTEXT_TEST_SRC = \ test/core/census/context_test.c \ diff --git a/build.yaml b/build.yaml index 198467bf5ad..9c2504af71f 100644 --- a/build.yaml +++ b/build.yaml @@ -1702,6 +1702,16 @@ targets: deps: - grpc_test_util - grpc +- name: byte_stream_test + build: test + language: c + src: + - test/core/transport/byte_stream_test.c + deps: + - grpc_test_util + - grpc + - gpr_test_util + - gpr - name: census_context_test build: test language: c diff --git a/src/core/ext/filters/http/client/http_client_filter.c b/src/core/ext/filters/http/client/http_client_filter.c index 90f0aed7a0d..3ca01a41b53 100644 --- a/src/core/ext/filters/http/client/http_client_filter.c +++ b/src/core/ext/filters/http/client/http_client_filter.c @@ -36,41 +36,29 @@ static const size_t kMaxPayloadSizeForGet = 2048; typedef struct call_data { + // State for handling send_initial_metadata ops. grpc_linked_mdelem method; grpc_linked_mdelem scheme; grpc_linked_mdelem authority; grpc_linked_mdelem te_trailers; grpc_linked_mdelem content_type; grpc_linked_mdelem user_agent; - + // State for handling recv_initial_metadata ops. grpc_metadata_batch *recv_initial_metadata; + grpc_closure *original_recv_initial_metadata_ready; + grpc_closure recv_initial_metadata_ready; + // State for handling recv_trailing_metadata ops. grpc_metadata_batch *recv_trailing_metadata; - uint8_t *payload_bytes; - - /* Vars to read data off of send_message */ - grpc_transport_stream_op_batch *send_op; - uint32_t send_length; - uint32_t send_flags; - grpc_slice incoming_slice; - grpc_slice_buffer_stream replacement_stream; - grpc_slice_buffer slices; - /* flag that indicates that all slices of send_messages aren't availble */ - bool send_message_blocked; - - /** Closure to call when finished with the hc_on_recv hook */ - grpc_closure *on_done_recv_initial_metadata; - grpc_closure *on_done_recv_trailing_metadata; - grpc_closure *on_complete; - grpc_closure *post_send; - - /** Receive closures are chained: we inject this closure as the on_done_recv - up-call on transport_op, and remember to call our on_done_recv member - after handling it. */ - grpc_closure hc_on_recv_initial_metadata; - grpc_closure hc_on_recv_trailing_metadata; - grpc_closure hc_on_complete; - grpc_closure got_slice; - grpc_closure send_done; + grpc_closure *original_recv_trailing_metadata_on_complete; + grpc_closure recv_trailing_metadata_on_complete; + // State for handling send_message ops. + grpc_transport_stream_op_batch *send_message_batch; + size_t send_message_bytes_read; + grpc_byte_stream_cache send_message_cache; + grpc_caching_byte_stream send_message_caching_stream; + grpc_closure on_send_message_next_done; + grpc_closure *original_send_message_on_complete; + grpc_closure send_message_on_complete; } call_data; typedef struct channel_data { @@ -148,7 +136,7 @@ static grpc_error *client_filter_incoming_metadata(grpc_exec_ctx *exec_ctx, return GRPC_ERROR_NONE; } -static void hc_on_recv_initial_metadata(grpc_exec_ctx *exec_ctx, +static void recv_initial_metadata_ready(grpc_exec_ctx *exec_ctx, void *user_data, grpc_error *error) { grpc_call_element *elem = user_data; call_data *calld = elem->call_data; @@ -158,11 +146,13 @@ static void hc_on_recv_initial_metadata(grpc_exec_ctx *exec_ctx, } else { GRPC_ERROR_REF(error); } - GRPC_CLOSURE_RUN(exec_ctx, calld->on_done_recv_initial_metadata, error); + GRPC_CLOSURE_RUN(exec_ctx, calld->original_recv_initial_metadata_ready, + error); } -static void hc_on_recv_trailing_metadata(grpc_exec_ctx *exec_ctx, - void *user_data, grpc_error *error) { +static void recv_trailing_metadata_on_complete(grpc_exec_ctx *exec_ctx, + void *user_data, + grpc_error *error) { grpc_call_element *elem = user_data; call_data *calld = elem->call_data; if (error == GRPC_ERROR_NONE) { @@ -171,25 +161,131 @@ static void hc_on_recv_trailing_metadata(grpc_exec_ctx *exec_ctx, } else { GRPC_ERROR_REF(error); } - GRPC_CLOSURE_RUN(exec_ctx, calld->on_done_recv_trailing_metadata, error); + GRPC_CLOSURE_RUN(exec_ctx, calld->original_recv_trailing_metadata_on_complete, + error); } -static void hc_on_complete(grpc_exec_ctx *exec_ctx, void *user_data, - grpc_error *error) { - grpc_call_element *elem = user_data; - call_data *calld = elem->call_data; - if (calld->payload_bytes) { - gpr_free(calld->payload_bytes); - calld->payload_bytes = NULL; +static void send_message_on_complete(grpc_exec_ctx *exec_ctx, void *arg, + grpc_error *error) { + grpc_call_element *elem = (grpc_call_element *)arg; + call_data *calld = (call_data *)elem->call_data; + grpc_byte_stream_cache_destroy(exec_ctx, &calld->send_message_cache); + GRPC_CLOSURE_RUN(exec_ctx, calld->original_send_message_on_complete, + GRPC_ERROR_REF(error)); +} + +// Pulls a slice from the send_message byte stream, updating +// calld->send_message_bytes_read. +static grpc_error *pull_slice_from_send_message(grpc_exec_ctx *exec_ctx, + call_data *calld) { + grpc_slice incoming_slice; + grpc_error *error = grpc_byte_stream_pull( + exec_ctx, &calld->send_message_caching_stream.base, &incoming_slice); + if (error == GRPC_ERROR_NONE) { + calld->send_message_bytes_read += GRPC_SLICE_LENGTH(incoming_slice); + grpc_slice_unref_internal(exec_ctx, incoming_slice); } - calld->on_complete->cb(exec_ctx, calld->on_complete->cb_arg, error); + return error; } -static void send_done(grpc_exec_ctx *exec_ctx, void *elemp, grpc_error *error) { - grpc_call_element *elem = elemp; - call_data *calld = elem->call_data; - grpc_slice_buffer_reset_and_unref_internal(exec_ctx, &calld->slices); - calld->post_send->cb(exec_ctx, calld->post_send->cb_arg, error); +// Reads as many slices as possible from the send_message byte stream. +// Upon successful return, if calld->send_message_bytes_read == +// calld->send_message_caching_stream.base.length, then we have completed +// reading from the byte stream; otherwise, an async read has been dispatched +// and on_send_message_next_done() will be invoked when it is complete. +static grpc_error *read_all_available_send_message_data(grpc_exec_ctx *exec_ctx, + call_data *calld) { + while (grpc_byte_stream_next(exec_ctx, + &calld->send_message_caching_stream.base, + ~(size_t)0, &calld->on_send_message_next_done)) { + grpc_error *error = pull_slice_from_send_message(exec_ctx, calld); + if (error != GRPC_ERROR_NONE) return error; + if (calld->send_message_bytes_read == + calld->send_message_caching_stream.base.length) { + break; + } + } + return GRPC_ERROR_NONE; +} + +// Async callback for grpc_byte_stream_next(). +static void on_send_message_next_done(grpc_exec_ctx *exec_ctx, void *arg, + grpc_error *error) { + grpc_call_element *elem = (grpc_call_element *)arg; + call_data *calld = (call_data *)elem->call_data; + if (error != GRPC_ERROR_NONE) { + grpc_transport_stream_op_batch_finish_with_failure( + exec_ctx, calld->send_message_batch, error); + return; + } + error = pull_slice_from_send_message(exec_ctx, calld); + if (error != GRPC_ERROR_NONE) { + grpc_transport_stream_op_batch_finish_with_failure( + exec_ctx, calld->send_message_batch, error); + return; + } + // There may or may not be more to read, but we don't care. If we got + // here, then we know that all of the data was not available + // synchronously, so we were not able to do a cached call. Instead, + // we just reset the byte stream and then send down the batch as-is. + grpc_caching_byte_stream_reset(&calld->send_message_caching_stream); + grpc_call_next_op(exec_ctx, elem, calld->send_message_batch); +} + +static char *slice_buffer_to_string(grpc_slice_buffer *slice_buffer) { + char *payload_bytes = gpr_malloc(slice_buffer->length + 1); + size_t offset = 0; + for (size_t i = 0; i < slice_buffer->count; ++i) { + memcpy(payload_bytes + offset, + GRPC_SLICE_START_PTR(slice_buffer->slices[i]), + GRPC_SLICE_LENGTH(slice_buffer->slices[i])); + offset += GRPC_SLICE_LENGTH(slice_buffer->slices[i]); + } + *(payload_bytes + offset) = '\0'; + return payload_bytes; +} + +// Modifies the path entry in the batch's send_initial_metadata to +// append the base64-encoded query for a GET request. +static grpc_error *update_path_for_get(grpc_exec_ctx *exec_ctx, + grpc_call_element *elem, + grpc_transport_stream_op_batch *batch) { + call_data *calld = (call_data *)elem->call_data; + grpc_slice path_slice = + GRPC_MDVALUE(batch->payload->send_initial_metadata.send_initial_metadata + ->idx.named.path->md); + /* sum up individual component's lengths and allocate enough memory to + * hold combined path+query */ + size_t estimated_len = GRPC_SLICE_LENGTH(path_slice); + estimated_len++; /* for the '?' */ + estimated_len += grpc_base64_estimate_encoded_size( + batch->payload->send_message.send_message->length, true /* url_safe */, + false /* multi_line */); + grpc_slice path_with_query_slice = GRPC_SLICE_MALLOC(estimated_len); + /* memcopy individual pieces into this slice */ + char *write_ptr = (char *)GRPC_SLICE_START_PTR(path_with_query_slice); + char *original_path = (char *)GRPC_SLICE_START_PTR(path_slice); + memcpy(write_ptr, original_path, GRPC_SLICE_LENGTH(path_slice)); + write_ptr += GRPC_SLICE_LENGTH(path_slice); + *write_ptr++ = '?'; + char *payload_bytes = + slice_buffer_to_string(&calld->send_message_cache.cache_buffer); + grpc_base64_encode_core((char *)write_ptr, payload_bytes, + batch->payload->send_message.send_message->length, + true /* url_safe */, false /* multi_line */); + gpr_free(payload_bytes); + /* remove trailing unused memory and add trailing 0 to terminate string */ + char *t = (char *)GRPC_SLICE_START_PTR(path_with_query_slice); + /* safe to use strlen since base64_encode will always add '\0' */ + path_with_query_slice = + grpc_slice_sub_no_ref(path_with_query_slice, 0, strlen(t)); + /* substitute previous path with the new path+query */ + grpc_mdelem mdelem_path_and_query = + grpc_mdelem_from_slices(exec_ctx, GRPC_MDSTR_PATH, path_with_query_slice); + grpc_metadata_batch *b = + batch->payload->send_initial_metadata.send_initial_metadata; + return grpc_metadata_batch_substitute(exec_ctx, b, b->idx.named.path, + mdelem_path_and_query); } static void remove_if_present(grpc_exec_ctx *exec_ctx, @@ -200,273 +296,153 @@ static void remove_if_present(grpc_exec_ctx *exec_ctx, } } -static void continue_send_message(grpc_exec_ctx *exec_ctx, - grpc_call_element *elem) { +static void hc_start_transport_stream_op_batch( + grpc_exec_ctx *exec_ctx, grpc_call_element *elem, + grpc_transport_stream_op_batch *batch) { call_data *calld = elem->call_data; - uint8_t *wrptr = calld->payload_bytes; - while (grpc_byte_stream_next( - exec_ctx, calld->send_op->payload->send_message.send_message, ~(size_t)0, - &calld->got_slice)) { - grpc_byte_stream_pull(exec_ctx, - calld->send_op->payload->send_message.send_message, - &calld->incoming_slice); - if (GRPC_SLICE_LENGTH(calld->incoming_slice) > 0) { - memcpy(wrptr, GRPC_SLICE_START_PTR(calld->incoming_slice), - GRPC_SLICE_LENGTH(calld->incoming_slice)); - } - wrptr += GRPC_SLICE_LENGTH(calld->incoming_slice); - grpc_slice_buffer_add(&calld->slices, calld->incoming_slice); - if (calld->send_length == calld->slices.length) { - calld->send_message_blocked = false; - break; - } - } -} + channel_data *channeld = elem->channel_data; + GPR_TIMER_BEGIN("hc_start_transport_stream_op_batch", 0); + GRPC_CALL_LOG_OP(GPR_INFO, elem, batch); -static void got_slice(grpc_exec_ctx *exec_ctx, void *elemp, grpc_error *error) { - grpc_call_element *elem = elemp; - call_data *calld = elem->call_data; - calld->send_message_blocked = false; - if (GRPC_ERROR_NONE != - grpc_byte_stream_pull(exec_ctx, - calld->send_op->payload->send_message.send_message, - &calld->incoming_slice)) { - /* Should never reach here */ - abort(); - } - grpc_slice_buffer_add(&calld->slices, calld->incoming_slice); - if (calld->send_length == calld->slices.length) { - /* Pass down the original send_message op that was blocked.*/ - grpc_slice_buffer_stream_init(&calld->replacement_stream, &calld->slices, - calld->send_flags); - calld->send_op->payload->send_message.send_message = - &calld->replacement_stream.base; - calld->post_send = calld->send_op->on_complete; - calld->send_op->on_complete = &calld->send_done; - grpc_call_next_op(exec_ctx, elem, calld->send_op); - } else { - continue_send_message(exec_ctx, elem); + if (batch->recv_initial_metadata) { + /* substitute our callback for the higher callback */ + calld->recv_initial_metadata = + batch->payload->recv_initial_metadata.recv_initial_metadata; + calld->original_recv_initial_metadata_ready = + batch->payload->recv_initial_metadata.recv_initial_metadata_ready; + batch->payload->recv_initial_metadata.recv_initial_metadata_ready = + &calld->recv_initial_metadata_ready; } -} -static grpc_error *hc_mutate_op(grpc_exec_ctx *exec_ctx, - grpc_call_element *elem, - grpc_transport_stream_op_batch *op) { - /* grab pointers to our data from the call element */ - call_data *calld = elem->call_data; - channel_data *channeld = elem->channel_data; - grpc_error *error; + if (batch->recv_trailing_metadata) { + /* substitute our callback for the higher callback */ + calld->recv_trailing_metadata = + batch->payload->recv_trailing_metadata.recv_trailing_metadata; + calld->original_recv_trailing_metadata_on_complete = batch->on_complete; + batch->on_complete = &calld->recv_trailing_metadata_on_complete; + } - if (op->send_initial_metadata) { - /* Decide which HTTP VERB to use. We use GET if the request is marked - cacheable, and the operation contains both initial metadata and send - message, and the payload is below the size threshold, and all the data - for this request is immediately available. */ + grpc_error *error = GRPC_ERROR_NONE; + bool batch_will_be_handled_asynchronously = false; + if (batch->send_initial_metadata) { + // Decide which HTTP VERB to use. We use GET if the request is marked + // cacheable, and the operation contains both initial metadata and send + // message, and the payload is below the size threshold, and all the data + // for this request is immediately available. grpc_mdelem method = GRPC_MDELEM_METHOD_POST; - if (op->send_message && - (op->payload->send_initial_metadata.send_initial_metadata_flags & + if (batch->send_message && + (batch->payload->send_initial_metadata.send_initial_metadata_flags & GRPC_INITIAL_METADATA_CACHEABLE_REQUEST) && - op->payload->send_message.send_message->length < + batch->payload->send_message.send_message->length < channeld->max_payload_size_for_get) { - method = GRPC_MDELEM_METHOD_GET; - /* The following write to calld->send_message_blocked isn't racy with - reads in hc_start_transport_op (which deals with SEND_MESSAGE ops) because - being here means ops->send_message is not NULL, which is primarily - guarding the read there. */ - calld->send_message_blocked = true; - } else if (op->payload->send_initial_metadata.send_initial_metadata_flags & - GRPC_INITIAL_METADATA_IDEMPOTENT_REQUEST) { - method = GRPC_MDELEM_METHOD_PUT; - } - - /* Attempt to read the data from send_message and create a header field. */ - if (grpc_mdelem_eq(method, GRPC_MDELEM_METHOD_GET)) { - /* allocate memory to hold the entire payload */ - calld->payload_bytes = - gpr_malloc(op->payload->send_message.send_message->length); - - /* read slices of send_message and copy into payload_bytes */ - calld->send_op = op; - calld->send_length = op->payload->send_message.send_message->length; - calld->send_flags = op->payload->send_message.send_message->flags; - continue_send_message(exec_ctx, elem); - - if (calld->send_message_blocked == false) { - /* when all the send_message data is available, then modify the path - * MDELEM by appending base64 encoded query to the path */ - const int k_url_safe = 1; - const int k_multi_line = 0; - const unsigned char k_query_separator = '?'; - - grpc_slice path_slice = - GRPC_MDVALUE(op->payload->send_initial_metadata - .send_initial_metadata->idx.named.path->md); - /* sum up individual component's lengths and allocate enough memory to - * hold combined path+query */ - size_t estimated_len = GRPC_SLICE_LENGTH(path_slice); - estimated_len++; /* for the '?' */ - estimated_len += grpc_base64_estimate_encoded_size( - op->payload->send_message.send_message->length, k_url_safe, - k_multi_line); - grpc_slice path_with_query_slice = GRPC_SLICE_MALLOC(estimated_len); - - /* memcopy individual pieces into this slice */ - uint8_t *write_ptr = - (uint8_t *)GRPC_SLICE_START_PTR(path_with_query_slice); - uint8_t *original_path = (uint8_t *)GRPC_SLICE_START_PTR(path_slice); - memcpy(write_ptr, original_path, GRPC_SLICE_LENGTH(path_slice)); - write_ptr += GRPC_SLICE_LENGTH(path_slice); - - *write_ptr = k_query_separator; - write_ptr++; /* for the '?' */ - - grpc_base64_encode_core((char *)write_ptr, calld->payload_bytes, - op->payload->send_message.send_message->length, - k_url_safe, k_multi_line); - - /* remove trailing unused memory and add trailing 0 to terminate string - */ - char *t = (char *)GRPC_SLICE_START_PTR(path_with_query_slice); - /* safe to use strlen since base64_encode will always add '\0' */ - path_with_query_slice = - grpc_slice_sub_no_ref(path_with_query_slice, 0, strlen(t)); - - /* substitute previous path with the new path+query */ - grpc_mdelem mdelem_path_and_query = grpc_mdelem_from_slices( - exec_ctx, GRPC_MDSTR_PATH, path_with_query_slice); - grpc_metadata_batch *b = - op->payload->send_initial_metadata.send_initial_metadata; - error = grpc_metadata_batch_substitute(exec_ctx, b, b->idx.named.path, - mdelem_path_and_query); - if (error != GRPC_ERROR_NONE) return error; - - calld->on_complete = op->on_complete; - op->on_complete = &calld->hc_on_complete; - op->send_message = false; + calld->send_message_bytes_read = 0; + grpc_byte_stream_cache_init(&calld->send_message_cache, + batch->payload->send_message.send_message); + grpc_caching_byte_stream_init(&calld->send_message_caching_stream, + &calld->send_message_cache); + batch->payload->send_message.send_message = + &calld->send_message_caching_stream.base; + calld->original_send_message_on_complete = batch->on_complete; + batch->on_complete = &calld->send_message_on_complete; + calld->send_message_batch = batch; + error = read_all_available_send_message_data(exec_ctx, calld); + if (error != GRPC_ERROR_NONE) goto done; + // If all the data has been read, then we can use GET. + if (calld->send_message_bytes_read == + calld->send_message_caching_stream.base.length) { + method = GRPC_MDELEM_METHOD_GET; + error = update_path_for_get(exec_ctx, elem, batch); + if (error != GRPC_ERROR_NONE) goto done; + batch->send_message = false; + grpc_byte_stream_destroy(exec_ctx, + &calld->send_message_caching_stream.base); } else { - /* Not all data is available. Fall back to POST. */ + // Not all data is available. The batch will be sent down + // asynchronously in on_send_message_next_done(). + batch_will_be_handled_asynchronously = true; + // Fall back to POST. gpr_log(GPR_DEBUG, - "Request is marked Cacheable but not all data is available.\ - Falling back to POST"); - method = GRPC_MDELEM_METHOD_POST; + "Request is marked Cacheable but not all data is available. " + "Falling back to POST"); } + } else if (batch->payload->send_initial_metadata + .send_initial_metadata_flags & + GRPC_INITIAL_METADATA_IDEMPOTENT_REQUEST) { + method = GRPC_MDELEM_METHOD_PUT; } - remove_if_present(exec_ctx, - op->payload->send_initial_metadata.send_initial_metadata, - GRPC_BATCH_METHOD); - remove_if_present(exec_ctx, - op->payload->send_initial_metadata.send_initial_metadata, - GRPC_BATCH_SCHEME); - remove_if_present(exec_ctx, - op->payload->send_initial_metadata.send_initial_metadata, - GRPC_BATCH_TE); - remove_if_present(exec_ctx, - op->payload->send_initial_metadata.send_initial_metadata, - GRPC_BATCH_CONTENT_TYPE); - remove_if_present(exec_ctx, - op->payload->send_initial_metadata.send_initial_metadata, - GRPC_BATCH_USER_AGENT); + remove_if_present( + exec_ctx, batch->payload->send_initial_metadata.send_initial_metadata, + GRPC_BATCH_METHOD); + remove_if_present( + exec_ctx, batch->payload->send_initial_metadata.send_initial_metadata, + GRPC_BATCH_SCHEME); + remove_if_present( + exec_ctx, batch->payload->send_initial_metadata.send_initial_metadata, + GRPC_BATCH_TE); + remove_if_present( + exec_ctx, batch->payload->send_initial_metadata.send_initial_metadata, + GRPC_BATCH_CONTENT_TYPE); + remove_if_present( + exec_ctx, batch->payload->send_initial_metadata.send_initial_metadata, + GRPC_BATCH_USER_AGENT); /* Send : prefixed headers, which have to be before any application layer headers. */ error = grpc_metadata_batch_add_head( - exec_ctx, op->payload->send_initial_metadata.send_initial_metadata, + exec_ctx, batch->payload->send_initial_metadata.send_initial_metadata, &calld->method, method); - if (error != GRPC_ERROR_NONE) return error; + if (error != GRPC_ERROR_NONE) goto done; error = grpc_metadata_batch_add_head( - exec_ctx, op->payload->send_initial_metadata.send_initial_metadata, + exec_ctx, batch->payload->send_initial_metadata.send_initial_metadata, &calld->scheme, channeld->static_scheme); - if (error != GRPC_ERROR_NONE) return error; + if (error != GRPC_ERROR_NONE) goto done; error = grpc_metadata_batch_add_tail( - exec_ctx, op->payload->send_initial_metadata.send_initial_metadata, + exec_ctx, batch->payload->send_initial_metadata.send_initial_metadata, &calld->te_trailers, GRPC_MDELEM_TE_TRAILERS); - if (error != GRPC_ERROR_NONE) return error; + if (error != GRPC_ERROR_NONE) goto done; error = grpc_metadata_batch_add_tail( - exec_ctx, op->payload->send_initial_metadata.send_initial_metadata, + exec_ctx, batch->payload->send_initial_metadata.send_initial_metadata, &calld->content_type, GRPC_MDELEM_CONTENT_TYPE_APPLICATION_SLASH_GRPC); - if (error != GRPC_ERROR_NONE) return error; + if (error != GRPC_ERROR_NONE) goto done; error = grpc_metadata_batch_add_tail( - exec_ctx, op->payload->send_initial_metadata.send_initial_metadata, + exec_ctx, batch->payload->send_initial_metadata.send_initial_metadata, &calld->user_agent, GRPC_MDELEM_REF(channeld->user_agent)); - if (error != GRPC_ERROR_NONE) return error; + if (error != GRPC_ERROR_NONE) goto done; } - if (op->recv_initial_metadata) { - /* substitute our callback for the higher callback */ - calld->recv_initial_metadata = - op->payload->recv_initial_metadata.recv_initial_metadata; - calld->on_done_recv_initial_metadata = - op->payload->recv_initial_metadata.recv_initial_metadata_ready; - op->payload->recv_initial_metadata.recv_initial_metadata_ready = - &calld->hc_on_recv_initial_metadata; - } - - if (op->recv_trailing_metadata) { - /* substitute our callback for the higher callback */ - calld->recv_trailing_metadata = - op->payload->recv_trailing_metadata.recv_trailing_metadata; - calld->on_done_recv_trailing_metadata = op->on_complete; - op->on_complete = &calld->hc_on_recv_trailing_metadata; - } - - return GRPC_ERROR_NONE; -} - -static void hc_start_transport_op(grpc_exec_ctx *exec_ctx, - grpc_call_element *elem, - grpc_transport_stream_op_batch *op) { - GPR_TIMER_BEGIN("hc_start_transport_op", 0); - GRPC_CALL_LOG_OP(GPR_INFO, elem, op); - grpc_error *error = hc_mutate_op(exec_ctx, elem, op); +done: if (error != GRPC_ERROR_NONE) { - grpc_transport_stream_op_batch_finish_with_failure(exec_ctx, op, error); - } else { - call_data *calld = elem->call_data; - if (op->send_message && calld->send_message_blocked) { - /* Don't forward the op. send_message contains slices that aren't ready - yet. The call will be forwarded by the op_complete of slice read call. - */ - } else { - grpc_call_next_op(exec_ctx, elem, op); - } + grpc_transport_stream_op_batch_finish_with_failure( + exec_ctx, calld->send_message_batch, error); + } else if (!batch_will_be_handled_asynchronously) { + grpc_call_next_op(exec_ctx, elem, batch); } - GPR_TIMER_END("hc_start_transport_op", 0); + GPR_TIMER_END("hc_start_transport_stream_op_batch", 0); } /* Constructor for call_data */ static grpc_error *init_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, const grpc_call_element_args *args) { - call_data *calld = elem->call_data; - calld->on_done_recv_initial_metadata = NULL; - calld->on_done_recv_trailing_metadata = NULL; - calld->on_complete = NULL; - calld->payload_bytes = NULL; - calld->send_message_blocked = false; - grpc_slice_buffer_init(&calld->slices); - GRPC_CLOSURE_INIT(&calld->hc_on_recv_initial_metadata, - hc_on_recv_initial_metadata, elem, - grpc_schedule_on_exec_ctx); - GRPC_CLOSURE_INIT(&calld->hc_on_recv_trailing_metadata, - hc_on_recv_trailing_metadata, elem, + call_data *calld = (call_data *)elem->call_data; + GRPC_CLOSURE_INIT(&calld->recv_initial_metadata_ready, + recv_initial_metadata_ready, elem, grpc_schedule_on_exec_ctx); - GRPC_CLOSURE_INIT(&calld->hc_on_complete, hc_on_complete, elem, - grpc_schedule_on_exec_ctx); - GRPC_CLOSURE_INIT(&calld->got_slice, got_slice, elem, - grpc_schedule_on_exec_ctx); - GRPC_CLOSURE_INIT(&calld->send_done, send_done, elem, + GRPC_CLOSURE_INIT(&calld->recv_trailing_metadata_on_complete, + recv_trailing_metadata_on_complete, elem, grpc_schedule_on_exec_ctx); + GRPC_CLOSURE_INIT(&calld->send_message_on_complete, send_message_on_complete, + elem, grpc_schedule_on_exec_ctx); + GRPC_CLOSURE_INIT(&calld->on_send_message_next_done, + on_send_message_next_done, elem, grpc_schedule_on_exec_ctx); return GRPC_ERROR_NONE; } /* Destructor for call_data */ static void destroy_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, const grpc_call_final_info *final_info, - grpc_closure *ignored) { - call_data *calld = elem->call_data; - grpc_slice_buffer_destroy_internal(exec_ctx, &calld->slices); -} + grpc_closure *ignored) {} static grpc_mdelem scheme_from_args(const grpc_channel_args *args) { unsigned i; @@ -580,7 +556,7 @@ static void destroy_channel_elem(grpc_exec_ctx *exec_ctx, } const grpc_channel_filter grpc_http_client_filter = { - hc_start_transport_op, + hc_start_transport_stream_op_batch, grpc_channel_next_op, sizeof(call_data), init_call_elem, diff --git a/src/core/ext/filters/http/message_compress/message_compress_filter.c b/src/core/ext/filters/http/message_compress/message_compress_filter.c index 71a8bc5bec2..20a3488115e 100644 --- a/src/core/ext/filters/http/message_compress/message_compress_filter.c +++ b/src/core/ext/filters/http/message_compress/message_compress_filter.c @@ -61,14 +61,11 @@ typedef struct call_data { pointer | CANCELLED_BIT - request was cancelled with error pointed to */ gpr_atm send_initial_metadata_state; - grpc_transport_stream_op_batch *send_op; - uint32_t send_length; - uint32_t send_flags; - grpc_slice incoming_slice; + grpc_transport_stream_op_batch *send_message_batch; grpc_slice_buffer_stream replacement_stream; - grpc_closure *post_send; - grpc_closure send_done; - grpc_closure got_slice; + grpc_closure *original_send_message_on_complete; + grpc_closure send_message_on_complete; + grpc_closure on_send_message_next_done; } call_data; typedef struct channel_data { @@ -164,24 +161,25 @@ static grpc_error *process_send_initial_metadata( return error; } -static void continue_send_message(grpc_exec_ctx *exec_ctx, - grpc_call_element *elem); - -static void send_done(grpc_exec_ctx *exec_ctx, void *elemp, grpc_error *error) { - grpc_call_element *elem = elemp; - call_data *calld = elem->call_data; +static void send_message_on_complete(grpc_exec_ctx *exec_ctx, void *arg, + grpc_error *error) { + grpc_call_element *elem = (grpc_call_element *)arg; + call_data *calld = (call_data *)elem->call_data; grpc_slice_buffer_reset_and_unref_internal(exec_ctx, &calld->slices); - calld->post_send->cb(exec_ctx, calld->post_send->cb_arg, error); + GRPC_CLOSURE_RUN(exec_ctx, calld->original_send_message_on_complete, + GRPC_ERROR_REF(error)); } static void finish_send_message(grpc_exec_ctx *exec_ctx, grpc_call_element *elem) { - call_data *calld = elem->call_data; - int did_compress; + call_data *calld = (call_data *)elem->call_data; + // Compress the data if appropriate. grpc_slice_buffer tmp; grpc_slice_buffer_init(&tmp); - did_compress = grpc_msg_compress(exec_ctx, calld->compression_algorithm, - &calld->slices, &tmp); + uint32_t send_flags = + calld->send_message_batch->payload->send_message.send_message->flags; + const bool did_compress = grpc_msg_compress( + exec_ctx, calld->compression_algorithm, &calld->slices, &tmp); if (did_compress) { if (GRPC_TRACER_ON(grpc_compression_trace)) { char *algo_name; @@ -195,7 +193,7 @@ static void finish_send_message(grpc_exec_ctx *exec_ctx, algo_name, before_size, after_size, 100 * savings_ratio); } grpc_slice_buffer_swap(&calld->slices, &tmp); - calld->send_flags |= GRPC_WRITE_INTERNAL_COMPRESS; + send_flags |= GRPC_WRITE_INTERNAL_COMPRESS; } else { if (GRPC_TRACER_ON(grpc_compression_trace)) { char *algo_name; @@ -207,83 +205,118 @@ static void finish_send_message(grpc_exec_ctx *exec_ctx, algo_name, calld->slices.length); } } - grpc_slice_buffer_destroy_internal(exec_ctx, &tmp); - + // Swap out the original byte stream with our new one and send the + // batch down. + grpc_byte_stream_destroy( + exec_ctx, calld->send_message_batch->payload->send_message.send_message); grpc_slice_buffer_stream_init(&calld->replacement_stream, &calld->slices, - calld->send_flags); - calld->send_op->payload->send_message.send_message = + send_flags); + calld->send_message_batch->payload->send_message.send_message = &calld->replacement_stream.base; - calld->post_send = calld->send_op->on_complete; - calld->send_op->on_complete = &calld->send_done; - - grpc_call_next_op(exec_ctx, elem, calld->send_op); + calld->original_send_message_on_complete = + calld->send_message_batch->on_complete; + calld->send_message_batch->on_complete = &calld->send_message_on_complete; + grpc_call_next_op(exec_ctx, elem, calld->send_message_batch); } -static void got_slice(grpc_exec_ctx *exec_ctx, void *elemp, grpc_error *error) { - grpc_call_element *elem = elemp; - call_data *calld = elem->call_data; - if (GRPC_ERROR_NONE != - grpc_byte_stream_pull(exec_ctx, - calld->send_op->payload->send_message.send_message, - &calld->incoming_slice)) { - /* Should never reach here */ - abort(); - } - grpc_slice_buffer_add(&calld->slices, calld->incoming_slice); - if (calld->send_length == calld->slices.length) { - finish_send_message(exec_ctx, elem); - } else { - continue_send_message(exec_ctx, elem); +// Pulls a slice from the send_message byte stream and adds it to calld->slices. +static grpc_error *pull_slice_from_send_message(grpc_exec_ctx *exec_ctx, + call_data *calld) { + grpc_slice incoming_slice; + grpc_error *error = grpc_byte_stream_pull( + exec_ctx, calld->send_message_batch->payload->send_message.send_message, + &incoming_slice); + if (error == GRPC_ERROR_NONE) { + grpc_slice_buffer_add(&calld->slices, incoming_slice); } + return error; } -static void continue_send_message(grpc_exec_ctx *exec_ctx, - grpc_call_element *elem) { - call_data *calld = elem->call_data; +// Reads as many slices as possible from the send_message byte stream. +// If all data has been read, invokes finish_send_message(). Otherwise, +// an async call to grpc_byte_stream_next() has been started, which will +// eventually result in calling on_send_message_next_done(). +static grpc_error *continue_reading_send_message(grpc_exec_ctx *exec_ctx, + grpc_call_element *elem) { + call_data *calld = (call_data *)elem->call_data; while (grpc_byte_stream_next( - exec_ctx, calld->send_op->payload->send_message.send_message, ~(size_t)0, - &calld->got_slice)) { - grpc_byte_stream_pull(exec_ctx, - calld->send_op->payload->send_message.send_message, - &calld->incoming_slice); - grpc_slice_buffer_add(&calld->slices, calld->incoming_slice); - if (calld->send_length == calld->slices.length) { + exec_ctx, calld->send_message_batch->payload->send_message.send_message, + ~(size_t)0, &calld->on_send_message_next_done)) { + grpc_error *error = pull_slice_from_send_message(exec_ctx, calld); + if (error != GRPC_ERROR_NONE) return error; + if (calld->slices.length == + calld->send_message_batch->payload->send_message.send_message->length) { finish_send_message(exec_ctx, elem); break; } } + return GRPC_ERROR_NONE; } -static void handle_send_message_batch(grpc_exec_ctx *exec_ctx, - grpc_call_element *elem, - grpc_transport_stream_op_batch *op, - bool has_compression_algorithm) { - call_data *calld = elem->call_data; - if (!skip_compression(elem, op->payload->send_message.send_message->flags, +// Async callback for grpc_byte_stream_next(). +static void on_send_message_next_done(grpc_exec_ctx *exec_ctx, void *arg, + grpc_error *error) { + grpc_call_element *elem = (grpc_call_element *)arg; + call_data *calld = (call_data *)elem->call_data; + if (error != GRPC_ERROR_NONE) goto fail; + error = pull_slice_from_send_message(exec_ctx, calld); + if (error != GRPC_ERROR_NONE) goto fail; + if (calld->slices.length == + calld->send_message_batch->payload->send_message.send_message->length) { + finish_send_message(exec_ctx, elem); + } else { + // This will either finish reading all of the data and invoke + // finish_send_message(), or else it will make an async call to + // grpc_byte_stream_next(), which will eventually result in calling + // this function again. + error = continue_reading_send_message(exec_ctx, elem); + if (error != GRPC_ERROR_NONE) goto fail; + } + return; +fail: + grpc_transport_stream_op_batch_finish_with_failure( + exec_ctx, calld->send_message_batch, error); +} + +static void start_send_message_batch(grpc_exec_ctx *exec_ctx, + grpc_call_element *elem, + grpc_transport_stream_op_batch *batch, + bool has_compression_algorithm) { + call_data *calld = (call_data *)elem->call_data; + if (!skip_compression(elem, batch->payload->send_message.send_message->flags, has_compression_algorithm)) { - calld->send_op = op; - calld->send_length = op->payload->send_message.send_message->length; - calld->send_flags = op->payload->send_message.send_message->flags; - continue_send_message(exec_ctx, elem); + calld->send_message_batch = batch; + // This will either finish reading all of the data and invoke + // finish_send_message(), or else it will make an async call to + // grpc_byte_stream_next(), which will eventually result in calling + // on_send_message_next_done(). + grpc_error *error = continue_reading_send_message(exec_ctx, elem); + if (error != GRPC_ERROR_NONE) { + grpc_transport_stream_op_batch_finish_with_failure( + exec_ctx, calld->send_message_batch, error); + } } else { /* pass control down the stack */ - grpc_call_next_op(exec_ctx, elem, op); + grpc_call_next_op(exec_ctx, elem, batch); } } static void compress_start_transport_stream_op_batch( grpc_exec_ctx *exec_ctx, grpc_call_element *elem, - grpc_transport_stream_op_batch *op) { + grpc_transport_stream_op_batch *batch) { call_data *calld = elem->call_data; GPR_TIMER_BEGIN("compress_start_transport_stream_op_batch", 0); - if (op->cancel_stream) { - GRPC_ERROR_REF(op->payload->cancel_stream.cancel_error); + if (batch->cancel_stream) { + // TODO(roth): As part of the upcoming call combiner work, change + // this to call grpc_byte_stream_shutdown() on the incoming byte + // stream, to cancel any in-flight calls to grpc_byte_stream_next(). + GRPC_ERROR_REF(batch->payload->cancel_stream.cancel_error); gpr_atm cur = gpr_atm_full_xchg( &calld->send_initial_metadata_state, - CANCELLED_BIT | (gpr_atm)op->payload->cancel_stream.cancel_error); + CANCELLED_BIT | (gpr_atm)batch->payload->cancel_stream.cancel_error); switch (cur) { case HAS_COMPRESSION_ALGORITHM: case NO_COMPRESSION_ALGORITHM: @@ -293,7 +326,7 @@ static void compress_start_transport_stream_op_batch( if ((cur & CANCELLED_BIT) == 0) { grpc_transport_stream_op_batch_finish_with_failure( exec_ctx, (grpc_transport_stream_op_batch *)cur, - GRPC_ERROR_REF(op->payload->cancel_stream.cancel_error)); + GRPC_ERROR_REF(batch->payload->cancel_stream.cancel_error)); } else { GRPC_ERROR_UNREF((grpc_error *)(cur & ~CANCELLED_BIT)); } @@ -301,14 +334,15 @@ static void compress_start_transport_stream_op_batch( } } - if (op->send_initial_metadata) { + if (batch->send_initial_metadata) { bool has_compression_algorithm; grpc_error *error = process_send_initial_metadata( exec_ctx, elem, - op->payload->send_initial_metadata.send_initial_metadata, + batch->payload->send_initial_metadata.send_initial_metadata, &has_compression_algorithm); if (error != GRPC_ERROR_NONE) { - grpc_transport_stream_op_batch_finish_with_failure(exec_ctx, op, error); + grpc_transport_stream_op_batch_finish_with_failure(exec_ctx, batch, + error); return; } gpr_atm cur; @@ -324,32 +358,32 @@ static void compress_start_transport_stream_op_batch( goto retry_send_im; } if (cur != INITIAL_METADATA_UNSEEN) { - handle_send_message_batch(exec_ctx, elem, - (grpc_transport_stream_op_batch *)cur, - has_compression_algorithm); + start_send_message_batch(exec_ctx, elem, + (grpc_transport_stream_op_batch *)cur, + has_compression_algorithm); } } } - if (op->send_message) { + if (batch->send_message) { gpr_atm cur; retry_send: cur = gpr_atm_acq_load(&calld->send_initial_metadata_state); switch (cur) { case INITIAL_METADATA_UNSEEN: if (!gpr_atm_rel_cas(&calld->send_initial_metadata_state, cur, - (gpr_atm)op)) { + (gpr_atm)batch)) { goto retry_send; } break; case HAS_COMPRESSION_ALGORITHM: case NO_COMPRESSION_ALGORITHM: - handle_send_message_batch(exec_ctx, elem, op, - cur == HAS_COMPRESSION_ALGORITHM); + start_send_message_batch(exec_ctx, elem, batch, + cur == HAS_COMPRESSION_ALGORITHM); break; default: if (cur & CANCELLED_BIT) { grpc_transport_stream_op_batch_finish_with_failure( - exec_ctx, op, + exec_ctx, batch, GRPC_ERROR_REF((grpc_error *)(cur & ~CANCELLED_BIT))); } else { /* >1 send_message concurrently */ @@ -358,7 +392,7 @@ static void compress_start_transport_stream_op_batch( } } else { /* pass control down the stack */ - grpc_call_next_op(exec_ctx, elem, op); + grpc_call_next_op(exec_ctx, elem, batch); } GPR_TIMER_END("compress_start_transport_stream_op_batch", 0); @@ -373,10 +407,10 @@ static grpc_error *init_call_elem(grpc_exec_ctx *exec_ctx, /* initialize members */ grpc_slice_buffer_init(&calld->slices); - GRPC_CLOSURE_INIT(&calld->got_slice, got_slice, elem, - grpc_schedule_on_exec_ctx); - GRPC_CLOSURE_INIT(&calld->send_done, send_done, elem, - grpc_schedule_on_exec_ctx); + GRPC_CLOSURE_INIT(&calld->on_send_message_next_done, + on_send_message_next_done, elem, grpc_schedule_on_exec_ctx); + GRPC_CLOSURE_INIT(&calld->send_message_on_complete, send_message_on_complete, + elem, grpc_schedule_on_exec_ctx); return GRPC_ERROR_NONE; } diff --git a/src/core/ext/transport/chttp2/transport/chttp2_transport.c b/src/core/ext/transport/chttp2/transport/chttp2_transport.c index 731ebf400f7..b1a76988110 100644 --- a/src/core/ext/transport/chttp2/transport/chttp2_transport.c +++ b/src/core/ext/transport/chttp2/transport/chttp2_transport.c @@ -1173,6 +1173,7 @@ static void continue_fetching_send_locked(grpc_exec_ctx *exec_ctx, return; /* early out */ } if (s->fetched_send_message_length == s->fetching_send_message->length) { + grpc_byte_stream_destroy(exec_ctx, s->fetching_send_message); int64_t notify_offset = s->next_message_end_offset; if (notify_offset <= s->flow_controlled_bytes_written) { grpc_chttp2_complete_closure_step( @@ -1195,9 +1196,14 @@ static void continue_fetching_send_locked(grpc_exec_ctx *exec_ctx, return; /* early out */ } else if (grpc_byte_stream_next(exec_ctx, s->fetching_send_message, UINT32_MAX, &s->complete_fetch_locked)) { - grpc_byte_stream_pull(exec_ctx, s->fetching_send_message, - &s->fetching_slice); - add_fetched_slice_locked(exec_ctx, t, s); + grpc_error *error = grpc_byte_stream_pull( + exec_ctx, s->fetching_send_message, &s->fetching_slice); + if (error != GRPC_ERROR_NONE) { + grpc_byte_stream_destroy(exec_ctx, s->fetching_send_message); + grpc_chttp2_cancel_stream(exec_ctx, t, s, error); + } else { + add_fetched_slice_locked(exec_ctx, t, s); + } } } } @@ -1214,10 +1220,9 @@ static void complete_fetch_locked(grpc_exec_ctx *exec_ctx, void *gs, continue_fetching_send_locked(exec_ctx, t, s); } } - if (error != GRPC_ERROR_NONE) { - /* TODO(ctiller): what to do here */ - abort(); + grpc_byte_stream_destroy(exec_ctx, s->fetching_send_message); + grpc_chttp2_cancel_stream(exec_ctx, t, s, error); } } @@ -2686,22 +2691,9 @@ static grpc_error *incoming_byte_stream_pull(grpc_exec_ctx *exec_ctx, return GRPC_ERROR_NONE; } -static void incoming_byte_stream_destroy(grpc_exec_ctx *exec_ctx, - grpc_byte_stream *byte_stream); - static void incoming_byte_stream_destroy_locked(grpc_exec_ctx *exec_ctx, void *byte_stream, - grpc_error *error_ignored) { - grpc_chttp2_incoming_byte_stream *bs = byte_stream; - grpc_chttp2_stream *s = bs->stream; - grpc_chttp2_transport *t = s->t; - - GPR_ASSERT(bs->base.destroy == incoming_byte_stream_destroy); - incoming_byte_stream_unref(exec_ctx, bs); - s->pending_byte_stream = false; - grpc_chttp2_maybe_complete_recv_message(exec_ctx, t, s); - grpc_chttp2_maybe_complete_recv_trailing_metadata(exec_ctx, t, s); -} + grpc_error *error_ignored); static void incoming_byte_stream_destroy(grpc_exec_ctx *exec_ctx, grpc_byte_stream *byte_stream) { @@ -2768,6 +2760,33 @@ grpc_error *grpc_chttp2_incoming_byte_stream_finished( return error; } +static void incoming_byte_stream_shutdown(grpc_exec_ctx *exec_ctx, + grpc_byte_stream *byte_stream, + grpc_error *error) { + grpc_chttp2_incoming_byte_stream *bs = + (grpc_chttp2_incoming_byte_stream *)byte_stream; + GRPC_ERROR_UNREF(grpc_chttp2_incoming_byte_stream_finished( + exec_ctx, bs, error, true /* reset_on_error */)); +} + +static const grpc_byte_stream_vtable grpc_chttp2_incoming_byte_stream_vtable = { + incoming_byte_stream_next, incoming_byte_stream_pull, + incoming_byte_stream_shutdown, incoming_byte_stream_destroy}; + +static void incoming_byte_stream_destroy_locked(grpc_exec_ctx *exec_ctx, + void *byte_stream, + grpc_error *error_ignored) { + grpc_chttp2_incoming_byte_stream *bs = byte_stream; + grpc_chttp2_stream *s = bs->stream; + grpc_chttp2_transport *t = s->t; + + GPR_ASSERT(bs->base.vtable == &grpc_chttp2_incoming_byte_stream_vtable); + incoming_byte_stream_unref(exec_ctx, bs); + s->pending_byte_stream = false; + grpc_chttp2_maybe_complete_recv_message(exec_ctx, t, s); + grpc_chttp2_maybe_complete_recv_trailing_metadata(exec_ctx, t, s); +} + grpc_chttp2_incoming_byte_stream *grpc_chttp2_incoming_byte_stream_create( grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, grpc_chttp2_stream *s, uint32_t frame_size, uint32_t flags) { @@ -2776,9 +2795,7 @@ grpc_chttp2_incoming_byte_stream *grpc_chttp2_incoming_byte_stream_create( incoming_byte_stream->base.length = frame_size; incoming_byte_stream->remaining_bytes = frame_size; incoming_byte_stream->base.flags = flags; - incoming_byte_stream->base.next = incoming_byte_stream_next; - incoming_byte_stream->base.pull = incoming_byte_stream_pull; - incoming_byte_stream->base.destroy = incoming_byte_stream_destroy; + incoming_byte_stream->base.vtable = &grpc_chttp2_incoming_byte_stream_vtable; gpr_ref_init(&incoming_byte_stream->refs, 2); incoming_byte_stream->transport = t; incoming_byte_stream->stream = s; diff --git a/src/core/ext/transport/inproc/inproc_transport.c b/src/core/ext/transport/inproc/inproc_transport.c index 14498021ebd..6f4b429ee2f 100644 --- a/src/core/ext/transport/inproc/inproc_transport.c +++ b/src/core/ext/transport/inproc/inproc_transport.c @@ -72,6 +72,7 @@ typedef struct sb_list_entry { typedef struct { grpc_byte_stream base; sb_list_entry *le; + grpc_error *shutdown_error; } inproc_slice_byte_stream; typedef struct { @@ -201,24 +202,39 @@ static grpc_error *inproc_slice_byte_stream_pull(grpc_exec_ctx *exec_ctx, grpc_byte_stream *bs, grpc_slice *slice) { inproc_slice_byte_stream *stream = (inproc_slice_byte_stream *)bs; + if (stream->shutdown_error != GRPC_ERROR_NONE) { + return GRPC_ERROR_REF(stream->shutdown_error); + } *slice = grpc_slice_buffer_take_first(&stream->le->sb); return GRPC_ERROR_NONE; } +static void inproc_slice_byte_stream_shutdown(grpc_exec_ctx *exec_ctx, + grpc_byte_stream *bs, + grpc_error *error) { + inproc_slice_byte_stream *stream = (inproc_slice_byte_stream *)bs; + GRPC_ERROR_UNREF(stream->shutdown_error); + stream->shutdown_error = error; +} + static void inproc_slice_byte_stream_destroy(grpc_exec_ctx *exec_ctx, grpc_byte_stream *bs) { inproc_slice_byte_stream *stream = (inproc_slice_byte_stream *)bs; sb_list_entry_destroy(exec_ctx, stream->le); + GRPC_ERROR_UNREF(stream->shutdown_error); } +static const grpc_byte_stream_vtable inproc_slice_byte_stream_vtable = { + inproc_slice_byte_stream_next, inproc_slice_byte_stream_pull, + inproc_slice_byte_stream_shutdown, inproc_slice_byte_stream_destroy}; + void inproc_slice_byte_stream_init(inproc_slice_byte_stream *s, sb_list_entry *le) { s->base.length = (uint32_t)le->sb.length; s->base.flags = 0; - s->base.next = inproc_slice_byte_stream_next; - s->base.pull = inproc_slice_byte_stream_pull; - s->base.destroy = inproc_slice_byte_stream_destroy; + s->base.vtable = &inproc_slice_byte_stream_vtable; s->le = le; + s->shutdown_error = GRPC_ERROR_NONE; } static void ref_transport(inproc_transport *t) { @@ -956,11 +972,18 @@ static void perform_stream_op(grpc_exec_ctx *exec_ctx, grpc_transport *gt, GPR_ASSERT(grpc_byte_stream_next(exec_ctx, op->payload->send_message.send_message, SIZE_MAX, &unused)); - grpc_byte_stream_pull(exec_ctx, op->payload->send_message.send_message, - &message_slice); + error = grpc_byte_stream_pull( + exec_ctx, op->payload->send_message.send_message, &message_slice); + if (error != GRPC_ERROR_NONE) { + cancel_stream_locked(exec_ctx, s, GRPC_ERROR_REF(error)); + break; + } + GPR_ASSERT(error == GRPC_ERROR_NONE); remaining -= GRPC_SLICE_LENGTH(message_slice); grpc_slice_buffer_add(dest, message_slice); } while (remaining != 0); + grpc_byte_stream_destroy(exec_ctx, + op->payload->send_message.send_message); } if (error == GRPC_ERROR_NONE && op->send_trailing_metadata) { grpc_metadata_batch *dest = (other == NULL) ? &s->write_buffer_trailing_md diff --git a/src/core/lib/transport/byte_stream.c b/src/core/lib/transport/byte_stream.c index 3355814017f..fb03a10315b 100644 --- a/src/core/lib/transport/byte_stream.c +++ b/src/core/lib/transport/byte_stream.c @@ -19,29 +19,37 @@ #include "src/core/lib/transport/byte_stream.h" #include +#include #include #include "src/core/lib/slice/slice_internal.h" -int grpc_byte_stream_next(grpc_exec_ctx *exec_ctx, - grpc_byte_stream *byte_stream, size_t max_size_hint, - grpc_closure *on_complete) { - return byte_stream->next(exec_ctx, byte_stream, max_size_hint, on_complete); +bool grpc_byte_stream_next(grpc_exec_ctx *exec_ctx, + grpc_byte_stream *byte_stream, size_t max_size_hint, + grpc_closure *on_complete) { + return byte_stream->vtable->next(exec_ctx, byte_stream, max_size_hint, + on_complete); } grpc_error *grpc_byte_stream_pull(grpc_exec_ctx *exec_ctx, grpc_byte_stream *byte_stream, grpc_slice *slice) { - return byte_stream->pull(exec_ctx, byte_stream, slice); + return byte_stream->vtable->pull(exec_ctx, byte_stream, slice); +} + +void grpc_byte_stream_shutdown(grpc_exec_ctx *exec_ctx, + grpc_byte_stream *byte_stream, + grpc_error *error) { + byte_stream->vtable->shutdown(exec_ctx, byte_stream, error); } void grpc_byte_stream_destroy(grpc_exec_ctx *exec_ctx, grpc_byte_stream *byte_stream) { - byte_stream->destroy(exec_ctx, byte_stream); + byte_stream->vtable->destroy(exec_ctx, byte_stream); } -/* slice_buffer_stream */ +// grpc_slice_buffer_stream static bool slice_buffer_stream_next(grpc_exec_ctx *exec_ctx, grpc_byte_stream *byte_stream, @@ -56,6 +64,9 @@ static grpc_error *slice_buffer_stream_pull(grpc_exec_ctx *exec_ctx, grpc_byte_stream *byte_stream, grpc_slice *slice) { grpc_slice_buffer_stream *stream = (grpc_slice_buffer_stream *)byte_stream; + if (stream->shutdown_error != GRPC_ERROR_NONE) { + return GRPC_ERROR_REF(stream->shutdown_error); + } GPR_ASSERT(stream->cursor < stream->backing_buffer->count); *slice = grpc_slice_ref_internal(stream->backing_buffer->slices[stream->cursor]); @@ -63,8 +74,23 @@ static grpc_error *slice_buffer_stream_pull(grpc_exec_ctx *exec_ctx, return GRPC_ERROR_NONE; } +static void slice_buffer_stream_shutdown(grpc_exec_ctx *exec_ctx, + grpc_byte_stream *byte_stream, + grpc_error *error) { + grpc_slice_buffer_stream *stream = (grpc_slice_buffer_stream *)byte_stream; + GRPC_ERROR_UNREF(stream->shutdown_error); + stream->shutdown_error = error; +} + static void slice_buffer_stream_destroy(grpc_exec_ctx *exec_ctx, - grpc_byte_stream *byte_stream) {} + grpc_byte_stream *byte_stream) { + grpc_slice_buffer_stream *stream = (grpc_slice_buffer_stream *)byte_stream; + GRPC_ERROR_UNREF(stream->shutdown_error); +} + +static const grpc_byte_stream_vtable slice_buffer_stream_vtable = { + slice_buffer_stream_next, slice_buffer_stream_pull, + slice_buffer_stream_shutdown, slice_buffer_stream_destroy}; void grpc_slice_buffer_stream_init(grpc_slice_buffer_stream *stream, grpc_slice_buffer *slice_buffer, @@ -72,9 +98,89 @@ void grpc_slice_buffer_stream_init(grpc_slice_buffer_stream *stream, GPR_ASSERT(slice_buffer->length <= UINT32_MAX); stream->base.length = (uint32_t)slice_buffer->length; stream->base.flags = flags; - stream->base.next = slice_buffer_stream_next; - stream->base.pull = slice_buffer_stream_pull; - stream->base.destroy = slice_buffer_stream_destroy; + stream->base.vtable = &slice_buffer_stream_vtable; stream->backing_buffer = slice_buffer; stream->cursor = 0; + stream->shutdown_error = GRPC_ERROR_NONE; +} + +// grpc_caching_byte_stream + +void grpc_byte_stream_cache_init(grpc_byte_stream_cache *cache, + grpc_byte_stream *underlying_stream) { + cache->underlying_stream = underlying_stream; + grpc_slice_buffer_init(&cache->cache_buffer); +} + +void grpc_byte_stream_cache_destroy(grpc_exec_ctx *exec_ctx, + grpc_byte_stream_cache *cache) { + grpc_byte_stream_destroy(exec_ctx, cache->underlying_stream); + grpc_slice_buffer_destroy_internal(exec_ctx, &cache->cache_buffer); +} + +static bool caching_byte_stream_next(grpc_exec_ctx *exec_ctx, + grpc_byte_stream *byte_stream, + size_t max_size_hint, + grpc_closure *on_complete) { + grpc_caching_byte_stream *stream = (grpc_caching_byte_stream *)byte_stream; + if (stream->shutdown_error != GRPC_ERROR_NONE) return true; + if (stream->cursor < stream->cache->cache_buffer.count) return true; + return grpc_byte_stream_next(exec_ctx, stream->cache->underlying_stream, + max_size_hint, on_complete); +} + +static grpc_error *caching_byte_stream_pull(grpc_exec_ctx *exec_ctx, + grpc_byte_stream *byte_stream, + grpc_slice *slice) { + grpc_caching_byte_stream *stream = (grpc_caching_byte_stream *)byte_stream; + if (stream->shutdown_error != GRPC_ERROR_NONE) { + return GRPC_ERROR_REF(stream->shutdown_error); + } + if (stream->cursor < stream->cache->cache_buffer.count) { + *slice = grpc_slice_ref_internal( + stream->cache->cache_buffer.slices[stream->cursor]); + ++stream->cursor; + return GRPC_ERROR_NONE; + } + grpc_error *error = + grpc_byte_stream_pull(exec_ctx, stream->cache->underlying_stream, slice); + if (error == GRPC_ERROR_NONE) { + ++stream->cursor; + grpc_slice_buffer_add(&stream->cache->cache_buffer, + grpc_slice_ref_internal(*slice)); + } + return error; +} + +static void caching_byte_stream_shutdown(grpc_exec_ctx *exec_ctx, + grpc_byte_stream *byte_stream, + grpc_error *error) { + grpc_caching_byte_stream *stream = (grpc_caching_byte_stream *)byte_stream; + GRPC_ERROR_UNREF(stream->shutdown_error); + stream->shutdown_error = GRPC_ERROR_REF(error); + grpc_byte_stream_shutdown(exec_ctx, stream->cache->underlying_stream, error); +} + +static void caching_byte_stream_destroy(grpc_exec_ctx *exec_ctx, + grpc_byte_stream *byte_stream) { + grpc_caching_byte_stream *stream = (grpc_caching_byte_stream *)byte_stream; + GRPC_ERROR_UNREF(stream->shutdown_error); +} + +static const grpc_byte_stream_vtable caching_byte_stream_vtable = { + caching_byte_stream_next, caching_byte_stream_pull, + caching_byte_stream_shutdown, caching_byte_stream_destroy}; + +void grpc_caching_byte_stream_init(grpc_caching_byte_stream *stream, + grpc_byte_stream_cache *cache) { + memset(stream, 0, sizeof(*stream)); + stream->base.length = cache->underlying_stream->length; + stream->base.flags = cache->underlying_stream->flags; + stream->base.vtable = &caching_byte_stream_vtable; + stream->cache = cache; + stream->shutdown_error = GRPC_ERROR_NONE; +} + +void grpc_caching_byte_stream_reset(grpc_caching_byte_stream *stream) { + stream->cursor = 0; } diff --git a/src/core/lib/transport/byte_stream.h b/src/core/lib/transport/byte_stream.h index f172296e4b4..1e1e8310b83 100644 --- a/src/core/lib/transport/byte_stream.h +++ b/src/core/lib/transport/byte_stream.h @@ -28,52 +28,109 @@ /** Mask of all valid internal flags. */ #define GRPC_WRITE_INTERNAL_USED_MASK (GRPC_WRITE_INTERNAL_COMPRESS) -struct grpc_byte_stream; typedef struct grpc_byte_stream grpc_byte_stream; -struct grpc_byte_stream { - uint32_t length; - uint32_t flags; +typedef struct { bool (*next)(grpc_exec_ctx *exec_ctx, grpc_byte_stream *byte_stream, size_t max_size_hint, grpc_closure *on_complete); grpc_error *(*pull)(grpc_exec_ctx *exec_ctx, grpc_byte_stream *byte_stream, grpc_slice *slice); + void (*shutdown)(grpc_exec_ctx *exec_ctx, grpc_byte_stream *byte_stream, + grpc_error *error); void (*destroy)(grpc_exec_ctx *exec_ctx, grpc_byte_stream *byte_stream); +} grpc_byte_stream_vtable; + +struct grpc_byte_stream { + uint32_t length; + uint32_t flags; + const grpc_byte_stream_vtable *vtable; }; -/* returns 1 if the bytes are available immediately (in which case - * on_complete will not be called), 0 if the bytes will be available - * asynchronously. - * - * max_size_hint can be set as a hint as to the maximum number - * of bytes that would be acceptable to read. - */ -int grpc_byte_stream_next(grpc_exec_ctx *exec_ctx, - grpc_byte_stream *byte_stream, size_t max_size_hint, - grpc_closure *on_complete); +// Returns true if the bytes are available immediately (in which case +// on_complete will not be called), false if the bytes will be available +// asynchronously. +// +// max_size_hint can be set as a hint as to the maximum number +// of bytes that would be acceptable to read. +bool grpc_byte_stream_next(grpc_exec_ctx *exec_ctx, + grpc_byte_stream *byte_stream, size_t max_size_hint, + grpc_closure *on_complete); -/* returns the next slice in the byte stream when it is ready (indicated by - * either grpc_byte_stream_next returning 1 or on_complete passed to - * grpc_byte_stream_next is called). - * - * once a slice is returned into *slice, it is owned by the caller. - */ +// Returns the next slice in the byte stream when it is ready (indicated by +// either grpc_byte_stream_next returning true or on_complete passed to +// grpc_byte_stream_next is called). +// +// Once a slice is returned into *slice, it is owned by the caller. grpc_error *grpc_byte_stream_pull(grpc_exec_ctx *exec_ctx, grpc_byte_stream *byte_stream, grpc_slice *slice); +// Shuts down the byte stream. +// +// If there is a pending call to on_complete from grpc_byte_stream_next(), +// it will be invoked with the error passed to grpc_byte_stream_shutdown(). +// +// The next call to grpc_byte_stream_pull() (if any) will return the error +// passed to grpc_byte_stream_shutdown(). +void grpc_byte_stream_shutdown(grpc_exec_ctx *exec_ctx, + grpc_byte_stream *byte_stream, + grpc_error *error); + void grpc_byte_stream_destroy(grpc_exec_ctx *exec_ctx, grpc_byte_stream *byte_stream); -/* grpc_byte_stream that wraps a slice buffer */ +// grpc_slice_buffer_stream +// +// A grpc_byte_stream that wraps a slice buffer. + typedef struct grpc_slice_buffer_stream { grpc_byte_stream base; grpc_slice_buffer *backing_buffer; size_t cursor; + grpc_error *shutdown_error; } grpc_slice_buffer_stream; void grpc_slice_buffer_stream_init(grpc_slice_buffer_stream *stream, grpc_slice_buffer *slice_buffer, uint32_t flags); +// grpc_caching_byte_stream +// +// A grpc_byte_stream that that wraps an underlying byte stream but caches +// the resulting slices in a slice buffer. If an initial attempt fails +// without fully draining the underlying stream, a new caching stream +// can be created from the same underlying cache, in which case it will +// return whatever is in the backing buffer before continuing to read the +// underlying stream. +// +// NOTE: No synchronization is done, so it is not safe to have multiple +// grpc_caching_byte_streams simultaneously drawing from the same underlying +// grpc_byte_stream_cache at the same time. + +typedef struct { + grpc_byte_stream *underlying_stream; + grpc_slice_buffer cache_buffer; +} grpc_byte_stream_cache; + +// Takes ownership of underlying_stream. +void grpc_byte_stream_cache_init(grpc_byte_stream_cache *cache, + grpc_byte_stream *underlying_stream); + +// Must not be called while still in use by a grpc_caching_byte_stream. +void grpc_byte_stream_cache_destroy(grpc_exec_ctx *exec_ctx, + grpc_byte_stream_cache *cache); + +typedef struct { + grpc_byte_stream base; + grpc_byte_stream_cache *cache; + size_t cursor; + grpc_error *shutdown_error; +} grpc_caching_byte_stream; + +void grpc_caching_byte_stream_init(grpc_caching_byte_stream *stream, + grpc_byte_stream_cache *cache); + +// Resets the byte stream to the start of the underlying stream. +void grpc_caching_byte_stream_reset(grpc_caching_byte_stream *stream); + #endif /* GRPC_CORE_LIB_TRANSPORT_BYTE_STREAM_H */ diff --git a/src/core/lib/transport/transport.c b/src/core/lib/transport/transport.c index 7281602d66b..6c61f4b8d9d 100644 --- a/src/core/lib/transport/transport.c +++ b/src/core/lib/transport/transport.c @@ -207,27 +207,35 @@ grpc_endpoint *grpc_transport_get_endpoint(grpc_exec_ctx *exec_ctx, return transport->vtable->get_endpoint(exec_ctx, transport); } +// This comment should be sung to the tune of +// "Supercalifragilisticexpialidocious": +// // grpc_transport_stream_op_batch_finish_with_failure // is a function that must always unref cancel_error // though it lives in lib, it handles transport stream ops sure // it's grpc_transport_stream_op_batch_finish_with_failure void grpc_transport_stream_op_batch_finish_with_failure( - grpc_exec_ctx *exec_ctx, grpc_transport_stream_op_batch *op, + grpc_exec_ctx *exec_ctx, grpc_transport_stream_op_batch *batch, grpc_error *error) { - if (op->recv_message) { - GRPC_CLOSURE_SCHED(exec_ctx, op->payload->recv_message.recv_message_ready, + if (batch->send_message) { + grpc_byte_stream_destroy(exec_ctx, + batch->payload->send_message.send_message); + } + if (batch->recv_message) { + GRPC_CLOSURE_SCHED(exec_ctx, + batch->payload->recv_message.recv_message_ready, GRPC_ERROR_REF(error)); } - if (op->recv_initial_metadata) { + if (batch->recv_initial_metadata) { GRPC_CLOSURE_SCHED( exec_ctx, - op->payload->recv_initial_metadata.recv_initial_metadata_ready, + batch->payload->recv_initial_metadata.recv_initial_metadata_ready, GRPC_ERROR_REF(error)); } - GRPC_CLOSURE_SCHED(exec_ctx, op->on_complete, error); - if (op->cancel_stream) { - GRPC_ERROR_UNREF(op->payload->cancel_stream.cancel_error); + GRPC_CLOSURE_SCHED(exec_ctx, batch->on_complete, error); + if (batch->cancel_stream) { + GRPC_ERROR_UNREF(batch->payload->cancel_stream.cancel_error); } } diff --git a/src/core/lib/transport/transport.h b/src/core/lib/transport/transport.h index 84e53e683ac..099138ea146 100644 --- a/src/core/lib/transport/transport.h +++ b/src/core/lib/transport/transport.h @@ -159,6 +159,11 @@ struct grpc_transport_stream_op_batch_payload { } send_trailing_metadata; struct { + // The transport (or a filter that decides to return a failure before + // the op gets down to the transport) is responsible for calling + // grpc_byte_stream_destroy() on this. + // The batch's on_complete will not be called until after the byte + // stream is destroyed. grpc_byte_stream *send_message; } send_message; @@ -174,6 +179,10 @@ struct grpc_transport_stream_op_batch_payload { } recv_initial_metadata; struct { + // Will be set by the transport to point to the byte stream + // containing a received message. + // The caller is responsible for calling grpc_byte_stream_destroy() + // on this byte stream. grpc_byte_stream **recv_message; /** Should be enqueued when one message is ready to be processed. */ grpc_closure *recv_message_ready; diff --git a/test/core/transport/BUILD b/test/core/transport/BUILD index 8091cf9c633..040c0c35c22 100644 --- a/test/core/transport/BUILD +++ b/test/core/transport/BUILD @@ -35,6 +35,18 @@ grpc_cc_test( ], ) +grpc_cc_test( + name = "byte_stream_test", + srcs = ["byte_stream_test.c"], + language = "C", + deps = [ + "//:gpr", + "//:grpc", + "//test/core/util:gpr_test_util", + "//test/core/util:grpc_test_util", + ], +) + grpc_cc_test( name = "connectivity_state_test", srcs = ["connectivity_state_test.c"], diff --git a/test/core/transport/byte_stream_test.c b/test/core/transport/byte_stream_test.c new file mode 100644 index 00000000000..a0c5f961cfd --- /dev/null +++ b/test/core/transport/byte_stream_test.c @@ -0,0 +1,279 @@ +/* + * + * Copyright 2017 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +#include "src/core/lib/transport/byte_stream.h" + +#include +#include +#include + +#include "src/core/lib/slice/slice_internal.h" + +#include "test/core/util/test_config.h" + +// +// grpc_slice_buffer_stream tests +// + +static void not_called_closure(grpc_exec_ctx *exec_ctx, void *arg, + grpc_error *error) { + GPR_ASSERT(false); +} + +static void test_slice_buffer_stream_basic(void) { + gpr_log(GPR_DEBUG, "test_slice_buffer_stream_basic"); + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + // Create and populate slice buffer. + grpc_slice_buffer buffer; + grpc_slice_buffer_init(&buffer); + grpc_slice input[] = { + grpc_slice_from_static_string("foo"), + grpc_slice_from_static_string("bar"), + }; + for (size_t i = 0; i < GPR_ARRAY_SIZE(input); ++i) { + grpc_slice_buffer_add(&buffer, input[i]); + } + // Create byte stream. + grpc_slice_buffer_stream stream; + grpc_slice_buffer_stream_init(&stream, &buffer, 0); + GPR_ASSERT(stream.base.length == 6); + grpc_closure closure; + GRPC_CLOSURE_INIT(&closure, not_called_closure, NULL, + grpc_schedule_on_exec_ctx); + // Read each slice. Note that next() always returns synchronously. + for (size_t i = 0; i < GPR_ARRAY_SIZE(input); ++i) { + GPR_ASSERT( + grpc_byte_stream_next(&exec_ctx, &stream.base, ~(size_t)0, &closure)); + grpc_slice output; + grpc_error *error = grpc_byte_stream_pull(&exec_ctx, &stream.base, &output); + GPR_ASSERT(error == GRPC_ERROR_NONE); + GPR_ASSERT(grpc_slice_eq(input[i], output)); + grpc_slice_unref_internal(&exec_ctx, output); + } + // Clean up. + grpc_byte_stream_destroy(&exec_ctx, &stream.base); + grpc_slice_buffer_destroy_internal(&exec_ctx, &buffer); + grpc_exec_ctx_finish(&exec_ctx); +} + +static void test_slice_buffer_stream_shutdown(void) { + gpr_log(GPR_DEBUG, "test_slice_buffer_stream_shutdown"); + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + // Create and populate slice buffer. + grpc_slice_buffer buffer; + grpc_slice_buffer_init(&buffer); + grpc_slice input[] = { + grpc_slice_from_static_string("foo"), + grpc_slice_from_static_string("bar"), + }; + for (size_t i = 0; i < GPR_ARRAY_SIZE(input); ++i) { + grpc_slice_buffer_add(&buffer, input[i]); + } + // Create byte stream. + grpc_slice_buffer_stream stream; + grpc_slice_buffer_stream_init(&stream, &buffer, 0); + GPR_ASSERT(stream.base.length == 6); + grpc_closure closure; + GRPC_CLOSURE_INIT(&closure, not_called_closure, NULL, + grpc_schedule_on_exec_ctx); + // Read the first slice. + GPR_ASSERT( + grpc_byte_stream_next(&exec_ctx, &stream.base, ~(size_t)0, &closure)); + grpc_slice output; + grpc_error *error = grpc_byte_stream_pull(&exec_ctx, &stream.base, &output); + GPR_ASSERT(error == GRPC_ERROR_NONE); + GPR_ASSERT(grpc_slice_eq(input[0], output)); + grpc_slice_unref_internal(&exec_ctx, output); + // Now shutdown. + grpc_error *shutdown_error = + GRPC_ERROR_CREATE_FROM_STATIC_STRING("shutdown error"); + grpc_byte_stream_shutdown(&exec_ctx, &stream.base, + GRPC_ERROR_REF(shutdown_error)); + // After shutdown, the next pull() should return the error. + GPR_ASSERT( + grpc_byte_stream_next(&exec_ctx, &stream.base, ~(size_t)0, &closure)); + error = grpc_byte_stream_pull(&exec_ctx, &stream.base, &output); + GPR_ASSERT(error == shutdown_error); + GRPC_ERROR_UNREF(error); + GRPC_ERROR_UNREF(shutdown_error); + // Clean up. + grpc_byte_stream_destroy(&exec_ctx, &stream.base); + grpc_slice_buffer_destroy_internal(&exec_ctx, &buffer); + grpc_exec_ctx_finish(&exec_ctx); +} + +// +// grpc_caching_byte_stream tests +// + +static void test_caching_byte_stream_basic(void) { + gpr_log(GPR_DEBUG, "test_caching_byte_stream_basic"); + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + // Create and populate slice buffer byte stream. + grpc_slice_buffer buffer; + grpc_slice_buffer_init(&buffer); + grpc_slice input[] = { + grpc_slice_from_static_string("foo"), + grpc_slice_from_static_string("bar"), + }; + for (size_t i = 0; i < GPR_ARRAY_SIZE(input); ++i) { + grpc_slice_buffer_add(&buffer, input[i]); + } + grpc_slice_buffer_stream underlying_stream; + grpc_slice_buffer_stream_init(&underlying_stream, &buffer, 0); + // Create cache and caching stream. + grpc_byte_stream_cache cache; + grpc_byte_stream_cache_init(&cache, &underlying_stream.base); + grpc_caching_byte_stream stream; + grpc_caching_byte_stream_init(&stream, &cache); + grpc_closure closure; + GRPC_CLOSURE_INIT(&closure, not_called_closure, NULL, + grpc_schedule_on_exec_ctx); + // Read each slice. Note that next() always returns synchronously, + // because the underlying byte stream always does. + for (size_t i = 0; i < GPR_ARRAY_SIZE(input); ++i) { + GPR_ASSERT( + grpc_byte_stream_next(&exec_ctx, &stream.base, ~(size_t)0, &closure)); + grpc_slice output; + grpc_error *error = grpc_byte_stream_pull(&exec_ctx, &stream.base, &output); + GPR_ASSERT(error == GRPC_ERROR_NONE); + GPR_ASSERT(grpc_slice_eq(input[i], output)); + grpc_slice_unref_internal(&exec_ctx, output); + } + // Clean up. + grpc_byte_stream_destroy(&exec_ctx, &stream.base); + grpc_byte_stream_cache_destroy(&exec_ctx, &cache); + grpc_slice_buffer_destroy_internal(&exec_ctx, &buffer); + grpc_exec_ctx_finish(&exec_ctx); +} + +static void test_caching_byte_stream_reset(void) { + gpr_log(GPR_DEBUG, "test_caching_byte_stream_reset"); + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + // Create and populate slice buffer byte stream. + grpc_slice_buffer buffer; + grpc_slice_buffer_init(&buffer); + grpc_slice input[] = { + grpc_slice_from_static_string("foo"), + grpc_slice_from_static_string("bar"), + }; + for (size_t i = 0; i < GPR_ARRAY_SIZE(input); ++i) { + grpc_slice_buffer_add(&buffer, input[i]); + } + grpc_slice_buffer_stream underlying_stream; + grpc_slice_buffer_stream_init(&underlying_stream, &buffer, 0); + // Create cache and caching stream. + grpc_byte_stream_cache cache; + grpc_byte_stream_cache_init(&cache, &underlying_stream.base); + grpc_caching_byte_stream stream; + grpc_caching_byte_stream_init(&stream, &cache); + grpc_closure closure; + GRPC_CLOSURE_INIT(&closure, not_called_closure, NULL, + grpc_schedule_on_exec_ctx); + // Read one slice. + GPR_ASSERT( + grpc_byte_stream_next(&exec_ctx, &stream.base, ~(size_t)0, &closure)); + grpc_slice output; + grpc_error *error = grpc_byte_stream_pull(&exec_ctx, &stream.base, &output); + GPR_ASSERT(error == GRPC_ERROR_NONE); + GPR_ASSERT(grpc_slice_eq(input[0], output)); + grpc_slice_unref_internal(&exec_ctx, output); + // Reset the caching stream. The reads should start over from the + // first slice. + grpc_caching_byte_stream_reset(&stream); + for (size_t i = 0; i < GPR_ARRAY_SIZE(input); ++i) { + GPR_ASSERT( + grpc_byte_stream_next(&exec_ctx, &stream.base, ~(size_t)0, &closure)); + error = grpc_byte_stream_pull(&exec_ctx, &stream.base, &output); + GPR_ASSERT(error == GRPC_ERROR_NONE); + GPR_ASSERT(grpc_slice_eq(input[i], output)); + grpc_slice_unref_internal(&exec_ctx, output); + } + // Clean up. + grpc_byte_stream_destroy(&exec_ctx, &stream.base); + grpc_byte_stream_cache_destroy(&exec_ctx, &cache); + grpc_slice_buffer_destroy_internal(&exec_ctx, &buffer); + grpc_exec_ctx_finish(&exec_ctx); +} + +static void test_caching_byte_stream_shared_cache(void) { + gpr_log(GPR_DEBUG, "test_caching_byte_stream_shared_cache"); + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + // Create and populate slice buffer byte stream. + grpc_slice_buffer buffer; + grpc_slice_buffer_init(&buffer); + grpc_slice input[] = { + grpc_slice_from_static_string("foo"), + grpc_slice_from_static_string("bar"), + }; + for (size_t i = 0; i < GPR_ARRAY_SIZE(input); ++i) { + grpc_slice_buffer_add(&buffer, input[i]); + } + grpc_slice_buffer_stream underlying_stream; + grpc_slice_buffer_stream_init(&underlying_stream, &buffer, 0); + // Create cache and two caching streams. + grpc_byte_stream_cache cache; + grpc_byte_stream_cache_init(&cache, &underlying_stream.base); + grpc_caching_byte_stream stream1; + grpc_caching_byte_stream_init(&stream1, &cache); + grpc_caching_byte_stream stream2; + grpc_caching_byte_stream_init(&stream2, &cache); + grpc_closure closure; + GRPC_CLOSURE_INIT(&closure, not_called_closure, NULL, + grpc_schedule_on_exec_ctx); + // Read one slice from stream1. + GPR_ASSERT( + grpc_byte_stream_next(&exec_ctx, &stream1.base, ~(size_t)0, &closure)); + grpc_slice output; + grpc_error *error = grpc_byte_stream_pull(&exec_ctx, &stream1.base, &output); + GPR_ASSERT(error == GRPC_ERROR_NONE); + GPR_ASSERT(grpc_slice_eq(input[0], output)); + grpc_slice_unref_internal(&exec_ctx, output); + // Read all slices from stream2. + for (size_t i = 0; i < GPR_ARRAY_SIZE(input); ++i) { + GPR_ASSERT( + grpc_byte_stream_next(&exec_ctx, &stream2.base, ~(size_t)0, &closure)); + error = grpc_byte_stream_pull(&exec_ctx, &stream2.base, &output); + GPR_ASSERT(error == GRPC_ERROR_NONE); + GPR_ASSERT(grpc_slice_eq(input[i], output)); + grpc_slice_unref_internal(&exec_ctx, output); + } + // Now read the second slice from stream1. + GPR_ASSERT( + grpc_byte_stream_next(&exec_ctx, &stream1.base, ~(size_t)0, &closure)); + error = grpc_byte_stream_pull(&exec_ctx, &stream1.base, &output); + GPR_ASSERT(error == GRPC_ERROR_NONE); + GPR_ASSERT(grpc_slice_eq(input[1], output)); + grpc_slice_unref_internal(&exec_ctx, output); + // Clean up. + grpc_byte_stream_destroy(&exec_ctx, &stream1.base); + grpc_byte_stream_destroy(&exec_ctx, &stream2.base); + grpc_byte_stream_cache_destroy(&exec_ctx, &cache); + grpc_slice_buffer_destroy_internal(&exec_ctx, &buffer); + grpc_exec_ctx_finish(&exec_ctx); +} + +int main(int argc, char **argv) { + grpc_test_init(argc, argv); + test_slice_buffer_stream_basic(); + test_slice_buffer_stream_shutdown(); + test_caching_byte_stream_basic(); + test_caching_byte_stream_reset(); + test_caching_byte_stream_shared_cache(); + return 0; +} diff --git a/tools/run_tests/generated/sources_and_headers.json b/tools/run_tests/generated/sources_and_headers.json index 24e7ff2b7bc..aa76fc047fb 100644 --- a/tools/run_tests/generated/sources_and_headers.json +++ b/tools/run_tests/generated/sources_and_headers.json @@ -164,6 +164,23 @@ "third_party": false, "type": "target" }, + { + "deps": [ + "gpr", + "gpr_test_util", + "grpc", + "grpc_test_util" + ], + "headers": [], + "is_filegroup": false, + "language": "c", + "name": "byte_stream_test", + "src": [ + "test/core/transport/byte_stream_test.c" + ], + "third_party": false, + "type": "target" + }, { "deps": [ "gpr", diff --git a/tools/run_tests/generated/tests.json b/tools/run_tests/generated/tests.json index ebf30717d4e..83781f941e7 100644 --- a/tools/run_tests/generated/tests.json +++ b/tools/run_tests/generated/tests.json @@ -201,6 +201,28 @@ "windows" ] }, + { + "args": [], + "ci_platforms": [ + "linux", + "mac", + "posix", + "windows" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "gtest": false, + "language": "c", + "name": "byte_stream_test", + "platforms": [ + "linux", + "mac", + "posix", + "windows" + ] + }, { "args": [], "ci_platforms": [ diff --git a/vsprojects/buildtests_c.sln b/vsprojects/buildtests_c.sln index 55de734b427..6f13039cac1 100644 --- a/vsprojects/buildtests_c.sln +++ b/vsprojects/buildtests_c.sln @@ -118,6 +118,17 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "bin_encoder_test", "vcxproj {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} EndProjectSection EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "byte_stream_test", "vcxproj\test\byte_stream_test\byte_stream_test.vcxproj", "{9AEDA345-E3E8-BFE9-11BF-64949EF41C9C}" + ProjectSection(myProperties) = preProject + lib = "False" + EndProjectSection + ProjectSection(ProjectDependencies) = postProject + {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} = {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} + {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} + {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} + {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} + EndProjectSection +EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "census_context_test", "vcxproj\test\census_context_test\census_context_test.vcxproj", "{5C1CFC2D-AF3C-D7CB-BA74-D267E91CBC73}" ProjectSection(myProperties) = preProject lib = "False" @@ -1940,6 +1951,22 @@ Global {D5C70922-D68E-0E9D-9988-995E0F9A79AE}.Release-DLL|Win32.Build.0 = Release|Win32 {D5C70922-D68E-0E9D-9988-995E0F9A79AE}.Release-DLL|x64.ActiveCfg = Release|x64 {D5C70922-D68E-0E9D-9988-995E0F9A79AE}.Release-DLL|x64.Build.0 = Release|x64 + {9AEDA345-E3E8-BFE9-11BF-64949EF41C9C}.Debug|Win32.ActiveCfg = Debug|Win32 + {9AEDA345-E3E8-BFE9-11BF-64949EF41C9C}.Debug|x64.ActiveCfg = Debug|x64 + {9AEDA345-E3E8-BFE9-11BF-64949EF41C9C}.Release|Win32.ActiveCfg = Release|Win32 + {9AEDA345-E3E8-BFE9-11BF-64949EF41C9C}.Release|x64.ActiveCfg = Release|x64 + {9AEDA345-E3E8-BFE9-11BF-64949EF41C9C}.Debug|Win32.Build.0 = Debug|Win32 + {9AEDA345-E3E8-BFE9-11BF-64949EF41C9C}.Debug|x64.Build.0 = Debug|x64 + {9AEDA345-E3E8-BFE9-11BF-64949EF41C9C}.Release|Win32.Build.0 = Release|Win32 + {9AEDA345-E3E8-BFE9-11BF-64949EF41C9C}.Release|x64.Build.0 = Release|x64 + {9AEDA345-E3E8-BFE9-11BF-64949EF41C9C}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 + {9AEDA345-E3E8-BFE9-11BF-64949EF41C9C}.Debug-DLL|Win32.Build.0 = Debug|Win32 + {9AEDA345-E3E8-BFE9-11BF-64949EF41C9C}.Debug-DLL|x64.ActiveCfg = Debug|x64 + {9AEDA345-E3E8-BFE9-11BF-64949EF41C9C}.Debug-DLL|x64.Build.0 = Debug|x64 + {9AEDA345-E3E8-BFE9-11BF-64949EF41C9C}.Release-DLL|Win32.ActiveCfg = Release|Win32 + {9AEDA345-E3E8-BFE9-11BF-64949EF41C9C}.Release-DLL|Win32.Build.0 = Release|Win32 + {9AEDA345-E3E8-BFE9-11BF-64949EF41C9C}.Release-DLL|x64.ActiveCfg = Release|x64 + {9AEDA345-E3E8-BFE9-11BF-64949EF41C9C}.Release-DLL|x64.Build.0 = Release|x64 {5C1CFC2D-AF3C-D7CB-BA74-D267E91CBC73}.Debug|Win32.ActiveCfg = Debug|Win32 {5C1CFC2D-AF3C-D7CB-BA74-D267E91CBC73}.Debug|x64.ActiveCfg = Debug|x64 {5C1CFC2D-AF3C-D7CB-BA74-D267E91CBC73}.Release|Win32.ActiveCfg = Release|Win32 diff --git a/vsprojects/vcxproj/test/byte_stream_test/byte_stream_test.vcxproj b/vsprojects/vcxproj/test/byte_stream_test/byte_stream_test.vcxproj new file mode 100644 index 00000000000..5d656471b1a --- /dev/null +++ b/vsprojects/vcxproj/test/byte_stream_test/byte_stream_test.vcxproj @@ -0,0 +1,199 @@ + + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {9AEDA345-E3E8-BFE9-11BF-64949EF41C9C} + true + $(SolutionDir)IntDir\$(MSBuildProjectName)\ + + + + v100 + + + v110 + + + v120 + + + v140 + + + Application + true + Unicode + + + Application + false + true + Unicode + + + + + + + + + + + + + + byte_stream_test + static + Debug + static + Debug + + + byte_stream_test + static + Release + static + Release + + + + NotUsing + Level3 + Disabled + WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) + true + MultiThreadedDebug + true + None + false + + + Console + true + false + + + + + + NotUsing + Level3 + Disabled + WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) + true + MultiThreadedDebug + true + None + false + + + Console + true + false + + + + + + NotUsing + Level3 + MaxSpeed + WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) + true + true + true + MultiThreaded + true + None + false + + + Console + true + false + true + true + + + + + + NotUsing + Level3 + MaxSpeed + WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) + true + true + true + MultiThreaded + true + None + false + + + Console + true + false + true + true + + + + + + + + + + {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} + + + {29D16885-7228-4C31-81ED-5F9187C7F2A9} + + + {EAB0A629-17A9-44DB-B5FF-E91A721FE037} + + + {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} + + + + + + + + + + + + + + + This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + + + + + + + + + diff --git a/vsprojects/vcxproj/test/byte_stream_test/byte_stream_test.vcxproj.filters b/vsprojects/vcxproj/test/byte_stream_test/byte_stream_test.vcxproj.filters new file mode 100644 index 00000000000..65e35b7429b --- /dev/null +++ b/vsprojects/vcxproj/test/byte_stream_test/byte_stream_test.vcxproj.filters @@ -0,0 +1,21 @@ + + + + + test\core\transport + + + + + + {f172d292-4ad6-342a-f27a-096c06d43a31} + + + {d7f690de-dfe0-56fc-ff3b-38eec3931699} + + + {f78f56ef-47df-c99d-18f0-86277f7013f3} + + + + From 9701a4d4b2bc12ebd887f8291ed6fbbba0cec3c9 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Thu, 27 Jul 2017 12:19:57 +0200 Subject: [PATCH 39/80] kokoro config cleanup --- .../grpc_basictests_c_cpp_dbg.cfg | 30 +++++++++++++++++++ .../grpc_basictests_c_cpp_opt.cfg | 30 +++++++++++++++++++ .../grpc_basictests_multilang.cfg} | 4 +-- tools/internal_ci/windows/grpc_basictests.cfg | 2 +- .../internal_ci/windows/grpc_portability.cfg | 30 +++++++++++++++++++ .../grpc_basictests.cfg} | 0 .../windows/pull_request/grpc_portability.cfg | 30 +++++++++++++++++++ 7 files changed, 123 insertions(+), 3 deletions(-) create mode 100644 tools/internal_ci/linux/pull_request/grpc_basictests_c_cpp_dbg.cfg create mode 100644 tools/internal_ci/linux/pull_request/grpc_basictests_c_cpp_opt.cfg rename tools/internal_ci/{macos/grpc_master.cfg => linux/pull_request/grpc_basictests_multilang.cfg} (86%) create mode 100644 tools/internal_ci/windows/grpc_portability.cfg rename tools/internal_ci/windows/{grpc_master.cfg => pull_request/grpc_basictests.cfg} (100%) create mode 100644 tools/internal_ci/windows/pull_request/grpc_portability.cfg diff --git a/tools/internal_ci/linux/pull_request/grpc_basictests_c_cpp_dbg.cfg b/tools/internal_ci/linux/pull_request/grpc_basictests_c_cpp_dbg.cfg new file mode 100644 index 00000000000..dcc6265b34c --- /dev/null +++ b/tools/internal_ci/linux/pull_request/grpc_basictests_c_cpp_dbg.cfg @@ -0,0 +1,30 @@ +# Copyright 2017 gRPC authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Config file for the internal CI (in protobuf text format) + +# Location of the continuous shell script in repository. +build_file: "grpc/tools/internal_ci/linux/grpc_run_tests_matrix.sh" +timeout_mins: 240 +action { + define_artifacts { + regex: "**/*sponge_log.xml" + regex: "github/grpc/reports/**" + } +} + +env_vars { + key: "RUN_TESTS_FLAGS" + value: "-f basictests linux corelang dbg --inner_jobs 16 -j 1 --internal_ci" +} diff --git a/tools/internal_ci/linux/pull_request/grpc_basictests_c_cpp_opt.cfg b/tools/internal_ci/linux/pull_request/grpc_basictests_c_cpp_opt.cfg new file mode 100644 index 00000000000..f60beaf15c1 --- /dev/null +++ b/tools/internal_ci/linux/pull_request/grpc_basictests_c_cpp_opt.cfg @@ -0,0 +1,30 @@ +# Copyright 2017 gRPC authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Config file for the internal CI (in protobuf text format) + +# Location of the continuous shell script in repository. +build_file: "grpc/tools/internal_ci/linux/grpc_run_tests_matrix.sh" +timeout_mins: 240 +action { + define_artifacts { + regex: "**/*sponge_log.xml" + regex: "github/grpc/reports/**" + } +} + +env_vars { + key: "RUN_TESTS_FLAGS" + value: "-f basictests linux corelang opt --inner_jobs 16 -j 1 --internal_ci" +} diff --git a/tools/internal_ci/macos/grpc_master.cfg b/tools/internal_ci/linux/pull_request/grpc_basictests_multilang.cfg similarity index 86% rename from tools/internal_ci/macos/grpc_master.cfg rename to tools/internal_ci/linux/pull_request/grpc_basictests_multilang.cfg index ce3609c9ec4..7c16cf6a10a 100644 --- a/tools/internal_ci/macos/grpc_master.cfg +++ b/tools/internal_ci/linux/pull_request/grpc_basictests_multilang.cfg @@ -15,7 +15,7 @@ # Config file for the internal CI (in protobuf text format) # Location of the continuous shell script in repository. -build_file: "grpc/tools/internal_ci/macos/grpc_run_tests_matrix.sh" +build_file: "grpc/tools/internal_ci/linux/grpc_run_tests_matrix.sh" timeout_mins: 240 action { define_artifacts { @@ -26,5 +26,5 @@ action { env_vars { key: "RUN_TESTS_FLAGS" - value: "-f basictests macos --internal_ci -j 2 --inner_jobs 4" + value: "-f basictests linux multilang --inner_jobs 16 -j 2 --internal_ci" } diff --git a/tools/internal_ci/windows/grpc_basictests.cfg b/tools/internal_ci/windows/grpc_basictests.cfg index a116738651f..396d29ef093 100644 --- a/tools/internal_ci/windows/grpc_basictests.cfg +++ b/tools/internal_ci/windows/grpc_basictests.cfg @@ -26,5 +26,5 @@ action { env_vars { key: "RUN_TESTS_FLAGS" - value: "-f basictests windows -j 1 --inner_jobs 8 --internal_ci" + value: "-f basictests windows -j 1 --inner_jobs 8 --internal_ci --bq_result_table aggregate_results" } diff --git a/tools/internal_ci/windows/grpc_portability.cfg b/tools/internal_ci/windows/grpc_portability.cfg new file mode 100644 index 00000000000..c395cb4a949 --- /dev/null +++ b/tools/internal_ci/windows/grpc_portability.cfg @@ -0,0 +1,30 @@ +# Copyright 2017 gRPC authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Config file for the internal CI (in protobuf text format) + +# Location of the continuous shell script in repository. +build_file: "grpc/tools/internal_ci/windows/grpc_run_tests_matrix.bat" +timeout_mins: 360 +action { + define_artifacts { + regex: "**/*sponge_log.xml" + regex: "github/grpc/reports/**" + } +} + +env_vars { + key: "RUN_TESTS_FLAGS" + value: "-f portability windows -j 1 --inner_jobs 8 --internal_ci" +} diff --git a/tools/internal_ci/windows/grpc_master.cfg b/tools/internal_ci/windows/pull_request/grpc_basictests.cfg similarity index 100% rename from tools/internal_ci/windows/grpc_master.cfg rename to tools/internal_ci/windows/pull_request/grpc_basictests.cfg diff --git a/tools/internal_ci/windows/pull_request/grpc_portability.cfg b/tools/internal_ci/windows/pull_request/grpc_portability.cfg new file mode 100644 index 00000000000..c395cb4a949 --- /dev/null +++ b/tools/internal_ci/windows/pull_request/grpc_portability.cfg @@ -0,0 +1,30 @@ +# Copyright 2017 gRPC authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Config file for the internal CI (in protobuf text format) + +# Location of the continuous shell script in repository. +build_file: "grpc/tools/internal_ci/windows/grpc_run_tests_matrix.bat" +timeout_mins: 360 +action { + define_artifacts { + regex: "**/*sponge_log.xml" + regex: "github/grpc/reports/**" + } +} + +env_vars { + key: "RUN_TESTS_FLAGS" + value: "-f portability windows -j 1 --inner_jobs 8 --internal_ci" +} From db8063b1330864f187e5a0bb4fda7620c085b9dd Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Thu, 27 Jul 2017 12:59:37 +0200 Subject: [PATCH 40/80] install google-api-python-client to kokoro windows workers --- tools/internal_ci/helper_scripts/prepare_build_windows.bat | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/internal_ci/helper_scripts/prepare_build_windows.bat b/tools/internal_ci/helper_scripts/prepare_build_windows.bat index 1634acd389d..643eb380e87 100644 --- a/tools/internal_ci/helper_scripts/prepare_build_windows.bat +++ b/tools/internal_ci/helper_scripts/prepare_build_windows.bat @@ -18,4 +18,7 @@ set PATH=C:\tools\msys64\usr\bin;C:\Python27;%PATH% bash tools/internal_ci/helper_scripts/gen_report_index.sh +@rem Needed for big_query_utils +python -m pip install google-api-python-client + git submodule update --init From fa60ec70e39402df7d7b57132e99f4ade734067f Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Thu, 27 Jul 2017 17:01:31 +0200 Subject: [PATCH 41/80] Remove "--bq_result_table aggregate_results" from windows basictests. --- tools/internal_ci/windows/grpc_basictests.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/internal_ci/windows/grpc_basictests.cfg b/tools/internal_ci/windows/grpc_basictests.cfg index 396d29ef093..a116738651f 100644 --- a/tools/internal_ci/windows/grpc_basictests.cfg +++ b/tools/internal_ci/windows/grpc_basictests.cfg @@ -26,5 +26,5 @@ action { env_vars { key: "RUN_TESTS_FLAGS" - value: "-f basictests windows -j 1 --inner_jobs 8 --internal_ci --bq_result_table aggregate_results" + value: "-f basictests windows -j 1 --inner_jobs 8 --internal_ci" } From bc6637756c7966106db65a453209c4e34d78c439 Mon Sep 17 00:00:00 2001 From: Yuchen Zeng Date: Mon, 24 Jul 2017 22:23:12 -0700 Subject: [PATCH 42/80] Add src/core/lib/iomgr/nameser.h --- .../resolver/dns/c_ares/grpc_ares_wrapper.c | 1 + src/core/lib/iomgr/nameser.h | 104 ++++++++++++++++++ src/core/lib/iomgr/port.h | 5 + 3 files changed, 110 insertions(+) create mode 100644 src/core/lib/iomgr/nameser.h diff --git a/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.c b/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.c index 473f6b65f6e..749dde8a0be 100644 --- a/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.c +++ b/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.c @@ -38,6 +38,7 @@ #include "src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/iomgr/executor.h" +#include "src/core/lib/iomgr/nameser.h" #include "src/core/lib/iomgr/iomgr_internal.h" #include "src/core/lib/iomgr/sockaddr_utils.h" #include "src/core/lib/support/string.h" diff --git a/src/core/lib/iomgr/nameser.h b/src/core/lib/iomgr/nameser.h new file mode 100644 index 00000000000..8edee50138a --- /dev/null +++ b/src/core/lib/iomgr/nameser.h @@ -0,0 +1,104 @@ +/* + * + * Copyright 2017 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +#ifndef GRPC_CORE_LIB_IOMGR_NAMESER_H +#define GRPC_CORE_LIB_IOMGR_NAMESER_H + +#include "src/core/lib/iomgr/port.h" + +#ifdef GRPC_HAVE_ARPA_NAMESER + +#include + +#else /* GRPC_HAVE_ARPA_NAMESER */ + +typedef enum __ns_class { + ns_c_invalid = 0, /* Cookie. */ + ns_c_in = 1, /* Internet. */ + ns_c_2 = 2, /* unallocated/unsupported. */ + ns_c_chaos = 3, /* MIT Chaos-net. */ + ns_c_hs = 4, /* MIT Hesiod. */ + /* Query class values which do not appear in resource records */ + ns_c_none = 254, /* for prereq. sections in update requests */ + ns_c_any = 255, /* Wildcard match. */ + ns_c_max = 65536 +} ns_class; + +typedef enum __ns_type { + ns_t_invalid = 0, /* Cookie. */ + ns_t_a = 1, /* Host address. */ + ns_t_ns = 2, /* Authoritative server. */ + ns_t_md = 3, /* Mail destination. */ + ns_t_mf = 4, /* Mail forwarder. */ + ns_t_cname = 5, /* Canonical name. */ + ns_t_soa = 6, /* Start of authority zone. */ + ns_t_mb = 7, /* Mailbox domain name. */ + ns_t_mg = 8, /* Mail group member. */ + ns_t_mr = 9, /* Mail rename name. */ + ns_t_null = 10, /* Null resource record. */ + ns_t_wks = 11, /* Well known service. */ + ns_t_ptr = 12, /* Domain name pointer. */ + ns_t_hinfo = 13, /* Host information. */ + ns_t_minfo = 14, /* Mailbox information. */ + ns_t_mx = 15, /* Mail routing information. */ + ns_t_txt = 16, /* Text strings. */ + ns_t_rp = 17, /* Responsible person. */ + ns_t_afsdb = 18, /* AFS cell database. */ + ns_t_x25 = 19, /* X_25 calling address. */ + ns_t_isdn = 20, /* ISDN calling address. */ + ns_t_rt = 21, /* Router. */ + ns_t_nsap = 22, /* NSAP address. */ + ns_t_nsap_ptr = 23, /* Reverse NSAP lookup (deprecated). */ + ns_t_sig = 24, /* Security signature. */ + ns_t_key = 25, /* Security key. */ + ns_t_px = 26, /* X.400 mail mapping. */ + ns_t_gpos = 27, /* Geographical position (withdrawn). */ + ns_t_aaaa = 28, /* Ip6 Address. */ + ns_t_loc = 29, /* Location Information. */ + ns_t_nxt = 30, /* Next domain (security). */ + ns_t_eid = 31, /* Endpoint identifier. */ + ns_t_nimloc = 32, /* Nimrod Locator. */ + ns_t_srv = 33, /* Server Selection. */ + ns_t_atma = 34, /* ATM Address */ + ns_t_naptr = 35, /* Naming Authority PoinTeR */ + ns_t_kx = 36, /* Key Exchange */ + ns_t_cert = 37, /* Certification record */ + ns_t_a6 = 38, /* IPv6 address (deprecates AAAA) */ + ns_t_dname = 39, /* Non-terminal DNAME (for IPv6) */ + ns_t_sink = 40, /* Kitchen sink (experimentatl) */ + ns_t_opt = 41, /* EDNS0 option (meta-RR) */ + ns_t_apl = 42, /* Address prefix list (RFC3123) */ + ns_t_ds = 43, /* Delegation Signer (RFC4034) */ + ns_t_sshfp = 44, /* SSH Key Fingerprint (RFC4255) */ + ns_t_rrsig = 46, /* Resource Record Signature (RFC4034) */ + ns_t_nsec = 47, /* Next Secure (RFC4034) */ + ns_t_dnskey = 48, /* DNS Public Key (RFC4034) */ + ns_t_tkey = 249, /* Transaction key */ + ns_t_tsig = 250, /* Transaction signature. */ + ns_t_ixfr = 251, /* Incremental zone transfer. */ + ns_t_axfr = 252, /* Transfer zone of authority. */ + ns_t_mailb = 253, /* Transfer mailbox records. */ + ns_t_maila = 254, /* Transfer mail agent records. */ + ns_t_any = 255, /* Wildcard match. */ + ns_t_zxfr = 256, /* BIND-specific, nonstandard. */ + ns_t_max = 65536 +} ns_type; + +#endif /* GRPC_HAVE_ARPA_NAMESER */ + +#endif /* GRPC_CORE_LIB_IOMGR_NAMESER_H */ diff --git a/src/core/lib/iomgr/port.h b/src/core/lib/iomgr/port.h index f5d15b48506..c12058f890b 100644 --- a/src/core/lib/iomgr/port.h +++ b/src/core/lib/iomgr/port.h @@ -24,6 +24,7 @@ #if defined(GRPC_UV) // Do nothing #elif defined(GPR_MANYLINUX1) +#define GRPC_HAVE_ARPA_NAMESER 1 #define GRPC_HAVE_IFADDRS 1 #define GRPC_HAVE_IPV6_RECVPKTINFO 1 #define GRPC_HAVE_IP_PKTINFO 1 @@ -51,6 +52,7 @@ #define GRPC_POSIX_WAKEUP_FD 1 #define GRPC_TIMER_USE_GENERIC 1 #elif defined(GPR_LINUX) +#define GRPC_HAVE_ARPA_NAMESER 1 #define GRPC_HAVE_IFADDRS 1 #define GRPC_HAVE_IPV6_RECVPKTINFO 1 #define GRPC_HAVE_IP_PKTINFO 1 @@ -82,6 +84,7 @@ #define GRPC_POSIX_SOCKETUTILS #endif #elif defined(GPR_APPLE) +#define GRPC_HAVE_ARPA_NAMESER 1 #define GRPC_HAVE_IFADDRS 1 #define GRPC_HAVE_SO_NOSIGPIPE 1 #define GRPC_HAVE_UNIX_SOCKET 1 @@ -93,6 +96,7 @@ #define GRPC_POSIX_WAKEUP_FD 1 #define GRPC_TIMER_USE_GENERIC 1 #elif defined(GPR_FREEBSD) +#define GRPC_HAVE_ARPA_NAMESER 1 #define GRPC_HAVE_IFADDRS 1 #define GRPC_HAVE_IPV6_RECVPKTINFO 1 #define GRPC_HAVE_SO_NOSIGPIPE 1 @@ -104,6 +108,7 @@ #define GRPC_POSIX_WAKEUP_FD 1 #define GRPC_TIMER_USE_GENERIC 1 #elif defined(GPR_NACL) +#define GRPC_HAVE_ARPA_NAMESER 1 #define GRPC_POSIX_NO_SPECIAL_WAKEUP_FD 1 #define GRPC_POSIX_SOCKET 1 #define GRPC_POSIX_SOCKETADDR 1 From f630ff255555b5f3e752e24fa9e4494b223a2a4b Mon Sep 17 00:00:00 2001 From: Yuchen Zeng Date: Tue, 25 Jul 2017 13:28:45 -0700 Subject: [PATCH 43/80] Update build.yaml, fix format --- build.yaml | 1 + gRPC-Core.podspec | 2 + grpc.gemspec | 1 + package.xml | 1 + .../resolver/dns/c_ares/grpc_ares_wrapper.c | 5 +- src/core/lib/iomgr/nameser.h | 132 +++++++++--------- tools/doxygen/Doxyfile.core.internal | 1 + .../generated/sources_and_headers.json | 2 + vsprojects/vcxproj/grpc/grpc.vcxproj | 1 + vsprojects/vcxproj/grpc/grpc.vcxproj.filters | 3 + .../grpc_test_util/grpc_test_util.vcxproj | 1 + .../grpc_test_util.vcxproj.filters | 3 + .../grpc_unsecure/grpc_unsecure.vcxproj | 1 + .../grpc_unsecure.vcxproj.filters | 3 + 14 files changed, 87 insertions(+), 70 deletions(-) diff --git a/build.yaml b/build.yaml index 198467bf5ad..a84ef6b88f1 100644 --- a/build.yaml +++ b/build.yaml @@ -218,6 +218,7 @@ filegroups: - src/core/lib/iomgr/is_epollexclusive_available.h - src/core/lib/iomgr/load_file.h - src/core/lib/iomgr/lockfree_event.h + - src/core/lib/iomgr/nameser.h - src/core/lib/iomgr/network_status_tracker.h - src/core/lib/iomgr/polling_entity.h - src/core/lib/iomgr/pollset.h diff --git a/gRPC-Core.podspec b/gRPC-Core.podspec index 90580c5fad8..669524859f2 100644 --- a/gRPC-Core.podspec +++ b/gRPC-Core.podspec @@ -281,6 +281,7 @@ Pod::Spec.new do |s| 'src/core/lib/iomgr/is_epollexclusive_available.h', 'src/core/lib/iomgr/load_file.h', 'src/core/lib/iomgr/lockfree_event.h', + 'src/core/lib/iomgr/nameser.h', 'src/core/lib/iomgr/network_status_tracker.h', 'src/core/lib/iomgr/polling_entity.h', 'src/core/lib/iomgr/pollset.h', @@ -766,6 +767,7 @@ Pod::Spec.new do |s| 'src/core/lib/iomgr/is_epollexclusive_available.h', 'src/core/lib/iomgr/load_file.h', 'src/core/lib/iomgr/lockfree_event.h', + 'src/core/lib/iomgr/nameser.h', 'src/core/lib/iomgr/network_status_tracker.h', 'src/core/lib/iomgr/polling_entity.h', 'src/core/lib/iomgr/pollset.h', diff --git a/grpc.gemspec b/grpc.gemspec index a166839888c..fee406892cd 100755 --- a/grpc.gemspec +++ b/grpc.gemspec @@ -213,6 +213,7 @@ Gem::Specification.new do |s| s.files += %w( src/core/lib/iomgr/is_epollexclusive_available.h ) s.files += %w( src/core/lib/iomgr/load_file.h ) s.files += %w( src/core/lib/iomgr/lockfree_event.h ) + s.files += %w( src/core/lib/iomgr/nameser.h ) s.files += %w( src/core/lib/iomgr/network_status_tracker.h ) s.files += %w( src/core/lib/iomgr/polling_entity.h ) s.files += %w( src/core/lib/iomgr/pollset.h ) diff --git a/package.xml b/package.xml index b31514b99ff..04ab3d2e325 100644 --- a/package.xml +++ b/package.xml @@ -227,6 +227,7 @@ + diff --git a/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.c b/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.c index 749dde8a0be..6ec3790a5fe 100644 --- a/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.c +++ b/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.c @@ -38,8 +38,8 @@ #include "src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/iomgr/executor.h" -#include "src/core/lib/iomgr/nameser.h" #include "src/core/lib/iomgr/iomgr_internal.h" +#include "src/core/lib/iomgr/nameser.h" #include "src/core/lib/iomgr/sockaddr_utils.h" #include "src/core/lib/support/string.h" @@ -358,9 +358,6 @@ static grpc_ares_request *grpc_dns_lookup_ares_impl( grpc_ares_request_ref(r); char *service_name; gpr_asprintf(&service_name, "_grpclb._tcp.%s", host); - // see: RFC 1035, section 3.2.4. CLASS values - const int ns_c_in = 1; // internet - const int ns_t_srv = 33; // SRV record (RFC 2782) ares_query(*channel, service_name, ns_c_in, ns_t_srv, on_srv_query_done_cb, r); gpr_free(service_name); diff --git a/src/core/lib/iomgr/nameser.h b/src/core/lib/iomgr/nameser.h index 8edee50138a..daed6de518c 100644 --- a/src/core/lib/iomgr/nameser.h +++ b/src/core/lib/iomgr/nameser.h @@ -28,75 +28,75 @@ #else /* GRPC_HAVE_ARPA_NAMESER */ typedef enum __ns_class { - ns_c_invalid = 0, /* Cookie. */ - ns_c_in = 1, /* Internet. */ - ns_c_2 = 2, /* unallocated/unsupported. */ - ns_c_chaos = 3, /* MIT Chaos-net. */ - ns_c_hs = 4, /* MIT Hesiod. */ - /* Query class values which do not appear in resource records */ - ns_c_none = 254, /* for prereq. sections in update requests */ - ns_c_any = 255, /* Wildcard match. */ - ns_c_max = 65536 + ns_c_invalid = 0, /* Cookie. */ + ns_c_in = 1, /* Internet. */ + ns_c_2 = 2, /* unallocated/unsupported. */ + ns_c_chaos = 3, /* MIT Chaos-net. */ + ns_c_hs = 4, /* MIT Hesiod. */ + /* Query class values which do not appear in resource records */ + ns_c_none = 254, /* for prereq. sections in update requests */ + ns_c_any = 255, /* Wildcard match. */ + ns_c_max = 65536 } ns_class; typedef enum __ns_type { - ns_t_invalid = 0, /* Cookie. */ - ns_t_a = 1, /* Host address. */ - ns_t_ns = 2, /* Authoritative server. */ - ns_t_md = 3, /* Mail destination. */ - ns_t_mf = 4, /* Mail forwarder. */ - ns_t_cname = 5, /* Canonical name. */ - ns_t_soa = 6, /* Start of authority zone. */ - ns_t_mb = 7, /* Mailbox domain name. */ - ns_t_mg = 8, /* Mail group member. */ - ns_t_mr = 9, /* Mail rename name. */ - ns_t_null = 10, /* Null resource record. */ - ns_t_wks = 11, /* Well known service. */ - ns_t_ptr = 12, /* Domain name pointer. */ - ns_t_hinfo = 13, /* Host information. */ - ns_t_minfo = 14, /* Mailbox information. */ - ns_t_mx = 15, /* Mail routing information. */ - ns_t_txt = 16, /* Text strings. */ - ns_t_rp = 17, /* Responsible person. */ - ns_t_afsdb = 18, /* AFS cell database. */ - ns_t_x25 = 19, /* X_25 calling address. */ - ns_t_isdn = 20, /* ISDN calling address. */ - ns_t_rt = 21, /* Router. */ - ns_t_nsap = 22, /* NSAP address. */ - ns_t_nsap_ptr = 23, /* Reverse NSAP lookup (deprecated). */ - ns_t_sig = 24, /* Security signature. */ - ns_t_key = 25, /* Security key. */ - ns_t_px = 26, /* X.400 mail mapping. */ - ns_t_gpos = 27, /* Geographical position (withdrawn). */ - ns_t_aaaa = 28, /* Ip6 Address. */ - ns_t_loc = 29, /* Location Information. */ - ns_t_nxt = 30, /* Next domain (security). */ - ns_t_eid = 31, /* Endpoint identifier. */ - ns_t_nimloc = 32, /* Nimrod Locator. */ - ns_t_srv = 33, /* Server Selection. */ - ns_t_atma = 34, /* ATM Address */ - ns_t_naptr = 35, /* Naming Authority PoinTeR */ - ns_t_kx = 36, /* Key Exchange */ - ns_t_cert = 37, /* Certification record */ - ns_t_a6 = 38, /* IPv6 address (deprecates AAAA) */ - ns_t_dname = 39, /* Non-terminal DNAME (for IPv6) */ - ns_t_sink = 40, /* Kitchen sink (experimentatl) */ - ns_t_opt = 41, /* EDNS0 option (meta-RR) */ - ns_t_apl = 42, /* Address prefix list (RFC3123) */ - ns_t_ds = 43, /* Delegation Signer (RFC4034) */ - ns_t_sshfp = 44, /* SSH Key Fingerprint (RFC4255) */ - ns_t_rrsig = 46, /* Resource Record Signature (RFC4034) */ - ns_t_nsec = 47, /* Next Secure (RFC4034) */ - ns_t_dnskey = 48, /* DNS Public Key (RFC4034) */ - ns_t_tkey = 249, /* Transaction key */ - ns_t_tsig = 250, /* Transaction signature. */ - ns_t_ixfr = 251, /* Incremental zone transfer. */ - ns_t_axfr = 252, /* Transfer zone of authority. */ - ns_t_mailb = 253, /* Transfer mailbox records. */ - ns_t_maila = 254, /* Transfer mail agent records. */ - ns_t_any = 255, /* Wildcard match. */ - ns_t_zxfr = 256, /* BIND-specific, nonstandard. */ - ns_t_max = 65536 + ns_t_invalid = 0, /* Cookie. */ + ns_t_a = 1, /* Host address. */ + ns_t_ns = 2, /* Authoritative server. */ + ns_t_md = 3, /* Mail destination. */ + ns_t_mf = 4, /* Mail forwarder. */ + ns_t_cname = 5, /* Canonical name. */ + ns_t_soa = 6, /* Start of authority zone. */ + ns_t_mb = 7, /* Mailbox domain name. */ + ns_t_mg = 8, /* Mail group member. */ + ns_t_mr = 9, /* Mail rename name. */ + ns_t_null = 10, /* Null resource record. */ + ns_t_wks = 11, /* Well known service. */ + ns_t_ptr = 12, /* Domain name pointer. */ + ns_t_hinfo = 13, /* Host information. */ + ns_t_minfo = 14, /* Mailbox information. */ + ns_t_mx = 15, /* Mail routing information. */ + ns_t_txt = 16, /* Text strings. */ + ns_t_rp = 17, /* Responsible person. */ + ns_t_afsdb = 18, /* AFS cell database. */ + ns_t_x25 = 19, /* X_25 calling address. */ + ns_t_isdn = 20, /* ISDN calling address. */ + ns_t_rt = 21, /* Router. */ + ns_t_nsap = 22, /* NSAP address. */ + ns_t_nsap_ptr = 23, /* Reverse NSAP lookup (deprecated). */ + ns_t_sig = 24, /* Security signature. */ + ns_t_key = 25, /* Security key. */ + ns_t_px = 26, /* X.400 mail mapping. */ + ns_t_gpos = 27, /* Geographical position (withdrawn). */ + ns_t_aaaa = 28, /* Ip6 Address. */ + ns_t_loc = 29, /* Location Information. */ + ns_t_nxt = 30, /* Next domain (security). */ + ns_t_eid = 31, /* Endpoint identifier. */ + ns_t_nimloc = 32, /* Nimrod Locator. */ + ns_t_srv = 33, /* Server Selection. */ + ns_t_atma = 34, /* ATM Address */ + ns_t_naptr = 35, /* Naming Authority PoinTeR */ + ns_t_kx = 36, /* Key Exchange */ + ns_t_cert = 37, /* Certification record */ + ns_t_a6 = 38, /* IPv6 address (deprecates AAAA) */ + ns_t_dname = 39, /* Non-terminal DNAME (for IPv6) */ + ns_t_sink = 40, /* Kitchen sink (experimentatl) */ + ns_t_opt = 41, /* EDNS0 option (meta-RR) */ + ns_t_apl = 42, /* Address prefix list (RFC3123) */ + ns_t_ds = 43, /* Delegation Signer (RFC4034) */ + ns_t_sshfp = 44, /* SSH Key Fingerprint (RFC4255) */ + ns_t_rrsig = 46, /* Resource Record Signature (RFC4034) */ + ns_t_nsec = 47, /* Next Secure (RFC4034) */ + ns_t_dnskey = 48, /* DNS Public Key (RFC4034) */ + ns_t_tkey = 249, /* Transaction key */ + ns_t_tsig = 250, /* Transaction signature. */ + ns_t_ixfr = 251, /* Incremental zone transfer. */ + ns_t_axfr = 252, /* Transfer zone of authority. */ + ns_t_mailb = 253, /* Transfer mailbox records. */ + ns_t_maila = 254, /* Transfer mail agent records. */ + ns_t_any = 255, /* Wildcard match. */ + ns_t_zxfr = 256, /* BIND-specific, nonstandard. */ + ns_t_max = 65536 } ns_type; #endif /* GRPC_HAVE_ARPA_NAMESER */ diff --git a/tools/doxygen/Doxyfile.core.internal b/tools/doxygen/Doxyfile.core.internal index b747da3a676..6e7f92717d6 100644 --- a/tools/doxygen/Doxyfile.core.internal +++ b/tools/doxygen/Doxyfile.core.internal @@ -1131,6 +1131,7 @@ src/core/lib/iomgr/load_file.c \ src/core/lib/iomgr/load_file.h \ src/core/lib/iomgr/lockfree_event.c \ src/core/lib/iomgr/lockfree_event.h \ +src/core/lib/iomgr/nameser.h \ src/core/lib/iomgr/network_status_tracker.c \ src/core/lib/iomgr/network_status_tracker.h \ src/core/lib/iomgr/polling_entity.c \ diff --git a/tools/run_tests/generated/sources_and_headers.json b/tools/run_tests/generated/sources_and_headers.json index 24e7ff2b7bc..dcd7c7d1f3d 100644 --- a/tools/run_tests/generated/sources_and_headers.json +++ b/tools/run_tests/generated/sources_and_headers.json @@ -7744,6 +7744,7 @@ "src/core/lib/iomgr/is_epollexclusive_available.h", "src/core/lib/iomgr/load_file.h", "src/core/lib/iomgr/lockfree_event.h", + "src/core/lib/iomgr/nameser.h", "src/core/lib/iomgr/network_status_tracker.h", "src/core/lib/iomgr/polling_entity.h", "src/core/lib/iomgr/pollset.h", @@ -7909,6 +7910,7 @@ "src/core/lib/iomgr/load_file.h", "src/core/lib/iomgr/lockfree_event.c", "src/core/lib/iomgr/lockfree_event.h", + "src/core/lib/iomgr/nameser.h", "src/core/lib/iomgr/network_status_tracker.c", "src/core/lib/iomgr/network_status_tracker.h", "src/core/lib/iomgr/polling_entity.c", diff --git a/vsprojects/vcxproj/grpc/grpc.vcxproj b/vsprojects/vcxproj/grpc/grpc.vcxproj index 57c0ac7bc4e..ff2e26e0af0 100644 --- a/vsprojects/vcxproj/grpc/grpc.vcxproj +++ b/vsprojects/vcxproj/grpc/grpc.vcxproj @@ -338,6 +338,7 @@ + diff --git a/vsprojects/vcxproj/grpc/grpc.vcxproj.filters b/vsprojects/vcxproj/grpc/grpc.vcxproj.filters index e9bb52defa6..70824a51b89 100644 --- a/vsprojects/vcxproj/grpc/grpc.vcxproj.filters +++ b/vsprojects/vcxproj/grpc/grpc.vcxproj.filters @@ -971,6 +971,9 @@ src\core\lib\iomgr + + src\core\lib\iomgr + src\core\lib\iomgr diff --git a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj index 64bf54e557d..13d56d58a8e 100644 --- a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj +++ b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj @@ -233,6 +233,7 @@ + diff --git a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters index 35fd87a4c58..fb7197fa952 100644 --- a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters +++ b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters @@ -695,6 +695,9 @@ src\core\lib\iomgr + + src\core\lib\iomgr + src\core\lib\iomgr diff --git a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj index 4ed59780a44..b9e0c896e1a 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 2c3319beae8..ed3384d5d20 100644 --- a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters +++ b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters @@ -878,6 +878,9 @@ src\core\lib\iomgr + + src\core\lib\iomgr + src\core\lib\iomgr From e7751807e29f7cddcdf510530ef029c04a305790 Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Thu, 27 Jul 2017 12:31:45 -0700 Subject: [PATCH 44/80] Use new protocol for reporting dropped calls to grpclb balancer. --- .../grpclb/client_load_reporting_filter.c | 1 - .../client_channel/lb_policy/grpclb/grpclb.c | 26 ++---- .../lb_policy/grpclb/grpclb_client_stats.c | 79 +++++++++++----- .../lb_policy/grpclb/grpclb_client_stats.h | 27 ++++-- .../lb_policy/grpclb/load_balancer_api.c | 44 +++++++-- .../lb_policy/grpclb/load_balancer_api.h | 2 +- .../proto/grpc/lb/v1/load_balancer.pb.c | 22 +++-- .../proto/grpc/lb/v1/load_balancer.pb.h | 48 +++++----- src/proto/grpc/lb/v1/load_balancer.proto | 42 +++++---- test/cpp/end2end/grpclb_end2end_test.cc | 92 +++++++++---------- test/cpp/grpclb/grpclb_api_test.cc | 16 ++-- 11 files changed, 241 insertions(+), 158 deletions(-) diff --git a/src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.c b/src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.c index 52c6e38c871..568bb2ba8d7 100644 --- a/src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.c +++ b/src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.c @@ -88,7 +88,6 @@ static void destroy_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, // Record call finished, optionally setting client_failed_to_send and // received. grpc_grpclb_client_stats_add_call_finished( - false /* drop_for_rate_limiting */, false /* drop_for_load_balancing */, !calld->send_initial_metadata_succeeded /* client_failed_to_send */, calld->recv_initial_metadata_succeeded /* known_received */, calld->client_stats); diff --git a/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.c b/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.c index ebce801b37c..f248a873ba9 100644 --- a/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.c +++ b/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.c @@ -416,9 +416,7 @@ struct rr_connectivity_data { static bool is_server_valid(const grpc_grpclb_server *server, size_t idx, bool log) { - if (server->drop_for_rate_limiting || server->drop_for_load_balancing) { - return false; - } + if (server->drop) return false; const grpc_grpclb_ip_address *ip = &server->ip_address; if (server->port >> 16 != 0) { if (log) { @@ -462,7 +460,7 @@ static const grpc_lb_user_data_vtable lb_token_vtable = { static void parse_server(const grpc_grpclb_server *server, grpc_resolved_address *addr) { memset(addr, 0, sizeof(*addr)); - if (server->drop_for_rate_limiting || server->drop_for_load_balancing) return; + if (server->drop) return; const uint16_t netorder_port = htons((uint16_t)server->port); /* the addresses are given in binary format (a in(6)_addr struct) in * server->ip_address.bytes. */ @@ -610,7 +608,7 @@ static bool pick_from_internal_rr_locked( if (glb_policy->serverlist_index == glb_policy->serverlist->num_servers) { glb_policy->serverlist_index = 0; // Wrap-around. } - if (server->drop_for_rate_limiting || server->drop_for_load_balancing) { + if (server->drop) { // Not using the RR policy, so unref it. if (GRPC_TRACER_ON(grpc_lb_glb_trace)) { gpr_log(GPR_INFO, "Unreffing RR for drop (0x%" PRIxPTR ")", @@ -622,11 +620,8 @@ static bool pick_from_internal_rr_locked( // the client_load_reporting filter, because we do not create a // subchannel call (and therefore no client_load_reporting filter) // for dropped calls. - grpc_grpclb_client_stats_add_call_started(wc_arg->client_stats); - grpc_grpclb_client_stats_add_call_finished( - server->drop_for_rate_limiting, server->drop_for_load_balancing, - false /* failed_to_send */, false /* known_received */, - wc_arg->client_stats); + grpc_grpclb_client_stats_add_call_dropped_locked(server->load_balance_token, + wc_arg->client_stats); grpc_grpclb_client_stats_unref(wc_arg->client_stats); if (force_async) { GPR_ASSERT(wc_arg->wrapped_closure != NULL); @@ -1309,15 +1304,14 @@ static void do_send_client_load_report_locked(grpc_exec_ctx *exec_ctx, } static bool load_report_counters_are_zero(grpc_grpclb_request *request) { + grpc_grpclb_dropped_call_counts *drop_entries = + request->client_stats.calls_finished_with_drop.arg; return request->client_stats.num_calls_started == 0 && request->client_stats.num_calls_finished == 0 && - request->client_stats.num_calls_finished_with_drop_for_rate_limiting == - 0 && - request->client_stats - .num_calls_finished_with_drop_for_load_balancing == 0 && request->client_stats.num_calls_finished_with_client_failed_to_send == 0 && - request->client_stats.num_calls_finished_known_received == 0; + request->client_stats.num_calls_finished_known_received == 0 && + (drop_entries == NULL || drop_entries->num_entries == 0); } static void send_client_load_report_locked(grpc_exec_ctx *exec_ctx, void *arg, @@ -1332,7 +1326,7 @@ static void send_client_load_report_locked(grpc_exec_ctx *exec_ctx, void *arg, // Construct message payload. GPR_ASSERT(glb_policy->client_load_report_payload == NULL); grpc_grpclb_request *request = - grpc_grpclb_load_report_request_create(glb_policy->client_stats); + grpc_grpclb_load_report_request_create_locked(glb_policy->client_stats); // Skip client load report if the counters were all zero in the last // report and they are still zero in this one. if (load_report_counters_are_zero(request)) { diff --git a/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.c b/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.c index c762443b7c6..5b626231453 100644 --- a/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.c +++ b/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.c @@ -18,8 +18,11 @@ #include "src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.h" +#include + #include #include +#include #include #include @@ -29,10 +32,11 @@ struct grpc_grpclb_client_stats { gpr_refcount refs; + // This field must only be accessed via *_locked() methods. + grpc_grpclb_dropped_call_counts* drop_token_counts; + // These fields may be accessed from multiple threads at a time. gpr_atm num_calls_started; gpr_atm num_calls_finished; - gpr_atm num_calls_finished_with_drop_for_rate_limiting; - gpr_atm num_calls_finished_with_drop_for_load_balancing; gpr_atm num_calls_finished_with_client_failed_to_send; gpr_atm num_calls_finished_known_received; }; @@ -51,6 +55,7 @@ grpc_grpclb_client_stats* grpc_grpclb_client_stats_ref( void grpc_grpclb_client_stats_unref(grpc_grpclb_client_stats* client_stats) { if (gpr_unref(&client_stats->refs)) { + grpc_grpclb_dropped_call_counts_destroy(client_stats->drop_token_counts); gpr_free(client_stats); } } @@ -61,21 +66,9 @@ void grpc_grpclb_client_stats_add_call_started( } void grpc_grpclb_client_stats_add_call_finished( - bool finished_with_drop_for_rate_limiting, - bool finished_with_drop_for_load_balancing, bool finished_with_client_failed_to_send, bool finished_known_received, grpc_grpclb_client_stats* client_stats) { gpr_atm_full_fetch_add(&client_stats->num_calls_finished, (gpr_atm)1); - if (finished_with_drop_for_rate_limiting) { - gpr_atm_full_fetch_add( - &client_stats->num_calls_finished_with_drop_for_rate_limiting, - (gpr_atm)1); - } - if (finished_with_drop_for_load_balancing) { - gpr_atm_full_fetch_add( - &client_stats->num_calls_finished_with_drop_for_load_balancing, - (gpr_atm)1); - } if (finished_with_client_failed_to_send) { gpr_atm_full_fetch_add( &client_stats->num_calls_finished_with_client_failed_to_send, @@ -87,32 +80,70 @@ void grpc_grpclb_client_stats_add_call_finished( } } +void grpc_grpclb_client_stats_add_call_dropped_locked( + char* token, grpc_grpclb_client_stats* client_stats) { + // Increment num_calls_started and num_calls_finished. + gpr_atm_full_fetch_add(&client_stats->num_calls_started, (gpr_atm)1); + gpr_atm_full_fetch_add(&client_stats->num_calls_finished, (gpr_atm)1); + // Record the drop. + if (client_stats->drop_token_counts == NULL) { + client_stats->drop_token_counts = + gpr_zalloc(sizeof(grpc_grpclb_dropped_call_counts)); + } + grpc_grpclb_dropped_call_counts* drop_token_counts = + client_stats->drop_token_counts; + for (size_t i = 0; i < drop_token_counts->num_entries; ++i) { + if (strcmp(drop_token_counts->token_counts[i].token, token) == 0) { + ++drop_token_counts->token_counts[i].count; + return; + } + } + // Not found, so add a new entry. We double the size of the array each time. + size_t new_num_entries = 2; + while (new_num_entries < drop_token_counts->num_entries + 1) { + new_num_entries *= 2; + } + drop_token_counts->token_counts = + gpr_realloc(drop_token_counts->token_counts, + new_num_entries * sizeof(grpc_grpclb_drop_token_count)); + grpc_grpclb_drop_token_count* new_entry = + &drop_token_counts->token_counts[drop_token_counts->num_entries++]; + new_entry->token = gpr_strdup(token); + new_entry->count = 1; +} + static void atomic_get_and_reset_counter(int64_t* value, gpr_atm* counter) { *value = (int64_t)gpr_atm_acq_load(counter); gpr_atm_full_fetch_add(counter, (gpr_atm)(-*value)); } -void grpc_grpclb_client_stats_get( +void grpc_grpclb_client_stats_get_locked( grpc_grpclb_client_stats* client_stats, int64_t* num_calls_started, int64_t* num_calls_finished, - int64_t* num_calls_finished_with_drop_for_rate_limiting, - int64_t* num_calls_finished_with_drop_for_load_balancing, int64_t* num_calls_finished_with_client_failed_to_send, - int64_t* num_calls_finished_known_received) { + int64_t* num_calls_finished_known_received, + grpc_grpclb_dropped_call_counts** drop_token_counts) { atomic_get_and_reset_counter(num_calls_started, &client_stats->num_calls_started); atomic_get_and_reset_counter(num_calls_finished, &client_stats->num_calls_finished); - atomic_get_and_reset_counter( - num_calls_finished_with_drop_for_rate_limiting, - &client_stats->num_calls_finished_with_drop_for_rate_limiting); - atomic_get_and_reset_counter( - num_calls_finished_with_drop_for_load_balancing, - &client_stats->num_calls_finished_with_drop_for_load_balancing); atomic_get_and_reset_counter( num_calls_finished_with_client_failed_to_send, &client_stats->num_calls_finished_with_client_failed_to_send); atomic_get_and_reset_counter( num_calls_finished_known_received, &client_stats->num_calls_finished_known_received); + *drop_token_counts = client_stats->drop_token_counts; + client_stats->drop_token_counts = NULL; +} + +void grpc_grpclb_dropped_call_counts_destroy( + grpc_grpclb_dropped_call_counts* drop_entries) { + if (drop_entries != NULL) { + for (size_t i = 0; i < drop_entries->num_entries; ++i) { + gpr_free(drop_entries->token_counts[i].token); + } + gpr_free(drop_entries->token_counts); + gpr_free(drop_entries); + } } diff --git a/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.h b/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.h index 4bb47d5c5ca..c51e2a431af 100644 --- a/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.h +++ b/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.h @@ -25,6 +25,16 @@ typedef struct grpc_grpclb_client_stats grpc_grpclb_client_stats; +typedef struct { + char* token; + int64_t count; +} grpc_grpclb_drop_token_count; + +typedef struct { + grpc_grpclb_drop_token_count* token_counts; + size_t num_entries; +} grpc_grpclb_dropped_call_counts; + grpc_grpclb_client_stats* grpc_grpclb_client_stats_create(); grpc_grpclb_client_stats* grpc_grpclb_client_stats_ref( grpc_grpclb_client_stats* client_stats); @@ -33,18 +43,23 @@ void grpc_grpclb_client_stats_unref(grpc_grpclb_client_stats* client_stats); void grpc_grpclb_client_stats_add_call_started( grpc_grpclb_client_stats* client_stats); void grpc_grpclb_client_stats_add_call_finished( - bool finished_with_drop_for_rate_limiting, - bool finished_with_drop_for_load_balancing, bool finished_with_client_failed_to_send, bool finished_known_received, grpc_grpclb_client_stats* client_stats); -void grpc_grpclb_client_stats_get( +// This method is not thread-safe; caller must synchronize. +void grpc_grpclb_client_stats_add_call_dropped_locked( + char* token, grpc_grpclb_client_stats* client_stats); + +// This method is not thread-safe; caller must synchronize. +void grpc_grpclb_client_stats_get_locked( grpc_grpclb_client_stats* client_stats, int64_t* num_calls_started, int64_t* num_calls_finished, - int64_t* num_calls_finished_with_drop_for_rate_limiting, - int64_t* num_calls_finished_with_drop_for_load_balancing, int64_t* num_calls_finished_with_client_failed_to_send, - int64_t* num_calls_finished_known_received); + int64_t* num_calls_finished_known_received, + grpc_grpclb_dropped_call_counts** drop_token_counts); + +void grpc_grpclb_dropped_call_counts_destroy( + grpc_grpclb_dropped_call_counts* drop_entries); #endif /* GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_LB_POLICY_GRPCLB_GRPCLB_CLIENT_STATS_H \ */ diff --git a/src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.c b/src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.c index bec7c97a787..6fa29f326e9 100644 --- a/src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.c +++ b/src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.c @@ -76,7 +76,33 @@ static void populate_timestamp(gpr_timespec timestamp, timestamp_pb->nanos = timestamp.tv_nsec; } -grpc_grpclb_request *grpc_grpclb_load_report_request_create( +static bool encode_string(pb_ostream_t *stream, const pb_field_t *field, + void *const *arg) { + char *str = *arg; + if (!pb_encode_tag_for_field(stream, field)) return false; + return pb_encode_string(stream, (uint8_t *)str, strlen(str)); +} + +static bool encode_drops(pb_ostream_t *stream, const pb_field_t *field, + void *const *arg) { + grpc_grpclb_dropped_call_counts *drop_entries = *arg; + if (drop_entries == NULL) return true; + for (size_t i = 0; i < drop_entries->num_entries; ++i) { + if (!pb_encode_tag_for_field(stream, field)) return false; + grpc_lb_v1_ClientStatsPerToken drop_message; + drop_message.load_balance_token.funcs.encode = encode_string; + drop_message.load_balance_token.arg = drop_entries->token_counts[i].token; + drop_message.has_num_calls = true; + drop_message.num_calls = drop_entries->token_counts[i].count; + if (!pb_encode_submessage(stream, grpc_lb_v1_ClientStatsPerToken_fields, + &drop_message)) { + return false; + } + } + return true; +} + +grpc_grpclb_request *grpc_grpclb_load_report_request_create_locked( grpc_grpclb_client_stats *client_stats) { grpc_grpclb_request *req = gpr_zalloc(sizeof(grpc_grpclb_request)); req->has_client_stats = true; @@ -84,18 +110,17 @@ grpc_grpclb_request *grpc_grpclb_load_report_request_create( populate_timestamp(gpr_now(GPR_CLOCK_REALTIME), &req->client_stats.timestamp); req->client_stats.has_num_calls_started = true; req->client_stats.has_num_calls_finished = true; - req->client_stats.has_num_calls_finished_with_drop_for_rate_limiting = true; - req->client_stats.has_num_calls_finished_with_drop_for_load_balancing = true; req->client_stats.has_num_calls_finished_with_client_failed_to_send = true; req->client_stats.has_num_calls_finished_with_client_failed_to_send = true; req->client_stats.has_num_calls_finished_known_received = true; - grpc_grpclb_client_stats_get( + req->client_stats.calls_finished_with_drop.funcs.encode = encode_drops; + grpc_grpclb_client_stats_get_locked( client_stats, &req->client_stats.num_calls_started, &req->client_stats.num_calls_finished, - &req->client_stats.num_calls_finished_with_drop_for_rate_limiting, - &req->client_stats.num_calls_finished_with_drop_for_load_balancing, &req->client_stats.num_calls_finished_with_client_failed_to_send, - &req->client_stats.num_calls_finished_known_received); + &req->client_stats.num_calls_finished_known_received, + (grpc_grpclb_dropped_call_counts **)&req->client_stats + .calls_finished_with_drop.arg); return req; } @@ -117,6 +142,11 @@ grpc_slice grpc_grpclb_request_encode(const grpc_grpclb_request *request) { } void grpc_grpclb_request_destroy(grpc_grpclb_request *request) { + if (request->has_client_stats) { + grpc_grpclb_dropped_call_counts *drop_entries = + request->client_stats.calls_finished_with_drop.arg; + grpc_grpclb_dropped_call_counts_destroy(drop_entries); + } gpr_free(request); } diff --git a/src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.h b/src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.h index ef8d563edcd..c4a98492c9b 100644 --- a/src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.h +++ b/src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.h @@ -44,7 +44,7 @@ typedef struct { /** Create a request for a gRPC LB service under \a lb_service_name */ grpc_grpclb_request *grpc_grpclb_request_create(const char *lb_service_name); -grpc_grpclb_request *grpc_grpclb_load_report_request_create( +grpc_grpclb_request *grpc_grpclb_load_report_request_create_locked( grpc_grpclb_client_stats *client_stats); /** Protocol Buffers v3-encode \a request */ diff --git a/src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c b/src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c index fb119c7fc88..6a5d54c82a0 100644 --- a/src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c +++ b/src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c @@ -33,14 +33,19 @@ const pb_field_t grpc_lb_v1_InitialLoadBalanceRequest_fields[2] = { PB_LAST_FIELD }; -const pb_field_t grpc_lb_v1_ClientStats_fields[8] = { +const pb_field_t grpc_lb_v1_ClientStatsPerToken_fields[3] = { + PB_FIELD( 1, STRING , OPTIONAL, CALLBACK, FIRST, grpc_lb_v1_ClientStatsPerToken, load_balance_token, load_balance_token, 0), + PB_FIELD( 2, INT64 , OPTIONAL, STATIC , OTHER, grpc_lb_v1_ClientStatsPerToken, num_calls, load_balance_token, 0), + PB_LAST_FIELD +}; + +const pb_field_t grpc_lb_v1_ClientStats_fields[7] = { PB_FIELD( 1, MESSAGE , OPTIONAL, STATIC , FIRST, grpc_lb_v1_ClientStats, timestamp, timestamp, &grpc_lb_v1_Timestamp_fields), PB_FIELD( 2, INT64 , OPTIONAL, STATIC , OTHER, grpc_lb_v1_ClientStats, num_calls_started, timestamp, 0), PB_FIELD( 3, INT64 , OPTIONAL, STATIC , OTHER, grpc_lb_v1_ClientStats, num_calls_finished, num_calls_started, 0), - PB_FIELD( 4, INT64 , OPTIONAL, STATIC , OTHER, grpc_lb_v1_ClientStats, num_calls_finished_with_drop_for_rate_limiting, num_calls_finished, 0), - PB_FIELD( 5, INT64 , OPTIONAL, STATIC , OTHER, grpc_lb_v1_ClientStats, num_calls_finished_with_drop_for_load_balancing, num_calls_finished_with_drop_for_rate_limiting, 0), - PB_FIELD( 6, INT64 , OPTIONAL, STATIC , OTHER, grpc_lb_v1_ClientStats, num_calls_finished_with_client_failed_to_send, num_calls_finished_with_drop_for_load_balancing, 0), + PB_FIELD( 6, INT64 , OPTIONAL, STATIC , OTHER, grpc_lb_v1_ClientStats, num_calls_finished_with_client_failed_to_send, num_calls_finished, 0), PB_FIELD( 7, INT64 , OPTIONAL, STATIC , OTHER, grpc_lb_v1_ClientStats, num_calls_finished_known_received, num_calls_finished_with_client_failed_to_send, 0), + PB_FIELD( 8, MESSAGE , REPEATED, CALLBACK, OTHER, grpc_lb_v1_ClientStats, calls_finished_with_drop, num_calls_finished_known_received, &grpc_lb_v1_ClientStatsPerToken_fields), PB_LAST_FIELD }; @@ -62,12 +67,11 @@ const pb_field_t grpc_lb_v1_ServerList_fields[3] = { PB_LAST_FIELD }; -const pb_field_t grpc_lb_v1_Server_fields[6] = { +const pb_field_t grpc_lb_v1_Server_fields[5] = { PB_FIELD( 1, BYTES , OPTIONAL, STATIC , FIRST, grpc_lb_v1_Server, ip_address, ip_address, 0), PB_FIELD( 2, INT32 , OPTIONAL, STATIC , OTHER, grpc_lb_v1_Server, port, ip_address, 0), PB_FIELD( 3, STRING , OPTIONAL, STATIC , OTHER, grpc_lb_v1_Server, load_balance_token, port, 0), - PB_FIELD( 4, BOOL , OPTIONAL, STATIC , OTHER, grpc_lb_v1_Server, drop_for_rate_limiting, load_balance_token, 0), - PB_FIELD( 5, BOOL , OPTIONAL, STATIC , OTHER, grpc_lb_v1_Server, drop_for_load_balancing, drop_for_rate_limiting, 0), + PB_FIELD( 4, BOOL , OPTIONAL, STATIC , OTHER, grpc_lb_v1_Server, drop, load_balance_token, 0), PB_LAST_FIELD }; @@ -81,7 +85,7 @@ const pb_field_t grpc_lb_v1_Server_fields[6] = { * numbers or field sizes that are larger than what can fit in 8 or 16 bit * field descriptors. */ -PB_STATIC_ASSERT((pb_membersize(grpc_lb_v1_LoadBalanceRequest, initial_request) < 65536 && pb_membersize(grpc_lb_v1_LoadBalanceRequest, client_stats) < 65536 && pb_membersize(grpc_lb_v1_ClientStats, timestamp) < 65536 && pb_membersize(grpc_lb_v1_LoadBalanceResponse, initial_response) < 65536 && pb_membersize(grpc_lb_v1_LoadBalanceResponse, server_list) < 65536 && pb_membersize(grpc_lb_v1_InitialLoadBalanceResponse, client_stats_report_interval) < 65536 && pb_membersize(grpc_lb_v1_ServerList, servers) < 65536 && pb_membersize(grpc_lb_v1_ServerList, expiration_interval) < 65536), YOU_MUST_DEFINE_PB_FIELD_32BIT_FOR_MESSAGES_grpc_lb_v1_Duration_grpc_lb_v1_Timestamp_grpc_lb_v1_LoadBalanceRequest_grpc_lb_v1_InitialLoadBalanceRequest_grpc_lb_v1_ClientStats_grpc_lb_v1_LoadBalanceResponse_grpc_lb_v1_InitialLoadBalanceResponse_grpc_lb_v1_ServerList_grpc_lb_v1_Server) +PB_STATIC_ASSERT((pb_membersize(grpc_lb_v1_LoadBalanceRequest, initial_request) < 65536 && pb_membersize(grpc_lb_v1_LoadBalanceRequest, client_stats) < 65536 && pb_membersize(grpc_lb_v1_ClientStats, timestamp) < 65536 && pb_membersize(grpc_lb_v1_ClientStats, calls_finished_with_drop) < 65536 && pb_membersize(grpc_lb_v1_LoadBalanceResponse, initial_response) < 65536 && pb_membersize(grpc_lb_v1_LoadBalanceResponse, server_list) < 65536 && pb_membersize(grpc_lb_v1_InitialLoadBalanceResponse, client_stats_report_interval) < 65536 && pb_membersize(grpc_lb_v1_ServerList, servers) < 65536 && pb_membersize(grpc_lb_v1_ServerList, expiration_interval) < 65536), YOU_MUST_DEFINE_PB_FIELD_32BIT_FOR_MESSAGES_grpc_lb_v1_Duration_grpc_lb_v1_Timestamp_grpc_lb_v1_LoadBalanceRequest_grpc_lb_v1_InitialLoadBalanceRequest_grpc_lb_v1_ClientStatsPerToken_grpc_lb_v1_ClientStats_grpc_lb_v1_LoadBalanceResponse_grpc_lb_v1_InitialLoadBalanceResponse_grpc_lb_v1_ServerList_grpc_lb_v1_Server) #endif #if !defined(PB_FIELD_16BIT) && !defined(PB_FIELD_32BIT) @@ -92,7 +96,7 @@ PB_STATIC_ASSERT((pb_membersize(grpc_lb_v1_LoadBalanceRequest, initial_request) * numbers or field sizes that are larger than what can fit in the default * 8 bit descriptors. */ -PB_STATIC_ASSERT((pb_membersize(grpc_lb_v1_LoadBalanceRequest, initial_request) < 256 && pb_membersize(grpc_lb_v1_LoadBalanceRequest, client_stats) < 256 && pb_membersize(grpc_lb_v1_ClientStats, timestamp) < 256 && pb_membersize(grpc_lb_v1_LoadBalanceResponse, initial_response) < 256 && pb_membersize(grpc_lb_v1_LoadBalanceResponse, server_list) < 256 && pb_membersize(grpc_lb_v1_InitialLoadBalanceResponse, client_stats_report_interval) < 256 && pb_membersize(grpc_lb_v1_ServerList, servers) < 256 && pb_membersize(grpc_lb_v1_ServerList, expiration_interval) < 256), YOU_MUST_DEFINE_PB_FIELD_16BIT_FOR_MESSAGES_grpc_lb_v1_Duration_grpc_lb_v1_Timestamp_grpc_lb_v1_LoadBalanceRequest_grpc_lb_v1_InitialLoadBalanceRequest_grpc_lb_v1_ClientStats_grpc_lb_v1_LoadBalanceResponse_grpc_lb_v1_InitialLoadBalanceResponse_grpc_lb_v1_ServerList_grpc_lb_v1_Server) +PB_STATIC_ASSERT((pb_membersize(grpc_lb_v1_LoadBalanceRequest, initial_request) < 256 && pb_membersize(grpc_lb_v1_LoadBalanceRequest, client_stats) < 256 && pb_membersize(grpc_lb_v1_ClientStats, timestamp) < 256 && pb_membersize(grpc_lb_v1_ClientStats, calls_finished_with_drop) < 256 && pb_membersize(grpc_lb_v1_LoadBalanceResponse, initial_response) < 256 && pb_membersize(grpc_lb_v1_LoadBalanceResponse, server_list) < 256 && pb_membersize(grpc_lb_v1_InitialLoadBalanceResponse, client_stats_report_interval) < 256 && pb_membersize(grpc_lb_v1_ServerList, servers) < 256 && pb_membersize(grpc_lb_v1_ServerList, expiration_interval) < 256), YOU_MUST_DEFINE_PB_FIELD_16BIT_FOR_MESSAGES_grpc_lb_v1_Duration_grpc_lb_v1_Timestamp_grpc_lb_v1_LoadBalanceRequest_grpc_lb_v1_InitialLoadBalanceRequest_grpc_lb_v1_ClientStatsPerToken_grpc_lb_v1_ClientStats_grpc_lb_v1_LoadBalanceResponse_grpc_lb_v1_InitialLoadBalanceResponse_grpc_lb_v1_ServerList_grpc_lb_v1_Server) #endif diff --git a/src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.h b/src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.h index d3ae919ec27..93333d1aed2 100644 --- a/src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.h +++ b/src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.h @@ -14,6 +14,13 @@ extern "C" { #endif /* Struct definitions */ +typedef struct _grpc_lb_v1_ClientStatsPerToken { + pb_callback_t load_balance_token; + bool has_num_calls; + int64_t num_calls; +/* @@protoc_insertion_point(struct:grpc_lb_v1_ClientStatsPerToken) */ +} grpc_lb_v1_ClientStatsPerToken; + typedef struct _grpc_lb_v1_Duration { bool has_seconds; int64_t seconds; @@ -36,10 +43,8 @@ typedef struct _grpc_lb_v1_Server { int32_t port; bool has_load_balance_token; char load_balance_token[50]; - bool has_drop_for_rate_limiting; - bool drop_for_rate_limiting; - bool has_drop_for_load_balancing; - bool drop_for_load_balancing; + bool has_drop; + bool drop; /* @@protoc_insertion_point(struct:grpc_lb_v1_Server) */ } grpc_lb_v1_Server; @@ -58,14 +63,11 @@ typedef struct _grpc_lb_v1_ClientStats { int64_t num_calls_started; bool has_num_calls_finished; int64_t num_calls_finished; - bool has_num_calls_finished_with_drop_for_rate_limiting; - int64_t num_calls_finished_with_drop_for_rate_limiting; - bool has_num_calls_finished_with_drop_for_load_balancing; - int64_t num_calls_finished_with_drop_for_load_balancing; bool has_num_calls_finished_with_client_failed_to_send; int64_t num_calls_finished_with_client_failed_to_send; bool has_num_calls_finished_known_received; int64_t num_calls_finished_known_received; + pb_callback_t calls_finished_with_drop; /* @@protoc_insertion_point(struct:grpc_lb_v1_ClientStats) */ } grpc_lb_v1_ClientStats; @@ -107,39 +109,41 @@ typedef struct _grpc_lb_v1_LoadBalanceResponse { #define grpc_lb_v1_Timestamp_init_default {false, 0, false, 0} #define grpc_lb_v1_LoadBalanceRequest_init_default {false, grpc_lb_v1_InitialLoadBalanceRequest_init_default, false, grpc_lb_v1_ClientStats_init_default} #define grpc_lb_v1_InitialLoadBalanceRequest_init_default {false, ""} -#define grpc_lb_v1_ClientStats_init_default {false, grpc_lb_v1_Timestamp_init_default, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0} +#define grpc_lb_v1_ClientStatsPerToken_init_default {{{NULL}, NULL}, false, 0} +#define grpc_lb_v1_ClientStats_init_default {false, grpc_lb_v1_Timestamp_init_default, false, 0, false, 0, false, 0, false, 0, {{NULL}, NULL}} #define grpc_lb_v1_LoadBalanceResponse_init_default {false, grpc_lb_v1_InitialLoadBalanceResponse_init_default, false, grpc_lb_v1_ServerList_init_default} #define grpc_lb_v1_InitialLoadBalanceResponse_init_default {false, "", false, grpc_lb_v1_Duration_init_default} #define grpc_lb_v1_ServerList_init_default {{{NULL}, NULL}, false, grpc_lb_v1_Duration_init_default} -#define grpc_lb_v1_Server_init_default {false, {0, {0}}, false, 0, false, "", false, 0, false, 0} +#define grpc_lb_v1_Server_init_default {false, {0, {0}}, false, 0, false, "", false, 0} #define grpc_lb_v1_Duration_init_zero {false, 0, false, 0} #define grpc_lb_v1_Timestamp_init_zero {false, 0, false, 0} #define grpc_lb_v1_LoadBalanceRequest_init_zero {false, grpc_lb_v1_InitialLoadBalanceRequest_init_zero, false, grpc_lb_v1_ClientStats_init_zero} #define grpc_lb_v1_InitialLoadBalanceRequest_init_zero {false, ""} -#define grpc_lb_v1_ClientStats_init_zero {false, grpc_lb_v1_Timestamp_init_zero, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0} +#define grpc_lb_v1_ClientStatsPerToken_init_zero {{{NULL}, NULL}, false, 0} +#define grpc_lb_v1_ClientStats_init_zero {false, grpc_lb_v1_Timestamp_init_zero, false, 0, false, 0, false, 0, false, 0, {{NULL}, NULL}} #define grpc_lb_v1_LoadBalanceResponse_init_zero {false, grpc_lb_v1_InitialLoadBalanceResponse_init_zero, false, grpc_lb_v1_ServerList_init_zero} #define grpc_lb_v1_InitialLoadBalanceResponse_init_zero {false, "", false, grpc_lb_v1_Duration_init_zero} #define grpc_lb_v1_ServerList_init_zero {{{NULL}, NULL}, false, grpc_lb_v1_Duration_init_zero} -#define grpc_lb_v1_Server_init_zero {false, {0, {0}}, false, 0, false, "", false, 0, false, 0} +#define grpc_lb_v1_Server_init_zero {false, {0, {0}}, false, 0, false, "", false, 0} /* Field tags (for use in manual encoding/decoding) */ +#define grpc_lb_v1_ClientStatsPerToken_load_balance_token_tag 1 +#define grpc_lb_v1_ClientStatsPerToken_num_calls_tag 2 #define grpc_lb_v1_Duration_seconds_tag 1 #define grpc_lb_v1_Duration_nanos_tag 2 #define grpc_lb_v1_InitialLoadBalanceRequest_name_tag 1 #define grpc_lb_v1_Server_ip_address_tag 1 #define grpc_lb_v1_Server_port_tag 2 #define grpc_lb_v1_Server_load_balance_token_tag 3 -#define grpc_lb_v1_Server_drop_for_rate_limiting_tag 4 -#define grpc_lb_v1_Server_drop_for_load_balancing_tag 5 +#define grpc_lb_v1_Server_drop_tag 4 #define grpc_lb_v1_Timestamp_seconds_tag 1 #define grpc_lb_v1_Timestamp_nanos_tag 2 #define grpc_lb_v1_ClientStats_timestamp_tag 1 #define grpc_lb_v1_ClientStats_num_calls_started_tag 2 #define grpc_lb_v1_ClientStats_num_calls_finished_tag 3 -#define grpc_lb_v1_ClientStats_num_calls_finished_with_drop_for_rate_limiting_tag 4 -#define grpc_lb_v1_ClientStats_num_calls_finished_with_drop_for_load_balancing_tag 5 #define grpc_lb_v1_ClientStats_num_calls_finished_with_client_failed_to_send_tag 6 #define grpc_lb_v1_ClientStats_num_calls_finished_known_received_tag 7 +#define grpc_lb_v1_ClientStats_calls_finished_with_drop_tag 8 #define grpc_lb_v1_InitialLoadBalanceResponse_load_balancer_delegate_tag 1 #define grpc_lb_v1_InitialLoadBalanceResponse_client_stats_report_interval_tag 2 #define grpc_lb_v1_ServerList_servers_tag 1 @@ -154,22 +158,24 @@ extern const pb_field_t grpc_lb_v1_Duration_fields[3]; extern const pb_field_t grpc_lb_v1_Timestamp_fields[3]; extern const pb_field_t grpc_lb_v1_LoadBalanceRequest_fields[3]; extern const pb_field_t grpc_lb_v1_InitialLoadBalanceRequest_fields[2]; -extern const pb_field_t grpc_lb_v1_ClientStats_fields[8]; +extern const pb_field_t grpc_lb_v1_ClientStatsPerToken_fields[3]; +extern const pb_field_t grpc_lb_v1_ClientStats_fields[7]; extern const pb_field_t grpc_lb_v1_LoadBalanceResponse_fields[3]; extern const pb_field_t grpc_lb_v1_InitialLoadBalanceResponse_fields[3]; extern const pb_field_t grpc_lb_v1_ServerList_fields[3]; -extern const pb_field_t grpc_lb_v1_Server_fields[6]; +extern const pb_field_t grpc_lb_v1_Server_fields[5]; /* Maximum encoded size of messages (where known) */ #define grpc_lb_v1_Duration_size 22 #define grpc_lb_v1_Timestamp_size 22 -#define grpc_lb_v1_LoadBalanceRequest_size 226 +#define grpc_lb_v1_LoadBalanceRequest_size (140 + grpc_lb_v1_ClientStats_size) #define grpc_lb_v1_InitialLoadBalanceRequest_size 131 -#define grpc_lb_v1_ClientStats_size 90 +/* grpc_lb_v1_ClientStatsPerToken_size depends on runtime parameters */ +/* grpc_lb_v1_ClientStats_size depends on runtime parameters */ #define grpc_lb_v1_LoadBalanceResponse_size (98 + grpc_lb_v1_ServerList_size) #define grpc_lb_v1_InitialLoadBalanceResponse_size 90 /* grpc_lb_v1_ServerList_size depends on runtime parameters */ -#define grpc_lb_v1_Server_size 85 +#define grpc_lb_v1_Server_size 83 /* Message IDs (where set with "msgid" option) */ #ifdef PB_MSGID diff --git a/src/proto/grpc/lb/v1/load_balancer.proto b/src/proto/grpc/lb/v1/load_balancer.proto index b13b3438cf2..0a33568bd67 100644 --- a/src/proto/grpc/lb/v1/load_balancer.proto +++ b/src/proto/grpc/lb/v1/load_balancer.proto @@ -67,6 +67,15 @@ message InitialLoadBalanceRequest { string name = 1; } +// Contains the number of calls finished for a particular load balance token. +message ClientStatsPerToken { + // See Server.load_balance_token. + string load_balance_token = 1; + + // The total number of RPCs that finished associated with the token. + int64 num_calls = 2; +} + // Contains client level statistics that are useful to load balancing. Each // count except the timestamp should be reset to zero after reporting the stats. message ClientStats { @@ -79,20 +88,17 @@ message ClientStats { // The total number of RPCs that finished. int64 num_calls_finished = 3; - // The total number of RPCs that were dropped by the client because of rate - // limiting. - int64 num_calls_finished_with_drop_for_rate_limiting = 4; - - // The total number of RPCs that were dropped by the client because of load - // balancing. - int64 num_calls_finished_with_drop_for_load_balancing = 5; - // The total number of RPCs that failed to reach a server except dropped RPCs. int64 num_calls_finished_with_client_failed_to_send = 6; // The total number of RPCs that finished and are known to have been received // by a server. int64 num_calls_finished_known_received = 7; + + // The list of dropped calls. + repeated ClientStatsPerToken calls_finished_with_drop = 8; + + reserved 4, 5; } message LoadBalanceResponse { @@ -134,10 +140,8 @@ message ServerList { Duration expiration_interval = 3; } -// Contains server information. When none of the [drop_for_*] fields are true, -// use the other fields. When drop_for_rate_limiting is true, ignore all other -// fields. Use drop_for_load_balancing only when it is true and -// drop_for_rate_limiting is false. +// Contains server information. When the drop field is not true, use the other +// fields. message Server { // A resolved address for the server, serialized in network-byte-order. It may // either be an IPv4 or IPv6 address. @@ -149,16 +153,16 @@ message Server { // An opaque but printable token given to the frontend for each pick. All // frontend requests for that pick must include the token in its initial // metadata. The token is used by the backend to verify the request and to - // allow the backend to report load to the gRPC LB system. + // allow the backend to report load to the gRPC LB system. The token is also + // used in client stats for reporting dropped calls. // // Its length is variable but less than 50 bytes. string load_balance_token = 3; - // Indicates whether this particular request should be dropped by the client - // for rate limiting. - bool drop_for_rate_limiting = 4; + // Indicates whether this particular request should be dropped by the client. + // If the request is dropped, there will be a corresponding entry in + // ClientStats.calls_finished_with_drop. + bool drop = 4; - // Indicates whether this particular request should be dropped by the client - // for load balancing. - bool drop_for_load_balancing = 5; + reserved 5; } diff --git a/test/cpp/end2end/grpclb_end2end_test.cc b/test/cpp/end2end/grpclb_end2end_test.cc index 1f3255d18d8..e403ee66fc8 100644 --- a/test/cpp/end2end/grpclb_end2end_test.cc +++ b/test/cpp/end2end/grpclb_end2end_test.cc @@ -45,6 +45,7 @@ extern "C" { #include "src/proto/grpc/lb/v1/load_balancer.grpc.pb.h" #include "src/proto/grpc/testing/echo.grpc.pb.h" +#include #include // TODO(dgq): Other scenarios in need of testing: @@ -142,22 +143,20 @@ grpc::string Ip4ToPackedString(const char* ip_str) { struct ClientStats { size_t num_calls_started = 0; size_t num_calls_finished = 0; - size_t num_calls_finished_with_drop_for_rate_limiting = 0; - size_t num_calls_finished_with_drop_for_load_balancing = 0; size_t num_calls_finished_with_client_failed_to_send = 0; size_t num_calls_finished_known_received = 0; + std::map drop_token_counts; ClientStats& operator+=(const ClientStats& other) { num_calls_started += other.num_calls_started; num_calls_finished += other.num_calls_finished; - num_calls_finished_with_drop_for_rate_limiting += - other.num_calls_finished_with_drop_for_rate_limiting; - num_calls_finished_with_drop_for_load_balancing += - other.num_calls_finished_with_drop_for_load_balancing; num_calls_finished_with_client_failed_to_send += other.num_calls_finished_with_client_failed_to_send; num_calls_finished_known_received += other.num_calls_finished_known_received; + for (const auto& p : other.drop_token_counts) { + drop_token_counts[p.first] += p.second; + } return *this; } }; @@ -218,17 +217,17 @@ class BalancerServiceImpl : public BalancerService { request.client_stats().num_calls_started(); client_stats_.num_calls_finished += request.client_stats().num_calls_finished(); - client_stats_.num_calls_finished_with_drop_for_rate_limiting += - request.client_stats() - .num_calls_finished_with_drop_for_rate_limiting(); - client_stats_.num_calls_finished_with_drop_for_load_balancing += - request.client_stats() - .num_calls_finished_with_drop_for_load_balancing(); client_stats_.num_calls_finished_with_client_failed_to_send += request.client_stats() .num_calls_finished_with_client_failed_to_send(); client_stats_.num_calls_finished_known_received += request.client_stats().num_calls_finished_known_received(); + for (const auto& drop_token_count : + request.client_stats().calls_finished_with_drop()) { + client_stats_ + .drop_token_counts[drop_token_count.load_balance_token()] += + drop_token_count.num_calls(); + } load_report_cond_.notify_one(); } done: @@ -252,16 +251,15 @@ class BalancerServiceImpl : public BalancerService { } static LoadBalanceResponse BuildResponseForBackends( - const std::vector& backend_ports, int num_drops_for_rate_limiting, - int num_drops_for_load_balancing) { + const std::vector& backend_ports, + const std::map& drop_token_counts) { LoadBalanceResponse response; - for (int i = 0; i < num_drops_for_rate_limiting; ++i) { - auto* server = response.mutable_server_list()->add_servers(); - server->set_drop_for_rate_limiting(true); - } - for (int i = 0; i < num_drops_for_load_balancing; ++i) { - auto* server = response.mutable_server_list()->add_servers(); - server->set_drop_for_load_balancing(true); + for (const auto& drop_token_count : drop_token_counts) { + for (size_t i = 0; i < drop_token_count.second; ++i) { + auto* server = response.mutable_server_list()->add_servers(); + server->set_drop(true); + server->set_load_balance_token(drop_token_count.first); + } } for (const int& backend_port : backend_ports) { auto* server = response.mutable_server_list()->add_servers(); @@ -499,7 +497,7 @@ class SingleBalancerTest : public GrpclbEnd2endTest { TEST_F(SingleBalancerTest, Vanilla) { const size_t kNumRpcsPerAddress = 100; ScheduleResponseForBalancer( - 0, BalancerServiceImpl::BuildResponseForBackends(GetBackendPorts(), 0, 0), + 0, BalancerServiceImpl::BuildResponseForBackends(GetBackendPorts(), {}), 0); // Make sure that trying to connect works without a call. channel_->GetState(true /* try_to_connect */); @@ -538,7 +536,7 @@ TEST_F(SingleBalancerTest, InitiallyEmptyServerlist) { ScheduleResponseForBalancer(0, LoadBalanceResponse(), 0); // Send non-empty serverlist only after kServerlistDelayMs ScheduleResponseForBalancer( - 0, BalancerServiceImpl::BuildResponseForBackends(GetBackendPorts(), 0, 0), + 0, BalancerServiceImpl::BuildResponseForBackends(GetBackendPorts(), {}), kServerlistDelayMs); const auto t0 = system_clock::now(); @@ -580,11 +578,11 @@ TEST_F(SingleBalancerTest, RepeatedServerlist) { // Send a serverlist right away. ScheduleResponseForBalancer( - 0, BalancerServiceImpl::BuildResponseForBackends(GetBackendPorts(), 0, 0), + 0, BalancerServiceImpl::BuildResponseForBackends(GetBackendPorts(), {}), 0); // ... and the same one a bit later. ScheduleResponseForBalancer( - 0, BalancerServiceImpl::BuildResponseForBackends(GetBackendPorts(), 0, 0), + 0, BalancerServiceImpl::BuildResponseForBackends(GetBackendPorts(), {}), kServerlistDelayMs); // Send num_backends/2 requests. @@ -648,10 +646,9 @@ TEST_F(UpdatesTest, UpdateBalancers) { const std::vector first_backend{GetBackendPorts()[0]}; const std::vector second_backend{GetBackendPorts()[1]}; ScheduleResponseForBalancer( - 0, BalancerServiceImpl::BuildResponseForBackends(first_backend, 0, 0), 0); + 0, BalancerServiceImpl::BuildResponseForBackends(first_backend, {}), 0); ScheduleResponseForBalancer( - 1, BalancerServiceImpl::BuildResponseForBackends(second_backend, 0, 0), - 0); + 1, BalancerServiceImpl::BuildResponseForBackends(second_backend, {}), 0); // Start servers and send 10 RPCs per server. gpr_log(GPR_INFO, "========= BEFORE FIRST BATCH =========="); @@ -726,10 +723,9 @@ TEST_F(UpdatesTest, UpdateBalancersRepeated) { const std::vector second_backend{GetBackendPorts()[0]}; ScheduleResponseForBalancer( - 0, BalancerServiceImpl::BuildResponseForBackends(first_backend, 0, 0), 0); + 0, BalancerServiceImpl::BuildResponseForBackends(first_backend, {}), 0); ScheduleResponseForBalancer( - 1, BalancerServiceImpl::BuildResponseForBackends(second_backend, 0, 0), - 0); + 1, BalancerServiceImpl::BuildResponseForBackends(second_backend, {}), 0); // Start servers and send 10 RPCs per server. gpr_log(GPR_INFO, "========= BEFORE FIRST BATCH =========="); @@ -809,10 +805,9 @@ TEST_F(UpdatesTest, UpdateBalancersDeadUpdate) { const std::vector second_backend{GetBackendPorts()[1]}; ScheduleResponseForBalancer( - 0, BalancerServiceImpl::BuildResponseForBackends(first_backend, 0, 0), 0); + 0, BalancerServiceImpl::BuildResponseForBackends(first_backend, {}), 0); ScheduleResponseForBalancer( - 1, BalancerServiceImpl::BuildResponseForBackends(second_backend, 0, 0), - 0); + 1, BalancerServiceImpl::BuildResponseForBackends(second_backend, {}), 0); // Start servers and send 10 RPCs per server. gpr_log(GPR_INFO, "========= BEFORE FIRST BATCH =========="); @@ -901,7 +896,8 @@ TEST_F(UpdatesTest, UpdateBalancersDeadUpdate) { TEST_F(SingleBalancerTest, Drop) { const size_t kNumRpcsPerAddress = 100; ScheduleResponseForBalancer( - 0, BalancerServiceImpl::BuildResponseForBackends(GetBackendPorts(), 1, 2), + 0, BalancerServiceImpl::BuildResponseForBackends( + GetBackendPorts(), {{"rate_limiting", 1}, {"load_balancing", 2}}), 0); // Send 100 RPCs for each server and drop address. const auto& statuses_and_responses = @@ -936,7 +932,9 @@ TEST_F(SingleBalancerTest, Drop) { TEST_F(SingleBalancerTest, DropAllFirst) { // All registered addresses are marked as "drop". ScheduleResponseForBalancer( - 0, BalancerServiceImpl::BuildResponseForBackends({}, 1, 1), 0); + 0, BalancerServiceImpl::BuildResponseForBackends( + {}, {{"rate_limiting", 1}, {"load_balancing", 1}}), + 0); const auto& statuses_and_responses = SendRpc(kMessage_, 1); for (const auto& status_and_response : statuses_and_responses) { const Status& status = status_and_response.first; @@ -947,10 +945,12 @@ TEST_F(SingleBalancerTest, DropAllFirst) { TEST_F(SingleBalancerTest, DropAll) { ScheduleResponseForBalancer( - 0, BalancerServiceImpl::BuildResponseForBackends(GetBackendPorts(), 0, 0), + 0, BalancerServiceImpl::BuildResponseForBackends(GetBackendPorts(), {}), 0); ScheduleResponseForBalancer( - 0, BalancerServiceImpl::BuildResponseForBackends({}, 1, 1), 1000); + 0, BalancerServiceImpl::BuildResponseForBackends( + {}, {{"rate_limiting", 1}, {"load_balancing", 1}}), + 1000); // First call succeeds. auto statuses_and_responses = SendRpc(kMessage_, 1); @@ -980,7 +980,7 @@ class SingleBalancerWithClientLoadReportingTest : public GrpclbEnd2endTest { TEST_F(SingleBalancerWithClientLoadReportingTest, Vanilla) { const size_t kNumRpcsPerAddress = 100; ScheduleResponseForBalancer( - 0, BalancerServiceImpl::BuildResponseForBackends(GetBackendPorts(), 0, 0), + 0, BalancerServiceImpl::BuildResponseForBackends(GetBackendPorts(), {}), 0); // Send 100 RPCs per server. const auto& statuses_and_responses = @@ -1009,17 +1009,17 @@ TEST_F(SingleBalancerWithClientLoadReportingTest, Vanilla) { EXPECT_EQ(kNumRpcsPerAddress * num_backends_, client_stats.num_calls_started); EXPECT_EQ(kNumRpcsPerAddress * num_backends_, client_stats.num_calls_finished); - EXPECT_EQ(0U, client_stats.num_calls_finished_with_drop_for_rate_limiting); - EXPECT_EQ(0U, client_stats.num_calls_finished_with_drop_for_load_balancing); EXPECT_EQ(0U, client_stats.num_calls_finished_with_client_failed_to_send); EXPECT_EQ(kNumRpcsPerAddress * num_backends_, client_stats.num_calls_finished_known_received); + EXPECT_THAT(client_stats.drop_token_counts, ::testing::ElementsAre()); } TEST_F(SingleBalancerWithClientLoadReportingTest, Drop) { const size_t kNumRpcsPerAddress = 3; ScheduleResponseForBalancer( - 0, BalancerServiceImpl::BuildResponseForBackends(GetBackendPorts(), 2, 1), + 0, BalancerServiceImpl::BuildResponseForBackends( + GetBackendPorts(), {{"rate_limiting", 2}, {"load_balancing", 1}}), 0); // Send 100 RPCs for each server and drop address. const auto& statuses_and_responses = @@ -1056,13 +1056,13 @@ TEST_F(SingleBalancerWithClientLoadReportingTest, Drop) { client_stats.num_calls_started); EXPECT_EQ(kNumRpcsPerAddress * (num_backends_ + 3), client_stats.num_calls_finished); - EXPECT_EQ(kNumRpcsPerAddress * 2, - client_stats.num_calls_finished_with_drop_for_rate_limiting); - EXPECT_EQ(kNumRpcsPerAddress, - client_stats.num_calls_finished_with_drop_for_load_balancing); EXPECT_EQ(0U, client_stats.num_calls_finished_with_client_failed_to_send); EXPECT_EQ(kNumRpcsPerAddress * num_backends_, client_stats.num_calls_finished_known_received); + EXPECT_THAT(client_stats.drop_token_counts, + ::testing::ElementsAre( + ::testing::Pair("load_balancing", kNumRpcsPerAddress), + ::testing::Pair("rate_limiting", kNumRpcsPerAddress * 2))); } } // namespace diff --git a/test/cpp/grpclb/grpclb_api_test.cc b/test/cpp/grpclb/grpclb_api_test.cc index cec96665038..6b0350e1f91 100644 --- a/test/cpp/grpclb/grpclb_api_test.cc +++ b/test/cpp/grpclb/grpclb_api_test.cc @@ -91,13 +91,13 @@ TEST_F(GrpclbTest, ParseResponseServerList) { auto* server = serverlist->add_servers(); server->set_ip_address(Ip4ToPackedString("127.0.0.1")); server->set_port(12345); - server->set_drop_for_rate_limiting(true); - server->set_drop_for_load_balancing(false); + server->set_load_balance_token("rate_limting"); + server->set_drop(true); server = response.mutable_server_list()->add_servers(); server->set_ip_address(Ip4ToPackedString("10.0.0.1")); server->set_port(54321); - server->set_drop_for_rate_limiting(false); - server->set_drop_for_load_balancing(true); + server->set_load_balance_token("load_balancing"); + server->set_drop(true); auto* expiration_interval = serverlist->mutable_expiration_interval(); expiration_interval->set_seconds(888); expiration_interval->set_nanos(999); @@ -112,14 +112,14 @@ TEST_F(GrpclbTest, ParseResponseServerList) { EXPECT_EQ(PackedStringToIp(c_serverlist->servers[0]->ip_address), "127.0.0.1"); EXPECT_EQ(c_serverlist->servers[0]->port, 12345); - EXPECT_TRUE(c_serverlist->servers[0]->drop_for_rate_limiting); - EXPECT_FALSE(c_serverlist->servers[0]->drop_for_load_balancing); + EXPECT_STREQ(c_serverlist->servers[0]->load_balance_token, "rate_limting"); + EXPECT_TRUE(c_serverlist->servers[0]->drop); EXPECT_TRUE(c_serverlist->servers[1]->has_ip_address); EXPECT_EQ(PackedStringToIp(c_serverlist->servers[1]->ip_address), "10.0.0.1"); EXPECT_EQ(c_serverlist->servers[1]->port, 54321); - EXPECT_FALSE(c_serverlist->servers[1]->drop_for_rate_limiting); - EXPECT_TRUE(c_serverlist->servers[1]->drop_for_load_balancing); + EXPECT_STREQ(c_serverlist->servers[1]->load_balance_token, "load_balancing"); + EXPECT_TRUE(c_serverlist->servers[1]->drop); EXPECT_TRUE(c_serverlist->expiration_interval.has_seconds); EXPECT_EQ(c_serverlist->expiration_interval.seconds, 888); From a0bfba212236ad35ef14872a1bcb53317c91ffc8 Mon Sep 17 00:00:00 2001 From: Sree Kuchibhotla Date: Thu, 27 Jul 2017 15:24:04 -0700 Subject: [PATCH 45/80] Fix use after free error in cq --- src/core/lib/surface/completion_queue.c | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/src/core/lib/surface/completion_queue.c b/src/core/lib/surface/completion_queue.c index 978d7b41719..3851993c924 100644 --- a/src/core/lib/surface/completion_queue.c +++ b/src/core/lib/surface/completion_queue.c @@ -855,8 +855,7 @@ static grpc_event cq_next(grpc_completion_queue *cq, gpr_timespec deadline, inconsistent state. If it is the latter, we shold do a 0-timeout poll so that the thread comes back quickly from poll to make a second attempt at popping. Not doing this can potentially deadlock this - thread - forever (if the deadline is infinity) */ + thread forever (if the deadline is infinity) */ if (cq_event_queue_num_items(&cqd->queue) > 0) { iteration_deadline = gpr_time_0(GPR_CLOCK_MONOTONIC); } @@ -869,10 +868,8 @@ static grpc_event cq_next(grpc_completion_queue *cq, gpr_timespec deadline, if (cq_event_queue_num_items(&cqd->queue) > 0) { /* Go to the beginning of the loop. No point doing a poll because (cq->shutdown == true) is only possible when there is no pending - work - (i.e cq->pending_events == 0) and any outstanding - grpc_cq_completion - events are already queued on this cq */ + work (i.e cq->pending_events == 0) and any outstanding completion + events should have already been queued on this cq */ continue; } @@ -909,11 +906,6 @@ static grpc_event cq_next(grpc_completion_queue *cq, gpr_timespec deadline, is_finished_arg.first_loop = false; } - GRPC_SURFACE_TRACE_RETURNED_EVENT(cq, &ret); - GRPC_CQ_INTERNAL_UNREF(&exec_ctx, cq, "next"); - grpc_exec_ctx_finish(&exec_ctx); - GPR_ASSERT(is_finished_arg.stolen_completion == NULL); - if (cq_event_queue_num_items(&cqd->queue) > 0 && gpr_atm_no_barrier_load(&cqd->pending_events) > 0) { gpr_mu_lock(cq->mu); @@ -921,6 +913,11 @@ static grpc_event cq_next(grpc_completion_queue *cq, gpr_timespec deadline, gpr_mu_unlock(cq->mu); } + GRPC_SURFACE_TRACE_RETURNED_EVENT(cq, &ret); + GRPC_CQ_INTERNAL_UNREF(&exec_ctx, cq, "next"); + grpc_exec_ctx_finish(&exec_ctx); + GPR_ASSERT(is_finished_arg.stolen_completion == NULL); + GPR_TIMER_END("grpc_completion_queue_next", 0); return ret; From 1f92c17bed24004ea6af7e8afa018c59d9843329 Mon Sep 17 00:00:00 2001 From: Matt Kwong Date: Thu, 27 Jul 2017 17:06:12 -0700 Subject: [PATCH 46/80] Enable BQ access for Kokoro Macs --- tools/internal_ci/helper_scripts/prepare_build_macos_rc | 5 +++++ tools/internal_ci/macos/grpc_basictests.cfg | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/tools/internal_ci/helper_scripts/prepare_build_macos_rc b/tools/internal_ci/helper_scripts/prepare_build_macos_rc index 89e8e24351c..00105d48383 100644 --- a/tools/internal_ci/helper_scripts/prepare_build_macos_rc +++ b/tools/internal_ci/helper_scripts/prepare_build_macos_rc @@ -27,6 +27,11 @@ ulimit -n 10000 # show current limits ulimit -a +# Add GCP credentials for BQ access +# pip does not install google-api-python-client properly, so use easy_install +sudo easy_install --upgrade google-api-python-client +export GOOGLE_APPLICATION_CREDENTIALS=${KOKORO_GFILE_DIR}/GrpcTesting-d0eeee2db331.json +gcloud auth activate-service-account --key-file=$GOOGLE_APPLICATION_CREDENTIALS # required to build protobuf brew install gflags diff --git a/tools/internal_ci/macos/grpc_basictests.cfg b/tools/internal_ci/macos/grpc_basictests.cfg index ce3609c9ec4..e10c2e36b27 100644 --- a/tools/internal_ci/macos/grpc_basictests.cfg +++ b/tools/internal_ci/macos/grpc_basictests.cfg @@ -16,6 +16,7 @@ # Location of the continuous shell script in repository. build_file: "grpc/tools/internal_ci/macos/grpc_run_tests_matrix.sh" +gfile_resources: "/bigstore/grpc-testing-secrets/gcp_credentials/GrpcTesting-d0eeee2db331.json" timeout_mins: 240 action { define_artifacts { @@ -26,5 +27,5 @@ action { env_vars { key: "RUN_TESTS_FLAGS" - value: "-f basictests macos --internal_ci -j 2 --inner_jobs 4" + value: "-f basictests macos --internal_ci -j 2 --inner_jobs 4 --bq_result_table aggregate_results" } From cd22f11905dacc72f08b0255c1cf73d0cea4c7c2 Mon Sep 17 00:00:00 2001 From: Alexander Polcyn Date: Thu, 27 Jul 2017 17:54:59 -0700 Subject: [PATCH 47/80] properly finish bidi calls when there is an initial error --- src/ruby/lib/grpc/generic/active_call.rb | 15 ++++++++++++- src/ruby/spec/generic/client_stub_spec.rb | 26 +++++++++++++++++------ 2 files changed, 34 insertions(+), 7 deletions(-) diff --git a/src/ruby/lib/grpc/generic/active_call.rb b/src/ruby/lib/grpc/generic/active_call.rb index 87b29c26eae..10eb70b4a7f 100644 --- a/src/ruby/lib/grpc/generic/active_call.rb +++ b/src/ruby/lib/grpc/generic/active_call.rb @@ -480,7 +480,20 @@ module GRPC def bidi_streamer(requests, metadata: {}, &blk) raise_error_if_already_executed # Metadata might have already been sent if this is an operation view - merge_metadata_and_send_if_not_already_sent(metadata) + begin + merge_metadata_and_send_if_not_already_sent(metadata) + rescue GRPC::Core::CallError => e + batch_result = @call.run_batch(RECV_STATUS_ON_CLIENT => nil) + set_input_stream_done + set_output_stream_done + attach_status_results_and_complete_call(batch_result) + raise e + rescue => e + set_input_stream_done + set_output_stream_done + raise e + end + bd = BidiCall.new(@call, @marshal, @unmarshal, diff --git a/src/ruby/spec/generic/client_stub_spec.rb b/src/ruby/spec/generic/client_stub_spec.rb index 26cb970a1fa..1f22809ea66 100644 --- a/src/ruby/spec/generic/client_stub_spec.rb +++ b/src/ruby/spec/generic/client_stub_spec.rb @@ -590,8 +590,22 @@ describe 'ClientStub' do th.join end - # TODO: add test for metadata-related ArgumentError in a bidi call once - # issue mentioned in https://github.com/grpc/grpc/issues/10526 is fixed + it 'should raise ArgumentError if metadata contains invalid values' do + @metadata.merge!(k3: 3) + stub = GRPC::ClientStub.new(@host, :this_channel_is_insecure) + expect do + get_responses(stub).collect { |r| r } + end.to raise_error(ArgumentError, + /Header values must be of type string or array/) + end + + it 'terminates if the call fails to start' do + # don't start the server + stub = GRPC::ClientStub.new(@host, :this_channel_is_insecure) + expect do + get_responses(stub, deadline: from_relative_time(0)).collect { |r| r } + end.to raise_error(GRPC::BadStatus) + end it 'should send metadata to the server ok' do th = run_bidi_streamer_echo_ping_pong(@sent_msgs, @pass, true, @@ -604,9 +618,9 @@ describe 'ClientStub' do end describe 'without a call operation' do - def get_responses(stub) + def get_responses(stub, deadline: nil) e = stub.bidi_streamer(@method, @sent_msgs, noop, noop, - metadata: @metadata) + metadata: @metadata, deadline: deadline) expect(e).to be_a(Enumerator) e end @@ -618,10 +632,10 @@ describe 'ClientStub' do after(:each) do @op.wait # make sure wait doesn't hang end - def get_responses(stub, run_start_call_first: false) + def get_responses(stub, run_start_call_first: false, deadline: nil) @op = stub.bidi_streamer(@method, @sent_msgs, noop, noop, return_op: true, - metadata: @metadata) + metadata: @metadata, deadline: deadline) expect(@op).to be_a(GRPC::ActiveCall::Operation) @op.start_call if run_start_call_first e = @op.execute From 6a7935e14e6500d94e52b4dd5b049fa236eba7e0 Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Thu, 27 Jul 2017 19:24:52 -0700 Subject: [PATCH 48/80] Watch the LB channel using the right initial conn. state --- .../client_channel/lb_policy/grpclb/grpclb.c | 3 ++- test/cpp/end2end/grpclb_end2end_test.cc | 15 ++++++++------- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.c b/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.c index f248a873ba9..3d76aaac023 100644 --- a/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.c +++ b/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.c @@ -1772,7 +1772,8 @@ static void glb_update_locked(grpc_exec_ctx *exec_ctx, grpc_lb_policy *policy, if (!glb_policy->watching_lb_channel) { // Watch the LB channel connectivity for connection. - glb_policy->lb_channel_connectivity = GRPC_CHANNEL_INIT; + glb_policy->lb_channel_connectivity = grpc_channel_check_connectivity_state( + glb_policy->lb_channel, true /* try to connect */); grpc_channel_element *client_channel_elem = grpc_channel_stack_last_element( grpc_channel_get_channel_stack(glb_policy->lb_channel)); GPR_ASSERT(client_channel_elem->filter == &grpc_client_channel_filter); diff --git a/test/cpp/end2end/grpclb_end2end_test.cc b/test/cpp/end2end/grpclb_end2end_test.cc index e403ee66fc8..66f47ce5898 100644 --- a/test/cpp/end2end/grpclb_end2end_test.cc +++ b/test/cpp/end2end/grpclb_end2end_test.cc @@ -172,11 +172,12 @@ class BalancerServiceImpl : public BalancerService { shutdown_(false) {} Status BalanceLoad(ServerContext* context, Stream* stream) override { - gpr_log(GPR_INFO, "LB: BalanceLoad"); + gpr_log(GPR_INFO, "LB[%p]: BalanceLoad", this); LoadBalanceRequest request; stream->Read(&request); IncreaseRequestCount(); - gpr_log(GPR_INFO, "LB: recv msg '%s'", request.DebugString().c_str()); + gpr_log(GPR_INFO, "LB[%p]: recv msg '%s'", this, + request.DebugString().c_str()); if (client_load_reporting_interval_seconds_ > 0) { LoadBalanceResponse initial_response; @@ -207,7 +208,7 @@ class BalancerServiceImpl : public BalancerService { if (client_load_reporting_interval_seconds_ > 0) { request.Clear(); stream->Read(&request); - gpr_log(GPR_INFO, "LB: recv client load report msg: '%s'", + gpr_log(GPR_INFO, "LB[%p]: recv client load report msg: '%s'", this, request.DebugString().c_str()); GPR_ASSERT(request.has_client_stats()); // We need to acquire the lock here in order to prevent the notify_one @@ -231,7 +232,7 @@ class BalancerServiceImpl : public BalancerService { load_report_cond_.notify_one(); } done: - gpr_log(GPR_INFO, "LB: done"); + gpr_log(GPR_INFO, "LB[%p]: done", this); return Status::OK; } @@ -246,7 +247,7 @@ class BalancerServiceImpl : public BalancerService { std::unique_lock lock(mu_); const bool prev = !shutdown_; shutdown_ = true; - gpr_log(GPR_INFO, "LB: shut down"); + gpr_log(GPR_INFO, "LB[%p]: shut down", this); return prev; } @@ -283,13 +284,13 @@ class BalancerServiceImpl : public BalancerService { private: void SendResponse(Stream* stream, const LoadBalanceResponse& response, int delay_ms) { - gpr_log(GPR_INFO, "LB: sleeping for %d ms...", delay_ms); + gpr_log(GPR_INFO, "LB[%p]: sleeping for %d ms...", this, delay_ms); if (delay_ms > 0) { gpr_sleep_until( gpr_time_add(gpr_now(GPR_CLOCK_REALTIME), gpr_time_from_millis(delay_ms, GPR_TIMESPAN))); } - gpr_log(GPR_INFO, "LB: Woke up! Sending response '%s'", + gpr_log(GPR_INFO, "LB[%p]: Woke up! Sending response '%s'", this, response.DebugString().c_str()); IncreaseResponseCount(); stream->Write(response); From 0133cc6fd8c549151498291e7796b9719502c8c5 Mon Sep 17 00:00:00 2001 From: ncteisen Date: Thu, 27 Jul 2017 16:24:15 -0700 Subject: [PATCH 49/80] Avoid benchmarking allocs --- test/cpp/qps/server.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/test/cpp/qps/server.h b/test/cpp/qps/server.h index c0dac96d8b8..df27a4368ea 100644 --- a/test/cpp/qps/server.h +++ b/test/cpp/qps/server.h @@ -80,8 +80,11 @@ class Server { return false; } payload->set_type(type); - std::unique_ptr body(new char[size]()); - payload->set_body(body.get(), size); + // Don't waste time creating a new payload of identical size. + if (payload->body().length() != (size_t)size) { + std::unique_ptr body(new char[size]()); + payload->set_body(body.get(), size); + } return true; } From fc950fbeb52ca472f1bb8dab25011b1e794c8a23 Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Thu, 27 Jul 2017 19:41:12 -0700 Subject: [PATCH 50/80] Fix bug in handling of RR connectivity transition to SHUTDOWN --- .../client_channel/lb_policy/grpclb/grpclb.c | 49 ++++++------- .../lb_policy/round_robin/round_robin.c | 6 ++ test/cpp/end2end/grpclb_end2end_test.cc | 70 ++++++++++++++++++- 3 files changed, 98 insertions(+), 27 deletions(-) diff --git a/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.c b/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.c index f248a873ba9..aadba3fe99d 100644 --- a/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.c +++ b/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.c @@ -710,7 +710,6 @@ static void create_rr_locked(grpc_exec_ctx *exec_ctx, glb_lb_policy *glb_policy, return; } glb_policy->rr_policy = new_rr_policy; - grpc_error *rr_state_error = NULL; const grpc_connectivity_state rr_state = grpc_lb_policy_check_connectivity_locked(exec_ctx, glb_policy->rr_policy, @@ -736,7 +735,7 @@ static void create_rr_locked(grpc_exec_ctx *exec_ctx, glb_lb_policy *glb_policy, rr_connectivity->state = rr_state; /* Subscribe to changes to the connectivity of the new RR */ - GRPC_LB_POLICY_WEAK_REF(&glb_policy->base, "rr_connectivity_sched"); + GRPC_LB_POLICY_WEAK_REF(&glb_policy->base, "glb_rr_connectivity_cb"); grpc_lb_policy_notify_on_state_change_locked(exec_ctx, glb_policy->rr_policy, &rr_connectivity->state, &rr_connectivity->on_change); @@ -801,32 +800,31 @@ static void glb_rr_connectivity_changed_locked(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { rr_connectivity_data *rr_connectivity = arg; glb_lb_policy *glb_policy = rr_connectivity->glb_policy; - - const bool shutting_down = glb_policy->shutting_down; - bool unref_needed = false; - GRPC_ERROR_REF(error); - - if (rr_connectivity->state == GRPC_CHANNEL_SHUTDOWN || shutting_down) { - /* RR policy shutting down. Don't renew subscription and free the arg of - * this callback. In addition we need to stash away the current policy to - * be UNREF'd after releasing the lock. Otherwise, if the UNREF is the last - * one, the policy would be destroyed, alongside the lock, which would - * result in a use-after-free */ - unref_needed = true; + if (glb_policy->shutting_down) { + GRPC_LB_POLICY_WEAK_UNREF(exec_ctx, &glb_policy->base, + "glb_rr_connectivity_cb"); gpr_free(rr_connectivity); - } else { /* rr state != SHUTDOWN && !shutting down: biz as usual */ - update_lb_connectivity_status_locked( - exec_ctx, glb_policy, rr_connectivity->state, GRPC_ERROR_REF(error)); - /* Resubscribe. Reuse the "rr_connectivity_cb" weak ref. */ - grpc_lb_policy_notify_on_state_change_locked( - exec_ctx, glb_policy->rr_policy, &rr_connectivity->state, - &rr_connectivity->on_change); + return; } - if (unref_needed) { + if (rr_connectivity->state == GRPC_CHANNEL_SHUTDOWN) { + /* An RR policy that has transitioned into the SHUTDOWN connectivity state + * should not be considered for picks or updates: the SHUTDOWN state is a + * sink, policies can't transition back from it. .*/ + GRPC_LB_POLICY_UNREF(exec_ctx, glb_policy->rr_policy, + "rr_connectivity_shutdown"); + glb_policy->rr_policy = NULL; GRPC_LB_POLICY_WEAK_UNREF(exec_ctx, &glb_policy->base, - "rr_connectivity_cb"); + "glb_rr_connectivity_cb"); + gpr_free(rr_connectivity); + return; } - GRPC_ERROR_UNREF(error); + /* rr state != SHUTDOWN && !glb_policy->shutting down: biz as usual */ + update_lb_connectivity_status_locked( + exec_ctx, glb_policy, rr_connectivity->state, GRPC_ERROR_REF(error)); + /* Resubscribe. Reuse the "glb_rr_connectivity_cb" weak ref. */ + grpc_lb_policy_notify_on_state_change_locked(exec_ctx, glb_policy->rr_policy, + &rr_connectivity->state, + &rr_connectivity->on_change); } static void destroy_balancer_name(grpc_exec_ctx *exec_ctx, @@ -990,7 +988,6 @@ static grpc_lb_policy *glb_create(grpc_exec_ctx *exec_ctx, gpr_free(glb_policy); return NULL; } - GRPC_CLOSURE_INIT(&glb_policy->lb_channel_on_connectivity_changed, glb_lb_channel_on_connectivity_changed_cb, glb_policy, grpc_combiner_scheduler(args->combiner)); @@ -1047,7 +1044,7 @@ static void glb_shutdown_locked(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol) { glb_policy->pending_picks = NULL; pending_ping *pping = glb_policy->pending_pings; glb_policy->pending_pings = NULL; - if (glb_policy->rr_policy) { + if (glb_policy->rr_policy != NULL) { GRPC_LB_POLICY_UNREF(exec_ctx, glb_policy->rr_policy, "glb_shutdown"); } // We destroy the LB channel here because diff --git a/src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.c b/src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.c index bc40165cfb8..a7f7e9542c8 100644 --- a/src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.c +++ b/src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.c @@ -74,6 +74,9 @@ typedef struct round_robin_lb_policy { bool started_picking; /** are we shutting down? */ bool shutdown; + /** has the policy gotten into the GRPC_CHANNEL_SHUTDOWN? No picks can be + * service after this point, the policy will never transition out. */ + bool in_connectivity_shutdown; /** List of picks that are waiting on connectivity */ pending_pick *pending_picks; @@ -420,6 +423,8 @@ static int rr_pick_locked(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol, grpc_call_context_element *context, void **user_data, grpc_closure *on_complete) { round_robin_lb_policy *p = (round_robin_lb_policy *)pol; + GPR_ASSERT(!p->shutdown); + GPR_ASSERT(!p->in_connectivity_shutdown); if (GRPC_TRACER_ON(grpc_lb_round_robin_trace)) { gpr_log(GPR_INFO, "[RR %p] Trying to pick", (void *)pol); } @@ -532,6 +537,7 @@ static grpc_connectivity_state update_lb_connectivity_status_locked( grpc_connectivity_state_set(exec_ctx, &p->state_tracker, GRPC_CHANNEL_SHUTDOWN, GRPC_ERROR_REF(error), "rr_shutdown"); + p->in_connectivity_shutdown = true; new_state = GRPC_CHANNEL_SHUTDOWN; } else if (subchannel_list->num_transient_failures == p->subchannel_list->num_subchannels) { /* 4) TRANSIENT_FAILURE */ diff --git a/test/cpp/end2end/grpclb_end2end_test.cc b/test/cpp/end2end/grpclb_end2end_test.cc index e403ee66fc8..2f3acb6ee10 100644 --- a/test/cpp/end2end/grpclb_end2end_test.cc +++ b/test/cpp/end2end/grpclb_end2end_test.cc @@ -132,6 +132,19 @@ class BackendServiceImpl : public BackendService { IncreaseResponseCount(); return status; } + + // Returns true on its first invocation, false otherwise. + bool Shutdown() { + std::unique_lock lock(mu_); + const bool prev = !shutdown_; + shutdown_ = true; + gpr_log(GPR_INFO, "Backend: shut down"); + return prev; + } + + private: + std::mutex mu_; + bool shutdown_ = false; }; grpc::string Ip4ToPackedString(const char* ip_str) { @@ -339,7 +352,7 @@ class GrpclbEnd2endTest : public ::testing::Test { void TearDown() override { for (size_t i = 0; i < backends_.size(); ++i) { - backend_servers_[i].Shutdown(); + if (backends_[i]->Shutdown()) backend_servers_[i].Shutdown(); } for (size_t i = 0; i < balancers_.size(); ++i) { if (balancers_[i]->Shutdown()) balancer_servers_[i].Shutdown(); @@ -637,6 +650,61 @@ TEST_F(SingleBalancerTest, RepeatedServerlist) { EXPECT_EQ("grpclb", channel_->GetLoadBalancingPolicyName()); } +TEST_F(SingleBalancerTest, BackendsRestart) { + const size_t kNumRpcsPerAddress = 100; + ScheduleResponseForBalancer( + 0, BalancerServiceImpl::BuildResponseForBackends(GetBackendPorts(), {}), + 0); + // Make sure that trying to connect works without a call. + channel_->GetState(true /* try_to_connect */); + // Send 100 RPCs per server. + auto statuses_and_responses = + SendRpc(kMessage_, kNumRpcsPerAddress * num_backends_); + for (const auto& status_and_response : statuses_and_responses) { + const Status& status = status_and_response.first; + const EchoResponse& response = status_and_response.second; + EXPECT_TRUE(status.ok()) << "code=" << status.error_code() + << " message=" << status.error_message(); + EXPECT_EQ(response.message(), kMessage_); + } + // Each backend should have gotten 100 requests. + for (size_t i = 0; i < backends_.size(); ++i) { + EXPECT_EQ(kNumRpcsPerAddress, + backend_servers_[i].service_->request_count()); + } + balancers_[0]->NotifyDoneWithServerlists(); + // The balancer got a single request. + EXPECT_EQ(1U, balancer_servers_[0].service_->request_count()); + // and sent a single response. + EXPECT_EQ(1U, balancer_servers_[0].service_->response_count()); + for (size_t i = 0; i < backends_.size(); ++i) { + if (backends_[i]->Shutdown()) backend_servers_[i].Shutdown(); + } + statuses_and_responses = SendRpc(kMessage_, 1); + for (const auto& status_and_response : statuses_and_responses) { + const Status& status = status_and_response.first; + EXPECT_FALSE(status.ok()); + } + for (size_t i = 0; i < num_backends_; ++i) { + backends_.emplace_back(new BackendServiceImpl()); + backend_servers_.emplace_back(ServerThread( + "backend", server_host_, backends_.back().get())); + } + // The following RPC will fail due to the backend ports having changed. It + // will nonetheless exercise the grpclb-roundrobin handling of the RR policy + // having gone into shutdown. + // TODO(dgq): implement the "backend restart" component as well. We need extra + // machinery to either update the LB responses "on the fly" or instruct + // backends which ports to restart on. + statuses_and_responses = SendRpc(kMessage_, 1); + for (const auto& status_and_response : statuses_and_responses) { + const Status& status = status_and_response.first; + EXPECT_FALSE(status.ok()); + } + // Check LB policy name for the channel. + EXPECT_EQ("grpclb", channel_->GetLoadBalancingPolicyName()); +} + class UpdatesTest : public GrpclbEnd2endTest { public: UpdatesTest() : GrpclbEnd2endTest(4, 3, 0) {} From f0cf6e2b6c394150d250eaf698989e6692da45b2 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Thu, 27 Jul 2017 13:32:56 +0200 Subject: [PATCH 51/80] fix fetching of GCE default credentials on kokoro windows --- .../internal_ci/helper_scripts/prepare_build_windows.bat | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tools/internal_ci/helper_scripts/prepare_build_windows.bat b/tools/internal_ci/helper_scripts/prepare_build_windows.bat index 643eb380e87..95fd6a3e8e3 100644 --- a/tools/internal_ci/helper_scripts/prepare_build_windows.bat +++ b/tools/internal_ci/helper_scripts/prepare_build_windows.bat @@ -18,6 +18,14 @@ set PATH=C:\tools\msys64\usr\bin;C:\Python27;%PATH% bash tools/internal_ci/helper_scripts/gen_report_index.sh +@rem Add GCE DNS server and disable IPv6 to: +@rem 1. allow resolving metadata.google.internal hostname +@rem 2. make fetching default GCE credential by oauth2client work +netsh interface ipv4 add dnsservers "Local Area Connection 8" 10.240.0.1 index=1 +netsh interface teredo set state disabled +netsh interface 6to4 set state disabled +netsh interface isatap set state disabled + @rem Needed for big_query_utils python -m pip install google-api-python-client From a8381dee2c45e51a5a1f295a77cdfaafea80ec69 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Thu, 27 Jul 2017 17:37:46 +0200 Subject: [PATCH 52/80] add back --bq_result_table aggregate_results --- tools/internal_ci/windows/grpc_basictests.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/internal_ci/windows/grpc_basictests.cfg b/tools/internal_ci/windows/grpc_basictests.cfg index a116738651f..396d29ef093 100644 --- a/tools/internal_ci/windows/grpc_basictests.cfg +++ b/tools/internal_ci/windows/grpc_basictests.cfg @@ -26,5 +26,5 @@ action { env_vars { key: "RUN_TESTS_FLAGS" - value: "-f basictests windows -j 1 --inner_jobs 8 --internal_ci" + value: "-f basictests windows -j 1 --inner_jobs 8 --internal_ci --bq_result_table aggregate_results" } From b74b94cdac6139120aa708f704f67f8fdc705a31 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Fri, 28 Jul 2017 09:47:32 +0200 Subject: [PATCH 53/80] better way to enable fetching GCE default credentials --- .../internal_ci/helper_scripts/prepare_build_windows.bat | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/tools/internal_ci/helper_scripts/prepare_build_windows.bat b/tools/internal_ci/helper_scripts/prepare_build_windows.bat index 95fd6a3e8e3..69e087e1db1 100644 --- a/tools/internal_ci/helper_scripts/prepare_build_windows.bat +++ b/tools/internal_ci/helper_scripts/prepare_build_windows.bat @@ -18,13 +18,12 @@ set PATH=C:\tools\msys64\usr\bin;C:\Python27;%PATH% bash tools/internal_ci/helper_scripts/gen_report_index.sh -@rem Add GCE DNS server and disable IPv6 to: +@rem Update DNS settings to: @rem 1. allow resolving metadata.google.internal hostname @rem 2. make fetching default GCE credential by oauth2client work -netsh interface ipv4 add dnsservers "Local Area Connection 8" 10.240.0.1 index=1 -netsh interface teredo set state disabled -netsh interface 6to4 set state disabled -netsh interface isatap set state disabled +netsh interface ip set dns "Local Area Connection 8" static 169.254.169.254 primary +netsh interface ip add dnsservers "Local Area Connection 8" 8.8.8.8 index=2 +netsh interface ip add dnsservers "Local Area Connection 8" 8.8.4.4 index=3 @rem Needed for big_query_utils python -m pip install google-api-python-client From 0eaf7debd2915f947ae50367b1768cfad44205dc Mon Sep 17 00:00:00 2001 From: yang-g Date: Wed, 5 Jul 2017 16:50:51 -0700 Subject: [PATCH 54/80] Allow adding events to cq after shutdown is called. --- include/grpc/impl/codegen/grpc_types.h | 4 +- .../client_channel/channel_connectivity.c | 2 +- src/core/lib/surface/alarm.c | 3 +- src/core/lib/surface/call.c | 6 ++- src/core/lib/surface/channel_ping.c | 2 +- src/core/lib/surface/completion_queue.c | 11 ++++- src/core/lib/surface/completion_queue.h | 5 +- src/core/lib/surface/server.c | 14 ++++-- src/cpp/server/server_cc.cc | 49 ++++++++++--------- test/core/end2end/fuzzers/server_fuzzer.c | 5 +- test/core/fling/server.c | 6 ++- test/core/surface/completion_queue_test.c | 6 +-- .../surface/completion_queue_threading_test.c | 4 +- test/cpp/microbenchmarks/bm_cq.cc | 7 +-- .../microbenchmarks/bm_cq_multiple_threads.cc | 2 +- 15 files changed, 79 insertions(+), 47 deletions(-) diff --git a/include/grpc/impl/codegen/grpc_types.h b/include/grpc/impl/codegen/grpc_types.h index f1c457c0274..bb3c90e303e 100644 --- a/include/grpc/impl/codegen/grpc_types.h +++ b/include/grpc/impl/codegen/grpc_types.h @@ -333,7 +333,9 @@ typedef enum grpc_call_error { /** this batch of operations leads to more operations than allowed */ GRPC_CALL_ERROR_BATCH_TOO_BIG, /** payload type requested is not the type registered */ - GRPC_CALL_ERROR_PAYLOAD_TYPE_MISMATCH + GRPC_CALL_ERROR_PAYLOAD_TYPE_MISMATCH, + /** completion queue has been shutdown */ + GRPC_CALL_ERROR_COMPLETION_QUEUE_SHUTDOWN } grpc_call_error; /** Default send/receive message size limits in bytes. -1 for unlimited. */ diff --git a/src/core/ext/filters/client_channel/channel_connectivity.c b/src/core/ext/filters/client_channel/channel_connectivity.c index c3dca14305d..e30dcc18f4f 100644 --- a/src/core/ext/filters/client_channel/channel_connectivity.c +++ b/src/core/ext/filters/client_channel/channel_connectivity.c @@ -208,7 +208,7 @@ void grpc_channel_watch_connectivity_state( 7, (channel, (int)last_observed_state, deadline.tv_sec, deadline.tv_nsec, (int)deadline.clock_type, cq, tag)); - grpc_cq_begin_op(cq, tag); + GPR_ASSERT(grpc_cq_begin_op(cq, tag) == 0); gpr_mu_init(&w->mu); GRPC_CLOSURE_INIT(&w->on_complete, watch_complete, w, diff --git a/src/core/lib/surface/alarm.c b/src/core/lib/surface/alarm.c index ef8405cca84..632cd6e239d 100644 --- a/src/core/lib/surface/alarm.c +++ b/src/core/lib/surface/alarm.c @@ -18,6 +18,7 @@ #include #include +#include #include "src/core/lib/iomgr/timer.h" #include "src/core/lib/surface/completion_queue.h" @@ -49,7 +50,7 @@ grpc_alarm *grpc_alarm_create(grpc_completion_queue *cq, gpr_timespec deadline, alarm->cq = cq; alarm->tag = tag; - grpc_cq_begin_op(cq, tag); + GPR_ASSERT(grpc_cq_begin_op(cq, tag) == 0); GRPC_CLOSURE_INIT(&alarm->on_alarm, alarm_cb, alarm, grpc_schedule_on_exec_ctx); grpc_timer_init(&exec_ctx, &alarm->alarm, diff --git a/src/core/lib/surface/call.c b/src/core/lib/surface/call.c index 2365d27307c..a173fadc43c 100644 --- a/src/core/lib/surface/call.c +++ b/src/core/lib/surface/call.c @@ -1422,7 +1422,7 @@ static grpc_call_error call_start_batch(grpc_exec_ctx *exec_ctx, if (nops == 0) { if (!is_notify_tag_closure) { - grpc_cq_begin_op(call->cq, notify_tag); + GPR_ASSERT(grpc_cq_begin_op(call->cq, notify_tag) == 0); grpc_cq_end_op(exec_ctx, call->cq, notify_tag, GRPC_ERROR_NONE, free_no_op_completion, NULL, gpr_malloc(sizeof(grpc_cq_completion))); @@ -1723,7 +1723,7 @@ static grpc_call_error call_start_batch(grpc_exec_ctx *exec_ctx, GRPC_CALL_INTERNAL_REF(call, "completion"); if (!is_notify_tag_closure) { - grpc_cq_begin_op(call->cq, notify_tag); + GPR_ASSERT(grpc_cq_begin_op(call->cq, notify_tag) == 0); } gpr_ref_init(&bctl->steps_to_complete, num_completion_callbacks_needed); @@ -1844,6 +1844,8 @@ const char *grpc_call_error_to_string(grpc_call_error error) { return "GRPC_CALL_ERROR_PAYLOAD_TYPE_MISMATCH"; case GRPC_CALL_ERROR_TOO_MANY_OPERATIONS: return "GRPC_CALL_ERROR_TOO_MANY_OPERATIONS"; + case GRPC_CALL_ERROR_COMPLETION_QUEUE_SHUTDOWN: + return "GRPC_CALL_ERROR_COMPLETION_QUEUE_SHUTDOWN"; case GRPC_CALL_OK: return "GRPC_CALL_OK"; } diff --git a/src/core/lib/surface/channel_ping.c b/src/core/lib/surface/channel_ping.c index 80eb80af788..8b1150b8b4a 100644 --- a/src/core/lib/surface/channel_ping.c +++ b/src/core/lib/surface/channel_ping.c @@ -59,7 +59,7 @@ void grpc_channel_ping(grpc_channel *channel, grpc_completion_queue *cq, GRPC_CLOSURE_INIT(&pr->closure, ping_done, pr, grpc_schedule_on_exec_ctx); op->send_ping = &pr->closure; op->bind_pollset = grpc_cq_pollset(cq); - grpc_cq_begin_op(cq, tag); + GPR_ASSERT(grpc_cq_begin_op(cq, tag) == 0); top_elem->filter->start_transport_op(&exec_ctx, top_elem, op); grpc_exec_ctx_finish(&exec_ctx); } diff --git a/src/core/lib/surface/completion_queue.c b/src/core/lib/surface/completion_queue.c index 3851993c924..ef1dfb1eb0f 100644 --- a/src/core/lib/surface/completion_queue.c +++ b/src/core/lib/surface/completion_queue.c @@ -525,7 +525,16 @@ void grpc_cq_internal_unref(grpc_exec_ctx *exec_ctx, static void cq_begin_op_for_next(grpc_completion_queue *cq, void *tag) { cq_next_data *cqd = DATA_FROM_CQ(cq); GPR_ASSERT(!cqd->shutdown_called); - gpr_atm_no_barrier_fetch_add(&cqd->pending_events, 1); + while (true) { + gpr_atm count = gpr_atm_no_barrier_load(&cqd->pending_events.count); + if (count == 0) { + return 1; + } else if (gpr_atm_no_barrier_cas(&cqd->pending_events.count, count, + count + 1)) { + break; + } + } + return 0; } static void cq_begin_op_for_pluck(grpc_completion_queue *cq, void *tag) { diff --git a/src/core/lib/surface/completion_queue.h b/src/core/lib/surface/completion_queue.h index af444825136..7f3d39824e4 100644 --- a/src/core/lib/surface/completion_queue.h +++ b/src/core/lib/surface/completion_queue.h @@ -72,8 +72,9 @@ void grpc_cq_internal_unref(grpc_exec_ctx *exec_ctx, grpc_completion_queue *cc); /* Flag that an operation is beginning: the completion channel will not finish shutdown until a corrensponding grpc_cq_end_* call is made. - \a tag is currently used only in debug builds. */ -void grpc_cq_begin_op(grpc_completion_queue *cc, void *tag); + \a tag is currently used only in debug builds. Return 0 on success and 1 if + completion_queue has been shutdown. */ +int grpc_cq_begin_op(grpc_completion_queue *cc, void *tag); /* Queue a GRPC_OP_COMPLETED operation; tag must correspond to the tag passed to grpc_cq_begin_op */ diff --git a/src/core/lib/surface/server.c b/src/core/lib/surface/server.c index fce7f8dca11..957593a1e2f 100644 --- a/src/core/lib/surface/server.c +++ b/src/core/lib/surface/server.c @@ -1259,7 +1259,7 @@ void grpc_server_shutdown_and_notify(grpc_server *server, } /* stay locked, and gather up some stuff to do */ - grpc_cq_begin_op(cq, tag); + GPR_ASSERT(grpc_cq_begin_op(cq, tag) == 0); if (server->shutdown_published) { grpc_cq_end_op(&exec_ctx, cq, tag, GRPC_ERROR_NONE, done_published_shutdown, NULL, gpr_malloc(sizeof(grpc_cq_completion))); @@ -1446,7 +1446,11 @@ grpc_call_error grpc_server_request_call( error = GRPC_CALL_ERROR_NOT_SERVER_COMPLETION_QUEUE; goto done; } - grpc_cq_begin_op(cq_for_notification, tag); + if (grpc_cq_begin_op(cq_for_notification, tag)) { + gpr_free(rc); + error = GRPC_CALL_ERROR_COMPLETION_QUEUE_SHUTDOWN; + goto done; + } details->reserved = NULL; rc->cq_idx = cq_idx; rc->type = BATCH_CALL; @@ -1496,7 +1500,11 @@ grpc_call_error grpc_server_request_registered_call( error = GRPC_CALL_ERROR_PAYLOAD_TYPE_MISMATCH; goto done; } - grpc_cq_begin_op(cq_for_notification, tag); + if (grpc_cq_begin_op(cq_for_notification, tag)) { + gpr_free(rc); + error = GRPC_CALL_ERROR_COMPLETION_QUEUE_SHUTDOWN; + goto done; + } rc->cq_idx = cq_idx; rc->type = REGISTERED_CALL; rc->server = server; diff --git a/src/cpp/server/server_cc.cc b/src/cpp/server/server_cc.cc index 92bacbe0618..91d980494d2 100644 --- a/src/cpp/server/server_cc.cc +++ b/src/cpp/server/server_cc.cc @@ -151,19 +151,24 @@ class Server::SyncRequest final : public CompletionQueueTag { GPR_ASSERT(cq_ && !in_flight_); in_flight_ = true; if (tag_) { - GPR_ASSERT(GRPC_CALL_OK == - grpc_server_request_registered_call( - server, tag_, &call_, &deadline_, &request_metadata_, - has_request_payload_ ? &request_payload_ : nullptr, cq_, - notify_cq, this)); + if (grpc_server_request_registered_call( + server, tag_, &call_, &deadline_, &request_metadata_, + has_request_payload_ ? &request_payload_ : nullptr, cq_, + notify_cq, this) != GRPC_CALL_OK) { + TeardownRequest(); + return; + } } else { if (!call_details_) { call_details_ = new grpc_call_details; grpc_call_details_init(call_details_); } - GPR_ASSERT(GRPC_CALL_OK == grpc_server_request_call( - server, &call_, call_details_, - &request_metadata_, cq_, notify_cq, this)); + if (grpc_server_request_call(server, &call_, call_details_, + &request_metadata_, cq_, notify_cq, + this) != GRPC_CALL_OK) { + TeardownRequest(); + return; + } } } @@ -286,12 +291,10 @@ class Server::SyncRequestThreadManager : public ThreadManager { if (ok) { // Calldata takes ownership of the completion queue inside sync_req SyncRequest::CallData cd(server_, sync_req); - { - // Prepare for the next request - if (!IsShutdown()) { - sync_req->SetupRequest(); // Create new completion queue for sync_req - sync_req->Request(server_->c_server(), server_cq_->cq()); - } + // Prepare for the next request + if (!IsShutdown()) { + sync_req->SetupRequest(); // Create new completion queue for sync_req + sync_req->Request(server_->c_server(), server_cq_->cq()); } GPR_TIMER_SCOPE("cd.Run()", 0); @@ -316,8 +319,8 @@ class Server::SyncRequestThreadManager : public ThreadManager { } void Shutdown() override { - server_cq_->Shutdown(); ThreadManager::Shutdown(); + server_cq_->Shutdown(); } void Wait() override { @@ -652,10 +655,11 @@ ServerInterface::RegisteredAsyncRequest::RegisteredAsyncRequest( void ServerInterface::RegisteredAsyncRequest::IssueRequest( void* registered_method, grpc_byte_buffer** payload, ServerCompletionQueue* notification_cq) { - grpc_server_request_registered_call( - server_->server(), registered_method, &call_, &context_->deadline_, - context_->client_metadata_.arr(), payload, call_cq_->cq(), - notification_cq->cq(), this); + GPR_ASSERT(GRPC_CALL_OK == grpc_server_request_registered_call( + server_->server(), registered_method, &call_, + &context_->deadline_, + context_->client_metadata_.arr(), payload, + call_cq_->cq(), notification_cq->cq(), this)); } ServerInterface::GenericAsyncRequest::GenericAsyncRequest( @@ -667,9 +671,10 @@ ServerInterface::GenericAsyncRequest::GenericAsyncRequest( grpc_call_details_init(&call_details_); GPR_ASSERT(notification_cq); GPR_ASSERT(call_cq); - grpc_server_request_call(server->server(), &call_, &call_details_, - context->client_metadata_.arr(), call_cq->cq(), - notification_cq->cq(), this); + GPR_ASSERT(GRPC_CALL_OK == grpc_server_request_call( + server->server(), &call_, &call_details_, + context->client_metadata_.arr(), call_cq->cq(), + notification_cq->cq(), this)); } bool ServerInterface::GenericAsyncRequest::FinalizeResult(void** tag, diff --git a/test/core/end2end/fuzzers/server_fuzzer.c b/test/core/end2end/fuzzers/server_fuzzer.c index 3ddc1ae907d..ef4c0a4bfda 100644 --- a/test/core/end2end/fuzzers/server_fuzzer.c +++ b/test/core/end2end/fuzzers/server_fuzzer.c @@ -72,8 +72,9 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { grpc_metadata_array_init(&request_metadata1); int requested_calls = 0; - grpc_server_request_call(server, &call1, &call_details1, &request_metadata1, - cq, cq, tag(1)); + GPR_ASSERT(GRPC_CALL_OK == + grpc_server_request_call(server, &call1, &call_details1, + &request_metadata1, cq, cq, tag(1))); requested_calls++; grpc_event ev; diff --git a/test/core/fling/server.c b/test/core/fling/server.c index 0f0f22ffcf5..b3a7fa21ecc 100644 --- a/test/core/fling/server.c +++ b/test/core/fling/server.c @@ -77,8 +77,10 @@ typedef struct { static void request_call(void) { grpc_metadata_array_init(&request_metadata_recv); - grpc_server_request_call(server, &call, &call_details, &request_metadata_recv, - cq, cq, tag(FLING_SERVER_NEW_REQUEST)); + GPR_ASSERT(GRPC_CALL_OK == + grpc_server_request_call(server, &call, &call_details, + &request_metadata_recv, cq, cq, + tag(FLING_SERVER_NEW_REQUEST))); } static void handle_unary_method(void) { diff --git a/test/core/surface/completion_queue_test.c b/test/core/surface/completion_queue_test.c index f9d88d6327c..869ac96ed23 100644 --- a/test/core/surface/completion_queue_test.c +++ b/test/core/surface/completion_queue_test.c @@ -144,7 +144,7 @@ static void test_cq_end_op(void) { cc = grpc_completion_queue_create( grpc_completion_queue_factory_lookup(&attr), &attr, NULL); - grpc_cq_begin_op(cc, tag); + GPR_ASSERT(grpc_cq_begin_op(cc, tag) == 0); grpc_cq_end_op(&exec_ctx, cc, tag, GRPC_ERROR_NONE, do_nothing_end_completion, NULL, &completion); @@ -233,7 +233,7 @@ static void test_pluck(void) { grpc_completion_queue_factory_lookup(&attr), &attr, NULL); for (i = 0; i < GPR_ARRAY_SIZE(tags); i++) { - grpc_cq_begin_op(cc, tags[i]); + GPR_ASSERT(grpc_cq_begin_op(cc, tags[i]) == 0); grpc_cq_end_op(&exec_ctx, cc, tags[i], GRPC_ERROR_NONE, do_nothing_end_completion, NULL, &completions[i]); } @@ -245,7 +245,7 @@ static void test_pluck(void) { } for (i = 0; i < GPR_ARRAY_SIZE(tags); i++) { - grpc_cq_begin_op(cc, tags[i]); + GPR_ASSERT(grpc_cq_begin_op(cc, tags[i]) == 0); grpc_cq_end_op(&exec_ctx, cc, tags[i], GRPC_ERROR_NONE, do_nothing_end_completion, NULL, &completions[i]); } diff --git a/test/core/surface/completion_queue_threading_test.c b/test/core/surface/completion_queue_threading_test.c index 99d0fa49800..9120cbb24cc 100644 --- a/test/core/surface/completion_queue_threading_test.c +++ b/test/core/surface/completion_queue_threading_test.c @@ -107,7 +107,7 @@ static void test_too_many_plucks(void) { GPR_ASSERT(ev.type == GRPC_QUEUE_TIMEOUT); for (i = 0; i < GPR_ARRAY_SIZE(tags); i++) { - grpc_cq_begin_op(cc, tags[i]); + GPR_ASSERT(grpc_cq_begin_op(cc, tags[i]) == 0); grpc_cq_end_op(&exec_ctx, cc, tags[i], GRPC_ERROR_NONE, do_nothing_end_completion, NULL, &completions[i]); } @@ -153,7 +153,7 @@ static void producer_thread(void *arg) { gpr_log(GPR_INFO, "producer %d phase 1", opt->id); for (i = 0; i < TEST_THREAD_EVENTS; i++) { - grpc_cq_begin_op(opt->cc, (void *)(intptr_t)1); + GPR_ASSERT(grpc_cq_begin_op(opt->cc, (void *)(intptr_t)1) == 0); } gpr_log(GPR_INFO, "producer %d phase 1 done", opt->id); diff --git a/test/cpp/microbenchmarks/bm_cq.cc b/test/cpp/microbenchmarks/bm_cq.cc index 18308a2e168..104fe51f26f 100644 --- a/test/cpp/microbenchmarks/bm_cq.cc +++ b/test/cpp/microbenchmarks/bm_cq.cc @@ -23,6 +23,7 @@ #include #include #include +#include #include "test/cpp/microbenchmarks/helpers.h" extern "C" { @@ -82,7 +83,7 @@ static void BM_Pass1Cpp(benchmark::State& state) { grpc_cq_completion completion; DummyTag dummy_tag; grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_cq_begin_op(c_cq, &dummy_tag); + GPR_ASSERT(grpc_cq_begin_op(c_cq, &dummy_tag) == 0); grpc_cq_end_op(&exec_ctx, c_cq, &dummy_tag, GRPC_ERROR_NONE, DoneWithCompletionOnStack, NULL, &completion); grpc_exec_ctx_finish(&exec_ctx); @@ -102,7 +103,7 @@ static void BM_Pass1Core(benchmark::State& state) { while (state.KeepRunning()) { grpc_cq_completion completion; grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_cq_begin_op(cq, NULL); + GPR_ASSERT(grpc_cq_begin_op(cq, NULL) == 0); grpc_cq_end_op(&exec_ctx, cq, NULL, GRPC_ERROR_NONE, DoneWithCompletionOnStack, NULL, &completion); grpc_exec_ctx_finish(&exec_ctx); @@ -121,7 +122,7 @@ static void BM_Pluck1Core(benchmark::State& state) { while (state.KeepRunning()) { grpc_cq_completion completion; grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_cq_begin_op(cq, NULL); + GPR_ASSERT(grpc_cq_begin_op(cq, NULL) == 0); grpc_cq_end_op(&exec_ctx, cq, NULL, GRPC_ERROR_NONE, DoneWithCompletionOnStack, NULL, &completion); grpc_exec_ctx_finish(&exec_ctx); diff --git a/test/cpp/microbenchmarks/bm_cq_multiple_threads.cc b/test/cpp/microbenchmarks/bm_cq_multiple_threads.cc index f79db15a473..c1439ba5e7b 100644 --- a/test/cpp/microbenchmarks/bm_cq_multiple_threads.cc +++ b/test/cpp/microbenchmarks/bm_cq_multiple_threads.cc @@ -78,7 +78,7 @@ static grpc_error* pollset_work(grpc_exec_ctx* exec_ctx, grpc_pollset* ps, } gpr_mu_unlock(&ps->mu); - grpc_cq_begin_op(g_cq, g_tag); + GPR_ASSERT(grpc_cq_begin_op(g_cq, g_tag) == 0); grpc_cq_end_op(exec_ctx, g_cq, g_tag, GRPC_ERROR_NONE, cq_done_cb, NULL, (grpc_cq_completion*)gpr_malloc(sizeof(grpc_cq_completion))); grpc_exec_ctx_flush(exec_ctx); From 533fbd362f96c573343403e85508390d0f81a2c5 Mon Sep 17 00:00:00 2001 From: yang-g Date: Thu, 13 Jul 2017 11:39:44 -0700 Subject: [PATCH 55/80] Rebase with head and resolve conflicts --- src/core/lib/surface/completion_queue.c | 76 ++++++++++++------------- 1 file changed, 38 insertions(+), 38 deletions(-) diff --git a/src/core/lib/surface/completion_queue.c b/src/core/lib/surface/completion_queue.c index ef1dfb1eb0f..98234e036a4 100644 --- a/src/core/lib/surface/completion_queue.c +++ b/src/core/lib/surface/completion_queue.c @@ -196,7 +196,7 @@ typedef struct cq_vtable { void (*init)(void *data); void (*shutdown)(grpc_exec_ctx *exec_ctx, grpc_completion_queue *cq); void (*destroy)(void *data); - void (*begin_op)(grpc_completion_queue *cq, void *tag); + int (*begin_op)(grpc_completion_queue *cq, void *tag); void (*end_op)(grpc_exec_ctx *exec_ctx, grpc_completion_queue *cq, void *tag, grpc_error *error, void (*done)(grpc_exec_ctx *exec_ctx, void *done_arg, @@ -288,8 +288,8 @@ static void cq_shutdown_next(grpc_exec_ctx *exec_ctx, static void cq_shutdown_pluck(grpc_exec_ctx *exec_ctx, grpc_completion_queue *cq); -static void cq_begin_op_for_next(grpc_completion_queue *cq, void *tag); -static void cq_begin_op_for_pluck(grpc_completion_queue *cq, void *tag); +static int cq_begin_op_for_next(grpc_completion_queue *cq, void *tag); +static int cq_begin_op_for_pluck(grpc_completion_queue *cq, void *tag); static void cq_end_op_for_next(grpc_exec_ctx *exec_ctx, grpc_completion_queue *cq, void *tag, @@ -522,28 +522,55 @@ void grpc_cq_internal_unref(grpc_exec_ctx *exec_ctx, } } -static void cq_begin_op_for_next(grpc_completion_queue *cq, void *tag) { +#ifndef NDEBUG +static void cq_check_tag(grpc_completion_queue *cq, void *tag, bool lock_cq) { + int found = 0; + if (lock_cq) { + gpr_mu_lock(cq->mu); + } + + for (int i = 0; i < (int)cq->outstanding_tag_count; i++) { + if (cq->outstanding_tags[i] == tag) { + cq->outstanding_tag_count--; + GPR_SWAP(void *, cq->outstanding_tags[i], + cq->outstanding_tags[cq->outstanding_tag_count]); + found = 1; + break; + } + } + + if (lock_cq) { + gpr_mu_unlock(cq->mu); + } + + GPR_ASSERT(found); +} +#else +static void cq_check_tag(grpc_completion_queue *cq, void *tag, bool lock_cq) {} +#endif + +static int cq_begin_op_for_next(grpc_completion_queue *cq, void *tag) { cq_next_data *cqd = DATA_FROM_CQ(cq); - GPR_ASSERT(!cqd->shutdown_called); while (true) { - gpr_atm count = gpr_atm_no_barrier_load(&cqd->pending_events.count); + gpr_atm count = gpr_atm_no_barrier_load(&cqd->pending_events); if (count == 0) { + cq_check_tag(cq, tag, true); /* Used in debug builds only */ return 1; - } else if (gpr_atm_no_barrier_cas(&cqd->pending_events.count, count, - count + 1)) { + } else if (gpr_atm_no_barrier_cas(&cqd->pending_events, count, count + 1)) { break; } } return 0; } -static void cq_begin_op_for_pluck(grpc_completion_queue *cq, void *tag) { +static int cq_begin_op_for_pluck(grpc_completion_queue *cq, void *tag) { cq_pluck_data *cqd = DATA_FROM_CQ(cq); GPR_ASSERT(!cqd->shutdown_called); gpr_ref(&cqd->pending_events); + return 0; } -void grpc_cq_begin_op(grpc_completion_queue *cq, void *tag) { +int grpc_cq_begin_op(grpc_completion_queue *cq, void *tag) { #ifndef NDEBUG gpr_mu_lock(cq->mu); if (cq->outstanding_tag_count == cq->outstanding_tag_capacity) { @@ -555,35 +582,8 @@ void grpc_cq_begin_op(grpc_completion_queue *cq, void *tag) { cq->outstanding_tags[cq->outstanding_tag_count++] = tag; gpr_mu_unlock(cq->mu); #endif - cq->vtable->begin_op(cq, tag); -} - -#ifndef NDEBUG -static void cq_check_tag(grpc_completion_queue *cq, void *tag, bool lock_cq) { - int found = 0; - if (lock_cq) { - gpr_mu_lock(cq->mu); - } - - for (int i = 0; i < (int)cq->outstanding_tag_count; i++) { - if (cq->outstanding_tags[i] == tag) { - cq->outstanding_tag_count--; - GPR_SWAP(void *, cq->outstanding_tags[i], - cq->outstanding_tags[cq->outstanding_tag_count]); - found = 1; - break; - } - } - - if (lock_cq) { - gpr_mu_unlock(cq->mu); - } - - GPR_ASSERT(found); + return cq->vtable->begin_op(cq, tag); } -#else -static void cq_check_tag(grpc_completion_queue *cq, void *tag, bool lock_cq) {} -#endif /* Queue a GRPC_OP_COMPLETED operation to a completion queue (with a * completion From 7d6b914f9836f99c199706274c4602030e3526dc Mon Sep 17 00:00:00 2001 From: yang-g Date: Thu, 13 Jul 2017 11:48:56 -0700 Subject: [PATCH 56/80] Change return type to bool --- .../client_channel/channel_connectivity.c | 2 +- src/core/lib/surface/alarm.c | 2 +- src/core/lib/surface/call.c | 4 ++-- src/core/lib/surface/channel_ping.c | 2 +- src/core/lib/surface/completion_queue.c | 18 +++++++++--------- src/core/lib/surface/completion_queue.h | 6 +++--- src/core/lib/surface/server.c | 6 +++--- test/core/surface/completion_queue_test.c | 6 +++--- .../surface/completion_queue_threading_test.c | 4 ++-- test/cpp/microbenchmarks/bm_cq.cc | 6 +++--- .../microbenchmarks/bm_cq_multiple_threads.cc | 2 +- 11 files changed, 29 insertions(+), 29 deletions(-) diff --git a/src/core/ext/filters/client_channel/channel_connectivity.c b/src/core/ext/filters/client_channel/channel_connectivity.c index e30dcc18f4f..b83c95275f3 100644 --- a/src/core/ext/filters/client_channel/channel_connectivity.c +++ b/src/core/ext/filters/client_channel/channel_connectivity.c @@ -208,7 +208,7 @@ void grpc_channel_watch_connectivity_state( 7, (channel, (int)last_observed_state, deadline.tv_sec, deadline.tv_nsec, (int)deadline.clock_type, cq, tag)); - GPR_ASSERT(grpc_cq_begin_op(cq, tag) == 0); + GPR_ASSERT(grpc_cq_begin_op(cq, tag)); gpr_mu_init(&w->mu); GRPC_CLOSURE_INIT(&w->on_complete, watch_complete, w, diff --git a/src/core/lib/surface/alarm.c b/src/core/lib/surface/alarm.c index 632cd6e239d..55934964f3a 100644 --- a/src/core/lib/surface/alarm.c +++ b/src/core/lib/surface/alarm.c @@ -50,7 +50,7 @@ grpc_alarm *grpc_alarm_create(grpc_completion_queue *cq, gpr_timespec deadline, alarm->cq = cq; alarm->tag = tag; - GPR_ASSERT(grpc_cq_begin_op(cq, tag) == 0); + GPR_ASSERT(grpc_cq_begin_op(cq, tag)); GRPC_CLOSURE_INIT(&alarm->on_alarm, alarm_cb, alarm, grpc_schedule_on_exec_ctx); grpc_timer_init(&exec_ctx, &alarm->alarm, diff --git a/src/core/lib/surface/call.c b/src/core/lib/surface/call.c index a173fadc43c..04613f17e3b 100644 --- a/src/core/lib/surface/call.c +++ b/src/core/lib/surface/call.c @@ -1422,7 +1422,7 @@ static grpc_call_error call_start_batch(grpc_exec_ctx *exec_ctx, if (nops == 0) { if (!is_notify_tag_closure) { - GPR_ASSERT(grpc_cq_begin_op(call->cq, notify_tag) == 0); + GPR_ASSERT(grpc_cq_begin_op(call->cq, notify_tag)); grpc_cq_end_op(exec_ctx, call->cq, notify_tag, GRPC_ERROR_NONE, free_no_op_completion, NULL, gpr_malloc(sizeof(grpc_cq_completion))); @@ -1723,7 +1723,7 @@ static grpc_call_error call_start_batch(grpc_exec_ctx *exec_ctx, GRPC_CALL_INTERNAL_REF(call, "completion"); if (!is_notify_tag_closure) { - GPR_ASSERT(grpc_cq_begin_op(call->cq, notify_tag) == 0); + GPR_ASSERT(grpc_cq_begin_op(call->cq, notify_tag)); } gpr_ref_init(&bctl->steps_to_complete, num_completion_callbacks_needed); diff --git a/src/core/lib/surface/channel_ping.c b/src/core/lib/surface/channel_ping.c index 8b1150b8b4a..e85b308850b 100644 --- a/src/core/lib/surface/channel_ping.c +++ b/src/core/lib/surface/channel_ping.c @@ -59,7 +59,7 @@ void grpc_channel_ping(grpc_channel *channel, grpc_completion_queue *cq, GRPC_CLOSURE_INIT(&pr->closure, ping_done, pr, grpc_schedule_on_exec_ctx); op->send_ping = &pr->closure; op->bind_pollset = grpc_cq_pollset(cq); - GPR_ASSERT(grpc_cq_begin_op(cq, tag) == 0); + GPR_ASSERT(grpc_cq_begin_op(cq, tag)); top_elem->filter->start_transport_op(&exec_ctx, top_elem, op); grpc_exec_ctx_finish(&exec_ctx); } diff --git a/src/core/lib/surface/completion_queue.c b/src/core/lib/surface/completion_queue.c index 98234e036a4..237ea259437 100644 --- a/src/core/lib/surface/completion_queue.c +++ b/src/core/lib/surface/completion_queue.c @@ -196,7 +196,7 @@ typedef struct cq_vtable { void (*init)(void *data); void (*shutdown)(grpc_exec_ctx *exec_ctx, grpc_completion_queue *cq); void (*destroy)(void *data); - int (*begin_op)(grpc_completion_queue *cq, void *tag); + bool (*begin_op)(grpc_completion_queue *cq, void *tag); void (*end_op)(grpc_exec_ctx *exec_ctx, grpc_completion_queue *cq, void *tag, grpc_error *error, void (*done)(grpc_exec_ctx *exec_ctx, void *done_arg, @@ -288,8 +288,8 @@ static void cq_shutdown_next(grpc_exec_ctx *exec_ctx, static void cq_shutdown_pluck(grpc_exec_ctx *exec_ctx, grpc_completion_queue *cq); -static int cq_begin_op_for_next(grpc_completion_queue *cq, void *tag); -static int cq_begin_op_for_pluck(grpc_completion_queue *cq, void *tag); +static bool cq_begin_op_for_next(grpc_completion_queue *cq, void *tag); +static bool cq_begin_op_for_pluck(grpc_completion_queue *cq, void *tag); static void cq_end_op_for_next(grpc_exec_ctx *exec_ctx, grpc_completion_queue *cq, void *tag, @@ -549,28 +549,28 @@ static void cq_check_tag(grpc_completion_queue *cq, void *tag, bool lock_cq) { static void cq_check_tag(grpc_completion_queue *cq, void *tag, bool lock_cq) {} #endif -static int cq_begin_op_for_next(grpc_completion_queue *cq, void *tag) { +static bool cq_begin_op_for_next(grpc_completion_queue *cq, void *tag) { cq_next_data *cqd = DATA_FROM_CQ(cq); while (true) { gpr_atm count = gpr_atm_no_barrier_load(&cqd->pending_events); if (count == 0) { cq_check_tag(cq, tag, true); /* Used in debug builds only */ - return 1; + return false; } else if (gpr_atm_no_barrier_cas(&cqd->pending_events, count, count + 1)) { break; } } - return 0; + return true; } -static int cq_begin_op_for_pluck(grpc_completion_queue *cq, void *tag) { +static bool cq_begin_op_for_pluck(grpc_completion_queue *cq, void *tag) { cq_pluck_data *cqd = DATA_FROM_CQ(cq); GPR_ASSERT(!cqd->shutdown_called); gpr_ref(&cqd->pending_events); - return 0; + return true; } -int grpc_cq_begin_op(grpc_completion_queue *cq, void *tag) { +bool grpc_cq_begin_op(grpc_completion_queue *cq, void *tag) { #ifndef NDEBUG gpr_mu_lock(cq->mu); if (cq->outstanding_tag_count == cq->outstanding_tag_capacity) { diff --git a/src/core/lib/surface/completion_queue.h b/src/core/lib/surface/completion_queue.h index 7f3d39824e4..69d144bd95c 100644 --- a/src/core/lib/surface/completion_queue.h +++ b/src/core/lib/surface/completion_queue.h @@ -72,9 +72,9 @@ void grpc_cq_internal_unref(grpc_exec_ctx *exec_ctx, grpc_completion_queue *cc); /* Flag that an operation is beginning: the completion channel will not finish shutdown until a corrensponding grpc_cq_end_* call is made. - \a tag is currently used only in debug builds. Return 0 on success and 1 if - completion_queue has been shutdown. */ -int grpc_cq_begin_op(grpc_completion_queue *cc, void *tag); + \a tag is currently used only in debug builds. Return true on success, and + false if completion_queue has been shutdown. */ +bool grpc_cq_begin_op(grpc_completion_queue *cc, void *tag); /* Queue a GRPC_OP_COMPLETED operation; tag must correspond to the tag passed to grpc_cq_begin_op */ diff --git a/src/core/lib/surface/server.c b/src/core/lib/surface/server.c index 957593a1e2f..66dcc299aab 100644 --- a/src/core/lib/surface/server.c +++ b/src/core/lib/surface/server.c @@ -1259,7 +1259,7 @@ void grpc_server_shutdown_and_notify(grpc_server *server, } /* stay locked, and gather up some stuff to do */ - GPR_ASSERT(grpc_cq_begin_op(cq, tag) == 0); + GPR_ASSERT(grpc_cq_begin_op(cq, tag)); if (server->shutdown_published) { grpc_cq_end_op(&exec_ctx, cq, tag, GRPC_ERROR_NONE, done_published_shutdown, NULL, gpr_malloc(sizeof(grpc_cq_completion))); @@ -1446,7 +1446,7 @@ grpc_call_error grpc_server_request_call( error = GRPC_CALL_ERROR_NOT_SERVER_COMPLETION_QUEUE; goto done; } - if (grpc_cq_begin_op(cq_for_notification, tag)) { + if (grpc_cq_begin_op(cq_for_notification, tag) == false) { gpr_free(rc); error = GRPC_CALL_ERROR_COMPLETION_QUEUE_SHUTDOWN; goto done; @@ -1500,7 +1500,7 @@ grpc_call_error grpc_server_request_registered_call( error = GRPC_CALL_ERROR_PAYLOAD_TYPE_MISMATCH; goto done; } - if (grpc_cq_begin_op(cq_for_notification, tag)) { + if (grpc_cq_begin_op(cq_for_notification, tag) == false) { gpr_free(rc); error = GRPC_CALL_ERROR_COMPLETION_QUEUE_SHUTDOWN; goto done; diff --git a/test/core/surface/completion_queue_test.c b/test/core/surface/completion_queue_test.c index 869ac96ed23..e6372a379ca 100644 --- a/test/core/surface/completion_queue_test.c +++ b/test/core/surface/completion_queue_test.c @@ -144,7 +144,7 @@ static void test_cq_end_op(void) { cc = grpc_completion_queue_create( grpc_completion_queue_factory_lookup(&attr), &attr, NULL); - GPR_ASSERT(grpc_cq_begin_op(cc, tag) == 0); + GPR_ASSERT(grpc_cq_begin_op(cc, tag)); grpc_cq_end_op(&exec_ctx, cc, tag, GRPC_ERROR_NONE, do_nothing_end_completion, NULL, &completion); @@ -233,7 +233,7 @@ static void test_pluck(void) { grpc_completion_queue_factory_lookup(&attr), &attr, NULL); for (i = 0; i < GPR_ARRAY_SIZE(tags); i++) { - GPR_ASSERT(grpc_cq_begin_op(cc, tags[i]) == 0); + GPR_ASSERT(grpc_cq_begin_op(cc, tags[i])); grpc_cq_end_op(&exec_ctx, cc, tags[i], GRPC_ERROR_NONE, do_nothing_end_completion, NULL, &completions[i]); } @@ -245,7 +245,7 @@ static void test_pluck(void) { } for (i = 0; i < GPR_ARRAY_SIZE(tags); i++) { - GPR_ASSERT(grpc_cq_begin_op(cc, tags[i]) == 0); + GPR_ASSERT(grpc_cq_begin_op(cc, tags[i])); grpc_cq_end_op(&exec_ctx, cc, tags[i], GRPC_ERROR_NONE, do_nothing_end_completion, NULL, &completions[i]); } diff --git a/test/core/surface/completion_queue_threading_test.c b/test/core/surface/completion_queue_threading_test.c index 9120cbb24cc..9996b6b840a 100644 --- a/test/core/surface/completion_queue_threading_test.c +++ b/test/core/surface/completion_queue_threading_test.c @@ -107,7 +107,7 @@ static void test_too_many_plucks(void) { GPR_ASSERT(ev.type == GRPC_QUEUE_TIMEOUT); for (i = 0; i < GPR_ARRAY_SIZE(tags); i++) { - GPR_ASSERT(grpc_cq_begin_op(cc, tags[i]) == 0); + GPR_ASSERT(grpc_cq_begin_op(cc, tags[i])); grpc_cq_end_op(&exec_ctx, cc, tags[i], GRPC_ERROR_NONE, do_nothing_end_completion, NULL, &completions[i]); } @@ -153,7 +153,7 @@ static void producer_thread(void *arg) { gpr_log(GPR_INFO, "producer %d phase 1", opt->id); for (i = 0; i < TEST_THREAD_EVENTS; i++) { - GPR_ASSERT(grpc_cq_begin_op(opt->cc, (void *)(intptr_t)1) == 0); + GPR_ASSERT(grpc_cq_begin_op(opt->cc, (void *)(intptr_t)1)); } gpr_log(GPR_INFO, "producer %d phase 1 done", opt->id); diff --git a/test/cpp/microbenchmarks/bm_cq.cc b/test/cpp/microbenchmarks/bm_cq.cc index 104fe51f26f..a0c0414f2f5 100644 --- a/test/cpp/microbenchmarks/bm_cq.cc +++ b/test/cpp/microbenchmarks/bm_cq.cc @@ -83,7 +83,7 @@ static void BM_Pass1Cpp(benchmark::State& state) { grpc_cq_completion completion; DummyTag dummy_tag; grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - GPR_ASSERT(grpc_cq_begin_op(c_cq, &dummy_tag) == 0); + GPR_ASSERT(grpc_cq_begin_op(c_cq, &dummy_tag)); grpc_cq_end_op(&exec_ctx, c_cq, &dummy_tag, GRPC_ERROR_NONE, DoneWithCompletionOnStack, NULL, &completion); grpc_exec_ctx_finish(&exec_ctx); @@ -103,7 +103,7 @@ static void BM_Pass1Core(benchmark::State& state) { while (state.KeepRunning()) { grpc_cq_completion completion; grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - GPR_ASSERT(grpc_cq_begin_op(cq, NULL) == 0); + GPR_ASSERT(grpc_cq_begin_op(cq, NULL)); grpc_cq_end_op(&exec_ctx, cq, NULL, GRPC_ERROR_NONE, DoneWithCompletionOnStack, NULL, &completion); grpc_exec_ctx_finish(&exec_ctx); @@ -122,7 +122,7 @@ static void BM_Pluck1Core(benchmark::State& state) { while (state.KeepRunning()) { grpc_cq_completion completion; grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - GPR_ASSERT(grpc_cq_begin_op(cq, NULL) == 0); + GPR_ASSERT(grpc_cq_begin_op(cq, NULL)); grpc_cq_end_op(&exec_ctx, cq, NULL, GRPC_ERROR_NONE, DoneWithCompletionOnStack, NULL, &completion); grpc_exec_ctx_finish(&exec_ctx); diff --git a/test/cpp/microbenchmarks/bm_cq_multiple_threads.cc b/test/cpp/microbenchmarks/bm_cq_multiple_threads.cc index c1439ba5e7b..f109fe62519 100644 --- a/test/cpp/microbenchmarks/bm_cq_multiple_threads.cc +++ b/test/cpp/microbenchmarks/bm_cq_multiple_threads.cc @@ -78,7 +78,7 @@ static grpc_error* pollset_work(grpc_exec_ctx* exec_ctx, grpc_pollset* ps, } gpr_mu_unlock(&ps->mu); - GPR_ASSERT(grpc_cq_begin_op(g_cq, g_tag) == 0); + GPR_ASSERT(grpc_cq_begin_op(g_cq, g_tag)); grpc_cq_end_op(exec_ctx, g_cq, g_tag, GRPC_ERROR_NONE, cq_done_cb, NULL, (grpc_cq_completion*)gpr_malloc(sizeof(grpc_cq_completion))); grpc_exec_ctx_flush(exec_ctx); From 097cbfc94fc96f079d7be8d0dcbcb9b282484bbd Mon Sep 17 00:00:00 2001 From: yang-g Date: Fri, 28 Jul 2017 12:51:50 -0700 Subject: [PATCH 57/80] Resolve comments --- src/core/lib/surface/completion_queue.c | 1 - src/cpp/server/server_cc.cc | 5 +++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/core/lib/surface/completion_queue.c b/src/core/lib/surface/completion_queue.c index 237ea259437..3d82a32e82f 100644 --- a/src/core/lib/surface/completion_queue.c +++ b/src/core/lib/surface/completion_queue.c @@ -554,7 +554,6 @@ static bool cq_begin_op_for_next(grpc_completion_queue *cq, void *tag) { while (true) { gpr_atm count = gpr_atm_no_barrier_load(&cqd->pending_events); if (count == 0) { - cq_check_tag(cq, tag, true); /* Used in debug builds only */ return false; } else if (gpr_atm_no_barrier_cas(&cqd->pending_events, count, count + 1)) { break; diff --git a/src/cpp/server/server_cc.cc b/src/cpp/server/server_cc.cc index 91d980494d2..2483300cb13 100644 --- a/src/cpp/server/server_cc.cc +++ b/src/cpp/server/server_cc.cc @@ -151,10 +151,11 @@ class Server::SyncRequest final : public CompletionQueueTag { GPR_ASSERT(cq_ && !in_flight_); in_flight_ = true; if (tag_) { - if (grpc_server_request_registered_call( + if (GRPC_CALL_OK != + grpc_server_request_registered_call( server, tag_, &call_, &deadline_, &request_metadata_, has_request_payload_ ? &request_payload_ : nullptr, cq_, - notify_cq, this) != GRPC_CALL_OK) { + notify_cq, this)) { TeardownRequest(); return; } From 30352f67f14446c692610f2f7ef3b18ff70abae9 Mon Sep 17 00:00:00 2001 From: Yash Tibrewal Date: Fri, 28 Jul 2017 13:20:57 -0700 Subject: [PATCH 58/80] Remove line about username and password not being supported in http_proxy URI --- doc/environment_variables.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/doc/environment_variables.md b/doc/environment_variables.md index 0dceeb683a5..ff89b4c9b91 100644 --- a/doc/environment_variables.md +++ b/doc/environment_variables.md @@ -5,8 +5,7 @@ gRPC C core based implementations (those contained in this repository) expose some configuration as environment variables that can be set. * http_proxy - The URI of the proxy to use for HTTP CONNECT support. Does not currently - support username or password information in the URI. + The URI of the proxy to use for HTTP CONNECT support. * GRPC_ABORT_ON_LEAKS A debugging aid to cause a call to abort() when gRPC objects are leaked past From 2d6ce7459128ee5d71e9a0112d0082cca8b470a4 Mon Sep 17 00:00:00 2001 From: Yuchen Zeng Date: Fri, 28 Jul 2017 15:21:01 -0700 Subject: [PATCH 59/80] Update BUILD --- BUILD | 1 + 1 file changed, 1 insertion(+) diff --git a/BUILD b/BUILD index 6dcc76eb7aa..6552d5879e6 100644 --- a/BUILD +++ b/BUILD @@ -725,6 +725,7 @@ grpc_cc_library( "src/core/lib/iomgr/is_epollexclusive_available.h", "src/core/lib/iomgr/load_file.h", "src/core/lib/iomgr/lockfree_event.h", + "src/core/lib/iomgr/nameser.h", "src/core/lib/iomgr/network_status_tracker.h", "src/core/lib/iomgr/polling_entity.h", "src/core/lib/iomgr/pollset.h", From 506cd0be69e3e813f897e8faddb2ea176922208e Mon Sep 17 00:00:00 2001 From: Adele Zhou Date: Fri, 28 Jul 2017 15:23:51 -0700 Subject: [PATCH 60/80] Add PR configs for MacOS --- .../macos/pull_request/grpc_basictests.cfg | 31 +++++++++++++++++++ .../macos/pull_request/grpc_interop.cfg | 25 +++++++++++++++ 2 files changed, 56 insertions(+) create mode 100644 tools/internal_ci/macos/pull_request/grpc_basictests.cfg create mode 100644 tools/internal_ci/macos/pull_request/grpc_interop.cfg diff --git a/tools/internal_ci/macos/pull_request/grpc_basictests.cfg b/tools/internal_ci/macos/pull_request/grpc_basictests.cfg new file mode 100644 index 00000000000..e297091560a --- /dev/null +++ b/tools/internal_ci/macos/pull_request/grpc_basictests.cfg @@ -0,0 +1,31 @@ +# Copyright 2017 gRPC authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Config file for the internal CI (in protobuf text format) + +# Location of the continuous shell script in repository. +build_file: "grpc/tools/internal_ci/macos/grpc_run_tests_matrix.sh" +gfile_resources: "/bigstore/grpc-testing-secrets/gcp_credentials/GrpcTesting-d0eeee2db331.json" +timeout_mins: 240 +action { + define_artifacts { + regex: "**/*sponge_log.xml" + regex: "github/grpc/reports/**" + } +} + +env_vars { + key: "RUN_TESTS_FLAGS" + value: "-f basictests macos --internal_ci -j 2 --inner_jobs 4" +} diff --git a/tools/internal_ci/macos/pull_request/grpc_interop.cfg b/tools/internal_ci/macos/pull_request/grpc_interop.cfg new file mode 100644 index 00000000000..9f3742c4864 --- /dev/null +++ b/tools/internal_ci/macos/pull_request/grpc_interop.cfg @@ -0,0 +1,25 @@ +# Copyright 2017 gRPC authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Config file for the internal CI (in protobuf text format) + +# Location of the continuous shell script in repository. +build_file: "grpc/tools/internal_ci/macos/grpc_interop.sh" +timeout_mins: 240 +action { + define_artifacts { + regex: "**/*sponge_log.xml" + regex: "github/grpc/reports/**" + } +} From 088e85ca647ffecc06ca961933d7532ed75d1b8d Mon Sep 17 00:00:00 2001 From: Alexander Polcyn Date: Fri, 28 Jul 2017 14:53:20 -0700 Subject: [PATCH 61/80] add comment and test for memory api of grpc_call_cancel_with_status --- include/grpc/grpc.h | 6 +++++- src/core/lib/surface/call.c | 2 ++ test/core/end2end/tests/cancel_with_status.c | 8 +++++++- 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/include/grpc/grpc.h b/include/grpc/grpc.h index 2cf8de0a2d3..943d6e4891f 100644 --- a/include/grpc/grpc.h +++ b/include/grpc/grpc.h @@ -296,7 +296,11 @@ GRPCAPI grpc_call_error grpc_call_cancel(grpc_call *call, void *reserved); If a status has not been received for the call, set it to the status code and description passed in. Importantly, this function does not send status nor description to the - remote endpoint. */ + remote endpoint. + Note that \a description doesn't need be a static string. + It doesn't need to be alive after the call to + grpc_call_cancel_with_status completes. + */ GRPCAPI grpc_call_error grpc_call_cancel_with_status(grpc_call *call, grpc_status_code status, const char *description, diff --git a/src/core/lib/surface/call.c b/src/core/lib/surface/call.c index 2365d27307c..0883ea7739b 100644 --- a/src/core/lib/surface/call.c +++ b/src/core/lib/surface/call.c @@ -644,6 +644,8 @@ static void cancel_with_error(grpc_exec_ctx *exec_ctx, grpc_call *c, static grpc_error *error_from_status(grpc_status_code status, const char *description) { + // copying 'description' is needed to ensure the grpc_call_cancel_with_status + // guarantee that can be short-lived. return grpc_error_set_int( grpc_error_set_str(GRPC_ERROR_CREATE_FROM_COPIED_STRING(description), GRPC_ERROR_STR_GRPC_MESSAGE, diff --git a/test/core/end2end/tests/cancel_with_status.c b/test/core/end2end/tests/cancel_with_status.c index d659d1173a2..fd26fd122e9 100644 --- a/test/core/end2end/tests/cancel_with_status.c +++ b/test/core/end2end/tests/cancel_with_status.c @@ -25,6 +25,7 @@ #include #include #include +#include #include #include #include "src/core/lib/support/string.h" @@ -138,7 +139,12 @@ static void simple_request_body(grpc_end2end_test_config config, error = grpc_call_start_batch(c, ops, num_ops, tag(1), NULL); GPR_ASSERT(GRPC_CALL_OK == error); - grpc_call_cancel_with_status(c, GRPC_STATUS_UNIMPLEMENTED, "xyz", NULL); + char *dynamic_string = gpr_strdup("xyz"); + grpc_call_cancel_with_status(c, GRPC_STATUS_UNIMPLEMENTED, + (const char *)dynamic_string, NULL); + // The API of \a description allows for it to be a dynamic/non-const + // string, test this guarantee. + gpr_free(dynamic_string); CQ_EXPECT_COMPLETION(cqv, tag(1), 1); cq_verify(cqv); From 860b1da060e2250aaff905d3af7647b017f7a1ad Mon Sep 17 00:00:00 2001 From: Muxi Yan Date: Sat, 29 Jul 2017 12:05:19 -0700 Subject: [PATCH 62/80] Resume GRXBufferedPipe when it gets dealloced --- src/objective-c/RxLibrary/GRXBufferedPipe.m | 8 +++ src/objective-c/tests/RxLibraryUnitTests.m | 70 +++++++++++++++++++++ 2 files changed, 78 insertions(+) diff --git a/src/objective-c/RxLibrary/GRXBufferedPipe.m b/src/objective-c/RxLibrary/GRXBufferedPipe.m index 99cb0ad9713..577a5e9a42b 100644 --- a/src/objective-c/RxLibrary/GRXBufferedPipe.m +++ b/src/objective-c/RxLibrary/GRXBufferedPipe.m @@ -110,4 +110,12 @@ self.state = GRXWriterStateFinished; } +- (void)dealloc { + GRXWriterState state = self.state; + if (state == GRXWriterStateNotStarted || + state == GRXWriterStatePaused) { + dispatch_resume(_writeQueue); + } +} + @end diff --git a/src/objective-c/tests/RxLibraryUnitTests.m b/src/objective-c/tests/RxLibraryUnitTests.m index fa3ded4c0cd..3a5adbbf378 100644 --- a/src/objective-c/tests/RxLibraryUnitTests.m +++ b/src/objective-c/tests/RxLibraryUnitTests.m @@ -213,4 +213,74 @@ XCTAssertEqualObjects(handler.errorOrNil, nil); } +#define WRITE_ROUNDS (1000) +- (void)testBufferedPipeResumeWhenDealloc { + id anyValue = @7; + id writeable = [GRXWriteable writeableWithSingleHandler:^(id value, NSError *errorOrNil) { + }]; + + // Release after alloc; + GRXBufferedPipe *pipe = [GRXBufferedPipe pipe]; + pipe = nil; + + // Release after write but before start + pipe = [GRXBufferedPipe pipe]; + for (int i = 0; i < WRITE_ROUNDS; i++) { + [pipe writeValue:anyValue]; + } + pipe = nil; + + // Release after start but not write + pipe = [GRXBufferedPipe pipe]; + [pipe startWithWriteable:writeable]; + pipe = nil; + + // Release after start and write + pipe = [GRXBufferedPipe pipe]; + for (int i = 0; i < WRITE_ROUNDS; i++) { + [pipe writeValue:anyValue]; + } + [pipe startWithWriteable:writeable]; + pipe = nil; + + // Release after start, write and pause + pipe = [GRXBufferedPipe pipe]; + [pipe startWithWriteable:writeable]; + for (int i = 0; i < WRITE_ROUNDS; i++) { + [pipe writeValue:anyValue]; + } + pipe.state = GRXWriterStatePaused; + for (int i = 0; i < WRITE_ROUNDS; i++) { + [pipe writeValue:anyValue]; + } + pipe = nil; + + // Release after start, write, pause and finish + pipe = [GRXBufferedPipe pipe]; + [pipe startWithWriteable:writeable]; + for (int i = 0; i < WRITE_ROUNDS; i++) { + [pipe writeValue:anyValue]; + } + pipe.state = GRXWriterStatePaused; + for (int i = 0; i < WRITE_ROUNDS; i++) { + [pipe writeValue:anyValue]; + } + [pipe finishWithError:nil]; + pipe = nil; + + // Release after start, write, pause, finish and resume + pipe = [GRXBufferedPipe pipe]; + [pipe startWithWriteable:writeable]; + for (int i = 0; i < WRITE_ROUNDS; i++) { + [pipe writeValue:anyValue]; + } + pipe.state = GRXWriterStatePaused; + for (int i = 0; i < WRITE_ROUNDS; i++) { + [pipe writeValue:anyValue]; + } + [pipe finishWithError:nil]; + pipe.state = GRXWriterStateStarted; + pipe = nil; +} + @end From 4280725bb35f71a8b402f08ccd69ca85e0deb05e Mon Sep 17 00:00:00 2001 From: Vijay Pai Date: Fri, 28 Jul 2017 15:08:24 -0700 Subject: [PATCH 63/80] Clean up grpc++_unsecure so that it doesn't require secure content anymore --- BUILD | 5 +- CMakeLists.txt | 317 +++--- Makefile | 335 ++++--- bazel/grpc_build_system.bzl | 4 +- build.yaml | 498 +++++----- gRPC-Core.podspec | 306 +++--- grpc.gemspec | 168 ++-- package.xml | 168 ++-- test/cpp/util/BUILD | 1 + tools/doxygen/Doxyfile.c++ | 39 +- tools/doxygen/Doxyfile.c++.internal | 172 +++- tools/doxygen/Doxyfile.core.internal | 6 +- .../generated/sources_and_headers.json | 929 ++++++++++-------- vsprojects/grpc.sln | 2 +- vsprojects/vcxproj/grpc++/grpc++.vcxproj | 216 +++- .../vcxproj/grpc++/grpc++.vcxproj.filters | 681 +++++++++++-- .../grpc++_unsecure/grpc++_unsecure.vcxproj | 216 +++- .../grpc++_unsecure.vcxproj.filters | 675 +++++++++++-- vsprojects/vcxproj/grpc/grpc.vcxproj | 168 ++-- vsprojects/vcxproj/grpc/grpc.vcxproj.filters | 504 +++++----- .../grpc_test_util/grpc_test_util.vcxproj | 124 --- .../grpc_test_util.vcxproj.filters | 375 ------- .../grpc_unsecure/grpc_unsecure.vcxproj | 116 ++- .../grpc_unsecure.vcxproj.filters | 348 ++++--- 24 files changed, 3873 insertions(+), 2500 deletions(-) diff --git a/BUILD b/BUILD index 6552d5879e6..d8589144ac2 100644 --- a/BUILD +++ b/BUILD @@ -206,6 +206,7 @@ grpc_cc_library( standalone = True, deps = [ "grpc_common", + "grpc_lb_policy_grpclb", ], ) @@ -221,7 +222,6 @@ grpc_cc_library( deps = [ "grpc_common", "grpc_lb_policy_grpclb_secure", - "grpc_resolver_dns_ares", "grpc_secure", "grpc_transport_chttp2_client_secure", "grpc_transport_chttp2_server_secure", @@ -287,6 +287,7 @@ grpc_cc_library( "grpc++_base_unsecure", "grpc++_codegen_base", "grpc++_codegen_base_src", + "grpc++_codegen_proto", "grpc_unsecure", ], ) @@ -837,6 +838,8 @@ grpc_cc_library( "grpc_load_reporting", "grpc_max_age_filter", "grpc_message_size_filter", + "grpc_resolver_dns_ares", + "grpc_resolver_fake", "grpc_resolver_dns_native", "grpc_resolver_sockaddr", "grpc_transport_chttp2_client_insecure", diff --git a/CMakeLists.txt b/CMakeLists.txt index f71563a38d7..0403d962b70 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1239,17 +1239,6 @@ target_link_libraries(grpc ) foreach(_hdr - include/grpc/byte_buffer.h - include/grpc/byte_buffer_reader.h - include/grpc/compression.h - include/grpc/grpc.h - include/grpc/grpc_posix.h - include/grpc/grpc_security_constants.h - include/grpc/load_reporting.h - include/grpc/slice.h - include/grpc/slice_buffer.h - include/grpc/status.h - include/grpc/support/workaround_list.h include/grpc/impl/codegen/byte_buffer_reader.h include/grpc/impl/codegen/compression_types.h include/grpc/impl/codegen/connectivity_state.h @@ -1270,6 +1259,17 @@ foreach(_hdr include/grpc/impl/codegen/sync_posix.h include/grpc/impl/codegen/sync_windows.h include/grpc/grpc_security.h + include/grpc/byte_buffer.h + include/grpc/byte_buffer_reader.h + include/grpc/compression.h + include/grpc/grpc.h + include/grpc/grpc_posix.h + include/grpc/grpc_security_constants.h + include/grpc/load_reporting.h + include/grpc/slice.h + include/grpc/slice_buffer.h + include/grpc/status.h + include/grpc/support/workaround_list.h include/grpc/census.h ) string(REPLACE "include/" "" _path ${_hdr}) @@ -1540,17 +1540,6 @@ target_link_libraries(grpc_cronet ) foreach(_hdr - include/grpc/byte_buffer.h - include/grpc/byte_buffer_reader.h - include/grpc/compression.h - include/grpc/grpc.h - include/grpc/grpc_posix.h - include/grpc/grpc_security_constants.h - include/grpc/load_reporting.h - include/grpc/slice.h - include/grpc/slice_buffer.h - include/grpc/status.h - include/grpc/support/workaround_list.h include/grpc/impl/codegen/byte_buffer_reader.h include/grpc/impl/codegen/compression_types.h include/grpc/impl/codegen/connectivity_state.h @@ -1572,6 +1561,7 @@ foreach(_hdr include/grpc/impl/codegen/sync_windows.h include/grpc/grpc_cronet.h include/grpc/grpc_security.h + include/grpc/grpc_security_constants.h ) string(REPLACE "include/" "" _path ${_hdr}) get_filename_component(_path ${_path} PATH) @@ -1775,17 +1765,6 @@ target_link_libraries(grpc_test_util ) foreach(_hdr - include/grpc/byte_buffer.h - include/grpc/byte_buffer_reader.h - include/grpc/compression.h - include/grpc/grpc.h - include/grpc/grpc_posix.h - include/grpc/grpc_security_constants.h - include/grpc/load_reporting.h - include/grpc/slice.h - include/grpc/slice_buffer.h - include/grpc/status.h - include/grpc/support/workaround_list.h include/grpc/impl/codegen/byte_buffer_reader.h include/grpc/impl/codegen/compression_types.h include/grpc/impl/codegen/connectivity_state.h @@ -2134,17 +2113,6 @@ target_link_libraries(grpc_unsecure ) foreach(_hdr - include/grpc/byte_buffer.h - include/grpc/byte_buffer_reader.h - include/grpc/compression.h - include/grpc/grpc.h - include/grpc/grpc_posix.h - include/grpc/grpc_security_constants.h - include/grpc/load_reporting.h - include/grpc/slice.h - include/grpc/slice_buffer.h - include/grpc/status.h - include/grpc/support/workaround_list.h include/grpc/impl/codegen/byte_buffer_reader.h include/grpc/impl/codegen/compression_types.h include/grpc/impl/codegen/connectivity_state.h @@ -2164,6 +2132,17 @@ foreach(_hdr include/grpc/impl/codegen/sync_generic.h include/grpc/impl/codegen/sync_posix.h include/grpc/impl/codegen/sync_windows.h + include/grpc/byte_buffer.h + include/grpc/byte_buffer_reader.h + include/grpc/compression.h + include/grpc/grpc.h + include/grpc/grpc_posix.h + include/grpc/grpc_security_constants.h + include/grpc/load_reporting.h + include/grpc/slice.h + include/grpc/slice_buffer.h + include/grpc/status.h + include/grpc/support/workaround_list.h include/grpc/census.h ) string(REPLACE "include/" "" _path ${_hdr}) @@ -2312,9 +2291,6 @@ add_library(grpc++ src/cpp/util/status.cc src/cpp/util/string_ref.cc src/cpp/util/time_cc.cc - third_party/nanopb/pb_common.c - third_party/nanopb/pb_decode.c - third_party/nanopb/pb_encode.c src/cpp/codegen/codegen_init.cc ) @@ -2352,6 +2328,7 @@ target_link_libraries(grpc++ ${_gRPC_PROTOBUF_LIBRARIES} ${_gRPC_ALLTARGETS_LIBRARIES} grpc + gpr ) foreach(_hdr @@ -2400,6 +2377,62 @@ foreach(_hdr include/grpc++/support/stub_options.h include/grpc++/support/sync_stream.h include/grpc++/support/time.h + 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_windows.h + include/grpc/support/avl.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_windows.h + include/grpc/support/port_platform.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_windows.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 + include/grpc/impl/codegen/atm.h + include/grpc/impl/codegen/atm_gcc_atomic.h + include/grpc/impl/codegen/atm_gcc_sync.h + include/grpc/impl/codegen/atm_windows.h + include/grpc/impl/codegen/gpr_slice.h + include/grpc/impl/codegen/gpr_types.h + include/grpc/impl/codegen/port_platform.h + include/grpc/impl/codegen/sync.h + include/grpc/impl/codegen/sync_generic.h + include/grpc/impl/codegen/sync_posix.h + include/grpc/impl/codegen/sync_windows.h + include/grpc/byte_buffer.h + include/grpc/byte_buffer_reader.h + include/grpc/compression.h + include/grpc/grpc.h + include/grpc/grpc_posix.h + include/grpc/grpc_security_constants.h + include/grpc/load_reporting.h + include/grpc/slice.h + include/grpc/slice_buffer.h + include/grpc/status.h + include/grpc/support/workaround_list.h + include/grpc/impl/codegen/byte_buffer_reader.h + include/grpc/impl/codegen/compression_types.h + include/grpc/impl/codegen/connectivity_state.h + include/grpc/impl/codegen/exec_ctx_fwd.h + include/grpc/impl/codegen/grpc_types.h + include/grpc/impl/codegen/propagation_bits.h + include/grpc/impl/codegen/slice.h + include/grpc/impl/codegen/status.h include/grpc++/impl/codegen/async_stream.h include/grpc++/impl/codegen/async_unary_call.h include/grpc++/impl/codegen/call.h @@ -2429,25 +2462,6 @@ foreach(_hdr include/grpc++/impl/codegen/stub_options.h include/grpc++/impl/codegen/sync_stream.h include/grpc++/impl/codegen/time.h - include/grpc/impl/codegen/byte_buffer_reader.h - include/grpc/impl/codegen/compression_types.h - include/grpc/impl/codegen/connectivity_state.h - include/grpc/impl/codegen/exec_ctx_fwd.h - include/grpc/impl/codegen/grpc_types.h - include/grpc/impl/codegen/propagation_bits.h - include/grpc/impl/codegen/slice.h - include/grpc/impl/codegen/status.h - include/grpc/impl/codegen/atm.h - include/grpc/impl/codegen/atm_gcc_atomic.h - include/grpc/impl/codegen/atm_gcc_sync.h - include/grpc/impl/codegen/atm_windows.h - include/grpc/impl/codegen/gpr_slice.h - include/grpc/impl/codegen/gpr_types.h - include/grpc/impl/codegen/port_platform.h - include/grpc/impl/codegen/sync.h - include/grpc/impl/codegen/sync_generic.h - include/grpc/impl/codegen/sync_posix.h - include/grpc/impl/codegen/sync_windows.h include/grpc++/impl/codegen/proto_utils.h include/grpc++/impl/codegen/config_protobuf.h ) @@ -2506,9 +2520,6 @@ add_library(grpc++_cronet src/cpp/util/status.cc src/cpp/util/string_ref.cc src/cpp/util/time_cc.cc - third_party/nanopb/pb_common.c - third_party/nanopb/pb_decode.c - third_party/nanopb/pb_encode.c src/cpp/codegen/codegen_init.cc src/core/ext/transport/chttp2/client/insecure/channel_create.c src/core/ext/transport/chttp2/client/insecure/channel_create_posix.c @@ -2704,6 +2715,9 @@ add_library(grpc++_cronet src/core/ext/census/resource.c src/core/ext/census/trace_context.c src/core/ext/census/tracing.c + third_party/nanopb/pb_common.c + third_party/nanopb/pb_decode.c + third_party/nanopb/pb_encode.c ) if(WIN32 AND MSVC) @@ -2790,6 +2804,62 @@ foreach(_hdr include/grpc++/support/stub_options.h include/grpc++/support/sync_stream.h include/grpc++/support/time.h + 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_windows.h + include/grpc/support/avl.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_windows.h + include/grpc/support/port_platform.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_windows.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 + include/grpc/impl/codegen/atm.h + include/grpc/impl/codegen/atm_gcc_atomic.h + include/grpc/impl/codegen/atm_gcc_sync.h + include/grpc/impl/codegen/atm_windows.h + include/grpc/impl/codegen/gpr_slice.h + include/grpc/impl/codegen/gpr_types.h + include/grpc/impl/codegen/port_platform.h + include/grpc/impl/codegen/sync.h + include/grpc/impl/codegen/sync_generic.h + include/grpc/impl/codegen/sync_posix.h + include/grpc/impl/codegen/sync_windows.h + include/grpc/byte_buffer.h + include/grpc/byte_buffer_reader.h + include/grpc/compression.h + include/grpc/grpc.h + include/grpc/grpc_posix.h + include/grpc/grpc_security_constants.h + include/grpc/load_reporting.h + include/grpc/slice.h + include/grpc/slice_buffer.h + include/grpc/status.h + include/grpc/support/workaround_list.h + include/grpc/impl/codegen/byte_buffer_reader.h + include/grpc/impl/codegen/compression_types.h + include/grpc/impl/codegen/connectivity_state.h + include/grpc/impl/codegen/exec_ctx_fwd.h + include/grpc/impl/codegen/grpc_types.h + include/grpc/impl/codegen/propagation_bits.h + include/grpc/impl/codegen/slice.h + include/grpc/impl/codegen/status.h include/grpc++/impl/codegen/async_stream.h include/grpc++/impl/codegen/async_unary_call.h include/grpc++/impl/codegen/call.h @@ -2819,36 +2889,6 @@ foreach(_hdr include/grpc++/impl/codegen/stub_options.h include/grpc++/impl/codegen/sync_stream.h include/grpc++/impl/codegen/time.h - include/grpc/impl/codegen/byte_buffer_reader.h - include/grpc/impl/codegen/compression_types.h - include/grpc/impl/codegen/connectivity_state.h - include/grpc/impl/codegen/exec_ctx_fwd.h - include/grpc/impl/codegen/grpc_types.h - include/grpc/impl/codegen/propagation_bits.h - include/grpc/impl/codegen/slice.h - include/grpc/impl/codegen/status.h - include/grpc/impl/codegen/atm.h - include/grpc/impl/codegen/atm_gcc_atomic.h - include/grpc/impl/codegen/atm_gcc_sync.h - include/grpc/impl/codegen/atm_windows.h - include/grpc/impl/codegen/gpr_slice.h - include/grpc/impl/codegen/gpr_types.h - include/grpc/impl/codegen/port_platform.h - include/grpc/impl/codegen/sync.h - include/grpc/impl/codegen/sync_generic.h - include/grpc/impl/codegen/sync_posix.h - include/grpc/impl/codegen/sync_windows.h - include/grpc/byte_buffer.h - include/grpc/byte_buffer_reader.h - include/grpc/compression.h - include/grpc/grpc.h - include/grpc/grpc_posix.h - include/grpc/grpc_security_constants.h - include/grpc/load_reporting.h - include/grpc/slice.h - include/grpc/slice_buffer.h - include/grpc/status.h - include/grpc/support/workaround_list.h include/grpc/census.h ) string(REPLACE "include/" "" _path ${_hdr}) @@ -3287,9 +3327,6 @@ add_library(grpc++_unsecure src/cpp/util/status.cc src/cpp/util/string_ref.cc src/cpp/util/time_cc.cc - third_party/nanopb/pb_common.c - third_party/nanopb/pb_decode.c - third_party/nanopb/pb_encode.c src/cpp/codegen/codegen_init.cc ) @@ -3327,7 +3364,6 @@ target_link_libraries(grpc++_unsecure ${_gRPC_ALLTARGETS_LIBRARIES} gpr grpc_unsecure - grpc ) foreach(_hdr @@ -3376,6 +3412,62 @@ foreach(_hdr include/grpc++/support/stub_options.h include/grpc++/support/sync_stream.h include/grpc++/support/time.h + 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_windows.h + include/grpc/support/avl.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_windows.h + include/grpc/support/port_platform.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_windows.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 + include/grpc/impl/codegen/atm.h + include/grpc/impl/codegen/atm_gcc_atomic.h + include/grpc/impl/codegen/atm_gcc_sync.h + include/grpc/impl/codegen/atm_windows.h + include/grpc/impl/codegen/gpr_slice.h + include/grpc/impl/codegen/gpr_types.h + include/grpc/impl/codegen/port_platform.h + include/grpc/impl/codegen/sync.h + include/grpc/impl/codegen/sync_generic.h + include/grpc/impl/codegen/sync_posix.h + include/grpc/impl/codegen/sync_windows.h + include/grpc/byte_buffer.h + include/grpc/byte_buffer_reader.h + include/grpc/compression.h + include/grpc/grpc.h + include/grpc/grpc_posix.h + include/grpc/grpc_security_constants.h + include/grpc/load_reporting.h + include/grpc/slice.h + include/grpc/slice_buffer.h + include/grpc/status.h + include/grpc/support/workaround_list.h + include/grpc/impl/codegen/byte_buffer_reader.h + include/grpc/impl/codegen/compression_types.h + include/grpc/impl/codegen/connectivity_state.h + include/grpc/impl/codegen/exec_ctx_fwd.h + include/grpc/impl/codegen/grpc_types.h + include/grpc/impl/codegen/propagation_bits.h + include/grpc/impl/codegen/slice.h + include/grpc/impl/codegen/status.h include/grpc++/impl/codegen/async_stream.h include/grpc++/impl/codegen/async_unary_call.h include/grpc++/impl/codegen/call.h @@ -3405,25 +3497,6 @@ foreach(_hdr include/grpc++/impl/codegen/stub_options.h include/grpc++/impl/codegen/sync_stream.h include/grpc++/impl/codegen/time.h - include/grpc/impl/codegen/byte_buffer_reader.h - include/grpc/impl/codegen/compression_types.h - include/grpc/impl/codegen/connectivity_state.h - include/grpc/impl/codegen/exec_ctx_fwd.h - include/grpc/impl/codegen/grpc_types.h - include/grpc/impl/codegen/propagation_bits.h - include/grpc/impl/codegen/slice.h - include/grpc/impl/codegen/status.h - include/grpc/impl/codegen/atm.h - include/grpc/impl/codegen/atm_gcc_atomic.h - include/grpc/impl/codegen/atm_gcc_sync.h - include/grpc/impl/codegen/atm_windows.h - include/grpc/impl/codegen/gpr_slice.h - include/grpc/impl/codegen/gpr_types.h - include/grpc/impl/codegen/port_platform.h - include/grpc/impl/codegen/sync.h - include/grpc/impl/codegen/sync_generic.h - include/grpc/impl/codegen/sync_posix.h - include/grpc/impl/codegen/sync_windows.h ) string(REPLACE "include/" "" _path ${_hdr}) get_filename_component(_path ${_path} PATH) diff --git a/Makefile b/Makefile index 98cfb04e54a..149aef67098 100644 --- a/Makefile +++ b/Makefile @@ -3149,17 +3149,6 @@ LIBGRPC_SRC = \ src/core/plugin_registry/grpc_plugin_registry.c \ PUBLIC_HEADERS_C += \ - include/grpc/byte_buffer.h \ - include/grpc/byte_buffer_reader.h \ - include/grpc/compression.h \ - include/grpc/grpc.h \ - include/grpc/grpc_posix.h \ - include/grpc/grpc_security_constants.h \ - include/grpc/load_reporting.h \ - include/grpc/slice.h \ - include/grpc/slice_buffer.h \ - include/grpc/status.h \ - include/grpc/support/workaround_list.h \ include/grpc/impl/codegen/byte_buffer_reader.h \ include/grpc/impl/codegen/compression_types.h \ include/grpc/impl/codegen/connectivity_state.h \ @@ -3180,6 +3169,17 @@ PUBLIC_HEADERS_C += \ include/grpc/impl/codegen/sync_posix.h \ include/grpc/impl/codegen/sync_windows.h \ include/grpc/grpc_security.h \ + include/grpc/byte_buffer.h \ + include/grpc/byte_buffer_reader.h \ + include/grpc/compression.h \ + include/grpc/grpc.h \ + include/grpc/grpc_posix.h \ + include/grpc/grpc_security_constants.h \ + include/grpc/load_reporting.h \ + include/grpc/slice.h \ + include/grpc/slice_buffer.h \ + include/grpc/status.h \ + include/grpc/support/workaround_list.h \ include/grpc/census.h \ LIBGRPC_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBGRPC_SRC)))) @@ -3448,17 +3448,6 @@ LIBGRPC_CRONET_SRC = \ src/core/plugin_registry/grpc_cronet_plugin_registry.c \ PUBLIC_HEADERS_C += \ - include/grpc/byte_buffer.h \ - include/grpc/byte_buffer_reader.h \ - include/grpc/compression.h \ - include/grpc/grpc.h \ - include/grpc/grpc_posix.h \ - include/grpc/grpc_security_constants.h \ - include/grpc/load_reporting.h \ - include/grpc/slice.h \ - include/grpc/slice_buffer.h \ - include/grpc/status.h \ - include/grpc/support/workaround_list.h \ include/grpc/impl/codegen/byte_buffer_reader.h \ include/grpc/impl/codegen/compression_types.h \ include/grpc/impl/codegen/connectivity_state.h \ @@ -3480,6 +3469,7 @@ PUBLIC_HEADERS_C += \ include/grpc/impl/codegen/sync_windows.h \ include/grpc/grpc_cronet.h \ include/grpc/grpc_security.h \ + include/grpc/grpc_security_constants.h \ LIBGRPC_CRONET_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBGRPC_CRONET_SRC)))) @@ -3682,17 +3672,6 @@ LIBGRPC_TEST_UTIL_SRC = \ src/core/lib/debug/trace.c \ PUBLIC_HEADERS_C += \ - include/grpc/byte_buffer.h \ - include/grpc/byte_buffer_reader.h \ - include/grpc/compression.h \ - include/grpc/grpc.h \ - include/grpc/grpc_posix.h \ - include/grpc/grpc_security_constants.h \ - include/grpc/load_reporting.h \ - include/grpc/slice.h \ - include/grpc/slice_buffer.h \ - include/grpc/status.h \ - include/grpc/support/workaround_list.h \ include/grpc/impl/codegen/byte_buffer_reader.h \ include/grpc/impl/codegen/compression_types.h \ include/grpc/impl/codegen/connectivity_state.h \ @@ -4012,17 +3991,6 @@ LIBGRPC_UNSECURE_SRC = \ src/core/plugin_registry/grpc_unsecure_plugin_registry.c \ PUBLIC_HEADERS_C += \ - include/grpc/byte_buffer.h \ - include/grpc/byte_buffer_reader.h \ - include/grpc/compression.h \ - include/grpc/grpc.h \ - include/grpc/grpc_posix.h \ - include/grpc/grpc_security_constants.h \ - include/grpc/load_reporting.h \ - include/grpc/slice.h \ - include/grpc/slice_buffer.h \ - include/grpc/status.h \ - include/grpc/support/workaround_list.h \ include/grpc/impl/codegen/byte_buffer_reader.h \ include/grpc/impl/codegen/compression_types.h \ include/grpc/impl/codegen/connectivity_state.h \ @@ -4042,6 +4010,17 @@ PUBLIC_HEADERS_C += \ include/grpc/impl/codegen/sync_generic.h \ include/grpc/impl/codegen/sync_posix.h \ include/grpc/impl/codegen/sync_windows.h \ + include/grpc/byte_buffer.h \ + include/grpc/byte_buffer_reader.h \ + include/grpc/compression.h \ + include/grpc/grpc.h \ + include/grpc/grpc_posix.h \ + include/grpc/grpc_security_constants.h \ + include/grpc/load_reporting.h \ + include/grpc/slice.h \ + include/grpc/slice_buffer.h \ + include/grpc/status.h \ + include/grpc/support/workaround_list.h \ include/grpc/census.h \ LIBGRPC_UNSECURE_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBGRPC_UNSECURE_SRC)))) @@ -4201,9 +4180,6 @@ LIBGRPC++_SRC = \ src/cpp/util/status.cc \ src/cpp/util/string_ref.cc \ src/cpp/util/time_cc.cc \ - third_party/nanopb/pb_common.c \ - third_party/nanopb/pb_decode.c \ - third_party/nanopb/pb_encode.c \ src/cpp/codegen/codegen_init.cc \ PUBLIC_HEADERS_CXX += \ @@ -4252,6 +4228,62 @@ PUBLIC_HEADERS_CXX += \ include/grpc++/support/stub_options.h \ include/grpc++/support/sync_stream.h \ include/grpc++/support/time.h \ + 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_windows.h \ + include/grpc/support/avl.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_windows.h \ + include/grpc/support/port_platform.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_windows.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 \ + include/grpc/impl/codegen/atm.h \ + include/grpc/impl/codegen/atm_gcc_atomic.h \ + include/grpc/impl/codegen/atm_gcc_sync.h \ + include/grpc/impl/codegen/atm_windows.h \ + include/grpc/impl/codegen/gpr_slice.h \ + include/grpc/impl/codegen/gpr_types.h \ + include/grpc/impl/codegen/port_platform.h \ + include/grpc/impl/codegen/sync.h \ + include/grpc/impl/codegen/sync_generic.h \ + include/grpc/impl/codegen/sync_posix.h \ + include/grpc/impl/codegen/sync_windows.h \ + include/grpc/byte_buffer.h \ + include/grpc/byte_buffer_reader.h \ + include/grpc/compression.h \ + include/grpc/grpc.h \ + include/grpc/grpc_posix.h \ + include/grpc/grpc_security_constants.h \ + include/grpc/load_reporting.h \ + include/grpc/slice.h \ + include/grpc/slice_buffer.h \ + include/grpc/status.h \ + include/grpc/support/workaround_list.h \ + include/grpc/impl/codegen/byte_buffer_reader.h \ + include/grpc/impl/codegen/compression_types.h \ + include/grpc/impl/codegen/connectivity_state.h \ + include/grpc/impl/codegen/exec_ctx_fwd.h \ + include/grpc/impl/codegen/grpc_types.h \ + include/grpc/impl/codegen/propagation_bits.h \ + include/grpc/impl/codegen/slice.h \ + include/grpc/impl/codegen/status.h \ include/grpc++/impl/codegen/async_stream.h \ include/grpc++/impl/codegen/async_unary_call.h \ include/grpc++/impl/codegen/call.h \ @@ -4281,25 +4313,6 @@ PUBLIC_HEADERS_CXX += \ include/grpc++/impl/codegen/stub_options.h \ include/grpc++/impl/codegen/sync_stream.h \ include/grpc++/impl/codegen/time.h \ - include/grpc/impl/codegen/byte_buffer_reader.h \ - include/grpc/impl/codegen/compression_types.h \ - include/grpc/impl/codegen/connectivity_state.h \ - include/grpc/impl/codegen/exec_ctx_fwd.h \ - include/grpc/impl/codegen/grpc_types.h \ - include/grpc/impl/codegen/propagation_bits.h \ - include/grpc/impl/codegen/slice.h \ - include/grpc/impl/codegen/status.h \ - include/grpc/impl/codegen/atm.h \ - include/grpc/impl/codegen/atm_gcc_atomic.h \ - include/grpc/impl/codegen/atm_gcc_sync.h \ - include/grpc/impl/codegen/atm_windows.h \ - include/grpc/impl/codegen/gpr_slice.h \ - include/grpc/impl/codegen/gpr_types.h \ - include/grpc/impl/codegen/port_platform.h \ - include/grpc/impl/codegen/sync.h \ - include/grpc/impl/codegen/sync_generic.h \ - include/grpc/impl/codegen/sync_posix.h \ - include/grpc/impl/codegen/sync_windows.h \ include/grpc++/impl/codegen/proto_utils.h \ include/grpc++/impl/codegen/config_protobuf.h \ @@ -4338,18 +4351,18 @@ endif ifeq ($(SYSTEM),MINGW32) -$(LIBDIR)/$(CONFIG)/grpc++$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP): $(LIBGRPC++_OBJS) $(ZLIB_DEP) $(CARES_DEP) $(PROTOBUF_DEP) $(LIBDIR)/$(CONFIG)/grpc$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(OPENSSL_DEP) +$(LIBDIR)/$(CONFIG)/grpc++$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP): $(LIBGRPC++_OBJS) $(ZLIB_DEP) $(CARES_DEP) $(PROTOBUF_DEP) $(LIBDIR)/$(CONFIG)/grpc$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/gpr$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(OPENSSL_DEP) $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,--output-def=$(LIBDIR)/$(CONFIG)/grpc++$(SHARED_VERSION_CPP).def -Wl,--out-implib=$(LIBDIR)/$(CONFIG)/libgrpc++$(SHARED_VERSION_CPP)-dll.a -o $(LIBDIR)/$(CONFIG)/grpc++$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) $(LIBGRPC++_OBJS) $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) -lgrpc$(SHARED_VERSION_CORE)-dll + $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,--output-def=$(LIBDIR)/$(CONFIG)/grpc++$(SHARED_VERSION_CPP).def -Wl,--out-implib=$(LIBDIR)/$(CONFIG)/libgrpc++$(SHARED_VERSION_CPP)-dll.a -o $(LIBDIR)/$(CONFIG)/grpc++$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) $(LIBGRPC++_OBJS) $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) -lgrpc$(SHARED_VERSION_CORE)-dll -lgpr$(SHARED_VERSION_CORE)-dll else -$(LIBDIR)/$(CONFIG)/libgrpc++$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP): $(LIBGRPC++_OBJS) $(ZLIB_DEP) $(CARES_DEP) $(PROTOBUF_DEP) $(LIBDIR)/$(CONFIG)/libgrpc.$(SHARED_EXT_CORE) $(OPENSSL_DEP) +$(LIBDIR)/$(CONFIG)/libgrpc++$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP): $(LIBGRPC++_OBJS) $(ZLIB_DEP) $(CARES_DEP) $(PROTOBUF_DEP) $(LIBDIR)/$(CONFIG)/libgrpc.$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/libgpr.$(SHARED_EXT_CORE) $(OPENSSL_DEP) $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` ifeq ($(SYSTEM),Darwin) - $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -install_name $(SHARED_PREFIX)grpc++$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) -dynamiclib -o $(LIBDIR)/$(CONFIG)/libgrpc++$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) $(LIBGRPC++_OBJS) $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) -lgrpc + $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -install_name $(SHARED_PREFIX)grpc++$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) -dynamiclib -o $(LIBDIR)/$(CONFIG)/libgrpc++$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) $(LIBGRPC++_OBJS) $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) -lgrpc -lgpr else - $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libgrpc++.so.1 -o $(LIBDIR)/$(CONFIG)/libgrpc++$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) $(LIBGRPC++_OBJS) $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) -lgrpc + $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libgrpc++.so.1 -o $(LIBDIR)/$(CONFIG)/libgrpc++$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) $(LIBGRPC++_OBJS) $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) -lgrpc -lgpr $(Q) ln -sf $(SHARED_PREFIX)grpc++$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) $(LIBDIR)/$(CONFIG)/libgrpc++$(SHARED_VERSION_CPP).so.1 $(Q) ln -sf $(SHARED_PREFIX)grpc++$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) $(LIBDIR)/$(CONFIG)/libgrpc++$(SHARED_VERSION_CPP).so endif @@ -4404,9 +4417,6 @@ LIBGRPC++_CRONET_SRC = \ src/cpp/util/status.cc \ src/cpp/util/string_ref.cc \ src/cpp/util/time_cc.cc \ - third_party/nanopb/pb_common.c \ - third_party/nanopb/pb_decode.c \ - third_party/nanopb/pb_encode.c \ src/cpp/codegen/codegen_init.cc \ src/core/ext/transport/chttp2/client/insecure/channel_create.c \ src/core/ext/transport/chttp2/client/insecure/channel_create_posix.c \ @@ -4602,6 +4612,9 @@ LIBGRPC++_CRONET_SRC = \ src/core/ext/census/resource.c \ src/core/ext/census/trace_context.c \ src/core/ext/census/tracing.c \ + third_party/nanopb/pb_common.c \ + third_party/nanopb/pb_decode.c \ + third_party/nanopb/pb_encode.c \ PUBLIC_HEADERS_CXX += \ include/grpc++/alarm.h \ @@ -4649,6 +4662,62 @@ PUBLIC_HEADERS_CXX += \ include/grpc++/support/stub_options.h \ include/grpc++/support/sync_stream.h \ include/grpc++/support/time.h \ + 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_windows.h \ + include/grpc/support/avl.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_windows.h \ + include/grpc/support/port_platform.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_windows.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 \ + include/grpc/impl/codegen/atm.h \ + include/grpc/impl/codegen/atm_gcc_atomic.h \ + include/grpc/impl/codegen/atm_gcc_sync.h \ + include/grpc/impl/codegen/atm_windows.h \ + include/grpc/impl/codegen/gpr_slice.h \ + include/grpc/impl/codegen/gpr_types.h \ + include/grpc/impl/codegen/port_platform.h \ + include/grpc/impl/codegen/sync.h \ + include/grpc/impl/codegen/sync_generic.h \ + include/grpc/impl/codegen/sync_posix.h \ + include/grpc/impl/codegen/sync_windows.h \ + include/grpc/byte_buffer.h \ + include/grpc/byte_buffer_reader.h \ + include/grpc/compression.h \ + include/grpc/grpc.h \ + include/grpc/grpc_posix.h \ + include/grpc/grpc_security_constants.h \ + include/grpc/load_reporting.h \ + include/grpc/slice.h \ + include/grpc/slice_buffer.h \ + include/grpc/status.h \ + include/grpc/support/workaround_list.h \ + include/grpc/impl/codegen/byte_buffer_reader.h \ + include/grpc/impl/codegen/compression_types.h \ + include/grpc/impl/codegen/connectivity_state.h \ + include/grpc/impl/codegen/exec_ctx_fwd.h \ + include/grpc/impl/codegen/grpc_types.h \ + include/grpc/impl/codegen/propagation_bits.h \ + include/grpc/impl/codegen/slice.h \ + include/grpc/impl/codegen/status.h \ include/grpc++/impl/codegen/async_stream.h \ include/grpc++/impl/codegen/async_unary_call.h \ include/grpc++/impl/codegen/call.h \ @@ -4678,36 +4747,6 @@ PUBLIC_HEADERS_CXX += \ include/grpc++/impl/codegen/stub_options.h \ include/grpc++/impl/codegen/sync_stream.h \ include/grpc++/impl/codegen/time.h \ - include/grpc/impl/codegen/byte_buffer_reader.h \ - include/grpc/impl/codegen/compression_types.h \ - include/grpc/impl/codegen/connectivity_state.h \ - include/grpc/impl/codegen/exec_ctx_fwd.h \ - include/grpc/impl/codegen/grpc_types.h \ - include/grpc/impl/codegen/propagation_bits.h \ - include/grpc/impl/codegen/slice.h \ - include/grpc/impl/codegen/status.h \ - include/grpc/impl/codegen/atm.h \ - include/grpc/impl/codegen/atm_gcc_atomic.h \ - include/grpc/impl/codegen/atm_gcc_sync.h \ - include/grpc/impl/codegen/atm_windows.h \ - include/grpc/impl/codegen/gpr_slice.h \ - include/grpc/impl/codegen/gpr_types.h \ - include/grpc/impl/codegen/port_platform.h \ - include/grpc/impl/codegen/sync.h \ - include/grpc/impl/codegen/sync_generic.h \ - include/grpc/impl/codegen/sync_posix.h \ - include/grpc/impl/codegen/sync_windows.h \ - include/grpc/byte_buffer.h \ - include/grpc/byte_buffer_reader.h \ - include/grpc/compression.h \ - include/grpc/grpc.h \ - include/grpc/grpc_posix.h \ - include/grpc/grpc_security_constants.h \ - include/grpc/load_reporting.h \ - include/grpc/slice.h \ - include/grpc/slice_buffer.h \ - include/grpc/status.h \ - include/grpc/support/workaround_list.h \ include/grpc/census.h \ LIBGRPC++_CRONET_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBGRPC++_CRONET_SRC)))) @@ -5171,9 +5210,6 @@ LIBGRPC++_UNSECURE_SRC = \ src/cpp/util/status.cc \ src/cpp/util/string_ref.cc \ src/cpp/util/time_cc.cc \ - third_party/nanopb/pb_common.c \ - third_party/nanopb/pb_decode.c \ - third_party/nanopb/pb_encode.c \ src/cpp/codegen/codegen_init.cc \ PUBLIC_HEADERS_CXX += \ @@ -5222,6 +5258,62 @@ PUBLIC_HEADERS_CXX += \ include/grpc++/support/stub_options.h \ include/grpc++/support/sync_stream.h \ include/grpc++/support/time.h \ + 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_windows.h \ + include/grpc/support/avl.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_windows.h \ + include/grpc/support/port_platform.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_windows.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 \ + include/grpc/impl/codegen/atm.h \ + include/grpc/impl/codegen/atm_gcc_atomic.h \ + include/grpc/impl/codegen/atm_gcc_sync.h \ + include/grpc/impl/codegen/atm_windows.h \ + include/grpc/impl/codegen/gpr_slice.h \ + include/grpc/impl/codegen/gpr_types.h \ + include/grpc/impl/codegen/port_platform.h \ + include/grpc/impl/codegen/sync.h \ + include/grpc/impl/codegen/sync_generic.h \ + include/grpc/impl/codegen/sync_posix.h \ + include/grpc/impl/codegen/sync_windows.h \ + include/grpc/byte_buffer.h \ + include/grpc/byte_buffer_reader.h \ + include/grpc/compression.h \ + include/grpc/grpc.h \ + include/grpc/grpc_posix.h \ + include/grpc/grpc_security_constants.h \ + include/grpc/load_reporting.h \ + include/grpc/slice.h \ + include/grpc/slice_buffer.h \ + include/grpc/status.h \ + include/grpc/support/workaround_list.h \ + include/grpc/impl/codegen/byte_buffer_reader.h \ + include/grpc/impl/codegen/compression_types.h \ + include/grpc/impl/codegen/connectivity_state.h \ + include/grpc/impl/codegen/exec_ctx_fwd.h \ + include/grpc/impl/codegen/grpc_types.h \ + include/grpc/impl/codegen/propagation_bits.h \ + include/grpc/impl/codegen/slice.h \ + include/grpc/impl/codegen/status.h \ include/grpc++/impl/codegen/async_stream.h \ include/grpc++/impl/codegen/async_unary_call.h \ include/grpc++/impl/codegen/call.h \ @@ -5251,25 +5343,6 @@ PUBLIC_HEADERS_CXX += \ include/grpc++/impl/codegen/stub_options.h \ include/grpc++/impl/codegen/sync_stream.h \ include/grpc++/impl/codegen/time.h \ - include/grpc/impl/codegen/byte_buffer_reader.h \ - include/grpc/impl/codegen/compression_types.h \ - include/grpc/impl/codegen/connectivity_state.h \ - include/grpc/impl/codegen/exec_ctx_fwd.h \ - include/grpc/impl/codegen/grpc_types.h \ - include/grpc/impl/codegen/propagation_bits.h \ - include/grpc/impl/codegen/slice.h \ - include/grpc/impl/codegen/status.h \ - include/grpc/impl/codegen/atm.h \ - include/grpc/impl/codegen/atm_gcc_atomic.h \ - include/grpc/impl/codegen/atm_gcc_sync.h \ - include/grpc/impl/codegen/atm_windows.h \ - include/grpc/impl/codegen/gpr_slice.h \ - include/grpc/impl/codegen/gpr_types.h \ - include/grpc/impl/codegen/port_platform.h \ - include/grpc/impl/codegen/sync.h \ - include/grpc/impl/codegen/sync_generic.h \ - include/grpc/impl/codegen/sync_posix.h \ - include/grpc/impl/codegen/sync_windows.h \ LIBGRPC++_UNSECURE_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBGRPC++_UNSECURE_SRC)))) @@ -5296,18 +5369,18 @@ endif ifeq ($(SYSTEM),MINGW32) -$(LIBDIR)/$(CONFIG)/grpc++_unsecure$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP): $(LIBGRPC++_UNSECURE_OBJS) $(ZLIB_DEP) $(CARES_DEP) $(PROTOBUF_DEP) $(LIBDIR)/$(CONFIG)/gpr$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/grpc_unsecure$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/grpc$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) +$(LIBDIR)/$(CONFIG)/grpc++_unsecure$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP): $(LIBGRPC++_UNSECURE_OBJS) $(ZLIB_DEP) $(CARES_DEP) $(PROTOBUF_DEP) $(LIBDIR)/$(CONFIG)/gpr$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/grpc_unsecure$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,--output-def=$(LIBDIR)/$(CONFIG)/grpc++_unsecure$(SHARED_VERSION_CPP).def -Wl,--out-implib=$(LIBDIR)/$(CONFIG)/libgrpc++_unsecure$(SHARED_VERSION_CPP)-dll.a -o $(LIBDIR)/$(CONFIG)/grpc++_unsecure$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) $(LIBGRPC++_UNSECURE_OBJS) $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) -lgpr$(SHARED_VERSION_CORE)-dll -lgrpc_unsecure$(SHARED_VERSION_CORE)-dll -lgrpc$(SHARED_VERSION_CORE)-dll + $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,--output-def=$(LIBDIR)/$(CONFIG)/grpc++_unsecure$(SHARED_VERSION_CPP).def -Wl,--out-implib=$(LIBDIR)/$(CONFIG)/libgrpc++_unsecure$(SHARED_VERSION_CPP)-dll.a -o $(LIBDIR)/$(CONFIG)/grpc++_unsecure$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) $(LIBGRPC++_UNSECURE_OBJS) $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) -lgpr$(SHARED_VERSION_CORE)-dll -lgrpc_unsecure$(SHARED_VERSION_CORE)-dll else -$(LIBDIR)/$(CONFIG)/libgrpc++_unsecure$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP): $(LIBGRPC++_UNSECURE_OBJS) $(ZLIB_DEP) $(CARES_DEP) $(PROTOBUF_DEP) $(LIBDIR)/$(CONFIG)/libgpr.$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/libgrpc.$(SHARED_EXT_CORE) +$(LIBDIR)/$(CONFIG)/libgrpc++_unsecure$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP): $(LIBGRPC++_UNSECURE_OBJS) $(ZLIB_DEP) $(CARES_DEP) $(PROTOBUF_DEP) $(LIBDIR)/$(CONFIG)/libgpr.$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.$(SHARED_EXT_CORE) $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` ifeq ($(SYSTEM),Darwin) - $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -install_name $(SHARED_PREFIX)grpc++_unsecure$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) -dynamiclib -o $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) $(LIBGRPC++_UNSECURE_OBJS) $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) -lgpr -lgrpc_unsecure -lgrpc + $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -install_name $(SHARED_PREFIX)grpc++_unsecure$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) -dynamiclib -o $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) $(LIBGRPC++_UNSECURE_OBJS) $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) -lgpr -lgrpc_unsecure else - $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libgrpc++_unsecure.so.1 -o $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) $(LIBGRPC++_UNSECURE_OBJS) $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) -lgpr -lgrpc_unsecure -lgrpc + $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libgrpc++_unsecure.so.1 -o $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) $(LIBGRPC++_UNSECURE_OBJS) $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) -lgpr -lgrpc_unsecure $(Q) ln -sf $(SHARED_PREFIX)grpc++_unsecure$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure$(SHARED_VERSION_CPP).so.1 $(Q) ln -sf $(SHARED_PREFIX)grpc++_unsecure$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure$(SHARED_VERSION_CPP).so endif diff --git a/bazel/grpc_build_system.bzl b/bazel/grpc_build_system.bzl index f793cae56d1..0295adb8ab8 100644 --- a/bazel/grpc_build_system.bzl +++ b/bazel/grpc_build_system.bzl @@ -80,7 +80,7 @@ def grpc_cc_test(name, srcs = [], deps = [], external_deps = [], args = [], data linkopts = ["-pthread"], ) -def grpc_cc_binary(name, srcs = [], deps = [], external_deps = [], args = [], data = [], language = "C++", testonly = False, linkshared = False): +def grpc_cc_binary(name, srcs = [], deps = [], external_deps = [], args = [], data = [], language = "C++", testonly = False, linkshared = False, linkopts = []): copts = [] if language.upper() == "C": copts = ["-std=c99"] @@ -93,7 +93,7 @@ def grpc_cc_binary(name, srcs = [], deps = [], external_deps = [], args = [], da linkshared = linkshared, deps = deps + ["//external:" + dep for dep in external_deps], copts = copts, - linkopts = ["-pthread"], + linkopts = ["-pthread"] + linkopts, ) def grpc_generate_one_off_targets(): diff --git a/build.yaml b/build.yaml index 52ffbc6c582..8dc6a58ec12 100644 --- a/build.yaml +++ b/build.yaml @@ -59,52 +59,6 @@ filegroups: - grpc_base - nanopb - name: gpr_base - 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_windows.h - - include/grpc/support/avl.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_windows.h - - include/grpc/support/port_platform.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_windows.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/lib/profiling/timers.h - - src/core/lib/support/arena.h - - src/core/lib/support/atomic.h - - src/core/lib/support/atomic_with_atm.h - - src/core/lib/support/atomic_with_std.h - - src/core/lib/support/backoff.h - - src/core/lib/support/block_annotate.h - - src/core/lib/support/env.h - - src/core/lib/support/memory.h - - src/core/lib/support/mpscq.h - - src/core/lib/support/murmur_hash.h - - src/core/lib/support/spinlock.h - - src/core/lib/support/stack_lockfree.h - - src/core/lib/support/string.h - - src/core/lib/support/string_windows.h - - src/core/lib/support/thd_internal.h - - src/core/lib/support/time_precise.h - - src/core/lib/support/tmpfile.h src: - src/core/lib/profiling/basic_timers.c - src/core/lib/profiling/stap_timers.c @@ -153,6 +107,55 @@ filegroups: - src/core/lib/support/tmpfile_windows.c - src/core/lib/support/wrap_memcpy.c uses: + - gpr_base_headers +- name: gpr_base_headers + 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_windows.h + - include/grpc/support/avl.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_windows.h + - include/grpc/support/port_platform.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_windows.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/lib/profiling/timers.h + - src/core/lib/support/arena.h + - src/core/lib/support/atomic.h + - src/core/lib/support/atomic_with_atm.h + - src/core/lib/support/atomic_with_std.h + - src/core/lib/support/backoff.h + - src/core/lib/support/block_annotate.h + - src/core/lib/support/env.h + - src/core/lib/support/memory.h + - src/core/lib/support/mpscq.h + - src/core/lib/support/murmur_hash.h + - src/core/lib/support/spinlock.h + - src/core/lib/support/stack_lockfree.h + - src/core/lib/support/string.h + - src/core/lib/support/string_windows.h + - src/core/lib/support/thd_internal.h + - src/core/lib/support/time_precise.h + - src/core/lib/support/tmpfile.h + uses: - gpr_codegen - name: gpr_codegen public_headers: @@ -167,132 +170,19 @@ filegroups: - include/grpc/impl/codegen/sync_generic.h - include/grpc/impl/codegen/sync_posix.h - include/grpc/impl/codegen/sync_windows.h +- name: grpc++_base + deps: + - grpc + uses: + - grpc++_common + - grpc++_codegen_base +- name: grpc++_base_unsecure + deps: + - grpc_unsecure + uses: + - grpc++_common + - grpc++_codegen_base - 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/grpc_posix.h - - include/grpc/grpc_security_constants.h - - include/grpc/load_reporting.h - - include/grpc/slice.h - - include/grpc/slice_buffer.h - - include/grpc/status.h - - include/grpc/support/workaround_list.h - headers: - - src/core/lib/channel/channel_args.h - - src/core/lib/channel/channel_stack.h - - src/core/lib/channel/channel_stack_builder.h - - src/core/lib/channel/connected_channel.h - - src/core/lib/channel/context.h - - src/core/lib/channel/handshaker.h - - src/core/lib/channel/handshaker_factory.h - - src/core/lib/channel/handshaker_registry.h - - src/core/lib/compression/algorithm_metadata.h - - src/core/lib/compression/message_compress.h - - src/core/lib/compression/stream_compression.h - - src/core/lib/http/format_request.h - - src/core/lib/http/httpcli.h - - src/core/lib/http/parser.h - - src/core/lib/iomgr/closure.h - - src/core/lib/iomgr/combiner.h - - src/core/lib/iomgr/endpoint.h - - src/core/lib/iomgr/endpoint_pair.h - - src/core/lib/iomgr/error.h - - src/core/lib/iomgr/error_internal.h - - src/core/lib/iomgr/ev_epoll1_linux.h - - src/core/lib/iomgr/ev_epoll_limited_pollers_linux.h - - src/core/lib/iomgr/ev_epoll_thread_pool_linux.h - - src/core/lib/iomgr/ev_epollex_linux.h - - src/core/lib/iomgr/ev_epollsig_linux.h - - src/core/lib/iomgr/ev_poll_posix.h - - src/core/lib/iomgr/ev_posix.h - - src/core/lib/iomgr/exec_ctx.h - - src/core/lib/iomgr/executor.h - - src/core/lib/iomgr/iocp_windows.h - - src/core/lib/iomgr/iomgr.h - - src/core/lib/iomgr/iomgr_internal.h - - src/core/lib/iomgr/iomgr_posix.h - - src/core/lib/iomgr/iomgr_uv.h - - src/core/lib/iomgr/is_epollexclusive_available.h - - src/core/lib/iomgr/load_file.h - - src/core/lib/iomgr/lockfree_event.h - - src/core/lib/iomgr/nameser.h - - src/core/lib/iomgr/network_status_tracker.h - - src/core/lib/iomgr/polling_entity.h - - src/core/lib/iomgr/pollset.h - - src/core/lib/iomgr/pollset_set.h - - src/core/lib/iomgr/pollset_set_windows.h - - src/core/lib/iomgr/pollset_uv.h - - src/core/lib/iomgr/pollset_windows.h - - src/core/lib/iomgr/port.h - - src/core/lib/iomgr/resolve_address.h - - src/core/lib/iomgr/resource_quota.h - - src/core/lib/iomgr/sockaddr.h - - src/core/lib/iomgr/sockaddr_posix.h - - src/core/lib/iomgr/sockaddr_utils.h - - src/core/lib/iomgr/sockaddr_windows.h - - src/core/lib/iomgr/socket_factory_posix.h - - src/core/lib/iomgr/socket_mutator.h - - src/core/lib/iomgr/socket_utils.h - - src/core/lib/iomgr/socket_utils_posix.h - - src/core/lib/iomgr/socket_windows.h - - src/core/lib/iomgr/sys_epoll_wrapper.h - - src/core/lib/iomgr/tcp_client.h - - src/core/lib/iomgr/tcp_client_posix.h - - src/core/lib/iomgr/tcp_posix.h - - src/core/lib/iomgr/tcp_server.h - - src/core/lib/iomgr/tcp_server_utils_posix.h - - src/core/lib/iomgr/tcp_uv.h - - src/core/lib/iomgr/tcp_windows.h - - src/core/lib/iomgr/time_averaged_stats.h - - src/core/lib/iomgr/timer.h - - src/core/lib/iomgr/timer_generic.h - - src/core/lib/iomgr/timer_heap.h - - src/core/lib/iomgr/timer_manager.h - - src/core/lib/iomgr/timer_uv.h - - src/core/lib/iomgr/udp_server.h - - src/core/lib/iomgr/unix_sockets_posix.h - - src/core/lib/iomgr/wakeup_fd_cv.h - - src/core/lib/iomgr/wakeup_fd_pipe.h - - src/core/lib/iomgr/wakeup_fd_posix.h - - src/core/lib/json/json.h - - src/core/lib/json/json_common.h - - src/core/lib/json/json_reader.h - - src/core/lib/json/json_writer.h - - src/core/lib/slice/b64.h - - src/core/lib/slice/percent_encoding.h - - src/core/lib/slice/slice_hash_table.h - - src/core/lib/slice/slice_internal.h - - src/core/lib/slice/slice_string_helpers.h - - src/core/lib/surface/api_trace.h - - src/core/lib/surface/call.h - - src/core/lib/surface/call_test_only.h - - src/core/lib/surface/channel.h - - src/core/lib/surface/channel_init.h - - src/core/lib/surface/channel_stack_type.h - - src/core/lib/surface/completion_queue.h - - src/core/lib/surface/completion_queue_factory.h - - src/core/lib/surface/event_string.h - - src/core/lib/surface/init.h - - src/core/lib/surface/lame_client.h - - src/core/lib/surface/server.h - - src/core/lib/surface/validate_metadata.h - - src/core/lib/transport/bdp_estimator.h - - src/core/lib/transport/byte_stream.h - - src/core/lib/transport/connectivity_state.h - - src/core/lib/transport/error_utils.h - - src/core/lib/transport/http2_errors.h - - src/core/lib/transport/metadata.h - - src/core/lib/transport/metadata_batch.h - - src/core/lib/transport/pid_controller.h - - src/core/lib/transport/service_config.h - - src/core/lib/transport/static_metadata.h - - src/core/lib/transport/status_conversion.h - - src/core/lib/transport/timeout_encoding.h - - src/core/lib/transport/transport.h - - src/core/lib/transport/transport_impl.h src: - src/core/lib/channel/channel_args.c - src/core/lib/channel/channel_stack.c @@ -421,9 +311,142 @@ filegroups: - src/core/lib/transport/transport_op_string.c deps: - gpr + filegroups: + - grpc_base_headers uses: - grpc_codegen - grpc_trace +- name: grpc_base_headers + public_headers: + - include/grpc/byte_buffer.h + - include/grpc/byte_buffer_reader.h + - include/grpc/compression.h + - include/grpc/grpc.h + - include/grpc/grpc_posix.h + - include/grpc/grpc_security_constants.h + - include/grpc/load_reporting.h + - include/grpc/slice.h + - include/grpc/slice_buffer.h + - include/grpc/status.h + - include/grpc/support/workaround_list.h + headers: + - src/core/lib/channel/channel_args.h + - src/core/lib/channel/channel_stack.h + - src/core/lib/channel/channel_stack_builder.h + - src/core/lib/channel/connected_channel.h + - src/core/lib/channel/context.h + - src/core/lib/channel/handshaker.h + - src/core/lib/channel/handshaker_factory.h + - src/core/lib/channel/handshaker_registry.h + - src/core/lib/compression/algorithm_metadata.h + - src/core/lib/compression/message_compress.h + - src/core/lib/compression/stream_compression.h + - src/core/lib/http/format_request.h + - src/core/lib/http/httpcli.h + - src/core/lib/http/parser.h + - src/core/lib/iomgr/closure.h + - src/core/lib/iomgr/combiner.h + - src/core/lib/iomgr/endpoint.h + - src/core/lib/iomgr/endpoint_pair.h + - src/core/lib/iomgr/error.h + - src/core/lib/iomgr/error_internal.h + - src/core/lib/iomgr/ev_epoll1_linux.h + - src/core/lib/iomgr/ev_epoll_limited_pollers_linux.h + - src/core/lib/iomgr/ev_epoll_thread_pool_linux.h + - src/core/lib/iomgr/ev_epollex_linux.h + - src/core/lib/iomgr/ev_epollsig_linux.h + - src/core/lib/iomgr/ev_poll_posix.h + - src/core/lib/iomgr/ev_posix.h + - src/core/lib/iomgr/exec_ctx.h + - src/core/lib/iomgr/executor.h + - src/core/lib/iomgr/iocp_windows.h + - src/core/lib/iomgr/iomgr.h + - src/core/lib/iomgr/iomgr_internal.h + - src/core/lib/iomgr/iomgr_posix.h + - src/core/lib/iomgr/iomgr_uv.h + - src/core/lib/iomgr/is_epollexclusive_available.h + - src/core/lib/iomgr/load_file.h + - src/core/lib/iomgr/lockfree_event.h + - src/core/lib/iomgr/nameser.h + - src/core/lib/iomgr/network_status_tracker.h + - src/core/lib/iomgr/polling_entity.h + - src/core/lib/iomgr/pollset.h + - src/core/lib/iomgr/pollset_set.h + - src/core/lib/iomgr/pollset_set_windows.h + - src/core/lib/iomgr/pollset_uv.h + - src/core/lib/iomgr/pollset_windows.h + - src/core/lib/iomgr/port.h + - src/core/lib/iomgr/resolve_address.h + - src/core/lib/iomgr/resource_quota.h + - src/core/lib/iomgr/sockaddr.h + - src/core/lib/iomgr/sockaddr_posix.h + - src/core/lib/iomgr/sockaddr_utils.h + - src/core/lib/iomgr/sockaddr_windows.h + - src/core/lib/iomgr/socket_factory_posix.h + - src/core/lib/iomgr/socket_mutator.h + - src/core/lib/iomgr/socket_utils.h + - src/core/lib/iomgr/socket_utils_posix.h + - src/core/lib/iomgr/socket_windows.h + - src/core/lib/iomgr/sys_epoll_wrapper.h + - src/core/lib/iomgr/tcp_client.h + - src/core/lib/iomgr/tcp_client_posix.h + - src/core/lib/iomgr/tcp_posix.h + - src/core/lib/iomgr/tcp_server.h + - src/core/lib/iomgr/tcp_server_utils_posix.h + - src/core/lib/iomgr/tcp_uv.h + - src/core/lib/iomgr/tcp_windows.h + - src/core/lib/iomgr/time_averaged_stats.h + - src/core/lib/iomgr/timer.h + - src/core/lib/iomgr/timer_generic.h + - src/core/lib/iomgr/timer_heap.h + - src/core/lib/iomgr/timer_manager.h + - src/core/lib/iomgr/timer_uv.h + - src/core/lib/iomgr/udp_server.h + - src/core/lib/iomgr/unix_sockets_posix.h + - src/core/lib/iomgr/wakeup_fd_cv.h + - src/core/lib/iomgr/wakeup_fd_pipe.h + - src/core/lib/iomgr/wakeup_fd_posix.h + - src/core/lib/json/json.h + - src/core/lib/json/json_common.h + - src/core/lib/json/json_reader.h + - src/core/lib/json/json_writer.h + - src/core/lib/slice/b64.h + - src/core/lib/slice/percent_encoding.h + - src/core/lib/slice/slice_hash_table.h + - src/core/lib/slice/slice_internal.h + - src/core/lib/slice/slice_string_helpers.h + - src/core/lib/surface/api_trace.h + - src/core/lib/surface/call.h + - src/core/lib/surface/call_test_only.h + - src/core/lib/surface/channel.h + - src/core/lib/surface/channel_init.h + - src/core/lib/surface/channel_stack_type.h + - src/core/lib/surface/completion_queue.h + - src/core/lib/surface/completion_queue_factory.h + - src/core/lib/surface/event_string.h + - src/core/lib/surface/init.h + - src/core/lib/surface/lame_client.h + - src/core/lib/surface/server.h + - src/core/lib/surface/validate_metadata.h + - src/core/lib/transport/bdp_estimator.h + - src/core/lib/transport/byte_stream.h + - src/core/lib/transport/connectivity_state.h + - src/core/lib/transport/error_utils.h + - src/core/lib/transport/http2_errors.h + - src/core/lib/transport/metadata.h + - src/core/lib/transport/metadata_batch.h + - src/core/lib/transport/pid_controller.h + - src/core/lib/transport/service_config.h + - src/core/lib/transport/static_metadata.h + - src/core/lib/transport/status_conversion.h + - src/core/lib/transport/timeout_encoding.h + - src/core/lib/transport/transport.h + - src/core/lib/transport/transport_impl.h + deps: + - gpr + uses: + - grpc_codegen + - grpc_trace_headers - name: grpc_client_channel headers: - src/core/ext/filters/client_channel/client_channel.h @@ -719,12 +742,17 @@ filegroups: - grpc - gpr_test_util - name: grpc_trace - headers: - - src/core/lib/debug/trace.h src: - src/core/lib/debug/trace.c deps: - gpr + filegroups: + - grpc_trace_headers +- name: grpc_trace_headers + headers: + - src/core/lib/debug/trace.h + deps: + - gpr - name: grpc_transport_chttp2 headers: - src/core/ext/transport/chttp2/transport/bin_decoder.h @@ -848,14 +876,18 @@ filegroups: - grpc_transport_chttp2 - grpc_http_filters - name: grpc_transport_inproc - headers: - - src/core/ext/transport/inproc/inproc_transport.h src: - src/core/ext/transport/inproc/inproc_plugin.c - src/core/ext/transport/inproc/inproc_transport.c plugin: grpc_inproc_plugin uses: + - grpc_transport_inproc_headers - grpc_base +- name: grpc_transport_inproc_headers + headers: + - src/core/ext/transport/inproc/inproc_transport.h + uses: + - grpc_base_headers - name: grpc_workaround_cronet_compression_filter headers: - src/core/ext/filters/workarounds/workaround_cronet_compression_filter.h @@ -866,15 +898,18 @@ filegroups: - grpc_base - grpc_server_backward_compatibility - name: nanopb + src: + - third_party/nanopb/pb_common.c + - third_party/nanopb/pb_decode.c + - third_party/nanopb/pb_encode.c + filegroups: + - nanopb_headers +- name: nanopb_headers headers: - third_party/nanopb/pb.h - third_party/nanopb/pb_common.h - third_party/nanopb/pb_decode.h - third_party/nanopb/pb_encode.h - src: - - third_party/nanopb/pb_common.c - - third_party/nanopb/pb_decode.c - - third_party/nanopb/pb_encode.c - name: tsi headers: - src/core/tsi/fake_transport_security.h @@ -897,7 +932,54 @@ filegroups: uses: - grpc_trace - grpc_base -- name: grpc++_base +- name: grpc++_codegen_base + language: c++ + public_headers: + - include/grpc++/impl/codegen/async_stream.h + - include/grpc++/impl/codegen/async_unary_call.h + - include/grpc++/impl/codegen/call.h + - include/grpc++/impl/codegen/call_hook.h + - include/grpc++/impl/codegen/channel_interface.h + - include/grpc++/impl/codegen/client_context.h + - include/grpc++/impl/codegen/client_unary_call.h + - include/grpc++/impl/codegen/completion_queue.h + - include/grpc++/impl/codegen/completion_queue_tag.h + - include/grpc++/impl/codegen/config.h + - include/grpc++/impl/codegen/core_codegen_interface.h + - include/grpc++/impl/codegen/create_auth_context.h + - include/grpc++/impl/codegen/grpc_library.h + - include/grpc++/impl/codegen/metadata_map.h + - include/grpc++/impl/codegen/method_handler_impl.h + - include/grpc++/impl/codegen/rpc_method.h + - include/grpc++/impl/codegen/rpc_service_method.h + - include/grpc++/impl/codegen/security/auth_context.h + - include/grpc++/impl/codegen/serialization_traits.h + - include/grpc++/impl/codegen/server_context.h + - include/grpc++/impl/codegen/server_interface.h + - include/grpc++/impl/codegen/service_type.h + - include/grpc++/impl/codegen/slice.h + - include/grpc++/impl/codegen/status.h + - include/grpc++/impl/codegen/status_code_enum.h + - include/grpc++/impl/codegen/string_ref.h + - include/grpc++/impl/codegen/stub_options.h + - include/grpc++/impl/codegen/sync_stream.h + - include/grpc++/impl/codegen/time.h + uses: + - grpc_codegen +- name: grpc++_codegen_base_src + language: c++ + src: + - src/cpp/codegen/codegen_init.cc + uses: + - grpc++_codegen_base +- name: grpc++_codegen_proto + language: c++ + public_headers: + - include/grpc++/impl/codegen/proto_utils.h + uses: + - grpc++_codegen_base + - grpc++_config_proto +- name: grpc++_common language: c++ public_headers: - include/grpc++/alarm.h @@ -987,58 +1069,12 @@ filegroups: - src/cpp/util/status.cc - src/cpp/util/string_ref.cc - src/cpp/util/time_cc.cc - deps: - - grpc uses: + - gpr_base_headers + - grpc_base_headers + - grpc_transport_inproc_headers - grpc++_codegen_base - - nanopb -- name: grpc++_codegen_base - language: c++ - public_headers: - - include/grpc++/impl/codegen/async_stream.h - - include/grpc++/impl/codegen/async_unary_call.h - - include/grpc++/impl/codegen/call.h - - include/grpc++/impl/codegen/call_hook.h - - include/grpc++/impl/codegen/channel_interface.h - - include/grpc++/impl/codegen/client_context.h - - include/grpc++/impl/codegen/client_unary_call.h - - include/grpc++/impl/codegen/completion_queue.h - - include/grpc++/impl/codegen/completion_queue_tag.h - - include/grpc++/impl/codegen/config.h - - include/grpc++/impl/codegen/core_codegen_interface.h - - include/grpc++/impl/codegen/create_auth_context.h - - include/grpc++/impl/codegen/grpc_library.h - - include/grpc++/impl/codegen/metadata_map.h - - include/grpc++/impl/codegen/method_handler_impl.h - - include/grpc++/impl/codegen/rpc_method.h - - include/grpc++/impl/codegen/rpc_service_method.h - - include/grpc++/impl/codegen/security/auth_context.h - - include/grpc++/impl/codegen/serialization_traits.h - - include/grpc++/impl/codegen/server_context.h - - include/grpc++/impl/codegen/server_interface.h - - include/grpc++/impl/codegen/service_type.h - - include/grpc++/impl/codegen/slice.h - - include/grpc++/impl/codegen/status.h - - include/grpc++/impl/codegen/status_code_enum.h - - include/grpc++/impl/codegen/string_ref.h - - include/grpc++/impl/codegen/stub_options.h - - include/grpc++/impl/codegen/sync_stream.h - - include/grpc++/impl/codegen/time.h - uses: - - grpc_codegen -- name: grpc++_codegen_base_src - language: c++ - src: - - src/cpp/codegen/codegen_init.cc - uses: - - grpc++_codegen_base -- name: grpc++_codegen_proto - language: c++ - public_headers: - - include/grpc++/impl/codegen/proto_utils.h - uses: - - grpc++_codegen_base - - grpc++_config_proto + - nanopb_headers - name: grpc++_config_proto language: c++ public_headers: @@ -1376,7 +1412,7 @@ libs: baselib: true dll: true filegroups: - - grpc++_base + - grpc++_base_unsecure - grpc++_codegen_base - grpc++_codegen_base_src secure: false diff --git a/gRPC-Core.podspec b/gRPC-Core.podspec index 332d331d621..cbef73687ba 100644 --- a/gRPC-Core.podspec +++ b/gRPC-Core.podspec @@ -139,17 +139,6 @@ Pod::Spec.new do |s| 'include/grpc/impl/codegen/sync_generic.h', 'include/grpc/impl/codegen/sync_posix.h', 'include/grpc/impl/codegen/sync_windows.h', - 'include/grpc/byte_buffer.h', - 'include/grpc/byte_buffer_reader.h', - 'include/grpc/compression.h', - 'include/grpc/grpc.h', - 'include/grpc/grpc_posix.h', - 'include/grpc/grpc_security_constants.h', - 'include/grpc/load_reporting.h', - 'include/grpc/slice.h', - 'include/grpc/slice_buffer.h', - 'include/grpc/status.h', - 'include/grpc/support/workaround_list.h', 'include/grpc/impl/codegen/byte_buffer_reader.h', 'include/grpc/impl/codegen/compression_types.h', 'include/grpc/impl/codegen/connectivity_state.h', @@ -170,6 +159,17 @@ Pod::Spec.new do |s| 'include/grpc/impl/codegen/sync_posix.h', 'include/grpc/impl/codegen/sync_windows.h', 'include/grpc/grpc_security.h', + 'include/grpc/byte_buffer.h', + 'include/grpc/byte_buffer_reader.h', + 'include/grpc/compression.h', + 'include/grpc/grpc.h', + 'include/grpc/grpc_posix.h', + 'include/grpc/grpc_security_constants.h', + 'include/grpc/load_reporting.h', + 'include/grpc/slice.h', + 'include/grpc/slice_buffer.h', + 'include/grpc/status.h', + 'include/grpc/support/workaround_list.h', 'include/grpc/census.h' end s.subspec 'Implementation' do |ss| @@ -244,6 +244,77 @@ Pod::Spec.new do |s| 'src/core/lib/support/tmpfile_posix.c', 'src/core/lib/support/tmpfile_windows.c', 'src/core/lib/support/wrap_memcpy.c', + 'src/core/ext/transport/chttp2/transport/bin_decoder.h', + 'src/core/ext/transport/chttp2/transport/bin_encoder.h', + 'src/core/ext/transport/chttp2/transport/chttp2_transport.h', + 'src/core/ext/transport/chttp2/transport/frame.h', + 'src/core/ext/transport/chttp2/transport/frame_data.h', + 'src/core/ext/transport/chttp2/transport/frame_goaway.h', + 'src/core/ext/transport/chttp2/transport/frame_ping.h', + 'src/core/ext/transport/chttp2/transport/frame_rst_stream.h', + 'src/core/ext/transport/chttp2/transport/frame_settings.h', + 'src/core/ext/transport/chttp2/transport/frame_window_update.h', + 'src/core/ext/transport/chttp2/transport/hpack_encoder.h', + 'src/core/ext/transport/chttp2/transport/hpack_parser.h', + 'src/core/ext/transport/chttp2/transport/hpack_table.h', + 'src/core/ext/transport/chttp2/transport/http2_settings.h', + 'src/core/ext/transport/chttp2/transport/huffsyms.h', + 'src/core/ext/transport/chttp2/transport/incoming_metadata.h', + 'src/core/ext/transport/chttp2/transport/internal.h', + 'src/core/ext/transport/chttp2/transport/stream_map.h', + 'src/core/ext/transport/chttp2/transport/varint.h', + 'src/core/ext/transport/chttp2/alpn/alpn.h', + 'src/core/ext/filters/http/client/http_client_filter.h', + 'src/core/ext/filters/http/message_compress/message_compress_filter.h', + 'src/core/ext/filters/http/server/http_server_filter.h', + 'src/core/lib/security/context/security_context.h', + 'src/core/lib/security/credentials/composite/composite_credentials.h', + 'src/core/lib/security/credentials/credentials.h', + 'src/core/lib/security/credentials/fake/fake_credentials.h', + 'src/core/lib/security/credentials/google_default/google_default_credentials.h', + 'src/core/lib/security/credentials/iam/iam_credentials.h', + 'src/core/lib/security/credentials/jwt/json_token.h', + 'src/core/lib/security/credentials/jwt/jwt_credentials.h', + 'src/core/lib/security/credentials/jwt/jwt_verifier.h', + 'src/core/lib/security/credentials/oauth2/oauth2_credentials.h', + 'src/core/lib/security/credentials/plugin/plugin_credentials.h', + 'src/core/lib/security/credentials/ssl/ssl_credentials.h', + 'src/core/lib/security/transport/auth_filters.h', + 'src/core/lib/security/transport/lb_targets_info.h', + 'src/core/lib/security/transport/secure_endpoint.h', + 'src/core/lib/security/transport/security_connector.h', + 'src/core/lib/security/transport/security_handshaker.h', + 'src/core/lib/security/transport/tsi_error.h', + 'src/core/lib/security/util/json_util.h', + 'src/core/tsi/fake_transport_security.h', + 'src/core/tsi/gts_transport_security.h', + 'src/core/tsi/ssl_transport_security.h', + 'src/core/tsi/ssl_types.h', + 'src/core/tsi/transport_security.h', + 'src/core/tsi/transport_security_adapter.h', + 'src/core/tsi/transport_security_interface.h', + 'src/core/ext/transport/chttp2/server/chttp2_server.h', + 'src/core/ext/filters/client_channel/client_channel.h', + 'src/core/ext/filters/client_channel/client_channel_factory.h', + 'src/core/ext/filters/client_channel/connector.h', + 'src/core/ext/filters/client_channel/http_connect_handshaker.h', + 'src/core/ext/filters/client_channel/http_proxy.h', + 'src/core/ext/filters/client_channel/lb_policy.h', + 'src/core/ext/filters/client_channel/lb_policy_factory.h', + 'src/core/ext/filters/client_channel/lb_policy_registry.h', + 'src/core/ext/filters/client_channel/parse_address.h', + 'src/core/ext/filters/client_channel/proxy_mapper.h', + 'src/core/ext/filters/client_channel/proxy_mapper_registry.h', + 'src/core/ext/filters/client_channel/resolver.h', + 'src/core/ext/filters/client_channel/resolver_factory.h', + 'src/core/ext/filters/client_channel/resolver_registry.h', + 'src/core/ext/filters/client_channel/retry_throttle.h', + 'src/core/ext/filters/client_channel/subchannel.h', + 'src/core/ext/filters/client_channel/subchannel_index.h', + 'src/core/ext/filters/client_channel/uri_parser.h', + 'src/core/ext/filters/deadline/deadline_filter.h', + 'src/core/ext/transport/chttp2/client/chttp2_connector.h', + 'src/core/ext/transport/inproc/inproc_transport.h', 'src/core/lib/channel/channel_args.h', 'src/core/lib/channel/channel_stack.h', 'src/core/lib/channel/channel_stack_builder.h', @@ -357,77 +428,6 @@ Pod::Spec.new do |s| 'src/core/lib/transport/transport.h', 'src/core/lib/transport/transport_impl.h', 'src/core/lib/debug/trace.h', - 'src/core/ext/transport/chttp2/transport/bin_decoder.h', - 'src/core/ext/transport/chttp2/transport/bin_encoder.h', - 'src/core/ext/transport/chttp2/transport/chttp2_transport.h', - 'src/core/ext/transport/chttp2/transport/frame.h', - 'src/core/ext/transport/chttp2/transport/frame_data.h', - 'src/core/ext/transport/chttp2/transport/frame_goaway.h', - 'src/core/ext/transport/chttp2/transport/frame_ping.h', - 'src/core/ext/transport/chttp2/transport/frame_rst_stream.h', - 'src/core/ext/transport/chttp2/transport/frame_settings.h', - 'src/core/ext/transport/chttp2/transport/frame_window_update.h', - 'src/core/ext/transport/chttp2/transport/hpack_encoder.h', - 'src/core/ext/transport/chttp2/transport/hpack_parser.h', - 'src/core/ext/transport/chttp2/transport/hpack_table.h', - 'src/core/ext/transport/chttp2/transport/http2_settings.h', - 'src/core/ext/transport/chttp2/transport/huffsyms.h', - 'src/core/ext/transport/chttp2/transport/incoming_metadata.h', - 'src/core/ext/transport/chttp2/transport/internal.h', - 'src/core/ext/transport/chttp2/transport/stream_map.h', - 'src/core/ext/transport/chttp2/transport/varint.h', - 'src/core/ext/transport/chttp2/alpn/alpn.h', - 'src/core/ext/filters/http/client/http_client_filter.h', - 'src/core/ext/filters/http/message_compress/message_compress_filter.h', - 'src/core/ext/filters/http/server/http_server_filter.h', - 'src/core/lib/security/context/security_context.h', - 'src/core/lib/security/credentials/composite/composite_credentials.h', - 'src/core/lib/security/credentials/credentials.h', - 'src/core/lib/security/credentials/fake/fake_credentials.h', - 'src/core/lib/security/credentials/google_default/google_default_credentials.h', - 'src/core/lib/security/credentials/iam/iam_credentials.h', - 'src/core/lib/security/credentials/jwt/json_token.h', - 'src/core/lib/security/credentials/jwt/jwt_credentials.h', - 'src/core/lib/security/credentials/jwt/jwt_verifier.h', - 'src/core/lib/security/credentials/oauth2/oauth2_credentials.h', - 'src/core/lib/security/credentials/plugin/plugin_credentials.h', - 'src/core/lib/security/credentials/ssl/ssl_credentials.h', - 'src/core/lib/security/transport/auth_filters.h', - 'src/core/lib/security/transport/lb_targets_info.h', - 'src/core/lib/security/transport/secure_endpoint.h', - 'src/core/lib/security/transport/security_connector.h', - 'src/core/lib/security/transport/security_handshaker.h', - 'src/core/lib/security/transport/tsi_error.h', - 'src/core/lib/security/util/json_util.h', - 'src/core/tsi/fake_transport_security.h', - 'src/core/tsi/gts_transport_security.h', - 'src/core/tsi/ssl_transport_security.h', - 'src/core/tsi/ssl_types.h', - 'src/core/tsi/transport_security.h', - 'src/core/tsi/transport_security_adapter.h', - 'src/core/tsi/transport_security_interface.h', - 'src/core/ext/transport/chttp2/server/chttp2_server.h', - 'src/core/ext/filters/client_channel/client_channel.h', - 'src/core/ext/filters/client_channel/client_channel_factory.h', - 'src/core/ext/filters/client_channel/connector.h', - 'src/core/ext/filters/client_channel/http_connect_handshaker.h', - 'src/core/ext/filters/client_channel/http_proxy.h', - 'src/core/ext/filters/client_channel/lb_policy.h', - 'src/core/ext/filters/client_channel/lb_policy_factory.h', - 'src/core/ext/filters/client_channel/lb_policy_registry.h', - 'src/core/ext/filters/client_channel/parse_address.h', - 'src/core/ext/filters/client_channel/proxy_mapper.h', - 'src/core/ext/filters/client_channel/proxy_mapper_registry.h', - 'src/core/ext/filters/client_channel/resolver.h', - 'src/core/ext/filters/client_channel/resolver_factory.h', - 'src/core/ext/filters/client_channel/resolver_registry.h', - 'src/core/ext/filters/client_channel/retry_throttle.h', - 'src/core/ext/filters/client_channel/subchannel.h', - 'src/core/ext/filters/client_channel/subchannel_index.h', - 'src/core/ext/filters/client_channel/uri_parser.h', - 'src/core/ext/filters/deadline/deadline_filter.h', - 'src/core/ext/transport/chttp2/client/chttp2_connector.h', - 'src/core/ext/transport/inproc/inproc_transport.h', 'src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.h', 'src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.h', 'src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel.h', @@ -730,6 +730,77 @@ Pod::Spec.new do |s| 'src/core/lib/support/thd_internal.h', 'src/core/lib/support/time_precise.h', 'src/core/lib/support/tmpfile.h', + 'src/core/ext/transport/chttp2/transport/bin_decoder.h', + 'src/core/ext/transport/chttp2/transport/bin_encoder.h', + 'src/core/ext/transport/chttp2/transport/chttp2_transport.h', + 'src/core/ext/transport/chttp2/transport/frame.h', + 'src/core/ext/transport/chttp2/transport/frame_data.h', + 'src/core/ext/transport/chttp2/transport/frame_goaway.h', + 'src/core/ext/transport/chttp2/transport/frame_ping.h', + 'src/core/ext/transport/chttp2/transport/frame_rst_stream.h', + 'src/core/ext/transport/chttp2/transport/frame_settings.h', + 'src/core/ext/transport/chttp2/transport/frame_window_update.h', + 'src/core/ext/transport/chttp2/transport/hpack_encoder.h', + 'src/core/ext/transport/chttp2/transport/hpack_parser.h', + 'src/core/ext/transport/chttp2/transport/hpack_table.h', + 'src/core/ext/transport/chttp2/transport/http2_settings.h', + 'src/core/ext/transport/chttp2/transport/huffsyms.h', + 'src/core/ext/transport/chttp2/transport/incoming_metadata.h', + 'src/core/ext/transport/chttp2/transport/internal.h', + 'src/core/ext/transport/chttp2/transport/stream_map.h', + 'src/core/ext/transport/chttp2/transport/varint.h', + 'src/core/ext/transport/chttp2/alpn/alpn.h', + 'src/core/ext/filters/http/client/http_client_filter.h', + 'src/core/ext/filters/http/message_compress/message_compress_filter.h', + 'src/core/ext/filters/http/server/http_server_filter.h', + 'src/core/lib/security/context/security_context.h', + 'src/core/lib/security/credentials/composite/composite_credentials.h', + 'src/core/lib/security/credentials/credentials.h', + 'src/core/lib/security/credentials/fake/fake_credentials.h', + 'src/core/lib/security/credentials/google_default/google_default_credentials.h', + 'src/core/lib/security/credentials/iam/iam_credentials.h', + 'src/core/lib/security/credentials/jwt/json_token.h', + 'src/core/lib/security/credentials/jwt/jwt_credentials.h', + 'src/core/lib/security/credentials/jwt/jwt_verifier.h', + 'src/core/lib/security/credentials/oauth2/oauth2_credentials.h', + 'src/core/lib/security/credentials/plugin/plugin_credentials.h', + 'src/core/lib/security/credentials/ssl/ssl_credentials.h', + 'src/core/lib/security/transport/auth_filters.h', + 'src/core/lib/security/transport/lb_targets_info.h', + 'src/core/lib/security/transport/secure_endpoint.h', + 'src/core/lib/security/transport/security_connector.h', + 'src/core/lib/security/transport/security_handshaker.h', + 'src/core/lib/security/transport/tsi_error.h', + 'src/core/lib/security/util/json_util.h', + 'src/core/tsi/fake_transport_security.h', + 'src/core/tsi/gts_transport_security.h', + 'src/core/tsi/ssl_transport_security.h', + 'src/core/tsi/ssl_types.h', + 'src/core/tsi/transport_security.h', + 'src/core/tsi/transport_security_adapter.h', + 'src/core/tsi/transport_security_interface.h', + 'src/core/ext/transport/chttp2/server/chttp2_server.h', + 'src/core/ext/filters/client_channel/client_channel.h', + 'src/core/ext/filters/client_channel/client_channel_factory.h', + 'src/core/ext/filters/client_channel/connector.h', + 'src/core/ext/filters/client_channel/http_connect_handshaker.h', + 'src/core/ext/filters/client_channel/http_proxy.h', + 'src/core/ext/filters/client_channel/lb_policy.h', + 'src/core/ext/filters/client_channel/lb_policy_factory.h', + 'src/core/ext/filters/client_channel/lb_policy_registry.h', + 'src/core/ext/filters/client_channel/parse_address.h', + 'src/core/ext/filters/client_channel/proxy_mapper.h', + 'src/core/ext/filters/client_channel/proxy_mapper_registry.h', + 'src/core/ext/filters/client_channel/resolver.h', + 'src/core/ext/filters/client_channel/resolver_factory.h', + 'src/core/ext/filters/client_channel/resolver_registry.h', + 'src/core/ext/filters/client_channel/retry_throttle.h', + 'src/core/ext/filters/client_channel/subchannel.h', + 'src/core/ext/filters/client_channel/subchannel_index.h', + 'src/core/ext/filters/client_channel/uri_parser.h', + 'src/core/ext/filters/deadline/deadline_filter.h', + 'src/core/ext/transport/chttp2/client/chttp2_connector.h', + 'src/core/ext/transport/inproc/inproc_transport.h', 'src/core/lib/channel/channel_args.h', 'src/core/lib/channel/channel_stack.h', 'src/core/lib/channel/channel_stack_builder.h', @@ -843,77 +914,6 @@ Pod::Spec.new do |s| 'src/core/lib/transport/transport.h', 'src/core/lib/transport/transport_impl.h', 'src/core/lib/debug/trace.h', - 'src/core/ext/transport/chttp2/transport/bin_decoder.h', - 'src/core/ext/transport/chttp2/transport/bin_encoder.h', - 'src/core/ext/transport/chttp2/transport/chttp2_transport.h', - 'src/core/ext/transport/chttp2/transport/frame.h', - 'src/core/ext/transport/chttp2/transport/frame_data.h', - 'src/core/ext/transport/chttp2/transport/frame_goaway.h', - 'src/core/ext/transport/chttp2/transport/frame_ping.h', - 'src/core/ext/transport/chttp2/transport/frame_rst_stream.h', - 'src/core/ext/transport/chttp2/transport/frame_settings.h', - 'src/core/ext/transport/chttp2/transport/frame_window_update.h', - 'src/core/ext/transport/chttp2/transport/hpack_encoder.h', - 'src/core/ext/transport/chttp2/transport/hpack_parser.h', - 'src/core/ext/transport/chttp2/transport/hpack_table.h', - 'src/core/ext/transport/chttp2/transport/http2_settings.h', - 'src/core/ext/transport/chttp2/transport/huffsyms.h', - 'src/core/ext/transport/chttp2/transport/incoming_metadata.h', - 'src/core/ext/transport/chttp2/transport/internal.h', - 'src/core/ext/transport/chttp2/transport/stream_map.h', - 'src/core/ext/transport/chttp2/transport/varint.h', - 'src/core/ext/transport/chttp2/alpn/alpn.h', - 'src/core/ext/filters/http/client/http_client_filter.h', - 'src/core/ext/filters/http/message_compress/message_compress_filter.h', - 'src/core/ext/filters/http/server/http_server_filter.h', - 'src/core/lib/security/context/security_context.h', - 'src/core/lib/security/credentials/composite/composite_credentials.h', - 'src/core/lib/security/credentials/credentials.h', - 'src/core/lib/security/credentials/fake/fake_credentials.h', - 'src/core/lib/security/credentials/google_default/google_default_credentials.h', - 'src/core/lib/security/credentials/iam/iam_credentials.h', - 'src/core/lib/security/credentials/jwt/json_token.h', - 'src/core/lib/security/credentials/jwt/jwt_credentials.h', - 'src/core/lib/security/credentials/jwt/jwt_verifier.h', - 'src/core/lib/security/credentials/oauth2/oauth2_credentials.h', - 'src/core/lib/security/credentials/plugin/plugin_credentials.h', - 'src/core/lib/security/credentials/ssl/ssl_credentials.h', - 'src/core/lib/security/transport/auth_filters.h', - 'src/core/lib/security/transport/lb_targets_info.h', - 'src/core/lib/security/transport/secure_endpoint.h', - 'src/core/lib/security/transport/security_connector.h', - 'src/core/lib/security/transport/security_handshaker.h', - 'src/core/lib/security/transport/tsi_error.h', - 'src/core/lib/security/util/json_util.h', - 'src/core/tsi/fake_transport_security.h', - 'src/core/tsi/gts_transport_security.h', - 'src/core/tsi/ssl_transport_security.h', - 'src/core/tsi/ssl_types.h', - 'src/core/tsi/transport_security.h', - 'src/core/tsi/transport_security_adapter.h', - 'src/core/tsi/transport_security_interface.h', - 'src/core/ext/transport/chttp2/server/chttp2_server.h', - 'src/core/ext/filters/client_channel/client_channel.h', - 'src/core/ext/filters/client_channel/client_channel_factory.h', - 'src/core/ext/filters/client_channel/connector.h', - 'src/core/ext/filters/client_channel/http_connect_handshaker.h', - 'src/core/ext/filters/client_channel/http_proxy.h', - 'src/core/ext/filters/client_channel/lb_policy.h', - 'src/core/ext/filters/client_channel/lb_policy_factory.h', - 'src/core/ext/filters/client_channel/lb_policy_registry.h', - 'src/core/ext/filters/client_channel/parse_address.h', - 'src/core/ext/filters/client_channel/proxy_mapper.h', - 'src/core/ext/filters/client_channel/proxy_mapper_registry.h', - 'src/core/ext/filters/client_channel/resolver.h', - 'src/core/ext/filters/client_channel/resolver_factory.h', - 'src/core/ext/filters/client_channel/resolver_registry.h', - 'src/core/ext/filters/client_channel/retry_throttle.h', - 'src/core/ext/filters/client_channel/subchannel.h', - 'src/core/ext/filters/client_channel/subchannel_index.h', - 'src/core/ext/filters/client_channel/uri_parser.h', - 'src/core/ext/filters/deadline/deadline_filter.h', - 'src/core/ext/transport/chttp2/client/chttp2_connector.h', - 'src/core/ext/transport/inproc/inproc_transport.h', 'src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.h', 'src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.h', 'src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel.h', diff --git a/grpc.gemspec b/grpc.gemspec index fee406892cd..7618b2133a5 100755 --- a/grpc.gemspec +++ b/grpc.gemspec @@ -144,17 +144,6 @@ Gem::Specification.new do |s| s.files += %w( src/core/lib/support/tmpfile_posix.c ) s.files += %w( src/core/lib/support/tmpfile_windows.c ) s.files += %w( src/core/lib/support/wrap_memcpy.c ) - s.files += %w( include/grpc/byte_buffer.h ) - s.files += %w( include/grpc/byte_buffer_reader.h ) - s.files += %w( include/grpc/compression.h ) - s.files += %w( include/grpc/grpc.h ) - s.files += %w( include/grpc/grpc_posix.h ) - s.files += %w( include/grpc/grpc_security_constants.h ) - s.files += %w( include/grpc/load_reporting.h ) - s.files += %w( include/grpc/slice.h ) - s.files += %w( include/grpc/slice_buffer.h ) - s.files += %w( include/grpc/status.h ) - s.files += %w( include/grpc/support/workaround_list.h ) s.files += %w( include/grpc/impl/codegen/byte_buffer_reader.h ) s.files += %w( include/grpc/impl/codegen/compression_types.h ) s.files += %w( include/grpc/impl/codegen/connectivity_state.h ) @@ -175,7 +164,89 @@ Gem::Specification.new do |s| s.files += %w( include/grpc/impl/codegen/sync_posix.h ) s.files += %w( include/grpc/impl/codegen/sync_windows.h ) s.files += %w( include/grpc/grpc_security.h ) + s.files += %w( include/grpc/byte_buffer.h ) + s.files += %w( include/grpc/byte_buffer_reader.h ) + s.files += %w( include/grpc/compression.h ) + s.files += %w( include/grpc/grpc.h ) + s.files += %w( include/grpc/grpc_posix.h ) + s.files += %w( include/grpc/grpc_security_constants.h ) + s.files += %w( include/grpc/load_reporting.h ) + s.files += %w( include/grpc/slice.h ) + s.files += %w( include/grpc/slice_buffer.h ) + s.files += %w( include/grpc/status.h ) + s.files += %w( include/grpc/support/workaround_list.h ) s.files += %w( include/grpc/census.h ) + s.files += %w( src/core/ext/transport/chttp2/transport/bin_decoder.h ) + s.files += %w( src/core/ext/transport/chttp2/transport/bin_encoder.h ) + s.files += %w( src/core/ext/transport/chttp2/transport/chttp2_transport.h ) + s.files += %w( src/core/ext/transport/chttp2/transport/frame.h ) + s.files += %w( src/core/ext/transport/chttp2/transport/frame_data.h ) + s.files += %w( src/core/ext/transport/chttp2/transport/frame_goaway.h ) + s.files += %w( src/core/ext/transport/chttp2/transport/frame_ping.h ) + s.files += %w( src/core/ext/transport/chttp2/transport/frame_rst_stream.h ) + s.files += %w( src/core/ext/transport/chttp2/transport/frame_settings.h ) + s.files += %w( src/core/ext/transport/chttp2/transport/frame_window_update.h ) + s.files += %w( src/core/ext/transport/chttp2/transport/hpack_encoder.h ) + s.files += %w( src/core/ext/transport/chttp2/transport/hpack_parser.h ) + s.files += %w( src/core/ext/transport/chttp2/transport/hpack_table.h ) + s.files += %w( src/core/ext/transport/chttp2/transport/http2_settings.h ) + s.files += %w( src/core/ext/transport/chttp2/transport/huffsyms.h ) + s.files += %w( src/core/ext/transport/chttp2/transport/incoming_metadata.h ) + s.files += %w( src/core/ext/transport/chttp2/transport/internal.h ) + s.files += %w( src/core/ext/transport/chttp2/transport/stream_map.h ) + s.files += %w( src/core/ext/transport/chttp2/transport/varint.h ) + s.files += %w( src/core/ext/transport/chttp2/alpn/alpn.h ) + s.files += %w( src/core/ext/filters/http/client/http_client_filter.h ) + s.files += %w( src/core/ext/filters/http/message_compress/message_compress_filter.h ) + s.files += %w( src/core/ext/filters/http/server/http_server_filter.h ) + s.files += %w( src/core/lib/security/context/security_context.h ) + s.files += %w( src/core/lib/security/credentials/composite/composite_credentials.h ) + s.files += %w( src/core/lib/security/credentials/credentials.h ) + s.files += %w( src/core/lib/security/credentials/fake/fake_credentials.h ) + s.files += %w( src/core/lib/security/credentials/google_default/google_default_credentials.h ) + s.files += %w( src/core/lib/security/credentials/iam/iam_credentials.h ) + s.files += %w( src/core/lib/security/credentials/jwt/json_token.h ) + s.files += %w( src/core/lib/security/credentials/jwt/jwt_credentials.h ) + s.files += %w( src/core/lib/security/credentials/jwt/jwt_verifier.h ) + s.files += %w( src/core/lib/security/credentials/oauth2/oauth2_credentials.h ) + s.files += %w( src/core/lib/security/credentials/plugin/plugin_credentials.h ) + s.files += %w( src/core/lib/security/credentials/ssl/ssl_credentials.h ) + s.files += %w( src/core/lib/security/transport/auth_filters.h ) + s.files += %w( src/core/lib/security/transport/lb_targets_info.h ) + s.files += %w( src/core/lib/security/transport/secure_endpoint.h ) + s.files += %w( src/core/lib/security/transport/security_connector.h ) + s.files += %w( src/core/lib/security/transport/security_handshaker.h ) + s.files += %w( src/core/lib/security/transport/tsi_error.h ) + s.files += %w( src/core/lib/security/util/json_util.h ) + s.files += %w( src/core/tsi/fake_transport_security.h ) + s.files += %w( src/core/tsi/gts_transport_security.h ) + s.files += %w( src/core/tsi/ssl_transport_security.h ) + s.files += %w( src/core/tsi/ssl_types.h ) + s.files += %w( src/core/tsi/transport_security.h ) + s.files += %w( src/core/tsi/transport_security_adapter.h ) + s.files += %w( src/core/tsi/transport_security_interface.h ) + s.files += %w( src/core/ext/transport/chttp2/server/chttp2_server.h ) + s.files += %w( src/core/ext/filters/client_channel/client_channel.h ) + s.files += %w( src/core/ext/filters/client_channel/client_channel_factory.h ) + s.files += %w( src/core/ext/filters/client_channel/connector.h ) + s.files += %w( src/core/ext/filters/client_channel/http_connect_handshaker.h ) + s.files += %w( src/core/ext/filters/client_channel/http_proxy.h ) + s.files += %w( src/core/ext/filters/client_channel/lb_policy.h ) + s.files += %w( src/core/ext/filters/client_channel/lb_policy_factory.h ) + s.files += %w( src/core/ext/filters/client_channel/lb_policy_registry.h ) + s.files += %w( src/core/ext/filters/client_channel/parse_address.h ) + s.files += %w( src/core/ext/filters/client_channel/proxy_mapper.h ) + s.files += %w( src/core/ext/filters/client_channel/proxy_mapper_registry.h ) + s.files += %w( src/core/ext/filters/client_channel/resolver.h ) + s.files += %w( src/core/ext/filters/client_channel/resolver_factory.h ) + s.files += %w( src/core/ext/filters/client_channel/resolver_registry.h ) + s.files += %w( src/core/ext/filters/client_channel/retry_throttle.h ) + s.files += %w( src/core/ext/filters/client_channel/subchannel.h ) + s.files += %w( src/core/ext/filters/client_channel/subchannel_index.h ) + s.files += %w( src/core/ext/filters/client_channel/uri_parser.h ) + s.files += %w( src/core/ext/filters/deadline/deadline_filter.h ) + s.files += %w( src/core/ext/transport/chttp2/client/chttp2_connector.h ) + s.files += %w( src/core/ext/transport/inproc/inproc_transport.h ) s.files += %w( src/core/lib/channel/channel_args.h ) s.files += %w( src/core/lib/channel/channel_stack.h ) s.files += %w( src/core/lib/channel/channel_stack_builder.h ) @@ -289,87 +360,12 @@ Gem::Specification.new do |s| s.files += %w( src/core/lib/transport/transport.h ) s.files += %w( src/core/lib/transport/transport_impl.h ) s.files += %w( src/core/lib/debug/trace.h ) - s.files += %w( src/core/ext/transport/chttp2/transport/bin_decoder.h ) - s.files += %w( src/core/ext/transport/chttp2/transport/bin_encoder.h ) - s.files += %w( src/core/ext/transport/chttp2/transport/chttp2_transport.h ) - s.files += %w( src/core/ext/transport/chttp2/transport/frame.h ) - s.files += %w( src/core/ext/transport/chttp2/transport/frame_data.h ) - s.files += %w( src/core/ext/transport/chttp2/transport/frame_goaway.h ) - s.files += %w( src/core/ext/transport/chttp2/transport/frame_ping.h ) - s.files += %w( src/core/ext/transport/chttp2/transport/frame_rst_stream.h ) - s.files += %w( src/core/ext/transport/chttp2/transport/frame_settings.h ) - s.files += %w( src/core/ext/transport/chttp2/transport/frame_window_update.h ) - s.files += %w( src/core/ext/transport/chttp2/transport/hpack_encoder.h ) - s.files += %w( src/core/ext/transport/chttp2/transport/hpack_parser.h ) - s.files += %w( src/core/ext/transport/chttp2/transport/hpack_table.h ) - s.files += %w( src/core/ext/transport/chttp2/transport/http2_settings.h ) - s.files += %w( src/core/ext/transport/chttp2/transport/huffsyms.h ) - s.files += %w( src/core/ext/transport/chttp2/transport/incoming_metadata.h ) - s.files += %w( src/core/ext/transport/chttp2/transport/internal.h ) - s.files += %w( src/core/ext/transport/chttp2/transport/stream_map.h ) - s.files += %w( src/core/ext/transport/chttp2/transport/varint.h ) - s.files += %w( src/core/ext/transport/chttp2/alpn/alpn.h ) - s.files += %w( src/core/ext/filters/http/client/http_client_filter.h ) - s.files += %w( src/core/ext/filters/http/message_compress/message_compress_filter.h ) - s.files += %w( src/core/ext/filters/http/server/http_server_filter.h ) - s.files += %w( src/core/lib/security/context/security_context.h ) - s.files += %w( src/core/lib/security/credentials/composite/composite_credentials.h ) - s.files += %w( src/core/lib/security/credentials/credentials.h ) - s.files += %w( src/core/lib/security/credentials/fake/fake_credentials.h ) - s.files += %w( src/core/lib/security/credentials/google_default/google_default_credentials.h ) - s.files += %w( src/core/lib/security/credentials/iam/iam_credentials.h ) - s.files += %w( src/core/lib/security/credentials/jwt/json_token.h ) - s.files += %w( src/core/lib/security/credentials/jwt/jwt_credentials.h ) - s.files += %w( src/core/lib/security/credentials/jwt/jwt_verifier.h ) - s.files += %w( src/core/lib/security/credentials/oauth2/oauth2_credentials.h ) - s.files += %w( src/core/lib/security/credentials/plugin/plugin_credentials.h ) - s.files += %w( src/core/lib/security/credentials/ssl/ssl_credentials.h ) - s.files += %w( src/core/lib/security/transport/auth_filters.h ) - s.files += %w( src/core/lib/security/transport/lb_targets_info.h ) - s.files += %w( src/core/lib/security/transport/secure_endpoint.h ) - s.files += %w( src/core/lib/security/transport/security_connector.h ) - s.files += %w( src/core/lib/security/transport/security_handshaker.h ) - s.files += %w( src/core/lib/security/transport/tsi_error.h ) - s.files += %w( src/core/lib/security/util/json_util.h ) - s.files += %w( src/core/tsi/fake_transport_security.h ) - s.files += %w( src/core/tsi/gts_transport_security.h ) - s.files += %w( src/core/tsi/ssl_transport_security.h ) - s.files += %w( src/core/tsi/ssl_types.h ) - s.files += %w( src/core/tsi/transport_security.h ) - s.files += %w( src/core/tsi/transport_security_adapter.h ) - s.files += %w( src/core/tsi/transport_security_interface.h ) - s.files += %w( src/core/ext/transport/chttp2/server/chttp2_server.h ) - s.files += %w( src/core/ext/filters/client_channel/client_channel.h ) - s.files += %w( src/core/ext/filters/client_channel/client_channel_factory.h ) - s.files += %w( src/core/ext/filters/client_channel/connector.h ) - s.files += %w( src/core/ext/filters/client_channel/http_connect_handshaker.h ) - s.files += %w( src/core/ext/filters/client_channel/http_proxy.h ) - s.files += %w( src/core/ext/filters/client_channel/lb_policy.h ) - s.files += %w( src/core/ext/filters/client_channel/lb_policy_factory.h ) - s.files += %w( src/core/ext/filters/client_channel/lb_policy_registry.h ) - s.files += %w( src/core/ext/filters/client_channel/parse_address.h ) - s.files += %w( src/core/ext/filters/client_channel/proxy_mapper.h ) - s.files += %w( src/core/ext/filters/client_channel/proxy_mapper_registry.h ) - s.files += %w( src/core/ext/filters/client_channel/resolver.h ) - s.files += %w( src/core/ext/filters/client_channel/resolver_factory.h ) - s.files += %w( src/core/ext/filters/client_channel/resolver_registry.h ) - s.files += %w( src/core/ext/filters/client_channel/retry_throttle.h ) - s.files += %w( src/core/ext/filters/client_channel/subchannel.h ) - s.files += %w( src/core/ext/filters/client_channel/subchannel_index.h ) - s.files += %w( src/core/ext/filters/client_channel/uri_parser.h ) - s.files += %w( src/core/ext/filters/deadline/deadline_filter.h ) - s.files += %w( src/core/ext/transport/chttp2/client/chttp2_connector.h ) - s.files += %w( src/core/ext/transport/inproc/inproc_transport.h ) s.files += %w( src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.h ) s.files += %w( src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.h ) s.files += %w( src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel.h ) s.files += %w( src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.h ) s.files += %w( src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.h ) s.files += %w( src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.h ) - s.files += %w( third_party/nanopb/pb.h ) - s.files += %w( third_party/nanopb/pb_common.h ) - s.files += %w( third_party/nanopb/pb_decode.h ) - s.files += %w( third_party/nanopb/pb_encode.h ) s.files += %w( src/core/ext/filters/client_channel/resolver/fake/fake_resolver.h ) s.files += %w( src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver.h ) s.files += %w( src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.h ) diff --git a/package.xml b/package.xml index 04ab3d2e325..61866f3fafb 100644 --- a/package.xml +++ b/package.xml @@ -158,17 +158,6 @@ - - - - - - - - - - - @@ -189,7 +178,89 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -303,87 +374,12 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/test/cpp/util/BUILD b/test/cpp/util/BUILD index 33240f6f691..c9b0d6c1df7 100644 --- a/test/cpp/util/BUILD +++ b/test/cpp/util/BUILD @@ -30,6 +30,7 @@ grpc_cc_binary( name = "testso.so", srcs = [], linkshared = 1, + linkopts = ['-Wl,--no-undefined'], deps = ["//:grpc++_unsecure"], ) diff --git a/tools/doxygen/Doxyfile.c++ b/tools/doxygen/Doxyfile.c++ index 23746de1aa5..589ef1c328b 100644 --- a/tools/doxygen/Doxyfile.c++ +++ b/tools/doxygen/Doxyfile.c++ @@ -871,6 +871,12 @@ include/grpc++/support/string_ref.h \ include/grpc++/support/stub_options.h \ include/grpc++/support/sync_stream.h \ include/grpc++/support/time.h \ +include/grpc/byte_buffer.h \ +include/grpc/byte_buffer_reader.h \ +include/grpc/compression.h \ +include/grpc/grpc.h \ +include/grpc/grpc_posix.h \ +include/grpc/grpc_security_constants.h \ include/grpc/impl/codegen/atm.h \ include/grpc/impl/codegen/atm_gcc_atomic.h \ include/grpc/impl/codegen/atm_gcc_sync.h \ @@ -889,7 +895,38 @@ include/grpc/impl/codegen/status.h \ include/grpc/impl/codegen/sync.h \ include/grpc/impl/codegen/sync_generic.h \ include/grpc/impl/codegen/sync_posix.h \ -include/grpc/impl/codegen/sync_windows.h +include/grpc/impl/codegen/sync_windows.h \ +include/grpc/load_reporting.h \ +include/grpc/slice.h \ +include/grpc/slice_buffer.h \ +include/grpc/status.h \ +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_windows.h \ +include/grpc/support/avl.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_windows.h \ +include/grpc/support/port_platform.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_windows.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 \ +include/grpc/support/workaround_list.h # This tag can be used to specify the character encoding of the source files # that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses diff --git a/tools/doxygen/Doxyfile.c++.internal b/tools/doxygen/Doxyfile.c++.internal index 52e722f56c9..33524311493 100644 --- a/tools/doxygen/Doxyfile.c++.internal +++ b/tools/doxygen/Doxyfile.c++.internal @@ -872,6 +872,12 @@ include/grpc++/support/string_ref.h \ include/grpc++/support/stub_options.h \ include/grpc++/support/sync_stream.h \ include/grpc++/support/time.h \ +include/grpc/byte_buffer.h \ +include/grpc/byte_buffer_reader.h \ +include/grpc/compression.h \ +include/grpc/grpc.h \ +include/grpc/grpc_posix.h \ +include/grpc/grpc_security_constants.h \ include/grpc/impl/codegen/atm.h \ include/grpc/impl/codegen/atm_gcc_atomic.h \ include/grpc/impl/codegen/atm_gcc_sync.h \ @@ -891,6 +897,169 @@ include/grpc/impl/codegen/sync.h \ include/grpc/impl/codegen/sync_generic.h \ include/grpc/impl/codegen/sync_posix.h \ include/grpc/impl/codegen/sync_windows.h \ +include/grpc/load_reporting.h \ +include/grpc/slice.h \ +include/grpc/slice_buffer.h \ +include/grpc/status.h \ +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_windows.h \ +include/grpc/support/avl.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_windows.h \ +include/grpc/support/port_platform.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_windows.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 \ +include/grpc/support/workaround_list.h \ +src/core/ext/transport/inproc/inproc_transport.h \ +src/core/lib/channel/channel_args.h \ +src/core/lib/channel/channel_stack.h \ +src/core/lib/channel/channel_stack_builder.h \ +src/core/lib/channel/connected_channel.h \ +src/core/lib/channel/context.h \ +src/core/lib/channel/handshaker.h \ +src/core/lib/channel/handshaker_factory.h \ +src/core/lib/channel/handshaker_registry.h \ +src/core/lib/compression/algorithm_metadata.h \ +src/core/lib/compression/message_compress.h \ +src/core/lib/compression/stream_compression.h \ +src/core/lib/debug/trace.h \ +src/core/lib/http/format_request.h \ +src/core/lib/http/httpcli.h \ +src/core/lib/http/parser.h \ +src/core/lib/iomgr/closure.h \ +src/core/lib/iomgr/combiner.h \ +src/core/lib/iomgr/endpoint.h \ +src/core/lib/iomgr/endpoint_pair.h \ +src/core/lib/iomgr/error.h \ +src/core/lib/iomgr/error_internal.h \ +src/core/lib/iomgr/ev_epoll1_linux.h \ +src/core/lib/iomgr/ev_epoll_limited_pollers_linux.h \ +src/core/lib/iomgr/ev_epoll_thread_pool_linux.h \ +src/core/lib/iomgr/ev_epollex_linux.h \ +src/core/lib/iomgr/ev_epollsig_linux.h \ +src/core/lib/iomgr/ev_poll_posix.h \ +src/core/lib/iomgr/ev_posix.h \ +src/core/lib/iomgr/exec_ctx.h \ +src/core/lib/iomgr/executor.h \ +src/core/lib/iomgr/iocp_windows.h \ +src/core/lib/iomgr/iomgr.h \ +src/core/lib/iomgr/iomgr_internal.h \ +src/core/lib/iomgr/iomgr_posix.h \ +src/core/lib/iomgr/iomgr_uv.h \ +src/core/lib/iomgr/is_epollexclusive_available.h \ +src/core/lib/iomgr/load_file.h \ +src/core/lib/iomgr/lockfree_event.h \ +src/core/lib/iomgr/nameser.h \ +src/core/lib/iomgr/network_status_tracker.h \ +src/core/lib/iomgr/polling_entity.h \ +src/core/lib/iomgr/pollset.h \ +src/core/lib/iomgr/pollset_set.h \ +src/core/lib/iomgr/pollset_set_windows.h \ +src/core/lib/iomgr/pollset_uv.h \ +src/core/lib/iomgr/pollset_windows.h \ +src/core/lib/iomgr/port.h \ +src/core/lib/iomgr/resolve_address.h \ +src/core/lib/iomgr/resource_quota.h \ +src/core/lib/iomgr/sockaddr.h \ +src/core/lib/iomgr/sockaddr_posix.h \ +src/core/lib/iomgr/sockaddr_utils.h \ +src/core/lib/iomgr/sockaddr_windows.h \ +src/core/lib/iomgr/socket_factory_posix.h \ +src/core/lib/iomgr/socket_mutator.h \ +src/core/lib/iomgr/socket_utils.h \ +src/core/lib/iomgr/socket_utils_posix.h \ +src/core/lib/iomgr/socket_windows.h \ +src/core/lib/iomgr/sys_epoll_wrapper.h \ +src/core/lib/iomgr/tcp_client.h \ +src/core/lib/iomgr/tcp_client_posix.h \ +src/core/lib/iomgr/tcp_posix.h \ +src/core/lib/iomgr/tcp_server.h \ +src/core/lib/iomgr/tcp_server_utils_posix.h \ +src/core/lib/iomgr/tcp_uv.h \ +src/core/lib/iomgr/tcp_windows.h \ +src/core/lib/iomgr/time_averaged_stats.h \ +src/core/lib/iomgr/timer.h \ +src/core/lib/iomgr/timer_generic.h \ +src/core/lib/iomgr/timer_heap.h \ +src/core/lib/iomgr/timer_manager.h \ +src/core/lib/iomgr/timer_uv.h \ +src/core/lib/iomgr/udp_server.h \ +src/core/lib/iomgr/unix_sockets_posix.h \ +src/core/lib/iomgr/wakeup_fd_cv.h \ +src/core/lib/iomgr/wakeup_fd_pipe.h \ +src/core/lib/iomgr/wakeup_fd_posix.h \ +src/core/lib/json/json.h \ +src/core/lib/json/json_common.h \ +src/core/lib/json/json_reader.h \ +src/core/lib/json/json_writer.h \ +src/core/lib/profiling/timers.h \ +src/core/lib/slice/b64.h \ +src/core/lib/slice/percent_encoding.h \ +src/core/lib/slice/slice_hash_table.h \ +src/core/lib/slice/slice_internal.h \ +src/core/lib/slice/slice_string_helpers.h \ +src/core/lib/support/arena.h \ +src/core/lib/support/atomic.h \ +src/core/lib/support/atomic_with_atm.h \ +src/core/lib/support/atomic_with_std.h \ +src/core/lib/support/backoff.h \ +src/core/lib/support/block_annotate.h \ +src/core/lib/support/env.h \ +src/core/lib/support/memory.h \ +src/core/lib/support/mpscq.h \ +src/core/lib/support/murmur_hash.h \ +src/core/lib/support/spinlock.h \ +src/core/lib/support/stack_lockfree.h \ +src/core/lib/support/string.h \ +src/core/lib/support/string_windows.h \ +src/core/lib/support/thd_internal.h \ +src/core/lib/support/time_precise.h \ +src/core/lib/support/tmpfile.h \ +src/core/lib/surface/api_trace.h \ +src/core/lib/surface/call.h \ +src/core/lib/surface/call_test_only.h \ +src/core/lib/surface/channel.h \ +src/core/lib/surface/channel_init.h \ +src/core/lib/surface/channel_stack_type.h \ +src/core/lib/surface/completion_queue.h \ +src/core/lib/surface/completion_queue_factory.h \ +src/core/lib/surface/event_string.h \ +src/core/lib/surface/init.h \ +src/core/lib/surface/lame_client.h \ +src/core/lib/surface/server.h \ +src/core/lib/surface/validate_metadata.h \ +src/core/lib/transport/bdp_estimator.h \ +src/core/lib/transport/byte_stream.h \ +src/core/lib/transport/connectivity_state.h \ +src/core/lib/transport/error_utils.h \ +src/core/lib/transport/http2_errors.h \ +src/core/lib/transport/metadata.h \ +src/core/lib/transport/metadata_batch.h \ +src/core/lib/transport/pid_controller.h \ +src/core/lib/transport/service_config.h \ +src/core/lib/transport/static_metadata.h \ +src/core/lib/transport/status_conversion.h \ +src/core/lib/transport/timeout_encoding.h \ +src/core/lib/transport/transport.h \ +src/core/lib/transport/transport_impl.h \ src/cpp/README.md \ src/cpp/client/channel_cc.cc \ src/cpp/client/client_context.cc \ @@ -945,11 +1114,8 @@ src/cpp/util/status.cc \ src/cpp/util/string_ref.cc \ src/cpp/util/time_cc.cc \ third_party/nanopb/pb.h \ -third_party/nanopb/pb_common.c \ third_party/nanopb/pb_common.h \ -third_party/nanopb/pb_decode.c \ third_party/nanopb/pb_decode.h \ -third_party/nanopb/pb_encode.c \ third_party/nanopb/pb_encode.h # This tag can be used to specify the character encoding of the source files diff --git a/tools/doxygen/Doxyfile.core.internal b/tools/doxygen/Doxyfile.core.internal index 6e7f92717d6..6a5967ad61e 100644 --- a/tools/doxygen/Doxyfile.core.internal +++ b/tools/doxygen/Doxyfile.core.internal @@ -1416,13 +1416,9 @@ src/core/tsi/transport_security.h \ src/core/tsi/transport_security_adapter.c \ src/core/tsi/transport_security_adapter.h \ src/core/tsi/transport_security_interface.h \ -third_party/nanopb/pb.h \ third_party/nanopb/pb_common.c \ -third_party/nanopb/pb_common.h \ third_party/nanopb/pb_decode.c \ -third_party/nanopb/pb_decode.h \ -third_party/nanopb/pb_encode.c \ -third_party/nanopb/pb_encode.h +third_party/nanopb/pb_encode.c # This tag can be used to specify the character encoding of the source files # that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses diff --git a/tools/run_tests/generated/sources_and_headers.json b/tools/run_tests/generated/sources_and_headers.json index 8d57ea2ede6..9ef1e2b51d0 100644 --- a/tools/run_tests/generated/sources_and_headers.json +++ b/tools/run_tests/generated/sources_and_headers.json @@ -5990,6 +5990,7 @@ }, { "deps": [ + "gpr", "grpc", "grpc++_base", "grpc++_codegen_base", @@ -6177,8 +6178,7 @@ { "deps": [ "gpr", - "grpc", - "grpc++_base", + "grpc++_base_unsecure", "grpc++_codegen_base", "grpc++_codegen_base_src", "grpc_unsecure" @@ -7524,6 +7524,65 @@ "third_party": false, "type": "filegroup" }, + { + "deps": [ + "gpr_base_headers" + ], + "headers": [], + "is_filegroup": true, + "language": "c", + "name": "gpr_base", + "src": [ + "src/core/lib/profiling/basic_timers.c", + "src/core/lib/profiling/stap_timers.c", + "src/core/lib/support/alloc.c", + "src/core/lib/support/arena.c", + "src/core/lib/support/atm.c", + "src/core/lib/support/avl.c", + "src/core/lib/support/backoff.c", + "src/core/lib/support/cmdline.c", + "src/core/lib/support/cpu_iphone.c", + "src/core/lib/support/cpu_linux.c", + "src/core/lib/support/cpu_posix.c", + "src/core/lib/support/cpu_windows.c", + "src/core/lib/support/env_linux.c", + "src/core/lib/support/env_posix.c", + "src/core/lib/support/env_windows.c", + "src/core/lib/support/histogram.c", + "src/core/lib/support/host_port.c", + "src/core/lib/support/log.c", + "src/core/lib/support/log_android.c", + "src/core/lib/support/log_linux.c", + "src/core/lib/support/log_posix.c", + "src/core/lib/support/log_windows.c", + "src/core/lib/support/mpscq.c", + "src/core/lib/support/murmur_hash.c", + "src/core/lib/support/stack_lockfree.c", + "src/core/lib/support/string.c", + "src/core/lib/support/string_posix.c", + "src/core/lib/support/string_util_windows.c", + "src/core/lib/support/string_windows.c", + "src/core/lib/support/subprocess_posix.c", + "src/core/lib/support/subprocess_windows.c", + "src/core/lib/support/sync.c", + "src/core/lib/support/sync_posix.c", + "src/core/lib/support/sync_windows.c", + "src/core/lib/support/thd.c", + "src/core/lib/support/thd_posix.c", + "src/core/lib/support/thd_windows.c", + "src/core/lib/support/time.c", + "src/core/lib/support/time_posix.c", + "src/core/lib/support/time_precise.c", + "src/core/lib/support/time_windows.c", + "src/core/lib/support/tls_pthread.c", + "src/core/lib/support/tmpfile_msys.c", + "src/core/lib/support/tmpfile_posix.c", + "src/core/lib/support/tmpfile_windows.c", + "src/core/lib/support/wrap_memcpy.c" + ], + "third_party": false, + "type": "filegroup" + }, { "deps": [ "gpr_codegen" @@ -7576,7 +7635,7 @@ ], "is_filegroup": true, "language": "c", - "name": "gpr_base", + "name": "gpr_base_headers", "src": [ "include/grpc/support/alloc.h", "include/grpc/support/atm.h", @@ -7604,70 +7663,24 @@ "include/grpc/support/tls_msvc.h", "include/grpc/support/tls_pthread.h", "include/grpc/support/useful.h", - "src/core/lib/profiling/basic_timers.c", - "src/core/lib/profiling/stap_timers.c", "src/core/lib/profiling/timers.h", - "src/core/lib/support/alloc.c", - "src/core/lib/support/arena.c", "src/core/lib/support/arena.h", - "src/core/lib/support/atm.c", "src/core/lib/support/atomic.h", "src/core/lib/support/atomic_with_atm.h", "src/core/lib/support/atomic_with_std.h", - "src/core/lib/support/avl.c", - "src/core/lib/support/backoff.c", "src/core/lib/support/backoff.h", "src/core/lib/support/block_annotate.h", - "src/core/lib/support/cmdline.c", - "src/core/lib/support/cpu_iphone.c", - "src/core/lib/support/cpu_linux.c", - "src/core/lib/support/cpu_posix.c", - "src/core/lib/support/cpu_windows.c", "src/core/lib/support/env.h", - "src/core/lib/support/env_linux.c", - "src/core/lib/support/env_posix.c", - "src/core/lib/support/env_windows.c", - "src/core/lib/support/histogram.c", - "src/core/lib/support/host_port.c", - "src/core/lib/support/log.c", - "src/core/lib/support/log_android.c", - "src/core/lib/support/log_linux.c", - "src/core/lib/support/log_posix.c", - "src/core/lib/support/log_windows.c", "src/core/lib/support/memory.h", - "src/core/lib/support/mpscq.c", "src/core/lib/support/mpscq.h", - "src/core/lib/support/murmur_hash.c", "src/core/lib/support/murmur_hash.h", "src/core/lib/support/spinlock.h", - "src/core/lib/support/stack_lockfree.c", "src/core/lib/support/stack_lockfree.h", - "src/core/lib/support/string.c", "src/core/lib/support/string.h", - "src/core/lib/support/string_posix.c", - "src/core/lib/support/string_util_windows.c", - "src/core/lib/support/string_windows.c", "src/core/lib/support/string_windows.h", - "src/core/lib/support/subprocess_posix.c", - "src/core/lib/support/subprocess_windows.c", - "src/core/lib/support/sync.c", - "src/core/lib/support/sync_posix.c", - "src/core/lib/support/sync_windows.c", - "src/core/lib/support/thd.c", "src/core/lib/support/thd_internal.h", - "src/core/lib/support/thd_posix.c", - "src/core/lib/support/thd_windows.c", - "src/core/lib/support/time.c", - "src/core/lib/support/time_posix.c", - "src/core/lib/support/time_precise.c", "src/core/lib/support/time_precise.h", - "src/core/lib/support/time_windows.c", - "src/core/lib/support/tls_pthread.c", - "src/core/lib/support/tmpfile.h", - "src/core/lib/support/tmpfile_msys.c", - "src/core/lib/support/tmpfile_posix.c", - "src/core/lib/support/tmpfile_windows.c", - "src/core/lib/support/wrap_memcpy.c" + "src/core/lib/support/tmpfile.h" ], "third_party": false, "type": "filegroup" @@ -7709,386 +7722,432 @@ { "deps": [ "gpr", - "grpc_codegen", - "grpc_trace" + "grpc", + "grpc++_codegen_base", + "grpc++_common" ], - "headers": [ - "include/grpc/byte_buffer.h", - "include/grpc/byte_buffer_reader.h", - "include/grpc/compression.h", - "include/grpc/grpc.h", - "include/grpc/grpc_posix.h", - "include/grpc/grpc_security_constants.h", - "include/grpc/load_reporting.h", - "include/grpc/slice.h", - "include/grpc/slice_buffer.h", - "include/grpc/status.h", - "include/grpc/support/workaround_list.h", - "src/core/lib/channel/channel_args.h", - "src/core/lib/channel/channel_stack.h", - "src/core/lib/channel/channel_stack_builder.h", - "src/core/lib/channel/connected_channel.h", - "src/core/lib/channel/context.h", - "src/core/lib/channel/handshaker.h", - "src/core/lib/channel/handshaker_factory.h", - "src/core/lib/channel/handshaker_registry.h", - "src/core/lib/compression/algorithm_metadata.h", - "src/core/lib/compression/message_compress.h", - "src/core/lib/compression/stream_compression.h", - "src/core/lib/http/format_request.h", - "src/core/lib/http/httpcli.h", - "src/core/lib/http/parser.h", - "src/core/lib/iomgr/closure.h", - "src/core/lib/iomgr/combiner.h", - "src/core/lib/iomgr/endpoint.h", - "src/core/lib/iomgr/endpoint_pair.h", - "src/core/lib/iomgr/error.h", - "src/core/lib/iomgr/error_internal.h", - "src/core/lib/iomgr/ev_epoll1_linux.h", - "src/core/lib/iomgr/ev_epoll_limited_pollers_linux.h", - "src/core/lib/iomgr/ev_epoll_thread_pool_linux.h", - "src/core/lib/iomgr/ev_epollex_linux.h", - "src/core/lib/iomgr/ev_epollsig_linux.h", - "src/core/lib/iomgr/ev_poll_posix.h", - "src/core/lib/iomgr/ev_posix.h", - "src/core/lib/iomgr/exec_ctx.h", - "src/core/lib/iomgr/executor.h", - "src/core/lib/iomgr/iocp_windows.h", - "src/core/lib/iomgr/iomgr.h", - "src/core/lib/iomgr/iomgr_internal.h", - "src/core/lib/iomgr/iomgr_posix.h", - "src/core/lib/iomgr/iomgr_uv.h", - "src/core/lib/iomgr/is_epollexclusive_available.h", - "src/core/lib/iomgr/load_file.h", - "src/core/lib/iomgr/lockfree_event.h", - "src/core/lib/iomgr/nameser.h", - "src/core/lib/iomgr/network_status_tracker.h", - "src/core/lib/iomgr/polling_entity.h", - "src/core/lib/iomgr/pollset.h", - "src/core/lib/iomgr/pollset_set.h", - "src/core/lib/iomgr/pollset_set_windows.h", - "src/core/lib/iomgr/pollset_uv.h", - "src/core/lib/iomgr/pollset_windows.h", - "src/core/lib/iomgr/port.h", - "src/core/lib/iomgr/resolve_address.h", - "src/core/lib/iomgr/resource_quota.h", - "src/core/lib/iomgr/sockaddr.h", - "src/core/lib/iomgr/sockaddr_posix.h", - "src/core/lib/iomgr/sockaddr_utils.h", - "src/core/lib/iomgr/sockaddr_windows.h", - "src/core/lib/iomgr/socket_factory_posix.h", - "src/core/lib/iomgr/socket_mutator.h", - "src/core/lib/iomgr/socket_utils.h", - "src/core/lib/iomgr/socket_utils_posix.h", - "src/core/lib/iomgr/socket_windows.h", - "src/core/lib/iomgr/sys_epoll_wrapper.h", - "src/core/lib/iomgr/tcp_client.h", - "src/core/lib/iomgr/tcp_client_posix.h", - "src/core/lib/iomgr/tcp_posix.h", - "src/core/lib/iomgr/tcp_server.h", - "src/core/lib/iomgr/tcp_server_utils_posix.h", - "src/core/lib/iomgr/tcp_uv.h", - "src/core/lib/iomgr/tcp_windows.h", - "src/core/lib/iomgr/time_averaged_stats.h", - "src/core/lib/iomgr/timer.h", - "src/core/lib/iomgr/timer_generic.h", - "src/core/lib/iomgr/timer_heap.h", - "src/core/lib/iomgr/timer_manager.h", - "src/core/lib/iomgr/timer_uv.h", - "src/core/lib/iomgr/udp_server.h", - "src/core/lib/iomgr/unix_sockets_posix.h", - "src/core/lib/iomgr/wakeup_fd_cv.h", - "src/core/lib/iomgr/wakeup_fd_pipe.h", - "src/core/lib/iomgr/wakeup_fd_posix.h", - "src/core/lib/json/json.h", - "src/core/lib/json/json_common.h", - "src/core/lib/json/json_reader.h", - "src/core/lib/json/json_writer.h", - "src/core/lib/slice/b64.h", - "src/core/lib/slice/percent_encoding.h", - "src/core/lib/slice/slice_hash_table.h", - "src/core/lib/slice/slice_internal.h", - "src/core/lib/slice/slice_string_helpers.h", - "src/core/lib/surface/api_trace.h", - "src/core/lib/surface/call.h", - "src/core/lib/surface/call_test_only.h", - "src/core/lib/surface/channel.h", - "src/core/lib/surface/channel_init.h", - "src/core/lib/surface/channel_stack_type.h", - "src/core/lib/surface/completion_queue.h", - "src/core/lib/surface/completion_queue_factory.h", - "src/core/lib/surface/event_string.h", - "src/core/lib/surface/init.h", - "src/core/lib/surface/lame_client.h", - "src/core/lib/surface/server.h", - "src/core/lib/surface/validate_metadata.h", - "src/core/lib/transport/bdp_estimator.h", - "src/core/lib/transport/byte_stream.h", - "src/core/lib/transport/connectivity_state.h", - "src/core/lib/transport/error_utils.h", - "src/core/lib/transport/http2_errors.h", - "src/core/lib/transport/metadata.h", - "src/core/lib/transport/metadata_batch.h", - "src/core/lib/transport/pid_controller.h", - "src/core/lib/transport/service_config.h", - "src/core/lib/transport/static_metadata.h", - "src/core/lib/transport/status_conversion.h", - "src/core/lib/transport/timeout_encoding.h", - "src/core/lib/transport/transport.h", - "src/core/lib/transport/transport_impl.h" + "headers": [], + "is_filegroup": true, + "language": "c", + "name": "grpc++_base", + "src": [], + "third_party": false, + "type": "filegroup" + }, + { + "deps": [ + "gpr", + "grpc++_codegen_base", + "grpc++_common", + "grpc_unsecure" ], + "headers": [], "is_filegroup": true, "language": "c", - "name": "grpc_base", - "src": [ - "include/grpc/byte_buffer.h", - "include/grpc/byte_buffer_reader.h", - "include/grpc/compression.h", - "include/grpc/grpc.h", - "include/grpc/grpc_posix.h", - "include/grpc/grpc_security_constants.h", - "include/grpc/load_reporting.h", - "include/grpc/slice.h", - "include/grpc/slice_buffer.h", - "include/grpc/status.h", - "include/grpc/support/workaround_list.h", + "name": "grpc++_base_unsecure", + "src": [], + "third_party": false, + "type": "filegroup" + }, + { + "deps": [ + "gpr", + "grpc_base_headers", + "grpc_codegen", + "grpc_trace" + ], + "headers": [], + "is_filegroup": true, + "language": "c", + "name": "grpc_base", + "src": [ "src/core/lib/channel/channel_args.c", - "src/core/lib/channel/channel_args.h", "src/core/lib/channel/channel_stack.c", - "src/core/lib/channel/channel_stack.h", "src/core/lib/channel/channel_stack_builder.c", - "src/core/lib/channel/channel_stack_builder.h", "src/core/lib/channel/connected_channel.c", - "src/core/lib/channel/connected_channel.h", - "src/core/lib/channel/context.h", "src/core/lib/channel/handshaker.c", - "src/core/lib/channel/handshaker.h", "src/core/lib/channel/handshaker_factory.c", - "src/core/lib/channel/handshaker_factory.h", "src/core/lib/channel/handshaker_registry.c", - "src/core/lib/channel/handshaker_registry.h", - "src/core/lib/compression/algorithm_metadata.h", "src/core/lib/compression/compression.c", "src/core/lib/compression/message_compress.c", - "src/core/lib/compression/message_compress.h", "src/core/lib/compression/stream_compression.c", - "src/core/lib/compression/stream_compression.h", "src/core/lib/http/format_request.c", - "src/core/lib/http/format_request.h", "src/core/lib/http/httpcli.c", - "src/core/lib/http/httpcli.h", "src/core/lib/http/parser.c", - "src/core/lib/http/parser.h", "src/core/lib/iomgr/closure.c", - "src/core/lib/iomgr/closure.h", "src/core/lib/iomgr/combiner.c", - "src/core/lib/iomgr/combiner.h", "src/core/lib/iomgr/endpoint.c", - "src/core/lib/iomgr/endpoint.h", - "src/core/lib/iomgr/endpoint_pair.h", "src/core/lib/iomgr/endpoint_pair_posix.c", "src/core/lib/iomgr/endpoint_pair_uv.c", "src/core/lib/iomgr/endpoint_pair_windows.c", "src/core/lib/iomgr/error.c", - "src/core/lib/iomgr/error.h", - "src/core/lib/iomgr/error_internal.h", "src/core/lib/iomgr/ev_epoll1_linux.c", - "src/core/lib/iomgr/ev_epoll1_linux.h", "src/core/lib/iomgr/ev_epoll_limited_pollers_linux.c", - "src/core/lib/iomgr/ev_epoll_limited_pollers_linux.h", "src/core/lib/iomgr/ev_epoll_thread_pool_linux.c", - "src/core/lib/iomgr/ev_epoll_thread_pool_linux.h", "src/core/lib/iomgr/ev_epollex_linux.c", - "src/core/lib/iomgr/ev_epollex_linux.h", "src/core/lib/iomgr/ev_epollsig_linux.c", - "src/core/lib/iomgr/ev_epollsig_linux.h", "src/core/lib/iomgr/ev_poll_posix.c", - "src/core/lib/iomgr/ev_poll_posix.h", "src/core/lib/iomgr/ev_posix.c", - "src/core/lib/iomgr/ev_posix.h", "src/core/lib/iomgr/ev_windows.c", "src/core/lib/iomgr/exec_ctx.c", - "src/core/lib/iomgr/exec_ctx.h", "src/core/lib/iomgr/executor.c", - "src/core/lib/iomgr/executor.h", "src/core/lib/iomgr/iocp_windows.c", - "src/core/lib/iomgr/iocp_windows.h", "src/core/lib/iomgr/iomgr.c", - "src/core/lib/iomgr/iomgr.h", - "src/core/lib/iomgr/iomgr_internal.h", "src/core/lib/iomgr/iomgr_posix.c", - "src/core/lib/iomgr/iomgr_posix.h", "src/core/lib/iomgr/iomgr_uv.c", - "src/core/lib/iomgr/iomgr_uv.h", "src/core/lib/iomgr/iomgr_windows.c", "src/core/lib/iomgr/is_epollexclusive_available.c", - "src/core/lib/iomgr/is_epollexclusive_available.h", "src/core/lib/iomgr/load_file.c", - "src/core/lib/iomgr/load_file.h", "src/core/lib/iomgr/lockfree_event.c", - "src/core/lib/iomgr/lockfree_event.h", - "src/core/lib/iomgr/nameser.h", "src/core/lib/iomgr/network_status_tracker.c", - "src/core/lib/iomgr/network_status_tracker.h", "src/core/lib/iomgr/polling_entity.c", - "src/core/lib/iomgr/polling_entity.h", - "src/core/lib/iomgr/pollset.h", - "src/core/lib/iomgr/pollset_set.h", "src/core/lib/iomgr/pollset_set_uv.c", "src/core/lib/iomgr/pollset_set_windows.c", - "src/core/lib/iomgr/pollset_set_windows.h", "src/core/lib/iomgr/pollset_uv.c", - "src/core/lib/iomgr/pollset_uv.h", "src/core/lib/iomgr/pollset_windows.c", - "src/core/lib/iomgr/pollset_windows.h", - "src/core/lib/iomgr/port.h", - "src/core/lib/iomgr/resolve_address.h", "src/core/lib/iomgr/resolve_address_posix.c", "src/core/lib/iomgr/resolve_address_uv.c", "src/core/lib/iomgr/resolve_address_windows.c", "src/core/lib/iomgr/resource_quota.c", - "src/core/lib/iomgr/resource_quota.h", - "src/core/lib/iomgr/sockaddr.h", - "src/core/lib/iomgr/sockaddr_posix.h", "src/core/lib/iomgr/sockaddr_utils.c", - "src/core/lib/iomgr/sockaddr_utils.h", - "src/core/lib/iomgr/sockaddr_windows.h", "src/core/lib/iomgr/socket_factory_posix.c", - "src/core/lib/iomgr/socket_factory_posix.h", "src/core/lib/iomgr/socket_mutator.c", - "src/core/lib/iomgr/socket_mutator.h", - "src/core/lib/iomgr/socket_utils.h", "src/core/lib/iomgr/socket_utils_common_posix.c", "src/core/lib/iomgr/socket_utils_linux.c", "src/core/lib/iomgr/socket_utils_posix.c", - "src/core/lib/iomgr/socket_utils_posix.h", "src/core/lib/iomgr/socket_utils_uv.c", "src/core/lib/iomgr/socket_utils_windows.c", "src/core/lib/iomgr/socket_windows.c", - "src/core/lib/iomgr/socket_windows.h", - "src/core/lib/iomgr/sys_epoll_wrapper.h", - "src/core/lib/iomgr/tcp_client.h", "src/core/lib/iomgr/tcp_client_posix.c", - "src/core/lib/iomgr/tcp_client_posix.h", "src/core/lib/iomgr/tcp_client_uv.c", "src/core/lib/iomgr/tcp_client_windows.c", "src/core/lib/iomgr/tcp_posix.c", - "src/core/lib/iomgr/tcp_posix.h", - "src/core/lib/iomgr/tcp_server.h", "src/core/lib/iomgr/tcp_server_posix.c", - "src/core/lib/iomgr/tcp_server_utils_posix.h", "src/core/lib/iomgr/tcp_server_utils_posix_common.c", "src/core/lib/iomgr/tcp_server_utils_posix_ifaddrs.c", "src/core/lib/iomgr/tcp_server_utils_posix_noifaddrs.c", "src/core/lib/iomgr/tcp_server_uv.c", "src/core/lib/iomgr/tcp_server_windows.c", "src/core/lib/iomgr/tcp_uv.c", - "src/core/lib/iomgr/tcp_uv.h", "src/core/lib/iomgr/tcp_windows.c", - "src/core/lib/iomgr/tcp_windows.h", "src/core/lib/iomgr/time_averaged_stats.c", - "src/core/lib/iomgr/time_averaged_stats.h", - "src/core/lib/iomgr/timer.h", "src/core/lib/iomgr/timer_generic.c", - "src/core/lib/iomgr/timer_generic.h", "src/core/lib/iomgr/timer_heap.c", - "src/core/lib/iomgr/timer_heap.h", "src/core/lib/iomgr/timer_manager.c", - "src/core/lib/iomgr/timer_manager.h", "src/core/lib/iomgr/timer_uv.c", - "src/core/lib/iomgr/timer_uv.h", "src/core/lib/iomgr/udp_server.c", - "src/core/lib/iomgr/udp_server.h", "src/core/lib/iomgr/unix_sockets_posix.c", - "src/core/lib/iomgr/unix_sockets_posix.h", "src/core/lib/iomgr/unix_sockets_posix_noop.c", "src/core/lib/iomgr/wakeup_fd_cv.c", - "src/core/lib/iomgr/wakeup_fd_cv.h", "src/core/lib/iomgr/wakeup_fd_eventfd.c", "src/core/lib/iomgr/wakeup_fd_nospecial.c", "src/core/lib/iomgr/wakeup_fd_pipe.c", - "src/core/lib/iomgr/wakeup_fd_pipe.h", "src/core/lib/iomgr/wakeup_fd_posix.c", - "src/core/lib/iomgr/wakeup_fd_posix.h", "src/core/lib/json/json.c", - "src/core/lib/json/json.h", - "src/core/lib/json/json_common.h", "src/core/lib/json/json_reader.c", - "src/core/lib/json/json_reader.h", "src/core/lib/json/json_string.c", "src/core/lib/json/json_writer.c", - "src/core/lib/json/json_writer.h", "src/core/lib/slice/b64.c", - "src/core/lib/slice/b64.h", "src/core/lib/slice/percent_encoding.c", - "src/core/lib/slice/percent_encoding.h", "src/core/lib/slice/slice.c", "src/core/lib/slice/slice_buffer.c", "src/core/lib/slice/slice_hash_table.c", - "src/core/lib/slice/slice_hash_table.h", "src/core/lib/slice/slice_intern.c", - "src/core/lib/slice/slice_internal.h", "src/core/lib/slice/slice_string_helpers.c", - "src/core/lib/slice/slice_string_helpers.h", "src/core/lib/surface/alarm.c", "src/core/lib/surface/api_trace.c", - "src/core/lib/surface/api_trace.h", "src/core/lib/surface/byte_buffer.c", "src/core/lib/surface/byte_buffer_reader.c", "src/core/lib/surface/call.c", - "src/core/lib/surface/call.h", "src/core/lib/surface/call_details.c", "src/core/lib/surface/call_log_batch.c", - "src/core/lib/surface/call_test_only.h", "src/core/lib/surface/channel.c", - "src/core/lib/surface/channel.h", "src/core/lib/surface/channel_init.c", - "src/core/lib/surface/channel_init.h", "src/core/lib/surface/channel_ping.c", "src/core/lib/surface/channel_stack_type.c", - "src/core/lib/surface/channel_stack_type.h", "src/core/lib/surface/completion_queue.c", - "src/core/lib/surface/completion_queue.h", "src/core/lib/surface/completion_queue_factory.c", - "src/core/lib/surface/completion_queue_factory.h", "src/core/lib/surface/event_string.c", - "src/core/lib/surface/event_string.h", - "src/core/lib/surface/init.h", "src/core/lib/surface/lame_client.cc", - "src/core/lib/surface/lame_client.h", "src/core/lib/surface/metadata_array.c", "src/core/lib/surface/server.c", - "src/core/lib/surface/server.h", "src/core/lib/surface/validate_metadata.c", - "src/core/lib/surface/validate_metadata.h", "src/core/lib/surface/version.c", "src/core/lib/transport/bdp_estimator.c", - "src/core/lib/transport/bdp_estimator.h", "src/core/lib/transport/byte_stream.c", - "src/core/lib/transport/byte_stream.h", "src/core/lib/transport/connectivity_state.c", - "src/core/lib/transport/connectivity_state.h", "src/core/lib/transport/error_utils.c", + "src/core/lib/transport/metadata.c", + "src/core/lib/transport/metadata_batch.c", + "src/core/lib/transport/pid_controller.c", + "src/core/lib/transport/service_config.c", + "src/core/lib/transport/static_metadata.c", + "src/core/lib/transport/status_conversion.c", + "src/core/lib/transport/timeout_encoding.c", + "src/core/lib/transport/transport.c", + "src/core/lib/transport/transport_op_string.c" + ], + "third_party": false, + "type": "filegroup" + }, + { + "deps": [ + "gpr", + "grpc_codegen", + "grpc_trace_headers" + ], + "headers": [ + "include/grpc/byte_buffer.h", + "include/grpc/byte_buffer_reader.h", + "include/grpc/compression.h", + "include/grpc/grpc.h", + "include/grpc/grpc_posix.h", + "include/grpc/grpc_security_constants.h", + "include/grpc/load_reporting.h", + "include/grpc/slice.h", + "include/grpc/slice_buffer.h", + "include/grpc/status.h", + "include/grpc/support/workaround_list.h", + "src/core/lib/channel/channel_args.h", + "src/core/lib/channel/channel_stack.h", + "src/core/lib/channel/channel_stack_builder.h", + "src/core/lib/channel/connected_channel.h", + "src/core/lib/channel/context.h", + "src/core/lib/channel/handshaker.h", + "src/core/lib/channel/handshaker_factory.h", + "src/core/lib/channel/handshaker_registry.h", + "src/core/lib/compression/algorithm_metadata.h", + "src/core/lib/compression/message_compress.h", + "src/core/lib/compression/stream_compression.h", + "src/core/lib/http/format_request.h", + "src/core/lib/http/httpcli.h", + "src/core/lib/http/parser.h", + "src/core/lib/iomgr/closure.h", + "src/core/lib/iomgr/combiner.h", + "src/core/lib/iomgr/endpoint.h", + "src/core/lib/iomgr/endpoint_pair.h", + "src/core/lib/iomgr/error.h", + "src/core/lib/iomgr/error_internal.h", + "src/core/lib/iomgr/ev_epoll1_linux.h", + "src/core/lib/iomgr/ev_epoll_limited_pollers_linux.h", + "src/core/lib/iomgr/ev_epoll_thread_pool_linux.h", + "src/core/lib/iomgr/ev_epollex_linux.h", + "src/core/lib/iomgr/ev_epollsig_linux.h", + "src/core/lib/iomgr/ev_poll_posix.h", + "src/core/lib/iomgr/ev_posix.h", + "src/core/lib/iomgr/exec_ctx.h", + "src/core/lib/iomgr/executor.h", + "src/core/lib/iomgr/iocp_windows.h", + "src/core/lib/iomgr/iomgr.h", + "src/core/lib/iomgr/iomgr_internal.h", + "src/core/lib/iomgr/iomgr_posix.h", + "src/core/lib/iomgr/iomgr_uv.h", + "src/core/lib/iomgr/is_epollexclusive_available.h", + "src/core/lib/iomgr/load_file.h", + "src/core/lib/iomgr/lockfree_event.h", + "src/core/lib/iomgr/nameser.h", + "src/core/lib/iomgr/network_status_tracker.h", + "src/core/lib/iomgr/polling_entity.h", + "src/core/lib/iomgr/pollset.h", + "src/core/lib/iomgr/pollset_set.h", + "src/core/lib/iomgr/pollset_set_windows.h", + "src/core/lib/iomgr/pollset_uv.h", + "src/core/lib/iomgr/pollset_windows.h", + "src/core/lib/iomgr/port.h", + "src/core/lib/iomgr/resolve_address.h", + "src/core/lib/iomgr/resource_quota.h", + "src/core/lib/iomgr/sockaddr.h", + "src/core/lib/iomgr/sockaddr_posix.h", + "src/core/lib/iomgr/sockaddr_utils.h", + "src/core/lib/iomgr/sockaddr_windows.h", + "src/core/lib/iomgr/socket_factory_posix.h", + "src/core/lib/iomgr/socket_mutator.h", + "src/core/lib/iomgr/socket_utils.h", + "src/core/lib/iomgr/socket_utils_posix.h", + "src/core/lib/iomgr/socket_windows.h", + "src/core/lib/iomgr/sys_epoll_wrapper.h", + "src/core/lib/iomgr/tcp_client.h", + "src/core/lib/iomgr/tcp_client_posix.h", + "src/core/lib/iomgr/tcp_posix.h", + "src/core/lib/iomgr/tcp_server.h", + "src/core/lib/iomgr/tcp_server_utils_posix.h", + "src/core/lib/iomgr/tcp_uv.h", + "src/core/lib/iomgr/tcp_windows.h", + "src/core/lib/iomgr/time_averaged_stats.h", + "src/core/lib/iomgr/timer.h", + "src/core/lib/iomgr/timer_generic.h", + "src/core/lib/iomgr/timer_heap.h", + "src/core/lib/iomgr/timer_manager.h", + "src/core/lib/iomgr/timer_uv.h", + "src/core/lib/iomgr/udp_server.h", + "src/core/lib/iomgr/unix_sockets_posix.h", + "src/core/lib/iomgr/wakeup_fd_cv.h", + "src/core/lib/iomgr/wakeup_fd_pipe.h", + "src/core/lib/iomgr/wakeup_fd_posix.h", + "src/core/lib/json/json.h", + "src/core/lib/json/json_common.h", + "src/core/lib/json/json_reader.h", + "src/core/lib/json/json_writer.h", + "src/core/lib/slice/b64.h", + "src/core/lib/slice/percent_encoding.h", + "src/core/lib/slice/slice_hash_table.h", + "src/core/lib/slice/slice_internal.h", + "src/core/lib/slice/slice_string_helpers.h", + "src/core/lib/surface/api_trace.h", + "src/core/lib/surface/call.h", + "src/core/lib/surface/call_test_only.h", + "src/core/lib/surface/channel.h", + "src/core/lib/surface/channel_init.h", + "src/core/lib/surface/channel_stack_type.h", + "src/core/lib/surface/completion_queue.h", + "src/core/lib/surface/completion_queue_factory.h", + "src/core/lib/surface/event_string.h", + "src/core/lib/surface/init.h", + "src/core/lib/surface/lame_client.h", + "src/core/lib/surface/server.h", + "src/core/lib/surface/validate_metadata.h", + "src/core/lib/transport/bdp_estimator.h", + "src/core/lib/transport/byte_stream.h", + "src/core/lib/transport/connectivity_state.h", + "src/core/lib/transport/error_utils.h", + "src/core/lib/transport/http2_errors.h", + "src/core/lib/transport/metadata.h", + "src/core/lib/transport/metadata_batch.h", + "src/core/lib/transport/pid_controller.h", + "src/core/lib/transport/service_config.h", + "src/core/lib/transport/static_metadata.h", + "src/core/lib/transport/status_conversion.h", + "src/core/lib/transport/timeout_encoding.h", + "src/core/lib/transport/transport.h", + "src/core/lib/transport/transport_impl.h" + ], + "is_filegroup": true, + "language": "c", + "name": "grpc_base_headers", + "src": [ + "include/grpc/byte_buffer.h", + "include/grpc/byte_buffer_reader.h", + "include/grpc/compression.h", + "include/grpc/grpc.h", + "include/grpc/grpc_posix.h", + "include/grpc/grpc_security_constants.h", + "include/grpc/load_reporting.h", + "include/grpc/slice.h", + "include/grpc/slice_buffer.h", + "include/grpc/status.h", + "include/grpc/support/workaround_list.h", + "src/core/lib/channel/channel_args.h", + "src/core/lib/channel/channel_stack.h", + "src/core/lib/channel/channel_stack_builder.h", + "src/core/lib/channel/connected_channel.h", + "src/core/lib/channel/context.h", + "src/core/lib/channel/handshaker.h", + "src/core/lib/channel/handshaker_factory.h", + "src/core/lib/channel/handshaker_registry.h", + "src/core/lib/compression/algorithm_metadata.h", + "src/core/lib/compression/message_compress.h", + "src/core/lib/compression/stream_compression.h", + "src/core/lib/http/format_request.h", + "src/core/lib/http/httpcli.h", + "src/core/lib/http/parser.h", + "src/core/lib/iomgr/closure.h", + "src/core/lib/iomgr/combiner.h", + "src/core/lib/iomgr/endpoint.h", + "src/core/lib/iomgr/endpoint_pair.h", + "src/core/lib/iomgr/error.h", + "src/core/lib/iomgr/error_internal.h", + "src/core/lib/iomgr/ev_epoll1_linux.h", + "src/core/lib/iomgr/ev_epoll_limited_pollers_linux.h", + "src/core/lib/iomgr/ev_epoll_thread_pool_linux.h", + "src/core/lib/iomgr/ev_epollex_linux.h", + "src/core/lib/iomgr/ev_epollsig_linux.h", + "src/core/lib/iomgr/ev_poll_posix.h", + "src/core/lib/iomgr/ev_posix.h", + "src/core/lib/iomgr/exec_ctx.h", + "src/core/lib/iomgr/executor.h", + "src/core/lib/iomgr/iocp_windows.h", + "src/core/lib/iomgr/iomgr.h", + "src/core/lib/iomgr/iomgr_internal.h", + "src/core/lib/iomgr/iomgr_posix.h", + "src/core/lib/iomgr/iomgr_uv.h", + "src/core/lib/iomgr/is_epollexclusive_available.h", + "src/core/lib/iomgr/load_file.h", + "src/core/lib/iomgr/lockfree_event.h", + "src/core/lib/iomgr/nameser.h", + "src/core/lib/iomgr/network_status_tracker.h", + "src/core/lib/iomgr/polling_entity.h", + "src/core/lib/iomgr/pollset.h", + "src/core/lib/iomgr/pollset_set.h", + "src/core/lib/iomgr/pollset_set_windows.h", + "src/core/lib/iomgr/pollset_uv.h", + "src/core/lib/iomgr/pollset_windows.h", + "src/core/lib/iomgr/port.h", + "src/core/lib/iomgr/resolve_address.h", + "src/core/lib/iomgr/resource_quota.h", + "src/core/lib/iomgr/sockaddr.h", + "src/core/lib/iomgr/sockaddr_posix.h", + "src/core/lib/iomgr/sockaddr_utils.h", + "src/core/lib/iomgr/sockaddr_windows.h", + "src/core/lib/iomgr/socket_factory_posix.h", + "src/core/lib/iomgr/socket_mutator.h", + "src/core/lib/iomgr/socket_utils.h", + "src/core/lib/iomgr/socket_utils_posix.h", + "src/core/lib/iomgr/socket_windows.h", + "src/core/lib/iomgr/sys_epoll_wrapper.h", + "src/core/lib/iomgr/tcp_client.h", + "src/core/lib/iomgr/tcp_client_posix.h", + "src/core/lib/iomgr/tcp_posix.h", + "src/core/lib/iomgr/tcp_server.h", + "src/core/lib/iomgr/tcp_server_utils_posix.h", + "src/core/lib/iomgr/tcp_uv.h", + "src/core/lib/iomgr/tcp_windows.h", + "src/core/lib/iomgr/time_averaged_stats.h", + "src/core/lib/iomgr/timer.h", + "src/core/lib/iomgr/timer_generic.h", + "src/core/lib/iomgr/timer_heap.h", + "src/core/lib/iomgr/timer_manager.h", + "src/core/lib/iomgr/timer_uv.h", + "src/core/lib/iomgr/udp_server.h", + "src/core/lib/iomgr/unix_sockets_posix.h", + "src/core/lib/iomgr/wakeup_fd_cv.h", + "src/core/lib/iomgr/wakeup_fd_pipe.h", + "src/core/lib/iomgr/wakeup_fd_posix.h", + "src/core/lib/json/json.h", + "src/core/lib/json/json_common.h", + "src/core/lib/json/json_reader.h", + "src/core/lib/json/json_writer.h", + "src/core/lib/slice/b64.h", + "src/core/lib/slice/percent_encoding.h", + "src/core/lib/slice/slice_hash_table.h", + "src/core/lib/slice/slice_internal.h", + "src/core/lib/slice/slice_string_helpers.h", + "src/core/lib/surface/api_trace.h", + "src/core/lib/surface/call.h", + "src/core/lib/surface/call_test_only.h", + "src/core/lib/surface/channel.h", + "src/core/lib/surface/channel_init.h", + "src/core/lib/surface/channel_stack_type.h", + "src/core/lib/surface/completion_queue.h", + "src/core/lib/surface/completion_queue_factory.h", + "src/core/lib/surface/event_string.h", + "src/core/lib/surface/init.h", + "src/core/lib/surface/lame_client.h", + "src/core/lib/surface/server.h", + "src/core/lib/surface/validate_metadata.h", + "src/core/lib/transport/bdp_estimator.h", + "src/core/lib/transport/byte_stream.h", + "src/core/lib/transport/connectivity_state.h", "src/core/lib/transport/error_utils.h", "src/core/lib/transport/http2_errors.h", - "src/core/lib/transport/metadata.c", "src/core/lib/transport/metadata.h", - "src/core/lib/transport/metadata_batch.c", "src/core/lib/transport/metadata_batch.h", - "src/core/lib/transport/pid_controller.c", "src/core/lib/transport/pid_controller.h", - "src/core/lib/transport/service_config.c", "src/core/lib/transport/service_config.h", - "src/core/lib/transport/static_metadata.c", "src/core/lib/transport/static_metadata.h", - "src/core/lib/transport/status_conversion.c", "src/core/lib/transport/status_conversion.h", - "src/core/lib/transport/timeout_encoding.c", "src/core/lib/transport/timeout_encoding.h", - "src/core/lib/transport/transport.c", "src/core/lib/transport/transport.h", - "src/core/lib/transport/transport_impl.h", - "src/core/lib/transport/transport_op_string.c" + "src/core/lib/transport/transport_impl.h" ], "third_party": false, "type": "filegroup" @@ -8634,6 +8693,21 @@ "third_party": false, "type": "filegroup" }, + { + "deps": [ + "gpr", + "grpc_trace_headers" + ], + "headers": [], + "is_filegroup": true, + "language": "c", + "name": "grpc_trace", + "src": [ + "src/core/lib/debug/trace.c" + ], + "third_party": false, + "type": "filegroup" + }, { "deps": [ "gpr" @@ -8643,9 +8717,8 @@ ], "is_filegroup": true, "language": "c", - "name": "grpc_trace", + "name": "grpc_trace_headers", "src": [ - "src/core/lib/debug/trace.c", "src/core/lib/debug/trace.h" ], "third_party": false, @@ -8888,17 +8961,32 @@ { "deps": [ "gpr", - "grpc_base" + "grpc_base", + "grpc_transport_inproc_headers" + ], + "headers": [], + "is_filegroup": true, + "language": "c", + "name": "grpc_transport_inproc", + "src": [ + "src/core/ext/transport/inproc/inproc_plugin.c", + "src/core/ext/transport/inproc/inproc_transport.c" + ], + "third_party": false, + "type": "filegroup" + }, + { + "deps": [ + "gpr", + "grpc_base_headers" ], "headers": [ "src/core/ext/transport/inproc/inproc_transport.h" ], "is_filegroup": true, "language": "c", - "name": "grpc_transport_inproc", + "name": "grpc_transport_inproc_headers", "src": [ - "src/core/ext/transport/inproc/inproc_plugin.c", - "src/core/ext/transport/inproc/inproc_transport.c", "src/core/ext/transport/inproc/inproc_transport.h" ], "third_party": false, @@ -8923,6 +9011,18 @@ "third_party": false, "type": "filegroup" }, + { + "deps": [ + "nanopb_headers" + ], + "headers": [], + "is_filegroup": true, + "language": "c", + "name": "nanopb", + "src": [], + "third_party": false, + "type": "filegroup" + }, { "deps": [], "headers": [ @@ -8933,7 +9033,7 @@ ], "is_filegroup": true, "language": "c", - "name": "nanopb", + "name": "nanopb_headers", "src": [], "third_party": false, "type": "filegroup" @@ -8975,9 +9075,115 @@ }, { "deps": [ - "grpc", + "grpc_codegen" + ], + "headers": [ + "include/grpc++/impl/codegen/async_stream.h", + "include/grpc++/impl/codegen/async_unary_call.h", + "include/grpc++/impl/codegen/call.h", + "include/grpc++/impl/codegen/call_hook.h", + "include/grpc++/impl/codegen/channel_interface.h", + "include/grpc++/impl/codegen/client_context.h", + "include/grpc++/impl/codegen/client_unary_call.h", + "include/grpc++/impl/codegen/completion_queue.h", + "include/grpc++/impl/codegen/completion_queue_tag.h", + "include/grpc++/impl/codegen/config.h", + "include/grpc++/impl/codegen/core_codegen_interface.h", + "include/grpc++/impl/codegen/create_auth_context.h", + "include/grpc++/impl/codegen/grpc_library.h", + "include/grpc++/impl/codegen/metadata_map.h", + "include/grpc++/impl/codegen/method_handler_impl.h", + "include/grpc++/impl/codegen/rpc_method.h", + "include/grpc++/impl/codegen/rpc_service_method.h", + "include/grpc++/impl/codegen/security/auth_context.h", + "include/grpc++/impl/codegen/serialization_traits.h", + "include/grpc++/impl/codegen/server_context.h", + "include/grpc++/impl/codegen/server_interface.h", + "include/grpc++/impl/codegen/service_type.h", + "include/grpc++/impl/codegen/slice.h", + "include/grpc++/impl/codegen/status.h", + "include/grpc++/impl/codegen/status_code_enum.h", + "include/grpc++/impl/codegen/string_ref.h", + "include/grpc++/impl/codegen/stub_options.h", + "include/grpc++/impl/codegen/sync_stream.h", + "include/grpc++/impl/codegen/time.h" + ], + "is_filegroup": true, + "language": "c++", + "name": "grpc++_codegen_base", + "src": [ + "include/grpc++/impl/codegen/async_stream.h", + "include/grpc++/impl/codegen/async_unary_call.h", + "include/grpc++/impl/codegen/call.h", + "include/grpc++/impl/codegen/call_hook.h", + "include/grpc++/impl/codegen/channel_interface.h", + "include/grpc++/impl/codegen/client_context.h", + "include/grpc++/impl/codegen/client_unary_call.h", + "include/grpc++/impl/codegen/completion_queue.h", + "include/grpc++/impl/codegen/completion_queue_tag.h", + "include/grpc++/impl/codegen/config.h", + "include/grpc++/impl/codegen/core_codegen_interface.h", + "include/grpc++/impl/codegen/create_auth_context.h", + "include/grpc++/impl/codegen/grpc_library.h", + "include/grpc++/impl/codegen/metadata_map.h", + "include/grpc++/impl/codegen/method_handler_impl.h", + "include/grpc++/impl/codegen/rpc_method.h", + "include/grpc++/impl/codegen/rpc_service_method.h", + "include/grpc++/impl/codegen/security/auth_context.h", + "include/grpc++/impl/codegen/serialization_traits.h", + "include/grpc++/impl/codegen/server_context.h", + "include/grpc++/impl/codegen/server_interface.h", + "include/grpc++/impl/codegen/service_type.h", + "include/grpc++/impl/codegen/slice.h", + "include/grpc++/impl/codegen/status.h", + "include/grpc++/impl/codegen/status_code_enum.h", + "include/grpc++/impl/codegen/string_ref.h", + "include/grpc++/impl/codegen/stub_options.h", + "include/grpc++/impl/codegen/sync_stream.h", + "include/grpc++/impl/codegen/time.h" + ], + "third_party": false, + "type": "filegroup" + }, + { + "deps": [ + "grpc++_codegen_base" + ], + "headers": [], + "is_filegroup": true, + "language": "c++", + "name": "grpc++_codegen_base_src", + "src": [ + "src/cpp/codegen/codegen_init.cc" + ], + "third_party": false, + "type": "filegroup" + }, + { + "deps": [ "grpc++_codegen_base", - "nanopb" + "grpc++_config_proto" + ], + "headers": [ + "include/grpc++/impl/codegen/proto_utils.h" + ], + "is_filegroup": true, + "language": "c++", + "name": "grpc++_codegen_proto", + "src": [ + "include/grpc++/impl/codegen/proto_utils.h" + ], + "third_party": false, + "type": "filegroup" + }, + { + "deps": [ + "gpr", + "gpr_base_headers", + "grpc++_codegen_base", + "grpc_base_headers", + "grpc_transport_inproc_headers", + "nanopb_headers" ], "headers": [ "include/grpc++/alarm.h", @@ -9035,7 +9241,7 @@ ], "is_filegroup": true, "language": "c++", - "name": "grpc++_base", + "name": "grpc++_common", "src": [ "include/grpc++/alarm.h", "include/grpc++/channel.h", @@ -9126,109 +9332,6 @@ "third_party": false, "type": "filegroup" }, - { - "deps": [ - "grpc_codegen" - ], - "headers": [ - "include/grpc++/impl/codegen/async_stream.h", - "include/grpc++/impl/codegen/async_unary_call.h", - "include/grpc++/impl/codegen/call.h", - "include/grpc++/impl/codegen/call_hook.h", - "include/grpc++/impl/codegen/channel_interface.h", - "include/grpc++/impl/codegen/client_context.h", - "include/grpc++/impl/codegen/client_unary_call.h", - "include/grpc++/impl/codegen/completion_queue.h", - "include/grpc++/impl/codegen/completion_queue_tag.h", - "include/grpc++/impl/codegen/config.h", - "include/grpc++/impl/codegen/core_codegen_interface.h", - "include/grpc++/impl/codegen/create_auth_context.h", - "include/grpc++/impl/codegen/grpc_library.h", - "include/grpc++/impl/codegen/metadata_map.h", - "include/grpc++/impl/codegen/method_handler_impl.h", - "include/grpc++/impl/codegen/rpc_method.h", - "include/grpc++/impl/codegen/rpc_service_method.h", - "include/grpc++/impl/codegen/security/auth_context.h", - "include/grpc++/impl/codegen/serialization_traits.h", - "include/grpc++/impl/codegen/server_context.h", - "include/grpc++/impl/codegen/server_interface.h", - "include/grpc++/impl/codegen/service_type.h", - "include/grpc++/impl/codegen/slice.h", - "include/grpc++/impl/codegen/status.h", - "include/grpc++/impl/codegen/status_code_enum.h", - "include/grpc++/impl/codegen/string_ref.h", - "include/grpc++/impl/codegen/stub_options.h", - "include/grpc++/impl/codegen/sync_stream.h", - "include/grpc++/impl/codegen/time.h" - ], - "is_filegroup": true, - "language": "c++", - "name": "grpc++_codegen_base", - "src": [ - "include/grpc++/impl/codegen/async_stream.h", - "include/grpc++/impl/codegen/async_unary_call.h", - "include/grpc++/impl/codegen/call.h", - "include/grpc++/impl/codegen/call_hook.h", - "include/grpc++/impl/codegen/channel_interface.h", - "include/grpc++/impl/codegen/client_context.h", - "include/grpc++/impl/codegen/client_unary_call.h", - "include/grpc++/impl/codegen/completion_queue.h", - "include/grpc++/impl/codegen/completion_queue_tag.h", - "include/grpc++/impl/codegen/config.h", - "include/grpc++/impl/codegen/core_codegen_interface.h", - "include/grpc++/impl/codegen/create_auth_context.h", - "include/grpc++/impl/codegen/grpc_library.h", - "include/grpc++/impl/codegen/metadata_map.h", - "include/grpc++/impl/codegen/method_handler_impl.h", - "include/grpc++/impl/codegen/rpc_method.h", - "include/grpc++/impl/codegen/rpc_service_method.h", - "include/grpc++/impl/codegen/security/auth_context.h", - "include/grpc++/impl/codegen/serialization_traits.h", - "include/grpc++/impl/codegen/server_context.h", - "include/grpc++/impl/codegen/server_interface.h", - "include/grpc++/impl/codegen/service_type.h", - "include/grpc++/impl/codegen/slice.h", - "include/grpc++/impl/codegen/status.h", - "include/grpc++/impl/codegen/status_code_enum.h", - "include/grpc++/impl/codegen/string_ref.h", - "include/grpc++/impl/codegen/stub_options.h", - "include/grpc++/impl/codegen/sync_stream.h", - "include/grpc++/impl/codegen/time.h" - ], - "third_party": false, - "type": "filegroup" - }, - { - "deps": [ - "grpc++_codegen_base" - ], - "headers": [], - "is_filegroup": true, - "language": "c++", - "name": "grpc++_codegen_base_src", - "src": [ - "src/cpp/codegen/codegen_init.cc" - ], - "third_party": false, - "type": "filegroup" - }, - { - "deps": [ - "grpc++_codegen_base", - "grpc++_config_proto" - ], - "headers": [ - "include/grpc++/impl/codegen/proto_utils.h" - ], - "is_filegroup": true, - "language": "c++", - "name": "grpc++_codegen_proto", - "src": [ - "include/grpc++/impl/codegen/proto_utils.h" - ], - "third_party": false, - "type": "filegroup" - }, { "deps": [], "headers": [ diff --git a/vsprojects/grpc.sln b/vsprojects/grpc.sln index d4a84fc20a3..307ae4b5990 100644 --- a/vsprojects/grpc.sln +++ b/vsprojects/grpc.sln @@ -63,6 +63,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc++", "vcxproj\.\grpc++\ EndProjectSection ProjectSection(ProjectDependencies) = postProject {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} + {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc++_error_details", "vcxproj\.\grpc++_error_details\grpc++_error_details.vcxproj", "{9F58AD72-49E1-4D10-B826-9E190AB0AAC0}" @@ -80,7 +81,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc++_unsecure", "vcxproj\ ProjectSection(ProjectDependencies) = postProject {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5} = {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5} - {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc_create_jwt", "vcxproj\.\grpc_create_jwt\grpc_create_jwt.vcxproj", "{77971F8D-F583-3E77-0E3C-6C1FB6B1749C}" diff --git a/vsprojects/vcxproj/grpc++/grpc++.vcxproj b/vsprojects/vcxproj/grpc++/grpc++.vcxproj index 859970920ea..625c62adcd6 100644 --- a/vsprojects/vcxproj/grpc++/grpc++.vcxproj +++ b/vsprojects/vcxproj/grpc++/grpc++.vcxproj @@ -303,6 +303,62 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -332,25 +388,6 @@ - - - - - - - - - - - - - - - - - - - @@ -366,6 +403,138 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -454,12 +623,6 @@ - - - - - - @@ -467,6 +630,9 @@ {29D16885-7228-4C31-81ED-5F9187C7F2A9} + + {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} + diff --git a/vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters b/vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters index fd52731dac5..ff9913a362a 100644 --- a/vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters +++ b/vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters @@ -124,15 +124,6 @@ src\cpp\util - - third_party\nanopb - - - third_party\nanopb - - - third_party\nanopb - src\cpp\codegen @@ -273,6 +264,174 @@ include\grpc++\support + + include\grpc\support + + + include\grpc\support + + + include\grpc\support + + + include\grpc\support + + + include\grpc\support + + + include\grpc\support + + + include\grpc\support + + + include\grpc\support + + + include\grpc\support + + + include\grpc\support + + + include\grpc\support + + + include\grpc\support + + + include\grpc\support + + + include\grpc\support + + + include\grpc\support + + + include\grpc\support + + + include\grpc\support + + + include\grpc\support + + + include\grpc\support + + + include\grpc\support + + + include\grpc\support + + + include\grpc\support + + + include\grpc\support + + + include\grpc\support + + + include\grpc\support + + + include\grpc\support + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc + + + include\grpc + + + include\grpc + + + include\grpc + + + include\grpc + + + include\grpc + + + include\grpc + + + include\grpc + + + include\grpc + + + include\grpc + + + include\grpc\support + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + include\grpc++\impl\codegen @@ -360,63 +519,6 @@ include\grpc++\impl\codegen - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - include\grpc++\impl\codegen @@ -458,6 +560,402 @@ src\cpp\thread_manager + + src\core\lib\profiling + + + src\core\lib\support + + + src\core\lib\support + + + src\core\lib\support + + + src\core\lib\support + + + src\core\lib\support + + + src\core\lib\support + + + src\core\lib\support + + + src\core\lib\support + + + src\core\lib\support + + + src\core\lib\support + + + src\core\lib\support + + + src\core\lib\support + + + src\core\lib\support + + + src\core\lib\support + + + src\core\lib\support + + + src\core\lib\support + + + src\core\lib\support + + + src\core\lib\channel + + + src\core\lib\channel + + + src\core\lib\channel + + + src\core\lib\channel + + + src\core\lib\channel + + + src\core\lib\channel + + + src\core\lib\channel + + + src\core\lib\channel + + + src\core\lib\compression + + + src\core\lib\compression + + + src\core\lib\compression + + + src\core\lib\http + + + src\core\lib\http + + + src\core\lib\http + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\json + + + src\core\lib\json + + + src\core\lib\json + + + src\core\lib\json + + + src\core\lib\slice + + + src\core\lib\slice + + + src\core\lib\slice + + + src\core\lib\slice + + + src\core\lib\slice + + + src\core\lib\surface + + + src\core\lib\surface + + + src\core\lib\surface + + + src\core\lib\surface + + + src\core\lib\surface + + + src\core\lib\surface + + + src\core\lib\surface + + + src\core\lib\surface + + + src\core\lib\surface + + + src\core\lib\surface + + + src\core\lib\surface + + + src\core\lib\surface + + + src\core\lib\surface + + + src\core\lib\transport + + + src\core\lib\transport + + + src\core\lib\transport + + + src\core\lib\transport + + + src\core\lib\transport + + + src\core\lib\transport + + + src\core\lib\transport + + + src\core\lib\transport + + + src\core\lib\transport + + + src\core\lib\transport + + + src\core\lib\transport + + + src\core\lib\transport + + + src\core\lib\transport + + + src\core\lib\transport + + + src\core\lib\debug + + + src\core\ext\transport\inproc + third_party\nanopb @@ -509,9 +1007,60 @@ {dc8bfccd-341f-26f0-8ee4-47dde62a6dd1} + + {5ec10a44-9a09-9220-cf3b-b18ce6e4f70f} + {328ff211-2886-406e-56f9-18ba1686f363} + + {d02f1155-7e7e-3736-3c69-dc9146dc523d} + + + {96d09c4a-59f9-3486-6c2f-cbf695b285d8} + + + {202b1172-189f-afc4-f16c-4ca12677b480} + + + {635a93a8-e23a-a664-c9cb-0963736dd9ce} + + + {80567a8f-622f-a3ce-c12d-aebb63984b07} + + + {e769265c-8abd-cd64-2cc2-a52da484fe7b} + + + {701b2d46-11c6-3640-b189-45287f00bee3} + + + {ada68fd5-8e51-98cb-71a7-baf7989d8ffa} + + + {e770844e-61d4-555e-59be-81288e21a35f} + + + {04dfa1c8-7ffe-4f06-4a7c-37441dc75764} + + + {a5d5bddf-6f19-b655-a03a-f30ff5c253a5} + + + {836e78ab-aaae-9dce-dd1e-06f03c436a13} + + + {afe126ba-52c9-1daa-d174-8ee8aade08c2} + + + {83b45914-6f97-b4ad-f2d0-cc56a10ea1bb} + + + {fb2276d7-5a11-f1d9-82c3-e7c7f1155523} + + + {4bd7971a-68f7-0d5a-f502-6dea3099caaa} + {2420a905-e4f1-a5aa-a364-6a112878a39e} diff --git a/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj b/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj index 30e4cf713f7..baeb6e35b2d 100644 --- a/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj +++ b/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj @@ -303,6 +303,62 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -332,25 +388,6 @@ - - - - - - - - - - - - - - - - - - - @@ -360,6 +397,138 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -438,12 +607,6 @@ - - - - - - @@ -454,9 +617,6 @@ {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5} - - {29D16885-7228-4C31-81ED-5F9187C7F2A9} - diff --git a/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj.filters b/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj.filters index 3d2c74a0661..5820ce04141 100644 --- a/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj.filters +++ b/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj.filters @@ -109,15 +109,6 @@ src\cpp\util - - third_party\nanopb - - - third_party\nanopb - - - third_party\nanopb - src\cpp\codegen @@ -258,6 +249,174 @@ include\grpc++\support + + include\grpc\support + + + include\grpc\support + + + include\grpc\support + + + include\grpc\support + + + include\grpc\support + + + include\grpc\support + + + include\grpc\support + + + include\grpc\support + + + include\grpc\support + + + include\grpc\support + + + include\grpc\support + + + include\grpc\support + + + include\grpc\support + + + include\grpc\support + + + include\grpc\support + + + include\grpc\support + + + include\grpc\support + + + include\grpc\support + + + include\grpc\support + + + include\grpc\support + + + include\grpc\support + + + include\grpc\support + + + include\grpc\support + + + include\grpc\support + + + include\grpc\support + + + include\grpc\support + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc + + + include\grpc + + + include\grpc + + + include\grpc + + + include\grpc + + + include\grpc + + + include\grpc + + + include\grpc + + + include\grpc + + + include\grpc + + + include\grpc\support + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + include\grpc++\impl\codegen @@ -345,85 +504,424 @@ include\grpc++\impl\codegen - - include\grpc\impl\codegen + + + + src\cpp\client - - include\grpc\impl\codegen + + src\cpp\common - - include\grpc\impl\codegen + + src\cpp\server - - include\grpc\impl\codegen + + src\cpp\server\health - - include\grpc\impl\codegen + + src\cpp\server\health - - include\grpc\impl\codegen + + src\cpp\server - - include\grpc\impl\codegen + + src\cpp\thread_manager - - include\grpc\impl\codegen + + src\core\lib\profiling - - include\grpc\impl\codegen + + src\core\lib\support - - include\grpc\impl\codegen + + src\core\lib\support - - include\grpc\impl\codegen + + src\core\lib\support - - include\grpc\impl\codegen + + src\core\lib\support - - include\grpc\impl\codegen + + src\core\lib\support - - include\grpc\impl\codegen + + src\core\lib\support - - include\grpc\impl\codegen + + src\core\lib\support - - include\grpc\impl\codegen + + src\core\lib\support - - include\grpc\impl\codegen + + src\core\lib\support - - include\grpc\impl\codegen + + src\core\lib\support - - include\grpc\impl\codegen + + src\core\lib\support - - - - src\cpp\client + + src\core\lib\support - - src\cpp\common + + src\core\lib\support - - src\cpp\server + + src\core\lib\support - - src\cpp\server\health + + src\core\lib\support - - src\cpp\server\health + + src\core\lib\support - - src\cpp\server + + src\core\lib\support - - src\cpp\thread_manager + + src\core\lib\channel + + + src\core\lib\channel + + + src\core\lib\channel + + + src\core\lib\channel + + + src\core\lib\channel + + + src\core\lib\channel + + + src\core\lib\channel + + + src\core\lib\channel + + + src\core\lib\compression + + + src\core\lib\compression + + + src\core\lib\compression + + + src\core\lib\http + + + src\core\lib\http + + + src\core\lib\http + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\json + + + src\core\lib\json + + + src\core\lib\json + + + src\core\lib\json + + + src\core\lib\slice + + + src\core\lib\slice + + + src\core\lib\slice + + + src\core\lib\slice + + + src\core\lib\slice + + + src\core\lib\surface + + + src\core\lib\surface + + + src\core\lib\surface + + + src\core\lib\surface + + + src\core\lib\surface + + + src\core\lib\surface + + + src\core\lib\surface + + + src\core\lib\surface + + + src\core\lib\surface + + + src\core\lib\surface + + + src\core\lib\surface + + + src\core\lib\surface + + + src\core\lib\surface + + + src\core\lib\transport + + + src\core\lib\transport + + + src\core\lib\transport + + + src\core\lib\transport + + + src\core\lib\transport + + + src\core\lib\transport + + + src\core\lib\transport + + + src\core\lib\transport + + + src\core\lib\transport + + + src\core\lib\transport + + + src\core\lib\transport + + + src\core\lib\transport + + + src\core\lib\transport + + + src\core\lib\transport + + + src\core\lib\debug + + + src\core\ext\transport\inproc third_party\nanopb @@ -476,9 +974,60 @@ {adf6b8e3-4a4b-cb35-bb3d-568af97b58d1} + + {9d6d36f2-26e7-a66b-c19d-a958b80878d6} + {cce6a85d-1111-3834-6825-31e170d93cff} + + {595f2ea0-aafb-87e5-c938-db3ff0b0c69a} + + + {52eca76b-9502-3d96-9064-6415226a860f} + + + {8e70201f-3b54-d3cb-8b30-ebe0d96a9b2a} + + + {ecf09c42-c470-1883-35d7-442453ea8370} + + + {cf8fd5d8-ff54-331d-2d20-36d6cae0e14b} + + + {7e0225af-000b-4873-1c16-caffffbfd084} + + + {0bbdbf56-83ad-bb4b-c4e2-a6d38c342179} + + + {3875f7d7-ff11-c91d-0f98-810260cb554b} + + + {4bd405b9-af65-f0a6-d67a-433f75900668} + + + {f4b146e4-8fba-83a6-1cc1-1262ebb785e8} + + + {b83c8e70-e491-f6f9-a08c-85f632bb61d2} + + + {c3b582f8-079a-5936-7694-54cd75a7e61e} + + + {0d6d88e2-8549-5118-8b78-06e8283dadcb} + + + {a5139298-498a-41d4-59fd-c38d8f0380c1} + + + {1d59dcef-3358-d0ab-fa42-64da74065785} + + + {ba865739-5dd9-6731-6772-48c25d45134f} + {1e5fd68c-bd87-e803-42b0-75a7fa19b91d} diff --git a/vsprojects/vcxproj/grpc/grpc.vcxproj b/vsprojects/vcxproj/grpc/grpc.vcxproj index ff2e26e0af0..96e70cc132a 100644 --- a/vsprojects/vcxproj/grpc/grpc.vcxproj +++ b/vsprojects/vcxproj/grpc/grpc.vcxproj @@ -267,17 +267,6 @@ - - - - - - - - - - - @@ -298,9 +287,91 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -414,87 +485,12 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/vsprojects/vcxproj/grpc/grpc.vcxproj.filters b/vsprojects/vcxproj/grpc/grpc.vcxproj.filters index 70824a51b89..925be854924 100644 --- a/vsprojects/vcxproj/grpc/grpc.vcxproj.filters +++ b/vsprojects/vcxproj/grpc/grpc.vcxproj.filters @@ -762,39 +762,6 @@ - - include\grpc - - - include\grpc - - - include\grpc - - - include\grpc - - - include\grpc - - - include\grpc - - - include\grpc - - - include\grpc - - - include\grpc - - - include\grpc - - - include\grpc\support - include\grpc\impl\codegen @@ -855,11 +822,257 @@ include\grpc + + include\grpc + + + include\grpc + + + include\grpc + + + include\grpc + + + include\grpc + + + include\grpc + + + include\grpc + + + include\grpc + + + include\grpc + + + include\grpc + + + include\grpc\support + include\grpc + + src\core\ext\transport\chttp2\transport + + + src\core\ext\transport\chttp2\transport + + + src\core\ext\transport\chttp2\transport + + + src\core\ext\transport\chttp2\transport + + + src\core\ext\transport\chttp2\transport + + + src\core\ext\transport\chttp2\transport + + + src\core\ext\transport\chttp2\transport + + + src\core\ext\transport\chttp2\transport + + + src\core\ext\transport\chttp2\transport + + + src\core\ext\transport\chttp2\transport + + + src\core\ext\transport\chttp2\transport + + + src\core\ext\transport\chttp2\transport + + + src\core\ext\transport\chttp2\transport + + + src\core\ext\transport\chttp2\transport + + + src\core\ext\transport\chttp2\transport + + + src\core\ext\transport\chttp2\transport + + + src\core\ext\transport\chttp2\transport + + + src\core\ext\transport\chttp2\transport + + + src\core\ext\transport\chttp2\transport + + + src\core\ext\transport\chttp2\alpn + + + src\core\ext\filters\http\client + + + src\core\ext\filters\http\message_compress + + + src\core\ext\filters\http\server + + + src\core\lib\security\context + + + src\core\lib\security\credentials\composite + + + src\core\lib\security\credentials + + + src\core\lib\security\credentials\fake + + + src\core\lib\security\credentials\google_default + + + src\core\lib\security\credentials\iam + + + src\core\lib\security\credentials\jwt + + + src\core\lib\security\credentials\jwt + + + src\core\lib\security\credentials\jwt + + + src\core\lib\security\credentials\oauth2 + + + src\core\lib\security\credentials\plugin + + + src\core\lib\security\credentials\ssl + + + src\core\lib\security\transport + + + src\core\lib\security\transport + + + src\core\lib\security\transport + + + src\core\lib\security\transport + + + src\core\lib\security\transport + + + src\core\lib\security\transport + + + src\core\lib\security\util + + + src\core\tsi + + + src\core\tsi + + + src\core\tsi + + + src\core\tsi + + + src\core\tsi + + + src\core\tsi + + + src\core\tsi + + + src\core\ext\transport\chttp2\server + + + src\core\ext\filters\client_channel + + + src\core\ext\filters\client_channel + + + src\core\ext\filters\client_channel + + + src\core\ext\filters\client_channel + + + src\core\ext\filters\client_channel + + + src\core\ext\filters\client_channel + + + src\core\ext\filters\client_channel + + + src\core\ext\filters\client_channel + + + src\core\ext\filters\client_channel + + + src\core\ext\filters\client_channel + + + src\core\ext\filters\client_channel + + + src\core\ext\filters\client_channel + + + src\core\ext\filters\client_channel + + + src\core\ext\filters\client_channel + + + src\core\ext\filters\client_channel + + + src\core\ext\filters\client_channel + + + src\core\ext\filters\client_channel + + + src\core\ext\filters\client_channel + + + src\core\ext\filters\deadline + + + src\core\ext\transport\chttp2\client + + + src\core\ext\transport\inproc + src\core\lib\channel @@ -1199,219 +1412,6 @@ src\core\lib\debug - - src\core\ext\transport\chttp2\transport - - - src\core\ext\transport\chttp2\transport - - - src\core\ext\transport\chttp2\transport - - - src\core\ext\transport\chttp2\transport - - - src\core\ext\transport\chttp2\transport - - - src\core\ext\transport\chttp2\transport - - - src\core\ext\transport\chttp2\transport - - - src\core\ext\transport\chttp2\transport - - - src\core\ext\transport\chttp2\transport - - - src\core\ext\transport\chttp2\transport - - - src\core\ext\transport\chttp2\transport - - - src\core\ext\transport\chttp2\transport - - - src\core\ext\transport\chttp2\transport - - - src\core\ext\transport\chttp2\transport - - - src\core\ext\transport\chttp2\transport - - - src\core\ext\transport\chttp2\transport - - - src\core\ext\transport\chttp2\transport - - - src\core\ext\transport\chttp2\transport - - - src\core\ext\transport\chttp2\transport - - - src\core\ext\transport\chttp2\alpn - - - src\core\ext\filters\http\client - - - src\core\ext\filters\http\message_compress - - - src\core\ext\filters\http\server - - - src\core\lib\security\context - - - src\core\lib\security\credentials\composite - - - src\core\lib\security\credentials - - - src\core\lib\security\credentials\fake - - - src\core\lib\security\credentials\google_default - - - src\core\lib\security\credentials\iam - - - src\core\lib\security\credentials\jwt - - - src\core\lib\security\credentials\jwt - - - src\core\lib\security\credentials\jwt - - - src\core\lib\security\credentials\oauth2 - - - src\core\lib\security\credentials\plugin - - - src\core\lib\security\credentials\ssl - - - src\core\lib\security\transport - - - src\core\lib\security\transport - - - src\core\lib\security\transport - - - src\core\lib\security\transport - - - src\core\lib\security\transport - - - src\core\lib\security\transport - - - src\core\lib\security\util - - - src\core\tsi - - - src\core\tsi - - - src\core\tsi - - - src\core\tsi - - - src\core\tsi - - - src\core\tsi - - - src\core\tsi - - - src\core\ext\transport\chttp2\server - - - src\core\ext\filters\client_channel - - - src\core\ext\filters\client_channel - - - src\core\ext\filters\client_channel - - - src\core\ext\filters\client_channel - - - src\core\ext\filters\client_channel - - - src\core\ext\filters\client_channel - - - src\core\ext\filters\client_channel - - - src\core\ext\filters\client_channel - - - src\core\ext\filters\client_channel - - - src\core\ext\filters\client_channel - - - src\core\ext\filters\client_channel - - - src\core\ext\filters\client_channel - - - src\core\ext\filters\client_channel - - - src\core\ext\filters\client_channel - - - src\core\ext\filters\client_channel - - - src\core\ext\filters\client_channel - - - src\core\ext\filters\client_channel - - - src\core\ext\filters\client_channel - - - src\core\ext\filters\deadline - - - src\core\ext\transport\chttp2\client - - - src\core\ext\transport\inproc - src\core\ext\filters\client_channel\lb_policy\grpclb @@ -1430,18 +1430,6 @@ src\core\ext\filters\client_channel\lb_policy\grpclb\proto\grpc\lb\v1 - - third_party\nanopb - - - third_party\nanopb - - - third_party\nanopb - - - third_party\nanopb - src\core\ext\filters\client_channel\resolver\fake diff --git a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj index 13d56d58a8e..010f7fd92e8 100644 --- a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj +++ b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj @@ -147,17 +147,6 @@ - - - - - - - - - - - @@ -196,119 +185,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters index fb7197fa952..60296cac06a 100644 --- a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters +++ b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters @@ -441,39 +441,6 @@ - - include\grpc - - - include\grpc - - - include\grpc - - - include\grpc - - - include\grpc - - - include\grpc - - - include\grpc - - - include\grpc - - - include\grpc - - - include\grpc - - - include\grpc\support - include\grpc\impl\codegen @@ -584,345 +551,6 @@ test\core\util - - src\core\lib\channel - - - src\core\lib\channel - - - src\core\lib\channel - - - src\core\lib\channel - - - src\core\lib\channel - - - src\core\lib\channel - - - src\core\lib\channel - - - src\core\lib\channel - - - src\core\lib\compression - - - src\core\lib\compression - - - src\core\lib\compression - - - src\core\lib\http - - - src\core\lib\http - - - src\core\lib\http - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\json - - - src\core\lib\json - - - src\core\lib\json - - - src\core\lib\json - - - src\core\lib\slice - - - src\core\lib\slice - - - src\core\lib\slice - - - src\core\lib\slice - - - src\core\lib\slice - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\transport - - - src\core\lib\transport - - - src\core\lib\transport - - - src\core\lib\transport - - - src\core\lib\transport - - - src\core\lib\transport - - - src\core\lib\transport - - - src\core\lib\transport - - - src\core\lib\transport - - - src\core\lib\transport - - - src\core\lib\transport - - - src\core\lib\transport - - - src\core\lib\transport - - - src\core\lib\transport - - - src\core\lib\debug - @@ -938,9 +566,6 @@ {8e97f1e1-f4d1-a56e-0837-7901778fb3b9} - - {b783a829-3703-129f-39ee-528ac0a06e06} - {7d107d7c-1da3-9525-3ba1-3a411b552ea8} diff --git a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj index b9e0c896e1a..96f87583e16 100644 --- a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj +++ b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj @@ -258,17 +258,6 @@ - - - - - - - - - - - @@ -288,9 +277,65 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -404,51 +449,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -460,10 +460,6 @@ - - - - diff --git a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters index ed3384d5d20..5e26ff88cc4 100644 --- a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters +++ b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters @@ -672,39 +672,6 @@ - - include\grpc - - - include\grpc - - - include\grpc - - - include\grpc - - - include\grpc - - - include\grpc - - - include\grpc - - - include\grpc - - - include\grpc - - - include\grpc - - - include\grpc\support - include\grpc\impl\codegen @@ -762,11 +729,179 @@ include\grpc\impl\codegen + + include\grpc + + + include\grpc + + + include\grpc + + + include\grpc + + + include\grpc + + + include\grpc + + + include\grpc + + + include\grpc + + + include\grpc + + + include\grpc + + + include\grpc\support + include\grpc + + src\core\ext\transport\chttp2\transport + + + src\core\ext\transport\chttp2\transport + + + src\core\ext\transport\chttp2\transport + + + src\core\ext\transport\chttp2\transport + + + src\core\ext\transport\chttp2\transport + + + src\core\ext\transport\chttp2\transport + + + src\core\ext\transport\chttp2\transport + + + src\core\ext\transport\chttp2\transport + + + src\core\ext\transport\chttp2\transport + + + src\core\ext\transport\chttp2\transport + + + src\core\ext\transport\chttp2\transport + + + src\core\ext\transport\chttp2\transport + + + src\core\ext\transport\chttp2\transport + + + src\core\ext\transport\chttp2\transport + + + src\core\ext\transport\chttp2\transport + + + src\core\ext\transport\chttp2\transport + + + src\core\ext\transport\chttp2\transport + + + src\core\ext\transport\chttp2\transport + + + src\core\ext\transport\chttp2\transport + + + src\core\ext\transport\chttp2\alpn + + + src\core\ext\filters\http\client + + + src\core\ext\filters\http\message_compress + + + src\core\ext\filters\http\server + + + src\core\ext\transport\chttp2\server + + + src\core\ext\transport\chttp2\client + + + src\core\ext\filters\client_channel + + + src\core\ext\filters\client_channel + + + src\core\ext\filters\client_channel + + + src\core\ext\filters\client_channel + + + src\core\ext\filters\client_channel + + + src\core\ext\filters\client_channel + + + src\core\ext\filters\client_channel + + + src\core\ext\filters\client_channel + + + src\core\ext\filters\client_channel + + + src\core\ext\filters\client_channel + + + src\core\ext\filters\client_channel + + + src\core\ext\filters\client_channel + + + src\core\ext\filters\client_channel + + + src\core\ext\filters\client_channel + + + src\core\ext\filters\client_channel + + + src\core\ext\filters\client_channel + + + src\core\ext\filters\client_channel + + + src\core\ext\filters\client_channel + + + src\core\ext\filters\deadline + + + src\core\ext\transport\inproc + src\core\lib\channel @@ -1106,141 +1241,6 @@ src\core\lib\debug - - src\core\ext\transport\chttp2\transport - - - src\core\ext\transport\chttp2\transport - - - src\core\ext\transport\chttp2\transport - - - src\core\ext\transport\chttp2\transport - - - src\core\ext\transport\chttp2\transport - - - src\core\ext\transport\chttp2\transport - - - src\core\ext\transport\chttp2\transport - - - src\core\ext\transport\chttp2\transport - - - src\core\ext\transport\chttp2\transport - - - src\core\ext\transport\chttp2\transport - - - src\core\ext\transport\chttp2\transport - - - src\core\ext\transport\chttp2\transport - - - src\core\ext\transport\chttp2\transport - - - src\core\ext\transport\chttp2\transport - - - src\core\ext\transport\chttp2\transport - - - src\core\ext\transport\chttp2\transport - - - src\core\ext\transport\chttp2\transport - - - src\core\ext\transport\chttp2\transport - - - src\core\ext\transport\chttp2\transport - - - src\core\ext\transport\chttp2\alpn - - - src\core\ext\filters\http\client - - - src\core\ext\filters\http\message_compress - - - src\core\ext\filters\http\server - - - src\core\ext\transport\chttp2\server - - - src\core\ext\transport\chttp2\client - - - src\core\ext\filters\client_channel - - - src\core\ext\filters\client_channel - - - src\core\ext\filters\client_channel - - - src\core\ext\filters\client_channel - - - src\core\ext\filters\client_channel - - - src\core\ext\filters\client_channel - - - src\core\ext\filters\client_channel - - - src\core\ext\filters\client_channel - - - src\core\ext\filters\client_channel - - - src\core\ext\filters\client_channel - - - src\core\ext\filters\client_channel - - - src\core\ext\filters\client_channel - - - src\core\ext\filters\client_channel - - - src\core\ext\filters\client_channel - - - src\core\ext\filters\client_channel - - - src\core\ext\filters\client_channel - - - src\core\ext\filters\client_channel - - - src\core\ext\filters\client_channel - - - src\core\ext\filters\deadline - - - src\core\ext\transport\inproc - src\core\ext\filters\client_channel\resolver\dns\c_ares @@ -1274,18 +1274,6 @@ src\core\ext\filters\client_channel\lb_policy\grpclb\proto\grpc\lb\v1 - - third_party\nanopb - - - third_party\nanopb - - - third_party\nanopb - - - third_party\nanopb - src\core\ext\census From e00f2a312aef3df1334ad4978d582da1d2a25c5f Mon Sep 17 00:00:00 2001 From: Vijay Pai Date: Mon, 31 Jul 2017 01:04:45 -0700 Subject: [PATCH 64/80] Prevent race in trying to compile grpc.pb.cc file before pb.h exists --- Makefile | 32 ++++++++++++++++---------------- templates/Makefile.template | 2 +- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/Makefile b/Makefile index 98cfb04e54a..9fb4f2b4b3f 100644 --- a/Makefile +++ b/Makefile @@ -2250,7 +2250,7 @@ $(GENDIR)/src/proto/grpc/health/v1/health.pb.cc: src/proto/grpc/health/v1/health $(Q) mkdir -p `dirname $@` $(Q) $(PROTOC) -Ithird_party/protobuf/src -I. --cpp_out=$(GENDIR) $< -$(GENDIR)/src/proto/grpc/health/v1/health.grpc.pb.cc: src/proto/grpc/health/v1/health.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) +$(GENDIR)/src/proto/grpc/health/v1/health.grpc.pb.cc: src/proto/grpc/health/v1/health.proto $(GENDIR)/src/proto/grpc/health/v1/health.pb.cc $(PROTOBUF_DEP) $(PROTOC_PLUGINS) $(E) "[GRPC] Generating gRPC's protobuf service CC file from $<" $(Q) mkdir -p `dirname $@` $(Q) $(PROTOC) -Ithird_party/protobuf/src -I. --grpc_out=$(GENDIR) --plugin=protoc-gen-grpc=$(PROTOC_PLUGINS_DIR)/grpc_cpp_plugin$(EXECUTABLE_SUFFIX) $< @@ -2266,7 +2266,7 @@ $(GENDIR)/src/proto/grpc/lb/v1/load_balancer.pb.cc: src/proto/grpc/lb/v1/load_ba $(Q) mkdir -p `dirname $@` $(Q) $(PROTOC) -Ithird_party/protobuf/src -I. --cpp_out=$(GENDIR) $< -$(GENDIR)/src/proto/grpc/lb/v1/load_balancer.grpc.pb.cc: src/proto/grpc/lb/v1/load_balancer.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) +$(GENDIR)/src/proto/grpc/lb/v1/load_balancer.grpc.pb.cc: src/proto/grpc/lb/v1/load_balancer.proto $(GENDIR)/src/proto/grpc/lb/v1/load_balancer.pb.cc $(PROTOBUF_DEP) $(PROTOC_PLUGINS) $(E) "[GRPC] Generating gRPC's protobuf service CC file from $<" $(Q) mkdir -p `dirname $@` $(Q) $(PROTOC) -Ithird_party/protobuf/src -I. --grpc_out=$(GENDIR) --plugin=protoc-gen-grpc=$(PROTOC_PLUGINS_DIR)/grpc_cpp_plugin$(EXECUTABLE_SUFFIX) $< @@ -2282,7 +2282,7 @@ $(GENDIR)/src/proto/grpc/reflection/v1alpha/reflection.pb.cc: src/proto/grpc/ref $(Q) mkdir -p `dirname $@` $(Q) $(PROTOC) -Ithird_party/protobuf/src -I. --cpp_out=$(GENDIR) $< -$(GENDIR)/src/proto/grpc/reflection/v1alpha/reflection.grpc.pb.cc: src/proto/grpc/reflection/v1alpha/reflection.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) +$(GENDIR)/src/proto/grpc/reflection/v1alpha/reflection.grpc.pb.cc: src/proto/grpc/reflection/v1alpha/reflection.proto $(GENDIR)/src/proto/grpc/reflection/v1alpha/reflection.pb.cc $(PROTOBUF_DEP) $(PROTOC_PLUGINS) $(E) "[GRPC] Generating gRPC's protobuf service CC file from $<" $(Q) mkdir -p `dirname $@` $(Q) $(PROTOC) -Ithird_party/protobuf/src -I. --grpc_out=$(GENDIR) --plugin=protoc-gen-grpc=$(PROTOC_PLUGINS_DIR)/grpc_cpp_plugin$(EXECUTABLE_SUFFIX) $< @@ -2298,7 +2298,7 @@ $(GENDIR)/src/proto/grpc/status/status.pb.cc: src/proto/grpc/status/status.proto $(Q) mkdir -p `dirname $@` $(Q) $(PROTOC) -Ithird_party/protobuf/src -I. --cpp_out=$(GENDIR) $< -$(GENDIR)/src/proto/grpc/status/status.grpc.pb.cc: src/proto/grpc/status/status.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) +$(GENDIR)/src/proto/grpc/status/status.grpc.pb.cc: src/proto/grpc/status/status.proto $(GENDIR)/src/proto/grpc/status/status.pb.cc $(PROTOBUF_DEP) $(PROTOC_PLUGINS) $(E) "[GRPC] Generating gRPC's protobuf service CC file from $<" $(Q) mkdir -p `dirname $@` $(Q) $(PROTOC) -Ithird_party/protobuf/src -I. --grpc_out=$(GENDIR) --plugin=protoc-gen-grpc=$(PROTOC_PLUGINS_DIR)/grpc_cpp_plugin$(EXECUTABLE_SUFFIX) $< @@ -2315,7 +2315,7 @@ $(GENDIR)/src/proto/grpc/testing/compiler_test.pb.cc: src/proto/grpc/testing/com $(Q) mkdir -p `dirname $@` $(Q) $(PROTOC) -Ithird_party/protobuf/src -I. --cpp_out=$(GENDIR) $< -$(GENDIR)/src/proto/grpc/testing/compiler_test.grpc.pb.cc: src/proto/grpc/testing/compiler_test.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) +$(GENDIR)/src/proto/grpc/testing/compiler_test.grpc.pb.cc: src/proto/grpc/testing/compiler_test.proto $(GENDIR)/src/proto/grpc/testing/compiler_test.pb.cc $(PROTOBUF_DEP) $(PROTOC_PLUGINS) $(E) "[GRPC] Generating gRPC's protobuf service CC file from $<" $(Q) mkdir -p `dirname $@` $(Q) $(PROTOC) -Ithird_party/protobuf/src -I. --grpc_out=generate_mock_code=true:$(GENDIR) --plugin=protoc-gen-grpc=$(PROTOC_PLUGINS_DIR)/grpc_cpp_plugin$(EXECUTABLE_SUFFIX) $< @@ -2331,7 +2331,7 @@ $(GENDIR)/src/proto/grpc/testing/control.pb.cc: src/proto/grpc/testing/control.p $(Q) mkdir -p `dirname $@` $(Q) $(PROTOC) -Ithird_party/protobuf/src -I. --cpp_out=$(GENDIR) $< -$(GENDIR)/src/proto/grpc/testing/control.grpc.pb.cc: src/proto/grpc/testing/control.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) $(GENDIR)/src/proto/grpc/testing/payloads.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.grpc.pb.cc +$(GENDIR)/src/proto/grpc/testing/control.grpc.pb.cc: src/proto/grpc/testing/control.proto $(GENDIR)/src/proto/grpc/testing/control.pb.cc $(PROTOBUF_DEP) $(PROTOC_PLUGINS) $(GENDIR)/src/proto/grpc/testing/payloads.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.grpc.pb.cc $(E) "[GRPC] Generating gRPC's protobuf service CC file from $<" $(Q) mkdir -p `dirname $@` $(Q) $(PROTOC) -Ithird_party/protobuf/src -I. --grpc_out=$(GENDIR) --plugin=protoc-gen-grpc=$(PROTOC_PLUGINS_DIR)/grpc_cpp_plugin$(EXECUTABLE_SUFFIX) $< @@ -2347,7 +2347,7 @@ $(GENDIR)/src/proto/grpc/testing/duplicate/echo_duplicate.pb.cc: src/proto/grpc/ $(Q) mkdir -p `dirname $@` $(Q) $(PROTOC) -Ithird_party/protobuf/src -I. --cpp_out=$(GENDIR) $< -$(GENDIR)/src/proto/grpc/testing/duplicate/echo_duplicate.grpc.pb.cc: src/proto/grpc/testing/duplicate/echo_duplicate.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) $(GENDIR)/src/proto/grpc/testing/echo_messages.pb.cc $(GENDIR)/src/proto/grpc/testing/echo_messages.grpc.pb.cc +$(GENDIR)/src/proto/grpc/testing/duplicate/echo_duplicate.grpc.pb.cc: src/proto/grpc/testing/duplicate/echo_duplicate.proto $(GENDIR)/src/proto/grpc/testing/duplicate/echo_duplicate.pb.cc $(PROTOBUF_DEP) $(PROTOC_PLUGINS) $(GENDIR)/src/proto/grpc/testing/echo_messages.pb.cc $(GENDIR)/src/proto/grpc/testing/echo_messages.grpc.pb.cc $(E) "[GRPC] Generating gRPC's protobuf service CC file from $<" $(Q) mkdir -p `dirname $@` $(Q) $(PROTOC) -Ithird_party/protobuf/src -I. --grpc_out=$(GENDIR) --plugin=protoc-gen-grpc=$(PROTOC_PLUGINS_DIR)/grpc_cpp_plugin$(EXECUTABLE_SUFFIX) $< @@ -2364,7 +2364,7 @@ $(GENDIR)/src/proto/grpc/testing/echo.pb.cc: src/proto/grpc/testing/echo.proto $ $(Q) mkdir -p `dirname $@` $(Q) $(PROTOC) -Ithird_party/protobuf/src -I. --cpp_out=$(GENDIR) $< -$(GENDIR)/src/proto/grpc/testing/echo.grpc.pb.cc: src/proto/grpc/testing/echo.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) $(GENDIR)/src/proto/grpc/testing/echo_messages.pb.cc $(GENDIR)/src/proto/grpc/testing/echo_messages.grpc.pb.cc +$(GENDIR)/src/proto/grpc/testing/echo.grpc.pb.cc: src/proto/grpc/testing/echo.proto $(GENDIR)/src/proto/grpc/testing/echo.pb.cc $(PROTOBUF_DEP) $(PROTOC_PLUGINS) $(GENDIR)/src/proto/grpc/testing/echo_messages.pb.cc $(GENDIR)/src/proto/grpc/testing/echo_messages.grpc.pb.cc $(E) "[GRPC] Generating gRPC's protobuf service CC file from $<" $(Q) mkdir -p `dirname $@` $(Q) $(PROTOC) -Ithird_party/protobuf/src -I. --grpc_out=generate_mock_code=true:$(GENDIR) --plugin=protoc-gen-grpc=$(PROTOC_PLUGINS_DIR)/grpc_cpp_plugin$(EXECUTABLE_SUFFIX) $< @@ -2380,7 +2380,7 @@ $(GENDIR)/src/proto/grpc/testing/echo_messages.pb.cc: src/proto/grpc/testing/ech $(Q) mkdir -p `dirname $@` $(Q) $(PROTOC) -Ithird_party/protobuf/src -I. --cpp_out=$(GENDIR) $< -$(GENDIR)/src/proto/grpc/testing/echo_messages.grpc.pb.cc: src/proto/grpc/testing/echo_messages.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) +$(GENDIR)/src/proto/grpc/testing/echo_messages.grpc.pb.cc: src/proto/grpc/testing/echo_messages.proto $(GENDIR)/src/proto/grpc/testing/echo_messages.pb.cc $(PROTOBUF_DEP) $(PROTOC_PLUGINS) $(E) "[GRPC] Generating gRPC's protobuf service CC file from $<" $(Q) mkdir -p `dirname $@` $(Q) $(PROTOC) -Ithird_party/protobuf/src -I. --grpc_out=$(GENDIR) --plugin=protoc-gen-grpc=$(PROTOC_PLUGINS_DIR)/grpc_cpp_plugin$(EXECUTABLE_SUFFIX) $< @@ -2396,7 +2396,7 @@ $(GENDIR)/src/proto/grpc/testing/empty.pb.cc: src/proto/grpc/testing/empty.proto $(Q) mkdir -p `dirname $@` $(Q) $(PROTOC) -Ithird_party/protobuf/src -I. --cpp_out=$(GENDIR) $< -$(GENDIR)/src/proto/grpc/testing/empty.grpc.pb.cc: src/proto/grpc/testing/empty.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) +$(GENDIR)/src/proto/grpc/testing/empty.grpc.pb.cc: src/proto/grpc/testing/empty.proto $(GENDIR)/src/proto/grpc/testing/empty.pb.cc $(PROTOBUF_DEP) $(PROTOC_PLUGINS) $(E) "[GRPC] Generating gRPC's protobuf service CC file from $<" $(Q) mkdir -p `dirname $@` $(Q) $(PROTOC) -Ithird_party/protobuf/src -I. --grpc_out=$(GENDIR) --plugin=protoc-gen-grpc=$(PROTOC_PLUGINS_DIR)/grpc_cpp_plugin$(EXECUTABLE_SUFFIX) $< @@ -2412,7 +2412,7 @@ $(GENDIR)/src/proto/grpc/testing/messages.pb.cc: src/proto/grpc/testing/messages $(Q) mkdir -p `dirname $@` $(Q) $(PROTOC) -Ithird_party/protobuf/src -I. --cpp_out=$(GENDIR) $< -$(GENDIR)/src/proto/grpc/testing/messages.grpc.pb.cc: src/proto/grpc/testing/messages.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) +$(GENDIR)/src/proto/grpc/testing/messages.grpc.pb.cc: src/proto/grpc/testing/messages.proto $(GENDIR)/src/proto/grpc/testing/messages.pb.cc $(PROTOBUF_DEP) $(PROTOC_PLUGINS) $(E) "[GRPC] Generating gRPC's protobuf service CC file from $<" $(Q) mkdir -p `dirname $@` $(Q) $(PROTOC) -Ithird_party/protobuf/src -I. --grpc_out=$(GENDIR) --plugin=protoc-gen-grpc=$(PROTOC_PLUGINS_DIR)/grpc_cpp_plugin$(EXECUTABLE_SUFFIX) $< @@ -2428,7 +2428,7 @@ $(GENDIR)/src/proto/grpc/testing/metrics.pb.cc: src/proto/grpc/testing/metrics.p $(Q) mkdir -p `dirname $@` $(Q) $(PROTOC) -Ithird_party/protobuf/src -I. --cpp_out=$(GENDIR) $< -$(GENDIR)/src/proto/grpc/testing/metrics.grpc.pb.cc: src/proto/grpc/testing/metrics.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) +$(GENDIR)/src/proto/grpc/testing/metrics.grpc.pb.cc: src/proto/grpc/testing/metrics.proto $(GENDIR)/src/proto/grpc/testing/metrics.pb.cc $(PROTOBUF_DEP) $(PROTOC_PLUGINS) $(E) "[GRPC] Generating gRPC's protobuf service CC file from $<" $(Q) mkdir -p `dirname $@` $(Q) $(PROTOC) -Ithird_party/protobuf/src -I. --grpc_out=$(GENDIR) --plugin=protoc-gen-grpc=$(PROTOC_PLUGINS_DIR)/grpc_cpp_plugin$(EXECUTABLE_SUFFIX) $< @@ -2444,7 +2444,7 @@ $(GENDIR)/src/proto/grpc/testing/payloads.pb.cc: src/proto/grpc/testing/payloads $(Q) mkdir -p `dirname $@` $(Q) $(PROTOC) -Ithird_party/protobuf/src -I. --cpp_out=$(GENDIR) $< -$(GENDIR)/src/proto/grpc/testing/payloads.grpc.pb.cc: src/proto/grpc/testing/payloads.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) +$(GENDIR)/src/proto/grpc/testing/payloads.grpc.pb.cc: src/proto/grpc/testing/payloads.proto $(GENDIR)/src/proto/grpc/testing/payloads.pb.cc $(PROTOBUF_DEP) $(PROTOC_PLUGINS) $(E) "[GRPC] Generating gRPC's protobuf service CC file from $<" $(Q) mkdir -p `dirname $@` $(Q) $(PROTOC) -Ithird_party/protobuf/src -I. --grpc_out=$(GENDIR) --plugin=protoc-gen-grpc=$(PROTOC_PLUGINS_DIR)/grpc_cpp_plugin$(EXECUTABLE_SUFFIX) $< @@ -2460,7 +2460,7 @@ $(GENDIR)/src/proto/grpc/testing/services.pb.cc: src/proto/grpc/testing/services $(Q) mkdir -p `dirname $@` $(Q) $(PROTOC) -Ithird_party/protobuf/src -I. --cpp_out=$(GENDIR) $< -$(GENDIR)/src/proto/grpc/testing/services.grpc.pb.cc: src/proto/grpc/testing/services.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) $(GENDIR)/src/proto/grpc/testing/messages.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/control.pb.cc $(GENDIR)/src/proto/grpc/testing/control.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.grpc.pb.cc +$(GENDIR)/src/proto/grpc/testing/services.grpc.pb.cc: src/proto/grpc/testing/services.proto $(GENDIR)/src/proto/grpc/testing/services.pb.cc $(PROTOBUF_DEP) $(PROTOC_PLUGINS) $(GENDIR)/src/proto/grpc/testing/messages.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/control.pb.cc $(GENDIR)/src/proto/grpc/testing/control.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.grpc.pb.cc $(E) "[GRPC] Generating gRPC's protobuf service CC file from $<" $(Q) mkdir -p `dirname $@` $(Q) $(PROTOC) -Ithird_party/protobuf/src -I. --grpc_out=$(GENDIR) --plugin=protoc-gen-grpc=$(PROTOC_PLUGINS_DIR)/grpc_cpp_plugin$(EXECUTABLE_SUFFIX) $< @@ -2476,7 +2476,7 @@ $(GENDIR)/src/proto/grpc/testing/stats.pb.cc: src/proto/grpc/testing/stats.proto $(Q) mkdir -p `dirname $@` $(Q) $(PROTOC) -Ithird_party/protobuf/src -I. --cpp_out=$(GENDIR) $< -$(GENDIR)/src/proto/grpc/testing/stats.grpc.pb.cc: src/proto/grpc/testing/stats.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) +$(GENDIR)/src/proto/grpc/testing/stats.grpc.pb.cc: src/proto/grpc/testing/stats.proto $(GENDIR)/src/proto/grpc/testing/stats.pb.cc $(PROTOBUF_DEP) $(PROTOC_PLUGINS) $(E) "[GRPC] Generating gRPC's protobuf service CC file from $<" $(Q) mkdir -p `dirname $@` $(Q) $(PROTOC) -Ithird_party/protobuf/src -I. --grpc_out=$(GENDIR) --plugin=protoc-gen-grpc=$(PROTOC_PLUGINS_DIR)/grpc_cpp_plugin$(EXECUTABLE_SUFFIX) $< @@ -2492,7 +2492,7 @@ $(GENDIR)/src/proto/grpc/testing/test.pb.cc: src/proto/grpc/testing/test.proto $ $(Q) mkdir -p `dirname $@` $(Q) $(PROTOC) -Ithird_party/protobuf/src -I. --cpp_out=$(GENDIR) $< -$(GENDIR)/src/proto/grpc/testing/test.grpc.pb.cc: src/proto/grpc/testing/test.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) $(GENDIR)/src/proto/grpc/testing/empty.pb.cc $(GENDIR)/src/proto/grpc/testing/empty.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.grpc.pb.cc +$(GENDIR)/src/proto/grpc/testing/test.grpc.pb.cc: src/proto/grpc/testing/test.proto $(GENDIR)/src/proto/grpc/testing/test.pb.cc $(PROTOBUF_DEP) $(PROTOC_PLUGINS) $(GENDIR)/src/proto/grpc/testing/empty.pb.cc $(GENDIR)/src/proto/grpc/testing/empty.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.grpc.pb.cc $(E) "[GRPC] Generating gRPC's protobuf service CC file from $<" $(Q) mkdir -p `dirname $@` $(Q) $(PROTOC) -Ithird_party/protobuf/src -I. --grpc_out=$(GENDIR) --plugin=protoc-gen-grpc=$(PROTOC_PLUGINS_DIR)/grpc_cpp_plugin$(EXECUTABLE_SUFFIX) $< diff --git a/templates/Makefile.template b/templates/Makefile.template index 051a475d476..05887879100 100644 --- a/templates/Makefile.template +++ b/templates/Makefile.template @@ -1233,7 +1233,7 @@ $(Q) mkdir -p `dirname $@` $(Q) $(PROTOC) -Ithird_party/protobuf/src -I. --cpp_out=$(GENDIR) $< - $(GENDIR)/${p}.grpc.pb.cc: ${p}.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) ${' '.join('$(GENDIR)/%s.pb.cc $(GENDIR)/%s.grpc.pb.cc' % (q,q) for q in proto_deps.get(p, []))} + $(GENDIR)/${p}.grpc.pb.cc: ${p}.proto $(GENDIR)/${p}.pb.cc $(PROTOBUF_DEP) $(PROTOC_PLUGINS) ${' '.join('$(GENDIR)/%s.pb.cc $(GENDIR)/%s.grpc.pb.cc' % (q,q) for q in proto_deps.get(p, []))} $(E) "[GRPC] Generating gRPC's protobuf service CC file from $<" $(Q) mkdir -p `dirname $@` $(Q) $(PROTOC) -Ithird_party/protobuf/src -I. --grpc_out=${pluginflags}$(GENDIR) --plugin=protoc-gen-grpc=$(PROTOC_PLUGINS_DIR)/grpc_cpp_plugin$(EXECUTABLE_SUFFIX) $< From 632e6f2cb76c39b6ac38892a360ee9c79cd4332c Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Mon, 31 Jul 2017 11:19:34 +0200 Subject: [PATCH 65/80] fix jobs attempting to use gfile service account key --- tools/internal_ci/macos/grpc_build_artifacts.cfg | 1 + tools/internal_ci/macos/grpc_interop.cfg | 1 + tools/internal_ci/macos/pull_request/grpc_interop.cfg | 1 + 3 files changed, 3 insertions(+) diff --git a/tools/internal_ci/macos/grpc_build_artifacts.cfg b/tools/internal_ci/macos/grpc_build_artifacts.cfg index 733933c62a6..4da61faed36 100644 --- a/tools/internal_ci/macos/grpc_build_artifacts.cfg +++ b/tools/internal_ci/macos/grpc_build_artifacts.cfg @@ -16,6 +16,7 @@ # Location of the continuous shell script in repository. build_file: "grpc/tools/internal_ci/macos/grpc_build_artifacts.sh" +gfile_resources: "/bigstore/grpc-testing-secrets/gcp_credentials/GrpcTesting-d0eeee2db331.json" timeout_mins: 120 action { define_artifacts { diff --git a/tools/internal_ci/macos/grpc_interop.cfg b/tools/internal_ci/macos/grpc_interop.cfg index 9f3742c4864..b4b1b15cb40 100644 --- a/tools/internal_ci/macos/grpc_interop.cfg +++ b/tools/internal_ci/macos/grpc_interop.cfg @@ -16,6 +16,7 @@ # Location of the continuous shell script in repository. build_file: "grpc/tools/internal_ci/macos/grpc_interop.sh" +gfile_resources: "/bigstore/grpc-testing-secrets/gcp_credentials/GrpcTesting-d0eeee2db331.json" timeout_mins: 240 action { define_artifacts { diff --git a/tools/internal_ci/macos/pull_request/grpc_interop.cfg b/tools/internal_ci/macos/pull_request/grpc_interop.cfg index 9f3742c4864..b4b1b15cb40 100644 --- a/tools/internal_ci/macos/pull_request/grpc_interop.cfg +++ b/tools/internal_ci/macos/pull_request/grpc_interop.cfg @@ -16,6 +16,7 @@ # Location of the continuous shell script in repository. build_file: "grpc/tools/internal_ci/macos/grpc_interop.sh" +gfile_resources: "/bigstore/grpc-testing-secrets/gcp_credentials/GrpcTesting-d0eeee2db331.json" timeout_mins: 240 action { define_artifacts { From 6a8355de45efefb4cad388dfb639a8713e66de57 Mon Sep 17 00:00:00 2001 From: Muxi Yan Date: Mon, 31 Jul 2017 10:25:12 -0700 Subject: [PATCH 66/80] Fix two memory leaks --- src/core/ext/transport/cronet/transport/cronet_transport.c | 3 +++ src/objective-c/GRPCClient/private/NSData+GRPC.m | 2 ++ 2 files changed, 5 insertions(+) diff --git a/src/core/ext/transport/cronet/transport/cronet_transport.c b/src/core/ext/transport/cronet/transport/cronet_transport.c index 29dfa885de4..776e0765fe3 100644 --- a/src/core/ext/transport/cronet/transport/cronet_transport.c +++ b/src/core/ext/transport/cronet/transport/cronet_transport.c @@ -968,6 +968,9 @@ static enum e_op_result execute_stream_op(grpc_exec_ctx *exec_ctx, s->header_array.capacity = s->header_array.count; CRONET_LOG(GPR_DEBUG, "bidirectional_stream_start(%p, %s)", s->cbs, url); bidirectional_stream_start(s->cbs, url, 0, method, &s->header_array, false); + if (url) { + gpr_free(url); + } unsigned int header_index; for (header_index = 0; header_index < s->header_array.count; header_index++) { diff --git a/src/objective-c/GRPCClient/private/NSData+GRPC.m b/src/objective-c/GRPCClient/private/NSData+GRPC.m index 7ee76ad333b..7c46594dd5d 100644 --- a/src/objective-c/GRPCClient/private/NSData+GRPC.m +++ b/src/objective-c/GRPCClient/private/NSData+GRPC.m @@ -47,6 +47,8 @@ static void MallocAndCopyByteBufferToCharArray(grpc_byte_buffer *buffer, grpc_slice_unref(slice); *array = result; *length = uncompressed_length; + + grpc_byte_buffer_reader_destroy(&reader); } static grpc_byte_buffer *CopyCharArrayToNewByteBuffer(const char *array, From dde4548733be8b8480205a6aa796cf01d75636ba Mon Sep 17 00:00:00 2001 From: Muxi Yan Date: Mon, 31 Jul 2017 11:24:45 -0700 Subject: [PATCH 67/80] Revert to more useful debug info --- src/objective-c/tests/build_one_example.sh | 4 +++- src/objective-c/tests/run_tests.sh | 12 +++++++++--- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/src/objective-c/tests/build_one_example.sh b/src/objective-c/tests/build_one_example.sh index 576276096e6..9abe6efc32a 100755 --- a/src/objective-c/tests/build_one_example.sh +++ b/src/objective-c/tests/build_one_example.sh @@ -42,4 +42,6 @@ xcodebuild \ build \ -workspace *.xcworkspace \ -scheme $SCHEME \ - -destination name="iPhone 6" | xcpretty + -destination name="iPhone 6" \ + | egrep "$XCODEBUILD_FILTER" \ + | egrep -v "(GPBDictionary|GPBArray)" - diff --git a/src/objective-c/tests/run_tests.sh b/src/objective-c/tests/run_tests.sh index 8fa9439284b..337db8d1a4c 100755 --- a/src/objective-c/tests/run_tests.sh +++ b/src/objective-c/tests/run_tests.sh @@ -79,14 +79,18 @@ xcodebuild \ HOST_PORT_LOCALSSL=localhost:5051 \ HOST_PORT_LOCAL=localhost:5050 \ HOST_PORT_REMOTE=grpc-test.sandbox.googleapis.com \ - test | xcpretty + test \ + | egrep "$XCODEBUILD_FILTER" \ + | egrep -v "(GPBDictionary|GPBArray)" - echo "TIME: $(date)" xcodebuild \ -workspace Tests.xcworkspace \ -scheme CoreCronetEnd2EndTests \ -destination name="iPhone 6" \ - test | xcpretty + test \ + | egrep "$XCODEBUILD_FILTER" \ + | egrep -v "(GPBDictionary|GPBArray)" - # Temporarily disabled for (possible) flakiness on Jenkins. # Fix or reenable after confirmation/disconfirmation that it is the source of @@ -105,4 +109,6 @@ xcodebuild \ -scheme InteropTestsRemoteWithCronet \ -destination name="iPhone 6" \ HOST_PORT_REMOTE=grpc-test.sandbox.googleapis.com \ - test | xcpretty + test \ + | egrep "$XCODEBUILD_FILTER" \ + | egrep -v "(GPBDictionary|GPBArray)" - From b25c9bf664d6217738db758d92e92b1dd7c08681 Mon Sep 17 00:00:00 2001 From: Muxi Yan Date: Mon, 31 Jul 2017 11:37:07 -0700 Subject: [PATCH 68/80] Show passed tests as well --- src/objective-c/tests/build_one_example.sh | 2 +- src/objective-c/tests/run_tests.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/objective-c/tests/build_one_example.sh b/src/objective-c/tests/build_one_example.sh index 9abe6efc32a..298d8e70430 100755 --- a/src/objective-c/tests/build_one_example.sh +++ b/src/objective-c/tests/build_one_example.sh @@ -37,7 +37,7 @@ rm -f Podfile.lock pod install set -o pipefail -XCODEBUILD_FILTER='(^===|^\*\*|\bfatal\b|\berror\b|\bwarning\b|\bfail)' +XCODEBUILD_FILTER='(^===|^\*\*|\bfatal\b|\berror\b|\bwarning\b|\bfail|\bpassed\b)' xcodebuild \ build \ -workspace *.xcworkspace \ diff --git a/src/objective-c/tests/run_tests.sh b/src/objective-c/tests/run_tests.sh index 337db8d1a4c..d9c78ebac90 100755 --- a/src/objective-c/tests/run_tests.sh +++ b/src/objective-c/tests/run_tests.sh @@ -70,7 +70,7 @@ trap 'kill -9 `jobs -p` ; echo "EXIT TIME: $(date)"' EXIT # element of the pipe fails. # TODO(jcanizales): Use xctool instead? Issue #2540. set -o pipefail -XCODEBUILD_FILTER='(^===|^\*\*|\bfatal\b|\berror\b|\bwarning\b|\bfail)' +XCODEBUILD_FILTER='(^===|^\*\*|\bfatal\b|\berror\b|\bwarning\b|\bfail|\bpassed\b)' echo "TIME: $(date)" xcodebuild \ -workspace Tests.xcworkspace \ From 897a7529e17e536aa2d2e644f71866efd9c4923c Mon Sep 17 00:00:00 2001 From: yang-g Date: Mon, 31 Jul 2017 11:48:06 -0700 Subject: [PATCH 69/80] Initialize initiating_exec_ctx_or_null --- src/core/lib/iomgr/combiner.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/core/lib/iomgr/combiner.c b/src/core/lib/iomgr/combiner.c index c72c37e2b53..eead432e3ea 100644 --- a/src/core/lib/iomgr/combiner.c +++ b/src/core/lib/iomgr/combiner.c @@ -79,6 +79,7 @@ grpc_combiner *grpc_combiner_create(void) { lock->time_to_execute_final_list = false; lock->scheduler.vtable = &scheduler; lock->finally_scheduler.vtable = &finally_scheduler; + lock->initiating_exec_ctx_or_null = 0; gpr_atm_no_barrier_store(&lock->state, STATE_UNORPHANED); gpr_mpscq_init(&lock->queue); grpc_closure_list_init(&lock->final_list); From 9663d0337ee7e53cf2029ae6dfd5d51a434b9b51 Mon Sep 17 00:00:00 2001 From: Garret Kelly Date: Wed, 7 Jun 2017 16:25:36 -0400 Subject: [PATCH 70/80] Add a GrpcLibraryInitializer to client_context.cc It's feasible that a program be written/linked such that it only use ClientContext from grpc++, which could end up with the other instances of GrpcLibraryInitializer not ending up in the final binary. Add a GrpcLibraryInitializer to client_context.cc to ensure that the library is initialized. The primary side-effect of the library not being initialized when only using a ClientContext is that the destructor for ClientContext indirectly ends up trying to call through g_core_codegen_interface when destructing its metadata, which is null. --- src/cpp/client/client_context.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/cpp/client/client_context.cc b/src/cpp/client/client_context.cc index 14cacc8f183..3af8bdc11ac 100644 --- a/src/cpp/client/client_context.cc +++ b/src/cpp/client/client_context.cc @@ -24,6 +24,7 @@ #include #include +#include #include #include #include @@ -38,6 +39,7 @@ class DefaultGlobalClientCallbacks final void Destructor(ClientContext* context) override {} }; +static internal::GrpcLibraryInitializer g_gli_initializer; static DefaultGlobalClientCallbacks g_default_client_callbacks; static ClientContext::GlobalCallbacks* g_client_callbacks = &g_default_client_callbacks; From 84d6924fa0cd28ffde1ada52fa4be7426a08149c Mon Sep 17 00:00:00 2001 From: yang-g Date: Mon, 31 Jul 2017 13:39:09 -0700 Subject: [PATCH 71/80] Use zalloc and remove now redundant sets --- src/core/lib/iomgr/combiner.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/core/lib/iomgr/combiner.c b/src/core/lib/iomgr/combiner.c index eead432e3ea..9b66987b685 100644 --- a/src/core/lib/iomgr/combiner.c +++ b/src/core/lib/iomgr/combiner.c @@ -73,13 +73,10 @@ static const grpc_closure_scheduler_vtable finally_scheduler = { static void offload(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error); grpc_combiner *grpc_combiner_create(void) { - grpc_combiner *lock = gpr_malloc(sizeof(*lock)); + grpc_combiner *lock = gpr_zalloc(sizeof(*lock)); gpr_ref_init(&lock->refs, 1); - lock->next_combiner_on_this_exec_ctx = NULL; - lock->time_to_execute_final_list = false; lock->scheduler.vtable = &scheduler; lock->finally_scheduler.vtable = &finally_scheduler; - lock->initiating_exec_ctx_or_null = 0; gpr_atm_no_barrier_store(&lock->state, STATE_UNORPHANED); gpr_mpscq_init(&lock->queue); grpc_closure_list_init(&lock->final_list); From 6fe29a5e811799095465d006afa065767b5d863c Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Mon, 31 Jul 2017 13:39:13 -0700 Subject: [PATCH 72/80] Node: replace custom deprecation warning with existing solution --- src/node/src/server.js | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/node/src/server.js b/src/node/src/server.js index fba0aac938e..8b7c0b68627 100644 --- a/src/node/src/server.js +++ b/src/node/src/server.js @@ -919,11 +919,6 @@ Server.prototype.addService = function(service, implementation) { }); }; -var logAddProtoServiceDeprecationOnce = _.once(function() { - common.log(constants.logVerbosity.INFO, - 'Server#addProtoService is deprecated. Use addService instead'); -}); - /** * Add a proto service to the server, with a corresponding implementation * @deprecated Use {@link grpc.Server#addService} instead @@ -931,11 +926,11 @@ var logAddProtoServiceDeprecationOnce = _.once(function() { * @param {Object} implementation Map of method * names to method implementation for the provided service. */ -Server.prototype.addProtoService = function(service, implementation) { +Server.prototype.addProtoService = util.deprecate(function(service, + implementation) { var options; var protobuf_js_5_common = require('./protobuf_js_5_common'); var protobuf_js_6_common = require('./protobuf_js_6_common'); - logAddProtoServiceDeprecationOnce(); if (protobuf_js_5_common.isProbablyProtobufJs5(service)) { options = _.defaults(service.grpc_options, common.defaultGrpcOptions); this.addService( @@ -950,7 +945,7 @@ Server.prototype.addProtoService = function(service, implementation) { // We assume that this is a service attributes object this.addService(service, implementation); } -}; +}, 'Server#addProtoService: Use Server#addService instead'); /** * Binds the server to the given port, with SSL disabled if creds is an From 39088914ef71e878ed3184c3b70eda8d332bb368 Mon Sep 17 00:00:00 2001 From: Alexander Polcyn Date: Mon, 31 Jul 2017 14:45:54 -0700 Subject: [PATCH 73/80] fix cancellation test flake --- src/ruby/spec/generic/rpc_server_spec.rb | 88 +++++++++++++++++++++--- 1 file changed, 79 insertions(+), 9 deletions(-) diff --git a/src/ruby/spec/generic/rpc_server_spec.rb b/src/ruby/spec/generic/rpc_server_spec.rb index e0646f45997..e4fe594e220 100644 --- a/src/ruby/spec/generic/rpc_server_spec.rb +++ b/src/ruby/spec/generic/rpc_server_spec.rb @@ -111,6 +111,32 @@ end SlowStub = SlowService.rpc_stub_class +# A test service that allows a synchronized RPC cancellation +class SynchronizedCancellationService + include GRPC::GenericService + rpc :an_rpc, EchoMsg, EchoMsg + attr_reader :received_md, :delay + + # notify_request_received and wait_until_rpc_cancelled are + # callbacks to synchronously allow the client to proceed with + # cancellation (after the unary request has been received), + # and to synchronously wait until the client has cancelled the + # current RPC. + def initialize(notify_request_received, wait_until_rpc_cancelled) + @notify_request_received = notify_request_received + @wait_until_rpc_cancelled = wait_until_rpc_cancelled + end + + def an_rpc(req, _call) + GRPC.logger.info('starting a synchronusly cancelled rpc') + @notify_request_received.call(req) + @wait_until_rpc_cancelled.call + req # send back the req as the response + end +end + +SynchronizedCancellationStub = SynchronizedCancellationService.rpc_stub_class + # a test service that hangs onto call objects # and uses them after the server-side call has been # finished @@ -384,20 +410,64 @@ describe GRPC::RpcServer do end it 'should handle cancellation correctly', server: true do - service = SlowService.new + request_received = false + request_received_mu = Mutex.new + request_received_cv = ConditionVariable.new + notify_request_received = proc do |req| + request_received_mu.synchronize do + fail 'req is nil' if req.nil? + expect(req.is_a?(EchoMsg)).to be true + fail 'test bug - already set' if request_received + request_received = true + request_received_cv.signal + end + end + + rpc_cancelled = false + rpc_cancelled_mu = Mutex.new + rpc_cancelled_cv = ConditionVariable.new + wait_until_rpc_cancelled = proc do + rpc_cancelled_mu.synchronize do + loop do + break if rpc_cancelled + rpc_cancelled_cv.wait(rpc_cancelled_mu) + end + end + end + + service = SynchronizedCancellationService.new(notify_request_received, + wait_until_rpc_cancelled) @srv.handle(service) - t = Thread.new { @srv.run } + srv_thd = Thread.new { @srv.run } @srv.wait_till_running req = EchoMsg.new - stub = SlowStub.new(@host, :this_channel_is_insecure, **client_opts) - op = stub.an_rpc(req, metadata: { k1: 'v1', k2: 'v2' }, return_op: true) - Thread.new do # cancel the call - sleep 0.1 - op.cancel + stub = SynchronizedCancellationStub.new(@host, + :this_channel_is_insecure, + **client_opts) + op = stub.an_rpc(req, return_op: true) + + client_thd = Thread.new do + expect { op.execute }.to raise_error GRPC::Cancelled end - expect { op.execute }.to raise_error GRPC::Cancelled + + request_received_mu.synchronize do + loop do + break if request_received + request_received_cv.wait(request_received_mu) + end + end + + op.cancel + + rpc_cancelled_mu.synchronize do + fail 'test bug - already set' if rpc_cancelled + rpc_cancelled = true + rpc_cancelled_cv.signal + end + + client_thd.join @srv.stop - t.join + srv_thd.join end it 'should handle multiple parallel requests', server: true do From 686437ada973113285f3d2c31a54305aeb5a9248 Mon Sep 17 00:00:00 2001 From: Noah Eisen Date: Mon, 31 Jul 2017 16:11:05 -0700 Subject: [PATCH 74/80] Add repro --- ...erfuzz-testcase-minimized-4688823906729984 | Bin 0 -> 150 bytes tools/run_tests/generated/tests.json | 23 ++++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 test/core/end2end/fuzzers/api_fuzzer_corpus/clusterfuzz-testcase-minimized-4688823906729984 diff --git a/test/core/end2end/fuzzers/api_fuzzer_corpus/clusterfuzz-testcase-minimized-4688823906729984 b/test/core/end2end/fuzzers/api_fuzzer_corpus/clusterfuzz-testcase-minimized-4688823906729984 new file mode 100644 index 0000000000000000000000000000000000000000..a5b730382eedb188f1e8c784d7cc71fb8f6c4b74 GIT binary patch literal 150 zcmZQ#VBk_vU;sjH9wr9aR0c)`g<=K Date: Mon, 31 Jul 2017 16:51:47 -0700 Subject: [PATCH 75/80] Env var for fuzzer trace --- test/core/end2end/fuzzers/api_fuzzer.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/core/end2end/fuzzers/api_fuzzer.c b/test/core/end2end/fuzzers/api_fuzzer.c index 281a1af20c3..01fa4f748f5 100644 --- a/test/core/end2end/fuzzers/api_fuzzer.c +++ b/test/core/end2end/fuzzers/api_fuzzer.c @@ -34,6 +34,7 @@ #include "src/core/lib/iomgr/timer.h" #include "src/core/lib/iomgr/timer_manager.h" #include "src/core/lib/slice/slice_internal.h" +#include "src/core/lib/support/env.h" #include "src/core/lib/surface/server.h" #include "src/core/lib/transport/metadata.h" #include "test/core/end2end/data/ssl_test_data.h" @@ -731,7 +732,9 @@ static validator *make_finished_batch_validator(call_state *cs, int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { grpc_test_only_set_slice_hash_seed(0); - if (squelch) gpr_set_log_function(dont_log); + char *grpc_trace_fuzzer = gpr_getenv("GRPC_TRACE_FUZZER"); + if (squelch && grpc_trace_fuzzer == NULL) gpr_set_log_function(dont_log); + gpr_free(grpc_trace_fuzzer); input_stream inp = {data, data + size}; grpc_tcp_client_connect_impl = my_tcp_client_connect; gpr_now_impl = now_impl; From 309f20802d951d20c3114366da48d4c9c7a723d2 Mon Sep 17 00:00:00 2001 From: Noah Eisen Date: Mon, 31 Jul 2017 16:52:53 -0700 Subject: [PATCH 76/80] Update env var doc --- doc/environment_variables.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/doc/environment_variables.md b/doc/environment_variables.md index ff89b4c9b91..036824d573f 100644 --- a/doc/environment_variables.md +++ b/doc/environment_variables.md @@ -102,6 +102,9 @@ some configuration as environment variables that can be set. - INFO - log INFO and ERROR message - ERROR - log only errors +* GRPC_TRACE_FUZZER + if set, the fuzzers will output trace (it is usually supressed). + * GRPC_DNS_RESOLVER Declares which DNS resolver to use. The default is ares if gRPC is built with c-ares support. Otherwise, the value of this environment variable is ignored. From e6432bf3539e4928edfee27badc93d31eabec148 Mon Sep 17 00:00:00 2001 From: Noah Eisen Date: Mon, 31 Jul 2017 16:37:15 -0700 Subject: [PATCH 77/80] Fix leak if duplicated static md --- src/core/lib/surface/call.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/core/lib/surface/call.c b/src/core/lib/surface/call.c index 04613f17e3b..725785f68f8 100644 --- a/src/core/lib/surface/call.c +++ b/src/core/lib/surface/call.c @@ -823,7 +823,7 @@ uint32_t grpc_call_test_only_get_encodings_accepted_by_peer(grpc_call *call) { return encodings_accepted_by_peer; } -static grpc_linked_mdelem *linked_from_md(grpc_metadata *md) { +static grpc_linked_mdelem *linked_from_md(const grpc_metadata *md) { return (grpc_linked_mdelem *)&md->internal_data; } @@ -847,7 +847,7 @@ static int prepare_application_metadata( for (i = 0; i < total_count; i++) { const grpc_metadata *md = get_md_elem(metadata, additional_metadata, i, count); - grpc_linked_mdelem *l = (grpc_linked_mdelem *)&md->internal_data; + grpc_linked_mdelem *l = linked_from_md(md); GPR_ASSERT(sizeof(grpc_linked_mdelem) == sizeof(md->internal_data)); if (!GRPC_LOG_IF_ERROR("validate_metadata", grpc_validate_header_key_is_legal(md->key))) { @@ -864,7 +864,7 @@ static int prepare_application_metadata( for (int j = 0; j < i; j++) { const grpc_metadata *md = get_md_elem(metadata, additional_metadata, j, count); - grpc_linked_mdelem *l = (grpc_linked_mdelem *)&md->internal_data; + grpc_linked_mdelem *l = linked_from_md(md); GRPC_MDELEM_UNREF(exec_ctx, l->md); } return 0; @@ -882,9 +882,12 @@ static int prepare_application_metadata( } for (i = 0; i < total_count; i++) { grpc_metadata *md = get_md_elem(metadata, additional_metadata, i, count); - GRPC_LOG_IF_ERROR( - "prepare_application_metadata", - grpc_metadata_batch_link_tail(exec_ctx, batch, linked_from_md(md))); + grpc_linked_mdelem *l = linked_from_md(md); + grpc_error *error = grpc_metadata_batch_link_tail(exec_ctx, batch, l); + if (error != GRPC_ERROR_NONE) { + GRPC_MDELEM_UNREF(exec_ctx, l->md); + } + GRPC_LOG_IF_ERROR("prepare_application_metadata", error); } call->send_extra_metadata_count = 0; From 168034b2f0a1943a0b14237a6d56a3ed0b582d8a Mon Sep 17 00:00:00 2001 From: Vijay Pai Date: Mon, 31 Jul 2017 00:53:10 -0700 Subject: [PATCH 78/80] Test against grpc++_unsecure when possible. Provide unsecure version of test_util --- CMakeLists.txt | 541 ++++++++++-- Makefile | 477 +++++++++-- build.yaml | 186 +++-- .../generated/sources_and_headers.json | 207 +++-- vsprojects/buildtests_c.sln | 1 - vsprojects/grpc.sln | 1 - .../grpc++_test_util_unsecure.vcxproj | 271 ++++++ .../grpc++_test_util_unsecure.vcxproj.filters | 265 ++++++ .../grpc_test_util/grpc_test_util.vcxproj | 136 +++ .../grpc_test_util.vcxproj.filters | 294 +++++++ .../grpc_test_util_unsecure.vcxproj | 412 +++++++++- .../grpc_test_util_unsecure.vcxproj.filters | 773 ++++++++++++++++++ .../alarm_cpp_test/alarm_cpp_test.vcxproj | 16 +- .../grpc_benchmark/grpc_benchmark.vcxproj | 12 +- .../server_builder_test.vcxproj | 16 +- .../server_request_call_test.vcxproj | 16 +- .../thread_manager_test.vcxproj | 8 +- .../thread_stress_test.vcxproj | 16 +- 18 files changed, 3300 insertions(+), 348 deletions(-) create mode 100644 vsprojects/vcxproj/grpc++_test_util_unsecure/grpc++_test_util_unsecure.vcxproj create mode 100644 vsprojects/vcxproj/grpc++_test_util_unsecure/grpc++_test_util_unsecure.vcxproj.filters diff --git a/CMakeLists.txt b/CMakeLists.txt index 0403d962b70..10d8e98ea38 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1728,6 +1728,53 @@ add_library(grpc_test_util src/core/lib/transport/transport.c src/core/lib/transport/transport_op_string.c src/core/lib/debug/trace.c + src/core/ext/filters/client_channel/channel_connectivity.c + src/core/ext/filters/client_channel/client_channel.c + src/core/ext/filters/client_channel/client_channel_factory.c + src/core/ext/filters/client_channel/client_channel_plugin.c + src/core/ext/filters/client_channel/connector.c + src/core/ext/filters/client_channel/http_connect_handshaker.c + src/core/ext/filters/client_channel/http_proxy.c + src/core/ext/filters/client_channel/lb_policy.c + src/core/ext/filters/client_channel/lb_policy_factory.c + src/core/ext/filters/client_channel/lb_policy_registry.c + src/core/ext/filters/client_channel/parse_address.c + src/core/ext/filters/client_channel/proxy_mapper.c + src/core/ext/filters/client_channel/proxy_mapper_registry.c + src/core/ext/filters/client_channel/resolver.c + src/core/ext/filters/client_channel/resolver_factory.c + src/core/ext/filters/client_channel/resolver_registry.c + src/core/ext/filters/client_channel/retry_throttle.c + src/core/ext/filters/client_channel/subchannel.c + src/core/ext/filters/client_channel/subchannel_index.c + src/core/ext/filters/client_channel/uri_parser.c + src/core/ext/filters/deadline/deadline_filter.c + src/core/ext/transport/chttp2/transport/bin_decoder.c + src/core/ext/transport/chttp2/transport/bin_encoder.c + src/core/ext/transport/chttp2/transport/chttp2_plugin.c + src/core/ext/transport/chttp2/transport/chttp2_transport.c + src/core/ext/transport/chttp2/transport/frame_data.c + src/core/ext/transport/chttp2/transport/frame_goaway.c + src/core/ext/transport/chttp2/transport/frame_ping.c + src/core/ext/transport/chttp2/transport/frame_rst_stream.c + src/core/ext/transport/chttp2/transport/frame_settings.c + src/core/ext/transport/chttp2/transport/frame_window_update.c + src/core/ext/transport/chttp2/transport/hpack_encoder.c + src/core/ext/transport/chttp2/transport/hpack_parser.c + src/core/ext/transport/chttp2/transport/hpack_table.c + src/core/ext/transport/chttp2/transport/http2_settings.c + src/core/ext/transport/chttp2/transport/huffsyms.c + src/core/ext/transport/chttp2/transport/incoming_metadata.c + src/core/ext/transport/chttp2/transport/parsing.c + src/core/ext/transport/chttp2/transport/stream_lists.c + src/core/ext/transport/chttp2/transport/stream_map.c + src/core/ext/transport/chttp2/transport/varint.c + src/core/ext/transport/chttp2/transport/writing.c + src/core/ext/transport/chttp2/alpn/alpn.c + src/core/ext/filters/http/client/http_client_filter.c + src/core/ext/filters/http/http_filters_plugin.c + src/core/ext/filters/http/message_compress/message_compress_filter.c + src/core/ext/filters/http/server/http_server_filter.c ) if(WIN32 AND MSVC) @@ -1811,6 +1858,179 @@ add_library(grpc_test_util_unsecure test/core/util/port_server_client.c test/core/util/slice_splitter.c test/core/util/trickle_endpoint.c + src/core/lib/channel/channel_args.c + src/core/lib/channel/channel_stack.c + src/core/lib/channel/channel_stack_builder.c + src/core/lib/channel/connected_channel.c + src/core/lib/channel/handshaker.c + src/core/lib/channel/handshaker_factory.c + src/core/lib/channel/handshaker_registry.c + src/core/lib/compression/compression.c + src/core/lib/compression/message_compress.c + src/core/lib/compression/stream_compression.c + src/core/lib/http/format_request.c + src/core/lib/http/httpcli.c + src/core/lib/http/parser.c + src/core/lib/iomgr/closure.c + src/core/lib/iomgr/combiner.c + src/core/lib/iomgr/endpoint.c + src/core/lib/iomgr/endpoint_pair_posix.c + src/core/lib/iomgr/endpoint_pair_uv.c + src/core/lib/iomgr/endpoint_pair_windows.c + src/core/lib/iomgr/error.c + src/core/lib/iomgr/ev_epoll1_linux.c + src/core/lib/iomgr/ev_epoll_limited_pollers_linux.c + src/core/lib/iomgr/ev_epoll_thread_pool_linux.c + src/core/lib/iomgr/ev_epollex_linux.c + src/core/lib/iomgr/ev_epollsig_linux.c + src/core/lib/iomgr/ev_poll_posix.c + src/core/lib/iomgr/ev_posix.c + src/core/lib/iomgr/ev_windows.c + src/core/lib/iomgr/exec_ctx.c + src/core/lib/iomgr/executor.c + src/core/lib/iomgr/iocp_windows.c + src/core/lib/iomgr/iomgr.c + src/core/lib/iomgr/iomgr_posix.c + src/core/lib/iomgr/iomgr_uv.c + src/core/lib/iomgr/iomgr_windows.c + src/core/lib/iomgr/is_epollexclusive_available.c + src/core/lib/iomgr/load_file.c + src/core/lib/iomgr/lockfree_event.c + src/core/lib/iomgr/network_status_tracker.c + src/core/lib/iomgr/polling_entity.c + src/core/lib/iomgr/pollset_set_uv.c + src/core/lib/iomgr/pollset_set_windows.c + src/core/lib/iomgr/pollset_uv.c + src/core/lib/iomgr/pollset_windows.c + src/core/lib/iomgr/resolve_address_posix.c + src/core/lib/iomgr/resolve_address_uv.c + src/core/lib/iomgr/resolve_address_windows.c + src/core/lib/iomgr/resource_quota.c + src/core/lib/iomgr/sockaddr_utils.c + src/core/lib/iomgr/socket_factory_posix.c + src/core/lib/iomgr/socket_mutator.c + src/core/lib/iomgr/socket_utils_common_posix.c + src/core/lib/iomgr/socket_utils_linux.c + src/core/lib/iomgr/socket_utils_posix.c + src/core/lib/iomgr/socket_utils_uv.c + src/core/lib/iomgr/socket_utils_windows.c + src/core/lib/iomgr/socket_windows.c + src/core/lib/iomgr/tcp_client_posix.c + src/core/lib/iomgr/tcp_client_uv.c + src/core/lib/iomgr/tcp_client_windows.c + src/core/lib/iomgr/tcp_posix.c + src/core/lib/iomgr/tcp_server_posix.c + src/core/lib/iomgr/tcp_server_utils_posix_common.c + src/core/lib/iomgr/tcp_server_utils_posix_ifaddrs.c + src/core/lib/iomgr/tcp_server_utils_posix_noifaddrs.c + src/core/lib/iomgr/tcp_server_uv.c + src/core/lib/iomgr/tcp_server_windows.c + src/core/lib/iomgr/tcp_uv.c + src/core/lib/iomgr/tcp_windows.c + src/core/lib/iomgr/time_averaged_stats.c + src/core/lib/iomgr/timer_generic.c + src/core/lib/iomgr/timer_heap.c + src/core/lib/iomgr/timer_manager.c + src/core/lib/iomgr/timer_uv.c + src/core/lib/iomgr/udp_server.c + src/core/lib/iomgr/unix_sockets_posix.c + src/core/lib/iomgr/unix_sockets_posix_noop.c + src/core/lib/iomgr/wakeup_fd_cv.c + src/core/lib/iomgr/wakeup_fd_eventfd.c + src/core/lib/iomgr/wakeup_fd_nospecial.c + src/core/lib/iomgr/wakeup_fd_pipe.c + src/core/lib/iomgr/wakeup_fd_posix.c + src/core/lib/json/json.c + src/core/lib/json/json_reader.c + src/core/lib/json/json_string.c + src/core/lib/json/json_writer.c + src/core/lib/slice/b64.c + src/core/lib/slice/percent_encoding.c + src/core/lib/slice/slice.c + src/core/lib/slice/slice_buffer.c + src/core/lib/slice/slice_hash_table.c + src/core/lib/slice/slice_intern.c + src/core/lib/slice/slice_string_helpers.c + src/core/lib/surface/alarm.c + src/core/lib/surface/api_trace.c + src/core/lib/surface/byte_buffer.c + src/core/lib/surface/byte_buffer_reader.c + src/core/lib/surface/call.c + src/core/lib/surface/call_details.c + src/core/lib/surface/call_log_batch.c + src/core/lib/surface/channel.c + src/core/lib/surface/channel_init.c + src/core/lib/surface/channel_ping.c + src/core/lib/surface/channel_stack_type.c + src/core/lib/surface/completion_queue.c + src/core/lib/surface/completion_queue_factory.c + src/core/lib/surface/event_string.c + src/core/lib/surface/lame_client.cc + src/core/lib/surface/metadata_array.c + src/core/lib/surface/server.c + src/core/lib/surface/validate_metadata.c + src/core/lib/surface/version.c + src/core/lib/transport/bdp_estimator.c + src/core/lib/transport/byte_stream.c + src/core/lib/transport/connectivity_state.c + src/core/lib/transport/error_utils.c + src/core/lib/transport/metadata.c + src/core/lib/transport/metadata_batch.c + src/core/lib/transport/pid_controller.c + src/core/lib/transport/service_config.c + src/core/lib/transport/static_metadata.c + src/core/lib/transport/status_conversion.c + src/core/lib/transport/timeout_encoding.c + src/core/lib/transport/transport.c + src/core/lib/transport/transport_op_string.c + src/core/lib/debug/trace.c + src/core/ext/filters/client_channel/channel_connectivity.c + src/core/ext/filters/client_channel/client_channel.c + src/core/ext/filters/client_channel/client_channel_factory.c + src/core/ext/filters/client_channel/client_channel_plugin.c + src/core/ext/filters/client_channel/connector.c + src/core/ext/filters/client_channel/http_connect_handshaker.c + src/core/ext/filters/client_channel/http_proxy.c + src/core/ext/filters/client_channel/lb_policy.c + src/core/ext/filters/client_channel/lb_policy_factory.c + src/core/ext/filters/client_channel/lb_policy_registry.c + src/core/ext/filters/client_channel/parse_address.c + src/core/ext/filters/client_channel/proxy_mapper.c + src/core/ext/filters/client_channel/proxy_mapper_registry.c + src/core/ext/filters/client_channel/resolver.c + src/core/ext/filters/client_channel/resolver_factory.c + src/core/ext/filters/client_channel/resolver_registry.c + src/core/ext/filters/client_channel/retry_throttle.c + src/core/ext/filters/client_channel/subchannel.c + src/core/ext/filters/client_channel/subchannel_index.c + src/core/ext/filters/client_channel/uri_parser.c + src/core/ext/filters/deadline/deadline_filter.c + src/core/ext/transport/chttp2/transport/bin_decoder.c + src/core/ext/transport/chttp2/transport/bin_encoder.c + src/core/ext/transport/chttp2/transport/chttp2_plugin.c + src/core/ext/transport/chttp2/transport/chttp2_transport.c + src/core/ext/transport/chttp2/transport/frame_data.c + src/core/ext/transport/chttp2/transport/frame_goaway.c + src/core/ext/transport/chttp2/transport/frame_ping.c + src/core/ext/transport/chttp2/transport/frame_rst_stream.c + src/core/ext/transport/chttp2/transport/frame_settings.c + src/core/ext/transport/chttp2/transport/frame_window_update.c + src/core/ext/transport/chttp2/transport/hpack_encoder.c + src/core/ext/transport/chttp2/transport/hpack_parser.c + src/core/ext/transport/chttp2/transport/hpack_table.c + src/core/ext/transport/chttp2/transport/http2_settings.c + src/core/ext/transport/chttp2/transport/huffsyms.c + src/core/ext/transport/chttp2/transport/incoming_metadata.c + src/core/ext/transport/chttp2/transport/parsing.c + src/core/ext/transport/chttp2/transport/stream_lists.c + src/core/ext/transport/chttp2/transport/stream_map.c + src/core/ext/transport/chttp2/transport/varint.c + src/core/ext/transport/chttp2/transport/writing.c + src/core/ext/transport/chttp2/alpn/alpn.c + src/core/ext/filters/http/client/http_client_filter.c + src/core/ext/filters/http/http_filters_plugin.c + src/core/ext/filters/http/message_compress/message_compress_filter.c + src/core/ext/filters/http/server/http_server_filter.c ) if(WIN32 AND MSVC) @@ -1845,9 +2065,35 @@ target_link_libraries(grpc_test_util_unsecure gpr gpr_test_util grpc_unsecure - grpc ) +foreach(_hdr + include/grpc/impl/codegen/byte_buffer_reader.h + include/grpc/impl/codegen/compression_types.h + include/grpc/impl/codegen/connectivity_state.h + include/grpc/impl/codegen/exec_ctx_fwd.h + include/grpc/impl/codegen/grpc_types.h + include/grpc/impl/codegen/propagation_bits.h + include/grpc/impl/codegen/slice.h + include/grpc/impl/codegen/status.h + include/grpc/impl/codegen/atm.h + include/grpc/impl/codegen/atm_gcc_atomic.h + include/grpc/impl/codegen/atm_gcc_sync.h + include/grpc/impl/codegen/atm_windows.h + include/grpc/impl/codegen/gpr_slice.h + include/grpc/impl/codegen/gpr_types.h + include/grpc/impl/codegen/port_platform.h + include/grpc/impl/codegen/sync.h + include/grpc/impl/codegen/sync_generic.h + include/grpc/impl/codegen/sync_posix.h + include/grpc/impl/codegen/sync_windows.h +) + string(REPLACE "include/" "" _path ${_hdr}) + get_filename_component(_path ${_path} PATH) + install(FILES ${_hdr} + DESTINATION "${gRPC_INSTALL_INCLUDEDIR}/${_path}" + ) +endforeach() endif (gRPC_BUILD_TESTS) @@ -3288,6 +3534,145 @@ foreach(_hdr ) endforeach() +endif (gRPC_BUILD_TESTS) +if (gRPC_BUILD_TESTS) + +add_library(grpc++_test_util_unsecure + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/health/v1/health.pb.cc + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/health/v1/health.grpc.pb.cc + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/health/v1/health.pb.h + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/health/v1/health.grpc.pb.h + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/echo_messages.pb.cc + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/echo_messages.grpc.pb.cc + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/echo_messages.pb.h + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/echo_messages.grpc.pb.h + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/echo.pb.cc + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/echo.grpc.pb.cc + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/echo.pb.h + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/echo.grpc.pb.h + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/echo_mock.grpc.pb.h + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/duplicate/echo_duplicate.pb.cc + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/duplicate/echo_duplicate.grpc.pb.cc + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/duplicate/echo_duplicate.pb.h + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/duplicate/echo_duplicate.grpc.pb.h + test/cpp/end2end/test_service_impl.cc + test/cpp/util/byte_buffer_proto_helper.cc + test/cpp/util/string_ref_helper.cc + test/cpp/util/subprocess.cc + src/cpp/codegen/codegen_init.cc +) + +if(WIN32 AND MSVC) + set_target_properties(grpc++_test_util_unsecure PROPERTIES COMPILE_PDB_NAME "grpc++_test_util_unsecure" + COMPILE_PDB_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}" + ) + if (gRPC_INSTALL) + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/grpc++_test_util_unsecure.pdb + DESTINATION ${gRPC_INSTALL_LIBDIR} OPTIONAL + ) + endif() +endif() + +protobuf_generate_grpc_cpp( + src/proto/grpc/health/v1/health.proto +) +protobuf_generate_grpc_cpp( + src/proto/grpc/testing/echo_messages.proto +) +protobuf_generate_grpc_cpp( + src/proto/grpc/testing/echo.proto +) +protobuf_generate_grpc_cpp( + src/proto/grpc/testing/duplicate/echo_duplicate.proto +) + +target_include_directories(grpc++_test_util_unsecure + PUBLIC $ $ + PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} + PRIVATE ${BORINGSSL_ROOT_DIR}/include + PRIVATE ${PROTOBUF_ROOT_DIR}/src + PRIVATE ${ZLIB_INCLUDE_DIR} + PRIVATE ${BENCHMARK}/include + PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/third_party/zlib + PRIVATE ${CARES_BUILD_INCLUDE_DIR} + PRIVATE ${CARES_INCLUDE_DIR} + PRIVATE ${CARES_PLATFORM_INCLUDE_DIR} + PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/third_party/cares/cares + PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/third_party/gflags/include + PRIVATE third_party/googletest/googletest/include + PRIVATE third_party/googletest/googletest + PRIVATE third_party/googletest/googlemock/include + PRIVATE third_party/googletest/googlemock + PRIVATE ${_gRPC_PROTO_GENS_DIR} +) + +target_link_libraries(grpc++_test_util_unsecure + ${_gRPC_PROTOBUF_LIBRARIES} + ${_gRPC_ALLTARGETS_LIBRARIES} + grpc++_unsecure + grpc_test_util_unsecure + grpc_unsecure +) + +foreach(_hdr + include/grpc++/impl/codegen/async_stream.h + include/grpc++/impl/codegen/async_unary_call.h + include/grpc++/impl/codegen/call.h + include/grpc++/impl/codegen/call_hook.h + include/grpc++/impl/codegen/channel_interface.h + include/grpc++/impl/codegen/client_context.h + include/grpc++/impl/codegen/client_unary_call.h + include/grpc++/impl/codegen/completion_queue.h + include/grpc++/impl/codegen/completion_queue_tag.h + include/grpc++/impl/codegen/config.h + include/grpc++/impl/codegen/core_codegen_interface.h + include/grpc++/impl/codegen/create_auth_context.h + include/grpc++/impl/codegen/grpc_library.h + include/grpc++/impl/codegen/metadata_map.h + include/grpc++/impl/codegen/method_handler_impl.h + include/grpc++/impl/codegen/rpc_method.h + include/grpc++/impl/codegen/rpc_service_method.h + include/grpc++/impl/codegen/security/auth_context.h + include/grpc++/impl/codegen/serialization_traits.h + include/grpc++/impl/codegen/server_context.h + include/grpc++/impl/codegen/server_interface.h + include/grpc++/impl/codegen/service_type.h + include/grpc++/impl/codegen/slice.h + include/grpc++/impl/codegen/status.h + include/grpc++/impl/codegen/status_code_enum.h + include/grpc++/impl/codegen/string_ref.h + include/grpc++/impl/codegen/stub_options.h + include/grpc++/impl/codegen/sync_stream.h + include/grpc++/impl/codegen/time.h + include/grpc/impl/codegen/byte_buffer_reader.h + include/grpc/impl/codegen/compression_types.h + include/grpc/impl/codegen/connectivity_state.h + include/grpc/impl/codegen/exec_ctx_fwd.h + include/grpc/impl/codegen/grpc_types.h + include/grpc/impl/codegen/propagation_bits.h + include/grpc/impl/codegen/slice.h + include/grpc/impl/codegen/status.h + include/grpc/impl/codegen/atm.h + include/grpc/impl/codegen/atm_gcc_atomic.h + include/grpc/impl/codegen/atm_gcc_sync.h + include/grpc/impl/codegen/atm_windows.h + include/grpc/impl/codegen/gpr_slice.h + include/grpc/impl/codegen/gpr_types.h + include/grpc/impl/codegen/port_platform.h + include/grpc/impl/codegen/sync.h + include/grpc/impl/codegen/sync_generic.h + include/grpc/impl/codegen/sync_posix.h + include/grpc/impl/codegen/sync_windows.h + include/grpc++/impl/codegen/proto_utils.h + include/grpc++/impl/codegen/config_protobuf.h +) + string(REPLACE "include/" "" _path ${_hdr}) + get_filename_component(_path ${_path} PATH) + install(FILES ${_hdr} + DESTINATION "${gRPC_INSTALL_INCLUDEDIR}/${_path}" + ) +endforeach() + endif (gRPC_BUILD_TESTS) add_library(grpc++_unsecure @@ -3556,9 +3941,9 @@ target_link_libraries(grpc_benchmark ${_gRPC_PROTOBUF_LIBRARIES} ${_gRPC_ALLTARGETS_LIBRARIES} benchmark - grpc++ - grpc_test_util - grpc + grpc++_unsecure + grpc_test_util_unsecure + grpc_unsecure ${_gRPC_GFLAGS_LIBRARIES} ) @@ -8897,10 +9282,10 @@ target_include_directories(alarm_cpp_test target_link_libraries(alarm_cpp_test ${_gRPC_PROTOBUF_LIBRARIES} ${_gRPC_ALLTARGETS_LIBRARIES} - grpc++_test_util - grpc_test_util - grpc++ - grpc + grpc++_test_util_unsecure + grpc_test_util_unsecure + grpc++_unsecure + grpc_unsecure gpr_test_util gpr ${_gRPC_GFLAGS_LIBRARIES} @@ -9026,10 +9411,10 @@ target_link_libraries(bm_arena ${_gRPC_ALLTARGETS_LIBRARIES} grpc_benchmark benchmark - grpc++_test_util - grpc_test_util - grpc++ - grpc + grpc++_test_util_unsecure + grpc_test_util_unsecure + grpc++_unsecure + grpc_unsecure gpr_test_util gpr ${_gRPC_GFLAGS_LIBRARIES} @@ -9072,10 +9457,10 @@ target_link_libraries(bm_call_create ${_gRPC_ALLTARGETS_LIBRARIES} grpc_benchmark benchmark - grpc++_test_util - grpc_test_util - grpc++ - grpc + grpc++_test_util_unsecure + grpc_test_util_unsecure + grpc++_unsecure + grpc_unsecure gpr_test_util gpr ${_gRPC_GFLAGS_LIBRARIES} @@ -9118,10 +9503,10 @@ target_link_libraries(bm_chttp2_hpack ${_gRPC_ALLTARGETS_LIBRARIES} grpc_benchmark benchmark - grpc++_test_util - grpc_test_util - grpc++ - grpc + grpc++_test_util_unsecure + grpc_test_util_unsecure + grpc++_unsecure + grpc_unsecure gpr_test_util gpr ${_gRPC_GFLAGS_LIBRARIES} @@ -9164,10 +9549,10 @@ target_link_libraries(bm_chttp2_transport ${_gRPC_ALLTARGETS_LIBRARIES} grpc_benchmark benchmark - grpc++_test_util - grpc_test_util - grpc++ - grpc + grpc++_test_util_unsecure + grpc_test_util_unsecure + grpc++_unsecure + grpc_unsecure gpr_test_util gpr ${_gRPC_GFLAGS_LIBRARIES} @@ -9210,10 +9595,10 @@ target_link_libraries(bm_closure ${_gRPC_ALLTARGETS_LIBRARIES} grpc_benchmark benchmark - grpc++_test_util - grpc_test_util - grpc++ - grpc + grpc++_test_util_unsecure + grpc_test_util_unsecure + grpc++_unsecure + grpc_unsecure gpr_test_util gpr ${_gRPC_GFLAGS_LIBRARIES} @@ -9256,10 +9641,10 @@ target_link_libraries(bm_cq ${_gRPC_ALLTARGETS_LIBRARIES} grpc_benchmark benchmark - grpc++_test_util - grpc_test_util - grpc++ - grpc + grpc++_test_util_unsecure + grpc_test_util_unsecure + grpc++_unsecure + grpc_unsecure gpr_test_util gpr ${_gRPC_GFLAGS_LIBRARIES} @@ -9302,10 +9687,10 @@ target_link_libraries(bm_cq_multiple_threads ${_gRPC_ALLTARGETS_LIBRARIES} grpc_benchmark benchmark - grpc++_test_util - grpc_test_util - grpc++ - grpc + grpc++_test_util_unsecure + grpc_test_util_unsecure + grpc++_unsecure + grpc_unsecure gpr_test_util gpr ${_gRPC_GFLAGS_LIBRARIES} @@ -9348,10 +9733,10 @@ target_link_libraries(bm_error ${_gRPC_ALLTARGETS_LIBRARIES} grpc_benchmark benchmark - grpc++_test_util - grpc_test_util - grpc++ - grpc + grpc++_test_util_unsecure + grpc_test_util_unsecure + grpc++_unsecure + grpc_unsecure gpr_test_util gpr ${_gRPC_GFLAGS_LIBRARIES} @@ -9394,10 +9779,10 @@ target_link_libraries(bm_fullstack_streaming_ping_pong ${_gRPC_ALLTARGETS_LIBRARIES} grpc_benchmark benchmark - grpc++_test_util - grpc_test_util - grpc++ - grpc + grpc++_test_util_unsecure + grpc_test_util_unsecure + grpc++_unsecure + grpc_unsecure gpr_test_util gpr ${_gRPC_GFLAGS_LIBRARIES} @@ -9440,10 +9825,10 @@ target_link_libraries(bm_fullstack_streaming_pump ${_gRPC_ALLTARGETS_LIBRARIES} grpc_benchmark benchmark - grpc++_test_util - grpc_test_util - grpc++ - grpc + grpc++_test_util_unsecure + grpc_test_util_unsecure + grpc++_unsecure + grpc_unsecure gpr_test_util gpr ${_gRPC_GFLAGS_LIBRARIES} @@ -9486,10 +9871,10 @@ target_link_libraries(bm_fullstack_trickle ${_gRPC_ALLTARGETS_LIBRARIES} grpc_benchmark benchmark - grpc++_test_util - grpc_test_util - grpc++ - grpc + grpc++_test_util_unsecure + grpc_test_util_unsecure + grpc++_unsecure + grpc_unsecure gpr_test_util gpr ${_gRPC_GFLAGS_LIBRARIES} @@ -9532,10 +9917,10 @@ target_link_libraries(bm_fullstack_unary_ping_pong ${_gRPC_ALLTARGETS_LIBRARIES} grpc_benchmark benchmark - grpc++_test_util - grpc_test_util - grpc++ - grpc + grpc++_test_util_unsecure + grpc_test_util_unsecure + grpc++_unsecure + grpc_unsecure gpr_test_util gpr ${_gRPC_GFLAGS_LIBRARIES} @@ -9578,10 +9963,10 @@ target_link_libraries(bm_metadata ${_gRPC_ALLTARGETS_LIBRARIES} grpc_benchmark benchmark - grpc++_test_util - grpc_test_util - grpc++ - grpc + grpc++_test_util_unsecure + grpc_test_util_unsecure + grpc++_unsecure + grpc_unsecure gpr_test_util gpr ${_gRPC_GFLAGS_LIBRARIES} @@ -9624,10 +10009,10 @@ target_link_libraries(bm_pollset ${_gRPC_ALLTARGETS_LIBRARIES} grpc_benchmark benchmark - grpc++_test_util - grpc_test_util - grpc++ - grpc + grpc++_test_util_unsecure + grpc_test_util_unsecure + grpc++_unsecure + grpc_unsecure gpr_test_util gpr ${_gRPC_GFLAGS_LIBRARIES} @@ -12004,11 +12389,11 @@ target_include_directories(server_builder_test target_link_libraries(server_builder_test ${_gRPC_PROTOBUF_LIBRARIES} ${_gRPC_ALLTARGETS_LIBRARIES} - grpc++_test_util - grpc_test_util + grpc++_test_util_unsecure + grpc_test_util_unsecure gpr_test_util - grpc++ - grpc + grpc++_unsecure + grpc_unsecure gpr ${_gRPC_GFLAGS_LIBRARIES} ) @@ -12187,11 +12572,11 @@ target_include_directories(server_request_call_test target_link_libraries(server_request_call_test ${_gRPC_PROTOBUF_LIBRARIES} ${_gRPC_ALLTARGETS_LIBRARIES} - grpc++_test_util - grpc_test_util + grpc++_test_util_unsecure + grpc_test_util_unsecure gpr_test_util - grpc++ - grpc + grpc++_unsecure + grpc_unsecure gpr ${_gRPC_GFLAGS_LIBRARIES} ) @@ -12430,8 +12815,8 @@ target_include_directories(thread_manager_test target_link_libraries(thread_manager_test ${_gRPC_PROTOBUF_LIBRARIES} ${_gRPC_ALLTARGETS_LIBRARIES} - grpc++ - grpc + grpc++_unsecure + grpc_unsecure gpr grpc++_test_config ${_gRPC_GFLAGS_LIBRARIES} @@ -12470,10 +12855,10 @@ target_include_directories(thread_stress_test target_link_libraries(thread_stress_test ${_gRPC_PROTOBUF_LIBRARIES} ${_gRPC_ALLTARGETS_LIBRARIES} - grpc++_test_util - grpc_test_util - grpc++ - grpc + grpc++_test_util_unsecure + grpc_test_util_unsecure + grpc++_unsecure + grpc_unsecure gpr_test_util gpr ${_gRPC_GFLAGS_LIBRARIES} diff --git a/Makefile b/Makefile index 42228fc8223..2558e49daf7 100644 --- a/Makefile +++ b/Makefile @@ -1328,9 +1328,9 @@ pc_cxx: $(LIBDIR)/$(CONFIG)/pkgconfig/grpc++.pc pc_cxx_unsecure: $(LIBDIR)/$(CONFIG)/pkgconfig/grpc++_unsecure.pc ifeq ($(EMBED_OPENSSL),true) -privatelibs_cxx: $(LIBDIR)/$(CONFIG)/libgrpc++_proto_reflection_desc_db.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_config.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_cli_libs.a $(LIBDIR)/$(CONFIG)/libhttp2_client_main.a $(LIBDIR)/$(CONFIG)/libinterop_client_helper.a $(LIBDIR)/$(CONFIG)/libinterop_client_main.a $(LIBDIR)/$(CONFIG)/libinterop_server_helper.a $(LIBDIR)/$(CONFIG)/libinterop_server_lib.a $(LIBDIR)/$(CONFIG)/libinterop_server_main.a $(LIBDIR)/$(CONFIG)/libqps.a $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl_aes_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_asn1_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_base64_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_bio_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_bn_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_bytestring_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_aead_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_cipher_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_cmac_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_constant_time_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_ed25519_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_spake25519_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_x25519_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_digest_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_p256-x86_64_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_ecdh_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_ecdsa_sign_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_ecdsa_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_ecdsa_verify_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_evp_extra_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_evp_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_pbkdf_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_hkdf_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_hmac_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_lhash_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_gcm_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_obj_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_pkcs12_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_pkcs8_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_poly1305_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_pool_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_refcount_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_x509_test_lib.a $(LIBDIR)/$(CONFIG)/libbenchmark.a +privatelibs_cxx: $(LIBDIR)/$(CONFIG)/libgrpc++_proto_reflection_desc_db.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_config.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_cli_libs.a $(LIBDIR)/$(CONFIG)/libhttp2_client_main.a $(LIBDIR)/$(CONFIG)/libinterop_client_helper.a $(LIBDIR)/$(CONFIG)/libinterop_client_main.a $(LIBDIR)/$(CONFIG)/libinterop_server_helper.a $(LIBDIR)/$(CONFIG)/libinterop_server_lib.a $(LIBDIR)/$(CONFIG)/libinterop_server_main.a $(LIBDIR)/$(CONFIG)/libqps.a $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl_aes_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_asn1_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_base64_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_bio_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_bn_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_bytestring_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_aead_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_cipher_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_cmac_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_constant_time_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_ed25519_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_spake25519_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_x25519_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_digest_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_p256-x86_64_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_ecdh_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_ecdsa_sign_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_ecdsa_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_ecdsa_verify_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_evp_extra_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_evp_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_pbkdf_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_hkdf_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_hmac_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_lhash_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_gcm_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_obj_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_pkcs12_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_pkcs8_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_poly1305_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_pool_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_refcount_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_x509_test_lib.a $(LIBDIR)/$(CONFIG)/libbenchmark.a else -privatelibs_cxx: $(LIBDIR)/$(CONFIG)/libgrpc++_proto_reflection_desc_db.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_config.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_cli_libs.a $(LIBDIR)/$(CONFIG)/libhttp2_client_main.a $(LIBDIR)/$(CONFIG)/libinterop_client_helper.a $(LIBDIR)/$(CONFIG)/libinterop_client_main.a $(LIBDIR)/$(CONFIG)/libinterop_server_helper.a $(LIBDIR)/$(CONFIG)/libinterop_server_lib.a $(LIBDIR)/$(CONFIG)/libinterop_server_main.a $(LIBDIR)/$(CONFIG)/libqps.a $(LIBDIR)/$(CONFIG)/libbenchmark.a +privatelibs_cxx: $(LIBDIR)/$(CONFIG)/libgrpc++_proto_reflection_desc_db.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_config.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_cli_libs.a $(LIBDIR)/$(CONFIG)/libhttp2_client_main.a $(LIBDIR)/$(CONFIG)/libinterop_client_helper.a $(LIBDIR)/$(CONFIG)/libinterop_client_main.a $(LIBDIR)/$(CONFIG)/libinterop_server_helper.a $(LIBDIR)/$(CONFIG)/libinterop_server_lib.a $(LIBDIR)/$(CONFIG)/libinterop_server_main.a $(LIBDIR)/$(CONFIG)/libqps.a $(LIBDIR)/$(CONFIG)/libbenchmark.a endif @@ -3670,6 +3670,53 @@ LIBGRPC_TEST_UTIL_SRC = \ src/core/lib/transport/transport.c \ src/core/lib/transport/transport_op_string.c \ src/core/lib/debug/trace.c \ + src/core/ext/filters/client_channel/channel_connectivity.c \ + src/core/ext/filters/client_channel/client_channel.c \ + src/core/ext/filters/client_channel/client_channel_factory.c \ + src/core/ext/filters/client_channel/client_channel_plugin.c \ + src/core/ext/filters/client_channel/connector.c \ + src/core/ext/filters/client_channel/http_connect_handshaker.c \ + src/core/ext/filters/client_channel/http_proxy.c \ + src/core/ext/filters/client_channel/lb_policy.c \ + src/core/ext/filters/client_channel/lb_policy_factory.c \ + src/core/ext/filters/client_channel/lb_policy_registry.c \ + src/core/ext/filters/client_channel/parse_address.c \ + src/core/ext/filters/client_channel/proxy_mapper.c \ + src/core/ext/filters/client_channel/proxy_mapper_registry.c \ + src/core/ext/filters/client_channel/resolver.c \ + src/core/ext/filters/client_channel/resolver_factory.c \ + src/core/ext/filters/client_channel/resolver_registry.c \ + src/core/ext/filters/client_channel/retry_throttle.c \ + src/core/ext/filters/client_channel/subchannel.c \ + src/core/ext/filters/client_channel/subchannel_index.c \ + src/core/ext/filters/client_channel/uri_parser.c \ + src/core/ext/filters/deadline/deadline_filter.c \ + src/core/ext/transport/chttp2/transport/bin_decoder.c \ + src/core/ext/transport/chttp2/transport/bin_encoder.c \ + src/core/ext/transport/chttp2/transport/chttp2_plugin.c \ + src/core/ext/transport/chttp2/transport/chttp2_transport.c \ + src/core/ext/transport/chttp2/transport/frame_data.c \ + src/core/ext/transport/chttp2/transport/frame_goaway.c \ + src/core/ext/transport/chttp2/transport/frame_ping.c \ + src/core/ext/transport/chttp2/transport/frame_rst_stream.c \ + src/core/ext/transport/chttp2/transport/frame_settings.c \ + src/core/ext/transport/chttp2/transport/frame_window_update.c \ + src/core/ext/transport/chttp2/transport/hpack_encoder.c \ + src/core/ext/transport/chttp2/transport/hpack_parser.c \ + src/core/ext/transport/chttp2/transport/hpack_table.c \ + src/core/ext/transport/chttp2/transport/http2_settings.c \ + src/core/ext/transport/chttp2/transport/huffsyms.c \ + src/core/ext/transport/chttp2/transport/incoming_metadata.c \ + src/core/ext/transport/chttp2/transport/parsing.c \ + src/core/ext/transport/chttp2/transport/stream_lists.c \ + src/core/ext/transport/chttp2/transport/stream_map.c \ + src/core/ext/transport/chttp2/transport/varint.c \ + src/core/ext/transport/chttp2/transport/writing.c \ + src/core/ext/transport/chttp2/alpn/alpn.c \ + src/core/ext/filters/http/client/http_client_filter.c \ + src/core/ext/filters/http/http_filters_plugin.c \ + src/core/ext/filters/http/message_compress/message_compress_filter.c \ + src/core/ext/filters/http/server/http_server_filter.c \ PUBLIC_HEADERS_C += \ include/grpc/impl/codegen/byte_buffer_reader.h \ @@ -3742,8 +3789,200 @@ LIBGRPC_TEST_UTIL_UNSECURE_SRC = \ test/core/util/port_server_client.c \ test/core/util/slice_splitter.c \ test/core/util/trickle_endpoint.c \ + src/core/lib/channel/channel_args.c \ + src/core/lib/channel/channel_stack.c \ + src/core/lib/channel/channel_stack_builder.c \ + src/core/lib/channel/connected_channel.c \ + src/core/lib/channel/handshaker.c \ + src/core/lib/channel/handshaker_factory.c \ + src/core/lib/channel/handshaker_registry.c \ + src/core/lib/compression/compression.c \ + src/core/lib/compression/message_compress.c \ + src/core/lib/compression/stream_compression.c \ + src/core/lib/http/format_request.c \ + src/core/lib/http/httpcli.c \ + src/core/lib/http/parser.c \ + src/core/lib/iomgr/closure.c \ + src/core/lib/iomgr/combiner.c \ + src/core/lib/iomgr/endpoint.c \ + src/core/lib/iomgr/endpoint_pair_posix.c \ + src/core/lib/iomgr/endpoint_pair_uv.c \ + src/core/lib/iomgr/endpoint_pair_windows.c \ + src/core/lib/iomgr/error.c \ + src/core/lib/iomgr/ev_epoll1_linux.c \ + src/core/lib/iomgr/ev_epoll_limited_pollers_linux.c \ + src/core/lib/iomgr/ev_epoll_thread_pool_linux.c \ + src/core/lib/iomgr/ev_epollex_linux.c \ + src/core/lib/iomgr/ev_epollsig_linux.c \ + src/core/lib/iomgr/ev_poll_posix.c \ + src/core/lib/iomgr/ev_posix.c \ + src/core/lib/iomgr/ev_windows.c \ + src/core/lib/iomgr/exec_ctx.c \ + src/core/lib/iomgr/executor.c \ + src/core/lib/iomgr/iocp_windows.c \ + src/core/lib/iomgr/iomgr.c \ + src/core/lib/iomgr/iomgr_posix.c \ + src/core/lib/iomgr/iomgr_uv.c \ + src/core/lib/iomgr/iomgr_windows.c \ + src/core/lib/iomgr/is_epollexclusive_available.c \ + src/core/lib/iomgr/load_file.c \ + src/core/lib/iomgr/lockfree_event.c \ + src/core/lib/iomgr/network_status_tracker.c \ + src/core/lib/iomgr/polling_entity.c \ + src/core/lib/iomgr/pollset_set_uv.c \ + src/core/lib/iomgr/pollset_set_windows.c \ + src/core/lib/iomgr/pollset_uv.c \ + src/core/lib/iomgr/pollset_windows.c \ + src/core/lib/iomgr/resolve_address_posix.c \ + src/core/lib/iomgr/resolve_address_uv.c \ + src/core/lib/iomgr/resolve_address_windows.c \ + src/core/lib/iomgr/resource_quota.c \ + src/core/lib/iomgr/sockaddr_utils.c \ + src/core/lib/iomgr/socket_factory_posix.c \ + src/core/lib/iomgr/socket_mutator.c \ + src/core/lib/iomgr/socket_utils_common_posix.c \ + src/core/lib/iomgr/socket_utils_linux.c \ + src/core/lib/iomgr/socket_utils_posix.c \ + src/core/lib/iomgr/socket_utils_uv.c \ + src/core/lib/iomgr/socket_utils_windows.c \ + src/core/lib/iomgr/socket_windows.c \ + src/core/lib/iomgr/tcp_client_posix.c \ + src/core/lib/iomgr/tcp_client_uv.c \ + src/core/lib/iomgr/tcp_client_windows.c \ + src/core/lib/iomgr/tcp_posix.c \ + src/core/lib/iomgr/tcp_server_posix.c \ + src/core/lib/iomgr/tcp_server_utils_posix_common.c \ + src/core/lib/iomgr/tcp_server_utils_posix_ifaddrs.c \ + src/core/lib/iomgr/tcp_server_utils_posix_noifaddrs.c \ + src/core/lib/iomgr/tcp_server_uv.c \ + src/core/lib/iomgr/tcp_server_windows.c \ + src/core/lib/iomgr/tcp_uv.c \ + src/core/lib/iomgr/tcp_windows.c \ + src/core/lib/iomgr/time_averaged_stats.c \ + src/core/lib/iomgr/timer_generic.c \ + src/core/lib/iomgr/timer_heap.c \ + src/core/lib/iomgr/timer_manager.c \ + src/core/lib/iomgr/timer_uv.c \ + src/core/lib/iomgr/udp_server.c \ + src/core/lib/iomgr/unix_sockets_posix.c \ + src/core/lib/iomgr/unix_sockets_posix_noop.c \ + src/core/lib/iomgr/wakeup_fd_cv.c \ + src/core/lib/iomgr/wakeup_fd_eventfd.c \ + src/core/lib/iomgr/wakeup_fd_nospecial.c \ + src/core/lib/iomgr/wakeup_fd_pipe.c \ + src/core/lib/iomgr/wakeup_fd_posix.c \ + src/core/lib/json/json.c \ + src/core/lib/json/json_reader.c \ + src/core/lib/json/json_string.c \ + src/core/lib/json/json_writer.c \ + src/core/lib/slice/b64.c \ + src/core/lib/slice/percent_encoding.c \ + src/core/lib/slice/slice.c \ + src/core/lib/slice/slice_buffer.c \ + src/core/lib/slice/slice_hash_table.c \ + src/core/lib/slice/slice_intern.c \ + src/core/lib/slice/slice_string_helpers.c \ + src/core/lib/surface/alarm.c \ + src/core/lib/surface/api_trace.c \ + src/core/lib/surface/byte_buffer.c \ + src/core/lib/surface/byte_buffer_reader.c \ + src/core/lib/surface/call.c \ + src/core/lib/surface/call_details.c \ + src/core/lib/surface/call_log_batch.c \ + src/core/lib/surface/channel.c \ + src/core/lib/surface/channel_init.c \ + src/core/lib/surface/channel_ping.c \ + src/core/lib/surface/channel_stack_type.c \ + src/core/lib/surface/completion_queue.c \ + src/core/lib/surface/completion_queue_factory.c \ + src/core/lib/surface/event_string.c \ + src/core/lib/surface/lame_client.cc \ + src/core/lib/surface/metadata_array.c \ + src/core/lib/surface/server.c \ + src/core/lib/surface/validate_metadata.c \ + src/core/lib/surface/version.c \ + src/core/lib/transport/bdp_estimator.c \ + src/core/lib/transport/byte_stream.c \ + src/core/lib/transport/connectivity_state.c \ + src/core/lib/transport/error_utils.c \ + src/core/lib/transport/metadata.c \ + src/core/lib/transport/metadata_batch.c \ + src/core/lib/transport/pid_controller.c \ + src/core/lib/transport/service_config.c \ + src/core/lib/transport/static_metadata.c \ + src/core/lib/transport/status_conversion.c \ + src/core/lib/transport/timeout_encoding.c \ + src/core/lib/transport/transport.c \ + src/core/lib/transport/transport_op_string.c \ + src/core/lib/debug/trace.c \ + src/core/ext/filters/client_channel/channel_connectivity.c \ + src/core/ext/filters/client_channel/client_channel.c \ + src/core/ext/filters/client_channel/client_channel_factory.c \ + src/core/ext/filters/client_channel/client_channel_plugin.c \ + src/core/ext/filters/client_channel/connector.c \ + src/core/ext/filters/client_channel/http_connect_handshaker.c \ + src/core/ext/filters/client_channel/http_proxy.c \ + src/core/ext/filters/client_channel/lb_policy.c \ + src/core/ext/filters/client_channel/lb_policy_factory.c \ + src/core/ext/filters/client_channel/lb_policy_registry.c \ + src/core/ext/filters/client_channel/parse_address.c \ + src/core/ext/filters/client_channel/proxy_mapper.c \ + src/core/ext/filters/client_channel/proxy_mapper_registry.c \ + src/core/ext/filters/client_channel/resolver.c \ + src/core/ext/filters/client_channel/resolver_factory.c \ + src/core/ext/filters/client_channel/resolver_registry.c \ + src/core/ext/filters/client_channel/retry_throttle.c \ + src/core/ext/filters/client_channel/subchannel.c \ + src/core/ext/filters/client_channel/subchannel_index.c \ + src/core/ext/filters/client_channel/uri_parser.c \ + src/core/ext/filters/deadline/deadline_filter.c \ + src/core/ext/transport/chttp2/transport/bin_decoder.c \ + src/core/ext/transport/chttp2/transport/bin_encoder.c \ + src/core/ext/transport/chttp2/transport/chttp2_plugin.c \ + src/core/ext/transport/chttp2/transport/chttp2_transport.c \ + src/core/ext/transport/chttp2/transport/frame_data.c \ + src/core/ext/transport/chttp2/transport/frame_goaway.c \ + src/core/ext/transport/chttp2/transport/frame_ping.c \ + src/core/ext/transport/chttp2/transport/frame_rst_stream.c \ + src/core/ext/transport/chttp2/transport/frame_settings.c \ + src/core/ext/transport/chttp2/transport/frame_window_update.c \ + src/core/ext/transport/chttp2/transport/hpack_encoder.c \ + src/core/ext/transport/chttp2/transport/hpack_parser.c \ + src/core/ext/transport/chttp2/transport/hpack_table.c \ + src/core/ext/transport/chttp2/transport/http2_settings.c \ + src/core/ext/transport/chttp2/transport/huffsyms.c \ + src/core/ext/transport/chttp2/transport/incoming_metadata.c \ + src/core/ext/transport/chttp2/transport/parsing.c \ + src/core/ext/transport/chttp2/transport/stream_lists.c \ + src/core/ext/transport/chttp2/transport/stream_map.c \ + src/core/ext/transport/chttp2/transport/varint.c \ + src/core/ext/transport/chttp2/transport/writing.c \ + src/core/ext/transport/chttp2/alpn/alpn.c \ + src/core/ext/filters/http/client/http_client_filter.c \ + src/core/ext/filters/http/http_filters_plugin.c \ + src/core/ext/filters/http/message_compress/message_compress_filter.c \ + src/core/ext/filters/http/server/http_server_filter.c \ PUBLIC_HEADERS_C += \ + include/grpc/impl/codegen/byte_buffer_reader.h \ + include/grpc/impl/codegen/compression_types.h \ + include/grpc/impl/codegen/connectivity_state.h \ + include/grpc/impl/codegen/exec_ctx_fwd.h \ + include/grpc/impl/codegen/grpc_types.h \ + include/grpc/impl/codegen/propagation_bits.h \ + include/grpc/impl/codegen/slice.h \ + include/grpc/impl/codegen/status.h \ + include/grpc/impl/codegen/atm.h \ + include/grpc/impl/codegen/atm_gcc_atomic.h \ + include/grpc/impl/codegen/atm_gcc_sync.h \ + include/grpc/impl/codegen/atm_windows.h \ + include/grpc/impl/codegen/gpr_slice.h \ + include/grpc/impl/codegen/gpr_types.h \ + include/grpc/impl/codegen/port_platform.h \ + include/grpc/impl/codegen/sync.h \ + include/grpc/impl/codegen/sync_generic.h \ + include/grpc/impl/codegen/sync_posix.h \ + include/grpc/impl/codegen/sync_windows.h \ LIBGRPC_TEST_UTIL_UNSECURE_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBGRPC_TEST_UTIL_UNSECURE_SRC)))) @@ -5173,6 +5412,118 @@ $(OBJDIR)/$(CONFIG)/test/cpp/util/test_credentials_provider.o: $(GENDIR)/src/pro $(OBJDIR)/$(CONFIG)/src/cpp/codegen/codegen_init.o: $(GENDIR)/src/proto/grpc/health/v1/health.pb.cc $(GENDIR)/src/proto/grpc/health/v1/health.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/echo_messages.pb.cc $(GENDIR)/src/proto/grpc/testing/echo_messages.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/echo.pb.cc $(GENDIR)/src/proto/grpc/testing/echo.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/duplicate/echo_duplicate.pb.cc $(GENDIR)/src/proto/grpc/testing/duplicate/echo_duplicate.grpc.pb.cc +LIBGRPC++_TEST_UTIL_UNSECURE_SRC = \ + $(GENDIR)/src/proto/grpc/health/v1/health.pb.cc $(GENDIR)/src/proto/grpc/health/v1/health.grpc.pb.cc \ + $(GENDIR)/src/proto/grpc/testing/echo_messages.pb.cc $(GENDIR)/src/proto/grpc/testing/echo_messages.grpc.pb.cc \ + $(GENDIR)/src/proto/grpc/testing/echo.pb.cc $(GENDIR)/src/proto/grpc/testing/echo.grpc.pb.cc \ + $(GENDIR)/src/proto/grpc/testing/duplicate/echo_duplicate.pb.cc $(GENDIR)/src/proto/grpc/testing/duplicate/echo_duplicate.grpc.pb.cc \ + test/cpp/end2end/test_service_impl.cc \ + test/cpp/util/byte_buffer_proto_helper.cc \ + test/cpp/util/string_ref_helper.cc \ + test/cpp/util/subprocess.cc \ + src/cpp/codegen/codegen_init.cc \ + +PUBLIC_HEADERS_CXX += \ + include/grpc++/impl/codegen/async_stream.h \ + include/grpc++/impl/codegen/async_unary_call.h \ + include/grpc++/impl/codegen/call.h \ + include/grpc++/impl/codegen/call_hook.h \ + include/grpc++/impl/codegen/channel_interface.h \ + include/grpc++/impl/codegen/client_context.h \ + include/grpc++/impl/codegen/client_unary_call.h \ + include/grpc++/impl/codegen/completion_queue.h \ + include/grpc++/impl/codegen/completion_queue_tag.h \ + include/grpc++/impl/codegen/config.h \ + include/grpc++/impl/codegen/core_codegen_interface.h \ + include/grpc++/impl/codegen/create_auth_context.h \ + include/grpc++/impl/codegen/grpc_library.h \ + include/grpc++/impl/codegen/metadata_map.h \ + include/grpc++/impl/codegen/method_handler_impl.h \ + include/grpc++/impl/codegen/rpc_method.h \ + include/grpc++/impl/codegen/rpc_service_method.h \ + include/grpc++/impl/codegen/security/auth_context.h \ + include/grpc++/impl/codegen/serialization_traits.h \ + include/grpc++/impl/codegen/server_context.h \ + include/grpc++/impl/codegen/server_interface.h \ + include/grpc++/impl/codegen/service_type.h \ + include/grpc++/impl/codegen/slice.h \ + include/grpc++/impl/codegen/status.h \ + include/grpc++/impl/codegen/status_code_enum.h \ + include/grpc++/impl/codegen/string_ref.h \ + include/grpc++/impl/codegen/stub_options.h \ + include/grpc++/impl/codegen/sync_stream.h \ + include/grpc++/impl/codegen/time.h \ + include/grpc/impl/codegen/byte_buffer_reader.h \ + include/grpc/impl/codegen/compression_types.h \ + include/grpc/impl/codegen/connectivity_state.h \ + include/grpc/impl/codegen/exec_ctx_fwd.h \ + include/grpc/impl/codegen/grpc_types.h \ + include/grpc/impl/codegen/propagation_bits.h \ + include/grpc/impl/codegen/slice.h \ + include/grpc/impl/codegen/status.h \ + include/grpc/impl/codegen/atm.h \ + include/grpc/impl/codegen/atm_gcc_atomic.h \ + include/grpc/impl/codegen/atm_gcc_sync.h \ + include/grpc/impl/codegen/atm_windows.h \ + include/grpc/impl/codegen/gpr_slice.h \ + include/grpc/impl/codegen/gpr_types.h \ + include/grpc/impl/codegen/port_platform.h \ + include/grpc/impl/codegen/sync.h \ + include/grpc/impl/codegen/sync_generic.h \ + include/grpc/impl/codegen/sync_posix.h \ + include/grpc/impl/codegen/sync_windows.h \ + include/grpc++/impl/codegen/proto_utils.h \ + include/grpc++/impl/codegen/config_protobuf.h \ + +LIBGRPC++_TEST_UTIL_UNSECURE_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBGRPC++_TEST_UTIL_UNSECURE_SRC)))) + + +ifeq ($(NO_SECURE),true) + +# You can't build secure libraries if you don't have OpenSSL. + +$(LIBDIR)/$(CONFIG)/libgrpc++_test_util_unsecure.a: openssl_dep_error + + +else + +ifeq ($(NO_PROTOBUF),true) + +# You can't build a C++ library if you don't have protobuf - a bit overreached, but still okay. + +$(LIBDIR)/$(CONFIG)/libgrpc++_test_util_unsecure.a: protobuf_dep_error + + +else + +$(LIBDIR)/$(CONFIG)/libgrpc++_test_util_unsecure.a: $(ZLIB_DEP) $(OPENSSL_DEP) $(CARES_DEP) $(PROTOBUF_DEP) $(LIBGRPC++_TEST_UTIL_UNSECURE_OBJS) + $(E) "[AR] Creating $@" + $(Q) mkdir -p `dirname $@` + $(Q) rm -f $(LIBDIR)/$(CONFIG)/libgrpc++_test_util_unsecure.a + $(Q) $(AR) $(AROPTS) $(LIBDIR)/$(CONFIG)/libgrpc++_test_util_unsecure.a $(LIBGRPC++_TEST_UTIL_UNSECURE_OBJS) +ifeq ($(SYSTEM),Darwin) + $(Q) ranlib -no_warning_for_no_symbols $(LIBDIR)/$(CONFIG)/libgrpc++_test_util_unsecure.a +endif + + + + +endif + +endif + +ifneq ($(NO_SECURE),true) +ifneq ($(NO_DEPS),true) +-include $(LIBGRPC++_TEST_UTIL_UNSECURE_OBJS:.o=.dep) +endif +endif +$(OBJDIR)/$(CONFIG)/test/cpp/end2end/test_service_impl.o: $(GENDIR)/src/proto/grpc/health/v1/health.pb.cc $(GENDIR)/src/proto/grpc/health/v1/health.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/echo_messages.pb.cc $(GENDIR)/src/proto/grpc/testing/echo_messages.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/echo.pb.cc $(GENDIR)/src/proto/grpc/testing/echo.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/duplicate/echo_duplicate.pb.cc $(GENDIR)/src/proto/grpc/testing/duplicate/echo_duplicate.grpc.pb.cc +$(OBJDIR)/$(CONFIG)/test/cpp/util/byte_buffer_proto_helper.o: $(GENDIR)/src/proto/grpc/health/v1/health.pb.cc $(GENDIR)/src/proto/grpc/health/v1/health.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/echo_messages.pb.cc $(GENDIR)/src/proto/grpc/testing/echo_messages.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/echo.pb.cc $(GENDIR)/src/proto/grpc/testing/echo.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/duplicate/echo_duplicate.pb.cc $(GENDIR)/src/proto/grpc/testing/duplicate/echo_duplicate.grpc.pb.cc +$(OBJDIR)/$(CONFIG)/test/cpp/util/string_ref_helper.o: $(GENDIR)/src/proto/grpc/health/v1/health.pb.cc $(GENDIR)/src/proto/grpc/health/v1/health.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/echo_messages.pb.cc $(GENDIR)/src/proto/grpc/testing/echo_messages.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/echo.pb.cc $(GENDIR)/src/proto/grpc/testing/echo.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/duplicate/echo_duplicate.pb.cc $(GENDIR)/src/proto/grpc/testing/duplicate/echo_duplicate.grpc.pb.cc +$(OBJDIR)/$(CONFIG)/test/cpp/util/subprocess.o: $(GENDIR)/src/proto/grpc/health/v1/health.pb.cc $(GENDIR)/src/proto/grpc/health/v1/health.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/echo_messages.pb.cc $(GENDIR)/src/proto/grpc/testing/echo_messages.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/echo.pb.cc $(GENDIR)/src/proto/grpc/testing/echo.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/duplicate/echo_duplicate.pb.cc $(GENDIR)/src/proto/grpc/testing/duplicate/echo_duplicate.grpc.pb.cc +$(OBJDIR)/$(CONFIG)/src/cpp/codegen/codegen_init.o: $(GENDIR)/src/proto/grpc/health/v1/health.pb.cc $(GENDIR)/src/proto/grpc/health/v1/health.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/echo_messages.pb.cc $(GENDIR)/src/proto/grpc/testing/echo_messages.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/echo.pb.cc $(GENDIR)/src/proto/grpc/testing/echo.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/duplicate/echo_duplicate.pb.cc $(GENDIR)/src/proto/grpc/testing/duplicate/echo_duplicate.grpc.pb.cc + + LIBGRPC++_UNSECURE_SRC = \ src/cpp/client/insecure_credentials.cc \ src/cpp/common/insecure_create_auth_context.cc \ @@ -13023,16 +13374,16 @@ $(BINDIR)/$(CONFIG)/alarm_cpp_test: protobuf_dep_error else -$(BINDIR)/$(CONFIG)/alarm_cpp_test: $(PROTOBUF_DEP) $(ALARM_CPP_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a +$(BINDIR)/$(CONFIG)/alarm_cpp_test: $(PROTOBUF_DEP) $(ALARM_CPP_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc++_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LDXX) $(LDFLAGS) $(ALARM_CPP_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) $(LDLIBS_SECURE) $(GTEST_LIB) -o $(BINDIR)/$(CONFIG)/alarm_cpp_test + $(Q) $(LDXX) $(LDFLAGS) $(ALARM_CPP_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc++_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) $(LDLIBS_SECURE) $(GTEST_LIB) -o $(BINDIR)/$(CONFIG)/alarm_cpp_test endif endif -$(OBJDIR)/$(CONFIG)/test/cpp/common/alarm_cpp_test.o: $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a +$(OBJDIR)/$(CONFIG)/test/cpp/common/alarm_cpp_test.o: $(LIBDIR)/$(CONFIG)/libgrpc++_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a deps_alarm_cpp_test: $(ALARM_CPP_TEST_OBJS:.o=.dep) @@ -13152,17 +13503,17 @@ $(BINDIR)/$(CONFIG)/bm_arena: protobuf_dep_error else -$(BINDIR)/$(CONFIG)/bm_arena: $(PROTOBUF_DEP) $(BM_ARENA_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_benchmark.a $(LIBDIR)/$(CONFIG)/libbenchmark.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a +$(BINDIR)/$(CONFIG)/bm_arena: $(PROTOBUF_DEP) $(BM_ARENA_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_benchmark.a $(LIBDIR)/$(CONFIG)/libbenchmark.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LDXX) $(LDFLAGS) $(BM_ARENA_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_benchmark.a $(LIBDIR)/$(CONFIG)/libbenchmark.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) $(LDLIBS_SECURE) $(GTEST_LIB) -o $(BINDIR)/$(CONFIG)/bm_arena + $(Q) $(LDXX) $(LDFLAGS) $(BM_ARENA_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_benchmark.a $(LIBDIR)/$(CONFIG)/libbenchmark.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) $(LDLIBS_SECURE) $(GTEST_LIB) -o $(BINDIR)/$(CONFIG)/bm_arena endif endif $(BM_ARENA_OBJS): CPPFLAGS += -Ithird_party/benchmark/include -DHAVE_POSIX_REGEX -$(OBJDIR)/$(CONFIG)/test/cpp/microbenchmarks/bm_arena.o: $(LIBDIR)/$(CONFIG)/libgrpc_benchmark.a $(LIBDIR)/$(CONFIG)/libbenchmark.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a +$(OBJDIR)/$(CONFIG)/test/cpp/microbenchmarks/bm_arena.o: $(LIBDIR)/$(CONFIG)/libgrpc_benchmark.a $(LIBDIR)/$(CONFIG)/libbenchmark.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a deps_bm_arena: $(BM_ARENA_OBJS:.o=.dep) @@ -13196,17 +13547,17 @@ $(BINDIR)/$(CONFIG)/bm_call_create: protobuf_dep_error else -$(BINDIR)/$(CONFIG)/bm_call_create: $(PROTOBUF_DEP) $(BM_CALL_CREATE_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_benchmark.a $(LIBDIR)/$(CONFIG)/libbenchmark.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a +$(BINDIR)/$(CONFIG)/bm_call_create: $(PROTOBUF_DEP) $(BM_CALL_CREATE_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_benchmark.a $(LIBDIR)/$(CONFIG)/libbenchmark.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LDXX) $(LDFLAGS) $(BM_CALL_CREATE_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_benchmark.a $(LIBDIR)/$(CONFIG)/libbenchmark.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) $(LDLIBS_SECURE) $(GTEST_LIB) -o $(BINDIR)/$(CONFIG)/bm_call_create + $(Q) $(LDXX) $(LDFLAGS) $(BM_CALL_CREATE_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_benchmark.a $(LIBDIR)/$(CONFIG)/libbenchmark.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) $(LDLIBS_SECURE) $(GTEST_LIB) -o $(BINDIR)/$(CONFIG)/bm_call_create endif endif $(BM_CALL_CREATE_OBJS): CPPFLAGS += -Ithird_party/benchmark/include -DHAVE_POSIX_REGEX -$(OBJDIR)/$(CONFIG)/test/cpp/microbenchmarks/bm_call_create.o: $(LIBDIR)/$(CONFIG)/libgrpc_benchmark.a $(LIBDIR)/$(CONFIG)/libbenchmark.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a +$(OBJDIR)/$(CONFIG)/test/cpp/microbenchmarks/bm_call_create.o: $(LIBDIR)/$(CONFIG)/libgrpc_benchmark.a $(LIBDIR)/$(CONFIG)/libbenchmark.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a deps_bm_call_create: $(BM_CALL_CREATE_OBJS:.o=.dep) @@ -13240,17 +13591,17 @@ $(BINDIR)/$(CONFIG)/bm_chttp2_hpack: protobuf_dep_error else -$(BINDIR)/$(CONFIG)/bm_chttp2_hpack: $(PROTOBUF_DEP) $(BM_CHTTP2_HPACK_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_benchmark.a $(LIBDIR)/$(CONFIG)/libbenchmark.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a +$(BINDIR)/$(CONFIG)/bm_chttp2_hpack: $(PROTOBUF_DEP) $(BM_CHTTP2_HPACK_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_benchmark.a $(LIBDIR)/$(CONFIG)/libbenchmark.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LDXX) $(LDFLAGS) $(BM_CHTTP2_HPACK_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_benchmark.a $(LIBDIR)/$(CONFIG)/libbenchmark.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) $(LDLIBS_SECURE) $(GTEST_LIB) -o $(BINDIR)/$(CONFIG)/bm_chttp2_hpack + $(Q) $(LDXX) $(LDFLAGS) $(BM_CHTTP2_HPACK_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_benchmark.a $(LIBDIR)/$(CONFIG)/libbenchmark.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) $(LDLIBS_SECURE) $(GTEST_LIB) -o $(BINDIR)/$(CONFIG)/bm_chttp2_hpack endif endif $(BM_CHTTP2_HPACK_OBJS): CPPFLAGS += -Ithird_party/benchmark/include -DHAVE_POSIX_REGEX -$(OBJDIR)/$(CONFIG)/test/cpp/microbenchmarks/bm_chttp2_hpack.o: $(LIBDIR)/$(CONFIG)/libgrpc_benchmark.a $(LIBDIR)/$(CONFIG)/libbenchmark.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a +$(OBJDIR)/$(CONFIG)/test/cpp/microbenchmarks/bm_chttp2_hpack.o: $(LIBDIR)/$(CONFIG)/libgrpc_benchmark.a $(LIBDIR)/$(CONFIG)/libbenchmark.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a deps_bm_chttp2_hpack: $(BM_CHTTP2_HPACK_OBJS:.o=.dep) @@ -13284,17 +13635,17 @@ $(BINDIR)/$(CONFIG)/bm_chttp2_transport: protobuf_dep_error else -$(BINDIR)/$(CONFIG)/bm_chttp2_transport: $(PROTOBUF_DEP) $(BM_CHTTP2_TRANSPORT_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_benchmark.a $(LIBDIR)/$(CONFIG)/libbenchmark.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a +$(BINDIR)/$(CONFIG)/bm_chttp2_transport: $(PROTOBUF_DEP) $(BM_CHTTP2_TRANSPORT_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_benchmark.a $(LIBDIR)/$(CONFIG)/libbenchmark.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LDXX) $(LDFLAGS) $(BM_CHTTP2_TRANSPORT_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_benchmark.a $(LIBDIR)/$(CONFIG)/libbenchmark.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) $(LDLIBS_SECURE) $(GTEST_LIB) -o $(BINDIR)/$(CONFIG)/bm_chttp2_transport + $(Q) $(LDXX) $(LDFLAGS) $(BM_CHTTP2_TRANSPORT_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_benchmark.a $(LIBDIR)/$(CONFIG)/libbenchmark.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) $(LDLIBS_SECURE) $(GTEST_LIB) -o $(BINDIR)/$(CONFIG)/bm_chttp2_transport endif endif $(BM_CHTTP2_TRANSPORT_OBJS): CPPFLAGS += -Ithird_party/benchmark/include -DHAVE_POSIX_REGEX -$(OBJDIR)/$(CONFIG)/test/cpp/microbenchmarks/bm_chttp2_transport.o: $(LIBDIR)/$(CONFIG)/libgrpc_benchmark.a $(LIBDIR)/$(CONFIG)/libbenchmark.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a +$(OBJDIR)/$(CONFIG)/test/cpp/microbenchmarks/bm_chttp2_transport.o: $(LIBDIR)/$(CONFIG)/libgrpc_benchmark.a $(LIBDIR)/$(CONFIG)/libbenchmark.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a deps_bm_chttp2_transport: $(BM_CHTTP2_TRANSPORT_OBJS:.o=.dep) @@ -13328,17 +13679,17 @@ $(BINDIR)/$(CONFIG)/bm_closure: protobuf_dep_error else -$(BINDIR)/$(CONFIG)/bm_closure: $(PROTOBUF_DEP) $(BM_CLOSURE_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_benchmark.a $(LIBDIR)/$(CONFIG)/libbenchmark.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a +$(BINDIR)/$(CONFIG)/bm_closure: $(PROTOBUF_DEP) $(BM_CLOSURE_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_benchmark.a $(LIBDIR)/$(CONFIG)/libbenchmark.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LDXX) $(LDFLAGS) $(BM_CLOSURE_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_benchmark.a $(LIBDIR)/$(CONFIG)/libbenchmark.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) $(LDLIBS_SECURE) $(GTEST_LIB) -o $(BINDIR)/$(CONFIG)/bm_closure + $(Q) $(LDXX) $(LDFLAGS) $(BM_CLOSURE_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_benchmark.a $(LIBDIR)/$(CONFIG)/libbenchmark.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) $(LDLIBS_SECURE) $(GTEST_LIB) -o $(BINDIR)/$(CONFIG)/bm_closure endif endif $(BM_CLOSURE_OBJS): CPPFLAGS += -Ithird_party/benchmark/include -DHAVE_POSIX_REGEX -$(OBJDIR)/$(CONFIG)/test/cpp/microbenchmarks/bm_closure.o: $(LIBDIR)/$(CONFIG)/libgrpc_benchmark.a $(LIBDIR)/$(CONFIG)/libbenchmark.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a +$(OBJDIR)/$(CONFIG)/test/cpp/microbenchmarks/bm_closure.o: $(LIBDIR)/$(CONFIG)/libgrpc_benchmark.a $(LIBDIR)/$(CONFIG)/libbenchmark.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a deps_bm_closure: $(BM_CLOSURE_OBJS:.o=.dep) @@ -13372,17 +13723,17 @@ $(BINDIR)/$(CONFIG)/bm_cq: protobuf_dep_error else -$(BINDIR)/$(CONFIG)/bm_cq: $(PROTOBUF_DEP) $(BM_CQ_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_benchmark.a $(LIBDIR)/$(CONFIG)/libbenchmark.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a +$(BINDIR)/$(CONFIG)/bm_cq: $(PROTOBUF_DEP) $(BM_CQ_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_benchmark.a $(LIBDIR)/$(CONFIG)/libbenchmark.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LDXX) $(LDFLAGS) $(BM_CQ_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_benchmark.a $(LIBDIR)/$(CONFIG)/libbenchmark.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) $(LDLIBS_SECURE) $(GTEST_LIB) -o $(BINDIR)/$(CONFIG)/bm_cq + $(Q) $(LDXX) $(LDFLAGS) $(BM_CQ_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_benchmark.a $(LIBDIR)/$(CONFIG)/libbenchmark.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) $(LDLIBS_SECURE) $(GTEST_LIB) -o $(BINDIR)/$(CONFIG)/bm_cq endif endif $(BM_CQ_OBJS): CPPFLAGS += -Ithird_party/benchmark/include -DHAVE_POSIX_REGEX -$(OBJDIR)/$(CONFIG)/test/cpp/microbenchmarks/bm_cq.o: $(LIBDIR)/$(CONFIG)/libgrpc_benchmark.a $(LIBDIR)/$(CONFIG)/libbenchmark.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a +$(OBJDIR)/$(CONFIG)/test/cpp/microbenchmarks/bm_cq.o: $(LIBDIR)/$(CONFIG)/libgrpc_benchmark.a $(LIBDIR)/$(CONFIG)/libbenchmark.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a deps_bm_cq: $(BM_CQ_OBJS:.o=.dep) @@ -13416,17 +13767,17 @@ $(BINDIR)/$(CONFIG)/bm_cq_multiple_threads: protobuf_dep_error else -$(BINDIR)/$(CONFIG)/bm_cq_multiple_threads: $(PROTOBUF_DEP) $(BM_CQ_MULTIPLE_THREADS_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_benchmark.a $(LIBDIR)/$(CONFIG)/libbenchmark.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a +$(BINDIR)/$(CONFIG)/bm_cq_multiple_threads: $(PROTOBUF_DEP) $(BM_CQ_MULTIPLE_THREADS_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_benchmark.a $(LIBDIR)/$(CONFIG)/libbenchmark.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LDXX) $(LDFLAGS) $(BM_CQ_MULTIPLE_THREADS_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_benchmark.a $(LIBDIR)/$(CONFIG)/libbenchmark.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) $(LDLIBS_SECURE) $(GTEST_LIB) -o $(BINDIR)/$(CONFIG)/bm_cq_multiple_threads + $(Q) $(LDXX) $(LDFLAGS) $(BM_CQ_MULTIPLE_THREADS_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_benchmark.a $(LIBDIR)/$(CONFIG)/libbenchmark.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) $(LDLIBS_SECURE) $(GTEST_LIB) -o $(BINDIR)/$(CONFIG)/bm_cq_multiple_threads endif endif $(BM_CQ_MULTIPLE_THREADS_OBJS): CPPFLAGS += -Ithird_party/benchmark/include -DHAVE_POSIX_REGEX -$(OBJDIR)/$(CONFIG)/test/cpp/microbenchmarks/bm_cq_multiple_threads.o: $(LIBDIR)/$(CONFIG)/libgrpc_benchmark.a $(LIBDIR)/$(CONFIG)/libbenchmark.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a +$(OBJDIR)/$(CONFIG)/test/cpp/microbenchmarks/bm_cq_multiple_threads.o: $(LIBDIR)/$(CONFIG)/libgrpc_benchmark.a $(LIBDIR)/$(CONFIG)/libbenchmark.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a deps_bm_cq_multiple_threads: $(BM_CQ_MULTIPLE_THREADS_OBJS:.o=.dep) @@ -13460,17 +13811,17 @@ $(BINDIR)/$(CONFIG)/bm_error: protobuf_dep_error else -$(BINDIR)/$(CONFIG)/bm_error: $(PROTOBUF_DEP) $(BM_ERROR_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_benchmark.a $(LIBDIR)/$(CONFIG)/libbenchmark.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a +$(BINDIR)/$(CONFIG)/bm_error: $(PROTOBUF_DEP) $(BM_ERROR_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_benchmark.a $(LIBDIR)/$(CONFIG)/libbenchmark.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LDXX) $(LDFLAGS) $(BM_ERROR_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_benchmark.a $(LIBDIR)/$(CONFIG)/libbenchmark.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) $(LDLIBS_SECURE) $(GTEST_LIB) -o $(BINDIR)/$(CONFIG)/bm_error + $(Q) $(LDXX) $(LDFLAGS) $(BM_ERROR_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_benchmark.a $(LIBDIR)/$(CONFIG)/libbenchmark.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) $(LDLIBS_SECURE) $(GTEST_LIB) -o $(BINDIR)/$(CONFIG)/bm_error endif endif $(BM_ERROR_OBJS): CPPFLAGS += -Ithird_party/benchmark/include -DHAVE_POSIX_REGEX -$(OBJDIR)/$(CONFIG)/test/cpp/microbenchmarks/bm_error.o: $(LIBDIR)/$(CONFIG)/libgrpc_benchmark.a $(LIBDIR)/$(CONFIG)/libbenchmark.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a +$(OBJDIR)/$(CONFIG)/test/cpp/microbenchmarks/bm_error.o: $(LIBDIR)/$(CONFIG)/libgrpc_benchmark.a $(LIBDIR)/$(CONFIG)/libbenchmark.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a deps_bm_error: $(BM_ERROR_OBJS:.o=.dep) @@ -13504,17 +13855,17 @@ $(BINDIR)/$(CONFIG)/bm_fullstack_streaming_ping_pong: protobuf_dep_error else -$(BINDIR)/$(CONFIG)/bm_fullstack_streaming_ping_pong: $(PROTOBUF_DEP) $(BM_FULLSTACK_STREAMING_PING_PONG_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_benchmark.a $(LIBDIR)/$(CONFIG)/libbenchmark.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a +$(BINDIR)/$(CONFIG)/bm_fullstack_streaming_ping_pong: $(PROTOBUF_DEP) $(BM_FULLSTACK_STREAMING_PING_PONG_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_benchmark.a $(LIBDIR)/$(CONFIG)/libbenchmark.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LDXX) $(LDFLAGS) $(BM_FULLSTACK_STREAMING_PING_PONG_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_benchmark.a $(LIBDIR)/$(CONFIG)/libbenchmark.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) $(LDLIBS_SECURE) $(GTEST_LIB) -o $(BINDIR)/$(CONFIG)/bm_fullstack_streaming_ping_pong + $(Q) $(LDXX) $(LDFLAGS) $(BM_FULLSTACK_STREAMING_PING_PONG_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_benchmark.a $(LIBDIR)/$(CONFIG)/libbenchmark.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) $(LDLIBS_SECURE) $(GTEST_LIB) -o $(BINDIR)/$(CONFIG)/bm_fullstack_streaming_ping_pong endif endif $(BM_FULLSTACK_STREAMING_PING_PONG_OBJS): CPPFLAGS += -Ithird_party/benchmark/include -DHAVE_POSIX_REGEX -$(OBJDIR)/$(CONFIG)/test/cpp/microbenchmarks/bm_fullstack_streaming_ping_pong.o: $(LIBDIR)/$(CONFIG)/libgrpc_benchmark.a $(LIBDIR)/$(CONFIG)/libbenchmark.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a +$(OBJDIR)/$(CONFIG)/test/cpp/microbenchmarks/bm_fullstack_streaming_ping_pong.o: $(LIBDIR)/$(CONFIG)/libgrpc_benchmark.a $(LIBDIR)/$(CONFIG)/libbenchmark.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a deps_bm_fullstack_streaming_ping_pong: $(BM_FULLSTACK_STREAMING_PING_PONG_OBJS:.o=.dep) @@ -13548,17 +13899,17 @@ $(BINDIR)/$(CONFIG)/bm_fullstack_streaming_pump: protobuf_dep_error else -$(BINDIR)/$(CONFIG)/bm_fullstack_streaming_pump: $(PROTOBUF_DEP) $(BM_FULLSTACK_STREAMING_PUMP_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_benchmark.a $(LIBDIR)/$(CONFIG)/libbenchmark.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a +$(BINDIR)/$(CONFIG)/bm_fullstack_streaming_pump: $(PROTOBUF_DEP) $(BM_FULLSTACK_STREAMING_PUMP_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_benchmark.a $(LIBDIR)/$(CONFIG)/libbenchmark.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LDXX) $(LDFLAGS) $(BM_FULLSTACK_STREAMING_PUMP_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_benchmark.a $(LIBDIR)/$(CONFIG)/libbenchmark.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) $(LDLIBS_SECURE) $(GTEST_LIB) -o $(BINDIR)/$(CONFIG)/bm_fullstack_streaming_pump + $(Q) $(LDXX) $(LDFLAGS) $(BM_FULLSTACK_STREAMING_PUMP_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_benchmark.a $(LIBDIR)/$(CONFIG)/libbenchmark.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) $(LDLIBS_SECURE) $(GTEST_LIB) -o $(BINDIR)/$(CONFIG)/bm_fullstack_streaming_pump endif endif $(BM_FULLSTACK_STREAMING_PUMP_OBJS): CPPFLAGS += -Ithird_party/benchmark/include -DHAVE_POSIX_REGEX -$(OBJDIR)/$(CONFIG)/test/cpp/microbenchmarks/bm_fullstack_streaming_pump.o: $(LIBDIR)/$(CONFIG)/libgrpc_benchmark.a $(LIBDIR)/$(CONFIG)/libbenchmark.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a +$(OBJDIR)/$(CONFIG)/test/cpp/microbenchmarks/bm_fullstack_streaming_pump.o: $(LIBDIR)/$(CONFIG)/libgrpc_benchmark.a $(LIBDIR)/$(CONFIG)/libbenchmark.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a deps_bm_fullstack_streaming_pump: $(BM_FULLSTACK_STREAMING_PUMP_OBJS:.o=.dep) @@ -13592,17 +13943,17 @@ $(BINDIR)/$(CONFIG)/bm_fullstack_trickle: protobuf_dep_error else -$(BINDIR)/$(CONFIG)/bm_fullstack_trickle: $(PROTOBUF_DEP) $(BM_FULLSTACK_TRICKLE_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_benchmark.a $(LIBDIR)/$(CONFIG)/libbenchmark.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a +$(BINDIR)/$(CONFIG)/bm_fullstack_trickle: $(PROTOBUF_DEP) $(BM_FULLSTACK_TRICKLE_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_benchmark.a $(LIBDIR)/$(CONFIG)/libbenchmark.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LDXX) $(LDFLAGS) $(BM_FULLSTACK_TRICKLE_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_benchmark.a $(LIBDIR)/$(CONFIG)/libbenchmark.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) $(LDLIBS_SECURE) $(GTEST_LIB) -o $(BINDIR)/$(CONFIG)/bm_fullstack_trickle + $(Q) $(LDXX) $(LDFLAGS) $(BM_FULLSTACK_TRICKLE_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_benchmark.a $(LIBDIR)/$(CONFIG)/libbenchmark.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) $(LDLIBS_SECURE) $(GTEST_LIB) -o $(BINDIR)/$(CONFIG)/bm_fullstack_trickle endif endif $(BM_FULLSTACK_TRICKLE_OBJS): CPPFLAGS += -Ithird_party/benchmark/include -DHAVE_POSIX_REGEX -$(OBJDIR)/$(CONFIG)/test/cpp/microbenchmarks/bm_fullstack_trickle.o: $(LIBDIR)/$(CONFIG)/libgrpc_benchmark.a $(LIBDIR)/$(CONFIG)/libbenchmark.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a +$(OBJDIR)/$(CONFIG)/test/cpp/microbenchmarks/bm_fullstack_trickle.o: $(LIBDIR)/$(CONFIG)/libgrpc_benchmark.a $(LIBDIR)/$(CONFIG)/libbenchmark.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a deps_bm_fullstack_trickle: $(BM_FULLSTACK_TRICKLE_OBJS:.o=.dep) @@ -13636,17 +13987,17 @@ $(BINDIR)/$(CONFIG)/bm_fullstack_unary_ping_pong: protobuf_dep_error else -$(BINDIR)/$(CONFIG)/bm_fullstack_unary_ping_pong: $(PROTOBUF_DEP) $(BM_FULLSTACK_UNARY_PING_PONG_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_benchmark.a $(LIBDIR)/$(CONFIG)/libbenchmark.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a +$(BINDIR)/$(CONFIG)/bm_fullstack_unary_ping_pong: $(PROTOBUF_DEP) $(BM_FULLSTACK_UNARY_PING_PONG_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_benchmark.a $(LIBDIR)/$(CONFIG)/libbenchmark.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LDXX) $(LDFLAGS) $(BM_FULLSTACK_UNARY_PING_PONG_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_benchmark.a $(LIBDIR)/$(CONFIG)/libbenchmark.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) $(LDLIBS_SECURE) $(GTEST_LIB) -o $(BINDIR)/$(CONFIG)/bm_fullstack_unary_ping_pong + $(Q) $(LDXX) $(LDFLAGS) $(BM_FULLSTACK_UNARY_PING_PONG_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_benchmark.a $(LIBDIR)/$(CONFIG)/libbenchmark.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) $(LDLIBS_SECURE) $(GTEST_LIB) -o $(BINDIR)/$(CONFIG)/bm_fullstack_unary_ping_pong endif endif $(BM_FULLSTACK_UNARY_PING_PONG_OBJS): CPPFLAGS += -Ithird_party/benchmark/include -DHAVE_POSIX_REGEX -$(OBJDIR)/$(CONFIG)/test/cpp/microbenchmarks/bm_fullstack_unary_ping_pong.o: $(LIBDIR)/$(CONFIG)/libgrpc_benchmark.a $(LIBDIR)/$(CONFIG)/libbenchmark.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a +$(OBJDIR)/$(CONFIG)/test/cpp/microbenchmarks/bm_fullstack_unary_ping_pong.o: $(LIBDIR)/$(CONFIG)/libgrpc_benchmark.a $(LIBDIR)/$(CONFIG)/libbenchmark.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a deps_bm_fullstack_unary_ping_pong: $(BM_FULLSTACK_UNARY_PING_PONG_OBJS:.o=.dep) @@ -13680,17 +14031,17 @@ $(BINDIR)/$(CONFIG)/bm_metadata: protobuf_dep_error else -$(BINDIR)/$(CONFIG)/bm_metadata: $(PROTOBUF_DEP) $(BM_METADATA_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_benchmark.a $(LIBDIR)/$(CONFIG)/libbenchmark.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a +$(BINDIR)/$(CONFIG)/bm_metadata: $(PROTOBUF_DEP) $(BM_METADATA_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_benchmark.a $(LIBDIR)/$(CONFIG)/libbenchmark.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LDXX) $(LDFLAGS) $(BM_METADATA_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_benchmark.a $(LIBDIR)/$(CONFIG)/libbenchmark.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) $(LDLIBS_SECURE) $(GTEST_LIB) -o $(BINDIR)/$(CONFIG)/bm_metadata + $(Q) $(LDXX) $(LDFLAGS) $(BM_METADATA_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_benchmark.a $(LIBDIR)/$(CONFIG)/libbenchmark.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) $(LDLIBS_SECURE) $(GTEST_LIB) -o $(BINDIR)/$(CONFIG)/bm_metadata endif endif $(BM_METADATA_OBJS): CPPFLAGS += -Ithird_party/benchmark/include -DHAVE_POSIX_REGEX -$(OBJDIR)/$(CONFIG)/test/cpp/microbenchmarks/bm_metadata.o: $(LIBDIR)/$(CONFIG)/libgrpc_benchmark.a $(LIBDIR)/$(CONFIG)/libbenchmark.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a +$(OBJDIR)/$(CONFIG)/test/cpp/microbenchmarks/bm_metadata.o: $(LIBDIR)/$(CONFIG)/libgrpc_benchmark.a $(LIBDIR)/$(CONFIG)/libbenchmark.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a deps_bm_metadata: $(BM_METADATA_OBJS:.o=.dep) @@ -13724,17 +14075,17 @@ $(BINDIR)/$(CONFIG)/bm_pollset: protobuf_dep_error else -$(BINDIR)/$(CONFIG)/bm_pollset: $(PROTOBUF_DEP) $(BM_POLLSET_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_benchmark.a $(LIBDIR)/$(CONFIG)/libbenchmark.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a +$(BINDIR)/$(CONFIG)/bm_pollset: $(PROTOBUF_DEP) $(BM_POLLSET_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_benchmark.a $(LIBDIR)/$(CONFIG)/libbenchmark.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LDXX) $(LDFLAGS) $(BM_POLLSET_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_benchmark.a $(LIBDIR)/$(CONFIG)/libbenchmark.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) $(LDLIBS_SECURE) $(GTEST_LIB) -o $(BINDIR)/$(CONFIG)/bm_pollset + $(Q) $(LDXX) $(LDFLAGS) $(BM_POLLSET_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_benchmark.a $(LIBDIR)/$(CONFIG)/libbenchmark.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) $(LDLIBS_SECURE) $(GTEST_LIB) -o $(BINDIR)/$(CONFIG)/bm_pollset endif endif $(BM_POLLSET_OBJS): CPPFLAGS += -Ithird_party/benchmark/include -DHAVE_POSIX_REGEX -$(OBJDIR)/$(CONFIG)/test/cpp/microbenchmarks/bm_pollset.o: $(LIBDIR)/$(CONFIG)/libgrpc_benchmark.a $(LIBDIR)/$(CONFIG)/libbenchmark.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a +$(OBJDIR)/$(CONFIG)/test/cpp/microbenchmarks/bm_pollset.o: $(LIBDIR)/$(CONFIG)/libgrpc_benchmark.a $(LIBDIR)/$(CONFIG)/libbenchmark.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a deps_bm_pollset: $(BM_POLLSET_OBJS:.o=.dep) @@ -15974,20 +16325,20 @@ $(BINDIR)/$(CONFIG)/server_builder_test: protobuf_dep_error else -$(BINDIR)/$(CONFIG)/server_builder_test: $(PROTOBUF_DEP) $(SERVER_BUILDER_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a +$(BINDIR)/$(CONFIG)/server_builder_test: $(PROTOBUF_DEP) $(SERVER_BUILDER_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc++_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LDXX) $(LDFLAGS) $(SERVER_BUILDER_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) $(LDLIBS_SECURE) $(GTEST_LIB) -o $(BINDIR)/$(CONFIG)/server_builder_test + $(Q) $(LDXX) $(LDFLAGS) $(SERVER_BUILDER_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc++_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) $(LDLIBS_SECURE) $(GTEST_LIB) -o $(BINDIR)/$(CONFIG)/server_builder_test endif endif -$(OBJDIR)/$(CONFIG)/src/proto/grpc/testing/echo_messages.o: $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a +$(OBJDIR)/$(CONFIG)/src/proto/grpc/testing/echo_messages.o: $(LIBDIR)/$(CONFIG)/libgrpc++_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr.a -$(OBJDIR)/$(CONFIG)/src/proto/grpc/testing/echo.o: $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a +$(OBJDIR)/$(CONFIG)/src/proto/grpc/testing/echo.o: $(LIBDIR)/$(CONFIG)/libgrpc++_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr.a -$(OBJDIR)/$(CONFIG)/test/cpp/server/server_builder_test.o: $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a +$(OBJDIR)/$(CONFIG)/test/cpp/server/server_builder_test.o: $(LIBDIR)/$(CONFIG)/libgrpc++_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr.a deps_server_builder_test: $(SERVER_BUILDER_TEST_OBJS:.o=.dep) @@ -16153,20 +16504,20 @@ $(BINDIR)/$(CONFIG)/server_request_call_test: protobuf_dep_error else -$(BINDIR)/$(CONFIG)/server_request_call_test: $(PROTOBUF_DEP) $(SERVER_REQUEST_CALL_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a +$(BINDIR)/$(CONFIG)/server_request_call_test: $(PROTOBUF_DEP) $(SERVER_REQUEST_CALL_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc++_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LDXX) $(LDFLAGS) $(SERVER_REQUEST_CALL_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) $(LDLIBS_SECURE) $(GTEST_LIB) -o $(BINDIR)/$(CONFIG)/server_request_call_test + $(Q) $(LDXX) $(LDFLAGS) $(SERVER_REQUEST_CALL_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc++_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) $(LDLIBS_SECURE) $(GTEST_LIB) -o $(BINDIR)/$(CONFIG)/server_request_call_test endif endif -$(OBJDIR)/$(CONFIG)/src/proto/grpc/testing/echo_messages.o: $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a +$(OBJDIR)/$(CONFIG)/src/proto/grpc/testing/echo_messages.o: $(LIBDIR)/$(CONFIG)/libgrpc++_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr.a -$(OBJDIR)/$(CONFIG)/src/proto/grpc/testing/echo.o: $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a +$(OBJDIR)/$(CONFIG)/src/proto/grpc/testing/echo.o: $(LIBDIR)/$(CONFIG)/libgrpc++_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr.a -$(OBJDIR)/$(CONFIG)/test/cpp/server/server_request_call_test.o: $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a +$(OBJDIR)/$(CONFIG)/test/cpp/server/server_request_call_test.o: $(LIBDIR)/$(CONFIG)/libgrpc++_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr.a deps_server_request_call_test: $(SERVER_REQUEST_CALL_TEST_OBJS:.o=.dep) @@ -16398,16 +16749,16 @@ $(BINDIR)/$(CONFIG)/thread_manager_test: protobuf_dep_error else -$(BINDIR)/$(CONFIG)/thread_manager_test: $(PROTOBUF_DEP) $(THREAD_MANAGER_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_config.a +$(BINDIR)/$(CONFIG)/thread_manager_test: $(PROTOBUF_DEP) $(THREAD_MANAGER_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_config.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LDXX) $(LDFLAGS) $(THREAD_MANAGER_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_config.a $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) $(LDLIBS_SECURE) $(GTEST_LIB) -o $(BINDIR)/$(CONFIG)/thread_manager_test + $(Q) $(LDXX) $(LDFLAGS) $(THREAD_MANAGER_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_config.a $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) $(LDLIBS_SECURE) $(GTEST_LIB) -o $(BINDIR)/$(CONFIG)/thread_manager_test endif endif -$(OBJDIR)/$(CONFIG)/test/cpp/thread_manager/thread_manager_test.o: $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_config.a +$(OBJDIR)/$(CONFIG)/test/cpp/thread_manager/thread_manager_test.o: $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_config.a deps_thread_manager_test: $(THREAD_MANAGER_TEST_OBJS:.o=.dep) @@ -16441,16 +16792,16 @@ $(BINDIR)/$(CONFIG)/thread_stress_test: protobuf_dep_error else -$(BINDIR)/$(CONFIG)/thread_stress_test: $(PROTOBUF_DEP) $(THREAD_STRESS_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a +$(BINDIR)/$(CONFIG)/thread_stress_test: $(PROTOBUF_DEP) $(THREAD_STRESS_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc++_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LDXX) $(LDFLAGS) $(THREAD_STRESS_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) $(LDLIBS_SECURE) $(GTEST_LIB) -o $(BINDIR)/$(CONFIG)/thread_stress_test + $(Q) $(LDXX) $(LDFLAGS) $(THREAD_STRESS_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc++_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) $(LDLIBS_SECURE) $(GTEST_LIB) -o $(BINDIR)/$(CONFIG)/thread_stress_test endif endif -$(OBJDIR)/$(CONFIG)/test/cpp/end2end/thread_stress_test.o: $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a +$(OBJDIR)/$(CONFIG)/test/cpp/end2end/thread_stress_test.o: $(LIBDIR)/$(CONFIG)/libgrpc++_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a deps_thread_stress_test: $(THREAD_STRESS_TEST_OBJS:.o=.dep) diff --git a/build.yaml b/build.yaml index 8dc6a58ec12..a0a9046f656 100644 --- a/build.yaml +++ b/build.yaml @@ -739,8 +739,11 @@ filegroups: - test/core/util/slice_splitter.c - test/core/util/trickle_endpoint.c deps: - - grpc - gpr_test_util + uses: + - grpc_base + - grpc_client_channel + - grpc_transport_chttp2 - name: grpc_trace src: - src/core/lib/debug/trace.c @@ -1202,7 +1205,6 @@ libs: - grpc filegroups: - grpc_test_util_base - - grpc_base vs_project_guid: '{17BCAFC0-5FDC-4C94-AEB9-95F3E220614B}' - name: grpc_test_util_unsecure build: private @@ -1399,6 +1401,32 @@ libs: - grpc++_codegen_base_src - grpc++_codegen_proto - grpc++_config_proto +- name: grpc++_test_util_unsecure + build: private + language: c++ + headers: + - test/cpp/end2end/test_service_impl.h + - test/cpp/util/byte_buffer_proto_helper.h + - test/cpp/util/string_ref_helper.h + - test/cpp/util/subprocess.h + src: + - src/proto/grpc/health/v1/health.proto + - src/proto/grpc/testing/echo_messages.proto + - src/proto/grpc/testing/echo.proto + - src/proto/grpc/testing/duplicate/echo_duplicate.proto + - test/cpp/end2end/test_service_impl.cc + - test/cpp/util/byte_buffer_proto_helper.cc + - test/cpp/util/string_ref_helper.cc + - test/cpp/util/subprocess.cc + deps: + - grpc++_unsecure + - grpc_test_util_unsecure + - grpc_unsecure + filegroups: + - grpc++_codegen_base + - grpc++_codegen_base_src + - grpc++_codegen_proto + - grpc++_config_proto - name: grpc++_unsecure build: all language: c++ @@ -1428,9 +1456,9 @@ libs: - test/cpp/microbenchmarks/helpers.cc deps: - benchmark - - grpc++ - - grpc_test_util - - grpc + - grpc++_unsecure + - grpc_test_util_unsecure + - grpc_unsecure defaults: benchmark - name: grpc_cli_libs build: private @@ -3310,10 +3338,10 @@ targets: src: - test/cpp/common/alarm_cpp_test.cc deps: - - grpc++_test_util - - grpc_test_util - - grpc++ - - grpc + - grpc++_test_util_unsecure + - grpc_test_util_unsecure + - grpc++_unsecure + - grpc_unsecure - gpr_test_util - gpr - name: async_end2end_test @@ -3350,10 +3378,10 @@ targets: deps: - grpc_benchmark - benchmark - - grpc++_test_util - - grpc_test_util - - grpc++ - - grpc + - grpc++_test_util_unsecure + - grpc_test_util_unsecure + - grpc++_unsecure + - grpc_unsecure - gpr_test_util - gpr args: @@ -3371,10 +3399,10 @@ targets: deps: - grpc_benchmark - benchmark - - grpc++_test_util - - grpc_test_util - - grpc++ - - grpc + - grpc++_test_util_unsecure + - grpc_test_util_unsecure + - grpc++_unsecure + - grpc_unsecure - gpr_test_util - gpr args: @@ -3392,10 +3420,10 @@ targets: deps: - grpc_benchmark - benchmark - - grpc++_test_util - - grpc_test_util - - grpc++ - - grpc + - grpc++_test_util_unsecure + - grpc_test_util_unsecure + - grpc++_unsecure + - grpc_unsecure - gpr_test_util - gpr args: @@ -3413,10 +3441,10 @@ targets: deps: - grpc_benchmark - benchmark - - grpc++_test_util - - grpc_test_util - - grpc++ - - grpc + - grpc++_test_util_unsecure + - grpc_test_util_unsecure + - grpc++_unsecure + - grpc_unsecure - gpr_test_util - gpr args: @@ -3434,10 +3462,10 @@ targets: deps: - grpc_benchmark - benchmark - - grpc++_test_util - - grpc_test_util - - grpc++ - - grpc + - grpc++_test_util_unsecure + - grpc_test_util_unsecure + - grpc++_unsecure + - grpc_unsecure - gpr_test_util - gpr args: @@ -3455,10 +3483,10 @@ targets: deps: - grpc_benchmark - benchmark - - grpc++_test_util - - grpc_test_util - - grpc++ - - grpc + - grpc++_test_util_unsecure + - grpc_test_util_unsecure + - grpc++_unsecure + - grpc_unsecure - gpr_test_util - gpr args: @@ -3476,10 +3504,10 @@ targets: deps: - grpc_benchmark - benchmark - - grpc++_test_util - - grpc_test_util - - grpc++ - - grpc + - grpc++_test_util_unsecure + - grpc_test_util_unsecure + - grpc++_unsecure + - grpc_unsecure - gpr_test_util - gpr args: @@ -3497,10 +3525,10 @@ targets: deps: - grpc_benchmark - benchmark - - grpc++_test_util - - grpc_test_util - - grpc++ - - grpc + - grpc++_test_util_unsecure + - grpc_test_util_unsecure + - grpc++_unsecure + - grpc_unsecure - gpr_test_util - gpr args: @@ -3518,10 +3546,10 @@ targets: deps: - grpc_benchmark - benchmark - - grpc++_test_util - - grpc_test_util - - grpc++ - - grpc + - grpc++_test_util_unsecure + - grpc_test_util_unsecure + - grpc++_unsecure + - grpc_unsecure - gpr_test_util - gpr args: @@ -3543,10 +3571,10 @@ targets: deps: - grpc_benchmark - benchmark - - grpc++_test_util - - grpc_test_util - - grpc++ - - grpc + - grpc++_test_util_unsecure + - grpc_test_util_unsecure + - grpc++_unsecure + - grpc_unsecure - gpr_test_util - gpr args: @@ -3568,10 +3596,10 @@ targets: deps: - grpc_benchmark - benchmark - - grpc++_test_util - - grpc_test_util - - grpc++ - - grpc + - grpc++_test_util_unsecure + - grpc_test_util_unsecure + - grpc++_unsecure + - grpc_unsecure - gpr_test_util - gpr args: @@ -3593,10 +3621,10 @@ targets: deps: - grpc_benchmark - benchmark - - grpc++_test_util - - grpc_test_util - - grpc++ - - grpc + - grpc++_test_util_unsecure + - grpc_test_util_unsecure + - grpc++_unsecure + - grpc_unsecure - gpr_test_util - gpr args: @@ -3618,10 +3646,10 @@ targets: deps: - grpc_benchmark - benchmark - - grpc++_test_util - - grpc_test_util - - grpc++ - - grpc + - grpc++_test_util_unsecure + - grpc_test_util_unsecure + - grpc++_unsecure + - grpc_unsecure - gpr_test_util - gpr args: @@ -3639,10 +3667,10 @@ targets: deps: - grpc_benchmark - benchmark - - grpc++_test_util - - grpc_test_util - - grpc++ - - grpc + - grpc++_test_util_unsecure + - grpc_test_util_unsecure + - grpc++_unsecure + - grpc_unsecure - gpr_test_util - gpr args: @@ -4385,11 +4413,11 @@ targets: - src/proto/grpc/testing/echo.proto - test/cpp/server/server_builder_test.cc deps: - - grpc++_test_util - - grpc_test_util + - grpc++_test_util_unsecure + - grpc_test_util_unsecure - gpr_test_util - - grpc++ - - grpc + - grpc++_unsecure + - grpc_unsecure - gpr - name: server_context_test_spouse_test gtest: true @@ -4445,11 +4473,11 @@ targets: - src/proto/grpc/testing/echo.proto - test/cpp/server/server_request_call_test.cc deps: - - grpc++_test_util - - grpc_test_util + - grpc++_test_util_unsecure + - grpc_test_util_unsecure - gpr_test_util - - grpc++ - - grpc + - grpc++_unsecure + - grpc_unsecure - gpr - name: shutdown_test gtest: true @@ -4525,8 +4553,8 @@ targets: src: - test/cpp/thread_manager/thread_manager_test.cc deps: - - grpc++ - - grpc + - grpc++_unsecure + - grpc_unsecure - gpr - grpc++_test_config - name: thread_stress_test @@ -4537,10 +4565,10 @@ targets: src: - test/cpp/end2end/thread_stress_test.cc deps: - - grpc++_test_util - - grpc_test_util - - grpc++ - - grpc + - grpc++_test_util_unsecure + - grpc_test_util_unsecure + - grpc++_unsecure + - grpc_unsecure - gpr_test_util - gpr timeout_seconds: 1200 diff --git a/tools/run_tests/generated/sources_and_headers.json b/tools/run_tests/generated/sources_and_headers.json index 9ef1e2b51d0..e6716618d8c 100644 --- a/tools/run_tests/generated/sources_and_headers.json +++ b/tools/run_tests/generated/sources_and_headers.json @@ -2507,10 +2507,10 @@ "deps": [ "gpr", "gpr_test_util", - "grpc", - "grpc++", - "grpc++_test_util", - "grpc_test_util" + "grpc++_test_util_unsecure", + "grpc++_unsecure", + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "is_filegroup": false, @@ -2565,11 +2565,11 @@ "benchmark", "gpr", "gpr_test_util", - "grpc", - "grpc++", - "grpc++_test_util", + "grpc++_test_util_unsecure", + "grpc++_unsecure", "grpc_benchmark", - "grpc_test_util" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "is_filegroup": false, @@ -2586,11 +2586,11 @@ "benchmark", "gpr", "gpr_test_util", - "grpc", - "grpc++", - "grpc++_test_util", + "grpc++_test_util_unsecure", + "grpc++_unsecure", "grpc_benchmark", - "grpc_test_util" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "is_filegroup": false, @@ -2607,11 +2607,11 @@ "benchmark", "gpr", "gpr_test_util", - "grpc", - "grpc++", - "grpc++_test_util", + "grpc++_test_util_unsecure", + "grpc++_unsecure", "grpc_benchmark", - "grpc_test_util" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "is_filegroup": false, @@ -2628,11 +2628,11 @@ "benchmark", "gpr", "gpr_test_util", - "grpc", - "grpc++", - "grpc++_test_util", + "grpc++_test_util_unsecure", + "grpc++_unsecure", "grpc_benchmark", - "grpc_test_util" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "is_filegroup": false, @@ -2649,11 +2649,11 @@ "benchmark", "gpr", "gpr_test_util", - "grpc", - "grpc++", - "grpc++_test_util", + "grpc++_test_util_unsecure", + "grpc++_unsecure", "grpc_benchmark", - "grpc_test_util" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "is_filegroup": false, @@ -2670,11 +2670,11 @@ "benchmark", "gpr", "gpr_test_util", - "grpc", - "grpc++", - "grpc++_test_util", + "grpc++_test_util_unsecure", + "grpc++_unsecure", "grpc_benchmark", - "grpc_test_util" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "is_filegroup": false, @@ -2691,11 +2691,11 @@ "benchmark", "gpr", "gpr_test_util", - "grpc", - "grpc++", - "grpc++_test_util", + "grpc++_test_util_unsecure", + "grpc++_unsecure", "grpc_benchmark", - "grpc_test_util" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "is_filegroup": false, @@ -2712,11 +2712,11 @@ "benchmark", "gpr", "gpr_test_util", - "grpc", - "grpc++", - "grpc++_test_util", + "grpc++_test_util_unsecure", + "grpc++_unsecure", "grpc_benchmark", - "grpc_test_util" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "is_filegroup": false, @@ -2733,11 +2733,11 @@ "benchmark", "gpr", "gpr_test_util", - "grpc", - "grpc++", - "grpc++_test_util", + "grpc++_test_util_unsecure", + "grpc++_unsecure", "grpc_benchmark", - "grpc_test_util" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "is_filegroup": false, @@ -2754,11 +2754,11 @@ "benchmark", "gpr", "gpr_test_util", - "grpc", - "grpc++", - "grpc++_test_util", + "grpc++_test_util_unsecure", + "grpc++_unsecure", "grpc_benchmark", - "grpc_test_util" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "is_filegroup": false, @@ -2775,11 +2775,11 @@ "benchmark", "gpr", "gpr_test_util", - "grpc", - "grpc++", - "grpc++_test_util", + "grpc++_test_util_unsecure", + "grpc++_unsecure", "grpc_benchmark", - "grpc_test_util" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "is_filegroup": false, @@ -2796,11 +2796,11 @@ "benchmark", "gpr", "gpr_test_util", - "grpc", - "grpc++", - "grpc++_test_util", + "grpc++_test_util_unsecure", + "grpc++_unsecure", "grpc_benchmark", - "grpc_test_util" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "is_filegroup": false, @@ -2817,11 +2817,11 @@ "benchmark", "gpr", "gpr_test_util", - "grpc", - "grpc++", - "grpc++_test_util", + "grpc++_test_util_unsecure", + "grpc++_unsecure", "grpc_benchmark", - "grpc_test_util" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "is_filegroup": false, @@ -2838,11 +2838,11 @@ "benchmark", "gpr", "gpr_test_util", - "grpc", - "grpc++", - "grpc++_test_util", + "grpc++_test_util_unsecure", + "grpc++_unsecure", "grpc_benchmark", - "grpc_test_util" + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "is_filegroup": false, @@ -3888,10 +3888,10 @@ "deps": [ "gpr", "gpr_test_util", - "grpc", - "grpc++", - "grpc++_test_util", - "grpc_test_util" + "grpc++_test_util_unsecure", + "grpc++_unsecure", + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [ "src/proto/grpc/testing/echo.grpc.pb.h", @@ -3971,10 +3971,10 @@ "deps": [ "gpr", "gpr_test_util", - "grpc", - "grpc++", - "grpc++_test_util", - "grpc_test_util" + "grpc++_test_util_unsecure", + "grpc++_unsecure", + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [ "src/proto/grpc/testing/echo.grpc.pb.h", @@ -4098,9 +4098,9 @@ { "deps": [ "gpr", - "grpc", - "grpc++", - "grpc++_test_config" + "grpc++_test_config", + "grpc++_unsecure", + "grpc_unsecure" ], "headers": [], "is_filegroup": false, @@ -4116,10 +4116,10 @@ "deps": [ "gpr", "gpr_test_util", - "grpc", - "grpc++", - "grpc++_test_util", - "grpc_test_util" + "grpc++_test_util_unsecure", + "grpc++_unsecure", + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [], "is_filegroup": false, @@ -5876,7 +5876,6 @@ "gpr", "gpr_test_util", "grpc", - "grpc_base", "grpc_test_util_base" ], "headers": [ @@ -5902,7 +5901,6 @@ "deps": [ "gpr", "gpr_test_util", - "grpc", "grpc_test_util_base", "grpc_unsecure" ], @@ -6175,6 +6173,50 @@ "third_party": false, "type": "lib" }, + { + "deps": [ + "grpc++_codegen_base", + "grpc++_codegen_base_src", + "grpc++_codegen_proto", + "grpc++_config_proto", + "grpc++_unsecure", + "grpc_test_util_unsecure", + "grpc_unsecure" + ], + "headers": [ + "src/proto/grpc/health/v1/health.grpc.pb.h", + "src/proto/grpc/health/v1/health.pb.h", + "src/proto/grpc/health/v1/health_mock.grpc.pb.h", + "src/proto/grpc/testing/duplicate/echo_duplicate.grpc.pb.h", + "src/proto/grpc/testing/duplicate/echo_duplicate.pb.h", + "src/proto/grpc/testing/duplicate/echo_duplicate_mock.grpc.pb.h", + "src/proto/grpc/testing/echo.grpc.pb.h", + "src/proto/grpc/testing/echo.pb.h", + "src/proto/grpc/testing/echo_messages.grpc.pb.h", + "src/proto/grpc/testing/echo_messages.pb.h", + "src/proto/grpc/testing/echo_messages_mock.grpc.pb.h", + "src/proto/grpc/testing/echo_mock.grpc.pb.h", + "test/cpp/end2end/test_service_impl.h", + "test/cpp/util/byte_buffer_proto_helper.h", + "test/cpp/util/string_ref_helper.h", + "test/cpp/util/subprocess.h" + ], + "is_filegroup": false, + "language": "c++", + "name": "grpc++_test_util_unsecure", + "src": [ + "test/cpp/end2end/test_service_impl.cc", + "test/cpp/end2end/test_service_impl.h", + "test/cpp/util/byte_buffer_proto_helper.cc", + "test/cpp/util/byte_buffer_proto_helper.h", + "test/cpp/util/string_ref_helper.cc", + "test/cpp/util/string_ref_helper.h", + "test/cpp/util/subprocess.cc", + "test/cpp/util/subprocess.h" + ], + "third_party": false, + "type": "lib" + }, { "deps": [ "gpr", @@ -6198,9 +6240,9 @@ { "deps": [ "benchmark", - "grpc", - "grpc++", - "grpc_test_util" + "grpc++_unsecure", + "grpc_test_util_unsecure", + "grpc_unsecure" ], "headers": [ "test/cpp/microbenchmarks/fullstack_context_mutators.h", @@ -8635,8 +8677,11 @@ }, { "deps": [ + "gpr", "gpr_test_util", - "grpc" + "grpc_base", + "grpc_client_channel", + "grpc_transport_chttp2" ], "headers": [ "src/core/ext/filters/client_channel/resolver/fake/fake_resolver.h", diff --git a/vsprojects/buildtests_c.sln b/vsprojects/buildtests_c.sln index 6f13039cac1..5344d0a03f0 100644 --- a/vsprojects/buildtests_c.sln +++ b/vsprojects/buildtests_c.sln @@ -742,7 +742,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc_test_util_unsecure", " {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5} = {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5} - {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc_unsecure", "vcxproj\.\grpc_unsecure\grpc_unsecure.vcxproj", "{46CEDFFF-9692-456A-AA24-38B5D6BCF4C5}" diff --git a/vsprojects/grpc.sln b/vsprojects/grpc.sln index 307ae4b5990..f400551bb06 100644 --- a/vsprojects/grpc.sln +++ b/vsprojects/grpc.sln @@ -128,7 +128,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc_test_util_unsecure", " {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5} = {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5} - {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc_unsecure", "vcxproj\.\grpc_unsecure\grpc_unsecure.vcxproj", "{46CEDFFF-9692-456A-AA24-38B5D6BCF4C5}" diff --git a/vsprojects/vcxproj/grpc++_test_util_unsecure/grpc++_test_util_unsecure.vcxproj b/vsprojects/vcxproj/grpc++_test_util_unsecure/grpc++_test_util_unsecure.vcxproj new file mode 100644 index 00000000000..5a84ab4f824 --- /dev/null +++ b/vsprojects/vcxproj/grpc++_test_util_unsecure/grpc++_test_util_unsecure.vcxproj @@ -0,0 +1,271 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {1D4003D7-5BF1-9FE6-BAF7-23B174D942AC} + true + $(SolutionDir)IntDir\$(MSBuildProjectName)\ + + + + v100 + + + v110 + + + v120 + + + v140 + + + StaticLibrary + true + Unicode + + + StaticLibrary + false + true + Unicode + + + + + + + + + + + + grpc++_test_util_unsecure + + + grpc++_test_util_unsecure + + + + NotUsing + Level3 + Disabled + WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) + true + MultiThreadedDebug + true + None + false + + + Windows + true + false + + + + + + NotUsing + Level3 + Disabled + WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) + true + MultiThreadedDebug + true + None + false + + + Windows + true + false + + + + + + NotUsing + Level3 + MaxSpeed + WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) + true + true + true + MultiThreaded + true + None + false + + + Windows + true + false + true + true + + + + + + NotUsing + Level3 + MaxSpeed + WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) + true + true + true + MultiThreaded + true + None + false + + + Windows + true + false + true + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {6EE56155-DF7C-4F6E-BFC4-F6F776BEB211} + + + {0A7E7F92-FDEA-40F1-A9EC-3BA484F98BBF} + + + {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5} + + + + + + + + This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + + + + diff --git a/vsprojects/vcxproj/grpc++_test_util_unsecure/grpc++_test_util_unsecure.vcxproj.filters b/vsprojects/vcxproj/grpc++_test_util_unsecure/grpc++_test_util_unsecure.vcxproj.filters new file mode 100644 index 00000000000..b39f96f466e --- /dev/null +++ b/vsprojects/vcxproj/grpc++_test_util_unsecure/grpc++_test_util_unsecure.vcxproj.filters @@ -0,0 +1,265 @@ + + + + + src\proto\grpc\health\v1 + + + src\proto\grpc\testing + + + src\proto\grpc\testing + + + src\proto\grpc\testing\duplicate + + + test\cpp\end2end + + + test\cpp\util + + + test\cpp\util + + + test\cpp\util + + + src\cpp\codegen + + + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen\security + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + + + test\cpp\end2end + + + test\cpp\util + + + test\cpp\util + + + test\cpp\util + + + + + + {781a1608-4ec4-84b1-fd7e-e57adad0005d} + + + {da1ebc2d-b558-bdc0-9541-c9f819d11c04} + + + {a39a48c0-c9a5-3604-e938-802c36d53216} + + + {1fdb8853-a861-f8e3-fa1c-0543fa78879f} + + + {2546f4ae-8381-e6a9-ddac-41d12c404b5f} + + + {f3b5631d-4a82-0785-9358-cf5062293391} + + + {19f6c9d1-1185-a5de-881e-5224d1058d5e} + + + {967583b5-ee23-687f-2474-520655e0be4a} + + + {391a84b9-78a5-9954-e923-f8d055b3481b} + + + {4062f6b9-f1ff-68e8-72bc-30277514b0ee} + + + {8a7e7d59-50b8-04bf-e9c7-67ebf0021873} + + + {1b71252d-1742-e9be-64f9-562af348bafd} + + + {ce9a06e6-fe2f-f9fa-03ae-0e39e730c312} + + + {471fdb3b-4dc0-4a35-3667-22e9f857db8e} + + + {7e63feec-8f56-cd35-b7d6-73db98dbdde2} + + + {4ffb2a33-1a46-184c-555e-be927e3747fd} + + + {2bc8042f-43c5-737c-4d52-553402259478} + + + {9d840e55-92ac-10af-2ac1-9c0af3b05a5c} + + + {2668f96a-1d73-d007-92ff-9b50e2fba1b0} + + + {63c12fd2-9e66-f7b8-1eec-951e7d48e343} + + + {e08c5a81-5645-f71c-59ab-98d2f3e41417} + + + + diff --git a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj index 010f7fd92e8..02f7bdefc27 100644 --- a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj +++ b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj @@ -185,6 +185,48 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -479,6 +521,100 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters index 60296cac06a..8c9d0b2040f 100644 --- a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters +++ b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters @@ -439,6 +439,147 @@ src\core\lib\debug + + src\core\ext\filters\client_channel + + + src\core\ext\filters\client_channel + + + src\core\ext\filters\client_channel + + + src\core\ext\filters\client_channel + + + src\core\ext\filters\client_channel + + + src\core\ext\filters\client_channel + + + src\core\ext\filters\client_channel + + + src\core\ext\filters\client_channel + + + src\core\ext\filters\client_channel + + + src\core\ext\filters\client_channel + + + src\core\ext\filters\client_channel + + + src\core\ext\filters\client_channel + + + src\core\ext\filters\client_channel + + + src\core\ext\filters\client_channel + + + src\core\ext\filters\client_channel + + + src\core\ext\filters\client_channel + + + src\core\ext\filters\client_channel + + + src\core\ext\filters\client_channel + + + src\core\ext\filters\client_channel + + + src\core\ext\filters\client_channel + + + src\core\ext\filters\deadline + + + src\core\ext\transport\chttp2\transport + + + src\core\ext\transport\chttp2\transport + + + src\core\ext\transport\chttp2\transport + + + src\core\ext\transport\chttp2\transport + + + src\core\ext\transport\chttp2\transport + + + src\core\ext\transport\chttp2\transport + + + src\core\ext\transport\chttp2\transport + + + src\core\ext\transport\chttp2\transport + + + src\core\ext\transport\chttp2\transport + + + src\core\ext\transport\chttp2\transport + + + src\core\ext\transport\chttp2\transport + + + src\core\ext\transport\chttp2\transport + + + src\core\ext\transport\chttp2\transport + + + src\core\ext\transport\chttp2\transport + + + src\core\ext\transport\chttp2\transport + + + src\core\ext\transport\chttp2\transport + + + src\core\ext\transport\chttp2\transport + + + src\core\ext\transport\chttp2\transport + + + src\core\ext\transport\chttp2\transport + + + src\core\ext\transport\chttp2\transport + + + src\core\ext\transport\chttp2\transport + + + src\core\ext\transport\chttp2\alpn + + + src\core\ext\filters\http\client + + + src\core\ext\filters\http + + + src\core\ext\filters\http\message_compress + + + src\core\ext\filters\http\server + @@ -551,6 +692,132 @@ test\core\util + + src\core\ext\filters\client_channel + + + src\core\ext\filters\client_channel + + + src\core\ext\filters\client_channel + + + src\core\ext\filters\client_channel + + + src\core\ext\filters\client_channel + + + src\core\ext\filters\client_channel + + + src\core\ext\filters\client_channel + + + src\core\ext\filters\client_channel + + + src\core\ext\filters\client_channel + + + src\core\ext\filters\client_channel + + + src\core\ext\filters\client_channel + + + src\core\ext\filters\client_channel + + + src\core\ext\filters\client_channel + + + src\core\ext\filters\client_channel + + + src\core\ext\filters\client_channel + + + src\core\ext\filters\client_channel + + + src\core\ext\filters\client_channel + + + src\core\ext\filters\client_channel + + + src\core\ext\filters\deadline + + + src\core\ext\transport\chttp2\transport + + + src\core\ext\transport\chttp2\transport + + + src\core\ext\transport\chttp2\transport + + + src\core\ext\transport\chttp2\transport + + + src\core\ext\transport\chttp2\transport + + + src\core\ext\transport\chttp2\transport + + + src\core\ext\transport\chttp2\transport + + + src\core\ext\transport\chttp2\transport + + + src\core\ext\transport\chttp2\transport + + + src\core\ext\transport\chttp2\transport + + + src\core\ext\transport\chttp2\transport + + + src\core\ext\transport\chttp2\transport + + + src\core\ext\transport\chttp2\transport + + + src\core\ext\transport\chttp2\transport + + + src\core\ext\transport\chttp2\transport + + + src\core\ext\transport\chttp2\transport + + + src\core\ext\transport\chttp2\transport + + + src\core\ext\transport\chttp2\transport + + + src\core\ext\transport\chttp2\transport + + + src\core\ext\transport\chttp2\alpn + + + src\core\ext\filters\http\client + + + src\core\ext\filters\http\message_compress + + + src\core\ext\filters\http\server + @@ -587,6 +854,33 @@ {9e94ffec-fe00-d132-db50-c4a3c218f102} + + {2c9ab189-bb7e-355d-9f37-385472e86b9f} + + + {4503bfa6-92be-99d8-8c6b-feeb42bbdd1c} + + + {6d9ffdbe-4d2f-b0c4-8abe-a548ffde6ad6} + + + {a6c2fe73-3b25-084c-68d7-9673ec7b872a} + + + {ec11748c-79ef-f224-2072-e3006d8638f4} + + + {b5f17b17-8012-87c9-dfb2-428dd29d0b94} + + + {608f56aa-d257-f25b-14aa-1776a771defd} + + + {49d381db-172f-9765-4135-d7a10c4485bf} + + + {4395ba2e-6b6d-ea05-8a1e-915b8f0f85f6} + {f4e8c61e-1ca6-0fdd-7b5e-b7f9a30c9a21} diff --git a/vsprojects/vcxproj/grpc_test_util_unsecure/grpc_test_util_unsecure.vcxproj b/vsprojects/vcxproj/grpc_test_util_unsecure/grpc_test_util_unsecure.vcxproj index d9977f7c67d..07d5bcaa22f 100644 --- a/vsprojects/vcxproj/grpc_test_util_unsecure/grpc_test_util_unsecure.vcxproj +++ b/vsprojects/vcxproj/grpc_test_util_unsecure/grpc_test_util_unsecure.vcxproj @@ -146,6 +146,27 @@ + + + + + + + + + + + + + + + + + + + + + @@ -162,6 +183,48 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -194,6 +257,352 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -205,9 +614,6 @@ {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5} - - {29D16885-7228-4C31-81ED-5F9187C7F2A9} - diff --git a/vsprojects/vcxproj/grpc_test_util_unsecure/grpc_test_util_unsecure.vcxproj.filters b/vsprojects/vcxproj/grpc_test_util_unsecure/grpc_test_util_unsecure.vcxproj.filters index 0a0590e9beb..3c1d0ef9a5a 100644 --- a/vsprojects/vcxproj/grpc_test_util_unsecure/grpc_test_util_unsecure.vcxproj.filters +++ b/vsprojects/vcxproj/grpc_test_util_unsecure/grpc_test_util_unsecure.vcxproj.filters @@ -46,6 +46,584 @@ test\core\util + + src\core\lib\channel + + + src\core\lib\channel + + + src\core\lib\channel + + + src\core\lib\channel + + + src\core\lib\channel + + + src\core\lib\channel + + + src\core\lib\channel + + + src\core\lib\compression + + + src\core\lib\compression + + + src\core\lib\compression + + + src\core\lib\http + + + src\core\lib\http + + + src\core\lib\http + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\json + + + src\core\lib\json + + + src\core\lib\json + + + src\core\lib\json + + + src\core\lib\slice + + + src\core\lib\slice + + + src\core\lib\slice + + + src\core\lib\slice + + + src\core\lib\slice + + + src\core\lib\slice + + + src\core\lib\slice + + + src\core\lib\surface + + + src\core\lib\surface + + + src\core\lib\surface + + + src\core\lib\surface + + + src\core\lib\surface + + + src\core\lib\surface + + + src\core\lib\surface + + + src\core\lib\surface + + + src\core\lib\surface + + + src\core\lib\surface + + + src\core\lib\surface + + + src\core\lib\surface + + + src\core\lib\surface + + + src\core\lib\surface + + + src\core\lib\surface + + + src\core\lib\surface + + + src\core\lib\surface + + + src\core\lib\surface + + + src\core\lib\surface + + + src\core\lib\transport + + + src\core\lib\transport + + + src\core\lib\transport + + + src\core\lib\transport + + + src\core\lib\transport + + + src\core\lib\transport + + + src\core\lib\transport + + + src\core\lib\transport + + + src\core\lib\transport + + + src\core\lib\transport + + + src\core\lib\transport + + + src\core\lib\transport + + + src\core\lib\transport + + + src\core\lib\debug + + + src\core\ext\filters\client_channel + + + src\core\ext\filters\client_channel + + + src\core\ext\filters\client_channel + + + src\core\ext\filters\client_channel + + + src\core\ext\filters\client_channel + + + src\core\ext\filters\client_channel + + + src\core\ext\filters\client_channel + + + src\core\ext\filters\client_channel + + + src\core\ext\filters\client_channel + + + src\core\ext\filters\client_channel + + + src\core\ext\filters\client_channel + + + src\core\ext\filters\client_channel + + + src\core\ext\filters\client_channel + + + src\core\ext\filters\client_channel + + + src\core\ext\filters\client_channel + + + src\core\ext\filters\client_channel + + + src\core\ext\filters\client_channel + + + src\core\ext\filters\client_channel + + + src\core\ext\filters\client_channel + + + src\core\ext\filters\client_channel + + + src\core\ext\filters\deadline + + + src\core\ext\transport\chttp2\transport + + + src\core\ext\transport\chttp2\transport + + + src\core\ext\transport\chttp2\transport + + + src\core\ext\transport\chttp2\transport + + + src\core\ext\transport\chttp2\transport + + + src\core\ext\transport\chttp2\transport + + + src\core\ext\transport\chttp2\transport + + + src\core\ext\transport\chttp2\transport + + + src\core\ext\transport\chttp2\transport + + + src\core\ext\transport\chttp2\transport + + + src\core\ext\transport\chttp2\transport + + + src\core\ext\transport\chttp2\transport + + + src\core\ext\transport\chttp2\transport + + + src\core\ext\transport\chttp2\transport + + + src\core\ext\transport\chttp2\transport + + + src\core\ext\transport\chttp2\transport + + + src\core\ext\transport\chttp2\transport + + + src\core\ext\transport\chttp2\transport + + + src\core\ext\transport\chttp2\transport + + + src\core\ext\transport\chttp2\transport + + + src\core\ext\transport\chttp2\transport + + + src\core\ext\transport\chttp2\alpn + + + src\core\ext\filters\http\client + + + src\core\ext\filters\http + + + src\core\ext\filters\http\message_compress + + + src\core\ext\filters\http\server + + + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + @@ -93,9 +671,147 @@ test\core\util + + src\core\ext\filters\client_channel + + + src\core\ext\filters\client_channel + + + src\core\ext\filters\client_channel + + + src\core\ext\filters\client_channel + + + src\core\ext\filters\client_channel + + + src\core\ext\filters\client_channel + + + src\core\ext\filters\client_channel + + + src\core\ext\filters\client_channel + + + src\core\ext\filters\client_channel + + + src\core\ext\filters\client_channel + + + src\core\ext\filters\client_channel + + + src\core\ext\filters\client_channel + + + src\core\ext\filters\client_channel + + + src\core\ext\filters\client_channel + + + src\core\ext\filters\client_channel + + + src\core\ext\filters\client_channel + + + src\core\ext\filters\client_channel + + + src\core\ext\filters\client_channel + + + src\core\ext\filters\deadline + + + src\core\ext\transport\chttp2\transport + + + src\core\ext\transport\chttp2\transport + + + src\core\ext\transport\chttp2\transport + + + src\core\ext\transport\chttp2\transport + + + src\core\ext\transport\chttp2\transport + + + src\core\ext\transport\chttp2\transport + + + src\core\ext\transport\chttp2\transport + + + src\core\ext\transport\chttp2\transport + + + src\core\ext\transport\chttp2\transport + + + src\core\ext\transport\chttp2\transport + + + src\core\ext\transport\chttp2\transport + + + src\core\ext\transport\chttp2\transport + + + src\core\ext\transport\chttp2\transport + + + src\core\ext\transport\chttp2\transport + + + src\core\ext\transport\chttp2\transport + + + src\core\ext\transport\chttp2\transport + + + src\core\ext\transport\chttp2\transport + + + src\core\ext\transport\chttp2\transport + + + src\core\ext\transport\chttp2\transport + + + src\core\ext\transport\chttp2\alpn + + + src\core\ext\filters\http\client + + + src\core\ext\filters\http\message_compress + + + src\core\ext\filters\http\server + + + {9793fab6-15ae-1f61-712d-c3d673654d72} + + + {c2447106-a6bf-6b88-9ad0-a42b7ac1573c} + + + {dba70812-267b-656c-9f8c-636338d3f5c0} + + + {b9e2ddac-f042-3042-ba4b-79ba4445e68c} + {65483377-42fd-137e-3847-00dfd4675db3} @@ -117,6 +833,63 @@ {2d280bd0-f4ee-d1f2-4d70-174147ac0dbc} + + {6820a68f-2aa3-8b45-ddea-294656d531f6} + + + {b7df4d88-fa6b-6bd3-579e-b5f086ba6299} + + + {37d93a32-6a75-3b9e-35a4-c47f0a2d274a} + + + {a4bd6a23-c8e1-4e35-f9eb-6434a86f38f0} + + + {2dd536f5-341a-771f-4853-a95522e59224} + + + {fb32254e-a807-768a-3686-4e87f3bf1e8e} + + + {87c61e56-5090-5e1a-22af-02e3c8bf4a2a} + + + {e50ce1d1-6b17-dad2-9ef3-46f68d4bee1b} + + + {67007111-23fe-296f-1808-91f2b96a31aa} + + + {e3d002a7-9318-1ac5-4259-e177f58ccc9a} + + + {ac14fd16-a4af-6b22-4226-2d7dabf25409} + + + {24268e45-f6c3-6024-b49a-d01bb9c12d96} + + + {0be401bd-3e26-dead-fdf4-2ce27a1ac3a3} + + + {ac2f12e3-ac77-f0a7-d15d-92899e61ed25} + + + {9015222c-df04-298f-3f2c-d19babffc180} + + + {c3ff117a-aae9-dedd-2f5a-888f0383cbb8} + + + {588ffbfc-2f94-a99f-85b0-4c47ec9f8d13} + + + {732318c6-bb34-9a99-611b-9928db3d4e2a} + + + {2c0ca4a1-38df-329d-eeba-5c5b61dc81a5} + {037c7645-1698-cf2d-4163-525240323101} diff --git a/vsprojects/vcxproj/test/alarm_cpp_test/alarm_cpp_test.vcxproj b/vsprojects/vcxproj/test/alarm_cpp_test/alarm_cpp_test.vcxproj index 10541cb6f2c..0caf8b63942 100644 --- a/vsprojects/vcxproj/test/alarm_cpp_test/alarm_cpp_test.vcxproj +++ b/vsprojects/vcxproj/test/alarm_cpp_test/alarm_cpp_test.vcxproj @@ -164,17 +164,17 @@ - - {0BE77741-552A-929B-A497-4EF7ECE17A64} + + {1D4003D7-5BF1-9FE6-BAF7-23B174D942AC} - - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} + + {0A7E7F92-FDEA-40F1-A9EC-3BA484F98BBF} - - {C187A093-A0FE-489D-A40A-6E33DE0F9FEB} + + {6EE56155-DF7C-4F6E-BFC4-F6F776BEB211} - - {29D16885-7228-4C31-81ED-5F9187C7F2A9} + + {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5} {EAB0A629-17A9-44DB-B5FF-E91A721FE037} diff --git a/vsprojects/vcxproj/test/grpc_benchmark/grpc_benchmark.vcxproj b/vsprojects/vcxproj/test/grpc_benchmark/grpc_benchmark.vcxproj index 58586f0cb8d..a86f83c9d99 100644 --- a/vsprojects/vcxproj/test/grpc_benchmark/grpc_benchmark.vcxproj +++ b/vsprojects/vcxproj/test/grpc_benchmark/grpc_benchmark.vcxproj @@ -172,14 +172,14 @@ {07978586-E47C-8709-A63E-895FBF3C3C7D} - - {C187A093-A0FE-489D-A40A-6E33DE0F9FEB} + + {6EE56155-DF7C-4F6E-BFC4-F6F776BEB211} - - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} + + {0A7E7F92-FDEA-40F1-A9EC-3BA484F98BBF} - - {29D16885-7228-4C31-81ED-5F9187C7F2A9} + + {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5} diff --git a/vsprojects/vcxproj/test/server_builder_test/server_builder_test.vcxproj b/vsprojects/vcxproj/test/server_builder_test/server_builder_test.vcxproj index ebbfd59f3d3..1b140dc96fc 100644 --- a/vsprojects/vcxproj/test/server_builder_test/server_builder_test.vcxproj +++ b/vsprojects/vcxproj/test/server_builder_test/server_builder_test.vcxproj @@ -180,20 +180,20 @@ - - {0BE77741-552A-929B-A497-4EF7ECE17A64} + + {1D4003D7-5BF1-9FE6-BAF7-23B174D942AC} - - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} + + {0A7E7F92-FDEA-40F1-A9EC-3BA484F98BBF} {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - {C187A093-A0FE-489D-A40A-6E33DE0F9FEB} + + {6EE56155-DF7C-4F6E-BFC4-F6F776BEB211} - - {29D16885-7228-4C31-81ED-5F9187C7F2A9} + + {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5} {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} diff --git a/vsprojects/vcxproj/test/server_request_call_test/server_request_call_test.vcxproj b/vsprojects/vcxproj/test/server_request_call_test/server_request_call_test.vcxproj index 55511759353..58af3b492dd 100644 --- a/vsprojects/vcxproj/test/server_request_call_test/server_request_call_test.vcxproj +++ b/vsprojects/vcxproj/test/server_request_call_test/server_request_call_test.vcxproj @@ -180,20 +180,20 @@ - - {0BE77741-552A-929B-A497-4EF7ECE17A64} + + {1D4003D7-5BF1-9FE6-BAF7-23B174D942AC} - - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} + + {0A7E7F92-FDEA-40F1-A9EC-3BA484F98BBF} {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - {C187A093-A0FE-489D-A40A-6E33DE0F9FEB} + + {6EE56155-DF7C-4F6E-BFC4-F6F776BEB211} - - {29D16885-7228-4C31-81ED-5F9187C7F2A9} + + {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5} {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} diff --git a/vsprojects/vcxproj/test/thread_manager_test/thread_manager_test.vcxproj b/vsprojects/vcxproj/test/thread_manager_test/thread_manager_test.vcxproj index 2c35a03a021..bfc99774413 100644 --- a/vsprojects/vcxproj/test/thread_manager_test/thread_manager_test.vcxproj +++ b/vsprojects/vcxproj/test/thread_manager_test/thread_manager_test.vcxproj @@ -164,11 +164,11 @@ - - {C187A093-A0FE-489D-A40A-6E33DE0F9FEB} + + {6EE56155-DF7C-4F6E-BFC4-F6F776BEB211} - - {29D16885-7228-4C31-81ED-5F9187C7F2A9} + + {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5} {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} diff --git a/vsprojects/vcxproj/test/thread_stress_test/thread_stress_test.vcxproj b/vsprojects/vcxproj/test/thread_stress_test/thread_stress_test.vcxproj index 44b0a35766e..a62a0db4f67 100644 --- a/vsprojects/vcxproj/test/thread_stress_test/thread_stress_test.vcxproj +++ b/vsprojects/vcxproj/test/thread_stress_test/thread_stress_test.vcxproj @@ -164,17 +164,17 @@ - - {0BE77741-552A-929B-A497-4EF7ECE17A64} + + {1D4003D7-5BF1-9FE6-BAF7-23B174D942AC} - - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} + + {0A7E7F92-FDEA-40F1-A9EC-3BA484F98BBF} - - {C187A093-A0FE-489D-A40A-6E33DE0F9FEB} + + {6EE56155-DF7C-4F6E-BFC4-F6F776BEB211} - - {29D16885-7228-4C31-81ED-5F9187C7F2A9} + + {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5} {EAB0A629-17A9-44DB-B5FF-E91A721FE037} From 92bc7f940e5684cbb749f0349c0e69d4e51b8ef8 Mon Sep 17 00:00:00 2001 From: Eric Gribkoff Date: Mon, 10 Jul 2017 14:44:39 -0700 Subject: [PATCH 79/80] Enable compression interop tests for Java clients --- tools/run_tests/run_interop_tests.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/run_tests/run_interop_tests.py b/tools/run_tests/run_interop_tests.py index bde91159858..dbbf2adb225 100755 --- a/tools/run_tests/run_interop_tests.py +++ b/tools/run_tests/run_interop_tests.py @@ -185,7 +185,7 @@ class JavaLanguage: return {} def unimplemented_test_cases(self): - return _SKIP_COMPRESSION + return [] def unimplemented_test_cases_server(self): return _SKIP_COMPRESSION @@ -210,7 +210,7 @@ class JavaOkHttpClient: return {} def unimplemented_test_cases(self): - return _SKIP_COMPRESSION + _SKIP_DATA_FRAME_PADDING + return _SKIP_DATA_FRAME_PADDING def __str__(self): return 'javaokhttp' From 2b7c4ddfcceb828094a4fab5eebeb068152ea75d Mon Sep 17 00:00:00 2001 From: Eric Gribkoff Date: Sun, 23 Jul 2017 11:54:13 -0700 Subject: [PATCH 80/80] Install Android SDK tools in Dockerfile --- .../Dockerfile.template | 30 ++++++++++--------- .../grpc_interop_android_java/Dockerfile | 30 ++++++++++--------- 2 files changed, 32 insertions(+), 28 deletions(-) diff --git a/templates/tools/dockerfile/interoptest/grpc_interop_android_java/Dockerfile.template b/templates/tools/dockerfile/interoptest/grpc_interop_android_java/Dockerfile.template index 3f5b6cf6ce6..1f6755eb51e 100644 --- a/templates/tools/dockerfile/interoptest/grpc_interop_android_java/Dockerfile.template +++ b/templates/tools/dockerfile/interoptest/grpc_interop_android_java/Dockerfile.template @@ -57,22 +57,24 @@ apt-get update && apt-get install -y google-cloud-sdk && apt-get clean && ${'\\'} gcloud config set component_manager/disable_update_check true - # Download and install grpc-java + # Install Android SDK WORKDIR / - RUN git clone https://github.com/grpc/grpc-java.git - WORKDIR /grpc-java - RUN ./gradlew install + RUN mkdir android-sdk + WORKDIR android-sdk + RUN wget -q https://dl.google.com/android/repository/tools_r25.2.5-linux.zip && ${'\\'} + unzip -qq tools_r25.2.5-linux.zip && ${'\\'} + rm tools_r25.2.5-linux.zip && ${'\\'} + echo y | tools/bin/sdkmanager "platforms;android-22" && ${'\\'} + echo y | tools/bin/sdkmanager "build-tools;25.0.2" && ${'\\'} + echo y | tools/bin/sdkmanager "extras;android;m2repository" && ${'\\'} + echo y | tools/bin/sdkmanager "extras;google;google_play_services" && ${'\\'} + echo y | tools/bin/sdkmanager "extras;google;m2repository" && ${'\\'} + echo y | tools/bin/sdkmanager "patcher;v4" && ${'\\'} + echo y | tools/bin/sdkmanager "platform-tools" + ENV ANDROID_HOME "/android-sdk" - # Setup the Android SDK licenses - ENV ANDROID_HOME "/grpc-java/android-interop-testing/.android" - RUN mkdir -p "<%text>${ANDROID_HOME}/licenses" - RUN echo -e "\n8933bad161af4178b1185d1a37fbf41ea5269c55" > "<%text>${ANDROID_HOME}/licenses/android-sdk-license" - RUN echo -e "\n84831b9409646a918e30573bab4c9c91346d8abd" > "<%text>${ANDROID_HOME}/licenses/android-sdk-preview-license" - - # Build the Android interop apks - WORKDIR /grpc-java/android-interop-testing - RUN ../gradlew assembleDebug - RUN ../gradlew assembleDebugAndroidTest + # Reset the working directory + WORKDIR / # Define the default command. CMD ["bash"] diff --git a/tools/dockerfile/interoptest/grpc_interop_android_java/Dockerfile b/tools/dockerfile/interoptest/grpc_interop_android_java/Dockerfile index 35998a3cb27..519cdbfafa4 100644 --- a/tools/dockerfile/interoptest/grpc_interop_android_java/Dockerfile +++ b/tools/dockerfile/interoptest/grpc_interop_android_java/Dockerfile @@ -55,22 +55,24 @@ RUN echo "deb http://packages.cloud.google.com/apt $CLOUD_SDK_REPO main" | tee - apt-get update && apt-get install -y google-cloud-sdk && apt-get clean && \ gcloud config set component_manager/disable_update_check true -# Download and install grpc-java +# Install Android SDK WORKDIR / -RUN git clone https://github.com/grpc/grpc-java.git -WORKDIR /grpc-java -RUN ./gradlew install +RUN mkdir android-sdk +WORKDIR android-sdk +RUN wget -q https://dl.google.com/android/repository/tools_r25.2.5-linux.zip && \ + unzip -qq tools_r25.2.5-linux.zip && \ + rm tools_r25.2.5-linux.zip && \ + echo y | tools/bin/sdkmanager "platforms;android-22" && \ + echo y | tools/bin/sdkmanager "build-tools;25.0.2" && \ + echo y | tools/bin/sdkmanager "extras;android;m2repository" && \ + echo y | tools/bin/sdkmanager "extras;google;google_play_services" && \ + echo y | tools/bin/sdkmanager "extras;google;m2repository" && \ + echo y | tools/bin/sdkmanager "patcher;v4" && \ + echo y | tools/bin/sdkmanager "platform-tools" +ENV ANDROID_HOME "/android-sdk" -# Setup the Android SDK licenses -ENV ANDROID_HOME "/grpc-java/android-interop-testing/.android" -RUN mkdir -p "${ANDROID_HOME}/licenses" -RUN echo -e "\n8933bad161af4178b1185d1a37fbf41ea5269c55" > "${ANDROID_HOME}/licenses/android-sdk-license" -RUN echo -e "\n84831b9409646a918e30573bab4c9c91346d8abd" > "${ANDROID_HOME}/licenses/android-sdk-preview-license" - -# Build the Android interop apks -WORKDIR /grpc-java/android-interop-testing -RUN ../gradlew assembleDebug -RUN ../gradlew assembleDebugAndroidTest +# Reset the working directory +WORKDIR / # Define the default command. CMD ["bash"]