]> git.feebdaed.xyz Git - 0xmirror/grpc.git/commitdiff
[PH2][BUILD][Trivial] Build files (#41301)
authorTanvi Jagtap - Google LLC <139093547+tanvi-jagtap@users.noreply.github.com>
Wed, 24 Dec 2025 09:32:51 +0000 (01:32 -0800)
committerCopybara-Service <copybara-worker@google.com>
Wed, 24 Dec 2025 09:34:53 +0000 (01:34 -0800)
[PH2][BUILD][Trivial] Build files

Closes #41301

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/41301 from tanvi-jagtap:ph2_more_files 8b396d0f4b5cbb7559eebc4612cecb4ce0506361
PiperOrigin-RevId: 848476035

17 files changed:
CMakeLists.txt
Makefile
Package.swift
build_autogenerated.yaml
config.m4
config.w32
gRPC-Core.podspec
grpc.gemspec
package.xml
src/core/BUILD
src/core/ext/transport/chttp2/transport/security_frame.cc [deleted file]
src/python/grpcio/grpc_core_dependencies.py
test/core/transport/chttp2/BUILD
test/core/transport/chttp2/http2_security_frame_test.cc [new file with mode: 0644]
tools/doxygen/Doxyfile.c++.internal
tools/doxygen/Doxyfile.core.internal
tools/run_tests/generated/tests.json

index 8f6b71da74f705008605333e87aee6dc76e70edd..dbcbd2f349e6c50fd21e889b162cd38cf61999b0 100644 (file)
@@ -1553,6 +1553,7 @@ if(gRPC_BUILD_TESTS)
   add_dependencies(buildtests_cxx hpack_parser_test)
   add_dependencies(buildtests_cxx http2_client)
   add_dependencies(buildtests_cxx http2_client_transport_test)
+  add_dependencies(buildtests_cxx http2_security_frame_test)
   if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_MAC OR _gRPC_PLATFORM_POSIX)
     add_dependencies(buildtests_cxx http2_server_transport_test)
   endif()
@@ -2371,7 +2372,6 @@ add_library(grpc
   src/core/ext/transport/chttp2/transport/ping_callbacks.cc
   src/core/ext/transport/chttp2/transport/ping_promise.cc
   src/core/ext/transport/chttp2/transport/ping_rate_policy.cc
-  src/core/ext/transport/chttp2/transport/security_frame.cc
   src/core/ext/transport/chttp2/transport/stream_lists.cc
   src/core/ext/transport/chttp2/transport/transport_common.cc
   src/core/ext/transport/chttp2/transport/varint.cc
@@ -3495,7 +3495,6 @@ add_library(grpc_unsecure
   src/core/ext/transport/chttp2/transport/ping_callbacks.cc
   src/core/ext/transport/chttp2/transport/ping_promise.cc
   src/core/ext/transport/chttp2/transport/ping_rate_policy.cc
-  src/core/ext/transport/chttp2/transport/security_frame.cc
   src/core/ext/transport/chttp2/transport/stream_lists.cc
   src/core/ext/transport/chttp2/transport/transport_common.cc
   src/core/ext/transport/chttp2/transport/varint.cc
@@ -20611,6 +20610,56 @@ target_link_libraries(http2_client_transport_test
 )
 
 
+endif()
+if(gRPC_BUILD_TESTS)
+
+add_executable(http2_security_frame_test
+  ${_gRPC_PROTO_GENS_DIR}/test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.pb.cc
+  ${_gRPC_PROTO_GENS_DIR}/test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.grpc.pb.cc
+  ${_gRPC_PROTO_GENS_DIR}/test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.pb.h
+  ${_gRPC_PROTO_GENS_DIR}/test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.grpc.pb.h
+  test/core/event_engine/event_engine_test_utils.cc
+  test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.cc
+  test/core/transport/chttp2/http2_security_frame_test.cc
+  test/core/transport/util/mock_promise_endpoint.cc
+)
+if(WIN32 AND MSVC)
+  if(BUILD_SHARED_LIBS)
+    target_compile_definitions(http2_security_frame_test
+    PRIVATE
+      "GPR_DLL_IMPORTS"
+      "GRPC_DLL_IMPORTS"
+    )
+  endif()
+endif()
+target_compile_features(http2_security_frame_test PUBLIC cxx_std_17)
+target_include_directories(http2_security_frame_test
+  PRIVATE
+    ${CMAKE_CURRENT_SOURCE_DIR}
+    ${CMAKE_CURRENT_SOURCE_DIR}/include
+    ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR}
+    ${_gRPC_RE2_INCLUDE_DIR}
+    ${_gRPC_SSL_INCLUDE_DIR}
+    ${_gRPC_UPB_GENERATED_DIR}
+    ${_gRPC_UPB_GRPC_GENERATED_DIR}
+    ${_gRPC_UPB_INCLUDE_DIR}
+    ${_gRPC_XXHASH_INCLUDE_DIR}
+    ${_gRPC_ZLIB_INCLUDE_DIR}
+    third_party/googletest/googletest/include
+    third_party/googletest/googletest
+    third_party/googletest/googlemock/include
+    third_party/googletest/googlemock
+    ${_gRPC_PROTO_GENS_DIR}
+)
+
+target_link_libraries(http2_security_frame_test
+  ${_gRPC_ALLTARGETS_LIBRARIES}
+  gtest
+  ${_gRPC_PROTOBUF_LIBRARIES}
+  grpc_test_util
+)
+
+
 endif()
 if(gRPC_BUILD_TESTS)
 if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_MAC OR _gRPC_PLATFORM_POSIX)
