Merge github.com:grpc/grpc into bwest

pull/9230/head
Craig Tiller 8 years ago
commit 27ffc9b551
  1. 2
      BUILD
  2. 12
      Makefile
  3. 12
      build.yaml
  4. 2
      src/core/ext/transport/cronet/transport/cronet_api_dummy.c
  5. 2
      src/core/ext/transport/cronet/transport/cronet_transport.c
  6. 24
      src/core/lib/surface/call.c
  7. 4
      src/objective-c/tests/CronetUnitTests/CronetUnitTests.m
  8. 3
      templates/Makefile.template
  9. 8
      test/core/bad_client/bad_client.c
  10. 2
      test/core/bad_client/tests/badreq.c
  11. 2
      test/core/bad_client/tests/connection_prefix.c
  12. 2
      test/core/bad_client/tests/headers.c
  13. 2
      test/core/bad_client/tests/initial_settings_frame.c
  14. 2
      test/core/bad_client/tests/simple_request.c
  15. 2
      test/core/bad_client/tests/unknown_frame.c
  16. 2
      test/core/bad_client/tests/window_overflow.c
  17. 2
      test/core/bad_ssl/bad_ssl_test.c
  18. 2
      test/core/bad_ssl/server_common.c
  19. 2
      test/core/census/mlog_test.c
  20. 12
      test/core/client_channel/lb_policies_test.c
  21. 2
      test/core/client_channel/resolvers/dns_resolver_connectivity_test.c
  22. 2
      test/core/end2end/connection_refused_test.c
  23. 2
      test/core/end2end/cq_verifier.c
  24. 2
      test/core/end2end/cq_verifier_native.c
  25. 4
      test/core/end2end/dualstack_socket_test.c
  26. 4
      test/core/end2end/fixtures/h2_full+trace.c
  27. 4
      test/core/end2end/fixtures/h2_sockpair+trace.c
  28. 2
      test/core/end2end/fixtures/h2_sockpair_1byte.c
  29. 4
      test/core/end2end/fixtures/h2_ssl_cert.c
  30. 11
      test/core/end2end/fuzzers/api_fuzzer.c
  31. BIN
      test/core/end2end/fuzzers/api_fuzzer_corpus/008d276f01f9371a5956cccf2eeeadb790728a84
  32. BIN
      test/core/end2end/fuzzers/api_fuzzer_corpus/00ba96baafa4595f2d41c2fcf0a27f4e9be5c44d
  33. BIN
      test/core/end2end/fuzzers/api_fuzzer_corpus/0163bae995fe67a902eabf9f2644726d4767184c
  34. BIN
      test/core/end2end/fuzzers/api_fuzzer_corpus/03eb66a763e065772bbb09e9a55baf081814ff25
  35. BIN
      test/core/end2end/fuzzers/api_fuzzer_corpus/053b47093c2145d00b8d53ea58b80afcc876109b
  36. BIN
      test/core/end2end/fuzzers/api_fuzzer_corpus/06a298ad14533924c9fcb2df0d462c44a206f64b
  37. BIN
      test/core/end2end/fuzzers/api_fuzzer_corpus/06d20c59bcbeb0deff39619455a713691191bccd
  38. BIN
      test/core/end2end/fuzzers/api_fuzzer_corpus/07867ad24a27ff8675dc36a1d8da833f9ee9434b
  39. BIN
      test/core/end2end/fuzzers/api_fuzzer_corpus/0914e4f6ee18c9d15b8df1858a7745b86d875970
  40. BIN
      test/core/end2end/fuzzers/api_fuzzer_corpus/091f02cc858a89253748b7d1051b8728d0e34015
  41. BIN
      test/core/end2end/fuzzers/api_fuzzer_corpus/095e3fa32a271ef9326d4dcd59fbd003977fdcfa
  42. BIN
      test/core/end2end/fuzzers/api_fuzzer_corpus/097f758de0f31691fac6637bf8ac5ac946d5b079
  43. BIN
      test/core/end2end/fuzzers/api_fuzzer_corpus/099cc7faaaa2620df22c9bcd6e6d49730e4788b3
  44. BIN
      test/core/end2end/fuzzers/api_fuzzer_corpus/0a3f1f614446ded112775bbbc5c61513ad78e12e
  45. BIN
      test/core/end2end/fuzzers/api_fuzzer_corpus/0ab436006cb2ecd8ecb2400fed982886e4589360
  46. BIN
      test/core/end2end/fuzzers/api_fuzzer_corpus/0c26c7da58087406c491efb8f8f721eb934e6a5a
  47. BIN
      test/core/end2end/fuzzers/api_fuzzer_corpus/0d25b57b2ac671377f8042015896619c09a2f9b5
  48. BIN
      test/core/end2end/fuzzers/api_fuzzer_corpus/0dfc84a6703bdbe9a6acb72e178353d5d69f5814
  49. BIN
      test/core/end2end/fuzzers/api_fuzzer_corpus/0e7a05178db60007ff4a8dea0e22b60825976c51
  50. BIN
      test/core/end2end/fuzzers/api_fuzzer_corpus/0ec11a92c1830b4c2f56a0979dd9e3c7162bd624
  51. BIN
      test/core/end2end/fuzzers/api_fuzzer_corpus/0feaff8d6ad28109f35d6c6080504456b242c8ce
  52. BIN
      test/core/end2end/fuzzers/api_fuzzer_corpus/10b47823e11c988222f5f778146f9cf922b286bf
  53. BIN
      test/core/end2end/fuzzers/api_fuzzer_corpus/128a7ef7f9b87c4f299d3cafe2dfdb9b161756bd
  54. BIN
      test/core/end2end/fuzzers/api_fuzzer_corpus/14ee9fbfe5284650e3a3de83ecc3e09abdc48c16
  55. BIN
      test/core/end2end/fuzzers/api_fuzzer_corpus/163cf93cebfb32d617830aa4e69e8b5f59bd3a08
  56. BIN
      test/core/end2end/fuzzers/api_fuzzer_corpus/17582452219fc4a27058a789f416a56631461296
  57. BIN
      test/core/end2end/fuzzers/api_fuzzer_corpus/1776f4c32c11490c65b81d0b7ae2ece4a3d1e9a7
  58. BIN
      test/core/end2end/fuzzers/api_fuzzer_corpus/17a1354d2bfe982e9db1bac550fe01dd105f81c3
  59. BIN
      test/core/end2end/fuzzers/api_fuzzer_corpus/17bc3a2ae619ef05ad35b147f4916c0453ebacf1
  60. BIN
      test/core/end2end/fuzzers/api_fuzzer_corpus/17e562d437fd283e58a5621c33b13191333b279f
  61. BIN
      test/core/end2end/fuzzers/api_fuzzer_corpus/1847f224b543fd0592e9cf365b8eddb61c140d82
  62. BIN
      test/core/end2end/fuzzers/api_fuzzer_corpus/19fdd6cdeee7a5cbc991d0e3242c23d5aaff2fbf
  63. BIN
      test/core/end2end/fuzzers/api_fuzzer_corpus/1b331dfc1d9d535063f0cc6f7a709499a5f8cb59
  64. BIN
      test/core/end2end/fuzzers/api_fuzzer_corpus/1b50ba2e44a359f37205ae476682495cff96838d
  65. BIN
      test/core/end2end/fuzzers/api_fuzzer_corpus/1c968074e9dcd8e9922e6c01ecfedcaf7b2fe5a3
  66. BIN
      test/core/end2end/fuzzers/api_fuzzer_corpus/1ca16103f5175b0607b579e0c3734b59843e27b0
  67. BIN
      test/core/end2end/fuzzers/api_fuzzer_corpus/1cae148c387cd20a1742d902543c2c8396589479
  68. BIN
      test/core/end2end/fuzzers/api_fuzzer_corpus/1cfd4875b6708b439f1db655abfdd57c1141348a
  69. BIN
      test/core/end2end/fuzzers/api_fuzzer_corpus/1d10780f4cb83cb9f6762548ae133d2115c4354f
  70. BIN
      test/core/end2end/fuzzers/api_fuzzer_corpus/1dba0d6c34b03b19e648e2fc9cb3aa7a13e713a2
  71. BIN
      test/core/end2end/fuzzers/api_fuzzer_corpus/1de191d81c4c7bf0e026bff0a040165c084fd630
  72. BIN
      test/core/end2end/fuzzers/api_fuzzer_corpus/1e1f1e0230004479b502603a1b60552192559679
  73. BIN
      test/core/end2end/fuzzers/api_fuzzer_corpus/1f3f61bbe6ea0c7e9b447f134742b3e7909b9198
  74. BIN
      test/core/end2end/fuzzers/api_fuzzer_corpus/224b2255a1bd250102481abc3e823090650e231e
  75. BIN
      test/core/end2end/fuzzers/api_fuzzer_corpus/23746fe5e477430aec8b12e9d7de0f86f6a6e191
  76. BIN
      test/core/end2end/fuzzers/api_fuzzer_corpus/247a7d3e0061dd0f32c3f6b2fc43a08e2cc8cf72
  77. BIN
      test/core/end2end/fuzzers/api_fuzzer_corpus/26794761df5dc7f093d2395b81a32af5e6b54392
  78. BIN
      test/core/end2end/fuzzers/api_fuzzer_corpus/268d8763bb7846f4c9ebb4fbea476a5bc8fcc389
  79. BIN
      test/core/end2end/fuzzers/api_fuzzer_corpus/289c2b6211858aa4a46b5b489bc4c9dd47828d21
  80. BIN
      test/core/end2end/fuzzers/api_fuzzer_corpus/28cbfc7c1b760d216cc592a273088b31833ee707
  81. BIN
      test/core/end2end/fuzzers/api_fuzzer_corpus/28fc3136371b5bcac84045ab6cc93e77298760e2
  82. BIN
      test/core/end2end/fuzzers/api_fuzzer_corpus/2bb76eff88c5af98c4b8828047837fe97b50cfeb
  83. BIN
      test/core/end2end/fuzzers/api_fuzzer_corpus/2ce3268455c461a30eb30f4792087df411548c13
  84. BIN
      test/core/end2end/fuzzers/api_fuzzer_corpus/2d03c424dd0677a68f28bb94536f49844d79d00a
  85. BIN
      test/core/end2end/fuzzers/api_fuzzer_corpus/2dbe958ef23ade1b8bbb9669e590fa99454970b4
  86. BIN
      test/core/end2end/fuzzers/api_fuzzer_corpus/2df7ea9c0c488fc8f79d33b6bce5667a2f051a65
  87. BIN
      test/core/end2end/fuzzers/api_fuzzer_corpus/2feac28b1f508d6086f4cb0972800a77e1d01201
  88. BIN
      test/core/end2end/fuzzers/api_fuzzer_corpus/307aaef3b3982cf8d4780a1f896d5392037c5db2
  89. BIN
      test/core/end2end/fuzzers/api_fuzzer_corpus/3082fa77cc2942ae425a6577d1f9c0dddd2949be
  90. BIN
      test/core/end2end/fuzzers/api_fuzzer_corpus/308fbf16b3f3747423b2ff69ef5930b01ca9b728
  91. BIN
      test/core/end2end/fuzzers/api_fuzzer_corpus/30d2e4b3cac45cbcfe76459c90c49e085914c154
  92. BIN
      test/core/end2end/fuzzers/api_fuzzer_corpus/31d8226b1d767fc895e87d7feede0e2d7c6c0b66
  93. BIN
      test/core/end2end/fuzzers/api_fuzzer_corpus/33252c0d4edb12370235c0179abd87a5efb59d29
  94. BIN
      test/core/end2end/fuzzers/api_fuzzer_corpus/33d926a04c1868c3393b3129968ffd32049a1c64
  95. BIN
      test/core/end2end/fuzzers/api_fuzzer_corpus/34e2445f42fd82c5ce229782a93764def3aae0e7
  96. BIN
      test/core/end2end/fuzzers/api_fuzzer_corpus/35d6503b48b5acc5486a158696ae98a98f46e1a4
  97. BIN
      test/core/end2end/fuzzers/api_fuzzer_corpus/35ea066b0fc90521bd8401ef4c52cdc9897d35d4
  98. BIN
      test/core/end2end/fuzzers/api_fuzzer_corpus/3698d88414f52b7c4759bfdadb53161b226faf8c
  99. BIN
      test/core/end2end/fuzzers/api_fuzzer_corpus/36dd4f4239b63b9cf379b354de0dc72e6356fba5
  100. BIN
      test/core/end2end/fuzzers/api_fuzzer_corpus/38259d219a41c1bc60e3867dc60e3473f98cef64
  101. Some files were not shown because too many files have changed in this diff Show More

