diff --git a/.travis.yml b/.travis.yml index d102f3d84777f0faccfebfcd2100bf568c51ae51..d770e7261f522f5575200b44318fed2a1e8c80c6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,14 @@ language: cpp -script: ./tools/run_tests/run_tests.py -lc -t -j2 +before_install: + - sudo add-apt-repository ppa:yjwong/gflags -y + - sudo apt-get update -qq + - sudo apt-get install -qq libgtest-dev libgflags-dev python-virtualenv +script: + - ./tools/run_tests/run_tests.py -l c -t -j 16 -c dbg -s 2.0 + - ./tools/run_tests/run_tests.py -l c++ -t -j 16 -c dbg -s 2.0 + - make clean + - ./tools/run_tests/run_tests.py -l c -t -j 16 -c opt -s 2.0 + - ./tools/run_tests/run_tests.py -l c++ -t -j 16 -c opt -s 2.0 + - ./tools/run_tests/run_tests.py -l node -t -j 16 -c opt notifications: email: false diff --git a/Makefile b/Makefile index 310f0dc5d956015a65cc261969bb5a5f267f728b..c850ec775337ff637294ff5decb9f8c20c3e61cd 100644 --- a/Makefile +++ b/Makefile @@ -77,7 +77,7 @@ LDXX_valgrind = g++ CPPFLAGS_valgrind = -O0 OPENSSL_CFLAGS_valgrind = -DPURIFY LDFLAGS_valgrind = -DEFINES_valgrind = _DEBUG DEBUG GRPC_TEST_SLOWDOWN_FACTOR=20 +DEFINES_valgrind = _DEBUG DEBUG GRPC_TEST_SLOWDOWN_BUILD_FACTOR=20 VALID_CONFIG_tsan = 1 REQUIRE_CUSTOM_LIBRARIES_tsan = 1 @@ -87,7 +87,7 @@ LD_tsan = clang LDXX_tsan = clang++ CPPFLAGS_tsan = -O1 -fsanitize=thread -fno-omit-frame-pointer LDFLAGS_tsan = -fsanitize=thread -DEFINES_tsan = NDEBUG GRPC_TEST_SLOWDOWN_FACTOR=10 +DEFINES_tsan = NDEBUG GRPC_TEST_SLOWDOWN_BUILD_FACTOR=10 VALID_CONFIG_asan = 1 REQUIRE_CUSTOM_LIBRARIES_asan = 1 @@ -97,7 +97,7 @@ LD_asan = clang LDXX_asan = clang++ CPPFLAGS_asan = -O1 -fsanitize=address -fno-omit-frame-pointer LDFLAGS_asan = -fsanitize=address -DEFINES_asan = NDEBUG GRPC_TEST_SLOWDOWN_FACTOR=5 +DEFINES_asan = NDEBUG GRPC_TEST_SLOWDOWN_BUILD_FACTOR=5 VALID_CONFIG_msan = 1 REQUIRE_CUSTOM_LIBRARIES_msan = 1 @@ -108,7 +108,7 @@ LDXX_msan = clang++-libc++ CPPFLAGS_msan = -O1 -fsanitize=memory -fsanitize-memory-track-origins -fno-omit-frame-pointer -DGTEST_HAS_TR1_TUPLE=0 -DGTEST_USE_OWN_TR1_TUPLE=1 OPENSSL_CFLAGS_msan = -DPURIFY LDFLAGS_msan = -fsanitize=memory -DGTEST_HAS_TR1_TUPLE=0 -DGTEST_USE_OWN_TR1_TUPLE=1 -DEFINES_msan = NDEBUG GRPC_TEST_SLOWDOWN_FACTOR=20 +DEFINES_msan = NDEBUG GRPC_TEST_SLOWDOWN_BUILD_FACTOR=20 VALID_CONFIG_ubsan = 1 REQUIRE_CUSTOM_LIBRARIES_ubsan = 1 @@ -119,7 +119,7 @@ LDXX_ubsan = clang++ CPPFLAGS_ubsan = -O1 -fsanitize=undefined -fno-omit-frame-pointer OPENSSL_CFLAGS_ubsan = -DPURIFY LDFLAGS_ubsan = -fsanitize=undefined -DEFINES_ubsan = NDEBUG GRPC_TEST_SLOWDOWN_FACTOR=10 +DEFINES_ubsan = NDEBUG GRPC_TEST_SLOWDOWN_BUILD_FACTOR=10 VALID_CONFIG_gcov = 1 CC_gcov = gcc @@ -143,7 +143,15 @@ CXX = $(CXX_$(CONFIG)) LD = $(LD_$(CONFIG)) LDXX = $(LDXX_$(CONFIG)) AR = ar +ifeq ($(SYSTEM),Linux) STRIP = strip --strip-unneeded +else +ifeq ($(SYSTEM),Darwin) +STRIP = strip -x +else +STRIP = strip +endif +endif INSTALL = install RM = rm -f @@ -152,6 +160,10 @@ $(error Invalid CONFIG value '$(CONFIG)') endif +# Detect if we can use C++11 +CXX11_CHECK_CMD = $(CXX) -std=c++11 -o /dev/null -c test/build/c++11.cc +HAS_CXX11 = $(shell $(CXX11_CHECK_CMD) 2> /dev/null && echo true || echo false) + # The HOST compiler settings are used to compile the protoc plugins. # In most cases, you won't have to change anything, but if you are # cross-compiling, you can override these variables from GNU make's @@ -166,8 +178,17 @@ CPPFLAGS += $(CPPFLAGS_$(CONFIG)) DEFINES += $(DEFINES_$(CONFIG)) INSTALL_PREFIX=\"$(prefix)\" LDFLAGS += $(LDFLAGS_$(CONFIG)) +ifdef EXTRA_DEFINES +DEFINES += $(EXTRA_DEFINES) +endif + CFLAGS += -std=c89 -pedantic +ifeq ($(HAS_CXX11),true) CXXFLAGS += -std=c++11 +else +CXXFLAGS += -std=c++0x +DEFINES += GRPC_OLD_CXX +endif CPPFLAGS += -g -fPIC -Wall -Wextra -Werror -Wno-long-long -Wno-unused-parameter LDFLAGS += -g -fPIC @@ -897,7 +918,11 @@ third_party/protobuf/configure: $(LIBDIR)/$(CONFIG)/protobuf/libprotobuf.a: third_party/protobuf/configure $(E) "[MAKE] Building protobuf" +ifeq ($(HAVE_CXX11),true) $(Q)(cd third_party/protobuf ; CC="$(CC)" CXX="$(CXX)" LDFLAGS="$(LDFLAGS_$(CONFIG)) -g" CXXFLAGS="-DLANG_CXX11 -std=c++11" CPPFLAGS="-fPIC $(CPPFLAGS_$(CONFIG)) -g" ./configure --disable-shared --enable-static) +else + $(Q)(cd third_party/protobuf ; CC="$(CC)" CXX="$(CXX)" LDFLAGS="$(LDFLAGS_$(CONFIG)) -g" CXXFLAGS="-std=c++0x" CPPFLAGS="-fPIC $(CPPFLAGS_$(CONFIG)) -g" ./configure --disable-shared --enable-static) +endif $(Q)$(MAKE) -C third_party/protobuf clean $(Q)$(MAKE) -C third_party/protobuf $(Q)mkdir -p $(LIBDIR)/$(CONFIG)/protobuf @@ -7476,13 +7501,24 @@ $(BINDIR)/$(CONFIG)/async_end2end_test: openssl_dep_error else -$(BINDIR)/$(CONFIG)/async_end2end_test: $(ASYNC_END2END_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a + +ifeq ($(NO_PROTOBUF),true) + +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.0.0+. + +$(BINDIR)/$(CONFIG)/async_end2end_test: protobuf_dep_error + +else + +$(BINDIR)/$(CONFIG)/async_end2end_test: $(PROTOBUF_DEP) $(ASYNC_END2END_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` $(Q) $(LDXX) $(LDFLAGS) $(ASYNC_END2END_TEST_OBJS) $(GTEST_LIB) $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/async_end2end_test endif +endif + $(OBJDIR)/$(CONFIG)/test/cpp/end2end/async_end2end_test.o: $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a deps_async_end2end_test: $(ASYNC_END2END_TEST_OBJS:.o=.dep) @@ -7507,13 +7543,24 @@ $(BINDIR)/$(CONFIG)/channel_arguments_test: openssl_dep_error else -$(BINDIR)/$(CONFIG)/channel_arguments_test: $(CHANNEL_ARGUMENTS_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a + +ifeq ($(NO_PROTOBUF),true) + +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.0.0+. + +$(BINDIR)/$(CONFIG)/channel_arguments_test: protobuf_dep_error + +else + +$(BINDIR)/$(CONFIG)/channel_arguments_test: $(PROTOBUF_DEP) $(CHANNEL_ARGUMENTS_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` $(Q) $(LDXX) $(LDFLAGS) $(CHANNEL_ARGUMENTS_TEST_OBJS) $(GTEST_LIB) $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/channel_arguments_test endif +endif + $(OBJDIR)/$(CONFIG)/test/cpp/client/channel_arguments_test.o: $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a deps_channel_arguments_test: $(CHANNEL_ARGUMENTS_TEST_OBJS:.o=.dep) @@ -7538,13 +7585,24 @@ $(BINDIR)/$(CONFIG)/credentials_test: openssl_dep_error else -$(BINDIR)/$(CONFIG)/credentials_test: $(CREDENTIALS_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a + +ifeq ($(NO_PROTOBUF),true) + +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.0.0+. + +$(BINDIR)/$(CONFIG)/credentials_test: protobuf_dep_error + +else + +$(BINDIR)/$(CONFIG)/credentials_test: $(PROTOBUF_DEP) $(CREDENTIALS_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` $(Q) $(LDXX) $(LDFLAGS) $(CREDENTIALS_TEST_OBJS) $(GTEST_LIB) $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/credentials_test endif +endif + $(OBJDIR)/$(CONFIG)/test/cpp/client/credentials_test.o: $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a deps_credentials_test: $(CREDENTIALS_TEST_OBJS:.o=.dep) @@ -7569,13 +7627,24 @@ $(BINDIR)/$(CONFIG)/end2end_test: openssl_dep_error else -$(BINDIR)/$(CONFIG)/end2end_test: $(END2END_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a + +ifeq ($(NO_PROTOBUF),true) + +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.0.0+. + +$(BINDIR)/$(CONFIG)/end2end_test: protobuf_dep_error + +else + +$(BINDIR)/$(CONFIG)/end2end_test: $(PROTOBUF_DEP) $(END2END_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` $(Q) $(LDXX) $(LDFLAGS) $(END2END_TEST_OBJS) $(GTEST_LIB) $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/end2end_test endif +endif + $(OBJDIR)/$(CONFIG)/test/cpp/end2end/end2end_test.o: $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a deps_end2end_test: $(END2END_TEST_OBJS:.o=.dep) @@ -7596,7 +7665,7 @@ GRPC_CPP_PLUGIN_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basen ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins if you don't have protobuf 3.0.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.0.0+. $(BINDIR)/$(CONFIG)/grpc_cpp_plugin: protobuf_dep_error @@ -7628,7 +7697,7 @@ GRPC_PYTHON_PLUGIN_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(ba ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins if you don't have protobuf 3.0.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.0.0+. $(BINDIR)/$(CONFIG)/grpc_python_plugin: protobuf_dep_error @@ -7660,7 +7729,7 @@ GRPC_RUBY_PLUGIN_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(base ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins if you don't have protobuf 3.0.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.0.0+. $(BINDIR)/$(CONFIG)/grpc_ruby_plugin: protobuf_dep_error @@ -7699,13 +7768,24 @@ $(BINDIR)/$(CONFIG)/interop_client: openssl_dep_error else -$(BINDIR)/$(CONFIG)/interop_client: $(INTEROP_CLIENT_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a + +ifeq ($(NO_PROTOBUF),true) + +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.0.0+. + +$(BINDIR)/$(CONFIG)/interop_client: protobuf_dep_error + +else + +$(BINDIR)/$(CONFIG)/interop_client: $(PROTOBUF_DEP) $(INTEROP_CLIENT_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` $(Q) $(LDXX) $(LDFLAGS) $(INTEROP_CLIENT_OBJS) $(GTEST_LIB) $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/interop_client endif +endif + $(OBJDIR)/$(CONFIG)/test/cpp/interop/empty.o: $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(OBJDIR)/$(CONFIG)/test/cpp/interop/messages.o: $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(OBJDIR)/$(CONFIG)/test/cpp/interop/test.o: $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a @@ -7736,13 +7816,24 @@ $(BINDIR)/$(CONFIG)/interop_server: openssl_dep_error else -$(BINDIR)/$(CONFIG)/interop_server: $(INTEROP_SERVER_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a + +ifeq ($(NO_PROTOBUF),true) + +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.0.0+. + +$(BINDIR)/$(CONFIG)/interop_server: protobuf_dep_error + +else + +$(BINDIR)/$(CONFIG)/interop_server: $(PROTOBUF_DEP) $(INTEROP_SERVER_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` $(Q) $(LDXX) $(LDFLAGS) $(INTEROP_SERVER_OBJS) $(GTEST_LIB) $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/interop_server endif +endif + $(OBJDIR)/$(CONFIG)/test/cpp/interop/empty.o: $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(OBJDIR)/$(CONFIG)/test/cpp/interop/messages.o: $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(OBJDIR)/$(CONFIG)/test/cpp/interop/test.o: $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a @@ -7770,13 +7861,24 @@ $(BINDIR)/$(CONFIG)/interop_test: openssl_dep_error else -$(BINDIR)/$(CONFIG)/interop_test: $(INTEROP_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a + +ifeq ($(NO_PROTOBUF),true) + +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.0.0+. + +$(BINDIR)/$(CONFIG)/interop_test: protobuf_dep_error + +else + +$(BINDIR)/$(CONFIG)/interop_test: $(PROTOBUF_DEP) $(INTEROP_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` $(Q) $(LDXX) $(LDFLAGS) $(INTEROP_TEST_OBJS) $(GTEST_LIB) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/interop_test endif +endif + $(OBJDIR)/$(CONFIG)/test/cpp/interop/interop_test.o: $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a deps_interop_test: $(INTEROP_TEST_OBJS:.o=.dep) @@ -7801,13 +7903,24 @@ $(BINDIR)/$(CONFIG)/pubsub_client: openssl_dep_error else -$(BINDIR)/$(CONFIG)/pubsub_client: $(PUBSUB_CLIENT_OBJS) $(LIBDIR)/$(CONFIG)/libpubsub_client_lib.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a + +ifeq ($(NO_PROTOBUF),true) + +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.0.0+. + +$(BINDIR)/$(CONFIG)/pubsub_client: protobuf_dep_error + +else + +$(BINDIR)/$(CONFIG)/pubsub_client: $(PROTOBUF_DEP) $(PUBSUB_CLIENT_OBJS) $(LIBDIR)/$(CONFIG)/libpubsub_client_lib.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` $(Q) $(LDXX) $(LDFLAGS) $(PUBSUB_CLIENT_OBJS) $(GTEST_LIB) $(LIBDIR)/$(CONFIG)/libpubsub_client_lib.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/pubsub_client endif +endif + $(OBJDIR)/$(CONFIG)/examples/pubsub/main.o: $(LIBDIR)/$(CONFIG)/libpubsub_client_lib.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a deps_pubsub_client: $(PUBSUB_CLIENT_OBJS:.o=.dep) @@ -7832,13 +7945,24 @@ $(BINDIR)/$(CONFIG)/pubsub_publisher_test: openssl_dep_error else -$(BINDIR)/$(CONFIG)/pubsub_publisher_test: $(PUBSUB_PUBLISHER_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libpubsub_client_lib.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a + +ifeq ($(NO_PROTOBUF),true) + +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.0.0+. + +$(BINDIR)/$(CONFIG)/pubsub_publisher_test: protobuf_dep_error + +else + +$(BINDIR)/$(CONFIG)/pubsub_publisher_test: $(PROTOBUF_DEP) $(PUBSUB_PUBLISHER_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libpubsub_client_lib.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` $(Q) $(LDXX) $(LDFLAGS) $(PUBSUB_PUBLISHER_TEST_OBJS) $(GTEST_LIB) $(LIBDIR)/$(CONFIG)/libpubsub_client_lib.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/pubsub_publisher_test endif +endif + $(OBJDIR)/$(CONFIG)/examples/pubsub/publisher_test.o: $(LIBDIR)/$(CONFIG)/libpubsub_client_lib.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a deps_pubsub_publisher_test: $(PUBSUB_PUBLISHER_TEST_OBJS:.o=.dep) @@ -7863,13 +7987,24 @@ $(BINDIR)/$(CONFIG)/pubsub_subscriber_test: openssl_dep_error else -$(BINDIR)/$(CONFIG)/pubsub_subscriber_test: $(PUBSUB_SUBSCRIBER_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libpubsub_client_lib.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a + +ifeq ($(NO_PROTOBUF),true) + +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.0.0+. + +$(BINDIR)/$(CONFIG)/pubsub_subscriber_test: protobuf_dep_error + +else + +$(BINDIR)/$(CONFIG)/pubsub_subscriber_test: $(PROTOBUF_DEP) $(PUBSUB_SUBSCRIBER_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libpubsub_client_lib.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` $(Q) $(LDXX) $(LDFLAGS) $(PUBSUB_SUBSCRIBER_TEST_OBJS) $(GTEST_LIB) $(LIBDIR)/$(CONFIG)/libpubsub_client_lib.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/pubsub_subscriber_test endif +endif + $(OBJDIR)/$(CONFIG)/examples/pubsub/subscriber_test.o: $(LIBDIR)/$(CONFIG)/libpubsub_client_lib.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a deps_pubsub_subscriber_test: $(PUBSUB_SUBSCRIBER_TEST_OBJS:.o=.dep) @@ -7895,13 +8030,24 @@ $(BINDIR)/$(CONFIG)/qps_client: openssl_dep_error else -$(BINDIR)/$(CONFIG)/qps_client: $(QPS_CLIENT_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a + +ifeq ($(NO_PROTOBUF),true) + +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.0.0+. + +$(BINDIR)/$(CONFIG)/qps_client: protobuf_dep_error + +else + +$(BINDIR)/$(CONFIG)/qps_client: $(PROTOBUF_DEP) $(QPS_CLIENT_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` $(Q) $(LDXX) $(LDFLAGS) $(QPS_CLIENT_OBJS) $(GTEST_LIB) $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/qps_client endif +endif + $(OBJDIR)/$(CONFIG)/test/cpp/qps/qpstest.o: $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(OBJDIR)/$(CONFIG)/test/cpp/qps/client.o: $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a @@ -7928,13 +8074,24 @@ $(BINDIR)/$(CONFIG)/qps_server: openssl_dep_error else -$(BINDIR)/$(CONFIG)/qps_server: $(QPS_SERVER_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a + +ifeq ($(NO_PROTOBUF),true) + +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.0.0+. + +$(BINDIR)/$(CONFIG)/qps_server: protobuf_dep_error + +else + +$(BINDIR)/$(CONFIG)/qps_server: $(PROTOBUF_DEP) $(QPS_SERVER_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` $(Q) $(LDXX) $(LDFLAGS) $(QPS_SERVER_OBJS) $(GTEST_LIB) $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/qps_server endif +endif + $(OBJDIR)/$(CONFIG)/test/cpp/qps/qpstest.o: $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(OBJDIR)/$(CONFIG)/test/cpp/qps/server.o: $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a @@ -7960,13 +8117,24 @@ $(BINDIR)/$(CONFIG)/status_test: openssl_dep_error else -$(BINDIR)/$(CONFIG)/status_test: $(STATUS_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a + +ifeq ($(NO_PROTOBUF),true) + +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.0.0+. + +$(BINDIR)/$(CONFIG)/status_test: protobuf_dep_error + +else + +$(BINDIR)/$(CONFIG)/status_test: $(PROTOBUF_DEP) $(STATUS_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` $(Q) $(LDXX) $(LDFLAGS) $(STATUS_TEST_OBJS) $(GTEST_LIB) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/status_test endif +endif + $(OBJDIR)/$(CONFIG)/test/cpp/util/status_test.o: $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a deps_status_test: $(STATUS_TEST_OBJS:.o=.dep) @@ -7991,13 +8159,24 @@ $(BINDIR)/$(CONFIG)/thread_pool_test: openssl_dep_error else -$(BINDIR)/$(CONFIG)/thread_pool_test: $(THREAD_POOL_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a + +ifeq ($(NO_PROTOBUF),true) + +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.0.0+. + +$(BINDIR)/$(CONFIG)/thread_pool_test: protobuf_dep_error + +else + +$(BINDIR)/$(CONFIG)/thread_pool_test: $(PROTOBUF_DEP) $(THREAD_POOL_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` $(Q) $(LDXX) $(LDFLAGS) $(THREAD_POOL_TEST_OBJS) $(GTEST_LIB) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/thread_pool_test endif +endif + $(OBJDIR)/$(CONFIG)/test/cpp/server/thread_pool_test.o: $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a deps_thread_pool_test: $(THREAD_POOL_TEST_OBJS:.o=.dep) diff --git a/PATENTS b/PATENTS new file mode 100644 index 0000000000000000000000000000000000000000..619f9dbfe637f648ce4e57d94b7b23797b37a9b8 --- /dev/null +++ b/PATENTS @@ -0,0 +1,22 @@ +Additional IP Rights Grant (Patents) + +"This implementation" means the copyrightable works distributed by +Google as part of the GRPC project. + +Google hereby grants to You a perpetual, worldwide, non-exclusive, +no-charge, royalty-free, irrevocable (except as stated in this section) +patent license to make, have made, use, offer to sell, sell, import, +transfer and otherwise run, modify and propagate the contents of this +implementation of GRPC, where such license applies only to those patent +claims, both currently owned or controlled by Google and acquired in +the future, licensable by Google that are necessarily infringed by this +implementation of GRPC. This grant does not include claims that would be +infringed only as a consequence of further modification of this +implementation. If you or your agent or exclusive licensee institute or +order or agree to the institution of patent litigation against any +entity (including a cross-claim or counterclaim in a lawsuit) alleging +that this implementation of GRPC or any code incorporated within this +implementation of GRPC constitutes direct or contributory patent +infringement, or inducement of patent infringement, then any patent +rights granted to you under this License for this implementation of GRPC +shall terminate as of the date such litigation is filed. diff --git a/build.json b/build.json index 96437d0a66f8a086a9d36e30fbf7267a2d063775..2079b2cce7909699dcb17cdd5b9ff0b7aa039821 100644 --- a/build.json +++ b/build.json @@ -866,7 +866,8 @@ "grpc", "gpr_test_util", "gpr" - ] + ], + "flaky": true }, { "name": "fling_test", @@ -880,7 +881,8 @@ "grpc", "gpr_test_util", "gpr" - ] + ], + "flaky": true }, { "name": "gen_hpack_tables", diff --git a/examples/pubsub/publisher_test.cc b/examples/pubsub/publisher_test.cc index 4539557a35b64310c9fa9638665afdedd1aeaddf..c988b4802ebacc3fc658a2c348607f7fafb33640 100644 --- a/examples/pubsub/publisher_test.cc +++ b/examples/pubsub/publisher_test.cc @@ -61,28 +61,28 @@ class PublisherServiceImpl : public tech::pubsub::PublisherService::Service { public: Status CreateTopic(::grpc::ServerContext* context, const ::tech::pubsub::Topic* request, - ::tech::pubsub::Topic* response) override { + ::tech::pubsub::Topic* response) GRPC_OVERRIDE { EXPECT_EQ(request->name(), kTopic); return Status::OK; } Status Publish(ServerContext* context, const ::tech::pubsub::PublishRequest* request, - ::proto2::Empty* response) override { + ::proto2::Empty* response) GRPC_OVERRIDE { EXPECT_EQ(request->message().data(), kMessageData); return Status::OK; } Status GetTopic(ServerContext* context, const ::tech::pubsub::GetTopicRequest* request, - ::tech::pubsub::Topic* response) override { + ::tech::pubsub::Topic* response) GRPC_OVERRIDE { EXPECT_EQ(request->topic(), kTopic); return Status::OK; } - Status ListTopics(ServerContext* context, - const ::tech::pubsub::ListTopicsRequest* request, - ::tech::pubsub::ListTopicsResponse* response) override { + Status ListTopics( + ServerContext* context, const ::tech::pubsub::ListTopicsRequest* request, + ::tech::pubsub::ListTopicsResponse* response) GRPC_OVERRIDE { std::ostringstream ss; ss << "cloud.googleapis.com/project in (/projects/" << kProjectId << ")"; EXPECT_EQ(request->query(), ss.str()); @@ -92,7 +92,7 @@ class PublisherServiceImpl : public tech::pubsub::PublisherService::Service { Status DeleteTopic(ServerContext* context, const ::tech::pubsub::DeleteTopicRequest* request, - ::proto2::Empty* response) override { + ::proto2::Empty* response) GRPC_OVERRIDE { EXPECT_EQ(request->topic(), kTopic); return Status::OK; } @@ -102,7 +102,7 @@ class PublisherServiceImpl : public tech::pubsub::PublisherService::Service { class PublisherTest : public ::testing::Test { protected: // Setup a server and a client for PublisherService. - void SetUp() override { + void SetUp() GRPC_OVERRIDE { int port = grpc_pick_unused_port_or_die(); server_address_ << "localhost:" << port; ServerBuilder builder; @@ -116,7 +116,7 @@ class PublisherTest : public ::testing::Test { publisher_.reset(new grpc::examples::pubsub::Publisher(channel_)); } - void TearDown() override { + void TearDown() GRPC_OVERRIDE { server_->Shutdown(); publisher_->Shutdown(); } diff --git a/examples/pubsub/subscriber_test.cc b/examples/pubsub/subscriber_test.cc index c634aa4f82363cafa7a3a6fd670a7e0c5a411398..4ff125f4b3ae9d0dd068f39d8e72a7c898455602 100644 --- a/examples/pubsub/subscriber_test.cc +++ b/examples/pubsub/subscriber_test.cc @@ -57,9 +57,9 @@ const char kData[] = "Message data"; class SubscriberServiceImpl : public tech::pubsub::SubscriberService::Service { public: - Status CreateSubscription(ServerContext* context, - const tech::pubsub::Subscription* request, - tech::pubsub::Subscription* response) override { + Status CreateSubscription( + ServerContext* context, const tech::pubsub::Subscription* request, + tech::pubsub::Subscription* response) GRPC_OVERRIDE { EXPECT_EQ(request->topic(), kTopic); EXPECT_EQ(request->name(), kSubscriptionName); return Status::OK; @@ -67,7 +67,7 @@ class SubscriberServiceImpl : public tech::pubsub::SubscriberService::Service { Status GetSubscription(ServerContext* context, const tech::pubsub::GetSubscriptionRequest* request, - tech::pubsub::Subscription* response) override { + tech::pubsub::Subscription* response) GRPC_OVERRIDE { EXPECT_EQ(request->subscription(), kSubscriptionName); response->set_topic(kTopic); return Status::OK; @@ -76,14 +76,13 @@ class SubscriberServiceImpl : public tech::pubsub::SubscriberService::Service { Status DeleteSubscription( ServerContext* context, const tech::pubsub::DeleteSubscriptionRequest* request, - proto2::Empty* response) override { + proto2::Empty* response) GRPC_OVERRIDE { EXPECT_EQ(request->subscription(), kSubscriptionName); return Status::OK; } - Status Pull(ServerContext* context, - const tech::pubsub::PullRequest* request, - tech::pubsub::PullResponse* response) override { + Status Pull(ServerContext* context, const tech::pubsub::PullRequest* request, + tech::pubsub::PullResponse* response) GRPC_OVERRIDE { EXPECT_EQ(request->subscription(), kSubscriptionName); response->set_ack_id("1"); response->mutable_pubsub_event()->mutable_message()->set_data(kData); @@ -92,7 +91,7 @@ class SubscriberServiceImpl : public tech::pubsub::SubscriberService::Service { Status Acknowledge(ServerContext* context, const tech::pubsub::AcknowledgeRequest* request, - proto2::Empty* response) override { + proto2::Empty* response) GRPC_OVERRIDE { return Status::OK; } @@ -101,7 +100,7 @@ class SubscriberServiceImpl : public tech::pubsub::SubscriberService::Service { class SubscriberTest : public ::testing::Test { protected: // Setup a server and a client for SubscriberService. - void SetUp() override { + void SetUp() GRPC_OVERRIDE { int port = grpc_pick_unused_port_or_die(); server_address_ << "localhost:" << port; ServerBuilder builder; @@ -115,7 +114,7 @@ class SubscriberTest : public ::testing::Test { subscriber_.reset(new grpc::examples::pubsub::Subscriber(channel_)); } - void TearDown() override { + void TearDown() GRPC_OVERRIDE { server_->Shutdown(); subscriber_->Shutdown(); } diff --git a/include/grpc++/async_unary_call.h b/include/grpc++/async_unary_call.h index b4a654c4a9886df289c4e257c1d319a69b2f3e27..ccd0806b285e2be1240a8dc2bb9ff2c0194d3842 100644 --- a/include/grpc++/async_unary_call.h +++ b/include/grpc++/async_unary_call.h @@ -45,7 +45,7 @@ namespace grpc { template <class R> -class ClientAsyncResponseReader final { +class ClientAsyncResponseReader GRPC_FINAL { public: ClientAsyncResponseReader(ChannelInterface* channel, CompletionQueue* cq, const RpcMethod& method, ClientContext* context, @@ -79,7 +79,7 @@ class ClientAsyncResponseReader final { private: - ClientContext* context_ = nullptr; + ClientContext* context_; Call call_; CallOpBuffer init_buf_; CallOpBuffer meta_buf_; @@ -87,7 +87,8 @@ class ClientAsyncResponseReader final { }; template <class W> -class ServerAsyncResponseWriter final : public ServerAsyncStreamingInterface { +class ServerAsyncResponseWriter GRPC_FINAL + : public ServerAsyncStreamingInterface { public: explicit ServerAsyncResponseWriter(ServerContext* ctx) : call_(nullptr, nullptr, nullptr), ctx_(ctx) {} @@ -127,7 +128,7 @@ class ServerAsyncResponseWriter final : public ServerAsyncStreamingInterface { } private: - void BindCall(Call* call) override { call_ = *call; } + void BindCall(Call* call) GRPC_OVERRIDE { call_ = *call; } Call call_; ServerContext* ctx_; diff --git a/include/grpc++/client_context.h b/include/grpc++/client_context.h index 1e7e6bfad7c5119cdf3793b0be8058bd75424498..c5a213e848d198a68803ee6a8fe217e1b27b2df1 100644 --- a/include/grpc++/client_context.h +++ b/include/grpc++/client_context.h @@ -139,7 +139,7 @@ class ClientContext { return authority_; } - bool initial_metadata_received_ = false; + bool initial_metadata_received_; grpc_call *call_; grpc_completion_queue *cq_; gpr_timespec absolute_deadline_; diff --git a/include/grpc++/config.h b/include/grpc++/config.h index 2dced12e37908578d64c0ce191f6de45b38e9cb5..323ea286326a994518ba95e5d55ded0f9d5c1b25 100644 --- a/include/grpc++/config.h +++ b/include/grpc++/config.h @@ -36,6 +36,14 @@ #include <string> +#ifdef GRPC_OLD_CXX +#define GRPC_FINAL +#define GRPC_OVERRIDE +#else +#define GRPC_FINAL final +#define GRPC_OVERRIDE override +#endif + namespace grpc { typedef std::string string; diff --git a/include/grpc++/credentials.h b/include/grpc++/credentials.h index 5cbcca3aa5e64c1d6e787e81550d7aa320f2c3de..b75755d5bc603adba0bd37d26994a23271cf5248 100644 --- a/include/grpc++/credentials.h +++ b/include/grpc++/credentials.h @@ -47,7 +47,7 @@ namespace grpc { // to creating an instance using CredentialsFactory, and passing it down // during channel construction. -class Credentials final { +class Credentials GRPC_FINAL { public: ~Credentials(); diff --git a/include/grpc++/impl/call.h b/include/grpc++/impl/call.h index 341710f7a2e57b7e6a76b7b0c7d01b274dd5901b..92ad0c71b7bf3033f1c672eae0f5254a8c012b12 100644 --- a/include/grpc++/impl/call.h +++ b/include/grpc++/impl/call.h @@ -35,6 +35,7 @@ #define __GRPCPP_CALL_H__ #include <grpc/grpc.h> +#include <grpc++/config.h> #include <grpc++/status.h> #include <grpc++/completion_queue.h> @@ -56,7 +57,7 @@ class Call; class CallOpBuffer : public CompletionQueueTag { public: - CallOpBuffer() : return_tag_(this) {} + CallOpBuffer(); ~CallOpBuffer(); void Reset(void *next_return_tag); @@ -80,40 +81,40 @@ class CallOpBuffer : public CompletionQueueTag { void FillOps(grpc_op *ops, size_t *nops); // Called by completion queue just prior to returning from Next() or Pluck() - bool FinalizeResult(void **tag, bool *status) override; + bool FinalizeResult(void **tag, bool *status) GRPC_OVERRIDE; - bool got_message = false; + bool got_message; private: - void *return_tag_ = nullptr; + void *return_tag_; // Send initial metadata - bool send_initial_metadata_ = false; - size_t initial_metadata_count_ = 0; - grpc_metadata *initial_metadata_ = nullptr; + bool send_initial_metadata_; + size_t initial_metadata_count_; + grpc_metadata *initial_metadata_; // Recv initial metadta - std::multimap<grpc::string, grpc::string> *recv_initial_metadata_ = nullptr; - grpc_metadata_array recv_initial_metadata_arr_ = {0, 0, nullptr}; + std::multimap<grpc::string, grpc::string> *recv_initial_metadata_; + grpc_metadata_array recv_initial_metadata_arr_; // Send message - const google::protobuf::Message *send_message_ = nullptr; - grpc_byte_buffer *send_message_buf_ = nullptr; + const google::protobuf::Message *send_message_; + grpc_byte_buffer *send_message_buf_; // Recv message - google::protobuf::Message *recv_message_ = nullptr; - grpc_byte_buffer *recv_message_buf_ = nullptr; + google::protobuf::Message *recv_message_; + grpc_byte_buffer *recv_message_buf_; // Client send close - bool client_send_close_ = false; + bool client_send_close_; // Client recv status - std::multimap<grpc::string, grpc::string> *recv_trailing_metadata_ = nullptr; - Status *recv_status_ = nullptr; - grpc_metadata_array recv_trailing_metadata_arr_ = {0, 0, nullptr}; - grpc_status_code status_code_ = GRPC_STATUS_OK; - char *status_details_ = nullptr; - size_t status_details_capacity_ = 0; + std::multimap<grpc::string, grpc::string> *recv_trailing_metadata_; + Status *recv_status_; + grpc_metadata_array recv_trailing_metadata_arr_; + grpc_status_code status_code_; + char *status_details_; + size_t status_details_capacity_; // Server send status - const Status *send_status_ = nullptr; - size_t trailing_metadata_count_ = 0; - grpc_metadata *trailing_metadata_ = nullptr; + const Status *send_status_; + size_t trailing_metadata_count_; + grpc_metadata *trailing_metadata_; int cancelled_buf_; - bool *recv_closed_ = nullptr; + bool *recv_closed_; }; // Channel and Server implement this to allow them to hook performing ops @@ -124,7 +125,7 @@ class CallHook { }; // Straightforward wrapping of the C call object -class Call final { +class Call GRPC_FINAL { public: /* call is owned by the caller */ Call(grpc_call *call, CallHook *call_hook_, CompletionQueue *cq); diff --git a/include/grpc++/impl/rpc_service_method.h b/include/grpc++/impl/rpc_service_method.h index ffd5c34ef6dfffe7ed405ec30a41eaefa0fc269a..a8794bcd76a0a340a32fd1f3193c45efa4f874c0 100644 --- a/include/grpc++/impl/rpc_service_method.h +++ b/include/grpc++/impl/rpc_service_method.h @@ -77,7 +77,7 @@ class RpcMethodHandler : public MethodHandler { ServiceType* service) : func_(func), service_(service) {} - Status RunHandler(const HandlerParameter& param) final { + Status RunHandler(const HandlerParameter& param) GRPC_FINAL { // Invoke application function, cast proto messages to their actual types. return func_(service_, param.server_context, dynamic_cast<const RequestType*>(param.request), @@ -102,7 +102,7 @@ class ClientStreamingHandler : public MethodHandler { ServiceType* service) : func_(func), service_(service) {} - Status RunHandler(const HandlerParameter& param) final { + Status RunHandler(const HandlerParameter& param) GRPC_FINAL { ServerReader<RequestType> reader(param.call, param.server_context); return func_(service_, param.server_context, &reader, dynamic_cast<ResponseType*>(param.response)); @@ -124,7 +124,7 @@ class ServerStreamingHandler : public MethodHandler { ServiceType* service) : func_(func), service_(service) {} - Status RunHandler(const HandlerParameter& param) final { + Status RunHandler(const HandlerParameter& param) GRPC_FINAL { ServerWriter<ResponseType> writer(param.call, param.server_context); return func_(service_, param.server_context, dynamic_cast<const RequestType*>(param.request), &writer); @@ -147,7 +147,7 @@ class BidiStreamingHandler : public MethodHandler { ServiceType* service) : func_(func), service_(service) {} - Status RunHandler(const HandlerParameter& param) final { + Status RunHandler(const HandlerParameter& param) GRPC_FINAL { ServerReaderWriter<ResponseType, RequestType> stream(param.call, param.server_context); return func_(service_, param.server_context, &stream); diff --git a/include/grpc++/impl/service_type.h b/include/grpc++/impl/service_type.h index cafa2696ab219fda21c5a1bafc277bbd9d2b5848..e54c3c24e198135238a0bc0d1e7178d5e51d77d2 100644 --- a/include/grpc++/impl/service_type.h +++ b/include/grpc++/impl/service_type.h @@ -79,7 +79,11 @@ class AsynchronousService { AsynchronousService(CompletionQueue* cq, const char** method_names, size_t method_count) - : cq_(cq), method_names_(method_names), method_count_(method_count) {} + : cq_(cq), + dispatch_impl_(nullptr), + method_names_(method_names), + method_count_(method_count), + request_args_(nullptr) {} ~AsynchronousService() { delete[] request_args_; } @@ -116,10 +120,10 @@ class AsynchronousService { private: friend class Server; CompletionQueue* const cq_; - DispatchImpl* dispatch_impl_ = nullptr; + DispatchImpl* dispatch_impl_; const char** const method_names_; size_t method_count_; - void** request_args_ = nullptr; + void** request_args_; }; } // namespace grpc diff --git a/include/grpc++/server.h b/include/grpc++/server.h index 429c0ff3cf8579b9f70b3c48ca87f85838780761..46c4a6223508602406751aee9121a864bdc308bc 100644 --- a/include/grpc++/server.h +++ b/include/grpc++/server.h @@ -61,8 +61,8 @@ class ServerCredentials; class ThreadPoolInterface; // Currently it only supports handling rpcs in a single thread. -class Server final : private CallHook, - private AsynchronousService::DispatchImpl { +class Server GRPC_FINAL : private CallHook, + private AsynchronousService::DispatchImpl { public: ~Server(); @@ -97,7 +97,7 @@ class Server final : private CallHook, void RunRpc(); void ScheduleCallback(); - void PerformOpsOnCall(CallOpBuffer* ops, Call* call) override; + void PerformOpsOnCall(CallOpBuffer* ops, Call* call) GRPC_OVERRIDE; // DispatchImpl void RequestAsyncCall(void* registered_method, ServerContext* context, diff --git a/include/grpc++/server_builder.h b/include/grpc++/server_builder.h index 4545c413d25f1d07e7dc09daabd1438c995c1f5d..b672eb3e6ace871ee86de89112d93200c41006ec 100644 --- a/include/grpc++/server_builder.h +++ b/include/grpc++/server_builder.h @@ -83,7 +83,7 @@ class ServerBuilder { std::vector<AsynchronousService*> async_services_; std::vector<grpc::string> ports_; std::shared_ptr<ServerCredentials> creds_; - ThreadPoolInterface* thread_pool_ = nullptr; + ThreadPoolInterface* thread_pool_; }; } // namespace grpc diff --git a/include/grpc++/server_context.h b/include/grpc++/server_context.h index d327d8b41e59a1061542bab6b6efcc33c68bb0ba..6db767f05a45af62004edb2aac136a17c4fc69e3 100644 --- a/include/grpc++/server_context.h +++ b/include/grpc++/server_context.h @@ -66,7 +66,7 @@ class CompletionQueue; class Server; // Interface of server side rpc context. -class ServerContext final { +class ServerContext GRPC_FINAL { public: ServerContext(); // for async calls ~ServerContext(); @@ -108,12 +108,12 @@ class ServerContext final { ServerContext(gpr_timespec deadline, grpc_metadata* metadata, size_t metadata_count); - CompletionOp* completion_op_ = nullptr; + CompletionOp* completion_op_; std::chrono::system_clock::time_point deadline_; - grpc_call* call_ = nullptr; - CompletionQueue* cq_ = nullptr; - bool sent_initial_metadata_ = false; + grpc_call* call_; + CompletionQueue* cq_; + bool sent_initial_metadata_; std::multimap<grpc::string, grpc::string> client_metadata_; std::multimap<grpc::string, grpc::string> initial_metadata_; std::multimap<grpc::string, grpc::string> trailing_metadata_; diff --git a/include/grpc++/server_credentials.h b/include/grpc++/server_credentials.h index 5c6787a07705d13ef9e12c7581695f4a4d45868a..8af41597ac473b39f291542929515255e136d291 100644 --- a/include/grpc++/server_credentials.h +++ b/include/grpc++/server_credentials.h @@ -44,7 +44,7 @@ struct grpc_server_credentials; namespace grpc { // grpc_server_credentials wrapper class. -class ServerCredentials final { +class ServerCredentials GRPC_FINAL { public: ~ServerCredentials(); diff --git a/include/grpc++/stream.h b/include/grpc++/stream.h index cd95ff7c92f78e6b06d06bbaec52c665262e6feb..8bcc75bce314ccf2d35a03a593c1e7f4d88aa707 100644 --- a/include/grpc++/stream.h +++ b/include/grpc++/stream.h @@ -83,8 +83,8 @@ class WriterInterface { }; template <class R> -class ClientReader final : public ClientStreamingInterface, - public ReaderInterface<R> { +class ClientReader GRPC_FINAL : public ClientStreamingInterface, + public ReaderInterface<R> { public: // Blocking create a stream and write the first request out. ClientReader(ChannelInterface* channel, const RpcMethod& method, @@ -111,7 +111,7 @@ class ClientReader final : public ClientStreamingInterface, GPR_ASSERT(cq_.Pluck(&buf)); } - virtual bool Read(R* msg) override { + virtual bool Read(R* msg) GRPC_OVERRIDE { CallOpBuffer buf; if (!context_->initial_metadata_received_) { buf.AddRecvInitialMetadata(context_); @@ -121,7 +121,7 @@ class ClientReader final : public ClientStreamingInterface, return cq_.Pluck(&buf) && buf.got_message; } - virtual Status Finish() override { + virtual Status Finish() GRPC_OVERRIDE { CallOpBuffer buf; Status status; buf.AddClientRecvStatus(context_, &status); @@ -137,8 +137,8 @@ class ClientReader final : public ClientStreamingInterface, }; template <class W> -class ClientWriter final : public ClientStreamingInterface, - public WriterInterface<W> { +class ClientWriter GRPC_FINAL : public ClientStreamingInterface, + public WriterInterface<W> { public: // Blocking create a stream. ClientWriter(ChannelInterface* channel, const RpcMethod& method, @@ -152,7 +152,7 @@ class ClientWriter final : public ClientStreamingInterface, cq_.Pluck(&buf); } - virtual bool Write(const W& msg) override { + virtual bool Write(const W& msg) GRPC_OVERRIDE { CallOpBuffer buf; buf.AddSendMessage(msg); call_.PerformOps(&buf); @@ -167,7 +167,7 @@ class ClientWriter final : public ClientStreamingInterface, } // Read the final response and wait for the final status. - virtual Status Finish() override { + virtual Status Finish() GRPC_OVERRIDE { CallOpBuffer buf; Status status; buf.AddRecvMessage(response_); @@ -186,9 +186,9 @@ class ClientWriter final : public ClientStreamingInterface, // Client-side interface for bi-directional streaming. template <class W, class R> -class ClientReaderWriter final : public ClientStreamingInterface, - public WriterInterface<W>, - public ReaderInterface<R> { +class ClientReaderWriter GRPC_FINAL : public ClientStreamingInterface, + public WriterInterface<W>, + public ReaderInterface<R> { public: // Blocking create a stream. ClientReaderWriter(ChannelInterface* channel, const RpcMethod& method, @@ -213,7 +213,7 @@ class ClientReaderWriter final : public ClientStreamingInterface, GPR_ASSERT(cq_.Pluck(&buf)); } - virtual bool Read(R* msg) override { + virtual bool Read(R* msg) GRPC_OVERRIDE { CallOpBuffer buf; if (!context_->initial_metadata_received_) { buf.AddRecvInitialMetadata(context_); @@ -223,7 +223,7 @@ class ClientReaderWriter final : public ClientStreamingInterface, return cq_.Pluck(&buf) && buf.got_message; } - virtual bool Write(const W& msg) override { + virtual bool Write(const W& msg) GRPC_OVERRIDE { CallOpBuffer buf; buf.AddSendMessage(msg); call_.PerformOps(&buf); @@ -237,7 +237,7 @@ class ClientReaderWriter final : public ClientStreamingInterface, return cq_.Pluck(&buf); } - virtual Status Finish() override { + virtual Status Finish() GRPC_OVERRIDE { CallOpBuffer buf; Status status; buf.AddClientRecvStatus(context_, &status); @@ -253,7 +253,7 @@ class ClientReaderWriter final : public ClientStreamingInterface, }; template <class R> -class ServerReader final : public ReaderInterface<R> { +class ServerReader GRPC_FINAL : public ReaderInterface<R> { public: ServerReader(Call* call, ServerContext* ctx) : call_(call), ctx_(ctx) {} @@ -267,7 +267,7 @@ class ServerReader final : public ReaderInterface<R> { call_->cq()->Pluck(&buf); } - virtual bool Read(R* msg) override { + virtual bool Read(R* msg) GRPC_OVERRIDE { CallOpBuffer buf; buf.AddRecvMessage(msg); call_->PerformOps(&buf); @@ -280,7 +280,7 @@ class ServerReader final : public ReaderInterface<R> { }; template <class W> -class ServerWriter final : public WriterInterface<W> { +class ServerWriter GRPC_FINAL : public WriterInterface<W> { public: ServerWriter(Call* call, ServerContext* ctx) : call_(call), ctx_(ctx) {} @@ -294,7 +294,7 @@ class ServerWriter final : public WriterInterface<W> { call_->cq()->Pluck(&buf); } - virtual bool Write(const W& msg) override { + virtual bool Write(const W& msg) GRPC_OVERRIDE { CallOpBuffer buf; if (!ctx_->sent_initial_metadata_) { buf.AddSendInitialMetadata(&ctx_->initial_metadata_); @@ -312,8 +312,8 @@ class ServerWriter final : public WriterInterface<W> { // Server-side interface for bi-directional streaming. template <class W, class R> -class ServerReaderWriter final : public WriterInterface<W>, - public ReaderInterface<R> { +class ServerReaderWriter GRPC_FINAL : public WriterInterface<W>, + public ReaderInterface<R> { public: ServerReaderWriter(Call* call, ServerContext* ctx) : call_(call), ctx_(ctx) {} @@ -327,14 +327,14 @@ class ServerReaderWriter final : public WriterInterface<W>, call_->cq()->Pluck(&buf); } - virtual bool Read(R* msg) override { + virtual bool Read(R* msg) GRPC_OVERRIDE { CallOpBuffer buf; buf.AddRecvMessage(msg); call_->PerformOps(&buf); return call_->cq()->Pluck(&buf) && buf.got_message; } - virtual bool Write(const W& msg) override { + virtual bool Write(const W& msg) GRPC_OVERRIDE { CallOpBuffer buf; if (!ctx_->sent_initial_metadata_) { buf.AddSendInitialMetadata(&ctx_->initial_metadata_); @@ -380,8 +380,8 @@ class AsyncWriterInterface { }; template <class R> -class ClientAsyncReader final : public ClientAsyncStreamingInterface, - public AsyncReaderInterface<R> { +class ClientAsyncReader GRPC_FINAL : public ClientAsyncStreamingInterface, + public AsyncReaderInterface<R> { public: // Create a stream and write the first request out. ClientAsyncReader(ChannelInterface* channel, CompletionQueue* cq, @@ -395,7 +395,7 @@ class ClientAsyncReader final : public ClientAsyncStreamingInterface, call_.PerformOps(&init_buf_); } - void ReadInitialMetadata(void* tag) override { + void ReadInitialMetadata(void* tag) GRPC_OVERRIDE { GPR_ASSERT(!context_->initial_metadata_received_); meta_buf_.Reset(tag); @@ -403,7 +403,7 @@ class ClientAsyncReader final : public ClientAsyncStreamingInterface, call_.PerformOps(&meta_buf_); } - void Read(R* msg, void* tag) override { + void Read(R* msg, void* tag) GRPC_OVERRIDE { read_buf_.Reset(tag); if (!context_->initial_metadata_received_) { read_buf_.AddRecvInitialMetadata(context_); @@ -412,7 +412,7 @@ class ClientAsyncReader final : public ClientAsyncStreamingInterface, call_.PerformOps(&read_buf_); } - void Finish(Status* status, void* tag) override { + void Finish(Status* status, void* tag) GRPC_OVERRIDE { finish_buf_.Reset(tag); if (!context_->initial_metadata_received_) { finish_buf_.AddRecvInitialMetadata(context_); @@ -422,7 +422,7 @@ class ClientAsyncReader final : public ClientAsyncStreamingInterface, } private: - ClientContext* context_ = nullptr; + ClientContext* context_; Call call_; CallOpBuffer init_buf_; CallOpBuffer meta_buf_; @@ -431,8 +431,8 @@ class ClientAsyncReader final : public ClientAsyncStreamingInterface, }; template <class W> -class ClientAsyncWriter final : public ClientAsyncStreamingInterface, - public AsyncWriterInterface<W> { +class ClientAsyncWriter GRPC_FINAL : public ClientAsyncStreamingInterface, + public AsyncWriterInterface<W> { public: ClientAsyncWriter(ChannelInterface* channel, CompletionQueue* cq, const RpcMethod& method, ClientContext* context, @@ -445,7 +445,7 @@ class ClientAsyncWriter final : public ClientAsyncStreamingInterface, call_.PerformOps(&init_buf_); } - void ReadInitialMetadata(void* tag) override { + void ReadInitialMetadata(void* tag) GRPC_OVERRIDE { GPR_ASSERT(!context_->initial_metadata_received_); meta_buf_.Reset(tag); @@ -453,7 +453,7 @@ class ClientAsyncWriter final : public ClientAsyncStreamingInterface, call_.PerformOps(&meta_buf_); } - void Write(const W& msg, void* tag) override { + void Write(const W& msg, void* tag) GRPC_OVERRIDE { write_buf_.Reset(tag); write_buf_.AddSendMessage(msg); call_.PerformOps(&write_buf_); @@ -465,7 +465,7 @@ class ClientAsyncWriter final : public ClientAsyncStreamingInterface, call_.PerformOps(&writes_done_buf_); } - void Finish(Status* status, void* tag) override { + void Finish(Status* status, void* tag) GRPC_OVERRIDE { finish_buf_.Reset(tag); if (!context_->initial_metadata_received_) { finish_buf_.AddRecvInitialMetadata(context_); @@ -476,7 +476,7 @@ class ClientAsyncWriter final : public ClientAsyncStreamingInterface, } private: - ClientContext* context_ = nullptr; + ClientContext* context_; google::protobuf::Message* const response_; Call call_; CallOpBuffer init_buf_; @@ -488,9 +488,9 @@ class ClientAsyncWriter final : public ClientAsyncStreamingInterface, // Client-side interface for bi-directional streaming. template <class W, class R> -class ClientAsyncReaderWriter final : public ClientAsyncStreamingInterface, - public AsyncWriterInterface<W>, - public AsyncReaderInterface<R> { +class ClientAsyncReaderWriter GRPC_FINAL : public ClientAsyncStreamingInterface, + public AsyncWriterInterface<W>, + public AsyncReaderInterface<R> { public: ClientAsyncReaderWriter(ChannelInterface* channel, CompletionQueue* cq, const RpcMethod& method, ClientContext* context, @@ -501,7 +501,7 @@ class ClientAsyncReaderWriter final : public ClientAsyncStreamingInterface, call_.PerformOps(&init_buf_); } - void ReadInitialMetadata(void* tag) override { + void ReadInitialMetadata(void* tag) GRPC_OVERRIDE { GPR_ASSERT(!context_->initial_metadata_received_); meta_buf_.Reset(tag); @@ -509,7 +509,7 @@ class ClientAsyncReaderWriter final : public ClientAsyncStreamingInterface, call_.PerformOps(&meta_buf_); } - void Read(R* msg, void* tag) override { + void Read(R* msg, void* tag) GRPC_OVERRIDE { read_buf_.Reset(tag); if (!context_->initial_metadata_received_) { read_buf_.AddRecvInitialMetadata(context_); @@ -518,7 +518,7 @@ class ClientAsyncReaderWriter final : public ClientAsyncStreamingInterface, call_.PerformOps(&read_buf_); } - void Write(const W& msg, void* tag) override { + void Write(const W& msg, void* tag) GRPC_OVERRIDE { write_buf_.Reset(tag); write_buf_.AddSendMessage(msg); call_.PerformOps(&write_buf_); @@ -530,7 +530,7 @@ class ClientAsyncReaderWriter final : public ClientAsyncStreamingInterface, call_.PerformOps(&writes_done_buf_); } - void Finish(Status* status, void* tag) override { + void Finish(Status* status, void* tag) GRPC_OVERRIDE { finish_buf_.Reset(tag); if (!context_->initial_metadata_received_) { finish_buf_.AddRecvInitialMetadata(context_); @@ -540,7 +540,7 @@ class ClientAsyncReaderWriter final : public ClientAsyncStreamingInterface, } private: - ClientContext* context_ = nullptr; + ClientContext* context_; Call call_; CallOpBuffer init_buf_; CallOpBuffer meta_buf_; @@ -551,13 +551,13 @@ class ClientAsyncReaderWriter final : public ClientAsyncStreamingInterface, }; template <class W, class R> -class ServerAsyncReader : public ServerAsyncStreamingInterface, - public AsyncReaderInterface<R> { +class ServerAsyncReader GRPC_FINAL : public ServerAsyncStreamingInterface, + public AsyncReaderInterface<R> { public: explicit ServerAsyncReader(ServerContext* ctx) : call_(nullptr, nullptr, nullptr), ctx_(ctx) {} - void SendInitialMetadata(void* tag) override { + void SendInitialMetadata(void* tag) GRPC_OVERRIDE { GPR_ASSERT(!ctx_->sent_initial_metadata_); meta_buf_.Reset(tag); @@ -566,7 +566,7 @@ class ServerAsyncReader : public ServerAsyncStreamingInterface, call_.PerformOps(&meta_buf_); } - void Read(R* msg, void* tag) override { + void Read(R* msg, void* tag) GRPC_OVERRIDE { read_buf_.Reset(tag); read_buf_.AddRecvMessage(msg); call_.PerformOps(&read_buf_); @@ -598,7 +598,7 @@ class ServerAsyncReader : public ServerAsyncStreamingInterface, } private: - void BindCall(Call* call) override { call_ = *call; } + void BindCall(Call* call) GRPC_OVERRIDE { call_ = *call; } Call call_; ServerContext* ctx_; @@ -608,13 +608,13 @@ class ServerAsyncReader : public ServerAsyncStreamingInterface, }; template <class W> -class ServerAsyncWriter : public ServerAsyncStreamingInterface, - public AsyncWriterInterface<W> { +class ServerAsyncWriter GRPC_FINAL : public ServerAsyncStreamingInterface, + public AsyncWriterInterface<W> { public: explicit ServerAsyncWriter(ServerContext* ctx) : call_(nullptr, nullptr, nullptr), ctx_(ctx) {} - void SendInitialMetadata(void* tag) override { + void SendInitialMetadata(void* tag) GRPC_OVERRIDE { GPR_ASSERT(!ctx_->sent_initial_metadata_); meta_buf_.Reset(tag); @@ -623,7 +623,7 @@ class ServerAsyncWriter : public ServerAsyncStreamingInterface, call_.PerformOps(&meta_buf_); } - void Write(const W& msg, void* tag) override { + void Write(const W& msg, void* tag) GRPC_OVERRIDE { write_buf_.Reset(tag); if (!ctx_->sent_initial_metadata_) { write_buf_.AddSendInitialMetadata(&ctx_->initial_metadata_); @@ -644,7 +644,7 @@ class ServerAsyncWriter : public ServerAsyncStreamingInterface, } private: - void BindCall(Call* call) override { call_ = *call; } + void BindCall(Call* call) GRPC_OVERRIDE { call_ = *call; } Call call_; ServerContext* ctx_; @@ -655,14 +655,14 @@ class ServerAsyncWriter : public ServerAsyncStreamingInterface, // Server-side interface for bi-directional streaming. template <class W, class R> -class ServerAsyncReaderWriter : public ServerAsyncStreamingInterface, - public AsyncWriterInterface<W>, - public AsyncReaderInterface<R> { +class ServerAsyncReaderWriter GRPC_FINAL : public ServerAsyncStreamingInterface, + public AsyncWriterInterface<W>, + public AsyncReaderInterface<R> { public: explicit ServerAsyncReaderWriter(ServerContext* ctx) : call_(nullptr, nullptr, nullptr), ctx_(ctx) {} - void SendInitialMetadata(void* tag) override { + void SendInitialMetadata(void* tag) GRPC_OVERRIDE { GPR_ASSERT(!ctx_->sent_initial_metadata_); meta_buf_.Reset(tag); @@ -671,13 +671,13 @@ class ServerAsyncReaderWriter : public ServerAsyncStreamingInterface, call_.PerformOps(&meta_buf_); } - virtual void Read(R* msg, void* tag) override { + virtual void Read(R* msg, void* tag) GRPC_OVERRIDE { read_buf_.Reset(tag); read_buf_.AddRecvMessage(msg); call_.PerformOps(&read_buf_); } - virtual void Write(const W& msg, void* tag) override { + virtual void Write(const W& msg, void* tag) GRPC_OVERRIDE { write_buf_.Reset(tag); if (!ctx_->sent_initial_metadata_) { write_buf_.AddSendInitialMetadata(&ctx_->initial_metadata_); @@ -698,7 +698,7 @@ class ServerAsyncReaderWriter : public ServerAsyncStreamingInterface, } private: - void BindCall(Call* call) override { call_ = *call; } + void BindCall(Call* call) GRPC_OVERRIDE { call_ = *call; } Call call_; ServerContext* ctx_; diff --git a/src/compiler/cpp_generator.cc b/src/compiler/cpp_generator.cc index 891032343b53ca64b22d2617aa12161a45ecff9a..1139dfc89bc23ffab0f18cd8f4a2e532ae21eeee 100644 --- a/src/compiler/cpp_generator.cc +++ b/src/compiler/cpp_generator.cc @@ -300,13 +300,13 @@ void PrintHeaderService(google::protobuf::io::Printer *printer, (*vars)["Service"] = service->name(); printer->Print(*vars, - "class $Service$ final {\n" + "class $Service$ GRPC_FINAL {\n" " public:\n"); printer->Indent(); // Client side printer->Print( - "class Stub final : public ::grpc::InternalStub {\n" + "class Stub GRPC_FINAL : public ::grpc::InternalStub {\n" " public:\n"); printer->Indent(); for (int i = 0; i < service->method_count(); ++i) { @@ -331,7 +331,7 @@ void PrintHeaderService(google::protobuf::io::Printer *printer, for (int i = 0; i < service->method_count(); ++i) { PrintHeaderServerMethodSync(printer, service->method(i), vars); } - printer->Print("::grpc::RpcService* service() override final;\n"); + printer->Print("::grpc::RpcService* service() GRPC_OVERRIDE GRPC_FINAL;\n"); printer->Outdent(); printer->Print( " private:\n" @@ -340,7 +340,7 @@ void PrintHeaderService(google::protobuf::io::Printer *printer, // Server side - Asynchronous printer->Print( - "class AsyncService final : public ::grpc::AsynchronousService {\n" + "class AsyncService GRPC_FINAL : public ::grpc::AsynchronousService {\n" " public:\n"); printer->Indent(); (*vars)["MethodCount"] = as_string(service->method_count()); @@ -609,7 +609,7 @@ void PrintSourceService(google::protobuf::io::Printer *printer, " std::unique_ptr< $Service$::Stub> stub(new $Service$::Stub());\n" " stub->set_channel(channel);\n" " return stub;\n" - "};\n\n"); + "}\n\n"); for (int i = 0; i < service->method_count(); ++i) { (*vars)["Idx"] = as_string(i); PrintSourceClientMethod(printer, service->method(i), vars); diff --git a/src/compiler/python_generator.cc b/src/compiler/python_generator.cc index a93b08c5ceb3c7bcf97f2711532c48fb51228ccc..ae4d65df4c26a4701b556cc31336e4d3550457a4 100644 --- a/src/compiler/python_generator.cc +++ b/src/compiler/python_generator.cc @@ -31,6 +31,7 @@ * */ +#include <algorithm> #include <cassert> #include <cctype> #include <cstring> @@ -44,17 +45,22 @@ #include <google/protobuf/io/zero_copy_stream_impl_lite.h> #include <google/protobuf/descriptor.pb.h> #include <google/protobuf/descriptor.h> +#include <google/protobuf/stubs/strutil.h> using google::protobuf::Descriptor; using google::protobuf::FileDescriptor; -using google::protobuf::ServiceDescriptor; +using google::protobuf::HasSuffixString; using google::protobuf::MethodDescriptor; +using google::protobuf::ServiceDescriptor; +using google::protobuf::StripString; +using google::protobuf::StripSuffixString; using google::protobuf::io::Printer; using google::protobuf::io::StringOutputStream; using std::initializer_list; using std::make_pair; using std::map; using std::pair; +using std::replace; using std::string; using std::strlen; using std::vector; @@ -123,7 +129,7 @@ bool PrintServicer(const ServiceDescriptor* service, string arg_name = meth->client_streaming() ? "request_iterator" : "request"; out->Print("@abc.abstractmethod\n"); - out->Print("def $Method$(self, $ArgName$):\n", + out->Print("def $Method$(self, $ArgName$, context):\n", "Method", meth->name(), "ArgName", arg_name); { IndentScope raii_method_indent(out); @@ -191,6 +197,21 @@ bool PrintStub(const ServiceDescriptor* service, return true; } +// TODO(protobuf team): See TODO for `ModuleName`. +string StripProto(const string& filename) { + const char* suffix = HasSuffixString(filename, ".protodevel") + ? ".protodevel" : ".proto"; + return StripSuffixString(filename, suffix); +} +// TODO(protobuf team): Export `ModuleName` from protobuf's +// `src/google/protobuf/compiler/python/python_generator.cc` file. +string ModuleName(const string& filename) { + string basename = StripProto(filename); + StripString(&basename, "-", '_'); + StripString(&basename, "/", '.'); + return basename + "_pb2"; +} + bool GetModuleAndMessagePath(const Descriptor* type, pair<string, string>* out) { const Descriptor* path_elem_type = type; @@ -200,23 +221,19 @@ bool GetModuleAndMessagePath(const Descriptor* type, path_elem_type = path_elem_type->containing_type(); } while (path_elem_type != nullptr); string file_name = type->file()->name(); - string module_name; static const int proto_suffix_length = strlen(".proto"); if (!(file_name.size() > static_cast<size_t>(proto_suffix_length) && file_name.find_last_of(".proto") == file_name.size() - 1)) { return false; } - module_name = file_name.substr( - 0, file_name.size() - proto_suffix_length) + "_pb2"; - string package = type->file()->package(); - string module = (package.empty() ? "" : package + ".") + - module_name; + string module = ModuleName(file_name); string message_type; for (auto path_iter = message_path.rbegin(); path_iter != message_path.rend(); ++path_iter) { message_type += (*path_iter)->name() + "."; } - message_type.pop_back(); + // no pop_back prior to C++11 + message_type.resize(message_type.size() - 1); *out = make_pair(module, message_type); return true; } diff --git a/src/compiler/python_plugin.cc b/src/compiler/python_plugin.cc index ed1e0494fbe8616df8265402904c24193a1a39d8..0dd2c5b834416488c6ddbec0e4782b83b055e7a9 100644 --- a/src/compiler/python_plugin.cc +++ b/src/compiler/python_plugin.cc @@ -56,12 +56,10 @@ using std::strlen; class PythonGrpcGenerator : public CodeGenerator { public: PythonGrpcGenerator() {} - ~PythonGrpcGenerator() override {} + ~PythonGrpcGenerator() {} - bool Generate(const FileDescriptor* file, - const string& parameter, - GeneratorContext* context, - string* error) const override { + bool Generate(const FileDescriptor* file, const string& parameter, + GeneratorContext* context, string* error) const { // Get output file name. string file_name; static const int proto_suffix_length = strlen(".proto"); diff --git a/src/compiler/ruby_plugin.cc b/src/compiler/ruby_plugin.cc index 6580e5ab5bec861f25288d6f6572e1dc9d1dd05e..4a6e9f7a5d38c1d82962ba3ca5a8b5b2995c292a 100644 --- a/src/compiler/ruby_plugin.cc +++ b/src/compiler/ruby_plugin.cc @@ -50,12 +50,12 @@ class RubyGrpcGenerator : public google::protobuf::compiler::CodeGenerator { public: RubyGrpcGenerator() {} - ~RubyGrpcGenerator() override {} + ~RubyGrpcGenerator() {} bool Generate(const google::protobuf::FileDescriptor *file, const std::string ¶meter, google::protobuf::compiler::GeneratorContext *context, - std::string *error) const override { + std::string *error) const { std::string code = grpc_ruby_generator::GetServices(file); if (code.size() == 0) { return true; // don't generate a file if there are no services diff --git a/src/cpp/client/channel.h b/src/cpp/client/channel.h index 06f5a8ffdfe7052767aa508c9685fad7b9eb1691..e3edcf73a519cb56d9c1f6c77594ca2ec73f0693 100644 --- a/src/cpp/client/channel.h +++ b/src/cpp/client/channel.h @@ -49,17 +49,17 @@ class CompletionQueue; class Credentials; class StreamContextInterface; -class Channel final : public ChannelInterface { +class Channel GRPC_FINAL : public ChannelInterface { public: Channel(const grpc::string &target, const ChannelArguments &args); Channel(const grpc::string &target, const std::unique_ptr<Credentials> &creds, const ChannelArguments &args); - ~Channel() override; + ~Channel() GRPC_OVERRIDE; virtual Call CreateCall(const RpcMethod &method, ClientContext *context, - CompletionQueue *cq) override; - virtual void PerformOpsOnCall(CallOpBuffer *ops, Call *call) override; + CompletionQueue *cq) GRPC_OVERRIDE; + virtual void PerformOpsOnCall(CallOpBuffer *ops, Call *call) GRPC_OVERRIDE; private: const grpc::string target_; diff --git a/src/cpp/client/client_context.cc b/src/cpp/client/client_context.cc index 80cbdd93accc6498b16fd9007d79a7b5047b13e0..9f99f7bcd55ba092b30a1163915bee91cb157714 100644 --- a/src/cpp/client/client_context.cc +++ b/src/cpp/client/client_context.cc @@ -41,7 +41,10 @@ using std::chrono::system_clock; namespace grpc { ClientContext::ClientContext() - : call_(nullptr), cq_(nullptr), absolute_deadline_(gpr_inf_future) {} + : initial_metadata_received_(false), + call_(nullptr), + cq_(nullptr), + absolute_deadline_(gpr_inf_future) {} ClientContext::~ClientContext() { if (call_) { diff --git a/src/cpp/common/call.cc b/src/cpp/common/call.cc index e6a20a252dbb588388c5444b8ebf9c77ae932901..f3a691114d2453a1a325277dedc04efbd28ac613 100644 --- a/src/cpp/common/call.cc +++ b/src/cpp/common/call.cc @@ -41,6 +41,30 @@ namespace grpc { +CallOpBuffer::CallOpBuffer() + : return_tag_(this), + send_initial_metadata_(false), + initial_metadata_count_(0), + initial_metadata_(nullptr), + recv_initial_metadata_(nullptr), + recv_initial_metadata_arr_{0, 0, nullptr}, + send_message_(nullptr), + send_message_buf_(nullptr), + recv_message_(nullptr), + recv_message_buf_(nullptr), + client_send_close_(false), + recv_trailing_metadata_(nullptr), + recv_status_(nullptr), + recv_trailing_metadata_arr_{0, 0, nullptr}, + status_code_(GRPC_STATUS_OK), + status_details_(nullptr), + status_details_capacity_(0), + send_status_(nullptr), + trailing_metadata_count_(0), + trailing_metadata_(nullptr), + cancelled_buf_(0), + recv_closed_(nullptr) {} + void CallOpBuffer::Reset(void* next_return_tag) { return_tag_ = next_return_tag; diff --git a/src/cpp/server/server.cc b/src/cpp/server/server.cc index 178fa1a71679586c1a6ebefc435406179433a5a8..97bf0f1a6ea8ce9a15a6fb901770a6b197fa6fa7 100644 --- a/src/cpp/server/server.cc +++ b/src/cpp/server/server.cc @@ -49,11 +49,12 @@ namespace grpc { -class Server::SyncRequest final : public CompletionQueueTag { +class Server::SyncRequest GRPC_FINAL : public CompletionQueueTag { public: SyncRequest(RpcServiceMethod* method, void* tag) : method_(method), tag_(tag), + in_flight_(false), has_request_payload_(method->method_type() == RpcMethod::NORMAL_RPC || method->method_type() == RpcMethod::SERVER_STREAMING), @@ -85,14 +86,14 @@ class Server::SyncRequest final : public CompletionQueueTag { this)); } - bool FinalizeResult(void** tag, bool* status) override { + bool FinalizeResult(void** tag, bool* status) GRPC_OVERRIDE { if (!*status) { grpc_completion_queue_destroy(cq_); } return true; } - class CallData final { + class CallData GRPC_FINAL { public: explicit CallData(Server* server, SyncRequest* mrd) : cq_(mrd->cq_), @@ -159,7 +160,7 @@ class Server::SyncRequest final : public CompletionQueueTag { private: RpcServiceMethod* const method_; void* const tag_; - bool in_flight_ = false; + bool in_flight_; const bool has_request_payload_; const bool has_response_payload_; grpc_call* call_; @@ -294,7 +295,7 @@ void Server::PerformOpsOnCall(CallOpBuffer* buf, Call* call) { grpc_call_start_batch(call->call(), ops, nops, buf)); } -class Server::AsyncRequest final : public CompletionQueueTag { +class Server::AsyncRequest GRPC_FINAL : public CompletionQueueTag { public: AsyncRequest(Server* server, void* registered_method, ServerContext* ctx, ::google::protobuf::Message* request, @@ -305,7 +306,9 @@ class Server::AsyncRequest final : public CompletionQueueTag { stream_(stream), cq_(cq), ctx_(ctx), - server_(server) { + server_(server), + call_(nullptr), + payload_(nullptr) { memset(&array_, 0, sizeof(array_)); grpc_server_request_registered_call( server->server_, registered_method, &call_, &deadline_, &array_, @@ -319,7 +322,7 @@ class Server::AsyncRequest final : public CompletionQueueTag { grpc_metadata_array_destroy(&array_); } - bool FinalizeResult(void** tag, bool* status) override { + bool FinalizeResult(void** tag, bool* status) GRPC_OVERRIDE { *tag = tag_; if (*status && request_) { if (payload_) { @@ -354,10 +357,10 @@ class Server::AsyncRequest final : public CompletionQueueTag { CompletionQueue* const cq_; ServerContext* const ctx_; Server* const server_; - grpc_call* call_ = nullptr; + grpc_call* call_; gpr_timespec deadline_; grpc_metadata_array array_; - grpc_byte_buffer* payload_ = nullptr; + grpc_byte_buffer* payload_; }; void Server::RequestAsyncCall(void* registered_method, ServerContext* context, diff --git a/src/cpp/server/server_builder.cc b/src/cpp/server/server_builder.cc index 3c2093c3638996e4110339b4a70e9dfe66938cd6..ae60f3d8b6743b0fdaec55b144aad75321d748e8 100644 --- a/src/cpp/server/server_builder.cc +++ b/src/cpp/server/server_builder.cc @@ -41,7 +41,7 @@ namespace grpc { -ServerBuilder::ServerBuilder() {} +ServerBuilder::ServerBuilder() : thread_pool_(nullptr) {} void ServerBuilder::RegisterService(SynchronousService* service) { services_.push_back(service->service()); diff --git a/src/cpp/server/server_context.cc b/src/cpp/server/server_context.cc index 1aa18bcac572d82fe222736eeac283198ee7fa56..bb3c2d1405fb273210f8e909ae3037a51fd75882 100644 --- a/src/cpp/server/server_context.cc +++ b/src/cpp/server/server_context.cc @@ -44,10 +44,13 @@ namespace grpc { // CompletionOp -class ServerContext::CompletionOp final : public CallOpBuffer { +class ServerContext::CompletionOp GRPC_FINAL : public CallOpBuffer { public: - CompletionOp(); - bool FinalizeResult(void** tag, bool* status) override; + // initial refs: one in the server context, one in the cq + CompletionOp() : refs_(2), finalized_(false), cancelled_(false) { + AddServerRecvClose(&cancelled_); + } + bool FinalizeResult(void** tag, bool* status) GRPC_OVERRIDE; bool CheckCancelled(CompletionQueue* cq); @@ -55,13 +58,11 @@ class ServerContext::CompletionOp final : public CallOpBuffer { private: std::mutex mu_; - int refs_ = 2; // initial refs: one in the server context, one in the cq - bool finalized_ = false; - bool cancelled_ = false; + int refs_; + bool finalized_; + bool cancelled_; }; -ServerContext::CompletionOp::CompletionOp() { AddServerRecvClose(&cancelled_); } - void ServerContext::CompletionOp::Unref() { std::unique_lock<std::mutex> lock(mu_); if (--refs_ == 0) { @@ -90,11 +91,19 @@ bool ServerContext::CompletionOp::FinalizeResult(void** tag, bool* status) { // ServerContext body -ServerContext::ServerContext() {} +ServerContext::ServerContext() + : completion_op_(nullptr), + call_(nullptr), + cq_(nullptr), + sent_initial_metadata_(false) {} ServerContext::ServerContext(gpr_timespec deadline, grpc_metadata* metadata, size_t metadata_count) - : deadline_(Timespec2Timepoint(deadline)) { + : completion_op_(nullptr), + deadline_(Timespec2Timepoint(deadline)), + call_(nullptr), + cq_(nullptr), + sent_initial_metadata_(false) { for (size_t i = 0; i < metadata_count; i++) { client_metadata_.insert(std::make_pair( grpc::string(metadata[i].key), diff --git a/src/cpp/server/thread_pool.cc b/src/cpp/server/thread_pool.cc index fa11ddd04c761d6665d53f798fe1397489834824..5dc9bcf916501c2ef8ba423018904a56377e3172 100644 --- a/src/cpp/server/thread_pool.cc +++ b/src/cpp/server/thread_pool.cc @@ -35,7 +35,7 @@ namespace grpc { -ThreadPool::ThreadPool(int num_threads) { +ThreadPool::ThreadPool(int num_threads) : shutdown_(false) { for (int i = 0; i < num_threads; i++) { threads_.push_back(std::thread([this]() { for (;;) { diff --git a/src/cpp/server/thread_pool.h b/src/cpp/server/thread_pool.h index 283618f4b6860d2ac0f96c15d9f4ae62fa86f3bc..9c1df0b15bc0b7cccbf9577f8519469a18e159b3 100644 --- a/src/cpp/server/thread_pool.h +++ b/src/cpp/server/thread_pool.h @@ -34,6 +34,7 @@ #ifndef __GRPCPP_INTERNAL_SERVER_THREAD_POOL_H__ #define __GRPCPP_INTERNAL_SERVER_THREAD_POOL_H__ +#include <grpc++/config.h> #include <grpc++/thread_pool_interface.h> #include <condition_variable> @@ -44,17 +45,17 @@ namespace grpc { -class ThreadPool final : public ThreadPoolInterface { +class ThreadPool GRPC_FINAL : public ThreadPoolInterface { public: explicit ThreadPool(int num_threads); ~ThreadPool(); - void ScheduleCallback(const std::function<void()> &callback) override; + void ScheduleCallback(const std::function<void()> &callback) GRPC_OVERRIDE; private: std::mutex mu_; std::condition_variable cv_; - bool shutdown_ = false; + bool shutdown_; std::queue<std::function<void()>> callbacks_; std::vector<std::thread> threads_; }; diff --git a/src/csharp/Grpc.Core/Grpc.Core.csproj b/src/csharp/Grpc.Core/Grpc.Core.csproj index 183c44235832e8b72c362aad2d7f78fb0319133e..de742f99add62b590e1f516ddc8eaf8db57f11c1 100644 --- a/src/csharp/Grpc.Core/Grpc.Core.csproj +++ b/src/csharp/Grpc.Core/Grpc.Core.csproj @@ -76,7 +76,7 @@ </Content> </ItemGroup> </When> - <Otherwise/> + <Otherwise /> </Choose> <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> </Project> \ No newline at end of file diff --git a/src/csharp/Grpc.Core/Server.cs b/src/csharp/Grpc.Core/Server.cs index 002592a3d888e9630f58a3fa7730ef7b130f7897..152cc2176c094ecc79e4e29aed3d3f62d4f704e9 100644 --- a/src/csharp/Grpc.Core/Server.cs +++ b/src/csharp/Grpc.Core/Server.cs @@ -124,6 +124,17 @@ namespace Grpc.Core handle.Dispose(); } + /// <summary> + /// To allow awaiting termination of the server. + /// </summary> + public Task ShutdownTask + { + get + { + return shutdownTcs.Task; + } + } + public void Kill() { handle.Dispose(); } diff --git a/src/csharp/Grpc.IntegrationTesting.Client/.gitignore b/src/csharp/Grpc.IntegrationTesting.Client/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..a382af2294f7a8b9d7789117aeeb80a0a56bc19b --- /dev/null +++ b/src/csharp/Grpc.IntegrationTesting.Client/.gitignore @@ -0,0 +1,3 @@ +bin +obj + diff --git a/src/csharp/Grpc.IntegrationTesting.Client/Grpc.IntegrationTesting.Client.csproj b/src/csharp/Grpc.IntegrationTesting.Client/Grpc.IntegrationTesting.Client.csproj new file mode 100644 index 0000000000000000000000000000000000000000..b1a4a81916a25eca2993f9ed715ceb53cd493410 --- /dev/null +++ b/src/csharp/Grpc.IntegrationTesting.Client/Grpc.IntegrationTesting.Client.csproj @@ -0,0 +1,49 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <PropertyGroup> + <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> + <Platform Condition=" '$(Platform)' == '' ">x86</Platform> + <ProductVersion>10.0.0</ProductVersion> + <SchemaVersion>2.0</SchemaVersion> + <ProjectGuid>{3D166931-BA2D-416E-95A3-D36E8F6E90B9}</ProjectGuid> + <OutputType>Exe</OutputType> + <RootNamespace>Grpc.IntegrationTesting.Client</RootNamespace> + <AssemblyName>Grpc.IntegrationTesting.Client</AssemblyName> + <StartupObject>Grpc.IntegrationTesting.Client.Program</StartupObject> + <TargetFrameworkVersion>v4.5</TargetFrameworkVersion> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' "> + <DebugSymbols>true</DebugSymbols> + <DebugType>full</DebugType> + <Optimize>false</Optimize> + <OutputPath>bin\Debug</OutputPath> + <DefineConstants>DEBUG;</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + <Externalconsole>true</Externalconsole> + <PlatformTarget>x86</PlatformTarget> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' "> + <DebugType>full</DebugType> + <Optimize>true</Optimize> + <OutputPath>bin\Release</OutputPath> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + <Externalconsole>true</Externalconsole> + <PlatformTarget>x86</PlatformTarget> + </PropertyGroup> + <ItemGroup> + <Reference Include="System" /> + </ItemGroup> + <ItemGroup> + <Compile Include="Program.cs" /> + <Compile Include="Properties\AssemblyInfo.cs" /> + </ItemGroup> + <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> + <ItemGroup> + <ProjectReference Include="..\Grpc.IntegrationTesting\Grpc.IntegrationTesting.csproj"> + <Project>{C61154BA-DD4A-4838-8420-0162A28925E0}</Project> + <Name>Grpc.IntegrationTesting</Name> + </ProjectReference> + </ItemGroup> +</Project> \ No newline at end of file diff --git a/src/csharp/Grpc.IntegrationTesting.Client/Program.cs b/src/csharp/Grpc.IntegrationTesting.Client/Program.cs new file mode 100644 index 0000000000000000000000000000000000000000..2e1c9aaac255479c8c5f65a653a2f432bc5ae0e1 --- /dev/null +++ b/src/csharp/Grpc.IntegrationTesting.Client/Program.cs @@ -0,0 +1,46 @@ +#region Copyright notice and license + +// Copyright 2015, Google Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +#endregion + +using System; +using Grpc.IntegrationTesting; + +namespace Grpc.IntegrationTesting.Client +{ + class Program + { + public static void Main(string[] args) + { + InteropClient.Run(args); + } + } +} diff --git a/src/csharp/Grpc.IntegrationTesting.Client/Properties/AssemblyInfo.cs b/src/csharp/Grpc.IntegrationTesting.Client/Properties/AssemblyInfo.cs new file mode 100644 index 0000000000000000000000000000000000000000..d1f9e8560dc8b99946848be51f7be213c4ce9f7a --- /dev/null +++ b/src/csharp/Grpc.IntegrationTesting.Client/Properties/AssemblyInfo.cs @@ -0,0 +1,22 @@ +using System.Reflection; +using System.Runtime.CompilerServices; + +// Information about this assembly is defined by the following attributes. +// Change them to the values specific to your project. +[assembly: AssemblyTitle("Grpc.IntegrationTesting.Client")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("")] +[assembly: AssemblyCopyright("Google Inc. All rights reserved.")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] +// The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}". +// The form "{Major}.{Minor}.*" will automatically update the build and revision, +// and "{Major}.{Minor}.{Build}.*" will update just the revision. +[assembly: AssemblyVersion("0.1.*")] +// The following attributes are used to specify the signing key for the assembly, +// if desired. See the Mono documentation for more information about signing. +//[assembly: AssemblyDelaySign(false)] +//[assembly: AssemblyKeyFile("")] + diff --git a/src/csharp/Grpc.IntegrationTesting.Server/.gitignore b/src/csharp/Grpc.IntegrationTesting.Server/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..a382af2294f7a8b9d7789117aeeb80a0a56bc19b --- /dev/null +++ b/src/csharp/Grpc.IntegrationTesting.Server/.gitignore @@ -0,0 +1,3 @@ +bin +obj + diff --git a/src/csharp/Grpc.IntegrationTesting.Server/Grpc.IntegrationTesting.Server.csproj b/src/csharp/Grpc.IntegrationTesting.Server/Grpc.IntegrationTesting.Server.csproj new file mode 100644 index 0000000000000000000000000000000000000000..73c9f2d2077ae36f1cf33adaa6b3b9aedca871b1 --- /dev/null +++ b/src/csharp/Grpc.IntegrationTesting.Server/Grpc.IntegrationTesting.Server.csproj @@ -0,0 +1,49 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <PropertyGroup> + <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> + <Platform Condition=" '$(Platform)' == '' ">x86</Platform> + <ProductVersion>10.0.0</ProductVersion> + <SchemaVersion>2.0</SchemaVersion> + <ProjectGuid>{A654F3B8-E859-4E6A-B30D-227527DBEF0D}</ProjectGuid> + <OutputType>Exe</OutputType> + <RootNamespace>Grpc.IntegrationTesting.Server</RootNamespace> + <AssemblyName>Grpc.IntegrationTesting.Server</AssemblyName> + <StartupObject>Grpc.IntegrationTesting.Server.Program</StartupObject> + <TargetFrameworkVersion>v4.5</TargetFrameworkVersion> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' "> + <DebugSymbols>true</DebugSymbols> + <DebugType>full</DebugType> + <Optimize>false</Optimize> + <OutputPath>bin\Debug</OutputPath> + <DefineConstants>DEBUG;</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + <Externalconsole>true</Externalconsole> + <PlatformTarget>x86</PlatformTarget> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' "> + <DebugType>full</DebugType> + <Optimize>true</Optimize> + <OutputPath>bin\Release</OutputPath> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + <Externalconsole>true</Externalconsole> + <PlatformTarget>x86</PlatformTarget> + </PropertyGroup> + <ItemGroup> + <Reference Include="System" /> + </ItemGroup> + <ItemGroup> + <Compile Include="Program.cs" /> + <Compile Include="Properties\AssemblyInfo.cs" /> + </ItemGroup> + <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> + <ItemGroup> + <ProjectReference Include="..\Grpc.IntegrationTesting\Grpc.IntegrationTesting.csproj"> + <Project>{C61154BA-DD4A-4838-8420-0162A28925E0}</Project> + <Name>Grpc.IntegrationTesting</Name> + </ProjectReference> + </ItemGroup> +</Project> \ No newline at end of file diff --git a/src/csharp/Grpc.IntegrationTesting.Server/Program.cs b/src/csharp/Grpc.IntegrationTesting.Server/Program.cs new file mode 100644 index 0000000000000000000000000000000000000000..01bcc6e3081fc57e0b0f0f1267811f0c73b0e765 --- /dev/null +++ b/src/csharp/Grpc.IntegrationTesting.Server/Program.cs @@ -0,0 +1,45 @@ +#region Copyright notice and license + +// Copyright 2015, Google Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +#endregion + +using System; + +namespace Grpc.IntegrationTesting.Server +{ + class Program + { + public static void Main(string[] args) + { + InteropServer.Run(args); + } + } +} diff --git a/src/csharp/Grpc.IntegrationTesting.Server/Properties/AssemblyInfo.cs b/src/csharp/Grpc.IntegrationTesting.Server/Properties/AssemblyInfo.cs new file mode 100644 index 0000000000000000000000000000000000000000..4ef93f328d299796967b51fc0a279eb7e4d28809 --- /dev/null +++ b/src/csharp/Grpc.IntegrationTesting.Server/Properties/AssemblyInfo.cs @@ -0,0 +1,22 @@ +using System.Reflection; +using System.Runtime.CompilerServices; + +// Information about this assembly is defined by the following attributes. +// Change them to the values specific to your project. +[assembly: AssemblyTitle("Grpc.IntegrationTesting.Server")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("")] +[assembly: AssemblyCopyright("Google Inc. All rights reserved.")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] +// The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}". +// The form "{Major}.{Minor}.*" will automatically update the build and revision, +// and "{Major}.{Minor}.{Build}.*" will update just the revision. +[assembly: AssemblyVersion("0.1.*")] +// The following attributes are used to specify the signing key for the assembly, +// if desired. See the Mono documentation for more information about signing. +//[assembly: AssemblyDelaySign(false)] +//[assembly: AssemblyKeyFile("")] + diff --git a/src/csharp/Grpc.IntegrationTesting/Grpc.IntegrationTesting.csproj b/src/csharp/Grpc.IntegrationTesting/Grpc.IntegrationTesting.csproj index e66f708a9450db60cd00adde5bf58e1c417b834f..6d6aaf57473b547f5beb72fdb95bd795ed619b7a 100644 --- a/src/csharp/Grpc.IntegrationTesting/Grpc.IntegrationTesting.csproj +++ b/src/csharp/Grpc.IntegrationTesting/Grpc.IntegrationTesting.csproj @@ -6,10 +6,9 @@ <ProductVersion>10.0.0</ProductVersion> <SchemaVersion>2.0</SchemaVersion> <ProjectGuid>{C61154BA-DD4A-4838-8420-0162A28925E0}</ProjectGuid> - <OutputType>Exe</OutputType> + <OutputType>Library</OutputType> <RootNamespace>Grpc.IntegrationTesting</RootNamespace> <AssemblyName>Grpc.IntegrationTesting</AssemblyName> - <StartupObject>Grpc.IntegrationTesting.Client</StartupObject> <TargetFrameworkVersion>v4.5</TargetFrameworkVersion> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' "> @@ -43,12 +42,13 @@ </ItemGroup> <ItemGroup> <Compile Include="Properties\AssemblyInfo.cs" /> - <Compile Include="Client.cs" /> <Compile Include="TestServiceGrpc.cs" /> <Compile Include="Empty.cs" /> <Compile Include="Messages.cs" /> <Compile Include="InteropClientServerTest.cs" /> <Compile Include="TestServiceImpl.cs" /> + <Compile Include="InteropServer.cs" /> + <Compile Include="InteropClient.cs" /> </ItemGroup> <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> <ItemGroup> diff --git a/src/csharp/Grpc.IntegrationTesting/Client.cs b/src/csharp/Grpc.IntegrationTesting/InteropClient.cs similarity index 98% rename from src/csharp/Grpc.IntegrationTesting/Client.cs rename to src/csharp/Grpc.IntegrationTesting/InteropClient.cs index fa1c7cd051b72af67e553ae383f6605e511d3c0f..a7a3c63e03296a3890a3f49c5994c1932879e2a1 100644 --- a/src/csharp/Grpc.IntegrationTesting/Client.cs +++ b/src/csharp/Grpc.IntegrationTesting/InteropClient.cs @@ -44,7 +44,7 @@ using grpc.testing; namespace Grpc.IntegrationTesting { - class Client + public class InteropClient { private class ClientOptions { @@ -59,12 +59,12 @@ namespace Grpc.IntegrationTesting ClientOptions options; - private Client(ClientOptions options) + private InteropClient(ClientOptions options) { this.options = options; } - public static void Main(string[] args) + public static void Run(string[] args) { Console.WriteLine("gRPC C# interop testing client"); ClientOptions options = ParseArguments(args); @@ -89,7 +89,7 @@ namespace Grpc.IntegrationTesting Environment.Exit(1); } - var interopClient = new Client(options); + var interopClient = new InteropClient(options); interopClient.Run(); } diff --git a/src/csharp/Grpc.IntegrationTesting/InteropClientServerTest.cs b/src/csharp/Grpc.IntegrationTesting/InteropClientServerTest.cs index 87d25b0a98c13a1546b20ea7adc0a772b607344c..4bb0b9ee51fe82bb941c1df704744010ce38b26c 100644 --- a/src/csharp/Grpc.IntegrationTesting/InteropClientServerTest.cs +++ b/src/csharp/Grpc.IntegrationTesting/InteropClientServerTest.cs @@ -77,37 +77,37 @@ namespace Grpc.IntegrationTesting [Test] public void EmptyUnary() { - Client.RunEmptyUnary(client); + InteropClient.RunEmptyUnary(client); } [Test] public void LargeUnary() { - Client.RunEmptyUnary(client); + InteropClient.RunEmptyUnary(client); } [Test] public void ClientStreaming() { - Client.RunClientStreaming(client); + InteropClient.RunClientStreaming(client); } [Test] public void ServerStreaming() { - Client.RunServerStreaming(client); + InteropClient.RunServerStreaming(client); } [Test] public void PingPong() { - Client.RunPingPong(client); + InteropClient.RunPingPong(client); } [Test] public void EmptyStream() { - Client.RunEmptyStream(client); + InteropClient.RunEmptyStream(client); } // TODO: add cancel_after_begin diff --git a/src/csharp/Grpc.IntegrationTesting/InteropServer.cs b/src/csharp/Grpc.IntegrationTesting/InteropServer.cs new file mode 100644 index 0000000000000000000000000000000000000000..a25d3b3530fc5f77ac684a48278b34eac028bad3 --- /dev/null +++ b/src/csharp/Grpc.IntegrationTesting/InteropServer.cs @@ -0,0 +1,140 @@ +#region Copyright notice and license + +// Copyright 2015, Google Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +#endregion + +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Text.RegularExpressions; +using System.Threading.Tasks; +using Google.ProtocolBuffers; +using Grpc.Core; +using Grpc.Core.Utils; +using NUnit.Framework; +using grpc.testing; + +namespace Grpc.IntegrationTesting +{ + public class InteropServer + { + private class ServerOptions + { + public bool help; + public int? port; + public bool useTls; + } + + ServerOptions options; + + private InteropServer(ServerOptions options) + { + this.options = options; + } + + public static void Run(string[] args) + { + Console.WriteLine("gRPC C# interop testing server"); + ServerOptions options = ParseArguments(args); + + if (!options.port.HasValue) + { + Console.WriteLine("Missing required argument."); + Console.WriteLine(); + options.help = true; + } + + if (options.help) + { + Console.WriteLine("Usage:"); + Console.WriteLine(" --port=PORT"); + Console.WriteLine(" --use_tls=BOOLEAN"); + Console.WriteLine(); + Environment.Exit(1); + } + + var interopServer = new InteropServer(options); + interopServer.Run(); + } + + private void Run() + { + GrpcEnvironment.Initialize(); + + var server = new Server(); + server.AddServiceDefinition(TestServiceGrpc.BindService(new TestServiceImpl())); + + string addr = "0.0.0.0:" + options.port; + server.AddPort(addr); + Console.WriteLine("Running server on " + addr); + server.Start(); + + server.ShutdownTask.Wait(); + + GrpcEnvironment.Shutdown(); + } + + private static ServerOptions ParseArguments(string[] args) + { + var options = new ServerOptions(); + foreach(string arg in args) + { + ParseArgument(arg, options); + if (options.help) + { + break; + } + } + return options; + } + + private static void ParseArgument(string arg, ServerOptions options) + { + Match match; + match = Regex.Match(arg, "--port=(.*)"); + if (match.Success) + { + options.port = int.Parse(match.Groups[1].Value.Trim()); + return; + } + + match = Regex.Match(arg, "--use_tls=(.*)"); + if (match.Success) + { + options.useTls = bool.Parse(match.Groups[1].Value.Trim()); + return; + } + + Console.WriteLine(string.Format("Unrecognized argument \"{0}\"", arg)); + options.help = true; + } + } +} diff --git a/src/csharp/Grpc.sln b/src/csharp/Grpc.sln index a544eb1c338f5a11bf3ae564ad1e4335176ed1c4..2e6d28869938030b6d789da91c0c25e181200206 100644 --- a/src/csharp/Grpc.sln +++ b/src/csharp/Grpc.sln @@ -13,6 +13,10 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Grpc.Examples.MathClient", EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Grpc.IntegrationTesting", "Grpc.IntegrationTesting\Grpc.IntegrationTesting.csproj", "{C61154BA-DD4A-4838-8420-0162A28925E0}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Grpc.IntegrationTesting.Client", "Grpc.IntegrationTesting.Client\Grpc.IntegrationTesting.Client.csproj", "{3D166931-BA2D-416E-95A3-D36E8F6E90B9}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Grpc.IntegrationTesting.Server", "Grpc.IntegrationTesting.Server\Grpc.IntegrationTesting.Server.csproj", "{A654F3B8-E859-4E6A-B30D-227527DBEF0D}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|x86 = Debug|x86 @@ -23,6 +27,10 @@ Global {143B1C29-C442-4BE0-BF3F-A8F92288AC9F}.Debug|x86.Build.0 = Debug|Any CPU {143B1C29-C442-4BE0-BF3F-A8F92288AC9F}.Release|x86.ActiveCfg = Release|Any CPU {143B1C29-C442-4BE0-BF3F-A8F92288AC9F}.Release|x86.Build.0 = Release|Any CPU + {3D166931-BA2D-416E-95A3-D36E8F6E90B9}.Debug|x86.ActiveCfg = Debug|x86 + {3D166931-BA2D-416E-95A3-D36E8F6E90B9}.Debug|x86.Build.0 = Debug|x86 + {3D166931-BA2D-416E-95A3-D36E8F6E90B9}.Release|x86.ActiveCfg = Release|x86 + {3D166931-BA2D-416E-95A3-D36E8F6E90B9}.Release|x86.Build.0 = Release|x86 {61ECB8EE-0C96-4F8E-B187-8E4D227417C0}.Debug|x86.ActiveCfg = Debug|x86 {61ECB8EE-0C96-4F8E-B187-8E4D227417C0}.Debug|x86.Build.0 = Debug|x86 {61ECB8EE-0C96-4F8E-B187-8E4D227417C0}.Release|x86.ActiveCfg = Release|x86 @@ -35,6 +43,10 @@ Global {86EC5CB4-4EA2-40A2-8057-86542A0353BB}.Debug|x86.Build.0 = Debug|Any CPU {86EC5CB4-4EA2-40A2-8057-86542A0353BB}.Release|x86.ActiveCfg = Release|Any CPU {86EC5CB4-4EA2-40A2-8057-86542A0353BB}.Release|x86.Build.0 = Release|Any CPU + {A654F3B8-E859-4E6A-B30D-227527DBEF0D}.Debug|x86.ActiveCfg = Debug|x86 + {A654F3B8-E859-4E6A-B30D-227527DBEF0D}.Debug|x86.Build.0 = Debug|x86 + {A654F3B8-E859-4E6A-B30D-227527DBEF0D}.Release|x86.ActiveCfg = Release|x86 + {A654F3B8-E859-4E6A-B30D-227527DBEF0D}.Release|x86.Build.0 = Release|x86 {C61154BA-DD4A-4838-8420-0162A28925E0}.Debug|x86.ActiveCfg = Debug|x86 {C61154BA-DD4A-4838-8420-0162A28925E0}.Debug|x86.Build.0 = Debug|x86 {C61154BA-DD4A-4838-8420-0162A28925E0}.Release|x86.ActiveCfg = Release|x86 diff --git a/src/csharp/README.md b/src/csharp/README.md index 55739a1f83c7e2f7dcf72682241b4f96420701b4..21aab5211806f3a402b0e7df4d125fd07f8a7e94 100755 --- a/src/csharp/README.md +++ b/src/csharp/README.md @@ -9,7 +9,7 @@ Status **This gRPC C# implementation is work-in-progress and is not expected to work yet.** - The implementation is a wrapper around gRPC C core library -- Code only runs under mono currently, building gGRPC C core library under Windows +- Code only runs under mono currently, building gRPC C core library under Windows is in progress. - It is very possible that some parts of the code will be heavily refactored or completely rewritten. diff --git a/src/node/LICENSE b/src/node/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..0209b570e10da54c158654433c5d3212b548c352 --- /dev/null +++ b/src/node/LICENSE @@ -0,0 +1,28 @@ +Copyright 2015, Google Inc. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/src/node/binding.gyp b/src/node/binding.gyp index 5c34be24ff5fef0a7fe80578f63dec5d90201c74..10afaf696271f120ce1ef2fb10e80a36ee3d72e8 100644 --- a/src/node/binding.gyp +++ b/src/node/binding.gyp @@ -10,7 +10,7 @@ "<!(node -e \"require('nan')\")" ], 'cflags': [ - '-std=c++11', + '-std=c++0x', '-Wall', '-pthread', '-pedantic', diff --git a/src/node/package.json b/src/node/package.json index e9995e7f0c738e84b97b1b9ea6e0571ae96fc458..0ef1c990b1ee27001f8b14b0c5dff24f901e937d 100644 --- a/src/node/package.json +++ b/src/node/package.json @@ -1,7 +1,24 @@ { "name": "grpc", - "version": "0.5.0", + "version": "0.5.1", + "author": "Google Inc.", "description": "gRPC Library for Node", + "homepage": "http://www.grpc.io/", + "repository": { + "type": "git", + "url": "https://github.com/grpc/grpc.git" + }, + "bugs": "https://github.com/grpc/grpc/issues", + "contributors": [ + { + "name": "Michael Lumish", + "email": "mlumish@google.com" + } + ], + "directories": { + "lib": "src", + "example": "examples" + }, "scripts": { "lint": "node ./node_modules/jshint/bin/jshint src test examples interop index.js", "test": "node ./node_modules/mocha/bin/mocha && npm run-script lint" @@ -22,6 +39,7 @@ "strftime": "^0.8.2" }, "files": [ + "LICENSE", "README.md", "index.js", "binding.gyp", @@ -31,5 +49,6 @@ "src", "test" ], - "main": "index.js" + "main": "index.js", + "license": "BSD-3-Clause" } diff --git a/src/python/README.md b/src/python/README.md index 0ead86b91e801f86ab94c5090344362ec8b21d98..06ef1a0f8362122d8653fe05104a23b2299f93a0 100755 --- a/src/python/README.md +++ b/src/python/README.md @@ -37,3 +37,19 @@ Testing ``` $ tools/run_tests/run_python.sh ``` + + +Installing +----------------------- + +- [Install the gRPC core](https://github.com/grpc/grpc/blob/master/INSTALL) + +- Install gRPC Python's dependencies +``` +$ pip install enum34==1.0.4 futures==2.2.0 protobuf==3.0.0-alpha-1 +``` + +- Install gRPC Python +``` +$ pip install src/python/src +``` diff --git a/src/ruby/grpc.gemspec b/src/ruby/grpc.gemspec index 25a3ff5ce27a4956c64ca7b3da05b5d189b7e1d2..ed26fef4a97a3e381d30cf9503dc62f2a240b34e 100755 --- a/src/ruby/grpc.gemspec +++ b/src/ruby/grpc.gemspec @@ -11,6 +11,7 @@ Gem::Specification.new do |s| s.homepage = 'https://github.com/google/grpc/tree/master/src/ruby' s.summary = 'GRPC system in Ruby' s.description = 'Send RPCs from Ruby using GRPC' + s.license = 'BSD-3-Clause' s.files = `git ls-files`.split("\n") s.test_files = `git ls-files -- spec/*`.split("\n") diff --git a/src/ruby/lib/grpc/generic/service.rb b/src/ruby/lib/grpc/generic/service.rb index 61d187163549374eec70dbc3d4bf8437b7d7a5ca..6ea0831a2e64265ff9dd81920327f2dc42c198a4 100644 --- a/src/ruby/lib/grpc/generic/service.rb +++ b/src/ruby/lib/grpc/generic/service.rb @@ -217,8 +217,8 @@ module GRPC def self.included(o) o.extend(Dsl) - # Update to the use the service name including module. Proivde a default - # that can be nil e,g. when modules are declared dynamically. + # Update to the use the service name including module. Provide a default + # that can be nil e.g. when modules are declared dynamically. return unless o.service_name.nil? if o.name.nil? o.service_name = 'GenericService' diff --git a/templates/Makefile.template b/templates/Makefile.template index 0984a6d008ed6dadaa4af5953d43e33ea28706f7..0413f19e44eff080ca56d19b0467bec19b81b58e 100644 --- a/templates/Makefile.template +++ b/templates/Makefile.template @@ -94,7 +94,7 @@ LDXX_valgrind = g++ CPPFLAGS_valgrind = -O0 OPENSSL_CFLAGS_valgrind = -DPURIFY LDFLAGS_valgrind = -DEFINES_valgrind = _DEBUG DEBUG GRPC_TEST_SLOWDOWN_FACTOR=20 +DEFINES_valgrind = _DEBUG DEBUG GRPC_TEST_SLOWDOWN_BUILD_FACTOR=20 VALID_CONFIG_tsan = 1 REQUIRE_CUSTOM_LIBRARIES_tsan = 1 @@ -104,7 +104,7 @@ LD_tsan = clang LDXX_tsan = clang++ CPPFLAGS_tsan = -O1 -fsanitize=thread -fno-omit-frame-pointer LDFLAGS_tsan = -fsanitize=thread -DEFINES_tsan = NDEBUG GRPC_TEST_SLOWDOWN_FACTOR=10 +DEFINES_tsan = NDEBUG GRPC_TEST_SLOWDOWN_BUILD_FACTOR=10 VALID_CONFIG_asan = 1 REQUIRE_CUSTOM_LIBRARIES_asan = 1 @@ -114,7 +114,7 @@ LD_asan = clang LDXX_asan = clang++ CPPFLAGS_asan = -O1 -fsanitize=address -fno-omit-frame-pointer LDFLAGS_asan = -fsanitize=address -DEFINES_asan = NDEBUG GRPC_TEST_SLOWDOWN_FACTOR=5 +DEFINES_asan = NDEBUG GRPC_TEST_SLOWDOWN_BUILD_FACTOR=5 VALID_CONFIG_msan = 1 REQUIRE_CUSTOM_LIBRARIES_msan = 1 @@ -125,7 +125,7 @@ LDXX_msan = clang++-libc++ CPPFLAGS_msan = -O1 -fsanitize=memory -fsanitize-memory-track-origins -fno-omit-frame-pointer -DGTEST_HAS_TR1_TUPLE=0 -DGTEST_USE_OWN_TR1_TUPLE=1 OPENSSL_CFLAGS_msan = -DPURIFY LDFLAGS_msan = -fsanitize=memory -DGTEST_HAS_TR1_TUPLE=0 -DGTEST_USE_OWN_TR1_TUPLE=1 -DEFINES_msan = NDEBUG GRPC_TEST_SLOWDOWN_FACTOR=20 +DEFINES_msan = NDEBUG GRPC_TEST_SLOWDOWN_BUILD_FACTOR=20 VALID_CONFIG_ubsan = 1 REQUIRE_CUSTOM_LIBRARIES_ubsan = 1 @@ -136,7 +136,7 @@ LDXX_ubsan = clang++ CPPFLAGS_ubsan = -O1 -fsanitize=undefined -fno-omit-frame-pointer OPENSSL_CFLAGS_ubsan = -DPURIFY LDFLAGS_ubsan = -fsanitize=undefined -DEFINES_ubsan = NDEBUG GRPC_TEST_SLOWDOWN_FACTOR=10 +DEFINES_ubsan = NDEBUG GRPC_TEST_SLOWDOWN_BUILD_FACTOR=10 VALID_CONFIG_gcov = 1 CC_gcov = gcc @@ -160,7 +160,15 @@ CXX = $(CXX_$(CONFIG)) LD = $(LD_$(CONFIG)) LDXX = $(LDXX_$(CONFIG)) AR = ar +ifeq ($(SYSTEM),Linux) STRIP = strip --strip-unneeded +else +ifeq ($(SYSTEM),Darwin) +STRIP = strip -x +else +STRIP = strip +endif +endif INSTALL = install RM = rm -f @@ -169,6 +177,10 @@ $(error Invalid CONFIG value '$(CONFIG)') endif +# Detect if we can use C++11 +CXX11_CHECK_CMD = $(CXX) -std=c++11 -o /dev/null -c test/build/c++11.cc +HAS_CXX11 = $(shell $(CXX11_CHECK_CMD) 2> /dev/null && echo true || echo false) + # The HOST compiler settings are used to compile the protoc plugins. # In most cases, you won't have to change anything, but if you are # cross-compiling, you can override these variables from GNU make's @@ -183,8 +195,17 @@ CPPFLAGS += $(CPPFLAGS_$(CONFIG)) DEFINES += $(DEFINES_$(CONFIG)) INSTALL_PREFIX=\"$(prefix)\" LDFLAGS += $(LDFLAGS_$(CONFIG)) +ifdef EXTRA_DEFINES +DEFINES += EXTRA_DEFINES +endif + CFLAGS += -std=c89 -pedantic +ifeq ($(HAS_CXX11),true) CXXFLAGS += -std=c++11 +else +CXXFLAGS += -std=c++0x +DEFINES += GRPC_OLD_CXX +endif CPPFLAGS += -g -fPIC -Wall -Wextra -Werror -Wno-long-long -Wno-unused-parameter LDFLAGS += -g -fPIC @@ -495,7 +516,11 @@ third_party/protobuf/configure: $(LIBDIR)/$(CONFIG)/protobuf/libprotobuf.a: third_party/protobuf/configure $(E) "[MAKE] Building protobuf" +ifeq ($(HAVE_CXX11),true) $(Q)(cd third_party/protobuf ; CC="$(CC)" CXX="$(CXX)" LDFLAGS="$(LDFLAGS_$(CONFIG)) -g" CXXFLAGS="-DLANG_CXX11 -std=c++11" CPPFLAGS="-fPIC $(CPPFLAGS_$(CONFIG)) -g" ./configure --disable-shared --enable-static) +else + $(Q)(cd third_party/protobuf ; CC="$(CC)" CXX="$(CXX)" LDFLAGS="$(LDFLAGS_$(CONFIG)) -g" CXXFLAGS="-std=c++0x" CPPFLAGS="-fPIC $(CPPFLAGS_$(CONFIG)) -g" ./configure --disable-shared --enable-static) +endif $(Q)$(MAKE) -C third_party/protobuf clean $(Q)$(MAKE) -C third_party/protobuf $(Q)mkdir -p $(LIBDIR)/$(CONFIG)/protobuf @@ -1095,11 +1120,11 @@ else ## That simplifies the codegen a bit, but prevents a fully defined Makefile. ## I can live with that. ## -% if tgt.build == 'protoc': +% if tgt.build == 'protoc' or tgt.language == 'c++': ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins if you don't have protobuf 3.0.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.0.0+. $(BINDIR)/$(CONFIG)/${tgt.name}: protobuf_dep_error @@ -1154,7 +1179,7 @@ $(BINDIR)/$(CONFIG)/${tgt.name}: $(${tgt.name.upper()}_OBJS)\ $(LDLIBS_SECURE)\ % endif -o $(BINDIR)/$(CONFIG)/${tgt.name} -% if tgt.build == 'protoc': +% if tgt.build == 'protoc' or tgt.language == 'c++': endif % endif diff --git a/templates/tools/run_tests/tests.json.template b/templates/tools/run_tests/tests.json.template index bb54489861550794513fabc5e32fd41f1eab39e4..6d7520bc0f82fee3d153c285cce4ff8c10cf3edc 100644 --- a/templates/tools/run_tests/tests.json.template +++ b/templates/tools/run_tests/tests.json.template @@ -2,7 +2,9 @@ import json %> -${json.dumps([{"name": tgt.name, "language": tgt.language} +${json.dumps([{"name": tgt.name, + "language": tgt.language, + "flaky": tgt.get("flaky", False)} for tgt in targets if tgt.get('run', True) and tgt.build == 'test'], sort_keys=True, indent=2)} diff --git a/test/build/c++11.cc b/test/build/c++11.cc new file mode 100644 index 0000000000000000000000000000000000000000..4822a20e7f24e6e0265537776c436f652bc880f0 --- /dev/null +++ b/test/build/c++11.cc @@ -0,0 +1,52 @@ +/* + * + * Copyright 2015, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +/* This is just a compilation test, to see if we have C++11. */ + +#include <stdlib.h> +#include <zlib.h> + +class Base { + public: + virtual void foo() = 0; +}; + +class Foo final : public Base { + public: + void foo() override {} +}; + +int main() { + Foo().foo(); + return 0; +} diff --git a/test/compiler/python_plugin_test.py b/test/compiler/python_plugin_test.py index 3919de14509b3bafef97424f9673670fce5128c5..1981f49fbb87c0b58c95fb008b5650b62d9f8e3d 100644 --- a/test/compiler/python_plugin_test.py +++ b/test/compiler/python_plugin_test.py @@ -57,7 +57,6 @@ LONG_DELAY = 1 # Assigned in __main__. _build_mode = None -_port = None class _ServicerMethods(object): @@ -87,14 +86,14 @@ class _ServicerMethods(object): while self._paused: time.sleep(0) - def UnaryCall(self, request, context): + def UnaryCall(self, request, unused_context): response = self.test_pb2.SimpleResponse() response.payload.payload_type = self.test_pb2.COMPRESSABLE response.payload.payload_compressable = 'a' * request.response_size self._control() return response - def StreamingOutputCall(self, request, context): + def StreamingOutputCall(self, request, unused_context): for parameter in request.response_parameters: response = self.test_pb2.StreamingOutputCallResponse() response.payload.payload_type = self.test_pb2.COMPRESSABLE @@ -102,7 +101,7 @@ class _ServicerMethods(object): self._control() yield response - def StreamingInputCall(self, request_iter, context): + def StreamingInputCall(self, request_iter, unused_context): response = self.test_pb2.StreamingInputCallResponse() aggregated_payload_size = 0 for request in request_iter: @@ -111,7 +110,7 @@ class _ServicerMethods(object): self._control() return response - def FullDuplexCall(self, request_iter, context): + def FullDuplexCall(self, request_iter, unused_context): for request in request_iter: for parameter in request.response_parameters: response = self.test_pb2.StreamingOutputCallResponse() @@ -120,7 +119,7 @@ class _ServicerMethods(object): self._control() yield response - def HalfDuplexCall(self, request_iter, context): + def HalfDuplexCall(self, request_iter, unused_context): responses = [] for request in request_iter: for parameter in request.response_parameters: @@ -133,6 +132,7 @@ class _ServicerMethods(object): yield response +@contextlib.contextmanager def _CreateService(test_pb2, delay): """Provides a servicer backend and a stub. @@ -148,9 +148,11 @@ def _CreateService(test_pb2, delay): test_pb2: the test_pb2 module generated by this test delay: delay in seconds per response from the servicer timeout: how long the stub will wait for the servicer by default. - Returns: - A two-tuple (servicer, stub), where the servicer is the back-end of the - service bound to the stub. + + Yields: + A three-tuple (servicer_methods, servicer, stub), where the servicer is + the back-end of the service bound to the stub and the server and stub + are both activated and ready for use. """ servicer_methods = _ServicerMethods(test_pb2, delay) @@ -172,10 +174,13 @@ def _CreateService(test_pb2, delay): return servicer_methods.HalfDuplexCall(request_iter, context) servicer = Servicer() - server = getattr(test_pb2, SERVER_FACTORY_IDENTIFIER)(servicer, _port, - None, None) - stub = getattr(test_pb2, STUB_FACTORY_IDENTIFIER)('localhost', _port) - return servicer_methods, stub, server + server = getattr( + test_pb2, SERVER_FACTORY_IDENTIFIER)(servicer, 0, None, None) + with server: + port = server.port() + stub = getattr(test_pb2, STUB_FACTORY_IDENTIFIER)('localhost', port) + with stub: + yield servicer_methods, stub, server def StreamingInputRequest(test_pb2): @@ -255,25 +260,23 @@ class PythonPluginTest(unittest.TestCase): def testUpDown(self): import test_pb2 - servicer, stub, server = _CreateService(test_pb2, DOES_NOT_MATTER_DELAY) - request = test_pb2.SimpleRequest(response_size=13) - with server, stub: - pass + with _CreateService( + test_pb2, DOES_NOT_MATTER_DELAY) as (servicer, stub, unused_server): + request = test_pb2.SimpleRequest(response_size=13) def testUnaryCall(self): import test_pb2 # pylint: disable=g-import-not-at-top - servicer, stub, server = _CreateService(test_pb2, NO_DELAY) - request = test_pb2.SimpleRequest(response_size=13) - with server, stub: + with _CreateService(test_pb2, NO_DELAY) as (servicer, stub, unused_server): + request = test_pb2.SimpleRequest(response_size=13) response = stub.UnaryCall(request, NORMAL_TIMEOUT) expected_response = servicer.UnaryCall(request, None) self.assertEqual(expected_response, response) def testUnaryCallAsync(self): import test_pb2 # pylint: disable=g-import-not-at-top - servicer, stub, server = _CreateService(test_pb2, LONG_DELAY) request = test_pb2.SimpleRequest(response_size=13) - with server, stub: + with _CreateService(test_pb2, LONG_DELAY) as ( + servicer, stub, unused_server): start_time = time.clock() response_future = stub.UnaryCall.async(request, LONG_TIMEOUT) # Check that we didn't block on the asynchronous call. @@ -285,10 +288,9 @@ class PythonPluginTest(unittest.TestCase): def testUnaryCallAsyncExpired(self): import test_pb2 # pylint: disable=g-import-not-at-top # set the timeout super low... - servicer, stub, server = _CreateService(test_pb2, - delay=DOES_NOT_MATTER_DELAY) - request = test_pb2.SimpleRequest(response_size=13) - with server, stub: + with _CreateService(test_pb2, DOES_NOT_MATTER_DELAY) as ( + servicer, stub, unused_server): + request = test_pb2.SimpleRequest(response_size=13) with servicer.pause(): response_future = stub.UnaryCall.async(request, SHORT_TIMEOUT) with self.assertRaises(exceptions.ExpirationError): @@ -296,9 +298,9 @@ class PythonPluginTest(unittest.TestCase): def testUnaryCallAsyncCancelled(self): import test_pb2 # pylint: disable=g-import-not-at-top - servicer, stub, server = _CreateService(test_pb2, DOES_NOT_MATTER_DELAY) request = test_pb2.SimpleRequest(response_size=13) - with server, stub: + with _CreateService(test_pb2, DOES_NOT_MATTER_DELAY) as ( + servicer, stub, unused_server): with servicer.pause(): response_future = stub.UnaryCall.async(request, 1) response_future.cancel() @@ -306,18 +308,17 @@ class PythonPluginTest(unittest.TestCase): def testUnaryCallAsyncFailed(self): import test_pb2 # pylint: disable=g-import-not-at-top - servicer, stub, server = _CreateService(test_pb2, DOES_NOT_MATTER_DELAY) request = test_pb2.SimpleRequest(response_size=13) - with server, stub: + with _CreateService(test_pb2, DOES_NOT_MATTER_DELAY) as ( + servicer, stub, unused_server): with servicer.fail(): response_future = stub.UnaryCall.async(request, NORMAL_TIMEOUT) self.assertIsNotNone(response_future.exception()) def testStreamingOutputCall(self): import test_pb2 # pylint: disable=g-import-not-at-top - servicer, stub, server = _CreateService(test_pb2, NO_DELAY) request = StreamingOutputRequest(test_pb2) - with server, stub: + with _CreateService(test_pb2, NO_DELAY) as (servicer, stub, unused_server): responses = stub.StreamingOutputCall(request, NORMAL_TIMEOUT) expected_responses = servicer.StreamingOutputCall(request, None) for check in itertools.izip_longest(expected_responses, responses): @@ -326,9 +327,9 @@ class PythonPluginTest(unittest.TestCase): def testStreamingOutputCallExpired(self): import test_pb2 # pylint: disable=g-import-not-at-top - servicer, stub, server = _CreateService(test_pb2, DOES_NOT_MATTER_DELAY) request = StreamingOutputRequest(test_pb2) - with server, stub: + with _CreateService(test_pb2, DOES_NOT_MATTER_DELAY) as ( + servicer, stub, unused_server): with servicer.pause(): responses = stub.StreamingOutputCall(request, SHORT_TIMEOUT) with self.assertRaises(exceptions.ExpirationError): @@ -336,10 +337,9 @@ class PythonPluginTest(unittest.TestCase): def testStreamingOutputCallCancelled(self): import test_pb2 # pylint: disable=g-import-not-at-top - unused_servicer, stub, server = _CreateService(test_pb2, - DOES_NOT_MATTER_DELAY) request = StreamingOutputRequest(test_pb2) - with server, stub: + with _CreateService(test_pb2, DOES_NOT_MATTER_DELAY) as ( + unused_servicer, stub, unused_server): responses = stub.StreamingOutputCall(request, SHORT_TIMEOUT) next(responses) responses.cancel() @@ -350,9 +350,9 @@ class PythonPluginTest(unittest.TestCase): 'instead of raising the proper error.') def testStreamingOutputCallFailed(self): import test_pb2 # pylint: disable=g-import-not-at-top - servicer, stub, server = _CreateService(test_pb2, DOES_NOT_MATTER_DELAY) request = StreamingOutputRequest(test_pb2) - with server, stub: + with _CreateService(test_pb2, DOES_NOT_MATTER_DELAY) as ( + servicer, stub, unused_server): with servicer.fail(): responses = stub.StreamingOutputCall(request, 1) self.assertIsNotNone(responses) @@ -361,8 +361,7 @@ class PythonPluginTest(unittest.TestCase): def testStreamingInputCall(self): import test_pb2 # pylint: disable=g-import-not-at-top - servicer, stub, server = _CreateService(test_pb2, NO_DELAY) - with server, stub: + with _CreateService(test_pb2, NO_DELAY) as (servicer, stub, unused_server): response = stub.StreamingInputCall(StreamingInputRequest(test_pb2), NORMAL_TIMEOUT) expected_response = servicer.StreamingInputCall( @@ -371,9 +370,8 @@ class PythonPluginTest(unittest.TestCase): def testStreamingInputCallAsync(self): import test_pb2 # pylint: disable=g-import-not-at-top - servicer, stub, server = _CreateService( - test_pb2, LONG_DELAY) - with server, stub: + with _CreateService(test_pb2, LONG_DELAY) as ( + servicer, stub, unused_server): start_time = time.clock() response_future = stub.StreamingInputCall.async( StreamingInputRequest(test_pb2), LONG_TIMEOUT) @@ -386,8 +384,8 @@ class PythonPluginTest(unittest.TestCase): def testStreamingInputCallAsyncExpired(self): import test_pb2 # pylint: disable=g-import-not-at-top # set the timeout super low... - servicer, stub, server = _CreateService(test_pb2, DOES_NOT_MATTER_DELAY) - with server, stub: + with _CreateService(test_pb2, DOES_NOT_MATTER_DELAY) as ( + servicer, stub, unused_server): with servicer.pause(): response_future = stub.StreamingInputCall.async( StreamingInputRequest(test_pb2), SHORT_TIMEOUT) @@ -398,8 +396,8 @@ class PythonPluginTest(unittest.TestCase): def testStreamingInputCallAsyncCancelled(self): import test_pb2 # pylint: disable=g-import-not-at-top - servicer, stub, server = _CreateService(test_pb2, DOES_NOT_MATTER_DELAY) - with server, stub: + with _CreateService(test_pb2, DOES_NOT_MATTER_DELAY) as ( + servicer, stub, unused_server): with servicer.pause(): response_future = stub.StreamingInputCall.async( StreamingInputRequest(test_pb2), NORMAL_TIMEOUT) @@ -410,8 +408,8 @@ class PythonPluginTest(unittest.TestCase): def testStreamingInputCallAsyncFailed(self): import test_pb2 # pylint: disable=g-import-not-at-top - servicer, stub, server = _CreateService(test_pb2, DOES_NOT_MATTER_DELAY) - with server, stub: + with _CreateService(test_pb2, DOES_NOT_MATTER_DELAY) as ( + servicer, stub, unused_server): with servicer.fail(): response_future = stub.StreamingInputCall.async( StreamingInputRequest(test_pb2), SHORT_TIMEOUT) @@ -419,8 +417,7 @@ class PythonPluginTest(unittest.TestCase): def testFullDuplexCall(self): import test_pb2 # pylint: disable=g-import-not-at-top - servicer, stub, server = _CreateService(test_pb2, NO_DELAY) - with server, stub: + with _CreateService(test_pb2, NO_DELAY) as (servicer, stub, unused_server): responses = stub.FullDuplexCall(FullDuplexRequest(test_pb2), NORMAL_TIMEOUT) expected_responses = servicer.FullDuplexCall(FullDuplexRequest(test_pb2), @@ -431,9 +428,9 @@ class PythonPluginTest(unittest.TestCase): def testFullDuplexCallExpired(self): import test_pb2 # pylint: disable=g-import-not-at-top - servicer, stub, server = _CreateService(test_pb2, DOES_NOT_MATTER_DELAY) request = FullDuplexRequest(test_pb2) - with server, stub: + with _CreateService(test_pb2, DOES_NOT_MATTER_DELAY) as ( + servicer, stub, unused_server): with servicer.pause(): responses = stub.FullDuplexCall(request, SHORT_TIMEOUT) with self.assertRaises(exceptions.ExpirationError): @@ -441,8 +438,7 @@ class PythonPluginTest(unittest.TestCase): def testFullDuplexCallCancelled(self): import test_pb2 # pylint: disable=g-import-not-at-top - unused_servicer, stub, server = _CreateService(test_pb2, NO_DELAY) - with server, stub: + with _CreateService(test_pb2, NO_DELAY) as (servicer, stub, unused_server): request = FullDuplexRequest(test_pb2) responses = stub.FullDuplexCall(request, NORMAL_TIMEOUT) next(responses) @@ -454,9 +450,9 @@ class PythonPluginTest(unittest.TestCase): 'and fix.') def testFullDuplexCallFailed(self): import test_pb2 # pylint: disable=g-import-not-at-top - servicer, stub, server = _CreateService(test_pb2, DOES_NOT_MATTER_DELAY) request = FullDuplexRequest(test_pb2) - with server, stub: + with _CreateService(test_pb2, DOES_NOT_MATTER_DELAY) as ( + servicer, stub, unused_server): with servicer.fail(): responses = stub.FullDuplexCall(request, NORMAL_TIMEOUT) self.assertIsNotNone(responses) @@ -465,16 +461,16 @@ class PythonPluginTest(unittest.TestCase): def testHalfDuplexCall(self): import test_pb2 # pylint: disable=g-import-not-at-top - servicer, stub, server = _CreateService(test_pb2, NO_DELAY) - def HalfDuplexRequest(): - request = test_pb2.StreamingOutputCallRequest() - request.response_parameters.add(size=1, interval_us=0) - yield request - request = test_pb2.StreamingOutputCallRequest() - request.response_parameters.add(size=2, interval_us=0) - request.response_parameters.add(size=3, interval_us=0) - yield request - with server, stub: + with _CreateService(test_pb2, DOES_NOT_MATTER_DELAY) as ( + servicer, stub, unused_server): + def HalfDuplexRequest(): + request = test_pb2.StreamingOutputCallRequest() + request.response_parameters.add(size=1, interval_us=0) + yield request + request = test_pb2.StreamingOutputCallRequest() + request.response_parameters.add(size=2, interval_us=0) + request.response_parameters.add(size=3, interval_us=0) + yield request responses = stub.HalfDuplexCall(HalfDuplexRequest(), NORMAL_TIMEOUT) expected_responses = servicer.HalfDuplexCall(HalfDuplexRequest(), None) for check in itertools.izip_longest(expected_responses, responses): @@ -483,7 +479,6 @@ class PythonPluginTest(unittest.TestCase): def testHalfDuplexCallWedged(self): import test_pb2 # pylint: disable=g-import-not-at-top - _, stub, server = _CreateService(test_pb2, NO_DELAY) wait_flag = [False] @contextlib.contextmanager def wait(): # pylint: disable=invalid-name @@ -497,7 +492,7 @@ class PythonPluginTest(unittest.TestCase): yield request while wait_flag[0]: time.sleep(0.1) - with server, stub: + with _CreateService(test_pb2, NO_DELAY) as (servicer, stub, unused_server): with wait(): responses = stub.HalfDuplexCall(HalfDuplexRequest(), NORMAL_TIMEOUT) # half-duplex waits for the client to send all info @@ -516,6 +511,5 @@ if __name__ == '__main__': parser.add_argument('--port', dest='port', type=int, default=0) args, remainder = parser.parse_known_args() _build_mode = args.build_mode - _port = args.port sys.argv[1:] = remainder unittest.main() diff --git a/test/compiler/test.proto b/test/compiler/test.proto index 1714de7c11b96861ede2711777524eb5d93cff32..ed7c6a7b797b127fe91ad6ad1a03b58b8e476918 100644 --- a/test/compiler/test.proto +++ b/test/compiler/test.proto @@ -32,8 +32,7 @@ // This file is duplicated around the code base. See GitHub issue #526. syntax = "proto2"; -// TODO(atash): Investigate this statement's utility. -// package grpc.testing; +package grpc.testing; enum PayloadType { // Compressable text format. diff --git a/test/core/util/port_posix.c b/test/core/util/port_posix.c index 0b6e7918accf81902d8d8ed8ea725e6f44f3ba7c..36f13e1b51e5a4084e3ddd74bd702498ed51949c 100644 --- a/test/core/util/port_posix.c +++ b/test/core/util/port_posix.c @@ -113,15 +113,23 @@ int grpc_pick_unused_port(void) { /* Type of port to first pick in next iteration */ int is_tcp = 1; - int try - = 0; + int try = 0; for (;;) { - int port = try - < NUM_RANDOM_PORTS_TO_PICK ? rand() % (65536 - 30000) + 30000 : 0; + int port; + try++; + if (try == 1) { + port = getpid() % (65536 - 30000) + 30000; + } else if (try <= NUM_RANDOM_PORTS_TO_PICK) { + port = rand() % (65536 - 30000) + 30000; + } else { + port = 0; + } + if (!is_port_available(&port, is_tcp)) { continue; } + GPR_ASSERT(port > 0); /* Check that the port # is free for the other type of socket also */ if (!is_port_available(&port, !is_tcp)) { diff --git a/test/core/util/test_config.c b/test/core/util/test_config.c index 1c46407311472c9e8908e28b6cbc1a75747fa2b7..1f0f0175b1c3dcf735af6b142be09c69a7580311 100644 --- a/test/core/util/test_config.c +++ b/test/core/util/test_config.c @@ -34,6 +34,7 @@ #include "test/core/util/test_config.h" #include <grpc/support/port_platform.h> +#include <grpc/support/log.h> #include <stdlib.h> #include <signal.h> @@ -52,6 +53,9 @@ void grpc_test_init(int argc, char **argv) { /* disable SIGPIPE */ signal(SIGPIPE, SIG_IGN); #endif + gpr_log(GPR_DEBUG, "test slowdown: machine=%f build=%f total=%f", + GRPC_TEST_SLOWDOWN_MACHINE_FACTOR, GRPC_TEST_SLOWDOWN_BUILD_FACTOR, + GRPC_TEST_SLOWDOWN_FACTOR); /* seed rng with pid, so we don't end up with the same random numbers as a concurrently running test binary */ srand(seed()); diff --git a/test/core/util/test_config.h b/test/core/util/test_config.h index 74c2a3cf1b163840456faf05843915dc6a75a87a..5292c7b525e9ebaabc82b4a5a5dd9a7702f75b5f 100644 --- a/test/core/util/test_config.h +++ b/test/core/util/test_config.h @@ -40,16 +40,23 @@ extern "C" { #endif /* __cplusplus */ -#ifndef GRPC_TEST_SLOWDOWN_FACTOR -#define GRPC_TEST_SLOWDOWN_FACTOR 1.0 +#ifndef GRPC_TEST_SLOWDOWN_BUILD_FACTOR +#define GRPC_TEST_SLOWDOWN_BUILD_FACTOR 1.0 #endif +#ifndef GRPC_TEST_SLOWDOWN_MACHINE_FACTOR +#define GRPC_TEST_SLOWDOWN_MACHINE_FACTOR 1.0 +#endif + +#define GRPC_TEST_SLOWDOWN_FACTOR \ + (GRPC_TEST_SLOWDOWN_BUILD_FACTOR * GRPC_TEST_SLOWDOWN_MACHINE_FACTOR) + #define GRPC_TIMEOUT_SECONDS_TO_DEADLINE(x) \ gpr_time_add(gpr_now(), \ gpr_time_from_micros(GRPC_TEST_SLOWDOWN_FACTOR * 1e6 * (x))) #define GRPC_TIMEOUT_MILLIS_TO_DEADLINE(x) \ - gpr_time_add(gpr_now(), \ + gpr_time_add(gpr_now(), \ gpr_time_from_micros(GRPC_TEST_SLOWDOWN_FACTOR * 1e3 * (x))) void grpc_test_init(int argc, char **argv); diff --git a/test/cpp/end2end/async_end2end_test.cc b/test/cpp/end2end/async_end2end_test.cc index 9e25a5308df3d53768b9925d0f1ac22d7cc2fc7f..5a2762d049088ef2def309db069fe17ba11c1a52 100644 --- a/test/cpp/end2end/async_end2end_test.cc +++ b/test/cpp/end2end/async_end2end_test.cc @@ -81,7 +81,7 @@ class AsyncEnd2endTest : public ::testing::Test { protected: AsyncEnd2endTest() : service_(&srv_cq_) {} - void SetUp() override { + void SetUp() GRPC_OVERRIDE { int port = grpc_pick_unused_port_or_die(); server_address_ << "localhost:" << port; // Setup server @@ -91,7 +91,7 @@ class AsyncEnd2endTest : public ::testing::Test { server_ = builder.BuildAndStart(); } - void TearDown() override { + void TearDown() GRPC_OVERRIDE { server_->Shutdown(); void* ignored_tag; bool ignored_ok; diff --git a/test/cpp/end2end/end2end_test.cc b/test/cpp/end2end/end2end_test.cc index 45f12a9e9d1fab537274bc4c32daf3227df313c1..1d5dfc4e34263c25a18c1476586717aa4b49f202 100644 --- a/test/cpp/end2end/end2end_test.cc +++ b/test/cpp/end2end/end2end_test.cc @@ -83,7 +83,7 @@ void MaybeEchoDeadline(ServerContext* context, const EchoRequest* request, class TestServiceImpl : public ::grpc::cpp::test::util::TestService::Service { public: Status Echo(ServerContext* context, const EchoRequest* request, - EchoResponse* response) override { + EchoResponse* response) GRPC_OVERRIDE { response->set_message(request->message()); MaybeEchoDeadline(context, request, response); return Status::OK; @@ -93,7 +93,7 @@ class TestServiceImpl : public ::grpc::cpp::test::util::TestService::Service { Status RequestStream(ServerContext* context, ServerReader<EchoRequest>* reader, - EchoResponse* response) override { + EchoResponse* response) GRPC_OVERRIDE { EchoRequest request; response->set_message(""); while (reader->Read(&request)) { @@ -105,7 +105,7 @@ class TestServiceImpl : public ::grpc::cpp::test::util::TestService::Service { // Return 3 messages. // TODO(yangg) make it generic by adding a parameter into EchoRequest Status ResponseStream(ServerContext* context, const EchoRequest* request, - ServerWriter<EchoResponse>* writer) override { + ServerWriter<EchoResponse>* writer) GRPC_OVERRIDE { EchoResponse response; response.set_message(request->message() + "0"); writer->Write(response); @@ -117,9 +117,9 @@ class TestServiceImpl : public ::grpc::cpp::test::util::TestService::Service { return Status::OK; } - Status BidiStream( - ServerContext* context, - ServerReaderWriter<EchoResponse, EchoRequest>* stream) override { + Status BidiStream(ServerContext* context, + ServerReaderWriter<EchoResponse, EchoRequest>* stream) + GRPC_OVERRIDE { EchoRequest request; EchoResponse response; while (stream->Read(&request)) { @@ -135,7 +135,7 @@ class TestServiceImplDupPkg : public ::grpc::cpp::test::util::duplicate::TestService::Service { public: Status Echo(ServerContext* context, const EchoRequest* request, - EchoResponse* response) override { + EchoResponse* response) GRPC_OVERRIDE { response->set_message("no package"); return Status::OK; } @@ -145,7 +145,7 @@ class End2endTest : public ::testing::Test { protected: End2endTest() : thread_pool_(2) {} - void SetUp() override { + void SetUp() GRPC_OVERRIDE { int port = grpc_pick_unused_port_or_die(); server_address_ << "localhost:" << port; // Setup server @@ -157,7 +157,7 @@ class End2endTest : public ::testing::Test { server_ = builder.BuildAndStart(); } - void TearDown() override { server_->Shutdown(); } + void TearDown() GRPC_OVERRIDE { server_->Shutdown(); } void ResetStub() { std::shared_ptr<ChannelInterface> channel = diff --git a/test/cpp/interop/client.cc b/test/cpp/interop/client.cc index acfaa87ec8b009d8f17ec764a8487479d2826e4b..f7537c2d7b2ebaa53715364dfa21a797baaa1dc2 100644 --- a/test/cpp/interop/client.cc +++ b/test/cpp/interop/client.cc @@ -38,6 +38,8 @@ #include <string> #include <thread> +#include <unistd.h> + #include <grpc/grpc.h> #include <grpc/support/log.h> #include <gflags/gflags.h> @@ -313,8 +315,7 @@ void DoResponseStreamingWithSlowConsumer() { GPR_ASSERT(response.payload().body() == grpc::string(kResponseMessageSize, '\0')); gpr_log(GPR_INFO, "received message %d", i); - std::this_thread::sleep_for( - std::chrono::milliseconds(kReceiveDelayMilliSeconds)); + usleep(kReceiveDelayMilliSeconds * 1000); ++i; } GPR_ASSERT(kNumResponseMessages == i); diff --git a/test/cpp/interop/server.cc b/test/cpp/interop/server.cc index 263bd8e3042478be08c9125aa2056ff5ca019e4d..9810ff6622b2bb920ed09c1a98b2937c9b929ed7 100644 --- a/test/cpp/interop/server.cc +++ b/test/cpp/interop/server.cc @@ -36,6 +36,7 @@ #include <thread> #include <signal.h> +#include <unistd.h> #include <gflags/gflags.h> #include <grpc/grpc.h> @@ -222,7 +223,7 @@ void RunServer() { std::unique_ptr<Server> server(builder.BuildAndStart()); gpr_log(GPR_INFO, "Server listening on %s", server_address.str().c_str()); while (!got_sigint) { - std::this_thread::sleep_for(std::chrono::seconds(5)); + sleep(5); } } diff --git a/test/cpp/qps/server.cc b/test/cpp/qps/server.cc index 8e136349a15e490ede14dc1a913258d403140372..be27c12b30a701b1c2537df3ad56ffdb49e6ac1b 100644 --- a/test/cpp/qps/server.cc +++ b/test/cpp/qps/server.cc @@ -36,6 +36,8 @@ #include <sys/signal.h> #include <thread> +#include <unistd.h> + #include <gflags/gflags.h> #include <grpc/support/alloc.h> #include <grpc/support/host_port.h> @@ -97,7 +99,7 @@ static bool SetPayload(PayloadType type, int size, Payload* payload) { namespace { -class TestServiceImpl final : public TestService::Service { +class TestServiceImpl GRPC_FINAL : public TestService::Service { public: Status CollectServerStats(ServerContext* context, const StatsRequest*, ServerStats* response) { @@ -146,7 +148,7 @@ static void RunServer() { grpc_profiler_start("qps_server.prof"); while (!got_sigint) { - std::this_thread::sleep_for(std::chrono::seconds(5)); + sleep(5); } grpc_profiler_stop(); diff --git a/tools/distpackages/build_deb_packages.sh b/tools/distpackages/build_deb_packages.sh index a5f945bd9a168767b9324cc6ad2f337e64218d6f..7b2acb6577e2247e52d96f5f2081099eec0eb205 100755 --- a/tools/distpackages/build_deb_packages.sh +++ b/tools/distpackages/build_deb_packages.sh @@ -33,7 +33,8 @@ deb_dest="deb_out" mkdir -p $deb_dest -version='0.8.0.0' +version='0.5.0.0' +pkg_version='0.5.0' if [ -f /.dockerinit ]; then # We're in Docker where uname -p returns "unknown". @@ -97,7 +98,7 @@ do # Build the debian package fakeroot dpkg-deb --build $tmp_dir/$pkg_name || { echo "dpkg-deb failed"; exit 1; } - deb_path=$deb_dest/${pkg_name}_amd64.deb + deb_path=$deb_dest/${pkg_name}_${pkg_version}_amd64.deb # Copy the .deb file to destination dir cp $tmp_dir/$pkg_name.deb $deb_path diff --git a/tools/distpackages/templates/libgrpc-dev/DEBIAN/control b/tools/distpackages/templates/libgrpc-dev/DEBIAN/control index 64dc79af1956a487e39e7ee88494826bdb45a375..289a278c5fd0851a63d8584dbd833892f258718b 100644 --- a/tools/distpackages/templates/libgrpc-dev/DEBIAN/control +++ b/tools/distpackages/templates/libgrpc-dev/DEBIAN/control @@ -1,5 +1,5 @@ Package: libgrpc-dev -Version: 0.8.0 +Version: 0.5.0 Architecture: amd64 Maintainer: Jan Tattermusch <jtattermusch@google.com> Depends: libgrpc, libc6-dev | libc-dev diff --git a/tools/distpackages/templates/libgrpc-dev/usr/share/doc/libgrpc-dev/changelog.gz b/tools/distpackages/templates/libgrpc-dev/usr/share/doc/libgrpc-dev/changelog.gz index eabdf46e6e2d798dab32e8ea88029448c988e330..4f557b8e9f8d1d0b78ec0ee245d1f9b890aab681 100644 Binary files a/tools/distpackages/templates/libgrpc-dev/usr/share/doc/libgrpc-dev/changelog.gz and b/tools/distpackages/templates/libgrpc-dev/usr/share/doc/libgrpc-dev/changelog.gz differ diff --git a/tools/distpackages/templates/libgrpc/DEBIAN/control b/tools/distpackages/templates/libgrpc/DEBIAN/control index 75c224e9a491ae1591d513ea2c13a7e82b428171..417a825827434a45e19bb43ba0be96f4a56fe1e9 100644 --- a/tools/distpackages/templates/libgrpc/DEBIAN/control +++ b/tools/distpackages/templates/libgrpc/DEBIAN/control @@ -1,5 +1,5 @@ Package: libgrpc -Version: 0.8.0 +Version: 0.5.0 Architecture: amd64 Maintainer: Jan Tattermusch <jtattermusch@google.com> Depends: libc6 diff --git a/tools/distpackages/templates/libgrpc/usr/share/doc/libgrpc/changelog.gz b/tools/distpackages/templates/libgrpc/usr/share/doc/libgrpc/changelog.gz index c07b4d2637133dc9f0f7d8eb373bb203dd4af141..12d4cd9300a286b4a6d662f8a4785cd5e30b7dc4 100644 Binary files a/tools/distpackages/templates/libgrpc/usr/share/doc/libgrpc/changelog.gz and b/tools/distpackages/templates/libgrpc/usr/share/doc/libgrpc/changelog.gz differ diff --git a/tools/dockerfile/grpc_java_base/Dockerfile b/tools/dockerfile/grpc_java_base/Dockerfile index feac5e745e3b7dff029d89165ccce20c0f5c5cfe..3eebc2bb93f200335b14ff96f805621034a90a0a 100644 --- a/tools/dockerfile/grpc_java_base/Dockerfile +++ b/tools/dockerfile/grpc_java_base/Dockerfile @@ -51,13 +51,14 @@ ENV PATH $PATH:$JAVA_HOME/bin:$M2_HOME/bin ENV LD_LIBRARY_PATH /usr/local/lib # Get the protobuf source from GitHub and install it -RUN wget -O - https://github.com/google/protobuf/archive/master.tar.gz | \ +RUN wget -O - https://github.com/google/protobuf/archive/v3.0.0-alpha-2.tar.gz | \ tar xz && \ - cd protobuf-master && \ + cd protobuf-3.0.0-alpha-2 && \ ./autogen.sh && \ ./configure --prefix=/usr && \ make -j12 && make check && make install && \ cd java && mvn install && cd .. && \ + cd javanano && mvn install && cd .. && \ rm -r "$(pwd)" # Install a GitHub SSH service credential that gives access to the GitHub repo while it's private diff --git a/tools/run_tests/build_python.sh b/tools/run_tests/build_python.sh index 9303a67a1e669ed24e8bb05c0225d5b0c3c8c1be..5a3c720ba56fa363b52147f3c7be4dfe672152a5 100755 --- a/tools/run_tests/build_python.sh +++ b/tools/run_tests/build_python.sh @@ -37,7 +37,6 @@ make -j6 root=`pwd` virtualenv python2.7_virtual_environment -ln -sf $root/include/grpc python2.7_virtual_environment/include/grpc source python2.7_virtual_environment/bin/activate pip install enum34==1.0.4 futures==2.2.0 protobuf==3.0.0-alpha-1 CFLAGS=-I$root/include LDFLAGS=-L$root/libs/opt pip install src/python/src diff --git a/tools/run_tests/jobset.py b/tools/run_tests/jobset.py index 575d2c5902d4a90dfae9c6f0c6509eb4dc97ad4a..ad65da535b42bccf7ff642b61b092b27ecf808d4 100755 --- a/tools/run_tests/jobset.py +++ b/tools/run_tests/jobset.py @@ -43,10 +43,17 @@ import time _DEFAULT_MAX_JOBS = 16 * multiprocessing.cpu_count() +have_alarm = False +def alarm_handler(unused_signum, unused_frame): + global have_alarm + have_alarm = False + + # setup a signal handler so that signal.pause registers 'something' # when a child finishes # not using futures and threading to avoid a dependency on subprocess32 signal.signal(signal.SIGCHLD, lambda unused_signum, unused_frame: None) +signal.signal(signal.SIGALRM, alarm_handler) def shuffle_iteratable(it): @@ -92,6 +99,7 @@ _CLEAR_LINE = '\x1b[2K' _TAG_COLOR = { 'FAILED': 'red', + 'TIMEOUT': 'red', 'PASSED': 'green', 'START': 'gray', 'WAITING': 'yellow', @@ -161,6 +169,7 @@ class Job(object): env = os.environ.copy() for k, v in spec.environ.iteritems(): env[k] = v + self._start = time.time() self._process = subprocess.Popen(args=spec.cmdline, stderr=subprocess.STDOUT, stdout=self._tempfile, @@ -168,12 +177,12 @@ class Job(object): self._state = _RUNNING self._newline_on_success = newline_on_success self._travis = travis - if not travis: - message('START', spec.shortname) + message('START', spec.shortname, do_newline=self._travis) def state(self, update_cache): """Poll current state of the job. Prints messages at completion.""" if self._state == _RUNNING and self._process.poll() is not None: + elapsed = time.time() - self._start if self._process.returncode != 0: self._state = _FAILURE self._tempfile.seek(0) @@ -182,10 +191,13 @@ class Job(object): self._spec.shortname, self._process.returncode), stdout) else: self._state = _SUCCESS - message('PASSED', self._spec.shortname, + message('PASSED', '%s [time=%.1fsec]' % (self._spec.shortname, elapsed), do_newline=self._newline_on_success or self._travis) if self._bin_hash: update_cache.finished(self._spec.identity(), self._bin_hash) + elif self._state == _RUNNING and time.time() - self._start > 300: + message('TIMEOUT', self._spec.shortname, do_newline=self._travis) + self.kill() return self._state def kill(self): @@ -239,6 +251,7 @@ class Jobset(object): st = job.state(self._cache) if st == _RUNNING: continue if st == _FAILURE: self._failures += 1 + if st == _KILLED: self._failures += 1 dead.add(job) for job in dead: self._completed += 1 @@ -247,6 +260,10 @@ class Jobset(object): if (not self._travis): message('WAITING', '%d jobs running, %d complete, %d failed' % ( len(self._running), self._completed, self._failures)) + global have_alarm + if not have_alarm: + have_alarm = True + signal.alarm(10) signal.pause() def cancelled(self): @@ -288,7 +305,11 @@ def run(cmdlines, maxjobs if maxjobs is not None else _DEFAULT_MAX_JOBS, newline_on_success, travis, cache if cache is not None else NoCache()) - for cmdline in shuffle_iteratable(cmdlines): + if not travis: + cmdlines = shuffle_iteratable(cmdlines) + else: + cmdlines = sorted(cmdlines, key=lambda x: x.shortname) + for cmdline in cmdlines: if not js.start(cmdline): break return js.finish() diff --git a/tools/run_tests/run_python.sh b/tools/run_tests/run_python.sh index 19f1458fabbb710c6195d974eeac166efa65e661..06ddb8e41ace0e590cccc96691cefce3be3a7414 100755 --- a/tools/run_tests/run_python.sh +++ b/tools/run_tests/run_python.sh @@ -38,7 +38,7 @@ export LD_LIBRARY_PATH=$root/libs/opt source python2.7_virtual_environment/bin/activate # TODO(issue 215): Properly itemize these in run_tests.py so that they can be parallelized. # TODO(atash): Enable dynamic unused port discovery for this test. -python2.7 -B test/compiler/python_plugin_test.py --build_mode=opt --port=40987 +python2.7 -B test/compiler/python_plugin_test.py --build_mode=opt python2.7 -B -m grpc._adapter._blocking_invocation_inline_service_test python2.7 -B -m grpc._adapter._c_test python2.7 -B -m grpc._adapter._event_invocation_synchronous_event_service_test diff --git a/tools/run_tests/run_tests.py b/tools/run_tests/run_tests.py index 5942ae91801a4d67580b99f5ec18ee6fd3a63368..372321c5e3a8eefb3ab012ab83ddb621e42e3d8e 100755 --- a/tools/run_tests/run_tests.py +++ b/tools/run_tests/run_tests.py @@ -44,6 +44,10 @@ import jobset import watch_dirs +ROOT = os.path.abspath(os.path.join(os.path.dirname(sys.argv[0]), '../..')) +os.chdir(ROOT) + + # SimpleConfig: just compile with CONFIG=config, and run the binary to test class SimpleConfig(object): @@ -83,14 +87,14 @@ class CLanguage(object): self.make_target = make_target with open('tools/run_tests/tests.json') as f: js = json.load(f) - self.binaries = [tgt['name'] - for tgt in js - if tgt['language'] == test_lang] + self.binaries = [tgt for tgt in js if tgt['language'] == test_lang] - def test_specs(self, config): + def test_specs(self, config, travis): out = [] - for name in self.binaries: - binary = 'bins/%s/%s' % (config.build_config, name) + for target in self.binaries: + if travis and target['flaky']: + continue + binary = 'bins/%s/%s' % (config.build_config, target['name']) out.append(config.job_spec(binary, [binary])) return out @@ -103,7 +107,7 @@ class CLanguage(object): class NodeLanguage(object): - def test_specs(self, config): + def test_specs(self, config, travis): return [config.job_spec('tools/run_tests/run_node.sh', None)] def make_targets(self): @@ -115,7 +119,7 @@ class NodeLanguage(object): class PhpLanguage(object): - def test_specs(self, config): + def test_specs(self, config, travis): return [config.job_spec('src/php/bin/run_tests.sh', None)] def make_targets(self): @@ -127,7 +131,7 @@ class PhpLanguage(object): class PythonLanguage(object): - def test_specs(self, config): + def test_specs(self, config, travis): return [config.job_spec('tools/run_tests/run_python.sh', None)] def make_targets(self): @@ -171,6 +175,7 @@ argp.add_argument('-c', '--config', argp.add_argument('-n', '--runs_per_test', default=1, type=int) argp.add_argument('-r', '--regex', default='.*', type=str) argp.add_argument('-j', '--jobs', default=1000, type=int) +argp.add_argument('-s', '--slowdown', default=1.0, type=float) argp.add_argument('-f', '--forever', default=False, action='store_const', @@ -200,6 +205,7 @@ make_targets = [] languages = set(_LANGUAGES[l] for l in args.language) build_steps = [jobset.JobSpec(['make', '-j', '%d' % (multiprocessing.cpu_count() + 1), + 'EXTRA_DEFINES=GRPC_TEST_SLOWDOWN_MACHINE_FACTOR=%f' % args.slowdown, 'CONFIG=%s' % cfg] + list(set( itertools.chain.from_iterable( l.make_targets() for l in languages)))) @@ -211,7 +217,7 @@ one_run = set( spec for config in run_configs for language in args.language - for spec in _LANGUAGES[language].test_specs(config) + for spec in _LANGUAGES[language].test_specs(config, args.travis) if re.search(args.regex, spec.shortname)) runs_per_test = args.runs_per_test diff --git a/tools/run_tests/tests.json b/tools/run_tests/tests.json index 4fb3e2d6b9e92ec7f5d899dd1788399705965548..f84bd9dac9c52348c89acf28c1e3bf60af0d6d35 100644 --- a/tools/run_tests/tests.json +++ b/tools/run_tests/tests.json @@ -2,1650 +2,2062 @@ [ { + "flaky": false, "language": "c", "name": "alarm_heap_test" }, { + "flaky": false, "language": "c", "name": "alarm_list_test" }, { + "flaky": false, "language": "c", "name": "alarm_test" }, { + "flaky": false, "language": "c", "name": "alpn_test" }, { + "flaky": false, "language": "c", "name": "bin_encoder_test" }, { + "flaky": false, "language": "c", "name": "census_hash_table_test" }, { + "flaky": false, "language": "c", "name": "census_statistics_multiple_writers_circular_buffer_test" }, { + "flaky": false, "language": "c", "name": "census_statistics_multiple_writers_test" }, { + "flaky": false, "language": "c", "name": "census_statistics_performance_test" }, { + "flaky": false, "language": "c", "name": "census_statistics_quick_test" }, { + "flaky": false, "language": "c", "name": "census_statistics_small_log_test" }, { + "flaky": false, "language": "c", "name": "census_stub_test" }, { + "flaky": false, "language": "c", "name": "census_window_stats_test" }, { + "flaky": false, "language": "c", "name": "chttp2_status_conversion_test" }, { + "flaky": false, "language": "c", "name": "chttp2_stream_encoder_test" }, { + "flaky": false, "language": "c", "name": "chttp2_stream_map_test" }, { + "flaky": false, "language": "c", "name": "chttp2_transport_end2end_test" }, { + "flaky": false, "language": "c", "name": "dualstack_socket_test" }, { + "flaky": false, "language": "c", "name": "echo_test" }, { + "flaky": false, "language": "c", "name": "fd_posix_test" }, { + "flaky": true, "language": "c", "name": "fling_stream_test" }, { + "flaky": true, "language": "c", "name": "fling_test" }, { + "flaky": false, "language": "c", "name": "gpr_cancellable_test" }, { + "flaky": false, "language": "c", "name": "gpr_cmdline_test" }, { + "flaky": false, "language": "c", "name": "gpr_env_test" }, { + "flaky": false, "language": "c", "name": "gpr_file_test" }, { + "flaky": false, "language": "c", "name": "gpr_histogram_test" }, { + "flaky": false, "language": "c", "name": "gpr_host_port_test" }, { + "flaky": false, "language": "c", "name": "gpr_log_test" }, { + "flaky": false, "language": "c", "name": "gpr_slice_buffer_test" }, { + "flaky": false, "language": "c", "name": "gpr_slice_test" }, { + "flaky": false, "language": "c", "name": "gpr_string_test" }, { + "flaky": false, "language": "c", "name": "gpr_sync_test" }, { + "flaky": false, "language": "c", "name": "gpr_thd_test" }, { + "flaky": false, "language": "c", "name": "gpr_time_test" }, { + "flaky": false, "language": "c", "name": "gpr_useful_test" }, { + "flaky": false, "language": "c", "name": "grpc_base64_test" }, { + "flaky": false, "language": "c", "name": "grpc_byte_buffer_reader_test" }, { + "flaky": false, "language": "c", "name": "grpc_channel_stack_test" }, { + "flaky": false, "language": "c", "name": "grpc_completion_queue_test" }, { + "flaky": false, "language": "c", "name": "grpc_credentials_test" }, { + "flaky": false, "language": "c", "name": "grpc_json_token_test" }, { + "flaky": false, "language": "c", "name": "grpc_stream_op_test" }, { + "flaky": false, "language": "c", "name": "hpack_parser_test" }, { + "flaky": false, "language": "c", "name": "hpack_table_test" }, { + "flaky": false, "language": "c", "name": "httpcli_format_request_test" }, { + "flaky": false, "language": "c", "name": "httpcli_parser_test" }, { + "flaky": false, "language": "c", "name": "json_rewrite_test" }, { + "flaky": false, "language": "c", "name": "json_test" }, { + "flaky": false, "language": "c", "name": "lame_client_test" }, { + "flaky": false, "language": "c", "name": "message_compress_test" }, { + "flaky": false, "language": "c", "name": "metadata_buffer_test" }, { + "flaky": false, "language": "c", "name": "multi_init_test" }, { + "flaky": false, "language": "c", "name": "murmur_hash_test" }, { + "flaky": false, "language": "c", "name": "no_server_test" }, { + "flaky": false, "language": "c", "name": "poll_kick_posix_test" }, { + "flaky": false, "language": "c", "name": "resolve_address_test" }, { + "flaky": false, "language": "c", "name": "secure_endpoint_test" }, { + "flaky": false, "language": "c", "name": "sockaddr_utils_test" }, { + "flaky": false, "language": "c", "name": "tcp_client_posix_test" }, { + "flaky": false, "language": "c", "name": "tcp_posix_test" }, { + "flaky": false, "language": "c", "name": "tcp_server_posix_test" }, { + "flaky": false, "language": "c", "name": "time_averaged_stats_test" }, { + "flaky": false, "language": "c", "name": "time_test" }, { + "flaky": false, "language": "c", "name": "timeout_encoding_test" }, { + "flaky": false, "language": "c", "name": "transport_metadata_test" }, { + "flaky": false, "language": "c", "name": "transport_security_test" }, { + "flaky": false, "language": "c++", "name": "async_end2end_test" }, { + "flaky": false, "language": "c++", "name": "channel_arguments_test" }, { + "flaky": false, "language": "c++", "name": "credentials_test" }, { + "flaky": false, "language": "c++", "name": "end2end_test" }, { + "flaky": false, "language": "c++", "name": "interop_test" }, { + "flaky": false, "language": "c++", "name": "pubsub_publisher_test" }, { + "flaky": false, "language": "c++", "name": "pubsub_subscriber_test" }, { + "flaky": false, "language": "c++", "name": "status_test" }, { + "flaky": false, "language": "c++", "name": "thread_pool_test" }, { + "flaky": false, "language": "c", "name": "chttp2_fake_security_cancel_after_accept_test" }, { + "flaky": false, "language": "c", "name": "chttp2_fake_security_cancel_after_accept_and_writes_closed_test" }, { + "flaky": false, "language": "c", "name": "chttp2_fake_security_cancel_after_invoke_test" }, { + "flaky": false, "language": "c", "name": "chttp2_fake_security_cancel_before_invoke_test" }, { + "flaky": false, "language": "c", "name": "chttp2_fake_security_cancel_in_a_vacuum_test" }, { + "flaky": false, "language": "c", "name": "chttp2_fake_security_census_simple_request_test" }, { + "flaky": false, "language": "c", "name": "chttp2_fake_security_disappearing_server_test" }, { + "flaky": false, "language": "c", "name": "chttp2_fake_security_early_server_shutdown_finishes_inflight_calls_test" }, { + "flaky": false, "language": "c", "name": "chttp2_fake_security_early_server_shutdown_finishes_tags_test" }, { + "flaky": false, "language": "c", "name": "chttp2_fake_security_empty_batch_test" }, { + "flaky": false, "language": "c", "name": "chttp2_fake_security_graceful_server_shutdown_test" }, { + "flaky": false, "language": "c", "name": "chttp2_fake_security_invoke_large_request_test" }, { + "flaky": false, "language": "c", "name": "chttp2_fake_security_max_concurrent_streams_test" }, { + "flaky": false, "language": "c", "name": "chttp2_fake_security_no_op_test" }, { + "flaky": false, "language": "c", "name": "chttp2_fake_security_ping_pong_streaming_test" }, { + "flaky": false, "language": "c", "name": "chttp2_fake_security_request_response_with_binary_metadata_and_payload_test" }, { + "flaky": false, "language": "c", "name": "chttp2_fake_security_request_response_with_metadata_and_payload_test" }, { + "flaky": false, "language": "c", "name": "chttp2_fake_security_request_response_with_payload_test" }, { + "flaky": false, "language": "c", "name": "chttp2_fake_security_request_with_large_metadata_test" }, { + "flaky": false, "language": "c", "name": "chttp2_fake_security_request_with_payload_test" }, { + "flaky": false, "language": "c", "name": "chttp2_fake_security_simple_delayed_request_test" }, { + "flaky": false, "language": "c", "name": "chttp2_fake_security_simple_request_test" }, { + "flaky": false, "language": "c", "name": "chttp2_fake_security_thread_stress_test" }, { + "flaky": false, "language": "c", "name": "chttp2_fake_security_writes_done_hangs_with_pending_read_test" }, { + "flaky": false, "language": "c", "name": "chttp2_fake_security_cancel_after_accept_legacy_test" }, { + "flaky": false, "language": "c", "name": "chttp2_fake_security_cancel_after_accept_and_writes_closed_legacy_test" }, { + "flaky": false, "language": "c", "name": "chttp2_fake_security_cancel_after_invoke_legacy_test" }, { + "flaky": false, "language": "c", "name": "chttp2_fake_security_cancel_before_invoke_legacy_test" }, { + "flaky": false, "language": "c", "name": "chttp2_fake_security_cancel_in_a_vacuum_legacy_test" }, { + "flaky": false, "language": "c", "name": "chttp2_fake_security_census_simple_request_legacy_test" }, { + "flaky": false, "language": "c", "name": "chttp2_fake_security_disappearing_server_legacy_test" }, { + "flaky": false, "language": "c", "name": "chttp2_fake_security_early_server_shutdown_finishes_inflight_calls_legacy_test" }, { + "flaky": false, "language": "c", "name": "chttp2_fake_security_early_server_shutdown_finishes_tags_legacy_test" }, { + "flaky": false, "language": "c", "name": "chttp2_fake_security_graceful_server_shutdown_legacy_test" }, { + "flaky": false, "language": "c", "name": "chttp2_fake_security_invoke_large_request_legacy_test" }, { + "flaky": false, "language": "c", "name": "chttp2_fake_security_max_concurrent_streams_legacy_test" }, { + "flaky": false, "language": "c", "name": "chttp2_fake_security_no_op_legacy_test" }, { + "flaky": false, "language": "c", "name": "chttp2_fake_security_ping_pong_streaming_legacy_test" }, { + "flaky": false, "language": "c", "name": "chttp2_fake_security_request_response_with_binary_metadata_and_payload_legacy_test" }, { + "flaky": false, "language": "c", "name": "chttp2_fake_security_request_response_with_metadata_and_payload_legacy_test" }, { + "flaky": false, "language": "c", "name": "chttp2_fake_security_request_response_with_payload_legacy_test" }, { + "flaky": false, "language": "c", "name": "chttp2_fake_security_request_response_with_trailing_metadata_and_payload_legacy_test" }, { + "flaky": false, "language": "c", "name": "chttp2_fake_security_request_with_large_metadata_legacy_test" }, { + "flaky": false, "language": "c", "name": "chttp2_fake_security_request_with_payload_legacy_test" }, { + "flaky": false, "language": "c", "name": "chttp2_fake_security_simple_delayed_request_legacy_test" }, { + "flaky": false, "language": "c", "name": "chttp2_fake_security_simple_request_legacy_test" }, { + "flaky": false, "language": "c", "name": "chttp2_fake_security_thread_stress_legacy_test" }, { + "flaky": false, "language": "c", "name": "chttp2_fake_security_writes_done_hangs_with_pending_read_legacy_test" }, { + "flaky": false, "language": "c", "name": "chttp2_fullstack_cancel_after_accept_test" }, { + "flaky": false, "language": "c", "name": "chttp2_fullstack_cancel_after_accept_and_writes_closed_test" }, { + "flaky": false, "language": "c", "name": "chttp2_fullstack_cancel_after_invoke_test" }, { + "flaky": false, "language": "c", "name": "chttp2_fullstack_cancel_before_invoke_test" }, { + "flaky": false, "language": "c", "name": "chttp2_fullstack_cancel_in_a_vacuum_test" }, { + "flaky": false, "language": "c", "name": "chttp2_fullstack_census_simple_request_test" }, { + "flaky": false, "language": "c", "name": "chttp2_fullstack_disappearing_server_test" }, { + "flaky": false, "language": "c", "name": "chttp2_fullstack_early_server_shutdown_finishes_inflight_calls_test" }, { + "flaky": false, "language": "c", "name": "chttp2_fullstack_early_server_shutdown_finishes_tags_test" }, { + "flaky": false, "language": "c", "name": "chttp2_fullstack_empty_batch_test" }, { + "flaky": false, "language": "c", "name": "chttp2_fullstack_graceful_server_shutdown_test" }, { + "flaky": false, "language": "c", "name": "chttp2_fullstack_invoke_large_request_test" }, { + "flaky": false, "language": "c", "name": "chttp2_fullstack_max_concurrent_streams_test" }, { + "flaky": false, "language": "c", "name": "chttp2_fullstack_no_op_test" }, { + "flaky": false, "language": "c", "name": "chttp2_fullstack_ping_pong_streaming_test" }, { + "flaky": false, "language": "c", "name": "chttp2_fullstack_request_response_with_binary_metadata_and_payload_test" }, { + "flaky": false, "language": "c", "name": "chttp2_fullstack_request_response_with_metadata_and_payload_test" }, { + "flaky": false, "language": "c", "name": "chttp2_fullstack_request_response_with_payload_test" }, { + "flaky": false, "language": "c", "name": "chttp2_fullstack_request_with_large_metadata_test" }, { + "flaky": false, "language": "c", "name": "chttp2_fullstack_request_with_payload_test" }, { + "flaky": false, "language": "c", "name": "chttp2_fullstack_simple_delayed_request_test" }, { + "flaky": false, "language": "c", "name": "chttp2_fullstack_simple_request_test" }, { + "flaky": false, "language": "c", "name": "chttp2_fullstack_thread_stress_test" }, { + "flaky": false, "language": "c", "name": "chttp2_fullstack_writes_done_hangs_with_pending_read_test" }, { + "flaky": false, "language": "c", "name": "chttp2_fullstack_cancel_after_accept_legacy_test" }, { + "flaky": false, "language": "c", "name": "chttp2_fullstack_cancel_after_accept_and_writes_closed_legacy_test" }, { + "flaky": false, "language": "c", "name": "chttp2_fullstack_cancel_after_invoke_legacy_test" }, { + "flaky": false, "language": "c", "name": "chttp2_fullstack_cancel_before_invoke_legacy_test" }, { + "flaky": false, "language": "c", "name": "chttp2_fullstack_cancel_in_a_vacuum_legacy_test" }, { + "flaky": false, "language": "c", "name": "chttp2_fullstack_census_simple_request_legacy_test" }, { + "flaky": false, "language": "c", "name": "chttp2_fullstack_disappearing_server_legacy_test" }, { + "flaky": false, "language": "c", "name": "chttp2_fullstack_early_server_shutdown_finishes_inflight_calls_legacy_test" }, { + "flaky": false, "language": "c", "name": "chttp2_fullstack_early_server_shutdown_finishes_tags_legacy_test" }, { + "flaky": false, "language": "c", "name": "chttp2_fullstack_graceful_server_shutdown_legacy_test" }, { + "flaky": false, "language": "c", "name": "chttp2_fullstack_invoke_large_request_legacy_test" }, { + "flaky": false, "language": "c", "name": "chttp2_fullstack_max_concurrent_streams_legacy_test" }, { + "flaky": false, "language": "c", "name": "chttp2_fullstack_no_op_legacy_test" }, { + "flaky": false, "language": "c", "name": "chttp2_fullstack_ping_pong_streaming_legacy_test" }, { + "flaky": false, "language": "c", "name": "chttp2_fullstack_request_response_with_binary_metadata_and_payload_legacy_test" }, { + "flaky": false, "language": "c", "name": "chttp2_fullstack_request_response_with_metadata_and_payload_legacy_test" }, { + "flaky": false, "language": "c", "name": "chttp2_fullstack_request_response_with_payload_legacy_test" }, { + "flaky": false, "language": "c", "name": "chttp2_fullstack_request_response_with_trailing_metadata_and_payload_legacy_test" }, { + "flaky": false, "language": "c", "name": "chttp2_fullstack_request_with_large_metadata_legacy_test" }, { + "flaky": false, "language": "c", "name": "chttp2_fullstack_request_with_payload_legacy_test" }, { + "flaky": false, "language": "c", "name": "chttp2_fullstack_simple_delayed_request_legacy_test" }, { + "flaky": false, "language": "c", "name": "chttp2_fullstack_simple_request_legacy_test" }, { + "flaky": false, "language": "c", "name": "chttp2_fullstack_thread_stress_legacy_test" }, { + "flaky": false, "language": "c", "name": "chttp2_fullstack_writes_done_hangs_with_pending_read_legacy_test" }, { + "flaky": false, "language": "c", "name": "chttp2_fullstack_uds_cancel_after_accept_test" }, { + "flaky": false, "language": "c", "name": "chttp2_fullstack_uds_cancel_after_accept_and_writes_closed_test" }, { + "flaky": false, "language": "c", "name": "chttp2_fullstack_uds_cancel_after_invoke_test" }, { + "flaky": false, "language": "c", "name": "chttp2_fullstack_uds_cancel_before_invoke_test" }, { + "flaky": false, "language": "c", "name": "chttp2_fullstack_uds_cancel_in_a_vacuum_test" }, { + "flaky": false, "language": "c", "name": "chttp2_fullstack_uds_census_simple_request_test" }, { + "flaky": false, "language": "c", "name": "chttp2_fullstack_uds_disappearing_server_test" }, { + "flaky": false, "language": "c", "name": "chttp2_fullstack_uds_early_server_shutdown_finishes_inflight_calls_test" }, { + "flaky": false, "language": "c", "name": "chttp2_fullstack_uds_early_server_shutdown_finishes_tags_test" }, { + "flaky": false, "language": "c", "name": "chttp2_fullstack_uds_empty_batch_test" }, { + "flaky": false, "language": "c", "name": "chttp2_fullstack_uds_graceful_server_shutdown_test" }, { + "flaky": false, "language": "c", "name": "chttp2_fullstack_uds_invoke_large_request_test" }, { + "flaky": false, "language": "c", "name": "chttp2_fullstack_uds_max_concurrent_streams_test" }, { + "flaky": false, "language": "c", "name": "chttp2_fullstack_uds_no_op_test" }, { + "flaky": false, "language": "c", "name": "chttp2_fullstack_uds_ping_pong_streaming_test" }, { + "flaky": false, "language": "c", "name": "chttp2_fullstack_uds_request_response_with_binary_metadata_and_payload_test" }, { + "flaky": false, "language": "c", "name": "chttp2_fullstack_uds_request_response_with_metadata_and_payload_test" }, { + "flaky": false, "language": "c", "name": "chttp2_fullstack_uds_request_response_with_payload_test" }, { + "flaky": false, "language": "c", "name": "chttp2_fullstack_uds_request_with_large_metadata_test" }, { + "flaky": false, "language": "c", "name": "chttp2_fullstack_uds_request_with_payload_test" }, { + "flaky": false, "language": "c", "name": "chttp2_fullstack_uds_simple_delayed_request_test" }, { + "flaky": false, "language": "c", "name": "chttp2_fullstack_uds_simple_request_test" }, { + "flaky": false, "language": "c", "name": "chttp2_fullstack_uds_thread_stress_test" }, { + "flaky": false, "language": "c", "name": "chttp2_fullstack_uds_writes_done_hangs_with_pending_read_test" }, { + "flaky": false, "language": "c", "name": "chttp2_fullstack_uds_cancel_after_accept_legacy_test" }, { + "flaky": false, "language": "c", "name": "chttp2_fullstack_uds_cancel_after_accept_and_writes_closed_legacy_test" }, { + "flaky": false, "language": "c", "name": "chttp2_fullstack_uds_cancel_after_invoke_legacy_test" }, { + "flaky": false, "language": "c", "name": "chttp2_fullstack_uds_cancel_before_invoke_legacy_test" }, { + "flaky": false, "language": "c", "name": "chttp2_fullstack_uds_cancel_in_a_vacuum_legacy_test" }, { + "flaky": false, "language": "c", "name": "chttp2_fullstack_uds_census_simple_request_legacy_test" }, { + "flaky": false, "language": "c", "name": "chttp2_fullstack_uds_disappearing_server_legacy_test" }, { + "flaky": false, "language": "c", "name": "chttp2_fullstack_uds_early_server_shutdown_finishes_inflight_calls_legacy_test" }, { + "flaky": false, "language": "c", "name": "chttp2_fullstack_uds_early_server_shutdown_finishes_tags_legacy_test" }, { + "flaky": false, "language": "c", "name": "chttp2_fullstack_uds_graceful_server_shutdown_legacy_test" }, { + "flaky": false, "language": "c", "name": "chttp2_fullstack_uds_invoke_large_request_legacy_test" }, { + "flaky": false, "language": "c", "name": "chttp2_fullstack_uds_max_concurrent_streams_legacy_test" }, { + "flaky": false, "language": "c", "name": "chttp2_fullstack_uds_no_op_legacy_test" }, { + "flaky": false, "language": "c", "name": "chttp2_fullstack_uds_ping_pong_streaming_legacy_test" }, { + "flaky": false, "language": "c", "name": "chttp2_fullstack_uds_request_response_with_binary_metadata_and_payload_legacy_test" }, { + "flaky": false, "language": "c", "name": "chttp2_fullstack_uds_request_response_with_metadata_and_payload_legacy_test" }, { + "flaky": false, "language": "c", "name": "chttp2_fullstack_uds_request_response_with_payload_legacy_test" }, { + "flaky": false, "language": "c", "name": "chttp2_fullstack_uds_request_response_with_trailing_metadata_and_payload_legacy_test" }, { + "flaky": false, "language": "c", "name": "chttp2_fullstack_uds_request_with_large_metadata_legacy_test" }, { + "flaky": false, "language": "c", "name": "chttp2_fullstack_uds_request_with_payload_legacy_test" }, { + "flaky": false, "language": "c", "name": "chttp2_fullstack_uds_simple_delayed_request_legacy_test" }, { + "flaky": false, "language": "c", "name": "chttp2_fullstack_uds_simple_request_legacy_test" }, { + "flaky": false, "language": "c", "name": "chttp2_fullstack_uds_thread_stress_legacy_test" }, { + "flaky": false, "language": "c", "name": "chttp2_fullstack_uds_writes_done_hangs_with_pending_read_legacy_test" }, { + "flaky": false, "language": "c", "name": "chttp2_simple_ssl_fullstack_cancel_after_accept_test" }, { + "flaky": false, "language": "c", "name": "chttp2_simple_ssl_fullstack_cancel_after_accept_and_writes_closed_test" }, { + "flaky": false, "language": "c", "name": "chttp2_simple_ssl_fullstack_cancel_after_invoke_test" }, { + "flaky": false, "language": "c", "name": "chttp2_simple_ssl_fullstack_cancel_before_invoke_test" }, { + "flaky": false, "language": "c", "name": "chttp2_simple_ssl_fullstack_cancel_in_a_vacuum_test" }, { + "flaky": false, "language": "c", "name": "chttp2_simple_ssl_fullstack_census_simple_request_test" }, { + "flaky": false, "language": "c", "name": "chttp2_simple_ssl_fullstack_disappearing_server_test" }, { + "flaky": false, "language": "c", "name": "chttp2_simple_ssl_fullstack_early_server_shutdown_finishes_inflight_calls_test" }, { + "flaky": false, "language": "c", "name": "chttp2_simple_ssl_fullstack_early_server_shutdown_finishes_tags_test" }, { + "flaky": false, "language": "c", "name": "chttp2_simple_ssl_fullstack_empty_batch_test" }, { + "flaky": false, "language": "c", "name": "chttp2_simple_ssl_fullstack_graceful_server_shutdown_test" }, { + "flaky": false, "language": "c", "name": "chttp2_simple_ssl_fullstack_invoke_large_request_test" }, { + "flaky": false, "language": "c", "name": "chttp2_simple_ssl_fullstack_max_concurrent_streams_test" }, { + "flaky": false, "language": "c", "name": "chttp2_simple_ssl_fullstack_no_op_test" }, { + "flaky": false, "language": "c", "name": "chttp2_simple_ssl_fullstack_ping_pong_streaming_test" }, { + "flaky": false, "language": "c", "name": "chttp2_simple_ssl_fullstack_request_response_with_binary_metadata_and_payload_test" }, { + "flaky": false, "language": "c", "name": "chttp2_simple_ssl_fullstack_request_response_with_metadata_and_payload_test" }, { + "flaky": false, "language": "c", "name": "chttp2_simple_ssl_fullstack_request_response_with_payload_test" }, { + "flaky": false, "language": "c", "name": "chttp2_simple_ssl_fullstack_request_with_large_metadata_test" }, { + "flaky": false, "language": "c", "name": "chttp2_simple_ssl_fullstack_request_with_payload_test" }, { + "flaky": false, "language": "c", "name": "chttp2_simple_ssl_fullstack_simple_delayed_request_test" }, { + "flaky": false, "language": "c", "name": "chttp2_simple_ssl_fullstack_simple_request_test" }, { + "flaky": false, "language": "c", "name": "chttp2_simple_ssl_fullstack_thread_stress_test" }, { + "flaky": false, "language": "c", "name": "chttp2_simple_ssl_fullstack_writes_done_hangs_with_pending_read_test" }, { + "flaky": false, "language": "c", "name": "chttp2_simple_ssl_fullstack_cancel_after_accept_legacy_test" }, { + "flaky": false, "language": "c", "name": "chttp2_simple_ssl_fullstack_cancel_after_accept_and_writes_closed_legacy_test" }, { + "flaky": false, "language": "c", "name": "chttp2_simple_ssl_fullstack_cancel_after_invoke_legacy_test" }, { + "flaky": false, "language": "c", "name": "chttp2_simple_ssl_fullstack_cancel_before_invoke_legacy_test" }, { + "flaky": false, "language": "c", "name": "chttp2_simple_ssl_fullstack_cancel_in_a_vacuum_legacy_test" }, { + "flaky": false, "language": "c", "name": "chttp2_simple_ssl_fullstack_census_simple_request_legacy_test" }, { + "flaky": false, "language": "c", "name": "chttp2_simple_ssl_fullstack_disappearing_server_legacy_test" }, { + "flaky": false, "language": "c", "name": "chttp2_simple_ssl_fullstack_early_server_shutdown_finishes_inflight_calls_legacy_test" }, { + "flaky": false, "language": "c", "name": "chttp2_simple_ssl_fullstack_early_server_shutdown_finishes_tags_legacy_test" }, { + "flaky": false, "language": "c", "name": "chttp2_simple_ssl_fullstack_graceful_server_shutdown_legacy_test" }, { + "flaky": false, "language": "c", "name": "chttp2_simple_ssl_fullstack_invoke_large_request_legacy_test" }, { + "flaky": false, "language": "c", "name": "chttp2_simple_ssl_fullstack_max_concurrent_streams_legacy_test" }, { + "flaky": false, "language": "c", "name": "chttp2_simple_ssl_fullstack_no_op_legacy_test" }, { + "flaky": false, "language": "c", "name": "chttp2_simple_ssl_fullstack_ping_pong_streaming_legacy_test" }, { + "flaky": false, "language": "c", "name": "chttp2_simple_ssl_fullstack_request_response_with_binary_metadata_and_payload_legacy_test" }, { + "flaky": false, "language": "c", "name": "chttp2_simple_ssl_fullstack_request_response_with_metadata_and_payload_legacy_test" }, { + "flaky": false, "language": "c", "name": "chttp2_simple_ssl_fullstack_request_response_with_payload_legacy_test" }, { + "flaky": false, "language": "c", "name": "chttp2_simple_ssl_fullstack_request_response_with_trailing_metadata_and_payload_legacy_test" }, { + "flaky": false, "language": "c", "name": "chttp2_simple_ssl_fullstack_request_with_large_metadata_legacy_test" }, { + "flaky": false, "language": "c", "name": "chttp2_simple_ssl_fullstack_request_with_payload_legacy_test" }, { + "flaky": false, "language": "c", "name": "chttp2_simple_ssl_fullstack_simple_delayed_request_legacy_test" }, { + "flaky": false, "language": "c", "name": "chttp2_simple_ssl_fullstack_simple_request_legacy_test" }, { + "flaky": false, "language": "c", "name": "chttp2_simple_ssl_fullstack_thread_stress_legacy_test" }, { + "flaky": false, "language": "c", "name": "chttp2_simple_ssl_fullstack_writes_done_hangs_with_pending_read_legacy_test" }, { + "flaky": false, "language": "c", "name": "chttp2_simple_ssl_with_oauth2_fullstack_cancel_after_accept_test" }, { + "flaky": false, "language": "c", "name": "chttp2_simple_ssl_with_oauth2_fullstack_cancel_after_accept_and_writes_closed_test" }, { + "flaky": false, "language": "c", "name": "chttp2_simple_ssl_with_oauth2_fullstack_cancel_after_invoke_test" }, { + "flaky": false, "language": "c", "name": "chttp2_simple_ssl_with_oauth2_fullstack_cancel_before_invoke_test" }, { + "flaky": false, "language": "c", "name": "chttp2_simple_ssl_with_oauth2_fullstack_cancel_in_a_vacuum_test" }, { + "flaky": false, "language": "c", "name": "chttp2_simple_ssl_with_oauth2_fullstack_census_simple_request_test" }, { + "flaky": false, "language": "c", "name": "chttp2_simple_ssl_with_oauth2_fullstack_disappearing_server_test" }, { + "flaky": false, "language": "c", "name": "chttp2_simple_ssl_with_oauth2_fullstack_early_server_shutdown_finishes_inflight_calls_test" }, { + "flaky": false, "language": "c", "name": "chttp2_simple_ssl_with_oauth2_fullstack_early_server_shutdown_finishes_tags_test" }, { + "flaky": false, "language": "c", "name": "chttp2_simple_ssl_with_oauth2_fullstack_empty_batch_test" }, { + "flaky": false, "language": "c", "name": "chttp2_simple_ssl_with_oauth2_fullstack_graceful_server_shutdown_test" }, { + "flaky": false, "language": "c", "name": "chttp2_simple_ssl_with_oauth2_fullstack_invoke_large_request_test" }, { + "flaky": false, "language": "c", "name": "chttp2_simple_ssl_with_oauth2_fullstack_max_concurrent_streams_test" }, { + "flaky": false, "language": "c", "name": "chttp2_simple_ssl_with_oauth2_fullstack_no_op_test" }, { + "flaky": false, "language": "c", "name": "chttp2_simple_ssl_with_oauth2_fullstack_ping_pong_streaming_test" }, { + "flaky": false, "language": "c", "name": "chttp2_simple_ssl_with_oauth2_fullstack_request_response_with_binary_metadata_and_payload_test" }, { + "flaky": false, "language": "c", "name": "chttp2_simple_ssl_with_oauth2_fullstack_request_response_with_metadata_and_payload_test" }, { + "flaky": false, "language": "c", "name": "chttp2_simple_ssl_with_oauth2_fullstack_request_response_with_payload_test" }, { + "flaky": false, "language": "c", "name": "chttp2_simple_ssl_with_oauth2_fullstack_request_with_large_metadata_test" }, { + "flaky": false, "language": "c", "name": "chttp2_simple_ssl_with_oauth2_fullstack_request_with_payload_test" }, { + "flaky": false, "language": "c", "name": "chttp2_simple_ssl_with_oauth2_fullstack_simple_delayed_request_test" }, { + "flaky": false, "language": "c", "name": "chttp2_simple_ssl_with_oauth2_fullstack_simple_request_test" }, { + "flaky": false, "language": "c", "name": "chttp2_simple_ssl_with_oauth2_fullstack_thread_stress_test" }, { + "flaky": false, "language": "c", "name": "chttp2_simple_ssl_with_oauth2_fullstack_writes_done_hangs_with_pending_read_test" }, { + "flaky": false, "language": "c", "name": "chttp2_simple_ssl_with_oauth2_fullstack_cancel_after_accept_legacy_test" }, { + "flaky": false, "language": "c", "name": "chttp2_simple_ssl_with_oauth2_fullstack_cancel_after_accept_and_writes_closed_legacy_test" }, { + "flaky": false, "language": "c", "name": "chttp2_simple_ssl_with_oauth2_fullstack_cancel_after_invoke_legacy_test" }, { + "flaky": false, "language": "c", "name": "chttp2_simple_ssl_with_oauth2_fullstack_cancel_before_invoke_legacy_test" }, { + "flaky": false, "language": "c", "name": "chttp2_simple_ssl_with_oauth2_fullstack_cancel_in_a_vacuum_legacy_test" }, { + "flaky": false, "language": "c", "name": "chttp2_simple_ssl_with_oauth2_fullstack_census_simple_request_legacy_test" }, { + "flaky": false, "language": "c", "name": "chttp2_simple_ssl_with_oauth2_fullstack_disappearing_server_legacy_test" }, { + "flaky": false, "language": "c", "name": "chttp2_simple_ssl_with_oauth2_fullstack_early_server_shutdown_finishes_inflight_calls_legacy_test" }, { + "flaky": false, "language": "c", "name": "chttp2_simple_ssl_with_oauth2_fullstack_early_server_shutdown_finishes_tags_legacy_test" }, { + "flaky": false, "language": "c", "name": "chttp2_simple_ssl_with_oauth2_fullstack_graceful_server_shutdown_legacy_test" }, { + "flaky": false, "language": "c", "name": "chttp2_simple_ssl_with_oauth2_fullstack_invoke_large_request_legacy_test" }, { + "flaky": false, "language": "c", "name": "chttp2_simple_ssl_with_oauth2_fullstack_max_concurrent_streams_legacy_test" }, { + "flaky": false, "language": "c", "name": "chttp2_simple_ssl_with_oauth2_fullstack_no_op_legacy_test" }, { + "flaky": false, "language": "c", "name": "chttp2_simple_ssl_with_oauth2_fullstack_ping_pong_streaming_legacy_test" }, { + "flaky": false, "language": "c", "name": "chttp2_simple_ssl_with_oauth2_fullstack_request_response_with_binary_metadata_and_payload_legacy_test" }, { + "flaky": false, "language": "c", "name": "chttp2_simple_ssl_with_oauth2_fullstack_request_response_with_metadata_and_payload_legacy_test" }, { + "flaky": false, "language": "c", "name": "chttp2_simple_ssl_with_oauth2_fullstack_request_response_with_payload_legacy_test" }, { + "flaky": false, "language": "c", "name": "chttp2_simple_ssl_with_oauth2_fullstack_request_response_with_trailing_metadata_and_payload_legacy_test" }, { + "flaky": false, "language": "c", "name": "chttp2_simple_ssl_with_oauth2_fullstack_request_with_large_metadata_legacy_test" }, { + "flaky": false, "language": "c", "name": "chttp2_simple_ssl_with_oauth2_fullstack_request_with_payload_legacy_test" }, { + "flaky": false, "language": "c", "name": "chttp2_simple_ssl_with_oauth2_fullstack_simple_delayed_request_legacy_test" }, { + "flaky": false, "language": "c", "name": "chttp2_simple_ssl_with_oauth2_fullstack_simple_request_legacy_test" }, { + "flaky": false, "language": "c", "name": "chttp2_simple_ssl_with_oauth2_fullstack_thread_stress_legacy_test" }, { + "flaky": false, "language": "c", "name": "chttp2_simple_ssl_with_oauth2_fullstack_writes_done_hangs_with_pending_read_legacy_test" }, { + "flaky": false, "language": "c", "name": "chttp2_socket_pair_cancel_after_accept_test" }, { + "flaky": false, "language": "c", "name": "chttp2_socket_pair_cancel_after_accept_and_writes_closed_test" }, { + "flaky": false, "language": "c", "name": "chttp2_socket_pair_cancel_after_invoke_test" }, { + "flaky": false, "language": "c", "name": "chttp2_socket_pair_cancel_before_invoke_test" }, { + "flaky": false, "language": "c", "name": "chttp2_socket_pair_cancel_in_a_vacuum_test" }, { + "flaky": false, "language": "c", "name": "chttp2_socket_pair_census_simple_request_test" }, { + "flaky": false, "language": "c", "name": "chttp2_socket_pair_disappearing_server_test" }, { + "flaky": false, "language": "c", "name": "chttp2_socket_pair_early_server_shutdown_finishes_inflight_calls_test" }, { + "flaky": false, "language": "c", "name": "chttp2_socket_pair_early_server_shutdown_finishes_tags_test" }, { + "flaky": false, "language": "c", "name": "chttp2_socket_pair_empty_batch_test" }, { + "flaky": false, "language": "c", "name": "chttp2_socket_pair_graceful_server_shutdown_test" }, { + "flaky": false, "language": "c", "name": "chttp2_socket_pair_invoke_large_request_test" }, { + "flaky": false, "language": "c", "name": "chttp2_socket_pair_max_concurrent_streams_test" }, { + "flaky": false, "language": "c", "name": "chttp2_socket_pair_no_op_test" }, { + "flaky": false, "language": "c", "name": "chttp2_socket_pair_ping_pong_streaming_test" }, { + "flaky": false, "language": "c", "name": "chttp2_socket_pair_request_response_with_binary_metadata_and_payload_test" }, { + "flaky": false, "language": "c", "name": "chttp2_socket_pair_request_response_with_metadata_and_payload_test" }, { + "flaky": false, "language": "c", "name": "chttp2_socket_pair_request_response_with_payload_test" }, { + "flaky": false, "language": "c", "name": "chttp2_socket_pair_request_with_large_metadata_test" }, { + "flaky": false, "language": "c", "name": "chttp2_socket_pair_request_with_payload_test" }, { + "flaky": false, "language": "c", "name": "chttp2_socket_pair_simple_delayed_request_test" }, { + "flaky": false, "language": "c", "name": "chttp2_socket_pair_simple_request_test" }, { + "flaky": false, "language": "c", "name": "chttp2_socket_pair_thread_stress_test" }, { + "flaky": false, "language": "c", "name": "chttp2_socket_pair_writes_done_hangs_with_pending_read_test" }, { + "flaky": false, "language": "c", "name": "chttp2_socket_pair_cancel_after_accept_legacy_test" }, { + "flaky": false, "language": "c", "name": "chttp2_socket_pair_cancel_after_accept_and_writes_closed_legacy_test" }, { + "flaky": false, "language": "c", "name": "chttp2_socket_pair_cancel_after_invoke_legacy_test" }, { + "flaky": false, "language": "c", "name": "chttp2_socket_pair_cancel_before_invoke_legacy_test" }, { + "flaky": false, "language": "c", "name": "chttp2_socket_pair_cancel_in_a_vacuum_legacy_test" }, { + "flaky": false, "language": "c", "name": "chttp2_socket_pair_census_simple_request_legacy_test" }, { + "flaky": false, "language": "c", "name": "chttp2_socket_pair_disappearing_server_legacy_test" }, { + "flaky": false, "language": "c", "name": "chttp2_socket_pair_early_server_shutdown_finishes_inflight_calls_legacy_test" }, { + "flaky": false, "language": "c", "name": "chttp2_socket_pair_early_server_shutdown_finishes_tags_legacy_test" }, { + "flaky": false, "language": "c", "name": "chttp2_socket_pair_graceful_server_shutdown_legacy_test" }, { + "flaky": false, "language": "c", "name": "chttp2_socket_pair_invoke_large_request_legacy_test" }, { + "flaky": false, "language": "c", "name": "chttp2_socket_pair_max_concurrent_streams_legacy_test" }, { + "flaky": false, "language": "c", "name": "chttp2_socket_pair_no_op_legacy_test" }, { + "flaky": false, "language": "c", "name": "chttp2_socket_pair_ping_pong_streaming_legacy_test" }, { + "flaky": false, "language": "c", "name": "chttp2_socket_pair_request_response_with_binary_metadata_and_payload_legacy_test" }, { + "flaky": false, "language": "c", "name": "chttp2_socket_pair_request_response_with_metadata_and_payload_legacy_test" }, { + "flaky": false, "language": "c", "name": "chttp2_socket_pair_request_response_with_payload_legacy_test" }, { + "flaky": false, "language": "c", "name": "chttp2_socket_pair_request_response_with_trailing_metadata_and_payload_legacy_test" }, { + "flaky": false, "language": "c", "name": "chttp2_socket_pair_request_with_large_metadata_legacy_test" }, { + "flaky": false, "language": "c", "name": "chttp2_socket_pair_request_with_payload_legacy_test" }, { + "flaky": false, "language": "c", "name": "chttp2_socket_pair_simple_delayed_request_legacy_test" }, { + "flaky": false, "language": "c", "name": "chttp2_socket_pair_simple_request_legacy_test" }, { + "flaky": false, "language": "c", "name": "chttp2_socket_pair_thread_stress_legacy_test" }, { + "flaky": false, "language": "c", "name": "chttp2_socket_pair_writes_done_hangs_with_pending_read_legacy_test" }, { + "flaky": false, "language": "c", "name": "chttp2_socket_pair_one_byte_at_a_time_cancel_after_accept_test" }, { + "flaky": false, "language": "c", "name": "chttp2_socket_pair_one_byte_at_a_time_cancel_after_accept_and_writes_closed_test" }, { + "flaky": false, "language": "c", "name": "chttp2_socket_pair_one_byte_at_a_time_cancel_after_invoke_test" }, { + "flaky": false, "language": "c", "name": "chttp2_socket_pair_one_byte_at_a_time_cancel_before_invoke_test" }, { + "flaky": false, "language": "c", "name": "chttp2_socket_pair_one_byte_at_a_time_cancel_in_a_vacuum_test" }, { + "flaky": false, "language": "c", "name": "chttp2_socket_pair_one_byte_at_a_time_census_simple_request_test" }, { + "flaky": false, "language": "c", "name": "chttp2_socket_pair_one_byte_at_a_time_disappearing_server_test" }, { + "flaky": false, "language": "c", "name": "chttp2_socket_pair_one_byte_at_a_time_early_server_shutdown_finishes_inflight_calls_test" }, { + "flaky": false, "language": "c", "name": "chttp2_socket_pair_one_byte_at_a_time_early_server_shutdown_finishes_tags_test" }, { + "flaky": false, "language": "c", "name": "chttp2_socket_pair_one_byte_at_a_time_empty_batch_test" }, { + "flaky": false, "language": "c", "name": "chttp2_socket_pair_one_byte_at_a_time_graceful_server_shutdown_test" }, { + "flaky": false, "language": "c", "name": "chttp2_socket_pair_one_byte_at_a_time_invoke_large_request_test" }, { + "flaky": false, "language": "c", "name": "chttp2_socket_pair_one_byte_at_a_time_max_concurrent_streams_test" }, { + "flaky": false, "language": "c", "name": "chttp2_socket_pair_one_byte_at_a_time_no_op_test" }, { + "flaky": false, "language": "c", "name": "chttp2_socket_pair_one_byte_at_a_time_ping_pong_streaming_test" }, { + "flaky": false, "language": "c", "name": "chttp2_socket_pair_one_byte_at_a_time_request_response_with_binary_metadata_and_payload_test" }, { + "flaky": false, "language": "c", "name": "chttp2_socket_pair_one_byte_at_a_time_request_response_with_metadata_and_payload_test" }, { + "flaky": false, "language": "c", "name": "chttp2_socket_pair_one_byte_at_a_time_request_response_with_payload_test" }, { + "flaky": false, "language": "c", "name": "chttp2_socket_pair_one_byte_at_a_time_request_with_large_metadata_test" }, { + "flaky": false, "language": "c", "name": "chttp2_socket_pair_one_byte_at_a_time_request_with_payload_test" }, { + "flaky": false, "language": "c", "name": "chttp2_socket_pair_one_byte_at_a_time_simple_delayed_request_test" }, { + "flaky": false, "language": "c", "name": "chttp2_socket_pair_one_byte_at_a_time_simple_request_test" }, { + "flaky": false, "language": "c", "name": "chttp2_socket_pair_one_byte_at_a_time_thread_stress_test" }, { + "flaky": false, "language": "c", "name": "chttp2_socket_pair_one_byte_at_a_time_writes_done_hangs_with_pending_read_test" }, { + "flaky": false, "language": "c", "name": "chttp2_socket_pair_one_byte_at_a_time_cancel_after_accept_legacy_test" }, { + "flaky": false, "language": "c", "name": "chttp2_socket_pair_one_byte_at_a_time_cancel_after_accept_and_writes_closed_legacy_test" }, { + "flaky": false, "language": "c", "name": "chttp2_socket_pair_one_byte_at_a_time_cancel_after_invoke_legacy_test" }, { + "flaky": false, "language": "c", "name": "chttp2_socket_pair_one_byte_at_a_time_cancel_before_invoke_legacy_test" }, { + "flaky": false, "language": "c", "name": "chttp2_socket_pair_one_byte_at_a_time_cancel_in_a_vacuum_legacy_test" }, { + "flaky": false, "language": "c", "name": "chttp2_socket_pair_one_byte_at_a_time_census_simple_request_legacy_test" }, { + "flaky": false, "language": "c", "name": "chttp2_socket_pair_one_byte_at_a_time_disappearing_server_legacy_test" }, { + "flaky": false, "language": "c", "name": "chttp2_socket_pair_one_byte_at_a_time_early_server_shutdown_finishes_inflight_calls_legacy_test" }, { + "flaky": false, "language": "c", "name": "chttp2_socket_pair_one_byte_at_a_time_early_server_shutdown_finishes_tags_legacy_test" }, { + "flaky": false, "language": "c", "name": "chttp2_socket_pair_one_byte_at_a_time_graceful_server_shutdown_legacy_test" }, { + "flaky": false, "language": "c", "name": "chttp2_socket_pair_one_byte_at_a_time_invoke_large_request_legacy_test" }, { + "flaky": false, "language": "c", "name": "chttp2_socket_pair_one_byte_at_a_time_max_concurrent_streams_legacy_test" }, { + "flaky": false, "language": "c", "name": "chttp2_socket_pair_one_byte_at_a_time_no_op_legacy_test" }, { + "flaky": false, "language": "c", "name": "chttp2_socket_pair_one_byte_at_a_time_ping_pong_streaming_legacy_test" }, { + "flaky": false, "language": "c", "name": "chttp2_socket_pair_one_byte_at_a_time_request_response_with_binary_metadata_and_payload_legacy_test" }, { + "flaky": false, "language": "c", "name": "chttp2_socket_pair_one_byte_at_a_time_request_response_with_metadata_and_payload_legacy_test" }, { + "flaky": false, "language": "c", "name": "chttp2_socket_pair_one_byte_at_a_time_request_response_with_payload_legacy_test" }, { + "flaky": false, "language": "c", "name": "chttp2_socket_pair_one_byte_at_a_time_request_response_with_trailing_metadata_and_payload_legacy_test" }, { + "flaky": false, "language": "c", "name": "chttp2_socket_pair_one_byte_at_a_time_request_with_large_metadata_legacy_test" }, { + "flaky": false, "language": "c", "name": "chttp2_socket_pair_one_byte_at_a_time_request_with_payload_legacy_test" }, { + "flaky": false, "language": "c", "name": "chttp2_socket_pair_one_byte_at_a_time_simple_delayed_request_legacy_test" }, { + "flaky": false, "language": "c", "name": "chttp2_socket_pair_one_byte_at_a_time_simple_request_legacy_test" }, { + "flaky": false, "language": "c", "name": "chttp2_socket_pair_one_byte_at_a_time_thread_stress_legacy_test" }, { + "flaky": false, "language": "c", "name": "chttp2_socket_pair_one_byte_at_a_time_writes_done_hangs_with_pending_read_legacy_test" }