From 1c0f5d32a0da2083a150e5e719d7d5dfdc621eb4 Mon Sep 17 00:00:00 2001 From: Mario Jones Vimal Date: Mon, 7 Aug 2023 12:53:00 -0700 Subject: [PATCH] [core/gpr] Move subprocess to gpr and add subprocess creation using execve (#33983) Move subprocess util to gpr. Add support for communication with the subprocess. This is required to support authentication using an executable. --- BUILD | 20 ++ CMakeLists.txt | 162 +---------- build_autogenerated.yaml | 243 +---------------- grpc.gyp | 6 +- .../util => src/core/lib/gpr}/subprocess.h | 15 +- src/core/lib/gpr/subprocess_posix.cc | 252 ++++++++++++++++++ .../core/lib/gpr}/subprocess_windows.cc | 2 +- test/core/bad_ssl/bad_ssl_test.cc | 2 +- test/core/bad_ssl/generate_tests.bzl | 1 + test/core/event_engine/test_suite/tests/BUILD | 1 + test/core/http/BUILD | 3 + test/core/http/httpcli_test.cc | 2 +- test/core/http/httpcli_test_util.cc | 2 +- test/core/http/httpcli_test_util.h | 2 +- test/core/http/httpscli_test.cc | 2 +- test/core/memory_usage/BUILD | 2 + test/core/memory_usage/memory_usage_test.cc | 2 +- test/core/util/BUILD | 3 - test/core/util/subprocess_posix.cc | 101 ------- test/cpp/util/BUILD | 2 + test/cpp/util/subprocess.cc | 2 +- 21 files changed, 323 insertions(+), 504 deletions(-) rename {test/core/util => src/core/lib/gpr}/subprocess.h (68%) create mode 100644 src/core/lib/gpr/subprocess_posix.cc rename {test/core/util => src/core/lib/gpr}/subprocess_windows.cc (98%) delete mode 100644 test/core/util/subprocess_posix.cc diff --git a/BUILD b/BUILD index 1b1a4ef5081..a1a9c395447 100644 --- a/BUILD +++ b/BUILD @@ -4000,6 +4000,26 @@ grpc_cc_library( ], ) +grpc_cc_library( + name = "subprocess", + srcs = [ + "//src/core:lib/gpr/subprocess_posix.cc", + "//src/core:lib/gpr/subprocess_windows.cc", + ], + hdrs = [ + "//src/core:lib/gpr/subprocess.h", + ], + external_deps = [ + "absl/strings", + "absl/types:span", + ], + deps = [ + "gpr", + "//src/core:strerror", + "//src/core:tchar", + ], +) + # TODO(yashykt): Remove the UPB definitions from here once they are no longer needed ### UPB Targets diff --git a/CMakeLists.txt b/CMakeLists.txt index 5ad4e0c981a..ba2dbfd3186 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3284,8 +3284,6 @@ add_library(benchmark_helpers test/core/util/passthru_endpoint.cc test/core/util/resolve_localhost_ip46.cc test/core/util/slice_splitter.cc - test/core/util/subprocess_posix.cc - test/core/util/subprocess_windows.cc test/core/util/tracer_util.cc test/cpp/microbenchmarks/helpers.cc ) @@ -4003,6 +4001,8 @@ endif() if(gRPC_BUILD_TESTS) add_library(grpc++_test_util + src/core/lib/gpr/subprocess_posix.cc + src/core/lib/gpr/subprocess_windows.cc test/core/end2end/data/client_certs.cc test/core/end2end/data/server1_cert.cc test/core/end2end/data/server1_key.cc @@ -4016,8 +4016,6 @@ add_library(grpc++_test_util test/core/util/passthru_endpoint.cc test/core/util/resolve_localhost_ip46.cc test/core/util/slice_splitter.cc - test/core/util/subprocess_posix.cc - test/core/util/subprocess_windows.cc test/core/util/tracer_util.cc test/cpp/util/byte_buffer_proto_helper.cc test/cpp/util/create_test_channel.cc @@ -5039,8 +5037,6 @@ if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_MAC OR _gRPC_PLATFORM_POSIX) test/core/util/passthru_endpoint.cc test/core/util/resolve_localhost_ip46.cc test/core/util/slice_splitter.cc - test/core/util/subprocess_posix.cc - test/core/util/subprocess_windows.cc test/core/util/tracer_util.cc ) target_compile_features(fd_conservation_posix_test PUBLIC cxx_std_14) @@ -5176,8 +5172,6 @@ add_executable(test_core_iomgr_timer_list_test test/core/util/passthru_endpoint.cc test/core/util/resolve_localhost_ip46.cc test/core/util/slice_splitter.cc - test/core/util/subprocess_posix.cc - test/core/util/subprocess_windows.cc test/core/util/tracer_util.cc ) target_compile_features(test_core_iomgr_timer_list_test PUBLIC cxx_std_14) @@ -5291,6 +5285,8 @@ if(gRPC_BUILD_TESTS) if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_MAC OR _gRPC_PLATFORM_POSIX) add_executable(address_sorting_test_unsecure + src/core/lib/gpr/subprocess_posix.cc + src/core/lib/gpr/subprocess_windows.cc test/core/util/cmdline.cc test/core/util/fuzzer_util.cc test/core/util/grpc_profiler.cc @@ -5300,8 +5296,6 @@ if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_MAC OR _gRPC_PLATFORM_POSIX) test/core/util/passthru_endpoint.cc test/core/util/resolve_localhost_ip46.cc test/core/util/slice_splitter.cc - test/core/util/subprocess_posix.cc - test/core/util/subprocess_windows.cc test/core/util/tracer_util.cc test/cpp/naming/address_sorting_test.cc test/cpp/util/byte_buffer_proto_helper.cc @@ -5413,8 +5407,6 @@ if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_MAC OR _gRPC_PLATFORM_POSIX) test/core/util/passthru_endpoint.cc test/core/util/resolve_localhost_ip46.cc test/core/util/slice_splitter.cc - test/core/util/subprocess_posix.cc - test/core/util/subprocess_windows.cc test/core/util/tracer_util.cc test/cpp/common/alarm_test.cc third_party/googletest/googletest/src/gtest-all.cc @@ -5857,8 +5849,6 @@ add_executable(alts_security_connector_test test/core/util/passthru_endpoint.cc test/core/util/resolve_localhost_ip46.cc test/core/util/slice_splitter.cc - test/core/util/subprocess_posix.cc - test/core/util/subprocess_windows.cc test/core/util/tracer_util.cc third_party/googletest/googletest/src/gtest-all.cc third_party/googletest/googlemock/src/gmock-all.cc @@ -6193,8 +6183,6 @@ add_executable(auth_context_test test/core/util/passthru_endpoint.cc test/core/util/resolve_localhost_ip46.cc test/core/util/slice_splitter.cc - test/core/util/subprocess_posix.cc - test/core/util/subprocess_windows.cc test/core/util/tracer_util.cc third_party/googletest/googletest/src/gtest-all.cc third_party/googletest/googlemock/src/gmock-all.cc @@ -6279,8 +6267,6 @@ add_executable(authorization_matchers_test test/core/util/passthru_endpoint.cc test/core/util/resolve_localhost_ip46.cc test/core/util/slice_splitter.cc - test/core/util/subprocess_posix.cc - test/core/util/subprocess_windows.cc test/core/util/tracer_util.cc third_party/googletest/googletest/src/gtest-all.cc third_party/googletest/googlemock/src/gmock-all.cc @@ -6405,8 +6391,6 @@ add_executable(aws_request_signer_test test/core/util/passthru_endpoint.cc test/core/util/resolve_localhost_ip46.cc test/core/util/slice_splitter.cc - test/core/util/subprocess_posix.cc - test/core/util/subprocess_windows.cc test/core/util/tracer_util.cc third_party/googletest/googletest/src/gtest-all.cc third_party/googletest/googlemock/src/gmock-all.cc @@ -6605,6 +6589,8 @@ if(gRPC_BUILD_TESTS) if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_MAC OR _gRPC_PLATFORM_POSIX) add_executable(bad_ssl_alpn_test + src/core/lib/gpr/subprocess_posix.cc + src/core/lib/gpr/subprocess_windows.cc test/core/bad_ssl/bad_ssl_test.cc test/core/end2end/cq_verifier.cc test/core/util/cmdline.cc @@ -6616,8 +6602,6 @@ if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_MAC OR _gRPC_PLATFORM_POSIX) test/core/util/passthru_endpoint.cc test/core/util/resolve_localhost_ip46.cc test/core/util/slice_splitter.cc - test/core/util/subprocess_posix.cc - test/core/util/subprocess_windows.cc test/core/util/tracer_util.cc third_party/googletest/googletest/src/gtest-all.cc third_party/googletest/googlemock/src/gmock-all.cc @@ -6657,6 +6641,8 @@ if(gRPC_BUILD_TESTS) if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_MAC OR _gRPC_PLATFORM_POSIX) add_executable(bad_ssl_cert_test + src/core/lib/gpr/subprocess_posix.cc + src/core/lib/gpr/subprocess_windows.cc test/core/bad_ssl/bad_ssl_test.cc test/core/end2end/cq_verifier.cc test/core/util/cmdline.cc @@ -6668,8 +6654,6 @@ if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_MAC OR _gRPC_PLATFORM_POSIX) test/core/util/passthru_endpoint.cc test/core/util/resolve_localhost_ip46.cc test/core/util/slice_splitter.cc - test/core/util/subprocess_posix.cc - test/core/util/subprocess_windows.cc test/core/util/tracer_util.cc third_party/googletest/googletest/src/gtest-all.cc third_party/googletest/googlemock/src/gmock-all.cc @@ -7225,8 +7209,6 @@ add_executable(buffer_list_test test/core/util/passthru_endpoint.cc test/core/util/resolve_localhost_ip46.cc test/core/util/slice_splitter.cc - test/core/util/subprocess_posix.cc - test/core/util/subprocess_windows.cc test/core/util/tracer_util.cc third_party/googletest/googletest/src/gtest-all.cc third_party/googletest/googlemock/src/gmock-all.cc @@ -8022,8 +8004,6 @@ add_executable(cel_authorization_engine_test test/core/util/passthru_endpoint.cc test/core/util/resolve_localhost_ip46.cc test/core/util/slice_splitter.cc - test/core/util/subprocess_posix.cc - test/core/util/subprocess_windows.cc test/core/util/tracer_util.cc third_party/googletest/googletest/src/gtest-all.cc third_party/googletest/googlemock/src/gmock-all.cc @@ -8358,8 +8338,6 @@ add_executable(channel_creds_registry_test test/core/util/passthru_endpoint.cc test/core/util/resolve_localhost_ip46.cc test/core/util/slice_splitter.cc - test/core/util/subprocess_posix.cc - test/core/util/subprocess_windows.cc test/core/util/tracer_util.cc third_party/googletest/googletest/src/gtest-all.cc third_party/googletest/googlemock/src/gmock-all.cc @@ -8655,8 +8633,6 @@ add_executable(check_gcp_environment_linux_test test/core/util/passthru_endpoint.cc test/core/util/resolve_localhost_ip46.cc test/core/util/slice_splitter.cc - test/core/util/subprocess_posix.cc - test/core/util/subprocess_windows.cc test/core/util/tracer_util.cc third_party/googletest/googletest/src/gtest-all.cc third_party/googletest/googlemock/src/gmock-all.cc @@ -8704,8 +8680,6 @@ add_executable(check_gcp_environment_windows_test test/core/util/passthru_endpoint.cc test/core/util/resolve_localhost_ip46.cc test/core/util/slice_splitter.cc - test/core/util/subprocess_posix.cc - test/core/util/subprocess_windows.cc test/core/util/tracer_util.cc third_party/googletest/googletest/src/gtest-all.cc third_party/googletest/googlemock/src/gmock-all.cc @@ -9347,8 +9321,6 @@ add_executable(cmdline_test test/core/util/passthru_endpoint.cc test/core/util/resolve_localhost_ip46.cc test/core/util/slice_splitter.cc - test/core/util/subprocess_posix.cc - test/core/util/subprocess_windows.cc test/core/util/tracer_util.cc third_party/googletest/googletest/src/gtest-all.cc third_party/googletest/googlemock/src/gmock-all.cc @@ -9473,8 +9445,6 @@ if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_MAC OR _gRPC_PLATFORM_POSIX) test/core/util/passthru_endpoint.cc test/core/util/resolve_localhost_ip46.cc test/core/util/slice_splitter.cc - test/core/util/subprocess_posix.cc - test/core/util/subprocess_windows.cc test/core/util/tracer_util.cc third_party/googletest/googletest/src/gtest-all.cc third_party/googletest/googlemock/src/gmock-all.cc @@ -9797,8 +9767,6 @@ add_executable(connectivity_state_test test/core/util/passthru_endpoint.cc test/core/util/resolve_localhost_ip46.cc test/core/util/slice_splitter.cc - test/core/util/subprocess_posix.cc - test/core/util/subprocess_windows.cc test/core/util/tracer_util.cc third_party/googletest/googletest/src/gtest-all.cc third_party/googletest/googlemock/src/gmock-all.cc @@ -10860,8 +10828,6 @@ add_executable(endpoint_pair_test test/core/util/passthru_endpoint.cc test/core/util/resolve_localhost_ip46.cc test/core/util/slice_splitter.cc - test/core/util/subprocess_posix.cc - test/core/util/subprocess_windows.cc test/core/util/tracer_util.cc third_party/googletest/googletest/src/gtest-all.cc third_party/googletest/googlemock/src/gmock-all.cc @@ -10997,8 +10963,6 @@ add_executable(error_test test/core/util/passthru_endpoint.cc test/core/util/resolve_localhost_ip46.cc test/core/util/slice_splitter.cc - test/core/util/subprocess_posix.cc - test/core/util/subprocess_windows.cc test/core/util/tracer_util.cc third_party/googletest/googletest/src/gtest-all.cc third_party/googletest/googlemock/src/gmock-all.cc @@ -11046,8 +11010,6 @@ add_executable(error_utils_test test/core/util/passthru_endpoint.cc test/core/util/resolve_localhost_ip46.cc test/core/util/slice_splitter.cc - test/core/util/subprocess_posix.cc - test/core/util/subprocess_windows.cc test/core/util/tracer_util.cc third_party/googletest/googletest/src/gtest-all.cc third_party/googletest/googlemock/src/gmock-all.cc @@ -11095,8 +11057,6 @@ add_executable(evaluate_args_test test/core/util/passthru_endpoint.cc test/core/util/resolve_localhost_ip46.cc test/core/util/slice_splitter.cc - test/core/util/subprocess_posix.cc - test/core/util/subprocess_windows.cc test/core/util/tracer_util.cc third_party/googletest/googletest/src/gtest-all.cc third_party/googletest/googlemock/src/gmock-all.cc @@ -11665,8 +11625,6 @@ if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_MAC OR _gRPC_PLATFORM_POSIX) test/core/util/passthru_endpoint.cc test/core/util/resolve_localhost_ip46.cc test/core/util/slice_splitter.cc - test/core/util/subprocess_posix.cc - test/core/util/subprocess_windows.cc test/core/util/tracer_util.cc third_party/googletest/googletest/src/gtest-all.cc third_party/googletest/googlemock/src/gmock-all.cc @@ -12324,8 +12282,6 @@ add_executable(format_request_test test/core/util/passthru_endpoint.cc test/core/util/resolve_localhost_ip46.cc test/core/util/slice_splitter.cc - test/core/util/subprocess_posix.cc - test/core/util/subprocess_windows.cc test/core/util/tracer_util.cc third_party/googletest/googletest/src/gtest-all.cc third_party/googletest/googlemock/src/gmock-all.cc @@ -13010,8 +12966,6 @@ add_executable(grpc_alts_credentials_options_test test/core/util/passthru_endpoint.cc test/core/util/resolve_localhost_ip46.cc test/core/util/slice_splitter.cc - test/core/util/subprocess_posix.cc - test/core/util/subprocess_windows.cc test/core/util/tracer_util.cc third_party/googletest/googletest/src/gtest-all.cc third_party/googletest/googlemock/src/gmock-all.cc @@ -13097,8 +13051,6 @@ add_executable(grpc_authorization_engine_test test/core/util/passthru_endpoint.cc test/core/util/resolve_localhost_ip46.cc test/core/util/slice_splitter.cc - test/core/util/subprocess_posix.cc - test/core/util/subprocess_windows.cc test/core/util/tracer_util.cc third_party/googletest/googletest/src/gtest-all.cc third_party/googletest/googlemock/src/gmock-all.cc @@ -13146,8 +13098,6 @@ add_executable(grpc_authorization_policy_provider_test test/core/util/passthru_endpoint.cc test/core/util/resolve_localhost_ip46.cc test/core/util/slice_splitter.cc - test/core/util/subprocess_posix.cc - test/core/util/subprocess_windows.cc test/core/util/tracer_util.cc third_party/googletest/googletest/src/gtest-all.cc third_party/googletest/googlemock/src/gmock-all.cc @@ -13507,8 +13457,6 @@ add_executable(grpc_ipv6_loopback_available_test test/core/util/passthru_endpoint.cc test/core/util/resolve_localhost_ip46.cc test/core/util/slice_splitter.cc - test/core/util/subprocess_posix.cc - test/core/util/subprocess_windows.cc test/core/util/tracer_util.cc third_party/googletest/googletest/src/gtest-all.cc third_party/googletest/googlemock/src/gmock-all.cc @@ -13766,8 +13714,6 @@ add_executable(grpc_tls_certificate_distributor_test test/core/util/passthru_endpoint.cc test/core/util/resolve_localhost_ip46.cc test/core/util/slice_splitter.cc - test/core/util/subprocess_posix.cc - test/core/util/subprocess_windows.cc test/core/util/tracer_util.cc third_party/googletest/googletest/src/gtest-all.cc third_party/googletest/googlemock/src/gmock-all.cc @@ -13815,8 +13761,6 @@ add_executable(grpc_tls_certificate_provider_test test/core/util/passthru_endpoint.cc test/core/util/resolve_localhost_ip46.cc test/core/util/slice_splitter.cc - test/core/util/subprocess_posix.cc - test/core/util/subprocess_windows.cc test/core/util/tracer_util.cc third_party/googletest/googletest/src/gtest-all.cc third_party/googletest/googlemock/src/gmock-all.cc @@ -13864,8 +13808,6 @@ add_executable(grpc_tls_certificate_verifier_test test/core/util/passthru_endpoint.cc test/core/util/resolve_localhost_ip46.cc test/core/util/slice_splitter.cc - test/core/util/subprocess_posix.cc - test/core/util/subprocess_windows.cc test/core/util/tracer_util.cc third_party/googletest/googletest/src/gtest-all.cc third_party/googletest/googlemock/src/gmock-all.cc @@ -13913,8 +13855,6 @@ add_executable(grpc_tls_credentials_options_comparator_test test/core/util/passthru_endpoint.cc test/core/util/resolve_localhost_ip46.cc test/core/util/slice_splitter.cc - test/core/util/subprocess_posix.cc - test/core/util/subprocess_windows.cc test/core/util/tracer_util.cc third_party/googletest/googletest/src/gtest-all.cc third_party/googletest/googlemock/src/gmock-all.cc @@ -13962,8 +13902,6 @@ add_executable(grpc_tls_credentials_options_test test/core/util/passthru_endpoint.cc test/core/util/resolve_localhost_ip46.cc test/core/util/slice_splitter.cc - test/core/util/subprocess_posix.cc - test/core/util/subprocess_windows.cc test/core/util/tracer_util.cc third_party/googletest/googletest/src/gtest-all.cc third_party/googletest/googlemock/src/gmock-all.cc @@ -14568,8 +14506,6 @@ add_executable(histogram_test test/core/util/passthru_endpoint.cc test/core/util/resolve_localhost_ip46.cc test/core/util/slice_splitter.cc - test/core/util/subprocess_posix.cc - test/core/util/subprocess_windows.cc test/core/util/tracer_util.cc third_party/googletest/googletest/src/gtest-all.cc third_party/googletest/googlemock/src/gmock-all.cc @@ -14654,8 +14590,6 @@ add_executable(hpack_encoder_test test/core/util/passthru_endpoint.cc test/core/util/resolve_localhost_ip46.cc test/core/util/slice_splitter.cc - test/core/util/subprocess_posix.cc - test/core/util/subprocess_windows.cc test/core/util/tracer_util.cc third_party/googletest/googletest/src/gtest-all.cc third_party/googletest/googlemock/src/gmock-all.cc @@ -14703,8 +14637,6 @@ add_executable(hpack_parser_table_test test/core/util/passthru_endpoint.cc test/core/util/resolve_localhost_ip46.cc test/core/util/slice_splitter.cc - test/core/util/subprocess_posix.cc - test/core/util/subprocess_windows.cc test/core/util/tracer_util.cc third_party/googletest/googletest/src/gtest-all.cc third_party/googletest/googlemock/src/gmock-all.cc @@ -14752,8 +14684,6 @@ add_executable(hpack_parser_test test/core/util/passthru_endpoint.cc test/core/util/resolve_localhost_ip46.cc test/core/util/slice_splitter.cc - test/core/util/subprocess_posix.cc - test/core/util/subprocess_windows.cc test/core/util/tracer_util.cc third_party/googletest/googletest/src/gtest-all.cc third_party/googletest/googlemock/src/gmock-all.cc @@ -15264,8 +15194,6 @@ add_executable(insecure_security_connector_test test/core/util/passthru_endpoint.cc test/core/util/resolve_localhost_ip46.cc test/core/util/slice_splitter.cc - test/core/util/subprocess_posix.cc - test/core/util/subprocess_windows.cc test/core/util/tracer_util.cc third_party/googletest/googletest/src/gtest-all.cc third_party/googletest/googlemock/src/gmock-all.cc @@ -15773,8 +15701,6 @@ add_executable(json_token_test test/core/util/passthru_endpoint.cc test/core/util/resolve_localhost_ip46.cc test/core/util/slice_splitter.cc - test/core/util/subprocess_posix.cc - test/core/util/subprocess_windows.cc test/core/util/tracer_util.cc third_party/googletest/googletest/src/gtest-all.cc third_party/googletest/googlemock/src/gmock-all.cc @@ -15822,8 +15748,6 @@ add_executable(jwt_verifier_test test/core/util/passthru_endpoint.cc test/core/util/resolve_localhost_ip46.cc test/core/util/slice_splitter.cc - test/core/util/subprocess_posix.cc - test/core/util/subprocess_windows.cc test/core/util/tracer_util.cc third_party/googletest/googletest/src/gtest-all.cc third_party/googletest/googlemock/src/gmock-all.cc @@ -16428,8 +16352,6 @@ add_executable(matchers_test test/core/util/passthru_endpoint.cc test/core/util/resolve_localhost_ip46.cc test/core/util/slice_splitter.cc - test/core/util/subprocess_posix.cc - test/core/util/subprocess_windows.cc test/core/util/tracer_util.cc third_party/googletest/googletest/src/gtest-all.cc third_party/googletest/googlemock/src/gmock-all.cc @@ -16799,8 +16721,6 @@ add_executable(message_compress_test test/core/util/passthru_endpoint.cc test/core/util/resolve_localhost_ip46.cc test/core/util/slice_splitter.cc - test/core/util/subprocess_posix.cc - test/core/util/subprocess_windows.cc test/core/util/tracer_util.cc third_party/googletest/googletest/src/gtest-all.cc third_party/googletest/googlemock/src/gmock-all.cc @@ -16885,8 +16805,6 @@ add_executable(metadata_map_test test/core/util/passthru_endpoint.cc test/core/util/resolve_localhost_ip46.cc test/core/util/slice_splitter.cc - test/core/util/subprocess_posix.cc - test/core/util/subprocess_windows.cc test/core/util/tracer_util.cc third_party/googletest/googletest/src/gtest-all.cc third_party/googletest/googlemock/src/gmock-all.cc @@ -17977,8 +17895,6 @@ add_executable(parser_test test/core/util/passthru_endpoint.cc test/core/util/resolve_localhost_ip46.cc test/core/util/slice_splitter.cc - test/core/util/subprocess_posix.cc - test/core/util/subprocess_windows.cc test/core/util/tracer_util.cc third_party/googletest/googletest/src/gtest-all.cc third_party/googletest/googlemock/src/gmock-all.cc @@ -18242,8 +18158,6 @@ add_executable(pid_controller_test test/core/util/passthru_endpoint.cc test/core/util/resolve_localhost_ip46.cc test/core/util/slice_splitter.cc - test/core/util/subprocess_posix.cc - test/core/util/subprocess_windows.cc test/core/util/tracer_util.cc third_party/googletest/googletest/src/gtest-all.cc third_party/googletest/googlemock/src/gmock-all.cc @@ -18291,8 +18205,6 @@ add_executable(ping_abuse_policy_test test/core/util/passthru_endpoint.cc test/core/util/resolve_localhost_ip46.cc test/core/util/slice_splitter.cc - test/core/util/subprocess_posix.cc - test/core/util/subprocess_windows.cc test/core/util/tracer_util.cc third_party/googletest/googletest/src/gtest-all.cc third_party/googletest/googlemock/src/gmock-all.cc @@ -18340,8 +18252,6 @@ add_executable(ping_configuration_test test/core/util/passthru_endpoint.cc test/core/util/resolve_localhost_ip46.cc test/core/util/slice_splitter.cc - test/core/util/subprocess_posix.cc - test/core/util/subprocess_windows.cc test/core/util/tracer_util.cc third_party/googletest/googletest/src/gtest-all.cc third_party/googletest/googlemock/src/gmock-all.cc @@ -18437,8 +18347,6 @@ add_executable(ping_rate_policy_test test/core/util/passthru_endpoint.cc test/core/util/resolve_localhost_ip46.cc test/core/util/slice_splitter.cc - test/core/util/subprocess_posix.cc - test/core/util/subprocess_windows.cc test/core/util/tracer_util.cc third_party/googletest/googletest/src/gtest-all.cc third_party/googletest/googlemock/src/gmock-all.cc @@ -19567,8 +19475,6 @@ add_executable(rbac_translator_test test/core/util/passthru_endpoint.cc test/core/util/resolve_localhost_ip46.cc test/core/util/slice_splitter.cc - test/core/util/subprocess_posix.cc - test/core/util/subprocess_windows.cc test/core/util/tracer_util.cc third_party/googletest/googletest/src/gtest-all.cc third_party/googletest/googlemock/src/gmock-all.cc @@ -19875,8 +19781,6 @@ if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_MAC OR _gRPC_PLATFORM_POSIX) test/core/util/passthru_endpoint.cc test/core/util/resolve_localhost_ip46.cc test/core/util/slice_splitter.cc - test/core/util/subprocess_posix.cc - test/core/util/subprocess_windows.cc test/core/util/tracer_util.cc third_party/googletest/googletest/src/gtest-all.cc third_party/googletest/googlemock/src/gmock-all.cc @@ -19927,8 +19831,6 @@ add_executable(resolve_address_using_ares_resolver_test test/core/util/passthru_endpoint.cc test/core/util/resolve_localhost_ip46.cc test/core/util/slice_splitter.cc - test/core/util/subprocess_posix.cc - test/core/util/subprocess_windows.cc test/core/util/tracer_util.cc third_party/googletest/googletest/src/gtest-all.cc third_party/googletest/googlemock/src/gmock-all.cc @@ -19978,8 +19880,6 @@ if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_MAC OR _gRPC_PLATFORM_POSIX) test/core/util/passthru_endpoint.cc test/core/util/resolve_localhost_ip46.cc test/core/util/slice_splitter.cc - test/core/util/subprocess_posix.cc - test/core/util/subprocess_windows.cc test/core/util/tracer_util.cc third_party/googletest/googletest/src/gtest-all.cc third_party/googletest/googlemock/src/gmock-all.cc @@ -20030,8 +19930,6 @@ add_executable(resolve_address_using_native_resolver_test test/core/util/passthru_endpoint.cc test/core/util/resolve_localhost_ip46.cc test/core/util/slice_splitter.cc - test/core/util/subprocess_posix.cc - test/core/util/subprocess_windows.cc test/core/util/tracer_util.cc third_party/googletest/googletest/src/gtest-all.cc third_party/googletest/googlemock/src/gmock-all.cc @@ -22138,8 +22036,6 @@ add_executable(secure_endpoint_test test/core/util/passthru_endpoint.cc test/core/util/resolve_localhost_ip46.cc test/core/util/slice_splitter.cc - test/core/util/subprocess_posix.cc - test/core/util/subprocess_windows.cc test/core/util/tracer_util.cc third_party/googletest/googletest/src/gtest-all.cc third_party/googletest/googlemock/src/gmock-all.cc @@ -22187,8 +22083,6 @@ add_executable(security_connector_test test/core/util/passthru_endpoint.cc test/core/util/resolve_localhost_ip46.cc test/core/util/slice_splitter.cc - test/core/util/subprocess_posix.cc - test/core/util/subprocess_windows.cc test/core/util/tracer_util.cc third_party/googletest/googletest/src/gtest-all.cc third_party/googletest/googlemock/src/gmock-all.cc @@ -22386,8 +22280,6 @@ if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_MAC OR _gRPC_PLATFORM_POSIX) test/core/util/passthru_endpoint.cc test/core/util/resolve_localhost_ip46.cc test/core/util/slice_splitter.cc - test/core/util/subprocess_posix.cc - test/core/util/subprocess_windows.cc test/core/util/tracer_util.cc test/cpp/server/server_builder_test.cc third_party/googletest/googletest/src/gtest-all.cc @@ -22454,8 +22346,6 @@ if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_MAC OR _gRPC_PLATFORM_POSIX) test/core/util/passthru_endpoint.cc test/core/util/resolve_localhost_ip46.cc test/core/util/slice_splitter.cc - test/core/util/subprocess_posix.cc - test/core/util/subprocess_windows.cc test/core/util/tracer_util.cc test/cpp/server/server_builder_with_socket_mutator_test.cc third_party/googletest/googletest/src/gtest-all.cc @@ -22866,8 +22756,6 @@ if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_MAC OR _gRPC_PLATFORM_POSIX) test/core/util/passthru_endpoint.cc test/core/util/resolve_localhost_ip46.cc test/core/util/slice_splitter.cc - test/core/util/subprocess_posix.cc - test/core/util/subprocess_windows.cc test/core/util/tracer_util.cc test/cpp/server/server_request_call_test.cc third_party/googletest/googletest/src/gtest-all.cc @@ -23138,8 +23026,6 @@ add_executable(settings_timeout_test test/core/util/passthru_endpoint.cc test/core/util/resolve_localhost_ip46.cc test/core/util/slice_splitter.cc - test/core/util/subprocess_posix.cc - test/core/util/subprocess_windows.cc test/core/util/tracer_util.cc third_party/googletest/googletest/src/gtest-all.cc third_party/googletest/googlemock/src/gmock-all.cc @@ -23752,8 +23638,6 @@ if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_MAC OR _gRPC_PLATFORM_POSIX) test/core/util/passthru_endpoint.cc test/core/util/resolve_localhost_ip46.cc test/core/util/slice_splitter.cc - test/core/util/subprocess_posix.cc - test/core/util/subprocess_windows.cc test/core/util/tracer_util.cc third_party/googletest/googletest/src/gtest-all.cc third_party/googletest/googlemock/src/gmock-all.cc @@ -23875,8 +23759,6 @@ add_executable(ssl_credentials_test test/core/util/passthru_endpoint.cc test/core/util/resolve_localhost_ip46.cc test/core/util/slice_splitter.cc - test/core/util/subprocess_posix.cc - test/core/util/subprocess_windows.cc test/core/util/tracer_util.cc third_party/googletest/googletest/src/gtest-all.cc third_party/googletest/googlemock/src/gmock-all.cc @@ -24155,8 +24037,6 @@ add_executable(status_conversion_test test/core/util/passthru_endpoint.cc test/core/util/resolve_localhost_ip46.cc test/core/util/slice_splitter.cc - test/core/util/subprocess_posix.cc - test/core/util/subprocess_windows.cc test/core/util/tracer_util.cc third_party/googletest/googletest/src/gtest-all.cc third_party/googletest/googlemock/src/gmock-all.cc @@ -24280,8 +24160,6 @@ if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_MAC OR _gRPC_PLATFORM_POSIX) test/core/util/passthru_endpoint.cc test/core/util/resolve_localhost_ip46.cc test/core/util/slice_splitter.cc - test/core/util/subprocess_posix.cc - test/core/util/subprocess_windows.cc test/core/util/tracer_util.cc third_party/googletest/googletest/src/gtest-all.cc third_party/googletest/googlemock/src/gmock-all.cc @@ -24475,8 +24353,6 @@ add_executable(streams_not_seen_test test/core/util/passthru_endpoint.cc test/core/util/resolve_localhost_ip46.cc test/core/util/slice_splitter.cc - test/core/util/subprocess_posix.cc - test/core/util/subprocess_windows.cc test/core/util/tracer_util.cc third_party/googletest/googletest/src/gtest-all.cc third_party/googletest/googlemock/src/gmock-all.cc @@ -24636,8 +24512,6 @@ add_executable(system_roots_test test/core/util/passthru_endpoint.cc test/core/util/resolve_localhost_ip46.cc test/core/util/slice_splitter.cc - test/core/util/subprocess_posix.cc - test/core/util/subprocess_windows.cc test/core/util/tracer_util.cc third_party/googletest/googletest/src/gtest-all.cc third_party/googletest/googlemock/src/gmock-all.cc @@ -24727,8 +24601,6 @@ if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_MAC OR _gRPC_PLATFORM_POSIX) test/core/util/passthru_endpoint.cc test/core/util/resolve_localhost_ip46.cc test/core/util/slice_splitter.cc - test/core/util/subprocess_posix.cc - test/core/util/subprocess_windows.cc test/core/util/tracer_util.cc third_party/googletest/googletest/src/gtest-all.cc third_party/googletest/googlemock/src/gmock-all.cc @@ -24818,8 +24690,6 @@ if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_POSIX) test/core/util/passthru_endpoint.cc test/core/util/resolve_localhost_ip46.cc test/core/util/slice_splitter.cc - test/core/util/subprocess_posix.cc - test/core/util/subprocess_windows.cc test/core/util/tracer_util.cc third_party/googletest/googletest/src/gtest-all.cc third_party/googletest/googlemock/src/gmock-all.cc @@ -24869,8 +24739,6 @@ if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_MAC OR _gRPC_PLATFORM_POSIX) test/core/util/passthru_endpoint.cc test/core/util/resolve_localhost_ip46.cc test/core/util/slice_splitter.cc - test/core/util/subprocess_posix.cc - test/core/util/subprocess_windows.cc test/core/util/tracer_util.cc third_party/googletest/googletest/src/gtest-all.cc third_party/googletest/googlemock/src/gmock-all.cc @@ -25294,8 +25162,6 @@ add_executable(test_core_iomgr_load_file_test test/core/util/passthru_endpoint.cc test/core/util/resolve_localhost_ip46.cc test/core/util/slice_splitter.cc - test/core/util/subprocess_posix.cc - test/core/util/subprocess_windows.cc test/core/util/tracer_util.cc third_party/googletest/googletest/src/gtest-all.cc third_party/googletest/googlemock/src/gmock-all.cc @@ -25343,8 +25209,6 @@ add_executable(test_core_iomgr_timer_heap_test test/core/util/passthru_endpoint.cc test/core/util/resolve_localhost_ip46.cc test/core/util/slice_splitter.cc - test/core/util/subprocess_posix.cc - test/core/util/subprocess_windows.cc test/core/util/tracer_util.cc third_party/googletest/googletest/src/gtest-all.cc third_party/googletest/googlemock/src/gmock-all.cc @@ -25392,8 +25256,6 @@ add_executable(test_core_security_credentials_test test/core/util/passthru_endpoint.cc test/core/util/resolve_localhost_ip46.cc test/core/util/slice_splitter.cc - test/core/util/subprocess_posix.cc - test/core/util/subprocess_windows.cc test/core/util/tracer_util.cc third_party/googletest/googletest/src/gtest-all.cc third_party/googletest/googlemock/src/gmock-all.cc @@ -26001,8 +25863,6 @@ add_executable(timeout_encoding_test test/core/util/passthru_endpoint.cc test/core/util/resolve_localhost_ip46.cc test/core/util/slice_splitter.cc - test/core/util/subprocess_posix.cc - test/core/util/subprocess_windows.cc test/core/util/tracer_util.cc third_party/googletest/googletest/src/gtest-all.cc third_party/googletest/googlemock/src/gmock-all.cc @@ -26217,8 +26077,6 @@ add_executable(tls_security_connector_test test/core/util/passthru_endpoint.cc test/core/util/resolve_localhost_ip46.cc test/core/util/slice_splitter.cc - test/core/util/subprocess_posix.cc - test/core/util/subprocess_windows.cc test/core/util/tracer_util.cc third_party/googletest/googletest/src/gtest-all.cc third_party/googletest/googlemock/src/gmock-all.cc @@ -27533,8 +27391,6 @@ if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_MAC OR _gRPC_PLATFORM_POSIX) test/core/util/passthru_endpoint.cc test/core/util/resolve_localhost_ip46.cc test/core/util/slice_splitter.cc - test/core/util/subprocess_posix.cc - test/core/util/subprocess_windows.cc test/core/util/tracer_util.cc test/cpp/performance/writes_per_rpc_test.cc third_party/googletest/googletest/src/gtest-all.cc @@ -28555,8 +28411,6 @@ add_executable(xds_credentials_test test/core/util/passthru_endpoint.cc test/core/util/resolve_localhost_ip46.cc test/core/util/slice_splitter.cc - test/core/util/subprocess_posix.cc - test/core/util/subprocess_windows.cc test/core/util/tracer_util.cc third_party/googletest/googletest/src/gtest-all.cc third_party/googletest/googlemock/src/gmock-all.cc diff --git a/build_autogenerated.yaml b/build_autogenerated.yaml index 93759c1d0a8..9d86bc8ece3 100644 --- a/build_autogenerated.yaml +++ b/build_autogenerated.yaml @@ -2777,7 +2777,6 @@ libs: - test/core/util/passthru_endpoint.h - test/core/util/resolve_localhost_ip46.h - test/core/util/slice_splitter.h - - test/core/util/subprocess.h - test/core/util/tracer_util.h - test/cpp/microbenchmarks/fullstack_context_mutators.h - test/cpp/microbenchmarks/fullstack_fixtures.h @@ -2796,8 +2795,6 @@ libs: - test/core/util/passthru_endpoint.cc - test/core/util/resolve_localhost_ip46.cc - test/core/util/slice_splitter.cc - - test/core/util/subprocess_posix.cc - - test/core/util/subprocess_windows.cc - test/core/util/tracer_util.cc - test/cpp/microbenchmarks/helpers.cc deps: @@ -3186,6 +3183,7 @@ libs: language: c++ public_headers: [] headers: + - src/core/lib/gpr/subprocess.h - test/core/end2end/data/ssl_test_data.h - test/core/util/cmdline.h - test/core/util/evaluate_args_test_util.h @@ -3198,7 +3196,6 @@ libs: - test/core/util/passthru_endpoint.h - test/core/util/resolve_localhost_ip46.h - test/core/util/slice_splitter.h - - test/core/util/subprocess.h - test/core/util/tracer_util.h - test/cpp/util/byte_buffer_proto_helper.h - test/cpp/util/create_test_channel.h @@ -3206,6 +3203,8 @@ libs: - test/cpp/util/subprocess.h - test/cpp/util/test_credentials_provider.h src: + - src/core/lib/gpr/subprocess_posix.cc + - src/core/lib/gpr/subprocess_windows.cc - test/core/end2end/data/client_certs.cc - test/core/end2end/data/server1_cert.cc - test/core/end2end/data/server1_key.cc @@ -3219,8 +3218,6 @@ libs: - test/core/util/passthru_endpoint.cc - test/core/util/resolve_localhost_ip46.cc - test/core/util/slice_splitter.cc - - test/core/util/subprocess_posix.cc - - test/core/util/subprocess_windows.cc - test/core/util/tracer_util.cc - test/cpp/util/byte_buffer_proto_helper.cc - test/cpp/util/create_test_channel.cc @@ -4204,7 +4201,6 @@ targets: - test/core/util/passthru_endpoint.h - test/core/util/resolve_localhost_ip46.h - test/core/util/slice_splitter.h - - test/core/util/subprocess.h - test/core/util/tracer_util.h src: - test/core/iomgr/fd_conservation_posix_test.cc @@ -4217,8 +4213,6 @@ targets: - test/core/util/passthru_endpoint.cc - test/core/util/resolve_localhost_ip46.cc - test/core/util/slice_splitter.cc - - test/core/util/subprocess_posix.cc - - test/core/util/subprocess_windows.cc - test/core/util/tracer_util.cc deps: - grpc_test_util @@ -4280,7 +4274,6 @@ targets: - test/core/util/passthru_endpoint.h - test/core/util/resolve_localhost_ip46.h - test/core/util/slice_splitter.h - - test/core/util/subprocess.h - test/core/util/tracer_util.h src: - test/core/iomgr/timer_list_test.cc @@ -4293,8 +4286,6 @@ targets: - test/core/util/passthru_endpoint.cc - test/core/util/resolve_localhost_ip46.cc - test/core/util/slice_splitter.cc - - test/core/util/subprocess_posix.cc - - test/core/util/subprocess_windows.cc - test/core/util/tracer_util.cc deps: - grpc_test_util @@ -4354,6 +4345,7 @@ targets: build: test language: c++ headers: + - src/core/lib/gpr/subprocess.h - test/core/util/cmdline.h - test/core/util/evaluate_args_test_util.h - test/core/util/fuzzer_util.h @@ -4365,12 +4357,13 @@ targets: - test/core/util/passthru_endpoint.h - test/core/util/resolve_localhost_ip46.h - test/core/util/slice_splitter.h - - test/core/util/subprocess.h - test/core/util/tracer_util.h - test/cpp/util/byte_buffer_proto_helper.h - test/cpp/util/string_ref_helper.h - test/cpp/util/subprocess.h src: + - src/core/lib/gpr/subprocess_posix.cc + - src/core/lib/gpr/subprocess_windows.cc - test/core/util/cmdline.cc - test/core/util/fuzzer_util.cc - test/core/util/grpc_profiler.cc @@ -4380,8 +4373,6 @@ targets: - test/core/util/passthru_endpoint.cc - test/core/util/resolve_localhost_ip46.cc - test/core/util/slice_splitter.cc - - test/core/util/subprocess_posix.cc - - test/core/util/subprocess_windows.cc - test/core/util/tracer_util.cc - test/cpp/naming/address_sorting_test.cc - test/cpp/util/byte_buffer_proto_helper.cc @@ -4429,7 +4420,6 @@ targets: - test/core/util/passthru_endpoint.h - test/core/util/resolve_localhost_ip46.h - test/core/util/slice_splitter.h - - test/core/util/subprocess.h - test/core/util/tracer_util.h src: - test/core/util/cmdline.cc @@ -4441,8 +4431,6 @@ targets: - test/core/util/passthru_endpoint.cc - test/core/util/resolve_localhost_ip46.cc - test/core/util/slice_splitter.cc - - test/core/util/subprocess_posix.cc - - test/core/util/subprocess_windows.cc - test/core/util/tracer_util.cc - test/cpp/common/alarm_test.cc deps: @@ -4588,7 +4576,6 @@ targets: - test/core/util/passthru_endpoint.h - test/core/util/resolve_localhost_ip46.h - test/core/util/slice_splitter.h - - test/core/util/subprocess.h - test/core/util/tracer_util.h src: - test/core/security/alts_security_connector_test.cc @@ -4601,8 +4588,6 @@ targets: - test/core/util/passthru_endpoint.cc - test/core/util/resolve_localhost_ip46.cc - test/core/util/slice_splitter.cc - - test/core/util/subprocess_posix.cc - - test/core/util/subprocess_windows.cc - test/core/util/tracer_util.cc deps: - grpc_test_util @@ -4701,7 +4686,6 @@ targets: - test/core/util/passthru_endpoint.h - test/core/util/resolve_localhost_ip46.h - test/core/util/slice_splitter.h - - test/core/util/subprocess.h - test/core/util/tracer_util.h src: - test/core/security/auth_context_test.cc @@ -4714,8 +4698,6 @@ targets: - test/core/util/passthru_endpoint.cc - test/core/util/resolve_localhost_ip46.cc - test/core/util/slice_splitter.cc - - test/core/util/subprocess_posix.cc - - test/core/util/subprocess_windows.cc - test/core/util/tracer_util.cc deps: - grpc_test_util @@ -4746,7 +4728,6 @@ targets: - test/core/util/passthru_endpoint.h - test/core/util/resolve_localhost_ip46.h - test/core/util/slice_splitter.h - - test/core/util/subprocess.h - test/core/util/tracer_util.h src: - test/core/security/authorization_matchers_test.cc @@ -4759,8 +4740,6 @@ targets: - test/core/util/passthru_endpoint.cc - test/core/util/resolve_localhost_ip46.cc - test/core/util/slice_splitter.cc - - test/core/util/subprocess_posix.cc - - test/core/util/subprocess_windows.cc - test/core/util/tracer_util.cc deps: - grpc_test_util @@ -4806,7 +4785,6 @@ targets: - test/core/util/passthru_endpoint.h - test/core/util/resolve_localhost_ip46.h - test/core/util/slice_splitter.h - - test/core/util/subprocess.h - test/core/util/tracer_util.h src: - test/core/security/aws_request_signer_test.cc @@ -4819,8 +4797,6 @@ targets: - test/core/util/passthru_endpoint.cc - test/core/util/resolve_localhost_ip46.cc - test/core/util/slice_splitter.cc - - test/core/util/subprocess_posix.cc - - test/core/util/subprocess_windows.cc - test/core/util/tracer_util.cc deps: - grpc_test_util @@ -4895,6 +4871,7 @@ targets: build: test language: c++ headers: + - src/core/lib/gpr/subprocess.h - test/core/end2end/cq_verifier.h - test/core/util/cmdline.h - test/core/util/evaluate_args_test_util.h @@ -4907,9 +4884,10 @@ targets: - test/core/util/passthru_endpoint.h - test/core/util/resolve_localhost_ip46.h - test/core/util/slice_splitter.h - - test/core/util/subprocess.h - test/core/util/tracer_util.h src: + - src/core/lib/gpr/subprocess_posix.cc + - src/core/lib/gpr/subprocess_windows.cc - test/core/bad_ssl/bad_ssl_test.cc - test/core/end2end/cq_verifier.cc - test/core/util/cmdline.cc @@ -4921,8 +4899,6 @@ targets: - test/core/util/passthru_endpoint.cc - test/core/util/resolve_localhost_ip46.cc - test/core/util/slice_splitter.cc - - test/core/util/subprocess_posix.cc - - test/core/util/subprocess_windows.cc - test/core/util/tracer_util.cc deps: - grpc_test_util @@ -4935,6 +4911,7 @@ targets: build: test language: c++ headers: + - src/core/lib/gpr/subprocess.h - test/core/end2end/cq_verifier.h - test/core/util/cmdline.h - test/core/util/evaluate_args_test_util.h @@ -4947,9 +4924,10 @@ targets: - test/core/util/passthru_endpoint.h - test/core/util/resolve_localhost_ip46.h - test/core/util/slice_splitter.h - - test/core/util/subprocess.h - test/core/util/tracer_util.h src: + - src/core/lib/gpr/subprocess_posix.cc + - src/core/lib/gpr/subprocess_windows.cc - test/core/bad_ssl/bad_ssl_test.cc - test/core/end2end/cq_verifier.cc - test/core/util/cmdline.cc @@ -4961,8 +4939,6 @@ targets: - test/core/util/passthru_endpoint.cc - test/core/util/resolve_localhost_ip46.cc - test/core/util/slice_splitter.cc - - test/core/util/subprocess_posix.cc - - test/core/util/subprocess_windows.cc - test/core/util/tracer_util.cc deps: - grpc_test_util @@ -5236,7 +5212,6 @@ targets: - test/core/util/passthru_endpoint.h - test/core/util/resolve_localhost_ip46.h - test/core/util/slice_splitter.h - - test/core/util/subprocess.h - test/core/util/tracer_util.h src: - test/core/iomgr/buffer_list_test.cc @@ -5249,8 +5224,6 @@ targets: - test/core/util/passthru_endpoint.cc - test/core/util/resolve_localhost_ip46.cc - test/core/util/slice_splitter.cc - - test/core/util/subprocess_posix.cc - - test/core/util/subprocess_windows.cc - test/core/util/tracer_util.cc deps: - grpc_test_util @@ -5750,7 +5723,6 @@ targets: - test/core/util/passthru_endpoint.h - test/core/util/resolve_localhost_ip46.h - test/core/util/slice_splitter.h - - test/core/util/subprocess.h - test/core/util/tracer_util.h src: - src/core/ext/upb-generated/envoy/annotations/deprecation.upb.c @@ -5852,8 +5824,6 @@ targets: - test/core/util/passthru_endpoint.cc - test/core/util/resolve_localhost_ip46.cc - test/core/util/slice_splitter.cc - - test/core/util/subprocess_posix.cc - - test/core/util/subprocess_windows.cc - test/core/util/tracer_util.cc deps: - grpc_test_util @@ -5966,7 +5936,6 @@ targets: - test/core/util/passthru_endpoint.h - test/core/util/resolve_localhost_ip46.h - test/core/util/slice_splitter.h - - test/core/util/subprocess.h - test/core/util/tracer_util.h src: - test/core/security/channel_creds_registry_test.cc @@ -5979,8 +5948,6 @@ targets: - test/core/util/passthru_endpoint.cc - test/core/util/resolve_localhost_ip46.cc - test/core/util/slice_splitter.cc - - test/core/util/subprocess_posix.cc - - test/core/util/subprocess_windows.cc - test/core/util/tracer_util.cc deps: - grpc_test_util @@ -6070,7 +6037,6 @@ targets: - test/core/util/passthru_endpoint.h - test/core/util/resolve_localhost_ip46.h - test/core/util/slice_splitter.h - - test/core/util/subprocess.h - test/core/util/tracer_util.h src: - test/core/security/check_gcp_environment_linux_test.cc @@ -6083,8 +6049,6 @@ targets: - test/core/util/passthru_endpoint.cc - test/core/util/resolve_localhost_ip46.cc - test/core/util/slice_splitter.cc - - test/core/util/subprocess_posix.cc - - test/core/util/subprocess_windows.cc - test/core/util/tracer_util.cc deps: - grpc_test_util @@ -6104,7 +6068,6 @@ targets: - test/core/util/passthru_endpoint.h - test/core/util/resolve_localhost_ip46.h - test/core/util/slice_splitter.h - - test/core/util/subprocess.h - test/core/util/tracer_util.h src: - test/core/security/check_gcp_environment_windows_test.cc @@ -6117,8 +6080,6 @@ targets: - test/core/util/passthru_endpoint.cc - test/core/util/resolve_localhost_ip46.cc - test/core/util/slice_splitter.cc - - test/core/util/subprocess_posix.cc - - test/core/util/subprocess_windows.cc - test/core/util/tracer_util.cc deps: - grpc_test_util @@ -6422,7 +6383,6 @@ targets: - test/core/util/passthru_endpoint.h - test/core/util/resolve_localhost_ip46.h - test/core/util/slice_splitter.h - - test/core/util/subprocess.h - test/core/util/tracer_util.h src: - test/core/util/cmdline.cc @@ -6435,8 +6395,6 @@ targets: - test/core/util/passthru_endpoint.cc - test/core/util/resolve_localhost_ip46.cc - test/core/util/slice_splitter.cc - - test/core/util/subprocess_posix.cc - - test/core/util/subprocess_windows.cc - test/core/util/tracer_util.cc deps: - grpc_test_util @@ -6480,7 +6438,6 @@ targets: - test/core/util/passthru_endpoint.h - test/core/util/resolve_localhost_ip46.h - test/core/util/slice_splitter.h - - test/core/util/subprocess.h - test/core/util/tracer_util.h src: - test/core/iomgr/combiner_test.cc @@ -6493,8 +6450,6 @@ targets: - test/core/util/passthru_endpoint.cc - test/core/util/resolve_localhost_ip46.cc - test/core/util/slice_splitter.cc - - test/core/util/subprocess_posix.cc - - test/core/util/subprocess_windows.cc - test/core/util/tracer_util.cc deps: - grpc_test_util @@ -6617,7 +6572,6 @@ targets: - test/core/util/passthru_endpoint.h - test/core/util/resolve_localhost_ip46.h - test/core/util/slice_splitter.h - - test/core/util/subprocess.h - test/core/util/tracer_util.h src: - test/core/transport/connectivity_state_test.cc @@ -6630,8 +6584,6 @@ targets: - test/core/util/passthru_endpoint.cc - test/core/util/resolve_localhost_ip46.cc - test/core/util/slice_splitter.cc - - test/core/util/subprocess_posix.cc - - test/core/util/subprocess_windows.cc - test/core/util/tracer_util.cc deps: - grpc_test_util @@ -7127,7 +7079,6 @@ targets: - test/core/util/passthru_endpoint.h - test/core/util/resolve_localhost_ip46.h - test/core/util/slice_splitter.h - - test/core/util/subprocess.h - test/core/util/tracer_util.h src: - test/core/iomgr/endpoint_pair_test.cc @@ -7141,8 +7092,6 @@ targets: - test/core/util/passthru_endpoint.cc - test/core/util/resolve_localhost_ip46.cc - test/core/util/slice_splitter.cc - - test/core/util/subprocess_posix.cc - - test/core/util/subprocess_windows.cc - test/core/util/tracer_util.cc deps: - grpc_test_util @@ -7186,7 +7135,6 @@ targets: - test/core/util/passthru_endpoint.h - test/core/util/resolve_localhost_ip46.h - test/core/util/slice_splitter.h - - test/core/util/subprocess.h - test/core/util/tracer_util.h src: - test/core/iomgr/endpoint_tests.cc @@ -7200,8 +7148,6 @@ targets: - test/core/util/passthru_endpoint.cc - test/core/util/resolve_localhost_ip46.cc - test/core/util/slice_splitter.cc - - test/core/util/subprocess_posix.cc - - test/core/util/subprocess_windows.cc - test/core/util/tracer_util.cc deps: - grpc_test_util @@ -7222,7 +7168,6 @@ targets: - test/core/util/passthru_endpoint.h - test/core/util/resolve_localhost_ip46.h - test/core/util/slice_splitter.h - - test/core/util/subprocess.h - test/core/util/tracer_util.h src: - test/core/transport/error_utils_test.cc @@ -7235,8 +7180,6 @@ targets: - test/core/util/passthru_endpoint.cc - test/core/util/resolve_localhost_ip46.cc - test/core/util/slice_splitter.cc - - test/core/util/subprocess_posix.cc - - test/core/util/subprocess_windows.cc - test/core/util/tracer_util.cc deps: - grpc_test_util @@ -7256,7 +7199,6 @@ targets: - test/core/util/passthru_endpoint.h - test/core/util/resolve_localhost_ip46.h - test/core/util/slice_splitter.h - - test/core/util/subprocess.h - test/core/util/tracer_util.h src: - test/core/security/evaluate_args_test.cc @@ -7269,8 +7211,6 @@ targets: - test/core/util/passthru_endpoint.cc - test/core/util/resolve_localhost_ip46.cc - test/core/util/slice_splitter.cc - - test/core/util/subprocess_posix.cc - - test/core/util/subprocess_windows.cc - test/core/util/tracer_util.cc deps: - grpc_test_util @@ -7573,7 +7513,6 @@ targets: - test/core/util/passthru_endpoint.h - test/core/util/resolve_localhost_ip46.h - test/core/util/slice_splitter.h - - test/core/util/subprocess.h - test/core/util/tracer_util.h src: - test/core/iomgr/fd_posix_test.cc @@ -7586,8 +7525,6 @@ targets: - test/core/util/passthru_endpoint.cc - test/core/util/resolve_localhost_ip46.cc - test/core/util/slice_splitter.cc - - test/core/util/subprocess_posix.cc - - test/core/util/subprocess_windows.cc - test/core/util/tracer_util.cc deps: - grpc_test_util @@ -8027,7 +7964,6 @@ targets: - test/core/util/passthru_endpoint.h - test/core/util/resolve_localhost_ip46.h - test/core/util/slice_splitter.h - - test/core/util/subprocess.h - test/core/util/tracer_util.h src: - test/core/end2end/data/client_certs.cc @@ -8044,8 +7980,6 @@ targets: - test/core/util/passthru_endpoint.cc - test/core/util/resolve_localhost_ip46.cc - test/core/util/slice_splitter.cc - - test/core/util/subprocess_posix.cc - - test/core/util/subprocess_windows.cc - test/core/util/tracer_util.cc deps: - grpc_test_util @@ -8749,7 +8683,6 @@ targets: - test/core/util/passthru_endpoint.h - test/core/util/resolve_localhost_ip46.h - test/core/util/slice_splitter.h - - test/core/util/subprocess.h - test/core/util/tracer_util.h src: - test/core/security/grpc_alts_credentials_options_test.cc @@ -8762,8 +8695,6 @@ targets: - test/core/util/passthru_endpoint.cc - test/core/util/resolve_localhost_ip46.cc - test/core/util/slice_splitter.cc - - test/core/util/subprocess_posix.cc - - test/core/util/subprocess_windows.cc - test/core/util/tracer_util.cc deps: - grpc_test_util @@ -8793,7 +8724,6 @@ targets: - test/core/util/passthru_endpoint.h - test/core/util/resolve_localhost_ip46.h - test/core/util/slice_splitter.h - - test/core/util/subprocess.h - test/core/util/tracer_util.h src: - test/core/security/grpc_authorization_engine_test.cc @@ -8807,8 +8737,6 @@ targets: - test/core/util/passthru_endpoint.cc - test/core/util/resolve_localhost_ip46.cc - test/core/util/slice_splitter.cc - - test/core/util/subprocess_posix.cc - - test/core/util/subprocess_windows.cc - test/core/util/tracer_util.cc deps: - grpc_test_util @@ -8828,7 +8756,6 @@ targets: - test/core/util/passthru_endpoint.h - test/core/util/resolve_localhost_ip46.h - test/core/util/slice_splitter.h - - test/core/util/subprocess.h - test/core/util/tracer_util.h src: - test/core/security/grpc_authorization_policy_provider_test.cc @@ -8841,8 +8768,6 @@ targets: - test/core/util/passthru_endpoint.cc - test/core/util/resolve_localhost_ip46.cc - test/core/util/slice_splitter.cc - - test/core/util/subprocess_posix.cc - - test/core/util/subprocess_windows.cc - test/core/util/tracer_util.cc deps: - grpc_authorization_provider @@ -8976,7 +8901,6 @@ targets: - test/core/util/passthru_endpoint.h - test/core/util/resolve_localhost_ip46.h - test/core/util/slice_splitter.h - - test/core/util/subprocess.h - test/core/util/tracer_util.h src: - test/core/iomgr/grpc_ipv6_loopback_available_test.cc @@ -8989,8 +8913,6 @@ targets: - test/core/util/passthru_endpoint.cc - test/core/util/resolve_localhost_ip46.cc - test/core/util/slice_splitter.cc - - test/core/util/subprocess_posix.cc - - test/core/util/subprocess_windows.cc - test/core/util/tracer_util.cc deps: - grpc_test_util @@ -9050,7 +8972,6 @@ targets: - test/core/util/passthru_endpoint.h - test/core/util/resolve_localhost_ip46.h - test/core/util/slice_splitter.h - - test/core/util/subprocess.h - test/core/util/tracer_util.h src: - test/core/security/grpc_tls_certificate_distributor_test.cc @@ -9063,8 +8984,6 @@ targets: - test/core/util/passthru_endpoint.cc - test/core/util/resolve_localhost_ip46.cc - test/core/util/slice_splitter.cc - - test/core/util/subprocess_posix.cc - - test/core/util/subprocess_windows.cc - test/core/util/tracer_util.cc deps: - grpc_test_util @@ -9084,7 +9003,6 @@ targets: - test/core/util/passthru_endpoint.h - test/core/util/resolve_localhost_ip46.h - test/core/util/slice_splitter.h - - test/core/util/subprocess.h - test/core/util/tracer_util.h src: - test/core/security/grpc_tls_certificate_provider_test.cc @@ -9097,8 +9015,6 @@ targets: - test/core/util/passthru_endpoint.cc - test/core/util/resolve_localhost_ip46.cc - test/core/util/slice_splitter.cc - - test/core/util/subprocess_posix.cc - - test/core/util/subprocess_windows.cc - test/core/util/tracer_util.cc deps: - grpc_test_util @@ -9118,7 +9034,6 @@ targets: - test/core/util/passthru_endpoint.h - test/core/util/resolve_localhost_ip46.h - test/core/util/slice_splitter.h - - test/core/util/subprocess.h - test/core/util/tracer_util.h src: - test/core/security/grpc_tls_certificate_verifier_test.cc @@ -9131,8 +9046,6 @@ targets: - test/core/util/passthru_endpoint.cc - test/core/util/resolve_localhost_ip46.cc - test/core/util/slice_splitter.cc - - test/core/util/subprocess_posix.cc - - test/core/util/subprocess_windows.cc - test/core/util/tracer_util.cc deps: - grpc_test_util @@ -9152,7 +9065,6 @@ targets: - test/core/util/passthru_endpoint.h - test/core/util/resolve_localhost_ip46.h - test/core/util/slice_splitter.h - - test/core/util/subprocess.h - test/core/util/tracer_util.h src: - test/core/security/grpc_tls_credentials_options_comparator_test.cc @@ -9165,8 +9077,6 @@ targets: - test/core/util/passthru_endpoint.cc - test/core/util/resolve_localhost_ip46.cc - test/core/util/slice_splitter.cc - - test/core/util/subprocess_posix.cc - - test/core/util/subprocess_windows.cc - test/core/util/tracer_util.cc deps: - grpc_test_util @@ -9186,7 +9096,6 @@ targets: - test/core/util/passthru_endpoint.h - test/core/util/resolve_localhost_ip46.h - test/core/util/slice_splitter.h - - test/core/util/subprocess.h - test/core/util/tracer_util.h src: - test/core/security/grpc_tls_credentials_options_test.cc @@ -9199,8 +9108,6 @@ targets: - test/core/util/passthru_endpoint.cc - test/core/util/resolve_localhost_ip46.cc - test/core/util/slice_splitter.cc - - test/core/util/subprocess_posix.cc - - test/core/util/subprocess_windows.cc - test/core/util/tracer_util.cc deps: - grpc_test_util @@ -9443,7 +9350,6 @@ targets: - test/core/util/passthru_endpoint.h - test/core/util/resolve_localhost_ip46.h - test/core/util/slice_splitter.h - - test/core/util/subprocess.h - test/core/util/tracer_util.h src: - test/core/util/cmdline.cc @@ -9456,8 +9362,6 @@ targets: - test/core/util/passthru_endpoint.cc - test/core/util/resolve_localhost_ip46.cc - test/core/util/slice_splitter.cc - - test/core/util/subprocess_posix.cc - - test/core/util/subprocess_windows.cc - test/core/util/tracer_util.cc deps: - grpc_test_util @@ -9488,7 +9392,6 @@ targets: - test/core/util/passthru_endpoint.h - test/core/util/resolve_localhost_ip46.h - test/core/util/slice_splitter.h - - test/core/util/subprocess.h - test/core/util/tracer_util.h src: - test/core/transport/chttp2/hpack_encoder_test.cc @@ -9501,8 +9404,6 @@ targets: - test/core/util/passthru_endpoint.cc - test/core/util/resolve_localhost_ip46.cc - test/core/util/slice_splitter.cc - - test/core/util/subprocess_posix.cc - - test/core/util/subprocess_windows.cc - test/core/util/tracer_util.cc deps: - grpc_test_util @@ -9523,7 +9424,6 @@ targets: - test/core/util/passthru_endpoint.h - test/core/util/resolve_localhost_ip46.h - test/core/util/slice_splitter.h - - test/core/util/subprocess.h - test/core/util/tracer_util.h src: - test/core/transport/chttp2/hpack_parser_table_test.cc @@ -9536,8 +9436,6 @@ targets: - test/core/util/passthru_endpoint.cc - test/core/util/resolve_localhost_ip46.cc - test/core/util/slice_splitter.cc - - test/core/util/subprocess_posix.cc - - test/core/util/subprocess_windows.cc - test/core/util/tracer_util.cc deps: - grpc_test_util @@ -9558,7 +9456,6 @@ targets: - test/core/util/passthru_endpoint.h - test/core/util/resolve_localhost_ip46.h - test/core/util/slice_splitter.h - - test/core/util/subprocess.h - test/core/util/tracer_util.h src: - test/core/transport/chttp2/hpack_parser_test.cc @@ -9571,8 +9468,6 @@ targets: - test/core/util/passthru_endpoint.cc - test/core/util/resolve_localhost_ip46.cc - test/core/util/slice_splitter.cc - - test/core/util/subprocess_posix.cc - - test/core/util/subprocess_windows.cc - test/core/util/tracer_util.cc deps: - grpc_test_util @@ -9761,7 +9656,6 @@ targets: - test/core/util/passthru_endpoint.h - test/core/util/resolve_localhost_ip46.h - test/core/util/slice_splitter.h - - test/core/util/subprocess.h - test/core/util/tracer_util.h src: - test/core/security/insecure_security_connector_test.cc @@ -9774,8 +9668,6 @@ targets: - test/core/util/passthru_endpoint.cc - test/core/util/resolve_localhost_ip46.cc - test/core/util/slice_splitter.cc - - test/core/util/subprocess_posix.cc - - test/core/util/subprocess_windows.cc - test/core/util/tracer_util.cc deps: - grpc_test_util @@ -10037,7 +9929,6 @@ targets: - test/core/util/passthru_endpoint.h - test/core/util/resolve_localhost_ip46.h - test/core/util/slice_splitter.h - - test/core/util/subprocess.h - test/core/util/tracer_util.h src: - test/core/security/json_token_test.cc @@ -10050,8 +9941,6 @@ targets: - test/core/util/passthru_endpoint.cc - test/core/util/resolve_localhost_ip46.cc - test/core/util/slice_splitter.cc - - test/core/util/subprocess_posix.cc - - test/core/util/subprocess_windows.cc - test/core/util/tracer_util.cc deps: - grpc_test_util @@ -10072,7 +9961,6 @@ targets: - test/core/util/passthru_endpoint.h - test/core/util/resolve_localhost_ip46.h - test/core/util/slice_splitter.h - - test/core/util/subprocess.h - test/core/util/tracer_util.h src: - test/core/security/jwt_verifier_test.cc @@ -10085,8 +9973,6 @@ targets: - test/core/util/passthru_endpoint.cc - test/core/util/resolve_localhost_ip46.cc - test/core/util/slice_splitter.cc - - test/core/util/subprocess_posix.cc - - test/core/util/subprocess_windows.cc - test/core/util/tracer_util.cc deps: - grpc_test_util @@ -10431,7 +10317,6 @@ targets: - test/core/util/passthru_endpoint.h - test/core/util/resolve_localhost_ip46.h - test/core/util/slice_splitter.h - - test/core/util/subprocess.h - test/core/util/tracer_util.h src: - test/core/matchers/matchers_test.cc @@ -10444,8 +10329,6 @@ targets: - test/core/util/passthru_endpoint.cc - test/core/util/resolve_localhost_ip46.cc - test/core/util/slice_splitter.cc - - test/core/util/subprocess_posix.cc - - test/core/util/subprocess_windows.cc - test/core/util/tracer_util.cc deps: - grpc_test_util @@ -10644,7 +10527,6 @@ targets: - test/core/util/passthru_endpoint.h - test/core/util/resolve_localhost_ip46.h - test/core/util/slice_splitter.h - - test/core/util/subprocess.h - test/core/util/tracer_util.h src: - test/core/compression/message_compress_test.cc @@ -10657,8 +10539,6 @@ targets: - test/core/util/passthru_endpoint.cc - test/core/util/resolve_localhost_ip46.cc - test/core/util/slice_splitter.cc - - test/core/util/subprocess_posix.cc - - test/core/util/subprocess_windows.cc - test/core/util/tracer_util.cc deps: - grpc_test_util @@ -10688,7 +10568,6 @@ targets: - test/core/util/passthru_endpoint.h - test/core/util/resolve_localhost_ip46.h - test/core/util/slice_splitter.h - - test/core/util/subprocess.h - test/core/util/tracer_util.h src: - test/core/transport/metadata_map_test.cc @@ -10701,8 +10580,6 @@ targets: - test/core/util/passthru_endpoint.cc - test/core/util/resolve_localhost_ip46.cc - test/core/util/slice_splitter.cc - - test/core/util/subprocess_posix.cc - - test/core/util/subprocess_windows.cc - test/core/util/tracer_util.cc deps: - grpc_test_util @@ -11107,7 +10984,6 @@ targets: - test/core/util/passthru_endpoint.h - test/core/util/resolve_localhost_ip46.h - test/core/util/slice_splitter.h - - test/core/util/subprocess.h - test/core/util/tracer_util.h src: - test/core/end2end/data/client_certs.cc @@ -11124,8 +11000,6 @@ targets: - test/core/util/passthru_endpoint.cc - test/core/util/resolve_localhost_ip46.cc - test/core/util/slice_splitter.cc - - test/core/util/subprocess_posix.cc - - test/core/util/subprocess_windows.cc - test/core/util/tracer_util.cc deps: - grpc_test_util @@ -11265,7 +11139,6 @@ targets: - test/core/util/passthru_endpoint.h - test/core/util/resolve_localhost_ip46.h - test/core/util/slice_splitter.h - - test/core/util/subprocess.h - test/core/util/tracer_util.h src: - test/core/transport/pid_controller_test.cc @@ -11278,8 +11151,6 @@ targets: - test/core/util/passthru_endpoint.cc - test/core/util/resolve_localhost_ip46.cc - test/core/util/slice_splitter.cc - - test/core/util/subprocess_posix.cc - - test/core/util/subprocess_windows.cc - test/core/util/tracer_util.cc deps: - grpc_test_util @@ -11299,7 +11170,6 @@ targets: - test/core/util/passthru_endpoint.h - test/core/util/resolve_localhost_ip46.h - test/core/util/slice_splitter.h - - test/core/util/subprocess.h - test/core/util/tracer_util.h src: - test/core/transport/chttp2/ping_abuse_policy_test.cc @@ -11312,8 +11182,6 @@ targets: - test/core/util/passthru_endpoint.cc - test/core/util/resolve_localhost_ip46.cc - test/core/util/slice_splitter.cc - - test/core/util/subprocess_posix.cc - - test/core/util/subprocess_windows.cc - test/core/util/tracer_util.cc deps: - grpc_test_util @@ -11334,7 +11202,6 @@ targets: - test/core/util/passthru_endpoint.h - test/core/util/resolve_localhost_ip46.h - test/core/util/slice_splitter.h - - test/core/util/subprocess.h - test/core/util/tracer_util.h src: - test/core/transport/chttp2/ping_configuration_test.cc @@ -11347,8 +11214,6 @@ targets: - test/core/util/passthru_endpoint.cc - test/core/util/resolve_localhost_ip46.cc - test/core/util/slice_splitter.cc - - test/core/util/subprocess_posix.cc - - test/core/util/subprocess_windows.cc - test/core/util/tracer_util.cc deps: - grpc_test_util @@ -11404,7 +11269,6 @@ targets: - test/core/util/passthru_endpoint.h - test/core/util/resolve_localhost_ip46.h - test/core/util/slice_splitter.h - - test/core/util/subprocess.h - test/core/util/tracer_util.h src: - test/core/transport/chttp2/ping_rate_policy_test.cc @@ -11417,8 +11281,6 @@ targets: - test/core/util/passthru_endpoint.cc - test/core/util/resolve_localhost_ip46.cc - test/core/util/slice_splitter.cc - - test/core/util/subprocess_posix.cc - - test/core/util/subprocess_windows.cc - test/core/util/tracer_util.cc deps: - grpc_test_util @@ -11878,7 +11740,6 @@ targets: - test/core/util/passthru_endpoint.h - test/core/util/resolve_localhost_ip46.h - test/core/util/slice_splitter.h - - test/core/util/subprocess.h - test/core/util/tracer_util.h src: - test/core/security/rbac_translator_test.cc @@ -11891,8 +11752,6 @@ targets: - test/core/util/passthru_endpoint.cc - test/core/util/resolve_localhost_ip46.cc - test/core/util/slice_splitter.cc - - test/core/util/subprocess_posix.cc - - test/core/util/subprocess_windows.cc - test/core/util/tracer_util.cc deps: - grpc_authorization_provider @@ -12049,7 +11908,6 @@ targets: - test/core/util/passthru_endpoint.h - test/core/util/resolve_localhost_ip46.h - test/core/util/slice_splitter.h - - test/core/util/subprocess.h - test/core/util/tracer_util.h src: - test/core/iomgr/resolve_address_posix_test.cc @@ -12062,8 +11920,6 @@ targets: - test/core/util/passthru_endpoint.cc - test/core/util/resolve_localhost_ip46.cc - test/core/util/slice_splitter.cc - - test/core/util/subprocess_posix.cc - - test/core/util/subprocess_windows.cc - test/core/util/tracer_util.cc deps: - absl/flags:parse @@ -12091,7 +11947,6 @@ targets: - test/core/util/passthru_endpoint.h - test/core/util/resolve_localhost_ip46.h - test/core/util/slice_splitter.h - - test/core/util/subprocess.h - test/core/util/tracer_util.h src: - test/core/iomgr/resolve_address_test.cc @@ -12105,8 +11960,6 @@ targets: - test/core/util/passthru_endpoint.cc - test/core/util/resolve_localhost_ip46.cc - test/core/util/slice_splitter.cc - - test/core/util/subprocess_posix.cc - - test/core/util/subprocess_windows.cc - test/core/util/tracer_util.cc deps: - grpc_test_util @@ -12127,7 +11980,6 @@ targets: - test/core/util/passthru_endpoint.h - test/core/util/resolve_localhost_ip46.h - test/core/util/slice_splitter.h - - test/core/util/subprocess.h - test/core/util/tracer_util.h src: - test/core/iomgr/resolve_address_posix_test.cc @@ -12140,8 +11992,6 @@ targets: - test/core/util/passthru_endpoint.cc - test/core/util/resolve_localhost_ip46.cc - test/core/util/slice_splitter.cc - - test/core/util/subprocess_posix.cc - - test/core/util/subprocess_windows.cc - test/core/util/tracer_util.cc deps: - absl/flags:parse @@ -12169,7 +12019,6 @@ targets: - test/core/util/passthru_endpoint.h - test/core/util/resolve_localhost_ip46.h - test/core/util/slice_splitter.h - - test/core/util/subprocess.h - test/core/util/tracer_util.h src: - test/core/iomgr/resolve_address_test.cc @@ -12183,8 +12032,6 @@ targets: - test/core/util/passthru_endpoint.cc - test/core/util/resolve_localhost_ip46.cc - test/core/util/slice_splitter.cc - - test/core/util/subprocess_posix.cc - - test/core/util/subprocess_windows.cc - test/core/util/tracer_util.cc deps: - grpc_test_util @@ -13539,7 +13386,6 @@ targets: - test/core/util/passthru_endpoint.h - test/core/util/resolve_localhost_ip46.h - test/core/util/slice_splitter.h - - test/core/util/subprocess.h - test/core/util/tracer_util.h src: - test/core/iomgr/endpoint_tests.cc @@ -13553,8 +13399,6 @@ targets: - test/core/util/passthru_endpoint.cc - test/core/util/resolve_localhost_ip46.cc - test/core/util/slice_splitter.cc - - test/core/util/subprocess_posix.cc - - test/core/util/subprocess_windows.cc - test/core/util/tracer_util.cc deps: - grpc_test_util @@ -13574,7 +13418,6 @@ targets: - test/core/util/passthru_endpoint.h - test/core/util/resolve_localhost_ip46.h - test/core/util/slice_splitter.h - - test/core/util/subprocess.h - test/core/util/tracer_util.h src: - test/core/security/security_connector_test.cc @@ -13587,8 +13430,6 @@ targets: - test/core/util/passthru_endpoint.cc - test/core/util/resolve_localhost_ip46.cc - test/core/util/slice_splitter.cc - - test/core/util/subprocess_posix.cc - - test/core/util/subprocess_windows.cc - test/core/util/tracer_util.cc deps: - grpc_test_util @@ -13651,7 +13492,6 @@ targets: - test/core/util/passthru_endpoint.h - test/core/util/resolve_localhost_ip46.h - test/core/util/slice_splitter.h - - test/core/util/subprocess.h - test/core/util/tracer_util.h src: - src/proto/grpc/testing/echo.proto @@ -13667,8 +13507,6 @@ targets: - test/core/util/passthru_endpoint.cc - test/core/util/resolve_localhost_ip46.cc - test/core/util/slice_splitter.cc - - test/core/util/subprocess_posix.cc - - test/core/util/subprocess_windows.cc - test/core/util/tracer_util.cc - test/cpp/server/server_builder_test.cc deps: @@ -13694,7 +13532,6 @@ targets: - test/core/util/passthru_endpoint.h - test/core/util/resolve_localhost_ip46.h - test/core/util/slice_splitter.h - - test/core/util/subprocess.h - test/core/util/tracer_util.h src: - src/proto/grpc/testing/echo.proto @@ -13710,8 +13547,6 @@ targets: - test/core/util/passthru_endpoint.cc - test/core/util/resolve_localhost_ip46.cc - test/core/util/slice_splitter.cc - - test/core/util/subprocess_posix.cc - - test/core/util/subprocess_windows.cc - test/core/util/tracer_util.cc - test/cpp/server/server_builder_with_socket_mutator_test.cc deps: @@ -13854,7 +13689,6 @@ targets: - test/core/util/passthru_endpoint.h - test/core/util/resolve_localhost_ip46.h - test/core/util/slice_splitter.h - - test/core/util/subprocess.h - test/core/util/tracer_util.h src: - src/proto/grpc/testing/echo.proto @@ -13870,8 +13704,6 @@ targets: - test/core/util/passthru_endpoint.cc - test/core/util/resolve_localhost_ip46.cc - test/core/util/slice_splitter.cc - - test/core/util/subprocess_posix.cc - - test/core/util/subprocess_windows.cc - test/core/util/tracer_util.cc - test/cpp/server/server_request_call_test.cc deps: @@ -13981,7 +13813,6 @@ targets: - test/core/util/passthru_endpoint.h - test/core/util/resolve_localhost_ip46.h - test/core/util/slice_splitter.h - - test/core/util/subprocess.h - test/core/util/tracer_util.h src: - test/core/transport/chttp2/settings_timeout_test.cc @@ -13994,8 +13825,6 @@ targets: - test/core/util/passthru_endpoint.cc - test/core/util/resolve_localhost_ip46.cc - test/core/util/slice_splitter.cc - - test/core/util/subprocess_posix.cc - - test/core/util/subprocess_windows.cc - test/core/util/tracer_util.cc deps: - grpc_test_util @@ -14288,7 +14117,6 @@ targets: - test/core/util/passthru_endpoint.h - test/core/util/resolve_localhost_ip46.h - test/core/util/slice_splitter.h - - test/core/util/subprocess.h - test/core/util/tracer_util.h src: - test/core/iomgr/socket_utils_test.cc @@ -14301,8 +14129,6 @@ targets: - test/core/util/passthru_endpoint.cc - test/core/util/resolve_localhost_ip46.cc - test/core/util/slice_splitter.cc - - test/core/util/subprocess_posix.cc - - test/core/util/subprocess_windows.cc - test/core/util/tracer_util.cc deps: - grpc_test_util @@ -14347,7 +14173,6 @@ targets: - test/core/util/passthru_endpoint.h - test/core/util/resolve_localhost_ip46.h - test/core/util/slice_splitter.h - - test/core/util/subprocess.h - test/core/util/tracer_util.h src: - test/core/security/ssl_credentials_test.cc @@ -14360,8 +14185,6 @@ targets: - test/core/util/passthru_endpoint.cc - test/core/util/resolve_localhost_ip46.cc - test/core/util/slice_splitter.cc - - test/core/util/subprocess_posix.cc - - test/core/util/subprocess_windows.cc - test/core/util/tracer_util.cc deps: - grpc_test_util @@ -14456,7 +14279,6 @@ targets: - test/core/util/passthru_endpoint.h - test/core/util/resolve_localhost_ip46.h - test/core/util/slice_splitter.h - - test/core/util/subprocess.h - test/core/util/tracer_util.h src: - test/core/transport/status_conversion_test.cc @@ -14469,8 +14291,6 @@ targets: - test/core/util/passthru_endpoint.cc - test/core/util/resolve_localhost_ip46.cc - test/core/util/slice_splitter.cc - - test/core/util/subprocess_posix.cc - - test/core/util/subprocess_windows.cc - test/core/util/tracer_util.cc deps: - grpc_test_util @@ -14512,7 +14332,6 @@ targets: - test/core/util/passthru_endpoint.h - test/core/util/resolve_localhost_ip46.h - test/core/util/slice_splitter.h - - test/core/util/subprocess.h - test/core/util/tracer_util.h src: - test/core/end2end/cq_verifier.cc @@ -14526,8 +14345,6 @@ targets: - test/core/util/passthru_endpoint.cc - test/core/util/resolve_localhost_ip46.cc - test/core/util/slice_splitter.cc - - test/core/util/subprocess_posix.cc - - test/core/util/subprocess_windows.cc - test/core/util/tracer_util.cc deps: - grpc_test_util @@ -14614,7 +14431,6 @@ targets: - test/core/util/passthru_endpoint.h - test/core/util/resolve_localhost_ip46.h - test/core/util/slice_splitter.h - - test/core/util/subprocess.h - test/core/util/tracer_util.h src: - test/core/end2end/cq_verifier.cc @@ -14628,8 +14444,6 @@ targets: - test/core/util/passthru_endpoint.cc - test/core/util/resolve_localhost_ip46.cc - test/core/util/slice_splitter.cc - - test/core/util/subprocess_posix.cc - - test/core/util/subprocess_windows.cc - test/core/util/tracer_util.cc deps: - grpc_test_util @@ -14680,7 +14494,6 @@ targets: - test/core/util/passthru_endpoint.h - test/core/util/resolve_localhost_ip46.h - test/core/util/slice_splitter.h - - test/core/util/subprocess.h - test/core/util/tracer_util.h src: - test/core/security/system_roots_test.cc @@ -14693,8 +14506,6 @@ targets: - test/core/util/passthru_endpoint.cc - test/core/util/resolve_localhost_ip46.cc - test/core/util/slice_splitter.cc - - test/core/util/subprocess_posix.cc - - test/core/util/subprocess_windows.cc - test/core/util/tracer_util.cc deps: - grpc_test_util @@ -14731,7 +14542,6 @@ targets: - test/core/util/passthru_endpoint.h - test/core/util/resolve_localhost_ip46.h - test/core/util/slice_splitter.h - - test/core/util/subprocess.h - test/core/util/tracer_util.h src: - test/core/iomgr/tcp_client_posix_test.cc @@ -14744,8 +14554,6 @@ targets: - test/core/util/passthru_endpoint.cc - test/core/util/resolve_localhost_ip46.cc - test/core/util/slice_splitter.cc - - test/core/util/subprocess_posix.cc - - test/core/util/subprocess_windows.cc - test/core/util/tracer_util.cc deps: - grpc_test_util @@ -14784,7 +14592,6 @@ targets: - test/core/util/passthru_endpoint.h - test/core/util/resolve_localhost_ip46.h - test/core/util/slice_splitter.h - - test/core/util/subprocess.h - test/core/util/tracer_util.h src: - test/core/iomgr/endpoint_tests.cc @@ -14798,8 +14605,6 @@ targets: - test/core/util/passthru_endpoint.cc - test/core/util/resolve_localhost_ip46.cc - test/core/util/slice_splitter.cc - - test/core/util/subprocess_posix.cc - - test/core/util/subprocess_windows.cc - test/core/util/tracer_util.cc deps: - grpc_test_util @@ -14822,7 +14627,6 @@ targets: - test/core/util/passthru_endpoint.h - test/core/util/resolve_localhost_ip46.h - test/core/util/slice_splitter.h - - test/core/util/subprocess.h - test/core/util/tracer_util.h src: - test/core/iomgr/tcp_server_posix_test.cc @@ -14835,8 +14639,6 @@ targets: - test/core/util/passthru_endpoint.cc - test/core/util/resolve_localhost_ip46.cc - test/core/util/slice_splitter.cc - - test/core/util/subprocess_posix.cc - - test/core/util/subprocess_windows.cc - test/core/util/tracer_util.cc deps: - grpc_test_util @@ -15022,7 +14824,6 @@ targets: - test/core/util/passthru_endpoint.h - test/core/util/resolve_localhost_ip46.h - test/core/util/slice_splitter.h - - test/core/util/subprocess.h - test/core/util/tracer_util.h src: - test/core/iomgr/load_file_test.cc @@ -15035,8 +14836,6 @@ targets: - test/core/util/passthru_endpoint.cc - test/core/util/resolve_localhost_ip46.cc - test/core/util/slice_splitter.cc - - test/core/util/subprocess_posix.cc - - test/core/util/subprocess_windows.cc - test/core/util/tracer_util.cc deps: - grpc_test_util @@ -15057,7 +14856,6 @@ targets: - test/core/util/passthru_endpoint.h - test/core/util/resolve_localhost_ip46.h - test/core/util/slice_splitter.h - - test/core/util/subprocess.h - test/core/util/tracer_util.h src: - test/core/iomgr/timer_heap_test.cc @@ -15070,8 +14868,6 @@ targets: - test/core/util/passthru_endpoint.cc - test/core/util/resolve_localhost_ip46.cc - test/core/util/slice_splitter.cc - - test/core/util/subprocess_posix.cc - - test/core/util/subprocess_windows.cc - test/core/util/tracer_util.cc deps: - grpc_test_util @@ -15092,7 +14888,6 @@ targets: - test/core/util/passthru_endpoint.h - test/core/util/resolve_localhost_ip46.h - test/core/util/slice_splitter.h - - test/core/util/subprocess.h - test/core/util/tracer_util.h src: - test/core/security/credentials_test.cc @@ -15105,8 +14900,6 @@ targets: - test/core/util/passthru_endpoint.cc - test/core/util/resolve_localhost_ip46.cc - test/core/util/slice_splitter.cc - - test/core/util/subprocess_posix.cc - - test/core/util/subprocess_windows.cc - test/core/util/tracer_util.cc deps: - grpc_test_util @@ -15306,7 +15099,6 @@ targets: - test/core/util/passthru_endpoint.h - test/core/util/resolve_localhost_ip46.h - test/core/util/slice_splitter.h - - test/core/util/subprocess.h - test/core/util/tracer_util.h src: - test/core/transport/timeout_encoding_test.cc @@ -15319,8 +15111,6 @@ targets: - test/core/util/passthru_endpoint.cc - test/core/util/resolve_localhost_ip46.cc - test/core/util/slice_splitter.cc - - test/core/util/subprocess_posix.cc - - test/core/util/subprocess_windows.cc - test/core/util/tracer_util.cc deps: - grpc_test_util @@ -15387,7 +15177,6 @@ targets: - test/core/util/passthru_endpoint.h - test/core/util/resolve_localhost_ip46.h - test/core/util/slice_splitter.h - - test/core/util/subprocess.h - test/core/util/tracer_util.h src: - test/core/security/tls_security_connector_test.cc @@ -15400,8 +15189,6 @@ targets: - test/core/util/passthru_endpoint.cc - test/core/util/resolve_localhost_ip46.cc - test/core/util/slice_splitter.cc - - test/core/util/subprocess_posix.cc - - test/core/util/subprocess_windows.cc - test/core/util/tracer_util.cc deps: - grpc_test_util @@ -16112,7 +15899,6 @@ targets: - test/core/util/passthru_endpoint.h - test/core/util/resolve_localhost_ip46.h - test/core/util/slice_splitter.h - - test/core/util/subprocess.h - test/core/util/tracer_util.h src: - src/proto/grpc/testing/echo.proto @@ -16128,8 +15914,6 @@ targets: - test/core/util/passthru_endpoint.cc - test/core/util/resolve_localhost_ip46.cc - test/core/util/slice_splitter.cc - - test/core/util/subprocess_posix.cc - - test/core/util/subprocess_windows.cc - test/core/util/tracer_util.cc - test/cpp/performance/writes_per_rpc_test.cc deps: @@ -16471,7 +16255,6 @@ targets: - test/core/util/passthru_endpoint.h - test/core/util/resolve_localhost_ip46.h - test/core/util/slice_splitter.h - - test/core/util/subprocess.h - test/core/util/tracer_util.h src: - test/core/security/xds_credentials_test.cc @@ -16484,8 +16267,6 @@ targets: - test/core/util/passthru_endpoint.cc - test/core/util/resolve_localhost_ip46.cc - test/core/util/slice_splitter.cc - - test/core/util/subprocess_posix.cc - - test/core/util/subprocess_windows.cc - test/core/util/tracer_util.cc deps: - grpc_test_util diff --git a/grpc.gyp b/grpc.gyp index 4ac488d26ea..05ca749063c 100644 --- a/grpc.gyp +++ b/grpc.gyp @@ -1506,8 +1506,6 @@ 'test/core/util/passthru_endpoint.cc', 'test/core/util/resolve_localhost_ip46.cc', 'test/core/util/slice_splitter.cc', - 'test/core/util/subprocess_posix.cc', - 'test/core/util/subprocess_windows.cc', 'test/core/util/tracer_util.cc', 'test/cpp/microbenchmarks/helpers.cc', ], @@ -1648,6 +1646,8 @@ 'grpc_test_util', ], 'sources': [ + 'src/core/lib/gpr/subprocess_posix.cc', + 'src/core/lib/gpr/subprocess_windows.cc', 'test/core/end2end/data/client_certs.cc', 'test/core/end2end/data/server1_cert.cc', 'test/core/end2end/data/server1_key.cc', @@ -1661,8 +1661,6 @@ 'test/core/util/passthru_endpoint.cc', 'test/core/util/resolve_localhost_ip46.cc', 'test/core/util/slice_splitter.cc', - 'test/core/util/subprocess_posix.cc', - 'test/core/util/subprocess_windows.cc', 'test/core/util/tracer_util.cc', 'test/cpp/util/byte_buffer_proto_helper.cc', 'test/cpp/util/create_test_channel.cc', diff --git a/test/core/util/subprocess.h b/src/core/lib/gpr/subprocess.h similarity index 68% rename from test/core/util/subprocess.h rename to src/core/lib/gpr/subprocess.h index a46be258516..71d4796fde6 100644 --- a/test/core/util/subprocess.h +++ b/src/core/lib/gpr/subprocess.h @@ -16,17 +16,26 @@ // // -#ifndef GRPC_TEST_CORE_UTIL_SUBPROCESS_H -#define GRPC_TEST_CORE_UTIL_SUBPROCESS_H +#ifndef GRPC_SRC_CORE_LIB_GPR_SUBPROCESS_H +#define GRPC_SRC_CORE_LIB_GPR_SUBPROCESS_H #include +#include + typedef struct gpr_subprocess gpr_subprocess; /// .exe on windows, empty on unices const char* gpr_subprocess_binary_extension(); gpr_subprocess* gpr_subprocess_create(int argc, const char** argv); + +gpr_subprocess* gpr_subprocess_create_with_envp(int argc, const char** argv, + int envc, const char** envp); + +// communicate to the subprocess via stdin, stdout and stderr +bool gpr_subprocess_communicate(gpr_subprocess* p, std::string& input_data, + std::string* output_data, std::string* error); /// if subprocess has not been joined, kill it void gpr_subprocess_destroy(gpr_subprocess* p); /// returns exit status; can be called at most once @@ -34,4 +43,4 @@ int gpr_subprocess_join(gpr_subprocess* p); void gpr_subprocess_interrupt(gpr_subprocess* p); int gpr_subprocess_get_process_id(gpr_subprocess* p); -#endif // GRPC_TEST_CORE_UTIL_SUBPROCESS_H +#endif // GRPC_SRC_CORE_LIB_GPR_SUBPROCESS_H diff --git a/src/core/lib/gpr/subprocess_posix.cc b/src/core/lib/gpr/subprocess_posix.cc new file mode 100644 index 00000000000..5444bd82201 --- /dev/null +++ b/src/core/lib/gpr/subprocess_posix.cc @@ -0,0 +1,252 @@ +// +// +// Copyright 2015 gRPC authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// + +#include + +#ifdef GPR_POSIX_SUBPROCESS + +#include +#include +#include +#include +#include + +#include + +#include "absl/strings/substitute.h" + +#include +#include + +#include "src/core/lib/gpr/subprocess.h" +#include "src/core/lib/gprpp/memory.h" +#include "src/core/lib/gprpp/strerror.h" + +struct gpr_subprocess { + int pid; + bool joined; + int child_stdin_; + int child_stdout_; +}; + +const char* gpr_subprocess_binary_extension() { return ""; } + +gpr_subprocess* gpr_subprocess_create(int argc, const char** argv) { + gpr_subprocess* r; + int pid; + char** exec_args; + pid = fork(); + if (pid == -1) { + return nullptr; + } else if (pid == 0) { + exec_args = static_cast( + gpr_malloc((static_cast(argc) + 1) * sizeof(char*))); + memcpy(exec_args, argv, static_cast(argc) * sizeof(char*)); + exec_args[argc] = nullptr; + execv(exec_args[0], exec_args); + // if we reach here, an error has occurred + gpr_log(GPR_ERROR, "execv '%s' failed: %s", exec_args[0], + grpc_core::StrError(errno).c_str()); + _exit(1); + } else { + r = grpc_core::Zalloc(); + r->pid = pid; + r->child_stdin_ = -1; + r->child_stdout_ = -1; + return r; + } +} + +gpr_subprocess* gpr_subprocess_create_with_envp(int argc, const char** argv, + int envc, const char** envp) { + gpr_subprocess* r; + int pid; + char **exec_args, **envp_args; + int stdin_pipe[2]; + int stdout_pipe[2]; + int p0 = pipe(stdin_pipe); + int p1 = pipe(stdout_pipe); + GPR_ASSERT(p0 != -1); + GPR_ASSERT(p1 != -1); + pid = fork(); + if (pid == -1) { + return nullptr; + } else if (pid == 0) { + dup2(stdin_pipe[0], STDIN_FILENO); + dup2(stdout_pipe[1], STDOUT_FILENO); + close(stdin_pipe[0]); + close(stdin_pipe[1]); + close(stdout_pipe[0]); + close(stdout_pipe[1]); + exec_args = static_cast( + gpr_malloc((static_cast(argc) + 1) * sizeof(char*))); + memcpy(exec_args, argv, static_cast(argc) * sizeof(char*)); + exec_args[argc] = nullptr; + envp_args = static_cast( + gpr_malloc((static_cast(envc) + 1) * sizeof(char*))); + memcpy(envp_args, envp, static_cast(envc) * sizeof(char*)); + envp_args[envc] = nullptr; + execve(exec_args[0], exec_args, envp_args); + // if we reach here, an error has occurred + gpr_log(GPR_ERROR, "execvpe '%s' failed: %s", exec_args[0], + grpc_core::StrError(errno).c_str()); + _exit(1); + } else { + r = grpc_core::Zalloc(); + r->pid = pid; + close(stdin_pipe[0]); + close(stdout_pipe[1]); + r->child_stdin_ = stdin_pipe[1]; + r->child_stdout_ = stdout_pipe[0]; + return r; + } +} + +bool gpr_subprocess_communicate(gpr_subprocess* p, std::string& input_data, + std::string* output_data, std::string* error) { + typedef void SignalHandler(int); + + // Make sure SIGPIPE is disabled so that if the child dies it doesn't kill us. + SignalHandler* old_pipe_handler = signal(SIGPIPE, SIG_IGN); + + int input_pos = 0; + int max_fd = std::max(p->child_stdin_, p->child_stdout_); + + while (p->child_stdout_ != -1) { + fd_set read_fds; + fd_set write_fds; + FD_ZERO(&read_fds); + FD_ZERO(&write_fds); + if (p->child_stdout_ != -1) { + FD_SET(p->child_stdout_, &read_fds); + } + if (p->child_stdin_ != -1) { + FD_SET(p->child_stdin_, &write_fds); + } + + if (select(max_fd + 1, &read_fds, &write_fds, nullptr, nullptr) < 0) { + if (errno == EINTR) { + // Interrupted by signal. Try again. + continue; + } else { + std::cerr << "select: " << strerror(errno) << std::endl; + GPR_ASSERT(0); + } + } + + if (p->child_stdin_ != -1 && FD_ISSET(p->child_stdin_, &write_fds)) { + int n = write(p->child_stdin_, input_data.data() + input_pos, + input_data.size() - input_pos); + if (n < 0) { + // Child closed pipe. Presumably it will report an error later. + // Pretend we're done for now. + input_pos = input_data.size(); + } else { + input_pos += n; + } + + if (input_pos == static_cast(input_data.size())) { + // We're done writing. Close. + close(p->child_stdin_); + p->child_stdin_ = -1; + } + } + + if (p->child_stdout_ != -1 && FD_ISSET(p->child_stdout_, &read_fds)) { + char buffer[4096]; + int n = read(p->child_stdout_, buffer, sizeof(buffer)); + + if (n > 0) { + output_data->append(buffer, static_cast(n)); + } else { + // We're done reading. Close. + close(p->child_stdout_); + p->child_stdout_ = -1; + } + } + } + + if (p->child_stdin_ != -1) { + // Child did not finish reading input before it closed the output. + // Presumably it exited with an error. + close(p->child_stdin_); + p->child_stdin_ = -1; + } + + int status; + while (waitpid(p->pid, &status, 0) == -1) { + if (errno != EINTR) { + std::cerr << "waitpid: " << strerror(errno) << std::endl; + GPR_ASSERT(0); + } + } + + // Restore SIGPIPE handling. + signal(SIGPIPE, old_pipe_handler); + + if (WIFEXITED(status)) { + if (WEXITSTATUS(status) != 0) { + int error_code = WEXITSTATUS(status); + *error = + absl::Substitute("Plugin failed with status code $0.", error_code); + return false; + } + } else if (WIFSIGNALED(status)) { + int signal = WTERMSIG(status); + *error = absl::Substitute("Plugin killed by signal $0.", signal); + return false; + } else { + *error = "Neither WEXITSTATUS nor WTERMSIG is true?"; + return false; + } + + return true; +} + +void gpr_subprocess_destroy(gpr_subprocess* p) { + if (!p->joined) { + kill(p->pid, SIGKILL); + gpr_subprocess_join(p); + } + gpr_free(p); +} + +int gpr_subprocess_join(gpr_subprocess* p) { + int status; +retry: + if (waitpid(p->pid, &status, 0) == -1) { + if (errno == EINTR) { + goto retry; + } + gpr_log(GPR_ERROR, "waitpid failed for pid %d: %s", p->pid, + grpc_core::StrError(errno).c_str()); + return -1; + } + p->joined = true; + return status; +} + +void gpr_subprocess_interrupt(gpr_subprocess* p) { + if (!p->joined) { + kill(p->pid, SIGINT); + } +} + +int gpr_subprocess_get_process_id(gpr_subprocess* p) { return p->pid; } + +#endif // GPR_POSIX_SUBPROCESS diff --git a/test/core/util/subprocess_windows.cc b/src/core/lib/gpr/subprocess_windows.cc similarity index 98% rename from test/core/util/subprocess_windows.cc rename to src/core/lib/gpr/subprocess_windows.cc index b639b3ef737..3efadd2a9b0 100644 --- a/test/core/util/subprocess_windows.cc +++ b/src/core/lib/gpr/subprocess_windows.cc @@ -31,9 +31,9 @@ #include #include "src/core/lib/gpr/string.h" +#include "src/core/lib/gpr/subprocess.h" #include "src/core/lib/gprpp/crash.h" #include "src/core/lib/gprpp/tchar.h" -#include "test/core/util/subprocess.h" struct gpr_subprocess { PROCESS_INFORMATION pi; diff --git a/test/core/bad_ssl/bad_ssl_test.cc b/test/core/bad_ssl/bad_ssl_test.cc index 51d5a95b63f..5faa7b7bc5a 100644 --- a/test/core/bad_ssl/bad_ssl_test.cc +++ b/test/core/bad_ssl/bad_ssl_test.cc @@ -32,11 +32,11 @@ #include #include +#include "src/core/lib/gpr/subprocess.h" #include "src/core/lib/gprpp/env.h" #include "src/core/lib/gprpp/host_port.h" #include "test/core/end2end/cq_verifier.h" #include "test/core/util/port.h" -#include "test/core/util/subprocess.h" #include "test/core/util/test_config.h" static void run_test(const char* target, size_t nops) { diff --git a/test/core/bad_ssl/generate_tests.bzl b/test/core/bad_ssl/generate_tests.bzl index f2f3fcab93e..ecce282765a 100755 --- a/test/core/bad_ssl/generate_tests.bzl +++ b/test/core/bad_ssl/generate_tests.bzl @@ -61,6 +61,7 @@ def grpc_bad_ssl_tests(): "//test/core/util:grpc_test_util_base", "//:gpr", "//:grpc", + "//:subprocess", "//test/core/end2end:cq_verifier", ], tags = ["no_windows"], diff --git a/test/core/event_engine/test_suite/tests/BUILD b/test/core/event_engine/test_suite/tests/BUILD index ef297860a97..4c187e2c5d4 100644 --- a/test/core/event_engine/test_suite/tests/BUILD +++ b/test/core/event_engine/test_suite/tests/BUILD @@ -68,6 +68,7 @@ grpc_cc_library( "address_sorting", ], deps = [ + "//:subprocess", "//src/core:env", "//test/core/event_engine:event_engine_test_utils", "//test/core/event_engine/test_suite:event_engine_test_framework", diff --git a/test/core/http/BUILD b/test/core/http/BUILD index 965a7a84ca9..2495cfb1cbd 100644 --- a/test/core/http/BUILD +++ b/test/core/http/BUILD @@ -68,6 +68,7 @@ grpc_cc_library( hdrs = ["httpcli_test_util.h"], deps = [ "//:gpr", + "//:subprocess", "//test/core/end2end:ssl_test_data", "//test/core/util:grpc_test_util", "//test/core/util:grpc_test_util_base", @@ -90,6 +91,7 @@ grpc_cc_test( ":httpcli_test_util", "//:gpr", "//:grpc", + "//:subprocess", "//test/core/end2end:ssl_test_data", "//test/core/util:fake_udp_and_tcp_server", "//test/core/util:grpc_test_util", @@ -103,6 +105,7 @@ grpc_cc_test( data = [ "python_wrapper.sh", "test_server.py", + "//:subprocess", "//src/core/tsi/test_creds:ca.pem", "//src/core/tsi/test_creds:server1.key", "//src/core/tsi/test_creds:server1.pem", diff --git a/test/core/http/httpcli_test.cc b/test/core/http/httpcli_test.cc index 519e7fd3aaf..98fc2c934fd 100644 --- a/test/core/http/httpcli_test.cc +++ b/test/core/http/httpcli_test.cc @@ -44,6 +44,7 @@ #include #include "src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.h" +#include "src/core/lib/gpr/subprocess.h" #include "src/core/lib/gprpp/status_helper.h" #include "src/core/lib/gprpp/time.h" #include "src/core/lib/gprpp/time_util.h" @@ -53,7 +54,6 @@ #include "test/core/http/httpcli_test_util.h" #include "test/core/util/fake_udp_and_tcp_server.h" #include "test/core/util/port.h" -#include "test/core/util/subprocess.h" #include "test/core/util/test_config.h" namespace { diff --git a/test/core/http/httpcli_test_util.cc b/test/core/http/httpcli_test_util.cc index 763413cc373..5381fb03dd3 100644 --- a/test/core/http/httpcli_test_util.cc +++ b/test/core/http/httpcli_test_util.cc @@ -32,8 +32,8 @@ #include #include "src/core/lib/config/config_vars.h" +#include "src/core/lib/gpr/subprocess.h" #include "test/core/util/port.h" -#include "test/core/util/subprocess.h" namespace grpc_core { namespace testing { diff --git a/test/core/http/httpcli_test_util.h b/test/core/http/httpcli_test_util.h index e1ecebe7926..6007a4be203 100644 --- a/test/core/http/httpcli_test_util.h +++ b/test/core/http/httpcli_test_util.h @@ -19,7 +19,7 @@ #include -#include "test/core/util/subprocess.h" +#include "src/core/lib/gpr/subprocess.h" namespace grpc_core { namespace testing { diff --git a/test/core/http/httpscli_test.cc b/test/core/http/httpscli_test.cc index 281ccda4269..35da8634f7e 100644 --- a/test/core/http/httpscli_test.cc +++ b/test/core/http/httpscli_test.cc @@ -42,6 +42,7 @@ #include #include "src/core/lib/channel/channel_args.h" +#include "src/core/lib/gpr/subprocess.h" #include "src/core/lib/gprpp/orphanable.h" #include "src/core/lib/gprpp/status_helper.h" #include "src/core/lib/gprpp/sync.h" @@ -60,7 +61,6 @@ #include "src/core/lib/uri/uri_parser.h" #include "test/core/http/httpcli_test_util.h" #include "test/core/util/fake_udp_and_tcp_server.h" -#include "test/core/util/subprocess.h" #include "test/core/util/test_config.h" namespace { diff --git a/test/core/memory_usage/BUILD b/test/core/memory_usage/BUILD index 41aab426c18..cfc2880b688 100644 --- a/test/core/memory_usage/BUILD +++ b/test/core/memory_usage/BUILD @@ -159,6 +159,7 @@ grpc_cc_test( deps = [ "//:gpr", "//:grpc", + "//:subprocess", "//test/core/util:grpc_test_util", "//test/core/util:grpc_test_util_base", ], @@ -178,6 +179,7 @@ grpc_cc_binary( deps = [ "//:gpr", "//:grpc", + "//:subprocess", "//test/core/util:grpc_test_util", "//test/core/util:grpc_test_util_base", ], diff --git a/test/core/memory_usage/memory_usage_test.cc b/test/core/memory_usage/memory_usage_test.cc index 671539654be..0c2c9ee2b73 100644 --- a/test/core/memory_usage/memory_usage_test.cc +++ b/test/core/memory_usage/memory_usage_test.cc @@ -37,9 +37,9 @@ #include #include "src/core/lib/config/config_vars.h" +#include "src/core/lib/gpr/subprocess.h" #include "src/core/lib/gprpp/host_port.h" #include "test/core/util/port.h" -#include "test/core/util/subprocess.h" #include "test/core/util/test_config.h" ABSL_FLAG(std::string, benchmark_names, "call,channel", diff --git a/test/core/util/BUILD b/test/core/util/BUILD index 2b88fd11f58..e520da58a06 100644 --- a/test/core/util/BUILD +++ b/test/core/util/BUILD @@ -59,8 +59,6 @@ grpc_cc_library( "passthru_endpoint.cc", "resolve_localhost_ip46.cc", "slice_splitter.cc", - "subprocess_posix.cc", - "subprocess_windows.cc", "tracer_util.cc", ], hdrs = [ @@ -75,7 +73,6 @@ grpc_cc_library( "passthru_endpoint.h", "resolve_localhost_ip46.h", "slice_splitter.h", - "subprocess.h", "tracer_util.h", ], external_deps = [ diff --git a/test/core/util/subprocess_posix.cc b/test/core/util/subprocess_posix.cc deleted file mode 100644 index 1b97df0d26d..00000000000 --- a/test/core/util/subprocess_posix.cc +++ /dev/null @@ -1,101 +0,0 @@ -// -// -// Copyright 2015 gRPC authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// - -#include - -#include - -#ifdef GPR_POSIX_SUBPROCESS - -#include -#include -#include -#include -#include - -#include -#include - -#include "src/core/lib/gprpp/memory.h" -#include "src/core/lib/gprpp/strerror.h" -#include "test/core/util/subprocess.h" - -struct gpr_subprocess { - int pid; - bool joined; -}; - -const char* gpr_subprocess_binary_extension() { return ""; } - -gpr_subprocess* gpr_subprocess_create(int argc, const char** argv) { - gpr_subprocess* r; - int pid; - char** exec_args; - - pid = fork(); - if (pid == -1) { - return nullptr; - } else if (pid == 0) { - exec_args = static_cast( - gpr_malloc((static_cast(argc) + 1) * sizeof(char*))); - memcpy(exec_args, argv, static_cast(argc) * sizeof(char*)); - exec_args[argc] = nullptr; - execv(exec_args[0], exec_args); - // if we reach here, an error has occurred - gpr_log(GPR_ERROR, "execv '%s' failed: %s", exec_args[0], - grpc_core::StrError(errno).c_str()); - _exit(1); - } else { - r = grpc_core::Zalloc(); - r->pid = pid; - return r; - } -} - -void gpr_subprocess_destroy(gpr_subprocess* p) { - if (!p->joined) { - kill(p->pid, SIGKILL); - gpr_subprocess_join(p); - } - gpr_free(p); -} - -int gpr_subprocess_join(gpr_subprocess* p) { - int status; -retry: - if (waitpid(p->pid, &status, 0) == -1) { - if (errno == EINTR) { - goto retry; - } - gpr_log(GPR_ERROR, "waitpid failed for pid %d: %s", p->pid, - grpc_core::StrError(errno).c_str()); - return -1; - } - p->joined = true; - return status; -} - -void gpr_subprocess_interrupt(gpr_subprocess* p) { - if (!p->joined) { - kill(p->pid, SIGINT); - } -} - -int gpr_subprocess_get_process_id(gpr_subprocess* p) { return p->pid; } - -#endif // GPR_POSIX_SUBPROCESS diff --git a/test/cpp/util/BUILD b/test/cpp/util/BUILD index d8aed93aa50..e4b98dc1ec2 100644 --- a/test/cpp/util/BUILD +++ b/test/cpp/util/BUILD @@ -80,6 +80,7 @@ grpc_cc_library( ], deps = [ "//:grpc++", + "//:subprocess", "//test/core/end2end:ssl_test_data", "//test/core/util:grpc_test_util", "//test/core/util:grpc_test_util_base", @@ -114,6 +115,7 @@ grpc_cc_library( ], deps = [ "//:grpc++_unsecure", + "//:subprocess", "//test/core/util:grpc_test_util_base", "//test/core/util:grpc_test_util_unsecure", ], diff --git a/test/cpp/util/subprocess.cc b/test/cpp/util/subprocess.cc index 1cd7fbd44a4..2f0c9cd03b2 100644 --- a/test/cpp/util/subprocess.cc +++ b/test/cpp/util/subprocess.cc @@ -20,7 +20,7 @@ #include -#include "test/core/util/subprocess.h" +#include "src/core/lib/gpr/subprocess.h" namespace grpc {