@ -1040,7 +1040,7 @@ grpc_cc_library(
"src/core/ext/transport/cronet/transport/cronet_transport.c", "src/core/ext/transport/cronet/transport/cronet_transport.c",
], ],
hdrs = [ hdrs = [
"third_party/Cronet/bidirectional_stream_c.h", "third_party/objective_c/Cronet/bidirectional_stream_c.h",
], ],
language = "c", language = "c",
public_hdrs = [ public_hdrs = [

@ -111,7 +111,6 @@ LDXX_helgrind = $(DEFAULT_CXX)
CPPFLAGS_helgrind = -O0 CPPFLAGS_helgrind = -O0
LDFLAGS_helgrind = -rdynamic LDFLAGS_helgrind = -rdynamic
DEFINES_helgrind = _DEBUG DEBUG DEFINES_helgrind = _DEBUG DEBUG
DEFINES_helgrind += GRPC_TEST_SLOWDOWN_BUILD_FACTOR=20
VALID_CONFIG_asan-noleaks = 1 VALID_CONFIG_asan-noleaks = 1
REQUIRE_CUSTOM_LIBRARIES_asan-noleaks = 1 REQUIRE_CUSTOM_LIBRARIES_asan-noleaks = 1
@ -121,7 +120,6 @@ LD_asan-noleaks = clang
LDXX_asan-noleaks = clang++ LDXX_asan-noleaks = clang++
CPPFLAGS_asan-noleaks = -O0 -fsanitize-coverage=edge -fsanitize=address -fno-omit-frame-pointer -Wno-unused-command-line-argument -DGPR_NO_DIRECT_SYSCALLS CPPFLAGS_asan-noleaks = -O0 -fsanitize-coverage=edge -fsanitize=address -fno-omit-frame-pointer -Wno-unused-command-line-argument -DGPR_NO_DIRECT_SYSCALLS
LDFLAGS_asan-noleaks = -fsanitize=address LDFLAGS_asan-noleaks = -fsanitize=address
DEFINES_asan-noleaks += GRPC_TEST_SLOWDOWN_BUILD_FACTOR=3
VALID_CONFIG_asan-trace-cmp = 1 VALID_CONFIG_asan-trace-cmp = 1
REQUIRE_CUSTOM_LIBRARIES_asan-trace-cmp = 1 REQUIRE_CUSTOM_LIBRARIES_asan-trace-cmp = 1
@ -131,7 +129,6 @@ LD_asan-trace-cmp = clang
LDXX_asan-trace-cmp = clang++ LDXX_asan-trace-cmp = clang++
CPPFLAGS_asan-trace-cmp = -O0 -fsanitize-coverage=edge -fsanitize-coverage=trace-cmp -fsanitize=address -fno-omit-frame-pointer -Wno-unused-command-line-argument -DGPR_NO_DIRECT_SYSCALLS CPPFLAGS_asan-trace-cmp = -O0 -fsanitize-coverage=edge -fsanitize-coverage=trace-cmp -fsanitize=address -fno-omit-frame-pointer -Wno-unused-command-line-argument -DGPR_NO_DIRECT_SYSCALLS
LDFLAGS_asan-trace-cmp = -fsanitize=address LDFLAGS_asan-trace-cmp = -fsanitize=address
DEFINES_asan-trace-cmp += GRPC_TEST_SLOWDOWN_BUILD_FACTOR=3
VALID_CONFIG_dbg = 1 VALID_CONFIG_dbg = 1
CC_dbg = $(DEFAULT_CC) CC_dbg = $(DEFAULT_CC)
@ -166,7 +163,6 @@ LDXX_memcheck = $(DEFAULT_CXX)
CPPFLAGS_memcheck = -O0 CPPFLAGS_memcheck = -O0
LDFLAGS_memcheck = -rdynamic LDFLAGS_memcheck = -rdynamic
DEFINES_memcheck = _DEBUG DEBUG DEFINES_memcheck = _DEBUG DEBUG
DEFINES_memcheck += GRPC_TEST_SLOWDOWN_BUILD_FACTOR=10
VALID_CONFIG_asan = 1 VALID_CONFIG_asan = 1
REQUIRE_CUSTOM_LIBRARIES_asan = 1 REQUIRE_CUSTOM_LIBRARIES_asan = 1
@ -176,7 +172,6 @@ LD_asan = clang
LDXX_asan = clang++ LDXX_asan = clang++
CPPFLAGS_asan = -O0 -fsanitize-coverage=edge -fsanitize=address -fno-omit-frame-pointer -Wno-unused-command-line-argument -DGPR_NO_DIRECT_SYSCALLS CPPFLAGS_asan = -O0 -fsanitize-coverage=edge -fsanitize=address -fno-omit-frame-pointer -Wno-unused-command-line-argument -DGPR_NO_DIRECT_SYSCALLS
LDFLAGS_asan = -fsanitize=address LDFLAGS_asan = -fsanitize=address
DEFINES_asan += GRPC_TEST_SLOWDOWN_BUILD_FACTOR=3
VALID_CONFIG_tsan = 1 VALID_CONFIG_tsan = 1
REQUIRE_CUSTOM_LIBRARIES_tsan = 1 REQUIRE_CUSTOM_LIBRARIES_tsan = 1
@ -187,7 +182,6 @@ LDXX_tsan = clang++
CPPFLAGS_tsan = -O0 -fsanitize=thread -fno-omit-frame-pointer -Wno-unused-command-line-argument -DGPR_NO_DIRECT_SYSCALLS CPPFLAGS_tsan = -O0 -fsanitize=thread -fno-omit-frame-pointer -Wno-unused-command-line-argument -DGPR_NO_DIRECT_SYSCALLS
LDFLAGS_tsan = -fsanitize=thread LDFLAGS_tsan = -fsanitize=thread
DEFINES_tsan = GRPC_TSAN DEFINES_tsan = GRPC_TSAN
DEFINES_tsan += GRPC_TEST_SLOWDOWN_BUILD_FACTOR=5
VALID_CONFIG_ubsan = 1 VALID_CONFIG_ubsan = 1
REQUIRE_CUSTOM_LIBRARIES_ubsan = 1 REQUIRE_CUSTOM_LIBRARIES_ubsan = 1
@ -198,7 +192,6 @@ LDXX_ubsan = clang++
CPPFLAGS_ubsan = -O0 -fsanitize-coverage=edge -fsanitize=undefined,unsigned-integer-overflow -fno-omit-frame-pointer -Wno-unused-command-line-argument -Wvarargs CPPFLAGS_ubsan = -O0 -fsanitize-coverage=edge -fsanitize=undefined,unsigned-integer-overflow -fno-omit-frame-pointer -Wno-unused-command-line-argument -Wvarargs
LDFLAGS_ubsan = -fsanitize=undefined,unsigned-integer-overflow LDFLAGS_ubsan = -fsanitize=undefined,unsigned-integer-overflow
DEFINES_ubsan = NDEBUG DEFINES_ubsan = NDEBUG
DEFINES_ubsan += GRPC_TEST_SLOWDOWN_BUILD_FACTOR=1.5
VALID_CONFIG_msan = 1 VALID_CONFIG_msan = 1
REQUIRE_CUSTOM_LIBRARIES_msan = 1 REQUIRE_CUSTOM_LIBRARIES_msan = 1
@ -209,7 +202,6 @@ LDXX_msan = clang++
CPPFLAGS_msan = -O0 -fsanitize-coverage=edge -fsanitize=memory -fsanitize-memory-track-origins -fno-omit-frame-pointer -DGTEST_HAS_TR1_TUPLE=0 -DGTEST_USE_OWN_TR1_TUPLE=1 -Wno-unused-command-line-argument -fPIE -pie -DGPR_NO_DIRECT_SYSCALLS CPPFLAGS_msan = -O0 -fsanitize-coverage=edge -fsanitize=memory -fsanitize-memory-track-origins -fno-omit-frame-pointer -DGTEST_HAS_TR1_TUPLE=0 -DGTEST_USE_OWN_TR1_TUPLE=1 -Wno-unused-command-line-argument -fPIE -pie -DGPR_NO_DIRECT_SYSCALLS
LDFLAGS_msan = -fsanitize=memory -DGTEST_HAS_TR1_TUPLE=0 -DGTEST_USE_OWN_TR1_TUPLE=1 -fPIE -pie $(if $(JENKINS_BUILD),-Wl$(comma)-Ttext-segment=0x7e0000000000,) LDFLAGS_msan = -fsanitize=memory -DGTEST_HAS_TR1_TUPLE=0 -DGTEST_USE_OWN_TR1_TUPLE=1 -fPIE -pie $(if $(JENKINS_BUILD),-Wl$(comma)-Ttext-segment=0x7e0000000000,)
DEFINES_msan = NDEBUG DEFINES_msan = NDEBUG
DEFINES_msan += GRPC_TEST_SLOWDOWN_BUILD_FACTOR=4
VALID_CONFIG_mutrace = 1 VALID_CONFIG_mutrace = 1
CC_mutrace = $(DEFAULT_CC) CC_mutrace = $(DEFAULT_CC)
@ -1898,8 +1890,6 @@ test_cxx: buildtests_cxx
$(Q) $(BINDIR)/$(CONFIG)/grpclb_api_test || ( echo test grpclb_api_test failed ; exit 1 ) $(Q) $(BINDIR)/$(CONFIG)/grpclb_api_test || ( echo test grpclb_api_test failed ; exit 1 )
$(E) "[RUN] Testing grpclb_test" $(E) "[RUN] Testing grpclb_test"
$(Q) $(BINDIR)/$(CONFIG)/grpclb_test || ( echo test grpclb_test failed ; exit 1 ) $(Q) $(BINDIR)/$(CONFIG)/grpclb_test || ( echo test grpclb_test failed ; exit 1 )
$(E) "[RUN] Testing hybrid_end2end_test"
$(Q) $(BINDIR)/$(CONFIG)/hybrid_end2end_test || ( echo test hybrid_end2end_test failed ; exit 1 )
$(E) "[RUN] Testing interop_test" $(E) "[RUN] Testing interop_test"
$(Q) $(BINDIR)/$(CONFIG)/interop_test || ( echo test interop_test failed ; exit 1 ) $(Q) $(BINDIR)/$(CONFIG)/interop_test || ( echo test interop_test failed ; exit 1 )
$(E) "[RUN] Testing mock_test" $(E) "[RUN] Testing mock_test"
@ -1935,6 +1925,8 @@ test_cxx: buildtests_cxx
flaky_test_cxx: buildtests_cxx flaky_test_cxx: buildtests_cxx
$(E) "[RUN] Testing hybrid_end2end_test"
$(Q) $(BINDIR)/$(CONFIG)/hybrid_end2end_test || ( echo test hybrid_end2end_test failed ; exit 1 )
test_python: static_c test_python: static_c

@ -697,7 +697,7 @@ filegroups:
- include/grpc/grpc_security.h - include/grpc/grpc_security.h
- include/grpc/grpc_security_constants.h - include/grpc/grpc_security_constants.h
headers: headers:
- third_party/Cronet/bidirectional_stream_c.h - third_party/objective_c/Cronet/bidirectional_stream_c.h
src: src:
- src/core/ext/transport/cronet/client/secure/cronet_channel_create.c - src/core/ext/transport/cronet/client/secure/cronet_channel_create.c
- src/core/ext/transport/cronet/transport/cronet_api_dummy.c - src/core/ext/transport/cronet/transport/cronet_api_dummy.c
@ -3300,7 +3300,7 @@ targets:
- linux - linux
- posix - posix
- name: hybrid_end2end_test - name: hybrid_end2end_test
gtest: true flaky: true
build: test build: test
language: c++ language: c++
src: src:
@ -3769,7 +3769,6 @@ configs:
test_environ: test_environ:
ASAN_OPTIONS: detect_leaks=1:color=always ASAN_OPTIONS: detect_leaks=1:color=always
LSAN_OPTIONS: suppressions=tools/lsan_suppressions.txt:report_objects=1 LSAN_OPTIONS: suppressions=tools/lsan_suppressions.txt:report_objects=1
timeout_multiplier: 3
asan-noleaks: asan-noleaks:
CC: clang CC: clang
CPPFLAGS: -O0 -fsanitize-coverage=edge -fsanitize=address -fno-omit-frame-pointer CPPFLAGS: -O0 -fsanitize-coverage=edge -fsanitize=address -fno-omit-frame-pointer
@ -3781,7 +3780,6 @@ configs:
compile_the_world: true compile_the_world: true
test_environ: test_environ:
ASAN_OPTIONS: detect_leaks=0:color=always ASAN_OPTIONS: detect_leaks=0:color=always
timeout_multiplier: 3
asan-trace-cmp: asan-trace-cmp:
CC: clang CC: clang
CPPFLAGS: -O0 -fsanitize-coverage=edge -fsanitize-coverage=trace-cmp -fsanitize=address CPPFLAGS: -O0 -fsanitize-coverage=edge -fsanitize-coverage=trace-cmp -fsanitize=address
@ -3794,7 +3792,6 @@ configs:
test_environ: test_environ:
ASAN_OPTIONS: detect_leaks=1:color=always ASAN_OPTIONS: detect_leaks=1:color=always
LSAN_OPTIONS: suppressions=tools/lsan_suppressions.txt:report_objects=1 LSAN_OPTIONS: suppressions=tools/lsan_suppressions.txt:report_objects=1
timeout_multiplier: 3
basicprof: basicprof:
CPPFLAGS: -O2 -DGRPC_BASIC_PROFILER -DGRPC_TIMERS_RDTSC CPPFLAGS: -O2 -DGRPC_BASIC_PROFILER -DGRPC_TIMERS_RDTSC
DEFINES: NDEBUG DEFINES: NDEBUG
@ -3813,13 +3810,11 @@ configs:
CPPFLAGS: -O0 CPPFLAGS: -O0
DEFINES: _DEBUG DEBUG DEFINES: _DEBUG DEBUG
LDFLAGS: -rdynamic LDFLAGS: -rdynamic
timeout_multiplier: 20
valgrind: --tool=helgrind valgrind: --tool=helgrind
memcheck: memcheck:
CPPFLAGS: -O0 CPPFLAGS: -O0
DEFINES: _DEBUG DEBUG DEFINES: _DEBUG DEBUG
LDFLAGS: -rdynamic LDFLAGS: -rdynamic
timeout_multiplier: 10
valgrind: --tool=memcheck --leak-check=full valgrind: --tool=memcheck --leak-check=full
msan: msan:
CC: clang CC: clang
@ -3833,7 +3828,6 @@ configs:
-fPIE -pie $(if $(JENKINS_BUILD),-Wl$(comma)-Ttext-segment=0x7e0000000000,) -fPIE -pie $(if $(JENKINS_BUILD),-Wl$(comma)-Ttext-segment=0x7e0000000000,)
LDXX: clang++ LDXX: clang++
compile_the_world: true compile_the_world: true
timeout_multiplier: 4
mutrace: mutrace:
CPPFLAGS: -O3 -fno-omit-frame-pointer CPPFLAGS: -O3 -fno-omit-frame-pointer
DEFINES: NDEBUG DEFINES: NDEBUG
@ -3856,7 +3850,6 @@ configs:
compile_the_world: true compile_the_world: true
test_environ: test_environ:
TSAN_OPTIONS: suppressions=tools/tsan_suppressions.txt:halt_on_error=1:second_deadlock_stack=1 TSAN_OPTIONS: suppressions=tools/tsan_suppressions.txt:halt_on_error=1:second_deadlock_stack=1
timeout_multiplier: 5
ubsan: ubsan:
CC: clang CC: clang
CPPFLAGS: -O0 -fsanitize-coverage=edge -fsanitize=undefined,unsigned-integer-overflow CPPFLAGS: -O0 -fsanitize-coverage=edge -fsanitize=undefined,unsigned-integer-overflow
@ -3869,7 +3862,6 @@ configs:
compile_the_world: true compile_the_world: true
test_environ: test_environ:
UBSAN_OPTIONS: halt_on_error=1:print_stacktrace=1 UBSAN_OPTIONS: halt_on_error=1:print_stacktrace=1
timeout_multiplier: 1.5
defaults: defaults:
benchmark: benchmark:
CPPFLAGS: -Ithird_party/benchmark/include -DHAVE_POSIX_REGEX CPPFLAGS: -Ithird_party/benchmark/include -DHAVE_POSIX_REGEX

@ -38,7 +38,7 @@ library, so we can build it in all environments */
#include <grpc/support/log.h> #include <grpc/support/log.h>
#include "third_party/Cronet/bidirectional_stream_c.h" #include "third_party/objective_c/Cronet/bidirectional_stream_c.h"
#ifdef GRPC_COMPILE_WITH_CRONET #ifdef GRPC_COMPILE_WITH_CRONET
/* link with the real CRONET library in the build system */ /* link with the real CRONET library in the build system */

@ -51,7 +51,7 @@
#include "src/core/lib/transport/metadata_batch.h" #include "src/core/lib/transport/metadata_batch.h"
#include "src/core/lib/transport/static_metadata.h" #include "src/core/lib/transport/static_metadata.h"
#include "src/core/lib/transport/transport_impl.h" #include "src/core/lib/transport/transport_impl.h"
#include "third_party/Cronet/bidirectional_stream_c.h" #include "third_party/objective_c/Cronet/bidirectional_stream_c.h"
#define GRPC_HEADER_SIZE_IN_BYTES 5 #define GRPC_HEADER_SIZE_IN_BYTES 5

@ -242,10 +242,18 @@ static void post_batch_completion(grpc_exec_ctx *exec_ctx, batch_control *bctl);
static void add_batch_error(grpc_exec_ctx *exec_ctx, batch_control *bctl, static void add_batch_error(grpc_exec_ctx *exec_ctx, batch_control *bctl,
grpc_error *error); grpc_error *error);
static void add_init_error(grpc_error **composite, grpc_error *new) {
if (new == GRPC_ERROR_NONE) return;
if (*composite == GRPC_ERROR_NONE)
*composite = GRPC_ERROR_CREATE("Call creation failed");
*composite = grpc_error_add_child(*composite, new);
}
grpc_error *grpc_call_create(grpc_exec_ctx *exec_ctx, grpc_error *grpc_call_create(grpc_exec_ctx *exec_ctx,
const grpc_call_create_args *args, const grpc_call_create_args *args,
grpc_call **out_call) { grpc_call **out_call) {
size_t i, j; size_t i, j;
grpc_error *error = GRPC_ERROR_NONE;
grpc_channel_stack *channel_stack = grpc_channel_stack *channel_stack =
grpc_channel_get_channel_stack(args->channel); grpc_channel_get_channel_stack(args->channel);
grpc_call *call; grpc_call *call;
@ -308,8 +316,11 @@ grpc_error *grpc_call_create(grpc_exec_ctx *exec_ctx,
grpc_call_context_set( grpc_call_context_set(
call, GRPC_CONTEXT_TRACING, call, GRPC_CONTEXT_TRACING,
args->parent_call->context[GRPC_CONTEXT_TRACING].value, NULL); args->parent_call->context[GRPC_CONTEXT_TRACING].value, NULL);
} else { } else if (0 ==
GPR_ASSERT(args->propagation_mask & GRPC_PROPAGATE_CENSUS_STATS_CONTEXT); (args->propagation_mask & GRPC_PROPAGATE_CENSUS_STATS_CONTEXT)) {
add_init_error(&error,
GRPC_ERROR_CREATE("Census tracing propagation requested "
"without Census context propagation"));
} }
if (args->propagation_mask & GRPC_PROPAGATE_CANCELLATION) { if (args->propagation_mask & GRPC_PROPAGATE_CANCELLATION) {
call->cancellation_is_inherited = 1; call->cancellation_is_inherited = 1;
@ -332,10 +343,11 @@ grpc_error *grpc_call_create(grpc_exec_ctx *exec_ctx,
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_call_stack_init( add_init_error(&error, grpc_call_stack_init(exec_ctx, channel_stack, 1,
exec_ctx, channel_stack, 1, destroy_call, call, call->context, destroy_call, call, call->context,
args->server_transport_data, path, call->start_time, send_deadline, args->server_transport_data, path,
CALL_STACK_FROM_CALL(call)); call->start_time, send_deadline,
CALL_STACK_FROM_CALL(call)));
if (error != GRPC_ERROR_NONE) { if (error != GRPC_ERROR_NONE) {
cancel_with_error(exec_ctx, call, GRPC_ERROR_REF(error)); cancel_with_error(exec_ctx, call, GRPC_ERROR_REF(error));
} }

@ -54,7 +54,7 @@
static void drain_cq(grpc_completion_queue *cq) { static void drain_cq(grpc_completion_queue *cq) {
grpc_event ev; grpc_event ev;
do { do {
ev = grpc_completion_queue_next(cq, GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5), NULL); ev = grpc_completion_queue_next(cq, grpc_timeout_seconds_to_deadline(5), NULL);
} while (ev.type != GRPC_QUEUE_SHUTDOWN); } while (ev.type != GRPC_QUEUE_SHUTDOWN);
} }
@ -97,7 +97,7 @@ static void drain_cq(grpc_completion_queue *cq) {
grpc_slice_from_copied_string("hello world"); grpc_slice_from_copied_string("hello world");
grpc_byte_buffer *request_payload = grpc_byte_buffer *request_payload =
grpc_raw_byte_buffer_create(&request_payload_slice, 1); grpc_raw_byte_buffer_create(&request_payload_slice, 1);
gpr_timespec deadline = GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5); gpr_timespec deadline = grpc_timeout_seconds_to_deadline(5);
grpc_metadata meta_c[2] = { grpc_metadata meta_c[2] = {
{"key1", "val1", 4, 0, {{NULL, NULL, NULL, NULL}}}, {"key1", "val1", 4, 0, {{NULL, NULL, NULL, NULL}}},
{"key2", "val2", 4, 0, {{NULL, NULL, NULL, NULL}}}}; {"key2", "val2", 4, 0, {{NULL, NULL, NULL, NULL}}}};

@ -135,9 +135,6 @@
${arg}_${name} = ${args.get(arg)} ${arg}_${name} = ${args.get(arg)}
% endif % endif
% endfor % endfor
% if args.get('timeout_multiplier', 1) != 1:
DEFINES_${name} += GRPC_TEST_SLOWDOWN_BUILD_FACTOR=${args.timeout_multiplier}
% endif
% endfor % endfor

@ -160,7 +160,7 @@ void grpc_run_bad_client_test(
/* Await completion */ /* Await completion */
GPR_ASSERT( GPR_ASSERT(
gpr_event_wait(&a.done_write, GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5))); gpr_event_wait(&a.done_write, grpc_timeout_seconds_to_deadline(5)));
if (flags & GRPC_BAD_CLIENT_DISCONNECT) { if (flags & GRPC_BAD_CLIENT_DISCONNECT) {
grpc_endpoint_shutdown(&exec_ctx, sfd.client, grpc_endpoint_shutdown(&exec_ctx, sfd.client,
@ -170,7 +170,7 @@ void grpc_run_bad_client_test(
sfd.client = NULL; sfd.client = NULL;
} }
GPR_ASSERT(gpr_event_wait(&a.done_thd, GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5))); GPR_ASSERT(gpr_event_wait(&a.done_thd, grpc_timeout_seconds_to_deadline(5)));
if (sfd.client != NULL) { if (sfd.client != NULL) {
// Validate client stream, if requested. // Validate client stream, if requested.
@ -186,7 +186,7 @@ void grpc_run_bad_client_test(
&read_done_closure); &read_done_closure);
grpc_exec_ctx_finish(&exec_ctx); grpc_exec_ctx_finish(&exec_ctx);
GPR_ASSERT( GPR_ASSERT(
gpr_event_wait(&args.read_done, GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5))); gpr_event_wait(&args.read_done, grpc_timeout_seconds_to_deadline(5)));
grpc_slice_buffer_destroy_internal(&exec_ctx, &args.incoming); grpc_slice_buffer_destroy_internal(&exec_ctx, &args.incoming);
} }
// Shutdown. // Shutdown.
@ -197,7 +197,7 @@ void grpc_run_bad_client_test(
} }
grpc_server_shutdown_and_notify(a.server, a.cq, NULL); grpc_server_shutdown_and_notify(a.server, a.cq, NULL);
GPR_ASSERT(grpc_completion_queue_pluck( GPR_ASSERT(grpc_completion_queue_pluck(
a.cq, NULL, GRPC_TIMEOUT_SECONDS_TO_DEADLINE(1), NULL) a.cq, NULL, grpc_timeout_seconds_to_deadline(1), NULL)
.type == GRPC_OP_COMPLETE); .type == GRPC_OP_COMPLETE);
grpc_server_destroy(a.server); grpc_server_destroy(a.server);
grpc_completion_queue_destroy(a.cq); grpc_completion_queue_destroy(a.cq);

@ -46,7 +46,7 @@ static void verifier(grpc_server *server, grpc_completion_queue *cq,
void *registered_method) { void *registered_method) {
while (grpc_server_has_open_connections(server)) { while (grpc_server_has_open_connections(server)) {
GPR_ASSERT(grpc_completion_queue_next( GPR_ASSERT(grpc_completion_queue_next(
cq, GRPC_TIMEOUT_MILLIS_TO_DEADLINE(20), NULL) cq, grpc_timeout_milliseconds_to_deadline(20), NULL)
.type == GRPC_QUEUE_TIMEOUT); .type == GRPC_QUEUE_TIMEOUT);
} }
} }

@ -38,7 +38,7 @@ static void verifier(grpc_server *server, grpc_completion_queue *cq,
void *registered_method) { void *registered_method) {
while (grpc_server_has_open_connections(server)) { while (grpc_server_has_open_connections(server)) {
GPR_ASSERT(grpc_completion_queue_next( GPR_ASSERT(grpc_completion_queue_next(
cq, GRPC_TIMEOUT_MILLIS_TO_DEADLINE(20), NULL) cq, grpc_timeout_milliseconds_to_deadline(20), NULL)
.type == GRPC_QUEUE_TIMEOUT); .type == GRPC_QUEUE_TIMEOUT);
} }
} }

@ -42,7 +42,7 @@ static void verifier(grpc_server *server, grpc_completion_queue *cq,
void *registered_method) { void *registered_method) {
while (grpc_server_has_open_connections(server)) { while (grpc_server_has_open_connections(server)) {
GPR_ASSERT(grpc_completion_queue_next( GPR_ASSERT(grpc_completion_queue_next(
cq, GRPC_TIMEOUT_MILLIS_TO_DEADLINE(20), NULL) cq, grpc_timeout_milliseconds_to_deadline(20), NULL)
.type == GRPC_QUEUE_TIMEOUT); .type == GRPC_QUEUE_TIMEOUT);
} }
} }

@ -41,7 +41,7 @@ static void verifier(grpc_server *server, grpc_completion_queue *cq,
void *registered_method) { void *registered_method) {
while (grpc_server_has_open_connections(server)) { while (grpc_server_has_open_connections(server)) {
GPR_ASSERT(grpc_completion_queue_next( GPR_ASSERT(grpc_completion_queue_next(
cq, GRPC_TIMEOUT_MILLIS_TO_DEADLINE(20), NULL) cq, grpc_timeout_milliseconds_to_deadline(20), NULL)
.type == GRPC_QUEUE_TIMEOUT); .type == GRPC_QUEUE_TIMEOUT);
} }
} }

