Skip to content

Commit

Permalink
x
Browse files Browse the repository at this point in the history
  • Loading branch information
ctiller committed Jan 28, 2025
1 parent 192827f commit 113b6d8
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 3 deletions.
18 changes: 17 additions & 1 deletion test/core/end2end/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,22 @@ grpc_cc_library(
],
)

# Notes:
# - We have several platforms on which fuzzers do not work,
# but we want to fuzz on Linux to find all the nice bugs that it finds.
# - We also don't want to keep our own test running infrastructure
# to make all this work.
# - We have an expectation that fuzztest will work as far as running
# tests (maybe without fuzzing) soon.
# - We can't customize the defines that cmake pulls in
# - fuzztest isn't yet integrated with our cmake infrastructure
# So:
# - For now, define a library for fuzz testing, and one for gtest
# (and one for both to keep ensuring that works)
# - Build tests on all platforms, exclude fuzzers from platforms
# where we don't work
# - Choose defines carefully so that the defaults are what we want
# on cmake (basically, gtest - and no fuzztest)
[
grpc_cc_library(
name = "end2end_test_lib" +
Expand All @@ -133,7 +149,7 @@ grpc_cc_library(
"tests/cancel_test_helpers.h",
],
defines =
([] if fuzz else ["GRPC_END2END_TEST_NO_FUZZER"]) +
(["GRPC_END2END_TEST_INCLUDE_FUZZER"] if fuzz else []) +
([] if gtest else ["GRPC_END2END_TEST_NO_GTEST"]),
external_deps = [
"absl/functional:any_invocable",
Expand Down
4 changes: 2 additions & 2 deletions test/core/end2end/end2end_tests.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
#include "test/core/event_engine/event_engine_test_utils.h"
#include "test/core/test_util/test_config.h"

#ifndef GRPC_END2END_TEST_NO_FUZZER
#ifdef GRPC_END2END_TEST_INCLUDE_FUZZER
#include "fuzztest/fuzztest.h"
#endif

Expand Down Expand Up @@ -676,7 +676,7 @@ core_end2end_test_fuzzer::Msg ParseTestProto(std::string text);
GTEST_SKIP() << "Disabled for Local TCP Connection"; \
}

#ifdef GRPC_END2END_TEST_NO_FUZZER
#ifndef GRPC_END2END_TEST_INCLUDE_FUZZER
#define CORE_END2END_FUZZER(suite, name)
#else
#define CORE_END2END_FUZZER(suite, name) \
Expand Down

0 comments on commit 113b6d8

Please sign in to comment.