diff options
author | Muxi Yan <muxi@users.noreply.github.com> | 2017-08-02 16:57:23 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-08-02 16:57:23 -0700 |
commit | 69b8fe02b6a45a2731c17e91d6f22d85026fcd2f (patch) | |
tree | 39d464fd58172412c966e0363ab85c6669cb465b /test/core/end2end | |
parent | 627a5824c3cbf37d38869238e5382f4ace6d6370 (diff) | |
parent | 4f68ecf665433933b0ef1f0a3df12b1590646a90 (diff) |
Merge branch 'master' into stream_compression_config
Diffstat (limited to 'test/core/end2end')
-rw-r--r-- | test/core/end2end/fuzzers/api_fuzzer.c | 5 | ||||
-rw-r--r-- | test/core/end2end/fuzzers/api_fuzzer_corpus/clusterfuzz-testcase-minimized-4688823906729984 | bin | 0 -> 150 bytes | |||
-rw-r--r-- | test/core/end2end/fuzzers/server_fuzzer.c | 5 | ||||
-rw-r--r-- | test/core/end2end/tests/cancel_with_status.c | 8 |
4 files changed, 14 insertions, 4 deletions
diff --git a/test/core/end2end/fuzzers/api_fuzzer.c b/test/core/end2end/fuzzers/api_fuzzer.c index 281a1af20c..01fa4f748f 100644 --- a/test/core/end2end/fuzzers/api_fuzzer.c +++ b/test/core/end2end/fuzzers/api_fuzzer.c @@ -34,6 +34,7 @@ #include "src/core/lib/iomgr/timer.h" #include "src/core/lib/iomgr/timer_manager.h" #include "src/core/lib/slice/slice_internal.h" +#include "src/core/lib/support/env.h" #include "src/core/lib/surface/server.h" #include "src/core/lib/transport/metadata.h" #include "test/core/end2end/data/ssl_test_data.h" @@ -731,7 +732,9 @@ static validator *make_finished_batch_validator(call_state *cs, int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { grpc_test_only_set_slice_hash_seed(0); - if (squelch) gpr_set_log_function(dont_log); + char *grpc_trace_fuzzer = gpr_getenv("GRPC_TRACE_FUZZER"); + if (squelch && grpc_trace_fuzzer == NULL) gpr_set_log_function(dont_log); + gpr_free(grpc_trace_fuzzer); input_stream inp = {data, data + size}; grpc_tcp_client_connect_impl = my_tcp_client_connect; gpr_now_impl = now_impl; diff --git a/test/core/end2end/fuzzers/api_fuzzer_corpus/clusterfuzz-testcase-minimized-4688823906729984 b/test/core/end2end/fuzzers/api_fuzzer_corpus/clusterfuzz-testcase-minimized-4688823906729984 Binary files differnew file mode 100644 index 0000000000..a5b730382e --- /dev/null +++ b/test/core/end2end/fuzzers/api_fuzzer_corpus/clusterfuzz-testcase-minimized-4688823906729984 diff --git a/test/core/end2end/fuzzers/server_fuzzer.c b/test/core/end2end/fuzzers/server_fuzzer.c index 3ddc1ae907..ef4c0a4bfd 100644 --- a/test/core/end2end/fuzzers/server_fuzzer.c +++ b/test/core/end2end/fuzzers/server_fuzzer.c @@ -72,8 +72,9 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { grpc_metadata_array_init(&request_metadata1); int requested_calls = 0; - grpc_server_request_call(server, &call1, &call_details1, &request_metadata1, - cq, cq, tag(1)); + GPR_ASSERT(GRPC_CALL_OK == + grpc_server_request_call(server, &call1, &call_details1, + &request_metadata1, cq, cq, tag(1))); requested_calls++; grpc_event ev; diff --git a/test/core/end2end/tests/cancel_with_status.c b/test/core/end2end/tests/cancel_with_status.c index d659d1173a..fd26fd122e 100644 --- a/test/core/end2end/tests/cancel_with_status.c +++ b/test/core/end2end/tests/cancel_with_status.c @@ -25,6 +25,7 @@ #include <grpc/grpc.h> #include <grpc/support/alloc.h> #include <grpc/support/log.h> +#include <grpc/support/string_util.h> #include <grpc/support/time.h> #include <grpc/support/useful.h> #include "src/core/lib/support/string.h" @@ -138,7 +139,12 @@ static void simple_request_body(grpc_end2end_test_config config, error = grpc_call_start_batch(c, ops, num_ops, tag(1), NULL); GPR_ASSERT(GRPC_CALL_OK == error); - grpc_call_cancel_with_status(c, GRPC_STATUS_UNIMPLEMENTED, "xyz", NULL); + char *dynamic_string = gpr_strdup("xyz"); + grpc_call_cancel_with_status(c, GRPC_STATUS_UNIMPLEMENTED, + (const char *)dynamic_string, NULL); + // The API of \a description allows for it to be a dynamic/non-const + // string, test this guarantee. + gpr_free(dynamic_string); CQ_EXPECT_COMPLETION(cqv, tag(1), 1); cq_verify(cqv); |