diff options
author | Yash Tibrewal <yashkt@google.com> | 2017-11-14 18:11:22 -0800 |
---|---|---|
committer | Yash Tibrewal <yashkt@google.com> | 2017-11-14 18:11:22 -0800 |
commit | 6c26b16fe06b1cc75b4dac372f4f51f6b7d1bfc0 (patch) | |
tree | 5d9b7bbdcf125bfc103b67778349ea075b049bb4 /test/core/security | |
parent | 75122c23578e24417dcf64081c737571a9fc2dbc (diff) |
Move ExecCtx to grpc_core namespace. Make exec_ctx a private static in ExecCtx and some minor changes
Diffstat (limited to 'test/core/security')
-rw-r--r-- | test/core/security/credentials_test.cc | 70 | ||||
-rw-r--r-- | test/core/security/json_token_test.cc | 4 | ||||
-rw-r--r-- | test/core/security/jwt_verifier_test.cc | 26 | ||||
-rw-r--r-- | test/core/security/oauth2_utils.cc | 4 | ||||
-rw-r--r-- | test/core/security/print_google_default_creds_token.cc | 4 | ||||
-rw-r--r-- | test/core/security/secure_endpoint_test.cc | 6 | ||||
-rw-r--r-- | test/core/security/ssl_server_fuzzer.cc | 10 | ||||
-rw-r--r-- | test/core/security/verify_jwt.cc | 4 |
8 files changed, 64 insertions, 64 deletions
diff --git a/test/core/security/credentials_test.cc b/test/core/security/credentials_test.cc index 029171c931..639f4e5056 100644 --- a/test/core/security/credentials_test.cc +++ b/test/core/security/credentials_test.cc @@ -148,7 +148,7 @@ static grpc_httpcli_response http_response(int status, const char* body) { /* -- Tests. -- */ static void test_empty_md_array(void) { - ExecCtx _local_exec_ctx; + grpc_core::ExecCtx _local_exec_ctx; grpc_credentials_mdelem_array md_array; memset(&md_array, 0, sizeof(md_array)); GPR_ASSERT(md_array.md == NULL); @@ -157,7 +157,7 @@ static void test_empty_md_array(void) { } static void test_add_to_empty_md_array(void) { - ExecCtx _local_exec_ctx; + grpc_core::ExecCtx _local_exec_ctx; grpc_credentials_mdelem_array md_array; memset(&md_array, 0, sizeof(md_array)); const char* key = "hello"; @@ -172,7 +172,7 @@ static void test_add_to_empty_md_array(void) { } static void test_add_abunch_to_md_array(void) { - ExecCtx _local_exec_ctx; + grpc_core::ExecCtx _local_exec_ctx; grpc_credentials_mdelem_array md_array; memset(&md_array, 0, sizeof(md_array)); const char* key = "hello"; @@ -191,7 +191,7 @@ static void test_add_abunch_to_md_array(void) { } static void test_oauth2_token_fetcher_creds_parsing_ok(void) { - ExecCtx _local_exec_ctx; + grpc_core::ExecCtx _local_exec_ctx; grpc_mdelem token_md = GRPC_MDNULL; grpc_millis token_lifetime; grpc_httpcli_response response = @@ -208,7 +208,7 @@ static void test_oauth2_token_fetcher_creds_parsing_ok(void) { } static void test_oauth2_token_fetcher_creds_parsing_bad_http_status(void) { - ExecCtx _local_exec_ctx; + grpc_core::ExecCtx _local_exec_ctx; grpc_mdelem token_md = GRPC_MDNULL; grpc_millis token_lifetime; grpc_httpcli_response response = @@ -220,7 +220,7 @@ static void test_oauth2_token_fetcher_creds_parsing_bad_http_status(void) { } static void test_oauth2_token_fetcher_creds_parsing_empty_http_body(void) { - ExecCtx _local_exec_ctx; + grpc_core::ExecCtx _local_exec_ctx; grpc_mdelem token_md = GRPC_MDNULL; grpc_millis token_lifetime; grpc_httpcli_response response = http_response(200, ""); @@ -231,7 +231,7 @@ static void test_oauth2_token_fetcher_creds_parsing_empty_http_body(void) { } static void test_oauth2_token_fetcher_creds_parsing_invalid_json(void) { - ExecCtx _local_exec_ctx; + grpc_core::ExecCtx _local_exec_ctx; grpc_mdelem token_md = GRPC_MDNULL; grpc_millis token_lifetime; grpc_httpcli_response response = @@ -246,7 +246,7 @@ static void test_oauth2_token_fetcher_creds_parsing_invalid_json(void) { } static void test_oauth2_token_fetcher_creds_parsing_missing_token(void) { - ExecCtx _local_exec_ctx; + grpc_core::ExecCtx _local_exec_ctx; grpc_mdelem token_md = GRPC_MDNULL; grpc_millis token_lifetime; grpc_httpcli_response response = http_response(200, @@ -260,7 +260,7 @@ static void test_oauth2_token_fetcher_creds_parsing_missing_token(void) { } static void test_oauth2_token_fetcher_creds_parsing_missing_token_type(void) { - ExecCtx _local_exec_ctx; + grpc_core::ExecCtx _local_exec_ctx; grpc_mdelem token_md = GRPC_MDNULL; grpc_millis token_lifetime; grpc_httpcli_response response = @@ -276,7 +276,7 @@ static void test_oauth2_token_fetcher_creds_parsing_missing_token_type(void) { static void test_oauth2_token_fetcher_creds_parsing_missing_token_lifetime( void) { - ExecCtx _local_exec_ctx; + grpc_core::ExecCtx _local_exec_ctx; grpc_mdelem token_md = GRPC_MDNULL; grpc_millis token_lifetime; grpc_httpcli_response response = @@ -378,7 +378,7 @@ static void run_request_metadata_test(grpc_call_credentials* creds, } static void test_google_iam_creds(void) { - ExecCtx _local_exec_ctx; + grpc_core::ExecCtx _local_exec_ctx; expected_md emd[] = {{GRPC_IAM_AUTHORIZATION_TOKEN_METADATA_KEY, test_google_iam_authorization_token}, {GRPC_IAM_AUTHORITY_SELECTOR_METADATA_KEY, @@ -395,7 +395,7 @@ static void test_google_iam_creds(void) { } static void test_access_token_creds(void) { - ExecCtx _local_exec_ctx; + grpc_core::ExecCtx _local_exec_ctx; expected_md emd[] = {{GRPC_AUTHORIZATION_METADATA_KEY, "Bearer blah"}}; request_metadata_state* state = make_request_metadata_state(GRPC_ERROR_NONE, emd, GPR_ARRAY_SIZE(emd)); @@ -419,7 +419,7 @@ static grpc_security_status check_channel_oauth2_create_security_connector( } static void test_channel_oauth2_composite_creds(void) { - ExecCtx _local_exec_ctx; + grpc_core::ExecCtx _local_exec_ctx; grpc_channel_args* new_args; grpc_channel_credentials_vtable vtable = { NULL, check_channel_oauth2_create_security_connector, NULL}; @@ -439,7 +439,7 @@ static void test_channel_oauth2_composite_creds(void) { } static void test_oauth2_google_iam_composite_creds(void) { - ExecCtx _local_exec_ctx; + grpc_core::ExecCtx _local_exec_ctx; expected_md emd[] = { {GRPC_AUTHORIZATION_METADATA_KEY, test_oauth2_bearer_token}, {GRPC_IAM_AUTHORIZATION_TOKEN_METADATA_KEY, @@ -492,7 +492,7 @@ check_channel_oauth2_google_iam_create_security_connector( } static void test_channel_oauth2_google_iam_composite_creds(void) { - ExecCtx _local_exec_ctx; + grpc_core::ExecCtx _local_exec_ctx; grpc_channel_args* new_args; grpc_channel_credentials_vtable vtable = { NULL, check_channel_oauth2_google_iam_create_security_connector, NULL}; @@ -569,7 +569,7 @@ static int httpcli_get_should_not_be_called(const grpc_httpcli_request* request, } static void test_compute_engine_creds_success(void) { - ExecCtx _local_exec_ctx; + grpc_core::ExecCtx _local_exec_ctx; expected_md emd[] = { {"authorization", "Bearer ya29.AHES6ZRN3-HlhAPya30GnW_bHSb_"}}; grpc_call_credentials* creds = @@ -583,7 +583,7 @@ static void test_compute_engine_creds_success(void) { grpc_httpcli_set_override(compute_engine_httpcli_get_success_override, httpcli_post_should_not_be_called); run_request_metadata_test(creds, auth_md_ctx, state); - ExecCtx::Get()->Flush(); + grpc_core::ExecCtx::Get()->Flush(); /* Second request: the cached token should be served directly. */ state = @@ -591,14 +591,14 @@ static void test_compute_engine_creds_success(void) { grpc_httpcli_set_override(httpcli_get_should_not_be_called, httpcli_post_should_not_be_called); run_request_metadata_test(creds, auth_md_ctx, state); - ExecCtx::Get()->Flush(); + grpc_core::ExecCtx::Get()->Flush(); grpc_call_credentials_unref(creds); grpc_httpcli_set_override(NULL, NULL); } static void test_compute_engine_creds_failure(void) { - ExecCtx _local_exec_ctx; + grpc_core::ExecCtx _local_exec_ctx; request_metadata_state* state = make_request_metadata_state( GRPC_ERROR_CREATE_FROM_STATIC_STRING( "Error occured when fetching oauth2 token."), @@ -658,7 +658,7 @@ static int refresh_token_httpcli_post_failure( } static void test_refresh_token_creds_success(void) { - ExecCtx _local_exec_ctx; + grpc_core::ExecCtx _local_exec_ctx; expected_md emd[] = { {"authorization", "Bearer ya29.AHES6ZRN3-HlhAPya30GnW_bHSb_"}}; grpc_auth_metadata_context auth_md_ctx = {test_service_url, test_method, NULL, @@ -672,7 +672,7 @@ static void test_refresh_token_creds_success(void) { grpc_httpcli_set_override(httpcli_get_should_not_be_called, refresh_token_httpcli_post_success); run_request_metadata_test(creds, auth_md_ctx, state); - ExecCtx::Get()->Flush(); + grpc_core::ExecCtx::Get()->Flush(); /* Second request: the cached token should be served directly. */ state = @@ -680,14 +680,14 @@ static void test_refresh_token_creds_success(void) { grpc_httpcli_set_override(httpcli_get_should_not_be_called, httpcli_post_should_not_be_called); run_request_metadata_test(creds, auth_md_ctx, state); - ExecCtx::Get()->Flush(); + grpc_core::ExecCtx::Get()->Flush(); grpc_call_credentials_unref(creds); grpc_httpcli_set_override(NULL, NULL); } static void test_refresh_token_creds_failure(void) { - ExecCtx _local_exec_ctx; + grpc_core::ExecCtx _local_exec_ctx; request_metadata_state* state = make_request_metadata_state( GRPC_ERROR_CREATE_FROM_STATIC_STRING( "Error occured when fetching oauth2 token."), @@ -790,7 +790,7 @@ static void test_jwt_creds_lifetime(void) { static void test_jwt_creds_success(void) { char* json_key_string = test_json_key_str(); - ExecCtx _local_exec_ctx; + grpc_core::ExecCtx _local_exec_ctx; grpc_auth_metadata_context auth_md_ctx = {test_service_url, test_method, NULL, NULL}; char* expected_md_value; @@ -805,7 +805,7 @@ static void test_jwt_creds_success(void) { make_request_metadata_state(GRPC_ERROR_NONE, emd, GPR_ARRAY_SIZE(emd)); grpc_jwt_encode_and_sign_set_override(encode_and_sign_jwt_success); run_request_metadata_test(creds, auth_md_ctx, state); - ExecCtx::Get()->Flush(); + grpc_core::ExecCtx::Get()->Flush(); /* Second request: the cached token should be served directly. */ state = @@ -813,7 +813,7 @@ static void test_jwt_creds_success(void) { grpc_jwt_encode_and_sign_set_override( encode_and_sign_jwt_should_not_be_called); run_request_metadata_test(creds, auth_md_ctx, state); - ExecCtx::Get()->Flush(); + grpc_core::ExecCtx::Get()->Flush(); /* Third request: Different service url so jwt_encode_and_sign should be called again (no caching). */ @@ -822,7 +822,7 @@ static void test_jwt_creds_success(void) { auth_md_ctx.service_url = other_test_service_url; grpc_jwt_encode_and_sign_set_override(encode_and_sign_jwt_success); run_request_metadata_test(creds, auth_md_ctx, state); - ExecCtx::Get()->Flush(); + grpc_core::ExecCtx::Get()->Flush(); grpc_call_credentials_unref(creds); gpr_free(json_key_string); @@ -832,7 +832,7 @@ static void test_jwt_creds_success(void) { static void test_jwt_creds_signing_failure(void) { char* json_key_string = test_json_key_str(); - ExecCtx _local_exec_ctx; + grpc_core::ExecCtx _local_exec_ctx; grpc_auth_metadata_context auth_md_ctx = {test_service_url, test_method, NULL, NULL}; request_metadata_state* state = make_request_metadata_state( @@ -863,7 +863,7 @@ static void set_google_default_creds_env_var_with_file_contents( } static void test_google_default_creds_auth_key(void) { - ExecCtx _local_exec_ctx; + grpc_core::ExecCtx _local_exec_ctx; grpc_service_account_jwt_access_credentials* jwt; grpc_composite_channel_credentials* creds; char* json_key = test_json_key_str(); @@ -884,7 +884,7 @@ static void test_google_default_creds_auth_key(void) { } static void test_google_default_creds_refresh_token(void) { - ExecCtx _local_exec_ctx; + grpc_core::ExecCtx _local_exec_ctx; grpc_google_refresh_token_credentials* refresh; grpc_composite_channel_credentials* creds; grpc_flush_cached_google_default_credentials(); @@ -919,7 +919,7 @@ static int default_creds_gce_detection_httpcli_get_success_override( static char* null_well_known_creds_path_getter(void) { return NULL; } static void test_google_default_creds_gce(void) { - ExecCtx _local_exec_ctx; + grpc_core::ExecCtx _local_exec_ctx; expected_md emd[] = { {"authorization", "Bearer ya29.AHES6ZRN3-HlhAPya30GnW_bHSb_"}}; request_metadata_state* state = @@ -945,7 +945,7 @@ static void test_google_default_creds_gce(void) { grpc_httpcli_set_override(compute_engine_httpcli_get_success_override, httpcli_post_should_not_be_called); run_request_metadata_test(creds->call_creds, auth_md_ctx, state); - ExecCtx::Get()->Flush(); + grpc_core::ExecCtx::Get()->Flush(); /* Check that we get a cached creds if we call grpc_google_default_credentials_create again. @@ -1054,7 +1054,7 @@ static void plugin_destroy(void* state) { static void test_metadata_plugin_success(void) { plugin_state state = PLUGIN_INITIAL_STATE; grpc_metadata_credentials_plugin plugin; - ExecCtx _local_exec_ctx; + grpc_core::ExecCtx _local_exec_ctx; grpc_auth_metadata_context auth_md_ctx = {test_service_url, test_method, NULL, NULL}; request_metadata_state* md_state = make_request_metadata_state( @@ -1077,7 +1077,7 @@ static void test_metadata_plugin_success(void) { static void test_metadata_plugin_failure(void) { plugin_state state = PLUGIN_INITIAL_STATE; grpc_metadata_credentials_plugin plugin; - ExecCtx _local_exec_ctx; + grpc_core::ExecCtx _local_exec_ctx; grpc_auth_metadata_context auth_md_ctx = {test_service_url, test_method, NULL, NULL}; char* expected_error; @@ -1119,7 +1119,7 @@ static void test_get_well_known_google_credentials_file_path(void) { } static void test_channel_creds_duplicate_without_call_creds(void) { - ExecCtx _local_exec_ctx; + grpc_core::ExecCtx _local_exec_ctx; grpc_channel_credentials* channel_creds = grpc_fake_transport_security_credentials_create(); diff --git a/test/core/security/json_token_test.cc b/test/core/security/json_token_test.cc index 9eac2b9254..a139f3776f 100644 --- a/test/core/security/json_token_test.cc +++ b/test/core/security/json_token_test.cc @@ -206,7 +206,7 @@ static void test_parse_json_key_failure_no_private_key(void) { static grpc_json* parse_json_part_from_jwt(const char* str, size_t len, char** scratchpad) { - ExecCtx _local_exec_ctx; + grpc_core::ExecCtx _local_exec_ctx; char* b64; char* decoded; grpc_json* json; @@ -326,7 +326,7 @@ static void check_jwt_claim(grpc_json* claim, const char* expected_audience, static void check_jwt_signature(const char* b64_signature, RSA* rsa_key, const char* signed_data, size_t signed_data_size) { - ExecCtx _local_exec_ctx; + grpc_core::ExecCtx _local_exec_ctx; EVP_MD_CTX* md_ctx = EVP_MD_CTX_create(); EVP_PKEY* key = EVP_PKEY_new(); diff --git a/test/core/security/jwt_verifier_test.cc b/test/core/security/jwt_verifier_test.cc index 7485aa10b4..55e28e6eb2 100644 --- a/test/core/security/jwt_verifier_test.cc +++ b/test/core/security/jwt_verifier_test.cc @@ -209,7 +209,7 @@ static void test_claims_success(void) { grpc_json* json = grpc_json_parse_string_with_len( (char*)GRPC_SLICE_START_PTR(s), GRPC_SLICE_LENGTH(s)); GPR_ASSERT(json != NULL); - ExecCtx _local_exec_ctx; + grpc_core::ExecCtx _local_exec_ctx; claims = grpc_jwt_claims_from_json(json, s); GPR_ASSERT(claims != NULL); GPR_ASSERT(grpc_jwt_claims_json(claims) == json); @@ -231,7 +231,7 @@ static void test_expired_claims_failure(void) { gpr_timespec exp_exp = {120, 0, GPR_CLOCK_REALTIME}; gpr_timespec exp_nbf = {60, 0, GPR_CLOCK_REALTIME}; GPR_ASSERT(json != NULL); - ExecCtx _local_exec_ctx; + grpc_core::ExecCtx _local_exec_ctx; claims = grpc_jwt_claims_from_json(json, s); GPR_ASSERT(claims != NULL); GPR_ASSERT(grpc_jwt_claims_json(claims) == json); @@ -252,7 +252,7 @@ static void test_invalid_claims_failure(void) { grpc_slice s = grpc_slice_from_copied_string(invalid_claims); grpc_json* json = grpc_json_parse_string_with_len( (char*)GRPC_SLICE_START_PTR(s), GRPC_SLICE_LENGTH(s)); - ExecCtx _local_exec_ctx; + grpc_core::ExecCtx _local_exec_ctx; GPR_ASSERT(grpc_jwt_claims_from_json(json, s) == NULL); } @@ -262,7 +262,7 @@ static void test_bad_audience_claims_failure(void) { grpc_json* json = grpc_json_parse_string_with_len( (char*)GRPC_SLICE_START_PTR(s), GRPC_SLICE_LENGTH(s)); GPR_ASSERT(json != NULL); - ExecCtx _local_exec_ctx; + grpc_core::ExecCtx _local_exec_ctx; claims = grpc_jwt_claims_from_json(json, s); GPR_ASSERT(claims != NULL); GPR_ASSERT(grpc_jwt_claims_check(claims, "https://bar.com") == @@ -276,7 +276,7 @@ static void test_bad_subject_claims_failure(void) { grpc_json* json = grpc_json_parse_string_with_len( (char*)GRPC_SLICE_START_PTR(s), GRPC_SLICE_LENGTH(s)); GPR_ASSERT(json != NULL); - ExecCtx _local_exec_ctx; + grpc_core::ExecCtx _local_exec_ctx; claims = grpc_jwt_claims_from_json(json, s); GPR_ASSERT(claims != NULL); GPR_ASSERT(grpc_jwt_claims_check(claims, "https://foo.com") == @@ -350,7 +350,7 @@ static void on_verification_success(void* user_data, } static void test_jwt_verifier_google_email_issuer_success(void) { - ExecCtx _local_exec_ctx; + grpc_core::ExecCtx _local_exec_ctx; grpc_jwt_verifier* verifier = grpc_jwt_verifier_create(NULL, 0); char* jwt = NULL; char* key_str = json_key_str(json_key_str_part3_for_google_email_issuer); @@ -383,7 +383,7 @@ static int httpcli_get_custom_keys_for_email( } static void test_jwt_verifier_custom_email_issuer_success(void) { - ExecCtx _local_exec_ctx; + grpc_core::ExecCtx _local_exec_ctx; grpc_jwt_verifier* verifier = grpc_jwt_verifier_create(&custom_mapping, 1); char* jwt = NULL; char* key_str = json_key_str(json_key_str_part3_for_custom_email_issuer); @@ -430,7 +430,7 @@ static int httpcli_get_openid_config(const grpc_httpcli_request* request, } static void test_jwt_verifier_url_issuer_success(void) { - ExecCtx _local_exec_ctx; + grpc_core::ExecCtx _local_exec_ctx; grpc_jwt_verifier* verifier = grpc_jwt_verifier_create(NULL, 0); char* jwt = NULL; char* key_str = json_key_str(json_key_str_part3_for_url_issuer); @@ -469,7 +469,7 @@ static int httpcli_get_bad_json(const grpc_httpcli_request* request, } static void test_jwt_verifier_url_issuer_bad_config(void) { - ExecCtx _local_exec_ctx; + grpc_core::ExecCtx _local_exec_ctx; grpc_jwt_verifier* verifier = grpc_jwt_verifier_create(NULL, 0); char* jwt = NULL; char* key_str = json_key_str(json_key_str_part3_for_url_issuer); @@ -492,7 +492,7 @@ static void test_jwt_verifier_url_issuer_bad_config(void) { } static void test_jwt_verifier_bad_json_key(void) { - ExecCtx _local_exec_ctx; + grpc_core::ExecCtx _local_exec_ctx; grpc_jwt_verifier* verifier = grpc_jwt_verifier_create(NULL, 0); char* jwt = NULL; char* key_str = json_key_str(json_key_str_part3_for_google_email_issuer); @@ -521,7 +521,7 @@ static void corrupt_jwt_sig(char* jwt) { char* last_dot = strrchr(jwt, '.'); GPR_ASSERT(last_dot != NULL); { - ExecCtx _local_exec_ctx; + grpc_core::ExecCtx _local_exec_ctx; sig = grpc_base64_decode(last_dot + 1, 1); } GPR_ASSERT(!GRPC_SLICE_IS_EMPTY(sig)); @@ -543,7 +543,7 @@ static void on_verification_bad_signature(void* user_data, } static void test_jwt_verifier_bad_signature(void) { - ExecCtx _local_exec_ctx; + grpc_core::ExecCtx _local_exec_ctx; grpc_jwt_verifier* verifier = grpc_jwt_verifier_create(NULL, 0); char* jwt = NULL; char* key_str = json_key_str(json_key_str_part3_for_url_issuer); @@ -583,7 +583,7 @@ static void on_verification_bad_format(void* user_data, } static void test_jwt_verifier_bad_format(void) { - ExecCtx _local_exec_ctx; + grpc_core::ExecCtx _local_exec_ctx; grpc_jwt_verifier* verifier = grpc_jwt_verifier_create(NULL, 0); grpc_httpcli_set_override(httpcli_get_should_not_be_called, httpcli_post_should_not_be_called); diff --git a/test/core/security/oauth2_utils.cc b/test/core/security/oauth2_utils.cc index f4a52aaba0..e24ccbc107 100644 --- a/test/core/security/oauth2_utils.cc +++ b/test/core/security/oauth2_utils.cc @@ -69,7 +69,7 @@ char* grpc_test_fetch_oauth2_token_with_credentials( grpc_call_credentials* creds) { oauth2_request request; memset(&request, 0, sizeof(request)); - ExecCtx _local_exec_ctx; + grpc_core::ExecCtx _local_exec_ctx; grpc_closure do_nothing_closure; grpc_auth_metadata_context null_ctx = {"", "", NULL, NULL}; @@ -92,7 +92,7 @@ char* grpc_test_fetch_oauth2_token_with_credentials( on_oauth2_response(&request, error); GRPC_ERROR_UNREF(error); } - ExecCtx::Get()->Flush(); + grpc_core::ExecCtx::Get()->Flush(); gpr_mu_lock(request.mu); while (!request.is_done) { diff --git a/test/core/security/print_google_default_creds_token.cc b/test/core/security/print_google_default_creds_token.cc index 6153e8a9cb..29201afe40 100644 --- a/test/core/security/print_google_default_creds_token.cc +++ b/test/core/security/print_google_default_creds_token.cc @@ -62,7 +62,7 @@ static void on_metadata_response(void* arg, grpc_error* error) { int main(int argc, char** argv) { int result = 0; - ExecCtx _local_exec_ctx; + grpc_core::ExecCtx _local_exec_ctx; synchronizer sync; grpc_channel_credentials* creds = NULL; const char* service_url = "https://test.foo.google.com/Foo"; @@ -111,7 +111,7 @@ int main(int argc, char** argv) { GRPC_MILLIS_INF_FUTURE))) sync.is_done = true; gpr_mu_unlock(sync.mu); - ExecCtx::Get()->Flush(); + grpc_core::ExecCtx::Get()->Flush(); gpr_mu_lock(sync.mu); } gpr_mu_unlock(sync.mu); diff --git a/test/core/security/secure_endpoint_test.cc b/test/core/security/secure_endpoint_test.cc index a49bf1a0b4..7cee0dd3fe 100644 --- a/test/core/security/secure_endpoint_test.cc +++ b/test/core/security/secure_endpoint_test.cc @@ -38,7 +38,7 @@ static grpc_pollset* g_pollset; static grpc_endpoint_test_fixture secure_endpoint_create_fixture_tcp_socketpair( size_t slice_size, grpc_slice* leftover_slices, size_t leftover_nslices, bool use_zero_copy_protector) { - ExecCtx _local_exec_ctx; + grpc_core::ExecCtx _local_exec_ctx; tsi_frame_protector* fake_read_protector = tsi_create_fake_frame_protector(NULL); tsi_frame_protector* fake_write_protector = @@ -170,7 +170,7 @@ static void test_leftover(grpc_endpoint_test_config config, size_t slice_size) { grpc_slice_buffer incoming; grpc_slice s = grpc_slice_from_copied_string("hello world 12345678900987654321"); - ExecCtx _local_exec_ctx; + grpc_core::ExecCtx _local_exec_ctx; int n = 0; grpc_closure done_closure; gpr_log(GPR_INFO, "Start test left over"); @@ -202,7 +202,7 @@ static void destroy_pollset(void* p, grpc_error* error) { int main(int argc, char** argv) { grpc_closure destroyed; - ExecCtx _local_exec_ctx; + grpc_core::ExecCtx _local_exec_ctx; grpc_test_init(argc, argv); grpc_init(); diff --git a/test/core/security/ssl_server_fuzzer.cc b/test/core/security/ssl_server_fuzzer.cc index 84a42546c6..b9198279e3 100644 --- a/test/core/security/ssl_server_fuzzer.cc +++ b/test/core/security/ssl_server_fuzzer.cc @@ -55,7 +55,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { if (squelch) gpr_set_log_function(dont_log); if (leak_check) grpc_memory_counters_init(); grpc_init(); - ExecCtx _local_exec_ctx; + grpc_core::ExecCtx _local_exec_ctx; grpc_resource_quota* resource_quota = grpc_resource_quota_create("ssl_server_fuzzer"); @@ -83,7 +83,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { grpc_security_status status = grpc_server_credentials_create_security_connector(creds, &sc); GPR_ASSERT(status == GRPC_SECURITY_OK); - grpc_millis deadline = GPR_MS_PER_SEC + ExecCtx::Get()->Now(); + grpc_millis deadline = GPR_MS_PER_SEC + grpc_core::ExecCtx::Get()->Now(); struct handshake_state state; state.done_callback_called = false; @@ -92,7 +92,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { grpc_handshake_manager_do_handshake( handshake_mgr, mock_endpoint, NULL /* channel_args */, deadline, NULL /* acceptor */, on_handshake_done, &state); - ExecCtx::Get()->Flush(); + grpc_core::ExecCtx::Get()->Flush(); // If the given string happens to be part of the correct client hello, the // server will wait for more data. Explicitly fail the server by shutting down @@ -100,7 +100,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { if (!state.done_callback_called) { grpc_endpoint_shutdown( mock_endpoint, GRPC_ERROR_CREATE_FROM_STATIC_STRING("Explicit close")); - ExecCtx::Get()->Flush(); + grpc_core::ExecCtx::Get()->Flush(); } GPR_ASSERT(state.done_callback_called); @@ -111,7 +111,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { grpc_slice_unref(cert_slice); grpc_slice_unref(key_slice); grpc_slice_unref(ca_slice); - ExecCtx::Get()->Flush(); + grpc_core::ExecCtx::Get()->Flush(); grpc_shutdown(); if (leak_check) { diff --git a/test/core/security/verify_jwt.cc b/test/core/security/verify_jwt.cc index f3e8966625..c4c3541d19 100644 --- a/test/core/security/verify_jwt.cc +++ b/test/core/security/verify_jwt.cc @@ -76,7 +76,7 @@ int main(int argc, char** argv) { gpr_cmdline* cl; const char* jwt = NULL; const char* aud = NULL; - ExecCtx _local_exec_ctx; + grpc_core::ExecCtx _local_exec_ctx; grpc_init(); cl = gpr_cmdline_create("JWT verifier tool"); @@ -106,7 +106,7 @@ int main(int argc, char** argv) { grpc_pollset_work(sync.pollset, &worker, GRPC_MILLIS_INF_FUTURE))) sync.is_done = true; gpr_mu_unlock(sync.mu); - ExecCtx::Get()->Flush(); + grpc_core::ExecCtx::Get()->Flush(); gpr_mu_lock(sync.mu); } gpr_mu_unlock(sync.mu); |