@ -130,7 +130,7 @@ static void failure_verifier(grpc_server *server, grpc_completion_queue *cq,
void *registered_method) { void *registered_method) {
while (grpc_server_has_open_connections(server)) { while (grpc_server_has_open_connections(server)) {
GPR_ASSERT(grpc_completion_queue_next( GPR_ASSERT(grpc_completion_queue_next(
cq, GRPC_TIMEOUT_MILLIS_TO_DEADLINE(20), NULL) cq, grpc_timeout_milliseconds_to_deadline(20), NULL)
.type == GRPC_QUEUE_TIMEOUT); .type == GRPC_QUEUE_TIMEOUT);
} }
} }

@ -42,7 +42,7 @@ static void verifier(grpc_server *server, grpc_completion_queue *cq,
void *registered_method) { void *registered_method) {
while (grpc_server_has_open_connections(server)) { while (grpc_server_has_open_connections(server)) {
GPR_ASSERT(grpc_completion_queue_next( GPR_ASSERT(grpc_completion_queue_next(
cq, GRPC_TIMEOUT_MILLIS_TO_DEADLINE(20), NULL) cq, grpc_timeout_milliseconds_to_deadline(20), NULL)
.type == GRPC_QUEUE_TIMEOUT); .type == GRPC_QUEUE_TIMEOUT);
} }
} }

