Merge remote-tracking branch 'upstream/master' into security_handshaker1

reviewable/pr8782/r1
Mark D. Roth 8 years ago
commit fda46e3db6
  1. 8
      BUILD
  2. 3
      CMakeLists.txt
  3. 6
      Makefile
  4. 1
      binding.gyp
  5. 2
      build.yaml
  6. 1
      config.m4
  7. 3
      gRPC-Core.podspec
  8. 2
      grpc.gemspec
  9. 2
      include/grpc/impl/codegen/connectivity_state.h
  10. 2
      package.xml
  11. 4
      src/core/ext/client_channel/client_channel.c
  12. 6
      src/core/ext/client_channel/subchannel.c
  13. 4
      src/core/ext/client_channel/subchannel.h
  14. 26
      src/core/ext/lb_policy/grpclb/grpclb.c
  15. 2
      src/core/ext/lb_policy/pick_first/pick_first.c
  16. 313
      src/core/ext/lb_policy/round_robin/round_robin.c
  17. 8
      src/core/ext/transport/chttp2/transport/chttp2_transport.c
  18. 3
      src/core/ext/transport/chttp2/transport/parsing.c
  19. 5
      src/core/lib/channel/channel_stack.c
  20. 3
      src/core/lib/channel/channel_stack.h
  21. 2076
      src/core/lib/iomgr/ev_poll_and_epoll_posix.c
  22. 41
      src/core/lib/iomgr/ev_poll_and_epoll_posix.h
  23. 2
      src/core/lib/iomgr/ev_posix.c
  24. 45
      src/core/lib/security/credentials/jwt/jwt_credentials.c
  25. 33
      src/core/lib/security/credentials/oauth2/oauth2_credentials.c
  26. 12
      src/core/lib/surface/call.c
  27. 3
      src/core/lib/transport/connectivity_state.c
  28. 7
      src/core/lib/transport/metadata.c
  29. 4
      src/core/lib/transport/metadata.h
  30. 16
      src/node/src/common.js
  31. 1
      src/python/grpcio/grpc_core_dependencies.py
  32. 7
      test/core/channel/channel_stack_test.c
  33. 337
      test/core/client_channel/lb_policies_test.c
  34. 8
      test/core/end2end/end2end_nosec_tests.c
  35. 8
      test/core/end2end/end2end_tests.c
  36. 1
      test/core/end2end/gen_build_yaml.py
  37. 359
      test/core/end2end/tests/filter_latency.c
  38. 31
      test/core/network_benchmarks/low_level_ping_pong.c
  39. 4
      test/cpp/util/grpc_tool_test.cc
  40. 5
      tools/distrib/python/grpcio_tools/grpc/tools/command.py
  41. 2
      tools/doxygen/Doxyfile.core.internal
  42. 1
      tools/lsan_suppressions.txt
  43. 5
      tools/run_tests/build_stats_schema_no_matrix.json
  44. 33
      tools/run_tests/run_build_statistics.py
  45. 2
      tools/run_tests/run_tests.py
  46. 5
      tools/run_tests/sources_and_headers.json
  47. 738
      tools/run_tests/tests.json
  48. 3
      vsprojects/vcxproj/grpc/grpc.vcxproj
  49. 6
      vsprojects/vcxproj/grpc/grpc.vcxproj.filters
  50. 3
      vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj
  51. 6
      vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters
  52. 3
      vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj
  53. 6
      vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters
  54. 2
      vsprojects/vcxproj/test/end2end/tests/end2end_nosec_tests/end2end_nosec_tests.vcxproj
  55. 3
      vsprojects/vcxproj/test/end2end/tests/end2end_nosec_tests/end2end_nosec_tests.vcxproj.filters
  56. 2
      vsprojects/vcxproj/test/end2end/tests/end2end_tests/end2end_tests.vcxproj
  57. 3
      vsprojects/vcxproj/test/end2end/tests/end2end_tests/end2end_tests.vcxproj.filters

