Prevent nanopb fuzzers from spamming logs

pull/8203/head
David Garcia Quintas 8 years ago
parent 942c264861
commit 31e324450a
  1. 3
      test/core/nanopb/fuzzer_response.c
  2. 3
      test/core/nanopb/fuzzer_serverlist.c

@ -41,7 +41,10 @@
bool squelch = true; bool squelch = true;
bool leak_check = true; bool leak_check = true;
static void dont_log(gpr_log_func_args *args) {}
int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
if (squelch) gpr_set_log_function(dont_log);
gpr_slice slice = gpr_slice_from_copied_buffer((const char *)data, size); gpr_slice slice = gpr_slice_from_copied_buffer((const char *)data, size);
grpc_grpclb_initial_response *response; grpc_grpclb_initial_response *response;
if ((response = grpc_grpclb_initial_response_parse(slice))) { if ((response = grpc_grpclb_initial_response_parse(slice))) {

@ -41,7 +41,10 @@
bool squelch = true; bool squelch = true;
bool leak_check = true; bool leak_check = true;
static void dont_log(gpr_log_func_args *args) {}
int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
if (squelch) gpr_set_log_function(dont_log);
gpr_slice slice = gpr_slice_from_copied_buffer((const char *)data, size); gpr_slice slice = gpr_slice_from_copied_buffer((const char *)data, size);
grpc_grpclb_serverlist *serverlist; grpc_grpclb_serverlist *serverlist;
if ((serverlist = grpc_grpclb_response_parse_serverlist(slice))) { if ((serverlist = grpc_grpclb_response_parse_serverlist(slice))) {

Loading…
Cancel
Save