From 576c37192c9cf4eebd5942bd8eea1d0d89e70edb Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Wed, 24 Jan 2024 18:20:40 -0800 Subject: [PATCH] [cmake] build fix (#35661) A fuzzer changed name, and we don't support building fuzzers with cmake. Closes #35661 COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/35661 from ctiller:cmakey 9750b4c4edf098fa51347d3b091f0245ce285542 PiperOrigin-RevId: 601295049 --- CMakeLists.txt | 189 ------------------ build_autogenerated.yaml | 143 ------------- .../extract_metadata_from_bazel_xml.py | 1 + tools/run_tests/generated/tests.json | 54 ----- 4 files changed, 1 insertion(+), 386 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ffb73d56ed5..43f54c32be8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -823,12 +823,6 @@ protobuf_generate_grpc_cpp_with_import_path_correction( protobuf_generate_grpc_cpp_with_import_path_correction( src/proto/grpc/testing/xds/v3/wrr_locality.proto src/proto/grpc/testing/xds/v3/wrr_locality.proto ) -protobuf_generate_grpc_cpp_with_import_path_correction( - test/core/end2end/fuzzers/api_fuzzer.proto test/core/end2end/fuzzers/api_fuzzer.proto -) -protobuf_generate_grpc_cpp_with_import_path_correction( - test/core/end2end/fuzzers/fuzzer_input.proto test/core/end2end/fuzzers/fuzzer_input.proto -) protobuf_generate_grpc_cpp_with_import_path_correction( test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.proto test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.proto ) @@ -841,9 +835,6 @@ protobuf_generate_grpc_cpp_with_import_path_correction( protobuf_generate_grpc_cpp_with_import_path_correction( test/core/util/fuzz_config_vars.proto test/core/util/fuzz_config_vars.proto ) -protobuf_generate_grpc_cpp_with_import_path_correction( - test/core/util/fuzzing_channel_args.proto test/core/util/fuzzing_channel_args.proto -) if(gRPC_BUILD_TESTS) add_custom_target(buildtests_c) @@ -1344,12 +1335,6 @@ if(gRPC_BUILD_TESTS) add_dependencies(buildtests_cxx server_context_test_spouse_test) add_dependencies(buildtests_cxx server_early_return_test) add_dependencies(buildtests_cxx server_finishes_request_test) - if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_MAC OR _gRPC_PLATFORM_POSIX) - add_dependencies(buildtests_cxx server_fuzzer_chaotic_good) - endif() - if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_MAC OR _gRPC_PLATFORM_POSIX) - add_dependencies(buildtests_cxx server_fuzzer_chttp2) - endif() add_dependencies(buildtests_cxx server_interceptors_end2end_test) add_dependencies(buildtests_cxx server_registered_method_bad_client_test) if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_MAC OR _gRPC_PLATFORM_POSIX) @@ -26061,180 +26046,6 @@ target_link_libraries(server_finishes_request_test ) -endif() -if(gRPC_BUILD_TESTS) -if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_MAC OR _gRPC_PLATFORM_POSIX) - - add_executable(server_fuzzer_chaotic_good - ${_gRPC_PROTO_GENS_DIR}/test/core/end2end/fuzzers/api_fuzzer.pb.cc - ${_gRPC_PROTO_GENS_DIR}/test/core/end2end/fuzzers/api_fuzzer.grpc.pb.cc - ${_gRPC_PROTO_GENS_DIR}/test/core/end2end/fuzzers/api_fuzzer.pb.h - ${_gRPC_PROTO_GENS_DIR}/test/core/end2end/fuzzers/api_fuzzer.grpc.pb.h - ${_gRPC_PROTO_GENS_DIR}/test/core/end2end/fuzzers/fuzzer_input.pb.cc - ${_gRPC_PROTO_GENS_DIR}/test/core/end2end/fuzzers/fuzzer_input.grpc.pb.cc - ${_gRPC_PROTO_GENS_DIR}/test/core/end2end/fuzzers/fuzzer_input.pb.h - ${_gRPC_PROTO_GENS_DIR}/test/core/end2end/fuzzers/fuzzer_input.grpc.pb.h - ${_gRPC_PROTO_GENS_DIR}/test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.pb.cc - ${_gRPC_PROTO_GENS_DIR}/test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.grpc.pb.cc - ${_gRPC_PROTO_GENS_DIR}/test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.pb.h - ${_gRPC_PROTO_GENS_DIR}/test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.grpc.pb.h - ${_gRPC_PROTO_GENS_DIR}/test/core/util/fuzz_config_vars.pb.cc - ${_gRPC_PROTO_GENS_DIR}/test/core/util/fuzz_config_vars.grpc.pb.cc - ${_gRPC_PROTO_GENS_DIR}/test/core/util/fuzz_config_vars.pb.h - ${_gRPC_PROTO_GENS_DIR}/test/core/util/fuzz_config_vars.grpc.pb.h - ${_gRPC_PROTO_GENS_DIR}/test/core/util/fuzzing_channel_args.pb.cc - ${_gRPC_PROTO_GENS_DIR}/test/core/util/fuzzing_channel_args.grpc.pb.cc - ${_gRPC_PROTO_GENS_DIR}/test/core/util/fuzzing_channel_args.pb.h - ${_gRPC_PROTO_GENS_DIR}/test/core/util/fuzzing_channel_args.grpc.pb.h - src/core/ext/transport/chaotic_good/frame.cc - src/core/ext/transport/chaotic_good/frame_header.cc - src/core/ext/transport/chaotic_good/server/chaotic_good_server.cc - src/core/ext/transport/chaotic_good/settings_metadata.cc - src/core/lib/transport/promise_endpoint.cc - test/core/end2end/fuzzers/fuzzing_common.cc - test/core/end2end/fuzzers/network_input.cc - test/core/end2end/fuzzers/server_fuzzer.cc - test/core/end2end/fuzzers/server_fuzzer_chaotic_good.cc - test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.cc - test/core/util/cmdline.cc - test/core/util/fuzz_config_vars.cc - test/core/util/fuzz_config_vars_helpers.cc - test/core/util/fuzzer_corpus_test.cc - test/core/util/fuzzer_util.cc - test/core/util/fuzzing_channel_args.cc - test/core/util/grpc_profiler.cc - test/core/util/histogram.cc - test/core/util/mock_endpoint.cc - test/core/util/parse_hexstring.cc - test/core/util/passthru_endpoint.cc - test/core/util/resolve_localhost_ip46.cc - test/core/util/slice_splitter.cc - test/core/util/tracer_util.cc - ) - if(WIN32 AND MSVC) - if(BUILD_SHARED_LIBS) - target_compile_definitions(server_fuzzer_chaotic_good - PRIVATE - "GPR_DLL_IMPORTS" - "GRPC_DLL_IMPORTS" - ) - endif() - endif() - target_compile_features(server_fuzzer_chaotic_good PUBLIC cxx_std_14) - target_include_directories(server_fuzzer_chaotic_good - PRIVATE - ${CMAKE_CURRENT_SOURCE_DIR} - ${CMAKE_CURRENT_SOURCE_DIR}/include - ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} - ${_gRPC_RE2_INCLUDE_DIR} - ${_gRPC_SSL_INCLUDE_DIR} - ${_gRPC_UPB_GENERATED_DIR} - ${_gRPC_UPB_GRPC_GENERATED_DIR} - ${_gRPC_UPB_INCLUDE_DIR} - ${_gRPC_XXHASH_INCLUDE_DIR} - ${_gRPC_ZLIB_INCLUDE_DIR} - third_party/googletest/googletest/include - third_party/googletest/googletest - third_party/googletest/googlemock/include - third_party/googletest/googlemock - ${_gRPC_PROTO_GENS_DIR} - ) - - target_link_libraries(server_fuzzer_chaotic_good - ${_gRPC_ALLTARGETS_LIBRARIES} - gtest - ${_gRPC_PROTOBUF_LIBRARIES} - grpc_test_util - grpc++_test_config - ) - - -endif() -endif() -if(gRPC_BUILD_TESTS) -if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_MAC OR _gRPC_PLATFORM_POSIX) - - add_executable(server_fuzzer_chttp2 - ${_gRPC_PROTO_GENS_DIR}/test/core/end2end/fuzzers/api_fuzzer.pb.cc - ${_gRPC_PROTO_GENS_DIR}/test/core/end2end/fuzzers/api_fuzzer.grpc.pb.cc - ${_gRPC_PROTO_GENS_DIR}/test/core/end2end/fuzzers/api_fuzzer.pb.h - ${_gRPC_PROTO_GENS_DIR}/test/core/end2end/fuzzers/api_fuzzer.grpc.pb.h - ${_gRPC_PROTO_GENS_DIR}/test/core/end2end/fuzzers/fuzzer_input.pb.cc - ${_gRPC_PROTO_GENS_DIR}/test/core/end2end/fuzzers/fuzzer_input.grpc.pb.cc - ${_gRPC_PROTO_GENS_DIR}/test/core/end2end/fuzzers/fuzzer_input.pb.h - ${_gRPC_PROTO_GENS_DIR}/test/core/end2end/fuzzers/fuzzer_input.grpc.pb.h - ${_gRPC_PROTO_GENS_DIR}/test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.pb.cc - ${_gRPC_PROTO_GENS_DIR}/test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.grpc.pb.cc - ${_gRPC_PROTO_GENS_DIR}/test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.pb.h - ${_gRPC_PROTO_GENS_DIR}/test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.grpc.pb.h - ${_gRPC_PROTO_GENS_DIR}/test/core/util/fuzz_config_vars.pb.cc - ${_gRPC_PROTO_GENS_DIR}/test/core/util/fuzz_config_vars.grpc.pb.cc - ${_gRPC_PROTO_GENS_DIR}/test/core/util/fuzz_config_vars.pb.h - ${_gRPC_PROTO_GENS_DIR}/test/core/util/fuzz_config_vars.grpc.pb.h - ${_gRPC_PROTO_GENS_DIR}/test/core/util/fuzzing_channel_args.pb.cc - ${_gRPC_PROTO_GENS_DIR}/test/core/util/fuzzing_channel_args.grpc.pb.cc - ${_gRPC_PROTO_GENS_DIR}/test/core/util/fuzzing_channel_args.pb.h - ${_gRPC_PROTO_GENS_DIR}/test/core/util/fuzzing_channel_args.grpc.pb.h - src/core/ext/transport/chaotic_good/frame_header.cc - test/core/end2end/fuzzers/fuzzing_common.cc - test/core/end2end/fuzzers/network_input.cc - test/core/end2end/fuzzers/server_fuzzer.cc - test/core/end2end/fuzzers/server_fuzzer_chttp2.cc - test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.cc - test/core/util/cmdline.cc - test/core/util/fuzz_config_vars.cc - test/core/util/fuzz_config_vars_helpers.cc - test/core/util/fuzzer_corpus_test.cc - test/core/util/fuzzer_util.cc - test/core/util/fuzzing_channel_args.cc - test/core/util/grpc_profiler.cc - test/core/util/histogram.cc - test/core/util/mock_endpoint.cc - test/core/util/parse_hexstring.cc - test/core/util/passthru_endpoint.cc - test/core/util/resolve_localhost_ip46.cc - test/core/util/slice_splitter.cc - test/core/util/tracer_util.cc - ) - if(WIN32 AND MSVC) - if(BUILD_SHARED_LIBS) - target_compile_definitions(server_fuzzer_chttp2 - PRIVATE - "GPR_DLL_IMPORTS" - "GRPC_DLL_IMPORTS" - ) - endif() - endif() - target_compile_features(server_fuzzer_chttp2 PUBLIC cxx_std_14) - target_include_directories(server_fuzzer_chttp2 - PRIVATE - ${CMAKE_CURRENT_SOURCE_DIR} - ${CMAKE_CURRENT_SOURCE_DIR}/include - ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} - ${_gRPC_RE2_INCLUDE_DIR} - ${_gRPC_SSL_INCLUDE_DIR} - ${_gRPC_UPB_GENERATED_DIR} - ${_gRPC_UPB_GRPC_GENERATED_DIR} - ${_gRPC_UPB_INCLUDE_DIR} - ${_gRPC_XXHASH_INCLUDE_DIR} - ${_gRPC_ZLIB_INCLUDE_DIR} - third_party/googletest/googletest/include - third_party/googletest/googletest - third_party/googletest/googlemock/include - third_party/googletest/googlemock - ${_gRPC_PROTO_GENS_DIR} - ) - - target_link_libraries(server_fuzzer_chttp2 - ${_gRPC_ALLTARGETS_LIBRARIES} - gtest - ${_gRPC_PROTOBUF_LIBRARIES} - grpc_test_util - grpc++_test_config - ) - - -endif() endif() if(gRPC_BUILD_TESTS) diff --git a/build_autogenerated.yaml b/build_autogenerated.yaml index 0797938aa16..dae8fee9f04 100644 --- a/build_autogenerated.yaml +++ b/build_autogenerated.yaml @@ -15358,149 +15358,6 @@ targets: - grpc_authorization_provider - grpc_unsecure - grpc_test_util -- name: server_fuzzer_chaotic_good - gtest: true - build: test - language: c++ - headers: - - src/core/ext/transport/chaotic_good/frame.h - - src/core/ext/transport/chaotic_good/frame_header.h - - src/core/ext/transport/chaotic_good/server/chaotic_good_server.h - - src/core/ext/transport/chaotic_good/settings_metadata.h - - src/core/lib/promise/event_engine_wakeup_scheduler.h - - src/core/lib/promise/inter_activity_latch.h - - src/core/lib/promise/wait_set.h - - src/core/lib/transport/promise_endpoint.h - - test/core/end2end/fuzzers/fuzzing_common.h - - test/core/end2end/fuzzers/network_input.h - - test/core/end2end/fuzzers/server_fuzzer.h - - test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.h - - test/core/util/cmdline.h - - test/core/util/evaluate_args_test_util.h - - test/core/util/fuzz_config_vars.h - - test/core/util/fuzz_config_vars_helpers.h - - test/core/util/fuzzer_util.h - - test/core/util/fuzzing_channel_args.h - - test/core/util/grpc_profiler.h - - test/core/util/histogram.h - - test/core/util/mock_authorization_endpoint.h - - test/core/util/mock_endpoint.h - - test/core/util/parse_hexstring.h - - test/core/util/passthru_endpoint.h - - test/core/util/resolve_localhost_ip46.h - - test/core/util/slice_splitter.h - - test/core/util/tracer_util.h - src: - - test/core/end2end/fuzzers/api_fuzzer.proto - - test/core/end2end/fuzzers/fuzzer_input.proto - - test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.proto - - test/core/util/fuzz_config_vars.proto - - test/core/util/fuzzing_channel_args.proto - - src/core/ext/transport/chaotic_good/frame.cc - - src/core/ext/transport/chaotic_good/frame_header.cc - - src/core/ext/transport/chaotic_good/server/chaotic_good_server.cc - - src/core/ext/transport/chaotic_good/settings_metadata.cc - - src/core/lib/transport/promise_endpoint.cc - - test/core/end2end/fuzzers/fuzzing_common.cc - - test/core/end2end/fuzzers/network_input.cc - - test/core/end2end/fuzzers/server_fuzzer.cc - - test/core/end2end/fuzzers/server_fuzzer_chaotic_good.cc - - test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.cc - - test/core/util/cmdline.cc - - test/core/util/fuzz_config_vars.cc - - test/core/util/fuzz_config_vars_helpers.cc - - test/core/util/fuzzer_corpus_test.cc - - test/core/util/fuzzer_util.cc - - test/core/util/fuzzing_channel_args.cc - - test/core/util/grpc_profiler.cc - - test/core/util/histogram.cc - - test/core/util/mock_endpoint.cc - - test/core/util/parse_hexstring.cc - - test/core/util/passthru_endpoint.cc - - test/core/util/resolve_localhost_ip46.cc - - test/core/util/slice_splitter.cc - - test/core/util/tracer_util.cc - deps: - - gtest - - protobuf - - grpc_test_util - - grpc++_test_config - args: - - test/core/end2end/fuzzers/server_fuzzer_chaotic_good_corpus - - -runs=20000 - - -max_total_time=300 - - --directory=test/core/end2end/fuzzers/server_fuzzer_chaotic_good_corpus - platforms: - - linux - - posix - - mac - uses_polling: false -- name: server_fuzzer_chttp2 - gtest: true - build: test - language: c++ - headers: - - src/core/ext/transport/chaotic_good/frame_header.h - - test/core/end2end/fuzzers/fuzzing_common.h - - test/core/end2end/fuzzers/network_input.h - - test/core/end2end/fuzzers/server_fuzzer.h - - test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.h - - test/core/util/cmdline.h - - test/core/util/evaluate_args_test_util.h - - test/core/util/fuzz_config_vars.h - - test/core/util/fuzz_config_vars_helpers.h - - test/core/util/fuzzer_util.h - - test/core/util/fuzzing_channel_args.h - - test/core/util/grpc_profiler.h - - test/core/util/histogram.h - - test/core/util/mock_authorization_endpoint.h - - test/core/util/mock_endpoint.h - - test/core/util/parse_hexstring.h - - test/core/util/passthru_endpoint.h - - test/core/util/resolve_localhost_ip46.h - - test/core/util/slice_splitter.h - - test/core/util/tracer_util.h - src: - - test/core/end2end/fuzzers/api_fuzzer.proto - - test/core/end2end/fuzzers/fuzzer_input.proto - - test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.proto - - test/core/util/fuzz_config_vars.proto - - test/core/util/fuzzing_channel_args.proto - - src/core/ext/transport/chaotic_good/frame_header.cc - - test/core/end2end/fuzzers/fuzzing_common.cc - - test/core/end2end/fuzzers/network_input.cc - - test/core/end2end/fuzzers/server_fuzzer.cc - - test/core/end2end/fuzzers/server_fuzzer_chttp2.cc - - test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.cc - - test/core/util/cmdline.cc - - test/core/util/fuzz_config_vars.cc - - test/core/util/fuzz_config_vars_helpers.cc - - test/core/util/fuzzer_corpus_test.cc - - test/core/util/fuzzer_util.cc - - test/core/util/fuzzing_channel_args.cc - - test/core/util/grpc_profiler.cc - - test/core/util/histogram.cc - - test/core/util/mock_endpoint.cc - - test/core/util/parse_hexstring.cc - - test/core/util/passthru_endpoint.cc - - test/core/util/resolve_localhost_ip46.cc - - test/core/util/slice_splitter.cc - - test/core/util/tracer_util.cc - deps: - - gtest - - protobuf - - grpc_test_util - - grpc++_test_config - args: - - test/core/end2end/fuzzers/server_fuzzer_chttp2_corpus - - -runs=20000 - - -max_total_time=300 - - --directory=test/core/end2end/fuzzers/server_fuzzer_chttp2_corpus - platforms: - - linux - - posix - - mac - uses_polling: false - name: server_interceptors_end2end_test gtest: true build: test diff --git a/tools/buildgen/extract_metadata_from_bazel_xml.py b/tools/buildgen/extract_metadata_from_bazel_xml.py index 1bb4fc221ef..2a289c5e2bb 100755 --- a/tools/buildgen/extract_metadata_from_bazel_xml.py +++ b/tools/buildgen/extract_metadata_from_bazel_xml.py @@ -904,6 +904,7 @@ def _exclude_unwanted_cc_tests(tests: List[str]) -> List[str]: # we don't need to generate fuzzers outside of bazel tests = [test for test in tests if not test.endswith("_fuzzer")] + tests = [test for test in tests if "_fuzzer_" not in test] return tests diff --git a/tools/run_tests/generated/tests.json b/tools/run_tests/generated/tests.json index 54882d5251c..6d3fc272028 100644 --- a/tools/run_tests/generated/tests.json +++ b/tools/run_tests/generated/tests.json @@ -9043,60 +9043,6 @@ ], "uses_polling": true }, - { - "args": [ - "test/core/end2end/fuzzers/server_fuzzer_chaotic_good_corpus", - "-runs=20000", - "-max_total_time=300", - "--directory=test/core/end2end/fuzzers/server_fuzzer_chaotic_good_corpus" - ], - "benchmark": false, - "ci_platforms": [ - "linux", - "mac", - "posix" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "exclude_iomgrs": [], - "flaky": false, - "gtest": true, - "language": "c++", - "name": "server_fuzzer_chaotic_good", - "platforms": [ - "linux", - "mac", - "posix" - ], - "uses_polling": false - }, - { - "args": [ - "test/core/end2end/fuzzers/server_fuzzer_chttp2_corpus", - "-runs=20000", - "-max_total_time=300", - "--directory=test/core/end2end/fuzzers/server_fuzzer_chttp2_corpus" - ], - "benchmark": false, - "ci_platforms": [ - "linux", - "mac", - "posix" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "exclude_iomgrs": [], - "flaky": false, - "gtest": true, - "language": "c++", - "name": "server_fuzzer_chttp2", - "platforms": [ - "linux", - "mac", - "posix" - ], - "uses_polling": false - }, { "args": [], "benchmark": false,