@ -61,7 +61,7 @@ static void verifier(grpc_server *server, grpc_completion_queue *cq,
void *registered_method) { void *registered_method) {
while (grpc_server_has_open_connections(server)) { while (grpc_server_has_open_connections(server)) {
GPR_ASSERT(grpc_completion_queue_next( GPR_ASSERT(grpc_completion_queue_next(
cq, GRPC_TIMEOUT_MILLIS_TO_DEADLINE(20), NULL) cq, grpc_timeout_milliseconds_to_deadline(20), NULL)
.type == GRPC_QUEUE_TIMEOUT); .type == GRPC_QUEUE_TIMEOUT);
} }
} }

@ -60,7 +60,7 @@ static void run_test(const char *target, size_t nops) {
grpc_slice details; grpc_slice details;
grpc_status_code status; grpc_status_code status;
grpc_call_error error; grpc_call_error error;
gpr_timespec deadline = GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5); gpr_timespec deadline = grpc_timeout_seconds_to_deadline(5);
grpc_completion_queue *cq = grpc_completion_queue_create(NULL); grpc_completion_queue *cq = grpc_completion_queue_create(NULL);
cq_verifier *cqv = cq_verifier_create(cq); cq_verifier *cqv = cq_verifier_create(cq);

@ -84,7 +84,7 @@ void bad_ssl_run(grpc_server *server) {
gpr_log(GPR_INFO, "Shutting down due to SIGINT"); gpr_log(GPR_INFO, "Shutting down due to SIGINT");
grpc_server_shutdown_and_notify(server, cq, NULL); grpc_server_shutdown_and_notify(server, cq, NULL);
GPR_ASSERT(grpc_completion_queue_pluck( GPR_ASSERT(grpc_completion_queue_pluck(
cq, NULL, GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5), NULL) cq, NULL, grpc_timeout_seconds_to_deadline(5), NULL)
.type == GRPC_OP_COMPLETE); .type == GRPC_OP_COMPLETE);
grpc_completion_queue_shutdown(cq); grpc_completion_queue_shutdown(cq);
shutdown_started = 1; shutdown_started = 1;

