aboutsummaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2017-04-13 20:50:09 -0700
committerGravatar Craig Tiller <ctiller@google.com>2017-04-13 20:50:09 -0700
commit58e6d13f1b8e15e223a1fd416e6febf6aa448ac0 (patch)
tree3bb3a18f0128202109d74701aed7e78aa8f2c14c /test
parent7c0cbad3f2ab3c85e79f3c11a413799900ba2d88 (diff)
parenta6ede891206521ab0c5ad238584bec68a5b2c53a (diff)
Merge github.com:grpc/grpc into minimal_test
Diffstat (limited to 'test')
-rw-r--r--test/core/end2end/fuzzers/api_fuzzer.c2
-rw-r--r--test/core/end2end/tests/max_message_length.c4
-rw-r--r--test/core/support/spinlock_test.c2
3 files changed, 4 insertions, 4 deletions
diff --git a/test/core/end2end/fuzzers/api_fuzzer.c b/test/core/end2end/fuzzers/api_fuzzer.c
index a0acf5bf60..0ec5a23d5d 100644
--- a/test/core/end2end/fuzzers/api_fuzzer.c
+++ b/test/core/end2end/fuzzers/api_fuzzer.c
@@ -967,7 +967,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
break;
}
grpc_op *ops = gpr_malloc(sizeof(grpc_op) * num_ops);
- memset(ops, 0, sizeof(grpc_op) * num_ops);
+ if (num_ops > 0) memset(ops, 0, sizeof(grpc_op) * num_ops);
bool ok = true;
size_t i;
grpc_op *op;
diff --git a/test/core/end2end/tests/max_message_length.c b/test/core/end2end/tests/max_message_length.c
index ab58d9f9a6..a8b6f1f79a 100644
--- a/test/core/end2end/tests/max_message_length.c
+++ b/test/core/end2end/tests/max_message_length.c
@@ -272,7 +272,7 @@ static void test_max_message_length_on_request(grpc_end2end_test_config config,
GPR_ASSERT(was_cancelled == 1);
done:
- GPR_ASSERT(status == GRPC_STATUS_INVALID_ARGUMENT);
+ GPR_ASSERT(status == GRPC_STATUS_RESOURCE_EXHAUSTED);
GPR_ASSERT(
grpc_slice_str_cmp(
details, send_limit
@@ -466,7 +466,7 @@ static void test_max_message_length_on_response(grpc_end2end_test_config config,
GPR_ASSERT(0 ==
grpc_slice_str_cmp(call_details.host, "foo.test.google.fr:1234"));
- GPR_ASSERT(status == GRPC_STATUS_INVALID_ARGUMENT);
+ GPR_ASSERT(status == GRPC_STATUS_RESOURCE_EXHAUSTED);
GPR_ASSERT(
grpc_slice_str_cmp(
details, send_limit
diff --git a/test/core/support/spinlock_test.c b/test/core/support/spinlock_test.c
index c70e76c7ea..96055e9bd7 100644
--- a/test/core/support/spinlock_test.c
+++ b/test/core/support/spinlock_test.c
@@ -109,7 +109,7 @@ static void test(const char *name, void (*body)(void *m), int timeout_s,
start, gpr_time_from_micros((int64_t)timeout_s * 1000000, GPR_TIMESPAN));
fprintf(stderr, "%s:", name);
while (gpr_time_cmp(gpr_now(GPR_CLOCK_REALTIME), deadline) < 0) {
- iterations <<= 1;
+ if (iterations < INT64_MAX / 2) iterations <<= 1;
fprintf(stderr, " %ld", (long)iterations);
m = test_new(10, iterations, incr_step);
test_create_threads(m, body);