index 3d8c17b0b79138ccbf8815eccf30cd4e24ac2164..b49a85b3291f56c423289e231348b143d09c1a98 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -826,7 +826,6 @@ LIBGRPC_SRC = \
     src/core/ext/transport/chttp2/transport/ping_callbacks.cc \
     src/core/ext/transport/chttp2/transport/ping_promise.cc \
     src/core/ext/transport/chttp2/transport/ping_rate_policy.cc \
-    src/core/ext/transport/chttp2/transport/security_frame.cc \
     src/core/ext/transport/chttp2/transport/stream_lists.cc \
     src/core/ext/transport/chttp2/transport/transport_common.cc \
     src/core/ext/transport/chttp2/transport/varint.cc \
index 6b5bf71f11f14d82fd64a0ed1a877bac84ae9b5f..d31a0fa07395c327ff04bfd683a94932a02291fa 100644 (file)
@@ -453,7 +453,6 @@ let package = Package(
         "src/core/ext/transport/chttp2/transport/ping_promise.h",
         "src/core/ext/transport/chttp2/transport/ping_rate_policy.cc",
         "src/core/ext/transport/chttp2/transport/ping_rate_policy.h",
-        "src/core/ext/transport/chttp2/transport/security_frame.cc",
         "src/core/ext/transport/chttp2/transport/security_frame.h",
         "src/core/ext/transport/chttp2/transport/stream.h",
         "src/core/ext/transport/chttp2/transport/stream_data_queue.h",
index 980a09a337173578abeb5ca6b1702c1c32bb829b..5890fd906724bb1debe09a08fb6d6a788dfa40b2 100644 (file)
@@ -1497,7 +1497,6 @@ libs:
   - src/core/ext/transport/chttp2/transport/ping_callbacks.cc
   - src/core/ext/transport/chttp2/transport/ping_promise.cc
   - src/core/ext/transport/chttp2/transport/ping_rate_policy.cc
-  - src/core/ext/transport/chttp2/transport/security_frame.cc
   - src/core/ext/transport/chttp2/transport/stream_lists.cc
   - src/core/ext/transport/chttp2/transport/transport_common.cc
   - src/core/ext/transport/chttp2/transport/varint.cc
@@ -3076,7 +3075,6 @@ libs:
   - src/core/ext/transport/chttp2/transport/ping_callbacks.cc
   - src/core/ext/transport/chttp2/transport/ping_promise.cc
   - src/core/ext/transport/chttp2/transport/ping_rate_policy.cc
-  - src/core/ext/transport/chttp2/transport/security_frame.cc
   - src/core/ext/transport/chttp2/transport/stream_lists.cc
   - src/core/ext/transport/chttp2/transport/transport_common.cc
   - src/core/ext/transport/chttp2/transport/varint.cc
@@ -14981,6 +14979,28 @@ targets:
   - protobuf
   - grpc_test_util
   uses_polling: false
+- name: http2_security_frame_test
+  gtest: true
+  build: test
+  language: c++
+  headers:
+  - test/core/event_engine/event_engine_test_utils.h
+  - test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.h
+  - test/core/promise/poll_matcher.h
+  - test/core/test_util/postmortem.h
+  - test/core/transport/util/mock_promise_endpoint.h
+  - test/core/transport/util/transport_test.h
+  src:
+  - test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.proto
+  - test/core/event_engine/event_engine_test_utils.cc
+  - test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.cc
+  - test/core/transport/chttp2/http2_security_frame_test.cc
+  - test/core/transport/util/mock_promise_endpoint.cc
+  deps:
+  - gtest
+  - protobuf
+  - grpc_test_util
+  uses_polling: false
 - name: http2_server_transport_test
   gtest: true
   build: test
index 599b5425db5b73003cb096992d33f5a945527820..7f6638a4063b9870085b674966f8366b78854c1b 100644 (file)
--- a/config.m4
+++ b/config.m4
@@ -200,7 +200,6 @@ if test "$PHP_GRPC" != "no"; then
     src/core/ext/transport/chttp2/transport/ping_callbacks.cc \
     src/core/ext/transport/chttp2/transport/ping_promise.cc \
     src/core/ext/transport/chttp2/transport/ping_rate_policy.cc \
-    src/core/ext/transport/chttp2/transport/security_frame.cc \
     src/core/ext/transport/chttp2/transport/stream_lists.cc \
     src/core/ext/transport/chttp2/transport/transport_common.cc \
     src/core/ext/transport/chttp2/transport/varint.cc \
index e6983430a18450c6721b4a398f4523b7b4acb148..f9e100ec57088c41a9111ce1ca9f5b54f511056b 100644 (file)
@@ -165,7 +165,6 @@ if (PHP_GRPC != "no") {
     "src\\core\\ext\\transport\\chttp2\\transport\\ping_callbacks.cc " +
     "src\\core\\ext\\transport\\chttp2\\transport\\ping_promise.cc " +
     "src\\core\\ext\\transport\\chttp2\\transport\\ping_rate_policy.cc " +
-    "src\\core\\ext\\transport\\chttp2\\transport\\security_frame.cc " +
     "src\\core\\ext\\transport\\chttp2\\transport\\stream_lists.cc " +
     "src\\core\\ext\\transport\\chttp2\\transport\\transport_common.cc " +
     "src\\core\\ext\\transport\\chttp2\\transport\\varint.cc " +
index 684ed81ff4537c52a59a994718ccfac5c8d88ba3..2ab809328518a38d248170f2c9d53fc7402f6292 100644 (file)
@@ -576,7 +576,6 @@ Pod::Spec.new do |s|
                       'src/core/ext/transport/chttp2/transport/ping_promise.h',
                       'src/core/ext/transport/chttp2/transport/ping_rate_policy.cc',
                       'src/core/ext/transport/chttp2/transport/ping_rate_policy.h',
-                      'src/core/ext/transport/chttp2/transport/security_frame.cc',
                       'src/core/ext/transport/chttp2/transport/security_frame.h',
                       'src/core/ext/transport/chttp2/transport/stream.h',
                       'src/core/ext/transport/chttp2/transport/stream_data_queue.h',
index 6302a8e7c0554c02b9237f73efe7cdecf9c3ccfb..531bb8ec590b173feeaa798bbfc1d46242690a82 100644 (file)
@@ -459,7 +459,6 @@ Gem::Specification.new do |s|
   s.files += %w( src/core/ext/transport/chttp2/transport/ping_promise.h )
   s.files += %w( src/core/ext/transport/chttp2/transport/ping_rate_policy.cc )
   s.files += %w( src/core/ext/transport/chttp2/transport/ping_rate_policy.h )
-  s.files += %w( src/core/ext/transport/chttp2/transport/security_frame.cc )
   s.files += %w( src/core/ext/transport/chttp2/transport/security_frame.h )
   s.files += %w( src/core/ext/transport/chttp2/transport/stream.h )
   s.files += %w( src/core/ext/transport/chttp2/transport/stream_data_queue.h )
index 9499211b223b818e1aeb8d55009da497db5179b1..8d551ea89acff07aea9e1b49eca7ca8262f93f24 100644 (file)
     <file baseinstalldir="/" name="src/core/ext/transport/chttp2/transport/ping_promise.h" role="src" />
     <file baseinstalldir="/" name="src/core/ext/transport/chttp2/transport/ping_rate_policy.cc" role="src" />
     <file baseinstalldir="/" name="src/core/ext/transport/chttp2/transport/ping_rate_policy.h" role="src" />
-    <file baseinstalldir="/" name="src/core/ext/transport/chttp2/transport/security_frame.cc" role="src" />
     <file baseinstalldir="/" name="src/core/ext/transport/chttp2/transport/security_frame.h" role="src" />
     <file baseinstalldir="/" name="src/core/ext/transport/chttp2/transport/stream.h" role="src" />
     <file baseinstalldir="/" name="src/core/ext/transport/chttp2/transport/stream_data_queue.h" role="src" />
index 0412d76c954f84ce962e923b2475768bff611646..b1cd744606a7358fc080e236a5b48425e96c4880 100644 (file)
@@ -8602,9 +8602,6 @@ grpc_cc_library(
 
 grpc_cc_library(
     name = "http2_security_frame",
-    srcs = [
-        "ext/transport/chttp2/transport/security_frame.cc",
-    ],
     hdrs = [
         "ext/transport/chttp2/transport/security_frame.h",
     ],
@@ -8612,11 +8609,21 @@ grpc_cc_library(
         "absl/log",
         "absl/status",
         "absl/status:statusor",
+        "absl/base:core_headers",
+        "absl/types:span",
     ],
     deps = [
+        "grpc_check",
         "grpc_promise_endpoint",
+        ":activity",
+        ":context",
+        ":poll",
+        ":ref_counted",
+        ":sync",
+        "//:chttp2_frame",
         "//:grpc_public_hdrs",
         "//src/core:event_engine_extensions",
+        "//src/core:event_engine_query_extensions",
         "//src/core:slice",
         "//src/core:slice_buffer",
         "//src/core:transport_framing_endpoint_extension",
diff --git a/src/core/ext/transport/chttp2/transport/security_frame.cc b/src/core/ext/transport/chttp2/transport/security_frame.cc
deleted file mode 100644 (file)
index 24783f3..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-//
-// Copyright 2025 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 "src/core/ext/transport/chttp2/transport/security_frame.h"
-
-#include <cstddef>
-#include <cstdint>
-
-#include "src/core/lib/slice/slice.h"
-#include "src/core/lib/slice/slice_buffer.h"
-#include "src/core/lib/transport/transport_framing_endpoint_extension.h"
-#include "absl/status/status.h"
-
-namespace grpc_core {
-
-// TODO(tjagtap) [PH2][P1] Implement
-
-}  // namespace grpc_core
index ab62b05b50119adc9eb8174a491a938d0b6ae76a..4e147a79edb592d54a6fcf1965a331a2d539c08a 100644 (file)
@@ -175,7 +175,6 @@ CORE_SOURCE_FILES = [
     'src/core/ext/transport/chttp2/transport/ping_callbacks.cc',
     'src/core/ext/transport/chttp2/transport/ping_promise.cc',
     'src/core/ext/transport/chttp2/transport/ping_rate_policy.cc',
-    'src/core/ext/transport/chttp2/transport/security_frame.cc',
     'src/core/ext/transport/chttp2/transport/stream_lists.cc',
     'src/core/ext/transport/chttp2/transport/transport_common.cc',
     'src/core/ext/transport/chttp2/transport/varint.cc',
index cb9f5bb1d6841265ca29bc1cb55d86e7f6a5801b..015b27728b71211387da7f2a0ea8d2461b9e1503 100644 (file)
@@ -931,6 +931,49 @@ grpc_cc_test(
     ],
 )
 
+grpc_cc_test(
+    name = "http2_security_frame_test",
+    srcs = ["http2_security_frame_test.cc"],
+    external_deps = [
+        "absl/functional:any_invocable",
+        "absl/log:check",
+        "absl/log:log",
+        "absl/status",
+        "absl/strings",
+        "gtest",
+    ],
+    uses_polling = False,
+    deps = [
+        "//:chttp2_frame",
+        "//:event_engine_base_hdrs",
+        "//:exec_ctx",
+        "//:gpr",
+        "//:grpc",
+        "//:grpc_transport_chttp2",
+        "//:orphanable",
+        "//src/core:arena",
+        "//src/core:default_event_engine",
+        "//src/core:http2_security_frame",
+        "//src/core:http2_settings",
+        "//src/core:map",
+        "//src/core:notification",
+        "//src/core:poll",
+        "//src/core:seq",
+        "//src/core:sleep",
+        "//src/core:slice",
+        "//src/core:slice_buffer",
+        "//src/core:time",
+        "//src/core:try_join",
+        "//src/core:try_seq",
+        "//test/core/promise:poll_matcher",
+        "//test/core/test_util:grpc_test_util",
+        "//test/core/test_util:grpc_test_util_base",
+        "//test/core/test_util:postmortem",
+        "//test/core/transport/util:mock_promise_endpoint",
+        "//test/core/transport/util:transport_test",
+    ],
+)
+
 grpc_cc_test(
     name = "settings_timeout_manager_test",
     srcs = ["settings_timeout_manager_test.cc"],
diff --git a/test/core/transport/chttp2/http2_security_frame_test.cc b/test/core/transport/chttp2/http2_security_frame_test.cc
new file mode 100644 (file)
index 0000000..b189c74
--- /dev/null
@@ -0,0 +1,66 @@
+//
+//
+// Copyright 2025 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 <grpc/event_engine/event_engine.h>
+#include <grpc/event_engine/slice.h>
+#include <grpc/grpc.h>
+
+#include <cstdint>
+#include <memory>
+#include <string>
+#include <utility>
+
+#include "src/core/ext/transport/chttp2/transport/frame.h"
+#include "src/core/ext/transport/chttp2/transport/http2_settings.h"
+#include "src/core/ext/transport/chttp2/transport/security_frame.h"
+#include "src/core/lib/event_engine/default_event_engine.h"
+#include "src/core/lib/iomgr/exec_ctx.h"
+#include "src/core/lib/promise/poll.h"
+#include "src/core/lib/promise/seq.h"
+#include "src/core/lib/promise/try_join.h"
+#include "src/core/lib/resource_quota/arena.h"
+#include "src/core/lib/slice/slice_buffer.h"
+#include "src/core/util/notification.h"
+#include "src/core/util/orphanable.h"
+#include "src/core/util/time.h"
+#include "test/core/promise/poll_matcher.h"
+#include "test/core/test_util/postmortem.h"
+#include "test/core/transport/util/mock_promise_endpoint.h"
+#include "test/core/transport/util/transport_test.h"
+#include "gmock/gmock.h"
+#include "gtest/gtest.h"
+#include "absl/log/log.h"
+#include "absl/status/status.h"
+#include "absl/strings/string_view.h"
+
+namespace grpc_core {
+namespace http2 {
+
+// TODO(tjagtap) [PH2][P1]
+
+}  // namespace http2
+}  // namespace grpc_core
+
+int main(int argc, char** argv) {
+  ::testing::InitGoogleTest(&argc, argv);
+  // Must call to create default EventEngine.
+  grpc_init();
+  int ret = RUN_ALL_TESTS();
+  grpc_shutdown();
+  return ret;
+}
index a88bed8e65a089f5db50b2bb23d4ce6b263ee7e0..1561b57b76e37b4f9c73326f85e50d3dd0ee242d 100644 (file)
@@ -1426,7 +1426,6 @@ src/core/ext/transport/chttp2/transport/ping_promise.cc \
 src/core/ext/transport/chttp2/transport/ping_promise.h \
 src/core/ext/transport/chttp2/transport/ping_rate_policy.cc \
 src/core/ext/transport/chttp2/transport/ping_rate_policy.h \
-src/core/ext/transport/chttp2/transport/security_frame.cc \
 src/core/ext/transport/chttp2/transport/security_frame.h \
 src/core/ext/transport/chttp2/transport/stream.h \
 src/core/ext/transport/chttp2/transport/stream_data_queue.h \
index 49e8edfa8704243430b7ec02246f3f57e514125f..93de8db1f029016bf00077e71b3d86d745d1d825 100644 (file)
@@ -1255,7 +1255,6 @@ src/core/ext/transport/chttp2/transport/ping_promise.cc \
 src/core/ext/transport/chttp2/transport/ping_promise.h \
 src/core/ext/transport/chttp2/transport/ping_rate_policy.cc \
 src/core/ext/transport/chttp2/transport/ping_rate_policy.h \
-src/core/ext/transport/chttp2/transport/security_frame.cc \
 src/core/ext/transport/chttp2/transport/security_frame.h \
 src/core/ext/transport/chttp2/transport/stream.h \
 src/core/ext/transport/chttp2/transport/stream_data_queue.h \
index bb007bd62751408040d2ffcb20649c08abc25776..f28abb0cbb2089e035ebb5d3f22e4051b79d12be 100644 (file)
     ],
     "uses_polling": false
   },
+  {
+    "args": [],
+    "benchmark": false,
+    "ci_platforms": [
+      "linux",
+      "mac",
+      "posix",
+      "windows"
+    ],
+    "cpu_cost": 1.0,
+    "exclude_configs": [],
+    "exclude_iomgrs": [],
+    "flaky": false,
+    "gtest": true,
+    "language": "c++",
+    "name": "http2_security_frame_test",
+    "platforms": [
+      "linux",
+      "mac",
+      "posix",
+      "windows"
+    ],
+    "uses_polling": false
+  },
   {
     "args": [],
     "benchmark": false,