diff options
author | Sree Kuchibhotla <sreek@google.com> | 2017-08-01 13:30:53 -0700 |
---|---|---|
committer | Sree Kuchibhotla <sreek@google.com> | 2017-08-01 13:30:53 -0700 |
commit | ea71c9daae4bc82a1cddde1e309ceb118af58d76 (patch) | |
tree | fc826e3416d1111f04537331d7853381157a157f /test | |
parent | 9083ee13444e9e80d18058cd1e0bad6a69499be9 (diff) | |
parent | 36ecf8d48bbc2cfd336e82a1d5341e5ecf28d78b (diff) |
Merge remote-tracking branch 'upstream/master' into fix-end2end-test
Diffstat (limited to 'test')
-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/tests/cancel_with_status.c | 8 | ||||
-rw-r--r-- | test/cpp/util/BUILD | 1 |
4 files changed, 12 insertions, 2 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/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); diff --git a/test/cpp/util/BUILD b/test/cpp/util/BUILD index 33240f6f69..c9b0d6c1df 100644 --- a/test/cpp/util/BUILD +++ b/test/cpp/util/BUILD @@ -30,6 +30,7 @@ grpc_cc_binary( name = "testso.so", srcs = [], linkshared = 1, + linkopts = ['-Wl,--no-undefined'], deps = ["//:grpc++_unsecure"], ) |