@ -179,7 +179,6 @@ cc_library(
"src/core/lib/iomgr/endpoint_pair.h", "src/core/lib/iomgr/endpoint_pair.h",
"src/core/lib/iomgr/error.h", "src/core/lib/iomgr/error.h",
"src/core/lib/iomgr/ev_epoll_linux.h", "src/core/lib/iomgr/ev_epoll_linux.h",
"src/core/lib/iomgr/ev_poll_and_epoll_posix.h",
"src/core/lib/iomgr/ev_poll_posix.h", "src/core/lib/iomgr/ev_poll_posix.h",
"src/core/lib/iomgr/ev_posix.h", "src/core/lib/iomgr/ev_posix.h",
"src/core/lib/iomgr/exec_ctx.h", "src/core/lib/iomgr/exec_ctx.h",
@ -355,7 +354,6 @@ cc_library(
"src/core/lib/iomgr/endpoint_pair_windows.c", "src/core/lib/iomgr/endpoint_pair_windows.c",
"src/core/lib/iomgr/error.c", "src/core/lib/iomgr/error.c",
"src/core/lib/iomgr/ev_epoll_linux.c", "src/core/lib/iomgr/ev_epoll_linux.c",
"src/core/lib/iomgr/ev_poll_and_epoll_posix.c",
"src/core/lib/iomgr/ev_poll_posix.c", "src/core/lib/iomgr/ev_poll_posix.c",
"src/core/lib/iomgr/ev_posix.c", "src/core/lib/iomgr/ev_posix.c",
"src/core/lib/iomgr/exec_ctx.c", "src/core/lib/iomgr/exec_ctx.c",
@ -615,7 +613,6 @@ cc_library(
"src/core/lib/iomgr/endpoint_pair.h", "src/core/lib/iomgr/endpoint_pair.h",
"src/core/lib/iomgr/error.h", "src/core/lib/iomgr/error.h",
"src/core/lib/iomgr/ev_epoll_linux.h", "src/core/lib/iomgr/ev_epoll_linux.h",
"src/core/lib/iomgr/ev_poll_and_epoll_posix.h",
"src/core/lib/iomgr/ev_poll_posix.h", "src/core/lib/iomgr/ev_poll_posix.h",
"src/core/lib/iomgr/ev_posix.h", "src/core/lib/iomgr/ev_posix.h",
"src/core/lib/iomgr/exec_ctx.h", "src/core/lib/iomgr/exec_ctx.h",
@ -776,7 +773,6 @@ cc_library(
"src/core/lib/iomgr/endpoint_pair_windows.c", "src/core/lib/iomgr/endpoint_pair_windows.c",
"src/core/lib/iomgr/error.c", "src/core/lib/iomgr/error.c",
"src/core/lib/iomgr/ev_epoll_linux.c", "src/core/lib/iomgr/ev_epoll_linux.c",
"src/core/lib/iomgr/ev_poll_and_epoll_posix.c",
"src/core/lib/iomgr/ev_poll_posix.c", "src/core/lib/iomgr/ev_poll_posix.c",
"src/core/lib/iomgr/ev_posix.c", "src/core/lib/iomgr/ev_posix.c",
"src/core/lib/iomgr/exec_ctx.c", "src/core/lib/iomgr/exec_ctx.c",
@ -1006,7 +1002,6 @@ cc_library(
"src/core/lib/iomgr/endpoint_pair.h", "src/core/lib/iomgr/endpoint_pair.h",
"src/core/lib/iomgr/error.h", "src/core/lib/iomgr/error.h",
"src/core/lib/iomgr/ev_epoll_linux.h", "src/core/lib/iomgr/ev_epoll_linux.h",
"src/core/lib/iomgr/ev_poll_and_epoll_posix.h",
"src/core/lib/iomgr/ev_poll_posix.h", "src/core/lib/iomgr/ev_poll_posix.h",
"src/core/lib/iomgr/ev_posix.h", "src/core/lib/iomgr/ev_posix.h",
"src/core/lib/iomgr/exec_ctx.h", "src/core/lib/iomgr/exec_ctx.h",
@ -1159,7 +1154,6 @@ cc_library(
"src/core/lib/iomgr/endpoint_pair_windows.c", "src/core/lib/iomgr/endpoint_pair_windows.c",
"src/core/lib/iomgr/error.c", "src/core/lib/iomgr/error.c",
"src/core/lib/iomgr/ev_epoll_linux.c", "src/core/lib/iomgr/ev_epoll_linux.c",
"src/core/lib/iomgr/ev_poll_and_epoll_posix.c",
"src/core/lib/iomgr/ev_poll_posix.c", "src/core/lib/iomgr/ev_poll_posix.c",
"src/core/lib/iomgr/ev_posix.c", "src/core/lib/iomgr/ev_posix.c",
"src/core/lib/iomgr/exec_ctx.c", "src/core/lib/iomgr/exec_ctx.c",
@ -2021,7 +2015,6 @@ objc_library(
"src/core/lib/iomgr/endpoint_pair_windows.c", "src/core/lib/iomgr/endpoint_pair_windows.c",
"src/core/lib/iomgr/error.c", "src/core/lib/iomgr/error.c",
"src/core/lib/iomgr/ev_epoll_linux.c", "src/core/lib/iomgr/ev_epoll_linux.c",
"src/core/lib/iomgr/ev_poll_and_epoll_posix.c",
"src/core/lib/iomgr/ev_poll_posix.c", "src/core/lib/iomgr/ev_poll_posix.c",
"src/core/lib/iomgr/ev_posix.c", "src/core/lib/iomgr/ev_posix.c",
"src/core/lib/iomgr/exec_ctx.c", "src/core/lib/iomgr/exec_ctx.c",
@ -2260,7 +2253,6 @@ objc_library(
"src/core/lib/iomgr/endpoint_pair.h", "src/core/lib/iomgr/endpoint_pair.h",
"src/core/lib/iomgr/error.h", "src/core/lib/iomgr/error.h",
"src/core/lib/iomgr/ev_epoll_linux.h", "src/core/lib/iomgr/ev_epoll_linux.h",
"src/core/lib/iomgr/ev_poll_and_epoll_posix.h",
"src/core/lib/iomgr/ev_poll_posix.h", "src/core/lib/iomgr/ev_poll_posix.h",
"src/core/lib/iomgr/ev_posix.h", "src/core/lib/iomgr/ev_posix.h",
"src/core/lib/iomgr/exec_ctx.h", "src/core/lib/iomgr/exec_ctx.h",

@ -309,7 +309,6 @@ add_library(grpc
src/core/lib/iomgr/endpoint_pair_windows.c src/core/lib/iomgr/endpoint_pair_windows.c
src/core/lib/iomgr/error.c src/core/lib/iomgr/error.c
src/core/lib/iomgr/ev_epoll_linux.c src/core/lib/iomgr/ev_epoll_linux.c
src/core/lib/iomgr/ev_poll_and_epoll_posix.c
src/core/lib/iomgr/ev_poll_posix.c src/core/lib/iomgr/ev_poll_posix.c
src/core/lib/iomgr/ev_posix.c src/core/lib/iomgr/ev_posix.c
src/core/lib/iomgr/exec_ctx.c src/core/lib/iomgr/exec_ctx.c
@ -589,7 +588,6 @@ add_library(grpc_cronet
src/core/lib/iomgr/endpoint_pair_windows.c src/core/lib/iomgr/endpoint_pair_windows.c
src/core/lib/iomgr/error.c src/core/lib/iomgr/error.c
src/core/lib/iomgr/ev_epoll_linux.c src/core/lib/iomgr/ev_epoll_linux.c
src/core/lib/iomgr/ev_poll_and_epoll_posix.c
src/core/lib/iomgr/ev_poll_posix.c src/core/lib/iomgr/ev_poll_posix.c
src/core/lib/iomgr/ev_posix.c src/core/lib/iomgr/ev_posix.c
src/core/lib/iomgr/exec_ctx.c src/core/lib/iomgr/exec_ctx.c
@ -841,7 +839,6 @@ add_library(grpc_unsecure
src/core/lib/iomgr/endpoint_pair_windows.c src/core/lib/iomgr/endpoint_pair_windows.c
src/core/lib/iomgr/error.c src/core/lib/iomgr/error.c
src/core/lib/iomgr/ev_epoll_linux.c src/core/lib/iomgr/ev_epoll_linux.c
src/core/lib/iomgr/ev_poll_and_epoll_posix.c
src/core/lib/iomgr/ev_poll_posix.c src/core/lib/iomgr/ev_poll_posix.c
src/core/lib/iomgr/ev_posix.c src/core/lib/iomgr/ev_posix.c
src/core/lib/iomgr/exec_ctx.c src/core/lib/iomgr/exec_ctx.c

@ -2643,7 +2643,6 @@ LIBGRPC_SRC = \
src/core/lib/iomgr/endpoint_pair_windows.c \ src/core/lib/iomgr/endpoint_pair_windows.c \
src/core/lib/iomgr/error.c \ src/core/lib/iomgr/error.c \
src/core/lib/iomgr/ev_epoll_linux.c \ src/core/lib/iomgr/ev_epoll_linux.c \
src/core/lib/iomgr/ev_poll_and_epoll_posix.c \
src/core/lib/iomgr/ev_poll_posix.c \ src/core/lib/iomgr/ev_poll_posix.c \
src/core/lib/iomgr/ev_posix.c \ src/core/lib/iomgr/ev_posix.c \
src/core/lib/iomgr/exec_ctx.c \ src/core/lib/iomgr/exec_ctx.c \
@ -2941,7 +2940,6 @@ LIBGRPC_CRONET_SRC = \
src/core/lib/iomgr/endpoint_pair_windows.c \ src/core/lib/iomgr/endpoint_pair_windows.c \
src/core/lib/iomgr/error.c \ src/core/lib/iomgr/error.c \
src/core/lib/iomgr/ev_epoll_linux.c \ src/core/lib/iomgr/ev_epoll_linux.c \
src/core/lib/iomgr/ev_poll_and_epoll_posix.c \
src/core/lib/iomgr/ev_poll_posix.c \ src/core/lib/iomgr/ev_poll_posix.c \
src/core/lib/iomgr/ev_posix.c \ src/core/lib/iomgr/ev_posix.c \
src/core/lib/iomgr/exec_ctx.c \ src/core/lib/iomgr/exec_ctx.c \
@ -3230,7 +3228,6 @@ LIBGRPC_TEST_UTIL_SRC = \
src/core/lib/iomgr/endpoint_pair_windows.c \ src/core/lib/iomgr/endpoint_pair_windows.c \
src/core/lib/iomgr/error.c \ src/core/lib/iomgr/error.c \
src/core/lib/iomgr/ev_epoll_linux.c \ src/core/lib/iomgr/ev_epoll_linux.c \
src/core/lib/iomgr/ev_poll_and_epoll_posix.c \
src/core/lib/iomgr/ev_poll_posix.c \ src/core/lib/iomgr/ev_poll_posix.c \
src/core/lib/iomgr/ev_posix.c \ src/core/lib/iomgr/ev_posix.c \
src/core/lib/iomgr/exec_ctx.c \ src/core/lib/iomgr/exec_ctx.c \
@ -3448,7 +3445,6 @@ LIBGRPC_UNSECURE_SRC = \
src/core/lib/iomgr/endpoint_pair_windows.c \ src/core/lib/iomgr/endpoint_pair_windows.c \
src/core/lib/iomgr/error.c \ src/core/lib/iomgr/error.c \
src/core/lib/iomgr/ev_epoll_linux.c \ src/core/lib/iomgr/ev_epoll_linux.c \
src/core/lib/iomgr/ev_poll_and_epoll_posix.c \
src/core/lib/iomgr/ev_poll_posix.c \ src/core/lib/iomgr/ev_poll_posix.c \
src/core/lib/iomgr/ev_posix.c \ src/core/lib/iomgr/ev_posix.c \
src/core/lib/iomgr/exec_ctx.c \ src/core/lib/iomgr/exec_ctx.c \
@ -6994,6 +6990,7 @@ LIBEND2END_TESTS_SRC = \
test/core/end2end/tests/empty_batch.c \ test/core/end2end/tests/empty_batch.c \
test/core/end2end/tests/filter_call_init_fails.c \ test/core/end2end/tests/filter_call_init_fails.c \
test/core/end2end/tests/filter_causes_close.c \ test/core/end2end/tests/filter_causes_close.c \
test/core/end2end/tests/filter_latency.c \
test/core/end2end/tests/graceful_server_shutdown.c \ test/core/end2end/tests/graceful_server_shutdown.c \
test/core/end2end/tests/high_initial_seqno.c \ test/core/end2end/tests/high_initial_seqno.c \
test/core/end2end/tests/hpack_size.c \ test/core/end2end/tests/hpack_size.c \
@ -7079,6 +7076,7 @@ LIBEND2END_NOSEC_TESTS_SRC = \
test/core/end2end/tests/empty_batch.c \ test/core/end2end/tests/empty_batch.c \
test/core/end2end/tests/filter_call_init_fails.c \ test/core/end2end/tests/filter_call_init_fails.c \
test/core/end2end/tests/filter_causes_close.c \ test/core/end2end/tests/filter_causes_close.c \
test/core/end2end/tests/filter_latency.c \
test/core/end2end/tests/graceful_server_shutdown.c \ test/core/end2end/tests/graceful_server_shutdown.c \
test/core/end2end/tests/high_initial_seqno.c \ test/core/end2end/tests/high_initial_seqno.c \
test/core/end2end/tests/hpack_size.c \ test/core/end2end/tests/hpack_size.c \

@ -589,7 +589,6 @@
'src/core/lib/iomgr/endpoint_pair_windows.c', 'src/core/lib/iomgr/endpoint_pair_windows.c',
'src/core/lib/iomgr/error.c', 'src/core/lib/iomgr/error.c',
'src/core/lib/iomgr/ev_epoll_linux.c', 'src/core/lib/iomgr/ev_epoll_linux.c',
'src/core/lib/iomgr/ev_poll_and_epoll_posix.c',
'src/core/lib/iomgr/ev_poll_posix.c', 'src/core/lib/iomgr/ev_poll_posix.c',
'src/core/lib/iomgr/ev_posix.c', 'src/core/lib/iomgr/ev_posix.c',
'src/core/lib/iomgr/exec_ctx.c', 'src/core/lib/iomgr/exec_ctx.c',

@ -186,7 +186,6 @@ filegroups:
- src/core/lib/iomgr/endpoint_pair.h - src/core/lib/iomgr/endpoint_pair.h
- src/core/lib/iomgr/error.h - src/core/lib/iomgr/error.h
- src/core/lib/iomgr/ev_epoll_linux.h - src/core/lib/iomgr/ev_epoll_linux.h
- src/core/lib/iomgr/ev_poll_and_epoll_posix.h
- src/core/lib/iomgr/ev_poll_posix.h - src/core/lib/iomgr/ev_poll_posix.h
- src/core/lib/iomgr/ev_posix.h - src/core/lib/iomgr/ev_posix.h
- src/core/lib/iomgr/exec_ctx.h - src/core/lib/iomgr/exec_ctx.h
@ -286,7 +285,6 @@ filegroups:
- src/core/lib/iomgr/endpoint_pair_windows.c - src/core/lib/iomgr/endpoint_pair_windows.c
- src/core/lib/iomgr/error.c - src/core/lib/iomgr/error.c
- src/core/lib/iomgr/ev_epoll_linux.c - src/core/lib/iomgr/ev_epoll_linux.c
- src/core/lib/iomgr/ev_poll_and_epoll_posix.c
- src/core/lib/iomgr/ev_poll_posix.c - src/core/lib/iomgr/ev_poll_posix.c
- src/core/lib/iomgr/ev_posix.c - src/core/lib/iomgr/ev_posix.c
- src/core/lib/iomgr/exec_ctx.c - src/core/lib/iomgr/exec_ctx.c

@ -105,7 +105,6 @@ if test "$PHP_GRPC" != "no"; then
src/core/lib/iomgr/endpoint_pair_windows.c \ src/core/lib/iomgr/endpoint_pair_windows.c \
src/core/lib/iomgr/error.c \ src/core/lib/iomgr/error.c \
src/core/lib/iomgr/ev_epoll_linux.c \ src/core/lib/iomgr/ev_epoll_linux.c \
src/core/lib/iomgr/ev_poll_and_epoll_posix.c \
src/core/lib/iomgr/ev_poll_posix.c \ src/core/lib/iomgr/ev_poll_posix.c \
src/core/lib/iomgr/ev_posix.c \ src/core/lib/iomgr/ev_posix.c \
src/core/lib/iomgr/exec_ctx.c \ src/core/lib/iomgr/exec_ctx.c \

@ -268,7 +268,6 @@ Pod::Spec.new do |s|
'src/core/lib/iomgr/endpoint_pair.h', 'src/core/lib/iomgr/endpoint_pair.h',
'src/core/lib/iomgr/error.h', 'src/core/lib/iomgr/error.h',
'src/core/lib/iomgr/ev_epoll_linux.h', 'src/core/lib/iomgr/ev_epoll_linux.h',
'src/core/lib/iomgr/ev_poll_and_epoll_posix.h',
'src/core/lib/iomgr/ev_poll_posix.h', 'src/core/lib/iomgr/ev_poll_posix.h',
'src/core/lib/iomgr/ev_posix.h', 'src/core/lib/iomgr/ev_posix.h',
'src/core/lib/iomgr/exec_ctx.h', 'src/core/lib/iomgr/exec_ctx.h',
@ -448,7 +447,6 @@ Pod::Spec.new do |s|
'src/core/lib/iomgr/endpoint_pair_windows.c', 'src/core/lib/iomgr/endpoint_pair_windows.c',
'src/core/lib/iomgr/error.c', 'src/core/lib/iomgr/error.c',
'src/core/lib/iomgr/ev_epoll_linux.c', 'src/core/lib/iomgr/ev_epoll_linux.c',
'src/core/lib/iomgr/ev_poll_and_epoll_posix.c',
'src/core/lib/iomgr/ev_poll_posix.c', 'src/core/lib/iomgr/ev_poll_posix.c',
'src/core/lib/iomgr/ev_posix.c', 'src/core/lib/iomgr/ev_posix.c',
'src/core/lib/iomgr/exec_ctx.c', 'src/core/lib/iomgr/exec_ctx.c',
@ -673,7 +671,6 @@ Pod::Spec.new do |s|
'src/core/lib/iomgr/endpoint_pair.h', 'src/core/lib/iomgr/endpoint_pair.h',
'src/core/lib/iomgr/error.h', 'src/core/lib/iomgr/error.h',
'src/core/lib/iomgr/ev_epoll_linux.h', 'src/core/lib/iomgr/ev_epoll_linux.h',
'src/core/lib/iomgr/ev_poll_and_epoll_posix.h',
'src/core/lib/iomgr/ev_poll_posix.h', 'src/core/lib/iomgr/ev_poll_posix.h',
'src/core/lib/iomgr/ev_posix.h', 'src/core/lib/iomgr/ev_posix.h',
'src/core/lib/iomgr/exec_ctx.h', 'src/core/lib/iomgr/exec_ctx.h',

@ -188,7 +188,6 @@ Gem::Specification.new do |s|
s.files += %w( src/core/lib/iomgr/endpoint_pair.h ) s.files += %w( src/core/lib/iomgr/endpoint_pair.h )
s.files += %w( src/core/lib/iomgr/error.h ) s.files += %w( src/core/lib/iomgr/error.h )
s.files += %w( src/core/lib/iomgr/ev_epoll_linux.h ) s.files += %w( src/core/lib/iomgr/ev_epoll_linux.h )
s.files += %w( src/core/lib/iomgr/ev_poll_and_epoll_posix.h )
s.files += %w( src/core/lib/iomgr/ev_poll_posix.h ) s.files += %w( src/core/lib/iomgr/ev_poll_posix.h )
s.files += %w( src/core/lib/iomgr/ev_posix.h ) s.files += %w( src/core/lib/iomgr/ev_posix.h )
s.files += %w( src/core/lib/iomgr/exec_ctx.h ) s.files += %w( src/core/lib/iomgr/exec_ctx.h )
@ -368,7 +367,6 @@ Gem::Specification.new do |s|
s.files += %w( src/core/lib/iomgr/endpoint_pair_windows.c ) s.files += %w( src/core/lib/iomgr/endpoint_pair_windows.c )
s.files += %w( src/core/lib/iomgr/error.c ) s.files += %w( src/core/lib/iomgr/error.c )
s.files += %w( src/core/lib/iomgr/ev_epoll_linux.c ) s.files += %w( src/core/lib/iomgr/ev_epoll_linux.c )
s.files += %w( src/core/lib/iomgr/ev_poll_and_epoll_posix.c )
s.files += %w( src/core/lib/iomgr/ev_poll_posix.c ) s.files += %w( src/core/lib/iomgr/ev_poll_posix.c )
s.files += %w( src/core/lib/iomgr/ev_posix.c ) s.files += %w( src/core/lib/iomgr/ev_posix.c )
s.files += %w( src/core/lib/iomgr/exec_ctx.c ) s.files += %w( src/core/lib/iomgr/exec_ctx.c )

@ -40,6 +40,8 @@ extern "C" {
/** Connectivity state of a channel. */ /** Connectivity state of a channel. */
typedef enum { typedef enum {
/** channel has just been initialized */
GRPC_CHANNEL_INIT = -1,
/** channel is idle */ /** channel is idle */
GRPC_CHANNEL_IDLE, GRPC_CHANNEL_IDLE,
/** channel is connecting */ /** channel is connecting */

@ -195,7 +195,6 @@
<file baseinstalldir="/" name="src/core/lib/iomgr/endpoint_pair.h" role="src" /> <file baseinstalldir="/" name="src/core/lib/iomgr/endpoint_pair.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/iomgr/error.h" role="src" /> <file baseinstalldir="/" name="src/core/lib/iomgr/error.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/iomgr/ev_epoll_linux.h" role="src" /> <file baseinstalldir="/" name="src/core/lib/iomgr/ev_epoll_linux.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/iomgr/ev_poll_and_epoll_posix.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/iomgr/ev_poll_posix.h" role="src" /> <file baseinstalldir="/" name="src/core/lib/iomgr/ev_poll_posix.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/iomgr/ev_posix.h" role="src" /> <file baseinstalldir="/" name="src/core/lib/iomgr/ev_posix.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/iomgr/exec_ctx.h" role="src" /> <file baseinstalldir="/" name="src/core/lib/iomgr/exec_ctx.h" role="src" />
@ -375,7 +374,6 @@
<file baseinstalldir="/" name="src/core/lib/iomgr/endpoint_pair_windows.c" role="src" /> <file baseinstalldir="/" name="src/core/lib/iomgr/endpoint_pair_windows.c" role="src" />
<file baseinstalldir="/" name="src/core/lib/iomgr/error.c" role="src" /> <file baseinstalldir="/" name="src/core/lib/iomgr/error.c" role="src" />
<file baseinstalldir="/" name="src/core/lib/iomgr/ev_epoll_linux.c" role="src" /> <file baseinstalldir="/" name="src/core/lib/iomgr/ev_epoll_linux.c" role="src" />
<file baseinstalldir="/" name="src/core/lib/iomgr/ev_poll_and_epoll_posix.c" role="src" />
<file baseinstalldir="/" name="src/core/lib/iomgr/ev_poll_posix.c" role="src" /> <file baseinstalldir="/" name="src/core/lib/iomgr/ev_poll_posix.c" role="src" />
<file baseinstalldir="/" name="src/core/lib/iomgr/ev_posix.c" role="src" /> <file baseinstalldir="/" name="src/core/lib/iomgr/ev_posix.c" role="src" />
<file baseinstalldir="/" name="src/core/lib/iomgr/exec_ctx.c" role="src" /> <file baseinstalldir="/" name="src/core/lib/iomgr/exec_ctx.c" role="src" />

@ -641,7 +641,7 @@ static void subchannel_ready(grpc_exec_ctx *exec_ctx, void *arg,
grpc_subchannel_call *subchannel_call = NULL; grpc_subchannel_call *subchannel_call = NULL;
grpc_error *new_error = grpc_connected_subchannel_create_call( grpc_error *new_error = grpc_connected_subchannel_create_call(
exec_ctx, calld->connected_subchannel, calld->pollent, calld->path, exec_ctx, calld->connected_subchannel, calld->pollent, calld->path,
calld->deadline, &subchannel_call); calld->call_start_time, calld->deadline, &subchannel_call);
if (new_error != GRPC_ERROR_NONE) { if (new_error != GRPC_ERROR_NONE) {
new_error = grpc_error_add_child(new_error, error); new_error = grpc_error_add_child(new_error, error);
subchannel_call = CANCELLED_CALL; subchannel_call = CANCELLED_CALL;
@ -894,7 +894,7 @@ retry:
grpc_subchannel_call *subchannel_call = NULL; grpc_subchannel_call *subchannel_call = NULL;
grpc_error *error = grpc_connected_subchannel_create_call( grpc_error *error = grpc_connected_subchannel_create_call(
exec_ctx, calld->connected_subchannel, calld->pollent, calld->path, exec_ctx, calld->connected_subchannel, calld->pollent, calld->path,
calld->deadline, &subchannel_call); calld->call_start_time, calld->deadline, &subchannel_call);
if (error != GRPC_ERROR_NONE) { if (error != GRPC_ERROR_NONE) {
subchannel_call = CANCELLED_CALL; subchannel_call = CANCELLED_CALL;
fail_locked(exec_ctx, calld, GRPC_ERROR_REF(error)); fail_locked(exec_ctx, calld, GRPC_ERROR_REF(error));

@ -702,15 +702,15 @@ grpc_connected_subchannel *grpc_subchannel_get_connected_subchannel(
grpc_error *grpc_connected_subchannel_create_call( grpc_error *grpc_connected_subchannel_create_call(
grpc_exec_ctx *exec_ctx, grpc_connected_subchannel *con, grpc_exec_ctx *exec_ctx, grpc_connected_subchannel *con,
grpc_polling_entity *pollent, grpc_mdstr *path, gpr_timespec deadline, grpc_polling_entity *pollent, grpc_mdstr *path, gpr_timespec start_time,
grpc_subchannel_call **call) { gpr_timespec deadline, grpc_subchannel_call **call) {
grpc_channel_stack *chanstk = CHANNEL_STACK_FROM_CONNECTION(con); grpc_channel_stack *chanstk = CHANNEL_STACK_FROM_CONNECTION(con);
*call = gpr_malloc(sizeof(grpc_subchannel_call) + chanstk->call_stack_size); *call = gpr_malloc(sizeof(grpc_subchannel_call) + chanstk->call_stack_size);
grpc_call_stack *callstk = SUBCHANNEL_CALL_TO_CALL_STACK(*call); grpc_call_stack *callstk = SUBCHANNEL_CALL_TO_CALL_STACK(*call);
(*call)->connection = con; // Ref is added below. (*call)->connection = con; // Ref is added below.
grpc_error *error = grpc_error *error =
grpc_call_stack_init(exec_ctx, chanstk, 1, subchannel_call_destroy, *call, grpc_call_stack_init(exec_ctx, chanstk, 1, subchannel_call_destroy, *call,
NULL, NULL, path, deadline, callstk); NULL, NULL, path, start_time, deadline, callstk);
if (error != GRPC_ERROR_NONE) { if (error != GRPC_ERROR_NONE) {
const char *error_string = grpc_error_string(error); const char *error_string = grpc_error_string(error);
gpr_log(GPR_ERROR, "error: %s", error_string); gpr_log(GPR_ERROR, "error: %s", error_string);

@ -111,8 +111,8 @@ void grpc_subchannel_call_unref(grpc_exec_ctx *exec_ctx,
/** construct a subchannel call */ /** construct a subchannel call */
grpc_error *grpc_connected_subchannel_create_call( grpc_error *grpc_connected_subchannel_create_call(
grpc_exec_ctx *exec_ctx, grpc_connected_subchannel *connected_subchannel, grpc_exec_ctx *exec_ctx, grpc_connected_subchannel *connected_subchannel,
grpc_polling_entity *pollent, grpc_mdstr *path, gpr_timespec deadline, grpc_polling_entity *pollent, grpc_mdstr *path, gpr_timespec start_time,
grpc_subchannel_call **subchannel_call); gpr_timespec deadline, grpc_subchannel_call **subchannel_call);
/** process a transport level op */ /** process a transport level op */
void grpc_connected_subchannel_process_transport_op( void grpc_connected_subchannel_process_transport_op(

@ -761,17 +761,24 @@ static void glb_shutdown(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol) {
if (glb_policy->rr_policy) { if (glb_policy->rr_policy) {
GRPC_LB_POLICY_UNREF(exec_ctx, glb_policy->rr_policy, "glb_shutdown"); GRPC_LB_POLICY_UNREF(exec_ctx, glb_policy->rr_policy, "glb_shutdown");
} }
if (glb_policy->started_picking) {
if (glb_policy->lb_call != NULL) {
grpc_call_cancel(glb_policy->lb_call, NULL);
/* lb_on_server_status_received will pick up the cancel and clean up */
}
}
grpc_connectivity_state_set( grpc_connectivity_state_set(
exec_ctx, &glb_policy->state_tracker, GRPC_CHANNEL_SHUTDOWN, exec_ctx, &glb_policy->state_tracker, GRPC_CHANNEL_SHUTDOWN,
GRPC_ERROR_CREATE("Channel Shutdown"), "glb_shutdown"); GRPC_ERROR_CREATE("Channel Shutdown"), "glb_shutdown");
/* We need a copy of the lb_call pointer because we can't cancell the call
* while holding glb_policy->mu: lb_on_server_status_received, invoked due to
* the cancel, needs to acquire that same lock */
grpc_call *lb_call = glb_policy->lb_call;
glb_policy->lb_call = NULL;
gpr_mu_unlock(&glb_policy->mu); gpr_mu_unlock(&glb_policy->mu);
/* glb_policy->lb_call and this local lb_call must be consistent at this point
* because glb_policy->lb_call is only assigned in lb_call_init_locked as part
* of query_for_backends_locked, which can only be invoked while
* glb_policy->shutting_down is false. */
if (lb_call != NULL) {
grpc_call_cancel(lb_call, NULL);
/* lb_on_server_status_received will pick up the cancel and clean up */
}
while (pp != NULL) { while (pp != NULL) {
pending_pick *next = pp->next; pending_pick *next = pp->next;
*pp->target = NULL; *pp->target = NULL;
@ -955,9 +962,10 @@ static void lb_on_server_status_received(grpc_exec_ctx *exec_ctx, void *arg,
grpc_error *error); grpc_error *error);
static void lb_on_response_received(grpc_exec_ctx *exec_ctx, void *arg, static void lb_on_response_received(grpc_exec_ctx *exec_ctx, void *arg,
grpc_error *error); grpc_error *error);
static void lb_call_init(glb_lb_policy *glb_policy) { static void lb_call_init_locked(glb_lb_policy *glb_policy) {
GPR_ASSERT(glb_policy->server_name != NULL); GPR_ASSERT(glb_policy->server_name != NULL);
GPR_ASSERT(glb_policy->server_name[0] != '\0'); GPR_ASSERT(glb_policy->server_name[0] != '\0');
GPR_ASSERT(!glb_policy->shutting_down);
/* Note the following LB call progresses every time there's activity in \a /* Note the following LB call progresses every time there's activity in \a
* glb_policy->base.interested_parties, which is comprised of the polling * glb_policy->base.interested_parties, which is comprised of the polling
@ -1010,7 +1018,9 @@ static void lb_call_destroy_locked(glb_lb_policy *glb_policy) {
static void query_for_backends_locked(grpc_exec_ctx *exec_ctx, static void query_for_backends_locked(grpc_exec_ctx *exec_ctx,
glb_lb_policy *glb_policy) { glb_lb_policy *glb_policy) {
GPR_ASSERT(glb_policy->lb_channel != NULL); GPR_ASSERT(glb_policy->lb_channel != NULL);
lb_call_init(glb_policy); if (glb_policy->shutting_down) return;
lb_call_init_locked(glb_policy);
if (grpc_lb_glb_trace) { if (grpc_lb_glb_trace) {
gpr_log(GPR_INFO, "Query for backends (grpclb: %p, lb_call: %p)", gpr_log(GPR_INFO, "Query for backends (grpclb: %p, lb_call: %p)",

@ -292,6 +292,8 @@ static void pf_connectivity_changed(grpc_exec_ctx *exec_ctx, void *arg,
} else { } else {
loop: loop:
switch (p->checking_connectivity) { switch (p->checking_connectivity) {
case GRPC_CHANNEL_INIT:
GPR_UNREACHABLE_CODE(return );
case GRPC_CHANNEL_READY: case GRPC_CHANNEL_READY:
grpc_connectivity_state_set(exec_ctx, &p->state_tracker, grpc_connectivity_state_set(exec_ctx, &p->state_tracker,
GRPC_CHANNEL_READY, GRPC_ERROR_NONE, GRPC_CHANNEL_READY, GRPC_ERROR_NONE,

@ -116,8 +116,13 @@ typedef struct {
grpc_closure connectivity_changed_closure; grpc_closure connectivity_changed_closure;
/** this subchannels current position in subchannel->ready_list */ /** this subchannels current position in subchannel->ready_list */
ready_list *ready_list_node; ready_list *ready_list_node;
/** last observed connectivity */ /** last observed connectivity. Not updated by
grpc_connectivity_state connectivity_state; * \a grpc_subchannel_notify_on_state_change. Used to determine the previous
* state while processing the new state in \a rr_connectivity_changed */
grpc_connectivity_state prev_connectivity_state;
/** current connectivity state. Updated by \a
* grpc_subchannel_notify_on_state_change */
grpc_connectivity_state curr_connectivity_state;
/** the subchannel's target user data */ /** the subchannel's target user data */
void *user_data; void *user_data;
/** vtable to operate over \a user_data */ /** vtable to operate over \a user_data */
@ -127,6 +132,7 @@ typedef struct {
struct round_robin_lb_policy { struct round_robin_lb_policy {
/** base policy: must be first */ /** base policy: must be first */
grpc_lb_policy base; grpc_lb_policy base;
gpr_mu mu;
/** total number of addresses received at creation time */ /** total number of addresses received at creation time */
size_t num_addresses; size_t num_addresses;
@ -135,8 +141,11 @@ struct round_robin_lb_policy {
size_t num_subchannels; size_t num_subchannels;
subchannel_data **subchannels; subchannel_data **subchannels;
/** mutex protecting remaining members */ /** how many subchannels are in TRANSIENT_FAILURE */
gpr_mu mu; size_t num_transient_failures;
/** how many subchannels are IDLE */
size_t num_idle;
/** have we started picking? */ /** have we started picking? */
int started_picking; int started_picking;
/** are we shutting down? */ /** are we shutting down? */
@ -258,6 +267,10 @@ static void remove_disconnected_sc_locked(round_robin_lb_policy *p,
gpr_free(node); gpr_free(node);
} }
static bool is_ready_list_empty(round_robin_lb_policy *p) {
return p->ready_list.prev == NULL;
}
static void rr_destroy(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol) { static void rr_destroy(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol) {
round_robin_lb_policy *p = (round_robin_lb_policy *)pol; round_robin_lb_policy *p = (round_robin_lb_policy *)pol;
ready_list *elem; ready_list *elem;
@ -268,7 +281,7 @@ static void rr_destroy(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol) {
for (size_t i = 0; i < p->num_subchannels; i++) { for (size_t i = 0; i < p->num_subchannels; i++) {
subchannel_data *sd = p->subchannels[i]; subchannel_data *sd = p->subchannels[i];
GRPC_SUBCHANNEL_UNREF(exec_ctx, sd->subchannel, "round_robin_destroy"); GRPC_SUBCHANNEL_UNREF(exec_ctx, sd->subchannel, "rr_destroy");
if (sd->user_data != NULL) { if (sd->user_data != NULL) {
GPR_ASSERT(sd->user_data_vtable != NULL); GPR_ASSERT(sd->user_data_vtable != NULL);
sd->user_data_vtable->destroy(sd->user_data); sd->user_data_vtable->destroy(sd->user_data);
@ -381,18 +394,18 @@ static void start_picking(grpc_exec_ctx *exec_ctx, round_robin_lb_policy *p) {
size_t i; size_t i;
p->started_picking = 1; p->started_picking = 1;
if (grpc_lb_round_robin_trace) {
gpr_log(GPR_DEBUG, "LB_POLICY: p=%p num_subchannels=%" PRIuPTR, (void *)p,
p->num_subchannels);
}
for (i = 0; i < p->num_subchannels; i++) { for (i = 0; i < p->num_subchannels; i++) {
subchannel_data *sd = p->subchannels[i]; subchannel_data *sd = p->subchannels[i];
sd->connectivity_state = GRPC_CHANNEL_IDLE; /* use some sentinel value outside of the range of grpc_connectivity_state
* to signal an undefined previous state. We won't be referring to this
* value again and it'll be overwritten after the first call to
* rr_connectivity_changed */
sd->prev_connectivity_state = GRPC_CHANNEL_INIT;
sd->curr_connectivity_state = GRPC_CHANNEL_IDLE;
GRPC_LB_POLICY_WEAK_REF(&p->base, "rr_connectivity");
grpc_subchannel_notify_on_state_change( grpc_subchannel_notify_on_state_change(
exec_ctx, sd->subchannel, p->base.interested_parties, exec_ctx, sd->subchannel, p->base.interested_parties,
&sd->connectivity_state, &sd->connectivity_changed_closure); &sd->curr_connectivity_state, &sd->connectivity_changed_closure);
GRPC_LB_POLICY_WEAK_REF(&p->base, "round_robin_connectivity");
} }
} }
@ -422,7 +435,7 @@ static int rr_pick(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol,
/* readily available, report right away */ /* readily available, report right away */
*target = GRPC_CONNECTED_SUBCHANNEL_REF( *target = GRPC_CONNECTED_SUBCHANNEL_REF(
grpc_subchannel_get_connected_subchannel(selected->subchannel), grpc_subchannel_get_connected_subchannel(selected->subchannel),
"picked"); "rr_picked");
if (user_data != NULL) { if (user_data != NULL) {
*user_data = selected->user_data; *user_data = selected->user_data;
@ -453,125 +466,184 @@ static int rr_pick(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol,
} }
} }
static void update_state_counters(subchannel_data *sd) {
round_robin_lb_policy *p = sd->policy;
/* update p->num_transient_failures (resp. p->num_idle): if the previous
* state was TRANSIENT_FAILURE (resp. IDLE), decrement
* p->num_transient_failures (resp. p->num_idle). */
if (sd->prev_connectivity_state == GRPC_CHANNEL_TRANSIENT_FAILURE) {
GPR_ASSERT(p->num_transient_failures > 0);
--p->num_transient_failures;
} else if (sd->prev_connectivity_state == GRPC_CHANNEL_IDLE) {
GPR_ASSERT(p->num_idle > 0);
--p->num_idle;
}
}
/* sd is the subchannel_data associted with the updated subchannel.
* shutdown_error will only be used upon policy transition to TRANSIENT_FAILURE
* or SHUTDOWN */
static grpc_connectivity_state update_lb_connectivity_status(
grpc_exec_ctx *exec_ctx, subchannel_data *sd, grpc_error *error) {
/* In priority order. The first rule to match terminates the search (ie, if we
* are on rule n, all previous rules were unfulfilled).
*
* 1) RULE: ANY subchannel is READY => policy is READY.
* CHECK: At least one subchannel is ready iff p->ready_list is NOT empty.
*
* 2) RULE: ANY subchannel is CONNECTING => policy is CONNECTING.
* CHECK: sd->curr_connectivity_state == CONNECTING.
*
* 3) RULE: ALL subchannels are SHUTDOWN => policy is SHUTDOWN.
* CHECK: p->num_subchannels = 0.
*
* 4) RULE: ALL subchannels are TRANSIENT_FAILURE => policy is
* TRANSIENT_FAILURE.
* CHECK: p->num_transient_failures == p->num_subchannels.
*
* 5) RULE: ALL subchannels are IDLE => policy is IDLE.
* CHECK: p->num_idle == p->num_subchannels.
*/
round_robin_lb_policy *p = sd->policy;
if (!is_ready_list_empty(p)) { /* 1) READY */
grpc_connectivity_state_set(exec_ctx, &p->state_tracker, GRPC_CHANNEL_READY,
GRPC_ERROR_NONE, "rr_ready");
return GRPC_CHANNEL_READY;
} else if (sd->curr_connectivity_state ==
GRPC_CHANNEL_CONNECTING) { /* 2) CONNECTING */
grpc_connectivity_state_set(exec_ctx, &p->state_tracker,
GRPC_CHANNEL_CONNECTING, GRPC_ERROR_NONE,
"rr_connecting");
return GRPC_CHANNEL_CONNECTING;
} else if (p->num_subchannels == 0) { /* 3) SHUTDOWN */
grpc_connectivity_state_set(exec_ctx, &p->state_tracker,
GRPC_CHANNEL_SHUTDOWN, GRPC_ERROR_REF(error),
"rr_shutdown");
return GRPC_CHANNEL_SHUTDOWN;
} else if (p->num_transient_failures ==
p->num_subchannels) { /* 4) TRANSIENT_FAILURE */
grpc_connectivity_state_set(exec_ctx, &p->state_tracker,
GRPC_CHANNEL_TRANSIENT_FAILURE,
GRPC_ERROR_REF(error), "rr_transient_failure");
return GRPC_CHANNEL_TRANSIENT_FAILURE;
} else if (p->num_idle == p->num_subchannels) { /* 5) IDLE */
grpc_connectivity_state_set(exec_ctx, &p->state_tracker, GRPC_CHANNEL_IDLE,
GRPC_ERROR_NONE, "rr_idle");
return GRPC_CHANNEL_IDLE;
}
/* no change */
return sd->curr_connectivity_state;
}
static void rr_connectivity_changed(grpc_exec_ctx *exec_ctx, void *arg, static void rr_connectivity_changed(grpc_exec_ctx *exec_ctx, void *arg,
grpc_error *error) { grpc_error *error) {
subchannel_data *sd = arg; subchannel_data *sd = arg;
round_robin_lb_policy *p = sd->policy; round_robin_lb_policy *p = sd->policy;
pending_pick *pp; pending_pick *pp;
int unref = 0;
GRPC_ERROR_REF(error); GRPC_ERROR_REF(error);
gpr_mu_lock(&p->mu); gpr_mu_lock(&p->mu);
if (p->shutdown) { if (p->shutdown) {
unref = 1; gpr_mu_unlock(&p->mu);
} else { GRPC_LB_POLICY_WEAK_UNREF(exec_ctx, &p->base, "rr_connectivity");
switch (sd->connectivity_state) { GRPC_ERROR_UNREF(error);
case GRPC_CHANNEL_READY: return;
grpc_connectivity_state_set(exec_ctx, &p->state_tracker, }
GRPC_CHANNEL_READY, GRPC_ERROR_REF(error), switch (sd->curr_connectivity_state) {
"connecting_ready"); case GRPC_CHANNEL_INIT:
/* add the newly connected subchannel to the list of connected ones. GPR_UNREACHABLE_CODE(return );
* Note that it goes to the "end of the line". */ case GRPC_CHANNEL_READY:
sd->ready_list_node = add_connected_sc_locked(p, sd); /* add the newly connected subchannel to the list of connected ones.
/* at this point we know there's at least one suitable subchannel. Go * Note that it goes to the "end of the line". */
* ahead and pick one and notify the pending suitors in sd->ready_list_node = add_connected_sc_locked(p, sd);
* p->pending_picks. This preemtively replicates rr_pick()'s actions. */ /* at this point we know there's at least one suitable subchannel. Go
ready_list *selected = peek_next_connected_locked(p); * ahead and pick one and notify the pending suitors in
GPR_ASSERT(selected != NULL); * p->pending_picks. This preemtively replicates rr_pick()'s actions. */
if (p->pending_picks != NULL) { ready_list *selected = peek_next_connected_locked(p);
/* if the selected subchannel is going to be used for the pending GPR_ASSERT(selected != NULL);
* picks, update the last picked pointer */ if (p->pending_picks != NULL) {
advance_last_picked_locked(p); /* if the selected subchannel is going to be used for the pending
* picks, update the last picked pointer */
advance_last_picked_locked(p);
}
while ((pp = p->pending_picks)) {
p->pending_picks = pp->next;
*pp->target = GRPC_CONNECTED_SUBCHANNEL_REF(
grpc_subchannel_get_connected_subchannel(selected->subchannel),
"rr_picked");
if (pp->user_data != NULL) {
*pp->user_data = selected->user_data;
} }
if (grpc_lb_round_robin_trace) {
gpr_log(GPR_DEBUG,
"[RR CONN CHANGED] TARGET <-- SUBCHANNEL %p (NODE %p)",
(void *)selected->subchannel, (void *)selected);
}
grpc_exec_ctx_sched(exec_ctx, pp->on_complete, GRPC_ERROR_NONE, NULL);
gpr_free(pp);
}
update_lb_connectivity_status(exec_ctx, sd, error);
sd->prev_connectivity_state = sd->curr_connectivity_state;
/* renew notification: reuses the "rr_connectivity" weak ref */
grpc_subchannel_notify_on_state_change(
exec_ctx, sd->subchannel, p->base.interested_parties,
&sd->curr_connectivity_state, &sd->connectivity_changed_closure);
break;
case GRPC_CHANNEL_IDLE:
++p->num_idle;
/* fallthrough */
case GRPC_CHANNEL_CONNECTING:
update_state_counters(sd);
update_lb_connectivity_status(exec_ctx, sd, error);
sd->prev_connectivity_state = sd->curr_connectivity_state;
/* renew notification: reuses the "rr_connectivity" weak ref */
grpc_subchannel_notify_on_state_change(
exec_ctx, sd->subchannel, p->base.interested_parties,
&sd->curr_connectivity_state, &sd->connectivity_changed_closure);
break;
case GRPC_CHANNEL_TRANSIENT_FAILURE:
++p->num_transient_failures;
/* remove from ready list if still present */
if (sd->ready_list_node != NULL) {
remove_disconnected_sc_locked(p, sd->ready_list_node);
sd->ready_list_node = NULL;
}
update_lb_connectivity_status(exec_ctx, sd, error);
sd->prev_connectivity_state = sd->curr_connectivity_state;
/* renew notification: reuses the "rr_connectivity" weak ref */
grpc_subchannel_notify_on_state_change(
exec_ctx, sd->subchannel, p->base.interested_parties,
&sd->curr_connectivity_state, &sd->connectivity_changed_closure);
break;
case GRPC_CHANNEL_SHUTDOWN:
update_state_counters(sd);
if (sd->ready_list_node != NULL) {
remove_disconnected_sc_locked(p, sd->ready_list_node);
sd->ready_list_node = NULL;
}
--p->num_subchannels;
GPR_SWAP(subchannel_data *, p->subchannels[sd->index],
p->subchannels[p->num_subchannels]);
GRPC_SUBCHANNEL_UNREF(exec_ctx, sd->subchannel, "rr_subchannel_shutdown");
p->subchannels[sd->index]->index = sd->index;
if (update_lb_connectivity_status(exec_ctx, sd, error) ==
GRPC_CHANNEL_SHUTDOWN) {
/* the policy is shutting down. Flush all the pending picks... */
while ((pp = p->pending_picks)) { while ((pp = p->pending_picks)) {
p->pending_picks = pp->next; p->pending_picks = pp->next;
*pp->target = NULL;
*pp->target = GRPC_CONNECTED_SUBCHANNEL_REF(
grpc_subchannel_get_connected_subchannel(selected->subchannel),
"picked");
if (pp->user_data != NULL) {
*pp->user_data = selected->user_data;
}
if (grpc_lb_round_robin_trace) {
gpr_log(GPR_DEBUG,
"[RR CONN CHANGED] TARGET <-- SUBCHANNEL %p (NODE %p)",
(void *)selected->subchannel, (void *)selected);
}
grpc_exec_ctx_sched(exec_ctx, pp->on_complete, GRPC_ERROR_NONE, NULL); grpc_exec_ctx_sched(exec_ctx, pp->on_complete, GRPC_ERROR_NONE, NULL);
gpr_free(pp); gpr_free(pp);
} }
grpc_subchannel_notify_on_state_change( }
exec_ctx, sd->subchannel, p->base.interested_parties, gpr_free(sd);
&sd->connectivity_state, &sd->connectivity_changed_closure); /* unref the "rr_connectivity" weak ref from start_picking */
break; GRPC_LB_POLICY_WEAK_UNREF(exec_ctx, &p->base, "rr_connectivity");
case GRPC_CHANNEL_CONNECTING: break;
case GRPC_CHANNEL_IDLE:
grpc_connectivity_state_set(
exec_ctx, &p->state_tracker, sd->connectivity_state,
GRPC_ERROR_REF(error), "connecting_changed");
grpc_subchannel_notify_on_state_change(
exec_ctx, sd->subchannel, p->base.interested_parties,
&sd->connectivity_state, &sd->connectivity_changed_closure);
break;
case GRPC_CHANNEL_TRANSIENT_FAILURE:
/* renew state notification */
grpc_subchannel_notify_on_state_change(
exec_ctx, sd->subchannel, p->base.interested_parties,
&sd->connectivity_state, &sd->connectivity_changed_closure);
/* remove from ready list if still present */
if (sd->ready_list_node != NULL) {
remove_disconnected_sc_locked(p, sd->ready_list_node);
sd->ready_list_node = NULL;
}
grpc_connectivity_state_set(
exec_ctx, &p->state_tracker, GRPC_CHANNEL_TRANSIENT_FAILURE,
GRPC_ERROR_REF(error), "connecting_transient_failure");
break;
case GRPC_CHANNEL_SHUTDOWN:
if (sd->ready_list_node != NULL) {
remove_disconnected_sc_locked(p, sd->ready_list_node);
sd->ready_list_node = NULL;
}
p->num_subchannels--;
GPR_SWAP(subchannel_data *, p->subchannels[sd->index],
p->subchannels[p->num_subchannels]);
GRPC_SUBCHANNEL_UNREF(exec_ctx, sd->subchannel, "round_robin");
p->subchannels[sd->index]->index = sd->index;
gpr_free(sd);
unref = 1;
if (p->num_subchannels == 0) {
grpc_connectivity_state_set(
exec_ctx, &p->state_tracker, GRPC_CHANNEL_SHUTDOWN,
GRPC_ERROR_CREATE_REFERENCING("Round Robin Channels Exhausted",
&error, 1),
"no_more_channels");
while ((pp = p->pending_picks)) {
p->pending_picks = pp->next;
*pp->target = NULL;
grpc_exec_ctx_sched(exec_ctx, pp->on_complete, GRPC_ERROR_NONE,
NULL);
gpr_free(pp);
}
} else {
grpc_connectivity_state_set(
exec_ctx, &p->state_tracker, GRPC_CHANNEL_TRANSIENT_FAILURE,
GRPC_ERROR_REF(error), "subchannel_failed");
}
} /* switch */
} /* !unref */
gpr_mu_unlock(&p->mu);
if (unref) {
GRPC_LB_POLICY_WEAK_UNREF(exec_ctx, &p->base, "round_robin_connectivity");
} }
gpr_mu_unlock(&p->mu);
GRPC_ERROR_UNREF(error); GRPC_ERROR_UNREF(error);
} }
@ -607,9 +679,9 @@ static void rr_ping_one(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol,
gpr_mu_unlock(&p->mu); gpr_mu_unlock(&p->mu);
target = GRPC_CONNECTED_SUBCHANNEL_REF( target = GRPC_CONNECTED_SUBCHANNEL_REF(
grpc_subchannel_get_connected_subchannel(selected->subchannel), grpc_subchannel_get_connected_subchannel(selected->subchannel),
"picked"); "rr_picked");
grpc_connected_subchannel_ping(exec_ctx, target, closure); grpc_connected_subchannel_ping(exec_ctx, target, closure);
GRPC_CONNECTED_SUBCHANNEL_UNREF(exec_ctx, target, "picked"); GRPC_CONNECTED_SUBCHANNEL_UNREF(exec_ctx, target, "rr_picked");
} else { } else {
gpr_mu_unlock(&p->mu); gpr_mu_unlock(&p->mu);
grpc_exec_ctx_sched(exec_ctx, closure, grpc_exec_ctx_sched(exec_ctx, closure,
@ -705,6 +777,11 @@ static grpc_lb_policy *round_robin_create(grpc_exec_ctx *exec_ctx,
grpc_lb_policy_init(&p->base, &round_robin_lb_policy_vtable); grpc_lb_policy_init(&p->base, &round_robin_lb_policy_vtable);
grpc_connectivity_state_init(&p->state_tracker, GRPC_CHANNEL_IDLE, grpc_connectivity_state_init(&p->state_tracker, GRPC_CHANNEL_IDLE,
"round_robin"); "round_robin");
if (grpc_lb_round_robin_trace) {
gpr_log(GPR_DEBUG, "Created RR policy at %p with %lu subchannels",
(void *)p, (unsigned long)p->num_subchannels);
}
gpr_mu_init(&p->mu); gpr_mu_init(&p->mu);
return &p->base; return &p->base;
} }

@ -1037,7 +1037,7 @@ static void perform_stream_op_locked(grpc_exec_ctx *exec_ctx, void *stream_op,
"op.send_initial_metadata"); "op.send_initial_metadata");
} }
} else { } else {
s->send_trailing_metadata = NULL; s->send_initial_metadata = NULL;
grpc_chttp2_complete_closure_step( grpc_chttp2_complete_closure_step(
exec_ctx, t, s, &s->send_initial_metadata_finished, exec_ctx, t, s, &s->send_initial_metadata_finished,
GRPC_ERROR_CREATE( GRPC_ERROR_CREATE(
@ -1523,13 +1523,17 @@ static void fail_pending_writes(grpc_exec_ctx *exec_ctx,
grpc_error *error) { grpc_error *error) {
error = error =
removal_error(error, s, "Pending writes failed due to stream closure"); removal_error(error, s, "Pending writes failed due to stream closure");
s->fetching_send_message = NULL; s->send_initial_metadata = NULL;
grpc_chttp2_complete_closure_step( grpc_chttp2_complete_closure_step(
exec_ctx, t, s, &s->send_initial_metadata_finished, GRPC_ERROR_REF(error), exec_ctx, t, s, &s->send_initial_metadata_finished, GRPC_ERROR_REF(error),
"send_initial_metadata_finished"); "send_initial_metadata_finished");
s->send_trailing_metadata = NULL;
grpc_chttp2_complete_closure_step( grpc_chttp2_complete_closure_step(
exec_ctx, t, s, &s->send_trailing_metadata_finished, exec_ctx, t, s, &s->send_trailing_metadata_finished,
GRPC_ERROR_REF(error), "send_trailing_metadata_finished"); GRPC_ERROR_REF(error), "send_trailing_metadata_finished");
s->fetching_send_message = NULL;
grpc_chttp2_complete_closure_step( grpc_chttp2_complete_closure_step(
exec_ctx, t, s, &s->fetching_send_message_finished, GRPC_ERROR_REF(error), exec_ctx, t, s, &s->fetching_send_message_finished, GRPC_ERROR_REF(error),
"fetching_send_message_finished"); "fetching_send_message_finished");

@ -471,7 +471,8 @@ static void on_initial_header(grpc_exec_ctx *exec_ctx, void *tp,
grpc_mdstr_as_c_string(md->value)); grpc_mdstr_as_c_string(md->value));
*cached_timeout = gpr_inf_future(GPR_TIMESPAN); *cached_timeout = gpr_inf_future(GPR_TIMESPAN);
} }
grpc_mdelem_set_user_data(md, free_timeout, cached_timeout); cached_timeout =
grpc_mdelem_set_user_data(md, free_timeout, cached_timeout);
} }
grpc_chttp2_incoming_metadata_buffer_set_deadline( grpc_chttp2_incoming_metadata_buffer_set_deadline(
&s->metadata_buffer[0], &s->metadata_buffer[0],

@ -162,7 +162,8 @@ grpc_error *grpc_call_stack_init(
grpc_exec_ctx *exec_ctx, grpc_channel_stack *channel_stack, grpc_exec_ctx *exec_ctx, grpc_channel_stack *channel_stack,
int initial_refs, grpc_iomgr_cb_func destroy, void *destroy_arg, int initial_refs, grpc_iomgr_cb_func destroy, void *destroy_arg,
grpc_call_context_element *context, const void *transport_server_data, grpc_call_context_element *context, const void *transport_server_data,
grpc_mdstr *path, gpr_timespec deadline, grpc_call_stack *call_stack) { grpc_mdstr *path, gpr_timespec start_time, gpr_timespec deadline,
grpc_call_stack *call_stack) {
grpc_channel_element *channel_elems = CHANNEL_ELEMS_FROM_STACK(channel_stack); grpc_channel_element *channel_elems = CHANNEL_ELEMS_FROM_STACK(channel_stack);
grpc_call_element_args args; grpc_call_element_args args;
size_t count = channel_stack->count; size_t count = channel_stack->count;
@ -179,7 +180,7 @@ grpc_error *grpc_call_stack_init(
/* init per-filter data */ /* init per-filter data */
grpc_error *first_error = GRPC_ERROR_NONE; grpc_error *first_error = GRPC_ERROR_NONE;
args.start_time = gpr_now(GPR_CLOCK_MONOTONIC); args.start_time = start_time;
for (i = 0; i < count; i++) { for (i = 0; i < count; i++) {
args.call_stack = call_stack; args.call_stack = call_stack;
args.server_transport_data = transport_server_data; args.server_transport_data = transport_server_data;

@ -231,7 +231,8 @@ grpc_error *grpc_call_stack_init(
grpc_exec_ctx *exec_ctx, grpc_channel_stack *channel_stack, grpc_exec_ctx *exec_ctx, grpc_channel_stack *channel_stack,
int initial_refs, grpc_iomgr_cb_func destroy, void *destroy_arg, int initial_refs, grpc_iomgr_cb_func destroy, void *destroy_arg,
grpc_call_context_element *context, const void *transport_server_data, grpc_call_context_element *context, const void *transport_server_data,
grpc_mdstr *path, gpr_timespec deadline, grpc_call_stack *call_stack); grpc_mdstr *path, gpr_timespec start_time, gpr_timespec deadline,
grpc_call_stack *call_stack);
/* Set a pollset or a pollset_set for a call stack: must occur before the first /* Set a pollset or a pollset_set for a call stack: must occur before the first
* op is started */ * op is started */
void grpc_call_stack_set_pollset_or_pollset_set(grpc_exec_ctx *exec_ctx, void grpc_call_stack_set_pollset_or_pollset_set(grpc_exec_ctx *exec_ctx,

File diff suppressed because it is too large Load Diff

@ -1,41 +0,0 @@
/*
*
* Copyright 2015, Google Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following disclaimer
* in the documentation and/or other materials provided with the
* distribution.
* * Neither the name of Google Inc. nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
#ifndef GRPC_CORE_LIB_IOMGR_EV_POLL_AND_EPOLL_POSIX_H
#define GRPC_CORE_LIB_IOMGR_EV_POLL_AND_EPOLL_POSIX_H
#include "src/core/lib/iomgr/ev_posix.h"
const grpc_event_engine_vtable *grpc_init_poll_and_epoll_posix(void);
#endif /* GRPC_CORE_LIB_IOMGR_EV_POLL_AND_EPOLL_POSIX_H */

@ -45,7 +45,6 @@
#include <grpc/support/useful.h> #include <grpc/support/useful.h>
#include "src/core/lib/iomgr/ev_epoll_linux.h" #include "src/core/lib/iomgr/ev_epoll_linux.h"
#include "src/core/lib/iomgr/ev_poll_and_epoll_posix.h"
#include "src/core/lib/iomgr/ev_poll_posix.h" #include "src/core/lib/iomgr/ev_poll_posix.h"
#include "src/core/lib/support/env.h" #include "src/core/lib/support/env.h"
@ -67,7 +66,6 @@ static const event_engine_factory g_factories[] = {
{"epoll", grpc_init_epoll_linux}, {"epoll", grpc_init_epoll_linux},
{"poll", grpc_init_poll_posix}, {"poll", grpc_init_poll_posix},
{"poll-cv", grpc_init_poll_cv_posix}, {"poll-cv", grpc_init_poll_cv_posix},
{"legacy", grpc_init_poll_and_epoll_posix},
}; };
static void add(const char *beg, const char *end, char ***ss, size_t *ns) { static void add(const char *beg, const char *end, char ***ss, size_t *ns) {

@ -144,17 +144,44 @@ grpc_service_account_jwt_access_credentials_create_from_auth_json_key(
return &c->base; return &c->base;
} }
static char *redact_private_key(const char *json_key) {
char *json_copy = gpr_strdup(json_key);
grpc_json *json = grpc_json_parse_string(json_copy);
if (!json) {
gpr_free(json_copy);
return gpr_strdup("<Json failed to parse.>");
}
const char *redacted = "<redacted>";
grpc_json *current = json->child;
while (current) {
if (current->type == GRPC_JSON_STRING &&
strcmp(current->key, "private_key") == 0) {
current->value = (char *)redacted;
break;
}
current = current->next;
}
char *clean_json = grpc_json_dump_to_string(json, 2);
gpr_free(json_copy);
grpc_json_destroy(json);
return clean_json;
}
grpc_call_credentials *grpc_service_account_jwt_access_credentials_create( grpc_call_credentials *grpc_service_account_jwt_access_credentials_create(
const char *json_key, gpr_timespec token_lifetime, void *reserved) { const char *json_key, gpr_timespec token_lifetime, void *reserved) {
GRPC_API_TRACE( if (grpc_api_trace) {
"grpc_service_account_jwt_access_credentials_create(" char *clean_json = redact_private_key(json_key);
"json_key=%s, " gpr_log(GPR_INFO,
"token_lifetime=" "grpc_service_account_jwt_access_credentials_create("
"gpr_timespec { tv_sec: %" PRId64 "json_key=%s, "
", tv_nsec: %d, clock_type: %d }, " "token_lifetime="
"reserved=%p)", "gpr_timespec { tv_sec: %" PRId64
5, (json_key, token_lifetime.tv_sec, token_lifetime.tv_nsec, ", tv_nsec: %d, clock_type: %d }, "
(int)token_lifetime.clock_type, reserved)); "reserved=%p)",
clean_json, token_lifetime.tv_sec, token_lifetime.tv_nsec,
(int)token_lifetime.clock_type, reserved);
gpr_free(clean_json);
}
GPR_ASSERT(reserved == NULL); GPR_ASSERT(reserved == NULL);
return grpc_service_account_jwt_access_credentials_create_from_auth_json_key( return grpc_service_account_jwt_access_credentials_create_from_auth_json_key(
grpc_auth_json_key_create_from_string(json_key), token_lifetime); grpc_auth_json_key_create_from_string(json_key), token_lifetime);

@ -392,15 +392,32 @@ grpc_refresh_token_credentials_create_from_auth_refresh_token(
return &c->base.base; return &c->base.base;
} }
static char *create_loggable_refresh_token(grpc_auth_refresh_token *token) {
if (strcmp(token->type, GRPC_AUTH_JSON_TYPE_INVALID) == 0) {
return gpr_strdup("<Invalid json token>");
}
char *loggable_token = NULL;
gpr_asprintf(&loggable_token,
"{\n type: %s\n client_id: %s\n client_secret: "
"<redacted>\n refresh_token: <redacted>\n}",
token->type, token->client_id);
return loggable_token;
}
grpc_call_credentials *grpc_google_refresh_token_credentials_create( grpc_call_credentials *grpc_google_refresh_token_credentials_create(
const char *json_refresh_token, void *reserved) { const char *json_refresh_token, void *reserved) {
GRPC_API_TRACE( grpc_auth_refresh_token token =
"grpc_refresh_token_credentials_create(json_refresh_token=%s, " grpc_auth_refresh_token_create_from_string(json_refresh_token);
"reserved=%p)", if (grpc_api_trace) {
2, (json_refresh_token, reserved)); char *loggable_token = create_loggable_refresh_token(&token);
gpr_log(GPR_INFO,
"grpc_refresh_token_credentials_create(json_refresh_token=%s, "
"reserved=%p)",
loggable_token, reserved);
gpr_free(loggable_token);
}
GPR_ASSERT(reserved == NULL); GPR_ASSERT(reserved == NULL);
return grpc_refresh_token_credentials_create_from_auth_refresh_token( return grpc_refresh_token_credentials_create_from_auth_refresh_token(token);
grpc_auth_refresh_token_create_from_string(json_refresh_token));
} }
// //
@ -430,9 +447,9 @@ grpc_call_credentials *grpc_access_token_credentials_create(
gpr_malloc(sizeof(grpc_access_token_credentials)); gpr_malloc(sizeof(grpc_access_token_credentials));
char *token_md_value; char *token_md_value;
GRPC_API_TRACE( GRPC_API_TRACE(
"grpc_access_token_credentials_create(access_token=%s, " "grpc_access_token_credentials_create(access_token=<redacted>, "
"reserved=%p)", "reserved=%p)",
2, (access_token, reserved)); 1, (reserved));
GPR_ASSERT(reserved == NULL); GPR_ASSERT(reserved == NULL);
memset(c, 0, sizeof(grpc_access_token_credentials)); memset(c, 0, sizeof(grpc_access_token_credentials));
c->base.type = GRPC_CALL_CREDENTIALS_TYPE_OAUTH2; c->base.type = GRPC_CALL_CREDENTIALS_TYPE_OAUTH2;

@ -123,6 +123,7 @@ struct grpc_call {
grpc_channel *channel; grpc_channel *channel;
grpc_call *parent; grpc_call *parent;
grpc_call *first_child; grpc_call *first_child;
gpr_timespec start_time;
/* TODO(ctiller): share with cq if possible? */ /* TODO(ctiller): share with cq if possible? */
gpr_mu mu; gpr_mu mu;
@ -240,6 +241,7 @@ grpc_error *grpc_call_create(const grpc_call_create_args *args,
call->channel = args->channel; call->channel = args->channel;
call->cq = args->cq; call->cq = args->cq;
call->parent = args->parent_call; call->parent = args->parent_call;
call->start_time = gpr_now(GPR_CLOCK_MONOTONIC);
/* Always support no compression */ /* Always support no compression */
GPR_BITSET(&call->encodings_accepted_by_peer, GRPC_COMPRESS_NONE); GPR_BITSET(&call->encodings_accepted_by_peer, GRPC_COMPRESS_NONE);
call->is_client = args->server_transport_data == NULL; call->is_client = args->server_transport_data == NULL;
@ -312,10 +314,10 @@ grpc_error *grpc_call_create(const grpc_call_create_args *args,
GRPC_CHANNEL_INTERNAL_REF(args->channel, "call"); GRPC_CHANNEL_INTERNAL_REF(args->channel, "call");
/* initial refcount dropped by grpc_call_destroy */ /* initial refcount dropped by grpc_call_destroy */
grpc_error *error = grpc_error *error = grpc_call_stack_init(
grpc_call_stack_init(&exec_ctx, channel_stack, 1, destroy_call, call, &exec_ctx, channel_stack, 1, destroy_call, call, call->context,
call->context, args->server_transport_data, path, args->server_transport_data, path, call->start_time, send_deadline,
send_deadline, CALL_STACK_FROM_CALL(call)); CALL_STACK_FROM_CALL(call));
if (error != GRPC_ERROR_NONE) { if (error != GRPC_ERROR_NONE) {
grpc_status_code status; grpc_status_code status;
const char *error_str; const char *error_str;
@ -428,6 +430,8 @@ static void destroy_call(grpc_exec_ctx *exec_ctx, void *call,
get_final_status(call, set_status_value_directly, get_final_status(call, set_status_value_directly,
&c->final_info.final_status); &c->final_info.final_status);
c->final_info.stats.latency =
gpr_time_sub(gpr_now(GPR_CLOCK_MONOTONIC), c->start_time);
grpc_call_stack_destroy(exec_ctx, CALL_STACK_FROM_CALL(c), &c->final_info, c); grpc_call_stack_destroy(exec_ctx, CALL_STACK_FROM_CALL(c), &c->final_info, c);
GRPC_CHANNEL_INTERNAL_UNREF(exec_ctx, channel, "call"); GRPC_CHANNEL_INTERNAL_UNREF(exec_ctx, channel, "call");

@ -43,6 +43,8 @@ int grpc_connectivity_state_trace = 0;
const char *grpc_connectivity_state_name(grpc_connectivity_state state) { const char *grpc_connectivity_state_name(grpc_connectivity_state state) {
switch (state) { switch (state) {
case GRPC_CHANNEL_INIT:
return "INIT";
case GRPC_CHANNEL_IDLE: case GRPC_CHANNEL_IDLE:
return "IDLE"; return "IDLE";
case GRPC_CHANNEL_CONNECTING: case GRPC_CHANNEL_CONNECTING:
@ -159,6 +161,7 @@ void grpc_connectivity_state_set(grpc_exec_ctx *exec_ctx,
grpc_error_free_string(error_string); grpc_error_free_string(error_string);
} }
switch (state) { switch (state) {
case GRPC_CHANNEL_INIT:
case GRPC_CHANNEL_CONNECTING: case GRPC_CHANNEL_CONNECTING:
case GRPC_CHANNEL_IDLE: case GRPC_CHANNEL_IDLE:
case GRPC_CHANNEL_READY: case GRPC_CHANNEL_READY:

@ -728,8 +728,8 @@ void *grpc_mdelem_get_user_data(grpc_mdelem *md, void (*destroy_func)(void *)) {
return result; return result;
} }
void grpc_mdelem_set_user_data(grpc_mdelem *md, void (*destroy_func)(void *), void *grpc_mdelem_set_user_data(grpc_mdelem *md, void (*destroy_func)(void *),
void *user_data) { void *user_data) {
internal_metadata *im = (internal_metadata *)md; internal_metadata *im = (internal_metadata *)md;
GPR_ASSERT(!is_mdelem_static(md)); GPR_ASSERT(!is_mdelem_static(md));
GPR_ASSERT((user_data == NULL) == (destroy_func == NULL)); GPR_ASSERT((user_data == NULL) == (destroy_func == NULL));
@ -740,11 +740,12 @@ void grpc_mdelem_set_user_data(grpc_mdelem *md, void (*destroy_func)(void *),
if (destroy_func != NULL) { if (destroy_func != NULL) {
destroy_func(user_data); destroy_func(user_data);
} }
return; return (void *)gpr_atm_no_barrier_load(&im->user_data);
} }
gpr_atm_no_barrier_store(&im->user_data, (gpr_atm)user_data); gpr_atm_no_barrier_store(&im->user_data, (gpr_atm)user_data);
gpr_atm_rel_store(&im->destroy_user_data, (gpr_atm)destroy_func); gpr_atm_rel_store(&im->destroy_user_data, (gpr_atm)destroy_func);
gpr_mu_unlock(&im->mu_user_data); gpr_mu_unlock(&im->mu_user_data);
return user_data;
} }
grpc_slice grpc_mdstr_as_base64_encoded_and_huffman_compressed(grpc_mdstr *gs) { grpc_slice grpc_mdstr_as_base64_encoded_and_huffman_compressed(grpc_mdstr *gs) {

@ -120,8 +120,8 @@ size_t grpc_mdelem_get_size_in_hpack_table(grpc_mdelem *elem);
is used as a type tag and is checked during user_data fetch. */ is used as a type tag and is checked during user_data fetch. */
void *grpc_mdelem_get_user_data(grpc_mdelem *md, void *grpc_mdelem_get_user_data(grpc_mdelem *md,
void (*if_destroy_func)(void *)); void (*if_destroy_func)(void *));
void grpc_mdelem_set_user_data(grpc_mdelem *md, void (*destroy_func)(void *), void *grpc_mdelem_set_user_data(grpc_mdelem *md, void (*destroy_func)(void *),
void *user_data); void *user_data);
/* Reference counting */ /* Reference counting */
//#define GRPC_METADATA_REFCOUNT_DEBUG //#define GRPC_METADATA_REFCOUNT_DEBUG

@ -141,8 +141,14 @@ exports.getProtobufServiceAttrs = function getProtobufServiceAttrs(service,
binaryAsBase64 = options.binaryAsBase64; binaryAsBase64 = options.binaryAsBase64;
longsAsStrings = options.longsAsStrings; longsAsStrings = options.longsAsStrings;
} }
return _.fromPairs(_.map(service.children, function(method) { /* This slightly awkward construction is used to make sure we only use
return [_.camelCase(method.name), { lodash@3.10.1-compatible functions. A previous version used
_.fromPairs, which would be cleaner, but was introduced in lodash
version 4 */
return _.zipObject(_.map(service.children, function(method) {
return _.camelCase(method.name);
}), _.map(service.children, function(method) {
return {
path: prefix + method.name, path: prefix + method.name,
requestStream: method.requestStream, requestStream: method.requestStream,
responseStream: method.responseStream, responseStream: method.responseStream,
@ -150,11 +156,11 @@ exports.getProtobufServiceAttrs = function getProtobufServiceAttrs(service,
responseType: method.resolvedResponseType, responseType: method.resolvedResponseType,
requestSerialize: serializeCls(method.resolvedRequestType.build()), requestSerialize: serializeCls(method.resolvedRequestType.build()),
requestDeserialize: deserializeCls(method.resolvedRequestType.build(), requestDeserialize: deserializeCls(method.resolvedRequestType.build(),
binaryAsBase64, longsAsStrings), binaryAsBase64, longsAsStrings),
responseSerialize: serializeCls(method.resolvedResponseType.build()), responseSerialize: serializeCls(method.resolvedResponseType.build()),
responseDeserialize: deserializeCls(method.resolvedResponseType.build(), responseDeserialize: deserializeCls(method.resolvedResponseType.build(),
binaryAsBase64, longsAsStrings) binaryAsBase64, longsAsStrings)
}]; };
})); }));
}; };

@ -99,7 +99,6 @@ CORE_SOURCE_FILES = [
'src/core/lib/iomgr/endpoint_pair_windows.c', 'src/core/lib/iomgr/endpoint_pair_windows.c',
'src/core/lib/iomgr/error.c', 'src/core/lib/iomgr/error.c',
'src/core/lib/iomgr/ev_epoll_linux.c', 'src/core/lib/iomgr/ev_epoll_linux.c',
'src/core/lib/iomgr/ev_poll_and_epoll_posix.c',
'src/core/lib/iomgr/ev_poll_posix.c', 'src/core/lib/iomgr/ev_poll_posix.c',
'src/core/lib/iomgr/ev_posix.c', 'src/core/lib/iomgr/ev_posix.c',
'src/core/lib/iomgr/exec_ctx.c', 'src/core/lib/iomgr/exec_ctx.c',

@ -137,9 +137,10 @@ static void test_create_channel_stack(void) {
GPR_ASSERT(*channel_data == 0); GPR_ASSERT(*channel_data == 0);
call_stack = gpr_malloc(channel_stack->call_stack_size); call_stack = gpr_malloc(channel_stack->call_stack_size);
grpc_error *error = grpc_call_stack_init( grpc_error *error =
&exec_ctx, channel_stack, 1, free_call, call_stack, NULL, NULL, path, grpc_call_stack_init(&exec_ctx, channel_stack, 1, free_call, call_stack,
gpr_inf_future(GPR_CLOCK_MONOTONIC), call_stack); NULL, NULL, path, gpr_now(GPR_CLOCK_MONOTONIC),
gpr_inf_future(GPR_CLOCK_MONOTONIC), call_stack);
GPR_ASSERT(error == GRPC_ERROR_NONE); GPR_ASSERT(error == GRPC_ERROR_NONE);
GPR_ASSERT(call_stack->count == 1); GPR_ASSERT(call_stack->count == 1);
call_elem = grpc_call_stack_element(call_stack, 0); call_elem = grpc_call_stack_element(call_stack, 0);

@ -62,8 +62,14 @@ typedef struct servers_fixture {
grpc_metadata_array *request_metadata_recv; grpc_metadata_array *request_metadata_recv;
} servers_fixture; } servers_fixture;
typedef struct request_sequences {
size_t n;
int *connections;
int *connectivity_states;
} request_sequences;
typedef void (*verifier_fn)(const servers_fixture *, grpc_channel *, typedef void (*verifier_fn)(const servers_fixture *, grpc_channel *,
const int *, const size_t); const request_sequences *, const size_t);
typedef struct test_spec { typedef struct test_spec {
size_t num_iters; size_t num_iters;
@ -227,9 +233,24 @@ static void teardown_servers(servers_fixture *f) {
gpr_free(f); gpr_free(f);
} }
static request_sequences request_sequences_create(size_t n) {
request_sequences res;
res.n = n;
res.connections = gpr_malloc(sizeof(*res.connections) * n);
res.connectivity_states = gpr_malloc(sizeof(*res.connectivity_states) * n);
return res;
}
static void request_sequences_destroy(const request_sequences *rseqs) {
gpr_free(rseqs->connections);
gpr_free(rseqs->connectivity_states);
}
/** Returns connection sequence (server indices), which must be freed */ /** Returns connection sequence (server indices), which must be freed */
static int *perform_request(servers_fixture *f, grpc_channel *client, static request_sequences perform_request(servers_fixture *f,
request_data *rdata, const test_spec *spec) { grpc_channel *client,
request_data *rdata,
const test_spec *spec) {
grpc_call *c; grpc_call *c;
int s_idx; int s_idx;
int *s_valid; int *s_valid;
@ -239,11 +260,10 @@ static int *perform_request(servers_fixture *f, grpc_channel *client,
size_t i, iter_num; size_t i, iter_num;
grpc_event ev; grpc_event ev;
int read_tag; int read_tag;
int *connection_sequence;
int completed_client; int completed_client;
const request_sequences sequences = request_sequences_create(spec->num_iters);
s_valid = gpr_malloc(sizeof(int) * f->num_servers); s_valid = gpr_malloc(sizeof(int) * f->num_servers);
connection_sequence = gpr_malloc(sizeof(int) * spec->num_iters);
for (iter_num = 0; iter_num < spec->num_iters; iter_num++) { for (iter_num = 0; iter_num < spec->num_iters; iter_num++) {
cq_verifier *cqv = cq_verifier_create(f->cq); cq_verifier *cqv = cq_verifier_create(f->cq);
@ -260,7 +280,7 @@ static int *perform_request(servers_fixture *f, grpc_channel *client,
} }
} }
connection_sequence[iter_num] = -1; sequences.connections[iter_num] = -1;
grpc_metadata_array_init(&rdata->initial_metadata_recv); grpc_metadata_array_init(&rdata->initial_metadata_recv);
grpc_metadata_array_init(&rdata->trailing_metadata_recv); grpc_metadata_array_init(&rdata->trailing_metadata_recv);
@ -305,12 +325,14 @@ static int *perform_request(servers_fixture *f, grpc_channel *client,
grpc_call_start_batch(c, ops, (size_t)(op - ops), tag(1), NULL)); grpc_call_start_batch(c, ops, (size_t)(op - ops), tag(1), NULL));
s_idx = -1; s_idx = -1;
while ( while ((ev = grpc_completion_queue_next(
(ev = grpc_completion_queue_next( f->cq, GRPC_TIMEOUT_MILLIS_TO_DEADLINE(RETRY_TIMEOUT), NULL))
f->cq, GRPC_TIMEOUT_MILLIS_TO_DEADLINE(10 * RETRY_TIMEOUT), NULL)) .type != GRPC_QUEUE_TIMEOUT) {
.type != GRPC_QUEUE_TIMEOUT) {
GPR_ASSERT(ev.type == GRPC_OP_COMPLETE); GPR_ASSERT(ev.type == GRPC_OP_COMPLETE);
read_tag = ((int)(intptr_t)ev.tag); read_tag = ((int)(intptr_t)ev.tag);
const grpc_connectivity_state conn_state =
grpc_channel_check_connectivity_state(client, 0);
sequences.connectivity_states[iter_num] = conn_state;
gpr_log(GPR_DEBUG, "EVENT: success:%d, type:%d, tag:%d iter:%" PRIuPTR, gpr_log(GPR_DEBUG, "EVENT: success:%d, type:%d, tag:%d iter:%" PRIuPTR,
ev.success, ev.type, read_tag, iter_num); ev.success, ev.type, read_tag, iter_num);
if (ev.success && read_tag >= 1000) { if (ev.success && read_tag >= 1000) {
@ -318,7 +340,7 @@ static int *perform_request(servers_fixture *f, grpc_channel *client,
/* only server notifications for non-shutdown events */ /* only server notifications for non-shutdown events */
s_idx = read_tag - 1000; s_idx = read_tag - 1000;
s_valid[s_idx] = 1; s_valid[s_idx] = 1;
connection_sequence[iter_num] = s_idx; sequences.connections[iter_num] = s_idx;
break; break;
} else if (read_tag == 1) { } else if (read_tag == 1) {
gpr_log(GPR_DEBUG, "client timed out"); gpr_log(GPR_DEBUG, "client timed out");
@ -381,10 +403,9 @@ static int *perform_request(servers_fixture *f, grpc_channel *client,
} }
} }
GPR_ASSERT( GPR_ASSERT(grpc_completion_queue_next(
grpc_completion_queue_next( f->cq, GRPC_TIMEOUT_MILLIS_TO_DEADLINE(RETRY_TIMEOUT), NULL)
f->cq, GRPC_TIMEOUT_MILLIS_TO_DEADLINE(2 * RETRY_TIMEOUT), NULL) .type == GRPC_QUEUE_TIMEOUT);
.type == GRPC_QUEUE_TIMEOUT);
grpc_metadata_array_destroy(&rdata->initial_metadata_recv); grpc_metadata_array_destroy(&rdata->initial_metadata_recv);
grpc_metadata_array_destroy(&rdata->trailing_metadata_recv); grpc_metadata_array_destroy(&rdata->trailing_metadata_recv);
@ -401,7 +422,7 @@ static int *perform_request(servers_fixture *f, grpc_channel *client,
gpr_free(s_valid); gpr_free(s_valid);
return connection_sequence; return sequences;
} }
static grpc_call **perform_multirequest(servers_fixture *f, static grpc_call **perform_multirequest(servers_fixture *f,
@ -441,62 +462,10 @@ static grpc_call **perform_multirequest(servers_fixture *f,
return calls; return calls;
} }
static void assert_channel_connectivity(grpc_channel *ch,
size_t num_accepted_conn_states,
int accepted_conn_state, ...) {
size_t i;
grpc_channel_stack *client_stack;
grpc_channel_element *client_channel_filter;
grpc_connectivity_state actual_conn_state;
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
va_list ap;
client_stack = grpc_channel_get_channel_stack(ch);
client_channel_filter = grpc_channel_stack_last_element(client_stack);
actual_conn_state = grpc_client_channel_check_connectivity_state(
&exec_ctx, client_channel_filter, 0 /* don't try to connect */);
grpc_exec_ctx_finish(&exec_ctx);
va_start(ap, accepted_conn_state);
for (i = 0; i < num_accepted_conn_states; i++) {
if ((int)actual_conn_state == accepted_conn_state) {
break;
}
accepted_conn_state = va_arg(ap, grpc_connectivity_state);
}
va_end(ap);
if (i == num_accepted_conn_states) {
char **accepted_strs =
gpr_malloc(sizeof(char *) * num_accepted_conn_states);
char *accepted_str_joined;
va_start(ap, accepted_conn_state);
for (i = 0; i < num_accepted_conn_states; i++) {
GPR_ASSERT(gpr_asprintf(&accepted_strs[i], "%d", accepted_conn_state) >
0);
accepted_conn_state = va_arg(ap, grpc_connectivity_state);
}
va_end(ap);
accepted_str_joined = gpr_strjoin_sep((const char **)accepted_strs,
num_accepted_conn_states, ", ", NULL);
gpr_log(
GPR_ERROR,
"Channel connectivity assertion failed: expected <one of [%s]>, got %d",
accepted_str_joined, actual_conn_state);
for (i = 0; i < num_accepted_conn_states; i++) {
gpr_free(accepted_strs[i]);
}
gpr_free(accepted_strs);
gpr_free(accepted_str_joined);
abort();
}
}
void run_spec(const test_spec *spec) { void run_spec(const test_spec *spec) {
grpc_channel *client; grpc_channel *client;
char *client_hostport; char *client_hostport;
char *servers_hostports_str; char *servers_hostports_str;
int *actual_connection_sequence;
request_data rdata; request_data rdata;
servers_fixture *f; servers_fixture *f;
grpc_channel_args args; grpc_channel_args args;
@ -524,14 +493,14 @@ void run_spec(const test_spec *spec) {
gpr_log(GPR_INFO, "Testing '%s' with servers=%s client=%s", spec->description, gpr_log(GPR_INFO, "Testing '%s' with servers=%s client=%s", spec->description,
servers_hostports_str, client_hostport); servers_hostports_str, client_hostport);
actual_connection_sequence = perform_request(f, client, &rdata, spec); const request_sequences sequences = perform_request(f, client, &rdata, spec);
spec->verifier(f, client, actual_connection_sequence, spec->num_iters); spec->verifier(f, client, &sequences, spec->num_iters);
gpr_free(client_hostport); gpr_free(client_hostport);
gpr_free(servers_hostports_str); gpr_free(servers_hostports_str);
gpr_free(actual_connection_sequence);
gpr_free(rdata.call_details); gpr_free(rdata.call_details);
request_sequences_destroy(&sequences);
grpc_channel_destroy(client); /* calls the LB's shutdown func */ grpc_channel_destroy(client); /* calls the LB's shutdown func */
teardown_servers(f); teardown_servers(f);
@ -642,8 +611,16 @@ static void test_pending_calls(size_t concurrent_calls) {
} }
static void test_get_channel_info() { static void test_get_channel_info() {
grpc_channel *channel = grpc_insecure_channel_create( grpc_channel_args args;
"test:127.0.0.1:1234?lb_policy=round_robin", NULL, NULL); grpc_arg arg_array[1];
arg_array[0].type = GRPC_ARG_STRING;
arg_array[0].key = GRPC_ARG_LB_POLICY_NAME;
arg_array[0].value.string = "round_robin";
args.num_args = 1;
args.args = arg_array;
grpc_channel *channel =
grpc_insecure_channel_create("ipv4:127.0.0.1:1234", &args, NULL);
// Ensures that resolver returns. // Ensures that resolver returns.
grpc_channel_check_connectivity_state(channel, true /* try_to_connect */); grpc_channel_check_connectivity_state(channel, true /* try_to_connect */);
// Use grpc_channel_get_info() to get LB policy name. // Use grpc_channel_get_info() to get LB policy name.
@ -676,29 +653,43 @@ static void print_failed_expectations(const int *expected_connection_sequence,
static void verify_vanilla_round_robin(const servers_fixture *f, static void verify_vanilla_round_robin(const servers_fixture *f,
grpc_channel *client, grpc_channel *client,
const int *actual_connection_sequence, const request_sequences *sequences,
const size_t num_iters) { const size_t num_iters) {
int *expected_connection_sequence;
size_t i;
const size_t expected_seq_length = f->num_servers; const size_t expected_seq_length = f->num_servers;
/* verify conn. seq. expectation */ /* verify conn. seq. expectation */
/* get the first sequence of "num_servers" elements */ /* get the first sequence of "num_servers" elements */
expected_connection_sequence = gpr_malloc(sizeof(int) * expected_seq_length); int *expected_connection_sequence =
memcpy(expected_connection_sequence, actual_connection_sequence, gpr_malloc(sizeof(int) * expected_seq_length);
memcpy(expected_connection_sequence, sequences->connections,
sizeof(int) * expected_seq_length); sizeof(int) * expected_seq_length);
for (i = 0; i < num_iters; i++) { for (size_t i = 0; i < num_iters; i++) {
const int actual = actual_connection_sequence[i]; const int actual = sequences->connections[i];
const int expected = expected_connection_sequence[i % expected_seq_length]; const int expected = expected_connection_sequence[i % expected_seq_length];
if (actual != expected) { if (actual != expected) {
print_failed_expectations(expected_connection_sequence, gpr_log(
actual_connection_sequence, expected_seq_length, GPR_ERROR,
num_iters); "CONNECTION SEQUENCE FAILURE: expected %d, got %d at iteration #%d",
expected, actual, (int)i);
abort();
}
}
/* All servers are available, therefore all client subchannels are READY, even
* when we only need one for the client channel state to be READY */
for (size_t i = 0; i < sequences->n; i++) {
const grpc_connectivity_state actual = sequences->connectivity_states[i];
const grpc_connectivity_state expected = GRPC_CHANNEL_READY;
if (actual != expected) {
gpr_log(GPR_ERROR,
"CONNECTIVITY STATUS SEQUENCE FAILURE: expected '%s', got '%s' "
"at iteration #%d",
grpc_connectivity_state_name(expected),
grpc_connectivity_state_name(actual), (int)i);
abort(); abort();
} }
} }
assert_channel_connectivity(client, 1, GRPC_CHANNEL_READY);
gpr_free(expected_connection_sequence); gpr_free(expected_connection_sequence);
} }
@ -707,7 +698,7 @@ static void verify_vanilla_round_robin(const servers_fixture *f,
* given in "f") are killed */ * given in "f") are killed */
static void verify_vanishing_floor_round_robin( static void verify_vanishing_floor_round_robin(
const servers_fixture *f, grpc_channel *client, const servers_fixture *f, grpc_channel *client,
const int *actual_connection_sequence, const size_t num_iters) { const request_sequences *sequences, const size_t num_iters) {
int *expected_connection_sequence; int *expected_connection_sequence;
const size_t expected_seq_length = 2; const size_t expected_seq_length = 2;
size_t i; size_t i;
@ -715,57 +706,83 @@ static void verify_vanishing_floor_round_robin(
/* verify conn. seq. expectation */ /* verify conn. seq. expectation */
/* copy the first full sequence (without -1s) */ /* copy the first full sequence (without -1s) */
expected_connection_sequence = gpr_malloc(sizeof(int) * expected_seq_length); expected_connection_sequence = gpr_malloc(sizeof(int) * expected_seq_length);
memcpy(expected_connection_sequence, actual_connection_sequence + 2, memcpy(expected_connection_sequence, sequences->connections + 2,
expected_seq_length * sizeof(int)); expected_seq_length * sizeof(int));
/* first two elements of the sequence should be [0 (1st server), -1 (failure)] /* first two elements of the sequence should be [0 (1st server), -1 (failure)]
*/ */
GPR_ASSERT(actual_connection_sequence[0] == 0); GPR_ASSERT(sequences->connections[0] == 0);
GPR_ASSERT(actual_connection_sequence[1] == -1); GPR_ASSERT(sequences->connections[1] == -1);
/* the next two element must be [3, 0], repeating from that point: the 3 is /* the next two element must be [3, 0], repeating from that point: the 3 is
* brought forth by servers 1 and 2 disappearing after the intial pick of 0 */ * brought forth by servers 1 and 2 disappearing after the intial pick of 0 */
GPR_ASSERT(actual_connection_sequence[2] == 3); GPR_ASSERT(sequences->connections[2] == 3);
GPR_ASSERT(actual_connection_sequence[3] == 0); GPR_ASSERT(sequences->connections[3] == 0);
/* make sure that the expectation obliges */ /* make sure that the expectation obliges */
for (i = 2; i < num_iters; i++) { for (i = 2; i < num_iters; i++) {
const int actual = actual_connection_sequence[i]; const int actual = sequences->connections[i];
const int expected = expected_connection_sequence[i % expected_seq_length]; const int expected = expected_connection_sequence[i % expected_seq_length];
if (actual != expected) { if (actual != expected) {
print_failed_expectations(expected_connection_sequence, print_failed_expectations(expected_connection_sequence,
actual_connection_sequence, expected_seq_length, sequences->connections, expected_seq_length,
num_iters); num_iters);
abort(); abort();
} }
} }
/* There's always at least one subchannel READY (connected), therefore the
* overall state of the client channel is READY at all times. */
for (i = 0; i < sequences->n; i++) {
const grpc_connectivity_state actual = sequences->connectivity_states[i];
const grpc_connectivity_state expected = GRPC_CHANNEL_READY;
if (actual != expected) {
gpr_log(GPR_ERROR,
"CONNECTIVITY STATUS SEQUENCE FAILURE: expected '%s', got '%s' "
"at iteration #%d",
grpc_connectivity_state_name(expected),
grpc_connectivity_state_name(actual), (int)i);
abort();
}
}
gpr_free(expected_connection_sequence); gpr_free(expected_connection_sequence);
} }
static void verify_total_carnage_round_robin( static void verify_total_carnage_round_robin(const servers_fixture *f,
const servers_fixture *f, grpc_channel *client, grpc_channel *client,
const int *actual_connection_sequence, const size_t num_iters) { const request_sequences *sequences,
size_t i; const size_t num_iters) {
for (size_t i = 0; i < num_iters; i++) {
for (i = 0; i < num_iters; i++) { const int actual = sequences->connections[i];
const int actual = actual_connection_sequence[i];
const int expected = -1; const int expected = -1;
if (actual != expected) { if (actual != expected) {
gpr_log(GPR_ERROR, "FAILURE: expected %d, actual %d at iter %" PRIuPTR, gpr_log(
expected, actual, i); GPR_ERROR,
"CONNECTION SEQUENCE FAILURE: expected %d, got %d at iteration #%d",
expected, actual, (int)i);
abort(); abort();
} }
} }
/* even though we know all the servers are dead, the client is still trying /* no server is ever available. The persistent state is TRANSIENT_FAILURE */
* retrying, believing it's in a transient failure situation */ for (size_t i = 0; i < sequences->n; i++) {
assert_channel_connectivity(client, 2, GRPC_CHANNEL_TRANSIENT_FAILURE, const grpc_connectivity_state actual = sequences->connectivity_states[i];
GRPC_CHANNEL_CONNECTING); const grpc_connectivity_state expected = GRPC_CHANNEL_TRANSIENT_FAILURE;
if (actual != expected) {
gpr_log(GPR_ERROR,
"CONNECTIVITY STATUS SEQUENCE FAILURE: expected '%s', got '%s' "
"at iteration #%d",
grpc_connectivity_state_name(expected),
grpc_connectivity_state_name(actual), (int)i);
abort();
}
}
} }
static void verify_partial_carnage_round_robin( static void verify_partial_carnage_round_robin(
const servers_fixture *f, grpc_channel *client, const servers_fixture *f, grpc_channel *client,
const int *actual_connection_sequence, const size_t num_iters) { const request_sequences *sequences, const size_t num_iters) {
int *expected_connection_sequence; int *expected_connection_sequence;
size_t i; size_t i;
const size_t expected_seq_length = f->num_servers; const size_t expected_seq_length = f->num_servers;
@ -773,15 +790,15 @@ static void verify_partial_carnage_round_robin(
/* verify conn. seq. expectation */ /* verify conn. seq. expectation */
/* get the first sequence of "num_servers" elements */ /* get the first sequence of "num_servers" elements */
expected_connection_sequence = gpr_malloc(sizeof(int) * expected_seq_length); expected_connection_sequence = gpr_malloc(sizeof(int) * expected_seq_length);
memcpy(expected_connection_sequence, actual_connection_sequence, memcpy(expected_connection_sequence, sequences->connections,
sizeof(int) * expected_seq_length); sizeof(int) * expected_seq_length);
for (i = 0; i < num_iters / 2; i++) { for (i = 0; i < num_iters / 2; i++) {
const int actual = actual_connection_sequence[i]; const int actual = sequences->connections[i];
const int expected = expected_connection_sequence[i % expected_seq_length]; const int expected = expected_connection_sequence[i % expected_seq_length];
if (actual != expected) { if (actual != expected) {
print_failed_expectations(expected_connection_sequence, print_failed_expectations(expected_connection_sequence,
actual_connection_sequence, expected_seq_length, sequences->connections, expected_seq_length,
num_iters); num_iters);
abort(); abort();
} }
@ -789,13 +806,34 @@ static void verify_partial_carnage_round_robin(
/* second half of the iterations go without response */ /* second half of the iterations go without response */
for (; i < num_iters; i++) { for (; i < num_iters; i++) {
GPR_ASSERT(actual_connection_sequence[i] == -1); GPR_ASSERT(sequences->connections[i] == -1);
}
/* We can assert that the first client channel state should be READY, when all
* servers were available; and that the last one should be TRANSIENT_FAILURE,
* after all servers are gone. */
grpc_connectivity_state actual = sequences->connectivity_states[0];
grpc_connectivity_state expected = GRPC_CHANNEL_READY;
if (actual != expected) {
gpr_log(GPR_ERROR,
"CONNECTIVITY STATUS SEQUENCE FAILURE: expected '%s', got '%s' "
"at iteration #%d",
grpc_connectivity_state_name(expected),
grpc_connectivity_state_name(actual), 0);
abort();
}
actual = sequences->connectivity_states[num_iters - 1];
expected = GRPC_CHANNEL_TRANSIENT_FAILURE;
if (actual != expected) {
gpr_log(GPR_ERROR,
"CONNECTIVITY STATUS SEQUENCE FAILURE: expected '%s', got '%s' "
"at iteration #%d",
grpc_connectivity_state_name(expected),
grpc_connectivity_state_name(actual), (int)num_iters - 1);
abort();
} }
/* even though we know all the servers are dead, the client is still trying
* retrying, believing it's in a transient failure situation */
assert_channel_connectivity(client, 2, GRPC_CHANNEL_TRANSIENT_FAILURE,
GRPC_CHANNEL_CONNECTING);
gpr_free(expected_connection_sequence); gpr_free(expected_connection_sequence);
} }
@ -818,15 +856,14 @@ static void dump_array(const char *desc, const int *data, const size_t count) {
static void verify_rebirth_round_robin(const servers_fixture *f, static void verify_rebirth_round_robin(const servers_fixture *f,
grpc_channel *client, grpc_channel *client,
const int *actual_connection_sequence, const request_sequences *sequences,
const size_t num_iters) { const size_t num_iters) {
int *expected_connection_sequence; int *expected_connection_sequence;
size_t i, j, unique_seq_last_idx, unique_seq_first_idx; size_t i, j, unique_seq_last_idx, unique_seq_first_idx;
const size_t expected_seq_length = f->num_servers; const size_t expected_seq_length = f->num_servers;
int *seen_elements; int *seen_elements;
dump_array("actual_connection_sequence", actual_connection_sequence, dump_array("actual_connection_sequence", sequences->connections, num_iters);
num_iters);
/* verify conn. seq. expectation */ /* verify conn. seq. expectation */
/* get the first unique run of length "num_servers". */ /* get the first unique run of length "num_servers". */
@ -837,13 +874,13 @@ static void verify_rebirth_round_robin(const servers_fixture *f,
memset(seen_elements, 0, sizeof(int) * expected_seq_length); memset(seen_elements, 0, sizeof(int) * expected_seq_length);
for (i = 0; i < num_iters; i++) { for (i = 0; i < num_iters; i++) {
if (actual_connection_sequence[i] < 0 || if (sequences->connections[i] < 0 ||
seen_elements[actual_connection_sequence[i]] != 0) { seen_elements[sequences->connections[i]] != 0) {
/* if anything breaks the uniqueness of the run, back to square zero */ /* if anything breaks the uniqueness of the run, back to square zero */
memset(seen_elements, 0, sizeof(int) * expected_seq_length); memset(seen_elements, 0, sizeof(int) * expected_seq_length);
continue; continue;
} }
seen_elements[actual_connection_sequence[i]] = 1; seen_elements[sequences->connections[i]] = 1;
for (j = 0; j < expected_seq_length; j++) { for (j = 0; j < expected_seq_length; j++) {
if (seen_elements[j] == 0) break; if (seen_elements[j] == 0) break;
} }
@ -862,30 +899,72 @@ static void verify_rebirth_round_robin(const servers_fixture *f,
unique_seq_first_idx = (unique_seq_last_idx - expected_seq_length + 1); unique_seq_first_idx = (unique_seq_last_idx - expected_seq_length + 1);
memcpy(expected_connection_sequence, memcpy(expected_connection_sequence,
actual_connection_sequence + unique_seq_first_idx, sequences->connections + unique_seq_first_idx,
sizeof(int) * expected_seq_length); sizeof(int) * expected_seq_length);
/* first iteration succeeds */ /* first iteration succeeds */
GPR_ASSERT(actual_connection_sequence[0] != -1); GPR_ASSERT(sequences->connections[0] != -1);
/* then we fail for a while... */ /* then we fail for a while... */
GPR_ASSERT(actual_connection_sequence[1] == -1); GPR_ASSERT(sequences->connections[1] == -1);
/* ... but should be up at "unique_seq_first_idx" */ /* ... but should be up at "unique_seq_first_idx" */
GPR_ASSERT(actual_connection_sequence[unique_seq_first_idx] != -1); GPR_ASSERT(sequences->connections[unique_seq_first_idx] != -1);
for (j = 0, i = unique_seq_first_idx; i < num_iters; i++) { for (j = 0, i = unique_seq_first_idx; i < num_iters; i++) {
const int actual = actual_connection_sequence[i]; const int actual = sequences->connections[i];
const int expected = const int expected =
expected_connection_sequence[j++ % expected_seq_length]; expected_connection_sequence[j++ % expected_seq_length];
if (actual != expected) { if (actual != expected) {
print_failed_expectations(expected_connection_sequence, print_failed_expectations(expected_connection_sequence,
actual_connection_sequence, expected_seq_length, sequences->connections, expected_seq_length,
num_iters); num_iters);
abort(); abort();
} }
} }
/* things are fine once the servers are brought back up */ /* We can assert that the first client channel state should be READY, when all
assert_channel_connectivity(client, 1, GRPC_CHANNEL_READY); * servers were available; same thing for the last one. In the middle
* somewhere there must exist at least one TRANSIENT_FAILURE */
grpc_connectivity_state actual = sequences->connectivity_states[0];
grpc_connectivity_state expected = GRPC_CHANNEL_READY;
if (actual != expected) {
gpr_log(GPR_ERROR,
"CONNECTIVITY STATUS SEQUENCE FAILURE: expected '%s', got '%s' "
"at iteration #%d",
grpc_connectivity_state_name(expected),
grpc_connectivity_state_name(actual), 0);
abort();
}
actual = sequences->connectivity_states[num_iters - 1];
expected = GRPC_CHANNEL_READY;
if (actual != expected) {
gpr_log(GPR_ERROR,
"CONNECTIVITY STATUS SEQUENCE FAILURE: expected '%s', got '%s' "
"at iteration #%d",
grpc_connectivity_state_name(expected),
grpc_connectivity_state_name(actual), (int)num_iters - 1);
abort();
}
bool found_failure_status = false;
for (i = 1; i < sequences->n - 1; i++) {
if (sequences->connectivity_states[i] == GRPC_CHANNEL_TRANSIENT_FAILURE) {
found_failure_status = true;
break;
}
}
if (!found_failure_status) {
gpr_log(
GPR_ERROR,
"CONNECTIVITY STATUS SEQUENCE FAILURE: "
"GRPC_CHANNEL_TRANSIENT_FAILURE status not found. Got the following "
"instead:");
for (i = 0; i < num_iters; i++) {
gpr_log(GPR_ERROR, "[%d]: %s", (int)i,
grpc_connectivity_state_name(sequences->connectivity_states[i]));
}
}
gpr_free(expected_connection_sequence); gpr_free(expected_connection_sequence);
gpr_free(seen_elements); gpr_free(seen_elements);
} }
@ -926,7 +1005,7 @@ int main(int argc, char **argv) {
* This should knock down the server bound to be selected next */ * This should knock down the server bound to be selected next */
test_spec_reset(spec); test_spec_reset(spec);
spec->verifier = verify_vanishing_floor_round_robin; spec->verifier = verify_vanishing_floor_round_robin;
spec->description = "test_kill_all_server_at_2nd_iteration"; spec->description = "test_kill_middle_servers_at_2nd_iteration";
for (i = 1; i < NUM_SERVERS - 1; i++) { for (i = 1; i < NUM_SERVERS - 1; i++) {
spec->kill_at[1][i] = 1; spec->kill_at[1][i] = 1;
} }

@ -75,6 +75,8 @@ extern void filter_call_init_fails(grpc_end2end_test_config config);
extern void filter_call_init_fails_pre_init(void); extern void filter_call_init_fails_pre_init(void);
extern void filter_causes_close(grpc_end2end_test_config config); extern void filter_causes_close(grpc_end2end_test_config config);
extern void filter_causes_close_pre_init(void); extern void filter_causes_close_pre_init(void);
extern void filter_latency(grpc_end2end_test_config config);
extern void filter_latency_pre_init(void);
extern void graceful_server_shutdown(grpc_end2end_test_config config); extern void graceful_server_shutdown(grpc_end2end_test_config config);
extern void graceful_server_shutdown_pre_init(void); extern void graceful_server_shutdown_pre_init(void);
extern void high_initial_seqno(grpc_end2end_test_config config); extern void high_initial_seqno(grpc_end2end_test_config config);
@ -153,6 +155,7 @@ void grpc_end2end_tests_pre_init(void) {
empty_batch_pre_init(); empty_batch_pre_init();
filter_call_init_fails_pre_init(); filter_call_init_fails_pre_init();
filter_causes_close_pre_init(); filter_causes_close_pre_init();
filter_latency_pre_init();
graceful_server_shutdown_pre_init(); graceful_server_shutdown_pre_init();
high_initial_seqno_pre_init(); high_initial_seqno_pre_init();
hpack_size_pre_init(); hpack_size_pre_init();
@ -207,6 +210,7 @@ void grpc_end2end_tests(int argc, char **argv,
empty_batch(config); empty_batch(config);
filter_call_init_fails(config); filter_call_init_fails(config);
filter_causes_close(config); filter_causes_close(config);
filter_latency(config);
graceful_server_shutdown(config); graceful_server_shutdown(config);
high_initial_seqno(config); high_initial_seqno(config);
hpack_size(config); hpack_size(config);
@ -304,6 +308,10 @@ void grpc_end2end_tests(int argc, char **argv,
filter_causes_close(config); filter_causes_close(config);
continue; continue;
} }
if (0 == strcmp("filter_latency", argv[i])) {
filter_latency(config);
continue;
}
if (0 == strcmp("graceful_server_shutdown", argv[i])) { if (0 == strcmp("graceful_server_shutdown", argv[i])) {
graceful_server_shutdown(config); graceful_server_shutdown(config);
continue; continue;

@ -77,6 +77,8 @@ extern void filter_call_init_fails(grpc_end2end_test_config config);
extern void filter_call_init_fails_pre_init(void); extern void filter_call_init_fails_pre_init(void);
extern void filter_causes_close(grpc_end2end_test_config config); extern void filter_causes_close(grpc_end2end_test_config config);
extern void filter_causes_close_pre_init(void); extern void filter_causes_close_pre_init(void);
extern void filter_latency(grpc_end2end_test_config config);
extern void filter_latency_pre_init(void);
extern void graceful_server_shutdown(grpc_end2end_test_config config); extern void graceful_server_shutdown(grpc_end2end_test_config config);
extern void graceful_server_shutdown_pre_init(void); extern void graceful_server_shutdown_pre_init(void);
extern void high_initial_seqno(grpc_end2end_test_config config); extern void high_initial_seqno(grpc_end2end_test_config config);
@ -156,6 +158,7 @@ void grpc_end2end_tests_pre_init(void) {
empty_batch_pre_init(); empty_batch_pre_init();
filter_call_init_fails_pre_init(); filter_call_init_fails_pre_init();
filter_causes_close_pre_init(); filter_causes_close_pre_init();
filter_latency_pre_init();
graceful_server_shutdown_pre_init(); graceful_server_shutdown_pre_init();
high_initial_seqno_pre_init(); high_initial_seqno_pre_init();
hpack_size_pre_init(); hpack_size_pre_init();
@ -211,6 +214,7 @@ void grpc_end2end_tests(int argc, char **argv,
empty_batch(config); empty_batch(config);
filter_call_init_fails(config); filter_call_init_fails(config);
filter_causes_close(config); filter_causes_close(config);
filter_latency(config);
graceful_server_shutdown(config); graceful_server_shutdown(config);
high_initial_seqno(config); high_initial_seqno(config);
hpack_size(config); hpack_size(config);
@ -312,6 +316,10 @@ void grpc_end2end_tests(int argc, char **argv,
filter_causes_close(config); filter_causes_close(config);
continue; continue;
} }
if (0 == strcmp("filter_latency", argv[i])) {
filter_latency(config);
continue;
}
if (0 == strcmp("graceful_server_shutdown", argv[i])) { if (0 == strcmp("graceful_server_shutdown", argv[i])) {
graceful_server_shutdown(config); graceful_server_shutdown(config);
continue; continue;

@ -111,6 +111,7 @@ END2END_TESTS = {
'empty_batch': default_test_options, 'empty_batch': default_test_options,
'filter_causes_close': default_test_options, 'filter_causes_close': default_test_options,
'filter_call_init_fails': default_test_options, 'filter_call_init_fails': default_test_options,
'filter_latency': default_test_options,
'graceful_server_shutdown': default_test_options._replace(cpu_cost=LOWCPU), 'graceful_server_shutdown': default_test_options._replace(cpu_cost=LOWCPU),
'hpack_size': default_test_options._replace(proxyable=False, 'hpack_size': default_test_options._replace(proxyable=False,
traceable=False), traceable=False),

@ -0,0 +1,359 @@
/*
*
* Copyright 2016, Google Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following disclaimer
* in the documentation and/or other materials provided with the
* distribution.
* * Neither the name of Google Inc. nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
#include "test/core/end2end/end2end_tests.h"
#include <limits.h>
#include <stdbool.h>
#include <stdio.h>
#include <string.h>
#include <grpc/byte_buffer.h>
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
#include <grpc/support/time.h>
#include <grpc/support/useful.h>
#include "src/core/lib/channel/channel_stack_builder.h"
#include "src/core/lib/surface/channel_init.h"
#include "test/core/end2end/cq_verifier.h"
enum { TIMEOUT = 200000 };
static bool g_enable_filter = false;
static gpr_mu g_mu;
static gpr_timespec g_client_latency;
static gpr_timespec g_server_latency;
static void *tag(intptr_t t) { return (void *)t; }
static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config,
const char *test_name,
grpc_channel_args *client_args,
grpc_channel_args *server_args) {
grpc_end2end_test_fixture f;
gpr_log(GPR_INFO, "%s/%s", test_name, config.name);
f = config.create_fixture(client_args, server_args);
config.init_server(&f, server_args);
config.init_client(&f, client_args);
return f;
}
static gpr_timespec n_seconds_time(int n) {
return GRPC_TIMEOUT_SECONDS_TO_DEADLINE(n);
}
static gpr_timespec five_seconds_time(void) { return n_seconds_time(5); }
static void drain_cq(grpc_completion_queue *cq) {
grpc_event ev;
do {
ev = grpc_completion_queue_next(cq, five_seconds_time(), NULL);
} while (ev.type != GRPC_QUEUE_SHUTDOWN);
}
static void shutdown_server(grpc_end2end_test_fixture *f) {
if (!f->server) return;
grpc_server_shutdown_and_notify(f->server, f->cq, tag(1000));
GPR_ASSERT(grpc_completion_queue_pluck(
f->cq, tag(1000), GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5), NULL)
.type == GRPC_OP_COMPLETE);
grpc_server_destroy(f->server);
f->server = NULL;
}
static void shutdown_client(grpc_end2end_test_fixture *f) {
if (!f->client) return;
grpc_channel_destroy(f->client);
f->client = NULL;
}
static void end_test(grpc_end2end_test_fixture *f) {
shutdown_server(f);
shutdown_client(f);
grpc_completion_queue_shutdown(f->cq);
drain_cq(f->cq);
grpc_completion_queue_destroy(f->cq);
}
// Simple request via a server filter that saves the reported latency value.
static void test_request(grpc_end2end_test_config config) {
grpc_call *c;
grpc_call *s;
grpc_slice request_payload_slice =
grpc_slice_from_copied_string("hello world");
grpc_byte_buffer *request_payload =
grpc_raw_byte_buffer_create(&request_payload_slice, 1);
gpr_timespec deadline = five_seconds_time();
grpc_end2end_test_fixture f =
begin_test(config, "filter_latency", NULL, NULL);
cq_verifier *cqv = cq_verifier_create(f.cq);
grpc_op ops[6];
grpc_op *op;
grpc_metadata_array initial_metadata_recv;
grpc_metadata_array trailing_metadata_recv;
grpc_metadata_array request_metadata_recv;
grpc_byte_buffer *request_payload_recv = NULL;
grpc_call_details call_details;
grpc_status_code status;
grpc_call_error error;
char *details = NULL;
size_t details_capacity = 0;
int was_cancelled = 2;
gpr_mu_lock(&g_mu);
g_client_latency = gpr_time_0(GPR_TIMESPAN);
g_server_latency = gpr_time_0(GPR_TIMESPAN);
gpr_mu_unlock(&g_mu);
const gpr_timespec start_time = gpr_now(GPR_CLOCK_MONOTONIC);
c = grpc_channel_create_call(f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq,
"/foo", "foo.test.google.fr", deadline, NULL);
GPR_ASSERT(c);
grpc_metadata_array_init(&initial_metadata_recv);
grpc_metadata_array_init(&trailing_metadata_recv);
grpc_metadata_array_init(&request_metadata_recv);
grpc_call_details_init(&call_details);
memset(ops, 0, sizeof(ops));
op = ops;
op->op = GRPC_OP_SEND_INITIAL_METADATA;
op->data.send_initial_metadata.count = 0;
op->data.send_initial_metadata.metadata = NULL;
op->flags = 0;
op->reserved = NULL;
op++;
op->op = GRPC_OP_SEND_MESSAGE;
op->data.send_message = request_payload;
op->flags = 0;
op->reserved = NULL;
op++;
op->op = GRPC_OP_SEND_CLOSE_FROM_CLIENT;
op->flags = 0;
op->reserved = NULL;
op++;
op->op = GRPC_OP_RECV_INITIAL_METADATA;
op->data.recv_initial_metadata = &initial_metadata_recv;
op->flags = 0;
op->reserved = NULL;
op++;
op->op = GRPC_OP_RECV_STATUS_ON_CLIENT;
op->data.recv_status_on_client.trailing_metadata = &trailing_metadata_recv;
op->data.recv_status_on_client.status = &status;
op->data.recv_status_on_client.status_details = &details;
op->data.recv_status_on_client.status_details_capacity = &details_capacity;
op->flags = 0;
op->reserved = NULL;
op++;
error = grpc_call_start_batch(c, ops, (size_t)(op - ops), tag(1), NULL);
GPR_ASSERT(GRPC_CALL_OK == error);
error =
grpc_server_request_call(f.server, &s, &call_details,
&request_metadata_recv, f.cq, f.cq, tag(101));
GPR_ASSERT(GRPC_CALL_OK == error);
CQ_EXPECT_COMPLETION(cqv, tag(101), 1);
cq_verify(cqv);
memset(ops, 0, sizeof(ops));
op = ops;
op->op = GRPC_OP_SEND_INITIAL_METADATA;
op->data.send_initial_metadata.count = 0;
op->flags = 0;
op->reserved = NULL;
op++;
op->op = GRPC_OP_SEND_STATUS_FROM_SERVER;
op->data.send_status_from_server.trailing_metadata_count = 0;
op->data.send_status_from_server.status = GRPC_STATUS_UNIMPLEMENTED;
op->data.send_status_from_server.status_details = "xyz";
op->flags = 0;
op->reserved = NULL;
op++;
op->op = GRPC_OP_RECV_CLOSE_ON_SERVER;
op->data.recv_close_on_server.cancelled = &was_cancelled;
op->flags = 0;
op->reserved = NULL;
op++;
error = grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(102), NULL);
GPR_ASSERT(GRPC_CALL_OK == error);
CQ_EXPECT_COMPLETION(cqv, tag(102), 1);
CQ_EXPECT_COMPLETION(cqv, tag(1), 1);
cq_verify(cqv);
GPR_ASSERT(status == GRPC_STATUS_UNIMPLEMENTED);
GPR_ASSERT(0 == strcmp(details, "xyz"));
gpr_free(details);
grpc_metadata_array_destroy(&initial_metadata_recv);
grpc_metadata_array_destroy(&trailing_metadata_recv);
grpc_metadata_array_destroy(&request_metadata_recv);
grpc_call_details_destroy(&call_details);
grpc_call_destroy(s);
grpc_call_destroy(c);
const gpr_timespec end_time = gpr_now(GPR_CLOCK_MONOTONIC);
const gpr_timespec max_latency = gpr_time_sub(end_time, start_time);
gpr_mu_lock(&g_mu);
GPR_ASSERT(gpr_time_cmp(max_latency, g_client_latency) >= 0);
GPR_ASSERT(gpr_time_cmp(gpr_time_0(GPR_TIMESPAN), g_client_latency) < 0);
GPR_ASSERT(gpr_time_cmp(max_latency, g_server_latency) >= 0);
GPR_ASSERT(gpr_time_cmp(gpr_time_0(GPR_TIMESPAN), g_server_latency) < 0);
// Server latency should always be smaller than client latency.
GPR_ASSERT(gpr_time_cmp(g_server_latency, g_client_latency) < 0);
gpr_mu_unlock(&g_mu);
cq_verifier_destroy(cqv);
grpc_byte_buffer_destroy(request_payload);
grpc_byte_buffer_destroy(request_payload_recv);
end_test(&f);
config.tear_down_data(&f);
}
/*******************************************************************************
* Test latency filter
*/
static grpc_error *init_call_elem(grpc_exec_ctx *exec_ctx,
grpc_call_element *elem,
grpc_call_element_args *args) {
return GRPC_ERROR_NONE;
}
static void client_destroy_call_elem(grpc_exec_ctx *exec_ctx,
grpc_call_element *elem,
const grpc_call_final_info *final_info,
void *and_free_memory) {
gpr_mu_lock(&g_mu);
g_client_latency = final_info->stats.latency;
gpr_mu_unlock(&g_mu);
}
static void server_destroy_call_elem(grpc_exec_ctx *exec_ctx,
grpc_call_element *elem,
const grpc_call_final_info *final_info,
void *and_free_memory) {
gpr_mu_lock(&g_mu);
g_server_latency = final_info->stats.latency;
gpr_mu_unlock(&g_mu);
}
static void init_channel_elem(grpc_exec_ctx *exec_ctx,
grpc_channel_element *elem,
grpc_channel_element_args *args) {}
static void destroy_channel_elem(grpc_exec_ctx *exec_ctx,
grpc_channel_element *elem) {}
static const grpc_channel_filter test_client_filter = {
grpc_call_next_op,
grpc_channel_next_op,
0,
init_call_elem,
grpc_call_stack_ignore_set_pollset_or_pollset_set,
client_destroy_call_elem,
0,
init_channel_elem,
destroy_channel_elem,
grpc_call_next_get_peer,
grpc_channel_next_get_info,
"client_filter_latency"};
static const grpc_channel_filter test_server_filter = {
grpc_call_next_op,
grpc_channel_next_op,
0,
init_call_elem,
grpc_call_stack_ignore_set_pollset_or_pollset_set,
server_destroy_call_elem,
0,
init_channel_elem,
destroy_channel_elem,
grpc_call_next_get_peer,
grpc_channel_next_get_info,
"server_filter_latency"};
/*******************************************************************************
* Registration
*/
static bool maybe_add_filter(grpc_channel_stack_builder *builder, void *arg) {
grpc_channel_filter *filter = arg;
if (g_enable_filter) {
// Want to add the filter as close to the end as possible, to make
// sure that all of the filters work well together. However, we
// can't add it at the very end, because the connected channel filter
// must be the last one. So we add it right before the last one.
grpc_channel_stack_builder_iterator *it =
grpc_channel_stack_builder_create_iterator_at_last(builder);
GPR_ASSERT(grpc_channel_stack_builder_move_prev(it));
const bool retval =
grpc_channel_stack_builder_add_filter_before(it, filter, NULL, NULL);
grpc_channel_stack_builder_iterator_destroy(it);
return retval;
} else {
return true;
}
}
static void init_plugin(void) {
gpr_mu_init(&g_mu);
grpc_channel_init_register_stage(GRPC_CLIENT_CHANNEL, INT_MAX,
maybe_add_filter,
(void *)&test_client_filter);
grpc_channel_init_register_stage(GRPC_CLIENT_DIRECT_CHANNEL, INT_MAX,
maybe_add_filter,
(void *)&test_client_filter);
grpc_channel_init_register_stage(GRPC_SERVER_CHANNEL, INT_MAX,
maybe_add_filter,
(void *)&test_server_filter);
}
static void destroy_plugin(void) { gpr_mu_destroy(&g_mu); }
void filter_latency(grpc_end2end_test_config config) {
g_enable_filter = true;
test_request(config);
g_enable_filter = false;
}
void filter_latency_pre_init(void) {
grpc_register_plugin(init_plugin, destroy_plugin);
}

@ -56,6 +56,7 @@
#include <grpc/support/thd.h> #include <grpc/support/thd.h>
#include <grpc/support/time.h> #include <grpc/support/time.h>
#include <grpc/support/useful.h> #include <grpc/support/useful.h>
#include "src/core/lib/iomgr/error.h"
#include "src/core/lib/iomgr/socket_utils_posix.h" #include "src/core/lib/iomgr/socket_utils_posix.h"
typedef struct fd_pair { typedef struct fd_pair {
@ -229,12 +230,12 @@ static int blocking_write_bytes(struct thread_args *args, char *buf) {
on the scenario we're using. on the scenario we're using.
*/ */
static int set_socket_nonblocking(thread_args *args) { static int set_socket_nonblocking(thread_args *args) {
if (!grpc_set_socket_nonblocking(args->fds.read_fd, 1)) { if (!GRPC_LOG_IF_ERROR("Unable to set read socket nonblocking",
gpr_log(GPR_ERROR, "Unable to set socket nonblocking: %s", strerror(errno)); grpc_set_socket_nonblocking(args->fds.read_fd, 1))) {
return -1; return -1;
} }
if (!grpc_set_socket_nonblocking(args->fds.write_fd, 1)) { if (!GRPC_LOG_IF_ERROR("Unable to set write socket nonblocking",
gpr_log(GPR_ERROR, "Unable to set socket nonblocking: %s", strerror(errno)); grpc_set_socket_nonblocking(args->fds.write_fd, 1))) {
return -1; return -1;
} }
return 0; return 0;
@ -347,10 +348,16 @@ static int create_listening_socket(struct sockaddr *port, socklen_t len) {
goto error; goto error;
} }
if (!grpc_set_socket_cloexec(fd, 1) || !grpc_set_socket_low_latency(fd, 1) || if (!GRPC_LOG_IF_ERROR("Failed to set listening socket cloexec",
!grpc_set_socket_reuse_addr(fd, 1)) { grpc_set_socket_cloexec(fd, 1))) {
gpr_log(GPR_ERROR, "Unable to configure socket %d: %s", fd, goto error;
strerror(errno)); }
if (!GRPC_LOG_IF_ERROR("Failed to set listening socket low latency",
grpc_set_socket_low_latency(fd, 1))) {
goto error;
}
if (!GRPC_LOG_IF_ERROR("Failed to set listening socket reuse addr",
grpc_set_socket_reuse_addr(fd, 1))) {
goto error; goto error;
} }
@ -386,8 +393,12 @@ static int connect_client(struct sockaddr *addr, socklen_t len) {
goto error; goto error;
} }
if (!grpc_set_socket_cloexec(fd, 1) || !grpc_set_socket_low_latency(fd, 1)) { if (!GRPC_LOG_IF_ERROR("Failed to set connecting socket cloexec",
gpr_log(GPR_ERROR, "Failed to configure socket"); grpc_set_socket_cloexec(fd, 1))) {
goto error;
}
if (!GRPC_LOG_IF_ERROR("Failed to set connecting socket low latency",
grpc_set_socket_low_latency(fd, 1))) {
goto error; goto error;
} }

@ -112,8 +112,6 @@ size_t ArraySize(T& a) {
static_cast<size_t>(!(sizeof(a) % sizeof(*(a))))); static_cast<size_t>(!(sizeof(a) % sizeof(*(a)))));
} }
} // namespame
class TestServiceImpl : public ::grpc::testing::EchoTestService::Service { class TestServiceImpl : public ::grpc::testing::EchoTestService::Service {
public: public:
Status Echo(ServerContext* context, const EchoRequest* request, Status Echo(ServerContext* context, const EchoRequest* request,
@ -132,6 +130,8 @@ class TestServiceImpl : public ::grpc::testing::EchoTestService::Service {
} }
}; };
} // namespace
class GrpcToolTest : public ::testing::Test { class GrpcToolTest : public ::testing::Test {
protected: protected:
GrpcToolTest() {} GrpcToolTest() {}

@ -28,6 +28,7 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import os import os
import pkg_resources
import sys import sys
import setuptools import setuptools
@ -43,10 +44,14 @@ def build_package_protos(package_root):
if filename.endswith('.proto'): if filename.endswith('.proto'):
proto_files.append(os.path.abspath(os.path.join(root, filename))) proto_files.append(os.path.abspath(os.path.join(root, filename)))
well_known_protos_include = pkg_resources.resource_filename(
'grpc.tools', '_proto')
for proto_file in proto_files: for proto_file in proto_files:
command = [ command = [
'grpc.tools.protoc', 'grpc.tools.protoc',
'--proto_path={}'.format(inclusion_root), '--proto_path={}'.format(inclusion_root),
'--proto_path={}'.format(well_known_protos_include),
'--python_out={}'.format(inclusion_root), '--python_out={}'.format(inclusion_root),
'--grpc_python_out={}'.format(inclusion_root), '--grpc_python_out={}'.format(inclusion_root),
] + [proto_file] ] + [proto_file]

@ -811,7 +811,6 @@ src/core/lib/iomgr/endpoint.h \
src/core/lib/iomgr/endpoint_pair.h \ src/core/lib/iomgr/endpoint_pair.h \
src/core/lib/iomgr/error.h \ src/core/lib/iomgr/error.h \
src/core/lib/iomgr/ev_epoll_linux.h \ src/core/lib/iomgr/ev_epoll_linux.h \
src/core/lib/iomgr/ev_poll_and_epoll_posix.h \
src/core/lib/iomgr/ev_poll_posix.h \ src/core/lib/iomgr/ev_poll_posix.h \
src/core/lib/iomgr/ev_posix.h \ src/core/lib/iomgr/ev_posix.h \
src/core/lib/iomgr/exec_ctx.h \ src/core/lib/iomgr/exec_ctx.h \
@ -991,7 +990,6 @@ src/core/lib/iomgr/endpoint_pair_uv.c \
src/core/lib/iomgr/endpoint_pair_windows.c \ src/core/lib/iomgr/endpoint_pair_windows.c \
src/core/lib/iomgr/error.c \ src/core/lib/iomgr/error.c \
src/core/lib/iomgr/ev_epoll_linux.c \ src/core/lib/iomgr/ev_epoll_linux.c \
src/core/lib/iomgr/ev_poll_and_epoll_posix.c \
src/core/lib/iomgr/ev_poll_posix.c \ src/core/lib/iomgr/ev_poll_posix.c \
src/core/lib/iomgr/ev_posix.c \ src/core/lib/iomgr/ev_posix.c \
src/core/lib/iomgr/exec_ctx.c \ src/core/lib/iomgr/exec_ctx.c \

@ -2,3 +2,4 @@
leak:CRYPTO_set_thread_local leak:CRYPTO_set_thread_local
leak:err_get_state leak:err_get_state
leak:ERR_add_error_dataf leak:ERR_add_error_dataf
leak:err_add_error_vdata

@ -24,6 +24,11 @@
"type": "INTEGER", "type": "INTEGER",
"mode": "NULLABLE" "mode": "NULLABLE"
}, },
{
"name": "no_report_files_found",
"type": "BOOLEAN",
"mode": "NULLABLE"
},
{ {
"name": "error", "name": "error",
"type": "RECORD", "type": "RECORD",

@ -47,13 +47,32 @@ sys.path.append(gcp_utils_dir)
import big_query_utils import big_query_utils
_HAS_MATRIX=True
_PROJECT_ID = 'grpc-testing' _PROJECT_ID = 'grpc-testing'
_HAS_MATRIX = True _HAS_MATRIX = True
_BUILDS = {'gRPC_master': _HAS_MATRIX, _BUILDS = {'gRPC_interop_master': not _HAS_MATRIX,
'gRPC_interop_master': not _HAS_MATRIX, 'gRPC_master_linux': not _HAS_MATRIX,
'gRPC_pull_requests': _HAS_MATRIX, 'gRPC_master_macos': not _HAS_MATRIX,
'gRPC_master_windows': not _HAS_MATRIX,
'gRPC_performance_master': not _HAS_MATRIX,
'gRPC_portability_master_linux': not _HAS_MATRIX,
'gRPC_portability_master_windows': not _HAS_MATRIX,
'gRPC_master_asanitizer_c': not _HAS_MATRIX,
'gRPC_master_asanitizer_cpp': not _HAS_MATRIX,
'gRPC_master_msan_c': not _HAS_MATRIX,
'gRPC_master_tsanitizer_c': not _HAS_MATRIX,
'gRPC_master_tsan_cpp': not _HAS_MATRIX,
'gRPC_interop_pull_requests': not _HAS_MATRIX, 'gRPC_interop_pull_requests': not _HAS_MATRIX,
'gRPC_performance_pull_requests': not _HAS_MATRIX,
'gRPC_portability_pull_requests_linux': not _HAS_MATRIX,
'gRPC_portability_pr_win': not _HAS_MATRIX,
'gRPC_pull_requests_linux': not _HAS_MATRIX,
'gRPC_pull_requests_macos': not _HAS_MATRIX,
'gRPC_pr_win': not _HAS_MATRIX,
'gRPC_pull_requests_asan_c': not _HAS_MATRIX,
'gRPC_pull_requests_asan_cpp': not _HAS_MATRIX,
'gRPC_pull_requests_msan_c': not _HAS_MATRIX,
'gRPC_pull_requests_tsan_c': not _HAS_MATRIX,
'gRPC_pull_requests_tsan_cpp': not _HAS_MATRIX,
} }
_URL_BASE = 'https://grpc-testing.appspot.com/job' _URL_BASE = 'https://grpc-testing.appspot.com/job'
@ -83,6 +102,7 @@ _KNOWN_ERRORS = [
('tests.bins/asan/h2_proxy_test streaming_error_response ' ('tests.bins/asan/h2_proxy_test streaming_error_response '
'GRPC_POLL_STRATEGY=legacy'), 'GRPC_POLL_STRATEGY=legacy'),
] ]
_NO_REPORT_FILES_FOUND_ERROR = 'No test report files were found. Configuration error?'
_UNKNOWN_ERROR = 'Unknown error' _UNKNOWN_ERROR = 'Unknown error'
_DATASET_ID = 'build_statistics' _DATASET_ID = 'build_statistics'
@ -101,6 +121,10 @@ def _scrape_for_known_errors(html):
return error_list, known_error_count return error_list, known_error_count
def _no_report_files_found(html):
return _NO_REPORT_FILES_FOUND_ERROR in html
def _get_last_processed_buildnumber(build_name): def _get_last_processed_buildnumber(build_name):
query = 'SELECT max(build_number) FROM [%s:%s.%s];' % ( query = 'SELECT max(build_number) FROM [%s:%s.%s];' % (
_PROJECT_ID, _DATASET_ID, build_name) _PROJECT_ID, _DATASET_ID, build_name)
@ -141,6 +165,7 @@ def _process_build(json_url, console_url):
failure_count = test_result['failCount'] failure_count = test_result['failCount']
build_result['pass_count'] = test_result['passCount'] build_result['pass_count'] = test_result['passCount']
build_result['failure_count'] = failure_count build_result['failure_count'] = failure_count
build_result['no_report_files_found'] = _no_report_files_found(html)
if failure_count > 0: if failure_count > 0:
error_list, known_error_count = _scrape_for_known_errors(html) error_list, known_error_count = _scrape_for_known_errors(html)
unknown_error_count = failure_count - known_error_count unknown_error_count = failure_count - known_error_count

@ -69,7 +69,7 @@ _FORCE_ENVIRON_FOR_WRAPPERS = {
_POLLING_STRATEGIES = { _POLLING_STRATEGIES = {
'linux': ['epoll', 'poll', 'poll-cv', 'legacy'] 'linux': ['epoll', 'poll', 'poll-cv']
} }

@ -6310,6 +6310,7 @@
"test/core/end2end/tests/empty_batch.c", "test/core/end2end/tests/empty_batch.c",
"test/core/end2end/tests/filter_call_init_fails.c", "test/core/end2end/tests/filter_call_init_fails.c",
"test/core/end2end/tests/filter_causes_close.c", "test/core/end2end/tests/filter_causes_close.c",
"test/core/end2end/tests/filter_latency.c",
"test/core/end2end/tests/graceful_server_shutdown.c", "test/core/end2end/tests/graceful_server_shutdown.c",
"test/core/end2end/tests/high_initial_seqno.c", "test/core/end2end/tests/high_initial_seqno.c",
"test/core/end2end/tests/hpack_size.c", "test/core/end2end/tests/hpack_size.c",
@ -6378,6 +6379,7 @@
"test/core/end2end/tests/empty_batch.c", "test/core/end2end/tests/empty_batch.c",
"test/core/end2end/tests/filter_call_init_fails.c", "test/core/end2end/tests/filter_call_init_fails.c",
"test/core/end2end/tests/filter_causes_close.c", "test/core/end2end/tests/filter_causes_close.c",
"test/core/end2end/tests/filter_latency.c",
"test/core/end2end/tests/graceful_server_shutdown.c", "test/core/end2end/tests/graceful_server_shutdown.c",
"test/core/end2end/tests/high_initial_seqno.c", "test/core/end2end/tests/high_initial_seqno.c",
"test/core/end2end/tests/hpack_size.c", "test/core/end2end/tests/hpack_size.c",
@ -6671,7 +6673,6 @@
"src/core/lib/iomgr/endpoint_pair.h", "src/core/lib/iomgr/endpoint_pair.h",
"src/core/lib/iomgr/error.h", "src/core/lib/iomgr/error.h",
"src/core/lib/iomgr/ev_epoll_linux.h", "src/core/lib/iomgr/ev_epoll_linux.h",
"src/core/lib/iomgr/ev_poll_and_epoll_posix.h",
"src/core/lib/iomgr/ev_poll_posix.h", "src/core/lib/iomgr/ev_poll_posix.h",
"src/core/lib/iomgr/ev_posix.h", "src/core/lib/iomgr/ev_posix.h",
"src/core/lib/iomgr/exec_ctx.h", "src/core/lib/iomgr/exec_ctx.h",
@ -6807,8 +6808,6 @@
"src/core/lib/iomgr/error.h", "src/core/lib/iomgr/error.h",
"src/core/lib/iomgr/ev_epoll_linux.c", "src/core/lib/iomgr/ev_epoll_linux.c",
"src/core/lib/iomgr/ev_epoll_linux.h", "src/core/lib/iomgr/ev_epoll_linux.h",
"src/core/lib/iomgr/ev_poll_and_epoll_posix.c",
"src/core/lib/iomgr/ev_poll_and_epoll_posix.h",
"src/core/lib/iomgr/ev_poll_posix.c", "src/core/lib/iomgr/ev_poll_posix.c",
"src/core/lib/iomgr/ev_poll_posix.h", "src/core/lib/iomgr/ev_poll_posix.h",
"src/core/lib/iomgr/ev_posix.c", "src/core/lib/iomgr/ev_posix.c",

@ -5368,6 +5368,29 @@
"posix" "posix"
] ]
}, },
{
"args": [
"filter_latency"
],
"ci_platforms": [
"windows",
"linux",
"mac",
"posix"
],
"cpu_cost": 1.0,
"exclude_configs": [],
"exclude_iomgrs": [],
"flaky": false,
"language": "c",
"name": "h2_census_test",
"platforms": [
"windows",
"linux",
"mac",
"posix"
]
},
{ {
"args": [ "args": [
"graceful_server_shutdown" "graceful_server_shutdown"
@ -6428,6 +6451,29 @@
"posix" "posix"
] ]
}, },
{
"args": [
"filter_latency"
],
"ci_platforms": [
"windows",
"linux",
"mac",
"posix"
],
"cpu_cost": 1.0,
"exclude_configs": [],
"exclude_iomgrs": [],
"flaky": false,
"language": "c",
"name": "h2_compress_test",
"platforms": [
"windows",
"linux",
"mac",
"posix"
]
},
{ {
"args": [ "args": [
"graceful_server_shutdown" "graceful_server_shutdown"
@ -7471,6 +7517,28 @@
"posix" "posix"
] ]
}, },
{
"args": [
"filter_latency"
],
"ci_platforms": [
"windows",
"linux",
"posix"
],
"cpu_cost": 1.0,
"exclude_configs": [],
"exclude_iomgrs": [],
"flaky": false,
"language": "c",
"name": "h2_fakesec_test",
"platforms": [
"windows",
"linux",
"mac",
"posix"
]
},
{ {
"args": [ "args": [
"graceful_server_shutdown" "graceful_server_shutdown"
@ -8431,6 +8499,29 @@
"posix" "posix"
] ]
}, },
{
"args": [
"filter_latency"
],
"ci_platforms": [
"linux",
"mac",
"posix"
],
"cpu_cost": 1.0,
"exclude_configs": [],
"exclude_iomgrs": [
"uv"
],
"flaky": false,
"language": "c",
"name": "h2_fd_test",
"platforms": [
"linux",
"mac",
"posix"
]
},
{ {
"args": [ "args": [
"graceful_server_shutdown" "graceful_server_shutdown"
@ -9445,6 +9536,29 @@
"posix" "posix"
] ]
}, },
{
"args": [
"filter_latency"
],
"ci_platforms": [
"windows",
"linux",
"mac",
"posix"
],
"cpu_cost": 1.0,
"exclude_configs": [],
"exclude_iomgrs": [],
"flaky": false,
"language": "c",
"name": "h2_full_test",
"platforms": [
"windows",
"linux",
"mac",
"posix"
]
},
{ {
"args": [ "args": [
"graceful_server_shutdown" "graceful_server_shutdown"
@ -10435,6 +10549,25 @@
"linux" "linux"
] ]
}, },
{
"args": [
"filter_latency"
],
"ci_platforms": [
"linux"
],
"cpu_cost": 1.0,
"exclude_configs": [],
"exclude_iomgrs": [
"uv"
],
"flaky": false,
"language": "c",
"name": "h2_full+pipe_test",
"platforms": [
"linux"
]
},
{ {
"args": [ "args": [
"graceful_server_shutdown" "graceful_server_shutdown"
@ -11379,6 +11512,29 @@
"posix" "posix"
] ]
}, },
{
"args": [
"filter_latency"
],
"ci_platforms": [
"windows",
"linux",
"mac",
"posix"
],
"cpu_cost": 1.0,
"exclude_configs": [],
"exclude_iomgrs": [],
"flaky": false,
"language": "c",
"name": "h2_full+trace_test",
"platforms": [
"windows",
"linux",
"mac",
"posix"
]
},
{ {
"args": [ "args": [
"graceful_server_shutdown" "graceful_server_shutdown"
@ -12408,6 +12564,30 @@
"posix" "posix"
] ]
}, },
{
"args": [
"filter_latency"
],
"ci_platforms": [
"windows",
"linux",
"posix"
],
"cpu_cost": 1.0,
"exclude_configs": [],
"exclude_iomgrs": [
"uv"
],
"flaky": false,
"language": "c",
"name": "h2_http_proxy_test",
"platforms": [
"windows",
"linux",
"mac",
"posix"
]
},
{ {
"args": [ "args": [
"graceful_server_shutdown" "graceful_server_shutdown"
@ -13497,6 +13677,29 @@
"posix" "posix"
] ]
}, },
{
"args": [
"filter_latency"
],
"ci_platforms": [
"windows",
"linux",
"mac",
"posix"
],
"cpu_cost": 1.0,
"exclude_configs": [],
"exclude_iomgrs": [],
"flaky": false,
"language": "c",
"name": "h2_load_reporting_test",
"platforms": [
"windows",
"linux",
"mac",
"posix"
]
},
{ {
"args": [ "args": [
"graceful_server_shutdown" "graceful_server_shutdown"
@ -14572,6 +14775,30 @@
"posix" "posix"
] ]
}, },
{
"args": [
"filter_latency"
],
"ci_platforms": [
"windows",
"linux",
"posix"
],
"cpu_cost": 1.0,
"exclude_configs": [],
"exclude_iomgrs": [
"uv"
],
"flaky": false,
"language": "c",
"name": "h2_oauth2_test",
"platforms": [
"windows",
"linux",
"mac",
"posix"
]
},
{ {
"args": [ "args": [
"graceful_server_shutdown" "graceful_server_shutdown"
@ -15628,6 +15855,30 @@
"posix" "posix"
] ]
}, },
{
"args": [
"filter_latency"
],
"ci_platforms": [
"windows",
"linux",
"posix"
],
"cpu_cost": 1.0,
"exclude_configs": [],
"exclude_iomgrs": [
"uv"
],
"flaky": false,
"language": "c",
"name": "h2_proxy_test",
"platforms": [
"windows",
"linux",
"mac",
"posix"
]
},
{ {
"args": [ "args": [
"graceful_server_shutdown" "graceful_server_shutdown"
@ -16542,14 +16793,14 @@
}, },
{ {
"args": [ "args": [
"graceful_server_shutdown" "filter_latency"
], ],
"ci_platforms": [ "ci_platforms": [
"windows", "windows",
"linux", "linux",
"posix" "posix"
], ],
"cpu_cost": 0.1, "cpu_cost": 1.0,
"exclude_configs": [], "exclude_configs": [],
"exclude_iomgrs": [ "exclude_iomgrs": [
"uv" "uv"
@ -16566,14 +16817,14 @@
}, },
{ {
"args": [ "args": [
"high_initial_seqno" "graceful_server_shutdown"
], ],
"ci_platforms": [ "ci_platforms": [
"windows", "windows",
"linux", "linux",
"posix" "posix"
], ],
"cpu_cost": 1.0, "cpu_cost": 0.1,
"exclude_configs": [], "exclude_configs": [],
"exclude_iomgrs": [ "exclude_iomgrs": [
"uv" "uv"
@ -16590,7 +16841,7 @@
}, },
{ {
"args": [ "args": [
"hpack_size" "high_initial_seqno"
], ],
"ci_platforms": [ "ci_platforms": [
"windows", "windows",
@ -16614,7 +16865,7 @@
}, },
{ {
"args": [ "args": [
"idempotent_request" "hpack_size"
], ],
"ci_platforms": [ "ci_platforms": [
"windows", "windows",
@ -16638,7 +16889,7 @@
}, },
{ {
"args": [ "args": [
"invoke_large_request" "idempotent_request"
], ],
"ci_platforms": [ "ci_platforms": [
"windows", "windows",
@ -16662,7 +16913,7 @@
}, },
{ {
"args": [ "args": [
"large_metadata" "invoke_large_request"
], ],
"ci_platforms": [ "ci_platforms": [
"windows", "windows",
@ -16686,7 +16937,31 @@
}, },
{ {
"args": [ "args": [
"load_reporting_hook" "large_metadata"
],
"ci_platforms": [
"windows",
"linux",
"posix"
],
"cpu_cost": 1.0,
"exclude_configs": [],
"exclude_iomgrs": [
"uv"
],
"flaky": false,
"language": "c",
"name": "h2_sockpair_test",
"platforms": [
"windows",
"linux",
"mac",
"posix"
]
},
{
"args": [
"load_reporting_hook"
], ],
"ci_platforms": [ "ci_platforms": [
"windows", "windows",
@ -17524,6 +17799,30 @@
"posix" "posix"
] ]
}, },
{
"args": [
"filter_latency"
],
"ci_platforms": [
"windows",
"linux",
"posix"
],
"cpu_cost": 1.0,
"exclude_configs": [],
"exclude_iomgrs": [
"uv"
],
"flaky": false,
"language": "c",
"name": "h2_sockpair+trace_test",
"platforms": [
"windows",
"linux",
"mac",
"posix"
]
},
{ {
"args": [ "args": [
"graceful_server_shutdown" "graceful_server_shutdown"
@ -18464,6 +18763,32 @@
"posix" "posix"
] ]
}, },
{
"args": [
"filter_latency"
],
"ci_platforms": [
"windows",
"linux",
"posix"
],
"cpu_cost": 1.0,
"exclude_configs": [
"msan"
],
"exclude_iomgrs": [
"uv"
],
"flaky": false,
"language": "c",
"name": "h2_sockpair_1byte_test",
"platforms": [
"windows",
"linux",
"mac",
"posix"
]
},
{ {
"args": [ "args": [
"graceful_server_shutdown" "graceful_server_shutdown"
@ -19533,6 +19858,29 @@
"posix" "posix"
] ]
}, },
{
"args": [
"filter_latency"
],
"ci_platforms": [
"windows",
"linux",
"mac",
"posix"
],
"cpu_cost": 1.0,
"exclude_configs": [],
"exclude_iomgrs": [],
"flaky": false,
"language": "c",
"name": "h2_ssl_test",
"platforms": [
"windows",
"linux",
"mac",
"posix"
]
},
{ {
"args": [ "args": [
"graceful_server_shutdown" "graceful_server_shutdown"
@ -20593,6 +20941,29 @@
"posix" "posix"
] ]
}, },
{
"args": [
"filter_latency"
],
"ci_platforms": [
"windows",
"linux",
"mac",
"posix"
],
"cpu_cost": 1.0,
"exclude_configs": [],
"exclude_iomgrs": [],
"flaky": false,
"language": "c",
"name": "h2_ssl_cert_test",
"platforms": [
"windows",
"linux",
"mac",
"posix"
]
},
{ {
"args": [ "args": [
"graceful_server_shutdown" "graceful_server_shutdown"
@ -21620,6 +21991,30 @@
"posix" "posix"
] ]
}, },
{
"args": [
"filter_latency"
],
"ci_platforms": [
"windows",
"linux",
"posix"
],
"cpu_cost": 1.0,
"exclude_configs": [],
"exclude_iomgrs": [
"uv"
],
"flaky": false,
"language": "c",
"name": "h2_ssl_proxy_test",
"platforms": [
"windows",
"linux",
"mac",
"posix"
]
},
{ {
"args": [ "args": [
"graceful_server_shutdown" "graceful_server_shutdown"
@ -22564,6 +22959,29 @@
"posix" "posix"
] ]
}, },
{
"args": [
"filter_latency"
],
"ci_platforms": [
"linux",
"mac",
"posix"
],
"cpu_cost": 1.0,
"exclude_configs": [],
"exclude_iomgrs": [
"uv"
],
"flaky": false,
"language": "c",
"name": "h2_uds_test",
"platforms": [
"linux",
"mac",
"posix"
]
},
{ {
"args": [ "args": [
"graceful_server_shutdown" "graceful_server_shutdown"
@ -23601,6 +24019,29 @@
"posix" "posix"
] ]
}, },
{
"args": [
"filter_latency"
],
"ci_platforms": [
"windows",
"linux",
"mac",
"posix"
],
"cpu_cost": 1.0,
"exclude_configs": [],
"exclude_iomgrs": [],
"flaky": false,
"language": "c",
"name": "h2_census_nosec_test",
"platforms": [
"windows",
"linux",
"mac",
"posix"
]
},
{ {
"args": [ "args": [
"graceful_server_shutdown" "graceful_server_shutdown"
@ -24638,6 +25079,29 @@
"posix" "posix"
] ]
}, },
{
"args": [
"filter_latency"
],
"ci_platforms": [
"windows",
"linux",
"mac",
"posix"
],
"cpu_cost": 1.0,
"exclude_configs": [],
"exclude_iomgrs": [],
"flaky": false,
"language": "c",
"name": "h2_compress_nosec_test",
"platforms": [
"windows",
"linux",
"mac",
"posix"
]
},
{ {
"args": [ "args": [
"graceful_server_shutdown" "graceful_server_shutdown"
@ -25604,6 +26068,29 @@
"posix" "posix"
] ]
}, },
{
"args": [
"filter_latency"
],
"ci_platforms": [
"linux",
"mac",
"posix"
],
"cpu_cost": 1.0,
"exclude_configs": [],
"exclude_iomgrs": [
"uv"
],
"flaky": false,
"language": "c",
"name": "h2_fd_nosec_test",
"platforms": [
"linux",
"mac",
"posix"
]
},
{ {
"args": [ "args": [
"graceful_server_shutdown" "graceful_server_shutdown"
@ -26595,6 +27082,29 @@
"posix" "posix"
] ]
}, },
{
"args": [
"filter_latency"
],
"ci_platforms": [
"windows",
"linux",
"mac",
"posix"
],
"cpu_cost": 1.0,
"exclude_configs": [],
"exclude_iomgrs": [],
"flaky": false,
"language": "c",
"name": "h2_full_nosec_test",
"platforms": [
"windows",
"linux",
"mac",
"posix"
]
},
{ {
"args": [ "args": [
"graceful_server_shutdown" "graceful_server_shutdown"
@ -27566,6 +28076,25 @@
"linux" "linux"
] ]
}, },
{
"args": [
"filter_latency"
],
"ci_platforms": [
"linux"
],
"cpu_cost": 1.0,
"exclude_configs": [],
"exclude_iomgrs": [
"uv"
],
"flaky": false,
"language": "c",
"name": "h2_full+pipe_nosec_test",
"platforms": [
"linux"
]
},
{ {
"args": [ "args": [
"graceful_server_shutdown" "graceful_server_shutdown"
@ -28487,6 +29016,29 @@
"posix" "posix"
] ]
}, },
{
"args": [
"filter_latency"
],
"ci_platforms": [
"windows",
"linux",
"mac",
"posix"
],
"cpu_cost": 1.0,
"exclude_configs": [],
"exclude_iomgrs": [],
"flaky": false,
"language": "c",
"name": "h2_full+trace_nosec_test",
"platforms": [
"windows",
"linux",
"mac",
"posix"
]
},
{ {
"args": [ "args": [
"graceful_server_shutdown" "graceful_server_shutdown"
@ -29492,6 +30044,30 @@
"posix" "posix"
] ]
}, },
{
"args": [
"filter_latency"
],
"ci_platforms": [
"windows",
"linux",
"posix"
],
"cpu_cost": 1.0,
"exclude_configs": [],
"exclude_iomgrs": [
"uv"
],
"flaky": false,
"language": "c",
"name": "h2_http_proxy_nosec_test",
"platforms": [
"windows",
"linux",
"mac",
"posix"
]
},
{ {
"args": [ "args": [
"graceful_server_shutdown" "graceful_server_shutdown"
@ -30558,6 +31134,29 @@
"posix" "posix"
] ]
}, },
{
"args": [
"filter_latency"
],
"ci_platforms": [
"windows",
"linux",
"mac",
"posix"
],
"cpu_cost": 1.0,
"exclude_configs": [],
"exclude_iomgrs": [],
"flaky": false,
"language": "c",
"name": "h2_load_reporting_nosec_test",
"platforms": [
"windows",
"linux",
"mac",
"posix"
]
},
{ {
"args": [ "args": [
"graceful_server_shutdown" "graceful_server_shutdown"
@ -31561,6 +32160,30 @@
"posix" "posix"
] ]
}, },
{
"args": [
"filter_latency"
],
"ci_platforms": [
"windows",
"linux",
"posix"
],
"cpu_cost": 1.0,
"exclude_configs": [],
"exclude_iomgrs": [
"uv"
],
"flaky": false,
"language": "c",
"name": "h2_proxy_nosec_test",
"platforms": [
"windows",
"linux",
"mac",
"posix"
]
},
{ {
"args": [ "args": [
"graceful_server_shutdown" "graceful_server_shutdown"
@ -32449,6 +33072,30 @@
"posix" "posix"
] ]
}, },
{
"args": [
"filter_latency"
],
"ci_platforms": [
"windows",
"linux",
"posix"
],
"cpu_cost": 1.0,
"exclude_configs": [],
"exclude_iomgrs": [
"uv"
],
"flaky": false,
"language": "c",
"name": "h2_sockpair_nosec_test",
"platforms": [
"windows",
"linux",
"mac",
"posix"
]
},
{ {
"args": [ "args": [
"graceful_server_shutdown" "graceful_server_shutdown"
@ -33409,6 +34056,30 @@
"posix" "posix"
] ]
}, },
{
"args": [
"filter_latency"
],
"ci_platforms": [
"windows",
"linux",
"posix"
],
"cpu_cost": 1.0,
"exclude_configs": [],
"exclude_iomgrs": [
"uv"
],
"flaky": false,
"language": "c",
"name": "h2_sockpair+trace_nosec_test",
"platforms": [
"windows",
"linux",
"mac",
"posix"
]
},
{ {
"args": [ "args": [
"graceful_server_shutdown" "graceful_server_shutdown"
@ -34323,6 +34994,32 @@
"posix" "posix"
] ]
}, },
{
"args": [
"filter_latency"
],
"ci_platforms": [
"windows",
"linux",
"posix"
],
"cpu_cost": 1.0,
"exclude_configs": [
"msan"
],
"exclude_iomgrs": [
"uv"
],
"flaky": false,
"language": "c",
"name": "h2_sockpair_1byte_nosec_test",
"platforms": [
"windows",
"linux",
"mac",
"posix"
]
},
{ {
"args": [ "args": [
"graceful_server_shutdown" "graceful_server_shutdown"
@ -35344,6 +36041,29 @@
"posix" "posix"
] ]
}, },
{
"args": [
"filter_latency"
],
"ci_platforms": [
"linux",
"mac",
"posix"
],
"cpu_cost": 1.0,
"exclude_configs": [],
"exclude_iomgrs": [
"uv"
],
"flaky": false,
"language": "c",
"name": "h2_uds_nosec_test",
"platforms": [
"linux",
"mac",
"posix"
]
},
{ {
"args": [ "args": [
"graceful_server_shutdown" "graceful_server_shutdown"

@ -320,7 +320,6 @@
<ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\endpoint_pair.h" /> <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\endpoint_pair.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\error.h" /> <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\error.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\ev_epoll_linux.h" /> <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\ev_epoll_linux.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\ev_poll_and_epoll_posix.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\ev_poll_posix.h" /> <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\ev_poll_posix.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\ev_posix.h" /> <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\ev_posix.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\exec_ctx.h" /> <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\exec_ctx.h" />
@ -527,8 +526,6 @@
</ClCompile> </ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\ev_epoll_linux.c"> <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\ev_epoll_linux.c">
</ClCompile> </ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\ev_poll_and_epoll_posix.c">
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\ev_poll_posix.c"> <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\ev_poll_posix.c">
</ClCompile> </ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\ev_posix.c"> <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\ev_posix.c">

@ -76,9 +76,6 @@
<ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\ev_epoll_linux.c"> <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\ev_epoll_linux.c">
<Filter>src\core\lib\iomgr</Filter> <Filter>src\core\lib\iomgr</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\ev_poll_and_epoll_posix.c">
<Filter>src\core\lib\iomgr</Filter>
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\ev_poll_posix.c"> <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\ev_poll_posix.c">
<Filter>src\core\lib\iomgr</Filter> <Filter>src\core\lib\iomgr</Filter>
</ClCompile> </ClCompile>
@ -800,9 +797,6 @@
<ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\ev_epoll_linux.h"> <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\ev_epoll_linux.h">
<Filter>src\core\lib\iomgr</Filter> <Filter>src\core\lib\iomgr</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\ev_poll_and_epoll_posix.h">
<Filter>src\core\lib\iomgr</Filter>
</ClInclude>
<ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\ev_poll_posix.h"> <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\ev_poll_posix.h">
<Filter>src\core\lib\iomgr</Filter> <Filter>src\core\lib\iomgr</Filter>
</ClInclude> </ClInclude>

@ -213,7 +213,6 @@
<ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\endpoint_pair.h" /> <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\endpoint_pair.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\error.h" /> <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\error.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\ev_epoll_linux.h" /> <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\ev_epoll_linux.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\ev_poll_and_epoll_posix.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\ev_poll_posix.h" /> <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\ev_poll_posix.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\ev_posix.h" /> <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\ev_posix.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\exec_ctx.h" /> <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\exec_ctx.h" />
@ -378,8 +377,6 @@
</ClCompile> </ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\ev_epoll_linux.c"> <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\ev_epoll_linux.c">
</ClCompile> </ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\ev_poll_and_epoll_posix.c">
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\ev_poll_posix.c"> <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\ev_poll_posix.c">
</ClCompile> </ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\ev_posix.c"> <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\ev_posix.c">

@ -133,9 +133,6 @@
<ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\ev_epoll_linux.c"> <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\ev_epoll_linux.c">
<Filter>src\core\lib\iomgr</Filter> <Filter>src\core\lib\iomgr</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\ev_poll_and_epoll_posix.c">
<Filter>src\core\lib\iomgr</Filter>
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\ev_poll_posix.c"> <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\ev_poll_posix.c">
<Filter>src\core\lib\iomgr</Filter> <Filter>src\core\lib\iomgr</Filter>
</ClCompile> </ClCompile>
@ -596,9 +593,6 @@
<ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\ev_epoll_linux.h"> <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\ev_epoll_linux.h">
<Filter>src\core\lib\iomgr</Filter> <Filter>src\core\lib\iomgr</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\ev_poll_and_epoll_posix.h">
<Filter>src\core\lib\iomgr</Filter>
</ClInclude>
<ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\ev_poll_posix.h"> <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\ev_poll_posix.h">
<Filter>src\core\lib\iomgr</Filter> <Filter>src\core\lib\iomgr</Filter>
</ClInclude> </ClInclude>

@ -310,7 +310,6 @@
<ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\endpoint_pair.h" /> <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\endpoint_pair.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\error.h" /> <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\error.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\ev_epoll_linux.h" /> <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\ev_epoll_linux.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\ev_poll_and_epoll_posix.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\ev_poll_posix.h" /> <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\ev_poll_posix.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\ev_posix.h" /> <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\ev_posix.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\exec_ctx.h" /> <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\exec_ctx.h" />
@ -495,8 +494,6 @@
</ClCompile> </ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\ev_epoll_linux.c"> <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\ev_epoll_linux.c">
</ClCompile> </ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\ev_poll_and_epoll_posix.c">
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\ev_poll_posix.c"> <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\ev_poll_posix.c">
</ClCompile> </ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\ev_posix.c"> <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\ev_posix.c">

@ -79,9 +79,6 @@
<ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\ev_epoll_linux.c"> <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\ev_epoll_linux.c">
<Filter>src\core\lib\iomgr</Filter> <Filter>src\core\lib\iomgr</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\ev_poll_and_epoll_posix.c">
<Filter>src\core\lib\iomgr</Filter>
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\ev_poll_posix.c"> <ClCompile Include="$(SolutionDir)\..\src\core\lib\iomgr\ev_poll_posix.c">
<Filter>src\core\lib\iomgr</Filter> <Filter>src\core\lib\iomgr</Filter>
</ClCompile> </ClCompile>
@ -713,9 +710,6 @@
<ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\ev_epoll_linux.h"> <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\ev_epoll_linux.h">
<Filter>src\core\lib\iomgr</Filter> <Filter>src\core\lib\iomgr</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\ev_poll_and_epoll_posix.h">
<Filter>src\core\lib\iomgr</Filter>
</ClInclude>
<ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\ev_poll_posix.h"> <ClInclude Include="$(SolutionDir)\..\src\core\lib\iomgr\ev_poll_posix.h">
<Filter>src\core\lib\iomgr</Filter> <Filter>src\core\lib\iomgr</Filter>
</ClInclude> </ClInclude>

@ -187,6 +187,8 @@
</ClCompile> </ClCompile>
<ClCompile Include="$(SolutionDir)\..\test\core\end2end\tests\filter_causes_close.c"> <ClCompile Include="$(SolutionDir)\..\test\core\end2end\tests\filter_causes_close.c">
</ClCompile> </ClCompile>
<ClCompile Include="$(SolutionDir)\..\test\core\end2end\tests\filter_latency.c">
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\test\core\end2end\tests\graceful_server_shutdown.c"> <ClCompile Include="$(SolutionDir)\..\test\core\end2end\tests\graceful_server_shutdown.c">
</ClCompile> </ClCompile>
<ClCompile Include="$(SolutionDir)\..\test\core\end2end\tests\high_initial_seqno.c"> <ClCompile Include="$(SolutionDir)\..\test\core\end2end\tests\high_initial_seqno.c">

@ -55,6 +55,9 @@
<ClCompile Include="$(SolutionDir)\..\test\core\end2end\tests\filter_causes_close.c"> <ClCompile Include="$(SolutionDir)\..\test\core\end2end\tests\filter_causes_close.c">
<Filter>test\core\end2end\tests</Filter> <Filter>test\core\end2end\tests</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="$(SolutionDir)\..\test\core\end2end\tests\filter_latency.c">
<Filter>test\core\end2end\tests</Filter>
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\test\core\end2end\tests\graceful_server_shutdown.c"> <ClCompile Include="$(SolutionDir)\..\test\core\end2end\tests\graceful_server_shutdown.c">
<Filter>test\core\end2end\tests</Filter> <Filter>test\core\end2end\tests</Filter>
</ClCompile> </ClCompile>

@ -189,6 +189,8 @@
</ClCompile> </ClCompile>
<ClCompile Include="$(SolutionDir)\..\test\core\end2end\tests\filter_causes_close.c"> <ClCompile Include="$(SolutionDir)\..\test\core\end2end\tests\filter_causes_close.c">
</ClCompile> </ClCompile>
<ClCompile Include="$(SolutionDir)\..\test\core\end2end\tests\filter_latency.c">
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\test\core\end2end\tests\graceful_server_shutdown.c"> <ClCompile Include="$(SolutionDir)\..\test\core\end2end\tests\graceful_server_shutdown.c">
</ClCompile> </ClCompile>
<ClCompile Include="$(SolutionDir)\..\test\core\end2end\tests\high_initial_seqno.c"> <ClCompile Include="$(SolutionDir)\..\test\core\end2end\tests\high_initial_seqno.c">

@ -58,6 +58,9 @@
<ClCompile Include="$(SolutionDir)\..\test\core\end2end\tests\filter_causes_close.c"> <ClCompile Include="$(SolutionDir)\..\test\core\end2end\tests\filter_causes_close.c">
<Filter>test\core\end2end\tests</Filter> <Filter>test\core\end2end\tests</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="$(SolutionDir)\..\test\core\end2end\tests\filter_latency.c">
<Filter>test\core\end2end\tests</Filter>
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\test\core\end2end\tests\graceful_server_shutdown.c"> <ClCompile Include="$(SolutionDir)\..\test\core\end2end\tests\graceful_server_shutdown.c">
<Filter>test\core\end2end\tests</Filter> <Filter>test\core\end2end\tests</Filter>
</ClCompile> </ClCompile>

Loading…
Cancel
Save