diff options
author | Yash Tibrewal <yashkt@google.com> | 2017-11-21 16:52:06 -0800 |
---|---|---|
committer | Yash Tibrewal <yashkt@google.com> | 2017-11-21 16:52:06 -0800 |
commit | 7486144de0577e3e9453feec328741180d1f1bfa (patch) | |
tree | 23eb0c5490c5a0a6057407a05f62efac1181389b /test/core | |
parent | d48981221542a5bd760b64e5af379adb0e846bba (diff) | |
parent | d88421a995bf473202ecf0650eb8339a3cea3e93 (diff) |
Merge master
Diffstat (limited to 'test/core')
-rw-r--r-- | test/core/end2end/fixtures/http_proxy_fixture.cc | 16 | ||||
-rw-r--r-- | test/core/iomgr/timer_list_test.cc | 13 | ||||
-rw-r--r-- | test/core/support/BUILD | 10 | ||||
-rw-r--r-- | test/core/support/manual_constructor_test.cc | 99 | ||||
-rw-r--r-- | test/core/surface/public_headers_must_be_c89.c | 564 | ||||
-rw-r--r-- | test/core/transport/connectivity_state_test.cc | 3 | ||||
-rw-r--r-- | test/core/util/BUILD | 2 | ||||
-rw-r--r-- | test/core/util/tracer_util.cc | 31 | ||||
-rw-r--r-- | test/core/util/tracer_util.h | 32 |
9 files changed, 478 insertions, 292 deletions
diff --git a/test/core/end2end/fixtures/http_proxy_fixture.cc b/test/core/end2end/fixtures/http_proxy_fixture.cc index 5ac783611d..c49a866a6c 100644 --- a/test/core/end2end/fixtures/http_proxy_fixture.cc +++ b/test/core/end2end/fixtures/http_proxy_fixture.cc @@ -88,9 +88,11 @@ typedef struct proxy_connection { grpc_slice_buffer client_read_buffer; grpc_slice_buffer client_deferred_write_buffer; + bool client_is_writing; grpc_slice_buffer client_write_buffer; grpc_slice_buffer server_read_buffer; grpc_slice_buffer server_deferred_write_buffer; + bool server_is_writing; grpc_slice_buffer server_write_buffer; grpc_http_parser http_parser; @@ -141,6 +143,7 @@ static void proxy_connection_failed(proxy_connection* conn, bool is_client, // Callback for writing proxy data to the client. static void on_client_write_done(void* arg, grpc_error* error) { proxy_connection* conn = (proxy_connection*)arg; + conn->client_is_writing = false; if (error != GRPC_ERROR_NONE) { proxy_connection_failed(conn, true /* is_client */, "HTTP proxy client write", error); @@ -153,6 +156,7 @@ static void on_client_write_done(void* arg, grpc_error* error) { if (conn->client_deferred_write_buffer.length > 0) { grpc_slice_buffer_move_into(&conn->client_deferred_write_buffer, &conn->client_write_buffer); + conn->client_is_writing = true; grpc_endpoint_write(conn->client_endpoint, &conn->client_write_buffer, &conn->on_client_write_done); } else { @@ -164,6 +168,7 @@ static void on_client_write_done(void* arg, grpc_error* error) { // Callback for writing proxy data to the backend server. static void on_server_write_done(void* arg, grpc_error* error) { proxy_connection* conn = (proxy_connection*)arg; + conn->server_is_writing = false; if (error != GRPC_ERROR_NONE) { proxy_connection_failed(conn, false /* is_client */, "HTTP proxy server write", error); @@ -176,6 +181,7 @@ static void on_server_write_done(void* arg, grpc_error* error) { if (conn->server_deferred_write_buffer.length > 0) { grpc_slice_buffer_move_into(&conn->server_deferred_write_buffer, &conn->server_write_buffer); + conn->server_is_writing = true; grpc_endpoint_write(conn->server_endpoint, &conn->server_write_buffer, &conn->on_server_write_done); } else { @@ -199,13 +205,14 @@ static void on_client_read_done(void* arg, grpc_error* error) { // the current write is finished. // // Otherwise, move the read data into the write buffer and write it. - if (conn->server_write_buffer.length > 0) { + if (conn->server_is_writing) { grpc_slice_buffer_move_into(&conn->client_read_buffer, &conn->server_deferred_write_buffer); } else { grpc_slice_buffer_move_into(&conn->client_read_buffer, &conn->server_write_buffer); proxy_connection_ref(conn, "client_read"); + conn->server_is_writing = true; grpc_endpoint_write(conn->server_endpoint, &conn->server_write_buffer, &conn->on_server_write_done); } @@ -229,13 +236,14 @@ static void on_server_read_done(void* arg, grpc_error* error) { // the current write is finished. // // Otherwise, move the read data into the write buffer and write it. - if (conn->client_write_buffer.length > 0) { + if (conn->client_is_writing) { grpc_slice_buffer_move_into(&conn->server_read_buffer, &conn->client_deferred_write_buffer); } else { grpc_slice_buffer_move_into(&conn->server_read_buffer, &conn->client_write_buffer); proxy_connection_ref(conn, "server_read"); + conn->client_is_writing = true; grpc_endpoint_write(conn->client_endpoint, &conn->client_write_buffer, &conn->on_client_write_done); } @@ -247,6 +255,7 @@ static void on_server_read_done(void* arg, grpc_error* error) { // Callback to write the HTTP response for the CONNECT request. static void on_write_response_done(void* arg, grpc_error* error) { proxy_connection* conn = (proxy_connection*)arg; + conn->client_is_writing = false; if (error != GRPC_ERROR_NONE) { proxy_connection_failed(conn, true /* is_client */, "HTTP proxy write response", error); @@ -286,6 +295,7 @@ static void on_server_connect_done(void* arg, grpc_error* error) { grpc_slice slice = grpc_slice_from_copied_string("HTTP/1.0 200 connected\r\n\r\n"); grpc_slice_buffer_add(&conn->client_write_buffer, slice); + conn->client_is_writing = true; grpc_endpoint_write(conn->client_endpoint, &conn->client_write_buffer, &conn->on_write_response_done); } @@ -429,9 +439,11 @@ static void on_accept(void* arg, grpc_endpoint* endpoint, grpc_combiner_scheduler(conn->proxy->combiner)); grpc_slice_buffer_init(&conn->client_read_buffer); grpc_slice_buffer_init(&conn->client_deferred_write_buffer); + conn->client_is_writing = false; grpc_slice_buffer_init(&conn->client_write_buffer); grpc_slice_buffer_init(&conn->server_read_buffer); grpc_slice_buffer_init(&conn->server_deferred_write_buffer); + conn->server_is_writing = false; grpc_slice_buffer_init(&conn->server_write_buffer); grpc_http_parser_init(&conn->http_parser, GRPC_HTTP_REQUEST, &conn->http_request); diff --git a/test/core/iomgr/timer_list_test.cc b/test/core/iomgr/timer_list_test.cc index 3041674bd7..a4a53a0e46 100644 --- a/test/core/iomgr/timer_list_test.cc +++ b/test/core/iomgr/timer_list_test.cc @@ -28,11 +28,12 @@ #include <grpc/support/log.h> #include "src/core/lib/debug/trace.h" #include "test/core/util/test_config.h" +#include "test/core/util/tracer_util.h" #define MAX_CB 30 -extern "C" grpc_tracer_flag grpc_timer_trace; -extern "C" grpc_tracer_flag grpc_timer_check_trace; +extern grpc_core::TraceFlag grpc_timer_trace; +extern grpc_core::TraceFlag grpc_timer_check_trace; static int cb_called[MAX_CB][2]; @@ -48,8 +49,8 @@ static void add_test(void) { gpr_log(GPR_INFO, "add_test"); grpc_timer_list_init(); - grpc_timer_trace.value = 1; - grpc_timer_check_trace.value = 1; + grpc_core::testing::grpc_tracer_enable_flag(&grpc_timer_trace); + grpc_core::testing::grpc_tracer_enable_flag(&grpc_timer_check_trace); memset(cb_called, 0, sizeof(cb_called)); grpc_millis start = grpc_core::ExecCtx::Get()->Now(); @@ -113,8 +114,8 @@ void destruction_test(void) { grpc_core::ExecCtx::Get()->TestOnlySetNow(0); grpc_timer_list_init(); - grpc_timer_trace.value = 1; - grpc_timer_check_trace.value = 1; + grpc_core::testing::grpc_tracer_enable_flag(&grpc_timer_trace); + grpc_core::testing::grpc_tracer_enable_flag(&grpc_timer_check_trace); memset(cb_called, 0, sizeof(cb_called)); grpc_timer_init( diff --git a/test/core/support/BUILD b/test/core/support/BUILD index 9d042fdc9f..69512cd9a9 100644 --- a/test/core/support/BUILD +++ b/test/core/support/BUILD @@ -139,6 +139,16 @@ grpc_cc_test( ) grpc_cc_test( + name = "manual_constructor_test", + srcs = ["manual_constructor_test.cc"], + language = "C++", + deps = [ + "//:gpr", + "//test/core/util:gpr_test_util", + ], +) + +grpc_cc_test( name = "spinlock_test", srcs = ["spinlock_test.cc"], language = "C++", diff --git a/test/core/support/manual_constructor_test.cc b/test/core/support/manual_constructor_test.cc new file mode 100644 index 0000000000..714f8b21a0 --- /dev/null +++ b/test/core/support/manual_constructor_test.cc @@ -0,0 +1,99 @@ +/* + * + * 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 of gpr synchronization support. */ + +#include "src/core/lib/support/manual_constructor.h" +#include <grpc/support/alloc.h> +#include <grpc/support/log.h> +#include <grpc/support/sync.h> +#include <grpc/support/thd.h> +#include <stdio.h> +#include <stdlib.h> +#include <cstring> +#include "src/core/lib/support/abstract.h" +#include "test/core/util/test_config.h" + +class A { + public: + A() {} + virtual ~A() {} + virtual const char* foo() { return "A_foo"; } + virtual const char* bar() { return "A_bar"; } + GRPC_ABSTRACT_BASE_CLASS +}; + +class B : public A { + public: + B() {} + ~B() {} + const char* foo() override { return "B_foo"; } + char get_junk() { return junk[0]; } + + private: + char junk[1000]; +}; + +class C : public B { + public: + C() {} + ~C() {} + virtual const char* bar() { return "C_bar"; } + char get_more_junk() { return more_junk[0]; } + + private: + char more_junk[1000]; +}; + +class D : public A { + public: + virtual const char* bar() { return "D_bar"; } +}; + +static void basic_test() { + grpc_core::PolymorphicManualConstructor<A, B> poly; + poly.Init<B>(); + GPR_ASSERT(!strcmp(poly->foo(), "B_foo")); + GPR_ASSERT(!strcmp(poly->bar(), "A_bar")); +} + +static void complex_test() { + grpc_core::PolymorphicManualConstructor<A, B, C, D> polyB; + polyB.Init<B>(); + GPR_ASSERT(!strcmp(polyB->foo(), "B_foo")); + GPR_ASSERT(!strcmp(polyB->bar(), "A_bar")); + + grpc_core::PolymorphicManualConstructor<A, B, C, D> polyC; + polyC.Init<C>(); + GPR_ASSERT(!strcmp(polyC->foo(), "B_foo")); + GPR_ASSERT(!strcmp(polyC->bar(), "C_bar")); + + grpc_core::PolymorphicManualConstructor<A, B, C, D> polyD; + polyD.Init<D>(); + GPR_ASSERT(!strcmp(polyD->foo(), "A_foo")); + GPR_ASSERT(!strcmp(polyD->bar(), "D_bar")); +} + +/* ------------------------------------------------- */ + +int main(int argc, char* argv[]) { + grpc_test_init(argc, argv); + basic_test(); + complex_test(); + return 0; +} diff --git a/test/core/surface/public_headers_must_be_c89.c b/test/core/surface/public_headers_must_be_c89.c index db9f902dbf..b5a83c8eed 100644 --- a/test/core/surface/public_headers_must_be_c89.c +++ b/test/core/surface/public_headers_must_be_c89.c @@ -66,288 +66,286 @@ #include <stdio.h> int main(int argc, char **argv) { - if(argc == 12345678) { - printf("%lx", (unsigned long) grpc_compression_algorithm_parse); - printf("%lx", (unsigned long) grpc_compression_algorithm_name); - printf("%lx", (unsigned long) grpc_stream_compression_algorithm_name); - printf("%lx", (unsigned long) grpc_compression_algorithm_for_level); - printf("%lx", (unsigned long) grpc_stream_compression_algorithm_for_level); - printf("%lx", (unsigned long) grpc_compression_options_init); - printf("%lx", (unsigned long) grpc_compression_options_enable_algorithm); - printf("%lx", (unsigned long) grpc_compression_options_disable_algorithm); - printf("%lx", (unsigned long) grpc_compression_options_is_algorithm_enabled); - printf("%lx", (unsigned long) grpc_compression_options_is_stream_compression_algorithm_enabled); - printf("%lx", (unsigned long) grpc_metadata_array_init); - printf("%lx", (unsigned long) grpc_metadata_array_destroy); - printf("%lx", (unsigned long) grpc_call_details_init); - printf("%lx", (unsigned long) grpc_call_details_destroy); - printf("%lx", (unsigned long) grpc_register_plugin); - printf("%lx", (unsigned long) grpc_init); - printf("%lx", (unsigned long) grpc_shutdown); - printf("%lx", (unsigned long) grpc_version_string); - printf("%lx", (unsigned long) grpc_g_stands_for); - printf("%lx", (unsigned long) grpc_completion_queue_factory_lookup); - printf("%lx", (unsigned long) grpc_completion_queue_create_for_next); - printf("%lx", (unsigned long) grpc_completion_queue_create_for_pluck); - printf("%lx", (unsigned long) grpc_completion_queue_create); - printf("%lx", (unsigned long) grpc_completion_queue_next); - printf("%lx", (unsigned long) grpc_completion_queue_pluck); - printf("%lx", (unsigned long) grpc_completion_queue_shutdown); - printf("%lx", (unsigned long) grpc_completion_queue_destroy); - printf("%lx", (unsigned long) grpc_completion_queue_thread_local_cache_init); - printf("%lx", (unsigned long) grpc_completion_queue_thread_local_cache_flush); - printf("%lx", (unsigned long) grpc_alarm_create); - printf("%lx", (unsigned long) grpc_alarm_set); - printf("%lx", (unsigned long) grpc_alarm_cancel); - printf("%lx", (unsigned long) grpc_alarm_destroy); - printf("%lx", (unsigned long) grpc_channel_check_connectivity_state); - printf("%lx", (unsigned long) grpc_channel_num_external_connectivity_watchers); - printf("%lx", (unsigned long) grpc_channel_watch_connectivity_state); - printf("%lx", (unsigned long) grpc_channel_support_connectivity_watcher); - printf("%lx", (unsigned long) grpc_channel_create_call); - printf("%lx", (unsigned long) grpc_channel_ping); - printf("%lx", (unsigned long) grpc_channel_register_call); - printf("%lx", (unsigned long) grpc_channel_create_registered_call); - printf("%lx", (unsigned long) grpc_call_arena_alloc); - printf("%lx", (unsigned long) grpc_call_start_batch); - printf("%lx", (unsigned long) grpc_call_get_peer); - printf("%lx", (unsigned long) grpc_census_call_set_context); - printf("%lx", (unsigned long) grpc_census_call_get_context); - printf("%lx", (unsigned long) grpc_channel_get_target); - printf("%lx", (unsigned long) grpc_channel_get_info); - printf("%lx", (unsigned long) grpc_insecure_channel_create); - printf("%lx", (unsigned long) grpc_lame_client_channel_create); - printf("%lx", (unsigned long) grpc_channel_destroy); - printf("%lx", (unsigned long) grpc_call_cancel); - printf("%lx", (unsigned long) grpc_call_cancel_with_status); - printf("%lx", (unsigned long) grpc_call_ref); - printf("%lx", (unsigned long) grpc_call_unref); - printf("%lx", (unsigned long) grpc_server_request_call); - printf("%lx", (unsigned long) grpc_server_register_method); - printf("%lx", (unsigned long) grpc_server_request_registered_call); - printf("%lx", (unsigned long) grpc_server_create); - printf("%lx", (unsigned long) grpc_server_register_completion_queue); - printf("%lx", (unsigned long) grpc_server_add_insecure_http2_port); - printf("%lx", (unsigned long) grpc_server_start); - printf("%lx", (unsigned long) grpc_server_shutdown_and_notify); - printf("%lx", (unsigned long) grpc_server_cancel_all_calls); - printf("%lx", (unsigned long) grpc_server_destroy); - printf("%lx", (unsigned long) grpc_tracer_set_enabled); - printf("%lx", (unsigned long) grpc_header_key_is_legal); - printf("%lx", (unsigned long) grpc_header_nonbin_value_is_legal); - printf("%lx", (unsigned long) grpc_is_binary_header); - printf("%lx", (unsigned long) grpc_call_error_to_string); - printf("%lx", (unsigned long) grpc_resource_quota_create); - printf("%lx", (unsigned long) grpc_resource_quota_ref); - printf("%lx", (unsigned long) grpc_resource_quota_unref); - printf("%lx", (unsigned long) grpc_resource_quota_resize); - printf("%lx", (unsigned long) grpc_resource_quota_arg_vtable); - printf("%lx", (unsigned long) grpc_auth_property_iterator_next); - printf("%lx", (unsigned long) grpc_auth_context_property_iterator); - printf("%lx", (unsigned long) grpc_auth_context_peer_identity); - printf("%lx", (unsigned long) grpc_auth_context_find_properties_by_name); - printf("%lx", (unsigned long) grpc_auth_context_peer_identity_property_name); - printf("%lx", (unsigned long) grpc_auth_context_peer_is_authenticated); - printf("%lx", (unsigned long) grpc_call_auth_context); - printf("%lx", (unsigned long) grpc_auth_context_release); - printf("%lx", (unsigned long) grpc_auth_context_add_property); - printf("%lx", (unsigned long) grpc_auth_context_add_cstring_property); - printf("%lx", (unsigned long) grpc_auth_context_set_peer_identity_property_name); - printf("%lx", (unsigned long) grpc_channel_credentials_release); - printf("%lx", (unsigned long) grpc_google_default_credentials_create); - printf("%lx", (unsigned long) grpc_set_ssl_roots_override_callback); - printf("%lx", (unsigned long) grpc_ssl_credentials_create); - printf("%lx", (unsigned long) grpc_call_credentials_release); - printf("%lx", (unsigned long) grpc_composite_channel_credentials_create); - printf("%lx", (unsigned long) grpc_composite_call_credentials_create); - printf("%lx", (unsigned long) grpc_google_compute_engine_credentials_create); - printf("%lx", (unsigned long) grpc_max_auth_token_lifetime); - printf("%lx", (unsigned long) grpc_service_account_jwt_access_credentials_create); - printf("%lx", (unsigned long) grpc_google_refresh_token_credentials_create); - printf("%lx", (unsigned long) grpc_access_token_credentials_create); - printf("%lx", (unsigned long) grpc_google_iam_credentials_create); - printf("%lx", (unsigned long) grpc_metadata_credentials_create_from_plugin); - printf("%lx", (unsigned long) grpc_secure_channel_create); - printf("%lx", (unsigned long) grpc_server_credentials_release); - printf("%lx", (unsigned long) grpc_ssl_server_certificate_config_create); - printf("%lx", (unsigned long) grpc_ssl_server_certificate_config_destroy); - printf("%lx", (unsigned long) grpc_ssl_server_credentials_create); - printf("%lx", (unsigned long) grpc_ssl_server_credentials_create_ex); - printf("%lx", (unsigned long) grpc_ssl_server_credentials_create_options_using_config); - printf("%lx", (unsigned long) grpc_ssl_server_credentials_create_options_using_config_fetcher); - printf("%lx", (unsigned long) grpc_ssl_server_credentials_options_destroy); - printf("%lx", (unsigned long) grpc_ssl_server_credentials_create_with_options); - printf("%lx", (unsigned long) grpc_server_add_secure_http2_port); - printf("%lx", (unsigned long) grpc_call_set_credentials); - printf("%lx", (unsigned long) grpc_server_credentials_set_auth_metadata_processor); - printf("%lx", (unsigned long) grpc_raw_byte_buffer_create); - printf("%lx", (unsigned long) grpc_raw_compressed_byte_buffer_create); - printf("%lx", (unsigned long) grpc_byte_buffer_copy); - printf("%lx", (unsigned long) grpc_byte_buffer_length); - printf("%lx", (unsigned long) grpc_byte_buffer_destroy); - printf("%lx", (unsigned long) grpc_byte_buffer_reader_init); - printf("%lx", (unsigned long) grpc_byte_buffer_reader_destroy); - printf("%lx", (unsigned long) grpc_byte_buffer_reader_next); - printf("%lx", (unsigned long) grpc_byte_buffer_reader_readall); - printf("%lx", (unsigned long) grpc_raw_byte_buffer_from_reader); - printf("%lx", (unsigned long) grpc_slice_ref); - printf("%lx", (unsigned long) grpc_slice_unref); - printf("%lx", (unsigned long) grpc_slice_copy); - printf("%lx", (unsigned long) grpc_slice_new); - printf("%lx", (unsigned long) grpc_slice_new_with_user_data); - printf("%lx", (unsigned long) grpc_slice_new_with_len); - printf("%lx", (unsigned long) grpc_slice_malloc); - printf("%lx", (unsigned long) grpc_slice_malloc_large); - printf("%lx", (unsigned long) grpc_slice_intern); - printf("%lx", (unsigned long) grpc_slice_from_copied_string); - printf("%lx", (unsigned long) grpc_slice_from_copied_buffer); - printf("%lx", (unsigned long) grpc_slice_from_static_string); - printf("%lx", (unsigned long) grpc_slice_from_static_buffer); - printf("%lx", (unsigned long) grpc_slice_sub); - printf("%lx", (unsigned long) grpc_slice_sub_no_ref); - printf("%lx", (unsigned long) grpc_slice_split_tail); - printf("%lx", (unsigned long) grpc_slice_split_tail_maybe_ref); - printf("%lx", (unsigned long) grpc_slice_split_head); - printf("%lx", (unsigned long) grpc_empty_slice); - printf("%lx", (unsigned long) grpc_slice_default_hash_impl); - printf("%lx", (unsigned long) grpc_slice_default_eq_impl); - printf("%lx", (unsigned long) grpc_slice_eq); - printf("%lx", (unsigned long) grpc_slice_cmp); - printf("%lx", (unsigned long) grpc_slice_str_cmp); - printf("%lx", (unsigned long) grpc_slice_buf_start_eq); - printf("%lx", (unsigned long) grpc_slice_rchr); - printf("%lx", (unsigned long) grpc_slice_chr); - printf("%lx", (unsigned long) grpc_slice_slice); - printf("%lx", (unsigned long) grpc_slice_hash); - printf("%lx", (unsigned long) grpc_slice_is_equivalent); - printf("%lx", (unsigned long) grpc_slice_dup); - printf("%lx", (unsigned long) grpc_slice_to_c_string); - printf("%lx", (unsigned long) grpc_slice_buffer_init); - printf("%lx", (unsigned long) grpc_slice_buffer_destroy); - printf("%lx", (unsigned long) grpc_slice_buffer_add); - printf("%lx", (unsigned long) grpc_slice_buffer_add_indexed); - printf("%lx", (unsigned long) grpc_slice_buffer_addn); - printf("%lx", (unsigned long) grpc_slice_buffer_tiny_add); - printf("%lx", (unsigned long) grpc_slice_buffer_pop); - printf("%lx", (unsigned long) grpc_slice_buffer_reset_and_unref); - printf("%lx", (unsigned long) grpc_slice_buffer_swap); - printf("%lx", (unsigned long) grpc_slice_buffer_move_into); - printf("%lx", (unsigned long) grpc_slice_buffer_trim_end); - printf("%lx", (unsigned long) grpc_slice_buffer_move_first); - printf("%lx", (unsigned long) grpc_slice_buffer_move_first_no_ref); - printf("%lx", (unsigned long) grpc_slice_buffer_move_first_into_buffer); - printf("%lx", (unsigned long) grpc_slice_buffer_take_first); - printf("%lx", (unsigned long) grpc_slice_buffer_undo_take_first); - printf("%lx", (unsigned long) gpr_malloc); - printf("%lx", (unsigned long) gpr_zalloc); - printf("%lx", (unsigned long) gpr_free); - printf("%lx", (unsigned long) gpr_realloc); - printf("%lx", (unsigned long) gpr_malloc_aligned); - printf("%lx", (unsigned long) gpr_free_aligned); - printf("%lx", (unsigned long) gpr_set_allocation_functions); - printf("%lx", (unsigned long) gpr_get_allocation_functions); - printf("%lx", (unsigned long) gpr_avl_create); - printf("%lx", (unsigned long) gpr_avl_ref); - printf("%lx", (unsigned long) gpr_avl_unref); - printf("%lx", (unsigned long) gpr_avl_add); - printf("%lx", (unsigned long) gpr_avl_remove); - printf("%lx", (unsigned long) gpr_avl_get); - printf("%lx", (unsigned long) gpr_avl_maybe_get); - printf("%lx", (unsigned long) gpr_avl_is_empty); - printf("%lx", (unsigned long) gpr_cmdline_create); - printf("%lx", (unsigned long) gpr_cmdline_add_int); - printf("%lx", (unsigned long) gpr_cmdline_add_flag); - printf("%lx", (unsigned long) gpr_cmdline_add_string); - printf("%lx", (unsigned long) gpr_cmdline_on_extra_arg); - printf("%lx", (unsigned long) gpr_cmdline_set_survive_failure); - printf("%lx", (unsigned long) gpr_cmdline_parse); - printf("%lx", (unsigned long) gpr_cmdline_destroy); - printf("%lx", (unsigned long) gpr_cmdline_usage_string); - printf("%lx", (unsigned long) gpr_cpu_num_cores); - printf("%lx", (unsigned long) gpr_cpu_current_cpu); - printf("%lx", (unsigned long) gpr_histogram_create); - printf("%lx", (unsigned long) gpr_histogram_destroy); - printf("%lx", (unsigned long) gpr_histogram_add); - printf("%lx", (unsigned long) gpr_histogram_merge); - printf("%lx", (unsigned long) gpr_histogram_percentile); - printf("%lx", (unsigned long) gpr_histogram_mean); - printf("%lx", (unsigned long) gpr_histogram_stddev); - printf("%lx", (unsigned long) gpr_histogram_variance); - printf("%lx", (unsigned long) gpr_histogram_maximum); - printf("%lx", (unsigned long) gpr_histogram_minimum); - printf("%lx", (unsigned long) gpr_histogram_count); - printf("%lx", (unsigned long) gpr_histogram_sum); - printf("%lx", (unsigned long) gpr_histogram_sum_of_squares); - printf("%lx", (unsigned long) gpr_histogram_get_contents); - printf("%lx", (unsigned long) gpr_histogram_merge_contents); - printf("%lx", (unsigned long) gpr_join_host_port); - printf("%lx", (unsigned long) gpr_split_host_port); - printf("%lx", (unsigned long) gpr_log_severity_string); - printf("%lx", (unsigned long) gpr_log); - printf("%lx", (unsigned long) gpr_log_message); - printf("%lx", (unsigned long) gpr_set_log_verbosity); - printf("%lx", (unsigned long) gpr_log_verbosity_init); - printf("%lx", (unsigned long) gpr_set_log_function); - printf("%lx", (unsigned long) gpr_strdup); - printf("%lx", (unsigned long) gpr_asprintf); - printf("%lx", (unsigned long) gpr_subprocess_binary_extension); - printf("%lx", (unsigned long) gpr_subprocess_create); - printf("%lx", (unsigned long) gpr_subprocess_destroy); - printf("%lx", (unsigned long) gpr_subprocess_join); - printf("%lx", (unsigned long) gpr_subprocess_interrupt); - printf("%lx", (unsigned long) gpr_mu_init); - printf("%lx", (unsigned long) gpr_mu_destroy); - printf("%lx", (unsigned long) gpr_mu_lock); - printf("%lx", (unsigned long) gpr_mu_unlock); - printf("%lx", (unsigned long) gpr_mu_trylock); - printf("%lx", (unsigned long) gpr_cv_init); - printf("%lx", (unsigned long) gpr_cv_destroy); - printf("%lx", (unsigned long) gpr_cv_wait); - printf("%lx", (unsigned long) gpr_cv_signal); - printf("%lx", (unsigned long) gpr_cv_broadcast); - printf("%lx", (unsigned long) gpr_once_init); - printf("%lx", (unsigned long) gpr_event_init); - printf("%lx", (unsigned long) gpr_event_set); - printf("%lx", (unsigned long) gpr_event_get); - printf("%lx", (unsigned long) gpr_event_wait); - printf("%lx", (unsigned long) gpr_ref_init); - printf("%lx", (unsigned long) gpr_ref); - printf("%lx", (unsigned long) gpr_ref_non_zero); - printf("%lx", (unsigned long) gpr_refn); - printf("%lx", (unsigned long) gpr_unref); - printf("%lx", (unsigned long) gpr_ref_is_unique); - printf("%lx", (unsigned long) gpr_stats_init); - printf("%lx", (unsigned long) gpr_stats_inc); - printf("%lx", (unsigned long) gpr_stats_read); - printf("%lx", (unsigned long) gpr_thd_new); - printf("%lx", (unsigned long) gpr_thd_options_default); - printf("%lx", (unsigned long) gpr_thd_options_set_detached); - printf("%lx", (unsigned long) gpr_thd_options_set_joinable); - printf("%lx", (unsigned long) gpr_thd_options_is_detached); - printf("%lx", (unsigned long) gpr_thd_options_is_joinable); - printf("%lx", (unsigned long) gpr_thd_currentid); - printf("%lx", (unsigned long) gpr_thd_join); - printf("%lx", (unsigned long) gpr_time_0); - printf("%lx", (unsigned long) gpr_inf_future); - printf("%lx", (unsigned long) gpr_inf_past); - printf("%lx", (unsigned long) gpr_time_init); - printf("%lx", (unsigned long) gpr_now); - printf("%lx", (unsigned long) gpr_convert_clock_type); - printf("%lx", (unsigned long) gpr_time_cmp); - printf("%lx", (unsigned long) gpr_time_max); - printf("%lx", (unsigned long) gpr_time_min); - printf("%lx", (unsigned long) gpr_time_add); - printf("%lx", (unsigned long) gpr_time_sub); - printf("%lx", (unsigned long) gpr_time_from_micros); - printf("%lx", (unsigned long) gpr_time_from_nanos); - printf("%lx", (unsigned long) gpr_time_from_millis); - printf("%lx", (unsigned long) gpr_time_from_seconds); - printf("%lx", (unsigned long) gpr_time_from_minutes); - printf("%lx", (unsigned long) gpr_time_from_hours); - printf("%lx", (unsigned long) gpr_time_to_millis); - printf("%lx", (unsigned long) gpr_time_similar); - printf("%lx", (unsigned long) gpr_sleep_until); - printf("%lx", (unsigned long) gpr_timespec_to_micros); - } + printf("%lx", (unsigned long) grpc_compression_algorithm_parse); + printf("%lx", (unsigned long) grpc_compression_algorithm_name); + printf("%lx", (unsigned long) grpc_stream_compression_algorithm_name); + printf("%lx", (unsigned long) grpc_compression_algorithm_for_level); + printf("%lx", (unsigned long) grpc_stream_compression_algorithm_for_level); + printf("%lx", (unsigned long) grpc_compression_options_init); + printf("%lx", (unsigned long) grpc_compression_options_enable_algorithm); + printf("%lx", (unsigned long) grpc_compression_options_disable_algorithm); + printf("%lx", (unsigned long) grpc_compression_options_is_algorithm_enabled); + printf("%lx", (unsigned long) grpc_compression_options_is_stream_compression_algorithm_enabled); + printf("%lx", (unsigned long) grpc_metadata_array_init); + printf("%lx", (unsigned long) grpc_metadata_array_destroy); + printf("%lx", (unsigned long) grpc_call_details_init); + printf("%lx", (unsigned long) grpc_call_details_destroy); + printf("%lx", (unsigned long) grpc_register_plugin); + printf("%lx", (unsigned long) grpc_init); + printf("%lx", (unsigned long) grpc_shutdown); + printf("%lx", (unsigned long) grpc_version_string); + printf("%lx", (unsigned long) grpc_g_stands_for); + printf("%lx", (unsigned long) grpc_completion_queue_factory_lookup); + printf("%lx", (unsigned long) grpc_completion_queue_create_for_next); + printf("%lx", (unsigned long) grpc_completion_queue_create_for_pluck); + printf("%lx", (unsigned long) grpc_completion_queue_create); + printf("%lx", (unsigned long) grpc_completion_queue_next); + printf("%lx", (unsigned long) grpc_completion_queue_pluck); + printf("%lx", (unsigned long) grpc_completion_queue_shutdown); + printf("%lx", (unsigned long) grpc_completion_queue_destroy); + printf("%lx", (unsigned long) grpc_completion_queue_thread_local_cache_init); + printf("%lx", (unsigned long) grpc_completion_queue_thread_local_cache_flush); + printf("%lx", (unsigned long) grpc_alarm_create); + printf("%lx", (unsigned long) grpc_alarm_set); + printf("%lx", (unsigned long) grpc_alarm_cancel); + printf("%lx", (unsigned long) grpc_alarm_destroy); + printf("%lx", (unsigned long) grpc_channel_check_connectivity_state); + printf("%lx", (unsigned long) grpc_channel_num_external_connectivity_watchers); + printf("%lx", (unsigned long) grpc_channel_watch_connectivity_state); + printf("%lx", (unsigned long) grpc_channel_support_connectivity_watcher); + printf("%lx", (unsigned long) grpc_channel_create_call); + printf("%lx", (unsigned long) grpc_channel_ping); + printf("%lx", (unsigned long) grpc_channel_register_call); + printf("%lx", (unsigned long) grpc_channel_create_registered_call); + printf("%lx", (unsigned long) grpc_call_arena_alloc); + printf("%lx", (unsigned long) grpc_call_start_batch); + printf("%lx", (unsigned long) grpc_call_get_peer); + printf("%lx", (unsigned long) grpc_census_call_set_context); + printf("%lx", (unsigned long) grpc_census_call_get_context); + printf("%lx", (unsigned long) grpc_channel_get_target); + printf("%lx", (unsigned long) grpc_channel_get_info); + printf("%lx", (unsigned long) grpc_insecure_channel_create); + printf("%lx", (unsigned long) grpc_lame_client_channel_create); + printf("%lx", (unsigned long) grpc_channel_destroy); + printf("%lx", (unsigned long) grpc_call_cancel); + printf("%lx", (unsigned long) grpc_call_cancel_with_status); + printf("%lx", (unsigned long) grpc_call_ref); + printf("%lx", (unsigned long) grpc_call_unref); + printf("%lx", (unsigned long) grpc_server_request_call); + printf("%lx", (unsigned long) grpc_server_register_method); + printf("%lx", (unsigned long) grpc_server_request_registered_call); + printf("%lx", (unsigned long) grpc_server_create); + printf("%lx", (unsigned long) grpc_server_register_completion_queue); + printf("%lx", (unsigned long) grpc_server_add_insecure_http2_port); + printf("%lx", (unsigned long) grpc_server_start); + printf("%lx", (unsigned long) grpc_server_shutdown_and_notify); + printf("%lx", (unsigned long) grpc_server_cancel_all_calls); + printf("%lx", (unsigned long) grpc_server_destroy); + printf("%lx", (unsigned long) grpc_tracer_set_enabled); + printf("%lx", (unsigned long) grpc_header_key_is_legal); + printf("%lx", (unsigned long) grpc_header_nonbin_value_is_legal); + printf("%lx", (unsigned long) grpc_is_binary_header); + printf("%lx", (unsigned long) grpc_call_error_to_string); + printf("%lx", (unsigned long) grpc_resource_quota_create); + printf("%lx", (unsigned long) grpc_resource_quota_ref); + printf("%lx", (unsigned long) grpc_resource_quota_unref); + printf("%lx", (unsigned long) grpc_resource_quota_resize); + printf("%lx", (unsigned long) grpc_resource_quota_arg_vtable); + printf("%lx", (unsigned long) grpc_auth_property_iterator_next); + printf("%lx", (unsigned long) grpc_auth_context_property_iterator); + printf("%lx", (unsigned long) grpc_auth_context_peer_identity); + printf("%lx", (unsigned long) grpc_auth_context_find_properties_by_name); + printf("%lx", (unsigned long) grpc_auth_context_peer_identity_property_name); + printf("%lx", (unsigned long) grpc_auth_context_peer_is_authenticated); + printf("%lx", (unsigned long) grpc_call_auth_context); + printf("%lx", (unsigned long) grpc_auth_context_release); + printf("%lx", (unsigned long) grpc_auth_context_add_property); + printf("%lx", (unsigned long) grpc_auth_context_add_cstring_property); + printf("%lx", (unsigned long) grpc_auth_context_set_peer_identity_property_name); + printf("%lx", (unsigned long) grpc_channel_credentials_release); + printf("%lx", (unsigned long) grpc_google_default_credentials_create); + printf("%lx", (unsigned long) grpc_set_ssl_roots_override_callback); + printf("%lx", (unsigned long) grpc_ssl_credentials_create); + printf("%lx", (unsigned long) grpc_call_credentials_release); + printf("%lx", (unsigned long) grpc_composite_channel_credentials_create); + printf("%lx", (unsigned long) grpc_composite_call_credentials_create); + printf("%lx", (unsigned long) grpc_google_compute_engine_credentials_create); + printf("%lx", (unsigned long) grpc_max_auth_token_lifetime); + printf("%lx", (unsigned long) grpc_service_account_jwt_access_credentials_create); + printf("%lx", (unsigned long) grpc_google_refresh_token_credentials_create); + printf("%lx", (unsigned long) grpc_access_token_credentials_create); + printf("%lx", (unsigned long) grpc_google_iam_credentials_create); + printf("%lx", (unsigned long) grpc_metadata_credentials_create_from_plugin); + printf("%lx", (unsigned long) grpc_secure_channel_create); + printf("%lx", (unsigned long) grpc_server_credentials_release); + printf("%lx", (unsigned long) grpc_ssl_server_certificate_config_create); + printf("%lx", (unsigned long) grpc_ssl_server_certificate_config_destroy); + printf("%lx", (unsigned long) grpc_ssl_server_credentials_create); + printf("%lx", (unsigned long) grpc_ssl_server_credentials_create_ex); + printf("%lx", (unsigned long) grpc_ssl_server_credentials_create_options_using_config); + printf("%lx", (unsigned long) grpc_ssl_server_credentials_create_options_using_config_fetcher); + printf("%lx", (unsigned long) grpc_ssl_server_credentials_options_destroy); + printf("%lx", (unsigned long) grpc_ssl_server_credentials_create_with_options); + printf("%lx", (unsigned long) grpc_server_add_secure_http2_port); + printf("%lx", (unsigned long) grpc_call_set_credentials); + printf("%lx", (unsigned long) grpc_server_credentials_set_auth_metadata_processor); + printf("%lx", (unsigned long) grpc_raw_byte_buffer_create); + printf("%lx", (unsigned long) grpc_raw_compressed_byte_buffer_create); + printf("%lx", (unsigned long) grpc_byte_buffer_copy); + printf("%lx", (unsigned long) grpc_byte_buffer_length); + printf("%lx", (unsigned long) grpc_byte_buffer_destroy); + printf("%lx", (unsigned long) grpc_byte_buffer_reader_init); + printf("%lx", (unsigned long) grpc_byte_buffer_reader_destroy); + printf("%lx", (unsigned long) grpc_byte_buffer_reader_next); + printf("%lx", (unsigned long) grpc_byte_buffer_reader_readall); + printf("%lx", (unsigned long) grpc_raw_byte_buffer_from_reader); + printf("%lx", (unsigned long) grpc_slice_ref); + printf("%lx", (unsigned long) grpc_slice_unref); + printf("%lx", (unsigned long) grpc_slice_copy); + printf("%lx", (unsigned long) grpc_slice_new); + printf("%lx", (unsigned long) grpc_slice_new_with_user_data); + printf("%lx", (unsigned long) grpc_slice_new_with_len); + printf("%lx", (unsigned long) grpc_slice_malloc); + printf("%lx", (unsigned long) grpc_slice_malloc_large); + printf("%lx", (unsigned long) grpc_slice_intern); + printf("%lx", (unsigned long) grpc_slice_from_copied_string); + printf("%lx", (unsigned long) grpc_slice_from_copied_buffer); + printf("%lx", (unsigned long) grpc_slice_from_static_string); + printf("%lx", (unsigned long) grpc_slice_from_static_buffer); + printf("%lx", (unsigned long) grpc_slice_sub); + printf("%lx", (unsigned long) grpc_slice_sub_no_ref); + printf("%lx", (unsigned long) grpc_slice_split_tail); + printf("%lx", (unsigned long) grpc_slice_split_tail_maybe_ref); + printf("%lx", (unsigned long) grpc_slice_split_head); + printf("%lx", (unsigned long) grpc_empty_slice); + printf("%lx", (unsigned long) grpc_slice_default_hash_impl); + printf("%lx", (unsigned long) grpc_slice_default_eq_impl); + printf("%lx", (unsigned long) grpc_slice_eq); + printf("%lx", (unsigned long) grpc_slice_cmp); + printf("%lx", (unsigned long) grpc_slice_str_cmp); + printf("%lx", (unsigned long) grpc_slice_buf_start_eq); + printf("%lx", (unsigned long) grpc_slice_rchr); + printf("%lx", (unsigned long) grpc_slice_chr); + printf("%lx", (unsigned long) grpc_slice_slice); + printf("%lx", (unsigned long) grpc_slice_hash); + printf("%lx", (unsigned long) grpc_slice_is_equivalent); + printf("%lx", (unsigned long) grpc_slice_dup); + printf("%lx", (unsigned long) grpc_slice_to_c_string); + printf("%lx", (unsigned long) grpc_slice_buffer_init); + printf("%lx", (unsigned long) grpc_slice_buffer_destroy); + printf("%lx", (unsigned long) grpc_slice_buffer_add); + printf("%lx", (unsigned long) grpc_slice_buffer_add_indexed); + printf("%lx", (unsigned long) grpc_slice_buffer_addn); + printf("%lx", (unsigned long) grpc_slice_buffer_tiny_add); + printf("%lx", (unsigned long) grpc_slice_buffer_pop); + printf("%lx", (unsigned long) grpc_slice_buffer_reset_and_unref); + printf("%lx", (unsigned long) grpc_slice_buffer_swap); + printf("%lx", (unsigned long) grpc_slice_buffer_move_into); + printf("%lx", (unsigned long) grpc_slice_buffer_trim_end); + printf("%lx", (unsigned long) grpc_slice_buffer_move_first); + printf("%lx", (unsigned long) grpc_slice_buffer_move_first_no_ref); + printf("%lx", (unsigned long) grpc_slice_buffer_move_first_into_buffer); + printf("%lx", (unsigned long) grpc_slice_buffer_take_first); + printf("%lx", (unsigned long) grpc_slice_buffer_undo_take_first); + printf("%lx", (unsigned long) gpr_malloc); + printf("%lx", (unsigned long) gpr_zalloc); + printf("%lx", (unsigned long) gpr_free); + printf("%lx", (unsigned long) gpr_realloc); + printf("%lx", (unsigned long) gpr_malloc_aligned); + printf("%lx", (unsigned long) gpr_free_aligned); + printf("%lx", (unsigned long) gpr_set_allocation_functions); + printf("%lx", (unsigned long) gpr_get_allocation_functions); + printf("%lx", (unsigned long) gpr_avl_create); + printf("%lx", (unsigned long) gpr_avl_ref); + printf("%lx", (unsigned long) gpr_avl_unref); + printf("%lx", (unsigned long) gpr_avl_add); + printf("%lx", (unsigned long) gpr_avl_remove); + printf("%lx", (unsigned long) gpr_avl_get); + printf("%lx", (unsigned long) gpr_avl_maybe_get); + printf("%lx", (unsigned long) gpr_avl_is_empty); + printf("%lx", (unsigned long) gpr_cmdline_create); + printf("%lx", (unsigned long) gpr_cmdline_add_int); + printf("%lx", (unsigned long) gpr_cmdline_add_flag); + printf("%lx", (unsigned long) gpr_cmdline_add_string); + printf("%lx", (unsigned long) gpr_cmdline_on_extra_arg); + printf("%lx", (unsigned long) gpr_cmdline_set_survive_failure); + printf("%lx", (unsigned long) gpr_cmdline_parse); + printf("%lx", (unsigned long) gpr_cmdline_destroy); + printf("%lx", (unsigned long) gpr_cmdline_usage_string); + printf("%lx", (unsigned long) gpr_cpu_num_cores); + printf("%lx", (unsigned long) gpr_cpu_current_cpu); + printf("%lx", (unsigned long) gpr_histogram_create); + printf("%lx", (unsigned long) gpr_histogram_destroy); + printf("%lx", (unsigned long) gpr_histogram_add); + printf("%lx", (unsigned long) gpr_histogram_merge); + printf("%lx", (unsigned long) gpr_histogram_percentile); + printf("%lx", (unsigned long) gpr_histogram_mean); + printf("%lx", (unsigned long) gpr_histogram_stddev); + printf("%lx", (unsigned long) gpr_histogram_variance); + printf("%lx", (unsigned long) gpr_histogram_maximum); + printf("%lx", (unsigned long) gpr_histogram_minimum); + printf("%lx", (unsigned long) gpr_histogram_count); + printf("%lx", (unsigned long) gpr_histogram_sum); + printf("%lx", (unsigned long) gpr_histogram_sum_of_squares); + printf("%lx", (unsigned long) gpr_histogram_get_contents); + printf("%lx", (unsigned long) gpr_histogram_merge_contents); + printf("%lx", (unsigned long) gpr_join_host_port); + printf("%lx", (unsigned long) gpr_split_host_port); + printf("%lx", (unsigned long) gpr_log_severity_string); + printf("%lx", (unsigned long) gpr_log); + printf("%lx", (unsigned long) gpr_log_message); + printf("%lx", (unsigned long) gpr_set_log_verbosity); + printf("%lx", (unsigned long) gpr_log_verbosity_init); + printf("%lx", (unsigned long) gpr_set_log_function); + printf("%lx", (unsigned long) gpr_strdup); + printf("%lx", (unsigned long) gpr_asprintf); + printf("%lx", (unsigned long) gpr_subprocess_binary_extension); + printf("%lx", (unsigned long) gpr_subprocess_create); + printf("%lx", (unsigned long) gpr_subprocess_destroy); + printf("%lx", (unsigned long) gpr_subprocess_join); + printf("%lx", (unsigned long) gpr_subprocess_interrupt); + printf("%lx", (unsigned long) gpr_mu_init); + printf("%lx", (unsigned long) gpr_mu_destroy); + printf("%lx", (unsigned long) gpr_mu_lock); + printf("%lx", (unsigned long) gpr_mu_unlock); + printf("%lx", (unsigned long) gpr_mu_trylock); + printf("%lx", (unsigned long) gpr_cv_init); + printf("%lx", (unsigned long) gpr_cv_destroy); + printf("%lx", (unsigned long) gpr_cv_wait); + printf("%lx", (unsigned long) gpr_cv_signal); + printf("%lx", (unsigned long) gpr_cv_broadcast); + printf("%lx", (unsigned long) gpr_once_init); + printf("%lx", (unsigned long) gpr_event_init); + printf("%lx", (unsigned long) gpr_event_set); + printf("%lx", (unsigned long) gpr_event_get); + printf("%lx", (unsigned long) gpr_event_wait); + printf("%lx", (unsigned long) gpr_ref_init); + printf("%lx", (unsigned long) gpr_ref); + printf("%lx", (unsigned long) gpr_ref_non_zero); + printf("%lx", (unsigned long) gpr_refn); + printf("%lx", (unsigned long) gpr_unref); + printf("%lx", (unsigned long) gpr_ref_is_unique); + printf("%lx", (unsigned long) gpr_stats_init); + printf("%lx", (unsigned long) gpr_stats_inc); + printf("%lx", (unsigned long) gpr_stats_read); + printf("%lx", (unsigned long) gpr_thd_new); + printf("%lx", (unsigned long) gpr_thd_options_default); + printf("%lx", (unsigned long) gpr_thd_options_set_detached); + printf("%lx", (unsigned long) gpr_thd_options_set_joinable); + printf("%lx", (unsigned long) gpr_thd_options_is_detached); + printf("%lx", (unsigned long) gpr_thd_options_is_joinable); + printf("%lx", (unsigned long) gpr_thd_currentid); + printf("%lx", (unsigned long) gpr_thd_join); + printf("%lx", (unsigned long) gpr_time_0); + printf("%lx", (unsigned long) gpr_inf_future); + printf("%lx", (unsigned long) gpr_inf_past); + printf("%lx", (unsigned long) gpr_time_init); + printf("%lx", (unsigned long) gpr_now); + printf("%lx", (unsigned long) gpr_convert_clock_type); + printf("%lx", (unsigned long) gpr_time_cmp); + printf("%lx", (unsigned long) gpr_time_max); + printf("%lx", (unsigned long) gpr_time_min); + printf("%lx", (unsigned long) gpr_time_add); + printf("%lx", (unsigned long) gpr_time_sub); + printf("%lx", (unsigned long) gpr_time_from_micros); + printf("%lx", (unsigned long) gpr_time_from_nanos); + printf("%lx", (unsigned long) gpr_time_from_millis); + printf("%lx", (unsigned long) gpr_time_from_seconds); + printf("%lx", (unsigned long) gpr_time_from_minutes); + printf("%lx", (unsigned long) gpr_time_from_hours); + printf("%lx", (unsigned long) gpr_time_to_millis); + printf("%lx", (unsigned long) gpr_time_similar); + printf("%lx", (unsigned long) gpr_sleep_until); + printf("%lx", (unsigned long) gpr_timespec_to_micros); return 0; } diff --git a/test/core/transport/connectivity_state_test.cc b/test/core/transport/connectivity_state_test.cc index 06bb093d32..feb603cd23 100644 --- a/test/core/transport/connectivity_state_test.cc +++ b/test/core/transport/connectivity_state_test.cc @@ -23,6 +23,7 @@ #include <grpc/support/log.h> #include "test/core/util/test_config.h" +#include "test/core/util/tracer_util.h" #define THE_ARG ((void*)(size_t)0xcafebabe) @@ -132,7 +133,7 @@ static void test_subscribe_with_failure_then_destroy(void) { int main(int argc, char** argv) { grpc_test_init(argc, argv); - grpc_connectivity_state_trace.value = 1; + grpc_core::testing::grpc_tracer_enable_flag(&grpc_connectivity_state_trace); test_connectivity_state_name(); test_check(); test_subscribe_then_unsubscribe(); diff --git a/test/core/util/BUILD b/test/core/util/BUILD index 2437923435..6443553466 100644 --- a/test/core/util/BUILD +++ b/test/core/util/BUILD @@ -57,6 +57,7 @@ grpc_cc_library( "reconnect_server.cc", "slice_splitter.cc", "test_tcp_server.cc", + "tracer_util.cc", "trickle_endpoint.cc", ], hdrs = [ @@ -69,6 +70,7 @@ grpc_cc_library( "reconnect_server.h", "slice_splitter.h", "test_tcp_server.h", + "tracer_util.h", "trickle_endpoint.h", ], language = "C++", diff --git a/test/core/util/tracer_util.cc b/test/core/util/tracer_util.cc new file mode 100644 index 0000000000..34a132daa7 --- /dev/null +++ b/test/core/util/tracer_util.cc @@ -0,0 +1,31 @@ +/* + * + * 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. + * + */ + +#include "test/core/util/test_config.h" + +#include "src/core/lib/debug/trace.h" + +namespace grpc_core { +namespace testing { + +void grpc_tracer_enable_flag(grpc_core::TraceFlag* flag) { + flag->set_enabled(1); +} + +} // namespace testing +} // namespace grpc_core diff --git a/test/core/util/tracer_util.h b/test/core/util/tracer_util.h new file mode 100644 index 0000000000..0b432ffa46 --- /dev/null +++ b/test/core/util/tracer_util.h @@ -0,0 +1,32 @@ +/* + * + * 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. + * + */ + +#ifndef GRPC_TEST_CORE_UTIL_TRACER_UTIL_H +#define GRPC_TEST_CORE_UTIL_TRACER_UTIL_H + +namespace grpc_core { +class TraceFlag; + +namespace testing { +// enables the TraceFlag passed to it. Used for testing purposes. +void grpc_tracer_enable_flag(grpc_core::TraceFlag* flag); + +} // namespace testing +} // namespace grpc_core + +#endif /* GRPC_TEST_CORE_UTIL_TRACER_UTIL_H */ |