Fix google-readability-todo

pull/24829/head
Esun Kim 4 years ago
parent 221e066c30
commit 75e3e660fd
  1. 5
      src/core/ext/transport/cronet/transport/cronet_status.h
  2. 2
      src/core/lib/iomgr/error_internal.h
  3. 2
      src/core/lib/iomgr/ev_epoll1_linux.cc
  4. 6
      src/core/lib/iomgr/timer_generic.cc
  5. 2
      src/core/lib/security/authorization/evaluate_args.h
  6. 4
      src/cpp/ext/filters/census/client_filter.cc
  7. 2
      src/cpp/ext/filters/census/context.cc
  8. 10
      src/cpp/ext/filters/census/rpc_encoding.h
  9. 4
      test/core/iomgr/parse_address_with_named_scope_id_test.cc
  10. 4
      test/core/security/security_connector_test.cc
  11. 2
      test/core/util/test_tcp_server.h
  12. 10
      test/cpp/end2end/xds_end2end_test.cc
  13. 6
      test/cpp/ext/filters/census/stats_plugin_end2end_test.cc
  14. 6
      test/cpp/interop/xds_interop_client.cc
  15. 8
      test/cpp/microbenchmarks/bm_cq.cc
  16. 2
      test/cpp/naming/resolver_component_test.cc
  17. 2
      test/cpp/qps/histogram.h

@ -290,9 +290,8 @@ enum cronet_net_error_code {
// received a 302 (temporary redirect, response. The response body might
// include a description of why the request failed.
//
// TODO(https: //crbug.com/928551,: This is deprecated and should not be used
// by
// new code.
// TODO(crbug.com/928551): This is deprecated and should not be used
// by new code.
CRONET_NET_ERROR_HTTPS_PROXY_TUNNEL_RESPONSE_REDIRECT = -140,
// We were unable to sign the CertificateVerify data of an SSL client auth

@ -22,7 +22,7 @@
#include <grpc/support/port_platform.h>
#include <inttypes.h>
#include <stdbool.h> // TODO, do we need this?
#include <stdbool.h> // TODO(unknown): , do we need this?
#include <grpc/support/sync.h>
#include "src/core/lib/iomgr/error.h"

@ -618,7 +618,7 @@ static grpc_error* pollset_kick_all(grpc_pollset* pollset) {
worker = worker->next;
} while (worker != pollset->root_worker);
}
// TODO: sreek. Check if we need to set 'kicked_without_poller' to true here
// TODO(sreek): Check if we need to set 'kicked_without_poller' to true here
// in the else case
return error;
}

