h2_local_abstract_uds_percent_encoded.cc
Go to the documentation of this file.
1 // Copyright 2021 gRPC authors.
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 // http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14 
15 #include <unistd.h>
16 
17 #include "absl/strings/str_format.h"
18 
20 
24 
25 static int unique{0};
26 
28  const grpc_channel_args* /*client_args*/,
29  const grpc_channel_args* /*server_args*/) {
33  static_cast<grpc_end2end_local_fullstack_fixture_data*>(f.fixture_data)
34  ->localaddr = absl::StrFormat(
35  "unix-abstract:grpc_fullstack_test.%%00.%d.%" PRId64 ".%" PRId32 ".%d",
36  getpid(), now.tv_sec, now.tv_nsec, ++unique);
37  return f;
38 }
39 
41  grpc_end2end_test_fixture* f, const grpc_channel_args* client_args) {
43 }
44 
46  grpc_end2end_test_fixture* f, const grpc_channel_args* client_args) {
48 }
49 
50 /* All test configurations */
52  {"chttp2/fullstack_local_abstract_uds_percent_encoded",
60 
61 int main(int argc, char** argv) {
62  size_t i;
65  grpc_init();
66  for (i = 0; i < sizeof(configs) / sizeof(*configs); i++) {
67  grpc_end2end_tests(argc, argv, configs[i]);
68  }
69  grpc_shutdown();
70  return 0;
71 }
FEATURE_MASK_SUPPORTS_AUTHORITY_HEADER
#define FEATURE_MASK_SUPPORTS_AUTHORITY_HEADER
Definition: end2end_tests.h:38
now
static double now(void)
Definition: test/core/fling/client.cc:130
generate.env
env
Definition: generate.py:37
absl::StrFormat
ABSL_MUST_USE_RESULT std::string StrFormat(const FormatSpec< Args... > &format, const Args &... args)
Definition: abseil-cpp/absl/strings/str_format.h:338
grpc_end2end_local_chttp2_create_fixture_fullstack
grpc_end2end_test_fixture grpc_end2end_local_chttp2_create_fixture_fullstack()
Definition: local_util.cc:36
grpc_end2end_tests_pre_init
void grpc_end2end_tests_pre_init(void)
Definition: end2end_tests.cc:221
local_util.h
FEATURE_MASK_SUPPORTS_PER_CALL_CREDENTIALS
#define FEATURE_MASK_SUPPORTS_PER_CALL_CREDENTIALS
Definition: end2end_tests.h:32
grpc_end2end_test_config
Definition: end2end_tests.h:53
chttp2_create_fixture_fullstack_uds
static grpc_end2end_test_fixture chttp2_create_fixture_fullstack_uds(const grpc_channel_args *, const grpc_channel_args *)
Definition: h2_local_abstract_uds_percent_encoded.cc:27
grpc_channel_args
Definition: grpc_types.h:132
grpc_end2end_test_fixture
Definition: end2end_tests.h:46
FEATURE_MASK_SUPPORTS_DELAYED_CONNECTION
#define FEATURE_MASK_SUPPORTS_DELAYED_CONNECTION
Definition: end2end_tests.h:28
string_util.h
configs
static grpc_end2end_test_config configs[]
Definition: h2_local_abstract_uds_percent_encoded.cc:51
chttp2_init_server_fullstack_uds
static void chttp2_init_server_fullstack_uds(grpc_end2end_test_fixture *f, const grpc_channel_args *client_args)
Definition: h2_local_abstract_uds_percent_encoded.cc:45
main
int main(int argc, char **argv)
Definition: h2_local_abstract_uds_percent_encoded.cc:61
autogen_x86imm.f
f
Definition: autogen_x86imm.py:9
unique
static int unique
Definition: h2_local_abstract_uds_percent_encoded.cc:25
GPR_CLOCK_MONOTONIC
@ GPR_CLOCK_MONOTONIC
Definition: gpr_types.h:36
grpc_end2end_local_chttp2_init_server_fullstack
void grpc_end2end_local_chttp2_init_server_fullstack(grpc_end2end_test_fixture *f, const grpc_channel_args *server_args, grpc_local_connect_type type)
Definition: local_util.cc:83
end2end_tests.h
grpc_end2end_local_chttp2_init_client_fullstack
void grpc_end2end_local_chttp2_init_client_fullstack(grpc_end2end_test_fixture *f, const grpc_channel_args *client_args, grpc_local_connect_type type)
Definition: local_util.cc:46
gpr_now
GPRAPI gpr_timespec gpr_now(gpr_clock_type clock)
grpc_end2end_local_fullstack_fixture_data
Definition: local_util.h:24
test_config.h
grpc_end2end_tests
void grpc_end2end_tests(int argc, char **argv, grpc_end2end_test_config config)
Definition: end2end_tests.cc:321
UDS
@ UDS
Definition: grpc_security_constants.h:143
chttp2_init_client_fullstack_uds
static void chttp2_init_client_fullstack_uds(grpc_end2end_test_fixture *f, const grpc_channel_args *client_args)
Definition: h2_local_abstract_uds_percent_encoded.cc:40
grpc::testing::TestEnvironment
Definition: test/core/util/test_config.h:54
grpc_end2end_local_chttp2_tear_down_fullstack
void grpc_end2end_local_chttp2_tear_down_fullstack(grpc_end2end_test_fixture *f)
Definition: local_util.cc:105
gpr_timespec
Definition: gpr_types.h:50
grpc_init
GRPCAPI void grpc_init(void)
Definition: init.cc:146
grpc_shutdown
GRPCAPI void grpc_shutdown(void)
Definition: init.cc:209
i
uint64_t i
Definition: abseil-cpp/absl/container/btree_benchmark.cc:230
FEATURE_MASK_SUPPORTS_CLIENT_CHANNEL
#define FEATURE_MASK_SUPPORTS_CLIENT_CHANNEL
Definition: end2end_tests.h:37


grpc
Author(s):
autogenerated on Fri May 16 2025 02:59:00