aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/core/end2end/fuzzers
diff options
context:
space:
mode:
authorGravatar David Garcia Quintas <dgq@google.com>2018-03-14 12:50:48 -0700
committerGravatar David Garcia Quintas <dgq@google.com>2018-03-14 12:50:48 -0700
commitf73e76d59682faa44b382e83c9d36c9664d15c23 (patch)
treec58f341d921432c93f1de60a045099ddb3e129d1 /test/core/end2end/fuzzers
parent2040ae1ff41620b769f7ca9152b91010a54c3054 (diff)
Fix check in channel.cc and tweak direct channel tests
Diffstat (limited to 'test/core/end2end/fuzzers')
-rw-r--r--test/core/end2end/fuzzers/client_fuzzer.cc9
1 files changed, 8 insertions, 1 deletions
diff --git a/test/core/end2end/fuzzers/client_fuzzer.cc b/test/core/end2end/fuzzers/client_fuzzer.cc
index 16acf8ef28..e21006bb67 100644
--- a/test/core/end2end/fuzzers/client_fuzzer.cc
+++ b/test/core/end2end/fuzzers/client_fuzzer.cc
@@ -20,6 +20,7 @@
#include <grpc/grpc.h>
#include <grpc/support/alloc.h>
+#include <grpc/support/string_util.h>
#include "src/core/ext/transport/chttp2/transport/chttp2_transport.h"
#include "src/core/lib/iomgr/executor.h"
@@ -58,8 +59,14 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
grpc_create_chttp2_transport(nullptr, mock_endpoint, true);
grpc_chttp2_transport_start_reading(transport, nullptr, nullptr);
+ grpc_arg authority_arg = grpc_channel_arg_string_create(
+ const_cast<char*>(GRPC_ARG_DEFAULT_AUTHORITY),
+ const_cast<char*>("test-authority"));
+ grpc_channel_args* args =
+ grpc_channel_args_copy_and_add(nullptr, &authority_arg, 1);
grpc_channel* channel = grpc_channel_create(
- "test-target", nullptr, GRPC_CLIENT_DIRECT_CHANNEL, transport);
+ "test-target", args, GRPC_CLIENT_DIRECT_CHANNEL, transport);
+ grpc_channel_args_destroy(args);
grpc_slice host = grpc_slice_from_static_string("localhost");
grpc_call* call = grpc_channel_create_call(
channel, nullptr, 0, cq, grpc_slice_from_static_string("/foo"), &host,