@ -432,7 +432,7 @@ static void timer_init(grpc_timer* timer, grpc_millis deadline,
note_deadline_change(shard);
if (shard->shard_queue_index == 0 && deadline < old_min_deadline) {
#if GPR_ARCH_64
// TODO: sreek - Using c-style cast here. static_cast<> gives an error
// TODO(sreek): Using c-style cast here. static_cast<> gives an error
// (on mac platforms complaining that gpr_atm* is (long *) while
// (&g_shared_mutables.min_timer) is a (long long *). The cast should be
// safe since we know that both are pointer types and 64-bit wide.
@ -586,7 +586,7 @@ static grpc_timer_check_result run_some_expired_timers(grpc_millis now,
grpc_timer_check_result result = GRPC_TIMERS_NOT_CHECKED;
#if GPR_ARCH_64
// TODO: sreek - Using c-style cast here. static_cast<> gives an error (on
// TODO(sreek): Using c-style cast here. static_cast<> gives an error (on
// mac platforms complaining that gpr_atm* is (long *) while
// (&g_shared_mutables.min_timer) is a (long long *). The cast should be
// safe since we know that both are pointer types and 64-bit wide
@ -651,7 +651,7 @@ static grpc_timer_check_result run_some_expired_timers(grpc_millis now,
}
#if GPR_ARCH_64
// TODO: sreek - Using c-style cast here. static_cast<> gives an error (on
// TODO(sreek): Using c-style cast here. static_cast<> gives an error (on
// mac platforms complaining that gpr_atm* is (long *) while
// (&g_shared_mutables.min_timer) is a (long long *). The cast should be
// safe since we know that both are pointer types and 64-bit wide

@ -46,7 +46,7 @@ class EvaluateArgs {
absl::string_view GetSpiffeId() const;
absl::string_view GetCertServerName() const;
// TODO: Add a getter function for source.principal
// TODO(unknown): Add a getter function for source.principal
private:
grpc_metadata_batch* metadata_;

@ -106,7 +106,7 @@ void CensusClientCallData::StartTransportStreamOpBatch(
GRPC_BATCH_GRPC_TRACE_BIN));
}
grpc_slice tags = grpc_empty_slice();
// TODO: Add in tagging serialization.
// TODO(unknown): Add in tagging serialization.
size_t encoded_tags_len = StatsContextSerialize(kMaxTagsLen, &tags);
if (encoded_tags_len > 0) {
GRPC_LOG_IF_ERROR(
@ -176,7 +176,7 @@ void CensusClientCallData::Destroy(grpc_call_element* elem,
tags);
grpc_slice_unref_internal(path_);
if (final_info->final_status != GRPC_STATUS_OK) {
// TODO: Map grpc_status_code to trace::StatusCode.
// TODO(unknown): Map grpc_status_code to trace::StatusCode.
context_.Span().SetStatus(opencensus::trace::StatusCode::UNKNOWN,
StatusCodeToString(final_info->final_status));
}

@ -78,7 +78,7 @@ size_t TraceContextSerialize(const ::opencensus::trace::SpanContext& context,
}
size_t StatsContextSerialize(size_t max_tags_len, grpc_slice* tags) {
// TODO: Add implementation. Waiting on stats tagging to be added.
// TODO(unknown): Add implementation. Waiting on stats tagging to be added.
return 0;
}

@ -31,7 +31,7 @@
namespace grpc {
// TODO: Rename to GrpcTraceContextV0.
// TODO(unknown): Rename to GrpcTraceContextV0.
struct GrpcTraceContext {
GrpcTraceContext() {}
@ -48,7 +48,7 @@ struct GrpcTraceContext {
::opencensus::trace::TraceOptions(trace_options));
}
// TODO: For performance:
// TODO(unknown): For performance:
// uint8_t version;
// uint8_t trace_id_field_id;
uint8_t trace_id[::opencensus::trace::TraceId::kSize];
@ -78,7 +78,7 @@ class TraceContextEncoding {
return kEncodeDecodeFailure;
}
uint8_t version = buf[kVersionIdOffset];
// TODO: Support other versions later. Only support version 0 for
// TODO(unknown): Support other versions later. Only support version 0 for
// now.
if (version != kVersionId) {
return kEncodeDecodeFailure;
@ -123,7 +123,7 @@ class TraceContextEncoding {
// in a GrpcTraceContext struct. If it does not recognize the field ID it
// will return 0, otherwise it returns the number of bytes read.
static size_t ParseField(absl::string_view buf, GrpcTraceContext* tc) {
// TODO: Add support for multi-byte field IDs.
// TODO(unknown): Add support for multi-byte field IDs.
if (buf.empty()) {
return 0;
}
@ -200,7 +200,7 @@ class TraceContextEncoding {
TraceContextEncoding operator=(TraceContextEncoding&&) = delete;
};
// TODO: This may not be needed. Check to see if opencensus requires
// TODO(unknown): This may not be needed. Check to see if opencensus requires
// a trailing server response.
// RpcServerStatsEncoding encapsulates the logic for encoding and decoding of
// rpc server stats messages. Rpc server stats consists of a uint64_t time

@ -55,8 +55,8 @@ static void test_grpc_parse_ipv6_parity_with_getaddrinfo(
GPR_ASSERT(result_from_grpc_parser->sin6_scope_id ==
result_from_getaddrinfo.sin6_scope_id);
GPR_ASSERT(result_from_grpc_parser->sin6_scope_id != 0);
// TODO: compare sin6_flow_info fields? parse_ipv6 zero's this field as is.
// Cleanup
// TODO(unknown): compare sin6_flow_info fields? parse_ipv6 zero's this field
// as is. Cleanup
grpc_uri_destroy(uri);
}

@ -571,8 +571,8 @@ class TestDefaultSslRootStore : public DefaultSslRootStore {
} // namespace
} // namespace grpc_core
// TODO: Convert this test to C++ test when security_connector implementation
// is converted to C++.
// TODO(unknown): Convert this test to C++ test when security_connector
// implementation is converted to C++.
static void test_default_ssl_roots(void) {
const char* roots_for_env_var = "roots for env var";

@ -31,7 +31,7 @@ struct test_tcp_server {
grpc_closure shutdown_complete;
bool shutdown = false;
// mu is filled in by grpc_pollset_init and controls the pollset.
// TODO: Switch this to a Mutex once pollset_init can provide a Mutex
// TODO(unknown): Switch this to a Mutex once pollset_init can provide a Mutex
gpr_mu* mu;
std::vector<grpc_pollset*> pollset;
grpc_tcp_server_cb on_connect;

@ -3924,7 +3924,7 @@ TEST_P(LdsRdsTest, XdsRoutingWeightedCluster) {
kWeight75 / 100 * (1 - kErrorTolerance)),
::testing::Le(static_cast<double>(kNumEcho1Rpcs) *
kWeight75 / 100 * (1 + kErrorTolerance))));
// TODO: (@donnadionne) Reduce tolerance: increased the tolerance to keep the
// TODO(@donnadionne): Reduce tolerance: increased the tolerance to keep the
// test from flaking while debugging potential root cause.
const double kErrorToleranceSmallLoad = 0.3;
gpr_log(GPR_INFO, "target_75 received %d rpcs and target_25 received %d rpcs",
@ -4005,7 +4005,7 @@ TEST_P(LdsRdsTest, RouteActionWeightedTargetDefaultRoute) {
kWeight75 / 100 * (1 - kErrorTolerance)),
::testing::Le(static_cast<double>(kNumEchoRpcs) *
kWeight75 / 100 * (1 + kErrorTolerance))));
// TODO: (@donnadionne) Reduce tolerance: increased the tolerance to keep the
// TODO(@donnadionne): Reduce tolerance: increased the tolerance to keep the
// test from flaking while debugging potential root cause.
const double kErrorToleranceSmallLoad = 0.3;
gpr_log(GPR_INFO, "target_75 received %d rpcs and target_25 received %d rpcs",
@ -4111,7 +4111,7 @@ TEST_P(LdsRdsTest, XdsRoutingWeightedClusterUpdateWeights) {
kWeight75 / 100 * (1 - kErrorTolerance)),
::testing::Le(static_cast<double>(kNumEcho1Rpcs) *
kWeight75 / 100 * (1 + kErrorTolerance))));
// TODO: (@donnadionne) Reduce tolerance: increased the tolerance to keep the
// TODO(@donnadionne): Reduce tolerance: increased the tolerance to keep the
// test from flaking while debugging potential root cause.
const double kErrorToleranceSmallLoad = 0.3;
gpr_log(GPR_INFO, "target_75 received %d rpcs and target_25 received %d rpcs",
@ -4250,7 +4250,7 @@ TEST_P(LdsRdsTest, XdsRoutingWeightedClusterUpdateClusters) {
kWeight75 / 100 * (1 - kErrorTolerance)),
::testing::Le(static_cast<double>(kNumEcho1Rpcs) *
kWeight75 / 100 * (1 + kErrorTolerance))));
// TODO: (@donnadionne) Reduce tolerance: increased the tolerance to keep the
// TODO(@donnadionne): Reduce tolerance: increased the tolerance to keep the
// test from flaking while debugging potential root cause.
const double kErrorToleranceSmallLoad = 0.3;
gpr_log(GPR_INFO, "target_75 received %d rpcs and target_25 received %d rpcs",
@ -4317,7 +4317,7 @@ TEST_P(LdsRdsTest, XdsRoutingWeightedClusterUpdateClusters) {
kWeight75 / 100 * (1 - kErrorTolerance)),
::testing::Le(static_cast<double>(kNumEcho1Rpcs) *
kWeight75 / 100 * (1 + kErrorTolerance))));
// TODO: (@donnadionne) Reduce tolerance: increased the tolerance to keep the
// TODO(@donnadionne): Reduce tolerance: increased the tolerance to keep the
// test from flaking while debugging potential root cause.
gpr_log(GPR_INFO, "target_75 received %d rpcs and target_25 received %d rpcs",
weight_75_request_count, weight_25_request_count);

@ -160,7 +160,7 @@ TEST_F(StatsPluginEnd2EndTest, ErrorCount) {
client_method_view.GetData().int_data(),
::testing::UnorderedElementsAre(::testing::Pair(
::testing::ElementsAre(client_method_name_, TEST_TAG_VALUE), 17)));
// TODO: Implement server view tagging with custom tags.
// TODO(unknown): Implement server view tagging with custom tags.
EXPECT_THAT(server_method_view.GetData().int_data(),
::testing::UnorderedElementsAre(::testing::Pair(
::testing::ElementsAre(server_method_name_), 17)));
@ -195,7 +195,7 @@ TEST_F(StatsPluginEnd2EndTest, ErrorCount) {
::testing::Pair(::testing::ElementsAre("DATA_LOSS", TEST_TAG_VALUE), 1),
};
// TODO: Implement server view tagging with custom tags.
// TODO(unknown): Implement server view tagging with custom tags.
auto server_tags = {
::testing::Pair(::testing::ElementsAre("OK"), 1),
::testing::Pair(::testing::ElementsAre("CANCELLED"), 1),
@ -359,7 +359,7 @@ TEST_F(StatsPluginEnd2EndTest, CompletedRpcs) {
}
TEST_F(StatsPluginEnd2EndTest, RequestReceivedMessagesPerRpc) {
// TODO: Use streaming RPCs.
// TODO(unknown): Use streaming RPCs.
View client_received_messages_per_rpc_view(
ClientSentMessagesPerRpcCumulative());
View client_sent_messages_per_rpc_view(

@ -157,7 +157,7 @@ class XdsStatsWatcher {
} else {
GPR_ASSERT(0);
}
// TODO@donnadionne: When the test runner changes to accept EMPTY_CALL
// TODO(@donnadionne): When the test runner changes to accept EMPTY_CALL
// and UNARY_CALL we will just use the name of the enum instead of the
// method_name variable.
auto& response_rpc_by_method = response_rpcs_by_method[method_name];
@ -233,7 +233,7 @@ class TestClient {
AsyncClientCall* call = new AsyncClientCall;
for (const auto& data : metadata) {
call->context.AddMetadata(data.first, data.second);
// TODO@donnadionne: move deadline to separate proto.
// TODO(@donnadionne): move deadline to separate proto.
if (data.first == "rpc-behavior" && data.second == "keep-open") {
deadline =
std::chrono::system_clock::now() + std::chrono::seconds(INT_MAX);
@ -265,7 +265,7 @@ class TestClient {
AsyncClientCall* call = new AsyncClientCall;
for (const auto& data : metadata) {
call->context.AddMetadata(data.first, data.second);
// TODO@donnadionne: move deadline to separate proto.
// TODO(@donnadionne): move deadline to separate proto.
if (data.first == "rpc-behavior" && data.second == "keep-open") {
deadline =
std::chrono::system_clock::now() + std::chrono::seconds(INT_MAX);

@ -57,7 +57,7 @@ BENCHMARK(BM_CreateDestroyCpp2);
static void BM_CreateDestroyCore(benchmark::State& state) {
TrackCounters track_counters;
for (auto _ : state) {
// TODO: sreek Templatize this benchmark and pass completion type and
// TODO(sreek): Templatize this benchmark and pass completion type and
// polling type as parameters
grpc_completion_queue_destroy(
grpc_completion_queue_create_for_next(nullptr));
@ -103,7 +103,7 @@ BENCHMARK(BM_Pass1Cpp);
static void BM_Pass1Core(benchmark::State& state) {
TrackCounters track_counters;
// TODO: sreek Templatize this benchmark and pass polling_type as a param
// TODO(sreek): Templatize this benchmark and pass polling_type as a param
grpc_completion_queue* cq = grpc_completion_queue_create_for_next(nullptr);
gpr_timespec deadline = gpr_inf_future(GPR_CLOCK_MONOTONIC);
for (auto _ : state) {
@ -122,7 +122,7 @@ BENCHMARK(BM_Pass1Core);
static void BM_Pluck1Core(benchmark::State& state) {
TrackCounters track_counters;
// TODO: sreek Templatize this benchmark and pass polling_type as a param
// TODO(sreek): Templatize this benchmark and pass polling_type as a param
grpc_completion_queue* cq = grpc_completion_queue_create_for_pluck(nullptr);
gpr_timespec deadline = gpr_inf_future(GPR_CLOCK_MONOTONIC);
for (auto _ : state) {
@ -141,7 +141,7 @@ BENCHMARK(BM_Pluck1Core);
static void BM_EmptyCore(benchmark::State& state) {
TrackCounters track_counters;
// TODO: sreek Templatize this benchmark and pass polling_type as a param
// TODO(sreek): Templatize this benchmark and pass polling_type as a param
grpc_completion_queue* cq = grpc_completion_queue_create_for_next(nullptr);
gpr_timespec deadline = gpr_inf_past(GPR_CLOCK_MONOTONIC);
for (auto _ : state) {

@ -60,7 +60,7 @@
#include "test/cpp/util/subprocess.h"
#include "test/cpp/util/test_config.h"
// TODO: pull in different headers when enabling this
// TODO(unknown): pull in different headers when enabling this
// test on windows. Also set BAD_SOCKET_RETURN_VAL
// to INVALID_SOCKET on windows.
#ifdef GPR_WINDOWS

@ -27,7 +27,7 @@ namespace testing {
class Histogram {
public:
// TODO: look into making histogram params not hardcoded for C++
// TODO(unknown): look into making histogram params not hardcoded for C++
Histogram()
: impl_(grpc_histogram_create(default_resolution(),
default_max_possible())) {}

Loading…
Cancel
Save