From b98ac449721990e6f3c6ad7a7ecc68143c6be217 Mon Sep 17 00:00:00 2001 From: Pradeep Rao Date: Fri, 8 Apr 2022 20:07:32 +0000 Subject: [PATCH 1/2] Disable test for failing filters. Signed-off-by: Pradeep Rao --- .../filters/http/common/fuzz/filter_fuzz_test.cc | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/test/extensions/filters/http/common/fuzz/filter_fuzz_test.cc b/test/extensions/filters/http/common/fuzz/filter_fuzz_test.cc index a4f2e5a9cea94..a855534488d6b 100644 --- a/test/extensions/filters/http/common/fuzz/filter_fuzz_test.cc +++ b/test/extensions/filters/http/common/fuzz/filter_fuzz_test.cc @@ -6,6 +6,8 @@ #include "test/extensions/filters/http/common/fuzz/uber_filter.h" #include "test/fuzz/fuzz_runner.h" +#include + namespace Envoy { namespace Extensions { namespace HttpFilters { @@ -19,8 +21,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 filter_names = Registry::FactoryRegistry< + static const std::vector registered_names = Registry::FactoryRegistry< Server::Configuration::NamedHttpFilterConfigFactory>::registeredNames(); + // Exclude filters that don't work with this test. See #20737 + absl::flat_hash_set exclusion_list = { + "envoy.ext_proc", "envoy.filters.http.alternate_protocols_cache", + "envoy.filters.http.composite", "envoy.filters.http.ext_proc"}; + std::vector 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. From f96da4413b699d1bdc0770b98f62ce0d67655ae5 Mon Sep 17 00:00:00 2001 From: Pradeep Rao Date: Fri, 8 Apr 2022 20:10:06 +0000 Subject: [PATCH 2/2] Remove header. Signed-off-by: Pradeep Rao --- test/extensions/filters/http/common/fuzz/filter_fuzz_test.cc | 2 -- 1 file changed, 2 deletions(-) diff --git a/test/extensions/filters/http/common/fuzz/filter_fuzz_test.cc b/test/extensions/filters/http/common/fuzz/filter_fuzz_test.cc index a855534488d6b..8eea8ab8aaddc 100644 --- a/test/extensions/filters/http/common/fuzz/filter_fuzz_test.cc +++ b/test/extensions/filters/http/common/fuzz/filter_fuzz_test.cc @@ -6,8 +6,6 @@ #include "test/extensions/filters/http/common/fuzz/uber_filter.h" #include "test/fuzz/fuzz_runner.h" -#include - namespace Envoy { namespace Extensions { namespace HttpFilters {