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()
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
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
)
+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)
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 \
"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",
- 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
- 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
- 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
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 \
"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 " +
'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',
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 )
<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" />
grpc_cc_library(
name = "http2_security_frame",
- srcs = [
- "ext/transport/chttp2/transport/security_frame.cc",
- ],
hdrs = [
"ext/transport/chttp2/transport/security_frame.h",
],
"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",
+++ /dev/null
-//
-// 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
'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',
],
)
+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"],
--- /dev/null
+//
+//
+// 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;
+}
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 \
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 \
],
"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,