From 332f1b35d534f6910093729e9ecc2cacf8bb9688 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Tue, 24 May 2016 13:21:21 -0700 Subject: Rename functions --- test/core/end2end/fuzzers/api_fuzzer.c | 12 ++++++------ test/core/end2end/tests/filter_causes_close.c | 2 +- test/core/internal_api_canaries/iomgr.c | 2 +- test/core/iomgr/workqueue_test.c | 4 ++-- test/core/security/credentials_test.c | 12 ++++++------ test/core/security/jwt_verifier_test.c | 10 +++++----- test/core/util/mock_endpoint.c | 8 ++++---- test/core/util/passthru_endpoint.c | 12 ++++++------ 8 files changed, 31 insertions(+), 31 deletions(-) (limited to 'test') diff --git a/test/core/end2end/fuzzers/api_fuzzer.c b/test/core/end2end/fuzzers/api_fuzzer.c index aa715c841c..d00a67ffc9 100644 --- a/test/core/end2end/fuzzers/api_fuzzer.c +++ b/test/core/end2end/fuzzers/api_fuzzer.c @@ -200,9 +200,9 @@ static void finish_resolve(grpc_exec_ctx *exec_ctx, void *arg, addrs->addrs = gpr_malloc(sizeof(*addrs->addrs)); addrs->addrs[0].len = 0; *r->addrs = addrs; - grpc_exec_ctx_push(exec_ctx, r->on_done, GRPC_ERROR_NONE, NULL); + grpc_exec_ctx_sched(exec_ctx, r->on_done, GRPC_ERROR_NONE, NULL); } else { - grpc_exec_ctx_push( + grpc_exec_ctx_sched( exec_ctx, r->on_done, GRPC_ERROR_CREATE_REFERENCING("Resolution failed", &error, 1), NULL); } @@ -247,7 +247,7 @@ static void do_connect(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { future_connect *fc = arg; if (error != GRPC_ERROR_NONE) { *fc->ep = NULL; - grpc_exec_ctx_push(exec_ctx, fc->closure, GRPC_ERROR_REF(error), NULL); + grpc_exec_ctx_sched(exec_ctx, fc->closure, GRPC_ERROR_REF(error), NULL); } else if (g_server != NULL) { grpc_endpoint *client; grpc_endpoint *server; @@ -259,7 +259,7 @@ static void do_connect(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { grpc_server_setup_transport(exec_ctx, g_server, transport, NULL, NULL); grpc_chttp2_transport_start_reading(exec_ctx, transport, NULL, 0); - grpc_exec_ctx_push(exec_ctx, fc->closure, GRPC_ERROR_NONE, NULL); + grpc_exec_ctx_sched(exec_ctx, fc->closure, GRPC_ERROR_NONE, NULL); } else { sched_connect(exec_ctx, fc->closure, fc->ep, fc->deadline); } @@ -270,8 +270,8 @@ static void sched_connect(grpc_exec_ctx *exec_ctx, grpc_closure *closure, grpc_endpoint **ep, gpr_timespec deadline) { if (gpr_time_cmp(deadline, gpr_now(deadline.clock_type)) < 0) { *ep = NULL; - grpc_exec_ctx_push(exec_ctx, closure, - GRPC_ERROR_CREATE("Connect deadline exceeded"), NULL); + grpc_exec_ctx_sched(exec_ctx, closure, + GRPC_ERROR_CREATE("Connect deadline exceeded"), NULL); return; } diff --git a/test/core/end2end/tests/filter_causes_close.c b/test/core/end2end/tests/filter_causes_close.c index 8fd847b878..71c0dbfb58 100644 --- a/test/core/end2end/tests/filter_causes_close.c +++ b/test/core/end2end/tests/filter_causes_close.c @@ -216,7 +216,7 @@ static void recv_im_ready(grpc_exec_ctx *exec_ctx, void *arg, &message); grpc_call_next_op(exec_ctx, elem, &op); } - grpc_exec_ctx_push( + grpc_exec_ctx_sched( exec_ctx, calld->recv_im_ready, GRPC_ERROR_CREATE_REFERENCING("Forced call to close", &error, 1), NULL); } diff --git a/test/core/internal_api_canaries/iomgr.c b/test/core/internal_api_canaries/iomgr.c index 71a1bb1436..5e86c42309 100644 --- a/test/core/internal_api_canaries/iomgr.c +++ b/test/core/internal_api_canaries/iomgr.c @@ -72,7 +72,7 @@ static void test_code(void) { grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; grpc_exec_ctx_flush(&exec_ctx); grpc_exec_ctx_finish(&exec_ctx); - grpc_exec_ctx_push(&exec_ctx, &closure, GRPC_ERROR_CREATE("Foo"), NULL); + grpc_exec_ctx_sched(&exec_ctx, &closure, GRPC_ERROR_CREATE("Foo"), NULL); grpc_exec_ctx_enqueue_list(&exec_ctx, &closure_list, NULL); /* endpoint.h */ diff --git a/test/core/iomgr/workqueue_test.c b/test/core/iomgr/workqueue_test.c index 9a359cd799..76ecfae74b 100644 --- a/test/core/iomgr/workqueue_test.c +++ b/test/core/iomgr/workqueue_test.c @@ -73,7 +73,7 @@ static void test_add_closure(void) { grpc_pollset_worker *worker = NULL; grpc_closure_init(&c, must_succeed, &done); - grpc_workqueue_push(&exec_ctx, wq, &c, GRPC_ERROR_NONE); + grpc_workqueue_enqueue(&exec_ctx, wq, &c, GRPC_ERROR_NONE); grpc_workqueue_add_to_pollset(&exec_ctx, wq, g_pollset); gpr_mu_lock(g_mu); @@ -103,7 +103,7 @@ static void test_flush(void) { grpc_pollset_worker *worker = NULL; grpc_closure_init(&c, must_succeed, &done); - grpc_exec_ctx_push(&exec_ctx, &c, GRPC_ERROR_NONE, NULL); + grpc_exec_ctx_sched(&exec_ctx, &c, GRPC_ERROR_NONE, NULL); grpc_workqueue_flush(&exec_ctx, wq); grpc_workqueue_add_to_pollset(&exec_ctx, wq, g_pollset); diff --git a/test/core/security/credentials_test.c b/test/core/security/credentials_test.c index ec417b84dc..e703dbdeb6 100644 --- a/test/core/security/credentials_test.c +++ b/test/core/security/credentials_test.c @@ -560,7 +560,7 @@ static int compute_engine_httpcli_get_success_override( grpc_httpcli_response *response) { validate_compute_engine_http_request(request); *response = http_response(200, valid_oauth2_json_response); - grpc_exec_ctx_push(exec_ctx, on_done, GRPC_ERROR_NONE, NULL); + grpc_exec_ctx_sched(exec_ctx, on_done, GRPC_ERROR_NONE, NULL); return 1; } @@ -570,7 +570,7 @@ static int compute_engine_httpcli_get_failure_override( grpc_httpcli_response *response) { validate_compute_engine_http_request(request); *response = http_response(403, "Not Authorized."); - grpc_exec_ctx_push(exec_ctx, on_done, GRPC_ERROR_NONE, NULL); + grpc_exec_ctx_sched(exec_ctx, on_done, GRPC_ERROR_NONE, NULL); return 1; } @@ -663,7 +663,7 @@ static int refresh_token_httpcli_post_success( grpc_closure *on_done, grpc_httpcli_response *response) { validate_refresh_token_http_request(request, body, body_size); *response = http_response(200, valid_oauth2_json_response); - grpc_exec_ctx_push(exec_ctx, on_done, GRPC_ERROR_NONE, NULL); + grpc_exec_ctx_sched(exec_ctx, on_done, GRPC_ERROR_NONE, NULL); return 1; } @@ -673,7 +673,7 @@ static int refresh_token_httpcli_post_failure( grpc_closure *on_done, grpc_httpcli_response *response) { validate_refresh_token_http_request(request, body, body_size); *response = http_response(403, "Not Authorized."); - grpc_exec_ctx_push(exec_ctx, on_done, GRPC_ERROR_NONE, NULL); + grpc_exec_ctx_sched(exec_ctx, on_done, GRPC_ERROR_NONE, NULL); return 1; } @@ -915,7 +915,7 @@ static int default_creds_gce_detection_httpcli_get_success_override( response->hdrs = headers; GPR_ASSERT(strcmp(request->http.path, "/") == 0); GPR_ASSERT(strcmp(request->host, "metadata.google.internal") == 0); - grpc_exec_ctx_push(exec_ctx, on_done, GRPC_ERROR_NONE, NULL); + grpc_exec_ctx_sched(exec_ctx, on_done, GRPC_ERROR_NONE, NULL); return 1; } @@ -973,7 +973,7 @@ static int default_creds_gce_detection_httpcli_get_failure_override( GPR_ASSERT(strcmp(request->http.path, "/") == 0); GPR_ASSERT(strcmp(request->host, "metadata.google.internal") == 0); *response = http_response(200, ""); - grpc_exec_ctx_push(exec_ctx, on_done, GRPC_ERROR_NONE, NULL); + grpc_exec_ctx_sched(exec_ctx, on_done, GRPC_ERROR_NONE, NULL); return 1; } diff --git a/test/core/security/jwt_verifier_test.c b/test/core/security/jwt_verifier_test.c index 23b46958f4..36b331a777 100644 --- a/test/core/security/jwt_verifier_test.c +++ b/test/core/security/jwt_verifier_test.c @@ -294,7 +294,7 @@ static int httpcli_get_google_keys_for_email( "/robot/v1/metadata/x509/" "777-abaslkan11hlb6nmim3bpspl31ud@developer." "gserviceaccount.com") == 0); - grpc_exec_ctx_push(exec_ctx, on_done, GRPC_ERROR_NONE, NULL); + grpc_exec_ctx_sched(exec_ctx, on_done, GRPC_ERROR_NONE, NULL); return 1; } @@ -338,7 +338,7 @@ static int httpcli_get_custom_keys_for_email( GPR_ASSERT(request->handshaker == &grpc_httpcli_ssl); GPR_ASSERT(strcmp(request->host, "keys.bar.com") == 0); GPR_ASSERT(strcmp(request->http.path, "/jwk/foo@bar.com") == 0); - grpc_exec_ctx_push(exec_ctx, on_done, GRPC_ERROR_NONE, NULL); + grpc_exec_ctx_sched(exec_ctx, on_done, GRPC_ERROR_NONE, NULL); return 1; } @@ -372,7 +372,7 @@ static int httpcli_get_jwk_set(grpc_exec_ctx *exec_ctx, GPR_ASSERT(request->handshaker == &grpc_httpcli_ssl); GPR_ASSERT(strcmp(request->host, "www.googleapis.com") == 0); GPR_ASSERT(strcmp(request->http.path, "/oauth2/v3/certs") == 0); - grpc_exec_ctx_push(exec_ctx, on_done, GRPC_ERROR_NONE, NULL); + grpc_exec_ctx_sched(exec_ctx, on_done, GRPC_ERROR_NONE, NULL); return 1; } @@ -387,7 +387,7 @@ static int httpcli_get_openid_config(grpc_exec_ctx *exec_ctx, GPR_ASSERT(strcmp(request->http.path, GRPC_OPENID_CONFIG_URL_SUFFIX) == 0); grpc_httpcli_set_override(httpcli_get_jwk_set, httpcli_post_should_not_be_called); - grpc_exec_ctx_push(exec_ctx, on_done, GRPC_ERROR_NONE, NULL); + grpc_exec_ctx_sched(exec_ctx, on_done, GRPC_ERROR_NONE, NULL); return 1; } @@ -427,7 +427,7 @@ static int httpcli_get_bad_json(grpc_exec_ctx *exec_ctx, grpc_httpcli_response *response) { *response = http_response(200, gpr_strdup("{\"bad\": \"stuff\"}")); GPR_ASSERT(request->handshaker == &grpc_httpcli_ssl); - grpc_exec_ctx_push(exec_ctx, on_done, GRPC_ERROR_NONE, NULL); + grpc_exec_ctx_sched(exec_ctx, on_done, GRPC_ERROR_NONE, NULL); return 1; } diff --git a/test/core/util/mock_endpoint.c b/test/core/util/mock_endpoint.c index deef68ef59..e3df5b1841 100644 --- a/test/core/util/mock_endpoint.c +++ b/test/core/util/mock_endpoint.c @@ -51,7 +51,7 @@ static void me_read(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep, gpr_mu_lock(&m->mu); if (m->read_buffer.count > 0) { gpr_slice_buffer_swap(&m->read_buffer, slices); - grpc_exec_ctx_push(exec_ctx, cb, GRPC_ERROR_NONE, NULL); + grpc_exec_ctx_sched(exec_ctx, cb, GRPC_ERROR_NONE, NULL); } else { m->on_read = cb; m->on_read_out = slices; @@ -65,7 +65,7 @@ static void me_write(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep, for (size_t i = 0; i < slices->count; i++) { m->on_write(slices->slices[i]); } - grpc_exec_ctx_push(exec_ctx, cb, GRPC_ERROR_NONE, NULL); + grpc_exec_ctx_sched(exec_ctx, cb, GRPC_ERROR_NONE, NULL); } static void me_add_to_pollset(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep, @@ -78,7 +78,7 @@ static void me_shutdown(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep) { grpc_mock_endpoint *m = (grpc_mock_endpoint *)ep; gpr_mu_lock(&m->mu); if (m->on_read) { - grpc_exec_ctx_push(exec_ctx, m->on_read, + grpc_exec_ctx_sched(exec_ctx, m->on_read, GRPC_ERROR_CREATE("Endpoint Shutdown"), NULL); m->on_read = NULL; } @@ -116,7 +116,7 @@ void grpc_mock_endpoint_put_read(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep, gpr_mu_lock(&m->mu); if (m->on_read != NULL) { gpr_slice_buffer_add(m->on_read_out, slice); - grpc_exec_ctx_push(exec_ctx, m->on_read, GRPC_ERROR_NONE, NULL); + grpc_exec_ctx_sched(exec_ctx, m->on_read, GRPC_ERROR_NONE, NULL); m->on_read = NULL; } else { gpr_slice_buffer_add(&m->read_buffer, slice); diff --git a/test/core/util/passthru_endpoint.c b/test/core/util/passthru_endpoint.c index 93753be251..bf897d8f7e 100644 --- a/test/core/util/passthru_endpoint.c +++ b/test/core/util/passthru_endpoint.c @@ -59,11 +59,11 @@ static void me_read(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep, half *m = (half *)ep; gpr_mu_lock(&m->parent->mu); if (m->parent->shutdown) { - grpc_exec_ctx_push(exec_ctx, cb, GRPC_ERROR_CREATE("Already shutdown"), + grpc_exec_ctx_sched(exec_ctx, cb, GRPC_ERROR_CREATE("Already shutdown"), NULL); } else if (m->read_buffer.count > 0) { gpr_slice_buffer_swap(&m->read_buffer, slices); - grpc_exec_ctx_push(exec_ctx, cb, GRPC_ERROR_NONE, NULL); + grpc_exec_ctx_sched(exec_ctx, cb, GRPC_ERROR_NONE, NULL); } else { m->on_read = cb; m->on_read_out = slices; @@ -87,7 +87,7 @@ static void me_write(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep, for (size_t i = 0; i < slices->count; i++) { gpr_slice_buffer_add(m->on_read_out, gpr_slice_ref(slices->slices[i])); } - grpc_exec_ctx_push(exec_ctx, m->on_read, GRPC_ERROR_NONE, NULL); + grpc_exec_ctx_sched(exec_ctx, m->on_read, GRPC_ERROR_NONE, NULL); m->on_read = NULL; } else { for (size_t i = 0; i < slices->count; i++) { @@ -95,7 +95,7 @@ static void me_write(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep, } } gpr_mu_unlock(&m->parent->mu); - grpc_exec_ctx_push(exec_ctx, cb, error, NULL); + grpc_exec_ctx_sched(exec_ctx, cb, error, NULL); } static void me_add_to_pollset(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep, @@ -109,13 +109,13 @@ static void me_shutdown(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep) { gpr_mu_lock(&m->parent->mu); m->parent->shutdown = true; if (m->on_read) { - grpc_exec_ctx_push(exec_ctx, m->on_read, GRPC_ERROR_CREATE("Shutdown"), + grpc_exec_ctx_sched(exec_ctx, m->on_read, GRPC_ERROR_CREATE("Shutdown"), NULL); m->on_read = NULL; } m = other_half(m); if (m->on_read) { - grpc_exec_ctx_push(exec_ctx, m->on_read, GRPC_ERROR_CREATE("Shutdown"), + grpc_exec_ctx_sched(exec_ctx, m->on_read, GRPC_ERROR_CREATE("Shutdown"), NULL); m->on_read = NULL; } -- cgit v1.2.3