[end2end] Binary & fuzzer per test .cc (#33374)

<!--

If you know who should review your pull request, please assign it to
that
person, otherwise the pull request would get assigned randomly.

If your pull request is for a specific language, please add the
appropriate
lang label.

-->
pull/33379/head
Craig Tiller 2 years ago committed by GitHub
parent 8fe3472e53
commit d8f3dab96c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 13894
      CMakeLists.txt
  2. 8480
      build_autogenerated.yaml
  3. 428
      test/core/end2end/BUILD
  4. 0
      test/core/end2end/end2end_test_corpus/bad_ping/empty
  5. 1
      test/core/end2end/end2end_test_corpus/binary_metadata/empty
  6. 1
      test/core/end2end/end2end_test_corpus/call_creds/empty
  7. 1
      test/core/end2end/end2end_test_corpus/call_host_override/empty
  8. 1
      test/core/end2end/end2end_test_corpus/cancel_after_accept/empty
  9. 1
      test/core/end2end/end2end_test_corpus/cancel_after_client_done/empty
  10. 1
      test/core/end2end/end2end_test_corpus/cancel_after_invoke/empty
  11. 1
      test/core/end2end/end2end_test_corpus/cancel_after_round_trip/empty
  12. 1
      test/core/end2end/end2end_test_corpus/cancel_before_invoke/empty
  13. 1
      test/core/end2end/end2end_test_corpus/cancel_in_a_vacuum/empty
  14. 1
      test/core/end2end/end2end_test_corpus/cancel_with_status/empty
  15. 1
      test/core/end2end/end2end_test_corpus/channelz/empty
  16. 1
      test/core/end2end/end2end_test_corpus/client_streaming/empty
  17. 1
      test/core/end2end/end2end_test_corpus/compressed_payload/empty
  18. 1
      test/core/end2end/end2end_test_corpus/connectivity/empty
  19. 1
      test/core/end2end/end2end_test_corpus/default_host/empty
  20. 1
      test/core/end2end/end2end_test_corpus/disappearing_server/empty
  21. 1
      test/core/end2end/end2end_test_corpus/empty_batch/empty
  22. 1
      test/core/end2end/end2end_test_corpus/filter_causes_close/empty
  23. 1
      test/core/end2end/end2end_test_corpus/filter_context/empty
  24. 1
      test/core/end2end/end2end_test_corpus/filter_init_fails/empty
  25. 1
      test/core/end2end/end2end_test_corpus/filtered_metadata/empty
  26. 1
      test/core/end2end/end2end_test_corpus/graceful_server_shutdown/empty
  27. 1
      test/core/end2end/end2end_test_corpus/grpc_authz/empty
  28. 1
      test/core/end2end/end2end_test_corpus/high_initial_seqno/empty
  29. 1
      test/core/end2end/end2end_test_corpus/hpack_size/empty
  30. 1
      test/core/end2end/end2end_test_corpus/invoke_large_request/empty
  31. 1
      test/core/end2end/end2end_test_corpus/keepalive_timeout/empty
  32. 1
      test/core/end2end/end2end_test_corpus/large_metadata/empty
  33. 1
      test/core/end2end/end2end_test_corpus/max_concurrent_streams/empty
  34. 1
      test/core/end2end/end2end_test_corpus/max_connection_age/empty
  35. 1
      test/core/end2end/end2end_test_corpus/max_connection_idle/empty
  36. 1
      test/core/end2end/end2end_test_corpus/max_message_length/empty
  37. 1
      test/core/end2end/end2end_test_corpus/negative_deadline/empty
  38. 1
      test/core/end2end/end2end_test_corpus/no_logging/empty
  39. 1
      test/core/end2end/end2end_test_corpus/no_op/empty
  40. 1
      test/core/end2end/end2end_test_corpus/payload/empty
  41. 1
      test/core/end2end/end2end_test_corpus/ping/empty
  42. 1
      test/core/end2end/end2end_test_corpus/ping_pong_streaming/empty
  43. 1
      test/core/end2end/end2end_test_corpus/proxy_auth/empty
  44. 1
      test/core/end2end/end2end_test_corpus/registered_call/empty
  45. 1
      test/core/end2end/end2end_test_corpus/request_with_flags/empty
  46. 1
      test/core/end2end/end2end_test_corpus/request_with_payload/empty
  47. 1
      test/core/end2end/end2end_test_corpus/resource_quota_server/empty
  48. 1
      test/core/end2end/end2end_test_corpus/retry/empty
  49. 1
      test/core/end2end/end2end_test_corpus/retry_cancel_after_first_attempt_starts/empty
  50. 1
      test/core/end2end/end2end_test_corpus/retry_cancel_during_delay/empty
  51. 1
      test/core/end2end/end2end_test_corpus/retry_cancel_with_multiple_send_batches/empty
  52. 1
      test/core/end2end/end2end_test_corpus/retry_cancellation/empty
  53. 1
      test/core/end2end/end2end_test_corpus/retry_disabled/empty
  54. 1
      test/core/end2end/end2end_test_corpus/retry_exceeds_buffer_size_in_delay/empty
  55. 1
      test/core/end2end/end2end_test_corpus/retry_exceeds_buffer_size_in_initial_batch/empty
  56. 1
      test/core/end2end/end2end_test_corpus/retry_exceeds_buffer_size_in_subsequent_batch/empty
  57. 1
      test/core/end2end/end2end_test_corpus/retry_lb_drop/empty
  58. 1
      test/core/end2end/end2end_test_corpus/retry_lb_fail/empty
  59. 1
      test/core/end2end/end2end_test_corpus/retry_non_retriable_status/empty
  60. 1
      test/core/end2end/end2end_test_corpus/retry_non_retriable_status_before_trailers/empty
  61. 1
      test/core/end2end/end2end_test_corpus/retry_per_attempt_recv_timeout/empty
  62. 1
      test/core/end2end/end2end_test_corpus/retry_per_attempt_recv_timeout_on_last_attempt/empty
  63. 1
      test/core/end2end/end2end_test_corpus/retry_recv_initial_metadata/empty
  64. 1
      test/core/end2end/end2end_test_corpus/retry_recv_message/empty
  65. 1
      test/core/end2end/end2end_test_corpus/retry_recv_message_replay/empty
  66. 1
      test/core/end2end/end2end_test_corpus/retry_recv_trailing_metadata_error/empty
  67. 1
      test/core/end2end/end2end_test_corpus/retry_send_initial_metadata_refs/empty
  68. 1
      test/core/end2end/end2end_test_corpus/retry_send_op_fails/empty
  69. 1
      test/core/end2end/end2end_test_corpus/retry_send_recv_batch/empty
  70. 1
      test/core/end2end/end2end_test_corpus/retry_server_pushback_delay/empty
  71. 1
      test/core/end2end/end2end_test_corpus/retry_server_pushback_disabled/empty
  72. 1
      test/core/end2end/end2end_test_corpus/retry_streaming/empty
  73. 1
      test/core/end2end/end2end_test_corpus/retry_streaming_after_commit/empty
  74. 1
      test/core/end2end/end2end_test_corpus/retry_streaming_succeeds_before_replay_finished/empty
  75. 1
      test/core/end2end/end2end_test_corpus/retry_throttled/empty
  76. 1
      test/core/end2end/end2end_test_corpus/retry_too_many_attempts/empty
  77. 1
      test/core/end2end/end2end_test_corpus/retry_transparent_goaway/empty
  78. 1
      test/core/end2end/end2end_test_corpus/retry_transparent_max_concurrent_streams/empty
  79. 1
      test/core/end2end/end2end_test_corpus/retry_transparent_not_sent_on_wire/empty
  80. 1
      test/core/end2end/end2end_test_corpus/retry_unref_before_finish/empty
  81. 1
      test/core/end2end/end2end_test_corpus/retry_unref_before_recv/empty
  82. 1
      test/core/end2end/end2end_test_corpus/server_finishes_request/empty
  83. 1
      test/core/end2end/end2end_test_corpus/server_streaming/empty
  84. 1
      test/core/end2end/end2end_test_corpus/shutdown_finishes_calls/empty
  85. 1
      test/core/end2end/end2end_test_corpus/shutdown_finishes_tags/empty
  86. 1
      test/core/end2end/end2end_test_corpus/simple_delayed_request/empty
  87. 1
      test/core/end2end/end2end_test_corpus/simple_metadata/empty
  88. 1
      test/core/end2end/end2end_test_corpus/simple_request/empty
  89. 1
      test/core/end2end/end2end_test_corpus/streaming_error_response/empty
  90. 1
      test/core/end2end/end2end_test_corpus/trailing_metadata/empty
  91. 1
      test/core/end2end/end2end_test_corpus/write_buffering/empty
  92. 1
      test/core/end2end/end2end_test_corpus/write_buffering_at_end/empty
  93. 2
      test/core/end2end/end2end_test_fuzzer.cc
  94. 5
      test/core/end2end/end2end_test_main.cc
  95. 2
      test/core/end2end/end2end_test_suites.cc
  96. 9
      test/core/end2end/end2end_tests.cc
  97. 178
      test/core/end2end/grpc_core_end2end_test.bzl
  98. 0
      test/core/end2end/tests/retry_non_retriable_status_before_trailers.cc
  99. 1
      tools/distrib/fix_build_deps.py
  100. 3046
      tools/run_tests/generated/tests.json

13894
CMakeLists.txt generated

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

@ -13,7 +13,7 @@
# limitations under the License.
load("//bazel:grpc_build_system.bzl", "grpc_cc_library", "grpc_cc_test", "grpc_package", "grpc_proto_library")
load("//test/core/util:grpc_fuzzer.bzl", "grpc_proto_fuzzer")
load("grpc_core_end2end_test.bzl", "grpc_core_end2end_test")
licenses(["notice"])
@ -184,171 +184,238 @@ grpc_cc_library(
],
)
END2END_TEST_SRCS = [
"end2end_test_suites.cc",
"tests/bad_ping.cc",
"tests/binary_metadata.cc",
"tests/call_creds.cc",
"tests/call_host_override.cc",
"tests/cancel_after_accept.cc",
"tests/cancel_after_client_done.cc",
"tests/cancel_after_invoke.cc",
"tests/cancel_after_round_trip.cc",
"tests/cancel_before_invoke.cc",
"tests/cancel_in_a_vacuum.cc",
"tests/cancel_with_status.cc",
"tests/channelz.cc",
"tests/client_streaming.cc",
"tests/compressed_payload.cc",
"tests/connectivity.cc",
"tests/default_host.cc",
"tests/disappearing_server.cc",
"tests/empty_batch.cc",
"tests/filter_causes_close.cc",
"tests/filter_context.cc",
"tests/filter_init_fails.cc",
"tests/filtered_metadata.cc",
"tests/graceful_server_shutdown.cc",
"tests/grpc_authz.cc",
"tests/high_initial_seqno.cc",
"tests/hpack_size.cc",
"tests/invoke_large_request.cc",
"tests/keepalive_timeout.cc",
"tests/large_metadata.cc",
"tests/max_concurrent_streams.cc",
"tests/max_connection_age.cc",
"tests/max_connection_idle.cc",
"tests/max_message_length.cc",
"tests/negative_deadline.cc",
"tests/no_logging.cc",
"tests/no_op.cc",
"tests/payload.cc",
"tests/ping.cc",
"tests/ping_pong_streaming.cc",
"tests/proxy_auth.cc",
"tests/registered_call.cc",
"tests/request_with_flags.cc",
"tests/request_with_payload.cc",
"tests/resource_quota_server.cc",
"tests/retry.cc",
"tests/retry_cancel_after_first_attempt_starts.cc",
"tests/retry_cancel_during_delay.cc",
"tests/retry_cancel_with_multiple_send_batches.cc",
"tests/retry_cancellation.cc",
"tests/retry_disabled.cc",
"tests/retry_exceeds_buffer_size_in_delay.cc",
"tests/retry_exceeds_buffer_size_in_initial_batch.cc",
"tests/retry_exceeds_buffer_size_in_subsequent_batch.cc",
"tests/retry_lb_drop.cc",
"tests/retry_lb_fail.cc",
"tests/retry_non_retriable_status.cc",
"tests/retry_non_retriable_status_before_recv_trailing_metadata_started.cc",
"tests/retry_per_attempt_recv_timeout.cc",
"tests/retry_per_attempt_recv_timeout_on_last_attempt.cc",
"tests/retry_recv_initial_metadata.cc",
"tests/retry_recv_message.cc",
"tests/retry_recv_message_replay.cc",
"tests/retry_recv_trailing_metadata_error.cc",
"tests/retry_send_initial_metadata_refs.cc",
"tests/retry_send_op_fails.cc",
"tests/retry_send_recv_batch.cc",
"tests/retry_server_pushback_delay.cc",
"tests/retry_server_pushback_disabled.cc",
"tests/retry_streaming.cc",
"tests/retry_streaming_after_commit.cc",
"tests/retry_streaming_succeeds_before_replay_finished.cc",
"tests/retry_throttled.cc",
"tests/retry_too_many_attempts.cc",
"tests/retry_transparent_goaway.cc",
"tests/retry_transparent_max_concurrent_streams.cc",
"tests/retry_transparent_not_sent_on_wire.cc",
"tests/retry_unref_before_finish.cc",
"tests/retry_unref_before_recv.cc",
"tests/server_finishes_request.cc",
"tests/server_streaming.cc",
"tests/shutdown_finishes_calls.cc",
"tests/shutdown_finishes_tags.cc",
"tests/simple_delayed_request.cc",
"tests/simple_metadata.cc",
"tests/simple_request.cc",
"tests/streaming_error_response.cc",
"tests/trailing_metadata.cc",
"tests/write_buffering.cc",
"tests/write_buffering_at_end.cc",
]
END2END_TEST_DATA = [
"//src/core/tsi/test_creds:ca.pem",
"//src/core/tsi/test_creds:server1.key",
"//src/core/tsi/test_creds:server1.pem",
]
grpc_cc_test(
name = "core_end2end_tests",
timeout = "long",
grpc_cc_library(
name = "end2end_test_suites",
testonly = 1,
srcs = [
"end2end_test_main.cc",
] + END2END_TEST_SRCS,
data = END2END_TEST_DATA,
"end2end_test_suites.cc",
],
external_deps = [
"absl/functional:any_invocable",
"absl/status",
"absl/status:statusor",
"absl/strings",
"absl/strings:str_format",
"absl/types:optional",
"gtest",
],
shard_count = 50,
tags = ["core_end2end_test"],
deps = [
"cq_verifier",
"end2end_test_lib",
"fixture_support",
"http_proxy",
"proxy",
"//:channel_stack_builder",
"//:config",
"//:config_vars",
"//:debug_location",
"//:exec_ctx",
"//:gpr",
"//:grpc_authorization_provider",
"//:grpc",
"//:grpc_public_hdrs",
"//:grpc_security_base",
"//:grpc_trace",
"//:grpc_unsecure",
"//:legacy_context",
"//:orphanable",
"//:promise",
"//:ref_counted_ptr",
"//:stats",
"//src/core:arena_promise",
"//src/core:bitset",
"//src/core:channel_args",
"//src/core:channel_fwd",
"//src/core:channel_init",
"//src/core:channel_stack_type",
"//src/core:closure",
"//src/core:error",
"//src/core:experiments",
"//src/core:grpc_authorization_base",
"//src/core:grpc_fake_credentials",
"//src/core:iomgr_port",
"//src/core:json",
"//src/core:lb_policy",
"//src/core:lb_policy_factory",
"//src/core:no_destruct",
"//src/core:notification",
"//src/core:slice",
"//src/core:stats_data",
"//src/core:status_helper",
"//src/core:time",
"//test/core/util:grpc_test_util",
"//test/core/util:test_lb_policies",
],
alwayslink = 1,
)
grpc_cc_library(
name = "end2end_test_main",
testonly = 1,
srcs = [
"end2end_test_main.cc",
],
external_deps = [
"absl/functional:any_invocable",
"absl/strings",
"absl/types:optional",
"gtest",
],
tags = ["nofixdeps"],
deps = [
"end2end_test_lib",
"end2end_test_suites",
"fixture_support",
"//:config_vars",
"//test/core/util:grpc_test_util",
],
)
grpc_core_end2end_test(name = "bad_ping")
grpc_core_end2end_test(name = "binary_metadata")
grpc_core_end2end_test(name = "call_creds")
grpc_core_end2end_test(name = "call_host_override")
grpc_core_end2end_test(name = "cancel_after_accept")
grpc_core_end2end_test(name = "cancel_after_client_done")
grpc_core_end2end_test(name = "cancel_after_invoke")
grpc_core_end2end_test(name = "cancel_after_round_trip")
grpc_core_end2end_test(name = "cancel_before_invoke")
grpc_core_end2end_test(name = "cancel_in_a_vacuum")
grpc_core_end2end_test(name = "cancel_with_status")
grpc_core_end2end_test(name = "channelz")
grpc_core_end2end_test(name = "client_streaming")
grpc_core_end2end_test(name = "compressed_payload")
grpc_core_end2end_test(name = "connectivity")
grpc_core_end2end_test(name = "default_host")
grpc_core_end2end_test(name = "disappearing_server")
grpc_core_end2end_test(name = "empty_batch")
grpc_core_end2end_test(name = "filter_causes_close")
grpc_core_end2end_test(name = "filter_context")
grpc_core_end2end_test(name = "filter_init_fails")
grpc_core_end2end_test(name = "filtered_metadata")
grpc_core_end2end_test(name = "graceful_server_shutdown")
grpc_core_end2end_test(name = "grpc_authz")
grpc_core_end2end_test(name = "high_initial_seqno")
grpc_core_end2end_test(name = "hpack_size")
grpc_core_end2end_test(name = "invoke_large_request")
grpc_core_end2end_test(name = "keepalive_timeout")
grpc_core_end2end_test(name = "large_metadata")
grpc_core_end2end_test(name = "max_concurrent_streams")
grpc_core_end2end_test(name = "max_connection_age")
grpc_core_end2end_test(name = "max_connection_idle")
grpc_core_end2end_test(name = "max_message_length")
grpc_core_end2end_test(name = "negative_deadline")
grpc_core_end2end_test(name = "no_logging")
grpc_core_end2end_test(name = "no_op")
grpc_core_end2end_test(name = "payload")
grpc_core_end2end_test(name = "ping")
grpc_core_end2end_test(name = "ping_pong_streaming")
grpc_core_end2end_test(name = "proxy_auth")
grpc_core_end2end_test(name = "registered_call")
grpc_core_end2end_test(name = "request_with_flags")
grpc_core_end2end_test(name = "request_with_payload")
grpc_core_end2end_test(name = "resource_quota_server")
grpc_core_end2end_test(name = "retry")
grpc_core_end2end_test(name = "retry_cancel_after_first_attempt_starts")
grpc_core_end2end_test(name = "retry_cancel_during_delay")
grpc_core_end2end_test(name = "retry_cancel_with_multiple_send_batches")
grpc_core_end2end_test(name = "retry_cancellation")
grpc_core_end2end_test(name = "retry_disabled")
grpc_core_end2end_test(name = "retry_exceeds_buffer_size_in_delay")
grpc_core_end2end_test(name = "retry_exceeds_buffer_size_in_initial_batch")
grpc_core_end2end_test(name = "retry_exceeds_buffer_size_in_subsequent_batch")
grpc_core_end2end_test(name = "retry_lb_drop")
grpc_core_end2end_test(name = "retry_lb_fail")
grpc_core_end2end_test(name = "retry_non_retriable_status")
grpc_core_end2end_test(name = "retry_non_retriable_status_before_trailers")
grpc_core_end2end_test(name = "retry_per_attempt_recv_timeout")
grpc_core_end2end_test(name = "retry_per_attempt_recv_timeout_on_last_attempt")
grpc_core_end2end_test(name = "retry_recv_initial_metadata")
grpc_core_end2end_test(name = "retry_recv_message")
grpc_core_end2end_test(name = "retry_recv_message_replay")
grpc_core_end2end_test(name = "retry_recv_trailing_metadata_error")
grpc_core_end2end_test(name = "retry_send_initial_metadata_refs")
grpc_core_end2end_test(name = "retry_send_op_fails")
grpc_core_end2end_test(name = "retry_send_recv_batch")
grpc_core_end2end_test(name = "retry_server_pushback_delay")
grpc_core_end2end_test(name = "retry_server_pushback_disabled")
grpc_core_end2end_test(name = "retry_streaming")
grpc_core_end2end_test(name = "retry_streaming_after_commit")
grpc_core_end2end_test(name = "retry_streaming_succeeds_before_replay_finished")
grpc_core_end2end_test(name = "retry_throttled")
grpc_core_end2end_test(name = "retry_too_many_attempts")
grpc_core_end2end_test(name = "retry_transparent_goaway")
grpc_core_end2end_test(name = "retry_transparent_max_concurrent_streams")
grpc_core_end2end_test(name = "retry_transparent_not_sent_on_wire")
grpc_core_end2end_test(name = "retry_unref_before_finish")
grpc_core_end2end_test(name = "retry_unref_before_recv")
grpc_core_end2end_test(name = "server_finishes_request")
grpc_core_end2end_test(name = "server_streaming")
grpc_core_end2end_test(name = "shutdown_finishes_calls")
grpc_core_end2end_test(name = "shutdown_finishes_tags")
grpc_core_end2end_test(name = "simple_delayed_request")
grpc_core_end2end_test(name = "simple_metadata")
grpc_core_end2end_test(name = "simple_request")
grpc_core_end2end_test(name = "streaming_error_response")
grpc_core_end2end_test(name = "trailing_metadata")
grpc_core_end2end_test(name = "write_buffering")
grpc_core_end2end_test(name = "write_buffering_at_end")
grpc_cc_test(
name = "bad_server_response_test",
srcs = ["bad_server_response_test.cc"],
@ -579,82 +646,3 @@ grpc_proto_library(
"//test/core/util:fuzz_config_vars_proto",
],
)
grpc_proto_fuzzer(
name = "core_end2end_test_fuzzer",
size = "enormous",
srcs = ["end2end_test_fuzzer.cc"] + END2END_TEST_SRCS,
corpus = "end2end_test_corpus",
data = END2END_TEST_DATA,
external_deps = [
"absl/functional:any_invocable",
"absl/status",
"absl/status:statusor",
"absl/strings",
"absl/strings:str_format",
"absl/types:optional",
"gtest",
],
language = "C++",
proto = None,
tags = [
"no_mac",
"no_windows",
],
uses_event_engine = False,
uses_polling = False,
deps = [
"cq_verifier",
"end2end_test_fuzzer_proto",
"end2end_test_lib",
"fixture_support",
"http_proxy",
"proxy",
"//:channel_stack_builder",
"//:config",
"//:config_vars",
"//:debug_location",
"//:exec_ctx",
"//:gpr",
"//:grpc",
"//:grpc_authorization_provider",
"//:grpc_public_hdrs",
"//:grpc_security_base",
"//:grpc_trace",
"//:iomgr_timer",
"//:legacy_context",
"//:orphanable",
"//:promise",
"//:ref_counted_ptr",
"//:stats",
"//src/core:arena_promise",
"//src/core:bitset",
"//src/core:channel_args",
"//src/core:channel_fwd",
"//src/core:channel_init",
"//src/core:channel_stack_type",
"//src/core:closure",
"//src/core:default_event_engine",
"//src/core:env",
"//src/core:error",
"//src/core:experiments",
"//src/core:grpc_authorization_base",
"//src/core:grpc_fake_credentials",
"//src/core:iomgr_port",
"//src/core:json",
"//src/core:lb_policy",
"//src/core:lb_policy_factory",
"//src/core:no_destruct",
"//src/core:notification",
"//src/core:slice",
"//src/core:stats_data",
"//src/core:status_helper",
"//src/core:time",
"//test/core/event_engine/fuzzing_event_engine",
"//test/core/event_engine/fuzzing_event_engine:fuzzing_event_engine_proto",
"//test/core/util:fuzz_config_vars",
"//test/core/util:fuzz_config_vars_proto",
"//test/core/util:grpc_test_util",
"//test/core/util:test_lb_policies",
],
)

