Addition of flag to enable end2end fuzzers

PiperOrigin-RevId: 640866680
This commit is contained in:
Vishwanath Sastry 2024-06-06 05:42:51 -07:00 committed by Copybara-Service
parent 8c6be41434
commit 60301d40e0
2 changed files with 21 additions and 1 deletions

View File

@ -51,6 +51,7 @@ grpc_proto_fuzzer(
name = "api_fuzzer", name = "api_fuzzer",
srcs = ["api_fuzzer.cc"], srcs = ["api_fuzzer.cc"],
corpus = "api_fuzzer_corpus", corpus = "api_fuzzer_corpus",
end2end_fuzzer = True,
external_deps = ["absl/log:check"], external_deps = ["absl/log:check"],
language = "C++", language = "C++",
proto = None, proto = None,
@ -108,6 +109,7 @@ grpc_proto_fuzzer(
name = "client_fuzzer", name = "client_fuzzer",
srcs = ["client_fuzzer.cc"], srcs = ["client_fuzzer.cc"],
corpus = "client_fuzzer_corpus", corpus = "client_fuzzer_corpus",
end2end_fuzzer = True,
external_deps = ["absl/log:check"], external_deps = ["absl/log:check"],
language = "C++", language = "C++",
proto = None, proto = None,
@ -151,6 +153,7 @@ grpc_proto_fuzzer(
name = "server_fuzzer_chttp2", name = "server_fuzzer_chttp2",
srcs = ["server_fuzzer_chttp2.cc"], srcs = ["server_fuzzer_chttp2.cc"],
corpus = "server_fuzzer_chttp2_corpus", corpus = "server_fuzzer_chttp2_corpus",
end2end_fuzzer = True,
language = "C++", language = "C++",
proto = None, proto = None,
tags = [ tags = [
@ -169,6 +172,7 @@ grpc_proto_fuzzer(
name = "server_fuzzer_chaotic_good", name = "server_fuzzer_chaotic_good",
srcs = ["server_fuzzer_chaotic_good.cc"], srcs = ["server_fuzzer_chaotic_good.cc"],
corpus = "server_fuzzer_chaotic_good_corpus", corpus = "server_fuzzer_chaotic_good_corpus",
end2end_fuzzer = True,
external_deps = ["absl/log:check"], external_deps = ["absl/log:check"],
language = "C++", language = "C++",
proto = None, proto = None,

View File

@ -54,7 +54,20 @@ def grpc_fuzzer(name, corpus, owner = "grpc", srcs = [], tags = [], external_dep
**kwargs **kwargs
) )
def grpc_proto_fuzzer(name, corpus, proto, owner = "grpc", proto_deps = [], external_deps = [], srcs = [], tags = [], deps = [], data = [], size = "large", **kwargs): def grpc_proto_fuzzer(
name,
corpus,
proto,
owner = "grpc", # @unused
proto_deps = [],
external_deps = [],
srcs = [],
tags = [],
deps = [],
end2end_fuzzer = False, # @unused
data = [],
size = "large",
**kwargs):
"""Instantiates a protobuf mutator fuzzer test. """Instantiates a protobuf mutator fuzzer test.
Args: Args:
@ -72,8 +85,11 @@ def grpc_proto_fuzzer(name, corpus, proto, owner = "grpc", proto_deps = [], exte
size: The size of the test. size: The size of the test.
tags: The tags for the test. tags: The tags for the test.
owner: The owning team of the test (for auto-bug-filing). owner: The owning team of the test (for auto-bug-filing).
end2end_fuzzer: Flag to enable end2end fuzzers.
This is currently False and ignored
**kwargs: Other arguments to supply to the test. **kwargs: Other arguments to supply to the test.
""" """
CORPUS_DIR = native.package_name() + "/" + corpus CORPUS_DIR = native.package_name() + "/" + corpus
deps = deps + ["@com_google_libprotobuf_mutator//:libprotobuf_mutator"] deps = deps + ["@com_google_libprotobuf_mutator//:libprotobuf_mutator"]