alts_concurrent_connectivity_test.cc
Go to the documentation of this file.
1 /*
2  *
3  * Copyright 2018 gRPC authors.
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  */
18 
20 
21 #include <fcntl.h>
22 #include <netinet/in.h>
23 #include <stdlib.h>
24 #include <string.h>
25 #include <sys/socket.h>
26 #include <sys/stat.h>
27 #include <sys/types.h>
28 #include <unistd.h>
29 
30 #include <functional>
31 #include <set>
32 #include <thread>
33 
34 #include <gmock/gmock.h>
35 
36 #include "absl/memory/memory.h"
37 #include "absl/strings/str_cat.h"
38 
39 #include <grpc/grpc.h>
40 #include <grpc/grpc_security.h>
41 #include <grpc/slice.h>
42 #include <grpc/support/alloc.h>
43 #include <grpc/support/log.h>
45 #include <grpc/support/time.h>
47 #include <grpcpp/server_builder.h>
48 
51 #include "src/core/lib/gprpp/thd.h"
60 #include "test/core/util/port.h"
62 
63 namespace {
64 
65 const int kFakeHandshakeServerMaxConcurrentStreams = 40;
66 
68  grpc_event ev;
69  do {
72  } while (ev.type != GRPC_QUEUE_SHUTDOWN);
73 }
74 
75 grpc_channel* create_secure_channel_for_test(
76  const char* server_addr, const char* fake_handshake_server_addr,
77  int reconnect_backoff_ms) {
78  grpc_alts_credentials_options* alts_options =
80  grpc_channel_credentials* channel_creds =
82  fake_handshake_server_addr,
83  true /* enable_untrusted_alts */);
85  // The main goal of these tests are to stress concurrent ALTS handshakes,
86  // so we prevent subchnannel sharing.
87  std::vector<grpc_arg> new_args;
88  new_args.push_back(grpc_channel_arg_integer_create(
89  const_cast<char*>(GRPC_ARG_USE_LOCAL_SUBCHANNEL_POOL), true));
90  if (reconnect_backoff_ms != 0) {
91  new_args.push_back(grpc_channel_arg_integer_create(
92  const_cast<char*>("grpc.testing.fixed_reconnect_backoff_ms"),
93  reconnect_backoff_ms));
94  }
95  grpc_channel_args* channel_args =
96  grpc_channel_args_copy_and_add(nullptr, new_args.data(), new_args.size());
98  grpc_channel_create(server_addr, channel_creds, channel_args);
99  grpc_channel_args_destroy(channel_args);
100  grpc_channel_credentials_release(channel_creds);
101  return channel;
102 }
103 
104 class FakeHandshakeServer {
105  public:
106  explicit FakeHandshakeServer(bool check_num_concurrent_rpcs) {
108  address_ = grpc_core::JoinHostPort("localhost", port);
109  if (check_num_concurrent_rpcs) {
111  CreateFakeHandshakerService(kFakeHandshakeServerMaxConcurrentStreams /* expected max concurrent rpcs */);
112  } else {
114  0 /* expected max concurrent rpcs unset */);
115  }
117  builder.AddListeningPort(address_.c_str(),
119  builder.RegisterService(service_.get());
120  // TODO(apolcyn): when removing the global concurrent handshake limiting
121  // queue, set MAX_CONCURRENT_STREAMS on this server.
122  server_ = builder.BuildAndStart();
123  gpr_log(GPR_INFO, "Fake handshaker server listening on %s",
124  address_.c_str());
125  }
126 
127  ~FakeHandshakeServer() {
129  }
130 
131  const char* address() { return address_.c_str(); }
132 
133  private:
135  std::unique_ptr<grpc::Service> service_;
136  std::unique_ptr<grpc::Server> server_;
137 };
138 
139 class TestServer {
140  public:
141  explicit TestServer()
142  : fake_handshake_server_(true /* check num concurrent rpcs */) {
143  grpc_alts_credentials_options* alts_options =
145  grpc_server_credentials* server_creds =
147  alts_options, fake_handshake_server_.address(),
148  true /* enable_untrusted_alts */);
150  server_ = grpc_server_create(nullptr, nullptr);
151  server_cq_ = grpc_completion_queue_create_for_next(nullptr);
152  grpc_server_register_completion_queue(server_, server_cq_, nullptr);
154  server_addr_ = grpc_core::JoinHostPort("localhost", port);
155  GPR_ASSERT(grpc_server_add_http2_port(server_, server_addr_.c_str(),
156  server_creds));
157  grpc_server_credentials_release(server_creds);
159  gpr_log(GPR_DEBUG, "Start TestServer %p. listen on %s", this,
160  server_addr_.c_str());
161  server_thd_ = absl::make_unique<std::thread>(PollUntilShutdown, this);
162  }
163 
164  ~TestServer() {
165  gpr_log(GPR_DEBUG, "Begin dtor of TestServer %p", this);
166  grpc_server_shutdown_and_notify(server_, server_cq_, this);
167  server_thd_->join();
169  grpc_completion_queue_shutdown(server_cq_);
170  drain_cq(server_cq_);
171  grpc_completion_queue_destroy(server_cq_);
172  }
173 
174  const char* address() { return server_addr_.c_str(); }
175 
176  static void PollUntilShutdown(const TestServer* self) {
178  self->server_cq_, gpr_inf_future(GPR_CLOCK_REALTIME), nullptr);
180  GPR_ASSERT(ev.tag == self);
181  gpr_log(GPR_DEBUG, "TestServer %p stop polling", self);
182  }
183 
184  private:
186  grpc_completion_queue* server_cq_;
187  std::unique_ptr<std::thread> server_thd_;
188  std::string server_addr_;
189  // Give this test server its own ALTS handshake server
190  // so that we avoid competing for ALTS handshake server resources (e.g.
191  // available HTTP2 streams on a globally shared handshaker subchannel)
192  // with clients that are trying to do mutual ALTS handshakes
193  // with this server (which could "deadlock" mutual handshakes).
194  // TODO(apolcyn): remove this workaround from this test and have
195  // clients/servers share a single fake handshake server if
196  // the underlying issue needs to be fixed.
197  FakeHandshakeServer fake_handshake_server_;
198 };
199 
200 class ConnectLoopRunner {
201  public:
202  explicit ConnectLoopRunner(
203  const char* server_address, const char* fake_handshake_server_addr,
204  int per_connect_deadline_seconds, size_t loops,
205  grpc_connectivity_state expected_connectivity_states,
206  int reconnect_backoff_ms)
208  fake_handshake_server_addr_(
209  grpc_core::UniquePtr<char>(gpr_strdup(fake_handshake_server_addr))),
210  per_connect_deadline_seconds_(per_connect_deadline_seconds),
211  loops_(loops),
212  expected_connectivity_states_(expected_connectivity_states),
213  reconnect_backoff_ms_(reconnect_backoff_ms) {
214  thd_ = absl::make_unique<std::thread>(ConnectLoop, this);
215  }
216 
217  ~ConnectLoopRunner() { thd_->join(); }
218 
219  static void ConnectLoop(const ConnectLoopRunner* self) {
220  for (size_t i = 0; i < self->loops_; i++) {
221  gpr_log(GPR_DEBUG, "runner:%p connect_loop begin loop %ld", self, i);
224  grpc_channel* channel = create_secure_channel_for_test(
225  self->server_address_.get(), self->fake_handshake_server_addr_.get(),
226  self->reconnect_backoff_ms_);
227  // Connect, forcing an ALTS handshake
228  gpr_timespec connect_deadline =
229  grpc_timeout_seconds_to_deadline(self->per_connect_deadline_seconds_);
233  while (state != self->expected_connectivity_states_) {
234  if (self->expected_connectivity_states_ ==
236  ASSERT_NE(state, GRPC_CHANNEL_READY); // sanity check
237  } else {
238  ASSERT_EQ(self->expected_connectivity_states_, GRPC_CHANNEL_READY);
239  }
242  grpc_event ev =
243  grpc_completion_queue_next(cq, connect_deadline, nullptr);
245  << "connect_loop runner:" << std::hex << self
246  << " got ev.type:" << ev.type << " i:" << i;
247  ASSERT_TRUE(ev.success);
248  grpc_connectivity_state prev_state = state;
250  if (self->expected_connectivity_states_ ==
252  prev_state == GRPC_CHANNEL_CONNECTING &&
254  // Detect a race in state checking: if the watch_connectivity_state
255  // completed from prior state "connecting", this could be because the
256  // channel momentarily entered state "transient failure", which is
257  // what we want. However, if the channel immediately re-enters
258  // "connecting" state, then the new state check might still result in
259  // "connecting". A continuous repeat of this can cause this loop to
260  // never terminate in time. So take this scenario to indicate that the
261  // channel momentarily entered transient failure.
262  break;
263  }
264  }
267  drain_cq(cq);
269  gpr_log(GPR_DEBUG, "runner:%p connect_loop finished loop %ld", self, i);
270  }
271  }
272 
273  private:
275  grpc_core::UniquePtr<char> fake_handshake_server_addr_;
276  int per_connect_deadline_seconds_;
277  size_t loops_;
278  grpc_connectivity_state expected_connectivity_states_;
279  std::unique_ptr<std::thread> thd_;
280  int reconnect_backoff_ms_;
281 };
282 
283 // Perform a few ALTS handshakes sequentially (using the fake, in-process ALTS
284 // handshake server).
285 TEST(AltsConcurrentConnectivityTest, TestBasicClientServerHandshakes) {
286  FakeHandshakeServer fake_handshake_server(
287  true /* check num concurrent rpcs */);
288  TestServer test_server;
289  {
290  ConnectLoopRunner runner(
291  test_server.address(), fake_handshake_server.address(),
292  5 /* per connect deadline seconds */, 10 /* loops */,
293  GRPC_CHANNEL_READY /* expected connectivity states */,
294  0 /* reconnect_backoff_ms unset */);
295  }
296 }
297 
298 /* Run a bunch of concurrent ALTS handshakes on concurrent channels
299  * (using the fake, in-process handshake server). */
300 TEST(AltsConcurrentConnectivityTest, TestConcurrentClientServerHandshakes) {
301  FakeHandshakeServer fake_handshake_server(
302  true /* check num concurrent rpcs */);
303  // Test
304  {
305  TestServer test_server;
307  size_t num_concurrent_connects = 50;
308  std::vector<std::unique_ptr<ConnectLoopRunner>> connect_loop_runners;
310  "start performing concurrent expected-to-succeed connects");
311  for (size_t i = 0; i < num_concurrent_connects; i++) {
312  connect_loop_runners.push_back(absl::make_unique<ConnectLoopRunner>(
313  test_server.address(), fake_handshake_server.address(),
314  15 /* per connect deadline seconds */, 5 /* loops */,
315  GRPC_CHANNEL_READY /* expected connectivity states */,
316  0 /* reconnect_backoff_ms unset */));
317  }
318  connect_loop_runners.clear();
320  "done performing concurrent expected-to-succeed connects");
322  gpr_log(GPR_DEBUG, "Test took longer than expected.");
323  abort();
324  }
325  }
326 }
327 
328 /* This test is intended to make sure that ALTS handshakes we correctly
329  * fail fast when the security handshaker gets an error while reading
330  * from the remote peer, after having earlier sent the first bytes of the
331  * ALTS handshake to the peer, i.e. after getting into the middle of a
332  * handshake. */
333 TEST(AltsConcurrentConnectivityTest,
334  TestHandshakeFailsFastWhenPeerEndpointClosesConnectionAfterAccepting) {
335  // Don't enforce the number of concurrent rpcs for the fake handshake
336  // server in this test, because this test will involve handshake RPCs
337  // getting cancelled. Because there isn't explicit synchronization between
338  // an ALTS handshake client's RECV_STATUS op completing after call
339  // cancellation, and the corresponding fake handshake server's sync
340  // method handler returning, enforcing a limit on the number of active
341  // RPCs at the fake handshake server would be inherently racey.
342  FakeHandshakeServer fake_handshake_server(
343  false /* check num concurrent rpcs */);
344  // The fake_backend_server emulates a secure (ALTS based) gRPC backend. So
345  // it waits for the client to send the first bytes.
346  grpc_core::testing::FakeUdpAndTcpServer fake_backend_server(
348  kWaitForClientToSendFirstBytes,
350  CloseSocketUponReceivingBytesFromPeer);
351  {
353  std::vector<std::unique_ptr<ConnectLoopRunner>> connect_loop_runners;
354  size_t num_concurrent_connects = 100;
355  gpr_log(GPR_DEBUG, "start performing concurrent expected-to-fail connects");
356  for (size_t i = 0; i < num_concurrent_connects; i++) {
357  connect_loop_runners.push_back(absl::make_unique<ConnectLoopRunner>(
358  fake_backend_server.address(), fake_handshake_server.address(),
359  10 /* per connect deadline seconds */, 3 /* loops */,
360  GRPC_CHANNEL_TRANSIENT_FAILURE /* expected connectivity states */,
361  0 /* reconnect_backoff_ms unset */));
362  }
363  connect_loop_runners.clear();
364  gpr_log(GPR_DEBUG, "done performing concurrent expected-to-fail connects");
367  "Exceeded test deadline. ALTS handshakes might not be failing "
368  "fast when the peer endpoint closes the connection abruptly");
369  abort();
370  }
371  }
372 }
373 
374 /* This test is intended to make sure that ALTS handshakes correctly
375  * fail fast when the ALTS handshake server fails incoming handshakes fast. */
376 TEST(AltsConcurrentConnectivityTest,
377  TestHandshakeFailsFastWhenHandshakeServerClosesConnectionAfterAccepting) {
378  // The fake_handshake_server emulates a broken ALTS handshaker, which
379  // is an insecure server. So send settings to the client eagerly.
380  grpc_core::testing::FakeUdpAndTcpServer fake_handshake_server(
383  CloseSocketUponReceivingBytesFromPeer);
384  // The fake_backend_server emulates a secure (ALTS based) server, so wait
385  // for the client to send the first bytes.
386  grpc_core::testing::FakeUdpAndTcpServer fake_backend_server(
388  kWaitForClientToSendFirstBytes,
390  {
392  std::vector<std::unique_ptr<ConnectLoopRunner>> connect_loop_runners;
393  size_t num_concurrent_connects = 100;
394  gpr_log(GPR_DEBUG, "start performing concurrent expected-to-fail connects");
395  for (size_t i = 0; i < num_concurrent_connects; i++) {
396  connect_loop_runners.push_back(absl::make_unique<ConnectLoopRunner>(
397  fake_backend_server.address(), fake_handshake_server.address(),
398  20 /* per connect deadline seconds */, 2 /* loops */,
399  GRPC_CHANNEL_TRANSIENT_FAILURE /* expected connectivity states */,
400  0 /* reconnect_backoff_ms unset */));
401  }
402  connect_loop_runners.clear();
403  gpr_log(GPR_DEBUG, "done performing concurrent expected-to-fail connects");
406  "Exceeded test deadline. ALTS handshakes might not be failing "
407  "fast when the handshake server closes new connections");
408  abort();
409  }
410  }
411 }
412 
413 /* This test is intended to make sure that ALTS handshakes correctly
414  * fail fast when the ALTS handshake server is non-responsive, in which case
415  * the overall connection deadline kicks in. */
416 TEST(AltsConcurrentConnectivityTest,
417  TestHandshakeFailsFastWhenHandshakeServerHangsAfterAccepting) {
418  // fake_handshake_server emulates an insecure server, so send settings first.
419  // It will be unresponsive for the rest of the connection, though.
420  grpc_core::testing::FakeUdpAndTcpServer fake_handshake_server(
423  // fake_backend_server emulates an ALTS based server, so wait for the client
424  // to send the first bytes.
425  grpc_core::testing::FakeUdpAndTcpServer fake_backend_server(
427  kWaitForClientToSendFirstBytes,
429  {
431  std::vector<std::unique_ptr<ConnectLoopRunner>> connect_loop_runners;
432  size_t num_concurrent_connects = 100;
433  gpr_log(GPR_DEBUG, "start performing concurrent expected-to-fail connects");
434  for (size_t i = 0; i < num_concurrent_connects; i++) {
435  connect_loop_runners.push_back(absl::make_unique<ConnectLoopRunner>(
436  fake_backend_server.address(), fake_handshake_server.address(),
437  10 /* per connect deadline seconds */, 2 /* loops */,
438  GRPC_CHANNEL_TRANSIENT_FAILURE /* expected connectivity states */,
439  100 /* reconnect_backoff_ms */));
440  }
441  connect_loop_runners.clear();
442  gpr_log(GPR_DEBUG, "done performing concurrent expected-to-fail connects");
445  "Exceeded test deadline. ALTS handshakes might not be failing "
446  "fast when the handshake server is non-response timeout occurs");
447  abort();
448  }
449  }
450 }
451 
452 } // namespace
453 
454 int main(int argc, char** argv) {
455  ::testing::InitGoogleTest(&argc, argv);
456  grpc::testing::TestEnvironment env(&argc, argv);
457  grpc_init();
458  auto result = RUN_ALL_TESTS();
459  grpc_shutdown();
460  return result;
461 }
grpc_alts_credentials_options_destroy
GRPCAPI void grpc_alts_credentials_options_destroy(grpc_alts_credentials_options *options)
Definition: grpc_alts_credentials_options.cc:38
_gevent_test_main.result
result
Definition: _gevent_test_main.py:96
GPR_INFO
#define GPR_INFO
Definition: include/grpc/impl/codegen/log.h:56
ASSERT_NE
#define ASSERT_NE(val1, val2)
Definition: bloaty/third_party/googletest/googletest/include/gtest/gtest.h:2060
GRPC_CHANNEL_READY
@ GRPC_CHANNEL_READY
Definition: include/grpc/impl/codegen/connectivity_state.h:36
grpc::gcp::CreateFakeHandshakerService
std::unique_ptr< grpc::Service > CreateFakeHandshakerService(int expected_max_concurrent_rpcs)
Definition: fake_handshaker_server.cc:283
grpc_timeout_seconds_to_deadline
gpr_timespec grpc_timeout_seconds_to_deadline(int64_t time_s)
Definition: test/core/util/test_config.cc:81
log.h
port.h
generate.env
env
Definition: generate.py:37
slice.h
grpc_core
Definition: call_metric_recorder.h:31
grpc_alts_credentials_create_customized
grpc_channel_credentials * grpc_alts_credentials_create_customized(const grpc_alts_credentials_options *options, const char *handshaker_service_url, bool enable_untrusted_alts)
Definition: alts_credentials.cc:92
service_type.h
_gevent_test_main.runner
runner
Definition: _gevent_test_main.py:94
string.h
grpc_channel_check_connectivity_state
GRPCAPI grpc_connectivity_state grpc_channel_check_connectivity_state(grpc_channel *channel, int try_to_connect)
Definition: channel_connectivity.cc:56
test_server
Definition: test_server.py:1
useful.h
testing::internal::string
::std::string string
Definition: bloaty/third_party/protobuf/third_party/googletest/googletest/include/gtest/internal/gtest-port.h:881
address_
ServerAddress address_
Definition: ring_hash.cc:194
GRPC_QUEUE_SHUTDOWN
@ GRPC_QUEUE_SHUTDOWN
Definition: grpc_types.h:554
GRPC_OP_COMPLETE
@ GRPC_OP_COMPLETE
Definition: grpc_types.h:558
GRPC_CHANNEL_TRANSIENT_FAILURE
@ GRPC_CHANNEL_TRANSIENT_FAILURE
Definition: include/grpc/impl/codegen/connectivity_state.h:38
grpc_server_create
GRPCAPI grpc_server * grpc_server_create(const grpc_channel_args *args, void *reserved)
Definition: src/core/lib/surface/server.cc:1456
grpc_server_register_completion_queue
GRPCAPI void grpc_server_register_completion_queue(grpc_server *server, grpc_completion_queue *cq, void *reserved)
Definition: src/core/lib/surface/server.cc:1466
gpr_inf_future
GPRAPI gpr_timespec gpr_inf_future(gpr_clock_type type)
Definition: src/core/lib/gpr/time.cc:55
GRPC_ARG_USE_LOCAL_SUBCHANNEL_POOL
#define GRPC_ARG_USE_LOCAL_SUBCHANNEL_POOL
Definition: grpc_types.h:443
fake_handshaker_server.h
time.h
grpc_security.h
credentials.h
grpc_channel_args
Definition: grpc_types.h:132
server_address
std::string server_address("0.0.0.0:10000")
true
#define true
Definition: setup_once.h:324
server_
Server *const server_
Definition: chttp2_server.cc:260
grpc_connectivity_state
grpc_connectivity_state
Definition: include/grpc/impl/codegen/connectivity_state.h:30
alts_security_connector.h
string_util.h
profile_analyzer.builder
builder
Definition: profile_analyzer.py:159
channel
wrapped_grpc_channel * channel
Definition: src/php/ext/grpc/call.h:33
grpc_alts_credentials_client_options_create
GRPCAPI grpc_alts_credentials_options * grpc_alts_credentials_client_options_create(void)
Definition: grpc_alts_credentials_client_options.cc:73
GPR_ASSERT
#define GPR_ASSERT(x)
Definition: include/grpc/impl/codegen/log.h:94
gpr_time_cmp
GPRAPI int gpr_time_cmp(gpr_timespec a, gpr_timespec b)
Definition: src/core/lib/gpr/time.cc:30
TEST
#define TEST(name, init_size,...)
Definition: arena_test.cc:75
grpc_server_credentials_release
GRPCAPI void grpc_server_credentials_release(grpc_server_credentials *creds)
Definition: credentials.cc:95
grpc::ServerBuilder
A builder class for the creation and startup of grpc::Server instances.
Definition: grpcpp/server_builder.h:86
grpc_server_add_http2_port
GRPCAPI int grpc_server_add_http2_port(grpc_server *server, const char *addr, grpc_server_credentials *creds)
Definition: chttp2_server.cc:1029
grpc_timeout_milliseconds_to_deadline
gpr_timespec grpc_timeout_milliseconds_to_deadline(int64_t time_ms)
Definition: test/core/util/test_config.cc:89
gpr_log
GPRAPI void gpr_log(const char *file, int line, gpr_log_severity severity, const char *format,...) GPR_PRINT_FORMAT_CHECK(4
grpc_event
Definition: grpc_types.h:564
grpc_completion_queue
Definition: completion_queue.cc:347
grpc_core::testing::FakeUdpAndTcpServer
Definition: fake_udp_and_tcp_server.h:72
grpc.h
grpc_core::JoinHostPort
std::string JoinHostPort(absl::string_view host, int port)
Definition: host_port.cc:32
GRPC_CHANNEL_IDLE
@ GRPC_CHANNEL_IDLE
Definition: include/grpc/impl/codegen/connectivity_state.h:32
grpc_channel_args_destroy
void grpc_channel_args_destroy(grpc_channel_args *a)
Definition: channel_args.cc:360
GPR_CLOCK_MONOTONIC
@ GPR_CLOCK_MONOTONIC
Definition: gpr_types.h:36
grpc_server
struct grpc_server grpc_server
Definition: grpc_types.h:65
error.h
grpc_server_destroy
GRPCAPI void grpc_server_destroy(grpc_server *server)
Definition: src/core/lib/surface/server.cc:1519
host_port.h
tests.unit.test_common.test_server
def test_server(max_workers=10, reuse_port=False)
Definition: test_common.py:103
RUN_ALL_TESTS
int RUN_ALL_TESTS() GTEST_MUST_USE_RESULT_
Definition: bloaty/third_party/googletest/googletest/include/gtest/gtest.h:2471
GPR_ERROR
#define GPR_ERROR
Definition: include/grpc/impl/codegen/log.h:57
grpc_core::testing::FakeUdpAndTcpServer::AcceptMode
AcceptMode
Definition: fake_udp_and_tcp_server.h:79
grpc_pick_unused_port_or_die
int grpc_pick_unused_port_or_die(void)
fake_udp_and_tcp_server.h
gpr_now
GPRAPI gpr_timespec gpr_now(gpr_clock_type clock)
grpc_core::UniquePtr
std::unique_ptr< T, DefaultDeleteChar > UniquePtr
Definition: src/core/lib/gprpp/memory.h:43
GRPC_CHANNEL_CONNECTING
@ GRPC_CHANNEL_CONNECTING
Definition: include/grpc/impl/codegen/connectivity_state.h:34
tests.unit._exit_scenarios.port
port
Definition: _exit_scenarios.py:179
test_config.h
grpc_channel_credentials_release
GRPCAPI void grpc_channel_credentials_release(grpc_channel_credentials *creds)
Definition: credentials.cc:36
grpc_server_credentials
Definition: src/core/lib/security/credentials/credentials.h:259
alts_credentials.h
grpc_alts_credentials_options
Definition: grpc_alts_credentials_options.h:35
grpc_channel_create
GRPCAPI grpc_channel * grpc_channel_create(const char *target, grpc_channel_credentials *creds, const grpc_channel_args *args)
Definition: chttp2_connector.cc:366
grpc_alts_credentials_server_options_create
GRPCAPI grpc_alts_credentials_options * grpc_alts_credentials_server_options_create(void)
Definition: grpc_alts_credentials_server_options.cc:36
testing::InitGoogleTest
GTEST_API_ void InitGoogleTest(int *argc, char **argv)
Definition: bloaty/third_party/googletest/googletest/src/gtest.cc:6106
grpc_channel_arg_integer_create
grpc_arg grpc_channel_arg_integer_create(char *name, int value)
Definition: channel_args.cc:484
cq_verifier.h
grpc_core::testing::FakeUdpAndTcpServer::AcceptMode::kEagerlySendSettings
@ kEagerlySendSettings
grpc_completion_queue_destroy
GRPCAPI void grpc_completion_queue_destroy(grpc_completion_queue *cq)
Definition: completion_queue.cc:1424
alloc.h
grpc::testing::TestEnvironment
Definition: test/core/util/test_config.h:54
thd.h
grpc_server_shutdown_and_notify
GRPCAPI void grpc_server_shutdown_and_notify(grpc_server *server, grpc_completion_queue *cq, void *tag)
Definition: src/core/lib/surface/server.cc:1503
grpc_completion_queue_next
GRPCAPI grpc_event grpc_completion_queue_next(grpc_completion_queue *cq, gpr_timespec deadline, void *reserved)
Definition: completion_queue.cc:1133
ASSERT_TRUE
#define ASSERT_TRUE(condition)
Definition: bloaty/third_party/googletest/googletest/include/gtest/gtest.h:1973
grpc_completion_queue_shutdown
GRPCAPI void grpc_completion_queue_shutdown(grpc_completion_queue *cq)
Definition: completion_queue.cc:1416
grpc_channel_destroy
GRPCAPI void grpc_channel_destroy(grpc_channel *channel)
Definition: channel.cc:437
state
Definition: bloaty/third_party/zlib/contrib/blast/blast.c:41
main
int main(int argc, char **argv)
Definition: alts_concurrent_connectivity_test.cc:454
server_address_
const char * server_address_
Definition: settings_timeout_test.cc:231
grpc_channel
struct grpc_channel grpc_channel
Definition: grpc_types.h:62
grpc_channel_watch_connectivity_state
GRPCAPI void grpc_channel_watch_connectivity_state(grpc_channel *channel, grpc_connectivity_state last_observed_state, gpr_timespec deadline, grpc_completion_queue *cq, void *tag)
Definition: channel_connectivity.cc:227
grpc::InsecureServerCredentials
std::shared_ptr< ServerCredentials > InsecureServerCredentials()
Definition: insecure_server_credentials.cc:52
grpc_core::testing::FakeUdpAndTcpServer::CloseSocketUponCloseFromPeer
static ProcessReadResult CloseSocketUponCloseFromPeer(int bytes_received_size, int read_error, int s)
Definition: fake_udp_and_tcp_server.cc:179
gpr_strdup
GPRAPI char * gpr_strdup(const char *src)
Definition: string.cc:39
GPR_DEBUG
#define GPR_DEBUG
Definition: include/grpc/impl/codegen/log.h:55
grpc_alts_server_credentials_create_customized
grpc_server_credentials * grpc_alts_server_credentials_create_customized(const grpc_alts_credentials_options *options, const char *handshaker_service_url, bool enable_untrusted_alts)
Definition: alts_credentials.cc:101
grpc_completion_queue_create_for_next
GRPCAPI grpc_completion_queue * grpc_completion_queue_create_for_next(void *reserved)
Definition: completion_queue_factory.cc:62
gpr_timespec
Definition: gpr_types.h:50
grpc_event::type
grpc_completion_type type
Definition: grpc_types.h:566
grpc_init
GRPCAPI void grpc_init(void)
Definition: init.cc:146
grpc_server_start
GRPCAPI void grpc_server_start(grpc_server *server)
Definition: src/core/lib/surface/server.cc:1497
test_deadline
static gpr_timespec test_deadline(void)
Definition: dns_resolver_cooldown_test.cc:143
self
PHP_PROTO_OBJECT_FREE_END PHP_PROTO_OBJECT_DTOR_END intern self
Definition: bloaty/third_party/protobuf/php/ext/google/protobuf/map.c:543
GPR_CLOCK_REALTIME
@ GPR_CLOCK_REALTIME
Definition: gpr_types.h:39
grpc_event::success
int success
Definition: grpc_types.h:572
grpc_shutdown
GRPCAPI void grpc_shutdown(void)
Definition: init.cc:209
grpc_channel_credentials
Definition: src/core/lib/security/credentials/credentials.h:96
grpc::testing::drain_cq
static void drain_cq(grpc_completion_queue *cq)
Definition: h2_ssl_cert_test.cc:271
grpc_event::tag
void * tag
Definition: grpc_types.h:576
server_builder.h
cq
static grpc_completion_queue * cq
Definition: test/core/fling/client.cc:37
grpc_channel_args_copy_and_add
grpc_channel_args * grpc_channel_args_copy_and_add(const grpc_channel_args *src, const grpc_arg *to_add, size_t num_to_add)
Definition: channel_args.cc:224
slice_string_helpers.h
i
uint64_t i
Definition: abseil-cpp/absl/container/btree_benchmark.cc:230
state
static struct rpc_state state
Definition: bad_server_response_test.cc:87
service_
std::unique_ptr< grpc::testing::TestServiceImpl > service_
Definition: end2end_binder_transport_test.cc:71
ASSERT_EQ
#define ASSERT_EQ(val1, val2)
Definition: bloaty/third_party/googletest/googletest/include/gtest/gtest.h:2056
port_platform.h


grpc
Author(s):
autogenerated on Thu Mar 13 2025 02:58:30