[fuzzing] Allow server fuzzer to take multiple connection requests at the same time (#35645)

Closes #35645

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/35645 from ctiller:shush-multipass e63e1e5ddb
PiperOrigin-RevId: 600998039
pull/35651/head
Craig Tiller 1 year ago committed by Copybara-Service
parent f51f14e70c
commit 6b6ce36f74
  1. 3
      test/core/end2end/fuzzers/client_fuzzer.cc
  2. 2
      test/core/end2end/fuzzers/fuzzer_input.proto
  3. 7
      test/core/end2end/fuzzers/server_fuzzer.cc

@ -58,7 +58,7 @@ class ClientFuzzer final : public BasicFuzzer {
: BasicFuzzer(msg.event_engine_actions()) {
ExecCtx exec_ctx;
UpdateMinimumRunTime(
ScheduleReads(msg.network_input(), mock_endpoint_, engine()));
ScheduleReads(msg.network_input()[0], mock_endpoint_, engine()));
ChannelArgs args =
CoreConfiguration::Get()
.channel_args_preconditioning()
@ -101,6 +101,7 @@ DEFINE_PROTO_FUZZER(const fuzzer_input::Msg& msg) {
if (squelch && !grpc_core::GetEnv("GRPC_TRACE_FUZZER").has_value()) {
gpr_set_log_function(dont_log);
}
if (msg.network_input().size() != 1) return;
grpc_core::ApplyFuzzConfigVars(msg.config_vars());
grpc_core::TestOnlyReloadExperimentsFromConfigVariables();
grpc_core::testing::ClientFuzzer(msg).Run(msg.api_actions());

@ -205,7 +205,7 @@ message NetworkInput {
}
message Msg {
NetworkInput network_input = 1;
repeated NetworkInput network_input = 1;
repeated api_fuzzer.Action api_actions = 2;
fuzzing_event_engine.Actions event_engine_actions = 3;
grpc.testing.FuzzConfigVars config_vars = 4;

@ -51,9 +51,10 @@ class ServerFuzzer final : public BasicFuzzer {
grpc_server_add_http2_port(server_, "0.0.0.0:1234", creds);
grpc_server_credentials_release(creds);
grpc_server_start(server_);
UpdateMinimumRunTime(
ScheduleConnection(msg.network_input(), engine(),
FuzzingEnvironment{resource_quota()}, 1234));
for (const auto& input : msg.network_input()) {
UpdateMinimumRunTime(ScheduleConnection(
input, engine(), FuzzingEnvironment{resource_quota()}, 1234));
}
}
~ServerFuzzer() { GPR_ASSERT(server_ == nullptr); }

Loading…
Cancel
Save