@ -93,11 +93,11 @@ DEFINE_PROTO_FUZZER(const core_end2end_test_fuzzer::Msg& msg) {
test.make_test(test.config));
}});
}
GPR_ASSERT(!tests.empty());
std::sort(tests.begin(), tests.end(),
[](const Test& a, const Test& b) { return a.name < b.name; });
return tests;
}();
if (tests.empty()) return;
static const auto only_experiment =
grpc_core::GetEnv("GRPC_TEST_FUZZER_EXPERIMENT");

@ -25,8 +25,13 @@
#include "test/core/end2end/fixtures/h2_tls_common.h"
#include "test/core/util/test_config.h"
namespace grpc_core {
extern void EnsureSuitesLinked();
}
int main(int argc, char** argv) {
grpc::testing::TestEnvironment env(&argc, argv);
grpc_core::EnsureSuitesLinked();
::testing::InitGoogleTest(&argc, argv);
// TODO(ctiller): make this per fixture?
grpc_core::ConfigVars::Overrides overrides;

@ -1054,4 +1054,6 @@ CORE_END2END_TEST_SUITE(
CORE_END2END_TEST_SUITE(ProxyAuthTest,
ConfigQuery().AllowName("Chttp2HttpProxy").Run());
void EnsureSuitesLinked() {}
} // namespace grpc_core

@ -338,21 +338,12 @@ std::vector<absl::string_view> KeysFrom(const Map& map) {
} // namespace
std::vector<CoreEnd2endTestRegistry::Test> CoreEnd2endTestRegistry::AllTests() {
if (tests_by_suite_.size() != suites_.size()) {
CrashWithStdio(absl::StrCat(
"ERROR: Some suites are not registered:\n",
"TESTS use suites: ", absl::StrJoin(KeysFrom(tests_by_suite_), ", "),
"\nSUITES have: ", absl::StrJoin(KeysFrom(tests_by_suite_), ", "),
"\n"));
}
GPR_ASSERT(tests_by_suite_.size() == suites_.size());
std::vector<Test> tests;
for (const auto& suite_configs : suites_) {
if (suite_configs.second.empty()) {
CrashWithStdio(
absl::StrCat("Suite ", suite_configs.first, " has no tests"));
}
GPR_ASSERT(tests_by_suite_.count(suite_configs.first) == 1);
for (const auto& test_factory : tests_by_suite_[suite_configs.first]) {
for (const auto* config : suite_configs.second) {
tests.push_back(Test{suite_configs.first, test_factory.first, config,

@ -0,0 +1,178 @@
# Copyright 2016 gRPC authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""
Generate one e2e test & associated fuzzer
"""
load("//bazel:grpc_build_system.bzl", "grpc_cc_test")
load("//test/core/util:grpc_fuzzer.bzl", "grpc_proto_fuzzer")
END2END_TEST_DATA = [
"//src/core/tsi/test_creds:ca.pem",
"//src/core/tsi/test_creds:server1.key",
"//src/core/tsi/test_creds:server1.pem",
]
def grpc_core_end2end_test(name):
if len(name) > 60:
fail("test name %s too long" % name)
grpc_cc_test(
name = "%s_test" % name,
srcs = [
"tests/%s.cc" % name,
],
shard_count = 10,
data = END2END_TEST_DATA,
external_deps = [
"absl/functional:any_invocable",
"absl/status",
"absl/status:statusor",
"absl/strings",
"absl/strings:str_format",
"absl/types:optional",
"gtest",
],
tags = ["core_end2end_test"],
deps = [
"end2end_test_main",
"cq_verifier",
"end2end_test_lib",
"fixture_support",
"http_proxy",
"proxy",
"//:channel_stack_builder",
"//:config",
"//:config_vars",
"//:debug_location",
"//:exec_ctx",
"//:gpr",
"//:grpc_authorization_provider",
"//:grpc_public_hdrs",
"//:grpc_security_base",
"//:grpc_trace",
"//:grpc_unsecure",
"//:legacy_context",
"//:orphanable",
"//:promise",
"//:ref_counted_ptr",
"//:stats",
"//src/core:arena_promise",
"//src/core:bitset",
"//src/core:channel_args",
"//src/core:channel_fwd",
"//src/core:channel_init",
"//src/core:channel_stack_type",
"//src/core:closure",
"//src/core:error",
"//src/core:experiments",
"//src/core:grpc_authorization_base",
"//src/core:grpc_fake_credentials",
"//src/core:iomgr_port",
"//src/core:json",
"//src/core:lb_policy",
"//src/core:lb_policy_factory",
"//src/core:no_destruct",
"//src/core:notification",
"//src/core:slice",
"//src/core:stats_data",
"//src/core:status_helper",
"//src/core:time",
"//test/core/util:grpc_test_util",
"//test/core/util:test_lb_policies",
],
)
grpc_proto_fuzzer(
name = "%s_fuzzer" % name,
srcs = [
"end2end_test_fuzzer.cc",
"tests/%s.cc" % name,
],
corpus = "end2end_test_corpus/%s" % name,
data = END2END_TEST_DATA,
external_deps = [
"absl/functional:any_invocable",
"absl/status",
"absl/status:statusor",
"absl/strings",
"absl/strings:str_format",
"absl/types:optional",
"gtest",
],
language = "C++",
proto = None,
tags = [
"no_mac",
"no_windows",
],
uses_event_engine = False,
uses_polling = False,
deps = [
"cq_verifier",
"end2end_test_suites",
"end2end_test_fuzzer_proto",
"end2end_test_lib",
"fixture_support",
"http_proxy",
"proxy",
"//:channel_stack_builder",
"//:config",
"//:config_vars",
"//:debug_location",
"//:exec_ctx",
"//:gpr",
"//:grpc",
"//:grpc_authorization_provider",
"//:grpc_public_hdrs",
"//:grpc_security_base",
"//:grpc_trace",
"//:iomgr_timer",
"//:legacy_context",
"//:orphanable",
"//:promise",
"//:ref_counted_ptr",
"//:stats",
"//src/core:arena_promise",
"//src/core:bitset",
"//src/core:channel_args",
"//src/core:channel_fwd",
"//src/core:channel_init",
"//src/core:channel_stack_type",
"//src/core:closure",
"//src/core:default_event_engine",
"//src/core:env",
"//src/core:error",
"//src/core:experiments",
"//src/core:grpc_authorization_base",
"//src/core:grpc_fake_credentials",
"//src/core:iomgr_port",
"//src/core:json",
"//src/core:lb_policy",
"//src/core:lb_policy_factory",
"//src/core:no_destruct",
"//src/core:notification",
"//src/core:slice",
"//src/core:stats_data",
"//src/core:status_helper",
"//src/core:time",
"//test/core/event_engine/fuzzing_event_engine",
"//test/core/event_engine/fuzzing_event_engine:fuzzing_event_engine_proto",
"//test/core/util:fuzz_config_vars",
"//test/core/util:fuzz_config_vars_proto",
"//test/core/util:grpc_test_util",
"//test/core/util:test_lb_policies",
],
)

@ -477,6 +477,7 @@ for dirname in [
'grpc_cc_binary': grpc_cc_library,
'grpc_cc_library': grpc_cc_library,
'grpc_cc_test': grpc_cc_library,
'grpc_core_end2end_test': lambda **kwargs: None,
'grpc_fuzzer': grpc_cc_library,
'grpc_fuzz_test': grpc_cc_library,
'grpc_proto_fuzzer': grpc_cc_library,

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save