@ -185,7 +185,7 @@ static void writer_thread(void* arg) {
"written\n", "written\n",
args->index, records_written, args->num_records); args->index, records_written, args->num_records);
} }
gpr_sleep_until(GRPC_TIMEOUT_MILLIS_TO_DEADLINE(10)); gpr_sleep_until(grpc_timeout_milliseconds_to_deadline(10));
} }
} }
// Done. Decrement count and signal. // Done. Decrement count and signal.

@ -327,8 +327,9 @@ static request_sequences perform_request(servers_fixture *f,
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 ((ev = grpc_completion_queue_next( while (
f->cq, GRPC_TIMEOUT_MILLIS_TO_DEADLINE(RETRY_TIMEOUT), NULL)) (ev = grpc_completion_queue_next(
f->cq, grpc_timeout_milliseconds_to_deadline(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);
@ -406,8 +407,9 @@ static request_sequences perform_request(servers_fixture *f,
} }
} }
GPR_ASSERT(grpc_completion_queue_next( GPR_ASSERT(
f->cq, GRPC_TIMEOUT_MILLIS_TO_DEADLINE(RETRY_TIMEOUT), NULL) grpc_completion_queue_next(
f->cq, grpc_timeout_milliseconds_to_deadline(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);
@ -566,7 +568,7 @@ static void test_ping() {
READY is reached */ READY is reached */
while (state != GRPC_CHANNEL_READY) { while (state != GRPC_CHANNEL_READY) {
grpc_channel_watch_connectivity_state( grpc_channel_watch_connectivity_state(
client, state, GRPC_TIMEOUT_SECONDS_TO_DEADLINE(3), f->cq, tag(99)); client, state, grpc_timeout_seconds_to_deadline(3), f->cq, tag(99));
CQ_EXPECT_COMPLETION(cqv, tag(99), 1); CQ_EXPECT_COMPLETION(cqv, tag(99), 1);
cq_verify(cqv); cq_verify(cqv);
state = grpc_channel_check_connectivity_state(client, 0); state = grpc_channel_check_connectivity_state(client, 0);

@ -86,7 +86,7 @@ static void on_done(grpc_exec_ctx *exec_ctx, void *ev, grpc_error *error) {
static bool wait_loop(int deadline_seconds, gpr_event *ev) { static bool wait_loop(int deadline_seconds, gpr_event *ev) {
while (deadline_seconds) { while (deadline_seconds) {
gpr_log(GPR_DEBUG, "Test: waiting for %d more seconds", deadline_seconds); gpr_log(GPR_DEBUG, "Test: waiting for %d more seconds", deadline_seconds);
if (gpr_event_wait(ev, GRPC_TIMEOUT_SECONDS_TO_DEADLINE(1))) return true; if (gpr_event_wait(ev, grpc_timeout_seconds_to_deadline(1))) return true;
deadline_seconds--; deadline_seconds--;
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;

@ -53,7 +53,7 @@ static void *tag(intptr_t i) { return (void *)i; }
static void run_test(bool wait_for_ready, bool use_service_config) { static void run_test(bool wait_for_ready, bool use_service_config) {
grpc_channel *chan; grpc_channel *chan;
grpc_call *call; grpc_call *call;
gpr_timespec deadline = GRPC_TIMEOUT_SECONDS_TO_DEADLINE(2); gpr_timespec deadline = grpc_timeout_seconds_to_deadline(2);
grpc_completion_queue *cq; grpc_completion_queue *cq;
cq_verifier *cqv; cq_verifier *cqv;
grpc_op ops[6]; grpc_op ops[6];

@ -249,7 +249,7 @@ static void fail_no_event_received(cq_verifier *v) {
} }
void cq_verify(cq_verifier *v) { void cq_verify(cq_verifier *v) {
const gpr_timespec deadline = GRPC_TIMEOUT_SECONDS_TO_DEADLINE(10); const gpr_timespec deadline = grpc_timeout_seconds_to_deadline(10);
while (v->first_expectation != NULL) { while (v->first_expectation != NULL) {
grpc_event ev = grpc_completion_queue_next(v->cq, deadline, NULL); grpc_event ev = grpc_completion_queue_next(v->cq, deadline, NULL);
if (ev.type == GRPC_QUEUE_TIMEOUT) { if (ev.type == GRPC_QUEUE_TIMEOUT) {

@ -67,7 +67,7 @@ void cq_verifier_set_first_expectation(cq_verifier *v, expectation *e) {
grpc_event cq_verifier_next_event(cq_verifier *v, int timeout_seconds) { grpc_event cq_verifier_next_event(cq_verifier *v, int timeout_seconds) {
const gpr_timespec deadline = const gpr_timespec deadline =
GRPC_TIMEOUT_SECONDS_TO_DEADLINE(timeout_seconds); grpc_timeout_seconds_to_deadline(timeout_seconds);
return grpc_completion_queue_next(v->cq, deadline, NULL); return grpc_completion_queue_next(v->cq, deadline, NULL);
} }

@ -57,7 +57,7 @@
static void *tag(intptr_t i) { return (void *)i; } static void *tag(intptr_t i) { return (void *)i; }
static gpr_timespec ms_from_now(int ms) { static gpr_timespec ms_from_now(int ms) {
return GRPC_TIMEOUT_MILLIS_TO_DEADLINE(ms); return grpc_timeout_milliseconds_to_deadline(ms);
} }
static void drain_cq(grpc_completion_queue *cq) { static void drain_cq(grpc_completion_queue *cq) {
@ -261,7 +261,7 @@ void test_connect(const char *server_host, const char *client_host, int port,
/* Destroy server. */ /* Destroy server. */
grpc_server_shutdown_and_notify(server, cq, tag(1000)); grpc_server_shutdown_and_notify(server, cq, tag(1000));
GPR_ASSERT(grpc_completion_queue_pluck( GPR_ASSERT(grpc_completion_queue_pluck(
cq, tag(1000), GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5), NULL) cq, tag(1000), grpc_timeout_seconds_to_deadline(5), NULL)
.type == GRPC_OP_COMPLETE); .type == GRPC_OP_COMPLETE);
grpc_server_destroy(server); grpc_server_destroy(server);
grpc_completion_queue_shutdown(cq); grpc_completion_queue_shutdown(cq);

@ -117,9 +117,9 @@ int main(int argc, char **argv) {
gpr_setenv("GRPC_TRACE", "doesnt-exist,http,all"); gpr_setenv("GRPC_TRACE", "doesnt-exist,http,all");
#ifdef GRPC_POSIX_SOCKET #ifdef GRPC_POSIX_SOCKET
g_fixture_slowdown_factor = isatty(STDOUT_FILENO) ? 10.0 : 1.0; g_fixture_slowdown_factor = isatty(STDOUT_FILENO) ? 10 : 1;
#else #else
g_fixture_slowdown_factor = 10.0; g_fixture_slowdown_factor = 10;
#endif #endif
grpc_test_init(argc, argv); grpc_test_init(argc, argv);

@ -154,9 +154,9 @@ int main(int argc, char **argv) {
code paths in trace.c to be taken */ code paths in trace.c to be taken */
gpr_setenv("GRPC_TRACE", "doesnt-exist,http,all"); gpr_setenv("GRPC_TRACE", "doesnt-exist,http,all");
#ifdef GRPC_POSIX_SOCKET #ifdef GRPC_POSIX_SOCKET
g_fixture_slowdown_factor = isatty(STDOUT_FILENO) ? 10.0 : 1.0; g_fixture_slowdown_factor = isatty(STDOUT_FILENO) ? 10 : 1;
#else #else
g_fixture_slowdown_factor = 10.0; g_fixture_slowdown_factor = 10;
#endif #endif
grpc_test_init(argc, argv); grpc_test_init(argc, argv);

@ -144,7 +144,7 @@ static grpc_end2end_test_config configs[] = {
int main(int argc, char **argv) { int main(int argc, char **argv) {
size_t i; size_t i;
g_fixture_slowdown_factor = 2.0; g_fixture_slowdown_factor = 2;
grpc_test_init(argc, argv); grpc_test_init(argc, argv);
grpc_end2end_tests_pre_init(); grpc_end2end_tests_pre_init();

@ -275,7 +275,7 @@ static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config,
} }
static gpr_timespec n_seconds_time(int n) { static gpr_timespec n_seconds_time(int n) {
return GRPC_TIMEOUT_SECONDS_TO_DEADLINE(n); return grpc_timeout_seconds_to_deadline(n);
} }
static gpr_timespec five_seconds_time(void) { return n_seconds_time(5); } static gpr_timespec five_seconds_time(void) { return n_seconds_time(5); }
@ -291,7 +291,7 @@ static void shutdown_server(grpc_end2end_test_fixture *f) {
if (!f->server) return; if (!f->server) return;
grpc_server_shutdown_and_notify(f->server, f->cq, tag(1000)); grpc_server_shutdown_and_notify(f->server, f->cq, tag(1000));
GPR_ASSERT(grpc_completion_queue_pluck( GPR_ASSERT(grpc_completion_queue_pluck(
f->cq, tag(1000), GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5), NULL) f->cq, tag(1000), grpc_timeout_seconds_to_deadline(5), NULL)
.type == GRPC_OP_COMPLETE); .type == GRPC_OP_COMPLETE);
grpc_server_destroy(f->server); grpc_server_destroy(f->server);
f->server = NULL; f->server = NULL;

@ -564,7 +564,7 @@ typedef struct call_state {
// array of slices to unref // array of slices to unref
size_t num_slices_to_unref; size_t num_slices_to_unref;
size_t cap_slices_to_unref; size_t cap_slices_to_unref;
grpc_slice *slices_to_unref; grpc_slice **slices_to_unref;
struct call_state *next; struct call_state *next;
struct call_state *prev; struct call_state *prev;
@ -605,7 +605,8 @@ static call_state *maybe_delete_call_state(call_state *call) {
grpc_call_details_destroy(&call->call_details); grpc_call_details_destroy(&call->call_details);
for (size_t i = 0; i < call->num_slices_to_unref; i++) { for (size_t i = 0; i < call->num_slices_to_unref; i++) {
grpc_slice_unref(call->slices_to_unref[i]); grpc_slice_unref(*call->slices_to_unref[i]);
gpr_free(call->slices_to_unref[i]);
} }
for (size_t i = 0; i < call->num_to_free; i++) { for (size_t i = 0; i < call->num_to_free; i++) {
gpr_free(call->to_free[i]); gpr_free(call->to_free[i]);
@ -634,8 +635,10 @@ static grpc_slice *add_slice_to_unref(call_state *call, grpc_slice s) {
gpr_realloc(call->slices_to_unref, gpr_realloc(call->slices_to_unref,
sizeof(*call->slices_to_unref) * call->cap_slices_to_unref); sizeof(*call->slices_to_unref) * call->cap_slices_to_unref);
} }
call->slices_to_unref[call->num_slices_to_unref++] = s; call->slices_to_unref[call->num_slices_to_unref] =
return &call->slices_to_unref[call->num_slices_to_unref - 1]; gpr_malloc(sizeof(grpc_slice));
*call->slices_to_unref[call->num_slices_to_unref++] = s;
return call->slices_to_unref[call->num_slices_to_unref - 1];
} }
static void read_metadata(input_stream *inp, size_t *count, static void read_metadata(input_stream *inp, size_t *count,

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save