From b8605a424eef95aa2ff512720d8f9b6a1822996d Mon Sep 17 00:00:00 2001 From: Craig Tiller <ctiller@google.com> Date: Sat, 27 Aug 2022 08:37:31 -0700 Subject: [PATCH] [iwyu] Add test/core/transport (#30288) * [iwyu] Add test/core/transport * Automated change: Fix sanity tests * Automated change: Fix sanity tests * Automated change: Fix sanity tests Co-authored-by: ctiller <ctiller@users.noreply.github.com> --- test/core/transport/bdp_estimator_test.cc | 12 +++--- test/core/transport/chttp2/alpn_test.cc | 4 +- .../core/transport/chttp2/bin_decoder_test.cc | 5 +-- .../transport/chttp2/context_list_test.cc | 16 +++++-- .../transport/chttp2/flow_control_fuzzer.cc | 28 +++++++++++++ .../transport/chttp2/flow_control_test.cc | 5 ++- .../chttp2/graceful_shutdown_test.cc | 37 ++++++++++------ .../transport/chttp2/hpack_encoder_test.cc | 22 +++++----- .../chttp2/hpack_parser_fuzzer_test.cc | 14 +++++-- .../chttp2/hpack_parser_table_test.cc | 12 ++---- .../transport/chttp2/hpack_parser_test.cc | 15 ++++++- .../remove_stream_from_stalled_lists_test.cc | 17 +++++--- .../transport/chttp2/settings_timeout_test.cc | 21 +++++++++- test/core/transport/chttp2/stream_map_test.cc | 2 +- .../transport/chttp2/streams_not_seen_test.cc | 42 +++++++++++++++++-- .../transport/chttp2/too_many_pings_test.cc | 39 +++++++++-------- test/core/transport/chttp2/varint_test.cc | 5 ++- .../core/transport/connectivity_state_test.cc | 7 +--- test/core/transport/error_utils_test.cc | 6 ++- test/core/transport/metadata_map_test.cc | 17 +++++++- test/core/transport/parsed_metadata_test.cc | 11 +++-- test/core/transport/pid_controller_test.cc | 8 +--- test/core/transport/status_conversion_test.cc | 4 +- test/core/transport/timeout_encoding_test.cc | 13 +----- tools/dockerfile/grpc_iwyu/iwyu.sh | 2 + 25 files changed, 248 insertions(+), 116 deletions(-) diff --git a/test/core/transport/bdp_estimator_test.cc b/test/core/transport/bdp_estimator_test.cc index 81ba915dff6..93dbe1d7d4d 100644 --- a/test/core/transport/bdp_estimator_test.cc +++ b/test/core/transport/bdp_estimator_test.cc @@ -18,17 +18,15 @@ #include "src/core/lib/transport/bdp_estimator.h" -#include <limits.h> +#include <stdlib.h> -#include <gtest/gtest.h> +#include <algorithm> + +#include "gtest/gtest.h" #include <grpc/grpc.h> -#include <grpc/support/alloc.h> -#include <grpc/support/log.h> -#include <grpc/support/string_util.h> -#include "src/core/lib/gpr/string.h" -#include "src/core/lib/gpr/useful.h" +#include "src/core/lib/gprpp/sync.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/iomgr/timer_manager.h" #include "test/core/util/test_config.h" diff --git a/test/core/transport/chttp2/alpn_test.cc b/test/core/transport/chttp2/alpn_test.cc index d5afeb4420b..3f6e08c48a2 100644 --- a/test/core/transport/chttp2/alpn_test.cc +++ b/test/core/transport/chttp2/alpn_test.cc @@ -18,9 +18,7 @@ #include "src/core/ext/transport/chttp2/alpn/alpn.h" -#include <gtest/gtest.h> - -#include <grpc/support/log.h> +#include "gtest/gtest.h" #include "test/core/util/test_config.h" diff --git a/test/core/transport/chttp2/bin_decoder_test.cc b/test/core/transport/chttp2/bin_decoder_test.cc index 0280d9bb21d..5640b56da02 100644 --- a/test/core/transport/chttp2/bin_decoder_test.cc +++ b/test/core/transport/chttp2/bin_decoder_test.cc @@ -20,16 +20,15 @@ #include <string.h> -#include <gtest/gtest.h> +#include "gtest/gtest.h" -#include <grpc/grpc.h> #include <grpc/support/alloc.h> #include <grpc/support/log.h> #include "src/core/ext/transport/chttp2/transport/bin_encoder.h" #include "src/core/lib/gpr/string.h" #include "src/core/lib/iomgr/exec_ctx.h" -#include "src/core/lib/slice/slice_internal.h" +#include "src/core/lib/slice/slice_refcount.h" #include "src/core/lib/slice/slice_string_helpers.h" #include "test/core/util/test_config.h" diff --git a/test/core/transport/chttp2/context_list_test.cc b/test/core/transport/chttp2/context_list_test.cc index 16ddb0cd314..eba3ae8504f 100644 --- a/test/core/transport/chttp2/context_list_test.cc +++ b/test/core/transport/chttp2/context_list_test.cc @@ -18,18 +18,26 @@ #include "src/core/ext/transport/chttp2/transport/context_list.h" -#include <new> +#include <stdint.h> + +#include <algorithm> #include <vector> -#include <gtest/gtest.h> +#include "gtest/gtest.h" #include <grpc/grpc.h> +#include <grpc/slice.h> +#include <grpc/support/alloc.h> +#include <grpc/support/atm.h> #include "src/core/ext/transport/chttp2/transport/chttp2_transport.h" #include "src/core/ext/transport/chttp2/transport/internal.h" -#include "src/core/lib/iomgr/port.h" -#include "src/core/lib/resource_quota/api.h" +#include "src/core/lib/channel/channel_args_preconditioning.h" +#include "src/core/lib/config/core_configuration.h" +#include "src/core/lib/iomgr/endpoint.h" +#include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/transport/transport.h" +#include "src/core/lib/transport/transport_fwd.h" #include "test/core/util/mock_endpoint.h" #include "test/core/util/test_config.h" diff --git a/test/core/transport/chttp2/flow_control_fuzzer.cc b/test/core/transport/chttp2/flow_control_fuzzer.cc index 013577b407f..e108e8ccc44 100644 --- a/test/core/transport/chttp2/flow_control_fuzzer.cc +++ b/test/core/transport/chttp2/flow_control_fuzzer.cc @@ -12,13 +12,41 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include <inttypes.h> +#include <stdio.h> +#include <stdlib.h> + +#include <algorithm> +#include <cstdint> +#include <deque> +#include <functional> #include <limits> +#include <map> +#include <memory> #include <queue> +#include <string> +#include <utility> +#include <vector> + +#include <google/protobuf/repeated_ptr_field.h> + +#include "absl/base/attributes.h" +#include "absl/memory/memory.h" +#include "absl/status/status.h" +#include "absl/types/optional.h" +#include "absl/utility/utility.h" +#include <grpc/event_engine/memory_request.h> #include <grpc/grpc.h> +#include <grpc/support/log.h> +#include <grpc/support/time.h> #include "src/core/ext/transport/chttp2/transport/flow_control.h" +#include "src/core/lib/gpr/useful.h" +#include "src/core/lib/gprpp/time.h" #include "src/core/lib/iomgr/exec_ctx.h" +#include "src/core/lib/resource_quota/memory_quota.h" +#include "src/core/lib/transport/bdp_estimator.h" #include "src/libfuzzer/libfuzzer_macro.h" #include "test/core/transport/chttp2/flow_control_fuzzer.pb.h" diff --git a/test/core/transport/chttp2/flow_control_test.cc b/test/core/transport/chttp2/flow_control_test.cc index a80ac3011da..a4af318bc41 100644 --- a/test/core/transport/chttp2/flow_control_test.cc +++ b/test/core/transport/chttp2/flow_control_test.cc @@ -14,8 +14,11 @@ #include "src/core/ext/transport/chttp2/transport/flow_control.h" -#include <gtest/gtest.h> +#include <memory> +#include "gtest/gtest.h" + +#include "src/core/lib/gprpp/ref_counted_ptr.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/resource_quota/resource_quota.h" diff --git a/test/core/transport/chttp2/graceful_shutdown_test.cc b/test/core/transport/chttp2/graceful_shutdown_test.cc index 629d5a62ae5..4dfae2aa7f8 100644 --- a/test/core/transport/chttp2/graceful_shutdown_test.cc +++ b/test/core/transport/chttp2/graceful_shutdown_test.cc @@ -19,37 +19,50 @@ #include <grpc/support/port_platform.h> #include <limits.h> +#include <stdint.h> #include <stdlib.h> #include <string.h> +#include <atomic> #include <memory> +#include <string> #include <thread> -#include <gmock/gmock.h> - +#include "absl/base/thread_annotations.h" #include "absl/memory/memory.h" -#include "absl/synchronization/mutex.h" +#include "absl/status/status.h" +#include "absl/strings/match.h" +#include "absl/strings/str_cat.h" +#include "absl/strings/string_view.h" #include "absl/synchronization/notification.h" +#include "absl/time/clock.h" +#include "absl/time/time.h" +#include "gtest/gtest.h" #include <grpc/grpc.h> -#include <grpc/grpc_posix.h> -#include <grpc/grpc_security.h> +#include <grpc/slice.h> +#include <grpc/slice_buffer.h> +#include <grpc/status.h> +#include <grpc/support/log.h> #include "src/core/ext/transport/chttp2/transport/chttp2_transport.h" #include "src/core/ext/transport/chttp2/transport/frame_goaway.h" #include "src/core/ext/transport/chttp2/transport/frame_ping.h" -#include "src/core/lib/channel/channel_stack_builder.h" -#include "src/core/lib/config/core_configuration.h" -#include "src/core/lib/gprpp/host_port.h" +#include "src/core/lib/channel/channel_args.h" +#include "src/core/lib/channel/channelz.h" +#include "src/core/lib/gpr/useful.h" +#include "src/core/lib/gprpp/sync.h" +#include "src/core/lib/iomgr/closure.h" +#include "src/core/lib/iomgr/endpoint.h" #include "src/core/lib/iomgr/endpoint_pair.h" +#include "src/core/lib/iomgr/error.h" +#include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/slice/slice.h" -#include "src/core/lib/slice/slice_string_helpers.h" -#include "src/core/lib/surface/channel.h" +#include "src/core/lib/slice/slice_internal.h" +#include "src/core/lib/surface/completion_queue.h" #include "src/core/lib/surface/server.h" #include "test/core/end2end/cq_verifier.h" -#include "test/core/util/port.h" #include "test/core/util/test_config.h" -#include "test/core/util/test_tcp_server.h" namespace grpc_core { namespace { diff --git a/test/core/transport/chttp2/hpack_encoder_test.cc b/test/core/transport/chttp2/hpack_encoder_test.cc index d41a319486d..76b39f4b6ba 100644 --- a/test/core/transport/chttp2/hpack_encoder_test.cc +++ b/test/core/transport/chttp2/hpack_encoder_test.cc @@ -18,27 +18,27 @@ #include "src/core/ext/transport/chttp2/transport/hpack_encoder.h" -#include <stdio.h> +#include <stdlib.h> #include <string.h> #include <memory> #include <string> -#include <gmock/gmock.h> -#include <gtest/gtest.h> +#include "gmock/gmock.h" +#include "gtest/gtest.h" -#include "absl/strings/str_cat.h" -#include "absl/strings/str_format.h" - -#include <grpc/grpc.h> -#include <grpc/support/alloc.h> +#include <grpc/event_engine/memory_allocator.h> +#include <grpc/slice_buffer.h> #include <grpc/support/log.h> -#include "src/core/ext/transport/chttp2/transport/hpack_parser.h" -#include "src/core/lib/gpr/string.h" +#include "src/core/ext/transport/chttp2/transport/frame.h" +#include "src/core/lib/gprpp/ref_counted_ptr.h" +#include "src/core/lib/iomgr/exec_ctx.h" +#include "src/core/lib/resource_quota/arena.h" +#include "src/core/lib/resource_quota/memory_quota.h" #include "src/core/lib/resource_quota/resource_quota.h" #include "src/core/lib/slice/slice_internal.h" -#include "src/core/lib/slice/slice_string_helpers.h" +#include "src/core/lib/slice/slice_refcount.h" #include "test/core/util/parse_hexstring.h" #include "test/core/util/slice_splitter.h" #include "test/core/util/test_config.h" diff --git a/test/core/transport/chttp2/hpack_parser_fuzzer_test.cc b/test/core/transport/chttp2/hpack_parser_fuzzer_test.cc index 63aab2fbab6..e4e369a08db 100644 --- a/test/core/transport/chttp2/hpack_parser_fuzzer_test.cc +++ b/test/core/transport/chttp2/hpack_parser_fuzzer_test.cc @@ -16,17 +16,25 @@ * */ -#include <stdint.h> -#include <string.h> +#include <algorithm> +#include <memory> +#include <string> + +#include <google/protobuf/repeated_ptr_field.h> #include <grpc/grpc.h> -#include <grpc/support/alloc.h> +#include <grpc/slice.h> #include <grpc/support/log.h> #include "src/core/ext/transport/chttp2/transport/hpack_parser.h" +#include "src/core/lib/gprpp/ref_counted_ptr.h" +#include "src/core/lib/iomgr/error.h" #include "src/core/lib/iomgr/exec_ctx.h" +#include "src/core/lib/resource_quota/arena.h" +#include "src/core/lib/resource_quota/memory_quota.h" #include "src/core/lib/resource_quota/resource_quota.h" #include "src/core/lib/slice/slice_internal.h" +#include "src/core/lib/transport/metadata_batch.h" #include "src/libfuzzer/libfuzzer_macro.h" #include "test/core/transport/chttp2/hpack_parser_fuzzer.pb.h" diff --git a/test/core/transport/chttp2/hpack_parser_table_test.cc b/test/core/transport/chttp2/hpack_parser_table_test.cc index 400967c76d9..e81865b94ad 100644 --- a/test/core/transport/chttp2/hpack_parser_table_test.cc +++ b/test/core/transport/chttp2/hpack_parser_table_test.cc @@ -18,22 +18,16 @@ #include "src/core/ext/transport/chttp2/transport/hpack_parser_table.h" -#include <stdio.h> -#include <string.h> - #include <string> - -#include <gtest/gtest.h> +#include <utility> #include "absl/strings/str_cat.h" +#include "gtest/gtest.h" #include <grpc/grpc.h> -#include <grpc/support/alloc.h> -#include <grpc/support/log.h> -#include "src/core/lib/gpr/string.h" #include "src/core/lib/iomgr/exec_ctx.h" -#include "src/core/lib/slice/slice_internal.h" +#include "src/core/lib/slice/slice.h" #include "test/core/util/test_config.h" namespace grpc_core { diff --git a/test/core/transport/chttp2/hpack_parser_test.cc b/test/core/transport/chttp2/hpack_parser_test.cc index 6adeafb9b6f..5e8a7ba0d9e 100644 --- a/test/core/transport/chttp2/hpack_parser_test.cc +++ b/test/core/transport/chttp2/hpack_parser_test.cc @@ -18,15 +18,28 @@ #include "src/core/ext/transport/chttp2/transport/hpack_parser.h" -#include <gtest/gtest.h> +#include <stdlib.h> +#include <memory> +#include <string> + +#include "absl/memory/memory.h" +#include "absl/strings/str_cat.h" +#include "absl/types/optional.h" +#include "gtest/gtest.h" + +#include <grpc/event_engine/memory_allocator.h> #include <grpc/grpc.h> #include <grpc/slice.h> #include <grpc/support/alloc.h> #include <grpc/support/log.h> +#include "src/core/lib/gprpp/ref_counted_ptr.h" #include "src/core/lib/iomgr/exec_ctx.h" +#include "src/core/lib/resource_quota/arena.h" +#include "src/core/lib/resource_quota/memory_quota.h" #include "src/core/lib/resource_quota/resource_quota.h" +#include "src/core/lib/slice/slice.h" #include "test/core/util/parse_hexstring.h" #include "test/core/util/slice_splitter.h" #include "test/core/util/test_config.h" diff --git a/test/core/transport/chttp2/remove_stream_from_stalled_lists_test.cc b/test/core/transport/chttp2/remove_stream_from_stalled_lists_test.cc index ea381c3a472..ee2ed123681 100644 --- a/test/core/transport/chttp2/remove_stream_from_stalled_lists_test.cc +++ b/test/core/transport/chttp2/remove_stream_from_stalled_lists_test.cc @@ -18,27 +18,32 @@ #include <grpc/support/port_platform.h> -#include <stdlib.h> #include <string.h> +#include <algorithm> #include <functional> -#include <set> +#include <memory> +#include <string> #include <thread> +#include <vector> -#include <gmock/gmock.h> +#include <gtest/gtest.h> +#include "absl/memory/memory.h" + +#include <grpc/byte_buffer.h> #include <grpc/grpc.h> #include <grpc/grpc_security.h> -#include <grpc/impl/codegen/grpc_types.h> +#include <grpc/impl/codegen/propagation_bits.h> #include <grpc/slice.h> -#include <grpc/support/alloc.h> +#include <grpc/status.h> #include <grpc/support/log.h> -#include <grpc/support/string_util.h> #include <grpc/support/time.h> #include "src/core/ext/filters/client_channel/backup_poller.h" #include "src/core/ext/transport/chttp2/transport/flow_control.h" #include "src/core/lib/channel/channel_args.h" +#include "src/core/lib/gprpp/global_config_generic.h" #include "src/core/lib/gprpp/host_port.h" #include "src/core/lib/gprpp/sync.h" #include "test/core/util/port.h" diff --git a/test/core/transport/chttp2/settings_timeout_test.cc b/test/core/transport/chttp2/settings_timeout_test.cc index 6b2f4e9ce4a..79be4d2f16e 100644 --- a/test/core/transport/chttp2/settings_timeout_test.cc +++ b/test/core/transport/chttp2/settings_timeout_test.cc @@ -16,26 +16,43 @@ * */ +#include <inttypes.h> + #include <functional> #include <memory> #include <string> #include <thread> - -#include <gtest/gtest.h> +#include <vector> #include "absl/memory/memory.h" +#include "absl/status/status.h" +#include "absl/status/statusor.h" #include "absl/strings/str_cat.h" +#include "gtest/gtest.h" #include <grpc/grpc.h> #include <grpc/grpc_security.h> +#include <grpc/slice.h> +#include <grpc/slice_buffer.h> #include <grpc/support/alloc.h> +#include <grpc/support/atm.h> #include <grpc/support/log.h> +#include <grpc/support/sync.h> +#include <grpc/support/time.h> +#include "src/core/lib/channel/channel_args.h" +#include "src/core/lib/channel/channel_args_preconditioning.h" +#include "src/core/lib/config/core_configuration.h" +#include "src/core/lib/gprpp/time.h" +#include "src/core/lib/iomgr/closure.h" #include "src/core/lib/iomgr/endpoint.h" #include "src/core/lib/iomgr/error.h" +#include "src/core/lib/iomgr/exec_ctx.h" +#include "src/core/lib/iomgr/iomgr_fwd.h" #include "src/core/lib/iomgr/pollset.h" #include "src/core/lib/iomgr/pollset_set.h" #include "src/core/lib/iomgr/resolve_address.h" +#include "src/core/lib/iomgr/resolved_address.h" #include "src/core/lib/iomgr/tcp_client.h" #include "src/core/lib/resource_quota/api.h" #include "src/core/lib/slice/slice_internal.h" diff --git a/test/core/transport/chttp2/stream_map_test.cc b/test/core/transport/chttp2/stream_map_test.cc index ef8c21586e0..9b621082def 100644 --- a/test/core/transport/chttp2/stream_map_test.cc +++ b/test/core/transport/chttp2/stream_map_test.cc @@ -18,7 +18,7 @@ #include "src/core/ext/transport/chttp2/transport/stream_map.h" -#include <gtest/gtest.h> +#include "gtest/gtest.h" #include <grpc/support/log.h> diff --git a/test/core/transport/chttp2/streams_not_seen_test.cc b/test/core/transport/chttp2/streams_not_seen_test.cc index 6536c9f6fee..36b023fdbe1 100644 --- a/test/core/transport/chttp2/streams_not_seen_test.cc +++ b/test/core/transport/chttp2/streams_not_seen_test.cc @@ -19,25 +19,61 @@ #include <grpc/support/port_platform.h> #include <limits.h> +#include <stdint.h> #include <stdlib.h> #include <string.h> +#include <algorithm> +#include <atomic> +#include <memory> +#include <new> +#include <string> #include <thread> +#include <vector> -#include <gmock/gmock.h> - +#include "absl/base/thread_annotations.h" +#include "absl/memory/memory.h" +#include "absl/strings/match.h" +#include "absl/strings/str_cat.h" +#include "absl/strings/string_view.h" #include "absl/synchronization/notification.h" +#include "absl/time/time.h" +#include "absl/types/optional.h" +#include "gtest/gtest.h" #include <grpc/grpc.h> #include <grpc/grpc_security.h> +#include <grpc/impl/codegen/propagation_bits.h> +#include <grpc/slice.h> +#include <grpc/slice_buffer.h> +#include <grpc/status.h> +#include <grpc/support/alloc.h> +#include <grpc/support/log.h> #include "src/core/ext/transport/chttp2/transport/chttp2_transport.h" #include "src/core/ext/transport/chttp2/transport/frame_goaway.h" +#include "src/core/lib/channel/channel_args.h" +#include "src/core/lib/channel/channel_fwd.h" +#include "src/core/lib/channel/channel_stack.h" #include "src/core/lib/channel/channel_stack_builder.h" #include "src/core/lib/config/core_configuration.h" +#include "src/core/lib/gpr/useful.h" +#include "src/core/lib/gprpp/debug_location.h" #include "src/core/lib/gprpp/host_port.h" +#include "src/core/lib/gprpp/sync.h" +#include "src/core/lib/gprpp/time.h" +#include "src/core/lib/iomgr/closure.h" +#include "src/core/lib/iomgr/endpoint.h" +#include "src/core/lib/iomgr/error.h" +#include "src/core/lib/iomgr/exec_ctx.h" +#include "src/core/lib/iomgr/pollset.h" +#include "src/core/lib/iomgr/tcp_server.h" #include "src/core/lib/slice/slice.h" -#include "src/core/lib/surface/channel.h" +#include "src/core/lib/slice/slice_internal.h" +#include "src/core/lib/surface/channel_init.h" +#include "src/core/lib/surface/channel_stack_type.h" +#include "src/core/lib/transport/metadata_batch.h" +#include "src/core/lib/transport/transport.h" #include "test/core/end2end/cq_verifier.h" #include "test/core/util/port.h" #include "test/core/util/test_config.h" diff --git a/test/core/transport/chttp2/too_many_pings_test.cc b/test/core/transport/chttp2/too_many_pings_test.cc index 57d68395150..2c70cd65ff6 100644 --- a/test/core/transport/chttp2/too_many_pings_test.cc +++ b/test/core/transport/chttp2/too_many_pings_test.cc @@ -18,40 +18,45 @@ #include <grpc/support/port_platform.h> -#include <stdlib.h> +#include <stdint.h> #include <string.h> -#include <functional> -#include <set> -#include <thread> - -#include <gmock/gmock.h> +#include <algorithm> +#include <map> +#include <string> +#include <utility> +#include <vector> +#include "absl/status/status.h" +#include "absl/status/statusor.h" #include "absl/strings/str_cat.h" +#include "absl/time/time.h" +#include "gtest/gtest.h" +#include <grpc/byte_buffer.h> #include <grpc/grpc.h> #include <grpc/grpc_security.h> -#include <grpc/impl/codegen/grpc_types.h> +#include <grpc/impl/codegen/propagation_bits.h> #include <grpc/slice.h> -#include <grpc/support/alloc.h> +#include <grpc/status.h> #include <grpc/support/log.h> -#include <grpc/support/string_util.h> #include <grpc/support/time.h> -#include <grpcpp/impl/codegen/service_type.h> -#include <grpcpp/server_builder.h> #include "src/core/ext/filters/client_channel/resolver/fake/fake_resolver.h" #include "src/core/ext/transport/chttp2/transport/chttp2_transport.h" #include "src/core/lib/address_utils/parse_address.h" +#include "src/core/lib/channel/channel_args.h" #include "src/core/lib/gpr/useful.h" #include "src/core/lib/gprpp/host_port.h" -#include "src/core/lib/gprpp/thd.h" -#include "src/core/lib/iomgr/error.h" -#include "src/core/lib/security/credentials/alts/alts_credentials.h" -#include "src/core/lib/security/credentials/credentials.h" -#include "src/core/lib/security/security_connector/alts/alts_security_connector.h" -#include "src/core/lib/slice/slice_string_helpers.h" +#include "src/core/lib/gprpp/ref_counted_ptr.h" +#include "src/core/lib/gprpp/sync.h" +#include "src/core/lib/gprpp/time.h" +#include "src/core/lib/iomgr/exec_ctx.h" +#include "src/core/lib/iomgr/resolved_address.h" +#include "src/core/lib/resolver/resolver.h" +#include "src/core/lib/resolver/server_address.h" #include "src/core/lib/surface/channel.h" +#include "src/core/lib/uri/uri_parser.h" #include "test/core/end2end/cq_verifier.h" #include "test/core/util/port.h" #include "test/core/util/test_config.h" diff --git a/test/core/transport/chttp2/varint_test.cc b/test/core/transport/chttp2/varint_test.cc index 6253772d3bc..80808e289b4 100644 --- a/test/core/transport/chttp2/varint_test.cc +++ b/test/core/transport/chttp2/varint_test.cc @@ -18,9 +18,10 @@ #include "src/core/ext/transport/chttp2/transport/varint.h" -#include <gtest/gtest.h> +#include <stddef.h> + +#include "gtest/gtest.h" -#include <grpc/grpc.h> #include <grpc/slice.h> #include <grpc/support/log.h> diff --git a/test/core/transport/connectivity_state_test.cc b/test/core/transport/connectivity_state_test.cc index 2ca9ea54bde..d88623e3321 100644 --- a/test/core/transport/connectivity_state_test.cc +++ b/test/core/transport/connectivity_state_test.cc @@ -18,14 +18,11 @@ #include "src/core/lib/transport/connectivity_state.h" -#include <string.h> - -#include <gtest/gtest.h> +#include "absl/strings/string_view.h" +#include "gtest/gtest.h" #include <grpc/grpc.h> -#include <grpc/support/log.h> -#include "src/core/lib/iomgr/exec_ctx.h" #include "test/core/util/test_config.h" #include "test/core/util/tracer_util.h" diff --git a/test/core/transport/error_utils_test.cc b/test/core/transport/error_utils_test.cc index edcd1dcda30..8e3bbc390e8 100644 --- a/test/core/transport/error_utils_test.cc +++ b/test/core/transport/error_utils_test.cc @@ -16,12 +16,14 @@ #include "src/core/lib/transport/error_utils.h" -#include <gtest/gtest.h> +#include <stdint.h> + +#include <vector> #include "absl/status/status.h" +#include "gtest/gtest.h" #include "src/core/lib/iomgr/error.h" -#include "src/core/lib/slice/slice_internal.h" #include "test/core/util/test_config.h" namespace { diff --git a/test/core/transport/metadata_map_test.cc b/test/core/transport/metadata_map_test.cc index 6abba661e3c..2d870132e90 100644 --- a/test/core/transport/metadata_map_test.cc +++ b/test/core/transport/metadata_map_test.cc @@ -14,10 +14,23 @@ // limitations under the License. // -#include <gtest/gtest.h> +#include <stdlib.h> +#include <memory> +#include <string> + +#include "absl/strings/str_cat.h" +#include "absl/types/optional.h" +#include "gtest/gtest.h" + +#include <grpc/event_engine/memory_allocator.h> + +#include "src/core/lib/gprpp/ref_counted_ptr.h" +#include "src/core/lib/gprpp/time.h" +#include "src/core/lib/resource_quota/arena.h" +#include "src/core/lib/resource_quota/memory_quota.h" #include "src/core/lib/resource_quota/resource_quota.h" -#include "src/core/lib/slice/slice_internal.h" +#include "src/core/lib/slice/slice.h" #include "src/core/lib/transport/metadata_batch.h" #include "test/core/util/test_config.h" diff --git a/test/core/transport/parsed_metadata_test.cc b/test/core/transport/parsed_metadata_test.cc index 77bdde994b3..c9f74a32bf4 100644 --- a/test/core/transport/parsed_metadata_test.cc +++ b/test/core/transport/parsed_metadata_test.cc @@ -16,10 +16,15 @@ #include "src/core/lib/transport/parsed_metadata.h" -#include <gmock/gmock.h> -#include <gtest/gtest.h> +#include <memory> + +#include "absl/memory/memory.h" +#include "absl/strings/numbers.h" +#include "gmock/gmock.h" +#include "gtest/gtest.h" + +#include <grpc/support/log.h> -#include "src/core/lib/slice/slice_internal.h" #include "src/core/lib/transport/metadata_batch.h" #include "test/core/util/test_config.h" diff --git a/test/core/transport/pid_controller_test.cc b/test/core/transport/pid_controller_test.cc index 91e22837db3..eccbb6148cf 100644 --- a/test/core/transport/pid_controller_test.cc +++ b/test/core/transport/pid_controller_test.cc @@ -18,16 +18,12 @@ #include "src/core/lib/transport/pid_controller.h" -#include <float.h> #include <math.h> -#include <gtest/gtest.h> +#include <ostream> -#include <grpc/support/alloc.h> -#include <grpc/support/log.h> -#include <grpc/support/string_util.h> +#include "gtest/gtest.h" -#include "src/core/lib/gpr/string.h" #include "test/core/util/test_config.h" namespace grpc_core { diff --git a/test/core/transport/status_conversion_test.cc b/test/core/transport/status_conversion_test.cc index 405785ce4ed..d0a3c4206b2 100644 --- a/test/core/transport/status_conversion_test.cc +++ b/test/core/transport/status_conversion_test.cc @@ -18,10 +18,10 @@ #include "src/core/lib/transport/status_conversion.h" -#include <gtest/gtest.h> +#include "gtest/gtest.h" #include <grpc/grpc.h> -#include <grpc/support/log.h> +#include <grpc/support/time.h> #include "src/core/lib/iomgr/exec_ctx.h" #include "test/core/util/test_config.h" diff --git a/test/core/transport/timeout_encoding_test.cc b/test/core/transport/timeout_encoding_test.cc index 4ff577569bb..663862d39af 100644 --- a/test/core/transport/timeout_encoding_test.cc +++ b/test/core/transport/timeout_encoding_test.cc @@ -18,23 +18,14 @@ #include "src/core/lib/transport/timeout_encoding.h" -#include <stdio.h> -#include <string.h> - #include <string> -#include <gtest/gtest.h> - #include "absl/strings/str_format.h" +#include "absl/strings/string_view.h" +#include "gtest/gtest.h" -#include <grpc/support/alloc.h> -#include <grpc/support/log.h> - -#include "src/core/lib/gpr/murmur_hash.h" -#include "src/core/lib/gpr/string.h" #include "src/core/lib/gpr/useful.h" #include "src/core/lib/gprpp/time.h" -#include "test/core/util/test_config.h" namespace grpc_core { namespace { diff --git a/tools/dockerfile/grpc_iwyu/iwyu.sh b/tools/dockerfile/grpc_iwyu/iwyu.sh index 8b7bb770f8c..87b425a8c4b 100755 --- a/tools/dockerfile/grpc_iwyu/iwyu.sh +++ b/tools/dockerfile/grpc_iwyu/iwyu.sh @@ -50,6 +50,7 @@ export ENABLED_MODULES=' test/core/memory_usage test/core/promise test/core/resource_quota + test/core/transport test/core/uri test/core/util ' @@ -58,6 +59,7 @@ export DISABLED_MODULES=' src/core/lib/gpr src/core/lib/iomgr src/core/ext/transport/binder + test/core/transport/binder ' export INCLUSION_REGEX=`echo $ENABLED_MODULES | sed 's/ /|/g' | sed 's,\\(.*\\),^(\\1)/,g'`