Merge pull request #20776 from yashykt/v1.25.x_update_to_pre1
Bump version to v1.25.0-pre1
diff --git a/src/core/ext/filters/client_channel/lb_policy/xds/xds.cc b/src/core/ext/filters/client_channel/lb_policy/xds/xds.cc
index e2e6c4f..8449566 100644
--- a/src/core/ext/filters/client_channel/lb_policy/xds/xds.cc
+++ b/src/core/ext/filters/client_channel/lb_policy/xds/xds.cc
@@ -77,14 +77,9 @@
class ParsedXdsConfig : public LoadBalancingPolicy::Config {
public:
ParsedXdsConfig(RefCountedPtr<LoadBalancingPolicy::Config> child_policy,
- RefCountedPtr<LoadBalancingPolicy::Config> fallback_policy,
- UniquePtr<char> eds_service_name,
- UniquePtr<char> lrs_load_reporting_server_name)
+ RefCountedPtr<LoadBalancingPolicy::Config> fallback_policy)
: child_policy_(std::move(child_policy)),
- fallback_policy_(std::move(fallback_policy)),
- eds_service_name_(std::move(eds_service_name)),
- lrs_load_reporting_server_name_(
- std::move(lrs_load_reporting_server_name)) {}
+ fallback_policy_(std::move(fallback_policy)) {}
const char* name() const override { return kXds; }
@@ -96,17 +91,9 @@
return fallback_policy_;
}
- const char* eds_service_name() const { return eds_service_name_.get(); };
-
- const char* lrs_load_reporting_server_name() const {
- return lrs_load_reporting_server_name_.get();
- };
-
private:
RefCountedPtr<LoadBalancingPolicy::Config> child_policy_;
RefCountedPtr<LoadBalancingPolicy::Config> fallback_policy_;
- UniquePtr<char> eds_service_name_;
- UniquePtr<char> lrs_load_reporting_server_name_;
};
class XdsLb : public LoadBalancingPolicy {
@@ -124,17 +111,16 @@
// We need this wrapper for the following reasons:
// 1. To process per-locality load reporting.
// 2. Since pickers are UniquePtrs we use this RefCounted wrapper to control
- // references to it by the xds picker and the locality.
- class EndpointPickerWrapper : public RefCounted<EndpointPickerWrapper> {
+ // references to it by the xds picker and the locality.
+ class PickerWrapper : public RefCounted<PickerWrapper> {
public:
- EndpointPickerWrapper(
- UniquePtr<SubchannelPicker> picker,
- RefCountedPtr<XdsClientStats::LocalityStats> locality_stats)
+ PickerWrapper(UniquePtr<SubchannelPicker> picker,
+ RefCountedPtr<XdsClientStats::LocalityStats> locality_stats)
: picker_(std::move(picker)),
locality_stats_(std::move(locality_stats)) {
locality_stats_->RefByPicker();
}
- ~EndpointPickerWrapper() { locality_stats_->UnrefByPicker(); }
+ ~PickerWrapper() { locality_stats_->UnrefByPicker(); }
PickResult Pick(PickArgs args);
@@ -145,16 +131,15 @@
// The picker will use a stateless weighting algorithm to pick the locality to
// use for each request.
- class LocalityPicker : public SubchannelPicker {
+ class Picker : public SubchannelPicker {
public:
// Maintains a weighted list of pickers from each locality that is in ready
// state. The first element in the pair represents the end of a range
// proportional to the locality's weight. The start of the range is the
// previous value in the vector and is 0 for the first element.
using PickerList =
- InlinedVector<std::pair<uint32_t, RefCountedPtr<EndpointPickerWrapper>>,
- 1>;
- LocalityPicker(RefCountedPtr<XdsLb> xds_policy, PickerList pickers)
+ InlinedVector<std::pair<uint32_t, RefCountedPtr<PickerWrapper>>, 1>;
+ Picker(RefCountedPtr<XdsLb> xds_policy, PickerList pickers)
: xds_policy_(std::move(xds_policy)),
pickers_(std::move(pickers)),
drop_config_(xds_policy_->drop_config_) {}
@@ -219,7 +204,7 @@
return connectivity_state_;
}
uint32_t weight() const { return weight_; }
- RefCountedPtr<EndpointPickerWrapper> picker_wrapper() const {
+ RefCountedPtr<PickerWrapper> picker_wrapper() const {
return picker_wrapper_;
}
@@ -271,7 +256,7 @@
RefCountedPtr<XdsLocalityName> name_;
OrphanablePtr<LoadBalancingPolicy> child_policy_;
OrphanablePtr<LoadBalancingPolicy> pending_child_policy_;
- RefCountedPtr<EndpointPickerWrapper> picker_wrapper_;
+ RefCountedPtr<PickerWrapper> picker_wrapper_;
grpc_connectivity_state connectivity_state_ = GRPC_CHANNEL_IDLE;
uint32_t weight_;
@@ -392,24 +377,16 @@
const char* name, const grpc_channel_args* args);
void MaybeExitFallbackMode();
- const char* eds_service_name() const {
- if (config_ != nullptr && config_->eds_service_name() != nullptr) {
- return config_->eds_service_name();
- }
- return server_name_.get();
- }
-
XdsClient* xds_client() const {
return xds_client_from_channel_ != nullptr ? xds_client_from_channel_.get()
: xds_client_.get();
}
- // Server name from target URI.
- UniquePtr<char> server_name_;
+ // Name of the backend server to connect to.
+ const char* server_name_ = nullptr;
- // Current channel args and config from the resolver.
+ // Current channel args from the resolver.
const grpc_channel_args* args_ = nullptr;
- RefCountedPtr<ParsedXdsConfig> config_;
// Internal state.
bool shutting_down_ = false;
@@ -441,10 +418,14 @@
grpc_timer lb_fallback_timer_;
grpc_closure lb_on_fallback_;
+ // The policy to use for the fallback backends.
+ RefCountedPtr<LoadBalancingPolicy::Config> fallback_policy_config_;
// Non-null iff we are in fallback mode.
OrphanablePtr<LoadBalancingPolicy> fallback_policy_;
OrphanablePtr<LoadBalancingPolicy> pending_fallback_policy_;
+ // The policy to use for the backends.
+ RefCountedPtr<LoadBalancingPolicy::Config> child_policy_config_;
const grpc_millis locality_retention_interval_ms_;
const grpc_millis locality_map_failover_timeout_ms_;
// A list of locality maps indexed by priority.
@@ -460,10 +441,10 @@
};
//
-// XdsLb::EndpointPickerWrapper
+// XdsLb::PickerWrapper::Pick
//
-LoadBalancingPolicy::PickResult XdsLb::EndpointPickerWrapper::Pick(
+LoadBalancingPolicy::PickResult XdsLb::PickerWrapper::Pick(
LoadBalancingPolicy::PickArgs args) {
// Forward the pick to the picker returned from the child policy.
PickResult result = picker_->Pick(args);
@@ -489,10 +470,10 @@
}
//
-// XdsLb::LocalityPicker
+// XdsLb::Picker
//
-XdsLb::PickResult XdsLb::LocalityPicker::Pick(PickArgs args) {
+XdsLb::PickResult XdsLb::Picker::Pick(PickArgs args) {
// Handle drop.
const UniquePtr<char>* drop_category;
if (drop_config_->ShouldDrop(&drop_category)) {
@@ -508,8 +489,8 @@
return PickFromLocality(key, args);
}
-XdsLb::PickResult XdsLb::LocalityPicker::PickFromLocality(const uint32_t key,
- PickArgs args) {
+XdsLb::PickResult XdsLb::Picker::PickFromLocality(const uint32_t key,
+ PickArgs args) {
size_t mid = 0;
size_t start_index = 0;
size_t end_index = pickers_.size() - 1;
@@ -705,11 +686,11 @@
GPR_ASSERT(server_uri != nullptr);
grpc_uri* uri = grpc_uri_parse(server_uri, true);
GPR_ASSERT(uri->path[0] != '\0');
- server_name_.reset(
- gpr_strdup(uri->path[0] == '/' ? uri->path + 1 : uri->path));
+ server_name_ = gpr_strdup(uri->path[0] == '/' ? uri->path + 1 : uri->path);
if (GRPC_TRACE_FLAG_ENABLED(grpc_lb_xds_trace)) {
- gpr_log(GPR_INFO, "[xdslb %p] server name from channel: %s", this,
- server_name_.get());
+ gpr_log(GPR_INFO,
+ "[xdslb %p] Will use '%s' as the server name for LB request.", this,
+ server_name_);
}
grpc_uri_destroy(uri);
}
@@ -718,6 +699,7 @@
if (GRPC_TRACE_FLAG_ENABLED(grpc_lb_xds_trace)) {
gpr_log(GPR_INFO, "[xdslb %p] destroying xds LB policy", this);
}
+ gpr_free((void*)server_name_);
grpc_channel_args_destroy(args_);
}
@@ -740,13 +722,9 @@
pending_fallback_policy_.reset();
// Cancel the endpoint watch here instead of in our dtor, because the
// watcher holds a ref to us.
- xds_client()->CancelEndpointDataWatch(StringView(eds_service_name()),
+ xds_client()->CancelEndpointDataWatch(StringView(server_name_),
endpoint_watcher_);
- if (config_->lrs_load_reporting_server_name() != nullptr) {
- xds_client()->RemoveClientStats(
- StringView(config_->lrs_load_reporting_server_name()),
- StringView(eds_service_name()), &client_stats_);
- }
+ xds_client()->RemoveClientStats(StringView(server_name_), &client_stats_);
xds_client_from_channel_.reset();
xds_client_.reset();
}
@@ -775,9 +753,9 @@
}
const bool is_initial_update = args_ == nullptr;
// Update config.
- const char* old_eds_service_name = eds_service_name();
- auto old_config = std::move(config_);
- config_ = std::move(args.config);
+ auto* xds_config = static_cast<const ParsedXdsConfig*>(args.config.get());
+ child_policy_config_ = xds_config->child_policy();
+ fallback_policy_config_ = xds_config->fallback_policy();
// Update fallback address list.
fallback_backend_addresses_ = std::move(args.addresses);
// Update args.
@@ -794,7 +772,7 @@
if (xds_client_from_channel_ == nullptr) {
grpc_error* error = GRPC_ERROR_NONE;
xds_client_ = MakeOrphanable<XdsClient>(
- combiner(), interested_parties(), StringView(eds_service_name()),
+ combiner(), interested_parties(), StringView(server_name_),
nullptr /* service config watcher */, *args_, &error);
// TODO(roth): If we decide that we care about fallback mode, add
// proper error handling here.
@@ -804,6 +782,11 @@
xds_client_.get());
}
}
+ auto watcher = MakeUnique<EndpointWatcher>(Ref());
+ endpoint_watcher_ = watcher.get();
+ xds_client()->WatchEndpointData(StringView(server_name_),
+ std::move(watcher));
+ xds_client()->AddClientStats(StringView(server_name_), &client_stats_);
// Start fallback-at-startup checks.
grpc_millis deadline = ExecCtx::Get()->Now() + lb_fallback_timeout_ms_;
Ref(DEBUG_LOCATION, "on_fallback_timer").release(); // Held by closure
@@ -812,42 +795,6 @@
fallback_at_startup_checks_pending_ = true;
grpc_timer_init(&lb_fallback_timer_, deadline, &lb_on_fallback_);
}
- // Update endpoint watcher if needed.
- if (is_initial_update ||
- strcmp(old_eds_service_name, eds_service_name()) != 0) {
- if (!is_initial_update) {
- xds_client()->CancelEndpointDataWatch(StringView(old_eds_service_name),
- endpoint_watcher_);
- }
- auto watcher = MakeUnique<EndpointWatcher>(Ref());
- endpoint_watcher_ = watcher.get();
- xds_client()->WatchEndpointData(StringView(eds_service_name()),
- std::move(watcher));
- }
- // Update load reporting if needed.
- // TODO(roth): Ideally, we should not collect any stats if load reporting
- // is disabled, which would require changing this code to recreate
- // all of the pickers whenever load reporting is enabled or disabled
- // here.
- if (is_initial_update ||
- (config_->lrs_load_reporting_server_name() == nullptr) !=
- (old_config->lrs_load_reporting_server_name() == nullptr) ||
- (config_->lrs_load_reporting_server_name() != nullptr &&
- old_config->lrs_load_reporting_server_name() != nullptr &&
- strcmp(config_->lrs_load_reporting_server_name(),
- old_config->lrs_load_reporting_server_name()) != 0)) {
- if (old_config != nullptr &&
- old_config->lrs_load_reporting_server_name() != nullptr) {
- xds_client()->RemoveClientStats(
- StringView(old_config->lrs_load_reporting_server_name()),
- StringView(old_eds_service_name), &client_stats_);
- }
- if (config_->lrs_load_reporting_server_name() != nullptr) {
- xds_client()->AddClientStats(
- StringView(config_->lrs_load_reporting_server_name()),
- StringView(eds_service_name()), &client_stats_);
- }
- }
}
//
@@ -892,7 +839,9 @@
// Construct update args.
UpdateArgs update_args;
update_args.addresses = fallback_backend_addresses_;
- update_args.config = config_->fallback_policy();
+ update_args.config = fallback_policy_config_ == nullptr
+ ? nullptr
+ : fallback_policy_config_->Ref();
update_args.args = grpc_channel_args_copy(args_);
// If the child policy name changes, we need to create a new child
// policy. When this happens, we leave child_policy_ as-is and store
@@ -943,9 +892,9 @@
// that was there before, which will be immediately shut down)
// and will later be swapped into child_policy_ by the helper
// when the new child transitions into state READY.
- const char* fallback_policy_name = update_args.config == nullptr
+ const char* fallback_policy_name = fallback_policy_config_ == nullptr
? "round_robin"
- : update_args.config->name();
+ : fallback_policy_config_->name();
const bool create_policy =
// case 1
fallback_policy_ == nullptr ||
@@ -1226,7 +1175,7 @@
// that are ready. Each locality is represented by a portion of the range
// proportional to its weight, such that the total range is the sum of the
// weights of all localities.
- LocalityPicker::PickerList picker_list;
+ Picker::PickerList picker_list;
uint32_t end = 0;
for (const auto& p : localities_) {
const auto& locality_name = p.first;
@@ -1238,9 +1187,9 @@
picker_list.push_back(std::make_pair(end, locality->picker_wrapper()));
}
xds_policy()->channel_control_helper()->UpdateState(
- GRPC_CHANNEL_READY, MakeUnique<LocalityPicker>(
- xds_policy_->Ref(DEBUG_LOCATION, "XdsLb+Picker"),
- std::move(picker_list)));
+ GRPC_CHANNEL_READY,
+ MakeUnique<Picker>(xds_policy_->Ref(DEBUG_LOCATION, "XdsLb+Picker"),
+ std::move(picker_list)));
}
OrphanablePtr<XdsLb::PriorityList::LocalityMap::Locality>
@@ -1541,7 +1490,9 @@
// Construct update args.
UpdateArgs update_args;
update_args.addresses = std::move(serverlist);
- update_args.config = xds_policy()->config_->child_policy();
+ update_args.config = xds_policy()->child_policy_config_ == nullptr
+ ? nullptr
+ : xds_policy()->child_policy_config_->Ref();
update_args.args = CreateChildPolicyArgsLocked(xds_policy()->args_);
// If the child policy name changes, we need to create a new child
// policy. When this happens, we leave child_policy_ as-is and store
@@ -1594,9 +1545,10 @@
// when the new child transitions into state READY.
// TODO(juanlishen): If the child policy is not configured via service config,
// use whatever algorithm is specified by the balancer.
- const char* child_policy_name = update_args.config == nullptr
- ? "round_robin"
- : update_args.config->name();
+ const char* child_policy_name =
+ xds_policy()->child_policy_config_ == nullptr
+ ? "round_robin"
+ : xds_policy()->child_policy_config_->name();
const bool create_policy =
// case 1
child_policy_ == nullptr ||
@@ -1763,11 +1715,7 @@
return;
}
// Cache the picker and its state in the locality.
- // TODO(roth): If load reporting is not configured, we should ideally
- // pass a null LocalityStats ref to the EndpointPickerWrapper and have it
- // not collect any stats, since they're not going to be used. This would
- // require recreating all of the pickers whenever we get a config update.
- locality_->picker_wrapper_ = MakeRefCounted<EndpointPickerWrapper>(
+ locality_->picker_wrapper_ = MakeRefCounted<PickerWrapper>(
std::move(picker),
locality_->xds_policy()->client_stats_.FindLocalityStats(
locality_->name_));
@@ -1814,8 +1762,6 @@
InlinedVector<grpc_error*, 3> error_list;
RefCountedPtr<LoadBalancingPolicy::Config> child_policy;
RefCountedPtr<LoadBalancingPolicy::Config> fallback_policy;
- const char* eds_service_name = nullptr;
- const char* lrs_load_reporting_server_name = nullptr;
for (const grpc_json* field = json->child; field != nullptr;
field = field->next) {
if (field->key == nullptr) continue;
@@ -1843,35 +1789,11 @@
GPR_DEBUG_ASSERT(parse_error != GRPC_ERROR_NONE);
error_list.push_back(parse_error);
}
- } else if (strcmp(field->key, "edsServiceName") == 0) {
- if (eds_service_name != nullptr) {
- error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING(
- "field:edsServiceName error:Duplicate entry"));
- }
- if (field->type != GRPC_JSON_STRING) {
- error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING(
- "field:edsServiceName error:type should be string"));
- continue;
- }
- eds_service_name = field->value;
- } else if (strcmp(field->key, "lrsLoadReportingServerName") == 0) {
- if (lrs_load_reporting_server_name != nullptr) {
- error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING(
- "field:lrsLoadReportingServerName error:Duplicate entry"));
- }
- if (field->type != GRPC_JSON_STRING) {
- error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING(
- "field:lrsLoadReportingServerName error:type should be string"));
- continue;
- }
- lrs_load_reporting_server_name = field->value;
}
}
if (error_list.empty()) {
- return MakeRefCounted<ParsedXdsConfig>(
- std::move(child_policy), std::move(fallback_policy),
- UniquePtr<char>(gpr_strdup(eds_service_name)),
- UniquePtr<char>(gpr_strdup(lrs_load_reporting_server_name)));
+ return RefCountedPtr<LoadBalancingPolicy::Config>(New<ParsedXdsConfig>(
+ std::move(child_policy), std::move(fallback_policy)));
} else {
*error = GRPC_ERROR_CREATE_FROM_VECTOR("Xds Parser", &error_list);
return nullptr;
diff --git a/src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc b/src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc
index 7b142f7..7500fa1 100644
--- a/src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc
+++ b/src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc
@@ -451,7 +451,7 @@
class AresDnsResolverFactory : public ResolverFactory {
public:
- bool IsValidUri(const grpc_uri* uri) const override { return true; }
+ bool IsValidUri(const grpc_uri* /*uri*/) const override { return true; }
OrphanablePtr<Resolver> CreateResolver(ResolverArgs args) const override {
return MakeOrphanable<AresDnsResolver>(std::move(args));
diff --git a/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver.cc b/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver.cc
index cb2ab88..621db72 100644
--- a/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver.cc
+++ b/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver.cc
@@ -138,7 +138,7 @@
static void on_ares_backup_poll_alarm(void* arg, grpc_error* error);
static void on_ares_backup_poll_alarm_locked(void* arg, grpc_error* error);
-static void noop_inject_channel_config(ares_channel channel) {}
+static void noop_inject_channel_config(ares_channel /*channel*/) {}
void (*grpc_ares_test_only_inject_config)(ares_channel channel) =
noop_inject_channel_config;
diff --git a/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_posix.cc b/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_posix.cc
index e588010..e185116 100644
--- a/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_posix.cc
+++ b/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_posix.cc
@@ -90,14 +90,14 @@
public:
GrpcPolledFd* NewGrpcPolledFdLocked(ares_socket_t as,
grpc_pollset_set* driver_pollset_set,
- Combiner* combiner) override {
+ Combiner* /*combiner*/) override {
return New<GrpcPolledFdPosix>(as, driver_pollset_set);
}
- void ConfigureAresChannelLocked(ares_channel channel) override {}
+ void ConfigureAresChannelLocked(ares_channel /*channel*/) override {}
};
-UniquePtr<GrpcPolledFdFactory> NewGrpcPolledFdFactory(Combiner* combiner) {
+UniquePtr<GrpcPolledFdFactory> NewGrpcPolledFdFactory(Combiner* /*combiner*/) {
return MakeUnique<GrpcPolledFdFactoryPosix>();
}
diff --git a/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.cc b/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.cc
index fc1bca7..381cbf6 100644
--- a/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.cc
+++ b/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.cc
@@ -175,7 +175,7 @@
gpr_free(hr);
}
-static void on_hostbyname_done_locked(void* arg, int status, int timeouts,
+static void on_hostbyname_done_locked(void* arg, int status, int /*timeouts*/,
struct hostent* hostent) {
grpc_ares_hostbyname_request* hr =
static_cast<grpc_ares_hostbyname_request*>(arg);
@@ -248,7 +248,7 @@
destroy_hostbyname_request_locked(hr);
}
-static void on_srv_query_done_locked(void* arg, int status, int timeouts,
+static void on_srv_query_done_locked(void* arg, int status, int /*timeouts*/,
unsigned char* abuf, int alen) {
grpc_ares_request* r = static_cast<grpc_ares_request*>(arg);
if (status == ARES_SUCCESS) {
@@ -293,7 +293,7 @@
static const char g_service_config_attribute_prefix[] = "grpc_config=";
-static void on_txt_done_locked(void* arg, int status, int timeouts,
+static void on_txt_done_locked(void* arg, int status, int /*timeouts*/,
unsigned char* buf, int len) {
char* error_msg;
grpc_ares_request* r = static_cast<grpc_ares_request*>(arg);
@@ -579,8 +579,8 @@
}
#else /* GRPC_ARES_RESOLVE_LOCALHOST_MANUALLY */
static bool grpc_ares_maybe_resolve_localhost_manually_locked(
- const char* name, const char* default_port,
- grpc_core::UniquePtr<grpc_core::ServerAddressList>* addrs) {
+ const char* /*name*/, const char* /*default_port*/,
+ grpc_core::UniquePtr<grpc_core::ServerAddressList>* /*addrs*/) {
return false;
}
#endif /* GRPC_ARES_RESOLVE_LOCALHOST_MANUALLY */
@@ -728,7 +728,7 @@
}
static void grpc_resolve_address_invoke_dns_lookup_ares_locked(
- void* arg, grpc_error* unused_error) {
+ void* arg, grpc_error* /*unused_error*/) {
grpc_resolve_address_ares_request* r =
static_cast<grpc_resolve_address_ares_request*>(arg);
GRPC_CLOSURE_INIT(&r->on_dns_lookup_done_locked, on_dns_lookup_done, r,
diff --git a/src/core/ext/filters/client_channel/resolver/fake/fake_resolver.cc b/src/core/ext/filters/client_channel/resolver/fake/fake_resolver.cc
index 83b16af..bba9bb7 100644
--- a/src/core/ext/filters/client_channel/resolver/fake/fake_resolver.cc
+++ b/src/core/ext/filters/client_channel/resolver/fake/fake_resolver.cc
@@ -159,7 +159,7 @@
}
}
-void FakeResolver::ReturnReresolutionResult(void* arg, grpc_error* error) {
+void FakeResolver::ReturnReresolutionResult(void* arg, grpc_error* /*error*/) {
FakeResolver* self = static_cast<FakeResolver*>(arg);
self->reresolution_closure_pending_ = false;
self->MaybeSendResultLocked();
@@ -183,7 +183,7 @@
};
void FakeResolverResponseGenerator::SetResponseLocked(void* arg,
- grpc_error* error) {
+ grpc_error* /*error*/) {
SetResponseClosureArg* closure_arg = static_cast<SetResponseClosureArg*>(arg);
auto& resolver = closure_arg->resolver;
if (!resolver->shutdown_) {
@@ -215,7 +215,7 @@
}
void FakeResolverResponseGenerator::SetReresolutionResponseLocked(
- void* arg, grpc_error* error) {
+ void* arg, grpc_error* /*error*/) {
SetResponseClosureArg* closure_arg = static_cast<SetResponseClosureArg*>(arg);
auto& resolver = closure_arg->resolver;
if (!resolver->shutdown_) {
@@ -259,7 +259,7 @@
}
void FakeResolverResponseGenerator::SetFailureLocked(void* arg,
- grpc_error* error) {
+ grpc_error* /*error*/) {
SetResponseClosureArg* closure_arg = static_cast<SetResponseClosureArg*>(arg);
auto& resolver = closure_arg->resolver;
if (!resolver->shutdown_) {
@@ -371,7 +371,7 @@
class FakeResolverFactory : public ResolverFactory {
public:
- bool IsValidUri(const grpc_uri* uri) const override { return true; }
+ bool IsValidUri(const grpc_uri* /*uri*/) const override { return true; }
OrphanablePtr<Resolver> CreateResolver(ResolverArgs args) const override {
return MakeOrphanable<FakeResolver>(std::move(args));
diff --git a/src/core/ext/filters/client_channel/resolver/sockaddr/sockaddr_resolver.cc b/src/core/ext/filters/client_channel/resolver/sockaddr/sockaddr_resolver.cc
index ece5ffe..066e3fd 100644
--- a/src/core/ext/filters/client_channel/resolver/sockaddr/sockaddr_resolver.cc
+++ b/src/core/ext/filters/client_channel/resolver/sockaddr/sockaddr_resolver.cc
@@ -78,7 +78,7 @@
// Factory
//
-void DoNothing(void* ignored) {}
+void DoNothing(void* /*ignored*/) {}
bool ParseUri(const grpc_uri* uri,
bool parse(const grpc_uri* uri, grpc_resolved_address* dst),
@@ -160,7 +160,7 @@
return CreateSockaddrResolver(std::move(args), grpc_parse_unix);
}
- UniquePtr<char> GetDefaultAuthority(grpc_uri* uri) const override {
+ UniquePtr<char> GetDefaultAuthority(grpc_uri* /*uri*/) const override {
return UniquePtr<char>(gpr_strdup("localhost"));
}
diff --git a/src/core/ext/filters/client_channel/resolving_lb_policy.cc b/src/core/ext/filters/client_channel/resolving_lb_policy.cc
index a2b946b..9cac0ed 100644
--- a/src/core/ext/filters/client_channel/resolving_lb_policy.cc
+++ b/src/core/ext/filters/client_channel/resolving_lb_policy.cc
@@ -152,7 +152,8 @@
}
}
- void AddTraceEvent(TraceSeverity severity, StringView message) override {}
+ void AddTraceEvent(TraceSeverity /*severity*/,
+ StringView /*message*/) override {}
void set_child(LoadBalancingPolicy* child) { child_ = child; }
diff --git a/src/core/ext/filters/client_channel/resolving_lb_policy.h b/src/core/ext/filters/client_channel/resolving_lb_policy.h
index d8447c1..342a30e 100644
--- a/src/core/ext/filters/client_channel/resolving_lb_policy.h
+++ b/src/core/ext/filters/client_channel/resolving_lb_policy.h
@@ -74,7 +74,7 @@
// No-op -- should never get updates from the channel.
// TODO(roth): Need to support updating child LB policy's config for xds
// use case.
- void UpdateLocked(UpdateArgs args) override {}
+ void UpdateLocked(UpdateArgs /*args*/) override {}
void ExitIdleLocked() override;
diff --git a/src/core/ext/filters/client_channel/retry_throttle.cc b/src/core/ext/filters/client_channel/retry_throttle.cc
index bdeb7e4..65df803 100644
--- a/src/core/ext/filters/client_channel/retry_throttle.cc
+++ b/src/core/ext/filters/client_channel/retry_throttle.cc
@@ -118,27 +118,27 @@
namespace {
-void* copy_server_name(void* key, void* unused) {
+void* copy_server_name(void* key, void* /*unused*/) {
return gpr_strdup(static_cast<const char*>(key));
}
-long compare_server_name(void* key1, void* key2, void* unused) {
+long compare_server_name(void* key1, void* key2, void* /*unused*/) {
return strcmp(static_cast<const char*>(key1), static_cast<const char*>(key2));
}
-void destroy_server_retry_throttle_data(void* value, void* unused) {
+void destroy_server_retry_throttle_data(void* value, void* /*unused*/) {
ServerRetryThrottleData* throttle_data =
static_cast<ServerRetryThrottleData*>(value);
throttle_data->Unref();
}
-void* copy_server_retry_throttle_data(void* value, void* unused) {
+void* copy_server_retry_throttle_data(void* value, void* /*unused*/) {
ServerRetryThrottleData* throttle_data =
static_cast<ServerRetryThrottleData*>(value);
return throttle_data->Ref().release();
}
-void destroy_server_name(void* key, void* unused) { gpr_free(key); }
+void destroy_server_name(void* key, void* /*unused*/) { gpr_free(key); }
const grpc_avl_vtable avl_vtable = {
destroy_server_name, copy_server_name, compare_server_name,
diff --git a/src/core/ext/filters/client_channel/service_config.h b/src/core/ext/filters/client_channel/service_config.h
index 9c13917..1eac424 100644
--- a/src/core/ext/filters/client_channel/service_config.h
+++ b/src/core/ext/filters/client_channel/service_config.h
@@ -71,12 +71,16 @@
virtual UniquePtr<ParsedConfig> ParseGlobalParams(
const grpc_json* /* json */, grpc_error** error) {
+ // Avoid unused parameter warning on debug-only parameter
+ (void)error;
GPR_DEBUG_ASSERT(error != nullptr);
return nullptr;
}
virtual UniquePtr<ParsedConfig> ParsePerMethodParams(
const grpc_json* /* json */, grpc_error** error) {
+ // Avoid unused parameter warning on debug-only parameter
+ (void)error;
GPR_DEBUG_ASSERT(error != nullptr);
return nullptr;
}
diff --git a/src/core/ext/filters/client_channel/xds/xds_api.cc b/src/core/ext/filters/client_channel/xds/xds_api.cc
index eeb6145..3899704 100644
--- a/src/core/ext/filters/client_channel/xds/xds_api.cc
+++ b/src/core/ext/filters/client_channel/xds/xds_api.cc
@@ -30,7 +30,6 @@
#include "envoy/api/v2/core/address.upb.h"
#include "envoy/api/v2/core/base.upb.h"
-#include "envoy/api/v2/core/health_check.upb.h"
#include "envoy/api/v2/discovery.upb.h"
#include "envoy/api/v2/eds.upb.h"
#include "envoy/api/v2/endpoint/endpoint.upb.h"
@@ -224,13 +223,6 @@
grpc_error* ServerAddressParseAndAppend(
const envoy_api_v2_endpoint_LbEndpoint* lb_endpoint,
ServerAddressList* list) {
- // If health_status is not HEALTHY or UNKNOWN, skip this endpoint.
- const int32_t health_status =
- envoy_api_v2_endpoint_LbEndpoint_health_status(lb_endpoint);
- if (health_status != envoy_api_v2_core_UNKNOWN &&
- health_status != envoy_api_v2_core_HEALTHY) {
- return GRPC_ERROR_NONE;
- }
// Find the ip:port.
const envoy_api_v2_endpoint_Endpoint* endpoint =
envoy_api_v2_endpoint_LbEndpoint_endpoint(lb_endpoint);
diff --git a/src/core/ext/filters/client_channel/xds/xds_client.cc b/src/core/ext/filters/client_channel/xds/xds_client.cc
index 2f09e12..7bb8350 100644
--- a/src/core/ext/filters/client_channel/xds/xds_client.cc
+++ b/src/core/ext/filters/client_channel/xds/xds_client.cc
@@ -736,11 +736,8 @@
}
}
// Start load reporting if needed.
- auto& lrs_call = ads_calld->chand()->lrs_calld_;
- if (lrs_call != nullptr) {
- LrsCallState* lrs_calld = lrs_call->calld();
- if (lrs_calld != nullptr) lrs_calld->MaybeStartReportingLocked();
- }
+ LrsCallState* lrs_calld = ads_calld->chand()->lrs_calld_->calld();
+ if (lrs_calld != nullptr) lrs_calld->MaybeStartReportingLocked();
// Ignore identical update.
const EdsUpdate& prev_update = xds_client->cluster_state_.eds_update;
const bool priority_list_changed =
@@ -1322,18 +1319,14 @@
}
}
-void XdsClient::AddClientStats(StringView lrs_server, StringView cluster,
+void XdsClient::AddClientStats(StringView cluster,
XdsClientStats* client_stats) {
- // TODO(roth): When we add support for direct federation, use the
- // server name specified in lrs_server.
cluster_state_.client_stats.insert(client_stats);
chand_->MaybeStartLrsCall();
}
-void XdsClient::RemoveClientStats(StringView lrs_server, StringView cluster,
+void XdsClient::RemoveClientStats(StringView cluster,
XdsClientStats* client_stats) {
- // TODO(roth): When we add support for direct federation, use the
- // server name specified in lrs_server.
// TODO(roth): In principle, we should try to send a final load report
// containing whatever final stats have been accumulated since the
// last load report.
@@ -1372,9 +1365,7 @@
static const char* json =
"{\n"
" \"loadBalancingConfig\":[\n"
- " { \"xds_experimental\":{\n"
- " \"lrsLoadReportingServerName\": \"\"\n"
- " } }\n"
+ " { \"xds_experimental\":{} }\n"
" ]\n"
"}";
RefCountedPtr<ServiceConfig> service_config =
diff --git a/src/core/ext/filters/client_channel/xds/xds_client.h b/src/core/ext/filters/client_channel/xds/xds_client.h
index c5fc08c..d2d9dc7 100644
--- a/src/core/ext/filters/client_channel/xds/xds_client.h
+++ b/src/core/ext/filters/client_channel/xds/xds_client.h
@@ -100,10 +100,8 @@
EndpointWatcherInterface* watcher);
// Adds and removes client stats for cluster.
- void AddClientStats(StringView lrs_server, StringView cluster,
- XdsClientStats* client_stats);
- void RemoveClientStats(StringView lrs_server, StringView cluster,
- XdsClientStats* client_stats);
+ void AddClientStats(StringView cluster, XdsClientStats* client_stats);
+ void RemoveClientStats(StringView cluster, XdsClientStats* client_stats);
// Resets connection backoff state.
void ResetBackoff();
@@ -210,9 +208,8 @@
// The channel for communicating with the xds server.
OrphanablePtr<ChannelState> chand_;
- // TODO(juanlishen): As part of adding CDS support, replace
- // cluster_state_ with a map keyed by cluster name, so that we can
- // support multiple clusters for both CDS and EDS.
+ // TODO(roth): When we need support for multiple clusters, replace
+ // cluster_state_ with a map keyed by cluster name.
ClusterState cluster_state_;
// Map<StringView /*cluster*/, ClusterState, StringLess> clusters_;
diff --git a/src/core/lib/debug/trace.h b/src/core/lib/debug/trace.h
index 6a4a803..ac7b40e 100644
--- a/src/core/lib/debug/trace.h
+++ b/src/core/lib/debug/trace.h
@@ -116,12 +116,13 @@
#else
class DebugOnlyTraceFlag {
public:
- constexpr DebugOnlyTraceFlag(bool default_enabled, const char* name) {}
+ constexpr DebugOnlyTraceFlag(bool /*default_enabled*/, const char* /*name*/) {
+ }
constexpr bool enabled() const { return false; }
constexpr const char* name() const { return "DebugOnlyTraceFlag"; }
private:
- void set_enabled(bool enabled) {}
+ void set_enabled(bool /*enabled*/) {}
};
#endif
diff --git a/src/core/lib/gprpp/memory.h b/src/core/lib/gprpp/memory.h
index f0c6bb1..9a1628b 100644
--- a/src/core/lib/gprpp/memory.h
+++ b/src/core/lib/gprpp/memory.h
@@ -107,7 +107,7 @@
pointer address(reference x) const { return &x; }
const_pointer address(const_reference x) const { return &x; }
pointer allocate(std::size_t n,
- std::allocator<void>::const_pointer hint = nullptr) {
+ std::allocator<void>::const_pointer /*hint*/ = nullptr) {
return static_cast<pointer>(gpr_malloc(n * sizeof(T)));
}
void deallocate(T* p, std::size_t /* n */) { gpr_free(p); }
@@ -132,7 +132,7 @@
}
template <class T, class U>
-bool operator!=(Allocator<T> const& x, Allocator<U> const& y) noexcept {
+bool operator!=(Allocator<T> const& /*x*/, Allocator<U> const& /*y*/) noexcept {
return false;
}
diff --git a/src/core/lib/gprpp/ref_counted.h b/src/core/lib/gprpp/ref_counted.h
index ff0d3a0..e8288a3 100644
--- a/src/core/lib/gprpp/ref_counted.h
+++ b/src/core/lib/gprpp/ref_counted.h
@@ -69,7 +69,14 @@
// Note: RefCount tracing is only enabled on debug builds, even when a
// TraceFlag is used.
template <typename TraceFlagT = TraceFlag>
- constexpr explicit RefCount(Value init = 1, TraceFlagT* trace_flag = nullptr)
+ constexpr explicit RefCount(
+ Value init = 1,
+ TraceFlagT*
+#ifndef NDEBUG
+ // Leave unnamed if NDEBUG to avoid unused parameter warning
+ trace_flag
+#endif
+ = nullptr)
:
#ifndef NDEBUG
trace_flag_(trace_flag),
@@ -98,6 +105,10 @@
prior, prior + n, reason);
}
#else
+ // Use conditionally-important parameters
+ (void)location;
+ (void)reason;
+
value_.FetchAdd(n, MemoryOrder::RELAXED);
#endif
}
@@ -125,6 +136,9 @@
}
assert(prior > 0);
#else
+ // Avoid unused-parameter warnings for debug-only parameters
+ (void)location;
+ (void)reason;
RefNonZero();
#endif
}
@@ -150,6 +164,9 @@
prior, prior + 1, reason);
}
#endif
+ // Avoid unused-parameter warnings for debug-only parameters
+ (void)location;
+ (void)reason;
return value_.IncrementIfNonzero();
}
@@ -184,6 +201,10 @@
prior - 1, reason);
}
GPR_DEBUG_ASSERT(prior > 0);
+#else
+ // Avoid unused-parameter warnings for debug-only parameters
+ (void)location;
+ (void)reason;
#endif
return prior == 1;
}
diff --git a/src/core/lib/http/httpcli.cc b/src/core/lib/http/httpcli.cc
index 93bb143..7319409 100644
--- a/src/core/lib/http/httpcli.cc
+++ b/src/core/lib/http/httpcli.cc
@@ -66,7 +66,7 @@
static grpc_httpcli_post_override g_post_override = nullptr;
static void plaintext_handshake(void* arg, grpc_endpoint* endpoint,
- const char* host, grpc_millis deadline,
+ const char* /*host*/, grpc_millis /*deadline*/,
void (*on_done)(void* arg,
grpc_endpoint* endpoint)) {
on_done(arg, endpoint);
diff --git a/src/core/lib/http/httpcli_security_connector.cc b/src/core/lib/http/httpcli_security_connector.cc
index e675062..fef467e 100644
--- a/src/core/lib/http/httpcli_security_connector.cc
+++ b/src/core/lib/http/httpcli_security_connector.cc
@@ -67,7 +67,7 @@
}
void add_handshakers(const grpc_channel_args* args,
- grpc_pollset_set* interested_parties,
+ grpc_pollset_set* /*interested_parties*/,
grpc_core::HandshakeManager* handshake_mgr) override {
tsi_handshaker* handshaker = nullptr;
if (handshaker_factory_ != nullptr) {
@@ -86,7 +86,7 @@
return handshaker_factory_;
}
- void check_peer(tsi_peer peer, grpc_endpoint* ep,
+ void check_peer(tsi_peer peer, grpc_endpoint* /*ep*/,
grpc_core::RefCountedPtr<grpc_auth_context>* /*auth_context*/,
grpc_closure* on_peer_checked) override {
grpc_error* error = GRPC_ERROR_NONE;
@@ -111,15 +111,15 @@
return strcmp(secure_peer_name_, other->secure_peer_name_);
}
- bool check_call_host(grpc_core::StringView host,
- grpc_auth_context* auth_context,
- grpc_closure* on_call_host_checked,
+ bool check_call_host(grpc_core::StringView /*host*/,
+ grpc_auth_context* /*auth_context*/,
+ grpc_closure* /*on_call_host_checked*/,
grpc_error** error) override {
*error = GRPC_ERROR_NONE;
return true;
}
- void cancel_check_call_host(grpc_closure* on_call_host_checked,
+ void cancel_check_call_host(grpc_closure* /*on_call_host_checked*/,
grpc_error* error) override {
GRPC_ERROR_UNREF(error);
}
@@ -134,7 +134,7 @@
static grpc_core::RefCountedPtr<grpc_channel_security_connector>
httpcli_ssl_channel_security_connector_create(
const char* pem_root_certs, const tsi_ssl_root_certs_store* root_store,
- const char* secure_peer_name, grpc_channel_args* channel_args) {
+ const char* secure_peer_name, grpc_channel_args* /*channel_args*/) {
if (secure_peer_name != nullptr && pem_root_certs == nullptr) {
gpr_log(GPR_ERROR,
"Cannot assert a secure peer name without a trust root.");
diff --git a/src/core/lib/http/parser.cc b/src/core/lib/http/parser.cc
index 58608da..022ef9a 100644
--- a/src/core/lib/http/parser.cc
+++ b/src/core/lib/http/parser.cc
@@ -327,7 +327,7 @@
parser->cur_line_end_length = 2;
}
-void grpc_http_parser_destroy(grpc_http_parser* parser) {}
+void grpc_http_parser_destroy(grpc_http_parser* /*parser*/) {}
void grpc_http_request_destroy(grpc_http_request* request) {
size_t i;
diff --git a/src/core/lib/iomgr/buffer_list.cc b/src/core/lib/iomgr/buffer_list.cc
index 7391593..f2691b0 100644
--- a/src/core/lib/iomgr/buffer_list.cc
+++ b/src/core/lib/iomgr/buffer_list.cc
@@ -39,8 +39,8 @@
gts->clock_type = GPR_CLOCK_REALTIME;
}
-void default_timestamps_callback(void* arg, grpc_core::Timestamps* ts,
- grpc_error* shudown_err) {
+void default_timestamps_callback(void* /*arg*/, grpc_core::Timestamps* /*ts*/,
+ grpc_error* /*shudown_err*/) {
gpr_log(GPR_DEBUG, "Timestamps callback has not been registered");
}
@@ -293,9 +293,8 @@
#else /* GRPC_LINUX_ERRQUEUE */
namespace grpc_core {
-void grpc_tcp_set_write_timestamps_callback(void (*fn)(void*,
- grpc_core::Timestamps*,
- grpc_error* error)) {
+void grpc_tcp_set_write_timestamps_callback(
+ void (*/*fn*/)(void*, grpc_core::Timestamps*, grpc_error* error)) {
gpr_log(GPR_DEBUG, "Timestamps callback is not enabled for this platform");
}
} /* namespace grpc_core */
diff --git a/src/core/lib/iomgr/buffer_list.h b/src/core/lib/iomgr/buffer_list.h
index 8818f3c..c2552ca 100644
--- a/src/core/lib/iomgr/buffer_list.h
+++ b/src/core/lib/iomgr/buffer_list.h
@@ -146,7 +146,7 @@
class TracedBuffer {
public:
/* Dummy shutdown function */
- static void Shutdown(grpc_core::TracedBuffer** head, void* remaining,
+ static void Shutdown(grpc_core::TracedBuffer** /*head*/, void* /*remaining*/,
grpc_error* shutdown_err) {
GRPC_ERROR_UNREF(shutdown_err);
}
diff --git a/src/core/lib/iomgr/combiner.cc b/src/core/lib/iomgr/combiner.cc
index cfb4bbd..3800b51 100644
--- a/src/core/lib/iomgr/combiner.cc
+++ b/src/core/lib/iomgr/combiner.cc
@@ -168,7 +168,7 @@
}
}
-static void offload(void* arg, grpc_error* error) {
+static void offload(void* arg, grpc_error* /*error*/) {
grpc_core::Combiner* lock = static_cast<grpc_core::Combiner*>(arg);
push_last_on_exec_ctx(lock);
}
diff --git a/src/core/lib/iomgr/ev_epoll1_linux.cc b/src/core/lib/iomgr/ev_epoll1_linux.cc
index 0c357dd..f8f9aa2 100644
--- a/src/core/lib/iomgr/ev_epoll1_linux.cc
+++ b/src/core/lib/iomgr/ev_epoll1_linux.cc
@@ -658,7 +658,7 @@
NOTE ON SYNCRHONIZATION: Similar to do_epoll_wait(), this function is only
called by g_active_poller thread. So there is no need for synchronization
when accessing fields in g_epoll_set */
-static grpc_error* process_epoll_events(grpc_pollset* pollset) {
+static grpc_error* process_epoll_events(grpc_pollset* /*pollset*/) {
GPR_TIMER_SCOPE("process_epoll_events", 0);
static const char* err_desc = "process_events";
@@ -1219,7 +1219,7 @@
return ret_err;
}
-static void pollset_add_fd(grpc_pollset* pollset, grpc_fd* fd) {}
+static void pollset_add_fd(grpc_pollset* /*pollset*/, grpc_fd* /*fd*/) {}
/*******************************************************************************
* Pollset-set Definitions
@@ -1229,21 +1229,23 @@
return (grpc_pollset_set*)(static_cast<intptr_t>(0xdeafbeef));
}
-static void pollset_set_destroy(grpc_pollset_set* pss) {}
+static void pollset_set_destroy(grpc_pollset_set* /*pss*/) {}
-static void pollset_set_add_fd(grpc_pollset_set* pss, grpc_fd* fd) {}
+static void pollset_set_add_fd(grpc_pollset_set* /*pss*/, grpc_fd* /*fd*/) {}
-static void pollset_set_del_fd(grpc_pollset_set* pss, grpc_fd* fd) {}
+static void pollset_set_del_fd(grpc_pollset_set* /*pss*/, grpc_fd* /*fd*/) {}
-static void pollset_set_add_pollset(grpc_pollset_set* pss, grpc_pollset* ps) {}
+static void pollset_set_add_pollset(grpc_pollset_set* /*pss*/,
+ grpc_pollset* /*ps*/) {}
-static void pollset_set_del_pollset(grpc_pollset_set* pss, grpc_pollset* ps) {}
+static void pollset_set_del_pollset(grpc_pollset_set* /*pss*/,
+ grpc_pollset* /*ps*/) {}
-static void pollset_set_add_pollset_set(grpc_pollset_set* bag,
- grpc_pollset_set* item) {}
+static void pollset_set_add_pollset_set(grpc_pollset_set* /*bag*/,
+ grpc_pollset_set* /*item*/) {}
-static void pollset_set_del_pollset_set(grpc_pollset_set* bag,
- grpc_pollset_set* item) {}
+static void pollset_set_del_pollset_set(grpc_pollset_set* /*bag*/,
+ grpc_pollset_set* /*item*/) {}
/*******************************************************************************
* Event engine binding
@@ -1253,8 +1255,8 @@
static void shutdown_background_closure(void) {}
-static bool add_closure_to_background_poller(grpc_closure* closure,
- grpc_error* error) {
+static bool add_closure_to_background_poller(grpc_closure* /*closure*/,
+ grpc_error* /*error*/) {
return false;
}
@@ -1325,7 +1327,8 @@
/* It is possible that GLIBC has epoll but the underlying kernel doesn't.
* Create epoll_fd (epoll_set_init() takes care of that) to make sure epoll
* support is available */
-const grpc_event_engine_vtable* grpc_init_epoll1_linux(bool explicit_request) {
+const grpc_event_engine_vtable* grpc_init_epoll1_linux(
+ bool /*explicit_request*/) {
if (!grpc_has_wakeup_fd()) {
gpr_log(GPR_ERROR, "Skipping epoll1 because of no wakeup fd.");
return nullptr;
@@ -1356,7 +1359,8 @@
#include "src/core/lib/iomgr/ev_epoll1_linux.h"
/* If GRPC_LINUX_EPOLL is not defined, it means epoll is not available. Return
* NULL */
-const grpc_event_engine_vtable* grpc_init_epoll1_linux(bool explicit_request) {
+const grpc_event_engine_vtable* grpc_init_epoll1_linux(
+ bool /*explicit_request*/) {
return nullptr;
}
#endif /* defined(GRPC_POSIX_SOCKET_EV_EPOLL1) */
diff --git a/src/core/lib/iomgr/executor/threadpool.cc b/src/core/lib/iomgr/executor/threadpool.cc
index e203252..8c9fd18 100644
--- a/src/core/lib/iomgr/executor/threadpool.cc
+++ b/src/core/lib/iomgr/executor/threadpool.cc
@@ -58,8 +58,7 @@
threads_ = static_cast<ThreadPoolWorker**>(
gpr_zalloc(num_threads_ * sizeof(ThreadPoolWorker*)));
for (int i = 0; i < num_threads_; ++i) {
- threads_[i] =
- New<ThreadPoolWorker>(thd_name_, this, queue_, thread_options_, i);
+ threads_[i] = New<ThreadPoolWorker>(thd_name_, queue_, thread_options_, i);
threads_[i]->Start();
}
}
diff --git a/src/core/lib/iomgr/executor/threadpool.h b/src/core/lib/iomgr/executor/threadpool.h
index 3336ca0..01a00c0 100644
--- a/src/core/lib/iomgr/executor/threadpool.h
+++ b/src/core/lib/iomgr/executor/threadpool.h
@@ -62,9 +62,8 @@
// NULL closure.
class ThreadPoolWorker {
public:
- ThreadPoolWorker(const char* thd_name, ThreadPoolInterface* /*pool*/,
- MPMCQueueInterface* queue, Thread::Options& options,
- int index)
+ ThreadPoolWorker(const char* thd_name, MPMCQueueInterface* queue,
+ Thread::Options& options, int index)
: queue_(queue), thd_name_(thd_name), index_(index) {
thd_ = Thread(thd_name,
[](void* th) { static_cast<ThreadPoolWorker*>(th)->Run(); },
diff --git a/src/core/lib/iomgr/tcp_custom.cc b/src/core/lib/iomgr/tcp_custom.cc
index 0b1cff4..d594f01 100644
--- a/src/core/lib/iomgr/tcp_custom.cc
+++ b/src/core/lib/iomgr/tcp_custom.cc
@@ -193,7 +193,7 @@
}
static void endpoint_read(grpc_endpoint* ep, grpc_slice_buffer* read_slices,
- grpc_closure* cb, bool urgent) {
+ grpc_closure* cb, bool /*urgent*/) {
custom_tcp_endpoint* tcp = (custom_tcp_endpoint*)ep;
GRPC_CUSTOM_IOMGR_ASSERT_SAME_THREAD();
GPR_ASSERT(tcp->read_cb == nullptr);
@@ -224,7 +224,7 @@
}
static void endpoint_write(grpc_endpoint* ep, grpc_slice_buffer* write_slices,
- grpc_closure* cb, void* arg) {
+ grpc_closure* cb, void* /*arg*/) {
custom_tcp_endpoint* tcp = (custom_tcp_endpoint*)ep;
GRPC_CUSTOM_IOMGR_ASSERT_SAME_THREAD();
@@ -327,9 +327,9 @@
return tcp->resource_user;
}
-static int endpoint_get_fd(grpc_endpoint* ep) { return -1; }
+static int endpoint_get_fd(grpc_endpoint* /*ep*/) { return -1; }
-static bool endpoint_can_track_err(grpc_endpoint* ep) { return false; }
+static bool endpoint_can_track_err(grpc_endpoint* /*ep*/) { return false; }
static grpc_endpoint_vtable vtable = {endpoint_read,
endpoint_write,
diff --git a/src/core/lib/iomgr/tcp_posix.cc b/src/core/lib/iomgr/tcp_posix.cc
index 3c7c549..730980d 100644
--- a/src/core/lib/iomgr/tcp_posix.cc
+++ b/src/core/lib/iomgr/tcp_posix.cc
@@ -161,7 +161,7 @@
static void tcp_drop_uncovered_then_handle_write(void* arg /* grpc_tcp */,
grpc_error* error);
-static void done_poller(void* bp, grpc_error* error_ignored) {
+static void done_poller(void* bp, grpc_error* /*error_ignored*/) {
backup_poller* p = static_cast<backup_poller*>(bp);
if (GRPC_TRACE_FLAG_ENABLED(grpc_tcp_trace)) {
gpr_log(GPR_INFO, "BACKUP_POLLER:%p destroy", p);
@@ -170,7 +170,7 @@
gpr_free(p);
}
-static void run_poller(void* bp, grpc_error* error_ignored) {
+static void run_poller(void* bp, grpc_error* /*error_ignored*/) {
backup_poller* p = static_cast<backup_poller*>(bp);
if (GRPC_TRACE_FLAG_ENABLED(grpc_tcp_trace)) {
gpr_log(GPR_INFO, "BACKUP_POLLER:%p run", p);
@@ -206,7 +206,7 @@
}
}
-static void drop_uncovered(grpc_tcp* tcp) {
+static void drop_uncovered(grpc_tcp* /*tcp*/) {
backup_poller* p = (backup_poller*)gpr_atm_acq_load(&g_backup_poller);
gpr_atm old_count =
gpr_atm_full_fetch_add(&g_uncovered_notifications_pending, -1);
@@ -876,15 +876,16 @@
}
#else /* GRPC_LINUX_ERRQUEUE */
-static bool tcp_write_with_timestamps(grpc_tcp* tcp, struct msghdr* msg,
- size_t sending_length,
- ssize_t* sent_length) {
+static bool tcp_write_with_timestamps(grpc_tcp* /*tcp*/, struct msghdr* /*msg*/,
+ size_t /*sending_length*/,
+ ssize_t* /*sent_length*/) {
gpr_log(GPR_ERROR, "Write with timestamps not supported for this platform");
GPR_ASSERT(0);
return false;
}
-static void tcp_handle_error(void* arg /* grpc_tcp */, grpc_error* error) {
+static void tcp_handle_error(void* /*arg*/ /* grpc_tcp */,
+ grpc_error* /*error*/) {
gpr_log(GPR_ERROR, "Error handling is not supported for this platform");
GPR_ASSERT(0);
}
diff --git a/src/core/lib/iomgr/tcp_server_custom.cc b/src/core/lib/iomgr/tcp_server_custom.cc
index 7107dcc..90ed555 100644
--- a/src/core/lib/iomgr/tcp_server_custom.cc
+++ b/src/core/lib/iomgr/tcp_server_custom.cc
@@ -439,13 +439,13 @@
}
}
-static unsigned tcp_server_port_fd_count(grpc_tcp_server* s,
- unsigned port_index) {
+static unsigned tcp_server_port_fd_count(grpc_tcp_server* /*s*/,
+ unsigned /*port_index*/) {
return 0;
}
-static int tcp_server_port_fd(grpc_tcp_server* s, unsigned port_index,
- unsigned fd_index) {
+static int tcp_server_port_fd(grpc_tcp_server* /*s*/, unsigned /*port_index*/,
+ unsigned /*fd_index*/) {
return -1;
}
@@ -459,7 +459,7 @@
}
static grpc_core::TcpServerFdHandler* tcp_server_create_fd_handler(
- grpc_tcp_server* s) {
+ grpc_tcp_server* /*s*/) {
return nullptr;
}
diff --git a/src/core/lib/iomgr/tcp_server_posix.cc b/src/core/lib/iomgr/tcp_server_posix.cc
index 689c005..b1637e9 100644
--- a/src/core/lib/iomgr/tcp_server_posix.cc
+++ b/src/core/lib/iomgr/tcp_server_posix.cc
@@ -124,7 +124,7 @@
gpr_free(s);
}
-static void destroyed_port(void* server, grpc_error* error) {
+static void destroyed_port(void* server, grpc_error* /*error*/) {
grpc_tcp_server* s = static_cast<grpc_tcp_server*>(server);
gpr_mu_lock(&s->mu);
s->destroyed_ports++;
diff --git a/src/core/lib/iomgr/timer_custom.cc b/src/core/lib/iomgr/timer_custom.cc
index 57675c2..0af30ca 100644
--- a/src/core/lib/iomgr/timer_custom.cc
+++ b/src/core/lib/iomgr/timer_custom.cc
@@ -30,7 +30,7 @@
static grpc_custom_timer_vtable* custom_timer_impl;
-void grpc_custom_timer_callback(grpc_custom_timer* t, grpc_error* error) {
+void grpc_custom_timer_callback(grpc_custom_timer* t, grpc_error* /*error*/) {
GRPC_CUSTOM_IOMGR_ASSERT_SAME_THREAD();
grpc_core::ApplicationCallbackExecCtx callback_exec_ctx;
grpc_core::ExecCtx exec_ctx;
@@ -75,7 +75,7 @@
}
}
-static grpc_timer_check_result timer_check(grpc_millis* next) {
+static grpc_timer_check_result timer_check(grpc_millis* /*next*/) {
return GRPC_TIMERS_NOT_CHECKED;
}
diff --git a/src/core/lib/iomgr/udp_server.cc b/src/core/lib/iomgr/udp_server.cc
index 3e85394..5f30a1d 100644
--- a/src/core/lib/iomgr/udp_server.cc
+++ b/src/core/lib/iomgr/udp_server.cc
@@ -260,7 +260,7 @@
grpc_core::Delete(s);
}
-static void destroyed_port(void* server, grpc_error* error) {
+static void destroyed_port(void* server, grpc_error* /*error*/) {
grpc_udp_server* s = static_cast<grpc_udp_server*>(server);
gpr_mu_lock(&s->mu);
s->destroyed_ports++;
@@ -495,7 +495,8 @@
// static
// Wrapper of grpc_fd_notify_on_write() with a grpc_closure callback interface.
-void GrpcUdpListener::fd_notify_on_write_wrapper(void* arg, grpc_error* error) {
+void GrpcUdpListener::fd_notify_on_write_wrapper(void* arg,
+ grpc_error* /*error*/) {
GrpcUdpListener* sp = static_cast<GrpcUdpListener*>(arg);
gpr_mu_lock(sp->mutex());
if (!sp->notify_on_write_armed_) {
diff --git a/src/core/lib/profiling/basic_timers.cc b/src/core/lib/profiling/basic_timers.cc
index 37689fe..2056940 100644
--- a/src/core/lib/profiling/basic_timers.cc
+++ b/src/core/lib/profiling/basic_timers.cc
@@ -287,7 +287,7 @@
void gpr_timers_global_destroy(void) {}
-void gpr_timers_set_log_filename(const char* filename) {}
+void gpr_timers_set_log_filename(const char* /*filename*/) {}
-void gpr_timer_set_enabled(int enabled) {}
+void gpr_timer_set_enabled(int /*enabled*/) {}
#endif /* GRPC_BASIC_PROFILER */
diff --git a/src/core/lib/security/credentials/alts/alts_credentials.cc b/src/core/lib/security/credentials/alts/alts_credentials.cc
index 9a33790..4c3c7e1 100644
--- a/src/core/lib/security/credentials/alts/alts_credentials.cc
+++ b/src/core/lib/security/credentials/alts/alts_credentials.cc
@@ -50,8 +50,8 @@
grpc_core::RefCountedPtr<grpc_channel_security_connector>
grpc_alts_credentials::create_security_connector(
grpc_core::RefCountedPtr<grpc_call_credentials> call_creds,
- const char* target_name, const grpc_channel_args* args,
- grpc_channel_args** new_args) {
+ const char* target_name, const grpc_channel_args* /*args*/,
+ grpc_channel_args** /*new_args*/) {
return grpc_alts_channel_security_connector_create(
this->Ref(), std::move(call_creds), target_name);
}
diff --git a/src/core/lib/security/credentials/alts/grpc_alts_credentials_server_options.cc b/src/core/lib/security/credentials/alts/grpc_alts_credentials_server_options.cc
index 1a59c45..72c6542 100644
--- a/src/core/lib/security/credentials/alts/grpc_alts_credentials_server_options.cc
+++ b/src/core/lib/security/credentials/alts/grpc_alts_credentials_server_options.cc
@@ -31,7 +31,7 @@
const grpc_alts_credentials_options* options);
static void alts_server_options_destroy(
- grpc_alts_credentials_options* options) {}
+ grpc_alts_credentials_options* /*options*/) {}
static const grpc_alts_credentials_options_vtable vtable = {
alts_server_options_copy, alts_server_options_destroy};
diff --git a/src/core/lib/security/credentials/fake/fake_credentials.cc b/src/core/lib/security/credentials/fake/fake_credentials.cc
index 337dd76..f6a04db 100644
--- a/src/core/lib/security/credentials/fake/fake_credentials.cc
+++ b/src/core/lib/security/credentials/fake/fake_credentials.cc
@@ -45,7 +45,7 @@
create_security_connector(
grpc_core::RefCountedPtr<grpc_call_credentials> call_creds,
const char* target, const grpc_channel_args* args,
- grpc_channel_args** new_args) override {
+ grpc_channel_args** /*new_args*/) override {
return grpc_fake_channel_security_connector_create(
this->Ref(), std::move(call_creds), target, args);
}
@@ -89,9 +89,9 @@
/* -- Metadata-only test credentials. -- */
bool grpc_md_only_test_credentials::get_request_metadata(
- grpc_polling_entity* pollent, grpc_auth_metadata_context context,
+ grpc_polling_entity* /*pollent*/, grpc_auth_metadata_context /*context*/,
grpc_credentials_mdelem_array* md_array, grpc_closure* on_request_metadata,
- grpc_error** error) {
+ grpc_error** /*error*/) {
grpc_credentials_mdelem_array_add(md_array, md_);
if (is_async_) {
GRPC_CLOSURE_SCHED(on_request_metadata, GRPC_ERROR_NONE);
@@ -101,7 +101,7 @@
}
void grpc_md_only_test_credentials::cancel_get_request_metadata(
- grpc_credentials_mdelem_array* md_array, grpc_error* error) {
+ grpc_credentials_mdelem_array* /*md_array*/, grpc_error* error) {
GRPC_ERROR_UNREF(error);
}
diff --git a/src/core/lib/security/security_connector/load_system_roots_linux.cc b/src/core/lib/security/security_connector/load_system_roots_linux.cc
index 82d5bf6..61b0b9b 100644
--- a/src/core/lib/security/security_connector/load_system_roots_linux.cc
+++ b/src/core/lib/security/security_connector/load_system_roots_linux.cc
@@ -66,6 +66,8 @@
grpc_load_file(kLinuxCertFiles[i], 1, &valid_bundle_slice);
if (error == GRPC_ERROR_NONE) {
return valid_bundle_slice;
+ } else {
+ GRPC_ERROR_UNREF(error);
}
}
return grpc_empty_slice();
diff --git a/src/core/lib/transport/status_conversion.cc b/src/core/lib/transport/status_conversion.cc
index e58bef5..5f86dac 100644
--- a/src/core/lib/transport/status_conversion.cc
+++ b/src/core/lib/transport/status_conversion.cc
@@ -97,4 +97,4 @@
}
}
-int grpc_status_to_http2_status(grpc_status_code status) { return 200; }
+int grpc_status_to_http2_status(grpc_status_code /*status*/) { return 200; }
diff --git a/src/core/lib/transport/status_metadata.cc b/src/core/lib/transport/status_metadata.cc
index 8ef9682..bdb3bbb 100644
--- a/src/core/lib/transport/status_metadata.cc
+++ b/src/core/lib/transport/status_metadata.cc
@@ -28,7 +28,7 @@
*/
#define STATUS_OFFSET 1
-static void destroy_status(void* ignored) {}
+static void destroy_status(void* /*ignored*/) {}
grpc_status_code grpc_get_status_code_from_metadata(grpc_mdelem md) {
if (grpc_mdelem_static_value_eq(md, GRPC_MDELEM_GRPC_STATUS_0)) {
diff --git a/src/core/lib/transport/transport.cc b/src/core/lib/transport/transport.cc
index 80ffabc..fe436e6 100644
--- a/src/core/lib/transport/transport.cc
+++ b/src/core/lib/transport/transport.cc
@@ -80,12 +80,12 @@
}
#ifndef NDEBUG
-void grpc_stream_ref_init(grpc_stream_refcount* refcount, int initial_refs,
+void grpc_stream_ref_init(grpc_stream_refcount* refcount, int /*initial_refs*/,
grpc_iomgr_cb_func cb, void* cb_arg,
const char* object_type) {
refcount->object_type = object_type;
#else
-void grpc_stream_ref_init(grpc_stream_refcount* refcount, int initial_refs,
+void grpc_stream_ref_init(grpc_stream_refcount* refcount, int /*initial_refs*/,
grpc_iomgr_cb_func cb, void* cb_arg) {
#endif
GRPC_CLOSURE_INIT(&refcount->destroy, cb, cb_arg, grpc_schedule_on_exec_ctx);
diff --git a/src/core/lib/transport/transport.h b/src/core/lib/transport/transport.h
index 8f46ce8..1837451 100644
--- a/src/core/lib/transport/transport.h
+++ b/src/core/lib/transport/transport.h
@@ -72,7 +72,10 @@
void grpc_stream_ref_init(grpc_stream_refcount* refcount, int initial_refs,
grpc_iomgr_cb_func cb, void* cb_arg);
#define GRPC_STREAM_REF_INIT(rc, ir, cb, cb_arg, objtype) \
- grpc_stream_ref_init(rc, ir, cb, cb_arg)
+ do { \
+ grpc_stream_ref_init(rc, ir, cb, cb_arg); \
+ (void)(objtype); \
+ } while (0)
#endif
#ifndef NDEBUG
diff --git a/src/core/tsi/alts/frame_protector/alts_unseal_privacy_integrity_crypter.cc b/src/core/tsi/alts/frame_protector/alts_unseal_privacy_integrity_crypter.cc
index 51bea24..a5b7003 100644
--- a/src/core/tsi/alts/frame_protector/alts_unseal_privacy_integrity_crypter.cc
+++ b/src/core/tsi/alts/frame_protector/alts_unseal_privacy_integrity_crypter.cc
@@ -33,7 +33,7 @@
/* Perform input santity check. */
static grpc_status_code unseal_check(alts_crypter* c, const unsigned char* data,
- size_t data_allocated_size,
+ size_t /*data_allocated_size*/,
size_t data_size, size_t* output_size,
char** error_details) {
/* Do common input sanity check. */
diff --git a/src/core/tsi/alts/handshaker/alts_shared_resource.cc b/src/core/tsi/alts/handshaker/alts_shared_resource.cc
index 3501257..255eda5 100644
--- a/src/core/tsi/alts/handshaker/alts_shared_resource.cc
+++ b/src/core/tsi/alts/handshaker/alts_shared_resource.cc
@@ -30,7 +30,7 @@
return &g_alts_resource_dedicated;
}
-static void thread_worker(void* arg) {
+static void thread_worker(void* /*arg*/) {
while (true) {
grpc_event event =
grpc_completion_queue_next(g_alts_resource_dedicated.cq,
diff --git a/src/core/tsi/alts/handshaker/alts_tsi_handshaker.cc b/src/core/tsi/alts/handshaker/alts_tsi_handshaker.cc
index c5383b3..c6018af 100644
--- a/src/core/tsi/alts/handshaker/alts_tsi_handshaker.cc
+++ b/src/core/tsi/alts/handshaker/alts_tsi_handshaker.cc
@@ -264,18 +264,18 @@
/* gRPC provided callback used when dedicatd CQ and thread are used.
* It serves to safely bring the control back to application. */
static void on_handshaker_service_resp_recv_dedicated(void* arg,
- grpc_error* error) {
+ grpc_error* /*error*/) {
alts_shared_resource_dedicated* resource =
grpc_alts_get_shared_resource_dedicated();
grpc_cq_end_op(resource->cq, arg, GRPC_ERROR_NONE,
- [](void* done_arg, grpc_cq_completion* storage) {}, nullptr,
- &resource->storage);
+ [](void* /*done_arg*/, grpc_cq_completion* /*storage*/) {},
+ nullptr, &resource->storage);
}
static tsi_result handshaker_next(
tsi_handshaker* self, const unsigned char* received_bytes,
- size_t received_bytes_size, const unsigned char** bytes_to_send,
- size_t* bytes_to_send_size, tsi_handshaker_result** result,
+ size_t received_bytes_size, const unsigned char** /*bytes_to_send*/,
+ size_t* /*bytes_to_send_size*/, tsi_handshaker_result** /*result*/,
tsi_handshaker_on_next_done_cb cb, void* user_data) {
if (self == nullptr || cb == nullptr) {
gpr_log(GPR_ERROR, "Invalid arguments to handshaker_next()");
diff --git a/src/core/tsi/fake_transport_security.cc b/src/core/tsi/fake_transport_security.cc
index 8fe9013..b12ae9b 100644
--- a/src/core/tsi/fake_transport_security.cc
+++ b/src/core/tsi/fake_transport_security.cc
@@ -495,7 +495,7 @@
} fake_handshaker_result;
static tsi_result fake_handshaker_result_extract_peer(
- const tsi_handshaker_result* self, tsi_peer* peer) {
+ const tsi_handshaker_result* /*self*/, tsi_peer* peer) {
/* Construct a tsi_peer with 1 property: certificate type. */
tsi_result result = tsi_construct_peer(1, peer);
if (result != TSI_OK) return result;
@@ -507,7 +507,8 @@
}
static tsi_result fake_handshaker_result_create_zero_copy_grpc_protector(
- const tsi_handshaker_result* self, size_t* max_output_protected_frame_size,
+ const tsi_handshaker_result* /*self*/,
+ size_t* max_output_protected_frame_size,
tsi_zero_copy_grpc_protector** protector) {
*protector =
tsi_create_fake_zero_copy_grpc_protector(max_output_protected_frame_size);
@@ -515,8 +516,8 @@
}
static tsi_result fake_handshaker_result_create_frame_protector(
- const tsi_handshaker_result* self, size_t* max_output_protected_frame_size,
- tsi_frame_protector** protector) {
+ const tsi_handshaker_result* /*self*/,
+ size_t* max_output_protected_frame_size, tsi_frame_protector** protector) {
*protector = tsi_create_fake_frame_protector(max_output_protected_frame_size);
return TSI_OK;
}
@@ -670,7 +671,7 @@
tsi_handshaker* self, const unsigned char* received_bytes,
size_t received_bytes_size, const unsigned char** bytes_to_send,
size_t* bytes_to_send_size, tsi_handshaker_result** handshaker_result,
- tsi_handshaker_on_next_done_cb cb, void* user_data) {
+ tsi_handshaker_on_next_done_cb /*cb*/, void* /*user_data*/) {
/* Sanity check the arguments. */
if ((received_bytes_size > 0 && received_bytes == nullptr) ||
bytes_to_send == nullptr || bytes_to_send_size == nullptr ||
diff --git a/src/core/tsi/local_transport_security.cc b/src/core/tsi/local_transport_security.cc
index ffd19a2..f7e004f 100644
--- a/src/core/tsi/local_transport_security.cc
+++ b/src/core/tsi/local_transport_security.cc
@@ -105,12 +105,13 @@
/* --- tsi_handshaker_result methods implementation. --- */
static tsi_result handshaker_result_extract_peer(
- const tsi_handshaker_result* self, tsi_peer* peer) {
+ const tsi_handshaker_result* /*self*/, tsi_peer* /*peer*/) {
return TSI_OK;
}
static tsi_result handshaker_result_create_zero_copy_grpc_protector(
- const tsi_handshaker_result* self, size_t* max_output_protected_frame_size,
+ const tsi_handshaker_result* self,
+ size_t* /*max_output_protected_frame_size*/,
tsi_zero_copy_grpc_protector** protector) {
if (self == nullptr || protector == nullptr) {
gpr_log(GPR_ERROR,
@@ -158,10 +159,10 @@
/* --- tsi_handshaker methods implementation. --- */
static tsi_result handshaker_next(
- tsi_handshaker* self, const unsigned char* received_bytes,
- size_t received_bytes_size, const unsigned char** bytes_to_send,
+ tsi_handshaker* self, const unsigned char* /*received_bytes*/,
+ size_t /*received_bytes_size*/, const unsigned char** /*bytes_to_send*/,
size_t* bytes_to_send_size, tsi_handshaker_result** result,
- tsi_handshaker_on_next_done_cb cb, void* user_data) {
+ tsi_handshaker_on_next_done_cb /*cb*/, void* /*user_data*/) {
if (self == nullptr) {
gpr_log(GPR_ERROR, "Invalid arguments to handshaker_next()");
return TSI_INVALID_ARGUMENT;
diff --git a/src/core/tsi/ssl/session_cache/ssl_session_cache.cc b/src/core/tsi/ssl/session_cache/ssl_session_cache.cc
index ba0745a..8e3a78f 100644
--- a/src/core/tsi/ssl/session_cache/ssl_session_cache.cc
+++ b/src/core/tsi/ssl/session_cache/ssl_session_cache.cc
@@ -28,18 +28,20 @@
namespace tsi {
-static void cache_key_avl_destroy(void* key, void* unused) {}
+static void cache_key_avl_destroy(void* /*key*/, void* /*unused*/) {}
-static void* cache_key_avl_copy(void* key, void* unused) { return key; }
+static void* cache_key_avl_copy(void* key, void* /*unused*/) { return key; }
-static long cache_key_avl_compare(void* key1, void* key2, void* unused) {
+static long cache_key_avl_compare(void* key1, void* key2, void* /*unused*/) {
return grpc_slice_cmp(*static_cast<grpc_slice*>(key1),
*static_cast<grpc_slice*>(key2));
}
-static void cache_value_avl_destroy(void* value, void* unused) {}
+static void cache_value_avl_destroy(void* /*value*/, void* /*unused*/) {}
-static void* cache_value_avl_copy(void* value, void* unused) { return value; }
+static void* cache_value_avl_copy(void* value, void* /*unused*/) {
+ return value;
+}
// AVL only stores pointers, ownership belonges to the linked list.
static const grpc_avl_vtable cache_avl_vtable = {
diff --git a/src/core/tsi/ssl_transport_security.cc b/src/core/tsi/ssl_transport_security.cc
index a5b4a55..f062c45 100644
--- a/src/core/tsi/ssl_transport_security.cc
+++ b/src/core/tsi/ssl_transport_security.cc
@@ -774,7 +774,7 @@
// the server's certificate, but we need to pull it anyway, in case a higher
// layer wants to look at it. In this case the verification may fail, but
// we don't really care.
-static int NullVerifyCallback(int preverify_ok, X509_STORE_CTX* ctx) {
+static int NullVerifyCallback(int /*preverify_ok*/, X509_STORE_CTX* /*ctx*/) {
return 1;
}
@@ -1265,7 +1265,7 @@
tsi_handshaker* self, const unsigned char* received_bytes,
size_t received_bytes_size, const unsigned char** bytes_to_send,
size_t* bytes_to_send_size, tsi_handshaker_result** handshaker_result,
- tsi_handshaker_on_next_done_cb cb, void* user_data) {
+ tsi_handshaker_on_next_done_cb /*cb*/, void* /*user_data*/) {
/* Input sanity check. */
if ((received_bytes_size > 0 && received_bytes == nullptr) ||
bytes_to_send == nullptr || bytes_to_send_size == nullptr ||
@@ -1465,11 +1465,9 @@
gpr_free(self);
}
-static int client_handshaker_factory_npn_callback(SSL* ssl, unsigned char** out,
- unsigned char* outlen,
- const unsigned char* in,
- unsigned int inlen,
- void* arg) {
+static int client_handshaker_factory_npn_callback(
+ SSL* /*ssl*/, unsigned char** out, unsigned char* outlen,
+ const unsigned char* in, unsigned int inlen, void* arg) {
tsi_ssl_client_handshaker_factory* factory =
static_cast<tsi_ssl_client_handshaker_factory*>(arg);
return select_protocol_list((const unsigned char**)out, outlen,
@@ -1556,7 +1554,8 @@
return !entry.empty() && name_subdomain == entry;
}
-static int ssl_server_handshaker_factory_servername_callback(SSL* ssl, int* ap,
+static int ssl_server_handshaker_factory_servername_callback(SSL* ssl,
+ int* /*ap*/,
void* arg) {
tsi_ssl_server_handshaker_factory* impl =
static_cast<tsi_ssl_server_handshaker_factory*>(arg);
@@ -1579,7 +1578,7 @@
#if TSI_OPENSSL_ALPN_SUPPORT
static int server_handshaker_factory_alpn_callback(
- SSL* ssl, const unsigned char** out, unsigned char* outlen,
+ SSL* /*ssl*/, const unsigned char** out, unsigned char* outlen,
const unsigned char* in, unsigned int inlen, void* arg) {
tsi_ssl_server_handshaker_factory* factory =
static_cast<tsi_ssl_server_handshaker_factory*>(arg);
@@ -1590,7 +1589,7 @@
#endif /* TSI_OPENSSL_ALPN_SUPPORT */
static int server_handshaker_factory_npn_advertised_callback(
- SSL* ssl, const unsigned char** out, unsigned int* outlen, void* arg) {
+ SSL* /*ssl*/, const unsigned char** out, unsigned int* outlen, void* arg) {
tsi_ssl_server_handshaker_factory* factory =
static_cast<tsi_ssl_server_handshaker_factory*>(arg);
*out = factory->alpn_protocol_list;
diff --git a/src/cpp/client/channel_cc.cc b/src/cpp/client/channel_cc.cc
index de0f4e1..601bc1d 100644
--- a/src/cpp/client/channel_cc.cc
+++ b/src/cpp/client/channel_cc.cc
@@ -180,7 +180,7 @@
public:
explicit TagSaver(void* tag) : tag_(tag) {}
~TagSaver() override {}
- bool FinalizeResult(void** tag, bool* status) override {
+ bool FinalizeResult(void** tag, bool* /*status*/) override {
*tag = tag_;
delete this;
return true;
diff --git a/src/cpp/client/client_context.cc b/src/cpp/client/client_context.cc
index fc44b65..0aaaa54 100644
--- a/src/cpp/client/client_context.cc
+++ b/src/cpp/client/client_context.cc
@@ -39,8 +39,8 @@
: public ClientContext::GlobalCallbacks {
public:
~DefaultGlobalClientCallbacks() override {}
- void DefaultConstructor(ClientContext* context) override {}
- void Destructor(ClientContext* context) override {}
+ void DefaultConstructor(ClientContext* /*context*/) override {}
+ void Destructor(ClientContext* /*context*/) override {}
};
static grpc::internal::GrpcLibraryInitializer g_gli_initializer;
diff --git a/src/cpp/common/alarm.cc b/src/cpp/common/alarm.cc
index dbec80c..2757350 100644
--- a/src/cpp/common/alarm.cc
+++ b/src/cpp/common/alarm.cc
@@ -41,7 +41,7 @@
grpc_timer_init_unset(&timer_);
}
~AlarmImpl() {}
- bool FinalizeResult(void** tag, bool* status) override {
+ bool FinalizeResult(void** tag, bool* /*status*/) override {
*tag = tag_;
Unref();
return true;
@@ -53,22 +53,23 @@
cq_ = cq->cq();
tag_ = tag;
GPR_ASSERT(grpc_cq_begin_op(cq_, this));
- GRPC_CLOSURE_INIT(&on_alarm_,
- [](void* arg, grpc_error* error) {
- // queue the op on the completion queue
- AlarmImpl* alarm = static_cast<AlarmImpl*>(arg);
- alarm->Ref();
- // Preserve the cq and reset the cq_ so that the alarm
- // can be reset when the alarm tag is delivered.
- grpc_completion_queue* cq = alarm->cq_;
- alarm->cq_ = nullptr;
- grpc_cq_end_op(
- cq, alarm, error,
- [](void* arg, grpc_cq_completion* completion) {},
- arg, &alarm->completion_);
- GRPC_CQ_INTERNAL_UNREF(cq, "alarm");
- },
- this, grpc_schedule_on_exec_ctx);
+ GRPC_CLOSURE_INIT(
+ &on_alarm_,
+ [](void* arg, grpc_error* error) {
+ // queue the op on the completion queue
+ AlarmImpl* alarm = static_cast<AlarmImpl*>(arg);
+ alarm->Ref();
+ // Preserve the cq and reset the cq_ so that the alarm
+ // can be reset when the alarm tag is delivered.
+ grpc_completion_queue* cq = alarm->cq_;
+ alarm->cq_ = nullptr;
+ grpc_cq_end_op(
+ cq, alarm, error,
+ [](void* /*arg*/, grpc_cq_completion* /*completion*/) {}, arg,
+ &alarm->completion_);
+ GRPC_CQ_INTERNAL_UNREF(cq, "alarm");
+ },
+ this, grpc_schedule_on_exec_ctx);
grpc_timer_init(&timer_, grpc_timespec_to_millis_round_up(deadline),
&on_alarm_);
}
diff --git a/src/cpp/server/channel_argument_option.cc b/src/cpp/server/channel_argument_option.cc
index 4d6be90..9bd091c 100644
--- a/src/cpp/server/channel_argument_option.cc
+++ b/src/cpp/server/channel_argument_option.cc
@@ -31,7 +31,8 @@
args->SetString(name_, value_);
}
virtual void UpdatePlugins(
- std::vector<std::unique_ptr<ServerBuilderPlugin>>* plugins) override {}
+ std::vector<std::unique_ptr<ServerBuilderPlugin>>* /*plugins*/)
+ override {}
private:
const grpc::string name_;
@@ -51,7 +52,8 @@
args->SetInt(name_, value_);
}
virtual void UpdatePlugins(
- std::vector<std::unique_ptr<ServerBuilderPlugin>>* plugins) override {}
+ std::vector<std::unique_ptr<ServerBuilderPlugin>>* /*plugins*/)
+ override {}
private:
const grpc::string name_;
diff --git a/src/cpp/server/health/health_check_service_server_builder_option.cc b/src/cpp/server/health/health_check_service_server_builder_option.cc
index 7148265..3fa384a 100644
--- a/src/cpp/server/health/health_check_service_server_builder_option.cc
+++ b/src/cpp/server/health/health_check_service_server_builder_option.cc
@@ -30,6 +30,6 @@
}
void HealthCheckServiceServerBuilderOption::UpdatePlugins(
- std::vector<std::unique_ptr<ServerBuilderPlugin>>* plugins) {}
+ std::vector<std::unique_ptr<ServerBuilderPlugin>>* /*plugins*/) {}
} // namespace grpc
diff --git a/src/cpp/server/server_context.cc b/src/cpp/server/server_context.cc
index 143fa3f..bf20c84 100644
--- a/src/cpp/server/server_context.cc
+++ b/src/cpp/server/server_context.cc
@@ -74,6 +74,9 @@
// But this class is not trivially destructible, so must actually call delete
// before allowing the arena to be freed
static void operator delete(void* /*ptr*/, std::size_t size) {
+ // Use size to avoid unused-parameter warning since assert seems to be
+ // compiled out and treated as unused in some gcc optimized versions.
+ (void)size;
assert(size == sizeof(CompletionOp));
}
diff --git a/src/objective-c/BoringSSL-GRPC.podspec b/src/objective-c/BoringSSL-GRPC.podspec
index 48acefa..26c20a0 100644
--- a/src/objective-c/BoringSSL-GRPC.podspec
+++ b/src/objective-c/BoringSSL-GRPC.podspec
@@ -4,7 +4,9 @@
# Please make modifications to
# `templates/src/objective-c/BoringSSL-GRPC.podspec.template` instead. This
# file can be regenerated from the template by running
-# `tools/buildgen/generate_projects.sh`.
+# `tools/buildgen/generate_projects.sh`. Because of some limitations of this
+# template, you might actually need to run the same script twice in a row.
+# (see err_data.c section)
# BoringSSL CocoaPods podspec
@@ -199,9 +201,14 @@
}
EOF
- # This is a bit ridiculous, but requiring people to install Go in order to build is slightly
- # more ridiculous IMO.
- # TODO(jcanizales): Translate err_data_generate.go into a Bash or Ruby script.
+ # To build boringssl, we need the generated file err_data.c, which is normally generated
+ # by boringssl's err_data_generate.go, but we already have a copy of err_data.c checked into the
+ # grpc/grpc repository that gets regenerated whenever we update the third_party/boringssl submodule.
+ # To make the podspec independent of the grpc repository, the .podspec.template just copies
+ # the contents of err_data.c directly into the .podspec.
+ # TODO(jtattermusch): avoid needing to run tools/buildgen/generate_projects.sh twice on update
+ # TODO(jtattermusch): another pre-generated copy of err_data.c is under third_party/boringssl-with-bazel
+ # investigate if we could use it.
cat > err_data.c <<EOF
/* Copyright (c) 2015, Google Inc.
*
@@ -216,14 +223,14 @@
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
* OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */
-
+
/* This file was generated by err_data_generate.go. */
-
+
#include <openssl/base.h>
#include <openssl/err.h>
#include <openssl/type_check.h>
-
-
+
+
OPENSSL_STATIC_ASSERT(ERR_LIB_NONE == 1, "library value changed");
OPENSSL_STATIC_ASSERT(ERR_LIB_SYS == 2, "library value changed");
OPENSSL_STATIC_ASSERT(ERR_LIB_BN == 3, "library value changed");
@@ -257,7 +264,7 @@
OPENSSL_STATIC_ASSERT(ERR_LIB_HKDF == 31, "library value changed");
OPENSSL_STATIC_ASSERT(ERR_LIB_USER == 32, "library value changed");
OPENSSL_STATIC_ASSERT(ERR_NUM_LIBS == 33, "number of libraries changed");
-
+
const uint32_t kOpenSSLReasonValues[] = {
0xc32083a,
0xc328854,
@@ -280,54 +287,54 @@
0xc3b00ea,
0xc3b88d6,
0x10320847,
- 0x10329574,
- 0x10331580,
- 0x10339599,
- 0x103415ac,
+ 0x1032959f,
+ 0x103315ab,
+ 0x103395c4,
+ 0x103415d7,
0x10348f27,
0x10350c60,
- 0x103595bf,
- 0x103615e9,
- 0x103695fc,
- 0x1037161b,
- 0x10379634,
- 0x10381649,
- 0x10389667,
- 0x10391676,
- 0x10399692,
- 0x103a16ad,
- 0x103a96bc,
- 0x103b16d8,
- 0x103b96f3,
- 0x103c1719,
+ 0x103595ea,
+ 0x10361614,
+ 0x10369627,
+ 0x10371646,
+ 0x1037965f,
+ 0x10381674,
+ 0x10389692,
+ 0x103916a1,
+ 0x103996bd,
+ 0x103a16d8,
+ 0x103a96e7,
+ 0x103b1703,
+ 0x103b971e,
+ 0x103c1744,
0x103c80ea,
- 0x103d172a,
- 0x103d973e,
- 0x103e175d,
- 0x103e976c,
- 0x103f1783,
- 0x103f9796,
+ 0x103d1755,
+ 0x103d9769,
+ 0x103e1788,
+ 0x103e9797,
+ 0x103f17ae,
+ 0x103f97c1,
0x10400c24,
- 0x104097a9,
- 0x104117c7,
- 0x104197da,
- 0x104217f4,
- 0x10429804,
- 0x10431818,
- 0x1043982e,
- 0x10441846,
- 0x1044985b,
- 0x1045186f,
- 0x10459881,
+ 0x104097d4,
+ 0x104117f2,
+ 0x10419805,
+ 0x1042181f,
+ 0x1042982f,
+ 0x10431843,
+ 0x10439859,
+ 0x10441871,
+ 0x10449886,
+ 0x1045189a,
+ 0x104598ac,
0x104605fd,
0x1046894f,
- 0x10471896,
- 0x104798ad,
- 0x104818c2,
- 0x104898d0,
+ 0x104718c1,
+ 0x104798d8,
+ 0x104818ed,
+ 0x104898fb,
0x10490e73,
- 0x1049970a,
- 0x104a15d4,
+ 0x10499735,
+ 0x104a15ff,
0x14320c07,
0x14328c15,
0x14330c24,
@@ -350,41 +357,43 @@
0x1838905b,
0x18390a75,
0x1839906b,
- 0x183a1080,
- 0x183a90a6,
+ 0x183a1091,
+ 0x183a90b7,
0x183b0c7f,
- 0x183b90db,
- 0x183c10ed,
- 0x183c90f8,
- 0x183d1108,
- 0x183d9119,
- 0x183e112a,
- 0x183e913c,
- 0x183f1165,
- 0x183f917e,
- 0x18401196,
+ 0x183b9106,
+ 0x183c1118,
+ 0x183c9123,
+ 0x183d1133,
+ 0x183d9144,
+ 0x183e1155,
+ 0x183e9167,
+ 0x183f1190,
+ 0x183f91a9,
+ 0x184011c1,
0x184086d5,
- 0x184110c9,
- 0x18419094,
- 0x184210b3,
+ 0x184110da,
+ 0x184190a5,
+ 0x184210c4,
0x18428c6c,
- 0x203211d0,
- 0x203291bd,
- 0x243211dc,
+ 0x18431080,
+ 0x184390ec,
+ 0x203211fb,
+ 0x203291e8,
+ 0x24321207,
0x24328995,
- 0x243311ee,
- 0x243391fb,
- 0x24341208,
- 0x2434921a,
- 0x24351229,
- 0x24359246,
- 0x24361253,
- 0x24369261,
- 0x2437126f,
- 0x2437927d,
- 0x24381286,
- 0x24389293,
- 0x243912a6,
+ 0x24331219,
+ 0x24339226,
+ 0x24341233,
+ 0x24349245,
+ 0x24351254,
+ 0x24359271,
+ 0x2436127e,
+ 0x2436928c,
+ 0x2437129a,
+ 0x243792a8,
+ 0x243812b1,
+ 0x243892be,
+ 0x243912d1,
0x28320c54,
0x28328c7f,
0x28330c24,
@@ -393,44 +402,44 @@
0x283480ac,
0x283500ea,
0x28358c6c,
- 0x2c322ec7,
- 0x2c3292bd,
- 0x2c332ed5,
- 0x2c33aee7,
- 0x2c342efb,
- 0x2c34af0d,
- 0x2c352f28,
- 0x2c35af3a,
- 0x2c362f4d,
+ 0x2c322f0c,
+ 0x2c3292e8,
+ 0x2c332f1a,
+ 0x2c33af2c,
+ 0x2c342f40,
+ 0x2c34af52,
+ 0x2c352f6d,
+ 0x2c35af7f,
+ 0x2c362f92,
0x2c36832d,
- 0x2c372f5a,
- 0x2c37af6c,
- 0x2c382f91,
- 0x2c38afa8,
- 0x2c392fb6,
- 0x2c39afc6,
- 0x2c3a2fd8,
- 0x2c3aafec,
- 0x2c3b2ffd,
- 0x2c3bb01c,
- 0x2c3c12cf,
- 0x2c3c92e5,
- 0x2c3d3030,
- 0x2c3d92fe,
- 0x2c3e304d,
- 0x2c3eb05b,
- 0x2c3f3073,
- 0x2c3fb08b,
- 0x2c4030b5,
- 0x2c4091d0,
- 0x2c4130c6,
- 0x2c41b0d9,
- 0x2c421196,
- 0x2c42b0ea,
+ 0x2c372f9f,
+ 0x2c37afb1,
+ 0x2c382fd6,
+ 0x2c38afed,
+ 0x2c392ffb,
+ 0x2c39b00b,
+ 0x2c3a301d,
+ 0x2c3ab031,
+ 0x2c3b3042,
+ 0x2c3bb061,
+ 0x2c3c12fa,
+ 0x2c3c9310,
+ 0x2c3d3075,
+ 0x2c3d9329,
+ 0x2c3e3092,
+ 0x2c3eb0a0,
+ 0x2c3f30b8,
+ 0x2c3fb0d0,
+ 0x2c4030fa,
+ 0x2c4091fb,
+ 0x2c41310b,
+ 0x2c41b11e,
+ 0x2c4211c1,
+ 0x2c42b12f,
0x2c430722,
- 0x2c43b00e,
- 0x2c442f7f,
- 0x2c44b098,
+ 0x2c43b053,
+ 0x2c442fc4,
+ 0x2c44b0dd,
0x30320000,
0x30328015,
0x3033001f,
@@ -565,240 +574,241 @@
0x3c418d67,
0x3c420e73,
0x3c428dfd,
- 0x40321946,
- 0x4032995c,
- 0x4033198a,
- 0x40339994,
- 0x403419ab,
- 0x403499c9,
- 0x403519d9,
- 0x403599eb,
- 0x403619f8,
- 0x40369a04,
- 0x40371a19,
- 0x40379a2b,
- 0x40381a36,
- 0x40389a48,
+ 0x40321971,
+ 0x40329987,
+ 0x403319b5,
+ 0x403399bf,
+ 0x403419d6,
+ 0x403499f4,
+ 0x40351a04,
+ 0x40359a16,
+ 0x40361a23,
+ 0x40369a2f,
+ 0x40371a44,
+ 0x40379a56,
+ 0x40381a61,
+ 0x40389a73,
0x40390f27,
- 0x40399a58,
- 0x403a1a6b,
- 0x403a9a8c,
- 0x403b1a9d,
- 0x403b9aad,
+ 0x40399a83,
+ 0x403a1a96,
+ 0x403a9ab7,
+ 0x403b1ac8,
+ 0x403b9ad8,
0x403c0064,
0x403c8083,
- 0x403d1b31,
- 0x403d9b47,
- 0x403e1b56,
- 0x403e9b8e,
- 0x403f1ba8,
- 0x403f9bd0,
- 0x40401be5,
- 0x40409bf9,
- 0x40411c16,
- 0x40419c31,
- 0x40421c4a,
- 0x40429c5d,
- 0x40431c71,
- 0x40439c89,
- 0x40441ca0,
+ 0x403d1b5c,
+ 0x403d9b72,
+ 0x403e1b81,
+ 0x403e9bb9,
+ 0x403f1bd3,
+ 0x403f9bfb,
+ 0x40401c10,
+ 0x40409c24,
+ 0x40411c41,
+ 0x40419c5c,
+ 0x40421c75,
+ 0x40429c88,
+ 0x40431c9c,
+ 0x40439cb4,
+ 0x40441ccb,
0x404480ac,
- 0x40451cb5,
- 0x40459cc7,
- 0x40461ceb,
- 0x40469d0b,
- 0x40471d19,
- 0x40479d40,
- 0x40481db1,
- 0x40489de4,
- 0x40491dfb,
- 0x40499e15,
- 0x404a1e2c,
- 0x404a9e4a,
- 0x404b1e62,
- 0x404b9e79,
- 0x404c1e8f,
- 0x404c9ea1,
- 0x404d1ec2,
- 0x404d9efb,
- 0x404e1f0f,
- 0x404e9f1c,
- 0x404f1f49,
- 0x404f9f8f,
- 0x40501fe6,
- 0x40509ffa,
- 0x4051202d,
- 0x4052203d,
- 0x4052a061,
- 0x40532079,
- 0x4053a08c,
- 0x405420a1,
- 0x4054a0c4,
- 0x405520d2,
- 0x4055a10f,
- 0x4056211c,
- 0x4056a135,
- 0x4057214d,
- 0x4057a160,
- 0x40582175,
- 0x4058a19c,
- 0x405921cb,
- 0x4059a1f8,
- 0x405a220c,
- 0x405aa21c,
- 0x405b2234,
- 0x405ba245,
- 0x405c2258,
- 0x405ca297,
- 0x405d22a4,
- 0x405da2c9,
- 0x405e2307,
+ 0x40451ce0,
+ 0x40459cf2,
+ 0x40461d16,
+ 0x40469d36,
+ 0x40471d44,
+ 0x40479d6b,
+ 0x40481ddc,
+ 0x40489e0f,
+ 0x40491e26,
+ 0x40499e40,
+ 0x404a1e57,
+ 0x404a9e75,
+ 0x404b1e8d,
+ 0x404b9ea4,
+ 0x404c1eba,
+ 0x404c9ecc,
+ 0x404d1eed,
+ 0x404d9f26,
+ 0x404e1f3a,
+ 0x404e9f47,
+ 0x404f1f8e,
+ 0x404f9fd4,
+ 0x4050202b,
+ 0x4050a03f,
+ 0x40512072,
+ 0x40522082,
+ 0x4052a0a6,
+ 0x405320be,
+ 0x4053a0d1,
+ 0x405420e6,
+ 0x4054a109,
+ 0x40552117,
+ 0x4055a154,
+ 0x40562161,
+ 0x4056a17a,
+ 0x40572192,
+ 0x4057a1a5,
+ 0x405821ba,
+ 0x4058a1e1,
+ 0x40592210,
+ 0x4059a23d,
+ 0x405a2251,
+ 0x405aa261,
+ 0x405b2279,
+ 0x405ba28a,
+ 0x405c229d,
+ 0x405ca2dc,
+ 0x405d22e9,
+ 0x405da30e,
+ 0x405e234c,
0x405e8ab3,
- 0x405f2328,
- 0x405fa335,
- 0x40602343,
- 0x4060a365,
- 0x406123c6,
- 0x4061a3fe,
- 0x40622415,
- 0x4062a426,
- 0x4063244b,
- 0x4063a460,
- 0x40642477,
- 0x4064a4a3,
- 0x406524be,
- 0x4065a4d5,
- 0x406624ed,
- 0x4066a517,
- 0x40672542,
- 0x4067a587,
- 0x406825cf,
- 0x4068a5f0,
- 0x40692622,
- 0x4069a650,
- 0x406a2671,
- 0x406aa691,
- 0x406b2819,
- 0x406ba83c,
- 0x406c2852,
- 0x406caaf5,
- 0x406d2b24,
- 0x406dab4c,
- 0x406e2b7a,
- 0x406eabc7,
- 0x406f2c02,
- 0x406fac3a,
- 0x40702c4d,
- 0x4070ac6a,
+ 0x405f236d,
+ 0x405fa37a,
+ 0x40602388,
+ 0x4060a3aa,
+ 0x4061240b,
+ 0x4061a443,
+ 0x4062245a,
+ 0x4062a46b,
+ 0x40632490,
+ 0x4063a4a5,
+ 0x406424bc,
+ 0x4064a4e8,
+ 0x40652503,
+ 0x4065a51a,
+ 0x40662532,
+ 0x4066a55c,
+ 0x40672587,
+ 0x4067a5cc,
+ 0x40682614,
+ 0x4068a635,
+ 0x40692667,
+ 0x4069a695,
+ 0x406a26b6,
+ 0x406aa6d6,
+ 0x406b285e,
+ 0x406ba881,
+ 0x406c2897,
+ 0x406cab3a,
+ 0x406d2b69,
+ 0x406dab91,
+ 0x406e2bbf,
+ 0x406eac0c,
+ 0x406f2c47,
+ 0x406fac7f,
+ 0x40702c92,
+ 0x4070acaf,
0x40710802,
- 0x4071ac7c,
- 0x40722c8f,
- 0x4072acc5,
- 0x40732cdd,
- 0x407394cf,
- 0x40742cf1,
- 0x4074ad0b,
- 0x40752d1c,
- 0x4075ad30,
- 0x40762d3e,
- 0x40769293,
- 0x40772d63,
- 0x4077ad85,
- 0x40782da0,
- 0x4078add9,
- 0x40792df0,
- 0x4079ae06,
- 0x407a2e32,
- 0x407aae45,
- 0x407b2e5a,
- 0x407bae6c,
- 0x407c2e9d,
- 0x407caea6,
- 0x407d260b,
- 0x407d9f9f,
- 0x407e2db5,
- 0x407ea1ac,
- 0x407f1d2d,
- 0x407f9ad3,
- 0x40801f59,
- 0x40809d55,
- 0x4081204f,
- 0x40819f33,
- 0x40822b65,
- 0x40829ab9,
- 0x40832187,
- 0x4083a488,
- 0x40841d69,
- 0x4084a1e4,
- 0x40852269,
- 0x4085a38d,
- 0x408622e9,
- 0x40869fb9,
- 0x40872bab,
- 0x4087a3db,
- 0x40881b1a,
- 0x4088a59a,
- 0x40891b69,
- 0x40899af6,
- 0x408a288a,
- 0x408a98e7,
- 0x408b2e81,
- 0x408bac17,
- 0x408c2279,
- 0x408c9903,
- 0x408d1dca,
- 0x408d9d9b,
- 0x408e1ee4,
- 0x408ea0ef,
- 0x408f25ae,
- 0x408fa3a9,
- 0x40902563,
- 0x4090a2bb,
- 0x40912872,
- 0x40919929,
- 0x40921bb6,
- 0x4092abe6,
- 0x40932ca8,
- 0x40939fca,
- 0x40941d7d,
- 0x4094a8a3,
- 0x40952437,
- 0x4095ae12,
- 0x40962b92,
- 0x40969f72,
- 0x40972015,
- 0x41f42744,
- 0x41f927d6,
- 0x41fe26c9,
- 0x41fea8e6,
- 0x41ff29d7,
- 0x4203275d,
- 0x4208277f,
- 0x4208a7bb,
- 0x420926ad,
- 0x4209a7f5,
- 0x420a2704,
- 0x420aa6e4,
- 0x420b2724,
- 0x420ba79d,
- 0x420c29f3,
- 0x420ca8b3,
- 0x420d28cd,
- 0x420da904,
- 0x4212291e,
- 0x421729ba,
- 0x4217a960,
- 0x421c2982,
- 0x421f293d,
- 0x42212a0a,
- 0x4226299d,
- 0x422b2ad9,
- 0x422baa87,
- 0x422c2ac1,
- 0x422caa46,
- 0x422d2a25,
- 0x422daaa6,
- 0x422e2a6c,
+ 0x4071acc1,
+ 0x40722cd4,
+ 0x4072ad0a,
+ 0x40732d22,
+ 0x407394fa,
+ 0x40742d36,
+ 0x4074ad50,
+ 0x40752d61,
+ 0x4075ad75,
+ 0x40762d83,
+ 0x407692be,
+ 0x40772da8,
+ 0x4077adca,
+ 0x40782de5,
+ 0x4078ae1e,
+ 0x40792e35,
+ 0x4079ae4b,
+ 0x407a2e77,
+ 0x407aae8a,
+ 0x407b2e9f,
+ 0x407baeb1,
+ 0x407c2ee2,
+ 0x407caeeb,
+ 0x407d2650,
+ 0x407d9fe4,
+ 0x407e2dfa,
+ 0x407ea1f1,
+ 0x407f1d58,
+ 0x407f9afe,
+ 0x40801f9e,
+ 0x40809d80,
+ 0x40812094,
+ 0x40819f78,
+ 0x40822baa,
+ 0x40829ae4,
+ 0x408321cc,
+ 0x4083a4cd,
+ 0x40841d94,
+ 0x4084a229,
+ 0x408522ae,
+ 0x4085a3d2,
+ 0x4086232e,
+ 0x40869ffe,
+ 0x40872bf0,
+ 0x4087a420,
+ 0x40881b45,
+ 0x4088a5df,
+ 0x40891b94,
+ 0x40899b21,
+ 0x408a28cf,
+ 0x408a9912,
+ 0x408b2ec6,
+ 0x408bac5c,
+ 0x408c22be,
+ 0x408c992e,
+ 0x408d1df5,
+ 0x408d9dc6,
+ 0x408e1f0f,
+ 0x408ea134,
+ 0x408f25f3,
+ 0x408fa3ee,
+ 0x409025a8,
+ 0x4090a300,
+ 0x409128b7,
+ 0x40919954,
+ 0x40921be1,
+ 0x4092ac2b,
+ 0x40932ced,
+ 0x4093a00f,
+ 0x40941da8,
+ 0x4094a8e8,
+ 0x4095247c,
+ 0x4095ae57,
+ 0x40962bd7,
+ 0x40969fb7,
+ 0x4097205a,
+ 0x40979f5e,
+ 0x41f42789,
+ 0x41f9281b,
+ 0x41fe270e,
+ 0x41fea92b,
+ 0x41ff2a1c,
+ 0x420327a2,
+ 0x420827c4,
+ 0x4208a800,
+ 0x420926f2,
+ 0x4209a83a,
+ 0x420a2749,
+ 0x420aa729,
+ 0x420b2769,
+ 0x420ba7e2,
+ 0x420c2a38,
+ 0x420ca8f8,
+ 0x420d2912,
+ 0x420da949,
+ 0x42122963,
+ 0x421729ff,
+ 0x4217a9a5,
+ 0x421c29c7,
+ 0x421f2982,
+ 0x42212a4f,
+ 0x422629e2,
+ 0x422b2b1e,
+ 0x422baacc,
+ 0x422c2b06,
+ 0x422caa8b,
+ 0x422d2a6a,
+ 0x422daaeb,
+ 0x422e2ab1,
0x4432072d,
0x4432873c,
0x44330748,
@@ -816,106 +826,106 @@
0x44390802,
0x44398810,
0x443a0823,
- 0x483212bd,
- 0x483292cf,
- 0x483312e5,
- 0x483392fe,
- 0x4c321323,
- 0x4c329333,
- 0x4c331346,
- 0x4c339366,
+ 0x483212e8,
+ 0x483292fa,
+ 0x48331310,
+ 0x48339329,
+ 0x4c32134e,
+ 0x4c32935e,
+ 0x4c331371,
+ 0x4c339391,
0x4c3400ac,
0x4c3480ea,
- 0x4c351372,
- 0x4c359380,
- 0x4c36139c,
- 0x4c3693c2,
- 0x4c3713d1,
- 0x4c3793df,
- 0x4c3813f4,
- 0x4c389400,
- 0x4c391420,
- 0x4c39944a,
- 0x4c3a1463,
- 0x4c3a947c,
+ 0x4c35139d,
+ 0x4c3593ab,
+ 0x4c3613c7,
+ 0x4c3693ed,
+ 0x4c3713fc,
+ 0x4c37940a,
+ 0x4c38141f,
+ 0x4c38942b,
+ 0x4c39144b,
+ 0x4c399475,
+ 0x4c3a148e,
+ 0x4c3a94a7,
0x4c3b05fd,
- 0x4c3b9495,
- 0x4c3c14a7,
- 0x4c3c94b6,
- 0x4c3d14cf,
+ 0x4c3b94c0,
+ 0x4c3c14d2,
+ 0x4c3c94e1,
+ 0x4c3d14fa,
0x4c3d8c47,
- 0x4c3e153c,
- 0x4c3e94de,
- 0x4c3f155e,
- 0x4c3f9293,
- 0x4c4014f4,
- 0x4c40930f,
- 0x4c41152c,
- 0x4c4193af,
- 0x4c421518,
- 0x503230fc,
- 0x5032b10b,
- 0x50333116,
- 0x5033b126,
- 0x5034313f,
- 0x5034b159,
- 0x50353167,
- 0x5035b17d,
- 0x5036318f,
- 0x5036b1a5,
- 0x503731be,
- 0x5037b1d1,
- 0x503831e9,
- 0x5038b1fa,
- 0x5039320f,
- 0x5039b223,
- 0x503a3243,
- 0x503ab259,
- 0x503b3271,
- 0x503bb283,
- 0x503c329f,
- 0x503cb2b6,
- 0x503d32cf,
- 0x503db2e5,
- 0x503e32f2,
- 0x503eb308,
- 0x503f331a,
+ 0x4c3e1567,
+ 0x4c3e9509,
+ 0x4c3f1589,
+ 0x4c3f92be,
+ 0x4c40151f,
+ 0x4c40933a,
+ 0x4c411557,
+ 0x4c4193da,
+ 0x4c421543,
+ 0x50323141,
+ 0x5032b150,
+ 0x5033315b,
+ 0x5033b16b,
+ 0x50343184,
+ 0x5034b19e,
+ 0x503531ac,
+ 0x5035b1c2,
+ 0x503631d4,
+ 0x5036b1ea,
+ 0x50373203,
+ 0x5037b216,
+ 0x5038322e,
+ 0x5038b23f,
+ 0x50393254,
+ 0x5039b268,
+ 0x503a3288,
+ 0x503ab29e,
+ 0x503b32b6,
+ 0x503bb2c8,
+ 0x503c32e4,
+ 0x503cb2fb,
+ 0x503d3314,
+ 0x503db32a,
+ 0x503e3337,
+ 0x503eb34d,
+ 0x503f335f,
0x503f837b,
- 0x5040332d,
- 0x5040b33d,
- 0x50413357,
- 0x5041b366,
- 0x50423380,
- 0x5042b39d,
- 0x504333ad,
- 0x5043b3bd,
- 0x504433cc,
+ 0x50403372,
+ 0x5040b382,
+ 0x5041339c,
+ 0x5041b3ab,
+ 0x504233c5,
+ 0x5042b3e2,
+ 0x504333f2,
+ 0x5043b402,
+ 0x50443411,
0x50448431,
- 0x504533e0,
- 0x5045b3fe,
- 0x50463411,
- 0x5046b427,
- 0x50473439,
- 0x5047b44e,
- 0x50483474,
- 0x5048b482,
- 0x50493495,
- 0x5049b4aa,
- 0x504a34c0,
- 0x504ab4d0,
- 0x504b34f0,
- 0x504bb503,
- 0x504c3526,
- 0x504cb554,
- 0x504d3566,
- 0x504db583,
- 0x504e359e,
- 0x504eb5ba,
- 0x504f35cc,
- 0x504fb5e3,
- 0x505035f2,
+ 0x50453425,
+ 0x5045b443,
+ 0x50463456,
+ 0x5046b46c,
+ 0x5047347e,
+ 0x5047b493,
+ 0x504834b9,
+ 0x5048b4c7,
+ 0x504934da,
+ 0x5049b4ef,
+ 0x504a3505,
+ 0x504ab515,
+ 0x504b3535,
+ 0x504bb548,
+ 0x504c356b,
+ 0x504cb599,
+ 0x504d35ab,
+ 0x504db5c8,
+ 0x504e35e3,
+ 0x504eb5ff,
+ 0x504f3611,
+ 0x504fb628,
+ 0x50503637,
0x505086f1,
- 0x50513605,
+ 0x5051364a,
0x58320f65,
0x68320f27,
0x68328c7f,
@@ -956,11 +966,11 @@
0x783d8b4c,
0x783e0aa2,
0x783e8a54,
- 0x7c3211ac,
+ 0x7c3211d7,
};
-
+
const size_t kOpenSSLReasonValuesLen = sizeof(kOpenSSLReasonValues) / sizeof(kOpenSSLReasonValues[0]);
-
+
const char kOpenSSLReasonStringData[] =
"ASN1_LENGTH_MISMATCH\\0"
"AUX_ERROR\\0"
@@ -1181,11 +1191,13 @@
"INVALID_KEYBITS\\0"
"INVALID_MGF1_MD\\0"
"INVALID_PADDING_MODE\\0"
+ "INVALID_PEER_KEY\\0"
"INVALID_PSS_SALTLEN\\0"
"INVALID_SIGNATURE\\0"
"KEYS_NOT_SET\\0"
"MEMORY_LIMIT_EXCEEDED\\0"
"NOT_A_PRIVATE_KEY\\0"
+ "NOT_XOF_OR_INVALID_LENGTH\\0"
"NO_DEFAULT_DIGEST\\0"
"NO_KEY_SET\\0"
"NO_MDC2_SUPPORT\\0"
@@ -1356,6 +1368,7 @@
"HTTPS_PROXY_REQUEST\\0"
"HTTP_REQUEST\\0"
"INAPPROPRIATE_FALLBACK\\0"
+ "INCONSISTENT_CLIENT_HELLO\\0"
"INVALID_ALPN_PROTOCOL\\0"
"INVALID_COMMAND\\0"
"INVALID_COMPRESSION_LIST\\0"
@@ -1603,6 +1616,7 @@
"UNSUPPORTED_OPTION\\0"
"USER_TOO_LONG\\0"
"";
+
EOF
# Remove lines of the format "#define SOME_MACRO SOME_MACRO" because they mess up the symbol prefix
diff --git a/src/python/grpcio/grpc/_channel.py b/src/python/grpcio/grpc/_channel.py
index f158494..27d8294 100644
--- a/src/python/grpcio/grpc/_channel.py
+++ b/src/python/grpcio/grpc/_channel.py
@@ -20,6 +20,7 @@
import time
import grpc
+import grpc.experimental
from grpc import _compression
from grpc import _common
from grpc import _grpcio_metadata
@@ -248,16 +249,47 @@
consumption_thread.start()
-class _Rendezvous(grpc.RpcError, grpc.Future, grpc.Call): # pylint: disable=too-many-ancestors
+class _SingleThreadedRendezvous(grpc.RpcError, grpc.Call): # pylint: disable=too-many-ancestors
+ """An RPC iterator operating entirely on a single thread.
+
+ The __next__ method of _SingleThreadedRendezvous does not depend on the
+ existence of any other thread, including the "channel spin thread".
+ However, this means that its interface is entirely synchronous. So this
+ class cannot fulfill the grpc.Future interface.
+
+ Attributes:
+ _state: An instance of _RPCState.
+ _call: An instance of SegregatedCall or (for subclasses) IntegratedCall.
+ In either case, the _call object is expected to have operate, cancel,
+ and next_event methods.
+ _response_deserializer: A callable taking bytes and return a Python
+ object.
+ _deadline: A float representing the deadline of the RPC in seconds. Or
+ possibly None, to represent an RPC with no deadline at all.
+ """
def __init__(self, state, call, response_deserializer, deadline):
- super(_Rendezvous, self).__init__()
+ super(_SingleThreadedRendezvous, self).__init__()
self._state = state
self._call = call
self._response_deserializer = response_deserializer
self._deadline = deadline
+ def is_active(self):
+ """See grpc.RpcContext.is_active"""
+ with self._state.condition:
+ return self._state.code is None
+
+ def time_remaining(self):
+ """See grpc.RpcContext.time_remaining"""
+ with self._state.condition:
+ if self._deadline is None:
+ return None
+ else:
+ return max(self._deadline - time.time(), 0)
+
def cancel(self):
+ """See grpc.RpcContext.cancel"""
with self._state.condition:
if self._state.code is None:
code = grpc.StatusCode.CANCELLED
@@ -267,7 +299,154 @@
self._state.cancelled = True
_abort(self._state, code, details)
self._state.condition.notify_all()
- return False
+ return True
+ else:
+ return False
+
+ def add_callback(self, callback):
+ """See grpc.RpcContext.add_callback"""
+ with self._state.condition:
+ if self._state.callbacks is None:
+ return False
+ else:
+ self._state.callbacks.append(callback)
+ return True
+
+ def initial_metadata(self):
+ """See grpc.Call.initial_metadata"""
+ with self._state.condition:
+
+ def _done():
+ return self._state.initial_metadata is not None
+
+ _common.wait(self._state.condition.wait, _done)
+ return self._state.initial_metadata
+
+ def trailing_metadata(self):
+ """See grpc.Call.trailing_metadata"""
+ with self._state.condition:
+
+ def _done():
+ return self._state.trailing_metadata is not None
+
+ _common.wait(self._state.condition.wait, _done)
+ return self._state.trailing_metadata
+
+ # TODO(https://github.com/grpc/grpc/issues/20763): Drive RPC progress using
+ # the calling thread.
+ def code(self):
+ """See grpc.Call.code"""
+ with self._state.condition:
+
+ def _done():
+ return self._state.code is not None
+
+ _common.wait(self._state.condition.wait, _done)
+ return self._state.code
+
+ def details(self):
+ """See grpc.Call.details"""
+ with self._state.condition:
+
+ def _done():
+ return self._state.details is not None
+
+ _common.wait(self._state.condition.wait, _done)
+ return _common.decode(self._state.details)
+
+ def _next(self):
+ with self._state.condition:
+ if self._state.code is None:
+ operating = self._call.operate(
+ (cygrpc.ReceiveMessageOperation(_EMPTY_FLAGS),), None)
+ if operating:
+ self._state.due.add(cygrpc.OperationType.receive_message)
+ elif self._state.code is grpc.StatusCode.OK:
+ raise StopIteration()
+ else:
+ raise self
+ while True:
+ event = self._call.next_event()
+ with self._state.condition:
+ callbacks = _handle_event(event, self._state,
+ self._response_deserializer)
+ for callback in callbacks:
+ try:
+ callback()
+ except Exception as e: # pylint: disable=broad-except
+ # NOTE(rbellevi): We suppress but log errors here so as not to
+ # kill the channel spin thread.
+ logging.error('Exception in callback %s: %s',
+ repr(callback.func), repr(e))
+ if self._state.response is not None:
+ response = self._state.response
+ self._state.response = None
+ return response
+ elif cygrpc.OperationType.receive_message not in self._state.due:
+ if self._state.code is grpc.StatusCode.OK:
+ raise StopIteration()
+ elif self._state.code is not None:
+ raise self
+
+ def __next__(self):
+ return self._next()
+
+ def next(self):
+ return self._next()
+
+ def __iter__(self):
+ return self
+
+ def debug_error_string(self):
+ with self._state.condition:
+
+ def _done():
+ return self._state.debug_error_string is not None
+
+ _common.wait(self._state.condition.wait, _done)
+ return _common.decode(self._state.debug_error_string)
+
+ def _repr(self):
+ with self._state.condition:
+ if self._state.code is None:
+ return '<{} object of in-flight RPC>'.format(
+ self.__class__.__name__)
+ elif self._state.code is grpc.StatusCode.OK:
+ return _OK_RENDEZVOUS_REPR_FORMAT.format(
+ self._state.code, self._state.details)
+ else:
+ return _NON_OK_RENDEZVOUS_REPR_FORMAT.format(
+ self._state.code, self._state.details,
+ self._state.debug_error_string)
+
+ def __repr__(self):
+ return self._repr()
+
+ def __str__(self):
+ return self._repr()
+
+ def __del__(self):
+ with self._state.condition:
+ if self._state.code is None:
+ self._state.code = grpc.StatusCode.CANCELLED
+ self._state.details = 'Cancelled upon garbage collection!'
+ self._state.cancelled = True
+ self._call.cancel(
+ _common.STATUS_CODE_TO_CYGRPC_STATUS_CODE[self._state.code],
+ self._state.details)
+ self._state.condition.notify_all()
+
+
+class _Rendezvous(_SingleThreadedRendezvous, grpc.Future): # pylint: disable=too-many-ancestors
+ """An RPC iterator that depends on a channel spin thread.
+
+ This iterator relies upon a per-channel thread running in the background,
+ dequeueing events from the completion queue, and notifying threads waiting
+ on the threading.Condition object in the _RPCState object.
+
+ This extra thread allows _Rendezvous to fulfill the grpc.Future interface
+ and to mediate a bidirection streaming RPC.
+ """
def cancelled(self):
with self._state.condition:
@@ -381,25 +560,6 @@
elif self._state.code is not None:
raise self
- def __iter__(self):
- return self
-
- def __next__(self):
- return self._next()
-
- def next(self):
- return self._next()
-
- def is_active(self):
- with self._state.condition:
- return self._state.code is None
-
- def time_remaining(self):
- if self._deadline is None:
- return None
- else:
- return max(self._deadline - time.time(), 0)
-
def add_callback(self, callback):
with self._state.condition:
if self._state.callbacks is None:
@@ -408,80 +568,6 @@
self._state.callbacks.append(callback)
return True
- def initial_metadata(self):
- with self._state.condition:
-
- def _done():
- return self._state.initial_metadata is not None
-
- _common.wait(self._state.condition.wait, _done)
- return self._state.initial_metadata
-
- def trailing_metadata(self):
- with self._state.condition:
-
- def _done():
- return self._state.trailing_metadata is not None
-
- _common.wait(self._state.condition.wait, _done)
- return self._state.trailing_metadata
-
- def code(self):
- with self._state.condition:
-
- def _done():
- return self._state.code is not None
-
- _common.wait(self._state.condition.wait, _done)
- return self._state.code
-
- def details(self):
- with self._state.condition:
-
- def _done():
- return self._state.details is not None
-
- _common.wait(self._state.condition.wait, _done)
- return _common.decode(self._state.details)
-
- def debug_error_string(self):
- with self._state.condition:
-
- def _done():
- return self._state.debug_error_string is not None
-
- _common.wait(self._state.condition.wait, _done)
- return _common.decode(self._state.debug_error_string)
-
- def _repr(self):
- with self._state.condition:
- if self._state.code is None:
- return '<_Rendezvous object of in-flight RPC>'
- elif self._state.code is grpc.StatusCode.OK:
- return _OK_RENDEZVOUS_REPR_FORMAT.format(
- self._state.code, self._state.details)
- else:
- return _NON_OK_RENDEZVOUS_REPR_FORMAT.format(
- self._state.code, self._state.details,
- self._state.debug_error_string)
-
- def __repr__(self):
- return self._repr()
-
- def __str__(self):
- return self._repr()
-
- def __del__(self):
- with self._state.condition:
- if self._state.code is None:
- self._state.code = grpc.StatusCode.CANCELLED
- self._state.details = 'Cancelled upon garbage collection!'
- self._state.cancelled = True
- self._call.cancel(
- _common.STATUS_CODE_TO_CYGRPC_STATUS_CODE[self._state.code],
- self._state.details)
- self._state.condition.notify_all()
-
def _start_unary_request(request, timeout, request_serializer):
deadline = _deadline(timeout)
@@ -636,6 +722,54 @@
deadline)
+class _SingleThreadedUnaryStreamMultiCallable(grpc.UnaryStreamMultiCallable):
+
+ # pylint: disable=too-many-arguments
+ def __init__(self, channel, method, request_serializer,
+ response_deserializer):
+ self._channel = channel
+ self._method = method
+ self._request_serializer = request_serializer
+ self._response_deserializer = response_deserializer
+ self._context = cygrpc.build_census_context()
+
+ def __call__( # pylint: disable=too-many-locals
+ self,
+ request,
+ timeout=None,
+ metadata=None,
+ credentials=None,
+ wait_for_ready=None,
+ compression=None):
+ deadline = _deadline(timeout)
+ serialized_request = _common.serialize(request,
+ self._request_serializer)
+ if serialized_request is None:
+ state = _RPCState((), (), (), grpc.StatusCode.INTERNAL,
+ 'Exception serializing request!')
+ raise _Rendezvous(state, None, None, deadline)
+
+ state = _RPCState(_UNARY_STREAM_INITIAL_DUE, None, None, None, None)
+ call_credentials = None if credentials is None else credentials._credentials
+ initial_metadata_flags = _InitialMetadataFlags().with_wait_for_ready(
+ wait_for_ready)
+ augmented_metadata = _compression.augment_metadata(
+ metadata, compression)
+ operations_and_tags = ((
+ (cygrpc.SendInitialMetadataOperation(augmented_metadata,
+ initial_metadata_flags),
+ cygrpc.SendMessageOperation(serialized_request, _EMPTY_FLAGS),
+ cygrpc.SendCloseFromClientOperation(_EMPTY_FLAGS),
+ cygrpc.ReceiveStatusOnClientOperation(_EMPTY_FLAGS)), None),) + (((
+ cygrpc.ReceiveInitialMetadataOperation(_EMPTY_FLAGS),), None),)
+ call = self._channel.segregated_call(
+ cygrpc.PropagationConstants.GRPC_PROPAGATE_DEFAULTS, self._method,
+ None, _determine_deadline(deadline), metadata, call_credentials,
+ operations_and_tags, self._context)
+ return _SingleThreadedRendezvous(state, call,
+ self._response_deserializer, deadline)
+
+
class _UnaryStreamMultiCallable(grpc.UnaryStreamMultiCallable):
# pylint: disable=too-many-arguments
@@ -1042,6 +1176,18 @@
),)
+def _separate_channel_options(options):
+ """Separates core channel options from Python channel options."""
+ core_options = []
+ python_options = []
+ for pair in options:
+ if pair[0] == grpc.experimental.ChannelOptions.SingleThreadedUnaryStream:
+ python_options.append(pair)
+ else:
+ core_options.append(pair)
+ return python_options, core_options
+
+
class Channel(grpc.Channel):
"""A cygrpc.Channel-backed implementation of grpc.Channel."""
@@ -1055,13 +1201,22 @@
compression: An optional value indicating the compression method to be
used over the lifetime of the channel.
"""
+ python_options, core_options = _separate_channel_options(options)
+ self._single_threaded_unary_stream = False
+ self._process_python_options(python_options)
self._channel = cygrpc.Channel(
- _common.encode(target), _augment_options(options, compression),
+ _common.encode(target), _augment_options(core_options, compression),
credentials)
self._call_state = _ChannelCallState(self._channel)
self._connectivity_state = _ChannelConnectivityState(self._channel)
cygrpc.fork_register_channel(self)
+ def _process_python_options(self, python_options):
+ """Sets channel attributes according to python-only channel options."""
+ for pair in python_options:
+ if pair[0] == grpc.experimental.ChannelOptions.SingleThreadedUnaryStream:
+ self._single_threaded_unary_stream = True
+
def subscribe(self, callback, try_to_connect=None):
_subscribe(self._connectivity_state, callback, try_to_connect)
@@ -1080,9 +1235,21 @@
method,
request_serializer=None,
response_deserializer=None):
- return _UnaryStreamMultiCallable(
- self._channel, _channel_managed_call_management(self._call_state),
- _common.encode(method), request_serializer, response_deserializer)
+ # NOTE(rbellevi): Benchmarks have shown that running a unary-stream RPC
+ # on a single Python thread results in an appreciable speed-up. However,
+ # due to slight differences in capability, the multi-threaded variant'
+ # remains the default.
+ if self._single_threaded_unary_stream:
+ return _SingleThreadedUnaryStreamMultiCallable(
+ self._channel, _common.encode(method), request_serializer,
+ response_deserializer)
+ else:
+ return _UnaryStreamMultiCallable(self._channel,
+ _channel_managed_call_management(
+ self._call_state),
+ _common.encode(method),
+ request_serializer,
+ response_deserializer)
def stream_unary(self,
method,
diff --git a/src/python/grpcio/grpc/_cython/_cygrpc/channel.pyx.pxi b/src/python/grpcio/grpc/_cython/_cygrpc/channel.pyx.pxi
index 70bc8db..c31ca14 100644
--- a/src/python/grpcio/grpc/_cython/_cygrpc/channel.pyx.pxi
+++ b/src/python/grpcio/grpc/_cython/_cygrpc/channel.pyx.pxi
@@ -420,8 +420,6 @@
else:
while state.integrated_call_states:
state.condition.wait()
- while state.segregated_call_states:
- state.condition.wait()
while state.connectivity_due:
state.condition.wait()
diff --git a/src/python/grpcio/grpc/experimental/__init__.py b/src/python/grpcio/grpc/experimental/__init__.py
index dcec322..06adeb0 100644
--- a/src/python/grpcio/grpc/experimental/__init__.py
+++ b/src/python/grpcio/grpc/experimental/__init__.py
@@ -15,3 +15,14 @@
These APIs are subject to be removed during any minor version release.
"""
+
+
+class ChannelOptions(object):
+ """Indicates a channel option unique to gRPC Python.
+
+ This enumeration is part of an EXPERIMENTAL API.
+
+ Attributes:
+ SingleThreadedUnaryStream: Perform unary-stream RPCs on a single thread.
+ """
+ SingleThreadedUnaryStream = "SingleThreadedUnaryStream"
diff --git a/src/python/grpcio_tests/tests/stress/BUILD.bazel b/src/python/grpcio_tests/tests/stress/BUILD.bazel
new file mode 100644
index 0000000..922805d
--- /dev/null
+++ b/src/python/grpcio_tests/tests/stress/BUILD.bazel
@@ -0,0 +1,30 @@
+load("@com_github_grpc_grpc//bazel:python_rules.bzl", "py_proto_library", "py_grpc_library")
+
+proto_library(
+ name = "unary_stream_benchmark_proto",
+ srcs = ["unary_stream_benchmark.proto"],
+ deps = [],
+)
+
+py_proto_library(
+ name = "unary_stream_benchmark_py_pb2",
+ deps = [":unary_stream_benchmark_proto"],
+)
+
+py_grpc_library(
+ name = "unary_stream_benchmark_py_pb2_grpc",
+ srcs = [":unary_stream_benchmark_proto"],
+ deps = [":unary_stream_benchmark_py_pb2"],
+)
+
+py_binary(
+ name = "unary_stream_benchmark",
+ srcs_version = "PY3",
+ python_version = "PY3",
+ srcs = ["unary_stream_benchmark.py"],
+ deps = [
+ "//src/python/grpcio/grpc:grpcio",
+ ":unary_stream_benchmark_py_pb2",
+ ":unary_stream_benchmark_py_pb2_grpc",
+ ]
+)
diff --git a/src/python/grpcio_tests/tests/stress/unary_stream_benchmark.proto b/src/python/grpcio_tests/tests/stress/unary_stream_benchmark.proto
new file mode 100644
index 0000000..e7cb04e
--- /dev/null
+++ b/src/python/grpcio_tests/tests/stress/unary_stream_benchmark.proto
@@ -0,0 +1,27 @@
+// Copyright 2019 The 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.
+syntax = "proto3";
+
+message BenchmarkRequest {
+ int32 message_size = 1;
+ int32 response_count = 2;
+}
+
+message BenchmarkResponse {
+ bytes response = 1;
+}
+
+service UnaryStreamBenchmarkService {
+ rpc Benchmark(BenchmarkRequest) returns (stream BenchmarkResponse);
+}
diff --git a/src/python/grpcio_tests/tests/stress/unary_stream_benchmark.py b/src/python/grpcio_tests/tests/stress/unary_stream_benchmark.py
new file mode 100644
index 0000000..882e336
--- /dev/null
+++ b/src/python/grpcio_tests/tests/stress/unary_stream_benchmark.py
@@ -0,0 +1,104 @@
+# Copyright 2019 The gRPC authors.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+import datetime
+import threading
+import grpc
+import grpc.experimental
+import subprocess
+import sys
+import time
+import contextlib
+
+_PORT = 5741
+_MESSAGE_SIZE = 4
+_RESPONSE_COUNT = 32 * 1024
+
+_SERVER_CODE = """
+import datetime
+import threading
+import grpc
+from concurrent import futures
+from src.python.grpcio_tests.tests.stress import unary_stream_benchmark_pb2
+from src.python.grpcio_tests.tests.stress import unary_stream_benchmark_pb2_grpc
+
+class Handler(unary_stream_benchmark_pb2_grpc.UnaryStreamBenchmarkServiceServicer):
+
+ def Benchmark(self, request, context):
+ payload = b'\\x00\\x01' * int(request.message_size / 2)
+ for _ in range(request.response_count):
+ yield unary_stream_benchmark_pb2.BenchmarkResponse(response=payload)
+
+
+server = grpc.server(futures.ThreadPoolExecutor(max_workers=1))
+server.add_insecure_port('[::]:%d')
+unary_stream_benchmark_pb2_grpc.add_UnaryStreamBenchmarkServiceServicer_to_server(Handler(), server)
+server.start()
+server.wait_for_termination()
+""" % _PORT
+
+try:
+ from src.python.grpcio_tests.tests.stress import unary_stream_benchmark_pb2
+ from src.python.grpcio_tests.tests.stress import unary_stream_benchmark_pb2_grpc
+
+ _GRPC_CHANNEL_OPTIONS = [
+ ('grpc.max_metadata_size', 16 * 1024 * 1024),
+ ('grpc.max_receive_message_length', 64 * 1024 * 1024),
+ (grpc.experimental.ChannelOptions.SingleThreadedUnaryStream, 1),
+ ]
+
+ @contextlib.contextmanager
+ def _running_server():
+ server_process = subprocess.Popen(
+ [sys.executable, '-c', _SERVER_CODE],
+ stdout=subprocess.PIPE,
+ stderr=subprocess.PIPE)
+ try:
+ yield
+ finally:
+ server_process.terminate()
+ server_process.wait()
+ sys.stdout.write("stdout: {}".format(server_process.stdout.read()))
+ sys.stdout.flush()
+ sys.stdout.write("stderr: {}".format(server_process.stderr.read()))
+ sys.stdout.flush()
+
+ def profile(message_size, response_count):
+ request = unary_stream_benchmark_pb2.BenchmarkRequest(
+ message_size=message_size, response_count=response_count)
+ with grpc.insecure_channel(
+ '[::]:{}'.format(_PORT),
+ options=_GRPC_CHANNEL_OPTIONS) as channel:
+ stub = unary_stream_benchmark_pb2_grpc.UnaryStreamBenchmarkServiceStub(
+ channel)
+ start = datetime.datetime.now()
+ call = stub.Benchmark(request, wait_for_ready=True)
+ for message in call:
+ pass
+ end = datetime.datetime.now()
+ return end - start
+
+ def main():
+ with _running_server():
+ for i in range(1000):
+ latency = profile(_MESSAGE_SIZE, 1024)
+ sys.stdout.write("{}\n".format(latency.total_seconds()))
+ sys.stdout.flush()
+
+ if __name__ == '__main__':
+ main()
+
+except ImportError:
+ # NOTE(rbellevi): The test runner should not load this module.
+ pass
diff --git a/src/python/grpcio_tests/tests/unit/BUILD.bazel b/src/python/grpcio_tests/tests/unit/BUILD.bazel
index 587d8cb..5fb7c1f 100644
--- a/src/python/grpcio_tests/tests/unit/BUILD.bazel
+++ b/src/python/grpcio_tests/tests/unit/BUILD.bazel
@@ -23,6 +23,7 @@
"_invocation_defects_test.py",
"_local_credentials_test.py",
"_logging_test.py",
+ "_metadata_flags_test.py",
"_metadata_code_details_test.py",
"_metadata_test.py",
# TODO: Issue 16336
diff --git a/src/python/grpcio_tests/tests/unit/_metadata_code_details_test.py b/src/python/grpcio_tests/tests/unit/_metadata_code_details_test.py
index a63664a..8831862 100644
--- a/src/python/grpcio_tests/tests/unit/_metadata_code_details_test.py
+++ b/src/python/grpcio_tests/tests/unit/_metadata_code_details_test.py
@@ -255,8 +255,8 @@
response_iterator_call = self._unary_stream(
_SERIALIZED_REQUEST, metadata=_CLIENT_METADATA)
- received_initial_metadata = response_iterator_call.initial_metadata()
list(response_iterator_call)
+ received_initial_metadata = response_iterator_call.initial_metadata()
self.assertTrue(
test_common.metadata_transmitted(
@@ -349,11 +349,14 @@
response_iterator_call = self._unary_stream(
_SERIALIZED_REQUEST, metadata=_CLIENT_METADATA)
- received_initial_metadata = \
- response_iterator_call.initial_metadata()
+ # NOTE: In the single-threaded case, we cannot grab the initial_metadata
+ # without running the RPC first (or concurrently, in another
+ # thread).
with self.assertRaises(grpc.RpcError):
self.assertEqual(len(list(response_iterator_call)), 0)
+ received_initial_metadata = \
+ response_iterator_call.initial_metadata()
self.assertTrue(
test_common.metadata_transmitted(
_CLIENT_METADATA,
@@ -454,9 +457,9 @@
response_iterator_call = self._unary_stream(
_SERIALIZED_REQUEST, metadata=_CLIENT_METADATA)
- received_initial_metadata = response_iterator_call.initial_metadata()
with self.assertRaises(grpc.RpcError):
list(response_iterator_call)
+ received_initial_metadata = response_iterator_call.initial_metadata()
self.assertTrue(
test_common.metadata_transmitted(
@@ -547,9 +550,9 @@
response_iterator_call = self._unary_stream(
_SERIALIZED_REQUEST, metadata=_CLIENT_METADATA)
- received_initial_metadata = response_iterator_call.initial_metadata()
with self.assertRaises(grpc.RpcError):
list(response_iterator_call)
+ received_initial_metadata = response_iterator_call.initial_metadata()
self.assertTrue(
test_common.metadata_transmitted(
diff --git a/src/python/grpcio_tests/tests/unit/_metadata_flags_test.py b/src/python/grpcio_tests/tests/unit/_metadata_flags_test.py
index 7b32b5b..5cded71 100644
--- a/src/python/grpcio_tests/tests/unit/_metadata_flags_test.py
+++ b/src/python/grpcio_tests/tests/unit/_metadata_flags_test.py
@@ -94,10 +94,10 @@
def get_free_loopback_tcp_port():
- tcp = socket.socket(socket.AF_INET6)
+ tcp = socket.socket(socket.AF_INET)
tcp.bind(('', 0))
address_tuple = tcp.getsockname()
- return tcp, "[::1]:%s" % (address_tuple[1])
+ return tcp, "localhost:%s" % (address_tuple[1])
def create_dummy_channel():
@@ -183,7 +183,7 @@
fn(channel, wait_for_ready)
self.fail("The Call should fail")
except BaseException as e: # pylint: disable=broad-except
- self.assertIn('StatusCode.UNAVAILABLE', str(e))
+ self.assertIs(grpc.StatusCode.UNAVAILABLE, e.code())
def test_call_wait_for_ready_default(self):
for perform_call in _ALL_CALL_CASES:
diff --git a/src/python/grpcio_tests/tests/unit/_metadata_test.py b/src/python/grpcio_tests/tests/unit/_metadata_test.py
index 892df3d..954ffe9 100644
--- a/src/python/grpcio_tests/tests/unit/_metadata_test.py
+++ b/src/python/grpcio_tests/tests/unit/_metadata_test.py
@@ -202,6 +202,9 @@
def testUnaryStream(self):
multi_callable = self._channel.unary_stream(_UNARY_STREAM)
call = multi_callable(_REQUEST, metadata=_INVOCATION_METADATA)
+ # TODO(https://github.com/grpc/grpc/issues/20762): Make the call to
+ # `next()` unnecessary.
+ next(call)
self.assertTrue(
test_common.metadata_transmitted(_EXPECTED_INITIAL_METADATA,
call.initial_metadata()))
diff --git a/templates/src/objective-c/BoringSSL-GRPC.podspec.template b/templates/src/objective-c/BoringSSL-GRPC.podspec.template
index 5f1de90..8bdd255 100644
--- a/templates/src/objective-c/BoringSSL-GRPC.podspec.template
+++ b/templates/src/objective-c/BoringSSL-GRPC.podspec.template
@@ -9,7 +9,9 @@
# Please make modifications to
# `templates/src/objective-c/BoringSSL-GRPC.podspec.template` instead. This
# file can be regenerated from the template by running
- # `tools/buildgen/generate_projects.sh`.
+ # `tools/buildgen/generate_projects.sh`. Because of some limitations of this
+ # template, you might actually need to run the same script twice in a row.
+ # (see err_data.c section)
# BoringSSL CocoaPods podspec
@@ -204,1410 +206,18 @@
}
EOF
- # This is a bit ridiculous, but requiring people to install Go in order to build is slightly
- # more ridiculous IMO.
- # TODO(jcanizales): Translate err_data_generate.go into a Bash or Ruby script.
+ # To build boringssl, we need the generated file err_data.c, which is normally generated
+ # by boringssl's err_data_generate.go, but we already have a copy of err_data.c checked into the
+ # grpc/grpc repository that gets regenerated whenever we update the third_party/boringssl submodule.
+ # To make the podspec independent of the grpc repository, the .podspec.template just copies
+ # the contents of err_data.c directly into the .podspec.
+ # TODO(jtattermusch): avoid needing to run tools/buildgen/generate_projects.sh twice on update
+ # TODO(jtattermusch): another pre-generated copy of err_data.c is under third_party/boringssl-with-bazel
+ # investigate if we could use it.
cat > err_data.c <<EOF
- /* Copyright (c) 2015, Google Inc.
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
- * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
- * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
- * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */
-
- /* This file was generated by err_data_generate.go. */
-
- #include <openssl/base.h>
- #include <openssl/err.h>
- #include <openssl/type_check.h>
-
-
- OPENSSL_STATIC_ASSERT(ERR_LIB_NONE == 1, "library value changed");
- OPENSSL_STATIC_ASSERT(ERR_LIB_SYS == 2, "library value changed");
- OPENSSL_STATIC_ASSERT(ERR_LIB_BN == 3, "library value changed");
- OPENSSL_STATIC_ASSERT(ERR_LIB_RSA == 4, "library value changed");
- OPENSSL_STATIC_ASSERT(ERR_LIB_DH == 5, "library value changed");
- OPENSSL_STATIC_ASSERT(ERR_LIB_EVP == 6, "library value changed");
- OPENSSL_STATIC_ASSERT(ERR_LIB_BUF == 7, "library value changed");
- OPENSSL_STATIC_ASSERT(ERR_LIB_OBJ == 8, "library value changed");
- OPENSSL_STATIC_ASSERT(ERR_LIB_PEM == 9, "library value changed");
- OPENSSL_STATIC_ASSERT(ERR_LIB_DSA == 10, "library value changed");
- OPENSSL_STATIC_ASSERT(ERR_LIB_X509 == 11, "library value changed");
- OPENSSL_STATIC_ASSERT(ERR_LIB_ASN1 == 12, "library value changed");
- OPENSSL_STATIC_ASSERT(ERR_LIB_CONF == 13, "library value changed");
- OPENSSL_STATIC_ASSERT(ERR_LIB_CRYPTO == 14, "library value changed");
- OPENSSL_STATIC_ASSERT(ERR_LIB_EC == 15, "library value changed");
- OPENSSL_STATIC_ASSERT(ERR_LIB_SSL == 16, "library value changed");
- OPENSSL_STATIC_ASSERT(ERR_LIB_BIO == 17, "library value changed");
- OPENSSL_STATIC_ASSERT(ERR_LIB_PKCS7 == 18, "library value changed");
- OPENSSL_STATIC_ASSERT(ERR_LIB_PKCS8 == 19, "library value changed");
- OPENSSL_STATIC_ASSERT(ERR_LIB_X509V3 == 20, "library value changed");
- OPENSSL_STATIC_ASSERT(ERR_LIB_RAND == 21, "library value changed");
- OPENSSL_STATIC_ASSERT(ERR_LIB_ENGINE == 22, "library value changed");
- OPENSSL_STATIC_ASSERT(ERR_LIB_OCSP == 23, "library value changed");
- OPENSSL_STATIC_ASSERT(ERR_LIB_UI == 24, "library value changed");
- OPENSSL_STATIC_ASSERT(ERR_LIB_COMP == 25, "library value changed");
- OPENSSL_STATIC_ASSERT(ERR_LIB_ECDSA == 26, "library value changed");
- OPENSSL_STATIC_ASSERT(ERR_LIB_ECDH == 27, "library value changed");
- OPENSSL_STATIC_ASSERT(ERR_LIB_HMAC == 28, "library value changed");
- OPENSSL_STATIC_ASSERT(ERR_LIB_DIGEST == 29, "library value changed");
- OPENSSL_STATIC_ASSERT(ERR_LIB_CIPHER == 30, "library value changed");
- OPENSSL_STATIC_ASSERT(ERR_LIB_HKDF == 31, "library value changed");
- OPENSSL_STATIC_ASSERT(ERR_LIB_USER == 32, "library value changed");
- OPENSSL_STATIC_ASSERT(ERR_NUM_LIBS == 33, "number of libraries changed");
-
- const uint32_t kOpenSSLReasonValues[] = {
- 0xc32083a,
- 0xc328854,
- 0xc330863,
- 0xc338873,
- 0xc340882,
- 0xc34889b,
- 0xc3508a7,
- 0xc3588c4,
- 0xc3608e4,
- 0xc3688f2,
- 0xc370902,
- 0xc37890f,
- 0xc38091f,
- 0xc38892a,
- 0xc390940,
- 0xc39894f,
- 0xc3a0963,
- 0xc3a8847,
- 0xc3b00ea,
- 0xc3b88d6,
- 0x10320847,
- 0x10329574,
- 0x10331580,
- 0x10339599,
- 0x103415ac,
- 0x10348f27,
- 0x10350c60,
- 0x103595bf,
- 0x103615e9,
- 0x103695fc,
- 0x1037161b,
- 0x10379634,
- 0x10381649,
- 0x10389667,
- 0x10391676,
- 0x10399692,
- 0x103a16ad,
- 0x103a96bc,
- 0x103b16d8,
- 0x103b96f3,
- 0x103c1719,
- 0x103c80ea,
- 0x103d172a,
- 0x103d973e,
- 0x103e175d,
- 0x103e976c,
- 0x103f1783,
- 0x103f9796,
- 0x10400c24,
- 0x104097a9,
- 0x104117c7,
- 0x104197da,
- 0x104217f4,
- 0x10429804,
- 0x10431818,
- 0x1043982e,
- 0x10441846,
- 0x1044985b,
- 0x1045186f,
- 0x10459881,
- 0x104605fd,
- 0x1046894f,
- 0x10471896,
- 0x104798ad,
- 0x104818c2,
- 0x104898d0,
- 0x10490e73,
- 0x1049970a,
- 0x104a15d4,
- 0x14320c07,
- 0x14328c15,
- 0x14330c24,
- 0x14338c36,
- 0x143400ac,
- 0x143480ea,
- 0x18320083,
- 0x18328f7d,
- 0x183300ac,
- 0x18338f93,
- 0x18340fa7,
- 0x183480ea,
- 0x18350fbc,
- 0x18358fd4,
- 0x18360fe9,
- 0x18368ffd,
- 0x18371021,
- 0x18379037,
- 0x1838104b,
- 0x1838905b,
- 0x18390a75,
- 0x1839906b,
- 0x183a1080,
- 0x183a90a6,
- 0x183b0c7f,
- 0x183b90db,
- 0x183c10ed,
- 0x183c90f8,
- 0x183d1108,
- 0x183d9119,
- 0x183e112a,
- 0x183e913c,
- 0x183f1165,
- 0x183f917e,
- 0x18401196,
- 0x184086d5,
- 0x184110c9,
- 0x18419094,
- 0x184210b3,
- 0x18428c6c,
- 0x203211d0,
- 0x203291bd,
- 0x243211dc,
- 0x24328995,
- 0x243311ee,
- 0x243391fb,
- 0x24341208,
- 0x2434921a,
- 0x24351229,
- 0x24359246,
- 0x24361253,
- 0x24369261,
- 0x2437126f,
- 0x2437927d,
- 0x24381286,
- 0x24389293,
- 0x243912a6,
- 0x28320c54,
- 0x28328c7f,
- 0x28330c24,
- 0x28338c92,
- 0x28340c60,
- 0x283480ac,
- 0x283500ea,
- 0x28358c6c,
- 0x2c322ec7,
- 0x2c3292bd,
- 0x2c332ed5,
- 0x2c33aee7,
- 0x2c342efb,
- 0x2c34af0d,
- 0x2c352f28,
- 0x2c35af3a,
- 0x2c362f4d,
- 0x2c36832d,
- 0x2c372f5a,
- 0x2c37af6c,
- 0x2c382f91,
- 0x2c38afa8,
- 0x2c392fb6,
- 0x2c39afc6,
- 0x2c3a2fd8,
- 0x2c3aafec,
- 0x2c3b2ffd,
- 0x2c3bb01c,
- 0x2c3c12cf,
- 0x2c3c92e5,
- 0x2c3d3030,
- 0x2c3d92fe,
- 0x2c3e304d,
- 0x2c3eb05b,
- 0x2c3f3073,
- 0x2c3fb08b,
- 0x2c4030b5,
- 0x2c4091d0,
- 0x2c4130c6,
- 0x2c41b0d9,
- 0x2c421196,
- 0x2c42b0ea,
- 0x2c430722,
- 0x2c43b00e,
- 0x2c442f7f,
- 0x2c44b098,
- 0x30320000,
- 0x30328015,
- 0x3033001f,
- 0x30338038,
- 0x3034004a,
- 0x30348064,
- 0x3035006b,
- 0x30358083,
- 0x30360094,
- 0x303680ac,
- 0x303700b9,
- 0x303780c8,
- 0x303800ea,
- 0x303880f7,
- 0x3039010a,
- 0x30398125,
- 0x303a013a,
- 0x303a814e,
- 0x303b0162,
- 0x303b8173,
- 0x303c018c,
- 0x303c81a9,
- 0x303d01b7,
- 0x303d81cb,
- 0x303e01db,
- 0x303e81f4,
- 0x303f0204,
- 0x303f8217,
- 0x30400226,
- 0x30408232,
- 0x30410247,
- 0x30418257,
- 0x3042026e,
- 0x3042827b,
- 0x3043028e,
- 0x3043829d,
- 0x304402b2,
- 0x304482d3,
- 0x304502e6,
- 0x304582f9,
- 0x30460312,
- 0x3046832d,
- 0x3047034a,
- 0x3047835c,
- 0x3048036a,
- 0x3048837b,
- 0x3049038a,
- 0x304983a2,
- 0x304a03b4,
- 0x304a83c8,
- 0x304b03e0,
- 0x304b83f3,
- 0x304c03fe,
- 0x304c840f,
- 0x304d041b,
- 0x304d8431,
- 0x304e043f,
- 0x304e8455,
- 0x304f0467,
- 0x304f8479,
- 0x3050049c,
- 0x305084af,
- 0x305104c0,
- 0x305184d0,
- 0x305204e8,
- 0x305284fd,
- 0x30530515,
- 0x30538529,
- 0x30540541,
- 0x3054855a,
- 0x30550573,
- 0x30558590,
- 0x3056059b,
- 0x305685b3,
- 0x305705c3,
- 0x305785d4,
- 0x305805e7,
- 0x305885fd,
- 0x30590606,
- 0x3059861b,
- 0x305a062e,
- 0x305a863d,
- 0x305b065d,
- 0x305b866c,
- 0x305c068d,
- 0x305c86a9,
- 0x305d06b5,
- 0x305d86d5,
- 0x305e06f1,
- 0x305e8702,
- 0x305f0718,
- 0x305f8722,
- 0x3060048c,
- 0x34320b65,
- 0x34328b79,
- 0x34330b96,
- 0x34338ba9,
- 0x34340bb8,
- 0x34348bf1,
- 0x34350bd5,
- 0x3c320083,
- 0x3c328cbc,
- 0x3c330cd5,
- 0x3c338cf0,
- 0x3c340d0d,
- 0x3c348d37,
- 0x3c350d52,
- 0x3c358d78,
- 0x3c360d91,
- 0x3c368da9,
- 0x3c370dba,
- 0x3c378dc8,
- 0x3c380dd5,
- 0x3c388de9,
- 0x3c390c7f,
- 0x3c398e0c,
- 0x3c3a0e20,
- 0x3c3a890f,
- 0x3c3b0e30,
- 0x3c3b8e4b,
- 0x3c3c0e5d,
- 0x3c3c8e90,
- 0x3c3d0e9a,
- 0x3c3d8eae,
- 0x3c3e0ebc,
- 0x3c3e8ee1,
- 0x3c3f0ca8,
- 0x3c3f8eca,
- 0x3c4000ac,
- 0x3c4080ea,
- 0x3c410d28,
- 0x3c418d67,
- 0x3c420e73,
- 0x3c428dfd,
- 0x40321946,
- 0x4032995c,
- 0x4033198a,
- 0x40339994,
- 0x403419ab,
- 0x403499c9,
- 0x403519d9,
- 0x403599eb,
- 0x403619f8,
- 0x40369a04,
- 0x40371a19,
- 0x40379a2b,
- 0x40381a36,
- 0x40389a48,
- 0x40390f27,
- 0x40399a58,
- 0x403a1a6b,
- 0x403a9a8c,
- 0x403b1a9d,
- 0x403b9aad,
- 0x403c0064,
- 0x403c8083,
- 0x403d1b31,
- 0x403d9b47,
- 0x403e1b56,
- 0x403e9b8e,
- 0x403f1ba8,
- 0x403f9bd0,
- 0x40401be5,
- 0x40409bf9,
- 0x40411c16,
- 0x40419c31,
- 0x40421c4a,
- 0x40429c5d,
- 0x40431c71,
- 0x40439c89,
- 0x40441ca0,
- 0x404480ac,
- 0x40451cb5,
- 0x40459cc7,
- 0x40461ceb,
- 0x40469d0b,
- 0x40471d19,
- 0x40479d40,
- 0x40481db1,
- 0x40489de4,
- 0x40491dfb,
- 0x40499e15,
- 0x404a1e2c,
- 0x404a9e4a,
- 0x404b1e62,
- 0x404b9e79,
- 0x404c1e8f,
- 0x404c9ea1,
- 0x404d1ec2,
- 0x404d9efb,
- 0x404e1f0f,
- 0x404e9f1c,
- 0x404f1f49,
- 0x404f9f8f,
- 0x40501fe6,
- 0x40509ffa,
- 0x4051202d,
- 0x4052203d,
- 0x4052a061,
- 0x40532079,
- 0x4053a08c,
- 0x405420a1,
- 0x4054a0c4,
- 0x405520d2,
- 0x4055a10f,
- 0x4056211c,
- 0x4056a135,
- 0x4057214d,
- 0x4057a160,
- 0x40582175,
- 0x4058a19c,
- 0x405921cb,
- 0x4059a1f8,
- 0x405a220c,
- 0x405aa21c,
- 0x405b2234,
- 0x405ba245,
- 0x405c2258,
- 0x405ca297,
- 0x405d22a4,
- 0x405da2c9,
- 0x405e2307,
- 0x405e8ab3,
- 0x405f2328,
- 0x405fa335,
- 0x40602343,
- 0x4060a365,
- 0x406123c6,
- 0x4061a3fe,
- 0x40622415,
- 0x4062a426,
- 0x4063244b,
- 0x4063a460,
- 0x40642477,
- 0x4064a4a3,
- 0x406524be,
- 0x4065a4d5,
- 0x406624ed,
- 0x4066a517,
- 0x40672542,
- 0x4067a587,
- 0x406825cf,
- 0x4068a5f0,
- 0x40692622,
- 0x4069a650,
- 0x406a2671,
- 0x406aa691,
- 0x406b2819,
- 0x406ba83c,
- 0x406c2852,
- 0x406caaf5,
- 0x406d2b24,
- 0x406dab4c,
- 0x406e2b7a,
- 0x406eabc7,
- 0x406f2c02,
- 0x406fac3a,
- 0x40702c4d,
- 0x4070ac6a,
- 0x40710802,
- 0x4071ac7c,
- 0x40722c8f,
- 0x4072acc5,
- 0x40732cdd,
- 0x407394cf,
- 0x40742cf1,
- 0x4074ad0b,
- 0x40752d1c,
- 0x4075ad30,
- 0x40762d3e,
- 0x40769293,
- 0x40772d63,
- 0x4077ad85,
- 0x40782da0,
- 0x4078add9,
- 0x40792df0,
- 0x4079ae06,
- 0x407a2e32,
- 0x407aae45,
- 0x407b2e5a,
- 0x407bae6c,
- 0x407c2e9d,
- 0x407caea6,
- 0x407d260b,
- 0x407d9f9f,
- 0x407e2db5,
- 0x407ea1ac,
- 0x407f1d2d,
- 0x407f9ad3,
- 0x40801f59,
- 0x40809d55,
- 0x4081204f,
- 0x40819f33,
- 0x40822b65,
- 0x40829ab9,
- 0x40832187,
- 0x4083a488,
- 0x40841d69,
- 0x4084a1e4,
- 0x40852269,
- 0x4085a38d,
- 0x408622e9,
- 0x40869fb9,
- 0x40872bab,
- 0x4087a3db,
- 0x40881b1a,
- 0x4088a59a,
- 0x40891b69,
- 0x40899af6,
- 0x408a288a,
- 0x408a98e7,
- 0x408b2e81,
- 0x408bac17,
- 0x408c2279,
- 0x408c9903,
- 0x408d1dca,
- 0x408d9d9b,
- 0x408e1ee4,
- 0x408ea0ef,
- 0x408f25ae,
- 0x408fa3a9,
- 0x40902563,
- 0x4090a2bb,
- 0x40912872,
- 0x40919929,
- 0x40921bb6,
- 0x4092abe6,
- 0x40932ca8,
- 0x40939fca,
- 0x40941d7d,
- 0x4094a8a3,
- 0x40952437,
- 0x4095ae12,
- 0x40962b92,
- 0x40969f72,
- 0x40972015,
- 0x41f42744,
- 0x41f927d6,
- 0x41fe26c9,
- 0x41fea8e6,
- 0x41ff29d7,
- 0x4203275d,
- 0x4208277f,
- 0x4208a7bb,
- 0x420926ad,
- 0x4209a7f5,
- 0x420a2704,
- 0x420aa6e4,
- 0x420b2724,
- 0x420ba79d,
- 0x420c29f3,
- 0x420ca8b3,
- 0x420d28cd,
- 0x420da904,
- 0x4212291e,
- 0x421729ba,
- 0x4217a960,
- 0x421c2982,
- 0x421f293d,
- 0x42212a0a,
- 0x4226299d,
- 0x422b2ad9,
- 0x422baa87,
- 0x422c2ac1,
- 0x422caa46,
- 0x422d2a25,
- 0x422daaa6,
- 0x422e2a6c,
- 0x4432072d,
- 0x4432873c,
- 0x44330748,
- 0x44338756,
- 0x44340769,
- 0x4434877a,
- 0x44350781,
- 0x4435878b,
- 0x4436079e,
- 0x443687b4,
- 0x443707c6,
- 0x443787d3,
- 0x443807e2,
- 0x443887ea,
- 0x44390802,
- 0x44398810,
- 0x443a0823,
- 0x483212bd,
- 0x483292cf,
- 0x483312e5,
- 0x483392fe,
- 0x4c321323,
- 0x4c329333,
- 0x4c331346,
- 0x4c339366,
- 0x4c3400ac,
- 0x4c3480ea,
- 0x4c351372,
- 0x4c359380,
- 0x4c36139c,
- 0x4c3693c2,
- 0x4c3713d1,
- 0x4c3793df,
- 0x4c3813f4,
- 0x4c389400,
- 0x4c391420,
- 0x4c39944a,
- 0x4c3a1463,
- 0x4c3a947c,
- 0x4c3b05fd,
- 0x4c3b9495,
- 0x4c3c14a7,
- 0x4c3c94b6,
- 0x4c3d14cf,
- 0x4c3d8c47,
- 0x4c3e153c,
- 0x4c3e94de,
- 0x4c3f155e,
- 0x4c3f9293,
- 0x4c4014f4,
- 0x4c40930f,
- 0x4c41152c,
- 0x4c4193af,
- 0x4c421518,
- 0x503230fc,
- 0x5032b10b,
- 0x50333116,
- 0x5033b126,
- 0x5034313f,
- 0x5034b159,
- 0x50353167,
- 0x5035b17d,
- 0x5036318f,
- 0x5036b1a5,
- 0x503731be,
- 0x5037b1d1,
- 0x503831e9,
- 0x5038b1fa,
- 0x5039320f,
- 0x5039b223,
- 0x503a3243,
- 0x503ab259,
- 0x503b3271,
- 0x503bb283,
- 0x503c329f,
- 0x503cb2b6,
- 0x503d32cf,
- 0x503db2e5,
- 0x503e32f2,
- 0x503eb308,
- 0x503f331a,
- 0x503f837b,
- 0x5040332d,
- 0x5040b33d,
- 0x50413357,
- 0x5041b366,
- 0x50423380,
- 0x5042b39d,
- 0x504333ad,
- 0x5043b3bd,
- 0x504433cc,
- 0x50448431,
- 0x504533e0,
- 0x5045b3fe,
- 0x50463411,
- 0x5046b427,
- 0x50473439,
- 0x5047b44e,
- 0x50483474,
- 0x5048b482,
- 0x50493495,
- 0x5049b4aa,
- 0x504a34c0,
- 0x504ab4d0,
- 0x504b34f0,
- 0x504bb503,
- 0x504c3526,
- 0x504cb554,
- 0x504d3566,
- 0x504db583,
- 0x504e359e,
- 0x504eb5ba,
- 0x504f35cc,
- 0x504fb5e3,
- 0x505035f2,
- 0x505086f1,
- 0x50513605,
- 0x58320f65,
- 0x68320f27,
- 0x68328c7f,
- 0x68330c92,
- 0x68338f35,
- 0x68340f45,
- 0x683480ea,
- 0x6c320eed,
- 0x6c328c36,
- 0x6c330ef8,
- 0x6c338f11,
- 0x74320a1b,
- 0x743280ac,
- 0x74330c47,
- 0x78320980,
- 0x78328995,
- 0x783309a1,
- 0x78338083,
- 0x783409b0,
- 0x783489c5,
- 0x783509e4,
- 0x78358a06,
- 0x78360a1b,
- 0x78368a31,
- 0x78370a41,
- 0x78378a62,
- 0x78380a75,
- 0x78388a87,
- 0x78390a94,
- 0x78398ab3,
- 0x783a0ac8,
- 0x783a8ad6,
- 0x783b0ae0,
- 0x783b8af4,
- 0x783c0b0b,
- 0x783c8b20,
- 0x783d0b37,
- 0x783d8b4c,
- 0x783e0aa2,
- 0x783e8a54,
- 0x7c3211ac,
- };
-
- const size_t kOpenSSLReasonValuesLen = sizeof(kOpenSSLReasonValues) / sizeof(kOpenSSLReasonValues[0]);
-
- const char kOpenSSLReasonStringData[] =
- "ASN1_LENGTH_MISMATCH\\0"
- "AUX_ERROR\\0"
- "BAD_GET_ASN1_OBJECT_CALL\\0"
- "BAD_OBJECT_HEADER\\0"
- "BMPSTRING_IS_WRONG_LENGTH\\0"
- "BN_LIB\\0"
- "BOOLEAN_IS_WRONG_LENGTH\\0"
- "BUFFER_TOO_SMALL\\0"
- "CONTEXT_NOT_INITIALISED\\0"
- "DECODE_ERROR\\0"
- "DEPTH_EXCEEDED\\0"
- "DIGEST_AND_KEY_TYPE_NOT_SUPPORTED\\0"
- "ENCODE_ERROR\\0"
- "ERROR_GETTING_TIME\\0"
- "EXPECTING_AN_ASN1_SEQUENCE\\0"
- "EXPECTING_AN_INTEGER\\0"
- "EXPECTING_AN_OBJECT\\0"
- "EXPECTING_A_BOOLEAN\\0"
- "EXPECTING_A_TIME\\0"
- "EXPLICIT_LENGTH_MISMATCH\\0"
- "EXPLICIT_TAG_NOT_CONSTRUCTED\\0"
- "FIELD_MISSING\\0"
- "FIRST_NUM_TOO_LARGE\\0"
- "HEADER_TOO_LONG\\0"
- "ILLEGAL_BITSTRING_FORMAT\\0"
- "ILLEGAL_BOOLEAN\\0"
- "ILLEGAL_CHARACTERS\\0"
- "ILLEGAL_FORMAT\\0"
- "ILLEGAL_HEX\\0"
- "ILLEGAL_IMPLICIT_TAG\\0"
- "ILLEGAL_INTEGER\\0"
- "ILLEGAL_NESTED_TAGGING\\0"
- "ILLEGAL_NULL\\0"
- "ILLEGAL_NULL_VALUE\\0"
- "ILLEGAL_OBJECT\\0"
- "ILLEGAL_OPTIONAL_ANY\\0"
- "ILLEGAL_OPTIONS_ON_ITEM_TEMPLATE\\0"
- "ILLEGAL_TAGGED_ANY\\0"
- "ILLEGAL_TIME_VALUE\\0"
- "INTEGER_NOT_ASCII_FORMAT\\0"
- "INTEGER_TOO_LARGE_FOR_LONG\\0"
- "INVALID_BIT_STRING_BITS_LEFT\\0"
- "INVALID_BMPSTRING\\0"
- "INVALID_DIGIT\\0"
- "INVALID_MODIFIER\\0"
- "INVALID_NUMBER\\0"
- "INVALID_OBJECT_ENCODING\\0"
- "INVALID_SEPARATOR\\0"
- "INVALID_TIME_FORMAT\\0"
- "INVALID_UNIVERSALSTRING\\0"
- "INVALID_UTF8STRING\\0"
- "LIST_ERROR\\0"
- "MISSING_ASN1_EOS\\0"
- "MISSING_EOC\\0"
- "MISSING_SECOND_NUMBER\\0"
- "MISSING_VALUE\\0"
- "MSTRING_NOT_UNIVERSAL\\0"
- "MSTRING_WRONG_TAG\\0"
- "NESTED_ASN1_ERROR\\0"
- "NESTED_ASN1_STRING\\0"
- "NESTED_TOO_DEEP\\0"
- "NON_HEX_CHARACTERS\\0"
- "NOT_ASCII_FORMAT\\0"
- "NOT_ENOUGH_DATA\\0"
- "NO_MATCHING_CHOICE_TYPE\\0"
- "NULL_IS_WRONG_LENGTH\\0"
- "OBJECT_NOT_ASCII_FORMAT\\0"
- "ODD_NUMBER_OF_CHARS\\0"
- "SECOND_NUMBER_TOO_LARGE\\0"
- "SEQUENCE_LENGTH_MISMATCH\\0"
- "SEQUENCE_NOT_CONSTRUCTED\\0"
- "SEQUENCE_OR_SET_NEEDS_CONFIG\\0"
- "SHORT_LINE\\0"
- "STREAMING_NOT_SUPPORTED\\0"
- "STRING_TOO_LONG\\0"
- "STRING_TOO_SHORT\\0"
- "TAG_VALUE_TOO_HIGH\\0"
- "TIME_NOT_ASCII_FORMAT\\0"
- "TOO_LONG\\0"
- "TYPE_NOT_CONSTRUCTED\\0"
- "TYPE_NOT_PRIMITIVE\\0"
- "UNEXPECTED_EOC\\0"
- "UNIVERSALSTRING_IS_WRONG_LENGTH\\0"
- "UNKNOWN_FORMAT\\0"
- "UNKNOWN_MESSAGE_DIGEST_ALGORITHM\\0"
- "UNKNOWN_SIGNATURE_ALGORITHM\\0"
- "UNKNOWN_TAG\\0"
- "UNSUPPORTED_ANY_DEFINED_BY_TYPE\\0"
- "UNSUPPORTED_PUBLIC_KEY_TYPE\\0"
- "UNSUPPORTED_TYPE\\0"
- "WRONG_PUBLIC_KEY_TYPE\\0"
- "WRONG_TAG\\0"
- "WRONG_TYPE\\0"
- "BAD_FOPEN_MODE\\0"
- "BROKEN_PIPE\\0"
- "CONNECT_ERROR\\0"
- "ERROR_SETTING_NBIO\\0"
- "INVALID_ARGUMENT\\0"
- "IN_USE\\0"
- "KEEPALIVE\\0"
- "NBIO_CONNECT_ERROR\\0"
- "NO_HOSTNAME_SPECIFIED\\0"
- "NO_PORT_SPECIFIED\\0"
- "NO_SUCH_FILE\\0"
- "NULL_PARAMETER\\0"
- "SYS_LIB\\0"
- "UNABLE_TO_CREATE_SOCKET\\0"
- "UNINITIALIZED\\0"
- "UNSUPPORTED_METHOD\\0"
- "WRITE_TO_READ_ONLY_BIO\\0"
- "ARG2_LT_ARG3\\0"
- "BAD_ENCODING\\0"
- "BAD_RECIPROCAL\\0"
- "BIGNUM_TOO_LONG\\0"
- "BITS_TOO_SMALL\\0"
- "CALLED_WITH_EVEN_MODULUS\\0"
- "DIV_BY_ZERO\\0"
- "EXPAND_ON_STATIC_BIGNUM_DATA\\0"
- "INPUT_NOT_REDUCED\\0"
- "INVALID_INPUT\\0"
- "INVALID_RANGE\\0"
- "NEGATIVE_NUMBER\\0"
- "NOT_A_SQUARE\\0"
- "NOT_INITIALIZED\\0"
- "NO_INVERSE\\0"
- "PRIVATE_KEY_TOO_LARGE\\0"
- "P_IS_NOT_PRIME\\0"
- "TOO_MANY_ITERATIONS\\0"
- "TOO_MANY_TEMPORARY_VARIABLES\\0"
- "AES_KEY_SETUP_FAILED\\0"
- "BAD_DECRYPT\\0"
- "BAD_KEY_LENGTH\\0"
- "CTRL_NOT_IMPLEMENTED\\0"
- "CTRL_OPERATION_NOT_IMPLEMENTED\\0"
- "DATA_NOT_MULTIPLE_OF_BLOCK_LENGTH\\0"
- "INITIALIZATION_ERROR\\0"
- "INPUT_NOT_INITIALIZED\\0"
- "INVALID_AD_SIZE\\0"
- "INVALID_KEY_LENGTH\\0"
- "INVALID_NONCE\\0"
- "INVALID_NONCE_SIZE\\0"
- "INVALID_OPERATION\\0"
- "IV_TOO_LARGE\\0"
- "NO_CIPHER_SET\\0"
- "NO_DIRECTION_SET\\0"
- "OUTPUT_ALIASES_INPUT\\0"
- "TAG_TOO_LARGE\\0"
- "TOO_LARGE\\0"
- "UNSUPPORTED_AD_SIZE\\0"
- "UNSUPPORTED_INPUT_SIZE\\0"
- "UNSUPPORTED_KEY_SIZE\\0"
- "UNSUPPORTED_NONCE_SIZE\\0"
- "UNSUPPORTED_TAG_SIZE\\0"
- "WRONG_FINAL_BLOCK_LENGTH\\0"
- "LIST_CANNOT_BE_NULL\\0"
- "MISSING_CLOSE_SQUARE_BRACKET\\0"
- "MISSING_EQUAL_SIGN\\0"
- "NO_CLOSE_BRACE\\0"
- "UNABLE_TO_CREATE_NEW_SECTION\\0"
- "VARIABLE_EXPANSION_TOO_LONG\\0"
- "VARIABLE_HAS_NO_VALUE\\0"
- "BAD_GENERATOR\\0"
- "INVALID_PUBKEY\\0"
- "MODULUS_TOO_LARGE\\0"
- "NO_PRIVATE_VALUE\\0"
- "UNKNOWN_HASH\\0"
- "BAD_Q_VALUE\\0"
- "BAD_VERSION\\0"
- "INVALID_PARAMETERS\\0"
- "MISSING_PARAMETERS\\0"
- "NEED_NEW_SETUP_VALUES\\0"
- "BIGNUM_OUT_OF_RANGE\\0"
- "COORDINATES_OUT_OF_RANGE\\0"
- "D2I_ECPKPARAMETERS_FAILURE\\0"
- "EC_GROUP_NEW_BY_NAME_FAILURE\\0"
- "GROUP2PKPARAMETERS_FAILURE\\0"
- "GROUP_MISMATCH\\0"
- "I2D_ECPKPARAMETERS_FAILURE\\0"
- "INCOMPATIBLE_OBJECTS\\0"
- "INVALID_COFACTOR\\0"
- "INVALID_COMPRESSED_POINT\\0"
- "INVALID_COMPRESSION_BIT\\0"
- "INVALID_ENCODING\\0"
- "INVALID_FIELD\\0"
- "INVALID_FORM\\0"
- "INVALID_GROUP_ORDER\\0"
- "INVALID_PRIVATE_KEY\\0"
- "INVALID_SCALAR\\0"
- "MISSING_PRIVATE_KEY\\0"
- "NON_NAMED_CURVE\\0"
- "PKPARAMETERS2GROUP_FAILURE\\0"
- "POINT_AT_INFINITY\\0"
- "POINT_IS_NOT_ON_CURVE\\0"
- "PUBLIC_KEY_VALIDATION_FAILED\\0"
- "SLOT_FULL\\0"
- "UNDEFINED_GENERATOR\\0"
- "UNKNOWN_GROUP\\0"
- "UNKNOWN_ORDER\\0"
- "WRONG_CURVE_PARAMETERS\\0"
- "WRONG_ORDER\\0"
- "KDF_FAILED\\0"
- "POINT_ARITHMETIC_FAILURE\\0"
- "UNKNOWN_DIGEST_LENGTH\\0"
- "BAD_SIGNATURE\\0"
- "NOT_IMPLEMENTED\\0"
- "RANDOM_NUMBER_GENERATION_FAILED\\0"
- "OPERATION_NOT_SUPPORTED\\0"
- "COMMAND_NOT_SUPPORTED\\0"
- "DIFFERENT_KEY_TYPES\\0"
- "DIFFERENT_PARAMETERS\\0"
- "EXPECTING_AN_EC_KEY_KEY\\0"
- "EXPECTING_AN_RSA_KEY\\0"
- "EXPECTING_A_DSA_KEY\\0"
- "ILLEGAL_OR_UNSUPPORTED_PADDING_MODE\\0"
- "INVALID_DIGEST_LENGTH\\0"
- "INVALID_DIGEST_TYPE\\0"
- "INVALID_KEYBITS\\0"
- "INVALID_MGF1_MD\\0"
- "INVALID_PADDING_MODE\\0"
- "INVALID_PSS_SALTLEN\\0"
- "INVALID_SIGNATURE\\0"
- "KEYS_NOT_SET\\0"
- "MEMORY_LIMIT_EXCEEDED\\0"
- "NOT_A_PRIVATE_KEY\\0"
- "NO_DEFAULT_DIGEST\\0"
- "NO_KEY_SET\\0"
- "NO_MDC2_SUPPORT\\0"
- "NO_NID_FOR_CURVE\\0"
- "NO_OPERATION_SET\\0"
- "NO_PARAMETERS_SET\\0"
- "OPERATION_NOT_SUPPORTED_FOR_THIS_KEYTYPE\\0"
- "OPERATON_NOT_INITIALIZED\\0"
- "UNKNOWN_PUBLIC_KEY_TYPE\\0"
- "UNSUPPORTED_ALGORITHM\\0"
- "OUTPUT_TOO_LARGE\\0"
- "INVALID_OID_STRING\\0"
- "UNKNOWN_NID\\0"
- "BAD_BASE64_DECODE\\0"
- "BAD_END_LINE\\0"
- "BAD_IV_CHARS\\0"
- "BAD_PASSWORD_READ\\0"
- "CIPHER_IS_NULL\\0"
- "ERROR_CONVERTING_PRIVATE_KEY\\0"
- "NOT_DEK_INFO\\0"
- "NOT_ENCRYPTED\\0"
- "NOT_PROC_TYPE\\0"
- "NO_START_LINE\\0"
- "READ_KEY\\0"
- "SHORT_HEADER\\0"
- "UNSUPPORTED_CIPHER\\0"
- "UNSUPPORTED_ENCRYPTION\\0"
- "BAD_PKCS7_VERSION\\0"
- "NOT_PKCS7_SIGNED_DATA\\0"
- "NO_CERTIFICATES_INCLUDED\\0"
- "NO_CRLS_INCLUDED\\0"
- "BAD_ITERATION_COUNT\\0"
- "BAD_PKCS12_DATA\\0"
- "BAD_PKCS12_VERSION\\0"
- "CIPHER_HAS_NO_OBJECT_IDENTIFIER\\0"
- "CRYPT_ERROR\\0"
- "ENCRYPT_ERROR\\0"
- "ERROR_SETTING_CIPHER_PARAMS\\0"
- "INCORRECT_PASSWORD\\0"
- "INVALID_CHARACTERS\\0"
- "KEYGEN_FAILURE\\0"
- "KEY_GEN_ERROR\\0"
- "METHOD_NOT_SUPPORTED\\0"
- "MISSING_MAC\\0"
- "MULTIPLE_PRIVATE_KEYS_IN_PKCS12\\0"
- "PKCS12_PUBLIC_KEY_INTEGRITY_NOT_SUPPORTED\\0"
- "PKCS12_TOO_DEEPLY_NESTED\\0"
- "PRIVATE_KEY_DECODE_ERROR\\0"
- "PRIVATE_KEY_ENCODE_ERROR\\0"
- "UNKNOWN_ALGORITHM\\0"
- "UNKNOWN_CIPHER\\0"
- "UNKNOWN_CIPHER_ALGORITHM\\0"
- "UNKNOWN_DIGEST\\0"
- "UNSUPPORTED_KEYLENGTH\\0"
- "UNSUPPORTED_KEY_DERIVATION_FUNCTION\\0"
- "UNSUPPORTED_OPTIONS\\0"
- "UNSUPPORTED_PRF\\0"
- "UNSUPPORTED_PRIVATE_KEY_ALGORITHM\\0"
- "UNSUPPORTED_SALT_TYPE\\0"
- "BAD_E_VALUE\\0"
- "BAD_FIXED_HEADER_DECRYPT\\0"
- "BAD_PAD_BYTE_COUNT\\0"
- "BAD_RSA_PARAMETERS\\0"
- "BLOCK_TYPE_IS_NOT_01\\0"
- "BLOCK_TYPE_IS_NOT_02\\0"
- "BN_NOT_INITIALIZED\\0"
- "CANNOT_RECOVER_MULTI_PRIME_KEY\\0"
- "CRT_PARAMS_ALREADY_GIVEN\\0"
- "CRT_VALUES_INCORRECT\\0"
- "DATA_LEN_NOT_EQUAL_TO_MOD_LEN\\0"
- "DATA_TOO_LARGE\\0"
- "DATA_TOO_LARGE_FOR_KEY_SIZE\\0"
- "DATA_TOO_LARGE_FOR_MODULUS\\0"
- "DATA_TOO_SMALL\\0"
- "DATA_TOO_SMALL_FOR_KEY_SIZE\\0"
- "DIGEST_TOO_BIG_FOR_RSA_KEY\\0"
- "D_E_NOT_CONGRUENT_TO_1\\0"
- "D_OUT_OF_RANGE\\0"
- "EMPTY_PUBLIC_KEY\\0"
- "FIRST_OCTET_INVALID\\0"
- "INCONSISTENT_SET_OF_CRT_VALUES\\0"
- "INTERNAL_ERROR\\0"
- "INVALID_MESSAGE_LENGTH\\0"
- "KEY_SIZE_TOO_SMALL\\0"
- "LAST_OCTET_INVALID\\0"
- "MUST_HAVE_AT_LEAST_TWO_PRIMES\\0"
- "NO_PUBLIC_EXPONENT\\0"
- "NULL_BEFORE_BLOCK_MISSING\\0"
- "N_NOT_EQUAL_P_Q\\0"
- "OAEP_DECODING_ERROR\\0"
- "ONLY_ONE_OF_P_Q_GIVEN\\0"
- "OUTPUT_BUFFER_TOO_SMALL\\0"
- "PADDING_CHECK_FAILED\\0"
- "PKCS_DECODING_ERROR\\0"
- "SLEN_CHECK_FAILED\\0"
- "SLEN_RECOVERY_FAILED\\0"
- "UNKNOWN_ALGORITHM_TYPE\\0"
- "UNKNOWN_PADDING_TYPE\\0"
- "VALUE_MISSING\\0"
- "WRONG_SIGNATURE_LENGTH\\0"
- "ALPN_MISMATCH_ON_EARLY_DATA\\0"
- "APPLICATION_DATA_INSTEAD_OF_HANDSHAKE\\0"
- "APPLICATION_DATA_ON_SHUTDOWN\\0"
- "APP_DATA_IN_HANDSHAKE\\0"
- "ATTEMPT_TO_REUSE_SESSION_IN_DIFFERENT_CONTEXT\\0"
- "BAD_ALERT\\0"
- "BAD_CHANGE_CIPHER_SPEC\\0"
- "BAD_DATA_RETURNED_BY_CALLBACK\\0"
- "BAD_DH_P_LENGTH\\0"
- "BAD_DIGEST_LENGTH\\0"
- "BAD_ECC_CERT\\0"
- "BAD_ECPOINT\\0"
- "BAD_HANDSHAKE_RECORD\\0"
- "BAD_HELLO_REQUEST\\0"
- "BAD_LENGTH\\0"
- "BAD_PACKET_LENGTH\\0"
- "BAD_RSA_ENCRYPT\\0"
- "BAD_SRTP_MKI_VALUE\\0"
- "BAD_SRTP_PROTECTION_PROFILE_LIST\\0"
- "BAD_SSL_FILETYPE\\0"
- "BAD_WRITE_RETRY\\0"
- "BIO_NOT_SET\\0"
- "BLOCK_CIPHER_PAD_IS_WRONG\\0"
- "BUFFERED_MESSAGES_ON_CIPHER_CHANGE\\0"
- "CANNOT_HAVE_BOTH_PRIVKEY_AND_METHOD\\0"
- "CANNOT_PARSE_LEAF_CERT\\0"
- "CA_DN_LENGTH_MISMATCH\\0"
- "CA_DN_TOO_LONG\\0"
- "CCS_RECEIVED_EARLY\\0"
- "CERTIFICATE_AND_PRIVATE_KEY_MISMATCH\\0"
- "CERTIFICATE_VERIFY_FAILED\\0"
- "CERT_CB_ERROR\\0"
- "CERT_DECOMPRESSION_FAILED\\0"
- "CERT_LENGTH_MISMATCH\\0"
- "CHANNEL_ID_NOT_P256\\0"
- "CHANNEL_ID_SIGNATURE_INVALID\\0"
- "CIPHER_OR_HASH_UNAVAILABLE\\0"
- "CLIENTHELLO_PARSE_FAILED\\0"
- "CLIENTHELLO_TLSEXT\\0"
- "CONNECTION_REJECTED\\0"
- "CONNECTION_TYPE_NOT_SET\\0"
- "CUSTOM_EXTENSION_ERROR\\0"
- "DATA_LENGTH_TOO_LONG\\0"
- "DECRYPTION_FAILED\\0"
- "DECRYPTION_FAILED_OR_BAD_RECORD_MAC\\0"
- "DH_PUBLIC_VALUE_LENGTH_IS_WRONG\\0"
- "DH_P_TOO_LONG\\0"
- "DIGEST_CHECK_FAILED\\0"
- "DOWNGRADE_DETECTED\\0"
- "DTLS_MESSAGE_TOO_BIG\\0"
- "DUPLICATE_EXTENSION\\0"
- "DUPLICATE_KEY_SHARE\\0"
- "DUPLICATE_SIGNATURE_ALGORITHM\\0"
- "EARLY_DATA_NOT_IN_USE\\0"
- "ECC_CERT_NOT_FOR_SIGNING\\0"
- "EMPTY_HELLO_RETRY_REQUEST\\0"
- "EMS_STATE_INCONSISTENT\\0"
- "ENCRYPTED_LENGTH_TOO_LONG\\0"
- "ERROR_ADDING_EXTENSION\\0"
- "ERROR_IN_RECEIVED_CIPHER_LIST\\0"
- "ERROR_PARSING_EXTENSION\\0"
- "EXCESSIVE_MESSAGE_SIZE\\0"
- "EXTRA_DATA_IN_MESSAGE\\0"
- "FRAGMENT_MISMATCH\\0"
- "GOT_NEXT_PROTO_WITHOUT_EXTENSION\\0"
- "HANDSHAKE_FAILURE_ON_CLIENT_HELLO\\0"
- "HANDSHAKE_NOT_COMPLETE\\0"
- "HTTPS_PROXY_REQUEST\\0"
- "HTTP_REQUEST\\0"
- "INAPPROPRIATE_FALLBACK\\0"
- "INVALID_ALPN_PROTOCOL\\0"
- "INVALID_COMMAND\\0"
- "INVALID_COMPRESSION_LIST\\0"
- "INVALID_DELEGATED_CREDENTIAL\\0"
- "INVALID_MESSAGE\\0"
- "INVALID_OUTER_RECORD_TYPE\\0"
- "INVALID_SCT_LIST\\0"
- "INVALID_SIGNATURE_ALGORITHM\\0"
- "INVALID_SSL_SESSION\\0"
- "INVALID_TICKET_KEYS_LENGTH\\0"
- "KEY_USAGE_BIT_INCORRECT\\0"
- "LENGTH_MISMATCH\\0"
- "MISSING_EXTENSION\\0"
- "MISSING_KEY_SHARE\\0"
- "MISSING_RSA_CERTIFICATE\\0"
- "MISSING_TMP_DH_KEY\\0"
- "MISSING_TMP_ECDH_KEY\\0"
- "MIXED_SPECIAL_OPERATOR_WITH_GROUPS\\0"
- "MTU_TOO_SMALL\\0"
- "NEGOTIATED_BOTH_NPN_AND_ALPN\\0"
- "NEGOTIATED_TB_WITHOUT_EMS_OR_RI\\0"
- "NESTED_GROUP\\0"
- "NO_CERTIFICATES_RETURNED\\0"
- "NO_CERTIFICATE_ASSIGNED\\0"
- "NO_CERTIFICATE_SET\\0"
- "NO_CIPHERS_AVAILABLE\\0"
- "NO_CIPHERS_PASSED\\0"
- "NO_CIPHERS_SPECIFIED\\0"
- "NO_CIPHER_MATCH\\0"
- "NO_COMMON_SIGNATURE_ALGORITHMS\\0"
- "NO_COMPRESSION_SPECIFIED\\0"
- "NO_GROUPS_SPECIFIED\\0"
- "NO_METHOD_SPECIFIED\\0"
- "NO_P256_SUPPORT\\0"
- "NO_PRIVATE_KEY_ASSIGNED\\0"
- "NO_RENEGOTIATION\\0"
- "NO_REQUIRED_DIGEST\\0"
- "NO_SHARED_CIPHER\\0"
- "NO_SHARED_GROUP\\0"
- "NO_SUPPORTED_VERSIONS_ENABLED\\0"
- "NULL_SSL_CTX\\0"
- "NULL_SSL_METHOD_PASSED\\0"
- "OCSP_CB_ERROR\\0"
- "OLD_SESSION_CIPHER_NOT_RETURNED\\0"
- "OLD_SESSION_PRF_HASH_MISMATCH\\0"
- "OLD_SESSION_VERSION_NOT_RETURNED\\0"
- "PARSE_TLSEXT\\0"
- "PATH_TOO_LONG\\0"
- "PEER_DID_NOT_RETURN_A_CERTIFICATE\\0"
- "PEER_ERROR_UNSUPPORTED_CERTIFICATE_TYPE\\0"
- "PRE_SHARED_KEY_MUST_BE_LAST\\0"
- "PRIVATE_KEY_OPERATION_FAILED\\0"
- "PROTOCOL_IS_SHUTDOWN\\0"
- "PSK_IDENTITY_BINDER_COUNT_MISMATCH\\0"
- "PSK_IDENTITY_NOT_FOUND\\0"
- "PSK_NO_CLIENT_CB\\0"
- "PSK_NO_SERVER_CB\\0"
- "QUIC_INTERNAL_ERROR\\0"
- "READ_TIMEOUT_EXPIRED\\0"
- "RECORD_LENGTH_MISMATCH\\0"
- "RECORD_TOO_LARGE\\0"
- "RENEGOTIATION_EMS_MISMATCH\\0"
- "RENEGOTIATION_ENCODING_ERR\\0"
- "RENEGOTIATION_MISMATCH\\0"
- "REQUIRED_CIPHER_MISSING\\0"
- "RESUMED_EMS_SESSION_WITHOUT_EMS_EXTENSION\\0"
- "RESUMED_NON_EMS_SESSION_WITH_EMS_EXTENSION\\0"
- "SCSV_RECEIVED_WHEN_RENEGOTIATING\\0"
- "SECOND_SERVERHELLO_VERSION_MISMATCH\\0"
- "SERVERHELLO_TLSEXT\\0"
- "SERVER_CERT_CHANGED\\0"
- "SERVER_ECHOED_INVALID_SESSION_ID\\0"
- "SESSION_ID_CONTEXT_UNINITIALIZED\\0"
- "SESSION_MAY_NOT_BE_CREATED\\0"
- "SHUTDOWN_WHILE_IN_INIT\\0"
- "SIGNATURE_ALGORITHMS_EXTENSION_SENT_BY_SERVER\\0"
- "SRTP_COULD_NOT_ALLOCATE_PROFILES\\0"
- "SRTP_UNKNOWN_PROTECTION_PROFILE\\0"
- "SSL3_EXT_INVALID_SERVERNAME\\0"
- "SSLV3_ALERT_BAD_CERTIFICATE\\0"
- "SSLV3_ALERT_BAD_RECORD_MAC\\0"
- "SSLV3_ALERT_CERTIFICATE_EXPIRED\\0"
- "SSLV3_ALERT_CERTIFICATE_REVOKED\\0"
- "SSLV3_ALERT_CERTIFICATE_UNKNOWN\\0"
- "SSLV3_ALERT_CLOSE_NOTIFY\\0"
- "SSLV3_ALERT_DECOMPRESSION_FAILURE\\0"
- "SSLV3_ALERT_HANDSHAKE_FAILURE\\0"
- "SSLV3_ALERT_ILLEGAL_PARAMETER\\0"
- "SSLV3_ALERT_NO_CERTIFICATE\\0"
- "SSLV3_ALERT_UNEXPECTED_MESSAGE\\0"
- "SSLV3_ALERT_UNSUPPORTED_CERTIFICATE\\0"
- "SSL_CTX_HAS_NO_DEFAULT_SSL_VERSION\\0"
- "SSL_HANDSHAKE_FAILURE\\0"
- "SSL_SESSION_ID_CONTEXT_TOO_LONG\\0"
- "SSL_SESSION_ID_TOO_LONG\\0"
- "TICKET_ENCRYPTION_FAILED\\0"
- "TLS13_DOWNGRADE\\0"
- "TLSV1_ALERT_ACCESS_DENIED\\0"
- "TLSV1_ALERT_DECODE_ERROR\\0"
- "TLSV1_ALERT_DECRYPTION_FAILED\\0"
- "TLSV1_ALERT_DECRYPT_ERROR\\0"
- "TLSV1_ALERT_EXPORT_RESTRICTION\\0"
- "TLSV1_ALERT_INAPPROPRIATE_FALLBACK\\0"
- "TLSV1_ALERT_INSUFFICIENT_SECURITY\\0"
- "TLSV1_ALERT_INTERNAL_ERROR\\0"
- "TLSV1_ALERT_NO_RENEGOTIATION\\0"
- "TLSV1_ALERT_PROTOCOL_VERSION\\0"
- "TLSV1_ALERT_RECORD_OVERFLOW\\0"
- "TLSV1_ALERT_UNKNOWN_CA\\0"
- "TLSV1_ALERT_USER_CANCELLED\\0"
- "TLSV1_BAD_CERTIFICATE_HASH_VALUE\\0"
- "TLSV1_BAD_CERTIFICATE_STATUS_RESPONSE\\0"
- "TLSV1_CERTIFICATE_REQUIRED\\0"
- "TLSV1_CERTIFICATE_UNOBTAINABLE\\0"
- "TLSV1_UNKNOWN_PSK_IDENTITY\\0"
- "TLSV1_UNRECOGNIZED_NAME\\0"
- "TLSV1_UNSUPPORTED_EXTENSION\\0"
- "TLS_PEER_DID_NOT_RESPOND_WITH_CERTIFICATE_LIST\\0"
- "TLS_RSA_ENCRYPTED_VALUE_LENGTH_IS_WRONG\\0"
- "TOO_MANY_EMPTY_FRAGMENTS\\0"
- "TOO_MANY_KEY_UPDATES\\0"
- "TOO_MANY_WARNING_ALERTS\\0"
- "TOO_MUCH_READ_EARLY_DATA\\0"
- "TOO_MUCH_SKIPPED_EARLY_DATA\\0"
- "UNABLE_TO_FIND_ECDH_PARAMETERS\\0"
- "UNCOMPRESSED_CERT_TOO_LARGE\\0"
- "UNEXPECTED_EXTENSION\\0"
- "UNEXPECTED_EXTENSION_ON_EARLY_DATA\\0"
- "UNEXPECTED_MESSAGE\\0"
- "UNEXPECTED_OPERATOR_IN_GROUP\\0"
- "UNEXPECTED_RECORD\\0"
- "UNKNOWN_ALERT_TYPE\\0"
- "UNKNOWN_CERTIFICATE_TYPE\\0"
- "UNKNOWN_CERT_COMPRESSION_ALG\\0"
- "UNKNOWN_CIPHER_RETURNED\\0"
- "UNKNOWN_CIPHER_TYPE\\0"
- "UNKNOWN_KEY_EXCHANGE_TYPE\\0"
- "UNKNOWN_PROTOCOL\\0"
- "UNKNOWN_SSL_VERSION\\0"
- "UNKNOWN_STATE\\0"
- "UNSAFE_LEGACY_RENEGOTIATION_DISABLED\\0"
- "UNSUPPORTED_COMPRESSION_ALGORITHM\\0"
- "UNSUPPORTED_ELLIPTIC_CURVE\\0"
- "UNSUPPORTED_PROTOCOL\\0"
- "UNSUPPORTED_PROTOCOL_FOR_CUSTOM_KEY\\0"
- "WRONG_CERTIFICATE_TYPE\\0"
- "WRONG_CIPHER_RETURNED\\0"
- "WRONG_CURVE\\0"
- "WRONG_ENCRYPTION_LEVEL_RECEIVED\\0"
- "WRONG_MESSAGE_TYPE\\0"
- "WRONG_SIGNATURE_TYPE\\0"
- "WRONG_SSL_VERSION\\0"
- "WRONG_VERSION_NUMBER\\0"
- "WRONG_VERSION_ON_EARLY_DATA\\0"
- "X509_LIB\\0"
- "X509_VERIFICATION_SETUP_PROBLEMS\\0"
- "AKID_MISMATCH\\0"
- "BAD_X509_FILETYPE\\0"
- "BASE64_DECODE_ERROR\\0"
- "CANT_CHECK_DH_KEY\\0"
- "CERT_ALREADY_IN_HASH_TABLE\\0"
- "CRL_ALREADY_DELTA\\0"
- "CRL_VERIFY_FAILURE\\0"
- "IDP_MISMATCH\\0"
- "INVALID_DIRECTORY\\0"
- "INVALID_FIELD_NAME\\0"
- "INVALID_PARAMETER\\0"
- "INVALID_PSS_PARAMETERS\\0"
- "INVALID_TRUST\\0"
- "ISSUER_MISMATCH\\0"
- "KEY_TYPE_MISMATCH\\0"
- "KEY_VALUES_MISMATCH\\0"
- "LOADING_CERT_DIR\\0"
- "LOADING_DEFAULTS\\0"
- "NAME_TOO_LONG\\0"
- "NEWER_CRL_NOT_NEWER\\0"
- "NO_CERT_SET_FOR_US_TO_VERIFY\\0"
- "NO_CRL_NUMBER\\0"
- "PUBLIC_KEY_DECODE_ERROR\\0"
- "PUBLIC_KEY_ENCODE_ERROR\\0"
- "SHOULD_RETRY\\0"
- "SIGNATURE_ALGORITHM_MISMATCH\\0"
- "UNKNOWN_KEY_TYPE\\0"
- "UNKNOWN_PURPOSE_ID\\0"
- "UNKNOWN_TRUST_ID\\0"
- "WRONG_LOOKUP_TYPE\\0"
- "BAD_IP_ADDRESS\\0"
- "BAD_OBJECT\\0"
- "BN_DEC2BN_ERROR\\0"
- "BN_TO_ASN1_INTEGER_ERROR\\0"
- "CANNOT_FIND_FREE_FUNCTION\\0"
- "DIRNAME_ERROR\\0"
- "DISTPOINT_ALREADY_SET\\0"
- "DUPLICATE_ZONE_ID\\0"
- "ERROR_CONVERTING_ZONE\\0"
- "ERROR_CREATING_EXTENSION\\0"
- "ERROR_IN_EXTENSION\\0"
- "EXPECTED_A_SECTION_NAME\\0"
- "EXTENSION_EXISTS\\0"
- "EXTENSION_NAME_ERROR\\0"
- "EXTENSION_NOT_FOUND\\0"
- "EXTENSION_SETTING_NOT_SUPPORTED\\0"
- "EXTENSION_VALUE_ERROR\\0"
- "ILLEGAL_EMPTY_EXTENSION\\0"
- "ILLEGAL_HEX_DIGIT\\0"
- "INCORRECT_POLICY_SYNTAX_TAG\\0"
- "INVALID_BOOLEAN_STRING\\0"
- "INVALID_EXTENSION_STRING\\0"
- "INVALID_MULTIPLE_RDNS\\0"
- "INVALID_NAME\\0"
- "INVALID_NULL_ARGUMENT\\0"
- "INVALID_NULL_NAME\\0"
- "INVALID_NULL_VALUE\\0"
- "INVALID_NUMBERS\\0"
- "INVALID_OBJECT_IDENTIFIER\\0"
- "INVALID_OPTION\\0"
- "INVALID_POLICY_IDENTIFIER\\0"
- "INVALID_PROXY_POLICY_SETTING\\0"
- "INVALID_PURPOSE\\0"
- "INVALID_SECTION\\0"
- "INVALID_SYNTAX\\0"
- "ISSUER_DECODE_ERROR\\0"
- "NEED_ORGANIZATION_AND_NUMBERS\\0"
- "NO_CONFIG_DATABASE\\0"
- "NO_ISSUER_CERTIFICATE\\0"
- "NO_ISSUER_DETAILS\\0"
- "NO_POLICY_IDENTIFIER\\0"
- "NO_PROXY_CERT_POLICY_LANGUAGE_DEFINED\\0"
- "NO_PUBLIC_KEY\\0"
- "NO_SUBJECT_DETAILS\\0"
- "ODD_NUMBER_OF_DIGITS\\0"
- "OPERATION_NOT_DEFINED\\0"
- "OTHERNAME_ERROR\\0"
- "POLICY_LANGUAGE_ALREADY_DEFINED\\0"
- "POLICY_PATH_LENGTH\\0"
- "POLICY_PATH_LENGTH_ALREADY_DEFINED\\0"
- "POLICY_WHEN_PROXY_LANGUAGE_REQUIRES_NO_POLICY\\0"
- "SECTION_NOT_FOUND\\0"
- "UNABLE_TO_GET_ISSUER_DETAILS\\0"
- "UNABLE_TO_GET_ISSUER_KEYID\\0"
- "UNKNOWN_BIT_STRING_ARGUMENT\\0"
- "UNKNOWN_EXTENSION\\0"
- "UNKNOWN_EXTENSION_NAME\\0"
- "UNKNOWN_OPTION\\0"
- "UNSUPPORTED_OPTION\\0"
- "USER_TOO_LONG\\0"
- "";
+ % for err_data in open("src/boringssl/err_data.c", "r").readlines():
+ ${err_data.replace('\\0', '\\\\0')}\
+ % endfor
EOF
# Remove lines of the format "#define SOME_MACRO SOME_MACRO" because they mess up the symbol prefix
diff --git a/templates/test/core/surface/public_headers_must_be_c89.c.template b/templates/test/core/surface/public_headers_must_be_c89.c.template
index dde5c81..2932d7a 100644
--- a/templates/test/core/surface/public_headers_must_be_c89.c.template
+++ b/templates/test/core/surface/public_headers_must_be_c89.c.template
@@ -50,6 +50,11 @@
#include <stdio.h>
int main(int argc, char **argv) {
+ /* Use the parameters to avoid unused-parameter warning.
+ (C89 parameters must be named.) */
+ (void)argc;
+ (void)argv;
+
% for fn in fns:
printf("%lx", (unsigned long) ${fn});
% endfor
diff --git a/templates/tools/dockerfile/test/bazel/Dockerfile.template b/templates/tools/dockerfile/test/bazel/Dockerfile.template
index 864c989..b440cb4 100644
--- a/templates/tools/dockerfile/test/bazel/Dockerfile.template
+++ b/templates/tools/dockerfile/test/bazel/Dockerfile.template
@@ -29,6 +29,7 @@
autoconf ${'\\'}
build-essential ${'\\'}
curl ${'\\'}
+ wget ${'\\'}
libtool ${'\\'}
make ${'\\'}
openjdk-8-jdk ${'\\'}
@@ -36,6 +37,8 @@
<%include file="../../python_deps.include"/>
+ <%include file="../../compile_python_36.include"/>
+
<%include file="../../bazel.include"/>
RUN mkdir -p /var/local/jenkins
diff --git a/test/core/avl/avl_test.cc b/test/core/avl/avl_test.cc
index 769e675..9af8578 100644
--- a/test/core/avl/avl_test.cc
+++ b/test/core/avl/avl_test.cc
@@ -33,14 +33,14 @@
return b;
}
-static long int_compare(void* int1, void* int2, void* unused) {
+static long int_compare(void* int1, void* int2, void* /*unused*/) {
return (*static_cast<int*>(int1)) - (*static_cast<int*>(int2));
}
-static void* int_copy(void* p, void* unused) {
+static void* int_copy(void* p, void* /*unused*/) {
return box(*static_cast<int*>(p));
}
-static void destroy(void* p, void* unused) { gpr_free(p); }
+static void destroy(void* p, void* /*unused*/) { gpr_free(p); }
static const grpc_avl_vtable int_int_vtable = {destroy, int_copy, int_compare,
destroy, int_copy};
diff --git a/test/core/bad_ssl/server_common.cc b/test/core/bad_ssl/server_common.cc
index 809539a..ebbe2b6 100644
--- a/test/core/bad_ssl/server_common.cc
+++ b/test/core/bad_ssl/server_common.cc
@@ -30,7 +30,7 @@
static int got_sigint = 0;
-static void sigint_handler(int x) { got_sigint = 1; }
+static void sigint_handler(int /*x*/) { got_sigint = 1; }
const char* bad_ssl_addr(int argc, char** argv) {
gpr_cmdline* cl;
diff --git a/test/core/debug/stats_test.cc b/test/core/debug/stats_test.cc
index 8e13898..f28133d 100644
--- a/test/core/debug/stats_test.cc
+++ b/test/core/debug/stats_test.cc
@@ -151,5 +151,9 @@
int ret = RUN_ALL_TESTS();
grpc_shutdown();
return ret;
+#else
+ // Avoid unused parameter warning for conditional parameters.
+ (void)argc;
+ (void)argv;
#endif
}
diff --git a/test/core/end2end/fixtures/http_proxy_fixture.cc b/test/core/end2end/fixtures/http_proxy_fixture.cc
index 8f8ddcc..90e16dc 100644
--- a/test/core/end2end/fixtures/http_proxy_fixture.cc
+++ b/test/core/end2end/fixtures/http_proxy_fixture.cc
@@ -119,12 +119,14 @@
grpc_http_request http_request;
} proxy_connection;
-static void proxy_connection_ref(proxy_connection* conn, const char* reason) {
+static void proxy_connection_ref(proxy_connection* conn,
+ const char* /*reason*/) {
gpr_ref(&conn->refcount);
}
// Helper function to destroy the proxy connection.
-static void proxy_connection_unref(proxy_connection* conn, const char* reason) {
+static void proxy_connection_unref(proxy_connection* conn,
+ const char* /*reason*/) {
if (gpr_unref(&conn->refcount)) {
gpr_log(GPR_DEBUG, "endpoints: %p %p", conn->client_endpoint,
conn->server_endpoint);
@@ -554,7 +556,7 @@
}
static void on_accept(void* arg, grpc_endpoint* endpoint,
- grpc_pollset* accepting_pollset,
+ grpc_pollset* /*accepting_pollset*/,
grpc_tcp_server_acceptor* acceptor) {
gpr_free(acceptor);
grpc_end2end_http_proxy* proxy = static_cast<grpc_end2end_http_proxy*>(arg);
@@ -639,7 +641,7 @@
return proxy;
}
-static void destroy_pollset(void* arg, grpc_error* error) {
+static void destroy_pollset(void* arg, grpc_error* /*error*/) {
grpc_pollset* pollset = static_cast<grpc_pollset*>(arg);
grpc_pollset_destroy(pollset);
gpr_free(pollset);
diff --git a/test/core/end2end/fixtures/local_util.cc b/test/core/end2end/fixtures/local_util.cc
index 767f3a2..c1fd88b 100644
--- a/test/core/end2end/fixtures/local_util.cc
+++ b/test/core/end2end/fixtures/local_util.cc
@@ -73,8 +73,9 @@
return false;
}
-static void process_auth_failure(void* state, grpc_auth_context* ctx,
- const grpc_metadata* md, size_t md_count,
+static void process_auth_failure(void* state, grpc_auth_context* /*ctx*/,
+ const grpc_metadata* /*md*/,
+ size_t /*md_count*/,
grpc_process_auth_metadata_done_cb cb,
void* user_data) {
GPR_ASSERT(state == nullptr);
diff --git a/test/core/end2end/fixtures/proxy.cc b/test/core/end2end/fixtures/proxy.cc
index 4ae7450..3351eab 100644
--- a/test/core/end2end/fixtures/proxy.cc
+++ b/test/core/end2end/fixtures/proxy.cc
@@ -120,7 +120,7 @@
return cl;
}
-static void shutdown_complete(void* arg, int success) {
+static void shutdown_complete(void* arg, int /*success*/) {
grpc_end2end_proxy* proxy = static_cast<grpc_end2end_proxy*>(arg);
proxy->shutdown = 1;
grpc_completion_queue_shutdown(proxy->cq);
@@ -137,7 +137,7 @@
grpc_core::Delete(proxy);
}
-static void unrefpc(proxy_call* pc, const char* reason) {
+static void unrefpc(proxy_call* pc, const char* /*reason*/) {
if (gpr_unref(&pc->refs)) {
grpc_call_unref(pc->c2p);
grpc_call_unref(pc->p2s);
@@ -149,14 +149,16 @@
}
}
-static void refpc(proxy_call* pc, const char* reason) { gpr_ref(&pc->refs); }
+static void refpc(proxy_call* pc, const char* /*reason*/) {
+ gpr_ref(&pc->refs);
+}
-static void on_c2p_sent_initial_metadata(void* arg, int success) {
+static void on_c2p_sent_initial_metadata(void* arg, int /*success*/) {
proxy_call* pc = static_cast<proxy_call*>(arg);
unrefpc(pc, "on_c2p_sent_initial_metadata");
}
-static void on_p2s_recv_initial_metadata(void* arg, int success) {
+static void on_p2s_recv_initial_metadata(void* arg, int /*success*/) {
proxy_call* pc = static_cast<proxy_call*>(arg);
grpc_op op;
grpc_call_error err;
@@ -178,7 +180,7 @@
unrefpc(pc, "on_p2s_recv_initial_metadata");
}
-static void on_p2s_sent_initial_metadata(void* arg, int success) {
+static void on_p2s_sent_initial_metadata(void* arg, int /*success*/) {
proxy_call* pc = static_cast<proxy_call*>(arg);
unrefpc(pc, "on_p2s_sent_initial_metadata");
}
@@ -205,7 +207,7 @@
unrefpc(pc, "on_p2s_sent_message");
}
-static void on_p2s_sent_close(void* arg, int success) {
+static void on_p2s_sent_close(void* arg, int /*success*/) {
proxy_call* pc = static_cast<proxy_call*>(arg);
unrefpc(pc, "on_p2s_sent_close");
}
@@ -285,7 +287,7 @@
unrefpc(pc, "on_p2s_recv_msg");
}
-static void on_c2p_sent_status(void* arg, int success) {
+static void on_c2p_sent_status(void* arg, int /*success*/) {
proxy_call* pc = static_cast<proxy_call*>(arg);
unrefpc(pc, "on_c2p_sent_status");
}
@@ -315,7 +317,7 @@
unrefpc(pc, "on_p2s_status");
}
-static void on_c2p_closed(void* arg, int success) {
+static void on_c2p_closed(void* arg, int /*success*/) {
proxy_call* pc = static_cast<proxy_call*>(arg);
unrefpc(pc, "on_c2p_closed");
}
diff --git a/test/core/end2end/tests/cancel_with_status.cc b/test/core/end2end/tests/cancel_with_status.cc
index 2fc9d2f..2d6ad77 100644
--- a/test/core/end2end/tests/cancel_with_status.cc
+++ b/test/core/end2end/tests/cancel_with_status.cc
@@ -89,7 +89,7 @@
grpc_completion_queue_destroy(f->shutdown_cq);
}
-static void simple_request_body(grpc_end2end_test_config config,
+static void simple_request_body(grpc_end2end_test_config /*config*/,
grpc_end2end_test_fixture f, size_t num_ops) {
grpc_call* c;
cq_verifier* cqv = cq_verifier_create(f.cq);
diff --git a/test/core/end2end/tests/disappearing_server.cc b/test/core/end2end/tests/disappearing_server.cc
index fdd780f..0858ce3 100644
--- a/test/core/end2end/tests/disappearing_server.cc
+++ b/test/core/end2end/tests/disappearing_server.cc
@@ -68,7 +68,7 @@
grpc_completion_queue_destroy(f->shutdown_cq);
}
-static void do_request_and_shutdown_server(grpc_end2end_test_config config,
+static void do_request_and_shutdown_server(grpc_end2end_test_config /*config*/,
grpc_end2end_test_fixture* f,
cq_verifier* cqv) {
grpc_call* c;
diff --git a/test/core/end2end/tests/empty_batch.cc b/test/core/end2end/tests/empty_batch.cc
index 317bb7a..1144ebf 100644
--- a/test/core/end2end/tests/empty_batch.cc
+++ b/test/core/end2end/tests/empty_batch.cc
@@ -85,7 +85,7 @@
grpc_completion_queue_destroy(f->shutdown_cq);
}
-static void empty_batch_body(grpc_end2end_test_config config,
+static void empty_batch_body(grpc_end2end_test_config /*config*/,
grpc_end2end_test_fixture f) {
grpc_call* c;
cq_verifier* cqv = cq_verifier_create(f.cq);
diff --git a/test/core/end2end/tests/high_initial_seqno.cc b/test/core/end2end/tests/high_initial_seqno.cc
index 18e6ee9..ca6e883 100644
--- a/test/core/end2end/tests/high_initial_seqno.cc
+++ b/test/core/end2end/tests/high_initial_seqno.cc
@@ -87,7 +87,7 @@
grpc_completion_queue_destroy(f->shutdown_cq);
}
-static void simple_request_body(grpc_end2end_test_config config,
+static void simple_request_body(grpc_end2end_test_config /*config*/,
grpc_end2end_test_fixture f) {
grpc_call* c;
grpc_call* s;
diff --git a/test/core/end2end/tests/hpack_size.cc b/test/core/end2end/tests/hpack_size.cc
index 7c51294..8f36868 100644
--- a/test/core/end2end/tests/hpack_size.cc
+++ b/test/core/end2end/tests/hpack_size.cc
@@ -228,7 +228,7 @@
grpc_completion_queue_destroy(f->shutdown_cq);
}
-static void simple_request_body(grpc_end2end_test_config config,
+static void simple_request_body(grpc_end2end_test_config /*config*/,
grpc_end2end_test_fixture f, size_t index) {
grpc_call* c;
grpc_call* s;
diff --git a/test/core/end2end/tests/idempotent_request.cc b/test/core/end2end/tests/idempotent_request.cc
index 80908d5..5fc087c 100644
--- a/test/core/end2end/tests/idempotent_request.cc
+++ b/test/core/end2end/tests/idempotent_request.cc
@@ -86,7 +86,7 @@
grpc_completion_queue_destroy(f->shutdown_cq);
}
-static void simple_request_body(grpc_end2end_test_config config,
+static void simple_request_body(grpc_end2end_test_config /*config*/,
grpc_end2end_test_fixture f) {
grpc_call* c;
grpc_call* s;
diff --git a/test/core/surface/public_headers_must_be_c89.c b/test/core/surface/public_headers_must_be_c89.c
index f1f3c7a..c7656d0 100644
--- a/test/core/surface/public_headers_must_be_c89.c
+++ b/test/core/surface/public_headers_must_be_c89.c
@@ -61,6 +61,11 @@
#include <stdio.h>
int main(int argc, char **argv) {
+ /* Use the parameters to avoid unused-parameter warning.
+ (C89 parameters must be named.) */
+ (void)argc;
+ (void)argv;
+
printf("%lx", (unsigned long) grpc_compression_algorithm_is_message);
printf("%lx", (unsigned long) grpc_compression_algorithm_is_stream);
printf("%lx", (unsigned long) grpc_compression_algorithm_parse);
diff --git a/test/core/tsi/alts/crypt/aes_gcm_test.cc b/test/core/tsi/alts/crypt/aes_gcm_test.cc
index 576dd8f..9ba6861 100644
--- a/test/core/tsi/alts/crypt/aes_gcm_test.cc
+++ b/test/core/tsi/alts/crypt/aes_gcm_test.cc
@@ -2093,7 +2093,7 @@
gsec_aead_free_test_vector(test_vector_20);
}
-int main(int argc, char** argv) {
+int main(int /*argc*/, char** /*argv*/) {
grpc_init();
gsec_test_do_generic_crypter_tests();
gsec_test_do_vector_tests_nist();
diff --git a/test/core/tsi/alts/frame_protector/alts_counter_test.cc b/test/core/tsi/alts/frame_protector/alts_counter_test.cc
index 49ff821..9c5b790 100644
--- a/test/core/tsi/alts/frame_protector/alts_counter_test.cc
+++ b/test/core/tsi/alts/frame_protector/alts_counter_test.cc
@@ -27,8 +27,8 @@
const size_t kGcmCounterSize = 12;
const size_t kGcmOverflowSize = 5;
-static bool do_bytes_represent_client(alts_counter* ctr, unsigned char* counter,
- size_t size) {
+static bool do_bytes_represent_client(alts_counter* ctr,
+ unsigned char* /*counter*/, size_t size) {
return (ctr->counter[size - 1] & 0x80) == 0x80;
}
@@ -165,7 +165,7 @@
alts_counter_destroy(ctr);
}
-int main(int argc, char** argv) {
+int main(int /*argc*/, char** /*argv*/) {
alts_counter_test_input_sanity_check(kGcmCounterSize, kGcmOverflowSize);
alts_counter_test_overflow_full_range(true, kSmallCounterSize,
kSmallOverflowSize);
diff --git a/test/core/tsi/alts/frame_protector/alts_crypter_test.cc b/test/core/tsi/alts/frame_protector/alts_crypter_test.cc
index 0ad616b..02b7ebd 100644
--- a/test/core/tsi/alts/frame_protector/alts_crypter_test.cc
+++ b/test/core/tsi/alts/frame_protector/alts_crypter_test.cc
@@ -128,10 +128,9 @@
gpr_free(duplicate_buffer2);
}
-static void alts_crypter_test_corrupted_unseal(alts_crypter* server_seal,
- alts_crypter* server_unseal,
- alts_crypter* client_seal,
- alts_crypter* client_unseal) {
+static void alts_crypter_test_corrupted_unseal(
+ alts_crypter* server_seal, alts_crypter* server_unseal,
+ alts_crypter* client_seal, alts_crypter* /*client_unseal*/) {
size_t data_size = gsec_test_bias_random_uint32(1024) + 1;
size_t num_overhead_bytes = alts_crypter_num_overhead_bytes(server_seal);
size_t protected_data_size = data_size + num_overhead_bytes;
@@ -487,7 +486,7 @@
client_unseal);
}
-int main(int argc, char** argv) {
+int main(int /*argc*/, char** /*argv*/) {
alts_crypter_do_generic_tests();
return 0;
}
diff --git a/test/core/tsi/alts/frame_protector/frame_handler_test.cc b/test/core/tsi/alts/frame_protector/frame_handler_test.cc
index 6434ea1..6780eb7 100644
--- a/test/core/tsi/alts/frame_protector/frame_handler_test.cc
+++ b/test/core/tsi/alts/frame_protector/frame_handler_test.cc
@@ -228,7 +228,7 @@
destroy_frame_handler(handler);
}
-int main(int argc, char** argv) {
+int main(int /*argc*/, char** /*argv*/) {
frame_handler_test_frame_deframe();
frame_handler_test_small_buffer();
frame_handler_test_null_input_stream();
diff --git a/test/core/tsi/alts/handshaker/transport_security_common_api_test.cc b/test/core/tsi/alts/handshaker/transport_security_common_api_test.cc
index a2c3d48..bc147d2 100644
--- a/test/core/tsi/alts/handshaker/transport_security_common_api_test.cc
+++ b/test/core/tsi/alts/handshaker/transport_security_common_api_test.cc
@@ -155,7 +155,7 @@
&highest_common_version) == 0);
}
-int main(int argc, char** argv) {
+int main(int /*argc*/, char** /*argv*/) {
/* Run tests. */
test_success();
test_failure();
diff --git a/test/core/tsi/alts/zero_copy_frame_protector/alts_iovec_record_protocol_test.cc b/test/core/tsi/alts/zero_copy_frame_protector/alts_iovec_record_protocol_test.cc
index db1934b..8b0e39c 100644
--- a/test/core/tsi/alts/zero_copy_frame_protector/alts_iovec_record_protocol_test.cc
+++ b/test/core/tsi/alts/zero_copy_frame_protector/alts_iovec_record_protocol_test.cc
@@ -917,7 +917,7 @@
alts_iovec_record_protocol_test_fixture_destroy(fixture_2);
}
-int main(int argc, char** argv) {
+int main(int /*argc*/, char** /*argv*/) {
alts_iovec_record_protocol_random_seal_unseal_tests();
alts_iovec_record_protocol_empty_seal_unseal_tests();
alts_iovec_record_protocol_unsync_seal_unseal_tests();
diff --git a/test/core/util/mock_endpoint.cc b/test/core/util/mock_endpoint.cc
index 2f78a7f..01d90b4 100644
--- a/test/core/util/mock_endpoint.cc
+++ b/test/core/util/mock_endpoint.cc
@@ -41,7 +41,7 @@
} mock_endpoint;
static void me_read(grpc_endpoint* ep, grpc_slice_buffer* slices,
- grpc_closure* cb, bool urgent) {
+ grpc_closure* cb, bool /*urgent*/) {
mock_endpoint* m = reinterpret_cast<mock_endpoint*>(ep);
gpr_mu_lock(&m->mu);
if (m->read_buffer.count > 0) {
@@ -55,7 +55,7 @@
}
static void me_write(grpc_endpoint* ep, grpc_slice_buffer* slices,
- grpc_closure* cb, void* arg) {
+ grpc_closure* cb, void* /*arg*/) {
mock_endpoint* m = reinterpret_cast<mock_endpoint*>(ep);
for (size_t i = 0; i < slices->count; i++) {
m->on_write(slices->slices[i]);
@@ -63,13 +63,14 @@
GRPC_CLOSURE_SCHED(cb, GRPC_ERROR_NONE);
}
-static void me_add_to_pollset(grpc_endpoint* ep, grpc_pollset* pollset) {}
+static void me_add_to_pollset(grpc_endpoint* /*ep*/,
+ grpc_pollset* /*pollset*/) {}
-static void me_add_to_pollset_set(grpc_endpoint* ep,
- grpc_pollset_set* pollset) {}
+static void me_add_to_pollset_set(grpc_endpoint* /*ep*/,
+ grpc_pollset_set* /*pollset*/) {}
-static void me_delete_from_pollset_set(grpc_endpoint* ep,
- grpc_pollset_set* pollset) {}
+static void me_delete_from_pollset_set(grpc_endpoint* /*ep*/,
+ grpc_pollset_set* /*pollset*/) {}
static void me_shutdown(grpc_endpoint* ep, grpc_error* why) {
mock_endpoint* m = reinterpret_cast<mock_endpoint*>(ep);
@@ -93,7 +94,7 @@
gpr_free(m);
}
-static char* me_get_peer(grpc_endpoint* ep) {
+static char* me_get_peer(grpc_endpoint* /*ep*/) {
return gpr_strdup("fake:mock_endpoint");
}
@@ -102,9 +103,9 @@
return m->resource_user;
}
-static int me_get_fd(grpc_endpoint* ep) { return -1; }
+static int me_get_fd(grpc_endpoint* /*ep*/) { return -1; }
-static bool me_can_track_err(grpc_endpoint* ep) { return false; }
+static bool me_can_track_err(grpc_endpoint* /*ep*/) { return false; }
static const grpc_endpoint_vtable vtable = {me_read,
me_write,
diff --git a/test/core/util/passthru_endpoint.cc b/test/core/util/passthru_endpoint.cc
index 2d26902..021a944 100644
--- a/test/core/util/passthru_endpoint.cc
+++ b/test/core/util/passthru_endpoint.cc
@@ -54,7 +54,7 @@
};
static void me_read(grpc_endpoint* ep, grpc_slice_buffer* slices,
- grpc_closure* cb, bool urgent) {
+ grpc_closure* cb, bool /*urgent*/) {
half* m = reinterpret_cast<half*>(ep);
gpr_mu_lock(&m->parent->mu);
if (m->parent->shutdown) {
@@ -76,7 +76,7 @@
}
static void me_write(grpc_endpoint* ep, grpc_slice_buffer* slices,
- grpc_closure* cb, void* arg) {
+ grpc_closure* cb, void* /*arg*/) {
half* m = other_half(reinterpret_cast<half*>(ep));
gpr_mu_lock(&m->parent->mu);
grpc_error* error = GRPC_ERROR_NONE;
@@ -99,13 +99,14 @@
GRPC_CLOSURE_SCHED(cb, error);
}
-static void me_add_to_pollset(grpc_endpoint* ep, grpc_pollset* pollset) {}
+static void me_add_to_pollset(grpc_endpoint* /*ep*/,
+ grpc_pollset* /*pollset*/) {}
-static void me_add_to_pollset_set(grpc_endpoint* ep,
- grpc_pollset_set* pollset) {}
+static void me_add_to_pollset_set(grpc_endpoint* /*ep*/,
+ grpc_pollset_set* /*pollset*/) {}
-static void me_delete_from_pollset_set(grpc_endpoint* ep,
- grpc_pollset_set* pollset) {}
+static void me_delete_from_pollset_set(grpc_endpoint* /*ep*/,
+ grpc_pollset_set* /*pollset*/) {}
static void me_shutdown(grpc_endpoint* ep, grpc_error* why) {
half* m = reinterpret_cast<half*>(ep);
@@ -153,9 +154,9 @@
: gpr_strdup("fake:mock_server_endpoint");
}
-static int me_get_fd(grpc_endpoint* ep) { return -1; }
+static int me_get_fd(grpc_endpoint* /*ep*/) { return -1; }
-static bool me_can_track_err(grpc_endpoint* ep) { return false; }
+static bool me_can_track_err(grpc_endpoint* /*ep*/) { return false; }
static grpc_resource_user* me_get_resource_user(grpc_endpoint* ep) {
half* m = reinterpret_cast<half*>(ep);
diff --git a/test/core/util/port_server_client.cc b/test/core/util/port_server_client.cc
index 8c48a54..e55e927 100644
--- a/test/core/util/port_server_client.cc
+++ b/test/core/util/port_server_client.cc
@@ -40,14 +40,14 @@
int done = 0;
} freereq;
-static void destroy_pops_and_shutdown(void* p, grpc_error* error) {
+static void destroy_pops_and_shutdown(void* p, grpc_error* /*error*/) {
grpc_pollset* pollset =
grpc_polling_entity_pollset(static_cast<grpc_polling_entity*>(p));
grpc_pollset_destroy(pollset);
gpr_free(pollset);
}
-static void freed_port_from_server(void* arg, grpc_error* error) {
+static void freed_port_from_server(void* arg, grpc_error* /*error*/) {
freereq* pr = static_cast<freereq*>(arg);
gpr_mu_lock(pr->mu);
pr->done = 1;
diff --git a/test/core/util/test_config.cc b/test/core/util/test_config.cc
index b21c02d..a450361 100644
--- a/test/core/util/test_config.cc
+++ b/test/core/util/test_config.cc
@@ -231,7 +231,7 @@
output_string(buf);
}
-static void crash_handler(int signum, siginfo_t* info, void* data) {
+static void crash_handler(int signum, siginfo_t* /*info*/, void* /*data*/) {
void* addrlist[MAX_FRAMES + 1];
int addrlen;
@@ -379,7 +379,7 @@
GPR_TIMESPAN));
}
-void grpc_test_init(int argc, char** argv) {
+void grpc_test_init(int /*argc*/, char** /*argv*/) {
install_crash_handler();
gpr_log(GPR_DEBUG,
"test slowdown factor: sanitizer=%" PRId64 ", fixture=%" PRId64
diff --git a/test/core/util/test_lb_policies.cc b/test/core/util/test_lb_policies.cc
index 684ee65..d70bf42 100644
--- a/test/core/util/test_lb_policies.cc
+++ b/test/core/util/test_lb_policies.cc
@@ -185,7 +185,7 @@
}
private:
- void RecordRecvTrailingMetadata(grpc_error* error,
+ void RecordRecvTrailingMetadata(grpc_error* /*error*/,
MetadataInterface* recv_trailing_metadata,
CallState* call_state) {
GPR_ASSERT(recv_trailing_metadata != nullptr);
@@ -226,7 +226,7 @@
}
RefCountedPtr<LoadBalancingPolicy::Config> ParseLoadBalancingConfig(
- const grpc_json* json, grpc_error** error) const override {
+ const grpc_json* /*json*/, grpc_error** /*error*/) const override {
return nullptr;
}
diff --git a/test/core/util/trickle_endpoint.cc b/test/core/util/trickle_endpoint.cc
index bdac133..ccafa3e 100644
--- a/test/core/util/trickle_endpoint.cc
+++ b/test/core/util/trickle_endpoint.cc
@@ -62,7 +62,7 @@
}
static void te_write(grpc_endpoint* ep, grpc_slice_buffer* slices,
- grpc_closure* cb, void* arg) {
+ grpc_closure* cb, void* /*arg*/) {
trickle_endpoint* te = reinterpret_cast<trickle_endpoint*>(ep);
gpr_mu_lock(&te->mu);
GPR_ASSERT(te->write_cb == nullptr);
@@ -131,9 +131,9 @@
return grpc_endpoint_get_fd(te->wrapped);
}
-static bool te_can_track_err(grpc_endpoint* ep) { return false; }
+static bool te_can_track_err(grpc_endpoint* /*ep*/) { return false; }
-static void te_finish_write(void* arg, grpc_error* error) {
+static void te_finish_write(void* arg, grpc_error* /*error*/) {
trickle_endpoint* te = static_cast<trickle_endpoint*>(arg);
gpr_mu_lock(&te->mu);
te->writing = false;
diff --git a/test/cpp/end2end/test_health_check_service_impl.cc b/test/cpp/end2end/test_health_check_service_impl.cc
index 5898527a..6a31e0e 100644
--- a/test/cpp/end2end/test_health_check_service_impl.cc
+++ b/test/cpp/end2end/test_health_check_service_impl.cc
@@ -26,7 +26,7 @@
namespace grpc {
namespace testing {
-Status HealthCheckServiceImpl::Check(ServerContext* context,
+Status HealthCheckServiceImpl::Check(ServerContext* /*context*/,
const HealthCheckRequest* request,
HealthCheckResponse* response) {
std::lock_guard<std::mutex> lock(mu_);
diff --git a/test/cpp/end2end/test_service_impl.cc b/test/cpp/end2end/test_service_impl.cc
index 4078cdf..20e4d2d 100644
--- a/test/cpp/end2end/test_service_impl.cc
+++ b/test/cpp/end2end/test_service_impl.cc
@@ -246,9 +246,9 @@
return Status::OK;
}
-Status TestServiceImpl::CheckClientInitialMetadata(ServerContext* context,
- const SimpleRequest* request,
- SimpleResponse* response) {
+Status TestServiceImpl::CheckClientInitialMetadata(
+ ServerContext* context, const SimpleRequest* /*request*/,
+ SimpleResponse* /*response*/) {
EXPECT_EQ(MetadataMatchCount(context->client_metadata(),
kCheckClientInitialMetadataKey,
kCheckClientInitialMetadataVal),
@@ -296,8 +296,8 @@
}
void CallbackTestServiceImpl::CheckClientInitialMetadata(
- ServerContext* context, const SimpleRequest* request,
- SimpleResponse* response,
+ ServerContext* context, const SimpleRequest* /*request*/,
+ SimpleResponse* /*response*/,
experimental::ServerCallbackRpcController* controller) {
EXPECT_EQ(MetadataMatchCount(context->client_metadata(),
kCheckClientInitialMetadataKey,
@@ -741,7 +741,7 @@
EXPECT_TRUE(ctx_->IsCancelled());
FinishOnce(Status::CANCELLED);
}
- void OnWriteDone(bool ok) override {
+ void OnWriteDone(bool /*ok*/) override {
if (num_msgs_sent_ < server_responses_to_send_) {
NextWrite();
} else if (server_coalescing_api_ != 0) {
@@ -854,7 +854,7 @@
FinishOnce(Status::OK);
}
}
- void OnWriteDone(bool ok) override {
+ void OnWriteDone(bool /*ok*/) override {
std::lock_guard<std::mutex> l(finish_mu_);
if (!finished_) {
StartRead(&request_);
diff --git a/test/cpp/end2end/xds_end2end_test.cc b/test/cpp/end2end/xds_end2end_test.cc
index 69685c9..e7a512d 100644
--- a/test/cpp/end2end/xds_end2end_test.cc
+++ b/test/cpp/end2end/xds_end2end_test.cc
@@ -320,19 +320,16 @@
struct Locality {
Locality(const grpc::string& sub_zone, std::vector<int> ports,
int lb_weight = kDefaultLocalityWeight,
- int priority = kDefaultLocalityPriority,
- std::vector<envoy::api::v2::HealthStatus> health_statuses = {})
+ int priority = kDefaultLocalityPriority)
: sub_zone(std::move(sub_zone)),
ports(std::move(ports)),
lb_weight(lb_weight),
- priority(priority),
- health_statuses(std::move(health_statuses)) {}
+ priority(priority) {}
const grpc::string sub_zone;
std::vector<int> ports;
int lb_weight;
int priority;
- std::vector<envoy::api::v2::HealthStatus> health_statuses;
};
ResponseArgs() = default;
@@ -413,14 +410,8 @@
endpoints->mutable_locality()->set_region(kDefaultLocalityRegion);
endpoints->mutable_locality()->set_zone(kDefaultLocalityZone);
endpoints->mutable_locality()->set_sub_zone(locality.sub_zone);
- for (size_t i = 0; i < locality.ports.size(); ++i) {
- const int& port = locality.ports[i];
+ for (const int& port : locality.ports) {
auto* lb_endpoints = endpoints->add_lb_endpoints();
- if (locality.health_statuses.size() > i &&
- locality.health_statuses[i] !=
- envoy::api::v2::HealthStatus::UNKNOWN) {
- lb_endpoints->set_health_status(locality.health_statuses[i]);
- }
auto* endpoint = lb_endpoints->mutable_endpoint();
auto* address = endpoint->mutable_address();
auto* socket_address = address->mutable_socket_address();
@@ -575,27 +566,7 @@
bool load_report_ready_ = false;
};
-class TestType {
- public:
- TestType(bool use_xds_resolver, bool enable_load_reporting)
- : use_xds_resolver_(use_xds_resolver),
- enable_load_reporting_(enable_load_reporting) {}
-
- bool use_xds_resolver() const { return use_xds_resolver_; }
- bool enable_load_reporting() const { return enable_load_reporting_; }
-
- grpc::string AsString() const {
- grpc::string retval = (use_xds_resolver_ ? "XdsResolver" : "FakeResolver");
- if (enable_load_reporting_) retval += "WithLoadReporting";
- return retval;
- }
-
- private:
- const bool use_xds_resolver_;
- const bool enable_load_reporting_;
-};
-
-class XdsEnd2endTest : public ::testing::TestWithParam<TestType> {
+class XdsEnd2endTest : public ::testing::TestWithParam<bool> {
protected:
XdsEnd2endTest(size_t num_backends, size_t num_balancers,
int client_load_reporting_interval_seconds)
@@ -674,14 +645,12 @@
// channel never uses a response generator, and we inject the xds
// channel's response generator here.
args.SetPointer(GRPC_ARG_FAKE_RESOLVER_RESPONSE_GENERATOR,
- GetParam().use_xds_resolver()
- ? lb_channel_response_generator_.get()
- : response_generator_.get());
+ GetParam() ? lb_channel_response_generator_.get()
+ : response_generator_.get());
if (!expected_targets.empty()) {
args.SetString(GRPC_ARG_FAKE_SECURITY_EXPECTED_TARGETS, expected_targets);
}
- grpc::string scheme =
- GetParam().use_xds_resolver() ? "xds-experimental" : "fake";
+ grpc::string scheme = GetParam() ? "xds-experimental" : "fake";
std::ostringstream uri;
uri << scheme << ":///" << kApplicationTargetName_;
// TODO(dgq): templatize tests to run everything using both secure and
@@ -771,20 +740,19 @@
}
void SetNextResolution(const std::vector<int>& ports,
+ const char* service_config_json = nullptr,
grpc_core::FakeResolverResponseGenerator*
lb_channel_response_generator = nullptr) {
- if (GetParam().use_xds_resolver()) return; // Not used with xds resolver.
+ if (GetParam()) return; // Not used with xds resolver.
grpc_core::ExecCtx exec_ctx;
grpc_core::Resolver::Result result;
result.addresses = CreateAddressListFromPortList(ports);
- grpc_error* error = GRPC_ERROR_NONE;
- const char* service_config_json =
- GetParam().enable_load_reporting()
- ? kDefaultServiceConfig_
- : kDefaultServiceConfigWithoutLoadReporting_;
- result.service_config =
- grpc_core::ServiceConfig::Create(service_config_json, &error);
- GRPC_ERROR_UNREF(error);
+ if (service_config_json != nullptr) {
+ grpc_error* error = GRPC_ERROR_NONE;
+ result.service_config =
+ grpc_core::ServiceConfig::Create(service_config_json, &error);
+ GRPC_ERROR_UNREF(error);
+ }
grpc_arg arg = grpc_core::FakeResolverResponseGenerator::MakeChannelArg(
lb_channel_response_generator == nullptr
? lb_channel_response_generator_.get()
@@ -1000,21 +968,11 @@
lb_channel_response_generator_;
const grpc::string kRequestMessage_ = "Live long and prosper.";
const grpc::string kApplicationTargetName_ = "application_target_name";
- const char* kDefaultServiceConfig_ =
+ const grpc::string kDefaultServiceConfig_ =
"{\n"
" \"loadBalancingConfig\":[\n"
" { \"does_not_exist\":{} },\n"
- " { \"xds_experimental\":{\n"
- " \"lrsLoadReportingServerName\": \"\"\n"
- " } }\n"
- " ]\n"
- "}";
- const char* kDefaultServiceConfigWithoutLoadReporting_ =
- "{\n"
- " \"loadBalancingConfig\":[\n"
- " { \"does_not_exist\":{} },\n"
- " { \"xds_experimental\":{\n"
- " } }\n"
+ " { \"xds_experimental\":{} }\n"
" ]\n"
"}";
};
@@ -1027,7 +985,7 @@
// Tests that the balancer sends the correct response to the client, and the
// client sends RPCs to the backends using the default child policy.
TEST_P(BasicTest, Vanilla) {
- SetNextResolution({});
+ SetNextResolution({}, kDefaultServiceConfig_.c_str());
SetNextResolutionForLbChannelAllBalancers();
const size_t kNumRpcsPerAddress = 100;
AdsServiceImpl::ResponseArgs args({
@@ -1052,40 +1010,10 @@
EXPECT_EQ("xds_experimental", channel_->GetLoadBalancingPolicyName());
}
-TEST_P(BasicTest, IgnoresUnhealthyEndpoints) {
- SetNextResolution({});
- SetNextResolutionForLbChannelAllBalancers();
- const size_t kNumRpcsPerAddress = 100;
- AdsServiceImpl::ResponseArgs args({
- {"locality0",
- GetBackendPorts(),
- kDefaultLocalityWeight,
- kDefaultLocalityPriority,
- {envoy::api::v2::HealthStatus::DRAINING}},
- });
- ScheduleResponseForBalancer(0, AdsServiceImpl::BuildResponse(args), 0);
- // Make sure that trying to connect works without a call.
- channel_->GetState(true /* try_to_connect */);
- // We need to wait for all backends to come online.
- WaitForAllBackends(/*start_index=*/1);
- // Send kNumRpcsPerAddress RPCs per server.
- CheckRpcSendOk(kNumRpcsPerAddress * (num_backends_ - 1));
- // Each backend should have gotten 100 requests.
- for (size_t i = 1; i < backends_.size(); ++i) {
- EXPECT_EQ(kNumRpcsPerAddress,
- backends_[i]->backend_service()->request_count());
- }
- // The ADS service got a single request, and sent a single response.
- EXPECT_EQ(1U, balancers_[0]->ads_service()->request_count());
- EXPECT_EQ(1U, balancers_[0]->ads_service()->response_count());
- // Check LB policy name for the channel.
- EXPECT_EQ("xds_experimental", channel_->GetLoadBalancingPolicyName());
-}
-
// Tests that subchannel sharing works when the same backend is listed multiple
// times.
TEST_P(BasicTest, SameBackendListedMultipleTimes) {
- SetNextResolution({});
+ SetNextResolution({}, kDefaultServiceConfig_.c_str());
SetNextResolutionForLbChannelAllBalancers();
// Same backend listed twice.
std::vector<int> ports(2, backends_[0]->port());
@@ -1108,7 +1036,7 @@
// Tests that RPCs will be blocked until a non-empty serverlist is received.
TEST_P(BasicTest, InitiallyEmptyServerlist) {
- SetNextResolution({});
+ SetNextResolution({}, kDefaultServiceConfig_.c_str());
SetNextResolutionForLbChannelAllBalancers();
const int kServerlistDelayMs = 500 * grpc_test_slowdown_factor();
const int kCallDeadlineMs = kServerlistDelayMs * 2;
@@ -1144,7 +1072,7 @@
// Tests that RPCs will fail with UNAVAILABLE instead of DEADLINE_EXCEEDED if
// all the servers are unreachable.
TEST_P(BasicTest, AllServersUnreachableFailFast) {
- SetNextResolution({});
+ SetNextResolution({}, kDefaultServiceConfig_.c_str());
SetNextResolutionForLbChannelAllBalancers();
const size_t kNumUnreachableServers = 5;
std::vector<int> ports;
@@ -1166,7 +1094,7 @@
// Tests that RPCs fail when the backends are down, and will succeed again after
// the backends are restarted.
TEST_P(BasicTest, BackendsRestart) {
- SetNextResolution({});
+ SetNextResolution({}, kDefaultServiceConfig_.c_str());
SetNextResolutionForLbChannelAllBalancers();
AdsServiceImpl::ResponseArgs args({
{"locality0", GetBackendPorts()},
@@ -1188,7 +1116,7 @@
TEST_P(SecureNamingTest, TargetNameIsExpected) {
// TODO(juanlishen): Use separate fake creds for the balancer channel.
ResetStub(0, 0, kApplicationTargetName_ + ";lb");
- SetNextResolution({});
+ SetNextResolution({}, kDefaultServiceConfig_.c_str());
SetNextResolutionForLbChannel({balancers_[0]->port()});
const size_t kNumRpcsPerAddress = 100;
AdsServiceImpl::ResponseArgs args({
@@ -1220,7 +1148,7 @@
ASSERT_DEATH_IF_SUPPORTED(
{
ResetStub(0, 0, kApplicationTargetName_ + ";lb");
- SetNextResolution({});
+ SetNextResolution({}, kDefaultServiceConfig_.c_str());
SetNextResolutionForLbChannel({balancers_[0]->port()});
channel_->WaitForConnected(grpc_timeout_seconds_to_deadline(1));
},
@@ -1232,7 +1160,7 @@
// Tests that the localities in a locality map are picked according to their
// weights.
TEST_P(LocalityMapTest, WeightedRoundRobin) {
- SetNextResolution({});
+ SetNextResolution({}, kDefaultServiceConfig_.c_str());
SetNextResolutionForLbChannelAllBalancers();
const size_t kNumRpcs = 5000;
const int kLocalityWeight0 = 2;
@@ -1276,7 +1204,7 @@
// Tests that the locality map can work properly even when it contains a large
// number of localities.
TEST_P(LocalityMapTest, StressTest) {
- SetNextResolution({});
+ SetNextResolution({}, kDefaultServiceConfig_.c_str());
SetNextResolutionForLbChannelAllBalancers();
const size_t kNumLocalities = 100;
// The first ADS response contains kNumLocalities localities, each of which
@@ -1311,7 +1239,7 @@
// Tests that the localities in a locality map are picked correctly after update
// (addition, modification, deletion).
TEST_P(LocalityMapTest, UpdateMap) {
- SetNextResolution({});
+ SetNextResolution({}, kDefaultServiceConfig_.c_str());
SetNextResolutionForLbChannelAllBalancers();
const size_t kNumRpcs = 1000;
// The locality weight for the first 3 localities.
@@ -1408,7 +1336,7 @@
// Localities with the highest priority are used when multiple priority exist.
TEST_P(FailoverTest, ChooseHighestPriority) {
- SetNextResolution({});
+ SetNextResolution({}, kDefaultServiceConfig_.c_str());
SetNextResolutionForLbChannelAllBalancers();
AdsServiceImpl::ResponseArgs args({
{"locality0", GetBackendPorts(0, 1), kDefaultLocalityWeight, 1},
@@ -1429,7 +1357,7 @@
// If the higher priority localities are not reachable, failover to the highest
// priority among the rest.
TEST_P(FailoverTest, Failover) {
- SetNextResolution({});
+ SetNextResolution({}, kDefaultServiceConfig_.c_str());
SetNextResolutionForLbChannelAllBalancers();
AdsServiceImpl::ResponseArgs args({
{"locality0", GetBackendPorts(0, 1), kDefaultLocalityWeight, 1},
@@ -1453,7 +1381,7 @@
// If a locality with higher priority than the current one becomes ready,
// switch to it.
TEST_P(FailoverTest, SwitchBackToHigherPriority) {
- SetNextResolution({});
+ SetNextResolution({}, kDefaultServiceConfig_.c_str());
SetNextResolutionForLbChannelAllBalancers();
const size_t kNumRpcs = 100;
AdsServiceImpl::ResponseArgs args({
@@ -1482,7 +1410,7 @@
// The first update only contains unavailable priorities. The second update
// contains available priorities.
TEST_P(FailoverTest, UpdateInitialUnavailable) {
- SetNextResolution({});
+ SetNextResolution({}, kDefaultServiceConfig_.c_str());
SetNextResolutionForLbChannelAllBalancers();
AdsServiceImpl::ResponseArgs args({
{"locality0", GetBackendPorts(0, 1), kDefaultLocalityWeight, 0},
@@ -1517,7 +1445,7 @@
// Tests that after the localities' priorities are updated, we still choose the
// highest READY priority with the updated localities.
TEST_P(FailoverTest, UpdatePriority) {
- SetNextResolution({});
+ SetNextResolution({}, kDefaultServiceConfig_.c_str());
SetNextResolutionForLbChannelAllBalancers();
const size_t kNumRpcs = 100;
AdsServiceImpl::ResponseArgs args({
@@ -1550,7 +1478,7 @@
// Tests that RPCs are dropped according to the drop config.
TEST_P(DropTest, Vanilla) {
- SetNextResolution({});
+ SetNextResolution({}, kDefaultServiceConfig_.c_str());
SetNextResolutionForLbChannelAllBalancers();
const size_t kNumRpcs = 5000;
const uint32_t kDropPerMillionForLb = 100000;
@@ -1596,7 +1524,7 @@
// Tests that drop config is converted correctly from per hundred.
TEST_P(DropTest, DropPerHundred) {
- SetNextResolution({});
+ SetNextResolution({}, kDefaultServiceConfig_.c_str());
SetNextResolutionForLbChannelAllBalancers();
const size_t kNumRpcs = 5000;
const uint32_t kDropPerHundredForLb = 10;
@@ -1637,7 +1565,7 @@
// Tests that drop config is converted correctly from per ten thousand.
TEST_P(DropTest, DropPerTenThousand) {
- SetNextResolution({});
+ SetNextResolution({}, kDefaultServiceConfig_.c_str());
SetNextResolutionForLbChannelAllBalancers();
const size_t kNumRpcs = 5000;
const uint32_t kDropPerTenThousandForLb = 1000;
@@ -1678,7 +1606,7 @@
// Tests that drop is working correctly after update.
TEST_P(DropTest, Update) {
- SetNextResolution({});
+ SetNextResolution({}, kDefaultServiceConfig_.c_str());
SetNextResolutionForLbChannelAllBalancers();
const size_t kNumRpcs = 1000;
const uint32_t kDropPerMillionForLb = 100000;
@@ -1774,7 +1702,7 @@
// Tests that all the RPCs are dropped if any drop category drops 100%.
TEST_P(DropTest, DropAll) {
- SetNextResolution({});
+ SetNextResolution({}, kDefaultServiceConfig_.c_str());
SetNextResolutionForLbChannelAllBalancers();
const size_t kNumRpcs = 1000;
const uint32_t kDropPerMillionForLb = 100000;
@@ -1807,7 +1735,8 @@
const int kServerlistDelayMs = 500 * grpc_test_slowdown_factor();
const size_t kNumBackendsInResolution = backends_.size() / 2;
ResetStub(kFallbackTimeoutMs);
- SetNextResolution(GetBackendPorts(0, kNumBackendsInResolution));
+ SetNextResolution(GetBackendPorts(0, kNumBackendsInResolution),
+ kDefaultServiceConfig_.c_str());
SetNextResolutionForLbChannelAllBalancers();
// Send non-empty serverlist only after kServerlistDelayMs.
AdsServiceImpl::ResponseArgs args({
@@ -1856,7 +1785,8 @@
const size_t kNumBackendsInResolution = backends_.size() / 3;
const size_t kNumBackendsInResolutionUpdate = backends_.size() / 3;
ResetStub(kFallbackTimeoutMs);
- SetNextResolution(GetBackendPorts(0, kNumBackendsInResolution));
+ SetNextResolution(GetBackendPorts(0, kNumBackendsInResolution),
+ kDefaultServiceConfig_.c_str());
SetNextResolutionForLbChannelAllBalancers();
// Send non-empty serverlist only after kServerlistDelayMs.
AdsServiceImpl::ResponseArgs args({
@@ -1879,9 +1809,10 @@
for (size_t i = kNumBackendsInResolution; i < backends_.size(); ++i) {
EXPECT_EQ(0U, backends_[i]->backend_service()->request_count());
}
- SetNextResolution(GetBackendPorts(
- kNumBackendsInResolution,
- kNumBackendsInResolution + kNumBackendsInResolutionUpdate));
+ SetNextResolution(GetBackendPorts(kNumBackendsInResolution,
+ kNumBackendsInResolution +
+ kNumBackendsInResolutionUpdate),
+ kDefaultServiceConfig_.c_str());
// Wait until the resolution update has been processed and all the new
// fallback backends are reachable.
WaitForAllBackends(kNumBackendsInResolution /* start_index */,
@@ -1931,7 +1862,7 @@
const int kFallbackTimeoutMs = 10000 * grpc_test_slowdown_factor();
ResetStub(kFallbackTimeoutMs);
// Return an unreachable balancer and one fallback backend.
- SetNextResolution({backends_[0]->port()});
+ SetNextResolution({backends_[0]->port()}, kDefaultServiceConfig_.c_str());
SetNextResolutionForLbChannel({grpc_pick_unused_port_or_die()});
// Send RPC with deadline less than the fallback timeout and make sure it
// succeeds.
@@ -1944,7 +1875,7 @@
const int kFallbackTimeoutMs = 10000 * grpc_test_slowdown_factor();
ResetStub(kFallbackTimeoutMs);
// Return one balancer and one fallback backend.
- SetNextResolution({backends_[0]->port()});
+ SetNextResolution({backends_[0]->port()}, kDefaultServiceConfig_.c_str());
SetNextResolutionForLbChannelAllBalancers();
// Balancer drops call without sending a serverlist.
balancers_[0]->ads_service()->NotifyDoneWithAdsCall();
@@ -1959,7 +1890,7 @@
TEST_P(FallbackTest, FallbackIfResponseReceivedButChildNotReady) {
const int kFallbackTimeoutMs = 500 * grpc_test_slowdown_factor();
ResetStub(kFallbackTimeoutMs);
- SetNextResolution({backends_[0]->port()});
+ SetNextResolution({backends_[0]->port()}, kDefaultServiceConfig_.c_str());
SetNextResolutionForLbChannelAllBalancers();
// Send a serverlist that only contains an unreachable backend before fallback
// timeout.
@@ -1976,7 +1907,7 @@
// all the calls.
TEST_P(FallbackTest, FallbackModeIsExitedWhenBalancerSaysToDropAllCalls) {
// Return an unreachable balancer and one fallback backend.
- SetNextResolution({backends_[0]->port()});
+ SetNextResolution({backends_[0]->port()}, kDefaultServiceConfig_.c_str());
SetNextResolutionForLbChannel({grpc_pick_unused_port_or_die()});
// Enter fallback mode because the LB channel fails to connect.
WaitForBackend(0);
@@ -2000,7 +1931,7 @@
// Tests that fallback mode is exited if the child policy becomes ready.
TEST_P(FallbackTest, FallbackModeIsExitedAfterChildRready) {
// Return an unreachable balancer and one fallback backend.
- SetNextResolution({backends_[0]->port()});
+ SetNextResolution({backends_[0]->port()}, kDefaultServiceConfig_.c_str());
SetNextResolutionForLbChannel({grpc_pick_unused_port_or_die()});
// Enter fallback mode because the LB channel fails to connect.
WaitForBackend(0);
@@ -2038,7 +1969,7 @@
// Tests that the old LB call is still used after the balancer address update as
// long as that call is still alive.
TEST_P(BalancerUpdateTest, UpdateBalancersButKeepUsingOriginalBalancer) {
- SetNextResolution({});
+ SetNextResolution({}, kDefaultServiceConfig_.c_str());
SetNextResolutionForLbChannelAllBalancers();
AdsServiceImpl::ResponseArgs args({
{"locality0", {backends_[0]->port()}},
@@ -2091,7 +2022,7 @@
// xds keeps the initial connection (which by definition is also present in the
// update).
TEST_P(BalancerUpdateTest, Repeated) {
- SetNextResolution({});
+ SetNextResolution({}, kDefaultServiceConfig_.c_str());
SetNextResolutionForLbChannelAllBalancers();
AdsServiceImpl::ResponseArgs args({
{"locality0", {backends_[0]->port()}},
@@ -2156,7 +2087,7 @@
// backends according to the last balancer response, until a new balancer is
// reachable.
TEST_P(BalancerUpdateTest, DeadUpdate) {
- SetNextResolution({});
+ SetNextResolution({}, kDefaultServiceConfig_.c_str());
SetNextResolutionForLbChannel({balancers_[0]->port()});
AdsServiceImpl::ResponseArgs args({
{"locality0", {backends_[0]->port()}},
@@ -2235,7 +2166,7 @@
// Tests that the load report received at the balancer is correct.
TEST_P(ClientLoadReportingTest, Vanilla) {
- SetNextResolution({});
+ SetNextResolution({}, kDefaultServiceConfig_.c_str());
SetNextResolutionForLbChannel({balancers_[0]->port()});
const size_t kNumRpcsPerAddress = 100;
// TODO(juanlishen): Partition the backends after multiple localities is
@@ -2276,7 +2207,7 @@
// Tests that if the balancer restarts, the client load report contains the
// stats before and after the restart correctly.
TEST_P(ClientLoadReportingTest, BalancerRestart) {
- SetNextResolution({});
+ SetNextResolution({}, kDefaultServiceConfig_.c_str());
SetNextResolutionForLbChannel({balancers_[0]->port()});
const size_t kNumBackendsFirstPass = backends_.size() / 2;
const size_t kNumBackendsSecondPass =
@@ -2342,7 +2273,7 @@
// Tests that the drop stats are correctly reported by client load reporting.
TEST_P(ClientLoadReportingWithDropTest, Vanilla) {
- SetNextResolution({});
+ SetNextResolution({}, kDefaultServiceConfig_.c_str());
SetNextResolutionForLbChannelAllBalancers();
const size_t kNumRpcs = 3000;
const uint32_t kDropPerMillionForLb = 100000;
@@ -2404,66 +2335,28 @@
EXPECT_EQ(1U, balancers_[0]->ads_service()->response_count());
}
-grpc::string TestTypeName(const ::testing::TestParamInfo<TestType>& info) {
- return info.param.AsString();
-}
+INSTANTIATE_TEST_SUITE_P(UsesXdsResolver, BasicTest, ::testing::Bool());
-// TODO(juanlishen): Load reporting disabled is currently tested only with DNS
-// resolver. Once we implement CDS, test it via the xds resolver too.
+INSTANTIATE_TEST_SUITE_P(UsesXdsResolver, SecureNamingTest, ::testing::Bool());
-INSTANTIATE_TEST_SUITE_P(XdsTest, BasicTest,
- ::testing::Values(TestType(false, true),
- TestType(false, false),
- TestType(true, true)),
- &TestTypeName);
+INSTANTIATE_TEST_SUITE_P(UsesXdsResolver, LocalityMapTest, ::testing::Bool());
-INSTANTIATE_TEST_SUITE_P(XdsTest, SecureNamingTest,
- ::testing::Values(TestType(false, true),
- TestType(false, false),
- TestType(true, true)),
- &TestTypeName);
+INSTANTIATE_TEST_SUITE_P(UsesXdsResolver, FailoverTest, ::testing::Bool());
-INSTANTIATE_TEST_SUITE_P(XdsTest, LocalityMapTest,
- ::testing::Values(TestType(false, true),
- TestType(false, false),
- TestType(true, true)),
- &TestTypeName);
-
-INSTANTIATE_TEST_SUITE_P(XdsTest, FailoverTest,
- ::testing::Values(TestType(false, true),
- TestType(false, false),
- TestType(true, true)),
- &TestTypeName);
-
-INSTANTIATE_TEST_SUITE_P(XdsTest, DropTest,
- ::testing::Values(TestType(false, true),
- TestType(false, false),
- TestType(true, true)),
- &TestTypeName);
+INSTANTIATE_TEST_SUITE_P(UsesXdsResolver, DropTest, ::testing::Bool());
// Fallback does not work with xds resolver.
-INSTANTIATE_TEST_SUITE_P(XdsTest, FallbackTest,
- ::testing::Values(TestType(false, true),
- TestType(false, false)),
- &TestTypeName);
+INSTANTIATE_TEST_SUITE_P(UsesXdsResolver, FallbackTest,
+ ::testing::Values(false));
-INSTANTIATE_TEST_SUITE_P(XdsTest, BalancerUpdateTest,
- ::testing::Values(TestType(false, true),
- TestType(false, false),
- TestType(true, true)),
- &TestTypeName);
+INSTANTIATE_TEST_SUITE_P(UsesXdsResolver, BalancerUpdateTest,
+ ::testing::Bool());
-// Load reporting tests are not run with load reporting disabled.
-INSTANTIATE_TEST_SUITE_P(XdsTest, ClientLoadReportingTest,
- ::testing::Values(TestType(false, true),
- TestType(true, true)),
- &TestTypeName);
+INSTANTIATE_TEST_SUITE_P(UsesXdsResolver, ClientLoadReportingTest,
+ ::testing::Bool());
-// Load reporting tests are not run with load reporting disabled.
-INSTANTIATE_TEST_SUITE_P(XdsTest, ClientLoadReportingWithDropTest,
- ::testing::Values(TestType(false, true),
- TestType(true, true)),
- &TestTypeName);
+INSTANTIATE_TEST_SUITE_P(UsesXdsResolver, ClientLoadReportingWithDropTest,
+ ::testing::Bool());
} // namespace
} // namespace testing
diff --git a/test/cpp/interop/client_helper.h b/test/cpp/interop/client_helper.h
index 4afce27..e0bb6ea 100644
--- a/test/cpp/interop/client_helper.h
+++ b/test/cpp/interop/client_helper.h
@@ -92,7 +92,7 @@
: additional_metadata_(std::move(additional_metadata)) {}
experimental::Interceptor* CreateClientInterceptor(
- experimental::ClientRpcInfo* info) override {
+ experimental::ClientRpcInfo* /*info*/) override {
return new AdditionalMetadataInterceptor(additional_metadata_);
}
diff --git a/test/cpp/microbenchmarks/callback_test_service.cc b/test/cpp/microbenchmarks/callback_test_service.cc
index 321a5b3..a882991 100644
--- a/test/cpp/microbenchmarks/callback_test_service.cc
+++ b/test/cpp/microbenchmarks/callback_test_service.cc
@@ -47,7 +47,8 @@
} // namespace
void CallbackStreamingTestService::Echo(
- ServerContext* context, const EchoRequest* request, EchoResponse* response,
+ ServerContext* context, const EchoRequest* /*request*/,
+ EchoResponse* response,
experimental::ServerCallbackRpcController* controller) {
int response_msgs_size = GetIntValueFromMetadata(
kServerMessageSize, context->client_metadata(), 0);
diff --git a/test/cpp/microbenchmarks/helpers.cc b/test/cpp/microbenchmarks/helpers.cc
index 7d78e21..98c6c73 100644
--- a/test/cpp/microbenchmarks/helpers.cc
+++ b/test/cpp/microbenchmarks/helpers.cc
@@ -64,6 +64,10 @@
}
void TrackCounters::AddToLabel(std::ostream& out, benchmark::State& state) {
+ // Use the parameters to avoid unused-parameter warnings depending on the
+ // #define's present
+ (void)out;
+ (void)state;
#ifdef GRPC_COLLECT_STATS
grpc_stats_data stats_end;
grpc_stats_collect(&stats_end);
diff --git a/test/cpp/qps/client.h b/test/cpp/qps/client.h
index ceb5cdd..7518a8b 100644
--- a/test/cpp/qps/client.h
+++ b/test/cpp/qps/client.h
@@ -54,7 +54,7 @@
template <class RequestType>
class ClientRequestCreator {
public:
- ClientRequestCreator(RequestType* req, const PayloadConfig&) {
+ ClientRequestCreator(RequestType* /*req*/, const PayloadConfig&) {
// this template must be specialized
// fail with an assertion rather than a compile-time
// check since these only happen at the beginning anyway
diff --git a/test/cpp/qps/usage_timer.cc b/test/cpp/qps/usage_timer.cc
index f0d15a7..29a6aaa 100644
--- a/test/cpp/qps/usage_timer.cc
+++ b/test/cpp/qps/usage_timer.cc
@@ -69,6 +69,9 @@
}
}
#else
+ // Use the parameters to avoid unused-parameter warning
+ (void)total_cpu_time;
+ (void)idle_cpu_time;
gpr_log(GPR_INFO, "get_cpu_usage(): Non-linux platform is not supported.");
#endif
}
diff --git a/test/cpp/util/create_test_channel.cc b/test/cpp/util/create_test_channel.cc
index 5c32198..a46a39c 100644
--- a/test/cpp/util/create_test_channel.cc
+++ b/test/cpp/util/create_test_channel.cc
@@ -33,7 +33,7 @@
class SslCredentialProvider : public testing::CredentialTypeProvider {
public:
std::shared_ptr<ChannelCredentials> GetChannelCredentials(
- grpc::ChannelArguments* args) override {
+ grpc::ChannelArguments* /*args*/) override {
return grpc::SslCredentials(SslCredentialsOptions());
}
std::shared_ptr<ServerCredentials> GetServerCredentials() override {
diff --git a/test/distrib/cpp/run_distrib_test_cmake.sh b/test/distrib/cpp/run_distrib_test_cmake.sh
index f3362f1..a73cbdf 100755
--- a/test/distrib/cpp/run_distrib_test_cmake.sh
+++ b/test/distrib/cpp/run_distrib_test_cmake.sh
@@ -52,6 +52,11 @@
cd ../../../..
rm -rf third_party/protobuf # wipe out to prevent influencing the grpc build
+# Just before installing gRPC, wipe out contents of all the submodules to simulate
+# a standalone build from an archive
+# shellcheck disable=SC2016
+git submodule foreach 'cd $toplevel; rm -rf $name'
+
# Install gRPC
mkdir -p cmake/build
cd cmake/build
diff --git a/test/distrib/cpp/run_distrib_test_cmake_pkgconfig.sh b/test/distrib/cpp/run_distrib_test_cmake_pkgconfig.sh
index cf3b4dc..e78b199 100755
--- a/test/distrib/cpp/run_distrib_test_cmake_pkgconfig.sh
+++ b/test/distrib/cpp/run_distrib_test_cmake_pkgconfig.sh
@@ -52,6 +52,11 @@
cd ../../../..
rm -rf third_party/protobuf # wipe out to prevent influencing the grpc build
+# Just before installing gRPC, wipe out contents of all the submodules to simulate
+# a standalone build from an archive
+# shellcheck disable=SC2016
+git submodule foreach 'cd $toplevel; rm -rf $name'
+
# Install gRPC
mkdir -p cmake/build
cd cmake/build
diff --git a/third_party/rake-compiler-dock/Dockerfile b/third_party/rake-compiler-dock/Dockerfile
index 44eddc8..e2a721c 100644
--- a/third_party/rake-compiler-dock/Dockerfile
+++ b/third_party/rake-compiler-dock/Dockerfile
@@ -1,4 +1,4 @@
-FROM larskanis/rake-compiler-dock-mri:0.7.0
+FROM larskanis/rake-compiler-dock-mri:0.7.2
RUN find / -name rbconfig.rb | while read f ; do sed -i 's/0x0501/0x0600/' $f ; done
RUN find / -name win32.h | while read f ; do sed -i 's/gettimeofday/rb_gettimeofday/' $f ; done
@@ -7,4 +7,8 @@
RUN find / -name *msvcrt-ruby*.dll.a | while read f ; do n=`echo $f | sed s/.dll//` ; mv $f $n ; done
RUN apt-get install -y g++-multilib
+# Make the system to have GLIBC 2.12 instead of 2.23 so that
+# generated ruby package can run on CentOS 6 with GLIBC 2.12
+RUN sed -i 's/__GLIBC_MINOR__\t23/__GLIBC_MINOR__\t12/' /usr/include/features.h
+
CMD bash
diff --git a/third_party/toolchains/bazel_0.23.2_rbe_windows/BUILD b/third_party/toolchains/bazel_0.23.2_rbe_windows/BUILD
deleted file mode 100644
index 5ce4e00..0000000
--- a/third_party/toolchains/bazel_0.23.2_rbe_windows/BUILD
+++ /dev/null
@@ -1,188 +0,0 @@
-# Copyright 2018 The Bazel Authors. All rights reserved.
-#
-# 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.
-
-# This becomes the BUILD file for @local_config_cc// under Windows.
-licenses(["notice"]) # Apache v2
-
-package(default_visibility = ["//visibility:public"])
-
-load(":cc_toolchain_config.bzl", "cc_toolchain_config")
-
-cc_library(
- name = "malloc",
-)
-
-filegroup(
- name = "empty",
- srcs = [],
-)
-
-# Hardcoded toolchain, legacy behaviour.
-cc_toolchain_suite(
- name = "toolchain",
- toolchains = {
- "armeabi-v7a|compiler": ":cc-compiler-armeabi-v7a",
- "x64_windows|msvc-cl": ":cc-compiler-x64_windows",
- "x64_windows|msys-gcc": ":cc-compiler-x64_windows_msys",
- "x64_windows|mingw-gcc": ":cc-compiler-x64_windows_mingw",
- "x64_windows_msys": ":cc-compiler-x64_windows_msys",
- "x64_windows": ":cc-compiler-x64_windows",
- "armeabi-v7a": ":cc-compiler-armeabi-v7a",
- },
-)
-
-cc_toolchain(
- name = "cc-compiler-x64_windows_msys",
- all_files = ":empty",
- ar_files = ":empty",
- as_files = ":empty",
- compiler_files = ":empty",
- dwp_files = ":empty",
- linker_files = ":empty",
- objcopy_files = ":empty",
- strip_files = ":empty",
- supports_param_files = 1,
- toolchain_config = ":msys_x64",
- toolchain_identifier = "msys_x64",
-)
-
-cc_toolchain_config(
- name = "msys_x64",
- compiler = "msys-gcc",
- cpu = "x64_windows",
-)
-
-toolchain(
- name = "cc-toolchain-x64_windows_msys",
- exec_compatible_with = [
- "@bazel_tools//platforms:x86_64",
- "@bazel_tools//platforms:windows",
- "@bazel_tools//tools/cpp:msys",
- ],
- target_compatible_with = [
- "@bazel_tools//platforms:x86_64",
- "@bazel_tools//platforms:windows",
- ],
- toolchain = ":cc-compiler-x64_windows_msys",
- toolchain_type = "@bazel_tools//tools/cpp:toolchain_type",
-)
-
-cc_toolchain(
- name = "cc-compiler-x64_windows_mingw",
- all_files = ":empty",
- ar_files = ":empty",
- as_files = ":empty",
- compiler_files = ":empty",
- dwp_files = ":empty",
- linker_files = ":empty",
- objcopy_files = ":empty",
- strip_files = ":empty",
- supports_param_files = 0,
- toolchain_config = ":msys_x64_mingw",
- toolchain_identifier = "msys_x64_mingw",
-)
-
-cc_toolchain_config(
- name = "msys_x64_mingw",
- compiler = "mingw-gcc",
- cpu = "x64_windows",
-)
-
-toolchain(
- name = "cc-toolchain-x64_windows_mingw",
- exec_compatible_with = [
- "@bazel_tools//platforms:x86_64",
- "@bazel_tools//platforms:windows",
- "@bazel_tools//tools/cpp:mingw",
- ],
- target_compatible_with = [
- "@bazel_tools//platforms:x86_64",
- "@bazel_tools//platforms:windows",
- ],
- toolchain = ":cc-compiler-x64_windows_mingw",
- toolchain_type = "@bazel_tools//tools/cpp:toolchain_type",
-)
-
-cc_toolchain(
- name = "cc-compiler-x64_windows",
- all_files = ":empty",
- ar_files = ":empty",
- as_files = ":empty",
- compiler_files = ":empty",
- dwp_files = ":empty",
- linker_files = ":empty",
- objcopy_files = ":empty",
- strip_files = ":empty",
- supports_param_files = 1,
- toolchain_config = ":msvc_x64",
- toolchain_identifier = "msvc_x64",
-)
-
-cc_toolchain_config(
- name = "msvc_x64",
- compiler = "msvc-cl",
- cpu = "x64_windows",
-)
-
-toolchain(
- name = "cc-toolchain-x64_windows",
- exec_compatible_with = [
- "@bazel_tools//platforms:x86_64",
- "@bazel_tools//platforms:windows",
- ],
- target_compatible_with = [
- "@bazel_tools//platforms:x86_64",
- "@bazel_tools//platforms:windows",
- ],
- toolchain = ":cc-compiler-x64_windows",
- toolchain_type = "@bazel_tools//tools/cpp:toolchain_type",
-)
-
-cc_toolchain(
- name = "cc-compiler-armeabi-v7a",
- all_files = ":empty",
- ar_files = ":empty",
- as_files = ":empty",
- compiler_files = ":empty",
- dwp_files = ":empty",
- linker_files = ":empty",
- objcopy_files = ":empty",
- strip_files = ":empty",
- supports_param_files = 1,
- toolchain_config = ":stub_armeabi-v7a",
- toolchain_identifier = "stub_armeabi-v7a",
-)
-
-cc_toolchain_config(
- name = "stub_armeabi-v7a",
- compiler = "compiler",
- cpu = "armeabi-v7a",
-)
-
-toolchain(
- name = "cc-toolchain-armeabi-v7a",
- exec_compatible_with = [
- ],
- target_compatible_with = [
- "@bazel_tools//platforms:arm",
- "@bazel_tools//platforms:android",
- ],
- toolchain = ":cc-compiler-armeabi-v7a",
- toolchain_type = "@bazel_tools//tools/cpp:toolchain_type",
-)
-
-filegroup(
- name = "link_dynamic_library",
- srcs = ["link_dynamic_library.sh"],
-)
diff --git a/third_party/toolchains/bazel_0.23.2_rbe_windows/cc_toolchain_config.bzl b/third_party/toolchains/bazel_0.23.2_rbe_windows/cc_toolchain_config.bzl
deleted file mode 100644
index 790ddcb..0000000
--- a/third_party/toolchains/bazel_0.23.2_rbe_windows/cc_toolchain_config.bzl
+++ /dev/null
@@ -1,1704 +0,0 @@
-# Copyright 2019 The Bazel Authors. All rights reserved.
-#
-# 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.
-
-"""A Starlark cc_toolchain configuration rule"""
-
-load(
- "@bazel_tools//tools/cpp:cc_toolchain_config_lib.bzl",
- "action_config",
- "artifact_name_pattern",
- "env_entry",
- "env_set",
- "feature",
- "feature_set",
- "flag_group",
- "flag_set",
- "make_variable",
- "tool",
- "tool_path",
- "variable_with_value",
- "with_feature_set",
-)
-load("@bazel_tools//tools/build_defs/cc:action_names.bzl", "ACTION_NAMES")
-
-all_compile_actions = [
- ACTION_NAMES.c_compile,
- ACTION_NAMES.cpp_compile,
- ACTION_NAMES.linkstamp_compile,
- ACTION_NAMES.assemble,
- ACTION_NAMES.preprocess_assemble,
- ACTION_NAMES.cpp_header_parsing,
- ACTION_NAMES.cpp_module_compile,
- ACTION_NAMES.cpp_module_codegen,
- ACTION_NAMES.clif_match,
- ACTION_NAMES.lto_backend,
-]
-
-all_cpp_compile_actions = [
- ACTION_NAMES.cpp_compile,
- ACTION_NAMES.linkstamp_compile,
- ACTION_NAMES.cpp_header_parsing,
- ACTION_NAMES.cpp_module_compile,
- ACTION_NAMES.cpp_module_codegen,
- ACTION_NAMES.clif_match,
-]
-
-preprocessor_compile_actions = [
- ACTION_NAMES.c_compile,
- ACTION_NAMES.cpp_compile,
- ACTION_NAMES.linkstamp_compile,
- ACTION_NAMES.preprocess_assemble,
- ACTION_NAMES.cpp_header_parsing,
- ACTION_NAMES.cpp_module_compile,
- ACTION_NAMES.clif_match,
-]
-
-codegen_compile_actions = [
- ACTION_NAMES.c_compile,
- ACTION_NAMES.cpp_compile,
- ACTION_NAMES.linkstamp_compile,
- ACTION_NAMES.assemble,
- ACTION_NAMES.preprocess_assemble,
- ACTION_NAMES.cpp_module_codegen,
- ACTION_NAMES.lto_backend,
-]
-
-all_link_actions = [
- ACTION_NAMES.cpp_link_executable,
- ACTION_NAMES.cpp_link_dynamic_library,
- ACTION_NAMES.cpp_link_nodeps_dynamic_library,
-]
-
-def _windows_msvc_impl(ctx):
- toolchain_identifier = "msvc_x64"
- host_system_name = "local"
- target_system_name = "local"
- target_cpu = "x64_windows"
- target_libc = "msvcrt"
- compiler = "msvc-cl"
- abi_version = "local"
- abi_libc_version = "local"
- cc_target_os = None
- builtin_sysroot = None
-
- cxx_builtin_include_directories = [
- # This is a workaround for https://github.com/bazelbuild/bazel/issues/5087.
- "C:\\botcode\\w",
- "c:/tools/msys64/usr/",
- "C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\INCLUDE",
- "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.10240.0\\ucrt",
- "C:\\Program Files (x86)\\Windows Kits\\8.1\\include\\shared",
- "C:\\Program Files (x86)\\Windows Kits\\8.1\\include\\um",
- "C:\\Program Files (x86)\\Windows Kits\\8.1\\include\\winrt",
- ]
-
- cpp_link_nodeps_dynamic_library_action = action_config(
- action_name = ACTION_NAMES.cpp_link_nodeps_dynamic_library,
- implies = [
- "nologo",
- "shared_flag",
- "linkstamps",
- "output_execpath_flags",
- "input_param_flags",
- "user_link_flags",
- "default_link_flags",
- "linker_subsystem_flag",
- "linker_param_file",
- "msvc_env",
- "no_stripping",
- "has_configured_linker_path",
- "def_file",
- ],
- tools = [tool(path = "C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/amd64/link.exe")],
- )
-
- cpp_link_static_library_action = action_config(
- action_name = ACTION_NAMES.cpp_link_static_library,
- implies = [
- "nologo",
- "archiver_flags",
- "input_param_flags",
- "linker_param_file",
- "msvc_env",
- ],
- tools = [tool(path = "C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/amd64/lib.exe")],
- )
-
- assemble_action = action_config(
- action_name = ACTION_NAMES.assemble,
- implies = [
- "compiler_input_flags",
- "compiler_output_flags",
- "nologo",
- "msvc_env",
- "sysroot",
- ],
- tools = [tool(path = "C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/amd64/ml64.exe")],
- )
-
- preprocess_assemble_action = action_config(
- action_name = ACTION_NAMES.preprocess_assemble,
- implies = [
- "compiler_input_flags",
- "compiler_output_flags",
- "nologo",
- "msvc_env",
- "sysroot",
- ],
- tools = [tool(path = "C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/amd64/ml64.exe")],
- )
-
- c_compile_action = action_config(
- action_name = ACTION_NAMES.c_compile,
- implies = [
- "compiler_input_flags",
- "compiler_output_flags",
- "default_compile_flags",
- "nologo",
- "msvc_env",
- "parse_showincludes",
- "user_compile_flags",
- "sysroot",
- "unfiltered_compile_flags",
- ],
- tools = [tool(path = "C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/amd64/cl.exe")],
- )
-
- cpp_compile_action = action_config(
- action_name = ACTION_NAMES.cpp_compile,
- implies = [
- "compiler_input_flags",
- "compiler_output_flags",
- "default_compile_flags",
- "nologo",
- "msvc_env",
- "parse_showincludes",
- "user_compile_flags",
- "sysroot",
- "unfiltered_compile_flags",
- ],
- tools = [tool(path = "C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/amd64/cl.exe")],
- )
-
- cpp_link_executable_action = action_config(
- action_name = ACTION_NAMES.cpp_link_executable,
- implies = [
- "nologo",
- "linkstamps",
- "output_execpath_flags",
- "input_param_flags",
- "user_link_flags",
- "default_link_flags",
- "linker_subsystem_flag",
- "linker_param_file",
- "msvc_env",
- "no_stripping",
- ],
- tools = [tool(path = "C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/amd64/link.exe")],
- )
-
- cpp_link_dynamic_library_action = action_config(
- action_name = ACTION_NAMES.cpp_link_dynamic_library,
- implies = [
- "nologo",
- "shared_flag",
- "linkstamps",
- "output_execpath_flags",
- "input_param_flags",
- "user_link_flags",
- "default_link_flags",
- "linker_subsystem_flag",
- "linker_param_file",
- "msvc_env",
- "no_stripping",
- "has_configured_linker_path",
- "def_file",
- ],
- tools = [tool(path = "C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/amd64/link.exe")],
- )
-
- action_configs = [
- assemble_action,
- preprocess_assemble_action,
- c_compile_action,
- cpp_compile_action,
- cpp_link_executable_action,
- cpp_link_dynamic_library_action,
- cpp_link_nodeps_dynamic_library_action,
- cpp_link_static_library_action,
- ]
-
- msvc_link_env_feature = feature(
- name = "msvc_link_env",
- env_sets = [
- env_set(
- actions = all_link_actions +
- [ACTION_NAMES.cpp_link_static_library],
- env_entries = [env_entry(key = "LIB", value = "C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\LIB\\amd64;C:\\Program Files (x86)\\Windows Kits\\10\\lib\\10.0.10240.0\\ucrt\\x64;C:\\Program Files (x86)\\Windows Kits\\8.1\\lib\\winv6.3\\um\\x64;")],
- ),
- ],
- )
-
- shared_flag_feature = feature(
- name = "shared_flag",
- flag_sets = [
- flag_set(
- actions = [
- ACTION_NAMES.cpp_link_dynamic_library,
- ACTION_NAMES.cpp_link_nodeps_dynamic_library,
- ],
- flag_groups = [flag_group(flags = ["/DLL"])],
- ),
- ],
- )
-
- determinism_feature = feature(
- name = "determinism",
- enabled = True,
- flag_sets = [
- flag_set(
- actions = [ACTION_NAMES.c_compile, ACTION_NAMES.cpp_compile],
- flag_groups = [
- flag_group(
- flags = [
- "/wd4117",
- "-D__DATE__=\"redacted\"",
- "-D__TIMESTAMP__=\"redacted\"",
- "-D__TIME__=\"redacted\"",
- ],
- ),
- ],
- ),
- ],
- )
-
- sysroot_feature = feature(
- name = "sysroot",
- flag_sets = [
- flag_set(
- actions = [
- ACTION_NAMES.assemble,
- ACTION_NAMES.preprocess_assemble,
- ACTION_NAMES.c_compile,
- ACTION_NAMES.cpp_compile,
- ACTION_NAMES.cpp_header_parsing,
- ACTION_NAMES.cpp_module_compile,
- ACTION_NAMES.cpp_module_codegen,
- ACTION_NAMES.cpp_link_executable,
- ACTION_NAMES.cpp_link_dynamic_library,
- ACTION_NAMES.cpp_link_nodeps_dynamic_library,
- ],
- flag_groups = [
- flag_group(
- flags = ["--sysroot=%{sysroot}"],
- iterate_over = "sysroot",
- expand_if_available = "sysroot",
- ),
- ],
- ),
- ],
- )
-
- unfiltered_compile_flags_feature = feature(
- name = "unfiltered_compile_flags",
- flag_sets = [
- flag_set(
- actions = [
- ACTION_NAMES.preprocess_assemble,
- ACTION_NAMES.c_compile,
- ACTION_NAMES.cpp_compile,
- ACTION_NAMES.cpp_header_parsing,
- ACTION_NAMES.cpp_module_compile,
- ACTION_NAMES.cpp_module_codegen,
- ],
- flag_groups = [
- flag_group(
- flags = ["%{unfiltered_compile_flags}"],
- iterate_over = "unfiltered_compile_flags",
- expand_if_available = "unfiltered_compile_flags",
- ),
- ],
- ),
- ],
- )
-
- copy_dynamic_libraries_to_binary_feature = feature(name = "copy_dynamic_libraries_to_binary")
-
- input_param_flags_feature = feature(
- name = "input_param_flags",
- flag_sets = [
- flag_set(
- actions = [
- ACTION_NAMES.cpp_link_dynamic_library,
- ACTION_NAMES.cpp_link_nodeps_dynamic_library,
- ],
- flag_groups = [
- flag_group(
- flags = ["/IMPLIB:%{interface_library_output_path}"],
- expand_if_available = "interface_library_output_path",
- ),
- ],
- ),
- flag_set(
- actions = all_link_actions,
- flag_groups = [
- flag_group(
- flags = ["%{libopts}"],
- iterate_over = "libopts",
- expand_if_available = "libopts",
- ),
- ],
- ),
- flag_set(
- actions = all_link_actions +
- [ACTION_NAMES.cpp_link_static_library],
- flag_groups = [
- flag_group(
- iterate_over = "libraries_to_link",
- flag_groups = [
- flag_group(
- iterate_over = "libraries_to_link.object_files",
- flag_groups = [flag_group(flags = ["%{libraries_to_link.object_files}"])],
- expand_if_equal = variable_with_value(
- name = "libraries_to_link.type",
- value = "object_file_group",
- ),
- ),
- flag_group(
- flag_groups = [flag_group(flags = ["%{libraries_to_link.name}"])],
- expand_if_equal = variable_with_value(
- name = "libraries_to_link.type",
- value = "object_file",
- ),
- ),
- flag_group(
- flag_groups = [flag_group(flags = ["%{libraries_to_link.name}"])],
- expand_if_equal = variable_with_value(
- name = "libraries_to_link.type",
- value = "interface_library",
- ),
- ),
- flag_group(
- flag_groups = [
- flag_group(
- flags = ["%{libraries_to_link.name}"],
- expand_if_false = "libraries_to_link.is_whole_archive",
- ),
- flag_group(
- flags = ["/WHOLEARCHIVE:%{libraries_to_link.name}"],
- expand_if_true = "libraries_to_link.is_whole_archive",
- ),
- ],
- expand_if_equal = variable_with_value(
- name = "libraries_to_link.type",
- value = "static_library",
- ),
- ),
- ],
- expand_if_available = "libraries_to_link",
- ),
- ],
- ),
- ],
- )
-
- fastbuild_feature = feature(
- name = "fastbuild",
- flag_sets = [
- flag_set(
- actions = [ACTION_NAMES.c_compile, ACTION_NAMES.cpp_compile],
- flag_groups = [flag_group(flags = ["/Od", "/Z7"])],
- ),
- flag_set(
- actions = all_link_actions,
- flag_groups = [
- flag_group(
- flags = ["/DEBUG:FASTLINK", "/INCREMENTAL:NO"],
- ),
- ],
- ),
- ],
- implies = ["generate_pdb_file"],
- )
-
- user_compile_flags_feature = feature(
- name = "user_compile_flags",
- flag_sets = [
- flag_set(
- actions = [
- ACTION_NAMES.preprocess_assemble,
- ACTION_NAMES.c_compile,
- ACTION_NAMES.cpp_compile,
- ACTION_NAMES.cpp_header_parsing,
- ACTION_NAMES.cpp_module_compile,
- ACTION_NAMES.cpp_module_codegen,
- ],
- flag_groups = [
- flag_group(
- flags = ["%{user_compile_flags}"],
- iterate_over = "user_compile_flags",
- expand_if_available = "user_compile_flags",
- ),
- ],
- ),
- ],
- )
-
- archiver_flags_feature = feature(
- name = "archiver_flags",
- flag_sets = [
- flag_set(
- actions = [ACTION_NAMES.cpp_link_static_library],
- flag_groups = [
- flag_group(
- flags = ["/OUT:%{output_execpath}"],
- expand_if_available = "output_execpath",
- ),
- ],
- ),
- ],
- )
-
- default_link_flags_feature = feature(
- name = "default_link_flags",
- enabled = True,
- flag_sets = [
- flag_set(
- actions = all_link_actions,
- flag_groups = [flag_group(flags = ["/MACHINE:X64"])],
- ),
- ],
- )
-
- static_link_msvcrt_feature = feature(name = "static_link_msvcrt")
-
- dynamic_link_msvcrt_debug_feature = feature(
- name = "dynamic_link_msvcrt_debug",
- flag_sets = [
- flag_set(
- actions = [ACTION_NAMES.c_compile, ACTION_NAMES.cpp_compile],
- flag_groups = [flag_group(flags = ["/MDd"])],
- ),
- flag_set(
- actions = all_link_actions,
- flag_groups = [flag_group(flags = ["/DEFAULTLIB:msvcrtd.lib"])],
- ),
- ],
- requires = [feature_set(features = ["dbg"])],
- )
-
- dbg_feature = feature(
- name = "dbg",
- flag_sets = [
- flag_set(
- actions = [ACTION_NAMES.c_compile, ACTION_NAMES.cpp_compile],
- flag_groups = [flag_group(flags = ["/Od", "/Z7"])],
- ),
- flag_set(
- actions = all_link_actions,
- flag_groups = [
- flag_group(
- flags = ["/DEBUG:FULL", "/INCREMENTAL:NO"],
- ),
- ],
- ),
- ],
- implies = ["generate_pdb_file"],
- )
-
- opt_feature = feature(
- name = "opt",
- flag_sets = [
- flag_set(
- actions = [ACTION_NAMES.c_compile, ACTION_NAMES.cpp_compile],
- flag_groups = [flag_group(flags = ["/O2"])],
- ),
- ],
- implies = ["frame_pointer"],
- )
-
- supports_interface_shared_libraries_feature = feature(
- name = "supports_interface_shared_libraries",
- enabled = True,
- )
-
- user_link_flags_feature = feature(
- name = "user_link_flags",
- flag_sets = [
- flag_set(
- actions = all_link_actions,
- flag_groups = [
- flag_group(
- flags = ["%{user_link_flags}"],
- iterate_over = "user_link_flags",
- expand_if_available = "user_link_flags",
- ),
- ],
- ),
- ],
- )
-
- default_compile_flags_feature = feature(
- name = "default_compile_flags",
- enabled = True,
- flag_sets = [
- flag_set(
- actions = [
- ACTION_NAMES.assemble,
- ACTION_NAMES.preprocess_assemble,
- ACTION_NAMES.linkstamp_compile,
- ACTION_NAMES.c_compile,
- ACTION_NAMES.cpp_compile,
- ACTION_NAMES.cpp_header_parsing,
- ACTION_NAMES.cpp_module_compile,
- ACTION_NAMES.cpp_module_codegen,
- ACTION_NAMES.lto_backend,
- ACTION_NAMES.clif_match,
- ],
- flag_groups = [
- flag_group(
- flags = [
- "/DCOMPILER_MSVC",
- "/DNOMINMAX",
- "/D_WIN32_WINNT=0x0601",
- "/D_CRT_SECURE_NO_DEPRECATE",
- "/D_CRT_SECURE_NO_WARNINGS",
- "/bigobj",
- "/Zm500",
- "/EHsc",
- "/wd4351",
- "/wd4291",
- "/wd4250",
- "/wd4996",
- ],
- ),
- ],
- ),
- ],
- )
-
- msvc_compile_env_feature = feature(
- name = "msvc_compile_env",
- env_sets = [
- env_set(
- actions = [
- ACTION_NAMES.c_compile,
- ACTION_NAMES.cpp_compile,
- ACTION_NAMES.cpp_module_compile,
- ACTION_NAMES.cpp_module_codegen,
- ACTION_NAMES.cpp_header_parsing,
- ACTION_NAMES.assemble,
- ACTION_NAMES.preprocess_assemble,
- ],
- env_entries = [env_entry(key = "INCLUDE", value = "C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\INCLUDE;C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.10240.0\\ucrt;C:\\Program Files (x86)\\Windows Kits\\8.1\\include\\shared;C:\\Program Files (x86)\\Windows Kits\\8.1\\include\\um;C:\\Program Files (x86)\\Windows Kits\\8.1\\include\\winrt;")],
- ),
- ],
- )
-
- preprocessor_defines_feature = feature(
- name = "preprocessor_defines",
- flag_sets = [
- flag_set(
- actions = [
- ACTION_NAMES.assemble,
- ACTION_NAMES.preprocess_assemble,
- ACTION_NAMES.c_compile,
- ACTION_NAMES.cpp_compile,
- ACTION_NAMES.cpp_header_parsing,
- ACTION_NAMES.cpp_module_compile,
- ],
- flag_groups = [
- flag_group(
- flags = ["/D%{preprocessor_defines}"],
- iterate_over = "preprocessor_defines",
- ),
- ],
- ),
- ],
- )
-
- generate_pdb_file_feature = feature(
- name = "generate_pdb_file",
- requires = [
- feature_set(features = ["dbg"]),
- feature_set(features = ["fastbuild"]),
- ],
- )
-
- output_execpath_flags_feature = feature(
- name = "output_execpath_flags",
- flag_sets = [
- flag_set(
- actions = all_link_actions,
- flag_groups = [
- flag_group(
- flags = ["/OUT:%{output_execpath}"],
- expand_if_available = "output_execpath",
- ),
- ],
- ),
- ],
- )
-
- dynamic_link_msvcrt_no_debug_feature = feature(
- name = "dynamic_link_msvcrt_no_debug",
- flag_sets = [
- flag_set(
- actions = [ACTION_NAMES.c_compile, ACTION_NAMES.cpp_compile],
- flag_groups = [flag_group(flags = ["/MD"])],
- ),
- flag_set(
- actions = all_link_actions,
- flag_groups = [flag_group(flags = ["/DEFAULTLIB:msvcrt.lib"])],
- ),
- ],
- requires = [
- feature_set(features = ["fastbuild"]),
- feature_set(features = ["opt"]),
- ],
- )
-
- disable_assertions_feature = feature(
- name = "disable_assertions",
- enabled = True,
- flag_sets = [
- flag_set(
- actions = [ACTION_NAMES.c_compile, ACTION_NAMES.cpp_compile],
- flag_groups = [flag_group(flags = ["/DNDEBUG"])],
- with_features = [with_feature_set(features = ["opt"])],
- ),
- ],
- )
-
- has_configured_linker_path_feature = feature(name = "has_configured_linker_path")
-
- supports_dynamic_linker_feature = feature(name = "supports_dynamic_linker", enabled = True)
-
- no_stripping_feature = feature(name = "no_stripping")
-
- linker_param_file_feature = feature(
- name = "linker_param_file",
- flag_sets = [
- flag_set(
- actions = all_link_actions +
- [ACTION_NAMES.cpp_link_static_library],
- flag_groups = [
- flag_group(
- flags = ["@%{linker_param_file}"],
- expand_if_available = "linker_param_file",
- ),
- ],
- ),
- ],
- )
-
- ignore_noisy_warnings_feature = feature(
- name = "ignore_noisy_warnings",
- enabled = True,
- flag_sets = [
- flag_set(
- actions = [ACTION_NAMES.cpp_link_static_library],
- flag_groups = [flag_group(flags = ["/ignore:4221"])],
- ),
- ],
- )
-
- no_legacy_features_feature = feature(name = "no_legacy_features")
-
- parse_showincludes_feature = feature(
- name = "parse_showincludes",
- flag_sets = [
- flag_set(
- actions = [
- ACTION_NAMES.preprocess_assemble,
- ACTION_NAMES.c_compile,
- ACTION_NAMES.cpp_compile,
- ACTION_NAMES.cpp_module_compile,
- ACTION_NAMES.cpp_header_parsing,
- ],
- flag_groups = [flag_group(flags = ["/showIncludes"])],
- ),
- ],
- )
-
- static_link_msvcrt_no_debug_feature = feature(
- name = "static_link_msvcrt_no_debug",
- flag_sets = [
- flag_set(
- actions = [ACTION_NAMES.c_compile, ACTION_NAMES.cpp_compile],
- flag_groups = [flag_group(flags = ["/MT"])],
- ),
- flag_set(
- actions = all_link_actions,
- flag_groups = [flag_group(flags = ["/DEFAULTLIB:libcmt.lib"])],
- ),
- ],
- requires = [
- feature_set(features = ["fastbuild"]),
- feature_set(features = ["opt"]),
- ],
- )
-
- treat_warnings_as_errors_feature = feature(
- name = "treat_warnings_as_errors",
- flag_sets = [
- flag_set(
- actions = [ACTION_NAMES.c_compile, ACTION_NAMES.cpp_compile],
- flag_groups = [flag_group(flags = ["/WX"])],
- ),
- ],
- )
-
- windows_export_all_symbols_feature = feature(name = "windows_export_all_symbols")
-
- no_windows_export_all_symbols_feature = feature(name = "no_windows_export_all_symbols")
-
- include_paths_feature = feature(
- name = "include_paths",
- flag_sets = [
- flag_set(
- actions = [
- ACTION_NAMES.assemble,
- ACTION_NAMES.preprocess_assemble,
- ACTION_NAMES.c_compile,
- ACTION_NAMES.cpp_compile,
- ACTION_NAMES.cpp_header_parsing,
- ACTION_NAMES.cpp_module_compile,
- ],
- flag_groups = [
- flag_group(
- flags = ["/I%{quote_include_paths}"],
- iterate_over = "quote_include_paths",
- ),
- flag_group(
- flags = ["/I%{include_paths}"],
- iterate_over = "include_paths",
- ),
- flag_group(
- flags = ["/I%{system_include_paths}"],
- iterate_over = "system_include_paths",
- ),
- ],
- ),
- ],
- )
-
- linkstamps_feature = feature(
- name = "linkstamps",
- flag_sets = [
- flag_set(
- actions = all_link_actions,
- flag_groups = [
- flag_group(
- flags = ["%{linkstamp_paths}"],
- iterate_over = "linkstamp_paths",
- expand_if_available = "linkstamp_paths",
- ),
- ],
- ),
- ],
- )
-
- targets_windows_feature = feature(
- name = "targets_windows",
- enabled = True,
- implies = ["copy_dynamic_libraries_to_binary"],
- )
-
- linker_subsystem_flag_feature = feature(
- name = "linker_subsystem_flag",
- flag_sets = [
- flag_set(
- actions = all_link_actions,
- flag_groups = [flag_group(flags = ["/SUBSYSTEM:CONSOLE"])],
- ),
- ],
- )
-
- static_link_msvcrt_debug_feature = feature(
- name = "static_link_msvcrt_debug",
- flag_sets = [
- flag_set(
- actions = [ACTION_NAMES.c_compile, ACTION_NAMES.cpp_compile],
- flag_groups = [flag_group(flags = ["/MTd"])],
- ),
- flag_set(
- actions = all_link_actions,
- flag_groups = [flag_group(flags = ["/DEFAULTLIB:libcmtd.lib"])],
- ),
- ],
- requires = [feature_set(features = ["dbg"])],
- )
-
- frame_pointer_feature = feature(
- name = "frame_pointer",
- flag_sets = [
- flag_set(
- actions = [ACTION_NAMES.c_compile, ACTION_NAMES.cpp_compile],
- flag_groups = [flag_group(flags = ["/Oy-"])],
- ),
- ],
- )
-
- compiler_output_flags_feature = feature(
- name = "compiler_output_flags",
- flag_sets = [
- flag_set(
- actions = [ACTION_NAMES.assemble],
- flag_groups = [
- flag_group(
- flag_groups = [
- flag_group(
- flags = ["/Fo%{output_file}", "/Zi"],
- expand_if_available = "output_file",
- expand_if_not_available = "output_assembly_file",
- ),
- ],
- expand_if_not_available = "output_preprocess_file",
- ),
- ],
- ),
- flag_set(
- actions = [
- ACTION_NAMES.preprocess_assemble,
- ACTION_NAMES.c_compile,
- ACTION_NAMES.cpp_compile,
- ACTION_NAMES.cpp_header_parsing,
- ACTION_NAMES.cpp_module_compile,
- ACTION_NAMES.cpp_module_codegen,
- ],
- flag_groups = [
- flag_group(
- flag_groups = [
- flag_group(
- flags = ["/Fo%{output_file}"],
- expand_if_not_available = "output_preprocess_file",
- ),
- ],
- expand_if_available = "output_file",
- expand_if_not_available = "output_assembly_file",
- ),
- flag_group(
- flag_groups = [
- flag_group(
- flags = ["/Fa%{output_file}"],
- expand_if_available = "output_assembly_file",
- ),
- ],
- expand_if_available = "output_file",
- ),
- flag_group(
- flag_groups = [
- flag_group(
- flags = ["/P", "/Fi%{output_file}"],
- expand_if_available = "output_preprocess_file",
- ),
- ],
- expand_if_available = "output_file",
- ),
- ],
- ),
- ],
- )
-
- nologo_feature = feature(
- name = "nologo",
- flag_sets = [
- flag_set(
- actions = [
- ACTION_NAMES.c_compile,
- ACTION_NAMES.cpp_compile,
- ACTION_NAMES.cpp_module_compile,
- ACTION_NAMES.cpp_module_codegen,
- ACTION_NAMES.cpp_header_parsing,
- ACTION_NAMES.assemble,
- ACTION_NAMES.preprocess_assemble,
- ACTION_NAMES.cpp_link_executable,
- ACTION_NAMES.cpp_link_dynamic_library,
- ACTION_NAMES.cpp_link_nodeps_dynamic_library,
- ACTION_NAMES.cpp_link_static_library,
- ],
- flag_groups = [flag_group(flags = ["/nologo"])],
- ),
- ],
- )
-
- smaller_binary_feature = feature(
- name = "smaller_binary",
- enabled = True,
- flag_sets = [
- flag_set(
- actions = [ACTION_NAMES.c_compile, ACTION_NAMES.cpp_compile],
- flag_groups = [flag_group(flags = ["/Gy", "/Gw"])],
- with_features = [with_feature_set(features = ["opt"])],
- ),
- flag_set(
- actions = all_link_actions,
- flag_groups = [flag_group(flags = ["/OPT:ICF", "/OPT:REF"])],
- with_features = [with_feature_set(features = ["opt"])],
- ),
- ],
- )
-
- compiler_input_flags_feature = feature(
- name = "compiler_input_flags",
- flag_sets = [
- flag_set(
- actions = [
- ACTION_NAMES.assemble,
- ACTION_NAMES.preprocess_assemble,
- ACTION_NAMES.c_compile,
- ACTION_NAMES.cpp_compile,
- ACTION_NAMES.cpp_header_parsing,
- ACTION_NAMES.cpp_module_compile,
- ACTION_NAMES.cpp_module_codegen,
- ],
- flag_groups = [
- flag_group(
- flags = ["/c", "%{source_file}"],
- expand_if_available = "source_file",
- ),
- ],
- ),
- ],
- )
-
- def_file_feature = feature(
- name = "def_file",
- flag_sets = [
- flag_set(
- actions = all_link_actions,
- flag_groups = [
- flag_group(
- flags = ["/DEF:%{def_file_path}", "/ignore:4070"],
- expand_if_available = "def_file_path",
- ),
- ],
- ),
- ],
- )
-
- msvc_env_feature = feature(
- name = "msvc_env",
- env_sets = [
- env_set(
- actions = [
- ACTION_NAMES.c_compile,
- ACTION_NAMES.cpp_compile,
- ACTION_NAMES.cpp_module_compile,
- ACTION_NAMES.cpp_module_codegen,
- ACTION_NAMES.cpp_header_parsing,
- ACTION_NAMES.assemble,
- ACTION_NAMES.preprocess_assemble,
- ACTION_NAMES.cpp_link_executable,
- ACTION_NAMES.cpp_link_dynamic_library,
- ACTION_NAMES.cpp_link_nodeps_dynamic_library,
- ACTION_NAMES.cpp_link_static_library,
- ],
- env_entries = [
- env_entry(key = "PATH", value = "C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\amd64;C:\\Windows\\Microsoft.NET\\Framework64\\v4.0.30319;C:\\Windows\\Microsoft.NET\\Framework64\\;C:\\Program Files (x86)\\Windows Kits\\8.1\\bin\\x64;C:\\Program Files (x86)\\Windows Kits\\8.1\\bin\\x86;;C:\\Windows\\system32"),
- env_entry(key = "TMP", value = "C:\\Users\\ContainerAdministrator\\AppData\\Local\\Temp"),
- env_entry(key = "TEMP", value = "C:\\Users\\ContainerAdministrator\\AppData\\Local\\Temp"),
- ],
- ),
- ],
- implies = ["msvc_compile_env", "msvc_link_env"],
- )
-
- features = [
- no_legacy_features_feature,
- nologo_feature,
- has_configured_linker_path_feature,
- no_stripping_feature,
- targets_windows_feature,
- copy_dynamic_libraries_to_binary_feature,
- default_compile_flags_feature,
- msvc_env_feature,
- msvc_compile_env_feature,
- msvc_link_env_feature,
- include_paths_feature,
- preprocessor_defines_feature,
- parse_showincludes_feature,
- generate_pdb_file_feature,
- shared_flag_feature,
- linkstamps_feature,
- output_execpath_flags_feature,
- archiver_flags_feature,
- input_param_flags_feature,
- linker_subsystem_flag_feature,
- user_link_flags_feature,
- default_link_flags_feature,
- linker_param_file_feature,
- static_link_msvcrt_feature,
- static_link_msvcrt_no_debug_feature,
- dynamic_link_msvcrt_no_debug_feature,
- static_link_msvcrt_debug_feature,
- dynamic_link_msvcrt_debug_feature,
- dbg_feature,
- fastbuild_feature,
- opt_feature,
- frame_pointer_feature,
- disable_assertions_feature,
- determinism_feature,
- treat_warnings_as_errors_feature,
- smaller_binary_feature,
- ignore_noisy_warnings_feature,
- user_compile_flags_feature,
- sysroot_feature,
- unfiltered_compile_flags_feature,
- compiler_output_flags_feature,
- compiler_input_flags_feature,
- def_file_feature,
- windows_export_all_symbols_feature,
- no_windows_export_all_symbols_feature,
- supports_dynamic_linker_feature,
- supports_interface_shared_libraries_feature,
- ]
-
- artifact_name_patterns = [
- artifact_name_pattern(
- category_name = "object_file",
- prefix = "",
- extension = ".obj",
- ),
- artifact_name_pattern(
- category_name = "static_library",
- prefix = "",
- extension = ".lib",
- ),
- artifact_name_pattern(
- category_name = "alwayslink_static_library",
- prefix = "",
- extension = ".lo.lib",
- ),
- artifact_name_pattern(
- category_name = "executable",
- prefix = "",
- extension = ".exe",
- ),
- artifact_name_pattern(
- category_name = "dynamic_library",
- prefix = "",
- extension = ".dll",
- ),
- artifact_name_pattern(
- category_name = "interface_library",
- prefix = "",
- extension = ".if.lib",
- ),
- ]
-
- make_variables = []
-
- tool_paths = [
- tool_path(name = "ar", path = "C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/amd64/lib.exe"),
- tool_path(name = "ml", path = "C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/amd64/ml64.exe"),
- tool_path(name = "cpp", path = "C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/amd64/cl.exe"),
- tool_path(name = "gcc", path = "C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/amd64/cl.exe"),
- tool_path(name = "gcov", path = "wrapper/bin/msvc_nop.bat"),
- tool_path(name = "ld", path = "C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/amd64/link.exe"),
- tool_path(name = "nm", path = "wrapper/bin/msvc_nop.bat"),
- tool_path(
- name = "objcopy",
- path = "wrapper/bin/msvc_nop.bat",
- ),
- tool_path(
- name = "objdump",
- path = "wrapper/bin/msvc_nop.bat",
- ),
- tool_path(
- name = "strip",
- path = "wrapper/bin/msvc_nop.bat",
- ),
- ]
-
- return cc_common.create_cc_toolchain_config_info(
- ctx = ctx,
- features = features,
- action_configs = action_configs,
- artifact_name_patterns = artifact_name_patterns,
- cxx_builtin_include_directories = cxx_builtin_include_directories,
- toolchain_identifier = toolchain_identifier,
- host_system_name = host_system_name,
- target_system_name = target_system_name,
- target_cpu = target_cpu,
- target_libc = target_libc,
- compiler = compiler,
- abi_version = abi_version,
- abi_libc_version = abi_libc_version,
- tool_paths = tool_paths,
- make_variables = make_variables,
- builtin_sysroot = builtin_sysroot,
- cc_target_os = None,
- )
-
-def _windows_msys_mingw_impl(ctx):
- toolchain_identifier = "msys_x64_mingw"
- host_system_name = "local"
- target_system_name = "local"
- target_cpu = "x64_windows"
- target_libc = "mingw"
- compiler = "mingw-gcc"
- abi_version = "local"
- abi_libc_version = "local"
- cc_target_os = None
- builtin_sysroot = None
- action_configs = []
-
- targets_windows_feature = feature(
- name = "targets_windows",
- implies = ["copy_dynamic_libraries_to_binary"],
- enabled = True,
- )
-
- copy_dynamic_libraries_to_binary_feature = feature(name = "copy_dynamic_libraries_to_binary")
-
- gcc_env_feature = feature(
- name = "gcc_env",
- enabled = True,
- env_sets = [
- env_set(
- actions = [
- ACTION_NAMES.c_compile,
- ACTION_NAMES.cpp_compile,
- ACTION_NAMES.cpp_module_compile,
- ACTION_NAMES.cpp_module_codegen,
- ACTION_NAMES.cpp_header_parsing,
- ACTION_NAMES.assemble,
- ACTION_NAMES.preprocess_assemble,
- ACTION_NAMES.cpp_link_executable,
- ACTION_NAMES.cpp_link_dynamic_library,
- ACTION_NAMES.cpp_link_nodeps_dynamic_library,
- ACTION_NAMES.cpp_link_static_library,
- ],
- env_entries = [
- env_entry(key = "PATH", value = "c:/tools/msys64/mingw64/bin"),
- ],
- ),
- ],
- )
-
- msys_mingw_flags = [
- "-std=gnu++0x",
- ]
- msys_mingw_link_flags = [
- "-lstdc++",
- ]
-
- default_compile_flags_feature = feature(
- name = "default_compile_flags",
- enabled = True,
- flag_sets = [
- flag_set(
- actions = [
- ACTION_NAMES.assemble,
- ACTION_NAMES.preprocess_assemble,
- ACTION_NAMES.linkstamp_compile,
- ACTION_NAMES.c_compile,
- ACTION_NAMES.cpp_compile,
- ACTION_NAMES.cpp_header_parsing,
- ACTION_NAMES.cpp_module_compile,
- ACTION_NAMES.cpp_module_codegen,
- ACTION_NAMES.lto_backend,
- ACTION_NAMES.clif_match,
- ],
- ),
- flag_set(
- actions = [
- ACTION_NAMES.linkstamp_compile,
- ACTION_NAMES.cpp_compile,
- ACTION_NAMES.cpp_header_parsing,
- ACTION_NAMES.cpp_module_compile,
- ACTION_NAMES.cpp_module_codegen,
- ACTION_NAMES.lto_backend,
- ACTION_NAMES.clif_match,
- ],
- flag_groups = ([flag_group(flags = msys_mingw_flags)] if msys_mingw_flags else []),
- ),
- ],
- )
-
- default_link_flags_feature = feature(
- name = "default_link_flags",
- enabled = True,
- flag_sets = [
- flag_set(
- actions = all_link_actions,
- flag_groups = ([flag_group(flags = msys_mingw_link_flags)] if msys_mingw_link_flags else []),
- ),
- ],
- )
-
- supports_dynamic_linker_feature = feature(name = "supports_dynamic_linker", enabled = True)
-
- features = [
- targets_windows_feature,
- copy_dynamic_libraries_to_binary_feature,
- gcc_env_feature,
- default_compile_flags_feature,
- default_link_flags_feature,
- supports_dynamic_linker_feature,
- ]
-
- cxx_builtin_include_directories = [
- # This is a workaround for https://github.com/bazelbuild/bazel/issues/5087.
- "C:\\botcode\\w",
- "c:/tools/msys64/mingw64/",
- "C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\INCLUDE",
- "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.10240.0\\ucrt",
- "C:\\Program Files (x86)\\Windows Kits\\8.1\\include\\shared",
- "C:\\Program Files (x86)\\Windows Kits\\8.1\\include\\um",
- "C:\\Program Files (x86)\\Windows Kits\\8.1\\include\\winrt",
- ]
-
- artifact_name_patterns = [
- artifact_name_pattern(
- category_name = "executable",
- prefix = "",
- extension = ".exe",
- ),
- ]
-
- make_variables = []
- tool_paths = [
- tool_path(name = "ar", path = "c:/tools/msys64/mingw64/bin/ar"),
- tool_path(name = "compat-ld", path = "c:/tools/msys64/mingw64/bin/ld"),
- tool_path(name = "cpp", path = "c:/tools/msys64/mingw64/bin/cpp"),
- tool_path(name = "dwp", path = "c:/tools/msys64/mingw64/bin/dwp"),
- tool_path(name = "gcc", path = "c:/tools/msys64/mingw64/bin/gcc"),
- tool_path(name = "gcov", path = "c:/tools/msys64/mingw64/bin/gcov"),
- tool_path(name = "ld", path = "c:/tools/msys64/mingw64/bin/ld"),
- tool_path(name = "nm", path = "c:/tools/msys64/mingw64/bin/nm"),
- tool_path(name = "objcopy", path = "c:/tools/msys64/mingw64/bin/objcopy"),
- tool_path(name = "objdump", path = "c:/tools/msys64/mingw64/bin/objdump"),
- tool_path(name = "strip", path = "c:/tools/msys64/mingw64/bin/strip"),
- ]
-
- return cc_common.create_cc_toolchain_config_info(
- ctx = ctx,
- features = features,
- action_configs = action_configs,
- artifact_name_patterns = artifact_name_patterns,
- cxx_builtin_include_directories = cxx_builtin_include_directories,
- toolchain_identifier = toolchain_identifier,
- host_system_name = host_system_name,
- target_system_name = target_system_name,
- target_cpu = target_cpu,
- target_libc = target_libc,
- compiler = compiler,
- abi_version = abi_version,
- abi_libc_version = abi_libc_version,
- tool_paths = tool_paths,
- make_variables = make_variables,
- builtin_sysroot = builtin_sysroot,
- cc_target_os = cc_target_os,
- )
-
-def _armeabi_impl(ctx):
- toolchain_identifier = "stub_armeabi-v7a"
- host_system_name = "armeabi-v7a"
- target_system_name = "armeabi-v7a"
- target_cpu = "armeabi-v7a"
- target_libc = "armeabi-v7a"
- compiler = "compiler"
- abi_version = "armeabi-v7a"
- abi_libc_version = "armeabi-v7a"
- cc_target_os = None
- builtin_sysroot = None
- action_configs = []
-
- supports_pic_feature = feature(name = "supports_pic", enabled = True)
- supports_dynamic_linker_feature = feature(name = "supports_dynamic_linker", enabled = True)
- features = [supports_dynamic_linker_feature, supports_pic_feature]
-
- cxx_builtin_include_directories = [
- # This is a workaround for https://github.com/bazelbuild/bazel/issues/5087.
- "C:\\botcode\\w",
- ]
- artifact_name_patterns = []
- make_variables = []
-
- tool_paths = [
- tool_path(name = "ar", path = "/bin/false"),
- tool_path(name = "compat-ld", path = "/bin/false"),
- tool_path(name = "cpp", path = "/bin/false"),
- tool_path(name = "dwp", path = "/bin/false"),
- tool_path(name = "gcc", path = "/bin/false"),
- tool_path(name = "gcov", path = "/bin/false"),
- tool_path(name = "ld", path = "/bin/false"),
- tool_path(name = "nm", path = "/bin/false"),
- tool_path(name = "objcopy", path = "/bin/false"),
- tool_path(name = "objdump", path = "/bin/false"),
- tool_path(name = "strip", path = "/bin/false"),
- ]
-
- return cc_common.create_cc_toolchain_config_info(
- ctx = ctx,
- features = features,
- action_configs = action_configs,
- artifact_name_patterns = artifact_name_patterns,
- cxx_builtin_include_directories = cxx_builtin_include_directories,
- toolchain_identifier = toolchain_identifier,
- host_system_name = host_system_name,
- target_system_name = target_system_name,
- target_cpu = target_cpu,
- target_libc = target_libc,
- compiler = compiler,
- abi_version = abi_version,
- abi_libc_version = abi_libc_version,
- tool_paths = tool_paths,
- make_variables = make_variables,
- builtin_sysroot = builtin_sysroot,
- cc_target_os = cc_target_os,
- )
-
-def _impl(ctx):
- if ctx.attr.cpu == "armeabi-v7a":
- return _armeabi_impl(ctx)
- elif ctx.attr.cpu == "x64_windows" and ctx.attr.compiler == "msvc-cl":
- return _windows_msvc_impl(ctx)
- elif ctx.attr.cpu == "x64_windows" and ctx.attr.compiler == "mingw-gcc":
- return _windows_msys_mingw_impl(ctx)
-
- tool_paths = [
- tool_path(name = "ar", path = "c:/tools/msys64/usr/bin/ar"),
- tool_path(name = "compat-ld", path = "c:/tools/msys64/usr/bin/ld"),
- tool_path(name = "cpp", path = "c:/tools/msys64/usr/bin/cpp"),
- tool_path(name = "dwp", path = "c:/tools/msys64/usr/bin/dwp"),
- tool_path(name = "gcc", path = "c:/tools/msys64/usr/bin/gcc"),
- tool_path(name = "gcov", path = "c:/tools/msys64/usr/bin/gcov"),
- tool_path(name = "ld", path = "c:/tools/msys64/usr/bin/ld"),
- tool_path(name = "nm", path = "c:/tools/msys64/usr/bin/nm"),
- tool_path(name = "objcopy", path = "c:/tools/msys64/usr/bin/objcopy"),
- tool_path(name = "objdump", path = "c:/tools/msys64/usr/bin/objdump"),
- tool_path(name = "strip", path = "c:/tools/msys64/usr/bin/strip"),
- ]
-
- cxx_builtin_include_directories = [
- # This is a workaround for https://github.com/bazelbuild/bazel/issues/5087.
- "C:\\botcode\\w",
- "c:/tools/msys64/usr/",
- "C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\INCLUDE",
- "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.10240.0\\ucrt",
- "C:\\Program Files (x86)\\Windows Kits\\8.1\\include\\shared",
- "C:\\Program Files (x86)\\Windows Kits\\8.1\\include\\um",
- "C:\\Program Files (x86)\\Windows Kits\\8.1\\include\\winrt",
- ]
-
- action_configs = []
-
- compile_flags = [
- ]
-
- dbg_compile_flags = [
- ]
-
- opt_compile_flags = [
- ]
-
- cxx_flags = [
- "-std=gnu++0x",
- ]
-
- link_flags = [
- "-lstdc++",
- ]
-
- opt_link_flags = [
- ]
-
- unfiltered_compile_flags = [
- ]
-
- targets_windows_feature = feature(
- name = "targets_windows",
- implies = ["copy_dynamic_libraries_to_binary"],
- enabled = True,
- )
-
- copy_dynamic_libraries_to_binary_feature = feature(name = "copy_dynamic_libraries_to_binary")
-
- gcc_env_feature = feature(
- name = "gcc_env",
- enabled = True,
- env_sets = [
- env_set(
- actions = [
- ACTION_NAMES.c_compile,
- ACTION_NAMES.cpp_compile,
- ACTION_NAMES.cpp_module_compile,
- ACTION_NAMES.cpp_module_codegen,
- ACTION_NAMES.cpp_header_parsing,
- ACTION_NAMES.assemble,
- ACTION_NAMES.preprocess_assemble,
- ACTION_NAMES.cpp_link_executable,
- ACTION_NAMES.cpp_link_dynamic_library,
- ACTION_NAMES.cpp_link_nodeps_dynamic_library,
- ACTION_NAMES.cpp_link_static_library,
- ],
- env_entries = [
- env_entry(key = "PATH", value = "c:/tools/msys64/usr/bin"),
- ],
- ),
- ],
- )
-
- windows_features = [
- targets_windows_feature,
- copy_dynamic_libraries_to_binary_feature,
- gcc_env_feature,
- ]
-
- supports_pic_feature = feature(
- name = "supports_pic",
- enabled = True,
- )
- supports_start_end_lib_feature = feature(
- name = "supports_start_end_lib",
- enabled = True,
- )
-
- default_compile_flags_feature = feature(
- name = "default_compile_flags",
- enabled = True,
- flag_sets = [
- flag_set(
- actions = [
- ACTION_NAMES.assemble,
- ACTION_NAMES.preprocess_assemble,
- ACTION_NAMES.linkstamp_compile,
- ACTION_NAMES.c_compile,
- ACTION_NAMES.cpp_compile,
- ACTION_NAMES.cpp_header_parsing,
- ACTION_NAMES.cpp_module_compile,
- ACTION_NAMES.cpp_module_codegen,
- ACTION_NAMES.lto_backend,
- ACTION_NAMES.clif_match,
- ],
- flag_groups = ([flag_group(flags = compile_flags)] if compile_flags else []),
- ),
- flag_set(
- actions = [
- ACTION_NAMES.assemble,
- ACTION_NAMES.preprocess_assemble,
- ACTION_NAMES.linkstamp_compile,
- ACTION_NAMES.c_compile,
- ACTION_NAMES.cpp_compile,
- ACTION_NAMES.cpp_header_parsing,
- ACTION_NAMES.cpp_module_compile,
- ACTION_NAMES.cpp_module_codegen,
- ACTION_NAMES.lto_backend,
- ACTION_NAMES.clif_match,
- ],
- flag_groups = ([flag_group(flags = dbg_compile_flags)] if dbg_compile_flags else []),
- with_features = [with_feature_set(features = ["dbg"])],
- ),
- flag_set(
- actions = [
- ACTION_NAMES.assemble,
- ACTION_NAMES.preprocess_assemble,
- ACTION_NAMES.linkstamp_compile,
- ACTION_NAMES.c_compile,
- ACTION_NAMES.cpp_compile,
- ACTION_NAMES.cpp_header_parsing,
- ACTION_NAMES.cpp_module_compile,
- ACTION_NAMES.cpp_module_codegen,
- ACTION_NAMES.lto_backend,
- ACTION_NAMES.clif_match,
- ],
- flag_groups = ([flag_group(flags = opt_compile_flags)] if opt_compile_flags else []),
- with_features = [with_feature_set(features = ["opt"])],
- ),
- flag_set(
- actions = [
- ACTION_NAMES.linkstamp_compile,
- ACTION_NAMES.cpp_compile,
- ACTION_NAMES.cpp_header_parsing,
- ACTION_NAMES.cpp_module_compile,
- ACTION_NAMES.cpp_module_codegen,
- ACTION_NAMES.lto_backend,
- ACTION_NAMES.clif_match,
- ],
- flag_groups = ([flag_group(flags = cxx_flags)] if cxx_flags else []),
- ),
- ],
- )
-
- default_link_flags_feature = feature(
- name = "default_link_flags",
- enabled = True,
- flag_sets = [
- flag_set(
- actions = all_link_actions,
- flag_groups = ([flag_group(flags = link_flags)] if link_flags else []),
- ),
- flag_set(
- actions = all_link_actions,
- flag_groups = ([flag_group(flags = opt_link_flags)] if opt_link_flags else []),
- with_features = [with_feature_set(features = ["opt"])],
- ),
- ],
- )
-
- dbg_feature = feature(name = "dbg")
-
- opt_feature = feature(name = "opt")
-
- sysroot_feature = feature(
- name = "sysroot",
- enabled = True,
- flag_sets = [
- flag_set(
- actions = [
- ACTION_NAMES.preprocess_assemble,
- ACTION_NAMES.linkstamp_compile,
- ACTION_NAMES.c_compile,
- ACTION_NAMES.cpp_compile,
- ACTION_NAMES.cpp_header_parsing,
- ACTION_NAMES.cpp_module_compile,
- ACTION_NAMES.cpp_module_codegen,
- ACTION_NAMES.lto_backend,
- ACTION_NAMES.clif_match,
- ACTION_NAMES.cpp_link_executable,
- ACTION_NAMES.cpp_link_dynamic_library,
- ACTION_NAMES.cpp_link_nodeps_dynamic_library,
- ],
- flag_groups = [
- flag_group(
- flags = ["--sysroot=%{sysroot}"],
- expand_if_available = "sysroot",
- ),
- ],
- ),
- ],
- )
-
- fdo_optimize_feature = feature(
- name = "fdo_optimize",
- flag_sets = [
- flag_set(
- actions = [ACTION_NAMES.c_compile, ACTION_NAMES.cpp_compile],
- flag_groups = [
- flag_group(
- flags = [
- "-fprofile-use=%{fdo_profile_path}",
- "-fprofile-correction",
- ],
- expand_if_available = "fdo_profile_path",
- ),
- ],
- ),
- ],
- provides = ["profile"],
- )
-
- supports_dynamic_linker_feature = feature(name = "supports_dynamic_linker", enabled = True)
-
- user_compile_flags_feature = feature(
- name = "user_compile_flags",
- enabled = True,
- flag_sets = [
- flag_set(
- actions = [
- ACTION_NAMES.assemble,
- ACTION_NAMES.preprocess_assemble,
- ACTION_NAMES.linkstamp_compile,
- ACTION_NAMES.c_compile,
- ACTION_NAMES.cpp_compile,
- ACTION_NAMES.cpp_header_parsing,
- ACTION_NAMES.cpp_module_compile,
- ACTION_NAMES.cpp_module_codegen,
- ACTION_NAMES.lto_backend,
- ACTION_NAMES.clif_match,
- ],
- flag_groups = [
- flag_group(
- flags = ["%{user_compile_flags}"],
- iterate_over = "user_compile_flags",
- expand_if_available = "user_compile_flags",
- ),
- ],
- ),
- ],
- )
-
- unfiltered_compile_flags_feature = feature(
- name = "unfiltered_compile_flags",
- enabled = True,
- flag_sets = [
- flag_set(
- actions = [
- ACTION_NAMES.assemble,
- ACTION_NAMES.preprocess_assemble,
- ACTION_NAMES.linkstamp_compile,
- ACTION_NAMES.c_compile,
- ACTION_NAMES.cpp_compile,
- ACTION_NAMES.cpp_header_parsing,
- ACTION_NAMES.cpp_module_compile,
- ACTION_NAMES.cpp_module_codegen,
- ACTION_NAMES.lto_backend,
- ACTION_NAMES.clif_match,
- ],
- flag_groups = ([flag_group(flags = unfiltered_compile_flags)] if unfiltered_compile_flags else []),
- ),
- ],
- )
-
- features = windows_features + [
- supports_pic_feature,
- default_compile_flags_feature,
- default_link_flags_feature,
- fdo_optimize_feature,
- supports_dynamic_linker_feature,
- dbg_feature,
- opt_feature,
- user_compile_flags_feature,
- sysroot_feature,
- unfiltered_compile_flags_feature,
- ]
-
- artifact_name_patterns = [
- artifact_name_pattern(category_name = "executable", prefix = "", extension = ".exe"),
- ]
-
- make_variables = []
-
- return cc_common.create_cc_toolchain_config_info(
- ctx = ctx,
- features = features,
- action_configs = action_configs,
- artifact_name_patterns = artifact_name_patterns,
- cxx_builtin_include_directories = cxx_builtin_include_directories,
- toolchain_identifier = "msys_x64",
- host_system_name = "local",
- target_system_name = "local",
- target_cpu = "x64_windows",
- target_libc = "msys",
- compiler = "msys-gcc",
- abi_version = "local",
- abi_libc_version = "local",
- tool_paths = tool_paths,
- make_variables = make_variables,
- builtin_sysroot = "",
- cc_target_os = None,
- )
-
-cc_toolchain_config = rule(
- implementation = _impl,
- attrs = {
- "cpu": attr.string(mandatory = True),
- "compiler": attr.string(),
- },
- provides = [CcToolchainConfigInfo],
-)
diff --git a/third_party/toolchains/bazel_0.23.2_rbe_windows/dummy_toolchain.bzl b/third_party/toolchains/bazel_0.23.2_rbe_windows/dummy_toolchain.bzl
deleted file mode 100644
index 45c0285..0000000
--- a/third_party/toolchains/bazel_0.23.2_rbe_windows/dummy_toolchain.bzl
+++ /dev/null
@@ -1,23 +0,0 @@
-# pylint: disable=g-bad-file-header
-# Copyright 2017 The Bazel Authors. All rights reserved.
-#
-# 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.
-
-"""Skylark rule that stubs a toolchain."""
-
-def _dummy_toolchain_impl(ctx):
- ctx = ctx # unused argument
- toolchain = platform_common.ToolchainInfo()
- return [toolchain]
-
-dummy_toolchain = rule(_dummy_toolchain_impl, attrs = {})
diff --git a/tools/dockerfile/distribtest/node_ubuntu1204_x64/Dockerfile b/tools/dockerfile/distribtest/node_ubuntu1204_x64/Dockerfile
deleted file mode 100644
index da16fe2..0000000
--- a/tools/dockerfile/distribtest/node_ubuntu1204_x64/Dockerfile
+++ /dev/null
@@ -1,21 +0,0 @@
-# Copyright 2016 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.
-
-FROM ubuntu:12.04
-
-RUN apt-get update && apt-get install -y curl
-
-# Install nvm
-RUN touch .profile
-RUN curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.30.2/install.sh | bash
\ No newline at end of file
diff --git a/tools/dockerfile/distribtest/node_wheezy_x64/Dockerfile b/tools/dockerfile/distribtest/node_wheezy_x64/Dockerfile
deleted file mode 100644
index 4be0503..0000000
--- a/tools/dockerfile/distribtest/node_wheezy_x64/Dockerfile
+++ /dev/null
@@ -1,21 +0,0 @@
-# Copyright 2016 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.
-
-FROM debian:wheezy
-
-RUN apt-get update && apt-get install -y curl
-
-# Install nvm
-RUN touch .profile
-RUN curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.30.2/install.sh | bash
\ No newline at end of file
diff --git a/tools/dockerfile/distribtest/python_dev_fedora22_x64/Dockerfile b/tools/dockerfile/distribtest/python_dev_fedora22_x64/Dockerfile
deleted file mode 100644
index d86ad37..0000000
--- a/tools/dockerfile/distribtest/python_dev_fedora22_x64/Dockerfile
+++ /dev/null
@@ -1,23 +0,0 @@
-# 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.
-
-FROM fedora:22
-
-RUN yum clean all && yum update -y && yum install -y python python-pip
-RUN pip install virtualenv
-
-RUN yum groupinstall -y "Development Tools"
-RUN yum install -y redhat-rpm-config
-RUN yum install -y gcc-c++
-RUN yum install -y python2-devel
diff --git a/tools/dockerfile/distribtest/python_fedora20_x64/Dockerfile b/tools/dockerfile/distribtest/python_fedora20_x64/Dockerfile
deleted file mode 100644
index c1f0973..0000000
--- a/tools/dockerfile/distribtest/python_fedora20_x64/Dockerfile
+++ /dev/null
@@ -1,24 +0,0 @@
-# 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.
-
-FROM fedora:20
-
-RUN yum clean all && yum update -y && yum install -y python python-pip
-
-# Upgrading six would fail because of docker issue when using overlay.
-# Trying twice makes it work fine.
-# https://github.com/docker/docker/issues/10180
-RUN pip install --upgrade six || pip install --upgrade six
-
-RUN pip install virtualenv
diff --git a/tools/dockerfile/distribtest/python_fedora21_x64/Dockerfile b/tools/dockerfile/distribtest/python_fedora21_x64/Dockerfile
deleted file mode 100644
index 66acccb..0000000
--- a/tools/dockerfile/distribtest/python_fedora21_x64/Dockerfile
+++ /dev/null
@@ -1,29 +0,0 @@
-# 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.
-
-FROM fedora:21
-
-# Make yum work properly under docker when using overlay storage driver.
-# https://bugzilla.redhat.com/show_bug.cgi?id=1213602#c9
-# https://github.com/docker/docker/issues/10180
-RUN yum install -y yum-plugin-ovl
-
-RUN yum clean all && yum update -y && yum install -y python python-pip
-
-# Upgrading six would fail because of docker issue when using overlay.
-# Trying twice makes it work fine.
-# https://github.com/docker/docker/issues/10180
-RUN pip2 install --upgrade six || pip2 install --upgrade six
-
-RUN pip2 install virtualenv
diff --git a/tools/dockerfile/distribtest/python_fedora22_x64/Dockerfile b/tools/dockerfile/distribtest/python_fedora22_x64/Dockerfile
deleted file mode 100644
index 41ac0b3..0000000
--- a/tools/dockerfile/distribtest/python_fedora22_x64/Dockerfile
+++ /dev/null
@@ -1,18 +0,0 @@
-# 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.
-
-FROM fedora:22
-
-RUN yum clean all && yum update -y && yum install -y python python-pip
-RUN pip install virtualenv
diff --git a/tools/dockerfile/distribtest/python_ubuntu1204_x64/Dockerfile b/tools/dockerfile/distribtest/python_ubuntu1204_x64/Dockerfile
deleted file mode 100644
index 7dd499f..0000000
--- a/tools/dockerfile/distribtest/python_ubuntu1204_x64/Dockerfile
+++ /dev/null
@@ -1,21 +0,0 @@
-# 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.
-
-FROM ubuntu:12.04
-
-RUN apt-get update -y && apt-get install -y python python-pip
-
-# Use --index-url to workaround
-# https://stackoverflow.com/questions/21294997/pip-connection-failure-cannot-fetch-index-base-url-http-pypi-python-org-simpl
-RUN pip install --index-url=https://pypi.python.org/simple/ virtualenv
diff --git a/tools/dockerfile/distribtest/python_wheezy_x64/Dockerfile b/tools/dockerfile/distribtest/python_wheezy_x64/Dockerfile
deleted file mode 100644
index c17d7bc..0000000
--- a/tools/dockerfile/distribtest/python_wheezy_x64/Dockerfile
+++ /dev/null
@@ -1,21 +0,0 @@
-# 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.
-
-FROM debian:wheezy
-
-RUN apt-get update -y && apt-get install -y python python-pip
-
-# Use --index-url to workaround
-# https://stackoverflow.com/questions/21294997/pip-connection-failure-cannot-fetch-index-base-url-http-pypi-python-org-simpl
-RUN pip install --index-url=https://pypi.python.org/simple/ virtualenv
diff --git a/tools/dockerfile/distribtest/ruby_fedora20_x64/Dockerfile b/tools/dockerfile/distribtest/ruby_fedora20_x64/Dockerfile
deleted file mode 100644
index 73a4bd7..0000000
--- a/tools/dockerfile/distribtest/ruby_fedora20_x64/Dockerfile
+++ /dev/null
@@ -1,36 +0,0 @@
-# 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.
-
-FROM fedora:20
-
-# distro-sync and install openssl, per https://github.com/fedora-cloud/docker-brew-fedora/issues/19
-RUN yum clean all && yum update -y && yum distro-sync -y && yum install -y openssl gnupg which findutils
-
-# Install rvm
-RUN gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
-RUN curl -sSL https://get.rvm.io | bash -s stable
-
-# Install Ruby 2.3
-# Running the installation twice to work around docker issue when using overlay.
-# https://github.com/docker/docker/issues/10180
-RUN (/bin/bash -l -c "rvm install ruby-2.3.8") || (/bin/bash -l -c "rvm install ruby-2.3.8")
-RUN /bin/bash -l -c "rvm use --default ruby-2.3.8"
-RUN /bin/bash -l -c "echo 'gem: --no-document' > ~/.gemrc"
-RUN /bin/bash -l -c "echo 'export PATH=/usr/local/rvm/bin:$PATH' >> ~/.bashrc"
-RUN /bin/bash -l -c "echo 'rvm --default use ruby-2.3.8' >> ~/.bashrc"
-RUN /bin/bash -l -c "gem install bundler -v 1.17.3 --no-document"
-
-RUN mkdir /var/local/jenkins
-
-RUN /bin/bash -l -c "echo '. /etc/profile.d/rvm.sh' >> ~/.bashrc"
diff --git a/tools/dockerfile/distribtest/ruby_fedora21_x64/Dockerfile b/tools/dockerfile/distribtest/ruby_fedora21_x64/Dockerfile
deleted file mode 100644
index 43c0ae5..0000000
--- a/tools/dockerfile/distribtest/ruby_fedora21_x64/Dockerfile
+++ /dev/null
@@ -1,39 +0,0 @@
-# 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.
-
-FROM fedora:21
-
-# Make yum work properly under docker when using overlay storage driver.
-# https://bugzilla.redhat.com/show_bug.cgi?id=1213602#c9
-# https://github.com/docker/docker/issues/10180
-RUN yum install -y yum-plugin-ovl
-
-# distro-sync and install openssl, per https://github.com/fedora-cloud/docker-brew-fedora/issues/19
-RUN yum clean all && yum update -y && yum distro-sync -y && yum install -y openssl gnupg which findutils tar
-
-# Install rvm
-RUN gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
-RUN curl -sSL https://get.rvm.io | bash -s stable
-
-# Install Ruby 2.3
-RUN /bin/bash -l -c "rvm install ruby-2.3.8"
-RUN /bin/bash -l -c "rvm use --default ruby-2.3.8"
-RUN /bin/bash -l -c "echo 'gem: --no-document' > ~/.gemrc"
-RUN /bin/bash -l -c "echo 'export PATH=/usr/local/rvm/bin:$PATH' >> ~/.bashrc"
-RUN /bin/bash -l -c "echo 'rvm --default use ruby-2.3.8' >> ~/.bashrc"
-RUN /bin/bash -l -c "gem install bundler -v 1.17.3 --no-document"
-
-RUN mkdir /var/local/jenkins
-
-RUN /bin/bash -l -c "echo '. /etc/profile.d/rvm.sh' >> ~/.bashrc"
diff --git a/tools/dockerfile/distribtest/ruby_fedora22_x64/Dockerfile b/tools/dockerfile/distribtest/ruby_fedora22_x64/Dockerfile
deleted file mode 100644
index e077f68..0000000
--- a/tools/dockerfile/distribtest/ruby_fedora22_x64/Dockerfile
+++ /dev/null
@@ -1,39 +0,0 @@
-# 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.
-
-FROM fedora:22
-
-# Make yum work properly under docker when using overlay storage driver.
-# https://bugzilla.redhat.com/show_bug.cgi?id=1213602#c9
-# https://github.com/docker/docker/issues/10180
-RUN yum install -y yum-plugin-ovl
-
-# distro-sync and install openssl, per https://github.com/fedora-cloud/docker-brew-fedora/issues/19
-RUN yum clean all && yum update -y && yum distro-sync -y && yum install -y openssl gnupg which findutils tar procps
-
-# Install rvm
-RUN gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
-RUN curl -sSL https://get.rvm.io | bash -s stable
-
-# Install Ruby 2.3
-RUN /bin/bash -l -c "rvm install ruby-2.3.8"
-RUN /bin/bash -l -c "rvm use --default ruby-2.3.8"
-RUN /bin/bash -l -c "echo 'gem: --no-document' > ~/.gemrc"
-RUN /bin/bash -l -c "echo 'export PATH=/usr/local/rvm/bin:$PATH' >> ~/.bashrc"
-RUN /bin/bash -l -c "echo 'rvm --default use ruby-2.3.8' >> ~/.bashrc"
-RUN /bin/bash -l -c "gem install bundler -v 1.17.3 --no-document"
-
-RUN mkdir /var/local/jenkins
-
-RUN /bin/bash -l -c "echo '. /etc/profile.d/rvm.sh' >> ~/.bashrc"
diff --git a/tools/dockerfile/distribtest/ruby_ubuntu1204_x64/Dockerfile b/tools/dockerfile/distribtest/ruby_ubuntu1204_x64/Dockerfile
deleted file mode 100644
index 0b0478c..0000000
--- a/tools/dockerfile/distribtest/ruby_ubuntu1204_x64/Dockerfile
+++ /dev/null
@@ -1,24 +0,0 @@
-# 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.
-
-FROM ubuntu:12.04
-
-RUN apt-get update -y && apt-get install -y curl
-
-# Install rvm
-RUN gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
-RUN \curl -sSL https://get.rvm.io | bash -s stable --ruby
-
-RUN /bin/bash -l -c "echo '. /etc/profile.d/rvm.sh' >> ~/.bashrc"
-RUN /bin/bash -l -c "gem install --update bundler"
diff --git a/tools/dockerfile/distribtest/ruby_wheezy_x64/Dockerfile b/tools/dockerfile/distribtest/ruby_wheezy_x64/Dockerfile
deleted file mode 100644
index ad60849..0000000
--- a/tools/dockerfile/distribtest/ruby_wheezy_x64/Dockerfile
+++ /dev/null
@@ -1,26 +0,0 @@
-# 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.
-
-FROM debian:wheezy
-
-RUN apt-get update && apt-get install -y curl
-
-RUN apt-get update && apt-get install -y procps
-
-# Install rvm
-RUN gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
-RUN \curl -sSL https://get.rvm.io | bash -s stable --ruby
-
-RUN /bin/bash -l -c "echo '. /etc/profile.d/rvm.sh' >> ~/.bashrc"
-RUN /bin/bash -l -c "gem install --update bundler"
diff --git a/tools/dockerfile/test/bazel/Dockerfile b/tools/dockerfile/test/bazel/Dockerfile
index 25fcf3e..e671ad6 100644
--- a/tools/dockerfile/test/bazel/Dockerfile
+++ b/tools/dockerfile/test/bazel/Dockerfile
@@ -27,6 +27,7 @@
autoconf \
build-essential \
curl \
+ wget \
libtool \
make \
openjdk-8-jdk \
@@ -48,6 +49,27 @@
RUN pip install futures==2.2.0 enum34==1.0.4 protobuf==3.5.2.post1 six==1.10.0 twisted==17.5.0
+#=================
+# Compile CPython 3.6.9 from source
+
+RUN apt-get update && apt-get install -y zlib1g-dev libssl-dev
+RUN apt-get update && apt-get install -y jq build-essential libffi-dev
+
+RUN cd /tmp && \
+ wget -q https://www.python.org/ftp/python/3.6.9/Python-3.6.9.tgz && \
+ tar xzvf Python-3.6.9.tgz && \
+ cd Python-3.6.9 && \
+ ./configure && \
+ make install
+
+RUN cd /tmp && \
+ echo "ff7cdaef4846c89c1ec0d7b709bbd54d Python-3.6.9.tgz" > checksum.md5 && \
+ md5sum -c checksum.md5
+
+RUN python3.6 -m ensurepip && \
+ python3.6 -m pip install coverage
+
+
#========================
# Bazel installation
diff --git a/tools/internal_ci/linux/grpc_bazel_rbe_asan.cfg b/tools/internal_ci/linux/grpc_bazel_rbe_asan.cfg
index 21afbd0..abfc486 100644
--- a/tools/internal_ci/linux/grpc_bazel_rbe_asan.cfg
+++ b/tools/internal_ci/linux/grpc_bazel_rbe_asan.cfg
@@ -16,7 +16,7 @@
# Location of the continuous shell script in repository.
build_file: "grpc/tools/internal_ci/linux/grpc_asan_on_foundry.sh"
-timeout_mins: 60
+timeout_mins: 90
gfile_resources: "/bigstore/grpc-testing-secrets/gcp_credentials/GrpcTesting-d0eeee2db331.json"
gfile_resources: "/bigstore/grpc-testing-secrets/gcp_credentials/resultstore_api_key"
diff --git a/tools/internal_ci/linux/grpc_bazel_rbe_dbg.cfg b/tools/internal_ci/linux/grpc_bazel_rbe_dbg.cfg
index e80321b..607b2e5 100644
--- a/tools/internal_ci/linux/grpc_bazel_rbe_dbg.cfg
+++ b/tools/internal_ci/linux/grpc_bazel_rbe_dbg.cfg
@@ -16,7 +16,7 @@
# Location of the continuous shell script in repository.
build_file: "grpc/tools/internal_ci/linux/grpc_bazel_on_foundry_dbg.sh"
-timeout_mins: 60
+timeout_mins: 90
gfile_resources: "/bigstore/grpc-testing-secrets/gcp_credentials/GrpcTesting-d0eeee2db331.json"
gfile_resources: "/bigstore/grpc-testing-secrets/gcp_credentials/resultstore_api_key"
diff --git a/tools/internal_ci/linux/grpc_bazel_rbe_incompatible_changes.cfg b/tools/internal_ci/linux/grpc_bazel_rbe_incompatible_changes.cfg
index ee88339..fdd7324 100644
--- a/tools/internal_ci/linux/grpc_bazel_rbe_incompatible_changes.cfg
+++ b/tools/internal_ci/linux/grpc_bazel_rbe_incompatible_changes.cfg
@@ -16,7 +16,7 @@
# Location of the continuous shell script in repository.
build_file: "grpc/tools/internal_ci/linux/grpc_bazel_rbe_incompatible_changes.sh"
-timeout_mins: 60
+timeout_mins: 90
gfile_resources: "/bigstore/grpc-testing-secrets/gcp_credentials/GrpcTesting-d0eeee2db331.json"
gfile_resources: "/bigstore/grpc-testing-secrets/gcp_credentials/resultstore_api_key"
diff --git a/tools/internal_ci/linux/grpc_bazel_rbe_msan.cfg b/tools/internal_ci/linux/grpc_bazel_rbe_msan.cfg
index be939bb..9803647 100644
--- a/tools/internal_ci/linux/grpc_bazel_rbe_msan.cfg
+++ b/tools/internal_ci/linux/grpc_bazel_rbe_msan.cfg
@@ -16,7 +16,7 @@
# Location of the continuous shell script in repository.
build_file: "grpc/tools/internal_ci/linux/grpc_msan_on_foundry.sh"
-timeout_mins: 60
+timeout_mins: 90
gfile_resources: "/bigstore/grpc-testing-secrets/gcp_credentials/GrpcTesting-d0eeee2db331.json"
gfile_resources: "/bigstore/grpc-testing-secrets/gcp_credentials/resultstore_api_key"
diff --git a/tools/internal_ci/linux/grpc_bazel_rbe_opt.cfg b/tools/internal_ci/linux/grpc_bazel_rbe_opt.cfg
index 48a6d91..e34e041 100644
--- a/tools/internal_ci/linux/grpc_bazel_rbe_opt.cfg
+++ b/tools/internal_ci/linux/grpc_bazel_rbe_opt.cfg
@@ -16,7 +16,7 @@
# Location of the continuous shell script in repository.
build_file: "grpc/tools/internal_ci/linux/grpc_bazel_on_foundry_opt.sh"
-timeout_mins: 60
+timeout_mins: 90
gfile_resources: "/bigstore/grpc-testing-secrets/gcp_credentials/GrpcTesting-d0eeee2db331.json"
gfile_resources: "/bigstore/grpc-testing-secrets/gcp_credentials/resultstore_api_key"
diff --git a/tools/internal_ci/linux/grpc_bazel_rbe_tsan.cfg b/tools/internal_ci/linux/grpc_bazel_rbe_tsan.cfg
index f45a4c2..4877981 100644
--- a/tools/internal_ci/linux/grpc_bazel_rbe_tsan.cfg
+++ b/tools/internal_ci/linux/grpc_bazel_rbe_tsan.cfg
@@ -16,7 +16,7 @@
# Location of the continuous shell script in repository.
build_file: "grpc/tools/internal_ci/linux/grpc_tsan_on_foundry.sh"
-timeout_mins: 60
+timeout_mins: 90
gfile_resources: "/bigstore/grpc-testing-secrets/gcp_credentials/GrpcTesting-d0eeee2db331.json"
gfile_resources: "/bigstore/grpc-testing-secrets/gcp_credentials/resultstore_api_key"
diff --git a/tools/internal_ci/linux/grpc_bazel_rbe_ubsan.cfg b/tools/internal_ci/linux/grpc_bazel_rbe_ubsan.cfg
index f0cf94a..1c72b91 100644
--- a/tools/internal_ci/linux/grpc_bazel_rbe_ubsan.cfg
+++ b/tools/internal_ci/linux/grpc_bazel_rbe_ubsan.cfg
@@ -16,7 +16,7 @@
# Location of the continuous shell script in repository.
build_file: "grpc/tools/internal_ci/linux/grpc_ubsan_on_foundry.sh"
-timeout_mins: 60
+timeout_mins: 90
gfile_resources: "/bigstore/grpc-testing-secrets/gcp_credentials/GrpcTesting-d0eeee2db331.json"
gfile_resources: "/bigstore/grpc-testing-secrets/gcp_credentials/resultstore_api_key"
diff --git a/tools/internal_ci/linux/pull_request/grpc_bazel_rbe_asan.cfg b/tools/internal_ci/linux/pull_request/grpc_bazel_rbe_asan.cfg
index f978c73..b8aada2 100644
--- a/tools/internal_ci/linux/pull_request/grpc_bazel_rbe_asan.cfg
+++ b/tools/internal_ci/linux/pull_request/grpc_bazel_rbe_asan.cfg
@@ -16,7 +16,7 @@
# Location of the continuous shell script in repository.
build_file: "grpc/tools/internal_ci/linux/pull_request/grpc_asan_on_foundry.sh"
-timeout_mins: 60
+timeout_mins: 90
gfile_resources: "/bigstore/grpc-testing-secrets/gcp_credentials/GrpcTesting-d0eeee2db331.json"
gfile_resources: "/bigstore/grpc-testing-secrets/gcp_credentials/resultstore_api_key"
diff --git a/tools/internal_ci/linux/pull_request/grpc_bazel_rbe_dbg.cfg b/tools/internal_ci/linux/pull_request/grpc_bazel_rbe_dbg.cfg
index ab47a30..38efccf 100644
--- a/tools/internal_ci/linux/pull_request/grpc_bazel_rbe_dbg.cfg
+++ b/tools/internal_ci/linux/pull_request/grpc_bazel_rbe_dbg.cfg
@@ -16,7 +16,7 @@
# Location of the continuous shell script in repository.
build_file: "grpc/tools/internal_ci/linux/pull_request/grpc_bazel_on_foundry_dbg.sh"
-timeout_mins: 60
+timeout_mins: 90
gfile_resources: "/bigstore/grpc-testing-secrets/gcp_credentials/GrpcTesting-d0eeee2db331.json"
gfile_resources: "/bigstore/grpc-testing-secrets/gcp_credentials/resultstore_api_key"
diff --git a/tools/internal_ci/linux/pull_request/grpc_bazel_rbe_msan.cfg b/tools/internal_ci/linux/pull_request/grpc_bazel_rbe_msan.cfg
index 24b19f2..14b97b6 100644
--- a/tools/internal_ci/linux/pull_request/grpc_bazel_rbe_msan.cfg
+++ b/tools/internal_ci/linux/pull_request/grpc_bazel_rbe_msan.cfg
@@ -16,7 +16,7 @@
# Location of the continuous shell script in repository.
build_file: "grpc/tools/internal_ci/linux/pull_request/grpc_msan_on_foundry.sh"
-timeout_mins: 60
+timeout_mins: 90
gfile_resources: "/bigstore/grpc-testing-secrets/gcp_credentials/GrpcTesting-d0eeee2db331.json"
gfile_resources: "/bigstore/grpc-testing-secrets/gcp_credentials/resultstore_api_key"
diff --git a/tools/internal_ci/linux/pull_request/grpc_bazel_rbe_opt.cfg b/tools/internal_ci/linux/pull_request/grpc_bazel_rbe_opt.cfg
index 65395f0..f352113 100644
--- a/tools/internal_ci/linux/pull_request/grpc_bazel_rbe_opt.cfg
+++ b/tools/internal_ci/linux/pull_request/grpc_bazel_rbe_opt.cfg
@@ -16,7 +16,7 @@
# Location of the continuous shell script in repository.
build_file: "grpc/tools/internal_ci/linux/pull_request/grpc_bazel_on_foundry_opt.sh"
-timeout_mins: 60
+timeout_mins: 90
gfile_resources: "/bigstore/grpc-testing-secrets/gcp_credentials/GrpcTesting-d0eeee2db331.json"
gfile_resources: "/bigstore/grpc-testing-secrets/gcp_credentials/resultstore_api_key"
diff --git a/tools/internal_ci/linux/pull_request/grpc_bazel_rbe_tsan.cfg b/tools/internal_ci/linux/pull_request/grpc_bazel_rbe_tsan.cfg
index cf65606..993024f 100644
--- a/tools/internal_ci/linux/pull_request/grpc_bazel_rbe_tsan.cfg
+++ b/tools/internal_ci/linux/pull_request/grpc_bazel_rbe_tsan.cfg
@@ -16,7 +16,7 @@
# Location of the continuous shell script in repository.
build_file: "grpc/tools/internal_ci/linux/pull_request/grpc_tsan_on_foundry.sh"
-timeout_mins: 60
+timeout_mins: 90
gfile_resources: "/bigstore/grpc-testing-secrets/gcp_credentials/GrpcTesting-d0eeee2db331.json"
gfile_resources: "/bigstore/grpc-testing-secrets/gcp_credentials/resultstore_api_key"
diff --git a/tools/internal_ci/linux/pull_request/grpc_bazel_rbe_ubsan.cfg b/tools/internal_ci/linux/pull_request/grpc_bazel_rbe_ubsan.cfg
index a943b89..282aa55 100644
--- a/tools/internal_ci/linux/pull_request/grpc_bazel_rbe_ubsan.cfg
+++ b/tools/internal_ci/linux/pull_request/grpc_bazel_rbe_ubsan.cfg
@@ -16,7 +16,7 @@
# Location of the continuous shell script in repository.
build_file: "grpc/tools/internal_ci/linux/pull_request/grpc_ubsan_on_foundry.sh"
-timeout_mins: 60
+timeout_mins: 90
gfile_resources: "/bigstore/grpc-testing-secrets/gcp_credentials/GrpcTesting-d0eeee2db331.json"
gfile_resources: "/bigstore/grpc-testing-secrets/gcp_credentials/resultstore_api_key"
diff --git a/tools/internal_ci/windows/grpc_bazel_rbe_dbg.cfg b/tools/internal_ci/windows/grpc_bazel_rbe_dbg.cfg
index b720e10..6e7fdc8 100644
--- a/tools/internal_ci/windows/grpc_bazel_rbe_dbg.cfg
+++ b/tools/internal_ci/windows/grpc_bazel_rbe_dbg.cfg
@@ -17,7 +17,7 @@
# Location of the continuous shell script in repository.
build_file: "grpc/tools/internal_ci/windows/bazel_rbe.bat"
-timeout_mins: 60
+timeout_mins: 90
gfile_resources: "/bigstore/grpc-testing-secrets/gcp_credentials/GrpcTesting-d0eeee2db331.json"
gfile_resources: "/bigstore/grpc-testing-secrets/gcp_credentials/resultstore_api_key"
diff --git a/tools/internal_ci/windows/grpc_bazel_rbe_opt.cfg b/tools/internal_ci/windows/grpc_bazel_rbe_opt.cfg
index 7f6bd4f..b1a1de0 100644
--- a/tools/internal_ci/windows/grpc_bazel_rbe_opt.cfg
+++ b/tools/internal_ci/windows/grpc_bazel_rbe_opt.cfg
@@ -17,7 +17,7 @@
# Location of the continuous shell script in repository.
build_file: "grpc/tools/internal_ci/windows/bazel_rbe.bat"
-timeout_mins: 60
+timeout_mins: 90
gfile_resources: "/bigstore/grpc-testing-secrets/gcp_credentials/GrpcTesting-d0eeee2db331.json"
gfile_resources: "/bigstore/grpc-testing-secrets/gcp_credentials/resultstore_api_key"
diff --git a/tools/internal_ci/windows/pull_request/grpc_bazel_rbe_dbg.cfg b/tools/internal_ci/windows/pull_request/grpc_bazel_rbe_dbg.cfg
index 71470d4..7735f76 100644
--- a/tools/internal_ci/windows/pull_request/grpc_bazel_rbe_dbg.cfg
+++ b/tools/internal_ci/windows/pull_request/grpc_bazel_rbe_dbg.cfg
@@ -17,7 +17,7 @@
# Location of the continuous shell script in repository.
build_file: "grpc/tools/internal_ci/windows/bazel_rbe.bat"
-timeout_mins: 60
+timeout_mins: 90
gfile_resources: "/bigstore/grpc-testing-secrets/gcp_credentials/GrpcTesting-d0eeee2db331.json"
gfile_resources: "/bigstore/grpc-testing-secrets/gcp_credentials/resultstore_api_key"
diff --git a/tools/internal_ci/windows/pull_request/grpc_bazel_rbe_opt.cfg b/tools/internal_ci/windows/pull_request/grpc_bazel_rbe_opt.cfg
index 120e149..df17148 100644
--- a/tools/internal_ci/windows/pull_request/grpc_bazel_rbe_opt.cfg
+++ b/tools/internal_ci/windows/pull_request/grpc_bazel_rbe_opt.cfg
@@ -17,7 +17,7 @@
# Location of the continuous shell script in repository.
build_file: "grpc/tools/internal_ci/windows/bazel_rbe.bat"
-timeout_mins: 60
+timeout_mins: 90
gfile_resources: "/bigstore/grpc-testing-secrets/gcp_credentials/GrpcTesting-d0eeee2db331.json"
gfile_resources: "/bigstore/grpc-testing-secrets/gcp_credentials/resultstore_api_key"
diff --git a/tools/remote_build/rbe_common.bazelrc b/tools/remote_build/rbe_common.bazelrc
index 568e7ae..371243d 100644
--- a/tools/remote_build/rbe_common.bazelrc
+++ b/tools/remote_build/rbe_common.bazelrc
@@ -30,7 +30,6 @@
build --strategy=Javac=remote
build --strategy=Closure=remote
build --genrule_strategy=remote
-build --remote_timeout=3600
build --remote_instance_name=projects/grpc-testing/instances/default_instance
diff --git a/tools/remote_build/windows.bazelrc b/tools/remote_build/windows.bazelrc
index 196f99f..d920608 100644
--- a/tools/remote_build/windows.bazelrc
+++ b/tools/remote_build/windows.bazelrc
@@ -24,7 +24,6 @@
build --strategy=Javac=remote
build --strategy=Closure=remote
build --genrule_strategy=remote
-build --remote_timeout=3600
build --remote_instance_name=projects/grpc-testing/instances/grpc-windows-rbe-test
diff --git a/tools/run_tests/artifacts/distribtest_targets.py b/tools/run_tests/artifacts/distribtest_targets.py
index c85a4b7..403a858 100644
--- a/tools/run_tests/artifacts/distribtest_targets.py
+++ b/tools/run_tests/artifacts/distribtest_targets.py
@@ -315,42 +315,31 @@
CSharpDistribTest('macos', 'x86'),
CSharpDistribTest('windows', 'x86'),
CSharpDistribTest('windows', 'x64'),
- PythonDistribTest('linux', 'x64', 'wheezy'),
PythonDistribTest('linux', 'x64', 'jessie'),
PythonDistribTest('linux', 'x86', 'jessie'),
PythonDistribTest('linux', 'x64', 'centos6'),
PythonDistribTest('linux', 'x64', 'centos7'),
- PythonDistribTest('linux', 'x64', 'fedora20'),
- PythonDistribTest('linux', 'x64', 'fedora21'),
- PythonDistribTest('linux', 'x64', 'fedora22'),
PythonDistribTest('linux', 'x64', 'fedora23'),
PythonDistribTest('linux', 'x64', 'opensuse'),
PythonDistribTest('linux', 'x64', 'arch'),
- PythonDistribTest('linux', 'x64', 'ubuntu1204'),
PythonDistribTest('linux', 'x64', 'ubuntu1404'),
PythonDistribTest('linux', 'x64', 'ubuntu1604'),
PythonDistribTest('linux', 'x64', 'alpine3.7', source=True),
PythonDistribTest('linux', 'x64', 'jessie', source=True),
PythonDistribTest('linux', 'x86', 'jessie', source=True),
PythonDistribTest('linux', 'x64', 'centos7', source=True),
- PythonDistribTest('linux', 'x64', 'fedora22', source=True),
PythonDistribTest('linux', 'x64', 'fedora23', source=True),
PythonDistribTest('linux', 'x64', 'arch', source=True),
PythonDistribTest('linux', 'x64', 'ubuntu1404', source=True),
PythonDistribTest('linux', 'x64', 'ubuntu1604', source=True),
- RubyDistribTest('linux', 'x64', 'wheezy'),
RubyDistribTest('linux', 'x64', 'jessie', ruby_version='ruby_2_3'),
RubyDistribTest('linux', 'x64', 'jessie', ruby_version='ruby_2_4'),
RubyDistribTest('linux', 'x64', 'jessie', ruby_version='ruby_2_5'),
RubyDistribTest('linux', 'x64', 'jessie', ruby_version='ruby_2_6'),
RubyDistribTest('linux', 'x64', 'centos6'),
RubyDistribTest('linux', 'x64', 'centos7'),
- RubyDistribTest('linux', 'x64', 'fedora20'),
- RubyDistribTest('linux', 'x64', 'fedora21'),
- RubyDistribTest('linux', 'x64', 'fedora22'),
RubyDistribTest('linux', 'x64', 'fedora23'),
RubyDistribTest('linux', 'x64', 'opensuse'),
- RubyDistribTest('linux', 'x64', 'ubuntu1204'),
RubyDistribTest('linux', 'x64', 'ubuntu1404'),
RubyDistribTest('linux', 'x64', 'ubuntu1604'),
PHPDistribTest('linux', 'x64', 'jessie'),