Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion test/extensions/filters/http/common/fuzz/filter_fuzz_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,20 @@ DEFINE_PROTO_FUZZER(const test::extensions::filters::http::FilterFuzzTestCase& i
// applied only when libprotobuf-mutator calls mutate on an input, and *not* during fuzz
// target execution. Replaying a corpus through the fuzzer will not be affected by the
// post-processor mutation.
static const std::vector<absl::string_view> filter_names = Registry::FactoryRegistry<
static const std::vector<absl::string_view> registered_names = Registry::FactoryRegistry<
Server::Configuration::NamedHttpFilterConfigFactory>::registeredNames();
// Exclude filters that don't work with this test. See #20737
absl::flat_hash_set<absl::string_view> exclusion_list = {
"envoy.ext_proc", "envoy.filters.http.alternate_protocols_cache",
"envoy.filters.http.composite", "envoy.filters.http.ext_proc"};
std::vector<absl::string_view> filter_names;
filter_names.reserve(registered_names.size());
std::for_each(registered_names.begin(), registered_names.end(),
[&](const absl::string_view& filter) {
if (exclusion_list.count(filter) == 0) {
filter_names.push_back(filter);
}
});
static const auto factories = Registry::FactoryRegistry<
Server::Configuration::NamedHttpFilterConfigFactory>::factories();
// Choose a valid filter name.
Expand Down